From 2bddd69659cec75e3b2383a23a400969f1e42605 Mon Sep 17 00:00:00 2001 From: akovalov81 Date: Sun, 19 Jul 2026 16:10:52 +0300 Subject: [PATCH] vault backup: 2026-07-19 16:10:52 --- .obsidian/community-plugins.json | 3 +- .../obsidian-textgenerator-plugin/data.json | 112 + .../obsidian-textgenerator-plugin/main.js | 1875 +++++++++++ .../manifest.json | 11 + .../obsidian-textgenerator-plugin/styles.css | 2743 +++++++++++++++++ .../Баланс у тарілці/Ідея для каналу..md | 1 - 6 files changed, 4743 insertions(+), 2 deletions(-) create mode 100644 .obsidian/plugins/obsidian-textgenerator-plugin/data.json create mode 100644 .obsidian/plugins/obsidian-textgenerator-plugin/main.js create mode 100644 .obsidian/plugins/obsidian-textgenerator-plugin/manifest.json create mode 100644 .obsidian/plugins/obsidian-textgenerator-plugin/styles.css delete mode 100644 1.Projects/Баланс у тарілці/Ідея для каналу..md diff --git a/.obsidian/community-plugins.json b/.obsidian/community-plugins.json index d3f66fa..99f03cd 100644 --- a/.obsidian/community-plugins.json +++ b/.obsidian/community-plugins.json @@ -1,3 +1,4 @@ [ - "obsidian-git" + "obsidian-git", + "obsidian-textgenerator-plugin" ] \ No newline at end of file diff --git a/.obsidian/plugins/obsidian-textgenerator-plugin/data.json b/.obsidian/plugins/obsidian-textgenerator-plugin/data.json new file mode 100644 index 0000000..2095896 --- /dev/null +++ b/.obsidian/plugins/obsidian-textgenerator-plugin/data.json @@ -0,0 +1,112 @@ +{ + "version": "0.8.7", + "endpoint": "https://api.openai.com/v1", + "models": [], + "api_key": "", + "encrypt_keys": false, + "selectedProvider": "OpenAI Chat (Langchain)", + "max_tokens": 5000, + "temperature": 0.7, + "frequency_penalty": 0.5, + "showStatusBar": true, + "outputToBlockQuote": false, + "freeCursorOnStreaming": false, + "allowJavascriptRun": false, + "experiment": false, + "promptsPath": "textgenerator/templates", + "textGenPath": "textgenerator/", + "prefix": "\n\n", + "tgSelectionLimiter": "^\\*\\*\\*", + "stream": true, + "context": { + "customInstructEnabled": true, + "includeClipboard": true, + "customInstruct": "Title: {{title}}\n \nStarred Blocks: {{starredBlocks}}\n\t \n{{tg_selection}}", + "contextTemplate": "Title: {{title}}\n\t\nStarred Blocks: {{starredBlocks}}\n\t \n{{tg_selection}}" + }, + "requestTimeout": 300000, + "options": { + "generate-text": true, + "generate-text-with-metadata": true, + "insert-generated-text-From-template": true, + "create-generated-text-From-template": false, + "search-results-batch-generate-from-template": true, + "insert-text-From-template": false, + "create-text-From-template": false, + "show-modal-From-template": true, + "open-template-as-tool": true, + "open-playground": true, + "set_max_tokens": true, + "set-llm": true, + "set-model": true, + "packageManager": true, + "create-template": false, + "get-title": true, + "generated-text-to-clipboard-From-template": false, + "calculate-tokens": true, + "calculate-tokens-for-template": true, + "text-extractor-tool": true, + "stop-stream": true, + "custom-instruct": true, + "generate-in-right-click-menu": false, + "batch-generate-in-right-click-files-menu": true, + "tg-block-processor": true, + "reload": true, + "disable-ribbon-icons": false, + "overlay-toolbar": false, + "log-slowest-operations": false + }, + "advancedOptions": { + "generateTitleInstructEnabled": false, + "generateTitleInstruct": "Generate a title for the current document (do not use * \" \\ / < > : | ? .):\n{{substring content 0 255}}", + "includeAttachmentsInRequest": false + }, + "autoSuggestOptions": { + "customInstructEnabled": true, + "customInstruct": "Continue the follwing text:\nTitle: {{title}}\n{{query}}", + "systemPrompt": "", + "isEnabled": false, + "allowInNewLine": false, + "delay": 300, + "numberOfSuggestions": 5, + "triggerPhrase": " ", + "stop": ".", + "showStatus": true, + "customProvider": false, + "inlineSuggestions": false, + "overrideTrigger": " " + }, + "slashSuggestOptions": { + "isEnabled": false, + "triggerPhrase": "/" + }, + "extractorsOptions": { + "PDFExtractor": true, + "WebPageExtractor": true, + "YoutubeExtractor": true, + "AudioExtractor": false, + "ImageExtractorEmbded": true, + "ImageExtractor": true + }, + "displayErrorInEditor": false, + "LLMProviderProfiles": {}, + "LLMProviderOptions": { + "whisper": { + "base_path": "https://api.openai.com/v1", + "model": "whisper-1", + "api_key": "", + "api_version": "" + }, + "OpenAI Chat (Langchain)": { + "basePath": "https://api.openai.com/v1", + "model": "gpt-4o-mini", + "reasoningEffort": "medium", + "api_key": "" + } + }, + "LLMProviderOptionsKeysHashed": { + "whisper.api_key": "__@#key_prefix#@__", + "OpenAI Chat (Langchain).api_key": "__@#key_prefix#@__sk-proj-BMUo5Q1hY25X8FMw0xIwjZ9r9Cu-EtDfnMo68PKkkzpOUm-aXNYslnIfx55D5eVcojYAaGE1rqT3BlbkFJ-khMPg4jSk-U8eBIfLQ5MtWCoi2IgZyfhrTVLuddoGx5Luf98OC2JHIIOmdcjHFb-ZOcdWboEA" + }, + "api_key_encrypted": "__@#key_prefix#@__sk-proj-BMUo5Q1hY25X8FMw0xIwjZ9r9Cu-EtDfnMo68PKkkzpOUm-aXNYslnIfx55D5eVcojYAaGE1rqT3BlbkFJ-khMPg4jSk-U8eBIfLQ5MtWCoi2IgZyfhrTVLuddoGx5Luf98OC2JHIIOmdcjHFb-ZOcdWboEA" +} \ No newline at end of file diff --git a/.obsidian/plugins/obsidian-textgenerator-plugin/main.js b/.obsidian/plugins/obsidian-textgenerator-plugin/main.js new file mode 100644 index 0000000..0f512b9 --- /dev/null +++ b/.obsidian/plugins/obsidian-textgenerator-plugin/main.js @@ -0,0 +1,1875 @@ +/* +THIS IS A GENERATED/BUNDLED FILE BY ESBUILD +if you want to view the source, please visit the github repository of this plugin +repo: https://github.com/nhaouari/obsidian-textgenerator-plugin +*/ + +"use strict";var l1I=Object.create;var mle=Object.defineProperty;var n1I=Object.getOwnPropertyDescriptor;var a1I=Object.getOwnPropertyNames;var c1I=Object.getPrototypeOf,r1I=Object.prototype.hasOwnProperty;var g=(t,e)=>()=>(t&&(e=t(t=0)),e);var Y=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),tr=(t,e)=>{for(var I in e)mle(t,I,{get:e[I],enumerable:!0})},mlt=(t,e,I,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of a1I(e))!r1I.call(t,n)&&n!==I&&mle(t,n,{get:()=>e[n],enumerable:!(l=n1I(e,n))||l.enumerable});return t};var z=(t,e,I)=>(I=t!=null?l1I(c1I(t)):{},mlt(e||!t||!t.__esModule?mle(I,"default",{value:t,enumerable:!0}):I,t)),Zlt=t=>mlt(mle({},"__esModule",{value:!0}),t);var plt=(()=>{for(var t=new Uint8Array(128),e=0;e<64;e++)t[e<26?e+65:e<52?e+71:e<62?e-4:e*4-205]=e;return I=>{for(var l=I.length,n=new Uint8Array((l-(I[l-1]=="=")-(I[l-2]=="="))*3/4|0),a=0,c=0;a>4,n[c++]=s<<4|i>>2,n[c++]=i<<6|G}return n}})();var gXe=Y(Zle=>{"use strict";o();Zle.byteLength=o1I;Zle.toByteArray=G1I;Zle.fromByteArray=b1I;var wA=[],Np=[],s1I=typeof Uint8Array<"u"?Uint8Array:Array,XXe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(lJ=0,hlt=XXe.length;lJ0)throw new Error("Invalid string. Length must be a multiple of 4");var I=t.indexOf("=");I===-1&&(I=e);var l=I===e?0:4-I%4;return[I,l]}function o1I(t){var e=Wlt(t),I=e[0],l=e[1];return(I+l)*3/4-l}function i1I(t,e,I){return(e+I)*3/4-I}function G1I(t){var e,I=Wlt(t),l=I[0],n=I[1],a=new s1I(i1I(t,l,n)),c=0,r=n>0?l-4:l,s;for(s=0;s>16&255,a[c++]=e>>8&255,a[c++]=e&255;return n===2&&(e=Np[t.charCodeAt(s)]<<2|Np[t.charCodeAt(s+1)]>>4,a[c++]=e&255),n===1&&(e=Np[t.charCodeAt(s)]<<10|Np[t.charCodeAt(s+1)]<<4|Np[t.charCodeAt(s+2)]>>2,a[c++]=e>>8&255,a[c++]=e&255),a}function d1I(t){return wA[t>>18&63]+wA[t>>12&63]+wA[t>>6&63]+wA[t&63]}function u1I(t,e,I){for(var l,n=[],a=e;ar?r:c+a));return l===1?(e=t[I-1],n.push(wA[e>>2]+wA[e<<4&63]+"==")):l===2&&(e=(t[I-2]<<8)+t[I-1],n.push(wA[e>>10]+wA[e>>4&63]+wA[e<<2&63]+"=")),n.join("")}});var Nlt=Y(vXe=>{o();vXe.read=function(t,e,I,l,n){var a,c,r=n*8-l-1,s=(1<>1,G=-7,d=I?n-1:0,u=I?-1:1,b=t[e+d];for(d+=u,a=b&(1<<-G)-1,b>>=-G,G+=r;G>0;a=a*256+t[e+d],d+=u,G-=8);for(c=a&(1<<-G)-1,a>>=-G,G+=l;G>0;c=c*256+t[e+d],d+=u,G-=8);if(a===0)a=1-i;else{if(a===s)return c?NaN:(b?-1:1)*(1/0);c=c+Math.pow(2,l),a=a-i}return(b?-1:1)*c*Math.pow(2,a-l)};vXe.write=function(t,e,I,l,n,a){var c,r,s,i=a*8-n-1,G=(1<>1,u=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,b=l?0:a-1,Z=l?1:-1,p=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(r=isNaN(e)?1:0,c=G):(c=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-c))<1&&(c--,s*=2),c+d>=1?e+=u/s:e+=u*Math.pow(2,1-d),e*s>=2&&(c++,s/=2),c+d>=G?(r=0,c=G):c+d>=1?(r=(e*s-1)*Math.pow(2,n),c=c+d):(r=e*Math.pow(2,d-1)*Math.pow(2,n),c=0));n>=8;t[I+b]=r&255,b+=Z,r/=256,n-=8);for(c=c<0;t[I+b]=c&255,b+=Z,c/=256,i-=8);t[I+b-Z]|=p*128}});var Wle=Y(rx=>{"use strict";o();var yXe=gXe(),ax=Nlt(),Vlt=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;rx.Buffer=Qe;rx.SlowBuffer=N1I;rx.INSPECT_MAX_BYTES=50;var ple=2147483647;rx.kMaxLength=ple;Qe.TYPED_ARRAY_SUPPORT=m1I();!Qe.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function m1I(){try{let t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),t.foo()===42}catch{return!1}}Object.defineProperty(Qe.prototype,"parent",{enumerable:!0,get:function(){if(Qe.isBuffer(this))return this.buffer}});Object.defineProperty(Qe.prototype,"offset",{enumerable:!0,get:function(){if(Qe.isBuffer(this))return this.byteOffset}});function mX(t){if(t>ple)throw new RangeError('The value "'+t+'" is invalid for option "size"');let e=new Uint8Array(t);return Object.setPrototypeOf(e,Qe.prototype),e}function Qe(t,e,I){if(typeof t=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return fXe(t)}return Flt(t,e,I)}Qe.poolSize=8192;function Flt(t,e,I){if(typeof t=="string")return p1I(t,e);if(ArrayBuffer.isView(t))return h1I(t);if(t==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(HA(t,ArrayBuffer)||t&&HA(t.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(HA(t,SharedArrayBuffer)||t&&HA(t.buffer,SharedArrayBuffer)))return HXe(t,e,I);if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let l=t.valueOf&&t.valueOf();if(l!=null&&l!==t)return Qe.from(l,e,I);let n=W1I(t);if(n)return n;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof t[Symbol.toPrimitive]=="function")return Qe.from(t[Symbol.toPrimitive]("string"),e,I);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}Qe.from=function(t,e,I){return Flt(t,e,I)};Object.setPrototypeOf(Qe.prototype,Uint8Array.prototype);Object.setPrototypeOf(Qe,Uint8Array);function Xlt(t){if(typeof t!="number")throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function Z1I(t,e,I){return Xlt(t),t<=0?mX(t):e!==void 0?typeof I=="string"?mX(t).fill(e,I):mX(t).fill(e):mX(t)}Qe.alloc=function(t,e,I){return Z1I(t,e,I)};function fXe(t){return Xlt(t),mX(t<0?0:EXe(t)|0)}Qe.allocUnsafe=function(t){return fXe(t)};Qe.allocUnsafeSlow=function(t){return fXe(t)};function p1I(t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!Qe.isEncoding(e))throw new TypeError("Unknown encoding: "+e);let I=glt(t,e)|0,l=mX(I),n=l.write(t,e);return n!==I&&(l=l.slice(0,n)),l}function wXe(t){let e=t.length<0?0:EXe(t.length)|0,I=mX(e);for(let l=0;l=ple)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ple.toString(16)+" bytes");return t|0}function N1I(t){return+t!=t&&(t=0),Qe.alloc(+t)}Qe.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==Qe.prototype};Qe.compare=function(e,I){if(HA(e,Uint8Array)&&(e=Qe.from(e,e.offset,e.byteLength)),HA(I,Uint8Array)&&(I=Qe.from(I,I.offset,I.byteLength)),!Qe.isBuffer(e)||!Qe.isBuffer(I))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===I)return 0;let l=e.length,n=I.length;for(let a=0,c=Math.min(l,n);an.length?(Qe.isBuffer(c)||(c=Qe.from(c)),c.copy(n,a)):Uint8Array.prototype.set.call(n,c,a);else if(Qe.isBuffer(c))c.copy(n,a);else throw new TypeError('"list" argument must be an Array of Buffers');a+=c.length}return n};function glt(t,e){if(Qe.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||HA(t,ArrayBuffer))return t.byteLength;if(typeof t!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);let I=t.length,l=arguments.length>2&&arguments[2]===!0;if(!l&&I===0)return 0;let n=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return I;case"utf8":case"utf-8":return QXe(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I*2;case"hex":return I>>>1;case"base64":return Clt(t).length;default:if(n)return l?-1:QXe(t).length;e=(""+e).toLowerCase(),n=!0}}Qe.byteLength=glt;function V1I(t,e,I){let l=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((I===void 0||I>this.length)&&(I=this.length),I<=0)||(I>>>=0,e>>>=0,I<=e))return"";for(t||(t="utf8");;)switch(t){case"hex":return H1I(this,e,I);case"utf8":case"utf-8":return ylt(this,e,I);case"ascii":return y1I(this,e,I);case"latin1":case"binary":return w1I(this,e,I);case"base64":return g1I(this,e,I);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Q1I(this,e,I);default:if(l)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),l=!0}}Qe.prototype._isBuffer=!0;function nJ(t,e,I){let l=t[e];t[e]=t[I],t[I]=l}Qe.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let I=0;II&&(e+=" ... "),""};Vlt&&(Qe.prototype[Vlt]=Qe.prototype.inspect);Qe.prototype.compare=function(e,I,l,n,a){if(HA(e,Uint8Array)&&(e=Qe.from(e,e.offset,e.byteLength)),!Qe.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(I===void 0&&(I=0),l===void 0&&(l=e?e.length:0),n===void 0&&(n=0),a===void 0&&(a=this.length),I<0||l>e.length||n<0||a>this.length)throw new RangeError("out of range index");if(n>=a&&I>=l)return 0;if(n>=a)return-1;if(I>=l)return 1;if(I>>>=0,l>>>=0,n>>>=0,a>>>=0,this===e)return 0;let c=a-n,r=l-I,s=Math.min(c,r),i=this.slice(n,a),G=e.slice(I,l);for(let d=0;d2147483647?I=2147483647:I<-2147483648&&(I=-2147483648),I=+I,CXe(I)&&(I=n?0:t.length-1),I<0&&(I=t.length+I),I>=t.length){if(n)return-1;I=t.length-1}else if(I<0)if(n)I=0;else return-1;if(typeof e=="string"&&(e=Qe.from(e,l)),Qe.isBuffer(e))return e.length===0?-1:Ylt(t,e,I,l,n);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?n?Uint8Array.prototype.indexOf.call(t,e,I):Uint8Array.prototype.lastIndexOf.call(t,e,I):Ylt(t,[e],I,l,n);throw new TypeError("val must be string, number or Buffer")}function Ylt(t,e,I,l,n){let a=1,c=t.length,r=e.length;if(l!==void 0&&(l=String(l).toLowerCase(),l==="ucs2"||l==="ucs-2"||l==="utf16le"||l==="utf-16le")){if(t.length<2||e.length<2)return-1;a=2,c/=2,r/=2,I/=2}function s(G,d){return a===1?G[d]:G.readUInt16BE(d*a)}let i;if(n){let G=-1;for(i=I;ic&&(I=c-r),i=I;i>=0;i--){let G=!0;for(let d=0;dn&&(l=n)):l=n;let a=e.length;l>a/2&&(l=a/2);let c;for(c=0;c>>0,isFinite(l)?(l=l>>>0,n===void 0&&(n="utf8")):(n=l,l=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let a=this.length-I;if((l===void 0||l>a)&&(l=a),e.length>0&&(l<0||I<0)||I>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let c=!1;for(;;)switch(n){case"hex":return Y1I(this,e,I,l);case"utf8":case"utf-8":return R1I(this,e,I,l);case"ascii":case"latin1":case"binary":return A1I(this,e,I,l);case"base64":return F1I(this,e,I,l);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X1I(this,e,I,l);default:if(c)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),c=!0}};Qe.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function g1I(t,e,I){return e===0&&I===t.length?yXe.fromByteArray(t):yXe.fromByteArray(t.slice(e,I))}function ylt(t,e,I){I=Math.min(t.length,I);let l=[],n=e;for(;n239?4:a>223?3:a>191?2:1;if(n+r<=I){let s,i,G,d;switch(r){case 1:a<128&&(c=a);break;case 2:s=t[n+1],(s&192)===128&&(d=(a&31)<<6|s&63,d>127&&(c=d));break;case 3:s=t[n+1],i=t[n+2],(s&192)===128&&(i&192)===128&&(d=(a&15)<<12|(s&63)<<6|i&63,d>2047&&(d<55296||d>57343)&&(c=d));break;case 4:s=t[n+1],i=t[n+2],G=t[n+3],(s&192)===128&&(i&192)===128&&(G&192)===128&&(d=(a&15)<<18|(s&63)<<12|(i&63)<<6|G&63,d>65535&&d<1114112&&(c=d))}}c===null?(c=65533,r=1):c>65535&&(c-=65536,l.push(c>>>10&1023|55296),c=56320|c&1023),l.push(c),n+=r}return v1I(l)}var Rlt=4096;function v1I(t){let e=t.length;if(e<=Rlt)return String.fromCharCode.apply(String,t);let I="",l=0;for(;ll)&&(I=l);let n="";for(let a=e;al&&(e=l),I<0?(I+=l,I<0&&(I=0)):I>l&&(I=l),II)throw new RangeError("Trying to access beyond buffer length")}Qe.prototype.readUintLE=Qe.prototype.readUIntLE=function(e,I,l){e=e>>>0,I=I>>>0,l||po(e,I,this.length);let n=this[e],a=1,c=0;for(;++c>>0,I=I>>>0,l||po(e,I,this.length);let n=this[e+--I],a=1;for(;I>0&&(a*=256);)n+=this[e+--I]*a;return n};Qe.prototype.readUint8=Qe.prototype.readUInt8=function(e,I){return e=e>>>0,I||po(e,1,this.length),this[e]};Qe.prototype.readUint16LE=Qe.prototype.readUInt16LE=function(e,I){return e=e>>>0,I||po(e,2,this.length),this[e]|this[e+1]<<8};Qe.prototype.readUint16BE=Qe.prototype.readUInt16BE=function(e,I){return e=e>>>0,I||po(e,2,this.length),this[e]<<8|this[e+1]};Qe.prototype.readUint32LE=Qe.prototype.readUInt32LE=function(e,I){return e=e>>>0,I||po(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};Qe.prototype.readUint32BE=Qe.prototype.readUInt32BE=function(e,I){return e=e>>>0,I||po(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};Qe.prototype.readBigUInt64LE=NH(function(e){e=e>>>0,cx(e,"offset");let I=this[e],l=this[e+7];(I===void 0||l===void 0)&&US(e,this.length-8);let n=I+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,a=this[++e]+this[++e]*2**8+this[++e]*2**16+l*2**24;return BigInt(n)+(BigInt(a)<>>0,cx(e,"offset");let I=this[e],l=this[e+7];(I===void 0||l===void 0)&&US(e,this.length-8);let n=I*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],a=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+l;return(BigInt(n)<>>0,I=I>>>0,l||po(e,I,this.length);let n=this[e],a=1,c=0;for(;++c=a&&(n-=Math.pow(2,8*I)),n};Qe.prototype.readIntBE=function(e,I,l){e=e>>>0,I=I>>>0,l||po(e,I,this.length);let n=I,a=1,c=this[e+--n];for(;n>0&&(a*=256);)c+=this[e+--n]*a;return a*=128,c>=a&&(c-=Math.pow(2,8*I)),c};Qe.prototype.readInt8=function(e,I){return e=e>>>0,I||po(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};Qe.prototype.readInt16LE=function(e,I){e=e>>>0,I||po(e,2,this.length);let l=this[e]|this[e+1]<<8;return l&32768?l|4294901760:l};Qe.prototype.readInt16BE=function(e,I){e=e>>>0,I||po(e,2,this.length);let l=this[e+1]|this[e]<<8;return l&32768?l|4294901760:l};Qe.prototype.readInt32LE=function(e,I){return e=e>>>0,I||po(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};Qe.prototype.readInt32BE=function(e,I){return e=e>>>0,I||po(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};Qe.prototype.readBigInt64LE=NH(function(e){e=e>>>0,cx(e,"offset");let I=this[e],l=this[e+7];(I===void 0||l===void 0)&&US(e,this.length-8);let n=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(l<<24);return(BigInt(n)<>>0,cx(e,"offset");let I=this[e],l=this[e+7];(I===void 0||l===void 0)&&US(e,this.length-8);let n=(I<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,I||po(e,4,this.length),ax.read(this,e,!0,23,4)};Qe.prototype.readFloatBE=function(e,I){return e=e>>>0,I||po(e,4,this.length),ax.read(this,e,!1,23,4)};Qe.prototype.readDoubleLE=function(e,I){return e=e>>>0,I||po(e,8,this.length),ax.read(this,e,!0,52,8)};Qe.prototype.readDoubleBE=function(e,I){return e=e>>>0,I||po(e,8,this.length),ax.read(this,e,!1,52,8)};function Eb(t,e,I,l,n,a){if(!Qe.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>n||et.length)throw new RangeError("Index out of range")}Qe.prototype.writeUintLE=Qe.prototype.writeUIntLE=function(e,I,l,n){if(e=+e,I=I>>>0,l=l>>>0,!n){let r=Math.pow(2,8*l)-1;Eb(this,e,I,l,r,0)}let a=1,c=0;for(this[I]=e&255;++c>>0,l=l>>>0,!n){let r=Math.pow(2,8*l)-1;Eb(this,e,I,l,r,0)}let a=l-1,c=1;for(this[I+a]=e&255;--a>=0&&(c*=256);)this[I+a]=e/c&255;return I+l};Qe.prototype.writeUint8=Qe.prototype.writeUInt8=function(e,I,l){return e=+e,I=I>>>0,l||Eb(this,e,I,1,255,0),this[I]=e&255,I+1};Qe.prototype.writeUint16LE=Qe.prototype.writeUInt16LE=function(e,I,l){return e=+e,I=I>>>0,l||Eb(this,e,I,2,65535,0),this[I]=e&255,this[I+1]=e>>>8,I+2};Qe.prototype.writeUint16BE=Qe.prototype.writeUInt16BE=function(e,I,l){return e=+e,I=I>>>0,l||Eb(this,e,I,2,65535,0),this[I]=e>>>8,this[I+1]=e&255,I+2};Qe.prototype.writeUint32LE=Qe.prototype.writeUInt32LE=function(e,I,l){return e=+e,I=I>>>0,l||Eb(this,e,I,4,4294967295,0),this[I+3]=e>>>24,this[I+2]=e>>>16,this[I+1]=e>>>8,this[I]=e&255,I+4};Qe.prototype.writeUint32BE=Qe.prototype.writeUInt32BE=function(e,I,l){return e=+e,I=I>>>0,l||Eb(this,e,I,4,4294967295,0),this[I]=e>>>24,this[I+1]=e>>>16,this[I+2]=e>>>8,this[I+3]=e&255,I+4};function wlt(t,e,I,l,n){Jlt(e,l,n,t,I,7);let a=Number(e&BigInt(4294967295));t[I++]=a,a=a>>8,t[I++]=a,a=a>>8,t[I++]=a,a=a>>8,t[I++]=a;let c=Number(e>>BigInt(32)&BigInt(4294967295));return t[I++]=c,c=c>>8,t[I++]=c,c=c>>8,t[I++]=c,c=c>>8,t[I++]=c,I}function Hlt(t,e,I,l,n){Jlt(e,l,n,t,I,7);let a=Number(e&BigInt(4294967295));t[I+7]=a,a=a>>8,t[I+6]=a,a=a>>8,t[I+5]=a,a=a>>8,t[I+4]=a;let c=Number(e>>BigInt(32)&BigInt(4294967295));return t[I+3]=c,c=c>>8,t[I+2]=c,c=c>>8,t[I+1]=c,c=c>>8,t[I]=c,I+8}Qe.prototype.writeBigUInt64LE=NH(function(e,I=0){return wlt(this,e,I,BigInt(0),BigInt("0xffffffffffffffff"))});Qe.prototype.writeBigUInt64BE=NH(function(e,I=0){return Hlt(this,e,I,BigInt(0),BigInt("0xffffffffffffffff"))});Qe.prototype.writeIntLE=function(e,I,l,n){if(e=+e,I=I>>>0,!n){let s=Math.pow(2,8*l-1);Eb(this,e,I,l,s-1,-s)}let a=0,c=1,r=0;for(this[I]=e&255;++a>0)-r&255;return I+l};Qe.prototype.writeIntBE=function(e,I,l,n){if(e=+e,I=I>>>0,!n){let s=Math.pow(2,8*l-1);Eb(this,e,I,l,s-1,-s)}let a=l-1,c=1,r=0;for(this[I+a]=e&255;--a>=0&&(c*=256);)e<0&&r===0&&this[I+a+1]!==0&&(r=1),this[I+a]=(e/c>>0)-r&255;return I+l};Qe.prototype.writeInt8=function(e,I,l){return e=+e,I=I>>>0,l||Eb(this,e,I,1,127,-128),e<0&&(e=255+e+1),this[I]=e&255,I+1};Qe.prototype.writeInt16LE=function(e,I,l){return e=+e,I=I>>>0,l||Eb(this,e,I,2,32767,-32768),this[I]=e&255,this[I+1]=e>>>8,I+2};Qe.prototype.writeInt16BE=function(e,I,l){return e=+e,I=I>>>0,l||Eb(this,e,I,2,32767,-32768),this[I]=e>>>8,this[I+1]=e&255,I+2};Qe.prototype.writeInt32LE=function(e,I,l){return e=+e,I=I>>>0,l||Eb(this,e,I,4,2147483647,-2147483648),this[I]=e&255,this[I+1]=e>>>8,this[I+2]=e>>>16,this[I+3]=e>>>24,I+4};Qe.prototype.writeInt32BE=function(e,I,l){return e=+e,I=I>>>0,l||Eb(this,e,I,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[I]=e>>>24,this[I+1]=e>>>16,this[I+2]=e>>>8,this[I+3]=e&255,I+4};Qe.prototype.writeBigInt64LE=NH(function(e,I=0){return wlt(this,e,I,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});Qe.prototype.writeBigInt64BE=NH(function(e,I=0){return Hlt(this,e,I,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Qlt(t,e,I,l,n,a){if(I+l>t.length)throw new RangeError("Index out of range");if(I<0)throw new RangeError("Index out of range")}function flt(t,e,I,l,n){return e=+e,I=I>>>0,n||Qlt(t,e,I,4,34028234663852886e22,-34028234663852886e22),ax.write(t,e,I,l,23,4),I+4}Qe.prototype.writeFloatLE=function(e,I,l){return flt(this,e,I,!0,l)};Qe.prototype.writeFloatBE=function(e,I,l){return flt(this,e,I,!1,l)};function Elt(t,e,I,l,n){return e=+e,I=I>>>0,n||Qlt(t,e,I,8,17976931348623157e292,-17976931348623157e292),ax.write(t,e,I,l,52,8),I+8}Qe.prototype.writeDoubleLE=function(e,I,l){return Elt(this,e,I,!0,l)};Qe.prototype.writeDoubleBE=function(e,I,l){return Elt(this,e,I,!1,l)};Qe.prototype.copy=function(e,I,l,n){if(!Qe.isBuffer(e))throw new TypeError("argument should be a Buffer");if(l||(l=0),!n&&n!==0&&(n=this.length),I>=e.length&&(I=e.length),I||(I=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-I>>0,l=l===void 0?this.length:l>>>0,e||(e=0);let a;if(typeof e=="number")for(a=I;a2**32?n=Alt(String(I)):typeof I=="bigint"&&(n=String(I),(I>BigInt(2)**BigInt(32)||I<-(BigInt(2)**BigInt(32)))&&(n=Alt(n)),n+="n"),l+=` It must be ${e}. Received ${n}`,l},RangeError);function Alt(t){let e="",I=t.length,l=t[0]==="-"?1:0;for(;I>=l+4;I-=3)e=`_${t.slice(I-3,I)}${e}`;return`${t.slice(0,I)}${e}`}function f1I(t,e,I){cx(e,"offset"),(t[e]===void 0||t[e+I]===void 0)&&US(e,t.length-(I+1))}function Jlt(t,e,I,l,n,a){if(t>I||t3?e===0||e===BigInt(0)?r=`>= 0${c} and < 2${c} ** ${(a+1)*8}${c}`:r=`>= -(2${c} ** ${(a+1)*8-1}${c}) and < 2 ** ${(a+1)*8-1}${c}`:r=`>= ${e}${c} and <= ${I}${c}`,new nx.ERR_OUT_OF_RANGE("value",r,t)}f1I(l,n,a)}function cx(t,e){if(typeof t!="number")throw new nx.ERR_INVALID_ARG_TYPE(e,"number",t)}function US(t,e,I){throw Math.floor(t)!==t?(cx(t,I),new nx.ERR_OUT_OF_RANGE(I||"offset","an integer",t)):e<0?new nx.ERR_BUFFER_OUT_OF_BOUNDS:new nx.ERR_OUT_OF_RANGE(I||"offset",`>= ${I?1:0} and <= ${e}`,t)}var E1I=/[^+/0-9A-Za-z-_]/g;function J1I(t){if(t=t.split("=")[0],t=t.trim().replace(E1I,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function QXe(t,e){e=e||1/0;let I,l=t.length,n=null,a=[];for(let c=0;c55295&&I<57344){if(!n){if(I>56319){(e-=3)>-1&&a.push(239,191,189);continue}else if(c+1===l){(e-=3)>-1&&a.push(239,191,189);continue}n=I;continue}if(I<56320){(e-=3)>-1&&a.push(239,191,189),n=I;continue}I=(n-55296<<10|I-56320)+65536}else n&&(e-=3)>-1&&a.push(239,191,189);if(n=null,I<128){if((e-=1)<0)break;a.push(I)}else if(I<2048){if((e-=2)<0)break;a.push(I>>6|192,I&63|128)}else if(I<65536){if((e-=3)<0)break;a.push(I>>12|224,I>>6&63|128,I&63|128)}else if(I<1114112){if((e-=4)<0)break;a.push(I>>18|240,I>>12&63|128,I>>6&63|128,I&63|128)}else throw new Error("Invalid code point")}return a}function C1I(t){let e=[];for(let I=0;I>8,n=I%256,a.push(n),a.push(l);return a}function Clt(t){return yXe.toByteArray(J1I(t))}function hle(t,e,I,l){let n;for(n=0;n=e.length||n>=t.length);++n)e[n+I]=t[n];return n}function HA(t,e){return t instanceof e||t!=null&&t.constructor!=null&&t.constructor.name!=null&&t.constructor.name===e.name}function CXe(t){return t!==t}var k1I=function(){let t="0123456789abcdef",e=new Array(256);for(let I=0;I<16;++I){let l=I*16;for(let n=0;n<16;++n)e[l+n]=t[I]+t[n]}return e}();function NH(t){return typeof BigInt>"u"?x1I:t}function x1I(){throw new Error("BigInt not supported")}});var m,o=g(()=>{"use strict";m=z(Wle(),1);typeof globalThis<"u"&&!globalThis.Buffer&&(globalThis.Buffer=m.Buffer)});var LXe=Y((coa,Llt)=>{"use strict";o();var j1I={env:{},platform:"web",version:"1.0.0",versions:{},arch:"unknown",cwd:()=>"/",chdir:()=>{},exit:()=>{},isUsingObsidian:!0};Llt.exports=j1I});var xlt=Y((soa,klt)=>{o();var OS=1e3,zS=OS*60,BS=zS*60,MS=BS*24,U1I=MS*365.25;klt.exports=function(t,e){e=e||{};var I=typeof t;if(I==="string"&&t.length>0)return O1I(t);if(I==="number"&&isNaN(t)===!1)return e.long?B1I(t):z1I(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function O1I(t){if(t=String(t),!(t.length>100)){var e=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(e){var I=parseFloat(e[1]),l=(e[2]||"ms").toLowerCase();switch(l){case"years":case"year":case"yrs":case"yr":case"y":return I*U1I;case"days":case"day":case"d":return I*MS;case"hours":case"hour":case"hrs":case"hr":case"h":return I*BS;case"minutes":case"minute":case"mins":case"min":case"m":return I*zS;case"seconds":case"second":case"secs":case"sec":case"s":return I*OS;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return I;default:return}}}}function z1I(t){return t>=MS?Math.round(t/MS)+"d":t>=BS?Math.round(t/BS)+"h":t>=zS?Math.round(t/zS)+"m":t>=OS?Math.round(t/OS)+"s":t+"ms"}function B1I(t){return Nle(t,MS,"day")||Nle(t,BS,"hour")||Nle(t,zS,"minute")||Nle(t,OS,"second")||t+" ms"}function Nle(t,e,I){if(!(t{o();Hn=jlt.exports=xXe.debug=xXe.default=xXe;Hn.coerce=K1I;Hn.disable=T1I;Hn.enable=S1I;Hn.enabled=_1I;Hn.humanize=xlt();Hn.names=[];Hn.skips=[];Hn.formatters={};var kXe;function M1I(t){var e=0,I;for(I in t)e=(e<<5)-e+t.charCodeAt(I),e|=0;return Hn.colors[Math.abs(e)%Hn.colors.length]}function xXe(t){function e(){if(e.enabled){var I=e,l=+new Date,n=l-(kXe||l);I.diff=n,I.prev=kXe,I.curr=l,kXe=l;for(var a=new Array(arguments.length),c=0;c{o();xu=zlt.exports=Ult();xu.log=P1I;xu.formatArgs=q1I;xu.save=$1I;xu.load=Olt;xu.useColors=D1I;xu.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:eJI();xu.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function D1I(){return typeof window<"u"&&window.process&&window.process.type==="renderer"?!0: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&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}xu.formatters.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}};function q1I(t){var e=this.useColors;if(t[0]=(e?"%c":"")+this.namespace+(e?" %c":" ")+t[0]+(e?"%c ":" ")+"+"+xu.humanize(this.diff),!!e){var I="color: "+this.color;t.splice(1,0,I,"color: inherit");var l=0,n=0;t[0].replace(/%[a-zA-Z%]/g,function(a){a!=="%%"&&(l++,a==="%c"&&(n=l))}),t.splice(n,0,I)}}function P1I(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function $1I(t){try{t==null?xu.storage.removeItem("debug"):xu.storage.debug=t}catch{}}function Olt(){var t;try{t=xu.storage.debug}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}xu.enable(Olt());function eJI(){try{return window.localStorage}catch{}}});var Blt,ve,Ct=g(()=>{o();Blt=Object.defineProperty,ve=(t,e)=>{let I={};for(var l in t)Blt(I,l,{get:t[l],enumerable:!0});return e||Blt(I,Symbol.toStringTag,{value:"Module"}),I}});function ho(t){return typeof t=="object"&&t!==null&&"type"in t&&typeof t.type=="string"&&"source_type"in t&&(t.source_type==="url"||t.source_type==="base64"||t.source_type==="text"||t.source_type==="id")}function sx(t){return ho(t)&&t.source_type==="url"&&"url"in t&&typeof t.url=="string"}function ox(t){return ho(t)&&t.source_type==="base64"&&"data"in t&&typeof t.data=="string"}function Mlt(t){return ho(t)&&t.source_type==="text"&&"text"in t&&typeof t.text=="string"}function Vle(t){return ho(t)&&t.source_type==="id"&&"id"in t&&typeof t.id=="string"}function Yle(t){if(ho(t)){if(t.source_type==="url")return{type:"image_url",image_url:{url:t.url}};if(t.source_type==="base64"){if(!t.mime_type)throw new Error("mime_type key is required for base64 data.");return{type:"image_url",image_url:{url:`data:${t.mime_type};base64,${t.data}`}}}}throw new Error("Unsupported source type. Only 'url' and 'base64' are supported.")}function SS(t){let e=t.split(";")[0].split("/");if(e.length!==2)throw new Error(`Invalid mime type: "${t}" - does not match type/subtype format.`);let I=e[0].trim(),l=e[1].trim();if(I===""||l==="")throw new Error(`Invalid mime type: "${t}" - type or subtype is empty.`);let n={};for(let a of t.split(";").slice(1)){let c=a.split("=");if(c.length!==2)throw new Error(`Invalid parameter syntax in mime type: "${t}".`);let r=c[0].trim(),s=c[1].trim();if(r==="")throw new Error(`Invalid parameter syntax in mime type: "${t}".`);n[r]=s}return{type:I,subtype:l,parameters:n}}function ui({dataUrl:t,asTypedArray:e=!1}){let I=t.match(/^data:(\w+\/\w+);base64,([A-Za-z0-9+/]+=*)$/),l;if(I){l=I[1].toLowerCase();let n=e?Uint8Array.from(atob(I[2]),a=>a.charCodeAt(0)):I[2];return{mime_type:l,data:n}}}function QA(t,e){if(t.type==="text"){if(!e.fromStandardTextBlock)throw new Error(`Converter for ${e.providerName} does not implement \`fromStandardTextBlock\` method.`);return e.fromStandardTextBlock(t)}if(t.type==="image"){if(!e.fromStandardImageBlock)throw new Error(`Converter for ${e.providerName} does not implement \`fromStandardImageBlock\` method.`);return e.fromStandardImageBlock(t)}if(t.type==="audio"){if(!e.fromStandardAudioBlock)throw new Error(`Converter for ${e.providerName} does not implement \`fromStandardAudioBlock\` method.`);return e.fromStandardAudioBlock(t)}if(t.type==="file"){if(!e.fromStandardFileBlock)throw new Error(`Converter for ${e.providerName} does not implement \`fromStandardFileBlock\` method.`);return e.fromStandardFileBlock(t)}throw new Error(`Unable to convert content block type '${t.type}' to provider-specific format: not recognized.`)}var TS=g(()=>{o()});function Rle(t){return typeof t=="object"&&t!==null&&"type"in t&&"content"in t&&(typeof t.content=="string"||Array.isArray(t.content))}var jXe=g(()=>{o()});var Tlt=Y((hoa,Slt)=>{"use strict";o();Slt.exports=function(t,e){if(typeof t!="string")throw new TypeError("Expected a string");return e=typeof e>"u"?"_":e,t.replace(/([a-z\d])([A-Z])/g,"$1"+e+"$2").replace(/([A-Z]+)([A-Z][a-z\d]+)/g,"$1"+e+"$2").toLowerCase()}});var ent=Y((Noa,UXe)=>{"use strict";o();var tJI=/[\p{Lu}]/u,IJI=/[\p{Ll}]/u,_lt=/^[\p{Lu}](?![\p{Lu}])/gu,qlt=/([\p{Alpha}\p{N}_]|$)/u,Plt=/[_.\- ]+/,lJI=new RegExp("^"+Plt.source),Klt=new RegExp(Plt.source+qlt.source,"gu"),Dlt=new RegExp("\\d+"+qlt.source,"gu"),nJI=(t,e,I)=>{let l=!1,n=!1,a=!1;for(let c=0;c(_lt.lastIndex=0,t.replace(_lt,I=>e(I))),cJI=(t,e)=>(Klt.lastIndex=0,Dlt.lastIndex=0,t.replace(Klt,(I,l)=>e(l)).replace(Dlt,I=>e(I))),$lt=(t,e)=>{if(!(typeof t=="string"||Array.isArray(t)))throw new TypeError("Expected the input to be `string | string[]`");if(e={pascalCase:!1,preserveConsecutiveUppercase:!1,...e},Array.isArray(t)?t=t.map(a=>a.trim()).filter(a=>a.length).join("-"):t=t.trim(),t.length===0)return"";let I=e.locale===!1?a=>a.toLowerCase():a=>a.toLocaleLowerCase(e.locale),l=e.locale===!1?a=>a.toUpperCase():a=>a.toLocaleUpperCase(e.locale);return t.length===1?e.pascalCase?l(t):I(t):(t!==I(t)&&(t=nJI(t,I,l)),t=t.replace(lJI,""),e.preserveConsecutiveUppercase?t=aJI(t,I):t=I(t),e.pascalCase&&(t=l(t.charAt(0))+t.slice(1)),cJI(t,l))};UXe.exports=$lt;UXe.exports.default=$lt});function lnt(t,e){return e?.[t]||(0,tnt.default)(t)}function nnt(t,e){return e?.[t]||(0,Int.default)(t)}function Ale(t,e,I){let l={};for(let n in t)Object.hasOwn(t,n)&&(l[e(n,I)]=t[n]);return l}var tnt,Int,OXe=g(()=>{o();tnt=z(Tlt(),1),Int=z(ent(),1)});function rJI(t){return"lc"in t||Object.keys(t).length===1&&"__lc_escaped__"in t}function sJI(t){return{[ant]:t}}function zXe(t){return Object.keys(t).length===1&&"__lc_escaped__"in t}function oJI(t){return t!==null&&typeof t=="object"&&"lc_serializable"in t&&typeof t.toJSON=="function"}function iJI(t){let e;return t!==null&&typeof t=="object"?"lc_id"in t&&Array.isArray(t.lc_id)?e=t.lc_id:e=[t.constructor?.name??"Object"]:e=[typeof t],{lc:1,type:"not_implemented",id:e}}function Fle(t,e=new WeakSet){if(t!==null&&typeof t=="object"&&!Array.isArray(t)){if(e.has(t))return iJI(t);if(oJI(t))return t;e.add(t);let I=t;if(rJI(I))return e.delete(t),sJI(I);let l={};for(let[n,a]of Object.entries(I))l[n]=Fle(a,e);return e.delete(t),l}return Array.isArray(t)?t.map(I=>Fle(I,e)):t}function Xle(t){if(t!==null&&typeof t=="object"&&!Array.isArray(t)){let e=t;if(zXe(e))return e[ant];let I={};for(let[l,n]of Object.entries(e))I[l]=Xle(n);return I}return Array.isArray(t)?t.map(e=>Xle(e)):t}var ant,BXe=g(()=>{o();ant="__lc_escaped__"});var SXe={};tr(SXe,{Serializable:()=>Xr,get_lc_unique_name:()=>aJ,serializable_exports:()=>MXe});function cnt(t){return Array.isArray(t)?[...t]:{...t}}function GJI(t,e){let I=cnt(t);for(let[l,n]of Object.entries(e)){let[a,...c]=l.split(".").reverse(),r=I;for(let s of c.reverse()){if(r[s]===void 0)break;r[s]=cnt(r[s]),r=r[s]}r[a]!==void 0&&(r[a]={lc:1,type:"secret",id:[n]})}return I}function aJ(t){let e=Object.getPrototypeOf(t);return typeof t.lc_name=="function"&&(typeof e.lc_name!="function"||t.lc_name()!==e.lc_name())?t.lc_name():t.name}var MXe,Xr,Jb=g(()=>{o();Ct();OXe();BXe();MXe=ve({Serializable:()=>Xr,get_lc_unique_name:()=>aJ});Xr=class rnt{lc_serializable=!1;lc_kwargs;static lc_name(){return this.name}get lc_id(){return[...this.lc_namespace,aJ(this.constructor)]}get lc_secrets(){}get lc_attributes(){}get lc_aliases(){}get lc_serializable_keys(){}constructor(e,...I){this.lc_serializable_keys!==void 0?this.lc_kwargs=Object.fromEntries(Object.entries(e||{}).filter(([l])=>this.lc_serializable_keys?.includes(l))):this.lc_kwargs=e??{}}toJSON(){if(!this.lc_serializable)return this.toJSONNotImplemented();if(this.lc_kwargs instanceof rnt||typeof this.lc_kwargs!="object"||Array.isArray(this.lc_kwargs))return this.toJSONNotImplemented();let e={},I={},l=Object.keys(this.lc_kwargs).reduce((r,s)=>(r[s]=s in this?this[s]:this.lc_kwargs[s],r),{});for(let r=Object.getPrototypeOf(this);r;r=Object.getPrototypeOf(r))Object.assign(e,Reflect.get(r,"lc_aliases",this)),Object.assign(I,Reflect.get(r,"lc_secrets",this)),Object.assign(l,Reflect.get(r,"lc_attributes",this));Object.keys(I).forEach(r=>{let s=this,i=l,[G,...d]=r.split(".").reverse();for(let u of d.reverse()){if(!(u in s)||s[u]===void 0)return;(!(u in i)||i[u]===void 0)&&(typeof s[u]=="object"&&s[u]!=null?i[u]={}:Array.isArray(s[u])&&(i[u]=[])),s=s[u],i=i[u]}G in s&&s[G]!==void 0&&(i[G]=i[G]||s[G])});let n={},a=new WeakSet;a.add(this);for(let[r,s]of Object.entries(l))n[r]=Fle(s,a);let c=Ale(Object.keys(I).length?GJI(n,I):n,lnt,e);return{lc:1,type:"constructor",id:this.lc_id,kwargs:c}}toJSONNotImplemented(){return{lc:1,type:"not_implemented",id:this.lc_id}}}});function Rt(t,e){return Kt(t)&&t.type===e}function Kt(t){return typeof t=="object"&&t!==null}function zs(t){return Array.isArray(t)}function Me(t){return typeof t=="string"}function Tm(t){return typeof t=="number"}function gle(t){return t instanceof Uint8Array}function TXe(t){try{return JSON.parse(t)}catch{return}}var _m,Vp=g(()=>{o();_m=t=>t()});function dJI(t){if(t.type==="char_location"&&Me(t.document_title)&&Tm(t.start_char_index)&&Tm(t.end_char_index)&&Me(t.cited_text)){let{document_title:e,start_char_index:I,end_char_index:l,cited_text:n,...a}=t;return{...a,type:"citation",source:"char",title:e??void 0,startIndex:I,endIndex:l,citedText:n}}if(t.type==="page_location"&&Me(t.document_title)&&Tm(t.start_page_number)&&Tm(t.end_page_number)&&Me(t.cited_text)){let{document_title:e,start_page_number:I,end_page_number:l,cited_text:n,...a}=t;return{...a,type:"citation",source:"page",title:e??void 0,startIndex:I,endIndex:l,citedText:n}}if(t.type==="content_block_location"&&Me(t.document_title)&&Tm(t.start_block_index)&&Tm(t.end_block_index)&&Me(t.cited_text)){let{document_title:e,start_block_index:I,end_block_index:l,cited_text:n,...a}=t;return{...a,type:"citation",source:"block",title:e??void 0,startIndex:I,endIndex:l,citedText:n}}if(t.type==="web_search_result_location"&&Me(t.url)&&Me(t.title)&&Me(t.encrypted_index)&&Me(t.cited_text)){let{url:e,title:I,encrypted_index:l,cited_text:n,...a}=t;return{...a,type:"citation",source:"url",url:e,title:I,startIndex:Number(l),endIndex:Number(l),citedText:n}}if(t.type==="search_result_location"&&Me(t.source)&&Me(t.title)&&Tm(t.start_block_index)&&Tm(t.end_block_index)&&Me(t.cited_text)){let{source:e,title:I,start_block_index:l,end_block_index:n,cited_text:a,...c}=t;return{...c,type:"citation",source:"search",url:e,title:I??void 0,startIndex:l,endIndex:n,citedText:a}}}function ont(t){if(Rt(t,"document")&&Kt(t.source)&&"type"in t.source){if(t.source.type==="base64"&&Me(t.source.media_type)&&Me(t.source.data))return{type:"file",mimeType:t.source.media_type,data:t.source.data};if(t.source.type==="url"&&Me(t.source.url))return{type:"file",url:t.source.url};if(t.source.type==="file"&&Me(t.source.file_id))return{type:"file",fileId:t.source.file_id};if(t.source.type==="text"&&Me(t.source.data))return{type:"file",mimeType:String(t.source.media_type??"text/plain"),data:t.source.data}}else if(Rt(t,"image")&&Kt(t.source)&&"type"in t.source){if(t.source.type==="base64"&&Me(t.source.media_type)&&Me(t.source.data))return{type:"image",mimeType:t.source.media_type,data:t.source.data};if(t.source.type==="url"&&Me(t.source.url))return{type:"image",url:t.source.url};if(t.source.type==="file"&&Me(t.source.file_id))return{type:"image",fileId:t.source.file_id}}}function int(t){function*e(){for(let I of t){let l=ont(I);l?yield l:yield I}}return Array.from(e())}function snt(t){function*e(){let I=typeof t.content=="string"?[{type:"text",text:t.content}]:t.content;for(let l of I){if(Rt(l,"text")&&Me(l.text)){let{text:n,citations:a,...c}=l;if(zs(a)&&a.length){let r=a.reduce((s,i)=>{let G=dJI(i);return G?[...s,G]:s},[]);yield{...c,type:"text",text:n,annotations:r};continue}else{yield{...c,type:"text",text:n};continue}}else if(Rt(l,"thinking")&&Me(l.thinking)){let{thinking:n,signature:a,...c}=l;yield{...c,type:"reasoning",reasoning:n,signature:a};continue}else if(Rt(l,"redacted_thinking")){yield{type:"non_standard",value:l};continue}else if(Rt(l,"tool_use")&&Me(l.name)&&Me(l.id)){yield{type:"tool_call",id:l.id,name:l.name,args:l.input};continue}else if(Rt(l,"input_json_delta")){if(uJI(t)&&t.tool_call_chunks?.length){let n=t.tool_call_chunks[0];yield{type:"tool_call_chunk",id:n.id,name:n.name,args:n.args,index:n.index};continue}}else if(Rt(l,"server_tool_use")&&Me(l.name)&&Me(l.id)){let{name:n,id:a}=l;if(n==="web_search"){yield{id:a,type:"server_tool_call",name:"web_search",args:{query:_m(()=>{if(typeof l.input=="string")return l.input;if(Kt(l.input)&&Me(l.input.query))return l.input.query;if(Me(l.partial_json)){let c=TXe(l.partial_json);if(c?.query)return c.query}return""})}};continue}else if(l.name==="code_execution"){yield{id:a,type:"server_tool_call",name:"code_execution",args:{code:_m(()=>{if(typeof l.input=="string")return l.input;if(Kt(l.input)&&Me(l.input.code))return l.input.code;if(Me(l.partial_json)){let c=TXe(l.partial_json);if(c?.code)return c.code}return""})}};continue}}else if(Rt(l,"web_search_tool_result")&&Me(l.tool_use_id)&&zs(l.content)){let{content:n,tool_use_id:a}=l;yield{type:"server_tool_call_result",name:"web_search",toolCallId:a,status:"success",output:{urls:n.reduce((c,r)=>Rt(r,"web_search_result")?[...c,r.url]:c,[])}};continue}else if(Rt(l,"code_execution_tool_result")&&Me(l.tool_use_id)&&Kt(l.content)){yield{type:"server_tool_call_result",name:"code_execution",toolCallId:l.tool_use_id,status:"success",output:l.content};continue}else if(Rt(l,"mcp_tool_use")){yield{id:l.id,type:"server_tool_call",name:"mcp_tool_use",args:l.input};continue}else if(Rt(l,"mcp_tool_result")&&Me(l.tool_use_id)&&Kt(l.content)){yield{type:"server_tool_call_result",name:"mcp_tool_use",toolCallId:l.tool_use_id,status:"success",output:l.content};continue}else if(Rt(l,"container_upload")){yield{type:"server_tool_call",name:"container_upload",args:l.input};continue}else if(Rt(l,"search_result")){yield{id:l.id,type:"non_standard",value:l};continue}else if(Rt(l,"tool_result")){yield{id:l.id,type:"non_standard",value:l};continue}else{let n=ont(l);if(n){yield n;continue}}yield{type:"non_standard",value:l}}}return Array.from(e())}function uJI(t){return typeof t?._getType=="function"&&typeof t.concat=="function"&&t._getType()==="ai"}var Gnt,_Xe=g(()=>{o();Vp();Gnt={translateContent:snt,translateContentChunk:snt}});function bJI(t){return sx(t)?{type:t.type,mimeType:t.mime_type,url:t.url,metadata:t.metadata}:ox(t)?{type:t.type,mimeType:t.mime_type??"application/octet-stream",data:t.data,metadata:t.metadata}:Vle(t)?{type:t.type,mimeType:t.mime_type,fileId:t.id,metadata:t.metadata}:t}function dnt(t){return t.map(bJI)}function unt(t){return!!(Rt(t,"image_url")&&Kt(t.image_url)||Rt(t,"input_audio")&&Kt(t.input_audio)||Rt(t,"file")&&Kt(t.file))}function bnt(t){if(Rt(t,"image_url")&&Kt(t.image_url)&&Me(t.image_url.url)){let e=ui({dataUrl:t.image_url.url});return e?{type:"image",mimeType:e.mime_type,data:e.data}:{type:"image",url:t.image_url.url}}else{if(Rt(t,"input_audio")&&Kt(t.input_audio)&&Me(t.input_audio.data)&&Me(t.input_audio.format))return{type:"audio",data:t.input_audio.data,mimeType:`audio/${t.input_audio.format}`};if(Rt(t,"file")&&Kt(t.file)&&Me(t.file.data)){let e=ui({dataUrl:t.file.data});if(e)return{type:"file",data:e.data,mimeType:e.mime_type};if(Me(t.file.file_id))return{type:"file",fileId:t.file.file_id}}}return t}var KXe=g(()=>{o();TS();Vp()});function mJI(t){let e=[];typeof t.content=="string"?t.content.length>0&&e.push({type:"text",text:t.content}):e.push(...vle(t.content));for(let I of t.tool_calls??[])e.push({type:"tool_call",id:I.id,name:I.name,args:I.args});return e}function ZJI(t){let e=[];typeof t.content=="string"?t.content.length>0&&e.push({type:"text",text:t.content}):e.push(...vle(t.content));for(let I of t.tool_calls??[])e.push({type:"tool_call",id:I.id,name:I.name,args:I.args});return e}function vle(t){let e=[];for(let I of t)unt(I)?e.push(bnt(I)):e.push(I);return e}function pJI(t){if(t.type==="url_citation"){let{url:e,title:I,start_index:l,end_index:n}=t;return{type:"citation",url:e,title:I,startIndex:l,endIndex:n}}if(t.type==="file_citation"){let{file_id:e,filename:I,index:l}=t;return{type:"citation",title:I,startIndex:l,endIndex:l,fileId:e}}return t}function mnt(t){function*e(){Kt(t.additional_kwargs?.reasoning)&&zs(t.additional_kwargs.reasoning.summary)&&(yield{type:"reasoning",reasoning:t.additional_kwargs.reasoning.summary.reduce((l,n)=>Kt(n)&&Me(n.text)?`${l}${n.text}`:l,"")});let I=typeof t.content=="string"?[{type:"text",text:t.content}]:t.content;for(let l of I)if(Rt(l,"text")){let{text:n,annotations:a,phase:c,extras:r,...s}=l,i=Kt(r)?{...r}:{};Me(c)&&(i.phase=c);let G=Object.keys(i).length>0?{extras:i}:{};Array.isArray(a)?yield{...s,...G,type:"text",text:String(n),annotations:a.map(pJI)}:yield{...s,...G,type:"text",text:String(n)}}for(let l of t.tool_calls??[])yield{type:"tool_call",id:l.id,name:l.name,args:l.args};if(Kt(t.additional_kwargs)&&zs(t.additional_kwargs.tool_outputs))for(let l of t.additional_kwargs.tool_outputs){if(Rt(l,"web_search_call")){let n={};if(Kt(l.action)&&Me(l.action.query)&&(n.query=l.action.query),yield{id:l.id,type:"server_tool_call",name:"web_search",args:n},l.status==="completed"||l.status==="failed"){let a={};Kt(l.action)&&(a.action=l.action),yield{type:"server_tool_call_result",toolCallId:Me(l.id)?l.id:"",status:l.status==="completed"?"success":"error",output:a}}continue}else if(Rt(l,"file_search_call")){yield{id:l.id,type:"server_tool_call",name:"file_search",args:{queries:zs(l.queries)?l.queries:[]}},(l.status==="completed"||l.status==="failed")&&(yield{type:"server_tool_call_result",toolCallId:Me(l.id)?l.id:"",status:l.status==="completed"?"success":"error",output:zs(l.results)?{results:l.results}:{}});continue}else if(Rt(l,"computer_call")){yield{type:"non_standard",value:l};continue}else if(Rt(l,"code_interpreter_call")){if(Me(l.code)&&(yield{id:l.id,type:"server_tool_call",name:"code_interpreter",args:{code:l.code}}),zs(l.outputs)){let n=_m(()=>{if(l.status!=="in_progress"){if(l.status==="completed")return 0;if(l.status==="incomplete")return 127;if(l.status!=="interpreting"&&l.status==="failed")return 1}});for(let a of l.outputs)if(Rt(a,"logs")){yield{type:"server_tool_call_result",toolCallId:l.id??"",status:"success",output:{type:"code_interpreter_output",returnCode:n??0,stderr:[0,void 0].includes(n)?void 0:String(a.logs),stdout:[0,void 0].includes(n)?String(a.logs):void 0}};continue}}continue}else if(Rt(l,"mcp_call")){yield{id:l.id,type:"server_tool_call",name:"mcp_call",args:l.input};continue}else if(Rt(l,"mcp_list_tools")){yield{id:l.id,type:"server_tool_call",name:"mcp_list_tools",args:l.input};continue}else if(Rt(l,"mcp_approval_request")){yield{type:"non_standard",value:l};continue}else if(Rt(l,"tool_search_call")){let n={};Kt(l.arguments)&&Object.assign(n,l.arguments);let a={};Me(l.execution)&&(a.execution=l.execution),Me(l.status)&&(a.status=l.status),Me(l.call_id)&&(a.call_id=l.call_id),yield{id:Me(l.id)?l.id:"",type:"server_tool_call",name:"tool_search",args:n,...Object.keys(a).length>0?{extras:a}:{}};continue}else if(Rt(l,"tool_search_output")){let n={name:"tool_search"};Me(l.execution)&&(n.execution=l.execution),yield{type:"server_tool_call_result",toolCallId:Me(l.id)?l.id:"",status:l.status==="completed"?"success":l.status==="failed"?"error":"success",output:{tools:zs(l.tools)?l.tools:[]},extras:n};continue}else if(Rt(l,"image_generation_call")){Me(l.result)&&(yield{type:"image",mimeType:"image/png",data:l.result,id:Me(l.id)?l.id:void 0,metadata:{status:Me(l.status)?l.status:void 0}}),yield{type:"non_standard",value:l};continue}Kt(l)&&(yield{type:"non_standard",value:l})}}return Array.from(e())}function hJI(t){function*e(){yield*mnt(t);for(let I of t.tool_call_chunks??[])yield{type:"tool_call_chunk",id:I.id,name:I.name,args:I.args}}return Array.from(e())}var Znt,DXe=g(()=>{o();Vp();KXe();Znt={translateContent:t=>typeof t.content=="string"?mJI(t):mnt(t),translateContentChunk:t=>typeof t.content=="string"?ZJI(t):hJI(t)}});function pnt(t,e="pretty"){return e==="pretty"?WJI(t):JSON.stringify(t)}function WJI(t){let e=[],I=` ${t.type.charAt(0).toUpperCase()+t.type.slice(1)} Message `,l=Math.floor((80-I.length)/2),n="=".repeat(l),a=I.length%2===0?n:`${n}=`;if(e.push(`${n}${I}${a}`),t.type==="ai"){let c=t;if(c.tool_calls&&c.tool_calls.length>0){e.push("Tool Calls:");for(let r of c.tool_calls){e.push(` ${r.name} (${r.id})`),e.push(` Call ID: ${r.id}`),e.push(" Args:");for(let[s,i]of Object.entries(r.args))e.push(` ${s}: ${typeof i=="object"?JSON.stringify(i):i}`)}}}if(t.type==="tool"){let c=t;c.name&&e.push(`Name: ${c.name}`)}return typeof t.content=="string"&&t.content.trim()&&(e.length>1&&e.push(""),e.push(t.content)),e.join(` +`)}var hnt=g(()=>{o()});function Wnt(t){return Array.isArray(t)?t:typeof t=="string"?t===""?[]:[{type:"text",text:t}]:t==null?[]:[t]}function eG(t,e){if(typeof t=="string")return t===""?e:typeof e=="string"?t+e:Array.isArray(e)&&e.length===0?t:Array.isArray(e)&&e.some(I=>ho(I))?[{type:"text",source_type:"text",text:t},...e]:[{type:"text",text:t},...e];if(Array.isArray(e)){let I=Wnt(t);return VH(I,e)??[...I,...e]}else return e===""?t:Array.isArray(t)&&t.some(I=>ho(I))?[...t,{type:"file",source_type:"text",text:e}]:[...Wnt(t),{type:"text",text:e}]}function yle(t,e){return t==="error"||e==="error"?"error":"success"}function NJI(t,e){function I(l,n){if(typeof l!="object"||l===null||l===void 0)return l;if(n>=e)return Array.isArray(l)?"[Array]":"[Object]";if(Array.isArray(l))return l.map(c=>I(c,n+1));let a={};for(let c of Object.keys(l))a[c]=I(l[c],n+1);return a}return JSON.stringify(I(t,0),null,2)}function Ynt(t){return Array.isArray(t)&&t.every(e=>typeof e.index=="number")}function Wc(t,e,I){let l=I?.ignoreKeys??PXe;if(t==null&&e==null)return;if(t==null||e==null)return t??e;let n={...t};for(let[a,c]of Object.entries(e))if(n[a]==null)n[a]=c;else{if(c==null)continue;if(typeof n[a]!=typeof c||Array.isArray(n[a])!==Array.isArray(c))throw new Error(`field[${a}] already exists in the message chunk, but with a different type.`);if(typeof n[a]=="string"){if(a==="type")continue;if(["id","name","output_version","model_provider"].includes(a))c&&(n[a]=c);else{if(l.includes(a))continue;n[a]+=c}}else if(typeof n[a]=="number"){if(l.includes(a))continue;n[a]=n[a]+c}else if(typeof n[a]=="object"&&!Array.isArray(n[a]))n[a]=Wc(n[a],c,I);else if(Array.isArray(n[a]))n[a]=VH(n[a],c,I);else{if(n[a]===c)continue;console.warn(`field[${a}] already exists in this message chunk and value has unsupported type.`)}}return n}function VJI(t){return typeof t=="number"||typeof t=="string"}function Nnt(t){return typeof t!="object"||t===null||!("index"in t)?!1:VJI(t.index)}function Vnt(t){if(typeof t!="object"||t===null||!("id"in t))return!1;let e=t.id;return e!=null&&e!==""}function YJI(t,e){let I=Nnt(e),l=Vnt(e);return!I&&!l?-1:t.findIndex(n=>{let a=Nnt(n),c=Vnt(n);return I&&a?n.index!==e.index?!1:c&&l?n.id===e.id:!0:!I&&!a&&l&&c?n.id===e.id:!1})}function VH(t,e,I){if(!(t==null&&e==null)){if(t==null||e==null)return t||e;{let l=[...t];for(let n of e){let a=YJI(l,n);if(a!==-1)l[a]=Wc(l[a],n,I);else{if(typeof n=="object"&&n!==null&&"text"in n&&n.text==="")continue;l.push(n)}}return l}}}function wle(t,e,I){if(!(t==null&&e==null)){if(t==null||e==null)return t??e;if(typeof t!=typeof e)throw new Error(`Cannot merge objects of different types. +Left ${typeof t} +Right ${typeof e}`);if(typeof t=="string"&&typeof e=="string")return t+e;if(Array.isArray(t)&&Array.isArray(e))return VH(t,e,I);if(typeof t=="object"&&typeof e=="object")return Wc(t,e,I);if(t===e)return t;throw new Error(`Can not merge objects of different types. +Left ${t} +Right ${e}`)}}function Hle(t){return typeof t.role=="string"}function ma(t){return typeof t?._getType=="function"}function ZX(t){return gr.isInstance(t)}var qXe,Ml,PXe,gr,Wo=g(()=>{o();Jb();TS();_Xe();KXe();DXe();jXe();hnt();qXe=Symbol.for("langchain.message");Ml=class extends Xr{lc_namespace=["langchain_core","messages"];lc_serializable=!0;get lc_aliases(){return{additional_kwargs:"additional_kwargs",response_metadata:"response_metadata"}}[qXe]=!0;id;name;content;additional_kwargs;response_metadata;_getType(){return this.type}getType(){return this._getType()}constructor(t){let e=typeof t=="string"||Array.isArray(t)?{content:t}:t;e.additional_kwargs||(e.additional_kwargs={}),e.response_metadata||(e.response_metadata={}),super(e),this.name=e.name,e.content===void 0&&e.contentBlocks!==void 0?(this.content=e.contentBlocks,this.response_metadata={output_version:"v1",...e.response_metadata}):e.content!==void 0?(this.content=e.content??[],this.response_metadata=e.response_metadata):(this.content=[],this.response_metadata=e.response_metadata),this.additional_kwargs=e.additional_kwargs,this.id=e.id}get text(){return typeof this.content=="string"?this.content:Array.isArray(this.content)?this.content.map(t=>typeof t=="string"?t:t.type==="text"?t.text:"").join(""):""}get contentBlocks(){let t=typeof this.content=="string"?[{type:"text",text:this.content}]:this.content;return[dnt,vle,int].reduce((e,I)=>I(e),t)}toDict(){return{type:this.getType(),data:this.toJSON().kwargs}}static lc_name(){return"BaseMessage"}get _printableFields(){return{id:this.id,content:this.content,name:this.name,additional_kwargs:this.additional_kwargs,response_metadata:this.response_metadata}}static isInstance(t){return typeof t=="object"&&t!==null&&qXe in t&&t[qXe]===!0&&Rle(t)}_updateId(t){this.id=t,this.lc_kwargs.id=t}get[Symbol.toStringTag](){return this.constructor.lc_name()}[Symbol.for("nodejs.util.inspect.custom")](t){if(t===null)return this;let e=NJI(this._printableFields,Math.max(4,t));return`${this.constructor.lc_name()} ${e}`}toFormattedString(t="pretty"){return pnt(this,t)}};PXe=["index","created","timestamp"];gr=class Rnt extends Ml{static isInstance(e){if(!super.isInstance(e))return!1;let I=Object.getPrototypeOf(e);for(;I!==null;){if(I===Rnt.prototype)return!0;I=Object.getPrototypeOf(I)}return!1}}});function Qle(t,e){return Wc(t,e)??{}}function Ant(t,e){let I={};return(t?.audio!==void 0||e?.audio!==void 0)&&(I.audio=(t?.audio??0)+(e?.audio??0)),(t?.image!==void 0||e?.image!==void 0)&&(I.image=(t?.image??0)+(e?.image??0)),(t?.video!==void 0||e?.video!==void 0)&&(I.video=(t?.video??0)+(e?.video??0)),(t?.document!==void 0||e?.document!==void 0)&&(I.document=(t?.document??0)+(e?.document??0)),(t?.text!==void 0||e?.text!==void 0)&&(I.text=(t?.text??0)+(e?.text??0)),I}function RJI(t,e){let I={...Ant(t,e)};return(t?.cache_read!==void 0||e?.cache_read!==void 0)&&(I.cache_read=(t?.cache_read??0)+(e?.cache_read??0)),(t?.cache_creation!==void 0||e?.cache_creation!==void 0)&&(I.cache_creation=(t?.cache_creation??0)+(e?.cache_creation??0)),I}function AJI(t,e){let I={...Ant(t,e)};return(t?.reasoning!==void 0||e?.reasoning!==void 0)&&(I.reasoning=(t?.reasoning??0)+(e?.reasoning??0)),I}function ix(t,e){return{input_tokens:(t?.input_tokens??0)+(e?.input_tokens??0),output_tokens:(t?.output_tokens??0)+(e?.output_tokens??0),total_tokens:(t?.total_tokens??0)+(e?.total_tokens??0),input_token_details:RJI(t?.input_token_details,e?.input_token_details),output_token_details:AJI(t?.output_token_details,e?.output_token_details)}}var fle=g(()=>{o();Wo()});function _S(t){return t!=null&&typeof t=="object"&&"lc_direct_tool_output"in t&&t.lc_direct_tool_output===!0}function KS(t){let e=[],I=[];for(let l of t)if(l.function){let n=l.function.name;try{let a=JSON.parse(l.function.arguments);e.push({name:n||"",args:a||{},id:l.id})}catch{I.push({name:n,args:l.function.arguments,id:l.id,error:"Malformed args."})}}else continue;return[e,I]}function cJ(t){return typeof t=="object"&&t!==null&&"getType"in t&&typeof t.getType=="function"&&t.getType()==="tool"}function $Xe(t){return t._getType()==="tool"}var Fnt,pt,bi,YH=g(()=>{o();Ct();Wo();Fnt=ve({ToolMessage:()=>pt,ToolMessageChunk:()=>bi,defaultToolCallParser:()=>KS,isDirectToolOutput:()=>_S,isToolMessage:()=>cJ,isToolMessageChunk:()=>$Xe});pt=class extends Ml{static lc_name(){return"ToolMessage"}get lc_aliases(){return{tool_call_id:"tool_call_id"}}lc_direct_tool_output=!0;type="tool";status;tool_call_id;metadata;artifact;constructor(t,e,I){let l=typeof t=="string"||Array.isArray(t)?{content:t,name:I,tool_call_id:e}:t;super(l),this.tool_call_id=l.tool_call_id,this.artifact=l.artifact,this.status=l.status,this.metadata=l.metadata}static isInstance(t){return super.isInstance(t)&&t.type==="tool"}get _printableFields(){return{...super._printableFields,tool_call_id:this.tool_call_id,artifact:this.artifact}}},bi=class extends gr{type="tool";tool_call_id;status;artifact;constructor(t){super(t),this.tool_call_id=t.tool_call_id,this.artifact=t.artifact,this.status=t.status}static lc_name(){return"ToolMessageChunk"}concat(t){let e=this.constructor;return new e({content:eG(this.content,t.content),additional_kwargs:Wc(this.additional_kwargs,t.additional_kwargs),response_metadata:Wc(this.response_metadata,t.response_metadata),artifact:wle(this.artifact,t.artifact),tool_call_id:this.tool_call_id,id:this.id??t.id,status:yle(this.status,t.status)})}get _printableFields(){return{...super._printableFields,tool_call_id:this.tool_call_id,artifact:this.artifact}}}});function ege(t){switch(t){case"csv":return"text/csv";case"doc":return"application/vnd.openxmlformats-officedocument.wordprocessingml.document";case"docx":return"application/vnd.openxmlformats-officedocument.wordprocessingml.document";case"html":return"text/html";case"md":return"text/markdown";case"pdf":return"application/pdf";case"txt":return"text/plain";case"xls":return"application/vnd.ms-excel";case"xlsx":return"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";case"gif":return"image/gif";case"jpeg":return"image/jpeg";case"jpg":return"image/jpeg";case"png":return"image/png";case"webp":return"image/webp";case"flv":return"video/flv";case"mkv":return"video/mkv";case"mov":return"video/mov";case"mp4":return"video/mp4";case"mpeg":return"video/mpeg";case"mpg":return"video/mpg";case"three_gp":return"video/three_gp";case"webm":return"video/webm";case"wmv":return"video/wmv";default:return"application/octet-stream"}}function FJI(t){if(Kt(t.document)&&Kt(t.document.source)){let e=ege(Kt(t.document)&&Me(t.document.format)?t.document.format:"");if(Kt(t.document.source)){if(Kt(t.document.source.s3Location)&&Me(t.document.source.s3Location.uri))return{type:"file",mimeType:e,fileId:t.document.source.s3Location.uri};if(gle(t.document.source.bytes))return{type:"file",mimeType:e,data:t.document.source.bytes};if(Me(t.document.source.text))return{type:"file",mimeType:e,data:m.Buffer.from(t.document.source.text).toString("base64")};if(zs(t.document.source.content))return{type:"file",mimeType:e,data:t.document.source.content.reduce((I,l)=>Kt(l)&&Me(l.text)?I+l.text:I,"")}}}return{type:"non_standard",value:t}}function XJI(t){if(Rt(t,"image")&&Kt(t.image)){let e=ege(Kt(t.image)&&Me(t.image.format)?t.image.format:"");if(Kt(t.image.source)){if(Kt(t.image.source.s3Location)&&Me(t.image.source.s3Location.uri))return{type:"image",mimeType:e,fileId:t.image.source.s3Location.uri};if(gle(t.image.source.bytes))return{type:"image",mimeType:e,data:t.image.source.bytes}}}return{type:"non_standard",value:t}}function gJI(t){if(Rt(t,"video")&&Kt(t.video)){let e=ege(Kt(t.video)&&Me(t.video.format)?t.video.format:"");if(Kt(t.video.source)){if(Kt(t.video.source.s3Location)&&Me(t.video.source.s3Location.uri))return{type:"video",mimeType:e,fileId:t.video.source.s3Location.uri};if(gle(t.video.source.bytes))return{type:"video",mimeType:e,data:t.video.source.bytes}}}return{type:"non_standard",value:t}}function Xnt(t){function*e(){let I=typeof t.content=="string"?[{type:"text",text:t.content}]:t.content;for(let l of I){if(Rt(l,"cache_point")){yield{type:"non_standard",value:l};continue}else if(Rt(l,"citations_content")&&Kt(l.citationsContent)){yield{type:"text",text:zs(l.citationsContent.content)?l.citationsContent.content.reduce((n,a)=>Kt(a)&&Me(a.text)?n+a.text:n,""):"",annotations:zs(l.citationsContent.citations)?l.citationsContent.citations.reduce((n,a)=>{if(Kt(a)){let c=zs(a.sourceContent)?a.sourceContent.reduce((s,i)=>Kt(i)&&Me(i.text)?s+i.text:s,""):"",r=_m(()=>{if(Kt(a.location)){let s=a.location.documentChar||a.location.documentPage||a.location.documentChunk;if(Kt(s))return{source:Tm(s.documentIndex)?s.documentIndex.toString():void 0,startIndex:Tm(s.start)?s.start:void 0,endIndex:Tm(s.end)?s.end:void 0}}return{}});n.push({type:"citation",citedText:c,...r})}return n},[]):[]};continue}else if(Rt(l,"document")&&Kt(l.document)){yield FJI(l);continue}else if(Rt(l,"guard_content")){yield{type:"non_standard",value:l};continue}else if(Rt(l,"image")&&Kt(l.image)){yield XJI(l);continue}else if(Rt(l,"reasoning_content")&&Me(l.reasoningText)){yield{type:"reasoning",reasoning:l.reasoningText};continue}else if(Rt(l,"text")&&Me(l.text)){yield{type:"text",text:l.text};continue}else if(Rt(l,"tool_result")){yield{type:"non_standard",value:l};continue}else{if(Rt(l,"tool_call"))continue;if(Rt(l,"video")&&Kt(l.video)){yield gJI(l);continue}}yield{type:"non_standard",value:l}}}return Array.from(e())}var gnt,vnt=g(()=>{o();Vp();gnt={translateContent:Xnt,translateContentChunk:Xnt}});function ynt(t){let e=[],I=t.additional_kwargs?.reasoning_content;if(Me(I)&&I.length>0&&e.push({type:"reasoning",reasoning:I}),typeof t.content=="string")t.content.length>0&&e.push({type:"text",text:t.content});else for(let l of t.content)typeof l=="object"&&"type"in l&&l.type==="text"&&"text"in l&&Me(l.text)&&e.push({type:"text",text:l.text});for(let l of t.tool_calls??[])e.push({type:"tool_call",id:l.id,name:l.name,args:l.args});return e}var wnt,Hnt=g(()=>{o();Vp();wnt={translateContent:ynt,translateContentChunk:ynt}});function Qnt(t){function*e(){let I=typeof t.content=="string"?[{type:"text",text:t.content}]:t.content;for(let l of I){if(Rt(l,"text")&&Me(l.text)){yield{type:"text",text:l.text};continue}else if(Rt(l,"thinking")&&Me(l.thinking)){yield{type:"reasoning",reasoning:l.thinking,...l.signature?{signature:l.signature}:{}};continue}else if(Rt(l,"inlineData")&&Kt(l.inlineData)&&Me(l.inlineData.mimeType)&&Me(l.inlineData.data)){yield{type:"file",mimeType:l.inlineData.mimeType,data:l.inlineData.data};continue}else if(Rt(l,"functionCall")&&Kt(l.functionCall)&&Me(l.functionCall.name)&&Kt(l.functionCall.args)){yield{type:"tool_call",id:t.id,name:l.functionCall.name,args:l.functionCall.args};continue}else if(Rt(l,"functionResponse")){yield{type:"non_standard",value:l};continue}else if(Rt(l,"fileData")&&Kt(l.fileData)&&Me(l.fileData.mimeType)&&Me(l.fileData.fileUri)){yield{type:"file",mimeType:l.fileData.mimeType,fileId:l.fileData.fileUri};continue}else if(Rt(l,"executableCode")){yield{type:"non_standard",value:l};continue}else if(Rt(l,"codeExecutionResult")){yield{type:"non_standard",value:l};continue}yield{type:"non_standard",value:l}}}return Array.from(e())}var fnt,Ent=g(()=>{o();Vp();fnt={translateContent:Qnt,translateContentChunk:Qnt}});function Jnt(t){function*e(){let I=typeof t.content=="string"?[{type:"text",text:t.content}]:t.content;for(let l of I){if(Rt(l,"reasoning")&&Me(l.reasoning)){let n=_m(()=>{let a=I.indexOf(l);if(zs(t.additional_kwargs?.signatures)&&a>=0)return t.additional_kwargs.signatures.at(a)});Me(n)?yield{type:"reasoning",reasoning:l.reasoning,signature:n}:yield{type:"reasoning",reasoning:l.reasoning};continue}else if(Rt(l,"thinking")&&Me(l.thinking)){yield{type:"reasoning",reasoning:l.thinking,...l.signature?{signature:l.signature}:{}};continue}else if(Rt(l,"text")&&Me(l.text)){yield{type:"text",text:l.text};continue}else if(Rt(l,"image_url")){if(Me(l.image_url))if(l.image_url.startsWith("data:")){let n=l.image_url.match(/^data:([^;]+);base64,(.+)$/);n?yield{type:"image",data:n[2],mimeType:n[1]}:yield{type:"image",url:l.image_url}}else yield{type:"image",url:l.image_url};continue}else if(Rt(l,"media")&&Me(l.mimeType)&&Me(l.data)){yield{type:"file",mimeType:l.mimeType,data:l.data};continue}yield{type:"non_standard",value:l}}}return Array.from(e())}var Cnt,Lnt=g(()=>{o();Vp();Cnt={translateContent:Jnt,translateContentChunk:Jnt}});function knt(t){let e=[],I=t.additional_kwargs?.reasoning;if(Me(I)&&I.length>0&&e.push({type:"reasoning",reasoning:I}),typeof t.content=="string"){let l=t.content,n=l.match(/([\s\S]*?)<\/think>/);if(n){let a=n[1].trim();a.length>0&&e.push({type:"reasoning",reasoning:a}),l=l.replace(/[\s\S]*?<\/think>/,"").trim()}l.length>0&&e.push({type:"text",text:l})}else for(let l of t.content)if(typeof l=="object"&&"type"in l&&l.type==="text"&&"text"in l&&Me(l.text)){let n=l.text,a=n.match(/([\s\S]*?)<\/think>/);if(a){let c=a[1].trim();c.length>0&&e.push({type:"reasoning",reasoning:c}),n=n.replace(/[\s\S]*?<\/think>/,"").trim()}n.length>0&&e.push({type:"text",text:n})}for(let l of t.tool_calls??[])e.push({type:"tool_call",id:l.id,name:l.name,args:l.args});return e}var xnt,jnt=g(()=>{o();Vp();xnt={translateContent:knt,translateContentChunk:knt}});function Unt(t){let e=[],I=t.additional_kwargs?.reasoning_content;if(Me(I)&&I.length>0&&e.push({type:"reasoning",reasoning:I}),typeof t.content=="string")t.content.length>0&&e.push({type:"text",text:t.content});else for(let l of t.content)typeof l=="object"&&"type"in l&&l.type==="text"&&"text"in l&&Me(l.text)&&e.push({type:"text",text:l.text});for(let l of t.tool_calls??[])e.push({type:"tool_call",id:l.id,name:l.name,args:l.args});return e}var Ont,znt=g(()=>{o();Vp();Ont={translateContent:Unt,translateContentChunk:Unt}});function Bnt(t){let e=[];if(Kt(t.additional_kwargs?.reasoning)){let l=t.additional_kwargs.reasoning;if(zs(l.summary)){let n=l.summary.reduce((a,c)=>Kt(c)&&Me(c.text)?`${a}${c.text}`:a,"");n.length>0&&e.push({type:"reasoning",reasoning:n})}}let I=t.additional_kwargs?.reasoning_content;if(Me(I)&&I.length>0&&e.push({type:"reasoning",reasoning:I}),typeof t.content=="string")t.content.length>0&&e.push({type:"text",text:t.content});else for(let l of t.content)typeof l=="object"&&"type"in l&&l.type==="text"&&"text"in l&&Me(l.text)&&e.push({type:"text",text:l.text});for(let l of t.tool_calls??[])e.push({type:"tool_call",id:l.id,name:l.name,args:l.args});return e}var Mnt,Snt=g(()=>{o();Vp();Mnt={translateContent:Bnt,translateContentChunk:Bnt}});function Tnt(t){function*e(){let I=_m(()=>{if(typeof t.content=="string")return t.additional_kwargs.originalTextContentBlock?[{...t.additional_kwargs.originalTextContentBlock,type:"text"}]:[{type:"text",text:t.content}];{let l=t.additional_kwargs?.originalTextContentBlock;if(l?.thoughtSignature&&!t.content.some(n=>"thoughtSignature"in n)){let n=[...t.content];for(let a=n.length-1;a>=0;a--){let c=n[a];if(c.type==="text"&&!c.thought)return c.thoughtSignature=l.thoughtSignature,n}}return t.content}});for(let l of I){let n=_m(()=>Rt(l,"text")&&Me(l.text)?{type:"text",text:l.text}:Rt(l,"inlineData")&&Kt(l.inlineData)&&Me(l.inlineData.mimeType)&&Me(l.inlineData.data)?{type:"file",mimeType:l.inlineData.mimeType,data:l.inlineData.data}:Rt(l,"functionCall")&&Kt(l.functionCall)&&Me(l.functionCall.name)&&Kt(l.functionCall.args)?{type:"tool_call",id:t.id,name:l.functionCall.name,args:l.functionCall.args}:Rt(l,"functionResponse")?{type:"non_standard",value:l}:Rt(l,"fileData")&&Kt(l.fileData)&&Me(l.fileData.mimeType)&&Me(l.fileData.fileUri)?{type:"file",mimeType:l.fileData.mimeType,fileId:l.fileData.fileUri}:Rt(l,"executableCode")?{type:"non_standard",value:l}:Rt(l,"codeExecutionResult")?{type:"non_standard",value:l}:{type:"non_standard",value:l}),a=_m(()=>"thought"in l&&l.thought?{type:"reasoning",reasoning:n.type==="text"?n.text:"",reasoningContentBlock:n}:n),c={thought:l.thought,thoughtSignature:l.thoughtSignature,partMetadata:l.partMetadata,...a};for(let r in c)c[r]===void 0&&delete c[r];yield c}}return Array.from(e())}var _nt,Knt=g(()=>{o();Vp();_nt={translateContent:Tnt,translateContentChunk:Tnt}});function tge(t){return globalThis.lc_block_translators_registry.get(t)}var Dnt=g(()=>{o();_Xe();DXe();vnt();Hnt();Ent();Lnt();jnt();znt();Snt();Knt();globalThis.lc_block_translators_registry??=new Map([["anthropic",Gnt],["bedrock-converse",gnt],["deepseek",wnt],["google",_nt],["google-genai",fnt],["google-vertexai",Cnt],["groq",xnt],["ollama",Ont],["openai",Znt],["xai",Mnt]])});function qnt(t){let e=Symbol.for(t);return{brand(I,l){let n=l?Symbol.for(`${t}.${l}`):e;class a extends I{[n]=!0;constructor(...r){super(...r)}static isInstance(r){return typeof r=="object"&&r!==null&&n in r&&r[n]===!0}}return Object.defineProperty(a,"name",{value:I.name}),a},sub(I){return qnt(`${t}.${I}`)},isInstance(I){return typeof I=="object"&&I!==null&&e in I&&I[e]===!0}}}var Pnt,$nt=g(()=>{o();Pnt=qnt("langchain")});function pX(t,e){return t.lc_error_code=e,t.message=`${t.message} + +Troubleshooting URL: https://docs.langchain.com/oss/javascript/langchain/errors/${e}/ +`,t}var eat,Ele,Ige,Jle,DS,hX=g(()=>{o();Ct();$nt();eat=ve({ContextOverflowError:()=>DS,LangChainError:()=>Ige,ModelAbortError:()=>Jle,addLangChainErrorFields:()=>pX,ns:()=>Ele});Ele=Pnt.sub("error"),Ige=class extends Ele.brand(Error){name="LangChainError";constructor(t){super(t),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},Jle=class extends Ele.brand(Ige,"model-abort"){name="ModelAbortError";partialOutput;constructor(t,e){super(t),this.partialOutput=e}},DS=class tat extends Ele.brand(Ige,"context-overflow"){name="ContextOverflowError";cause;constructor(e){super(e??"Input exceeded the model's context window.")}static fromError(e){let I=new tat(e.message);return I.cause=e,I}}});function RH(t){return!!(t&&typeof t=="object"&&"type"in t&&t.type==="tool_call")}function Iat(t){return!!(t&&typeof t=="object"&&"toolCall"in t&&t.toolCall!=null&&typeof t.toolCall=="object"&&"id"in t.toolCall&&typeof t.toolCall.id=="string")}var AH,Cle=g(()=>{o();AH=class extends Error{output;constructor(t,e){super(t),this.output=e}}});function rJ(t,e=fA){t=t.trim();let I=t.indexOf("```");if(I===-1)return e(t);let l=t.substring(I+3);l.startsWith(`json +`)?l=l.substring(5):l.startsWith("json")?l=l.substring(4):l.startsWith(` +`)&&(l=l.substring(1));let n=l.indexOf("```"),a=l;return n!==-1&&(a=l.substring(0,n)),e(a.trim())}function vJI(t){try{return JSON.parse(t)}catch{}let e=t.trim();if(e.length===0)throw new Error("Unexpected end of JSON input");let I=0;function l(){for(;I="0"&&e[I]<="9"))throw new Error(`Invalid number at position ${G}`);if(I="1"&&e[I]<="9")for(;I="0"&&e[I]<="9";)d+=e[I],I+=1;if(I="0"&&e[I]<="9";)d+=e[I],I+=1;if(I="0"&&e[I]<="9";)d+=e[I],I+=1;if(d==="-")return-0;let u=Number.parseFloat(d);if(Number.isNaN(u))throw I=G,new Error(`Invalid number '${d}' at position ${G}`);return u}function c(){if(l(),I>=e.length)throw new Error(`Unexpected end of input at position ${I}`);let G=e[I];if(G==="{")return s();if(G==="[")return r();if(G==='"')return n();if("null".startsWith(e.substring(I,I+4)))return I+=Math.min(4,e.length-I),null;if("true".startsWith(e.substring(I,I+4)))return I+=Math.min(4,e.length-I),!0;if("false".startsWith(e.substring(I,I+5)))return I+=Math.min(5,e.length-I),!1;if(G==="-"||G>="0"&&G<="9")return a();throw new Error(`Unexpected character '${G}' at position ${I}`)}function r(){if(e[I]!=="[")throw new Error(`Expected '[' at position ${I}, got '${e[I]}'`);let G=[];if(I+=1,l(),I>=e.length)return G;if(e[I]==="]")return I+=1,G;for(;I=e.length||(G.push(c()),l(),I>=e.length))return G;if(e[I]==="]")return I+=1,G;if(e[I]===","){I+=1;continue}throw new Error(`Expected ',' or ']' at position ${I}, got '${e[I]}'`)}return G}function s(){if(e[I]!=="{")throw new Error(`Expected '{' at position ${I}, got '${e[I]}'`);let G={};if(I+=1,l(),I>=e.length)return G;if(e[I]==="}")return I+=1,G;for(;I=e.length)return G;let d=n();if(l(),I>=e.length)return G;if(e[I]!==":")throw new Error(`Expected ':' at position ${I}, got '${e[I]}'`);if(I+=1,l(),I>=e.length||(G[d]=c(),l(),I>=e.length))return G;if(e[I]==="}")return I+=1,G;if(e[I]===","){I+=1;continue}throw new Error(`Expected ',' or '}' at position ${I}, got '${e[I]}'`)}return G}let i=c();if(l(),I"u"?null:vJI(t)}catch{return null}}var sJ=g(()=>{o()});function nat(t){return t._getType()==="generic"}function aat(t){return t._getType()==="generic"}var Bs,Km,qS=g(()=>{o();Wo();Bs=class lat extends Ml{static lc_name(){return"ChatMessage"}type="generic";role;static _chatMessageClass(){return lat}constructor(e,I){(typeof e=="string"||Array.isArray(e))&&(e={content:e,role:I}),super(e),this.role=e.role}static isInstance(e){return super.isInstance(e)&&e.type==="generic"}get _printableFields(){return{...super._printableFields,role:this.role}}},Km=class extends gr{static lc_name(){return"ChatMessageChunk"}type="generic";role;constructor(t,e){(typeof t=="string"||Array.isArray(t))&&(t={content:t,role:e}),super(t),this.role=t.role}concat(t){let e=this.constructor;return new e({content:eG(this.content,t.content),additional_kwargs:Wc(this.additional_kwargs,t.additional_kwargs),response_metadata:Wc(this.response_metadata,t.response_metadata),role:this.role,id:this.id??t.id})}static isInstance(t){return super.isInstance(t)&&t.type==="generic"}get _printableFields(){return{...super._printableFields,role:this.role}}}});function cat(t){return t._getType()==="function"}function rat(t){return t._getType()==="function"}var WX,Dm,Lle=g(()=>{o();Wo();WX=class extends Ml{static lc_name(){return"FunctionMessage"}type="function";name;constructor(t){super(t),this.name=t.name}},Dm=class extends gr{static lc_name(){return"FunctionMessageChunk"}type="function";concat(t){let e=this.constructor;return new e({content:eG(this.content,t.content),additional_kwargs:Wc(this.additional_kwargs,t.additional_kwargs),response_metadata:Wc(this.response_metadata,t.response_metadata),name:this.name??"",id:this.id??t.id})}}});function sat(t){return t.getType()==="human"}function oat(t){return t.getType()==="human"}var ZI,No,EA=g(()=>{o();Wo();ZI=class extends Ml{static lc_name(){return"HumanMessage"}type="human";constructor(t){super(t)}static isInstance(t){return super.isInstance(t)&&t.type==="human"}},No=class extends gr{static lc_name(){return"HumanMessageChunk"}type="human";constructor(t){super(t)}concat(t){let e=this.constructor;return new e({content:eG(this.content,t.content),additional_kwargs:Wc(this.additional_kwargs,t.additional_kwargs),response_metadata:Wc(this.response_metadata,t.response_metadata),id:this.id??t.id})}static isInstance(t){return super.isInstance(t)&&t.type==="human"}}});var mi,kle=g(()=>{o();Wo();mi=class extends Ml{type="remove";id;constructor(t){super({...t,content:[]}),this.id=t.id}get _printableFields(){return{...super._printableFields,id:this.id}}static isInstance(t){return super.isInstance(t)&&t.type==="remove"}}});function iat(t){return t._getType()==="system"}function Gat(t){return t._getType()==="system"}var Gl,Ms,Gx=g(()=>{o();Wo();Gl=class xle extends Ml{static lc_name(){return"SystemMessage"}type="system";constructor(e){super(e)}concat(e){if(typeof e=="string")return new xle({content:eG(this.content,e),additional_kwargs:this.additional_kwargs,response_metadata:this.response_metadata,id:this.id,name:this.name});if(xle.isInstance(e))return new xle({content:eG(this.content,e.content),additional_kwargs:{...this.additional_kwargs,...e.additional_kwargs},response_metadata:{...this.response_metadata,...e.response_metadata},id:this.id??e.id,name:this.name??e.name});throw new Error("Unexpected chunk type for system message")}static isInstance(e){return super.isInstance(e)&&e.type==="system"}},Ms=class extends gr{static lc_name(){return"SystemMessageChunk"}type="system";constructor(t){super(t)}concat(t){let e=this.constructor;return new e({content:eG(this.content,t.content),additional_kwargs:Wc(this.additional_kwargs,t.additional_kwargs),response_metadata:Wc(this.response_metadata,t.response_metadata),id:this.id??t.id})}static isInstance(t){return super.isInstance(t)&&t.type==="system"}}});function yJI(t){return RH(t)?t:typeof t.id=="string"&&t.type==="function"&&typeof t.function=="object"&&t.function!==null&&"arguments"in t.function&&typeof t.function.arguments=="string"&&"name"in t.function&&typeof t.function.name=="string"?{id:t.id,args:JSON.parse(t.function.arguments),name:t.function.name,type:"tool_call"}:t}function wJI(t){return typeof t=="object"&&t!=null&&t.lc===1&&Array.isArray(t.id)&&t.kwargs!=null&&typeof t.kwargs=="object"}function lge(t){let e,I;if(wJI(t)){let l=t.id.at(-1);l==="HumanMessage"||l==="HumanMessageChunk"?e="user":l==="AIMessage"||l==="AIMessageChunk"?e="assistant":l==="SystemMessage"||l==="SystemMessageChunk"?e="system":l==="FunctionMessage"||l==="FunctionMessageChunk"?e="function":l==="ToolMessage"||l==="ToolMessageChunk"?e="tool":e="unknown",I=t.kwargs}else{let{type:l,...n}=t;e=l,I=n}if(e==="human"||e==="user")return new ZI(I);if(e==="ai"||e==="assistant"){let{tool_calls:l,...n}=I;if(!Array.isArray(l))return new He(I);let a=l.map(yJI);return new He({...n,tool_calls:a})}else{if(e==="system")return new Gl(I);if(e==="developer")return new Gl({...I,additional_kwargs:{...I.additional_kwargs,__openai_role__:"developer"}});if(e==="tool"&&"tool_call_id"in I)return new pt({...I,content:I.content,tool_call_id:I.tool_call_id,name:I.name});if(e==="remove"&&"id"in I&&typeof I.id=="string")return new mi({...I,id:I.id});throw pX(new Error(`Unable to coerce message from array: only human, AI, system, developer, or tool message coercion is currently supported. + +Received: ${JSON.stringify(t,null,2)}`),"MESSAGE_COERCION_FAILURE")}}function Zi(t){if(typeof t=="string")return new ZI(t);if(ma(t))return t;if(Array.isArray(t)){let[e,I]=t;return lge({type:e,content:I})}else if(Hle(t)){let{role:e,...I}=t;return lge({...I,type:e})}else return lge(t)}function HJI(t){if(typeof t=="string")return t;switch(t.type){case"text":return t.text??"";case"text-plain":return t.text??"[text-plain file]";case"image":case"image_url":return"[image]";case"audio":case"input_audio":return"[audio]";case"video":return"[video]";case"file":return"[file]";case"reasoning":case"tool_call":case"tool_call_chunk":case"invalid_tool_call":case"server_tool_call":case"server_tool_call_chunk":case"server_tool_call_result":case"non_standard":return"";default:return t.type?`[${t.type}]`:""}}function FH(t,e="Human",I="AI"){let l=[];for(let n of t){let a;if(n.type==="human")a=e;else if(n.type==="ai")a=I;else if(n.type==="system")a="System";else if(n.type==="tool")a="Tool";else if(n.type==="generic")a=n.role;else throw new Error(`Got unsupported message type: ${n.type}`);let c=n.name?`${n.name}, `:"",r=typeof n.content=="string"?n.content:Array.isArray(n.content)?n.content.map(HJI).filter(Boolean).join(""):"",s=`${a}: ${c}${r}`;if(n.type==="ai"){let i=n;i.tool_calls&&i.tool_calls.length>0?s+=JSON.stringify(i.tool_calls):i.additional_kwargs&&"function_call"in i.additional_kwargs&&(s+=JSON.stringify(i.additional_kwargs.function_call))}l.push(s)}return l.join(` +`)}function QJI(t){if(t.data!==void 0)return t;{let e=t;return{type:e.type,data:{content:e.text,role:e.role,name:void 0,tool_call_id:void 0}}}}function PS(t){let e=QJI(t);switch(e.type){case"human":return new ZI(e.data);case"ai":return new He(e.data);case"system":return new Gl(e.data);case"function":if(e.data.name===void 0)throw new Error("Name must be defined for function messages");return new WX(e.data);case"tool":if(e.data.tool_call_id===void 0)throw new Error("Tool call ID must be defined for tool messages");return new pt(e.data);case"generic":if(e.data.role===void 0)throw new Error("Role must be defined for chat messages");return new Bs(e.data);default:throw new Error(`Got unexpected type: ${e.type}`)}}function dat(t){return t.map(PS)}function uat(t){return t.map(e=>e.toDict())}function oJ(t){let e=t._getType();if(e==="human")return new No({...t});if(e==="ai"){let I={...t};return"tool_calls"in I&&(I={...I,tool_call_chunks:I.tool_calls?.map(l=>({...l,type:"tool_call_chunk",index:void 0,args:JSON.stringify(l.args)}))}),new eI({...I})}else{if(e==="system")return new Ms({...t});if(e==="function")return new Dm({...t});if(Bs.isInstance(t))return new Km({...t});throw new Error("Unknown message type.")}}function Ule(t){let e=t.reduce((n,a)=>{let c=n.findIndex(([r])=>"id"in a&&a.id&&"index"in a&&a.index!==void 0?a.id===r.id&&a.index===r.index:"id"in a&&a.id?a.id===r.id:"index"in a&&a.index!==void 0?a.index===r.index:!1);return c!==-1?n[c].push(a):n.push([a]),n},[]),I=[],l=[];for(let n of e){let a=null,c=n[0]?.name??"",r=n.map(G=>G.args||"").join("").trim(),s=r.length?r:"{}",i=n[0]?.id;try{if(a=fA(s),!i||a===null||typeof a!="object"||Array.isArray(a))throw new Error("Malformed tool call chunk args.");I.push({name:c,args:a,id:i,type:"tool_call"})}catch{l.push({name:c,args:s,id:i,error:"Malformed args.",type:"invalid_tool_call"})}}return{tool_call_chunks:t,tool_calls:I,invalid_tool_calls:l}}var jle,xR=g(()=>{o();hX();Cle();sJ();Wo();YH();tG();qS();Lle();EA();kle();Gx();jle=t=>t()});function jR(t){return t._getType()==="ai"}function $S(t){return t._getType()==="ai"}var He,eI,tG=g(()=>{o();Wo();Dnt();fle();YH();xR();He=class extends Ml{type="ai";tool_calls=[];invalid_tool_calls=[];usage_metadata;get lc_aliases(){return{...super.lc_aliases,tool_calls:"tool_calls",invalid_tool_calls:"invalid_tool_calls",usage_metadata:"usage_metadata"}}constructor(t){let e;if(typeof t=="string"||Array.isArray(t))e={content:t,tool_calls:[],invalid_tool_calls:[],additional_kwargs:{}};else{e=t;let I=e.additional_kwargs?.tool_calls,l=e.tool_calls;I!=null&&I.length>0&&(l===void 0||l.length===0)&&console.warn(["New LangChain packages are available that more efficiently handle",`tool calling. + +Please upgrade your packages to versions that set`,"message tool calls. e.g., `pnpm install @langchain/anthropic`,","pnpm install @langchain/openai`, etc."].join(" "));try{if(I!=null&&l===void 0){let[n,a]=KS(I);e.tool_calls=n??[],e.invalid_tool_calls=a??[]}else e.tool_calls=e.tool_calls??[],e.invalid_tool_calls=e.invalid_tool_calls??[]}catch{e.tool_calls=[],e.invalid_tool_calls=[]}if(e.response_metadata!==void 0&&"output_version"in e.response_metadata&&e.response_metadata.output_version==="v1"&&(e.contentBlocks=e.content,e.content=void 0),e.contentBlocks!==void 0){e.tool_calls&&e.contentBlocks.push(...e.tool_calls.map(a=>({type:"tool_call",id:a.id,name:a.name,args:a.args})));let n=e.contentBlocks.filter(a=>a.type==="tool_call").filter(a=>!e.tool_calls?.some(c=>c.id===a.id&&c.name===a.name));n.length>0&&(e.tool_calls=n.map(a=>({type:"tool_call",id:a.id,name:a.name,args:a.args})))}}super(e),typeof e!="string"&&(this.tool_calls=e.tool_calls??this.tool_calls,this.invalid_tool_calls=e.invalid_tool_calls??this.invalid_tool_calls),this.usage_metadata=e.usage_metadata}static lc_name(){return"AIMessage"}get contentBlocks(){if(this.response_metadata&&"output_version"in this.response_metadata&&this.response_metadata.output_version==="v1")return this.content;if(this.response_metadata&&"model_provider"in this.response_metadata&&typeof this.response_metadata.model_provider=="string"){let e=tge(this.response_metadata.model_provider);if(e)return e.translateContent(this)}let t=super.contentBlocks;if(this.tool_calls){let e=this.tool_calls.filter(I=>!t.some(l=>l.id===I.id&&l.name===I.name));t.push(...e.map(I=>({type:"tool_call",id:I.id,name:I.name,args:I.args})))}return t}get _printableFields(){return{...super._printableFields,tool_calls:this.tool_calls,invalid_tool_calls:this.invalid_tool_calls,usage_metadata:this.usage_metadata}}static isInstance(t){return super.isInstance(t)&&t.type==="ai"}};eI=class extends gr{type="ai";tool_calls=[];invalid_tool_calls=[];tool_call_chunks=[];usage_metadata;constructor(t){let e;if(typeof t=="string"||Array.isArray(t))e={content:t,tool_calls:[],invalid_tool_calls:[],tool_call_chunks:[]};else if(t.tool_call_chunks===void 0||t.tool_call_chunks.length===0)e={...t,tool_calls:t.tool_calls??[],invalid_tool_calls:[],tool_call_chunks:[],usage_metadata:t.usage_metadata!==void 0?t.usage_metadata:void 0};else{let I=Ule(t.tool_call_chunks??[]);e={...t,tool_call_chunks:I.tool_call_chunks,tool_calls:I.tool_calls,invalid_tool_calls:I.invalid_tool_calls,usage_metadata:t.usage_metadata!==void 0?t.usage_metadata:void 0}}super(e),this.tool_call_chunks=e.tool_call_chunks??this.tool_call_chunks,this.tool_calls=e.tool_calls??this.tool_calls,this.invalid_tool_calls=e.invalid_tool_calls??this.invalid_tool_calls,this.usage_metadata=e.usage_metadata}get lc_aliases(){return{...super.lc_aliases,tool_calls:"tool_calls",invalid_tool_calls:"invalid_tool_calls",tool_call_chunks:"tool_call_chunks",usage_metadata:"usage_metadata"}}static lc_name(){return"AIMessageChunk"}get contentBlocks(){if(this.response_metadata&&"output_version"in this.response_metadata&&this.response_metadata.output_version==="v1")return this.content;if(this.response_metadata&&"model_provider"in this.response_metadata&&typeof this.response_metadata.model_provider=="string"){let e=tge(this.response_metadata.model_provider);if(e)return e.translateContent(this)}let t=super.contentBlocks;if(this.tool_calls&&typeof this.content!="string"){let e=this.content.filter(I=>I.type==="tool_call").map(I=>I.id);for(let I of this.tool_calls)I.id&&!e.includes(I.id)&&t.push({...I,type:"tool_call",id:I.id,name:I.name,args:I.args})}return t}get _printableFields(){return{...super._printableFields,tool_calls:this.tool_calls,tool_call_chunks:this.tool_call_chunks,invalid_tool_calls:this.invalid_tool_calls,usage_metadata:this.usage_metadata}}concat(t){let e={content:eG(this.content,t.content),additional_kwargs:Wc(this.additional_kwargs,t.additional_kwargs),response_metadata:Qle(this.response_metadata,t.response_metadata),tool_call_chunks:[],tool_calls:[],id:this.id??t.id};if(this.tool_call_chunks!==void 0||t.tool_call_chunks!==void 0){let l=VH(this.tool_call_chunks,t.tool_call_chunks);l!==void 0&&l.length>0&&(e.tool_call_chunks=l)}if(this.tool_calls!==void 0||t.tool_calls!==void 0){let l=VH(this.tool_calls,t.tool_calls);l!==void 0&&l.length>0&&(e.tool_calls=l)}(this.usage_metadata!==void 0||t.usage_metadata!==void 0)&&(e.usage_metadata=ix(this.usage_metadata,t.usage_metadata));let I=this.constructor;return new I(e)}static isInstance(t){return super.isInstance(t)&&t.type==="ai"}}});var bat,mat=g(()=>{o();bat=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i});function qm(t){return typeof t=="string"&&bat.test(t)}var dx=g(()=>{o();mat()});function NX(t,e=0){return(pi[t[e+0]]+pi[t[e+1]]+pi[t[e+2]]+pi[t[e+3]]+"-"+pi[t[e+4]]+pi[t[e+5]]+"-"+pi[t[e+6]]+pi[t[e+7]]+"-"+pi[t[e+8]]+pi[t[e+9]]+"-"+pi[t[e+10]]+pi[t[e+11]]+pi[t[e+12]]+pi[t[e+13]]+pi[t[e+14]]+pi[t[e+15]]).toLowerCase()}function Zat(t,e=0){let I=NX(t,e);if(!qm(I))throw TypeError("Stringified UUID is invalid");return I}var pi,ux=g(()=>{o();dx();pi=[];for(let t=0;t<256;++t)pi.push((t+256).toString(16).slice(1))});function XH(){return crypto.getRandomValues(fJI)}var fJI,Ole=g(()=>{o();fJI=new Uint8Array(16)});function Pm(t,e,I){let l;if(t)l=pat(t.random??t.rng?.()??XH(),t.msecs,t.seq,e,I);else{let n=Date.now(),a=XH();EJI(nge,n,a),l=pat(a,nge.msecs,nge.seq,e,I)}return e??NX(l)}function EJI(t,e,I){return t.msecs??=-1/0,t.seq??=0,e>t.msecs?(t.seq=I[6]<<23|I[7]<<16|I[8]<<8|I[9],t.msecs=e):(t.seq=t.seq+1|0,t.seq===0&&t.msecs++),t}function pat(t,e,I,l,n=0){if(t.length<16)throw new Error("Random bytes length must be >= 16");if(!l)l=new Uint8Array(16),n=0;else if(n<0||n+16>l.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);return e??=Date.now(),I??=t[6]*127<<24|t[7]<<16|t[8]<<8|t[9],l[n++]=e/1099511627776&255,l[n++]=e/4294967296&255,l[n++]=e/16777216&255,l[n++]=e/65536&255,l[n++]=e/256&255,l[n++]=e&255,l[n++]=112|I>>>28&15,l[n++]=I>>>20&255,l[n++]=128|I>>>14&63,l[n++]=I>>>6&255,l[n++]=I<<2&255|t[10]&3,l[n++]=t[11],l[n++]=t[12],l[n++]=t[13],l[n++]=t[14],l[n++]=t[15],l}var nge,eT=g(()=>{o();ux();Ole();nge={}});var hat,Wat=g(()=>{o();hat="ffffffff-ffff-ffff-ffff-ffffffffffff"});var Nat,Vat=g(()=>{o();Nat="00000000-0000-0000-0000-000000000000"});function tT(t){if(!qm(t))throw TypeError("Invalid UUID");let e;return Uint8Array.of((e=parseInt(t.slice(0,8),16))>>>24,e>>>16&255,e>>>8&255,e&255,(e=parseInt(t.slice(9,13),16))>>>8,e&255,(e=parseInt(t.slice(14,18),16))>>>8,e&255,(e=parseInt(t.slice(19,23),16))>>>8,e&255,(e=parseInt(t.slice(24,36),16))/1099511627776&255,e/4294967296&255,e>>>24&255,e>>>16&255,e>>>8&255,e&255)}var age=g(()=>{o();dx()});function Rat(t,e,I){let l,n=t?._v6??!1;if(t){let a=Object.keys(t);a.length===1&&a[0]==="_v6"&&(t=void 0)}if(t)l=Yat(t.random??t.rng?.()??XH(),t.msecs,t.nsecs,t.clockseq,t.node,e,I);else{let a=Date.now(),c=XH();JJI(IT,a,c),l=Yat(c,IT.msecs,IT.nsecs,n?void 0:IT.clockseq,n?void 0:IT.node,e,I)}return e??NX(l)}function JJI(t,e,I){return t.msecs??=-1/0,t.nsecs??=0,e===t.msecs?(t.nsecs++,t.nsecs>=1e4&&(t.node=void 0,t.nsecs=0)):e>t.msecs?t.nsecs=0:e= 16");if(!a)a=new Uint8Array(16),c=0;else if(c<0||c+16>a.length)throw new RangeError(`UUID byte range ${c}:${c+15} is out of buffer bounds`);e??=Date.now(),I??=0,l??=(t[8]<<8|t[9])&16383,n??=t.slice(10,16),e+=122192928e5;let r=((e&268435455)*1e4+I)%4294967296;a[c++]=r>>>24&255,a[c++]=r>>>16&255,a[c++]=r>>>8&255,a[c++]=r&255;let s=e/4294967296*1e4&268435455;a[c++]=s>>>8&255,a[c++]=s&255,a[c++]=s>>>24&15|16,a[c++]=s>>>16&255,a[c++]=l>>>8|128,a[c++]=l&255;for(let i=0;i<6;++i)a[c++]=n[i];return a}var IT,Aat=g(()=>{o();ux();Ole();IT={}});function ju(t,e,I){return!e&&!t&&crypto.randomUUID?crypto.randomUUID():CJI(t,e,I)}function CJI(t,e,I){t=t||{};let l=t.random??t.rng?.()??XH();if(l.length<16)throw new Error("Random bytes length must be >= 16");if(l[6]=l[6]&15|64,l[8]=l[8]&63|128,e){if(I=I||0,I<0||I+16>e.length)throw new RangeError(`UUID byte range ${I}:${I+15} is out of buffer bounds`);for(let n=0;n<16;++n)e[I+n]=l[n];return e}return NX(l)}var cge=g(()=>{o();ux();Ole()});function LJI(t,e,I,l){switch(t){case 0:return e&I^~e&l;case 1:return e^I^l;case 2:return e&I^e&l^I&l;case 3:return e^I^l}}function rge(t,e){return t<>>32-e}function Fat(t){let e=[1518500249,1859775393,2400959708,3395469782],I=[1732584193,4023233417,2562383102,271733878,3285377520],l=new Uint8Array(t.length+1);l.set(t),l[t.length]=128,t=l;let n=t.length/4+2,a=Math.ceil(n/16),c=new Array(a);for(let r=0;r>>0;b=u,u=d,d=rge(G,30)>>>0,G=i,i=W}I[0]=I[0]+i>>>0,I[1]=I[1]+G>>>0,I[2]=I[2]+d>>>0,I[3]=I[3]+u>>>0,I[4]=I[4]+b>>>0}return Uint8Array.of(I[0]>>24,I[0]>>16,I[0]>>8,I[0],I[1]>>24,I[1]>>16,I[1]>>8,I[1],I[2]>>24,I[2]>>16,I[2]>>8,I[2],I[3]>>24,I[3]>>16,I[3]>>8,I[3],I[4]>>24,I[4]>>16,I[4]>>8,I[4])}var Xat=g(()=>{o()});function kJI(t){t=unescape(encodeURIComponent(t));let e=new Uint8Array(t.length);for(let I=0;In.length)throw new RangeError(`UUID byte range ${a}:${a+15} is out of buffer bounds`);for(let i=0;i<16;++i)n[a+i]=s[i];return n}return NX(s)}var gat,vat,wat=g(()=>{o();age();ux();gat="6ba7b810-9dad-11d1-80b4-00c04fd430c8",vat="6ba7b811-9dad-11d1-80b4-00c04fd430c8"});function iJ(t,e,I,l){return yat(80,Fat,t,e,I,l)}var sge=g(()=>{o();Xat();wat();iJ.DNS=gat;iJ.URL=vat});function Hat(t){if(!qm(t))throw TypeError("Invalid UUID");return parseInt(t.slice(14,15),16)}var Qat=g(()=>{o();dx()});var fat,UR=g(()=>{o();Ct();Wat();Vat();dx();age();ux();Aat();cge();sge();eT();Qat();fat=ve({MAX:()=>hat,NIL:()=>Nat,parse:()=>tT,stringify:()=>Zat,v1:()=>Rat,v4:()=>ju,v5:()=>iJ,v7:()=>Pm,validate:()=>qm,version:()=>Hat})});var Eat,gH,Jat,vH,lT=g(()=>{o();Eat=Symbol.for("ls:tracing_async_local_storage"),gH=Symbol.for("lc:context_variables"),Jat=t=>{globalThis[Eat]=t},vH=()=>globalThis[Eat]});function ige(){return oge===void 0&&(oge={library:"langchain-js",runtime:Ble()}),oge}function gt(t){try{return typeof process<"u"?process.env?.[t]:zle()?Deno?.env.get(t):void 0}catch{return}}var Cat,Lat,kat,xat,zle,jat,Ble,oge,ca=g(()=>{o();Ct();Cat=ve({getEnv:()=>Ble,getEnvironmentVariable:()=>gt,getRuntimeEnvironment:()=>ige,isBrowser:()=>Lat,isDeno:()=>zle,isJsDom:()=>xat,isNode:()=>jat,isWebWorker:()=>kat}),Lat=()=>typeof window<"u"&&typeof window.document<"u",kat=()=>typeof globalThis=="object"&&globalThis.constructor&&globalThis.constructor.name==="DedicatedWorkerGlobalScope",xat=()=>typeof window<"u"&&window.name==="nodejs"||typeof navigator<"u"&&navigator.userAgent.includes("jsdom"),zle=()=>typeof Deno<"u",jat=()=>typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"&&!zle(),Ble=()=>{let t;return Lat()?t="browser":jat()?t="node":kat()?t="webworker":xat()?t="jsdom":zle()?t="deno":t="other",t}});function nT(t){return"lc_prefer_streaming"in t&&t.lc_prefer_streaming}var Uat,xJI,OR,Gge,yH=g(()=>{o();Ct();Jb();eT();UR();ca();Uat=ve({BaseCallbackHandler:()=>OR,callbackHandlerPrefersStreaming:()=>nT,isBaseCallbackHandler:()=>Gge}),xJI=class{};OR=class extends xJI{lc_serializable=!1;get lc_namespace(){return["langchain_core","callbacks",this.name]}get lc_secrets(){}get lc_attributes(){}get lc_aliases(){}get lc_serializable_keys(){}static lc_name(){return this.name}get lc_id(){return[...this.lc_namespace,aJ(this.constructor)]}lc_kwargs;ignoreLLM=!1;ignoreChain=!1;ignoreAgent=!1;ignoreRetriever=!1;ignoreCustomEvent=!1;raiseError=!1;awaitHandlers=gt("LANGCHAIN_CALLBACKS_BACKGROUND")==="false";constructor(t){super(),this.lc_kwargs=t||{},t&&(this.ignoreLLM=t.ignoreLLM??this.ignoreLLM,this.ignoreChain=t.ignoreChain??this.ignoreChain,this.ignoreAgent=t.ignoreAgent??this.ignoreAgent,this.ignoreRetriever=t.ignoreRetriever??this.ignoreRetriever,this.ignoreCustomEvent=t.ignoreCustomEvent??this.ignoreCustomEvent,this.raiseError=t.raiseError??this.raiseError,this.awaitHandlers=this.raiseError||(t._awaitHandler??this.awaitHandlers))}copy(){return new this.constructor(this)}toJSON(){return Xr.prototype.toJSON.call(this)}toJSONNotImplemented(){return Xr.prototype.toJSONNotImplemented.call(this)}static fromMethods(t){class e extends OR{name=Pm();constructor(){super(),Object.assign(this,t)}}return new e}},Gge=t=>{let e=t;return e!==void 0&&typeof e.copy=="function"&&typeof e.name=="string"&&typeof e.awaitHandlers=="boolean"}});var Oat=g(()=>{o()});var zat=g(()=>{o()});var Bat,Mat=g(()=>{o();Bat=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i});function jJI(t){return typeof t=="string"&&Bat.test(t)}var aT,cT=g(()=>{o();Mat();aT=jJI});function UJI(t){if(!aT(t))throw TypeError("Invalid UUID");let e;return Uint8Array.of((e=parseInt(t.slice(0,8),16))>>>24,e>>>16&255,e>>>8&255,e&255,(e=parseInt(t.slice(9,13),16))>>>8,e&255,(e=parseInt(t.slice(14,18),16))>>>8,e&255,(e=parseInt(t.slice(19,23),16))>>>8,e&255,(e=parseInt(t.slice(24,36),16))/1099511627776&255,e/4294967296&255,e>>>24&255,e>>>16&255,e>>>8&255,e&255)}var Mle,dge=g(()=>{o();cT();Mle=UJI});function bx(t,e=0){return(hi[t[e+0]]+hi[t[e+1]]+hi[t[e+2]]+hi[t[e+3]]+"-"+hi[t[e+4]]+hi[t[e+5]]+"-"+hi[t[e+6]]+hi[t[e+7]]+"-"+hi[t[e+8]]+hi[t[e+9]]+"-"+hi[t[e+10]]+hi[t[e+11]]+hi[t[e+12]]+hi[t[e+13]]+hi[t[e+14]]+hi[t[e+15]]).toLowerCase()}var hi,rT=g(()=>{o();cT();hi=[];for(let t=0;t<256;++t)hi.push((t+256).toString(16).slice(1))});function mx(){return crypto.getRandomValues(OJI)}var OJI,uge=g(()=>{o();OJI=new Uint8Array(16)});function zJI(t,e,I){return!e&&!t&&crypto.randomUUID?crypto.randomUUID():BJI(t,e,I)}function BJI(t,e,I){t=t||{};let l=t.random??t.rng?.()??mx();if(l.length<16)throw new Error("Random bytes length must be >= 16");if(l[6]=l[6]&15|64,l[8]=l[8]&63|128,e){if(I=I||0,I<0||I+16>e.length)throw new RangeError(`UUID byte range ${I}:${I+15} is out of buffer bounds`);for(let n=0;n<16;++n)e[I+n]=l[n];return e}return bx(l)}var GJ,Sat=g(()=>{o();uge();rT();GJ=zJI});function MJI(t,e,I,l){switch(t){case 0:return e&I^~e&l;case 1:return e^I^l;case 2:return e&I^e&l^I&l;case 3:return e^I^l}}function bge(t,e){return t<>>32-e}function SJI(t){let e=[1518500249,1859775393,2400959708,3395469782],I=[1732584193,4023233417,2562383102,271733878,3285377520],l=new Uint8Array(t.length+1);l.set(t),l[t.length]=128,t=l;let n=t.length/4+2,a=Math.ceil(n/16),c=new Array(a);for(let r=0;r>>0;b=u,u=d,d=bge(G,30)>>>0,G=i,i=W}I[0]=I[0]+i>>>0,I[1]=I[1]+G>>>0,I[2]=I[2]+d>>>0,I[3]=I[3]+u>>>0,I[4]=I[4]+b>>>0}return Uint8Array.of(I[0]>>24,I[0]>>16,I[0]>>8,I[0],I[1]>>24,I[1]>>16,I[1]>>8,I[1],I[2]>>24,I[2]>>16,I[2]>>8,I[2],I[3]>>24,I[3]>>16,I[3]>>8,I[3],I[4]>>24,I[4]>>16,I[4]>>8,I[4])}var Tat,_at=g(()=>{o();Tat=SJI});function TJI(t){t=unescape(encodeURIComponent(t));let e=new Uint8Array(t.length);for(let I=0;In.length)throw new RangeError(`UUID byte range ${a}:${a+15} is out of buffer bounds`);for(let i=0;i<16;++i)n[a+i]=s[i];return n}return bx(s)}var mge,Zge,hge=g(()=>{o();dge();rT();mge="6ba7b810-9dad-11d1-80b4-00c04fd430c8",Zge="6ba7b811-9dad-11d1-80b4-00c04fd430c8"});function Wge(t,e,I,l){return pge(80,Tat,t,e,I,l)}var Nge,Kat=g(()=>{o();_at();hge();hge();Wge.DNS=mge;Wge.URL=Zge;Nge=Wge});function _JI(t,e,I){let l;if(t)l=Dat(t.random??t.rng?.()??mx(),t.msecs,t.seq,e,I);else{let n=Date.now(),a=mx();KJI(Vge,n,a),l=Dat(a,Vge.msecs,Vge.seq,e,I)}return e??bx(l)}function KJI(t,e,I){return t.msecs??=-1/0,t.seq??=0,e>t.msecs?(t.seq=I[6]<<23|I[7]<<16|I[8]<<8|I[9],t.msecs=e):(t.seq=t.seq+1|0,t.seq===0&&t.msecs++),t}function Dat(t,e,I,l,n=0){if(t.length<16)throw new Error("Random bytes length must be >= 16");if(!l)l=new Uint8Array(16),n=0;else if(n<0||n+16>l.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);return e??=Date.now(),I??=t[6]*127<<24|t[7]<<16|t[8]<<8|t[9],l[n++]=e/1099511627776&255,l[n++]=e/4294967296&255,l[n++]=e/16777216&255,l[n++]=e/65536&255,l[n++]=e/256&255,l[n++]=e&255,l[n++]=112|I>>>28&15,l[n++]=I>>>20&255,l[n++]=128|I>>>14&63,l[n++]=I>>>6&255,l[n++]=I<<2&255|t[10]&3,l[n++]=t[11],l[n++]=t[12],l[n++]=t[13],l[n++]=t[14],l[n++]=t[15],l}var Vge,Zx,qat=g(()=>{o();uge();rT();Vge={};Zx=_JI});var Pat=g(()=>{o();cT()});var sT=g(()=>{o();Oat();zat();dge();rT();Sat();Kat();qat();cT();Pat()});var $at,ect,Yge,tct,Rge,Age,Fge,Ict,lct,nct,act,cct,rct,sct,oct,ict,Gct,dct,uct,bct,mct,Zct,pct,hct,Wct,Nct,Vct,Yct,Rct,Act,Xge,Fct,Xct,gct=g(()=>{o();$at="gen_ai.operation.name",ect="gen_ai.system",Yge="gen_ai.request.model",tct="gen_ai.response.model",Rge="gen_ai.usage.input_tokens",Age="gen_ai.usage.output_tokens",Fge="gen_ai.usage.total_tokens",Ict="gen_ai.request.max_tokens",lct="gen_ai.request.temperature",nct="gen_ai.request.top_p",act="gen_ai.request.frequency_penalty",cct="gen_ai.request.presence_penalty",rct="gen_ai.response.finish_reasons",sct="gen_ai.prompt",oct="gen_ai.completion",ict="gen_ai.request.extra_query",Gct="gen_ai.request.extra_body",dct="gen_ai.serialized.name",uct="gen_ai.serialized.signature",bct="gen_ai.serialized.doc",mct="gen_ai.response.id",Zct="gen_ai.response.service_tier",pct="gen_ai.response.system_fingerprint",hct="gen_ai.usage.input_token_details",Wct="gen_ai.usage.output_token_details",Nct="langsmith.trace.session_id",Vct="langsmith.trace.session_name",Yct="langsmith.span.kind",Rct="langsmith.trace.name",Act="langsmith.metadata",Xge="langsmith.span.tags",Fct="langsmith.request.streaming",Xct="langsmith.request.headers"});var PJI,$JI,vct,yct,wct,gge=g(()=>{o();VX();PJI=(...t)=>fetch(...t),vct=Symbol.for("ls:fetch_implementation"),yct=()=>globalThis[vct]===void 0?!0:$JI??!1,wct=t=>async(...e)=>{if(t||ra("DEBUG")==="true"){let[l,n]=e;console.log(`\u2192 ${n?.method||"GET"} ${l}`)}let I=await(globalThis[vct]??PJI)(...e);return(t||ra("DEBUG")==="true")&&console.log(`\u2190 ${I.status} ${I.statusText} ${I.url}`),I}});var oT,vge=g(()=>{o();VX();oT=()=>ra("PROJECT")??$m("LANGCHAIN_SESSION")??"default"});function dJ(t){Hct[t]||(console.warn(t),Hct[t]=!0)}var Hct,Sle=g(()=>{o();Hct={}});function nCI(t){let e=new Uint8Array(t.length/2);for(let I=0;I>Se(32)-e)&Dle}function xct(t,e,I){for(let l=0;l>Se(32))}return t}function Qct(t,e,I,l){for(let n=0;n128),l=GCI(l,t,e,xct,iCI),Wx(l.length*8==64);{let n=fct(l,Za(e,11),Se(t.byteLength)*wH&sl);return fct(l,Za(e,e.byteLength-YX-11),~(Se(t.byteLength)*uJ)&sl)<>Se(64)}function Ect(t,e,I){return jct((nc(t,0)^nc(e,0)+I)&sl,(nc(t,8)^nc(e,8)-I)&sl)}function Kle(t,e,I,l,n){let a=t&sl,c=t>>Se(64)&sl;return a+=Ect(e,l,n),a^=nc(I,0)+nc(I,8),a&=sl,c+=Ect(I,Za(l,16),n),c^=nc(e,0)+nc(e,8),c&=sl,c<>Se(37),t*=ICI,t&=sl,t^=t>>Se(32),t}function qle(t){return t^=t>>Se(33),t*=uJ,t&=sl,t^=t>>Se(29),t*=Lct,t&=sl,t^=t>>Se(32),t}function uCI(t,e,I){let l=t.byteLength;Wx(l>0&&l<=3);let n=Se(yge(t,l-1))|Se(l<<8)|Se(yge(t,0)<<16)|Se(yge(t,l>>1)<<24),a=(Se(px(e,0))^Se(px(e,4)))+I,c=(n^a)&sl,r=(Se(px(e,8))^Se(px(e,12)))-I,s=(oCI(rCI(n),Se(13))^r)&sl;return(qle(s)&sl)<>e}function bCI(t,e,I){let l=t.byteLength;Wx(l>=4&&l<=8);{let n=px(t,0),a=px(t,l-4),c=Se(n)|Se(a)<>Se(67),wge(wge(i&sl,Se(35))*lCI&sl,Se(28))|CA(i>>Se(64))<=9&&l<=16);{let n=(nc(e,32)^nc(e,40))+I&sl,a=(nc(e,48)^nc(e,56))-I&sl,c=nc(t),r=nc(t,l-8),s=(c^r^n)*wH,i=(s&sl)+(Se(l-1)<>Se(64));let G=(s&sl)*uJ;return G+=(s>>Se(64))*uJ<>Se(64))<8?mCI(t,JA,e):I>=4?bCI(t,JA,e):I>0?uCI(t,JA,e):qle(e^nc(JA,64)^nc(JA,72))|qle(e^nc(JA,80)^nc(JA,88))<=0;){let r=Number(n);l=Kle(l,Za(t,16*r),Za(t,t.byteLength-16*(r+1)),Za(e,32*r),I),n--}let a=l+(l>>Se(64))&sl;a=CA(a);let c=(l&sl)*wH+(l>>Se(64))*Qge+(Se(t.byteLength)-I&sl)*uJ;return c&=sl,c=Hge(CA(c)),a|c<>Se(64))<>Se(64))&sl;n=CA(n);let a=(l&sl)*wH+(l>>Se(64))*Qge+(Se(t.byteLength)-I&sl)*uJ;return a&=sl,a=Hge(CA(a)),n|a<>Se(64);return I.setBigUint64(0,n,!1),I.setBigUint64(8,l,!1),e}var Se,Jct,Cct,eCI,wH,uJ,Lct,Qge,tCI,ICI,lCI,JA,hx,sl,Dle,YX,kct,aCI,Tle,cCI,rCI,sCI,Wx,zct=g(()=>{o();Se=t=>BigInt(t),Jct=Se("0x9E3779B1"),Cct=Se("0x85EBCA77"),eCI=Se("0xC2B2AE3D"),wH=Se("0x9E3779B185EBCA87"),uJ=Se("0xC2B2AE3D27D4EB4F"),Lct=Se("0x165667B19E3779F9"),Qge=Se("0x85EBCA77C2B2AE63"),tCI=Se("0x27D4EB2F165667C5"),ICI=Se("0x165667919E3779F9"),lCI=Se("0x9FB21C651E98DF25");JA=nCI("b8fe6c3923a44bbe7c01812cf721ad1cded46de9839097db7240a4a4b7b3671fcb79e64eccc0e578825ad07dccff7221b8084674f743248ee03590e6813a264c3c2852bb91c300cb88d0658b1b532ea371644897a20df94e3819ef46a9deacd8a8fa763fe39c343ff9dcbbc7c70b4f1d8a51e04bcdb45931c89f7ec9d9787364eac5ac8334d3ebc3c581a0fffa1363eb170ddd51b7f0da49d316552629d4689e2b16be587d47a1fc8ff8b8d17ad031ce45cb3a8f95160428afd7fbcabb4b407e"),hx=(Se(1)<(t&Se(255))<>Se(8)|(t&Se(0xff0000000000))>>Se(24)|(t&Se(0xff000000000000))>>Se(40)|(t&Se(0xff00000000000000))>>Se(56),rCI=t=>(t=(t&Se(65535))<>Se(16),t=(t&Se(16711935))<>Se(8),t),sCI=(t,e)=>(t&Dle)*(e&Dle)&sl,Wx=t=>{if(!t)throw new Error("Assert failed")}});function $I(t,e){if(!Bct.test(t)){let I=e!==void 0?`Invalid UUID for ${e}: ${t}`:`Invalid UUID: ${t}`;throw new Error(I)}return t}function Ple(t){let e=typeof t=="string"?Date.parse(t):t;return Zx({msecs:e,seq:0})}function WCI(t){if(!Bct.test(t))return null;let e=t[14];return parseInt(e,16)}function NCI(t){let e=t.replace(/-/g,""),I=new Uint8Array(16);for(let l=0;l<16;l++)I[l]=parseInt(e.slice(l*2,l*2+2),16);return I}function VCI(t){let e=Array.from(t).map(I=>I.toString(16).padStart(2,"0")).join("");return`${e.slice(0,8)}-${e.slice(8,12)}-${e.slice(12,16)}-${e.slice(16,20)}-${e.slice(20)}`}function RCI(t){let e=YCI.encode(t),I=Uct(e);return Oct(I)}function iT(t,e){let I=`${t}:${e}`,l=RCI(I),n=new Uint8Array(16);if(WCI(t)===7){let c=NCI(t);n.set(c.slice(0,6),0)}else{let c=Date.now();n[0]=c/1099511627776&255,n[1]=c/4294967296&255,n[2]=c/16777216&255,n[3]=c/65536&255,n[4]=c/256&255,n[5]=c&255}return n[6]=112|l[0]&15,n[7]=l[1],n[8]=128|l[2]&63,n.set(l.slice(3,10),9),VCI(n)}var Bct,YCI,$le=g(()=>{o();sT();Sle();zct();Bct=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;YCI=new TextEncoder});var Mct=g(()=>{o();sT();$le()});async function Sct(t){}async function Tct(t,e){}async function _ct(t){return[]}async function Kct(t){return{size:0}}function ene(t){return!1}function Dct(t){return""}var GT,fge=g(()=>{o();GT={join:(...t)=>t.join("/"),dirname:t=>t.split("/").slice(0,-1).join("/")}});function FCI(t,e){return e===null?!1:Date.now()-t.createdAt>e*1e3}var tne,Ine,Ege=g(()=>{o();fge();tne=class{constructor(e={}){Object.defineProperty(this,"cache",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"ttlSeconds",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"refreshIntervalSeconds",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"refreshTimer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_metrics",{enumerable:!0,configurable:!0,writable:!0,value:{hits:0,misses:0,refreshes:0,refreshErrors:0}}),this.configure(e)}get metrics(){return{...this._metrics}}get totalRequests(){return this._metrics.hits+this._metrics.misses}get hitRate(){let e=this.totalRequests;return e>0?this._metrics.hits/e:0}resetMetrics(){this._metrics={hits:0,misses:0,refreshes:0,refreshErrors:0}}get(e,I){if(this.maxSize===0)return;let l=this.cache.get(e);if(!l){this._metrics.misses+=1;return}return this.cache.delete(e),this.cache.set(e,{...l,refreshFunc:I}),this._metrics.hits+=1,l.value}set(e,I,l){if(this.maxSize===0)return;if(this.refreshTimer===void 0&&this.startRefreshLoop(),!this.cache.has(e)&&this.cache.size>=this.maxSize){let a=this.cache.keys().next().value;a!==void 0&&this.cache.delete(a)}let n={value:I,createdAt:Date.now(),refreshFunc:l};this.cache.delete(e),this.cache.set(e,n)}invalidate(e){this.cache.delete(e)}clear(){this.cache.clear()}get size(){return this.cache.size}stop(){this.refreshTimer&&(clearInterval(this.refreshTimer),this.refreshTimer=void 0)}dump(e){let I={};for(let[a,c]of this.cache.entries())I[a]=c.value;let l=GT.dirname(e);ene(l)||void 0;let n=`${e}.tmp`;try{JSON.stringify({entries:I},null,2)}catch(a){throw ene(n)&&void 0,a}}load(e){if(!ene(e))return 0;let I;try{let a=Dct(e);I=JSON.parse(a).entries??null}catch{return 0}if(!I)return 0;let l=0,n=Date.now();for(let[a,c]of Object.entries(I)){if(this.cache.size>=this.maxSize)break;let r={value:c,createdAt:n};this.cache.set(a,r),l+=1}return l}startRefreshLoop(){this.stop(),this.ttlSeconds!==null&&(this.refreshTimer=setInterval(()=>{this.refreshStaleEntries().catch(e=>{console.warn("Unexpected error in cache refresh loop:",e)})},this.refreshIntervalSeconds*1e3),this.refreshTimer.unref&&this.refreshTimer.unref())}getStaleEntries(){let e=[];for(let[I,l]of this.cache.entries())FCI(l,this.ttlSeconds)&&e.push([I,l]);return e}async refreshStaleEntries(){let e=this.getStaleEntries();if(e.length!==0){for(let[I,l]of e)if(l.refreshFunc!==void 0)try{let n=await l.refreshFunc();this.set(I,n,l.refreshFunc),this._metrics.refreshes+=1}catch(n){this._metrics.refreshErrors+=1,console.warn(`Failed to refresh cache entry ${I}:`,n)}}}configure(e){this.stop(),this.refreshIntervalSeconds=e.refreshIntervalSeconds??60,this.maxSize=e.maxSize??100,this.ttlSeconds=e.ttlSeconds??5*60}},Ine=new tne});var lne,nne=g(()=>{o();Jge();Cge();gge();vge();Mct();Ege();lne="0.5.25"});function ane(){if(Lge===void 0){let t=xge(),e=HCI();Lge={library:"langsmith",runtime:t,sdk:"langsmith-js",sdk_version:lne,...e}}return Lge}function jge(){let t=wCI(),e={},I=["LANGCHAIN_API_KEY","LANGCHAIN_ENDPOINT","LANGCHAIN_TRACING_V2","LANGCHAIN_PROJECT","LANGCHAIN_SESSION","LANGSMITH_API_KEY","LANGSMITH_ENDPOINT","LANGSMITH_TRACING_V2","LANGSMITH_PROJECT","LANGSMITH_SESSION"];for(let[l,n]of Object.entries(t))typeof n=="string"&&!I.includes(l)&&!l.toLowerCase().includes("key")&&!l.toLowerCase().includes("secret")&&!l.toLowerCase().includes("token")&&(l==="LANGCHAIN_REVISION_ID"?e.revision_id=n:e[l]=n);return e}function wCI(){let t={};try{if(typeof process<"u"&&process.env)for(let[e,I]of Object.entries(process.env))(e.startsWith("LANGCHAIN_")||e.startsWith("LANGSMITH_"))&&I!=null&&((e.toLowerCase().includes("key")||e.toLowerCase().includes("secret")||e.toLowerCase().includes("token"))&&typeof I=="string"?t[e]=I.slice(0,2)+"*".repeat(I.length-4)+I.slice(-2):t[e]=I)}catch{}return t}function $m(t){try{return typeof process<"u"?process.env?.[t]:void 0}catch{return}}function ra(t){return $m(`LANGSMITH_${t}`)||$m(`LANGCHAIN_${t}`)}function HCI(){if(kge!==void 0)return kge;let t=["VERCEL_GIT_COMMIT_SHA","NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA","COMMIT_REF","RENDER_GIT_COMMIT","CI_COMMIT_SHA","CIRCLE_SHA1","CF_PAGES_COMMIT_SHA","REACT_APP_GIT_SHA","SOURCE_VERSION","GITHUB_SHA","TRAVIS_COMMIT","GIT_COMMIT","BUILD_VCS_NUMBER","bamboo_planRepository_revision","Build.SourceVersion","BITBUCKET_COMMIT","DRONE_COMMIT_SHA","SEMAPHORE_GIT_SHA","BUILDKITE_COMMIT"],e={};for(let I of t){let l=$m(I);l!==void 0&&(e[I]=l)}return kge=e,e}function qct(){return $m("OTEL_ENABLED")==="true"||ra("OTEL_ENABLED")==="true"}function cne(t){if(t!==void 0)return t;let e=ra("TRACING_MODE");if(e!==void 0&&e!==""){let I=e.toLowerCase();if(!Pct.has(I))throw new Error(`Invalid LANGSMITH_TRACING_MODE=${JSON.stringify(e)}. Must be one of: ${[...Pct].sort().join(", ")}`);return qct()&&console.warn("Both LANGSMITH_TRACING_MODE and the legacy OTEL_ENABLED / LANGSMITH_OTEL_ENABLED env vars are set. LANGSMITH_TRACING_MODE takes precedence."),I}return qct()?"otel":"langsmith"}var LA,XCI,gCI,vCI,$ct,yCI,xge,Lge,kge,Pct,VX=g(()=>{o();nne();XCI=()=>typeof window<"u"&&typeof window.document<"u",gCI=()=>typeof globalThis=="object"&&globalThis.constructor&&globalThis.constructor.name==="DedicatedWorkerGlobalScope",vCI=()=>typeof window<"u"&&window.name==="nodejs"||typeof navigator<"u"&&navigator.userAgent.includes("jsdom"),$ct=()=>typeof Deno<"u",yCI=()=>typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"&&!$ct(),xge=()=>LA||(typeof Bun<"u"?LA="bun":XCI()?LA="browser":yCI()?LA="node":gCI()?LA="webworker":vCI()?LA="jsdom":$ct()?LA="deno":LA="other",LA);Pct=new Set(["langsmith","otel"])});function rne(){return Tge.getTraceInstance()}function trt(){return Tge.getContextInstance()}function Irt(){return Tge.getDefaultOTLPTracerComponents()}var zge,Bge,Mge,Uge,Oge,ert,QCI,fCI,Sge,Tge,_ge=g(()=>{o();VX();zge=class{constructor(){Object.defineProperty(this,"hasWarned",{enumerable:!0,configurable:!0,writable:!0,value:!1})}startActiveSpan(e,...I){!this.hasWarned&&cne()==="otel"&&(console.warn('OTel tracing mode is active (via LANGSMITH_TRACING_MODE, OTEL_ENABLED, or LANGSMITH_OTEL_ENABLED), but the required OTEL instances have not been initialized. Please add:\n```\nimport { initializeOTEL } from "langsmith/experimental/otel/setup";\ninitializeOTEL();\n```\nat the beginning of your code.'),this.hasWarned=!0);let l;if(I.length===1&&typeof I[0]=="function"?l=I[0]:I.length===2&&typeof I[1]=="function"?l=I[1]:I.length===3&&typeof I[2]=="function"&&(l=I[2]),typeof l=="function")return l()}},Bge=class{constructor(){Object.defineProperty(this,"mockTracer",{enumerable:!0,configurable:!0,writable:!0,value:new zge})}getTracer(e,I){return this.mockTracer}getActiveSpan(){}setSpan(e,I){return e}getSpan(e){}setSpanContext(e,I){return e}getTracerProvider(){}setGlobalTracerProvider(e){return!1}},Mge=class{active(){return{}}with(e,I){return I()}},Uge=Symbol.for("ls:otel_trace"),Oge=Symbol.for("ls:otel_context"),ert=Symbol.for("ls:otel_get_default_otlp_tracer_provider"),QCI=new Bge,fCI=new Mge,Sge=class{getTraceInstance(){return globalThis[Uge]??QCI}getContextInstance(){return globalThis[Oge]??fCI}initializeGlobalInstances(e){globalThis[Uge]===void 0&&(globalThis[Uge]=e.trace),globalThis[Oge]===void 0&&(globalThis[Oge]=e.context)}setDefaultOTLPTracerComponents(e){globalThis[ert]=e}getDefaultOTLPTracerComponents(){return globalThis[ert]??void 0}},Tge=new Sge});function JCI(t){return ECI[t]||t}var ECI,sne,lrt=g(()=>{o();gct();_ge();ECI={llm:"chat",tool:"execute_tool",retriever:"embeddings",embedding:"embeddings",prompt:"chat"};sne=class{constructor(){Object.defineProperty(this,"spans",{enumerable:!0,configurable:!0,writable:!0,value:new Map})}exportBatch(e,I){for(let l of e)try{if(!l.run)continue;if(l.operation==="post"){let n=this.createSpanForRun(l,l.run,I.get(l.id));n&&!l.run.end_time&&this.spans.set(l.id,n)}else this.updateSpanForRun(l,l.run)}catch(n){console.error(`Error processing operation ${l.id}:`,n)}}createSpanForRun(e,I,l){let n=l&&rne().getSpan(l);if(n)try{return this.finishSpanSetup(n,I,e)}catch(a){console.error(`Failed to create span for run ${e.id}:`,a);return}}finishSpanSetup(e,I,l){return this.setSpanAttributes(e,I,l),I.error?(e.setStatus({code:2}),e.recordException(new Error(I.error))):e.setStatus({code:1}),I.end_time&&e.end(new Date(I.end_time)),e}updateSpanForRun(e,I){try{let l=this.spans.get(e.id);if(!l){console.debug(`No span found for run ${e.id} during update`);return}this.setSpanAttributes(l,I,e),I.error?(l.setStatus({code:2}),l.recordException(new Error(I.error))):l.setStatus({code:1});let n=I.end_time;n&&(l.end(new Date(n)),this.spans.delete(e.id))}catch(l){console.error(`Failed to update span for run ${e.id}:`,l)}}extractModelName(e){if(e.extra?.metadata){let I=e.extra.metadata;if(I.ls_model_name)return I.ls_model_name;if(I.invocation_params){let l=I.invocation_params;if(l.model)return l.model;if(l.model_name)return l.model_name}}}setSpanAttributes(e,I,l){if("run_type"in I&&I.run_type){e.setAttribute(Yct,I.run_type);let r=JCI(I.run_type||"chain");e.setAttribute($at,r)}"name"in I&&I.name&&e.setAttribute(Rct,I.name),"session_id"in I&&I.session_id&&e.setAttribute(Nct,I.session_id),"session_name"in I&&I.session_name&&e.setAttribute(Vct,I.session_name),this.setGenAiSystem(e,I);let n=this.extractModelName(I);n&&e.setAttribute(Yge,n),"prompt_tokens"in I&&typeof I.prompt_tokens=="number"&&e.setAttribute(Rge,I.prompt_tokens),"completion_tokens"in I&&typeof I.completion_tokens=="number"&&e.setAttribute(Age,I.completion_tokens),"total_tokens"in I&&typeof I.total_tokens=="number"&&e.setAttribute(Fge,I.total_tokens),this.setInvocationParameters(e,I);let a=I.extra?.metadata||{};for(let[r,s]of Object.entries(a))s!=null&&e.setAttribute(`${Act}.${r}`,String(s));let c=I.tags;if(c&&Array.isArray(c)?e.setAttribute(Xge,c.join(", ")):c&&e.setAttribute(Xge,String(c)),"serialized"in I&&typeof I.serialized=="object"){let r=I.serialized;r.name&&e.setAttribute(dct,String(r.name)),r.signature&&e.setAttribute(uct,String(r.signature)),r.doc&&e.setAttribute(bct,String(r.doc))}this.setIOAttributes(e,l)}setGenAiSystem(e,I){let l="langchain",n=this.extractModelName(I);if(n){let a=n.toLowerCase();a.includes("anthropic")||a.startsWith("claude")?l="anthropic":a.includes("bedrock")?l="aws.bedrock":a.includes("azure")&&a.includes("openai")?l="az.ai.openai":a.includes("azure")&&a.includes("inference")?l="az.ai.inference":a.includes("cohere")?l="cohere":a.includes("deepseek")?l="deepseek":a.includes("gemini")?l="gemini":a.includes("groq")?l="groq":a.includes("watson")||a.includes("ibm")?l="ibm.watsonx.ai":a.includes("mistral")?l="mistral_ai":a.includes("gpt")||a.includes("openai")?l="openai":a.includes("perplexity")||a.includes("sonar")?l="perplexity":a.includes("vertex")?l="vertex_ai":(a.includes("xai")||a.includes("grok"))&&(l="xai")}e.setAttribute(ect,l)}setInvocationParameters(e,I){if(!I.extra?.metadata?.invocation_params)return;let l=I.extra.metadata.invocation_params;l.max_tokens!==void 0&&e.setAttribute(Ict,l.max_tokens),l.temperature!==void 0&&e.setAttribute(lct,l.temperature),l.top_p!==void 0&&e.setAttribute(nct,l.top_p),l.frequency_penalty!==void 0&&e.setAttribute(act,l.frequency_penalty),l.presence_penalty!==void 0&&e.setAttribute(cct,l.presence_penalty)}setIOAttributes(e,I){if(I.run.inputs)try{let l=I.run.inputs;typeof l=="object"&&l!==null&&(l.model&&Array.isArray(l.messages)&&e.setAttribute(Yge,l.model),l.stream!==void 0&&e.setAttribute(Fct,l.stream),l.extra_headers&&e.setAttribute(Xct,JSON.stringify(l.extra_headers)),l.extra_query&&e.setAttribute(ict,JSON.stringify(l.extra_query)),l.extra_body&&e.setAttribute(Gct,JSON.stringify(l.extra_body))),e.setAttribute(sct,JSON.stringify(l))}catch(l){console.debug(`Failed to process inputs for run ${I.id}`,l)}if(I.run.outputs)try{let l=I.run.outputs,n=this.getUnifiedRunTokens(l);if(n&&(e.setAttribute(Rge,n[0]),e.setAttribute(Age,n[1]),e.setAttribute(Fge,n[0]+n[1])),l&&typeof l=="object"){if(l.model&&e.setAttribute(tct,String(l.model)),l.id&&e.setAttribute(mct,l.id),l.choices&&Array.isArray(l.choices)){let a=l.choices.map(c=>c.finish_reason).filter(c=>c).map(String);a.length>0&&e.setAttribute(rct,a.join(", "))}if(l.service_tier&&e.setAttribute(Zct,l.service_tier),l.system_fingerprint&&e.setAttribute(pct,l.system_fingerprint),l.usage_metadata&&typeof l.usage_metadata=="object"){let a=l.usage_metadata;a.input_token_details&&e.setAttribute(hct,JSON.stringify(a.input_token_details)),a.output_token_details&&e.setAttribute(Wct,JSON.stringify(a.output_token_details))}}e.setAttribute(oct,JSON.stringify(l))}catch(l){console.debug(`Failed to process outputs for run ${I.id}`,l)}}getUnifiedRunTokens(e){if(!e)return null;let I=this.extractUnifiedRunTokens(e.usage_metadata);if(I)return I;let l=Object.keys(e);for(let c of l){let r=e[c];if(!(!r||typeof r!="object")&&(I=this.extractUnifiedRunTokens(r.usage_metadata),I||r.lc===1&&r.kwargs&&typeof r.kwargs=="object"&&(I=this.extractUnifiedRunTokens(r.kwargs.usage_metadata),I)))return I}let n=e.generations||[];if(!Array.isArray(n))return null;let a=Array.isArray(n[0])?n.flat():n;for(let c of a)if(typeof c=="object"&&c.message&&typeof c.message=="object"&&c.message.kwargs&&typeof c.message.kwargs=="object"&&(I=this.extractUnifiedRunTokens(c.message.kwargs.usage_metadata),I))return I;return null}extractUnifiedRunTokens(e){return!e||typeof e!="object"||typeof e.input_tokens!="number"||typeof e.output_tokens!="number"?null:[e.input_tokens,e.output_tokens]}}});function Kge(t){if(!(t&&LCI(t)&&t.name==="TypeError"&&typeof t.message=="string"))return!1;let{message:I,stack:l}=t;return I==="Load failed"?l===void 0||"__sentry_captured__"in t:I.startsWith("error sending request for url")?!0:kCI.has(I)}var CCI,LCI,kCI,nrt=g(()=>{o();CCI=Object.prototype.toString,LCI=t=>CCI.call(t)==="[object Error]",kCI=new Set(["network error","Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed","fetch failed","terminated"," A network error occurred.","Network connection lost"])});function xCI(t){if(typeof t=="number"){if(t<0)throw new TypeError("Expected `retries` to be a non-negative number.");if(Number.isNaN(t))throw new TypeError("Expected `retries` to be a valid number or Infinity, got NaN.")}else if(t!==void 0)throw new TypeError("Expected `retries` to be a number or Infinity.")}function one(t,e,{min:I=0,allowInfinity:l=!1}={}){if(e!==void 0){if(typeof e!="number"||Number.isNaN(e))throw new TypeError(`Expected \`${t}\` to be a number${l?" or Infinity":""}.`);if(!l&&!Number.isFinite(e))throw new TypeError(`Expected \`${t}\` to be a finite number.`);if(e0&&await new Promise((b,Z)=>{let p=()=>{clearTimeout(W),n.signal?.removeEventListener("abort",p),Z(n.signal.reason)},W=setTimeout(()=>{n.signal?.removeEventListener("abort",p),b()},u);n.unref&&W.unref?.(),n.signal?.addEventListener("abort",p,{once:!0})}),n.signal?.throwIfAborted(),!0}async function qge(t,e={}){if(e={...e},xCI(e.retries),Object.hasOwn(e,"forever"))throw new Error("The `forever` option is no longer supported. For many use-cases, you can set `retries: Infinity` instead.");e.retries??=10,e.factor??=2,e.minTimeout??=1e3,e.maxTimeout??=Number.POSITIVE_INFINITY,e.maxRetryTime??=Number.POSITIVE_INFINITY,e.randomize??=!1,e.onFailedAttempt??=()=>{},e.shouldRetry??=()=>!0,e.shouldConsumeRetry??=()=>!0,one("factor",e.factor,{min:0,allowInfinity:!1}),one("minTimeout",e.minTimeout,{min:0,allowInfinity:!1}),one("maxTimeout",e.maxTimeout,{min:0,allowInfinity:!0}),one("maxRetryTime",e.maxRetryTime,{min:0,allowInfinity:!0}),e.factor>0||(e.factor=1),e.signal?.throwIfAborted();let I=0,l=0,n=performance.now();for(;!Number.isFinite(e.retries)||l<=e.retries;){I++;try{e.signal?.throwIfAborted();let a=await t(I);return e.signal?.throwIfAborted(),a}catch(a){await UCI({error:a,attemptNumber:I,retriesConsumed:l,startTime:n,options:e})&&l++}}throw new Error("Retry attempts exhausted without throwing an error.")}var Dge,crt=g(()=>{o();nrt();Dge=class extends Error{constructor(e){super(),e instanceof Error?(this.originalError=e,{message:e}=e):(this.originalError=new Error(e),this.originalError.stack=this.stack),this.name="AbortError",this.message=e}}});var $ge=Y((oma,Pge)=>{"use strict";o();var OCI=Object.prototype.hasOwnProperty,Uu="~";function dT(){}Object.create&&(dT.prototype=Object.create(null),new dT().__proto__||(Uu=!1));function zCI(t,e,I){this.fn=t,this.context=e,this.once=I||!1}function rrt(t,e,I,l,n){if(typeof I!="function")throw new TypeError("The listener must be a function");var a=new zCI(I,l||t,n),c=Uu?Uu+e:e;return t._events[c]?t._events[c].fn?t._events[c]=[t._events[c],a]:t._events[c].push(a):(t._events[c]=a,t._eventsCount++),t}function ine(t,e){--t._eventsCount===0?t._events=new dT:delete t._events[e]}function IG(){this._events=new dT,this._eventsCount=0}IG.prototype.eventNames=function(){var e=[],I,l;if(this._eventsCount===0)return e;for(l in I=this._events)OCI.call(I,l)&&e.push(Uu?l.slice(1):l);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(I)):e};IG.prototype.listeners=function(e){var I=Uu?Uu+e:e,l=this._events[I];if(!l)return[];if(l.fn)return[l.fn];for(var n=0,a=l.length,c=new Array(a);n{"use strict";o();srt.exports=(t,e)=>(e=e||(()=>{}),t.then(I=>new Promise(l=>{l(e())}).then(()=>I),I=>new Promise(l=>{l(e())}).then(()=>{throw I})))});var Grt=Y((uma,dne)=>{"use strict";o();var BCI=ort(),Gne=class extends Error{constructor(e){super(e),this.name="TimeoutError"}},irt=(t,e,I)=>new Promise((l,n)=>{if(typeof e!="number"||e<0)throw new TypeError("Expected `milliseconds` to be a positive number");if(e===1/0){l(t);return}let a=setTimeout(()=>{if(typeof I=="function"){try{l(I())}catch(s){n(s)}return}let c=typeof I=="string"?I:`Promise timed out after ${e} milliseconds`,r=I instanceof Error?I:new Gne(c);typeof t.cancel=="function"&&t.cancel(),n(r)},e);BCI(t.then(l,n),()=>{clearTimeout(a)})});dne.exports=irt;dne.exports.default=irt;dne.exports.TimeoutError=Gne});var drt=Y(eve=>{"use strict";o();Object.defineProperty(eve,"__esModule",{value:!0});function MCI(t,e,I){let l=0,n=t.length;for(;n>0;){let a=n/2|0,c=l+a;I(t[c],e)<=0?(l=++c,n-=a+1):n=a}return l}eve.default=MCI});var urt=Y(Ive=>{"use strict";o();Object.defineProperty(Ive,"__esModule",{value:!0});var SCI=drt(),tve=class{constructor(){this._queue=[]}enqueue(e,I){I=Object.assign({priority:0},I);let l={priority:I.priority,run:e};if(this.size&&this._queue[this.size-1].priority>=I.priority){this._queue.push(l);return}let n=SCI.default(this._queue,l,(a,c)=>c.priority-a.priority);this._queue.splice(n,0,l)}dequeue(){let e=this._queue.shift();return e?.run}filter(e){return this._queue.filter(I=>I.priority===e.priority).map(I=>I.run)}get size(){return this._queue.length}};Ive.default=tve});var bne=Y(nve=>{"use strict";o();Object.defineProperty(nve,"__esModule",{value:!0});var TCI=$ge(),brt=Grt(),_CI=urt(),une=()=>{},KCI=new brt.TimeoutError,lve=class extends TCI{constructor(e){var I,l,n,a;if(super(),this._intervalCount=0,this._intervalEnd=0,this._pendingCount=0,this._resolveEmpty=une,this._resolveIdle=une,e=Object.assign({carryoverConcurrencyCount:!1,intervalCap:1/0,interval:0,concurrency:1/0,autoStart:!0,queueClass:_CI.default},e),!(typeof e.intervalCap=="number"&&e.intervalCap>=1))throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${(l=(I=e.intervalCap)===null||I===void 0?void 0:I.toString())!==null&&l!==void 0?l:""}\` (${typeof e.intervalCap})`);if(e.interval===void 0||!(Number.isFinite(e.interval)&&e.interval>=0))throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${(a=(n=e.interval)===null||n===void 0?void 0:n.toString())!==null&&a!==void 0?a:""}\` (${typeof e.interval})`);this._carryoverConcurrencyCount=e.carryoverConcurrencyCount,this._isIntervalIgnored=e.intervalCap===1/0||e.interval===0,this._intervalCap=e.intervalCap,this._interval=e.interval,this._queue=new e.queueClass,this._queueClass=e.queueClass,this.concurrency=e.concurrency,this._timeout=e.timeout,this._throwOnTimeout=e.throwOnTimeout===!0,this._isPaused=e.autoStart===!1}get _doesIntervalAllowAnother(){return this._isIntervalIgnored||this._intervalCount{this._onResumeInterval()},I)),!0}return!1}_tryToStartAnother(){if(this._queue.size===0)return this._intervalId&&clearInterval(this._intervalId),this._intervalId=void 0,this._resolvePromises(),!1;if(!this._isPaused){let e=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother){let I=this._queue.dequeue();return I?(this.emit("active"),I(),e&&this._initializeIntervalIfNeeded(),!0):!1}}return!1}_initializeIntervalIfNeeded(){this._isIntervalIgnored||this._intervalId!==void 0||(this._intervalId=setInterval(()=>{this._onInterval()},this._interval),this._intervalEnd=Date.now()+this._interval)}_onInterval(){this._intervalCount===0&&this._pendingCount===0&&this._intervalId&&(clearInterval(this._intervalId),this._intervalId=void 0),this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0,this._processQueue()}_processQueue(){for(;this._tryToStartAnother(););}get concurrency(){return this._concurrency}set concurrency(e){if(!(typeof e=="number"&&e>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`);this._concurrency=e,this._processQueue()}async add(e,I={}){return new Promise((l,n)=>{let a=async()=>{this._pendingCount++,this._intervalCount++;try{let c=this._timeout===void 0&&I.timeout===void 0?e():brt.default(Promise.resolve(e()),I.timeout===void 0?this._timeout:I.timeout,()=>{(I.throwOnTimeout===void 0?this._throwOnTimeout:I.throwOnTimeout)&&n(KCI)});l(await c)}catch(c){n(c)}this._next()};this._queue.enqueue(a,I),this._tryToStartAnother(),this.emit("add")})}async addAll(e,I){return Promise.all(e.map(async l=>this.add(l,I)))}start(){return this._isPaused?(this._isPaused=!1,this._processQueue(),this):this}pause(){this._isPaused=!0}clear(){this._queue=new this._queueClass}async onEmpty(){if(this._queue.size!==0)return new Promise(e=>{let I=this._resolveEmpty;this._resolveEmpty=()=>{I(),e()}})}async onIdle(){if(!(this._pendingCount===0&&this._queue.size===0))return new Promise(e=>{let I=this._resolveIdle;this._resolveIdle=()=>{I(),e()}})}get size(){return this._queue.size}sizeBy(e){return this._queue.filter(e).length}get pending(){return this._pendingCount}get isPaused(){return this._isPaused}get timeout(){return this._timeout}set timeout(e){this._timeout=e}};nve.default=lve});var mne,mrt,Zrt=g(()=>{o();mne=z(bne(),1),mrt="default"in mne.default?mne.default.default:mne.default});var DCI,uT,prt=g(()=>{o();crt();Zrt();DCI=[408,425,429,500,502,503,504],uT=class{constructor(e){Object.defineProperty(this,"maxConcurrency",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"maxRetries",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"maxQueueSizeBytes",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"queue",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"onFailedResponseHook",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"queueSizeBytes",{enumerable:!0,configurable:!0,writable:!0,value:0}),this.maxConcurrency=e.maxConcurrency??1/0,this.maxRetries=e.maxRetries??6,this.maxQueueSizeBytes=e.maxQueueSizeBytes,this.queue=new mrt({concurrency:this.maxConcurrency}),this.onFailedResponseHook=e?.onFailedResponseHook}call(e,...I){return this.callWithOptions({},e,...I)}callWithOptions(e,I,...l){let n=e.sizeBytes??0;if(this.maxQueueSizeBytes!==void 0&&n>0&&this.queueSizeBytes+n>this.maxQueueSizeBytes)return Promise.reject(new Error(`Queue size limit (${this.maxQueueSizeBytes} bytes) exceeded. Current queue size: ${this.queueSizeBytes} bytes, attempted addition: ${n} bytes.`));n>0&&(this.queueSizeBytes+=n);let a=this.onFailedResponseHook,c=this.queue.add(()=>qge(()=>I(...l).catch(r=>{throw r instanceof Error?r:new Error(r)}),{async onFailedAttempt({error:r}){if(typeof r!="object"||r==null)throw r;let s="message"in r&&typeof r.message=="string"?r.message:void 0;if(s?.startsWith("Cancel")||s?.startsWith("TimeoutError")||s?.startsWith("AbortError")||"name"in r&&r.name==="TimeoutError"||"code"in r&&r.code==="ECONNABORTED")throw r;let i="response"in r?r.response:void 0;if(a&&await a(i))return;let G=i?.status??("status"in r?r.status:void 0);if(G!=null&&(typeof G=="number"||typeof G=="string")&&!DCI.includes(+G))throw r},retries:this.maxRetries,randomize:!0}),{throwOnTimeout:!0});return n>0&&(c=c.finally(()=>{this.queueSizeBytes-=n})),e.signal?Promise.race([c,new Promise((r,s)=>{e.signal?.addEventListener("abort",()=>{s(new Error("AbortError"))})})]):c}}});function ave(t){return typeof t?._getType=="function"}function cve(t){let e={type:t._getType(),data:{content:t.content}};return t?.additional_kwargs&&Object.keys(t.additional_kwargs).length>0&&(e.data.additional_kwargs={...t.additional_kwargs}),e}var hrt=g(()=>{o()});function pne(t){return`Invalid prompt identifier format: "${t}". Expected one of: + - "prompt-name" (for private prompts) + - "owner/prompt-name" (for prompts with explicit owner) + - "prompt-name:commit-hash" (with commit reference) + - "owner/prompt-name:commit-hash" (with owner and commit)`}function hne(t){return t!=null&&typeof t=="object"&&"name"in t&&t?.name==="LangSmithNotFoundError"}function Wrt(t){return t!=null&&typeof t=="object"&&"name"in t&&t?.name==="LangSmithConflictError"}async function Lt(t,e,I){let l;if(t.ok){I&&(l=await t.text());return}if(t.status===403)try{(await t.json())?.error==="org_scoped_key_requires_workspace"&&(l="This API key is org-scoped and requires workspace specification. Please provide 'workspaceId' parameter, or set LANGSMITH_WORKSPACE_ID environment variable.")}catch{let r=new Error(`${t.status} ${t.statusText}`);throw r.status=t?.status,r}if(l===void 0)try{l=await t.text()}catch{l=""}let n=`Failed to ${e}. Received status [${t.status}]: ${t.statusText}. Message: ${l}`;if(t.status===404)throw new sve(n);if(t.status===409)throw new rve(n);let a=new Error(n);throw a.status=t.status,a}function Vrt(t){return typeof t=="object"&&t!==null&&t.code===Nrt}var rve,sve,Nrt,Zne,Wne=g(()=>{o();rve=class extends Error{constructor(e){super(e),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="LangSmithConflictError",this.status=409}},sve=class extends Error{constructor(e){super(e),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="LangSmithNotFoundError",this.status=404}};Nrt="ERR_CONFLICTING_ENDPOINTS",Zne=class extends Error{constructor(){super("You cannot provide both LANGSMITH_ENDPOINT / LANGCHAIN_ENDPOINT and LANGSMITH_RUNS_ENDPOINTS."),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:Nrt}),this.name="ConflictingEndpointsError"}}});function Ou(t){if(!t||t.split("/").length>2||t.startsWith("/")||t.endsWith("/")||t.split(":").length>2)throw new Error(pne(t));let[e,I]=t.split(":"),l=I||"latest";if(e.includes("/")){let[n,a]=e.split("/",2);if(!n||!a)throw new Error(pne(t));return[n,a,l]}else{if(!e)throw new Error(pne(t));return["-",e,l]}}var Yrt=g(()=>{o();Wne()});function $CI(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function Nne(t){return PCI.encode(t)}function Art(t){if(t&&typeof t=="object"&&t!==null){if(t instanceof Map)return Object.fromEntries(t);if(t instanceof Set)return Array.from(t);if(t instanceof Date)return t.toISOString();if(t instanceof RegExp)return t.toString();if(t instanceof Error)return{name:t.name,message:t.message}}else if(typeof t=="bigint")return t.toString();return t}function e5I(t){return function(e,I){if(t){let l=t.call(this,e,I);if(l!==void 0)return l}return Art(I)}}function Frt(t){try{let n=function(G){let d=l(G);return d>I&&(I=d),d+2},a=function(G){return G===0?2:2+G*4},c=function(G){return G===void 0||typeof G=="function"||typeof G=="symbol"},r=function(G){return G===void 0||typeof G=="function"||typeof G=="symbol"?4:s(G)},s=function(G){if(G===null)return 4;if(G===void 0)return 0;let d=typeof G;if(d==="boolean")return 5;if(d==="number")return Number.isFinite(G)?G.toString().length:4;if(d==="bigint")return G.toString().length+2;if(d==="string")return n(G);if(d==="function"||d==="symbol")return 0;let u=G;if(u instanceof Date)return 26;if(u instanceof RegExp)return l(u.toString())+2;if(u instanceof Error){let Z=u.name??"",p=u.message??"";return 22+l(Z)+l(p)}if(typeof m.Buffer<"u"&&u instanceof m.Buffer)return 28+a(u.byteLength);if(ArrayBuffer.isView(u)){if(u instanceof DataView)return 2;let Z=u.length??0,W=u instanceof Float32Array||u instanceof Float64Array?30:12;return 2+Z*W}if(u instanceof ArrayBuffer)return 2;if(e.has(u))return 24;if(typeof u.toJSON=="function"){let Z;try{Z=u.toJSON("")}catch{return 16}e.add(u);let p=s(Z);return e.delete(u),p}e.add(u);let b;if(Array.isArray(u)){b=2;let Z=u.length;for(let p=0;p0&&(b+=1);let h=typeof p=="string"?p:String(p);b+=l(h)+3,b+=s(W),Z++}}else if(u instanceof Set){b=2;let Z=0;for(let p of u)Z>0&&(b+=1),b+=r(p),Z++}else{b=2;let Z=0,p=Object.keys(u);for(let W=0;W0&&(b+=1),b+=l(h)+3,b+=s(N),Z++)}}return e.delete(u),b},e=new Set,I=0,l=typeof m.Buffer<"u"&&typeof m.Buffer.byteLength=="function"?G=>m.Buffer.byteLength(G,"utf8"):G=>G.length;return{size:s(t),maxStringLen:I}}catch{return{size:Wi(t).length,maxStringLen:0}}}function Wi(t,e,I,l,n){try{let a=JSON.stringify(t,e5I(I),l);return Nne(a)}catch(a){if(!a.message?.includes("Converting circular structure to JSON"))return console.warn(`[WARNING]: LangSmith received unserializable value.${e?` +Context: ${e}`:""}`),Nne("[Unserializable]");ra("SUPPRESS_CIRCULAR_JSON_WARNINGS")!=="true"&&console.warn(`[WARNING]: LangSmith received circular JSON. This will decrease tracer performance. ${e?` +Context: ${e}`:""}`),typeof n>"u"&&(n=$CI()),ive(t,"",0,[],void 0,0,n);let c;try{Nx.length===0?c=JSON.stringify(t,I,l):c=JSON.stringify(t,t5I(I),l)}catch{return Nne("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;Vne.length!==0;){let r=Vne.pop();r.length===4?Object.defineProperty(r[0],r[1],r[3]):r[0][r[1]]=r[2]}}return Nne(c)}}function ove(t,e,I,l){var n=Object.getOwnPropertyDescriptor(l,I);n.get!==void 0?n.configurable?(Object.defineProperty(l,I,{value:t}),Vne.push([l,I,e,n])):Nx.push([e,I,t]):(l[I]=t,Vne.push([l,I,e]))}function ive(t,e,I,l,n,a,c){a+=1;var r;if(typeof t=="object"&&t!==null){for(r=0;rc.depthLimit){ove(Rrt,t,e,n);return}if(typeof c.edgesLimit<"u"&&I+1>c.edgesLimit){ove(Rrt,t,e,n);return}if(l.push(t),Array.isArray(t))for(r=0;r0)for(var l=0;l{o();VX();Rrt="[...]",qCI={result:"[Circular]"},Vne=[],Nx=[],PCI=new TextEncoder});var grt=g(()=>{o()});function yrt(){return Gve===null&&(Gve=new dve),Gve}function wrt(t,e=n5I,I=a5I){if(t===null||typeof t!="object")return typeof t=="string"&&t.length>=e;let l=[t],n=new Set,a=0;for(;l.length>0;){if(a++>=I)return!1;let c=l.pop();if(c==null)continue;let r=typeof c;if(r==="string"){if(c.length>=e)return!0;continue}if(r!=="object")continue;let s=c;if(n.has(s)||(n.add(s),s instanceof Date||s instanceof RegExp||s instanceof Error||s instanceof ArrayBuffer||ArrayBuffer.isView(s)))continue;if(Array.isArray(s)){for(let G=s.length-1;G>=0;G--)l.push(s[G]);continue}if(s instanceof Map){for(let[,G]of s)l.push(G);continue}if(s instanceof Set){for(let G of s)l.push(G);continue}let i=Object.keys(s);for(let G=i.length-1;G>=0;G--)l.push(s[i[G]])}return!1}var l5I,dve,Gve,n5I,a5I,Hrt=g(()=>{o();grt();l5I=` +const { parentPort } = require("worker_threads"); + +const CIRCULAR_REPLACE_NODE = { result: "[Circular]" }; + +function serializeWellKnownTypes(val) { + if (val && typeof val === "object") { + if (val instanceof Map) return Object.fromEntries(val); + if (val instanceof Set) return Array.from(val); + if (val instanceof Date) return val.toISOString(); + if (val instanceof RegExp) return val.toString(); + if (val instanceof Error) return { name: val.name, message: val.message }; + } else if (typeof val === "bigint") { + return val.toString(); + } + return val; +} + +function defaultReplacer(_key, val) { + return serializeWellKnownTypes(val); +} + +// Decirculate in-place: replace circular refs with { result: "[Circular]" } +// then restore after stringify. Mirrors fast-safe-stringify's decirc(). +const restoreStack = []; +function decirc(val, k, stack, parent) { + if (typeof val === "object" && val !== null) { + for (let i = 0; i < stack.length; i++) { + if (stack[i] === val) { + const orig = parent[k]; + parent[k] = CIRCULAR_REPLACE_NODE; + restoreStack.push([parent, k, orig]); + return; + } + } + stack.push(val); + if (Array.isArray(val)) { + for (let i = 0; i < val.length; i++) decirc(val[i], i, stack, val); + } else { + const normalized = serializeWellKnownTypes(val); + // Only recurse into normalized if it's still an object (arrays/objects), + // else it was replaced with a primitive (e.g. Date -> string). + if (normalized === val) { + const keys = Object.keys(val); + for (let i = 0; i < keys.length; i++) decirc(val[keys[i]], keys[i], stack, val); + } + } + stack.pop(); + } +} + +function serialize(obj) { + try { + return JSON.stringify(obj, defaultReplacer); + } catch (e) { + if (!String(e && e.message).includes("Converting circular structure to JSON")) { + return "[Unserializable]"; + } + decirc(obj, "", [], { "": obj }); + try { + return JSON.stringify(obj, defaultReplacer); + } catch (_) { + return "[unable to serialize, circular reference is too complex to analyze]"; + } finally { + while (restoreStack.length) { + const [p, k, v] = restoreStack.pop(); + p[k] = v; + } + } + } +} + +parentPort.on("message", (msg) => { + const { id, op, payload } = msg; + try { + if (op === "serialize") { + const str = serialize(payload); + const buf = Buffer.from(str, "utf8"); + // Slice into its own ArrayBuffer so we can transfer without dragging + // unrelated bytes from any shared pool buffer. + const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); + parentPort.postMessage({ id, bytes: ab, length: buf.byteLength }, [ab]); + } else if (op === "ping") { + parentPort.postMessage({ id }); + } else { + parentPort.postMessage({ id, error: "unknown op: " + op }); + } + } catch (e) { + parentPort.postMessage({ id, error: String((e && e.message) || e) }); + } +}); +`,dve=class{constructor(){Object.defineProperty(this,"worker",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"nextId",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(this,"pending",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"disabled",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"startPromise",{enumerable:!0,configurable:!0,writable:!0,value:null})}async ensureStarted(){if(this.disabled)return!1;if(this.worker!==null)return!0;if(this.startPromise!==null)return this.startPromise;this.startPromise=this._start();try{return await this.startPromise}finally{this.startPromise=null}}async _start(){if(!!1||null===null)return this.disabled=!0,!1;try{let e=new null(l5I,{eval:!0});return e.on("message",I=>{let l=this.pending.get(I.id);l&&(this.pending.delete(I.id),I.error?l.reject(new Error(I.error)):I.bytes&&typeof I.length=="number"?l.resolve(new Uint8Array(I.bytes,0,I.length)):l.reject(new Error("worker returned malformed message")))}),e.on("error",I=>{for(let[,l]of this.pending)l.reject(I);this.pending.clear(),this.disabled=!0,this.worker=null}),e.on("exit",I=>{for(let[,l]of this.pending)l.reject(new Error(`worker exited with code ${I}`));this.pending.clear(),this.worker=null}),e.unref(),this.worker=e,!0}catch{return this.disabled=!0,!1}}async serialize(e){if(!await this.ensureStarted())return null;let l=this.nextId++;return new Promise((n,a)=>{this.pending.set(l,{resolve:n,reject:a});try{this.worker.postMessage({id:l,op:"serialize",payload:e})}catch(c){this.pending.delete(l),a(c)}})}async terminate(){this.worker&&(await this.worker.terminate(),this.worker=null);for(let[,e]of this.pending)e.reject(new Error("worker terminated"));this.pending.clear()}},Gve=null;n5I=64*1024,a5I=2048});function Qrt(t){return typeof t=="string"&&t.length>0&&!t.includes("Z")&&!t.includes("+")&&!t.includes("-",10)?t+"Z":t}function bT(t){return{...t,start_time:Qrt(t.start_time),end_time:Qrt(t.end_time)}}function frt(t,e,I){if(I)return t;let l=ane(),n=e??jge(),a=t.extra??{},c=a.metadata;return t.extra={...a,runtime:{...l,...a?.runtime},metadata:{...n,...n.revision_id||"revision_id"in t&&t.revision_id?{revision_id:("revision_id"in t?t.revision_id:void 0)??n.revision_id}:{},...c}},t}async function s5I(t){let e=[];for await(let I of t)e.push(I);return e}function Yne(t){if(t!==void 0)return t.trim().replace(/^"(.*)"$/,"$1").replace(/^'(.*)'$/,"$1")}function Ert(t){return typeof t=="number"?Number(t.toFixed(4)):t}function Crt(t){return"dataset_id"in t||"dataset_name"in t}var c5I,r5I,o5I,i5I,Lrt,G5I,d5I,Jrt,uve,Yp,Jge=g(()=>{o();sT();lrt();_ge();prt();hrt();VX();nne();$le();Sle();Yrt();Wne();Ege();fge();gge();Xrt();Hrt();c5I=t=>{let e=t?.toString()??ra("TRACING_SAMPLING_RATE");if(e===void 0)return;let I=parseFloat(e);if(I<0||I>1)throw new Error(`LANGSMITH_TRACING_SAMPLING_RATE must be between 0 and 1 if set. Got: ${I}`);return I},r5I=t=>{let I=t.replace("http://","").replace("https://","").split("/")[0].split(":")[0];return I==="localhost"||I==="127.0.0.1"||I==="::1"};o5I=async t=>{if(t?.status===429){let e=parseInt(t.headers.get("retry-after")??"10",10)*1e3;if(e>0)return await new Promise(I=>setTimeout(I,e)),!0}return!1};i5I=24*1024*1024,Lrt=1024*1024*1024,G5I=1e4,d5I=100,Jrt="https://api.smith.langchain.com",uve=class{constructor(e){Object.defineProperty(this,"items",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"sizeBytes",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"maxSizeBytes",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSizeBytes=e??Lrt}peek(){return this.items[0]}push(e){let I,l=new Promise(a=>{I=a}),n=ra("PERF_OPTIMIZATION")==="true"?Frt(e.item).size:Wi(e.item,`Serializing run with id: ${e.item.id}`).length;return this.sizeBytes+n>this.maxSizeBytes&&this.items.length>0?(console.warn(`AutoBatchQueue size limit (${this.maxSizeBytes} bytes) exceeded. Dropping run with id: ${e.item.id}. Current queue size: ${this.sizeBytes} bytes, attempted addition: ${n} bytes.`),I(),l):(this.items.push({action:e.action,payload:e.item,otelContext:e.otelContext,apiKey:e.apiKey,apiUrl:e.apiUrl,itemPromiseResolve:I,itemPromise:l,size:n}),this.sizeBytes+=n,l)}pop({upToSizeBytes:e,upToSize:I}){if(e<1)throw new Error("Number of bytes to pop off may not be less than 1.");let l=[],n=0;for(;n+(this.peek()?.size??0)0&&l.length0){let a=this.items.shift();l.push(a),n+=a.size,this.sizeBytes-=a.size}return[l.map(a=>({action:a.action,item:a.payload,otelContext:a.otelContext,apiKey:a.apiKey,apiUrl:a.apiUrl,size:a.size})),()=>l.forEach(a=>a.itemPromiseResolve())]}},Yp=class t{get tracingMode(){return this._tracingMode}get _fetch(){return this.fetchImplementation||wct(this.debug)}_trackDrain(e){this._pendingDrains.add(e),e.finally(()=>{this._pendingDrains.delete(e)})}async _serializeBody(e,I){if(!(ra("PERF_OPTIMIZATION")==="true")||this.manualFlushMode)return Wi(e,I);if(!wrt(e))return Wi(e,I);if(this._serializeWorker===void 0&&(this._serializeWorker=yrt()),this._serializeWorker===null)return Wi(e,I);try{let n=await this._serializeWorker.serialize(e);return n===null?(this._serializeWorker=null,Wi(e,I)):n}catch{return Wi(e,I)}}constructor(e={}){Object.defineProperty(this,"apiKey",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"apiUrl",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"webUrl",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"workspaceId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"caller",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"batchIngestCaller",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"timeout_ms",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_tenantId",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"hideInputs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"hideOutputs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"hideMetadata",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"omitTracedRuntimeInfo",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"tracingSampleRate",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"filteredPostUuids",{enumerable:!0,configurable:!0,writable:!0,value:new Set}),Object.defineProperty(this,"autoBatchTracing",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"autoBatchQueue",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"autoBatchTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"autoBatchAggregationDelayMs",{enumerable:!0,configurable:!0,writable:!0,value:250}),Object.defineProperty(this,"batchSizeBytesLimit",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"batchSizeLimit",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"fetchOptions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"settings",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"blockOnRootRunFinalization",{enumerable:!0,configurable:!0,writable:!0,value:$m("LANGSMITH_TRACING_BACKGROUND")==="false"}),Object.defineProperty(this,"traceBatchConcurrency",{enumerable:!0,configurable:!0,writable:!0,value:5}),Object.defineProperty(this,"_serverInfo",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_getServerInfoPromise",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"manualFlushMode",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_serializeWorker",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_pendingDrains",{enumerable:!0,configurable:!0,writable:!0,value:new Set}),Object.defineProperty(this,"langSmithToOTELTranslator",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_tracingMode",{enumerable:!0,configurable:!0,writable:!0,value:"langsmith"}),Object.defineProperty(this,"fetchImplementation",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cachedLSEnvVarsForMetadata",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_promptCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"multipartStreamingDisabled",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_multipartDisabled",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_runCompressionDisabled",{enumerable:!0,configurable:!0,writable:!0,value:ra("DISABLE_RUN_COMPRESSION")==="true"}),Object.defineProperty(this,"failedTracesDir",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"failedTracesMaxBytes",{enumerable:!0,configurable:!0,writable:!0,value:100*1024*1024}),Object.defineProperty(this,"_customHeaders",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"debug",{enumerable:!0,configurable:!0,writable:!0,value:$m("LANGSMITH_DEBUG")==="true"});let I=t.getDefaultClientConfig();if(this.tracingSampleRate=c5I(e.tracingSamplingRate),this.apiUrl=Yne(e.apiUrl??I.apiUrl)??"",this.apiUrl.endsWith("/")&&(this.apiUrl=this.apiUrl.slice(0,-1)),this.apiKey=Yne(e.apiKey??I.apiKey),this.webUrl=Yne(e.webUrl??I.webUrl),this.webUrl?.endsWith("/")&&(this.webUrl=this.webUrl.slice(0,-1)),this.workspaceId=Yne(e.workspaceId??ra("WORKSPACE_ID")),this.timeout_ms=e.timeout_ms??9e4,this.caller=new uT({...e.callerOptions??{},maxRetries:4,debug:e.debug??this.debug}),this.traceBatchConcurrency=e.traceBatchConcurrency??this.traceBatchConcurrency,this.traceBatchConcurrency<1)throw new Error("Trace batch concurrency must be positive.");this.debug=e.debug??this.debug,this.fetchImplementation=e.fetchImplementation,this.failedTracesDir=ra("FAILED_TRACES_DIR")||void 0;let l=ra("FAILED_TRACES_MAX_MB");if(l){let a=parseInt(l,10);Number.isFinite(a)&&a>0&&(this.failedTracesMaxBytes=a*1024*1024)}let n=e.maxIngestMemoryBytes??Lrt;this.batchIngestCaller=new uT({maxRetries:4,maxConcurrency:this.traceBatchConcurrency,maxQueueSizeBytes:n,...e.callerOptions??{},onFailedResponseHook:o5I,debug:e.debug??this.debug}),this.hideInputs=e.hideInputs??e.anonymizer??I.hideInputs,this.hideOutputs=e.hideOutputs??e.anonymizer??I.hideOutputs,this.hideMetadata=e.hideMetadata??I.hideMetadata,this.omitTracedRuntimeInfo=e.omitTracedRuntimeInfo??!1,this.autoBatchTracing=e.autoBatchTracing??this.autoBatchTracing,this.autoBatchQueue=new uve(n),this.blockOnRootRunFinalization=e.blockOnRootRunFinalization??this.blockOnRootRunFinalization,this.batchSizeBytesLimit=e.batchSizeBytesLimit,this.batchSizeLimit=e.batchSizeLimit,this.fetchOptions=e.fetchOptions||{},this.manualFlushMode=e.manualFlushMode??this.manualFlushMode,this._tracingMode=cne(e.tracingMode),this._tracingMode==="otel"&&(this.langSmithToOTELTranslator=new sne),this.cachedLSEnvVarsForMetadata=jge(),e.cache!==void 0&&e.disablePromptCache&&dJ("Both 'cache' and 'disablePromptCache' were provided. The 'cache' parameter is deprecated and will be removed in a future version. Using 'cache' parameter value."),e.cache!==void 0?(dJ("The 'cache' parameter is deprecated and will be removed in a future version. Use 'configureGlobalPromptCache()' to configure the global cache, or 'disablePromptCache: true' to disable caching for this client."),e.cache===!1?this._promptCache=void 0:e.cache===!0?this._promptCache=Ine:this._promptCache=e.cache):e.disablePromptCache||(this._promptCache=Ine),this._customHeaders=e.headers??{}}static getDefaultClientConfig(){let e=ra("API_KEY"),I=ra("ENDPOINT")??Jrt,l=ra("HIDE_INPUTS")==="true",n=ra("HIDE_OUTPUTS")==="true",a=ra("HIDE_METADATA")==="true";return{apiUrl:I,apiKey:e,webUrl:void 0,hideInputs:l,hideOutputs:n,hideMetadata:a}}getHostUrl(){return this.webUrl?this.webUrl:r5I(this.apiUrl)?(this.webUrl="http://localhost:3000",this.webUrl):this.apiUrl.endsWith("/api/v1")?(this.webUrl=this.apiUrl.replace("/api/v1",""),this.webUrl):this.apiUrl.includes("/api")&&!this.apiUrl.split(".",1)[0].endsWith("api")?(this.webUrl=this.apiUrl.replace("/api",""),this.webUrl):this.apiUrl.split(".",1)[0].includes("dev")?(this.webUrl="https://dev.smith.langchain.com",this.webUrl):this.apiUrl.split(".",1)[0].includes("eu")?(this.webUrl="https://eu.smith.langchain.com",this.webUrl):this.apiUrl.split(".",1)[0].includes("aws")?(this.webUrl="https://aws.smith.langchain.com",this.webUrl):this.apiUrl.split(".",1)[0].includes("beta")?(this.webUrl="https://beta.smith.langchain.com",this.webUrl):(this.webUrl="https://smith.langchain.com",this.webUrl)}get _mergedHeaders(){let e={"User-Agent":`langsmith-js/${lne}`,...this._customHeaders};return this.apiKey&&(e["x-api-key"]=`${this.apiKey}`),this.workspaceId&&(e["x-tenant-id"]=this.workspaceId),e}get headers(){return this._customHeaders}set headers(e){this._customHeaders=e??{}}_getPlatformEndpointPath(e){return this.apiUrl.slice(-3)!=="/v1"&&this.apiUrl.slice(-4)!=="/v1/"?`/v1/platform/${e}`:`/platform/${e}`}async processInputs(e){return this.hideInputs===!1?e:this.hideInputs===!0?{}:typeof this.hideInputs=="function"?this.hideInputs(e):e}async processOutputs(e){return this.hideOutputs===!1?e:this.hideOutputs===!0?{}:typeof this.hideOutputs=="function"?this.hideOutputs(e):e}async processMetadata(e){return this.hideMetadata===!1?e:this.hideMetadata===!0?{}:typeof this.hideMetadata=="function"?this.hideMetadata(e):e}_filterNewTokenEvents(e){return!e||e.length===0?e:e.map(I=>{if(I.name==="new_token"){let{kwargs:l,...n}=I;return n}return I})}async prepareRunCreateOrUpdateInputs(e){let I={...e};return I.inputs!==void 0&&(I.inputs=await this.processInputs(I.inputs)),I.outputs!==void 0&&(I.outputs=await this.processOutputs(I.outputs)),I.extra!=null&&"metadata"in I.extra&&(I.extra={...I.extra,metadata:await this.processMetadata(I.extra.metadata)}),I.events!==void 0&&(I.events=this._filterNewTokenEvents(I.events)),I}async _getResponse(e,I){let l=I?.toString()??"",n=`${this.apiUrl}${e}?${l}`;return await this.caller.call(async()=>{let c=await this._fetch(n,{method:"GET",headers:this._mergedHeaders,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});return await Lt(c,`fetch ${e}`),c})}async _get(e,I){return(await this._getResponse(e,I)).json()}async*_getPaginated(e,I=new URLSearchParams,l){let n=Number(I.get("offset"))||0,a=Number(I.get("limit"))||100;for(;;){I.set("offset",String(n)),I.set("limit",String(a));let c=`${this.apiUrl}${e}?${I}`,r=await this.caller.call(async()=>{let i=await this._fetch(c,{method:"GET",headers:this._mergedHeaders,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});return await Lt(i,`fetch ${e}`),i}),s=l?l(await r.json()):await r.json();if(s.length===0||(yield s,s.length{let G=await this._fetch(`${this.apiUrl}${e}`,{method:l,headers:{...this._mergedHeaders,"Content-Type":"application/json"},signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions,body:c});return await Lt(G,`fetch ${e}`),G})).json();if(!s||!s[n])break;yield s[n];let i=s.cursors;if(!i||!i.next)break;a.cursor=i.next}}_shouldSample(){return this.tracingSampleRate===void 0?!0:Math.random()0;){let[n,a]=this.autoBatchQueue.pop({upToSizeBytes:e,upToSize:I});if(!n.length){a();break}let c=n.reduce((i,G)=>{let d=G.apiUrl??this.apiUrl,u=G.apiKey??this.apiKey,Z=G.apiKey===this.apiKey&&G.apiUrl===this.apiUrl?"default":`${d}|${u}`;return i[Z]||(i[Z]=[]),i[Z].push(G),i},{}),r=[];for(let[i,G]of Object.entries(c)){let d=this._processBatch(G,{apiUrl:i==="default"?void 0:i.split("|")[0],apiKey:i==="default"?void 0:i.split("|")[1]});r.push(d)}let s=Promise.all(r).finally(a);l.push(s)}return Promise.all(l)}static async _writeTraceToFallbackDir(e,I,l,n,a){try{let c=typeof I=="string"?m.Buffer.from(I,"utf8"):m.Buffer.from(I),r=JSON.stringify({version:1,endpoint:n,headers:l,body_base64:c.toString("base64")}),s=`trace_${Date.now()}_${GJ().slice(0,8)}.json`,i=GT.join(e,s);if(t._fallbackDirsCreated.has(e)||(await Sct(e),t._fallbackDirsCreated.add(e)),a!==void 0&&a>0)try{let d=(await _ct(e)).filter(b=>b.startsWith("trace_")&&b.endsWith(".json")),u=0;for(let b of d){let{size:Z}=await Kct(GT.join(e,b));u+=Z}if(u>=a){console.warn(`Could not write trace to fallback dir ${e} as it's already over size limit (${u} bytes >= ${a} bytes). Increase LANGSMITH_FAILED_TRACES_MAX_MB if possible.`);return}}catch{}await Tct(i,r),console.warn(`LangSmith trace upload failed; data saved to ${i} for later replay.`)}catch(c){console.error(`LangSmith tracing error: could not write trace to fallback dir ${e}:`,c)}}async _processBatch(e,I){if(!e.length)return;let l=e.reduce((n,a)=>n+(a.size??0),0);try{if(this.langSmithToOTELTranslator!==void 0)this._sendBatchToOTELTranslator(e);else{let n={runCreates:e.filter(r=>r.action==="create").map(r=>r.item),runUpdates:e.filter(r=>r.action==="update").map(r=>r.item)},a=await this._ensureServerInfo();if(!this._multipartDisabled&&(a?.batch_ingest_config?.use_multipart_endpoint??!0)){let r=!this._runCompressionDisabled&&a?.instance_flags?.gzip_body_enabled;try{await this.multipartIngestRuns(n,{...I,useGzip:r,sizeBytes:l})}catch(s){if(hne(s))this._multipartDisabled=!0,await this.batchIngestRuns(n,{...I,sizeBytes:l});else throw s}}else await this.batchIngestRuns(n,{...I,sizeBytes:l})}}catch(n){console.error("Error exporting batch:",n)}}_sendBatchToOTELTranslator(e){if(this.langSmithToOTELTranslator!==void 0){let I=new Map,l=[];for(let n of e)n.item.id&&n.otelContext&&(I.set(n.item.id,n.otelContext),n.action==="create"?l.push({operation:"post",id:n.item.id,trace_id:n.item.trace_id??n.item.id,run:n.item}):l.push({operation:"patch",id:n.item.id,trace_id:n.item.trace_id??n.item.id,run:n.item}));this.langSmithToOTELTranslator.exportBatch(l,I)}}async processRunOperation(e){clearTimeout(this.autoBatchTimeout),this.autoBatchTimeout=void 0,e.item=frt(e.item,this.cachedLSEnvVarsForMetadata,this.omitTracedRuntimeInfo);let I=this.autoBatchQueue.push(e);if(this.manualFlushMode)return I;let l=await this._getBatchSizeLimitBytes(),n=await this._getBatchSizeLimit();return(this.autoBatchQueue.sizeBytes>l||this.autoBatchQueue.items.length>n)&&this._trackDrain(this.drainAutoBatchQueue({batchSizeLimitBytes:l,batchSizeLimit:n})),this.autoBatchQueue.items.length>0&&(this.autoBatchTimeout=setTimeout(()=>{this.autoBatchTimeout=void 0,this._trackDrain(this.drainAutoBatchQueue({batchSizeLimitBytes:l,batchSizeLimit:n}))},this.autoBatchAggregationDelayMs)),I}async _getServerInfo(){let I=await(await this.caller.call(async()=>{let l=await this._fetch(`${this.apiUrl}/info`,{method:"GET",headers:{...this._mergedHeaders,Accept:"application/json"},signal:AbortSignal.timeout(G5I),...this.fetchOptions});return await Lt(l,"get server info"),l})).json();return this.debug&&console.log(` +=== LangSmith Server Configuration === +`+JSON.stringify(I,null,2)+` +`),I}async _ensureServerInfo(){return this._getServerInfoPromise===void 0&&(this._getServerInfoPromise=(async()=>{if(this._serverInfo===void 0)try{this._serverInfo=await this._getServerInfo()}catch(e){console.warn(`[LANGSMITH]: Failed to fetch info on supported operations. Falling back to batch operations and default limits. Info: ${e.status??"Unspecified status code"} ${e.message}`)}return this._serverInfo??{}})()),this._getServerInfoPromise.then(e=>(this._serverInfo===void 0&&(this._getServerInfoPromise=void 0),e))}async _getSettings(){return this.settings||(this.settings=this._get("/settings")),await this.settings}async flush(){let e=await this._getBatchSizeLimitBytes(),I=await this._getBatchSizeLimit();await this.drainAutoBatchQueue({batchSizeLimitBytes:e,batchSizeLimit:I})}_cloneCurrentOTELContext(){let e=rne(),I=trt();if(this.langSmithToOTELTranslator!==void 0){let l=e.getActiveSpan();if(l)return e.setSpan(I.active(),l)}}async createRun(e,I){if(!this._filterForSampling([e]).length)return;let l={...this._mergedHeaders,"Content-Type":"application/json"},n=e.project_name;delete e.project_name;let a=await this.prepareRunCreateOrUpdateInputs({session_name:n,...e,start_time:e.start_time??Date.now()});if(this.autoBatchTracing&&a.trace_id!==void 0&&a.dotted_order!==void 0){let s=this._cloneCurrentOTELContext();this.processRunOperation({action:"create",item:a,otelContext:s,apiKey:I?.apiKey,apiUrl:I?.apiUrl}).catch(console.error);return}let c=frt(a,this.cachedLSEnvVarsForMetadata,this.omitTracedRuntimeInfo);I?.apiKey!==void 0&&(l["x-api-key"]=I.apiKey),I?.workspaceId!==void 0&&(l["x-tenant-id"]=I.workspaceId);let r=Wi(c,`Creating run with id: ${c.id}`);await this.caller.call(async()=>{let s=await this._fetch(`${I?.apiUrl??this.apiUrl}/runs`,{method:"POST",headers:l,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions,body:r});return await Lt(s,"create run",!0),s})}async batchIngestRuns({runCreates:e,runUpdates:I},l){if(e===void 0&&I===void 0)return;let n=await Promise.all(e?.map(s=>this.prepareRunCreateOrUpdateInputs(s))??[]),a=await Promise.all(I?.map(s=>this.prepareRunCreateOrUpdateInputs(s))??[]);if(n.length>0&&a.length>0){let s=n.reduce((G,d)=>(d.id&&(G[d.id]=d),G),{}),i=[];for(let G of a)G.id!==void 0&&s[G.id]?s[G.id]={...s[G.id],...G}:i.push(G);n=Object.values(s),a=i}let c={post:n,patch:a};if(!c.post.length&&!c.patch.length)return;let r={post:[],patch:[]};for(let s of["post","patch"]){let i=s,G=c[i].reverse(),d=G.pop();for(;d!==void 0;)r[i].push(d),d=G.pop()}if(r.post.length>0||r.patch.length>0){let s=r.post.map(i=>i.id).concat(r.patch.map(i=>i.id)).join(",");await this._postBatchIngestRuns(await this._serializeBody(r,`Ingesting runs with ids: ${s}`),l)}}async _postBatchIngestRuns(e,I){let l={...this._mergedHeaders,"Content-Type":"application/json",Accept:"application/json"};I?.apiKey!==void 0&&(l["x-api-key"]=I.apiKey),await this.batchIngestCaller.callWithOptions({sizeBytes:I?.sizeBytes},async()=>{let n=await this._fetch(`${I?.apiUrl??this.apiUrl}/runs/batch`,{method:"POST",headers:l,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions,body:e});return await Lt(n,"batch create run",!0),n})}async multipartIngestRuns({runCreates:e,runUpdates:I},l){if(e===void 0&&I===void 0)return;let n={},a=[];for(let d of e??[]){let u=await this.prepareRunCreateOrUpdateInputs(d);u.id!==void 0&&u.attachments!==void 0&&(n[u.id]=u.attachments),delete u.attachments,a.push(u)}let c=[];for(let d of I??[])c.push(await this.prepareRunCreateOrUpdateInputs(d));if(a.find(d=>d.trace_id===void 0||d.dotted_order===void 0)!==void 0)throw new Error('Multipart ingest requires "trace_id" and "dotted_order" to be set when creating a run');if(c.find(d=>d.trace_id===void 0||d.dotted_order===void 0)!==void 0)throw new Error('Multipart ingest requires "trace_id" and "dotted_order" to be set when updating a run');if(a.length>0&&c.length>0){let d=a.reduce((b,Z)=>(Z.id&&(b[Z.id]=Z),b),{}),u=[];for(let b of c)b.id!==void 0&&d[b.id]?d[b.id]={...d[b.id],...b}:u.push(b);a=Object.values(d),c=u}if(a.length===0&&c.length===0)return;let i=[],G=[];for(let[d,u]of[["post",a],["patch",c]])for(let b of u){let{inputs:Z,outputs:p,events:W,extra:h,error:N,serialized:V,attachments:R,...F}=b,v={inputs:Z,outputs:p,events:W,extra:h,error:N,serialized:V},y=await this._serializeBody(F,`Serializing for multipart ingestion of run with id: ${F.id}`);G.push({name:`${d}.${F.id}`,payload:new Blob([y],{type:`application/json; length=${y.length}`})});for(let[w,H]of Object.entries(v)){if(H===void 0)continue;let f=await this._serializeBody(H,`Serializing ${w} for multipart ingestion of run with id: ${F.id}`);G.push({name:`${d}.${F.id}.${w}`,payload:new Blob([f],{type:`application/json; length=${f.length}`})})}if(F.id!==void 0){let w=n[F.id];if(w){delete n[F.id];for(let[H,f]of Object.entries(w)){let L,k;if(Array.isArray(f)?[L,k]=f:(L=f.mimeType,k=f.data),H.includes(".")){console.warn(`Skipping attachment '${H}' for run ${F.id}: Invalid attachment name. Attachment names must not contain periods ('.'). Please rename the attachment and try again.`);continue}G.push({name:`attachment.${F.id}.${H}`,payload:new Blob([k],{type:`${L}; length=${k.byteLength}`})})}}}i.push(`trace=${F.trace_id},id=${F.id}`)}await this._sendMultipartRequest(G,i.join("; "),l)}async _createNodeFetchBody(e,I){let l=[];for(let c of e)l.push(new Blob([`--${I}\r +`])),l.push(new Blob([`Content-Disposition: form-data; name="${c.name}"\r +`,`Content-Type: ${c.payload.type}\r +\r +`])),l.push(c.payload),l.push(new Blob([`\r +`]));return l.push(new Blob([`--${I}--\r +`])),await new Blob(l).arrayBuffer()}async _createMultipartStream(e,I){let l=new TextEncoder;return new ReadableStream({async start(a){let c=async r=>{typeof r=="string"?a.enqueue(l.encode(r)):a.enqueue(r)};for(let r of e){await c(`--${I}\r +`),await c(`Content-Disposition: form-data; name="${r.name}"\r +`),await c(`Content-Type: ${r.payload.type}\r +\r +`);let i=r.payload.stream().getReader();try{let G;for(;!(G=await i.read()).done;)a.enqueue(G.value)}finally{i.releaseLock()}await c(`\r +`)}await c(`--${I}--\r +`),a.close()}})}async _sendMultipartRequest(e,I,l){let n="----LangSmithFormBoundary"+Math.random().toString(36).slice(2),a=()=>this._createNodeFetchBody(e,n),c=()=>this._createMultipartStream(e,n),r=async s=>this.batchIngestCaller.callWithOptions({sizeBytes:l?.sizeBytes},async()=>{let i=await s(),G={...this._mergedHeaders,"Content-Type":`multipart/form-data; boundary=${n}`};l?.apiKey!==void 0&&(G["x-api-key"]=l.apiKey);let d=i;l?.useGzip&&typeof i=="object"&&"pipeThrough"in i&&(d=i.pipeThrough(new CompressionStream("gzip")),G["Content-Encoding"]="gzip");let u=await this._fetch(`${l?.apiUrl??this.apiUrl}/runs/multipart`,{method:"POST",headers:G,body:d,duplex:"half",signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});return await Lt(u,"Failed to send multipart request",!0),u});try{let s,i=!1;yct()&&!this.multipartStreamingDisabled&&xge()!=="bun"?(i=!0,s=await r(c)):s=await r(a),(!this.multipartStreamingDisabled||i)&&s.status===422&&(l?.apiUrl??this.apiUrl)!==Jrt&&(console.warn(`Streaming multipart upload to ${l?.apiUrl??this.apiUrl}/runs/multipart failed. This usually means the host does not support chunked uploads. Retrying with a buffered upload for operation "${I}".`),this.multipartStreamingDisabled=!0,s=await r(a))}catch(s){if(hne(s))throw s;if(console.warn(`${s.message.trim()} + +Context: ${I}`),this.failedTracesDir){let i=await this._createNodeFetchBody(e,n).catch(()=>null);i&&await t._writeTraceToFallbackDir(this.failedTracesDir,i,{"Content-Type":`multipart/form-data; boundary=${n}`},"runs/multipart",this.failedTracesMaxBytes)}}}async updateRun(e,I,l){$I(e),I.inputs&&(I.inputs=await this.processInputs(I.inputs)),I.outputs&&(I.outputs=await this.processOutputs(I.outputs)),I.extra!=null&&"metadata"in I.extra&&(I.extra={...I.extra,metadata:await this.processMetadata(I.extra.metadata)}),I.events&&(I.events=this._filterNewTokenEvents(I.events));let n={...I,id:e};if(!this._filterForSampling([n],!0).length)return;if(this.autoBatchTracing&&n.trace_id!==void 0&&n.dotted_order!==void 0){let r=this._cloneCurrentOTELContext();if(I.end_time!==void 0&&n.parent_run_id===void 0&&this.blockOnRootRunFinalization&&!this.manualFlushMode){await this.processRunOperation({action:"update",item:n,otelContext:r,apiKey:l?.apiKey,apiUrl:l?.apiUrl}).catch(console.error);return}else this.processRunOperation({action:"update",item:n,otelContext:r,apiKey:l?.apiKey,apiUrl:l?.apiUrl}).catch(console.error);return}let a={...this._mergedHeaders,"Content-Type":"application/json"};l?.apiKey!==void 0&&(a["x-api-key"]=l.apiKey),l?.workspaceId!==void 0&&(a["x-tenant-id"]=l.workspaceId);let c=Wi(I,`Serializing payload to update run with id: ${e}`);await this.caller.call(async()=>{let r=await this._fetch(`${l?.apiUrl??this.apiUrl}/runs/${e}`,{method:"PATCH",headers:a,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions,body:c});return await Lt(r,"update run",!0),r})}async readRun(e,{loadChildRuns:I}={loadChildRuns:!1}){$I(e);let l=bT(await this._get(`/runs/${e}`));return I&&(l=await this._loadChildRuns(l)),l}async getRunUrl({runId:e,run:I,projectOpts:l}){if(I!==void 0){let n;I.session_id?n=I.session_id:l?.projectName?n=(await this.readProject({projectName:l?.projectName})).id:l?.projectId?n=l?.projectId:n=(await this.readProject({projectName:ra("PROJECT")||"default"})).id;let a=await this._getTenantId();return`${this.getHostUrl()}/o/${a}/projects/p/${n}/r/${I.id}?poll=true`}else if(e!==void 0){let n=await this.readRun(e);if(!n.app_path)throw new Error(`Run ${e} has no app_path`);return`${this.getHostUrl()}${n.app_path}`}else throw new Error("Must provide either runId or run")}async _loadChildRuns(e){let I=await s5I(this.listRuns({isRoot:!1,projectId:e.session_id,traceId:e.trace_id})),l={},n={};I.sort((a,c)=>(a?.dotted_order??"").localeCompare(c?.dotted_order??""));for(let a of I){if(a.parent_run_id===null||a.parent_run_id===void 0)throw new Error(`Child run ${a.id} has no parent`);a.dotted_order?.startsWith(e.dotted_order??"")&&a.id!==e.id&&(a.parent_run_id in l||(l[a.parent_run_id]=[]),l[a.parent_run_id].push(a),n[a.id]=a)}e.child_runs=l[e.id]||[];for(let a in l)a!==e.id&&(n[a].child_runs=l[a]);return e}async*listRuns(e){let{projectId:I,projectName:l,parentRunId:n,traceId:a,referenceExampleId:c,startTime:r,executionOrder:s,isRoot:i,runType:G,error:d,id:u,query:b,filter:Z,traceFilter:p,treeFilter:W,limit:h,select:N,order:V}=e,R=[];if(I&&(R=Array.isArray(I)?I:[I]),l){let w=Array.isArray(l)?l:[l],H=await Promise.all(w.map(f=>this.readProject({projectName:f}).then(L=>L.id)));R.push(...H)}let F=["app_path","completion_cost","completion_tokens","dotted_order","end_time","error","events","extra","feedback_stats","first_token_time","id","inputs","name","outputs","parent_run_id","parent_run_ids","prompt_cost","prompt_tokens","reference_example_id","run_type","session_id","start_time","status","tags","total_cost","total_tokens","trace_id"],v={session:R.length?R:null,run_type:G,reference_example:c,query:b,filter:Z,trace_filter:p,tree_filter:W,execution_order:s,parent_run:n,start_time:r?r.toISOString():null,error:d,id:u,limit:h,trace:a,select:N||F,is_root:i,order:V};v.select.includes("child_run_ids")&&dJ("Deprecated: 'child_run_ids' in the listRuns select parameter is deprecated and will be removed in a future version.");let y=0;for await(let w of this._getCursorPaginatedList("/runs/query",v)){let H=w.map(bT);if(h){if(y>=h)break;if(H.length+y>h){yield*H.slice(0,h-y);break}y+=H.length,yield*H}else yield*H}}async*listGroupRuns(e){let{projectId:I,projectName:l,groupBy:n,filter:a,startTime:c,endTime:r,limit:s,offset:i}=e,d={session_id:I||(await this.readProject({projectName:l})).id,group_by:n,filter:a,start_time:c?c.toISOString():null,end_time:r?r.toISOString():null,limit:Number(s)||100},u=Number(i)||0,b="/runs/group",Z=`${this.apiUrl}${b}`;for(;;){let p={...d,offset:u},W=Object.fromEntries(Object.entries(p).filter(([v,y])=>y!==void 0)),h=JSON.stringify(W),V=await(await this.caller.call(async()=>{let v=await this._fetch(Z,{method:"POST",headers:{...this._mergedHeaders,"Content-Type":"application/json"},signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions,body:h});return await Lt(v,`Failed to fetch ${b}`),v})).json(),{groups:R,total:F}=V;if(R.length===0)break;for(let v of R)yield v;if(u+=R.length,u>=F)break}}async*readThread(e){let{threadId:I,projectId:l,projectName:n,isRoot:a=!0,limit:c,filter:r,order:s="asc"}=e;if(!l&&!n)throw new Error("threadId requires projectId or projectName");let i=`eq(thread_id, ${JSON.stringify(I)})`,G=r?`and(${i}, ${r})`:i;yield*this.listRuns({projectId:l??void 0,projectName:n??void 0,isRoot:a,limit:c,filter:G,order:s})}async listThreads(e){let{projectId:I,projectName:l,limit:n,offset:a=0,filter:c,startTime:r,isRoot:s=!0}=e;if(!I&&!l)throw new Error("Either projectId or projectName must be provided");if(I&&l)throw new Error("Provide exactly one of projectId or projectName");let i=I??(await this.readProject({projectName:l})).id,G=r??new Date(Date.now()-1*24*60*60*1e3),u={session:[i],is_root:s,limit:100,order:"desc",select:["id","name","status","start_time","end_time","thread_id","trace_id","run_type","error","tags","session_id","parent_run_id","total_tokens","total_cost","dotted_order","reference_example_id","feedback_stats","app_path","completion_cost","completion_tokens","prompt_cost","prompt_tokens","first_token_time"],start_time:G.toISOString()};c!=null&&(u.filter=c);let b=new Map;for await(let h of this._getCursorPaginatedList("/runs/query",u))for(let N of h){let V=bT(N),R=V.thread_id;if(R){let F=b.get(R)??[];F.push(V),b.set(R,F)}}let Z=[];for(let[h,N]of b.entries()){N.sort((y,w)=>{let H=y,f=w,L=H.start_time??"",k=f.start_time??"";if(L!==k)return L.localeCompare(k);let U=H.dotted_order??"",T=f.dotted_order??"";return U.localeCompare(T)});let R=[...N.map(y=>y.start_time).filter(Boolean)].sort(),F=R.length?R[0]:"",v=R.length?R[R.length-1]:"";Z.push({thread_id:h,runs:N,count:N.length,filter:"",total_tokens:0,total_cost:null,min_start_time:F,max_start_time:v,latency_p50:0,latency_p99:0,feedback_stats:null,first_inputs:"",last_outputs:"",last_error:null})}Z.sort((h,N)=>{let V=h.max_start_time??"";return(N.max_start_time??"").localeCompare(V)});let p=a>0?Z.slice(a):Z;return n!==void 0?p.slice(0,n):p}async getRunStats({id:e,trace:I,parentRun:l,runType:n,projectNames:a,projectIds:c,referenceExampleIds:r,startTime:s,endTime:i,error:G,query:d,filter:u,traceFilter:b,treeFilter:Z,isRoot:p,dataSourceType:W}){let h=c||[];a&&(h=[...c||[],...await Promise.all(a.map(y=>this.readProject({projectName:y}).then(w=>w.id)))]);let V=Object.fromEntries(Object.entries({id:e,trace:I,parent_run:l,run_type:n,session:h,reference_example:r,start_time:s,end_time:i,error:G,query:d,filter:u,trace_filter:b,tree_filter:Z,is_root:p,data_source_type:W}).filter(([y,w])=>w!==void 0)),R=JSON.stringify(V);return await(await this.caller.call(async()=>{let y=await this._fetch(`${this.apiUrl}/runs/stats`,{method:"POST",headers:{...this._mergedHeaders,"Content-Type":"application/json"},signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions,body:R});return await Lt(y,"get run stats"),y})).json()}async shareRun(e,{shareId:I}={}){let l={run_id:e,share_token:I||GJ()};$I(e);let n=JSON.stringify(l),c=await(await this.caller.call(async()=>{let r=await this._fetch(`${this.apiUrl}/runs/${e}/share`,{method:"PUT",headers:this._mergedHeaders,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions,body:n});return await Lt(r,"share run"),r})).json();if(c===null||!("share_token"in c))throw new Error("Invalid response from server");return`${this.getHostUrl()}/public/${c.share_token}/r`}async unshareRun(e){$I(e),await this.caller.call(async()=>{let I=await this._fetch(`${this.apiUrl}/runs/${e}/share`,{method:"DELETE",headers:this._mergedHeaders,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});return await Lt(I,"unshare run",!0),I})}async readRunSharedLink(e){$I(e);let l=await(await this.caller.call(async()=>{let n=await this._fetch(`${this.apiUrl}/runs/${e}/share`,{method:"GET",headers:this._mergedHeaders,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});return await Lt(n,"read run shared link"),n})).json();if(!(l===null||!("share_token"in l)))return`${this.getHostUrl()}/public/${l.share_token}/r`}async listSharedRuns(e,{runIds:I}={}){let l=new URLSearchParams({share_token:e});if(I!==void 0)for(let c of I)l.append("id",c);return $I(e),(await(await this.caller.call(async()=>{let c=await this._fetch(`${this.apiUrl}/public/${e}/runs${l}`,{method:"GET",headers:this._mergedHeaders,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});return await Lt(c,"list shared runs"),c})).json()).map(bT)}async readDatasetSharedSchema(e,I){if(!e&&!I)throw new Error("Either datasetId or datasetName must be given");e||(e=(await this.readDataset({datasetName:I})).id),$I(e);let n=await(await this.caller.call(async()=>{let a=await this._fetch(`${this.apiUrl}/datasets/${e}/share`,{method:"GET",headers:this._mergedHeaders,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});return await Lt(a,"read dataset shared schema"),a})).json();return n.url=`${this.getHostUrl()}/public/${n.share_token}/d`,n}async shareDataset(e,I){if(!e&&!I)throw new Error("Either datasetId or datasetName must be given");e||(e=(await this.readDataset({datasetName:I})).id);let l={dataset_id:e};$I(e);let n=JSON.stringify(l),c=await(await this.caller.call(async()=>{let r=await this._fetch(`${this.apiUrl}/datasets/${e}/share`,{method:"PUT",headers:this._mergedHeaders,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions,body:n});return await Lt(r,"share dataset"),r})).json();return c.url=`${this.getHostUrl()}/public/${c.share_token}/d`,c}async unshareDataset(e){$I(e),await this.caller.call(async()=>{let I=await this._fetch(`${this.apiUrl}/datasets/${e}/share`,{method:"DELETE",headers:this._mergedHeaders,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});return await Lt(I,"unshare dataset",!0),I})}async readSharedDataset(e){return $I(e),await(await this.caller.call(async()=>{let n=await this._fetch(`${this.apiUrl}/public/${e}/datasets`,{method:"GET",headers:this._mergedHeaders,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});return await Lt(n,"read shared dataset"),n})).json()}async listSharedExamples(e,I){let l={};I?.exampleIds&&(l.id=I.exampleIds);let n=new URLSearchParams;Object.entries(l).forEach(([r,s])=>{Array.isArray(s)?s.forEach(i=>n.append(r,i)):n.append(r,s)});let a=await this.caller.call(async()=>{let r=await this._fetch(`${this.apiUrl}/public/${e}/examples?${n.toString()}`,{method:"GET",headers:this._mergedHeaders,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});return await Lt(r,"list shared examples"),r}),c=await a.json();if(!a.ok)throw"detail"in c?new Error(`Failed to list shared examples. +Status: ${a.status} +Message: ${Array.isArray(c.detail)?c.detail.join(` +`):"Unspecified error"}`):new Error(`Failed to list shared examples: ${a.status} ${a.statusText}`);return c.map(r=>({...r,_hostUrl:this.getHostUrl()}))}async createProject({projectName:e,description:I=null,metadata:l=null,upsert:n=!1,projectExtra:a=null,referenceDatasetId:c=null}){let r=n?"?upsert=true":"",s=`${this.apiUrl}/sessions${r}`,i=a||{};l&&(i.metadata=l);let G={name:e,extra:i,description:I};c!==null&&(G.reference_dataset_id=c);let d=JSON.stringify(G);return await(await this.caller.call(async()=>{let Z=await this._fetch(s,{method:"POST",headers:{...this._mergedHeaders,"Content-Type":"application/json"},signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions,body:d});return await Lt(Z,"create project"),Z})).json()}async updateProject(e,{name:I=null,description:l=null,metadata:n=null,projectExtra:a=null,endTime:c=null}){let r=`${this.apiUrl}/sessions/${e}`,s=a;n&&(s={...s||{},metadata:n});let i=JSON.stringify({name:I,extra:s,description:l,end_time:c?new Date(c).toISOString():null});return await(await this.caller.call(async()=>{let u=await this._fetch(r,{method:"PATCH",headers:{...this._mergedHeaders,"Content-Type":"application/json"},signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions,body:i});return await Lt(u,"update project"),u})).json()}async hasProject({projectId:e,projectName:I}){let l="/sessions",n=new URLSearchParams;if(e!==void 0&&I!==void 0)throw new Error("Must provide either projectName or projectId, not both");if(e!==void 0)$I(e),l+=`/${e}`;else if(I!==void 0)n.append("name",I);else throw new Error("Must provide projectName or projectId");let a=await this.caller.call(async()=>{let c=await this._fetch(`${this.apiUrl}${l}?${n}`,{method:"GET",headers:this._mergedHeaders,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});return await Lt(c,"has project"),c});try{let c=await a.json();return a.ok?Array.isArray(c)?c.length>0:!0:!1}catch{return!1}}async readProject({projectId:e,projectName:I,includeStats:l}){let n="/sessions",a=new URLSearchParams;if(e!==void 0&&I!==void 0)throw new Error("Must provide either projectName or projectId, not both");if(e!==void 0)$I(e),n+=`/${e}`;else if(I!==void 0)a.append("name",I);else throw new Error("Must provide projectName or projectId");l!==void 0&&a.append("include_stats",l.toString());let c=await this._get(n,a),r;if(Array.isArray(c)){if(c.length===0)throw new Error(`Project[id=${e}, name=${I}] not found`);r=c[0]}else r=c;return r}async getProjectUrl({projectId:e,projectName:I}){if(e===void 0&&I===void 0)throw new Error("Must provide either projectName or projectId");let l=await this.readProject({projectId:e,projectName:I}),n=await this._getTenantId();return`${this.getHostUrl()}/o/${n}/projects/p/${l.id}`}async getDatasetUrl({datasetId:e,datasetName:I}){if(e===void 0&&I===void 0)throw new Error("Must provide either datasetName or datasetId");let l=await this.readDataset({datasetId:e,datasetName:I}),n=await this._getTenantId();return`${this.getHostUrl()}/o/${n}/datasets/${l.id}`}async _getTenantId(){if(this._tenantId!==null)return this._tenantId;let e=new URLSearchParams({limit:"1"});for await(let I of this._getPaginated("/sessions",e))return this._tenantId=I[0].tenant_id,I[0].tenant_id;throw new Error("No projects found to resolve tenant.")}async*listProjects({projectIds:e,name:I,nameContains:l,referenceDatasetId:n,referenceDatasetName:a,includeStats:c,datasetVersion:r,referenceFree:s,metadata:i}={}){let G=new URLSearchParams;if(e!==void 0)for(let d of e)G.append("id",d);if(I!==void 0&&G.append("name",I),l!==void 0&&G.append("name_contains",l),n!==void 0)G.append("reference_dataset",n);else if(a!==void 0){let d=await this.readDataset({datasetName:a});G.append("reference_dataset",d.id)}c!==void 0&&G.append("include_stats",c.toString()),r!==void 0&&G.append("dataset_version",r),s!==void 0&&G.append("reference_free",s.toString()),i!==void 0&&G.append("metadata",JSON.stringify(i));for await(let d of this._getPaginated("/sessions",G))yield*d}async deleteProject({projectId:e,projectName:I}){let l;if(e===void 0&&I===void 0)throw new Error("Must provide projectName or projectId");if(e!==void 0&&I!==void 0)throw new Error("Must provide either projectName or projectId, not both");e===void 0?l=(await this.readProject({projectName:I})).id:l=e,$I(l),await this.caller.call(async()=>{let n=await this._fetch(`${this.apiUrl}/sessions/${l}`,{method:"DELETE",headers:this._mergedHeaders,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});return await Lt(n,`delete session ${l} (${I})`,!0),n})}async uploadCsv({csvFile:e,fileName:I,inputKeys:l,outputKeys:n,description:a,dataType:c,name:r}){let s=`${this.apiUrl}/datasets/upload`,i=new FormData,G=new Blob([e],{type:"text/csv"});return i.append("file",G,I),l.forEach(b=>{i.append("input_keys",b)}),n.forEach(b=>{i.append("output_keys",b)}),a&&i.append("description",a),c&&i.append("data_type",c),r&&i.append("name",r),await(await this.caller.call(async()=>{let b=await this._fetch(s,{method:"POST",headers:this._mergedHeaders,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions,body:i});return await Lt(b,"upload CSV"),b})).json()}async createDataset(e,{description:I,dataType:l,inputsSchema:n,outputsSchema:a,metadata:c}={}){let r={name:e,description:I,extra:{source:"sdk",...c?{metadata:c}:{}}};l&&(r.data_type=l),n&&(r.inputs_schema_definition=n),a&&(r.outputs_schema_definition=a);let s=JSON.stringify(r);return await(await this.caller.call(async()=>{let d=await this._fetch(`${this.apiUrl}/datasets`,{method:"POST",headers:{...this._mergedHeaders,"Content-Type":"application/json"},signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions,body:s});return await Lt(d,"create dataset"),d})).json()}async readDataset({datasetId:e,datasetName:I}){let l="/datasets",n=new URLSearchParams({limit:"1"});if(e&&I)throw new Error("Must provide either datasetName or datasetId, not both");if(e)$I(e),l+=`/${e}`;else if(I)n.append("name",I);else throw new Error("Must provide datasetName or datasetId");let a=await this._get(l,n),c;if(Array.isArray(a)){if(a.length===0)throw new Error(`Dataset[id=${e}, name=${I}] not found`);c=a[0]}else c=a;return c}async hasDataset({datasetId:e,datasetName:I}){try{return await this.readDataset({datasetId:e,datasetName:I}),!0}catch(l){if(l instanceof Error&&l.message.toLocaleLowerCase().includes("not found"))return!1;throw l}}async diffDatasetVersions({datasetId:e,datasetName:I,fromVersion:l,toVersion:n}){let a=e;if(a===void 0&&I===void 0)throw new Error("Must provide either datasetName or datasetId");if(a!==void 0&&I!==void 0)throw new Error("Must provide either datasetName or datasetId, not both");a===void 0&&(a=(await this.readDataset({datasetName:I})).id);let c=new URLSearchParams({from_version:typeof l=="string"?l:l.toISOString(),to_version:typeof n=="string"?n:n.toISOString()});return await this._get(`/datasets/${a}/versions/diff`,c)}async readDatasetOpenaiFinetuning({datasetId:e,datasetName:I}){let l="/datasets";if(e===void 0)if(I!==void 0)e=(await this.readDataset({datasetName:I})).id;else throw new Error("Must provide either datasetName or datasetId");return(await(await this._getResponse(`${l}/${e}/openai_ft`)).text()).trim().split(` +`).map(r=>JSON.parse(r))}async*listDatasets({limit:e=100,offset:I=0,datasetIds:l,datasetName:n,datasetNameContains:a,metadata:c}={}){let r="/datasets",s=new URLSearchParams({limit:e.toString(),offset:I.toString()});if(l!==void 0)for(let i of l)s.append("id",i);n!==void 0&&s.append("name",n),a!==void 0&&s.append("name_contains",a),c!==void 0&&s.append("metadata",JSON.stringify(c));for await(let i of this._getPaginated(r,s))yield*i}async updateDataset(e){let{datasetId:I,datasetName:l,...n}=e;if(!I&&!l)throw new Error("Must provide either datasetName or datasetId");let a=I??(await this.readDataset({datasetName:l})).id;$I(a);let c=JSON.stringify(n);return await(await this.caller.call(async()=>{let s=await this._fetch(`${this.apiUrl}/datasets/${a}`,{method:"PATCH",headers:{...this._mergedHeaders,"Content-Type":"application/json"},signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions,body:c});return await Lt(s,"update dataset"),s})).json()}async updateDatasetTag(e){let{datasetId:I,datasetName:l,asOf:n,tag:a}=e;if(!I&&!l)throw new Error("Must provide either datasetName or datasetId");let c=I??(await this.readDataset({datasetName:l})).id;$I(c);let r=JSON.stringify({as_of:typeof n=="string"?n:n.toISOString(),tag:a});await this.caller.call(async()=>{let s=await this._fetch(`${this.apiUrl}/datasets/${c}/tags`,{method:"PUT",headers:{...this._mergedHeaders,"Content-Type":"application/json"},signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions,body:r});return await Lt(s,"update dataset tags",!0),s})}async deleteDataset({datasetId:e,datasetName:I}){let l="/datasets",n=e;if(e!==void 0&&I!==void 0)throw new Error("Must provide either datasetName or datasetId, not both");if(I!==void 0&&(n=(await this.readDataset({datasetName:I})).id),n!==void 0)$I(n),l+=`/${n}`;else throw new Error("Must provide datasetName or datasetId");await this.caller.call(async()=>{let a=await this._fetch(this.apiUrl+l,{method:"DELETE",headers:this._mergedHeaders,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});return await Lt(a,`delete ${l}`,!0),a})}async createExample(e,I,l){if(Crt(e)&&(I!==void 0||l!==void 0))throw new Error("Cannot provide outputs or options when using ExampleCreate object");let n=I?l?.datasetId:e.dataset_id,a=I?l?.datasetName:e.dataset_name;if(n===void 0&&a===void 0)throw new Error("Must provide either datasetName or datasetId");if(n!==void 0&&a!==void 0)throw new Error("Must provide either datasetName or datasetId, not both");n===void 0&&(n=(await this.readDataset({datasetName:a})).id);let c=(I?l?.createdAt:e.created_at)||new Date,r;Crt(e)?r=e:r={inputs:e,outputs:I,created_at:c?.toISOString(),id:l?.exampleId,metadata:l?.metadata,split:l?.split,source_run_id:l?.sourceRunId,use_source_run_io:l?.useSourceRunIO,use_source_run_attachments:l?.useSourceRunAttachments,attachments:l?.attachments};let s=await this._uploadExamplesMultipart(n,[r]);return await this.readExample(s.example_ids?.[0]??GJ())}async createExamples(e){if(Array.isArray(e)){if(e.length===0)return[];let N=e,V=N[0].dataset_id,R=N[0].dataset_name;if(V===void 0&&R===void 0)throw new Error("Must provide either datasetName or datasetId");if(V!==void 0&&R!==void 0)throw new Error("Must provide either datasetName or datasetId, not both");V===void 0&&(V=(await this.readDataset({datasetName:R})).id);let F=await this._uploadExamplesMultipart(V,N);return await Promise.all(F.example_ids.map(y=>this.readExample(y)))}let{inputs:I,outputs:l,metadata:n,splits:a,sourceRunIds:c,useSourceRunIOs:r,useSourceRunAttachments:s,attachments:i,exampleIds:G,datasetId:d,datasetName:u}=e;if(I===void 0)throw new Error("Must provide inputs when using legacy parameters");let b=d,Z=u;if(b===void 0&&Z===void 0)throw new Error("Must provide either datasetName or datasetId");if(b!==void 0&&Z!==void 0)throw new Error("Must provide either datasetName or datasetId, not both");b===void 0&&(b=(await this.readDataset({datasetName:Z})).id);let p=I.map((N,V)=>({dataset_id:b,inputs:N,outputs:l?.[V],metadata:n?.[V],split:a?.[V],id:G?.[V],attachments:i?.[V],source_run_id:c?.[V],use_source_run_io:r?.[V],use_source_run_attachments:s?.[V]})),W=await this._uploadExamplesMultipart(b,p);return await Promise.all(W.example_ids.map(N=>this.readExample(N)))}async createLLMExample(e,I,l){return this.createExample({input:e},{output:I},l)}async createChatExample(e,I,l){let n=e.map(c=>ave(c)?cve(c):c),a=ave(I)?cve(I):I;return this.createExample({input:n},{output:a},l)}async readExample(e){$I(e);let I=`/examples/${e}`,l=await this._get(I),{attachment_urls:n,...a}=l,c=a;return n&&(c.attachments=Object.entries(n).reduce((r,[s,i])=>(r[s.slice(11)]={presigned_url:i.presigned_url,mime_type:i.mime_type},r),{})),c}async*listExamples({datasetId:e,datasetName:I,exampleIds:l,asOf:n,splits:a,inlineS3Urls:c,metadata:r,limit:s,offset:i,filter:G,includeAttachments:d}={}){let u;if(e!==void 0&&I!==void 0)throw new Error("Must provide either datasetName or datasetId, not both");if(e!==void 0)u=e;else if(I!==void 0)u=(await this.readDataset({datasetName:I})).id;else throw new Error("Must provide a datasetName or datasetId");let b=new URLSearchParams({dataset:u}),Z=n?typeof n=="string"?n:n?.toISOString():void 0;Z&&b.append("as_of",Z);let p=c??!0;if(b.append("inline_s3_urls",p.toString()),l!==void 0)for(let h of l)b.append("id",h);if(a!==void 0)for(let h of a)b.append("splits",h);if(r!==void 0){let h=JSON.stringify(r);b.append("metadata",h)}s!==void 0&&b.append("limit",s.toString()),i!==void 0&&b.append("offset",i.toString()),G!==void 0&&b.append("filter",G),d===!0&&["attachment_urls","outputs","metadata"].forEach(h=>b.append("select",h));let W=0;for await(let h of this._getPaginated("/examples",b)){for(let N of h){let{attachment_urls:V,...R}=N,F=R;V&&(F.attachments=Object.entries(V).reduce((v,[y,w])=>(v[y.slice(11)]={presigned_url:w.presigned_url,mime_type:w.mime_type||void 0},v),{})),yield F,W++}if(s!==void 0&&W>=s)break}}async deleteExample(e){$I(e);let I=`/examples/${e}`;await this.caller.call(async()=>{let l=await this._fetch(this.apiUrl+I,{method:"DELETE",headers:this._mergedHeaders,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});return await Lt(l,`delete ${I}`,!0),l})}async deleteExamples(e,I){if(e.forEach(l=>$I(l)),I?.hardDelete){let l=this._getPlatformEndpointPath("datasets/examples/delete");await this.caller.call(async()=>{let n=await this._fetch(`${this.apiUrl}${l}`,{method:"POST",headers:{...this._mergedHeaders,"Content-Type":"application/json"},body:JSON.stringify({example_ids:e,hard_delete:!0}),signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});return await Lt(n,"hard delete examples",!0),n})}else{let l=new URLSearchParams;e.forEach(n=>l.append("example_ids",n)),await this.caller.call(async()=>{let n=await this._fetch(`${this.apiUrl}/examples?${l.toString()}`,{method:"DELETE",headers:this._mergedHeaders,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});return await Lt(n,"delete examples",!0),n})}}async updateExample(e,I){let l;I?l=e:l=e.id,$I(l);let n;I?n={id:l,...I}:n=e;let a;return n.dataset_id!==void 0?a=n.dataset_id:a=(await this.readExample(l)).dataset_id,this._updateExamplesMultipart(a,[n])}async updateExamples(e){let I;return e[0].dataset_id===void 0?I=(await this.readExample(e[0].id)).dataset_id:I=e[0].dataset_id,this._updateExamplesMultipart(I,e)}async readDatasetVersion({datasetId:e,datasetName:I,asOf:l,tag:n}){let a;if(e?a=e:a=(await this.readDataset({datasetName:I})).id,$I(a),l&&n||!l&&!n)throw new Error("Exactly one of asOf and tag must be specified.");let c=new URLSearchParams;return l!==void 0&&c.append("as_of",typeof l=="string"?l:l.toISOString()),n!==void 0&&c.append("tag",n),await(await this.caller.call(async()=>{let s=await this._fetch(`${this.apiUrl}/datasets/${a}/version?${c.toString()}`,{method:"GET",headers:{...this._mergedHeaders},signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});return await Lt(s,"read dataset version"),s})).json()}async listDatasetSplits({datasetId:e,datasetName:I,asOf:l}){let n;if(e===void 0&&I===void 0)throw new Error("Must provide dataset name or ID");if(e!==void 0&&I!==void 0)throw new Error("Must provide either datasetName or datasetId, not both");e===void 0?n=(await this.readDataset({datasetName:I})).id:n=e,$I(n);let a=new URLSearchParams,c=l?typeof l=="string"?l:l?.toISOString():void 0;return c&&a.append("as_of",c),await this._get(`/datasets/${n}/splits`,a)}async updateDatasetSplits({datasetId:e,datasetName:I,splitName:l,exampleIds:n,remove:a=!1}){let c;if(e===void 0&&I===void 0)throw new Error("Must provide dataset name or ID");if(e!==void 0&&I!==void 0)throw new Error("Must provide either datasetName or datasetId, not both");e===void 0?c=(await this.readDataset({datasetName:I})).id:c=e,$I(c);let r={split_name:l,examples:n.map(i=>($I(i),i)),remove:a},s=JSON.stringify(r);await this.caller.call(async()=>{let i=await this._fetch(`${this.apiUrl}/datasets/${c}/splits`,{method:"PUT",headers:{...this._mergedHeaders,"Content-Type":"application/json"},signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions,body:s});return await Lt(i,"update dataset splits",!0),i})}async createFeedback(e,I,{score:l,value:n,correction:a,comment:c,sourceInfo:r,feedbackSourceType:s="api",sourceRunId:i,feedbackId:G,feedbackConfig:d,projectId:u,comparativeExperimentId:b,sessionId:Z,startTime:p}){if(!e&&!u)throw new Error("One of runId or projectId must be provided");if(e&&u)throw new Error("Only one of runId or projectId can be provided");let W={type:s??"api",metadata:r??{}};i!==void 0&&W?.metadata!==void 0&&!W.metadata.__run&&(W.metadata.__run={run_id:i}),W?.metadata!==void 0&&W.metadata.__run?.run_id!==void 0&&$I(W.metadata.__run.run_id);let h={id:G??Zx(),run_id:e,key:I,score:Ert(l),value:n,correction:a,comment:c,feedback_source:W,comparative_experiment_id:b,feedbackConfig:d,session_id:Z??u,start_time:p},N=JSON.stringify(h),V=`${this.apiUrl}/feedback`;return await this.caller.call(async()=>{let R=await this._fetch(V,{method:"POST",headers:{...this._mergedHeaders,"Content-Type":"application/json"},signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions,body:N});return await Lt(R,"create feedback",!0),R}),h}async updateFeedback(e,{score:I,value:l,correction:n,comment:a}){let c={};I!=null&&(c.score=Ert(I)),l!=null&&(c.value=l),n!=null&&(c.correction=n),a!=null&&(c.comment=a),$I(e);let r=JSON.stringify(c);await this.caller.call(async()=>{let s=await this._fetch(`${this.apiUrl}/feedback/${e}`,{method:"PATCH",headers:{...this._mergedHeaders,"Content-Type":"application/json"},signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions,body:r});return await Lt(s,"update feedback",!0),s})}async readFeedback(e){$I(e);let I=`/feedback/${e}`;return await this._get(I)}async deleteFeedback(e){$I(e);let I=`/feedback/${e}`;await this.caller.call(async()=>{let l=await this._fetch(this.apiUrl+I,{method:"DELETE",headers:this._mergedHeaders,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});return await Lt(l,`delete ${I}`,!0),l})}async*listFeedback({runIds:e,feedbackKeys:I,feedbackSourceTypes:l}={}){let n=new URLSearchParams;if(e)for(let a of e)$I(a),n.append("run",a);if(I)for(let a of I)n.append("key",a);if(l)for(let a of l)n.append("source",a);for await(let a of this._getPaginated("/feedback",n))yield*a}async createPresignedFeedbackToken(e,I,{expiration:l,feedbackConfig:n}={}){let a={run_id:e,feedback_key:I,feedback_config:n};l?typeof l=="string"?a.expires_at=l:(l?.hours||l?.minutes||l?.days)&&(a.expires_in=l):a.expires_in={hours:3};let c=JSON.stringify(a);return await(await this.caller.call(async()=>{let s=await this._fetch(`${this.apiUrl}/feedback/tokens`,{method:"POST",headers:{...this._mergedHeaders,"Content-Type":"application/json"},signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions,body:c});return await Lt(s,"create presigned feedback token"),s})).json()}async createComparativeExperiment({name:e,experimentIds:I,referenceDatasetId:l,createdAt:n,description:a,metadata:c,id:r}){if(I.length===0)throw new Error("At least one experiment is required");if(l||(l=(await this.readProject({projectId:I[0]})).reference_dataset_id),!l==null)throw new Error("A reference dataset is required");let s={id:r,name:e,experiment_ids:I,reference_dataset_id:l,description:a,created_at:(n??new Date)?.toISOString(),extra:{}};c&&(s.extra.metadata=c);let i=JSON.stringify(s);return(await this.caller.call(async()=>{let d=await this._fetch(`${this.apiUrl}/datasets/comparative`,{method:"POST",headers:{...this._mergedHeaders,"Content-Type":"application/json"},signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions,body:i});return await Lt(d,"create comparative experiment"),d})).json()}async*listPresignedFeedbackTokens(e){$I(e);let I=new URLSearchParams({run_id:e});for await(let l of this._getPaginated("/feedback/tokens",I))yield*l}_selectEvalResults(e){let I;return"results"in e?I=e.results:Array.isArray(e)?I=e:I=[e],I}async _logEvaluationFeedback(e,I,l){let n=this._selectEvalResults(e),a=[];for(let c of n){let r=l||{};c.evaluatorInfo&&(r={...c.evaluatorInfo,...r});let s=null;c.targetRunId?s=c.targetRunId:I&&(s=I.id),a.push(await this.createFeedback(s,c.key,{score:c.score,value:c.value,comment:c.comment,correction:c.correction,sourceInfo:r,sourceRunId:c.sourceRunId,feedbackConfig:c.feedbackConfig,feedbackSourceType:"model",sessionId:I?.session_id,startTime:I?.start_time}))}return[n,a]}async logEvaluationFeedback(e,I,l){let[n]=await this._logEvaluationFeedback(e,I,l);return n}async createFeedbackConfig(e){let{feedbackKey:I,feedbackConfig:l,isLowerScoreBetter:n=!1}=e,a={feedback_key:I,feedback_config:l,is_lower_score_better:n};return(await this.caller.call(async()=>{let r=await this._fetch(`${this.apiUrl}/feedback-configs`,{method:"POST",headers:{...this._mergedHeaders,"Content-Type":"application/json"},signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions,body:JSON.stringify(a)});return await Lt(r,"create feedback config"),r})).json()}async*listFeedbackConfigs(e={}){let{feedbackKeys:I,nameContains:l,limit:n}=e,a=new URLSearchParams;I&&I.forEach(r=>{a.append("key",r)}),l&&a.append("name_contains",l),a.append("limit",(n!==void 0?Math.min(n,100):100).toString());let c=0;for await(let r of this._getPaginated("/feedback-configs",a))if(yield*r,c+=r.length,n!==void 0&&c>=n)break}async updateFeedbackConfig(e,I={}){let{feedbackConfig:l,isLowerScoreBetter:n}=I,a={feedback_key:e};return l!==void 0&&(a.feedback_config=l),n!==void 0&&(a.is_lower_score_better=n),(await this.caller.call(async()=>{let r=await this._fetch(`${this.apiUrl}/feedback-configs`,{method:"PATCH",headers:{...this._mergedHeaders,"Content-Type":"application/json"},signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions,body:JSON.stringify(a)});return await Lt(r,"update feedback config"),r})).json()}async deleteFeedbackConfig(e){let I=new URLSearchParams({feedback_key:e});await this.caller.call(async()=>{let l=await this._fetch(`${this.apiUrl}/feedback-configs?${I}`,{method:"DELETE",headers:this._mergedHeaders,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});return await Lt(l,"delete feedback config",!0),l})}async*listAnnotationQueues(e={}){let{queueIds:I,name:l,nameContains:n,limit:a}=e,c=new URLSearchParams;I&&I.forEach((s,i)=>{$I(s,`queueIds[${i}]`),c.append("ids",s)}),l&&c.append("name",l),n&&c.append("name_contains",n),c.append("limit",(a!==void 0?Math.min(a,100):100).toString());let r=0;for await(let s of this._getPaginated("/annotation-queues",c))if(yield*s,r++,a!==void 0&&r>=a)break}async createAnnotationQueue(e){let{name:I,description:l,queueId:n,rubricInstructions:a,rubricItems:c}=e,r={name:I,description:l,id:n||GJ(),rubric_instructions:a,rubric_items:c},s=JSON.stringify(Object.fromEntries(Object.entries(r).filter(([G,d])=>d!==void 0)));return(await this.caller.call(async()=>{let G=await this._fetch(`${this.apiUrl}/annotation-queues`,{method:"POST",headers:{...this._mergedHeaders,"Content-Type":"application/json"},signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions,body:s});return await Lt(G,"create annotation queue"),G})).json()}async readAnnotationQueue(e){return(await this.caller.call(async()=>{let l=await this._fetch(`${this.apiUrl}/annotation-queues/${$I(e,"queueId")}`,{method:"GET",headers:this._mergedHeaders,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});return await Lt(l,"read annotation queue"),l})).json()}async updateAnnotationQueue(e,I){let{name:l,description:n,rubricInstructions:a,rubricItems:c}=I,r={};l!==void 0&&(r.name=l),n!==void 0&&(r.description=n),a!==void 0&&(r.rubric_instructions=a),c!==void 0&&(r.rubric_items=c);let s=JSON.stringify(r);await this.caller.call(async()=>{let i=await this._fetch(`${this.apiUrl}/annotation-queues/${$I(e,"queueId")}`,{method:"PATCH",headers:{...this._mergedHeaders,"Content-Type":"application/json"},signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions,body:s});return await Lt(i,"update annotation queue",!0),i})}async deleteAnnotationQueue(e){await this.caller.call(async()=>{let I=await this._fetch(`${this.apiUrl}/annotation-queues/${$I(e,"queueId")}`,{method:"DELETE",headers:{...this._mergedHeaders,Accept:"application/json"},signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});return await Lt(I,"delete annotation queue",!0),I})}async addRunsToAnnotationQueue(e,I){let l=JSON.stringify(I.map((n,a)=>$I(n,`runIds[${a}]`).toString()));await this.caller.call(async()=>{let n=await this._fetch(`${this.apiUrl}/annotation-queues/${$I(e,"queueId")}/runs`,{method:"POST",headers:{...this._mergedHeaders,"Content-Type":"application/json"},signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions,body:l});return await Lt(n,"add runs to annotation queue",!0),n})}async getRunFromAnnotationQueue(e,I){let l=`/annotation-queues/${$I(e,"queueId")}/run`,a=await(await this.caller.call(async()=>{let c=await this._fetch(`${this.apiUrl}${l}/${I}`,{method:"GET",headers:this._mergedHeaders,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});return await Lt(c,"get run from annotation queue"),c})).json();return bT(a)}async deleteRunFromAnnotationQueue(e,I){await this.caller.call(async()=>{let l=await this._fetch(`${this.apiUrl}/annotation-queues/${$I(e,"queueId")}/runs/${$I(I,"queueRunId")}`,{method:"DELETE",headers:{...this._mergedHeaders,Accept:"application/json"},signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});return await Lt(l,"delete run from annotation queue",!0),l})}async getSizeFromAnnotationQueue(e){return(await this.caller.call(async()=>{let l=await this._fetch(`${this.apiUrl}/annotation-queues/${$I(e,"queueId")}/size`,{method:"GET",headers:this._mergedHeaders,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});return await Lt(l,"get size from annotation queue"),l})).json()}async _currentTenantIsOwner(e){let I=await this._getSettings();return e=="-"||I.tenant_handle===e}async _ownerConflictError(e,I){let l=await this._getSettings();return new Error(`Cannot ${e} for another tenant. + + Current tenant: ${l.tenant_handle} + + Requested tenant: ${I}`)}async _getLatestCommitHash(e){let l=await(await this.caller.call(async()=>{let n=await this._fetch(`${this.apiUrl}/commits/${e}/?limit=1&offset=0`,{method:"GET",headers:this._mergedHeaders,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});return await Lt(n,"get latest commit hash"),n})).json();if(l.commits.length!==0)return l.commits[0].commit_hash}async _likeOrUnlikePrompt(e,I){let[l,n,a]=Ou(e),c=JSON.stringify({like:I});return(await this.caller.call(async()=>{let s=await this._fetch(`${this.apiUrl}/likes/${l}/${n}`,{method:"POST",headers:{...this._mergedHeaders,"Content-Type":"application/json"},signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions,body:c});return await Lt(s,`${I?"like":"unlike"} prompt`),s})).json()}async _getPromptUrl(e){let[I,l,n]=Ou(e);if(await this._currentTenantIsOwner(I)){let a=await this._getSettings();return n!=="latest"?`${this.getHostUrl()}/prompts/${l}/${n.substring(0,8)}?organizationId=${a.id}`:`${this.getHostUrl()}/prompts/${l}?organizationId=${a.id}`}else return n!=="latest"?`${this.getHostUrl()}/hub/${I}/${l}/${n.substring(0,8)}`:`${this.getHostUrl()}/hub/${I}/${l}`}async promptExists(e){return!!await this.getPrompt(e)}async likePrompt(e){return this._likeOrUnlikePrompt(e,!0)}async unlikePrompt(e){return this._likeOrUnlikePrompt(e,!1)}async*listCommits(e){let[I,l,n]=Ou(e);for await(let a of this._getPaginated(`/commits/${I}/${l}/`,new URLSearchParams,c=>c.commits))yield*a}async*listPrompts(e){let I=new URLSearchParams;I.append("sort_field",e?.sortField??"updated_at"),I.append("sort_direction","desc"),I.append("is_archived",(!!e?.isArchived).toString()),e?.isPublic!==void 0&&I.append("is_public",e.isPublic.toString()),e?.query&&I.append("query",e.query);for await(let l of this._getPaginated("/repos",I,n=>n.repos))yield*l}async getPrompt(e){let[I,l,n]=Ou(e),c=await(await this.caller.call(async()=>{let r=await this._fetch(`${this.apiUrl}/repos/${I}/${l}`,{method:"GET",headers:this._mergedHeaders,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});return r?.status===404?null:(await Lt(r,"get prompt"),r)}))?.json();return c?.repo?c.repo:null}async createPrompt(e,I){let l=await this._getSettings();if(I?.isPublic&&!l.tenant_handle)throw new Error(`Cannot create a public prompt without first + + creating a LangChain Hub handle. + You can add a handle by creating a public prompt at: + + https://smith.langchain.com/prompts`);let[n,a,c]=Ou(e);if(!await this._currentTenantIsOwner(n))throw await this._ownerConflictError("create a prompt",n);let r={repo_handle:a,...I?.description&&{description:I.description},...I?.readme&&{readme:I.readme},...I?.tags&&{tags:I.tags},is_public:!!I?.isPublic},s=JSON.stringify(r),i=await this.caller.call(async()=>{let d=await this._fetch(`${this.apiUrl}/repos/`,{method:"POST",headers:{...this._mergedHeaders,"Content-Type":"application/json"},signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions,body:s});return await Lt(d,"create prompt"),d}),{repo:G}=await i.json();return G}async createCommit(e,I,l){if(!await this.promptExists(e))throw new Error("Prompt does not exist, you must create it first.");let[n,a,c]=Ou(e),r=l?.parentCommitHash==="latest"||!l?.parentCommitHash?await this._getLatestCommitHash(`${n}/${a}`):l?.parentCommitHash,s={manifest:JSON.parse(JSON.stringify(I)),parent_commit:r,...l?.description!==void 0&&{description:l.description}},i=JSON.stringify(s),d=await(await this.caller.call(async()=>{let u=await this._fetch(`${this.apiUrl}/commits/${n}/${a}`,{method:"POST",headers:{...this._mergedHeaders,"Content-Type":"application/json"},signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions,body:i});return await Lt(u,"create commit"),u})).json();return this._getPromptUrl(`${n}/${a}${d.commit_hash?`:${d.commit_hash}`:""}`)}async updateExamplesMultipart(e,I=[]){return this._updateExamplesMultipart(e,I)}async _updateExamplesMultipart(e,I=[]){if(!await this._getDatasetExamplesMultiPartSupport())throw new Error("Your LangSmith deployment does not allow using the multipart examples endpoint, please upgrade your deployment to the latest version.");let l=new FormData;for(let c of I){let r=c.id,s={...c.metadata&&{metadata:c.metadata},...c.split&&{split:c.split}},i=Wi(s,`Serializing body for example with id: ${r}`),G=new Blob([i],{type:"application/json"});if(l.append(r,G),c.inputs){let d=Wi(c.inputs,`Serializing inputs for example with id: ${r}`),u=new Blob([d],{type:"application/json"});l.append(`${r}.inputs`,u)}if(c.outputs){let d=Wi(c.outputs,`Serializing outputs whle updating example with id: ${r}`),u=new Blob([d],{type:"application/json"});l.append(`${r}.outputs`,u)}if(c.attachments)for(let[d,u]of Object.entries(c.attachments)){let b,Z;Array.isArray(u)?[b,Z]=u:(b=u.mimeType,Z=u.data);let p=new Blob([Z],{type:`${b}; length=${Z.byteLength}`});l.append(`${r}.attachment.${d}`,p)}if(c.attachments_operations){let d=Wi(c.attachments_operations,`Serializing attachments while updating example with id: ${r}`),u=new Blob([d],{type:"application/json"});l.append(`${r}.attachments_operations`,u)}}let n=e??I[0]?.dataset_id;return(await this.caller.call(async()=>{let c=await this._fetch(`${this.apiUrl}${this._getPlatformEndpointPath(`datasets/${n}/examples`)}`,{method:"PATCH",headers:this._mergedHeaders,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions,body:l});return await Lt(c,"update examples"),c})).json()}async uploadExamplesMultipart(e,I=[]){return this._uploadExamplesMultipart(e,I)}async _uploadExamplesMultipart(e,I=[]){if(!await this._getDatasetExamplesMultiPartSupport())throw new Error("Your LangSmith deployment does not allow using the multipart examples endpoint, please upgrade your deployment to the latest version.");let l=new FormData;for(let a of I){let c=(a.id??GJ()).toString(),r={created_at:a.created_at,...a.metadata&&{metadata:a.metadata},...a.split&&{split:a.split},...a.source_run_id&&{source_run_id:a.source_run_id},...a.use_source_run_io&&{use_source_run_io:a.use_source_run_io},...a.use_source_run_attachments&&{use_source_run_attachments:a.use_source_run_attachments}},s=Wi(r,`Serializing body for uploaded example with id: ${c}`),i=new Blob([s],{type:"application/json"});if(l.append(c,i),a.inputs){let G=Wi(a.inputs,`Serializing inputs for uploaded example with id: ${c}`),d=new Blob([G],{type:"application/json"});l.append(`${c}.inputs`,d)}if(a.outputs){let G=Wi(a.outputs,`Serializing outputs for uploaded example with id: ${c}`),d=new Blob([G],{type:"application/json"});l.append(`${c}.outputs`,d)}if(a.attachments)for(let[G,d]of Object.entries(a.attachments)){let u,b;Array.isArray(d)?[u,b]=d:(u=d.mimeType,b=d.data);let Z=new Blob([b],{type:`${u}; length=${b.byteLength}`});l.append(`${c}.attachment.${G}`,Z)}}return(await this.caller.call(async()=>{let a=await this._fetch(`${this.apiUrl}${this._getPlatformEndpointPath(`datasets/${e}/examples`)}`,{method:"POST",headers:this._mergedHeaders,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions,body:l});return await Lt(a,"upload examples"),a})).json()}async updatePrompt(e,I){if(!await this.promptExists(e))throw new Error("Prompt does not exist, you must create it first.");let[l,n]=Ou(e);if(!await this._currentTenantIsOwner(l))throw await this._ownerConflictError("update a prompt",l);let a={};if(I?.description!==void 0&&(a.description=I.description),I?.readme!==void 0&&(a.readme=I.readme),I?.tags!==void 0&&(a.tags=I.tags),I?.isPublic!==void 0&&(a.is_public=I.isPublic),I?.isArchived!==void 0&&(a.is_archived=I.isArchived),Object.keys(a).length===0)throw new Error("No valid update options provided");let c=JSON.stringify(a);return(await this.caller.call(async()=>{let s=await this._fetch(`${this.apiUrl}/repos/${l}/${n}`,{method:"PATCH",headers:{...this._mergedHeaders,"Content-Type":"application/json"},signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions,body:c});return await Lt(s,"update prompt"),s})).json()}async deletePrompt(e){if(!await this.promptExists(e))throw new Error("Prompt does not exist, you must create it first.");let[I,l,n]=Ou(e);if(!await this._currentTenantIsOwner(I))throw await this._ownerConflictError("delete a prompt",I);return(await this.caller.call(async()=>{let c=await this._fetch(`${this.apiUrl}/repos/${I}/${l}`,{method:"DELETE",headers:this._mergedHeaders,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});return await Lt(c,"delete prompt"),c})).json()}_getPromptCacheKey(e,I){return`${e}${I?":with_model":""}`}async _fetchPromptFromApi(e,I){let[l,n,a]=Ou(e),r=await(await this.caller.call(async()=>{let s=await this._fetch(`${this.apiUrl}/commits/${l}/${n}/${a}${I?.includeModel?"?include_model=true":""}`,{method:"GET",headers:this._mergedHeaders,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});return await Lt(s,"pull prompt commit"),s})).json();return{owner:l,repo:n,commit_hash:r.commit_hash,manifest:r.manifest,examples:r.examples,hub_model_config:r.model_config,hub_model_provider:r.model_provider}}async pullPromptCommit(e,I){let l=this._fetchPromptFromApi.bind(this,e,I);if(!I?.skipCache&&this._promptCache){let n=this._getPromptCacheKey(e,I?.includeModel),a=this._promptCache.get(n,l);if(a)return a;let c=await l();return this._promptCache.set(n,c,l),c}return this._fetchPromptFromApi(e,I)}async _pullPrompt(e,I){let l=await this.pullPromptCommit(e,{includeModel:I?.includeModel,skipCache:I?.skipCache});return JSON.stringify(l.manifest)}async pushPrompt(e,I){return await this.promptExists(e)?I&&Object.keys(I).some(n=>n!=="object")&&await this.updatePrompt(e,{description:I?.description,readme:I?.readme,tags:I?.tags,isPublic:I?.isPublic}):await this.createPrompt(e,{description:I?.description,readme:I?.readme,tags:I?.tags,isPublic:I?.isPublic}),I?.object?await this.createCommit(e,I?.object,{parentCommitHash:I?.parentCommitHash,description:I?.commitDescription}):await this._getPromptUrl(e)}async agentExists(e){let[I,l]=Ou(e);return this._repoExists(I,l)}async skillExists(e){let[I,l]=Ou(e);return this._repoExists(I,l)}async pullAgent(e,I){return await this._pullDirectory(e,"agent",I?.version)}async pullSkill(e,I){return await this._pullDirectory(e,"skill",I?.version)}async pushAgent(e,I){return this._pushDirectory(e,"agent",I)}async pushSkill(e,I){return this._pushDirectory(e,"skill",I)}async deleteAgent(e){return this._deleteDirectory(e)}async deleteSkill(e){return this._deleteDirectory(e)}async*listAgents(e){yield*this._listReposByType("agent",e)}async*listSkills(e){yield*this._listReposByType("skill",e)}async*_listReposByType(e,I){let l=new URLSearchParams;l.append("repo_type",e),l.append("is_archived",(!!I?.isArchived).toString()),I?.isPublic!==void 0&&l.append("is_public",I.isPublic.toString()),I?.query&&l.append("query",I.query);for await(let n of this._getPaginated("/repos",l,a=>a.repos))yield*n}async _pullDirectory(e,I,l){let[n,a,c]=Ou(e),r=l??(c!=="latest"?c:void 0),s=new URL(`${this.apiUrl}/v1/platform/hub/repos/${n}/${a}/directories`);return s.searchParams.set("repo_type",I),r&&s.searchParams.set("commit",r),await(await this.caller.call(async()=>{let G=await this._fetch(s.toString(),{method:"GET",headers:this._mergedHeaders,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});return await Lt(G,"pull directory"),G})).json()}async _pushDirectory(e,I,l){if(l.parentCommit!==void 0&&(l.parentCommit.length<8||l.parentCommit.length>64))throw new Error("parent_commit must be 8-64 characters");let[n,a]=Ou(e);if(!await this._currentTenantIsOwner(n))throw await this._ownerConflictError(`push ${I}`,n);if(await this._repoExists(n,a))(l.description!==void 0||l.readme!==void 0||l.tags!==void 0||l.isPublic!==void 0)&&await this._updateRepoMetadata(n,a,l);else{let G=/^[a-z][a-z0-9-_]*$/;if(!G.test(a))throw new Error(`Invalid repo_handle ${JSON.stringify(a)}: must match ${G}`);await this._createRepo(a,I,l)}let c={files:l.files};l.parentCommit&&(c.parent_commit=l.parentCommit);let i=(await(await this.caller.call(async()=>{let G=await this._fetch(`${this.apiUrl}/v1/platform/hub/repos/${n}/${a}/directories/commits`,{method:"POST",headers:{...this._mergedHeaders,"Content-Type":"application/json"},signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions,body:JSON.stringify(c)});return await Lt(G,`push ${I}`),G})).json()).commit.commit_hash;return`${this.getHostUrl()}/hub/${n}/${a}:${i.slice(0,8)}`}async _deleteDirectory(e){let[I,l]=Ou(e);if(!await this._currentTenantIsOwner(I))throw await this._ownerConflictError("delete",I);await this.caller.call(async()=>{let n=await this._fetch(`${this.apiUrl}/v1/platform/hub/repos/${I}/${l}/directories`,{method:"DELETE",headers:this._mergedHeaders,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});return await Lt(n,"delete directory"),n})}async _repoExists(e,I){try{return await this.caller.call(async()=>{let l=await this._fetch(`${this.apiUrl}/repos/${e}/${I}`,{method:"GET",headers:this._mergedHeaders,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});return await Lt(l,"check repo exists"),l}),!0}catch(l){if(hne(l))return!1;throw l}}async _createRepo(e,I,l){let n={repo_handle:e,repo_type:I,is_public:!!l.isPublic};l.description!==void 0&&(n.description=l.description),l.readme!==void 0&&(n.readme=l.readme),l.tags!==void 0&&(n.tags=l.tags);try{await this.caller.call(async()=>{let a=await this._fetch(`${this.apiUrl}/repos/`,{method:"POST",headers:{...this._mergedHeaders,"Content-Type":"application/json"},signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions,body:JSON.stringify(n)});return await Lt(a,`create ${I}`),a})}catch(a){if(Wrt(a))return;throw a}}async _updateRepoMetadata(e,I,l){let n={};l.description!==void 0&&(n.description=l.description),l.readme!==void 0&&(n.readme=l.readme),l.tags!==void 0&&(n.tags=l.tags),l.isPublic!==void 0&&(n.is_public=l.isPublic),Object.keys(n).length!==0&&await this.caller.call(async()=>{let a=await this._fetch(`${this.apiUrl}/repos/${e}/${I}`,{method:"PATCH",headers:{...this._mergedHeaders,"Content-Type":"application/json"},signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions,body:JSON.stringify(n)});return await Lt(a,"update repo metadata"),a})}async clonePublicDataset(e,I={}){let{sourceApiUrl:l=this.apiUrl,datasetName:n}=I,[a,c]=this.parseTokenOrUrl(e,l),r=new t({apiUrl:a,apiKey:"placeholder"}),s=await r.readSharedDataset(c),i=n||s.name;try{if(await this.hasDataset({datasetId:i})){console.log(`Dataset ${i} already exists in your tenant. Skipping.`);return}}catch{}let G=await r.listSharedExamples(c),d=await this.createDataset(i,{description:s.description,dataType:s.data_type||"kv",inputsSchema:s.inputs_schema_definition??void 0,outputsSchema:s.outputs_schema_definition??void 0});try{await this.createExamples({inputs:G.map(u=>u.inputs),outputs:G.flatMap(u=>u.outputs?[u.outputs]:[]),datasetId:d.id})}catch(u){throw console.error(`An error occurred while creating dataset ${i}. You should delete it manually.`),u}}parseTokenOrUrl(e,I,l=2,n="dataset"){try{return $I(e),[I,e]}catch{}try{let c=new URL(e).pathname.split("/").filter(r=>r!=="");if(c.length>=l){let r=c[c.length-l];return[I,r]}else throw new Error(`Invalid public ${n} URL: ${e}`)}catch{throw new Error(`Invalid public ${n} URL or token: ${e}`)}}cleanup(){this._promptCache&&this._promptCache.stop()}async awaitPendingTraceBatches(){if(this.manualFlushMode)return console.warn("[WARNING]: When tracing in manual flush mode, you must call `await client.flush()` manually to submit trace batches."),Promise.resolve();for(await new Promise(e=>setTimeout(e,1));this._pendingDrains.size>0;)await Promise.all([...this._pendingDrains]);await Promise.all([...this.autoBatchQueue.items.map(({itemPromise:e})=>e),this.batchIngestCaller.queue.onIdle()]),this.langSmithToOTELTranslator!==void 0&&await Irt()?.DEFAULT_LANGSMITH_SPAN_PROCESSOR?.forceFlush()}toString(){let e=[`apiUrl=${JSON.stringify(this.apiUrl)}`];return this.webUrl!==void 0&&e.push(`webUrl=${JSON.stringify(this.webUrl)}`),this.workspaceId!==void 0&&e.push(`workspaceId=${JSON.stringify(this.workspaceId)}`),`[LangSmithClient ${e.join(" ")}]`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}};Object.defineProperty(Yp,"_fallbackDirsCreated",{enumerable:!0,configurable:!0,writable:!0,value:new Set})});var krt,xrt=g(()=>{o();VX();krt=t=>t!==void 0?t:!!["TRACING_V2","TRACING"].find(I=>ra(I)==="true")});var kA,rZa,Rne,bve=g(()=>{o();kA=Symbol.for("lc:context_variables"),rZa=Symbol.for("lc:child_run_end_promises"),Rne=Symbol.for("langsmith:replica_trace_roots")});function mve(t,e){if(kA in t)return t[kA][e]}function jrt(t,e,I){let l=kA in t?t[kA]:{};l[e]=I,t[kA]=l}var Urt=g(()=>{o();bve()});function Ort(t){let I=Object.keys(t).sort().map(l=>`${l}:${t[l]??""}`).join("|");return Nge(I,u5I)}function b5I(t){return t.replace(/[-:.]/g,"")}function Brt(t,e=1){let I=e.toFixed(0).slice(0,3).padStart(3,"0");return`${new Date(t).toISOString().slice(0,-1)}${I}Z`}function Zve(t,e,I=1){let l=Brt(t,I);return{dottedOrder:b5I(l)+e,microsecondPrecisionDatestring:l}}function Z5I(t){let e={};for(let I of Object.keys(t))m5I.has(I)&&(e[I]=t[I]);return e}function Mrt(t){return t!=null&&typeof t.createChild=="function"&&typeof t.postRun=="function"}function Srt(t){return typeof t=="object"&&t!=null&&typeof t.name=="string"&&t.name==="langchain_tracer"}function zrt(t){return Array.isArray(t)&&t.some(e=>Srt(e))}function p5I(t){return typeof t=="object"&&t!=null&&Array.isArray(t.handlers)}function h5I(t){let e=t?.callbacks;return t!=null&&typeof e=="object"&&(zrt(e?.handlers)||zrt(e))}function W5I(){let t=$m("LANGSMITH_RUNS_ENDPOINTS");if(!t)return[];try{let e=JSON.parse(t);if(Array.isArray(e)){let I=[];for(let l of e){if(typeof l!="object"||l===null){console.warn(`Invalid item type in LANGSMITH_RUNS_ENDPOINTS: expected object, got ${typeof l}`);continue}if(typeof l.api_url!="string"){console.warn(`Invalid api_url type in LANGSMITH_RUNS_ENDPOINTS: expected string, got ${typeof l.api_url}`);continue}if(typeof l.api_key!="string"){console.warn(`Invalid api_key type in LANGSMITH_RUNS_ENDPOINTS: expected string, got ${typeof l.api_key}`);continue}I.push({apiUrl:l.api_url.replace(/\/$/,""),apiKey:l.api_key})}return I}else if(typeof e=="object"&&e!==null){V5I(e);let I=[];for(let[l,n]of Object.entries(e)){let a=l.replace(/\/$/,"");if(typeof n=="string")I.push({apiUrl:a,apiKey:n});else{console.warn(`Invalid value type in LANGSMITH_RUNS_ENDPOINTS for URL ${l}: expected string, got ${typeof n}`);continue}}return I}else return console.warn(`Invalid LANGSMITH_RUNS_ENDPOINTS \u2013 must be valid JSON array of objects with api_url and api_key properties, or object mapping url->apiKey, got ${typeof e}`),[]}catch(e){if(Vrt(e))throw e;return console.warn("Invalid LANGSMITH_RUNS_ENDPOINTS \u2013 must be valid JSON array of objects with api_url and api_key properties, or object mapping url->apiKey"),[]}}function N5I(t){return t?t.map(e=>Array.isArray(e)?{projectName:e[0],updates:e[1]}:e):W5I()}function V5I(t){if(Object.keys(t).length>0&&ra("ENDPOINT"))throw new Zne}var mT,u5I,m5I,Ane,zR,Cge=g(()=>{o();Jge();xrt();Wne();bve();Urt();VX();vge();VX();Sle();$le();sT();mT=36,u5I="6ba7b810-9dad-11d1-80b4-00c04fd430c8";m5I=new Set(["projectName","updates","reroot"]);Ane=class t{constructor(e,I,l,n){Object.defineProperty(this,"metadata",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"tags",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"project_name",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"replicas",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.metadata=e,this.tags=I,this.project_name=l,this.replicas=n}static fromHeader(e){let I=e.split(","),l={},n=[],a,c;for(let r of I){let[s,i]=r.split("="),G=decodeURIComponent(i);s==="langsmith-metadata"?l=JSON.parse(G):s==="langsmith-tags"?n=G.split(","):s==="langsmith-project"?a=G:s==="langsmith-replicas"&&(c=JSON.parse(G).map(u=>Array.isArray(u)?u:Z5I(u)))}return new t(l,n,a,c)}toHeader(){let e=[];return this.metadata&&Object.keys(this.metadata).length>0&&e.push(`langsmith-metadata=${encodeURIComponent(JSON.stringify(this.metadata))}`),this.tags&&this.tags.length>0&&e.push(`langsmith-tags=${encodeURIComponent(this.tags.join(","))}`),this.project_name&&e.push(`langsmith-project=${encodeURIComponent(this.project_name)}`),e.join(",")}},zR=class t{constructor(e){if(Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"run_type",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"project_name",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"parent_run",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"parent_run_id",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"child_runs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"start_time",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"end_time",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"extra",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"tags",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"error",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"serialized",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"inputs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"outputs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reference_example_id",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"events",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"trace_id",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"dotted_order",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"tracingEnabled",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"execution_order",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"child_execution_order",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"attachments",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"replicas",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"distributedParentId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_serialized_start_time",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_awaitInputsOnPost",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Mrt(e)){Object.assign(this,{...e});return}let I=t.getDefaultConfig(),{metadata:l,...n}=e,a=n.client??t.getSharedClient(),c={...l,...n?.extra?.metadata};if(n.extra={...n.extra,metadata:c},"id"in n&&n.id==null&&delete n.id,Object.assign(this,{...I,...n,client:a}),this.execution_order??=1,this.child_execution_order??=1,this.dotted_order||(this._serialized_start_time=Brt(this.start_time,this.execution_order)),this.id||(this.id=Ple(this._serialized_start_time??this.start_time)),this.trace_id||(this.parent_run?this.trace_id=this.parent_run.trace_id??this.id:this.trace_id=this.id),this.replicas=N5I(this.replicas),!this.dotted_order){let{dottedOrder:r}=Zve(this.start_time,this.id,this.execution_order);this.parent_run?this.dotted_order=this.parent_run.dotted_order+"."+r:this.dotted_order=r}}set metadata(e){this.extra={...this.extra,metadata:{...this.extra?.metadata,...e}}}get metadata(){return this.extra?.metadata}static getDefaultConfig(){let e=Date.now();return{run_type:"chain",project_name:oT(),child_runs:[],api_url:$m("LANGCHAIN_ENDPOINT")??"http://localhost:1984",api_key:$m("LANGCHAIN_API_KEY"),caller_options:{},start_time:e,serialized:{},inputs:{},extra:{}}}static getSharedClient(){return t.sharedClient||(t.sharedClient=new Yp),t.sharedClient}createChild(e){let I=this.child_execution_order+1,l=this.replicas?.map(u=>{let{reroot:b,...Z}=u;return Z}),n=e.replicas??l,a=new t({...e,parent_run:this,project_name:this.project_name,replicas:n,client:this.client,tracingEnabled:this.tracingEnabled,execution_order:I,child_execution_order:I}),c=this.extra?.metadata??{},r=a.extra?.metadata??{};Object.keys(c).length>0&&(a.extra={...a.extra,metadata:{...c,...r}}),kA in this&&(a[kA]=this[kA]);let s=Symbol.for("lc:child_config"),i=e.extra?.[s]??this.extra[s];if(h5I(i)){let u={...i},b=p5I(u.callbacks)?u.callbacks.copy?.():void 0;b&&(Object.assign(b,{_parentRunId:a.id}),b.handlers?.find(Srt)?.updateFromRunTree?.(a),u.callbacks=b),a.extra[s]=u}let G=new Set,d=this;for(;d!=null&&!G.has(d.id);)G.add(d.id),d.child_execution_order=Math.max(d.child_execution_order,I),d=d.parent_run;return this.child_runs.push(a),a}async end(e,I,l=Date.now(),n){this.outputs=this.outputs??e,this.error=this.error??I,this.end_time=this.end_time??l,n&&Object.keys(n).length>0&&(this.extra=this.extra?{...this.extra,metadata:{...this.extra.metadata,...n}}:{metadata:n})}_convertToCreate(e,I,l=!0){let n=e.extra??{};if(n?.runtime?.library===void 0&&(n.runtime||(n.runtime={}),I))for(let[r,s]of Object.entries(I))n.runtime[r]||(n.runtime[r]=s);let a=e.parent_run?.id??e.parent_run_id,c;return l?c=[]:c=e.child_runs.map(r=>this._convertToCreate(r,I,l)),{id:e.id,name:e.name,start_time:e._serialized_start_time??e.start_time,end_time:e.end_time,run_type:e.run_type,reference_example_id:e.reference_example_id,extra:n,serialized:e.serialized,error:e.error,inputs:e.inputs,outputs:e.outputs,session_name:e.project_name,child_runs:c,parent_run_id:a,trace_id:e.trace_id,dotted_order:e.dotted_order,tags:e.tags,attachments:e.attachments,events:e.events}}_sliceParentId(e,I){if(I.dotted_order){let l=I.dotted_order.split("."),n=null;for(let a=0;a0?I.trace_id=a[0].slice(-mT):I.trace_id=I.id}}I.parent_run_id===e&&(I.parent_run_id=void 0)}_setReplicaTraceRoot(e,I){let l=mve(this,Rne)??{};l[e]=I,jrt(this,Rne,l);for(let n of this.child_runs)n._setReplicaTraceRoot(e,I)}_remapForProject(e){let{projectName:I,runtimeEnv:l,excludeChildRuns:n=!0,reroot:a=!1,distributedParentId:c,apiUrl:r,apiKey:s,workspaceId:i}=e,G=this._convertToCreate(this,l,n);if(I===this.project_name)return{...G,session_name:I};if(a){if(c)this._sliceParentId(c,G);else if(G.parent_run_id=void 0,G.dotted_order){let N=G.dotted_order.split(".");N.length>0&&(G.dotted_order=N[N.length-1],G.trace_id=G.id)}let h=Ort({projectName:I,apiUrl:r,apiKey:s,workspaceId:i});this._setReplicaTraceRoot(h,G.id)}let d;if(!a){let h=mve(this,Rne)??{},N=Ort({projectName:I,apiUrl:r,apiKey:s,workspaceId:i});if(d=h[N],d&&(G.trace_id=d,G.dotted_order)){let V=G.dotted_order.split("."),R=null;for(let F=0;F{let R=V.slice(-mT),F=iT(R,I);return V.slice(0,-mT)+F}).join(".")),{...G,id:b,trace_id:Z,parent_run_id:p,dotted_order:W,session_name:I}}async postRun(e=!0){this._awaitInputsOnPost&&(this.inputs=await this.inputs);try{let I=ane();if(this.replicas&&this.replicas.length>0)for(let{projectName:l,apiKey:n,apiUrl:a,workspaceId:c,reroot:r,client:s}of this.replicas){let i=this._remapForProject({projectName:l??this.project_name,runtimeEnv:I,excludeChildRuns:!0,reroot:r,distributedParentId:this.distributedParentId,apiUrl:a,apiKey:n,workspaceId:c});await(s??this.client).createRun(i,{apiKey:n,apiUrl:a,workspaceId:c})}else{let l=this._convertToCreate(this,I,e);await this.client.createRun(l)}if(!e){dJ("Posting with excludeChildRuns=false is deprecated and will be removed in a future version.");for(let l of this.child_runs)await l.postRun(!1)}this.child_runs=[]}catch(I){console.error(`Error in postRun for run ${this.id}:`,I)}}async patchRun(e){if(this.replicas&&this.replicas.length>0)for(let{projectName:I,apiKey:l,apiUrl:n,workspaceId:a,updates:c,reroot:r,client:s}of this.replicas){let i=this._remapForProject({projectName:I??this.project_name,runtimeEnv:void 0,excludeChildRuns:!0,reroot:r,distributedParentId:this.distributedParentId,apiUrl:n,apiKey:l,workspaceId:a}),G={id:i.id,name:i.name,run_type:i.run_type,start_time:i.start_time,outputs:i.outputs,error:i.error,parent_run_id:i.parent_run_id,session_name:i.session_name,reference_example_id:i.reference_example_id,end_time:i.end_time,dotted_order:i.dotted_order,trace_id:i.trace_id,events:i.events,tags:i.tags,extra:i.extra,attachments:this.attachments,...c};e?.excludeInputs||(G.inputs=i.inputs),await(s??this.client).updateRun(i.id,G,{apiKey:l,apiUrl:n,workspaceId:a})}else try{let I={name:this.name,run_type:this.run_type,start_time:this._serialized_start_time??this.start_time,end_time:this.end_time,error:this.error,outputs:this.outputs,parent_run_id:this.parent_run?.id??this.parent_run_id,reference_example_id:this.reference_example_id,extra:this.extra,events:this.events,dotted_order:this.dotted_order,trace_id:this.trace_id,tags:this.tags,attachments:this.attachments,session_name:this.project_name};e?.excludeInputs||(I.inputs=this.inputs),await this.client.updateRun(this.id,I)}catch(I){console.error(`Error in patchRun for run ${this.id}`,I)}this.child_runs=[]}toJSON(){return this._convertToCreate(this,void 0,!1)}addEvent(e){this.events||(this.events=[]),typeof e=="string"?this.events.push({name:"event",time:new Date().toISOString(),message:e}):this.events.push({...e,time:e.time??new Date().toISOString()})}static fromRunnableConfig(e,I){let l=e?.callbacks,n,a,c,r=krt();if(l){let i=l?.getParentRunId?.()??"",G=l?.handlers?.find(d=>d?.name=="langchain_tracer");n=G?.getRun?.(i),a=G?.projectName,c=G?.client,r=r||!!G}return n?new t({name:n.name,id:n.id,trace_id:n.trace_id,dotted_order:n.dotted_order,client:c,tracingEnabled:r,project_name:a,tags:[...new Set((n?.tags??[]).concat(e?.tags??[]))],extra:{metadata:{...n?.extra?.metadata,...e?.metadata}}}).createChild(I):new t({...I,client:c,tracingEnabled:r,project_name:a})}static fromDottedOrder(e){return this.fromHeaders({"langsmith-trace":e})}static fromHeaders(e,I){let l="get"in e&&typeof e.get=="function"?{"langsmith-trace":e.get("langsmith-trace"),baggage:e.get("baggage")}:e,n=l["langsmith-trace"];if(!n||typeof n!="string")return;let a=n.trim(),c=a.split(".").map(G=>{let[d,u]=G.split("Z");return{strTime:d,time:Date.parse(d+"Z"),uuid:u}}),r=c[0].uuid,s={...I,name:I?.name??"parent",run_type:I?.run_type??"chain",start_time:I?.start_time??Date.now(),id:c.at(-1)?.uuid,trace_id:r,dotted_order:a};if(l.baggage&&typeof l.baggage=="string"){let G=Ane.fromHeader(l.baggage);s.metadata=G.metadata,s.tags=G.tags,s.project_name=G.project_name,s.replicas=G.replicas}let i=new t(s);return i.distributedParentId=i.id,i}toHeaders(e){let I={"langsmith-trace":this.dotted_order,baggage:new Ane(this.extra?.metadata,this.tags,this.project_name,this.replicas).toHeader()};if(e)for(let[l,n]of Object.entries(I))e.set(l,n);return I}};Object.defineProperty(zR,"sharedClient",{enumerable:!0,configurable:!0,writable:!0,value:null})});var Fne=g(()=>{o();Cge()});function hve(t,e){if(t)return new zR({...t,start_time:t._serialized_start_time??t.start_time,parent_run:hve(e),child_runs:t.child_runs.map(I=>hve(I)).filter(I=>I!==void 0),extra:{...t.extra,runtime:ige()},tracingEnabled:!1})}function pve(t,e){return t&&!Array.isArray(t)&&typeof t=="object"?t:{[e]:t}}function bJ(t){return typeof t._addRunToRunMap=="function"}var Trt,Y5I,Ni,BR=g(()=>{o();Ct();ca();yH();Fne();Trt=ve({BaseTracer:()=>Ni,isBaseTracer:()=>bJ}),Y5I=t=>{if(t)return t.events=t.events??[],t.child_runs=t.child_runs??[],t};Ni=class extends OR{runMap=new Map;runTreeMap=new Map;usesRunTreeMap=!1;constructor(t){super(...arguments)}copy(){return this}getRunById(t){if(t!==void 0)return this.usesRunTreeMap?Y5I(this.runTreeMap.get(t)):this.runMap.get(t)}stringifyError(t){return t instanceof Error?t.message+(t?.stack?` + +${t.stack}`:""):typeof t=="string"?t:`${t}`}_addChildRun(t,e){t.child_runs.push(e)}_addRunToRunMap(t){let{dottedOrder:e,microsecondPrecisionDatestring:I}=Zve(new Date(t.start_time).getTime(),t.id,t.execution_order),l={...t},n=this.getRunById(l.parent_run_id);if(l.parent_run_id!==void 0?n?(this._addChildRun(n,l),n.child_execution_order=Math.max(n.child_execution_order,l.child_execution_order),l.trace_id=n.trace_id,n.dotted_order!==void 0&&(l.dotted_order=[n.dotted_order,e].join("."),l._serialized_start_time=I)):l.parent_run_id=void 0:(l.trace_id=l.id,l.dotted_order=e,l._serialized_start_time=I),this.usesRunTreeMap){let a=hve(l,n);a!==void 0&&this.runTreeMap.set(l.id,a)}else this.runMap.set(l.id,l);return l}async _endTrace(t){let e=t.parent_run_id!==void 0&&this.getRunById(t.parent_run_id);e?e.child_execution_order=Math.max(e.child_execution_order,t.child_execution_order):await this.persistRun(t),await this.onRunUpdate?.(t),this.usesRunTreeMap?this.runTreeMap.delete(t.id):this.runMap.delete(t.id)}_getExecutionOrder(t){let e=t!==void 0&&this.getRunById(t);return e?e.child_execution_order+1:1}_createRunForLLMStart(t,e,I,l,n,a,c,r){let s=this._getExecutionOrder(l),i=Date.now(),G=c?{...n,metadata:c}:n,d={id:I,name:r??t.id[t.id.length-1],parent_run_id:l,start_time:i,serialized:t,events:[{name:"start",time:new Date(i).toISOString()}],inputs:{prompts:e},execution_order:s,child_runs:[],child_execution_order:s,run_type:"llm",extra:G??{},tags:a||[]};return this._addRunToRunMap(d)}async handleLLMStart(t,e,I,l,n,a,c,r){let s=this.getRunById(I)??this._createRunForLLMStart(t,e,I,l,n,a,c,r);return await this.onRunCreate?.(s),await this.onLLMStart?.(s),s}_createRunForChatModelStart(t,e,I,l,n,a,c,r){let s=this._getExecutionOrder(l),i=Date.now(),G=c?{...n,metadata:c}:n,d={id:I,name:r??t.id[t.id.length-1],parent_run_id:l,start_time:i,serialized:t,events:[{name:"start",time:new Date(i).toISOString()}],inputs:{messages:e},execution_order:s,child_runs:[],child_execution_order:s,run_type:"llm",extra:G??{},tags:a||[]};return this._addRunToRunMap(d)}async handleChatModelStart(t,e,I,l,n,a,c,r){let s=this.getRunById(I)??this._createRunForChatModelStart(t,e,I,l,n,a,c,r);return await this.onRunCreate?.(s),await this.onLLMStart?.(s),s}async handleLLMEnd(t,e,I,l,n){let a=this.getRunById(e);if(!a||a?.run_type!=="llm")throw new Error("No LLM run to end.");return a.end_time=Date.now(),a.outputs=t,a.events.push({name:"end",time:new Date(a.end_time).toISOString()}),a.extra={...a.extra,...n},await this.onLLMEnd?.(a),await this._endTrace(a),a}async handleLLMError(t,e,I,l,n){let a=this.getRunById(e);if(!a||a?.run_type!=="llm")throw new Error("No LLM run to end.");return a.end_time=Date.now(),a.error=this.stringifyError(t),a.events.push({name:"error",time:new Date(a.end_time).toISOString()}),a.extra={...a.extra,...n},await this.onLLMError?.(a),await this._endTrace(a),a}_createRunForChainStart(t,e,I,l,n,a,c,r,s){let i=this._getExecutionOrder(l),G=Date.now(),d={id:I,name:r??t.id[t.id.length-1],parent_run_id:l,start_time:G,serialized:t,events:[{name:"start",time:new Date(G).toISOString()}],inputs:e,execution_order:i,child_execution_order:i,run_type:c??"chain",child_runs:[],extra:a?{...s,metadata:a}:{...s},tags:n||[]};return this._addRunToRunMap(d)}async handleChainStart(t,e,I,l,n,a,c,r){let s=this.getRunById(I)??this._createRunForChainStart(t,e,I,l,n,a,c,r);return await this.onRunCreate?.(s),await this.onChainStart?.(s),s}async handleChainEnd(t,e,I,l,n){let a=this.getRunById(e);if(!a)throw new Error("No chain run to end.");return a.end_time=Date.now(),a.outputs=pve(t,"output"),a.events.push({name:"end",time:new Date(a.end_time).toISOString()}),n?.inputs!==void 0&&(a.inputs=pve(n.inputs,"input")),await this.onChainEnd?.(a),await this._endTrace(a),a}async handleChainError(t,e,I,l,n){let a=this.getRunById(e);if(!a)throw new Error("No chain run to end.");return a.end_time=Date.now(),a.error=this.stringifyError(t),a.events.push({name:"error",time:new Date(a.end_time).toISOString()}),n?.inputs!==void 0&&(a.inputs=pve(n.inputs,"input")),await this.onChainError?.(a),await this._endTrace(a),a}_createRunForToolStart(t,e,I,l,n,a,c){let r=this._getExecutionOrder(l),s=Date.now(),i={id:I,name:c??t.id[t.id.length-1],parent_run_id:l,start_time:s,serialized:t,events:[{name:"start",time:new Date(s).toISOString()}],inputs:{input:e},execution_order:r,child_execution_order:r,run_type:"tool",child_runs:[],extra:a?{metadata:a}:{},tags:n||[]};return this._addRunToRunMap(i)}async handleToolStart(t,e,I,l,n,a,c){let r=this.getRunById(I)??this._createRunForToolStart(t,e,I,l,n,a,c);return await this.onRunCreate?.(r),await this.onToolStart?.(r),r}async handleToolEnd(t,e){let I=this.getRunById(e);if(!I||I?.run_type!=="tool")throw new Error("No tool run to end");return I.end_time=Date.now(),I.outputs={output:t},I.events.push({name:"end",time:new Date(I.end_time).toISOString()}),await this.onToolEnd?.(I),await this._endTrace(I),I}async handleToolError(t,e){let I=this.getRunById(e);if(!I||I?.run_type!=="tool")throw new Error("No tool run to end");return I.end_time=Date.now(),I.error=this.stringifyError(t),I.events.push({name:"error",time:new Date(I.end_time).toISOString()}),await this.onToolError?.(I),await this._endTrace(I),I}async handleAgentAction(t,e){let I=this.getRunById(e);if(!I||I?.run_type!=="chain")return;let l=I;l.actions=l.actions||[],l.actions.push(t),l.events.push({name:"agent_action",time:new Date().toISOString(),kwargs:{action:t}}),await this.onAgentAction?.(I)}async handleAgentEnd(t,e){let I=this.getRunById(e);!I||I?.run_type!=="chain"||(I.events.push({name:"agent_end",time:new Date().toISOString(),kwargs:{action:t}}),await this.onAgentEnd?.(I))}_createRunForRetrieverStart(t,e,I,l,n,a,c){let r=this._getExecutionOrder(l),s=Date.now(),i={id:I,name:c??t.id[t.id.length-1],parent_run_id:l,start_time:s,serialized:t,events:[{name:"start",time:new Date(s).toISOString()}],inputs:{query:e},execution_order:r,child_execution_order:r,run_type:"retriever",child_runs:[],extra:a?{metadata:a}:{},tags:n||[]};return this._addRunToRunMap(i)}async handleRetrieverStart(t,e,I,l,n,a,c){let r=this.getRunById(I)??this._createRunForRetrieverStart(t,e,I,l,n,a,c);return await this.onRunCreate?.(r),await this.onRetrieverStart?.(r),r}async handleRetrieverEnd(t,e){let I=this.getRunById(e);if(!I||I?.run_type!=="retriever")throw new Error("No retriever run to end");return I.end_time=Date.now(),I.outputs={documents:t},I.events.push({name:"end",time:new Date(I.end_time).toISOString()}),await this.onRetrieverEnd?.(I),await this._endTrace(I),I}async handleRetrieverError(t,e){let I=this.getRunById(e);if(!I||I?.run_type!=="retriever")throw new Error("No retriever run to end");return I.end_time=Date.now(),I.error=this.stringifyError(t),I.events.push({name:"error",time:new Date(I.end_time).toISOString()}),await this.onRetrieverError?.(I),await this._endTrace(I),I}async handleText(t,e){let I=this.getRunById(e);!I||I?.run_type!=="chain"||(I.events.push({name:"text",time:new Date().toISOString(),kwargs:{text:t}}),await this.onText?.(I))}async handleLLMNewToken(t,e,I,l,n,a){let c=this.getRunById(I);if(!c||c?.run_type!=="llm")throw new Error('Invalid "runId" provided to "handleLLMNewToken" callback.');return c.events.push({name:"new_token",time:new Date().toISOString(),kwargs:{token:t,idx:e,chunk:a?.chunk}}),await this.onLLMNewToken?.(c,t,{chunk:a?.chunk}),c}}});var qrt=Y((CZa,Drt)=>{"use strict";o();var _rt=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,Krt=(t=0)=>(e,I,l)=>`\x1B[${38+t};2;${e};${I};${l}m`;function R5I(){let t=new Map,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};e.color.gray=e.color.blackBright,e.bgColor.bgGray=e.bgColor.bgBlackBright,e.color.grey=e.color.blackBright,e.bgColor.bgGrey=e.bgColor.bgBlackBright;for(let[I,l]of Object.entries(e)){for(let[n,a]of Object.entries(l))e[n]={open:`\x1B[${a[0]}m`,close:`\x1B[${a[1]}m`},l[n]=e[n],t.set(a[0],a[1]);Object.defineProperty(e,I,{value:l,enumerable:!1})}return Object.defineProperty(e,"codes",{value:t,enumerable:!1}),e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",e.color.ansi256=_rt(),e.color.ansi16m=Krt(),e.bgColor.ansi256=_rt(10),e.bgColor.ansi16m=Krt(10),Object.defineProperties(e,{rgbToAnsi256:{value:(I,l,n)=>I===l&&l===n?I<8?16:I>248?231:Math.round((I-8)/247*24)+232:16+36*Math.round(I/255*5)+6*Math.round(l/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value:I=>{let l=/(?[a-f\d]{6}|[a-f\d]{3})/i.exec(I.toString(16));if(!l)return[0,0,0];let{colorString:n}=l.groups;n.length===3&&(n=n.split("").map(c=>c+c).join(""));let a=Number.parseInt(n,16);return[a>>16&255,a>>8&255,a&255]},enumerable:!1},hexToAnsi256:{value:I=>e.rgbToAnsi256(...e.hexToRgb(I)),enumerable:!1}}),e}Object.defineProperty(Drt,"exports",{enumerable:!0,get:R5I})});function zu(t,e){return`${t.open}${e}${t.close}`}function Rp(t,e){try{return JSON.stringify(t,null,2)}catch{return e}}function Prt(t){return typeof t=="string"?t.trim():t==null?t:Rp(t,t.toString())}function HH(t){if(!t.end_time)return"";let e=t.end_time-t.start_time;return e<1e3?`${e}ms`:`${(e/1e3).toFixed(2)}s`}var Wve,$rt,Cb,Xne,Nve=g(()=>{o();Ct();BR();Wve=z(qrt(),1),$rt=ve({ConsoleCallbackHandler:()=>Xne});({color:Cb}=Wve.default),Xne=class extends Ni{name="console_callback_handler";persistRun(t){return Promise.resolve()}getParents(t){let e=[],I=t;for(;I.parent_run_id;){let l=this.runMap.get(I.parent_run_id);if(l)e.push(l),I=l;else break}return e}getBreadcrumbs(t){let e=[...this.getParents(t).reverse(),t].map((I,l,n)=>{let a=`${I.execution_order}:${I.run_type}:${I.name}`;return l===n.length-1?zu(Wve.default.bold,a):a}).join(" > ");return zu(Cb.grey,e)}onChainStart(t){let e=this.getBreadcrumbs(t);console.log(`${zu(Cb.green,"[chain/start]")} [${e}] Entering Chain run with input: ${Rp(t.inputs,"[inputs]")}`)}onChainEnd(t){let e=this.getBreadcrumbs(t);console.log(`${zu(Cb.cyan,"[chain/end]")} [${e}] [${HH(t)}] Exiting Chain run with output: ${Rp(t.outputs,"[outputs]")}`)}onChainError(t){let e=this.getBreadcrumbs(t);console.log(`${zu(Cb.red,"[chain/error]")} [${e}] [${HH(t)}] Chain run errored with error: ${Rp(t.error,"[error]")}`)}onLLMStart(t){let e=this.getBreadcrumbs(t),I="prompts"in t.inputs?{prompts:t.inputs.prompts.map(l=>l.trim())}:t.inputs;console.log(`${zu(Cb.green,"[llm/start]")} [${e}] Entering LLM run with input: ${Rp(I,"[inputs]")}`)}onLLMEnd(t){let e=this.getBreadcrumbs(t);console.log(`${zu(Cb.cyan,"[llm/end]")} [${e}] [${HH(t)}] Exiting LLM run with output: ${Rp(t.outputs,"[response]")}`)}onLLMError(t){let e=this.getBreadcrumbs(t);console.log(`${zu(Cb.red,"[llm/error]")} [${e}] [${HH(t)}] LLM run errored with error: ${Rp(t.error,"[error]")}`)}onToolStart(t){let e=this.getBreadcrumbs(t);console.log(`${zu(Cb.green,"[tool/start]")} [${e}] Entering Tool run with input: "${Prt(t.inputs.input)}"`)}onToolEnd(t){let e=this.getBreadcrumbs(t);console.log(`${zu(Cb.cyan,"[tool/end]")} [${e}] [${HH(t)}] Exiting Tool run with output: "${Prt(t.outputs?.output)}"`)}onToolError(t){let e=this.getBreadcrumbs(t);console.log(`${zu(Cb.red,"[tool/error]")} [${e}] [${HH(t)}] Tool run errored with error: ${Rp(t.error,"[error]")}`)}onRetrieverStart(t){let e=this.getBreadcrumbs(t);console.log(`${zu(Cb.green,"[retriever/start]")} [${e}] Entering Retriever run with input: ${Rp(t.inputs,"[inputs]")}`)}onRetrieverEnd(t){let e=this.getBreadcrumbs(t);console.log(`${zu(Cb.cyan,"[retriever/end]")} [${e}] [${HH(t)}] Exiting Retriever run with output: ${Rp(t.outputs,"[outputs]")}`)}onRetrieverError(t){let e=this.getBreadcrumbs(t);console.log(`${zu(Cb.red,"[retriever/error]")} [${e}] [${HH(t)}] Retriever run errored with error: ${Rp(t.error,"[error]")}`)}onAgentAction(t){let e=t,I=this.getBreadcrumbs(t);console.log(`${zu(Cb.blue,"[agent/action]")} [${I}] Agent selected action: ${Rp(e.actions[e.actions.length-1],"[action]")}`)}}});var Vx=g(()=>{o();nne()});var Vve,gne,Yve=g(()=>{o();ca();Vx();gne=()=>(Vve===void 0&&(Vve=new Yp(gt("LANGCHAIN_CALLBACKS_BACKGROUND")==="false"?{blockOnRootRunFinalization:!0}:{})),Vve)});function est(t=!1){let e=F5I.getInstance().getStore();if(!t&&e===void 0)throw new Error(`Could not get the current run tree. + +Please make sure you are calling this method within a traceable function and that tracing is enabled.`);return e}function vne(t){return typeof t=="function"&&"langsmith:traceable"in t}var Ave,Rve,A5I,Fve,F5I,DZa,tst=g(()=>{o();Ave=class{getStore(){}run(e,I){return I()}},Rve=Symbol.for("ls:tracing_async_local_storage"),A5I=new Ave,Fve=class{getInstance(){return globalThis[Rve]??A5I}initializeGlobalInstance(e){globalThis[Rve]===void 0&&(globalThis[Rve]=e)}},F5I=new Fve;DZa=Symbol.for("langsmith:traceable:root")});var Xve=g(()=>{o();tst()});function X5I(t){let e;for(let I of t)for(let l of I)He.isInstance(l.message)&&l.message.usage_metadata!==void 0&&(e=ix(e,l.message.usage_metadata));return e}function Ist(t,e){if(t.tracingMetadata){e.extra??={};let I=e.extra.metadata??{},l=!1;for(let[n,a]of Object.entries(t.tracingMetadata))(!Object.prototype.hasOwnProperty.call(I,n)||vve.has(n))&&I[n]!==a&&(I[n]=a,l=!0);l&&(e.extra.metadata=I)}t.tracingTags.length>0&&(e.tags=Array.from(new Set([...e.tags??[],...t.tracingTags])))}var lst,vve,Yx,yve=g(()=>{o();Ct();fle();tG();BR();Yve();Fne();Vx();Xve();lst=ve({LangChainTracer:()=>Yx,OVERRIDABLE_LANGSMITH_INHERITABLE_METADATA_KEYS:()=>vve}),vve=new Set(["ls_agent_type"]);Yx=class gve extends Ni{name="langchain_tracer";projectName;exampleId;client;replicas;usesRunTreeMap=!0;tracingMetadata;tracingTags=[];constructor(e={}){super(e),this.fields=e;let{exampleId:I,projectName:l,client:n,replicas:a,metadata:c,tags:r}=e;this.projectName=l??oT(),this.replicas=a,this.exampleId=I,this.client=n??gne(),this.tracingMetadata=c?{...c}:void 0,this.tracingTags=r??[];let s=gve.getTraceableRunTree();s&&this.updateFromRunTree(s)}async persistRun(e){}async onRunCreate(e){Ist(this,e),e.extra?.lc_defers_inputs||await this.getRunTreeWithTracingConfig(e.id)?.postRun()}async onRunUpdate(e){Ist(this,e);let I=this.getRunTreeWithTracingConfig(e.id);e.extra?.lc_defers_inputs?await I?.postRun():await I?.patchRun()}onLLMEnd(e){let I=e.outputs;if(I?.generations){let l=X5I(I.generations);if(l!==void 0){e.extra=e.extra??{};let n=e.extra.metadata??{};n.usage_metadata=l,e.extra.metadata=n}}}copyWithTracingConfig({metadata:e,tags:I}){let l;if(e===void 0)l=this.tracingMetadata?{...this.tracingMetadata}:void 0;else if(this.tracingMetadata===void 0)l={...e};else{l={...this.tracingMetadata};for(let[c,r]of Object.entries(e))(!Object.prototype.hasOwnProperty.call(l,c)||vve.has(c))&&(l[c]=r)}let n=I?Array.from(new Set([...this.tracingTags,...I])):[...this.tracingTags],a=new gve({...this.fields,metadata:l,tags:n});return a.runMap=this.runMap,a.runTreeMap=this.runTreeMap,a}getRun(e){return this.runTreeMap.get(e)}updateFromRunTree(e){this.runTreeMap.set(e.id,e);let I=e,l=new Set;for(;I.parent_run&&!(l.has(I.id)||(l.add(I.id),!I.parent_run));)I=I.parent_run;l.clear();let n=[I];for(;n.length>0;){let a=n.shift();!a||l.has(a.id)||(l.add(a.id),this.runTreeMap.set(a.id,a),a.child_runs&&n.push(...a.child_runs))}this.client=e.client??this.client,this.replicas=e.replicas??this.replicas,this.projectName=e.project_name??this.projectName,this.exampleId=e.reference_example_id??this.exampleId,this.fields={...this.fields,client:this.client,replicas:this.replicas,projectName:this.projectName,exampleId:this.exampleId}}getRunTreeWithTracingConfig(e){let I=this.runTreeMap.get(e);if(I)return new zR({...I,client:this.client,project_name:this.projectName,replicas:this.replicas,reference_example_id:this.exampleId,tracingEnabled:!0})}static getTraceableRunTree(){try{return est(!0)}catch{return}}static[Symbol.hasInstance](e){if(typeof e!="object"||e===null)return!1;let I=e;return"name"in I&&I.name==="langchain_tracer"&&"copyWithTracingConfig"in I&&typeof I.copyWithTracingConfig=="function"&&"getRunTreeWithTracingConfig"in I&&typeof I.getRunTreeWithTracingConfig=="function"}}});function g5I(){return new("default"in yne.default?yne.default.default:yne.default)({autoStart:!0,concurrency:1})}function v5I(){return typeof mJ>"u"&&(mJ=g5I()),mJ}async function Ir(t,e){if(e===!0){let I=vH();I!==void 0?await I.run(void 0,async()=>t()):await t()}else mJ=v5I(),mJ.add(async()=>{let I=vH();I!==void 0?await I.run(void 0,async()=>t()):await t()})}async function nst(){let t=gne();await Promise.allSettled([typeof mJ<"u"?mJ.onIdle():Promise.resolve(),t.awaitPendingTraceBatches()])}var yne,mJ,wve=g(()=>{o();Yve();lT();yne=z(bne(),1)});var ast,Hve=g(()=>{o();Ct();wve();ast=ve({awaitAllCallbacks:()=>nst,consumeCallback:()=>Ir})});var cst,rst=g(()=>{o();ca();cst=t=>t!==void 0?t:!!["LANGSMITH_TRACING_V2","LANGCHAIN_TRACING_V2","LANGSMITH_TRACING","LANGCHAIN_TRACING"].find(e=>gt(e)==="true")});function Qve(t){let e=vH();if(e!==void 0)return e.getStore()?.[gH]?.[t]}var y5I,sst,ost=g(()=>{o();lT();Fne();y5I=Symbol("lc:configure_hooks"),sst=()=>Qve(y5I)||[]});function ZJ(t){return t?Array.isArray(t)||"name"in t?{callbacks:t}:t:{}}function Rx(t){return"name"in t?t:OR.fromMethods(t)}var ist,Gst,pT,dst,fve,ust,bst,lr,RX=g(()=>{o();Ct();xR();eT();UR();ca();yH();BR();Nve();yve();wve();Hve();rst();ost();ist=ve({BaseCallbackManager:()=>Gst,BaseRunManager:()=>pT,CallbackManager:()=>lr,CallbackManagerForChainRun:()=>ust,CallbackManagerForLLMRun:()=>fve,CallbackManagerForRetrieverRun:()=>dst,CallbackManagerForToolRun:()=>bst,ensureHandler:()=>Rx,parseCallbackConfigArg:()=>ZJ});Gst=class{setHandler(t){return this.setHandlers([t])}},pT=class{constructor(t,e,I,l,n,a,c,r){this.runId=t,this.handlers=e,this.inheritableHandlers=I,this.tags=l,this.inheritableTags=n,this.metadata=a,this.inheritableMetadata=c,this._parentRunId=r}get parentRunId(){return this._parentRunId}async handleText(t){await Promise.all(this.handlers.map(e=>Ir(async()=>{try{await e.handleText?.(t,this.runId,this._parentRunId,this.tags)}catch(I){if((e.raiseError?console.error:console.warn)(`Error in handler ${e.constructor.name}, handleText: ${I}`),e.raiseError)throw I}},e.awaitHandlers)))}async handleCustomEvent(t,e,I,l,n){await Promise.all(this.handlers.map(a=>Ir(async()=>{try{await a.handleCustomEvent?.(t,e,this.runId,this.tags,this.metadata)}catch(c){if((a.raiseError?console.error:console.warn)(`Error in handler ${a.constructor.name}, handleCustomEvent: ${c}`),a.raiseError)throw c}},a.awaitHandlers)))}},dst=class extends pT{getChild(t){let e=new lr(this.runId);return e.setHandlers(this.inheritableHandlers),e.addTags(this.inheritableTags),e.addMetadata(this.inheritableMetadata),t&&e.addTags([t],!1),e}async handleRetrieverEnd(t){await Promise.all(this.handlers.map(e=>Ir(async()=>{if(!e.ignoreRetriever)try{await e.handleRetrieverEnd?.(t,this.runId,this._parentRunId,this.tags)}catch(I){if((e.raiseError?console.error:console.warn)(`Error in handler ${e.constructor.name}, handleRetriever`),e.raiseError)throw I}},e.awaitHandlers)))}async handleRetrieverError(t){await Promise.all(this.handlers.map(e=>Ir(async()=>{if(!e.ignoreRetriever)try{await e.handleRetrieverError?.(t,this.runId,this._parentRunId,this.tags)}catch(I){if((e.raiseError?console.error:console.warn)(`Error in handler ${e.constructor.name}, handleRetrieverError: ${I}`),e.raiseError)throw t}},e.awaitHandlers)))}},fve=class extends pT{async handleLLMNewToken(t,e,I,l,n,a){await Promise.all(this.handlers.map(c=>Ir(async()=>{if(!c.ignoreLLM)try{await c.handleLLMNewToken?.(t,e??{prompt:0,completion:0},this.runId,this._parentRunId,this.tags,a)}catch(r){if((c.raiseError?console.error:console.warn)(`Error in handler ${c.constructor.name}, handleLLMNewToken: ${r}`),c.raiseError)throw r}},c.awaitHandlers)))}async handleLLMError(t,e,I,l,n){await Promise.all(this.handlers.map(a=>Ir(async()=>{if(!a.ignoreLLM)try{await a.handleLLMError?.(t,this.runId,this._parentRunId,this.tags,n)}catch(c){if((a.raiseError?console.error:console.warn)(`Error in handler ${a.constructor.name}, handleLLMError: ${c}`),a.raiseError)throw c}},a.awaitHandlers)))}async handleLLMEnd(t,e,I,l,n){await Promise.all(this.handlers.map(a=>Ir(async()=>{if(!a.ignoreLLM)try{await a.handleLLMEnd?.(t,this.runId,this._parentRunId,this.tags,n)}catch(c){if((a.raiseError?console.error:console.warn)(`Error in handler ${a.constructor.name}, handleLLMEnd: ${c}`),a.raiseError)throw c}},a.awaitHandlers)))}},ust=class extends pT{getChild(t){let e=new lr(this.runId);return e.setHandlers(this.inheritableHandlers),e.addTags(this.inheritableTags),e.addMetadata(this.inheritableMetadata),t&&e.addTags([t],!1),e}async handleChainError(t,e,I,l,n){await Promise.all(this.handlers.map(a=>Ir(async()=>{if(!a.ignoreChain)try{await a.handleChainError?.(t,this.runId,this._parentRunId,this.tags,n)}catch(c){if((a.raiseError?console.error:console.warn)(`Error in handler ${a.constructor.name}, handleChainError: ${c}`),a.raiseError)throw c}},a.awaitHandlers)))}async handleChainEnd(t,e,I,l,n){await Promise.all(this.handlers.map(a=>Ir(async()=>{if(!a.ignoreChain)try{await a.handleChainEnd?.(t,this.runId,this._parentRunId,this.tags,n)}catch(c){if((a.raiseError?console.error:console.warn)(`Error in handler ${a.constructor.name}, handleChainEnd: ${c}`),a.raiseError)throw c}},a.awaitHandlers)))}async handleAgentAction(t){await Promise.all(this.handlers.map(e=>Ir(async()=>{if(!e.ignoreAgent)try{await e.handleAgentAction?.(t,this.runId,this._parentRunId,this.tags)}catch(I){if((e.raiseError?console.error:console.warn)(`Error in handler ${e.constructor.name}, handleAgentAction: ${I}`),e.raiseError)throw I}},e.awaitHandlers)))}async handleAgentEnd(t){await Promise.all(this.handlers.map(e=>Ir(async()=>{if(!e.ignoreAgent)try{await e.handleAgentEnd?.(t,this.runId,this._parentRunId,this.tags)}catch(I){if((e.raiseError?console.error:console.warn)(`Error in handler ${e.constructor.name}, handleAgentEnd: ${I}`),e.raiseError)throw I}},e.awaitHandlers)))}},bst=class extends pT{getChild(t){let e=new lr(this.runId);return e.setHandlers(this.inheritableHandlers),e.addTags(this.inheritableTags),e.addMetadata(this.inheritableMetadata),t&&e.addTags([t],!1),e}async handleToolError(t){await Promise.all(this.handlers.map(e=>Ir(async()=>{if(!e.ignoreAgent)try{await e.handleToolError?.(t,this.runId,this._parentRunId,this.tags)}catch(I){if((e.raiseError?console.error:console.warn)(`Error in handler ${e.constructor.name}, handleToolError: ${I}`),e.raiseError)throw I}},e.awaitHandlers)))}async handleToolEvent(t){await Promise.all(this.handlers.map(e=>Ir(async()=>{if(!e.ignoreAgent)try{await e.handleToolEvent?.(t,this.runId,this._parentRunId,this.tags)}catch(I){if(e.raiseError)throw I}},e.awaitHandlers)))}async handleToolEnd(t){await Promise.all(this.handlers.map(e=>Ir(async()=>{if(!e.ignoreAgent)try{await e.handleToolEnd?.(t,this.runId,this._parentRunId,this.tags)}catch(I){if((e.raiseError?console.error:console.warn)(`Error in handler ${e.constructor.name}, handleToolEnd: ${I}`),e.raiseError)throw I}},e.awaitHandlers)))}},lr=class ZT extends Gst{handlers=[];inheritableHandlers=[];tags=[];inheritableTags=[];metadata={};inheritableMetadata={};name="callback_manager";_parentRunId;constructor(e,I){super(),this.handlers=I?.handlers??this.handlers,this.inheritableHandlers=I?.inheritableHandlers??this.inheritableHandlers,this.tags=I?.tags??this.tags,this.inheritableTags=I?.inheritableTags??this.inheritableTags,this.metadata=I?.metadata??this.metadata,this.inheritableMetadata=I?.inheritableMetadata??this.inheritableMetadata,this._parentRunId=e}getParentRunId(){return this._parentRunId}async handleLLMStart(e,I,l=void 0,n=void 0,a=void 0,c=void 0,r=void 0,s=void 0){return Promise.all(I.map(async(i,G)=>{let d=G===0&&l?l:Pm();return await Promise.all(this.handlers.map(u=>{if(!u.ignoreLLM)return bJ(u)&&u._createRunForLLMStart(e,[i],d,this._parentRunId,a,this.tags,this.metadata,s),Ir(async()=>{try{await u.handleLLMStart?.(e,[i],d,this._parentRunId,a,this.tags,this.metadata,s)}catch(b){if((u.raiseError?console.error:console.warn)(`Error in handler ${u.constructor.name}, handleLLMStart: ${b}`),u.raiseError)throw b}},u.awaitHandlers)})),new fve(d,this.handlers,this.inheritableHandlers,this.tags,this.inheritableTags,this.metadata,this.inheritableMetadata,this._parentRunId)}))}async handleChatModelStart(e,I,l=void 0,n=void 0,a=void 0,c=void 0,r=void 0,s=void 0){return Promise.all(I.map(async(i,G)=>{let d=G===0&&l?l:Pm();return await Promise.all(this.handlers.map(u=>{if(!u.ignoreLLM)return bJ(u)&&u._createRunForChatModelStart(e,[i],d,this._parentRunId,a,this.tags,this.metadata,s),Ir(async()=>{try{if(u.handleChatModelStart)await u.handleChatModelStart?.(e,[i],d,this._parentRunId,a,this.tags,this.metadata,s);else if(u.handleLLMStart){let b=FH(i);await u.handleLLMStart?.(e,[b],d,this._parentRunId,a,this.tags,this.metadata,s)}}catch(b){if((u.raiseError?console.error:console.warn)(`Error in handler ${u.constructor.name}, handleLLMStart: ${b}`),u.raiseError)throw b}},u.awaitHandlers)})),new fve(d,this.handlers,this.inheritableHandlers,this.tags,this.inheritableTags,this.metadata,this.inheritableMetadata,this._parentRunId)}))}async handleChainStart(e,I,l=Pm(),n=void 0,a=void 0,c=void 0,r=void 0,s=void 0,i=void 0){return await Promise.all(this.handlers.map(G=>{if(!G.ignoreChain)return bJ(G)&&G._createRunForChainStart(e,I,l,this._parentRunId,this.tags,this.metadata,n,r,i),Ir(async()=>{try{await G.handleChainStart?.(e,I,l,this._parentRunId,this.tags,this.metadata,n,r,i)}catch(d){if((G.raiseError?console.error:console.warn)(`Error in handler ${G.constructor.name}, handleChainStart: ${d}`),G.raiseError)throw d}},G.awaitHandlers)})),new ust(l,this.handlers,this.inheritableHandlers,this.tags,this.inheritableTags,this.metadata,this.inheritableMetadata,this._parentRunId)}async handleToolStart(e,I,l=Pm(),n=void 0,a=void 0,c=void 0,r=void 0,s=void 0){return await Promise.all(this.handlers.map(i=>{if(!i.ignoreAgent)return bJ(i)&&i._createRunForToolStart(e,I,l,this._parentRunId,this.tags,this.metadata,r),Ir(async()=>{try{await i.handleToolStart?.(e,I,l,this._parentRunId,this.tags,this.metadata,r,s)}catch(G){if((i.raiseError?console.error:console.warn)(`Error in handler ${i.constructor.name}, handleToolStart: ${G}`),i.raiseError)throw G}},i.awaitHandlers)})),new bst(l,this.handlers,this.inheritableHandlers,this.tags,this.inheritableTags,this.metadata,this.inheritableMetadata,this._parentRunId)}async handleRetrieverStart(e,I,l=Pm(),n=void 0,a=void 0,c=void 0,r=void 0){return await Promise.all(this.handlers.map(s=>{if(!s.ignoreRetriever)return bJ(s)&&s._createRunForRetrieverStart(e,I,l,this._parentRunId,this.tags,this.metadata,r),Ir(async()=>{try{await s.handleRetrieverStart?.(e,I,l,this._parentRunId,this.tags,this.metadata,r)}catch(i){if((s.raiseError?console.error:console.warn)(`Error in handler ${s.constructor.name}, handleRetrieverStart: ${i}`),s.raiseError)throw i}},s.awaitHandlers)})),new dst(l,this.handlers,this.inheritableHandlers,this.tags,this.inheritableTags,this.metadata,this.inheritableMetadata,this._parentRunId)}async handleCustomEvent(e,I,l,n,a){await Promise.all(this.handlers.map(c=>Ir(async()=>{if(!c.ignoreCustomEvent)try{await c.handleCustomEvent?.(e,I,l,this.tags,this.metadata)}catch(r){if((c.raiseError?console.error:console.warn)(`Error in handler ${c.constructor.name}, handleCustomEvent: ${r}`),c.raiseError)throw r}},c.awaitHandlers)))}addHandler(e,I=!0){this.handlers.push(e),I&&this.inheritableHandlers.push(e)}removeHandler(e){this.handlers=this.handlers.filter(I=>I!==e),this.inheritableHandlers=this.inheritableHandlers.filter(I=>I!==e)}setHandlers(e,I=!0){this.handlers=[],this.inheritableHandlers=[];for(let l of e)this.addHandler(l,I)}addTags(e,I=!0){this.removeTags(e),this.tags.push(...e),I&&this.inheritableTags.push(...e)}removeTags(e){this.tags=this.tags.filter(I=>!e.includes(I)),this.inheritableTags=this.inheritableTags.filter(I=>!e.includes(I))}addMetadata(e,I=!0){this.metadata={...this.metadata,...e},I&&(this.inheritableMetadata={...this.inheritableMetadata,...e})}removeMetadata(e){for(let I of Object.keys(e))delete this.metadata[I],delete this.inheritableMetadata[I]}copy(e=[],I=!0){let l=new ZT(this._parentRunId);for(let n of this.handlers){let a=this.inheritableHandlers.includes(n);l.addHandler(n,a)}for(let n of this.tags){let a=this.inheritableTags.includes(n);l.addTags([n],a)}for(let n of Object.keys(this.metadata)){let a=Object.keys(this.inheritableMetadata).includes(n);l.addMetadata({[n]:this.metadata[n]},a)}for(let n of e)l.handlers.filter(a=>a.name==="console_callback_handler").some(a=>a.name===n.name)||l.addHandler(n,I);return l}static fromHandlers(e){class I extends OR{name=Pm();constructor(){super(),Object.assign(this,e)}}let l=new this;return l.addHandler(new I),l}static configure(e,I,l,n,a,c,r){return this._configureSync(e,I,l,n,a,c,r)}static _configureSync(e,I,l,n,a,c,r){let s;(e||I)&&(Array.isArray(e)||!e?(s=new ZT,s.setHandlers(e?.map(Rx)??[],!0)):s=e,s=s.copy(Array.isArray(I)?I.map(Rx):I?.handlers,!1));let i=gt("LANGCHAIN_VERBOSE")==="true"||r?.verbose,G=Yx.getTraceableRunTree(),d=G?.tracingEnabled??cst();if(G?.tracingEnabled===!1&&s){let p=s.handlers.filter(W=>W.name==="langchain_tracer");for(let W of p)s.removeHandler(W)}let u=d||(gt("LANGCHAIN_TRACING")??!1);if(i||u){if(s||(s=new ZT),i&&!s.handlers.some(p=>p.name===Xne.prototype.name)){let p=new Xne;s.addHandler(p,!0)}if(u&&!s.handlers.some(p=>p.name==="langchain_tracer")&&d){let p=new Yx;s.addHandler(p,!0)}d&&G&&s._parentRunId===void 0&&(s._parentRunId=G.id,s.handlers.find(p=>p.name==="langchain_tracer")?.updateFromRunTree(G))}for(let{contextVar:p,inheritable:W=!0,handlerClass:h,envVar:N}of sst()){let V=N&>(N)==="true"&&h,R,F=p!==void 0?Qve(p):void 0;F&&Gge(F)?R=F:V&&(R=new h({})),R!==void 0&&(s||(s=new ZT),s.handlers.some(v=>v.name===R.name)||s.addHandler(R,W))}(l||n)&&s&&(s.addTags(l??[]),s.addTags(n??[],!1)),(a||c)&&s&&(s.addMetadata(a??{}),s.addMetadata(c??{},!1));let b=r?.tracerInheritableMetadata,Z=r?.tracerInheritableTags;return s&&(b||Z)&&(s.handlers=s.handlers.map(p=>p instanceof Yx?p.copyWithTracingConfig({metadata:b,tags:Z}):p),s.inheritableHandlers=s.inheritableHandlers.map(p=>p instanceof Yx?p.copyWithTracingConfig({metadata:b,tags:Z}):p)),s}}});var Eve,w5I,mst,H5I,dl,pJ=g(()=>{o();lT();RX();Vx();Eve=class{getStore(){}run(t,e){return e()}enterWith(t){}},w5I=new Eve,mst=Symbol.for("lc:child_config"),H5I=class{getInstance(){return vH()??w5I}getRunnableConfig(){return this.getInstance().getStore()?.extra?.[mst]}runWithConfig(t,e,I){let l=lr._configureSync(t?.callbacks,void 0,t?.tags,void 0,t?.metadata),n=this.getInstance(),a=n.getStore(),c=l?.getParentRunId(),r=l?.handlers?.find(i=>i?.name==="langchain_tracer"),s;return r&&c?s=r.getRunTreeWithTracingConfig(c):I||(s=new zR({name:"",tracingEnabled:!1})),s&&(s.extra={...s.extra,[mst]:t}),a!==void 0&&a[gH]!==void 0&&(s===void 0&&(s={}),s[gH]=a[gH]),n.run(s,e)}initializeGlobalInstance(t){vH()===void 0&&Jat(t)}},dl=new H5I});var Zst,Bu=g(()=>{o();Ct();lT();pJ();Zst=ve({AsyncLocalStorageProviderSingleton:()=>dl,MockAsyncLocalStorage:()=>Eve,_CONTEXT_VARIABLES_KEY:()=>gH})});function E5I(t){let e=t.configurable??{},I=t.metadata??{},l={};for(let[n,a]of Object.entries(e))!n.startsWith("__")&&!Object.prototype.hasOwnProperty.call(I,n)&&!Q5I.has(n)&&f5I.has(typeof a)&&(l[n]=a);return Object.keys(l).length>0?l:void 0}async function lG(t){return lr._configureSync(t?.callbacks,void 0,t?.tags,void 0,t?.metadata,void 0,{tracerInheritableMetadata:t?E5I(t):void 0})}function xn(...t){let e={};for(let I of t.filter(l=>!!l))for(let l of Object.keys(I))if(l==="metadata")e[l]={...e[l],...I[l]};else if(l==="tags"){let n=e[l]??[];e[l]=[...new Set(n.concat(I[l]??[]))]}else if(l==="configurable")e[l]={...e[l],...I[l]};else if(l==="timeout")e.timeout===void 0?e.timeout=I.timeout:I.timeout!==void 0&&(e.timeout=Math.min(e.timeout,I.timeout));else if(l==="signal")e.signal===void 0?e.signal=I.signal:I.signal!==void 0&&("any"in AbortSignal?e.signal=AbortSignal.any([e.signal,I.signal]):e.signal=I.signal);else if(l==="callbacks"){let n=e.callbacks,a=I.callbacks;if(Array.isArray(a))if(!n)e.callbacks=a;else if(Array.isArray(n))e.callbacks=n.concat(a);else{let c=n.copy();for(let r of a)c.addHandler(Rx(r),!0);e.callbacks=c}else if(a)if(!n)e.callbacks=a;else if(Array.isArray(n)){let c=a.copy();for(let r of n)c.addHandler(Rx(r),!0);e.callbacks=c}else e.callbacks=new lr(a._parentRunId,{handlers:n.handlers.concat(a.handlers),inheritableHandlers:n.inheritableHandlers.concat(a.inheritableHandlers),tags:Array.from(new Set(n.tags.concat(a.tags))),inheritableTags:Array.from(new Set(n.inheritableTags.concat(a.inheritableTags))),metadata:{...n.metadata,...a.metadata}})}else{let n=l;e[n]=I[n]??e[n]}return e}function KI(t){let e=dl.getRunnableConfig(),I={tags:[],metadata:{},recursionLimit:25,runId:void 0};if(e){let{runId:l,runName:n,...a}=e;I=Object.entries(a).reduce((c,[r,s])=>(s!==void 0&&(c[r]=s),c),I)}if(t&&(I=Object.entries(t).reduce((l,[n,a])=>(a!==void 0&&(l[n]=a),l),I)),I?.configurable&&typeof I.configurable.model=="string"&&I.metadata?.model===void 0&&(I.metadata||(I.metadata={}),I.metadata.model=I.configurable.model),I.timeout!==void 0){if(I.timeout<=0)throw new Error("Timeout must be a positive number");let l=I.timeout,n=AbortSignal.timeout(l);I.metadata||(I.metadata={}),I.metadata.timeoutMs===void 0&&(I.metadata.timeoutMs=l),I.signal!==void 0?"any"in AbortSignal&&(I.signal=AbortSignal.any([I.signal,n])):I.signal=n,delete I.timeout}return I}function Nl(t={},{callbacks:e,maxConcurrency:I,recursionLimit:l,runName:n,configurable:a,runId:c}={}){let r=KI(t);return e!==void 0&&(delete r.runName,r.callbacks=e),l!==void 0&&(r.recursionLimit=l),I!==void 0&&(r.maxConcurrency=I),n!==void 0&&(r.runName=n),a!==void 0&&(r.configurable={...r.configurable,...a}),c!==void 0&&delete r.runId,r}function Vo(t){if(t)return{configurable:t.configurable,recursionLimit:t.recursionLimit,callbacks:t.callbacks,tags:t.tags,metadata:t.metadata,maxConcurrency:t.maxConcurrency,timeout:t.timeout,signal:t.signal,store:t.store}}var Q5I,f5I,xA=g(()=>{o();RX();pJ();Bu();Q5I=new Set(["api_key"]),f5I=new Set(["string","number","boolean"])});async function Mu(t,e){if(e===void 0)return t;let I;return Promise.race([t.catch(l=>{if(!e?.aborted)throw l}),new Promise((l,n)=>{I=()=>{n(QH(e))},e.addEventListener("abort",I,{once:!0}),e.aborted&&n(QH(e))})]).finally(()=>e.removeEventListener("abort",I))}function QH(t){return t?.reason instanceof Error?t.reason:typeof t?.reason=="string"?new Error(t.reason):new Error("Aborted")}var Ax=g(()=>{o()});function wne(t,e=2){let I=Array.from({length:e},()=>[]);return I.map(async function*(n){for(;;)if(n.length===0){let a=await t.next();for(let c of I)c.push(a)}else{if(n[0].done)return;yield n.shift().value}})}function Su(t,e){if(Array.isArray(t)&&Array.isArray(e))return t.concat(e);if(typeof t=="string"&&typeof e=="string")return t+e;if(typeof t=="number"&&typeof e=="number")return t+e;if("concat"in t&&typeof t.concat=="function")return t.concat(e);if(typeof t=="object"&&typeof e=="object"){let I={...t};for(let[l,n]of Object.entries(e))l in I&&!Array.isArray(I[l])?I[l]=Su(I[l],n):I[l]=n;return I}else throw new Error(`Cannot concat ${typeof t} and ${typeof e}`)}async function Cve(t,e,I,l,...n){let a=new jA({generator:e,startSetup:I,signal:l}),c=await a.setup;return{output:t(a,c,...n),setup:c}}var pst,nr,jA,Lb=g(()=>{o();Ct();pJ();Bu();xA();Ax();pst=ve({AsyncGeneratorWithSetup:()=>jA,IterableReadableStream:()=>nr,atee:()=>wne,concat:()=>Su,pipeGeneratorWithSetup:()=>Cve}),nr=class Jve extends ReadableStream{reader;ensureReader(){this.reader||(this.reader=this.getReader())}async next(){this.ensureReader();try{let e=await this.reader.read();return e.done?(this.reader.releaseLock(),{done:!0,value:void 0}):{done:!1,value:e.value}}catch(e){throw this.reader.releaseLock(),e}}async return(){if(this.ensureReader(),this.locked){let e=this.reader.cancel();this.reader.releaseLock(),await e}return{done:!0,value:void 0}}async throw(e){if(this.ensureReader(),this.locked){let I=this.reader.cancel();this.reader.releaseLock(),await I}throw e}[Symbol.asyncIterator](){return this}async[Symbol.asyncDispose](){await this.return()}static fromReadableStream(e){let I=e.getReader();return new Jve({start(l){return n();function n(){return I.read().then(({done:a,value:c})=>{if(a){l.close();return}return l.enqueue(c),n()})}},cancel(){I.releaseLock()}})}static fromAsyncGenerator(e){return new Jve({async pull(I){let{value:l,done:n}=await e.next();n&&I.close(),I.enqueue(l)},async cancel(I){await e.return(I)}})}};jA=class{generator;setup;config;signal;firstResult;firstResultUsed=!1;constructor(t){this.generator=t.generator,this.config=t.config,this.signal=t.signal??this.config?.signal,this.setup=new Promise((e,I)=>{dl.runWithConfig(Vo(t.config),async()=>{this.firstResult=this.signal?Mu(t.generator.next(),this.signal):t.generator.next(),t.startSetup?this.firstResult.then(t.startSetup).then(e,I):this.firstResult.then(l=>e(void 0),I)},!0)})}async next(...t){return this.signal?.throwIfAborted(),this.firstResultUsed?dl.runWithConfig(Vo(this.config),this.signal?async()=>Mu(this.generator.next(...t),this.signal):async()=>this.generator.next(...t),!0):(this.firstResultUsed=!0,this.firstResult)}async return(t){return this.generator.return(t)}async throw(t){return this.generator.throw(t)}[Symbol.asyncIterator](){return this}async[Symbol.asyncDispose](){await this.return()}}});function Qne(t,e){return J5I.call(t,e)}function fne(t){if(Array.isArray(t)){let I=new Array(t.length);for(let l=0;l=48&&l<=57){e++;continue}return!1}return!0}function hJ(t){return t.indexOf("/")===-1&&t.indexOf("~")===-1?t:t.replace(/~/g,"~0").replace(/\//g,"~1")}function Wst(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}function Hne(t){if(t===void 0)return!0;if(t){if(Array.isArray(t)){for(let I=0,l=t.length;I{o();J5I=Object.prototype.hasOwnProperty;Nst=class extends Error{constructor(t,e,I,l,n){super(hst(t,{name:e,index:I,operation:l,tree:n})),this.name=e,this.index=I,this.operation=l,this.tree=n,Object.setPrototypeOf(this,new.target.prototype),this.message=hst(t,{name:e,index:I,operation:l,tree:n})}}});function Cne(t,e){if(e=="")return t;var I={op:"_get",path:e};return WJ(t,I),I.value}function WJ(t,e,I=!1,l=!0,n=!0,a=0){if(I&&(typeof I=="function"?I(e,0,t,e.path):Lne(e,0)),e.path===""){let c={newDocument:t};if(e.op==="add")return c.newDocument=e.value,c;if(e.op==="replace")return c.newDocument=e.value,c.removed=t,c;if(e.op==="move"||e.op==="copy")return c.newDocument=Cne(t,e.from),e.op==="move"&&(c.removed=t),c;if(e.op==="test"){if(c.test=hT(t,e.value),c.test===!1)throw new vr("Test operation failed","TEST_OPERATION_FAILED",a,e,t);return c.newDocument=t,c}else{if(e.op==="remove")return c.removed=t,c.newDocument=null,c;if(e.op==="_get")return e.value=t,c;if(I)throw new vr("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",a,e,t);return c}}else{l||(t=eZ(t));let c=(e.path||"").split("/"),r=t,s=1,i=c.length,G,d,u;for(typeof I=="function"?u=I:u=Lne;;){if(d=c[s],d&&d.indexOf("~")!=-1&&(d=Wst(d)),n&&(d=="__proto__"||d=="prototype"&&s>0&&c[s-1]=="constructor"))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(I&&G===void 0&&(r[d]===void 0?G=c.slice(0,s).join("/"):s==i-1&&(G=e.path),G!==void 0&&u(e,0,t,G)),s++,Array.isArray(r)){if(d==="-")d=r.length;else{if(I&&!Ene(d))throw new vr("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",a,e,t);Ene(d)&&(d=~~d)}if(s>=i){if(I&&e.op==="add"&&d>r.length)throw new vr("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",a,e,t);let b=L5I[e.op].call(e,r,d,t);if(b.test===!1)throw new vr("Test operation failed","TEST_OPERATION_FAILED",a,e,t);return b}}else if(s>=i){let b=Fx[e.op].call(e,r,d,t);if(b.test===!1)throw new vr("Test operation failed","TEST_OPERATION_FAILED",a,e,t);return b}if(r=r[d],I&&s0)throw new vr('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",e,t,I);if((t.op==="move"||t.op==="copy")&&typeof t.from!="string")throw new vr("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",e,t,I);if((t.op==="add"||t.op==="replace"||t.op==="test")&&t.value===void 0)throw new vr("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",e,t,I);if((t.op==="add"||t.op==="replace"||t.op==="test")&&Hne(t.value))throw new vr("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",e,t,I);if(I){if(t.op=="add"){var n=t.path.split("/").length,a=l.split("/").length;if(n!==a+1&&n!==a)throw new vr("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",e,t,I)}else if(t.op==="replace"||t.op==="remove"||t.op==="_get"){if(t.path!==l)throw new vr("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",e,t,I)}else if(t.op==="move"||t.op==="copy"){var c=Yst([{op:"_get",path:t.from,value:void 0}],I);if(c&&c.name==="OPERATION_PATH_UNRESOLVABLE")throw new vr("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",e,t,I)}}}else throw new vr("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",e,t,I)}function Yst(t,e,I){try{if(!Array.isArray(t))throw new vr("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(e)fH(eZ(e),eZ(t),I||!0);else{I=I||Lne;for(var l=0;l{o();Ct();Jne();Vst=ve({JsonPatchError:()=>vr,_areEquals:()=>hT,applyOperation:()=>WJ,applyPatch:()=>fH,applyReducer:()=>k5I,deepClone:()=>C5I,getValueByPointer:()=>Cne,validate:()=>Yst,validator:()=>Lne}),vr=Nst,C5I=eZ,Fx={add:function(t,e,I){if(e==="__proto__"||e==="constructor")throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor` prop is banned for security reasons");return t[e]=this.value,{newDocument:I}},remove:function(t,e,I){if(e==="__proto__"||e==="constructor")throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor` prop is banned for security reasons");var l=t[e];return delete t[e],{newDocument:I,removed:l}},replace:function(t,e,I){if(e==="__proto__"||e==="constructor")throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor` prop is banned for security reasons");var l=t[e];return t[e]=this.value,{newDocument:I,removed:l}},move:function(t,e,I){let l=Cne(I,this.path);l&&(l=eZ(l));let n=WJ(I,{op:"remove",path:this.from}).removed;return WJ(I,{op:"add",path:this.path,value:n}),{newDocument:I,removed:l}},copy:function(t,e,I){let l=Cne(I,this.from);return WJ(I,{op:"add",path:this.path,value:eZ(l)}),{newDocument:I}},test:function(t,e,I){return{newDocument:I,test:hT(t[e],this.value)}},_get:function(t,e,I){return this.value=t[e],{newDocument:I}}},L5I={add:function(t,e,I){return Ene(e)?t.splice(e,0,this.value):t[e]=this.value,{newDocument:I,index:e}},remove:function(t,e,I){return{newDocument:I,removed:t.splice(e,1)[0]}},replace:function(t,e,I){var l=t[e];return t[e]=this.value,{newDocument:I,removed:l}},move:Fx.move,copy:Fx.copy,test:Fx.test,_get:Fx._get}});function Rst(t,e,I,l,n){if(e!==t){typeof e.toJSON=="function"&&(e=e.toJSON());for(var a=fne(e),c=fne(t),r=!1,s=c.length-1;s>=0;s--){var i=c[s],G=t[i];if(Qne(e,i)&&!(e[i]===void 0&&G!==void 0&&Array.isArray(e)===!1)){var d=e[i];typeof G=="object"&&G!=null&&typeof d=="object"&&d!=null&&Array.isArray(G)===Array.isArray(d)?Rst(G,d,I,l+"/"+hJ(i),n):G!==d&&(n&&I.push({op:"test",path:l+"/"+hJ(i),value:eZ(G)}),I.push({op:"replace",path:l+"/"+hJ(i),value:eZ(d)}))}else Array.isArray(t)===Array.isArray(e)?(n&&I.push({op:"test",path:l+"/"+hJ(i),value:eZ(G)}),I.push({op:"remove",path:l+"/"+hJ(i)}),r=!0):(n&&I.push({op:"test",path:l,value:t}),I.push({op:"replace",path:l,value:e}))}if(!(!r&&a.length==c.length))for(var s=0;s{o();Jne();WT();});var Lve=g(()=>{o();Jne();WT();Xx();({...Vst})});async function Ast(t,e){if(e==="original")throw new Error("Do not assign inputs with original schema drop the key for now. When inputs are added to streamLog they should be added with standardized schema for streaming events.");let{inputs:I}=t;if(["retriever","llm","prompt"].includes(t.run_type))return I;if(!(Object.keys(I).length===1&&I?.input===""))return I.input}async function Fst(t,e){let{outputs:I}=t;return e==="original"||["retriever","llm","prompt"].includes(t.run_type)?I:I!==void 0&&Object.keys(I).length===1&&I?.output!==void 0?I.output:I}function x5I(t){return t!==void 0&&t.message!==void 0}var Xst,UA,kne,xve,xne,jve=g(()=>{o();Ct();tG();BR();WT();Lve();Lb();Xst=ve({LogStreamCallbackHandler:()=>xne,RunLog:()=>kne,RunLogPatch:()=>UA,isLogStreamHandler:()=>xve}),UA=class{ops;constructor(t){this.ops=t.ops??[]}concat(t){let e=this.ops.concat(t.ops),I=fH({},e);return new kne({ops:e,state:I[I.length-1].newDocument})}},kne=class kve extends UA{state;constructor(e){super(e),this.state=e.state}concat(e){let I=this.ops.concat(e.ops),l=fH(this.state,e.ops);return new kve({ops:I,state:l[l.length-1].newDocument})}static fromRunLogPatch(e){let I=fH({},e.ops);return new kve({ops:e.ops,state:I[I.length-1].newDocument})}},xve=t=>t.name==="log_stream_tracer";xne=class extends Ni{autoClose=!0;includeNames;includeTypes;includeTags;excludeNames;excludeTypes;excludeTags;_schemaFormat="original";rootId;keyMapByRunId={};counterMapByRunName={};transformStream;writer;receiveStream;name="log_stream_tracer";lc_prefer_streaming=!0;constructor(t){super({_awaitHandler:!0,...t}),this.autoClose=t?.autoClose??!0,this.includeNames=t?.includeNames,this.includeTypes=t?.includeTypes,this.includeTags=t?.includeTags,this.excludeNames=t?.excludeNames,this.excludeTypes=t?.excludeTypes,this.excludeTags=t?.excludeTags,this._schemaFormat=t?._schemaFormat??this._schemaFormat,this.transformStream=new TransformStream,this.writer=this.transformStream.writable.getWriter(),this.receiveStream=nr.fromReadableStream(this.transformStream.readable)}[Symbol.asyncIterator](){return this.receiveStream}async persistRun(t){}_includeRun(t){if(t.id===this.rootId)return!1;let e=t.tags??[],I=this.includeNames===void 0&&this.includeTags===void 0&&this.includeTypes===void 0;return this.includeNames!==void 0&&(I=I||this.includeNames.includes(t.name)),this.includeTypes!==void 0&&(I=I||this.includeTypes.includes(t.run_type)),this.includeTags!==void 0&&(I=I||e.find(l=>this.includeTags?.includes(l))!==void 0),this.excludeNames!==void 0&&(I=I&&!this.excludeNames.includes(t.name)),this.excludeTypes!==void 0&&(I=I&&!this.excludeTypes.includes(t.run_type)),this.excludeTags!==void 0&&(I=I&&e.every(l=>!this.excludeTags?.includes(l))),I}async*tapOutputIterable(t,e){for await(let I of e){if(t!==this.rootId){let l=this.keyMapByRunId[t];l&&await this.writer.write(new UA({ops:[{op:"add",path:`/logs/${l}/streamed_output/-`,value:I}]}))}yield I}}async onRunCreate(t){if(this.rootId===void 0&&(this.rootId=t.id,await this.writer.write(new UA({ops:[{op:"replace",path:"",value:{id:t.id,name:t.name,type:t.run_type,streamed_output:[],final_output:void 0,logs:{}}}]}))),!this._includeRun(t))return;this.counterMapByRunName[t.name]===void 0&&(this.counterMapByRunName[t.name]=0),this.counterMapByRunName[t.name]+=1;let e=this.counterMapByRunName[t.name];this.keyMapByRunId[t.id]=e===1?t.name:`${t.name}:${e}`;let I={id:t.id,name:t.name,type:t.run_type,tags:t.tags??[],metadata:t.extra?.metadata??{},start_time:new Date(t.start_time).toISOString(),streamed_output:[],streamed_output_str:[],final_output:void 0,end_time:void 0};this._schemaFormat==="streaming_events"&&(I.inputs=await Ast(t,this._schemaFormat)),await this.writer.write(new UA({ops:[{op:"add",path:`/logs/${this.keyMapByRunId[t.id]}`,value:I}]}))}async onRunUpdate(t){try{let e=this.keyMapByRunId[t.id];if(e===void 0)return;let I=[];this._schemaFormat==="streaming_events"&&I.push({op:"replace",path:`/logs/${e}/inputs`,value:await Ast(t,this._schemaFormat)}),I.push({op:"add",path:`/logs/${e}/final_output`,value:await Fst(t,this._schemaFormat)}),t.end_time!==void 0&&I.push({op:"add",path:`/logs/${e}/end_time`,value:new Date(t.end_time).toISOString()});let l=new UA({ops:I});await this.writer.write(l)}finally{if(t.id===this.rootId){let e=new UA({ops:[{op:"replace",path:"/final_output",value:await Fst(t,this._schemaFormat)}]});await this.writer.write(e),this.autoClose&&await this.writer.close()}}}async onLLMNewToken(t,e,I){let l=this.keyMapByRunId[t.id];if(l===void 0)return;let n=t.inputs.messages!==void 0,a;n?x5I(I?.chunk)?a=I?.chunk:a=new eI({id:`run-${t.id}`,content:e}):a=e;let c=new UA({ops:[{op:"add",path:`/logs/${l}/streamed_output_str/-`,value:e},{op:"add",path:`/logs/${l}/streamed_output/-`,value:a}]});await this.writer.write(c)}}});var gst,NJ,Pr,Nc,Yo=g(()=>{o();Ct();gst=ve({ChatGenerationChunk:()=>Nc,GenerationChunk:()=>Pr,RUN_KEY:()=>NJ}),NJ="__run",Pr=class vst{text;generationInfo;constructor(e){this.text=e.text,this.generationInfo=e.generationInfo}concat(e){return new vst({text:this.text+e.text,generationInfo:{...this.generationInfo,...e.generationInfo}})}},Nc=class yst extends Pr{message;constructor(e){super(e),this.message=e.message}concat(e){return new yst({text:this.text+e.text,generationInfo:{...this.generationInfo,...e.generationInfo},message:this.message.concat(e.message)})}}});function jne({name:t,serialized:e}){return t!==void 0?t:e?.name!==void 0?e.name:e?.id!==void 0&&Array.isArray(e?.id)?e.id[e.id.length-1]:"Unnamed"}var wst,Hst,Qst=g(()=>{o();tG();BR();Lb();Yo();wst=t=>t.name==="event_stream_tracer",Hst=class extends Ni{autoClose=!0;includeNames;includeTypes;includeTags;excludeNames;excludeTypes;excludeTags;runInfoMap=new Map;tappedPromises=new Map;transformStream;writer;receiveStream;readableStreamClosed=!1;name="event_stream_tracer";lc_prefer_streaming=!0;constructor(t){super({_awaitHandler:!0,...t}),this.autoClose=t?.autoClose??!0,this.includeNames=t?.includeNames,this.includeTypes=t?.includeTypes,this.includeTags=t?.includeTags,this.excludeNames=t?.excludeNames,this.excludeTypes=t?.excludeTypes,this.excludeTags=t?.excludeTags,this.transformStream=new TransformStream({flush:()=>{this.readableStreamClosed=!0}}),this.writer=this.transformStream.writable.getWriter(),this.receiveStream=nr.fromReadableStream(this.transformStream.readable)}[Symbol.asyncIterator](){return this.receiveStream}async persistRun(t){}_includeRun(t){let e=t.tags??[],I=this.includeNames===void 0&&this.includeTags===void 0&&this.includeTypes===void 0;return this.includeNames!==void 0&&(I=I||this.includeNames.includes(t.name)),this.includeTypes!==void 0&&(I=I||this.includeTypes.includes(t.runType)),this.includeTags!==void 0&&(I=I||e.find(l=>this.includeTags?.includes(l))!==void 0),this.excludeNames!==void 0&&(I=I&&!this.excludeNames.includes(t.name)),this.excludeTypes!==void 0&&(I=I&&!this.excludeTypes.includes(t.runType)),this.excludeTags!==void 0&&(I=I&&e.every(l=>!this.excludeTags?.includes(l))),I}async*tapOutputIterable(t,e){let I=await e.next();if(I.done)return;let l=this.runInfoMap.get(t);if(l===void 0){yield I.value;return}function n(c,r){return c==="llm"&&typeof r=="string"?new Pr({text:r}):r}let a=this.tappedPromises.get(t);if(a===void 0){let c;a=new Promise(r=>{c=r}),this.tappedPromises.set(t,a);try{let r={event:`on_${l.runType}_stream`,run_id:t,name:l.name,tags:l.tags,metadata:l.metadata,data:{}};await this.send({...r,data:{chunk:n(l.runType,I.value)}},l),yield I.value;for await(let s of e)l.runType!=="tool"&&l.runType!=="retriever"&&await this.send({...r,data:{chunk:n(l.runType,s)}},l),yield s}finally{c?.()}}else{yield I.value;for await(let c of e)yield c}}async send(t,e){this.readableStreamClosed||this._includeRun(e)&&await this.writer.write(t)}async sendEndEvent(t,e){let I=this.tappedPromises.get(t.run_id);I!==void 0?I.then(()=>{this.send(t,e)}):await this.send(t,e)}async onLLMStart(t){let e=jne(t),I=t.inputs.messages!==void 0?"chat_model":"llm",l={tags:t.tags??[],metadata:t.extra?.metadata??{},name:e,runType:I,inputs:t.inputs};this.runInfoMap.set(t.id,l);let n=`on_${I}_start`;await this.send({event:n,data:{input:t.inputs},name:e,tags:t.tags??[],run_id:t.id,metadata:t.extra?.metadata??{}},l)}async onLLMNewToken(t,e,I){let l=this.runInfoMap.get(t.id),n,a;if(l===void 0)throw new Error(`onLLMNewToken: Run ID ${t.id} not found in run map.`);if(this.runInfoMap.size!==1){if(l.runType==="chat_model")a="on_chat_model_stream",I?.chunk===void 0?n=new eI({content:e,id:`run-${t.id}`}):n=I.chunk.message;else if(l.runType==="llm")a="on_llm_stream",I?.chunk===void 0?n=new Pr({text:e}):n=I.chunk;else throw new Error(`Unexpected run type ${l.runType}`);await this.send({event:a,data:{chunk:n},run_id:t.id,name:l.name,tags:l.tags,metadata:l.metadata},l)}}async onLLMEnd(t){let e=this.runInfoMap.get(t.id);this.runInfoMap.delete(t.id);let I;if(e===void 0)throw new Error(`onLLMEnd: Run ID ${t.id} not found in run map.`);let l=t.outputs?.generations,n;if(e.runType==="chat_model"){for(let a of l??[]){if(n!==void 0)break;n=a[0]?.message}I="on_chat_model_end"}else if(e.runType==="llm")n={generations:l?.map(a=>a.map(c=>({text:c.text,generationInfo:c.generationInfo}))),llmOutput:t.outputs?.llmOutput??{}},I="on_llm_end";else throw new Error(`onLLMEnd: Unexpected run type: ${e.runType}`);await this.sendEndEvent({event:I,data:{output:n,input:e.inputs},run_id:t.id,name:e.name,tags:e.tags,metadata:e.metadata},e)}async onChainStart(t){let e=jne(t),I=t.run_type??"chain",l={tags:t.tags??[],metadata:t.extra?.metadata??{},name:e,runType:t.run_type},n={};t.inputs.input===""&&Object.keys(t.inputs).length===1?(n={},l.inputs={}):t.inputs.input!==void 0?(n.input=t.inputs.input,l.inputs=t.inputs.input):(n.input=t.inputs,l.inputs=t.inputs),this.runInfoMap.set(t.id,l),await this.send({event:`on_${I}_start`,data:n,name:e,tags:t.tags??[],run_id:t.id,metadata:t.extra?.metadata??{}},l)}async onChainEnd(t){let e=this.runInfoMap.get(t.id);if(this.runInfoMap.delete(t.id),e===void 0)throw new Error(`onChainEnd: Run ID ${t.id} not found in run map.`);let I=`on_${t.run_type}_end`,l=t.inputs??e.inputs??{},n={output:t.outputs?.output??t.outputs,input:l};l.input&&Object.keys(l).length===1&&(n.input=l.input,e.inputs=l.input),await this.sendEndEvent({event:I,data:n,run_id:t.id,name:e.name,tags:e.tags,metadata:e.metadata??{}},e)}async onToolStart(t){let e=jne(t),I={tags:t.tags??[],metadata:t.extra?.metadata??{},name:e,runType:"tool",inputs:t.inputs??{}};this.runInfoMap.set(t.id,I),await this.send({event:"on_tool_start",data:{input:t.inputs??{}},name:e,run_id:t.id,tags:t.tags??[],metadata:t.extra?.metadata??{}},I)}async onToolEnd(t){let e=this.runInfoMap.get(t.id);if(this.runInfoMap.delete(t.id),e===void 0)throw new Error(`onToolEnd: Run ID ${t.id} not found in run map.`);if(e.inputs===void 0)throw new Error(`onToolEnd: Run ID ${t.id} is a tool call, and is expected to have traced inputs.`);let I=t.outputs?.output===void 0?t.outputs:t.outputs.output;await this.sendEndEvent({event:"on_tool_end",data:{output:I,input:e.inputs},run_id:t.id,name:e.name,tags:e.tags,metadata:e.metadata},e)}async onToolError(t){let e=this.runInfoMap.get(t.id);if(this.runInfoMap.delete(t.id),e===void 0)throw new Error(`onToolEnd: Run ID ${t.id} not found in run map.`);if(e.inputs===void 0)throw new Error(`onToolEnd: Run ID ${t.id} is a tool call, and is expected to have traced inputs.`);await this.sendEndEvent({event:"on_tool_error",data:{input:e.inputs,error:t.error},run_id:t.id,name:e.name,tags:e.tags,metadata:e.metadata},e)}async onRetrieverStart(t){let e=jne(t),I={tags:t.tags??[],metadata:t.extra?.metadata??{},name:e,runType:"retriever",inputs:{query:t.inputs.query}};this.runInfoMap.set(t.id,I),await this.send({event:"on_retriever_start",data:{input:{query:t.inputs.query}},name:e,tags:t.tags??[],run_id:t.id,metadata:t.extra?.metadata??{}},I)}async onRetrieverEnd(t){let e=this.runInfoMap.get(t.id);if(this.runInfoMap.delete(t.id),e===void 0)throw new Error(`onRetrieverEnd: Run ID ${t.id} not found in run map.`);await this.sendEndEvent({event:"on_retriever_end",data:{output:t.outputs?.documents??t.outputs,input:e.inputs},run_id:t.id,name:e.name,tags:e.tags,metadata:e.metadata},e)}async handleCustomEvent(t,e,I){let l=this.runInfoMap.get(I);if(l===void 0)throw new Error(`handleCustomEvent: Run ID ${I} not found in run map.`);await this.send({event:"on_custom_event",run_id:I,name:t,tags:l.tags,metadata:l.metadata,data:e},l)}async finish(){let t=[...this.tappedPromises.values()];Promise.all(t).finally(()=>{this.writer.close()})}}});function fst(t){if(!(t&&U5I(t)&&t.name==="TypeError"&&typeof t.message=="string"))return!1;let{message:e,stack:I}=t;return e==="Load failed"?I===void 0||"__sentry_captured__"in t:e.startsWith("error sending request for url")?!0:O5I.has(e)}var j5I,U5I,O5I,Est=g(()=>{o();j5I=Object.prototype.toString,U5I=t=>j5I.call(t)==="[object Error]",O5I=new Set(["network error","Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed","fetch failed","terminated"," A network error occurred.","Network connection lost"])});function z5I(t){if(typeof t=="number"){if(t<0)throw new TypeError("Expected `retries` to be a non-negative number.");if(Number.isNaN(t))throw new TypeError("Expected `retries` to be a valid number or Infinity, got NaN.")}else if(t!==void 0)throw new TypeError("Expected `retries` to be a number or Infinity.")}function Une(t,e,{min:I=0,allowInfinity:l=!1}={}){if(e!==void 0){if(typeof e!="number"||Number.isNaN(e))throw new TypeError(`Expected \`${t}\` to be a number${l?" or Infinity":""}.`);if(!l&&!Number.isFinite(e))throw new TypeError(`Expected \`${t}\` to be a finite number.`);if(e0&&await new Promise((b,Z)=>{let p=()=>{clearTimeout(W),n.signal?.removeEventListener("abort",p),Z(n.signal.reason)},W=setTimeout(()=>{n.signal?.removeEventListener("abort",p),b()},u);n.unref&&W.unref?.(),n.signal?.addEventListener("abort",p,{once:!0})}),n.signal?.throwIfAborted(),!0}async function NT(t,e={}){if(e={...e},z5I(e.retries),Object.hasOwn(e,"forever"))throw new Error("The `forever` option is no longer supported. For many use-cases, you can set `retries: Infinity` instead.");e.retries??=10,e.factor??=2,e.minTimeout??=1e3,e.maxTimeout??=Number.POSITIVE_INFINITY,e.maxRetryTime??=Number.POSITIVE_INFINITY,e.randomize??=!1,e.onFailedAttempt??=()=>{},e.shouldRetry??=()=>!0,e.shouldConsumeRetry??=()=>!0,Une("factor",e.factor,{min:0,allowInfinity:!1}),Une("minTimeout",e.minTimeout,{min:0,allowInfinity:!1}),Une("maxTimeout",e.maxTimeout,{min:0,allowInfinity:!0}),Une("maxRetryTime",e.maxRetryTime,{min:0,allowInfinity:!0}),e.factor>0||(e.factor=1),e.signal?.throwIfAborted();let I=0,l=0,n=performance.now();for(;!Number.isFinite(e.retries)||l<=e.retries;){I++;try{e.signal?.throwIfAborted();let a=await t(I);return e.signal?.throwIfAborted(),a}catch(a){await S5I({error:a,attemptNumber:I,retriesConsumed:l,startTime:n,options:e})&&l++}}throw new Error("Retry attempts exhausted without throwing an error.")}var B5I,Uve=g(()=>{o();Est();B5I=class extends Error{constructor(t){super(),t instanceof Error?(this.originalError=t,{message:t}=t):(this.originalError=new Error(t),this.originalError.stack=this.stack),this.name="AbortError",this.message=t}}});var One,Cst,T5I,_5I,tZ,JH=g(()=>{o();Ct();Ax();Uve();One=z(bne(),1),Cst=ve({AsyncCaller:()=>tZ}),T5I=[400,401,402,403,404,405,406,407,409],_5I=t=>{if(typeof t!="object"||t===null)return;if("message"in t&&typeof t.message=="string"&&(t.message.startsWith("Cancel")||t.message.startsWith("AbortError"))||"name"in t&&typeof t.name=="string"&&t.name==="AbortError"||"code"in t&&typeof t.code=="string"&&t.code==="ECONNABORTED")throw t;let e="response"in t&&typeof t.response=="object"&&t.response!==null&&"status"in t.response&&typeof t.response.status=="number"?t.response.status:void 0,I="status"in t&&typeof t.status=="number"?t.status:void 0,l=e??I;if(l&&T5I.includes(+l))throw t;if(("error"in t&&typeof t.error=="object"&&t.error!==null&&"code"in t.error&&typeof t.error.code=="string"?t.error.code:void 0)==="insufficient_quota"){let n=new Error("message"in t&&typeof t.message=="string"?t.message:"Insufficient quota");throw n.name="InsufficientQuotaError",n}},tZ=class{maxConcurrency;maxRetries;onFailedAttempt;queue;constructor(t){this.maxConcurrency=t.maxConcurrency??1/0,this.maxRetries=t.maxRetries??6,this.onFailedAttempt=t.onFailedAttempt??_5I,this.queue=new("default"in One.default?One.default.default:One.default)({concurrency:this.maxConcurrency})}async call(t,...e){return this.queue.add(()=>NT(()=>t(...e).catch(I=>{throw I instanceof Error?I:new Error(I)}),{onFailedAttempt:({error:I})=>this.onFailedAttempt?.(I),retries:this.maxRetries,randomize:!0}),{throwOnTimeout:!0})}callWithOptions(t,e,...I){if(t.signal){let l;return Promise.race([this.call(e,...I),new Promise((n,a)=>{l=()=>{a(QH(t.signal))},t.signal?.addEventListener("abort",l,{once:!0})})]).finally(()=>{t.signal&&l&&t.signal.removeEventListener("abort",l)})}return this.call(e,...I)}fetch(...t){return this.call(()=>fetch(...t).then(e=>e.ok?e:Promise.reject(e)))}}});var Ove,Lst=g(()=>{o();BR();Ove=class extends Ni{name="RootListenersTracer";rootId;config;argOnStart;argOnEnd;argOnError;constructor({config:t,onStart:e,onEnd:I,onError:l}){super({_awaitHandler:!0}),this.config=t,this.argOnStart=e,this.argOnEnd=I,this.argOnError=l}persistRun(t){return Promise.resolve()}async onRunCreate(t){this.rootId||(this.rootId=t.id,this.argOnStart&&await this.argOnStart(t,this.config))}async onRunUpdate(t){t.id===this.rootId&&(t.error?this.argOnError&&await this.argOnError(t,this.config):this.argOnEnd&&await this.argOnEnd(t,this.config))}}});function VT(t){return t?t.lc_runnable:!1}var kst,xst,zne=g(()=>{o();kst=class{includeNames;includeTypes;includeTags;excludeNames;excludeTypes;excludeTags;constructor(t){this.includeNames=t.includeNames,this.includeTypes=t.includeTypes,this.includeTags=t.includeTags,this.excludeNames=t.excludeNames,this.excludeTypes=t.excludeTypes,this.excludeTags=t.excludeTags}includeEvent(t,e){let I=this.includeNames===void 0&&this.includeTypes===void 0&&this.includeTags===void 0,l=t.tags??[];return this.includeNames!==void 0&&(I=I||this.includeNames.includes(t.name)),this.includeTypes!==void 0&&(I=I||this.includeTypes.includes(e)),this.includeTags!==void 0&&(I=I||l.some(n=>this.includeTags?.includes(n))),this.excludeNames!==void 0&&(I=I&&!this.excludeNames.includes(t.name)),this.excludeTypes!==void 0&&(I=I&&!this.excludeTypes.includes(e)),this.excludeTags!==void 0&&(I=I&&l.every(n=>!this.excludeTags?.includes(n))),I}},xst=t=>btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")});function de(t,e,I){function l(r,s){var i;Object.defineProperty(r,"_zod",{value:r._zod??{},enumerable:!1}),(i=r._zod).traits??(i.traits=new Set),r._zod.traits.add(t),e(r,s);for(let G in c.prototype)G in r||Object.defineProperty(r,G,{value:c.prototype[G].bind(r)});r._zod.constr=c,r._zod.def=s}let n=I?.Parent??Object;class a extends n{}Object.defineProperty(a,"name",{value:t});function c(r){var s;let i=I?.Parent?new a:this;l(i,r),(s=i._zod).deferred??(s.deferred=[]);for(let G of i._zod.deferred)G();return i}return Object.defineProperty(c,"init",{value:l}),Object.defineProperty(c,Symbol.hasInstance,{value:r=>I?.Parent&&r instanceof I.Parent?!0:r?._zod?.traits?.has(t)}),Object.defineProperty(c,"name",{value:t}),c}function ms(t){return t&&Object.assign(YT,t),YT}var zve,Bve,OA,YT,gx=g(()=>{o();zve=Object.freeze({status:"aborted"});Bve=Symbol("zod_brand"),OA=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},YT={}});var dt={};tr(dt,{BIGINT_FORMAT_RANGES:()=>eye,Class:()=>Sve,NUMBER_FORMAT_RANGES:()=>$ve,aborted:()=>YJ,allowsEval:()=>Dve,assert:()=>$5I,assertEqual:()=>K5I,assertIs:()=>q5I,assertNever:()=>P5I,assertNotEqual:()=>D5I,assignProp:()=>Kve,cached:()=>FT,captureStackTrace:()=>Bne,cleanEnum:()=>dLI,cleanRegex:()=>XT,clone:()=>ar,createTransparentProxy:()=>aLI,defineLazy:()=>Rn,esc:()=>VJ,escapeRegex:()=>AX,extend:()=>sLI,finalizeIssue:()=>IZ,floatSafeRemainder:()=>_ve,getElementAtPath:()=>eLI,getEnumValues:()=>AT,getLengthableOrigin:()=>yT,getParsedType:()=>nLI,getSizableOrigin:()=>vT,isObject:()=>vx,isPlainObject:()=>yx,issue:()=>tye,joinValues:()=>Ue,jsonStringifyReplacer:()=>Tve,merge:()=>oLI,normalizeParams:()=>at,nullish:()=>CH,numKeys:()=>lLI,omit:()=>rLI,optionalKeys:()=>Pve,partial:()=>iLI,pick:()=>cLI,prefixIssues:()=>kb,primitiveTypes:()=>qve,promiseAllObject:()=>tLI,propertyKeyTypes:()=>gT,randomString:()=>ILI,required:()=>GLI,stringifyPrimitive:()=>mt,unwrapMessage:()=>RT});function K5I(t){return t}function D5I(t){return t}function q5I(t){}function P5I(t){throw new Error}function $5I(t){}function AT(t){let e=Object.values(t).filter(l=>typeof l=="number");return Object.entries(t).filter(([l,n])=>e.indexOf(+l)===-1).map(([l,n])=>n)}function Ue(t,e="|"){return t.map(I=>mt(I)).join(e)}function Tve(t,e){return typeof e=="bigint"?e.toString():e}function FT(t){return{get value(){{let I=t();return Object.defineProperty(this,"value",{value:I}),I}throw new Error("cached value already set")}}}function CH(t){return t==null}function XT(t){let e=t.startsWith("^")?1:0,I=t.endsWith("$")?t.length-1:t.length;return t.slice(e,I)}function _ve(t,e){let I=(t.toString().split(".")[1]||"").length,l=(e.toString().split(".")[1]||"").length,n=I>l?I:l,a=Number.parseInt(t.toFixed(n).replace(".","")),c=Number.parseInt(e.toFixed(n).replace(".",""));return a%c/10**n}function Rn(t,e,I){Object.defineProperty(t,e,{get(){{let n=I();return t[e]=n,n}throw new Error("cached value already set")},set(n){Object.defineProperty(t,e,{value:n})},configurable:!0})}function Kve(t,e,I){Object.defineProperty(t,e,{value:I,writable:!0,enumerable:!0,configurable:!0})}function eLI(t,e){return e?e.reduce((I,l)=>I?.[l],t):t}function tLI(t){let e=Object.keys(t),I=e.map(l=>t[l]);return Promise.all(I).then(l=>{let n={};for(let a=0;ae};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function aLI(t){let e;return new Proxy({},{get(I,l,n){return e??(e=t()),Reflect.get(e,l,n)},set(I,l,n,a){return e??(e=t()),Reflect.set(e,l,n,a)},has(I,l){return e??(e=t()),Reflect.has(e,l)},deleteProperty(I,l){return e??(e=t()),Reflect.deleteProperty(e,l)},ownKeys(I){return e??(e=t()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(I,l){return e??(e=t()),Reflect.getOwnPropertyDescriptor(e,l)},defineProperty(I,l,n){return e??(e=t()),Reflect.defineProperty(e,l,n)}})}function mt(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function Pve(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}function cLI(t,e){let I={},l=t._zod.def;for(let n in e){if(!(n in l.shape))throw new Error(`Unrecognized key: "${n}"`);e[n]&&(I[n]=l.shape[n])}return ar(t,{...t._zod.def,shape:I,checks:[]})}function rLI(t,e){let I={...t._zod.def.shape},l=t._zod.def;for(let n in e){if(!(n in l.shape))throw new Error(`Unrecognized key: "${n}"`);e[n]&&delete I[n]}return ar(t,{...t._zod.def,shape:I,checks:[]})}function sLI(t,e){if(!yx(e))throw new Error("Invalid input to extend: expected a plain object");let I={...t._zod.def,get shape(){let l={...t._zod.def.shape,...e};return Kve(this,"shape",l),l},checks:[]};return ar(t,I)}function oLI(t,e){return ar(t,{...t._zod.def,get shape(){let I={...t._zod.def.shape,...e._zod.def.shape};return Kve(this,"shape",I),I},catchall:e._zod.def.catchall,checks:[]})}function iLI(t,e,I){let l=e._zod.def.shape,n={...l};if(I)for(let a in I){if(!(a in l))throw new Error(`Unrecognized key: "${a}"`);I[a]&&(n[a]=t?new t({type:"optional",innerType:l[a]}):l[a])}else for(let a in l)n[a]=t?new t({type:"optional",innerType:l[a]}):l[a];return ar(e,{...e._zod.def,shape:n,checks:[]})}function GLI(t,e,I){let l=e._zod.def.shape,n={...l};if(I)for(let a in I){if(!(a in n))throw new Error(`Unrecognized key: "${a}"`);I[a]&&(n[a]=new t({type:"nonoptional",innerType:l[a]}))}else for(let a in l)n[a]=new t({type:"nonoptional",innerType:l[a]});return ar(e,{...e._zod.def,shape:n,checks:[]})}function YJ(t,e=0){for(let I=e;I{var l;return(l=I).path??(l.path=[]),I.path.unshift(t),I})}function RT(t){return typeof t=="string"?t:t?.message}function IZ(t,e,I){let l={...t,path:t.path??[]};if(!t.message){let n=RT(t.inst?._zod.def?.error?.(t))??RT(e?.error?.(t))??RT(I.customError?.(t))??RT(I.localeError?.(t))??"Invalid input";l.message=n}return delete l.inst,delete l.continue,e?.reportInput||delete l.input,l}function vT(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function yT(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function tye(...t){let[e,I,l]=t;return typeof e=="string"?{message:e,code:"custom",input:I,inst:l}:{...e}}function dLI(t){return Object.entries(t).filter(([e,I])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}var Bne,Dve,nLI,gT,qve,$ve,eye,Sve,yI=g(()=>{o();Bne=Error.captureStackTrace?Error.captureStackTrace:(...t)=>{};Dve=FT(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});nLI=t=>{let e=typeof t;switch(e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${e}`)}},gT=new Set(["string","number","symbol"]),qve=new Set(["string","number","bigint","boolean","symbol","undefined"]);$ve={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},eye={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};Sve=class{constructor(...e){}}});function HT(t,e=I=>I.message){let I={},l=[];for(let n of t.issues)n.path.length>0?(I[n.path[0]]=I[n.path[0]]||[],I[n.path[0]].push(e(n))):l.push(e(n));return{formErrors:l,fieldErrors:I}}function QT(t,e){let I=e||function(a){return a.message},l={_errors:[]},n=a=>{for(let c of a.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(r=>n({issues:r}));else if(c.code==="invalid_key")n({issues:c.issues});else if(c.code==="invalid_element")n({issues:c.issues});else if(c.path.length===0)l._errors.push(I(c));else{let r=l,s=0;for(;s{var r,s;for(let i of a.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(G=>n({issues:G},i.path));else if(i.code==="invalid_key")n({issues:i.issues},i.path);else if(i.code==="invalid_element")n({issues:i.issues},i.path);else{let G=[...c,...i.path];if(G.length===0){l.errors.push(I(i));continue}let d=l,u=0;for(;ul.path.length-n.path.length);for(let l of I)e.push(`\u2716 ${l.message}`),l.path?.length&&e.push(` \u2192 at ${Ust(l.path)}`);return e.join(` +`)}var jst,wT,wx,nye=g(()=>{o();gx();yI();jst=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),Object.defineProperty(t,"message",{get(){return JSON.stringify(e,Tve,2)},enumerable:!0}),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},wT=de("$ZodError",jst),wx=de("$ZodError",jst,{Parent:Error})});var Mne,zA,Sne,RJ,Tne,aye,_ne,cye,Kne=g(()=>{o();gx();nye();yI();Mne=t=>(e,I,l,n)=>{let a=l?Object.assign(l,{async:!1}):{async:!1},c=e._zod.run({value:I,issues:[]},a);if(c instanceof Promise)throw new OA;if(c.issues.length){let r=new(n?.Err??t)(c.issues.map(s=>IZ(s,a,ms())));throw Bne(r,n?.callee),r}return c.value},zA=Mne(wx),Sne=t=>async(e,I,l,n)=>{let a=l?Object.assign(l,{async:!0}):{async:!0},c=e._zod.run({value:I,issues:[]},a);if(c instanceof Promise&&(c=await c),c.issues.length){let r=new(n?.Err??t)(c.issues.map(s=>IZ(s,a,ms())));throw Bne(r,n?.callee),r}return c.value},RJ=Sne(wx),Tne=t=>(e,I,l)=>{let n=l?{...l,async:!1}:{async:!1},a=e._zod.run({value:I,issues:[]},n);if(a instanceof Promise)throw new OA;return a.issues.length?{success:!1,error:new(t??wT)(a.issues.map(c=>IZ(c,n,ms())))}:{success:!0,data:a.value}},aye=Tne(wx),_ne=t=>async(e,I,l)=>{let n=l?Object.assign(l,{async:!0}):{async:!0},a=e._zod.run({value:I,issues:[]},n);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new t(a.issues.map(c=>IZ(c,n,ms())))}:{success:!0,data:a.value}},cye=_ne(wx)});var FJ={};tr(FJ,{_emoji:()=>Ost,base64:()=>Vye,base64url:()=>Dne,bigint:()=>vye,boolean:()=>Hye,browserEmail:()=>VLI,cidrv4:()=>Wye,cidrv6:()=>Nye,cuid:()=>rye,cuid2:()=>sye,date:()=>Aye,datetime:()=>Xye,domain:()=>YLI,duration:()=>uye,e164:()=>Rye,email:()=>mye,emoji:()=>Zye,extendedDuration:()=>bLI,guid:()=>bye,hostname:()=>Yye,html5Email:()=>hLI,integer:()=>yye,ipv4:()=>pye,ipv6:()=>hye,ksuid:()=>Gye,lowercase:()=>Eye,nanoid:()=>dye,null:()=>Qye,number:()=>wye,rfc5322Email:()=>WLI,string:()=>gye,time:()=>Fye,ulid:()=>oye,undefined:()=>fye,unicodeEmail:()=>NLI,uppercase:()=>Jye,uuid:()=>AJ,uuid4:()=>mLI,uuid6:()=>ZLI,uuid7:()=>pLI,xid:()=>iye});function Zye(){return new RegExp(Ost,"u")}function Bst(t){let e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Fye(t){return new RegExp(`^${Bst(t)}$`)}function Xye(t){let e=Bst({precision:t.precision}),I=["Z"];t.local&&I.push(""),t.offset&&I.push("([+-]\\d{2}:\\d{2})");let l=`${e}(?:${I.join("|")})`;return new RegExp(`^${zst}T(?:${l})$`)}var rye,sye,oye,iye,Gye,dye,uye,bLI,bye,AJ,mLI,ZLI,pLI,mye,hLI,WLI,NLI,VLI,Ost,pye,hye,Wye,Nye,Vye,Dne,Yye,YLI,Rye,zst,Aye,gye,vye,yye,wye,Hye,Qye,fye,Eye,Jye,qne=g(()=>{o();rye=/^[cC][^\s-]{8,}$/,sye=/^[0-9a-z]+$/,oye=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,iye=/^[0-9a-vA-V]{20}$/,Gye=/^[A-Za-z0-9]{27}$/,dye=/^[a-zA-Z0-9_-]{21}$/,uye=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,bLI=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,bye=/^([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})$/,AJ=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/,mLI=AJ(4),ZLI=AJ(6),pLI=AJ(7),mye=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,hLI=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,WLI=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,NLI=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,VLI=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Ost="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";pye=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,hye=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,Wye=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Nye=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Vye=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Dne=/^[A-Za-z0-9_-]*$/,Yye=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,YLI=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Rye=/^\+(?:[0-9]){6,14}[0-9]$/,zst="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Aye=new RegExp(`^${zst}$`);gye=t=>{let e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},vye=/^\d+n?$/,yye=/^\d+$/,wye=/^-?\d+(?:\.\d+)?/i,Hye=/true|false/i,Qye=/null/i,fye=/undefined/i,Eye=/^[^A-Z]*$/,Jye=/^[^a-z]*$/});function Mst(t,e,I){t.issues.length&&e.issues.push(...kb(I,t.issues))}var cr,Sst,Pne,$ne,Cye,Lye,kye,xye,jye,Uye,Oye,zye,Bye,Hx,Mye,Sye,Tye,_ye,Kye,Dye,qye,Pye,$ye,eae=g(()=>{o();gx();qne();yI();cr=de("$ZodCheck",(t,e)=>{var I;t._zod??(t._zod={}),t._zod.def=e,(I=t._zod).onattach??(I.onattach=[])}),Sst={number:"number",bigint:"bigint",object:"date"},Pne=de("$ZodCheckLessThan",(t,e)=>{cr.init(t,e);let I=Sst[typeof e.value];t._zod.onattach.push(l=>{let n=l._zod.bag,a=(e.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value{(e.inclusive?l.value<=e.value:l.value{cr.init(t,e);let I=Sst[typeof e.value];t._zod.onattach.push(l=>{let n=l._zod.bag,a=(e.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>a&&(e.inclusive?n.minimum=e.value:n.exclusiveMinimum=e.value)}),t._zod.check=l=>{(e.inclusive?l.value>=e.value:l.value>e.value)||l.issues.push({origin:I,code:"too_small",minimum:e.value,input:l.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),Cye=de("$ZodCheckMultipleOf",(t,e)=>{cr.init(t,e),t._zod.onattach.push(I=>{var l;(l=I._zod.bag).multipleOf??(l.multipleOf=e.value)}),t._zod.check=I=>{if(typeof I.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof I.value=="bigint"?I.value%e.value===BigInt(0):_ve(I.value,e.value)===0)||I.issues.push({origin:typeof I.value,code:"not_multiple_of",divisor:e.value,input:I.value,inst:t,continue:!e.abort})}}),Lye=de("$ZodCheckNumberFormat",(t,e)=>{cr.init(t,e),e.format=e.format||"float64";let I=e.format?.includes("int"),l=I?"int":"number",[n,a]=$ve[e.format];t._zod.onattach.push(c=>{let r=c._zod.bag;r.format=e.format,r.minimum=n,r.maximum=a,I&&(r.pattern=yye)}),t._zod.check=c=>{let r=c.value;if(I){if(!Number.isInteger(r)){c.issues.push({expected:l,format:e.format,code:"invalid_type",input:r,inst:t});return}if(!Number.isSafeInteger(r)){r>0?c.issues.push({input:r,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:l,continue:!e.abort}):c.issues.push({input:r,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:l,continue:!e.abort});return}}ra&&c.issues.push({origin:"number",input:r,code:"too_big",maximum:a,inst:t})}}),kye=de("$ZodCheckBigIntFormat",(t,e)=>{cr.init(t,e);let[I,l]=eye[e.format];t._zod.onattach.push(n=>{let a=n._zod.bag;a.format=e.format,a.minimum=I,a.maximum=l}),t._zod.check=n=>{let a=n.value;al&&n.issues.push({origin:"bigint",input:a,code:"too_big",maximum:l,inst:t})}}),xye=de("$ZodCheckMaxSize",(t,e)=>{var I;cr.init(t,e),(I=t._zod.def).when??(I.when=l=>{let n=l.value;return!CH(n)&&n.size!==void 0}),t._zod.onattach.push(l=>{let n=l._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum{let n=l.value;n.size<=e.maximum||l.issues.push({origin:vT(n),code:"too_big",maximum:e.maximum,input:n,inst:t,continue:!e.abort})}}),jye=de("$ZodCheckMinSize",(t,e)=>{var I;cr.init(t,e),(I=t._zod.def).when??(I.when=l=>{let n=l.value;return!CH(n)&&n.size!==void 0}),t._zod.onattach.push(l=>{let n=l._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>n&&(l._zod.bag.minimum=e.minimum)}),t._zod.check=l=>{let n=l.value;n.size>=e.minimum||l.issues.push({origin:vT(n),code:"too_small",minimum:e.minimum,input:n,inst:t,continue:!e.abort})}}),Uye=de("$ZodCheckSizeEquals",(t,e)=>{var I;cr.init(t,e),(I=t._zod.def).when??(I.when=l=>{let n=l.value;return!CH(n)&&n.size!==void 0}),t._zod.onattach.push(l=>{let n=l._zod.bag;n.minimum=e.size,n.maximum=e.size,n.size=e.size}),t._zod.check=l=>{let n=l.value,a=n.size;if(a===e.size)return;let c=a>e.size;l.issues.push({origin:vT(n),...c?{code:"too_big",maximum:e.size}:{code:"too_small",minimum:e.size},inclusive:!0,exact:!0,input:l.value,inst:t,continue:!e.abort})}}),Oye=de("$ZodCheckMaxLength",(t,e)=>{var I;cr.init(t,e),(I=t._zod.def).when??(I.when=l=>{let n=l.value;return!CH(n)&&n.length!==void 0}),t._zod.onattach.push(l=>{let n=l._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum{let n=l.value;if(n.length<=e.maximum)return;let c=yT(n);l.issues.push({origin:c,code:"too_big",maximum:e.maximum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),zye=de("$ZodCheckMinLength",(t,e)=>{var I;cr.init(t,e),(I=t._zod.def).when??(I.when=l=>{let n=l.value;return!CH(n)&&n.length!==void 0}),t._zod.onattach.push(l=>{let n=l._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>n&&(l._zod.bag.minimum=e.minimum)}),t._zod.check=l=>{let n=l.value;if(n.length>=e.minimum)return;let c=yT(n);l.issues.push({origin:c,code:"too_small",minimum:e.minimum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),Bye=de("$ZodCheckLengthEquals",(t,e)=>{var I;cr.init(t,e),(I=t._zod.def).when??(I.when=l=>{let n=l.value;return!CH(n)&&n.length!==void 0}),t._zod.onattach.push(l=>{let n=l._zod.bag;n.minimum=e.length,n.maximum=e.length,n.length=e.length}),t._zod.check=l=>{let n=l.value,a=n.length;if(a===e.length)return;let c=yT(n),r=a>e.length;l.issues.push({origin:c,...r?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:l.value,inst:t,continue:!e.abort})}}),Hx=de("$ZodCheckStringFormat",(t,e)=>{var I,l;cr.init(t,e),t._zod.onattach.push(n=>{let a=n._zod.bag;a.format=e.format,e.pattern&&(a.patterns??(a.patterns=new Set),a.patterns.add(e.pattern))}),e.pattern?(I=t._zod).check??(I.check=n=>{e.pattern.lastIndex=0,!e.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:e.format,input:n.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(l=t._zod).check??(l.check=()=>{})}),Mye=de("$ZodCheckRegex",(t,e)=>{Hx.init(t,e),t._zod.check=I=>{e.pattern.lastIndex=0,!e.pattern.test(I.value)&&I.issues.push({origin:"string",code:"invalid_format",format:"regex",input:I.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),Sye=de("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=Eye),Hx.init(t,e)}),Tye=de("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=Jye),Hx.init(t,e)}),_ye=de("$ZodCheckIncludes",(t,e)=>{cr.init(t,e);let I=AX(e.includes),l=new RegExp(typeof e.position=="number"?`^.{${e.position}}${I}`:I);e.pattern=l,t._zod.onattach.push(n=>{let a=n._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(l)}),t._zod.check=n=>{n.value.includes(e.includes,e.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:n.value,inst:t,continue:!e.abort})}}),Kye=de("$ZodCheckStartsWith",(t,e)=>{cr.init(t,e);let I=new RegExp(`^${AX(e.prefix)}.*`);e.pattern??(e.pattern=I),t._zod.onattach.push(l=>{let n=l._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(I)}),t._zod.check=l=>{l.value.startsWith(e.prefix)||l.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:l.value,inst:t,continue:!e.abort})}}),Dye=de("$ZodCheckEndsWith",(t,e)=>{cr.init(t,e);let I=new RegExp(`.*${AX(e.suffix)}$`);e.pattern??(e.pattern=I),t._zod.onattach.push(l=>{let n=l._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(I)}),t._zod.check=l=>{l.value.endsWith(e.suffix)||l.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:l.value,inst:t,continue:!e.abort})}});qye=de("$ZodCheckProperty",(t,e)=>{cr.init(t,e),t._zod.check=I=>{let l=e.schema._zod.run({value:I.value[e.property],issues:[]},{});if(l instanceof Promise)return l.then(n=>Mst(n,I,e.property));Mst(l,I,e.property)}}),Pye=de("$ZodCheckMimeType",(t,e)=>{cr.init(t,e);let I=new Set(e.mime);t._zod.onattach.push(l=>{l._zod.bag.mime=e.mime}),t._zod.check=l=>{I.has(l.value.type)||l.issues.push({code:"invalid_value",values:e.mime,input:l.value.type,inst:t})}}),$ye=de("$ZodCheckOverwrite",(t,e)=>{cr.init(t,e),t._zod.check=I=>{I.value=e.tx(I.value)}})});var fT,ewe=g(()=>{o();fT=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let l=e.split(` +`).filter(c=>c),n=Math.min(...l.map(c=>c.length-c.trimStart().length)),a=l.map(c=>c.slice(n)).map(c=>" ".repeat(this.indent*2)+c);for(let c of a)this.content.push(c)}compile(){let e=Function,I=this?.args,n=[...(this?.content??[""]).map(a=>` ${a}`)];return new e(...I,n.join(` +`))}}});var twe,Iwe=g(()=>{o();twe={major:4,minor:0,patch:0}});function Rwe(t){if(t==="")return!0;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}function aot(t){if(!Dne.test(t))return!1;let e=t.replace(/[-_]/g,l=>l==="-"?"+":"/"),I=e.padEnd(Math.ceil(e.length/4)*4,"=");return Rwe(I)}function cot(t,e=null){try{let I=t.split(".");if(I.length!==3)return!1;let[l]=I;if(!l)return!1;let n=JSON.parse(atob(l));return!("typ"in n&&n?.typ!=="JWT"||!n.alg||e&&(!("alg"in n)||n.alg!==e))}catch{return!1}}function _st(t,e,I){t.issues.length&&e.issues.push(...kb(I,t.issues)),e.value[I]=t.value}function tae(t,e,I){t.issues.length&&e.issues.push(...kb(I,t.issues)),e.value[I]=t.value}function Kst(t,e,I,l){t.issues.length?l[I]===void 0?I in l?e.value[I]=void 0:e.value[I]=t.value:e.issues.push(...kb(I,t.issues)):t.value===void 0?I in l&&(e.value[I]=void 0):e.value[I]=t.value}function Dst(t,e,I,l){for(let n of t)if(n.issues.length===0)return e.value=n.value,e;return e.issues.push({code:"invalid_union",input:e.value,inst:I,errors:t.map(n=>n.issues.map(a=>IZ(a,l,ms())))}),e}function lwe(t,e){if(t===e)return{valid:!0,data:t};if(t instanceof Date&&e instanceof Date&&+t==+e)return{valid:!0,data:t};if(yx(t)&&yx(e)){let I=Object.keys(e),l=Object.keys(t).filter(a=>I.indexOf(a)!==-1),n={...t,...e};for(let a of l){let c=lwe(t[a],e[a]);if(!c.valid)return{valid:!1,mergeErrorPath:[a,...c.mergeErrorPath]};n[a]=c.data}return{valid:!0,data:n}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};let I=[];for(let l=0;lIZ(r,c,ms()))})),e.issues.length&&(gT.has(typeof l)?I.issues.push(...kb(l,e.issues)):I.issues.push({origin:"map",code:"invalid_element",input:n,inst:a,key:l,issues:e.issues.map(r=>IZ(r,c,ms()))})),I.value.set(t.value,e.value)}function $st(t,e){t.issues.length&&e.issues.push(...t.issues),e.value.add(t.value)}function eot(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}function tot(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}function Iot(t,e,I){return YJ(t)?t:e.out._zod.run({value:t.value,issues:t.issues},I)}function lot(t){return t.value=Object.freeze(t.value),t}function not(t,e,I,l){if(!t){let n={code:"custom",input:I,inst:l,path:[...l._zod.def.path??[]],continue:!l._zod.def.abort};l._zod.def.params&&(n.params=l._zod.def.params),e.issues.push(tye(n))}}var xI,XJ,sa,nwe,awe,cwe,rwe,swe,owe,iwe,Gwe,dwe,uwe,bwe,mwe,Zwe,pwe,hwe,Wwe,Nwe,Vwe,Ywe,Awe,Fwe,Xwe,gwe,vwe,lae,ywe,ET,nae,wwe,Hwe,Qwe,fwe,Ewe,LH,JT,Jwe,Cwe,CT,Lwe,aae,kwe,xwe,gJ,jwe,Uwe,Owe,zwe,Bwe,Mwe,LT,Qx,Swe,Twe,_we,Kwe,Dwe,qwe,Pwe,kT,$we,eHe,tHe,IHe,lHe,xT=g(()=>{o();eae();gx();ewe();Kne();qne();yI();Iwe();yI();xI=de("$ZodType",(t,e)=>{var I;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=twe;let l=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&l.unshift(t);for(let n of l)for(let a of n._zod.onattach)a(t);if(l.length===0)(I=t._zod).deferred??(I.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{let n=(a,c,r)=>{let s=YJ(a),i;for(let G of c){if(G._zod.def.when){if(!G._zod.def.when(a))continue}else if(s)continue;let d=a.issues.length,u=G._zod.check(a);if(u instanceof Promise&&r?.async===!1)throw new OA;if(i||u instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await u,a.issues.length!==d&&(s||(s=YJ(a,d)))});else{if(a.issues.length===d)continue;s||(s=YJ(a,d))}}return i?i.then(()=>a):a};t._zod.run=(a,c)=>{let r=t._zod.parse(a,c);if(r instanceof Promise){if(c.async===!1)throw new OA;return r.then(s=>n(s,l,c))}return n(r,l,c)}}t["~standard"]={validate:n=>{try{let a=aye(t,n);return a.success?{value:a.data}:{issues:a.error?.issues}}catch{return cye(t,n).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},vendor:"zod",version:1}}),XJ=de("$ZodString",(t,e)=>{xI.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??gye(t._zod.bag),t._zod.parse=(I,l)=>{if(e.coerce)try{I.value=String(I.value)}catch{}return typeof I.value=="string"||I.issues.push({expected:"string",code:"invalid_type",input:I.value,inst:t}),I}}),sa=de("$ZodStringFormat",(t,e)=>{Hx.init(t,e),XJ.init(t,e)}),nwe=de("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=bye),sa.init(t,e)}),awe=de("$ZodUUID",(t,e)=>{if(e.version){let l={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(l===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=AJ(l))}else e.pattern??(e.pattern=AJ());sa.init(t,e)}),cwe=de("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=mye),sa.init(t,e)}),rwe=de("$ZodURL",(t,e)=>{sa.init(t,e),t._zod.check=I=>{try{let l=I.value,n=new URL(l),a=n.href;e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(n.hostname)||I.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:Yye.source,input:I.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||I.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:I.value,inst:t,continue:!e.abort})),!l.endsWith("/")&&a.endsWith("/")?I.value=a.slice(0,-1):I.value=a;return}catch{I.issues.push({code:"invalid_format",format:"url",input:I.value,inst:t,continue:!e.abort})}}}),swe=de("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=Zye()),sa.init(t,e)}),owe=de("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=dye),sa.init(t,e)}),iwe=de("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=rye),sa.init(t,e)}),Gwe=de("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=sye),sa.init(t,e)}),dwe=de("$ZodULID",(t,e)=>{e.pattern??(e.pattern=oye),sa.init(t,e)}),uwe=de("$ZodXID",(t,e)=>{e.pattern??(e.pattern=iye),sa.init(t,e)}),bwe=de("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=Gye),sa.init(t,e)}),mwe=de("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=Xye(e)),sa.init(t,e)}),Zwe=de("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=Aye),sa.init(t,e)}),pwe=de("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=Fye(e)),sa.init(t,e)}),hwe=de("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=uye),sa.init(t,e)}),Wwe=de("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=pye),sa.init(t,e),t._zod.onattach.push(I=>{let l=I._zod.bag;l.format="ipv4"})}),Nwe=de("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=hye),sa.init(t,e),t._zod.onattach.push(I=>{let l=I._zod.bag;l.format="ipv6"}),t._zod.check=I=>{try{new URL(`http://[${I.value}]`)}catch{I.issues.push({code:"invalid_format",format:"ipv6",input:I.value,inst:t,continue:!e.abort})}}}),Vwe=de("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=Wye),sa.init(t,e)}),Ywe=de("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=Nye),sa.init(t,e),t._zod.check=I=>{let[l,n]=I.value.split("/");try{if(!n)throw new Error;let a=Number(n);if(`${a}`!==n)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${l}]`)}catch{I.issues.push({code:"invalid_format",format:"cidrv6",input:I.value,inst:t,continue:!e.abort})}}});Awe=de("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=Vye),sa.init(t,e),t._zod.onattach.push(I=>{I._zod.bag.contentEncoding="base64"}),t._zod.check=I=>{Rwe(I.value)||I.issues.push({code:"invalid_format",format:"base64",input:I.value,inst:t,continue:!e.abort})}});Fwe=de("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=Dne),sa.init(t,e),t._zod.onattach.push(I=>{I._zod.bag.contentEncoding="base64url"}),t._zod.check=I=>{aot(I.value)||I.issues.push({code:"invalid_format",format:"base64url",input:I.value,inst:t,continue:!e.abort})}}),Xwe=de("$ZodE164",(t,e)=>{e.pattern??(e.pattern=Rye),sa.init(t,e)});gwe=de("$ZodJWT",(t,e)=>{sa.init(t,e),t._zod.check=I=>{cot(I.value,e.alg)||I.issues.push({code:"invalid_format",format:"jwt",input:I.value,inst:t,continue:!e.abort})}}),vwe=de("$ZodCustomStringFormat",(t,e)=>{sa.init(t,e),t._zod.check=I=>{e.fn(I.value)||I.issues.push({code:"invalid_format",format:e.format,input:I.value,inst:t,continue:!e.abort})}}),lae=de("$ZodNumber",(t,e)=>{xI.init(t,e),t._zod.pattern=t._zod.bag.pattern??wye,t._zod.parse=(I,l)=>{if(e.coerce)try{I.value=Number(I.value)}catch{}let n=I.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return I;let a=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return I.issues.push({expected:"number",code:"invalid_type",input:n,inst:t,...a?{received:a}:{}}),I}}),ywe=de("$ZodNumber",(t,e)=>{Lye.init(t,e),lae.init(t,e)}),ET=de("$ZodBoolean",(t,e)=>{xI.init(t,e),t._zod.pattern=Hye,t._zod.parse=(I,l)=>{if(e.coerce)try{I.value=!!I.value}catch{}let n=I.value;return typeof n=="boolean"||I.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:t}),I}}),nae=de("$ZodBigInt",(t,e)=>{xI.init(t,e),t._zod.pattern=vye,t._zod.parse=(I,l)=>{if(e.coerce)try{I.value=BigInt(I.value)}catch{}return typeof I.value=="bigint"||I.issues.push({expected:"bigint",code:"invalid_type",input:I.value,inst:t}),I}}),wwe=de("$ZodBigInt",(t,e)=>{kye.init(t,e),nae.init(t,e)}),Hwe=de("$ZodSymbol",(t,e)=>{xI.init(t,e),t._zod.parse=(I,l)=>{let n=I.value;return typeof n=="symbol"||I.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:t}),I}}),Qwe=de("$ZodUndefined",(t,e)=>{xI.init(t,e),t._zod.pattern=fye,t._zod.values=new Set([void 0]),t._zod.optin="optional",t._zod.optout="optional",t._zod.parse=(I,l)=>{let n=I.value;return typeof n>"u"||I.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:t}),I}}),fwe=de("$ZodNull",(t,e)=>{xI.init(t,e),t._zod.pattern=Qye,t._zod.values=new Set([null]),t._zod.parse=(I,l)=>{let n=I.value;return n===null||I.issues.push({expected:"null",code:"invalid_type",input:n,inst:t}),I}}),Ewe=de("$ZodAny",(t,e)=>{xI.init(t,e),t._zod.parse=I=>I}),LH=de("$ZodUnknown",(t,e)=>{xI.init(t,e),t._zod.parse=I=>I}),JT=de("$ZodNever",(t,e)=>{xI.init(t,e),t._zod.parse=(I,l)=>(I.issues.push({expected:"never",code:"invalid_type",input:I.value,inst:t}),I)}),Jwe=de("$ZodVoid",(t,e)=>{xI.init(t,e),t._zod.parse=(I,l)=>{let n=I.value;return typeof n>"u"||I.issues.push({expected:"void",code:"invalid_type",input:n,inst:t}),I}}),Cwe=de("$ZodDate",(t,e)=>{xI.init(t,e),t._zod.parse=(I,l)=>{if(e.coerce)try{I.value=new Date(I.value)}catch{}let n=I.value,a=n instanceof Date;return a&&!Number.isNaN(n.getTime())||I.issues.push({expected:"date",code:"invalid_type",input:n,...a?{received:"Invalid Date"}:{},inst:t}),I}});CT=de("$ZodArray",(t,e)=>{xI.init(t,e),t._zod.parse=(I,l)=>{let n=I.value;if(!Array.isArray(n))return I.issues.push({expected:"array",code:"invalid_type",input:n,inst:t}),I;I.value=Array(n.length);let a=[];for(let c=0;c_st(i,I,c))):_st(s,I,c)}return a.length?Promise.all(a).then(()=>I):I}});Lwe=de("$ZodObject",(t,e)=>{xI.init(t,e);let I=FT(()=>{let d=Object.keys(e.shape);for(let b of d)if(!(e.shape[b]instanceof xI))throw new Error(`Invalid element at key "${b}": expected a Zod schema`);let u=Pve(e.shape);return{shape:e.shape,keys:d,keySet:new Set(d),numKeys:d.length,optionalKeys:new Set(u)}});Rn(t._zod,"propValues",()=>{let d=e.shape,u={};for(let b in d){let Z=d[b]._zod;if(Z.values){u[b]??(u[b]=new Set);for(let p of Z.values)u[b].add(p)}}return u});let l=d=>{let u=new fT(["shape","payload","ctx"]),b=I.value,Z=N=>{let V=VJ(N);return`shape[${V}]._zod.run({ value: input[${V}], issues: [] }, ctx)`};u.write("const input = payload.value;");let p=Object.create(null),W=0;for(let N of b.keys)p[N]=`key_${W++}`;u.write("const newResult = {}");for(let N of b.keys)if(b.optionalKeys.has(N)){let V=p[N];u.write(`const ${V} = ${Z(N)};`);let R=VJ(N);u.write(` + if (${V}.issues.length) { + if (input[${R}] === undefined) { + if (${R} in input) { + newResult[${R}] = undefined; + } + } else { + payload.issues = payload.issues.concat( + ${V}.issues.map((iss) => ({ + ...iss, + path: iss.path ? [${R}, ...iss.path] : [${R}], + })) + ); + } + } else if (${V}.value === undefined) { + if (${R} in input) newResult[${R}] = undefined; + } else { + newResult[${R}] = ${V}.value; + } + `)}else{let V=p[N];u.write(`const ${V} = ${Z(N)};`),u.write(` + if (${V}.issues.length) payload.issues = payload.issues.concat(${V}.issues.map(iss => ({ + ...iss, + path: iss.path ? [${VJ(N)}, ...iss.path] : [${VJ(N)}] + })));`),u.write(`newResult[${VJ(N)}] = ${V}.value`)}u.write("payload.value = newResult;"),u.write("return payload;");let h=u.compile();return(N,V)=>h(d,N,V)},n,a=vx,c=!YT.jitless,s=c&&Dve.value,i=e.catchall,G;t._zod.parse=(d,u)=>{G??(G=I.value);let b=d.value;if(!a(b))return d.issues.push({expected:"object",code:"invalid_type",input:b,inst:t}),d;let Z=[];if(c&&s&&u?.async===!1&&u.jitless!==!0)n||(n=l(e.shape)),d=n(d,u);else{d.value={};let V=G.shape;for(let R of G.keys){let F=V[R],v=F._zod.run({value:b[R],issues:[]},u),y=F._zod.optin==="optional"&&F._zod.optout==="optional";v instanceof Promise?Z.push(v.then(w=>y?Kst(w,d,R,b):tae(w,d,R))):y?Kst(v,d,R,b):tae(v,d,R)}}if(!i)return Z.length?Promise.all(Z).then(()=>d):d;let p=[],W=G.keySet,h=i._zod,N=h.def.type;for(let V of Object.keys(b)){if(W.has(V))continue;if(N==="never"){p.push(V);continue}let R=h.run({value:b[V],issues:[]},u);R instanceof Promise?Z.push(R.then(F=>tae(F,d,V))):tae(R,d,V)}return p.length&&d.issues.push({code:"unrecognized_keys",keys:p,input:b,inst:t}),Z.length?Promise.all(Z).then(()=>d):d}});aae=de("$ZodUnion",(t,e)=>{xI.init(t,e),Rn(t._zod,"optin",()=>e.options.some(I=>I._zod.optin==="optional")?"optional":void 0),Rn(t._zod,"optout",()=>e.options.some(I=>I._zod.optout==="optional")?"optional":void 0),Rn(t._zod,"values",()=>{if(e.options.every(I=>I._zod.values))return new Set(e.options.flatMap(I=>Array.from(I._zod.values)))}),Rn(t._zod,"pattern",()=>{if(e.options.every(I=>I._zod.pattern)){let I=e.options.map(l=>l._zod.pattern);return new RegExp(`^(${I.map(l=>XT(l.source)).join("|")})$`)}}),t._zod.parse=(I,l)=>{let n=!1,a=[];for(let c of e.options){let r=c._zod.run({value:I.value,issues:[]},l);if(r instanceof Promise)a.push(r),n=!0;else{if(r.issues.length===0)return r;a.push(r)}}return n?Promise.all(a).then(c=>Dst(c,I,t,l)):Dst(a,I,t,l)}}),kwe=de("$ZodDiscriminatedUnion",(t,e)=>{aae.init(t,e);let I=t._zod.parse;Rn(t._zod,"propValues",()=>{let n={};for(let a of e.options){let c=a._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(a)}"`);for(let[r,s]of Object.entries(c)){n[r]||(n[r]=new Set);for(let i of s)n[r].add(i)}}return n});let l=FT(()=>{let n=e.options,a=new Map;for(let c of n){let r=c._zod.propValues[e.discriminator];if(!r||r.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(c)}"`);for(let s of r){if(a.has(s))throw new Error(`Duplicate discriminator value "${String(s)}"`);a.set(s,c)}}return a});t._zod.parse=(n,a)=>{let c=n.value;if(!vx(c))return n.issues.push({code:"invalid_type",expected:"object",input:c,inst:t}),n;let r=l.value.get(c?.[e.discriminator]);return r?r._zod.run(n,a):e.unionFallback?I(n,a):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",input:c,path:[e.discriminator],inst:t}),n)}}),xwe=de("$ZodIntersection",(t,e)=>{xI.init(t,e),t._zod.parse=(I,l)=>{let n=I.value,a=e.left._zod.run({value:n,issues:[]},l),c=e.right._zod.run({value:n,issues:[]},l);return a instanceof Promise||c instanceof Promise?Promise.all([a,c]).then(([s,i])=>qst(I,s,i)):qst(I,a,c)}});gJ=de("$ZodTuple",(t,e)=>{xI.init(t,e);let I=e.items,l=I.length-[...I].reverse().findIndex(n=>n._zod.optin!=="optional");t._zod.parse=(n,a)=>{let c=n.value;if(!Array.isArray(c))return n.issues.push({input:c,inst:t,expected:"tuple",code:"invalid_type"}),n;n.value=[];let r=[];if(!e.rest){let i=c.length>I.length,G=c.length=c.length&&s>=l)continue;let G=i._zod.run({value:c[s],issues:[]},a);G instanceof Promise?r.push(G.then(d=>Iae(d,n,s))):Iae(G,n,s)}if(e.rest){let i=c.slice(I.length);for(let G of i){s++;let d=e.rest._zod.run({value:G,issues:[]},a);d instanceof Promise?r.push(d.then(u=>Iae(u,n,s))):Iae(d,n,s)}}return r.length?Promise.all(r).then(()=>n):n}});jwe=de("$ZodRecord",(t,e)=>{xI.init(t,e),t._zod.parse=(I,l)=>{let n=I.value;if(!yx(n))return I.issues.push({expected:"record",code:"invalid_type",input:n,inst:t}),I;let a=[];if(e.keyType._zod.values){let c=e.keyType._zod.values;I.value={};for(let s of c)if(typeof s=="string"||typeof s=="number"||typeof s=="symbol"){let i=e.valueType._zod.run({value:n[s],issues:[]},l);i instanceof Promise?a.push(i.then(G=>{G.issues.length&&I.issues.push(...kb(s,G.issues)),I.value[s]=G.value})):(i.issues.length&&I.issues.push(...kb(s,i.issues)),I.value[s]=i.value)}let r;for(let s in n)c.has(s)||(r=r??[],r.push(s));r&&r.length>0&&I.issues.push({code:"unrecognized_keys",input:n,inst:t,keys:r})}else{I.value={};for(let c of Reflect.ownKeys(n)){if(c==="__proto__")continue;let r=e.keyType._zod.run({value:c,issues:[]},l);if(r instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(r.issues.length){I.issues.push({origin:"record",code:"invalid_key",issues:r.issues.map(i=>IZ(i,l,ms())),input:c,path:[c],inst:t}),I.value[r.value]=r.value;continue}let s=e.valueType._zod.run({value:n[c],issues:[]},l);s instanceof Promise?a.push(s.then(i=>{i.issues.length&&I.issues.push(...kb(c,i.issues)),I.value[r.value]=i.value})):(s.issues.length&&I.issues.push(...kb(c,s.issues)),I.value[r.value]=s.value)}}return a.length?Promise.all(a).then(()=>I):I}}),Uwe=de("$ZodMap",(t,e)=>{xI.init(t,e),t._zod.parse=(I,l)=>{let n=I.value;if(!(n instanceof Map))return I.issues.push({expected:"map",code:"invalid_type",input:n,inst:t}),I;let a=[];I.value=new Map;for(let[c,r]of n){let s=e.keyType._zod.run({value:c,issues:[]},l),i=e.valueType._zod.run({value:r,issues:[]},l);s instanceof Promise||i instanceof Promise?a.push(Promise.all([s,i]).then(([G,d])=>{Pst(G,d,I,c,n,t,l)})):Pst(s,i,I,c,n,t,l)}return a.length?Promise.all(a).then(()=>I):I}});Owe=de("$ZodSet",(t,e)=>{xI.init(t,e),t._zod.parse=(I,l)=>{let n=I.value;if(!(n instanceof Set))return I.issues.push({input:n,inst:t,expected:"set",code:"invalid_type"}),I;let a=[];I.value=new Set;for(let c of n){let r=e.valueType._zod.run({value:c,issues:[]},l);r instanceof Promise?a.push(r.then(s=>$st(s,I))):$st(r,I)}return a.length?Promise.all(a).then(()=>I):I}});zwe=de("$ZodEnum",(t,e)=>{xI.init(t,e);let I=AT(e.entries);t._zod.values=new Set(I),t._zod.pattern=new RegExp(`^(${I.filter(l=>gT.has(typeof l)).map(l=>typeof l=="string"?AX(l):l.toString()).join("|")})$`),t._zod.parse=(l,n)=>{let a=l.value;return t._zod.values.has(a)||l.issues.push({code:"invalid_value",values:I,input:a,inst:t}),l}}),Bwe=de("$ZodLiteral",(t,e)=>{xI.init(t,e),t._zod.values=new Set(e.values),t._zod.pattern=new RegExp(`^(${e.values.map(I=>typeof I=="string"?AX(I):I?I.toString():String(I)).join("|")})$`),t._zod.parse=(I,l)=>{let n=I.value;return t._zod.values.has(n)||I.issues.push({code:"invalid_value",values:e.values,input:n,inst:t}),I}}),Mwe=de("$ZodFile",(t,e)=>{xI.init(t,e),t._zod.parse=(I,l)=>{let n=I.value;return n instanceof File||I.issues.push({expected:"file",code:"invalid_type",input:n,inst:t}),I}}),LT=de("$ZodTransform",(t,e)=>{xI.init(t,e),t._zod.parse=(I,l)=>{let n=e.transform(I.value,I);if(l.async)return(n instanceof Promise?n:Promise.resolve(n)).then(c=>(I.value=c,I));if(n instanceof Promise)throw new OA;return I.value=n,I}}),Qx=de("$ZodOptional",(t,e)=>{xI.init(t,e),t._zod.optin="optional",t._zod.optout="optional",Rn(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),Rn(t._zod,"pattern",()=>{let I=e.innerType._zod.pattern;return I?new RegExp(`^(${XT(I.source)})?$`):void 0}),t._zod.parse=(I,l)=>e.innerType._zod.optin==="optional"?e.innerType._zod.run(I,l):I.value===void 0?I:e.innerType._zod.run(I,l)}),Swe=de("$ZodNullable",(t,e)=>{xI.init(t,e),Rn(t._zod,"optin",()=>e.innerType._zod.optin),Rn(t._zod,"optout",()=>e.innerType._zod.optout),Rn(t._zod,"pattern",()=>{let I=e.innerType._zod.pattern;return I?new RegExp(`^(${XT(I.source)}|null)$`):void 0}),Rn(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(I,l)=>I.value===null?I:e.innerType._zod.run(I,l)}),Twe=de("$ZodDefault",(t,e)=>{xI.init(t,e),t._zod.optin="optional",Rn(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(I,l)=>{if(I.value===void 0)return I.value=e.defaultValue,I;let n=e.innerType._zod.run(I,l);return n instanceof Promise?n.then(a=>eot(a,e)):eot(n,e)}});_we=de("$ZodPrefault",(t,e)=>{xI.init(t,e),t._zod.optin="optional",Rn(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(I,l)=>(I.value===void 0&&(I.value=e.defaultValue),e.innerType._zod.run(I,l))}),Kwe=de("$ZodNonOptional",(t,e)=>{xI.init(t,e),Rn(t._zod,"values",()=>{let I=e.innerType._zod.values;return I?new Set([...I].filter(l=>l!==void 0)):void 0}),t._zod.parse=(I,l)=>{let n=e.innerType._zod.run(I,l);return n instanceof Promise?n.then(a=>tot(a,t)):tot(n,t)}});Dwe=de("$ZodSuccess",(t,e)=>{xI.init(t,e),t._zod.parse=(I,l)=>{let n=e.innerType._zod.run(I,l);return n instanceof Promise?n.then(a=>(I.value=a.issues.length===0,I)):(I.value=n.issues.length===0,I)}}),qwe=de("$ZodCatch",(t,e)=>{xI.init(t,e),t._zod.optin="optional",Rn(t._zod,"optout",()=>e.innerType._zod.optout),Rn(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(I,l)=>{let n=e.innerType._zod.run(I,l);return n instanceof Promise?n.then(a=>(I.value=a.value,a.issues.length&&(I.value=e.catchValue({...I,error:{issues:a.issues.map(c=>IZ(c,l,ms()))},input:I.value}),I.issues=[]),I)):(I.value=n.value,n.issues.length&&(I.value=e.catchValue({...I,error:{issues:n.issues.map(a=>IZ(a,l,ms()))},input:I.value}),I.issues=[]),I)}}),Pwe=de("$ZodNaN",(t,e)=>{xI.init(t,e),t._zod.parse=(I,l)=>((typeof I.value!="number"||!Number.isNaN(I.value))&&I.issues.push({input:I.value,inst:t,expected:"nan",code:"invalid_type"}),I)}),kT=de("$ZodPipe",(t,e)=>{xI.init(t,e),Rn(t._zod,"values",()=>e.in._zod.values),Rn(t._zod,"optin",()=>e.in._zod.optin),Rn(t._zod,"optout",()=>e.out._zod.optout),t._zod.parse=(I,l)=>{let n=e.in._zod.run(I,l);return n instanceof Promise?n.then(a=>Iot(a,e,l)):Iot(n,e,l)}});$we=de("$ZodReadonly",(t,e)=>{xI.init(t,e),Rn(t._zod,"propValues",()=>e.innerType._zod.propValues),Rn(t._zod,"values",()=>e.innerType._zod.values),Rn(t._zod,"optin",()=>e.innerType._zod.optin),Rn(t._zod,"optout",()=>e.innerType._zod.optout),t._zod.parse=(I,l)=>{let n=e.innerType._zod.run(I,l);return n instanceof Promise?n.then(lot):lot(n)}});eHe=de("$ZodTemplateLiteral",(t,e)=>{xI.init(t,e);let I=[];for(let l of e.parts)if(l instanceof xI){if(!l._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...l._zod.traits].shift()}`);let n=l._zod.pattern instanceof RegExp?l._zod.pattern.source:l._zod.pattern;if(!n)throw new Error(`Invalid template literal part: ${l._zod.traits}`);let a=n.startsWith("^")?1:0,c=n.endsWith("$")?n.length-1:n.length;I.push(n.slice(a,c))}else if(l===null||qve.has(typeof l))I.push(AX(`${l}`));else throw new Error(`Invalid template literal part: ${l}`);t._zod.pattern=new RegExp(`^${I.join("")}$`),t._zod.parse=(l,n)=>typeof l.value!="string"?(l.issues.push({input:l.value,inst:t,expected:"template_literal",code:"invalid_type"}),l):(t._zod.pattern.lastIndex=0,t._zod.pattern.test(l.value)||l.issues.push({input:l.value,inst:t,code:"invalid_format",format:"template_literal",pattern:t._zod.pattern.source}),l)}),tHe=de("$ZodPromise",(t,e)=>{xI.init(t,e),t._zod.parse=(I,l)=>Promise.resolve(I.value).then(n=>e.innerType._zod.run({value:n,issues:[]},l))}),IHe=de("$ZodLazy",(t,e)=>{xI.init(t,e),Rn(t._zod,"innerType",()=>e.getter()),Rn(t._zod,"pattern",()=>t._zod.innerType._zod.pattern),Rn(t._zod,"propValues",()=>t._zod.innerType._zod.propValues),Rn(t._zod,"optin",()=>t._zod.innerType._zod.optin),Rn(t._zod,"optout",()=>t._zod.innerType._zod.optout),t._zod.parse=(I,l)=>t._zod.innerType._zod.run(I,l)}),lHe=de("$ZodCustom",(t,e)=>{cr.init(t,e),xI.init(t,e),t._zod.parse=(I,l)=>I,t._zod.check=I=>{let l=I.value,n=e.fn(l);if(n instanceof Promise)return n.then(a=>not(a,I,l,t));not(n,I,l,t)}})});function sot(){return{localeError:RLI()}}var RLI,oot=g(()=>{o();yI();RLI=()=>{let t={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function e(n){return t[n]??null}let I=n=>{let a=typeof n;switch(a){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return a},l={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"};return n=>{switch(n.code){case"invalid_type":return`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${n.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${I(n.input)}`;case"invalid_value":return n.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${mt(n.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${Ue(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",c=e(n.origin);return c?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${a} ${n.maximum.toString()} ${c.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${a} ${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",c=e(n.origin);return c?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${a} ${n.minimum.toString()} ${c.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${a} ${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${n.prefix}"`:a.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${a.suffix}"`:a.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${a.includes}"`:a.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${a.pattern}`:`${l[a.format]??n.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${n.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${n.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${n.keys.length>1?"\u0629":""}: ${Ue(n.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}}});function iot(){return{localeError:ALI()}}var ALI,Got=g(()=>{o();yI();ALI=()=>{let t={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function e(n){return t[n]??null}let I=n=>{let a=typeof n;switch(a){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return a},l={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${n.expected}, daxil olan ${I(n.input)}`;case"invalid_value":return n.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${mt(n.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${Ue(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",c=e(n.origin);return c?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${a}${n.maximum.toString()} ${c.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",c=e(n.origin);return c?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${a}${n.minimum.toString()} ${c.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${a.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:a.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${a.suffix}" il\u0259 bitm\u0259lidir`:a.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${a.includes}" daxil olmal\u0131d\u0131r`:a.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${a.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${l[a.format]??n.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${n.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${n.keys.length>1?"lar":""}: ${Ue(n.keys,", ")}`;case"invalid_key":return`${n.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${n.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}}});function dot(t,e,I,l){let n=Math.abs(t),a=n%10,c=n%100;return c>=11&&c<=19?l:a===1?e:a>=2&&a<=4?I:l}function uot(){return{localeError:FLI()}}var FLI,bot=g(()=>{o();yI();FLI=()=>{let t={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function e(n){return t[n]??null}let I=n=>{let a=typeof n;switch(a){case"number":return Number.isNaN(n)?"NaN":"\u043B\u0456\u043A";case"object":{if(Array.isArray(n))return"\u043C\u0430\u0441\u0456\u045E";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return a},l={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"};return n=>{switch(n.code){case"invalid_type":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${n.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${I(n.input)}`;case"invalid_value":return n.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${mt(n.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${Ue(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",c=e(n.origin);if(c){let r=Number(n.maximum),s=dot(r,c.unit.one,c.unit.few,c.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${c.verb} ${a}${n.maximum.toString()} ${s}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",c=e(n.origin);if(c){let r=Number(n.minimum),s=dot(r,c.unit.one,c.unit.few,c.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${c.verb} ${a}${n.minimum.toString()} ${s}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${a.prefix}"`:a.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${a.suffix}"`:a.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${a.includes}"`:a.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${a.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${l[a.format]??n.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${n.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${Ue(n.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${n.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${n.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}}});function mot(){return{localeError:XLI()}}var XLI,Zot=g(()=>{o();yI();XLI=()=>{let t={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function e(n){return t[n]??null}let I=n=>{let a=typeof n;switch(a){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return a},l={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return n=>{switch(n.code){case"invalid_type":return`Tipus inv\xE0lid: s'esperava ${n.expected}, s'ha rebut ${I(n.input)}`;case"invalid_value":return n.values.length===1?`Valor inv\xE0lid: s'esperava ${mt(n.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${Ue(n.values," o ")}`;case"too_big":{let a=n.inclusive?"com a m\xE0xim":"menys de",c=e(n.origin);return c?`Massa gran: s'esperava que ${n.origin??"el valor"} contingu\xE9s ${a} ${n.maximum.toString()} ${c.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${a} ${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?"com a m\xEDnim":"m\xE9s de",c=e(n.origin);return c?`Massa petit: s'esperava que ${n.origin} contingu\xE9s ${a} ${n.minimum.toString()} ${c.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${a} ${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${a.prefix}"`:a.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${a.suffix}"`:a.format==="includes"?`Format inv\xE0lid: ha d'incloure "${a.includes}"`:a.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${a.pattern}`:`Format inv\xE0lid per a ${l[a.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${n.divisor}`;case"unrecognized_keys":return`Clau${n.keys.length>1?"s":""} no reconeguda${n.keys.length>1?"s":""}: ${Ue(n.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${n.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${n.origin}`;default:return"Entrada inv\xE0lida"}}}});function pot(){return{localeError:gLI()}}var gLI,hot=g(()=>{o();yI();gLI=()=>{let t={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function e(n){return t[n]??null}let I=n=>{let a=typeof n;switch(a){case"number":return Number.isNaN(n)?"NaN":"\u010D\xEDslo";case"string":return"\u0159et\u011Bzec";case"boolean":return"boolean";case"bigint":return"bigint";case"function":return"funkce";case"symbol":return"symbol";case"undefined":return"undefined";case"object":{if(Array.isArray(n))return"pole";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return a},l={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"};return n=>{switch(n.code){case"invalid_type":return`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${n.expected}, obdr\u017Eeno ${I(n.input)}`;case"invalid_value":return n.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${mt(n.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${Ue(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",c=e(n.origin);return c?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${a}${n.maximum.toString()} ${c.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",c=e(n.origin);return c?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${a}${n.minimum.toString()} ${c.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${a.prefix}"`:a.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${a.suffix}"`:a.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${a.includes}"`:a.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${a.pattern}`:`Neplatn\xFD form\xE1t ${l[a.format]??n.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${n.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${Ue(n.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${n.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${n.origin}`;default:return"Neplatn\xFD vstup"}}}});function Wot(){return{localeError:vLI()}}var vLI,Not=g(()=>{o();yI();vLI=()=>{let t={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function e(n){return t[n]??null}let I=n=>{let a=typeof n;switch(a){case"number":return Number.isNaN(n)?"NaN":"Zahl";case"object":{if(Array.isArray(n))return"Array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return a},l={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"};return n=>{switch(n.code){case"invalid_type":return`Ung\xFCltige Eingabe: erwartet ${n.expected}, erhalten ${I(n.input)}`;case"invalid_value":return n.values.length===1?`Ung\xFCltige Eingabe: erwartet ${mt(n.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${Ue(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",c=e(n.origin);return c?`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${a}${n.maximum.toString()} ${c.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${a}${n.maximum.toString()} ist`}case"too_small":{let a=n.inclusive?">=":">",c=e(n.origin);return c?`Zu klein: erwartet, dass ${n.origin} ${a}${n.minimum.toString()} ${c.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${a}${n.minimum.toString()} ist`}case"invalid_format":{let a=n;return a.format==="starts_with"?`Ung\xFCltiger String: muss mit "${a.prefix}" beginnen`:a.format==="ends_with"?`Ung\xFCltiger String: muss mit "${a.suffix}" enden`:a.format==="includes"?`Ung\xFCltiger String: muss "${a.includes}" enthalten`:a.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${a.pattern} entsprechen`:`Ung\xFCltig: ${l[a.format]??n.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${n.divisor} sein`;case"unrecognized_keys":return`${n.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${Ue(n.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${n.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${n.origin}`;default:return"Ung\xFCltige Eingabe"}}}});function cae(){return{localeError:wLI()}}var yLI,wLI,nHe=g(()=>{o();yI();yLI=t=>{let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return e},wLI=()=>{let t={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function e(l){return t[l]??null}let I={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return l=>{switch(l.code){case"invalid_type":return`Invalid input: expected ${l.expected}, received ${yLI(l.input)}`;case"invalid_value":return l.values.length===1?`Invalid input: expected ${mt(l.values[0])}`:`Invalid option: expected one of ${Ue(l.values,"|")}`;case"too_big":{let n=l.inclusive?"<=":"<",a=e(l.origin);return a?`Too big: expected ${l.origin??"value"} to have ${n}${l.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${l.origin??"value"} to be ${n}${l.maximum.toString()}`}case"too_small":{let n=l.inclusive?">=":">",a=e(l.origin);return a?`Too small: expected ${l.origin} to have ${n}${l.minimum.toString()} ${a.unit}`:`Too small: expected ${l.origin} to be ${n}${l.minimum.toString()}`}case"invalid_format":{let n=l;return n.format==="starts_with"?`Invalid string: must start with "${n.prefix}"`:n.format==="ends_with"?`Invalid string: must end with "${n.suffix}"`:n.format==="includes"?`Invalid string: must include "${n.includes}"`:n.format==="regex"?`Invalid string: must match pattern ${n.pattern}`:`Invalid ${I[n.format]??l.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${l.divisor}`;case"unrecognized_keys":return`Unrecognized key${l.keys.length>1?"s":""}: ${Ue(l.keys,", ")}`;case"invalid_key":return`Invalid key in ${l.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${l.origin}`;default:return"Invalid input"}}}});function Vot(){return{localeError:QLI()}}var HLI,QLI,Yot=g(()=>{o();yI();HLI=t=>{let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"NaN":"nombro";case"object":{if(Array.isArray(t))return"tabelo";if(t===null)return"senvalora";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return e},QLI=()=>{let t={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function e(l){return t[l]??null}let I={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"};return l=>{switch(l.code){case"invalid_type":return`Nevalida enigo: atendi\u011Dis ${l.expected}, ricevi\u011Dis ${HLI(l.input)}`;case"invalid_value":return l.values.length===1?`Nevalida enigo: atendi\u011Dis ${mt(l.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${Ue(l.values,"|")}`;case"too_big":{let n=l.inclusive?"<=":"<",a=e(l.origin);return a?`Tro granda: atendi\u011Dis ke ${l.origin??"valoro"} havu ${n}${l.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${l.origin??"valoro"} havu ${n}${l.maximum.toString()}`}case"too_small":{let n=l.inclusive?">=":">",a=e(l.origin);return a?`Tro malgranda: atendi\u011Dis ke ${l.origin} havu ${n}${l.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${l.origin} estu ${n}${l.minimum.toString()}`}case"invalid_format":{let n=l;return n.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${n.prefix}"`:n.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${n.suffix}"`:n.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${n.includes}"`:n.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${n.pattern}`:`Nevalida ${I[n.format]??l.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${l.divisor}`;case"unrecognized_keys":return`Nekonata${l.keys.length>1?"j":""} \u015Dlosilo${l.keys.length>1?"j":""}: ${Ue(l.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${l.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${l.origin}`;default:return"Nevalida enigo"}}}});function Rot(){return{localeError:fLI()}}var fLI,Aot=g(()=>{o();yI();fLI=()=>{let t={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function e(n){return t[n]??null}let I=n=>{let a=typeof n;switch(a){case"number":return Number.isNaN(n)?"NaN":"n\xFAmero";case"object":{if(Array.isArray(n))return"arreglo";if(n===null)return"nulo";if(Object.getPrototypeOf(n)!==Object.prototype)return n.constructor.name}}return a},l={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return n=>{switch(n.code){case"invalid_type":return`Entrada inv\xE1lida: se esperaba ${n.expected}, recibido ${I(n.input)}`;case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: se esperaba ${mt(n.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${Ue(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",c=e(n.origin);return c?`Demasiado grande: se esperaba que ${n.origin??"valor"} tuviera ${a}${n.maximum.toString()} ${c.unit??"elementos"}`:`Demasiado grande: se esperaba que ${n.origin??"valor"} fuera ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",c=e(n.origin);return c?`Demasiado peque\xF1o: se esperaba que ${n.origin} tuviera ${a}${n.minimum.toString()} ${c.unit}`:`Demasiado peque\xF1o: se esperaba que ${n.origin} fuera ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${a.prefix}"`:a.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${a.suffix}"`:a.format==="includes"?`Cadena inv\xE1lida: debe incluir "${a.includes}"`:a.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${a.pattern}`:`Inv\xE1lido ${l[a.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Llave${n.keys.length>1?"s":""} desconocida${n.keys.length>1?"s":""}: ${Ue(n.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${n.origin}`;default:return"Entrada inv\xE1lida"}}}});function Fot(){return{localeError:ELI()}}var ELI,Xot=g(()=>{o();yI();ELI=()=>{let t={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function e(n){return t[n]??null}let I=n=>{let a=typeof n;switch(a){case"number":return Number.isNaN(n)?"NaN":"\u0639\u062F\u062F";case"object":{if(Array.isArray(n))return"\u0622\u0631\u0627\u06CC\u0647";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return a},l={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"};return n=>{switch(n.code){case"invalid_type":return`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${n.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${I(n.input)} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`;case"invalid_value":return n.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${mt(n.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${Ue(n.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let a=n.inclusive?"<=":"<",c=e(n.origin);return c?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${a}${n.maximum.toString()} ${c.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${a}${n.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let a=n.inclusive?">=":">",c=e(n.origin);return c?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${a}${n.minimum.toString()} ${c.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${a}${n.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let a=n;return a.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${a.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:a.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${a.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:a.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${a.includes}" \u0628\u0627\u0634\u062F`:a.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${a.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${l[a.format]??n.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${n.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${n.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${Ue(n.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${n.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${n.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}}});function got(){return{localeError:JLI()}}var JLI,vot=g(()=>{o();yI();JLI=()=>{let t={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function e(n){return t[n]??null}let I=n=>{let a=typeof n;switch(a){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return a},l={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"};return n=>{switch(n.code){case"invalid_type":return`Virheellinen tyyppi: odotettiin ${n.expected}, oli ${I(n.input)}`;case"invalid_value":return n.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${mt(n.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${Ue(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",c=e(n.origin);return c?`Liian suuri: ${c.subject} t\xE4ytyy olla ${a}${n.maximum.toString()} ${c.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",c=e(n.origin);return c?`Liian pieni: ${c.subject} t\xE4ytyy olla ${a}${n.minimum.toString()} ${c.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${a.prefix}"`:a.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${a.suffix}"`:a.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${a.includes}"`:a.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${a.pattern}`:`Virheellinen ${l[a.format]??n.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${n.divisor} monikerta`;case"unrecognized_keys":return`${n.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${Ue(n.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}}});function yot(){return{localeError:CLI()}}var CLI,wot=g(()=>{o();yI();CLI=()=>{let t={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function e(n){return t[n]??null}let I=n=>{let a=typeof n;switch(a){case"number":return Number.isNaN(n)?"NaN":"nombre";case"object":{if(Array.isArray(n))return"tableau";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return a},l={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"};return n=>{switch(n.code){case"invalid_type":return`Entr\xE9e invalide : ${n.expected} attendu, ${I(n.input)} re\xE7u`;case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : ${mt(n.values[0])} attendu`:`Option invalide : une valeur parmi ${Ue(n.values,"|")} attendue`;case"too_big":{let a=n.inclusive?"<=":"<",c=e(n.origin);return c?`Trop grand : ${n.origin??"valeur"} doit ${c.verb} ${a}${n.maximum.toString()} ${c.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${n.origin??"valeur"} doit \xEAtre ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",c=e(n.origin);return c?`Trop petit : ${n.origin} doit ${c.verb} ${a}${n.minimum.toString()} ${c.unit}`:`Trop petit : ${n.origin} doit \xEAtre ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${a.prefix}"`:a.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${a.suffix}"`:a.format==="includes"?`Cha\xEEne invalide : doit inclure "${a.includes}"`:a.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${a.pattern}`:`${l[a.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${Ue(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}}});function Hot(){return{localeError:LLI()}}var LLI,Qot=g(()=>{o();yI();LLI=()=>{let t={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function e(n){return t[n]??null}let I=n=>{let a=typeof n;switch(a){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return a},l={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"};return n=>{switch(n.code){case"invalid_type":return`Entr\xE9e invalide : attendu ${n.expected}, re\xE7u ${I(n.input)}`;case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : attendu ${mt(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${Ue(n.values,"|")}`;case"too_big":{let a=n.inclusive?"\u2264":"<",c=e(n.origin);return c?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${a}${n.maximum.toString()} ${c.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?"\u2265":">",c=e(n.origin);return c?`Trop petit : attendu que ${n.origin} ait ${a}${n.minimum.toString()} ${c.unit}`:`Trop petit : attendu que ${n.origin} soit ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${a.prefix}"`:a.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${a.suffix}"`:a.format==="includes"?`Cha\xEEne invalide : doit inclure "${a.includes}"`:a.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${a.pattern}`:`${l[a.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${Ue(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}}});function fot(){return{localeError:kLI()}}var kLI,Eot=g(()=>{o();yI();kLI=()=>{let t={string:{unit:"\u05D0\u05D5\u05EA\u05D9\u05D5\u05EA",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"}};function e(n){return t[n]??null}let I=n=>{let a=typeof n;switch(a){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return a},l={regex:"\u05E7\u05DC\u05D8",email:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",url:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",emoji:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",date:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",time:"\u05D6\u05DE\u05DF ISO",duration:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",ipv4:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",ipv6:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",cidrv4:"\u05D8\u05D5\u05D5\u05D7 IPv4",cidrv6:"\u05D8\u05D5\u05D5\u05D7 IPv6",base64:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",base64url:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",json_string:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",e164:"\u05DE\u05E1\u05E4\u05E8 E.164",jwt:"JWT",template_literal:"\u05E7\u05DC\u05D8"};return n=>{switch(n.code){case"invalid_type":return`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${n.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${I(n.input)}`;case"invalid_value":return n.values.length===1?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${mt(n.values[0])}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05D0\u05D7\u05EA \u05DE\u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA ${Ue(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",c=e(n.origin);return c?`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${n.origin??"value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${a}${n.maximum.toString()} ${c.unit??"elements"}`:`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${n.origin??"value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",c=e(n.origin);return c?`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${n.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${a}${n.minimum.toString()} ${c.unit}`:`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${n.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1"${a.prefix}"`:a.format==="ends_with"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${a.suffix}"`:a.format==="includes"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${a.includes}"`:a.format==="regex"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${a.pattern}`:`${l[a.format]??n.format} \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${n.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${n.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${n.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${Ue(n.keys,", ")}`;case"invalid_key":return`\u05DE\u05E4\u05EA\u05D7 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${n.origin}`;case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${n.origin}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}}});function Jot(){return{localeError:xLI()}}var xLI,Cot=g(()=>{o();yI();xLI=()=>{let t={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function e(n){return t[n]??null}let I=n=>{let a=typeof n;switch(a){case"number":return Number.isNaN(n)?"NaN":"sz\xE1m";case"object":{if(Array.isArray(n))return"t\xF6mb";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return a},l={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"};return n=>{switch(n.code){case"invalid_type":return`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${n.expected}, a kapott \xE9rt\xE9k ${I(n.input)}`;case"invalid_value":return n.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${mt(n.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${Ue(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",c=e(n.origin);return c?`T\xFAl nagy: ${n.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${a}${n.maximum.toString()} ${c.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${n.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",c=e(n.origin);return c?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} m\xE9rete t\xFAl kicsi ${a}${n.minimum.toString()} ${c.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} t\xFAl kicsi ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`\xC9rv\xE9nytelen string: "${a.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:a.format==="ends_with"?`\xC9rv\xE9nytelen string: "${a.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:a.format==="includes"?`\xC9rv\xE9nytelen string: "${a.includes}" \xE9rt\xE9ket kell tartalmaznia`:a.format==="regex"?`\xC9rv\xE9nytelen string: ${a.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${l[a.format]??n.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${n.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${n.keys.length>1?"s":""}: ${Ue(n.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${n.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${n.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}}});function Lot(){return{localeError:jLI()}}var jLI,kot=g(()=>{o();yI();jLI=()=>{let t={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function e(n){return t[n]??null}let I=n=>{let a=typeof n;switch(a){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return a},l={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Input tidak valid: diharapkan ${n.expected}, diterima ${I(n.input)}`;case"invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${mt(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${Ue(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",c=e(n.origin);return c?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${a}${n.maximum.toString()} ${c.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",c=e(n.origin);return c?`Terlalu kecil: diharapkan ${n.origin} memiliki ${a}${n.minimum.toString()} ${c.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`String tidak valid: harus dimulai dengan "${a.prefix}"`:a.format==="ends_with"?`String tidak valid: harus berakhir dengan "${a.suffix}"`:a.format==="includes"?`String tidak valid: harus menyertakan "${a.includes}"`:a.format==="regex"?`String tidak valid: harus sesuai pola ${a.pattern}`:`${l[a.format]??n.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${n.keys.length>1?"s":""}: ${Ue(n.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${n.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${n.origin}`;default:return"Input tidak valid"}}}});function xot(){return{localeError:ULI()}}var ULI,jot=g(()=>{o();yI();ULI=()=>{let t={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function e(n){return t[n]??null}let I=n=>{let a=typeof n;switch(a){case"number":return Number.isNaN(n)?"NaN":"numero";case"object":{if(Array.isArray(n))return"vettore";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return a},l={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Input non valido: atteso ${n.expected}, ricevuto ${I(n.input)}`;case"invalid_value":return n.values.length===1?`Input non valido: atteso ${mt(n.values[0])}`:`Opzione non valida: atteso uno tra ${Ue(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",c=e(n.origin);return c?`Troppo grande: ${n.origin??"valore"} deve avere ${a}${n.maximum.toString()} ${c.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",c=e(n.origin);return c?`Troppo piccolo: ${n.origin} deve avere ${a}${n.minimum.toString()} ${c.unit}`:`Troppo piccolo: ${n.origin} deve essere ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`Stringa non valida: deve iniziare con "${a.prefix}"`:a.format==="ends_with"?`Stringa non valida: deve terminare con "${a.suffix}"`:a.format==="includes"?`Stringa non valida: deve includere "${a.includes}"`:a.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${a.pattern}`:`Invalid ${l[a.format]??n.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${n.divisor}`;case"unrecognized_keys":return`Chiav${n.keys.length>1?"i":"e"} non riconosciut${n.keys.length>1?"e":"a"}: ${Ue(n.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${n.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${n.origin}`;default:return"Input non valido"}}}});function Uot(){return{localeError:OLI()}}var OLI,Oot=g(()=>{o();yI();OLI=()=>{let t={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function e(n){return t[n]??null}let I=n=>{let a=typeof n;switch(a){case"number":return Number.isNaN(n)?"NaN":"\u6570\u5024";case"object":{if(Array.isArray(n))return"\u914D\u5217";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return a},l={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"};return n=>{switch(n.code){case"invalid_type":return`\u7121\u52B9\u306A\u5165\u529B: ${n.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${I(n.input)}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`;case"invalid_value":return n.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${mt(n.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${Ue(n.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let a=n.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",c=e(n.origin);return c?`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${c.unit??"\u8981\u7D20"}${a}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${a}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let a=n.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",c=e(n.origin);return c?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${c.unit}${a}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${a}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let a=n;return a.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${a.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:a.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${a.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:a.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${a.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:a.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${a.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${l[a.format]??n.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${n.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${n.keys.length>1?"\u7FA4":""}: ${Ue(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}}});function zot(){return{localeError:zLI()}}var zLI,Bot=g(()=>{o();yI();zLI=()=>{let t={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function e(n){return t[n]??null}let I=n=>{let a=typeof n;switch(a){case"number":return Number.isNaN(n)?"\u1798\u17B7\u1793\u1798\u17C2\u1793\u1787\u17B6\u179B\u17C1\u1781 (NaN)":"\u179B\u17C1\u1781";case"object":{if(Array.isArray(n))return"\u17A2\u17B6\u179A\u17C1 (Array)";if(n===null)return"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return a},l={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"};return n=>{switch(n.code){case"invalid_type":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${I(n.input)}`;case"invalid_value":return n.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${mt(n.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${Ue(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",c=e(n.origin);return c?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${a} ${n.maximum.toString()} ${c.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${a} ${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",c=e(n.origin);return c?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${a} ${n.minimum.toString()} ${c.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${a} ${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${a.prefix}"`:a.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${a.suffix}"`:a.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${a.includes}"`:a.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${a.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${l[a.format]??n.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${n.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${Ue(n.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${n.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${n.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}}});function Mot(){return{localeError:BLI()}}var BLI,Sot=g(()=>{o();yI();BLI=()=>{let t={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function e(n){return t[n]??null}let I=n=>{let a=typeof n;switch(a){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return a},l={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"};return n=>{switch(n.code){case"invalid_type":return`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${n.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${I(n.input)}\uC785\uB2C8\uB2E4`;case"invalid_value":return n.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${mt(n.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${Ue(n.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let a=n.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",c=a==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",r=e(n.origin),s=r?.unit??"\uC694\uC18C";return r?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()}${s} ${a}${c}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()} ${a}${c}`}case"too_small":{let a=n.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",c=a==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",r=e(n.origin),s=r?.unit??"\uC694\uC18C";return r?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()}${s} ${a}${c}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()} ${a}${c}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${a.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:a.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${a.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:a.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${a.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:a.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${a.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${l[a.format]??n.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${n.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${Ue(n.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${n.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${n.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}}});function Tot(){return{localeError:MLI()}}var MLI,_ot=g(()=>{o();yI();MLI=()=>{let t={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function e(n){return t[n]??null}let I=n=>{let a=typeof n;switch(a){case"number":return Number.isNaN(n)?"NaN":"\u0431\u0440\u043E\u0458";case"object":{if(Array.isArray(n))return"\u043D\u0438\u0437\u0430";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return a},l={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"};return n=>{switch(n.code){case"invalid_type":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${I(n.input)}`;case"invalid_value":return n.values.length===1?`Invalid input: expected ${mt(n.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${Ue(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",c=e(n.origin);return c?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${a}${n.maximum.toString()} ${c.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",c=e(n.origin);return c?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0438\u043C\u0430 ${a}${n.minimum.toString()} ${c.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${a.prefix}"`:a.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${a.suffix}"`:a.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${a.includes}"`:a.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${a.pattern}`:`Invalid ${l[a.format]??n.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${Ue(n.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${n.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${n.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}}});function Kot(){return{localeError:SLI()}}var SLI,Dot=g(()=>{o();yI();SLI=()=>{let t={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function e(n){return t[n]??null}let I=n=>{let a=typeof n;switch(a){case"number":return Number.isNaN(n)?"NaN":"nombor";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return a},l={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Input tidak sah: dijangka ${n.expected}, diterima ${I(n.input)}`;case"invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${mt(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${Ue(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",c=e(n.origin);return c?`Terlalu besar: dijangka ${n.origin??"nilai"} ${c.verb} ${a}${n.maximum.toString()} ${c.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",c=e(n.origin);return c?`Terlalu kecil: dijangka ${n.origin} ${c.verb} ${a}${n.minimum.toString()} ${c.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`String tidak sah: mesti bermula dengan "${a.prefix}"`:a.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${a.suffix}"`:a.format==="includes"?`String tidak sah: mesti mengandungi "${a.includes}"`:a.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${a.pattern}`:`${l[a.format]??n.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${Ue(n.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${n.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${n.origin}`;default:return"Input tidak sah"}}}});function qot(){return{localeError:TLI()}}var TLI,Pot=g(()=>{o();yI();TLI=()=>{let t={string:{unit:"tekens"},file:{unit:"bytes"},array:{unit:"elementen"},set:{unit:"elementen"}};function e(n){return t[n]??null}let I=n=>{let a=typeof n;switch(a){case"number":return Number.isNaN(n)?"NaN":"getal";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return a},l={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"};return n=>{switch(n.code){case"invalid_type":return`Ongeldige invoer: verwacht ${n.expected}, ontving ${I(n.input)}`;case"invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${mt(n.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${Ue(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",c=e(n.origin);return c?`Te lang: verwacht dat ${n.origin??"waarde"} ${a}${n.maximum.toString()} ${c.unit??"elementen"} bevat`:`Te lang: verwacht dat ${n.origin??"waarde"} ${a}${n.maximum.toString()} is`}case"too_small":{let a=n.inclusive?">=":">",c=e(n.origin);return c?`Te kort: verwacht dat ${n.origin} ${a}${n.minimum.toString()} ${c.unit} bevat`:`Te kort: verwacht dat ${n.origin} ${a}${n.minimum.toString()} is`}case"invalid_format":{let a=n;return a.format==="starts_with"?`Ongeldige tekst: moet met "${a.prefix}" beginnen`:a.format==="ends_with"?`Ongeldige tekst: moet op "${a.suffix}" eindigen`:a.format==="includes"?`Ongeldige tekst: moet "${a.includes}" bevatten`:a.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${a.pattern}`:`Ongeldig: ${l[a.format]??n.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${n.keys.length>1?"s":""}: ${Ue(n.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${n.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${n.origin}`;default:return"Ongeldige invoer"}}}});function $ot(){return{localeError:_LI()}}var _LI,eit=g(()=>{o();yI();_LI=()=>{let t={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function e(n){return t[n]??null}let I=n=>{let a=typeof n;switch(a){case"number":return Number.isNaN(n)?"NaN":"tall";case"object":{if(Array.isArray(n))return"liste";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return a},l={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Ugyldig input: forventet ${n.expected}, fikk ${I(n.input)}`;case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${mt(n.values[0])}`:`Ugyldig valg: forventet en av ${Ue(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",c=e(n.origin);return c?`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${a}${n.maximum.toString()} ${c.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",c=e(n.origin);return c?`For lite(n): forventet ${n.origin} til \xE5 ha ${a}${n.minimum.toString()} ${c.unit}`:`For lite(n): forventet ${n.origin} til \xE5 ha ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${a.prefix}"`:a.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${a.suffix}"`:a.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${a.includes}"`:a.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${a.pattern}`:`Ugyldig ${l[a.format]??n.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${Ue(n.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${n.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${n.origin}`;default:return"Ugyldig input"}}}});function tit(){return{localeError:KLI()}}var KLI,Iit=g(()=>{o();yI();KLI=()=>{let t={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function e(n){return t[n]??null}let I=n=>{let a=typeof n;switch(a){case"number":return Number.isNaN(n)?"NaN":"numara";case"object":{if(Array.isArray(n))return"saf";if(n===null)return"gayb";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return a},l={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"};return n=>{switch(n.code){case"invalid_type":return`F\xE2sit giren: umulan ${n.expected}, al\u0131nan ${I(n.input)}`;case"invalid_value":return n.values.length===1?`F\xE2sit giren: umulan ${mt(n.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${Ue(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",c=e(n.origin);return c?`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${a}${n.maximum.toString()} ${c.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${a}${n.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let a=n.inclusive?">=":">",c=e(n.origin);return c?`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${a}${n.minimum.toString()} ${c.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${a}${n.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let a=n;return a.format==="starts_with"?`F\xE2sit metin: "${a.prefix}" ile ba\u015Flamal\u0131.`:a.format==="ends_with"?`F\xE2sit metin: "${a.suffix}" ile bitmeli.`:a.format==="includes"?`F\xE2sit metin: "${a.includes}" ihtiv\xE2 etmeli.`:a.format==="regex"?`F\xE2sit metin: ${a.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${l[a.format]??n.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${n.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${n.keys.length>1?"s":""}: ${Ue(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${n.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}}});function lit(){return{localeError:DLI()}}var DLI,nit=g(()=>{o();yI();DLI=()=>{let t={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function e(n){return t[n]??null}let I=n=>{let a=typeof n;switch(a){case"number":return Number.isNaN(n)?"NaN":"\u0639\u062F\u062F";case"object":{if(Array.isArray(n))return"\u0627\u0631\u06D0";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return a},l={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"};return n=>{switch(n.code){case"invalid_type":return`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${n.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${I(n.input)} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`;case"invalid_value":return n.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${mt(n.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${Ue(n.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let a=n.inclusive?"<=":"<",c=e(n.origin);return c?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${a}${n.maximum.toString()} ${c.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${a}${n.maximum.toString()} \u0648\u064A`}case"too_small":{let a=n.inclusive?">=":">",c=e(n.origin);return c?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${a}${n.minimum.toString()} ${c.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${a}${n.minimum.toString()} \u0648\u064A`}case"invalid_format":{let a=n;return a.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${a.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:a.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${a.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:a.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${a.includes}" \u0648\u0644\u0631\u064A`:a.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${a.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${l[a.format]??n.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${n.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${n.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${Ue(n.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${n.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${n.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}}});function ait(){return{localeError:qLI()}}var qLI,cit=g(()=>{o();yI();qLI=()=>{let t={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function e(n){return t[n]??null}let I=n=>{let a=typeof n;switch(a){case"number":return Number.isNaN(n)?"NaN":"liczba";case"object":{if(Array.isArray(n))return"tablica";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return a},l={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"};return n=>{switch(n.code){case"invalid_type":return`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${n.expected}, otrzymano ${I(n.input)}`;case"invalid_value":return n.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${mt(n.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${Ue(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",c=e(n.origin);return c?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${a}${n.maximum.toString()} ${c.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",c=e(n.origin);return c?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${a}${n.minimum.toString()} ${c.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${a.prefix}"`:a.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${a.suffix}"`:a.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${a.includes}"`:a.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${a.pattern}`:`Nieprawid\u0142ow(y/a/e) ${l[a.format]??n.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${n.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${n.keys.length>1?"s":""}: ${Ue(n.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${n.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${n.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}}});function rit(){return{localeError:PLI()}}var PLI,sit=g(()=>{o();yI();PLI=()=>{let t={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function e(n){return t[n]??null}let I=n=>{let a=typeof n;switch(a){case"number":return Number.isNaN(n)?"NaN":"n\xFAmero";case"object":{if(Array.isArray(n))return"array";if(n===null)return"nulo";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return a},l={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return n=>{switch(n.code){case"invalid_type":return`Tipo inv\xE1lido: esperado ${n.expected}, recebido ${I(n.input)}`;case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: esperado ${mt(n.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${Ue(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",c=e(n.origin);return c?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${a}${n.maximum.toString()} ${c.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",c=e(n.origin);return c?`Muito pequeno: esperado que ${n.origin} tivesse ${a}${n.minimum.toString()} ${c.unit}`:`Muito pequeno: esperado que ${n.origin} fosse ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${a.prefix}"`:a.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${a.suffix}"`:a.format==="includes"?`Texto inv\xE1lido: deve incluir "${a.includes}"`:a.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${a.pattern}`:`${l[a.format]??n.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Chave${n.keys.length>1?"s":""} desconhecida${n.keys.length>1?"s":""}: ${Ue(n.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${n.origin}`;default:return"Campo inv\xE1lido"}}}});function oit(t,e,I,l){let n=Math.abs(t),a=n%10,c=n%100;return c>=11&&c<=19?l:a===1?e:a>=2&&a<=4?I:l}function iit(){return{localeError:$LI()}}var $LI,Git=g(()=>{o();yI();$LI=()=>{let t={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function e(n){return t[n]??null}let I=n=>{let a=typeof n;switch(a){case"number":return Number.isNaN(n)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case"object":{if(Array.isArray(n))return"\u043C\u0430\u0441\u0441\u0438\u0432";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return a},l={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"};return n=>{switch(n.code){case"invalid_type":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${I(n.input)}`;case"invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${mt(n.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${Ue(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",c=e(n.origin);if(c){let r=Number(n.maximum),s=oit(r,c.unit.one,c.unit.few,c.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${a}${n.maximum.toString()} ${s}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",c=e(n.origin);if(c){let r=Number(n.minimum),s=oit(r,c.unit.one,c.unit.few,c.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${a}${n.minimum.toString()} ${s}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin} \u0431\u0443\u0434\u0435\u0442 ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${a.prefix}"`:a.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${a.suffix}"`:a.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${a.includes}"`:a.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${a.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${l[a.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${n.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0438":""}: ${Ue(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${n.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}}});function dit(){return{localeError:ekI()}}var ekI,uit=g(()=>{o();yI();ekI=()=>{let t={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function e(n){return t[n]??null}let I=n=>{let a=typeof n;switch(a){case"number":return Number.isNaN(n)?"NaN":"\u0161tevilo";case"object":{if(Array.isArray(n))return"tabela";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return a},l={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"};return n=>{switch(n.code){case"invalid_type":return`Neveljaven vnos: pri\u010Dakovano ${n.expected}, prejeto ${I(n.input)}`;case"invalid_value":return n.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${mt(n.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${Ue(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",c=e(n.origin);return c?`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} imelo ${a}${n.maximum.toString()} ${c.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",c=e(n.origin);return c?`Premajhno: pri\u010Dakovano, da bo ${n.origin} imelo ${a}${n.minimum.toString()} ${c.unit}`:`Premajhno: pri\u010Dakovano, da bo ${n.origin} ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${a.prefix}"`:a.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${a.suffix}"`:a.format==="includes"?`Neveljaven niz: mora vsebovati "${a.includes}"`:a.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${a.pattern}`:`Neveljaven ${l[a.format]??n.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${n.divisor}`;case"unrecognized_keys":return`Neprepoznan${n.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${Ue(n.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${n.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${n.origin}`;default:return"Neveljaven vnos"}}}});function bit(){return{localeError:tkI()}}var tkI,mit=g(()=>{o();yI();tkI=()=>{let t={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function e(n){return t[n]??null}let I=n=>{let a=typeof n;switch(a){case"number":return Number.isNaN(n)?"NaN":"antal";case"object":{if(Array.isArray(n))return"lista";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return a},l={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"};return n=>{switch(n.code){case"invalid_type":return`Ogiltig inmatning: f\xF6rv\xE4ntat ${n.expected}, fick ${I(n.input)}`;case"invalid_value":return n.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${mt(n.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${Ue(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",c=e(n.origin);return c?`F\xF6r stor(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${a}${n.maximum.toString()} ${c.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${n.origin??"v\xE4rdet"} att ha ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",c=e(n.origin);return c?`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${a}${n.minimum.toString()} ${c.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${a.prefix}"`:a.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${a.suffix}"`:a.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${a.includes}"`:a.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${a.pattern}"`:`Ogiltig(t) ${l[a.format]??n.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${Ue(n.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${n.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${n.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}}});function Zit(){return{localeError:IkI()}}var IkI,pit=g(()=>{o();yI();IkI=()=>{let t={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function e(n){return t[n]??null}let I=n=>{let a=typeof n;switch(a){case"number":return Number.isNaN(n)?"\u0B8E\u0BA3\u0BCD \u0B85\u0BB2\u0BCD\u0BB2\u0BBE\u0BA4\u0BA4\u0BC1":"\u0B8E\u0BA3\u0BCD";case"object":{if(Array.isArray(n))return"\u0B85\u0BA3\u0BBF";if(n===null)return"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return a},l={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${I(n.input)}`;case"invalid_value":return n.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${mt(n.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${Ue(n.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let a=n.inclusive?"<=":"<",c=e(n.origin);return c?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${a}${n.maximum.toString()} ${c.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${a}${n.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let a=n.inclusive?">=":">",c=e(n.origin);return c?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin} ${a}${n.minimum.toString()} ${c.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin} ${a}${n.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let a=n;return a.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${a.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:a.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${a.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:a.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${a.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:a.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${a.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${l[a.format]??n.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${n.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${n.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${Ue(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${n.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}}});function hit(){return{localeError:lkI()}}var lkI,Wit=g(()=>{o();yI();lkI=()=>{let t={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function e(n){return t[n]??null}let I=n=>{let a=typeof n;switch(a){case"number":return Number.isNaN(n)?"\u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02 (NaN)":"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02";case"object":{if(Array.isArray(n))return"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)";if(n===null)return"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return a},l={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"};return n=>{switch(n.code){case"invalid_type":return`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${n.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${I(n.input)}`;case"invalid_value":return n.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${mt(n.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${Ue(n.values,"|")}`;case"too_big":{let a=n.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",c=e(n.origin);return c?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${a} ${n.maximum.toString()} ${c.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${a} ${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",c=e(n.origin);return c?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${a} ${n.minimum.toString()} ${c.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${a} ${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${a.prefix}"`:a.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${a.suffix}"`:a.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${a.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:a.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${a.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${l[a.format]??n.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${n.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${Ue(n.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}}});function Nit(){return{localeError:akI()}}var nkI,akI,Vit=g(()=>{o();yI();nkI=t=>{let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return e},akI=()=>{let t={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function e(l){return t[l]??null}let I={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"};return l=>{switch(l.code){case"invalid_type":return`Ge\xE7ersiz de\u011Fer: beklenen ${l.expected}, al\u0131nan ${nkI(l.input)}`;case"invalid_value":return l.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${mt(l.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${Ue(l.values,"|")}`;case"too_big":{let n=l.inclusive?"<=":"<",a=e(l.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${l.origin??"de\u011Fer"} ${n}${l.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${l.origin??"de\u011Fer"} ${n}${l.maximum.toString()}`}case"too_small":{let n=l.inclusive?">=":">",a=e(l.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${l.origin} ${n}${l.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${l.origin} ${n}${l.minimum.toString()}`}case"invalid_format":{let n=l;return n.format==="starts_with"?`Ge\xE7ersiz metin: "${n.prefix}" ile ba\u015Flamal\u0131`:n.format==="ends_with"?`Ge\xE7ersiz metin: "${n.suffix}" ile bitmeli`:n.format==="includes"?`Ge\xE7ersiz metin: "${n.includes}" i\xE7ermeli`:n.format==="regex"?`Ge\xE7ersiz metin: ${n.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${I[n.format]??l.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${l.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${l.keys.length>1?"lar":""}: ${Ue(l.keys,", ")}`;case"invalid_key":return`${l.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${l.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}}});function Yit(){return{localeError:ckI()}}var ckI,Rit=g(()=>{o();yI();ckI=()=>{let t={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function e(n){return t[n]??null}let I=n=>{let a=typeof n;switch(a){case"number":return Number.isNaN(n)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case"object":{if(Array.isArray(n))return"\u043C\u0430\u0441\u0438\u0432";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return a},l={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"};return n=>{switch(n.code){case"invalid_type":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${n.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${I(n.input)}`;case"invalid_value":return n.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${mt(n.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${Ue(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",c=e(n.origin);return c?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${c.verb} ${a}${n.maximum.toString()} ${c.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",c=e(n.origin);return c?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} ${c.verb} ${a}${n.minimum.toString()} ${c.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} \u0431\u0443\u0434\u0435 ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${a.prefix}"`:a.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${a.suffix}"`:a.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${a.includes}"`:a.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${a.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${l[a.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0456":""}: ${Ue(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${n.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}}});function Ait(){return{localeError:rkI()}}var rkI,Fit=g(()=>{o();yI();rkI=()=>{let t={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function e(n){return t[n]??null}let I=n=>{let a=typeof n;switch(a){case"number":return Number.isNaN(n)?"NaN":"\u0646\u0645\u0628\u0631";case"object":{if(Array.isArray(n))return"\u0622\u0631\u06D2";if(n===null)return"\u0646\u0644";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return a},l={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"};return n=>{switch(n.code){case"invalid_type":return`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${n.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${I(n.input)} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`;case"invalid_value":return n.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${mt(n.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${Ue(n.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let a=n.inclusive?"<=":"<",c=e(n.origin);return c?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${a}${n.maximum.toString()} ${c.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${a}${n.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let a=n.inclusive?">=":">",c=e(n.origin);return c?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u06D2 ${a}${n.minimum.toString()} ${c.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u0627 ${a}${n.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let a=n;return a.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${a.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:a.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${a.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:a.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${a.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:a.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${a.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${l[a.format]??n.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${n.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${n.keys.length>1?"\u0632":""}: ${Ue(n.keys,"\u060C ")}`;case"invalid_key":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}}});function Xit(){return{localeError:skI()}}var skI,git=g(()=>{o();yI();skI=()=>{let t={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function e(n){return t[n]??null}let I=n=>{let a=typeof n;switch(a){case"number":return Number.isNaN(n)?"NaN":"s\u1ED1";case"object":{if(Array.isArray(n))return"m\u1EA3ng";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return a},l={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"};return n=>{switch(n.code){case"invalid_type":return`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${n.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${I(n.input)}`;case"invalid_value":return n.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${mt(n.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${Ue(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",c=e(n.origin);return c?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${c.verb} ${a}${n.maximum.toString()} ${c.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",c=e(n.origin);return c?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${c.verb} ${a}${n.minimum.toString()} ${c.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${a.prefix}"`:a.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${a.suffix}"`:a.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${a.includes}"`:a.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${a.pattern}`:`${l[a.format]??n.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${n.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${Ue(n.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}}});function vit(){return{localeError:okI()}}var okI,yit=g(()=>{o();yI();okI=()=>{let t={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function e(n){return t[n]??null}let I=n=>{let a=typeof n;switch(a){case"number":return Number.isNaN(n)?"\u975E\u6570\u5B57(NaN)":"\u6570\u5B57";case"object":{if(Array.isArray(n))return"\u6570\u7EC4";if(n===null)return"\u7A7A\u503C(null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return a},l={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"};return n=>{switch(n.code){case"invalid_type":return`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${n.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${I(n.input)}`;case"invalid_value":return n.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${mt(n.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${Ue(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",c=e(n.origin);return c?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${a}${n.maximum.toString()} ${c.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",c=e(n.origin);return c?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${a}${n.minimum.toString()} ${c.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${a.prefix}" \u5F00\u5934`:a.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${a.suffix}" \u7ED3\u5C3E`:a.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${a.includes}"`:a.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${a.pattern}`:`\u65E0\u6548${l[a.format]??n.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${n.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${Ue(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${n.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}}});function wit(){return{localeError:ikI()}}var ikI,Hit=g(()=>{o();yI();ikI=()=>{let t={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function e(n){return t[n]??null}let I=n=>{let a=typeof n;switch(a){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return a},l={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"};return n=>{switch(n.code){case"invalid_type":return`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${n.expected}\uFF0C\u4F46\u6536\u5230 ${I(n.input)}`;case"invalid_value":return n.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${mt(n.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${Ue(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",c=e(n.origin);return c?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${a}${n.maximum.toString()} ${c.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",c=e(n.origin);return c?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${a}${n.minimum.toString()} ${c.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${a.prefix}" \u958B\u982D`:a.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${a.suffix}" \u7D50\u5C3E`:a.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${a.includes}"`:a.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${a.pattern}`:`\u7121\u6548\u7684 ${l[a.format]??n.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${n.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${n.keys.length>1?"\u5011":""}\uFF1A${Ue(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}}});var jT={};tr(jT,{ar:()=>sot,az:()=>iot,be:()=>uot,ca:()=>mot,cs:()=>pot,de:()=>Wot,en:()=>cae,eo:()=>Vot,es:()=>Rot,fa:()=>Fot,fi:()=>got,fr:()=>yot,frCA:()=>Hot,he:()=>fot,hu:()=>Jot,id:()=>Lot,it:()=>xot,ja:()=>Uot,kh:()=>zot,ko:()=>Mot,mk:()=>Tot,ms:()=>Kot,nl:()=>qot,no:()=>$ot,ota:()=>tit,pl:()=>ait,ps:()=>lit,pt:()=>rit,ru:()=>iit,sl:()=>dit,sv:()=>bit,ta:()=>Zit,th:()=>hit,tr:()=>Nit,ua:()=>Yit,ur:()=>Ait,vi:()=>Xit,zhCN:()=>vit,zhTW:()=>wit});var aHe=g(()=>{o();oot();Got();bot();Zot();hot();Not();nHe();Yot();Aot();Xot();vot();wot();Qot();Eot();Cot();kot();jot();Oot();Bot();Sot();_ot();Dot();Pot();eit();Iit();nit();cit();sit();Git();uit();mit();pit();Wit();Vit();Rit();Fit();git();yit();Hit()});function rae(){return new kH}var cHe,rHe,kH,Vc,sHe=g(()=>{o();cHe=Symbol("ZodOutput"),rHe=Symbol("ZodInput"),kH=class{constructor(){this._map=new Map,this._idmap=new Map}add(e,...I){let l=I[0];if(this._map.set(e,l),l&&typeof l=="object"&&"id"in l){if(this._idmap.has(l.id))throw new Error(`ID ${l.id} already exists in the registry`);this._idmap.set(l.id,e)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(e){let I=this._map.get(e);return I&&typeof I=="object"&&"id"in I&&this._idmap.delete(I.id),this._map.delete(e),this}get(e){let I=e._zod.parent;if(I){let l={...this.get(I)??{}};return delete l.id,{...l,...this._map.get(e)}}return this._map.get(e)}has(e){return this._map.has(e)}};Vc=rae()});function oHe(t,e){return new t({type:"string",...at(e)})}function iHe(t,e){return new t({type:"string",coerce:!0,...at(e)})}function sae(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...at(e)})}function UT(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...at(e)})}function oae(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...at(e)})}function iae(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...at(e)})}function Gae(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...at(e)})}function dae(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...at(e)})}function uae(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...at(e)})}function bae(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...at(e)})}function mae(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...at(e)})}function Zae(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...at(e)})}function pae(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...at(e)})}function hae(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...at(e)})}function Wae(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...at(e)})}function Nae(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...at(e)})}function Vae(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...at(e)})}function Yae(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...at(e)})}function Rae(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...at(e)})}function Aae(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...at(e)})}function Fae(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...at(e)})}function Xae(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...at(e)})}function gae(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...at(e)})}function vae(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...at(e)})}function dHe(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...at(e)})}function uHe(t,e){return new t({type:"string",format:"date",check:"string_format",...at(e)})}function bHe(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...at(e)})}function mHe(t,e){return new t({type:"string",format:"duration",check:"string_format",...at(e)})}function ZHe(t,e){return new t({type:"number",checks:[],...at(e)})}function pHe(t,e){return new t({type:"number",coerce:!0,checks:[],...at(e)})}function hHe(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...at(e)})}function WHe(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float32",...at(e)})}function NHe(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float64",...at(e)})}function VHe(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"int32",...at(e)})}function YHe(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"uint32",...at(e)})}function RHe(t,e){return new t({type:"boolean",...at(e)})}function AHe(t,e){return new t({type:"boolean",coerce:!0,...at(e)})}function FHe(t,e){return new t({type:"bigint",...at(e)})}function XHe(t,e){return new t({type:"bigint",coerce:!0,...at(e)})}function gHe(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...at(e)})}function vHe(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...at(e)})}function yHe(t,e){return new t({type:"symbol",...at(e)})}function wHe(t,e){return new t({type:"undefined",...at(e)})}function HHe(t,e){return new t({type:"null",...at(e)})}function QHe(t){return new t({type:"any"})}function xH(t){return new t({type:"unknown"})}function OT(t,e){return new t({type:"never",...at(e)})}function fHe(t,e){return new t({type:"void",...at(e)})}function EHe(t,e){return new t({type:"date",...at(e)})}function JHe(t,e){return new t({type:"date",coerce:!0,...at(e)})}function CHe(t,e){return new t({type:"nan",...at(e)})}function FX(t,e){return new Pne({check:"less_than",...at(e),value:t,inclusive:!1})}function Ap(t,e){return new Pne({check:"less_than",...at(e),value:t,inclusive:!0})}function XX(t,e){return new $ne({check:"greater_than",...at(e),value:t,inclusive:!1})}function xb(t,e){return new $ne({check:"greater_than",...at(e),value:t,inclusive:!0})}function LHe(t){return XX(0,t)}function kHe(t){return FX(0,t)}function xHe(t){return Ap(0,t)}function jHe(t){return xb(0,t)}function vJ(t,e){return new Cye({check:"multiple_of",...at(e),value:t})}function fx(t,e){return new xye({check:"max_size",...at(e),maximum:t})}function yJ(t,e){return new jye({check:"min_size",...at(e),minimum:t})}function zT(t,e){return new Uye({check:"size_equals",...at(e),size:t})}function Ex(t,e){return new Oye({check:"max_length",...at(e),maximum:t})}function jH(t,e){return new zye({check:"min_length",...at(e),minimum:t})}function Jx(t,e){return new Bye({check:"length_equals",...at(e),length:t})}function BT(t,e){return new Mye({check:"string_format",format:"regex",...at(e),pattern:t})}function MT(t){return new Sye({check:"string_format",format:"lowercase",...at(t)})}function ST(t){return new Tye({check:"string_format",format:"uppercase",...at(t)})}function TT(t,e){return new _ye({check:"string_format",format:"includes",...at(e),includes:t})}function _T(t,e){return new Kye({check:"string_format",format:"starts_with",...at(e),prefix:t})}function KT(t,e){return new Dye({check:"string_format",format:"ends_with",...at(e),suffix:t})}function UHe(t,e,I){return new qye({check:"property",property:t,schema:e,...at(I)})}function DT(t,e){return new Pye({check:"mime_type",mime:t,...at(e)})}function gX(t){return new $ye({check:"overwrite",tx:t})}function qT(t){return gX(e=>e.normalize(t))}function PT(){return gX(t=>t.trim())}function $T(){return gX(t=>t.toLowerCase())}function e_(){return gX(t=>t.toUpperCase())}function t_(t,e,I){return new t({type:"array",element:e,...at(I)})}function GkI(t,e,I){return new t({type:"union",options:e,...at(I)})}function dkI(t,e,I,l){return new t({type:"union",options:I,discriminator:e,...at(l)})}function ukI(t,e,I){return new t({type:"intersection",left:e,right:I})}function OHe(t,e,I,l){let n=I instanceof xI,a=n?l:I,c=n?I:null;return new t({type:"tuple",items:e,rest:c,...at(a)})}function bkI(t,e,I,l){return new t({type:"record",keyType:e,valueType:I,...at(l)})}function mkI(t,e,I,l){return new t({type:"map",keyType:e,valueType:I,...at(l)})}function ZkI(t,e,I){return new t({type:"set",valueType:e,...at(I)})}function pkI(t,e,I){let l=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new t({type:"enum",entries:l,...at(I)})}function hkI(t,e,I){return new t({type:"enum",entries:e,...at(I)})}function WkI(t,e,I){return new t({type:"literal",values:Array.isArray(e)?e:[e],...at(I)})}function zHe(t,e){return new t({type:"file",...at(e)})}function NkI(t,e){return new t({type:"transform",transform:e})}function VkI(t,e){return new t({type:"optional",innerType:e})}function YkI(t,e){return new t({type:"nullable",innerType:e})}function RkI(t,e,I){return new t({type:"default",innerType:e,get defaultValue(){return typeof I=="function"?I():I}})}function AkI(t,e,I){return new t({type:"nonoptional",innerType:e,...at(I)})}function FkI(t,e){return new t({type:"success",innerType:e})}function XkI(t,e,I){return new t({type:"catch",innerType:e,catchValue:typeof I=="function"?I:()=>I})}function gkI(t,e,I){return new t({type:"pipe",in:e,out:I})}function vkI(t,e){return new t({type:"readonly",innerType:e})}function ykI(t,e,I){return new t({type:"template_literal",parts:e,...at(I)})}function wkI(t,e){return new t({type:"lazy",getter:e})}function HkI(t,e){return new t({type:"promise",innerType:e})}function BHe(t,e,I){let l=at(I);return l.abort??(l.abort=!0),new t({type:"custom",check:"custom",fn:e,...l})}function MHe(t,e,I){return new t({type:"custom",check:"custom",fn:e,...at(I)})}function SHe(t,e){let I=at(e),l=I.truthy??["true","1","yes","on","y","enabled"],n=I.falsy??["false","0","no","off","n","disabled"];I.case!=="sensitive"&&(l=l.map(Z=>typeof Z=="string"?Z.toLowerCase():Z),n=n.map(Z=>typeof Z=="string"?Z.toLowerCase():Z));let a=new Set(l),c=new Set(n),r=t.Pipe??kT,s=t.Boolean??ET,i=t.String??XJ,G=t.Transform??LT,d=new G({type:"transform",transform:(Z,p)=>{let W=Z;return I.case!=="sensitive"&&(W=W.toLowerCase()),a.has(W)?!0:c.has(W)?!1:(p.issues.push({code:"invalid_value",expected:"stringbool",values:[...a,...c],input:p.value,inst:d}),{})},error:I.error}),u=new r({type:"pipe",in:new i({type:"string",error:I.error}),out:d,error:I.error});return new r({type:"pipe",in:u,out:new s({type:"boolean",error:I.error}),error:I.error})}function THe(t,e,I,l={}){let n=at(l),a={...at(l),check:"string_format",type:"string",format:e,fn:typeof I=="function"?I:r=>I.test(r),...n};return I instanceof RegExp&&(a.pattern=I),new t(a)}var GHe,_He=g(()=>{o();eae();xT();yI();GHe={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6}});function KHe(t){return new yae({type:"function",input:Array.isArray(t?.input)?OHe(gJ,t?.input):t?.input??t_(CT,xH(LH)),output:t?.output??xH(LH)})}var yae,Qit=g(()=>{o();_He();Kne();xT();xT();yae=class{constructor(e){this._def=e,this.def=e}implement(e){if(typeof e!="function")throw new Error("implement() must be called with a function");let I=(...l)=>{let n=this._def.input?zA(this._def.input,l,void 0,{callee:I}):l;if(!Array.isArray(n))throw new Error("Invalid arguments schema: not an array or tuple schema.");let a=e(...n);return this._def.output?zA(this._def.output,a,void 0,{callee:I}):a};return I}implementAsync(e){if(typeof e!="function")throw new Error("implement() must be called with a function");let I=async(...l)=>{let n=this._def.input?await RJ(this._def.input,l,void 0,{callee:I}):l;if(!Array.isArray(n))throw new Error("Invalid arguments schema: not an array or tuple schema.");let a=await e(...n);return this._def.output?RJ(this._def.output,a,void 0,{callee:I}):a};return I}input(...e){let I=this.constructor;return Array.isArray(e[0])?new I({type:"function",input:new gJ({type:"tuple",items:e[0],rest:e[1]}),output:this._def.output}):new I({type:"function",input:e[0],output:this._def.output})}output(e){let I=this.constructor;return new I({type:"function",input:this._def.input,output:e})}}});function UH(t,e){if(t instanceof kH){let l=new I_(e),n={};for(let r of t._idmap.entries()){let[s,i]=r;l.process(i)}let a={},c={registry:t,uri:e?.uri,defs:n};for(let r of t._idmap.entries()){let[s,i]=r;a[s]=l.emit(i,{...e,external:c})}if(Object.keys(n).length>0){let r=l.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[r]:n}}return{schemas:a}}let I=new I_(e);return I.process(t),I.emit(t,e)}function Ss(t,e){let I=e??{seen:new Set};if(I.seen.has(t))return!1;I.seen.add(t);let n=t._zod.def;switch(n.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":return!1;case"array":return Ss(n.element,I);case"object":{for(let a in n.shape)if(Ss(n.shape[a],I))return!0;return!1}case"union":{for(let a of n.options)if(Ss(a,I))return!0;return!1}case"intersection":return Ss(n.left,I)||Ss(n.right,I);case"tuple":{for(let a of n.items)if(Ss(a,I))return!0;return!!(n.rest&&Ss(n.rest,I))}case"record":return Ss(n.keyType,I)||Ss(n.valueType,I);case"map":return Ss(n.keyType,I)||Ss(n.valueType,I);case"set":return Ss(n.valueType,I);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return Ss(n.innerType,I);case"lazy":return Ss(n.getter(),I);case"default":return Ss(n.innerType,I);case"prefault":return Ss(n.innerType,I);case"custom":return!1;case"transform":return!0;case"pipe":return Ss(n.in,I)||Ss(n.out,I);case"success":return!1;case"catch":return!1;default:}throw new Error(`Unknown schema type: ${n.type}`)}var I_,fit=g(()=>{o();sHe();yI();I_=class{constructor(e){this.counter=0,this.metadataRegistry=e?.metadata??Vc,this.target=e?.target??"draft-2020-12",this.unrepresentable=e?.unrepresentable??"throw",this.override=e?.override??(()=>{}),this.io=e?.io??"output",this.seen=new Map}process(e,I={path:[],schemaPath:[]}){var l;let n=e._zod.def,a={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},c=this.seen.get(e);if(c)return c.count++,I.schemaPath.includes(e)&&(c.cycle=I.path),c.schema;let r={schema:{},count:1,cycle:void 0,path:I.path};this.seen.set(e,r);let s=e._zod.toJSONSchema?.();if(s)r.schema=s;else{let d={...I,schemaPath:[...I.schemaPath,e],path:I.path},u=e._zod.parent;if(u)r.ref=u,this.process(u,d),this.seen.get(u).isParent=!0;else{let b=r.schema;switch(n.type){case"string":{let Z=b;Z.type="string";let{minimum:p,maximum:W,format:h,patterns:N,contentEncoding:V}=e._zod.bag;if(typeof p=="number"&&(Z.minLength=p),typeof W=="number"&&(Z.maxLength=W),h&&(Z.format=a[h]??h,Z.format===""&&delete Z.format),V&&(Z.contentEncoding=V),N&&N.size>0){let R=[...N];R.length===1?Z.pattern=R[0].source:R.length>1&&(r.schema.allOf=[...R.map(F=>({...this.target==="draft-7"?{type:"string"}:{},pattern:F.source}))])}break}case"number":{let Z=b,{minimum:p,maximum:W,format:h,multipleOf:N,exclusiveMaximum:V,exclusiveMinimum:R}=e._zod.bag;typeof h=="string"&&h.includes("int")?Z.type="integer":Z.type="number",typeof R=="number"&&(Z.exclusiveMinimum=R),typeof p=="number"&&(Z.minimum=p,typeof R=="number"&&(R>=p?delete Z.minimum:delete Z.exclusiveMinimum)),typeof V=="number"&&(Z.exclusiveMaximum=V),typeof W=="number"&&(Z.maximum=W,typeof V=="number"&&(V<=W?delete Z.maximum:delete Z.exclusiveMaximum)),typeof N=="number"&&(Z.multipleOf=N);break}case"boolean":{let Z=b;Z.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case"null":{b.type="null";break}case"any":break;case"unknown":break;case"undefined":{if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break}case"void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case"never":{b.not={};break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{let Z=b,{minimum:p,maximum:W}=e._zod.bag;typeof p=="number"&&(Z.minItems=p),typeof W=="number"&&(Z.maxItems=W),Z.type="array",Z.items=this.process(n.element,{...d,path:[...d.path,"items"]});break}case"object":{let Z=b;Z.type="object",Z.properties={};let p=n.shape;for(let N in p)Z.properties[N]=this.process(p[N],{...d,path:[...d.path,"properties",N]});let W=new Set(Object.keys(p)),h=new Set([...W].filter(N=>{let V=n.shape[N]._zod;return this.io==="input"?V.optin===void 0:V.optout===void 0}));h.size>0&&(Z.required=Array.from(h)),n.catchall?._zod.def.type==="never"?Z.additionalProperties=!1:n.catchall?n.catchall&&(Z.additionalProperties=this.process(n.catchall,{...d,path:[...d.path,"additionalProperties"]})):this.io==="output"&&(Z.additionalProperties=!1);break}case"union":{let Z=b;Z.anyOf=n.options.map((p,W)=>this.process(p,{...d,path:[...d.path,"anyOf",W]}));break}case"intersection":{let Z=b,p=this.process(n.left,{...d,path:[...d.path,"allOf",0]}),W=this.process(n.right,{...d,path:[...d.path,"allOf",1]}),h=V=>"allOf"in V&&Object.keys(V).length===1,N=[...h(p)?p.allOf:[p],...h(W)?W.allOf:[W]];Z.allOf=N;break}case"tuple":{let Z=b;Z.type="array";let p=n.items.map((N,V)=>this.process(N,{...d,path:[...d.path,"prefixItems",V]}));if(this.target==="draft-2020-12"?Z.prefixItems=p:Z.items=p,n.rest){let N=this.process(n.rest,{...d,path:[...d.path,"items"]});this.target==="draft-2020-12"?Z.items=N:Z.additionalItems=N}n.rest&&(Z.items=this.process(n.rest,{...d,path:[...d.path,"items"]}));let{minimum:W,maximum:h}=e._zod.bag;typeof W=="number"&&(Z.minItems=W),typeof h=="number"&&(Z.maxItems=h);break}case"record":{let Z=b;Z.type="object",Z.propertyNames=this.process(n.keyType,{...d,path:[...d.path,"propertyNames"]}),Z.additionalProperties=this.process(n.valueType,{...d,path:[...d.path,"additionalProperties"]});break}case"map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case"enum":{let Z=b,p=AT(n.entries);p.every(W=>typeof W=="number")&&(Z.type="number"),p.every(W=>typeof W=="string")&&(Z.type="string"),Z.enum=p;break}case"literal":{let Z=b,p=[];for(let W of n.values)if(W===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof W=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");p.push(Number(W))}else p.push(W);if(p.length!==0)if(p.length===1){let W=p[0];Z.type=W===null?"null":typeof W,Z.const=W}else p.every(W=>typeof W=="number")&&(Z.type="number"),p.every(W=>typeof W=="string")&&(Z.type="string"),p.every(W=>typeof W=="boolean")&&(Z.type="string"),p.every(W=>W===null)&&(Z.type="null"),Z.enum=p;break}case"file":{let Z=b,p={type:"string",format:"binary",contentEncoding:"binary"},{minimum:W,maximum:h,mime:N}=e._zod.bag;W!==void 0&&(p.minLength=W),h!==void 0&&(p.maxLength=h),N?N.length===1?(p.contentMediaType=N[0],Object.assign(Z,p)):Z.anyOf=N.map(V=>({...p,contentMediaType:V})):Object.assign(Z,p);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{let Z=this.process(n.innerType,d);b.anyOf=[Z,{type:"null"}];break}case"nonoptional":{this.process(n.innerType,d),r.ref=n.innerType;break}case"success":{let Z=b;Z.type="boolean";break}case"default":{this.process(n.innerType,d),r.ref=n.innerType,b.default=JSON.parse(JSON.stringify(n.defaultValue));break}case"prefault":{this.process(n.innerType,d),r.ref=n.innerType,this.io==="input"&&(b._prefault=JSON.parse(JSON.stringify(n.defaultValue)));break}case"catch":{this.process(n.innerType,d),r.ref=n.innerType;let Z;try{Z=n.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}b.default=Z;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{let Z=b,p=e._zod.pattern;if(!p)throw new Error("Pattern not found in template literal");Z.type="string",Z.pattern=p.source;break}case"pipe":{let Z=this.io==="input"?n.in._zod.def.type==="transform"?n.out:n.in:n.out;this.process(Z,d),r.ref=Z;break}case"readonly":{this.process(n.innerType,d),r.ref=n.innerType,b.readOnly=!0;break}case"promise":{this.process(n.innerType,d),r.ref=n.innerType;break}case"optional":{this.process(n.innerType,d),r.ref=n.innerType;break}case"lazy":{let Z=e._zod.innerType;this.process(Z,d),r.ref=Z;break}case"custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}default:}}}let i=this.metadataRegistry.get(e);return i&&Object.assign(r.schema,i),this.io==="input"&&Ss(e)&&(delete r.schema.examples,delete r.schema.default),this.io==="input"&&r.schema._prefault&&((l=r.schema).default??(l.default=r.schema._prefault)),delete r.schema._prefault,this.seen.get(e).schema}emit(e,I){let l={cycles:I?.cycles??"ref",reused:I?.reused??"inline",external:I?.external??void 0},n=this.seen.get(e);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let a=G=>{let d=this.target==="draft-2020-12"?"$defs":"definitions";if(l.external){let p=l.external.registry.get(G[0])?.id,W=l.external.uri??(N=>N);if(p)return{ref:W(p)};let h=G[1].defId??G[1].schema.id??`schema${this.counter++}`;return G[1].defId=h,{defId:h,ref:`${W("__shared")}#/${d}/${h}`}}if(G[1]===n)return{ref:"#"};let b=`#/${d}/`,Z=G[1].schema.id??`__schema${this.counter++}`;return{defId:Z,ref:b+Z}},c=G=>{if(G[1].schema.$ref)return;let d=G[1],{ref:u,defId:b}=a(G);d.def={...d.schema},b&&(d.defId=b);let Z=d.schema;for(let p in Z)delete Z[p];Z.$ref=u};if(l.cycles==="throw")for(let G of this.seen.entries()){let d=G[1];if(d.cycle)throw new Error(`Cycle detected: #/${d.cycle?.join("/")}/ + +Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let G of this.seen.entries()){let d=G[1];if(e===G[0]){c(G);continue}if(l.external){let b=l.external.registry.get(G[0])?.id;if(e!==G[0]&&b){c(G);continue}}if(this.metadataRegistry.get(G[0])?.id){c(G);continue}if(d.cycle){c(G);continue}if(d.count>1&&l.reused==="ref"){c(G);continue}}let r=(G,d)=>{let u=this.seen.get(G),b=u.def??u.schema,Z={...b};if(u.ref===null)return;let p=u.ref;if(u.ref=null,p){r(p,d);let W=this.seen.get(p).schema;W.$ref&&d.target==="draft-7"?(b.allOf=b.allOf??[],b.allOf.push(W)):(Object.assign(b,W),Object.assign(b,Z))}u.isParent||this.override({zodSchema:G,jsonSchema:b,path:u.path??[]})};for(let G of[...this.seen.entries()].reverse())r(G[0],{target:this.target});let s={};if(this.target==="draft-2020-12"?s.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?s.$schema="http://json-schema.org/draft-07/schema#":console.warn(`Invalid target: ${this.target}`),l.external?.uri){let G=l.external.registry.get(e)?.id;if(!G)throw new Error("Schema is missing an `id` property");s.$id=l.external.uri(G)}Object.assign(s,n.def);let i=l.external?.defs??{};for(let G of this.seen.entries()){let d=G[1];d.def&&d.defId&&(i[d.defId]=d.def)}l.external||Object.keys(i).length>0&&(this.target==="draft-2020-12"?s.$defs=i:s.definitions=i);try{return JSON.parse(JSON.stringify(s))}catch{throw new Error("Error converting schema to JSON.")}}}});var Eit={};var Jit=g(()=>{o()});var vX={};tr(vX,{$ZodAny:()=>Ewe,$ZodArray:()=>CT,$ZodAsyncError:()=>OA,$ZodBase64:()=>Awe,$ZodBase64URL:()=>Fwe,$ZodBigInt:()=>nae,$ZodBigIntFormat:()=>wwe,$ZodBoolean:()=>ET,$ZodCIDRv4:()=>Vwe,$ZodCIDRv6:()=>Ywe,$ZodCUID:()=>iwe,$ZodCUID2:()=>Gwe,$ZodCatch:()=>qwe,$ZodCheck:()=>cr,$ZodCheckBigIntFormat:()=>kye,$ZodCheckEndsWith:()=>Dye,$ZodCheckGreaterThan:()=>$ne,$ZodCheckIncludes:()=>_ye,$ZodCheckLengthEquals:()=>Bye,$ZodCheckLessThan:()=>Pne,$ZodCheckLowerCase:()=>Sye,$ZodCheckMaxLength:()=>Oye,$ZodCheckMaxSize:()=>xye,$ZodCheckMimeType:()=>Pye,$ZodCheckMinLength:()=>zye,$ZodCheckMinSize:()=>jye,$ZodCheckMultipleOf:()=>Cye,$ZodCheckNumberFormat:()=>Lye,$ZodCheckOverwrite:()=>$ye,$ZodCheckProperty:()=>qye,$ZodCheckRegex:()=>Mye,$ZodCheckSizeEquals:()=>Uye,$ZodCheckStartsWith:()=>Kye,$ZodCheckStringFormat:()=>Hx,$ZodCheckUpperCase:()=>Tye,$ZodCustom:()=>lHe,$ZodCustomStringFormat:()=>vwe,$ZodDate:()=>Cwe,$ZodDefault:()=>Twe,$ZodDiscriminatedUnion:()=>kwe,$ZodE164:()=>Xwe,$ZodEmail:()=>cwe,$ZodEmoji:()=>swe,$ZodEnum:()=>zwe,$ZodError:()=>wT,$ZodFile:()=>Mwe,$ZodFunction:()=>yae,$ZodGUID:()=>nwe,$ZodIPv4:()=>Wwe,$ZodIPv6:()=>Nwe,$ZodISODate:()=>Zwe,$ZodISODateTime:()=>mwe,$ZodISODuration:()=>hwe,$ZodISOTime:()=>pwe,$ZodIntersection:()=>xwe,$ZodJWT:()=>gwe,$ZodKSUID:()=>bwe,$ZodLazy:()=>IHe,$ZodLiteral:()=>Bwe,$ZodMap:()=>Uwe,$ZodNaN:()=>Pwe,$ZodNanoID:()=>owe,$ZodNever:()=>JT,$ZodNonOptional:()=>Kwe,$ZodNull:()=>fwe,$ZodNullable:()=>Swe,$ZodNumber:()=>lae,$ZodNumberFormat:()=>ywe,$ZodObject:()=>Lwe,$ZodOptional:()=>Qx,$ZodPipe:()=>kT,$ZodPrefault:()=>_we,$ZodPromise:()=>tHe,$ZodReadonly:()=>$we,$ZodRealError:()=>wx,$ZodRecord:()=>jwe,$ZodRegistry:()=>kH,$ZodSet:()=>Owe,$ZodString:()=>XJ,$ZodStringFormat:()=>sa,$ZodSuccess:()=>Dwe,$ZodSymbol:()=>Hwe,$ZodTemplateLiteral:()=>eHe,$ZodTransform:()=>LT,$ZodTuple:()=>gJ,$ZodType:()=>xI,$ZodULID:()=>dwe,$ZodURL:()=>rwe,$ZodUUID:()=>awe,$ZodUndefined:()=>Qwe,$ZodUnion:()=>aae,$ZodUnknown:()=>LH,$ZodVoid:()=>Jwe,$ZodXID:()=>uwe,$brand:()=>Bve,$constructor:()=>de,$input:()=>rHe,$output:()=>cHe,Doc:()=>fT,JSONSchema:()=>Eit,JSONSchemaGenerator:()=>I_,NEVER:()=>zve,TimePrecision:()=>GHe,_any:()=>QHe,_array:()=>t_,_base64:()=>Fae,_base64url:()=>Xae,_bigint:()=>FHe,_boolean:()=>RHe,_catch:()=>XkI,_cidrv4:()=>Rae,_cidrv6:()=>Aae,_coercedBigint:()=>XHe,_coercedBoolean:()=>AHe,_coercedDate:()=>JHe,_coercedNumber:()=>pHe,_coercedString:()=>iHe,_cuid:()=>Zae,_cuid2:()=>pae,_custom:()=>BHe,_date:()=>EHe,_default:()=>RkI,_discriminatedUnion:()=>dkI,_e164:()=>gae,_email:()=>sae,_emoji:()=>bae,_endsWith:()=>KT,_enum:()=>pkI,_file:()=>zHe,_float32:()=>WHe,_float64:()=>NHe,_gt:()=>XX,_gte:()=>xb,_guid:()=>UT,_includes:()=>TT,_int:()=>hHe,_int32:()=>VHe,_int64:()=>gHe,_intersection:()=>ukI,_ipv4:()=>Vae,_ipv6:()=>Yae,_isoDate:()=>uHe,_isoDateTime:()=>dHe,_isoDuration:()=>mHe,_isoTime:()=>bHe,_jwt:()=>vae,_ksuid:()=>Nae,_lazy:()=>wkI,_length:()=>Jx,_literal:()=>WkI,_lowercase:()=>MT,_lt:()=>FX,_lte:()=>Ap,_map:()=>mkI,_max:()=>Ap,_maxLength:()=>Ex,_maxSize:()=>fx,_mime:()=>DT,_min:()=>xb,_minLength:()=>jH,_minSize:()=>yJ,_multipleOf:()=>vJ,_nan:()=>CHe,_nanoid:()=>mae,_nativeEnum:()=>hkI,_negative:()=>kHe,_never:()=>OT,_nonnegative:()=>jHe,_nonoptional:()=>AkI,_nonpositive:()=>xHe,_normalize:()=>qT,_null:()=>HHe,_nullable:()=>YkI,_number:()=>ZHe,_optional:()=>VkI,_overwrite:()=>gX,_parse:()=>Mne,_parseAsync:()=>Sne,_pipe:()=>gkI,_positive:()=>LHe,_promise:()=>HkI,_property:()=>UHe,_readonly:()=>vkI,_record:()=>bkI,_refine:()=>MHe,_regex:()=>BT,_safeParse:()=>Tne,_safeParseAsync:()=>_ne,_set:()=>ZkI,_size:()=>zT,_startsWith:()=>_T,_string:()=>oHe,_stringFormat:()=>THe,_stringbool:()=>SHe,_success:()=>FkI,_symbol:()=>yHe,_templateLiteral:()=>ykI,_toLowerCase:()=>$T,_toUpperCase:()=>e_,_transform:()=>NkI,_trim:()=>PT,_tuple:()=>OHe,_uint32:()=>YHe,_uint64:()=>vHe,_ulid:()=>hae,_undefined:()=>wHe,_union:()=>GkI,_unknown:()=>xH,_uppercase:()=>ST,_url:()=>uae,_uuid:()=>oae,_uuidv4:()=>iae,_uuidv6:()=>Gae,_uuidv7:()=>dae,_void:()=>fHe,_xid:()=>Wae,clone:()=>ar,config:()=>ms,flattenError:()=>HT,formatError:()=>QT,function:()=>KHe,globalConfig:()=>YT,globalRegistry:()=>Vc,isValidBase64:()=>Rwe,isValidBase64URL:()=>aot,isValidJWT:()=>cot,locales:()=>jT,parse:()=>zA,parseAsync:()=>RJ,prettifyError:()=>lye,regexes:()=>FJ,registry:()=>rae,safeParse:()=>aye,safeParseAsync:()=>cye,toDotPath:()=>Ust,toJSONSchema:()=>UH,treeifyError:()=>Iye,util:()=>dt,version:()=>twe});var Vi=g(()=>{o();gx();Kne();nye();xT();eae();Iwe();yI();qne();aHe();sHe();ewe();Qit();_He();fit();Jit()});function mn(t){if(typeof t!="object"||t===null)return!1;let e=t;if(!("_zod"in e))return!1;let I=e._zod;return typeof I=="object"&&I!==null&&"def"in I}function Yc(t){if(typeof t!="object"||t===null)return!1;let e=t;if(!("_def"in e)||"_zod"in e)return!1;let I=e._def;return typeof I=="object"&&I!=null&&"typeName"in I}function Cit(t){return mn(t)&&console.warn("[WARNING] Attempting to use Zod 4 schema in a context where Zod 3 schema is expected. This may cause unexpected behavior."),Yc(t)}function Vl(t){return!t||typeof t!="object"||Array.isArray(t)?!1:!!(mn(t)||Yc(t))}function DHe(t){return typeof t=="object"&&t!==null&&"_def"in t&&typeof t._def=="object"&&t._def!==null&&"typeName"in t._def&&t._def.typeName==="ZodLiteral"}function qHe(t){return mn(t)?typeof t=="object"&&t!==null&&"_zod"in t&&typeof t._zod=="object"&&t._zod!==null&&"def"in t._zod&&typeof t._zod.def=="object"&&t._zod.def!==null&&"type"in t._zod.def&&t._zod.def.type==="literal":!1}function Lit(t){return!!(DHe(t)||qHe(t))}async function BA(t,e){if(mn(t))try{return{success:!0,data:await RJ(t,e)}}catch(I){return{success:!1,error:I}}if(Yc(t))return await t.safeParseAsync(e);throw new Error("Schema must be an instance of z3.ZodType or z4.$ZodType")}async function OH(t,e){if(mn(t))return await RJ(t,e);if(Yc(t))return await t.parseAsync(e);throw new Error("Schema must be an instance of z3.ZodType or z4.$ZodType")}function Hae(t,e){if(mn(t))try{return{success:!0,data:zA(t,e)}}catch(I){return{success:!1,error:I}}if(Yc(t))return t.safeParse(e);throw new Error("Schema must be an instance of z3.ZodType or z4.$ZodType")}function Tu(t,e){if(mn(t))return zA(t,e);if(Yc(t))return t.parse(e);throw new Error("Schema must be an instance of z3.ZodType or z4.$ZodType")}function lZ(t){if(mn(t))return Vc.get(t)?.description;if(Yc(t)||"description"in t&&typeof t.description=="string")return t.description}function kit(t){if(!Vl(t))return!1;if(Yc(t)){let e=t._def;if(e.typeName==="ZodObject"){let I=t;return!I.shape||Object.keys(I.shape).length===0}if(e.typeName==="ZodRecord")return!0}if(mn(t)){let e=t._zod.def;if(e.type==="object"){let I=t;return!I.shape||Object.keys(I.shape).length===0}if(e.type==="record")return!0}return typeof t=="object"&&t!==null&&!("shape"in t)}function Lx(t){return Vl(t)?Yc(t)?t._def.typeName==="ZodString":mn(t)?t._zod.def.type==="string":!1:!1}function l_(t){return typeof t=="object"&&t!==null&&"_def"in t&&typeof t._def=="object"&&t._def!==null&&"typeName"in t._def&&t._def.typeName==="ZodObject"}function Fp(t){return mn(t)?typeof t=="object"&&t!==null&&"_zod"in t&&typeof t._zod=="object"&&t._zod!==null&&"def"in t._zod&&typeof t._zod.def=="object"&&t._zod.def!==null&&"type"in t._zod.def&&t._zod.def.type==="object":!1}function n_(t){return mn(t)?typeof t=="object"&&t!==null&&"_zod"in t&&typeof t._zod=="object"&&t._zod!==null&&"def"in t._zod&&typeof t._zod.def=="object"&&t._zod.def!==null&&"type"in t._zod.def&&t._zod.def.type==="array":!1}function PHe(t){return mn(t)?typeof t=="object"&&t!==null&&"_zod"in t&&typeof t._zod=="object"&&t._zod!==null&&"def"in t._zod&&typeof t._zod.def=="object"&&t._zod.def!==null&&"type"in t._zod.def&&t._zod.def.type==="optional":!1}function $He(t){return mn(t)?typeof t=="object"&&t!==null&&"_zod"in t&&typeof t._zod=="object"&&t._zod!==null&&"def"in t._zod&&typeof t._zod.def=="object"&&t._zod.def!==null&&"type"in t._zod.def&&t._zod.def.type==="nullable":!1}function Rc(t){return!!(l_(t)||Fp(t))}function MR(t){if(Yc(t))return t.shape;if(mn(t))return t._zod.def.shape;throw new Error("Schema must be an instance of z3.ZodObject or z4.$ZodObject")}function Qae(t,e){if(Yc(t))return t.extend(e);if(mn(t))return dt.extend(t,e);throw new Error("Schema must be an instance of z3.ZodObject or z4.$ZodObject")}function zH(t){if(Yc(t))return t.partial();if(mn(t))return dt.partial(Qx,t,void 0);throw new Error("Schema must be an instance of z3.ZodObject or z4.$ZodObject")}function Cx(t,e=!1){if(l_(t))return t.strict();if(Fp(t)){let I=t._zod.def.shape;if(e)for(let[a,c]of Object.entries(t._zod.def.shape)){if(Fp(c))I[a]=Cx(c,e);else if(n_(c)){let s=c._zod.def.element;Fp(s)&&(s=Cx(s,e)),I[a]=ar(c,{...c._zod.def,element:s})}else I[a]=c;let r=Vc.get(c);r&&Vc.add(I[a],r)}let l=ar(t,{...t._zod.def,shape:I,catchall:OT(JT)}),n=Vc.get(t);return n&&Vc.add(l,n),l}throw new Error("Schema must be an instance of z3.ZodObject or z4.$ZodObject")}function wae(t,e=!1){if(l_(t))return t.passthrough();if(Fp(t)){let I=t._zod.def.shape;if(e)for(let[a,c]of Object.entries(t._zod.def.shape)){if(Fp(c))I[a]=wae(c,e);else if(n_(c)){let s=c._zod.def.element;Fp(s)&&(s=wae(s,e)),I[a]=ar(c,{...c._zod.def,element:s})}else I[a]=c;let r=Vc.get(c);r&&Vc.add(I[a],r)}let l=ar(t,{...t._zod.def,shape:I,catchall:xH(LH)}),n=Vc.get(t);return n&&Vc.add(l,n),l}throw new Error("Schema must be an instance of z3.ZodObject or z4.$ZodObject")}function BH(t){if(Yc(t))try{let e=t.parse(void 0);return()=>e}catch{return}if(mn(t))try{let e=zA(t,void 0);return()=>e}catch{return}}function QkI(t){return Yc(t)&&"typeName"in t._def&&t._def.typeName==="ZodEffects"}function fkI(t){return mn(t)&&t._zod.def.type==="pipe"}function wJ(t,e,I){let l=I.get(t);if(l!==void 0)return l;if(Yc(t))return QkI(t)?wJ(t._def.schema,e,I):t;if(mn(t)){let n=t;if(fkI(t)&&(n=wJ(t._zod.def.in,e,I)),e){if(Fp(n)){let c={};for(let[r,s]of Object.entries(n._zod.def.shape))c[r]=wJ(s,e,I);n=ar(n,{...n._zod.def,shape:c})}else if(n_(n)){let c=wJ(n._zod.def.element,e,I);n=ar(n,{...n._zod.def,element:c})}else if(PHe(n)){let c=wJ(n._zod.def.innerType,e,I);n=ar(n,{...n._zod.def,innerType:c})}else if($He(n)){let c=wJ(n._zod.def.innerType,e,I);n=ar(n,{...n._zod.def,innerType:c})}}let a=Vc.get(t);return a&&Vc.add(n,a),I.set(t,n),n}throw new Error("Schema must be an instance of z3.ZodType or z4.$ZodType")}function fae(t,e=!1){return wJ(t,e,new WeakMap)}function Eae(t,e){if(Yc(t)){let I=MR(t),l={};for(let[n,a]of Object.entries(I))e(n,a)?l[n]=a.optional():l[n]=a;return t.extend(l)}if(mn(t)){let I=MR(t),l={...t._zod.def.shape};for(let[c,r]of Object.entries(I))e(c,r)&&(l[c]=new Qx({type:"optional",innerType:r}));let n=ar(t,{...t._zod.def,shape:l}),a=Vc.get(t);return a&&Vc.add(n,a),n}throw new Error("Schema must be an instance of z3.ZodObject or z4.$ZodObject")}function Jae(t){return t instanceof Error&&(t.constructor.name==="ZodError"||t.constructor.name==="$ZodError")}var MA=g(()=>{o();Vi()});function eQe(t){return t.replace(/[^a-zA-Z-_0-9]/g,"_")}function JkI(t){let e="";for(let[I,l]of Object.entries(t))e+=` classDef ${I} ${l}; +`;return e}function xit(t,e,I){let{firstNode:l,lastNode:n,nodeColors:a,withStyles:c=!0,curveStyle:r="linear",wrapLabelNWords:s=9}=I??{},i=c?`%%{init: {'flowchart': {'curve': '${r}'}}}%% +graph TD; +`:`graph TD; +`;if(c){let Z="default",p={[Z]:"{0}({1})"};l!==void 0&&(p[l]="{0}([{1}]):::first"),n!==void 0&&(p[n]="{0}([{1}]):::last");for(let[W,h]of Object.entries(t)){let N=h.name.split(":").pop()??"",V=EkI.some(F=>N.startsWith(F)&&N.endsWith(F))?`

${N}

`:N;Object.keys(h.metadata??{}).length&&(V+=`
${Object.entries(h.metadata??{}).map(([F,v])=>`${F} = ${v}`).join(` +`)}`);let R=(p[W]??p[Z]).replace("{0}",eQe(W)).replace("{1}",V);i+=` ${R} +`}}let G={};for(let Z of e){let p=Z.source.split(":"),W=Z.target.split(":"),h=p.filter((N,V)=>N===W[V]).join(":");G[h]||(G[h]=[]),G[h].push(Z)}let d=new Set;function u(Z){return[...Z].sort((p,W)=>p.split(":").length-W.split(":").length)}function b(Z,p){let W=Z.length===1&&Z[0].source===Z[0].target;if(p&&!W){let N=p.split(":").pop();if(d.has(p))throw new Error(`Found duplicate subgraph '${N}' at '${p} -- this likely means that you're reusing a subgraph node with the same name. Please adjust your graph to have subgraph nodes with unique names.`);d.add(p),i+=` subgraph ${N} +`}let h=u(Object.keys(G).filter(N=>N.startsWith(`${p}:`)&&N!==p&&N.split(":").length===p.split(":").length+1));for(let N of h)b(G[N],N);for(let N of Z){let{source:V,target:R,data:F,conditional:v}=N,y="";if(F!==void 0){let w=F,H=w.split(" ");H.length>s&&(w=Array.from({length:Math.ceil(H.length/s)},(f,L)=>H.slice(L*s,(L+1)*s).join(" ")).join(" 
 ")),y=v?` -.  ${w}  .-> `:` --  ${w}  --> `}else y=v?" -.-> ":" --> ";i+=` ${eQe(V)}${y}${eQe(R)}; +`}p&&!W&&(i+=` end +`)}b(G[""]??[],"");for(let Z in G)!Z.includes(":")&&Z!==""&&b(G[Z],Z);return c&&(i+=JkI(a??{})),i}async function jit(t,e){let I=e?.backgroundColor??"white",l=e?.imageType??"png",n=xst(t);I!==void 0&&(/^#(?:[0-9a-fA-F]{3}){1,2}$/.test(I)||(I=`!${I}`));let a=`https://mermaid.ink/img/${n}?bgColor=${I}&type=${l}`,c=await fetch(a);if(!c.ok)throw new Error(["Failed to render the graph using the Mermaid.INK API.",`Status code: ${c.status}`,`Status text: ${c.statusText}`].join(` +`));return await c.blob()}var EkI,Uit=g(()=>{o();zne();EkI=["*","_","`"]});var zit,Oit,Bit,Cae=g(()=>{o();zit=Symbol("Let zodToJsonSchema decide on which parser to use"),Oit={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref",openAiAnyTypeName:"OpenAiAnyType"},Bit=t=>typeof t=="string"?{...Oit,name:t}:{...Oit,...t}});var Mit,tQe=g(()=>{o();Cae();Mit=t=>{let e=Bit(t),I=e.name!==void 0?[...e.basePath,e.definitionPath,e.name]:e.basePath;return{...e,flags:{hasReferencedOpenAiAnyType:!1},currentPath:I,propertyPath:void 0,seen:new Map(Object.entries(e.definitions).map(([l,n])=>[n._def,{def:n._def,path:[...e.basePath,e.definitionPath,l],jsonSchema:void 0}]))}}});var Lae,kae=g(()=>{o();Lae=(t,e)=>{let I=0;for(;I{o();kae()});function IQe(t,e,I,l){l?.errorMessages&&I&&(t.errorMessage={...t.errorMessage,[e]:I})}function Sl(t,e,I,l,n){t[e]=I,IQe(t,e,l,n)}var MH=g(()=>{o()});var fl,lQe,At,SA,a_=g(()=>{o();(function(t){t.assertEqual=n=>{};function e(n){}t.assertIs=e;function I(n){throw new Error}t.assertNever=I,t.arrayToEnum=n=>{let a={};for(let c of n)a[c]=c;return a},t.getValidEnumValues=n=>{let a=t.objectKeys(n).filter(r=>typeof n[n[r]]!="number"),c={};for(let r of a)c[r]=n[r];return t.objectValues(c)},t.objectValues=n=>t.objectKeys(n).map(function(a){return n[a]}),t.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let a=[];for(let c in n)Object.prototype.hasOwnProperty.call(n,c)&&a.push(c);return a},t.find=(n,a)=>{for(let c of n)if(a(c))return c},t.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function l(n,a=" | "){return n.map(c=>typeof c=="string"?`'${c}'`:c).join(a)}t.joinValues=l,t.jsonStringifyReplacer=(n,a)=>typeof a=="bigint"?a.toString():a})(fl||(fl={}));(function(t){t.mergeShapes=(e,I)=>({...e,...I})})(lQe||(lQe={}));At=fl.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),SA=t=>{switch(typeof t){case"undefined":return At.undefined;case"string":return At.string;case"number":return Number.isNaN(t)?At.nan:At.number;case"boolean":return At.boolean;case"function":return At.function;case"bigint":return At.bigint;case"symbol":return At.symbol;case"object":return Array.isArray(t)?At.array:t===null?At.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?At.promise:typeof Map<"u"&&t instanceof Map?At.map:typeof Set<"u"&&t instanceof Set?At.set:typeof Date<"u"&&t instanceof Date?At.date:At.object;default:return At.unknown}}});var qe,CkI,jb,xae=g(()=>{o();a_();qe=fl.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),CkI=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),jb=class t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=l=>{this.issues=[...this.issues,l]},this.addIssues=(l=[])=>{this.issues=[...this.issues,...l]};let I=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,I):this.__proto__=I,this.name="ZodError",this.issues=e}format(e){let I=e||function(a){return a.message},l={_errors:[]},n=a=>{for(let c of a.issues)if(c.code==="invalid_union")c.unionErrors.map(n);else if(c.code==="invalid_return_type")n(c.returnTypeError);else if(c.code==="invalid_arguments")n(c.argumentsError);else if(c.path.length===0)l._errors.push(I(c));else{let r=l,s=0;for(;sI.message){let I={},l=[];for(let n of this.issues)if(n.path.length>0){let a=n.path[0];I[a]=I[a]||[],I[a].push(e(n))}else l.push(e(n));return{formErrors:l,fieldErrors:I}}get formErrors(){return this.flatten()}};jb.create=t=>new jb(t)});var LkI,yX,nQe=g(()=>{o();xae();a_();LkI=(t,e)=>{let I;switch(t.code){case qe.invalid_type:t.received===At.undefined?I="Required":I=`Expected ${t.expected}, received ${t.received}`;break;case qe.invalid_literal:I=`Invalid literal value, expected ${JSON.stringify(t.expected,fl.jsonStringifyReplacer)}`;break;case qe.unrecognized_keys:I=`Unrecognized key(s) in object: ${fl.joinValues(t.keys,", ")}`;break;case qe.invalid_union:I="Invalid input";break;case qe.invalid_union_discriminator:I=`Invalid discriminator value. Expected ${fl.joinValues(t.options)}`;break;case qe.invalid_enum_value:I=`Invalid enum value. Expected ${fl.joinValues(t.options)}, received '${t.received}'`;break;case qe.invalid_arguments:I="Invalid function arguments";break;case qe.invalid_return_type:I="Invalid function return type";break;case qe.invalid_date:I="Invalid date";break;case qe.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(I=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(I=`${I} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?I=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?I=`Invalid input: must end with "${t.validation.endsWith}"`:fl.assertNever(t.validation):t.validation!=="regex"?I=`Invalid ${t.validation}`:I="Invalid";break;case qe.too_small:t.type==="array"?I=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?I=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?I=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?I=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?I=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:I="Invalid input";break;case qe.too_big:t.type==="array"?I=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?I=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?I=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?I=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?I=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:I="Invalid input";break;case qe.custom:I="Invalid input";break;case qe.invalid_intersection_types:I="Intersection results could not be merged";break;case qe.not_multiple_of:I=`Number must be a multiple of ${t.multipleOf}`;break;case qe.not_finite:I="Number must be finite";break;default:I=e.defaultError,fl.assertNever(t)}return{message:I}},yX=LkI});function kkI(t){Sit=t}function kx(){return Sit}var Sit,jae=g(()=>{o();nQe();Sit=yX});function Vt(t,e){let I=kx(),l=c_({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,I,I===yX?void 0:yX].filter(n=>!!n)});t.common.issues.push(l)}var c_,xkI,Yi,pI,HJ,nG,Uae,Oae,SH,xx,aQe=g(()=>{o();jae();nQe();c_=t=>{let{data:e,path:I,errorMaps:l,issueData:n}=t,a=[...I,...n.path||[]],c={...n,path:a};if(n.message!==void 0)return{...n,path:a,message:n.message};let r="",s=l.filter(i=>!!i).slice().reverse();for(let i of s)r=i(c,{data:e,defaultError:r}).message;return{...n,path:a,message:r}},xkI=[];Yi=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,I){let l=[];for(let n of I){if(n.status==="aborted")return pI;n.status==="dirty"&&e.dirty(),l.push(n.value)}return{status:e.value,value:l}}static async mergeObjectAsync(e,I){let l=[];for(let n of I){let a=await n.key,c=await n.value;l.push({key:a,value:c})}return t.mergeObjectSync(e,l)}static mergeObjectSync(e,I){let l={};for(let n of I){let{key:a,value:c}=n;if(a.status==="aborted"||c.status==="aborted")return pI;a.status==="dirty"&&e.dirty(),c.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof c.value<"u"||n.alwaysSet)&&(l[a.value]=c.value)}return{status:e.value,value:l}}},pI=Object.freeze({status:"aborted"}),HJ=t=>({status:"dirty",value:t}),nG=t=>({status:"valid",value:t}),Uae=t=>t.status==="aborted",Oae=t=>t.status==="dirty",SH=t=>t.status==="valid",xx=t=>typeof Promise<"u"&&t instanceof Promise});var Tit=g(()=>{o()});var Dt,_it=g(()=>{o();(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Dt||(Dt={}))});function ll(t){if(!t)return{};let{errorMap:e,invalid_type_error:I,required_error:l,description:n}=t;if(e&&(I||l))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(c,r)=>{let{message:s}=t;return c.code==="invalid_enum_value"?{message:s??r.defaultError}:typeof r.data>"u"?{message:s??l??r.defaultError}:c.code!=="invalid_type"?{message:r.defaultError}:{message:s??I??r.defaultError}},description:n}}function Pit(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);let I=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${I}`}function I4I(t){return new RegExp(`^${Pit(t)}$`)}function $it(t){let e=`${qit}T${Pit(t)}`,I=[];return I.push(t.local?"Z?":"Z"),t.offset&&I.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${I.join("|")})`,new RegExp(`^${e}$`)}function l4I(t,e){return!!((e==="v4"||!e)&&KkI.test(t)||(e==="v6"||!e)&&qkI.test(t))}function n4I(t,e){if(!MkI.test(t))return!1;try{let[I]=t.split(".");if(!I)return!1;let l=I.replace(/-/g,"+").replace(/_/g,"/").padEnd(I.length+(4-I.length%4)%4,"="),n=JSON.parse(atob(l));return!(typeof n!="object"||n===null||"typ"in n&&n?.typ!=="JWT"||!n.alg||e&&n.alg!==e)}catch{return!1}}function a4I(t,e){return!!((e==="v4"||!e)&&DkI.test(t)||(e==="v6"||!e)&&PkI.test(t))}function c4I(t,e){let I=(t.toString().split(".")[1]||"").length,l=(e.toString().split(".")[1]||"").length,n=I>l?I:l,a=Number.parseInt(t.toFixed(n).replace(".","")),c=Number.parseInt(e.toFixed(n).replace(".",""));return a%c/10**n}function jx(t){if(t instanceof Ub){let e={};for(let I in t.shape){let l=t.shape[I];e[I]=gp.create(jx(l))}return new Ub({...t._def,shape:()=>e})}else return t instanceof QX?new QX({...t._def,type:jx(t.element)}):t instanceof gp?gp.create(jx(t.unwrap())):t instanceof _A?_A.create(jx(t.unwrap())):t instanceof TA?TA.create(t.items.map(e=>jx(e))):t}function rQe(t,e){let I=SA(t),l=SA(e);if(t===e)return{valid:!0,data:t};if(I===At.object&&l===At.object){let n=fl.objectKeys(e),a=fl.objectKeys(t).filter(r=>n.indexOf(r)!==-1),c={...t,...e};for(let r of a){let s=rQe(t[r],e[r]);if(!s.valid)return{valid:!1};c[r]=s.data}return{valid:!0,data:c}}else if(I===At.array&&l===At.array){if(t.length!==e.length)return{valid:!1};let n=[];for(let a=0;a{let a=t(l);if(a instanceof Promise)return a.then(c=>{if(!c){let r=Dit(e,l),s=r.fatal??I??!0;n.addIssue({code:"custom",...r,fatal:s})}});if(!a){let c=Dit(e,l),r=c.fatal??I??!0;n.addIssue({code:"custom",...c,fatal:r})}}):_H.create()}var vp,Kit,ul,jkI,UkI,OkI,zkI,BkI,MkI,SkI,TkI,_kI,cQe,KkI,DkI,qkI,PkI,$kI,e4I,qit,t4I,TH,QJ,fJ,EJ,JJ,Ux,CJ,LJ,_H,HX,SR,Ox,QX,Ub,kJ,wX,zae,xJ,TA,Bae,zx,Bx,Mae,jJ,UJ,OJ,zJ,KH,yp,gp,_A,BJ,MJ,Mx,r4I,r_,s_,SJ,s4I,Fe,o4I,IGt,lGt,i4I,G4I,nGt,d4I,u4I,b4I,m4I,Z4I,p4I,h4I,W4I,N4I,V4I,Y4I,R4I,A4I,F4I,X4I,g4I,v4I,y4I,w4I,H4I,Q4I,f4I,E4I,J4I,C4I,L4I,k4I,x4I,j4I,U4I,O4I,z4I,B4I,M4I,aGt=g(()=>{o();xae();jae();_it();aQe();a_();vp=class{constructor(e,I,l,n){this._cachedPath=[],this.parent=e,this.data=I,this._path=l,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},Kit=(t,e)=>{if(SH(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let I=new jb(t.common.issues);return this._error=I,this._error}}};ul=class{get description(){return this._def.description}_getType(e){return SA(e.data)}_getOrReturnCtx(e,I){return I||{common:e.parent.common,data:e.data,parsedType:SA(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Yi,ctx:{common:e.parent.common,data:e.data,parsedType:SA(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let I=this._parse(e);if(xx(I))throw new Error("Synchronous parse encountered promise.");return I}_parseAsync(e){let I=this._parse(e);return Promise.resolve(I)}parse(e,I){let l=this.safeParse(e,I);if(l.success)return l.data;throw l.error}safeParse(e,I){let l={common:{issues:[],async:I?.async??!1,contextualErrorMap:I?.errorMap},path:I?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:SA(e)},n=this._parseSync({data:e,path:l.path,parent:l});return Kit(l,n)}"~validate"(e){let I={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:SA(e)};if(!this["~standard"].async)try{let l=this._parseSync({data:e,path:[],parent:I});return SH(l)?{value:l.value}:{issues:I.common.issues}}catch(l){l?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),I.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:I}).then(l=>SH(l)?{value:l.value}:{issues:I.common.issues})}async parseAsync(e,I){let l=await this.safeParseAsync(e,I);if(l.success)return l.data;throw l.error}async safeParseAsync(e,I){let l={common:{issues:[],contextualErrorMap:I?.errorMap,async:!0},path:I?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:SA(e)},n=this._parse({data:e,path:l.path,parent:l}),a=await(xx(n)?n:Promise.resolve(n));return Kit(l,a)}refine(e,I){let l=n=>typeof I=="string"||typeof I>"u"?{message:I}:typeof I=="function"?I(n):I;return this._refinement((n,a)=>{let c=e(n),r=()=>a.addIssue({code:qe.custom,...l(n)});return typeof Promise<"u"&&c instanceof Promise?c.then(s=>s?!0:(r(),!1)):c?!0:(r(),!1)})}refinement(e,I){return this._refinement((l,n)=>e(l)?!0:(n.addIssue(typeof I=="function"?I(l,n):I),!1))}_refinement(e){return new yp({schema:this,typeName:Fe.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:I=>this["~validate"](I)}}optional(){return gp.create(this,this._def)}nullable(){return _A.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return QX.create(this)}promise(){return KH.create(this,this._def)}or(e){return kJ.create([this,e],this._def)}and(e){return xJ.create(this,e,this._def)}transform(e){return new yp({...ll(this._def),schema:this,typeName:Fe.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let I=typeof e=="function"?e:()=>e;return new BJ({...ll(this._def),innerType:this,defaultValue:I,typeName:Fe.ZodDefault})}brand(){return new r_({typeName:Fe.ZodBranded,type:this,...ll(this._def)})}catch(e){let I=typeof e=="function"?e:()=>e;return new MJ({...ll(this._def),innerType:this,catchValue:I,typeName:Fe.ZodCatch})}describe(e){let I=this.constructor;return new I({...this._def,description:e})}pipe(e){return s_.create(this,e)}readonly(){return SJ.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},jkI=/^c[^\s-]{8,}$/i,UkI=/^[0-9a-z]+$/,OkI=/^[0-9A-HJKMNP-TV-Z]{26}$/i,zkI=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,BkI=/^[a-z0-9_-]{21}$/i,MkI=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,SkI=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,TkI=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,_kI="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",KkI=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,DkI=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,qkI=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,PkI=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,$kI=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,e4I=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,qit="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",t4I=new RegExp(`^${qit}$`);TH=class t extends ul{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==At.string){let a=this._getOrReturnCtx(e);return Vt(a,{code:qe.invalid_type,expected:At.string,received:a.parsedType}),pI}let l=new Yi,n;for(let a of this._def.checks)if(a.kind==="min")e.data.lengtha.value&&(n=this._getOrReturnCtx(e,n),Vt(n,{code:qe.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),l.dirty());else if(a.kind==="length"){let c=e.data.length>a.value,r=e.data.lengthe.test(n),{validation:I,code:qe.invalid_string,...Dt.errToObj(l)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Dt.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Dt.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Dt.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Dt.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...Dt.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Dt.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Dt.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Dt.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...Dt.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...Dt.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...Dt.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Dt.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...Dt.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...Dt.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...Dt.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...Dt.errToObj(e)})}regex(e,I){return this._addCheck({kind:"regex",regex:e,...Dt.errToObj(I)})}includes(e,I){return this._addCheck({kind:"includes",value:e,position:I?.position,...Dt.errToObj(I?.message)})}startsWith(e,I){return this._addCheck({kind:"startsWith",value:e,...Dt.errToObj(I)})}endsWith(e,I){return this._addCheck({kind:"endsWith",value:e,...Dt.errToObj(I)})}min(e,I){return this._addCheck({kind:"min",value:e,...Dt.errToObj(I)})}max(e,I){return this._addCheck({kind:"max",value:e,...Dt.errToObj(I)})}length(e,I){return this._addCheck({kind:"length",value:e,...Dt.errToObj(I)})}nonempty(e){return this.min(1,Dt.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let I of this._def.checks)I.kind==="min"&&(e===null||I.value>e)&&(e=I.value);return e}get maxLength(){let e=null;for(let I of this._def.checks)I.kind==="max"&&(e===null||I.valuenew TH({checks:[],typeName:Fe.ZodString,coerce:t?.coerce??!1,...ll(t)});QJ=class t extends ul{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==At.number){let a=this._getOrReturnCtx(e);return Vt(a,{code:qe.invalid_type,expected:At.number,received:a.parsedType}),pI}let l,n=new Yi;for(let a of this._def.checks)a.kind==="int"?fl.isInteger(e.data)||(l=this._getOrReturnCtx(e,l),Vt(l,{code:qe.invalid_type,expected:"integer",received:"float",message:a.message}),n.dirty()):a.kind==="min"?(a.inclusive?e.dataa.value:e.data>=a.value)&&(l=this._getOrReturnCtx(e,l),Vt(l,{code:qe.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="multipleOf"?c4I(e.data,a.value)!==0&&(l=this._getOrReturnCtx(e,l),Vt(l,{code:qe.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(l=this._getOrReturnCtx(e,l),Vt(l,{code:qe.not_finite,message:a.message}),n.dirty()):fl.assertNever(a);return{status:n.value,value:e.data}}gte(e,I){return this.setLimit("min",e,!0,Dt.toString(I))}gt(e,I){return this.setLimit("min",e,!1,Dt.toString(I))}lte(e,I){return this.setLimit("max",e,!0,Dt.toString(I))}lt(e,I){return this.setLimit("max",e,!1,Dt.toString(I))}setLimit(e,I,l,n){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:I,inclusive:l,message:Dt.toString(n)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Dt.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Dt.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Dt.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Dt.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Dt.toString(e)})}multipleOf(e,I){return this._addCheck({kind:"multipleOf",value:e,message:Dt.toString(I)})}finite(e){return this._addCheck({kind:"finite",message:Dt.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Dt.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Dt.toString(e)})}get minValue(){let e=null;for(let I of this._def.checks)I.kind==="min"&&(e===null||I.value>e)&&(e=I.value);return e}get maxValue(){let e=null;for(let I of this._def.checks)I.kind==="max"&&(e===null||I.valuee.kind==="int"||e.kind==="multipleOf"&&fl.isInteger(e.value))}get isFinite(){let e=null,I=null;for(let l of this._def.checks){if(l.kind==="finite"||l.kind==="int"||l.kind==="multipleOf")return!0;l.kind==="min"?(I===null||l.value>I)&&(I=l.value):l.kind==="max"&&(e===null||l.valuenew QJ({checks:[],typeName:Fe.ZodNumber,coerce:t?.coerce||!1,...ll(t)});fJ=class t extends ul{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==At.bigint)return this._getInvalidInput(e);let l,n=new Yi;for(let a of this._def.checks)a.kind==="min"?(a.inclusive?e.dataa.value:e.data>=a.value)&&(l=this._getOrReturnCtx(e,l),Vt(l,{code:qe.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(l=this._getOrReturnCtx(e,l),Vt(l,{code:qe.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):fl.assertNever(a);return{status:n.value,value:e.data}}_getInvalidInput(e){let I=this._getOrReturnCtx(e);return Vt(I,{code:qe.invalid_type,expected:At.bigint,received:I.parsedType}),pI}gte(e,I){return this.setLimit("min",e,!0,Dt.toString(I))}gt(e,I){return this.setLimit("min",e,!1,Dt.toString(I))}lte(e,I){return this.setLimit("max",e,!0,Dt.toString(I))}lt(e,I){return this.setLimit("max",e,!1,Dt.toString(I))}setLimit(e,I,l,n){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:I,inclusive:l,message:Dt.toString(n)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Dt.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Dt.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Dt.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Dt.toString(e)})}multipleOf(e,I){return this._addCheck({kind:"multipleOf",value:e,message:Dt.toString(I)})}get minValue(){let e=null;for(let I of this._def.checks)I.kind==="min"&&(e===null||I.value>e)&&(e=I.value);return e}get maxValue(){let e=null;for(let I of this._def.checks)I.kind==="max"&&(e===null||I.valuenew fJ({checks:[],typeName:Fe.ZodBigInt,coerce:t?.coerce??!1,...ll(t)});EJ=class extends ul{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==At.boolean){let l=this._getOrReturnCtx(e);return Vt(l,{code:qe.invalid_type,expected:At.boolean,received:l.parsedType}),pI}return nG(e.data)}};EJ.create=t=>new EJ({typeName:Fe.ZodBoolean,coerce:t?.coerce||!1,...ll(t)});JJ=class t extends ul{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==At.date){let a=this._getOrReturnCtx(e);return Vt(a,{code:qe.invalid_type,expected:At.date,received:a.parsedType}),pI}if(Number.isNaN(e.data.getTime())){let a=this._getOrReturnCtx(e);return Vt(a,{code:qe.invalid_date}),pI}let l=new Yi,n;for(let a of this._def.checks)a.kind==="min"?e.data.getTime()a.value&&(n=this._getOrReturnCtx(e,n),Vt(n,{code:qe.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),l.dirty()):fl.assertNever(a);return{status:l.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,I){return this._addCheck({kind:"min",value:e.getTime(),message:Dt.toString(I)})}max(e,I){return this._addCheck({kind:"max",value:e.getTime(),message:Dt.toString(I)})}get minDate(){let e=null;for(let I of this._def.checks)I.kind==="min"&&(e===null||I.value>e)&&(e=I.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let I of this._def.checks)I.kind==="max"&&(e===null||I.valuenew JJ({checks:[],coerce:t?.coerce||!1,typeName:Fe.ZodDate,...ll(t)});Ux=class extends ul{_parse(e){if(this._getType(e)!==At.symbol){let l=this._getOrReturnCtx(e);return Vt(l,{code:qe.invalid_type,expected:At.symbol,received:l.parsedType}),pI}return nG(e.data)}};Ux.create=t=>new Ux({typeName:Fe.ZodSymbol,...ll(t)});CJ=class extends ul{_parse(e){if(this._getType(e)!==At.undefined){let l=this._getOrReturnCtx(e);return Vt(l,{code:qe.invalid_type,expected:At.undefined,received:l.parsedType}),pI}return nG(e.data)}};CJ.create=t=>new CJ({typeName:Fe.ZodUndefined,...ll(t)});LJ=class extends ul{_parse(e){if(this._getType(e)!==At.null){let l=this._getOrReturnCtx(e);return Vt(l,{code:qe.invalid_type,expected:At.null,received:l.parsedType}),pI}return nG(e.data)}};LJ.create=t=>new LJ({typeName:Fe.ZodNull,...ll(t)});_H=class extends ul{constructor(){super(...arguments),this._any=!0}_parse(e){return nG(e.data)}};_H.create=t=>new _H({typeName:Fe.ZodAny,...ll(t)});HX=class extends ul{constructor(){super(...arguments),this._unknown=!0}_parse(e){return nG(e.data)}};HX.create=t=>new HX({typeName:Fe.ZodUnknown,...ll(t)});SR=class extends ul{_parse(e){let I=this._getOrReturnCtx(e);return Vt(I,{code:qe.invalid_type,expected:At.never,received:I.parsedType}),pI}};SR.create=t=>new SR({typeName:Fe.ZodNever,...ll(t)});Ox=class extends ul{_parse(e){if(this._getType(e)!==At.undefined){let l=this._getOrReturnCtx(e);return Vt(l,{code:qe.invalid_type,expected:At.void,received:l.parsedType}),pI}return nG(e.data)}};Ox.create=t=>new Ox({typeName:Fe.ZodVoid,...ll(t)});QX=class t extends ul{_parse(e){let{ctx:I,status:l}=this._processInputParams(e),n=this._def;if(I.parsedType!==At.array)return Vt(I,{code:qe.invalid_type,expected:At.array,received:I.parsedType}),pI;if(n.exactLength!==null){let c=I.data.length>n.exactLength.value,r=I.data.lengthn.maxLength.value&&(Vt(I,{code:qe.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),l.dirty()),I.common.async)return Promise.all([...I.data].map((c,r)=>n.type._parseAsync(new vp(I,c,I.path,r)))).then(c=>Yi.mergeArray(l,c));let a=[...I.data].map((c,r)=>n.type._parseSync(new vp(I,c,I.path,r)));return Yi.mergeArray(l,a)}get element(){return this._def.type}min(e,I){return new t({...this._def,minLength:{value:e,message:Dt.toString(I)}})}max(e,I){return new t({...this._def,maxLength:{value:e,message:Dt.toString(I)}})}length(e,I){return new t({...this._def,exactLength:{value:e,message:Dt.toString(I)}})}nonempty(e){return this.min(1,e)}};QX.create=(t,e)=>new QX({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Fe.ZodArray,...ll(e)});Ub=class t extends ul{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),I=fl.objectKeys(e);return this._cached={shape:e,keys:I},this._cached}_parse(e){if(this._getType(e)!==At.object){let i=this._getOrReturnCtx(e);return Vt(i,{code:qe.invalid_type,expected:At.object,received:i.parsedType}),pI}let{status:l,ctx:n}=this._processInputParams(e),{shape:a,keys:c}=this._getCached(),r=[];if(!(this._def.catchall instanceof SR&&this._def.unknownKeys==="strip"))for(let i in n.data)c.includes(i)||r.push(i);let s=[];for(let i of c){let G=a[i],d=n.data[i];s.push({key:{status:"valid",value:i},value:G._parse(new vp(n,d,n.path,i)),alwaysSet:i in n.data})}if(this._def.catchall instanceof SR){let i=this._def.unknownKeys;if(i==="passthrough")for(let G of r)s.push({key:{status:"valid",value:G},value:{status:"valid",value:n.data[G]}});else if(i==="strict")r.length>0&&(Vt(n,{code:qe.unrecognized_keys,keys:r}),l.dirty());else if(i!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let i=this._def.catchall;for(let G of r){let d=n.data[G];s.push({key:{status:"valid",value:G},value:i._parse(new vp(n,d,n.path,G)),alwaysSet:G in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let i=[];for(let G of s){let d=await G.key,u=await G.value;i.push({key:d,value:u,alwaysSet:G.alwaysSet})}return i}).then(i=>Yi.mergeObjectSync(l,i)):Yi.mergeObjectSync(l,s)}get shape(){return this._def.shape()}strict(e){return Dt.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(I,l)=>{let n=this._def.errorMap?.(I,l).message??l.defaultError;return I.code==="unrecognized_keys"?{message:Dt.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Fe.ZodObject})}setKey(e,I){return this.augment({[e]:I})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let I={};for(let l of fl.objectKeys(e))e[l]&&this.shape[l]&&(I[l]=this.shape[l]);return new t({...this._def,shape:()=>I})}omit(e){let I={};for(let l of fl.objectKeys(this.shape))e[l]||(I[l]=this.shape[l]);return new t({...this._def,shape:()=>I})}deepPartial(){return jx(this)}partial(e){let I={};for(let l of fl.objectKeys(this.shape)){let n=this.shape[l];e&&!e[l]?I[l]=n:I[l]=n.optional()}return new t({...this._def,shape:()=>I})}required(e){let I={};for(let l of fl.objectKeys(this.shape))if(e&&!e[l])I[l]=this.shape[l];else{let a=this.shape[l];for(;a instanceof gp;)a=a._def.innerType;I[l]=a}return new t({...this._def,shape:()=>I})}keyof(){return eGt(fl.objectKeys(this.shape))}};Ub.create=(t,e)=>new Ub({shape:()=>t,unknownKeys:"strip",catchall:SR.create(),typeName:Fe.ZodObject,...ll(e)});Ub.strictCreate=(t,e)=>new Ub({shape:()=>t,unknownKeys:"strict",catchall:SR.create(),typeName:Fe.ZodObject,...ll(e)});Ub.lazycreate=(t,e)=>new Ub({shape:t,unknownKeys:"strip",catchall:SR.create(),typeName:Fe.ZodObject,...ll(e)});kJ=class extends ul{_parse(e){let{ctx:I}=this._processInputParams(e),l=this._def.options;function n(a){for(let r of a)if(r.result.status==="valid")return r.result;for(let r of a)if(r.result.status==="dirty")return I.common.issues.push(...r.ctx.common.issues),r.result;let c=a.map(r=>new jb(r.ctx.common.issues));return Vt(I,{code:qe.invalid_union,unionErrors:c}),pI}if(I.common.async)return Promise.all(l.map(async a=>{let c={...I,common:{...I.common,issues:[]},parent:null};return{result:await a._parseAsync({data:I.data,path:I.path,parent:c}),ctx:c}})).then(n);{let a,c=[];for(let s of l){let i={...I,common:{...I.common,issues:[]},parent:null},G=s._parseSync({data:I.data,path:I.path,parent:i});if(G.status==="valid")return G;G.status==="dirty"&&!a&&(a={result:G,ctx:i}),i.common.issues.length&&c.push(i.common.issues)}if(a)return I.common.issues.push(...a.ctx.common.issues),a.result;let r=c.map(s=>new jb(s));return Vt(I,{code:qe.invalid_union,unionErrors:r}),pI}}get options(){return this._def.options}};kJ.create=(t,e)=>new kJ({options:t,typeName:Fe.ZodUnion,...ll(e)});wX=t=>t instanceof jJ?wX(t.schema):t instanceof yp?wX(t.innerType()):t instanceof UJ?[t.value]:t instanceof OJ?t.options:t instanceof zJ?fl.objectValues(t.enum):t instanceof BJ?wX(t._def.innerType):t instanceof CJ?[void 0]:t instanceof LJ?[null]:t instanceof gp?[void 0,...wX(t.unwrap())]:t instanceof _A?[null,...wX(t.unwrap())]:t instanceof r_||t instanceof SJ?wX(t.unwrap()):t instanceof MJ?wX(t._def.innerType):[],zae=class t extends ul{_parse(e){let{ctx:I}=this._processInputParams(e);if(I.parsedType!==At.object)return Vt(I,{code:qe.invalid_type,expected:At.object,received:I.parsedType}),pI;let l=this.discriminator,n=I.data[l],a=this.optionsMap.get(n);return a?I.common.async?a._parseAsync({data:I.data,path:I.path,parent:I}):a._parseSync({data:I.data,path:I.path,parent:I}):(Vt(I,{code:qe.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[l]}),pI)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,I,l){let n=new Map;for(let a of I){let c=wX(a.shape[e]);if(!c.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let r of c){if(n.has(r))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(r)}`);n.set(r,a)}}return new t({typeName:Fe.ZodDiscriminatedUnion,discriminator:e,options:I,optionsMap:n,...ll(l)})}};xJ=class extends ul{_parse(e){let{status:I,ctx:l}=this._processInputParams(e),n=(a,c)=>{if(Uae(a)||Uae(c))return pI;let r=rQe(a.value,c.value);return r.valid?((Oae(a)||Oae(c))&&I.dirty(),{status:I.value,value:r.data}):(Vt(l,{code:qe.invalid_intersection_types}),pI)};return l.common.async?Promise.all([this._def.left._parseAsync({data:l.data,path:l.path,parent:l}),this._def.right._parseAsync({data:l.data,path:l.path,parent:l})]).then(([a,c])=>n(a,c)):n(this._def.left._parseSync({data:l.data,path:l.path,parent:l}),this._def.right._parseSync({data:l.data,path:l.path,parent:l}))}};xJ.create=(t,e,I)=>new xJ({left:t,right:e,typeName:Fe.ZodIntersection,...ll(I)});TA=class t extends ul{_parse(e){let{status:I,ctx:l}=this._processInputParams(e);if(l.parsedType!==At.array)return Vt(l,{code:qe.invalid_type,expected:At.array,received:l.parsedType}),pI;if(l.data.lengththis._def.items.length&&(Vt(l,{code:qe.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),I.dirty());let a=[...l.data].map((c,r)=>{let s=this._def.items[r]||this._def.rest;return s?s._parse(new vp(l,c,l.path,r)):null}).filter(c=>!!c);return l.common.async?Promise.all(a).then(c=>Yi.mergeArray(I,c)):Yi.mergeArray(I,a)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};TA.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new TA({items:t,typeName:Fe.ZodTuple,rest:null,...ll(e)})};Bae=class t extends ul{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:I,ctx:l}=this._processInputParams(e);if(l.parsedType!==At.object)return Vt(l,{code:qe.invalid_type,expected:At.object,received:l.parsedType}),pI;let n=[],a=this._def.keyType,c=this._def.valueType;for(let r in l.data)n.push({key:a._parse(new vp(l,r,l.path,r)),value:c._parse(new vp(l,l.data[r],l.path,r)),alwaysSet:r in l.data});return l.common.async?Yi.mergeObjectAsync(I,n):Yi.mergeObjectSync(I,n)}get element(){return this._def.valueType}static create(e,I,l){return I instanceof ul?new t({keyType:e,valueType:I,typeName:Fe.ZodRecord,...ll(l)}):new t({keyType:TH.create(),valueType:e,typeName:Fe.ZodRecord,...ll(I)})}},zx=class extends ul{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:I,ctx:l}=this._processInputParams(e);if(l.parsedType!==At.map)return Vt(l,{code:qe.invalid_type,expected:At.map,received:l.parsedType}),pI;let n=this._def.keyType,a=this._def.valueType,c=[...l.data.entries()].map(([r,s],i)=>({key:n._parse(new vp(l,r,l.path,[i,"key"])),value:a._parse(new vp(l,s,l.path,[i,"value"]))}));if(l.common.async){let r=new Map;return Promise.resolve().then(async()=>{for(let s of c){let i=await s.key,G=await s.value;if(i.status==="aborted"||G.status==="aborted")return pI;(i.status==="dirty"||G.status==="dirty")&&I.dirty(),r.set(i.value,G.value)}return{status:I.value,value:r}})}else{let r=new Map;for(let s of c){let i=s.key,G=s.value;if(i.status==="aborted"||G.status==="aborted")return pI;(i.status==="dirty"||G.status==="dirty")&&I.dirty(),r.set(i.value,G.value)}return{status:I.value,value:r}}}};zx.create=(t,e,I)=>new zx({valueType:e,keyType:t,typeName:Fe.ZodMap,...ll(I)});Bx=class t extends ul{_parse(e){let{status:I,ctx:l}=this._processInputParams(e);if(l.parsedType!==At.set)return Vt(l,{code:qe.invalid_type,expected:At.set,received:l.parsedType}),pI;let n=this._def;n.minSize!==null&&l.data.sizen.maxSize.value&&(Vt(l,{code:qe.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),I.dirty());let a=this._def.valueType;function c(s){let i=new Set;for(let G of s){if(G.status==="aborted")return pI;G.status==="dirty"&&I.dirty(),i.add(G.value)}return{status:I.value,value:i}}let r=[...l.data.values()].map((s,i)=>a._parse(new vp(l,s,l.path,i)));return l.common.async?Promise.all(r).then(s=>c(s)):c(r)}min(e,I){return new t({...this._def,minSize:{value:e,message:Dt.toString(I)}})}max(e,I){return new t({...this._def,maxSize:{value:e,message:Dt.toString(I)}})}size(e,I){return this.min(e,I).max(e,I)}nonempty(e){return this.min(1,e)}};Bx.create=(t,e)=>new Bx({valueType:t,minSize:null,maxSize:null,typeName:Fe.ZodSet,...ll(e)});Mae=class t extends ul{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:I}=this._processInputParams(e);if(I.parsedType!==At.function)return Vt(I,{code:qe.invalid_type,expected:At.function,received:I.parsedType}),pI;function l(r,s){return c_({data:r,path:I.path,errorMaps:[I.common.contextualErrorMap,I.schemaErrorMap,kx(),yX].filter(i=>!!i),issueData:{code:qe.invalid_arguments,argumentsError:s}})}function n(r,s){return c_({data:r,path:I.path,errorMaps:[I.common.contextualErrorMap,I.schemaErrorMap,kx(),yX].filter(i=>!!i),issueData:{code:qe.invalid_return_type,returnTypeError:s}})}let a={errorMap:I.common.contextualErrorMap},c=I.data;if(this._def.returns instanceof KH){let r=this;return nG(async function(...s){let i=new jb([]),G=await r._def.args.parseAsync(s,a).catch(b=>{throw i.addIssue(l(s,b)),i}),d=await Reflect.apply(c,this,G);return await r._def.returns._def.type.parseAsync(d,a).catch(b=>{throw i.addIssue(n(d,b)),i})})}else{let r=this;return nG(function(...s){let i=r._def.args.safeParse(s,a);if(!i.success)throw new jb([l(s,i.error)]);let G=Reflect.apply(c,this,i.data),d=r._def.returns.safeParse(G,a);if(!d.success)throw new jb([n(G,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:TA.create(e).rest(HX.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,I,l){return new t({args:e||TA.create([]).rest(HX.create()),returns:I||HX.create(),typeName:Fe.ZodFunction,...ll(l)})}},jJ=class extends ul{get schema(){return this._def.getter()}_parse(e){let{ctx:I}=this._processInputParams(e);return this._def.getter()._parse({data:I.data,path:I.path,parent:I})}};jJ.create=(t,e)=>new jJ({getter:t,typeName:Fe.ZodLazy,...ll(e)});UJ=class extends ul{_parse(e){if(e.data!==this._def.value){let I=this._getOrReturnCtx(e);return Vt(I,{received:I.data,code:qe.invalid_literal,expected:this._def.value}),pI}return{status:"valid",value:e.data}}get value(){return this._def.value}};UJ.create=(t,e)=>new UJ({value:t,typeName:Fe.ZodLiteral,...ll(e)});OJ=class t extends ul{_parse(e){if(typeof e.data!="string"){let I=this._getOrReturnCtx(e),l=this._def.values;return Vt(I,{expected:fl.joinValues(l),received:I.parsedType,code:qe.invalid_type}),pI}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let I=this._getOrReturnCtx(e),l=this._def.values;return Vt(I,{received:I.data,code:qe.invalid_enum_value,options:l}),pI}return nG(e.data)}get options(){return this._def.values}get enum(){let e={};for(let I of this._def.values)e[I]=I;return e}get Values(){let e={};for(let I of this._def.values)e[I]=I;return e}get Enum(){let e={};for(let I of this._def.values)e[I]=I;return e}extract(e,I=this._def){return t.create(e,{...this._def,...I})}exclude(e,I=this._def){return t.create(this.options.filter(l=>!e.includes(l)),{...this._def,...I})}};OJ.create=eGt;zJ=class extends ul{_parse(e){let I=fl.getValidEnumValues(this._def.values),l=this._getOrReturnCtx(e);if(l.parsedType!==At.string&&l.parsedType!==At.number){let n=fl.objectValues(I);return Vt(l,{expected:fl.joinValues(n),received:l.parsedType,code:qe.invalid_type}),pI}if(this._cache||(this._cache=new Set(fl.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let n=fl.objectValues(I);return Vt(l,{received:l.data,code:qe.invalid_enum_value,options:n}),pI}return nG(e.data)}get enum(){return this._def.values}};zJ.create=(t,e)=>new zJ({values:t,typeName:Fe.ZodNativeEnum,...ll(e)});KH=class extends ul{unwrap(){return this._def.type}_parse(e){let{ctx:I}=this._processInputParams(e);if(I.parsedType!==At.promise&&I.common.async===!1)return Vt(I,{code:qe.invalid_type,expected:At.promise,received:I.parsedType}),pI;let l=I.parsedType===At.promise?I.data:Promise.resolve(I.data);return nG(l.then(n=>this._def.type.parseAsync(n,{path:I.path,errorMap:I.common.contextualErrorMap})))}};KH.create=(t,e)=>new KH({type:t,typeName:Fe.ZodPromise,...ll(e)});yp=class extends ul{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Fe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:I,ctx:l}=this._processInputParams(e),n=this._def.effect||null,a={addIssue:c=>{Vt(l,c),c.fatal?I.abort():I.dirty()},get path(){return l.path}};if(a.addIssue=a.addIssue.bind(a),n.type==="preprocess"){let c=n.transform(l.data,a);if(l.common.async)return Promise.resolve(c).then(async r=>{if(I.value==="aborted")return pI;let s=await this._def.schema._parseAsync({data:r,path:l.path,parent:l});return s.status==="aborted"?pI:s.status==="dirty"?HJ(s.value):I.value==="dirty"?HJ(s.value):s});{if(I.value==="aborted")return pI;let r=this._def.schema._parseSync({data:c,path:l.path,parent:l});return r.status==="aborted"?pI:r.status==="dirty"?HJ(r.value):I.value==="dirty"?HJ(r.value):r}}if(n.type==="refinement"){let c=r=>{let s=n.refinement(r,a);if(l.common.async)return Promise.resolve(s);if(s instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return r};if(l.common.async===!1){let r=this._def.schema._parseSync({data:l.data,path:l.path,parent:l});return r.status==="aborted"?pI:(r.status==="dirty"&&I.dirty(),c(r.value),{status:I.value,value:r.value})}else return this._def.schema._parseAsync({data:l.data,path:l.path,parent:l}).then(r=>r.status==="aborted"?pI:(r.status==="dirty"&&I.dirty(),c(r.value).then(()=>({status:I.value,value:r.value}))))}if(n.type==="transform")if(l.common.async===!1){let c=this._def.schema._parseSync({data:l.data,path:l.path,parent:l});if(!SH(c))return pI;let r=n.transform(c.value,a);if(r instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:I.value,value:r}}else return this._def.schema._parseAsync({data:l.data,path:l.path,parent:l}).then(c=>SH(c)?Promise.resolve(n.transform(c.value,a)).then(r=>({status:I.value,value:r})):pI);fl.assertNever(n)}};yp.create=(t,e,I)=>new yp({schema:t,typeName:Fe.ZodEffects,effect:e,...ll(I)});yp.createWithPreprocess=(t,e,I)=>new yp({schema:e,effect:{type:"preprocess",transform:t},typeName:Fe.ZodEffects,...ll(I)});gp=class extends ul{_parse(e){return this._getType(e)===At.undefined?nG(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};gp.create=(t,e)=>new gp({innerType:t,typeName:Fe.ZodOptional,...ll(e)});_A=class extends ul{_parse(e){return this._getType(e)===At.null?nG(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};_A.create=(t,e)=>new _A({innerType:t,typeName:Fe.ZodNullable,...ll(e)});BJ=class extends ul{_parse(e){let{ctx:I}=this._processInputParams(e),l=I.data;return I.parsedType===At.undefined&&(l=this._def.defaultValue()),this._def.innerType._parse({data:l,path:I.path,parent:I})}removeDefault(){return this._def.innerType}};BJ.create=(t,e)=>new BJ({innerType:t,typeName:Fe.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...ll(e)});MJ=class extends ul{_parse(e){let{ctx:I}=this._processInputParams(e),l={...I,common:{...I.common,issues:[]}},n=this._def.innerType._parse({data:l.data,path:l.path,parent:{...l}});return xx(n)?n.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new jb(l.common.issues)},input:l.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new jb(l.common.issues)},input:l.data})}}removeCatch(){return this._def.innerType}};MJ.create=(t,e)=>new MJ({innerType:t,typeName:Fe.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...ll(e)});Mx=class extends ul{_parse(e){if(this._getType(e)!==At.nan){let l=this._getOrReturnCtx(e);return Vt(l,{code:qe.invalid_type,expected:At.nan,received:l.parsedType}),pI}return{status:"valid",value:e.data}}};Mx.create=t=>new Mx({typeName:Fe.ZodNaN,...ll(t)});r4I=Symbol("zod_brand"),r_=class extends ul{_parse(e){let{ctx:I}=this._processInputParams(e),l=I.data;return this._def.type._parse({data:l,path:I.path,parent:I})}unwrap(){return this._def.type}},s_=class t extends ul{_parse(e){let{status:I,ctx:l}=this._processInputParams(e);if(l.common.async)return(async()=>{let a=await this._def.in._parseAsync({data:l.data,path:l.path,parent:l});return a.status==="aborted"?pI:a.status==="dirty"?(I.dirty(),HJ(a.value)):this._def.out._parseAsync({data:a.value,path:l.path,parent:l})})();{let n=this._def.in._parseSync({data:l.data,path:l.path,parent:l});return n.status==="aborted"?pI:n.status==="dirty"?(I.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:l.path,parent:l})}}static create(e,I){return new t({in:e,out:I,typeName:Fe.ZodPipeline})}},SJ=class extends ul{_parse(e){let I=this._def.innerType._parse(e),l=n=>(SH(n)&&(n.value=Object.freeze(n.value)),n);return xx(I)?I.then(n=>l(n)):l(I)}unwrap(){return this._def.innerType}};SJ.create=(t,e)=>new SJ({innerType:t,typeName:Fe.ZodReadonly,...ll(e)});s4I={object:Ub.lazycreate};(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Fe||(Fe={}));o4I=(t,e={message:`Input not instance of ${t.name}`})=>tGt(I=>I instanceof t,e),IGt=TH.create,lGt=QJ.create,i4I=Mx.create,G4I=fJ.create,nGt=EJ.create,d4I=JJ.create,u4I=Ux.create,b4I=CJ.create,m4I=LJ.create,Z4I=_H.create,p4I=HX.create,h4I=SR.create,W4I=Ox.create,N4I=QX.create,V4I=Ub.create,Y4I=Ub.strictCreate,R4I=kJ.create,A4I=zae.create,F4I=xJ.create,X4I=TA.create,g4I=Bae.create,v4I=zx.create,y4I=Bx.create,w4I=Mae.create,H4I=jJ.create,Q4I=UJ.create,f4I=OJ.create,E4I=zJ.create,J4I=KH.create,C4I=yp.create,L4I=gp.create,k4I=_A.create,x4I=yp.createWithPreprocess,j4I=s_.create,U4I=()=>IGt().optional(),O4I=()=>lGt().optional(),z4I=()=>nGt().optional(),B4I={string:t=>TH.create({...t,coerce:!0}),number:t=>QJ.create({...t,coerce:!0}),boolean:t=>EJ.create({...t,coerce:!0}),bigint:t=>fJ.create({...t,coerce:!0}),date:t=>JJ.create({...t,coerce:!0})},M4I=pI});var ie={};tr(ie,{BRAND:()=>r4I,DIRTY:()=>HJ,EMPTY_PATH:()=>xkI,INVALID:()=>pI,NEVER:()=>M4I,OK:()=>nG,ParseStatus:()=>Yi,Schema:()=>ul,ZodAny:()=>_H,ZodArray:()=>QX,ZodBigInt:()=>fJ,ZodBoolean:()=>EJ,ZodBranded:()=>r_,ZodCatch:()=>MJ,ZodDate:()=>JJ,ZodDefault:()=>BJ,ZodDiscriminatedUnion:()=>zae,ZodEffects:()=>yp,ZodEnum:()=>OJ,ZodError:()=>jb,ZodFirstPartyTypeKind:()=>Fe,ZodFunction:()=>Mae,ZodIntersection:()=>xJ,ZodIssueCode:()=>qe,ZodLazy:()=>jJ,ZodLiteral:()=>UJ,ZodMap:()=>zx,ZodNaN:()=>Mx,ZodNativeEnum:()=>zJ,ZodNever:()=>SR,ZodNull:()=>LJ,ZodNullable:()=>_A,ZodNumber:()=>QJ,ZodObject:()=>Ub,ZodOptional:()=>gp,ZodParsedType:()=>At,ZodPipeline:()=>s_,ZodPromise:()=>KH,ZodReadonly:()=>SJ,ZodRecord:()=>Bae,ZodSchema:()=>ul,ZodSet:()=>Bx,ZodString:()=>TH,ZodSymbol:()=>Ux,ZodTransformer:()=>yp,ZodTuple:()=>TA,ZodType:()=>ul,ZodUndefined:()=>CJ,ZodUnion:()=>kJ,ZodUnknown:()=>HX,ZodVoid:()=>Ox,addIssueToContext:()=>Vt,any:()=>Z4I,array:()=>N4I,bigint:()=>G4I,boolean:()=>nGt,coerce:()=>B4I,custom:()=>tGt,date:()=>d4I,datetimeRegex:()=>$it,defaultErrorMap:()=>yX,discriminatedUnion:()=>A4I,effect:()=>C4I,enum:()=>f4I,function:()=>w4I,getErrorMap:()=>kx,getParsedType:()=>SA,instanceof:()=>o4I,intersection:()=>F4I,isAborted:()=>Uae,isAsync:()=>xx,isDirty:()=>Oae,isValid:()=>SH,late:()=>s4I,lazy:()=>H4I,literal:()=>Q4I,makeIssue:()=>c_,map:()=>v4I,nan:()=>i4I,nativeEnum:()=>E4I,never:()=>h4I,null:()=>m4I,nullable:()=>k4I,number:()=>lGt,object:()=>V4I,objectUtil:()=>lQe,oboolean:()=>z4I,onumber:()=>O4I,optional:()=>L4I,ostring:()=>U4I,pipeline:()=>j4I,preprocess:()=>x4I,promise:()=>J4I,quotelessJson:()=>CkI,record:()=>g4I,set:()=>y4I,setErrorMap:()=>kkI,strictObject:()=>Y4I,string:()=>IGt,symbol:()=>u4I,transformer:()=>C4I,tuple:()=>X4I,undefined:()=>b4I,union:()=>R4I,unknown:()=>p4I,util:()=>fl,void:()=>W4I});var o_=g(()=>{o();jae();aQe();Tit();a_();aGt();xae()});var Fc=g(()=>{o();o_();o_()});function cGt(t,e){let I={type:"array"};return t.type?._def&&t.type?._def?.typeName!==Fe.ZodAny&&(I.items=FI(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&Sl(I,"minItems",t.minLength.value,t.minLength.message,e),t.maxLength&&Sl(I,"maxItems",t.maxLength.value,t.maxLength.message,e),t.exactLength&&(Sl(I,"minItems",t.exactLength.value,t.exactLength.message,e),Sl(I,"maxItems",t.exactLength.value,t.exactLength.message,e)),I}var sQe=g(()=>{o();MH();Zs();Fc()});function rGt(t,e){let I={type:"integer",format:"int64"};if(!t.checks)return I;for(let l of t.checks)switch(l.kind){case"min":e.target==="jsonSchema7"?l.inclusive?Sl(I,"minimum",l.value,l.message,e):Sl(I,"exclusiveMinimum",l.value,l.message,e):(l.inclusive||(I.exclusiveMinimum=!0),Sl(I,"minimum",l.value,l.message,e));break;case"max":e.target==="jsonSchema7"?l.inclusive?Sl(I,"maximum",l.value,l.message,e):Sl(I,"exclusiveMaximum",l.value,l.message,e):(l.inclusive||(I.exclusiveMaximum=!0),Sl(I,"maximum",l.value,l.message,e));break;case"multipleOf":Sl(I,"multipleOf",l.value,l.message,e);break}return I}var oQe=g(()=>{o();MH()});function sGt(){return{type:"boolean"}}var iQe=g(()=>{o()});function Sae(t,e){return FI(t.type._def,e)}var Tae=g(()=>{o();Zs()});var oGt,GQe=g(()=>{o();Zs();oGt=(t,e)=>FI(t.innerType._def,e)});function dQe(t,e,I){let l=I??e.dateStrategy;if(Array.isArray(l))return{anyOf:l.map(n=>dQe(t,e,n))};switch(l){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return S4I(t,e)}}var S4I,uQe=g(()=>{o();MH();S4I=(t,e)=>{let I={type:"integer",format:"unix-time"};if(e.target==="openApi3")return I;for(let l of t.checks)switch(l.kind){case"min":Sl(I,"minimum",l.value,l.message,e);break;case"max":Sl(I,"maximum",l.value,l.message,e);break}return I}});function iGt(t,e){return{...FI(t.innerType._def,e),default:t.defaultValue()}}var bQe=g(()=>{o();Zs()});function GGt(t,e){return e.effectStrategy==="input"?FI(t.schema._def,e):Ac(e)}var mQe=g(()=>{o();Xp();Zs()});function dGt(t){return{type:"string",enum:Array.from(t.values)}}var ZQe=g(()=>{o()});function uGt(t,e){let I=[FI(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),FI(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(a=>!!a),l=e.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0,n=[];return I.forEach(a=>{if(T4I(a))n.push(...a.allOf),a.unevaluatedProperties===void 0&&(l=void 0);else{let c=a;if("additionalProperties"in a&&a.additionalProperties===!1){let{additionalProperties:r,...s}=a;c=s}else l=void 0;n.push(c)}}),n.length?{allOf:n,...l}:void 0}var T4I,pQe=g(()=>{o();Zs();T4I=t=>"type"in t&&t.type==="string"?!1:"allOf"in t});function bGt(t,e){let I=typeof t.value;return I!=="bigint"&&I!=="number"&&I!=="boolean"&&I!=="string"?{type:Array.isArray(t.value)?"array":"object"}:e.target==="openApi3"?{type:I==="bigint"?"integer":I,enum:[t.value]}:{type:I==="bigint"?"integer":I,const:t.value}}var hQe=g(()=>{o()});function _ae(t,e){let I={type:"string"};if(t.checks)for(let l of t.checks)switch(l.kind){case"min":Sl(I,"minLength",typeof I.minLength=="number"?Math.max(I.minLength,l.value):l.value,l.message,e);break;case"max":Sl(I,"maxLength",typeof I.maxLength=="number"?Math.min(I.maxLength,l.value):l.value,l.message,e);break;case"email":switch(e.emailStrategy){case"format:email":_R(I,"email",l.message,e);break;case"format:idn-email":_R(I,"idn-email",l.message,e);break;case"pattern:zod":_u(I,TR.email,l.message,e);break}break;case"url":_R(I,"uri",l.message,e);break;case"uuid":_R(I,"uuid",l.message,e);break;case"regex":_u(I,l.regex,l.message,e);break;case"cuid":_u(I,TR.cuid,l.message,e);break;case"cuid2":_u(I,TR.cuid2,l.message,e);break;case"startsWith":_u(I,RegExp(`^${NQe(l.value,e)}`),l.message,e);break;case"endsWith":_u(I,RegExp(`${NQe(l.value,e)}$`),l.message,e);break;case"datetime":_R(I,"date-time",l.message,e);break;case"date":_R(I,"date",l.message,e);break;case"time":_R(I,"time",l.message,e);break;case"duration":_R(I,"duration",l.message,e);break;case"length":Sl(I,"minLength",typeof I.minLength=="number"?Math.max(I.minLength,l.value):l.value,l.message,e),Sl(I,"maxLength",typeof I.maxLength=="number"?Math.min(I.maxLength,l.value):l.value,l.message,e);break;case"includes":_u(I,RegExp(NQe(l.value,e)),l.message,e);break;case"ip":l.version!=="v6"&&_R(I,"ipv4",l.message,e),l.version!=="v4"&&_R(I,"ipv6",l.message,e);break;case"base64url":_u(I,TR.base64url,l.message,e);break;case"jwt":_u(I,TR.jwt,l.message,e);break;case"cidr":l.version!=="v6"&&_u(I,TR.ipv4Cidr,l.message,e),l.version!=="v4"&&_u(I,TR.ipv6Cidr,l.message,e);break;case"emoji":_u(I,TR.emoji(),l.message,e);break;case"ulid":_u(I,TR.ulid,l.message,e);break;case"base64":switch(e.base64Strategy){case"format:binary":_R(I,"binary",l.message,e);break;case"contentEncoding:base64":Sl(I,"contentEncoding","base64",l.message,e);break;case"pattern:zod":_u(I,TR.base64,l.message,e);break}break;case"nanoid":_u(I,TR.nanoid,l.message,e);break;case"toLowerCase":case"toUpperCase":case"trim":break;default:}return I}function NQe(t,e){return e.patternStrategy==="escape"?K4I(t):t}function K4I(t){let e="";for(let I=0;In.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format,...t.errorMessage&&l.errorMessages&&{errorMessage:{format:t.errorMessage.format}}}),delete t.format,t.errorMessage&&(delete t.errorMessage.format,Object.keys(t.errorMessage).length===0&&delete t.errorMessage)),t.anyOf.push({format:e,...I&&l.errorMessages&&{errorMessage:{format:I}}})):Sl(t,"format",e,I,l)}function _u(t,e,I,l){t.pattern||t.allOf?.some(n=>n.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern,...t.errorMessage&&l.errorMessages&&{errorMessage:{pattern:t.errorMessage.pattern}}}),delete t.pattern,t.errorMessage&&(delete t.errorMessage.pattern,Object.keys(t.errorMessage).length===0&&delete t.errorMessage)),t.allOf.push({pattern:mGt(e,l),...I&&l.errorMessages&&{errorMessage:{pattern:I}}})):Sl(t,"pattern",mGt(e,l),I,l)}function mGt(t,e){if(!e.applyRegexFlags||!t.flags)return t.source;let I={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},l=I.i?t.source.toLowerCase():t.source,n="",a=!1,c=!1,r=!1;for(let s=0;s{o();MH();TR={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(WQe===void 0&&(WQe=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),WQe),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};_4I=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789")});function Dae(t,e){if(e.target==="openAi"&&console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."),e.target==="openApi3"&&t.keyType?._def.typeName===Fe.ZodEnum)return{type:"object",required:t.keyType._def.values,properties:t.keyType._def.values.reduce((l,n)=>({...l,[n]:FI(t.valueType._def,{...e,currentPath:[...e.currentPath,"properties",n]})??Ac(e)}),{}),additionalProperties:e.rejectedAdditionalProperties};let I={type:"object",additionalProperties:FI(t.valueType._def,{...e,currentPath:[...e.currentPath,"additionalProperties"]})??e.allowedAdditionalProperties};if(e.target==="openApi3")return I;if(t.keyType?._def.typeName===Fe.ZodString&&t.keyType._def.checks?.length){let{type:l,...n}=_ae(t.keyType._def,e);return{...I,propertyNames:n}}else{if(t.keyType?._def.typeName===Fe.ZodEnum)return{...I,propertyNames:{enum:t.keyType._def.values}};if(t.keyType?._def.typeName===Fe.ZodBranded&&t.keyType._def.type._def.typeName===Fe.ZodString&&t.keyType._def.type._def.checks?.length){let{type:l,...n}=Sae(t.keyType._def,e);return{...I,propertyNames:n}}}return I}var qae=g(()=>{o();Xp();Tae();Kae();Zs();Fc()});function ZGt(t,e){return e.mapStrategy==="record"?Dae(t,e):{type:"array",maxItems:125,items:{type:"array",items:[FI(t.keyType._def,{...e,currentPath:[...e.currentPath,"items","items","0"]})||Ac(e),FI(t.valueType._def,{...e,currentPath:[...e.currentPath,"items","items","1"]})||Ac(e)],minItems:2,maxItems:2}}}var VQe=g(()=>{o();Xp();qae();Zs()});function pGt(t){let e=t.values,I=Object.keys(t.values).filter(n=>typeof e[e[n]]!="number").map(n=>e[n]),l=Array.from(new Set(I.map(n=>typeof n)));return{type:l.length===1?l[0]==="string"?"string":"number":["string","number"],enum:I}}var YQe=g(()=>{o()});function hGt(t){return t.target==="openAi"?void 0:{not:Ac({...t,currentPath:[...t.currentPath,"not"]})}}var RQe=g(()=>{o();Xp()});function WGt(t){return t.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}var AQe=g(()=>{o()});function VGt(t,e){if(e.target==="openApi3")return NGt(t,e);let I=t.options instanceof Map?Array.from(t.options.values()):t.options;if(I.every(l=>l._def.typeName in i_&&(!l._def.checks||!l._def.checks.length))){let l=I.reduce((n,a)=>{let c=i_[a._def.typeName];return c&&!n.includes(c)?[...n,c]:n},[]);return{type:l.length>1?l:l[0]}}else if(I.every(l=>l._def.typeName==="ZodLiteral"&&!l.description)){let l=I.reduce((n,a)=>{let c=typeof a._def.value;switch(c){case"string":case"number":case"boolean":return[...n,c];case"bigint":return[...n,"integer"];case"object":return a._def.value===null?[...n,"null"]:n;default:return n}},[]);if(l.length===I.length){let n=l.filter((a,c,r)=>r.indexOf(a)===c);return{type:n.length>1?n:n[0],enum:I.reduce((a,c)=>a.includes(c._def.value)?a:[...a,c._def.value],[])}}}else if(I.every(l=>l._def.typeName==="ZodEnum"))return{type:"string",enum:I.reduce((l,n)=>[...l,...n._def.values.filter(a=>!l.includes(a))],[])};return NGt(t,e)}var i_,NGt,Pae=g(()=>{o();Zs();i_={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};NGt=(t,e)=>{let I=(t.options instanceof Map?Array.from(t.options.values()):t.options).map((l,n)=>FI(l._def,{...e,currentPath:[...e.currentPath,"anyOf",`${n}`]})).filter(l=>!!l&&(!e.strictUnions||typeof l=="object"&&Object.keys(l).length>0));return I.length?{anyOf:I}:void 0}});function YGt(t,e){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(t.innerType._def.typeName)&&(!t.innerType._def.checks||!t.innerType._def.checks.length))return e.target==="openApi3"?{type:i_[t.innerType._def.typeName],nullable:!0}:{type:[i_[t.innerType._def.typeName],"null"]};if(e.target==="openApi3"){let l=FI(t.innerType._def,{...e,currentPath:[...e.currentPath]});return l&&"$ref"in l?{allOf:[l],nullable:!0}:l&&{...l,nullable:!0}}let I=FI(t.innerType._def,{...e,currentPath:[...e.currentPath,"anyOf","0"]});return I&&{anyOf:[I,{type:"null"}]}}var FQe=g(()=>{o();Pae();Zs()});function RGt(t,e){let I={type:"number"};if(!t.checks)return I;for(let l of t.checks)switch(l.kind){case"int":I.type="integer",IQe(I,"type",l.message,e);break;case"min":e.target==="jsonSchema7"?l.inclusive?Sl(I,"minimum",l.value,l.message,e):Sl(I,"exclusiveMinimum",l.value,l.message,e):(l.inclusive||(I.exclusiveMinimum=!0),Sl(I,"minimum",l.value,l.message,e));break;case"max":e.target==="jsonSchema7"?l.inclusive?Sl(I,"maximum",l.value,l.message,e):Sl(I,"exclusiveMaximum",l.value,l.message,e):(l.inclusive||(I.exclusiveMaximum=!0),Sl(I,"maximum",l.value,l.message,e));break;case"multipleOf":Sl(I,"multipleOf",l.value,l.message,e);break}return I}var XQe=g(()=>{o();MH()});function AGt(t,e){let I=e.target==="openAi",l={type:"object",properties:{}},n=[],a=t.shape();for(let r in a){let s=a[r];if(s===void 0||s._def===void 0)continue;let i=q4I(s);i&&I&&(s._def.typeName==="ZodOptional"&&(s=s._def.innerType),s.isNullable()||(s=s.nullable()),i=!1);let G=FI(s._def,{...e,currentPath:[...e.currentPath,"properties",r],propertyPath:[...e.currentPath,"properties",r]});G!==void 0&&(l.properties[r]=G,i||n.push(r))}n.length&&(l.required=n);let c=D4I(t,e);return c!==void 0&&(l.additionalProperties=c),l}function D4I(t,e){if(t.catchall._def.typeName!=="ZodNever")return FI(t.catchall._def,{...e,currentPath:[...e.currentPath,"additionalProperties"]});switch(t.unknownKeys){case"passthrough":return e.allowedAdditionalProperties;case"strict":return e.rejectedAdditionalProperties;case"strip":return e.removeAdditionalStrategy==="strict"?e.allowedAdditionalProperties:e.rejectedAdditionalProperties}}function q4I(t){try{return t.isOptional()}catch{return!0}}var gQe=g(()=>{o();Zs()});var FGt,vQe=g(()=>{o();Xp();Zs();FGt=(t,e)=>{if(e.currentPath.toString()===e.propertyPath?.toString())return FI(t.innerType._def,e);let I=FI(t.innerType._def,{...e,currentPath:[...e.currentPath,"anyOf","1"]});return I?{anyOf:[{not:Ac(e)},I]}:Ac(e)}});var XGt,yQe=g(()=>{o();Zs();XGt=(t,e)=>{if(e.pipeStrategy==="input")return FI(t.in._def,e);if(e.pipeStrategy==="output")return FI(t.out._def,e);let I=FI(t.in._def,{...e,currentPath:[...e.currentPath,"allOf","0"]});return{allOf:[I,FI(t.out._def,{...e,currentPath:[...e.currentPath,"allOf",I?"1":"0"]})].filter(l=>l!==void 0)}}});function gGt(t,e){return FI(t.type._def,e)}var wQe=g(()=>{o();Zs()});function vGt(t,e){let I={type:"array",uniqueItems:!0,items:FI(t.valueType._def,{...e,currentPath:[...e.currentPath,"items"]})};return t.minSize&&Sl(I,"minItems",t.minSize.value,t.minSize.message,e),t.maxSize&&Sl(I,"maxItems",t.maxSize.value,t.maxSize.message,e),I}var HQe=g(()=>{o();MH();Zs()});function yGt(t,e){return t.rest?{type:"array",minItems:t.items.length,items:t.items.map((I,l)=>FI(I._def,{...e,currentPath:[...e.currentPath,"items",`${l}`]})).reduce((I,l)=>l===void 0?I:[...I,l],[]),additionalItems:FI(t.rest._def,{...e,currentPath:[...e.currentPath,"additionalItems"]})}:{type:"array",minItems:t.items.length,maxItems:t.items.length,items:t.items.map((I,l)=>FI(I._def,{...e,currentPath:[...e.currentPath,"items",`${l}`]})).reduce((I,l)=>l===void 0?I:[...I,l],[])}}var QQe=g(()=>{o();Zs()});function wGt(t){return{not:Ac(t)}}var fQe=g(()=>{o();Xp()});function HGt(t){return Ac(t)}var EQe=g(()=>{o();Xp()});var QGt,JQe=g(()=>{o();Zs();QGt=(t,e)=>FI(t.innerType._def,e)});var fGt,CQe=g(()=>{o();Xp();sQe();oQe();iQe();Tae();GQe();uQe();bQe();mQe();ZQe();pQe();hQe();Kae();qae();VQe();YQe();RQe();AQe();Pae();FQe();XQe();gQe();vQe();yQe();wQe();HQe();QQe();fQe();EQe();JQe();Fc();fGt=(t,e,I)=>{switch(e){case Fe.ZodString:return _ae(t,I);case Fe.ZodNumber:return RGt(t,I);case Fe.ZodObject:return AGt(t,I);case Fe.ZodBigInt:return rGt(t,I);case Fe.ZodBoolean:return sGt();case Fe.ZodDate:return dQe(t,I);case Fe.ZodUndefined:return wGt(I);case Fe.ZodNull:return WGt(I);case Fe.ZodArray:return cGt(t,I);case Fe.ZodUnion:case Fe.ZodDiscriminatedUnion:return VGt(t,I);case Fe.ZodIntersection:return uGt(t,I);case Fe.ZodTuple:return yGt(t,I);case Fe.ZodRecord:return Dae(t,I);case Fe.ZodLiteral:return bGt(t,I);case Fe.ZodEnum:return dGt(t);case Fe.ZodNativeEnum:return pGt(t);case Fe.ZodNullable:return YGt(t,I);case Fe.ZodOptional:return FGt(t,I);case Fe.ZodMap:return ZGt(t,I);case Fe.ZodSet:return vGt(t,I);case Fe.ZodLazy:return()=>t.getter()._def;case Fe.ZodPromise:return gGt(t,I);case Fe.ZodNaN:case Fe.ZodNever:return hGt(I);case Fe.ZodEffects:return GGt(t,I);case Fe.ZodAny:return Ac(I);case Fe.ZodUnknown:return HGt(I);case Fe.ZodDefault:return iGt(t,I);case Fe.ZodBranded:return Sae(t,I);case Fe.ZodReadonly:return QGt(t,I);case Fe.ZodCatch:return oGt(t,I);case Fe.ZodPipeline:return XGt(t,I);case Fe.ZodFunction:case Fe.ZodVoid:case Fe.ZodSymbol:return;default:return(l=>{})(e)}}});function FI(t,e,I=!1){let l=e.seen.get(t);if(e.override){let r=e.override?.(t,e,l,I);if(r!==zit)return r}if(l&&!I){let r=P4I(l,e);if(r!==void 0)return r}let n={def:t,path:e.currentPath,jsonSchema:void 0};e.seen.set(t,n);let a=fGt(t,t.typeName,e),c=typeof a=="function"?FI(a(),e):a;if(c&&$4I(t,e,c),e.postProcess){let r=e.postProcess(c,t,e);return n.jsonSchema=c,r}return n.jsonSchema=c,c}var P4I,$4I,Zs=g(()=>{o();Cae();kae();Xp();CQe();P4I=(t,e)=>{switch(e.$refStrategy){case"root":return{$ref:t.path.join("/")};case"relative":return{$ref:Lae(e.currentPath,t.path)};case"none":case"seen":return t.path.lengthe.currentPath[l]===I)?(console.warn(`Recursive reference detected at ${e.currentPath.join("/")}! Defaulting to any`),Ac(e)):e.$refStrategy==="seen"?Ac(e):void 0}},$4I=(t,e,I)=>(t.description&&(I.description=t.description,e.markdownDescription&&(I.markdownDescription=t.description)),I)});var EGt,LQe=g(()=>{o();tQe();Xp();Zs();EGt=(t,e)=>{let I=Mit(e),l=typeof e=="object"&&e.definitions?Object.entries(e.definitions).reduce((s,[i,G])=>({...s,[i]:FI(G._def,{...I,currentPath:[...I.basePath,I.definitionPath,i]},!0)??Ac(I)}),{}):void 0,n=typeof e=="string"?e:e?.nameStrategy==="title"?void 0:e?.name,a=FI(t._def,n===void 0?I:{...I,currentPath:[...I.basePath,I.definitionPath,n]},!1)??Ac(I),c=typeof e=="object"&&e.name!==void 0&&e.nameStrategy==="title"?e.name:void 0;c!==void 0&&(a.title=c),I.flags.hasReferencedOpenAiAnyType&&(l||(l={}),l[I.openAiAnyTypeName]||(l[I.openAiAnyTypeName]={type:["string","number","integer","boolean","array","null"],items:{$ref:I.$refStrategy==="relative"?"1":[...I.basePath,I.definitionPath,I.openAiAnyTypeName].join("/")}}));let r=n===void 0?l?{...a,[I.definitionPath]:l}:a:{$ref:[...I.$refStrategy==="relative"?[]:I.basePath,I.definitionPath,n].join("/"),[I.definitionPath]:{...l,[n]:a}};return I.target==="jsonSchema7"?r.$schema="http://json-schema.org/draft-07/schema#":(I.target==="jsonSchema2019-09"||I.target==="openAi")&&(r.$schema="https://json-schema.org/draft/2019-09/schema#"),I.target==="openAi"&&("anyOf"in r||"oneOf"in r||"allOf"in r||"type"in r&&Array.isArray(r.type))&&console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."),r}});var JGt=g(()=>{o();Cae();tQe();MH();kae();Xp();sQe();oQe();iQe();Tae();GQe();uQe();bQe();mQe();ZQe();pQe();hQe();Kae();qae();VQe();YQe();RQe();AQe();Pae();FQe();XQe();gQe();vQe();yQe();wQe();HQe();QQe();fQe();EQe();JQe();CQe();Zs();LQe()});function LGt(t){return(typeof t=="object"||typeof t=="function")&&t!==null&&"~standard"in t&&typeof t["~standard"]=="object"&&t["~standard"]!==null&&"validate"in t["~standard"]}function $ae(t){return(typeof t=="object"||typeof t=="function")&&t!==null&&"~standard"in t&&typeof t["~standard"]=="object"&&t["~standard"]!==null&&"jsonSchema"in t["~standard"]}function jn(t){return LGt(t)&&$ae(t)}var CGt,wp=g(()=>{o();Ct();CGt=ve({isSerializableSchema:()=>jn,isStandardJsonSchema:()=>$ae,isStandardSchema:()=>LGt})});function KA(t,e){let I=typeof t;if(I!==typeof e)return!1;if(Array.isArray(t)){if(!Array.isArray(e))return!1;let l=t.length;if(l!==e.length)return!1;for(let n=0;n{o()});function nZ(t){return encodeURI(exI(t))}function exI(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}var ece=g(()=>{o()});function KR(t,e=Object.create(null),I=nxI,l=""){if(t&&typeof t=="object"&&!Array.isArray(t)){let a=t.$id||t.id;if(a){let c=new URL(a,I.href);c.hash.length>1?e[c.href]=t:(c.hash="",l===""?I=c:KR(t,e,I))}}else if(t!==!0&&t!==!1)return e;let n=I.href+(l?"#"+l:"");if(e[n]!==void 0)throw new Error(`Duplicate schema URI "${n}".`);if(e[n]=t,t===!0||t===!1)return e;if(t.__absolute_uri__===void 0&&Object.defineProperty(t,"__absolute_uri__",{enumerable:!1,value:n}),t.$ref&&t.__absolute_ref__===void 0){let a=new URL(t.$ref,I.href);a.hash=a.hash,Object.defineProperty(t,"__absolute_ref__",{enumerable:!1,value:a.href})}if(t.$recursiveRef&&t.__absolute_recursive_ref__===void 0){let a=new URL(t.$recursiveRef,I.href);a.hash=a.hash,Object.defineProperty(t,"__absolute_recursive_ref__",{enumerable:!1,value:a.href})}if(t.$anchor){let a=new URL("#"+t.$anchor,I.href);e[a.href]=t}for(let a in t){if(lxI[a])continue;let c=`${l}/${nZ(a)}`,r=t[a];if(Array.isArray(r)){if(txI[a]){let s=r.length;for(let i=0;i{o();ece();txI={prefixItems:!0,items:!0,allOf:!0,anyOf:!0,oneOf:!0},IxI={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependentSchemas:!0},lxI={id:!0,$id:!0,$ref:!0,$schema:!0,$anchor:!0,$vocabulary:!0,$comment:!0,default:!0,enum:!0,const:!0,required:!0,type:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0},nxI=typeof self<"u"&&self.location&&self.location.origin!=="null"?new URL(self.location.origin+self.location.pathname+location.search):new URL("https://github.com/cfworker")});function DA(t){return t.test.bind(t)}function NxI(t){return t%4===0&&(t%100!==0||t%400===0)}function kGt(t){let e=t.match(axI);if(!e)return!1;let I=+e[1],l=+e[2],n=+e[3];return l>=1&&l<=12&&n>=1&&n<=(l==2&&NxI(I)?29:cxI[l])}function xGt(t,e){let I=e.match(rxI);if(!I)return!1;let l=+I[1],n=+I[2],a=+I[3],c=!!I[5];return(l<=23&&n<=59&&a<=59||l==23&&n==59&&a==60)&&(!t||c)}function YxI(t){let e=t.split(VxI);return e.length==2&&kGt(e[0])&&xGt(!0,e[1])}function FxI(t){return RxI.test(t)&&AxI.test(t)}function gxI(t){if(XxI.test(t))return!1;try{return new RegExp(t,"u"),!0}catch{return!1}}var axI,cxI,rxI,sxI,oxI,ixI,GxI,dxI,uxI,bxI,mxI,ZxI,pxI,hxI,WxI,xQe,VxI,RxI,AxI,XxI,jQe=g(()=>{o();axI=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,cxI=[0,31,28,31,30,31,30,31,31,30,31,30,31],rxI=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,sxI=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,oxI=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,ixI=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,GxI=/^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,dxI=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,uxI=/^(?:\/(?:[^~/]|~0|~1)*)*$/,bxI=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,mxI=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,ZxI=t=>{if(t[0]==='"')return!1;let[e,I,...l]=t.split("@");return!e||!I||l.length!==0||e.length>64||I.length>253||e[0]==="."||e.endsWith(".")||e.includes("..")||!/^[a-z0-9.-]+$/i.test(I)||!/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+$/i.test(e)?!1:I.split(".").every(n=>/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(n))},pxI=/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,hxI=/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,WxI=t=>t.length>1&&t.length<80&&(/^P\d+([.,]\d+)?W$/.test(t)||/^P[\dYMDTHS]*(\d[.,]\d+)?[YMDHS]$/.test(t)&&/^P([.,\d]+Y)?([.,\d]+M)?([.,\d]+D)?(T([.,\d]+H)?([.,\d]+M)?([.,\d]+S)?)?$/.test(t));xQe={date:kGt,time:xGt.bind(void 0,!1),"date-time":YxI,duration:WxI,uri:FxI,"uri-reference":DA(oxI),"uri-template":DA(ixI),url:DA(GxI),email:ZxI,hostname:DA(sxI),ipv4:DA(pxI),ipv6:DA(hxI),regex:gxI,uuid:DA(dxI),"json-pointer":DA(uxI),"json-pointer-uri-fragment":DA(bxI),"relative-json-pointer":DA(mxI)};VxI=/t|\s/i;RxI=/\/|:/,AxI=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;XxI=/[^\\]\\Z/});var jGt,UGt=g(()=>{o();(function(t){t[t.Flag=1]="Flag",t[t.Basic=2]="Basic",t[t.Detailed=4]="Detailed"})(jGt||(jGt={}))});function OGt(t){let e=0,I=t.length,l=0,n;for(;l=55296&&n<=56319&&l{o()});function pa(t,e,I="2019-09",l=KR(e),n=!0,a=null,c="#",r="#",s=Object.create(null)){if(e===!0)return{valid:!0,errors:[]};if(e===!1)return{valid:!1,errors:[{instanceLocation:c,keyword:"false",keywordLocation:c,error:"False boolean schema."}]};let i=typeof t,G;switch(i){case"boolean":case"number":case"string":G=i;break;case"object":t===null?G="null":Array.isArray(t)?G="array":G="object";break;default:throw new Error(`Instances of "${i}" type are not supported.`)}let{$ref:d,$recursiveRef:u,$recursiveAnchor:b,type:Z,const:p,enum:W,required:h,not:N,anyOf:V,allOf:R,oneOf:F,if:v,then:y,else:w,format:H,properties:f,patternProperties:L,additionalProperties:k,unevaluatedProperties:U,minProperties:T,maxProperties:q,propertyNames:_,dependentRequired:$,dependentSchemas:ee,dependencies:se,prefixItems:Ae,items:Ve,additionalItems:ct,unevaluatedItems:Xe,contains:_t,minContains:Pt,maxContains:S,minItems:j,maxItems:Ne,uniqueItems:ce,minimum:St,maximum:O,exclusiveMinimum:C,exclusiveMaximum:re,multipleOf:Ie,minLength:rt,maxLength:Ft,pattern:vI,__absolute_ref__:hl,__absolute_recursive_ref__:EI}=e,Be=[];if(b===!0&&a===null&&(a=e),u==="#"){let Xt=a===null?l[EI]:a,yt=`${r}/$recursiveRef`,wt=pa(t,a===null?e:a,I,l,n,Xt,c,yt,s);wt.valid||Be.push({instanceLocation:c,keyword:"$recursiveRef",keywordLocation:yt,error:"A subschema had errors."},...wt.errors)}if(d!==void 0){let yt=l[hl||d];if(yt===void 0){let we=`Unresolved $ref "${d}".`;throw hl&&hl!==d&&(we+=` Absolute URI "${hl}".`),we+=` +Known schemas: +- ${Object.keys(l).join(` +- `)}`,new Error(we)}let wt=`${r}/$ref`,ze=pa(t,yt,I,l,n,a,c,wt,s);if(ze.valid||Be.push({instanceLocation:c,keyword:"$ref",keywordLocation:wt,error:"A subschema had errors."},...ze.errors),I==="4"||I==="7")return{valid:Be.length===0,errors:Be}}if(Array.isArray(Z)){let Xt=Z.length,yt=!1;for(let wt=0;wtKA(t,Xt))||Be.push({instanceLocation:c,keyword:"enum",keywordLocation:`${r}/enum`,error:`Instance does not match any of ${JSON.stringify(W)}.`}):W.some(Xt=>t===Xt)||Be.push({instanceLocation:c,keyword:"enum",keywordLocation:`${r}/enum`,error:`Instance does not match any of ${JSON.stringify(W)}.`})),N!==void 0){let Xt=`${r}/not`;pa(t,N,I,l,n,a,c,Xt).valid&&Be.push({instanceLocation:c,keyword:"not",keywordLocation:Xt,error:'Instance matched "not" schema.'})}let Pl=[];if(V!==void 0){let Xt=`${r}/anyOf`,yt=Be.length,wt=!1;for(let ze=0;ze{let $t=Object.create(s),ot=pa(t,ze,I,l,n,b===!0?a:null,c,`${Xt}/${we}`,$t);return Be.push(...ot.errors),ot.valid&&Pl.push($t),ot.valid}).length;wt===1?Be.length=yt:Be.splice(yt,0,{instanceLocation:c,keyword:"oneOf",keywordLocation:Xt,error:`Instance does not match exactly one subschema (${wt} matches).`})}if((G==="object"||G==="array")&&Object.assign(s,...Pl),v!==void 0){let Xt=`${r}/if`;if(pa(t,v,I,l,n,a,c,Xt,s).valid){if(y!==void 0){let wt=pa(t,y,I,l,n,a,c,`${r}/then`,s);wt.valid||Be.push({instanceLocation:c,keyword:"if",keywordLocation:Xt,error:'Instance does not match "then" schema.'},...wt.errors)}}else if(w!==void 0){let wt=pa(t,w,I,l,n,a,c,`${r}/else`,s);wt.valid||Be.push({instanceLocation:c,keyword:"if",keywordLocation:Xt,error:'Instance does not match "else" schema.'},...wt.errors)}}if(G==="object"){if(h!==void 0)for(let ze of h)ze in t||Be.push({instanceLocation:c,keyword:"required",keywordLocation:`${r}/required`,error:`Instance does not have required property "${ze}".`});let Xt=Object.keys(t);if(T!==void 0&&Xt.lengthq&&Be.push({instanceLocation:c,keyword:"maxProperties",keywordLocation:`${r}/maxProperties`,error:`Instance does not have at least ${q} properties.`}),_!==void 0){let ze=`${r}/propertyNames`;for(let we in t){let $t=`${c}/${nZ(we)}`,ot=pa(we,_,I,l,n,a,$t,ze);ot.valid||Be.push({instanceLocation:c,keyword:"propertyNames",keywordLocation:ze,error:`Property name "${we}" does not match schema.`},...ot.errors)}}if($!==void 0){let ze=`${r}/dependantRequired`;for(let we in $)if(we in t){let $t=$[we];for(let ot of $t)ot in t||Be.push({instanceLocation:c,keyword:"dependentRequired",keywordLocation:ze,error:`Instance has "${we}" but does not have "${ot}".`})}}if(ee!==void 0)for(let ze in ee){let we=`${r}/dependentSchemas`;if(ze in t){let $t=pa(t,ee[ze],I,l,n,a,c,`${we}/${nZ(ze)}`,s);$t.valid||Be.push({instanceLocation:c,keyword:"dependentSchemas",keywordLocation:we,error:`Instance has "${ze}" but does not match dependant schema.`},...$t.errors)}}if(se!==void 0){let ze=`${r}/dependencies`;for(let we in se)if(we in t){let $t=se[we];if(Array.isArray($t))for(let ot of $t)ot in t||Be.push({instanceLocation:c,keyword:"dependencies",keywordLocation:ze,error:`Instance has "${we}" but does not have "${ot}".`});else{let ot=pa(t,$t,I,l,n,a,c,`${ze}/${nZ(we)}`);ot.valid||Be.push({instanceLocation:c,keyword:"dependencies",keywordLocation:ze,error:`Instance has "${we}" but does not match dependant schema.`},...ot.errors)}}}let yt=Object.create(null),wt=!1;if(f!==void 0){let ze=`${r}/properties`;for(let we in f){if(!(we in t))continue;let $t=`${c}/${nZ(we)}`,ot=pa(t[we],f[we],I,l,n,a,$t,`${ze}/${nZ(we)}`);if(ot.valid)s[we]=yt[we]=!0;else if(wt=n,Be.push({instanceLocation:c,keyword:"properties",keywordLocation:ze,error:`Property "${we}" does not match schema.`},...ot.errors),wt)break}}if(!wt&&L!==void 0){let ze=`${r}/patternProperties`;for(let we in L){let $t=new RegExp(we,"u"),ot=L[we];for(let rI in t){if(!$t.test(rI))continue;let aX=`${c}/${nZ(rI)}`,js=pa(t[rI],ot,I,l,n,a,aX,`${ze}/${nZ(we)}`);js.valid?s[rI]=yt[rI]=!0:(wt=n,Be.push({instanceLocation:c,keyword:"patternProperties",keywordLocation:ze,error:`Property "${rI}" matches pattern "${we}" but does not match associated schema.`},...js.errors))}}}if(!wt&&k!==void 0){let ze=`${r}/additionalProperties`;for(let we in t){if(yt[we])continue;let $t=`${c}/${nZ(we)}`,ot=pa(t[we],k,I,l,n,a,$t,ze);ot.valid?s[we]=!0:(wt=n,Be.push({instanceLocation:c,keyword:"additionalProperties",keywordLocation:ze,error:`Property "${we}" does not match additional properties schema.`},...ot.errors))}}else if(!wt&&U!==void 0){let ze=`${r}/unevaluatedProperties`;for(let we in t)if(!s[we]){let $t=`${c}/${nZ(we)}`,ot=pa(t[we],U,I,l,n,a,$t,ze);ot.valid?s[we]=!0:Be.push({instanceLocation:c,keyword:"unevaluatedProperties",keywordLocation:ze,error:`Property "${we}" does not match unevaluated properties schema.`},...ot.errors)}}}else if(G==="array"){Ne!==void 0&&t.length>Ne&&Be.push({instanceLocation:c,keyword:"maxItems",keywordLocation:`${r}/maxItems`,error:`Array has too many items (${t.length} > ${Ne}).`}),j!==void 0&&t.length=(Pt||0)&&(Be.length=we),Pt===void 0&&S===void 0&&$t===0?Be.splice(we,0,{instanceLocation:c,keyword:"contains",keywordLocation:ze,error:"Array does not contain item matching schema."}):Pt!==void 0&&$tS&&Be.push({instanceLocation:c,keyword:"maxContains",keywordLocation:`${r}/maxContains`,error:`Array may contain at most ${S} items matching schema. ${$t} items were found.`})}if(!wt&&Xe!==void 0){let ze=`${r}/unevaluatedItems`;for(yt;yt=O||t>O)&&Be.push({instanceLocation:c,keyword:"maximum",keywordLocation:`${r}/maximum`,error:`${t} is greater than ${re?"or equal to ":""} ${O}.`})):(St!==void 0&&tO&&Be.push({instanceLocation:c,keyword:"maximum",keywordLocation:`${r}/maximum`,error:`${t} is greater than ${O}.`}),C!==void 0&&t<=C&&Be.push({instanceLocation:c,keyword:"exclusiveMinimum",keywordLocation:`${r}/exclusiveMinimum`,error:`${t} is less than ${C}.`}),re!==void 0&&t>=re&&Be.push({instanceLocation:c,keyword:"exclusiveMaximum",keywordLocation:`${r}/exclusiveMaximum`,error:`${t} is greater than or equal to ${re}.`})),Ie!==void 0){let Xt=t%Ie;Math.abs(0-Xt)>=11920929e-14&&Math.abs(Ie-Xt)>=11920929e-14&&Be.push({instanceLocation:c,keyword:"multipleOf",keywordLocation:`${r}/multipleOf`,error:`${t} is not a multiple of ${Ie}.`})}}else if(G==="string"){let Xt=rt===void 0&&Ft===void 0?0:OGt(t);rt!==void 0&&XtFt&&Be.push({instanceLocation:c,keyword:"maxLength",keywordLocation:`${r}/maxLength`,error:`String is too long (${Xt} > ${Ft}).`}),vI!==void 0&&!new RegExp(vI,"u").test(t)&&Be.push({instanceLocation:c,keyword:"pattern",keywordLocation:`${r}/pattern`,error:"String does not match pattern."}),H!==void 0&&xQe[H]&&!xQe[H](t)&&Be.push({instanceLocation:c,keyword:"format",keywordLocation:`${r}/format`,error:`String does not match format "${H}".`})}return{valid:Be.length===0,errors:Be}}var OQe=g(()=>{o();kQe();tce();jQe();ece();UQe()});var TJ,zGt=g(()=>{o();tce();OQe();TJ=class{schema;draft;shortCircuit;lookup;constructor(e,I="2019-09",l=!0){this.schema=e,this.draft=I,this.shortCircuit=l,this.lookup=KR(e)}validate(e){return pa(e,this.schema,this.draft,this.lookup,this.shortCircuit)}addSchema(e,I){I&&(e={...e,$id:I}),KR(e,this.lookup)}}});var Ice=g(()=>{o();kQe();tce();jQe();ece();UGt();UQe();OQe();zGt()});function DI(t,e){let I=!e&&t!=null&&typeof t=="object";if(I){let n=BGt.get(t);if(n)return n}let l;if($ae(t)&&!mn(t))l=t["~standard"].jsonSchema.input({target:"draft-07"});else if(mn(t)){let n=fae(t,!0);Fp(n)?l=UH(Cx(n,!0),e):l=UH(t,e)}else Yc(t)?l=EGt(t):l=t;return I&&l!=null&&typeof l=="object"&&BGt.set(t,l),l}function Sx(t){if(!t||typeof t!="object"||Object.keys(t).length===0||Array.isArray(t))return!1;if("type"in t)return typeof t.type=="string"?t.type==="string":Array.isArray(t.type)?t.type.every(e=>e==="string"):!1;if("enum"in t)return Array.isArray(t.enum)&&t.enum.length>0&&t.enum.every(e=>typeof e=="string");if("const"in t)return typeof t.const=="string";if("allOf"in t&&Array.isArray(t.allOf))return t.allOf.some(e=>Sx(e));if("anyOf"in t&&Array.isArray(t.anyOf)||"oneOf"in t&&Array.isArray(t.oneOf)){let e="anyOf"in t?t.anyOf:t.oneOf;return e.length>0&&e.every(I=>Sx(I))}if("not"in t)return!1;if("$ref"in t&&typeof t.$ref=="string"){let e=t.$ref,I=KR(t);return I[e]?Sx(I[e]):!1}return!1}var MGt,BGt,aG=g(()=>{o();Ct();MA();LQe();JGt();wp();Vi();Ice();MGt=ve({Validator:()=>TJ,deepCompareStrict:()=>KA,toJsonSchema:()=>DI,validatesOnlyStrings:()=>Sx}),BGt=new WeakMap});function vxI(t,e){if(t!==void 0&&!qm(t))return t;if(VT(e))try{let I=e.getName();return I=I.startsWith("Runnable")?I.slice(8):I,I}catch{return e.getName()}else return e.name??"UnknownSchema"}function yxI(t){return VT(t.data)?{type:"runnable",data:{id:t.data.lc_id,name:t.data.getName()}}:{type:"schema",data:{...DI(t.data.schema),title:t.data.name}}}function SGt(t,e=[]){let I=new Set(t.edges.filter(n=>!e.includes(n.source)).map(n=>n.target)),l=[];for(let n of Object.values(t.nodes))!e.includes(n.id)&&!I.has(n.id)&&l.push(n);return l.length===1?l[0]:void 0}function TGt(t,e=[]){let I=new Set(t.edges.filter(n=>!e.includes(n.target)).map(n=>n.source)),l=[];for(let n of Object.values(t.nodes))!e.includes(n.id)&&!I.has(n.id)&&l.push(n);return l.length===1?l[0]:void 0}var _Gt,_J,lce=g(()=>{o();Ct();dx();cge();UR();zne();Uit();aG();_Gt=ve({Graph:()=>_J});_J=class KGt{nodes={};edges=[];constructor(e){this.nodes=e?.nodes??this.nodes,this.edges=e?.edges??this.edges}toJSON(){let e={};return Object.values(this.nodes).forEach((I,l)=>{e[I.id]=qm(I.id)?l:I.id}),{nodes:Object.values(this.nodes).map(I=>({id:e[I.id],...yxI(I)})),edges:this.edges.map(I=>{let l={source:e[I.source],target:e[I.target]};return typeof I.data<"u"&&(l.data=I.data),typeof I.conditional<"u"&&(l.conditional=I.conditional),l})}}addNode(e,I,l){if(I!==void 0&&this.nodes[I]!==void 0)throw new Error(`Node with id ${I} already exists`);let n=I??ju(),a={id:n,data:e,name:vxI(I,e),metadata:l};return this.nodes[n]=a,a}removeNode(e){delete this.nodes[e.id],this.edges=this.edges.filter(I=>I.source!==e.id&&I.target!==e.id)}addEdge(e,I,l,n){if(this.nodes[e.id]===void 0)throw new Error(`Source node ${e.id} not in graph`);if(this.nodes[I.id]===void 0)throw new Error(`Target node ${I.id} not in graph`);let a={source:e.id,target:I.id,data:l,conditional:n};return this.edges.push(a),a}firstNode(){return SGt(this)}lastNode(){return TGt(this)}extend(e,I=""){let l=I;Object.values(e.nodes).map(s=>s.id).every(qm)&&(l="");let n=s=>l?`${l}:${s}`:s;Object.entries(e.nodes).forEach(([s,i])=>{this.nodes[n(s)]={...i,id:n(s)}});let a=e.edges.map(s=>({...s,source:n(s.source),target:n(s.target)}));this.edges=[...this.edges,...a];let c=e.firstNode(),r=e.lastNode();return[c?{id:n(c.id),data:c.data}:void 0,r?{id:n(r.id),data:r.data}:void 0]}trimFirstNode(){let e=this.firstNode();e&&SGt(this,[e.id])&&this.removeNode(e)}trimLastNode(){let e=this.lastNode();e&&TGt(this,[e.id])&&this.removeNode(e)}reid(){let e=Object.fromEntries(Object.values(this.nodes).map(n=>[n.id,n.name])),I=new Map;Object.values(e).forEach(n=>{I.set(n,(I.get(n)||0)+1)});let l=n=>{let a=e[n];return qm(n)&&I.get(a)===1?a:n};return new KGt({nodes:Object.fromEntries(Object.entries(this.nodes).map(([n,a])=>[l(n),{...a,id:l(n)}])),edges:this.edges.map(n=>({...n,source:l(n.source),target:l(n.target)}))})}drawMermaid(e){let{withStyles:I,curveStyle:l,nodeColors:n={default:"fill:#f2f0ff,line-height:1.2",first:"fill-opacity:0",last:"fill:#bfb6fc"},wrapLabelNWords:a}=e??{},c=this.reid(),r=c.firstNode(),s=c.lastNode();return xit(c.nodes,c.edges,{firstNode:r?.id,lastNode:s?.id,withStyles:I,curveStyle:l,nodeColors:n,wrapLabelNWords:a})}async drawMermaidPng(e){return jit(this.drawMermaid(e),{backgroundColor:e?.backgroundColor})}}});function DGt(t){let e=new TextEncoder,I=new ReadableStream({async start(l){for await(let n of t)l.enqueue(e.encode(`event: data +data: ${JSON.stringify(n)} + +`));l.enqueue(e.encode(`event: end + +`)),l.close()}});return nr.fromReadableStream(I)}var qGt=g(()=>{o();Lb()});function zQe(t){return typeof t=="object"&&t!==null&&typeof t[Symbol.iterator]=="function"&&typeof t.next=="function"}function nce(t){return typeof t=="object"&&t!==null&&typeof t[Symbol.asyncIterator]=="function"}function BQe(t){return t!=null&&typeof t=="object"&&typeof t.next=="function"}async function $Gt(t,e){try{let I=await t.next();for(;!I.done;)await e?.(I.value),I=await t.next();return I.value}finally{await t.return?.(void 0)}}function*MQe(t,e){for(;;){let{value:I,done:l}=dl.runWithConfig(Vo(t),e.next.bind(e),!0);if(l)break;yield I}}async function*ace(t,e){let I=e[Symbol.asyncIterator]();for(;;){let{value:l,done:n}=await dl.runWithConfig(Vo(t),I.next.bind(e),!0);if(n)break;yield l}}var PGt,SQe=g(()=>{o();pJ();Bu();xA();PGt=t=>t!=null&&typeof t=="object"&&"next"in t&&typeof t.next=="function"});function ps(t,e){return t&&!Array.isArray(t)&&!(t instanceof Date)&&typeof t=="object"?t:{[e]:t}}function HxI(t){if(vne(t))throw new Error("RunnableLambda requires a function that is not wrapped in traceable higher-order function. This shouldn't happen.")}function rr(t){if(typeof t=="function")return new sr({func:t});if(tI.isRunnable(t))return t;if(!Array.isArray(t)&&typeof t=="object"){let e={};for(let[I,l]of Object.entries(t))e[I]=rr(l);return new qA({steps:e})}else throw new Error(`Expected a Runnable, function or object. +Instead got an unsupported type.`)}function QxI(t,e){let I=e.name??t.getName(),l=e.description??lZ(e.schema);return Lx(e.schema)?new cce({name:I,description:l,schema:ie.object({input:ie.string()}).transform(n=>n.input),bound:t}):new cce({name:I,description:l,schema:e.schema,bound:t})}var tI,ha,rce,Tx,$r,qA,wxI,sr,sce,d_,KJ,u_,cce,es=g(()=>{o();Cle();Jb();eT();UR();pJ();Bu();xA();Ax();Lb();jve();Qst();Uve();JH();Lst();zne();MA();lce();qGt();SQe();Xve();Fc();tI=class extends Xr{lc_runnable=!0;name;getName(t){let e=this.name??this.constructor.lc_name()??this.constructor.name;return t?`${e}${t}`:e}withRetry(t){return new Tx({bound:this,kwargs:{},config:{},maxAttemptNumber:t?.stopAfterAttempt,...t})}withConfig(t){return new ha({bound:this,config:t,kwargs:{}})}withFallbacks(t){let e=Array.isArray(t)?t:t.fallbacks;return new d_({runnable:this,fallbacks:e})}_getOptionsList(t,e=0){if(Array.isArray(t)&&t.length!==e)throw new Error(`Passed "options" must be an array with the same length as the inputs, but got ${t.length} options for ${e} inputs`);if(Array.isArray(t))return t.map(KI);if(e>1&&!Array.isArray(t)&&t.runId){console.warn("Provided runId will be used only for the first element of the batch.");let I=Object.fromEntries(Object.entries(t).filter(([l])=>l!=="runId"));return Array.from({length:e},(l,n)=>KI(n===0?t:I))}return Array.from({length:e},()=>KI(t))}async batch(t,e,I){let l=this._getOptionsList(e??{},t.length),n=new tZ({maxConcurrency:l[0]?.maxConcurrency??I?.maxConcurrency,onFailedAttempt:c=>{throw c}}),a=t.map((c,r)=>n.call(async()=>{try{return await this.invoke(c,l[r])}catch(s){if(I?.returnExceptions)return s;throw s}}));return Promise.all(a)}async*_streamIterator(t,e){yield this.invoke(t,e)}async stream(t,e){let I=KI(e),l=new jA({generator:this._streamIterator(t,I),config:I});return await l.setup,nr.fromAsyncGenerator(l)}_separateRunnableConfigFromCallOptions(t){let e;t===void 0?e=KI(t):e=KI({callbacks:t.callbacks,tags:t.tags,metadata:t.metadata,runName:t.runName,configurable:t.configurable,recursionLimit:t.recursionLimit,maxConcurrency:t.maxConcurrency,runId:t.runId,timeout:t.timeout,signal:t.signal});let I={...t};return delete I.callbacks,delete I.tags,delete I.metadata,delete I.runName,delete I.configurable,delete I.recursionLimit,delete I.maxConcurrency,delete I.runId,delete I.timeout,delete I.signal,[e,I]}async _callWithConfig(t,e,I){let l=KI(I),n=await(await lG(l))?.handleChainStart(this.toJSON(),ps(e,"input"),l.runId,l?.runType,void 0,void 0,l?.runName??this.getName());delete l.runId;let a;try{a=await Mu(t.call(this,e,l,n),l.signal)}catch(c){throw await n?.handleChainError(c),c}return await n?.handleChainEnd(ps(a,"output")),a}async _batchWithConfig(t,e,I,l){let n=this._getOptionsList(I??{},e.length),a=await Promise.all(n.map(lG)),c=await Promise.all(a.map(async(s,i)=>{let G=await s?.handleChainStart(this.toJSON(),ps(e[i],"input"),n[i].runId,n[i].runType,void 0,void 0,n[i].runName??this.getName());return delete n[i].runId,G})),r;try{r=await Mu(t.call(this,e,n,c,l),n?.[0]?.signal)}catch(s){throw await Promise.all(c.map(i=>i?.handleChainError(s))),s}return await Promise.all(c.map(s=>s?.handleChainEnd(ps(r,"output")))),r}_concatOutputChunks(t,e){return Su(t,e)}async*_transformStreamWithConfig(t,e,I){let l,n=!0,a,c=!0,r=KI(I),s=await lG(r),i=this;async function*G(){for await(let u of t){if(n)if(l===void 0)l=u;else try{l=i._concatOutputChunks(l,u)}catch{l=void 0,n=!1}yield u}}let d;try{let u=await Cve(e.bind(this),G(),async()=>s?.handleChainStart(this.toJSON(),{input:""},r.runId,r.runType,void 0,void 0,r.runName??this.getName(),void 0,{lc_defers_inputs:!0}),r.signal,r);delete r.runId,d=u.setup;let b=d?.handlers.find(wst),Z=u.output;b!==void 0&&d!==void 0&&(Z=b.tapOutputIterable(d.runId,Z));let p=d?.handlers.find(xve);p!==void 0&&d!==void 0&&(Z=p.tapOutputIterable(d.runId,Z));for await(let W of Z)if(yield W,c)if(a===void 0)a=W;else try{a=this._concatOutputChunks(a,W)}catch{a=void 0,c=!1}}catch(u){throw await d?.handleChainError(u,void 0,void 0,void 0,{inputs:ps(l,"input")}),u}await d?.handleChainEnd(a??{},void 0,void 0,void 0,{inputs:ps(l,"input")})}getGraph(t){let e=new _J,I=e.addNode({name:`${this.getName()}Input`,schema:ie.any()}),l=e.addNode(this),n=e.addNode({name:`${this.getName()}Output`,schema:ie.any()});return e.addEdge(I,l),e.addEdge(l,n),e}pipe(t){return new $r({first:this,last:rr(t)})}pick(t){return this.pipe(new u_(t))}assign(t){return this.pipe(new KJ(new qA({steps:t})))}async*transform(t,e){let I;for await(let l of t)I===void 0?I=l:I=this._concatOutputChunks(I,l);yield*this._streamIterator(I,KI(e))}async*streamLog(t,e,I){let l=new xne({...I,autoClose:!1,_schemaFormat:"original"}),n=KI(e);yield*this._streamLog(t,l,n)}async*_streamLog(t,e,I){let{callbacks:l}=I;if(l===void 0)I.callbacks=[e];else if(Array.isArray(l))I.callbacks=l.concat([e]);else{let r=l.copy();r.addHandler(e,!0),I.callbacks=r}let n=this.stream(t,I);async function a(){try{let r=await n;for await(let s of r){let i=new UA({ops:[{op:"add",path:"/streamed_output/-",value:s}]});await e.writer.write(i)}}finally{await e.writer.close()}}let c=a();try{for await(let r of e)yield r}finally{await c}}streamEvents(t,e,I){let l;if(e.version==="v1")l=this._streamEventsV1(t,e,I);else if(e.version==="v2")l=this._streamEventsV2(t,e,I);else throw new Error('Only versions "v1" and "v2" of the schema are currently supported.');return e.encoding==="text/event-stream"?DGt(l):nr.fromAsyncGenerator(l)}async*_streamEventsV2(t,e,I){let l=new Hst({...I,autoClose:!1}),n=KI(e),a=n.runId??Pm();n.runId=a;let c=n.callbacks;if(c===void 0)n.callbacks=[l];else if(Array.isArray(c))n.callbacks=c.concat(l);else{let b=c.copy();b.addHandler(l,!0),n.callbacks=b}let r=new AbortController,s=this;async function i(){let b;try{if(n.signal)if("any"in AbortSignal)b=AbortSignal.any([r.signal,n.signal]);else{let W=new AbortController;n.signal.addEventListener("abort",()=>W.abort(),{once:!0}),r.signal.addEventListener("abort",()=>W.abort(),{once:!0}),b=W.signal}else b=r.signal;let Z=await s.stream(t,{...n,signal:b}),p=l.tapOutputIterable(a,Z);for await(let W of p)if(r.signal.aborted)break}finally{await l.finish()}}let G=i(),d=!1,u;try{for await(let b of l){if(!d){b.data.input=t,d=!0,u=b.run_id,yield b;continue}b.run_id===u&&b.event.endsWith("_end")&&b.data?.input&&delete b.data.input,yield b}}finally{r.abort(),await G}}async*_streamEventsV1(t,e,I){let l,n=!1,a=KI(e),c=a.tags??[],r=a.metadata??{},s=a.runName??this.getName(),i=new xne({...I,autoClose:!1,_schemaFormat:"streaming_events"}),G=new kst({...I}),d=this._streamLog(t,i,a);for await(let b of d){if(l?l=l.concat(b):l=kne.fromRunLogPatch(b),l.state===void 0)throw new Error('Internal error: "streamEvents" state is missing. Please open a bug report.');if(!n){n=!0;let h={...l.state},N={run_id:h.id,event:`on_${h.type}_start`,name:s,tags:c,metadata:r,data:{input:t}};G.includeEvent(N,h.type)&&(yield N)}let Z=b.ops.filter(h=>h.path.startsWith("/logs/")).map(h=>h.path.split("/")[2]),p=[...new Set(Z)];for(let h of p){let N,V={},R=l.state.logs[h];if(R.end_time===void 0?R.streamed_output.length>0?N="stream":N="start":N="end",N==="start")R.inputs!==void 0&&(V.input=R.inputs);else if(N==="end")R.inputs!==void 0&&(V.input=R.inputs),V.output=R.final_output;else if(N==="stream"){let F=R.streamed_output.length;if(F!==1)throw new Error(`Expected exactly one chunk of streamed output, got ${F} instead. Encountered in: "${R.name}"`);V={chunk:R.streamed_output[0]},R.streamed_output=[]}yield{event:`on_${R.type}_${N}`,name:R.name,run_id:R.id,tags:R.tags,metadata:R.metadata,data:V}}let{state:W}=l;if(W.streamed_output.length>0){let h=W.streamed_output.length;if(h!==1)throw new Error(`Expected exactly one chunk of streamed output, got ${h} instead. Encountered in: "${W.name}"`);let N={chunk:W.streamed_output[0]};W.streamed_output=[];let V={event:`on_${W.type}_stream`,run_id:W.id,tags:c,metadata:r,name:s,data:N};G.includeEvent(V,W.type)&&(yield V)}}let u=l?.state;if(u!==void 0){let b={event:`on_${u.type}_end`,name:s,run_id:u.id,tags:c,metadata:r,data:{output:u.final_output}};G.includeEvent(b,u.type)&&(yield b)}}static isRunnable(t){return VT(t)}withListeners({onStart:t,onEnd:e,onError:I}){return new ha({bound:this,config:{},configFactories:[l=>({callbacks:[new Ove({config:l,onStart:t,onEnd:e,onError:I})]})]})}asTool(t){return QxI(this,t)}},ha=class edt extends tI{static lc_name(){return"RunnableBinding"}lc_namespace=["langchain_core","runnables"];lc_serializable=!0;bound;config;kwargs;configFactories;constructor(e){super(e),this.bound=e.bound,this.kwargs=e.kwargs,this.config=e.config,this.configFactories=e.configFactories}getName(e){return this.bound.getName(e)}async _mergeConfig(...e){let I=xn(this.config,...e);return xn(I,...this.configFactories?await Promise.all(this.configFactories.map(async l=>await l(I))):[])}withConfig(e){return new this.constructor({bound:this.bound,kwargs:this.kwargs,config:{...this.config,...e}})}withRetry(e){return new Tx({bound:this.bound,kwargs:this.kwargs,config:this.config,maxAttemptNumber:e?.stopAfterAttempt,...e})}async invoke(e,I){return this.bound.invoke(e,await this._mergeConfig(I,this.kwargs))}async batch(e,I,l){let n=Array.isArray(I)?await Promise.all(I.map(async a=>this._mergeConfig(KI(a),this.kwargs))):await this._mergeConfig(KI(I),this.kwargs);return this.bound.batch(e,n,l)}_concatOutputChunks(e,I){return this.bound._concatOutputChunks(e,I)}async*_streamIterator(e,I){yield*this.bound._streamIterator(e,await this._mergeConfig(KI(I),this.kwargs))}async stream(e,I){return this.bound.stream(e,await this._mergeConfig(KI(I),this.kwargs))}async*transform(e,I){yield*this.bound.transform(e,await this._mergeConfig(KI(I),this.kwargs))}streamEvents(e,I,l){let n=this,a=async function*(){yield*n.bound.streamEvents(e,{...await n._mergeConfig(KI(I),n.kwargs),version:I.version},l)};return nr.fromAsyncGenerator(a())}static isRunnableBinding(e){return e.bound&&tI.isRunnable(e.bound)}withListeners({onStart:e,onEnd:I,onError:l}){return new edt({bound:this.bound,kwargs:this.kwargs,config:this.config,configFactories:[n=>({callbacks:[new Ove({config:n,onStart:e,onEnd:I,onError:l})]})]})}},rce=class tdt extends tI{static lc_name(){return"RunnableEach"}lc_serializable=!0;lc_namespace=["langchain_core","runnables"];bound;constructor(e){super(e),this.bound=e.bound}async invoke(e,I){return this._callWithConfig(this._invoke.bind(this),e,I)}async _invoke(e,I,l){return this.bound.batch(e,Nl(I,{callbacks:l?.getChild()}))}withListeners({onStart:e,onEnd:I,onError:l}){return new tdt({bound:this.bound.withListeners({onStart:e,onEnd:I,onError:l})})}},Tx=class extends ha{static lc_name(){return"RunnableRetry"}lc_namespace=["langchain_core","runnables"];maxAttemptNumber=3;onFailedAttempt=()=>{};constructor(t){super(t),this.maxAttemptNumber=t.maxAttemptNumber??this.maxAttemptNumber,this.onFailedAttempt=t.onFailedAttempt??this.onFailedAttempt}_patchConfigForRetry(t,e,I){let l=t>1?`retry:attempt:${t}`:void 0;return Nl(e,{callbacks:I?.getChild(l)})}async _invoke(t,e,I){return NT(l=>super.invoke(t,this._patchConfigForRetry(l,e,I)),{onFailedAttempt:({error:l})=>this.onFailedAttempt(l,t),retries:Math.max(this.maxAttemptNumber-1,0),randomize:!0})}async invoke(t,e){return this._callWithConfig(this._invoke.bind(this),t,e)}async _batch(t,e,I,l){let n={};try{await NT(async a=>{let c=t.map((d,u)=>u).filter(d=>n[d.toString()]===void 0||n[d.toString()]instanceof Error),r=c.map(d=>t[d]),s=c.map(d=>this._patchConfigForRetry(a,e?.[d],I?.[d])),i=await super.batch(r,s,{...l,returnExceptions:!0}),G;for(let d=0;dthis.onFailedAttempt(a,a.input),retries:Math.max(this.maxAttemptNumber-1,0),randomize:!0})}catch(a){if(l?.returnExceptions!==!0)throw a}return Object.keys(n).sort((a,c)=>parseInt(a,10)-parseInt(c,10)).map(a=>n[parseInt(a,10)])}async batch(t,e,I){return this._batchWithConfig(this._batch.bind(this),t,e,I)}},$r=class G_ extends tI{static lc_name(){return"RunnableSequence"}first;middle=[];last;omitSequenceTags=!1;lc_serializable=!0;lc_namespace=["langchain_core","runnables"];constructor(e){super(e),this.first=e.first,this.middle=e.middle??this.middle,this.last=e.last,this.name=e.name,this.omitSequenceTags=e.omitSequenceTags??this.omitSequenceTags}get steps(){return[this.first,...this.middle,this.last]}async invoke(e,I){let l=KI(I),n=await(await lG(l))?.handleChainStart(this.toJSON(),ps(e,"input"),l.runId,void 0,void 0,void 0,l?.runName);delete l.runId;let a=e,c;try{let r=[this.first,...this.middle];for(let s=0;s{let G=await s?.handleChainStart(this.toJSON(),ps(e[i],"input"),n[i].runId,void 0,void 0,void 0,n[i].runName);return delete n[i].runId,G})),r=e;try{for(let s=0;s{let d=i?.getChild(this.omitSequenceTags?void 0:`seq:step:${s+1}`);return Nl(n[G],{callbacks:d})}),l),n[0]?.signal)}catch(s){throw await Promise.all(c.map(i=>i?.handleChainError(s))),s}return await Promise.all(c.map(s=>s?.handleChainEnd(ps(r,"output")))),r}_concatOutputChunks(e,I){return this.last._concatOutputChunks(e,I)}async*_streamIterator(e,I){let l=await lG(I),{runId:n,...a}=I??{},c=await l?.handleChainStart(this.toJSON(),ps(e,"input"),n,void 0,void 0,void 0,a?.runName),r=[this.first,...this.middle,this.last],s=!0,i;async function*G(){yield e}try{let d=r[0].transform(G(),Nl(a,{callbacks:c?.getChild(this.omitSequenceTags?void 0:"seq:step:1")}));for(let u=1;u{let c=n.getGraph(e);a!==0&&c.trimFirstNode(),a!==this.steps.length-1&&c.trimLastNode(),I.extend(c);let r=c.firstNode();if(!r)throw new Error(`Runnable ${n} has no first node`);l&&I.addEdge(l,r),l=c.lastNode()}),I}pipe(e){return G_.isRunnableSequence(e)?new G_({first:this.first,middle:this.middle.concat([this.last,e.first,...e.middle]),last:e.last,name:this.name??e.name}):new G_({first:this.first,middle:[...this.middle,this.last],last:rr(e),name:this.name})}static isRunnableSequence(e){return Array.isArray(e.middle)&&tI.isRunnable(e)}static from([e,...I],l){let n={};return typeof l=="string"?n.name=l:l!==void 0&&(n=l),new G_({...n,first:rr(e),middle:I.slice(0,-1).map(rr),last:rr(I[I.length-1])})}},qA=class Idt extends tI{static lc_name(){return"RunnableMap"}lc_namespace=["langchain_core","runnables"];lc_serializable=!0;steps;getStepsKeys(){return Object.keys(this.steps)}constructor(e){super(e),this.steps={};for(let[I,l]of Object.entries(e.steps))this.steps[I]=rr(l)}static from(e){return new Idt({steps:e})}async invoke(e,I){let l=KI(I),n=await(await lG(l))?.handleChainStart(this.toJSON(),{input:e},l.runId,void 0,void 0,void 0,l?.runName);delete l.runId;let a={};try{let c=Object.entries(this.steps).map(async([r,s])=>{a[r]=await s.invoke(e,Nl(l,{callbacks:n?.getChild(`map:key:${r}`)}))});await Mu(Promise.all(c),l.signal)}catch(c){throw await n?.handleChainError(c),c}return await n?.handleChainEnd(a),a}async*_transform(e,I,l){let n={...this.steps},a=wne(e,Object.keys(n).length),c=new Map(Object.entries(n).map(([r,s],i)=>{let G=s.transform(a[i],Nl(l,{callbacks:I?.getChild(`map:key:${r}`)}));return[r,G.next().then(d=>({key:r,gen:G,result:d}))]}));for(;c.size;){let{key:r,result:s,gen:i}=await Mu(Promise.race(c.values()),l?.signal);c.delete(r),s.done||(yield{[r]:s.value},c.set(r,i.next().then(G=>({key:r,gen:i,result:G}))))}}transform(e,I){return this._transformStreamWithConfig(e,this._transform.bind(this),I)}async stream(e,I){async function*l(){yield e}let n=KI(I),a=new jA({generator:this.transform(l(),n),config:n});return await a.setup,nr.fromAsyncGenerator(a)}},wxI=class ldt extends tI{lc_serializable=!1;lc_namespace=["langchain_core","runnables"];func;constructor(e){if(super(e),!vne(e.func))throw new Error("RunnableTraceable requires a function that is wrapped in traceable higher-order function");this.func=e.func}async invoke(e,I){let[l]=this._getOptionsList(I??{},1),n=await lG(l);return Mu(this.func(Nl(l,{callbacks:n}),e),l?.signal)}async*_streamIterator(e,I){let[l]=this._getOptionsList(I??{},1),n=await this.invoke(e,I);if(nce(n)){for await(let a of n)l?.signal?.throwIfAborted(),yield a;return}if(PGt(n)){for(;;){l?.signal?.throwIfAborted();let a=n.next();if(a.done)break;yield a.value}return}yield n}static from(e){return new ldt({func:e})}};sr=class ndt extends tI{static lc_name(){return"RunnableLambda"}lc_namespace=["langchain_core","runnables"];func;constructor(e){if(vne(e.func))return wxI.from(e.func);super(e),HxI(e.func),this.func=e.func}static from(e){return new ndt({func:e})}async _invoke(e,I,l){return new Promise((n,a)=>{let c=Nl(I,{callbacks:l?.getChild(),recursionLimit:(I?.recursionLimit??25)-1});dl.runWithConfig(Vo(c),async()=>{try{let r=await this.func(e,{...c});if(r&&tI.isRunnable(r)){if(I?.recursionLimit===0)throw new Error("Recursion limit reached.");r=await r.invoke(e,{...c,recursionLimit:(c.recursionLimit??25)-1})}else if(nce(r)){let s;for await(let i of ace(c,r))if(I?.signal?.throwIfAborted(),s===void 0)s=i;else try{s=this._concatOutputChunks(s,i)}catch{s=i}r=s}else if(zQe(r)){let s;for(let i of MQe(c,r))if(I?.signal?.throwIfAborted(),s===void 0)s=i;else try{s=this._concatOutputChunks(s,i)}catch{s=i}r=s}n(r)}catch(r){a(r)}})})}async invoke(e,I){return this._callWithConfig(this._invoke.bind(this),e,I)}async*_transform(e,I,l){let n;for await(let r of e)if(n===void 0)n=r;else try{n=this._concatOutputChunks(n,r)}catch{n=r}let a=Nl(l,{callbacks:I?.getChild(),recursionLimit:(l?.recursionLimit??25)-1}),c=await new Promise((r,s)=>{dl.runWithConfig(Vo(a),async()=>{try{r(await this.func(n,{...a,config:a}))}catch(i){s(i)}})});if(c&&tI.isRunnable(c)){if(l?.recursionLimit===0)throw new Error("Recursion limit reached.");let r=await c.stream(n,a);for await(let s of r)yield s}else if(nce(c))for await(let r of ace(a,c))l?.signal?.throwIfAborted(),yield r;else if(zQe(c))for(let r of MQe(a,c))l?.signal?.throwIfAborted(),yield r;else yield c}transform(e,I){return this._transformStreamWithConfig(e,this._transform.bind(this),I)}async stream(e,I){async function*l(){yield e}let n=KI(I),a=new jA({generator:this.transform(l(),n),config:n});return await a.setup,nr.fromAsyncGenerator(a)}},sce=class extends qA{},d_=class extends tI{static lc_name(){return"RunnableWithFallbacks"}lc_namespace=["langchain_core","runnables"];lc_serializable=!0;runnable;fallbacks;constructor(t){super(t),this.runnable=t.runnable,this.fallbacks=t.fallbacks}*runnables(){yield this.runnable;for(let t of this.fallbacks)yield t}async invoke(t,e){let I=KI(e),l=await lG(I),{runId:n,...a}=I,c=await l?.handleChainStart(this.toJSON(),ps(t,"input"),n,void 0,void 0,void 0,a?.runName),r=Nl(a,{callbacks:c?.getChild()});return await dl.runWithConfig(r,async()=>{let s;for(let i of this.runnables()){I?.signal?.throwIfAborted();try{let G=await i.invoke(t,r);return await c?.handleChainEnd(ps(G,"output")),G}catch(G){s===void 0&&(s=G)}}throw s===void 0?new Error("No error stored at end of fallback."):(await c?.handleChainError(s),s)})}async*_streamIterator(t,e){let I=KI(e),l=await lG(I),{runId:n,...a}=I,c=await l?.handleChainStart(this.toJSON(),ps(t,"input"),n,void 0,void 0,void 0,a?.runName),r,s;for(let G of this.runnables()){I?.signal?.throwIfAborted();let d=Nl(a,{callbacks:c?.getChild()});try{s=ace(d,await G.stream(t,d));break}catch(u){r===void 0&&(r=u)}}if(s===void 0){let G=r??new Error("No error stored at end of fallback.");throw await c?.handleChainError(G),G}let i;try{for await(let G of s){yield G;try{i=i===void 0?i:this._concatOutputChunks(i,G)}catch{i=void 0}}}catch(G){throw await c?.handleChainError(G),G}await c?.handleChainEnd(ps(i,"output"))}async batch(t,e,I){if(I?.returnExceptions)throw new Error("Not implemented.");let l=this._getOptionsList(e??{},t.length),n=await Promise.all(l.map(r=>lG(r))),a=await Promise.all(n.map(async(r,s)=>{let i=await r?.handleChainStart(this.toJSON(),ps(t[s],"input"),l[s].runId,void 0,void 0,void 0,l[s].runName);return delete l[s].runId,i})),c;for(let r of this.runnables()){l[0].signal?.throwIfAborted();try{let s=await r.batch(t,a.map((i,G)=>Nl(l[G],{callbacks:i?.getChild()})),I);return await Promise.all(a.map((i,G)=>i?.handleChainEnd(ps(s[G],"output")))),s}catch(s){c===void 0&&(c=s)}}throw c?(await Promise.all(a.map(r=>r?.handleChainError(c))),c):new Error("No error stored at end of fallbacks.")}};KJ=class extends tI{static lc_name(){return"RunnableAssign"}lc_namespace=["langchain_core","runnables"];lc_serializable=!0;mapper;constructor(t){t instanceof qA&&(t={mapper:t}),super(t),this.mapper=t.mapper}async invoke(t,e){let I=await this.mapper.invoke(t,e);return{...t,...I}}async*_transform(t,e,I){let l=this.mapper.getStepsKeys(),[n,a]=wne(t),c=this.mapper.transform(a,Nl(I,{callbacks:e?.getChild()})),r=c.next();for await(let s of n){if(typeof s!="object"||Array.isArray(s))throw new Error(`RunnableAssign can only be used with objects as input, got ${typeof s}`);let i=Object.fromEntries(Object.entries(s).filter(([G])=>!l.includes(G)));Object.keys(i).length>0&&(yield i)}yield(await r).value;for await(let s of c)yield s}transform(t,e){return this._transformStreamWithConfig(t,this._transform.bind(this),e)}async stream(t,e){async function*I(){yield t}let l=KI(e),n=new jA({generator:this.transform(I(),l),config:l});return await n.setup,nr.fromAsyncGenerator(n)}},u_=class extends tI{static lc_name(){return"RunnablePick"}lc_namespace=["langchain_core","runnables"];lc_serializable=!0;keys;constructor(t){(typeof t=="string"||Array.isArray(t))&&(t={keys:t}),super(t),this.keys=t.keys}async _pick(t){if(typeof this.keys=="string")return t[this.keys];{let e=this.keys.map(I=>[I,t[I]]).filter(I=>I[1]!==void 0);return e.length===0?void 0:Object.fromEntries(e)}}async invoke(t,e){return this._callWithConfig(this._pick.bind(this),t,e)}async*_transform(t){for await(let e of t){let I=await this._pick(e);I!==void 0&&(yield I)}}transform(t,e){return this._transformStreamWithConfig(t,this._transform.bind(this),e)}async stream(t,e){async function*I(){yield t}let l=KI(e),n=new jA({generator:this.transform(I(),l),config:l});return await n.setup,nr.fromAsyncGenerator(n)}},cce=class extends ha{name;description;schema;constructor(t){let e=$r.from([sr.from(async I=>{let l;if(RH(I))try{l=await OH(this.schema,I.args)}catch{throw new AH("Received tool input did not match expected schema",JSON.stringify(I.args))}else l=I;return l}).withConfig({runName:`${t.name}:parse_input`}),t.bound]).withConfig({runName:t.name});super({bound:e,config:t.config??{}}),this.name=t.name,this.description=t.description,this.schema=t.schema}static lc_name(){return"RunnableToolLike"}}});function DJ(t,e){return Array.isArray(t)?adt(t,e):sr.from(I=>adt(I,t))}function adt(t,e={}){let{includeNames:I,excludeNames:l,includeTypes:n,excludeTypes:a,includeIds:c,excludeIds:r}=e,s=[];for(let i of t)if(!(l&&i.name&&l.includes(i.name))){{if(a&&oce(i,a))continue;if(r&&i.id&&r.includes(i.id))continue}n||c||I?(I&&i.name&&I.some(G=>G===i.name)||n&&oce(i,n)||c&&i.id&&c.some(G=>G===i.id))&&s.push(i):s.push(i)}return s}function odt(t){return Array.isArray(t)?cdt(t):sr.from(cdt)}function cdt(t){if(!t.length)return[];let e=[];for(let I of t){let l=I,n=e.pop();if(!n)e.push(l);else if(l.getType()==="tool"||l.getType()!==n.getType())e.push(n,l);else{let a=oJ(n),c=oJ(l),r=a.concat(c);typeof a.content=="string"&&typeof c.content=="string"&&(r.content=`${a.content} +${c.content}`),e.push(ExI(r))}}return e}function fX(t,e){if(Array.isArray(t)){let I=t;if(!e)throw new Error("Options parameter is required when providing messages.");return rdt(I,e)}else{let I=t;return sr.from(l=>rdt(l,I)).withConfig({runName:"trim_messages"})}}async function rdt(t,e){let{maxTokens:I,tokenCounter:l,strategy:n="last",allowPartial:a=!1,endOn:c,startOn:r,includeSystem:s=!1,textSplitter:i}=e;if(r&&n==="first")throw new Error("`startOn` should only be specified if `strategy` is 'last'.");if(s&&n==="first")throw new Error("`includeSystem` should only be specified if `strategy` is 'last'.");let G;"getNumTokens"in l?G=async u=>(await Promise.all(u.map(b=>l.getNumTokens(b.content)))).reduce((b,Z)=>b+Z,0):G=async u=>l(u);let d=_Qe;if(i&&("splitText"in i?d=i.splitText:d=async u=>i(u)),n==="first")return idt(t,{maxTokens:I,tokenCounter:G,textSplitter:d,partialStrategy:a?"first":void 0,endOn:c});if(n==="last")return fxI(t,{maxTokens:I,tokenCounter:G,textSplitter:d,allowPartial:a,includeSystem:s,startOn:r,endOn:c});throw new Error(`Unrecognized strategy: '${n}'. Must be one of 'first' or 'last'.`)}async function idt(t,e){let{maxTokens:I,tokenCounter:l,textSplitter:n,partialStrategy:a,endOn:c}=e,r=[...t],s=0;for(let i=0;i0?r.slice(0,-i):r)<=I){s=r.length-i;break}if(sN!=="type"&&!N.startsWith("lc_"))),W=TQe(G.getType(),{...p,content:Z}),h=[...r.slice(0,s),W];if(await l(h)<=I)r=h,s+=1,i=!0;else break}i&&a==="last"&&(G.content=[...u].reverse())}if(!i){let G=r[s],d;if(Array.isArray(G.content)&&G.content.some(u=>typeof u=="string"||u.type==="text")?d=G.content.find(u=>u.type==="text"&&u.text)?.text:typeof G.content=="string"&&(d=G.content),d){let u=await n(d),b=u.length;a==="last"&&u.reverse();for(let Z=0;Z0&&!oce(r[s-1],i);)s-=1}return r.slice(0,s)}async function fxI(t,e){let{allowPartial:I=!1,includeSystem:l=!1,endOn:n,startOn:a,...c}=e,r=t.map(G=>{let d=Object.fromEntries(Object.entries(G).filter(([u])=>u!=="type"&&!u.startsWith("lc_")));return TQe(G.getType(),d,ZX(G))});if(n){let G=Array.isArray(n)?n:[n];for(;r.length>0&&!oce(r[r.length-1],G);)r=r.slice(0,-1)}let s=l&&r[0]?.getType()==="system",i=s?r.slice(0,1).concat(r.slice(1).reverse()):r.reverse();return i=await idt(i,{...c,partialStrategy:I?"last":void 0,endOn:a}),s?[i[0],...i.slice(1).reverse()]:i.reverse()}function TQe(t,e,I){let l,n;switch(t){case"human":I?l=new No(e):n=new ZI(e);break;case"ai":if(I){let a={...e};"tool_calls"in a&&(a={...a,tool_call_chunks:a.tool_calls?.map(c=>({...c,type:"tool_call_chunk",index:void 0,args:JSON.stringify(c.args)}))}),l=new eI(a)}else n=new He(e);break;case"system":I?l=new Ms(e):n=new Gl(e);break;case"developer":I?l=new Ms({...e,additional_kwargs:{...e.additional_kwargs,__openai_role__:"developer"}}):n=new Gl({...e,additional_kwargs:{...e.additional_kwargs,__openai_role__:"developer"}});break;case"tool":if("tool_call_id"in e)I?l=new bi(e):n=new pt(e);else throw new Error("Can not convert ToolMessage to ToolMessageChunk if 'tool_call_id' field is not defined.");break;case"function":if(I)l=new Dm(e);else{if(!e.name)throw new Error("FunctionMessage must have a 'name' field");n=new WX(e)}break;case"generic":if("role"in e)I?l=new Km(e):n=new Bs(e);else throw new Error("Can not convert ChatMessage to ChatMessageChunk if 'role' field is not defined.");break;default:throw new Error(`Unrecognized message type ${t}`)}if(I&&l)return l;if(n)return n;throw new Error(`Unrecognized message type ${t}`)}function ExI(t){let e=t.getType(),I,l=Object.fromEntries(Object.entries(t).filter(([n])=>!["type","tool_call_chunks"].includes(n)&&!n.startsWith("lc_")));if(e in sdt&&(I=TQe(e,l)),!I)throw new Error(`Unrecognized message chunk class ${e}. Supported classes are ${Object.keys(sdt)}`);return I}function _Qe(t){let e=t.split(` +`);return Promise.resolve([...e.slice(0,-1).map(I=>`${I} +`),e[e.length-1]])}var oce,sdt,Gdt=g(()=>{o();Wo();YH();tG();qS();Lle();EA();kle();Gx();xR();es();oce=(t,e)=>{let I=[...new Set(e?.map(n=>{if(typeof n=="string")return n;let a=new n({});if(!("getType"in a)||typeof a.getType!="function")throw new Error("Invalid type provided.");return a.getType()}))],l=t.getType();return I.some(n=>n===l)};sdt={human:{message:ZI,messageChunk:No},ai:{message:He,messageChunk:eI},system:{message:Gl,messageChunk:Ms},developer:{message:Gl,messageChunk:Ms},tool:{message:pt,messageChunk:bi},function:{message:WX,messageChunk:Dm},generic:{message:Bs,messageChunk:Km},remove:{message:mi,messageChunk:mi}}});var ddt,udt=g(()=>{o();ddt=["tool_call","tool_call_chunk","invalid_tool_call","server_tool_call","server_tool_call_chunk","server_tool_call_result"]});var bdt,mdt=g(()=>{o();bdt=["image","video","audio","text-plain","file"]});var Zdt,pdt=g(()=>{o();udt();mdt();Zdt=["text","reasoning",...ddt,...bdt]});var hdt,NI=g(()=>{o();Ct();TS();jXe();Wo();fle();YH();tG();qS();Lle();EA();kle();Gx();xR();Gdt();pdt();hdt=ve({AIMessage:()=>He,AIMessageChunk:()=>eI,BaseMessage:()=>Ml,BaseMessageChunk:()=>gr,ChatMessage:()=>Bs,ChatMessageChunk:()=>Km,DEFAULT_MERGE_IGNORE_KEYS:()=>PXe,FunctionMessage:()=>WX,FunctionMessageChunk:()=>Dm,HumanMessage:()=>ZI,HumanMessageChunk:()=>No,KNOWN_BLOCK_TYPES:()=>Zdt,RemoveMessage:()=>mi,SystemMessage:()=>Gl,SystemMessageChunk:()=>Ms,ToolMessage:()=>pt,ToolMessageChunk:()=>bi,_isMessageFieldWithRole:()=>Hle,_mergeDicts:()=>Wc,_mergeLists:()=>VH,_mergeObj:()=>wle,_mergeStatus:()=>yle,coerceMessageLikeToMessage:()=>Zi,collapseToolCallChunks:()=>Ule,convertToChunk:()=>oJ,convertToOpenAIImageBlock:()=>Yle,convertToProviderContentBlock:()=>QA,defaultTextSplitter:()=>_Qe,defaultToolCallParser:()=>KS,filterMessages:()=>DJ,getBufferString:()=>FH,iife:()=>jle,isAIMessage:()=>jR,isAIMessageChunk:()=>$S,isBase64ContentBlock:()=>ox,isBaseMessage:()=>ma,isBaseMessageChunk:()=>ZX,isChatMessage:()=>nat,isChatMessageChunk:()=>aat,isDataContentBlock:()=>ho,isDirectToolOutput:()=>_S,isFunctionMessage:()=>cat,isFunctionMessageChunk:()=>rat,isHumanMessage:()=>sat,isHumanMessageChunk:()=>oat,isIDContentBlock:()=>Vle,isMessage:()=>Rle,isOpenAIToolCallArray:()=>Ynt,isPlainTextContentBlock:()=>Mlt,isSystemMessage:()=>iat,isSystemMessageChunk:()=>Gat,isToolMessage:()=>cJ,isToolMessageChunk:()=>$Xe,isURLContentBlock:()=>sx,mapChatMessagesToStoredMessages:()=>uat,mapStoredMessageToChatMessage:()=>PS,mapStoredMessagesToChatMessages:()=>dat,mergeContent:()=>eG,mergeMessageRuns:()=>odt,mergeResponseMetadata:()=>Qle,mergeUsageMetadata:()=>ix,parseBase64DataUrl:()=>ui,parseMimeType:()=>SS,trimMessages:()=>fX})});var PA,_x=g(()=>{o();es();PA=class extends tI{lc_serializable=!0;lc_namespace=["langchain_core","prompts",this._getPromptType()];get lc_attributes(){return{partialVariables:void 0}}inputVariables;outputParser;partialVariables;metadata;tags;constructor(t){super(t);let{inputVariables:e}=t;if(e.includes("stop"))throw new Error("Cannot have an input variable named 'stop', as it is used internally, please rename.");Object.assign(this,t)}async mergePartialAndUserVariables(t){let e=this.partialVariables??{},I={};for(let[l,n]of Object.entries(e))typeof n=="string"?I[l]=n:I[l]=await n();return{...I,...t}}async invoke(t,e){let I={...this.metadata,...e?.metadata},l=[...this.tags??[],...e?.tags??[]];return this._callWithConfig(n=>this.formatPromptValue(n),t,{...e,tags:l,metadata:I,runType:"prompt"})}}});var Wdt,ice,qJ,b_,KQe,PJ=g(()=>{o();Ct();Jb();EA();xR();Wdt=ve({BasePromptValue:()=>ice,ChatPromptValue:()=>b_,ImagePromptValue:()=>KQe,StringPromptValue:()=>qJ}),ice=class extends Xr{},qJ=class extends ice{static lc_name(){return"StringPromptValue"}lc_namespace=["langchain_core","prompt_values"];lc_serializable=!0;value;constructor(t){super({value:t}),this.value=t}toString(){return this.value}toChatMessages(){return[new ZI(this.value)]}},b_=class extends ice{lc_namespace=["langchain_core","prompt_values"];lc_serializable=!0;static lc_name(){return"ChatPromptValue"}messages;constructor(t){Array.isArray(t)&&(t={messages:t}),super(t),this.messages=t.messages}toString(){return FH(this.messages)}toChatMessages(){return this.messages}},KQe=class extends ice{lc_namespace=["langchain_core","prompt_values"];lc_serializable=!0;static lc_name(){return"ImagePromptValue"}imageUrl;value;constructor(t){"imageUrl"in t||(t={imageUrl:t}),super(t),this.imageUrl=t.imageUrl}toString(){return this.imageUrl.url}toChatMessages(){return[new ZI({content:[{type:"image_url",image_url:{detail:this.imageUrl.detail,url:this.imageUrl.url}}]})]}}});var EX,m_=g(()=>{o();PJ();_x();EX=class extends PA{async formatPromptValue(t){return new qJ(await this.format(t))}}});function qQe(t){return typeof t=="function"}function CxI(t){return Dx(t)?"array":typeof t}function DQe(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Ndt(t,e){return t!=null&&typeof t=="object"&&e in t}function LxI(t,e){return t!=null&&typeof t!="object"&&t.hasOwnProperty&&t.hasOwnProperty(e)}function xxI(t,e){return kxI.call(t,e)}function UxI(t){return!xxI(jxI,t)}function zxI(t){return String(t).replace(/[&<>"'`=\/]/g,function(I){return OxI[I]})}function _xI(t,e){if(!t)return[];var I=!1,l=[],n=[],a=[],c=!1,r=!1,s="",i=0;function G(){if(c&&!r)for(;a.length;)delete n[a.pop()];else a=[];c=!1,r=!1}var d,u,b;function Z(w){if(typeof w=="string"&&(w=w.split(MxI,2)),!Dx(w)||w.length!==2)throw new Error("Invalid tags: "+w);d=new RegExp(DQe(w[0])+"\\s*"),u=new RegExp("\\s*"+DQe(w[1])),b=new RegExp("\\s*"+DQe("}"+w[1]))}Z(e||Hp.tags);for(var p=new p_(t),W,h,N,V,R,F;!p.eos();){if(W=p.pos,N=p.scanUntil(d),N)for(var v=0,y=N.length;v"?R=[h,N,W,p.pos,s,i,I]:R=[h,N,W,p.pos],i++,n.push(R),h==="#"||h==="^")l.push(R);else if(h==="/"){if(F=l.pop(),!F)throw new Error('Unopened section "'+N+'" at '+W);if(F[1]!==N)throw new Error('Unclosed section "'+F[1]+'" at '+W)}else h==="name"||h==="{"||h==="&"?r=!0:h==="="&&Z(N)}if(G(),F=l.pop(),F)throw new Error('Unclosed section "'+F[1]+'" at '+p.pos);return DxI(KxI(n))}function KxI(t){for(var e=[],I,l,n=0,a=t.length;n0?l[l.length-1][4]:e;break;default:I.push(n)}return e}function p_(t){this.string=t,this.tail=t,this.pos=0}function Kx(t,e){this.view=t,this.cache={".":this.view},this.parent=e}function Ku(){this.templateCache={_cache:{},set:function(e,I){this._cache[e]=I},get:function(e){return this._cache[e]},clear:function(){this._cache={}}}}var JxI,Dx,kxI,jxI,OxI,BxI,MxI,Vdt,SxI,TxI,Hp,Z_,Gce,Ydt=g(()=>{o();JxI=Object.prototype.toString,Dx=Array.isArray||function(e){return JxI.call(e)==="[object Array]"};kxI=RegExp.prototype.test;jxI=/\S/;OxI={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};BxI=/\s*/,MxI=/\s+/,Vdt=/\s*=/,SxI=/\s*\}/,TxI=/#|\^|\/|>|\{|&|=|!/;p_.prototype.eos=function(){return this.tail===""};p_.prototype.scan=function(e){var I=this.tail.match(e);if(!I||I.index!==0)return"";var l=I[0];return this.tail=this.tail.substring(l.length),this.pos+=l.length,l};p_.prototype.scanUntil=function(e){var I=this.tail.search(e),l;switch(I){case-1:l=this.tail,this.tail="";break;case 0:l="";break;default:l=this.tail.substring(0,I),this.tail=this.tail.substring(I)}return this.pos+=l.length,l};Kx.prototype.push=function(e){return new Kx(e,this)};Kx.prototype.lookup=function(e){var I=this.cache,l;if(I.hasOwnProperty(e))l=I[e];else{for(var n=this,a,c,r,s=!1;n;){if(e.indexOf(".")>0)for(a=n.view,c=e.split("."),r=0;a!=null&&r"?i=this.renderPartial(r,I,l,a):s==="&"?i=this.unescapedValue(r,I):s==="name"?i=this.escapedValue(r,I,a):s==="text"&&(i=this.rawValue(r)),i!==void 0&&(c+=i);return c};Ku.prototype.renderSection=function(e,I,l,n,a){var c=this,r="",s=I.lookup(e[1]);function i(u){return c.render(u,I,l,a)}if(s){if(Dx(s))for(var G=0,d=s.length;G0||!l)&&(a[c]=n+a[c]);return a.join(` +`)};Ku.prototype.renderPartial=function(e,I,l,n){if(l){var a=this.getConfigTags(n),c=qQe(l)?l(e[1]):l[e[1]];if(c!=null){var r=e[6],s=e[5],i=e[4],G=c;s==0&&i&&(G=this.indentPartial(c,i,r));var d=this.parse(G,a);return this.renderTokens(d,I,l,G,n)}}};Ku.prototype.unescapedValue=function(e,I){var l=I.lookup(e[1]);if(l!=null)return l};Ku.prototype.escapedValue=function(e,I,l){var n=this.getConfigEscape(l)||Hp.escape,a=I.lookup(e[1]);if(a!=null)return typeof a=="number"&&n===Hp.escape?String(a):n(a)};Ku.prototype.rawValue=function(e){return e[1]};Ku.prototype.getConfigTags=function(e){return Dx(e)?e:e&&typeof e=="object"?e.tags:void 0};Ku.prototype.getConfigEscape=function(e){if(e&&typeof e=="object"&&!Dx(e))return e.escape};Hp={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(t){Z_.templateCache=t},get templateCache(){return Z_.templateCache}},Z_=new Ku;Hp.clearCache=function(){return Z_.clearCache()};Hp.parse=function(e,I){return Z_.parse(e,I)};Hp.render=function(e,I,l,n){if(typeof e!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+CxI(e)+'" was given as the first argument for mustache#render(template, view, partials)');return Z_.render(e,I,l,n)};Hp.escape=zxI;Hp.Scanner=p_;Hp.Context=Kx;Hp.Writer=Ku;Gce=Hp});function Rdt(){Gce.escape=t=>t}var $J,Adt,qx,PQe,$Qe,h_,efe,cG,eC,JX,tC=g(()=>{o();hX();Ydt();$J=t=>{let e=t.split(""),I=[],l=(a,c)=>{for(let r=c;r{let I=[];for(let l of t)if(l[0]==="name"){let n=l[1].includes(".")?l[1].split(".")[0]:l[1];I.push({type:"variable",name:n})}else if(["#","&","^",">"].includes(l[0])){if(I.push({type:"variable",name:l[1]}),l[0]==="#"&&l.length>4&&Array.isArray(l[4])){let n=[...e,l[1]],a=Adt(l[4],n);I.push(...a)}}else I.push({type:"literal",text:l[1]});return I},qx=t=>(Rdt(),Adt(Gce.parse(t))),PQe=(t,e)=>$J(t).reduce((I,l)=>{if(l.type==="variable"){if(l.name in e)return I+(typeof e[l.name]=="string"?e[l.name]:JSON.stringify(e[l.name]));throw new Error(`(f-string) Missing value for input ${l.name}`)}return I+l.text},""),$Qe=(t,e)=>(Rdt(),Gce.render(t,e)),h_={"f-string":PQe,mustache:$Qe},efe={"f-string":$J,mustache:qx},cG=(t,e,I)=>{try{return h_[e](t,I)}catch(l){throw pX(l,"INVALID_PROMPT_INPUT")}},eC=(t,e)=>efe[e](t),JX=(t,e,I)=>{if(!(e in h_))throw new Error(`Invalid template format. Got \`${e}\`; + should be one of ${Object.keys(h_)}`);try{let l=Object.fromEntries(I.map(n=>[n,"foo"]));Array.isArray(t)?t.forEach(n=>{if(n.type==="text"&&"text"in n&&typeof n.text=="string")cG(n.text,e,l);else if(n.type==="image_url"){if(typeof n.image_url=="string")cG(n.image_url,e,l);else if(typeof n.image_url=="object"&&n.image_url!==null&&"url"in n.image_url&&typeof n.image_url.url=="string"){let a=n.image_url.url;cG(a,e,l)}}else throw new Error(`Invalid message template received. ${JSON.stringify(n,null,2)}`)}):cG(t,e,l)}catch(l){throw new Error(`Invalid prompt schema: ${l.message}`)}}});var Ts,dce=g(()=>{o();m_();tC();Ts=class W_ extends EX{static lc_name(){return"PromptTemplate"}template;templateFormat="f-string";validateTemplate=!0;additionalContentFields;constructor(e){if(super(e),e.templateFormat==="mustache"&&e.validateTemplate===void 0&&(this.validateTemplate=!1),Object.assign(this,e),this.validateTemplate){if(this.templateFormat==="mustache")throw new Error("Mustache templates cannot be validated.");let I=this.inputVariables;this.partialVariables&&(I=I.concat(Object.keys(this.partialVariables))),JX(this.template,this.templateFormat,I)}}_getPromptType(){return"prompt"}async format(e){let I=await this.mergePartialAndUserVariables(e);return cG(this.template,this.templateFormat,I)}static fromExamples(e,I,l,n=` + +`,a=""){return new W_({inputVariables:l,template:[a,...e,I].join(n)})}static fromTemplate(e,I){let{templateFormat:l="f-string",...n}=I??{},a=new Set;return eC(e,l).forEach(c=>{c.type==="variable"&&a.add(c.name)}),new W_({inputVariables:[...a],templateFormat:l,template:e,...n})}async partial(e){let I=this.inputVariables.filter(n=>!(n in e)),l={...this.partialVariables??{},...e};return new W_({...this,inputVariables:I,partialVariables:l})}serialize(){if(this.outputParser!==void 0)throw new Error("Cannot serialize a prompt template with an output parser");return{_type:this._getPromptType(),input_variables:this.inputVariables,template:this.template,template_format:this.templateFormat}}static async deserialize(e){if(!e.template)throw new Error("Prompt template must have a template");return new W_({inputVariables:e.input_variables,template:e.template,templateFormat:e.template_format})}}});var DH,tfe=g(()=>{o();PJ();_x();tC();DH=class Fdt extends PA{static lc_name(){return"ImagePromptTemplate"}lc_namespace=["langchain_core","prompts","image"];template;templateFormat="f-string";validateTemplate=!0;additionalContentFields;constructor(e){if(super(e),this.template=e.template,this.templateFormat=e.templateFormat??this.templateFormat,this.validateTemplate=e.validateTemplate??this.validateTemplate,this.additionalContentFields=e.additionalContentFields,this.validateTemplate){let I=this.inputVariables;this.partialVariables&&(I=I.concat(Object.keys(this.partialVariables))),JX([{type:"image_url",image_url:this.template}],this.templateFormat,I)}}_getPromptType(){return"prompt"}async partial(e){let I=this.inputVariables.filter(n=>!(n in e)),l={...this.partialVariables??{},...e};return new Fdt({...this,inputVariables:I,partialVariables:l})}async format(e){let I={};for(let[c,r]of Object.entries(this.template))typeof r=="string"?I[c]=cG(r,this.templateFormat,e):I[c]=r;let l=e.url||I.url,n=e.detail||I.detail;if(!l)throw new Error("Must provide either an image URL.");if(typeof l!="string")throw new Error("url must be a string.");let a={url:l};return n&&(a.detail=n),a}async formatPromptValue(e){return new KQe(await this.format(e))}}});function Ife(t,e){let I=[];for(let l of Object.values(t))if(typeof l=="string")eC(l,e).forEach(n=>{n.type==="variable"&&I.push(n.name)});else if(Array.isArray(l))for(let n of l)typeof n=="string"?eC(n,e).forEach(a=>{a.type==="variable"&&I.push(a.name)}):typeof n=="object"&&I.push(...Ife(n,e));else typeof l=="object"&&l!==null&&I.push(...Ife(l,e));return Array.from(new Set(I))}function lfe(t,e,I){let l={};for(let[n,a]of Object.entries(t))if(typeof a=="string")l[n]=cG(a,I,e);else if(Array.isArray(a)){let c=[];for(let r of a)typeof r=="string"?c.push(cG(r,I,e)):typeof r=="object"&&c.push(lfe(r,e,I));l[n]=c}else typeof a=="object"&&a!==null?l[n]=lfe(a,e,I):l[n]=a;return l}var N_,nfe=g(()=>{o();es();tC();N_=class extends tI{lc_namespace=["langchain_core","prompts","dict"];lc_serializable=!0;template;templateFormat;inputVariables;static lc_name(){return"DictPromptTemplate"}constructor(t){let e=t.templateFormat??"f-string",I=Ife(t.template,e);super({inputVariables:I,...t}),this.template=t.template,this.templateFormat=e,this.inputVariables=I}async format(t){return lfe(this.template,t,this.templateFormat)}async invoke(t){return await this._callWithConfig(this.format.bind(this),t,{runType:"prompt"})}}});function qxI(t){return t===null||typeof t!="object"||Array.isArray(t)?!1:Object.keys(t).length===1&&"text"in t&&typeof t.text=="string"}function PxI(t){return t===null||typeof t!="object"||Array.isArray(t)?!1:"image_url"in t&&(typeof t.image_url=="string"||typeof t.image_url=="object"&&t.image_url!==null&&"url"in t.image_url&&typeof t.image_url.url=="string")}function $xI(t){return typeof t.formatMessages=="function"}function e3I(t,e){if($xI(t)||ma(t))return t;if(Array.isArray(t)&&t[0]==="placeholder"){let n=t[1];if(e?.templateFormat==="mustache"&&typeof n=="string"&&n.slice(0,2)==="{{"&&n.slice(-2)==="}}")return new Px({variableName:n.slice(2,-2),optional:!0});if(typeof n=="string"&&n[0]==="{"&&n[n.length-1]==="}")return new Px({variableName:n.slice(1,-1),optional:!0});throw new Error(`Invalid placeholder template for format ${e?.templateFormat??'"f-string"'}: "${t[1]}". Expected a variable name surrounded by ${e?.templateFormat==="mustache"?"double":"single"} curly braces.`)}let I=Zi(t),l;if(typeof I.content=="string"?l=I.content:l=I.content.map(n=>"text"in n?{...n,text:n.text}:"image_url"in n?{...n,image_url:n.image_url}:n),I._getType()==="human")return $x.fromTemplate(l,e);if(I._getType()==="ai")return A_.fromTemplate(l,e);if(I._getType()==="system")return IC.fromTemplate(l,e);if(Bs.isInstance(I))return R_.fromTemplate(I.content,I.role,e);throw new Error(`Could not coerce message prompt template from input. Received message type: "${I._getType()}".`)}function t3I(t){return t.constructor.lc_name()==="MessagesPlaceholder"}var V_,Px,afe,Y_,R_,cfe,$x,A_,IC,qH,F_=g(()=>{o();hX();Wo();tG();qS();EA();Gx();xR();es();NI();PJ();_x();m_();tC();dce();tfe();nfe();V_=class extends tI{lc_namespace=["langchain_core","prompts","chat"];lc_serializable=!0;async invoke(t,e){return this._callWithConfig(I=>this.formatMessages(I),t,{...e,runType:"prompt"})}},Px=class extends V_{static lc_name(){return"MessagesPlaceholder"}variableName;optional;constructor(t){typeof t=="string"&&(t={variableName:t}),super(t),this.variableName=t.variableName,this.optional=t.optional??!1}get inputVariables(){return[this.variableName]}async formatMessages(t){let e=t[this.variableName];if(this.optional&&!e)return[];if(!e){let l=new Error(`Field "${this.variableName}" in prompt uses a MessagesPlaceholder, which expects an array of BaseMessages as an input value. Received: undefined`);throw l.name="InputFormatError",l}let I;try{Array.isArray(e)?I=e.map(Zi):I=[Zi(e)]}catch(l){let n=typeof e=="string"?e:JSON.stringify(e,null,2),a=new Error([`Field "${this.variableName}" in prompt uses a MessagesPlaceholder, which expects an array of BaseMessages or coerceable values as input.`,`Received value: ${n}`,`Additional message: ${l.message}`].join(` + +`));throw a.name="InputFormatError",a.lc_error_code=l.lc_error_code,a}return I}},afe=class extends V_{prompt;constructor(t){"prompt"in t||(t={prompt:t}),super(t),this.prompt=t.prompt}get inputVariables(){return this.prompt.inputVariables}async formatMessages(t){return[await this.format(t)]}},Y_=class extends PA{constructor(t){super(t)}async format(t){return(await this.formatPromptValue(t)).toString()}async formatPromptValue(t){return new b_(await this.formatMessages(t))}},R_=class extends afe{static lc_name(){return"ChatMessagePromptTemplate"}role;constructor(t,e){"prompt"in t||(t={prompt:t,role:e}),super(t),this.role=t.role}async format(t){return new Bs(await this.prompt.format(t),this.role)}static fromTemplate(t,e,I){return new this(Ts.fromTemplate(t,{templateFormat:I?.templateFormat}),e)}};cfe=class extends V_{lc_namespace=["langchain_core","prompts","chat"];lc_serializable=!0;inputVariables=[];additionalOptions={};prompt;messageClass;static _messageClass(){throw new Error("Can not invoke _messageClass from inside _StringImageMessagePromptTemplate")}chatMessageClass;constructor(t,e){if("prompt"in t||(t={prompt:t}),super(t),this.prompt=t.prompt,Array.isArray(this.prompt)){let I=[];this.prompt.forEach(l=>{"inputVariables"in l&&(I=I.concat(l.inputVariables))}),this.inputVariables=I}else this.inputVariables=this.prompt.inputVariables;this.additionalOptions=e??this.additionalOptions}createMessage(t){let e=this.constructor;if(e._messageClass())return new(e._messageClass())({content:t});if(e.chatMessageClass){let I=e.chatMessageClass();return new I({content:t,role:this.getRoleFromMessageClass(I.lc_name())})}else throw new Error("No message class defined")}getRoleFromMessageClass(t){switch(t){case"HumanMessage":return"human";case"AIMessage":return"ai";case"SystemMessage":return"system";case"ChatMessage":return"chat";default:throw new Error("Invalid message class name")}}static fromTemplate(t,e){if(typeof t=="string")return new this(Ts.fromTemplate(t,e));let I=[];for(let l of t)if(typeof l=="string")I.push(Ts.fromTemplate(l,e));else if(l!==null)if(qxI(l)){let n="";typeof l.text=="string"&&(n=l.text??"");let a={...e,additionalContentFields:l};I.push(Ts.fromTemplate(n,a))}else if(PxI(l)){let n=l.image_url??"",a,c=[];if(typeof n=="string"){let r;e?.templateFormat==="mustache"?r=qx(n):r=$J(n);let s=r.flatMap(i=>i.type==="variable"?[i.name]:[]);if((s?.length??0)>0){if(s.length>1)throw new Error(`Only one format variable allowed per image template. +Got: ${s} +From: ${n}`);c=[s[0]]}else c=[];n={url:n},a=new DH({template:n,inputVariables:c,templateFormat:e?.templateFormat,additionalContentFields:l})}else if(typeof n=="object"){if("url"in n){let r;e?.templateFormat==="mustache"?r=qx(n.url):r=$J(n.url),c=r.flatMap(s=>s.type==="variable"?[s.name]:[])}else c=[];a=new DH({template:n,inputVariables:c,templateFormat:e?.templateFormat,additionalContentFields:l})}else throw new Error("Invalid image template");I.push(a)}else typeof l=="object"&&I.push(new N_({template:l,templateFormat:e?.templateFormat}));return new this({prompt:I,additionalOptions:e})}async format(t){if(this.prompt instanceof EX){let e=await this.prompt.format(t);return this.createMessage(e)}else{let e=[];for(let I of this.prompt){let l={};if(!("inputVariables"in I))throw new Error(`Prompt ${I} does not have inputVariables defined.`);for(let n of I.inputVariables)l||(l={[n]:t[n]}),l={...l,[n]:t[n]};if(I instanceof EX){let n=await I.format(l),a;"additionalContentFields"in I&&(a=I.additionalContentFields),n!==""&&e.push({...a,type:"text",text:n})}else if(I instanceof DH){let n=await I.format(l),a;"additionalContentFields"in I&&(a=I.additionalContentFields),e.push({...a,type:"image_url",image_url:n})}else if(I instanceof N_){let n=await I.format(l),a;"additionalContentFields"in I&&(a=I.additionalContentFields),e.push({...a,...n})}}return this.createMessage(e)}}async formatMessages(t){return[await this.format(t)]}},$x=class extends cfe{static _messageClass(){return ZI}static lc_name(){return"HumanMessagePromptTemplate"}},A_=class extends cfe{static _messageClass(){return He}static lc_name(){return"AIMessagePromptTemplate"}},IC=class extends cfe{static _messageClass(){return Gl}static lc_name(){return"SystemMessagePromptTemplate"}};qH=class uce extends Y_{static lc_name(){return"ChatPromptTemplate"}get lc_aliases(){return{promptMessages:"messages"}}promptMessages;validateTemplate=!0;templateFormat="f-string";constructor(e){if(super(e),e.templateFormat==="mustache"&&e.validateTemplate===void 0&&(this.validateTemplate=!1),Object.assign(this,e),this.validateTemplate){let I=new Set;for(let r of this.promptMessages)if(!(r instanceof Ml))for(let s of r.inputVariables)I.add(s);let l=this.inputVariables,n=new Set(this.partialVariables?l.concat(Object.keys(this.partialVariables)):l),a=new Set([...n].filter(r=>!I.has(r)));if(a.size>0)throw new Error(`Input variables \`${[...a]}\` are not used in any of the prompt messages.`);let c=new Set([...I].filter(r=>!n.has(r)));if(c.size>0)throw new Error(`Input variables \`${[...c]}\` are used in prompt messages but not in the prompt template.`)}}_getPromptType(){return"chat"}async _parseImagePrompts(e,I){return typeof e.content=="string"||(e.content=await Promise.all(e.content.map(async l=>{if(l.type!=="image_url")return l;let n="";typeof l.image_url=="string"?n=l.image_url:typeof l.image_url=="object"&&l.image_url!==null&&"url"in l.image_url&&typeof l.image_url.url=="string"&&(n=l.image_url.url);let a=await Ts.fromTemplate(n,{templateFormat:this.templateFormat}).format(I);return typeof l.image_url=="object"&&l.image_url!==null&&"url"in l.image_url?l.image_url.url=a:l.image_url=a,l}))),e}async formatMessages(e){let I=await this.mergePartialAndUserVariables(e),l=[];for(let n of this.promptMessages)if(n instanceof Ml)l.push(await this._parseImagePrompts(n,I));else{let a;this.templateFormat==="mustache"?a={...I}:a=n.inputVariables.reduce((r,s)=>{if(!(s in I)&&!(t3I(n)&&n.optional))throw pX(new Error(`Missing value for input variable \`${s.toString()}\``),"INVALID_PROMPT_INPUT");return r[s]=I[s],r},{});let c=await n.formatMessages(a);l=l.concat(c)}return l}async partial(e){let I=this.inputVariables.filter(n=>!(n in e)),l={...this.partialVariables??{},...e};return new uce({...this,inputVariables:I,partialVariables:l})}static fromTemplate(e,I){let l=new $x({prompt:Ts.fromTemplate(e,I)});return this.fromMessages([l])}static fromMessages(e,I){let l=e.reduce((c,r)=>c.concat(r instanceof uce?r.promptMessages:[e3I(r,I)]),[]),n=e.reduce((c,r)=>r instanceof uce?Object.assign(c,r.partialVariables):c,Object.create(null)),a=new Set;for(let c of l)if(!(c instanceof Ml))for(let r of c.inputVariables)r in n||a.add(r);return new this({...I,inputVariables:[...a],promptMessages:l,partialVariables:n,templateFormat:I?.templateFormat})}}});var Xdt,gdt,ydt=g(()=>{o();m_();tC();dce();F_();Xdt=class rfe extends EX{lc_serializable=!1;examples;exampleSelector;examplePrompt;suffix="";exampleSeparator=` + +`;prefix="";templateFormat="f-string";validateTemplate=!0;constructor(e){if(super(e),Object.assign(this,e),this.examples!==void 0&&this.exampleSelector!==void 0)throw new Error("Only one of 'examples' and 'example_selector' should be provided");if(this.examples===void 0&&this.exampleSelector===void 0)throw new Error("One of 'examples' and 'example_selector' should be provided");if(this.validateTemplate){let I=this.inputVariables;this.partialVariables&&(I=I.concat(Object.keys(this.partialVariables))),JX(this.prefix+this.suffix,this.templateFormat,I)}}_getPromptType(){return"few_shot"}static lc_name(){return"FewShotPromptTemplate"}async getExamples(e){if(this.examples!==void 0)return this.examples;if(this.exampleSelector!==void 0)return this.exampleSelector.selectExamples(e);throw new Error("One of 'examples' and 'example_selector' should be provided")}async partial(e){let I=this.inputVariables.filter(n=>!(n in e)),l={...this.partialVariables??{},...e};return new rfe({...this,inputVariables:I,partialVariables:l})}async format(e){let I=await this.mergePartialAndUserVariables(e),l=await this.getExamples(I),n=await Promise.all(l.map(a=>this.examplePrompt.format(a)));return cG([this.prefix,...n,this.suffix].join(this.exampleSeparator),this.templateFormat,I)}serialize(){if(this.exampleSelector||!this.examples)throw new Error("Serializing an example selector is not currently supported");if(this.outputParser!==void 0)throw new Error("Serializing an output parser is not currently supported");return{_type:this._getPromptType(),input_variables:this.inputVariables,example_prompt:this.examplePrompt.serialize(),example_separator:this.exampleSeparator,suffix:this.suffix,prefix:this.prefix,template_format:this.templateFormat,examples:this.examples}}static async deserialize(e){let{example_prompt:I}=e;if(!I)throw new Error("Missing example prompt");let l=await Ts.deserialize(I),n;if(Array.isArray(e.examples))n=e.examples;else throw new Error("Invalid examples format. Only list or string are supported.");return new rfe({inputVariables:e.input_variables,examplePrompt:l,examples:n,exampleSeparator:e.example_separator,prefix:e.prefix,suffix:e.suffix,templateFormat:e.template_format})}},gdt=class vdt extends Y_{lc_serializable=!0;examples;exampleSelector;examplePrompt;suffix="";exampleSeparator=` + +`;prefix="";templateFormat="f-string";validateTemplate=!0;_getPromptType(){return"few_shot_chat"}static lc_name(){return"FewShotChatMessagePromptTemplate"}constructor(e){if(super(e),this.examples=e.examples,this.examplePrompt=e.examplePrompt,this.exampleSeparator=e.exampleSeparator??` + +`,this.exampleSelector=e.exampleSelector,this.prefix=e.prefix??"",this.suffix=e.suffix??"",this.templateFormat=e.templateFormat??"f-string",this.validateTemplate=e.validateTemplate??!0,this.examples!==void 0&&this.exampleSelector!==void 0)throw new Error("Only one of 'examples' and 'example_selector' should be provided");if(this.examples===void 0&&this.exampleSelector===void 0)throw new Error("One of 'examples' and 'example_selector' should be provided");if(this.validateTemplate){let I=this.inputVariables;this.partialVariables&&(I=I.concat(Object.keys(this.partialVariables))),JX(this.prefix+this.suffix,this.templateFormat,I)}}async getExamples(e){if(this.examples!==void 0)return this.examples;if(this.exampleSelector!==void 0)return this.exampleSelector.selectExamples(e);throw new Error("One of 'examples' and 'example_selector' should be provided")}async formatMessages(e){let I=await this.mergePartialAndUserVariables(e),l=await this.getExamples(I);l=l.map(a=>{let c={};return this.examplePrompt.inputVariables.forEach(r=>{c[r]=a[r]}),c});let n=[];for(let a of l){let c=await this.examplePrompt.formatMessages(a);n.push(...c)}return n}async format(e){let I=await this.mergePartialAndUserVariables(e),l=await this.getExamples(I),n=(await Promise.all(l.map(a=>this.examplePrompt.formatMessages(a)))).flat().map(a=>a.content);return cG([this.prefix,...n,this.suffix].join(this.exampleSeparator),this.templateFormat,I)}async partial(e){let I=this.inputVariables.filter(n=>!(n in e)),l={...this.partialVariables??{},...e};return new vdt({...this,inputVariables:I,partialVariables:l})}}});var mce,wdt=g(()=>{o();_x();F_();mce=class bce extends PA{static lc_name(){return"PipelinePromptTemplate"}pipelinePrompts;finalPrompt;constructor(e){super({...e,inputVariables:[]}),this.pipelinePrompts=e.pipelinePrompts,this.finalPrompt=e.finalPrompt,this.inputVariables=this.computeInputValues()}computeInputValues(){let e=this.pipelinePrompts.map(l=>l.name),I=this.pipelinePrompts.map(l=>l.prompt.inputVariables.filter(n=>!e.includes(n))).flat();return[...new Set(I)]}static extractRequiredInputValues(e,I){return I.reduce((l,n)=>(l[n]=e[n],l),{})}async formatPipelinePrompts(e){let I=await this.mergePartialAndUserVariables(e);for(let{name:l,prompt:n}of this.pipelinePrompts){let a=bce.extractRequiredInputValues(I,n.inputVariables);n instanceof qH?I[l]=await n.formatMessages(a):I[l]=await n.format(a)}return bce.extractRequiredInputValues(I,this.finalPrompt.inputVariables)}async formatPromptValue(e){return this.finalPrompt.formatPromptValue(await this.formatPipelinePrompts(e))}async format(e){return this.finalPrompt.format(await this.formatPipelinePrompts(e))}async partial(e){let I={...this};return I.inputVariables=this.inputVariables.filter(l=>!(l in e)),I.partialVariables={...this.partialVariables??{},...e},new bce(I)}serialize(){throw new Error("Not implemented.")}_getPromptType(){return"pipeline"}}});function Hdt(t){return typeof t=="object"&&t!=null&&"withStructuredOutput"in t&&typeof t.withStructuredOutput=="function"}function I3I(t){return typeof t=="object"&&t!=null&&"lc_id"in t&&Array.isArray(t.lc_id)&&t.lc_id.join("/")==="langchain_core/runnables/RunnableBinding"}var Qdt,Edt=g(()=>{o();es();F_();Qdt=class fdt extends qH{schema;method;lc_namespace=["langchain_core","prompts","structured"];get lc_aliases(){return{...super.lc_aliases,schema:"schema_"}}constructor(e){super(e),this.schema=e.schema,this.method=e.method}pipe(e){if(Hdt(e))return super.pipe(e.withStructuredOutput(this.schema));if(I3I(e)&&Hdt(e.bound))return super.pipe(new ha({bound:e.bound.withStructuredOutput(this.schema,...this.method?[{method:this.method}]:[]),kwargs:e.kwargs??{},config:e.config,configFactories:e.configFactories}));throw new Error('Structured prompts need to be piped to a language model that supports the "withStructuredOutput()" method.')}static fromMessagesAndSchema(e,I,l){return fdt.fromMessages(e,{schema:I,method:l})}}});var Jdt,X_=g(()=>{o();Ct();_x();m_();tC();dce();tfe();nfe();F_();ydt();wdt();Edt();Jdt=ve({AIMessagePromptTemplate:()=>A_,BaseChatPromptTemplate:()=>Y_,BaseMessagePromptTemplate:()=>V_,BaseMessageStringPromptTemplate:()=>afe,BasePromptTemplate:()=>PA,BaseStringPromptTemplate:()=>EX,ChatMessagePromptTemplate:()=>R_,ChatPromptTemplate:()=>qH,DEFAULT_FORMATTER_MAPPING:()=>h_,DEFAULT_PARSER_MAPPING:()=>efe,DictPromptTemplate:()=>N_,FewShotChatMessagePromptTemplate:()=>gdt,FewShotPromptTemplate:()=>Xdt,HumanMessagePromptTemplate:()=>$x,ImagePromptTemplate:()=>DH,MessagesPlaceholder:()=>Px,PipelinePromptTemplate:()=>mce,PromptTemplate:()=>Ts,StructuredPrompt:()=>Qdt,SystemMessagePromptTemplate:()=>IC,checkValidTemplate:()=>JX,interpolateFString:()=>PQe,interpolateMustache:()=>$Qe,parseFString:()=>$J,parseMustache:()=>qx,parseTemplate:()=>eC,renderTemplate:()=>cG})});var t3=Y((Uva,_dt)=>{o();var l3I="Expected a function",jdt="__lodash_hash_undefined__",Udt=1/0,n3I="[object Function]",a3I="[object GeneratorFunction]",c3I="[object Symbol]",r3I=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s3I=/^\w*$/,o3I=/^\./,i3I=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,G3I=/[\\^$.*+?()[\]{}|]/g,d3I=/\\(\\)?/g,u3I=/^\[object .+?Constructor\]$/,b3I=typeof global=="object"&&global&&global.Object===Object&&global,m3I=typeof self=="object"&&self&&self.Object===Object&&self,ofe=b3I||m3I||Function("return this")();function Z3I(t,e){return t?.[e]}function p3I(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch{}return e}var h3I=Array.prototype,W3I=Function.prototype,Odt=Object.prototype,sfe=ofe["__core-js_shared__"],Cdt=function(){var t=/[^.]+$/.exec(sfe&&sfe.keys&&sfe.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),zdt=W3I.toString,ife=Odt.hasOwnProperty,Bdt=Odt.toString,N3I=RegExp("^"+zdt.call(ife).replace(G3I,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ldt=ofe.Symbol,V3I=h3I.splice,Y3I=Mdt(ofe,"Map"),g_=Mdt(Object,"create"),kdt=Ldt?Ldt.prototype:void 0,xdt=kdt?kdt.toString:void 0;function lC(t){var e=-1,I=t?t.length:0;for(this.clear();++e-1}function Q3I(t,e){var I=this.__data__,l=Zce(I,t);return l<0?I.push([t,e]):I[l][1]=e,this}e3.prototype.clear=v3I;e3.prototype.delete=y3I;e3.prototype.get=w3I;e3.prototype.has=H3I;e3.prototype.set=Q3I;function nC(t){var e=-1,I=t?t.length:0;for(this.clear();++e{"use strict";o();aZ.__esModule=!0;aZ.extend=Kdt;aZ.indexOf=ljI;aZ.escapeExpression=njI;aZ.isEmpty=ajI;aZ.createFrame=cjI;aZ.blockParams=rjI;aZ.appendContextPath=sjI;var $3I={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},ejI=/[&<>"'`=]/g,tjI=/[&<>"'`=]/;function IjI(t){return $3I[t]}function Kdt(t){for(var e=1;e{"use strict";o();hce.__esModule=!0;var mfe=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function Zfe(t,e){var I=e&&e.loc,l=void 0,n=void 0,a=void 0,c=void 0;I&&(l=I.start.line,n=I.end.line,a=I.start.column,c=I.end.column,t+=" - "+l+":"+a);for(var r=Error.prototype.constructor.call(this,t),s=0;s{"use strict";o();Wce.__esModule=!0;var pfe=Du();Wce.default=function(t){t.registerHelper("blockHelperMissing",function(e,I){var l=I.inverse,n=I.fn;if(e===!0)return n(this);if(e===!1||e==null)return l(this);if(pfe.isArray(e))return e.length>0?(I.ids&&(I.ids=[I.name]),t.helpers.each(e,I)):l(this);if(I.data&&I.ids){var a=pfe.createFrame(I.data);a.contextPath=pfe.appendContextPath(I.data.contextPath,I.name),I={data:a}}return n(e,I)})};Pdt.exports=Wce.default});var tut=Y((Nce,eut)=>{"use strict";o();Nce.__esModule=!0;function ojI(t){return t&&t.__esModule?t:{default:t}}var v_=Du(),ijI=cZ(),GjI=ojI(ijI);Nce.default=function(t){t.registerHelper("each",function(e,I){if(!I)throw new GjI.default("Must pass iterator to #each");var l=I.fn,n=I.inverse,a=0,c="",r=void 0,s=void 0;I.data&&I.ids&&(s=v_.appendContextPath(I.data.contextPath,I.ids[0])+"."),v_.isFunction(e)&&(e=e.call(this)),I.data&&(r=v_.createFrame(I.data));function i(Z,p,W){r&&(r.key=Z,r.index=p,r.first=p===0,r.last=!!W,s&&(r.contextPath=s+Z)),c=c+l(e[Z],{data:r,blockParams:v_.blockParams([e[Z],Z],[s+Z,null])})}if(e&&typeof e=="object")if(v_.isArray(e))for(var G=e.length;a{"use strict";o();Vce.__esModule=!0;function djI(t){return t&&t.__esModule?t:{default:t}}var ujI=cZ(),bjI=djI(ujI);Vce.default=function(t){t.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new bjI.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};Iut.exports=Vce.default});var rut=Y((Yce,cut)=>{"use strict";o();Yce.__esModule=!0;function mjI(t){return t&&t.__esModule?t:{default:t}}var nut=Du(),ZjI=cZ(),aut=mjI(ZjI);Yce.default=function(t){t.registerHelper("if",function(e,I){if(arguments.length!=2)throw new aut.default("#if requires exactly one argument");return nut.isFunction(e)&&(e=e.call(this)),!I.hash.includeZero&&!e||nut.isEmpty(e)?I.inverse(this):I.fn(this)}),t.registerHelper("unless",function(e,I){if(arguments.length!=2)throw new aut.default("#unless requires exactly one argument");return t.helpers.if.call(this,e,{fn:I.inverse,inverse:I.fn,hash:I.hash})})};cut.exports=Yce.default});var out=Y((Rce,sut)=>{"use strict";o();Rce.__esModule=!0;Rce.default=function(t){t.registerHelper("log",function(){for(var e=[void 0],I=arguments[arguments.length-1],l=0;l{"use strict";o();Ace.__esModule=!0;Ace.default=function(t){t.registerHelper("lookup",function(e,I,l){return e&&l.lookupProperty(e,I)})};iut.exports=Ace.default});var uut=Y((Fce,dut)=>{"use strict";o();Fce.__esModule=!0;function pjI(t){return t&&t.__esModule?t:{default:t}}var y_=Du(),hjI=cZ(),WjI=pjI(hjI);Fce.default=function(t){t.registerHelper("with",function(e,I){if(arguments.length!=2)throw new WjI.default("#with requires exactly one argument");y_.isFunction(e)&&(e=e.call(this));var l=I.fn;if(y_.isEmpty(e))return I.inverse(this);var n=I.data;return I.data&&I.ids&&(n=y_.createFrame(I.data),n.contextPath=y_.appendContextPath(I.data.contextPath,I.ids[0])),l(e,{data:n,blockParams:y_.blockParams([e],[n&&n.contextPath])})})};dut.exports=Fce.default});var hfe=Y(Xce=>{"use strict";o();Xce.__esModule=!0;Xce.registerDefaultHelpers=EjI;Xce.moveHelperToHooks=JjI;function aC(t){return t&&t.__esModule?t:{default:t}}var NjI=$dt(),VjI=aC(NjI),YjI=tut(),RjI=aC(YjI),AjI=lut(),FjI=aC(AjI),XjI=rut(),gjI=aC(XjI),vjI=out(),yjI=aC(vjI),wjI=Gut(),HjI=aC(wjI),QjI=uut(),fjI=aC(QjI);function EjI(t){VjI.default(t),RjI.default(t),FjI.default(t),gjI.default(t),yjI.default(t),HjI.default(t),fjI.default(t)}function JjI(t,e,I){t.helpers[e]&&(t.hooks[e]=t.helpers[e],I||(t.helpers[e]=void 0))}});var mut=Y((gce,but)=>{"use strict";o();gce.__esModule=!0;var CjI=Du();gce.default=function(t){t.registerDecorator("inline",function(e,I,l,n){var a=e;return I.partials||(I.partials={},a=function(c,r){var s=l.partials;l.partials=CjI.extend({},s,I.partials);var i=e(c,r);return l.partials=s,i}),I.partials[n.args[0]]=n.fn,a})};but.exports=gce.default});var Zut=Y(Wfe=>{"use strict";o();Wfe.__esModule=!0;Wfe.registerDefaultDecorators=jjI;function LjI(t){return t&&t.__esModule?t:{default:t}}var kjI=mut(),xjI=LjI(kjI);function jjI(t){xjI.default(t)}});var Nfe=Y((vce,put)=>{"use strict";o();vce.__esModule=!0;var UjI=Du(),I3={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(e){if(typeof e=="string"){var I=UjI.indexOf(I3.methodMap,e.toLowerCase());I>=0?e=I:e=parseInt(e,10)}return e},log:function(e){if(e=I3.lookupLevel(e),typeof console<"u"&&I3.lookupLevel(I3.level)<=e){var I=I3.methodMap[e];console[I]||(I="log");for(var l=arguments.length,n=Array(l>1?l-1:0),a=1;a{"use strict";o();w_.__esModule=!0;w_.createProtoAccessControl=MjI;w_.resultIsAllowed=SjI;w_.resetLoggedProperties=_jI;function OjI(t){return t&&t.__esModule?t:{default:t}}var hut=Du(),zjI=Nfe(),BjI=OjI(zjI),yce=Object.create(null);function MjI(t){var e=Object.create(null);e.__proto__=!1,hut.extend(e,t.allowedProtoProperties);var I=Object.create(null);return I.constructor=!1,I.__defineGetter__=!1,I.__defineSetter__=!1,I.__lookupGetter__=!1,I.__lookupSetter__=!1,hut.extend(I,t.allowedProtoMethods),{properties:{whitelist:e,defaultValue:t.allowProtoPropertiesByDefault},methods:{whitelist:I,defaultValue:t.allowProtoMethodsByDefault}}}function SjI(t,e,I){return Wut(typeof t=="function"?e.methods:e.properties,I)}function Wut(t,e){return t.whitelist[e]!==void 0?t.whitelist[e]===!0:t.defaultValue!==void 0?t.defaultValue:(TjI(e),!1)}function TjI(t){yce[t]!==!0&&(yce[t]=!0,BjI.default.log("error",'Handlebars: Access has been denied to resolve the property "'+t+`" because it is not an "own property" of its parent. +You can add a runtime option to disable the check or this warning: +See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function _jI(){Object.keys(yce).forEach(function(t){delete yce[t]})}});var Hce=Y($A=>{"use strict";o();$A.__esModule=!0;$A.HandlebarsEnvironment=Afe;function Nut(t){return t&&t.__esModule?t:{default:t}}var cC=Du(),KjI=cZ(),Yfe=Nut(KjI),DjI=hfe(),qjI=Zut(),PjI=Nfe(),wce=Nut(PjI),$jI=Vfe(),eUI="4.7.9";$A.VERSION=eUI;var tUI=8;$A.COMPILER_REVISION=tUI;var IUI=7;$A.LAST_COMPATIBLE_COMPILER_REVISION=IUI;var lUI={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};$A.REVISION_CHANGES=lUI;var Rfe="[object Object]";function Afe(t,e,I){this.helpers=t||{},this.partials=e||{},this.decorators=I||{},DjI.registerDefaultHelpers(this),qjI.registerDefaultDecorators(this)}Afe.prototype={constructor:Afe,logger:wce.default,log:wce.default.log,registerHelper:function(e,I){if(cC.toString.call(e)===Rfe){if(I)throw new Yfe.default("Arg not supported with multiple helpers");cC.extend(this.helpers,e)}else this.helpers[e]=I},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,I){if(cC.toString.call(e)===Rfe)cC.extend(this.partials,e);else{if(typeof I>"u")throw new Yfe.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=I}},unregisterPartial:function(e){delete this.partials[e]},registerDecorator:function(e,I){if(cC.toString.call(e)===Rfe){if(I)throw new Yfe.default("Arg not supported with multiple decorators");cC.extend(this.decorators,e)}else this.decorators[e]=I},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){$jI.resetLoggedProperties()}};var nUI=wce.default.log;$A.log=nUI;$A.createFrame=cC.createFrame;$A.logger=wce.default});var Yut=Y((Qce,Vut)=>{"use strict";o();Qce.__esModule=!0;function Ffe(t){this.string=t}Ffe.prototype.toString=Ffe.prototype.toHTML=function(){return""+this.string};Qce.default=Ffe;Vut.exports=Qce.default});var Rut=Y(Xfe=>{"use strict";o();Xfe.__esModule=!0;Xfe.wrapHelper=aUI;function aUI(t,e){if(typeof t!="function")return t;var I=function(){var n=arguments[arguments.length-1];return arguments[arguments.length-1]=e(n),t.apply(this,arguments)};return I}});var yut=Y(PH=>{"use strict";o();PH.__esModule=!0;PH.checkRevision=GUI;PH.template=dUI;PH.wrapProgram=fce;PH.resolvePartial=uUI;PH.invokePartial=bUI;PH.noop=gut;function cUI(t){return t&&t.__esModule?t:{default:t}}function rUI(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var I in t)Object.prototype.hasOwnProperty.call(t,I)&&(e[I]=t[I]);return e.default=t,e}var sUI=Du(),l3=rUI(sUI),oUI=cZ(),CX=cUI(oUI),LX=Hce(),Aut=hfe(),iUI=Rut(),Fut=Vfe();function GUI(t){var e=t&&t[0]||1,I=LX.COMPILER_REVISION;if(!(e>=LX.LAST_COMPATIBLE_COMPILER_REVISION&&e<=LX.COMPILER_REVISION))if(e{"use strict";o();Jce.__esModule=!0;Jce.default=function(t){(function(){typeof globalThis!="object"&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var e=globalThis.Handlebars;t.noConflict=function(){return globalThis.Handlebars===t&&(globalThis.Handlebars=e),t}};wut.exports=Jce.default});var Jut=Y((Cce,Eut)=>{"use strict";o();Cce.__esModule=!0;function yfe(t){return t&&t.__esModule?t:{default:t}}function wfe(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var I in t)Object.prototype.hasOwnProperty.call(t,I)&&(e[I]=t[I]);return e.default=t,e}var pUI=Hce(),Hut=wfe(pUI),hUI=Yut(),WUI=yfe(hUI),NUI=cZ(),VUI=yfe(NUI),YUI=Du(),vfe=wfe(YUI),RUI=yut(),Qut=wfe(RUI),AUI=gfe(),FUI=yfe(AUI);function fut(){var t=new Hut.HandlebarsEnvironment;return vfe.extend(t,Hut),t.SafeString=WUI.default,t.Exception=VUI.default,t.Utils=vfe,t.escapeExpression=vfe.escapeExpression,t.VM=Qut,t.template=function(e){return Qut.template(e,t)},t}var H_=fut();H_.create=fut;FUI.default(H_);H_.default=H_;Cce.default=H_;Eut.exports=Cce.default});var Hfe=Y((Lce,Lut)=>{"use strict";o();Lce.__esModule=!0;var Cut={helpers:{helperExpression:function(e){return e.type==="SubExpression"||(e.type==="MustacheStatement"||e.type==="BlockStatement")&&!!(e.params&&e.params.length||e.hash)},scopedId:function(e){return/^\.|this\b/.test(e.original)},simpleId:function(e){return e.parts.length===1&&!Cut.helpers.scopedId(e)&&!e.depth}}};Lce.default=Cut;Lut.exports=Lce.default});var xut=Y((kce,kut)=>{"use strict";o();kce.__esModule=!0;var XUI=function(){var t={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(n,a,c,r,s,i,G){var d=i.length-1;switch(s){case 1:return i[d-1];case 2:this.$=r.prepareProgram(i[d]);break;case 3:this.$=i[d];break;case 4:this.$=i[d];break;case 5:this.$=i[d];break;case 6:this.$=i[d];break;case 7:this.$=i[d];break;case 8:this.$=i[d];break;case 9:this.$={type:"CommentStatement",value:r.stripComment(i[d]),strip:r.stripFlags(i[d],i[d]),loc:r.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:i[d],value:i[d],loc:r.locInfo(this._$)};break;case 11:this.$=r.prepareRawBlock(i[d-2],i[d-1],i[d],this._$);break;case 12:this.$={path:i[d-3],params:i[d-2],hash:i[d-1]};break;case 13:this.$=r.prepareBlock(i[d-3],i[d-2],i[d-1],i[d],!1,this._$);break;case 14:this.$=r.prepareBlock(i[d-3],i[d-2],i[d-1],i[d],!0,this._$);break;case 15:this.$={open:i[d-5],path:i[d-4],params:i[d-3],hash:i[d-2],blockParams:i[d-1],strip:r.stripFlags(i[d-5],i[d])};break;case 16:this.$={path:i[d-4],params:i[d-3],hash:i[d-2],blockParams:i[d-1],strip:r.stripFlags(i[d-5],i[d])};break;case 17:this.$={path:i[d-4],params:i[d-3],hash:i[d-2],blockParams:i[d-1],strip:r.stripFlags(i[d-5],i[d])};break;case 18:this.$={strip:r.stripFlags(i[d-1],i[d-1]),program:i[d]};break;case 19:var u=r.prepareBlock(i[d-2],i[d-1],i[d],i[d],!1,this._$),b=r.prepareProgram([u],i[d-1].loc);b.chained=!0,this.$={strip:i[d-2].strip,program:b,chain:!0};break;case 20:this.$=i[d];break;case 21:this.$={path:i[d-1],strip:r.stripFlags(i[d-2],i[d])};break;case 22:this.$=r.prepareMustache(i[d-3],i[d-2],i[d-1],i[d-4],r.stripFlags(i[d-4],i[d]),this._$);break;case 23:this.$=r.prepareMustache(i[d-3],i[d-2],i[d-1],i[d-4],r.stripFlags(i[d-4],i[d]),this._$);break;case 24:this.$={type:"PartialStatement",name:i[d-3],params:i[d-2],hash:i[d-1],indent:"",strip:r.stripFlags(i[d-4],i[d]),loc:r.locInfo(this._$)};break;case 25:this.$=r.preparePartialBlock(i[d-2],i[d-1],i[d],this._$);break;case 26:this.$={path:i[d-3],params:i[d-2],hash:i[d-1],strip:r.stripFlags(i[d-4],i[d])};break;case 27:this.$=i[d];break;case 28:this.$=i[d];break;case 29:this.$={type:"SubExpression",path:i[d-3],params:i[d-2],hash:i[d-1],loc:r.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:i[d],loc:r.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:r.id(i[d-2]),value:i[d],loc:r.locInfo(this._$)};break;case 32:this.$=r.id(i[d-1]);break;case 33:this.$=i[d];break;case 34:this.$=i[d];break;case 35:this.$={type:"StringLiteral",value:i[d],original:i[d],loc:r.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(i[d]),original:Number(i[d]),loc:r.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:i[d]==="true",original:i[d]==="true",loc:r.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:r.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:r.locInfo(this._$)};break;case 40:this.$=i[d];break;case 41:this.$=i[d];break;case 42:this.$=r.preparePath(!0,i[d],this._$);break;case 43:this.$=r.preparePath(!1,i[d],this._$);break;case 44:i[d-2].push({part:r.id(i[d]),original:i[d],separator:i[d-1]}),this.$=i[d-2];break;case 45:this.$=[{part:r.id(i[d]),original:i[d]}];break;case 46:this.$=[];break;case 47:i[d-1].push(i[d]);break;case 48:this.$=[];break;case 49:i[d-1].push(i[d]);break;case 50:this.$=[];break;case 51:i[d-1].push(i[d]);break;case 58:this.$=[];break;case 59:i[d-1].push(i[d]);break;case 64:this.$=[];break;case 65:i[d-1].push(i[d]);break;case 70:this.$=[];break;case 71:i[d-1].push(i[d]);break;case 78:this.$=[];break;case 79:i[d-1].push(i[d]);break;case 82:this.$=[];break;case 83:i[d-1].push(i[d]);break;case 86:this.$=[];break;case 87:i[d-1].push(i[d]);break;case 90:this.$=[];break;case 91:i[d-1].push(i[d]);break;case 94:this.$=[];break;case 95:i[d-1].push(i[d]);break;case 98:this.$=[i[d]];break;case 99:i[d-1].push(i[d]);break;case 100:this.$=[i[d]];break;case 101:i[d-1].push(i[d]);break}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(n,a){throw new Error(n)},parse:function(n){var a=this,c=[0],r=[null],s=[],i=this.table,G="",d=0,u=0,b=0,Z=2,p=1;this.lexer.setInput(n),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc>"u"&&(this.lexer.yylloc={});var W=this.lexer.yylloc;s.push(W);var h=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function N(_){c.length=c.length-2*_,r.length=r.length-_,s.length=s.length-_}function V(){var _;return _=a.lexer.lex()||1,typeof _!="number"&&(_=a.symbols_[_]||_),_}for(var R,F,v,y,w,H,f={},L,k,U,T;;){if(v=c[c.length-1],this.defaultActions[v]?y=this.defaultActions[v]:((R===null||typeof R>"u")&&(R=V()),y=i[v]&&i[v][R]),typeof y>"u"||!y.length||!y[0]){var q="";if(!b){T=[];for(L in i[v])this.terminals_[L]&&L>2&&T.push("'"+this.terminals_[L]+"'");this.lexer.showPosition?q="Parse error on line "+(d+1)+`: +`+this.lexer.showPosition()+` +Expecting `+T.join(", ")+", got '"+(this.terminals_[R]||R)+"'":q="Parse error on line "+(d+1)+": Unexpected "+(R==1?"end of input":"'"+(this.terminals_[R]||R)+"'"),this.parseError(q,{text:this.lexer.match,token:this.terminals_[R]||R,line:this.lexer.yylineno,loc:W,expected:T})}}if(y[0]instanceof Array&&y.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+R);switch(y[0]){case 1:c.push(R),r.push(this.lexer.yytext),s.push(this.lexer.yylloc),c.push(y[1]),R=null,F?(R=F,F=null):(u=this.lexer.yyleng,G=this.lexer.yytext,d=this.lexer.yylineno,W=this.lexer.yylloc,b>0&&b--);break;case 2:if(k=this.productions_[y[1]][1],f.$=r[r.length-k],f._$={first_line:s[s.length-(k||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(k||1)].first_column,last_column:s[s.length-1].last_column},h&&(f._$.range=[s[s.length-(k||1)].range[0],s[s.length-1].range[1]]),H=this.performAction.call(f,G,u,d,this.yy,y[1],r,s),typeof H<"u")return H;k&&(c=c.slice(0,-1*k*2),r=r.slice(0,-1*k),s=s.slice(0,-1*k)),c.push(this.productions_[y[1]][0]),r.push(f.$),s.push(f._$),U=i[c[c.length-2]][c[c.length-1]],c.push(U);break;case 3:return!0}}return!0}},e=function(){var l={EOF:1,parseError:function(a,c){if(this.yy.parser)this.yy.parser.parseError(a,c);else throw new Error(a)},setInput:function(a){return this._input=a,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var c=a.match(/(?:\r\n?|\n).*/g);return c?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var c=a.length,r=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c-1),this.offset-=c;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===s.length?this.yylloc.first_column:0)+s[s.length-r.length].length-r[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-c]),this},more:function(){return this._more=!0,this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),c=new Array(a.length+1).join("-");return a+this.upcomingInput()+` +`+c+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,c,r,s,i,G;this._more||(this.yytext="",this.match="");for(var d=this._currentRules(),u=0;uc[0].length)&&(c=r,s=u,!this.options.flex)));u++);return c?(G=c[0].match(/(?:\r\n?|\n).*/g),G&&(this.yylineno+=G.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:G?G[G.length-1].length-G[G.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+c[0].length},this.yytext+=c[0],this.match+=c[0],this.matches=c,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(c[0].length),this.matched+=c[0],a=this.performAction.call(this,this.yy,this,d[s],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a||void 0):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return typeof a<"u"?a:this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(a){this.begin(a)}};return l.options={},l.performAction=function(a,c,r,s){function i(d,u){return c.yytext=c.yytext.substring(d,c.yyleng-u+d)}var G=s;switch(r){case 0:if(c.yytext.slice(-2)==="\\\\"?(i(0,1),this.begin("mu")):c.yytext.slice(-1)==="\\"?(i(0,1),this.begin("emu")):this.begin("mu"),c.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;break;case 3:return this.begin("raw"),15;break;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(i(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;break;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;break;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;break;case 16:return this.popState(),44;break;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(c.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;break;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;break;case 30:return this.popState(),33;break;case 31:return c.yytext=i(1,2).replace(/\\"/g,'"'),80;break;case 32:return c.yytext=i(1,2).replace(/\\'/g,"'"),80;break;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return c.yytext=c.yytext.replace(/\\([\\\]])/g,"$1"),72;break;case 43:return"INVALID";case 44:return 5}},l.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],l.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},l}();t.lexer=e;function I(){this.yy={}}return I.prototype=t,t.Parser=I,new I}();kce.default=XUI;kut.exports=kce.default});var ffe=Y((Uce,Out)=>{"use strict";o();Uce.__esModule=!0;function gUI(t){return t&&t.__esModule?t:{default:t}}var vUI=cZ(),Qfe=gUI(vUI);function xce(){this.parents=[]}xce.prototype={constructor:xce,mutating:!1,acceptKey:function(e,I){var l=this.accept(e[I]);if(this.mutating){if(l&&!xce.prototype[l.type])throw new Qfe.default('Unexpected node type "'+l.type+'" found when accepting '+I+" on "+e.type);e[I]=l}},acceptRequired:function(e,I){if(this.acceptKey(e,I),!e[I])throw new Qfe.default(e.type+" requires "+I)},acceptArray:function(e){for(var I=0,l=e.length;I{"use strict";o();Oce.__esModule=!0;function yUI(t){return t&&t.__esModule?t:{default:t}}var wUI=ffe(),HUI=yUI(wUI);function eF(){var t=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=t}eF.prototype=new HUI.default;eF.prototype.Program=function(t){var e=!this.options.ignoreStandalone,I=!this.isRootSeen;this.isRootSeen=!0;for(var l=t.body,n=0,a=l.length;n{"use strict";o();Qp.__esModule=!0;Qp.SourceLocation=EUI;Qp.id=JUI;Qp.stripFlags=CUI;Qp.stripComment=LUI;Qp.preparePath=kUI;Qp.prepareMustache=xUI;Qp.prepareRawBlock=jUI;Qp.prepareBlock=UUI;Qp.prepareProgram=OUI;Qp.preparePartialBlock=zUI;function QUI(t){return t&&t.__esModule?t:{default:t}}var fUI=cZ(),Cfe=QUI(fUI);function Lfe(t,e){if(e=e.path?e.path.original:e,t.path.original!==e){var I={loc:t.path.loc};throw new Cfe.default(t.path.original+" doesn't match "+e,I)}}function EUI(t,e){this.source=t,this.start={line:e.first_line,column:e.first_column},this.end={line:e.last_line,column:e.last_column}}function JUI(t){return/^\[.*\]$/.test(t)?t.substring(1,t.length-1):t}function CUI(t,e){return{open:t.charAt(2)==="~",close:e.charAt(e.length-3)==="~"}}function LUI(t){return t.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function kUI(t,e,I){I=this.locInfo(I);for(var l=t?"@":"",n=[],a=0,c=0,r=e.length;c0)throw new Cfe.default("Invalid path: "+l,{loc:I});s===".."&&a++}else n.push(s)}return{type:"PathExpression",data:t,depth:a,parts:n,original:l,loc:I}}function xUI(t,e,I,l,n,a){var c=l.charAt(3)||l.charAt(2),r=c!=="{"&&c!=="&",s=/\*/.test(l);return{type:s?"Decorator":"MustacheStatement",path:t,params:e,hash:I,escaped:r,strip:n,loc:this.locInfo(a)}}function jUI(t,e,I,l){Lfe(t,I),l=this.locInfo(l);var n={type:"Program",body:e,strip:{},loc:l};return{type:"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:n,openStrip:{},inverseStrip:{},closeStrip:{},loc:l}}function UUI(t,e,I,l,n,a){l&&l.path&&Lfe(t,l);var c=/\*/.test(t.open);e.blockParams=t.blockParams;var r=void 0,s=void 0;if(I){if(c)throw new Cfe.default("Unexpected inverse block on decorator",I);I.chain&&(I.program.body[0].closeStrip=l.strip),s=I.strip,r=I.program}return n&&(n=r,r=e,e=n),{type:c?"DecoratorBlock":"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:e,inverse:r,openStrip:t.strip,inverseStrip:s,closeStrip:l&&l.strip,loc:this.locInfo(a)}}function OUI(t,e){if(!e&&t.length){var I=t[0].loc,l=t[t.length-1].loc;I&&l&&(e={source:I.source,start:{line:I.start.line,column:I.start.column},end:{line:l.end.line,column:l.end.column}})}return{type:"Program",body:t,strip:{},loc:e}}function zUI(t,e,I,l){return Lfe(t,I),{type:"PartialBlockStatement",name:t.path,params:t.params,hash:t.hash,program:e,openStrip:t.strip,closeStrip:I&&I.strip,loc:this.locInfo(l)}}});var Tut=Y(f_=>{"use strict";o();f_.__esModule=!0;f_.parseWithoutProcessing=Sut;f_.parse=PUI;function BUI(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var I in t)Object.prototype.hasOwnProperty.call(t,I)&&(e[I]=t[I]);return e.default=t,e}function jfe(t){return t&&t.__esModule?t:{default:t}}var MUI=xut(),kfe=jfe(MUI),SUI=But(),TUI=jfe(SUI),_UI=Mut(),KUI=BUI(_UI),DUI=cZ(),Q_=jfe(DUI),qUI=Du();f_.parser=kfe.default;var zce={};qUI.extend(zce,KUI);function Sut(t,e){if(t.type==="Program")return $UI(t),t;kfe.default.yy=zce,zce.locInfo=function(l){return new zce.SourceLocation(e&&e.srcName,l)};var I=kfe.default.parse(t);return I}function PUI(t,e){var I=Sut(t,e),l=new TUI.default(e);return l.accept(I)}function $UI(t){xfe(t)}function xfe(t){if(t!=null){if(Array.isArray(t)){t.forEach(xfe);return}if(typeof t=="object"){if(t.type==="PathExpression"){if(!e9I(t.depth))throw new Q_.default("Invalid AST: PathExpression.depth must be an integer");if(!Array.isArray(t.parts))throw new Q_.default("Invalid AST: PathExpression.parts must be an array");for(var e=0;e=0}});var qut=Y(L_=>{"use strict";o();L_.__esModule=!0;L_.Compiler=Ufe;L_.precompile=n9I;L_.compile=a9I;function Kut(t){return t&&t.__esModule?t:{default:t}}var t9I=cZ(),J_=Kut(t9I),C_=Du(),I9I=Hfe(),E_=Kut(I9I),l9I=[].slice;function Ufe(){}Ufe.prototype={compiler:Ufe,equals:function(e){var I=this.opcodes.length;if(e.opcodes.length!==I)return!1;for(var l=0;l1)throw new J_.default("Unsupported number of partial arguments: "+l.length,e);l.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):l.push({type:"PathExpression",parts:[],depth:0}));var n=e.name.original,a=e.name.type==="SubExpression";a&&this.accept(e.name),this.setupFullMustacheParams(e,I,void 0,!0);var c=e.indent||"";this.options.preventIndent&&c&&(this.opcode("appendContent",c),c=""),this.opcode("invokePartial",a,n,c),this.opcode("append")},PartialBlockStatement:function(e){this.PartialStatement(e)},MustacheStatement:function(e){this.SubExpression(e),e.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(e){this.DecoratorBlock(e)},ContentStatement:function(e){e.value&&this.opcode("appendContent",e.value)},CommentStatement:function(){},SubExpression:function(e){_ut(e);var I=this.classifySexpr(e);I==="simple"?this.simpleSexpr(e):I==="helper"?this.helperSexpr(e):this.ambiguousSexpr(e)},ambiguousSexpr:function(e,I,l){var n=e.path,a=n.parts[0],c=I!=null||l!=null;this.opcode("getContext",n.depth),this.opcode("pushProgram",I),this.opcode("pushProgram",l),n.strict=!0,this.accept(n),this.opcode("invokeAmbiguous",a,c)},simpleSexpr:function(e){var I=e.path;I.strict=!0,this.accept(I),this.opcode("resolvePossibleLambda")},helperSexpr:function(e,I,l){var n=this.setupFullMustacheParams(e,I,l),a=e.path,c=a.parts[0];if(this.options.knownHelpers[c])this.opcode("invokeKnownHelper",n.length,c);else{if(this.options.knownHelpersOnly)throw new J_.default("You specified knownHelpersOnly, but used the unknown helper "+c,e);a.strict=!0,a.falsy=!0,this.accept(a),this.opcode("invokeHelper",n.length,a.original,E_.default.helpers.simpleId(a))}},PathExpression:function(e){this.addDepth(e.depth),this.opcode("getContext",e.depth);var I=e.parts[0],l=E_.default.helpers.scopedId(e),n=!e.depth&&!l&&this.blockParamIndex(I);n?this.opcode("lookupBlockParam",n,e.parts):I?e.data?(this.options.data=!0,this.opcode("lookupData",e.depth,e.parts,e.strict)):this.opcode("lookupOnContext",e.parts,e.falsy,e.strict,l):this.opcode("pushContext")},StringLiteral:function(e){this.opcode("pushString",e.value)},NumberLiteral:function(e){this.opcode("pushLiteral",e.value)},BooleanLiteral:function(e){this.opcode("pushLiteral",e.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(e){var I=e.pairs,l=0,n=I.length;for(this.opcode("pushHash");l=0)return[I,a]}}};function n9I(t,e,I){if(t==null||typeof t!="string"&&t.type!=="Program")throw new J_.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+t);e=e||{},"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var l=I.parse(t,e),n=new I.Compiler().compile(l,e);return new I.JavaScriptCompiler().compile(n,e)}function a9I(t,e,I){if(e===void 0&&(e={}),t==null||typeof t!="string"&&t.type!=="Program")throw new J_.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+t);e=C_.extend({},e),"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var l=void 0;function n(){var c=I.parse(t,e),r=new I.Compiler().compile(c,e),s=new I.JavaScriptCompiler().compile(r,e,void 0,!0);return I.template(s)}function a(c,r){return l||(l=n()),l.call(this,c,r)}return a._setup=function(c){return l||(l=n()),l._setup(c)},a._child=function(c,r,s,i){return l||(l=n()),l._child(c,r,s,i)},a}function Dut(t,e){if(t===e)return!0;if(C_.isArray(t)&&C_.isArray(e)&&t.length===e.length){for(var I=0;I{o();var Put="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Ofe.encode=function(t){if(0<=t&&t{o();var ebt=$ut(),zfe=5,tbt=1<>1;return e?-I:I}Bfe.encode=function(e){var I="",l,n=c9I(e);do l=n&Ibt,n>>>=zfe,n>0&&(l|=lbt),I+=ebt.encode(l);while(n>0);return I};Bfe.decode=function(e,I,l){var n=e.length,a=0,c=0,r,s;do{if(I>=n)throw new Error("Expected more digits in base 64 VLQ value.");if(s=ebt.decode(e.charCodeAt(I++)),s===-1)throw new Error("Invalid base64 digit: "+e.charAt(I-1));r=!!(s&lbt),s&=Ibt,a=a+(s<{o();function s9I(t,e,I){if(e in t)return t[e];if(arguments.length===3)return I;throw new Error('"'+e+'" is a required argument.')}rG.getArg=s9I;var nbt=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,o9I=/^data:.+\,.+$/;function k_(t){var e=t.match(nbt);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}rG.urlParse=k_;function n3(t){var e="";return t.scheme&&(e+=t.scheme+":"),e+="//",t.auth&&(e+=t.auth+"@"),t.host&&(e+=t.host),t.port&&(e+=":"+t.port),t.path&&(e+=t.path),e}rG.urlGenerate=n3;function Sfe(t){var e=t,I=k_(t);if(I){if(!I.path)return t;e=I.path}for(var l=rG.isAbsolute(e),n=e.split(/\/+/),a,c=0,r=n.length-1;r>=0;r--)a=n[r],a==="."?n.splice(r,1):a===".."?c++:c>0&&(a===""?(n.splice(r+1,c),c=0):(n.splice(r,2),c--));return e=n.join("/"),e===""&&(e=l?"/":"."),I?(I.path=e,n3(I)):e}rG.normalize=Sfe;function abt(t,e){t===""&&(t="."),e===""&&(e=".");var I=k_(e),l=k_(t);if(l&&(t=l.path||"/"),I&&!I.scheme)return l&&(I.scheme=l.scheme),n3(I);if(I||e.match(o9I))return e;if(l&&!l.host&&!l.path)return l.host=e,n3(l);var n=e.charAt(0)==="/"?e:Sfe(t.replace(/\/+$/,"")+"/"+e);return l?(l.path=n,n3(l)):n}rG.join=abt;rG.isAbsolute=function(t){return t.charAt(0)==="/"||nbt.test(t)};function i9I(t,e){t===""&&(t="."),t=t.replace(/\/$/,"");for(var I=0;e.indexOf(t+"/")!==0;){var l=t.lastIndexOf("/");if(l<0||(t=t.slice(0,l),t.match(/^([^\/]+:\/)?\/*$/)))return e;++I}return Array(I+1).join("../")+e.substr(t.length+1)}rG.relative=i9I;var cbt=function(){var t=Object.create(null);return!("__proto__"in t)}();function rbt(t){return t}function G9I(t){return sbt(t)?"$"+t:t}rG.toSetString=cbt?rbt:G9I;function d9I(t){return sbt(t)?t.slice(1):t}rG.fromSetString=cbt?rbt:d9I;function sbt(t){if(!t)return!1;var e=t.length;if(e<9||t.charCodeAt(e-1)!==95||t.charCodeAt(e-2)!==95||t.charCodeAt(e-3)!==111||t.charCodeAt(e-4)!==116||t.charCodeAt(e-5)!==111||t.charCodeAt(e-6)!==114||t.charCodeAt(e-7)!==112||t.charCodeAt(e-8)!==95||t.charCodeAt(e-9)!==95)return!1;for(var I=e-10;I>=0;I--)if(t.charCodeAt(I)!==36)return!1;return!0}function u9I(t,e,I){var l=a3(t.source,e.source);return l!==0||(l=t.originalLine-e.originalLine,l!==0)||(l=t.originalColumn-e.originalColumn,l!==0||I)||(l=t.generatedColumn-e.generatedColumn,l!==0)||(l=t.generatedLine-e.generatedLine,l!==0)?l:a3(t.name,e.name)}rG.compareByOriginalPositions=u9I;function b9I(t,e,I){var l=t.generatedLine-e.generatedLine;return l!==0||(l=t.generatedColumn-e.generatedColumn,l!==0||I)||(l=a3(t.source,e.source),l!==0)||(l=t.originalLine-e.originalLine,l!==0)||(l=t.originalColumn-e.originalColumn,l!==0)?l:a3(t.name,e.name)}rG.compareByGeneratedPositionsDeflated=b9I;function a3(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}function m9I(t,e){var I=t.generatedLine-e.generatedLine;return I!==0||(I=t.generatedColumn-e.generatedColumn,I!==0)||(I=a3(t.source,e.source),I!==0)||(I=t.originalLine-e.originalLine,I!==0)||(I=t.originalColumn-e.originalColumn,I!==0)?I:a3(t.name,e.name)}rG.compareByGeneratedPositionsInflated=m9I;function Z9I(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}rG.parseSourceMapInput=Z9I;function p9I(t,e,I){if(e=e||"",t&&(t[t.length-1]!=="/"&&e[0]!=="/"&&(t+="/"),e=t+e),I){var l=k_(I);if(!l)throw new Error("sourceMapURL could not be parsed");if(l.path){var n=l.path.lastIndexOf("/");n>=0&&(l.path=l.path.substring(0,n+1))}e=abt(n3(l),e)}return Sfe(e)}rG.computeSourceURL=p9I});var Kfe=Y(obt=>{o();var Tfe=c3(),_fe=Object.prototype.hasOwnProperty,sC=typeof Map<"u";function kX(){this._array=[],this._set=sC?new Map:Object.create(null)}kX.fromArray=function(e,I){for(var l=new kX,n=0,a=e.length;n=0)return I}else{var l=Tfe.toSetString(e);if(_fe.call(this._set,l))return this._set[l]}throw new Error('"'+e+'" is not in the set.')};kX.prototype.at=function(e){if(e>=0&&e{o();var ibt=c3();function h9I(t,e){var I=t.generatedLine,l=e.generatedLine,n=t.generatedColumn,a=e.generatedColumn;return l>I||l==I&&a>=n||ibt.compareByGeneratedPositionsInflated(t,e)<=0}function Bce(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Bce.prototype.unsortedForEach=function(e,I){this._array.forEach(e,I)};Bce.prototype.add=function(e){h9I(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};Bce.prototype.toArray=function(){return this._sorted||(this._array.sort(ibt.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};Gbt.MappingList=Bce});var Dfe=Y(ubt=>{o();var x_=Mfe(),hs=c3(),Mce=Kfe().ArraySet,W9I=dbt().MappingList;function fp(t){t||(t={}),this._file=hs.getArg(t,"file",null),this._sourceRoot=hs.getArg(t,"sourceRoot",null),this._skipValidation=hs.getArg(t,"skipValidation",!1),this._sources=new Mce,this._names=new Mce,this._mappings=new W9I,this._sourcesContents=null}fp.prototype._version=3;fp.fromSourceMap=function(e){var I=e.sourceRoot,l=new fp({file:e.file,sourceRoot:I});return e.eachMapping(function(n){var a={generated:{line:n.generatedLine,column:n.generatedColumn}};n.source!=null&&(a.source=n.source,I!=null&&(a.source=hs.relative(I,a.source)),a.original={line:n.originalLine,column:n.originalColumn},n.name!=null&&(a.name=n.name)),l.addMapping(a)}),e.sources.forEach(function(n){var a=n;I!==null&&(a=hs.relative(I,n)),l._sources.has(a)||l._sources.add(a);var c=e.sourceContentFor(n);c!=null&&l.setSourceContent(n,c)}),l};fp.prototype.addMapping=function(e){var I=hs.getArg(e,"generated"),l=hs.getArg(e,"original",null),n=hs.getArg(e,"source",null),a=hs.getArg(e,"name",null);this._skipValidation||this._validateMapping(I,l,n,a),n!=null&&(n=String(n),this._sources.has(n)||this._sources.add(n)),a!=null&&(a=String(a),this._names.has(a)||this._names.add(a)),this._mappings.add({generatedLine:I.line,generatedColumn:I.column,originalLine:l!=null&&l.line,originalColumn:l!=null&&l.column,source:n,name:a})};fp.prototype.setSourceContent=function(e,I){var l=e;this._sourceRoot!=null&&(l=hs.relative(this._sourceRoot,l)),I!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[hs.toSetString(l)]=I):this._sourcesContents&&(delete this._sourcesContents[hs.toSetString(l)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};fp.prototype.applySourceMap=function(e,I,l){var n=I;if(I==null){if(e.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);n=e.file}var a=this._sourceRoot;a!=null&&(n=hs.relative(a,n));var c=new Mce,r=new Mce;this._mappings.unsortedForEach(function(s){if(s.source===n&&s.originalLine!=null){var i=e.originalPositionFor({line:s.originalLine,column:s.originalColumn});i.source!=null&&(s.source=i.source,l!=null&&(s.source=hs.join(l,s.source)),a!=null&&(s.source=hs.relative(a,s.source)),s.originalLine=i.line,s.originalColumn=i.column,i.name!=null&&(s.name=i.name))}var G=s.source;G!=null&&!c.has(G)&&c.add(G);var d=s.name;d!=null&&!r.has(d)&&r.add(d)},this),this._sources=c,this._names=r,e.sources.forEach(function(s){var i=e.sourceContentFor(s);i!=null&&(l!=null&&(s=hs.join(l,s)),a!=null&&(s=hs.relative(a,s)),this.setSourceContent(s,i))},this)};fp.prototype._validateMapping=function(e,I,l,n){if(I&&typeof I.line!="number"&&typeof I.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!I&&!l&&!n)){if(e&&"line"in e&&"column"in e&&I&&"line"in I&&"column"in I&&e.line>0&&e.column>=0&&I.line>0&&I.column>=0&&l)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:l,original:I,name:n}))}};fp.prototype._serializeMappings=function(){for(var e=0,I=1,l=0,n=0,a=0,c=0,r="",s,i,G,d,u=this._mappings.toArray(),b=0,Z=u.length;b0){if(!hs.compareByGeneratedPositionsInflated(i,u[b-1]))continue;s+=","}s+=x_.encode(i.generatedColumn-e),e=i.generatedColumn,i.source!=null&&(d=this._sources.indexOf(i.source),s+=x_.encode(d-c),c=d,s+=x_.encode(i.originalLine-1-n),n=i.originalLine-1,s+=x_.encode(i.originalColumn-l),l=i.originalColumn,i.name!=null&&(G=this._names.indexOf(i.name),s+=x_.encode(G-a),a=G)),r+=s}return r};fp.prototype._generateSourcesContent=function(e,I){return e.map(function(l){if(!this._sourcesContents)return null;I!=null&&(l=hs.relative(I,l));var n=hs.toSetString(l);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null},this)};fp.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e};fp.prototype.toString=function(){return JSON.stringify(this.toJSON())};ubt.SourceMapGenerator=fp});var bbt=Y(oC=>{o();oC.GREATEST_LOWER_BOUND=1;oC.LEAST_UPPER_BOUND=2;function qfe(t,e,I,l,n,a){var c=Math.floor((e-t)/2)+t,r=n(I,l[c],!0);return r===0?c:r>0?e-c>1?qfe(c,e,I,l,n,a):a==oC.LEAST_UPPER_BOUND?e1?qfe(t,c,I,l,n,a):a==oC.LEAST_UPPER_BOUND?c:t<0?-1:t}oC.search=function(e,I,l,n){if(I.length===0)return-1;var a=qfe(-1,I.length,e,I,l,n||oC.GREATEST_LOWER_BOUND);if(a<0)return-1;for(;a-1>=0&&l(I[a],I[a-1],!0)===0;)--a;return a}});var Zbt=Y(mbt=>{o();function Pfe(t,e,I){var l=t[e];t[e]=t[I],t[I]=l}function N9I(t,e){return Math.round(t+Math.random()*(e-t))}function $fe(t,e,I,l){if(I{o();var Mt=c3(),eEe=bbt(),r3=Kfe().ArraySet,V9I=Mfe(),j_=Zbt().quickSort;function ac(t,e){var I=t;return typeof t=="string"&&(I=Mt.parseSourceMapInput(t)),I.sections!=null?new DR(I,e):new Ri(I,e)}ac.fromSourceMap=function(t,e){return Ri.fromSourceMap(t,e)};ac.prototype._version=3;ac.prototype.__generatedMappings=null;Object.defineProperty(ac.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});ac.prototype.__originalMappings=null;Object.defineProperty(ac.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});ac.prototype._charIsMappingSeparator=function(e,I){var l=e.charAt(I);return l===";"||l===","};ac.prototype._parseMappings=function(e,I){throw new Error("Subclasses must implement _parseMappings")};ac.GENERATED_ORDER=1;ac.ORIGINAL_ORDER=2;ac.GREATEST_LOWER_BOUND=1;ac.LEAST_UPPER_BOUND=2;ac.prototype.eachMapping=function(e,I,l){var n=I||null,a=l||ac.GENERATED_ORDER,c;switch(a){case ac.GENERATED_ORDER:c=this._generatedMappings;break;case ac.ORIGINAL_ORDER:c=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var r=this.sourceRoot;c.map(function(s){var i=s.source===null?null:this._sources.at(s.source);return i=Mt.computeSourceURL(r,i,this._sourceMapURL),{source:i,generatedLine:s.generatedLine,generatedColumn:s.generatedColumn,originalLine:s.originalLine,originalColumn:s.originalColumn,name:s.name===null?null:this._names.at(s.name)}},this).forEach(e,n)};ac.prototype.allGeneratedPositionsFor=function(e){var I=Mt.getArg(e,"line"),l={source:Mt.getArg(e,"source"),originalLine:I,originalColumn:Mt.getArg(e,"column",0)};if(l.source=this._findSourceIndex(l.source),l.source<0)return[];var n=[],a=this._findMapping(l,this._originalMappings,"originalLine","originalColumn",Mt.compareByOriginalPositions,eEe.LEAST_UPPER_BOUND);if(a>=0){var c=this._originalMappings[a];if(e.column===void 0)for(var r=c.originalLine;c&&c.originalLine===r;)n.push({line:Mt.getArg(c,"generatedLine",null),column:Mt.getArg(c,"generatedColumn",null),lastColumn:Mt.getArg(c,"lastGeneratedColumn",null)}),c=this._originalMappings[++a];else for(var s=c.originalColumn;c&&c.originalLine===I&&c.originalColumn==s;)n.push({line:Mt.getArg(c,"generatedLine",null),column:Mt.getArg(c,"generatedColumn",null),lastColumn:Mt.getArg(c,"lastGeneratedColumn",null)}),c=this._originalMappings[++a]}return n};Sce.SourceMapConsumer=ac;function Ri(t,e){var I=t;typeof t=="string"&&(I=Mt.parseSourceMapInput(t));var l=Mt.getArg(I,"version"),n=Mt.getArg(I,"sources"),a=Mt.getArg(I,"names",[]),c=Mt.getArg(I,"sourceRoot",null),r=Mt.getArg(I,"sourcesContent",null),s=Mt.getArg(I,"mappings"),i=Mt.getArg(I,"file",null);if(l!=this._version)throw new Error("Unsupported version: "+l);c&&(c=Mt.normalize(c)),n=n.map(String).map(Mt.normalize).map(function(G){return c&&Mt.isAbsolute(c)&&Mt.isAbsolute(G)?Mt.relative(c,G):G}),this._names=r3.fromArray(a.map(String),!0),this._sources=r3.fromArray(n,!0),this._absoluteSources=this._sources.toArray().map(function(G){return Mt.computeSourceURL(c,G,e)}),this.sourceRoot=c,this.sourcesContent=r,this._mappings=s,this._sourceMapURL=e,this.file=i}Ri.prototype=Object.create(ac.prototype);Ri.prototype.consumer=ac;Ri.prototype._findSourceIndex=function(t){var e=t;if(this.sourceRoot!=null&&(e=Mt.relative(this.sourceRoot,e)),this._sources.has(e))return this._sources.indexOf(e);var I;for(I=0;I1&&(p.source=r+h[1],r+=h[1],p.originalLine=a+h[2],a=p.originalLine,p.originalLine+=1,p.originalColumn=c+h[3],c=p.originalColumn,h.length>4&&(p.name=s+h[4],s+=h[4])),Z.push(p),typeof p.originalLine=="number"&&b.push(p)}j_(Z,Mt.compareByGeneratedPositionsDeflated),this.__generatedMappings=Z,j_(b,Mt.compareByOriginalPositions),this.__originalMappings=b};Ri.prototype._findMapping=function(e,I,l,n,a,c){if(e[l]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[l]);if(e[n]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[n]);return eEe.search(e,I,a,c)};Ri.prototype.computeColumnSpans=function(){for(var e=0;e=0){var n=this._generatedMappings[l];if(n.generatedLine===I.generatedLine){var a=Mt.getArg(n,"source",null);a!==null&&(a=this._sources.at(a),a=Mt.computeSourceURL(this.sourceRoot,a,this._sourceMapURL));var c=Mt.getArg(n,"name",null);return c!==null&&(c=this._names.at(c)),{source:a,line:Mt.getArg(n,"originalLine",null),column:Mt.getArg(n,"originalColumn",null),name:c}}}return{source:null,line:null,column:null,name:null}};Ri.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};Ri.prototype.sourceContentFor=function(e,I){if(!this.sourcesContent)return null;var l=this._findSourceIndex(e);if(l>=0)return this.sourcesContent[l];var n=e;this.sourceRoot!=null&&(n=Mt.relative(this.sourceRoot,n));var a;if(this.sourceRoot!=null&&(a=Mt.urlParse(this.sourceRoot))){var c=n.replace(/^file:\/\//,"");if(a.scheme=="file"&&this._sources.has(c))return this.sourcesContent[this._sources.indexOf(c)];if((!a.path||a.path=="/")&&this._sources.has("/"+n))return this.sourcesContent[this._sources.indexOf("/"+n)]}if(I)return null;throw new Error('"'+n+'" is not in the SourceMap.')};Ri.prototype.generatedPositionFor=function(e){var I=Mt.getArg(e,"source");if(I=this._findSourceIndex(I),I<0)return{line:null,column:null,lastColumn:null};var l={source:I,originalLine:Mt.getArg(e,"line"),originalColumn:Mt.getArg(e,"column")},n=this._findMapping(l,this._originalMappings,"originalLine","originalColumn",Mt.compareByOriginalPositions,Mt.getArg(e,"bias",ac.GREATEST_LOWER_BOUND));if(n>=0){var a=this._originalMappings[n];if(a.source===l.source)return{line:Mt.getArg(a,"generatedLine",null),column:Mt.getArg(a,"generatedColumn",null),lastColumn:Mt.getArg(a,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};Sce.BasicSourceMapConsumer=Ri;function DR(t,e){var I=t;typeof t=="string"&&(I=Mt.parseSourceMapInput(t));var l=Mt.getArg(I,"version"),n=Mt.getArg(I,"sections");if(l!=this._version)throw new Error("Unsupported version: "+l);this._sources=new r3,this._names=new r3;var a={line:-1,column:0};this._sections=n.map(function(c){if(c.url)throw new Error("Support for url field in sections not implemented.");var r=Mt.getArg(c,"offset"),s=Mt.getArg(r,"line"),i=Mt.getArg(r,"column");if(s{o();var Y9I=Dfe().SourceMapGenerator,Tce=c3(),R9I=/(\r?\n)/,A9I=10,s3="$$$isSourceNode$$$";function rZ(t,e,I,l,n){this.children=[],this.sourceContents={},this.line=t??null,this.column=e??null,this.source=I??null,this.name=n??null,this[s3]=!0,l!=null&&this.add(l)}rZ.fromStringWithSourceMap=function(e,I,l){var n=new rZ,a=e.split(R9I),c=0,r=function(){var u=Z(),b=Z()||"";return u+b;function Z(){return c=0;I--)this.prepend(e[I]);else if(e[s3]||typeof e=="string")this.children.unshift(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};rZ.prototype.walk=function(e){for(var I,l=0,n=this.children.length;l0){for(I=[],l=0;l{o();_ce.SourceMapGenerator=Dfe().SourceMapGenerator;_ce.SourceMapConsumer=hbt().SourceMapConsumer;_ce.SourceNode=Nbt().SourceNode});var Fbt=Y((Kce,Abt)=>{"use strict";o();Kce.__esModule=!0;var IEe=Du(),iC=void 0;try{(typeof define!="function"||!define.amd)&&(Ybt=Vbt(),iC=Ybt.SourceNode)}catch{}var Ybt;iC||(iC=function(t,e,I,l){this.src="",l&&this.add(l)},iC.prototype={add:function(e){IEe.isArray(e)&&(e=e.join("")),this.src+=e},prepend:function(e){IEe.isArray(e)&&(e=e.join("")),this.src=e+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function tEe(t,e,I){if(IEe.isArray(t)){for(var l=[],n=0,a=t.length;n{"use strict";o();Dce.__esModule=!0;function vbt(t){return t&&t.__esModule?t:{default:t}}var Xbt=Hce(),F9I=cZ(),lEe=vbt(F9I),X9I=Du(),g9I=Fbt(),gbt=vbt(g9I);function o3(t){this.value=t}function i3(){}i3.prototype={nameLookup:function(e,I){return this.internalNameLookup(e,I)},depthedLookup:function(e){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(e),")"]},compilerInfo:function(){var e=Xbt.COMPILER_REVISION,I=Xbt.REVISION_CHANGES[e];return[e,I]},appendToBuffer:function(e,I,l){return X9I.isArray(e)||(e=[e]),e=this.source.wrap(e,I),this.environment.isSimple?["return ",e,";"]:l?["buffer += ",e,";"]:(e.appendToBuffer=!0,e)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(e,I){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",e,",",JSON.stringify(I),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(e,I,l,n){this.environment=e,this.options=I,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!n,this.name=this.environment.name,this.isChild=!!l,this.context=l||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(e,I),this.useDepths=this.useDepths||e.useDepths||e.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||e.useBlockParams;var a=e.opcodes,c=void 0,r=void 0,s=void 0,i=void 0;for(s=0,i=a.length;s0&&(l+=", "+n.join(", "));var a=0;Object.keys(this.aliases).forEach(function(s){var i=I.aliases[s];i.children&&i.referenceCount>1&&(l+=", alias"+ ++a+"="+s,i.children[0]="alias"+a)}),this.lookupPropertyFunctionIsUsed&&(l+=", "+this.lookupPropertyFunctionVarDeclaration());var c=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&c.push("blockParams"),this.useDepths&&c.push("depths");var r=this.mergeSource(l);return e?(c.push(r),Function.apply(this,c)):this.source.wrap(["function(",c.join(","),`) { + `,r,"}"])},mergeSource:function(e){var I=this.environment.isSimple,l=!this.forceBuffer,n=void 0,a=void 0,c=void 0,r=void 0;return this.source.each(function(s){s.appendToBuffer?(c?s.prepend(" + "):c=s,r=s):(c&&(a?c.prepend("buffer += "):n=!0,r.add(";"),c=r=void 0),a=!0,I||(l=!1))}),l?c?(c.prepend("return "),r.add(";")):a||this.source.push('return "";'):(e+=", buffer = "+(n?"":this.initializeBuffer()),c?(c.prepend("return buffer + "),r.add(";")):this.source.push("return buffer;")),e&&this.source.prepend("var "+e.substring(2)+(n?"":`; +`)),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return` + lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + } + `.trim()},blockValue:function(e){var I=this.aliasable("container.hooks.blockHelperMissing"),l=[this.contextName(0)];this.setupHelperArgs(e,0,l);var n=this.popStack();l.splice(1,0,n),this.push(this.source.functionCall(I,"call",l))},ambiguousBlockValue:function(){var e=this.aliasable("container.hooks.blockHelperMissing"),I=[this.contextName(0)];this.setupHelperArgs("",0,I,!0),this.flushInline();var l=this.topStack();I.splice(1,0,l),this.pushSource(["if (!",this.lastHelper,") { ",l," = ",this.source.functionCall(e,"call",I),"}"])},appendContent:function(e){this.pendingContent?e=this.pendingContent+e:this.pendingLocation=this.source.currentLocation,this.pendingContent=e},append:function(){if(this.isInline())this.replaceStack(function(I){return[" != null ? ",I,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var e=this.popStack();this.pushSource(["if (",e," != null) { ",this.appendToBuffer(e,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(e){this.lastContext=e},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(e,I,l,n){var a=0;!n&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(e[a++])):this.pushContext(),this.resolvePath("context",e,a,I,l)},lookupBlockParam:function(e,I){this.useBlockParams=!0,this.push(["blockParams[",e[0],"][",e[1],"]"]),this.resolvePath("context",I,1)},lookupData:function(e,I,l){e?this.pushStackLiteral("container.data(data, "+e+")"):this.pushStackLiteral("data"),this.resolvePath("data",I,0,!0,l)},resolvePath:function(e,I,l,n,a){var c=this;if(this.options.strict||this.options.assumeObjects){this.push(v9I(this.options.strict&&a,this,I,l,e));return}for(var r=I.length,s=function(G){c.replaceStack(function(d){var u=c.nameLookup(d,I[G],e);return n?[" && ",u]:[" != null ? ",u," : ",d]})},i=l;ithis.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var e=this.inlineStack;this.inlineStack=[];for(var I=0,l=e.length;I{"use strict";o();qce.__esModule=!0;function U_(t){return t&&t.__esModule?t:{default:t}}var y9I=Jut(),w9I=U_(y9I),H9I=Hfe(),Q9I=U_(H9I),nEe=Tut(),aEe=qut(),f9I=wbt(),E9I=U_(f9I),J9I=ffe(),C9I=U_(J9I),L9I=gfe(),k9I=U_(L9I),x9I=w9I.default.create;function Hbt(){var t=x9I();return t.compile=function(e,I){return aEe.compile(e,I,t)},t.precompile=function(e,I){return aEe.precompile(e,I,t)},t.AST=Q9I.default,t.Compiler=aEe.Compiler,t.JavaScriptCompiler=E9I.default,t.Parser=nEe.parser,t.parse=nEe.parse,t.parseWithoutProcessing=nEe.parseWithoutProcessing,t}var G3=Hbt();G3.create=Hbt;k9I.default(G3);G3.Visitor=C9I.default;G3.default=G3;qce.default=G3;Qbt.exports=qce.default});var rEe,j9I,U9I,O9I,Ro,Ebt,Jbt,tF=g(()=>{o();rEe=Object.defineProperty,j9I=Object.getOwnPropertyDescriptor,U9I=Object.getOwnPropertyNames,O9I=Object.prototype.hasOwnProperty,Ro=(t,e)=>{let I={};for(var l in t)rEe(I,l,{get:t[l],enumerable:!0});return e||rEe(I,Symbol.toStringTag,{value:"Module"}),I},Ebt=(t,e,I,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(var n=U9I(e),a=0,c=n.length,r;ae[s]).bind(null,r),enumerable:!(l=j9I(e,r))||l.enumerable});return t},Jbt=(t,e,I)=>(Ebt(t,e,"default"),I&&Ebt(I,e,"default"))});function PR(t,e){e?(Ao[0]=Ao[16]=Ao[1]=Ao[2]=Ao[3]=Ao[4]=Ao[5]=Ao[6]=Ao[7]=Ao[8]=Ao[9]=Ao[10]=Ao[11]=Ao[12]=Ao[13]=Ao[14]=Ao[15]=0,this.blocks=Ao):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=t}var Ot,z9I,qR,Pce,Ao,eQ,$ce=g(()=>{o();Ot="0123456789abcdef".split(""),z9I=[-2147483648,8388608,32768,128],qR=[24,16,8,0],Pce=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],Ao=[];PR.prototype.update=function(t){if(!this.finalized){var e,I=typeof t;if(I!=="string"){if(I==="object"){if(t===null)throw new Error(ERROR);if(ARRAY_BUFFER&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!Array.isArray(t)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(t)))throw new Error(ERROR)}else throw new Error(ERROR);e=!0}for(var l,n=0,a,c=t.length,r=this.blocks;n>>2]|=t[n]<>>2]|=l<>>2]|=(192|l>>>6)<>>2]|=(128|l&63)<=57344?(r[a>>>2]|=(224|l>>>12)<>>2]|=(128|l>>>6&63)<>>2]|=(128|l&63)<>>2]|=(240|l>>>18)<>>2]|=(128|l>>>12&63)<>>2]|=(128|l>>>6&63)<>>2]|=(128|l&63)<=64?(this.block=r[16],this.start=a-64,this.hash(),this.hashed=!0):this.start=a}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}};PR.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,e=this.lastByteIndex;t[16]=this.block,t[e>>>2]|=z9I[e&3],this.block=t[16],e>=56&&(this.hashed||this.hash(),t[0]=this.block,t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.hBytes<<3|this.bytes>>>29,t[15]=this.bytes<<3,this.hash()}};PR.prototype.hash=function(){var t=this.h0,e=this.h1,I=this.h2,l=this.h3,n=this.h4,a=this.h5,c=this.h6,r=this.h7,s=this.blocks,i,G,d,u,b,Z,p,W,h,N,V;for(i=16;i<64;++i)b=s[i-15],G=(b>>>7|b<<25)^(b>>>18|b<<14)^b>>>3,b=s[i-2],d=(b>>>17|b<<15)^(b>>>19|b<<13)^b>>>10,s[i]=s[i-16]+G+s[i-7]+d<<0;for(V=e&I,i=0;i<64;i+=4)this.first?(this.is224?(W=300032,b=s[0]-1413257819,r=b-150054599<<0,l=b+24177077<<0):(W=704751109,b=s[0]-210244248,r=b-1521486534<<0,l=b+143694565<<0),this.first=!1):(G=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),d=(n>>>6|n<<26)^(n>>>11|n<<21)^(n>>>25|n<<7),W=t&e,u=W^t&I^V,p=n&a^~n&c,b=r+d+p+Pce[i]+s[i],Z=G+u,r=l+b<<0,l=b+Z<<0),G=(l>>>2|l<<30)^(l>>>13|l<<19)^(l>>>22|l<<10),d=(r>>>6|r<<26)^(r>>>11|r<<21)^(r>>>25|r<<7),h=l&t,u=h^l&e^W,p=c&r^~c&n,b=a+d+p+Pce[i+1]+s[i+1],Z=G+u,c=I+b<<0,I=b+Z<<0,G=(I>>>2|I<<30)^(I>>>13|I<<19)^(I>>>22|I<<10),d=(c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7),N=I&l,u=N^I&t^h,p=a&c^~a&r,b=n+d+p+Pce[i+2]+s[i+2],Z=G+u,a=e+b<<0,e=b+Z<<0,G=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),d=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),V=e&I,u=V^e&l^N,p=a&c^~a&r,b=n+d+p+Pce[i+3]+s[i+3],Z=G+u,n=t+b<<0,t=b+Z<<0,this.chromeBugWorkAround=!0;this.h0=this.h0+t<<0,this.h1=this.h1+e<<0,this.h2=this.h2+I<<0,this.h3=this.h3+l<<0,this.h4=this.h4+n<<0,this.h5=this.h5+a<<0,this.h6=this.h6+c<<0,this.h7=this.h7+r<<0};PR.prototype.hex=function(){this.finalize();var t=this.h0,e=this.h1,I=this.h2,l=this.h3,n=this.h4,a=this.h5,c=this.h6,r=this.h7,s=Ot[t>>>28&15]+Ot[t>>>24&15]+Ot[t>>>20&15]+Ot[t>>>16&15]+Ot[t>>>12&15]+Ot[t>>>8&15]+Ot[t>>>4&15]+Ot[t&15]+Ot[e>>>28&15]+Ot[e>>>24&15]+Ot[e>>>20&15]+Ot[e>>>16&15]+Ot[e>>>12&15]+Ot[e>>>8&15]+Ot[e>>>4&15]+Ot[e&15]+Ot[I>>>28&15]+Ot[I>>>24&15]+Ot[I>>>20&15]+Ot[I>>>16&15]+Ot[I>>>12&15]+Ot[I>>>8&15]+Ot[I>>>4&15]+Ot[I&15]+Ot[l>>>28&15]+Ot[l>>>24&15]+Ot[l>>>20&15]+Ot[l>>>16&15]+Ot[l>>>12&15]+Ot[l>>>8&15]+Ot[l>>>4&15]+Ot[l&15]+Ot[n>>>28&15]+Ot[n>>>24&15]+Ot[n>>>20&15]+Ot[n>>>16&15]+Ot[n>>>12&15]+Ot[n>>>8&15]+Ot[n>>>4&15]+Ot[n&15]+Ot[a>>>28&15]+Ot[a>>>24&15]+Ot[a>>>20&15]+Ot[a>>>16&15]+Ot[a>>>12&15]+Ot[a>>>8&15]+Ot[a>>>4&15]+Ot[a&15]+Ot[c>>>28&15]+Ot[c>>>24&15]+Ot[c>>>20&15]+Ot[c>>>16&15]+Ot[c>>>12&15]+Ot[c>>>8&15]+Ot[c>>>4&15]+Ot[c&15];return this.is224||(s+=Ot[r>>>28&15]+Ot[r>>>24&15]+Ot[r>>>20&15]+Ot[r>>>16&15]+Ot[r>>>12&15]+Ot[r>>>8&15]+Ot[r>>>4&15]+Ot[r&15]),s};PR.prototype.toString=PR.prototype.hex;PR.prototype.digest=function(){this.finalize();var t=this.h0,e=this.h1,I=this.h2,l=this.h3,n=this.h4,a=this.h5,c=this.h6,r=this.h7,s=[t>>>24&255,t>>>16&255,t>>>8&255,t&255,e>>>24&255,e>>>16&255,e>>>8&255,e&255,I>>>24&255,I>>>16&255,I>>>8&255,I&255,l>>>24&255,l>>>16&255,l>>>8&255,l&255,n>>>24&255,n>>>16&255,n>>>8&255,n&255,a>>>24&255,a>>>16&255,a>>>8&255,a&255,c>>>24&255,c>>>16&255,c>>>8&255,c&255];return this.is224||s.push(r>>>24&255,r>>>16&255,r>>>8&255,r&255),s};PR.prototype.array=PR.prototype.digest;PR.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(this.is224?28:32),e=new DataView(t);return e.setUint32(0,this.h0),e.setUint32(4,this.h1),e.setUint32(8,this.h2),e.setUint32(12,this.h3),e.setUint32(16,this.h4),e.setUint32(20,this.h5),e.setUint32(24,this.h6),this.is224||e.setUint32(28,this.h7),t};eQ=(...t)=>new PR(!1,!0).update(t.join("")).hex()});var Cbt,O_=g(()=>{o();Ct();$ce();Cbt=ve({sha256:()=>eQ})});function B9I(t){return t.message!==void 0?{text:t.text,message:PS(t.message)}:{text:t.text}}function M9I(t){let e={text:t.text};return t.message!==void 0&&(e.message=t.message.toDict()),e}var Lbt,kbt,xbt,S9I,sEe,oEe=g(()=>{o();Ct();$ce();O_();xR();Lbt=ve({BaseCache:()=>xbt,InMemoryCache:()=>sEe,defaultHashKeyEncoder:()=>kbt,deserializeStoredGeneration:()=>B9I,serializeGeneration:()=>M9I}),kbt=(...t)=>eQ(t.join("_"));xbt=class{keyEncoder=kbt;makeDefaultKeyEncoder(t){this.keyEncoder=t}},S9I=new Map,sEe=class jbt extends xbt{cache;constructor(e){super(),this.cache=e??new Map}lookup(e,I){return Promise.resolve(this.cache.get(this.keyEncoder(e,I))??null)}async update(e,I,l){this.cache.set(this.keyEncoder(e,I),l)}static global(){return new jbt(S9I)}}});function D9I(t,e){let I=Array.from({length:t.length},(l,n)=>({start:n,end:n+1}));for(;I.length>1;){let l=null;for(let n=0;ne.get(t.slice(I.start,I.end).join(","))).filter(I=>I!=null)}function P9I(t){return t.replace(/[\\^$*+?.()|[\]{}]/g,"\\$&")}function GEe(t){switch(t){case"gpt2":return"gpt2";case"code-cushman-001":case"code-cushman-002":case"code-davinci-001":case"code-davinci-002":case"cushman-codex":case"davinci-codex":case"davinci-002":case"text-davinci-002":case"text-davinci-003":return"p50k_base";case"code-davinci-edit-001":case"text-davinci-edit-001":return"p50k_edit";case"ada":case"babbage":case"babbage-002":case"code-search-ada-code-001":case"code-search-babbage-code-001":case"curie":case"davinci":case"text-ada-001":case"text-babbage-001":case"text-curie-001":case"text-davinci-001":case"text-search-ada-doc-001":case"text-search-babbage-doc-001":case"text-search-curie-doc-001":case"text-search-davinci-doc-001":case"text-similarity-ada-001":case"text-similarity-babbage-001":case"text-similarity-curie-001":case"text-similarity-davinci-001":return"r50k_base";case"gpt-3.5-turbo-instruct-0914":case"gpt-3.5-turbo-instruct":case"gpt-3.5-turbo-16k-0613":case"gpt-3.5-turbo-16k":case"gpt-3.5-turbo-0613":case"gpt-3.5-turbo-0301":case"gpt-3.5-turbo":case"gpt-4-32k-0613":case"gpt-4-32k-0314":case"gpt-4-32k":case"gpt-4-0613":case"gpt-4-0314":case"gpt-4":case"gpt-3.5-turbo-1106":case"gpt-35-turbo":case"gpt-4-1106-preview":case"gpt-4-vision-preview":case"gpt-3.5-turbo-0125":case"gpt-4-turbo":case"gpt-4-turbo-2024-04-09":case"gpt-4-turbo-preview":case"gpt-4-0125-preview":case"text-embedding-ada-002":case"text-embedding-3-small":case"text-embedding-3-large":return"cl100k_base";case"gpt-4o":case"gpt-4o-2024-05-13":case"gpt-4o-2024-08-06":case"gpt-4o-2024-11-20":case"gpt-4o-mini-2024-07-18":case"gpt-4o-mini":case"gpt-4o-search-preview":case"gpt-4o-search-preview-2025-03-11":case"gpt-4o-mini-search-preview":case"gpt-4o-mini-search-preview-2025-03-11":case"gpt-4o-audio-preview":case"gpt-4o-audio-preview-2024-12-17":case"gpt-4o-audio-preview-2024-10-01":case"gpt-4o-mini-audio-preview":case"gpt-4o-mini-audio-preview-2024-12-17":case"o1":case"o1-2024-12-17":case"o1-mini":case"o1-mini-2024-09-12":case"o1-preview":case"o1-preview-2024-09-12":case"o1-pro":case"o1-pro-2025-03-19":case"o3":case"o3-2025-04-16":case"o3-mini":case"o3-mini-2025-01-31":case"o4-mini":case"o4-mini-2025-04-16":case"chatgpt-4o-latest":case"gpt-4o-realtime":case"gpt-4o-realtime-preview-2024-10-01":case"gpt-4o-realtime-preview-2024-12-17":case"gpt-4o-mini-realtime-preview":case"gpt-4o-mini-realtime-preview-2024-12-17":case"gpt-4.1":case"gpt-4.1-2025-04-14":case"gpt-4.1-mini":case"gpt-4.1-mini-2025-04-14":case"gpt-4.1-nano":case"gpt-4.1-nano-2025-04-14":case"gpt-4.5-preview":case"gpt-4.5-preview-2025-02-27":case"gpt-5":case"gpt-5-2025-08-07":case"gpt-5-nano":case"gpt-5-nano-2025-08-07":case"gpt-5-mini":case"gpt-5-mini-2025-08-07":case"gpt-5-chat-latest":return"o200k_base";default:throw new Error("Unknown model")}}var Ubt,T9I,_9I,K9I,iEe,ere,Obt=g(()=>{o();Ubt=z(gXe(),1),T9I=Object.defineProperty,_9I=(t,e,I)=>e in t?T9I(t,e,{enumerable:!0,configurable:!0,writable:!0,value:I}):t[e]=I,K9I=(t,e,I)=>(_9I(t,typeof e!="symbol"?e+"":e,I),I);iEe=class{specialTokens;inverseSpecialTokens;patStr;textEncoder=new TextEncoder;textDecoder=new TextDecoder("utf-8");rankMap=new Map;textMap=new Map;constructor(t,e){this.patStr=t.pat_str;let I=t.bpe_ranks.split(` +`).filter(Boolean).reduce((l,n)=>{let[a,c,...r]=n.split(" "),s=Number.parseInt(c,10);return r.forEach((i,G)=>l[i]=s+G),l},{});for(let[l,n]of Object.entries(I)){let a=Ubt.default.toByteArray(l);this.rankMap.set(a.join(","),n),this.textMap.set(n,a)}this.specialTokens={...t.special_tokens,...e},this.inverseSpecialTokens=Object.entries(this.specialTokens).reduce((l,[n,a])=>(l[a]=this.textEncoder.encode(n),l),{})}encode(t,e=[],I="all"){let l=new RegExp(this.patStr,"ug"),n=iEe.specialTokenRegex(Object.keys(this.specialTokens)),a=[],c=new Set(e==="all"?Object.keys(this.specialTokens):e),r=new Set(I==="all"?Object.keys(this.specialTokens).filter(i=>!c.has(i)):I);if(r.size>0){let i=iEe.specialTokenRegex([...r]),G=t.match(i);if(G!=null)throw new Error(`The text contains a special token that is not allowed: ${G[0]}`)}let s=0;for(;;){let i=null,G=s;for(;n.lastIndex=G,i=n.exec(t),!(i==null||c.has(i[0]));)G=i.index+1;let d=i?.index??t.length;for(let b of t.substring(s,d).matchAll(l)){let Z=this.textEncoder.encode(b[0]),p=this.rankMap.get(Z.join(","));if(p!=null){a.push(p);continue}a.push(...q9I(Z,this.rankMap))}if(i==null)break;let u=this.specialTokens[i[0]];a.push(u),s=i.index+i[0].length}return a}decode(t){let e=[],I=0;for(let a=0;anew RegExp(t.map(e=>P9I(e)).join("|"),"g"))});var zbt=g(()=>{o();Obt()});async function Ire(t){return t in tre||(tre[t]=$9I.fetch(`https://tiktoken.pages.dev/js/${t}.json`).then(e=>e.json()).then(e=>new ere(e)).catch(e=>{throw delete tre[t],e})),await tre[t]}async function lre(t){return Ire(GEe(t))}var Bbt,tre,$9I,nre=g(()=>{o();Ct();JH();zbt();Bbt=ve({encodingForModel:()=>lre,getEncoding:()=>Ire}),tre={},$9I=new tZ({})});function $R(t){return typeof t!="object"||!t?!1:!!("type"in t&&t.type==="function"&&"function"in t&&typeof t.function=="object"&&t.function&&"name"in t.function&&"parameters"in t.function)}var Mbt,are,eOI,z_,dEe,tOI,cre,GC,sZ=g(()=>{o();Ct();xR();oEe();JH();es();PJ();nre();Mbt=ve({BaseLangChain:()=>cre,BaseLanguageModel:()=>GC,calculateMaxTokens:()=>dEe,getEmbeddingContextSize:()=>eOI,getModelContextSize:()=>z_,getModelNameForTiktoken:()=>are,isOpenAITool:()=>$R}),are=t=>t.startsWith("gpt-5")?"gpt-5":t.startsWith("gpt-3.5-turbo-16k")?"gpt-3.5-turbo-16k":t.startsWith("gpt-3.5-turbo-")?"gpt-3.5-turbo":t.startsWith("gpt-4-32k")?"gpt-4-32k":t.startsWith("gpt-4-")?"gpt-4":t.startsWith("gpt-4o")?"gpt-4o":t,eOI=t=>{switch(t){case"text-embedding-ada-002":return 8191;default:return 2046}},z_=t=>{switch(are(t)){case"gpt-5":case"gpt-5-turbo":case"gpt-5-turbo-preview":return 4e5;case"gpt-4o":case"gpt-4o-mini":case"gpt-4o-2024-05-13":case"gpt-4o-2024-08-06":return 128e3;case"gpt-4-turbo":case"gpt-4-turbo-preview":case"gpt-4-turbo-2024-04-09":case"gpt-4-0125-preview":case"gpt-4-1106-preview":return 128e3;case"gpt-4-32k":case"gpt-4-32k-0314":case"gpt-4-32k-0613":return 32768;case"gpt-4":case"gpt-4-0314":case"gpt-4-0613":return 8192;case"gpt-3.5-turbo-16k":case"gpt-3.5-turbo-16k-0613":return 16384;case"gpt-3.5-turbo":case"gpt-3.5-turbo-0301":case"gpt-3.5-turbo-0613":case"gpt-3.5-turbo-1106":case"gpt-3.5-turbo-0125":return 4096;case"text-davinci-003":case"text-davinci-002":return 4097;case"text-davinci-001":return 2049;case"text-curie-001":case"text-babbage-001":case"text-ada-001":return 2048;case"code-davinci-002":case"code-davinci-001":return 8e3;case"code-cushman-001":return 2048;case"claude-3-5-sonnet-20241022":case"claude-3-5-sonnet-20240620":case"claude-3-opus-20240229":case"claude-3-sonnet-20240229":case"claude-3-haiku-20240307":case"claude-2.1":return 2e5;case"claude-2.0":case"claude-instant-1.2":return 1e5;case"gemini-1.5-pro":case"gemini-1.5-pro-latest":case"gemini-1.5-flash":case"gemini-1.5-flash-latest":return 1e6;case"gemini-pro":case"gemini-pro-vision":return 32768;default:return 4097}};dEe=async({prompt:t,modelName:e})=>{let I;try{I=(await lre(are(e))).encode(t).length}catch{console.warn("Failed to calculate number of tokens, falling back to approximate count"),I=Math.ceil(t.length/4)}return z_(e)-I},tOI=()=>!1,cre=class extends tI{verbose;callbacks;tags;metadata;get lc_attributes(){return{callbacks:void 0,verbose:void 0}}constructor(t){super(t),this.verbose=t.verbose??tOI(),this.callbacks=t.callbacks,this.tags=t.tags??[],this.metadata=t.metadata??{},this._addVersion("@langchain/core","1.1.42")}_addVersion(t,e){let I=this.metadata?.versions;this.metadata={...this.metadata,versions:{...typeof I=="object"&&I!==null?I:{},[t]:e}}}},GC=class extends cre{get callKeys(){return["stop","timeout","signal","tags","metadata","callbacks"]}caller;cache;constructor({callbacks:t,callbackManager:e,...I}){let{cache:l,...n}=I;super({callbacks:t??e,...n}),typeof l=="object"?this.cache=l:l?this.cache=sEe.global():this.cache=void 0,this.caller=new tZ(I??{})}_encoding;async getNumTokens(t){let e;typeof t=="string"?e=t:e=t.map(l=>typeof l=="string"?l:l.type==="text"&&"text"in l?l.text:"").join("");let I=Math.ceil(e.length/4);if(!this._encoding)try{this._encoding=await lre("modelName"in this?are(this.modelName):"gpt2")}catch(l){console.warn("Failed to calculate number of tokens, falling back to approximate count",l)}if(this._encoding)try{I=this._encoding.encode(e).length}catch(l){console.warn("Failed to calculate number of tokens, falling back to approximate count",l)}return I}static _convertInputToPromptValue(t){return typeof t=="string"?new qJ(t):Array.isArray(t)?new b_(t.map(Zi)):t}_identifyingParams(){return{}}_getSerializedCacheKeyParametersForCall({config:t,...e}){let I={...this._identifyingParams(),...e,_type:this._llmType(),_model:this._modelType()};return Object.entries(I).filter(([l,n])=>n!==void 0).map(([l,n])=>`${l}:${JSON.stringify(n)}`).sort().join(",")}serialize(){return{...this._identifyingParams(),_type:this._llmType(),_model:this._modelType()}}static async deserialize(t){throw new Error("Use .toJSON() instead")}get profile(){return{}}_filterInvocationParamsForTracing(t){let{tools:e,functions:I,messages:l,response_format:n,...a}=t;return a}}});function rre(t){let e=t.constructor;return new e({...t,content:t.contentBlocks,response_metadata:{...t.response_metadata,output_version:"v1"}})}var Sbt,Tbt=g(()=>{o();Sbt=t=>t()});var e0,sre=g(()=>{o();xA();Lb();es();e0=class extends tI{static lc_name(){return"RunnablePassthrough"}lc_namespace=["langchain_core","runnables"];lc_serializable=!0;func;constructor(t){super(t),t&&(this.func=t.func)}async invoke(t,e){let I=KI(e);return this.func&&await this.func(t,I),this._callWithConfig(l=>Promise.resolve(l),t,I)}async*transform(t,e){let I=KI(e),l,n=!0;for await(let a of this._transformStreamWithConfig(t,c=>c,I))if(yield a,n)if(l===void 0)l=a;else try{l=Su(l,a)}catch{l=void 0,n=!1}this.func&&l!==void 0&&await this.func(l,I)}static assign(t){return new KJ(new qA({steps:t}))}}});var ore,_bt=g(()=>{o();xA();es();ore=class extends tI{static lc_name(){return"RouterRunnable"}lc_namespace=["langchain_core","runnables"];lc_serializable=!0;runnables;constructor(t){super(t),this.runnables=t.runnables}async invoke(t,e){let{key:I,input:l}=t,n=this.runnables[I];if(n===void 0)throw new Error(`No runnable associated with key "${I}".`);return n.invoke(l,KI(e))}async batch(t,e,I){let l=t.map(G=>G.key),n=t.map(G=>G.input);if(l.find(G=>this.runnables[G]===void 0)!==void 0)throw new Error("One or more keys do not have a corresponding runnable.");let a=l.map(G=>this.runnables[G]),c=this._getOptionsList(e??{},t.length),r=c[0]?.maxConcurrency??I?.maxConcurrency,s=r&&r>0?r:t.length,i=[];for(let G=0;Ga[Z].invoke(b,c[Z])),u=await Promise.all(d);i.push(u)}return i.flat()}async stream(t,e){let{key:I,input:l}=t,n=this.runnables[I];if(n===void 0)throw new Error(`No runnable associated with key "${I}".`);return n.stream(l,e)}}});var ire,Kbt=g(()=>{o();xA();Lb();es();ire=class extends tI{static lc_name(){return"RunnableBranch"}lc_namespace=["langchain_core","runnables"];lc_serializable=!0;default;branches;constructor(t){super(t),this.branches=t.branches,this.default=t.default}static from(t){if(t.length<1)throw new Error("RunnableBranch requires at least one branch");let e=t.slice(0,-1).map(([l,n])=>[rr(l),rr(n)]),I=rr(t[t.length-1]);return new this({branches:e,default:I})}async _invoke(t,e,I){let l;for(let n=0;n{o();Wo();tG();EA();es();NI();sre();Gre=class extends ha{runnable;inputMessagesKey;outputMessagesKey;historyMessagesKey;getMessageHistory;constructor(t){let e=sr.from((a,c)=>this._enterHistory(a,c??{})).withConfig({runName:"loadHistory"}),I=t.historyMessagesKey??t.inputMessagesKey;I&&(e=e0.assign({[I]:e}).withConfig({runName:"insertHistory"}));let l=e.pipe(t.runnable.withListeners({onEnd:(a,c)=>this._exitHistory(a,c??{})})).withConfig({runName:"RunnableWithMessageHistory"}),n=t.config??{};super({...t,config:n,bound:l}),this.runnable=t.runnable,this.getMessageHistory=t.getMessageHistory,this.inputMessagesKey=t.inputMessagesKey,this.outputMessagesKey=t.outputMessagesKey,this.historyMessagesKey=t.historyMessagesKey}_getInputMessages(t){let e;if(typeof t=="object"&&!Array.isArray(t)&&!ma(t)){let I;this.inputMessagesKey?I=this.inputMessagesKey:Object.keys(t).length===1?I=Object.keys(t)[0]:I="input",Array.isArray(t[I])&&Array.isArray(t[I][0])?e=t[I][0]:e=t[I]}else e=t;if(typeof e=="string")return[new ZI(e)];if(Array.isArray(e))return e;if(ma(e))return[e];throw new Error(`Expected a string, BaseMessage, or array of BaseMessages. +Got ${JSON.stringify(e,null,2)}`)}_getOutputMessages(t){let e;if(!Array.isArray(t)&&!ma(t)&&typeof t!="string"){let I;this.outputMessagesKey!==void 0?I=this.outputMessagesKey:Object.keys(t).length===1?I=Object.keys(t)[0]:I="output",t.generations!==void 0?e=t.generations[0][0].message:e=t[I]}else e=t;if(typeof e=="string")return[new He(e)];if(Array.isArray(e))return e;if(ma(e))return[e];throw new Error(`Expected a string, BaseMessage, or array of BaseMessages. Received: ${JSON.stringify(e,null,2)}`)}async _enterHistory(t,e){let I=await(e?.configurable?.messageHistory).getMessages();return this.historyMessagesKey===void 0?I.concat(this._getInputMessages(t)):I}async _exitHistory(t,e){let I=e.configurable?.messageHistory,l;Array.isArray(t.inputs)&&Array.isArray(t.inputs[0])?l=t.inputs[0]:l=t.inputs;let n=this._getInputMessages(l);if(this.historyMessagesKey===void 0){let r=await I.getMessages();n=n.slice(r.length)}let a=t.outputs;if(!a)throw new Error(`Output values from 'Run' undefined. Run: ${JSON.stringify(t,null,2)}`);let c=this._getOutputMessages(a);await I.addMessages([...n,...c])}async _mergeConfig(...t){let e=await super._mergeConfig(...t);if(!e.configurable||!e.configurable.sessionId){let l={[this.inputMessagesKey??"input"]:"foo"};throw new Error(`sessionId is required. Pass it in as part of the config argument to .invoke() or .stream() +eg. chain.invoke(${JSON.stringify(l)}, ${JSON.stringify({configurable:{sessionId:"123"}})})`)}let{sessionId:I}=e.configurable;return e.configurable.messageHistory=await this.getMessageHistory(I),e}}});var qbt,Xc=g(()=>{o();Ct();xA();Ax();es();sre();_bt();Kbt();Dbt();qbt=ve({RouterRunnable:()=>ore,Runnable:()=>tI,RunnableAssign:()=>KJ,RunnableBinding:()=>ha,RunnableBranch:()=>ire,RunnableEach:()=>rce,RunnableLambda:()=>sr,RunnableMap:()=>qA,RunnableParallel:()=>sce,RunnablePassthrough:()=>e0,RunnablePick:()=>u_,RunnableRetry:()=>Tx,RunnableSequence:()=>$r,RunnableToolLike:()=>cce,RunnableWithFallbacks:()=>d_,RunnableWithMessageHistory:()=>Gre,_coerceToRunnable:()=>rr,ensureConfig:()=>KI,getCallbackManagerForConfig:()=>lG,mergeConfigs:()=>xn,patchConfig:()=>Nl,pickRunnableConfigKeys:()=>Vo,raceWithSignal:()=>Mu})});var IF,t0,or,xX=g(()=>{o();hX();es();Xc();IF=class extends tI{parseResultWithPrompt(t,e,I){return this.parseResult(t,I)}_baseMessageToString(t){return typeof t.content=="string"?t.content:this._baseMessageContentToString(t.content)}_baseMessageContentToString(t){return JSON.stringify(t)}async invoke(t,e){return typeof t=="string"?this._callWithConfig(async(I,l)=>this.parseResult([{text:I}],l?.callbacks),t,{...e,runType:"parser"}):this._callWithConfig(async(I,l)=>this.parseResult([{message:I,text:this._baseMessageToString(I)}],l?.callbacks),t,{...e,runType:"parser"})}},t0=class extends IF{parseResult(t,e){return this.parse(t[0].text,e)}async parseWithPrompt(t,e,I){return this.parse(t,I)}_type(){throw new Error("_type not implemented")}},or=class extends Error{llmOutput;observation;sendToLLM;constructor(t,e,I,l=!1){if(super(t),this.llmOutput=e,this.observation=I,this.sendToLLM=l,l&&(I===void 0||e===void 0))throw new Error("Arguments 'observation' & 'llmOutput' are required if 'sendToLlm' is true");pX(this,"OUTPUT_PARSING_FAILURE")}}});var jX,lF,UX=g(()=>{o();Wo();xR();Yo();xX();Ice();jX=class extends t0{async*_transform(t){for await(let e of t)typeof e=="string"?yield this.parseResult([{text:e}]):yield this.parseResult([{message:e,text:this._baseMessageToString(e)}])}async*transform(t,e){yield*this._transformStreamWithConfig(t,this._transform.bind(this),{...e,runType:"parser"})}},lF=class extends jX{diff=!1;constructor(t){super(t),this.diff=t?.diff??this.diff}async*_transform(t){let e,I;for await(let l of t){if(typeof l!="string"&&typeof l.content!="string")throw new Error("Cannot handle non-string output.");let n;if(ZX(l)){if(typeof l.content!="string")throw new Error("Cannot handle non-string message output.");n=new Nc({message:l,text:l.content})}else if(ma(l)){if(typeof l.content!="string")throw new Error("Cannot handle non-string message output.");n=new Nc({message:oJ(l),text:l.content})}else n=new Pr({text:l});I===void 0?I=n:I=I.concat(n);let a=await this.parsePartialResult([I]);a!=null&&!KA(a,e)&&(this.diff?yield this._diff(e,a):yield a,e=a)}}getFormatInstructions(){return""}}});var Pbt,B_=g(()=>{o();Ct();WT();Xx();Lve();Pbt=ve({applyPatch:()=>fH,compare:()=>EH})});var d3,u3=g(()=>{o();sJ();Xx();UX();B_();d3=class extends lF{static lc_name(){return"JsonOutputParser"}lc_namespace=["langchain_core","output_parsers"];lc_serializable=!0;_concatOutputChunks(t,e){return this.diff?super._concatOutputChunks(t,e):e}_diff(t,e){if(e)return t?EH(t,e):[{op:"replace",path:"",value:e}]}async parsePartialResult(t){return rJ(t[0].text)}async parse(t){return rJ(t,JSON.parse)}getFormatInstructions(){return""}_baseMessageToString(t){return t.text}}});var dre,uEe=g(()=>{o();sJ();xX();u3();dre=class extends t0{static lc_name(){return"StandardSchemaOutputParser"}lc_namespace=["langchain","output_parsers","standard_schema"];schema;constructor(t){super(),this.schema=t}static fromSerializableSchema(t){return new this(t)}async parse(t){try{let e=rJ(t,JSON.parse),I=await this.schema["~standard"].validate(e);if(I.issues)throw new Error(`Validation failed: ${JSON.stringify(I.issues)}`);return I.value}catch(e){throw new or(`Failed to parse. Text: "${t}". Error: ${e}`,t)}}getFormatInstructions(){return""}}});var M_,bEe,$bt,mEe=g(()=>{o();MA();aG();xX();Fc();M_=class extends t0{static lc_name(){return"StructuredOutputParser"}lc_namespace=["langchain","output_parsers","structured"];toJSON(){return this.toJSONNotImplemented()}constructor(t){super(t),this.schema=t}static fromZodSchema(t){return new this(t)}static fromNamesAndDescriptions(t){let e=ie.object(Object.fromEntries(Object.entries(t).map(([I,l])=>[I,ie.string().describe(l)])));return new this(e)}getFormatInstructions(){return`You must format your output as a JSON value that adheres to a given "JSON Schema" instance. + +"JSON Schema" is a declarative language that allows you to annotate and validate JSON documents. + +For example, the example "JSON Schema" instance {{"properties": {{"foo": {{"description": "a list of test words", "type": "array", "items": {{"type": "string"}}}}}}, "required": ["foo"]}} +would match an object with one required property, "foo". The "type" property specifies "foo" must be an "array", and the "description" property semantically describes it as "a list of test words". The items within "foo" must be strings. +Thus, the object {{"foo": ["bar", "baz"]}} is a well-formatted instance of this example "JSON Schema". The object {{"properties": {{"foo": ["bar", "baz"]}}}} is not well-formatted. + +Your output will be parsed and type-checked according to the provided schema instance, so make sure all fields in your output match the schema exactly and there are no trailing commas! + +Here is the JSON Schema instance your output must adhere to. Include the enclosing markdown codeblock: +\`\`\`json +${JSON.stringify(DI(this.schema))} +\`\`\` +`}async parse(t){try{let e=t.trim(),I=(e.match(/^```(?:json)?\s*([\s\S]*?)```/)?.[1]||e.match(/```json\s*([\s\S]*?)```/)?.[1]||e).replace(/"([^"\\]*(\\.[^"\\]*)*)"/g,(l,n)=>`"${n.replace(/\n/g,"\\n")}"`).replace(/\n/g,"");return await OH(this.schema,JSON.parse(I))}catch(e){throw new or(`Failed to parse. Text: "${t}". Error: ${e}`,t)}}},bEe=class extends M_{static lc_name(){return"JsonMarkdownStructuredOutputParser"}getFormatInstructions(t){let e=t?.interpolationDepth??1;if(e<1)throw new Error("f string interpolation depth must be at least 1");return`Return a markdown code snippet with a JSON object formatted to look like: +\`\`\`json +${this._schemaToInstruction(DI(this.schema)).replaceAll("{","{".repeat(e)).replaceAll("}","}".repeat(e))} +\`\`\``}_schemaToInstruction(t,e=2){let I=t;if("type"in I){let l=!1,n;if(Array.isArray(I.type)){let r=I.type.findIndex(s=>s==="null");r!==-1&&(l=!0,I.type.splice(r,1)),n=I.type.join(" | ")}else n=I.type;if(I.type==="object"&&I.properties){let r=I.description?` // ${I.description}`:"";return`{ +${Object.entries(I.properties).map(([s,i])=>{let G=I.required?.includes(s)?"":" (optional)";return`${" ".repeat(e)}"${s}": ${this._schemaToInstruction(i,e+2)}${G}`}).join(` +`)} +${" ".repeat(e-2)}}${r}`}if(I.type==="array"&&I.items){let r=I.description?` // ${I.description}`:"";return`array[ +${" ".repeat(e)}${this._schemaToInstruction(I.items,e+2)} +${" ".repeat(e-2)}] ${r}`}let a=l?" (nullable)":"",c=I.description?` // ${I.description}`:"";return`${n}${c}${a}`}if("anyOf"in I)return I.anyOf.map(l=>this._schemaToInstruction(l,e)).join(` +${" ".repeat(e-2)}`);throw new Error("unsupported schema type")}static fromZodSchema(t){return new this(t)}static fromNamesAndDescriptions(t){let e=ie.object(Object.fromEntries(Object.entries(t).map(([I,l])=>[I,ie.string().describe(l)])));return new this(e)}},$bt=class extends t0{structuredInputParser;constructor({inputSchema:t}){super(...arguments),this.structuredInputParser=new bEe(t)}async parse(t){let e;try{e=await this.structuredInputParser.parse(t)}catch(I){throw new or(`Failed to parse. Text: "${t}". Error: ${I}`,t)}return this.outputProcessor(e)}getFormatInstructions(){return this.structuredInputParser.getFormatInstructions()}}});var emt,tmt=g(()=>{o();UX();emt=class extends jX{static lc_name(){return"BytesOutputParser"}lc_namespace=["langchain_core","output_parsers","bytes"];lc_serializable=!0;textEncoder=new TextEncoder;parse(t){return Promise.resolve(this.textEncoder.encode(t))}getFormatInstructions(){return""}}});var b3,Imt,lmt,nmt,amt,cmt=g(()=>{o();xX();UX();b3=class extends jX{re;async*_transform(t){let e="";for await(let I of t)if(typeof I=="string"?e+=I:e+=I.content,this.re){let l=[...e.matchAll(this.re)];if(l.length>1){let n=0;for(let a of l.slice(0,-1))yield[a[1]],n+=(a.index??0)+a[0].length;e=e.slice(n)}}else{let l=await this.parse(e);if(l.length>1){for(let n of l.slice(0,-1))yield[n];e=l[l.length-1]}}for(let I of await this.parse(e))yield[I]}},Imt=class extends b3{static lc_name(){return"CommaSeparatedListOutputParser"}lc_namespace=["langchain_core","output_parsers","list"];lc_serializable=!0;async parse(t){try{return t.trim().split(",").map(e=>e.trim())}catch{throw new or(`Could not parse output: ${t}`,t)}}getFormatInstructions(){return"Your response should be a list of comma separated values, eg: `foo, bar, baz`"}},lmt=class extends b3{lc_namespace=["langchain_core","output_parsers","list"];length;separator;constructor({length:t,separator:e}){super(...arguments),this.length=t,this.separator=e||","}async parse(t){try{let e=t.trim().split(this.separator).map(I=>I.trim());if(this.length!==void 0&&e.length!==this.length)throw new or(`Incorrect number of items. Expected ${this.length}, got ${e.length}.`);return e}catch(e){throw Object.getPrototypeOf(e)===or.prototype?e:new or(`Could not parse output: ${t}`)}}getFormatInstructions(){return`Your response should be a list of ${this.length===void 0?"":`${this.length} `}items separated by "${this.separator}" (eg: \`foo${this.separator} bar${this.separator} baz\`)`}},nmt=class extends b3{static lc_name(){return"NumberedListOutputParser"}lc_namespace=["langchain_core","output_parsers","list"];lc_serializable=!0;getFormatInstructions(){return`Your response should be a numbered list with each item on a new line. For example: + +1. foo + +2. bar + +3. baz`}re=/\d+\.\s([^\n]+)/g;async parse(t){return[...t.matchAll(this.re)??[]].map(e=>e[1])}},amt=class extends b3{static lc_name(){return"NumberedListOutputParser"}lc_namespace=["langchain_core","output_parsers","list"];lc_serializable=!0;getFormatInstructions(){return`Your response should be a numbered list with each item on a new line. For example: + +1. foo + +2. bar + +3. baz`}re=/^\s*[-*]\s([^\n]+)$/gm;async parse(t){return[...t.matchAll(this.re)??[]].map(e=>e[1])}}});var rmt,smt=g(()=>{o();UX();rmt=class extends jX{static lc_name(){return"StrOutputParser"}lc_namespace=["langchain_core","output_parsers","string"];lc_serializable=!0;parse(t){return Promise.resolve(t)}getFormatInstructions(){return""}_textContentToString(t){return t.text}_imageUrlContentToString(t){throw new Error('Cannot coerce a multimodal "image_url" message part into a string.')}_messageContentToString(t){switch(t.type){case"text":case"text_delta":if("text"in t)return this._textContentToString(t);break;case"image_url":if("image_url"in t)return this._imageUrlContentToString(t);break;case"reasoning":case"thinking":case"redacted_thinking":return"";default:throw new Error(`Cannot coerce "${t.type}" message part into a string.`)}throw new Error(`Invalid content type: ${t.type}`)}_baseMessageContentToString(t){return t.reduce((e,I)=>e+this._messageContentToString(I),"")}}});var IOI,omt,imt=g(()=>{o();IOI=function(){let t={};t.parser=function(S,j){return new I(S,j)},t.SAXParser=I,t.SAXStream=i,t.createStream=s,t.MAX_BUFFER_LENGTH=65536;let e=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];t.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function I(S,j){if(!(this instanceof I))return new I(S,j);var Ne=this;n(Ne),Ne.q=Ne.c="",Ne.bufferCheckPosition=t.MAX_BUFFER_LENGTH,Ne.opt=j||{},Ne.opt.lowercase=Ne.opt.lowercase||Ne.opt.lowercasetags,Ne.looseCase=Ne.opt.lowercase?"toLowerCase":"toUpperCase",Ne.tags=[],Ne.closed=Ne.closedRoot=Ne.sawRoot=!1,Ne.tag=Ne.error=null,Ne.strict=!!S,Ne.noscript=!!(S||Ne.opt.noscript),Ne.state=w.BEGIN,Ne.strictEntities=Ne.opt.strictEntities,Ne.ENTITIES=Ne.strictEntities?Object.create(t.XML_ENTITIES):Object.create(t.ENTITIES),Ne.attribList=[],Ne.opt.xmlns&&(Ne.ns=Object.create(Z)),Ne.trackPosition=Ne.opt.position!==!1,Ne.trackPosition&&(Ne.position=Ne.line=Ne.column=0),f(Ne,"onready")}Object.create||(Object.create=function(S){function j(){}return j.prototype=S,new j}),Object.keys||(Object.keys=function(S){var j=[];for(var Ne in S)S.hasOwnProperty(Ne)&&j.push(Ne);return j});function l(S){for(var j=Math.max(t.MAX_BUFFER_LENGTH,10),Ne=0,ce=0,St=e.length;cej)switch(e[ce]){case"textNode":k(S);break;case"cdata":L(S,"oncdata",S.cdata),S.cdata="";break;case"script":L(S,"onscript",S.script),S.script="";break;default:T(S,"Max buffer length exceeded: "+e[ce])}Ne=Math.max(Ne,O)}S.bufferCheckPosition=t.MAX_BUFFER_LENGTH-Ne+S.position}function n(S){for(var j=0,Ne=e.length;j"||V(S)}function v(S,j){return S.test(j)}function y(S,j){return!v(S,j)}var w=0;t.STATE={BEGIN:w++,BEGIN_WHITESPACE:w++,TEXT:w++,TEXT_ENTITY:w++,OPEN_WAKA:w++,SGML_DECL:w++,SGML_DECL_QUOTED:w++,DOCTYPE:w++,DOCTYPE_QUOTED:w++,DOCTYPE_DTD:w++,DOCTYPE_DTD_QUOTED:w++,COMMENT_STARTING:w++,COMMENT:w++,COMMENT_ENDING:w++,COMMENT_ENDED:w++,CDATA:w++,CDATA_ENDING:w++,CDATA_ENDING_2:w++,PROC_INST:w++,PROC_INST_BODY:w++,PROC_INST_ENDING:w++,OPEN_TAG:w++,OPEN_TAG_SLASH:w++,ATTRIB:w++,ATTRIB_NAME:w++,ATTRIB_NAME_SAW_WHITE:w++,ATTRIB_VALUE:w++,ATTRIB_VALUE_QUOTED:w++,ATTRIB_VALUE_CLOSED:w++,ATTRIB_VALUE_UNQUOTED:w++,ATTRIB_VALUE_ENTITY_Q:w++,ATTRIB_VALUE_ENTITY_U:w++,CLOSE_TAG:w++,CLOSE_TAG_SAW_WHITE:w++,SCRIPT:w++,SCRIPT_ENDING:w++},t.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},t.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(t.ENTITIES).forEach(function(S){var j=t.ENTITIES[S],Ne=typeof j=="number"?String.fromCharCode(j):j;t.ENTITIES[S]=Ne});for(var H in t.STATE)t.STATE[t.STATE[H]]=H;w=t.STATE;function f(S,j,Ne){S[j]&&S[j](Ne)}function L(S,j,Ne){S.textNode&&k(S),f(S,j,Ne)}function k(S){S.textNode=U(S.opt,S.textNode),S.textNode&&f(S,"ontext",S.textNode),S.textNode=""}function U(S,j){return S.trim&&(j=j.trim()),S.normalize&&(j=j.replace(/\s+/g," ")),j}function T(S,j){return k(S),S.trackPosition&&(j+=` +Line: `+S.line+` +Column: `+S.column+` +Char: `+S.c),j=new Error(j),S.error=j,f(S,"onerror",j),S}function q(S){return S.sawRoot&&!S.closedRoot&&_(S,"Unclosed root tag"),S.state!==w.BEGIN&&S.state!==w.BEGIN_WHITESPACE&&S.state!==w.TEXT&&T(S,"Unexpected end"),k(S),S.c="",S.closed=!0,f(S,"onend"),I.call(S,S.strict,S.opt),S}function _(S,j){if(typeof S!="object"||!(S instanceof I))throw new Error("bad call to strictFail");S.strict&&T(S,j)}function $(S){S.strict||(S.tagName=S.tagName[S.looseCase]());var j=S.tags[S.tags.length-1]||S,Ne=S.tag={name:S.tagName,attributes:{}};S.opt.xmlns&&(Ne.ns=j.ns),S.attribList.length=0,L(S,"onopentagstart",Ne)}function ee(S,j){var Ne=S.indexOf(":")<0?["",S]:S.split(":"),ce=Ne[0],St=Ne[1];return j&&S==="xmlns"&&(ce="xmlns",St=""),{prefix:ce,local:St}}function se(S){if(S.strict||(S.attribName=S.attribName[S.looseCase]()),S.attribList.indexOf(S.attribName)!==-1||S.tag.attributes.hasOwnProperty(S.attribName)){S.attribName=S.attribValue="";return}if(S.opt.xmlns){var j=ee(S.attribName,!0),Ne=j.prefix,ce=j.local;if(Ne==="xmlns")if(ce==="xml"&&S.attribValue!==u)_(S,"xml: prefix must be bound to "+u+` +Actual: `+S.attribValue);else if(ce==="xmlns"&&S.attribValue!==b)_(S,"xmlns: prefix must be bound to "+b+` +Actual: `+S.attribValue);else{var St=S.tag,O=S.tags[S.tags.length-1]||S;St.ns===O.ns&&(St.ns=Object.create(O.ns)),St.ns[ce]=S.attribValue}S.attribList.push([S.attribName,S.attribValue])}else S.tag.attributes[S.attribName]=S.attribValue,L(S,"onattribute",{name:S.attribName,value:S.attribValue});S.attribName=S.attribValue=""}function Ae(S,j){if(S.opt.xmlns){var Ne=S.tag,ce=ee(S.tagName);Ne.prefix=ce.prefix,Ne.local=ce.local,Ne.uri=Ne.ns[ce.prefix]||"",Ne.prefix&&!Ne.uri&&(_(S,"Unbound namespace prefix: "+JSON.stringify(S.tagName)),Ne.uri=ce.prefix);var St=S.tags[S.tags.length-1]||S;Ne.ns&&St.ns!==Ne.ns&&Object.keys(Ne.ns).forEach(function(Pl){L(S,"onopennamespace",{prefix:Pl,uri:Ne.ns[Pl]})});for(var O=0,C=S.attribList.length;O",S.tagName="",S.state=w.SCRIPT;return}L(S,"onscript",S.script),S.script=""}var j=S.tags.length,Ne=S.tagName;S.strict||(Ne=Ne[S.looseCase]());for(var ce=Ne;j--&&S.tags[j].name!==ce;)_(S,"Unexpected close tag");if(j<0){_(S,"Unmatched closing tag: "+S.tagName),S.textNode+="",S.state=w.TEXT;return}S.tagName=Ne;for(var St=S.tags.length;St-- >j;){var O=S.tag=S.tags.pop();S.tagName=S.tag.name,L(S,"onclosetag",S.tagName);var C={};for(var re in O.ns)C[re]=O.ns[re];var Ie=S.tags[S.tags.length-1]||S;S.opt.xmlns&&O.ns!==Ie.ns&&Object.keys(O.ns).forEach(function(rt){var Ft=O.ns[rt];L(S,"onclosenamespace",{prefix:rt,uri:Ft})})}j===0&&(S.closedRoot=!0),S.tagName=S.attribValue=S.attribName="",S.attribList.length=0,S.state=w.TEXT}function ct(S){var j=S.entity,Ne=j.toLowerCase(),ce,St="";return S.ENTITIES[j]?S.ENTITIES[j]:S.ENTITIES[Ne]?S.ENTITIES[Ne]:(j=Ne,j.charAt(0)==="#"&&(j.charAt(1)==="x"?(j=j.slice(2),ce=parseInt(j,16),St=ce.toString(16)):(j=j.slice(1),ce=parseInt(j,10),St=ce.toString(10))),j=j.replace(/^0+/,""),isNaN(ce)||St.toLowerCase()!==j?(_(S,"Invalid character entity"),"&"+S.entity+";"):String.fromCodePoint(ce))}function Xe(S,j){j==="<"?(S.state=w.OPEN_WAKA,S.startTagPosition=S.position):V(j)||(_(S,"Non-whitespace before first tag."),S.textNode=j,S.state=w.TEXT)}function _t(S,j){var Ne="";return j"?(L(j,"onsgmldeclaration",j.sgmlDecl),j.sgmlDecl="",j.state=w.TEXT):(R(ce)&&(j.state=w.SGML_DECL_QUOTED),j.sgmlDecl+=ce);continue;case w.SGML_DECL_QUOTED:ce===j.q&&(j.state=w.SGML_DECL,j.q=""),j.sgmlDecl+=ce;continue;case w.DOCTYPE:ce===">"?(j.state=w.TEXT,L(j,"ondoctype",j.doctype),j.doctype=!0):(j.doctype+=ce,ce==="["?j.state=w.DOCTYPE_DTD:R(ce)&&(j.state=w.DOCTYPE_QUOTED,j.q=ce));continue;case w.DOCTYPE_QUOTED:j.doctype+=ce,ce===j.q&&(j.q="",j.state=w.DOCTYPE);continue;case w.DOCTYPE_DTD:j.doctype+=ce,ce==="]"?j.state=w.DOCTYPE:R(ce)&&(j.state=w.DOCTYPE_DTD_QUOTED,j.q=ce);continue;case w.DOCTYPE_DTD_QUOTED:j.doctype+=ce,ce===j.q&&(j.state=w.DOCTYPE_DTD,j.q="");continue;case w.COMMENT:ce==="-"?j.state=w.COMMENT_ENDING:j.comment+=ce;continue;case w.COMMENT_ENDING:ce==="-"?(j.state=w.COMMENT_ENDED,j.comment=U(j.opt,j.comment),j.comment&&L(j,"oncomment",j.comment),j.comment=""):(j.comment+="-"+ce,j.state=w.COMMENT);continue;case w.COMMENT_ENDED:ce!==">"?(_(j,"Malformed comment"),j.comment+="--"+ce,j.state=w.COMMENT):j.state=w.TEXT;continue;case w.CDATA:ce==="]"?j.state=w.CDATA_ENDING:j.cdata+=ce;continue;case w.CDATA_ENDING:ce==="]"?j.state=w.CDATA_ENDING_2:(j.cdata+="]"+ce,j.state=w.CDATA);continue;case w.CDATA_ENDING_2:ce===">"?(j.cdata&&L(j,"oncdata",j.cdata),L(j,"onclosecdata"),j.cdata="",j.state=w.TEXT):ce==="]"?j.cdata+="]":(j.cdata+="]]"+ce,j.state=w.CDATA);continue;case w.PROC_INST:ce==="?"?j.state=w.PROC_INST_ENDING:V(ce)?j.state=w.PROC_INST_BODY:j.procInstName+=ce;continue;case w.PROC_INST_BODY:if(!j.procInstBody&&V(ce))continue;ce==="?"?j.state=w.PROC_INST_ENDING:j.procInstBody+=ce;continue;case w.PROC_INST_ENDING:ce===">"?(L(j,"onprocessinginstruction",{name:j.procInstName,body:j.procInstBody}),j.procInstName=j.procInstBody="",j.state=w.TEXT):(j.procInstBody+="?"+ce,j.state=w.PROC_INST_BODY);continue;case w.OPEN_TAG:v(W,ce)?j.tagName+=ce:($(j),ce===">"?Ae(j):ce==="/"?j.state=w.OPEN_TAG_SLASH:(V(ce)||_(j,"Invalid character in tag name"),j.state=w.ATTRIB));continue;case w.OPEN_TAG_SLASH:ce===">"?(Ae(j,!0),Ve(j)):(_(j,"Forward-slash in opening tag not followed by >"),j.state=w.ATTRIB);continue;case w.ATTRIB:if(V(ce))continue;ce===">"?Ae(j):ce==="/"?j.state=w.OPEN_TAG_SLASH:v(p,ce)?(j.attribName=ce,j.attribValue="",j.state=w.ATTRIB_NAME):_(j,"Invalid attribute name");continue;case w.ATTRIB_NAME:ce==="="?j.state=w.ATTRIB_VALUE:ce===">"?(_(j,"Attribute without value"),j.attribValue=j.attribName,se(j),Ae(j)):V(ce)?j.state=w.ATTRIB_NAME_SAW_WHITE:v(W,ce)?j.attribName+=ce:_(j,"Invalid attribute name");continue;case w.ATTRIB_NAME_SAW_WHITE:if(ce==="=")j.state=w.ATTRIB_VALUE;else{if(V(ce))continue;_(j,"Attribute without value"),j.tag.attributes[j.attribName]="",j.attribValue="",L(j,"onattribute",{name:j.attribName,value:""}),j.attribName="",ce===">"?Ae(j):v(p,ce)?(j.attribName=ce,j.state=w.ATTRIB_NAME):(_(j,"Invalid attribute name"),j.state=w.ATTRIB)}continue;case w.ATTRIB_VALUE:if(V(ce))continue;R(ce)?(j.q=ce,j.state=w.ATTRIB_VALUE_QUOTED):(_(j,"Unquoted attribute value"),j.state=w.ATTRIB_VALUE_UNQUOTED,j.attribValue=ce);continue;case w.ATTRIB_VALUE_QUOTED:if(ce!==j.q){ce==="&"?j.state=w.ATTRIB_VALUE_ENTITY_Q:j.attribValue+=ce;continue}se(j),j.q="",j.state=w.ATTRIB_VALUE_CLOSED;continue;case w.ATTRIB_VALUE_CLOSED:V(ce)?j.state=w.ATTRIB:ce===">"?Ae(j):ce==="/"?j.state=w.OPEN_TAG_SLASH:v(p,ce)?(_(j,"No whitespace between attributes"),j.attribName=ce,j.attribValue="",j.state=w.ATTRIB_NAME):_(j,"Invalid attribute name");continue;case w.ATTRIB_VALUE_UNQUOTED:if(!F(ce)){ce==="&"?j.state=w.ATTRIB_VALUE_ENTITY_U:j.attribValue+=ce;continue}se(j),ce===">"?Ae(j):j.state=w.ATTRIB;continue;case w.CLOSE_TAG:if(j.tagName)ce===">"?Ve(j):v(W,ce)?j.tagName+=ce:j.script?(j.script+=""?Ve(j):_(j,"Invalid characters in closing tag");continue;case w.TEXT_ENTITY:case w.ATTRIB_VALUE_ENTITY_Q:case w.ATTRIB_VALUE_ENTITY_U:var C,re;switch(j.state){case w.TEXT_ENTITY:C=w.TEXT,re="textNode";break;case w.ATTRIB_VALUE_ENTITY_Q:C=w.ATTRIB_VALUE_QUOTED,re="attribValue";break;case w.ATTRIB_VALUE_ENTITY_U:C=w.ATTRIB_VALUE_UNQUOTED,re="attribValue";break}if(ce===";")if(j.opt.unparsedEntities){var Ie=ct(j);j.entity="",j.state=C,j.write(Ie)}else j[re]+=ct(j),j.entity="",j.state=C;else v(j.entity.length?N:h,ce)?j.entity+=ce:(_(j,"Invalid character in entity name"),j[re]+="&"+j.entity+ce,j.entity="",j.state=C);continue;default:throw new Error(j,"Unknown state: "+j.state)}return j.position>=j.bufferCheckPosition&&l(j),j}return String.fromCodePoint||function(){var S=String.fromCharCode,j=Math.floor,Ne=function(){var ce=16384,St=[],O,C,re=-1,Ie=arguments.length;if(!Ie)return"";for(var rt="";++re1114111||j(Ft)!==Ft)throw RangeError("Invalid code point: "+Ft);Ft<=65535?St.push(Ft):(Ft-=65536,O=(Ft>>10)+55296,C=Ft%1024+56320,St.push(O,C)),(re+1===Ie||St.length>ce)&&(rt+=S.apply(null,St),St.length=0)}return rt};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:Ne,configurable:!0,writable:!0}):String.fromCodePoint=Ne}(),t},omt=IOI()});function bre(t){let e=lOI(t),I=omt.parser(!0),l={},n=[];I.onopentag=r=>{let s={name:r.name,attributes:r.attributes,children:[],text:"",isSelfClosing:r.isSelfClosing};n.length>0?n[n.length-1].children.push(s):l=s,r.isSelfClosing||n.push(s)},I.onclosetag=()=>{if(n.length>0){let r=n.pop();n.length===0&&r&&(l=r)}},I.ontext=r=>{if(n.length>0){let s=n[n.length-1];s.text+=r}},I.onattribute=r=>{if(n.length>0){let s=n[n.length-1];s.attributes[r.name]=r.value}};let a=/```(xml)?(.*)```/s.exec(e),c=a?a[2]:e;return I.write(c).close(),l&&l.name==="?xml"&&(l=l.children[0]),dmt(l)}var ure,Gmt,lOI,dmt,umt=g(()=>{o();Xx();UX();B_();imt();ure=`The output should be formatted as a XML file. +1. Output should conform to the tags below. +2. If tags are not given, make them on your own. +3. Remember to always open and close all the tags. + +As an example, for the tags ["foo", "bar", "baz"]: +1. String " + + + +" is a well-formatted instance of the schema. +2. String " + + " is a badly-formatted instance. +3. String " + + +" is a badly-formatted instance. + +Here are the output tags: +\`\`\` +{tags} +\`\`\``,Gmt=class extends lF{tags;constructor(t){super(t),this.tags=t?.tags}static lc_name(){return"XMLOutputParser"}lc_namespace=["langchain_core","output_parsers"];lc_serializable=!0;_diff(t,e){if(e)return t?EH(t,e):[{op:"replace",path:"",value:e}]}async parsePartialResult(t){return bre(t[0].text)}async parse(t){return bre(t)}getFormatInstructions(){return this.tags&&this.tags.length>0?ure.replace("{tags}",this.tags?.join(", ")??""):ure}},lOI=t=>t.split(` +`).map(e=>e.replace(/^\s+/,"")).join(` +`).trim(),dmt=t=>{if(Object.keys(t).length===0)return{};let e={};return t.children.length>0?(e[t.name]=t.children.map(dmt),e):(e[t.name]=t.text??void 0,e)}});var bmt,m3=g(()=>{o();Ct();sJ();xX();UX();tmt();cmt();smt();u3();uEe();mEe();umt();bmt=ve({AsymmetricStructuredOutputParser:()=>$bt,BaseCumulativeTransformOutputParser:()=>lF,BaseLLMOutputParser:()=>IF,BaseOutputParser:()=>t0,BaseTransformOutputParser:()=>jX,BytesOutputParser:()=>emt,CommaSeparatedListOutputParser:()=>Imt,CustomListOutputParser:()=>lmt,JsonMarkdownStructuredOutputParser:()=>bEe,JsonOutputParser:()=>d3,ListOutputParser:()=>b3,MarkdownListOutputParser:()=>amt,NumberedListOutputParser:()=>nmt,OutputParserException:()=>or,StandardSchemaOutputParser:()=>dre,StringOutputParser:()=>rmt,StructuredOutputParser:()=>M_,XMLOutputParser:()=>Gmt,XML_FORMAT_INSTRUCTIONS:()=>ure,parseJsonMarkdown:()=>rJ,parsePartialJson:()=>fA,parseXMLMarkdown:()=>bre})});function OX(t,e){if(t.function===void 0)return;let I;if(e?.partial)try{I=fA(t.function.arguments??"{}")}catch{return}else try{I=JSON.parse(t.function.arguments)}catch(n){throw new or([`Function "${t.function.name}" arguments:`,"",t.function.arguments,"","are not valid JSON.",`Error: ${n.message}`].join(` +`))}let l={name:t.function.name,args:I,type:"tool_call"};return e?.returnId&&(l.id=t.id),l}function Z3(t){if(t.id===void 0)throw new Error('All OpenAI tool calls must have an "id" field.');return{id:t.id,type:"function",function:{name:t.name,arguments:JSON.stringify(t.args)}}}function nF(t,e){return{name:t.function?.name,args:t.function?.arguments,id:t.id,error:e,type:"invalid_tool_call"}}var ZEe,mre,pEe=g(()=>{o();sJ();tG();MA();xX();UX();u3();ZEe=class extends lF{static lc_name(){return"JsonOutputToolsParser"}returnId=!1;lc_namespace=["langchain","output_parsers","openai_tools"];lc_serializable=!0;constructor(t){super(t),this.returnId=t?.returnId??this.returnId}_diff(){throw new Error("Not supported.")}async parse(){throw new Error("Not implemented.")}async parseResult(t){return await this.parsePartialResult(t,!1)}async parsePartialResult(t,e=!0){let I=t[0].message,l;if(jR(I)&&I.tool_calls?.length?l=I.tool_calls.map(a=>{let{id:c,...r}=a;return this.returnId?{id:c,...r}:r}):I.additional_kwargs.tool_calls!==void 0&&(l=JSON.parse(JSON.stringify(I.additional_kwargs.tool_calls)).map(a=>OX(a,{returnId:this.returnId,partial:e}))),!l)return[];let n=[];for(let a of l)if(a!==void 0){let c={type:a.name,args:a.args,id:a.id};n.push(c)}return n}},mre=class extends ZEe{static lc_name(){return"JsonOutputKeyToolsParser"}lc_namespace=["langchain","output_parsers","openai_tools"];lc_serializable=!0;returnId=!1;keyName;returnSingle=!1;zodSchema;serializableSchema;constructor(t){super(t),this.keyName=t.keyName,this.returnSingle=t.returnSingle??this.returnSingle,"zodSchema"in t&&(this.zodSchema=t.zodSchema),"serializableSchema"in t&&(this.serializableSchema=t.serializableSchema)}async _validateResult(t){if(this.serializableSchema!==void 0){let I=await this.serializableSchema["~standard"].validate(t);if(I.issues)throw new or(`Failed to parse. Text: "${JSON.stringify(t,null,2)}". Error: ${JSON.stringify(I.issues)}`,JSON.stringify(t,null,2));return I.value}if(this.zodSchema===void 0)return t;let e=await BA(this.zodSchema,t);if(e.success)return e.data;throw new or(`Failed to parse. Text: "${JSON.stringify(t,null,2)}". Error: ${JSON.stringify(e.error?.issues)}`,JSON.stringify(t,null,2))}async parsePartialResult(t){let e=(await super.parsePartialResult(t)).filter(l=>l.type===this.keyName),I=e;if(e.length)return this.returnId||(I=e.map(l=>l.args)),this.returnSingle?I[0]:I}async parseResult(t){let e=(await super.parsePartialResult(t,!1)).filter(l=>l.type===this.keyName),I=e;if(e.length)return this.returnId||(I=e.map(l=>l.args)),this.returnSingle?this._validateResult(I[0]):await Promise.all(I.map(l=>this._validateResult(l)))}}});var mmt,Wa=g(()=>{o();Ct();MA();mmt=ve({extendInteropZodObject:()=>Qae,getInteropZodDefaultGetter:()=>BH,getInteropZodObjectShape:()=>MR,getSchemaDescription:()=>lZ,interopParse:()=>Tu,interopParseAsync:()=>OH,interopSafeParse:()=>Hae,interopSafeParseAsync:()=>BA,interopZodObjectMakeFieldsOptional:()=>Eae,interopZodObjectPartial:()=>zH,interopZodObjectPassthrough:()=>wae,interopZodObjectStrict:()=>Cx,interopZodTransformInputSchema:()=>fae,isInteropZodError:()=>Jae,isInteropZodLiteral:()=>Lit,isInteropZodObject:()=>Rc,isInteropZodSchema:()=>Vl,isShapelessZodSchema:()=>kit,isSimpleStringZodSchema:()=>Lx,isZodArrayV4:()=>n_,isZodLiteralV3:()=>DHe,isZodLiteralV4:()=>qHe,isZodNullableV4:()=>$He,isZodObjectV3:()=>l_,isZodObjectV4:()=>Fp,isZodOptionalV4:()=>PHe,isZodSchema:()=>Cit,isZodSchemaV3:()=>Yc,isZodSchemaV4:()=>mn})});function Ep(t){return Vl(t)?M_.fromZodSchema(t):jn(t)?dre.fromSerializableSchema(t):new d3}function I0(t,e,I){let l=I??mre;return Vl(t)?new l({returnSingle:!0,keyName:e,zodSchema:t}):jn(t)?new l({returnSingle:!0,keyName:e,serializableSchema:t}):new l({returnSingle:!0,keyName:e})}function oZ(t,e,I,l){if(!I){let s=t.pipe(e);return l?s.withConfig({runName:l}):s}let n=e0.assign({parsed:(s,i)=>e.invoke(s.raw,i)}),a=e0.assign({parsed:()=>null}),c=n.withFallbacks({fallbacks:[a]}),r=$r.from([{raw:t},c]);return l?r.withConfig({runName:l}):r}var Zmt,tQ=g(()=>{o();Ct();MA();wp();es();sre();Xc();u3();uEe();mEe();m3();pEe();Wa();Zmt=ve({assembleStructuredOutputPipeline:()=>oZ,createContentParser:()=>Ep,createFunctionCallingParser:()=>I0})});function hEe(t){let e=[];for(let I of t){let l=I;if(Array.isArray(I.content))for(let n=0;n{o();Ct();hX();TS();Wo();tG();xR();ca();yH();RX();Lb();Yo();MA();wp();aG();es();NI();sZ();Tbt();tQ();pmt=ve({BaseChatModel:()=>yr,SimpleChatModel:()=>nOI});yr=class dC extends GC{lc_namespace=["langchain","chat_models",this._llmType()];disableStreaming=!1;outputVersion;get callKeys(){return[...super.callKeys,"outputVersion"]}constructor(e){super(e),this.outputVersion=Sbt(()=>{let I=e.outputVersion??gt("LC_OUTPUT_VERSION");return I&&["v0","v1"].includes(I)?I:"v0"})}_separateRunnableConfigFromCallOptionsCompat(e){let[I,l]=super._separateRunnableConfigFromCallOptions(e);return l.signal=I.signal,[I,l]}async invoke(e,I){let l=dC._convertInputToPromptValue(e);return(await this.generatePrompt([l],I,I?.callbacks)).generations[0][0].message}async*_streamResponseChunks(e,I,l){throw new Error("Not implemented.")}async*_streamIterator(e,I){if(this._streamResponseChunks===dC.prototype._streamResponseChunks||this.disableStreaming)yield this.invoke(e,I);else{let l=dC._convertInputToPromptValue(e).toChatMessages(),[n,a]=this._separateRunnableConfigFromCallOptionsCompat(I),c={...n.metadata,...this.getLsParamsWithDefaults(a)},r=this.invocationParams(a),s=await lr.configure(n.callbacks,this.callbacks,n.tags,this.tags,c,this.metadata,{verbose:this.verbose,tracerInheritableMetadata:this._filterInvocationParamsForTracing(r)}),i={options:a,invocation_params:r,batch_size:1},G=a.outputVersion??this.outputVersion,d=await s?.handleChatModelStart(this.toJSON(),[hEe(l)],n.runId,void 0,i,void 0,void 0,n.runName),u,b;try{for await(let Z of this._streamResponseChunks(l,a,d?.[0])){if(a.signal?.throwIfAborted(),Z.message.id==null){let p=d?.at(0)?.runId;p!=null&&Z.message._updateId(`run-${p}`)}Z.message.response_metadata={...Z.generationInfo,...Z.message.response_metadata},G==="v1"?yield rre(Z.message):yield Z.message,u?u=u.concat(Z):u=Z,$S(Z.message)&&Z.message.usage_metadata!==void 0&&(b={tokenUsage:{promptTokens:Z.message.usage_metadata.input_tokens,completionTokens:Z.message.usage_metadata.output_tokens,totalTokens:Z.message.usage_metadata.total_tokens}})}a.signal?.throwIfAborted()}catch(Z){throw await Promise.all((d??[]).map(p=>p?.handleLLMError(Z))),Z}await Promise.all((d??[]).map(Z=>Z?.handleLLMEnd({generations:[[u]],llmOutput:b})))}}getLsParams(e){let I=this.getName().startsWith("Chat")?this.getName().replace("Chat",""):this.getName();return{ls_model_type:"chat",ls_stop:e.stop,ls_provider:I}}getLsParamsWithDefaults(e){return{...this.getLsParams(e),ls_integration:"langchain_chat_model"}}async _generateUncached(e,I,l,n){let a=e.map(d=>d.map(Zi)),c;if(n!==void 0&&n.length===a.length)c=n;else{let d={...l.metadata,...this.getLsParamsWithDefaults(I)},u=this.invocationParams(I),b=await lr.configure(l.callbacks,this.callbacks,l.tags,this.tags,d,this.metadata,{verbose:this.verbose,tracerInheritableMetadata:this._filterInvocationParamsForTracing(u)}),Z={options:I,invocation_params:u,batch_size:1};c=await b?.handleChatModelStart(this.toJSON(),a.map(hEe),l.runId,void 0,Z,void 0,void 0,l.runName)}let r=I.outputVersion??this.outputVersion,s=[],i=[];if(c?.[0].handlers.find(nT)&&!this.disableStreaming&&a.length===1&&this._streamResponseChunks!==dC.prototype._streamResponseChunks)try{let d=await this._streamResponseChunks(a[0],I,c?.[0]),u,b;for await(let Z of d){if(I.signal?.aborted){let p=u?.message;throw new Jle("Model invocation was aborted.",p)}if(Z.message.id==null){let p=c?.at(0)?.runId;p!=null&&Z.message._updateId(`run-${p}`)}u===void 0?u=Z:u=Su(u,Z),$S(Z.message)&&Z.message.usage_metadata!==void 0&&(b={tokenUsage:{promptTokens:Z.message.usage_metadata.input_tokens,completionTokens:Z.message.usage_metadata.output_tokens,totalTokens:Z.message.usage_metadata.total_tokens}})}if(I.signal?.aborted){let Z=u?.message;throw new Jle("Model invocation was aborted.",Z)}if(u===void 0)throw new Error("Received empty response from chat model call.");s.push([u]),await c?.[0].handleLLMEnd({generations:s,llmOutput:b})}catch(d){throw await c?.[0].handleLLMError(d),d}else{let d=await Promise.allSettled(a.map(async(u,b)=>{let Z=await this._generate(u,{...I,promptIndex:b},c?.[b]);if(r==="v1")for(let p of Z.generations)p.message=rre(p.message);return Z}));await Promise.all(d.map(async(u,b)=>{if(u.status==="fulfilled"){let Z=u.value;for(let p of Z.generations){if(p.message.id==null){let W=c?.at(0)?.runId;W!=null&&p.message._updateId(`run-${W}`)}p.message.response_metadata={...p.generationInfo,...p.message.response_metadata}}return Z.generations.length===1&&(Z.generations[0].message.response_metadata={...Z.llmOutput,...Z.generations[0].message.response_metadata}),s[b]=Z.generations,i[b]=Z.llmOutput,c?.[b]?.handleLLMEnd({generations:[Z.generations],llmOutput:Z.llmOutput})}else return await c?.[b]?.handleLLMError(u.reason),Promise.reject(u.reason)}))}let G={generations:s,llmOutput:i.length?this._combineLLMOutput?.(...i):void 0};return Object.defineProperty(G,NJ,{value:c?{runIds:c?.map(d=>d.runId)}:void 0,configurable:!0}),G}async _generateCached({messages:e,cache:I,llmStringKey:l,parsedOptions:n,handledOptions:a}){let c=e.map(h=>h.map(Zi)),r={...a.metadata,...this.getLsParamsWithDefaults(n)},s=this.invocationParams(n),i=await lr.configure(a.callbacks,this.callbacks,a.tags,this.tags,r,this.metadata,{verbose:this.verbose,tracerInheritableMetadata:this._filterInvocationParamsForTracing(s)}),G={options:n,invocation_params:s,batch_size:1},d=await i?.handleChatModelStart(this.toJSON(),c.map(hEe),a.runId,void 0,G,void 0,void 0,a.runName),u=[],b=(await Promise.allSettled(c.map(async(h,N)=>{let V=dC._convertInputToPromptValue(h).toString(),R=await I.lookup(V,l);return R==null&&u.push(N),R}))).map((h,N)=>({result:h,runManager:d?.[N]})).filter(({result:h})=>h.status==="fulfilled"&&h.value!=null||h.status==="rejected"),Z=n.outputVersion??this.outputVersion,p=[];await Promise.all(b.map(async({result:h,runManager:N},V)=>{if(h.status==="fulfilled"){let R=h.value;return p[V]=R.map(F=>("message"in F&&ma(F.message)&&jR(F.message)&&(F.message.usage_metadata={input_tokens:0,output_tokens:0,total_tokens:0},Z==="v1"&&(F.message=rre(F.message))),F.generationInfo={...F.generationInfo,tokenUsage:{}},F)),R.length&&await N?.handleLLMNewToken(R[0].text),N?.handleLLMEnd({generations:[R]},void 0,void 0,void 0,{cached:!0})}else return await N?.handleLLMError(h.reason,void 0,void 0,void 0,{cached:!0}),Promise.reject(h.reason)}));let W={generations:p,missingPromptIndices:u,startedRunManagers:d};return Object.defineProperty(W,NJ,{value:d?{runIds:d?.map(h=>h.runId)}:void 0,configurable:!0}),W}async generate(e,I,l){let n;Array.isArray(I)?n={stop:I}:n=I;let a=e.map(Z=>Z.map(Zi)),[c,r]=this._separateRunnableConfigFromCallOptionsCompat(n);if(c.callbacks=c.callbacks??l,!this.cache)return this._generateUncached(a,r,c);let{cache:s}=this,i=this._getSerializedCacheKeyParametersForCall(r),{generations:G,missingPromptIndices:d,startedRunManagers:u}=await this._generateCached({messages:a,cache:s,llmStringKey:i,parsedOptions:r,handledOptions:c}),b={};if(d.length>0){let Z=await this._generateUncached(d.map(p=>a[p]),r,c,u!==void 0?d.map(p=>u?.[p]):void 0);await Promise.all(Z.generations.map(async(p,W)=>{let h=d[W];G[h]=p;let N=dC._convertInputToPromptValue(a[h]).toString();return s.update(N,i,p)})),b=Z.llmOutput??{}}return{generations:G,llmOutput:b}}invocationParams(e){return{}}_modelType(){return"base_chat_model"}async generatePrompt(e,I,l){let n=e.map(a=>a.toChatMessages());return this.generate(n,I,l)}withStructuredOutput(e,I){if(typeof this.bindTools!="function")throw new Error('Chat model must implement ".bindTools()" to use withStructuredOutput.');if(I?.strict)throw new Error('"strict" mode is not supported for this model by default.');let l=e,n=I?.name,a=lZ(l)??"A function available to call.",c=I?.method,r=I?.includeRaw;if(c==="jsonMode")throw new Error('Base withStructuredOutput implementation only supports "functionCalling" as a method.');let s=n??"extract";!Vl(l)&&!jn(l)&&"name"in l&&(s=l.name);let i=Vl(l)||jn(l)?DI(l):l,G=[{type:"function",function:{name:s,description:a,parameters:i}}];return oZ(this.bindTools(G),sr.from(d=>{if(!eI.isInstance(d))throw new Error("Input is not an AIMessageChunk.");if(!d.tool_calls||d.tool_calls.length===0)throw new Error("No tool calls found in the response.");let u=d.tool_calls.find(b=>b.name===s);if(!u)throw new Error(`No tool call found with name ${s}.`);return u.args}),r,r?"StructuredOutputRunnable":"StructuredOutput")}},nOI=class extends yr{async _generate(t,e,I){let l=new He(await this._call(t,e,I));if(typeof l.content!="string")throw new Error("Cannot generate with a simple chat model when output is not a string.");return{generations:[{text:l.content,message:l}]}}}});async function Nmt(t,e){let I;if(e)I=S_[e];else{let l=Object.entries(S_).find(([,n])=>n.className===t);I=l?l[1]:void 0}if(I)try{return(await import(I.package))[I.className]}catch(l){let n=l;if("code"in n&&n.code?.toString().includes("ERR_MODULE_NOT_FOUND")&&"message"in n&&typeof n.message=="string"){let a=(n.message.startsWith("Error: ")?n.message.slice(7):n.message).split("Cannot find package '")[1].split("'")[0];throw new Error(`Unable to import ${a}. Please install with \`npm install ${a}\` or \`pnpm install ${a}\``)}throw l}}async function aOI(t,e,I={}){let l=e||Vmt(t);if(!l)throw new Error(`Unable to infer model provider for { model: ${t} }, please specify modelProvider directly.`);let n=S_[l];if(!n){let r=Wmt.join(", ");throw new Error(`Unsupported { modelProvider: ${l} }. + +Supported model providers are: ${r}`)}let{modelProvider:a,...c}=I;return new(await Nmt(n.className,l))({model:t,...c})}function Vmt(t){return t.startsWith("gpt-3")||t.startsWith("gpt-4")||t.startsWith("gpt-5")||t.startsWith("o1")||t.startsWith("o3")||t.startsWith("o4")?"openai":t.startsWith("claude")?"anthropic":t.startsWith("command")?"cohere":t.startsWith("accounts/fireworks")?"fireworks":t.startsWith("gemini")?"google-vertexai":t.startsWith("amazon.")?"bedrock":t.startsWith("mistral")?"mistralai":t.startsWith("sonar")||t.startsWith("pplx")?"perplexity":void 0}async function Fo(t,e){let{configurableFields:I,configPrefix:l,modelProvider:n,profile:a,...c}={configPrefix:"",...e??{}};if(n===void 0&&t?.includes(":")){let[G,...d]=t.split(":"),u=d.length===0?[G]:[G,d.join(":")];Wmt.includes(u[0])&&([n,t]=u)}let r=Array.isArray(I)?[...I]:I;!t&&r===void 0&&(r=["model","modelProvider"]),l&&r===void 0&&console.warn(`{ configPrefix: ${l} } has been set but no fields are configurable. Set { configurableFields: [...] } to specify the model params that are configurable.`);let s={...c},i;return r===void 0?i=new WEe({defaultConfig:{...s,model:t,modelProvider:n},configPrefix:l,profile:a}):(t&&(s.model=t),n&&(s.modelProvider=n),i=new WEe({defaultConfig:s,configPrefix:l,configurableFields:r,profile:a})),await i._getModelInstance(),i}var hmt,S_,Wmt,WEe,aF=g(()=>{o();tF();l0();Xc();Lb();hmt=Ro({ConfigurableModel:()=>WEe,MODEL_PROVIDER_CONFIG:()=>S_,_inferModelProvider:()=>Vmt,getChatModelByClassName:()=>Nmt,initChatModel:()=>Fo}),S_={openai:{package:"@langchain/openai",className:"ChatOpenAI"},anthropic:{package:"@langchain/anthropic",className:"ChatAnthropic"},azure_openai:{package:"@langchain/openai",className:"AzureChatOpenAI"},cohere:{package:"@langchain/cohere",className:"ChatCohere"},google:{package:"@langchain/google",className:"ChatGoogle"},"google-vertexai":{package:"@langchain/google-vertexai",className:"ChatVertexAI"},"google-vertexai-web":{package:"@langchain/google-vertexai-web",className:"ChatVertexAI"},"google-genai":{package:"@langchain/google-genai",className:"ChatGoogleGenerativeAI"},ollama:{package:"@langchain/ollama",className:"ChatOllama"},mistralai:{package:"@langchain/mistralai",className:"ChatMistralAI"},mistral:{package:"@langchain/mistralai",className:"ChatMistralAI"},groq:{package:"@langchain/groq",className:"ChatGroq"},bedrock:{package:"@langchain/aws",className:"ChatBedrockConverse"},aws:{package:"@langchain/aws",className:"ChatBedrockConverse"},deepseek:{package:"@langchain/deepseek",className:"ChatDeepSeek"},xai:{package:"@langchain/xai",className:"ChatXAI"},cerebras:{package:"@langchain/cerebras",className:"ChatCerebras"},fireworks:{package:"@langchain/fireworks",className:"ChatFireworks"},together:{package:"@langchain/together-ai",className:"ChatTogetherAI",hasCircularDependency:!0},perplexity:{package:"@langchain/perplexity",className:"ChatPerplexity"}},Wmt=Object.keys(S_);WEe=class Zre extends yr{_llmType(){return"chat_model"}lc_namespace=["langchain","chat_models"];_defaultConfig={};_configurableFields="any";_configPrefix;_queuedMethodOperations={};_modelInstanceCache=new Map;_profile;constructor(e){super(e),this._defaultConfig=e.defaultConfig??{},e.configurableFields==="any"?this._configurableFields="any":this._configurableFields=e.configurableFields??["model","modelProvider"],e.configPrefix?this._configPrefix=e.configPrefix.endsWith("_")?e.configPrefix:`${e.configPrefix}_`:this._configPrefix="",this._queuedMethodOperations=e.queuedMethodOperations??this._queuedMethodOperations,this._profile=e.profile??void 0,this.metadata={...this.metadata,ls_integration:"langchain_init_chat_model"}}async _getModelInstance(e){let I=this._getCacheKey(e),l=this._modelInstanceCache.get(I);if(l)return l;let n={...this._defaultConfig,...this._modelParams(e)},a=await aOI(n.model,n.modelProvider,n);for(let[c,r]of Object.entries(this._queuedMethodOperations))c in a&&typeof a[c]=="function"&&(a=await a[c](...r));return this._modelInstanceCache.set(I,a),a}async _generate(e,I,l){return(await this._getModelInstance(I))._generate(e,I??{},l)}bindTools(e,I){let l={...this._queuedMethodOperations};return l.bindTools=[e,I],new Zre({defaultConfig:this._defaultConfig,configurableFields:this._configurableFields,configPrefix:this._configPrefix,queuedMethodOperations:l})}withStructuredOutput=(e,...I)=>{let l={...this._queuedMethodOperations};return l.withStructuredOutput=[e,...I],new Zre({defaultConfig:this._defaultConfig,configurableFields:this._configurableFields,configPrefix:this._configPrefix,queuedMethodOperations:l})};_modelParams(e){let I=e?.configurable??{},l={};for(let[n,a]of Object.entries(I))if(n.startsWith(this._configPrefix)){let c=this._removePrefix(n,this._configPrefix);l[c]=a}return this._configurableFields!=="any"&&(l=Object.fromEntries(Object.entries(l).filter(([n])=>this._configurableFields.includes(n)))),l}_removePrefix(e,I){return e.startsWith(I)?e.slice(I.length):e}withConfig(e){let I={...e||{}},l=this._modelParams(I),n=Object.fromEntries(Object.entries(I).filter(([a])=>a!=="configurable"));return n.configurable=Object.fromEntries(Object.entries(I.configurable||{}).filter(([a])=>this._configPrefix&&!Object.keys(l).includes(this._removePrefix(a,this._configPrefix)))),new ha({config:I,bound:new Zre({defaultConfig:{...this._defaultConfig,...l},configurableFields:Array.isArray(this._configurableFields)?[...this._configurableFields]:this._configurableFields,configPrefix:this._configPrefix,queuedMethodOperations:this._queuedMethodOperations})})}async invoke(e,I){let l=await this._getModelInstance(I),n=KI(I);return l.invoke(e,n)}async stream(e,I){let l=new jA({generator:await(await this._getModelInstance(I)).stream(e,I),config:I});return await l.setup,nr.fromAsyncGenerator(l)}async batch(e,I,l){return super.batch(e,I,l)}async*transform(e,I){let l=await this._getModelInstance(I),n=KI(I);yield*l.transform(e,n)}async*streamLog(e,I,l){let n=await this._getModelInstance(I),a=KI(I);yield*n.streamLog(e,a,{...l,_schemaFormat:"original",includeNames:l?.includeNames,includeTypes:l?.includeTypes,includeTags:l?.includeTags,excludeNames:l?.excludeNames,excludeTypes:l?.excludeTypes,excludeTags:l?.excludeTags})}streamEvents(e,I,l){let n=this;async function*a(){let c=await n._getModelInstance(I),r=KI(I),s=c.streamEvents(e,r,l);for await(let i of s)yield i}return nr.fromAsyncGenerator(a())}get profile(){if(this._profile)return this._profile;let e=this._getCacheKey({});return this._modelInstanceCache.get(e)?.profile??{}}_getCacheKey(e){let I=e??{};if(I.configurable){let{configurable:l}=I,n={};for(let[a,c]of Object.entries(l))a.startsWith("__pregel_")||(n[a]=c);I={...I,configurable:n}}return JSON.stringify(I)}}});function T_(t){return t!==void 0&&Array.isArray(t.lc_namespace)}function __(t){return t!==void 0&&tI.isRunnable(t)&&"lc_name"in t.constructor&&typeof t.constructor.lc_name=="function"&&t.constructor.lc_name()==="RunnableToolLike"}function K_(t){return!!t&&typeof t=="object"&&"name"in t&&"schema"in t&&(Vl(t.schema)||t.schema!=null&&typeof t.schema=="object"&&"type"in t.schema&&typeof t.schema.type=="string"&&["null","boolean","object","array","number","string"].includes(t.schema.type))}function Ws(t){return K_(t)||__(t)||T_(t)}var NEe=g(()=>{o();MA();es()});var VEe=g(()=>{o();Vi()});var Vre={};tr(Vre,{ZodISODate:()=>hre,ZodISODateTime:()=>pre,ZodISODuration:()=>Nre,ZodISOTime:()=>Wre,date:()=>REe,datetime:()=>YEe,duration:()=>FEe,time:()=>AEe});function YEe(t){return dHe(pre,t)}function REe(t){return uHe(hre,t)}function AEe(t){return bHe(Wre,t)}function FEe(t){return mHe(Nre,t)}var pre,hre,Wre,Nre,Yre=g(()=>{o();Vi();Rre();pre=de("ZodISODateTime",(t,e)=>{mwe.init(t,e),Na.init(t,e)});hre=de("ZodISODate",(t,e)=>{Zwe.init(t,e),Na.init(t,e)});Wre=de("ZodISOTime",(t,e)=>{pwe.init(t,e),Na.init(t,e)});Nre=de("ZodISODuration",(t,e)=>{hwe.init(t,e),Na.init(t,e)})});var Rmt,rOI,p3,XEe=g(()=>{o();Vi();Vi();Rmt=(t,e)=>{wT.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:I=>QT(t,I)},flatten:{value:I=>HT(t,I)},addIssue:{value:I=>t.issues.push(I)},addIssues:{value:I=>t.issues.push(...I)},isEmpty:{get(){return t.issues.length===0}}})},rOI=de("ZodError",Rmt),p3=de("ZodError",Rmt,{Parent:Error})});var gEe,vEe,yEe,wEe,HEe=g(()=>{o();Vi();XEe();gEe=Mne(p3),vEe=Sne(p3),yEe=Tne(p3),wEe=_ne(p3)});function QEe(t){return oHe(q_,t)}function oOI(t){return sae(JEe,t)}function iOI(t){return UT(Are,t)}function GOI(t){return oae(zX,t)}function dOI(t){return iae(zX,t)}function uOI(t){return Gae(zX,t)}function bOI(t){return dae(zX,t)}function mOI(t){return uae(CEe,t)}function ZOI(t){return bae(LEe,t)}function pOI(t){return mae(kEe,t)}function hOI(t){return Zae(xEe,t)}function WOI(t){return pae(jEe,t)}function NOI(t){return hae(UEe,t)}function VOI(t){return Wae(OEe,t)}function YOI(t){return Nae(zEe,t)}function ROI(t){return Vae(BEe,t)}function AOI(t){return Yae(MEe,t)}function FOI(t){return Rae(SEe,t)}function XOI(t){return Aae(TEe,t)}function gOI(t){return Fae(_Ee,t)}function vOI(t){return Xae(KEe,t)}function yOI(t){return gae(DEe,t)}function wOI(t){return vae(qEe,t)}function HOI(t,e,I={}){return THe(Amt,t,e,I)}function Fmt(t){return ZHe(P_,t)}function fEe(t){return hHe(h3,t)}function QOI(t){return WHe(h3,t)}function fOI(t){return NHe(h3,t)}function EOI(t){return VHe(h3,t)}function JOI(t){return YHe(h3,t)}function vre(t){return RHe($_,t)}function COI(t){return FHe(eK,t)}function LOI(t){return gHe(PEe,t)}function kOI(t){return vHe(PEe,t)}function xOI(t){return yHe(Xmt,t)}function jOI(t){return wHe(gmt,t)}function ymt(t){return HHe(vmt,t)}function UOI(){return QHe(wmt)}function uC(){return xH(Hmt)}function yre(t){return OT(Qmt,t)}function OOI(t){return fHe(fmt,t)}function zOI(t){return EHe(wre,t)}function W3(t,e){return t_(Emt,t,e)}function BOI(t){let e=t._zod.def.shape;return Bmt(Object.keys(e))}function $Ee(t,e){let I={type:"object",get shape(){return dt.assignProp(this,"shape",{...t}),this.shape},...dt.normalizeParams(e)};return new Hre(I)}function MOI(t,e){return new Hre({type:"object",get shape(){return dt.assignProp(this,"shape",{...t}),this.shape},catchall:yre(),...dt.normalizeParams(e)})}function SOI(t,e){return new Hre({type:"object",get shape(){return dt.assignProp(this,"shape",{...t}),this.shape},catchall:uC(),...dt.normalizeParams(e)})}function Qre(t,e){return new e1e({type:"union",options:t,...dt.normalizeParams(e)})}function TOI(t,e,I){return new Jmt({type:"union",options:e,discriminator:t,...dt.normalizeParams(I)})}function Lmt(t,e){return new Cmt({type:"intersection",left:t,right:e})}function _OI(t,e,I){let l=e instanceof xI,n=l?I:e,a=l?e:null;return new kmt({type:"tuple",items:t,rest:a,...dt.normalizeParams(n)})}function xmt(t,e,I){return new t1e({type:"record",keyType:t,valueType:e,...dt.normalizeParams(I)})}function KOI(t,e,I){return new t1e({type:"record",keyType:Qre([t,yre()]),valueType:e,...dt.normalizeParams(I)})}function DOI(t,e,I){return new jmt({type:"map",keyType:t,valueType:e,...dt.normalizeParams(I)})}function qOI(t,e){return new Umt({type:"set",valueType:t,...dt.normalizeParams(e)})}function Omt(t,e){let I=Array.isArray(t)?Object.fromEntries(t.map(l=>[l,l])):t;return new D_({type:"enum",entries:I,...dt.normalizeParams(e)})}function POI(t,e){return new D_({type:"enum",entries:t,...dt.normalizeParams(e)})}function Bmt(t,e){return new zmt({type:"literal",values:Array.isArray(t)?t:[t],...dt.normalizeParams(e)})}function $OI(t){return zHe(Mmt,t)}function l1e(t){return new I1e({type:"transform",transform:t})}function Fre(t){return new n1e({type:"optional",innerType:t})}function Xre(t){return new Smt({type:"nullable",innerType:t})}function ezI(t){return Fre(Xre(t))}function _mt(t,e){return new Tmt({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():e}})}function Dmt(t,e){return new Kmt({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():e}})}function qmt(t,e){return new a1e({type:"nonoptional",innerType:t,...dt.normalizeParams(e)})}function tzI(t){return new Pmt({type:"success",innerType:t})}function eZt(t,e){return new $mt({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}function IzI(t){return CHe(tZt,t)}function gre(t,e){return new c1e({type:"pipe",in:t,out:e})}function lZt(t){return new IZt({type:"readonly",innerType:t})}function lzI(t,e){return new nZt({type:"template_literal",parts:t,...dt.normalizeParams(e)})}function cZt(t){return new aZt({type:"lazy",getter:t})}function nzI(t){return new rZt({type:"promise",innerType:t})}function sZt(t){let e=new cr({check:"custom"});return e._zod.check=t,e}function r1e(t,e){return BHe(fre,t??(()=>!0),e)}function oZt(t,e={}){return MHe(fre,t,e)}function iZt(t){let e=sZt(I=>(I.addIssue=l=>{if(typeof l=="string")I.issues.push(dt.issue(l,I.value,e._zod.def));else{let n=l;n.fatal&&(n.continue=!1),n.code??(n.code="custom"),n.input??(n.input=I.value),n.inst??(n.inst=e),n.continue??(n.continue=!e._zod.def.abort),I.issues.push(dt.issue(n))}},t(I.value,I)));return e}function azI(t,e={error:`Input not instance of ${t.name}`}){let I=new fre({type:"custom",check:"custom",fn:l=>l instanceof t,abort:!0,...dt.normalizeParams(e)});return I._zod.bag.Class=t,I}function rzI(t){let e=cZt(()=>Qre([QEe(t),Fmt(),vre(),ymt(),W3(e),xmt(QEe(),e)]));return e}function szI(t,e){return gre(l1e(t),e)}var Yl,EEe,q_,Na,JEe,Are,zX,CEe,LEe,kEe,xEe,jEe,UEe,OEe,zEe,BEe,MEe,SEe,TEe,_Ee,KEe,DEe,qEe,Amt,P_,h3,$_,eK,PEe,Xmt,gmt,vmt,wmt,Hmt,Qmt,fmt,wre,Emt,Hre,e1e,Jmt,Cmt,kmt,t1e,jmt,Umt,D_,zmt,Mmt,I1e,n1e,Smt,Tmt,Kmt,a1e,Pmt,$mt,tZt,c1e,IZt,nZt,aZt,rZt,fre,czI,Rre=g(()=>{o();Vi();Vi();VEe();Yre();HEe();Yl=de("ZodType",(t,e)=>(xI.init(t,e),t.def=e,Object.defineProperty(t,"_def",{value:e}),t.check=(...I)=>t.clone({...e,checks:[...e.checks??[],...I.map(l=>typeof l=="function"?{_zod:{check:l,def:{check:"custom"},onattach:[]}}:l)]}),t.clone=(I,l)=>ar(t,I,l),t.brand=()=>t,t.register=(I,l)=>(I.add(t,l),t),t.parse=(I,l)=>gEe(t,I,l,{callee:t.parse}),t.safeParse=(I,l)=>yEe(t,I,l),t.parseAsync=async(I,l)=>vEe(t,I,l,{callee:t.parseAsync}),t.safeParseAsync=async(I,l)=>wEe(t,I,l),t.spa=t.safeParseAsync,t.refine=(I,l)=>t.check(oZt(I,l)),t.superRefine=I=>t.check(iZt(I)),t.overwrite=I=>t.check(gX(I)),t.optional=()=>Fre(t),t.nullable=()=>Xre(t),t.nullish=()=>Fre(Xre(t)),t.nonoptional=I=>qmt(t,I),t.array=()=>W3(t),t.or=I=>Qre([t,I]),t.and=I=>Lmt(t,I),t.transform=I=>gre(t,l1e(I)),t.default=I=>_mt(t,I),t.prefault=I=>Dmt(t,I),t.catch=I=>eZt(t,I),t.pipe=I=>gre(t,I),t.readonly=()=>lZt(t),t.describe=I=>{let l=t.clone();return Vc.add(l,{description:I}),l},Object.defineProperty(t,"description",{get(){return Vc.get(t)?.description},configurable:!0}),t.meta=(...I)=>{if(I.length===0)return Vc.get(t);let l=t.clone();return Vc.add(l,I[0]),l},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t)),EEe=de("_ZodString",(t,e)=>{XJ.init(t,e),Yl.init(t,e);let I=t._zod.bag;t.format=I.format??null,t.minLength=I.minimum??null,t.maxLength=I.maximum??null,t.regex=(...l)=>t.check(BT(...l)),t.includes=(...l)=>t.check(TT(...l)),t.startsWith=(...l)=>t.check(_T(...l)),t.endsWith=(...l)=>t.check(KT(...l)),t.min=(...l)=>t.check(jH(...l)),t.max=(...l)=>t.check(Ex(...l)),t.length=(...l)=>t.check(Jx(...l)),t.nonempty=(...l)=>t.check(jH(1,...l)),t.lowercase=l=>t.check(MT(l)),t.uppercase=l=>t.check(ST(l)),t.trim=()=>t.check(PT()),t.normalize=(...l)=>t.check(qT(...l)),t.toLowerCase=()=>t.check($T()),t.toUpperCase=()=>t.check(e_())}),q_=de("ZodString",(t,e)=>{XJ.init(t,e),EEe.init(t,e),t.email=I=>t.check(sae(JEe,I)),t.url=I=>t.check(uae(CEe,I)),t.jwt=I=>t.check(vae(qEe,I)),t.emoji=I=>t.check(bae(LEe,I)),t.guid=I=>t.check(UT(Are,I)),t.uuid=I=>t.check(oae(zX,I)),t.uuidv4=I=>t.check(iae(zX,I)),t.uuidv6=I=>t.check(Gae(zX,I)),t.uuidv7=I=>t.check(dae(zX,I)),t.nanoid=I=>t.check(mae(kEe,I)),t.guid=I=>t.check(UT(Are,I)),t.cuid=I=>t.check(Zae(xEe,I)),t.cuid2=I=>t.check(pae(jEe,I)),t.ulid=I=>t.check(hae(UEe,I)),t.base64=I=>t.check(Fae(_Ee,I)),t.base64url=I=>t.check(Xae(KEe,I)),t.xid=I=>t.check(Wae(OEe,I)),t.ksuid=I=>t.check(Nae(zEe,I)),t.ipv4=I=>t.check(Vae(BEe,I)),t.ipv6=I=>t.check(Yae(MEe,I)),t.cidrv4=I=>t.check(Rae(SEe,I)),t.cidrv6=I=>t.check(Aae(TEe,I)),t.e164=I=>t.check(gae(DEe,I)),t.datetime=I=>t.check(YEe(I)),t.date=I=>t.check(REe(I)),t.time=I=>t.check(AEe(I)),t.duration=I=>t.check(FEe(I))});Na=de("ZodStringFormat",(t,e)=>{sa.init(t,e),EEe.init(t,e)}),JEe=de("ZodEmail",(t,e)=>{cwe.init(t,e),Na.init(t,e)});Are=de("ZodGUID",(t,e)=>{nwe.init(t,e),Na.init(t,e)});zX=de("ZodUUID",(t,e)=>{awe.init(t,e),Na.init(t,e)});CEe=de("ZodURL",(t,e)=>{rwe.init(t,e),Na.init(t,e)});LEe=de("ZodEmoji",(t,e)=>{swe.init(t,e),Na.init(t,e)});kEe=de("ZodNanoID",(t,e)=>{owe.init(t,e),Na.init(t,e)});xEe=de("ZodCUID",(t,e)=>{iwe.init(t,e),Na.init(t,e)});jEe=de("ZodCUID2",(t,e)=>{Gwe.init(t,e),Na.init(t,e)});UEe=de("ZodULID",(t,e)=>{dwe.init(t,e),Na.init(t,e)});OEe=de("ZodXID",(t,e)=>{uwe.init(t,e),Na.init(t,e)});zEe=de("ZodKSUID",(t,e)=>{bwe.init(t,e),Na.init(t,e)});BEe=de("ZodIPv4",(t,e)=>{Wwe.init(t,e),Na.init(t,e)});MEe=de("ZodIPv6",(t,e)=>{Nwe.init(t,e),Na.init(t,e)});SEe=de("ZodCIDRv4",(t,e)=>{Vwe.init(t,e),Na.init(t,e)});TEe=de("ZodCIDRv6",(t,e)=>{Ywe.init(t,e),Na.init(t,e)});_Ee=de("ZodBase64",(t,e)=>{Awe.init(t,e),Na.init(t,e)});KEe=de("ZodBase64URL",(t,e)=>{Fwe.init(t,e),Na.init(t,e)});DEe=de("ZodE164",(t,e)=>{Xwe.init(t,e),Na.init(t,e)});qEe=de("ZodJWT",(t,e)=>{gwe.init(t,e),Na.init(t,e)});Amt=de("ZodCustomStringFormat",(t,e)=>{vwe.init(t,e),Na.init(t,e)});P_=de("ZodNumber",(t,e)=>{lae.init(t,e),Yl.init(t,e),t.gt=(l,n)=>t.check(XX(l,n)),t.gte=(l,n)=>t.check(xb(l,n)),t.min=(l,n)=>t.check(xb(l,n)),t.lt=(l,n)=>t.check(FX(l,n)),t.lte=(l,n)=>t.check(Ap(l,n)),t.max=(l,n)=>t.check(Ap(l,n)),t.int=l=>t.check(fEe(l)),t.safe=l=>t.check(fEe(l)),t.positive=l=>t.check(XX(0,l)),t.nonnegative=l=>t.check(xb(0,l)),t.negative=l=>t.check(FX(0,l)),t.nonpositive=l=>t.check(Ap(0,l)),t.multipleOf=(l,n)=>t.check(vJ(l,n)),t.step=(l,n)=>t.check(vJ(l,n)),t.finite=()=>t;let I=t._zod.bag;t.minValue=Math.max(I.minimum??Number.NEGATIVE_INFINITY,I.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(I.maximum??Number.POSITIVE_INFINITY,I.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(I.format??"").includes("int")||Number.isSafeInteger(I.multipleOf??.5),t.isFinite=!0,t.format=I.format??null});h3=de("ZodNumberFormat",(t,e)=>{ywe.init(t,e),P_.init(t,e)});$_=de("ZodBoolean",(t,e)=>{ET.init(t,e),Yl.init(t,e)});eK=de("ZodBigInt",(t,e)=>{nae.init(t,e),Yl.init(t,e),t.gte=(l,n)=>t.check(xb(l,n)),t.min=(l,n)=>t.check(xb(l,n)),t.gt=(l,n)=>t.check(XX(l,n)),t.gte=(l,n)=>t.check(xb(l,n)),t.min=(l,n)=>t.check(xb(l,n)),t.lt=(l,n)=>t.check(FX(l,n)),t.lte=(l,n)=>t.check(Ap(l,n)),t.max=(l,n)=>t.check(Ap(l,n)),t.positive=l=>t.check(XX(BigInt(0),l)),t.negative=l=>t.check(FX(BigInt(0),l)),t.nonpositive=l=>t.check(Ap(BigInt(0),l)),t.nonnegative=l=>t.check(xb(BigInt(0),l)),t.multipleOf=(l,n)=>t.check(vJ(l,n));let I=t._zod.bag;t.minValue=I.minimum??null,t.maxValue=I.maximum??null,t.format=I.format??null});PEe=de("ZodBigIntFormat",(t,e)=>{wwe.init(t,e),eK.init(t,e)});Xmt=de("ZodSymbol",(t,e)=>{Hwe.init(t,e),Yl.init(t,e)});gmt=de("ZodUndefined",(t,e)=>{Qwe.init(t,e),Yl.init(t,e)});vmt=de("ZodNull",(t,e)=>{fwe.init(t,e),Yl.init(t,e)});wmt=de("ZodAny",(t,e)=>{Ewe.init(t,e),Yl.init(t,e)});Hmt=de("ZodUnknown",(t,e)=>{LH.init(t,e),Yl.init(t,e)});Qmt=de("ZodNever",(t,e)=>{JT.init(t,e),Yl.init(t,e)});fmt=de("ZodVoid",(t,e)=>{Jwe.init(t,e),Yl.init(t,e)});wre=de("ZodDate",(t,e)=>{Cwe.init(t,e),Yl.init(t,e),t.min=(l,n)=>t.check(xb(l,n)),t.max=(l,n)=>t.check(Ap(l,n));let I=t._zod.bag;t.minDate=I.minimum?new Date(I.minimum):null,t.maxDate=I.maximum?new Date(I.maximum):null});Emt=de("ZodArray",(t,e)=>{CT.init(t,e),Yl.init(t,e),t.element=e.element,t.min=(I,l)=>t.check(jH(I,l)),t.nonempty=I=>t.check(jH(1,I)),t.max=(I,l)=>t.check(Ex(I,l)),t.length=(I,l)=>t.check(Jx(I,l)),t.unwrap=()=>t.element});Hre=de("ZodObject",(t,e)=>{Lwe.init(t,e),Yl.init(t,e),dt.defineLazy(t,"shape",()=>e.shape),t.keyof=()=>Omt(Object.keys(t._zod.def.shape)),t.catchall=I=>t.clone({...t._zod.def,catchall:I}),t.passthrough=()=>t.clone({...t._zod.def,catchall:uC()}),t.loose=()=>t.clone({...t._zod.def,catchall:uC()}),t.strict=()=>t.clone({...t._zod.def,catchall:yre()}),t.strip=()=>t.clone({...t._zod.def,catchall:void 0}),t.extend=I=>dt.extend(t,I),t.merge=I=>dt.merge(t,I),t.pick=I=>dt.pick(t,I),t.omit=I=>dt.omit(t,I),t.partial=(...I)=>dt.partial(n1e,t,I[0]),t.required=(...I)=>dt.required(a1e,t,I[0])});e1e=de("ZodUnion",(t,e)=>{aae.init(t,e),Yl.init(t,e),t.options=e.options});Jmt=de("ZodDiscriminatedUnion",(t,e)=>{e1e.init(t,e),kwe.init(t,e)});Cmt=de("ZodIntersection",(t,e)=>{xwe.init(t,e),Yl.init(t,e)});kmt=de("ZodTuple",(t,e)=>{gJ.init(t,e),Yl.init(t,e),t.rest=I=>t.clone({...t._zod.def,rest:I})});t1e=de("ZodRecord",(t,e)=>{jwe.init(t,e),Yl.init(t,e),t.keyType=e.keyType,t.valueType=e.valueType});jmt=de("ZodMap",(t,e)=>{Uwe.init(t,e),Yl.init(t,e),t.keyType=e.keyType,t.valueType=e.valueType});Umt=de("ZodSet",(t,e)=>{Owe.init(t,e),Yl.init(t,e),t.min=(...I)=>t.check(yJ(...I)),t.nonempty=I=>t.check(yJ(1,I)),t.max=(...I)=>t.check(fx(...I)),t.size=(...I)=>t.check(zT(...I))});D_=de("ZodEnum",(t,e)=>{zwe.init(t,e),Yl.init(t,e),t.enum=e.entries,t.options=Object.values(e.entries);let I=new Set(Object.keys(e.entries));t.extract=(l,n)=>{let a={};for(let c of l)if(I.has(c))a[c]=e.entries[c];else throw new Error(`Key ${c} not found in enum`);return new D_({...e,checks:[],...dt.normalizeParams(n),entries:a})},t.exclude=(l,n)=>{let a={...e.entries};for(let c of l)if(I.has(c))delete a[c];else throw new Error(`Key ${c} not found in enum`);return new D_({...e,checks:[],...dt.normalizeParams(n),entries:a})}});zmt=de("ZodLiteral",(t,e)=>{Bwe.init(t,e),Yl.init(t,e),t.values=new Set(e.values),Object.defineProperty(t,"value",{get(){if(e.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return e.values[0]}})});Mmt=de("ZodFile",(t,e)=>{Mwe.init(t,e),Yl.init(t,e),t.min=(I,l)=>t.check(yJ(I,l)),t.max=(I,l)=>t.check(fx(I,l)),t.mime=(I,l)=>t.check(DT(Array.isArray(I)?I:[I],l))});I1e=de("ZodTransform",(t,e)=>{LT.init(t,e),Yl.init(t,e),t._zod.parse=(I,l)=>{I.addIssue=a=>{if(typeof a=="string")I.issues.push(dt.issue(a,I.value,e));else{let c=a;c.fatal&&(c.continue=!1),c.code??(c.code="custom"),c.input??(c.input=I.value),c.inst??(c.inst=t),c.continue??(c.continue=!0),I.issues.push(dt.issue(c))}};let n=e.transform(I.value,I);return n instanceof Promise?n.then(a=>(I.value=a,I)):(I.value=n,I)}});n1e=de("ZodOptional",(t,e)=>{Qx.init(t,e),Yl.init(t,e),t.unwrap=()=>t._zod.def.innerType});Smt=de("ZodNullable",(t,e)=>{Swe.init(t,e),Yl.init(t,e),t.unwrap=()=>t._zod.def.innerType});Tmt=de("ZodDefault",(t,e)=>{Twe.init(t,e),Yl.init(t,e),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});Kmt=de("ZodPrefault",(t,e)=>{_we.init(t,e),Yl.init(t,e),t.unwrap=()=>t._zod.def.innerType});a1e=de("ZodNonOptional",(t,e)=>{Kwe.init(t,e),Yl.init(t,e),t.unwrap=()=>t._zod.def.innerType});Pmt=de("ZodSuccess",(t,e)=>{Dwe.init(t,e),Yl.init(t,e),t.unwrap=()=>t._zod.def.innerType});$mt=de("ZodCatch",(t,e)=>{qwe.init(t,e),Yl.init(t,e),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});tZt=de("ZodNaN",(t,e)=>{Pwe.init(t,e),Yl.init(t,e)});c1e=de("ZodPipe",(t,e)=>{kT.init(t,e),Yl.init(t,e),t.in=e.in,t.out=e.out});IZt=de("ZodReadonly",(t,e)=>{$we.init(t,e),Yl.init(t,e)});nZt=de("ZodTemplateLiteral",(t,e)=>{eHe.init(t,e),Yl.init(t,e)});aZt=de("ZodLazy",(t,e)=>{IHe.init(t,e),Yl.init(t,e),t.unwrap=()=>t._zod.def.getter()});rZt=de("ZodPromise",(t,e)=>{tHe.init(t,e),Yl.init(t,e),t.unwrap=()=>t._zod.def.innerType});fre=de("ZodCustom",(t,e)=>{lHe.init(t,e),Yl.init(t,e)});czI=(...t)=>SHe({Pipe:c1e,Boolean:$_,String:q_,Transform:I1e},...t)});function izI(t){ms({customError:t})}function GzI(){return ms().customError}var ozI,GZt=g(()=>{o();Vi();ozI={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"}});var s1e={};tr(s1e,{bigint:()=>mzI,boolean:()=>bzI,date:()=>ZzI,number:()=>uzI,string:()=>dzI});function dzI(t){return iHe(q_,t)}function uzI(t){return pHe(P_,t)}function bzI(t){return AHe($_,t)}function mzI(t){return XHe(eK,t)}function ZzI(t){return JHe(wre,t)}var dZt=g(()=>{o();Vi();Rre()});var ae={};tr(ae,{$brand:()=>Bve,$input:()=>rHe,$output:()=>cHe,NEVER:()=>zve,TimePrecision:()=>GHe,ZodAny:()=>wmt,ZodArray:()=>Emt,ZodBase64:()=>_Ee,ZodBase64URL:()=>KEe,ZodBigInt:()=>eK,ZodBigIntFormat:()=>PEe,ZodBoolean:()=>$_,ZodCIDRv4:()=>SEe,ZodCIDRv6:()=>TEe,ZodCUID:()=>xEe,ZodCUID2:()=>jEe,ZodCatch:()=>$mt,ZodCustom:()=>fre,ZodCustomStringFormat:()=>Amt,ZodDate:()=>wre,ZodDefault:()=>Tmt,ZodDiscriminatedUnion:()=>Jmt,ZodE164:()=>DEe,ZodEmail:()=>JEe,ZodEmoji:()=>LEe,ZodEnum:()=>D_,ZodError:()=>rOI,ZodFile:()=>Mmt,ZodGUID:()=>Are,ZodIPv4:()=>BEe,ZodIPv6:()=>MEe,ZodISODate:()=>hre,ZodISODateTime:()=>pre,ZodISODuration:()=>Nre,ZodISOTime:()=>Wre,ZodIntersection:()=>Cmt,ZodIssueCode:()=>ozI,ZodJWT:()=>qEe,ZodKSUID:()=>zEe,ZodLazy:()=>aZt,ZodLiteral:()=>zmt,ZodMap:()=>jmt,ZodNaN:()=>tZt,ZodNanoID:()=>kEe,ZodNever:()=>Qmt,ZodNonOptional:()=>a1e,ZodNull:()=>vmt,ZodNullable:()=>Smt,ZodNumber:()=>P_,ZodNumberFormat:()=>h3,ZodObject:()=>Hre,ZodOptional:()=>n1e,ZodPipe:()=>c1e,ZodPrefault:()=>Kmt,ZodPromise:()=>rZt,ZodReadonly:()=>IZt,ZodRealError:()=>p3,ZodRecord:()=>t1e,ZodSet:()=>Umt,ZodString:()=>q_,ZodStringFormat:()=>Na,ZodSuccess:()=>Pmt,ZodSymbol:()=>Xmt,ZodTemplateLiteral:()=>nZt,ZodTransform:()=>I1e,ZodTuple:()=>kmt,ZodType:()=>Yl,ZodULID:()=>UEe,ZodURL:()=>CEe,ZodUUID:()=>zX,ZodUndefined:()=>gmt,ZodUnion:()=>e1e,ZodUnknown:()=>Hmt,ZodVoid:()=>fmt,ZodXID:()=>OEe,_ZodString:()=>EEe,_default:()=>_mt,any:()=>UOI,array:()=>W3,base64:()=>gOI,base64url:()=>vOI,bigint:()=>COI,boolean:()=>vre,catch:()=>eZt,check:()=>sZt,cidrv4:()=>FOI,cidrv6:()=>XOI,clone:()=>ar,coerce:()=>s1e,config:()=>ms,core:()=>vX,cuid:()=>hOI,cuid2:()=>WOI,custom:()=>r1e,date:()=>zOI,discriminatedUnion:()=>TOI,e164:()=>yOI,email:()=>oOI,emoji:()=>ZOI,endsWith:()=>KT,enum:()=>Omt,file:()=>$OI,flattenError:()=>HT,float32:()=>QOI,float64:()=>fOI,formatError:()=>QT,function:()=>KHe,getErrorMap:()=>GzI,globalRegistry:()=>Vc,gt:()=>XX,gte:()=>xb,guid:()=>iOI,includes:()=>TT,instanceof:()=>azI,int:()=>fEe,int32:()=>EOI,int64:()=>LOI,intersection:()=>Lmt,ipv4:()=>ROI,ipv6:()=>AOI,iso:()=>Vre,json:()=>rzI,jwt:()=>wOI,keyof:()=>BOI,ksuid:()=>YOI,lazy:()=>cZt,length:()=>Jx,literal:()=>Bmt,locales:()=>jT,looseObject:()=>SOI,lowercase:()=>MT,lt:()=>FX,lte:()=>Ap,map:()=>DOI,maxLength:()=>Ex,maxSize:()=>fx,mime:()=>DT,minLength:()=>jH,minSize:()=>yJ,multipleOf:()=>vJ,nan:()=>IzI,nanoid:()=>pOI,nativeEnum:()=>POI,negative:()=>kHe,never:()=>yre,nonnegative:()=>jHe,nonoptional:()=>qmt,nonpositive:()=>xHe,normalize:()=>qT,null:()=>ymt,nullable:()=>Xre,nullish:()=>ezI,number:()=>Fmt,object:()=>$Ee,optional:()=>Fre,overwrite:()=>gX,parse:()=>gEe,parseAsync:()=>vEe,partialRecord:()=>KOI,pipe:()=>gre,positive:()=>LHe,prefault:()=>Dmt,preprocess:()=>szI,prettifyError:()=>lye,promise:()=>nzI,property:()=>UHe,readonly:()=>lZt,record:()=>xmt,refine:()=>oZt,regex:()=>BT,regexes:()=>FJ,registry:()=>rae,safeParse:()=>yEe,safeParseAsync:()=>wEe,set:()=>qOI,setErrorMap:()=>izI,size:()=>zT,startsWith:()=>_T,strictObject:()=>MOI,string:()=>QEe,stringFormat:()=>HOI,stringbool:()=>czI,success:()=>tzI,superRefine:()=>iZt,symbol:()=>xOI,templateLiteral:()=>lzI,toJSONSchema:()=>UH,toLowerCase:()=>$T,toUpperCase:()=>e_,transform:()=>l1e,treeifyError:()=>Iye,trim:()=>PT,tuple:()=>_OI,uint32:()=>JOI,uint64:()=>kOI,ulid:()=>NOI,undefined:()=>jOI,union:()=>Qre,unknown:()=>uC,uppercase:()=>ST,url:()=>mOI,uuid:()=>GOI,uuidv4:()=>dOI,uuidv6:()=>uOI,uuidv7:()=>bOI,void:()=>OOI,xid:()=>VOI});var o1e=g(()=>{o();Vi();Rre();VEe();XEe();HEe();GZt();Vi();nHe();Vi();aHe();Yre();Yre();dZt();ms(cae())});var uZt=g(()=>{o();o1e();o1e()});var sG=g(()=>{o();uZt()});function ir(t,e){let I=Lx(e.schema),l=Sx(e.schema);if(!e.schema||I||l)return new MX({...e,description:e.description??e.schema?.description??`${e.name} tool`,func:async(c,r,s)=>new Promise((i,G)=>{let d=Nl(s,{callbacks:r?.getChild()});dl.runWithConfig(Vo(d),async()=>{try{i(t(c,d))}catch(u){G(u)}})})});let n=e.schema,a=e.description??e.schema.description??`${e.name} tool`;return new bC({...e,description:a,schema:n,func:async(c,r,s)=>new Promise((i,G)=>{let d,u=()=>{s?.signal&&d&&s.signal.removeEventListener("abort",d)};s?.signal&&(d=()=>{u(),G(QH(s.signal))},s.signal.addEventListener("abort",d,{once:!0}));let b=Nl(s,{callbacks:r?.getChild()});dl.runWithConfig(Vo(b),async()=>{try{let Z=await t(c,b);if(BQe(Z)){i(Z);return}if(s?.signal?.aborted){u();return}u(),i(Z)}catch(Z){u(),G(Z)}})})})}function hzI(t){let{content:e,artifact:I,toolCallId:l,metadata:n}=t;return l&&!_S(e)?typeof e=="string"||Array.isArray(e)&&e.every(a=>typeof a=="object")?new pt({status:"success",content:e,artifact:I,tool_call_id:l,name:t.name,metadata:n}):new pt({status:"success",content:WzI(e),artifact:I,tool_call_id:l,name:t.name,metadata:n}):e}function WzI(t){try{return JSON.stringify(t)??""}catch{return`${t}`}}var mZt,cF,BX,MX,bC,pzI,Ns=g(()=>{o();Ct();Cle();YH();RX();pJ();Bu();xA();Ax();MA();aG();SQe();sZ();NEe();Fc();Ice();sG();mZt=ve({BaseToolkit:()=>pzI,DynamicStructuredTool:()=>bC,DynamicTool:()=>MX,StructuredTool:()=>cF,Tool:()=>BX,ToolInputParsingException:()=>AH,isLangChainTool:()=>Ws,isRunnableToolLike:()=>__,isStructuredTool:()=>T_,isStructuredToolParams:()=>K_,tool:()=>ir}),cF=class extends cre{extras;returnDirect=!1;verboseParsingErrors=!1;get lc_namespace(){return["langchain","tools"]}responseFormat="content";defaultConfig;constructor(t){super(t??{}),this.verboseParsingErrors=t?.verboseParsingErrors??this.verboseParsingErrors,this.responseFormat=t?.responseFormat??this.responseFormat,this.defaultConfig=t?.defaultConfig??this.defaultConfig,this.metadata=t?.metadata??this.metadata,this.extras=t?.extras??this.extras}async invoke(t,e){let I,l=KI(xn(this.defaultConfig,e));return RH(t)?(I=t.args,l={...l,toolCall:t}):I=t,this.call(I,l)}async call(t,e,I){let l=RH(t)?t.args:t,n;if(Vl(this.schema))try{n=await OH(this.schema,l)}catch(b){let Z="Received tool input did not match expected schema";throw this.verboseParsingErrors&&(Z=`${Z} +Details: ${b.message}`),Jae(b)&&(Z=`${Z} + +${ae.prettifyError(b)}`),new AH(Z,JSON.stringify(t))}else{let b=pa(l,this.schema);if(!b.valid){let Z="Received tool input did not match expected schema";throw this.verboseParsingErrors&&(Z=`${Z} +Details: ${b.errors.map(p=>`${p.keywordLocation}: ${p.error}`).join(` +`)}`),new AH(Z,JSON.stringify(t))}n=l}let a=ZJ(e),c=lr.configure(a.callbacks,this.callbacks,a.tags||I,this.tags,a.metadata,this.metadata,{verbose:this.verbose}),r;RH(t)&&(r=t.id),!r&&Iat(a)&&(r=a.toolCall.id);let s=await c?.handleToolStart(this.toJSON(),typeof t=="string"?t:JSON.stringify(t),a.runId,void 0,void 0,void 0,a.runName,r);delete a.runId;let i;try{let b=await this._call(n,s,a);i=BQe(b)?await $Gt(b,async Z=>{try{await s?.handleToolEvent(Z)}catch(p){await s?.handleToolError(p)}}):b}catch(b){throw await s?.handleToolError(b),b}let G,d;if(this.responseFormat==="content_and_artifact")if(Array.isArray(i)&&i.length===2)[G,d]=i;else throw new Error(`Tool response format is "content_and_artifact" but the output was not a two-tuple. +Result: ${JSON.stringify(i)}`);else G=i;let u=hzI({content:G,artifact:d,toolCallId:r,name:this.name,metadata:this.metadata});return await s?.handleToolEnd(u),u}},BX=class extends cF{schema=ie.object({input:ie.string().optional()}).transform(t=>t.input);constructor(t){super(t)}call(t,e){let I=typeof t=="string"||t==null?{input:t}:t;return super.call(I,e)}},MX=class extends BX{static lc_name(){return"DynamicTool"}name;description;func;constructor(t){super(t),this.name=t.name,this.description=t.description,this.func=t.func,this.returnDirect=t.returnDirect??this.returnDirect}async call(t,e){let I=ZJ(e);return I.runName===void 0&&(I.runName=this.name),super.call(t,I)}_call(t,e,I){return this.func(t,e,I)}},bC=class extends cF{static lc_name(){return"DynamicStructuredTool"}description;func;schema;constructor(t){super(t),this.name=t.name,this.description=t.description,this.func=t.func,this.returnDirect=t.returnDirect??this.returnDirect,this.schema=t.schema}async call(t,e,I){let l=ZJ(e);return l.runName===void 0&&(l.runName=this.name),super.call(t,l,I)}_call(t,e,I){return this.func(t,e,I)}},pzI=class{getTools(){return this.tools}}});function kre(t){let e=t;return e!=null&&typeof e.node=="string"&&e.args!==void 0}function Ys(t){return t instanceof wr}function xre(t){return typeof t=="object"&&t!==null&&"__overwrite__"in t?[!0,t[N3]]:[!1,void 0]}function NZt(t){return xre(t)[0]}function F3(t){return!t||typeof t!="object"||!("__interrupt__"in t)?!1:Array.isArray(t[Va])}function Zn(t){return typeof t!="object"||t==null?!1:"lg_name"in t&&t.lg_name==="Command"}function tK(t,e=new Map){if(t!=null&&typeof t=="object"){if(e.has(t))return e.get(t);let I;if(Array.isArray(t))I=[],e.set(t,I),t.forEach((l,n)=>{I[n]=tK(l,e)});else if(Zn(t)&&!(t instanceof An))I=new An(t),e.set(t,I);else if(kre(t)&&!(t instanceof wr))I=new wr(t.node,t.args),e.set(t,I);else if(Zn(t)||Ys(t))I=t,e.set(t,I);else if("lc_serializable"in t&&t.lc_serializable)I=t,e.set(t,I);else{I={},e.set(t,I);for(let[l,n]of Object.entries(t))I[l]=tK(n,e)}return I}return t}var Kn,jI,rF,V3,Jre,Jp,Y3,n0,a0,R3,IK,lK,NzI,A3,Ob,mC,VzI,Cre,Cp,ZZt,Lp,pZt,Va,iZ,nK,IQ,ZC,Vs,i1e,sF,kp,Lre,GZ,hZt,Ere,G1e,wr,N3,WZt,An,gc=g(()=>{o();Kn="__start__",jI="__end__",rF="__input__",V3="__error__",Jre="__pregel_ns_writes",Jp="__pregel_send",Y3="__pregel_call",n0="__pregel_read",a0="__pregel_checkpointer",R3="__pregel_resuming",IK="__pregel_task_id",lK="__pregel_stream",NzI="__pregel_resume_value",A3="__pregel_resume_map",Ob="__pregel_scratchpad",mC="__pregel_previous",VzI="__pregel_durability",Cre="checkpoint_id",Cp="checkpoint_ns",ZZt="__pregel_node_finished",Lp="checkpoint_map",pZt="__pregel_abort_signals",Va="__interrupt__",iZ="__resume__",nK="__no_writes__",IQ="__return__",ZC="__previous__",Vs="langsmith:hidden",i1e="__self__",sF="__pregel_tasks",kp="__pregel_push",Lre="__pregel_pull",GZ="00000000-0000-0000-0000-000000000000",hZt=[Vs,rF,Va,iZ,V3,nK,Jp,n0,a0,VzI,lK,R3,IK,Y3,NzI,Ob,mC,Lp,Cp,Cre],Ere=Symbol.for("langgraph.command"),G1e=class{[Ere];constructor(t){this[Ere]=t}};wr=class{lg_name="Send";node;args;constructor(t,e){this.node=t,this.args=tK(e)}toJSON(){return{lg_name:this.lg_name,node:this.node,args:this.args}}};N3="__overwrite__",WZt=class{lg_name="Overwrite";[N3];constructor(t){this[N3]=t}get value(){return this[N3]}toJSON(){return{[N3]:this[N3]}}static isInstance(t){return!t||typeof t!="object"?!1:"__overwrite__"in t||"lg_name"in t&&t.lg_name==="Overwrite"}};An=class extends G1e{lg_name="Command";lc_direct_tool_output=!0;graph;update;resume;goto=[];static PARENT="__parent__";constructor(t){super(t),this.resume=t.resume,this.graph=t.graph,this.update=t.update,t.goto&&(this.goto=Array.isArray(t.goto)?tK(t.goto):[tK(t.goto)])}_updateAsTuples(){return this.update&&typeof this.update=="object"&&!Array.isArray(this.update)?Object.entries(this.update):Array.isArray(this.update)&&this.update.every(t=>Array.isArray(t)&&t.length===2&&typeof t[0]=="string")?this.update:[["__root__",this.update]]}toJSON(){let t;return typeof this.goto=="string"?t=this.goto:Ys(this.goto)?t=this.goto.toJSON():t=this.goto?.map(e=>typeof e=="string"?e:e.toJSON()),{lg_name:this.lg_name,update:this.update,resume:this.resume,goto:t}}}});function Ore(t){return t!==void 0&&t.name===cK.unminifiable_name}function iF(t){return t!==void 0&&t.is_bubble_up===!0}function jp(t){return t!==void 0&&[oF.unminifiable_name,aK.unminifiable_name].includes(t.name)}var xp,jre,Ure,lQ,oF,aK,cK,rK,Fn,bl,VZt,zre,YZt,X3,RZt,ts=g(()=>{o();xp=class extends Error{lc_error_code;constructor(t,e){let I=t??"";e?.lc_error_code&&(I=`${I} + +Troubleshooting URL: https://docs.langchain.com/oss/javascript/langgraph/${e.lc_error_code}/ +`),super(I),this.lc_error_code=e?.lc_error_code}},jre=class extends xp{get is_bubble_up(){return!0}},Ure=class extends xp{constructor(t,e){super(t,e),this.name="GraphRecursionError"}static get unminifiable_name(){return"GraphRecursionError"}},lQ=class extends xp{constructor(t,e){super(t,e),this.name="GraphValueError"}static get unminifiable_name(){return"GraphValueError"}},oF=class extends jre{interrupts;constructor(t,e){super(JSON.stringify(t,null,2),e),this.name="GraphInterrupt",this.interrupts=t??[]}static get unminifiable_name(){return"GraphInterrupt"}},aK=class extends oF{constructor(t,e){super([{value:t}],e),this.name="NodeInterrupt"}static get unminifiable_name(){return"NodeInterrupt"}},cK=class extends jre{command;constructor(t){super(),this.name="ParentCommand",this.command=t}static get unminifiable_name(){return"ParentCommand"}};rK=class extends xp{constructor(t,e){super(t,e),this.name="EmptyInputError"}static get unminifiable_name(){return"EmptyInputError"}},Fn=class extends xp{constructor(t,e){super(t,e),this.name="EmptyChannelError"}static get unminifiable_name(){return"EmptyChannelError"}},bl=class extends xp{constructor(t,e){super(t,e),this.name="InvalidUpdateError"}static get unminifiable_name(){return"InvalidUpdateError"}},VZt=class extends xp{constructor(t,e){super(t,e),this.name="MultipleSubgraphError"}static get unminifiable_name(){return"MultipleSubgraphError"}},zre=class extends xp{constructor(t,e){super(t,e),this.name="UnreachableNodeError"}static get unminifiable_name(){return"UnreachableNodeError"}},YZt=class extends xp{constructor(t,e){super(t,e),this.name="RemoteException"}static get unminifiable_name(){return"RemoteException"}},X3=class extends xp{constructor(t,e){super(t,e),this.name="StateGraphInputError",this.message="Invalid StateGraph input. Make sure to pass a valid StateDefinition, Annotation.Root, or Zod schema."}static get unminifiable_name(){return"StateGraphInputError"}},RZt=()=>(globalThis[Symbol.for("LG_CHECKPOINT_SEEN_NS_SET")]===void 0&&(globalThis[Symbol.for("LG_CHECKPOINT_SEEN_NS_SET")]=new Set),globalThis[Symbol.for("LG_CHECKPOINT_SEEN_NS_SET")])});var AZt,FZt=g(()=>{o();AZt=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i});function YzI(t){return typeof t=="string"&&AZt.test(t)}var g3,d1e=g(()=>{o();FZt();g3=YzI});function RzI(t){if(!g3(t))throw TypeError("Invalid UUID");var e,I=new Uint8Array(16);return I[0]=(e=parseInt(t.slice(0,8),16))>>>24,I[1]=e>>>16&255,I[2]=e>>>8&255,I[3]=e&255,I[4]=(e=parseInt(t.slice(9,13),16))>>>8,I[5]=e&255,I[6]=(e=parseInt(t.slice(14,18),16))>>>8,I[7]=e&255,I[8]=(e=parseInt(t.slice(19,23),16))>>>8,I[9]=e&255,I[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,I[11]=e/4294967296&255,I[12]=e>>>24&255,I[13]=e>>>16&255,I[14]=e>>>8&255,I[15]=e&255,I}var Bre,u1e=g(()=>{o();d1e();Bre=RzI});function GF(t,e=0){return(Ai[t[e+0]]+Ai[t[e+1]]+Ai[t[e+2]]+Ai[t[e+3]]+"-"+Ai[t[e+4]]+Ai[t[e+5]]+"-"+Ai[t[e+6]]+Ai[t[e+7]]+"-"+Ai[t[e+8]]+Ai[t[e+9]]+"-"+Ai[t[e+10]]+Ai[t[e+11]]+Ai[t[e+12]]+Ai[t[e+13]]+Ai[t[e+14]]+Ai[t[e+15]]).toLowerCase()}var Ai,Mre,v3=g(()=>{o();Ai=[];for(Mre=0;Mre<256;++Mre)Ai.push((Mre+256).toString(16).slice(1))});function sK(){if(!Sre&&(Sre=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Sre))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Sre(AzI)}var Sre,AzI,b1e=g(()=>{o();AzI=new Uint8Array(16)});function FzI(t,e,I){var l=e&&I||0,n=e||new Array(16);t=t||{};var a=t.node,c=t.clockseq;if(t._v6||(a||(a=m1e),c==null&&(c=Tre)),a==null||c==null){var r=t.random||(t.rng||sK)();a==null&&(a=[r[0],r[1],r[2],r[3],r[4],r[5]],!m1e&&!t._v6&&(a[0]|=1,m1e=a)),c==null&&(c=(r[6]<<8|r[7])&16383,Tre===void 0&&!t._v6&&(Tre=c))}var s=t.msecs!==void 0?t.msecs:Date.now(),i=t.nsecs!==void 0?t.nsecs:p1e+1,G=s-Z1e+(i-p1e)/1e4;if(G<0&&t.clockseq===void 0&&(c=c+1&16383),(G<0||s>Z1e)&&t.nsecs===void 0&&(i=0),i>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Z1e=s,p1e=i,Tre=c,s+=122192928e5;var d=((s&268435455)*1e4+i)%4294967296;n[l++]=d>>>24&255,n[l++]=d>>>16&255,n[l++]=d>>>8&255,n[l++]=d&255;var u=s/4294967296*1e4&268435455;n[l++]=u>>>8&255,n[l++]=u&255,n[l++]=u>>>24&15|16,n[l++]=u>>>16&255,n[l++]=c>>>8|128,n[l++]=c&255;for(var b=0;b<6;++b)n[l+b]=a[b];return e||GF(n)}var m1e,Tre,Z1e,p1e,XZt,gZt=g(()=>{o();b1e();v3();Z1e=0,p1e=0;XZt=FzI});function h1e(t){var e=typeof t=="string"?Bre(t):t,I=XzI(e);return typeof t=="string"?GF(I):I}function XzI(t,e=!1){return Uint8Array.of((t[6]&15)<<4|t[7]>>4&15,(t[7]&15)<<4|(t[4]&240)>>4,(t[4]&15)<<4|(t[5]&240)>>4,(t[5]&15)<<4|(t[0]&240)>>4,(t[0]&15)<<4|(t[1]&240)>>4,(t[1]&15)<<4|(t[2]&240)>>4,96|t[2]&15,t[3],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}var vZt=g(()=>{o();u1e();v3()});function gzI(t){t=unescape(encodeURIComponent(t));for(var e=[],I=0;I{o();v3();u1e();vzI="6ba7b810-9dad-11d1-80b4-00c04fd430c8",yzI="6ba7b811-9dad-11d1-80b4-00c04fd430c8"});var wzI,N1e,wZt=g(()=>{o();wzI=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),N1e={randomUUID:wzI}});function HzI(t,e,I){if(N1e.randomUUID&&!e&&!t)return N1e.randomUUID();t=t||{};var l=t.random||(t.rng||sK)();if(l[6]=l[6]&15|64,l[8]=l[8]&63|128,e){I=I||0;for(var n=0;n<16;++n)e[I+n]=l[n];return e}return GF(l)}var _re,HZt=g(()=>{o();wZt();b1e();v3();_re=HzI});function QzI(t,e,I,l){switch(t){case 0:return e&I^~e&l;case 1:return e^I^l;case 2:return e&I^e&l^I&l;case 3:return e^I^l}}function V1e(t,e){return t<>>32-e}function fzI(t){var e=[1518500249,1859775393,2400959708,3395469782],I=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof t=="string"){var l=unescape(encodeURIComponent(t));t=[];for(var n=0;n>>0;V=N,N=h,h=V1e(W,30)>>>0,W=p,p=v}I[0]=I[0]+p>>>0,I[1]=I[1]+W>>>0,I[2]=I[2]+h>>>0,I[3]=I[3]+N>>>0,I[4]=I[4]+V>>>0}return[I[0]>>24&255,I[0]>>16&255,I[0]>>8&255,I[0]&255,I[1]>>24&255,I[1]>>16&255,I[1]>>8&255,I[1]&255,I[2]>>24&255,I[2]>>16&255,I[2]>>8&255,I[2]&255,I[3]>>24&255,I[3]>>16&255,I[3]>>8&255,I[3]&255,I[4]>>24&255,I[4]>>16&255,I[4]>>8&255,I[4]&255]}var QZt,fZt=g(()=>{o();QZt=fzI});var EzI,Y1e,EZt=g(()=>{o();yZt();fZt();EzI=W1e("v5",80,QZt),Y1e=EzI});function JZt(t,e){var I=Object.keys(t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);e&&(l=l.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),I.push.apply(I,l)}return I}function CZt(t){for(var e=1;e{o();v3();gZt();vZt()});var Dre=g(()=>{o();HZt();EZt();LZt();d1e()});function oK(t){return Kre({clockseq:t})}function SX(t,e){let I=e.replace(/-/g,"").match(/.{2}/g).map(l=>parseInt(l,16));return Y1e(t,new Uint8Array(I))}var R1e=g(()=>{o();Dre()});var iK,A1e,pC,F1e,X1e,qre=g(()=>{o();iK="__pregel_tasks",A1e="__error__",pC="__scheduled__",F1e="__interrupt__",X1e="__resume__"});function xzI(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function xZt(t,e,I,l){typeof l>"u"&&(l=xzI()),v1e(t,"",0,[],void 0,0,l);var n;try{y3.length===0?n=JSON.stringify(t,e,I):n=JSON.stringify(t,jzI(e),I)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;Pre.length!==0;){var a=Pre.pop();a.length===4?Object.defineProperty(a[0],a[1],a[3]):a[0][a[1]]=a[2]}}return n}function g1e(t,e,I,l){var n=Object.getOwnPropertyDescriptor(l,I);n.get!==void 0?n.configurable?(Object.defineProperty(l,I,{value:t}),Pre.push([l,I,e,n])):y3.push([e,I,t]):(l[I]=t,Pre.push([l,I,e]))}function v1e(t,e,I,l,n,a,c){a+=1;var r;if(typeof t=="object"&&t!==null){for(r=0;rc.depthLimit){g1e(kZt,t,e,n);return}if(typeof c.edgesLimit<"u"&&I+1>c.edgesLimit){g1e(kZt,t,e,n);return}if(l.push(t),Array.isArray(t))for(r=0;r0)for(var l=0;l{o();kZt="[...]",kzI="[Circular]",Pre=[],y3=[]});var UZt,OZt=g(()=>{o();UZt=[]});var zZt,BZt=g(()=>{o();Ct();zZt=ve({})});var MZt,SZt=g(()=>{o();Ct();MZt=ve({})});var TZt,y1e,$re,UzI,w1e=g(()=>{o();Ct();Jb();tG();EA();NI();TZt=ve({BaseChatMessageHistory:()=>y1e,BaseListChatMessageHistory:()=>$re,InMemoryChatMessageHistory:()=>UzI}),y1e=class extends Xr{async addMessages(t){for(let e of t)await this.addMessage(e)}},$re=class extends Xr{addUserMessage(t){return this.addMessage(new ZI(t))}addAIMessage(t){return this.addMessage(new He(t))}async addMessages(t){for(let e of t)await this.addMessage(e)}clear(){throw new Error("Not implemented.")}},UzI=class extends $re{lc_namespace=["langchain","stores","message","in_memory"];messages=[];constructor(t){super(...arguments),this.messages=t??[]}async getMessages(){return this.messages}async addMessage(t){this.messages.push(t)}async clear(){this.messages=[]}}});var Hr,w3=g(()=>{o();Hr=class{pageContent;metadata;id;constructor(t){this.pageContent=t.pageContent!==void 0?t.pageContent.toString():"",this.metadata=t.metadata??{},this.id=t.id}}});var GK,_Zt,KZt=g(()=>{o();es();GK=class extends tI{lc_namespace=["langchain_core","documents","transformers"];invoke(t,e){return this.transformDocuments(t)}},_Zt=class extends GK{async transformDocuments(t){let e=[];for(let I of t){let l=await this._transformDocument(I);e.push(l)}return e}}});var DZt,H3=g(()=>{o();Ct();w3();KZt();DZt=ve({BaseDocumentTransformer:()=>GK,Document:()=>Hr,MappingDocumentTransformer:()=>_Zt})});var qZt,H1e,Q1e=g(()=>{o();Ct();qZt=ve({BaseDocumentLoader:()=>H1e}),H1e=class{}});function zzI(t){if(typeof t=="string")return t;try{return JSON.stringify(t,null,2)}catch{return String(t)}}var PZt,OzI,$Zt=g(()=>{o();Ct();Q1e();Vx();PZt=ve({LangSmithLoader:()=>OzI}),OzI=class extends H1e{datasetId;datasetName;exampleIds;asOf;splits;inlineS3Urls;offset;limit;metadata;filter;contentKey;formatContent;client;constructor(t){if(super(),t.client&&t.clientConfig)throw new Error("client and clientConfig cannot both be provided.");this.client=t.client??new Yp(t?.clientConfig),this.contentKey=t.contentKey?t.contentKey.split("."):[],this.formatContent=t.formatContent??zzI,this.datasetId=t.datasetId,this.datasetName=t.datasetName,this.exampleIds=t.exampleIds,this.asOf=t.asOf,this.splits=t.splits,this.inlineS3Urls=t.inlineS3Urls,this.offset=t.offset,this.limit=t.limit,this.metadata=t.metadata,this.filter=t.filter}async load(){let t=[];for await(let e of this.client.listExamples({datasetId:this.datasetId,datasetName:this.datasetName,exampleIds:this.exampleIds,asOf:this.asOf,splits:this.splits,inlineS3Urls:this.inlineS3Urls,offset:this.offset,limit:this.limit,metadata:this.metadata,filter:this.filter})){let I=e.inputs;for(let a of this.contentKey)I=I[a];let l=this.formatContent(I),n=e;["created_at","modified_at"].forEach(a=>{a in n&&typeof n[a]=="object"&&(n[a]=n[a].toString())}),t.push({pageContent:l,metadata:n})}return t}}});var ept,Up,hC=g(()=>{o();Ct();JH();ept=ve({Embeddings:()=>Up}),Up=class{caller;constructor(t){this.caller=new tZ(t??{})}}});var Q3,ese=g(()=>{o();Jb();Q3=class extends Xr{lc_namespace=["langchain_core","example_selectors","base"]}});function Ipt(t){return t._modelType()==="base_llm"}function lpt(t){return t._modelType()==="base_chat_model"}var f1e,tpt,npt=g(()=>{o();f1e=class{async getPromptAsync(t,e){return this.getPrompt(t).partial(e?.partialVariables??{})}},tpt=class extends f1e{defaultPrompt;conditionals;constructor(t,e=[]){super(),this.defaultPrompt=t,this.conditionals=e}getPrompt(t){for(let[e,I]of this.conditionals)if(e(t))return I;return this.defaultPrompt}}});function apt(t){return t.split(/\n| /).length}var cpt,spt=g(()=>{o();ese();cpt=class rpt extends Q3{examples=[];examplePrompt;getTextLength=apt;maxLength=2048;exampleTextLengths=[];constructor(e){super(e),this.examplePrompt=e.examplePrompt,this.maxLength=e.maxLength??2048,this.getTextLength=e.getTextLength??apt}async addExample(e){this.examples.push(e);let I=await this.examplePrompt.format(e);this.exampleTextLengths.push(this.getTextLength(I))}async calculateExampleTextLengths(e,I){if(e.length>0)return e;let{examples:l,examplePrompt:n}=I;return(await Promise.all(l.map(a=>n.format(a)))).map(a=>this.getTextLength(a))}async selectExamples(e){let I=Object.values(e).join(" "),l=this.maxLength-this.getTextLength(I),n=0,a=[];for(;l>0&&nl.addExample(n))),l}}});function E1e(t){return Object.keys(t).sort().map(e=>t[e])}var opt,Gpt=g(()=>{o();w3();ese();opt=class ipt extends Q3{vectorStoreRetriever;exampleKeys;inputKeys;constructor(e){if(super(e),this.exampleKeys=e.exampleKeys,this.inputKeys=e.inputKeys,e.vectorStore!==void 0)this.vectorStoreRetriever=e.vectorStore.asRetriever({k:e.k??4,filter:e.filter});else if(e.vectorStoreRetriever)this.vectorStoreRetriever=e.vectorStoreRetriever;else throw new Error('You must specify one of "vectorStore" and "vectorStoreRetriever".')}async addExample(e){let I=E1e((this.inputKeys??Object.keys(e)).reduce((l,n)=>({...l,[n]:e[n]}),{})).join(" ");await this.vectorStoreRetriever.addDocuments([new Hr({pageContent:I,metadata:e})])}async selectExamples(e){let I=E1e((this.inputKeys??Object.keys(e)).reduce((n,a)=>({...n,[a]:e[a]}),{})).join(" "),l=(await this.vectorStoreRetriever.invoke(I)).map(n=>n.metadata);return this.exampleKeys?l.map(n=>this.exampleKeys.reduce((a,c)=>({...a,[c]:n[c]}),{})):l}static async fromExamples(e,I,l,n={}){let a=n.inputKeys??null,c=e.map(r=>E1e(a?a.reduce((s,i)=>({...s,[i]:r[i]}),{}):r).join(" "));return new ipt({vectorStore:await l.fromTexts(c,e,I,n),k:n.k??4,exampleKeys:n.exampleKeys,inputKeys:n.inputKeys})}}});var dpt,upt=g(()=>{o();Ct();ese();npt();spt();Gpt();dpt=ve({BaseExampleSelector:()=>Q3,BasePromptSelector:()=>f1e,ConditionalPromptSelector:()=>tpt,LengthBasedExampleSelector:()=>cpt,SemanticSimilarityExampleSelector:()=>opt,isChatModel:()=>lpt,isLLM:()=>Ipt})});var dK,bpt,J1e=g(()=>{o();Jb();dK="10f90ea3-90a4-4962-bf75-83a0f3c1c62a",bpt=class extends Xr{lc_namespace=["langchain","recordmanagers"]}});function L1e(t,e){let I=[],l=[];return e.forEach(n=>{l.push(n),l.length>=t&&(I.push(l),l=[])}),l.length>0&&I.push(l),I}function k1e(t){let e=new Set,I=[];for(let l of t){if(!l.hash_)throw new Error("Hashed document does not have a hash");e.has(l.hash_)||(e.add(l.hash_),I.push(l))}return I}function x1e(t){if(t===null)return e=>null;if(typeof t=="string")return e=>e.metadata[t];if(typeof t=="function")return t;throw new Error(`sourceIdKey should be null, a string or a function, got ${typeof t}`)}async function mpt(t){let{docsSource:e,recordManager:I,vectorStore:l,options:n}=t,{batchSize:a=100,cleanup:c,sourceIdKey:r,cleanupBatchSize:s=1e3,forceUpdate:i=!1}=n??{};if(c==="incremental"&&!r)throw new Error("sourceIdKey is required when cleanup mode is incremental. Please provide through 'options.sourceIdKey'.");let G=j1e(e)?await e.load():e,d=x1e(r??null),u=await I.getTime(),b=0,Z=0,p=0,W=0,h=L1e(a??100,G);for(let N of h){let V=k1e(N.map(f=>C1e.fromDocument(f))),R=V.map(f=>d(f));c==="incremental"&&V.forEach((f,L)=>{if(R[L]===null)throw new Error("sourceIdKey must be provided when cleanup is incremental")});let F=await I.exists(V.map(f=>f.uid)),v=[],y=[],w=[],H=new Set;if(V.forEach((f,L)=>{if(F[L])if(i)H.add(f.uid);else{w.push(f.uid);return}v.push(f.uid),y.push(f.toDocument())}),w.length>0&&(await I.update(w,{timeAtLeast:u}),W+=w.length),y.length>0&&(await l.addDocuments(y,{ids:v}),b+=y.length-H.size,p+=H.size),await I.update(V.map(f=>f.uid),{timeAtLeast:u,groupIds:R}),c==="incremental"){R.forEach(L=>{if(!L)throw new Error("Source id cannot be null")});let f=await I.listKeys({before:u,groupIds:R});f.length>0&&(await l.delete({ids:f}),await I.deleteKeys(f),Z+=f.length)}}if(c==="full"){let N=await I.listKeys({before:u,limit:s});for(;N.length>0;)await l.delete({ids:N}),await I.deleteKeys(N),Z+=N.length,N=await I.listKeys({before:u,limit:s})}return{numAdded:b,numDeleted:Z,numUpdated:p,numSkipped:W}}var C1e,j1e,Zpt=g(()=>{o();$ce();O_();sge();UR();w3();J1e();C1e=class{uid;hash_;contentHash;metadataHash;pageContent;metadata;keyEncoder=eQ;constructor(t){this.uid=t.uid,this.pageContent=t.pageContent,this.metadata=t.metadata}makeDefaultKeyEncoder(t){this.keyEncoder=t}calculateHashes(){let t=["hash_","content_hash","metadata_hash"];for(let I of t)if(I in this.metadata)throw new Error(`Metadata cannot contain key ${I} as it is reserved for internal use. Restricted keys: [${t.join(", ")}]`);let e=this._hashStringToUUID(this.pageContent);try{let I=this._hashNestedDictToUUID(this.metadata);this.contentHash=e,this.metadataHash=I}catch(I){throw new Error(`Failed to hash metadata: ${I}. Please use a dict that can be serialized using json.`)}this.hash_=this._hashStringToUUID(this.contentHash+this.metadataHash),this.uid||(this.uid=this.hash_)}toDocument(){return new Hr({pageContent:this.pageContent,metadata:this.metadata})}static fromDocument(t,e){let I=new this({pageContent:t.pageContent,metadata:t.metadata,uid:e||t.uid});return I.calculateHashes(),I}_hashStringToUUID(t){return iJ(this.keyEncoder(t),dK)}_hashNestedDictToUUID(t){let e=JSON.stringify(t,Object.keys(t).sort());return iJ(this.keyEncoder(e),dK)}};j1e=t=>"load"in t&&typeof t.load=="function"&&"loadAndSplit"in t&&typeof t.loadAndSplit=="function"});var ppt,hpt=g(()=>{o();Ct();J1e();Zpt();ppt=ve({RecordManager:()=>bpt,UUIDV5_NAMESPACE:()=>dK,_HashedDocument:()=>C1e,_batch:()=>L1e,_deduplicateInOrder:()=>k1e,_getSourceIdAssigner:()=>x1e,_isBaseDocumentLoader:()=>j1e,index:()=>mpt})});var Wpt,tse,dF,WC=g(()=>{o();Ct();yH();RX();Lb();Yo();sZ();Wpt=ve({BaseLLM:()=>tse,LLM:()=>dF}),tse=class uK extends GC{lc_namespace=["langchain","llms",this._llmType()];async invoke(e,I){let l=uK._convertInputToPromptValue(e);return(await this.generatePrompt([l],I,I?.callbacks)).generations[0][0].text}async*_streamResponseChunks(e,I,l){throw new Error("Not implemented.")}_separateRunnableConfigFromCallOptionsCompat(e){let[I,l]=super._separateRunnableConfigFromCallOptions(e);return l.signal=I.signal,[I,l]}async*_streamIterator(e,I){if(this._streamResponseChunks===uK.prototype._streamResponseChunks)yield this.invoke(e,I);else{let l=uK._convertInputToPromptValue(e),[n,a]=this._separateRunnableConfigFromCallOptionsCompat(I),c=this.invocationParams(a),r=await lr.configure(n.callbacks,this.callbacks,n.tags,this.tags,n.metadata,this.metadata,{verbose:this.verbose,tracerInheritableMetadata:this._filterInvocationParamsForTracing(c)}),s={options:a,invocation_params:c,batch_size:1},i=await r?.handleLLMStart(this.toJSON(),[l.toString()],n.runId,void 0,s,void 0,void 0,n.runName),G=new Pr({text:""});try{for await(let d of this._streamResponseChunks(l.toString(),a,i?.[0]))G?G=G.concat(d):G=d,typeof d.text=="string"&&(yield d.text)}catch(d){throw await Promise.all((i??[]).map(u=>u?.handleLLMError(d))),d}await Promise.all((i??[]).map(d=>d?.handleLLMEnd({generations:[[G]]})))}}async generatePrompt(e,I,l){let n=e.map(a=>a.toString());return this.generate(n,I,l)}invocationParams(e){return{}}_flattenLLMResult(e){let I=[];for(let l=0;ld?.handleLLMError(G))),G}let i=this._flattenLLMResult(r);await Promise.all((a??[]).map((G,d)=>G?.handleLLMEnd(i[d])))}let s=a?.map(i=>i.runId)||void 0;return Object.defineProperty(r,NJ,{value:s?{runIds:s}:void 0,configurable:!0}),r}async _generateCached({prompts:e,cache:I,llmStringKey:l,parsedOptions:n,handledOptions:a,runId:c}){let r=this.invocationParams(n),s=await lr.configure(a.callbacks,this.callbacks,a.tags,this.tags,a.metadata,this.metadata,{verbose:this.verbose,tracerInheritableMetadata:this._filterInvocationParamsForTracing(r)}),i={options:n,invocation_params:r,batch_size:e.length},G=await s?.handleLLMStart(this.toJSON(),e,c,void 0,i,void 0,void 0,a?.runName),d=[],u=(await Promise.allSettled(e.map(async(p,W)=>{let h=await I.lookup(p,l);return h==null&&d.push(W),h}))).map((p,W)=>({result:p,runManager:G?.[W]})).filter(({result:p})=>p.status==="fulfilled"&&p.value!=null||p.status==="rejected"),b=[];await Promise.all(u.map(async({result:p,runManager:W},h)=>{if(p.status==="fulfilled"){let N=p.value;return b[h]=N.map(V=>(V.generationInfo={...V.generationInfo,tokenUsage:{}},V)),N.length&&await W?.handleLLMNewToken(N[0].text),W?.handleLLMEnd({generations:[N]},void 0,void 0,void 0,{cached:!0})}else return await W?.handleLLMError(p.reason,void 0,void 0,void 0,{cached:!0}),Promise.reject(p.reason)}));let Z={generations:b,missingPromptIndices:d,startedRunManagers:G};return Object.defineProperty(Z,NJ,{value:G?{runIds:G?.map(p=>p.runId)}:void 0,configurable:!0}),Z}async generate(e,I,l){if(!Array.isArray(e))throw new Error("Argument 'prompts' is expected to be a string[]");let n;Array.isArray(I)?n={stop:I}:n=I;let[a,c]=this._separateRunnableConfigFromCallOptionsCompat(n);if(a.callbacks=a.callbacks??l,!this.cache)return this._generateUncached(e,c,a);let{cache:r}=this,s=this._getSerializedCacheKeyParametersForCall(c),{generations:i,missingPromptIndices:G,startedRunManagers:d}=await this._generateCached({prompts:e,cache:r,llmStringKey:s,parsedOptions:c,handledOptions:a,runId:a.runId}),u={};if(G.length>0){let b=await this._generateUncached(G.map(Z=>e[Z]),c,a,d!==void 0?G.map(Z=>d?.[Z]):void 0);await Promise.all(b.generations.map(async(Z,p)=>{let W=G[p];return i[W]=Z,r.update(e[W],s,Z)})),u=b.llmOutput??{}}return{generations:i,llmOutput:u}}_identifyingParams(){return{}}_modelType(){return"base_llm"}},dF=class extends tse{async _generate(t,e,I){return{generations:await Promise.all(t.map((l,n)=>this._call(l,{...e,promptIndex:n},I).then(a=>[{text:a}])))}}}});var Npt,Vpt=g(()=>{o();Ct();Npt=ve({})});function TzI(t,e){let I=Object.keys(t).filter(l=>!e.includes(l)&&l!=="stop");if(I.length!==1)throw new Error(`One input key expected, but got ${I.length}`);return I[0]}var Ypt,BzI,Rpt,MzI,SzI,Apt=g(()=>{o();Ct();Ypt=ve({BaseMemory:()=>BzI,getInputValue:()=>MzI,getOutputValue:()=>SzI,getPromptInputKey:()=>TzI}),BzI=class{},Rpt=(t,e)=>{if(e!==void 0)return t[e];let I=Object.keys(t);if(I.length===1)return t[I[0]]},MzI=(t,e)=>{let I=Rpt(t,e);if(!I)throw new Error(`input values have ${Object.keys(t).length} keys, you must specify an input key or pass only 1 key as input`);return I},SzI=(t,e)=>{let I=Rpt(t,e);if(!I&&I!=="")throw new Error(`output values have ${Object.keys(t).length} keys, you must specify an output key or pass only 1 key as output`);return I}});var U1e,O1e,Fpt,Xpt=g(()=>{o();sJ();Xx();xX();UX();B_();u3();U1e=class extends IF{static lc_name(){return"OutputFunctionsParser"}lc_namespace=["langchain","output_parsers","openai_functions"];lc_serializable=!0;argsOnly=!0;constructor(t){super(),this.argsOnly=t?.argsOnly??this.argsOnly}async parseResult(t){if("message"in t[0]){let e=t[0].message.additional_kwargs.function_call;if(!e)throw new Error(`No function_call in message ${JSON.stringify(t)}`);if(!e.arguments)throw new Error(`No arguments in function_call ${JSON.stringify(t)}`);return this.argsOnly?e.arguments:JSON.stringify(e)}else throw new Error(`No message in generations ${JSON.stringify(t)}`)}},O1e=class extends lF{static lc_name(){return"JsonOutputFunctionsParser"}lc_namespace=["langchain","output_parsers","openai_functions"];lc_serializable=!0;outputParser;argsOnly=!0;constructor(t){super(t),this.argsOnly=t?.argsOnly??this.argsOnly,this.outputParser=new U1e(t)}_diff(t,e){if(e)return EH(t??{},e)}async parsePartialResult(t){let e=t[0];if(!e.message)return;let{message:I}=e,l=I.additional_kwargs.function_call;if(l)return this.argsOnly?fA(l.arguments):{...l,arguments:fA(l.arguments)}}async parseResult(t){let e=await this.outputParser.parseResult(t);if(!e)throw new Error(`No result from "OutputFunctionsParser" ${JSON.stringify(t)}`);return this.parse(e)}async parse(t){let e=JSON.parse(t);return this.argsOnly||(e.arguments=JSON.parse(e.arguments)),e}getFormatInstructions(){return""}},Fpt=class extends IF{static lc_name(){return"JsonKeyOutputFunctionsParser"}lc_namespace=["langchain","output_parsers","openai_functions"];lc_serializable=!0;outputParser=new O1e;attrName;get lc_aliases(){return{attrName:"key_name"}}constructor(t){super(t),this.attrName=t.attrName}async parseResult(t){return(await this.outputParser.parseResult(t))[this.attrName]}}});var gpt,vpt=g(()=>{o();Ct();Xpt();gpt=ve({JsonKeyOutputFunctionsParser:()=>Fpt,JsonOutputFunctionsParser:()=>O1e,OutputFunctionsParser:()=>U1e})});var ypt,bK=g(()=>{o();Ct();pEe();ypt=ve({JsonOutputKeyToolsParser:()=>mre,JsonOutputToolsParser:()=>ZEe,convertLangChainToolCallToOpenAI:()=>Z3,makeInvalidToolCall:()=>nF,parseToolCall:()=>OX})});var wpt,_zI,Hpt=g(()=>{o();Ct();wpt=ve({BaseDocumentCompressor:()=>_zI}),_zI=class{static isBaseDocumentCompressor(t){return t?.compressDocuments!==void 0}}});var Qpt,mK,Ise=g(()=>{o();Ct();RX();xA();es();Qpt=ve({BaseRetriever:()=>mK}),mK=class extends tI{callbacks;tags;metadata;verbose;constructor(t){super(t),this.callbacks=t?.callbacks,this.tags=t?.tags??[],this.metadata=t?.metadata??{},this.verbose=t?.verbose??!1}_getRelevantDocuments(t,e){throw new Error("Not implemented!")}async invoke(t,e){let I=KI(ZJ(e)),l=await(await lr.configure(I.callbacks,this.callbacks,I.tags,this.tags,I.metadata,this.metadata,{verbose:this.verbose}))?.handleRetrieverStart(this.toJSON(),t,I.runId,void 0,void 0,void 0,I.runName);try{let n=await this._getRelevantDocuments(t,l);return await l?.handleRetrieverEnd(n),n}catch(n){throw await l?.handleRetrieverError(n),n}}}});var fpt,f3,nQ,NC=g(()=>{o();Ct();Jb();fpt=ve({BaseStore:()=>f3,InMemoryStore:()=>nQ}),f3=class extends Xr{},nQ=class extends f3{lc_namespace=["langchain","storage"];store={};async mget(t){return t.map(e=>this.store[e])}async mset(t){for(let[e,I]of t)this.store[e]=I}async mdelete(t){for(let e of t)delete this.store[e]}async*yieldKeys(t){let e=Object.keys(this.store);for(let I of e)(t===void 0||I.startsWith(t))&&(yield I)}}});var c0,Xl,lse,nse,ase,Ept,Jpt,Cpt,cse=g(()=>{o();c0={and:"and",or:"or",not:"not"},Xl={eq:"eq",ne:"ne",lt:"lt",gt:"gt",lte:"lte",gte:"gte"},lse=class{},nse=class{accept(t){if(this.exprName==="Operation")return t.visitOperation(this);if(this.exprName==="Comparison")return t.visitComparison(this);if(this.exprName==="StructuredQuery")return t.visitStructuredQuery(this);throw new Error("Unknown Expression type")}},ase=class extends nse{},Ept=class extends ase{exprName="Comparison";constructor(t,e,I){super(),this.comparator=t,this.attribute=e,this.value=I}},Jpt=class extends ase{exprName="Operation";constructor(t,e){super(),this.operator=t,this.args=e}},Cpt=class extends nse{exprName="StructuredQuery";constructor(t,e){super(),this.query=t,this.filter=e}}});function z1e(t){return t&&typeof t=="object"&&!Array.isArray(t)}function zb(t){return t?typeof t=="string"&&t.length>0||typeof t=="function"?!1:z1e(t)&&Object.keys(t).length===0:!0}function B1e(t){if(typeof t=="number")return t%1===0;if(typeof t=="string"){let e=parseInt(t,10);return!Number.isNaN(e)&&e%1===0&&e.toString()===t}return!1}function M1e(t){if(typeof t=="number")return t%1!==0;if(typeof t=="string"){let e=parseFloat(t);return!Number.isNaN(e)&&e%1!==0&&e.toString()===t}return!1}function S1e(t){return typeof t=="string"&&(Number.isNaN(parseFloat(t))||parseFloat(t).toString()!==t)}function T1e(t){return typeof t=="boolean"}function E3(t){let e;if(S1e(t))e=t;else if(B1e(t))e=parseInt(t,10);else if(M1e(t))e=parseFloat(t);else if(T1e(t))e=!!t;else throw new Error("Unsupported value type");return e}var rse=g(()=>{o()});var ZK,Lpt,_1e=g(()=>{o();cse();rse();ZK=class extends lse{},Lpt=class extends ZK{allowedOperators;allowedComparators;constructor(t){super(),this.allowedOperators=t?.allowedOperators??[c0.and,c0.or],this.allowedComparators=t?.allowedComparators??[Xl.eq,Xl.ne,Xl.gt,Xl.gte,Xl.lt,Xl.lte]}formatFunction(t){if(t in Xl){if(this.allowedComparators.length>0&&this.allowedComparators.indexOf(t)===-1)throw new Error(`Comparator ${t} not allowed. Allowed comparators: ${this.allowedComparators.join(", ")}`)}else if(t in c0){if(this.allowedOperators.length>0&&this.allowedOperators.indexOf(t)===-1)throw new Error(`Operator ${t} not allowed. Allowed operators: ${this.allowedOperators.join(", ")}`)}else throw new Error("Unknown comparator or operator");return`$${t}`}visitOperation(t){let e=t.args?.map(I=>I.accept(this));return{[this.formatFunction(t.operator)]:e}}visitComparison(t){return{[t.attribute]:{[this.formatFunction(t.comparator)]:E3(t.value)}}}visitStructuredQuery(t){let e={};return t.filter&&(e={filter:t.filter.accept(this)}),e}mergeFilters(t,e,I="and",l=!1){if(!(zb(t)&&zb(e))){if(zb(t)||I==="replace")return zb(e)?void 0:e;if(zb(e))return l?t:I==="and"?void 0:t;if(I==="and")return{$and:[t,e]};if(I==="or")return{$or:[t,e]};throw new Error("Unknown merge type")}}}});var kpt,xpt=g(()=>{o();cse();rse();_1e();kpt=class extends ZK{allowedOperators=[c0.and,c0.or];allowedComparators=[Xl.eq,Xl.ne,Xl.gt,Xl.gte,Xl.lt,Xl.lte];formatFunction(){throw new Error("Not implemented")}getAllowedComparatorsForType(t){switch(t){case"string":return[Xl.eq,Xl.ne,Xl.gt,Xl.gte,Xl.lt,Xl.lte];case"number":return[Xl.eq,Xl.ne,Xl.gt,Xl.gte,Xl.lt,Xl.lte];case"boolean":return[Xl.eq,Xl.ne];default:throw new Error(`Unsupported data type: ${t}`)}}getComparatorFunction(t){switch(t){case Xl.eq:return(e,I)=>e===I;case Xl.ne:return(e,I)=>e!==I;case Xl.gt:return(e,I)=>e>I;case Xl.gte:return(e,I)=>e>=I;case Xl.lt:return(e,I)=>ee<=I;default:throw new Error("Unknown comparator")}}getOperatorFunction(t){switch(t){case c0.and:return(e,I)=>e&&I;case c0.or:return(e,I)=>e||I;default:throw new Error("Unknown operator")}}visitOperation(t){let{operator:e,args:I}=t;if(this.allowedOperators.includes(e)){let l=this.getOperatorFunction(e);return n=>I?I.reduce((a,c)=>{let r=c.accept(this);if(typeof r=="function")return l(a,r(n));throw new Error("Filter is not a function")},!0):!0}else throw new Error("Operator not allowed")}visitComparison(t){let{comparator:e,attribute:I,value:l}=t,n=[Xl.ne];if(this.allowedComparators.includes(e)){if(!this.getAllowedComparatorsForType(typeof l).includes(e))throw new Error(`'${e}' comparator not allowed to be used with ${typeof l}`);let a=this.getComparatorFunction(e);return c=>{let r=c.metadata[I];return r===void 0?!!n.includes(e):a(r,E3(l))}}else throw new Error("Comparator not allowed")}visitStructuredQuery(t){if(!t.filter)return{};let e=t.filter?.accept(this);if(typeof e!="function")throw new Error("Structured query filter is not a function");return{filter:e}}mergeFilters(t,e,I="and"){if(!(zb(t)&&zb(e))){if(zb(t)||I==="replace")return zb(e)?void 0:e;if(zb(e))return I==="and"?void 0:t;if(I==="and")return l=>t(l)&&e(l);if(I==="or")return l=>t(l)||e(l);throw new Error("Unknown merge type")}}}});var jpt,Upt=g(()=>{o();Ct();cse();rse();_1e();xpt();jpt=ve({BaseTranslator:()=>ZK,BasicTranslator:()=>Lpt,Comparators:()=>Xl,Comparison:()=>Ept,Expression:()=>nse,FilterDirective:()=>ase,FunctionalTranslator:()=>kpt,Operation:()=>Jpt,Operators:()=>c0,StructuredQuery:()=>Cpt,Visitor:()=>lse,castValue:()=>E3,isBoolean:()=>T1e,isFilterEmpty:()=>zb,isFloat:()=>M1e,isInt:()=>B1e,isObject:()=>z1e,isString:()=>S1e})});function pK(t){return Ml.isInstance(t)?t.constructor.name||t.type:typeof t}function sse(t,e){return function(I,l){let{isNot:n,utils:a}=this;if(!e(I))return{pass:!1,message:()=>`${a.matcherHint(`toBe${t}`,void 0,void 0)} + +Expected: ${n?"not ":""}${t} +Received: ${pK(I)}`,actual:pK(I),expected:t};if(l===void 0)return{pass:!0,message:()=>`${a.matcherHint(`toBe${t}`,void 0,void 0)} + +Expected: not ${t} +Received: ${t}`};let c=I;return typeof l=="string"?{pass:c.content===l,message:()=>`${a.matcherHint(`toBe${t}`,void 0,void 0)} + +Expected: ${t} with content ${a.printExpected(l)} +Received: ${t} with content ${a.printReceived(c.content)}`,actual:c.content,expected:l}:{pass:Object.entries(l).every(([r,s])=>this.equals(c[r],s)),message:()=>{let r={};for(let s of Object.keys(l))r[s]=c[s];return`${a.matcherHint(`toBe${t}`,void 0,void 0)} + +Expected: ${t} matching ${a.printExpected(l)} +Received: ${t} with ${a.printReceived(r)}`},actual:(()=>{let r={};for(let s of Object.keys(l))r[s]=c[s];return r})(),expected:l}}}function $1e(t,e){let{isNot:I,utils:l}=this;if(!He.isInstance(t))return{pass:!1,message:()=>`${l.matcherHint("toHaveToolCalls")} + +Expected: AIMessage +Received: ${pK(t)}`};let n=t.tool_calls??[];if(n.length!==e.length)return{pass:!1,message:()=>`${l.matcherHint("toHaveToolCalls")} + +Expected ${I?"not ":""}${e.length} tool call(s), received ${n.length}`,actual:n.length,expected:e.length};let a=e.filter(c=>!n.some(r=>Object.entries(c).every(([s,i])=>this.equals(r[s],i))));return a.length>0?{pass:!1,message:()=>`${l.matcherHint("toHaveToolCalls")} + +Could not find matching tool call(s) for: +${l.printExpected(a)} +Received tool calls: ${l.printReceived(n.map(c=>({name:c.name,id:c.id,args:c.args})))}`,actual:n.map(c=>({name:c.name,id:c.id,args:c.args})),expected:e}:{pass:!0,message:()=>`${l.matcherHint("toHaveToolCalls")} + +Expected AIMessage not to have matching tool calls`}}function eJe(t,e){let{isNot:I,utils:l}=this;if(!He.isInstance(t))return{pass:!1,message:()=>`${l.matcherHint("toHaveToolCallCount")} + +Expected: AIMessage +Received: ${pK(t)}`};let n=t.tool_calls?.length??0;return{pass:n===e,message:()=>`${l.matcherHint("toHaveToolCallCount")} + +Expected ${I?"not ":""}${e} tool call(s) +Received: ${n}`,actual:n,expected:e}}function tJe(t,e){let{isNot:I,utils:l}=this;if(!He.isInstance(t))return{pass:!1,message:()=>`${l.matcherHint("toContainToolCall")} + +Expected: AIMessage +Received: ${pK(t)}`};let n=t.tool_calls??[];return{pass:n.some(a=>Object.entries(e).every(([c,r])=>this.equals(a[c],r))),message:()=>`${l.matcherHint("toContainToolCall")} + +Expected AIMessage ${I?"not ":""}to contain a tool call matching ${l.printExpected(e)} +Received tool calls: ${l.printReceived(n.map(a=>({name:a.name,id:a.id})))}`,actual:n.map(a=>({name:a.name,id:a.id})),expected:e}}function IJe(t,e){let{isNot:I,utils:l}=this;if(!Array.isArray(t))return{pass:!1,message:()=>`${l.matcherHint("toHaveToolMessages")} + +Expected an array of messages +Received: ${typeof t}`};let n=t.filter(pt.isInstance);if(n.length!==e.length)return{pass:!1,message:()=>`${l.matcherHint("toHaveToolMessages")} + +Expected ${I?"not ":""}${e.length} tool message(s), found ${n.length}`,actual:n.length,expected:e.length};for(let a=0;athis.equals(n[a][c],r)))return{pass:!1,message:()=>{let c={};for(let r of Object.keys(e[a]))c[r]=n[a][r];return`${l.matcherHint("toHaveToolMessages")} + +Tool message at index ${a} did not match: +Expected: ${l.printExpected(e[a])} +Received: ${l.printReceived(c)}`},actual:n[a],expected:e[a]};return{pass:!0,message:()=>`${l.matcherHint("toHaveToolMessages")} + +Expected messages not to contain matching tool messages`}}function lJe(t,e){let{isNot:I,utils:l}=this,n=t?.__interrupt__;if(!(Array.isArray(n)&&n.length>0))return{pass:!1,message:()=>`${l.matcherHint("toHaveBeenInterrupted")} + +Expected result ${I?"not ":""}to have been interrupted +Received __interrupt__: ${l.printReceived(n)}`};if(e===void 0)return{pass:!0,message:()=>`${l.matcherHint("toHaveBeenInterrupted")} + +Expected result not to have been interrupted +Received ${n.length} interrupt(s)`};let a=n[0]?.value;return{pass:this.equals(a,e),message:()=>`${l.matcherHint("toHaveBeenInterrupted")} + +Expected interrupt value: ${l.printExpected(e)} +Received interrupt value: ${l.printReceived(a)}`,actual:a,expected:e}}function nJe(t,e){let{isNot:I,utils:l}=this,n=t?.structuredResponse;return n===void 0?{pass:!1,message:()=>`${l.matcherHint("toHaveStructuredResponse")} + +Expected result ${I?"not ":""}to have a structured response +Received structuredResponse: undefined`}:e===void 0?{pass:!0,message:()=>`${l.matcherHint("toHaveStructuredResponse")} + +Expected result not to have a structured response`}:{pass:Object.entries(e).every(([a,c])=>this.equals(n[a],c)),message:()=>`${l.matcherHint("toHaveStructuredResponse")} + +Expected structured response: ${l.printExpected(e)} +Received structured response: ${l.printReceived(n)}`,actual:n,expected:e}}var K1e,D1e,q1e,P1e,VC,Opt=g(()=>{o();Wo();YH();tG();EA();Gx();NI();K1e=sse("HumanMessage",ZI.isInstance),D1e=sse("AIMessage",He.isInstance),q1e=sse("SystemMessage",Gl.isInstance),P1e=sse("ToolMessage",pt.isInstance);VC={toBeHumanMessage:K1e,toBeAIMessage:D1e,toBeSystemMessage:q1e,toBeToolMessage:P1e,toHaveToolCalls:$1e,toHaveToolCallCount:eJe,toContainToolCall:tJe,toHaveToolMessages:IJe,toHaveBeenInterrupted:lJe,toHaveStructuredResponse:nJe}});function KzI(t){return t.map(e=>e.text).filter(Boolean).join("-")}function DzI(){return zpt+=1,`fake_tc_${zpt}`}function YC(){return new aJe}var zpt,aJe,Mpt=g(()=>{o();Wo();tG();es();NI();l0();zpt=0;aJe=class Bpt extends yr{queue=[];_alwaysThrowError;_structuredResponseValue;_tools=[];_callIndex=0;_calls=[];get calls(){return this._calls}get callCount(){return this._calls.length}constructor(){super({})}_llmType(){return"fake-model-builder"}_combineLLMOutput(){return[]}respond(e){return typeof e=="function"?this.queue.push({kind:"factory",factory:e}):Ml.isInstance(e)?this.queue.push({kind:"message",message:e}):this.queue.push({kind:"error",error:e}),this}respondWithTools(e){return this.queue.push({kind:"toolCalls",toolCalls:e.map(I=>({name:I.name,args:I.args,id:I.id??DzI(),type:"tool_call"}))}),this}alwaysThrow(e){return this._alwaysThrowError=e,this}structuredResponse(e){return this._structuredResponseValue=e,this}bindTools(e){let I=[...this._tools,...e],l=new Bpt;return l.queue=this.queue,l._alwaysThrowError=this._alwaysThrowError,l._structuredResponseValue=this._structuredResponseValue,l._tools=I,l._calls=this._calls,l._callIndex=this._callIndex,l.withConfig({})}withStructuredOutput(e,I){let{_structuredResponseValue:l}=this;return sr.from(async()=>l)}async _generate(e,I,l){this._calls.push({messages:[...e],options:I});let n=this._callIndex;if(this._callIndex+=1,this._alwaysThrowError)throw this._alwaysThrowError;let a=this.queue[n];if(!a)throw new Error(`FakeModel: no response queued for invocation ${n} (${this.queue.length} total queued).`);if(a.kind==="error")throw a.error;if(a.kind==="factory"){let r=a.factory(e);if(!Ml.isInstance(r))throw r;return{generations:[{text:"",message:r}]}}if(a.kind==="message")return{generations:[{text:"",message:a.message}]};let c=KzI(e);return{generations:[{text:c,message:new He({content:c,id:n.toString(),tool_calls:a.toolCalls.length>0?a.toolCalls.map(r=>({...r,type:"tool_call"})):void 0})}],llmOutput:{}}}}});var Spt,ose=g(()=>{o();Ct();Opt();Mpt();Spt=ve({FakeBuiltModel:()=>aJe,fakeModel:()=>YC,langchainMatchers:()=>VC,toBeAIMessage:()=>D1e,toBeHumanMessage:()=>K1e,toBeSystemMessage:()=>q1e,toBeToolMessage:()=>P1e,toContainToolCall:()=>tJe,toHaveBeenInterrupted:()=>lJe,toHaveStructuredResponse:()=>nJe,toHaveToolCallCount:()=>eJe,toHaveToolCalls:()=>$1e,toHaveToolMessages:()=>IJe})});var Tpt,qzI,_pt=g(()=>{o();Ct();BR();Tpt=ve({RunCollectorCallbackHandler:()=>qzI}),qzI=class extends Ni{name="run_collector";exampleId;tracedRuns;constructor({exampleId:t}={}){super({_awaitHandler:!0}),this.exampleId=t,this.tracedRuns=[]}async persistRun(t){let e={...t};e.reference_example_id=this.exampleId,this.tracedRuns.push(e)}}});var Kpt,Dpt=g(()=>{o();Ct();Kpt=ve({})});var qpt,Op,RC=g(()=>{o();Ct();qpt=ve({chunkArray:()=>Op}),Op=(t,e)=>t.reduce((I,l,n)=>{let a=Math.floor(n/e);return I[a]=(I[a]||[]).concat([l]),I},[])});function J3(t,...e){let I=t.raw,l="";for(let n=0;nl[0]===" "||l[0]===" "?l.slice(I):l).join(` +`)}var Ppt,ise=g(()=>{o();Ct();Ppt=ve({context:()=>J3})});async function eht(t,e){if(t instanceof ReadableStream){let I=t.getReader();for(;;){let l=await I.read();if(l.done){e(new Uint8Array,!0);break}e(l.value)}}else try{for await(let I of t)e(new Uint8Array(I));e(new Uint8Array,!0)}catch(I){throw new Error(["Parsing event source stream failed.","Ensure your implementation of fetch returns a web or Node readable stream.",`Error: ${I.message}`].join(` +`))}}function tht(t){let e,I,l,n=!1;return function(c,r){if(r){t(c,0,!0);return}e===void 0?(e=c,I=0,l=-1):e=tBI(e,c);let s=e.length,i=0;for(;I0){let i=n.decode(c.subarray(0,r)),G=r+(c[r+1]===C3.Space?2:1),d=n.decode(c.subarray(G));switch(i){case"data":l.data=l.data?l.data+` +`+d:d;break;case"event":l.event=d;break;case"id":e?.(l.id=d);break;case"retry":{let u=parseInt(d,10);Number.isNaN(u)||I?.(l.retry=u);break}}}}}function tBI(t,e){let I=new Uint8Array(t.length+e.length);return I.set(t),I.set(e,t.length),I}function cJe(){return{data:"",event:"",id:"",retry:void 0}}function IBI(t,e){let I=new ReadableStream({async start(l){let n=Iht(c=>{if(c.event==="error")throw new Error(c.data??"Unspecified event streaming error.");c.event==="metadata"?e?.(c):c.data&&l.enqueue(c.data)});await eht(t,tht((c,r,s)=>{n(c,r,s),s&&l.close()}))}});return nr.fromReadableStream(I)}function lBI(t){return t.data===""&&t.event===""&&t.id===""&&t.retry===void 0}var $pt,eBI,C3,lht=g(()=>{o();Ct();Lb();$pt=ve({EventStreamContentType:()=>eBI,convertEventStreamToIterableReadableDataStream:()=>IBI,getBytes:()=>eht,getLines:()=>tht,getMessages:()=>Iht}),eBI="text/event-stream";C3=function(t){return t[t.NewLine=10]="NewLine",t[t.CarriageReturn=13]="CarriageReturn",t[t.Space=32]="Space",t[t.Colon=58]="Colon",t}(C3||{})});var nht,aht=g(()=>{o();Ct();nht=ve({})});function rht(t,e){let I=typeof e=="number"?void 0:e;return{name:t.name,description:t.description,parameters:DI(t.schema),...I?.strict!==void 0?{strict:I.strict}:{}}}function aQ(t,e){let I=typeof e=="number"?void 0:e,l;return Ws(t)?l={type:"function",function:rht(t)}:l=t,I?.strict!==void 0&&(l.function.strict=I.strict),l}var cht,uF=g(()=>{o();Ct();aG();NEe();cht=ve({convertToOpenAIFunction:()=>rht,convertToOpenAITool:()=>aQ,isLangChainTool:()=>Ws,isRunnableToolLike:()=>__,isStructuredTool:()=>T_,isStructuredToolParams:()=>K_})});function Gse(t,e){let I=0,l=0,n=0;for(let a=0;a{o()});function sht(t,e){let I=0;for(let l=0;l{o()});function nBI(t,e){let I=0;for(let l=0;l{o()});function dse(t,e,I){if(t.length===0||t[0].length===0||e.length===0||e[0].length===0)return[[]];if(t[0].length!==e[0].length)throw new Error(`Number of columns in X and Y must be the same. X has shape ${[t.length,t[0].length]} and Y has shape ${[e.length,e[0].length]}.`);return t.map(l=>e.map(n=>I(l,n)).map(n=>Number.isNaN(n)?0:n))}function aBI(t,e=!1){let I=oBI(t);return t.map(l=>l.map(n=>e?1-n/I:n/I))}function sJe(t,e){return dse(t,e,Gse)}function cBI(t,e){return dse(t,e,sht)}function rBI(t,e){return dse(t,e,iht)}function sBI(t,e,I=.5,l=4){if(Math.min(l,e.length)<=0)return[];let n=sJe(Array.isArray(t[0])?t:[t],e)[0],a=uht(n).maxIndex,c=[e[a]],r=[a];for(;r.length{if(r.includes(u))return;let b=Math.max(...G[u]),Z=I*d-(1-I)*b;Z>s&&(s=Z,i=u)}),c.push(e[i]),r.push(i)}return r}function uht(t){if(t.length===0)return{maxIndex:-1,maxValue:NaN};let e=t[0],I=0;for(let l=1;le&&(I=l,e=t[l]);return{maxIndex:I,maxValue:e}}function oBI(t){return t.reduce((e,I)=>Math.max(e,uht(I).maxValue),0)}var dht,bht=g(()=>{o();Ct();rJe();oht();Ght();dht=ve({cosineSimilarity:()=>sJe,euclideanDistance:()=>rBI,innerProduct:()=>cBI,matrixFunc:()=>dse,maximalMarginalRelevance:()=>sBI,normalize:()=>aBI})});function Zht(t){return bBI.test(t)}function use(t){return Wht(t)!==null}function pht(t){return Zht(t)||use(t)}function hht(t){if(Zht(t))return t.split(".").map(e=>parseInt(e,10));if(use(t)){let e=Wht(t);if(!e)return null;let I=e.split(":"),l=[];for(let n of I)l.push(parseInt(n,16));return l}return null}function Wht(t){if(!t||typeof t!="string"||!t.includes(":")||!/^[0-9a-fA-F:]+$/.test(t))return null;let e=t;if(e.includes("::")){let l=e.split("::");if(l.length>2)return null;let[n,a]=l,c=n?n.split(":"):[],r=a?a.split(":"):[],s=8-(c.length+r.length);if(s<0)return null;let i=Array(s).fill("0");e=[...c,...i,...r].filter(G=>G!=="").join(":")}let I=e.split(":");if(I.length!==8)return null;for(let l of I)if(l.length===0||l.length>4||!/^[0-9a-fA-F]+$/.test(l))return null;return I.map(l=>l.padStart(4,"0").toLowerCase()).join(":")}function mBI(t){let[e,I]=t.split("/");if(!e||!I)return null;let l=hht(e);if(!l)return null;let n=parseInt(I,10);if(isNaN(n))return null;let a=use(e);return a&&n>128||!a&&n>32?null:{addr:l,prefixLen:n,isIpv6:a}}function ZBI(t,e){let I=hht(t);if(!I)return!1;let l=mBI(e);if(!l)return!1;let n=use(t);if(n!==l.isIpv6)return!1;let{addr:a,prefixLen:c}=l;if(n)for(let r=0;r{o();Ct();mht=ve({isCloudMetadata:()=>oJe,isLocalhost:()=>iJe,isPrivateIp:()=>Nht,isSafeUrl:()=>pBI,isSameOrigin:()=>hBI,validateSafeUrl:()=>Vht}),iBI=["10.0.0.0/8","172.16.0.0/12","192.168.0.0/16","127.0.0.0/8","169.254.0.0/16","0.0.0.0/8","::1/128","fc00::/7","fe80::/10","ff00::/8"],GBI=["169.254.169.254","169.254.170.2","100.100.100.200"],dBI=["metadata.google.internal","metadata","instance-data"],uBI=["localhost","localhost.localdomain"],bBI=/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/});var Rht,bse,mse,WBI,GJe=g(()=>{o();Ct();Jb();Ise();Rht=ve({SaveableVectorStore:()=>WBI,VectorStore:()=>mse,VectorStoreRetriever:()=>bse}),bse=class extends mK{static lc_name(){return"VectorStoreRetriever"}get lc_namespace(){return["langchain_core","vectorstores"]}vectorStore;k=4;searchType="similarity";searchKwargs;filter;_vectorstoreType(){return this.vectorStore._vectorstoreType()}constructor(t){super(t),this.vectorStore=t.vectorStore,this.k=t.k??this.k,this.searchType=t.searchType??this.searchType,this.filter=t.filter,t.searchType==="mmr"&&(this.searchKwargs=t.searchKwargs)}async _getRelevantDocuments(t,e){if(this.searchType==="mmr"){if(typeof this.vectorStore.maxMarginalRelevanceSearch!="function")throw new Error(`The vector store backing this retriever, ${this._vectorstoreType()} does not support max marginal relevance search.`);return this.vectorStore.maxMarginalRelevanceSearch(t,{k:this.k,filter:this.filter,...this.searchKwargs},e?.getChild("vectorstore"))}return this.vectorStore.similaritySearch(t,this.k,this.filter,e?.getChild("vectorstore"))}async addDocuments(t,e){return this.vectorStore.addDocuments(t,e)}},mse=class extends Xr{lc_namespace=["langchain","vectorstores",this._vectorstoreType()];embeddings;constructor(t,e){super(e),this.embeddings=t}async delete(t){throw new Error("Not implemented.")}async similaritySearch(t,e=4,I=void 0,l=void 0){return(await this.similaritySearchVectorWithScore(await this.embeddings.embedQuery(t),e,I)).map(n=>n[0])}async similaritySearchWithScore(t,e=4,I=void 0,l=void 0){return this.similaritySearchVectorWithScore(await this.embeddings.embedQuery(t),e,I)}static fromTexts(t,e,I,l){throw new Error("the Langchain vectorstore implementation you are using forgot to override this, please report a bug")}static fromDocuments(t,e,I){throw new Error("the Langchain vectorstore implementation you are using forgot to override this, please report a bug")}asRetriever(t,e,I,l,n,a){if(typeof t=="number")return new bse({vectorStore:this,k:t,filter:e,tags:[...l??[],this._vectorstoreType()],metadata:n,verbose:a,callbacks:I});{let c={vectorStore:this,k:t?.k,filter:t?.filter,tags:[...t?.tags??[],this._vectorstoreType()],metadata:t?.metadata,verbose:t?.verbose,callbacks:t?.callbacks,searchType:t?.searchType};return t?.searchType==="mmr"?new bse({...c,searchKwargs:t.searchKwargs}):new bse({...c})}}},WBI=class extends mse{static load(t,e){throw new Error("Not implemented")}}});var Aht,Fht,ght,yht=g(()=>{o();tG();Yo();aG();es();NI();l0();Aht=class extends yr{_combineLLMOutput(){return[]}_llmType(){return"fake"}async _generate(t,e,I){if(e?.stop?.length)return{generations:[{message:new He(e.stop[0]),text:e.stop[0]}]};let l=t.map(n=>typeof n.content=="string"?n.content:JSON.stringify(n.content,null,2)).join(` +`);return await I?.handleLLMNewToken(l),{generations:[{message:new He(l),text:l}],llmOutput:{}}}},Fht=class Xht extends yr{sleep=50;responses=[];chunks=[];toolStyle="openai";thrownErrorString;tools=[];constructor({sleep:e=50,responses:I=[],chunks:l=[],toolStyle:n="openai",thrownErrorString:a,...c}){super(c),this.sleep=e,this.responses=I,this.chunks=l,this.toolStyle=n,this.thrownErrorString=a}_llmType(){return"fake"}bindTools(e){let I=[...this.tools,...e],l=I.map(c=>{switch(this.toolStyle){case"openai":return{type:"function",function:{name:c.name,description:c.description,parameters:DI(c.schema)}};case"anthropic":return{name:c.name,description:c.description,input_schema:DI(c.schema)};case"bedrock":return{toolSpec:{name:c.name,description:c.description,inputSchema:DI(c.schema)}};case"google":return{name:c.name,description:c.description,parameters:DI(c.schema)};default:throw new Error(`Unsupported tool style: ${this.toolStyle}`)}}),n=this.toolStyle==="google"?[{functionDeclarations:l}]:l,a=new Xht({sleep:this.sleep,responses:this.responses,chunks:this.chunks,toolStyle:this.toolStyle,thrownErrorString:this.thrownErrorString});return a.tools=I,a.withConfig({tools:n})}async _generate(e,I,l){if(this.thrownErrorString)throw new Error(this.thrownErrorString);return{generations:[{text:"",message:new He({content:this.responses?.[0]?.content??e[0].content??"",tool_calls:this.chunks?.[0]?.tool_calls})}]}}async*_streamResponseChunks(e,I,l){if(this.thrownErrorString)throw new Error(this.thrownErrorString);if(this.chunks?.length){for(let c of this.chunks){let r=new Nc({message:new eI({content:c.content,tool_calls:c.tool_calls,additional_kwargs:c.additional_kwargs??{}}),text:c.content?.toString()??""});if(I.signal?.aborted)break;yield r,await l?.handleLLMNewToken(c.content,void 0,void 0,void 0,void 0,{chunk:r})}return}let n=this.responses?.[0]??new He(typeof e[0].content=="string"?e[0].content:""),a=typeof n.content=="string"?n.content:"";for(let c of a){await new Promise(s=>setTimeout(s,this.sleep));let r=new Nc({message:new eI({content:c}),text:c});if(I.signal?.aborted)break;yield r,await l?.handleLLMNewToken(c,void 0,void 0,void 0,void 0,{chunk:r})}}},ght=class vht extends yr{static lc_name(){return"FakeListChatModel"}lc_serializable=!0;responses;i=0;sleep;emitCustomEvent=!1;generationInfo;tools=[];toolStyle="openai";constructor(e){super(e);let{responses:I,sleep:l,emitCustomEvent:n,generationInfo:a}=e;this.responses=I,this.sleep=l,this.emitCustomEvent=n??this.emitCustomEvent,this.generationInfo=a}_combineLLMOutput(){return[]}_llmType(){return"fake-list"}async _generate(e,I,l){if(await this._sleepIfRequested(),I?.thrownErrorString)throw new Error(I.thrownErrorString);if(this.emitCustomEvent&&await l?.handleCustomEvent("some_test_event",{someval:!0}),I?.stop?.length)return{generations:[this._formatGeneration(I.stop[0])]};{let n=this._currentResponse();return this._incrementResponse(),{generations:[this._formatGeneration(n)],llmOutput:{}}}}_formatGeneration(e){return{message:new He(e),text:e}}async*_streamResponseChunks(e,I,l){let n=this._currentResponse();this._incrementResponse(),this.emitCustomEvent&&await l?.handleCustomEvent("some_test_event",{someval:!0});let a=[...n];for(let c=0;c{setTimeout(()=>e(),this.sleep)})}_createResponseChunk(e,I){return new Nc({message:new eI({content:e}),text:e,generationInfo:I})}_currentResponse(){return this.responses[this.i]}_incrementResponse(){this.i{switch(this.toolStyle){case"openai":return{type:"function",function:{name:c.name,description:c.description,parameters:DI(c.schema)}};case"anthropic":return{name:c.name,description:c.description,input_schema:DI(c.schema)};case"bedrock":return{toolSpec:{name:c.name,description:c.description,inputSchema:DI(c.schema)}};case"google":return{name:c.name,description:c.description,parameters:DI(c.schema)};default:throw new Error(`Unsupported tool style: ${this.toolStyle}`)}}),n=this.toolStyle==="google"?[{functionDeclarations:l}]:l,a=new vht({responses:this.responses,sleep:this.sleep,emitCustomEvent:this.emitCustomEvent,generationInfo:this.generationInfo});return a.tools=I,a.toolStyle=this.toolStyle,a.i=this.i,a.withConfig({tools:n})}withStructuredOutput(e,I){return sr.from(async l=>{let n=await this.invoke(l);if(n.tool_calls?.[0]?.args)return n.tool_calls[0].args;if(typeof n.content=="string")return JSON.parse(n.content);throw new Error("No structured output found")})}}});var wht,Hht,Qht=g(()=>{o();hC();wht=class extends Up{vectorSize;constructor(t){super(t??{}),this.vectorSize=t?.vectorSize??4}async embedDocuments(t){return Promise.all(t.map(e=>this.embedQuery(e)))}async embedQuery(t){let e=t;e=e.toLowerCase().replaceAll(/[^a-z ]/g,"");let I=e.length%this.vectorSize,l=I===0?0:this.vectorSize-I,n=e.length+l;e=e.padEnd(n," ");let a=e.length/this.vectorSize,c=[];for(let r=0;r{let s=0;for(let i=0;i[.1,.2,.3,.4]))}embedQuery(t){return Promise.resolve([.1,.2,.3,.4])}}});var fht,Eht,Jht=g(()=>{o();WC();fht=class extends dF{response;thrownErrorString;constructor(t){super(t),this.response=t.response,this.thrownErrorString=t.thrownErrorString}_llmType(){return"fake"}async _call(t,e,I){if(this.thrownErrorString)throw new Error(this.thrownErrorString);let l=this.response??t;return await I?.handleLLMNewToken(l),l}},Eht=class extends dF{sleep=50;responses;thrownErrorString;constructor(t){super(t),this.sleep=t.sleep??this.sleep,this.responses=t.responses,this.thrownErrorString=t.thrownErrorString}_llmType(){return"fake"}async _call(t){if(this.thrownErrorString)throw new Error(this.thrownErrorString);let e=this.responses?.[0];return this.responses=this.responses?.slice(1),e??t}async*_streamResponseChunks(t,e,I){if(this.thrownErrorString)throw new Error(this.thrownErrorString);let l=this.responses?.[0];this.responses=this.responses?.slice(1);for(let n of l??t)await new Promise(a=>setTimeout(a,this.sleep)),yield{text:n,generationInfo:{}},await I?.handleLLMNewToken(n)}}});var Cht,Lht,kht,xht=g(()=>{o();tG();EA();BR();NI();w1e();Cht=class extends y1e{lc_namespace=["langchain_core","message","fake"];messages=[];constructor(){super()}async getMessages(){return this.messages}async addMessage(t){this.messages.push(t)}async addUserMessage(t){this.messages.push(new ZI(t))}async addAIMessage(t){this.messages.push(new He(t))}async clear(){this.messages=[]}},Lht=class extends $re{lc_namespace=["langchain_core","message","fake"];messages=[];constructor(){super()}async addMessage(t){this.messages.push(t)}async getMessages(){return this.messages}},kht=class extends Ni{name="fake_tracer";runs=[];constructor(){super()}persistRun(t){return this.runs.push(t),Promise.resolve()}}});var jht,Uht=g(()=>{o();xX();jht=class extends t0{lc_namespace=["tests","fake"];getFormatInstructions(){return""}async parse(t){return t.split(",").map(e=>e.trim())}}});var Oht,zht=g(()=>{o();w3();Ise();Oht=class extends mK{lc_namespace=["test","fake"];output=[new Hr({pageContent:"foo"}),new Hr({pageContent:"bar"})];constructor(t){super(),this.output=t?.output??this.output}async _getRelevantDocuments(t){return this.output}}});var Bht,Mht=g(()=>{o();es();Bht=class extends tI{lc_namespace=["tests","fake"];returnOptions;constructor(t){super(t),this.returnOptions=t.returnOptions}async invoke(t,e){return this.returnOptions?e??{}:{input:t}}}});var Sht,Tht=g(()=>{o();Ns();Sht=class extends cF{name;description;schema;constructor(t){super(t),this.name=t.name,this.description=t.description,this.schema=t.schema}async _call(t,e){return JSON.stringify(t)}}});var _ht,Kht=g(()=>{o();BR();_ht=class extends Ni{runPromiseResolver;runPromise;name="single_run_extractor";constructor(){super(),this.runPromise=new Promise(t=>{this.runPromiseResolver=t})}async persistRun(t){this.runPromiseResolver(t)}async extract(){return this.runPromise}}});var Dht,Pht=g(()=>{o();w3();rJe();GJe();Dht=class qht extends mse{memoryVectors=[];similarity;_vectorstoreType(){return"memory"}constructor(e,{similarity:I,...l}={}){super(e,l),this.similarity=I??Gse}async addDocuments(e){let I=e.map(({pageContent:l})=>l);return this.addVectors(await this.embeddings.embedDocuments(I),e)}async addVectors(e,I){let l=e.map((n,a)=>({content:I[a].pageContent,embedding:n,metadata:I[a].metadata}));this.memoryVectors=this.memoryVectors.concat(l)}async similaritySearchVectorWithScore(e,I,l){let n=c=>l?l(new Hr({metadata:c.metadata,pageContent:c.content})):!0,a=this.memoryVectors.filter(n);return a.map((c,r)=>({similarity:this.similarity(e,c.embedding),index:r})).sort((c,r)=>c.similarity>r.similarity?-1:0).slice(0,I).map(c=>[new Hr({metadata:a[c.index].metadata,pageContent:a[c.index].content}),c.similarity])}static async fromTexts(e,I,l,n){let a=[];for(let c=0;c{o();Ct();yht();Qht();Jht();xht();Uht();zht();Mht();Tht();Kht();Pht();$ht=ve({FakeChatMessageHistory:()=>Cht,FakeChatModel:()=>Aht,FakeEmbeddings:()=>Hht,FakeLLM:()=>fht,FakeListChatMessageHistory:()=>Lht,FakeListChatModel:()=>ght,FakeRetriever:()=>Oht,FakeRunnable:()=>Bht,FakeSplitIntoListParser:()=>jht,FakeStreamingChatModel:()=>Fht,FakeStreamingLLM:()=>Eht,FakeTool:()=>Sht,FakeTracer:()=>kht,FakeVectorStore:()=>Dht,SingleRunExtractor:()=>_ht,SyntheticEmbeddings:()=>wht})});var tWt,IWt=g(()=>{o();Ct();BZt();SZt();O_();hX();Jb();YH();oEe();UR();ca();yH();BR();Nve();yve();Hve();RX();Bu();Lb();jve();Yo();JH();wp();aG();lce();NI();w1e();H3();Q1e();$Zt();hC();upt();hpt();PJ();nre();sZ();Xc();B_();m3();Wa();tQ();l0();WC();Vpt();Apt();vpt();bK();X_();Hpt();Ise();NC();Upt();ose();Ns();_pt();Dpt();RC();ise();lht();aht();uF();bht();Yht();GJe();eWt();tWt=ve({agents:()=>MZt,caches:()=>Lbt,callbacks__base:()=>Uat,callbacks__manager:()=>ist,callbacks__promises:()=>ast,chat_history:()=>TZt,document_loaders__base:()=>qZt,document_loaders__langsmith:()=>PZt,documents:()=>DZt,embeddings:()=>ept,errors:()=>eat,example_selectors:()=>dpt,index:()=>zZt,indexing:()=>ppt,language_models__base:()=>Mbt,language_models__chat_models:()=>pmt,language_models__llms:()=>Wpt,language_models__profile:()=>Npt,language_models__structured_output:()=>Zmt,load__serializable:()=>MXe,memory:()=>Ypt,messages:()=>hdt,messages__tool:()=>Fnt,output_parsers:()=>bmt,output_parsers__openai_functions:()=>gpt,output_parsers__openai_tools:()=>ypt,outputs:()=>gst,prompt_values:()=>Wdt,prompts:()=>Jdt,retrievers:()=>Qpt,retrievers__document_compressors:()=>wpt,runnables:()=>qbt,runnables__graph:()=>_Gt,singletons:()=>Zst,stores:()=>fpt,structured_query:()=>jpt,testing:()=>Spt,tools:()=>mZt,tracers__base:()=>Trt,tracers__console:()=>$rt,tracers__log_stream:()=>Xst,tracers__run_collector:()=>Tpt,tracers__tracer_langchain:()=>lst,types__stream:()=>Kpt,utils__async_caller:()=>Cst,utils__chunk_array:()=>qpt,utils__context:()=>Ppt,utils__env:()=>Cat,utils__event_source_parse:()=>$pt,utils__format:()=>nht,utils__function_calling:()=>cht,utils__hash:()=>Cbt,utils__json_patch:()=>Pbt,utils__json_schema:()=>MGt,utils__math:()=>dht,utils__ssrf:()=>mht,utils__standard_schema:()=>CGt,utils__stream:()=>pst,utils__testing:()=>$ht,utils__tiktoken:()=>Bbt,utils__types:()=>mmt,utils__uuid:()=>fat,vectorstores:()=>Rht})});function VBI(t){let e={};for(let I=t;I&&I.prototype;I=Object.getPrototypeOf(I))Object.assign(e,Reflect.get(I.prototype,"lc_aliases"));return Object.entries(e).reduce((I,[l,n])=>(I[n]=l,I),{})}async function Zse(t){let{optionalImportsMap:e,optionalImportEntrypoints:I,importMap:l,secretsMap:n,secretsFromEnv:a,path:c,depth:r,maxDepth:s}=this,i=c.join(".");if(r>s)throw new Error(`Maximum recursion depth (${s}) exceeded during deserialization. This may indicate a malicious payload or you may need to increase maxDepth.`);if(typeof t!="object"||t==null)return t;if(Array.isArray(t))return Promise.all(t.map((u,b)=>Zse.call({...this,path:[...c,`${b}`],depth:r+1},u)));let G=t;if(zXe(G))return Xle(G);if("lc"in G&&"type"in G&&"id"in G&&G.lc===1&&G.type==="secret"){let[u]=G.id;if(u in n)return n[u];if(a){let b=gt(u);if(b)return b}throw new Error(`Missing secret "${u}" at ${i}`)}if("lc"in G&&"type"in G&&"id"in G&&G.lc===1&&G.type==="not_implemented"){let u=JSON.stringify(G);throw new Error(`Trying to load an object that doesn't implement serialization: ${i} -> ${u}`)}if("lc"in G&&"type"in G&&"id"in G&&"kwargs"in G&&G.lc===1&&G.type==="constructor"){let u=G,b=JSON.stringify(u),[Z,...p]=u.id.slice().reverse(),W=p.reverse(),h={langchain_core:tWt,langchain:l},N=null,V=[W.join("/")];W[0]==="langchain_community"&&V.push(["langchain",...W.slice(1)].join("/"));let R=V.find(y=>y in e);if(UZt.concat(I).includes(W.join("/"))||R)if(R!==void 0)N=await e[R];else throw new Error(`Missing key "${W.join("/")}" for ${i} in load(optionalImportsMap={})`);else{let y;if(W[0]==="langchain"||W[0]==="langchain_core")y=h[W[0]],W.shift();else throw new Error(`Invalid namespace: ${i} -> ${b}`);if(W.length===0)throw new Error(`Invalid namespace: ${i} -> ${b}`);let w;do{if(w=W.join("__"),w in y)break;W.pop()}while(W.length>0);w in y&&(N=y[w])}if(typeof N!="object"||N===null)throw new Error(`Invalid namespace: ${i} -> ${b}`);let F=N[Z]??Object.values(N).find(y=>typeof y=="function"&&aJ(y)===Z);if(typeof F!="function")throw new Error(`Invalid identifer: ${i} -> ${b}`);let v=new F(Ale(await Zse.call({...this,path:[...c,"kwargs"],depth:r+1},u.kwargs),nnt,VBI(F)));return Object.defineProperty(v.constructor,"name",{value:Z}),v}let d={};for(let[u,b]of Object.entries(G))d[u]=await Zse.call({...this,path:[...c,u],depth:r+1},b);return d}async function pse(t,e){let I=JSON.parse(t),l={optionalImportsMap:e?.optionalImportsMap??{},optionalImportEntrypoints:e?.optionalImportEntrypoints??[],secretsMap:e?.secretsMap??{},secretsFromEnv:e?.secretsFromEnv??!1,importMap:e?.importMap??{},path:["$"],depth:0,maxDepth:e?.maxDepth??NBI};return Zse.call(l,I)}var NBI,dJe=g(()=>{o();OXe();BXe();Jb();ca();OZt();IWt();NBI=50});function YBI(t){return t!==null&&t.lc===1&&t.type==="constructor"&&Array.isArray(t.id)}async function uJe(t){if(t&&typeof t=="object"){if(Array.isArray(t))return await Promise.all(t.map(e=>uJe(e)));{let e={};for(let[I,l]of Object.entries(t))e[I]=await uJe(l);if(e.lc===2&&e.type==="undefined")return;if(e.lc===2&&e.type==="constructor"&&Array.isArray(e.id))try{let I=e.id[e.id.length-1],l;switch(I){case"Set":l=Set;break;case"Map":l=Map;break;case"RegExp":l=RegExp;break;case"Error":l=Error;break;case"Uint8Array":l=Uint8Array;break;default:return e}return e.method?l[e.method](...e.args||[]):new l(...e.args||[])}catch{return e}else if(YBI(e))return pse(JSON.stringify(e));return e}}return t}function hse(t,e,I,l){return{lc:2,type:"constructor",id:[t.name],method:e??null,args:I??[],kwargs:l??{}}}function RBI(t){return t===void 0?{lc:2,type:"undefined"}:t instanceof Set||t instanceof Map?hse(t.constructor,void 0,[Array.from(t)]):t instanceof RegExp?hse(RegExp,void 0,[t.source,t.flags]):t instanceof Error?hse(t.constructor,void 0,[t.message]):t?.lg_name==="Send"?{node:t.node,args:t.args}:t instanceof Uint8Array?hse(Uint8Array,"from",[Array.from(t)]):t}var Wse,bJe=g(()=>{o();jZt();dJe();Wse=class{_dumps(t){return new TextEncoder().encode(xZt(t,(e,I)=>RBI(I)))}async dumpsTyped(t){return t instanceof Uint8Array?["bytes",t]:["json",this._dumps(t)]}async _loads(t){return uJe(JSON.parse(t))}async loadsTyped(t,e){if(t==="bytes")return typeof e=="string"?new TextEncoder().encode(e):e;if(t==="json")return this._loads(typeof e=="string"?e:new TextDecoder().decode(e));throw new Error(`Unknown serialization type: ${t}`)}}});function mJe(t){if(typeof t!="object"||t===null)return t;let e=Array.isArray(t)?[]:{};for(let I in t)Object.prototype.hasOwnProperty.call(t,I)&&(e[I]=mJe(t[I]));return e}function AC(){return{v:4,id:oK(-2),ts:new Date().toISOString(),channel_values:{},channel_versions:{},versions_seen:{}}}function zp(t){return{v:t.v,id:t.id,ts:t.ts,channel_values:{...t.channel_values},channel_versions:{...t.channel_versions},versions_seen:mJe(t.versions_seen)}}function Nse(t,e){return typeof t=="number"&&typeof e=="number"?Math.sign(t-e):String(t).localeCompare(String(e))}function WK(...t){return t.reduce((e,I,l)=>l===0?I:Nse(e,I)>=0?e:I)}function ZJe(t){return t.configurable?.checkpoint_id||t.configurable?.thread_ts||""}var hK,NK,pJe=g(()=>{o();R1e();qre();bJe();hK=class{serde=new Wse;constructor(t){this.serde=t||this.serde}async get(t){let e=await this.getTuple(t);return e?e.checkpoint:void 0}getNextVersion(t){if(typeof t=="string")throw new Error("Please override this method to use string versions.");return t!==void 0&&typeof t=="number"?t+1:1}};NK={[A1e]:-1,[pC]:-2,[F1e]:-3,[X1e]:-4}});function VK(t,e,I){return JSON.stringify([t,e,I])}function ABI(t){let[e,I,l]=JSON.parse(t);return{threadId:e,checkpointNamespace:I,checkpointId:l}}var hJe,lWt=g(()=>{o();qre();pJe();hJe=class extends hK{storage={};writes={};constructor(t){super(t)}async _migratePendingSends(t,e,I,l){let n=t,a=VK(e,I,l),c=await Promise.all(Object.values(this.writes[a]??{}).filter(([r,s])=>s===iK).map(async([r,s,i])=>await this.serde.loadsTyped("json",i)));n.channel_values??={},n.channel_values[iK]=c,n.channel_versions??={},n.channel_versions[iK]=Object.keys(n.channel_versions).length>0?WK(...Object.values(n.channel_versions)):this.getNextVersion(void 0)}async getTuple(t){let e=t.configurable?.thread_id,I=t.configurable?.checkpoint_ns??"",l=ZJe(t);if(l){let n=this.storage[e]?.[I]?.[l];if(n!==void 0){let[a,c,r]=n,s=VK(e,I,l),i=await this.serde.loadsTyped("json",a);i.v<4&&r!==void 0&&await this._migratePendingSends(i,e,I,r);let G=await Promise.all(Object.values(this.writes[s]||{}).map(async([u,b,Z])=>[u,b,await this.serde.loadsTyped("json",Z)])),d={config:t,checkpoint:i,metadata:await this.serde.loadsTyped("json",c),pendingWrites:G};return r!==void 0&&(d.parentConfig={configurable:{thread_id:e,checkpoint_ns:I,checkpoint_id:r}}),d}}else{let n=this.storage[e]?.[I];if(n!==void 0){l=Object.keys(n).sort((u,b)=>b.localeCompare(u))[0];let[a,c,r]=n[l],s=VK(e,I,l),i=await this.serde.loadsTyped("json",a);i.v<4&&r!==void 0&&await this._migratePendingSends(i,e,I,r);let G=await Promise.all(Object.values(this.writes[s]||{}).map(async([u,b,Z])=>[u,b,await this.serde.loadsTyped("json",Z)])),d={config:{configurable:{thread_id:e,checkpoint_id:l,checkpoint_ns:I}},checkpoint:i,metadata:await this.serde.loadsTyped("json",c),pendingWrites:G};return r!==void 0&&(d.parentConfig={configurable:{thread_id:e,checkpoint_ns:I,checkpoint_id:r}}),d}}}async*list(t,e){let{before:I,limit:l,filter:n}=e??{},a=t.configurable?.thread_id?[t.configurable?.thread_id]:Object.keys(this.storage),c=t.configurable?.checkpoint_ns,r=t.configurable?.checkpoint_id;for(let s of a)for(let i of Object.keys(this.storage[s]??{})){if(c!==void 0&&i!==c)continue;let G=this.storage[s]?.[i]??{},d=Object.entries(G).sort((u,b)=>b[0].localeCompare(u[0]));for(let[u,[b,Z,p]]of d){if(r&&u!==r||I&&I.configurable?.checkpoint_id&&u>=I.configurable.checkpoint_id)continue;let W=await this.serde.loadsTyped("json",Z);if(n&&!Object.entries(n).every(([v,y])=>W[v]===y))continue;if(l!==void 0){if(l<=0)break;l-=1}let h=VK(s,i,u),N=Object.values(this.writes[h]||{}),V=await Promise.all(N.map(async([v,y,w])=>[v,y,await this.serde.loadsTyped("json",w)])),R=await this.serde.loadsTyped("json",b);R.v<4&&p!==void 0&&await this._migratePendingSends(R,s,i,p);let F={config:{configurable:{thread_id:s,checkpoint_ns:i,checkpoint_id:u}},checkpoint:R,metadata:W,pendingWrites:V};p!==void 0&&(F.parentConfig={configurable:{thread_id:s,checkpoint_ns:i,checkpoint_id:p}}),yield F}}}async put(t,e,I){let l=zp(e),n=t.configurable?.thread_id,a=t.configurable?.checkpoint_ns??"";if(n===void 0)throw new Error('Failed to put checkpoint. The passed RunnableConfig is missing a required "thread_id" field in its "configurable" property.');this.storage[n]||(this.storage[n]={}),this.storage[n][a]||(this.storage[n][a]={});let[[,c],[,r]]=await Promise.all([this.serde.dumpsTyped(l),this.serde.dumpsTyped(I)]);return this.storage[n][a][e.id]=[c,r,t.configurable?.checkpoint_id],{configurable:{thread_id:n,checkpoint_ns:a,checkpoint_id:e.id}}}async putWrites(t,e,I){let l=t.configurable?.thread_id,n=t.configurable?.checkpoint_ns,a=t.configurable?.checkpoint_id;if(l===void 0)throw new Error('Failed to put writes. The passed RunnableConfig is missing a required "thread_id" field in its "configurable" property');if(a===void 0)throw new Error('Failed to put writes. The passed RunnableConfig is missing a required "checkpoint_id" field in its "configurable" property.');let c=VK(l,n,a),r=this.writes[c];this.writes[c]===void 0&&(this.writes[c]={}),await Promise.all(e.map(async([s,i],G)=>{let[,d]=await this.serde.dumpsTyped(i),u=[I,NK[s]||G],b=`${u[0]},${u[1]}`;u[1]>=0&&r&&b in r||(this.writes[c][b]=[I,s,d])}))}async deleteThread(t){delete this.storage[t];for(let e of Object.keys(this.writes))ABI(e).threadId===t&&delete this.writes[e]}}});function FBI(t){if(t.length===0)throw new L3("Namespace cannot be empty.");for(let e of t){if(typeof e!="string")throw new L3(`Invalid namespace label '${e}' found in ${t}. Namespace labels must be strings, but got ${typeof e}.`);if(e.includes("."))throw new L3(`Invalid namespace label '${e}' found in ${t}. Namespace labels cannot contain periods ('.').`);if(e==="")throw new L3(`Namespace labels cannot be empty strings. Got ${e} in ${t}`)}if(t[0]==="langgraph")throw new L3(`Root label for namespace cannot be "langgraph". Got: ${t}`)}var L3,FC,Vse=g(()=>{o();L3=class extends Error{constructor(t){super(t),this.name="InvalidNamespaceError"}};FC=class{async get(t,e){return(await this.batch([{namespace:t,key:e}]))[0]}async search(t,e={}){let{filter:I,limit:l=10,offset:n=0,query:a}=e;return(await this.batch([{namespacePrefix:t,filter:I,limit:l,offset:n,query:a}]))[0]}async put(t,e,I,l){FBI(t),await this.batch([{namespace:t,key:e,value:I,index:l}])}async delete(t,e){await this.batch([{namespace:t,key:e,value:null}])}async listNamespaces(t={}){let{prefix:e,suffix:I,maxDepth:l,limit:n=100,offset:a=0}=t,c=[];return e&&c.push({matchType:"prefix",path:e}),I&&c.push({matchType:"suffix",path:I}),(await this.batch([{matchConditions:c.length?c:void 0,maxDepth:l,limit:n,offset:a}]))[0]}start(){}stop(){}}});var XBI,YK,nWt=g(()=>{o();Vse();XBI=t=>"lg_name"in t&&t.lg_name==="AsyncBatchedStore"?t.store:t,YK=class extends FC{lg_name="AsyncBatchedStore";store;queue=new Map;nextKey=0;running=!1;processingTask=null;constructor(t){super(),this.store=XBI(t)}get isRunning(){return this.running}async batch(t){throw new Error("The `batch` method is not implemented on `AsyncBatchedStore`.\n Instead, it calls the `batch` method on the wrapped store.\n If you are seeing this error, something is wrong.")}async get(t,e){return this.enqueueOperation({namespace:t,key:e})}async search(t,e){let{filter:I,limit:l=10,offset:n=0,query:a}=e||{};return this.enqueueOperation({namespacePrefix:t,filter:I,limit:l,offset:n,query:a})}async put(t,e,I){return this.enqueueOperation({namespace:t,key:e,value:I})}async delete(t,e){return this.enqueueOperation({namespace:t,key:e,value:null})}start(){this.running||(this.running=!0,this.processingTask=this.processBatchQueue())}async stop(){this.running=!1,this.processingTask&&await this.processingTask}enqueueOperation(t){return new Promise((e,I)=>{let l=this.nextKey;this.nextKey+=1,this.queue.set(l,{operation:t,resolve:e,reject:I})})}async processBatchQueue(){for(;this.running;){if(await new Promise(e=>{setTimeout(e,0)}),this.queue.size===0)continue;let t=new Map(this.queue);this.queue.clear();try{let e=Array.from(t.values()).map(({operation:l})=>l),I=await this.store.batch(e);t.forEach(({resolve:l},n)=>{l(I[Array.from(t.keys()).indexOf(n)])})}catch(e){t.forEach(({reject:I})=>{I(e)})}}}toJSON(){return{queue:this.queue,nextKey:this.nextKey,running:this.running,store:"[LangGraphStore]"}}}});function RK(t){if(!t)return[];let e=[],I=[],l=0;for(;l0;)t[l]==="["?a+=1:t[l]==="]"&&(a-=1),c.push(t[l]),l+=1;e.push(c.join(""));continue}else if(n==="{"){I.length&&(e.push(I.join("")),I=[]);let a=1,c=["{"];for(l+=1;l0;)t[l]==="{"?a+=1:t[l]==="}"&&(a-=1),c.push(t[l]),l+=1;e.push(c.join(""));continue}else n==="."?I.length&&(e.push(I.join("")),I=[]):I.push(n);l+=1}return I.length&&e.push(I.join("")),e}function gBI(t){return typeof t=="object"&&t!==null&&Object.keys(t).every(e=>e==="$eq"||e==="$ne"||e==="$gt"||e==="$gte"||e==="$lt"||e==="$lte"||e==="$in"||e==="$nin")}function aWt(t,e){return gBI(e)?Object.keys(e).filter(I=>I.startsWith("$")).every(I=>{let l=e[I];switch(I){case"$eq":return t===l;case"$ne":return t!==l;case"$gt":return Number(t)>Number(l);case"$gte":return Number(t)>=Number(l);case"$lt":return Number(t)=a.length)return typeof n=="string"||typeof n=="number"||typeof n=="boolean"?[String(n)]:n==null?[]:Array.isArray(n)||typeof n=="object"?[JSON.stringify(n,null,2)]:[];let r=a[c],s=[];if(c===0&&r==="$"&&s.push(JSON.stringify(n,null,2)),r.startsWith("[")&&r.endsWith("]")){if(!Array.isArray(n))return[];let i=r.slice(1,-1);if(i==="*")for(let G of n)s.push(...l(G,a,c+1));else try{let G=parseInt(i,10);G<0&&(G=n.length+G),G>=0&&GG.trim());for(let G of i){let d=RK(G);if(d.length){let u=n;for(let b of d)if(u&&typeof u=="object"&&b in u)u=u[b];else{u=void 0;break}u!==void 0&&(typeof u=="string"||typeof u=="number"||typeof u=="boolean"?s.push(String(u)):(Array.isArray(u)||typeof u=="object")&&s.push(JSON.stringify(u,null,2)))}}}else if(r==="*"){if(Array.isArray(n))for(let i of n)s.push(...l(i,a,c+1));else if(typeof n=="object"&&n!==null)for(let i of Object.values(n))s.push(...l(i,a,c+1))}else typeof n=="object"&&n!==null&&r in n&&s.push(...l(n[r],a,c+1));return s}return l(t,I,0)}var rWt=g(()=>{o()});var WJe,sWt=g(()=>{o();Vse();rWt();WJe=class extends FC{data=new Map;vectors=new Map;_indexConfig;constructor(t){super(),t?.index&&(this._indexConfig={...t.index,__tokenizedFields:(t.index.fields??["$"]).map(e=>[e,e==="$"?[e]:RK(e)])})}async batch(t){let e=[],I=new Map,l=new Map;for(let n=0;n0)if(this._indexConfig?.embeddings){let n=new Set;for(let[r]of l.values())r.query&&n.add(r.query);let a=n.size>0?await Promise.all(Array.from(n).map(r=>this._indexConfig.embeddings.embedQuery(r))):[],c=Object.fromEntries(Array.from(n).map((r,s)=>[r,a[s]]));for(let[r,[s,i]]of l.entries())if(s.query&&c[s.query]){let G=c[s.query];e[r]=this.scoreResults(i,G,s.offset??0,s.limit??10)}else e[r]=this.paginateResults(i.map(G=>({...G,score:void 0})),s.offset??0,s.limit??10)}else for(let[n,[a,c]]of l.entries())e[n]=this.paginateResults(c.map(r=>({...r,score:void 0})),a.offset??0,a.limit??10);if(I.size>0&&this._indexConfig?.embeddings){let n=this.extractTexts(Array.from(I.values()));if(Object.keys(n).length>0){let a=await this._indexConfig.embeddings.embedDocuments(Object.keys(n));this.insertVectors(n,a)}}for(let n of I.values())this.putOperation(n);return e}getOperation(t){let e=t.namespace.join(":");return this.data.get(e)?.get(t.key)??null}putOperation(t){let e=t.namespace.join(":");this.data.has(e)||this.data.set(e,new Map);let I=this.data.get(e);if(t.value===null)I.delete(t.key);else{let l=new Date;if(I.has(t.key)){let n=I.get(t.key);n.value=t.value,n.updatedAt=l}else I.set(t.key,{value:t.value,key:t.key,namespace:t.namespace,createdAt:l,updatedAt:l})}}listNamespacesOperation(t){let e=Array.from(this.data.keys()).map(I=>I.split(":"));return t.matchConditions&&t.matchConditions.length>0&&(e=e.filter(I=>t.matchConditions.every(l=>this.doesMatch(l,I)))),t.maxDepth!==void 0&&(e=Array.from(new Set(e.map(I=>I.slice(0,t.maxDepth).join(":")))).map(I=>I.split(":"))),e.sort((I,l)=>I.join(":").localeCompare(l.join(":"))),e.slice(t.offset??0,(t.offset??0)+(t.limit??e.length))}doesMatch(t,e){let{matchType:I,path:l}=t;if(I==="prefix")return l.length>e.length?!1:l.every((n,a)=>{let c=e[a];return n==="*"||c===n});if(I==="suffix")return l.length>e.length?!1:l.every((n,a)=>{let c=e[e.length-l.length+a];return n==="*"||c===n});throw new Error(`Unsupported match type: ${I}`)}filterItems(t){let e=[];for(let[l,n]of this.data.entries())l.startsWith(t.namespacePrefix.join(":"))&&e.push(...n.values());let I=e;return t.filter&&(I=e.filter(l=>Object.entries(t.filter).every(([n,a])=>aWt(l.value[n],a)))),I}scoreResults(t,e,I=0,l=10){let n=[],a=[],c=[];for(let G of t){let d=this.getVectors(G);if(d.length)for(let u of d)n.push(G),a.push(u);else c.push(G)}let r=this.cosineSimilarity(e,a).map((G,d)=>[G,n[d]]).sort((G,d)=>d[0]-G[0]),s=new Set,i=[];for(let[G,d]of r){let u=`${d.namespace.join(":")}:${d.key}`;if(s.has(u))continue;let b=s.size;if(b>=I+l)break;if(b({...d,score:G}))}paginateResults(t,e,I){return t.slice(e,e+I)}extractTexts(t){if(!t.length||!this._indexConfig)return{};let e={};for(let I of t)if(I.value!==null&&I.index!==!1){let l=I.index===null||I.index===void 0?this._indexConfig.__tokenizedFields??[]:I.index.map(n=>[n,RK(n)]);for(let[n,a]of l){let c=cWt(I.value,a);c.length&&(c.length>1?c.forEach((r,s)=>{e[r]||(e[r]=[]),e[r].push([I.namespace,I.key,`${n}.${s}`])}):(e[c[0]]||(e[c[0]]=[]),e[c[0]].push([I.namespace,I.key,n])))}}return e}insertVectors(t,e){for(let[I,l]of Object.entries(t)){let n=e.shift();if(!n)throw new Error(`No embedding found for text: ${I}`);for(let[a,c,r]of l){let s=a.join(":");this.vectors.has(s)||this.vectors.set(s,new Map);let i=this.vectors.get(s);i.has(c)||i.set(c,new Map),i.get(c).set(r,n)}}}getVectors(t){let e=t.namespace.join(":"),I=t.key;if(!this.vectors.has(e))return[];let l=this.vectors.get(e);if(!l.has(I))return[];let n=l.get(I),a=Array.from(n.values());return a.length?a:[]}cosineSimilarity(t,e){if(!e.length)return[];let I=e.map(a=>a.reduce((c,r,s)=>c+r*t[s],0)),l=Math.sqrt(t.reduce((a,c)=>a+c*c,0)),n=e.map(a=>Math.sqrt(a.reduce((c,r)=>c+r*r,0)));return I.map((a,c)=>{let r=n[c];return l&&r?a/(l*r):0})}get indexConfig(){return this._indexConfig}}});var Yse,Rse=g(()=>{o();bJe();Yse=class{serde=new Wse;constructor(t){this.serde=t||this.serde}}});var NJe=g(()=>{o();Rse()});var oWt=g(()=>{o();Rse();NJe()});var XC=g(()=>{o();R1e();qre();pJe();lWt();Vse();nWt();sWt();Rse();NJe();oWt()});function YJe(t){return t!=null&&t.lg_is_channel===!0}function AK(t){if(t[VJe]===!0)return t;let e={};for(let I in t){if(!Object.prototype.hasOwnProperty.call(t,I))continue;let l=t[I];YJe(l)&&(e[I]=l)}return Object.assign(e,{[VJe]:!0}),e}function cQ(t,e){let I=AK(t),l={};for(let n in I){if(!Object.prototype.hasOwnProperty.call(I,n))continue;let a=e.channel_values[n];l[n]=I[n].fromCheckpoint(a)}return Object.assign(l,{[VJe]:!0}),l}function r0(t,e,I,l){let n;if(e===void 0)n=t.channel_values;else{n={};for(let a in e)if(Object.prototype.hasOwnProperty.call(e,a))try{n[a]=e[a].checkpoint()}catch(c){if(c.name!==Fn.unminifiable_name)throw c}}return{v:4,id:l?.id??oK(I),ts:new Date().toISOString(),channel_values:n,channel_versions:t.channel_versions,versions_seen:t.versions_seen}}var _s,VJe,qu=g(()=>{o();ts();XC();_s=class{ValueType;UpdateType;lg_is_channel=!0;consume(){return!1}finish(){return!1}isAvailable(){try{return this.get(),!0}catch(t){if(t.name===Fn.unminifiable_name)return!1;throw t}}equals(t){return this===t}},VJe=Symbol.for("LG_IS_ONLY_BASE_CHANNEL")});var vBI,bF,k3=g(()=>{o();gc();ts();qu();vBI=t=>t!=null&&t.lc_graph_name==="BinaryOperatorAggregate",bF=class iWt extends _s{lc_graph_name="BinaryOperatorAggregate";value;operator;initialValueFactory;constructor(e,I){super(),this.operator=e,this.initialValueFactory=I,this.value=I?.()}fromCheckpoint(e){let I=new iWt(this.operator,this.initialValueFactory);return typeof e<"u"&&(I.value=e),I}update(e){let I=e;if(!I.length)return!1;if(this.value===void 0){let n=I[0],[a,c]=xre(n);a?this.value=c:this.value=n,I=I.slice(1)}let l=!1;for(let n of I)if(NZt(n)){if(l)throw new bl("Can receive only one Overwrite value per step.");let[,a]=xre(n);this.value=a,l=!0;continue}else!l&&this.value!==void 0&&(this.value=this.operator(this.value,n));return!0}get(){if(this.value===void 0)throw new Fn;return this.value}checkpoint(){if(this.value===void 0)throw new Fn;return this.value}isAvailable(){return this.value!==void 0}equals(e){return this===e?!0:vBI(e)?this.operator===e.operator:!1}}});var s0,RJe,gC=g(()=>{o();ts();qu();s0=class GWt extends _s{lc_graph_name="LastValue";value=[];constructor(e){super(),this.initialValueFactory=e,e&&(this.value=[e()])}fromCheckpoint(e){let I=new GWt(this.initialValueFactory);return typeof e<"u"&&(I.value=[e]),I}update(e){if(e.length===0)return!1;if(e.length!==1)throw new bl("LastValue can only receive one value per step.",{lc_error_code:"INVALID_CONCURRENT_GRAPH_UPDATE"});return this.value=[e[e.length-1]],!0}get(){if(this.value.length===0)throw new Fn;return this.value[0]}checkpoint(){if(this.value.length===0)throw new Fn;return this.value[0]}isAvailable(){return this.value.length!==0}},RJe=class dWt extends _s{lc_graph_name="LastValueAfterFinish";value=[];finished=!1;fromCheckpoint(e){let I=new dWt;if(typeof e<"u"){let[l,n]=e;I.value=[l],I.finished=n}return I}update(e){return e.length===0?!1:(this.finished=!1,this.value=[e[e.length-1]],!0)}get(){if(this.value.length===0||!this.finished)throw new Fn;return this.value[0]}checkpoint(){if(this.value.length!==0)return[this.value[0],this.finished]}consume(){return this.finished?(this.finished=!1,this.value=[],!0):!1}finish(){return!this.finished&&this.value.length>0?(this.finished=!0,!0):!1}isAvailable(){return this.value.length!==0&&this.finished}}});function Fse(t){return typeof t=="object"&&t&&"reducer"in t&&t.reducer?new bF(t.reducer,t.default):typeof t=="object"&&t&&"value"in t&&t.value?new bF(t.value,t.default):new s0}var Ase,x3,FK=g(()=>{o();k3();gC();Ase=class{lc_graph_name="AnnotationRoot";spec;constructor(t){this.spec=t}static isInstance(t){return typeof t=="object"&&t!==null&&"lc_graph_name"in t&&t.lc_graph_name==="AnnotationRoot"}},x3=function(t){return t?Fse(t):new s0};x3.Root=t=>new Ase(t)});function fBI(t,e){if(!t)return e;let I=e??{};for(let l of QBI){if(l in I)continue;let n=t[l];n!==void 0&&(I[l]=n)}return I}function j3(...t){let e={tags:[],metadata:{},callbacks:void 0,recursionLimit:HBI,configurable:{}},I=dl.getRunnableConfig();if(I!==void 0){for(let[l,n]of Object.entries(I))if(n!==void 0)if(yBI.includes(l)){let a;Array.isArray(n)?a=[...n]:typeof n=="object"?l==="callbacks"&&"copy"in n&&typeof n.copy=="function"?a=n.copy():a={...n}:a=n,e[l]=a}else e[l]=n}for(let l of t)if(l!==void 0)for(let[n,a]of Object.entries(l))a!==void 0&&wBI.includes(n)&&(e[n]=a);return e.metadata=fBI(e.configurable,e.metadata)??{},e}function uWt(t){let e=t??dl.getRunnableConfig();if(e===void 0)throw new Error(["Config not retrievable. This is likely because you are running in an environment without support for AsyncLocalStorage.","If you're running `getStore` in such environment, pass the `config` from the node function directly."].join(` +`));return e?.store}function bWt(t){let e=t??dl.getRunnableConfig();if(e===void 0)throw new Error(["Config not retrievable. This is likely because you are running in an environment without support for AsyncLocalStorage.","If you're running `getWriter` in such environment, pass the `config` from the node function directly."].join(` +`));return e?.writer||e?.configurable?.writer}function Xse(){return dl.getRunnableConfig()}function mWt(t){let e=t??dl.getRunnableConfig();if(e===void 0)throw new Error(["Config not retrievable. This is likely because you are running in an environment without support for AsyncLocalStorage.","If you're running `getCurrentTaskInput` in such environment, pass the `config` from the node function directly."].join(` +`));if(e.configurable?.__pregel_scratchpad?.currentTaskInput===void 0)throw new Error("BUG: internal scratchpad not initialized.");return e.configurable[Ob].currentTaskInput}function gse(t){return t.split("|").filter(e=>!e.match(/^\d+$/)).map(e=>e.split(":")[0]).join("|")}function ZWt(t){let e=t.split("|");for(;e.length>1&&e[e.length-1].match(/^\d+$/);)e.pop();return e.slice(0,-1).join("|")}var yBI,wBI,HBI,QBI,U3=g(()=>{o();gc();Bu();yBI=["tags","metadata","callbacks","configurable"],wBI=["tags","metadata","callbacks","runName","maxConcurrency","recursionLimit","configurable","runId","outputKeys","streamMode","store","writer","interrupt","context","interruptBefore","interruptAfter","checkpointDuring","durability","signal","executionInfo","serverInfo"],HBI=25,QBI=new Set(["thread_id","checkpoint_id","checkpoint_ns","task_id","run_id","assistant_id","graph_id"])});function z3(t){if(!t)throw new Error("Assert failed")}function jBI(t){let e=new DataView(new ArrayBuffer(8));return e.setBigUint64(0,t,!0),e.getBigUint64(0,!1)}function UBI(t){let e=t;return e=(e<(65535))<>lt(16),e=(e<(16711935))<>lt(8),e}function OBI(t,e){return(t&Hse)*(e&Hse)&ml}function zBI(t,e){return(t<>lt(32)-e)&Hse}function AWt(t,e,I){for(let l=0;l>lt(32))}return t}function pWt(t,e,I,l){for(let n=0;n128),I=MBI(I,t,e,AWt,BBI),z3(I.length*8===64);{let l=hWt(I,Dn(e,11),lt(t.byteLength)*rQ&ml);return hWt(I,Dn(e,e.byteLength-TX-11),~(lt(t.byteLength)*vC)&ml)<>lt(64)}function WWt(t,e,I){return FWt((t.getBigUint64(0,!0)^e.getBigUint64(0,!0)+I)&ml,(t.getBigUint64(8,!0)^e.getBigUint64(8,!0)-I)&ml)}function wse(t,e,I,l,n){let a=t&ml,c=t>>lt(64)&ml;return a+=WWt(e,l,n),a^=I.getBigUint64(0,!0)+I.getBigUint64(8,!0),a&=ml,c+=WWt(I,Dn(l,16),n),c^=e.getBigUint64(0,!0)+e.getBigUint64(8,!0),c&=ml,c<>lt(37),e*=CBI,e&=ml,e^=e>>lt(32),e}function Qse(t){let e=t;return e^=e>>lt(33),e*=vC,e&=ml,e^=e>>lt(29),e*=YWt,e&=ml,e^=e>>lt(32),e}function TBI(t,e,I){let l=t.byteLength;z3(l>0&&l<=3);let n=lt(t.getUint8(l-1))|lt(l<<8)|lt(t.getUint8(0)<<16)|lt(t.getUint8(l>>1)<<24),a=(n^(lt(e.getUint32(0,!0))^lt(e.getUint32(4,!0)))+I)&ml,c=(lt(e.getUint32(8,!0))^lt(e.getUint32(12,!0)))-I;return(Qse((zBI(UBI(n),lt(13))^c)&ml)&ml)<>e}function _BI(t,e,I){let l=t.byteLength;z3(l>=4&&l<=8);{let n=t.getUint32(0,!0),a=t.getUint32(l-4,!0),c=((lt(n)|lt(a)<>lt(67),AJe(AJe(c&ml,lt(35))*LBI&ml,lt(28))|ZF(c>>lt(64))<=9&&l<=16);{let n=(e.getBigUint64(32,!0)^e.getBigUint64(40,!0))+I&ml,a=(e.getBigUint64(48,!0)^e.getBigUint64(56,!0))-I&ml,c=t.getBigUint64(0,!0),r=t.getBigUint64(l-8,!0),s=(c^r^n)*rQ,i=(s&ml)+(lt(l-1)<>lt(64));let G=(s&ml)*vC;return G+=(s>>lt(64))*vC<>lt(64))<8?KBI(t,mF,e):I>=4?_BI(t,mF,e):I>0?TBI(t,mF,e):Qse(e^mF.getBigUint64(64,!0)^mF.getBigUint64(72,!0))|Qse(e^mF.getBigUint64(80,!0)^mF.getBigUint64(88,!0))<=0;){let r=Number(n);l=wse(l,Dn(t,16*r),Dn(t,t.byteLength-16*(r+1)),Dn(e,32*r),I),n-=lt(1)}let a=l+(l>>lt(64))&ml;a=ZF(a);let c=(l&ml)*rQ+(l>>lt(64))*XJe+(lt(t.byteLength)-I&ml)*vC;return c&=ml,c=FJe(ZF(c)),a|c<>lt(64))<>lt(64))&ml;n=ZF(n);let a=(l&ml)*rQ+(l>>lt(64))*XJe+(lt(t.byteLength)-I&ml)*vC;return a&=ml,a=FJe(ZF(a)),n|a<c.toString(16).padStart(32,"0");return n<=16?a(DBI(l,e)):n<=128?a(qBI(l,mF,e)):n<=240?a(PBI(l,mF,e)):a(SBI(l,mF))}function fse(t){return/^[0-9a-f]{32}$/.test(t)}var lt,Dn,NWt,VWt,EBI,rQ,vC,YWt,XJe,JBI,CBI,LBI,kBI,mF,O3,ml,Hse,TX,RWt,xBI,vse,XK=g(()=>{o();lt=t=>BigInt(t),Dn=(t,e=0)=>new DataView(t.buffer,t.byteOffset+e,t.byteLength-e),NWt=lt("0x9E3779B1"),VWt=lt("0x85EBCA77"),EBI=lt("0xC2B2AE3D"),rQ=lt("0x9E3779B185EBCA87"),vC=lt("0xC2B2AE3D27D4EB4F"),YWt=lt("0x165667B19E3779F9"),XJe=lt("0x85EBCA77C2B2AE63"),JBI=lt("0x27D4EB2F165667C5"),CBI=lt("0x165667919E3779F9"),LBI=lt("0x9FB21C651E98DF25"),kBI=t=>{let e=t.length;if(e%2!==0)throw new Error("String should have an even number of characters");let I=e/2,l=new Uint8Array(I),n=0,a=0;for(;a0&&n{o();gc();ts();XK();Bu()});function*KX(t,e){if(e===void 0)yield*t;else for(let I of t)yield[e,I]}async function o0(t){let e=[];for await(let I of await t)e.push(I);return e}function yC(t){let e=[];for(let I of t)e.push(I);return e}function wC(t,e){return t?"configurable"in t?{...t,configurable:{...t.configurable,...e}}:{...t,configurable:e}:{configurable:e}}function vJe(t){return t!=null&&typeof t=="function"&&t instanceof Object.getPrototypeOf(async function*(){}).constructor}function yJe(t){return t!=null&&typeof t=="function"&&t instanceof Object.getPrototypeOf(function*(){}).constructor}var oG,DX=g(()=>{o();U3();Bu();Xc();oG=class extends tI{lc_namespace=["langgraph"];func;tags;config;trace=!0;recurse=!0;constructor(t){super(),this.name=t.name??t.func.name,this.func=t.func,this.config=t.tags?{tags:t.tags}:void 0,this.trace=t.trace??this.trace,this.recurse=t.recurse??this.recurse}async _tracedInvoke(t,e,I){return new Promise((l,n)=>{let a=Nl(e,{callbacks:I?.getChild()});dl.runWithConfig(a,async()=>{try{l(await this.func(t,a))}catch(c){n(c)}})})}async invoke(t,e){let I,l=j3(e),n=xn(this.config,l);return this.trace?I=await this._callWithConfig(this._tracedInvoke,t,n):I=await dl.runWithConfig(n,async()=>this.func(t,n)),tI.isRunnable(I)&&this.recurse?await dl.runWithConfig(n,async()=>I.invoke(t,n)):I}}});function $BI(t){return typeof t=="object"&&t?.[Symbol.for("LG_SKIP_WRITE")]!==void 0}function Ese(t){return typeof t=="object"&&t?.[Symbol.for("LG_PASSTHROUGH")]!==void 0}function Jse(t){return t!==void 0&&typeof t.channel=="string"}function HJe(t){return t!==void 0&&!Jse(t)&&tI.isRunnable(t.mapper)}var Bb,wJe,Qr,HC=g(()=>{o();gc();ts();DX();Xc();Bb={[Symbol.for("LG_PASSTHROUGH")]:!0};wJe=Symbol("IS_WRITER"),Qr=class QJe extends oG{writes;constructor(e,I){let l=`ChannelWrite<${e.map(n=>Ys(n)?n.node:"channel"in n?n.channel:"...").join(",")}>`;super({writes:e,name:l,tags:I,trace:!1,func:async(n,a)=>this._write(n,a??{})}),this.writes=e}async _write(e,I){let l=this.writes.map(n=>HJe(n)&&Ese(n.value)?{mapper:n.mapper,value:e}:Jse(n)&&Ese(n.value)?{channel:n.channel,value:e,skipNone:n.skipNone,mapper:n.mapper}:n);return await QJe.doWrite(I,l),e}static async doWrite(e,I){for(let a of I){if(Jse(a)){if(a.channel==="__pregel_tasks")throw new bl("Cannot write to the reserved channel TASKS");if(Ese(a.value))throw new bl("PASSTHROUGH value must be replaced")}if(HJe(a)&&Ese(a.value))throw new bl("PASSTHROUGH value must be replaced")}let l=[];for(let a of I)if(Ys(a))l.push([sF,a]);else if(HJe(a)){let c=await a.mapper.invoke(a.value,e);c!=null&&c.length>0&&l.push(...c)}else if(Jse(a)){let c=a.mapper!==void 0?await a.mapper.invoke(a.value,e):a.value;if($BI(c)||a.skipNone&&c===void 0)continue;l.push([a.channel,c])}else throw new Error(`Invalid write entry: ${JSON.stringify(a)}`);let n=e.configurable?.[Jp];n(l)}static isWriter(e){return e instanceof QJe||wJe in e&&!!e[wJe]}static registerWriter(e){return Object.defineProperty(e,wJe,{value:!0})}}});var XWt,M3,i0,S3=g(()=>{o();gc();DX();HC();Xc();XWt=class gWt extends oG{lc_graph_name="ChannelRead";channel;fresh=!1;mapper;constructor(e,I,l=!1){super({trace:!1,func:(n,a)=>gWt.doRead(a,this.channel,this.fresh,this.mapper)}),this.fresh=l,this.mapper=I,this.channel=e,this.name=Array.isArray(e)?`ChannelRead<${e.join(",")}>`:`ChannelRead<${e}>`}static doRead(e,I,l,n){let a=e.configurable?.[n0];if(!a)throw new Error("Runnable is not configured with a read function. Make sure to call in the context of a Pregel process");return n?n(a(I,l)):a(I,l)}},M3=new e0,i0=class gK extends ha{lc_graph_name="PregelNode";channels;triggers=[];mapper;writers=[];bound=M3;kwargs={};metadata={};tags=[];retryPolicy;cachePolicy;subgraphs;ends;constructor(e){let{channels:I,triggers:l,mapper:n,writers:a,bound:c,kwargs:r,metadata:s,retryPolicy:i,cachePolicy:G,tags:d,subgraphs:u,ends:b}=e,Z=[...e.config?.tags?e.config.tags:[],...d??[]];super({...e,bound:e.bound??M3,config:{...e.config?e.config:{},tags:Z}}),this.channels=I,this.triggers=l,this.mapper=n,this.writers=a??this.writers,this.bound=c??this.bound,this.kwargs=r??this.kwargs,this.metadata=s??this.metadata,this.tags=Z,this.retryPolicy=i,this.cachePolicy=G,this.subgraphs=u,this.ends=b}getWriters(){let e=[...this.writers];for(;e.length>1&&e[e.length-1]instanceof Qr&&e[e.length-2]instanceof Qr;){let I=e.slice(-2),l=I[0].writes.concat(I[1].writes);e[e.length-2]=new Qr(l,I[0].config?.tags),e.pop()}return e}getNode(){let e=this.getWriters();if(!(this.bound===M3&&e.length===0))return this.bound===M3&&e.length===1?e[0]:this.bound===M3?new $r({first:e[0],middle:e.slice(1,e.length-1),last:e[e.length-1],omitSequenceTags:!0}):e.length>0?new $r({first:this.bound,middle:e.slice(0,e.length-1),last:e[e.length-1],omitSequenceTags:!0}):this.bound}join(e){if(!Array.isArray(e))throw new Error("channels must be a list");if(typeof this.channels!="object")throw new Error("all channels must be named when using .join()");return new gK({channels:{...this.channels,...Object.fromEntries(e.map(I=>[I,I]))},triggers:this.triggers,mapper:this.mapper,writers:this.writers,bound:this.bound,kwargs:this.kwargs,config:this.config,retryPolicy:this.retryPolicy,cachePolicy:this.cachePolicy})}pipe(e){return Qr.isWriter(e)?new gK({channels:this.channels,triggers:this.triggers,mapper:this.mapper,writers:[...this.writers,e],bound:this.bound,config:this.config,kwargs:this.kwargs,retryPolicy:this.retryPolicy,cachePolicy:this.cachePolicy}):this.bound===M3?new gK({channels:this.channels,triggers:this.triggers,mapper:this.mapper,writers:this.writers,bound:rr(e),config:this.config,kwargs:this.kwargs,retryPolicy:this.retryPolicy,cachePolicy:this.cachePolicy}):new gK({channels:this.channels,triggers:this.triggers,mapper:this.mapper,writers:this.writers,bound:this.bound.pipe(e),config:this.config,kwargs:this.kwargs,retryPolicy:this.retryPolicy,cachePolicy:this.cachePolicy})}}});function eMI(t){return"steps"in t&&Array.isArray(t.steps)}function vK(t){return"lg_is_pregel"in t&&t.lg_is_pregel===!0}function Cse(t){let e=[t];for(let I of e){if(vK(I))return I;eMI(I)&&e.push(...I.steps)}}var yK=g(()=>{o()});function QC(t,e,I=!0,l=!1){try{return t[e].get()}catch(n){if(n.name===Fn.unminifiable_name){if(l)return n;if(I)return null}throw n}}function G0(t,e,I=!0){if(Array.isArray(e)){let l={};for(let n of e)try{l[n]=QC(t,n,!I)}catch(a){if(a.name===Fn.unminifiable_name)continue}return l}else return QC(t,e)}function*vWt(t,e){if(t.graph===An.PARENT)throw new bl("There is no parent graph.");if(t.goto){let I;Array.isArray(t.goto)?I=t.goto:I=[t.goto];for(let l of I)if(Ys(l))yield[GZ,sF,l];else if(typeof l=="string")yield[GZ,`branch:to:${l}`,"__start__"];else throw new Error(`In Command.send, expected Send or string, got ${typeof l}`)}if(t.resume)if(typeof t.resume=="object"&&Object.keys(t.resume).length&&Object.keys(t.resume).every(fse))for(let[I,l]of Object.entries(t.resume)){let n=e.filter(a=>a[0]===I&&a[1]==="__resume__").map(a=>a[2]).slice(0,1)??[];n.push(l),yield[I,iZ,n]}else yield[GZ,iZ,t.resume];if(t.update){if(typeof t.update!="object"||!t.update)throw new Error("Expected cmd.update to be a dict mapping channel names to update values");if(Array.isArray(t.update))for(let[I,l]of t.update)yield[GZ,I,l];else for(let[I,l]of Object.entries(t.update))yield[GZ,I,l]}}function*Lse(t,e){if(e!=null)if(Array.isArray(t)&&typeof e=="object"&&!Array.isArray(e))for(let I in e)t.includes(I)&&(yield[I,e[I]]);else{if(Array.isArray(t))throw new Error('Input chunk must be an object when "inputChannels" is an array');yield[t,e]}}function*kse(t,e,I){Array.isArray(t)?(e===!0||e.find(([l,n])=>t.includes(l)))&&(yield G0(I,t)):(e===!0||e.some(([l,n])=>l===t))&&(yield QC(I,t))}function*yWt(t,e,I){let l=e.filter(([r,s])=>(r.config===void 0||!r.config.tags?.includes("langsmith:hidden"))&&s[0][0]!=="__error__"&&s[0][0]!=="__interrupt__");if(!l.length)return;let n;l.some(([r])=>r.writes.some(([s,i])=>s==="__return__"))?n=l.flatMap(([r])=>r.writes.filter(([s,i])=>s===IQ).map(([s,i])=>[r.name,i])):Array.isArray(t)?n=l.flatMap(([r])=>{let{writes:s}=r,i={};for(let[G]of s)t.includes(G)&&(i[G]=(i[G]||0)+1);return Object.values(i).some(G=>G>1)?s.filter(([G])=>t.includes(G)).map(([G,d])=>[r.name,{[G]:d}]):[[r.name,Object.fromEntries(s.filter(([G])=>t.includes(G)))]]}):n=l.flatMap(([r])=>r.writes.filter(([s,i])=>s===t).map(([s,i])=>[r.name,i]));let a={};for(let[r,s]of n)r in a||(a[r]=[]),a[r].push(s);let c={};for(let r in a)if(a[r].length===1){let[s]=a[r];c[r]=s}else c[r]=a[r];I&&(c.__metadata__={cached:I}),yield c}var wK=g(()=>{o();gc();ts();XK()});function xse(t){let e=typeof t[Kn];if(e==="number")return 0;if(e==="string")return"";for(let I in t){if(!Object.prototype.hasOwnProperty.call(t,I))continue;let l=typeof t[I];if(l==="number")return 0;if(l==="string")return"";break}}function T3(t,e){if(Object.keys(t).length>0){let I=xse(e);return Object.fromEntries(Object.entries(e).filter(([l,n])=>n>(t[l]??I)))}else return e}function wWt(t,e){return t&&!Array.isArray(t)&&!(t instanceof Date)&&typeof t=="object"?t:{[e]:t}}function Mb(t,e){return t===null?{configurable:e}:t?.configurable===void 0?{...t,configurable:e}:{...t,configurable:{...t.configurable,...e}}}function sQ(t,e){let I=e?.parents??{};return Object.keys(I).length>0?Mb(t,{[Lp]:{...I,[t.configurable?.checkpoint_ns??""]:t.configurable?.checkpoint_id}}):t}function _3(...t){let e=[...new Set(t.filter(Boolean))];if(e.length===0)return{signal:void 0,dispose:void 0};if(e.length===1)return{signal:e[0],dispose:void 0};let I=new AbortController,l=()=>{let a=e.find(c=>c.aborted)?.reason;I.abort(a),e.forEach(c=>c.removeEventListener("abort",l))};e.forEach(a=>a.addEventListener("abort",l,{once:!0}));let n=e.find(a=>a.aborted);return n&&I.abort(n.reason),{signal:I.signal,dispose:()=>{e.forEach(a=>a.removeEventListener("abort",l))}}}var HWt,K3=g(()=>{o();gc();HWt=(t,e)=>{if(!(!t&&!e))return t?e?Array.isArray(t)&&Array.isArray(e)?[...t,...e]:Array.isArray(t)?[...t,e]:Array.isArray(e)?[t,...e]:[t,e]:t:e}});function fWt(t){return typeof t=="object"&&t!==null&&"__lg_type"in t&&t.__lg_type==="call"}var QWt,fJe=g(()=>{o();QWt=class{func;name;input;retry;cache;callbacks;__lg_type="call";constructor({func:t,name:e,input:I,retry:l,cache:n,callbacks:a}){this.func=t,this.name=e,this.input=I,this.retry=l,this.cache=n,this.callbacks=a}}});function EWt(t,e){return new $r({name:t,first:new oG({func:I=>e(...I),name:t,trace:!1,recurse:!1}),last:new Qr([{channel:IQ,value:Bb}],[Vs])})}function JWt(t,e){return new oG({func:(I,l)=>e(I,l),name:t,trace:!1,recurse:!1})}function CWt({func:t,name:e,cache:I,retry:l},...n){let a=dl.getRunnableConfig();if(typeof a.configurable?.__pregel_call=="function")return a.configurable[Y3](t,e,n,{retry:l,cache:I,callbacks:a.callbacks});throw new Error("Async local storage not initialized. Please call initializeAsyncLocalStorageSingleton() before using this function.")}var EJe=g(()=>{o();gc();DX();HC();Bu();Xc()});function tMI(t,e){if(e==null)return!1;for(let I of t)if(e[I])return!0;return!1}function IMI(t){let e;for(let I in t)Object.prototype.hasOwnProperty.call(t,I)&&(e==null?e=t[I]:e=WK(e,t[I]));return e}function QK(t,e,I){let l=xse(t.channel_versions),n=t.versions_seen.__interrupt__??{},a=!1;if((t.channel_versions.__start__??l)>(n.__start__??l))a=!0;else for(let r in t.channel_versions)if(Object.prototype.hasOwnProperty.call(t.channel_versions,r)&&t.channel_versions[r]>(n[r]??l)){a=!0;break}let c=I.some(r=>e==="*"?!r.config?.tags?.includes(Vs):e.includes(r.name));return a&&c}function HK(t,e,I,l,n=!1){let a=new Set;if(Array.isArray(l))a=new Set(l.filter(r=>I.writes.some(([s,i])=>s===r)));else{for(let[r]of I.writes)if(r===l){a=new Set([r]);break}a=a||new Set}let c;if(n&&a.size>0){let r=Object.fromEntries(Object.entries(e).filter(([G,d])=>a.has(G))),s=r0(t,r,-1),i=cQ(r,s);Pu(zp(s),i,[I],void 0,void 0),c=G0({...e,...i},l)}else c=G0(e,l);return c}function JJe(t,e,I){for(let[l,n]of I)if(["__pregel_push","__pregel_tasks"].includes(l)&&n!=null){if(!Ys(n))throw new bl(`Invalid packet type, expected SendProtocol, got ${JSON.stringify(n)}`);if(!(n.node in e))throw new bl(`Invalid node name "${n.node}" in Send packet`)}t(I)}function Pu(t,e,I,l,n){I.sort((u,b)=>{let Z=u.path?.slice(0,3)||[],p=b.path?.slice(0,3)||[];for(let W=0;Wp[W])return 1}return Z.length-p.length});let a=I.some(u=>u.triggers.length>0),c=AK(e);for(let u of I){t.versions_seen[u.name]??={};for(let b of u.triggers)b in t.channel_versions&&(t.versions_seen[u.name][b]=t.channel_versions[b])}let r=IMI(t.channel_versions),s=new Set(I.flatMap(u=>u.triggers).filter(u=>!hZt.includes(u))),i=!1;for(let u of s)u in c&&c[u].consume()&&l!==void 0&&(t.channel_versions[u]=l(r),i=!0);let G={};for(let u of I)for(let[b,Z]of u.writes)lMI.has(b)||b in c&&(G[b]??=[],G[b].push(Z));r!=null&&l!=null&&(r=i?l(r):r);let d=new Set;for(let[u,b]of Object.entries(G))if(u in c){let Z=c[u],p;try{p=Z.update(b)}catch(W){if(W.name===bl.unminifiable_name){let h=new bl(`Invalid update for channel "${u}" with values ${JSON.stringify(b)}: ${W.message}`);throw h.lc_error_code=W.lc_error_code,h}else throw W}p&&l!==void 0&&(t.channel_versions[u]=l(r),Z.isAvailable()&&d.add(u))}if(a)for(let u in c){if(!Object.prototype.hasOwnProperty.call(c,u))continue;let b=c[u];b.isAvailable()&&!d.has(u)&&b.update([])&&l!==void 0&&(t.channel_versions[u]=l(r),b.isAvailable()&&d.add(u))}if(a&&!tMI(d,n))for(let u in c){if(!Object.prototype.hasOwnProperty.call(c,u))continue;let b=c[u];b.finish()&&l!==void 0&&(t.channel_versions[u]=l(r),b.isAvailable()&&d.add(u))}return d}function*nMI(t,e,I){if(I.updatedChannels!=null&&I.triggerToNodes!=null){let l=new Set;for(let n of I.updatedChannels){let a=I.triggerToNodes[n];for(let c of a??[])l.add(c)}yield*[...l].sort();return}if(!(()=>{for(let l in t.channel_versions)if(t.channel_versions[l]!==null)return!1;return!0})())for(let l in e)Object.prototype.hasOwnProperty.call(e,l)&&(yield l)}function oQ(t,e,I,l,n,a,c){let r={},s=l[sF];if(s?.isAvailable()){let i=s.get().length;for(let G=0;GJJe(w=>F.push(...w),l,y),[n0]:(y,w=!1)=>HK(e,n,{name:b.name,writes:F,triggers:p,path:V},y,w),[a0]:i??d.__pregel_checkpointer,[Lp]:{...d[Lp],[u]:e.id},[Ob]:CJe({pendingWrites:I??[],taskId:h,currentTaskInput:b.input,resumeMap:a.configurable?.[A3],namespaceHash:_X(N)}),[mC]:e.channel_values[ZC],checkpoint_id:void 0,checkpoint_ns:N}}),executionInfo:v},triggers:p,retry_policy:b.retry,cache_key:b.cache?{key:_X((b.cache.keyFunc??JSON.stringify)([b.input])),ns:[Jre,b.name??"__dynamic__"],ttl:b.cache.ttl}:void 0,id:h,path:V,writers:[]}}else return{id:h,name:b.name,interrupts:[],path:V}}else if(t[0]==="__pregel_push"){let b=typeof t[1]=="number"?t[1]:parseInt(t[1],10);if(!n.__pregel_tasks?.isAvailable())return;let Z=n[sF].get();if(b<0||b>=Z.length)return;let p=kre(Z[b])&&!Ys(Z[b])?new wr(Z[b].node,Z[b].args):Z[b];if(!kre(p)){console.warn(`Ignoring invalid packet ${JSON.stringify(p)} in pending sends.`);return}if(!(p.node in l)){console.warn(`Ignoring unknown node name ${p.node} in pending sends.`);return}let W=[kp],h=u===""?p.node:`${u}|${p.node}`,N=SX(JSON.stringify([h,s.toString(),p.node,kp,b.toString()]),e.id),V=`${h}:${N}`,R={langgraph_step:s,langgraph_node:p.node,langgraph_triggers:W,langgraph_path:t.slice(0,3),langgraph_checkpoint_ns:V,checkpoint_ns:V};if(c){let F=l[p.node],v=F.getNode();if(v!==void 0){F.metadata!==void 0&&(R={...R,...F.metadata});let y=[],w={checkpointId:e.id,checkpointNs:V,taskId:N,threadId:d.thread_id,runId:a.runId!=null?String(a.runId):void 0,nodeAttempt:1};return{name:p.node,input:p.args,proc:v,subgraphs:F.subgraphs,writes:y,config:{...Nl(xn(a,{metadata:R,tags:F.tags,store:r.store??a.store}),{runName:p.node,callbacks:G?.getChild(`graph:step:${s}`),configurable:{[IK]:N,[Jp]:H=>JJe(f=>y.push(...f),l,H),[n0]:(H,f=!1)=>HK(e,n,{name:p.node,writes:y,triggers:W,path:t},H,f),[a0]:i??d.__pregel_checkpointer,[Lp]:{...d[Lp],[u]:e.id},[Ob]:CJe({pendingWrites:I??[],taskId:N,currentTaskInput:p.args,resumeMap:a.configurable?.[A3],namespaceHash:_X(V)}),[mC]:e.channel_values[ZC],checkpoint_id:void 0,checkpoint_ns:V}}),executionInfo:w},triggers:W,retry_policy:F.retryPolicy,cache_key:F.cachePolicy?{key:_X((F.cachePolicy.keyFunc??JSON.stringify)([p.args])),ns:[Jre,F.name??"__dynamic__",p.node],ttl:F.cachePolicy.ttl}:void 0,id:N,path:t,writers:F.getWriters()}}}else return{id:N,name:p.node,interrupts:[],path:t}}else if(t[0]==="__pregel_pull"){let b=t[1].toString(),Z=l[b];if(Z===void 0)return;if(I?.length){let N=u===""?b:`${u}|${b}`,V=SX(JSON.stringify([N,s.toString(),b,Lre,b]),e.id);if(I.some(R=>R[0]===V&&R[1]!=="__error__"))return}let p=xse(e.channel_versions);if(p===void 0)return;let W=e.versions_seen[b]??{},h=Z.triggers.find(N=>n[N].isAvailable()?(e.channel_versions[N]??p)>(W[N]??p):!1);if(h!==void 0){let N=aMI(Z,n,c);if(N===void 0)return;let V=u===""?b:`${u}|${b}`,R=SX(JSON.stringify([V,s.toString(),b,Lre,[h]]),e.id),F=`${V}:${R}`,v={langgraph_step:s,langgraph_node:b,langgraph_triggers:[h],langgraph_path:t,langgraph_checkpoint_ns:F,checkpoint_ns:F};if(c){let y=Z.getNode();if(y!==void 0){Z.metadata!==void 0&&(v={...v,...Z.metadata});let w=[],H={checkpointId:e.id,checkpointNs:F,taskId:R,threadId:d.thread_id,runId:a.runId!=null?String(a.runId):void 0,nodeAttempt:1};return{name:b,input:N,proc:y,subgraphs:Z.subgraphs,writes:w,config:{...Nl(xn(a,{metadata:v,tags:Z.tags,store:r.store??a.store}),{runName:b,callbacks:G?.getChild(`graph:step:${s}`),configurable:{[IK]:R,[Jp]:f=>JJe(L=>{w.push(...L)},l,f),[n0]:(f,L=!1)=>HK(e,n,{name:b,writes:w,triggers:[h],path:t},f,L),[a0]:i??d.__pregel_checkpointer,[Lp]:{...d[Lp],[u]:e.id},[Ob]:CJe({pendingWrites:I??[],taskId:R,currentTaskInput:N,resumeMap:a.configurable?.[A3],namespaceHash:_X(F)}),[mC]:e.channel_values[ZC],checkpoint_id:void 0,checkpoint_ns:F}}),executionInfo:H},triggers:[h],retry_policy:Z.retryPolicy,cache_key:Z.cachePolicy?{key:_X((Z.cachePolicy.keyFunc??JSON.stringify)([N])),ns:[Jre,Z.name??"__dynamic__",b],ttl:Z.cachePolicy.ttl}:void 0,id:R,path:t,writers:Z.getWriters()}}}else return{id:R,name:b,interrupts:[],path:t}}}}function aMI(t,e,I){let l;if(typeof t.channels=="object"&&!Array.isArray(t.channels)){l={};for(let[n,a]of Object.entries(t.channels))if(t.triggers.includes(a))try{l[n]=QC(e,a,!1)}catch(c){if(c.name===Fn.unminifiable_name)return;throw c}else if(a in e)try{l[n]=QC(e,a,!1)}catch(c){if(c.name===Fn.unminifiable_name)continue;throw c}}else if(Array.isArray(t.channels)){let n=!1;for(let a of t.channels)try{l=QC(e,a,!1),n=!0;break}catch(c){if(c.name===Fn.unminifiable_name)continue;throw c}if(!n)return}else throw new Error(`Invalid channels type, expected list or dict, got ${t.channels}`);return I&&t.mapper!==void 0&&(l=t.mapper(l)),l}function kWt(t,e){if(typeof t.args!="object"||t.args===null)return t;let I={};for(let[l,n]of Object.entries(t.args)){let a=e[l];(!a||a.lc_graph_name!=="UntrackedValue")&&(I[l]=n)}return new wr(t.node,I)}function CJe({pendingWrites:t,taskId:e,currentTaskInput:I,resumeMap:l,namespaceHash:n}){let a=t.find(([r,s])=>r==="00000000-0000-0000-0000-000000000000"&&s==="__resume__")?.[2],c={callCounter:0,interruptCounter:-1,resume:(()=>{let r=t.filter(([s,i])=>s===e&&i==="__resume__").flatMap(([s,i,G])=>G);if(l!=null&&n in l){let s=l[n];r.push(s)}return r})(),nullResume:a,subgraphCounter:0,currentTaskInput:I,consumeNullResume:()=>{if(c.nullResume)return delete c.nullResume,t.splice(t.findIndex(([r,s])=>r==="00000000-0000-0000-0000-000000000000"&&s==="__resume__"),1),a}};return c}var LWt,lMI,LJe=g(()=>{o();gc();ts();qu();XK();wK();fJe();K3();EJe();XC();Xc();LWt=t=>t!==void 0?t+1:1;lMI=new Set([nK,kp,iZ,Va,IQ,V3])});function*kJe(t){for(let{id:e,name:I,input:l,config:n,triggers:a,writes:c}of t)n?.tags?.includes("langsmith:hidden")||(yield{id:e,name:I,input:l,triggers:a,interrupts:c.filter(([r,s])=>r===e&&s==="__interrupt__").map(([,r])=>r)})}function cMI(t){return typeof t!="object"||t===null?!1:"$writes"in t&&Array.isArray(t.$writes)}function xWt(t){let e={};for(let[I,l]of t){let n=String(I);if(n in e){let a=cMI(e[n])?e[n].$writes:[e[n]];a.push(l),e[n]={$writes:a}}else e[n]=l}return e}function*jWt(t,e){for(let[{id:I,name:l,config:n},a]of t)n?.tags?.includes("langsmith:hidden")||(yield{id:I,name:l,result:xWt(a.filter(([c])=>Array.isArray(e)?e.includes(c):c===e)),interrupts:a.filter(c=>c[0]===Va).map(c=>c[1])})}function*UWt(t,e,I,l,n,a,c,r){function s(d){let u={};return d.callbacks!=null&&(u.callbacks=d.callbacks),d.configurable!=null&&(u.configurable=d.configurable),d.maxConcurrency!=null&&(u.max_concurrency=d.maxConcurrency),d.metadata!=null&&(u.metadata=d.metadata),d.recursionLimit!=null&&(u.recursion_limit=d.recursionLimit),d.runId!=null&&(u.run_id=d.runId),d.runName!=null&&(u.run_name=d.runName),d.tags!=null&&(u.tags=d.tags),u}let i=t.configurable?.checkpoint_ns,G={};for(let d of n){if(!(d.subgraphs?.length?d.subgraphs:[d.proc]).find(Cse))continue;let u=`${d.name}:${d.id}`;i&&(u=`${i}|${u}`),G[d.id]={configurable:{thread_id:t.configurable?.thread_id,checkpoint_ns:u}}}yield{config:s(t),values:G0(e,I),metadata:l,next:n.map(d=>d.name),tasks:xJe(n,a,G,r),parentConfig:c?s(c):void 0}}function xJe(t,e,I,l){return t.map(n=>{let a=e.find(([i,G])=>i===n.id&&G==="__error__")?.[2],c=e.filter(([i,G])=>i===n.id&&G==="__interrupt__").map(([,,i])=>i),r=(()=>{if(a||c.length||!e.length)return;let i=e.findIndex(([G,d])=>G===n.id&&d==="__return__");if(i>=0)return e[i][2];if(typeof l=="string")return e.find(([G,d])=>G===n.id&&d===l)?.[2];if(Array.isArray(l)){let G=e.filter(([d,u])=>d===n.id&&l.includes(u)).map(([,d,u])=>[d,u]);return G.length?xWt(G):void 0}})();if(a)return{id:n.id,name:n.name,path:n.path,error:a,interrupts:c,result:r};let s=I?.[n.id];return{id:n.id,name:n.name,path:n.path,interrupts:c,...s!==void 0?{state:s}:{},result:r}})}function OWt(t,e,I){console.log([`${EK(fK.blue,`[${t}:checkpoint]`)}`,`\x1B[1m State at the end of step ${t}:\x1B[0m +`,JSON.stringify(G0(e,I),null,2)].join(""))}function Use(t,e){let I=e.length;console.log([`${EK(fK.blue,`[${t}:tasks]`)}`,`\x1B[1m Starting step ${t} with ${I} task${I===1?"":"s"}:\x1B[0m +`,e.map(l=>`- ${EK(fK.green,String(l.name))} -> ${JSON.stringify(l.input,null,2)}`).join(` +`)].join(""))}function zWt(t,e,I){let l={};for(let[n,a]of e)I.includes(n)&&(l[n]||(l[n]=[]),l[n].push(a));console.log([`${EK(fK.blue,`[${t}:writes]`)}`,`\x1B[1m Finished step ${t} with writes to ${Object.keys(l).length} channel${Object.keys(l).length!==1?"s":""}:\x1B[0m +`,Object.entries(l).map(([n,a])=>`- ${EK(fK.yellow,n)} -> ${a.map(c=>JSON.stringify(c)).join(", ")}`).join(` +`)].join(""))}var fK,EK,jJe=g(()=>{o();gc();wK();yK();fK={blue:{start:"\x1B[34m",end:"\x1B[0m"},green:{start:"\x1B[32m",end:"\x1B[0m"},yellow:{start:"\x1B[33;1m",end:"\x1B[0m"}},EK=(t,e)=>`${t.start}${e}${t.end}`});function rMI(t){return JSON.stringify(t,function(e,I){let l=this[e];if(l!=null&&typeof l=="object"&&"toDict"in l&&typeof l.toDict=="function"){let{type:n,data:a}=l.toDict();return{...a,type:n}}return I})}function sMI(t){return t instanceof Error?{error:t.name,message:t.message}:{error:"Error",message:JSON.stringify(t)}}function zJe(t){return typeof t!="object"||t==null?!1:"configurable"in t&&typeof t.configurable=="object"&&t.configurable!=null}function UJe(t){return!zJe(t)||!t.configurable.thread_id?null:{thread_id:t.configurable.thread_id,checkpoint_ns:t.configurable.checkpoint_ns||"",checkpoint_id:t.configurable.checkpoint_id||null,checkpoint_map:t.configurable.checkpoint_map||null}}function BWt(t){if(zJe(t)){let e=Object.fromEntries(Object.entries(t.configurable).filter(([l])=>!l.startsWith("__"))),I={...t,configurable:e};return delete I.callbacks,I}return t}function MWt(t){let e={...t,checkpoint:UJe(t.config),parent_checkpoint:UJe(t.parentConfig),config:BWt(t.config),parent_config:BWt(t.parentConfig),tasks:t.tasks.map(I=>{if(zJe(I.state)){let l=UJe(I.state);if(l!=null){let n={...I,checkpoint:l};return delete n.state,n}}return I})};return delete e.parentConfig,e}function TWt(t){let e=new TextEncoder;return new ReadableStream({async start(I){let l=n=>{I.enqueue(e.encode(`event: ${n.event} +data: ${rMI(n.data)} + +`))};try{for await(let n of t){let[a,c,r]=n,s=r;if(c==="debug"){let i=r;i.type==="checkpoint"&&(s={...i,payload:MWt(i.payload)})}c==="checkpoints"&&(s=MWt(r)),l({event:a?.length?`${c}|${a.join("|")}`:c,data:s})}}catch(n){l({event:"error",data:sMI(n)})}I.close()}})}var OJe,Ose,SWt,BJe=g(()=>{o();gc();Lb();yH();OJe=class extends nr{_abortController;_innerReader;constructor(t,e){let I=t.getReader(),l=e??new AbortController;super({start(n){return a();function a(){return I.read().then(({done:c,value:r})=>{if(c){n.close();return}return n.enqueue(r),a()})}}}),this._abortController=l,this._innerReader=I}async cancel(t){this._abortController.abort(t),this._innerReader.releaseLock()}get signal(){return this._abortController.signal}},Ose=class extends nr{modes;controller;passthroughFn;_closed=!1;get closed(){return this._closed}constructor(t){let e,I=new Promise(l=>{e=l});super({start:l=>{e(l)}}),I.then(l=>{this.controller=l}),this.passthroughFn=t.passthroughFn,this.modes=t.modes}push(t){this.passthroughFn?.(t),this.controller.enqueue(t)}close(){try{this.controller.close()}catch{}finally{this._closed=!0}}error(t){this.controller.error(t)}},SWt=class extends OR{name="StreamToolsHandler";streamFn;runs={};constructor(t){super(),this.streamFn=t}handleToolStart(t,e,I,l,n,a,c,r){if(!a||n&&n.includes("langsmith:hidden"))return;let s=a.langgraph_checkpoint_ns?.split("|")??[],i={ns:s,toolCallId:r,toolName:c??"unknown",input:e};this.runs[I]=i,this.streamFn([s,"tools",{event:"on_tool_start",toolCallId:i.toolCallId,name:i.toolName,input:e}])}handleToolEvent(t,e){let I=this.runs[e];I&&this.streamFn([I.ns,"tools",{event:"on_tool_event",toolCallId:I.toolCallId,name:I.toolName,data:t}])}handleToolEnd(t,e){let I=this.runs[e];delete this.runs[e],I&&this.streamFn([I.ns,"tools",{event:"on_tool_end",toolCallId:I.toolCallId,name:I.toolName,output:t}])}handleToolError(t,e){let I=this.runs[e];delete this.runs[e],I&&this.streamFn([I.ns,"tools",{event:"on_tool_error",toolCallId:I.toolCallId,name:I.toolName,error:t}])}}});function iMI(...t){return new Ose({passthroughFn:e=>{for(let I of t)I.modes.has(e[1])&&I.push(e)},modes:new Set(t.flatMap(e=>Array.from(e.modes)))})}var zse,MJe,oMI,GMI,_Wt,DWt=g(()=>{o();gc();ts();qu();DX();XK();wK();K3();LJe();jJe();BJe();XC();zse=Symbol.for("INPUT_DONE"),MJe=Symbol.for("INPUT_RESUMING"),oMI=25;GMI=class extends Yse{cache;queue=Promise.resolve();constructor(t){super(),this.cache=t}async get(t){return this.enqueueOperation("get",t)}async set(t){return this.enqueueOperation("set",t)}async clear(t){return this.enqueueOperation("clear",t)}async stop(){await this.queue}enqueueOperation(t,...e){let I=this.queue.then(()=>this.cache[t](...e));return this.queue=I.then(()=>{},()=>{}),I}},_Wt=class KWt{input;output;config;checkpointer;checkpointerGetNextVersion;channels;checkpoint;checkpointIdSaved;checkpointConfig;checkpointMetadata;checkpointNamespace;checkpointPendingWrites=[];checkpointPreviousVersions;step;stop;durability;outputKeys;streamKeys;nodes;skipDoneTasks;prevCheckpointConfig;updatedChannels;status="pending";tasks={};stream;checkpointerPromises=new Set;isNested;_checkpointerChainedPromise=Promise.resolve();_trackCheckpointerPromise(e){let I=e.then(l=>(this.checkpointerPromises.delete(I),l),l=>{throw l});this.checkpointerPromises.add(I)}store;cache;manager;interruptAfter;interruptBefore;toInterrupt=[];debug=!1;triggerToNodes;get isResuming(){let e=!1;if("__start__"in this.checkpoint.channel_versions)e=!0;else for(let r in this.checkpoint.channel_versions)if(Object.prototype.hasOwnProperty.call(this.checkpoint.channel_versions,r)){e=!0;break}let I=this.config.configurable?.__pregel_resuming!==void 0&&this.config.configurable?.__pregel_resuming,l=this.input===null||this.input===void 0,n=Zn(this.input)&&this.input.resume!=null,a=this.input===MJe,c=!this.isNested&&this.config.metadata?.run_id!==void 0&&this.checkpointMetadata?.run_id!==void 0&&this.config.metadata.run_id===this.checkpointMetadata?.run_id;return e&&(I||l||n||a||c)}constructor(e){this.input=e.input,this.checkpointer=e.checkpointer,this.checkpointer!==void 0?this.checkpointerGetNextVersion=this.checkpointer.getNextVersion.bind(this.checkpointer):this.checkpointerGetNextVersion=LWt,this.checkpoint=e.checkpoint,this.checkpointMetadata=e.checkpointMetadata,this.checkpointPreviousVersions=e.checkpointPreviousVersions,this.channels=e.channels,this.checkpointPendingWrites=e.checkpointPendingWrites,this.step=e.step,this.stop=e.stop,this.config=e.config,this.checkpointConfig=e.checkpointConfig,this.isNested=e.isNested,this.manager=e.manager,this.outputKeys=e.outputKeys,this.streamKeys=e.streamKeys,this.nodes=e.nodes,this.skipDoneTasks=e.skipDoneTasks,this.store=e.store,this.cache=e.cache?new GMI(e.cache):void 0,this.stream=e.stream,this.checkpointNamespace=e.checkpointNamespace,this.prevCheckpointConfig=e.prevCheckpointConfig,this.interruptAfter=e.interruptAfter,this.interruptBefore=e.interruptBefore,this.durability=e.durability,this.debug=e.debug,this.triggerToNodes=e.triggerToNodes}static async initialize(e){let{config:I,stream:l}=e;l!==void 0&&I.configurable?.__pregel_stream!==void 0&&(l=iMI(l,I.configurable[lK]));let n=I.configurable?!("checkpoint_id"in I.configurable):!0,a=I.configurable?.[Ob];I.configurable&&a&&(a.subgraphCounter>0&&(I=Mb(I,{[Cp]:[I.configurable[Cp],a.subgraphCounter.toString()].join("|")})),a.subgraphCounter+=1);let c=n0 in(I.configurable??{});!c&&I.configurable?.checkpoint_ns!==void 0&&I.configurable?.checkpoint_ns!==""&&(I=Mb(I,{checkpoint_ns:"",checkpoint_id:void 0}));let r=I;I.configurable?.checkpoint_map!==void 0&&I.configurable?.checkpoint_map?.[I.configurable?.checkpoint_ns]&&(r=Mb(I,{checkpoint_id:I.configurable[Lp][I.configurable?.checkpoint_ns]}));let s=I.configurable?.checkpoint_ns?.split("|")??[],i=await e.checkpointer?.getTuple(r)??{config:I,checkpoint:AC(),metadata:{source:"input",step:-2,parents:{}},pendingWrites:[]};r={...I,...i.config,configurable:{checkpoint_ns:"",...I.configurable,...i.config.configurable}};let G=i.parentConfig,d=zp(i.checkpoint),u={...i.metadata},b=i.pendingWrites??[],Z=cQ(e.channelSpecs,d),p=(u.step??0)+1,W=p+(I.recursionLimit??oMI)+1,h={...d.channel_versions},N=e.store?new YK(e.store):void 0;return N&&await N.start(),new KWt({input:e.input,config:I,checkpointer:e.checkpointer,checkpoint:d,checkpointMetadata:u,checkpointConfig:r,prevCheckpointConfig:G,checkpointNamespace:s,channels:Z,isNested:c,manager:e.manager,skipDoneTasks:n,step:p,stop:W,checkpointPreviousVersions:h,checkpointPendingWrites:b,outputKeys:e.outputKeys??[],streamKeys:e.streamKeys??[],nodes:e.nodes,stream:l,store:N,cache:e.cache,interruptAfter:e.interruptAfter,interruptBefore:e.interruptBefore,durability:e.durability,debug:e.debug,triggerToNodes:e.triggerToNodes})}_checkpointerPutAfterPrevious(e){this._checkpointerChainedPromise=this._checkpointerChainedPromise.then(()=>this.checkpointer?.put(e.config,e.checkpoint,e.metadata,e.newVersions)),this._trackCheckpointerPromise(this._checkpointerChainedPromise)}putWrites(e,I){let l=I;if(l.length===0)return;l.every(([s])=>s in NK)&&(l=Array.from(new Map(l.map(s=>[s[0],s])).values()));let n=!1;for(let s in this.channels)if(Object.prototype.hasOwnProperty.call(this.channels,s)&&this.channels[s].lc_graph_name==="UntrackedValue"){n=!0;break}let a=l;n&&(a=l.filter(([s])=>{let i=this.channels[s];return!i||i.lc_graph_name!=="UntrackedValue"}).map(([s,i])=>s==="__pregel_tasks"&&Ys(i)?[s,kWt(i,this.channels)]:[s,i])),this.checkpointPendingWrites=this.checkpointPendingWrites.filter(s=>s[0]!==e);for(let[s,i]of a)this.checkpointPendingWrites.push([e,s,i]);let c=Mb(this.checkpointConfig,{[Cp]:this.config.configurable?.checkpoint_ns??"",[Cre]:this.checkpoint.id});if(this.durability!=="exit"&&this.checkpointer!=null&&this._trackCheckpointerPromise(this.checkpointer.putWrites(c,a,e)),this.tasks&&this._outputWrites(e,l),!I.length||!this.cache||!this.tasks)return;let r=this.tasks[e];r==null||r.cache_key==null||I[0][0]==="__error__"||I[0][0]==="__interrupt__"||this.cache.set([{key:[r.cache_key.ns,r.cache_key.key],value:r.writes,ttl:r.cache_key.ttl}])}_outputWrites(e,I,l=!1){let n=this.tasks[e];if(n!==void 0){if(n.config!==void 0&&(n.config.tags??[]).includes("langsmith:hidden"))return;if(I.length>0)if(I[0][0]==="__interrupt__"){if(n.path?.[0]==="__pregel_push"&&n.path?.[n.path.length-1]===!0)return;let a=I.filter(c=>c[0]===Va).flatMap(c=>c[1]);this._emit([["updates",{[Va]:a}],["values",{[Va]:a}]])}else I[0][0]!=="__error__"&&this._emit(yC(KX(yWt(this.outputKeys,[[n,I]],l),"updates")));l||this._emit(yC(KX(jWt([[n,I]],this.streamKeys),"tasks")))}}async _matchCachedWrites(){if(!this.cache)return[];let e=[],I=([c,r])=>`ns:${c.join(",")}|key:${r}`,l=[],n={};for(let c of Object.values(this.tasks))c.cache_key!=null&&!c.writes.length&&(l.push([c.cache_key.ns,c.cache_key.key]),n[I([c.cache_key.ns,c.cache_key.key])]=c);if(l.length===0)return[];let a=await this.cache.get(l);for(let{key:c,value:r}of a){let s=n[I(c)];s!=null&&(s.writes.push(...r),e.push({task:s,result:r}))}return e}async tick(e){this.store&&!this.store.isRunning&&await this.store?.start();let{inputKeys:I=[]}=e;if(this.status!=="pending")throw new Error(`Cannot tick when status is no longer "pending". Current status: "${this.status}"`);if(![zse,MJe].includes(this.input))await this._first(I);else{if(this.toInterrupt.length>0)throw this.status="interrupt_before",new oF;if(Object.values(this.tasks).every(n=>n.writes.length>0)){let n=Object.values(this.tasks).flatMap(c=>c.writes);this.updatedChannels=Pu(this.checkpoint,this.channels,Object.values(this.tasks),this.checkpointerGetNextVersion,this.triggerToNodes);let a=await o0(KX(kse(this.outputKeys,n,this.channels),"values"));if(this._emit(a),this.checkpointPendingWrites=[],await this._putCheckpoint({source:"loop"}),QK(this.checkpoint,this.interruptAfter,Object.values(this.tasks)))throw this.status="interrupt_after",new oF;this.config.configurable?.__pregel_resuming!==void 0&&delete this.config.configurable?.[R3]}else return!1}if(this.step>this.stop)return this.status="out_of_steps",!1;if(this.tasks=oQ(this.checkpoint,this.checkpointPendingWrites,this.nodes,this.channels,this.config,!0,{step:this.step,checkpointer:this.checkpointer,isResuming:this.isResuming,manager:this.manager,store:this.store,stream:this.stream,triggerToNodes:this.triggerToNodes,updatedChannels:this.updatedChannels}),this.checkpointer&&this._emit(await o0(KX(UWt(this.checkpointConfig,this.channels,this.streamKeys,this.checkpointMetadata,Object.values(this.tasks),this.checkpointPendingWrites,this.prevCheckpointConfig,this.outputKeys),"checkpoints"))),Object.values(this.tasks).length===0)return this.status="done",!1;if(this.skipDoneTasks&&this.checkpointPendingWrites.length>0){for(let[n,a,c]of this.checkpointPendingWrites){if(a==="__error__"||a==="__interrupt__"||a==="__resume__")continue;let r=Object.values(this.tasks).find(s=>s.id===n);r&&r.writes.push([a,c])}for(let n of Object.values(this.tasks))n.writes.length>0&&this._outputWrites(n.id,n.writes,!0)}if(Object.values(this.tasks).every(n=>n.writes.length>0))return this.tick({inputKeys:I});if(QK(this.checkpoint,this.interruptBefore,Object.values(this.tasks)))throw this.status="interrupt_before",new oF;let l=await o0(KX(kJe(Object.values(this.tasks)),"tasks"));return this._emit(l),!0}async finishAndHandleError(e){this.durability==="exit"&&(!this.isNested||typeof e<"u"||this.checkpointNamespace.every(l=>!l.includes(":")))&&(this._putCheckpoint(this.checkpointMetadata),this._flushPendingWrites());let I=this._suppressInterrupt(e);return(I||e===void 0)&&(this.output=G0(this.channels,this.outputKeys)),I&&(this.tasks!==void 0&&this.checkpointPendingWrites.length>0&&Object.values(this.tasks).some(l=>l.writes.length>0)&&(this.updatedChannels=Pu(this.checkpoint,this.channels,Object.values(this.tasks),this.checkpointerGetNextVersion,this.triggerToNodes),this._emit(yC(KX(kse(this.outputKeys,Object.values(this.tasks).flatMap(l=>l.writes),this.channels),"values")))),jp(e)&&!e.interrupts.length&&this._emit([["updates",{[Va]:[]}],["values",{[Va]:[]}]])),I}async acceptPush(e,I,l){if(this.interruptAfter?.length>0&&QK(this.checkpoint,this.interruptAfter,[e])){this.toInterrupt.push(e);return}let n=jse([kp,e.path??[],I,e.id,l],this.checkpoint,this.checkpointPendingWrites,this.nodes,this.channels,e.config??{},!0,{step:this.step,checkpointer:this.checkpointer,manager:this.manager,store:this.store,stream:this.stream});if(!n)return;if(this.interruptBefore?.length>0&&QK(this.checkpoint,this.interruptBefore,[n])){this.toInterrupt.push(n);return}this._emit(yC(KX(kJe([n]),"tasks"))),this.debug&&Use(this.step,[n]),this.tasks[n.id]=n,this.skipDoneTasks&&this._matchWrites({[n.id]:n});let a=await this._matchCachedWrites();for(let{task:c}of a)this._outputWrites(c.id,c.writes,!0);return n}_suppressInterrupt(e){return jp(e)&&!this.isNested}async _first(e){let{configurable:I}=this.config,l=I?.[Ob];if(l&&l.nullResume!==void 0&&this.putWrites(GZ,[[iZ,l.nullResume]]),Zn(this.input)){let c=this.input.resume!=null;if(this.input.resume!=null&&typeof this.input.resume=="object"&&Object.keys(this.input.resume).every(fse)&&(this.config.configurable??={},this.config.configurable[A3]=this.input.resume),c&&this.checkpointer==null)throw new Error("Cannot use Command(resume=...) without checkpointer");let r={};for(let[s,i,G]of vWt(this.input,this.checkpointPendingWrites))r[s]??=[],r[s].push([i,G]);if(Object.keys(r).length===0)throw new rK("Received empty Command input");for(let[s,i]of Object.entries(r))this.putWrites(s,i)}let n=(this.checkpointPendingWrites??[]).filter(c=>c[0]===GZ).map(c=>c.slice(1));n.length>0&&Pu(this.checkpoint,this.channels,[{name:rF,writes:n,triggers:[]}],this.checkpointerGetNextVersion,this.triggerToNodes);let a=Zn(this.input)&&n.length>0;if(this.isResuming||a){for(let r in this.channels)if(Object.prototype.hasOwnProperty.call(this.channels,r)&&this.checkpoint.channel_versions[r]!==void 0){let s=this.checkpoint.channel_versions[r];this.checkpoint.versions_seen[Va]={...this.checkpoint.versions_seen[Va],[r]:s}}let c=await o0(KX(kse(this.outputKeys,!0,this.channels),"values"));this._emit(c)}if(this.isResuming)this.input=MJe;else if(a)await this._putCheckpoint({source:"input"}),this.input=zse;else{let c=await o0(Lse(e,this.input));if(c.length>0){let r=oQ(this.checkpoint,this.checkpointPendingWrites,this.nodes,this.channels,this.config,!0,{step:this.step});this.updatedChannels=Pu(this.checkpoint,this.channels,Object.values(r).concat([{name:rF,writes:c,triggers:[]}]),this.checkpointerGetNextVersion,this.triggerToNodes),await this._putCheckpoint({source:"input"}),this.input=zse}else if("__pregel_resuming"in(this.config.configurable??{}))this.input=zse;else throw new rK(`Received no input writes for ${JSON.stringify(e,null,2)}`)}this.isNested||(this.config=Mb(this.config,{[R3]:this.isResuming}))}_emit(e){for(let[I,l]of e)if(this.stream.modes.has(I)&&this.stream.push([this.checkpointNamespace,I,l]),(I==="checkpoints"||I==="tasks")&&this.stream.modes.has("debug")){let n=I==="checkpoints"?this.step-1:this.step,a=new Date().toISOString(),c=I==="checkpoints"?"checkpoint":typeof l=="object"&&l!=null&&"result"in l?"task_result":"task";this.stream.push([this.checkpointNamespace,"debug",{step:n,type:c,timestamp:a,payload:l}])}}_putCheckpoint(e){let I=this.checkpointMetadata===e,l=this.checkpointer!=null&&(this.durability!=="exit"||I),n=a=>{this.prevCheckpointConfig=this.checkpointConfig?.configurable?.checkpoint_id?this.checkpointConfig:void 0,this.checkpointConfig=Mb(this.checkpointConfig,{[Cp]:this.config.configurable?.checkpoint_ns??""});let c={...this.checkpoint.channel_versions},r=T3(this.checkpointPreviousVersions,c);this.checkpointPreviousVersions=c,this._checkpointerPutAfterPrevious({config:{...this.checkpointConfig},checkpoint:zp(a),metadata:{...this.checkpointMetadata},newVersions:r}),this.checkpointConfig={...this.checkpointConfig,configurable:{...this.checkpointConfig.configurable,checkpoint_id:this.checkpoint.id}}};I||(this.checkpointMetadata={...e,step:this.step,parents:this.config.configurable?.checkpoint_map??{}}),this.checkpoint=r0(this.checkpoint,l?this.channels:void 0,this.step,I?{id:this.checkpoint.id}:void 0),l&&n(this.checkpoint),I||(this.step+=1)}_flushPendingWrites(){if(this.checkpointer==null||this.checkpointPendingWrites.length===0)return;let e=Mb(this.checkpointConfig,{[Cp]:this.config.configurable?.checkpoint_ns??"",[Cre]:this.checkpoint.id}),I={};for(let[l,n,a]of this.checkpointPendingWrites)I[l]??=[],I[l].push([n,a]);for(let[l,n]of Object.entries(I))this._trackCheckpointerPromise(this.checkpointer.putWrites(e,n,l))}_matchWrites(e){for(let[I,l,n]of this.checkpointPendingWrites){if(l==="__error__"||l==="__interrupt__"||l==="__resume__")continue;let a=Object.values(e).find(c=>c.id===I);a&&a.writes.push([l,n])}for(let I of Object.values(e))I.writes.length>0&&this._outputWrites(I.id,I.writes,!0)}}});function dMI(t){return ma(t?.message)}function qWt(t,e,I){if(!t)return;let l=t.langgraph_checkpoint_ns,n=t.checkpoint_ns,a=l??n;if(a)return[a.split("|"),{tags:e,name:I,...t}]}var PWt,$Wt=g(()=>{o();gc();yH();NI();PWt=class extends OR{name="StreamMessagesHandler";streamFn;metadatas={};seen={};emittedChatModelRunIds={};stableMessageIdMap={};lc_prefer_streaming=!0;constructor(t){super(),this.streamFn=t}_emit(t,e,I,l=!1){if(l&&e.id!==void 0&&this.seen[e.id]!==void 0)return;let n=e.id;I!=null&&(cJ(e)?n??=`run-${I}-tool-${e.tool_call_id}`:((n==null||n===`run-${I}`)&&(n=this.stableMessageIdMap[I]??n??`run-${I}`),this.stableMessageIdMap[I]??=n)),n!==e.id&&(e.id=n,e.lc_kwargs.id=n),e.id!=null&&(this.seen[e.id]=e),this.streamFn([t[0],"messages",[e,t[1]]])}handleChatModelStart(t,e,I,l,n,a,c,r){c&&(!a||!a.includes("langsmith:nostream")&&!a.includes("nostream"))&&(this.metadatas[I]=qWt(c,a,r))}handleLLMNewToken(t,e,I,l,n,a){let c=a?.chunk;this.emittedChatModelRunIds[I]=!0,this.metadatas[I]!==void 0&&(dMI(c)?this._emit(this.metadatas[I],c.message,I):this._emit(this.metadatas[I],new eI({content:t}),I))}handleLLMEnd(t,e){if(this.metadatas[e]!==void 0){if(!this.emittedChatModelRunIds[e]){let I=t.generations?.[0]?.[0];ma(I?.message)&&this._emit(this.metadatas[e],I?.message,e,!0),delete this.emittedChatModelRunIds[e]}delete this.metadatas[e],delete this.stableMessageIdMap[e]}}handleLLMError(t,e){delete this.metadatas[e]}handleChainStart(t,e,I,l,n,a,c,r){if(a!==void 0&&r===a.langgraph_node&&(n===void 0||!n.includes("langsmith:hidden"))&&(this.metadatas[I]=qWt(a,n,r),typeof e=="object")){for(let s of Object.values(e))if((ma(s)||ZX(s))&&s.id!==void 0)this.seen[s.id]=s;else if(Array.isArray(s))for(let i of s)(ma(i)||ZX(i))&&i.id!==void 0&&(this.seen[i.id]=i)}}handleChainEnd(t,e){let I=this.metadatas[e];if(delete this.metadatas[e],I!==void 0){if(ma(t))this._emit(I,t,e,!0);else if(Array.isArray(t))for(let l of t)ma(l)&&this._emit(I,l,e,!0);else if(t!=null&&typeof t=="object"){for(let l of Object.values(t))if(ma(l))this._emit(I,l,e,!0);else if(Array.isArray(l))for(let n of l)ma(n)&&this._emit(I,n,e,!0)}}}handleChainError(t,e){delete this.metadatas[e]}}});async function SJe(t,e,I,l){let n=t.retry_policy??e,a=n!==void 0?n.initialInterval??500:0,c=0,r,s,i=t.config??{};I&&(i=Mb(i,I)),i={...i,signal:l};let G=Date.now();for(i.executionInfo!=null&&(i.executionInfo={...i.executionInfo,nodeFirstAttemptTime:G});!l?.aborted;){t.writes.splice(0,t.writes.length),r=void 0;try{s=await t.proc.invoke(t.input,i);break}catch(d){if(r=d,r.pregelTaskId=t.id,Ore(r)){let Z=i?.configurable?.checkpoint_ns,p=r.command;if(p.graph===Z){for(let W of t.writers)await W.invoke(p,i);r=void 0;break}else if(p.graph===An.PARENT){let W=ZWt(Z);r.command=new An({...r.command,graph:W})}}if(iF(r)||n===void 0||(c+=1,c>=(n.maxAttempts??3))||!(n.retryOn??bMI)(r))break;a=Math.min(n.maxInterval??128e3,a*(n.backoffFactor??2));let u=n.jitter?Math.floor(a+Math.random()*1e3):a;await new Promise(Z=>setTimeout(Z,u));let b=r.name??r.constructor.unminifiable_name??r.constructor.name;(n?.logWarning??!0)&&console.log(`Retrying task "${String(t.name)}" after ${a.toFixed(2)}ms (attempt ${c}) after ${b}: ${r}`),i=Mb(i,{[R3]:!0}),i.executionInfo!=null&&(i.executionInfo={...i.executionInfo,nodeAttempt:c+1,nodeFirstAttemptTime:G})}}return{task:t,result:s,error:r,signalAborted:l?.aborted}}var uMI,bMI,eNt=g(()=>{o();gc();ts();U3();K3();uMI=[400,401,402,403,404,405,406,407,409],bMI=t=>{if(t.message.startsWith("Cancel")||t.message.startsWith("AbortError")||t.name==="AbortError"||t.name==="GraphValueError"||t?.code==="ECONNABORTED")return!1;let e=t?.response?.status??t?.status;return!(e&&uMI.includes(+e)||t?.error?.code==="insufficient_quota")}});function mMI(){let t={next:()=>{},wait:Promise.resolve(TJe)};function e(I){t.next=()=>{t.wait=new Promise(e),I(TJe)}}return t.wait=new Promise(e),t}async function INt(t,e,I,l,n,a={}){let c=e.config?.configurable?.[Ob];if(!c)throw new Error(`BUG: No scratchpad found on task ${e.name}__${e.id}`);let r=c.callCounter;c.callCounter+=1;let s=new QWt({func:I,name:l,input:n,cache:a.cache,retry:a.retry,callbacks:a.callbacks}),i=await this.scheduleTask(e,r,s);if(!i)return;let G=this.executingTasksMap[i.id];if(G!==void 0)return G;if(i.writes.length>0){let d=i.writes.filter(([b])=>b===IQ),u=i.writes.filter(([b])=>b===V3);if(d.length>0){if(d.length===1)return Promise.resolve(d[0][1]);throw new Error(`BUG: multiple returns found for task ${i.name}__${i.id}`)}if(u.length>0){if(u.length===1){let b=u[0][1],Z=b instanceof Error?b:new Error(String(b));return Promise.reject(Z)}throw new Error(`BUG: multiple errors found for task ${i.name}__${i.id}`)}return}else{let d=SJe(i,a.retry,{[Y3]:INt.bind(this,t,i)});return this.executingTasksMap[i.id]=d,this.barrier.next(),d.then(({result:u,error:b})=>b?Promise.reject(b):u)}}var TJe,tNt,lNt=g(()=>{o();gc();ts();fJe();K3();eNt();TJe=Symbol.for("promiseAdded");tNt=class{nodeFinished;loop;constructor({loop:t,nodeFinished:e}){this.loop=t,this.nodeFinished=e}async tick(t={}){let{timeout:e,retryPolicy:I,onStepWrite:l,maxConcurrency:n}=t,a=new Set,c,r=new AbortController,s=r.signal,i=e?AbortSignal.timeout(e):void 0,G=Object.values(this.loop.tasks).filter(Z=>Z.writes.length===0),{signals:d,disposeCombinedSignal:u}=this._initializeAbortSignals({exceptionSignal:s,stepTimeoutSignal:i,signal:t.signal}),b=this._executeTasksWithRetry(G,{signals:d,retryPolicy:I,maxConcurrency:n});for await(let{task:Z,error:p,signalAborted:W}of b)this._commit(Z,p),jp(p)||iF(p)&&!jp(c)?c=p:p&&(a.size===0||!W)&&(r.abort(),a.add(p));if(u?.(),l?.(this.loop.step,Object.values(this.loop.tasks).map(Z=>Z.writes).flat()),a.size===1)throw Array.from(a)[0];if(a.size>1)throw new AggregateError(Array.from(a),`Multiple errors occurred during superstep ${this.loop.step}. See the "errors" field of this exception for more details.`);if(jp(c)||iF(c)&&this.loop.isNested)throw c}_initializeAbortSignals({exceptionSignal:t,stepTimeoutSignal:e,signal:I}){let l=this.loop.config.configurable?.__pregel_abort_signals??{},n=l.externalAbortSignal??I,a=e??l.timeoutAbortSignal,{signal:c,dispose:r}=_3(n,a,t),s={externalAbortSignal:n,timeoutAbortSignal:a,composedAbortSignal:c};return this.loop.config=Mb(this.loop.config,{[pZt]:s}),{signals:s,disposeCombinedSignal:r}}async*_executeTasksWithRetry(t,e){let{retryPolicy:I,maxConcurrency:l,signals:n}=e??{},a=mMI(),c={},r={executingTasksMap:c,barrier:a,retryPolicy:I,scheduleTask:async(u,b,Z)=>this.loop.acceptPush(u,b,Z)};if(n?.composedAbortSignal?.aborted)throw new Error("Abort");let s=0,i,G=_3(n?.externalAbortSignal,n?.timeoutAbortSignal),d=G.signal?new Promise((u,b)=>{i=()=>b(new Error("Abort")),G.signal?.addEventListener("abort",i,{once:!0})}):void 0;for(;(s===0||Object.keys(c).length>0)&&t.length;){for(;Object.values(c).length<(l??t.length)&&s({task:b,error:Z,signalAborted:n?.composedAbortSignal?.aborted}))}let u=await Promise.race([...Object.values(c),...d?[d]:[],a.wait]);u!==TJe&&(yield u,i!=null&&(G.signal?.removeEventListener("abort",i),G.dispose?.()),delete c[u.task.id])}}_commit(t,e){if(e!==void 0)if(jp(e)){if(e.interrupts.length){let I=e.interrupts.map(n=>[Va,n]),l=t.writes.filter(n=>n[0]===iZ);l.length&&I.push(...l),this.loop.putWrites(t.id,I)}}else iF(e)&&t.writes.length?this.loop.putWrites(t.id,t.writes):this.loop.putWrites(t.id,[[V3,{message:e.message,name:e.name}]]);else this.nodeFinished&&(t.config?.tags==null||!t.config.tags.includes("langsmith:hidden"))&&this.nodeFinished(String(t.name)),t.writes.length===0&&t.writes.push([nK,null]),this.loop.putWrites(t.id,t.writes)}}});function nNt({nodes:t,channels:e,inputChannels:I,outputChannels:l,streamChannels:n,interruptAfterNodes:a,interruptBeforeNodes:c}){if(!e)throw new qX("Channels not provided");let r=new Set,s=new Set;for(let[i,G]of Object.entries(t)){if(i==="__interrupt__")throw new qX(`"Node name ${Va} is reserved"`);if(G.constructor===i0)G.triggers.forEach(d=>r.add(d));else throw new qX(`Invalid node type ${typeof G}, expected PregelNode`)}for(let i of r)if(!(i in e))throw new qX(`Subscribed channel '${String(i)}' not in channels`);if(Array.isArray(I)){if(I.every(i=>!r.has(i)))throw new qX(`None of the input channels ${I} are subscribed to by any node`)}else if(!r.has(I))throw new qX(`Input channel ${String(I)} is not subscribed to by any node`);Array.isArray(l)?l.forEach(i=>s.add(i)):s.add(l),n&&!Array.isArray(n)?s.add(n):Array.isArray(n)&&n.forEach(i=>s.add(i));for(let i of s)if(!(i in e))throw new qX(`Output channel '${String(i)}' not in channels`);if(a&&a!=="*"){for(let i of a)if(!(i in t))throw new qX(`Node ${String(i)} not in nodes`)}if(c&&c!=="*"){for(let i of c)if(!(i in t))throw new qX(`Node ${String(i)} not in nodes`)}}function _Je(t,e){if(Array.isArray(t)){for(let I of t)if(!(I in e))throw new Error(`Key ${String(I)} not found in channels`)}else if(!(t in e))throw new Error(`Key ${String(t)} not found in channels`)}var qX,aNt=g(()=>{o();gc();S3();qX=class extends Error{constructor(t){super(t),this.name="GraphValidationError"}}});var KJe,DJe=g(()=>{o();ts();qu();KJe=class cNt extends _s{lc_graph_name="Topic";unique=!1;accumulate=!1;seen;values;constructor(e){super(),this.unique=e?.unique??this.unique,this.accumulate=e?.accumulate??this.accumulate,this.seen=new Set,this.values=[]}fromCheckpoint(e){let I=new cNt({unique:this.unique,accumulate:this.accumulate});return typeof e<"u"&&(I.seen=new Set(e[0]),I.values=e[1]),I}update(e){let I=!1;this.accumulate||(I=this.values.length>0,this.values=[]);let l=e.flat();if(l.length>0)if(this.unique)for(let n of l)this.seen.has(n)||(I=!0,this.seen.add(n),this.values.push(n));else I=!0,this.values.push(...l);return I}get(){if(this.values.length===0)throw new Fn;return this.values}checkpoint(){return[[...this.seen],this.values]}isAvailable(){return this.values.length!==0}}});function pMI(t){let e=t.metadata??{},I=t.configurable??{},l=e.assistant_id,n=e.graph_id,a=I.langgraph_auth_user,c;if(a!=null&&typeof a=="object"&&"identity"in a&&(c=a),l!=null||n!=null||c!=null)return{assistantId:l!=null?String(l):"",graphId:n!=null?String(n):"",user:c}}function WMI(t,e){let I=t.toLowerCase(),l=!1;for(let n of hMI)if(I.includes(n)){l=!0;break}return t.startsWith("__")||!(typeof e=="string"||typeof e=="number"||typeof e=="boolean")||l}function NMI(t){let e=t.configurable;if(!e)return;let I={};for(let[l,n]of Object.entries(e))WMI(l,n)||(I[l]=n);return Object.keys(I).length>0?I:void 0}var rNt,ZMI,Bse,hMI,qJe=g(()=>{o();gc();ts();qu();U3();DX();HC();S3();wK();K3();LJe();yK();jJe();BJe();DWt();$Wt();lNt();aNt();DJe();gJe();XC();Xc();RX();rNt=class{static subscribeTo(t,e){let{key:I,tags:l}={key:void 0,tags:void 0,...e??{}};if(Array.isArray(t)&&I!==void 0)throw new Error("Can't specify a key when subscribing to multiple channels");let n;return typeof t=="string"?I?n={[I]:t}:n=[t]:n=Object.fromEntries(t.map(a=>[a,a])),new i0({channels:n,triggers:Array.isArray(t)?t:[t],tags:l})}static writeTo(t,e){let I=[];for(let l of t)I.push({channel:l,value:Bb,skipNone:!1});for(let[l,n]of Object.entries(e??{}))tI.isRunnable(n)||typeof n=="function"?I.push({channel:l,value:Bb,skipNone:!0,mapper:rr(n)}):I.push({channel:l,value:n,skipNone:!1});return new Qr(I)}},ZMI=class extends tI{lc_namespace=["langgraph","pregel"];invoke(t,e){throw new Error("Not implemented")}withConfig(t){return super.withConfig(t)}stream(t,e){return super.stream(t,e)}},Bse=class extends ZMI{static lc_name(){return"LangGraph"}lc_namespace=["langgraph","pregel"];lg_is_pregel=!0;nodes;channels;inputChannels;outputChannels;autoValidate=!0;streamMode=["values"];streamChannels;interruptAfter;interruptBefore;stepTimeout;debug=!1;checkpointer;retryPolicy;config;store;cache;userInterrupt;triggerToNodes={};constructor(t){super(t);let{streamMode:e}=t;if(e!=null&&!Array.isArray(e)&&(e=[e]),this.nodes=t.nodes,this.channels=t.channels,"__pregel_tasks"in this.channels&&"lc_graph_name"in this.channels.__pregel_tasks&&this.channels.__pregel_tasks.lc_graph_name!=="Topic")throw new Error(`Channel '${sF}' is reserved and cannot be used in the graph.`);this.channels[sF]=new KJe({accumulate:!1}),this.autoValidate=t.autoValidate??this.autoValidate,this.streamMode=e??this.streamMode,this.inputChannels=t.inputChannels,this.outputChannels=t.outputChannels,this.streamChannels=t.streamChannels??this.streamChannels,this.interruptAfter=t.interruptAfter,this.interruptBefore=t.interruptBefore,this.stepTimeout=t.stepTimeout??this.stepTimeout,this.debug=t.debug??this.debug,this.checkpointer=t.checkpointer,this.retryPolicy=t.retryPolicy,this.config=t.config,this.store=t.store,this.cache=t.cache,this.name=t.name,this.triggerToNodes=t.triggerToNodes??this.triggerToNodes,this.userInterrupt=t.userInterrupt,this.autoValidate&&this.validate()}withConfig(t){let e=xn(this.config,t);return new this.constructor({...this,config:e})}validate(){nNt({nodes:this.nodes,channels:this.channels,outputChannels:this.outputChannels,inputChannels:this.inputChannels,streamChannels:this.streamChannels,interruptAfterNodes:this.interruptAfter,interruptBeforeNodes:this.interruptBefore});for(let[t,e]of Object.entries(this.nodes))for(let I of e.triggers)this.triggerToNodes[I]??=[],this.triggerToNodes[I].push(t);return this}get streamChannelsList(){return Array.isArray(this.streamChannels)?this.streamChannels:this.streamChannels?[this.streamChannels]:Object.keys(this.channels)}get streamChannelsAsIs(){return this.streamChannels?this.streamChannels:Object.keys(this.channels)}async getGraphAsync(t){return this.getGraph(t)}*getSubgraphs(t,e){for(let[I,l]of Object.entries(this.nodes)){if(t!==void 0&&!t.startsWith(I))continue;let n=l.subgraphs?.length?l.subgraphs:[l.bound];for(let a of n){let c=Cse(a);if(c!==void 0){if(I===t){yield[I,c];return}if(t===void 0&&(yield[I,c]),e){let r=t;t!==void 0&&(r=t.slice(I.length+1));for(let[s,i]of c.getSubgraphs(r,e))yield[`${I}|${s}`,i]}}}}}async*getSubgraphsAsync(t,e){yield*this.getSubgraphs(t,e)}async _prepareStateSnapshot({config:t,saved:e,subgraphCheckpointer:I,applyPendingWrites:l=!1}){if(e===void 0)return{values:{},next:[],config:t,tasks:[]};let n=cQ(this.channels,e.checkpoint);if(e.pendingWrites?.length){let d=e.pendingWrites.filter(([u,b])=>u===GZ).map(([u,b,Z])=>[String(b),Z]);d.length>0&&Pu(e.checkpoint,n,[{name:rF,writes:d,triggers:[]}],void 0,this.triggerToNodes)}let a=Object.values(oQ(e.checkpoint,e.pendingWrites,this.nodes,n,e.config,!0,{step:(e.metadata?.step??-1)+1,store:this.store})),c=await o0(this.getSubgraphsAsync()),r=e.config.configurable?.checkpoint_ns??"",s={};for(let d of a){let u=c.find(([Z])=>Z===d.name);if(!u)continue;let b=`${String(d.name)}:${d.id}`;if(r&&(b=`${r}|${b}`),I===void 0){let Z={configurable:{thread_id:e.config.configurable?.thread_id,checkpoint_ns:b}};s[d.id]=Z}else{let Z={configurable:{[a0]:I,thread_id:e.config.configurable?.thread_id,checkpoint_ns:b}},p=u[1];s[d.id]=await p.getState(Z,{subgraphs:!0})}}if(l&&e.pendingWrites?.length){let d=Object.fromEntries(a.map(b=>[b.id,b]));for(let[b,Z,p]of e.pendingWrites)["__error__","__interrupt__",pC].includes(Z)||b in d&&d[b].writes.push([String(Z),p]);let u=a.filter(b=>b.writes.length>0);u.length>0&&Pu(e.checkpoint,n,u,void 0,this.triggerToNodes)}let i=e?.metadata;i&&e?.config?.configurable?.thread_id&&(i={...i,thread_id:e.config.configurable.thread_id});let G=a.filter(d=>d.writes.length===0).map(d=>d.name);return{values:G0(n,this.streamChannelsAsIs),next:G,tasks:xJe(a,e?.pendingWrites??[],s,this.streamChannelsAsIs),metadata:i,config:sQ(e.config,e.metadata),createdAt:e.checkpoint.ts,parentConfig:e.parentConfig}}async getState(t,e){let I=t.configurable?.__pregel_checkpointer??this.checkpointer;if(!I)throw new lQ("No checkpointer set",{lc_error_code:"MISSING_CHECKPOINTER"});let l=t.configurable?.checkpoint_ns??"";if(l!==""&&t.configurable?.__pregel_checkpointer===void 0){let c=gse(l);for await(let[r,s]of this.getSubgraphsAsync(c,!0))if(r===c)return await s.getState(wC(t,{[a0]:I}),{subgraphs:e?.subgraphs})}let n=xn(this.config,t),a=await I.getTuple(t);return await this._prepareStateSnapshot({config:n,saved:a,subgraphCheckpointer:e?.subgraphs?I:void 0,applyPendingWrites:!t.configurable?.checkpoint_id})}async*getStateHistory(t,e){let I=t.configurable?.__pregel_checkpointer??this.checkpointer;if(!I)throw new lQ("No checkpointer set",{lc_error_code:"MISSING_CHECKPOINTER"});let l=t.configurable?.checkpoint_ns??"";if(l!==""&&t.configurable?.__pregel_checkpointer===void 0){let a=gse(l);for await(let[c,r]of this.getSubgraphsAsync(a,!0))if(c===a){yield*r.getStateHistory(wC(t,{[a0]:I}),e);return}}let n=xn(this.config,t,{configurable:{checkpoint_ns:l}});for await(let a of I.list(n,e))yield this._prepareStateSnapshot({config:a.config,saved:a})}async bulkUpdateState(t,e){let I=t.configurable?.__pregel_checkpointer??this.checkpointer;if(!I)throw new lQ("No checkpointer set",{lc_error_code:"MISSING_CHECKPOINTER"});if(e.length===0)throw new Error("No supersteps provided");if(e.some(c=>c.updates.length===0))throw new Error("No updates provided");let l=t.configurable?.checkpoint_ns??"";if(l!==""&&t.configurable?.__pregel_checkpointer===void 0){let c=gse(l);for await(let[,r]of this.getSubgraphsAsync(c,!0))return await r.bulkUpdateState(wC(t,{[a0]:I}),e);throw new Error(`Subgraph "${c}" not found`)}let n=async(c,r)=>{let s=this.config?xn(this.config,c):c,i=await I.getTuple(s),G=i!==void 0?zp(i.checkpoint):AC(),d={...i?.checkpoint.channel_versions},u=i?.metadata?.step??-1,b=wC(s,{checkpoint_ns:s.configurable?.checkpoint_ns??""}),Z=s.metadata??{};i?.config.configurable&&(b=wC(s,i.config.configurable),Z={...i.metadata,...Z});let{values:p,asNode:W}=r[0];if(p==null&&W===void 0){if(r.length>1)throw new bl("Cannot create empty checkpoint with multiple updates");return sQ(await I.put(b,r0(G,void 0,u),{source:"update",step:u+1,parents:i?.metadata?.parents??{}},{}),i?i.metadata:void 0)}let h=cQ(this.channels,G);if(p===null&&W==="__end__"){if(r.length>1)throw new bl("Cannot apply multiple updates when clearing state");if(i){let y=oQ(G,i.pendingWrites||[],this.nodes,h,i.config,!0,{step:(i.metadata?.step??-1)+1,checkpointer:I,store:this.store}),w=(i.pendingWrites||[]).filter(H=>H[0]===GZ).map(H=>H.slice(1));w.length>0&&Pu(G,h,[{name:rF,writes:w,triggers:[]}],I.getNextVersion.bind(I),this.triggerToNodes);for(let[H,f,L]of i.pendingWrites||[])["__error__","__interrupt__",pC].includes(f)||H in y&&y[H].writes.push([f,L]);Pu(G,h,Object.values(y),I.getNextVersion.bind(I),this.triggerToNodes)}return sQ(await I.put(b,r0(G,h,u),{...Z,source:"update",step:u+1,parents:i?.metadata?.parents??{}},T3(d,G.channel_versions)),i?i.metadata:void 0)}if(W==="__copy__"){if(r.length>1)throw new bl("Cannot copy checkpoint with multiple updates");if(i==null)throw new bl("Cannot copy a non-existent checkpoint");let y=f=>!Array.isArray(f)||f.length===0?!1:f.every(L=>Array.isArray(L)&&L.length===2),w=r0(G,void 0,u),H=await I.put(i.parentConfig??wC(i.config,{checkpoint_id:void 0}),w,{source:"fork",step:u+1,parents:i.metadata?.parents??{}},{});if(y(p)){let f=oQ(w,i.pendingWrites,this.nodes,h,H,!1,{step:u+2}),L=Object.values(f).reduce((U,{name:T,id:q})=>(U[T]??=[],U[T].push({id:q}),U),{}),k=p.reduce((U,T)=>{let[q,_]=T;U[_]??=[];let $=U[_].length,ee=L[_]?.[$]?.id;return U[_].push({values:q,asNode:_,taskId:ee}),U},{});return n(sQ(H,i.metadata),Object.values(k).flat())}return sQ(H,i.metadata)}if(W==="__input__"){if(r.length>1)throw new bl("Cannot apply multiple updates when updating as input");let y=await o0(Lse(this.inputChannels,p));if(y.length===0)throw new bl(`Received no input writes for ${JSON.stringify(this.inputChannels,null,2)}`);Pu(G,h,[{name:rF,writes:y,triggers:[]}],I.getNextVersion.bind(this.checkpointer),this.triggerToNodes);let w=i?.metadata?.step!=null?i.metadata.step+1:-1,H=await I.put(b,r0(G,h,w),{source:"input",step:w,parents:i?.metadata?.parents??{}},T3(d,G.channel_versions));return await I.putWrites(H,y,SX(rF,G.id)),sQ(H,i?i.metadata:void 0)}if(s.configurable?.checkpoint_id===void 0&&i?.pendingWrites!==void 0&&i.pendingWrites.length>0){let y=oQ(G,i.pendingWrites,this.nodes,h,i.config,!0,{store:this.store,checkpointer:this.checkpointer,step:(i.metadata?.step??-1)+1}),w=(i.pendingWrites??[]).filter(f=>f[0]===GZ).map(f=>f.slice(1));w.length>0&&Pu(i.checkpoint,h,[{name:rF,writes:w,triggers:[]}],void 0,this.triggerToNodes);for(let[f,L,k]of i.pendingWrites)["__error__","__interrupt__",pC].includes(L)||y[f]===void 0||y[f].writes.push([L,k]);let H=Object.values(y).filter(f=>f.writes.length>0);H.length>0&&Pu(G,h,H,void 0,this.triggerToNodes)}let N=Object.values(G.versions_seen).map(y=>Object.values(y)).flat().find(y=>!!y),V=[];if(r.length===1){let{values:y,asNode:w,taskId:H}=r[0];if(w===void 0&&Object.keys(this.nodes).length===1)[w]=Object.keys(this.nodes);else if(w===void 0&&N===void 0)typeof this.inputChannels=="string"&&this.nodes[this.inputChannels]!==void 0&&(w=this.inputChannels);else if(w===void 0){let f=Object.entries(G.versions_seen).map(([L,k])=>Object.values(k).map(U=>[U,L])).flat().filter(([L,k])=>k!==Va).sort(([L],[k])=>Nse(L,k));f&&(f.length===1?w=f[0][1]:f[f.length-1][0]!==f[f.length-2][0]&&(w=f[f.length-1][1]))}if(w===void 0)throw new bl('Ambiguous update, specify "asNode"');V.push({values:y,asNode:w,taskId:H})}else for(let{asNode:y,values:w,taskId:H}of r){if(y==null)throw new bl('"asNode" is required when applying multiple updates');V.push({values:w,asNode:y,taskId:H})}let R=[];for(let{asNode:y,values:w,taskId:H}of V){if(this.nodes[y]===void 0)throw new bl(`Node "${y.toString()}" does not exist`);let f=this.nodes[y].getWriters();if(!f.length)throw new bl(`No writers found for node "${y.toString()}"`);R.push({name:y,input:w,proc:f.length>1?$r.from(f,{omitSequenceTags:!0}):f[0],writes:[],triggers:[Va],id:H??SX("__interrupt__",G.id),writers:[]})}for(let y of R)await y.proc.invoke(y.input,Nl({...s,store:s?.store??this.store},{runName:s.runName??`${this.getName()}UpdateState`,configurable:{[Jp]:w=>y.writes.push(...w),[n0]:(w,H=!1)=>HK(G,h,y,w,H)}}));for(let y of R){let w=y.writes.filter(H=>H[0]!==kp);i!==void 0&&w.length>0&&await I.putWrites(b,w,y.id)}Pu(G,h,R,I.getNextVersion.bind(this.checkpointer),this.triggerToNodes);let F=T3(d,G.channel_versions),v=await I.put(b,r0(G,h,u+1),{source:"update",step:u+1,parents:i?.metadata?.parents??{}},F);for(let y of R){let w=y.writes.filter(H=>H[0]===kp);w.length>0&&await I.putWrites(v,w,y.id)}return sQ(v,i?i.metadata:void 0)},a=t;for(let{updates:c}of e)a=await n(a,c);return a}async updateState(t,e,I){return this.bulkUpdateState(t,[{updates:[{values:e,asNode:I}]}])}_defaults(t){let{debug:e,streamMode:I,inputKeys:l,outputKeys:n,interruptAfter:a,interruptBefore:c,...r}=t,s=!0,i=e!==void 0?e:this.debug,G=n;G===void 0?G=this.streamChannelsAsIs:_Je(G,this.channels);let d=l;d===void 0?d=this.inputChannels:_Je(d,this.channels);let u=c??this.interruptBefore??[],b=a??this.interruptAfter??[],Z;I!==void 0?(Z=Array.isArray(I)?I:[I],s=typeof I=="string"):(t.configurable?.__pregel_task_id!==void 0?Z=["values"]:Z=this.streamMode,s=!0);let p;if(this.checkpointer===!1)p=void 0;else if(t!==void 0&&t.configurable?.__pregel_checkpointer!==void 0)p=t.configurable[a0];else{if(this.checkpointer===!0)throw new Error("checkpointer: true cannot be used for root graphs.");p=this.checkpointer}let W=t.store??this.store,h=t.cache??this.cache;if(t.durability!=null&&t.checkpointDuring!=null)throw new Error("Cannot use both `durability` and `checkpointDuring` at the same time.");let N=(()=>{if(t.checkpointDuring!=null)return t.checkpointDuring===!1?"exit":"async"})(),V=t.durability??N??t?.configurable?.__pregel_durability??"async";return[i,Z,d,G,r,u,b,p,W,s,h,V]}async stream(t,e){let I=new AbortController,l={recursionLimit:this.config?.recursionLimit,...e,signal:_3(e?.signal,I.signal).signal},n=await super.stream(t,l);return new OJe(e?.encoding==="text/event-stream"?TWt(n):n,I)}streamEvents(t,e,I){let l=new AbortController,n={recursionLimit:this.config?.recursionLimit,...e,callbacks:HWt(this.config?.callbacks,e?.callbacks),signal:_3(e?.signal,l.signal).signal};return new OJe(super.streamEvents(t,n,I),l)}async _validateInput(t){return t}async _validateContext(t){return t}async*_streamIterator(t,e){let I="version"in(e??{})?void 0:e?.encoding??void 0,l=e?.subgraphs,n=j3(this.config,e);if(n.recursionLimit===void 0||n.recursionLimit<1)throw new Error('Passed "recursionLimit" must be at least 1.');if(this.checkpointer!==void 0&&this.checkpointer!==!1&&n.configurable===void 0)throw new Error('Checkpointer requires one or more of the following "configurable" keys: "thread_id", "checkpoint_ns", "checkpoint_id"');let a=await this._validateInput(t),{runId:c,...r}=n,[s,i,,G,d,u,b,Z,p,W,h,N]=this._defaults(r);d.metadata={ls_integration:"langgraph",...d.metadata},typeof d.context<"u"?d.context=await this._validateContext(d.context):d.configurable=await this._validateContext(d.configurable);let V=new Ose({modes:new Set(i)});if(this.checkpointer===!0){d.configurable??={};let f=d.configurable.checkpoint_ns??"";d.configurable[Cp]=f.split("|").map(L=>L.split(":")[0]).join("|")}if(i.includes("messages")){let f=new PWt(k=>V.push(k)),{callbacks:L}=d;if(L===void 0)d.callbacks=[f];else if(Array.isArray(L))d.callbacks=L.concat(f);else{let k=L.copy();k.addHandler(f,!0),d.callbacks=k}}if(i.includes("tools")){let f=new SWt(k=>V.push(k)),{callbacks:L}=d;if(L===void 0)d.callbacks=[f];else if(Array.isArray(L))d.callbacks=L.concat(f);else{let k=L.copy();k.addHandler(f,!0),d.callbacks=k}}d.writer??=f=>{if(!i.includes("custom"))return;let L=Xse()?.configurable?.[Cp]?.split("|").slice(0,-1);V.push([L??[],"custom",f])},d.interrupt??=this.userInterrupt??B3,d.serverInfo==null&&(d.serverInfo=pMI(d));let R=await(await lr._configureSync(d?.callbacks,void 0,d?.tags,void 0,d?.metadata,void 0,{tracerInheritableMetadata:NMI(d)}))?.handleChainStart(this.toJSON(),wWt(t,"input"),c,void 0,void 0,void 0,d?.runName??this.getName()),F=AK(this.channels),v,y,H=(async()=>{try{v=await _Wt.initialize({input:a,config:d,checkpointer:Z,nodes:this.nodes,channelSpecs:F,outputKeys:G,streamKeys:this.streamChannelsAsIs,store:p,cache:h,stream:V,interruptAfter:b,interruptBefore:u,manager:R,debug:this.debug,triggerToNodes:this.triggerToNodes,durability:N});let f=new tNt({loop:v,nodeFinished:d.configurable?.[ZZt]});e?.subgraphs&&(v.config.configurable={...v.config.configurable,[lK]:v.stream}),await this._runLoop({loop:v,runner:f,debug:s,config:d}),N==="sync"&&await Promise.all(v?.checkpointerPromises??[])}catch(f){y=f}finally{try{v&&(await v.store?.stop(),await v.cache?.stop()),await Promise.all(v?.checkpointerPromises??[])}catch(f){y=y??f}y?V.error(y):V.close()}})();try{for await(let f of V){if(f===void 0)throw new Error("Data structure error.");let[L,k,U]=f;if(i.includes(k)){if(I==="text/event-stream"){l?yield[L,k,U]:yield[null,k,U];continue}l&&!W?yield[L,k,U]:W?l?yield[L,U]:yield U:yield[k,U]}}}catch(f){throw await R?.handleChainError(y),f}finally{await H}await R?.handleChainEnd(v?.output??{},c,void 0,void 0,void 0)}async invoke(t,e){let I=e?.streamMode??"values",l={...e,outputKeys:e?.outputKeys??this.outputChannels,streamMode:I,encoding:void 0},n=[],a=await this.stream(t,l),c=[],r;for await(let s of a)I==="values"?F3(s)?c.push(s[Va]):r=s:n.push(s);if(I==="values"){if(c.length>0){let s=c.flat(1);if(r==null)return{[Va]:s};if(typeof r=="object")return{...r,[Va]:s}}return r}return n}async _runLoop(t){let{loop:e,runner:I,debug:l,config:n}=t,a;try{for(;await e.tick({inputKeys:this.inputChannels});){for(let{task:c}of await e._matchCachedWrites())e._outputWrites(c.id,c.writes,!0);l&&OWt(e.checkpointMetadata.step,e.channels,this.streamChannelsList),l&&Use(e.step,Object.values(e.tasks)),await I.tick({timeout:this.stepTimeout,retryPolicy:this.retryPolicy,onStepWrite:(c,r)=>{l&&zWt(c,r,this.streamChannelsList)},maxConcurrency:n.maxConcurrency,signal:n.signal})}if(e.status==="out_of_steps")throw new Ure([`Recursion limit of ${n.recursionLimit} reached`,"without hitting a stop condition. You can increase the",'limit by setting the "recursionLimit" config key.'].join(" "),{lc_error_code:"GRAPH_RECURSION_LIMIT"})}catch(c){if(a=c,!await e.finishAndHandleError(a))throw c}finally{a===void 0&&await e.finishAndHandleError()}}async clearCache(){await this.cache?.clear([])}};hMI=new Set(["key","token","secret","password","auth"])});var d0,JK=g(()=>{o();ts();qu();d0=class sNt extends _s{lc_graph_name="EphemeralValue";guard;value=[];constructor(e=!0){super(),this.guard=e}fromCheckpoint(e){let I=new sNt(this.guard);return typeof e<"u"&&(I.value=[e]),I}update(e){if(e.length===0){let I=this.value.length>0;return this.value=[],I}if(e.length!==1&&this.guard)throw new bl("EphemeralValue can only receive one value per step.");return this.value=[e[e.length-1]],!0}get(){if(this.value.length===0)throw new Fn;return this.value[0]}checkpoint(){if(this.value.length===0)throw new Fn;return this.value[0]}isAvailable(){return this.value.length!==0}}});function oNt(t){return typeof t.attachNode=="function"&&typeof t.attachEdge=="function"}function iG(t){return t==="subgraph"?`"${t}"`:t}var PJe,Mse,$Je,Sse=g(()=>{o();gc();ts();DX();HC();S3();yK();qJe();JK();Xc();lce();sG();Dre();PJe=class{path;ends;constructor(t){tI.isRunnable(t.path)?this.path=t.path:this.path=rr(t.path),this.ends=Array.isArray(t.pathMap)?t.pathMap.reduce((e,I)=>(e[I]=I,e),{}):t.pathMap}run(t,e){return Qr.registerWriter(new oG({name:"",trace:!1,func:async(I,l)=>{try{return await this._route(I,l,t,e)}catch(n){throw n.name===aK.unminifiable_name&&console.warn(`[WARN]: 'NodeInterrupt' thrown in conditional edge. This is likely a bug in your graph implementation. +NodeInterrupt should only be thrown inside a node, not in edge conditions.`),n}}}))}async _route(t,e,I,l){let n=await this.path.invoke(l?l(e):t,e);Array.isArray(n)||(n=[n]);let a;if(this.ends?a=n.map(c=>Ys(c)?c:this.ends[c]):a=n,a.some(c=>!c))throw new Error("Branch condition returned unknown or null destination");if(a.filter(Ys).some(c=>c.node==="__end__"))throw new bl("Cannot send a packet to the END node");return await I(a,e)??t}},Mse=class{nodes;edges;branches;entryPoint;compiled=!1;constructor(){this.nodes={},this.edges=new Set,this.branches={}}warnIfCompiled(t){this.compiled&&console.warn(t)}get allEdges(){return this.edges}addNode(...t){function e(l){return l.length>=1&&typeof l[0]!="string"}let I=e(t)?Array.isArray(t[0])?t[0]:Object.entries(t[0]):[[t[0],t[1],t[2]]];if(I.length===0)throw new Error("No nodes provided in `addNode`");for(let[l,n,a]of I){for(let r of["|",":"])if(l.includes(r))throw new Error(`"${r}" is a reserved character and is not allowed in node names.`);if(this.warnIfCompiled("Adding a node to a graph that has already been compiled. This will not be reflected in the compiled graph."),l in this.nodes)throw new Error(`Node \`${l}\` already present.`);if(l==="__end__")throw new Error(`Node \`${l}\` is reserved.`);let c=rr(n);this.nodes[l]={runnable:c,metadata:a?.metadata,subgraphs:vK(c)?[c]:a?.subgraphs,ends:a?.ends}}return this}addEdge(t,e){if(this.warnIfCompiled("Adding an edge to a graph that has already been compiled. This will not be reflected in the compiled graph."),t==="__end__")throw new Error("END cannot be a start node");if(e==="__start__")throw new Error("START cannot be an end node");if(Array.from(this.edges).some(([I])=>I===t)&&!("channels"in this))throw new Error(`Already found path for ${t}. For multiple edges, use StateGraph.`);return this.edges.add([t,e]),this}addConditionalEdges(t,e,I){let l=typeof t=="object"?t:{source:t,path:e,pathMap:I};this.warnIfCompiled("Adding an edge to a graph that has already been compiled. This will not be reflected in the compiled graph."),tI.isRunnable(l.path)||(l.path=rr(l.path));let n=l.path.getName()==="RunnableLambda"?"condition":l.path.getName();if(this.branches[l.source]&&this.branches[l.source][n])throw new Error(`Condition \`${n}\` already present for node \`${t}\``);return this.branches[l.source]??={},this.branches[l.source][n]=new PJe(l),this}setEntryPoint(t){return this.warnIfCompiled("Setting the entry point of a graph that has already been compiled. This will not be reflected in the compiled graph."),this.addEdge(Kn,t)}setFinishPoint(t){return this.warnIfCompiled("Setting a finish point of a graph that has already been compiled. This will not be reflected in the compiled graph."),this.addEdge(t,jI)}compile({checkpointer:t,interruptBefore:e,interruptAfter:I,name:l}={}){this.validate([...Array.isArray(e)?e:[],...Array.isArray(I)?I:[]]);let n=new $Je({builder:this,checkpointer:t,interruptAfter:I,interruptBefore:e,autoValidate:!1,nodes:{},channels:{[Kn]:new d0,[jI]:new d0},inputChannels:Kn,outputChannels:jI,streamChannels:[],streamMode:"values",name:l});for(let[a,c]of Object.entries(this.nodes))n.attachNode(a,c);for(let[a,c]of this.edges)n.attachEdge(a,c);for(let[a,c]of Object.entries(this.branches))for(let[r,s]of Object.entries(c))n.attachBranch(a,r,s);return n.validate()}validate(t){let e=new Set([...this.allEdges].map(([l,n])=>l));for(let[l]of Object.entries(this.branches))e.add(l);for(let l of e)if(l!=="__start__"&&!(l in this.nodes))throw new Error(`Found edge starting at unknown node \`${l}\``);let I=new Set([...this.allEdges].map(([l,n])=>n));for(let[l,n]of Object.entries(this.branches))for(let a of Object.values(n))if(a.ends!=null)for(let c of Object.values(a.ends))I.add(c);else{I.add(jI);for(let c of Object.keys(this.nodes))c!==l&&I.add(c)}for(let l of Object.values(this.nodes))for(let n of l.ends??[])I.add(n);for(let l of Object.keys(this.nodes))if(!I.has(l))throw new zre([`Node \`${l}\` is not reachable.`,"","If you are returning Command objects from your node,",'make sure you are passing names of potential destination nodes as an "ends" array','into ".addNode(..., { ends: ["node1", "node2"] })".'].join(` +`),{lc_error_code:"UNREACHABLE_NODE"});for(let l of I)if(l!=="__end__"&&!(l in this.nodes))throw new Error(`Found edge ending at unknown node \`${l}\``);if(t){for(let l of t)if(!(l in this.nodes))throw new Error(`Interrupt node \`${l}\` is not present`)}this.compiled=!0}},$Je=class extends Bse{builder;constructor({builder:t,...e}){super(e),this.builder=t}attachNode(t,e){this.channels[t]=new d0,this.nodes[t]=new i0({channels:[],triggers:[],metadata:e.metadata,subgraphs:e.subgraphs,ends:e.ends}).pipe(e.runnable).pipe(new Qr([{channel:t,value:Bb}],[Vs])),this.streamChannels.push(t)}attachEdge(t,e){if(e==="__end__"){if(t==="__start__")throw new Error("Cannot have an edge from START to END");this.nodes[t].writers.push(new Qr([{channel:jI,value:Bb}],[Vs]))}else this.nodes[e].triggers.push(t),this.nodes[e].channels.push(t)}attachBranch(t,e,I){t==="__start__"&&!this.nodes.__start__&&(this.nodes[Kn]=rNt.subscribeTo(Kn,{tags:[Vs]})),this.nodes[t].pipe(I.run(n=>new Qr(n.map(a=>Ys(a)?a:{channel:a==="__end__"?jI:`branch:${t}:${e}:${a}`,value:Bb}),[Vs])));let l=I.ends?Object.values(I.ends):Object.keys(this.nodes);for(let n of l)if(n!=="__end__"){let a=`branch:${t}:${e}:${n}`;this.channels[a]=new d0,this.nodes[n].triggers.push(a),this.nodes[n].channels.push(a)}}async getGraphAsync(t){let e=t?.xray,I=new _J,l={[Kn]:I.addNode({schema:ae.any()},Kn)},n={},a={};e&&(a=Object.fromEntries((await o0(this.getSubgraphsAsync())).filter(s=>oNt(s[1]))));function c(s,i,G,d=!1){if(i==="__end__"&&n.__end__===void 0&&(n[jI]=I.addNode({schema:ae.any()},jI)),l[s]!==void 0){if(n[i]===void 0)throw new Error(`End node ${i} not found!`);return I.addEdge(l[s],n[i],G!==i?G:void 0,d)}}for(let[s,i]of Object.entries(this.builder.nodes)){let G=iG(s),d=i.runnable,u=i.metadata??{};if(this.interruptBefore?.includes(s)&&this.interruptAfter?.includes(s)?u.__interrupt="before,after":this.interruptBefore?.includes(s)?u.__interrupt="before":this.interruptAfter?.includes(s)&&(u.__interrupt="after"),e){let b=typeof e=="number"?e-1:e,Z=a[s]!==void 0?await a[s].getGraphAsync({...t,xray:b}):d.getGraph(t);if(Z.trimFirstNode(),Z.trimLastNode(),Object.keys(Z.nodes).length>1){let h=function(V){return V?V.lc_runnable:!1},N=function(V,R){if(V!==void 0&&!g3(V))return V;if(h(R))try{let F=R.getName();return F=F.startsWith("Runnable")?F.slice(8):F,F}catch{return R.getName()}else return R.name??"UnknownSchema"},[p,W]=I.extend(Z,G);if(p===void 0)throw new Error(`Could not extend subgraph "${s}" due to missing entrypoint.`);W!==void 0&&(l[G]={name:N(W.id,W.data),...W}),n[G]={name:N(p.id,p.data),...p}}else{let p=I.addNode(d,G,u);l[G]=p,n[G]=p}}else{let b=I.addNode(d,G,u);l[G]=b,n[G]=b}}let r=[...this.builder.allEdges].sort(([s],[i])=>ss?1:0);for(let[s,i]of r)c(iG(s),iG(i));for(let[s,i]of Object.entries(this.builder.branches)){let G={...Object.fromEntries(Object.keys(this.builder.nodes).filter(d=>d!==s).map(d=>[iG(d),iG(d)])),[jI]:jI};for(let d of Object.values(i)){let u;d.ends!==void 0?u=d.ends:u=G;for(let[b,Z]of Object.entries(u))c(iG(s),iG(Z),b,!0)}}for(let[s,i]of Object.entries(this.builder.nodes))if(i.ends!==void 0)for(let G of i.ends)c(iG(s),iG(G),void 0,!0);return I}getGraph(t){let e=t?.xray,I=new _J,l={[Kn]:I.addNode({schema:ae.any()},Kn)},n={},a={};e&&(a=Object.fromEntries(yC(this.getSubgraphs()).filter(s=>oNt(s[1]))));function c(s,i,G,d=!1){return i==="__end__"&&n.__end__===void 0&&(n[jI]=I.addNode({schema:ae.any()},jI)),I.addEdge(l[s],n[i],G!==i?G:void 0,d)}for(let[s,i]of Object.entries(this.builder.nodes)){let G=iG(s),d=i.runnable,u=i.metadata??{};if(this.interruptBefore?.includes(s)&&this.interruptAfter?.includes(s)?u.__interrupt="before,after":this.interruptBefore?.includes(s)?u.__interrupt="before":this.interruptAfter?.includes(s)&&(u.__interrupt="after"),e){let b=typeof e=="number"?e-1:e,Z=a[s]!==void 0?a[s].getGraph({...t,xray:b}):d.getGraph(t);if(Z.trimFirstNode(),Z.trimLastNode(),Object.keys(Z.nodes).length>1){let h=function(V){return V?V.lc_runnable:!1},N=function(V,R){if(V!==void 0&&!g3(V))return V;if(h(R))try{let F=R.getName();return F=F.startsWith("Runnable")?F.slice(8):F,F}catch{return R.getName()}else return R.name??"UnknownSchema"},[p,W]=I.extend(Z,G);if(p===void 0)throw new Error(`Could not extend subgraph "${s}" due to missing entrypoint.`);W!==void 0&&(l[G]={name:N(W.id,W.data),...W}),n[G]={name:N(p.id,p.data),...p}}else{let p=I.addNode(d,G,u);l[G]=p,n[G]=p}}else{let b=I.addNode(d,G,u);l[G]=b,n[G]=b}}let r=[...this.builder.allEdges].sort(([s],[i])=>ss?1:0);for(let[s,i]of r)c(iG(s),iG(i));for(let[s,i]of Object.entries(this.builder.branches)){let G={...Object.fromEntries(Object.keys(this.builder.nodes).filter(d=>d!==s).map(d=>[iG(d),iG(d)])),[jI]:jI};for(let d of Object.values(i)){let u;d.ends!==void 0?u=d.ends:u=G;for(let[b,Z]of Object.entries(u))c(iG(s),iG(Z),b,!0)}}return I}}});function pF(t){return typeof t=="object"&&t!==null&&"~standard"in t&&typeof t["~standard"]=="object"&&t["~standard"]!==null&&"validate"in t["~standard"]}function eCe(t){return typeof t=="object"&&t!==null&&"~standard"in t&&typeof t["~standard"]=="object"&&t["~standard"]!==null&&"jsonSchema"in t["~standard"]}function iNt(t){return pF(t)&&eCe(t)}var CK=g(()=>{o()});function PX(t){if(eCe(t))try{return t["~standard"].jsonSchema.input({target:"draft-07"})}catch{return}}function $X(t){if(t!=null&&pF(t))try{let e=t["~standard"].validate(void 0);if(e&&typeof e=="object"&&!("then"in e&&typeof e.then=="function")){let I=e;if(!I.issues){let l=I.value;return()=>l}}}catch{}}var Tse=g(()=>{o();CK()});var tCe,LK,_se=g(()=>{o();ts();qu();tCe=Symbol.for("langgraph.channel.missing"),LK=class GNt extends _s{lc_graph_name="UntrackedValue";guard;_value=tCe;initialValueFactory;constructor(e){super(),this.guard=e?.guard??!0,this.initialValueFactory=e?.initialValueFactory,this.initialValueFactory&&(this._value=this.initialValueFactory())}fromCheckpoint(e){return new GNt({guard:this.guard,initialValueFactory:this.initialValueFactory})}update(e){if(e.length===0)return!1;if(e.length!==1&&this.guard)throw new bl("UntrackedValue(guard=true) can receive only one value per step. Use guard=false if you want to store any one of multiple values.",{lc_error_code:"INVALID_CONCURRENT_GRAPH_UPDATE"});return this._value=e[e.length-1],!0}get(){if(this._value===tCe)throw new Fn;return this._value}checkpoint(){}isAvailable(){return this._value!==tCe}}});var iQ,ICe,lCe,Kse=g(()=>{o();ts();qu();iQ=(t,e)=>t.size===e.size&&[...t].every(I=>e.has(I)),ICe=class dNt extends _s{lc_graph_name="NamedBarrierValue";names;seen;constructor(e){super(),this.names=e,this.seen=new Set}fromCheckpoint(e){let I=new dNt(this.names);return typeof e<"u"&&(I.seen=new Set(e)),I}update(e){let I=!1;for(let l of e)if(this.names.has(l))this.seen.has(l)||(this.seen.add(l),I=!0);else throw new bl(`Value ${JSON.stringify(l)} not in names ${JSON.stringify(this.names)}`);return I}get(){if(!iQ(this.names,this.seen))throw new Fn}checkpoint(){return[...this.seen]}consume(){return this.seen&&this.names&&iQ(this.seen,this.names)?(this.seen=new Set,!0):!1}isAvailable(){return!!this.names&&iQ(this.names,this.seen)}},lCe=class uNt extends _s{lc_graph_name="NamedBarrierValueAfterFinish";names;seen;finished;constructor(e){super(),this.names=e,this.seen=new Set,this.finished=!1}fromCheckpoint(e){let I=new uNt(this.names);if(typeof e<"u"){let[l,n]=e;I.seen=new Set(l),I.finished=n}return I}update(e){let I=!1;for(let l of e)if(this.names.has(l)&&!this.seen.has(l))this.seen.add(l),I=!0;else if(!this.names.has(l))throw new bl(`Value ${JSON.stringify(l)} not in names ${JSON.stringify(this.names)}`);return I}get(){if(!this.finished||!iQ(this.names,this.seen))throw new Fn}checkpoint(){return[[...this.seen],this.finished]}consume(){return this.finished&&this.seen&&this.names&&iQ(this.seen,this.names)?(this.seen=new Set,this.finished=!1,!0):!1}finish(){return!this.finished&&this.names&&iQ(this.names,this.seen)?(this.finished=!0,!0):!1}isAvailable(){return this.finished&&!!this.names&&iQ(this.names,this.seen)}}});var bNt=g(()=>{o();ts();qu()});var mNt=g(()=>{o();ts();qu();Kse()});var nCe=g(()=>{o();qu();k3();gC();DJe();JK();Kse();bNt();mNt();_se()});var aCe,Xo,D3=g(()=>{o();aCe=Symbol.for("langgraph.state.reduced_value"),Xo=class{[aCe]=!0;valueSchema;inputSchema;reducer;jsonSchemaExtra;constructor(t,e){this.reducer=e.reducer,this.jsonSchemaExtra=e.jsonSchemaExtra,this.valueSchema=t,this.inputSchema="inputSchema"in e?e.inputSchema:t,this.jsonSchemaExtra=e.jsonSchemaExtra}static isInstance(t){return typeof t=="object"&&t!==null&&aCe in t&&t[aCe]===!0}}});var ZNt,u0,kK=g(()=>{o();ZNt=Symbol.for("langgraph.state.untracked_value"),u0=class{[ZNt]=!0;schema;guard;constructor(t,e){this.schema=t,this.guard=e?.guard??!0}static isInstance(t){return typeof t=="object"&&t!==null&&ZNt in t}}});var cCe,vc,xK=g(()=>{o();k3();gC();CK();Tse();_se();nCe();D3();kK();cCe=Symbol.for("langgraph.state.state_schema"),vc=class{[cCe]=!0;constructor(t){this.fields=t}getChannels(){let t={};for(let[e,I]of Object.entries(this.fields))if(Xo.isInstance(I)){let l=$X(I.valueSchema);t[e]=new bF(I.reducer,l)}else if(u0.isInstance(I)){let l=I.schema?$X(I.schema):void 0;t[e]=new LK({guard:I.guard,initialValueFactory:l})}else if(pF(I))t[e]=new s0($X(I));else throw new Error(`Invalid state field "${e}": must be a schema, ReducedValue, UntrackedValue, or ManagedValue`);return t}getJsonSchema(){let t={},e=[];for(let[I,l]of Object.entries(this.fields)){let n;if(Xo.isInstance(l)?(n=PX(l.valueSchema),l.jsonSchemaExtra&&(n={...n??{},...l.jsonSchemaExtra})):u0.isInstance(l)?n=l.schema?PX(l.schema):void 0:pF(l)&&(n=PX(l)),n){t[I]=n;let a=!1;Xo.isInstance(l)?a=$X(l.valueSchema)!==void 0:u0.isInstance(l)?a=l.schema?$X(l.schema)!==void 0:!1:a=$X(l)!==void 0,a||e.push(I)}}return{type:"object",properties:t,required:e.length>0?e:void 0}}getInputJsonSchema(){let t={};for(let[e,I]of Object.entries(this.fields)){let l;Xo.isInstance(I)?(l=PX(I.inputSchema),I.jsonSchemaExtra&&(l={...l??{},...I.jsonSchemaExtra})):u0.isInstance(I)?l=I.schema?PX(I.schema):void 0:pF(I)&&(l=PX(I)),l&&(t[e]=l)}return{type:"object",properties:t}}getChannelKeys(){return Object.entries(this.fields).map(([t])=>t)}getAllKeys(){return Object.keys(this.fields)}async validateInput(t){if(t==null||typeof t!="object")return t;let e={};for(let[I,l]of Object.entries(t)){let n=this.fields[I];if(n===void 0){e[I]=l;continue}let a;if(Xo.isInstance(n)?a=n.inputSchema:u0.isInstance(n)?a=n.schema:pF(n)&&(a=n),a){let c=await a["~standard"].validate(l);if(c.issues)throw new Error(`Validation failed for field "${I}": ${JSON.stringify(c.issues)}`);e[I]=c.value}else e[I]=l}return e}static isInstance(t){return typeof t=="object"&&t!==null&&cCe in t&&t[cCe]===!0}}});function eg(t,e){let I=Array.isArray(t)?t:[t],l=Array.isArray(e)?e:[e],n=I.map(Zi),a=l.map(Zi);for(let G of n)(G.id===null||G.id===void 0)&&(G.id=_re(),G.lc_kwargs.id=G.id);let c;for(let G=0;G[G.id,d])),i=new Set;for(let G of a){let d=s.get(G.id);if(d!==void 0)mi.isInstance(G)?i.add(G.id):(i.delete(G.id),r[d]=G);else{if(mi.isInstance(G))throw new Error(`Attempting to delete a message with an ID that doesn't exist ('${G.id}')`);s.set(G.id,r.length),r.push(G)}}return r.filter(G=>!i.has(G.id))}var Dse,q3=g(()=>{o();Dre();NI();Dse="__remove_all__"});var P3,qse=g(()=>{o();D3();q3();sG();P3=new Xo(ae.custom().default(()=>[]),{inputSchema:ae.custom(),reducer:eg,jsonSchemaExtra:{langgraph_type:"messages",description:"A list of chat messages"}})});var pNt=g(()=>{o();qse()});var hNt=g(()=>{o();D3();kK()});var rCe=g(()=>{o();CK();Tse();D3();kK();xK();qse();pNt();hNt()});function $3(t,e){if(e.reducer&&!e.default){let I=BH(t);I!=null&&(e.default=I)}if(e.reducer){let I=Object.assign(t,{lg_reducer_schema:e.reducer?.schema??t});return hF.extend(I,()=>e),I}else return hF.extend(t,()=>e),t}var WNt,hF,ej=g(()=>{o();k3();gC();Wa();WNt=class{_map=new Map;_extensionCache=new Map;get(t){return this._map.get(t)}extend(t,e){let I=this.get(t);this._map.set(t,e(I))}remove(t){return this._map.delete(t),this}has(t){return this._map.has(t)}getChannelsForSchema(t){let e={},I=MR(t);for(let[l,n]of Object.entries(I)){let a=this.get(n);a?.reducer?e[l]=new bF(a.reducer.fn,a.default):e[l]=new s0(a?.default)}return e}getExtendedChannelSchemas(t,e){if(Object.keys(e).length===0)return t;let I=Object.entries(e).filter(([,a])=>a===!0).sort(([a],[c])=>a.localeCompare(c)).map(([a,c])=>`${a}:${c}`).join("|"),l=this._extensionCache.get(I)??new Map;if(l.has(t))return l.get(t);let n=t;if(e.withReducerSchema||e.withJsonSchemaExtrasAsDescription){let a=Object.entries(MR(t)).map(([c,r])=>{let s=this.get(r),i=e.withReducerSchema?s?.reducer?.schema??r:r;if(e.withJsonSchemaExtrasAsDescription&&s?.jsonSchemaExtra){let G=lZ(i)??lZ(r),d=JSON.stringify({...s.jsonSchemaExtra,description:G});i=i.describe(`lg:${d}`)}return[c,i]});n=Qae(t,Object.fromEntries(a)),Yc(n)&&(n._def.unknownKeys="strip")}return e.asPartial&&(n=zH(n)),l.set(t,n),this._extensionCache.set(I,l),n}},hF=new WNt});function fC(t){return t==null?!1:!!(vc.isInstance(t)||Rc(t)||typeof t=="object"&&"lc_graph_name"in t&&t.lc_graph_name==="AnnotationRoot"||typeof t=="object"&&!Array.isArray(t)&&Object.keys(t).length>0&&Object.values(t).every(e=>typeof e=="function"||YJe(e)))}function NNt(t){if(typeof t!="object"||t==null)return!1;let e=t,I="state"in e&&fC(e.state),l="stateSchema"in e&&fC(e.stateSchema),n="input"in e&&fC(e.input);return!(!I&&!l&&!n||"input"in e&&e.input!=null&&!fC(e.input)||"output"in e&&e.output!=null&&!fC(e.output))}var VNt=g(()=>{o();gc();qu();xK();Wa()});function VMI(t){let e={};for(let[I,l]of Object.entries(t))I===tg?e[I]=Fse(l):e[I]=Fse(l);return e}function YMI(t){return typeof t=="object"&&t!==null&&t.channels!==void 0}function RMI(t){if(Ys(t))return[t];let e=[];Zn(t)?e.push(t):Array.isArray(t)&&e.push(...t.filter(Zn));let I=[];for(let l of e){if(l.graph===An.PARENT)throw new cK(l);Ys(l.goto)||typeof l.goto=="string"?I.push(l.goto):Array.isArray(l.goto)&&I.push(...l.goto)}return I}function YNt(){return new PJe({path:new oG({func:RMI,tags:[Vs],trace:!1,recurse:!1,name:""})})}var tg,Pse,tj,sCe,$se=g(()=>{o();gc();ts();gC();FK();DX();HC();S3();yK();JK();Sse();Kse();xK();rCe();ej();VNt();Xc();Wa();tg="__root__",Pse=Symbol.for("langgraph.state.partial"),tj=class extends Mse{channels={};waitingEdges=new Set;_schemaDefinition;_schemaRuntimeDefinition;_inputDefinition;_inputRuntimeDefinition;_outputDefinition;_outputRuntimeDefinition;_schemaDefinitions=new Map;_metaRegistry=hF;_configSchema;_configRuntimeSchema;_interrupt;_writer;constructor(t,e){super();let I=this._normalizeToStateGraphInit(t,e),l=I.state??I.stateSchema??I.input;if(!l)throw new X3;let n=this._getChannelsFromSchema(l);this._schemaDefinition=n,vc.isInstance(l)?this._schemaRuntimeDefinition=l:Rc(l)&&(this._schemaRuntimeDefinition=l),I.input?vc.isInstance(I.input)?this._inputRuntimeDefinition=I.input:Rc(I.input)?this._inputRuntimeDefinition=I.input:this._inputRuntimeDefinition=Pse:this._inputRuntimeDefinition=Pse,I.output?vc.isInstance(I.output)?this._outputRuntimeDefinition=I.output:Rc(I.output)?this._outputRuntimeDefinition=I.output:this._outputRuntimeDefinition=this._schemaRuntimeDefinition:this._outputRuntimeDefinition=this._schemaRuntimeDefinition;let a=I.input?this._getChannelsFromSchema(I.input):n,c=I.output?this._getChannelsFromSchema(I.output):n;this._inputDefinition=a,this._outputDefinition=c,this._addSchema(this._schemaDefinition),this._addSchema(this._inputDefinition),this._addSchema(this._outputDefinition),I.context&&Rc(I.context)&&(this._configRuntimeSchema=I.context),this._interrupt=I.interrupt,this._writer=I.writer}_normalizeToStateGraphInit(t,e){if(NNt(t)){if(Rc(e)||Ase.isInstance(e))return{...t,context:e};let I=e;return{...t,input:t.input??I?.input,output:t.output??I?.output,context:t.context??I?.context,interrupt:t.interrupt??I?.interrupt,writer:t.writer??I?.writer,nodes:t.nodes??I?.nodes}}if(fC(t)){if(Rc(e)||Ase.isInstance(e))return{state:t,context:e};let I=e;return{state:t,input:I?.input,output:I?.output,context:I?.context,interrupt:I?.interrupt,writer:I?.writer,nodes:I?.nodes}}if(YMI(t))return{state:VMI(t.channels)};throw new X3}_getChannelsFromSchema(t){if(vc.isInstance(t))return t.getChannels();if(Rc(t))return this._metaRegistry.getChannelsForSchema(t);if(typeof t=="object"&&"lc_graph_name"in t&&t.lc_graph_name==="AnnotationRoot")return t.spec;if(typeof t=="object"&&!Array.isArray(t)&&Object.keys(t).length>0)return t;throw new X3("Invalid schema type. Expected StateSchema, Zod object, AnnotationRoot, or StateDefinition.")}get allEdges(){return new Set([...this.edges,...Array.from(this.waitingEdges).flatMap(([t,e])=>t.map(I=>[I,e]))])}_addSchema(t){if(!this._schemaDefinitions.has(t)){this._schemaDefinitions.set(t,t);for(let[e,I]of Object.entries(t)){let l;if(typeof I=="function"?l=I():l=I,this.channels[e]!==void 0){if(!this.channels[e].equals(l)&&l.lc_graph_name!=="LastValue")throw new Error(`Channel "${e}" already exists with a different type.`)}else this.channels[e]=l}}}addNode(...t){function e(l){return l.length>=1&&typeof l[0]!="string"}let I=e(t)?Array.isArray(t[0])?t[0]:Object.entries(t[0]).map(([l,n])=>[l,n]):[[t[0],t[1],t[2]]];if(I.length===0)throw new Error("No nodes provided in `addNode`");for(let[l,n,a]of I){if(l in this.channels)throw new Error(`${l} is already being used as a state attribute (a.k.a. a channel), cannot also be used as a node name.`);for(let G of["|",":"])if(l.includes(G))throw new Error(`"${G}" is a reserved character and is not allowed in node names.`);if(this.warnIfCompiled("Adding a node to a graph that has already been compiled. This will not be reflected in the compiled graph."),l in this.nodes)throw new Error(`Node \`${l}\` already present.`);if(l==="__end__"||l==="__start__")throw new Error(`Node \`${l}\` is reserved.`);let c=this._schemaDefinition;a?.input!==void 0&&(c=this._getChannelsFromSchema(a.input)),this._addSchema(c);let r;tI.isRunnable(n)?r=n:typeof n=="function"?r=new oG({func:n,name:l,trace:!1}):r=rr(n);let s=a?.cachePolicy;typeof s=="boolean"&&(s=s?{}:void 0);let i={runnable:r,retryPolicy:a?.retryPolicy,cachePolicy:s,metadata:a?.metadata,input:c??this._schemaDefinition,subgraphs:vK(r)?[r]:a?.subgraphs,ends:a?.ends,defer:a?.defer};this.nodes[l]=i}return this}addEdge(t,e){if(typeof t=="string")return super.addEdge(t,e);this.compiled&&console.warn("Adding an edge to a graph that has already been compiled. This will not be reflected in the compiled graph.");for(let I of t){if(I==="__end__")throw new Error("END cannot be a start node");if(!Object.keys(this.nodes).some(l=>l===I))throw new Error(`Need to add a node named "${I}" first`)}if(e==="__end__")throw new Error("END cannot be an end node");if(!Object.keys(this.nodes).some(I=>I===e))throw new Error(`Need to add a node named "${e}" first`);return this.waitingEdges.add([t,e]),this}addSequence(t){let e=Array.isArray(t)?t:Object.entries(t);if(e.length===0)throw new Error("Sequence requires at least one node.");let I;for(let[l,n,a]of e){if(l in this.nodes)throw new Error(`Node names must be unique: node with the name "${l}" already exists.`);let c=l;this.addNode(c,n,a),I!=null&&this.addEdge(I,c),I=c}return this}compile({checkpointer:t,store:e,cache:I,interruptBefore:l,interruptAfter:n,name:a,description:c}={}){this.validate([...Array.isArray(l)?l:[],...Array.isArray(n)?n:[]]);let r=Object.keys(this._schemaDefinitions.get(this._outputDefinition)),s=r.length===1&&r[0]===tg?tg:r,i=Object.keys(this.channels),G=i.length===1&&i[0]===tg?tg:i,d=this._interrupt,u=new sCe({builder:this,checkpointer:t,interruptAfter:n,interruptBefore:l,autoValidate:!1,nodes:{},channels:{...this.channels,[Kn]:new d0},inputChannels:Kn,outputChannels:s,streamChannels:G,streamMode:"updates",store:e,cache:I,name:a,description:c,userInterrupt:d});u.attachNode(Kn);for(let[b,Z]of Object.entries(this.nodes))u.attachNode(b,Z);u.attachBranch(Kn,i1e,YNt(),{withReader:!1});for(let[b]of Object.entries(this.nodes))u.attachBranch(b,i1e,YNt(),{withReader:!1});for(let[b,Z]of this.edges)u.attachEdge(b,Z);for(let[b,Z]of this.waitingEdges)u.attachEdge(b,Z);for(let[b,Z]of Object.entries(this.branches))for(let[p,W]of Object.entries(Z))u.attachBranch(b,p,W);return u.validate()}};sCe=class extends $Je{description;_metaRegistry=hF;constructor({description:t,...e}){super(e),this.description=t}attachNode(t,e){let I;t==="__start__"?I=Object.entries(this.builder._schemaDefinitions.get(this.builder._inputDefinition)).map(([r])=>r):I=Object.keys(this.builder.channels);function l(r){if(Zn(r))return r.graph===An.PARENT?null:r._updateAsTuples();if(Array.isArray(r)&&r.length>0&&r.some(s=>Zn(s))){let s=[];for(let i of r)if(Zn(i)){if(i.graph===An.PARENT)continue;s.push(...i._updateAsTuples())}else s.push([tg,i]);return s}else if(r!=null)return[[tg,r]];return null}let n=t;function a(r){if(r){if(Zn(r))return r.graph===An.PARENT?null:r._updateAsTuples().filter(([s])=>I.includes(s));if(Array.isArray(r)&&r.length>0&&r.some(Zn)){let s=[];for(let i of r)if(Zn(i)){if(i.graph===An.PARENT)continue;s.push(...i._updateAsTuples().filter(([G])=>I.includes(G)))}else{let G=a(i);G&&s.push(...G??[])}return s}else{if(typeof r=="object"&&!Array.isArray(r))return Object.entries(r).filter(([s])=>I.includes(s));{let s=Array.isArray(r)?"array":typeof r;throw new bl(`Expected node "${n.toString()}" to return an object or an array containing at least one Command object, received ${s}`,{lc_error_code:"INVALID_GRAPH_NODE_RETURN_VALUE"})}}}else return null}let c=[{value:Bb,mapper:new oG({func:I.length&&I[0]===tg?l:a,trace:!1,recurse:!1})}];if(t==="__start__")this.nodes[t]=new i0({tags:[Vs],triggers:[Kn],channels:[Kn],writers:[new Qr(c,[Vs])]});else{let r=e?.input??this.builder._schemaDefinition,s=Object.fromEntries(Object.keys(this.builder._schemaDefinitions.get(r)).map(d=>[d,d])),i=Object.keys(s).length===1&&tg in s,G=`branch:to:${t}`;this.channels[G]=e?.defer?new RJe:new d0(!1),this.nodes[t]=new i0({triggers:[G],channels:i?Object.keys(s):s,writers:[new Qr(c,[Vs])],mapper:i?void 0:d=>Object.fromEntries(Object.entries(d).filter(([u])=>u in s)),bound:e?.runnable,metadata:e?.metadata,retryPolicy:e?.retryPolicy,cachePolicy:e?.cachePolicy,subgraphs:e?.subgraphs,ends:e?.ends})}}attachEdge(t,e){if(e!=="__end__"){if(typeof t=="string")this.nodes[t].writers.push(new Qr([{channel:`branch:to:${e}`,value:null}],[Vs]));else if(Array.isArray(t)){let I=`join:${t.join("+")}:${e}`;this.channels[I]=this.builder.nodes[e].defer?new lCe(new Set(t)):new ICe(new Set(t)),this.nodes[e].triggers.push(I);for(let l of t)this.nodes[l].writers.push(new Qr([{channel:I,value:l}],[Vs]))}}}attachBranch(t,e,I,l={withReader:!0}){let n=async(a,c)=>{let r=a.filter(i=>i!==jI);if(!r.length)return;let s=r.map(i=>Ys(i)?i:{channel:i==="__end__"?i:`branch:to:${i}`,value:t});await Qr.doWrite({...c,tags:(c.tags??[]).concat([Vs])},s)};this.nodes[t].writers.push(I.run(n,l.withReader?a=>XWt.doRead(a,this.streamChannels??this.outputChannels,!0):void 0))}async _validateInput(t){if(t==null)return t;let e=this.builder._inputRuntimeDefinition,I=this.builder._schemaRuntimeDefinition;if(vc.isInstance(e)){if(Zn(t)){let n=t;return t.update&&(n.update=await e.validateInput(Array.isArray(t.update)?Object.fromEntries(t.update):t.update)),n}return await e.validateInput(t)}if(e===Pse&&vc.isInstance(I)){if(Zn(t)){let n=t;return t.update&&(n.update=await I.validateInput(Array.isArray(t.update)?Object.fromEntries(t.update):t.update)),n}return await I.validateInput(t)}let l=(()=>{let n=a=>{if(a!=null)return this._metaRegistry.getExtendedChannelSchemas(a,{withReducerSchema:!0})};if(Rc(e))return n(e);if(e===Pse)return Rc(I)?zH(n(I)):void 0})();if(Zn(t)){let n=t;return t.update&&l!=null&&(n.update=Tu(l,t.update)),n}return l!=null?Tu(l,t):t}isInterrupted(t){return F3(t)}async _validateContext(t){let e=this.builder._configRuntimeSchema;return Rc(e)&&Tu(e,t),t}}});function ANt(t,e){let{stateKey:I,...l}=e??{},n=j3(l),a=I??"messages";I===null&&(a=void 0);let c=Zi(t);if(!c.id)throw new Error("Message ID is required.");let r=(Array.isArray(n.callbacks)?n.callbacks:typeof n.callbacks<"u"?n.callbacks.handlers:[]).find(s=>"name"in s&&s.name==="StreamMessagesHandler");if(r){let s=n.metadata??{},i=(s.langgraph_checkpoint_ns??"").split("|");r._emit([i,s],c,void 0,!1)}return a&&n.configurable?.__pregel_send?.([[a,c]]),c}var RNt,oCe=g(()=>{o();U3();q3();$se();NI();RNt=class extends tj{constructor(){super({channels:{__root__:{reducer:eg,default:()=>[]}}})}}});var FNt=g(()=>{o();gc();FK();Sse();q3();$se();oCe()});function XNt(t,e){let I=typeof t=="string"?{name:t,retry:void 0,cachePolicy:void 0}:t,{name:l,retry:n}=I;if(vJe(e)||yJe(e))throw new Error("Generators are disallowed as tasks. For streaming responses, use config.write.");let a=I.cachePolicy??("cache"in I?I.cache:void 0),c;return typeof a=="boolean"?c=a?{}:void 0:c=a,(...r)=>CWt({func:e,name:l,retry:n,cache:c},...r)}function gNt(){return dl.getRunnableConfig().configurable?.[mC]}var iCe,vNt=g(()=>{o();gc();gC();DX();HC();S3();EJe();qJe();JK();Bu();iCe=function(e,I){let{name:l,checkpointer:n,store:a,cache:c}=typeof e=="string"?{name:e,checkpointer:void 0,store:void 0}:e;if(vJe(I)||yJe(I))throw new Error("Generators are disallowed as entrypoints. For streaming responses, use config.write.");let r="updates",s=JWt(l,I);function i(b){return typeof b=="object"&&b!==null&&"__lg_type"in b&&b.__lg_type==="__pregel_final"}let G=new oG({name:"pluckReturnValue",func:b=>i(b)?b.value:b}),d=new oG({name:"pluckSaveValue",func:b=>i(b)?b.save:b}),u=new i0({bound:s,triggers:[Kn],channels:[Kn],writers:[new Qr([{channel:jI,value:Bb,mapper:G},{channel:ZC,value:Bb,mapper:d}],[Vs])]});return new Bse({name:l,checkpointer:n,nodes:{[l]:u},channels:{[Kn]:new d0,[jI]:new s0,[ZC]:new s0},inputChannels:Kn,outputChannels:jI,streamChannels:jI,streamMode:r,store:a,cache:c})};iCe.final=function({value:e,save:I}){return{value:e,save:I,__lg_type:"__pregel_final"}}});var yNt,GCe,wNt,HNt=g(()=>{o();FK();q3();ej();Fc();yNt=x3.Root({messages:x3({reducer:eg,default:()=>[]})}),GCe={reducer:{fn:eg},jsonSchemaExtra:{langgraph_type:"messages"},default:()=>[]},wNt=ie.object({messages:$3(ie.custom(),GCe)})});function QNt(t){let e=dl.getRunnableConfig();if(!e)throw new Error("Called interrupt() outside the context of a graph.");let I=e.configurable;if(!I)throw new Error("No configurable found in config");return I.writer?.(t)}var fNt=g(()=>{o();Bu()});var ENt={};tr(ENt,{Annotation:()=>x3,AsyncBatchedStore:()=>YK,BaseChannel:()=>_s,BaseCheckpointSaver:()=>hK,BaseLangGraphError:()=>xp,BaseStore:()=>FC,BinaryOperatorAggregate:()=>bF,COMMAND_SYMBOL:()=>Ere,Command:()=>An,CommandInstance:()=>G1e,CompiledStateGraph:()=>sCe,END:()=>jI,EmptyChannelError:()=>Fn,EmptyInputError:()=>rK,Graph:()=>Mse,GraphBubbleUp:()=>jre,GraphInterrupt:()=>oF,GraphRecursionError:()=>Ure,GraphValueError:()=>lQ,INTERRUPT:()=>Va,InMemoryStore:()=>WJe,InvalidUpdateError:()=>bl,MemorySaver:()=>hJe,MessageGraph:()=>RNt,MessagesAnnotation:()=>yNt,MessagesValue:()=>P3,MessagesZodMeta:()=>GCe,MessagesZodState:()=>wNt,MultipleSubgraphsError:()=>VZt,NodeInterrupt:()=>aK,Overwrite:()=>WZt,ParentCommand:()=>cK,REMOVE_ALL_MESSAGES:()=>Dse,ReducedValue:()=>Xo,RemoteException:()=>YZt,START:()=>Kn,Send:()=>wr,StateGraph:()=>tj,StateGraphInputError:()=>X3,StateSchema:()=>vc,UnreachableNodeError:()=>zre,UntrackedValue:()=>u0,UntrackedValueChannel:()=>LK,addMessages:()=>eg,copyCheckpoint:()=>zp,emptyCheckpoint:()=>AC,entrypoint:()=>iCe,getConfig:()=>Xse,getCurrentTaskInput:()=>mWt,getJsonSchemaFromSchema:()=>PX,getPreviousState:()=>gNt,getSchemaDefaultGetter:()=>$X,getStore:()=>uWt,getSubgraphsSeenSet:()=>RZt,getWriter:()=>bWt,interrupt:()=>B3,isCommand:()=>Zn,isGraphBubbleUp:()=>iF,isGraphInterrupt:()=>jp,isInterrupted:()=>F3,isParentCommand:()=>Ore,isSerializableSchema:()=>iNt,isStandardSchema:()=>pF,messagesStateReducer:()=>eg,pushMessage:()=>ANt,task:()=>XNt,writer:()=>QNt});var Bp=g(()=>{o();gc();ts();qu();k3();FK();U3();gJe();Sse();CK();Tse();_se();nCe();D3();kK();xK();q3();qse();rCe();$se();oCe();FNt();vNt();HNt();fNt();XC()});function AMI(t){let{name:e,description:I,schema:l}=t,n=ir(async(c,r)=>{let{interrupt:s}=await Promise.resolve().then(()=>(Bp(),ENt));return s({type:"tool",toolCall:{id:r?.toolCall?.id,name:e,args:c}})},{name:e,description:I,schema:l,metadata:{headlessTool:!0}}),a=Object.assign(n,{implement:c=>({tool:a,execute:c})});return a}var EC,eoe=g(()=>{o();Ns();EC=(t,e)=>typeof t!="function"?AMI(t):ir(t,e)});var GQ,dQ,JC,uQ,Ig,bQ=g(()=>{o();Bp();GQ=class extends Error{constructor(){super("The provided LLM already has bound tools. Please provide an LLM without bound tools to createAgent. The agent will bind the tools provided in the 'tools' parameter.")}},dQ=class extends Error{toolNames;constructor(t){super(`The model has called multiple tools: ${t.join(", ")} to return a structured output. This is not supported. Please provide a single structured output.`),this.toolNames=t}},JC=class extends Error{toolName;errors;constructor(t,e){super(`Failed to parse structured output for tool '${t}':${e.map(I=>` + - ${I}`).join("")}.`),this.toolName=t,this.errors=e}},uQ=class extends Error{toolCall;toolError;constructor(t,e){let I=t instanceof Error?t:new Error(String(t)),l=JSON.stringify(e.args);super(`Error invoking tool '${e.name}' with kwargs ${l} with error: ${I.stack} + Please fix the error and try again.`),this.toolCall=e,this.toolError=I}},Ig=class JNt extends Error{static"~brand"="MiddlewareError";constructor(e,I){let l=e instanceof Error?e.message:String(e);super(l),this.name=e instanceof Error?e.name:`${I[0].toUpperCase()+I.slice(1)}Error`,e instanceof Error&&(this.cause=e)}static wrap(e,I){return iF(e)?e:new JNt(e,I)}static isInstance(e){return e instanceof Error&&"~brand"in e&&e["~brand"]==="MiddlewareError"}}});function jK(t){return"invoke"in t&&typeof t.invoke=="function"&&"_streamResponseChunks"in t}function Ij(t){return typeof t=="object"&&t!=null&&"_queuedMethodOperations"in t&&"_getModelInstance"in t&&typeof t._getModelInstance=="function"}var toe=g(()=>{o()});function uCe(t,e,I){if(!t)return[];if(typeof t=="object"&&t!==null&&"__responseFormatUndefined"in t)return[];if(Array.isArray(t)){if(t.every(n=>n instanceof $u||n instanceof Sb))return t;if(t.every(n=>jn(n)))return t.map(n=>$u.fromSchema(n,e));if(t.every(n=>Rc(n)))return t.map(n=>$u.fromSchema(n,e));if(t.every(n=>typeof n=="object"&&n!==null&&!Rc(n)&&!jn(n)))return t.map(n=>$u.fromSchema(n,e));throw new Error(`Invalid response format: list contains mixed types. +All items must be either InteropZodObject, Standard Schema, or plain JSON schema objects.`)}if(t instanceof $u||t instanceof Sb)return[t];let l=XMI(I);if(jn(t))return l?[Sb.fromSchema(t)]:[$u.fromSchema(t,e)];if(Rc(t))return l?[Sb.fromSchema(t)]:[$u.fromSchema(t,e)];if(typeof t=="object"&&t!==null&&"properties"in t)return l?[Sb.fromSchema(t)]:[$u.fromSchema(t,e)];throw new Error(`Invalid response format: ${String(t)}`)}function UK(t,e){return uCe(t,e)}function OK(t){if(typeof t=="object"&&t!==null&&"schema"in t&&!Vl(t)&&!jn(t)&&!("type"in t)){let{schema:e,strict:I}=t;return Sb.fromSchema(e,I)}return Sb.fromSchema(t)}function XMI(t){return!t||!jK(t)||!("profile"in t)||typeof t.profile!="object"||!t.profile?!1:"structuredOutput"in t.profile&&t.profile.structuredOutput===!0}var CNt,FMI,$u,Sb,zK=g(()=>{o();toe();bQ();Wa();aG();wp();CNt=!0,FMI=0,$u=class dCe{constructor(e,I,l){this.schema=e,this.tool=I,this.options=l}get name(){return this.tool.function.name}static fromSchema(e,I){function l(a){return a??`extract-${++FMI}`}if(jn(e)||Vl(e)){let a=DI(e);return new dCe(a,{type:"function",function:{name:l(a.title),strict:!1,description:a.description??"Tool for extracting structured output from the model's response.",parameters:a}},I)}let n;return typeof e.name=="string"&&typeof e.parameters=="object"&&e.parameters!=null?n=e:n={name:l(e.title),description:e.description??"",parameters:e.schema||e},new dCe(DI(e),{type:"function",function:n},I)}parse(e){let I=new TJ(this.schema).validate(e);if(!I.valid)throw new JC(this.name,I.errors.map(l=>l.error));return e}},Sb=class LNt{_schemaType;schema;strict;constructor(e,I){if("schema"in e&&typeof e.schema=="object"&&e.schema!==null&&!("type"in e)){let l=e;this.schema=l.schema,this.strict=l.strict??CNt}else this.schema=e,this.strict=I??CNt}static fromSchema(e,I){return new LNt(DI(e),I)}parse(e){let I;if(typeof e.content=="string")I=e.content;else if(Array.isArray(e.content)){for(let l of e.content)if(typeof l=="object"&&l!==null&&"type"in l&&l.type==="text"&&"text"in l&&typeof l.text=="string"){I=l.text;break}}if(!(!I||I===""))try{let l=JSON.parse(I);return new TJ(this.schema).validate(l).valid?l:void 0}catch{}}}});function lg(t,e){let l=0;if(e&&e.length>0){let n=0;for(let a of e){let c=Ws(a)?aQ(a):a;n+=JSON.stringify(c).length}l+=n}for(let n of t){let a;typeof n.content=="string"?a=n.content:Array.isArray(n.content)?a=n.content.map(c=>typeof c=="string"?c:c.type==="text"&&"text"in c?c.text:"").join(""):a="",He.isInstance(n)&&Array.isArray(n.tool_calls)&&n.tool_calls.length>0&&(a+=JSON.stringify(n.tool_calls)),pt.isInstance(n)&&(a+=n.tool_call_id??""),l+=a.length}return Math.ceil(l/4)}function WF(t){if(!(!t||typeof t=="function"))return t.canJumpTo}function mQ(t){return typeof t=="function"?t:t.hook}function Ioe(t){return new Promise(e=>setTimeout(e,t))}function loe(t,e){let{backoffFactor:I,initialDelayMs:l,maxDelayMs:n,jitter:a}=t,c;if(I===0?c=l:c=l*I**e,c=Math.min(c,n),a&&c>0){let r=c*.25;c=c+(Math.random()*2-1)*r,c=Math.max(0,c)}return c}var Tb=g(()=>{o();NI();Ns();uF()});var CC,BK=g(()=>{o();CC=Symbol.for("AgentMiddleware")});function El(t){return{[CC]:!0,name:t.name,stateSchema:t.stateSchema,contextSchema:t.contextSchema,wrapToolCall:t.wrapToolCall,wrapModelCall:t.wrapModelCall,beforeAgent:t.beforeAgent,beforeModel:t.beforeModel,afterModel:t.afterModel,afterAgent:t.afterAgent,tools:t.tools}}var Rs=g(()=>{o();BK()});var MK,noe=g(()=>{o();NI();l0();Xc();Ns();XC();MK=class kNt extends yr{toolCalls;toolStyle;indexRef;structuredResponse;tools=[];constructor({toolCalls:e=[],toolStyle:I="openai",index:l=0,structuredResponse:n,indexRef:a,...c}={}){super(c),this.toolCalls=e,this.toolStyle=I,this.indexRef=a??{current:l},this.structuredResponse=n}get index(){return this.indexRef.current}set index(e){this.indexRef.current=e}_llmType(){return"fake-tool-calling"}_combineLLMOutput(){return[]}bindTools(e){let I=new kNt({toolCalls:this.toolCalls,toolStyle:this.toolStyle,structuredResponse:this.structuredResponse,indexRef:this.indexRef});return I.tools=[...this.tools,...e],I}withStructuredOutput(e){return new sr({func:async()=>this.structuredResponse})}async _generate(e,I,l){let n=e[e.length-1].content;e.length>1&&(n=e.map(s=>s.content).filter(Boolean).map(s=>typeof s=="string"?s:typeof s=="object"&&"text"in s?s.text:Array.isArray(s)?s.map(i=>typeof i=="string"?i:typeof i=="object"&&"text"in i?i.text:"").join("-"):JSON.stringify(s)).join("-")),(e.length===1||e.length===2&&e.every(ZI.isInstance))&&this.index!==0&&(this.index=0);let a=this.toolCalls[this.index]||[],c=this.index.toString();this.index=(this.index+1)%Math.max(1,this.toolCalls.length);let r=new He({content:n,id:c,tool_calls:a.length>0?a.map(s=>({...s,type:"tool_call"})):void 0});return{generations:[{text:n,message:r}],llmOutput:{}}}}});function xNt(t){let e=globalThis[bCe];e.has(t)||(Object.defineProperty(t,"langgraph",{get(){let I=this;return{metadata(l){return $3(I,{jsonSchemaExtra:l})},reducer(l,n){return $3(I,{default:BH(I),reducer:{schema:n,fn:l}})}}}}),e.add(t))}var bCe,jNt=g(()=>{o();ej();sG();Wa();Fc();bCe=Symbol.for("langgraph-zod");bCe in globalThis||(globalThis[bCe]=new WeakSet);try{xNt(ie.ZodType.prototype),xNt(ae.ZodType.prototype)}catch(t){throw new Error("Failed to extend Zod with LangGraph-related methods. This is most likely a bug, consider opening an issue and/or using `withLangGraph` to augment your Zod schema.",{cause:t})}});var UNt,gMI,ONt=g(()=>{o();ej();Wa();Vi();UNt=class extends kH{constructor(t){super(),this.parent=t,this._map=this.parent._map}add(t,...e){let I=e[0];if(I&&!I?.default){let l=BH(t);l!=null&&(I.default=l)}return super.add(t,...e)}},gMI=new UNt(hF)});var zNt=g(()=>{o();ej();jNt();ONt()});function BNt(t=!0,e,I=[]){let l={jumpTo:new u0},n={},a={},c=r=>{if(vc.isInstance(r)){for(let[i,G]of Object.entries(r.fields))if(!(i in l)){if(l[i]=G,i.startsWith("_"))continue;Xo.isInstance(G)?(n[i]=G.inputSchema||G.valueSchema,a[i]=G.valueSchema):(n[i]=G,a[i]=G)}return}let s=MR(r);for(let[i,G]of Object.entries(s)){let d=i.startsWith("_");if(!(i in l)){if(mn(G)){let u=hF.get(G);if(u?.reducer){u.reducer.schema?(l[i]=new Xo(G,{inputSchema:u.reducer.schema,reducer:u.reducer.fn}),d||(n[i]=u.reducer.schema,a[i]=G)):(l[i]=new Xo(G,{reducer:u.reducer.fn}),d||(n[i]=G,a[i]=G));continue}}l[i]=G,d||(n[i]=G,a[i]=G)}}};e&&(vc.isInstance(e)||Rc(e))&&c(e);for(let r of I)r.stateSchema&&(vc.isInstance(r.stateSchema)||Rc(r.stateSchema))&&c(r.stateSchema);return t&&(a.structuredResponse=new u0),{state:new vc({messages:P3,...l}),input:new vc({messages:P3,...n}),output:new vc({messages:P3,...a})}}var MNt=g(()=>{o();Bp();zNt();Wa()});function vMI(t,e){if(vc.isInstance(t)){let I={};for(let l of Object.keys(t.fields))l in e&&(I[l]=e[l]);return I}if(Vl(t))return Tu(t,e);throw new Error(`Invalid state schema type: ${typeof t}`)}function TNt(t){if(!He.isInstance(t)||eI.isInstance(t)||!t.name)return t;let{name:e}=t;if(typeof t.content=="string")return new He({...t.lc_kwargs,content:`${e}${t.content}`,name:void 0});let I=[],l=0;for(let n of t.content)typeof n=="string"?(l+=1,I.push(`${e}${n}`)):typeof n=="object"&&"type"in n&&n.type==="text"?(l+=1,I.push({...n,text:`${e}${n.text}`})):I.push(n);return l||I.unshift({type:"text",text:`${e}`}),new He({...t.lc_kwargs,content:I,name:void 0})}function _Nt(t){if(!He.isInstance(t)||!t.content)return t;let e=[],I;if(Array.isArray(t.content))e=t.content.filter(l=>{if(l.type==="text"&&typeof l.text=="string"){let n=l.text.match(mCe),a=l.text.match(ZCe);return n&&(!a||a[1]==="")?(I=n[1],!1):!0}return!0}).map(l=>{if(l.type==="text"&&typeof l.text=="string"){let n=l.text.match(mCe),a=l.text.match(ZCe);return!n||!a?l:(I=n[1],{...l,text:a[1]})}return l});else{let l=t.content,n=l.match(mCe),a=l.match(ZCe);if(!n||!a)return t;I=n[1],e=a[1]}return new He({...Object.keys(t.lc_kwargs??{}).length>0?t.lc_kwargs:t,content:e,name:I})}function LC(t){return tI.isRunnable(t)}function SNt(t){return jK(t)?"bindTools"in t&&typeof t.bindTools=="function":!1}function aoe(t){if(typeof t=="function")return;let e=t;if($r.isRunnableSequence(e)&&(e=e.steps.find(I=>ha.isRunnableBinding(I))||e),!Ij(e)){if(ha.isRunnableBinding(e)){let I=e.kwargs!=null&&typeof e.kwargs=="object"&&"tools"in e.kwargs&&Array.isArray(e.kwargs.tools)&&e.kwargs.tools.length>0,l=e.config!=null&&typeof e.config=="object"&&"tools"in e.config&&Array.isArray(e.config.tools)&&e.config.tools.length>0;if(I||l)throw new GQ}if("tools"in e&&e.tools!==void 0&&Array.isArray(e.tools)&&e.tools.length>0)throw new GQ}}function lj(t){return!!(He.isInstance(t)&&t.tool_calls&&t.tool_calls.length>0)}function KNt(t){if(t==null)return new Gl("");if(Gl.isInstance(t))return t;if(typeof t=="string")return new Gl({content:[{type:"text",text:t}]});throw new Error(`Invalid systemPrompt type: expected string or SystemMessage, got ${typeof t}`)}async function DNt(t,e,I={}){let l=pCe(t,e,I);if(l)return l;if(Ij(t)){let n=pCe(await t._getModelInstance(),e,I);if(n)return n}if($r.isRunnableSequence(t)){let n=t.steps.findIndex(a=>ha.isRunnableBinding(a)||jK(a)||Ij(a));if(n>=0){let a=pCe(t.steps[n],e,I);if(a){let c=t.steps.slice();return c.splice(n,1,a),$r.from(c)}}}throw new Error(`llm ${t} must define bindTools method.`)}function yMI(t){if(t.length===0)return;if(t.length===1)return t[0];function e(l,n){return async(a,c)=>l(a,async s=>n(s,c))}let I=t[t.length-1];for(let l=t.length-2;l>=0;l--)I=e(t[l],I);return I}function qNt(t){let e=t.filter(I=>I.wrapToolCall);if(e.length!==0)return yMI(e.map(I=>{let l=I.wrapToolCall;return async(a,c)=>{let r=a.state,s=async i=>{let G={...r,...i.state};return c({...i,state:G})};try{let i=await l({...a,state:{messages:r.messages,...I.stateSchema?vMI(I.stateSchema,{...r}):{}}},s);if(!pt.isInstance(i)&&!Zn(i))throw new Error(`Invalid response from "wrapToolCall" in middleware "${I.name}": expected ToolMessage or Command, got ${typeof i}`);return i}catch(i){throw Ig.wrap(i,I.name)}}}))}var mCe,ZCe,pCe,SK=g(()=>{o();toe();bQ();NI();Xc();Bp();Wa();mCe=/(.*?)<\/name>/s,ZCe=/(.*?)<\/content>/s;pCe=(t,e,I={})=>{if(SNt(t))return t.bindTools(e,I);if(ha.isRunnableBinding(t)&&SNt(t.bound)){let l=t.bound.bindTools(e,I);return ha.isRunnableBinding(l)?new ha({bound:l.bound,config:{...t.config,...l.config},kwargs:{...t.kwargs,...l.kwargs},configFactories:l.configFactories??t.configFactories}):new ha({bound:l,config:t.config,kwargs:t.kwargs,configFactories:t.configFactories})}return null}});async function PNt(t,e){let I={};for(let l of t){if(!l.stateSchema)continue;let n=l.stateSchema;if(vc.isInstance(l.stateSchema)){let r={};for(let[s,i]of Object.entries(l.stateSchema.fields))Xo.isInstance(i)?r[s]=i.inputSchema||i.valueSchema:r[s]=i;n=ae.object(r)}let a=await BA(Eae(n,r=>r.startsWith("_")),e);if(a.success){Object.assign(I,a.data);continue}let c=a.error.issues.filter(r=>r.code==="invalid_type").map(r=>` - ${r.path.join(".")}: Required`).join(` +`);throw new Error(`Middleware "${l.name}" has required state fields that must be initialized: +${c} + +To fix this, either: +1. Provide default values in your middleware's state schema using .default(): + stateSchema: z.object({ + myField: z.string().default("default value") + }) + +2. Or make the fields optional using .optional(): + stateSchema: z.object({ + myField: z.string().optional() + }) + +3. Or ensure you pass these values when invoking the agent: + agent.invoke({ + messages: [...], + ${a.error.issues[0]?.path.join(".")}: "value" + })`)}return I}function $Nt(t){let e={messages:ae.custom(()=>[]),structuredResponse:ae.any().optional()};if(!t)return ae.object(e);let I;if(vc.isInstance(t)){I={};for(let[n,a]of Object.entries(t.fields))Xo.isInstance(a)?I[n]=a.inputSchema||a.valueSchema:I[n]=a}else I=MR(t);let l={...e};for(let[n,a]of Object.entries(I))n.startsWith("_")?l[n]=a.optional():l[n]=a;return ae.object(l)}function eVt(t){if(Rc(t))return zH(t);if(vc.isInstance(t)){let e={};for(let[I,l]of Object.entries(t.fields)){let n;Xo.isInstance(l)?n=l.inputSchema||l.valueSchema:n=l,e[I]=mn(n)?n.optional():ae.any().optional()}return ae.object(e)}return ae.object({})}function b0(t){if(t){if(["model_request","tools",jI].includes(t))return t;if(t==="model")return"model_request";if(t==="tools")return"tools";if(t==="end")return jI;throw new Error(`Invalid jump target: ${t}, must be "model", "tools" or "end".`)}}function coe(...t){return AbortSignal.any(t.filter(e=>e!=null&&typeof e=="object"&&"aborted"in e&&typeof e.aborted=="boolean"))}var TK=g(()=>{o();Bp();Wa();sG()});var nj,roe=g(()=>{o();Xc();Bu();nj=class extends tI{lc_namespace=["langgraph"];func;tags;config;trace=!0;recurse=!0;#e;constructor(t){super(),this.name=t.name??t.func.name,this.func=t.func,this.config=t.tags?{tags:t.tags}:void 0,this.recurse=t.recurse??this.recurse}getState(){return this.#e}setState(t){this.#e={...this.#e,...t}}async invoke(t,e){let I=xn(this.config,e),l=await dl.runWithConfig(I,async()=>this.func(t,I));return tI.isRunnable(l)&&this.recurse?await dl.runWithConfig(I,async()=>l.invoke(t,I)):(this.#e=l,l)}}});function tVt(t,e){let I,l;if(e==="inline")I=TNt,l=_Nt;else throw new Error(`Invalid agent name mode: ${e}. Needs to be one of: "inline"`);function n(a){return a.map(I)}return $r.from([sr.from(n),t,sr.from(l)])}var IVt=g(()=>{o();SK();Xc()});function wMI(t){return He.isInstance(t)||Zn(t)||typeof t=="object"&&t!==null&&"structuredResponse"in t&&"messages"in t}var go,lVt,nVt=g(()=>{o();aF();toe();bQ();SK();roe();TK();IVt();zK();NI();Xc();Bp();Wa();go="model_request",lVt=class extends nj{#e;#I;constructor(t){super({name:t.name??"model",func:(e,I)=>this.#t(e,I)}),this.#e=t,this.#I=t.systemMessage}async#n(t,e=this.#e.responseFormat){if(!e)return;let I;Ij(t)?I=await t._getModelInstance():typeof t!="string"&&(I=t);let l=uCe(e,void 0,I);if(l.length!==0)return l.every(n=>n instanceof Sb)?{type:"native",strategy:l[0]}:{type:"tool",tools:l.filter(n=>n instanceof $u).reduce((n,a)=>(n[a.name]=a,n),{})}}async#t(t,e){let I=t.messages.at(-1);if(I&&pt.isInstance(I)&&I.name&&this.#e.shouldReturnDirect.has(I.name))return[new An({update:{messages:[]}})];let{response:l,lastAiMessage:n,collectedCommands:a}=await this.#c(t,e);if(typeof l=="object"&&l!==null&&"structuredResponse"in l&&"messages"in l){let{structuredResponse:s,messages:i}=l;return{messages:[...t.messages,...i],structuredResponse:s}}let c=[],r=He.isInstance(l)?l:n;return r&&(r.name=this.name,r.lc_kwargs.name=this.name,this.#o(t,r)?c.push(new An({update:{messages:[new He({content:"Sorry, need more steps to process this request.",name:this.name,id:r.id})]}})):c.push(new An({update:{messages:[r]}}))),Zn(l)&&!a.includes(l)&&c.push(l),c.push(...a),c}#l(){if(typeof this.#e.model=="string")return Fo(this.#e.model);if(this.#e.model)return this.#e.model;throw new Error("No model option was provided, either via `model` option.")}async#c(t,e,I={}){let l=await this.#l(),n=e,a=this.#I,c=null,r=[],s=async u=>{aoe(u.model);let b=await this.#n(u.model,u.responseFormat),Z=await this.#i(u.model,u,b),p=[...a.text===""?[]:[a],...u.messages],W=coe(this.#e.signal,e.signal),h=await Mu(Z.invoke(p,{...e,signal:W}),W);if(c=h,b?.type==="native"){let R=b.strategy.parse(h);return R?{structuredResponse:R,messages:[h]}:h}if(!b||!h.tool_calls)return h;let N=h.tool_calls.filter(R=>R.name in b.tools);if(N.length===0)return h;if(N.length>1)return this.#r(h,N,b);let V=b.tools[N[0].name]?.options?.toolMessageContent;return this.#s(h,N[0],b,V??I.lastMessage)},i=this.#e.wrapModelCallHookMiddleware??[],G=s;for(let u=i.length-1;u>=0;u--){let b=i[u],Z=Array.isArray(b)?b[0]:b;if(Z.wrapModelCall){let p=G,W=Z;G=async h=>{let N=a,V=W.contextSchema?Tu(W.contextSchema,n?.context||{}):n?.context,R=Object.freeze({context:V,store:n.store,configurable:n.configurable,writer:n.writer,interrupt:n.interrupt,signal:n.signal}),F={...h,state:{...Z.stateSchema?Tu(eVt(Z.stateSchema),t):{},messages:t.messages},runtime:R},v=async y=>{a=N;let w=y.tools??[],H=new Map(this.#e.toolClasses.filter(LC).map(_=>[_.name,_])),f=w.filter(_=>LC(_)&&!H.has(_.name)),L=w.filter(_=>{if(!LC(_))return!1;let $=H.get(_.name);return $!=null&&$!==_});if(f.length>0&&!this.#e.middleware?.some(_=>_.wrapToolCall!=null))throw new Error(`You have added a new tool in "wrapModelCall" hook of middleware "${W.name}": ${f.map(_=>_.name).join(", ")}. This is not supported unless a middleware provides a "wrapToolCall" handler to execute it.`);if(L.length>0)throw new Error(`You have modified a tool in "wrapModelCall" hook of middleware "${W.name}": ${L.map(_=>_.name).join(", ")}. This is not supported.`);let k=y,U=y.systemPrompt!==a.text,T=y.systemMessage!==a;if(U&&T)throw new Error("Cannot change both systemPrompt and systemMessage in the same request.");U&&(a=new Gl({content:[{type:"text",text:y.systemPrompt}]}),k={...y,systemPrompt:a.text,systemMessage:a}),T&&(a=new Gl({...y.systemMessage}),k={...y,systemPrompt:a.text,systemMessage:a});let q=await p(k);return Zn(q)&&c?(r.includes(q)||r.push(q),c):q};if(!W.wrapModelCall)return v(F);try{let y=await W.wrapModelCall(F,v);if(!wMI(y))throw new Error(`Invalid response from "wrapModelCall" in middleware "${W.name}": expected AIMessage or Command, got ${typeof y}`);return He.isInstance(y)?c=y:Zn(y)&&r.push(y),y}catch(y){throw Ig.wrap(y,W.name)}}}}a=this.#I;let d={model:l,responseFormat:this.#e.responseFormat,systemPrompt:a?.text,systemMessage:a,messages:t.messages,tools:this.#e.toolClasses,state:t,runtime:Object.freeze({context:n?.context,store:n.store,configurable:n.configurable,writer:n.writer,interrupt:n.interrupt,signal:n.signal})};return{response:await G(d),lastAiMessage:c,collectedCommands:r}}#r(t,e,I){let l=new dQ(e.map(n=>n.name));return this.#a(l,t,e[0],I)}#s(t,e,I,l){let n=I.tools[e.name];try{let a=n.parse(e.args);return{structuredResponse:a,messages:[t,new pt({tool_call_id:e.id??"",content:JSON.stringify(a),name:e.name}),new He(l??`Returning structured response: ${JSON.stringify(a)}`)]}}catch(a){return this.#a(a,t,e,I)}}async#a(t,e,I,l){let n=Object.values(l.tools).at(0)?.options?.handleError,a=I.id;if(!a)throw new Error("Tool call ID is required to handle tool output errors. Please provide a tool call ID.");if(n===!1)throw t;if(n===void 0||typeof n=="boolean"&&n||Array.isArray(n)&&n.some(c=>c instanceof dQ))return new An({update:{messages:[e,new pt({content:t.message,tool_call_id:a})]},goto:go});if(typeof n=="string")return new An({update:{messages:[e,new pt({content:n,tool_call_id:a})]},goto:go});if(typeof n=="function"){let c=await n(t);if(typeof c!="string")throw new Error("Error handler must return a string.");return new An({update:{messages:[e,new pt({content:c,tool_call_id:a})]},goto:go})}return new An({update:{messages:[e,new pt({content:t.message,tool_call_id:a})]},goto:go})}#o(t,e){let I=He.isInstance(e)&&e.tool_calls?.every(n=>this.#e.shouldReturnDirect.has(n.name)),l="remainingSteps"in t?t.remainingSteps:void 0;return!!(l&&(l<1&&I||l<2&&lj(t.messages.at(-1))))}async#i(t,e,I){let l={},n=Object.values(I&&"tools"in I?I.tools:{}),a=[...e?.tools??this.#e.toolClasses,...n.map(s=>s.tool)],c=e?.toolChoice||(n.length>0?"any":void 0);if(I?.type==="native"){let s=e?.modelSettings?.strict??I?.strategy?.strict??!0,i={name:I.strategy.schema?.name??"extract",description:lZ(I.strategy.schema),schema:I.strategy.schema,strict:s};Object.assign(l,{response_format:{type:"json_schema",json_schema:i},outputConfig:{format:{type:"json_schema",schema:I.strategy.schema}},responseSchema:I.strategy.schema,ls_structured_output_format:{kwargs:{method:"json_schema"},schema:I.strategy.schema},strict:s})}let r=await DNt(t,a,{...l,...e?.modelSettings,tool_choice:c});return this.#e.includeAgentName==="inline"?tVt(r,this.#e.includeAgentName):r}getState(){let t=super.getState();return{messages:[],...t&&!Zn(t)?t:{}}}}});function fMI(t,e){return t instanceof uQ?new pt({content:t.message,tool_call_id:e.id,name:e.name}):new pt({content:`${t} + Please fix your mistakes.`,tool_call_id:e.id,name:e.name})}function EMI(t){return t instanceof wr}var aVt,eb,cVt,HMI,QMI,rVt,sVt=g(()=>{o();bQ();roe();TK();NI();Ns();Bp();aVt=(t,e)=>`Error: ${t} is not a valid tool, try one of [${e.join(", ")}].`,eb="tools",cVt=t=>Array.isArray(t)&&t.every(Ml.isInstance),HMI=t=>typeof t=="object"&&t!=null&&"messages"in t&&cVt(t.messages),QMI=t=>typeof t=="object"&&t!=null&&"lg_tool_call"in t;rVt=class extends nj{tools;trace=!1;signal;handleToolErrors=fMI;wrapToolCall;constructor(t,e){let{name:I,tags:l,handleToolErrors:n,signal:a,wrapToolCall:c}=e??{};super({name:I,tags:l,func:(r,s)=>this.run(r,s)}),this.options=e,this.tools=t,this.handleToolErrors=n??this.handleToolErrors,this.signal=a,this.wrapToolCall=c}#e(t,e,I){if(jp(t)||this.signal?.aborted||I&&this.handleToolErrors!==!0||!this.handleToolErrors)throw t;if(typeof this.handleToolErrors=="function"){let l=this.handleToolErrors(t,e);if(l&&pt.isInstance(l))return l;throw t}else if(this.handleToolErrors)return new pt({name:e.name,content:`${t} + Please fix your mistakes.`,tool_call_id:e.id});throw t}async runTool(t,e,I){let l=e,n={context:l?.context,store:l?.store,configurable:l?.configurable,writer:l?.writer,interrupt:l?.interrupt,signal:l?.signal},a=this.tools.find(s=>s.name===t.name),c=async s=>{let{toolCall:i,tool:G}=s,d=G??this.tools.find(b=>b.name===i.name);if(d===void 0){let b=this.tools.map(Z=>Z.name);return new pt({content:aVt(i.name,b),tool_call_id:i.id,name:i.name,status:"error"})}let u=d;try{let b=await u.invoke({...i,type:"tool_call"},{...e,config:e,toolCallId:i.id,state:e.configurable?.__pregel_scratchpad?.currentTaskInput,signal:coe(this.signal,e.signal)});return pt.isInstance(b)||Zn(b)?b:new pt({name:u.name,content:typeof b=="string"?b:JSON.stringify(b),tool_call_id:i.id})}catch(b){throw b instanceof AH?new uQ(b,i):b}},r={toolCall:t,tool:a,state:I,runtime:n};if(this.wrapToolCall)try{return await this.wrapToolCall(r,c)}catch(s){return this.#e(s,t,!0)}if(!a){let s=this.tools.map(i=>i.name);return new pt({content:aVt(t.name,s),tool_call_id:t.id,name:t.name,status:"error"})}try{return await c(r)}catch(s){return this.#e(s,t,!1)}}async run(t,e){let I;if(QMI(t)){let{lg_tool_call:a,jumpTo:c,...r}=t;I=[await this.runTool(t.lg_tool_call,e,r)]}else{let a;if(cVt(t))a=t;else if(HMI(t))a=t.messages;else throw new Error("ToolNode only accepts BaseMessage[] or { messages: BaseMessage[] } as input.");let c=new Set(a.filter(s=>s.getType()==="tool").map(s=>s.tool_call_id)),r;for(let s=a.length-1;s>=0;s-=1){let i=a[s];if(He.isInstance(i)){r=i;break}}if(!He.isInstance(r))throw new Error("ToolNode only accepts AIMessages as input.");I=await Promise.all(r.tool_calls?.filter(s=>s.id==null||!c.has(s.id)).map(s=>this.runTool(s,e,t))??[])}if(!I.some(Zn))return Array.isArray(t)?I:{messages:I};let l=[],n=null;for(let a of I)Zn(a)?a.graph===An.PARENT&&Array.isArray(a.goto)&&a.goto.every(c=>EMI(c))?n?n.goto.push(...a.goto):n=new An({graph:An.PARENT,goto:a.goto}):l.push(a):l.push(Array.isArray(t)?[a]:{messages:[a]});return n&&l.push(n),l}}});var JMI,CMI,ZQ,_K=g(()=>{o();roe();TK();Tb();Wa();JMI=class{},CMI=class{},ZQ=class extends nj{constructor(t){super(t)}async invokeMiddleware(t,e){let I={};if(this.middleware.contextSchema){let s=this.middleware.contextSchema?.shape;if(s){let i={},G=e?.context||{};for(let d of Object.keys(s))d in G&&(i[d]=G[d]);I=Tu(this.middleware.contextSchema,i)}}let l={...t,messages:t.messages},n={context:I,store:e?.store,configurable:e?.configurable,writer:e?.writer,interrupt:e?.interrupt,signal:e?.signal},a=await this.runHook(l,Object.freeze(Object.assign(new CMI,{...n,context:Object.freeze(Object.assign(new JMI,I))})));if(!a)return{jumpTo:void 0};let c,r;if(this.name?.startsWith("BeforeAgentNode_")?(c=WF(this.middleware.beforeAgent),r="beforeAgent.canJumpTo"):this.name?.startsWith("BeforeModelNode_")?(c=WF(this.middleware.beforeModel),r="beforeModel.canJumpTo"):this.name?.startsWith("AfterAgentNode_")?(c=WF(this.middleware.afterAgent),r="afterAgent.canJumpTo"):this.name?.startsWith("AfterModelNode_")&&(c=WF(this.middleware.afterModel),r="afterModel.canJumpTo"),typeof a.jumpTo=="string"&&!c?.includes(a.jumpTo)){let s=c&&c.length>0?`must be one of: ${c?.join(", ")}.`:r?`no ${r} defined in middleware ${this.middleware.name}`:"";throw new Error(`Invalid jump target: ${a.jumpTo}, ${s}.`)}if(typeof a=="object"&&"type"in a){if(a.type==="terminate"){if(a.error)throw a.error;return{...l,...a.result||{},jumpTo:a.jumpTo}}throw new Error(`Invalid control action: ${JSON.stringify(a)}`)}return{...l,...a,jumpTo:a.jumpTo}}get nodeOptions(){return{input:$Nt(this.middleware.stateSchema)}}}});var oVt,iVt=g(()=>{o();Tb();_K();oVt=class extends ZQ{lc_namespace=["langchain","agents","beforeAgentNodes"];constructor(t){super({name:`BeforeAgentNode_${t.name}`,func:async(e,I)=>this.invokeMiddleware(e,I)}),this.middleware=t}runHook(t,e){return mQ(this.middleware.beforeAgent)(t,e)}}});var GVt,dVt=g(()=>{o();Tb();_K();GVt=class extends ZQ{lc_namespace=["langchain","agents","beforeModelNodes"];constructor(t){super({name:`BeforeModelNode_${t.name}`,func:async(e,I)=>this.invokeMiddleware(e,I)}),this.middleware=t}runHook(t,e){return mQ(this.middleware.beforeModel)(t,e)}}});var uVt,bVt=g(()=>{o();Tb();_K();uVt=class extends ZQ{lc_namespace=["langchain","agents","afterModelNodes"];constructor(t){super({name:`AfterModelNode_${t.name}`,func:async(e,I)=>this.invokeMiddleware(e,I)}),this.middleware=t}runHook(t,e){return mQ(this.middleware.afterModel)(t,e)}}});var mVt,ZVt=g(()=>{o();Tb();_K();mVt=class extends ZQ{lc_namespace=["langchain","agents","afterAgentNodes"];constructor(t){super({name:`AfterAgentNode_${t.name}`,func:async(e,I)=>this.invokeMiddleware(e,I)}),this.middleware=t}runHook(t,e){return mQ(this.middleware.afterAgent)(t,e)}}});var pVt,WVt=g(()=>{o();MNt();SK();TK();nVt();sVt();Tb();iVt();dVt();bVt();ZVt();NI();Xc();Bp();pVt=class hVt{#e;#I="v2";#n;#t;constructor(e,I){if(this.options=e,this.#t=xn(I??{},{metadata:{ls_integration:"langchain_create_agent"},configurable:{ls_agent_type:"root"}}),e.name&&(this.#t=xn(this.#t,{metadata:{lc_agent_name:e.name}})),this.#I=e.version??this.#I,!e.model)throw new Error("`model` option is required to create an agent.");typeof e.model!="string"&&aoe(e.model);let l=this.options.middleware?.filter(H=>H.tools).flatMap(H=>H.tools)??[],n=[...e.tools??[],...l],a=new Set(n.filter(LC).filter(H=>"returnDirect"in H&&H.returnDirect).map(H=>H.name)),c=!!this.options.middleware?.some(H=>H.wrapModelCall),{state:r,input:s,output:i}=BNt(this.options.responseFormat!==void 0||c,this.options.stateSchema,this.options.middleware),G=new tj(r,{input:s,output:i,context:this.options.contextSchema}),d=[],u=[],b=[],Z=[],p=[];this.#n=new lVt({model:this.options.model,systemMessage:KNt(this.options.systemPrompt),includeAgentName:this.options.includeAgentName,name:this.options.name,responseFormat:this.options.responseFormat,middleware:this.options.middleware,toolClasses:n,shouldReturnDirect:a,signal:this.options.signal,wrapModelCallHookMiddleware:p});let W=new Set,h=this.options.middleware??[];for(let H=0;HH.wrapToolCall),V=n.filter(LC);if(V.length>0||N){let H=new rVt(V,{signal:this.options.signal,wrapToolCall:qNt(h)});G.addNode(eb,H)}let R;d.length>0?R=d[0].name:u.length>0?R=u[0].name:R=go;let F=u.length>0?u[0].name:go,v=Z.length>0?Z[Z.length-1].name:jI;G.addEdge(Kn,R);let y=V.length>0||N;for(let H=0;H0){let U=f.allowed.map(q=>b0(q)).filter(q=>q!=="tools"||y),T=Array.from(new Set([k,...U.map(q=>q===jI?v:q)]));G.addConditionalEdges(L,this.#o(V,k,v,y),T)}else G.addEdge(L,k)}for(let H=0;H0){let U=f.allowed.map(q=>b0(q)).filter(q=>q!=="tools"||y),T=Array.from(new Set([k,...U]));G.addConditionalEdges(L,this.#i(V,k,y),T)}else G.addEdge(L,k)}let w=b.at(-1);if(b.length>0&&w)G.addEdge(go,w.name);else{let H=this.#l(V,!1,y).map(f=>f===jI?v:f);H.length===1?G.addEdge(go,H[0]):G.addConditionalEdges(go,this.#r(v),H)}for(let H=b.length-1;H>0;H--){let f=b[H],L=f.name,k=b[H-1].name;if(f.allowed&&f.allowed.length>0){let U=f.allowed.map(q=>b0(q)).filter(q=>q!=="tools"||y),T=Array.from(new Set([k,...U]));G.addConditionalEdges(L,this.#a(V,f.allowed,k,y),T)}else G.addEdge(L,k)}if(b.length>0){let H=b[0],f=H.name,L=this.#l(V,!0,y).filter(T=>T!=="tools"||y),k=!!(H.allowed&&H.allowed.length>0),U=L.map(T=>T===jI?v:T);G.addConditionalEdges(f,this.#s(V,k,v,y),U)}for(let H=Z.length-1;H>0;H--){let f=Z[H],L=f.name,k=Z[H-1].name;if(f.allowed&&f.allowed.length>0){let U=f.allowed.map(q=>b0(q)).filter(q=>q!=="tools"||y),T=Array.from(new Set([k,...U]));G.addConditionalEdges(L,this.#a(V,f.allowed,k,y),T)}else G.addEdge(L,k)}if(Z.length>0){let H=Z[0],f=H.name;if(H.allowed&&H.allowed.length>0){let L=H.allowed.map(U=>b0(U)).filter(U=>U!=="tools"||y),k=Array.from(new Set([jI,...L]));G.addConditionalEdges(f,this.#a(V,H.allowed,jI,y),k)}else G.addEdge(f,jI)}if(y){let H=F;a.size>0?G.addConditionalEdges(eb,this.#c(a,v,H),[H,v]):G.addEdge(eb,H)}this.#e=G.compile({checkpointer:this.options.checkpointer,store:this.options.store,name:this.options.name,description:this.options.description})}get graph(){return this.#e}get checkpointer(){return this.#e.checkpointer}set checkpointer(e){this.#e.checkpointer=e}get store(){return this.#e.store}set store(e){this.#e.store=e}withConfig(e){return new hVt(this.options,xn(this.#t,e))}#l(e,I=!1,l=e.length>0){let n=[];return l&&n.push(eb),I&&n.push(go),n.push(jI),n}#c(e,I,l){return n=>{let a=n.messages,c=a[a.length-1];return pt.isInstance(c)&&c.name&&e.has(c.name)?this.options.responseFormat?l:I:l}}#r(e=jI){return I=>{let l=I.messages.at(-1);if(!He.isInstance(l)||!l.tool_calls||l.tool_calls.length===0||l.tool_calls.every(a=>a.name.startsWith("extract-")))return e;if(this.#I==="v1")return eb;let n=l.tool_calls.filter(a=>!a.name.startsWith("extract-"));return n.length===0?e:n.map(a=>new wr(eb,{...I,lg_tool_call:a}))}}#s(e,I,l,n=e.length>0){let a=!!this.options.responseFormat;return c=>{let r=c,s=r.messages,i=s.at(-1);if(He.isInstance(i)&&(!i.tool_calls||i.tool_calls.length===0))return l;if(I&&r.jumpTo){let h=b0(r.jumpTo);return h===jI?l:h==="tools"?n?new wr(eb,{...c,jumpTo:void 0}):l:new wr(go,{...c,jumpTo:void 0})}let G=s.filter(pt.isInstance),d=s.filter(He.isInstance).at(-1),u=d?.tool_calls?.filter(h=>!G.some(N=>N.tool_call_id===h.id));if(u&&u.length>0)return this.#I==="v1"?eb:u.map(h=>new wr(eb,{...c,lg_tool_call:h}));let b=d?.tool_calls?.some(h=>h.name.startsWith("extract-"));if(u&&u.length===0&&!b&&a)return go;if(!He.isInstance(i)||!i.tool_calls||i.tool_calls.length===0)return l;let Z=i.tool_calls.every(h=>h.name.startsWith("extract-")),p=i.tool_calls.some(h=>!h.name.startsWith("extract-"));if(Z||!p)return l;if(this.#I==="v1")return eb;let W=i.tool_calls.filter(h=>!h.name.startsWith("extract-"));return W.length===0?l:W.map(h=>new wr(eb,{...c,lg_tool_call:h}))}}#a(e,I,l,n=e.length>0){let a=new Set(I.map(c=>b0(c)));return c=>{let r=c;if(r.jumpTo){let s=b0(r.jumpTo);if(s===jI&&a.has(jI))return jI;if(s==="tools"&&a.has("tools"))return n?new wr(eb,{...c,jumpTo:void 0}):jI;if(s==="model_request"&&a.has("model_request"))return new wr(go,{...c,jumpTo:void 0})}return l}}#o(e,I,l,n=e.length>0){return a=>{let c=a;if(!c.jumpTo)return I;let r=b0(c.jumpTo);return r===jI?l:r==="tools"?n?new wr(eb,{...a,jumpTo:void 0}):l:new wr(go,{...a,jumpTo:void 0})}}#i(e,I,l=e.length>0){return n=>{let a=n;if(!a.jumpTo)return I;let c=b0(a.jumpTo);return c===jI?jI:c==="tools"?l?new wr(eb,{...n,jumpTo:void 0}):jI:new wr(go,{...n,jumpTo:void 0})}}async#G(e,I){if(!this.options.middleware||this.options.middleware.length===0||e instanceof An||!e)return e;let l=await PNt(this.options.middleware,e),n={...(await this.#e.getState(I).catch(()=>({values:{}}))).values,...e};if(!n)return n;for(let[a,c]of Object.entries(l))a in n||(n[a]=c);return n}async invoke(e,I){let l=xn(this.#t,I),n=await this.#G(e,l);return this.#e.invoke(n,l)}async stream(e,I){let l=xn(this.#t,I),n=await this.#G(e,l);return this.#e.stream(n,l)}async drawMermaidPng(e){let I=await(await(await this.#e.getGraphAsync()).drawMermaidPng(e)).arrayBuffer();return new Uint8Array(I)}async drawMermaid(e){return(await this.#e.getGraphAsync()).drawMermaid(e)}streamEvents(e,I,l){let n=xn(this.#t,I);return this.#e.streamEvents(e,{...n,version:I?.version??"v2"},l)}getGraphAsync(e){return this.#e.getGraphAsync(e)}getState(e,I){return this.#e.getState(e,I)}getStateHistory(e,I){return this.#e.getStateHistory(e,I)}getSubgraphs(e,I){return this.#e.getSubgraphs(e,I)}getSubgraphsAsync(e,I){return this.#e.getSubgraphsAsync(e,I)}updateState(e,I,l){return this.#e.updateState(e,I,l)}get builder(){return this.#e.builder}}});function KK(t){return new pVt(t)}var soe=g(()=>{o();bQ();zK();WVt();BK();Rs();noe()});function DK(t){let e=async(l,n,a,c)=>{let r=l.name,s=l.args,i=n.description,G;typeof i=="function"?G=await i(l,a,c):i!==void 0?G=i:G=`${t.descriptionPrefix??"Tool execution requires approval"} + +Tool: ${r} +Args: ${JSON.stringify(s,null,2)}`;let d={name:r,args:s,description:G},u={actionName:r,allowedDecisions:n.allowedDecisions};return n.argsSchema&&(u.argsSchema=n.argsSchema),{actionRequest:d,reviewConfig:u}},I=(l,n,a)=>{let c=a.allowedDecisions;if(l.type==="approve"&&c.includes("approve"))return{revisedToolCall:n,toolMessage:null};if(l.type==="edit"&&c.includes("edit")){let s=l.editedAction;if(!s||typeof s.name!="string")throw new Error(`Invalid edited action for tool "${n.name}": name must be a string`);if(!s.args||typeof s.args!="object")throw new Error(`Invalid edited action for tool "${n.name}": args must be an object`);return{revisedToolCall:{type:"tool_call",name:s.name,args:s.args,id:n.id},toolMessage:null}}if(l.type==="reject"&&c.includes("reject")){if(l.message!==void 0&&typeof l.message!="string")throw new Error(`Tool call response for "${n.name}" must be a string, got ${typeof l.message}`);return{revisedToolCall:n,toolMessage:new pt({content:l.message??`User rejected the tool call for \`${n.name}\` with id ${n.id}`,name:n.name,tool_call_id:n.id,status:"error"})}}let r=`Unexpected human decision: ${JSON.stringify(l)}. Decision type '${l.type}' is not allowed for tool '${n.name}'. Expected one of ${JSON.stringify(c)} based on the tool's configuration.`;throw new Error(r)};return El({name:"HumanInTheLoopMiddleware",contextSchema:NVt,afterModel:{canJumpTo:["model"],hook:async(l,n)=>{let a=Tu(NVt,{...t,...n.context||{}});if(!a)return;let{messages:c}=l;if(!c.length)return;let r=[...c].reverse().find(N=>He.isInstance(N));if(!r||!r.tool_calls?.length||!a.interruptOn)return;let s={};for(let[N,V]of Object.entries(a.interruptOn))typeof V=="boolean"?V===!0&&(s[N]={allowedDecisions:[...VVt]}):V.allowedDecisions&&(s[N]=V);let i=[],G=[];for(let N of r.tool_calls)N.name in s?i.push(N):G.push(N);if(!i.length)return;let d=[],u=[];for(let N of i){let V=s[N.name],{actionRequest:R,reviewConfig:F}=await e(N,V,l,n);d.push(R),u.push(F)}let b=(await B3({actionRequests:d,reviewConfigs:u})).decisions;if(!b||!Array.isArray(b))throw new Error("Invalid HITLResponse: decisions must be a non-empty array");if(b.length!==i.length)throw new Error(`Number of human decisions (${b.length}) does not match number of hanging tool calls (${i.length}).`);let Z=[...G],p=[],W=b.some(N=>N.type==="reject");for(let N=0;N{o();Rs();NI();Bp();Wa();Fc();LMI=ie.function().args(ie.custom(),ie.custom(),ie.custom()).returns(ie.union([ie.string(),ie.promise(ie.string())])),VVt=["approve","edit","reject"],kMI=ie.enum(VVt),xMI=ie.object({allowedDecisions:ie.array(kMI),description:ie.union([ie.string(),LMI]).optional(),argsSchema:ie.record(ie.any()).optional()}),NVt=ie.object({interruptOn:ie.record(ie.union([ie.boolean(),xMI])).optional(),descriptionPrefix:ie.string().default("Tool execution requires approval")})});function aj(t){if("profile"in t&&typeof t.profile=="object"&&t.profile&&"maxInputTokens"in t.profile&&(typeof t.profile.maxInputTokens=="number"||t.profile.maxInputTokens==null))return t.profile.maxInputTokens??void 0;if("model"in t&&typeof t.model=="string")return z_(t.model);if("modelName"in t&&typeof t.modelName=="string")return z_(t.modelName)}function qK(t){let{data:e,error:I}=Hae(RVt,t);if(I)throw new Error(`Invalid summarization middleware options: ${ae.prettifyError(I)}`);return El({name:"SummarizationMiddleware",contextSchema:RVt.extend({model:ie.custom().optional()}),beforeModel:async(l,n)=>{let a=e.trigger,c=e.keep;e.maxTokensBeforeSummary!==void 0&&(console.warn("maxTokensBeforeSummary is deprecated. Use `trigger: { tokens: value }` instead."),a===void 0&&(a={tokens:e.maxTokensBeforeSummary})),e.messagesToKeep!==void 0&&(console.warn("messagesToKeep is deprecated. Use `keep: { messages: value }` instead."),(!c||c&&"messages"in c&&c.messages===Goe)&&(c={messages:e.messagesToKeep}));let r=n.context?.trigger!==void 0?n.context.trigger:a,s=n.context?.keep!==void 0?n.context.keep:c??{messages:Goe},i=doe.parse(s),G=[];r===void 0?G=[]:Array.isArray(r)?G=r.map(w=>kC.parse(w)):G=[kC.parse(r)];let d=G.some(w=>"fraction"in w)||"fraction"in i,u=typeof e.model=="string"?await Fo(e.model):e.model;if(d&&!aj(u))throw new Error("Model profile information is required to use fractional token limits. Use absolute token counts instead.");let b=n.context?.summaryPrompt===ioe?e.summaryPrompt??ioe:n.context?.summaryPrompt??e.summaryPrompt??ioe,Z=n.context.summaryPrefix??e.summaryPrefix??jMI,p=n.context?.trimTokensToSummarize!==void 0?n.context.trimTokensToSummarize:e.trimTokensToSummarize??UMI;BMI(l.messages);let W=n.context?.tokenCounter!==void 0?n.context.tokenCounter:e.tokenCounter??lg,h=await W(l.messages);if(!await TMI(l.messages,h,G,u))return;let{systemPrompt:N,conversationMessages:V}=MMI(l.messages),R=await _MI(V,i,W,u);if(R<=0)return;let{messagesToSummarize:F,preservedMessages:v}=SMI(N,V,R),y=new ZI({content:`${Z} + +${await qMI(F,u,b,W,p,n)}`,id:ju(),additional_kwargs:{lc_source:"summarization"}});return{messages:[new mi({id:Dse}),y,...v]}}})}function BMI(t){for(let e of t)e.id||(e.id=ju())}function MMI(t){return t.length>0&&Gl.isInstance(t[0])?{systemPrompt:t[0],conversationMessages:t.slice(1)}:{conversationMessages:t}}function SMI(t,e,I){let l=e.slice(0,I),n=e.slice(I);return t&&l.unshift(t),{messagesToSummarize:l,preservedMessages:n}}async function TMI(t,e,I,l){if(I.length===0)return!1;for(let n of I){let a=!0,c=!1;if(n.messages!==void 0&&(c=!0,t.length=c);G++){let d=Math.floor((a+c)/2);await I(t.slice(d))<=n?(r=d,c=d):a=d+1}if(r===t.length&&(r=a),r>=t.length){if(t.length===1)return 0;r=t.length-1}let i=gVt(t,r);if(i<=r)return i;for(let G=r;G>=0;G--)if(FVt(t,G))return G;return 0}function AVt(t,e){if(t.length<=e)return 0;let I=t.length-e,l=gVt(t,I);if(l<=I)return l;for(let n=I;n>=0;n--)if(FVt(t,n))return n;return 0}function FVt(t,e){if(e>=t.length)return!0;if(e=t.length||!pt.isInstance(t[e]))return e;let I=new Set,l=e;for(;l=0;n--){let a=t[n];if(He.isInstance(a)&&lj(a)){let c=XVt(a);for(let r of I)if(c.has(r))return n}}return l}function DMI(t,e,I,l){for(let n=e+1;ntypeof d=="string"?d:typeof d=="object"&&d!==null&&"text"in d?d.text:"").join("").trim():"Error generating summary: Invalid response format"}catch(s){return`Error generating summary: ${s}`}}async function PMI(t,e,I){if(I===void 0)return t;try{return await fX(t,{maxTokens:I,tokenCounter:async l=>e(l),strategy:"last",allowPartial:!0,includeSystem:!0})}catch{return t.slice(-OMI)}}var ioe,jMI,Goe,UMI,OMI,YVt,zMI,kC,doe,RVt,PK=g(()=>{o();aF();SK();Tb();Rs();NI();Xc();Bp();Wa();sG();Fc();UR();sZ();ioe=` +Context Extraction Assistant + + + +Your sole objective in this task is to extract the highest quality/most relevant context from the conversation history below. + + + +You're nearing the total number of input tokens you can accept, so you must extract the highest quality/most relevant pieces of information from your conversation history. +This context will then overwrite the conversation history presented below. Because of this, ensure the context you extract is only the most important information to your overall goal. + + + +The conversation history below will be replaced with the context you extract in this step. Because of this, you must do your very best to extract and record all of the most important context from the conversation history. +You want to ensure that you don't repeat any actions you've already completed, so the context you extract from the conversation history should be focused on the most important information to your overall goal. + + +The user will message you with the full message history you'll be extracting context from, to then replace. Carefully read over it all, and think deeply about what information is most important to your overall goal that should be saved: + +With all of this in mind, please carefully read over the entire conversation history, and extract the most important and relevant context to replace it so that you can free up space in the conversation history. +Respond ONLY with the extracted context. Do not include any additional information, or text before or after the extracted context. + + +Messages to summarize: +{messages} +`,jMI="Here is a summary of the conversation to date:",Goe=20,UMI=4e3,OMI=15,YVt=5,zMI=ie.function().args(ie.array(ie.custom())).returns(ie.union([ie.number(),ie.promise(ie.number())])),kC=ie.object({fraction:ie.number().gt(0,"Fraction must be greater than 0").max(1,"Fraction must be less than or equal to 1").optional(),tokens:ie.number().positive("Tokens must be greater than 0").optional(),messages:ie.number().int("Messages must be an integer").positive("Messages must be greater than 0").optional()}).refine(t=>[t.fraction,t.tokens,t.messages].filter(e=>e!==void 0).length>=1,{message:"At least one of fraction, tokens, or messages must be provided"}),doe=ie.object({fraction:ie.number().min(0,"Messages must be non-negative").max(1,"Fraction must be less than or equal to 1").optional(),tokens:ie.number().min(0,"Tokens must be greater than or equal to 0").optional(),messages:ie.number().int("Messages must be an integer").min(0,"Messages must be non-negative").optional()}).refine(t=>[t.fraction,t.tokens,t.messages].filter(e=>e!==void 0).length===1,{message:"Exactly one of fraction, tokens, or messages must be provided"}),RVt=ie.object({model:ie.custom(),trigger:ie.union([kC,ie.array(kC)]).optional(),keep:doe.optional(),tokenCounter:zMI.optional(),summaryPrompt:ie.string().default(ioe),trimTokensToSummarize:ie.number().optional(),summaryPrefix:ie.string().optional(),maxTokensBeforeSummary:ie.number().optional(),messagesToKeep:ie.number().optional()})});function $K(t){return El({name:"DynamicSystemPromptMiddleware",wrapModelCall:async(e,I)=>{let l=await t(e.state,e.runtime);if(!(typeof l=="string"||Gl.isInstance(l)))throw new Error("dynamicSystemPromptMiddleware function must return a string or SystemMessage");return I({...e,systemMessage:e.systemMessage.concat(l)})}})}var uoe=g(()=>{o();Rs();NI()});function eSI(t){if(!t||t.length===0)throw new Error("Invalid usage: tools must be non-empty");let e=t.map(l=>ie.literal(l.name)),I=ie.union(e);return ie.object({tools:ie.array(I).describe("Tools to use. Place the most relevant tools first.")})}function eD(t){return El({name:"LLMToolSelector",contextSchema:tSI,async wrapModelCall(e,I){let l=await ISI(e,t,e.runtime);if(!l)return I(e);let n=eSI(l.availableTools),a=await(await l.model.withStructuredOutput?.(n))?.invoke([{role:"system",content:l.systemMessage},l.lastUserMessage]);if(!a||typeof a!="object"||!("tools"in a))throw new Error(`Expected object response with tools array, got ${typeof a}`);return I(lSI(a,l.availableTools,l.validToolNames,e,t))}})}async function ISI(t,e,I){let l=I.context.model??e.model,n=I.context.maxTools??e.maxTools,a=I.context.alwaysInclude??e.alwaysInclude??[],c=I.context.systemPrompt??e.systemPrompt??$MI;if(!t.tools||t.tools.length===0)return;let r=t.tools.filter(b=>typeof b=="object"&&"name"in b&&"description"in b&&typeof b.name=="string");if(a.length>0){let b=new Set(r.map(p=>p.name)),Z=a.filter(p=>!b.has(p));if(Z.length>0)throw new Error(`Tools in alwaysInclude not found in request: ${Z.join(", ")}. Available tools: ${Array.from(b).sort().join(", ")}`)}let s=r.filter(b=>!a.includes(b.name));if(s.length===0)return;let i=c;n!==void 0&&(i+=` +IMPORTANT: List the tool names in order of relevance, with the most relevant first. If you exceed the maximum number of tools, only the first ${n} will be used.`);let G;for(let b of t.messages)ZI.isInstance(b)&&(G=b);if(!G)throw new Error("No user message found in request messages");let d=l?typeof l=="string"?await Fo(l):l:t.model,u=s.map(b=>b.name);return{availableTools:s,systemMessage:i,lastUserMessage:G,model:d,validToolNames:u}}function lSI(t,e,I,l,n){let a=n.maxTools,c=n.alwaysInclude??[],r=[],s=[];for(let u of t.tools){if(!I.includes(u)){s.push(u);continue}!r.includes(u)&&(a===void 0||r.length0)throw new Error(`Model selected invalid tools: ${s.join(", ")}`);let i=e.filter(u=>r.includes(u.name)),G=(l.tools??[]).filter(u=>typeof u=="object"&&"name"in u&&typeof u.name=="string"&&c.includes(u.name));i.push(...G);let d=(l.tools??[]).filter(u=>!(typeof u=="object"&&"name"in u&&"description"in u&&typeof u.name=="string"));return{...l,tools:[...i,...d]}}var $MI,tSI,boe=g(()=>{o();aF();Rs();NI();Fc();sZ();$MI="Your goal is to select the most relevant tools for answering the user's query.";tSI=ie.object({model:ie.string().or(ie.instanceof(GC)).optional(),systemPrompt:ie.string().optional(),maxTools:ie.number().optional(),alwaysInclude:ie.array(ie.string()).optional()})});function oSI(t){let e=t.replace(/\D/g,""),I=0,l=!1;for(let n=e.length-1;n>=0;n--){let a=parseInt(e[n],10);l&&(a*=2,a>9&&(a-=9)),I+=a,l=!l}return I%10===0}function xC(t){return{text:t[0],start:t.index??0,end:(t.index??0)+t[0].length}}function rj(t){let e=[],I=new RegExp(nSI),l;for(;(l=I.exec(t))!==null;)e.push(xC(l));return e}function sj(t){let e=[],I=new RegExp(aSI),l;for(;(l=I.exec(t))!==null;){let n=l[0].replace(/\D/g,"");n.length>=13&&n.length<=19&&oSI(n)&&e.push(xC(l))}return e}function oj(t){let e=[],I=new RegExp(cSI),l;for(;(l=I.exec(t))!==null;){let n=l[0].split(".");n.length===4&&n.every(a=>{let c=parseInt(a,10);return c>=0&&c<=255})&&e.push(xC(l))}return e}function ij(t){let e=[],I=new RegExp(rSI),l;for(;(l=I.exec(t))!==null;)e.push(xC(l));return e}function Gj(t){let e=[],I=new RegExp(sSI),l;for(;(l=I.exec(t))!==null;)e.push(xC(l));return e}function dj(t){let e;if(t.detector)if(typeof t.detector=="string"){let I=new RegExp(t.detector,"g");e=l=>{let n=[],a,c=new RegExp(I);for(;(a=c.exec(l))!==null;)n.push(xC(a));return n}}else t.detector instanceof RegExp?e=I=>{if(!(t.detector instanceof RegExp))throw new Error("Detector is required");let l=[],n;for(;(n=t.detector.exec(I))!==null;)l.push(xC(n));return l}:e=t.detector;else{let I=t.piiType;if(!hCe[I])throw new Error(`Unknown PII type: ${t.piiType}. Must be one of: ${Object.keys(hCe).join(", ")}, or provide a custom detector.`);e=hCe[I]}return{piiType:t.piiType,strategy:t.strategy,detector:e}}function iSI(t,e,I){let l=t;for(let n=e.length-1;n>=0;n--){let a=e[n],c=`[REDACTED_${I.toUpperCase()}]`;l=l.slice(0,a.start)+c+l.slice(a.end)}return l}function GSI(t,e,I){let l=t;for(let n=e.length-1;n>=0;n--){let a=e[n],c=a.text,r;if(I==="credit_card")r=`****-****-****-${c.replace(/\D/g,"").slice(-4)}`;else if(I==="email"){let[s,i]=c.split("@");s&&i?r=`${s[0]}***@${i}`:r="***"}else{let s=Math.min(4,c.length);r=`${"*".repeat(Math.max(0,c.length-s))}${c.slice(-s)}`}l=l.slice(0,a.start)+r+l.slice(a.end)}return l}function dSI(t,e,I){let l=t;for(let n=e.length-1;n>=0;n--){let a=e[n],c=`<${I}_hash:${eQ(a.text).slice(0,8)}>`;l=l.slice(0,a.start)+c+l.slice(a.end)}return l}function uj(t,e,I,l){if(e.length===0)return t;switch(I){case"block":throw new cj(l,e);case"redact":return iSI(t,e,l);case"mask":return GSI(t,e,l);case"hash":return dSI(t,e,l);default:throw new Error(`Unknown strategy: ${I}`)}}function WCe(t,e){let I=e.detector(t);return I.length===0?{content:t,matches:[]}:{content:uj(t,I,e.strategy,e.piiType),matches:I}}function tD(t,e={}){let{strategy:I="redact",detector:l}=e,n=dj({piiType:t,strategy:I,detector:l});return El({name:`PIIMiddleware[${n.piiType}]`,contextSchema:uSI,beforeModel:async(a,c)=>{let r=c.context.applyToInput??e.applyToInput??!0,s=c.context.applyToToolResults??e.applyToToolResults??!1;if(!r&&!s)return;let i=a.messages;if(!i||i.length===0)return;let G=[...i],d=!1;if(r){let u=null;for(let b=i.length-1;b>=0;b--)if(ZI.isInstance(i[b])){u=b;break}if(u!==null){let b=i[u];if(b&&b.content){let{content:Z,matches:p}=WCe(String(b.content),n);p.length>0&&(G[u]=new ZI({content:Z,id:b.id,name:b.name}),d=!0)}}}if(s){let u=null;for(let b=i.length-1;b>=0;b--)if(He.isInstance(i[b])){u=b;break}if(u!==null)for(let b=u+1;b0&&(G[b]=new pt({content:p,id:Z.id,name:Z.name,tool_call_id:Z.tool_call_id}),d=!0)}}}if(d)return{messages:G}},afterModel:async(a,c)=>{if(!(c.context.applyToOutput??e.applyToOutput??!1))return;let r=a.messages;if(!r||r.length===0)return;let s=null,i=null;for(let Z=r.length-1;Z>=0;Z--){let p=r[Z];if(He.isInstance(p)){i=p,s=Z;break}}if(s===null||!i||!i.content)return;let{content:G,matches:d}=WCe(String(i.content),n);if(d.length===0)return;let u=new He({content:G,id:i.id,name:i.name,tool_calls:i.tool_calls}),b=[...r];return b[s]=u,{messages:b}}})}var cj,nSI,aSI,cSI,rSI,sSI,hCe,uSI,moe=g(()=>{o();Rs();NI();Fc();O_();cj=class extends Error{constructor(t,e){super(`PII detected: ${t} found ${e.length} occurrence(s)`),this.piiType=t,this.matches=e,this.name="PIIDetectionError"}},nSI=/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g,aSI=/\b(?:\d{4}[-\s]?){3}\d{4}\b/g,cSI=/\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b/g,rSI=/\b(?:[0-9A-Fa-f]{2}[:-]){5}(?:[0-9A-Fa-f]{2})\b/g,sSI=/(?:https?:\/\/|www\.)[^\s<>"{}|\\^`[\]]+/gi;hCe={email:rj,credit_card:sj,ip:oj,mac_address:ij,url:Gj};uSI=ie.object({applyToInput:ie.boolean().optional(),applyToOutput:ie.boolean().optional(),applyToToolResults:ie.boolean().optional()})});function mSI(){return Math.random().toString(36).substring(2,11)}function NCe(t,e,I){let l=t;for(let[n,a]of Object.entries(e)){let c=n.toUpperCase().replace(/[^a-zA-Z0-9_-]/g,"");l=l.replace(a,r=>{let s=mSI();return I[s]=r,`[REDACTED_${c}_${s}]`})}return l}async function ZSI(t,e){if(ZI.isInstance(t)||pt.isInstance(t)||Gl.isInstance(t)){let I=t.content,l=await NCe(I,e.rules,e.redactionMap);if(l!==I){let n=Object.getPrototypeOf(t).constructor;return new n({...t,content:l})}return t}if(He.isInstance(t)){let I=typeof t.content=="string"?t.content:JSON.stringify(t.content),l=JSON.stringify(t.tool_calls),n=await NCe(I,e.rules,e.redactionMap),a=await NCe(l,e.rules,e.redactionMap);return n!==I||a!==l?new He({...t,content:typeof t.content=="string"?n:JSON.parse(n),tool_calls:JSON.parse(a)}):t}throw new Error(`Unsupported message type: ${t.type}`)}function ID(t,e){let I=t;return I=I.replace(/\[REDACTED_[A-Z_]+_(\w+)\]/g,(l,n)=>e[n]?e[n]:l),I}function vVt(t,e){if(ZI.isInstance(t)||pt.isInstance(t)||Gl.isInstance(t)){let I=t.content,l=ID(I,e);if(l!==I){let n=Object.getPrototypeOf(t).constructor;return{message:new n({...t,content:l}),changed:!0}}return{message:t,changed:!1}}if(He.isInstance(t)){let I=typeof t.content=="string"?t.content:JSON.stringify(t.content),l=JSON.stringify(t.tool_calls),n=ID(I,e),a=ID(l,e);return n!==I||a!==l?{message:new He({...t,content:typeof t.content=="string"?n:JSON.parse(n),tool_calls:JSON.parse(a)}),changed:!0}:{message:t,changed:!1}}throw new Error(`Unsupported message type: ${t.type}`)}function lD(t={}){let e={};return console.warn("DEPRECATED: piiRedactionMiddleware is deprecated. Please use piiMiddleware instead, go to https://docs.langchain.com/oss/javascript/langchain/middleware/built-in#pii-detection for more information."),El({name:"PIIRedactionMiddleware",contextSchema:bSI,wrapModelCall:async(I,l)=>{let n=I.runtime.context.rules??t.rules??{};if(Object.keys(n).length===0)return l(I);let a=await Promise.all(I.state.messages.map(c=>ZSI(c,{rules:n,redactionMap:e})));return l({...I,messages:a})},afterModel:async I=>{if(Object.keys(e).length===0)return;let l=I.messages.at(-1);if(!He.isInstance(l))return;let n=I.messages.at(-2),{message:a,changed:c}=vVt(l,e);if(!c)return;let r;if(He.isInstance(l)&&l?.tool_calls?.length===0&&typeof l.content=="string"&&l.content.startsWith("{")&&l.content.endsWith("}"))try{r=JSON.parse(ID(l.content,e))}catch{}if(He.isInstance(n)&&n?.tool_calls?.length!==0&&n?.tool_calls?.some(s=>s.name.startsWith("extract-"))){let{message:s,changed:i}=vVt(n,e),G=n.tool_calls?.find(u=>u.name.startsWith("extract-"))?.args,d=G?JSON.parse(ID(JSON.stringify(G),e)):void 0;if(c||i)return{...I,...d?{structuredResponse:d}:{},messages:[new mi({id:n.id}),new mi({id:l.id}),s,a]}}return{...I,...r?{structuredResponse:r}:{},messages:[new mi({id:l.id}),a]}}})}var bSI,Zoe=g(()=>{o();Rs();NI();Fc();bSI=ie.object({rules:ie.record(ie.string(),ie.instanceof(RegExp).describe("Regular expression pattern to match PII")).optional()})});function nD(t={}){let e=t.edits??[new bj],I=t.tokenCountMethod??"approx";return El({name:"ContextEditingMiddleware",wrapModelCall:async(l,n)=>{if(!l.messages||l.messages.length===0)return n(l);let a=l.systemPrompt?[new Gl(l.systemPrompt)]:[],c=I==="approx"?lg:async r=>{let s=[...a,...r];if("getNumTokensFromMessages"in l.model)return l.model.getNumTokensFromMessages(s).then(({totalCount:i})=>i);throw new Error(`Model "${l.model.getName()}" does not support token counting`)};for(let r of e)await r.apply({messages:l.messages,model:l.model,countTokens:c});return n(l)}})}var pSI,hSI,poe,bj,hoe=g(()=>{o();Tb();Rs();PK();NI();pSI="[cleared]",hSI=1e5,poe=3,bj=class{#e;trigger;keep;clearToolInputs;excludeTools;placeholder;model;clearAtLeast;constructor(t={}){let e=t.trigger;t.triggerTokens!==void 0&&(console.warn("triggerTokens is deprecated. Use `trigger: { tokens: value }` instead."),e===void 0&&(e={tokens:t.triggerTokens}));let I=t.keep;if(t.keepMessages!==void 0&&(console.warn("keepMessages is deprecated. Use `keep: { messages: value }` instead."),I===void 0&&(I={messages:t.keepMessages})),e===void 0&&(e={tokens:hSI}),I===void 0&&(I={messages:poe}),Array.isArray(e))this.#e=e.map(l=>kC.parse(l)),this.trigger=this.#e;else{let l=kC.parse(e);this.#e=[l],this.trigger=l}this.keep=doe.parse(I),t.clearAtLeast!==void 0&&console.warn("clearAtLeast is deprecated and will be removed in a future version. It conflicts with the `keep` property. Use `keep: { tokens: value }` or `keep: { messages: value }` instead to control retention."),this.clearAtLeast=t.clearAtLeast??0,this.clearToolInputs=t.clearToolInputs??!1,this.excludeTools=new Set(t.excludeTools??[]),this.placeholder=t.placeholder??pSI}async apply(t){let{messages:e,model:I,countTokens:l}=t,n=await l(e),a=[];for(let u=0;up.id===b.tool_call_id)||a.push(u)}}for(let u=a.length-1;u>=0;u--)e.splice(a[u],1);let c=n;if(a.length>0&&(c=await l(e)),!this.#I(e,c,I))return;let r=[];for(let u=0;u=r.length?[]:s>0?r.slice(0,-s):r,G=0,d=[...i];for(let{idx:u,msg:b}of d){if(b.response_metadata?.context_editing?.cleared)continue;let Z=this.#t(e.slice(0,u),b.tool_call_id);if(!Z)continue;let p=Z.tool_calls?.find(N=>N.id===b.tool_call_id);if(!p)continue;let W=b.name||p.name;if(this.excludeTools.has(W))continue;if(e[u]=new pt({tool_call_id:b.tool_call_id,content:this.placeholder,name:b.name,artifact:void 0,response_metadata:{...b.response_metadata,context_editing:{cleared:!0,strategy:"clear_tool_uses"}}}),this.clearToolInputs){let N=e.indexOf(Z);N>=0&&(e[N]=this.#l(Z,b.tool_call_id))}let h=await l(e);G=Math.max(0,c-h)}if(this.clearAtLeast>0&&G0&&s=0&&!(G>=this.clearAtLeast);b--){let{idx:Z,msg:p}=u[b];if(p.response_metadata?.context_editing?.cleared)continue;let W=this.#t(e.slice(0,Z),p.tool_call_id);if(!W)continue;let h=W.tool_calls?.find(R=>R.id===p.tool_call_id);if(!h)continue;let N=p.name||h.name;if(this.excludeTools.has(N))continue;if(e[Z]=new pt({tool_call_id:p.tool_call_id,content:this.placeholder,name:p.name,artifact:void 0,response_metadata:{...p.response_metadata,context_editing:{cleared:!0,strategy:"clear_tool_uses"}}}),this.clearToolInputs){let R=e.indexOf(W);R>=0&&(e[R]=this.#l(W,p.tool_call_id))}let V=await l(e);G=Math.max(0,c-V)}}}#I(t,e,I){for(let l of this.#e){let n=!0,a=!1;if(l.messages!==void 0&&(a=!0,t.length=0;c--){let r=t[c],s=await e([r.msg]);if(n+s<=l)n+=s,a++;else break}return a}if("fraction"in this.keep&&this.keep.fraction!==void 0){if(!I)return poe;let l=aj(I);if(typeof l=="number"){let n=Math.floor(l*this.keep.fraction);if(n<=0)return poe;let a=0,c=0;for(let r=t.length-1;r>=0;r--){let s=t[r],i=await e([s.msg]);if(a+i<=n)a+=i,c++;else break}return c}}return poe}#t(t,e){for(let I=t.length-1;I>=0;I--){let l=t[I];if(He.isInstance(l)&&l.tool_calls?.some(n=>n.id===e))return l}return null}#l(t,e){let I=t.tool_calls?.map(c=>c.id===e?{...c,args:{}}:c),l={...t.response_metadata},n={...l.context_editing},a=new Set(n.cleared_tool_inputs);return a.add(e),n.cleared_tool_inputs=Array.from(a).sort(),l.context_editing=n,new He({content:t.content,tool_calls:I,response_metadata:l,id:t.id,name:t.name,additional_kwargs:t.additional_kwargs})}}});function WSI(t){return t?`Tool call limit exceeded. Do not call '${t}' again.`:"Tool call limit exceeded. Do not make additional tool calls."}function wVt(t,e,I,l,n){let a=n?`'${n}' tool`:"Tool",c=[];return I!==void 0&&t>I&&c.push(`thread limit exceeded (${t}/${I} calls)`),l!==void 0&&e>l&&c.push(`run limit exceeded (${e}/${l} calls)`),`${a} call limit reached: ${c.join(" and ")}.`}function aD(t){if(t.threadLimit===void 0&&t.runLimit===void 0)throw new Error("At least one limit must be specified (threadLimit or runLimit)");let e=t.exitBehavior??yVt,I=HVt.safeParse(e);if(!I.success)throw new Error(ae.prettifyError(I.error).slice(2));if(t.threadLimit!==void 0&&t.runLimit!==void 0&&t.runLimit>t.threadLimit)throw new Error(`runLimit (${t.runLimit}) cannot exceed threadLimit (${t.threadLimit}). The run limit should be less than or equal to the thread limit.`);return El({name:t.toolName?`ToolCallLimitMiddleware[${t.toolName}]`:"ToolCallLimitMiddleware",stateSchema:VSI,afterModel:{canJumpTo:["end"],hook:l=>{let n=[...l.messages].reverse().find(He.isInstance);if(!n||!n.tool_calls)return;let a=(V,R)=>t.threadLimit!==void 0&&V+1>t.threadLimit||t.runLimit!==void 0&&R+1>t.runLimit,c=V=>t.toolName===void 0||V.name===t.toolName,r=(V,R,F)=>{let v=[],y=[],w=R,H=F;for(let f of V)c(f)&&(a(w,H)?y.push(f):(v.push(f),w+=1,H+=1));return{allowed:v,blocked:y,finalThreadCount:w,finalRunCount:H+y.length}},s=t.toolName??YSI,i={...l.threadToolCallCount??{}},G={...l.runToolCallCount??{}},d=i[s]??0,u=G[s]??0,{allowed:b,blocked:Z,finalThreadCount:p,finalRunCount:W}=r(n.tool_calls,d,u);if(i[s]=p,G[s]=W,Z.length===0)return b.length>0?{threadToolCallCount:i,runToolCallCount:G}:void 0;if(e==="error")throw new mj(p+Z.length,W,t.threadLimit,t.runLimit,t.toolName);let h=WSI(t.toolName),N=Z.map(V=>new pt({content:h,tool_call_id:V.id,name:V.name,status:"error"}));if(e==="end"){let V=[];if(t.toolName!==void 0?V=n.tool_calls.filter(F=>F.name!==t.toolName):new Set(n.tool_calls.map(F=>F.name).filter(Boolean)).size>1&&(V=b.length>0?b:n.tool_calls),V.length>0){let F=Array.from(new Set(V.map(v=>v.name).filter(Boolean))).join(", ");throw new Error(`Cannot end execution with other tool calls pending. Found calls to: ${F}. Use 'continue' or 'error' behavior instead.`)}let R=wVt(p+Z.length,W,t.threadLimit,t.runLimit,t.toolName);return N.push(new He(R)),{threadToolCallCount:i,runToolCallCount:G,jumpTo:"end",messages:N}}return{threadToolCallCount:i,runToolCallCount:G,messages:N}}},afterAgent:()=>({runToolCallCount:{}})})}var NSI,yVt,HVt,mj,VSI,YSI,Woe=g(()=>{o();Rs();NI();sG();Fc();NSI=["continue","error","end"],yVt="continue";HVt=ie.enum(NSI).default(yVt),mj=class extends Error{threadCount;runCount;threadLimit;runLimit;toolName;constructor(t,e,I,l,n=void 0){let a=wVt(t,e,I,l,n);super(a),this.name="ToolCallLimitExceededError",this.threadCount=t,this.runCount=e,this.threadLimit=I,this.runLimit=l,this.toolName=n}};ie.object({toolName:ie.string().optional(),threadLimit:ie.number().optional(),runLimit:ie.number().optional(),exitBehavior:HVt});VSI=ie.object({threadToolCallCount:ie.record(ie.string(),ie.number()).default({}),runToolCallCount:ie.record(ie.string(),ie.number()).default({})}),YSI="__all__"});function cD(t){let e=ir(({todos:I},l)=>new An({update:{todos:I,messages:[new pt({content:`Updated todo list to ${JSON.stringify(I)}`,tool_call_id:l.toolCall?.id})]}}),{name:"write_todos",description:t?.toolDescription??RSI,schema:ie.object({todos:ie.array(QVt).describe("List of todo items to update")})});return El({name:"todoListMiddleware",stateSchema:FSI,tools:[e],wrapModelCall:(I,l)=>l({...I,systemMessage:I.systemMessage.concat(` + +${t?.systemPrompt??Zj}`)}),afterModel:I=>{let l=I.messages;if(!l||l.length===0)return;let n=[...l].reverse().find(c=>He.isInstance(c));if(!n||!n.tool_calls||n.tool_calls.length===0)return;let a=n.tool_calls.filter(c=>c.name===e.name);if(a.length>1)return{messages:a.map(c=>new pt({content:"Error: The `write_todos` tool should never be called multiple times in parallel. Please call it only once per model invocation to update the todo list.",tool_call_id:c.id,status:"error"}))}}})}var RSI,Zj,ASI,QVt,FSI,Noe=g(()=>{o();Rs();soe();NI();Ns();Bp();Fc();RSI=`Use this tool to create and manage a structured task list for your current work session. This helps you track progress, organize complex tasks, and demonstrate thoroughness to the user. +It also helps the user understand the progress of the task and overall progress of their requests. +Only use this tool if you think it will be helpful in staying organized. If the user's request is trivial and takes less than 3 steps, it is better to NOT use this tool and just do the task directly. + +## When to Use This Tool +Use this tool in these scenarios: + +1. Complex multi-step tasks - When a task requires 3 or more distinct steps or actions +2. Non-trivial and complex tasks - Tasks that require careful planning or multiple operations +3. User explicitly requests todo list - When the user directly asks you to use the todo list +4. User provides multiple tasks - When users provide a list of things to be done (numbered or comma-separated) +5. The plan may need future revisions or updates based on results from the first few steps. Keeping track of this in a list is helpful. + +## How to Use This Tool +1. When you start working on a task - Mark it as in_progress BEFORE beginning work. +2. After completing a task - Mark it as completed and add any new follow-up tasks discovered during implementation. +3. You can also update future tasks, such as deleting them if they are no longer necessary, or adding new tasks that are necessary. Don't change previously completed tasks. +4. You can make several updates to the todo list at once. For example, when you complete a task, you can mark the next task you need to start as in_progress. + +## When NOT to Use This Tool +It is important to skip using this tool when: +1. There is only a single, straightforward task +2. The task is trivial and tracking it provides no benefit +3. The task can be completed in less than 3 trivial steps +4. The task is purely conversational or informational + +## Examples of When to Use the Todo List + + +User: I want to add a dark mode toggle to the application settings. Make sure you run the tests and build when you're done! +Assistant: I'll help add a dark mode toggle to your application settings. Let me create a todo list to track this implementation. +*Creates todo list with the following items:* +1. Create dark mode toggle component in Settings page +2. Add dark mode state management (context/store) +3. Implement CSS-in-JS styles for dark theme +4. Update existing components to support theme switching +5. Run tests and build process, addressing any failures or errors that occur +*Begins working on the first task* + + +The assistant used the todo list because: +1. Adding dark mode in it of itself is a multi-step feature requiring UI, state management, and styling changes +2. The assistant inferred that tests and build need to pass by adding "Ensure tests and build succeed" as the final task +3. Both of the user's requests are complex and require multiple steps to complete. + + + + +User: Help me plan a comprehensive marketing campaign for our new product launch, including social media, email marketing, and press releases. +Assistant: I'll help you plan a comprehensive marketing campaign for your product launch. Let me create a todo list to organize all the components. +*Creates todo list with the following items:* +1. Define target audience and key messaging +2. Create social media content calendar and posting schedule +3. Design email marketing sequence and automation flows +4. Draft press release and identify media contacts +5. Set up tracking and analytics for campaign performance +6. Create visual assets and brand materials +7. Coordinate launch timeline and deliverables +*Begins working on the first task* + + +The assistant used the todo list because: +1. Marketing campaign planning involves multiple distinct channels and activities +2. Each component requires careful coordination and planning +3. The systematic approach ensures all aspects of the launch are covered + + + + +User: Help me rename the function getCwd to getCurrentWorkingDirectory across my project +Assistant: Let me first search through your codebase to find all occurrences of 'getCwd'. +*Uses search tools to locate all instances of getCwd in the codebase* +Assistant: I've found 15 instances of 'getCwd' across 8 different files. Let me create a todo list to track these changes. +*Creates todo list with specific items for each file that needs updating* + + +The assistant used the todo list because: +1. The assistant searched to understand the scope of the task +2. Upon finding multiple occurrences across different files, it determined this was a complex task with multiple steps (>3) +3. The todo list helps ensure every instance is tracked and updated systematically +4. This approach prevents missing any occurrences and maintains consistency. + + + + +User: I need help organizing my home office: decluttering the desk, setting up a filing system, organizing digital files, and creating a daily workflow. +Assistant: I'll help you organize your home office systematically. Let me create a todo list to track each area of organization. +*Creates todo list with items like: 1) Sort and declutter desk items, 2) Set up physical filing system for documents, 3) Organize digital files and folders, 4) Create daily workflow and productivity systems, 5) Establish maintenance routines* +Let's start with decluttering your desk space to create a clean foundation for the other organizational systems. + + +The assistant used the todo list because: +1. The user provided multiple distinct organizational tasks +2. Each area requires different approaches and careful planning +3. Home organization benefits from systematic, step-by-step completion +4. Progress tracking ensures all areas are addressed thoroughly + + + +## Examples of When NOT to Use the Todo List + + +User: How do I print 'Hello World' in Python? +Assistant: In Python, you can print "Hello World" with this simple code: + +\`\`\`python +print("Hello World") +\`\`\` + +This will output the text "Hello World" to the console when executed. + + +The assistant did not use the todo list because this is a single, trivial task that can be completed in one step. There's no need to track multiple tasks or steps for such a straightforward request. + + + + +User: What's the best way to water houseplants? +Assistant: The best way to water houseplants depends on the specific plant type, but here are some general guidelines: + +- Check soil moisture by inserting your finger about 1-2 inches into the soil +- Water thoroughly when the top inch feels dry, allowing water to drain from the bottom +- Use room temperature water and water in the morning when possible +- Avoid overwatering, which is more harmful than underwatering for most plants + +Different plants have different needs, so it's important to research your specific varieties for optimal care. + + +The assistant did not use the todo list because this is an informational request with no actual tasks to complete. The user is simply asking for advice and explanation, not for the assistant to perform multiple steps or activities. + + + + +User: Can you add a comment to the calculateTotal function to explain what it does? +Assistant: Sure, let me add a comment to the calculateTotal function to explain what it does. +* Uses the Edit tool to add a comment to the calculateTotal function * + + +The assistant did not use the todo list because this is a single, straightforward task confined to one location. Adding a comment doesn't require tracking multiple steps or systematic organization. + + + + +User: What time is it in Tokyo right now? +Assistant: I'll check the current time in Tokyo for you. + +*Searches for current time in Tokyo* + +The current time in Tokyo, Japan is [current time]. Tokyo is in the Japan Standard Time (JST) zone, which is UTC+9. + + +The assistant did not use the todo list because this is a single information lookup with immediate results. There are no multiple steps to track or organize, making the todo list unnecessary for this straightforward request. + + + + +User: I need to write a function that checks if a number is prime and then test it out. +Assistant: I'll help you write a function that checks if a number is prime and then test it out. +*Writes function that checks if a number is prime* +*Tests the function* + + +Even though this is a multi-step task, it is very straightforward and can be completed in two trivial steps (which is less than 3 steps!). Using the todo list here is overkill and wastes time and tokens. + + + + +User: I want you to order a pizza from Dominos, order a burger from McDonald's, and order a salad from Subway. +Assistant: I'll help you order a pizza from Dominos, order a burger from McDonald's, and order a salad from Subway. +*Orders a pizza from Dominos* +*Orders a burger from McDonald's* +*Orders a salad from Subway* + + +Even though this is a multi-step task, assuming the assistant has the ability to order from these restaurants, it is very straightforward and can be completed in three trivial tool calls. +Using the todo list here is overkill and wastes time and tokens. These three tool calls should be made in parallel, in fact. + + + + +## Task States and Management + +1. **Task States**: Use these states to track progress: + - pending: Task not yet started + - in_progress: Currently working on (you can have multiple tasks in_progress at a time if they are not related to each other and can be run in parallel) + - completed: Task finished successfully + +2. **Task Management**: + - Update task status in real-time as you work + - Mark tasks complete IMMEDIATELY after finishing (don't batch completions) + - Complete current tasks before starting new ones + - Remove tasks that are no longer relevant from the list entirely + - IMPORTANT: When you write this todo list, you should mark your first task (or tasks) as in_progress immediately!. + - IMPORTANT: Unless all tasks are completed, you should always have at least one task in_progress to show the user that you are working on something. + +3. **Task Completion Requirements**: + - ONLY mark a task as completed when you have FULLY accomplished it + - If you encounter errors, blockers, or cannot finish, keep the task as in_progress + - When blocked, create a new task describing what needs to be resolved + - Never mark a task as completed if: + - There are unresolved issues or errors + - Work is partial or incomplete + - You encountered blockers that prevent completion + - You couldn't find necessary resources or dependencies + - Quality standards haven't been met + +4. **Task Breakdown**: + - Create specific, actionable items + - Break complex tasks into smaller, manageable steps + - Use clear, descriptive task names + +Being proactive with task management demonstrates attentiveness and ensures you complete all requirements successfully +Remember: If you only need to make a few tool calls to complete a task, and it is clear what you need to do, it is better to just do the task directly and NOT call this tool at all.`,Zj=`## \`write_todos\` + +You have access to the \`write_todos\` tool to help you manage and plan complex objectives. +Use this tool for complex objectives to ensure that you are tracking each necessary step and giving the user visibility into your progress. +This tool is very helpful for planning complex objectives, and for breaking down these larger complex objectives into smaller steps. + +It is critical that you mark todos as completed as soon as you are done with a step. Do not batch up multiple steps before marking them as completed. +For simple objectives that only require a few steps, it is better to just complete the objective directly and NOT use this tool. +Writing todos takes time and tokens, use it when it is helpful for managing complex many-step problems! But not for simple few-step requests. + +## Important To-Do List Usage Notes to Remember +- The \`write_todos\` tool should never be called multiple times in parallel. +- Don't be afraid to revise the To-Do list as you go. New information may reveal new tasks that need to be done, or old tasks that are irrelevant.`,ASI=ie.enum(["pending","in_progress","completed"]).describe("Status of the todo"),QVt=ie.object({content:ie.string().describe("Content of the todo item"),status:ASI}),FSI=ie.object({todos:ie.array(QVt).default([])})});function rD(t){return El({name:"ModelCallLimitMiddleware",contextSchema:gSI,stateSchema:vSI,beforeModel:{canJumpTo:["end"],hook:(e,I)=>{let l=I.context.exitBehavior??t?.exitBehavior??XSI;l==="throw"&&(console.warn("The 'throw' exit behavior is deprecated. Please use 'error' instead."),l="error");let n=I.context.threadLimit??t?.threadLimit,a=I.context.runLimit??t?.runLimit,c=e.threadModelCallCount,r=e.runModelCallCount;if(typeof n=="number"&&n<=c){let s=new fVt({threadLimit:n,threadCount:c});if(l==="end")return{jumpTo:"end",messages:[new He(s.message)]};throw s}if(typeof a=="number"&&a<=r){let s=new fVt({runLimit:a,runCount:r});if(l==="end")return{jumpTo:"end",messages:[new He(s.message)]};throw s}return e}},afterModel:e=>({runModelCallCount:e.runModelCallCount+1,threadModelCallCount:e.threadModelCallCount+1}),afterAgent:()=>({runModelCallCount:0})})}var XSI,gSI,vSI,fVt,Voe=g(()=>{o();Rs();NI();Fc();XSI="end",gSI=ie.object({threadLimit:ie.number().optional(),runLimit:ie.number().optional(),exitBehavior:ie.enum(["error","end"]).optional()}),vSI=ie.object({threadModelCallCount:ie.number().default(0),runModelCallCount:ie.number().default(0)}),fVt=class extends Error{constructor({threadLimit:t,runLimit:e,threadCount:I,runCount:l}){let n=[];typeof t=="number"&&typeof I=="number"&&n.push(`thread level call limit reached with ${I} model calls`),typeof e=="number"&&typeof l=="number"&&n.push(`run level call limit reached with ${l} model calls`),super(`Model call limits exceeded${n.length>0?`: ${n.join(", ")}`:""}`),this.name="ModelCallLimitMiddlewareError"}}});function sD(...t){return El({name:"modelFallbackMiddleware",wrapModelCall:async(e,I)=>{try{return await I(e)}catch(l){for(let n=0;n{o();aF();Rs()});var Roe,VCe=g(()=>{o();Fc();Roe=ie.object({maxRetries:ie.number().min(0).default(2),retryOn:ie.union([ie.function().args(ie.instanceof(Error)).returns(ie.boolean()),ie.array(ie.custom())]).default(()=>()=>!0),backoffFactor:ie.number().min(0).default(2),initialDelayMs:ie.number().min(0).default(1e3),maxDelayMs:ie.number().min(0).default(6e4),jitter:ie.boolean().default(!0)})});var Aoe,YCe=g(()=>{o();sG();Aoe=class extends Error{cause;constructor(t){let e=ae.prettifyError(t).slice(2);super(e),this.name="InvalidRetryConfigError",this.cause=t}}});function oD(t={}){let{success:e,error:I,data:l}=EVt.safeParse(t);if(!e)throw new Aoe(I);let{maxRetries:n,retryOn:a,onFailure:c,backoffFactor:r,initialDelayMs:s,maxDelayMs:i,jitter:G}=l,d=p=>typeof a=="function"?a(p):a.some(W=>p.constructor===W),u={backoffFactor:r,initialDelayMs:s,maxDelayMs:i,jitter:G},b=(p,W)=>{let h=p.constructor.name;return`Model call failed after ${W} ${W===1?"attempt":"attempts"} with ${h}: ${p.message}`},Z=(p,W)=>{if(c==="error")throw p;let h;return typeof c=="function"?h=c(p):h=b(p,W),new He({content:h})};return El({name:"modelRetryMiddleware",contextSchema:EVt,wrapModelCall:async(p,W)=>{for(let h=0;h<=n;h++)try{return await W(p)}catch(N){let V=h+1,R=N&&typeof N=="object"&&"message"in N?N:new Error(String(N));if(!d(R))return Z(R,V);if(h0&&await Ioe(F)}else return Z(R,V)}throw new Error("Unexpected: retry loop completed without returning")}})}var EVt,Foe=g(()=>{o();Tb();Rs();VCe();YCe();NI();Fc();EVt=ie.object({onFailure:ie.union([ie.literal("error"),ie.literal("continue"),ie.function().args(ie.instanceof(Error)).returns(ie.string())]).default("continue")}).merge(Roe)});function iD(t={}){let{success:e,error:I,data:l}=JVt.safeParse(t);if(!e)throw new Aoe(I);let{maxRetries:n,tools:a,retryOn:c,onFailure:r,backoffFactor:s,initialDelayMs:i,maxDelayMs:G,jitter:d}=l,u=r;r==="raise"?(console.warn("\u26A0\uFE0F `onFailure: 'raise'` is deprecated. Use `onFailure: 'error'` instead."),u="error"):r==="return_message"&&(console.warn("\u26A0\uFE0F `onFailure: 'return_message'` is deprecated. Use `onFailure: 'continue'` instead."),u="continue");let b=[];for(let V of a??[])if(typeof V=="string")b.push(V);else if("name"in V&&typeof V.name=="string")b.push(V.name);else throw new TypeError("Expected a tool name string or tool instance to be passed to toolRetryMiddleware");let Z=V=>b.length===0?!0:b.includes(V),p=V=>typeof c=="function"?c(V):c.some(R=>V instanceof R),W={backoffFactor:s,initialDelayMs:i,maxDelayMs:G,jitter:d},h=(V,R,F)=>{let v=R.constructor.name;return`Tool '${V}' failed after ${F} ${F===1?"attempt":"attempts"} with ${v}`},N=(V,R,F,v)=>{if(u==="error")throw F;let y;return typeof u=="function"?y=u(F):y=h(V,F,v),new pt({content:y,tool_call_id:R,name:V,status:"error"})};return El({name:"toolRetryMiddleware",contextSchema:JVt,wrapToolCall:async(V,R)=>{let F=V.tool?.name??V.toolCall.name;if(!Z(F))return R(V);let v=V.toolCall.id??"";for(let y=0;y<=n;y++)try{return await R(V)}catch(w){let H=y+1,f=w&&typeof w=="object"&&"message"in w?w:new Error(String(w));if(!p(f))return N(F,v,f,H);if(y0&&await Ioe(L)}else return N(F,v,f,H)}throw new Error("Unexpected: retry loop completed without returning")}})}var JVt,Xoe=g(()=>{o();Tb();Rs();VCe();YCe();NI();Fc();JVt=ie.object({tools:ie.array(ie.union([ie.custom(),ie.custom(),ie.string()])).optional(),onFailure:ie.union([ie.literal("error"),ie.literal("continue"),ie.literal("raise"),ie.literal("return_message"),ie.function().args(ie.instanceof(Error)).returns(ie.string())]).default("continue")}).merge(Roe)});function GD(t={}){let e,{tools:I,model:l}=t,n=!I||I.length===0,a=new Set;if(!n&&I)for(let s of I)if(typeof s=="string")a.add(s);else{let i=typeof s.name=="string"?s.name:String(s.name);a.add(i)}let c,r=async()=>typeof l=="object"?l:typeof l=="string"?(c=c??await Fo(l,{temperature:1}).catch(s=>(console.error("Error initializing emulator model, using agent model:",s),e)),c):e;return El({name:"ToolEmulatorMiddleware",wrapModelCall:async(s,i)=>(e=s.model,i(s)),wrapToolCall:async(s,i)=>{let G=s.toolCall.name;if(!(n||a.has(G)))return i(s);let d=s.toolCall.args,u=`You are emulating a tool call for testing purposes. + +Tool: ${G} +Description: ${s.tool?.description||"No description available"} +Arguments: ${typeof d=="string"?d:JSON.stringify(d)} + +Generate a realistic response that this tool would return given these arguments. +Return ONLY the tool's output, no explanation or preamble. Introduce variation into your responses.`,b=await(await r()).invoke([new ZI(u)]);return new pt({content:typeof b.content=="string"?b.content:JSON.stringify(b.content),tool_call_id:s.toolCall.id??"",name:G})}})}var goe=g(()=>{o();aF();Rs();NI()});function ySI(t){return!t||typeof t!="object"||t===null||!("client"in t)||!("_getClientOptions"in t)||typeof t._getClientOptions!="function"?!1:(t._getClientOptions(),typeof t.client=="object"&&t.client!==null&&"moderations"in t.client&&typeof t.client.moderations=="object"&&t.client.moderations!==null&&"create"in t.client.moderations&&typeof t.client.moderations.create=="function")}function dD(t){let{model:e,moderationModel:I="omni-moderation-latest",checkInput:l=!0,checkOutput:n=!0,checkToolResults:a=!1,exitBehavior:c="end",violationMessage:r}=t,s,i=async()=>{if(s)return s;let V=typeof e=="string"?await Fo(e):e;if(!V.getName().includes("ChatOpenAI"))throw new Error(`Model must be an OpenAI model to use moderation middleware. Got: ${V.getName()}`);if(!ySI(V))throw new Error("Model must support moderation to use moderation middleware.");return s=V,s},G=V=>V.content==null?null:V.text||null,d=(V,R)=>{for(let F=V.length-1;F>=0;F--)if(R.isInstance(V[F]))return F;return null},u=(V,R)=>{let F=[],v=R.categories;for(let[f,L]of Object.entries(v))L&&F.push(f.replace(/_/g," "));let y=F.length>0?F.join(", "):"OpenAI's safety policies",w=r||wSI,H=JSON.stringify(R.category_scores,null,2);try{return w.replace("{categories}",y).replace("{category_scores}",H).replace("{original_content}",V)}catch{return w}};function b(V,R){let F=s?._getClientOptions?.(),v={input:V,model:R?.model??"omni-moderation-latest"};return s.client.moderations.create(v,F)}let Z=(V,R,F,v,y)=>{let w=u(v,y);if(c==="error")throw new HSI({content:v,stage:F,result:y,message:w});if(c==="end")return{jumpTo:"end",messages:[new He({content:w})]};if(R==null)return;let H=[...V],f=H[R],L=Object.getPrototypeOf(f).constructor;return H[R]=new L({...f,content:w}),{messages:H}},p=async V=>{let R=d(V,ZI);if(R==null)return null;let F=V[R],v=G(F);if(!v)return null;await i();let y=(await b(v,{model:I})).results.find(w=>w.flagged);return y?Z(V,R,"input",v,y):null},W=async V=>{let R=d(V,He);if(R==null)return null;let F=[...V],v=!1;for(let y=R+1;yk.flagged);if(!f)continue;let L=Z(F,y,"tool",H,f);if(L){if("jumpTo"in L)return L;"messages"in L&&(F.splice(0,F.length,...L.messages),v=!0)}}return v?{messages:F}:null},h=async V=>{let R=d(V,He);if(R==null)return null;let F=V[R],v=G(F);if(!v)return null;await i();let y=(await b(v,{model:I})).results.find(w=>w.flagged);return y?Z(V,R,"output",v,y):null},N=async V=>{let R=[...V],F=!1;if(a){let v=await W(R);if(v){if("jumpTo"in v)return v;"messages"in v&&(R.splice(0,R.length,...v.messages),F=!0)}}if(l){let v=await p(R);if(v){if("jumpTo"in v)return v;"messages"in v&&(R.splice(0,R.length,...v.messages),F=!0)}}return F?{messages:R}:null};return El({name:"OpenAIModerationMiddleware",beforeModel:{hook:async V=>{if(!l&&!a)return;let R=V.messages||[];if(R.length!==0)return await N(R)??void 0},canJumpTo:["end"]},afterModel:{hook:async V=>{if(!n)return;let R=V.messages||[];if(R.length!==0)return await h(R)??void 0},canJumpTo:["end"]}})}var wSI,HSI,voe=g(()=>{o();aF();Rs();NI();wSI="I'm sorry, but I can't comply with that request. It was flagged for {categories}.",HSI=class extends Error{content;stage;result;originalMessage;constructor({content:t,stage:e,result:I,message:l}){super(l),this.name="OpenAIModerationError",this.content=t,this.stage=e,this.result=I,this.originalMessage=l}}});function uD(t){return El({name:"PromptCachingMiddleware",contextSchema:CSI,wrapModelCall:(e,I)=>{let l=e.runtime.context.enableCaching??t?.enableCaching??QSI,n=e.runtime.context.ttl??t?.ttl??fSI,a=e.runtime.context.minMessagesToCache??t?.minMessagesToCache??ESI,c=e.runtime.context.unsupportedModelBehavior??t?.unsupportedModelBehavior??JSI;if(!l||!e.model)return I(e);if(!(e.model.getName()==="ChatAnthropic"||e.model.getName()==="ConfigurableModel"&&e.model._defaultConfig?.modelProvider==="anthropic")){let r=e.model.getName(),s=`Unsupported model '${e.model.getName()==="ConfigurableModel"?`${r} (${e.model._defaultConfig?.modelProvider})`:r}'. Prompt caching requires an Anthropic model`;if(c==="raise")throw new LSI(`${s} (e.g., 'anthropic:claude-4-0-sonnet').`);return c==="warn"&&console.warn(`PromptCachingMiddleware: Skipping caching for ${r}. Consider switching to an Anthropic model for caching benefits.`),I(e)}return e.state.messages.length+(e.systemPrompt?1:0){o();Rs();Fc();QSI=!0,fSI="5m",ESI=3,JSI="warn",CSI=ie.object({enableCaching:ie.boolean().optional(),ttl:ie.enum(["5m","1h"]).optional(),minMessagesToCache:ie.number().optional(),unsupportedModelBehavior:ie.enum(["ignore","warn","raise"]).optional()}),LSI=class extends Error{constructor(t){super(t),this.name="PromptCachingMiddlewareError"}}});var RCe=g(()=>{o();Tb();ooe();PK();uoe();boe();moe();Zoe();hoe();Woe();Noe();Voe();Yoe();Foe();Xoe();goe();voe();yoe()});var LVt={};tr(LVt,{AIMessage:()=>He,AIMessageChunk:()=>eI,BaseMessage:()=>Ml,BaseMessageChunk:()=>gr,ClearToolUsesEdit:()=>bj,Document:()=>Hr,DynamicStructuredTool:()=>bC,DynamicTool:()=>MX,FakeToolCallingModel:()=>MK,HumanMessage:()=>ZI,HumanMessageChunk:()=>No,InMemoryStore:()=>nQ,MIDDLEWARE_BRAND:()=>CC,MiddlewareError:()=>Ig,MultipleStructuredOutputsError:()=>dQ,MultipleToolsBoundError:()=>GQ,PIIDetectionError:()=>cj,ProviderStrategy:()=>Sb,StructuredOutputParsingError:()=>JC,StructuredTool:()=>cF,SystemMessage:()=>Gl,SystemMessageChunk:()=>Ms,TODO_LIST_MIDDLEWARE_SYSTEM_PROMPT:()=>Zj,Tool:()=>BX,ToolCallLimitExceededError:()=>mj,ToolInvocationError:()=>uQ,ToolMessage:()=>pt,ToolMessageChunk:()=>bi,ToolStrategy:()=>$u,anthropicPromptCachingMiddleware:()=>uD,applyStrategy:()=>uj,browser_exports:()=>ACe,context:()=>J3,contextEditingMiddleware:()=>nD,countTokensApproximately:()=>lg,createAgent:()=>KK,createMiddleware:()=>El,detectCreditCard:()=>sj,detectEmail:()=>rj,detectIP:()=>oj,detectMacAddress:()=>ij,detectUrl:()=>Gj,dynamicSystemPromptMiddleware:()=>$K,fakeModel:()=>YC,filterMessages:()=>DJ,humanInTheLoopMiddleware:()=>DK,initChatModel:()=>Fo,langchainMatchers:()=>VC,llmToolSelectorMiddleware:()=>eD,modelCallLimitMiddleware:()=>rD,modelFallbackMiddleware:()=>sD,modelRetryMiddleware:()=>oD,openAIModerationMiddleware:()=>dD,piiMiddleware:()=>tD,piiRedactionMiddleware:()=>lD,providerStrategy:()=>OK,resolveRedactionRule:()=>dj,summarizationMiddleware:()=>qK,todoListMiddleware:()=>cD,tool:()=>EC,toolCallLimitMiddleware:()=>aD,toolEmulatorMiddleware:()=>GD,toolRetryMiddleware:()=>iD,toolStrategy:()=>UK,trimMessages:()=>fX});var ACe,FCe=g(()=>{o();tF();aF();eoe();bQ();zK();Tb();BK();Rs();noe();soe();ooe();PK();uoe();boe();moe();Zoe();hoe();Woe();Noe();Voe();Yoe();Foe();Xoe();goe();voe();yoe();RCe();NI();Ns();ise();NC();H3();ose();ACe=Ro({AIMessage:()=>He,AIMessageChunk:()=>eI,BaseMessage:()=>Ml,BaseMessageChunk:()=>gr,ClearToolUsesEdit:()=>bj,Document:()=>Hr,DynamicStructuredTool:()=>bC,DynamicTool:()=>MX,FakeToolCallingModel:()=>MK,HumanMessage:()=>ZI,HumanMessageChunk:()=>No,InMemoryStore:()=>nQ,MIDDLEWARE_BRAND:()=>CC,MiddlewareError:()=>Ig,MultipleStructuredOutputsError:()=>dQ,MultipleToolsBoundError:()=>GQ,PIIDetectionError:()=>cj,ProviderStrategy:()=>Sb,StructuredOutputParsingError:()=>JC,StructuredTool:()=>cF,SystemMessage:()=>Gl,SystemMessageChunk:()=>Ms,TODO_LIST_MIDDLEWARE_SYSTEM_PROMPT:()=>Zj,Tool:()=>BX,ToolCallLimitExceededError:()=>mj,ToolInvocationError:()=>uQ,ToolMessage:()=>pt,ToolMessageChunk:()=>bi,ToolStrategy:()=>$u,anthropicPromptCachingMiddleware:()=>uD,applyStrategy:()=>uj,context:()=>J3,contextEditingMiddleware:()=>nD,countTokensApproximately:()=>lg,createAgent:()=>KK,createMiddleware:()=>El,detectCreditCard:()=>sj,detectEmail:()=>rj,detectIP:()=>oj,detectMacAddress:()=>ij,detectUrl:()=>Gj,dynamicSystemPromptMiddleware:()=>$K,fakeModel:()=>YC,filterMessages:()=>DJ,humanInTheLoopMiddleware:()=>DK,initChatModel:()=>Fo,langchainMatchers:()=>VC,llmToolSelectorMiddleware:()=>eD,modelCallLimitMiddleware:()=>rD,modelFallbackMiddleware:()=>sD,modelRetryMiddleware:()=>oD,openAIModerationMiddleware:()=>dD,piiMiddleware:()=>tD,piiRedactionMiddleware:()=>lD,providerStrategy:()=>OK,resolveRedactionRule:()=>dj,summarizationMiddleware:()=>qK,todoListMiddleware:()=>cD,tool:()=>EC,toolCallLimitMiddleware:()=>aD,toolEmulatorMiddleware:()=>GD,toolRetryMiddleware:()=>iD,toolStrategy:()=>UK,trimMessages:()=>fX})});var o5e=Y(YF=>{"use strict";o();Object.defineProperty(YF,"__esModule",{value:!0});require("obsidian");var ag=class extends Error{},JCe=class extends ag{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}},CCe=class extends ag{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}},LCe=class extends ag{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}},zC=class extends ag{},xoe=class extends ag{constructor(e){super(`Invalid unit ${e}`)}},_b=class extends ag{},NF=class extends ag{constructor(){super("Zone is an abstract class")}},Yt="numeric",h0="short",bZ="long",joe={year:Yt,month:Yt,day:Yt},XYt={year:Yt,month:h0,day:Yt},_SI={year:Yt,month:h0,day:Yt,weekday:h0},gYt={year:Yt,month:bZ,day:Yt},vYt={year:Yt,month:bZ,day:Yt,weekday:bZ},yYt={hour:Yt,minute:Yt},wYt={hour:Yt,minute:Yt,second:Yt},HYt={hour:Yt,minute:Yt,second:Yt,timeZoneName:h0},QYt={hour:Yt,minute:Yt,second:Yt,timeZoneName:bZ},fYt={hour:Yt,minute:Yt,hourCycle:"h23"},EYt={hour:Yt,minute:Yt,second:Yt,hourCycle:"h23"},JYt={hour:Yt,minute:Yt,second:Yt,hourCycle:"h23",timeZoneName:h0},CYt={hour:Yt,minute:Yt,second:Yt,hourCycle:"h23",timeZoneName:bZ},LYt={year:Yt,month:Yt,day:Yt,hour:Yt,minute:Yt},kYt={year:Yt,month:Yt,day:Yt,hour:Yt,minute:Yt,second:Yt},xYt={year:Yt,month:h0,day:Yt,hour:Yt,minute:Yt},jYt={year:Yt,month:h0,day:Yt,hour:Yt,minute:Yt,second:Yt},KSI={year:Yt,month:h0,day:Yt,weekday:h0,hour:Yt,minute:Yt},UYt={year:Yt,month:bZ,day:Yt,hour:Yt,minute:Yt,timeZoneName:h0},OYt={year:Yt,month:bZ,day:Yt,hour:Yt,minute:Yt,second:Yt,timeZoneName:h0},zYt={year:Yt,month:bZ,day:Yt,weekday:bZ,hour:Yt,minute:Yt,timeZoneName:bZ},BYt={year:Yt,month:bZ,day:Yt,weekday:bZ,hour:Yt,minute:Yt,second:Yt,timeZoneName:bZ},SC=class{get type(){throw new NF}get name(){throw new NF}get ianaName(){return this.name}get isUniversal(){throw new NF}offsetName(e,I){throw new NF}formatOffset(e,I){throw new NF}offset(e){throw new NF}equals(e){throw new NF}get isValid(){throw new NF}},gCe=null,Uoe=class t extends SC{static get instance(){return gCe===null&&(gCe=new t),gCe}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:I,locale:l}){return SYt(e,I,l)}formatOffset(e,I){return WD(this.offset(e),I)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}},Loe={};function DSI(t){return Loe[t]||(Loe[t]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),Loe[t]}var qSI={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function PSI(t,e){let I=t.format(e).replace(/\u200E/g,""),l=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(I),[,n,a,c,r,s,i,G]=l;return[c,n,a,r,s,i,G]}function $SI(t,e){let I=t.formatToParts(e),l=[];for(let n=0;n=0?Z:1e3+Z,(u-b)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}},KVt={};function eTI(t,e={}){let I=JSON.stringify([t,e]),l=KVt[I];return l||(l=new Intl.ListFormat(t,e),KVt[I]=l),l}var kCe={};function xCe(t,e={}){let I=JSON.stringify([t,e]),l=kCe[I];return l||(l=new Intl.DateTimeFormat(t,e),kCe[I]=l),l}var jCe={};function tTI(t,e={}){let I=JSON.stringify([t,e]),l=jCe[I];return l||(l=new Intl.NumberFormat(t,e),jCe[I]=l),l}var UCe={};function ITI(t,e={}){let{base:I,...l}=e,n=JSON.stringify([t,l]),a=UCe[n];return a||(a=new Intl.RelativeTimeFormat(t,e),UCe[n]=a),a}var pD=null;function lTI(){return pD||(pD=new Intl.DateTimeFormat().resolvedOptions().locale,pD)}function nTI(t){let e=t.indexOf("-x-");e!==-1&&(t=t.substring(0,e));let I=t.indexOf("-u-");if(I===-1)return[t];{let l,n;try{l=xCe(t).resolvedOptions(),n=t}catch{let s=t.substring(0,I);l=xCe(s).resolvedOptions(),n=s}let{numberingSystem:a,calendar:c}=l;return[n,a,c]}}function aTI(t,e,I){return(I||e)&&(t.includes("-u-")||(t+="-u"),I&&(t+=`-ca-${I}`),e&&(t+=`-nu-${e}`)),t}function cTI(t){let e=[];for(let I=1;I<=12;I++){let l=Rl.utc(2009,I,1);e.push(t(l))}return e}function rTI(t){let e=[];for(let I=1;I<=7;I++){let l=Rl.utc(2016,11,13+I);e.push(t(l))}return e}function Qoe(t,e,I,l){let n=t.listingMode();return n==="error"?null:n==="en"?I(e):l(e)}function sTI(t){return t.numberingSystem&&t.numberingSystem!=="latn"?!1:t.numberingSystem==="latn"||!t.locale||t.locale.startsWith("en")||new Intl.DateTimeFormat(t.intl).resolvedOptions().numberingSystem==="latn"}var OCe=class{constructor(e,I,l){this.padTo=l.padTo||0,this.floor=l.floor||!1;let{padTo:n,floor:a,...c}=l;if(!I||Object.keys(c).length>0){let r={useGrouping:!1,...l};l.padTo>0&&(r.minimumIntegerDigits=l.padTo),this.inf=tTI(e,r)}}format(e){if(this.inf){let I=this.floor?Math.floor(e):e;return this.inf.format(I)}else{let I=this.floor?Math.floor(e):I5e(e,3);return As(I,this.padTo)}}},zCe=class{constructor(e,I,l){this.opts=l,this.originalZone=void 0;let n;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){let c=-1*(e.offset/60),r=c>=0?`Etc/GMT+${c}`:`Etc/GMT${c}`;e.offset!==0&&NQ.create(r).valid?(n=r,this.dt=e):(n="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,n=e.zone.name):(n="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);let a={...this.opts};a.timeZone=a.timeZone||n,this.dtf=xCe(I,a)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){let e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(I=>{if(I.type==="timeZoneName"){let l=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...I,value:l}}else return I}):e}resolvedOptions(){return this.dtf.resolvedOptions()}},BCe=class{constructor(e,I,l){this.opts={style:"long",...l},!I&&MYt()&&(this.rtf=ITI(e,l))}format(e,I){return this.rtf?this.rtf.format(e,I):ATI(I,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,I){return this.rtf?this.rtf.formatToParts(e,I):[]}},Jr=class t{static fromOpts(e){return t.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)}static create(e,I,l,n=!1){let a=e||Er.defaultLocale,c=a||(n?"en-US":lTI()),r=I||Er.defaultNumberingSystem,s=l||Er.defaultOutputCalendar;return new t(c,r,s,a)}static resetCache(){pD=null,kCe={},jCe={},UCe={}}static fromObject({locale:e,numberingSystem:I,outputCalendar:l}={}){return t.create(e,I,l)}constructor(e,I,l,n){let[a,c,r]=nTI(e);this.locale=a,this.numberingSystem=I||c||null,this.outputCalendar=l||r||null,this.intl=aTI(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=n,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=sTI(this)),this.fastNumbersCached}listingMode(){let e=this.isEnglish(),I=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&I?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:t.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,I=!1){return Qoe(this,e,KYt,()=>{let l=I?{month:e,day:"numeric"}:{month:e},n=I?"format":"standalone";return this.monthsCache[n][e]||(this.monthsCache[n][e]=cTI(a=>this.extract(a,l,"month"))),this.monthsCache[n][e]})}weekdays(e,I=!1){return Qoe(this,e,PYt,()=>{let l=I?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},n=I?"format":"standalone";return this.weekdaysCache[n][e]||(this.weekdaysCache[n][e]=rTI(a=>this.extract(a,l,"weekday"))),this.weekdaysCache[n][e]})}meridiems(){return Qoe(this,void 0,()=>$Yt,()=>{if(!this.meridiemCache){let e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Rl.utc(2016,11,13,9),Rl.utc(2016,11,13,19)].map(I=>this.extract(I,e,"dayperiod"))}return this.meridiemCache})}eras(e){return Qoe(this,e,eRt,()=>{let I={era:e};return this.eraCache[e]||(this.eraCache[e]=[Rl.utc(-40,1,1),Rl.utc(2017,1,1)].map(l=>this.extract(l,I,"era"))),this.eraCache[e]})}extract(e,I,l){let n=this.dtFormatter(e,I),a=n.formatToParts(),c=a.find(r=>r.type.toLowerCase()===l);return c?c.value:null}numberFormatter(e={}){return new OCe(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,I={}){return new zCe(e,this.intl,I)}relFormatter(e={}){return new BCe(this.intl,this.isEnglish(),e)}listFormatter(e={}){return eTI(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}},vCe=null,Tp=class t extends SC{static get utcInstance(){return vCe===null&&(vCe=new t(0)),vCe}static instance(e){return e===0?t.utcInstance:new t(e)}static parseSpecifier(e){if(e){let I=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(I)return new t(qoe(I[1],I[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${WD(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${WD(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,I){return WD(this.fixed,I)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}},MCe=class extends SC{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}};function WQ(t,e){if(Tl(t)||t===null)return e;if(t instanceof SC)return t;if(oTI(t)){let I=t.toLowerCase();return I==="default"?e:I==="local"||I==="system"?Uoe.instance:I==="utc"||I==="gmt"?Tp.utcInstance:Tp.parseSpecifier(I)||NQ.create(t)}else return MC(t)?Tp.instance(t):typeof t=="object"&&"offset"in t&&typeof t.offset=="function"?t:new MCe(t)}var DVt=()=>Date.now(),qVt="system",PVt=null,$Vt=null,eYt=null,tYt=60,IYt,Er=class{static get now(){return DVt}static set now(e){DVt=e}static set defaultZone(e){qVt=e}static get defaultZone(){return WQ(qVt,Uoe.instance)}static get defaultLocale(){return PVt}static set defaultLocale(e){PVt=e}static get defaultNumberingSystem(){return $Vt}static set defaultNumberingSystem(e){$Vt=e}static get defaultOutputCalendar(){return eYt}static set defaultOutputCalendar(e){eYt=e}static get twoDigitCutoffYear(){return tYt}static set twoDigitCutoffYear(e){tYt=e%100}static get throwOnInvalid(){return IYt}static set throwOnInvalid(e){IYt=e}static resetCaches(){Jr.resetCache(),NQ.resetCache()}};function Tl(t){return typeof t>"u"}function MC(t){return typeof t=="number"}function Koe(t){return typeof t=="number"&&t%1===0}function oTI(t){return typeof t=="string"}function iTI(t){return Object.prototype.toString.call(t)==="[object Date]"}function MYt(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function GTI(t){return Array.isArray(t)?t:[t]}function lYt(t,e,I){if(t.length!==0)return t.reduce((l,n)=>{let a=[e(n),n];return l&&I(l[0],a[0])===l[0]?l:a},null)[1]}function dTI(t,e){return e.reduce((I,l)=>(I[l]=t[l],I),{})}function Yj(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function ng(t,e,I){return Koe(t)&&t>=e&&t<=I}function uTI(t,e){return t-e*Math.floor(t/e)}function As(t,e=2){let I=t<0,l;return I?l="-"+(""+-t).padStart(e,"0"):l=(""+t).padStart(e,"0"),l}function hQ(t){if(!(Tl(t)||t===null||t===""))return parseInt(t,10)}function UC(t){if(!(Tl(t)||t===null||t===""))return parseFloat(t)}function t5e(t){if(!(Tl(t)||t===null||t==="")){let e=parseFloat("0."+t)*1e3;return Math.floor(e)}}function I5e(t,e,I=!1){let l=10**e;return(I?Math.trunc:Math.round)(t*l)/l}function YD(t){return t%4===0&&(t%100!==0||t%400===0)}function hD(t){return YD(t)?366:365}function Ooe(t,e){let I=uTI(e-1,12)+1,l=t+(e-I)/12;return I===2?YD(l)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][I-1]}function Doe(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(t.year,t.month-1,t.day)),+e}function zoe(t){let e=(t+Math.floor(t/4)-Math.floor(t/100)+Math.floor(t/400))%7,I=t-1,l=(I+Math.floor(I/4)-Math.floor(I/100)+Math.floor(I/400))%7;return e===4||l===3?53:52}function SCe(t){return t>99?t:t>Er.twoDigitCutoffYear?1900+t:2e3+t}function SYt(t,e,I,l=null){let n=new Date(t),a={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};l&&(a.timeZone=l);let c={timeZoneName:e,...a},r=new Intl.DateTimeFormat(I,c).formatToParts(n).find(s=>s.type.toLowerCase()==="timezonename");return r?r.value:null}function qoe(t,e){let I=parseInt(t,10);Number.isNaN(I)&&(I=0);let l=parseInt(e,10)||0,n=I<0||Object.is(I,-0)?-l:l;return I*60+n}function TYt(t){let e=Number(t);if(typeof t=="boolean"||t===""||Number.isNaN(e))throw new _b(`Invalid unit value ${t}`);return e}function Boe(t,e){let I={};for(let l in t)if(Yj(t,l)){let n=t[l];if(n==null)continue;I[e(l)]=TYt(n)}return I}function WD(t,e){let I=Math.trunc(Math.abs(t/60)),l=Math.trunc(Math.abs(t%60)),n=t>=0?"+":"-";switch(e){case"short":return`${n}${As(I,2)}:${As(l,2)}`;case"narrow":return`${n}${I}${l>0?`:${l}`:""}`;case"techie":return`${n}${As(I,2)}${As(l,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Poe(t){return dTI(t,["hour","minute","second","millisecond"])}var bTI=["January","February","March","April","May","June","July","August","September","October","November","December"],_Yt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],mTI=["J","F","M","A","M","J","J","A","S","O","N","D"];function KYt(t){switch(t){case"narrow":return[...mTI];case"short":return[..._Yt];case"long":return[...bTI];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var DYt=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],qYt=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],ZTI=["M","T","W","T","F","S","S"];function PYt(t){switch(t){case"narrow":return[...ZTI];case"short":return[...qYt];case"long":return[...DYt];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var $Yt=["AM","PM"],pTI=["Before Christ","Anno Domini"],hTI=["BC","AD"],WTI=["B","A"];function eRt(t){switch(t){case"narrow":return[...WTI];case"short":return[...hTI];case"long":return[...pTI];default:return null}}function NTI(t){return $Yt[t.hour<12?0:1]}function VTI(t,e){return PYt(e)[t.weekday-1]}function YTI(t,e){return KYt(e)[t.month-1]}function RTI(t,e){return eRt(e)[t.year<0?0:1]}function ATI(t,e,I="always",l=!1){let n={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},a=["hours","minutes","seconds"].indexOf(t)===-1;if(I==="auto"&&a){let d=t==="days";switch(e){case 1:return d?"tomorrow":`next ${n[t][0]}`;case-1:return d?"yesterday":`last ${n[t][0]}`;case 0:return d?"today":`this ${n[t][0]}`}}let c=Object.is(e,-0)||e<0,r=Math.abs(e),s=r===1,i=n[t],G=l?s?i[1]:i[2]||i[1]:s?n[t][0]:t;return c?`${r} ${G} ago`:`in ${r} ${G}`}function nYt(t,e){let I="";for(let l of t)l.literal?I+=l.val:I+=e(l.val);return I}var FTI={D:joe,DD:XYt,DDD:gYt,DDDD:vYt,t:yYt,tt:wYt,ttt:HYt,tttt:QYt,T:fYt,TT:EYt,TTT:JYt,TTTT:CYt,f:LYt,ff:xYt,fff:UYt,ffff:zYt,F:kYt,FF:jYt,FFF:OYt,FFFF:BYt},dZ=class t{static create(e,I={}){return new t(e,I)}static parseFormat(e){let I=null,l="",n=!1,a=[];for(let c=0;c0&&a.push({literal:n||/^\s+$/.test(l),val:l}),I=null,l="",n=!n):n||r===I?l+=r:(l.length>0&&a.push({literal:/^\s+$/.test(l),val:l}),l=r,I=r)}return l.length>0&&a.push({literal:n||/^\s+$/.test(l),val:l}),a}static macroTokenToFormatOpts(e){return FTI[e]}constructor(e,I){this.opts=I,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,I){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...I}).format()}dtFormatter(e,I={}){return this.loc.dtFormatter(e,{...this.opts,...I})}formatDateTime(e,I){return this.dtFormatter(e,I).format()}formatDateTimeParts(e,I){return this.dtFormatter(e,I).formatToParts()}formatInterval(e,I){return this.dtFormatter(e.start,I).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,I){return this.dtFormatter(e,I).resolvedOptions()}num(e,I=0){if(this.opts.forceSimple)return As(e,I);let l={...this.opts};return I>0&&(l.padTo=I),this.loc.numberFormatter(l).format(e)}formatDateTimeFromString(e,I){let l=this.loc.listingMode()==="en",n=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",a=(b,Z)=>this.loc.extract(e,b,Z),c=b=>e.isOffsetFixed&&e.offset===0&&b.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,b.format):"",r=()=>l?NTI(e):a({hour:"numeric",hourCycle:"h12"},"dayperiod"),s=(b,Z)=>l?YTI(e,b):a(Z?{month:b}:{month:b,day:"numeric"},"month"),i=(b,Z)=>l?VTI(e,b):a(Z?{weekday:b}:{weekday:b,month:"long",day:"numeric"},"weekday"),G=b=>{let Z=t.macroTokenToFormatOpts(b);return Z?this.formatWithSystemDefault(e,Z):b},d=b=>l?RTI(e,b):a({era:b},"era"),u=b=>{switch(b){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return c({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return c({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return c({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return r();case"d":return n?a({day:"numeric"},"day"):this.num(e.day);case"dd":return n?a({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return i("short",!0);case"cccc":return i("long",!0);case"ccccc":return i("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return i("short",!1);case"EEEE":return i("long",!1);case"EEEEE":return i("narrow",!1);case"L":return n?a({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return n?a({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return s("short",!0);case"LLLL":return s("long",!0);case"LLLLL":return s("narrow",!0);case"M":return n?a({month:"numeric"},"month"):this.num(e.month);case"MM":return n?a({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return s("short",!1);case"MMMM":return s("long",!1);case"MMMMM":return s("narrow",!1);case"y":return n?a({year:"numeric"},"year"):this.num(e.year);case"yy":return n?a({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return n?a({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return n?a({year:"numeric"},"year"):this.num(e.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return G(b)}};return nYt(t.parseFormat(I),u)}formatDurationFromString(e,I){let l=s=>{switch(s[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},n=s=>i=>{let G=l(i);return G?this.num(s.get(G),i.length):i},a=t.parseFormat(I),c=a.reduce((s,{literal:i,val:G})=>i?s:s.concat(G),[]),r=e.shiftTo(...c.map(l).filter(s=>s));return nYt(a,n(r))}},uZ=class{constructor(e,I){this.reason=e,this.explanation=I}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}},tRt=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Rj(...t){let e=t.reduce((I,l)=>I+l.source,"");return RegExp(`^${e}$`)}function Aj(...t){return e=>t.reduce(([I,l,n],a)=>{let[c,r,s]=a(e,n);return[{...I,...c},r||l,s]},[{},null,1]).slice(0,2)}function Fj(t,...e){if(t==null)return[null,null];for(let[I,l]of e){let n=I.exec(t);if(n)return l(n)}return[null,null]}function IRt(...t){return(e,I)=>{let l={},n;for(n=0;nb!==void 0&&(Z||b&&G)?-b:b;return[{years:u(UC(I)),months:u(UC(l)),weeks:u(UC(n)),days:u(UC(a)),hours:u(UC(c)),minutes:u(UC(r)),seconds:u(UC(s),s==="-0"),milliseconds:u(t5e(i),d)}]}var kTI={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function a5e(t,e,I,l,n,a,c){let r={year:e.length===2?SCe(hQ(e)):hQ(e),month:_Yt.indexOf(I)+1,day:hQ(l),hour:hQ(n),minute:hQ(a)};return c&&(r.second=hQ(c)),t&&(r.weekday=t.length>3?DYt.indexOf(t)+1:qYt.indexOf(t)+1),r}var xTI=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function jTI(t){let[,e,I,l,n,a,c,r,s,i,G,d]=t,u=a5e(e,n,l,I,a,c,r),b;return s?b=kTI[s]:i?b=0:b=qoe(G,d),[u,new Tp(b)]}function UTI(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}var OTI=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,zTI=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,BTI=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function aYt(t){let[,e,I,l,n,a,c,r]=t;return[a5e(e,n,l,I,a,c,r),Tp.utcInstance]}function MTI(t){let[,e,I,l,n,a,c,r]=t;return[a5e(e,r,I,l,n,a,c),Tp.utcInstance]}var STI=Rj(gTI,n5e),TTI=Rj(vTI,n5e),_TI=Rj(yTI,n5e),KTI=Rj(nRt),cRt=Aj(ETI,Xj,RD,AD),DTI=Aj(wTI,Xj,RD,AD),qTI=Aj(HTI,Xj,RD,AD),PTI=Aj(Xj,RD,AD);function $TI(t){return Fj(t,[STI,cRt],[TTI,DTI],[_TI,qTI],[KTI,PTI])}function e_I(t){return Fj(UTI(t),[xTI,jTI])}function t_I(t){return Fj(t,[OTI,aYt],[zTI,aYt],[BTI,MTI])}function I_I(t){return Fj(t,[CTI,LTI])}var l_I=Aj(Xj);function n_I(t){return Fj(t,[JTI,l_I])}var a_I=Rj(QTI,fTI),c_I=Rj(aRt),r_I=Aj(Xj,RD,AD);function s_I(t){return Fj(t,[a_I,cRt],[c_I,r_I])}var cYt="Invalid Duration",rRt={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},o_I={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...rRt},Mp=146097/400,pj=146097/4800,i_I={years:{quarters:4,months:12,weeks:Mp/7,days:Mp,hours:Mp*24,minutes:Mp*24*60,seconds:Mp*24*60*60,milliseconds:Mp*24*60*60*1e3},quarters:{months:3,weeks:Mp/28,days:Mp/4,hours:Mp*24/4,minutes:Mp*24*60/4,seconds:Mp*24*60*60/4,milliseconds:Mp*24*60*60*1e3/4},months:{weeks:pj/7,days:pj,hours:pj*24,minutes:pj*24*60,seconds:pj*24*60*60,milliseconds:pj*24*60*60*1e3},...rRt},BC=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],G_I=BC.slice(0).reverse();function pQ(t,e,I=!1){let l={values:I?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy,matrix:e.matrix||t.matrix};return new bI(l)}function sRt(t,e){let I=e.milliseconds??0;for(let l of G_I.slice(1))e[l]&&(I+=e[l]*t[l].milliseconds);return I}function rYt(t,e){let I=sRt(t,e)<0?-1:1;BC.reduceRight((l,n)=>{if(Tl(e[n]))return l;if(l){let a=e[l]*I,c=t[n][l],r=Math.floor(a/c);e[n]+=r*I,e[l]-=r*c*I}return n},null),BC.reduce((l,n)=>{if(Tl(e[n]))return l;if(l){let a=e[l]%1;e[l]-=a,e[n]+=a*t[l][n]}return n},null)}function d_I(t){let e={};for(let[I,l]of Object.entries(t))l!==0&&(e[I]=l);return e}var bI=class t{constructor(e){let I=e.conversionAccuracy==="longterm"||!1,l=I?i_I:o_I;e.matrix&&(l=e.matrix),this.values=e.values,this.loc=e.loc||Jr.create(),this.conversionAccuracy=I?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=l,this.isLuxonDuration=!0}static fromMillis(e,I){return t.fromObject({milliseconds:e},I)}static fromObject(e,I={}){if(e==null||typeof e!="object")throw new _b(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new t({values:Boe(e,t.normalizeUnit),loc:Jr.fromObject(I),conversionAccuracy:I.conversionAccuracy,matrix:I.matrix})}static fromDurationLike(e){if(MC(e))return t.fromMillis(e);if(t.isDuration(e))return e;if(typeof e=="object")return t.fromObject(e);throw new _b(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,I){let[l]=I_I(e);return l?t.fromObject(l,I):t.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,I){let[l]=n_I(e);return l?t.fromObject(l,I):t.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,I=null){if(!e)throw new _b("need to specify a reason the Duration is invalid");let l=e instanceof uZ?e:new uZ(e,I);if(Er.throwOnInvalid)throw new LCe(l);return new t({invalid:l})}static normalizeUnit(e){let I={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!I)throw new xoe(e);return I}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,I={}){let l={...I,floor:I.round!==!1&&I.floor!==!1};return this.isValid?dZ.create(this.loc,l).formatDurationFromString(this,e):cYt}toHuman(e={}){if(!this.isValid)return cYt;let I=BC.map(l=>{let n=this.values[l];return Tl(n)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:l.slice(0,-1)}).format(n)}).filter(l=>l);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(I)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=I5e(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;let I=this.toMillis();return I<0||I>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},Rl.fromMillis(I,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.isValid?sRt(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;let I=t.fromDurationLike(e),l={};for(let n of BC)(Yj(I.values,n)||Yj(this.values,n))&&(l[n]=I.get(n)+this.get(n));return pQ(this,{values:l},!0)}minus(e){if(!this.isValid)return this;let I=t.fromDurationLike(e);return this.plus(I.negate())}mapUnits(e){if(!this.isValid)return this;let I={};for(let l of Object.keys(this.values))I[l]=TYt(e(this.values[l],l));return pQ(this,{values:I},!0)}get(e){return this[t.normalizeUnit(e)]}set(e){if(!this.isValid)return this;let I={...this.values,...Boe(e,t.normalizeUnit)};return pQ(this,{values:I})}reconfigure({locale:e,numberingSystem:I,conversionAccuracy:l,matrix:n}={}){let c={loc:this.loc.clone({locale:e,numberingSystem:I}),matrix:n,conversionAccuracy:l};return pQ(this,c)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;let e=this.toObject();return rYt(this.matrix,e),pQ(this,{values:e},!0)}rescale(){if(!this.isValid)return this;let e=d_I(this.normalize().shiftToAll().toObject());return pQ(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(c=>t.normalizeUnit(c));let I={},l={},n=this.toObject(),a;for(let c of BC)if(e.indexOf(c)>=0){a=c;let r=0;for(let i in l)r+=this.matrix[i][c]*l[i],l[i]=0;MC(n[c])&&(r+=n[c]);let s=Math.trunc(r);I[c]=s,l[c]=(r*1e3-s*1e3)/1e3}else MC(n[c])&&(l[c]=n[c]);for(let c in l)l[c]!==0&&(I[a]+=c===a?l[c]:l[c]/this.matrix[a][c]);return rYt(this.matrix,I),pQ(this,{values:I},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;let e={};for(let I of Object.keys(this.values))e[I]=this.values[I]===0?0:-this.values[I];return pQ(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function I(l,n){return l===void 0||l===0?n===void 0||n===0:l===n}for(let l of BC)if(!I(this.values[l],e.values[l]))return!1;return!0}},hj="Invalid Interval";function u_I(t,e){return!t||!t.isValid?Vj.invalid("missing or invalid start"):!e||!e.isValid?Vj.invalid("missing or invalid end"):ee:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:I}={}){return this.isValid?t.fromDateTimes(e||this.s,I||this.e):this}splitAt(...e){if(!this.isValid)return[];let I=e.map(mD).filter(c=>this.contains(c)).sort(),l=[],{s:n}=this,a=0;for(;n+this.e?this.e:c;l.push(t.fromDateTimes(n,r)),n=r,a+=1}return l}splitBy(e){let I=bI.fromDurationLike(e);if(!this.isValid||!I.isValid||I.as("milliseconds")===0)return[];let{s:l}=this,n=1,a,c=[];for(;ls*n));a=+r>+this.e?this.e:r,c.push(t.fromDateTimes(l,a)),l=a,n+=1}return c}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;let I=this.s>e.s?this.s:e.s,l=this.e=l?null:t.fromDateTimes(I,l)}union(e){if(!this.isValid)return this;let I=this.se.e?this.e:e.e;return t.fromDateTimes(I,l)}static merge(e){let[I,l]=e.sort((n,a)=>n.s-a.s).reduce(([n,a],c)=>a?a.overlaps(c)||a.abutsStart(c)?[n,a.union(c)]:[n.concat([a]),c]:[n,c],[[],null]);return l&&I.push(l),I}static xor(e){let I=null,l=0,n=[],a=e.map(s=>[{time:s.s,type:"s"},{time:s.e,type:"e"}]),c=Array.prototype.concat(...a),r=c.sort((s,i)=>s.time-i.time);for(let s of r)l+=s.type==="s"?1:-1,l===1?I=s.time:(I&&+I!=+s.time&&n.push(t.fromDateTimes(I,s.time)),I=null);return t.merge(n)}difference(...e){return t.xor([this].concat(e)).map(I=>this.intersection(I)).filter(I=>I&&!I.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} \u2013 ${this.e.toISO()})`:hj}toLocaleString(e=joe,I={}){return this.isValid?dZ.create(this.s.loc.clone(I),e).formatInterval(this):hj}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:hj}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:hj}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:hj}toFormat(e,{separator:I=" \u2013 "}={}){return this.isValid?`${this.s.toFormat(e)}${I}${this.e.toFormat(e)}`:hj}toDuration(e,I){return this.isValid?this.e.diff(this.s,e,I):bI.invalid(this.invalidReason)}mapEndpoints(e){return t.fromDateTimes(e(this.s),e(this.e))}},Wj=class{static hasDST(e=Er.defaultZone){let I=Rl.now().setZone(e).set({month:12});return!e.isUniversal&&I.offset!==I.set({month:6}).offset}static isValidIANAZone(e){return NQ.isValidZone(e)}static normalizeZone(e){return WQ(e,Er.defaultZone)}static months(e="long",{locale:I=null,numberingSystem:l=null,locObj:n=null,outputCalendar:a="gregory"}={}){return(n||Jr.create(I,l,a)).months(e)}static monthsFormat(e="long",{locale:I=null,numberingSystem:l=null,locObj:n=null,outputCalendar:a="gregory"}={}){return(n||Jr.create(I,l,a)).months(e,!0)}static weekdays(e="long",{locale:I=null,numberingSystem:l=null,locObj:n=null}={}){return(n||Jr.create(I,l,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:I=null,numberingSystem:l=null,locObj:n=null}={}){return(n||Jr.create(I,l,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return Jr.create(e).meridiems()}static eras(e="short",{locale:I=null}={}){return Jr.create(I,null,"gregory").eras(e)}static features(){return{relative:MYt()}}};function sYt(t,e){let I=n=>n.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),l=I(e)-I(t);return Math.floor(bI.fromMillis(l).as("days"))}function b_I(t,e,I){let l=[["years",(s,i)=>i.year-s.year],["quarters",(s,i)=>i.quarter-s.quarter+(i.year-s.year)*4],["months",(s,i)=>i.month-s.month+(i.year-s.year)*12],["weeks",(s,i)=>{let G=sYt(s,i);return(G-G%7)/7}],["days",sYt]],n={},a=t,c,r;for(let[s,i]of l)I.indexOf(s)>=0&&(c=s,n[s]=i(t,e),r=a.plus(n),r>e?(n[s]--,t=a.plus(n),t>e&&(r=t,n[s]--,t=a.plus(n))):t=r);return[t,n,r,c]}function m_I(t,e,I,l){let[n,a,c,r]=b_I(t,e,I),s=e-n,i=I.filter(d=>["hours","minutes","seconds","milliseconds"].indexOf(d)>=0);i.length===0&&(c0?bI.fromMillis(s,l).shiftTo(...i).plus(G):G}var c5e={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"},oYt={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Z_I=c5e.hanidec.replace(/[\[|\]]/g,"").split("");function p_I(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let I=0;I=a&&l<=c&&(e+=l-a)}}return parseInt(e,10)}else return e}function m0({numberingSystem:t},e=""){return new RegExp(`${c5e[t||"latn"]}${e}`)}var h_I="missing Intl.DateTimeFormat.formatToParts support";function Xn(t,e=I=>I){return{regex:t,deser:([I])=>e(p_I(I))}}var W_I="\xA0",oRt=`[ ${W_I}]`,iRt=new RegExp(oRt,"g");function N_I(t){return t.replace(/\./g,"\\.?").replace(iRt,oRt)}function iYt(t){return t.replace(/\./g,"").replace(iRt," ").toLowerCase()}function Z0(t,e){return t===null?null:{regex:RegExp(t.map(N_I).join("|")),deser:([I])=>t.findIndex(l=>iYt(I)===iYt(l))+e}}function GYt(t,e){return{regex:t,deser:([,I,l])=>qoe(I,l),groups:e}}function foe(t){return{regex:t,deser:([e])=>e}}function V_I(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Y_I(t,e){let I=m0(e),l=m0(e,"{2}"),n=m0(e,"{3}"),a=m0(e,"{4}"),c=m0(e,"{6}"),r=m0(e,"{1,2}"),s=m0(e,"{1,3}"),i=m0(e,"{1,6}"),G=m0(e,"{1,9}"),d=m0(e,"{2,4}"),u=m0(e,"{4,6}"),b=W=>({regex:RegExp(V_I(W.val)),deser:([h])=>h,literal:!0}),p=(W=>{if(t.literal)return b(W);switch(W.val){case"G":return Z0(e.eras("short"),0);case"GG":return Z0(e.eras("long"),0);case"y":return Xn(i);case"yy":return Xn(d,SCe);case"yyyy":return Xn(a);case"yyyyy":return Xn(u);case"yyyyyy":return Xn(c);case"M":return Xn(r);case"MM":return Xn(l);case"MMM":return Z0(e.months("short",!0),1);case"MMMM":return Z0(e.months("long",!0),1);case"L":return Xn(r);case"LL":return Xn(l);case"LLL":return Z0(e.months("short",!1),1);case"LLLL":return Z0(e.months("long",!1),1);case"d":return Xn(r);case"dd":return Xn(l);case"o":return Xn(s);case"ooo":return Xn(n);case"HH":return Xn(l);case"H":return Xn(r);case"hh":return Xn(l);case"h":return Xn(r);case"mm":return Xn(l);case"m":return Xn(r);case"q":return Xn(r);case"qq":return Xn(l);case"s":return Xn(r);case"ss":return Xn(l);case"S":return Xn(s);case"SSS":return Xn(n);case"u":return foe(G);case"uu":return foe(r);case"uuu":return Xn(I);case"a":return Z0(e.meridiems(),0);case"kkkk":return Xn(a);case"kk":return Xn(d,SCe);case"W":return Xn(r);case"WW":return Xn(l);case"E":case"c":return Xn(I);case"EEE":return Z0(e.weekdays("short",!1),1);case"EEEE":return Z0(e.weekdays("long",!1),1);case"ccc":return Z0(e.weekdays("short",!0),1);case"cccc":return Z0(e.weekdays("long",!0),1);case"Z":case"ZZ":return GYt(new RegExp(`([+-]${r.source})(?::(${l.source}))?`),2);case"ZZZ":return GYt(new RegExp(`([+-]${r.source})(${l.source})?`),2);case"z":return foe(/[a-z_+-/]{1,256}?/i);case" ":return foe(/[^\S\n\r]/);default:return b(W)}})(t)||{invalidReason:h_I};return p.token=t,p}var R_I={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function A_I(t,e,I){let{type:l,value:n}=t;if(l==="literal"){let s=/^\s+$/.test(n);return{literal:!s,val:s?" ":n}}let a=e[l],c=l;l==="hour"&&(e.hour12!=null?c=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?c="hour12":c="hour24":c=I.hour12?"hour12":"hour24");let r=R_I[c];if(typeof r=="object"&&(r=r[a]),r)return{literal:!1,val:r}}function F_I(t){return[`^${t.map(I=>I.regex).reduce((I,l)=>`${I}(${l.source})`,"")}$`,t]}function X_I(t,e,I){let l=t.match(e);if(l){let n={},a=1;for(let c in I)if(Yj(I,c)){let r=I[c],s=r.groups?r.groups+1:1;!r.literal&&r.token&&(n[r.token.val[0]]=r.deser(l.slice(a,a+s))),a+=s}return[l,n]}else return[l,{}]}function g_I(t){let e=a=>{switch(a){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}},I=null,l;return Tl(t.z)||(I=NQ.create(t.z)),Tl(t.Z)||(I||(I=new Tp(t.Z)),l=t.Z),Tl(t.q)||(t.M=(t.q-1)*3+1),Tl(t.h)||(t.h<12&&t.a===1?t.h+=12:t.h===12&&t.a===0&&(t.h=0)),t.G===0&&t.y&&(t.y=-t.y),Tl(t.u)||(t.S=t5e(t.u)),[Object.keys(t).reduce((a,c)=>{let r=e(c);return r&&(a[r]=t[c]),a},{}),I,l]}var yCe=null;function v_I(){return yCe||(yCe=Rl.fromMillis(1555555555555)),yCe}function y_I(t,e){if(t.literal)return t;let I=dZ.macroTokenToFormatOpts(t.val),l=uRt(I,e);return l==null||l.includes(void 0)?t:l}function GRt(t,e){return Array.prototype.concat(...t.map(I=>y_I(I,e)))}function dRt(t,e,I){let l=GRt(dZ.parseFormat(I),t),n=l.map(c=>Y_I(c,t)),a=n.find(c=>c.invalidReason);if(a)return{input:e,tokens:l,invalidReason:a.invalidReason};{let[c,r]=F_I(n),s=RegExp(c,"i"),[i,G]=X_I(e,s,r),[d,u,b]=G?g_I(G):[null,null,void 0];if(Yj(G,"a")&&Yj(G,"H"))throw new zC("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:l,regex:s,rawMatches:i,matches:G,result:d,zone:u,specificOffset:b}}}function w_I(t,e,I){let{result:l,zone:n,specificOffset:a,invalidReason:c}=dRt(t,e,I);return[l,n,a,c]}function uRt(t,e){if(!t)return null;let l=dZ.create(e,t).dtFormatter(v_I()),n=l.formatToParts(),a=l.resolvedOptions();return n.map(c=>A_I(c,t,a))}var bRt=[0,31,59,90,120,151,181,212,243,273,304,334],mRt=[0,31,60,91,121,152,182,213,244,274,305,335];function Sp(t,e){return new uZ("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function ZRt(t,e,I){let l=new Date(Date.UTC(t,e-1,I));t<100&&t>=0&&l.setUTCFullYear(l.getUTCFullYear()-1900);let n=l.getUTCDay();return n===0?7:n}function pRt(t,e,I){return I+(YD(t)?mRt:bRt)[e-1]}function hRt(t,e){let I=YD(t)?mRt:bRt,l=I.findIndex(a=>azoe(e)?(r=e+1,c=1):r=e,{weekYear:r,weekNumber:c,weekday:a,...Poe(t)}}function dYt(t){let{weekYear:e,weekNumber:I,weekday:l}=t,n=ZRt(e,1,4),a=hD(e),c=I*7+l-n-3,r;c<1?(r=e-1,c+=hD(r)):c>a?(r=e+1,c-=hD(e)):r=e;let{month:s,day:i}=hRt(r,c);return{year:r,month:s,day:i,...Poe(t)}}function wCe(t){let{year:e,month:I,day:l}=t,n=pRt(e,I,l);return{year:e,ordinal:n,...Poe(t)}}function uYt(t){let{year:e,ordinal:I}=t,{month:l,day:n}=hRt(e,I);return{year:e,month:l,day:n,...Poe(t)}}function H_I(t){let e=Koe(t.weekYear),I=ng(t.weekNumber,1,zoe(t.weekYear)),l=ng(t.weekday,1,7);return e?I?l?!1:Sp("weekday",t.weekday):Sp("week",t.week):Sp("weekYear",t.weekYear)}function Q_I(t){let e=Koe(t.year),I=ng(t.ordinal,1,hD(t.year));return e?I?!1:Sp("ordinal",t.ordinal):Sp("year",t.year)}function WRt(t){let e=Koe(t.year),I=ng(t.month,1,12),l=ng(t.day,1,Ooe(t.year,t.month));return e?I?l?!1:Sp("day",t.day):Sp("month",t.month):Sp("year",t.year)}function NRt(t){let{hour:e,minute:I,second:l,millisecond:n}=t,a=ng(e,0,23)||e===24&&I===0&&l===0&&n===0,c=ng(I,0,59),r=ng(l,0,59),s=ng(n,0,999);return a?c?r?s?!1:Sp("millisecond",n):Sp("second",l):Sp("minute",I):Sp("hour",e)}var HCe="Invalid DateTime",bYt=864e13;function Eoe(t){return new uZ("unsupported zone",`the zone "${t.name}" is not supported`)}function QCe(t){return t.weekData===null&&(t.weekData=TCe(t.c)),t.weekData}function OC(t,e){let I={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new Rl({...I,...e,old:I})}function VRt(t,e,I){let l=t-e*60*1e3,n=I.offset(l);if(e===n)return[l,e];l-=(n-e)*60*1e3;let a=I.offset(l);return n===a?[l,n]:[t-Math.min(n,a)*60*1e3,Math.max(n,a)]}function Joe(t,e){t+=e*60*1e3;let I=new Date(t);return{year:I.getUTCFullYear(),month:I.getUTCMonth()+1,day:I.getUTCDate(),hour:I.getUTCHours(),minute:I.getUTCMinutes(),second:I.getUTCSeconds(),millisecond:I.getUTCMilliseconds()}}function koe(t,e,I){return VRt(Doe(t),e,I)}function mYt(t,e){let I=t.o,l=t.c.year+Math.trunc(e.years),n=t.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,a={...t.c,year:l,month:n,day:Math.min(t.c.day,Ooe(l,n))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},c=bI.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),r=Doe(a),[s,i]=VRt(r,I,t.zone);return c!==0&&(s+=c,i=t.zone.offset(s)),{ts:s,o:i}}function bD(t,e,I,l,n,a){let{setZone:c,zone:r}=I;if(t&&Object.keys(t).length!==0||e){let s=e||r,i=Rl.fromObject(t,{...I,zone:s,specificOffset:a});return c?i:i.setZone(r)}else return Rl.invalid(new uZ("unparsable",`the input "${n}" can't be parsed as ${l}`))}function Coe(t,e,I=!0){return t.isValid?dZ.create(Jr.create("en-US"),{allowZ:I,forceSimple:!0}).formatDateTimeFromString(t,e):null}function fCe(t,e){let I=t.c.year>9999||t.c.year<0,l="";return I&&t.c.year>=0&&(l+="+"),l+=As(t.c.year,I?6:4),e?(l+="-",l+=As(t.c.month),l+="-",l+=As(t.c.day)):(l+=As(t.c.month),l+=As(t.c.day)),l}function ZYt(t,e,I,l,n,a){let c=As(t.c.hour);return e?(c+=":",c+=As(t.c.minute),(t.c.millisecond!==0||t.c.second!==0||!I)&&(c+=":")):c+=As(t.c.minute),(t.c.millisecond!==0||t.c.second!==0||!I)&&(c+=As(t.c.second),(t.c.millisecond!==0||!l)&&(c+=".",c+=As(t.c.millisecond,3))),n&&(t.isOffsetFixed&&t.offset===0&&!a?c+="Z":t.o<0?(c+="-",c+=As(Math.trunc(-t.o/60)),c+=":",c+=As(Math.trunc(-t.o%60))):(c+="+",c+=As(Math.trunc(t.o/60)),c+=":",c+=As(Math.trunc(t.o%60)))),a&&(c+="["+t.zone.ianaName+"]"),c}var YRt={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},f_I={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},E_I={ordinal:1,hour:0,minute:0,second:0,millisecond:0},RRt=["year","month","day","hour","minute","second","millisecond"],J_I=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],C_I=["year","ordinal","hour","minute","second","millisecond"];function pYt(t){let e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[t.toLowerCase()];if(!e)throw new xoe(t);return e}function hYt(t,e){let I=WQ(e.zone,Er.defaultZone),l=Jr.fromObject(e),n=Er.now(),a,c;if(Tl(t.year))a=n;else{for(let i of RRt)Tl(t[i])&&(t[i]=YRt[i]);let r=WRt(t)||NRt(t);if(r)return Rl.invalid(r);let s=I.offset(n);[a,c]=koe(t,s,I)}return new Rl({ts:a,zone:I,loc:l,o:c})}function WYt(t,e,I){let l=Tl(I.round)?!0:I.round,n=(c,r)=>(c=I5e(c,l||I.calendary?0:2,!0),e.loc.clone(I).relFormatter(I).format(c,r)),a=c=>I.calendary?e.hasSame(t,c)?0:e.startOf(c).diff(t.startOf(c),c).get(c):e.diff(t,c).get(c);if(I.unit)return n(a(I.unit),I.unit);for(let c of I.units){let r=a(c);if(Math.abs(r)>=1)return n(r,c)}return n(t>e?-0:0,I.units[I.units.length-1])}function NYt(t){let e={},I;return t.length>0&&typeof t[t.length-1]=="object"?(e=t[t.length-1],I=Array.from(t).slice(0,t.length-1)):I=Array.from(t),[e,I]}var Rl=class t{constructor(e){let I=e.zone||Er.defaultZone,l=e.invalid||(Number.isNaN(e.ts)?new uZ("invalid input"):null)||(I.isValid?null:Eoe(I));this.ts=Tl(e.ts)?Er.now():e.ts;let n=null,a=null;if(!l)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(I))[n,a]=[e.old.c,e.old.o];else{let r=I.offset(this.ts);n=Joe(this.ts,r),l=Number.isNaN(n.year)?new uZ("invalid input"):null,n=l?null:n,a=l?null:r}this._zone=I,this.loc=e.loc||Jr.create(),this.invalid=l,this.weekData=null,this.c=n,this.o=a,this.isLuxonDateTime=!0}static now(){return new t({})}static local(){let[e,I]=NYt(arguments),[l,n,a,c,r,s,i]=I;return hYt({year:l,month:n,day:a,hour:c,minute:r,second:s,millisecond:i},e)}static utc(){let[e,I]=NYt(arguments),[l,n,a,c,r,s,i]=I;return e.zone=Tp.utcInstance,hYt({year:l,month:n,day:a,hour:c,minute:r,second:s,millisecond:i},e)}static fromJSDate(e,I={}){let l=iTI(e)?e.valueOf():NaN;if(Number.isNaN(l))return t.invalid("invalid input");let n=WQ(I.zone,Er.defaultZone);return n.isValid?new t({ts:l,zone:n,loc:Jr.fromObject(I)}):t.invalid(Eoe(n))}static fromMillis(e,I={}){if(MC(e))return e<-bYt||e>bYt?t.invalid("Timestamp out of range"):new t({ts:e,zone:WQ(I.zone,Er.defaultZone),loc:Jr.fromObject(I)});throw new _b(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,I={}){if(MC(e))return new t({ts:e*1e3,zone:WQ(I.zone,Er.defaultZone),loc:Jr.fromObject(I)});throw new _b("fromSeconds requires a numerical input")}static fromObject(e,I={}){e=e||{};let l=WQ(I.zone,Er.defaultZone);if(!l.isValid)return t.invalid(Eoe(l));let n=Er.now(),a=Tl(I.specificOffset)?l.offset(n):I.specificOffset,c=Boe(e,pYt),r=!Tl(c.ordinal),s=!Tl(c.year),i=!Tl(c.month)||!Tl(c.day),G=s||i,d=c.weekYear||c.weekNumber,u=Jr.fromObject(I);if((G||r)&&d)throw new zC("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(i&&r)throw new zC("Can't mix ordinal dates with month/day");let b=d||c.weekday&&!G,Z,p,W=Joe(n,a);b?(Z=J_I,p=f_I,W=TCe(W)):r?(Z=C_I,p=E_I,W=wCe(W)):(Z=RRt,p=YRt);let h=!1;for(let w of Z){let H=c[w];Tl(H)?h?c[w]=p[w]:c[w]=W[w]:h=!0}let N=b?H_I(c):r?Q_I(c):WRt(c),V=N||NRt(c);if(V)return t.invalid(V);let R=b?dYt(c):r?uYt(c):c,[F,v]=koe(R,a,l),y=new t({ts:F,zone:l,o:v,loc:u});return c.weekday&&G&&e.weekday!==y.weekday?t.invalid("mismatched weekday",`you can't specify both a weekday of ${c.weekday} and a date of ${y.toISO()}`):y}static fromISO(e,I={}){let[l,n]=$TI(e);return bD(l,n,I,"ISO 8601",e)}static fromRFC2822(e,I={}){let[l,n]=e_I(e);return bD(l,n,I,"RFC 2822",e)}static fromHTTP(e,I={}){let[l,n]=t_I(e);return bD(l,n,I,"HTTP",I)}static fromFormat(e,I,l={}){if(Tl(e)||Tl(I))throw new _b("fromFormat requires an input string and a format");let{locale:n=null,numberingSystem:a=null}=l,c=Jr.fromOpts({locale:n,numberingSystem:a,defaultToEN:!0}),[r,s,i,G]=w_I(c,e,I);return G?t.invalid(G):bD(r,s,l,`format ${I}`,e,i)}static fromString(e,I,l={}){return t.fromFormat(e,I,l)}static fromSQL(e,I={}){let[l,n]=s_I(e);return bD(l,n,I,"SQL",e)}static invalid(e,I=null){if(!e)throw new _b("need to specify a reason the DateTime is invalid");let l=e instanceof uZ?e:new uZ(e,I);if(Er.throwOnInvalid)throw new JCe(l);return new t({invalid:l})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,I={}){let l=uRt(e,Jr.fromObject(I));return l?l.map(n=>n?n.val:null).join(""):null}static expandFormat(e,I={}){return GRt(dZ.parseFormat(e),Jr.fromObject(I)).map(n=>n.val).join("")}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?QCe(this).weekYear:NaN}get weekNumber(){return this.isValid?QCe(this).weekNumber:NaN}get weekday(){return this.isValid?QCe(this).weekday:NaN}get ordinal(){return this.isValid?wCe(this.c).ordinal:NaN}get monthShort(){return this.isValid?Wj.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Wj.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Wj.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Wj.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];let e=864e5,I=6e4,l=Doe(this.c),n=this.zone.offset(l-e),a=this.zone.offset(l+e),c=this.zone.offset(l-n*I),r=this.zone.offset(l-a*I);if(c===r)return[this];let s=l-c*I,i=l-r*I,G=Joe(s,c),d=Joe(i,r);return G.hour===d.hour&&G.minute===d.minute&&G.second===d.second&&G.millisecond===d.millisecond?[OC(this,{ts:s}),OC(this,{ts:i})]:[this]}get isInLeapYear(){return YD(this.year)}get daysInMonth(){return Ooe(this.year,this.month)}get daysInYear(){return this.isValid?hD(this.year):NaN}get weeksInWeekYear(){return this.isValid?zoe(this.weekYear):NaN}resolvedLocaleOptions(e={}){let{locale:I,numberingSystem:l,calendar:n}=dZ.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:I,numberingSystem:l,outputCalendar:n}}toUTC(e=0,I={}){return this.setZone(Tp.instance(e),I)}toLocal(){return this.setZone(Er.defaultZone)}setZone(e,{keepLocalTime:I=!1,keepCalendarTime:l=!1}={}){if(e=WQ(e,Er.defaultZone),e.equals(this.zone))return this;if(e.isValid){let n=this.ts;if(I||l){let a=e.offset(this.ts),c=this.toObject();[n]=koe(c,a,e)}return OC(this,{ts:n,zone:e})}else return t.invalid(Eoe(e))}reconfigure({locale:e,numberingSystem:I,outputCalendar:l}={}){let n=this.loc.clone({locale:e,numberingSystem:I,outputCalendar:l});return OC(this,{loc:n})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;let I=Boe(e,pYt),l=!Tl(I.weekYear)||!Tl(I.weekNumber)||!Tl(I.weekday),n=!Tl(I.ordinal),a=!Tl(I.year),c=!Tl(I.month)||!Tl(I.day),r=a||c,s=I.weekYear||I.weekNumber;if((r||n)&&s)throw new zC("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(c&&n)throw new zC("Can't mix ordinal dates with month/day");let i;l?i=dYt({...TCe(this.c),...I}):Tl(I.ordinal)?(i={...this.toObject(),...I},Tl(I.day)&&(i.day=Math.min(Ooe(i.year,i.month),i.day))):i=uYt({...wCe(this.c),...I});let[G,d]=koe(i,this.o,this.zone);return OC(this,{ts:G,o:d})}plus(e){if(!this.isValid)return this;let I=bI.fromDurationLike(e);return OC(this,mYt(this,I))}minus(e){if(!this.isValid)return this;let I=bI.fromDurationLike(e).negate();return OC(this,mYt(this,I))}startOf(e){if(!this.isValid)return this;let I={},l=bI.normalizeUnit(e);switch(l){case"years":I.month=1;case"quarters":case"months":I.day=1;case"weeks":case"days":I.hour=0;case"hours":I.minute=0;case"minutes":I.second=0;case"seconds":I.millisecond=0;break}if(l==="weeks"&&(I.weekday=1),l==="quarters"){let n=Math.ceil(this.month/3);I.month=(n-1)*3+1}return this.set(I)}endOf(e){return this.isValid?this.plus({[e]:1}).startOf(e).minus(1):this}toFormat(e,I={}){return this.isValid?dZ.create(this.loc.redefaultToEN(I)).formatDateTimeFromString(this,e):HCe}toLocaleString(e=joe,I={}){return this.isValid?dZ.create(this.loc.clone(I),e).formatDateTime(this):HCe}toLocaleParts(e={}){return this.isValid?dZ.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:I=!1,suppressMilliseconds:l=!1,includeOffset:n=!0,extendedZone:a=!1}={}){if(!this.isValid)return null;let c=e==="extended",r=fCe(this,c);return r+="T",r+=ZYt(this,c,I,l,n,a),r}toISODate({format:e="extended"}={}){return this.isValid?fCe(this,e==="extended"):null}toISOWeekDate(){return Coe(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:I=!1,includeOffset:l=!0,includePrefix:n=!1,extendedZone:a=!1,format:c="extended"}={}){return this.isValid?(n?"T":"")+ZYt(this,c==="extended",I,e,l,a):null}toRFC2822(){return Coe(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Coe(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?fCe(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:I=!1,includeOffsetSpace:l=!0}={}){let n="HH:mm:ss.SSS";return(I||e)&&(l&&(n+=" "),I?n+="z":e&&(n+="ZZ")),Coe(this,n,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():HCe}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};let I={...this.c};return e.includeConfig&&(I.outputCalendar=this.outputCalendar,I.numberingSystem=this.loc.numberingSystem,I.locale=this.loc.locale),I}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,I="milliseconds",l={}){if(!this.isValid||!e.isValid)return bI.invalid("created by diffing an invalid DateTime");let n={locale:this.locale,numberingSystem:this.numberingSystem,...l},a=GTI(I).map(bI.normalizeUnit),c=e.valueOf()>this.valueOf(),r=c?this:e,s=c?e:this,i=m_I(r,s,a,n);return c?i.negate():i}diffNow(e="milliseconds",I={}){return this.diff(t.now(),e,I)}until(e){return this.isValid?Vj.fromDateTimes(this,e):this}hasSame(e,I){if(!this.isValid)return!1;let l=e.valueOf(),n=this.setZone(e.zone,{keepLocalTime:!0});return n.startOf(I)<=l&&l<=n.endOf(I)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;let I=e.base||t.fromObject({},{zone:this.zone}),l=e.padding?thisI.valueOf(),Math.min)}static max(...e){if(!e.every(t.isDateTime))throw new _b("max requires all arguments be DateTimes");return lYt(e,I=>I.valueOf(),Math.max)}static fromFormatExplain(e,I,l={}){let{locale:n=null,numberingSystem:a=null}=l,c=Jr.fromOpts({locale:n,numberingSystem:a,defaultToEN:!0});return dRt(c,e,I)}static fromStringExplain(e,I,l={}){return t.fromFormatExplain(e,I,l)}static get DATE_SHORT(){return joe}static get DATE_MED(){return XYt}static get DATE_MED_WITH_WEEKDAY(){return _SI}static get DATE_FULL(){return gYt}static get DATE_HUGE(){return vYt}static get TIME_SIMPLE(){return yYt}static get TIME_WITH_SECONDS(){return wYt}static get TIME_WITH_SHORT_OFFSET(){return HYt}static get TIME_WITH_LONG_OFFSET(){return QYt}static get TIME_24_SIMPLE(){return fYt}static get TIME_24_WITH_SECONDS(){return EYt}static get TIME_24_WITH_SHORT_OFFSET(){return JYt}static get TIME_24_WITH_LONG_OFFSET(){return CYt}static get DATETIME_SHORT(){return LYt}static get DATETIME_SHORT_WITH_SECONDS(){return kYt}static get DATETIME_MED(){return xYt}static get DATETIME_MED_WITH_SECONDS(){return jYt}static get DATETIME_MED_WITH_WEEKDAY(){return KSI}static get DATETIME_FULL(){return UYt}static get DATETIME_FULL_WITH_SECONDS(){return OYt}static get DATETIME_HUGE(){return zYt}static get DATETIME_HUGE_WITH_SECONDS(){return BYt}};function mD(t){if(Rl.isDateTime(t))return t;if(t&&t.valueOf&&MC(t.valueOf()))return Rl.fromJSDate(t);if(t&&typeof t=="object")return Rl.fromObject(t);throw new _b(`Unknown datetime argument: ${t}, of type ${typeof t}`)}var r5e={renderNullAs:"\\-",taskCompletionTracking:!1,taskCompletionUseEmojiShorthand:!1,taskCompletionText:"completion",taskCompletionDateFormat:"yyyy-MM-dd",recursiveSubTaskCompletion:!1,warnOnEmptyResult:!0,refreshEnabled:!0,refreshInterval:2500,defaultDateFormat:"MMMM dd, yyyy",defaultDateTimeFormat:"h:mm a - MMMM dd, yyyy",maxRecursiveRenderDepth:4,tableIdColumnName:"File",tableGroupColumnName:"Group",showResultCount:!0},L_I={allowHtml:!0};({...r5e,...L_I});var _Ce=class t{value;successful;constructor(e){this.value=e,this.successful=!0}map(e){return new t(e(this.value))}flatMap(e){return e(this.value)}mapErr(e){return this}bimap(e,I){return this.map(e)}orElse(e){return this.value}cast(){return this}orElseThrow(e){return this.value}},KCe=class t{error;successful;constructor(e){this.error=e,this.successful=!1}map(e){return this}flatMap(e){return this}mapErr(e){return new t(e(this.error))}bimap(e,I){return this.mapErr(I)}orElse(e){return e}cast(){return this}orElseThrow(e){throw e?new Error(e(this.error)):new Error(""+this.error)}},Moe;(function(t){function e(a){return new _Ce(a)}t.success=e;function I(a){return new KCe(a)}t.failure=I;function l(a,c,r){return a.successful?c.successful?r(a.value,c.value):I(c.error):I(a.error)}t.flatMap2=l;function n(a,c,r){return l(a,c,(s,i)=>e(r(s,i)))}t.map2=n})(Moe||(Moe={}));var k_I=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Soe={exports:{}};Soe.exports;(function(t,e){(function(I,l){t.exports=l()})(typeof self<"u"?self:k_I,function(){return function(I){var l={};function n(a){if(l[a])return l[a].exports;var c=l[a]={i:a,l:!1,exports:{}};return I[a].call(c.exports,c,c.exports,n),c.l=!0,c.exports}return n.m=I,n.c=l,n.d=function(a,c,r){n.o(a,c)||Object.defineProperty(a,c,{configurable:!1,enumerable:!0,get:r})},n.r=function(a){Object.defineProperty(a,"__esModule",{value:!0})},n.n=function(a){var c=a&&a.__esModule?function(){return a.default}:function(){return a};return n.d(c,"a",c),c},n.o=function(a,c){return Object.prototype.hasOwnProperty.call(a,c)},n.p="",n(n.s=0)}([function(I,l,n){function a(P){if(!(this instanceof a))return new a(P);this._=P}var c=a.prototype;function r(P,ne){for(var he=0;he>7),buf:function(Ce){var pe=s(function(nt,AI,Wl,an){return nt.concat(Wl===an.length-1?m.Buffer.from([AI,0]).readUInt16BE(0):an.readUInt16BE(Wl))},[],Ce);return m.Buffer.from(i(function(nt){return(nt<<1&65535)>>8},pe))}(he.buf)}}),he}function d(){return typeof m.Buffer<"u"}function u(){if(!d())throw new Error("Buffer global does not exist; please use webpack if you need to parse Buffers in the browser.")}function b(P){u();var ne=s(function(pe,nt){return pe+nt},0,P);if(ne%8!=0)throw new Error("The bits ["+P.join(", ")+"] add up to "+ne+" which is not an even number of bytes; the total should be divisible by 8");var he,Je=ne/8,Ce=(he=function(pe){return pe>48},s(function(pe,nt){return pe||(he(nt)?nt:pe)},null,P));if(Ce)throw new Error(Ce+" bit range requested exceeds 48 bit (6 byte) Number max.");return new a(function(pe,nt){var AI=Je+nt;return AI>pe.length?w(nt,Je.toString()+" bytes"):y(AI,s(function(Wl,an){var sI=G(an,Wl.buf);return{coll:Wl.coll.concat(sI.v),buf:sI.buf}},{coll:[],buf:pe.slice(nt,AI)},P).coll)})}function Z(P,ne){return new a(function(he,Je){return u(),Je+ne>he.length?w(Je,ne+" bytes for "+P):y(Je+ne,he.slice(Je,Je+ne))})}function p(P,ne){if(typeof(he=ne)!="number"||Math.floor(he)!==he||ne<0||ne>6)throw new Error(P+" requires integer length in range [0, 6].");var he}function W(P){return p("uintBE",P),Z("uintBE("+P+")",P).map(function(ne){return ne.readUIntBE(0,P)})}function h(P){return p("uintLE",P),Z("uintLE("+P+")",P).map(function(ne){return ne.readUIntLE(0,P)})}function N(P){return p("intBE",P),Z("intBE("+P+")",P).map(function(ne){return ne.readIntBE(0,P)})}function V(P){return p("intLE",P),Z("intLE("+P+")",P).map(function(ne){return ne.readIntLE(0,P)})}function R(P){return P instanceof a}function F(P){return{}.toString.call(P)==="[object Array]"}function v(P){return d()&&m.Buffer.isBuffer(P)}function y(P,ne){return{status:!0,index:P,value:ne,furthest:-1,expected:[]}}function w(P,ne){return F(ne)||(ne=[ne]),{status:!1,index:-1,value:null,furthest:P,expected:ne}}function H(P,ne){if(!ne||P.furthest>ne.furthest)return P;var he=P.furthest===ne.furthest?function(Je,Ce){if(function(){if(a._supportsSet!==void 0)return a._supportsSet;var ii=typeof Set<"u";return a._supportsSet=ii,ii}()&&Array.from){for(var pe=new Set(Je),nt=0;nt=0;){if(nt in he){Je=he[nt].line,pe===0&&(pe=he[nt].lineStart);break}(P.charAt(nt)===` +`||P.charAt(nt)==="\r"&&P.charAt(nt+1)!==` +`)&&(Ce++,pe===0&&(pe=nt+1)),nt--}var AI=Je+Ce,Wl=ne-pe;return he[ne]={line:AI,lineStart:pe},{offset:ne,line:AI+1,column:Wl+1}}function k(P){if(!R(P))throw new Error("not a parser: "+P)}function U(P,ne){return typeof P=="string"?P.charAt(ne):P[ne]}function T(P){if(typeof P!="number")throw new Error("not a number: "+P)}function q(P){if(typeof P!="function")throw new Error("not a function: "+P)}function _(P){if(typeof P!="string")throw new Error("not a string: "+P)}var $=2,ee=3,se=8,Ae=5*se,Ve=4*se,ct=" ";function Xe(P,ne){return new Array(ne+1).join(P)}function _t(P,ne,he){var Je=ne-P.length;return Je<=0?P:Xe(he,Je)+P}function Pt(P,ne,he,Je){return{from:P-ne>0?P-ne:0,to:P+he>Je?Je:P+he}}function S(P,ne){var he,Je,Ce,pe,nt,AI=ne.index,Wl=AI.offset,an=1;if(Wl===P.length)return"Got the end of the input";if(v(P)){var sI=Wl-Wl%se,Lu=Wl-sI,_I=Pt(sI,Ae,Ve+se,P.length),ii=i(function(De){return i(function(ut){return _t(ut.toString(16),2,"0")},De)},function(De,ut){var Et=De.length,Jt=[],dI=0;if(Et<=ut)return[De.slice()];for(var un=0;un=4&&(he+=1),an=2,Ce=i(function(De){return De.length<=4?De.join(" "):De.slice(0,4).join(" ")+" "+De.slice(4).join(" ")},ii),(nt=(8*(pe.to>0?pe.to-1:pe.to)).toString(16).length)<2&&(nt=2)}else{var oe=P.split(/\r\n|[\n\r\u2028\u2029]/);he=AI.column-1,Je=AI.line-1,pe=Pt(Je,$,ee,oe.length),Ce=oe.slice(pe.from,pe.to),nt=pe.to.toString().length}var ye=Je-pe.from;return v(P)&&(nt=(8*(pe.to>0?pe.to-1:pe.to)).toString(16).length)<2&&(nt=2),s(function(De,ut,Et){var Jt,dI=Et===ye,un=dI?"> ":ct;return Jt=v(P)?_t((8*(pe.from+Et)).toString(16),nt,"0"):_t((pe.from+Et+1).toString(),nt," "),[].concat(De,[un+Jt+" | "+ut],dI?[ct+Xe(" ",nt)+" | "+_t("",he," ")+Xe("^",an)]:[])},[],Ce).join(` +`)}function j(P,ne){return[` +`,"-- PARSING FAILED "+Xe("-",50),` + +`,S(P,ne),` + +`,(he=ne.expected,he.length===1?`Expected: + +`+he[0]:`Expected one of the following: + +`+he.join(", ")),` +`].join("");var he}function Ne(P){return P.flags!==void 0?P.flags:[P.global?"g":"",P.ignoreCase?"i":"",P.multiline?"m":"",P.unicode?"u":"",P.sticky?"y":""].join("")}function ce(){for(var P=[].slice.call(arguments),ne=P.length,he=0;he=2?T(ne):ne=0;var he=function(Ce){return RegExp("^(?:"+Ce.source+")",Ne(Ce))}(P),Je=""+P;return a(function(Ce,pe){var nt=he.exec(Ce.slice(pe));if(nt){if(0<=ne&&ne<=nt.length){var AI=nt[0],Wl=nt[ne];return y(pe+AI.length,Wl)}return w(pe,"valid match group (0 to "+nt.length+") in "+Je)}return w(pe,Je)})}function Ft(P){return a(function(ne,he){return y(he,P)})}function vI(P){return a(function(ne,he){return w(he,P)})}function hl(P){if(R(P))return a(function(ne,he){var Je=P._(ne,he);return Je.index=he,Je.value="",Je});if(typeof P=="string")return hl(Ie(P));if(P instanceof RegExp)return hl(rt(P));throw new Error("not a string, regexp, or parser: "+P)}function EI(P){return k(P),a(function(ne,he){var Je=P._(ne,he),Ce=ne.slice(he,Je.index);return Je.status?w(he,'not "'+Ce+'"'):y(he,null)})}function Be(P){return q(P),a(function(ne,he){var Je=U(ne,he);return he=P.length?w(ne,"any character/byte"):y(ne+1,U(P,ne))}),ze=a(function(P,ne){return y(P.length,P.slice(ne))}),we=a(function(P,ne){return ne=0}).desc(ne)},a.optWhitespace=js,a.Parser=a,a.range=function(P,ne){return Be(function(he){return P<=he&&he<=ne}).desc(P+"-"+ne)},a.regex=rt,a.regexp=rt,a.sepBy=C,a.sepBy1=re,a.seq=ce,a.seqMap=St,a.seqObj=function(){for(var P,ne={},he=0,Je=(P=arguments,Array.prototype.slice.call(P)),Ce=Je.length,pe=0;pe255)throw new Error("Value specified to byte constructor ("+P+"=0x"+P.toString(16)+") is larger in value than a single byte.");var ne=(P>15?"0x":"0x0")+P.toString(16);return a(function(he,Je){var Ce=U(he,Je);return Ce===P?y(Je+1,Ce):w(Je,ne)})},buffer:function(P){return Z("buffer",P).map(function(ne){return m.Buffer.from(ne)})},encodedString:function(P,ne){return Z("string",ne).map(function(he){return he.toString(P)})},uintBE:W,uint8BE:W(1),uint16BE:W(2),uint32BE:W(4),uintLE:h,uint8LE:h(1),uint16LE:h(2),uint32LE:h(4),intBE:N,int8BE:N(1),int16BE:N(2),int32BE:N(4),intLE:V,int8LE:V(1),int16LE:V(2),int32LE:V(4),floatBE:Z("floatBE",4).map(function(P){return P.readFloatBE(0)}),floatLE:Z("floatLE",4).map(function(P){return P.readFloatLE(0)}),doubleBE:Z("doubleBE",8).map(function(P){return P.readDoubleBE(0)}),doubleLE:Z("doubleLE",8).map(function(P){return P.readDoubleLE(0)})},I.exports=a}])})})(Soe,Soe.exports);var te=Soe.exports,s5e=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC3\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC08\uDC26](?:\u200D\u2B1B)?|[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function ARt(t){return t==null?t:t.shiftToAll().normalize()}function VYt(t){return t.includes("/")&&(t=t.substring(t.lastIndexOf("/")+1)),t.endsWith(".md")&&(t=t.substring(0,t.length-3)),t}te.alt(te.regex(new RegExp(s5e(),"")),te.regex(/[0-9\p{Letter}_-]+/u).map(t=>t.toLocaleLowerCase()),te.whitespace.map(t=>"-"),te.any.map(t=>"")).many().map(t=>t.join(""));var x_I=te.alt(te.regex(new RegExp(s5e(),"")),te.regex(/[0-9\p{Letter}_-]+/u),te.whitespace.map(t=>" "),te.any.map(t=>" ")).many().map(t=>t.join("").split(/\s+/).join(" ").trim());function j_I(t){return x_I.tryParse(t)}function U_I(t){return t=ARt(t),t=bI.fromObject(Object.fromEntries(Object.entries(t.toObject()).filter(([,e])=>e!=0))),t.toHuman()}var ND;(function(t){function e(R,F=r5e,v=!1){let y=I(R);if(!y)return F.renderNullAs;switch(y.type){case"null":return F.renderNullAs;case"string":return y.value;case"number":case"boolean":return""+y.value;case"html":return y.value.outerHTML;case"widget":return y.value.markdown();case"link":return y.value.markdown();case"function":return"";case"array":let w="";return v&&(w+="["),w+=y.value.map(H=>e(H,F,!0)).join(", "),v&&(w+="]"),w;case"object":return"{ "+Object.entries(y.value).map(H=>H[0]+": "+e(H[1],F,!0)).join(", ")+" }";case"date":return y.value.second==0&&y.value.hour==0&&y.value.minute==0?y.value.toFormat(F.defaultDateFormat):y.value.toFormat(F.defaultDateTimeFormat);case"duration":return U_I(y.value)}}t.toString=e;function I(R){return u(R)?{type:"null",value:R}:i(R)?{type:"number",value:R}:s(R)?{type:"string",value:R}:Z(R)?{type:"boolean",value:R}:d(R)?{type:"duration",value:R}:G(R)?{type:"date",value:R}:W(R)?{type:"widget",value:R}:b(R)?{type:"array",value:R}:p(R)?{type:"link",value:R}:V(R)?{type:"function",value:R}:h(R)?{type:"html",value:R}:N(R)?{type:"object",value:R}:void 0}t.wrapValue=I;function l(R,F){if(N(R)){let v={};for(let[y,w]of Object.entries(R))v[y]=l(w,F);return v}else if(b(R)){let v=[];for(let y of R)v.push(l(y,F));return v}else return F(R)}t.mapLeaves=l;function n(R,F,v){if(R===void 0&&(R=null),F===void 0&&(F=null),R===null&&F===null)return 0;if(R===null)return-1;if(F===null)return 1;let y=I(R),w=I(F);if(y===void 0&&w===void 0)return 0;if(y===void 0)return-1;if(w===void 0)return 1;if(y.type!=w.type)return y.type.localeCompare(w.type);if(y.value===w.value)return 0;switch(y.type){case"string":return y.value.localeCompare(w.value);case"number":return y.valueVe),k=L(H.path).localeCompare(L(f.path));if(k!=0)return k;let U=H.type.localeCompare(f.type);return U!=0?U:H.subpath&&!f.subpath?1:!H.subpath&&f.subpath?-1:!H.subpath&&!f.subpath?0:(H.subpath??"").localeCompare(f.subpath??"");case"date":return y.value0;case"boolean":return F.value;case"link":return!!F.value.path;case"date":return F.value.toMillis()!=0;case"duration":return F.value.as("seconds")!=0;case"object":return Object.keys(F.value).length>0;case"array":return F.value.length>0;case"null":return!1;case"html":case"widget":case"function":return!0}}t.isTruthy=c;function r(R){if(R==null)return R;if(t.isArray(R))return[].concat(R.map(F=>r(F)));if(t.isObject(R)){let F={};for(let[v,y]of Object.entries(R))F[v]=r(y);return F}else return R}t.deepCopy=r;function s(R){return typeof R=="string"}t.isString=s;function i(R){return typeof R=="number"}t.isNumber=i;function G(R){return R instanceof Rl}t.isDate=G;function d(R){return R instanceof bI}t.isDuration=d;function u(R){return R==null}t.isNull=u;function b(R){return Array.isArray(R)}t.isArray=b;function Z(R){return typeof R=="boolean"}t.isBoolean=Z;function p(R){return R instanceof Toe}t.isLink=p;function W(R){return R instanceof VD}t.isWidget=W;function h(R){return typeof HTMLElement<"u"?R instanceof HTMLElement:!1}t.isHtml=h;function N(R){return typeof R=="object"&&!h(R)&&!W(R)&&!b(R)&&!d(R)&&!G(R)&&!p(R)&&R!==void 0&&!u(R)}t.isObject=N;function V(R){return typeof R=="function"}t.isFunction=V})(ND||(ND={}));var YYt;(function(t){function e(n){return ND.isObject(n)&&Object.keys(n).length==2&&"key"in n&&"rows"in n}t.isElementGroup=e;function I(n){for(let a of n)if(!e(a))return!1;return!0}t.isGrouping=I;function l(n){if(I(n)){let a=0;for(let c of n)a+=l(c.rows);return a}else return n.length}t.count=l})(YYt||(YYt={}));var Toe=class t{path;display;subpath;embed;type;static file(e,I=!1,l){return new t({path:e,embed:I,display:l,subpath:void 0,type:"file"})}static infer(e,I=!1,l){if(e.includes("#^")){let n=e.split("#^");return t.block(n[0],n[1],I,l)}else if(e.includes("#")){let n=e.split("#");return t.header(n[0],n[1],I,l)}else return t.file(e,I,l)}static header(e,I,l,n){return new t({path:e,embed:l,display:n,subpath:j_I(I),type:"header"})}static block(e,I,l,n){return new t({path:e,embed:l,display:n,subpath:I,type:"block"})}static fromObject(e){return new t(e)}constructor(e){Object.assign(this,e)}equals(e){return e==null||e==null?!1:this.path==e.path&&this.type==e.type&&this.subpath==e.subpath}toString(){return this.markdown()}toObject(){return{path:this.path,type:this.type,subpath:this.subpath,display:this.display,embed:this.embed}}withPath(e){return new t(Object.assign({},this,{path:e}))}withDisplay(e){return new t(Object.assign({},this,{display:e}))}withHeader(e){return t.header(this.path,e,this.embed,this.display)}toFile(){return t.file(this.path,this.embed,this.display)}toEmbed(){if(this.embed)return this;{let e=new t(this);return e.embed=!0,e}}fromEmbed(){if(this.embed){let e=new t(this);return e.embed=!1,e}else return this}markdown(){let e=(this.embed?"!":"")+"[["+this.obsidianLink();return this.display?e+="|"+this.display:(e+="|"+VYt(this.path),(this.type=="header"||this.type=="block")&&(e+=" > "+this.subpath)),e+="]]",e}obsidianLink(){let e=this.path.replaceAll("|","\\|");return this.type=="header"?e+"#"+this.subpath?.replaceAll("|","\\|"):this.type=="block"?e+"#^"+this.subpath?.replaceAll("|","\\|"):e}fileName(){return VYt(this.path).replace(".md","")}},VD=class{$widget;constructor(e){this.$widget=e}},DCe=class extends VD{key;value;constructor(e,I){super("dataview:list-pair"),this.key=e,this.value=I}markdown(){return`${ND.toString(this.key)}: ${ND.toString(this.value)}`}},qCe=class extends VD{url;display;constructor(e,I){super("dataview:external-link"),this.url=e,this.display=I}markdown(){return`[${this.display??this.url}](${this.url})`}},RYt;(function(t){function e(c,r){return new DCe(c,r)}t.listPair=e;function I(c,r){return new qCe(c,r)}t.externalLink=I;function l(c){return c.$widget==="dataview:list-pair"}t.isListPair=l;function n(c){return c.$widget==="dataview:external-link"}t.isExternalLink=n;function a(c){return l(c)||n(c)}t.isBuiltin=a})(RYt||(RYt={}));var fr;(function(t){function e(u){return{type:"variable",name:u}}t.variable=e;function I(u){return{type:"literal",value:u}}t.literal=I;function l(u,b,Z){return{type:"binaryop",left:u,op:b,right:Z}}t.binaryOp=l;function n(u,b){return{type:"index",object:u,index:b}}t.index=n;function a(u){let b=u.split("."),Z=t.variable(b[0]);for(let p=1;p"||u==">="||u=="!="||u=="="}t.isCompareOp=d,t.NULL=t.literal(null)})(fr||(fr={}));var VF;(function(t){function e(G){return{type:"tag",tag:G}}t.tag=e;function I(G){return{type:"csv",path:G}}t.csv=I;function l(G){return{type:"folder",folder:G}}t.folder=l;function n(G,d){return{type:"link",file:G,direction:d?"incoming":"outgoing"}}t.link=n;function a(G,d,u){return{type:"binaryop",left:G,op:d,right:u}}t.binaryOp=a;function c(G,d){return{type:"binaryop",left:G,op:"&",right:d}}t.and=c;function r(G,d){return{type:"binaryop",left:G,op:"|",right:d}}t.or=r;function s(G){return{type:"negate",child:G}}t.negate=s;function i(){return{type:"empty"}}t.empty=i})(VF||(VF={}));var AYt=new RegExp(s5e(),""),PCe={year:bI.fromObject({years:1}),years:bI.fromObject({years:1}),yr:bI.fromObject({years:1}),yrs:bI.fromObject({years:1}),month:bI.fromObject({months:1}),months:bI.fromObject({months:1}),mo:bI.fromObject({months:1}),mos:bI.fromObject({months:1}),week:bI.fromObject({weeks:1}),weeks:bI.fromObject({weeks:1}),wk:bI.fromObject({weeks:1}),wks:bI.fromObject({weeks:1}),w:bI.fromObject({weeks:1}),day:bI.fromObject({days:1}),days:bI.fromObject({days:1}),d:bI.fromObject({days:1}),hour:bI.fromObject({hours:1}),hours:bI.fromObject({hours:1}),hr:bI.fromObject({hours:1}),hrs:bI.fromObject({hours:1}),h:bI.fromObject({hours:1}),minute:bI.fromObject({minutes:1}),minutes:bI.fromObject({minutes:1}),min:bI.fromObject({minutes:1}),mins:bI.fromObject({minutes:1}),m:bI.fromObject({minutes:1}),second:bI.fromObject({seconds:1}),seconds:bI.fromObject({seconds:1}),sec:bI.fromObject({seconds:1}),secs:bI.fromObject({seconds:1}),s:bI.fromObject({seconds:1})},$Ce={now:()=>Rl.local(),today:()=>Rl.local().startOf("day"),yesterday:()=>Rl.local().startOf("day").minus(bI.fromObject({days:1})),tomorrow:()=>Rl.local().startOf("day").plus(bI.fromObject({days:1})),sow:()=>Rl.local().startOf("week"),"start-of-week":()=>Rl.local().startOf("week"),eow:()=>Rl.local().endOf("week"),"end-of-week":()=>Rl.local().endOf("week"),soy:()=>Rl.local().startOf("year"),"start-of-year":()=>Rl.local().startOf("year"),eoy:()=>Rl.local().endOf("year"),"end-of-year":()=>Rl.local().endOf("year"),som:()=>Rl.local().startOf("month"),"start-of-month":()=>Rl.local().startOf("month"),eom:()=>Rl.local().endOf("month"),"end-of-month":()=>Rl.local().endOf("month")},e5e=["FROM","WHERE","LIMIT","GROUP","FLATTEN"];function O_I(t){let e=-1;for(;(e=t.indexOf("|",e+1))>=0;)if(!(e>0&&t[e-1]=="\\"))return[t.substring(0,e).replace(/\\\|/g,"|"),t.substring(e+1)];return[t.replace(/\\\|/g,"|"),void 0]}function z_I(t){let[e,I]=O_I(t);return Toe.infer(e,!1,I)}function ZD(t,e,I){return te.seqMap(t,te.seq(te.optWhitespace,e,te.optWhitespace,t).many(),(l,n)=>{if(n.length==0)return l;let a=I(l,n[0][1],n[0][3]);for(let c=1;c(n,a)=>{let c=t._(n,a);if(!c.status)return c;for(let r of e){let s=r(c.value)._(n,c.index);if(!s.status)return c;c=s}return c})}var p0=te.createLanguage({number:t=>te.regexp(/-?[0-9]+(\.[0-9]+)?/).map(e=>Number.parseFloat(e)).desc("number"),string:t=>te.string('"').then(te.alt(t.escapeCharacter,te.noneOf('"\\')).atLeast(0).map(e=>e.join(""))).skip(te.string('"')).desc("string"),escapeCharacter:t=>te.string("\\").then(te.any).map(e=>e==='"'?'"':e==="\\"?"\\":"\\"+e),bool:t=>te.regexp(/true|false|True|False/).map(e=>e.toLowerCase()=="true").desc("boolean ('true' or 'false')"),tag:t=>te.seqMap(te.string("#"),te.alt(te.regexp(/[^\u2000-\u206F\u2E00-\u2E7F'!"#$%&()*+,.:;<=>?@^`{|}~\[\]\\\s]/).desc("text")).many(),(e,I)=>e+I.join("")).desc("tag ('#hello/stuff')"),identifier:t=>te.seqMap(te.alt(te.regexp(/\p{Letter}/u),te.regexp(AYt).desc("text")),te.alt(te.regexp(/[0-9\p{Letter}_-]/u),te.regexp(AYt).desc("text")).many(),(e,I)=>e+I.join("")).desc("variable identifier"),link:t=>te.regexp(/\[\[([^\[\]]*?)\]\]/u,1).map(e=>z_I(e)).desc("file link"),embedLink:t=>te.seqMap(te.string("!").atMost(1),t.link,(e,I)=>(e.length>0&&(I.embed=!0),I)).desc("file link"),binaryPlusMinus:t=>te.regexp(/\+|-/).map(e=>e).desc("'+' or '-'"),binaryMulDiv:t=>te.regexp(/\*|\/|%/).map(e=>e).desc("'*' or '/' or '%'"),binaryCompareOp:t=>te.regexp(/>=|<=|!=|>|<|=/).map(e=>e).desc("'>=' or '<=' or '!=' or '=' or '>' or '<'"),binaryBooleanOp:t=>te.regexp(/and|or|&|\|/i).map(e=>e.toLowerCase()=="and"?"&":e.toLowerCase()=="or"?"|":e).desc("'and' or 'or'"),rootDate:t=>te.seqMap(te.regexp(/\d{4}/),te.string("-"),te.regexp(/\d{2}/),(e,I,l)=>Rl.fromObject({year:Number.parseInt(e),month:Number.parseInt(l)})).desc("date in format YYYY-MM[-DDTHH-MM-SS.MS]"),dateShorthand:t=>te.alt(...Object.keys($Ce).sort((e,I)=>I.length-e.length).map(te.string)),date:t=>B_I(t.rootDate,e=>te.seqMap(te.string("-"),te.regexp(/\d{2}/),(I,l)=>e.set({day:Number.parseInt(l)})),e=>te.seqMap(te.string("T"),te.regexp(/\d{2}/),(I,l)=>e.set({hour:Number.parseInt(l)})),e=>te.seqMap(te.string(":"),te.regexp(/\d{2}/),(I,l)=>e.set({minute:Number.parseInt(l)})),e=>te.seqMap(te.string(":"),te.regexp(/\d{2}/),(I,l)=>e.set({second:Number.parseInt(l)})),e=>te.alt(te.seqMap(te.string("."),te.regexp(/\d{3}/),(I,l)=>e.set({millisecond:Number.parseInt(l)})),te.succeed(e)),e=>te.alt(te.seqMap(te.string("+").or(te.string("-")),te.regexp(/\d{1,2}(:\d{2})?/),(I,l)=>e.setZone("UTC"+I+l,{keepLocalTime:!0})),te.seqMap(te.string("Z"),()=>e.setZone("utc",{keepLocalTime:!0})),te.seqMap(te.string("["),te.regexp(/[0-9A-Za-z+-\/]+/u),te.string("]"),(I,l,n)=>e.setZone(l,{keepLocalTime:!0})))).assert(e=>e.isValid,"valid date").desc("date in format YYYY-MM[-DDTHH-MM-SS.MS]"),datePlus:t=>te.alt(t.dateShorthand.map(e=>$Ce[e]()),t.date).desc("date in format YYYY-MM[-DDTHH-MM-SS.MS] or in shorthand"),durationType:t=>te.alt(...Object.keys(PCe).sort((e,I)=>I.length-e.length).map(te.string)),duration:t=>te.seqMap(t.number,te.optWhitespace,t.durationType,(e,I,l)=>PCe[l].mapUnits(n=>n*e)).sepBy1(te.string(",").trim(te.optWhitespace).or(te.optWhitespace)).map(e=>e.reduce((I,l)=>I.plus(l))).desc("duration like 4hr2min"),rawNull:t=>te.string("null"),tagSource:t=>t.tag.map(e=>VF.tag(e)),csvSource:t=>te.seqMap(te.string("csv(").skip(te.optWhitespace),t.string,te.string(")"),(e,I,l)=>VF.csv(I)),linkIncomingSource:t=>t.link.map(e=>VF.link(e.path,!0)),linkOutgoingSource:t=>te.seqMap(te.string("outgoing(").skip(te.optWhitespace),t.link,te.string(")"),(e,I,l)=>VF.link(I.path,!1)),folderSource:t=>t.string.map(e=>VF.folder(e)),parensSource:t=>te.seqMap(te.string("("),te.optWhitespace,t.source,te.optWhitespace,te.string(")"),(e,I,l,n,a)=>l),negateSource:t=>te.seqMap(te.alt(te.string("-"),te.string("!")),t.atomSource,(e,I)=>VF.negate(I)),atomSource:t=>te.alt(t.parensSource,t.negateSource,t.linkOutgoingSource,t.linkIncomingSource,t.folderSource,t.tagSource,t.csvSource),binaryOpSource:t=>ZD(t.atomSource,t.binaryBooleanOp.map(e=>e),VF.binaryOp),source:t=>t.binaryOpSource,variableField:t=>t.identifier.chain(e=>e5e.includes(e.toUpperCase())?te.fail("Variable fields cannot be a keyword ("+e5e.join(" or ")+")"):te.succeed(fr.variable(e))).desc("variable"),numberField:t=>t.number.map(e=>fr.literal(e)).desc("number"),stringField:t=>t.string.map(e=>fr.literal(e)).desc("string"),boolField:t=>t.bool.map(e=>fr.literal(e)).desc("boolean"),dateField:t=>te.seqMap(te.string("date("),te.optWhitespace,t.datePlus,te.optWhitespace,te.string(")"),(e,I,l,n,a)=>fr.literal(l)).desc("date"),durationField:t=>te.seqMap(te.string("dur("),te.optWhitespace,t.duration,te.optWhitespace,te.string(")"),(e,I,l,n,a)=>fr.literal(l)).desc("duration"),nullField:t=>t.rawNull.map(e=>fr.NULL),linkField:t=>t.link.map(e=>fr.literal(e)),listField:t=>t.field.sepBy(te.string(",").trim(te.optWhitespace)).wrap(te.string("[").skip(te.optWhitespace),te.optWhitespace.then(te.string("]"))).map(e=>fr.list(e)).desc("list ('[1, 2, 3]')"),objectField:t=>te.seqMap(t.identifier.or(t.string),te.string(":").trim(te.optWhitespace),t.field,(e,I,l)=>({name:e,value:l})).sepBy(te.string(",").trim(te.optWhitespace)).wrap(te.string("{").skip(te.optWhitespace),te.optWhitespace.then(te.string("}"))).map(e=>{let I={};for(let l of e)I[l.name]=l.value;return fr.object(I)}).desc("object ('{ a: 1, b: 2 }')"),atomInlineField:t=>te.alt(t.date,t.duration.map(e=>ARt(e)),t.string,t.tag,t.embedLink,t.bool,t.number,t.rawNull),inlineFieldList:t=>t.atomInlineField.sepBy(te.string(",").trim(te.optWhitespace).lookahead(t.atomInlineField)),inlineField:t=>te.alt(te.seqMap(t.atomInlineField,te.string(",").trim(te.optWhitespace),t.inlineFieldList,(e,I,l)=>[e].concat(l)),t.atomInlineField),atomField:t=>te.alt(t.embedLink.map(e=>fr.literal(e)),t.negatedField,t.linkField,t.listField,t.objectField,t.lambdaField,t.parensField,t.boolField,t.numberField,t.stringField,t.dateField,t.durationField,t.nullField,t.variableField),indexField:t=>te.seqMap(t.atomField,te.alt(t.dotPostfix,t.indexPostfix,t.functionPostfix).many(),(e,I)=>{let l=e;for(let n of I)switch(n.type){case"dot":l=fr.index(l,fr.literal(n.field));break;case"index":l=fr.index(l,n.field);break;case"function":l=fr.func(l,n.fields);break}return l}),negatedField:t=>te.seqMap(te.string("!"),t.indexField,(e,I)=>fr.negate(I)).desc("negated field"),parensField:t=>te.seqMap(te.string("("),te.optWhitespace,t.field,te.optWhitespace,te.string(")"),(e,I,l,n,a)=>l),lambdaField:t=>te.seqMap(t.identifier.sepBy(te.string(",").trim(te.optWhitespace)).wrap(te.string("(").trim(te.optWhitespace),te.string(")").trim(te.optWhitespace)),te.string("=>").trim(te.optWhitespace),t.field,(e,I,l)=>({type:"lambda",arguments:e,value:l})),dotPostfix:t=>te.seqMap(te.string("."),t.identifier,(e,I)=>({type:"dot",field:I})),indexPostfix:t=>te.seqMap(te.string("["),te.optWhitespace,t.field,te.optWhitespace,te.string("]"),(e,I,l,n,a)=>({type:"index",field:l})),functionPostfix:t=>te.seqMap(te.string("("),te.optWhitespace,t.field.sepBy(te.string(",").trim(te.optWhitespace)),te.optWhitespace,te.string(")"),(e,I,l,n,a)=>({type:"function",fields:l})),binaryMulDivField:t=>ZD(t.indexField,t.binaryMulDiv,fr.binaryOp),binaryPlusMinusField:t=>ZD(t.binaryMulDivField,t.binaryPlusMinus,fr.binaryOp),binaryCompareField:t=>ZD(t.binaryPlusMinusField,t.binaryCompareOp,fr.binaryOp),binaryBooleanField:t=>ZD(t.binaryCompareField,t.binaryBooleanOp,fr.binaryOp),binaryOpField:t=>t.binaryBooleanField,field:t=>t.binaryOpField});function M_I(t){try{return Moe.success(p0.field.tryParse(t))}catch(e){return Moe.failure(""+e)}}var _oe;(function(t){function e(l,n){return{name:l,field:n}}t.named=e;function I(l,n){return{field:l,direction:n}}t.sortBy=I})(_oe||(_oe={}));function S_I(t){return te.custom((e,I)=>(l,n)=>{let a=t._(l,n);return a.status?Object.assign({},a,{value:[a.value,l.substring(n,a.index)]}):a})}function T_I(t){return t.split(/[\r\n]+/).map(e=>e.trim()).join("")}function FYt(t,e){return te.eof.map(t).or(te.whitespace.then(e))}var FRt=te.createLanguage({queryType:t=>te.alt(te.regexp(/TABLE|LIST|TASK|CALENDAR/i)).map(e=>e.toLowerCase()).desc("query type ('TABLE', 'LIST', 'TASK', or 'CALENDAR')"),explicitNamedField:t=>te.seqMap(p0.field.skip(te.whitespace),te.regexp(/AS/i).skip(te.whitespace),p0.identifier.or(p0.string),(e,I,l)=>_oe.named(l,e)),comment:()=>te.Parser((t,e)=>{let I=t.substring(e);if(!I.startsWith("//"))return te.makeFailure(e,"Not a comment");I=I.split(` +`)[0];let l=I.substring(2).trim();return te.makeSuccess(e+I.length,l)}),namedField:t=>te.alt(t.explicitNamedField,S_I(p0.field).map(([e,I])=>_oe.named(T_I(I),e))),sortField:t=>te.seqMap(p0.field.skip(te.optWhitespace),te.regexp(/ASCENDING|DESCENDING|ASC|DESC/i).atMost(1),(e,I)=>{let l=I.length==0?"ascending":I[0].toLowerCase();return l=="desc"&&(l="descending"),l=="asc"&&(l="ascending"),{field:e,direction:l}}),headerClause:t=>t.queryType.chain(e=>{switch(e){case"table":return FYt(()=>({type:e,fields:[],showId:!0}),te.seqMap(te.regexp(/WITHOUT\s+ID/i).skip(te.optWhitespace).atMost(1),te.sepBy(t.namedField,te.string(",").trim(te.optWhitespace)),(I,l)=>({type:e,fields:l,showId:I.length==0})));case"list":return FYt(()=>({type:e,format:void 0,showId:!0}),te.seqMap(te.regexp(/WITHOUT\s+ID/i).skip(te.optWhitespace).atMost(1),p0.field.atMost(1),(I,l)=>({type:e,format:l.length==1?l[0]:void 0,showId:I.length==0})));case"task":return te.succeed({type:e});case"calendar":return te.whitespace.then(te.seqMap(t.namedField,I=>({type:e,showId:!0,field:I})));default:return te.fail(`Unrecognized query type '${e}'`)}}).desc("TABLE or LIST or TASK or CALENDAR"),fromClause:t=>te.seqMap(te.regexp(/FROM/i),te.whitespace,p0.source,(e,I,l)=>l),whereClause:t=>te.seqMap(te.regexp(/WHERE/i),te.whitespace,p0.field,(e,I,l)=>({type:"where",clause:l})).desc("WHERE "),sortByClause:t=>te.seqMap(te.regexp(/SORT/i),te.whitespace,t.sortField.sepBy1(te.string(",").trim(te.optWhitespace)),(e,I,l)=>({type:"sort",fields:l})).desc("SORT field [ASC/DESC]"),limitClause:t=>te.seqMap(te.regexp(/LIMIT/i),te.whitespace,p0.field,(e,I,l)=>({type:"limit",amount:l})).desc("LIMIT "),flattenClause:t=>te.seqMap(te.regexp(/FLATTEN/i).skip(te.whitespace),t.namedField,(e,I)=>({type:"flatten",field:I})).desc("FLATTEN [AS ]"),groupByClause:t=>te.seqMap(te.regexp(/GROUP BY/i).skip(te.whitespace),t.namedField,(e,I)=>({type:"group",field:I})).desc("GROUP BY [AS ]"),clause:t=>te.alt(t.fromClause,t.whereClause,t.sortByClause,t.limitClause,t.groupByClause,t.flattenClause),query:t=>te.seqMap(t.headerClause.trim(ECe),t.fromClause.trim(ECe).atMost(1),t.clause.trim(ECe).many(),(e,I,l)=>({header:e,source:I.length==0?VF.folder(""):I[0],operations:l,settings:r5e}))}),ECe=te.alt(te.whitespace,FRt.comment).many().map(t=>t.join("")),__I=t=>t?t.plugins.plugins.dataview?.api:window.DataviewAPI,K_I=t=>t.plugins.enabledPlugins.has("dataview");YF.DATE_SHORTHANDS=$Ce;YF.DURATION_TYPES=PCe;YF.EXPRESSION=p0;YF.KEYWORDS=e5e;YF.QUERY_LANGUAGE=FRt;YF.getAPI=__I;YF.isPluginEnabled=K_I;YF.parseField=M_I});var XRt=Y((i5e,gj)=>{o();(function(t,e){typeof i5e=="object"&&typeof gj<"u"?gj.exports=e():typeof define=="function"&&define.amd?define(e):t.moment=e()})(i5e,function(){"use strict";var t;function e(){return t.apply(null,arguments)}function I(A){t=A}function l(A){return A instanceof Array||Object.prototype.toString.call(A)==="[object Array]"}function n(A){return A!=null&&Object.prototype.toString.call(A)==="[object Object]"}function a(A,X){return Object.prototype.hasOwnProperty.call(A,X)}function c(A){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(A).length===0;var X;for(X in A)if(a(A,X))return!1;return!0}function r(A){return A===void 0}function s(A){return typeof A=="number"||Object.prototype.toString.call(A)==="[object Number]"}function i(A){return A instanceof Date||Object.prototype.toString.call(A)==="[object Date]"}function G(A,X){var Q=[],E,B=A.length;for(E=0;E>>0,E;for(E=0;E0)for(Q=0;Q=0;return(le?Q?"+":"":"-")+Math.pow(10,Math.max(0,B)).toString().substr(1)+E}var se=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Ae=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Ve={},ct={};function Xe(A,X,Q,E){var B=E;typeof E=="string"&&(B=function(){return this[E]()}),A&&(ct[A]=B),X&&(ct[X[0]]=function(){return ee(B.apply(this,arguments),X[1],X[2])}),Q&&(ct[Q]=function(){return this.localeData().ordinal(B.apply(this,arguments),A)})}function _t(A){return A.match(/\[[\s\S]/)?A.replace(/^\[|\]$/g,""):A.replace(/\\/g,"")}function Pt(A){var X=A.match(se),Q,E;for(Q=0,E=X.length;Q=0&&Ae.test(A);)A=A.replace(Ae,E),Ae.lastIndex=0,Q-=1;return A}var Ne={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function ce(A){var X=this._longDateFormat[A],Q=this._longDateFormat[A.toUpperCase()];return X||!Q?X:(this._longDateFormat[A]=Q.match(se).map(function(E){return E==="MMMM"||E==="MM"||E==="DD"||E==="dddd"?E.slice(1):E}).join(""),this._longDateFormat[A])}var St="Invalid date";function O(){return this._invalidDate}var C="%d",re=/\d{1,2}/;function Ie(A){return this._ordinal.replace("%d",A)}var rt={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Ft(A,X,Q,E){var B=this._relativeTime[Q];return L(B)?B(A,X,Q,E):B.replace(/%d/i,A)}function vI(A,X){var Q=this._relativeTime[A>0?"future":"past"];return L(Q)?Q(X):Q.replace(/%s/i,X)}var hl={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function EI(A){return typeof A=="string"?hl[A]||hl[A.toLowerCase()]:void 0}function Be(A){var X={},Q,E;for(E in A)a(A,E)&&(Q=EI(E),Q&&(X[Q]=A[E]));return X}var Pl={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function Xt(A){var X=[],Q;for(Q in A)a(A,Q)&&X.push({unit:Q,priority:Pl[Q]});return X.sort(function(E,B){return E.priority-B.priority}),X}var yt=/\d/,wt=/\d\d/,ze=/\d{3}/,we=/\d{4}/,$t=/[+-]?\d{6}/,ot=/\d\d?/,rI=/\d\d\d\d?/,aX=/\d\d\d\d\d\d?/,js=/\d{1,3}/,Oe=/\d{1,4}/,gA=/[+-]?\d{1,6}/,zl=/\d+/,Cu=/[+-]?\d+/,q4=/Z|[+-]\d\d:?\d\d/gi,mH=/Z|[+-]\d\d(?::?\d\d)?/gi,P=/[+-]?\d+(\.\d{1,3})?/,ne=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,he=/^[1-9]\d?/,Je=/^([1-9]\d|\d)/,Ce;Ce={};function pe(A,X,Q){Ce[A]=L(X)?X:function(E,B){return E&&Q?Q:X}}function nt(A,X){return a(Ce,A)?Ce[A](X._strict,X._locale):new RegExp(AI(A))}function AI(A){return Wl(A.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(X,Q,E,B,le){return Q||E||B||le}))}function Wl(A){return A.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function an(A){return A<0?Math.ceil(A)||0:Math.floor(A)}function sI(A){var X=+A,Q=0;return X!==0&&isFinite(X)&&(Q=an(X)),Q}var Lu={};function _I(A,X){var Q,E=X,B;for(typeof A=="string"&&(A=[A]),s(X)&&(E=function(le,ge){ge[X]=sI(le)}),B=A.length,Q=0;Q68?1900:2e3)};var Mm=Sm("FullYear",!0);function di(){return ye(this.year())}function Sm(A,X){return function(Q){return Q!=null?(lle(this,A,Q),e.updateOffset(this,X),this):vA(this,A)}}function vA(A,X){if(!A.isValid())return NaN;var Q=A._d,E=A._isUTC;switch(X){case"Milliseconds":return E?Q.getUTCMilliseconds():Q.getMilliseconds();case"Seconds":return E?Q.getUTCSeconds():Q.getSeconds();case"Minutes":return E?Q.getUTCMinutes():Q.getMinutes();case"Hours":return E?Q.getUTCHours():Q.getHours();case"Date":return E?Q.getUTCDate():Q.getDate();case"Day":return E?Q.getUTCDay():Q.getDay();case"Month":return E?Q.getUTCMonth():Q.getMonth();case"FullYear":return E?Q.getUTCFullYear():Q.getFullYear();default:return NaN}}function lle(A,X,Q){var E,B,le,ge,Ht;if(!(!A.isValid()||isNaN(Q))){switch(E=A._d,B=A._isUTC,X){case"Milliseconds":return void(B?E.setUTCMilliseconds(Q):E.setMilliseconds(Q));case"Seconds":return void(B?E.setUTCSeconds(Q):E.setSeconds(Q));case"Minutes":return void(B?E.setUTCMinutes(Q):E.setMinutes(Q));case"Hours":return void(B?E.setUTCHours(Q):E.setHours(Q));case"Date":return void(B?E.setUTCDate(Q):E.setDate(Q));case"FullYear":break;default:return}le=Q,ge=A.month(),Ht=A.date(),Ht=Ht===29&&ge===1&&!ye(le)?28:Ht,B?E.setUTCFullYear(le,ge,Ht):E.setFullYear(le,ge,Ht)}}function cXe(A){return A=EI(A),L(this[A])?this[A]():this}function rXe(A,X){if(typeof A=="object"){A=Be(A);var Q=Xt(A),E,B=Q.length;for(E=0;E=0?(Ht=new Date(A+400,X,Q,E,B,le,ge),isFinite(Ht.getFullYear())&&Ht.setFullYear(A)):Ht=new Date(A,X,Q,E,B,le,ge),Ht}function CS(A){var X,Q;return A<100&&A>=0?(Q=Array.prototype.slice.call(arguments),Q[0]=A+400,X=new Date(Date.UTC.apply(null,Q)),isFinite(X.getUTCFullYear())&&X.setUTCFullYear(A)):X=new Date(Date.UTC.apply(null,arguments)),X}function nle(A,X,Q){var E=7+X-Q,B=(7+CS(A,0,E).getUTCDay()-X)%7;return-B+E-1}function LIt(A,X,Q,E,B){var le=(7+Q-E)%7,ge=nle(A,E,B),Ht=1+7*(X-1)+le+ge,kI,Bl;return Ht<=0?(kI=A-1,Bl=Gi(kI)+Ht):Ht>Gi(A)?(kI=A+1,Bl=Ht-Gi(A)):(kI=A,Bl=Ht),{year:kI,dayOfYear:Bl}}function LS(A,X,Q){var E=nle(A.year(),X,Q),B=Math.floor((A.dayOfYear()-E-1)/7)+1,le,ge;return B<1?(ge=A.year()-1,le=B+oX(ge,X,Q)):B>oX(A.year(),X,Q)?(le=B-oX(A.year(),X,Q),ge=A.year()+1):(ge=A.year(),le=B),{week:le,year:ge}}function oX(A,X,Q){var E=nle(A,X,Q),B=nle(A+1,X,Q);return(Gi(A)-E+B)/7}Xe("w",["ww",2],"wo","week"),Xe("W",["WW",2],"Wo","isoWeek"),pe("w",ot,he),pe("ww",ot,wt),pe("W",ot,he),pe("WW",ot,wt),ii(["w","ww","W","WW"],function(A,X,Q,E){X[E.substr(0,1)]=sI(A)});function BHI(A){return LS(A,this._week.dow,this._week.doy).week}var MHI={dow:0,doy:6};function SHI(){return this._week.dow}function THI(){return this._week.doy}function _HI(A){var X=this.localeData().week(this);return A==null?X:this.add((A-X)*7,"d")}function KHI(A){var X=LS(this,1,4).week;return A==null?X:this.add((A-X)*7,"d")}Xe("d",0,"do","day"),Xe("dd",0,0,function(A){return this.localeData().weekdaysMin(this,A)}),Xe("ddd",0,0,function(A){return this.localeData().weekdaysShort(this,A)}),Xe("dddd",0,0,function(A){return this.localeData().weekdays(this,A)}),Xe("e",0,0,"weekday"),Xe("E",0,0,"isoWeekday"),pe("d",ot),pe("e",ot),pe("E",ot),pe("dd",function(A,X){return X.weekdaysMinRegex(A)}),pe("ddd",function(A,X){return X.weekdaysShortRegex(A)}),pe("dddd",function(A,X){return X.weekdaysRegex(A)}),ii(["dd","ddd","dddd"],function(A,X,Q,E){var B=Q._locale.weekdaysParse(A,E,Q._strict);B!=null?X.d=B:Z(Q).invalidWeekday=A}),ii(["d","e","E"],function(A,X,Q,E){X[E]=sI(A)});function DHI(A,X){return typeof A!="string"?A:isNaN(A)?(A=X.weekdaysParse(A),typeof A=="number"?A:null):parseInt(A,10)}function qHI(A,X){return typeof A=="string"?X.weekdaysParse(A)%7||7:isNaN(A)?null:A}function oXe(A,X){return A.slice(X,7).concat(A.slice(0,X))}var PHI="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),kIt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),$HI="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),eQI=ne,tQI=ne,IQI=ne;function lQI(A,X){var Q=l(this._weekdays)?this._weekdays:this._weekdays[A&&A!==!0&&this._weekdays.isFormat.test(X)?"format":"standalone"];return A===!0?oXe(Q,this._week.dow):A?Q[A.day()]:Q}function nQI(A){return A===!0?oXe(this._weekdaysShort,this._week.dow):A?this._weekdaysShort[A.day()]:this._weekdaysShort}function aQI(A){return A===!0?oXe(this._weekdaysMin,this._week.dow):A?this._weekdaysMin[A.day()]:this._weekdaysMin}function cQI(A,X,Q){var E,B,le,ge=A.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],E=0;E<7;++E)le=u([2e3,1]).day(E),this._minWeekdaysParse[E]=this.weekdaysMin(le,"").toLocaleLowerCase(),this._shortWeekdaysParse[E]=this.weekdaysShort(le,"").toLocaleLowerCase(),this._weekdaysParse[E]=this.weekdays(le,"").toLocaleLowerCase();return Q?X==="dddd"?(B=Fl.call(this._weekdaysParse,ge),B!==-1?B:null):X==="ddd"?(B=Fl.call(this._shortWeekdaysParse,ge),B!==-1?B:null):(B=Fl.call(this._minWeekdaysParse,ge),B!==-1?B:null):X==="dddd"?(B=Fl.call(this._weekdaysParse,ge),B!==-1||(B=Fl.call(this._shortWeekdaysParse,ge),B!==-1)?B:(B=Fl.call(this._minWeekdaysParse,ge),B!==-1?B:null)):X==="ddd"?(B=Fl.call(this._shortWeekdaysParse,ge),B!==-1||(B=Fl.call(this._weekdaysParse,ge),B!==-1)?B:(B=Fl.call(this._minWeekdaysParse,ge),B!==-1?B:null)):(B=Fl.call(this._minWeekdaysParse,ge),B!==-1||(B=Fl.call(this._weekdaysParse,ge),B!==-1)?B:(B=Fl.call(this._shortWeekdaysParse,ge),B!==-1?B:null))}function rQI(A,X,Q){var E,B,le;if(this._weekdaysParseExact)return cQI.call(this,A,X,Q);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),E=0;E<7;E++){if(B=u([2e3,1]).day(E),Q&&!this._fullWeekdaysParse[E]&&(this._fullWeekdaysParse[E]=new RegExp("^"+this.weekdays(B,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[E]=new RegExp("^"+this.weekdaysShort(B,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[E]=new RegExp("^"+this.weekdaysMin(B,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[E]||(le="^"+this.weekdays(B,"")+"|^"+this.weekdaysShort(B,"")+"|^"+this.weekdaysMin(B,""),this._weekdaysParse[E]=new RegExp(le.replace(".",""),"i")),Q&&X==="dddd"&&this._fullWeekdaysParse[E].test(A))return E;if(Q&&X==="ddd"&&this._shortWeekdaysParse[E].test(A))return E;if(Q&&X==="dd"&&this._minWeekdaysParse[E].test(A))return E;if(!Q&&this._weekdaysParse[E].test(A))return E}}function sQI(A){if(!this.isValid())return A!=null?this:NaN;var X=vA(this,"Day");return A!=null?(A=DHI(A,this.localeData()),this.add(A-X,"d")):X}function oQI(A){if(!this.isValid())return A!=null?this:NaN;var X=(this.day()+7-this.localeData()._week.dow)%7;return A==null?X:this.add(A-X,"d")}function iQI(A){if(!this.isValid())return A!=null?this:NaN;if(A!=null){var X=qHI(A,this.localeData());return this.day(this.day()%7?X:X-7)}else return this.day()||7}function GQI(A){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||iXe.call(this),A?this._weekdaysStrictRegex:this._weekdaysRegex):(a(this,"_weekdaysRegex")||(this._weekdaysRegex=eQI),this._weekdaysStrictRegex&&A?this._weekdaysStrictRegex:this._weekdaysRegex)}function dQI(A){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||iXe.call(this),A?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(a(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=tQI),this._weekdaysShortStrictRegex&&A?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function uQI(A){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||iXe.call(this),A?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(a(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=IQI),this._weekdaysMinStrictRegex&&A?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function iXe(){function A(ku,bX){return bX.length-ku.length}var X=[],Q=[],E=[],B=[],le,ge,Ht,kI,Bl;for(le=0;le<7;le++)ge=u([2e3,1]).day(le),Ht=Wl(this.weekdaysMin(ge,"")),kI=Wl(this.weekdaysShort(ge,"")),Bl=Wl(this.weekdays(ge,"")),X.push(Ht),Q.push(kI),E.push(Bl),B.push(Ht),B.push(kI),B.push(Bl);X.sort(A),Q.sort(A),E.sort(A),B.sort(A),this._weekdaysRegex=new RegExp("^("+B.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+E.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+Q.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+X.join("|")+")","i")}function GXe(){return this.hours()%12||12}function bQI(){return this.hours()||24}Xe("H",["HH",2],0,"hour"),Xe("h",["hh",2],0,GXe),Xe("k",["kk",2],0,bQI),Xe("hmm",0,0,function(){return""+GXe.apply(this)+ee(this.minutes(),2)}),Xe("hmmss",0,0,function(){return""+GXe.apply(this)+ee(this.minutes(),2)+ee(this.seconds(),2)}),Xe("Hmm",0,0,function(){return""+this.hours()+ee(this.minutes(),2)}),Xe("Hmmss",0,0,function(){return""+this.hours()+ee(this.minutes(),2)+ee(this.seconds(),2)});function xIt(A,X){Xe(A,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),X)})}xIt("a",!0),xIt("A",!1);function jIt(A,X){return X._meridiemParse}pe("a",jIt),pe("A",jIt),pe("H",ot,Je),pe("h",ot,he),pe("k",ot,he),pe("HH",ot,wt),pe("hh",ot,wt),pe("kk",ot,wt),pe("hmm",rI),pe("hmmss",aX),pe("Hmm",rI),pe("Hmmss",aX),_I(["H","HH"],Jt),_I(["k","kk"],function(A,X,Q){var E=sI(A);X[Jt]=E===24?0:E}),_I(["a","A"],function(A,X,Q){Q._isPm=Q._locale.isPM(A),Q._meridiem=A}),_I(["h","hh"],function(A,X,Q){X[Jt]=sI(A),Z(Q).bigHour=!0}),_I("hmm",function(A,X,Q){var E=A.length-2;X[Jt]=sI(A.substr(0,E)),X[dI]=sI(A.substr(E)),Z(Q).bigHour=!0}),_I("hmmss",function(A,X,Q){var E=A.length-4,B=A.length-2;X[Jt]=sI(A.substr(0,E)),X[dI]=sI(A.substr(E,2)),X[un]=sI(A.substr(B)),Z(Q).bigHour=!0}),_I("Hmm",function(A,X,Q){var E=A.length-2;X[Jt]=sI(A.substr(0,E)),X[dI]=sI(A.substr(E))}),_I("Hmmss",function(A,X,Q){var E=A.length-4,B=A.length-2;X[Jt]=sI(A.substr(0,E)),X[dI]=sI(A.substr(E,2)),X[un]=sI(A.substr(B))});function mQI(A){return(A+"").toLowerCase().charAt(0)==="p"}var ZQI=/[ap]\.?m?\.?/i,pQI=Sm("Hours",!0);function hQI(A,X,Q){return A>11?Q?"pm":"PM":Q?"am":"AM"}var UIt={calendar:_,longDateFormat:Ne,invalidDate:St,ordinal:C,dayOfMonthOrdinalParse:re,relativeTime:rt,months:Us,monthsShort:fb,week:MHI,weekdays:PHI,weekdaysMin:$HI,weekdaysShort:kIt,meridiemParse:ZQI},hc={},kS={},xS;function WQI(A,X){var Q,E=Math.min(A.length,X.length);for(Q=0;Q0;){if(B=ale(le.slice(0,Q).join("-")),B)return B;if(E&&E.length>=Q&&WQI(le,E)>=Q-1)break;Q--}X++}return xS}function VQI(A){return!!(A&&A.match("^[^/\\\\]*$"))}function ale(A){var X=null,Q;if(hc[A]===void 0&&typeof gj<"u"&&gj&&gj.exports&&VQI(A))try{X=xS._abbr,Q=require,Q("./locale/"+A),pH(X)}catch{hc[A]=null}return hc[A]}function pH(A,X){var Q;return A&&(r(X)?Q=iX(A):Q=dXe(A,X),Q?xS=Q:typeof console<"u"&&console.warn&&console.warn("Locale "+A+" not found. Did you forget to load it?")),xS._abbr}function dXe(A,X){if(X!==null){var Q,E=UIt;if(X.abbr=A,hc[A]!=null)f("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),E=hc[A]._config;else if(X.parentLocale!=null)if(hc[X.parentLocale]!=null)E=hc[X.parentLocale]._config;else if(Q=ale(X.parentLocale),Q!=null)E=Q._config;else return kS[X.parentLocale]||(kS[X.parentLocale]=[]),kS[X.parentLocale].push({name:A,config:X}),null;return hc[A]=new T(U(E,X)),kS[A]&&kS[A].forEach(function(B){dXe(B.name,B.config)}),pH(A),hc[A]}else return delete hc[A],null}function YQI(A,X){if(X!=null){var Q,E,B=UIt;hc[A]!=null&&hc[A].parentLocale!=null?hc[A].set(U(hc[A]._config,X)):(E=ale(A),E!=null&&(B=E._config),X=U(B,X),E==null&&(X.abbr=A),Q=new T(X),Q.parentLocale=hc[A],hc[A]=Q),pH(A)}else hc[A]!=null&&(hc[A].parentLocale!=null?(hc[A]=hc[A].parentLocale,A===pH()&&pH(A)):hc[A]!=null&&delete hc[A]);return hc[A]}function iX(A){var X;if(A&&A._locale&&A._locale._abbr&&(A=A._locale._abbr),!A)return xS;if(!l(A)){if(X=ale(A),X)return X;A=[A]}return NQI(A)}function RQI(){return q(hc)}function uXe(A){var X,Q=A._a;return Q&&Z(A).overflow===-2&&(X=Q[ut]<0||Q[ut]>11?ut:Q[Et]<1||Q[Et]>LI(Q[De],Q[ut])?Et:Q[Jt]<0||Q[Jt]>24||Q[Jt]===24&&(Q[dI]!==0||Q[un]!==0||Q[aa]!==0)?Jt:Q[dI]<0||Q[dI]>59?dI:Q[un]<0||Q[un]>59?un:Q[aa]<0||Q[aa]>999?aa:-1,Z(A)._overflowDayOfYear&&(XEt)&&(X=Et),Z(A)._overflowWeeks&&X===-1&&(X=cX),Z(A)._overflowWeekday&&X===-1&&(X=ZH),Z(A).overflow=X),A}var AQI=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,FQI=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,XQI=/Z|[+-]\d\d(?::?\d\d)?/,cle=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],bXe=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],gQI=/^\/?Date\((-?\d+)/i,vQI=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,yQI={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function zIt(A){var X,Q,E=A._i,B=AQI.exec(E)||FQI.exec(E),le,ge,Ht,kI,Bl=cle.length,ku=bXe.length;if(B){for(Z(A).iso=!0,X=0,Q=Bl;XGi(ge)||A._dayOfYear===0)&&(Z(A)._overflowDayOfYear=!0),Q=CS(ge,0,A._dayOfYear),A._a[ut]=Q.getUTCMonth(),A._a[Et]=Q.getUTCDate()),X=0;X<3&&A._a[X]==null;++X)A._a[X]=E[X]=B[X];for(;X<7;X++)A._a[X]=E[X]=A._a[X]==null?X===2?1:0:A._a[X];A._a[Jt]===24&&A._a[dI]===0&&A._a[un]===0&&A._a[aa]===0&&(A._nextDay=!0,A._a[Jt]=0),A._d=(A._useUTC?CS:zHI).apply(null,E),le=A._useUTC?A._d.getUTCDay():A._d.getDay(),A._tzm!=null&&A._d.setUTCMinutes(A._d.getUTCMinutes()-A._tzm),A._nextDay&&(A._a[Jt]=24),A._w&&typeof A._w.d<"u"&&A._w.d!==le&&(Z(A).weekdayMismatch=!0)}}function LQI(A){var X,Q,E,B,le,ge,Ht,kI,Bl;X=A._w,X.GG!=null||X.W!=null||X.E!=null?(le=1,ge=4,Q=$4(X.GG,A._a[De],LS(lc(),1,4).year),E=$4(X.W,1),B=$4(X.E,1),(B<1||B>7)&&(kI=!0)):(le=A._locale._week.dow,ge=A._locale._week.doy,Bl=LS(lc(),le,ge),Q=$4(X.gg,A._a[De],Bl.year),E=$4(X.w,Bl.week),X.d!=null?(B=X.d,(B<0||B>6)&&(kI=!0)):X.e!=null?(B=X.e+le,(X.e<0||X.e>6)&&(kI=!0)):B=le),E<1||E>oX(Q,le,ge)?Z(A)._overflowWeeks=!0:kI!=null?Z(A)._overflowWeekday=!0:(Ht=LIt(Q,E,B,le,ge),A._a[De]=Ht.year,A._dayOfYear=Ht.dayOfYear)}e.ISO_8601=function(){},e.RFC_2822=function(){};function ZXe(A){if(A._f===e.ISO_8601){zIt(A);return}if(A._f===e.RFC_2822){BIt(A);return}A._a=[],Z(A).empty=!0;var X=""+A._i,Q,E,B,le,ge,Ht=X.length,kI=0,Bl,ku;for(B=j(A._f,A._locale).match(se)||[],ku=B.length,Q=0;Q0&&Z(A).unusedInput.push(ge),X=X.slice(X.indexOf(E)+E.length),kI+=E.length),ct[le]?(E?Z(A).empty=!1:Z(A).unusedTokens.push(le),oe(le,E,A)):A._strict&&!E&&Z(A).unusedTokens.push(le);Z(A).charsLeftOver=Ht-kI,X.length>0&&Z(A).unusedInput.push(X),A._a[Jt]<=12&&Z(A).bigHour===!0&&A._a[Jt]>0&&(Z(A).bigHour=void 0),Z(A).parsedDateParts=A._a.slice(0),Z(A).meridiem=A._meridiem,A._a[Jt]=kQI(A._locale,A._a[Jt],A._meridiem),Bl=Z(A).era,Bl!==null&&(A._a[De]=A._locale.erasConvertYear(Bl,A._a[De])),mXe(A),uXe(A)}function kQI(A,X,Q){var E;return Q==null?X:A.meridiemHour!=null?A.meridiemHour(X,Q):(A.isPM!=null&&(E=A.isPM(Q),E&&X<12&&(X+=12),!E&&X===12&&(X=0)),X)}function xQI(A){var X,Q,E,B,le,ge,Ht=!1,kI=A._f.length;if(kI===0){Z(A).invalidFormat=!0,A._d=new Date(NaN);return}for(B=0;Bthis?this:A:h()});function TIt(A,X){var Q,E;if(X.length===1&&l(X[0])&&(X=X[0]),!X.length)return lc();for(Q=X[0],E=1;Ethis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function cfI(){if(!r(this._isDSTShifted))return this._isDSTShifted;var A={},X;return R(A,this),A=MIt(A),A._a?(X=A._isUTC?u(A._a):lc(A._a),this._isDSTShifted=this.isValid()&&qQI(A._a,X.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function rfI(){return this.isValid()?!this._isUTC:!1}function sfI(){return this.isValid()?this._isUTC:!1}function KIt(){return this.isValid()?this._isUTC&&this._offset===0:!1}var ofI=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,ifI=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function kR(A,X){var Q=A,E=null,B,le,ge;return sle(A)?Q={ms:A._milliseconds,d:A._days,M:A._months}:s(A)||!isNaN(+A)?(Q={},X?Q[X]=+A:Q.milliseconds=+A):(E=ofI.exec(A))?(B=E[1]==="-"?-1:1,Q={y:0,d:sI(E[Et])*B,h:sI(E[Jt])*B,m:sI(E[dI])*B,s:sI(E[un])*B,ms:sI(pXe(E[aa]*1e3))*B}):(E=ifI.exec(A))?(B=E[1]==="-"?-1:1,Q={y:tJ(E[2],B),M:tJ(E[3],B),w:tJ(E[4],B),d:tJ(E[5],B),h:tJ(E[6],B),m:tJ(E[7],B),s:tJ(E[8],B)}):Q==null?Q={}:typeof Q=="object"&&("from"in Q||"to"in Q)&&(ge=GfI(lc(Q.from),lc(Q.to)),Q={},Q.ms=ge.milliseconds,Q.M=ge.months),le=new rle(Q),sle(A)&&a(A,"_locale")&&(le._locale=A._locale),sle(A)&&a(A,"_isValid")&&(le._isValid=A._isValid),le}kR.fn=rle.prototype,kR.invalid=DQI;function tJ(A,X){var Q=A&&parseFloat(A.replace(",","."));return(isNaN(Q)?0:Q)*X}function DIt(A,X){var Q={};return Q.months=X.month()-A.month()+(X.year()-A.year())*12,A.clone().add(Q.months,"M").isAfter(X)&&--Q.months,Q.milliseconds=+X-+A.clone().add(Q.months,"M"),Q}function GfI(A,X){var Q;return A.isValid()&&X.isValid()?(X=WXe(X,A),A.isBefore(X)?Q=DIt(A,X):(Q=DIt(X,A),Q.milliseconds=-Q.milliseconds,Q.months=-Q.months),Q):{milliseconds:0,months:0}}function qIt(A,X){return function(Q,E){var B,le;return E!==null&&!isNaN(+E)&&(f(X,"moment()."+X+"(period, number) is deprecated. Please use moment()."+X+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),le=Q,Q=E,E=le),B=kR(Q,E),PIt(this,B,A),this}}function PIt(A,X,Q,E){var B=X._milliseconds,le=pXe(X._days),ge=pXe(X._months);A.isValid()&&(E=E??!0,ge&&EIt(A,vA(A,"Month")+ge*Q),le&&lle(A,"Date",vA(A,"Date")+le*Q),B&&A._d.setTime(A._d.valueOf()+B*Q),E&&e.updateOffset(A,le||ge))}var dfI=qIt(1,"add"),ufI=qIt(-1,"subtract");function $It(A){return typeof A=="string"||A instanceof String}function bfI(A){return v(A)||i(A)||$It(A)||s(A)||ZfI(A)||mfI(A)||A===null||A===void 0}function mfI(A){var X=n(A)&&!c(A),Q=!1,E=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],B,le,ge=E.length;for(B=0;BQ.valueOf():Q.valueOf()9999?S(Q,X?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):L(Date.prototype.toISOString)?X?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",S(Q,"Z")):S(Q,X?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function wfI(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var A="moment",X="",Q,E,B,le;return this.isLocal()||(A=this.utcOffset()===0?"moment.utc":"moment.parseZone",X="Z"),Q="["+A+'("]',E=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",B="-MM-DD[T]HH:mm:ss.SSS",le=X+'[")]',this.format(Q+E+B+le)}function HfI(A){A||(A=this.isUtc()?e.defaultFormatUtc:e.defaultFormat);var X=S(this,A);return this.localeData().postformat(X)}function QfI(A,X){return this.isValid()&&(v(A)&&A.isValid()||lc(A).isValid())?kR({to:this,from:A}).locale(this.locale()).humanize(!X):this.localeData().invalidDate()}function ffI(A){return this.from(lc(),A)}function EfI(A,X){return this.isValid()&&(v(A)&&A.isValid()||lc(A).isValid())?kR({from:this,to:A}).locale(this.locale()).humanize(!X):this.localeData().invalidDate()}function JfI(A){return this.to(lc(),A)}function elt(A){var X;return A===void 0?this._locale._abbr:(X=iX(A),X!=null&&(this._locale=X),this)}var tlt=w("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(A){return A===void 0?this.localeData():this.locale(A)});function Ilt(){return this._locale}var ile=1e3,ex=60*ile,Gle=60*ex,llt=(365*400+97)*24*Gle;function tx(A,X){return(A%X+X)%X}function nlt(A,X,Q){return A<100&&A>=0?new Date(A+400,X,Q)-llt:new Date(A,X,Q).valueOf()}function alt(A,X,Q){return A<100&&A>=0?Date.UTC(A+400,X,Q)-llt:Date.UTC(A,X,Q)}function CfI(A){var X,Q;if(A=EI(A),A===void 0||A==="millisecond"||!this.isValid())return this;switch(Q=this._isUTC?alt:nlt,A){case"year":X=Q(this.year(),0,1);break;case"quarter":X=Q(this.year(),this.month()-this.month()%3,1);break;case"month":X=Q(this.year(),this.month(),1);break;case"week":X=Q(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":X=Q(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":X=Q(this.year(),this.month(),this.date());break;case"hour":X=this._d.valueOf(),X-=tx(X+(this._isUTC?0:this.utcOffset()*ex),Gle);break;case"minute":X=this._d.valueOf(),X-=tx(X,ex);break;case"second":X=this._d.valueOf(),X-=tx(X,ile);break}return this._d.setTime(X),e.updateOffset(this,!0),this}function LfI(A){var X,Q;if(A=EI(A),A===void 0||A==="millisecond"||!this.isValid())return this;switch(Q=this._isUTC?alt:nlt,A){case"year":X=Q(this.year()+1,0,1)-1;break;case"quarter":X=Q(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":X=Q(this.year(),this.month()+1,1)-1;break;case"week":X=Q(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":X=Q(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":X=Q(this.year(),this.month(),this.date()+1)-1;break;case"hour":X=this._d.valueOf(),X+=Gle-tx(X+(this._isUTC?0:this.utcOffset()*ex),Gle)-1;break;case"minute":X=this._d.valueOf(),X+=ex-tx(X,ex)-1;break;case"second":X=this._d.valueOf(),X+=ile-tx(X,ile)-1;break}return this._d.setTime(X),e.updateOffset(this,!0),this}function kfI(){return this._d.valueOf()-(this._offset||0)*6e4}function xfI(){return Math.floor(this.valueOf()/1e3)}function jfI(){return new Date(this.valueOf())}function UfI(){var A=this;return[A.year(),A.month(),A.date(),A.hour(),A.minute(),A.second(),A.millisecond()]}function OfI(){var A=this;return{years:A.year(),months:A.month(),date:A.date(),hours:A.hours(),minutes:A.minutes(),seconds:A.seconds(),milliseconds:A.milliseconds()}}function zfI(){return this.isValid()?this.toISOString():null}function BfI(){return W(this)}function MfI(){return d({},Z(this))}function SfI(){return Z(this).overflow}function TfI(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Xe("N",0,0,"eraAbbr"),Xe("NN",0,0,"eraAbbr"),Xe("NNN",0,0,"eraAbbr"),Xe("NNNN",0,0,"eraName"),Xe("NNNNN",0,0,"eraNarrow"),Xe("y",["y",1],"yo","eraYear"),Xe("y",["yy",2],0,"eraYear"),Xe("y",["yyy",3],0,"eraYear"),Xe("y",["yyyy",4],0,"eraYear"),pe("N",VXe),pe("NN",VXe),pe("NNN",VXe),pe("NNNN",nEI),pe("NNNNN",aEI),_I(["N","NN","NNN","NNNN","NNNNN"],function(A,X,Q,E){var B=Q._locale.erasParse(A,E,Q._strict);B?Z(Q).era=B:Z(Q).invalidEra=A}),pe("y",zl),pe("yy",zl),pe("yyy",zl),pe("yyyy",zl),pe("yo",cEI),_I(["y","yy","yyy","yyyy"],De),_I(["yo"],function(A,X,Q,E){var B;Q._locale._eraYearOrdinalRegex&&(B=A.match(Q._locale._eraYearOrdinalRegex)),Q._locale.eraYearOrdinalParse?X[De]=Q._locale.eraYearOrdinalParse(A,B):X[De]=parseInt(A,10)});function _fI(A,X){var Q,E,B,le=this._eras||iX("en")._eras;for(Q=0,E=le.length;Q=0)return le[E]}function DfI(A,X){var Q=A.since<=A.until?1:-1;return X===void 0?e(A.since).year():e(A.since).year()+(X-A.offset)*Q}function qfI(){var A,X,Q,E=this.localeData().eras();for(A=0,X=E.length;Ale&&(X=le),uEI.call(this,A,X,Q,E,B))}function uEI(A,X,Q,E,B){var le=LIt(A,X,Q,E,B),ge=CS(le.year,0,le.dayOfYear);return this.year(ge.getUTCFullYear()),this.month(ge.getUTCMonth()),this.date(ge.getUTCDate()),this}Xe("Q",0,"Qo","quarter"),pe("Q",yt),_I("Q",function(A,X){X[ut]=(sI(A)-1)*3});function bEI(A){return A==null?Math.ceil((this.month()+1)/3):this.month((A-1)*3+this.month()%3)}Xe("D",["DD",2],"Do","date"),pe("D",ot,he),pe("DD",ot,wt),pe("Do",function(A,X){return A?X._dayOfMonthOrdinalParse||X._ordinalParse:X._dayOfMonthOrdinalParseLenient}),_I(["D","DD"],Et),_I("Do",function(A,X){X[Et]=sI(A.match(ot)[0])});var rlt=Sm("Date",!0);Xe("DDD",["DDDD",3],"DDDo","dayOfYear"),pe("DDD",js),pe("DDDD",ze),_I(["DDD","DDDD"],function(A,X,Q){Q._dayOfYear=sI(A)});function mEI(A){var X=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return A==null?X:this.add(A-X,"d")}Xe("m",["mm",2],0,"minute"),pe("m",ot,Je),pe("mm",ot,wt),_I(["m","mm"],dI);var ZEI=Sm("Minutes",!1);Xe("s",["ss",2],0,"second"),pe("s",ot,Je),pe("ss",ot,wt),_I(["s","ss"],un);var pEI=Sm("Seconds",!1);Xe("S",0,0,function(){return~~(this.millisecond()/100)}),Xe(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),Xe(0,["SSS",3],0,"millisecond"),Xe(0,["SSSS",4],0,function(){return this.millisecond()*10}),Xe(0,["SSSSS",5],0,function(){return this.millisecond()*100}),Xe(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),Xe(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),Xe(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),Xe(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),pe("S",js,yt),pe("SS",js,wt),pe("SSS",js,ze);var hH,slt;for(hH="SSSS";hH.length<=9;hH+="S")pe(hH,zl);function hEI(A,X){X[aa]=sI(("0."+A)*1e3)}for(hH="S";hH.length<=9;hH+="S")_I(hH,hEI);slt=Sm("Milliseconds",!1),Xe("z",0,0,"zoneAbbr"),Xe("zz",0,0,"zoneName");function WEI(){return this._isUTC?"UTC":""}function NEI(){return this._isUTC?"Coordinated Universal Time":""}var It=F.prototype;It.add=dfI,It.calendar=WfI,It.clone=NfI,It.diff=gfI,It.endOf=LfI,It.format=HfI,It.from=QfI,It.fromNow=ffI,It.to=EfI,It.toNow=JfI,It.get=cXe,It.invalidAt=SfI,It.isAfter=VfI,It.isBefore=YfI,It.isBetween=RfI,It.isSame=AfI,It.isSameOrAfter=FfI,It.isSameOrBefore=XfI,It.isValid=BfI,It.lang=tlt,It.locale=elt,It.localeData=Ilt,It.max=BQI,It.min=zQI,It.parsingFlags=MfI,It.set=rXe,It.startOf=CfI,It.subtract=ufI,It.toArray=UfI,It.toObject=OfI,It.toDate=jfI,It.toISOString=yfI,It.inspect=wfI,typeof Symbol<"u"&&Symbol.for!=null&&(It[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),It.toJSON=zfI,It.toString=vfI,It.unix=xfI,It.valueOf=kfI,It.creationData=TfI,It.eraName=qfI,It.eraNarrow=PfI,It.eraAbbr=$fI,It.eraYear=eEI,It.year=Mm,It.isLeapYear=di,It.weekYear=rEI,It.isoWeekYear=sEI,It.quarter=It.quarters=bEI,It.month=JIt,It.daysInMonth=jHI,It.week=It.weeks=_HI,It.isoWeek=It.isoWeeks=KHI,It.weeksInYear=GEI,It.weeksInWeekYear=dEI,It.isoWeeksInYear=oEI,It.isoWeeksInISOWeekYear=iEI,It.date=rlt,It.day=It.days=sQI,It.weekday=oQI,It.isoWeekday=iQI,It.dayOfYear=mEI,It.hour=It.hours=pQI,It.minute=It.minutes=ZEI,It.second=It.seconds=pEI,It.millisecond=It.milliseconds=slt,It.utcOffset=$QI,It.utc=tfI,It.local=IfI,It.parseZone=lfI,It.hasAlignedHourOffset=nfI,It.isDST=afI,It.isLocal=rfI,It.isUtcOffset=sfI,It.isUtc=KIt,It.isUTC=KIt,It.zoneAbbr=WEI,It.zoneName=NEI,It.dates=w("dates accessor is deprecated. Use date instead.",rlt),It.months=w("months accessor is deprecated. Use month instead",JIt),It.years=w("years accessor is deprecated. Use year instead",Mm),It.zone=w("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",efI),It.isDSTShifted=w("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",cfI);function VEI(A){return lc(A*1e3)}function YEI(){return lc.apply(null,arguments).parseZone()}function olt(A){return A}var bn=T.prototype;bn.calendar=$,bn.longDateFormat=ce,bn.invalidDate=O,bn.ordinal=Ie,bn.preparse=olt,bn.postformat=olt,bn.relativeTime=Ft,bn.pastFuture=vI,bn.set=k,bn.eras=_fI,bn.erasParse=KfI,bn.erasConvertYear=DfI,bn.erasAbbrRegex=IEI,bn.erasNameRegex=tEI,bn.erasNarrowRegex=lEI,bn.months=yA,bn.monthsShort=sX,bn.monthsParse=sXe,bn.monthsRegex=OHI,bn.monthsShortRegex=UHI,bn.week=BHI,bn.firstDayOfYear=THI,bn.firstDayOfWeek=SHI,bn.weekdays=lQI,bn.weekdaysMin=aQI,bn.weekdaysShort=nQI,bn.weekdaysParse=rQI,bn.weekdaysRegex=GQI,bn.weekdaysShortRegex=dQI,bn.weekdaysMinRegex=uQI,bn.isPM=mQI,bn.meridiem=hQI;function ule(A,X,Q,E){var B=iX(),le=u().set(E,X);return B[Q](le,A)}function ilt(A,X,Q){if(s(A)&&(X=A,A=void 0),A=A||"",X!=null)return ule(A,X,Q,"month");var E,B=[];for(E=0;E<12;E++)B[E]=ule(A,E,Q,"month");return B}function RXe(A,X,Q,E){typeof A=="boolean"?(s(X)&&(Q=X,X=void 0),X=X||""):(X=A,Q=X,A=!1,s(X)&&(Q=X,X=void 0),X=X||"");var B=iX(),le=A?B._week.dow:0,ge,Ht=[];if(Q!=null)return ule(X,(Q+le)%7,E,"day");for(ge=0;ge<7;ge++)Ht[ge]=ule(X,(ge+le)%7,E,"day");return Ht}function REI(A,X){return ilt(A,X,"months")}function AEI(A,X){return ilt(A,X,"monthsShort")}function FEI(A,X,Q){return RXe(A,X,Q,"weekdays")}function XEI(A,X,Q){return RXe(A,X,Q,"weekdaysShort")}function gEI(A,X,Q){return RXe(A,X,Q,"weekdaysMin")}pH("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(A){var X=A%10,Q=sI(A%100/10)===1?"th":X===1?"st":X===2?"nd":X===3?"rd":"th";return A+Q}}),e.lang=w("moment.lang is deprecated. Use moment.locale instead.",pH),e.langData=w("moment.langData is deprecated. Use moment.localeData instead.",iX);var GX=Math.abs;function vEI(){var A=this._data;return this._milliseconds=GX(this._milliseconds),this._days=GX(this._days),this._months=GX(this._months),A.milliseconds=GX(A.milliseconds),A.seconds=GX(A.seconds),A.minutes=GX(A.minutes),A.hours=GX(A.hours),A.months=GX(A.months),A.years=GX(A.years),this}function Glt(A,X,Q,E){var B=kR(X,Q);return A._milliseconds+=E*B._milliseconds,A._days+=E*B._days,A._months+=E*B._months,A._bubble()}function yEI(A,X){return Glt(this,A,X,1)}function wEI(A,X){return Glt(this,A,X,-1)}function dlt(A){return A<0?Math.floor(A):Math.ceil(A)}function HEI(){var A=this._milliseconds,X=this._days,Q=this._months,E=this._data,B,le,ge,Ht,kI;return A>=0&&X>=0&&Q>=0||A<=0&&X<=0&&Q<=0||(A+=dlt(AXe(Q)+X)*864e5,X=0,Q=0),E.milliseconds=A%1e3,B=an(A/1e3),E.seconds=B%60,le=an(B/60),E.minutes=le%60,ge=an(le/60),E.hours=ge%24,X+=an(ge/24),kI=an(ult(X)),Q+=kI,X-=dlt(AXe(kI)),Ht=an(Q/12),Q%=12,E.days=X,E.months=Q,E.years=Ht,this}function ult(A){return A*4800/146097}function AXe(A){return A*146097/4800}function QEI(A){if(!this.isValid())return NaN;var X,Q,E=this._milliseconds;if(A=EI(A),A==="month"||A==="quarter"||A==="year")switch(X=this._days+E/864e5,Q=this._months+ult(X),A){case"month":return Q;case"quarter":return Q/3;case"year":return Q/12}else switch(X=this._days+Math.round(AXe(this._months)),A){case"week":return X/7+E/6048e5;case"day":return X+E/864e5;case"hour":return X*24+E/36e5;case"minute":return X*1440+E/6e4;case"second":return X*86400+E/1e3;case"millisecond":return Math.floor(X*864e5)+E;default:throw new Error("Unknown unit "+A)}}function dX(A){return function(){return this.as(A)}}var blt=dX("ms"),fEI=dX("s"),EEI=dX("m"),JEI=dX("h"),CEI=dX("d"),LEI=dX("w"),kEI=dX("M"),xEI=dX("Q"),jEI=dX("y"),UEI=blt;function OEI(){return kR(this)}function zEI(A){return A=EI(A),this.isValid()?this[A+"s"]():NaN}function IJ(A){return function(){return this.isValid()?this._data[A]:NaN}}var BEI=IJ("milliseconds"),MEI=IJ("seconds"),SEI=IJ("minutes"),TEI=IJ("hours"),_EI=IJ("days"),KEI=IJ("months"),DEI=IJ("years");function qEI(){return an(this.days()/7)}var uX=Math.round,Ix={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function PEI(A,X,Q,E,B){return B.relativeTime(X||1,!!Q,A,E)}function $EI(A,X,Q,E){var B=kR(A).abs(),le=uX(B.as("s")),ge=uX(B.as("m")),Ht=uX(B.as("h")),kI=uX(B.as("d")),Bl=uX(B.as("M")),ku=uX(B.as("w")),bX=uX(B.as("y")),WH=le<=Q.ss&&["s",le]||le0,WH[4]=E,PEI.apply(null,WH)}function e1I(A){return A===void 0?uX:typeof A=="function"?(uX=A,!0):!1}function t1I(A,X){return Ix[A]===void 0?!1:X===void 0?Ix[A]:(Ix[A]=X,A==="s"&&(Ix.ss=X-1),!0)}function I1I(A,X){if(!this.isValid())return this.localeData().invalidDate();var Q=!1,E=Ix,B,le;return typeof A=="object"&&(X=A,A=!1),typeof A=="boolean"&&(Q=A),typeof X=="object"&&(E=Object.assign({},Ix,X),X.s!=null&&X.ss==null&&(E.ss=X.s-1)),B=this.localeData(),le=$EI(this,!Q,E,B),Q&&(le=B.pastFuture(+this,le)),B.postformat(le)}var FXe=Math.abs;function lx(A){return(A>0)-(A<0)||+A}function ble(){if(!this.isValid())return this.localeData().invalidDate();var A=FXe(this._milliseconds)/1e3,X=FXe(this._days),Q=FXe(this._months),E,B,le,ge,Ht=this.asSeconds(),kI,Bl,ku,bX;return Ht?(E=an(A/60),B=an(E/60),A%=60,E%=60,le=an(Q/12),Q%=12,ge=A?A.toFixed(3).replace(/\.?0+$/,""):"",kI=Ht<0?"-":"",Bl=lx(this._months)!==lx(Ht)?"-":"",ku=lx(this._days)!==lx(Ht)?"-":"",bX=lx(this._milliseconds)!==lx(Ht)?"-":"",kI+"P"+(le?Bl+le+"Y":"")+(Q?Bl+Q+"M":"")+(X?ku+X+"D":"")+(B||E||A?"T":"")+(B?bX+B+"H":"")+(E?bX+E+"M":"")+(A?bX+ge+"S":"")):"P0D"}var $l=rle.prototype;$l.isValid=KQI,$l.abs=vEI,$l.add=yEI,$l.subtract=wEI,$l.as=QEI,$l.asMilliseconds=blt,$l.asSeconds=fEI,$l.asMinutes=EEI,$l.asHours=JEI,$l.asDays=CEI,$l.asWeeks=LEI,$l.asMonths=kEI,$l.asQuarters=xEI,$l.asYears=jEI,$l.valueOf=UEI,$l._bubble=HEI,$l.clone=OEI,$l.get=zEI,$l.milliseconds=BEI,$l.seconds=MEI,$l.minutes=SEI,$l.hours=TEI,$l.days=_EI,$l.weeks=qEI,$l.months=KEI,$l.years=DEI,$l.humanize=I1I,$l.toISOString=ble,$l.toString=ble,$l.toJSON=ble,$l.locale=elt,$l.localeData=Ilt,$l.toIsoString=w("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ble),$l.lang=tlt,Xe("X",0,0,"unix"),Xe("x",0,0,"valueOf"),pe("x",Cu),pe("X",P),_I("X",function(A,X,Q){Q._d=new Date(parseFloat(A)*1e3)}),_I("x",function(A,X,Q){Q._d=new Date(sI(A))});return e.version="2.30.1",I(lc),e.fn=It,e.min=MQI,e.max=SQI,e.now=TQI,e.utc=u,e.unix=VEI,e.months=REI,e.isDate=i,e.locale=pH,e.invalid=h,e.duration=kR,e.isMoment=v,e.weekdays=FEI,e.parseZone=YEI,e.localeData=iX,e.isDuration=sle,e.monthsShort=AEI,e.weekdaysMin=gEI,e.defineLocale=dXe,e.updateLocale=YQI,e.locales=RQI,e.weekdaysShort=XEI,e.normalizeUnits=EI,e.relativeTimeRounding=e1I,e.relativeTimeThreshold=t1I,e.calendarFormat=hfI,e.prototype=It,e.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},e})});var $oe=Y((JPa,vRt)=>{"use strict";o();function D_I(t,e){return t.path=e,t}function gRt(t){for(let e=1;e{"use strict";o();var{appendContextPath:tKI,createFrame:IKI,blockParams:lKI,isPromise:nKI}=$oe();yRt.exports=t=>{t.registerHelper("each",async function(e,I){if(!I)throw new Error("Must pass iterator to #each");let{fn:l}=I,{inverse:n}=I,a=0,c=[],r,s;I.data&&I.ids&&(s=`${tKI(I.data.contextPath,I.ids[0])}.`),typeof e=="function"&&(e=e.call(this)),I.data&&(r=IKI(I.data));async function i(G,d,u){r&&(r.key=G,r.index=d,r.first=d===0,r.last=!!u,s&&(r.contextPath=s+G)),c.push(l(e[G],{data:r,blockParams:lKI([e[G],G],[s+G,null])}))}if(e&&typeof e=="object")if(nKI(e)&&(e=await e),Array.isArray(e))for(let G=e.length;a{"use strict";o();var{isPromise:aKI,isEmpty:cKI}=$oe();HRt.exports=t=>{t.registerHelper("if",async function(e,I){if(arguments.length!==2)throw new Error("#if requires exactly one argument");return typeof e=="function"?e=e.call(this):aKI(e)&&(e=await e),!I.hash.includeZero&&!e||cKI(e)?I.inverse(this):I.fn(this)}),t.registerHelper("unless",function(e,I){if(arguments.length!==2)throw new Error("#unless requires exactly one argument");return t.helpers.if.call(this,e,{fn:I.inverse,inverse:I.fn,hash:I.hash})})}});var ERt=Y((UPa,fRt)=>{"use strict";o();var{isPromise:rKI,isEmpty:sKI,createFrame:oKI,appendContextPath:iKI,blockParams:GKI}=$oe();fRt.exports=t=>{t.registerHelper("with",async function(e,I){if(arguments.length!==2)throw new Error("#with requires exactly one argument");typeof e=="function"?e=e.call(this):rKI(e)&&(e=await e);let{fn:l}=I;if(!sKI(e)){let{data:n}=I;return I.data&&I.ids&&(n=oKI(I.data),n.contextPath=iKI(I.data.contextPath,I.ids[0])),l(e,{data:n,blockParams:GKI([e],[n&&n.contextPath])})}return I.inverse(this)})}});var CRt=Y((zPa,JRt)=>{"use strict";o();JRt.exports={registerCoreHelpers:t=>{wRt()(t),QRt()(t),ERt()(t)}}});var Kb=Y((G5e,d5e)=>{o();(function(t,e){typeof G5e=="object"&&typeof d5e<"u"?d5e.exports=e():typeof define=="function"&&define.amd?define(e):t.JSON5=e()})(G5e,function(){"use strict";function t(oe,ye){return ye={exports:{}},oe(ye,ye.exports),ye.exports}var e=t(function(oe){var ye=oe.exports=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=ye)}),I=t(function(oe){var ye=oe.exports={version:"2.6.5"};typeof __e=="number"&&(__e=ye)}),l=I.version,n=function(oe){return typeof oe=="object"?oe!==null:typeof oe=="function"},a=function(oe){if(!n(oe))throw TypeError(oe+" is not an object!");return oe},c=function(oe){try{return!!oe()}catch{return!0}},r=!c(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7}),s=e.document,i=n(s)&&n(s.createElement),G=function(oe){return i?s.createElement(oe):{}},d=!r&&!c(function(){return Object.defineProperty(G("div"),"a",{get:function(){return 7}}).a!=7}),u=function(oe,ye){if(!n(oe))return oe;var De,ut;if(ye&&typeof(De=oe.toString)=="function"&&!n(ut=De.call(oe))||typeof(De=oe.valueOf)=="function"&&!n(ut=De.call(oe))||!ye&&typeof(De=oe.toString)=="function"&&!n(ut=De.call(oe)))return ut;throw TypeError("Can't convert object to primitive value")},b=Object.defineProperty,Z=r?Object.defineProperty:function(ye,De,ut){if(a(ye),De=u(De,!0),a(ut),d)try{return b(ye,De,ut)}catch{}if("get"in ut||"set"in ut)throw TypeError("Accessors not supported!");return"value"in ut&&(ye[De]=ut.value),ye},p={f:Z},W=function(oe,ye){return{enumerable:!(oe&1),configurable:!(oe&2),writable:!(oe&4),value:ye}},h=r?function(oe,ye,De){return p.f(oe,ye,W(1,De))}:function(oe,ye,De){return oe[ye]=De,oe},N={}.hasOwnProperty,V=function(oe,ye){return N.call(oe,ye)},R=0,F=Math.random(),v=function(oe){return"Symbol(".concat(oe===void 0?"":oe,")_",(++R+F).toString(36))},y=!1,w=t(function(oe){var ye="__core-js_shared__",De=e[ye]||(e[ye]={});(oe.exports=function(ut,Et){return De[ut]||(De[ut]=Et!==void 0?Et:{})})("versions",[]).push({version:I.version,mode:y?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})}),H=w("native-function-to-string",Function.toString),f=t(function(oe){var ye=v("src"),De="toString",ut=(""+H).split(De);I.inspectSource=function(Et){return H.call(Et)},(oe.exports=function(Et,Jt,dI,un){var aa=typeof dI=="function";aa&&(V(dI,"name")||h(dI,"name",Jt)),Et[Jt]!==dI&&(aa&&(V(dI,ye)||h(dI,ye,Et[Jt]?""+Et[Jt]:ut.join(String(Jt)))),Et===e?Et[Jt]=dI:un?Et[Jt]?Et[Jt]=dI:h(Et,Jt,dI):(delete Et[Jt],h(Et,Jt,dI)))})(Function.prototype,De,function(){return typeof this=="function"&&this[ye]||H.call(this)})}),L=function(oe){if(typeof oe!="function")throw TypeError(oe+" is not a function!");return oe},k=function(oe,ye,De){if(L(oe),ye===void 0)return oe;switch(De){case 1:return function(ut){return oe.call(ye,ut)};case 2:return function(ut,Et){return oe.call(ye,ut,Et)};case 3:return function(ut,Et,Jt){return oe.call(ye,ut,Et,Jt)}}return function(){return oe.apply(ye,arguments)}},U="prototype",T=function(oe,ye,De){var ut=oe&T.F,Et=oe&T.G,Jt=oe&T.S,dI=oe&T.P,un=oe&T.B,aa=Et?e:Jt?e[ye]||(e[ye]={}):(e[ye]||{})[U],cX=Et?I:I[ye]||(I[ye]={}),ZH=cX[U]||(cX[U]={}),Gi,Mm,di,Sm;Et&&(De=ye);for(Gi in De)Mm=!ut&&aa&&aa[Gi]!==void 0,di=(Mm?aa:De)[Gi],Sm=un&&Mm?k(di,e):dI&&typeof di=="function"?k(Function.call,di):di,aa&&f(aa,Gi,di,oe&T.U),cX[Gi]!=di&&h(cX,Gi,Sm),dI&&ZH[Gi]!=di&&(ZH[Gi]=di)};e.core=I,T.F=1,T.G=2,T.S=4,T.P=8,T.B=16,T.W=32,T.U=64,T.R=128;var q=T,_=Math.ceil,$=Math.floor,ee=function(oe){return isNaN(oe=+oe)?0:(oe>0?$:_)(oe)},se=function(oe){if(oe==null)throw TypeError("Can't call method on "+oe);return oe},Ae=function(oe){return function(ye,De){var ut=String(se(ye)),Et=ee(De),Jt=ut.length,dI,un;return Et<0||Et>=Jt?oe?"":void 0:(dI=ut.charCodeAt(Et),dI<55296||dI>56319||Et+1===Jt||(un=ut.charCodeAt(Et+1))<56320||un>57343?oe?ut.charAt(Et):dI:oe?ut.slice(Et,Et+2):(dI-55296<<10)+(un-56320)+65536)}},Ve=Ae(!1);q(q.P,"String",{codePointAt:function(ye){return Ve(this,ye)}});var ct=I.String.codePointAt,Xe=Math.max,_t=Math.min,Pt=function(oe,ye){return oe=ee(oe),oe<0?Xe(oe+ye,0):_t(oe,ye)},S=String.fromCharCode,j=String.fromCodePoint;q(q.S+q.F*(!!j&&j.length!=1),"String",{fromCodePoint:function(ye){for(var De=arguments,ut=[],Et=arguments.length,Jt=0,dI;Et>Jt;){if(dI=+De[Jt++],Pt(dI,1114111)!==dI)throw RangeError(dI+" is not a valid code point");ut.push(dI<65536?S(dI):S(((dI-=65536)>>10)+55296,dI%1024+56320))}return ut.join("")}});var Ne=I.String.fromCodePoint,ce=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,St=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,O=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,C={Space_Separator:ce,ID_Start:St,ID_Continue:O},re={isSpaceSeparator:function(ye){return typeof ye=="string"&&C.Space_Separator.test(ye)},isIdStartChar:function(ye){return typeof ye=="string"&&(ye>="a"&&ye<="z"||ye>="A"&&ye<="Z"||ye==="$"||ye==="_"||C.ID_Start.test(ye))},isIdContinueChar:function(ye){return typeof ye=="string"&&(ye>="a"&&ye<="z"||ye>="A"&&ye<="Z"||ye>="0"&&ye<="9"||ye==="$"||ye==="_"||ye==="\u200C"||ye==="\u200D"||C.ID_Continue.test(ye))},isDigit:function(ye){return typeof ye=="string"&&/[0-9]/.test(ye)},isHexDigit:function(ye){return typeof ye=="string"&&/[0-9A-Fa-f]/.test(ye)}},Ie,rt,Ft,vI,hl,EI,Be,Pl,Xt,yt=function(ye,De){Ie=String(ye),rt="start",Ft=[],vI=0,hl=1,EI=0,Be=void 0,Pl=void 0,Xt=void 0;do Be=aX(),ne[rt]();while(Be.type!=="eof");return typeof De=="function"?wt({"":Xt},"",De):Xt};function wt(oe,ye,De){var ut=oe[ye];if(ut!=null&&typeof ut=="object")if(Array.isArray(ut))for(var Et=0;Et0;){var De=js();if(!re.isHexDigit(De))throw Ce(Oe());oe+=Oe()}return String.fromCodePoint(parseInt(oe,16))}var ne={start:function(){if(Be.type==="eof")throw pe();he()},beforePropertyName:function(){switch(Be.type){case"identifier":case"string":Pl=Be.value,rt="afterPropertyName";return;case"punctuator":Je();return;case"eof":throw pe()}},afterPropertyName:function(){if(Be.type==="eof")throw pe();rt="beforePropertyValue"},beforePropertyValue:function(){if(Be.type==="eof")throw pe();he()},beforeArrayValue:function(){if(Be.type==="eof")throw pe();if(Be.type==="punctuator"&&Be.value==="]"){Je();return}he()},afterPropertyValue:function(){if(Be.type==="eof")throw pe();switch(Be.value){case",":rt="beforePropertyName";return;case"}":Je()}},afterArrayValue:function(){if(Be.type==="eof")throw pe();switch(Be.value){case",":rt="beforeArrayValue";return;case"]":Je()}},end:function(){}};function he(){var oe;switch(Be.type){case"punctuator":switch(Be.value){case"{":oe={};break;case"[":oe=[];break}break;case"null":case"boolean":case"numeric":case"string":oe=Be.value;break}if(Xt===void 0)Xt=oe;else{var ye=Ft[Ft.length-1];Array.isArray(ye)?ye.push(oe):Object.defineProperty(ye,Pl,{value:oe,writable:!0,enumerable:!0,configurable:!0})}if(oe!==null&&typeof oe=="object")Ft.push(oe),Array.isArray(oe)?rt="beforeArrayValue":rt="beforePropertyName";else{var De=Ft[Ft.length-1];De==null?rt="end":Array.isArray(De)?rt="afterArrayValue":rt="afterPropertyValue"}}function Je(){Ft.pop();var oe=Ft[Ft.length-1];oe==null?rt="end":Array.isArray(oe)?rt="afterArrayValue":rt="afterPropertyValue"}function Ce(oe){return an(oe===void 0?"JSON5: invalid end of input at "+hl+":"+EI:"JSON5: invalid character '"+Wl(oe)+"' at "+hl+":"+EI)}function pe(){return an("JSON5: invalid end of input at "+hl+":"+EI)}function nt(){return EI-=5,an("JSON5: invalid identifier character at "+hl+":"+EI)}function AI(oe){console.warn("JSON5: '"+Wl(oe)+"' in strings is not valid ECMAScript; consider escaping")}function Wl(oe){var ye={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(ye[oe])return ye[oe];if(oe<" "){var De=oe.charCodeAt(0).toString(16);return"\\x"+("00"+De).substring(De.length)}return oe}function an(oe){var ye=new SyntaxError(oe);return ye.lineNumber=hl,ye.columnNumber=EI,ye}var sI=function(ye,De,ut){var Et=[],Jt="",dI,un,aa="",cX;if(De!=null&&typeof De=="object"&&!Array.isArray(De)&&(ut=De.space,cX=De.quote,De=De.replacer),typeof De=="function")un=De;else if(Array.isArray(De)){dI=[];for(var ZH=0,Gi=De;ZH0&&(ut=Math.min(10,Math.floor(ut)),aa=" ".substr(0,ut)):typeof ut=="string"&&(aa=ut.substr(0,10)),Sm("",{"":ye});function Sm(kn,Fl){var LI=Fl[kn];switch(LI!=null&&(typeof LI.toJSON5=="function"?LI=LI.toJSON5(kn):typeof LI.toJSON=="function"&&(LI=LI.toJSON(kn))),un&&(LI=un.call(Fl,kn,LI)),LI instanceof Number?LI=Number(LI):LI instanceof String?LI=String(LI):LI instanceof Boolean&&(LI=LI.valueOf()),LI){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof LI=="string")return vA(LI,!1);if(typeof LI=="number")return String(LI);if(typeof LI=="object")return Array.isArray(LI)?rXe(LI):lle(LI)}function vA(kn){for(var Fl={"'":.1,'"':.2},LI={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"},Us="",fb=0;fb=0)throw TypeError("Converting circular structure to JSON5");Et.push(kn);var Fl=Jt;Jt=Jt+aa;for(var LI=dI||Object.keys(kn),Us=[],fb=0,Os=LI;fb=0)throw TypeError("Converting circular structure to JSON5");Et.push(kn);var Fl=Jt;Jt=Jt+aa;for(var LI=[],Us=0;Us{o();function n0t(t,e){if(e&&e.documentElement)t=e,e=arguments[2];else if(!t||!t.documentElement)throw new Error("First argument to Readability constructor should be a document object.");if(e=e||{},this._doc=t,this._docJSDOMParser=this._doc.firstChild.__JSDOMParser__,this._articleTitle=null,this._articleByline=null,this._articleDir=null,this._articleSiteName=null,this._attempts=[],this._debug=!!e.debug,this._maxElemsToParse=e.maxElemsToParse||this.DEFAULT_MAX_ELEMS_TO_PARSE,this._nbTopCandidates=e.nbTopCandidates||this.DEFAULT_N_TOP_CANDIDATES,this._charThreshold=e.charThreshold||this.DEFAULT_CHAR_THRESHOLD,this._classesToPreserve=this.CLASSES_TO_PRESERVE.concat(e.classesToPreserve||[]),this._keepClasses=!!e.keepClasses,this._serializer=e.serializer||function(I){return I.innerHTML},this._disableJSONLD=!!e.disableJSONLD,this._allowedVideoRegex=e.allowedVideoRegex||this.REGEXPS.videos,this._flags=this.FLAG_STRIP_UNLIKELYS|this.FLAG_WEIGHT_CLASSES|this.FLAG_CLEAN_CONDITIONALLY,this._debug){let I=function(l){if(l.nodeType==l.TEXT_NODE)return`${l.nodeName} ("${l.textContent}")`;let n=Array.from(l.attributes||[],function(a){return`${a.name}="${a.value}"`}).join(" ");return`<${l.localName} ${n}>`};this.log=function(){if(typeof console<"u"){let n=Array.from(arguments,a=>a&&a.nodeType==this.ELEMENT_NODE?I(a):a);n.unshift("Reader: (Readability)"),console.log.apply(console,n)}else if(typeof dump<"u"){var l=Array.prototype.map.call(arguments,function(n){return n&&n.nodeName?I(n):n}).join(" ");dump("Reader: (Readability) "+l+` +`)}}}else this.log=function(){}}n0t.prototype={FLAG_STRIP_UNLIKELYS:1,FLAG_WEIGHT_CLASSES:2,FLAG_CLEAN_CONDITIONALLY:4,ELEMENT_NODE:1,TEXT_NODE:3,DEFAULT_MAX_ELEMS_TO_PARSE:0,DEFAULT_N_TOP_CANDIDATES:5,DEFAULT_TAGS_TO_SCORE:"section,h2,h3,h4,h5,h6,p,td,pre".toUpperCase().split(","),DEFAULT_CHAR_THRESHOLD:500,REGEXPS:{unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i,positive:/article|body|content|entry|hentry|h-entry|main|page|pagination|post|text|blog|story/i,negative:/-ad-|hidden|^hid$| hid$| hid |^hid |banner|combx|comment|com-|contact|foot|footer|footnote|gdpr|masthead|media|meta|outbrain|promo|related|scroll|share|shoutbox|sidebar|skyscraper|sponsor|shopping|tags|tool|widget/i,extraneous:/print|archive|comment|discuss|e[\-]?mail|share|reply|all|login|sign|single|utility/i,byline:/byline|author|dateline|writtenby|p-author/i,replaceFonts:/<(\/?)font[^>]*>/gi,normalize:/\s{2,}/g,videos:/\/\/(www\.)?((dailymotion|youtube|youtube-nocookie|player\.vimeo|v\.qq)\.com|(archive|upload\.wikimedia)\.org|player\.twitch\.tv)/i,shareElements:/(\b|_)(share|sharedaddy)(\b|_)/i,nextLink:/(next|weiter|continue|>([^\|]|$)|»([^\|]|$))/i,prevLink:/(prev|earl|old|new|<|«)/i,tokenize:/\W+/g,whitespace:/^\s*$/,hasContent:/\S$/,hashUrl:/^#.+/,srcsetUrl:/(\S+)(\s+[\d.]+[xw])?(\s*(?:,|$))/g,b64DataUrl:/^data:\s*([^\s;,]+)\s*;\s*base64\s*,/i,jsonLdArticleTypes:/^Article|AdvertiserContentArticle|NewsArticle|AnalysisNewsArticle|AskPublicNewsArticle|BackgroundNewsArticle|OpinionNewsArticle|ReportageNewsArticle|ReviewNewsArticle|Report|SatiricalArticle|ScholarlyArticle|MedicalScholarlyArticle|SocialMediaPosting|BlogPosting|LiveBlogPosting|DiscussionForumPosting|TechArticle|APIReference$/},UNLIKELY_ROLES:["menu","menubar","complementary","navigation","alert","alertdialog","dialog"],DIV_TO_P_ELEMS:new Set(["BLOCKQUOTE","DL","DIV","IMG","OL","P","PRE","TABLE","UL"]),ALTER_TO_DIV_EXCEPTIONS:["DIV","ARTICLE","SECTION","P"],PRESENTATIONAL_ATTRIBUTES:["align","background","bgcolor","border","cellpadding","cellspacing","frame","hspace","rules","style","valign","vspace"],DEPRECATED_SIZE_ATTRIBUTE_ELEMS:["TABLE","TH","TD","HR","PRE"],PHRASING_ELEMS:["ABBR","AUDIO","B","BDO","BR","BUTTON","CITE","CODE","DATA","DATALIST","DFN","EM","EMBED","I","IMG","INPUT","KBD","LABEL","MARK","MATH","METER","NOSCRIPT","OBJECT","OUTPUT","PROGRESS","Q","RUBY","SAMP","SCRIPT","SELECT","SMALL","SPAN","STRONG","SUB","SUP","TEXTAREA","TIME","VAR","WBR"],CLASSES_TO_PRESERVE:["page"],HTML_ESCAPE_MAP:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'"},_postProcessContent:function(t){this._fixRelativeUris(t),this._simplifyNestedElements(t),this._keepClasses||this._cleanClasses(t)},_removeNodes:function(t,e){if(this._docJSDOMParser&&t._isLiveNodeList)throw new Error("Do not pass live node lists to _removeNodes");for(var I=t.length-1;I>=0;I--){var l=t[I],n=l.parentNode;n&&(!e||e.call(this,l,I,t))&&n.removeChild(l)}},_replaceNodeTags:function(t,e){if(this._docJSDOMParser&&t._isLiveNodeList)throw new Error("Do not pass live node lists to _replaceNodeTags");for(let I of t)this._setNodeTag(I,e)},_forEachNode:function(t,e){Array.prototype.forEach.call(t,e,this)},_findNode:function(t,e){return Array.prototype.find.call(t,e,this)},_someNode:function(t,e){return Array.prototype.some.call(t,e,this)},_everyNode:function(t,e){return Array.prototype.every.call(t,e,this)},_concatNodeLists:function(){var t=Array.prototype.slice,e=t.call(arguments),I=e.map(function(l){return t.call(l)});return Array.prototype.concat.apply([],I)},_getAllNodesWithTag:function(t,e){return t.querySelectorAll?t.querySelectorAll(e.join(",")):[].concat.apply([],e.map(function(I){var l=t.getElementsByTagName(I);return Array.isArray(l)?l:Array.from(l)}))},_cleanClasses:function(t){var e=this._classesToPreserve,I=(t.getAttribute("class")||"").split(/\s+/).filter(function(l){return e.indexOf(l)!=-1}).join(" ");for(I?t.setAttribute("class",I):t.removeAttribute("class"),t=t.firstElementChild;t;t=t.nextElementSibling)this._cleanClasses(t)},_fixRelativeUris:function(t){var e=this._doc.baseURI,I=this._doc.documentURI;function l(c){if(e==I&&c.charAt(0)=="#")return c;try{return new URL(c,e).href}catch{}return c}var n=this._getAllNodesWithTag(t,["a"]);this._forEachNode(n,function(c){var r=c.getAttribute("href");if(r)if(r.indexOf("javascript:")===0)if(c.childNodes.length===1&&c.childNodes[0].nodeType===this.TEXT_NODE){var s=this._doc.createTextNode(c.textContent);c.parentNode.replaceChild(s,c)}else{for(var i=this._doc.createElement("span");c.firstChild;)i.appendChild(c.firstChild);c.parentNode.replaceChild(i,c)}else c.setAttribute("href",l(r))});var a=this._getAllNodesWithTag(t,["img","picture","figure","video","audio","source"]);this._forEachNode(a,function(c){var r=c.getAttribute("src"),s=c.getAttribute("poster"),i=c.getAttribute("srcset");if(r&&c.setAttribute("src",l(r)),s&&c.setAttribute("poster",l(s)),i){var G=i.replace(this.REGEXPS.srcsetUrl,function(d,u,b,Z){return l(u)+(b||"")+Z});c.setAttribute("srcset",G)}})},_simplifyNestedElements:function(t){for(var e=t;e;){if(e.parentNode&&["DIV","SECTION"].includes(e.tagName)&&!(e.id&&e.id.startsWith("readability"))){if(this._isElementWithoutContent(e)){e=this._removeAndGetNext(e);continue}else if(this._hasSingleTagInsideElement(e,"DIV")||this._hasSingleTagInsideElement(e,"SECTION")){for(var I=e.children[0],l=0;l»] /.test(e))l=/ [\\\/>»] /.test(e),e=I.replace(/(.*)[\|\-\\\/>»] .*/gi,"$1"),n(e)<3&&(e=I.replace(/[^\|\-\\\/>»]*[\|\-\\\/>»](.*)/gi,"$1"));else if(e.indexOf(": ")!==-1){var a=this._concatNodeLists(t.getElementsByTagName("h1"),t.getElementsByTagName("h2")),c=e.trim(),r=this._someNode(a,function(G){return G.textContent.trim()===c});r||(e=I.substring(I.lastIndexOf(":")+1),n(e)<3?e=I.substring(I.indexOf(":")+1):n(I.substr(0,I.indexOf(":")))>5&&(e=I))}else if(e.length>150||e.length<15){var s=t.getElementsByTagName("h1");s.length===1&&(e=this._getInnerText(s[0]))}e=e.trim().replace(this.REGEXPS.normalize," ");var i=n(e);return i<=4&&(!l||i!=n(I.replace(/[\|\-\\\/>»]+/g,""))-1)&&(e=I),e},_prepDocument:function(){var t=this._doc;this._removeNodes(this._getAllNodesWithTag(t,["style"])),t.body&&this._replaceBrs(t.body),this._replaceNodeTags(this._getAllNodesWithTag(t,["font"]),"SPAN")},_nextNode:function(t){for(var e=t;e&&e.nodeType!=this.ELEMENT_NODE&&this.REGEXPS.whitespace.test(e.textContent);)e=e.nextSibling;return e},_replaceBrs:function(t){this._forEachNode(this._getAllNodesWithTag(t,["br"]),function(e){for(var I=e.nextSibling,l=!1;(I=this._nextNode(I))&&I.tagName=="BR";){l=!0;var n=I.nextSibling;I.parentNode.removeChild(I),I=n}if(l){var a=this._doc.createElement("p");for(e.parentNode.replaceChild(a,e),I=a.nextSibling;I;){if(I.tagName=="BR"){var c=this._nextNode(I.nextSibling);if(c&&c.tagName=="BR")break}if(!this._isPhrasingContent(I))break;var r=I.nextSibling;a.appendChild(I),I=r}for(;a.lastChild&&this._isWhitespace(a.lastChild);)a.removeChild(a.lastChild);a.parentNode.tagName==="P"&&this._setNodeTag(a.parentNode,"DIV")}})},_setNodeTag:function(t,e){if(this.log("_setNodeTag",t,e),this._docJSDOMParser)return t.localName=e.toLowerCase(),t.tagName=e.toUpperCase(),t;for(var I=t.ownerDocument.createElement(e);t.firstChild;)I.appendChild(t.firstChild);t.parentNode.replaceChild(I,t),t.readability&&(I.readability=t.readability);for(var l=0;l!I.includes(c)),a=n.join(" ").length/l.join(" ").length;return 1-a},_checkByline:function(t,e){if(this._articleByline)return!1;if(t.getAttribute!==void 0)var I=t.getAttribute("rel"),l=t.getAttribute("itemprop");return(I==="author"||l&&l.indexOf("author")!==-1||this.REGEXPS.byline.test(e))&&this._isValidByline(t.textContent)?(this._articleByline=t.textContent.trim(),!0):!1},_getNodeAncestors:function(t,e){e=e||0;for(var I=0,l=[];t.parentNode&&(l.push(t.parentNode),!(e&&++I===e));)t=t.parentNode;return l},_grabArticle:function(t){this.log("**** grabArticle ****");var e=this._doc,I=t!==null;if(t=t||this._doc.body,!t)return this.log("No body found in document. Abort."),null;for(var l=t.innerHTML;;){this.log("Starting grabArticle loop");var n=this._flagIsActive(this.FLAG_STRIP_UNLIKELYS),a=[],c=this._doc.documentElement;let St=!0;for(;c;){c.tagName==="HTML"&&(this._articleLang=c.getAttribute("lang"));var r=c.className+" "+c.id;if(!this._isProbablyVisible(c)){this.log("Removing hidden node - "+r),c=this._removeAndGetNext(c);continue}if(c.getAttribute("aria-modal")=="true"&&c.getAttribute("role")=="dialog"){c=this._removeAndGetNext(c);continue}if(this._checkByline(c,r)){c=this._removeAndGetNext(c);continue}if(St&&this._headerDuplicatesTitle(c)){this.log("Removing header: ",c.textContent.trim(),this._articleTitle.trim()),St=!1,c=this._removeAndGetNext(c);continue}if(n){if(this.REGEXPS.unlikelyCandidates.test(r)&&!this.REGEXPS.okMaybeItsACandidate.test(r)&&!this._hasAncestorTag(c,"table")&&!this._hasAncestorTag(c,"code")&&c.tagName!=="BODY"&&c.tagName!=="A"){this.log("Removing unlikely candidate - "+r),c=this._removeAndGetNext(c);continue}if(this.UNLIKELY_ROLES.includes(c.getAttribute("role"))){this.log("Removing content with role "+c.getAttribute("role")+" - "+r),c=this._removeAndGetNext(c);continue}}if((c.tagName==="DIV"||c.tagName==="SECTION"||c.tagName==="HEADER"||c.tagName==="H1"||c.tagName==="H2"||c.tagName==="H3"||c.tagName==="H4"||c.tagName==="H5"||c.tagName==="H6")&&this._isElementWithoutContent(c)){c=this._removeAndGetNext(c);continue}if(this.DEFAULT_TAGS_TO_SCORE.indexOf(c.tagName)!==-1&&a.push(c),c.tagName==="DIV"){for(var s=null,i=c.firstChild;i;){var G=i.nextSibling;if(this._isPhrasingContent(i))s!==null?s.appendChild(i):this._isWhitespace(i)||(s=e.createElement("p"),c.replaceChild(s,i),s.appendChild(i));else if(s!==null){for(;s.lastChild&&this._isWhitespace(s.lastChild);)s.removeChild(s.lastChild);s=null}i=G}if(this._hasSingleTagInsideElement(c,"P")&&this._getLinkDensity(c)<.25){var d=c.children[0];c.parentNode.replaceChild(d,c),c=d,a.push(c)}else this._hasChildBlockElement(c)||(c=this._setNodeTag(c,"P"),a.push(c))}c=this._getNextNode(c)}var u=[];this._forEachNode(a,function(O){if(!(!O.parentNode||typeof O.parentNode.tagName>"u")){var C=this._getInnerText(O);if(!(C.length<25)){var re=this._getNodeAncestors(O,5);if(re.length!==0){var Ie=0;Ie+=1,Ie+=C.split(",").length,Ie+=Math.min(Math.floor(C.length/100),3),this._forEachNode(re,function(rt,Ft){if(!(!rt.tagName||!rt.parentNode||typeof rt.parentNode.tagName>"u")){if(typeof rt.readability>"u"&&(this._initializeNode(rt),u.push(rt)),Ft===0)var vI=1;else Ft===1?vI=2:vI=Ft*3;rt.readability.contentScore+=Ie/vI}})}}}});for(var b=[],Z=0,p=u.length;ZV.readability.contentScore){b.splice(N,0,W),b.length>this._nbTopCandidates&&b.pop();break}}}var R=b[0]||null,F=!1,v;if(R===null||R.tagName==="BODY"){for(R=e.createElement("DIV"),F=!0;t.firstChild;)this.log("Moving child out:",t.firstChild),R.appendChild(t.firstChild);t.appendChild(R),this._initializeNode(R)}else if(R){for(var y=[],w=1;w=.75&&y.push(this._getNodeAncestors(b[w]));var H=3;if(y.length>=H)for(v=R.parentNode;v.tagName!=="BODY";){for(var f=0,L=0;L=H){R=v;break}v=v.parentNode}R.readability||this._initializeNode(R),v=R.parentNode;for(var k=R.readability.contentScore,U=k/3;v.tagName!=="BODY";){if(!v.readability){v=v.parentNode;continue}var T=v.readability.contentScore;if(Tk){R=v;break}k=v.readability.contentScore,v=v.parentNode}for(v=R.parentNode;v.tagName!="BODY"&&v.children.length==1;)R=v,v=R.parentNode;R.readability||this._initializeNode(R)}var q=e.createElement("DIV");I&&(q.id="readability-content");var _=Math.max(10,R.readability.contentScore*.2);v=R.parentNode;for(var $=v.children,ee=0,se=$.length;ee=_)Ve=!0;else if(Ae.nodeName==="P"){var Xe=this._getLinkDensity(Ae),_t=this._getInnerText(Ae),Pt=_t.length;(Pt>80&&Xe<.25||Pt<80&&Pt>0&&Xe===0&&_t.search(/\.( |$)/)!==-1)&&(Ve=!0)}}Ve&&(this.log("Appending node:",Ae),this.ALTER_TO_DIV_EXCEPTIONS.indexOf(Ae.nodeName)===-1&&(this.log("Altering sibling:",Ae,"to div."),Ae=this._setNodeTag(Ae,"DIV")),q.appendChild(Ae),$=v.children,ee-=1,se-=1)}if(this._debug&&this.log("Article content pre-prep: "+q.innerHTML),this._prepArticle(q),this._debug&&this.log("Article content post-prep: "+q.innerHTML),F)R.id="readability-page-1",R.className="page";else{var S=e.createElement("DIV");for(S.id="readability-page-1",S.className="page";q.firstChild;)S.appendChild(q.firstChild);q.appendChild(S)}this._debug&&this.log("Article content after paging: "+q.innerHTML);var j=!0,Ne=this._getInnerText(q,!0).length;if(Ne0&&t.length<100):!1},_unescapeHtmlEntities:function(t){if(!t)return t;var e=this.HTML_ESCAPE_MAP;return t.replace(/&(quot|amp|apos|lt|gt);/g,function(I,l){return e[l]}).replace(/&#(?:x([0-9a-z]{1,4})|([0-9]{1,4}));/gi,function(I,l,n){var a=parseInt(l||n,l?16:10);return String.fromCharCode(a)})},_getJSONLD:function(t){var e=this._getAllNodesWithTag(t,["script"]),I;return this._forEachNode(e,function(l){if(!I&&l.getAttribute("type")==="application/ld+json")try{var n=l.textContent.replace(/^\s*\s*$/g,""),a=JSON.parse(n);if(!a["@context"]||!a["@context"].match(/^https?\:\/\/schema\.org$/)||(!a["@type"]&&Array.isArray(a["@graph"])&&(a=a["@graph"].find(function(i){return(i["@type"]||"").match(this.REGEXPS.jsonLdArticleTypes)})),!a||!a["@type"]||!a["@type"].match(this.REGEXPS.jsonLdArticleTypes)))return;if(I={},typeof a.name=="string"&&typeof a.headline=="string"&&a.name!==a.headline){var c=this._getArticleTitle(),r=this._textSimilarity(a.name,c)>.75,s=this._textSimilarity(a.headline,c)>.75;s&&!r?I.title=a.headline:I.title=a.name}else typeof a.name=="string"?I.title=a.name.trim():typeof a.headline=="string"&&(I.title=a.headline.trim());a.author&&(typeof a.author.name=="string"?I.byline=a.author.name.trim():Array.isArray(a.author)&&a.author[0]&&typeof a.author[0].name=="string"&&(I.byline=a.author.filter(function(i){return i&&typeof i.name=="string"}).map(function(i){return i.name.trim()}).join(", "))),typeof a.description=="string"&&(I.excerpt=a.description.trim()),a.publisher&&typeof a.publisher.name=="string"&&(I.siteName=a.publisher.name.trim());return}catch(i){this.log(i.message)}}),I||{}},_getArticleMetadata:function(t){var e={},I={},l=this._doc.getElementsByTagName("meta"),n=/\s*(dc|dcterm|og|twitter)\s*:\s*(author|creator|description|title|site_name)\s*/gi,a=/^\s*(?:(dc|dcterm|og|twitter|weibo:(article|webpage))\s*[\.:]\s*)?(author|creator|description|title|site_name)\s*$/i;return this._forEachNode(l,function(c){var r=c.getAttribute("name"),s=c.getAttribute("property"),i=c.getAttribute("content");if(i){var G=null,d=null;s&&(G=s.match(n),G&&(d=G[0].toLowerCase().replace(/\s/g,""),I[d]=i.trim())),!G&&r&&a.test(r)&&(d=r,i&&(d=d.toLowerCase().replace(/\s/g,"").replace(/\./g,":"),I[d]=i.trim()))}}),e.title=t.title||I["dc:title"]||I["dcterm:title"]||I["og:title"]||I["weibo:article:title"]||I["weibo:webpage:title"]||I.title||I["twitter:title"],e.title||(e.title=this._getArticleTitle()),e.byline=t.byline||I["dc:creator"]||I["dcterm:creator"]||I.author,e.excerpt=t.excerpt||I["dc:description"]||I["dcterm:description"]||I["og:description"]||I["weibo:article:description"]||I["weibo:webpage:description"]||I.description||I["twitter:description"],e.siteName=t.siteName||I["og:site_name"],e.title=this._unescapeHtmlEntities(e.title),e.byline=this._unescapeHtmlEntities(e.byline),e.excerpt=this._unescapeHtmlEntities(e.excerpt),e.siteName=this._unescapeHtmlEntities(e.siteName),e},_isSingleImage:function(t){return t.tagName==="IMG"?!0:t.children.length!==1||t.textContent.trim()!==""?!1:this._isSingleImage(t.children[0])},_unwrapNoscriptImages:function(t){var e=Array.from(t.getElementsByTagName("img"));this._forEachNode(e,function(l){for(var n=0;n"u"?!0:e;var I=t.textContent.trim();return e?I.replace(this.REGEXPS.normalize," "):I},_getCharCount:function(t,e){return e=e||",",this._getInnerText(t).split(e).length-1},_cleanStyles:function(t){if(!(!t||t.tagName.toLowerCase()==="svg")){for(var e=0;e0&&n>I)return!1;if(t.parentNode.tagName===e&&(!l||l(t.parentNode)))return!0;t=t.parentNode,n++}return!1},_getRowAndColumnCount:function(t){for(var e=0,I=0,l=t.getElementsByTagName("tr"),n=0;n0){l._readabilityDataTable=!0;continue}var s=["col","colgroup","tfoot","thead","th"],i=function(d){return!!l.getElementsByTagName(d)[0]};if(s.some(i)){this.log("Data table because found data-y descendant"),l._readabilityDataTable=!0;continue}if(l.getElementsByTagName("table")[0]){l._readabilityDataTable=!1;continue}var G=this._getRowAndColumnCount(l);if(G.rows>=10||G.columns>4){l._readabilityDataTable=!0;continue}l._readabilityDataTable=G.rows*G.columns>10}},_fixLazyImages:function(t){this._forEachNode(this._getAllNodesWithTag(t,["img","picture","figure"]),function(e){if(e.src&&this.REGEXPS.b64DataUrl.test(e.src)){var I=this.REGEXPS.b64DataUrl.exec(e.src);if(I[1]==="image/svg+xml")return;for(var l=!1,n=0;nl+=this._getInnerText(a,!0).length),l/I},_cleanConditionally:function(t,e){this._flagIsActive(this.FLAG_CLEAN_CONDITIONALLY)&&this._removeNodes(this._getAllNodesWithTag(t,[e]),function(I){var l=function(v){return v._readabilityDataTable},n=e==="ul"||e==="ol";if(!n){var a=0,c=this._getAllNodesWithTag(I,["ul","ol"]);this._forEachNode(c,v=>a+=this._getInnerText(v).length),n=a/this._getInnerText(I).length>.9}if(e==="table"&&l(I)||this._hasAncestorTag(I,"table",-1,l)||this._hasAncestorTag(I,"code"))return!1;var r=this._getClassWeight(I);this.log("Cleaning Conditionally",I);var s=0;if(r+s<0)return!0;if(this._getCharCount(I,",")<10){for(var i=I.getElementsByTagName("p").length,G=I.getElementsByTagName("img").length,d=I.getElementsByTagName("li").length-100,u=I.getElementsByTagName("input").length,b=this._getTextDensity(I,["h1","h2","h3","h4","h5","h6"]),Z=0,p=this._getAllNodesWithTag(I,["object","embed","iframe"]),W=0;W1&&i/G<.5&&!this._hasAncestorTag(I,"figure")||!n&&d>i||u>Math.floor(i/3)||!n&&b<.9&&V<25&&(G===0||G>2)&&!this._hasAncestorTag(I,"figure")||!n&&r<25&&N>.2||r>=25&&N>.5||Z===1&&V<75||Z>1;if(n&&R){for(var F=0;F1)return R;let v=I.getElementsByTagName("li").length;if(G==v)return!1}return R}return!1})},_cleanMatchedNodes:function(t,e){for(var I=this._getNextNode(t,!0),l=this._getNextNode(t);l&&l!=I;)e.call(this,l,l.className+" "+l.id)?l=this._removeAndGetNext(l):l=this._getNextNode(l)},_cleanHeaders:function(t){let e=this._getAllNodesWithTag(t,["h1","h2"]);this._removeNodes(e,function(I){let l=this._getClassWeight(I)<0;return l&&this.log("Removing header with low class weight:",I),l})},_headerDuplicatesTitle:function(t){if(t.tagName!="H1"&&t.tagName!="H2")return!1;var e=this._getInnerText(t,!1);return this.log("Evaluating similarity of header:",e,this._articleTitle),this._textSimilarity(this._articleTitle,e)>.75},_flagIsActive:function(t){return(this._flags&t)>0},_removeFlag:function(t){this._flags=this._flags&~t},_isProbablyVisible:function(t){return(!t.style||t.style.display!="none")&&!t.hasAttribute("hidden")&&(!t.hasAttribute("aria-hidden")||t.getAttribute("aria-hidden")!="true"||t.className&&t.className.indexOf&&t.className.indexOf("fallback-image")!==-1)},parse:function(){if(this._maxElemsToParse>0){var t=this._doc.getElementsByTagName("*").length;if(t>this._maxElemsToParse)throw new Error("Aborting parsing document; "+t+" elements found")}this._unwrapNoscriptImages(this._doc);var e=this._disableJSONLD?{}:this._getJSONLD(this._doc);this._removeScripts(this._doc),this._prepDocument();var I=this._getArticleMetadata(e);this._articleTitle=I.title;var l=this._grabArticle();if(!l)return null;if(this.log("Grabbed: "+l.innerHTML),this._postProcessContent(l),!I.excerpt){var n=l.getElementsByTagName("p");n.length>0&&(I.excerpt=n[0].textContent.trim())}var a=l.textContent;return{title:this._articleTitle,byline:I.byline||this._articleByline,dir:this._articleDir,lang:this._articleLang,content:this._serializer(l),textContent:a,length:a.length,excerpt:I.excerpt,siteName:I.siteName||this._articleSiteName}}};typeof R5e=="object"&&(R5e.exports=n0t)});var r0t=Y((i7a,A5e)=>{o();var c0t={unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i};function JKI(t){return(!t.style||t.style.display!="none")&&!t.hasAttribute("hidden")&&(!t.hasAttribute("aria-hidden")||t.getAttribute("aria-hidden")!="true"||t.className&&t.className.indexOf&&t.className.indexOf("fallback-image")!==-1)}function CKI(t,e={}){typeof e=="function"&&(e={visibilityChecker:e});var I={minScore:20,minContentLength:140,visibilityChecker:JKI};e=Object.assign(I,e);var l=t.querySelectorAll("p, pre, article"),n=t.querySelectorAll("div > br");if(n.length){var a=new Set(l);[].forEach.call(n,function(r){a.add(r.parentNode)}),l=Array.from(a)}var c=0;return[].some.call(l,function(r){if(!e.visibilityChecker(r))return!1;var s=r.className+" "+r.id;if(c0t.unlikelyCandidates.test(s)&&!c0t.okMaybeItsACandidate.test(s)||r.matches("li p"))return!1;var i=r.textContent.trim().length;return ie.minScore)})}typeof A5e=="object"&&(A5e.exports=CKI)});var o0t=Y((d7a,s0t)=>{o();var LKI=a0t(),kKI=r0t();s0t.exports={Readability:LKI,isProbablyReaderable:kKI}});var F0t=Y(Jl=>{"use strict";o();var HD=Symbol.for("react.element"),UKI=Symbol.for("react.portal"),OKI=Symbol.for("react.fragment"),zKI=Symbol.for("react.strict_mode"),BKI=Symbol.for("react.profiler"),MKI=Symbol.for("react.provider"),SKI=Symbol.for("react.context"),TKI=Symbol.for("react.forward_ref"),_KI=Symbol.for("react.suspense"),KKI=Symbol.for("react.memo"),DKI=Symbol.for("react.lazy"),b0t=Symbol.iterator;function qKI(t){return t===null||typeof t!="object"?null:(t=b0t&&t[b0t]||t["@@iterator"],typeof t=="function"?t:null)}var p0t={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h0t=Object.assign,W0t={};function vj(t,e,I){this.props=t,this.context=e,this.refs=W0t,this.updater=I||p0t}vj.prototype.isReactComponent={};vj.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=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,t,e,"setState")};vj.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function N0t(){}N0t.prototype=vj.prototype;function g5e(t,e,I){this.props=t,this.context=e,this.refs=W0t,this.updater=I||p0t}var v5e=g5e.prototype=new N0t;v5e.constructor=g5e;h0t(v5e,vj.prototype);v5e.isPureReactComponent=!0;var m0t=Array.isArray,V0t=Object.prototype.hasOwnProperty,y5e={current:null},Y0t={key:!0,ref:!0,__self:!0,__source:!0};function R0t(t,e,I){var l,n={},a=null,c=null;if(e!=null)for(l in e.ref!==void 0&&(c=e.ref),e.key!==void 0&&(a=""+e.key),e)V0t.call(e,l)&&!Y0t.hasOwnProperty(l)&&(n[l]=e[l]);var r=arguments.length-2;if(r===1)n.children=I;else if(1{"use strict";o();X0t.exports=F0t()});var H0t=Y((w7a,w0t)=>{o();var IDI="Expected a function",v0t=NaN,lDI="[object Symbol]",nDI=/^\s+|\s+$/g,aDI=/^[-+]0x[0-9a-f]+$/i,cDI=/^0b[01]+$/i,rDI=/^0o[0-7]+$/i,sDI=parseInt,oDI=typeof global=="object"&&global&&global.Object===Object&&global,iDI=typeof self=="object"&&self&&self.Object===Object&&self,GDI=oDI||iDI||Function("return this")(),dDI=Object.prototype,uDI=dDI.toString,bDI=Math.max,mDI=Math.min,f5e=function(){return GDI.Date.now()};function ZDI(t,e,I){var l,n,a,c,r,s,i=0,G=!1,d=!1,u=!0;if(typeof t!="function")throw new TypeError(IDI);e=y0t(e)||0,E5e(I)&&(G=!!I.leading,d="maxWait"in I,a=d?bDI(y0t(I.maxWait)||0,e):a,u="trailing"in I?!!I.trailing:u);function b(v){var y=l,w=n;return l=n=void 0,i=v,c=t.apply(w,y),c}function Z(v){return i=v,r=setTimeout(h,e),G?b(v):c}function p(v){var y=v-s,w=v-i,H=e-y;return d?mDI(H,a-w):H}function W(v){var y=v-s,w=v-i;return s===void 0||y>=e||y<0||d&&w>=a}function h(){var v=f5e();if(W(v))return N(v);r=setTimeout(h,p(v))}function N(v){return r=void 0,u&&l?b(v):(l=n=void 0,c)}function V(){r!==void 0&&clearTimeout(r),i=0,l=s=n=r=void 0}function R(){return r===void 0?c:N(f5e())}function F(){var v=f5e(),y=W(v);if(l=arguments,n=this,s=v,y){if(r===void 0)return Z(s);if(d)return r=setTimeout(h,e),b(s)}return r===void 0&&(r=setTimeout(h,e)),c}return F.cancel=V,F.flush=R,F}function E5e(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function pDI(t){return!!t&&typeof t=="object"}function hDI(t){return typeof t=="symbol"||pDI(t)&&uDI.call(t)==lDI}function y0t(t){if(typeof t=="number")return t;if(hDI(t))return v0t;if(E5e(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=E5e(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(nDI,"");var I=cDI.test(t);return I||rDI.test(t)?sDI(t.slice(2),I?2:8):aDI.test(t)?v0t:+t}w0t.exports=ZDI});var k0t=Y((T7a,L0t)=>{"use strict";o();var NDI="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";L0t.exports=NDI});var O0t=Y((K7a,U0t)=>{"use strict";o();var VDI=k0t();function x0t(){}function j0t(){}j0t.resetWarningCache=x0t;U0t.exports=function(){function t(l,n,a,c,r,s){if(s!==VDI){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}t.isRequired=t;function e(){return t}var I={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:j0t,resetWarningCache:x0t};return I.PropTypes=I,I}});var j5e=Y(($7a,z0t)=>{o();z0t.exports=O0t()();var q7a,P7a});var P0t=Y((X$a,ILe)=>{o();var tLe=function(t){"use strict";var e=Object.prototype,I=e.hasOwnProperty,l=Object.defineProperty||function($,ee,se){$[ee]=se.value},n,a=typeof Symbol=="function"?Symbol:{},c=a.iterator||"@@iterator",r=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function i($,ee,se){return Object.defineProperty($,ee,{value:se,enumerable:!0,configurable:!0,writable:!0}),$[ee]}try{i({},"")}catch{i=function(ee,se,Ae){return ee[se]=Ae}}function G($,ee,se,Ae){var Ve=ee&&ee.prototype instanceof h?ee:h,ct=Object.create(Ve.prototype),Xe=new T(Ae||[]);return l(ct,"_invoke",{value:f($,se,Xe)}),ct}t.wrap=G;function d($,ee,se){try{return{type:"normal",arg:$.call(ee,se)}}catch(Ae){return{type:"throw",arg:Ae}}}var u="suspendedStart",b="suspendedYield",Z="executing",p="completed",W={};function h(){}function N(){}function V(){}var R={};i(R,c,function(){return this});var F=Object.getPrototypeOf,v=F&&F(F(q([])));v&&v!==e&&I.call(v,c)&&(R=v);var y=V.prototype=h.prototype=Object.create(R);N.prototype=V,l(y,"constructor",{value:V,configurable:!0}),l(V,"constructor",{value:N,configurable:!0}),N.displayName=i(V,s,"GeneratorFunction");function w($){["next","throw","return"].forEach(function(ee){i($,ee,function(se){return this._invoke(ee,se)})})}t.isGeneratorFunction=function($){var ee=typeof $=="function"&&$.constructor;return ee?ee===N||(ee.displayName||ee.name)==="GeneratorFunction":!1},t.mark=function($){return Object.setPrototypeOf?Object.setPrototypeOf($,V):($.__proto__=V,i($,s,"GeneratorFunction")),$.prototype=Object.create(y),$},t.awrap=function($){return{__await:$}};function H($,ee){function se(ct,Xe,_t,Pt){var S=d($[ct],$,Xe);if(S.type==="throw")Pt(S.arg);else{var j=S.arg,Ne=j.value;return Ne&&typeof Ne=="object"&&I.call(Ne,"__await")?ee.resolve(Ne.__await).then(function(ce){se("next",ce,_t,Pt)},function(ce){se("throw",ce,_t,Pt)}):ee.resolve(Ne).then(function(ce){j.value=ce,_t(j)},function(ce){return se("throw",ce,_t,Pt)})}}var Ae;function Ve(ct,Xe){function _t(){return new ee(function(Pt,S){se(ct,Xe,Pt,S)})}return Ae=Ae?Ae.then(_t,_t):_t()}l(this,"_invoke",{value:Ve})}w(H.prototype),i(H.prototype,r,function(){return this}),t.AsyncIterator=H,t.async=function($,ee,se,Ae,Ve){Ve===void 0&&(Ve=Promise);var ct=new H(G($,ee,se,Ae),Ve);return t.isGeneratorFunction(ee)?ct:ct.next().then(function(Xe){return Xe.done?Xe.value:ct.next()})};function f($,ee,se){var Ae=u;return function(ct,Xe){if(Ae===Z)throw new Error("Generator is already running");if(Ae===p){if(ct==="throw")throw Xe;return _()}for(se.method=ct,se.arg=Xe;;){var _t=se.delegate;if(_t){var Pt=L(_t,se);if(Pt){if(Pt===W)continue;return Pt}}if(se.method==="next")se.sent=se._sent=se.arg;else if(se.method==="throw"){if(Ae===u)throw Ae=p,se.arg;se.dispatchException(se.arg)}else se.method==="return"&&se.abrupt("return",se.arg);Ae=Z;var S=d($,ee,se);if(S.type==="normal"){if(Ae=se.done?p:b,S.arg===W)continue;return{value:S.arg,done:se.done}}else S.type==="throw"&&(Ae=p,se.method="throw",se.arg=S.arg)}}}function L($,ee){var se=ee.method,Ae=$.iterator[se];if(Ae===n)return ee.delegate=null,se==="throw"&&$.iterator.return&&(ee.method="return",ee.arg=n,L($,ee),ee.method==="throw")||se!=="return"&&(ee.method="throw",ee.arg=new TypeError("The iterator does not provide a '"+se+"' method")),W;var Ve=d(Ae,$.iterator,ee.arg);if(Ve.type==="throw")return ee.method="throw",ee.arg=Ve.arg,ee.delegate=null,W;var ct=Ve.arg;if(!ct)return ee.method="throw",ee.arg=new TypeError("iterator result is not an object"),ee.delegate=null,W;if(ct.done)ee[$.resultName]=ct.value,ee.next=$.nextLoc,ee.method!=="return"&&(ee.method="next",ee.arg=n);else return ct;return ee.delegate=null,W}w(y),i(y,s,"Generator"),i(y,c,function(){return this}),i(y,"toString",function(){return"[object Generator]"});function k($){var ee={tryLoc:$[0]};1 in $&&(ee.catchLoc=$[1]),2 in $&&(ee.finallyLoc=$[2],ee.afterLoc=$[3]),this.tryEntries.push(ee)}function U($){var ee=$.completion||{};ee.type="normal",delete ee.arg,$.completion=ee}function T($){this.tryEntries=[{tryLoc:"root"}],$.forEach(k,this),this.reset(!0)}t.keys=function($){var ee=Object($),se=[];for(var Ae in ee)se.push(Ae);return se.reverse(),function Ve(){for(;se.length;){var ct=se.pop();if(ct in ee)return Ve.value=ct,Ve.done=!1,Ve}return Ve.done=!0,Ve}};function q($){if($){var ee=$[c];if(ee)return ee.call($);if(typeof $.next=="function")return $;if(!isNaN($.length)){var se=-1,Ae=function Ve(){for(;++se<$.length;)if(I.call($,se))return Ve.value=$[se],Ve.done=!1,Ve;return Ve.value=n,Ve.done=!0,Ve};return Ae.next=Ae}}return{next:_}}t.values=q;function _(){return{value:n,done:!0}}return T.prototype={constructor:T,reset:function($){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(U),!$)for(var ee in this)ee.charAt(0)==="t"&&I.call(this,ee)&&!isNaN(+ee.slice(1))&&(this[ee]=n)},stop:function(){this.done=!0;var $=this.tryEntries[0],ee=$.completion;if(ee.type==="throw")throw ee.arg;return this.rval},dispatchException:function($){if(this.done)throw $;var ee=this;function se(Pt,S){return ct.type="throw",ct.arg=$,ee.next=Pt,S&&(ee.method="next",ee.arg=n),!!S}for(var Ae=this.tryEntries.length-1;Ae>=0;--Ae){var Ve=this.tryEntries[Ae],ct=Ve.completion;if(Ve.tryLoc==="root")return se("end");if(Ve.tryLoc<=this.prev){var Xe=I.call(Ve,"catchLoc"),_t=I.call(Ve,"finallyLoc");if(Xe&&_t){if(this.prev=0;--se){var Ae=this.tryEntries[se];if(Ae.tryLoc<=this.prev&&I.call(Ae,"finallyLoc")&&this.prev=0;--ee){var se=this.tryEntries[ee];if(se.finallyLoc===$)return this.complete(se.completion,se.afterLoc),U(se),W}},catch:function($){for(var ee=this.tryEntries.length-1;ee>=0;--ee){var se=this.tryEntries[ee];if(se.tryLoc===$){var Ae=se.completion;if(Ae.type==="throw"){var Ve=Ae.arg;U(se)}return Ve}}throw new Error("illegal catch attempt")},delegateYield:function($,ee,se){return this.delegate={iterator:q($),resultName:ee,nextLoc:se},this.method==="next"&&(this.arg=n),W}},t}(typeof ILe=="object"?ILe.exports:{});try{regeneratorRuntime=tLe}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=tLe:Function("r","regeneratorRuntime = r")(tLe)}});var die=Y((v$a,$0t)=>{o();$0t.exports=(t,e)=>`${t}-${e}-${Math.random().toString(16).slice(3,8)}`});var lLe=Y((w$a,tAt)=>{o();var vDI=die(),eAt=0;tAt.exports=({id:t,action:e,payload:I={}})=>{let l=t;return typeof l>"u"&&(l=vDI("Job",eAt),eAt+=1),{id:l,action:e,payload:I}}});var uie=Y(CD=>{o();var nLe=!1;CD.logging=nLe;CD.setLogging=t=>{nLe=t};CD.log=(...t)=>nLe?console.log.apply(CD,t):null});var aAt=Y((lAt,nAt)=>{o();var yDI=lLe(),{log:bie}=uie(),wDI=die(),IAt=0;nAt.exports=()=>{let t=wDI("Scheduler",IAt),e={},I={},l=[];IAt+=1;let n=()=>l.length,a=()=>Object.keys(e).length,c=()=>{if(l.length!==0){let d=Object.keys(e);for(let u=0;u"u"){l[0](e[d[u]]);break}}},r=(d,u)=>new Promise((b,Z)=>{let p=yDI({action:d,payload:u});l.push(async W=>{l.shift(),I[W.id]=p;try{b(await W[d].apply(lAt,[...u,p.id]))}catch(h){Z(h)}finally{delete I[W.id],c()}}),bie(`[${t}]: Add ${p.id} to JobQueue`),bie(`[${t}]: JobQueue length=${l.length}`),c()});return{addWorker:d=>(e[d.id]=d,bie(`[${t}]: Add ${d.id}`),bie(`[${t}]: Number of workers=${a()}`),c(),d.id),addJob:async(d,...u)=>{if(a()===0)throw Error(`[${t}]: You need to have at least one worker before adding jobs`);return r(d,u)},terminate:async()=>{Object.keys(e).forEach(async d=>{await e[d].terminate()}),l=[]},getQueueLen:n,getNumWorkers:a}}});var rAt=Y((J$a,cAt)=>{o();function HDI(){return!!(typeof window<"u"&&typeof window.process=="object"&&window.process.type==="renderer"||typeof process<"u"&&typeof process.versions=="object"&&process.versions.electron||typeof navigator=="object"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Electron")>=0)}cAt.exports=HDI});var oAt=Y((L$a,sAt)=>{o();var QDI=rAt();sAt.exports=t=>{let e={};return typeof WorkerGlobalScope<"u"?e.type="webworker":QDI()?e.type="electron":typeof document=="object"?e.type="browser":typeof process=="object"&&typeof require=="function"&&(e.type="node"),typeof t>"u"?e:e[t]}});var GAt=Y((x$a,iAt)=>{o();var fDI=oAt()("type")==="browser",EDI=fDI?t=>new URL(t,window.location.href).href:t=>t;iAt.exports=t=>{let e={...t};return["corePath","workerPath","langPath"].forEach(I=>{t[I]&&(e[I]=EDI(e[I]))}),e}});var uAt=Y((U$a,dAt)=>{o();dAt.exports=t=>{let e=[],I=[],l=[],n=[],a=[];return t.blocks&&t.blocks.forEach(c=>{c.paragraphs.forEach(r=>{r.lines.forEach(s=>{s.words.forEach(i=>{i.symbols.forEach(G=>{a.push({...G,page:t,block:c,paragraph:r,line:s,word:i})}),n.push({...i,page:t,block:c,paragraph:r,line:s})}),l.push({...s,page:t,block:c,paragraph:r})}),I.push({...r,page:t,block:c})}),e.push({...c,page:t})}),{...t,blocks:e,paragraphs:I,lines:l,words:n,symbols:a}}});var aLe=Y((z$a,bAt)=>{o();bAt.exports={TESSERACT_ONLY:0,LSTM_ONLY:1,TESSERACT_LSTM_COMBINED:2,DEFAULT:3}});var ZAt=Y((M$a,mAt)=>{o();var JDI=aLe();mAt.exports={defaultOEM:JDI.DEFAULT}});var pAt=Y((T$a,CDI)=>{CDI.exports={name:"tesseract.js",version:"4.1.4",description:"Pure Javascript Multilingual OCR",main:"src/index.js",types:"src/index.d.ts",unpkg:"dist/tesseract.min.js",jsdelivr:"dist/tesseract.min.js",scripts:{start:"node scripts/server.js",build:"rimraf dist && webpack --config scripts/webpack.config.prod.js && rollup -c scripts/rollup.esm.mjs","profile:tesseract":"webpack-bundle-analyzer dist/tesseract-stats.json","profile:worker":"webpack-bundle-analyzer dist/worker-stats.json",prepublishOnly:"npm run build",wait:"rimraf dist && wait-on http://localhost:3000/dist/tesseract.dev.js",test:"npm-run-all -p -r start test:all","test:all":"npm-run-all wait test:browser:* test:node:all","test:node":"nyc mocha --exit --bail --require ./scripts/test-helper.js","test:node:all":"npm run test:node -- ./tests/*.test.js","test:browser-tpl":"mocha-headless-chrome -a incognito -a no-sandbox -a disable-setuid-sandbox -a disable-logging -t 300000","test:browser:detect":"npm run test:browser-tpl -- -f ./tests/detect.test.html","test:browser:recognize":"npm run test:browser-tpl -- -f ./tests/recognize.test.html","test:browser:scheduler":"npm run test:browser-tpl -- -f ./tests/scheduler.test.html","test:browser:FS":"npm run test:browser-tpl -- -f ./tests/FS.test.html",lint:"eslint src","lint:fix":"eslint --fix src",postinstall:"opencollective-postinstall || true"},browser:{"./src/worker/node/index.js":"./src/worker/browser/index.js"},author:"",contributors:["jeromewu"],license:"Apache-2.0",devDependencies:{"@babel/core":"^7.21.4","@babel/eslint-parser":"^7.21.3","@babel/preset-env":"^7.21.4","@rollup/plugin-commonjs":"^24.1.0",acorn:"^8.8.2","babel-loader":"^9.1.2",buffer:"^6.0.3",cors:"^2.8.5",eslint:"^7.32.0","eslint-config-airbnb-base":"^14.2.1","eslint-plugin-import":"^2.27.5","expect.js":"^0.3.1",express:"^4.18.2",mocha:"^10.2.0","mocha-headless-chrome":"^4.0.0","npm-run-all":"^4.1.5",nyc:"^15.1.0",rimraf:"^5.0.0",rollup:"^3.20.7","wait-on":"^7.0.1",webpack:"^5.79.0","webpack-bundle-analyzer":"^4.8.0","webpack-cli":"^5.0.1","webpack-dev-middleware":"^6.0.2","rollup-plugin-sourcemaps":"^0.6.3"},dependencies:{"bmp-js":"^0.1.0","idb-keyval":"^6.2.0","is-electron":"^2.2.2","is-url":"^1.2.4","node-fetch":"^2.6.9","opencollective-postinstall":"^2.0.3","regenerator-runtime":"^0.13.3","tesseract.js-core":"^4.0.4","wasm-feature-detect":"^1.2.11",zlibjs:"^0.3.1"},overrides:{"@rollup/pluginutils":"^5.0.2"},repository:{type:"git",url:"https://github.com/naptha/tesseract.js.git"},bugs:{url:"https://github.com/naptha/tesseract.js/issues"},homepage:"https://github.com/naptha/tesseract.js",collective:{type:"opencollective",url:"https://opencollective.com/tesseractjs"}}});var WAt=Y((_$a,hAt)=>{o();hAt.exports={langPath:"https://tessdata.projectnaptha.com/4.0.0",workerBlobURL:!0,logger:()=>{}}});var VAt=Y((D$a,NAt)=>{o();var LDI=t=>new URL(t,window.location.href).href,{version:kDI}=pAt(),xDI=WAt();NAt.exports={...xDI,workerPath:typeof process<"u"&&process.env.TESS_ENV==="development"?LDI(`/dist/worker.dev.js?nocache=${Math.random().toString(36).slice(3)}`):`https://cdn.jsdelivr.net/npm/tesseract.js@v${kDI}/dist/worker.min.js`,corePath:null}});var RAt=Y((P$a,YAt)=>{o();YAt.exports=({workerPath:t,workerBlobURL:e})=>{let I;if(Blob&&URL&&e){let l=new Blob([`importScripts("${t}");`],{type:"application/javascript"});I=new Worker(URL.createObjectURL(l))}else I=new Worker(t);return I}});var FAt=Y((eec,AAt)=>{o();AAt.exports=t=>{t.terminate()}});var gAt=Y((Iec,XAt)=>{o();XAt.exports=(t,e)=>{t.onmessage=({data:I})=>{e(I)}}});var yAt=Y((nec,vAt)=>{o();vAt.exports=async(t,e)=>{t.postMessage(e)}});var HAt=Y((cec,wAt)=>{o();var cLe=t=>new Promise((e,I)=>{let l=new FileReader;l.onload=()=>{e(l.result)},l.onerror=({target:{error:{code:n}}})=>{I(Error(`File could not be read! Code=${n}`))},l.readAsArrayBuffer(t)}),rLe=async t=>{let e=t;if(typeof t>"u")return"undefined";if(typeof t=="string")/data:image\/([a-zA-Z]*);base64,([^"]*)/.test(t)?e=atob(t.split(",")[1]).split("").map(I=>I.charCodeAt(0)):e=await(await fetch(t)).arrayBuffer();else if(typeof HTMLElement<"u"&&t instanceof HTMLElement)t.tagName==="IMG"&&(e=await rLe(t.src)),t.tagName==="VIDEO"&&(e=await rLe(t.poster)),t.tagName==="CANVAS"&&await new Promise(I=>{t.toBlob(async l=>{e=await cLe(l),I()})});else if(typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas){let I=await t.convertToBlob();e=await cLe(I)}else(t instanceof File||t instanceof Blob)&&(e=await cLe(t));return new Uint8Array(e)};wAt.exports=rLe});var fAt=Y((sec,QAt)=>{o();var jDI=VAt(),UDI=RAt(),ODI=FAt(),zDI=gAt(),BDI=yAt(),MDI=HAt();QAt.exports={defaultOptions:jDI,spawnWorker:UDI,terminateWorker:ODI,onMessage:zDI,send:BDI,loadImage:MDI}});var sLe=Y((iec,LAt)=>{o();var SDI=GAt(),TDI=uAt(),W0=lLe(),{log:EAt}=uie(),_DI=die(),{defaultOEM:KDI}=ZAt(),{defaultOptions:DDI,spawnWorker:qDI,terminateWorker:PDI,onMessage:$DI,loadImage:JAt,send:e6I}=fAt(),CAt=0;LAt.exports=async(t={})=>{let e=_DI("Worker",CAt),{logger:I,errorHandler:l,...n}=SDI({...DDI,...t}),a={},c={},r,s,i=new Promise((U,T)=>{s=U,r=T}),G=U=>{r(U.message)},d=qDI(n);d.onerror=G,CAt+=1;let u=(U,T)=>{a[U]=T},b=(U,T)=>{c[U]=T},Z=({id:U,action:T,payload:q})=>new Promise((_,$)=>{EAt(`[${e}]: Start ${U}, action=${T}`),u(T,_),b(T,$),e6I(d,{workerId:e,jobId:U,action:T,payload:q})}),p=()=>console.warn("`load` is depreciated and should be removed from code (workers now come pre-loaded)"),W=U=>Z(W0({id:U,action:"load",payload:{options:n}})),h=(U,T,q)=>Z(W0({id:q,action:"FS",payload:{method:"writeFile",args:[U,T]}})),N=(U,T)=>Z(W0({id:T,action:"FS",payload:{method:"readFile",args:[U,{encoding:"utf8"}]}})),V=(U,T)=>Z(W0({id:T,action:"FS",payload:{method:"unlink",args:[U]}})),R=(U,T,q)=>Z(W0({id:q,action:"FS",payload:{method:U,args:T}})),F=(U="eng",T)=>Z(W0({id:T,action:"loadLanguage",payload:{langs:U,options:n}})),v=(U="eng",T=KDI,q,_)=>Z(W0({id:_,action:"initialize",payload:{langs:U,oem:T,config:q}})),y=(U={},T)=>Z(W0({id:T,action:"setParameters",payload:{params:U}})),w=async(U,T={},q={blocks:!0,text:!0,hocr:!0,tsv:!0},_)=>Z(W0({id:_,action:"recognize",payload:{image:await JAt(U),options:T,output:q}})),H=(U="Tesseract OCR Result",T=!1,q)=>(console.log("`getPDF` function is depreciated. `recognize` option `savePDF` should be used instead."),Z(W0({id:q,action:"getPDF",payload:{title:U,textonly:T}}))),f=async(U,T)=>Z(W0({id:T,action:"detect",payload:{image:await JAt(U)}})),L=async()=>(d!==null&&(PDI(d),d=null),Promise.resolve());$DI(d,({workerId:U,jobId:T,status:q,action:_,data:$})=>{if(q==="resolve"){EAt(`[${U}]: Complete ${T}`);let ee=$;_==="recognize"?ee=TDI($):_==="getPDF"&&(ee=Array.from({...$,length:Object.keys($).length})),a[_]({jobId:T,data:ee})}else if(q==="reject")if(c[_]($),_==="load"&&r($),l)l($);else throw Error($);else q==="progress"&&I({...$,userJobId:T})});let k={id:e,worker:d,setResolve:u,setReject:b,load:p,writeText:h,readText:N,removeFile:V,FS:R,loadLanguage:F,initialize:v,setParameters:y,recognize:w,getPDF:H,detect:f,terminate:L};return W().then(()=>s(k)).catch(()=>{}),i}});var jAt=Y((dec,xAt)=>{o();var kAt=sLe(),t6I=async(t,e,I)=>{let l=await kAt(I);return await l.loadLanguage(e),await l.initialize(e),l.recognize(t).finally(async()=>{await l.terminate()})},I6I=async(t,e)=>{let I=await kAt(e);return await I.loadLanguage("osd"),await I.initialize("osd"),I.detect(t).finally(async()=>{await I.terminate()})};xAt.exports={recognize:t6I,detect:I6I}});var OAt=Y((bec,UAt)=>{o();UAt.exports={AFR:"afr",AMH:"amh",ARA:"ara",ASM:"asm",AZE:"aze",AZE_CYRL:"aze_cyrl",BEL:"bel",BEN:"ben",BOD:"bod",BOS:"bos",BUL:"bul",CAT:"cat",CEB:"ceb",CES:"ces",CHI_SIM:"chi_sim",CHI_TRA:"chi_tra",CHR:"chr",CYM:"cym",DAN:"dan",DEU:"deu",DZO:"dzo",ELL:"ell",ENG:"eng",ENM:"enm",EPO:"epo",EST:"est",EUS:"eus",FAS:"fas",FIN:"fin",FRA:"fra",FRK:"frk",FRM:"frm",GLE:"gle",GLG:"glg",GRC:"grc",GUJ:"guj",HAT:"hat",HEB:"heb",HIN:"hin",HRV:"hrv",HUN:"hun",IKU:"iku",IND:"ind",ISL:"isl",ITA:"ita",ITA_OLD:"ita_old",JAV:"jav",JPN:"jpn",KAN:"kan",KAT:"kat",KAT_OLD:"kat_old",KAZ:"kaz",KHM:"khm",KIR:"kir",KOR:"kor",KUR:"kur",LAO:"lao",LAT:"lat",LAV:"lav",LIT:"lit",MAL:"mal",MAR:"mar",MKD:"mkd",MLT:"mlt",MSA:"msa",MYA:"mya",NEP:"nep",NLD:"nld",NOR:"nor",ORI:"ori",PAN:"pan",POL:"pol",POR:"por",PUS:"pus",RON:"ron",RUS:"rus",SAN:"san",SIN:"sin",SLK:"slk",SLV:"slv",SPA:"spa",SPA_OLD:"spa_old",SQI:"sqi",SRP:"srp",SRP_LATN:"srp_latn",SWA:"swa",SWE:"swe",SYR:"syr",TAM:"tam",TEL:"tel",TGK:"tgk",TGL:"tgl",THA:"tha",TIR:"tir",TUR:"tur",UIG:"uig",UKR:"ukr",URD:"urd",UZB:"uzb",UZB_CYRL:"uzb_cyrl",VIE:"vie",YID:"yid"}});var BAt=Y((Zec,zAt)=>{o();zAt.exports={OSD_ONLY:"0",AUTO_OSD:"1",AUTO_ONLY:"2",AUTO:"3",SINGLE_COLUMN:"4",SINGLE_BLOCK_VERT_TEXT:"5",SINGLE_BLOCK:"6",SINGLE_LINE:"7",SINGLE_WORD:"8",CIRCLE_WORD:"9",SINGLE_CHAR:"10",SPARSE_TEXT:"11",SPARSE_TEXT_OSD:"12",RAW_LINE:"13"}});var oLe=Y((hec,MAt)=>{o();P0t();var l6I=aAt(),n6I=sLe(),a6I=jAt(),c6I=OAt(),r6I=aLe(),s6I=BAt(),{setLogging:o6I}=uie();MAt.exports={languages:c6I,OEM:r6I,PSM:s6I,createScheduler:l6I,createWorker:n6I,setLogging:o6I,...a6I}});var Zie=Y(iLe=>{o();(function(){iLe.defaults={"0.1":{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},"0.2":{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:` +`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(iLe)});var gF=Y((DAt,RQ)=>{o();(function(){var t,e,I,l,n,a,c,r=[].slice,s={}.hasOwnProperty;t=function(){var i,G,d,u,b,Z;if(Z=arguments[0],b=2<=arguments.length?r.call(arguments,1):[],n(Object.assign))Object.assign.apply(null,arguments);else for(i=0,d=b.length;i{o();(function(){var t;PAt.exports=t=function(){function e(){}return e.prototype.hasFeature=function(I,l){return!0},e.prototype.createDocumentType=function(I,l,n){throw new Error("This DOM method is not implemented.")},e.prototype.createDocument=function(I,l,n){throw new Error("This DOM method is not implemented.")},e.prototype.createHTMLDocument=function(I){throw new Error("This DOM method is not implemented.")},e.prototype.getFeature=function(I,l){throw new Error("This DOM method is not implemented.")},e}()}).call(qAt)});var tFt=Y(($At,eFt)=>{o();(function(){var t;eFt.exports=t=function(){function e(){}return e.prototype.handleError=function(I){throw new Error(I)},e}()}).call($At)});var nFt=Y((IFt,lFt)=>{o();(function(){var t;lFt.exports=t=function(){function e(I){this.arr=I||[]}return Object.defineProperty(e.prototype,"length",{get:function(){return this.arr.length}}),e.prototype.item=function(I){return this.arr[I]||null},e.prototype.contains=function(I){return this.arr.indexOf(I)!==-1},e}()}).call(IFt)});var rFt=Y((aFt,cFt)=>{o();(function(){var t,e,I;e=tFt(),I=nFt(),cFt.exports=t=function(){function l(){var n;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new e,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=n=Object.create(this.defaultParams)}return Object.defineProperty(l.prototype,"parameterNames",{get:function(){return new I(Object.keys(this.defaultParams))}}),l.prototype.getParameter=function(n){return this.params.hasOwnProperty(n)?this.params[n]:null},l.prototype.canSetParameter=function(n,a){return!0},l.prototype.setParameter=function(n,a){return a!=null?this.params[n]=a:delete this.params[n]},l}()}).call(aFt)});var Is=Y((sFt,oFt)=>{o();(function(){oFt.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(sFt)});var dLe=Y((iFt,GFt)=>{o();(function(){var t,e,I;t=Is(),I=ZZ(),GFt.exports=e=function(){function l(n,a,c){if(this.parent=n,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),a==null)throw new Error("Missing attribute name. "+this.debugInfo(a));this.name=this.stringify.name(a),this.value=this.stringify.attValue(c),this.type=t.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(l.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(l.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(l.prototype,"textContent",{get:function(){return this.value},set:function(n){return this.value=n||""}}),Object.defineProperty(l.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(l.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(l.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(l.prototype,"specified",{get:function(){return!0}}),l.prototype.clone=function(){return Object.create(this)},l.prototype.toString=function(n){return this.options.writer.attribute(this,this.options.writer.filterOptions(n))},l.prototype.debugInfo=function(n){return n=n||this.name,n==null?"parent: <"+this.parent.name+">":"attribute: {"+n+"}, parent: <"+this.parent.name+">"},l.prototype.isEqualNode=function(n){return!(n.namespaceURI!==this.namespaceURI||n.prefix!==this.prefix||n.localName!==this.localName||n.value!==this.value)},l}()}).call(iFt)});var pie=Y((dFt,uFt)=>{o();(function(){var t;uFt.exports=t=function(){function e(I){this.nodes=I}return Object.defineProperty(e.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}}),e.prototype.clone=function(){return this.nodes=null},e.prototype.getNamedItem=function(I){return this.nodes[I]},e.prototype.setNamedItem=function(I){var l;return l=this.nodes[I.nodeName],this.nodes[I.nodeName]=I,l||null},e.prototype.removeNamedItem=function(I){var l;return l=this.nodes[I],delete this.nodes[I],l||null},e.prototype.item=function(I){return this.nodes[Object.keys(this.nodes)[I]]||null},e.prototype.getNamedItemNS=function(I,l){throw new Error("This DOM method is not implemented.")},e.prototype.setNamedItemNS=function(I){throw new Error("This DOM method is not implemented.")},e.prototype.removeNamedItemNS=function(I,l){throw new Error("This DOM method is not implemented.")},e}()}).call(dFt)});var hie=Y((bFt,mFt)=>{o();(function(){var t,e,I,l,n,a,c,r,s,i=function(d,u){for(var b in u)G.call(u,b)&&(d[b]=u[b]);function Z(){this.constructor=d}return Z.prototype=u.prototype,d.prototype=new Z,d.__super__=u.prototype,d},G={}.hasOwnProperty;s=gF(),r=s.isObject,c=s.isFunction,a=s.getValue,n=ZZ(),t=Is(),e=dLe(),l=pie(),mFt.exports=I=function(d){i(u,d);function u(b,Z,p){var W,h,N,V;if(u.__super__.constructor.call(this,b),Z==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(Z),this.type=t.Element,this.attribs={},this.schemaTypeInfo=null,p!=null&&this.attribute(p),b.type===t.Document&&(this.isRoot=!0,this.documentObject=b,b.rootObject=this,b.children)){for(V=b.children,h=0,N=V.length;h=W;Z=0<=W?++p:--p)if(!this.attribs[Z].isEqualNode(b.attribs[Z]))return!1;return!0},u}(n)}).call(bFt)});var xD=Y((ZFt,pFt)=>{o();(function(){var t,e,I=function(n,a){for(var c in a)l.call(a,c)&&(n[c]=a[c]);function r(){this.constructor=n}return r.prototype=a.prototype,n.prototype=new r,n.__super__=a.prototype,n},l={}.hasOwnProperty;e=ZZ(),pFt.exports=t=function(n){I(a,n);function a(c){a.__super__.constructor.call(this,c),this.value=""}return Object.defineProperty(a.prototype,"data",{get:function(){return this.value},set:function(c){return this.value=c||""}}),Object.defineProperty(a.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(a.prototype,"textContent",{get:function(){return this.value},set:function(c){return this.value=c||""}}),a.prototype.clone=function(){return Object.create(this)},a.prototype.substringData=function(c,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},a.prototype.appendData=function(c){throw new Error("This DOM method is not implemented."+this.debugInfo())},a.prototype.insertData=function(c,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},a.prototype.deleteData=function(c,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},a.prototype.replaceData=function(c,r,s){throw new Error("This DOM method is not implemented."+this.debugInfo())},a.prototype.isEqualNode=function(c){return!(!a.__super__.isEqualNode.apply(this,arguments).isEqualNode(c)||c.data!==this.data)},a}(e)}).call(ZFt)});var Wie=Y((hFt,WFt)=>{o();(function(){var t,e,I,l=function(a,c){for(var r in c)n.call(c,r)&&(a[r]=c[r]);function s(){this.constructor=a}return s.prototype=c.prototype,a.prototype=new s,a.__super__=c.prototype,a},n={}.hasOwnProperty;t=Is(),I=xD(),WFt.exports=e=function(a){l(c,a);function c(r,s){if(c.__super__.constructor.call(this,r),s==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=t.CData,this.value=this.stringify.cdata(s)}return c.prototype.clone=function(){return Object.create(this)},c.prototype.toString=function(r){return this.options.writer.cdata(this,this.options.writer.filterOptions(r))},c}(I)}).call(hFt)});var Nie=Y((NFt,VFt)=>{o();(function(){var t,e,I,l=function(a,c){for(var r in c)n.call(c,r)&&(a[r]=c[r]);function s(){this.constructor=a}return s.prototype=c.prototype,a.prototype=new s,a.__super__=c.prototype,a},n={}.hasOwnProperty;t=Is(),e=xD(),VFt.exports=I=function(a){l(c,a);function c(r,s){if(c.__super__.constructor.call(this,r),s==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=t.Comment,this.value=this.stringify.comment(s)}return c.prototype.clone=function(){return Object.create(this)},c.prototype.toString=function(r){return this.options.writer.comment(this,this.options.writer.filterOptions(r))},c}(e)}).call(NFt)});var Vie=Y((YFt,RFt)=>{o();(function(){var t,e,I,l,n=function(c,r){for(var s in r)a.call(r,s)&&(c[s]=r[s]);function i(){this.constructor=c}return i.prototype=r.prototype,c.prototype=new i,c.__super__=r.prototype,c},a={}.hasOwnProperty;l=gF().isObject,I=ZZ(),t=Is(),RFt.exports=e=function(c){n(r,c);function r(s,i,G,d){var u;r.__super__.constructor.call(this,s),l(i)&&(u=i,i=u.version,G=u.encoding,d=u.standalone),i||(i="1.0"),this.type=t.Declaration,this.version=this.stringify.xmlVersion(i),G!=null&&(this.encoding=this.stringify.xmlEncoding(G)),d!=null&&(this.standalone=this.stringify.xmlStandalone(d))}return r.prototype.toString=function(s){return this.options.writer.declaration(this,this.options.writer.filterOptions(s))},r}(I)}).call(YFt)});var Yie=Y((AFt,FFt)=>{o();(function(){var t,e,I,l=function(a,c){for(var r in c)n.call(c,r)&&(a[r]=c[r]);function s(){this.constructor=a}return s.prototype=c.prototype,a.prototype=new s,a.__super__=c.prototype,a},n={}.hasOwnProperty;I=ZZ(),t=Is(),FFt.exports=e=function(a){l(c,a);function c(r,s,i,G,d,u){if(c.__super__.constructor.call(this,r),s==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(i==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(s));if(!G)throw new Error("Missing DTD attribute type. "+this.debugInfo(s));if(!d)throw new Error("Missing DTD attribute default. "+this.debugInfo(s));if(d.indexOf("#")!==0&&(d="#"+d),!d.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(s));if(u&&!d.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(s));this.elementName=this.stringify.name(s),this.type=t.AttributeDeclaration,this.attributeName=this.stringify.name(i),this.attributeType=this.stringify.dtdAttType(G),u&&(this.defaultValue=this.stringify.dtdAttDefault(u)),this.defaultValueType=d}return c.prototype.toString=function(r){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(r))},c}(I)}).call(AFt)});var Rie=Y((XFt,gFt)=>{o();(function(){var t,e,I,l,n=function(c,r){for(var s in r)a.call(r,s)&&(c[s]=r[s]);function i(){this.constructor=c}return i.prototype=r.prototype,c.prototype=new i,c.__super__=r.prototype,c},a={}.hasOwnProperty;l=gF().isObject,I=ZZ(),t=Is(),gFt.exports=e=function(c){n(r,c);function r(s,i,G,d){if(r.__super__.constructor.call(this,s),G==null)throw new Error("Missing DTD entity name. "+this.debugInfo(G));if(d==null)throw new Error("Missing DTD entity value. "+this.debugInfo(G));if(this.pe=!!i,this.name=this.stringify.name(G),this.type=t.EntityDeclaration,!l(d))this.value=this.stringify.dtdEntityValue(d),this.internal=!0;else{if(!d.pubID&&!d.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(G));if(d.pubID&&!d.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(G));if(this.internal=!1,d.pubID!=null&&(this.pubID=this.stringify.dtdPubID(d.pubID)),d.sysID!=null&&(this.sysID=this.stringify.dtdSysID(d.sysID)),d.nData!=null&&(this.nData=this.stringify.dtdNData(d.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(G))}}return Object.defineProperty(r.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(r.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(r.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(r.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(r.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(r.prototype,"xmlVersion",{get:function(){return null}}),r.prototype.toString=function(s){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(s))},r}(I)}).call(XFt)});var Aie=Y((vFt,yFt)=>{o();(function(){var t,e,I,l=function(a,c){for(var r in c)n.call(c,r)&&(a[r]=c[r]);function s(){this.constructor=a}return s.prototype=c.prototype,a.prototype=new s,a.__super__=c.prototype,a},n={}.hasOwnProperty;I=ZZ(),t=Is(),yFt.exports=e=function(a){l(c,a);function c(r,s,i){if(c.__super__.constructor.call(this,r),s==null)throw new Error("Missing DTD element name. "+this.debugInfo());i||(i="(#PCDATA)"),Array.isArray(i)&&(i="("+i.join(",")+")"),this.name=this.stringify.name(s),this.type=t.ElementDeclaration,this.value=this.stringify.dtdElementValue(i)}return c.prototype.toString=function(r){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(r))},c}(I)}).call(vFt)});var Fie=Y((wFt,HFt)=>{o();(function(){var t,e,I,l=function(a,c){for(var r in c)n.call(c,r)&&(a[r]=c[r]);function s(){this.constructor=a}return s.prototype=c.prototype,a.prototype=new s,a.__super__=c.prototype,a},n={}.hasOwnProperty;I=ZZ(),t=Is(),HFt.exports=e=function(a){l(c,a);function c(r,s,i){if(c.__super__.constructor.call(this,r),s==null)throw new Error("Missing DTD notation name. "+this.debugInfo(s));if(!i.pubID&&!i.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(s));this.name=this.stringify.name(s),this.type=t.NotationDeclaration,i.pubID!=null&&(this.pubID=this.stringify.dtdPubID(i.pubID)),i.sysID!=null&&(this.sysID=this.stringify.dtdSysID(i.sysID))}return Object.defineProperty(c.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(c.prototype,"systemId",{get:function(){return this.sysID}}),c.prototype.toString=function(r){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(r))},c}(I)}).call(wFt)});var Xie=Y((QFt,fFt)=>{o();(function(){var t,e,I,l,n,a,c,r,s,i=function(d,u){for(var b in u)G.call(u,b)&&(d[b]=u[b]);function Z(){this.constructor=d}return Z.prototype=u.prototype,d.prototype=new Z,d.__super__=u.prototype,d},G={}.hasOwnProperty;s=gF().isObject,r=ZZ(),t=Is(),e=Yie(),l=Rie(),I=Aie(),n=Fie(),c=pie(),fFt.exports=a=function(d){i(u,d);function u(b,Z,p){var W,h,N,V,R,F;if(u.__super__.constructor.call(this,b),this.type=t.DocType,b.children){for(V=b.children,h=0,N=V.length;h{o();(function(){var t,e,I,l=function(a,c){for(var r in c)n.call(c,r)&&(a[r]=c[r]);function s(){this.constructor=a}return s.prototype=c.prototype,a.prototype=new s,a.__super__=c.prototype,a},n={}.hasOwnProperty;t=Is(),e=ZZ(),JFt.exports=I=function(a){l(c,a);function c(r,s){if(c.__super__.constructor.call(this,r),s==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=t.Raw,this.value=this.stringify.raw(s)}return c.prototype.clone=function(){return Object.create(this)},c.prototype.toString=function(r){return this.options.writer.raw(this,this.options.writer.filterOptions(r))},c}(e)}).call(EFt)});var vie=Y((CFt,LFt)=>{o();(function(){var t,e,I,l=function(a,c){for(var r in c)n.call(c,r)&&(a[r]=c[r]);function s(){this.constructor=a}return s.prototype=c.prototype,a.prototype=new s,a.__super__=c.prototype,a},n={}.hasOwnProperty;t=Is(),e=xD(),LFt.exports=I=function(a){l(c,a);function c(r,s){if(c.__super__.constructor.call(this,r),s==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=t.Text,this.value=this.stringify.text(s)}return Object.defineProperty(c.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(c.prototype,"wholeText",{get:function(){var r,s,i;for(i="",s=this.previousSibling;s;)i=s.data+i,s=s.previousSibling;for(i+=this.data,r=this.nextSibling;r;)i=i+r.data,r=r.nextSibling;return i}}),c.prototype.clone=function(){return Object.create(this)},c.prototype.toString=function(r){return this.options.writer.text(this,this.options.writer.filterOptions(r))},c.prototype.splitText=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.replaceWholeText=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},c}(e)}).call(CFt)});var yie=Y((kFt,xFt)=>{o();(function(){var t,e,I,l=function(a,c){for(var r in c)n.call(c,r)&&(a[r]=c[r]);function s(){this.constructor=a}return s.prototype=c.prototype,a.prototype=new s,a.__super__=c.prototype,a},n={}.hasOwnProperty;t=Is(),e=xD(),xFt.exports=I=function(a){l(c,a);function c(r,s,i){if(c.__super__.constructor.call(this,r),s==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=t.ProcessingInstruction,this.target=this.stringify.insTarget(s),this.name=this.target,i&&(this.value=this.stringify.insValue(i))}return c.prototype.clone=function(){return Object.create(this)},c.prototype.toString=function(r){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(r))},c.prototype.isEqualNode=function(r){return!(!c.__super__.isEqualNode.apply(this,arguments).isEqualNode(r)||r.target!==this.target)},c}(e)}).call(kFt)});var uLe=Y((jFt,UFt)=>{o();(function(){var t,e,I,l=function(a,c){for(var r in c)n.call(c,r)&&(a[r]=c[r]);function s(){this.constructor=a}return s.prototype=c.prototype,a.prototype=new s,a.__super__=c.prototype,a},n={}.hasOwnProperty;I=ZZ(),t=Is(),UFt.exports=e=function(a){l(c,a);function c(r){c.__super__.constructor.call(this,r),this.type=t.Dummy}return c.prototype.clone=function(){return Object.create(this)},c.prototype.toString=function(r){return""},c}(I)}).call(jFt)});var BFt=Y((OFt,zFt)=>{o();(function(){var t;zFt.exports=t=function(){function e(I){this.nodes=I}return Object.defineProperty(e.prototype,"length",{get:function(){return this.nodes.length||0}}),e.prototype.clone=function(){return this.nodes=null},e.prototype.item=function(I){return this.nodes[I]||null},e}()}).call(OFt)});var TFt=Y((MFt,SFt)=>{o();(function(){SFt.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(MFt)});var ZZ=Y((_Ft,KFt)=>{o();(function(){var t,e,I,l,n,a,c,r,s,i,G,d,u,b,Z,p,W,h,N,V={}.hasOwnProperty;N=gF(),h=N.isObject,W=N.isFunction,p=N.isEmpty,Z=N.getValue,r=null,I=null,l=null,n=null,a=null,u=null,b=null,d=null,c=null,e=null,G=null,s=null,t=null,KFt.exports=i=function(){function R(F){this.parent=F,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,r||(r=hie(),I=Wie(),l=Nie(),n=Vie(),a=Xie(),u=gie(),b=vie(),d=yie(),c=uLe(),e=Is(),G=BFt(),s=pie(),t=TFt())}return Object.defineProperty(R.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(R.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(R.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(R.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(R.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new G(this.children)),this.childNodeList}}),Object.defineProperty(R.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(R.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(R.prototype,"previousSibling",{get:function(){var F;return F=this.parent.children.indexOf(this),this.parent.children[F-1]||null}}),Object.defineProperty(R.prototype,"nextSibling",{get:function(){var F;return F=this.parent.children.indexOf(this),this.parent.children[F+1]||null}}),Object.defineProperty(R.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(R.prototype,"textContent",{get:function(){var F,v,y,w,H;if(this.nodeType===e.Element||this.nodeType===e.DocumentFragment){for(H="",w=this.children,v=0,y=w.length;v":(y=this.parent)!=null&&y.name?"node: <"+F+">, parent: <"+this.parent.name+">":"node: <"+F+">"},R.prototype.ele=function(F,v,y){return this.element(F,v,y)},R.prototype.nod=function(F,v,y){return this.node(F,v,y)},R.prototype.txt=function(F){return this.text(F)},R.prototype.dat=function(F){return this.cdata(F)},R.prototype.com=function(F){return this.comment(F)},R.prototype.ins=function(F,v){return this.instruction(F,v)},R.prototype.doc=function(){return this.document()},R.prototype.dec=function(F,v,y){return this.declaration(F,v,y)},R.prototype.e=function(F,v,y){return this.element(F,v,y)},R.prototype.n=function(F,v,y){return this.node(F,v,y)},R.prototype.t=function(F){return this.text(F)},R.prototype.d=function(F){return this.cdata(F)},R.prototype.c=function(F){return this.comment(F)},R.prototype.r=function(F){return this.raw(F)},R.prototype.i=function(F,v){return this.instruction(F,v)},R.prototype.u=function(){return this.up()},R.prototype.importXMLBuilder=function(F){return this.importDocument(F)},R.prototype.replaceChild=function(F,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},R.prototype.removeChild=function(F){throw new Error("This DOM method is not implemented."+this.debugInfo())},R.prototype.appendChild=function(F){throw new Error("This DOM method is not implemented."+this.debugInfo())},R.prototype.hasChildNodes=function(){return this.children.length!==0},R.prototype.cloneNode=function(F){throw new Error("This DOM method is not implemented."+this.debugInfo())},R.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},R.prototype.isSupported=function(F,v){return!0},R.prototype.hasAttributes=function(){return this.attribs.length!==0},R.prototype.compareDocumentPosition=function(F){var v,y;return v=this,v===F?0:this.document()!==F.document()?(y=t.Disconnected|t.ImplementationSpecific,Math.random()<.5?y|=t.Preceding:y|=t.Following,y):v.isAncestor(F)?t.Contains|t.Preceding:v.isDescendant(F)?t.Contains|t.Following:v.isPreceding(F)?t.Preceding:t.Following},R.prototype.isSameNode=function(F){throw new Error("This DOM method is not implemented."+this.debugInfo())},R.prototype.lookupPrefix=function(F){throw new Error("This DOM method is not implemented."+this.debugInfo())},R.prototype.isDefaultNamespace=function(F){throw new Error("This DOM method is not implemented."+this.debugInfo())},R.prototype.lookupNamespaceURI=function(F){throw new Error("This DOM method is not implemented."+this.debugInfo())},R.prototype.isEqualNode=function(F){var v,y,w;if(F.nodeType!==this.nodeType||F.children.length!==this.children.length)return!1;for(v=y=0,w=this.children.length-1;0<=w?y<=w:y>=w;v=0<=w?++y:--y)if(!this.children[v].isEqualNode(F.children[v]))return!1;return!0},R.prototype.getFeature=function(F,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},R.prototype.setUserData=function(F,v,y){throw new Error("This DOM method is not implemented."+this.debugInfo())},R.prototype.getUserData=function(F){throw new Error("This DOM method is not implemented."+this.debugInfo())},R.prototype.contains=function(F){return F?F===this||this.isDescendant(F):!1},R.prototype.isDescendant=function(F){var v,y,w,H,f;for(f=this.children,w=0,H=f.length;wy},R.prototype.treePosition=function(F){var v,y;return y=0,v=!1,this.foreachTreeNode(this.document(),function(w){if(y++,!v&&w===F)return v=!0}),v?y:-1},R.prototype.foreachTreeNode=function(F,v){var y,w,H,f,L;for(F||(F=this.document()),f=F.children,w=0,H=f.length;w{o();(function(){var t,e=function(l,n){return function(){return l.apply(n,arguments)}},I={}.hasOwnProperty;qFt.exports=t=function(){function l(n){this.assertLegalName=e(this.assertLegalName,this),this.assertLegalChar=e(this.assertLegalChar,this);var a,c,r;n||(n={}),this.options=n,this.options.version||(this.options.version="1.0"),c=n.stringify||{};for(a in c)I.call(c,a)&&(r=c[a],this[a]=r)}return l.prototype.name=function(n){return this.options.noValidation?n:this.assertLegalName(""+n||"")},l.prototype.text=function(n){return this.options.noValidation?n:this.assertLegalChar(this.textEscape(""+n||""))},l.prototype.cdata=function(n){return this.options.noValidation?n:(n=""+n||"",n=n.replace("]]>","]]]]>"),this.assertLegalChar(n))},l.prototype.comment=function(n){if(this.options.noValidation)return n;if(n=""+n||"",n.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+n);return this.assertLegalChar(n)},l.prototype.raw=function(n){return this.options.noValidation?n:""+n||""},l.prototype.attValue=function(n){return this.options.noValidation?n:this.assertLegalChar(this.attEscape(n=""+n||""))},l.prototype.insTarget=function(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")},l.prototype.insValue=function(n){if(this.options.noValidation)return n;if(n=""+n||"",n.match(/\?>/))throw new Error("Invalid processing instruction value: "+n);return this.assertLegalChar(n)},l.prototype.xmlVersion=function(n){if(this.options.noValidation)return n;if(n=""+n||"",!n.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+n);return n},l.prototype.xmlEncoding=function(n){if(this.options.noValidation)return n;if(n=""+n||"",!n.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+n);return this.assertLegalChar(n)},l.prototype.xmlStandalone=function(n){return this.options.noValidation?n:n?"yes":"no"},l.prototype.dtdPubID=function(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")},l.prototype.dtdSysID=function(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")},l.prototype.dtdElementValue=function(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")},l.prototype.dtdAttType=function(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")},l.prototype.dtdAttDefault=function(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")},l.prototype.dtdEntityValue=function(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")},l.prototype.dtdNData=function(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")},l.prototype.convertAttKey="@",l.prototype.convertPIKey="?",l.prototype.convertTextKey="#text",l.prototype.convertCDataKey="#cdata",l.prototype.convertCommentKey="#comment",l.prototype.convertRawKey="#raw",l.prototype.assertLegalChar=function(n){var a,c;if(this.options.noValidation)return n;if(a="",this.options.version==="1.0"){if(a=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,c=n.match(a))throw new Error("Invalid character in string: "+n+" at index "+c.index)}else if(this.options.version==="1.1"&&(a=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,c=n.match(a)))throw new Error("Invalid character in string: "+n+" at index "+c.index);return n},l.prototype.assertLegalName=function(n){var a;if(this.options.noValidation)return n;if(this.assertLegalChar(n),a=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!n.match(a))throw new Error("Invalid character in name");return n},l.prototype.textEscape=function(n){var a;return this.options.noValidation?n:(a=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,n.replace(a,"&").replace(//g,">").replace(/\r/g," "))},l.prototype.attEscape=function(n){var a;return this.options.noValidation?n:(a=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,n.replace(a,"&").replace(/{o();(function(){$Ft.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(PFt)});var mLe=Y((e2t,t2t)=>{o();(function(){var t,e,I,l,n,a,c,r,s,i,G,d,u,b,Z,p,W,h={}.hasOwnProperty;W=gF().assign,t=Is(),s=Vie(),i=Xie(),I=Wie(),l=Nie(),d=hie(),b=gie(),Z=vie(),u=yie(),G=uLe(),n=Yie(),a=Aie(),c=Rie(),r=Fie(),e=jD(),t2t.exports=p=function(){function N(V){var R,F,v;V||(V={}),this.options=V,F=V.writer||{};for(R in F)h.call(F,R)&&(v=F[R],this["_"+R]=this[R],this[R]=v)}return N.prototype.filterOptions=function(V){var R,F,v,y,w,H,f,L;return V||(V={}),V=W({},this.options,V),R={writer:this},R.pretty=V.pretty||!1,R.allowEmpty=V.allowEmpty||!1,R.indent=(F=V.indent)!=null?F:" ",R.newline=(v=V.newline)!=null?v:` +`,R.offset=(y=V.offset)!=null?y:0,R.dontPrettyTextNodes=(w=(H=V.dontPrettyTextNodes)!=null?H:V.dontprettytextnodes)!=null?w:0,R.spaceBeforeSlash=(f=(L=V.spaceBeforeSlash)!=null?L:V.spacebeforeslash)!=null?f:"",R.spaceBeforeSlash===!0&&(R.spaceBeforeSlash=" "),R.suppressPrettyCount=0,R.user={},R.state=e.None,R},N.prototype.indent=function(V,R,F){var v;return!R.pretty||R.suppressPrettyCount?"":R.pretty&&(v=(F||0)+R.offset+1,v>0)?new Array(v).join(R.indent):""},N.prototype.endline=function(V,R,F){return!R.pretty||R.suppressPrettyCount?"":R.newline},N.prototype.attribute=function(V,R,F){var v;return this.openAttribute(V,R,F),v=" "+V.name+'="'+V.value+'"',this.closeAttribute(V,R,F),v},N.prototype.cdata=function(V,R,F){var v;return this.openNode(V,R,F),R.state=e.OpenTag,v=this.indent(V,R,F)+""+this.endline(V,R,F),R.state=e.None,this.closeNode(V,R,F),v},N.prototype.comment=function(V,R,F){var v;return this.openNode(V,R,F),R.state=e.OpenTag,v=this.indent(V,R,F)+""+this.endline(V,R,F),R.state=e.None,this.closeNode(V,R,F),v},N.prototype.declaration=function(V,R,F){var v;return this.openNode(V,R,F),R.state=e.OpenTag,v=this.indent(V,R,F)+"",v+=this.endline(V,R,F),R.state=e.None,this.closeNode(V,R,F),v},N.prototype.docType=function(V,R,F){var v,y,w,H,f;if(F||(F=0),this.openNode(V,R,F),R.state=e.OpenTag,H=this.indent(V,R,F),H+="0){for(H+=" [",H+=this.endline(V,R,F),R.state=e.InsideTag,f=V.children,y=0,w=f.length;y",H+=this.endline(V,R,F),R.state=e.None,this.closeNode(V,R,F),H},N.prototype.element=function(V,R,F){var v,y,w,H,f,L,k,U,T,q,_,$,ee,se;F||(F=0),q=!1,_="",this.openNode(V,R,F),R.state=e.OpenTag,_+=this.indent(V,R,F)+"<"+V.name,$=V.attribs;for(T in $)h.call($,T)&&(v=$[T],_+=this.attribute(v,R,F));if(w=V.children.length,H=w===0?null:V.children[0],w===0||V.children.every(function(Ae){return(Ae.type===t.Text||Ae.type===t.Raw)&&Ae.value===""}))R.allowEmpty?(_+=">",R.state=e.CloseTag,_+=""+this.endline(V,R,F)):(R.state=e.CloseTag,_+=R.spaceBeforeSlash+"/>"+this.endline(V,R,F));else if(R.pretty&&w===1&&(H.type===t.Text||H.type===t.Raw)&&H.value!=null)_+=">",R.state=e.InsideTag,R.suppressPrettyCount++,q=!0,_+=this.writeChildNode(H,R,F+1),R.suppressPrettyCount--,q=!1,R.state=e.CloseTag,_+=""+this.endline(V,R,F);else{if(R.dontPrettyTextNodes){for(ee=V.children,f=0,k=ee.length;f"+this.endline(V,R,F),R.state=e.InsideTag,se=V.children,L=0,U=se.length;L",q&&R.suppressPrettyCount--,_+=this.endline(V,R,F),R.state=e.None}return this.closeNode(V,R,F),_},N.prototype.writeChildNode=function(V,R,F){switch(V.type){case t.CData:return this.cdata(V,R,F);case t.Comment:return this.comment(V,R,F);case t.Element:return this.element(V,R,F);case t.Raw:return this.raw(V,R,F);case t.Text:return this.text(V,R,F);case t.ProcessingInstruction:return this.processingInstruction(V,R,F);case t.Dummy:return"";case t.Declaration:return this.declaration(V,R,F);case t.DocType:return this.docType(V,R,F);case t.AttributeDeclaration:return this.dtdAttList(V,R,F);case t.ElementDeclaration:return this.dtdElement(V,R,F);case t.EntityDeclaration:return this.dtdEntity(V,R,F);case t.NotationDeclaration:return this.dtdNotation(V,R,F);default:throw new Error("Unknown XML node type: "+V.constructor.name)}},N.prototype.processingInstruction=function(V,R,F){var v;return this.openNode(V,R,F),R.state=e.OpenTag,v=this.indent(V,R,F)+"",v+=this.endline(V,R,F),R.state=e.None,this.closeNode(V,R,F),v},N.prototype.raw=function(V,R,F){var v;return this.openNode(V,R,F),R.state=e.OpenTag,v=this.indent(V,R,F),R.state=e.InsideTag,v+=V.value,R.state=e.CloseTag,v+=this.endline(V,R,F),R.state=e.None,this.closeNode(V,R,F),v},N.prototype.text=function(V,R,F){var v;return this.openNode(V,R,F),R.state=e.OpenTag,v=this.indent(V,R,F),R.state=e.InsideTag,v+=V.value,R.state=e.CloseTag,v+=this.endline(V,R,F),R.state=e.None,this.closeNode(V,R,F),v},N.prototype.dtdAttList=function(V,R,F){var v;return this.openNode(V,R,F),R.state=e.OpenTag,v=this.indent(V,R,F)+""+this.endline(V,R,F),R.state=e.None,this.closeNode(V,R,F),v},N.prototype.dtdElement=function(V,R,F){var v;return this.openNode(V,R,F),R.state=e.OpenTag,v=this.indent(V,R,F)+""+this.endline(V,R,F),R.state=e.None,this.closeNode(V,R,F),v},N.prototype.dtdEntity=function(V,R,F){var v;return this.openNode(V,R,F),R.state=e.OpenTag,v=this.indent(V,R,F)+""+this.endline(V,R,F),R.state=e.None,this.closeNode(V,R,F),v},N.prototype.dtdNotation=function(V,R,F){var v;return this.openNode(V,R,F),R.state=e.OpenTag,v=this.indent(V,R,F)+""+this.endline(V,R,F),R.state=e.None,this.closeNode(V,R,F),v},N.prototype.openNode=function(V,R,F){},N.prototype.closeNode=function(V,R,F){},N.prototype.openAttribute=function(V,R,F){},N.prototype.closeAttribute=function(V,R,F){},N}()}).call(e2t)});var wie=Y((I2t,l2t)=>{o();(function(){var t,e,I=function(n,a){for(var c in a)l.call(a,c)&&(n[c]=a[c]);function r(){this.constructor=n}return r.prototype=a.prototype,n.prototype=new r,n.__super__=a.prototype,n},l={}.hasOwnProperty;e=mLe(),l2t.exports=t=function(n){I(a,n);function a(c){a.__super__.constructor.call(this,c)}return a.prototype.document=function(c,r){var s,i,G,d,u;for(r=this.filterOptions(r),d="",u=c.children,i=0,G=u.length;i{o();(function(){var t,e,I,l,n,a,c,r,s=function(G,d){for(var u in d)i.call(d,u)&&(G[u]=d[u]);function b(){this.constructor=G}return b.prototype=d.prototype,G.prototype=new b,G.__super__=d.prototype,G},i={}.hasOwnProperty;r=gF().isPlainObject,I=GLe(),e=rFt(),n=ZZ(),t=Is(),c=bLe(),a=wie(),a2t.exports=l=function(G){s(d,G);function d(u){d.__super__.constructor.call(this,null),this.name="#document",this.type=t.Document,this.documentURI=null,this.domConfig=new e,u||(u={}),u.writer||(u.writer=new a),this.options=u,this.stringify=new c(u)}return Object.defineProperty(d.prototype,"implementation",{value:new I}),Object.defineProperty(d.prototype,"doctype",{get:function(){var u,b,Z,p;for(p=this.children,b=0,Z=p.length;b{o();(function(){var t,e,I,l,n,a,c,r,s,i,G,d,u,b,Z,p,W,h,N,V,R,F,v,y,w={}.hasOwnProperty;y=gF(),F=y.isObject,R=y.isFunction,v=y.isPlainObject,V=y.getValue,t=Is(),d=ZLe(),b=hie(),l=Wie(),n=Nie(),p=gie(),N=vie(),Z=yie(),i=Vie(),G=Xie(),a=Yie(),r=Rie(),c=Aie(),s=Fie(),I=dLe(),h=bLe(),W=wie(),e=jD(),r2t.exports=u=function(){function H(f,L,k){var U;this.name="?xml",this.type=t.Document,f||(f={}),U={},f.writer?v(f.writer)&&(U=f.writer,f.writer=new W):f.writer=new W,this.options=f,this.writer=f.writer,this.writerOptions=this.writer.filterOptions(U),this.stringify=new h(f),this.onDataCallback=L||function(){},this.onEndCallback=k||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return H.prototype.createChildNode=function(f){var L,k,U,T,q,_,$,ee;switch(f.type){case t.CData:this.cdata(f.value);break;case t.Comment:this.comment(f.value);break;case t.Element:U={},$=f.attribs;for(k in $)w.call($,k)&&(L=$[k],U[k]=L.value);this.node(f.name,U);break;case t.Dummy:this.dummy();break;case t.Raw:this.raw(f.value);break;case t.Text:this.text(f.value);break;case t.ProcessingInstruction:this.instruction(f.target,f.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+f.constructor.name)}for(ee=f.children,q=0,_=ee.length;q<_;q++)T=ee[q],this.createChildNode(T),T.type===t.Element&&this.up();return this},H.prototype.dummy=function(){return this},H.prototype.node=function(f,L,k){var U;if(f==null)throw new Error("Missing node name.");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node. "+this.debugInfo(f));return this.openCurrent(),f=V(f),L==null&&(L={}),L=V(L),F(L)||(U=[L,k],k=U[0],L=U[1]),this.currentNode=new b(this,f,L),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,k!=null&&this.text(k),this},H.prototype.element=function(f,L,k){var U,T,q,_,$,ee;if(this.currentNode&&this.currentNode.type===t.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(f)||F(f)||R(f))for(_=this.options.noValidation,this.options.noValidation=!0,ee=new d(this.options).element("TEMP_ROOT"),ee.element(f),this.options.noValidation=_,$=ee.children,T=0,q=$.length;T=0;)this.up();return this.onEnd()},H.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},H.prototype.openNode=function(f){var L,k,U,T;if(!f.isOpen){if(!this.root&&this.currentLevel===0&&f.type===t.Element&&(this.root=f),k="",f.type===t.Element){this.writerOptions.state=e.OpenTag,k=this.writer.indent(f,this.writerOptions,this.currentLevel)+"<"+f.name,T=f.attribs;for(U in T)w.call(T,U)&&(L=T[U],k+=this.writer.attribute(L,this.writerOptions,this.currentLevel));k+=(f.children?">":"/>")+this.writer.endline(f,this.writerOptions,this.currentLevel),this.writerOptions.state=e.InsideTag}else this.writerOptions.state=e.OpenTag,k=this.writer.indent(f,this.writerOptions,this.currentLevel)+""),k+=this.writer.endline(f,this.writerOptions,this.currentLevel);return this.onData(k,this.currentLevel),f.isOpen=!0}},H.prototype.closeNode=function(f){var L;if(!f.isClosed)return L="",this.writerOptions.state=e.CloseTag,f.type===t.Element?L=this.writer.indent(f,this.writerOptions,this.currentLevel)+""+this.writer.endline(f,this.writerOptions,this.currentLevel):L=this.writer.indent(f,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(f,this.writerOptions,this.currentLevel),this.writerOptions.state=e.None,this.onData(L,this.currentLevel),f.isClosed=!0},H.prototype.onData=function(f,L){return this.documentStarted=!0,this.onDataCallback(f,L+1)},H.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},H.prototype.debugInfo=function(f){return f==null?"":"node: <"+f+">"},H.prototype.ele=function(){return this.element.apply(this,arguments)},H.prototype.nod=function(f,L,k){return this.node(f,L,k)},H.prototype.txt=function(f){return this.text(f)},H.prototype.dat=function(f){return this.cdata(f)},H.prototype.com=function(f){return this.comment(f)},H.prototype.ins=function(f,L){return this.instruction(f,L)},H.prototype.dec=function(f,L,k){return this.declaration(f,L,k)},H.prototype.dtd=function(f,L,k){return this.doctype(f,L,k)},H.prototype.e=function(f,L,k){return this.element(f,L,k)},H.prototype.n=function(f,L,k){return this.node(f,L,k)},H.prototype.t=function(f){return this.text(f)},H.prototype.d=function(f){return this.cdata(f)},H.prototype.c=function(f){return this.comment(f)},H.prototype.r=function(f){return this.raw(f)},H.prototype.i=function(f,L){return this.instruction(f,L)},H.prototype.att=function(){return this.currentNode&&this.currentNode.type===t.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},H.prototype.a=function(){return this.currentNode&&this.currentNode.type===t.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},H.prototype.ent=function(f,L){return this.entity(f,L)},H.prototype.pent=function(f,L){return this.pEntity(f,L)},H.prototype.not=function(f,L){return this.notation(f,L)},H}()}).call(c2t)});var G2t=Y((o2t,i2t)=>{o();(function(){var t,e,I,l,n=function(c,r){for(var s in r)a.call(r,s)&&(c[s]=r[s]);function i(){this.constructor=c}return i.prototype=r.prototype,c.prototype=new i,c.__super__=r.prototype,c},a={}.hasOwnProperty;t=Is(),l=mLe(),e=jD(),i2t.exports=I=function(c){n(r,c);function r(s,i){this.stream=s,r.__super__.constructor.call(this,i)}return r.prototype.endline=function(s,i,G){return s.isLastRootNode&&i.state===e.CloseTag?"":r.__super__.endline.call(this,s,i,G)},r.prototype.document=function(s,i){var G,d,u,b,Z,p,W,h,N;for(W=s.children,d=u=0,Z=W.length;u0){for(this.stream.write(" ["),this.stream.write(this.endline(s,i,G)),i.state=e.InsideTag,Z=s.children,u=0,b=Z.length;u"),this.stream.write(this.endline(s,i,G)),i.state=e.None,this.closeNode(s,i,G)},r.prototype.element=function(s,i,G){var d,u,b,Z,p,W,h,N,V,R;G||(G=0),this.openNode(s,i,G),i.state=e.OpenTag,this.stream.write(this.indent(s,i,G)+"<"+s.name),V=s.attribs;for(h in V)a.call(V,h)&&(d=V[h],this.attribute(d,i,G));if(b=s.children.length,Z=b===0?null:s.children[0],b===0||s.children.every(function(F){return(F.type===t.Text||F.type===t.Raw)&&F.value===""}))i.allowEmpty?(this.stream.write(">"),i.state=e.CloseTag,this.stream.write("")):(i.state=e.CloseTag,this.stream.write(i.spaceBeforeSlash+"/>"));else if(i.pretty&&b===1&&(Z.type===t.Text||Z.type===t.Raw)&&Z.value!=null)this.stream.write(">"),i.state=e.InsideTag,i.suppressPrettyCount++,N=!0,this.writeChildNode(Z,i,G+1),i.suppressPrettyCount--,N=!1,i.state=e.CloseTag,this.stream.write("");else{for(this.stream.write(">"+this.endline(s,i,G)),i.state=e.InsideTag,R=s.children,p=0,W=R.length;p")}return this.stream.write(this.endline(s,i,G)),i.state=e.None,this.closeNode(s,i,G)},r.prototype.processingInstruction=function(s,i,G){return this.stream.write(r.__super__.processingInstruction.call(this,s,i,G))},r.prototype.raw=function(s,i,G){return this.stream.write(r.__super__.raw.call(this,s,i,G))},r.prototype.text=function(s,i,G){return this.stream.write(r.__super__.text.call(this,s,i,G))},r.prototype.dtdAttList=function(s,i,G){return this.stream.write(r.__super__.dtdAttList.call(this,s,i,G))},r.prototype.dtdElement=function(s,i,G){return this.stream.write(r.__super__.dtdElement.call(this,s,i,G))},r.prototype.dtdEntity=function(s,i,G){return this.stream.write(r.__super__.dtdEntity.call(this,s,i,G))},r.prototype.dtdNotation=function(s,i,G){return this.stream.write(r.__super__.dtdNotation.call(this,s,i,G))},r}(l)}).call(o2t)});var u2t=Y((d2t,AQ)=>{o();(function(){var t,e,I,l,n,a,c,r,s,i;i=gF(),r=i.assign,s=i.isFunction,I=GLe(),l=ZLe(),n=s2t(),c=wie(),a=G2t(),t=Is(),e=jD(),AQ.exports.create=function(G,d,u,b){var Z,p;if(G==null)throw new Error("Root element needs a name.");return b=r({},d,u,b),Z=new l(b),p=Z.element(G),b.headless||(Z.declaration(b),(b.pubID!=null||b.sysID!=null)&&Z.dtd(b)),p},AQ.exports.begin=function(G,d,u){var b;return s(G)&&(b=[G,d],d=b[0],u=b[1],G={}),d?new n(G,d,u):new l(G)},AQ.exports.stringWriter=function(G){return new c(G)},AQ.exports.streamWriter=function(G,d){return new a(G,d)},AQ.exports.implementation=new I,AQ.exports.nodeType=t,AQ.exports.writerState=e}).call(d2t)});var b2t=Y(pLe=>{o();(function(){"use strict";var t,e,I,l,n,a={}.hasOwnProperty;t=u2t(),e=Zie().defaults,l=function(c){return typeof c=="string"&&(c.indexOf("&")>=0||c.indexOf(">")>=0||c.indexOf("<")>=0)},n=function(c){return""},I=function(c){return c.replace("]]>","]]]]>")},pLe.Builder=function(){function c(r){var s,i,G;this.options={},i=e["0.2"];for(s in i)a.call(i,s)&&(G=i[s],this.options[s]=G);for(s in r)a.call(r,s)&&(G=r[s],this.options[s]=G)}return c.prototype.buildObject=function(r){var s,i,G,d,u;return s=this.options.attrkey,i=this.options.charkey,Object.keys(r).length===1&&this.options.rootName===e["0.2"].rootName?(u=Object.keys(r)[0],r=r[u]):u=this.options.rootName,G=function(b){return function(Z,p){var W,h,N,V,R,F;if(typeof p!="object")b.options.cdata&&l(p)?Z.raw(n(p)):Z.txt(p);else if(Array.isArray(p)){for(V in p)if(a.call(p,V)){h=p[V];for(R in h)N=h[R],Z=G(Z.ele(R),N).up()}}else for(R in p)if(a.call(p,R))if(h=p[R],R===s){if(typeof h=="object")for(W in h)F=h[W],Z=Z.att(W,F)}else if(R===i)b.options.cdata&&l(h)?Z=Z.raw(n(h)):Z=Z.txt(h);else if(Array.isArray(h))for(V in h)a.call(h,V)&&(N=h[V],typeof N=="string"?b.options.cdata&&l(N)?Z=Z.ele(R).raw(n(N)).up():Z=Z.ele(R,N).up():Z=G(Z.ele(R),N).up());else typeof h=="object"?Z=G(Z.ele(R),h).up():typeof h=="string"&&b.options.cdata&&l(h)?Z=Z.ele(R).raw(n(h)).up():(h==null&&(h=""),Z=Z.ele(R,h.toString()).up());return Z}}(this),d=t.create(u,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),G(d,r).end(this.options.renderOpts)},c}()}).call(pLe)});var m2t=Y(Hie=>{o();(function(t){t.parser=function(O,C){return new I(O,C)},t.SAXParser=I,t.SAXStream=G,t.createStream=s,t.MAX_BUFFER_LENGTH=64*1024;var e=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];t.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function I(O,C){if(!(this instanceof I))return new I(O,C);var re=this;n(re),re.q=re.c="",re.bufferCheckPosition=t.MAX_BUFFER_LENGTH,re.encoding=null,re.opt=C||{},re.opt.lowercase=re.opt.lowercase||re.opt.lowercasetags,re.looseCase=re.opt.lowercase?"toLowerCase":"toUpperCase",re.opt.maxEntityCount=re.opt.maxEntityCount||512,re.opt.maxEntityDepth=re.opt.maxEntityDepth||4,re.entityCount=re.entityDepth=0,re.tags=[],re.closed=re.closedRoot=re.sawRoot=!1,re.tag=re.error=null,re.strict=!!O,re.noscript=!!(O||re.opt.noscript),re.state=H.BEGIN,re.strictEntities=re.opt.strictEntities,re.ENTITIES=re.strictEntities?Object.create(t.XML_ENTITIES):Object.create(t.ENTITIES),re.attribList=[],re.opt.xmlns&&(re.ns=Object.create(p)),re.opt.unquotedAttributeValues===void 0&&(re.opt.unquotedAttributeValues=!O),re.trackPosition=re.opt.position!==!1,re.trackPosition&&(re.position=re.line=re.column=0),L(re,"onready")}Object.create||(Object.create=function(O){function C(){}C.prototype=O;var re=new C;return re}),Object.keys||(Object.keys=function(O){var C=[];for(var re in O)O.hasOwnProperty(re)&&C.push(re);return C});function l(O){for(var C=Math.max(t.MAX_BUFFER_LENGTH,10),re=0,Ie=0,rt=e.length;IeC)switch(e[Ie]){case"textNode":$(O);break;case"cdata":_(O,"oncdata",O.cdata),O.cdata="";break;case"script":_(O,"onscript",O.script),O.script="";break;default:se(O,"Max buffer length exceeded: "+e[Ie])}re=Math.max(re,Ft)}var vI=t.MAX_BUFFER_LENGTH-re;O.bufferCheckPosition=vI+O.position}function n(O){for(var C=0,re=e.length;C=2){if(O[0]===255&&O[1]===254)return"utf-16le";if(O[0]===254&&O[1]===255)return"utf-16be"}return O.length>=3&&O[0]===239&&O[1]===187&&O[2]===191?"utf8":O.length>=4?O[0]===60&&O[1]===0&&O[2]===63&&O[3]===0?"utf-16le":O[0]===0&&O[1]===60&&O[2]===0&&O[3]===63?"utf-16be":"utf8":C?"utf8":null}function G(O,C){if(!(this instanceof G))return new G(O,C);c.apply(this),this._parser=new I(O,C),this.writable=!0,this.readable=!0;var re=this;this._parser.onend=function(){re.emit("end")},this._parser.onerror=function(Ie){re.emit("error",Ie),re._parser.error=null},this._decoder=null,this._decoderBuffer=null,r.forEach(function(Ie){Object.defineProperty(re,"on"+Ie,{get:function(){return re._parser["on"+Ie]},set:function(rt){if(!rt)return re.removeAllListeners(Ie),re._parser["on"+Ie]=rt,rt;re.on(Ie,rt)},enumerable:!0,configurable:!1})})}G.prototype=Object.create(c.prototype,{constructor:{value:G}}),G.prototype._decodeBuffer=function(O,C){if(this._decoderBuffer&&(O=m.Buffer.concat([this._decoderBuffer,O]),this._decoderBuffer=null),!this._decoder){var re=i(O,C);if(!re)return this._decoderBuffer=O,"";this._parser.encoding=re,this._decoder=new TextDecoder(re)}return this._decoder.decode(O,{stream:!C})},G.prototype.write=function(O){if(typeof m.Buffer=="function"&&typeof m.Buffer.isBuffer=="function"&&m.Buffer.isBuffer(O))O=this._decodeBuffer(O,!1);else if(this._decoderBuffer){var C=this._decodeBuffer(m.Buffer.alloc(0),!0);C&&(this._parser.write(C),this.emit("data",C))}return this._parser.write(O.toString()),this.emit("data",O),!0},G.prototype.end=function(O){if(O&&O.length&&this.write(O),this._decoderBuffer){var C=this._decodeBuffer(m.Buffer.alloc(0),!0);C&&(this._parser.write(C),this.emit("data",C))}else if(this._decoder){var re=this._decoder.decode();re&&(this._parser.write(re),this.emit("data",re))}return this._parser.end(),!0},G.prototype.on=function(O,C){var re=this;return!re._parser["on"+O]&&r.indexOf(O)!==-1&&(re._parser["on"+O]=function(){var Ie=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);Ie.splice(0,0,O),re.emit.apply(re,Ie)}),c.prototype.on.call(re,O,C)};var d="[CDATA[",u="DOCTYPE",b="http://www.w3.org/XML/1998/namespace",Z="http://www.w3.org/2000/xmlns/",p={xml:b,xmlns:Z},W=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,h=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,N=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,V=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function R(O){return O===" "||O===` +`||O==="\r"||O===" "}function F(O){return O==='"'||O==="'"}function v(O){return O===">"||R(O)}function y(O,C){return O.test(C)}function w(O,C){return!y(O,C)}var H=0;t.STATE={BEGIN:H++,BEGIN_WHITESPACE:H++,TEXT:H++,TEXT_ENTITY:H++,OPEN_WAKA:H++,SGML_DECL:H++,SGML_DECL_QUOTED:H++,DOCTYPE:H++,DOCTYPE_QUOTED:H++,DOCTYPE_DTD:H++,DOCTYPE_DTD_QUOTED:H++,COMMENT_STARTING:H++,COMMENT:H++,COMMENT_ENDING:H++,COMMENT_ENDED:H++,CDATA:H++,CDATA_ENDING:H++,CDATA_ENDING_2:H++,PROC_INST:H++,PROC_INST_BODY:H++,PROC_INST_ENDING:H++,OPEN_TAG:H++,OPEN_TAG_SLASH:H++,ATTRIB:H++,ATTRIB_NAME:H++,ATTRIB_NAME_SAW_WHITE:H++,ATTRIB_VALUE:H++,ATTRIB_VALUE_QUOTED:H++,ATTRIB_VALUE_CLOSED:H++,ATTRIB_VALUE_UNQUOTED:H++,ATTRIB_VALUE_ENTITY_Q:H++,ATTRIB_VALUE_ENTITY_U:H++,CLOSE_TAG:H++,CLOSE_TAG_SAW_WHITE:H++,SCRIPT:H++,SCRIPT_ENDING:H++},t.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},t.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(t.ENTITIES).forEach(function(O){var C=t.ENTITIES[O],re=typeof C=="number"?String.fromCharCode(C):C;t.ENTITIES[O]=re});for(var f in t.STATE)t.STATE[t.STATE[f]]=f;H=t.STATE;function L(O,C,re){O[C]&&O[C](re)}function k(O){var C=O&&O.match(/(?:^|\s)encoding\s*=\s*(['"])([^'"]+)\1/i);return C?C[2]:null}function U(O){return O?O.toLowerCase().replace(/[^a-z0-9]/g,""):null}function T(O,C){let re=U(O),Ie=U(C);return!re||!Ie?!0:Ie==="utf16"?re==="utf16le"||re==="utf16be":re===Ie}function q(O,C){if(!(!O.strict||!O.encoding||!C||C.name!=="xml")){var re=k(C.body);re&&!T(O.encoding,re)&&Ve(O,"XML declaration encoding "+re+" does not match detected stream encoding "+O.encoding.toUpperCase())}}function _(O,C,re){O.textNode&&$(O),L(O,C,re)}function $(O){O.textNode=ee(O.opt,O.textNode),O.textNode&&L(O,"ontext",O.textNode),O.textNode=""}function ee(O,C){return O.trim&&(C=C.trim()),O.normalize&&(C=C.replace(/\s+/g," ")),C}function se(O,C){return $(O),O.trackPosition&&(C+=` +Line: `+O.line+` +Column: `+O.column+` +Char: `+O.c),C=new Error(C),O.error=C,L(O,"onerror",C),O}function Ae(O){return O.sawRoot&&!O.closedRoot&&Ve(O,"Unclosed root tag"),O.state!==H.BEGIN&&O.state!==H.BEGIN_WHITESPACE&&O.state!==H.TEXT&&se(O,"Unexpected end"),$(O),O.c="",O.closed=!0,L(O,"onend"),I.call(O,O.strict,O.opt),O}function Ve(O,C){if(typeof O!="object"||!(O instanceof I))throw new Error("bad call to strictFail");O.strict&&se(O,C)}function ct(O){O.strict||(O.tagName=O.tagName[O.looseCase]());var C=O.tags[O.tags.length-1]||O,re=O.tag={name:O.tagName,attributes:{}};O.opt.xmlns&&(re.ns=C.ns),O.attribList.length=0,_(O,"onopentagstart",re)}function Xe(O,C){var re=O.indexOf(":"),Ie=re<0?["",O]:O.split(":"),rt=Ie[0],Ft=Ie[1];return C&&O==="xmlns"&&(rt="xmlns",Ft=""),{prefix:rt,local:Ft}}function _t(O){if(O.strict||(O.attribName=O.attribName[O.looseCase]()),O.attribList.indexOf(O.attribName)!==-1||O.tag.attributes.hasOwnProperty(O.attribName)){O.attribName=O.attribValue="";return}if(O.opt.xmlns){var C=Xe(O.attribName,!0),re=C.prefix,Ie=C.local;if(re==="xmlns")if(Ie==="xml"&&O.attribValue!==b)Ve(O,"xml: prefix must be bound to "+b+` +Actual: `+O.attribValue);else if(Ie==="xmlns"&&O.attribValue!==Z)Ve(O,"xmlns: prefix must be bound to "+Z+` +Actual: `+O.attribValue);else{var rt=O.tag,Ft=O.tags[O.tags.length-1]||O;rt.ns===Ft.ns&&(rt.ns=Object.create(Ft.ns)),rt.ns[Ie]=O.attribValue}O.attribList.push([O.attribName,O.attribValue])}else O.tag.attributes[O.attribName]=O.attribValue,_(O,"onattribute",{name:O.attribName,value:O.attribValue});O.attribName=O.attribValue=""}function Pt(O,C){if(O.opt.xmlns){var re=O.tag,Ie=Xe(O.tagName);re.prefix=Ie.prefix,re.local=Ie.local,re.uri=re.ns[Ie.prefix]||"",re.prefix&&!re.uri&&(Ve(O,"Unbound namespace prefix: "+JSON.stringify(O.tagName)),re.uri=Ie.prefix);var rt=O.tags[O.tags.length-1]||O;re.ns&&rt.ns!==re.ns&&Object.keys(re.ns).forEach(function(we){_(O,"onopennamespace",{prefix:we,uri:re.ns[we]})});for(var Ft=0,vI=O.attribList.length;Ft",O.tagName="",O.state=H.SCRIPT;return}_(O,"onscript",O.script),O.script=""}var C=O.tags.length,re=O.tagName;O.strict||(re=re[O.looseCase]());for(var Ie=re;C--;){var rt=O.tags[C];if(rt.name!==Ie)Ve(O,"Unexpected close tag");else break}if(C<0){Ve(O,"Unmatched closing tag: "+O.tagName),O.textNode+="",O.state=H.TEXT;return}O.tagName=re;for(var Ft=O.tags.length;Ft-- >C;){var vI=O.tag=O.tags.pop();O.tagName=O.tag.name,_(O,"onclosetag",O.tagName);var hl={};for(var EI in vI.ns)hl[EI]=vI.ns[EI];var Be=O.tags[O.tags.length-1]||O;O.opt.xmlns&&vI.ns!==Be.ns&&Object.keys(vI.ns).forEach(function(Pl){var Xt=vI.ns[Pl];_(O,"onclosenamespace",{prefix:Pl,uri:Xt})})}C===0&&(O.closedRoot=!0),O.tagName=O.attribValue=O.attribName="",O.attribList.length=0,O.state=H.TEXT}function j(O){var C=O.entity,re=C.toLowerCase(),Ie,rt="";return O.ENTITIES[C]?O.ENTITIES[C]:O.ENTITIES[re]?O.ENTITIES[re]:(C=re,C.charAt(0)==="#"&&(C.charAt(1)==="x"?(C=C.slice(2),Ie=parseInt(C,16),rt=Ie.toString(16)):(C=C.slice(1),Ie=parseInt(C,10),rt=Ie.toString(10))),C=C.replace(/^0+/,""),isNaN(Ie)||rt.toLowerCase()!==C||Ie<0||Ie>1114111?(Ve(O,"Invalid character entity"),"&"+O.entity+";"):String.fromCodePoint(Ie))}function Ne(O,C){C==="<"?(O.state=H.OPEN_WAKA,O.startTagPosition=O.position):R(C)||(Ve(O,"Non-whitespace before first tag."),O.textNode=C,O.state=H.TEXT)}function ce(O,C){var re="";return C"?(_(C,"onsgmldeclaration",C.sgmlDecl),C.sgmlDecl="",C.state=H.TEXT):(F(Ie)&&(C.state=H.SGML_DECL_QUOTED),C.sgmlDecl+=Ie);continue;case H.SGML_DECL_QUOTED:Ie===C.q&&(C.state=H.SGML_DECL,C.q=""),C.sgmlDecl+=Ie;continue;case H.DOCTYPE:Ie===">"?(C.state=H.TEXT,_(C,"ondoctype",C.doctype),C.doctype=!0):(C.doctype+=Ie,Ie==="["?C.state=H.DOCTYPE_DTD:F(Ie)&&(C.state=H.DOCTYPE_QUOTED,C.q=Ie));continue;case H.DOCTYPE_QUOTED:C.doctype+=Ie,Ie===C.q&&(C.q="",C.state=H.DOCTYPE);continue;case H.DOCTYPE_DTD:Ie==="]"?(C.doctype+=Ie,C.state=H.DOCTYPE):Ie==="<"?(C.state=H.OPEN_WAKA,C.startTagPosition=C.position):F(Ie)?(C.doctype+=Ie,C.state=H.DOCTYPE_DTD_QUOTED,C.q=Ie):C.doctype+=Ie;continue;case H.DOCTYPE_DTD_QUOTED:C.doctype+=Ie,Ie===C.q&&(C.state=H.DOCTYPE_DTD,C.q="");continue;case H.COMMENT:Ie==="-"?C.state=H.COMMENT_ENDING:C.comment+=Ie;continue;case H.COMMENT_ENDING:Ie==="-"?(C.state=H.COMMENT_ENDED,C.comment=ee(C.opt,C.comment),C.comment&&_(C,"oncomment",C.comment),C.comment=""):(C.comment+="-"+Ie,C.state=H.COMMENT);continue;case H.COMMENT_ENDED:Ie!==">"?(Ve(C,"Malformed comment"),C.comment+="--"+Ie,C.state=H.COMMENT):C.doctype&&C.doctype!==!0?C.state=H.DOCTYPE_DTD:C.state=H.TEXT;continue;case H.CDATA:for(var Ft=re-1;Ie&&Ie!=="]";)Ie=ce(O,re++),Ie&&C.trackPosition&&(C.position++,Ie===` +`?(C.line++,C.column=0):C.column++);C.cdata+=O.substring(Ft,re-1),Ie==="]"&&(C.state=H.CDATA_ENDING);continue;case H.CDATA_ENDING:Ie==="]"?C.state=H.CDATA_ENDING_2:(C.cdata+="]"+Ie,C.state=H.CDATA);continue;case H.CDATA_ENDING_2:Ie===">"?(C.cdata&&_(C,"oncdata",C.cdata),_(C,"onclosecdata"),C.cdata="",C.state=H.TEXT):Ie==="]"?C.cdata+="]":(C.cdata+="]]"+Ie,C.state=H.CDATA);continue;case H.PROC_INST:Ie==="?"?C.state=H.PROC_INST_ENDING:R(Ie)?C.state=H.PROC_INST_BODY:C.procInstName+=Ie;continue;case H.PROC_INST_BODY:if(!C.procInstBody&&R(Ie))continue;Ie==="?"?C.state=H.PROC_INST_ENDING:C.procInstBody+=Ie;continue;case H.PROC_INST_ENDING:if(Ie===">"){let Be={name:C.procInstName,body:C.procInstBody};q(C,Be),_(C,"onprocessinginstruction",Be),C.procInstName=C.procInstBody="",C.state=H.TEXT}else C.procInstBody+="?"+Ie,C.state=H.PROC_INST_BODY;continue;case H.OPEN_TAG:y(h,Ie)?C.tagName+=Ie:(ct(C),Ie===">"?Pt(C):Ie==="/"?C.state=H.OPEN_TAG_SLASH:(R(Ie)||Ve(C,"Invalid character in tag name"),C.state=H.ATTRIB));continue;case H.OPEN_TAG_SLASH:Ie===">"?(Pt(C,!0),S(C)):(Ve(C,"Forward-slash in opening tag not followed by >"),C.state=H.ATTRIB);continue;case H.ATTRIB:if(R(Ie))continue;Ie===">"?Pt(C):Ie==="/"?C.state=H.OPEN_TAG_SLASH:y(W,Ie)?(C.attribName=Ie,C.attribValue="",C.state=H.ATTRIB_NAME):Ve(C,"Invalid attribute name");continue;case H.ATTRIB_NAME:Ie==="="?C.state=H.ATTRIB_VALUE:Ie===">"?(Ve(C,"Attribute without value"),C.attribValue=C.attribName,_t(C),Pt(C)):R(Ie)?C.state=H.ATTRIB_NAME_SAW_WHITE:y(h,Ie)?C.attribName+=Ie:Ve(C,"Invalid attribute name");continue;case H.ATTRIB_NAME_SAW_WHITE:if(Ie==="=")C.state=H.ATTRIB_VALUE;else{if(R(Ie))continue;Ve(C,"Attribute without value"),C.tag.attributes[C.attribName]="",C.attribValue="",_(C,"onattribute",{name:C.attribName,value:""}),C.attribName="",Ie===">"?Pt(C):y(W,Ie)?(C.attribName=Ie,C.state=H.ATTRIB_NAME):(Ve(C,"Invalid attribute name"),C.state=H.ATTRIB)}continue;case H.ATTRIB_VALUE:if(R(Ie))continue;F(Ie)?(C.q=Ie,C.state=H.ATTRIB_VALUE_QUOTED):(C.opt.unquotedAttributeValues||se(C,"Unquoted attribute value"),C.state=H.ATTRIB_VALUE_UNQUOTED,C.attribValue=Ie);continue;case H.ATTRIB_VALUE_QUOTED:if(Ie!==C.q){Ie==="&"?C.state=H.ATTRIB_VALUE_ENTITY_Q:C.attribValue+=Ie;continue}_t(C),C.q="",C.state=H.ATTRIB_VALUE_CLOSED;continue;case H.ATTRIB_VALUE_CLOSED:R(Ie)?C.state=H.ATTRIB:Ie===">"?Pt(C):Ie==="/"?C.state=H.OPEN_TAG_SLASH:y(W,Ie)?(Ve(C,"No whitespace between attributes"),C.attribName=Ie,C.attribValue="",C.state=H.ATTRIB_NAME):Ve(C,"Invalid attribute name");continue;case H.ATTRIB_VALUE_UNQUOTED:if(!v(Ie)){Ie==="&"?C.state=H.ATTRIB_VALUE_ENTITY_U:C.attribValue+=Ie;continue}_t(C),Ie===">"?Pt(C):C.state=H.ATTRIB;continue;case H.CLOSE_TAG:if(C.tagName)Ie===">"?S(C):y(h,Ie)?C.tagName+=Ie:C.script?(C.script+=""?S(C):Ve(C,"Invalid characters in closing tag");continue;case H.TEXT_ENTITY:case H.ATTRIB_VALUE_ENTITY_Q:case H.ATTRIB_VALUE_ENTITY_U:var vI,hl;switch(C.state){case H.TEXT_ENTITY:vI=H.TEXT,hl="textNode";break;case H.ATTRIB_VALUE_ENTITY_Q:vI=H.ATTRIB_VALUE_QUOTED,hl="attribValue";break;case H.ATTRIB_VALUE_ENTITY_U:vI=H.ATTRIB_VALUE_UNQUOTED,hl="attribValue";break}if(Ie===";"){var EI=j(C);C.opt.unparsedEntities&&!Object.values(t.XML_ENTITIES).includes(EI)?((C.entityCount+=1)>C.opt.maxEntityCount&&se(C,"Parsed entity count exceeds max entity count"),(C.entityDepth+=1)>C.opt.maxEntityDepth&&se(C,"Parsed entity depth exceeds max entity depth"),C.entity="",C.state=vI,C.write(EI),C.entityDepth-=1):(C[hl]+=EI,C.entity="",C.state=vI)}else y(C.entity.length?V:N,Ie)?C.entity+=Ie:(Ve(C,"Invalid character in entity name"),C[hl]+="&"+C.entity+Ie,C.entity="",C.state=vI);continue;default:throw new Error(C,"Unknown state: "+C.state)}return C.position>=C.bufferCheckPosition&&l(C),C}String.fromCodePoint||function(){var O=String.fromCharCode,C=Math.floor,re=function(){var Ie=16384,rt=[],Ft,vI,hl=-1,EI=arguments.length;if(!EI)return"";for(var Be="";++hl1114111||C(Pl)!==Pl)throw RangeError("Invalid code point: "+Pl);Pl<=65535?rt.push(Pl):(Pl-=65536,Ft=(Pl>>10)+55296,vI=Pl%1024+56320,rt.push(Ft,vI)),(hl+1===EI||rt.length>Ie)&&(Be+=O.apply(null,rt),rt.length=0)}return Be};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:re,configurable:!0,writable:!0}):String.fromCodePoint=re}()})(typeof Hie>"u"?Hie.sax={}:Hie)});var Z2t=Y(hLe=>{o();(function(){"use strict";hLe.stripBOM=function(t){return t[0]==="\uFEFF"?t.substring(1):t}}).call(hLe)});var WLe=Y(KC=>{o();(function(){"use strict";var t;t=new RegExp(/(?!xmlns)^.*:/),KC.normalize=function(e){return e.toLowerCase()},KC.firstCharLowerCase=function(e){return e.charAt(0).toLowerCase()+e.slice(1)},KC.stripPrefix=function(e){return e.replace(t,"")},KC.parseNumbers=function(e){return isNaN(e)||(e=e%1===0?parseInt(e,10):parseFloat(e)),e},KC.parseBooleans=function(e){return/^(?:true|false)$/i.test(e)&&(e=e.toLowerCase()==="true"),e}}).call(KC)});var p2t=Y(cg=>{o();(function(){"use strict";var t,e,I,l,n,a,c,r,s=function(d,u){return function(){return d.apply(u,arguments)}},i=function(d,u){for(var b in u)G.call(u,b)&&(d[b]=u[b]);function Z(){this.constructor=d}return Z.prototype=u.prototype,d.prototype=new Z,d.__super__=u.prototype,d},G={}.hasOwnProperty;c=m2t(),I=require("events"),t=Z2t(),a=WLe(),r=require("timers").setImmediate,e=Zie().defaults,l=function(d){return typeof d=="object"&&d!=null&&Object.keys(d).length===0},n=function(d,u,b){var Z,p,W;for(Z=0,p=d.length;Z0&&(F[h.options.childkey]=y),y=F;else if(f){f[h.options.childkey]=f[h.options.childkey]||[],w=Object.create(null);for(R in y)G.call(y,R)&&(w[R]=y[R]);f[h.options.childkey].push(w),delete y["#name"],Object.keys(y).length===1&&Z in y&&!h.EXPLICIT_CHARKEY&&(y=y[Z])}}return W.length>0?h.assignOrPush(f,v,y):(h.options.explicitRoot&&(H=y,y=Object.create(null),y[v]=H),h.resultObject=y,h.saxParser.ended=!0,h.emit("end",h.resultObject))}}(this),p=function(h){return function(N){var V,R;if(R=W[W.length-1],R)return R[Z]+=N,h.options.explicitChildren&&h.options.preserveChildrenOrder&&h.options.charsAsChildren&&(h.options.includeWhiteChars||N.replace(/\\n/g,"").trim()!=="")&&(R[h.options.childkey]=R[h.options.childkey]||[],V={"#name":"__text__"},V[Z]=N,h.options.normalize&&(V[Z]=V[Z].replace(/\s{2,}/g," ").trim()),R[h.options.childkey].push(V)),R}}(this),this.saxParser.ontext=p,this.saxParser.oncdata=function(h){return function(N){var V;if(V=p(N),V)return V.cdata=!0}}(this)},u.prototype.parseString=function(b,Z){var p;Z!=null&&typeof Z=="function"&&(this.on("end",function(W){return this.reset(),Z(null,W)}),this.on("error",function(W){return this.reset(),Z(W)}));try{return b=b.toString(),b.trim()===""?(this.emit("end",null),!0):(b=t.stripBOM(b),this.options.async?(this.remaining=b,r(this.processAsync),this.saxParser):this.saxParser.write(b).close())}catch(W){if(p=W,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw p}else return this.emit("error",p),this.saxParser.errThrown=!0}},u.prototype.parseStringPromise=function(b){return new Promise(function(Z){return function(p,W){return Z.parseString(b,function(h,N){return h?W(h):p(N)})}}(this))},u}(I),cg.parseString=function(d,u,b){var Z,p,W;return b!=null?(typeof b=="function"&&(Z=b),typeof u=="object"&&(p=u)):(typeof u=="function"&&(Z=u),p={}),W=new cg.Parser(p),W.parseString(d,Z)},cg.parseStringPromise=function(d,u){var b,Z;return typeof u=="object"&&(b=u),Z=new cg.Parser(b),Z.parseStringPromise(d)}}).call(cg)});var NLe=Y(rg=>{o();(function(){"use strict";var t,e,I,l,n=function(c,r){for(var s in r)a.call(r,s)&&(c[s]=r[s]);function i(){this.constructor=c}return i.prototype=r.prototype,c.prototype=new i,c.__super__=r.prototype,c},a={}.hasOwnProperty;e=Zie(),t=b2t(),I=p2t(),l=WLe(),rg.defaults=e.defaults,rg.processors=l,rg.ValidationError=function(c){n(r,c);function r(s){this.message=s}return r}(Error),rg.Builder=t.Builder,rg.Parser=I.Parser,rg.parseString=I.parseString,rg.parseStringPromise=I.parseStringPromise}).call(rg)});var N2t=Y((Wtc,W2t)=>{o();var Qie=W2t.exports={};Qie.feed=[["author","creator"],["dc:publisher","publisher"],["dc:creator","creator"],["dc:source","source"],["dc:title","title"],["dc:type","type"],"title","description","author","pubDate","webMaster","managingEditor","generator","link","language","copyright","lastBuildDate","docs","generator","ttl","rating","skipHours","skipDays"];Qie.item=[["author","creator"],["dc:creator","creator"],["dc:date","date"],["dc:language","language"],["dc:rights","rights"],["dc:source","source"],["dc:title","title"],"title","link","pubDate","author","summary",["content:encoded","content:encoded",{includeSnippet:!0}],"enclosure","dc:creator","dc:date","comments"];var h2t=function(t){return["itunes:"+t,t]};Qie.podcastFeed=["author","subtitle","summary","explicit"].map(h2t);Qie.podcastItem=["author","subtitle","summary","explicit","duration","image","episode","image","season","keywords","episodeType"].map(h2t)});var fie=Y((Vtc,i6I)=>{i6I.exports={Aacute:"\xC1",aacute:"\xE1",Abreve:"\u0102",abreve:"\u0103",ac:"\u223E",acd:"\u223F",acE:"\u223E\u0333",Acirc:"\xC2",acirc:"\xE2",acute:"\xB4",Acy:"\u0410",acy:"\u0430",AElig:"\xC6",aelig:"\xE6",af:"\u2061",Afr:"\u{1D504}",afr:"\u{1D51E}",Agrave:"\xC0",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",Alpha:"\u0391",alpha:"\u03B1",Amacr:"\u0100",amacr:"\u0101",amalg:"\u2A3F",amp:"&",AMP:"&",andand:"\u2A55",And:"\u2A53",and:"\u2227",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angmsd:"\u2221",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",Aogon:"\u0104",aogon:"\u0105",Aopf:"\u{1D538}",aopf:"\u{1D552}",apacir:"\u2A6F",ap:"\u2248",apE:"\u2A70",ape:"\u224A",apid:"\u224B",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224A",Aring:"\xC5",aring:"\xE5",Ascr:"\u{1D49C}",ascr:"\u{1D4B6}",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224D",Atilde:"\xC3",atilde:"\xE3",Auml:"\xC4",auml:"\xE4",awconint:"\u2233",awint:"\u2A11",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",Backslash:"\u2216",Barv:"\u2AE7",barvee:"\u22BD",barwed:"\u2305",Barwed:"\u2306",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",Bcy:"\u0411",bcy:"\u0431",bdquo:"\u201E",becaus:"\u2235",because:"\u2235",Because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",Bernoullis:"\u212C",Beta:"\u0392",beta:"\u03B2",beth:"\u2136",between:"\u226C",Bfr:"\u{1D505}",bfr:"\u{1D51F}",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bNot:"\u2AED",bnot:"\u2310",Bopf:"\u{1D539}",bopf:"\u{1D553}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxbox:"\u29C9",boxdl:"\u2510",boxdL:"\u2555",boxDl:"\u2556",boxDL:"\u2557",boxdr:"\u250C",boxdR:"\u2552",boxDr:"\u2553",boxDR:"\u2554",boxh:"\u2500",boxH:"\u2550",boxhd:"\u252C",boxHd:"\u2564",boxhD:"\u2565",boxHD:"\u2566",boxhu:"\u2534",boxHu:"\u2567",boxhU:"\u2568",boxHU:"\u2569",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxul:"\u2518",boxuL:"\u255B",boxUl:"\u255C",boxUL:"\u255D",boxur:"\u2514",boxuR:"\u2558",boxUr:"\u2559",boxUR:"\u255A",boxv:"\u2502",boxV:"\u2551",boxvh:"\u253C",boxvH:"\u256A",boxVh:"\u256B",boxVH:"\u256C",boxvl:"\u2524",boxvL:"\u2561",boxVl:"\u2562",boxVL:"\u2563",boxvr:"\u251C",boxvR:"\u255E",boxVr:"\u255F",boxVR:"\u2560",bprime:"\u2035",breve:"\u02D8",Breve:"\u02D8",brvbar:"\xA6",bscr:"\u{1D4B7}",Bscr:"\u212C",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsolb:"\u29C5",bsol:"\\",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpE:"\u2AAE",bumpe:"\u224F",Bumpeq:"\u224E",bumpeq:"\u224F",Cacute:"\u0106",cacute:"\u0107",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",cap:"\u2229",Cap:"\u22D2",capcup:"\u2A47",capdot:"\u2A40",CapitalDifferentialD:"\u2145",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",Cayleys:"\u212D",ccaps:"\u2A4D",Ccaron:"\u010C",ccaron:"\u010D",Ccedil:"\xC7",ccedil:"\xE7",Ccirc:"\u0108",ccirc:"\u0109",Cconint:"\u2230",ccups:"\u2A4C",ccupssm:"\u2A50",Cdot:"\u010A",cdot:"\u010B",cedil:"\xB8",Cedilla:"\xB8",cemptyv:"\u29B2",cent:"\xA2",centerdot:"\xB7",CenterDot:"\xB7",cfr:"\u{1D520}",Cfr:"\u212D",CHcy:"\u0427",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",Chi:"\u03A7",chi:"\u03C7",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",CircleDot:"\u2299",circledR:"\xAE",circledS:"\u24C8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cir:"\u25CB",cirE:"\u29C3",cire:"\u2257",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",colon:":",Colon:"\u2237",Colone:"\u2A74",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",Congruent:"\u2261",conint:"\u222E",Conint:"\u222F",ContourIntegral:"\u222E",copf:"\u{1D554}",Copf:"\u2102",coprod:"\u2210",Coproduct:"\u2210",copy:"\xA9",COPY:"\xA9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21B5",cross:"\u2717",Cross:"\u2A2F",Cscr:"\u{1D49E}",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",cupbrcap:"\u2A48",cupcap:"\u2A46",CupCap:"\u224D",cup:"\u222A",Cup:"\u22D3",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",dagger:"\u2020",Dagger:"\u2021",daleth:"\u2138",darr:"\u2193",Darr:"\u21A1",dArr:"\u21D3",dash:"\u2010",Dashv:"\u2AE4",dashv:"\u22A3",dbkarow:"\u290F",dblac:"\u02DD",Dcaron:"\u010E",dcaron:"\u010F",Dcy:"\u0414",dcy:"\u0434",ddagger:"\u2021",ddarr:"\u21CA",DD:"\u2145",dd:"\u2146",DDotrahd:"\u2911",ddotseq:"\u2A77",deg:"\xB0",Del:"\u2207",Delta:"\u0394",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",Dfr:"\u{1D507}",dfr:"\u{1D521}",dHar:"\u2965",dharl:"\u21C3",dharr:"\u21C2",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",diam:"\u22C4",diamond:"\u22C4",Diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",DifferentialD:"\u2146",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",DJcy:"\u0402",djcy:"\u0452",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",Dopf:"\u{1D53B}",dopf:"\u{1D555}",Dot:"\xA8",dot:"\u02D9",DotDot:"\u20DC",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",DoubleContourIntegral:"\u222F",DoubleDot:"\xA8",DoubleDownArrow:"\u21D3",DoubleLeftArrow:"\u21D0",DoubleLeftRightArrow:"\u21D4",DoubleLeftTee:"\u2AE4",DoubleLongLeftArrow:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",DoubleLongRightArrow:"\u27F9",DoubleRightArrow:"\u21D2",DoubleRightTee:"\u22A8",DoubleUpArrow:"\u21D1",DoubleUpDownArrow:"\u21D5",DoubleVerticalBar:"\u2225",DownArrowBar:"\u2913",downarrow:"\u2193",DownArrow:"\u2193",Downarrow:"\u21D3",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVectorBar:"\u2956",DownLeftVector:"\u21BD",DownRightTeeVector:"\u295F",DownRightVectorBar:"\u2957",DownRightVector:"\u21C1",DownTeeArrow:"\u21A7",DownTee:"\u22A4",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",Dscr:"\u{1D49F}",dscr:"\u{1D4B9}",DScy:"\u0405",dscy:"\u0455",dsol:"\u29F6",Dstrok:"\u0110",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",DZcy:"\u040F",dzcy:"\u045F",dzigrarr:"\u27FF",Eacute:"\xC9",eacute:"\xE9",easter:"\u2A6E",Ecaron:"\u011A",ecaron:"\u011B",Ecirc:"\xCA",ecirc:"\xEA",ecir:"\u2256",ecolon:"\u2255",Ecy:"\u042D",ecy:"\u044D",eDDot:"\u2A77",Edot:"\u0116",edot:"\u0117",eDot:"\u2251",ee:"\u2147",efDot:"\u2252",Efr:"\u{1D508}",efr:"\u{1D522}",eg:"\u2A9A",Egrave:"\xC8",egrave:"\xE8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",Element:"\u2208",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",Emacr:"\u0112",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25FB",emptyv:"\u2205",EmptyVerySmallSquare:"\u25AB",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",ENG:"\u014A",eng:"\u014B",ensp:"\u2002",Eogon:"\u0118",eogon:"\u0119",Eopf:"\u{1D53C}",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",Epsilon:"\u0395",epsilon:"\u03B5",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",Equal:"\u2A75",equals:"=",EqualTilde:"\u2242",equest:"\u225F",Equilibrium:"\u21CC",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erarr:"\u2971",erDot:"\u2253",escr:"\u212F",Escr:"\u2130",esdot:"\u2250",Esim:"\u2A73",esim:"\u2242",Eta:"\u0397",eta:"\u03B7",ETH:"\xD0",eth:"\xF0",Euml:"\xCB",euml:"\xEB",euro:"\u20AC",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",exponentiale:"\u2147",ExponentialE:"\u2147",fallingdotseq:"\u2252",Fcy:"\u0424",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",Ffr:"\u{1D509}",ffr:"\u{1D523}",filig:"\uFB01",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",Fopf:"\u{1D53D}",fopf:"\u{1D557}",forall:"\u2200",ForAll:"\u2200",fork:"\u22D4",forkv:"\u2AD9",Fouriertrf:"\u2131",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",fscr:"\u{1D4BB}",Fscr:"\u2131",gacute:"\u01F5",Gamma:"\u0393",gamma:"\u03B3",Gammad:"\u03DC",gammad:"\u03DD",gap:"\u2A86",Gbreve:"\u011E",gbreve:"\u011F",Gcedil:"\u0122",Gcirc:"\u011C",gcirc:"\u011D",Gcy:"\u0413",gcy:"\u0433",Gdot:"\u0120",gdot:"\u0121",ge:"\u2265",gE:"\u2267",gEl:"\u2A8C",gel:"\u22DB",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",gescc:"\u2AA9",ges:"\u2A7E",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",Gfr:"\u{1D50A}",gfr:"\u{1D524}",gg:"\u226B",Gg:"\u22D9",ggg:"\u22D9",gimel:"\u2137",GJcy:"\u0403",gjcy:"\u0453",gla:"\u2AA5",gl:"\u2277",glE:"\u2A92",glj:"\u2AA4",gnap:"\u2A8A",gnapprox:"\u2A8A",gne:"\u2A88",gnE:"\u2269",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",Gopf:"\u{1D53E}",gopf:"\u{1D558}",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",Gscr:"\u{1D4A2}",gscr:"\u210A",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",gtcc:"\u2AA7",gtcir:"\u2A7A",gt:">",GT:">",Gt:"\u226B",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",Hacek:"\u02C7",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",HARDcy:"\u042A",hardcy:"\u044A",harrcir:"\u2948",harr:"\u2194",hArr:"\u21D4",harrw:"\u21AD",Hat:"^",hbar:"\u210F",Hcirc:"\u0124",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",hfr:"\u{1D525}",Hfr:"\u210C",HilbertSpace:"\u210B",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",hopf:"\u{1D559}",Hopf:"\u210D",horbar:"\u2015",HorizontalLine:"\u2500",hscr:"\u{1D4BD}",Hscr:"\u210B",hslash:"\u210F",Hstrok:"\u0126",hstrok:"\u0127",HumpDownHump:"\u224E",HumpEqual:"\u224F",hybull:"\u2043",hyphen:"\u2010",Iacute:"\xCD",iacute:"\xED",ic:"\u2063",Icirc:"\xCE",icirc:"\xEE",Icy:"\u0418",icy:"\u0438",Idot:"\u0130",IEcy:"\u0415",iecy:"\u0435",iexcl:"\xA1",iff:"\u21D4",ifr:"\u{1D526}",Ifr:"\u2111",Igrave:"\xCC",igrave:"\xEC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",IJlig:"\u0132",ijlig:"\u0133",Imacr:"\u012A",imacr:"\u012B",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",Im:"\u2111",imof:"\u22B7",imped:"\u01B5",Implies:"\u21D2",incare:"\u2105",in:"\u2208",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",intcal:"\u22BA",int:"\u222B",Int:"\u222C",integers:"\u2124",Integral:"\u222B",intercal:"\u22BA",Intersection:"\u22C2",intlarhk:"\u2A17",intprod:"\u2A3C",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",IOcy:"\u0401",iocy:"\u0451",Iogon:"\u012E",iogon:"\u012F",Iopf:"\u{1D540}",iopf:"\u{1D55A}",Iota:"\u0399",iota:"\u03B9",iprod:"\u2A3C",iquest:"\xBF",iscr:"\u{1D4BE}",Iscr:"\u2110",isin:"\u2208",isindot:"\u22F5",isinE:"\u22F9",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",Itilde:"\u0128",itilde:"\u0129",Iukcy:"\u0406",iukcy:"\u0456",Iuml:"\xCF",iuml:"\xEF",Jcirc:"\u0134",jcirc:"\u0135",Jcy:"\u0419",jcy:"\u0439",Jfr:"\u{1D50D}",jfr:"\u{1D527}",jmath:"\u0237",Jopf:"\u{1D541}",jopf:"\u{1D55B}",Jscr:"\u{1D4A5}",jscr:"\u{1D4BF}",Jsercy:"\u0408",jsercy:"\u0458",Jukcy:"\u0404",jukcy:"\u0454",Kappa:"\u039A",kappa:"\u03BA",kappav:"\u03F0",Kcedil:"\u0136",kcedil:"\u0137",Kcy:"\u041A",kcy:"\u043A",Kfr:"\u{1D50E}",kfr:"\u{1D528}",kgreen:"\u0138",KHcy:"\u0425",khcy:"\u0445",KJcy:"\u040C",kjcy:"\u045C",Kopf:"\u{1D542}",kopf:"\u{1D55C}",Kscr:"\u{1D4A6}",kscr:"\u{1D4C0}",lAarr:"\u21DA",Lacute:"\u0139",lacute:"\u013A",laemptyv:"\u29B4",lagran:"\u2112",Lambda:"\u039B",lambda:"\u03BB",lang:"\u27E8",Lang:"\u27EA",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",Laplacetrf:"\u2112",laquo:"\xAB",larrb:"\u21E4",larrbfs:"\u291F",larr:"\u2190",Larr:"\u219E",lArr:"\u21D0",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",latail:"\u2919",lAtail:"\u291B",lat:"\u2AAB",late:"\u2AAD",lates:"\u2AAD\uFE00",lbarr:"\u290C",lBarr:"\u290E",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",Lcaron:"\u013D",lcaron:"\u013E",Lcedil:"\u013B",lcedil:"\u013C",lceil:"\u2308",lcub:"{",Lcy:"\u041B",lcy:"\u043B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",le:"\u2264",lE:"\u2266",LeftAngleBracket:"\u27E8",LeftArrowBar:"\u21E4",leftarrow:"\u2190",LeftArrow:"\u2190",Leftarrow:"\u21D0",LeftArrowRightArrow:"\u21C6",leftarrowtail:"\u21A2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVectorBar:"\u2959",LeftDownVector:"\u21C3",LeftFloor:"\u230A",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",leftrightarrow:"\u2194",LeftRightArrow:"\u2194",Leftrightarrow:"\u21D4",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",LeftRightVector:"\u294E",LeftTeeArrow:"\u21A4",LeftTee:"\u22A3",LeftTeeVector:"\u295A",leftthreetimes:"\u22CB",LeftTriangleBar:"\u29CF",LeftTriangle:"\u22B2",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVectorBar:"\u2958",LeftUpVector:"\u21BF",LeftVectorBar:"\u2952",LeftVector:"\u21BC",lEg:"\u2A8B",leg:"\u22DA",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",lescc:"\u2AA8",les:"\u2A7D",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",LessLess:"\u2AA1",lesssim:"\u2272",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",lfisht:"\u297C",lfloor:"\u230A",Lfr:"\u{1D50F}",lfr:"\u{1D529}",lg:"\u2276",lgE:"\u2A91",lHar:"\u2962",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",LJcy:"\u0409",ljcy:"\u0459",llarr:"\u21C7",ll:"\u226A",Ll:"\u22D8",llcorner:"\u231E",Lleftarrow:"\u21DA",llhard:"\u296B",lltri:"\u25FA",Lmidot:"\u013F",lmidot:"\u0140",lmoustache:"\u23B0",lmoust:"\u23B0",lnap:"\u2A89",lnapprox:"\u2A89",lne:"\u2A87",lnE:"\u2268",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",longleftarrow:"\u27F5",LongLeftArrow:"\u27F5",Longleftarrow:"\u27F8",longleftrightarrow:"\u27F7",LongLeftRightArrow:"\u27F7",Longleftrightarrow:"\u27FA",longmapsto:"\u27FC",longrightarrow:"\u27F6",LongRightArrow:"\u27F6",Longrightarrow:"\u27F9",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",Lopf:"\u{1D543}",lopf:"\u{1D55D}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",lscr:"\u{1D4C1}",Lscr:"\u2112",lsh:"\u21B0",Lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",Lstrok:"\u0141",lstrok:"\u0142",ltcc:"\u2AA6",ltcir:"\u2A79",lt:"<",LT:"<",Lt:"\u226A",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",ltrPar:"\u2996",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",Map:"\u2905",map:"\u21A6",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",Mcy:"\u041C",mcy:"\u043C",mdash:"\u2014",mDDot:"\u223A",measuredangle:"\u2221",MediumSpace:"\u205F",Mellintrf:"\u2133",Mfr:"\u{1D510}",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",midast:"*",midcir:"\u2AF0",mid:"\u2223",middot:"\xB7",minusb:"\u229F",minus:"\u2212",minusd:"\u2238",minusdu:"\u2A2A",MinusPlus:"\u2213",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",Mopf:"\u{1D544}",mopf:"\u{1D55E}",mp:"\u2213",mscr:"\u{1D4C2}",Mscr:"\u2133",mstpos:"\u223E",Mu:"\u039C",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nabla:"\u2207",Nacute:"\u0143",nacute:"\u0144",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natural:"\u266E",naturals:"\u2115",natur:"\u266E",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",Ncaron:"\u0147",ncaron:"\u0148",Ncedil:"\u0145",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",Ncy:"\u041D",ncy:"\u043D",ndash:"\u2013",nearhk:"\u2924",nearr:"\u2197",neArr:"\u21D7",nearrow:"\u2197",ne:"\u2260",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:` +`,nexist:"\u2204",nexists:"\u2204",Nfr:"\u{1D511}",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",nGg:"\u22D9\u0338",ngsim:"\u2275",nGt:"\u226B\u20D2",ngt:"\u226F",ngtr:"\u226F",nGtv:"\u226B\u0338",nharr:"\u21AE",nhArr:"\u21CE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",NJcy:"\u040A",njcy:"\u045A",nlarr:"\u219A",nlArr:"\u21CD",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nleftarrow:"\u219A",nLeftarrow:"\u21CD",nleftrightarrow:"\u21AE",nLeftrightarrow:"\u21CE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nLl:"\u22D8\u0338",nlsim:"\u2274",nLt:"\u226A\u20D2",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nLtv:"\u226A\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nopf:"\u{1D55F}",Nopf:"\u2115",Not:"\u2AEC",not:"\xAC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",notin:"\u2209",notindot:"\u22F5\u0338",notinE:"\u22F9\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangle:"\u22EA",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangle:"\u22EB",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",nparallel:"\u2226",npar:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",nprec:"\u2280",npreceq:"\u2AAF\u0338",npre:"\u2AAF\u0338",nrarrc:"\u2933\u0338",nrarr:"\u219B",nrArr:"\u21CF",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nRightarrow:"\u21CF",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",Nscr:"\u{1D4A9}",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",Ntilde:"\xD1",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",Nu:"\u039D",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvDash:"\u22AD",nVdash:"\u22AE",nVDash:"\u22AF",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvHarr:"\u2904",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwarhk:"\u2923",nwarr:"\u2196",nwArr:"\u21D6",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xD3",oacute:"\xF3",oast:"\u229B",Ocirc:"\xD4",ocirc:"\xF4",ocir:"\u229A",Ocy:"\u041E",ocy:"\u043E",odash:"\u229D",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29BF",Ofr:"\u{1D512}",ofr:"\u{1D52C}",ogon:"\u02DB",Ograve:"\xD2",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",Omacr:"\u014C",omacr:"\u014D",Omega:"\u03A9",omega:"\u03C9",Omicron:"\u039F",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",Oopf:"\u{1D546}",oopf:"\u{1D560}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",orarr:"\u21BB",Or:"\u2A54",or:"\u2228",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",Oscr:"\u{1D4AA}",oscr:"\u2134",Oslash:"\xD8",oslash:"\xF8",osol:"\u2298",Otilde:"\xD5",otilde:"\xF5",otimesas:"\u2A36",Otimes:"\u2A37",otimes:"\u2297",Ouml:"\xD6",ouml:"\xF6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",para:"\xB6",parallel:"\u2225",par:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",PartialD:"\u2202",Pcy:"\u041F",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",Pfr:"\u{1D513}",pfr:"\u{1D52D}",Phi:"\u03A6",phi:"\u03C6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",Pi:"\u03A0",pi:"\u03C0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plus:"+",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",PlusMinus:"\xB1",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",Poincareplane:"\u210C",pointint:"\u2A15",popf:"\u{1D561}",Popf:"\u2119",pound:"\xA3",prap:"\u2AB7",Pr:"\u2ABB",pr:"\u227A",prcue:"\u227C",precapprox:"\u2AB7",prec:"\u227A",preccurlyeq:"\u227C",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",pre:"\u2AAF",prE:"\u2AB3",precsim:"\u227E",prime:"\u2032",Prime:"\u2033",primes:"\u2119",prnap:"\u2AB9",prnE:"\u2AB5",prnsim:"\u22E8",prod:"\u220F",Product:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",Proportional:"\u221D",Proportion:"\u2237",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",Pscr:"\u{1D4AB}",pscr:"\u{1D4C5}",Psi:"\u03A8",psi:"\u03C8",puncsp:"\u2008",Qfr:"\u{1D514}",qfr:"\u{1D52E}",qint:"\u2A0C",qopf:"\u{1D562}",Qopf:"\u211A",qprime:"\u2057",Qscr:"\u{1D4AC}",qscr:"\u{1D4C6}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",quot:'"',QUOT:'"',rAarr:"\u21DB",race:"\u223D\u0331",Racute:"\u0154",racute:"\u0155",radic:"\u221A",raemptyv:"\u29B3",rang:"\u27E9",Rang:"\u27EB",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarr:"\u2192",Rarr:"\u21A0",rArr:"\u21D2",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",Rarrtl:"\u2916",rarrtl:"\u21A3",rarrw:"\u219D",ratail:"\u291A",rAtail:"\u291C",ratio:"\u2236",rationals:"\u211A",rbarr:"\u290D",rBarr:"\u290F",RBarr:"\u2910",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",Rcaron:"\u0158",rcaron:"\u0159",Rcedil:"\u0156",rcedil:"\u0157",rceil:"\u2309",rcub:"}",Rcy:"\u0420",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",Re:"\u211C",rect:"\u25AD",reg:"\xAE",REG:"\xAE",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",rfisht:"\u297D",rfloor:"\u230B",rfr:"\u{1D52F}",Rfr:"\u211C",rHar:"\u2964",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",Rho:"\u03A1",rho:"\u03C1",rhov:"\u03F1",RightAngleBracket:"\u27E9",RightArrowBar:"\u21E5",rightarrow:"\u2192",RightArrow:"\u2192",Rightarrow:"\u21D2",RightArrowLeftArrow:"\u21C4",rightarrowtail:"\u21A3",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVectorBar:"\u2955",RightDownVector:"\u21C2",RightFloor:"\u230B",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",RightTeeArrow:"\u21A6",RightTee:"\u22A2",RightTeeVector:"\u295B",rightthreetimes:"\u22CC",RightTriangleBar:"\u29D0",RightTriangle:"\u22B3",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVectorBar:"\u2954",RightUpVector:"\u21BE",RightVectorBar:"\u2953",RightVector:"\u21C0",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoustache:"\u23B1",rmoust:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",ropf:"\u{1D563}",Ropf:"\u211D",roplus:"\u2A2E",rotimes:"\u2A35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",Rrightarrow:"\u21DB",rsaquo:"\u203A",rscr:"\u{1D4C7}",Rscr:"\u211B",rsh:"\u21B1",Rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",RuleDelayed:"\u29F4",ruluhar:"\u2968",rx:"\u211E",Sacute:"\u015A",sacute:"\u015B",sbquo:"\u201A",scap:"\u2AB8",Scaron:"\u0160",scaron:"\u0161",Sc:"\u2ABC",sc:"\u227B",sccue:"\u227D",sce:"\u2AB0",scE:"\u2AB4",Scedil:"\u015E",scedil:"\u015F",Scirc:"\u015C",scirc:"\u015D",scnap:"\u2ABA",scnE:"\u2AB6",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",Scy:"\u0421",scy:"\u0441",sdotb:"\u22A1",sdot:"\u22C5",sdote:"\u2A66",searhk:"\u2925",searr:"\u2198",seArr:"\u21D8",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",Sfr:"\u{1D516}",sfr:"\u{1D530}",sfrown:"\u2322",sharp:"\u266F",SHCHcy:"\u0429",shchcy:"\u0449",SHcy:"\u0428",shcy:"\u0448",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\xAD",Sigma:"\u03A3",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",SOFTcy:"\u042C",softcy:"\u044C",solbar:"\u233F",solb:"\u29C4",sol:"/",Sopf:"\u{1D54A}",sopf:"\u{1D564}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",Sqrt:"\u221A",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",square:"\u25A1",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25AA",squ:"\u25A1",squf:"\u25AA",srarr:"\u2192",Sscr:"\u{1D4AE}",sscr:"\u{1D4C8}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",Star:"\u22C6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",sub:"\u2282",Sub:"\u22D0",subdot:"\u2ABD",subE:"\u2AC5",sube:"\u2286",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subne:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",subset:"\u2282",Subset:"\u22D0",subseteq:"\u2286",subseteqq:"\u2AC5",SubsetEqual:"\u2286",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succapprox:"\u2AB8",succ:"\u227B",succcurlyeq:"\u227D",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",SuchThat:"\u220B",sum:"\u2211",Sum:"\u2211",sung:"\u266A",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",sup:"\u2283",Sup:"\u22D1",supdot:"\u2ABE",supdsub:"\u2AD8",supE:"\u2AC6",supe:"\u2287",supedot:"\u2AC4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supne:"\u228B",supplus:"\u2AC0",supset:"\u2283",Supset:"\u22D1",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swarhk:"\u2926",swarr:"\u2199",swArr:"\u21D9",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",Tab:" ",target:"\u2316",Tau:"\u03A4",tau:"\u03C4",tbrk:"\u23B4",Tcaron:"\u0164",tcaron:"\u0165",Tcedil:"\u0162",tcedil:"\u0163",Tcy:"\u0422",tcy:"\u0442",tdot:"\u20DB",telrec:"\u2315",Tfr:"\u{1D517}",tfr:"\u{1D531}",there4:"\u2234",therefore:"\u2234",Therefore:"\u2234",Theta:"\u0398",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",ThickSpace:"\u205F\u200A",ThinSpace:"\u2009",thinsp:"\u2009",thkap:"\u2248",thksim:"\u223C",THORN:"\xDE",thorn:"\xFE",tilde:"\u02DC",Tilde:"\u223C",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",timesbar:"\u2A31",timesb:"\u22A0",times:"\xD7",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",topbot:"\u2336",topcir:"\u2AF1",top:"\u22A4",Topf:"\u{1D54B}",topf:"\u{1D565}",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",trade:"\u2122",TRADE:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",TripleDot:"\u20DB",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",Tscr:"\u{1D4AF}",tscr:"\u{1D4C9}",TScy:"\u0426",tscy:"\u0446",TSHcy:"\u040B",tshcy:"\u045B",Tstrok:"\u0166",tstrok:"\u0167",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",Uacute:"\xDA",uacute:"\xFA",uarr:"\u2191",Uarr:"\u219F",uArr:"\u21D1",Uarrocir:"\u2949",Ubrcy:"\u040E",ubrcy:"\u045E",Ubreve:"\u016C",ubreve:"\u016D",Ucirc:"\xDB",ucirc:"\xFB",Ucy:"\u0423",ucy:"\u0443",udarr:"\u21C5",Udblac:"\u0170",udblac:"\u0171",udhar:"\u296E",ufisht:"\u297E",Ufr:"\u{1D518}",ufr:"\u{1D532}",Ugrave:"\xD9",ugrave:"\xF9",uHar:"\u2963",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",Umacr:"\u016A",umacr:"\u016B",uml:"\xA8",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",uogon:"\u0173",Uopf:"\u{1D54C}",uopf:"\u{1D566}",UpArrowBar:"\u2912",uparrow:"\u2191",UpArrow:"\u2191",Uparrow:"\u21D1",UpArrowDownArrow:"\u21C5",updownarrow:"\u2195",UpDownArrow:"\u2195",Updownarrow:"\u21D5",UpEquilibrium:"\u296E",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",upsi:"\u03C5",Upsi:"\u03D2",upsih:"\u03D2",Upsilon:"\u03A5",upsilon:"\u03C5",UpTeeArrow:"\u21A5",UpTee:"\u22A5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",Uring:"\u016E",uring:"\u016F",urtri:"\u25F9",Uscr:"\u{1D4B0}",uscr:"\u{1D4CA}",utdot:"\u22F0",Utilde:"\u0168",utilde:"\u0169",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",Uuml:"\xDC",uuml:"\xFC",uwangle:"\u29A7",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",varr:"\u2195",vArr:"\u21D5",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",vBar:"\u2AE8",Vbar:"\u2AEB",vBarv:"\u2AE9",Vcy:"\u0412",vcy:"\u0432",vdash:"\u22A2",vDash:"\u22A8",Vdash:"\u22A9",VDash:"\u22AB",Vdashl:"\u2AE6",veebar:"\u22BB",vee:"\u2228",Vee:"\u22C1",veeeq:"\u225A",vellip:"\u22EE",verbar:"|",Verbar:"\u2016",vert:"|",Vert:"\u2016",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",Vfr:"\u{1D519}",vfr:"\u{1D533}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",Vopf:"\u{1D54D}",vopf:"\u{1D567}",vprop:"\u221D",vrtri:"\u22B3",Vscr:"\u{1D4B1}",vscr:"\u{1D4CB}",vsubnE:"\u2ACB\uFE00",vsubne:"\u228A\uFE00",vsupnE:"\u2ACC\uFE00",vsupne:"\u228B\uFE00",Vvdash:"\u22AA",vzigzag:"\u299A",Wcirc:"\u0174",wcirc:"\u0175",wedbar:"\u2A5F",wedge:"\u2227",Wedge:"\u22C0",wedgeq:"\u2259",weierp:"\u2118",Wfr:"\u{1D51A}",wfr:"\u{1D534}",Wopf:"\u{1D54E}",wopf:"\u{1D568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",Wscr:"\u{1D4B2}",wscr:"\u{1D4CC}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",Xfr:"\u{1D51B}",xfr:"\u{1D535}",xharr:"\u27F7",xhArr:"\u27FA",Xi:"\u039E",xi:"\u03BE",xlarr:"\u27F5",xlArr:"\u27F8",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",Xopf:"\u{1D54F}",xopf:"\u{1D569}",xoplus:"\u2A01",xotime:"\u2A02",xrarr:"\u27F6",xrArr:"\u27F9",Xscr:"\u{1D4B3}",xscr:"\u{1D4CD}",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",Yacute:"\xDD",yacute:"\xFD",YAcy:"\u042F",yacy:"\u044F",Ycirc:"\u0176",ycirc:"\u0177",Ycy:"\u042B",ycy:"\u044B",yen:"\xA5",Yfr:"\u{1D51C}",yfr:"\u{1D536}",YIcy:"\u0407",yicy:"\u0457",Yopf:"\u{1D550}",yopf:"\u{1D56A}",Yscr:"\u{1D4B4}",yscr:"\u{1D4CE}",YUcy:"\u042E",yucy:"\u044E",yuml:"\xFF",Yuml:"\u0178",Zacute:"\u0179",zacute:"\u017A",Zcaron:"\u017D",zcaron:"\u017E",Zcy:"\u0417",zcy:"\u0437",Zdot:"\u017B",zdot:"\u017C",zeetrf:"\u2128",ZeroWidthSpace:"\u200B",Zeta:"\u0396",zeta:"\u03B6",zfr:"\u{1D537}",Zfr:"\u2128",ZHcy:"\u0416",zhcy:"\u0436",zigrarr:"\u21DD",zopf:"\u{1D56B}",Zopf:"\u2124",Zscr:"\u{1D4B5}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"}});var VLe=Y((Ytc,G6I)=>{G6I.exports={Aacute:"\xC1",aacute:"\xE1",Acirc:"\xC2",acirc:"\xE2",acute:"\xB4",AElig:"\xC6",aelig:"\xE6",Agrave:"\xC0",agrave:"\xE0",amp:"&",AMP:"&",Aring:"\xC5",aring:"\xE5",Atilde:"\xC3",atilde:"\xE3",Auml:"\xC4",auml:"\xE4",brvbar:"\xA6",Ccedil:"\xC7",ccedil:"\xE7",cedil:"\xB8",cent:"\xA2",copy:"\xA9",COPY:"\xA9",curren:"\xA4",deg:"\xB0",divide:"\xF7",Eacute:"\xC9",eacute:"\xE9",Ecirc:"\xCA",ecirc:"\xEA",Egrave:"\xC8",egrave:"\xE8",ETH:"\xD0",eth:"\xF0",Euml:"\xCB",euml:"\xEB",frac12:"\xBD",frac14:"\xBC",frac34:"\xBE",gt:">",GT:">",Iacute:"\xCD",iacute:"\xED",Icirc:"\xCE",icirc:"\xEE",iexcl:"\xA1",Igrave:"\xCC",igrave:"\xEC",iquest:"\xBF",Iuml:"\xCF",iuml:"\xEF",laquo:"\xAB",lt:"<",LT:"<",macr:"\xAF",micro:"\xB5",middot:"\xB7",nbsp:"\xA0",not:"\xAC",Ntilde:"\xD1",ntilde:"\xF1",Oacute:"\xD3",oacute:"\xF3",Ocirc:"\xD4",ocirc:"\xF4",Ograve:"\xD2",ograve:"\xF2",ordf:"\xAA",ordm:"\xBA",Oslash:"\xD8",oslash:"\xF8",Otilde:"\xD5",otilde:"\xF5",Ouml:"\xD6",ouml:"\xF6",para:"\xB6",plusmn:"\xB1",pound:"\xA3",quot:'"',QUOT:'"',raquo:"\xBB",reg:"\xAE",REG:"\xAE",sect:"\xA7",shy:"\xAD",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",szlig:"\xDF",THORN:"\xDE",thorn:"\xFE",times:"\xD7",Uacute:"\xDA",uacute:"\xFA",Ucirc:"\xDB",ucirc:"\xFB",Ugrave:"\xD9",ugrave:"\xF9",uml:"\xA8",Uuml:"\xDC",uuml:"\xFC",Yacute:"\xDD",yacute:"\xFD",yen:"\xA5",yuml:"\xFF"}});var Eie=Y((Rtc,d6I)=>{d6I.exports={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}});var V2t=Y((Atc,u6I)=>{u6I.exports={"0":65533,"128":8364,"130":8218,"131":402,"132":8222,"133":8230,"134":8224,"135":8225,"136":710,"137":8240,"138":352,"139":8249,"140":338,"142":381,"145":8216,"146":8217,"147":8220,"148":8221,"149":8226,"150":8211,"151":8212,"152":732,"153":8482,"154":353,"155":8250,"156":339,"158":382,"159":376}});var YLe=Y(UD=>{"use strict";o();var b6I=UD&&UD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(UD,"__esModule",{value:!0});var Y2t=b6I(V2t()),m6I=String.fromCodePoint||function(t){var e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|t&1023),e+=String.fromCharCode(t),e};function Z6I(t){return t>=55296&&t<=57343||t>1114111?"\uFFFD":(t in Y2t.default&&(t=Y2t.default[t]),m6I(t))}UD.default=Z6I});var ALe=Y(vF=>{"use strict";o();var Jie=vF&&vF.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(vF,"__esModule",{value:!0});vF.decodeHTML=vF.decodeHTMLStrict=vF.decodeXML=void 0;var RLe=Jie(fie()),p6I=Jie(VLe()),h6I=Jie(Eie()),R2t=Jie(YLe()),W6I=/&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g;vF.decodeXML=F2t(h6I.default);vF.decodeHTMLStrict=F2t(RLe.default);function F2t(t){var e=X2t(t);return function(I){return String(I).replace(W6I,e)}}var A2t=function(t,e){return t{"use strict";o();var g2t=Db&&Db.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Db,"__esModule",{value:!0});Db.escapeUTF8=Db.escape=Db.encodeNonAsciiHTML=Db.encodeHTML=Db.encodeXML=void 0;var N6I=g2t(Eie()),v2t=w2t(N6I.default),y2t=H2t(v2t);Db.encodeXML=E2t(v2t);var V6I=g2t(fie()),FLe=w2t(V6I.default),Y6I=H2t(FLe);Db.encodeHTML=A6I(FLe,Y6I);Db.encodeNonAsciiHTML=E2t(FLe);function w2t(t){return Object.keys(t).sort().reduce(function(e,I){return e[t[I]]="&"+I+";",e},{})}function H2t(t){for(var e=[],I=[],l=0,n=Object.keys(t);l1?R6I(t):t.charCodeAt(0)).toString(16).toUpperCase()+";"}function A6I(t,e){return function(I){return I.replace(e,function(l){return t[l]}).replace(Q2t,Cie)}}var f2t=new RegExp(y2t.source+"|"+Q2t.source,"g");function F6I(t){return t.replace(f2t,Cie)}Db.escape=F6I;function X6I(t){return t.replace(y2t,Cie)}Db.escapeUTF8=X6I;function E2t(t){return function(e){return e.replace(f2t,function(I){return t[I]||Cie(I)})}}});var kie=Y(gl=>{"use strict";o();Object.defineProperty(gl,"__esModule",{value:!0});gl.decodeXMLStrict=gl.decodeHTML5Strict=gl.decodeHTML4Strict=gl.decodeHTML5=gl.decodeHTML4=gl.decodeHTMLStrict=gl.decodeHTML=gl.decodeXML=gl.encodeHTML5=gl.encodeHTML4=gl.escapeUTF8=gl.escape=gl.encodeNonAsciiHTML=gl.encodeHTML=gl.encodeXML=gl.encode=gl.decodeStrict=gl.decode=void 0;var Lie=ALe(),J2t=XLe();function g6I(t,e){return(!e||e<=0?Lie.decodeXML:Lie.decodeHTML)(t)}gl.decode=g6I;function v6I(t,e){return(!e||e<=0?Lie.decodeXML:Lie.decodeHTMLStrict)(t)}gl.decodeStrict=v6I;function y6I(t,e){return(!e||e<=0?J2t.encodeXML:J2t.encodeHTML)(t)}gl.encode=y6I;var DC=XLe();Object.defineProperty(gl,"encodeXML",{enumerable:!0,get:function(){return DC.encodeXML}});Object.defineProperty(gl,"encodeHTML",{enumerable:!0,get:function(){return DC.encodeHTML}});Object.defineProperty(gl,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return DC.encodeNonAsciiHTML}});Object.defineProperty(gl,"escape",{enumerable:!0,get:function(){return DC.escape}});Object.defineProperty(gl,"escapeUTF8",{enumerable:!0,get:function(){return DC.escapeUTF8}});Object.defineProperty(gl,"encodeHTML4",{enumerable:!0,get:function(){return DC.encodeHTML}});Object.defineProperty(gl,"encodeHTML5",{enumerable:!0,get:function(){return DC.encodeHTML}});var FQ=ALe();Object.defineProperty(gl,"decodeXML",{enumerable:!0,get:function(){return FQ.decodeXML}});Object.defineProperty(gl,"decodeHTML",{enumerable:!0,get:function(){return FQ.decodeHTML}});Object.defineProperty(gl,"decodeHTMLStrict",{enumerable:!0,get:function(){return FQ.decodeHTMLStrict}});Object.defineProperty(gl,"decodeHTML4",{enumerable:!0,get:function(){return FQ.decodeHTML}});Object.defineProperty(gl,"decodeHTML5",{enumerable:!0,get:function(){return FQ.decodeHTML}});Object.defineProperty(gl,"decodeHTML4Strict",{enumerable:!0,get:function(){return FQ.decodeHTMLStrict}});Object.defineProperty(gl,"decodeHTML5Strict",{enumerable:!0,get:function(){return FQ.decodeHTMLStrict}});Object.defineProperty(gl,"decodeXMLStrict",{enumerable:!0,get:function(){return FQ.decodeXML}})});var L2t=Y((ftc,C2t)=>{o();var sg=C2t.exports={},w6I=kie(),H6I=NLe();sg.stripHtml=function(t){return t=t.replace(/([^\n])<\/?(h|br|p|ul|ol|li|blockquote|section|table|tr|div)(?:.|\n)*?>([^\n])/gm,`$1 +$3`),t=t.replace(/<(?:.|\n)*?>/gm,""),t};sg.getSnippet=function(t){return w6I.decodeHTML(sg.stripHtml(t)).trim()};sg.getLink=function(t,e,I){if(t){for(let l=0;l2&&(c=l[2]));let{keepArray:r,includeSnippet:s}=c;t[n]!==void 0&&(e[a]=r?t[n]:t[n][0]),e[a]&&typeof e[a]._=="string"&&(e[a]=e[a]._),s&&e[a]&&typeof e[a]=="string"&&(e[a+"Snippet"]=sg.getSnippet(e[a]))})};sg.maybePromisify=function(t,e){return t?e.then(I=>setTimeout(()=>t(null,I)),I=>setTimeout(()=>t(I))):e};var Q6I="utf8",f6I=/(encoding|charset)\s*=\s*(\S+)/,E6I=["ascii","utf8","utf16le","ucs2","base64","latin1","binary","hex"],J6I={"utf-8":"utf8","iso-8859-1":"latin1"};sg.getEncodingFromContentType=function(t){t=t||"";let I=(t.match(f6I)||[])[2]||"";return I=I.toLowerCase(),I=J6I[I]||I,(!I||E6I.indexOf(I)===-1)&&(I=Q6I),I}});var j2t=Y((Jtc,x2t)=>{"use strict";o();var C6I=require("http"),L6I=require("https"),k6I=NLe(),k2t=require("url"),xie=N2t(),Xi=L2t(),x6I={"User-Agent":"rss-parser",Accept:"application/rss+xml"},j6I=5,U6I=6e4,gLe=class{constructor(e={}){e.headers=e.headers||{},e.xml2js=e.xml2js||{},e.customFields=e.customFields||{},e.customFields.item=e.customFields.item||[],e.customFields.feed=e.customFields.feed||[],e.requestOptions=e.requestOptions||{},e.maxRedirects||(e.maxRedirects=j6I),e.timeout||(e.timeout=U6I),this.options=e,this.xmlParser=new k6I.Parser(this.options.xml2js)}parseString(e,I){let l=new Promise((n,a)=>{this.xmlParser.parseString(e,(c,r)=>{if(c)return a(c);if(!r)return a(new Error("Unable to parse XML."));let s=null;if(r.feed)s=this.buildAtomFeed(r);else if(r.rss&&r.rss.$&&r.rss.$.version&&r.rss.$.version.match(/^2/))s=this.buildRSS2(r);else if(r["rdf:RDF"])s=this.buildRSS1(r);else if(r.rss&&r.rss.$&&r.rss.$.version&&r.rss.$.version.match(/0\.9/))s=this.buildRSS0_9(r);else if(r.rss&&this.options.defaultRSS)switch(this.options.defaultRSS){case .9:s=this.buildRSS0_9(r);break;case 1:s=this.buildRSS1(r);break;case 2:s=this.buildRSS2(r);break;default:return a(new Error("default RSS version not recognized."))}else return a(new Error("Feed not recognized as RSS 1 or 2."));n(s)})});return l=Xi.maybePromisify(I,l),l}parseURL(e,I,l=0){let n="",a=e.indexOf("https")===0?L6I.get:C6I.get,c=k2t.parse(e),r=Object.assign({},x6I,this.options.headers),s=null,i=new Promise((G,d)=>{let u=Object.assign({headers:r},c,this.options.requestOptions);a(u,Z=>{if(this.options.maxRedirects&&Z.statusCode>=300&&Z.statusCode<400&&Z.headers.location){if(l===this.options.maxRedirects)return d(new Error("Too many redirects"));{let W=k2t.resolve(e,Z.headers.location);return this.parseURL(W,null,l+1).then(G,d)}}else if(Z.statusCode>=300)return d(new Error("Status code "+Z.statusCode));let p=Xi.getEncodingFromContentType(Z.headers["content-type"]);Z.setEncoding(p),Z.on("data",W=>{n+=W}),Z.on("end",()=>this.parseString(n).then(G,d))}).on("error",d),s=setTimeout(()=>d(new Error("Request timed out after "+this.options.timeout+"ms")),this.options.timeout)}).then(G=>(clearTimeout(s),Promise.resolve(G)),G=>(clearTimeout(s),Promise.reject(G)));return i=Xi.maybePromisify(I,i),i}buildAtomFeed(e){let I={items:[]};if(Xi.copyFromXML(e.feed,I,this.options.customFields.feed),e.feed.link&&(I.link=Xi.getLink(e.feed.link,"alternate",0),I.feedUrl=Xi.getLink(e.feed.link,"self",1)),e.feed.title){let l=e.feed.title[0]||"";l._&&(l=l._),l&&(I.title=l)}return e.feed.updated&&(I.lastBuildDate=e.feed.updated[0]),I.items=(e.feed.entry||[]).map(l=>this.parseItemAtom(l)),I}parseItemAtom(e){let I={};if(Xi.copyFromXML(e,I,this.options.customFields.item),e.title){let l=e.title[0]||"";l._&&(l=l._),l&&(I.title=l)}return e.link&&e.link.length&&(I.link=Xi.getLink(e.link,"alternate",0)),e.published&&e.published.length&&e.published[0].length&&(I.pubDate=new Date(e.published[0]).toISOString()),!I.pubDate&&e.updated&&e.updated.length&&e.updated[0].length&&(I.pubDate=new Date(e.updated[0]).toISOString()),e.author&&e.author.length&&e.author[0].name&&e.author[0].name.length&&(I.author=e.author[0].name[0]),e.content&&e.content.length&&(I.content=Xi.getContent(e.content[0]),I.contentSnippet=Xi.getSnippet(I.content)),e.summary&&e.summary.length&&(I.summary=Xi.getContent(e.summary[0])),e.id&&(I.id=e.id[0]),this.setISODate(I),I}buildRSS0_9(e){var I=e.rss.channel[0],l=I.item;return this.buildRSS(I,l)}buildRSS1(e){e=e["rdf:RDF"];let I=e.channel[0],l=e.item;return this.buildRSS(I,l)}buildRSS2(e){let I=e.rss.channel[0],l=I.item,n=this.buildRSS(I,l);return e.rss.$&&e.rss.$["xmlns:itunes"]&&this.decorateItunes(n,I),n}buildRSS(e,I){I=I||[];let l={items:[]},n=xie.feed.concat(this.options.customFields.feed),a=xie.item.concat(this.options.customFields.item);if(e["atom:link"]&&e["atom:link"][0]&&e["atom:link"][0].$&&(l.feedUrl=e["atom:link"][0].$.href),e.image&&e.image[0]&&e.image[0].url){l.image={};let r=e.image[0];r.link&&(l.image.link=r.link[0]),r.url&&(l.image.url=r.url[0]),r.title&&(l.image.title=r.title[0]),r.width&&(l.image.width=r.width[0]),r.height&&(l.image.height=r.height[0])}let c=this.generatePaginationLinks(e);return Object.keys(c).length&&(l.paginationLinks=c),Xi.copyFromXML(e,l,n),l.items=I.map(r=>this.parseItemRss(r,a)),l}parseItemRss(e,I){let l={};return Xi.copyFromXML(e,l,I),e.enclosure&&(l.enclosure=e.enclosure[0].$),e.description&&(l.content=Xi.getContent(e.description[0]),l.contentSnippet=Xi.getSnippet(l.content)),e.guid&&(l.guid=e.guid[0],l.guid._&&(l.guid=l.guid._)),e.$&&e.$["rdf:about"]&&(l["rdf:about"]=e.$["rdf:about"]),e.category&&(l.categories=e.category),this.setISODate(l),l}decorateItunes(e,I){let l=I.item||[],n=[];if(e.itunes={},I["itunes:owner"]){let a={};I["itunes:owner"][0]["itunes:name"]&&(a.name=I["itunes:owner"][0]["itunes:name"][0]),I["itunes:owner"][0]["itunes:email"]&&(a.email=I["itunes:owner"][0]["itunes:email"][0]),e.itunes.owner=a}if(I["itunes:image"]){let a;a=I["itunes:image"][0]&&I["itunes:image"][0].$&&I["itunes:image"][0].$.href?I["itunes:image"][0].$.href:null,a&&(e.itunes.image=a)}if(I["itunes:category"]){let a=I["itunes:category"].map(c=>({name:c&&c.$&&c.$.text,subs:c["itunes:category"]?c["itunes:category"].map(r=>({name:r&&r.$&&r.$.text})):null}));e.itunes.categories=a.map(c=>c.name),e.itunes.categoriesWithSubs=a}if(I["itunes:keywords"])if(I["itunes:keywords"].length>1)e.itunes.keywords=I["itunes:keywords"].map(a=>a&&a.$&&a.$.text);else{let a=I["itunes:keywords"][0];a&&typeof a._=="string"&&(a=a._),a&&a.$&&a.$.text?e.itunes.keywords=a.$.text.split(","):typeof a=="string"&&(e.itunes.keywords=a.split(","))}Xi.copyFromXML(I,e.itunes,xie.podcastFeed),l.forEach((a,c)=>{let r=e.items[c];r.itunes={},Xi.copyFromXML(a,r.itunes,xie.podcastItem);let s=a["itunes:image"];s&&s[0]&&s[0].$&&s[0].$.href&&(r.itunes.image=s[0].$.href)})}setISODate(e){let I=e.pubDate||e.date;if(I)try{e.isoDate=new Date(I.trim()).toISOString()}catch{}}generatePaginationLinks(e){if(!e["atom:link"])return{};let I=["self","first","next","prev","last"];return e["atom:link"].reduce((l,n)=>(!n.$||!I.includes(n.$.rel)||(l[n.$.rel]=n.$.href),l),{})}};x2t.exports=gLe});var O2t=Y((Ltc,U2t)=>{"use strict";o();U2t.exports=j2t()});var XQ=Y((aIc,aXt)=>{o();var B6I="Expected a function",q2t="__lodash_hash_undefined__",P2t=1/0,M6I=9007199254740991,S6I="[object Function]",T6I="[object GeneratorFunction]",_6I="[object Symbol]",K6I=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,D6I=/^\w*$/,q6I=/^\./,P6I=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,$6I=/[\\^$.*+?()[\]{}|]/g,eqI=/\\(\\)?/g,tqI=/^\[object .+?Constructor\]$/,IqI=/^(?:0|[1-9]\d*)$/,lqI=typeof global=="object"&&global&&global.Object===Object&&global,nqI=typeof self=="object"&&self&&self.Object===Object&&self,HLe=lqI||nqI||Function("return this")();function aqI(t,e){return t?.[e]}function cqI(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch{}return e}var rqI=Array.prototype,sqI=Function.prototype,$2t=Object.prototype,wLe=HLe["__core-js_shared__"],T2t=function(){var t=/[^.]+$/.exec(wLe&&wLe.keys&&wLe.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),eXt=sqI.toString,Oie=$2t.hasOwnProperty,tXt=$2t.toString,oqI=RegExp("^"+eXt.call(Oie).replace($6I,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),_2t=HLe.Symbol,iqI=rqI.splice,GqI=IXt(HLe,"Map"),MD=IXt(Object,"create"),K2t=_2t?_2t.prototype:void 0,D2t=K2t?K2t.toString:void 0;function qC(t){var e=-1,I=t?t.length:0;for(this.clear();++e-1}function VqI(t,e){var I=this.__data__,l=zie(I,t);return l<0?I.push([t,e]):I[l][1]=e,this}Hj.prototype.clear=pqI;Hj.prototype.delete=hqI;Hj.prototype.get=WqI;Hj.prototype.has=NqI;Hj.prototype.set=VqI;function PC(t){var e=-1,I=t?t.length:0;for(this.clear();++e-1&&t%1==0&&t{o();var zqI=app.vault.adapter.fsPromises,BqI={...zqI,isUsingObsidian:!0};cXt.exports=BqI});var oXt=Y((AIc,sXt)=>{"use strict";o();function yF(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function rXt(t,e){for(var I="",l=0,n=-1,a=0,c,r=0;r<=t.length;++r){if(r2){var s=I.lastIndexOf("/");if(s!==I.length-1){s===-1?(I="",l=0):(I=I.slice(0,s),l=I.length-1-I.lastIndexOf("/")),n=r,a=0;continue}}else if(I.length===2||I.length===1){I="",l=0,n=r,a=0;continue}}e&&(I.length>0?I+="/..":I="..",l=2)}else I.length>0?I+="/"+t.slice(n+1,r):I=t.slice(n+1,r),l=r-n-1;n=r,a=0}else c===46&&a!==-1?++a:a=-1}return I}function MqI(t,e){var I=e.dir||e.root,l=e.base||(e.name||"")+(e.ext||"");return I?I===e.root?I+l:I+t+l:l}var Ej={resolve:function(){for(var e="",I=!1,l,n=arguments.length-1;n>=-1&&!I;n--){var a;n>=0?a=arguments[n]:(l===void 0&&(l=process.cwd()),a=l),yF(a),a.length!==0&&(e=a+"/"+e,I=a.charCodeAt(0)===47)}return e=rXt(e,!I),I?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(e){if(yF(e),e.length===0)return".";var I=e.charCodeAt(0)===47,l=e.charCodeAt(e.length-1)===47;return e=rXt(e,!I),e.length===0&&!I&&(e="."),e.length>0&&l&&(e+="/"),I?"/"+e:e},isAbsolute:function(e){return yF(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var e,I=0;I0&&(e===void 0?e=l:e+="/"+l)}return e===void 0?".":Ej.normalize(e)},relative:function(e,I){if(yF(e),yF(I),e===I||(e=Ej.resolve(e),I=Ej.resolve(I),e===I))return"";for(var l=1;li){if(I.charCodeAt(c+d)===47)return I.slice(c+d+1);if(d===0)return I.slice(c+d)}else a>i&&(e.charCodeAt(l+d)===47?G=d:d===0&&(G=0));break}var u=e.charCodeAt(l+d),b=I.charCodeAt(c+d);if(u!==b)break;u===47&&(G=d)}var Z="";for(d=l+G+1;d<=n;++d)(d===n||e.charCodeAt(d)===47)&&(Z.length===0?Z+="..":Z+="/..");return Z.length>0?Z+I.slice(c+G):(c+=G,I.charCodeAt(c)===47&&++c,I.slice(c))},_makeLong:function(e){return e},dirname:function(e){if(yF(e),e.length===0)return".";for(var I=e.charCodeAt(0),l=I===47,n=-1,a=!0,c=e.length-1;c>=1;--c)if(I=e.charCodeAt(c),I===47){if(!a){n=c;break}}else a=!1;return n===-1?l?"/":".":l&&n===1?"//":e.slice(0,n)},basename:function(e,I){if(I!==void 0&&typeof I!="string")throw new TypeError('"ext" argument must be a string');yF(e);var l=0,n=-1,a=!0,c;if(I!==void 0&&I.length>0&&I.length<=e.length){if(I.length===e.length&&I===e)return"";var r=I.length-1,s=-1;for(c=e.length-1;c>=0;--c){var i=e.charCodeAt(c);if(i===47){if(!a){l=c+1;break}}else s===-1&&(a=!1,s=c+1),r>=0&&(i===I.charCodeAt(r)?--r===-1&&(n=c):(r=-1,n=s))}return l===n?n=s:n===-1&&(n=e.length),e.slice(l,n)}else{for(c=e.length-1;c>=0;--c)if(e.charCodeAt(c)===47){if(!a){l=c+1;break}}else n===-1&&(a=!1,n=c+1);return n===-1?"":e.slice(l,n)}},extname:function(e){yF(e);for(var I=-1,l=0,n=-1,a=!0,c=0,r=e.length-1;r>=0;--r){var s=e.charCodeAt(r);if(s===47){if(!a){l=r+1;break}continue}n===-1&&(a=!1,n=r+1),s===46?I===-1?I=r:c!==1&&(c=1):I!==-1&&(c=-1)}return I===-1||n===-1||c===0||c===1&&I===n-1&&I===l+1?"":e.slice(I,n)},format:function(e){if(e===null||typeof e!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return MqI("/",e)},parse:function(e){yF(e);var I={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return I;var l=e.charCodeAt(0),n=l===47,a;n?(I.root="/",a=1):a=0;for(var c=-1,r=0,s=-1,i=!0,G=e.length-1,d=0;G>=a;--G){if(l=e.charCodeAt(G),l===47){if(!i){r=G+1;break}continue}s===-1&&(i=!1,s=G+1),l===46?c===-1?c=G:d!==1&&(d=1):c!==-1&&(d=-1)}return c===-1||s===-1||d===0||d===1&&c===s-1&&c===r+1?s!==-1&&(r===0&&n?I.base=I.name=e.slice(1,s):I.base=I.name=e.slice(r,s)):(r===0&&n?(I.name=e.slice(1,c),I.base=e.slice(1,s)):(I.name=e.slice(r,c),I.base=e.slice(r,s)),I.ext=e.slice(c,s)),r>0?I.dir=e.slice(0,r-1):n&&(I.dir="/"),I},sep:"/",delimiter:":",win32:null,posix:null};Ej.posix=Ej;sXt.exports=Ej});var Qn=Y((XIc,iXt)=>{o();var SqI=oXt(),TqI=app.vault.adapter.path,_qI={...TqI||SqI,isUsingObsidian:!0};iXt.exports=_qI});var vo=Y((vIc,GXt)=>{o();var KqI=app.vault.adapter.fs,DqI={...KqI,isUsingObsidian:!0};GXt.exports=DqI});var kj=Y((EIc,VXt)=>{"use strict";o();var NXt=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"]]);VXt.exports=t=>t?Object.keys(t).map(e=>[NXt.has(e)?NXt.get(e):e,t[e]]).reduce((e,I)=>(e[I[0]]=I[1],e),Object.create(null)):{}});var $ie=Y(HXt=>{"use strict";o();var YXt=typeof process=="object"&&process?process:{stdout:null,stderr:null},$qI=require("events"),RXt=require("stream"),ePI=require("string_decoder"),AXt=ePI.StringDecoder,og=Symbol("EOF"),ig=Symbol("maybeEmitEnd"),gQ=Symbol("emittedEnd"),Tie=Symbol("emittingEnd"),TD=Symbol("emittedError"),_ie=Symbol("closed"),FXt=Symbol("read"),Kie=Symbol("flush"),XXt=Symbol("flushChunk"),qb=Symbol("encoding"),Gg=Symbol("decoder"),Die=Symbol("flowing"),_D=Symbol("paused"),xj=Symbol("resume"),ls=Symbol("buffer"),HF=Symbol("pipes"),yo=Symbol("bufferLength"),zLe=Symbol("bufferPush"),BLe=Symbol("bufferShift"),gi=Symbol("objectMode"),ns=Symbol("destroyed"),MLe=Symbol("error"),SLe=Symbol("emitData"),gXt=Symbol("emitEnd"),TLe=Symbol("emitEnd2"),dg=Symbol("async"),_Le=Symbol("abort"),qie=Symbol("aborted"),e5=Symbol("signal"),KD=t=>Promise.resolve().then(t),wXt=global._MP_NO_ITERATOR_SYMBOLS_!=="1",vXt=wXt&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),yXt=wXt&&Symbol.iterator||Symbol("iterator not implemented"),tPI=t=>t==="end"||t==="finish"||t==="prefinish",IPI=t=>t instanceof ArrayBuffer||typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,lPI=t=>!m.Buffer.isBuffer(t)&&ArrayBuffer.isView(t),Pie=class{constructor(e,I,l){this.src=e,this.dest=I,this.opts=l,this.ondrain=()=>e[xj](),I.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},KLe=class extends Pie{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,I,l){super(e,I,l),this.proxyErrors=n=>I.emit("error",n),e.on("error",this.proxyErrors)}},DLe=class t extends RXt{constructor(e){super(),this[Die]=!1,this[_D]=!1,this[HF]=[],this[ls]=[],this[gi]=e&&e.objectMode||!1,this[gi]?this[qb]=null:this[qb]=e&&e.encoding||null,this[qb]==="buffer"&&(this[qb]=null),this[dg]=e&&!!e.async||!1,this[Gg]=this[qb]?new AXt(this[qb]):null,this[og]=!1,this[gQ]=!1,this[Tie]=!1,this[_ie]=!1,this[TD]=null,this.writable=!0,this.readable=!0,this[yo]=0,this[ns]=!1,e&&e.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[ls]}),e&&e.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[HF]}),this[e5]=e&&e.signal,this[qie]=!1,this[e5]&&(this[e5].addEventListener("abort",()=>this[_Le]()),this[e5].aborted&&this[_Le]())}get bufferLength(){return this[yo]}get encoding(){return this[qb]}set encoding(e){if(this[gi])throw new Error("cannot set encoding in objectMode");if(this[qb]&&e!==this[qb]&&(this[Gg]&&this[Gg].lastNeed||this[yo]))throw new Error("cannot change encoding");this[qb]!==e&&(this[Gg]=e?new AXt(e):null,this[ls].length&&(this[ls]=this[ls].map(I=>this[Gg].write(I)))),this[qb]=e}setEncoding(e){this.encoding=e}get objectMode(){return this[gi]}set objectMode(e){this[gi]=this[gi]||!!e}get async(){return this[dg]}set async(e){this[dg]=this[dg]||!!e}[_Le](){this[qie]=!0,this.emit("abort",this[e5].reason),this.destroy(this[e5].reason)}get aborted(){return this[qie]}set aborted(e){}write(e,I,l){if(this[qie])return!1;if(this[og])throw new Error("write after end");if(this[ns])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof I=="function"&&(l=I,I="utf8"),I||(I="utf8");let n=this[dg]?KD:a=>a();return!this[gi]&&!m.Buffer.isBuffer(e)&&(lPI(e)?e=m.Buffer.from(e.buffer,e.byteOffset,e.byteLength):IPI(e)?e=m.Buffer.from(e):typeof e!="string"&&(this.objectMode=!0)),this[gi]?(this.flowing&&this[yo]!==0&&this[Kie](!0),this.flowing?this.emit("data",e):this[zLe](e),this[yo]!==0&&this.emit("readable"),l&&n(l),this.flowing):e.length?(typeof e=="string"&&!(I===this[qb]&&!this[Gg].lastNeed)&&(e=m.Buffer.from(e,I)),m.Buffer.isBuffer(e)&&this[qb]&&(e=this[Gg].write(e)),this.flowing&&this[yo]!==0&&this[Kie](!0),this.flowing?this.emit("data",e):this[zLe](e),this[yo]!==0&&this.emit("readable"),l&&n(l),this.flowing):(this[yo]!==0&&this.emit("readable"),l&&n(l),this.flowing)}read(e){if(this[ns])return null;if(this[yo]===0||e===0||e>this[yo])return this[ig](),null;this[gi]&&(e=null),this[ls].length>1&&!this[gi]&&(this.encoding?this[ls]=[this[ls].join("")]:this[ls]=[m.Buffer.concat(this[ls],this[yo])]);let I=this[FXt](e||null,this[ls][0]);return this[ig](),I}[FXt](e,I){return e===I.length||e===null?this[BLe]():(this[ls][0]=I.slice(e),I=I.slice(0,e),this[yo]-=e),this.emit("data",I),!this[ls].length&&!this[og]&&this.emit("drain"),I}end(e,I,l){return typeof e=="function"&&(l=e,e=null),typeof I=="function"&&(l=I,I="utf8"),e&&this.write(e,I),l&&this.once("end",l),this[og]=!0,this.writable=!1,(this.flowing||!this[_D])&&this[ig](),this}[xj](){this[ns]||(this[_D]=!1,this[Die]=!0,this.emit("resume"),this[ls].length?this[Kie]():this[og]?this[ig]():this.emit("drain"))}resume(){return this[xj]()}pause(){this[Die]=!1,this[_D]=!0}get destroyed(){return this[ns]}get flowing(){return this[Die]}get paused(){return this[_D]}[zLe](e){this[gi]?this[yo]+=1:this[yo]+=e.length,this[ls].push(e)}[BLe](){return this[gi]?this[yo]-=1:this[yo]-=this[ls][0].length,this[ls].shift()}[Kie](e){do;while(this[XXt](this[BLe]())&&this[ls].length);!e&&!this[ls].length&&!this[og]&&this.emit("drain")}[XXt](e){return this.emit("data",e),this.flowing}pipe(e,I){if(this[ns])return;let l=this[gQ];return I=I||{},e===YXt.stdout||e===YXt.stderr?I.end=!1:I.end=I.end!==!1,I.proxyErrors=!!I.proxyErrors,l?I.end&&e.end():(this[HF].push(I.proxyErrors?new KLe(this,e,I):new Pie(this,e,I)),this[dg]?KD(()=>this[xj]()):this[xj]()),e}unpipe(e){let I=this[HF].find(l=>l.dest===e);I&&(this[HF].splice(this[HF].indexOf(I),1),I.unpipe())}addListener(e,I){return this.on(e,I)}on(e,I){let l=super.on(e,I);return e==="data"&&!this[HF].length&&!this.flowing?this[xj]():e==="readable"&&this[yo]!==0?super.emit("readable"):tPI(e)&&this[gQ]?(super.emit(e),this.removeAllListeners(e)):e==="error"&&this[TD]&&(this[dg]?KD(()=>I.call(this,this[TD])):I.call(this,this[TD])),l}get emittedEnd(){return this[gQ]}[ig](){!this[Tie]&&!this[gQ]&&!this[ns]&&this[ls].length===0&&this[og]&&(this[Tie]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[_ie]&&this.emit("close"),this[Tie]=!1)}emit(e,I,...l){if(e!=="error"&&e!=="close"&&e!==ns&&this[ns])return;if(e==="data")return!this[gi]&&!I?!1:this[dg]?KD(()=>this[SLe](I)):this[SLe](I);if(e==="end")return this[gXt]();if(e==="close"){if(this[_ie]=!0,!this[gQ]&&!this[ns])return;let a=super.emit("close");return this.removeAllListeners("close"),a}else if(e==="error"){this[TD]=I,super.emit(MLe,I);let a=!this[e5]||this.listeners("error").length?super.emit("error",I):!1;return this[ig](),a}else if(e==="resume"){let a=super.emit("resume");return this[ig](),a}else if(e==="finish"||e==="prefinish"){let a=super.emit(e);return this.removeAllListeners(e),a}let n=super.emit(e,I,...l);return this[ig](),n}[SLe](e){for(let l of this[HF])l.dest.write(e)===!1&&this.pause();let I=super.emit("data",e);return this[ig](),I}[gXt](){this[gQ]||(this[gQ]=!0,this.readable=!1,this[dg]?KD(()=>this[TLe]()):this[TLe]())}[TLe](){if(this[Gg]){let I=this[Gg].end();if(I){for(let l of this[HF])l.dest.write(I);super.emit("data",I)}}for(let I of this[HF])I.end();let e=super.emit("end");return this.removeAllListeners("end"),e}collect(){let e=[];this[gi]||(e.dataLength=0);let I=this.promise();return this.on("data",l=>{e.push(l),this[gi]||(e.dataLength+=l.length)}),I.then(()=>e)}concat(){return this[gi]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(e=>this[gi]?Promise.reject(new Error("cannot concat in objectMode")):this[qb]?e.join(""):m.Buffer.concat(e,e.dataLength))}promise(){return new Promise((e,I)=>{this.on(ns,()=>I(new Error("stream destroyed"))),this.on("error",l=>I(l)),this.on("end",()=>e())})}[vXt](){let e=!1,I=()=>(this.pause(),e=!0,Promise.resolve({done:!0}));return{next:()=>{if(e)return I();let n=this.read();if(n!==null)return Promise.resolve({done:!1,value:n});if(this[og])return I();let a=null,c=null,r=d=>{this.removeListener("data",s),this.removeListener("end",i),this.removeListener(ns,G),I(),c(d)},s=d=>{this.removeListener("error",r),this.removeListener("end",i),this.removeListener(ns,G),this.pause(),a({value:d,done:!!this[og]})},i=()=>{this.removeListener("error",r),this.removeListener("data",s),this.removeListener(ns,G),I(),a({done:!0})},G=()=>r(new Error("stream destroyed"));return new Promise((d,u)=>{c=u,a=d,this.once(ns,G),this.once("error",r),this.once("end",i),this.once("data",s)})},throw:I,return:I,[vXt](){return this}}}[yXt](){let e=!1,I=()=>(this.pause(),this.removeListener(MLe,I),this.removeListener(ns,I),this.removeListener("end",I),e=!0,{done:!0}),l=()=>{if(e)return I();let n=this.read();return n===null?I():{value:n}};return this.once("end",I),this.once(MLe,I),this.once(ns,I),{next:l,throw:I,return:I,[yXt](){return this}}}destroy(e){return this[ns]?(e?this.emit("error",e):this.emit(ns),this):(this[ns]=!0,this[ls].length=0,this[yo]=0,typeof this.close=="function"&&!this[_ie]&&this.close(),e?this.emit("error",e):this.emit(ns),this)}static isStream(e){return!!e&&(e instanceof t||e instanceof RXt||e instanceof $qI&&(typeof e.pipe=="function"||typeof e.write=="function"&&typeof e.end=="function"))}};HXt.Minipass=DLe});var fXt=Y((kIc,QXt)=>{o();var nPI=require("zlib").constants||{ZLIB_VERNUM:4736};QXt.exports=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:1/0,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},nPI))});var Ike=Y((jIc,OXt)=>{"use strict";o();var EXt=typeof process=="object"&&process?process:{stdout:null,stderr:null},aPI=require("events"),JXt=require("stream"),CXt=require("string_decoder").StringDecoder,ug=Symbol("EOF"),bg=Symbol("maybeEmitEnd"),vQ=Symbol("emittedEnd"),eGe=Symbol("emittingEnd"),DD=Symbol("emittedError"),tGe=Symbol("closed"),LXt=Symbol("read"),IGe=Symbol("flush"),kXt=Symbol("flushChunk"),Pb=Symbol("encoding"),mg=Symbol("decoder"),lGe=Symbol("flowing"),qD=Symbol("paused"),jj=Symbol("resume"),wo=Symbol("bufferLength"),qLe=Symbol("bufferPush"),PLe=Symbol("bufferShift"),uG=Symbol("objectMode"),bG=Symbol("destroyed"),$Le=Symbol("emitData"),xXt=Symbol("emitEnd"),eke=Symbol("emitEnd2"),Zg=Symbol("async"),PD=t=>Promise.resolve().then(t),jXt=global._MP_NO_ITERATOR_SYMBOLS_!=="1",cPI=jXt&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),rPI=jXt&&Symbol.iterator||Symbol("iterator not implemented"),sPI=t=>t==="end"||t==="finish"||t==="prefinish",oPI=t=>t instanceof ArrayBuffer||typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,iPI=t=>!m.Buffer.isBuffer(t)&&ArrayBuffer.isView(t),nGe=class{constructor(e,I,l){this.src=e,this.dest=I,this.opts=l,this.ondrain=()=>e[jj](),I.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},tke=class extends nGe{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,I,l){super(e,I,l),this.proxyErrors=n=>I.emit("error",n),e.on("error",this.proxyErrors)}};OXt.exports=class UXt extends JXt{constructor(e){super(),this[lGe]=!1,this[qD]=!1,this.pipes=[],this.buffer=[],this[uG]=e&&e.objectMode||!1,this[uG]?this[Pb]=null:this[Pb]=e&&e.encoding||null,this[Pb]==="buffer"&&(this[Pb]=null),this[Zg]=e&&!!e.async||!1,this[mg]=this[Pb]?new CXt(this[Pb]):null,this[ug]=!1,this[vQ]=!1,this[eGe]=!1,this[tGe]=!1,this[DD]=null,this.writable=!0,this.readable=!0,this[wo]=0,this[bG]=!1}get bufferLength(){return this[wo]}get encoding(){return this[Pb]}set encoding(e){if(this[uG])throw new Error("cannot set encoding in objectMode");if(this[Pb]&&e!==this[Pb]&&(this[mg]&&this[mg].lastNeed||this[wo]))throw new Error("cannot change encoding");this[Pb]!==e&&(this[mg]=e?new CXt(e):null,this.buffer.length&&(this.buffer=this.buffer.map(I=>this[mg].write(I)))),this[Pb]=e}setEncoding(e){this.encoding=e}get objectMode(){return this[uG]}set objectMode(e){this[uG]=this[uG]||!!e}get async(){return this[Zg]}set async(e){this[Zg]=this[Zg]||!!e}write(e,I,l){if(this[ug])throw new Error("write after end");if(this[bG])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof I=="function"&&(l=I,I="utf8"),I||(I="utf8");let n=this[Zg]?PD:a=>a();return!this[uG]&&!m.Buffer.isBuffer(e)&&(iPI(e)?e=m.Buffer.from(e.buffer,e.byteOffset,e.byteLength):oPI(e)?e=m.Buffer.from(e):typeof e!="string"&&(this.objectMode=!0)),this[uG]?(this.flowing&&this[wo]!==0&&this[IGe](!0),this.flowing?this.emit("data",e):this[qLe](e),this[wo]!==0&&this.emit("readable"),l&&n(l),this.flowing):e.length?(typeof e=="string"&&!(I===this[Pb]&&!this[mg].lastNeed)&&(e=m.Buffer.from(e,I)),m.Buffer.isBuffer(e)&&this[Pb]&&(e=this[mg].write(e)),this.flowing&&this[wo]!==0&&this[IGe](!0),this.flowing?this.emit("data",e):this[qLe](e),this[wo]!==0&&this.emit("readable"),l&&n(l),this.flowing):(this[wo]!==0&&this.emit("readable"),l&&n(l),this.flowing)}read(e){if(this[bG])return null;if(this[wo]===0||e===0||e>this[wo])return this[bg](),null;this[uG]&&(e=null),this.buffer.length>1&&!this[uG]&&(this.encoding?this.buffer=[this.buffer.join("")]:this.buffer=[m.Buffer.concat(this.buffer,this[wo])]);let I=this[LXt](e||null,this.buffer[0]);return this[bg](),I}[LXt](e,I){return e===I.length||e===null?this[PLe]():(this.buffer[0]=I.slice(e),I=I.slice(0,e),this[wo]-=e),this.emit("data",I),!this.buffer.length&&!this[ug]&&this.emit("drain"),I}end(e,I,l){return typeof e=="function"&&(l=e,e=null),typeof I=="function"&&(l=I,I="utf8"),e&&this.write(e,I),l&&this.once("end",l),this[ug]=!0,this.writable=!1,(this.flowing||!this[qD])&&this[bg](),this}[jj](){this[bG]||(this[qD]=!1,this[lGe]=!0,this.emit("resume"),this.buffer.length?this[IGe]():this[ug]?this[bg]():this.emit("drain"))}resume(){return this[jj]()}pause(){this[lGe]=!1,this[qD]=!0}get destroyed(){return this[bG]}get flowing(){return this[lGe]}get paused(){return this[qD]}[qLe](e){this[uG]?this[wo]+=1:this[wo]+=e.length,this.buffer.push(e)}[PLe](){return this.buffer.length&&(this[uG]?this[wo]-=1:this[wo]-=this.buffer[0].length),this.buffer.shift()}[IGe](e){do;while(this[kXt](this[PLe]()));!e&&!this.buffer.length&&!this[ug]&&this.emit("drain")}[kXt](e){return e?(this.emit("data",e),this.flowing):!1}pipe(e,I){if(this[bG])return;let l=this[vQ];return I=I||{},e===EXt.stdout||e===EXt.stderr?I.end=!1:I.end=I.end!==!1,I.proxyErrors=!!I.proxyErrors,l?I.end&&e.end():(this.pipes.push(I.proxyErrors?new tke(this,e,I):new nGe(this,e,I)),this[Zg]?PD(()=>this[jj]()):this[jj]()),e}unpipe(e){let I=this.pipes.find(l=>l.dest===e);I&&(this.pipes.splice(this.pipes.indexOf(I),1),I.unpipe())}addListener(e,I){return this.on(e,I)}on(e,I){let l=super.on(e,I);return e==="data"&&!this.pipes.length&&!this.flowing?this[jj]():e==="readable"&&this[wo]!==0?super.emit("readable"):sPI(e)&&this[vQ]?(super.emit(e),this.removeAllListeners(e)):e==="error"&&this[DD]&&(this[Zg]?PD(()=>I.call(this,this[DD])):I.call(this,this[DD])),l}get emittedEnd(){return this[vQ]}[bg](){!this[eGe]&&!this[vQ]&&!this[bG]&&this.buffer.length===0&&this[ug]&&(this[eGe]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[tGe]&&this.emit("close"),this[eGe]=!1)}emit(e,I,...l){if(e!=="error"&&e!=="close"&&e!==bG&&this[bG])return;if(e==="data")return I?this[Zg]?PD(()=>this[$Le](I)):this[$Le](I):!1;if(e==="end")return this[xXt]();if(e==="close"){if(this[tGe]=!0,!this[vQ]&&!this[bG])return;let a=super.emit("close");return this.removeAllListeners("close"),a}else if(e==="error"){this[DD]=I;let a=super.emit("error",I);return this[bg](),a}else if(e==="resume"){let a=super.emit("resume");return this[bg](),a}else if(e==="finish"||e==="prefinish"){let a=super.emit(e);return this.removeAllListeners(e),a}let n=super.emit(e,I,...l);return this[bg](),n}[$Le](e){for(let l of this.pipes)l.dest.write(e)===!1&&this.pause();let I=super.emit("data",e);return this[bg](),I}[xXt](){this[vQ]||(this[vQ]=!0,this.readable=!1,this[Zg]?PD(()=>this[eke]()):this[eke]())}[eke](){if(this[mg]){let I=this[mg].end();if(I){for(let l of this.pipes)l.dest.write(I);super.emit("data",I)}}for(let I of this.pipes)I.end();let e=super.emit("end");return this.removeAllListeners("end"),e}collect(){let e=[];this[uG]||(e.dataLength=0);let I=this.promise();return this.on("data",l=>{e.push(l),this[uG]||(e.dataLength+=l.length)}),I.then(()=>e)}concat(){return this[uG]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(e=>this[uG]?Promise.reject(new Error("cannot concat in objectMode")):this[Pb]?e.join(""):m.Buffer.concat(e,e.dataLength))}promise(){return new Promise((e,I)=>{this.on(bG,()=>I(new Error("stream destroyed"))),this.on("error",l=>I(l)),this.on("end",()=>e())})}[cPI](){return{next:()=>{let I=this.read();if(I!==null)return Promise.resolve({done:!1,value:I});if(this[ug])return Promise.resolve({done:!0});let l=null,n=null,a=i=>{this.removeListener("data",c),this.removeListener("end",r),n(i)},c=i=>{this.removeListener("error",a),this.removeListener("end",r),this.pause(),l({value:i,done:!!this[ug]})},r=()=>{this.removeListener("error",a),this.removeListener("data",c),l({done:!0})},s=()=>a(new Error("stream destroyed"));return new Promise((i,G)=>{n=G,l=i,this.once(bG,s),this.once("error",a),this.once("end",r),this.once("data",c)})}}}[rPI](){return{next:()=>{let I=this.read();return{value:I,done:I===null}}}}destroy(e){return this[bG]?(e?this.emit("error",e):this.emit(bG),this):(this[bG]=!0,this.buffer.length=0,this[wo]=0,typeof this.close=="function"&&!this[tGe]&&this.close(),e?this.emit("error",e):this.emit(bG),this)}static isStream(e){return!!e&&(e instanceof UXt||e instanceof JXt||e instanceof aPI&&(typeof e.pipe=="function"||typeof e.write=="function"&&typeof e.end=="function"))}}});var hke=Y(WZ=>{"use strict";o();var rke=require("assert"),yQ=Wle().Buffer,MXt=require("zlib"),t5=WZ.constants=fXt(),GPI=Ike(),zXt=yQ.concat,I5=Symbol("_superWrite"),Oj=class extends Error{constructor(e){super("zlib: "+e.message),this.code=e.code,this.errno=e.errno,this.code||(this.code="ZLIB_ERROR"),this.message="zlib: "+e.message,Error.captureStackTrace(this,this.constructor)}get name(){return"ZlibError"}},dPI=Symbol("opts"),$D=Symbol("flushFlag"),BXt=Symbol("finishFlushFlag"),pke=Symbol("fullFlushFlag"),Ra=Symbol("handle"),aGe=Symbol("onError"),Uj=Symbol("sawError"),lke=Symbol("level"),nke=Symbol("strategy"),ake=Symbol("ended"),OIc=Symbol("_defaultFullFlush"),cGe=class extends GPI{constructor(e,I){if(!e||typeof e!="object")throw new TypeError("invalid options for ZlibBase constructor");super(e),this[Uj]=!1,this[ake]=!1,this[dPI]=e,this[$D]=e.flush,this[BXt]=e.finishFlush;try{this[Ra]=new MXt[I](e)}catch(l){throw new Oj(l)}this[aGe]=l=>{this[Uj]||(this[Uj]=!0,this.close(),this.emit("error",l))},this[Ra].on("error",l=>this[aGe](new Oj(l))),this.once("end",()=>this.close)}close(){this[Ra]&&(this[Ra].close(),this[Ra]=null,this.emit("close"))}reset(){if(!this[Uj])return rke(this[Ra],"zlib binding closed"),this[Ra].reset()}flush(e){this.ended||(typeof e!="number"&&(e=this[pke]),this.write(Object.assign(yQ.alloc(0),{[$D]:e})))}end(e,I,l){return e&&this.write(e,I),this.flush(this[BXt]),this[ake]=!0,super.end(null,null,l)}get ended(){return this[ake]}write(e,I,l){if(typeof I=="function"&&(l=I,I="utf8"),typeof e=="string"&&(e=yQ.from(e,I)),this[Uj])return;rke(this[Ra],"zlib binding closed");let n=this[Ra]._handle,a=n.close;n.close=()=>{};let c=this[Ra].close;this[Ra].close=()=>{},yQ.concat=i=>i;let r;try{let i=typeof e[$D]=="number"?e[$D]:this[$D];r=this[Ra]._processChunk(e,i),yQ.concat=zXt}catch(i){yQ.concat=zXt,this[aGe](new Oj(i))}finally{this[Ra]&&(this[Ra]._handle=n,n.close=a,this[Ra].close=c,this[Ra].removeAllListeners("error"))}this[Ra]&&this[Ra].on("error",i=>this[aGe](new Oj(i)));let s;if(r)if(Array.isArray(r)&&r.length>0){s=this[I5](yQ.from(r[0]));for(let i=1;i{this.flush(n),a()};try{this[Ra].params(e,I)}finally{this[Ra].flush=l}this[Ra]&&(this[lke]=e,this[nke]=I)}}}},ske=class extends pg{constructor(e){super(e,"Deflate")}},oke=class extends pg{constructor(e){super(e,"Inflate")}},cke=Symbol("_portable"),ike=class extends pg{constructor(e){super(e,"Gzip"),this[cke]=e&&!!e.portable}[I5](e){return this[cke]?(this[cke]=!1,e[9]=255,super[I5](e)):super[I5](e)}},Gke=class extends pg{constructor(e){super(e,"Gunzip")}},dke=class extends pg{constructor(e){super(e,"DeflateRaw")}},uke=class extends pg{constructor(e){super(e,"InflateRaw")}},bke=class extends pg{constructor(e){super(e,"Unzip")}},rGe=class extends cGe{constructor(e,I){e=e||{},e.flush=e.flush||t5.BROTLI_OPERATION_PROCESS,e.finishFlush=e.finishFlush||t5.BROTLI_OPERATION_FINISH,super(e,I),this[pke]=t5.BROTLI_OPERATION_FLUSH}},mke=class extends rGe{constructor(e){super(e,"BrotliCompress")}},Zke=class extends rGe{constructor(e){super(e,"BrotliDecompress")}};WZ.Deflate=ske;WZ.Inflate=oke;WZ.Gzip=ike;WZ.Gunzip=Gke;WZ.DeflateRaw=dke;WZ.InflateRaw=uke;WZ.Unzip=bke;typeof MXt.BrotliCompress=="function"?(WZ.BrotliCompress=mke,WZ.BrotliDecompress=Zke):WZ.BrotliCompress=WZ.BrotliDecompress=class{constructor(){throw new Error("Brotli is not supported in this version of Node.js")}}});var zj=Y((SIc,SXt)=>{o();var uPI=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;SXt.exports=uPI!=="win32"?t=>t:t=>t&&t.replace(/\\/g,"/")});var sGe=Y((KIc,TXt)=>{"use strict";o();var{Minipass:bPI}=$ie(),Wke=zj(),Nke=Symbol("slurp");TXt.exports=class extends bPI{constructor(e,I,l){switch(super(),this.pause(),this.extended=I,this.globalExtended=l,this.header=e,this.startBlockSize=512*Math.ceil(e.size/512),this.blockRemain=this.startBlockSize,this.remain=e.size,this.type=e.type,this.meta=!1,this.ignore=!1,this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=!0;break;default:this.ignore=!0}this.path=Wke(e.path),this.mode=e.mode,this.mode&&(this.mode=this.mode&4095),this.uid=e.uid,this.gid=e.gid,this.uname=e.uname,this.gname=e.gname,this.size=e.size,this.mtime=e.mtime,this.atime=e.atime,this.ctime=e.ctime,this.linkpath=Wke(e.linkpath),this.uname=e.uname,this.gname=e.gname,I&&this[Nke](I),l&&this[Nke](l,!0)}write(e){let I=e.length;if(I>this.blockRemain)throw new Error("writing more to entry than is appropriate");let l=this.remain,n=this.blockRemain;return this.remain=Math.max(0,l-I),this.blockRemain=Math.max(0,n-I),this.ignore?!0:l>=I?super.write(e):super.write(e.slice(0,l))}[Nke](e,I){for(let l in e)e[l]!==null&&e[l]!==void 0&&!(I&&l==="path")&&(this[l]=l==="path"||l==="linkpath"?Wke(e[l]):e[l])}}});var Vke=Y(oGe=>{"use strict";o();oGe.name=new Map([["0","File"],["","OldFile"],["1","Link"],["2","SymbolicLink"],["3","CharacterDevice"],["4","BlockDevice"],["5","Directory"],["6","FIFO"],["7","ContiguousFile"],["g","GlobalExtendedHeader"],["x","ExtendedHeader"],["A","SolarisACL"],["D","GNUDumpDir"],["I","Inode"],["K","NextFileHasLongLinkpath"],["L","NextFileHasLongPath"],["M","ContinuationFile"],["N","OldGnuLongPath"],["S","SparseFile"],["V","TapeVolumeHeader"],["X","OldExtendedHeader"]]);oGe.code=new Map(Array.from(oGe.name).map(t=>[t[1],t[0]]))});var qXt=Y(($Ic,DXt)=>{"use strict";o();var mPI=(t,e)=>{if(Number.isSafeInteger(t))t<0?pPI(t,e):ZPI(t,e);else throw Error("cannot encode number outside of javascript safe integer range");return e},ZPI=(t,e)=>{e[0]=128;for(var I=e.length;I>1;I--)e[I-1]=t&255,t=Math.floor(t/256)},pPI=(t,e)=>{e[0]=255;var I=!1;t=t*-1;for(var l=e.length;l>1;l--){var n=t&255;t=Math.floor(t/256),I?e[l-1]=_Xt(n):n===0?e[l-1]=0:(I=!0,e[l-1]=KXt(n))}},hPI=t=>{let e=t[0],I=e===128?NPI(t.slice(1,t.length)):e===255?WPI(t):null;if(I===null)throw Error("invalid base256 encoding");if(!Number.isSafeInteger(I))throw Error("parsed number outside of javascript safe integer range");return I},WPI=t=>{for(var e=t.length,I=0,l=!1,n=e-1;n>-1;n--){var a=t[n],c;l?c=_Xt(a):a===0?c=a:(l=!0,c=KXt(a)),c!==0&&(I-=c*Math.pow(256,e-n-1))}return I},NPI=t=>{for(var e=t.length,I=0,l=e-1;l>-1;l--){var n=t[l];n!==0&&(I+=n*Math.pow(256,e-l-1))}return I},_Xt=t=>(255^t)&255,KXt=t=>(255^t)+1&255;DXt.exports={encode:mPI,parse:hPI}});var Mj=Y((tlc,$Xt)=>{"use strict";o();var Yke=Vke(),Bj=Qn().posix,PXt=qXt(),Rke=Symbol("slurp"),NZ=Symbol("type"),Xke=class{constructor(e,I,l,n){this.cksumValid=!1,this.needPax=!1,this.nullBlock=!1,this.block=null,this.path=null,this.mode=null,this.uid=null,this.gid=null,this.size=null,this.mtime=null,this.cksum=null,this[NZ]="0",this.linkpath=null,this.uname=null,this.gname=null,this.devmaj=0,this.devmin=0,this.atime=null,this.ctime=null,m.Buffer.isBuffer(e)?this.decode(e,I||0,l,n):e&&this.set(e)}decode(e,I,l,n){if(I||(I=0),!e||!(e.length>=I+512))throw new Error("need 512 bytes for header");if(this.path=l5(e,I,100),this.mode=wQ(e,I+100,8),this.uid=wQ(e,I+108,8),this.gid=wQ(e,I+116,8),this.size=wQ(e,I+124,12),this.mtime=Ake(e,I+136,12),this.cksum=wQ(e,I+148,12),this[Rke](l),this[Rke](n,!0),this[NZ]=l5(e,I+156,1),this[NZ]===""&&(this[NZ]="0"),this[NZ]==="0"&&this.path.slice(-1)==="/"&&(this[NZ]="5"),this[NZ]==="5"&&(this.size=0),this.linkpath=l5(e,I+157,100),e.slice(I+257,I+265).toString()==="ustar\x0000")if(this.uname=l5(e,I+265,32),this.gname=l5(e,I+297,32),this.devmaj=wQ(e,I+329,8),this.devmin=wQ(e,I+337,8),e[I+475]!==0){let c=l5(e,I+345,155);this.path=c+"/"+this.path}else{let c=l5(e,I+345,130);c&&(this.path=c+"/"+this.path),this.atime=Ake(e,I+476,12),this.ctime=Ake(e,I+488,12)}let a=8*32;for(let c=I;c=I+512))throw new Error("need 512 bytes for header");let l=this.ctime||this.atime?130:155,n=VPI(this.path||"",l),a=n[0],c=n[1];this.needPax=n[2],this.needPax=n5(e,I,100,a)||this.needPax,this.needPax=HQ(e,I+100,8,this.mode)||this.needPax,this.needPax=HQ(e,I+108,8,this.uid)||this.needPax,this.needPax=HQ(e,I+116,8,this.gid)||this.needPax,this.needPax=HQ(e,I+124,12,this.size)||this.needPax,this.needPax=Fke(e,I+136,12,this.mtime)||this.needPax,e[I+156]=this[NZ].charCodeAt(0),this.needPax=n5(e,I+157,100,this.linkpath)||this.needPax,e.write("ustar\x0000",I+257,8),this.needPax=n5(e,I+265,32,this.uname)||this.needPax,this.needPax=n5(e,I+297,32,this.gname)||this.needPax,this.needPax=HQ(e,I+329,8,this.devmaj)||this.needPax,this.needPax=HQ(e,I+337,8,this.devmin)||this.needPax,this.needPax=n5(e,I+345,l,c)||this.needPax,e[I+475]!==0?this.needPax=n5(e,I+345,155,c)||this.needPax:(this.needPax=n5(e,I+345,130,c)||this.needPax,this.needPax=Fke(e,I+476,12,this.atime)||this.needPax,this.needPax=Fke(e,I+488,12,this.ctime)||this.needPax);let r=8*32;for(let s=I;s{let l=t,n="",a,c=Bj.parse(t).root||".";if(m.Buffer.byteLength(l)<100)a=[l,n,!1];else{n=Bj.dirname(l),l=Bj.basename(l);do m.Buffer.byteLength(l)<=100&&m.Buffer.byteLength(n)<=e?a=[l,n,!1]:m.Buffer.byteLength(l)>100&&m.Buffer.byteLength(n)<=e?a=[l.slice(0,99),n,!0]:(l=Bj.join(Bj.basename(n),l),n=Bj.dirname(n));while(n!==c&&!a);a||(a=[t.slice(0,99),"",!0])}return a},l5=(t,e,I)=>t.slice(e,e+I).toString("utf8").replace(/\0.*/,""),Ake=(t,e,I)=>YPI(wQ(t,e,I)),YPI=t=>t===null?null:new Date(t*1e3),wQ=(t,e,I)=>t[e]&128?PXt.parse(t.slice(e,e+I)):API(t,e,I),RPI=t=>isNaN(t)?null:t,API=(t,e,I)=>RPI(parseInt(t.slice(e,e+I).toString("utf8").replace(/\0.*$/,"").trim(),8)),FPI={12:8589934591,8:2097151},HQ=(t,e,I,l)=>l===null?!1:l>FPI[I]||l<0?(PXt.encode(l,t.slice(e,e+I)),!0):(XPI(t,e,I,l),!1),XPI=(t,e,I,l)=>t.write(gPI(l,I),e,I,"ascii"),gPI=(t,e)=>vPI(Math.floor(t).toString(8),e),vPI=(t,e)=>(t.length===e-1?t:new Array(e-t.length-1).join("0")+t+" ")+"\0",Fke=(t,e,I,l)=>l===null?!1:HQ(t,e,I,l.getTime()/1e3),yPI=new Array(156).join("\0"),n5=(t,e,I,l)=>l===null?!1:(t.write(l+yPI,e,I,"utf8"),l.length!==m.Buffer.byteLength(l)||l.length>I);$Xt.exports=Xke});var iGe=Y((llc,egt)=>{"use strict";o();var wPI=Mj(),HPI=Qn(),e6=class{constructor(e,I){this.atime=e.atime||null,this.charset=e.charset||null,this.comment=e.comment||null,this.ctime=e.ctime||null,this.gid=e.gid||null,this.gname=e.gname||null,this.linkpath=e.linkpath||null,this.mtime=e.mtime||null,this.path=e.path||null,this.size=e.size||null,this.uid=e.uid||null,this.uname=e.uname||null,this.dev=e.dev||null,this.ino=e.ino||null,this.nlink=e.nlink||null,this.global=I||!1}encode(){let e=this.encodeBody();if(e==="")return null;let I=m.Buffer.byteLength(e),l=512*Math.ceil(1+I/512),n=m.Buffer.allocUnsafe(l);for(let a=0;a<512;a++)n[a]=0;new wPI({path:("PaxHeader/"+HPI.basename(this.path)).slice(0,99),mode:this.mode||420,uid:this.uid||null,gid:this.gid||null,size:I,mtime:this.mtime||null,type:this.global?"GlobalExtendedHeader":"ExtendedHeader",linkpath:"",uname:this.uname||"",gname:this.gname||"",devmaj:0,devmin:0,atime:this.atime||null,ctime:this.ctime||null}).encode(n),n.write(e,512,I,"utf8");for(let a=I+512;a=Math.pow(10,a)&&(a+=1),a+n+l}};e6.parse=(t,e,I)=>new e6(QPI(fPI(t),e),I);var QPI=(t,e)=>e?Object.keys(t).reduce((I,l)=>(I[l]=t[l],I),e):t,fPI=t=>t.replace(/\n$/,"").split(` +`).reduce(EPI,Object.create(null)),EPI=(t,e)=>{let I=parseInt(e,10);if(I!==m.Buffer.byteLength(e)+1)return t;e=e.slice((I+" ").length);let l=e.split("="),n=l.shift().replace(/^SCHILY\.(dev|ino|nlink)/,"$1");if(!n)return t;let a=l.join("=");return t[n]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(n)?new Date(a*1e3):/^[0-9]+$/.test(a)?+a:a,t};egt.exports=e6});var Sj=Y((alc,tgt)=>{o();tgt.exports=t=>{let e=t.length-1,I=-1;for(;e>-1&&t.charAt(e)==="/";)I=e,e--;return I===-1?t:t.slice(0,I)}});var GGe=Y((rlc,Igt)=>{"use strict";o();Igt.exports=t=>class extends t{warn(e,I,l={}){this.file&&(l.file=this.file),this.cwd&&(l.cwd=this.cwd),l.code=I instanceof Error&&I.code||e,l.tarCode=e,!this.strict&&l.recoverable!==!1?(I instanceof Error&&(l=Object.assign(I,l),I=I.message),this.emit("warn",l.tarCode,I,l)):I instanceof Error?this.emit("error",Object.assign(I,l)):this.emit("error",Object.assign(new Error(`${e}: ${I}`),l))}}});var vke=Y((ilc,lgt)=>{"use strict";o();var dGe=["|","<",">","?",":"],gke=dGe.map(t=>String.fromCharCode(61440+t.charCodeAt(0))),JPI=new Map(dGe.map((t,e)=>[t,gke[e]])),CPI=new Map(gke.map((t,e)=>[t,dGe[e]]));lgt.exports={encode:t=>dGe.reduce((e,I)=>e.split(I).join(JPI.get(I)),t),decode:t=>gke.reduce((e,I)=>e.split(I).join(CPI.get(I)),t)}});var yke=Y((dlc,agt)=>{o();var{isAbsolute:LPI,parse:ngt}=Qn().win32;agt.exports=t=>{let e="",I=ngt(t);for(;LPI(t)||I.root;){let l=t.charAt(0)==="/"&&t.slice(0,4)!=="//?/"?"/":I.root;t=t.slice(l.length),e+=l,I=ngt(t)}return[e,t]}});var rgt=Y((blc,cgt)=>{"use strict";o();cgt.exports=(t,e,I)=>(t&=4095,I&&(t=(t|384)&-19),e&&(t&256&&(t|=64),t&32&&(t|=8),t&4&&(t|=1)),t)});var xke=Y((hlc,Vgt)=>{"use strict";o();var{Minipass:bgt}=$ie(),mgt=iGe(),Zgt=Mj(),fF=vo(),sgt=Qn(),QF=zj(),kPI=Sj(),pgt=(t,e)=>e?(t=QF(t).replace(/^\.(\/|$)/,""),kPI(e)+"/"+t):QF(t),xPI=16*1024*1024,ogt=Symbol("process"),igt=Symbol("file"),Ggt=Symbol("directory"),Hke=Symbol("symlink"),dgt=Symbol("hardlink"),t6=Symbol("header"),uGe=Symbol("read"),Qke=Symbol("lstat"),bGe=Symbol("onlstat"),fke=Symbol("onread"),Eke=Symbol("onreadlink"),Jke=Symbol("openfile"),Cke=Symbol("onopenfile"),QQ=Symbol("close"),mGe=Symbol("mode"),Lke=Symbol("awaitDrain"),wke=Symbol("ondrain"),EF=Symbol("prefix"),ugt=Symbol("hadError"),hgt=GGe(),jPI=vke(),Wgt=yke(),Ngt=rgt(),ZGe=hgt(class extends bgt{constructor(e,I){if(I=I||{},super(I),typeof e!="string")throw new TypeError("path is required");this.path=QF(e),this.portable=!!I.portable,this.myuid=process.getuid&&process.getuid()||0,this.myuser=process.env.USER||"",this.maxReadSize=I.maxReadSize||xPI,this.linkCache=I.linkCache||new Map,this.statCache=I.statCache||new Map,this.preservePaths=!!I.preservePaths,this.cwd=QF(I.cwd||process.cwd()),this.strict=!!I.strict,this.noPax=!!I.noPax,this.noMtime=!!I.noMtime,this.mtime=I.mtime||null,this.prefix=I.prefix?QF(I.prefix):null,this.fd=null,this.blockLen=null,this.blockRemain=null,this.buf=null,this.offset=null,this.length=null,this.pos=null,this.remain=null,typeof I.onwarn=="function"&&this.on("warn",I.onwarn);let l=!1;if(!this.preservePaths){let[n,a]=Wgt(this.path);n&&(this.path=a,l=n)}this.win32=!!I.win32||process.platform==="win32",this.win32&&(this.path=jPI.decode(this.path.replace(/\\/g,"/")),e=e.replace(/\\/g,"/")),this.absolute=QF(I.absolute||sgt.resolve(this.cwd,e)),this.path===""&&(this.path="./"),l&&this.warn("TAR_ENTRY_INFO",`stripping ${l} from absolute path`,{entry:this,path:l+this.path}),this.statCache.has(this.absolute)?this[bGe](this.statCache.get(this.absolute)):this[Qke]()}emit(e,...I){return e==="error"&&(this[ugt]=!0),super.emit(e,...I)}[Qke](){fF.lstat(this.absolute,(e,I)=>{if(e)return this.emit("error",e);this[bGe](I)})}[bGe](e){this.statCache.set(this.absolute,e),this.stat=e,e.isFile()||(e.size=0),this.type=OPI(e),this.emit("stat",e),this[ogt]()}[ogt](){switch(this.type){case"File":return this[igt]();case"Directory":return this[Ggt]();case"SymbolicLink":return this[Hke]();default:return this.end()}}[mGe](e){return Ngt(e,this.type==="Directory",this.portable)}[EF](e){return pgt(e,this.prefix)}[t6](){this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.header=new Zgt({path:this[EF](this.path),linkpath:this.type==="Link"?this[EF](this.linkpath):this.linkpath,mode:this[mGe](this.stat.mode),uid:this.portable?null:this.stat.uid,gid:this.portable?null:this.stat.gid,size:this.stat.size,mtime:this.noMtime?null:this.mtime||this.stat.mtime,type:this.type,uname:this.portable?null:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?null:this.stat.atime,ctime:this.portable?null:this.stat.ctime}),this.header.encode()&&!this.noPax&&super.write(new mgt({atime:this.portable?null:this.header.atime,ctime:this.portable?null:this.header.ctime,gid:this.portable?null:this.header.gid,mtime:this.noMtime?null:this.mtime||this.header.mtime,path:this[EF](this.path),linkpath:this.type==="Link"?this[EF](this.linkpath):this.linkpath,size:this.header.size,uid:this.portable?null:this.header.uid,uname:this.portable?null:this.header.uname,dev:this.portable?null:this.stat.dev,ino:this.portable?null:this.stat.ino,nlink:this.portable?null:this.stat.nlink}).encode()),super.write(this.header.block)}[Ggt](){this.path.slice(-1)!=="/"&&(this.path+="/"),this.stat.size=0,this[t6](),this.end()}[Hke](){fF.readlink(this.absolute,(e,I)=>{if(e)return this.emit("error",e);this[Eke](I)})}[Eke](e){this.linkpath=QF(e),this[t6](),this.end()}[dgt](e){this.type="Link",this.linkpath=QF(sgt.relative(this.cwd,e)),this.stat.size=0,this[t6](),this.end()}[igt](){if(this.stat.nlink>1){let e=this.stat.dev+":"+this.stat.ino;if(this.linkCache.has(e)){let I=this.linkCache.get(e);if(I.indexOf(this.cwd)===0)return this[dgt](I)}this.linkCache.set(e,this.absolute)}if(this[t6](),this.stat.size===0)return this.end();this[Jke]()}[Jke](){fF.open(this.absolute,"r",(e,I)=>{if(e)return this.emit("error",e);this[Cke](I)})}[Cke](e){if(this.fd=e,this[ugt])return this[QQ]();this.blockLen=512*Math.ceil(this.stat.size/512),this.blockRemain=this.blockLen;let I=Math.min(this.blockLen,this.maxReadSize);this.buf=m.Buffer.allocUnsafe(I),this.offset=0,this.pos=0,this.remain=this.stat.size,this.length=this.buf.length,this[uGe]()}[uGe](){let{fd:e,buf:I,offset:l,length:n,pos:a}=this;fF.read(e,I,l,n,a,(c,r)=>{if(c)return this[QQ](()=>this.emit("error",c));this[fke](r)})}[QQ](e){fF.close(this.fd,e)}[fke](e){if(e<=0&&this.remain>0){let n=new Error("encountered unexpected EOF");return n.path=this.absolute,n.syscall="read",n.code="EOF",this[QQ](()=>this.emit("error",n))}if(e>this.remain){let n=new Error("did not encounter expected EOF");return n.path=this.absolute,n.syscall="read",n.code="EOF",this[QQ](()=>this.emit("error",n))}if(e===this.remain)for(let n=e;nthis[wke]())}[Lke](e){this.once("drain",e)}write(e){if(this.blockRemaine?this.emit("error",e):this.end());this.offset>=this.length&&(this.buf=m.Buffer.allocUnsafe(Math.min(this.blockRemain,this.buf.length)),this.offset=0),this.length=this.buf.length-this.offset,this[uGe]()}}),kke=class extends ZGe{[Qke](){this[bGe](fF.lstatSync(this.absolute))}[Hke](){this[Eke](fF.readlinkSync(this.absolute))}[Jke](){this[Cke](fF.openSync(this.absolute,"r"))}[uGe](){let e=!0;try{let{fd:I,buf:l,offset:n,length:a,pos:c}=this,r=fF.readSync(I,l,n,a,c);this[fke](r),e=!1}finally{if(e)try{this[QQ](()=>{})}catch{}}}[Lke](e){e()}[QQ](e){fF.closeSync(this.fd),e()}},UPI=hgt(class extends bgt{constructor(e,I){I=I||{},super(I),this.preservePaths=!!I.preservePaths,this.portable=!!I.portable,this.strict=!!I.strict,this.noPax=!!I.noPax,this.noMtime=!!I.noMtime,this.readEntry=e,this.type=e.type,this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.prefix=I.prefix||null,this.path=QF(e.path),this.mode=this[mGe](e.mode),this.uid=this.portable?null:e.uid,this.gid=this.portable?null:e.gid,this.uname=this.portable?null:e.uname,this.gname=this.portable?null:e.gname,this.size=e.size,this.mtime=this.noMtime?null:I.mtime||e.mtime,this.atime=this.portable?null:e.atime,this.ctime=this.portable?null:e.ctime,this.linkpath=QF(e.linkpath),typeof I.onwarn=="function"&&this.on("warn",I.onwarn);let l=!1;if(!this.preservePaths){let[n,a]=Wgt(this.path);n&&(this.path=a,l=n)}this.remain=e.size,this.blockRemain=e.startBlockSize,this.header=new Zgt({path:this[EF](this.path),linkpath:this.type==="Link"?this[EF](this.linkpath):this.linkpath,mode:this.mode,uid:this.portable?null:this.uid,gid:this.portable?null:this.gid,size:this.size,mtime:this.noMtime?null:this.mtime,type:this.type,uname:this.portable?null:this.uname,atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime}),l&&this.warn("TAR_ENTRY_INFO",`stripping ${l} from absolute path`,{entry:this,path:l+this.path}),this.header.encode()&&!this.noPax&&super.write(new mgt({atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime,gid:this.portable?null:this.gid,mtime:this.noMtime?null:this.mtime,path:this[EF](this.path),linkpath:this.type==="Link"?this[EF](this.linkpath):this.linkpath,size:this.size,uid:this.portable?null:this.uid,uname:this.portable?null:this.uname,dev:this.portable?null:this.readEntry.dev,ino:this.portable?null:this.readEntry.ino,nlink:this.portable?null:this.readEntry.nlink}).encode()),super.write(this.header.block),e.pipe(this)}[EF](e){return pgt(e,this.prefix)}[mGe](e){return Ngt(e,this.type==="Directory",this.portable)}write(e){let I=e.length;if(I>this.blockRemain)throw new Error("writing more to entry than is appropriate");return this.blockRemain-=I,super.write(e)}end(){return this.blockRemain&&super.write(m.Buffer.alloc(this.blockRemain)),super.end()}});ZGe.Sync=kke;ZGe.Tar=UPI;var OPI=t=>t.isFile()?"File":t.isDirectory()?"Directory":t.isSymbolicLink()?"SymbolicLink":"Unsupported";Vgt.exports=ZGe});var Rgt=Y((Nlc,Ygt)=>{"use strict";o();Ygt.exports=function(t){t.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var jke=Y((Ylc,Agt)=>{"use strict";o();Agt.exports=pn;pn.Node=a5;pn.create=pn;function pn(t){var e=this;if(e instanceof pn||(e=new pn),e.tail=null,e.head=null,e.length=0,t&&typeof t.forEach=="function")t.forEach(function(n){e.push(n)});else if(arguments.length>0)for(var I=0,l=arguments.length;I1)I=e;else if(this.head)l=this.head.next,I=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var n=0;l!==null;n++)I=t(I,l.value,n),l=l.next;return I};pn.prototype.reduceReverse=function(t,e){var I,l=this.tail;if(arguments.length>1)I=e;else if(this.tail)l=this.tail.prev,I=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var n=this.length-1;l!==null;n--)I=t(I,l.value,n),l=l.prev;return I};pn.prototype.toArray=function(){for(var t=new Array(this.length),e=0,I=this.head;I!==null;e++)t[e]=I.value,I=I.next;return t};pn.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,I=this.tail;I!==null;e++)t[e]=I.value,I=I.prev;return t};pn.prototype.slice=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var I=new pn;if(ethis.length&&(e=this.length);for(var l=0,n=this.head;n!==null&&lthis.length&&(e=this.length);for(var l=this.length,n=this.tail;n!==null&&l>e;l--)n=n.prev;for(;n!==null&&l>t;l--,n=n.prev)I.push(n.value);return I};pn.prototype.splice=function(t,e,...I){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var l=0,n=this.head;n!==null&&l{"use strict";o();var RGe=class{constructor(e,I){this.path=e||"./",this.absolute=I,this.entry=null,this.stat=null,this.readdir=null,this.pending=!1,this.ignore=!1,this.piped=!1}},{Minipass:SPI}=$ie(),Fgt=hke(),TPI=sGe(),Kke=xke(),_PI=Kke.Sync,KPI=Kke.Tar,DPI=jke(),Xgt=m.Buffer.alloc(1024),WGe=Symbol("onStat"),pGe=Symbol("ended"),JF=Symbol("queue"),Tj=Symbol("current"),c5=Symbol("process"),hGe=Symbol("processing"),ggt=Symbol("processJob"),CF=Symbol("jobs"),Uke=Symbol("jobDone"),NGe=Symbol("addFSEntry"),vgt=Symbol("addTarEntry"),Mke=Symbol("stat"),Ske=Symbol("readdir"),VGe=Symbol("onreaddir"),YGe=Symbol("pipe"),ygt=Symbol("entry"),Oke=Symbol("entryOpt"),Tke=Symbol("writeEntryClass"),Hgt=Symbol("write"),zke=Symbol("ondrain"),AGe=vo(),wgt=Qn(),qPI=GGe(),Bke=zj(),Dke=qPI(class extends SPI{constructor(e){if(super(e),e=e||Object.create(null),this.opt=e,this.file=e.file||"",this.cwd=e.cwd||process.cwd(),this.maxReadSize=e.maxReadSize,this.preservePaths=!!e.preservePaths,this.strict=!!e.strict,this.noPax=!!e.noPax,this.prefix=Bke(e.prefix||""),this.linkCache=e.linkCache||new Map,this.statCache=e.statCache||new Map,this.readdirCache=e.readdirCache||new Map,this[Tke]=Kke,typeof e.onwarn=="function"&&this.on("warn",e.onwarn),this.portable=!!e.portable,this.zip=null,e.gzip||e.brotli){if(e.gzip&&e.brotli)throw new TypeError("gzip and brotli are mutually exclusive");e.gzip&&(typeof e.gzip!="object"&&(e.gzip={}),this.portable&&(e.gzip.portable=!0),this.zip=new Fgt.Gzip(e.gzip)),e.brotli&&(typeof e.brotli!="object"&&(e.brotli={}),this.zip=new Fgt.BrotliCompress(e.brotli)),this.zip.on("data",I=>super.write(I)),this.zip.on("end",I=>super.end()),this.zip.on("drain",I=>this[zke]()),this.on("resume",I=>this.zip.resume())}else this.on("drain",this[zke]);this.noDirRecurse=!!e.noDirRecurse,this.follow=!!e.follow,this.noMtime=!!e.noMtime,this.mtime=e.mtime||null,this.filter=typeof e.filter=="function"?e.filter:I=>!0,this[JF]=new DPI,this[CF]=0,this.jobs=+e.jobs||4,this[hGe]=!1,this[pGe]=!1}[Hgt](e){return super.write(e)}add(e){return this.write(e),this}end(e){return e&&this.write(e),this[pGe]=!0,this[c5](),this}write(e){if(this[pGe])throw new Error("write after end");return e instanceof TPI?this[vgt](e):this[NGe](e),this.flowing}[vgt](e){let I=Bke(wgt.resolve(this.cwd,e.path));if(!this.filter(e.path,e))e.resume();else{let l=new RGe(e.path,I,!1);l.entry=new KPI(e,this[Oke](l)),l.entry.on("end",n=>this[Uke](l)),this[CF]+=1,this[JF].push(l)}this[c5]()}[NGe](e){let I=Bke(wgt.resolve(this.cwd,e));this[JF].push(new RGe(e,I)),this[c5]()}[Mke](e){e.pending=!0,this[CF]+=1;let I=this.follow?"stat":"lstat";AGe[I](e.absolute,(l,n)=>{e.pending=!1,this[CF]-=1,l?this.emit("error",l):this[WGe](e,n)})}[WGe](e,I){this.statCache.set(e.absolute,I),e.stat=I,this.filter(e.path,I)||(e.ignore=!0),this[c5]()}[Ske](e){e.pending=!0,this[CF]+=1,AGe.readdir(e.absolute,(I,l)=>{if(e.pending=!1,this[CF]-=1,I)return this.emit("error",I);this[VGe](e,l)})}[VGe](e,I){this.readdirCache.set(e.absolute,I),e.readdir=I,this[c5]()}[c5](){if(!this[hGe]){this[hGe]=!0;for(let e=this[JF].head;e!==null&&this[CF]this.warn(I,l,n),noPax:this.noPax,cwd:this.cwd,absolute:e.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime,prefix:this.prefix}}[ygt](e){this[CF]+=1;try{return new this[Tke](e.path,this[Oke](e)).on("end",()=>this[Uke](e)).on("error",I=>this.emit("error",I))}catch(I){this.emit("error",I)}}[zke](){this[Tj]&&this[Tj].entry&&this[Tj].entry.resume()}[YGe](e){e.piped=!0,e.readdir&&e.readdir.forEach(n=>{let a=e.path,c=a==="./"?"":a.replace(/\/*$/,"/");this[NGe](c+n)});let I=e.entry,l=this.zip;l?I.on("data",n=>{l.write(n)||I.pause()}):I.on("data",n=>{super.write(n)||I.pause()})}pause(){return this.zip&&this.zip.pause(),super.pause()}}),_ke=class extends Dke{constructor(e){super(e),this[Tke]=_PI}pause(){}resume(){}[Mke](e){let I=this.follow?"statSync":"lstatSync";this[WGe](e,AGe[I](e.absolute))}[Ske](e,I){this[VGe](e,AGe.readdirSync(e.absolute))}[YGe](e){let I=e.entry,l=this.zip;e.readdir&&e.readdir.forEach(n=>{let a=e.path,c=a==="./"?"":a.replace(/\/*$/,"/");this[NGe](c+n)}),l?I.on("data",n=>{l.write(n)}):I.on("data",n=>{super[Hgt](n)})}};Dke.Sync=_ke;Qgt.exports=Dke});var tU=Y(l6=>{"use strict";o();var PPI=Ike(),$PI=require("events").EventEmitter,$b=vo(),$ke=$b.writev;if(!$ke){let t=process.binding("fs"),e=t.FSReqWrap||t.FSReqCallback;$ke=(I,l,n,a)=>{let c=(s,i)=>a(s,i,l),r=new e;r.oncomplete=c,t.writeBuffers(I,l,n,r)}}var $j=Symbol("_autoClose"),Y0=Symbol("_close"),I6=Symbol("_ended"),qn=Symbol("_fd"),fgt=Symbol("_finished"),EQ=Symbol("_flags"),qke=Symbol("_flush"),e4e=Symbol("_handleChunk"),t4e=Symbol("_makeBuf"),wGe=Symbol("_mode"),XGe=Symbol("_needDrain"),qj=Symbol("_onerror"),eU=Symbol("_onopen"),Pke=Symbol("_onread"),Kj=Symbol("_onwrite"),JQ=Symbol("_open"),hg=Symbol("_path"),r5=Symbol("_pos"),LF=Symbol("_queue"),Dj=Symbol("_read"),Egt=Symbol("_readSize"),fQ=Symbol("_reading"),gGe=Symbol("_remain"),Jgt=Symbol("_size"),vGe=Symbol("_write"),_j=Symbol("_writing"),yGe=Symbol("_defaultFlag"),Pj=Symbol("_errored"),HGe=class extends PPI{constructor(e,I){if(I=I||{},super(I),this.readable=!0,this.writable=!1,typeof e!="string")throw new TypeError("path must be a string");this[Pj]=!1,this[qn]=typeof I.fd=="number"?I.fd:null,this[hg]=e,this[Egt]=I.readSize||16*1024*1024,this[fQ]=!1,this[Jgt]=typeof I.size=="number"?I.size:1/0,this[gGe]=this[Jgt],this[$j]=typeof I.autoClose=="boolean"?I.autoClose:!0,typeof this[qn]=="number"?this[Dj]():this[JQ]()}get fd(){return this[qn]}get path(){return this[hg]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[JQ](){$b.open(this[hg],"r",(e,I)=>this[eU](e,I))}[eU](e,I){e?this[qj](e):(this[qn]=I,this.emit("open",I),this[Dj]())}[t4e](){return m.Buffer.allocUnsafe(Math.min(this[Egt],this[gGe]))}[Dj](){if(!this[fQ]){this[fQ]=!0;let e=this[t4e]();if(e.length===0)return process.nextTick(()=>this[Pke](null,0,e));$b.read(this[qn],e,0,e.length,null,(I,l,n)=>this[Pke](I,l,n))}}[Pke](e,I,l){this[fQ]=!1,e?this[qj](e):this[e4e](I,l)&&this[Dj]()}[Y0](){if(this[$j]&&typeof this[qn]=="number"){let e=this[qn];this[qn]=null,$b.close(e,I=>I?this.emit("error",I):this.emit("close"))}}[qj](e){this[fQ]=!0,this[Y0](),this.emit("error",e)}[e4e](e,I){let l=!1;return this[gGe]-=e,e>0&&(l=super.write(ethis[eU](e,I))}[eU](e,I){this[yGe]&&this[EQ]==="r+"&&e&&e.code==="ENOENT"?(this[EQ]="w",this[JQ]()):e?this[qj](e):(this[qn]=I,this.emit("open",I),this[qke]())}end(e,I){return e&&this.write(e,I),this[I6]=!0,!this[_j]&&!this[LF].length&&typeof this[qn]=="number"&&this[Kj](null,0),this}write(e,I){return typeof e=="string"&&(e=m.Buffer.from(e,I)),this[I6]?(this.emit("error",new Error("write() after end()")),!1):this[qn]===null||this[_j]||this[LF].length?(this[LF].push(e),this[XGe]=!0,!1):(this[_j]=!0,this[vGe](e),!0)}[vGe](e){$b.write(this[qn],e,0,e.length,this[r5],(I,l)=>this[Kj](I,l))}[Kj](e,I){e?this[qj](e):(this[r5]!==null&&(this[r5]+=I),this[LF].length?this[qke]():(this[_j]=!1,this[I6]&&!this[fgt]?(this[fgt]=!0,this[Y0](),this.emit("finish")):this[XGe]&&(this[XGe]=!1,this.emit("drain"))))}[qke](){if(this[LF].length===0)this[I6]&&this[Kj](null,0);else if(this[LF].length===1)this[vGe](this[LF].pop());else{let e=this[LF];this[LF]=[],$ke(this[qn],e,this[r5],(I,l)=>this[Kj](I,l))}}[Y0](){if(this[$j]&&typeof this[qn]=="number"){let e=this[qn];this[qn]=null,$b.close(e,I=>I?this.emit("error",I):this.emit("close"))}}},l4e=class extends QGe{[JQ](){let e;if(this[yGe]&&this[EQ]==="r+")try{e=$b.openSync(this[hg],this[EQ],this[wGe])}catch(I){if(I.code==="ENOENT")return this[EQ]="w",this[JQ]();throw I}else e=$b.openSync(this[hg],this[EQ],this[wGe]);this[eU](null,e)}[Y0](){if(this[$j]&&typeof this[qn]=="number"){let e=this[qn];this[qn]=null,$b.closeSync(e),this.emit("close")}}[vGe](e){let I=!0;try{this[Kj](null,$b.writeSync(this[qn],e,0,e.length,this[r5])),I=!1}finally{if(I)try{this[Y0]()}catch{}}}};l6.ReadStream=HGe;l6.ReadStreamSync=I4e;l6.WriteStream=QGe;l6.WriteStreamSync=l4e});var xGe=Y((wlc,Mgt)=>{"use strict";o();var e7I=GGe(),Cgt=Mj(),t7I=require("events"),I7I=jke(),l7I=1024*1024,n7I=sGe(),Lgt=iGe(),kgt=hke(),{nextTick:a7I}=LXe(),n4e=m.Buffer.from([31,139]),Dp=Symbol("state"),s5=Symbol("writeEntry"),Wg=Symbol("readEntry"),a4e=Symbol("nextEntry"),xgt=Symbol("processEntry"),qp=Symbol("extendedHeader"),n6=Symbol("globalExtendedHeader"),CQ=Symbol("meta"),jgt=Symbol("emitMeta"),Aa=Symbol("buffer"),Ng=Symbol("queue"),LQ=Symbol("ended"),Ugt=Symbol("emittedEnd"),o5=Symbol("emit"),Ho=Symbol("unzip"),fGe=Symbol("consumeChunk"),EGe=Symbol("consumeChunkSub"),c4e=Symbol("consumeBody"),Ogt=Symbol("consumeMeta"),zgt=Symbol("consumeHeader"),JGe=Symbol("consuming"),r4e=Symbol("bufferConcat"),s4e=Symbol("maybeEnd"),a6=Symbol("writing"),kQ=Symbol("aborted"),CGe=Symbol("onDone"),i5=Symbol("sawValidEntry"),LGe=Symbol("sawNullBlock"),kGe=Symbol("sawEOF"),Bgt=Symbol("closeStream"),c7I=t=>!0;Mgt.exports=e7I(class extends t7I{constructor(e){e=e||{},super(e),this.file=e.file||"",this[i5]=null,this.on(CGe,l=>{(this[Dp]==="begin"||this[i5]===!1)&&this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")}),e.ondone?this.on(CGe,e.ondone):this.on(CGe,l=>{this.emit("prefinish"),this.emit("finish"),this.emit("end")}),this.strict=!!e.strict,this.maxMetaEntrySize=e.maxMetaEntrySize||l7I,this.filter=typeof e.filter=="function"?e.filter:c7I;let I=e.file&&(e.file.endsWith(".tar.br")||e.file.endsWith(".tbr"));this.brotli=!e.gzip&&e.brotli!==void 0?e.brotli:I?void 0:!1,this.writable=!0,this.readable=!1,this[Ng]=new I7I,this[Aa]=null,this[Wg]=null,this[s5]=null,this[Dp]="begin",this[CQ]="",this[qp]=null,this[n6]=null,this[LQ]=!1,this[Ho]=null,this[kQ]=!1,this[LGe]=!1,this[kGe]=!1,this.on("end",()=>this[Bgt]()),typeof e.onwarn=="function"&&this.on("warn",e.onwarn),typeof e.onentry=="function"&&this.on("entry",e.onentry)}[zgt](e,I){this[i5]===null&&(this[i5]=!1);let l;try{l=new Cgt(e,I,this[qp],this[n6])}catch(n){return this.warn("TAR_ENTRY_INVALID",n)}if(l.nullBlock)this[LGe]?(this[kGe]=!0,this[Dp]==="begin"&&(this[Dp]="header"),this[o5]("eof")):(this[LGe]=!0,this[o5]("nullBlock"));else if(this[LGe]=!1,!l.cksumValid)this.warn("TAR_ENTRY_INVALID","checksum failure",{header:l});else if(!l.path)this.warn("TAR_ENTRY_INVALID","path is required",{header:l});else{let n=l.type;if(/^(Symbolic)?Link$/.test(n)&&!l.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath required",{header:l});else if(!/^(Symbolic)?Link$/.test(n)&&l.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:l});else{let a=this[s5]=new n7I(l,this[qp],this[n6]);if(!this[i5])if(a.remain){let c=()=>{a.invalid||(this[i5]=!0)};a.on("end",c)}else this[i5]=!0;a.meta?a.size>this.maxMetaEntrySize?(a.ignore=!0,this[o5]("ignoredEntry",a),this[Dp]="ignore",a.resume()):a.size>0&&(this[CQ]="",a.on("data",c=>this[CQ]+=c),this[Dp]="meta"):(this[qp]=null,a.ignore=a.ignore||!this.filter(a.path,a),a.ignore?(this[o5]("ignoredEntry",a),this[Dp]=a.remain?"ignore":"header",a.resume()):(a.remain?this[Dp]="body":(this[Dp]="header",a.end()),this[Wg]?this[Ng].push(a):(this[Ng].push(a),this[a4e]())))}}}[Bgt](){a7I(()=>this.emit("close"))}[xgt](e){let I=!0;return e?Array.isArray(e)?this.emit.apply(this,e):(this[Wg]=e,this.emit("entry",e),e.emittedEnd||(e.on("end",l=>this[a4e]()),I=!1)):(this[Wg]=null,I=!1),I}[a4e](){do;while(this[xgt](this[Ng].shift()));if(!this[Ng].length){let e=this[Wg];!e||e.flowing||e.size===e.remain?this[a6]||this.emit("drain"):e.once("drain",l=>this.emit("drain"))}}[c4e](e,I){let l=this[s5],n=l.blockRemain,a=n>=e.length&&I===0?e:e.slice(I,I+n);return l.write(a),l.blockRemain||(this[Dp]="header",this[s5]=null,l.end()),a.length}[Ogt](e,I){let l=this[s5],n=this[c4e](e,I);return this[s5]||this[jgt](l),n}[o5](e,I,l){!this[Ng].length&&!this[Wg]?this.emit(e,I,l):this[Ng].push([e,I,l])}[jgt](e){switch(this[o5]("meta",this[CQ]),e.type){case"ExtendedHeader":case"OldExtendedHeader":this[qp]=Lgt.parse(this[CQ],this[qp],!1);break;case"GlobalExtendedHeader":this[n6]=Lgt.parse(this[CQ],this[n6],!0);break;case"NextFileHasLongPath":case"OldGnuLongPath":this[qp]=this[qp]||Object.create(null),this[qp].path=this[CQ].replace(/\0.*/,"");break;case"NextFileHasLongLinkpath":this[qp]=this[qp]||Object.create(null),this[qp].linkpath=this[CQ].replace(/\0.*/,"");break;default:throw new Error("unknown meta: "+e.type)}}abort(e){this[kQ]=!0,this.emit("abort",e),this.warn("TAR_ABORT",e,{recoverable:!1})}write(e){if(this[kQ])return;if((this[Ho]===null||this.brotli===void 0&&this[Ho]===!1)&&e){if(this[Aa]&&(e=m.Buffer.concat([this[Aa],e]),this[Aa]=null),e.lengththis[fGe](r)),this[Ho].on("error",r=>this.abort(r)),this[Ho].on("end",r=>{this[LQ]=!0,this[fGe]()}),this[a6]=!0;let c=this[Ho][a?"end":"write"](e);return this[a6]=!1,c}}this[a6]=!0,this[Ho]?this[Ho].write(e):this[fGe](e),this[a6]=!1;let l=this[Ng].length?!1:this[Wg]?this[Wg].flowing:!0;return!l&&!this[Ng].length&&this[Wg].once("drain",n=>this.emit("drain")),l}[r4e](e){e&&!this[kQ]&&(this[Aa]=this[Aa]?m.Buffer.concat([this[Aa],e]):e)}[s4e](){if(this[LQ]&&!this[Ugt]&&!this[kQ]&&!this[JGe]){this[Ugt]=!0;let e=this[s5];if(e&&e.blockRemain){let I=this[Aa]?this[Aa].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${e.blockRemain} more bytes, only ${I} available)`,{entry:e}),this[Aa]&&e.write(this[Aa]),e.end()}this[o5](CGe)}}[fGe](e){if(this[JGe])this[r4e](e);else if(!e&&!this[Aa])this[s4e]();else{if(this[JGe]=!0,this[Aa]){this[r4e](e);let I=this[Aa];this[Aa]=null,this[EGe](I)}else this[EGe](e);for(;this[Aa]&&this[Aa].length>=512&&!this[kQ]&&!this[kGe];){let I=this[Aa];this[Aa]=null,this[EGe](I)}this[JGe]=!1}(!this[Aa]||this[LQ])&&this[s4e]()}[EGe](e){let I=0,l=e.length;for(;I+512<=l&&!this[kQ]&&!this[kGe];)switch(this[Dp]){case"begin":case"header":this[zgt](e,I),I+=512;break;case"ignore":case"body":I+=this[c4e](e,I);break;case"meta":I+=this[Ogt](e,I);break;default:throw new Error("invalid state: "+this[Dp])}I{"use strict";o();var r7I=kj(),Tgt=xGe(),IU=vo(),s7I=tU(),Sgt=Qn(),o4e=Sj();Kgt.exports=(t,e,I)=>{typeof t=="function"?(I=t,e=null,t={}):Array.isArray(t)&&(e=t,t={}),typeof e=="function"&&(I=e,e=null),e?e=Array.from(e):e=[];let l=r7I(t);if(l.sync&&typeof I=="function")throw new TypeError("callback not supported for sync tar functions");if(!l.file&&typeof I=="function")throw new TypeError("callback only supported with file option");return e.length&&i7I(l,e),l.noResume||o7I(l),l.file&&l.sync?G7I(l):l.file?d7I(l,I):_gt(l)};var o7I=t=>{let e=t.onentry;t.onentry=e?I=>{e(I),I.resume()}:I=>I.resume()},i7I=(t,e)=>{let I=new Map(e.map(a=>[o4e(a),!0])),l=t.filter,n=(a,c)=>{let r=c||Sgt.parse(a).root||".",s=a===r?!1:I.has(a)?I.get(a):n(Sgt.dirname(a),r);return I.set(a,s),s};t.filter=l?(a,c)=>l(a,c)&&n(o4e(a)):a=>n(o4e(a))},G7I=t=>{let e=_gt(t),I=t.file,l=!0,n;try{let a=IU.statSync(I),c=t.maxReadSize||16*1024*1024;if(a.size{let I=new Tgt(t),l=t.maxReadSize||16*1024*1024,n=t.file,a=new Promise((c,r)=>{I.on("error",r),I.on("end",c),IU.stat(n,(s,i)=>{if(s)r(s);else{let G=new s7I.ReadStream(n,{readSize:l,size:i.size});G.on("error",r),G.pipe(I)}})});return e?a.then(e,e):a},_gt=t=>new Tgt(t)});var tvt=Y((Elc,evt)=>{"use strict";o();var u7I=kj(),UGe=FGe(),Dgt=tU(),qgt=jGe(),Pgt=Qn();evt.exports=(t,e,I)=>{if(typeof e=="function"&&(I=e),Array.isArray(t)&&(e=t,t={}),!e||!Array.isArray(e)||!e.length)throw new TypeError("no files or directories specified");e=Array.from(e);let l=u7I(t);if(l.sync&&typeof I=="function")throw new TypeError("callback not supported for sync tar functions");if(!l.file&&typeof I=="function")throw new TypeError("callback only supported with file option");return l.file&&l.sync?b7I(l,e):l.file?m7I(l,e,I):l.sync?Z7I(l,e):p7I(l,e)};var b7I=(t,e)=>{let I=new UGe.Sync(t),l=new Dgt.WriteStreamSync(t.file,{mode:t.mode||438});I.pipe(l),$gt(I,e)},m7I=(t,e,I)=>{let l=new UGe(t),n=new Dgt.WriteStream(t.file,{mode:t.mode||438});l.pipe(n);let a=new Promise((c,r)=>{n.on("error",r),n.on("close",c),l.on("error",r)});return i4e(l,e),I?a.then(I,I):a},$gt=(t,e)=>{e.forEach(I=>{I.charAt(0)==="@"?qgt({file:Pgt.resolve(t.cwd,I.slice(1)),sync:!0,noResume:!0,onentry:l=>t.add(l)}):t.add(I)}),t.end()},i4e=(t,e)=>{for(;e.length;){let I=e.shift();if(I.charAt(0)==="@")return qgt({file:Pgt.resolve(t.cwd,I.slice(1)),noResume:!0,onentry:l=>t.add(l)}).then(l=>i4e(t,e));t.add(I)}t.end()},Z7I=(t,e)=>{let I=new UGe.Sync(t);return $gt(I,e),I},p7I=(t,e)=>{let I=new UGe(t);return i4e(I,e),I}});var G4e=Y((Clc,svt)=>{"use strict";o();var h7I=kj(),Ivt=FGe(),VZ=vo(),lvt=tU(),nvt=jGe(),avt=Qn(),cvt=Mj();svt.exports=(t,e,I)=>{let l=h7I(t);if(!l.file)throw new TypeError("file is required");if(l.gzip||l.brotli||l.file.endsWith(".br")||l.file.endsWith(".tbr"))throw new TypeError("cannot append to compressed archives");if(!e||!Array.isArray(e)||!e.length)throw new TypeError("no files or directories specified");return e=Array.from(e),l.sync?W7I(l,e):V7I(l,e,I)};var W7I=(t,e)=>{let I=new Ivt.Sync(t),l=!0,n,a;try{try{n=VZ.openSync(t.file,"r+")}catch(s){if(s.code==="ENOENT")n=VZ.openSync(t.file,"w+");else throw s}let c=VZ.fstatSync(n),r=m.Buffer.alloc(512);e:for(a=0;ac.size)break;a+=i,t.mtimeCache&&t.mtimeCache.set(s.path,s.mtime)}l=!1,N7I(t,I,a,n,e)}finally{if(l)try{VZ.closeSync(n)}catch{}}},N7I=(t,e,I,l,n)=>{let a=new lvt.WriteStreamSync(t.file,{fd:l,start:I});e.pipe(a),Y7I(e,n)},V7I=(t,e,I)=>{e=Array.from(e);let l=new Ivt(t),n=(c,r,s)=>{let i=(Z,p)=>{Z?VZ.close(c,W=>s(Z)):s(null,p)},G=0;if(r===0)return i(null,0);let d=0,u=m.Buffer.alloc(512),b=(Z,p)=>{if(Z)return i(Z);if(d+=p,d<512&&p)return VZ.read(c,u,d,u.length-d,G+d,b);if(G===0&&u[0]===31&&u[1]===139)return i(new Error("cannot append to compressed archives"));if(d<512)return i(null,G);let W=new cvt(u);if(!W.cksumValid)return i(null,G);let h=512*Math.ceil(W.size/512);if(G+h+512>r||(G+=h+512,G>=r))return i(null,G);t.mtimeCache&&t.mtimeCache.set(W.path,W.mtime),d=0,VZ.read(c,u,0,512,G,b)};VZ.read(c,u,0,512,G,b)},a=new Promise((c,r)=>{l.on("error",r);let s="r+",i=(G,d)=>{if(G&&G.code==="ENOENT"&&s==="r+")return s="w+",VZ.open(t.file,s,i);if(G)return r(G);VZ.fstat(d,(u,b)=>{if(u)return VZ.close(d,()=>r(u));n(d,b.size,(Z,p)=>{if(Z)return r(Z);let W=new lvt.WriteStream(t.file,{fd:d,start:p});l.pipe(W),W.on("error",r),W.on("close",c),rvt(l,e)})})};VZ.open(t.file,s,i)});return I?a.then(I,I):a},Y7I=(t,e)=>{e.forEach(I=>{I.charAt(0)==="@"?nvt({file:avt.resolve(t.cwd,I.slice(1)),sync:!0,noResume:!0,onentry:l=>t.add(l)}):t.add(I)}),t.end()},rvt=(t,e)=>{for(;e.length;){let I=e.shift();if(I.charAt(0)==="@")return nvt({file:avt.resolve(t.cwd,I.slice(1)),noResume:!0,onentry:l=>t.add(l)}).then(l=>rvt(t,e));t.add(I)}t.end()}});var ivt=Y((klc,ovt)=>{"use strict";o();var R7I=kj(),A7I=G4e();ovt.exports=(t,e,I)=>{let l=R7I(t);if(!l.file)throw new TypeError("file is required");if(l.gzip||l.brotli||l.file.endsWith(".br")||l.file.endsWith(".tbr"))throw new TypeError("cannot append to compressed archives");if(!e||!Array.isArray(e)||!e.length)throw new TypeError("no files or directories specified");return e=Array.from(e),F7I(l),A7I(l,e,I)};var F7I=t=>{let e=t.filter;t.mtimeCache||(t.mtimeCache=new Map),t.filter=e?(I,l)=>e(I,l)&&!(t.mtimeCache.get(I)>l.mtime):(I,l)=>!(t.mtimeCache.get(I)>l.mtime)}});var uvt=Y((jlc,dvt)=>{o();var{promisify:Gvt}=require("util"),xQ=vo(),X7I=t=>{if(!t)t={mode:511,fs:xQ};else if(typeof t=="object")t={mode:511,fs:xQ,...t};else if(typeof t=="number")t={mode:t,fs:xQ};else if(typeof t=="string")t={mode:parseInt(t,8),fs:xQ};else throw new TypeError("invalid options argument");return t.mkdir=t.mkdir||t.fs.mkdir||xQ.mkdir,t.mkdirAsync=Gvt(t.mkdir),t.stat=t.stat||t.fs.stat||xQ.stat,t.statAsync=Gvt(t.stat),t.statSync=t.statSync||t.fs.statSync||xQ.statSync,t.mkdirSync=t.mkdirSync||t.fs.mkdirSync||xQ.mkdirSync,t};dvt.exports=X7I});var mvt=Y((Olc,bvt)=>{o();var g7I=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform,{resolve:v7I,parse:y7I}=Qn(),w7I=t=>{if(/\0/.test(t))throw Object.assign(new TypeError("path must be a string without null bytes"),{path:t,code:"ERR_INVALID_ARG_VALUE"});if(t=v7I(t),g7I==="win32"){let e=/[*|"<>?:]/,{root:I}=y7I(t);if(e.test(t.substr(I.length)))throw Object.assign(new Error("Illegal characters in path."),{path:t,code:"EINVAL"})}return t};bvt.exports=w7I});var Nvt=Y((Blc,Wvt)=>{o();var{dirname:Zvt}=Qn(),pvt=(t,e,I=void 0)=>I===e?Promise.resolve():t.statAsync(e).then(l=>l.isDirectory()?I:void 0,l=>l.code==="ENOENT"?pvt(t,Zvt(e),e):void 0),hvt=(t,e,I=void 0)=>{if(I!==e)try{return t.statSync(e).isDirectory()?I:void 0}catch(l){return l.code==="ENOENT"?hvt(t,Zvt(e),e):void 0}};Wvt.exports={findMade:pvt,findMadeSync:hvt}});var b4e=Y((Slc,Yvt)=>{o();var{dirname:Vvt}=Qn(),d4e=(t,e,I)=>{e.recursive=!1;let l=Vvt(t);return l===t?e.mkdirAsync(t,e).catch(n=>{if(n.code!=="EISDIR")throw n}):e.mkdirAsync(t,e).then(()=>I||t,n=>{if(n.code==="ENOENT")return d4e(l,e).then(a=>d4e(t,e,a));if(n.code!=="EEXIST"&&n.code!=="EROFS")throw n;return e.statAsync(t).then(a=>{if(a.isDirectory())return I;throw n},()=>{throw n})})},u4e=(t,e,I)=>{let l=Vvt(t);if(e.recursive=!1,l===t)try{return e.mkdirSync(t,e)}catch(n){if(n.code!=="EISDIR")throw n;return}try{return e.mkdirSync(t,e),I||t}catch(n){if(n.code==="ENOENT")return u4e(t,e,u4e(l,e,I));if(n.code!=="EEXIST"&&n.code!=="EROFS")throw n;try{if(!e.statSync(t).isDirectory())throw n}catch{throw n}}};Yvt.exports={mkdirpManual:d4e,mkdirpManualSync:u4e}});var Fvt=Y((_lc,Avt)=>{o();var{dirname:Rvt}=Qn(),{findMade:H7I,findMadeSync:Q7I}=Nvt(),{mkdirpManual:f7I,mkdirpManualSync:E7I}=b4e(),J7I=(t,e)=>(e.recursive=!0,Rvt(t)===t?e.mkdirAsync(t,e):H7I(e,t).then(l=>e.mkdirAsync(t,e).then(()=>l).catch(n=>{if(n.code==="ENOENT")return f7I(t,e);throw n}))),C7I=(t,e)=>{if(e.recursive=!0,Rvt(t)===t)return e.mkdirSync(t,e);let l=Q7I(e,t);try{return e.mkdirSync(t,e),l}catch(n){if(n.code==="ENOENT")return E7I(t,e);throw n}};Avt.exports={mkdirpNative:J7I,mkdirpNativeSync:C7I}});var yvt=Y((Dlc,vvt)=>{o();var Xvt=vo(),L7I=process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version,m4e=L7I.replace(/^v/,"").split("."),gvt=+m4e[0]>10||+m4e[0]==10&&+m4e[1]>=12,k7I=gvt?t=>t.mkdir===Xvt.mkdir:()=>!1,x7I=gvt?t=>t.mkdirSync===Xvt.mkdirSync:()=>!1;vvt.exports={useNative:k7I,useNativeSync:x7I}});var Jvt=Y((Plc,Evt)=>{o();var lU=uvt(),nU=mvt(),{mkdirpNative:wvt,mkdirpNativeSync:Hvt}=Fvt(),{mkdirpManual:Qvt,mkdirpManualSync:fvt}=b4e(),{useNative:j7I,useNativeSync:U7I}=yvt(),aU=(t,e)=>(t=nU(t),e=lU(e),j7I(e)?wvt(t,e):Qvt(t,e)),O7I=(t,e)=>(t=nU(t),e=lU(e),U7I(e)?Hvt(t,e):fvt(t,e));aU.sync=O7I;aU.native=(t,e)=>wvt(nU(t),lU(e));aU.manual=(t,e)=>Qvt(nU(t),lU(e));aU.nativeSync=(t,e)=>Hvt(nU(t),lU(e));aU.manualSync=(t,e)=>fvt(nU(t),lU(e));Evt.exports=aU});var Ovt=Y((enc,Uvt)=>{"use strict";o();var Pp=vo(),G5=Qn(),z7I=Pp.lchown?"lchown":"chown",B7I=Pp.lchownSync?"lchownSync":"chownSync",Lvt=Pp.lchown&&!process.version.match(/v1[1-9]+\./)&&!process.version.match(/v10\.[6-9]/),Cvt=(t,e,I)=>{try{return Pp[B7I](t,e,I)}catch(l){if(l.code!=="ENOENT")throw l}},M7I=(t,e,I)=>{try{return Pp.chownSync(t,e,I)}catch(l){if(l.code!=="ENOENT")throw l}},S7I=Lvt?(t,e,I,l)=>n=>{!n||n.code!=="EISDIR"?l(n):Pp.chown(t,e,I,l)}:(t,e,I,l)=>l,Z4e=Lvt?(t,e,I)=>{try{return Cvt(t,e,I)}catch(l){if(l.code!=="EISDIR")throw l;M7I(t,e,I)}}:(t,e,I)=>Cvt(t,e,I),T7I=process.version,kvt=(t,e,I)=>Pp.readdir(t,e,I),_7I=(t,e)=>Pp.readdirSync(t,e);/^v4\./.test(T7I)&&(kvt=(t,e,I)=>Pp.readdir(t,I));var OGe=(t,e,I,l)=>{Pp[z7I](t,e,I,S7I(t,e,I,n=>{l(n&&n.code!=="ENOENT"?n:null)}))},xvt=(t,e,I,l,n)=>{if(typeof e=="string")return Pp.lstat(G5.resolve(t,e),(a,c)=>{if(a)return n(a.code!=="ENOENT"?a:null);c.name=e,xvt(t,c,I,l,n)});if(e.isDirectory())p4e(G5.resolve(t,e.name),I,l,a=>{if(a)return n(a);let c=G5.resolve(t,e.name);OGe(c,I,l,n)});else{let a=G5.resolve(t,e.name);OGe(a,I,l,n)}},p4e=(t,e,I,l)=>{kvt(t,{withFileTypes:!0},(n,a)=>{if(n){if(n.code==="ENOENT")return l();if(n.code!=="ENOTDIR"&&n.code!=="ENOTSUP")return l(n)}if(n||!a.length)return OGe(t,e,I,l);let c=a.length,r=null,s=i=>{if(!r){if(i)return l(r=i);if(--c===0)return OGe(t,e,I,l)}};a.forEach(i=>xvt(t,i,e,I,s))})},K7I=(t,e,I,l)=>{if(typeof e=="string")try{let n=Pp.lstatSync(G5.resolve(t,e));n.name=e,e=n}catch(n){if(n.code==="ENOENT")return;throw n}e.isDirectory()&&jvt(G5.resolve(t,e.name),I,l),Z4e(G5.resolve(t,e.name),I,l)},jvt=(t,e,I)=>{let l;try{l=_7I(t,{withFileTypes:!0})}catch(n){if(n.code==="ENOENT")return;if(n.code==="ENOTDIR"||n.code==="ENOTSUP")return Z4e(t,e,I);throw n}return l&&l.length&&l.forEach(n=>K7I(t,n,e,I)),Z4e(t,e,I)};Uvt.exports=p4e;p4e.sync=jvt});var Svt=Y((Inc,h4e)=>{"use strict";o();var zvt=Jvt(),$p=vo(),zGe=Qn(),Bvt=Ovt(),R0=zj(),BGe=class extends Error{constructor(e,I){super("Cannot extract through symbolic link"),this.path=I,this.symlink=e}get name(){return"SylinkError"}},MGe=class extends Error{constructor(e,I){super(I+": Cannot cd into '"+e+"'"),this.path=e,this.code=I}get name(){return"CwdError"}},SGe=(t,e)=>t.get(R0(e)),c6=(t,e,I)=>t.set(R0(e),I),D7I=(t,e)=>{$p.stat(t,(I,l)=>{(I||!l.isDirectory())&&(I=new MGe(t,I&&I.code||"ENOTDIR")),e(I)})};h4e.exports=(t,e,I)=>{t=R0(t);let l=e.umask,n=e.mode|448,a=(n&l)!==0,c=e.uid,r=e.gid,s=typeof c=="number"&&typeof r=="number"&&(c!==e.processUid||r!==e.processGid),i=e.preserve,G=e.unlink,d=e.cache,u=R0(e.cwd),b=(W,h)=>{W?I(W):(c6(d,t,!0),h&&s?Bvt(h,c,r,N=>b(N)):a?$p.chmod(t,n,I):I())};if(d&&SGe(d,t)===!0)return b();if(t===u)return D7I(t,b);if(i)return zvt(t,{mode:n}).then(W=>b(null,W),b);let p=R0(zGe.relative(u,t)).split("/");TGe(u,p,n,d,G,u,null,b)};var TGe=(t,e,I,l,n,a,c,r)=>{if(!e.length)return r(null,c);let s=e.shift(),i=R0(zGe.resolve(t+"/"+s));if(SGe(l,i))return TGe(i,e,I,l,n,a,c,r);$p.mkdir(i,I,Mvt(i,e,I,l,n,a,c,r))},Mvt=(t,e,I,l,n,a,c,r)=>s=>{s?$p.lstat(t,(i,G)=>{if(i)i.path=i.path&&R0(i.path),r(i);else if(G.isDirectory())TGe(t,e,I,l,n,a,c,r);else if(n)$p.unlink(t,d=>{if(d)return r(d);$p.mkdir(t,I,Mvt(t,e,I,l,n,a,c,r))});else{if(G.isSymbolicLink())return r(new BGe(t,t+"/"+e.join("/")));r(s)}}):(c=c||t,TGe(t,e,I,l,n,a,c,r))},q7I=t=>{let e=!1,I="ENOTDIR";try{e=$p.statSync(t).isDirectory()}catch(l){I=l.code}finally{if(!e)throw new MGe(t,I)}};h4e.exports.sync=(t,e)=>{t=R0(t);let I=e.umask,l=e.mode|448,n=(l&I)!==0,a=e.uid,c=e.gid,r=typeof a=="number"&&typeof c=="number"&&(a!==e.processUid||c!==e.processGid),s=e.preserve,i=e.unlink,G=e.cache,d=R0(e.cwd),u=W=>{c6(G,t,!0),W&&r&&Bvt.sync(W,a,c),n&&$p.chmodSync(t,l)};if(G&&SGe(G,t)===!0)return u();if(t===d)return q7I(d),u();if(s)return u(zvt.sync(t,l));let Z=R0(zGe.relative(d,t)).split("/"),p=null;for(let W=Z.shift(),h=d;W&&(h+="/"+W);W=Z.shift())if(h=R0(zGe.resolve(h)),!SGe(G,h))try{$p.mkdirSync(h,l),p=p||h,c6(G,h,!0)}catch{let V=$p.lstatSync(h);if(V.isDirectory()){c6(G,h,!0);continue}else if(i){$p.unlinkSync(h),$p.mkdirSync(h,l),p=p||h,c6(G,h,!0);continue}else if(V.isSymbolicLink())return new BGe(h,h+"/"+Z.join("/"))}return u(p)}});var N4e=Y((nnc,Tvt)=>{o();var W4e=Object.create(null),{hasOwnProperty:P7I}=Object.prototype;Tvt.exports=t=>(P7I.call(W4e,t)||(W4e[t]=t.normalize("NFD")),W4e[t])});var qvt=Y((cnc,Dvt)=>{o();var _vt=require("assert"),$7I=N4e(),e8I=Sj(),{join:Kvt}=Qn(),t8I=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,I8I=t8I==="win32";Dvt.exports=()=>{let t=new Map,e=new Map,I=i=>i.split("/").slice(0,-1).reduce((d,u)=>(d.length&&(u=Kvt(d[d.length-1],u)),d.push(u||"/"),d),[]),l=new Set,n=i=>{let G=e.get(i);if(!G)throw new Error("function does not have any path reservations");return{paths:G.paths.map(d=>t.get(d)),dirs:[...G.dirs].map(d=>t.get(d))}},a=i=>{let{paths:G,dirs:d}=n(i);return G.every(u=>u[0]===i)&&d.every(u=>u[0]instanceof Set&&u[0].has(i))},c=i=>l.has(i)||!a(i)?!1:(l.add(i),i(()=>r(i)),!0),r=i=>{if(!l.has(i))return!1;let{paths:G,dirs:d}=e.get(i),u=new Set;return G.forEach(b=>{let Z=t.get(b);_vt.equal(Z[0],i),Z.length===1?t.delete(b):(Z.shift(),typeof Z[0]=="function"?u.add(Z[0]):Z[0].forEach(p=>u.add(p)))}),d.forEach(b=>{let Z=t.get(b);_vt(Z[0]instanceof Set),Z[0].size===1&&Z.length===1?t.delete(b):Z[0].size===1?(Z.shift(),u.add(Z[0])):Z[0].delete(i)}),l.delete(i),u.forEach(b=>c(b)),!0};return{check:a,reserve:(i,G)=>{i=I8I?["win32 parallelization disabled"]:i.map(u=>e8I(Kvt($7I(u))).toLowerCase());let d=new Set(i.map(u=>I(u)).reduce((u,b)=>u.concat(b)));return e.set(G,{dirs:d,paths:i}),i.forEach(u=>{let b=t.get(u);b?b.push(G):t.set(u,[G])}),d.forEach(u=>{let b=t.get(u);b?b[b.length-1]instanceof Set?b[b.length-1].add(G):b.push(new Set([G])):t.set(u,[new Set([G])])}),c(G)}}}});var eyt=Y((snc,$vt)=>{o();var l8I=process.env.__FAKE_PLATFORM__||process.platform,n8I=l8I==="win32",a8I=global.__FAKE_TESTING_FS__||vo(),{O_CREAT:c8I,O_TRUNC:r8I,O_WRONLY:s8I,UV_FS_O_FILEMAP:Pvt=0}=a8I.constants,o8I=n8I&&!!Pvt,i8I=512*1024,G8I=Pvt|r8I|c8I|s8I;$vt.exports=o8I?t=>t"w"});var y4e=Y((inc,byt)=>{"use strict";o();var d8I=require("assert"),u8I=xGe(),hn=vo(),b8I=tU(),Vg=Qn(),Gyt=Svt(),tyt=vke(),m8I=qvt(),Z8I=yke(),eh=zj(),p8I=Sj(),h8I=N4e(),Iyt=Symbol("onEntry"),R4e=Symbol("checkFs"),lyt=Symbol("checkFs2"),DGe=Symbol("pruneCache"),A4e=Symbol("isReusable"),th=Symbol("makeFs"),F4e=Symbol("file"),X4e=Symbol("directory"),qGe=Symbol("link"),nyt=Symbol("symlink"),ayt=Symbol("hardlink"),cyt=Symbol("unsupported"),ryt=Symbol("checkPath"),jQ=Symbol("mkdir"),mG=Symbol("onError"),_Ge=Symbol("pending"),syt=Symbol("pend"),cU=Symbol("unpend"),V4e=Symbol("ended"),Y4e=Symbol("maybeClose"),g4e=Symbol("skip"),r6=Symbol("doChown"),s6=Symbol("uid"),o6=Symbol("gid"),i6=Symbol("checkedCwd"),dyt=require("crypto"),uyt=eyt(),W8I=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,G6=W8I==="win32",N8I=1024,V8I=(t,e)=>{if(!G6)return hn.unlink(t,e);let I=t+".DELETE."+dyt.randomBytes(16).toString("hex");hn.rename(t,I,l=>{if(l)return e(l);hn.unlink(I,e)})},Y8I=t=>{if(!G6)return hn.unlinkSync(t);let e=t+".DELETE."+dyt.randomBytes(16).toString("hex");hn.renameSync(t,e),hn.unlinkSync(e)},oyt=(t,e,I)=>t===t>>>0?t:e===e>>>0?e:I,iyt=t=>p8I(eh(h8I(t))).toLowerCase(),R8I=(t,e)=>{e=iyt(e);for(let I of t.keys()){let l=iyt(I);(l===e||l.indexOf(e+"/")===0)&&t.delete(I)}},A8I=t=>{for(let e of t.keys())t.delete(e)},d6=class extends u8I{constructor(e){if(e||(e={}),e.ondone=I=>{this[V4e]=!0,this[Y4e]()},super(e),this[i6]=!1,this.reservations=m8I(),this.transform=typeof e.transform=="function"?e.transform:null,this.writable=!0,this.readable=!1,this[_Ge]=0,this[V4e]=!1,this.dirCache=e.dirCache||new Map,typeof e.uid=="number"||typeof e.gid=="number"){if(typeof e.uid!="number"||typeof e.gid!="number")throw new TypeError("cannot set owner without number uid and gid");if(e.preserveOwner)throw new TypeError("cannot preserve owner in archive and also set owner explicitly");this.uid=e.uid,this.gid=e.gid,this.setOwner=!0}else this.uid=null,this.gid=null,this.setOwner=!1;e.preserveOwner===void 0&&typeof e.uid!="number"?this.preserveOwner=process.getuid&&process.getuid()===0:this.preserveOwner=!!e.preserveOwner,this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():null,this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():null,this.maxDepth=typeof e.maxDepth=="number"?e.maxDepth:N8I,this.forceChown=e.forceChown===!0,this.win32=!!e.win32||G6,this.newer=!!e.newer,this.keep=!!e.keep,this.noMtime=!!e.noMtime,this.preservePaths=!!e.preservePaths,this.unlink=!!e.unlink,this.cwd=eh(Vg.resolve(e.cwd||process.cwd())),this.strip=+e.strip||0,this.processUmask=e.noChmod?0:process.umask(),this.umask=typeof e.umask=="number"?e.umask:this.processUmask,this.dmode=e.dmode||511&~this.umask,this.fmode=e.fmode||438&~this.umask,this.on("entry",I=>this[Iyt](I))}warn(e,I,l={}){return(e==="TAR_BAD_ARCHIVE"||e==="TAR_ABORT")&&(l.recoverable=!1),super.warn(e,I,l)}[Y4e](){this[V4e]&&this[_Ge]===0&&(this.emit("prefinish"),this.emit("finish"),this.emit("end"))}[ryt](e){let I=eh(e.path),l=I.split("/");if(this.strip){if(l.length=this.strip)e.linkpath=n.slice(this.strip).join("/");else return!1}l.splice(0,this.strip),e.path=l.join("/")}if(isFinite(this.maxDepth)&&l.length>this.maxDepth)return this.warn("TAR_ENTRY_ERROR","path excessively deep",{entry:e,path:I,depth:l.length,maxDepth:this.maxDepth}),!1;if(!this.preservePaths){if(l.includes("..")||G6&&/^[a-z]:\.\.$/i.test(l[0]))return this.warn("TAR_ENTRY_ERROR","path contains '..'",{entry:e,path:I}),!1;let[n,a]=Z8I(I);n&&(e.path=a,this.warn("TAR_ENTRY_INFO",`stripping ${n} from absolute path`,{entry:e,path:I}))}if(Vg.isAbsolute(e.path)?e.absolute=eh(Vg.resolve(e.path)):e.absolute=eh(Vg.resolve(this.cwd,e.path)),!this.preservePaths&&e.absolute.indexOf(this.cwd+"/")!==0&&e.absolute!==this.cwd)return this.warn("TAR_ENTRY_ERROR","path escaped extraction target",{entry:e,path:eh(e.path),resolvedPath:e.absolute,cwd:this.cwd}),!1;if(e.absolute===this.cwd&&e.type!=="Directory"&&e.type!=="GNUDumpDir")return!1;if(this.win32){let{root:n}=Vg.win32.parse(e.absolute);e.absolute=n+tyt.encode(e.absolute.slice(n.length));let{root:a}=Vg.win32.parse(e.path);e.path=a+tyt.encode(e.path.slice(a.length))}return!0}[Iyt](e){if(!this[ryt](e))return e.resume();switch(d8I.equal(typeof e.absolute,"string"),e.type){case"Directory":case"GNUDumpDir":e.mode&&(e.mode=e.mode|448);case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[R4e](e);case"CharacterDevice":case"BlockDevice":case"FIFO":default:return this[cyt](e)}}[mG](e,I){e.name==="CwdError"?this.emit("error",e):(this.warn("TAR_ENTRY_ERROR",e,{entry:I}),this[cU](),I.resume())}[jQ](e,I,l){Gyt(eh(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:I,noChmod:this.noChmod},l)}[r6](e){return this.forceChown||this.preserveOwner&&(typeof e.uid=="number"&&e.uid!==this.processUid||typeof e.gid=="number"&&e.gid!==this.processGid)||typeof this.uid=="number"&&this.uid!==this.processUid||typeof this.gid=="number"&&this.gid!==this.processGid}[s6](e){return oyt(this.uid,e.uid,this.processUid)}[o6](e){return oyt(this.gid,e.gid,this.processGid)}[F4e](e,I){let l=e.mode&4095||this.fmode,n=new b8I.WriteStream(e.absolute,{flags:uyt(e.size),mode:l,autoClose:!1});n.on("error",s=>{n.fd&&hn.close(n.fd,()=>{}),n.write=()=>!0,this[mG](s,e),I()});let a=1,c=s=>{if(s){n.fd&&hn.close(n.fd,()=>{}),this[mG](s,e),I();return}--a===0&&hn.close(n.fd,i=>{i?this[mG](i,e):this[cU](),I()})};n.on("finish",s=>{let i=e.absolute,G=n.fd;if(e.mtime&&!this.noMtime){a++;let d=e.atime||new Date,u=e.mtime;hn.futimes(G,d,u,b=>b?hn.utimes(i,d,u,Z=>c(Z&&b)):c())}if(this[r6](e)){a++;let d=this[s6](e),u=this[o6](e);hn.fchown(G,d,u,b=>b?hn.chown(i,d,u,Z=>c(Z&&b)):c())}c()});let r=this.transform&&this.transform(e)||e;r!==e&&(r.on("error",s=>{this[mG](s,e),I()}),e.pipe(r)),r.pipe(n)}[X4e](e,I){let l=e.mode&4095||this.dmode;this[jQ](e.absolute,l,n=>{if(n){this[mG](n,e),I();return}let a=1,c=r=>{--a===0&&(I(),this[cU](),e.resume())};e.mtime&&!this.noMtime&&(a++,hn.utimes(e.absolute,e.atime||new Date,e.mtime,c)),this[r6](e)&&(a++,hn.chown(e.absolute,this[s6](e),this[o6](e),c)),c()})}[cyt](e){e.unsupported=!0,this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${e.type}`,{entry:e}),e.resume()}[nyt](e,I){this[qGe](e,e.linkpath,"symlink",I)}[ayt](e,I){let l=eh(Vg.resolve(this.cwd,e.linkpath));this[qGe](e,l,"link",I)}[syt](){this[_Ge]++}[cU](){this[_Ge]--,this[Y4e]()}[g4e](e){this[cU](),e.resume()}[A4e](e,I){return e.type==="File"&&!this.unlink&&I.isFile()&&I.nlink<=1&&!G6}[R4e](e){this[syt]();let I=[e.path];e.linkpath&&I.push(e.linkpath),this.reservations.reserve(I,l=>this[lyt](e,l))}[DGe](e){e.type==="SymbolicLink"?A8I(this.dirCache):e.type!=="Directory"&&R8I(this.dirCache,e.absolute)}[lyt](e,I){this[DGe](e);let l=r=>{this[DGe](e),I(r)},n=()=>{this[jQ](this.cwd,this.dmode,r=>{if(r){this[mG](r,e),l();return}this[i6]=!0,a()})},a=()=>{if(e.absolute!==this.cwd){let r=eh(Vg.dirname(e.absolute));if(r!==this.cwd)return this[jQ](r,this.dmode,s=>{if(s){this[mG](s,e),l();return}c()})}c()},c=()=>{hn.lstat(e.absolute,(r,s)=>{if(s&&(this.keep||this.newer&&s.mtime>e.mtime)){this[g4e](e),l();return}if(r||this[A4e](e,s))return this[th](null,e,l);if(s.isDirectory()){if(e.type==="Directory"){let i=!this.noChmod&&e.mode&&(s.mode&4095)!==e.mode,G=d=>this[th](d,e,l);return i?hn.chmod(e.absolute,e.mode,G):G()}if(e.absolute!==this.cwd)return hn.rmdir(e.absolute,i=>this[th](i,e,l))}if(e.absolute===this.cwd)return this[th](null,e,l);V8I(e.absolute,i=>this[th](i,e,l))})};this[i6]?a():n()}[th](e,I,l){if(e){this[mG](e,I),l();return}switch(I.type){case"File":case"OldFile":case"ContiguousFile":return this[F4e](I,l);case"Link":return this[ayt](I,l);case"SymbolicLink":return this[nyt](I,l);case"Directory":case"GNUDumpDir":return this[X4e](I,l)}}[qGe](e,I,l,n){hn[l](I,e.absolute,a=>{a?this[mG](a,e):(this[cU](),e.resume()),n()})}},KGe=t=>{try{return[null,t()]}catch(e){return[e,null]}},v4e=class extends d6{[th](e,I){return super[th](e,I,()=>{})}[R4e](e){if(this[DGe](e),!this[i6]){let a=this[jQ](this.cwd,this.dmode);if(a)return this[mG](a,e);this[i6]=!0}if(e.absolute!==this.cwd){let a=eh(Vg.dirname(e.absolute));if(a!==this.cwd){let c=this[jQ](a,this.dmode);if(c)return this[mG](c,e)}}let[I,l]=KGe(()=>hn.lstatSync(e.absolute));if(l&&(this.keep||this.newer&&l.mtime>e.mtime))return this[g4e](e);if(I||this[A4e](e,l))return this[th](null,e);if(l.isDirectory()){if(e.type==="Directory"){let c=!this.noChmod&&e.mode&&(l.mode&4095)!==e.mode,[r]=c?KGe(()=>{hn.chmodSync(e.absolute,e.mode)}):[];return this[th](r,e)}let[a]=KGe(()=>hn.rmdirSync(e.absolute));this[th](a,e)}let[n]=e.absolute===this.cwd?[]:KGe(()=>Y8I(e.absolute));this[th](n,e)}[F4e](e,I){let l=e.mode&4095||this.fmode,n=r=>{let s;try{hn.closeSync(a)}catch(i){s=i}(r||s)&&this[mG](r||s,e),I()},a;try{a=hn.openSync(e.absolute,uyt(e.size),l)}catch(r){return n(r)}let c=this.transform&&this.transform(e)||e;c!==e&&(c.on("error",r=>this[mG](r,e)),e.pipe(c)),c.on("data",r=>{try{hn.writeSync(a,r,0,r.length)}catch(s){n(s)}}),c.on("end",r=>{let s=null;if(e.mtime&&!this.noMtime){let i=e.atime||new Date,G=e.mtime;try{hn.futimesSync(a,i,G)}catch(d){try{hn.utimesSync(e.absolute,i,G)}catch{s=d}}}if(this[r6](e)){let i=this[s6](e),G=this[o6](e);try{hn.fchownSync(a,i,G)}catch(d){try{hn.chownSync(e.absolute,i,G)}catch{s=s||d}}}n(s)})}[X4e](e,I){let l=e.mode&4095||this.dmode,n=this[jQ](e.absolute,l);if(n){this[mG](n,e),I();return}if(e.mtime&&!this.noMtime)try{hn.utimesSync(e.absolute,e.atime||new Date,e.mtime)}catch{}if(this[r6](e))try{hn.chownSync(e.absolute,this[s6](e),this[o6](e))}catch{}I(),e.resume()}[jQ](e,I){try{return Gyt.sync(eh(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:I})}catch(l){return l}}[qGe](e,I,l,n){try{hn[l+"Sync"](I,e.absolute),n(),e.resume()}catch(a){return this[mG](a,e)}}};d6.Sync=v4e;byt.exports=d6});var Wyt=Y((dnc,hyt)=>{"use strict";o();var F8I=kj(),PGe=y4e(),Zyt=vo(),pyt=tU(),myt=Qn(),w4e=Sj();hyt.exports=(t,e,I)=>{typeof t=="function"?(I=t,e=null,t={}):Array.isArray(t)&&(e=t,t={}),typeof e=="function"&&(I=e,e=null),e?e=Array.from(e):e=[];let l=F8I(t);if(l.sync&&typeof I=="function")throw new TypeError("callback not supported for sync tar functions");if(!l.file&&typeof I=="function")throw new TypeError("callback only supported with file option");return e.length&&X8I(l,e),l.file&&l.sync?g8I(l):l.file?v8I(l,I):l.sync?y8I(l):w8I(l)};var X8I=(t,e)=>{let I=new Map(e.map(a=>[w4e(a),!0])),l=t.filter,n=(a,c)=>{let r=c||myt.parse(a).root||".",s=a===r?!1:I.has(a)?I.get(a):n(myt.dirname(a),r);return I.set(a,s),s};t.filter=l?(a,c)=>l(a,c)&&n(w4e(a)):a=>n(w4e(a))},g8I=t=>{let e=new PGe.Sync(t),I=t.file,l=Zyt.statSync(I),n=t.maxReadSize||16*1024*1024;new pyt.ReadStreamSync(I,{readSize:n,size:l.size}).pipe(e)},v8I=(t,e)=>{let I=new PGe(t),l=t.maxReadSize||16*1024*1024,n=t.file,a=new Promise((c,r)=>{I.on("error",r),I.on("close",c),Zyt.stat(n,(s,i)=>{if(s)r(s);else{let G=new pyt.ReadStream(n,{readSize:l,size:i.size});G.on("error",r),G.pipe(I)}})});return e?a.then(e,e):a},y8I=t=>new PGe.Sync(t),w8I=t=>new PGe(t)});var Nyt=Y(Ks=>{"use strict";o();Ks.c=Ks.create=tvt();Ks.r=Ks.replace=G4e();Ks.t=Ks.list=jGe();Ks.u=Ks.update=ivt();Ks.x=Ks.extract=Wyt();Ks.Pack=FGe();Ks.Unpack=y4e();Ks.Parse=xGe();Ks.ReadEntry=sGe();Ks.WriteEntry=xke();Ks.Header=Mj();Ks.Pax=iGe();Ks.types=Vke()});var u6=Y((hnc,Fyt)=>{"use strict";o();var H8I="2.0.0",Q8I=Number.MAX_SAFE_INTEGER||9007199254740991,f8I=16,E8I=250,J8I=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Fyt.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:f8I,MAX_SAFE_BUILD_LENGTH:E8I,MAX_SAFE_INTEGER:Q8I,RELEASE_TYPES:J8I,SEMVER_SPEC_VERSION:H8I,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var b6=Y((Nnc,Xyt)=>{"use strict";o();var C8I=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};Xyt.exports=C8I});var oU=Y((kF,gyt)=>{"use strict";o();var{MAX_SAFE_COMPONENT_LENGTH:H4e,MAX_SAFE_BUILD_LENGTH:L8I,MAX_LENGTH:k8I}=u6(),x8I=b6();kF=gyt.exports={};var j8I=kF.re=[],U8I=kF.safeRe=[],Qt=kF.src=[],O8I=kF.safeSrc=[],ft=kF.t={},z8I=0,Q4e="[a-zA-Z0-9-]",B8I=[["\\s",1],["\\d",k8I],[Q4e,L8I]],M8I=t=>{for(let[e,I]of B8I)t=t.split(`${e}*`).join(`${e}{0,${I}}`).split(`${e}+`).join(`${e}{1,${I}}`);return t},el=(t,e,I)=>{let l=M8I(e),n=z8I++;x8I(t,n,e),ft[t]=n,Qt[n]=e,O8I[n]=l,j8I[n]=new RegExp(e,I?"g":void 0),U8I[n]=new RegExp(l,I?"g":void 0)};el("NUMERICIDENTIFIER","0|[1-9]\\d*");el("NUMERICIDENTIFIERLOOSE","\\d+");el("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Q4e}*`);el("MAINVERSION",`(${Qt[ft.NUMERICIDENTIFIER]})\\.(${Qt[ft.NUMERICIDENTIFIER]})\\.(${Qt[ft.NUMERICIDENTIFIER]})`);el("MAINVERSIONLOOSE",`(${Qt[ft.NUMERICIDENTIFIERLOOSE]})\\.(${Qt[ft.NUMERICIDENTIFIERLOOSE]})\\.(${Qt[ft.NUMERICIDENTIFIERLOOSE]})`);el("PRERELEASEIDENTIFIER",`(?:${Qt[ft.NONNUMERICIDENTIFIER]}|${Qt[ft.NUMERICIDENTIFIER]})`);el("PRERELEASEIDENTIFIERLOOSE",`(?:${Qt[ft.NONNUMERICIDENTIFIER]}|${Qt[ft.NUMERICIDENTIFIERLOOSE]})`);el("PRERELEASE",`(?:-(${Qt[ft.PRERELEASEIDENTIFIER]}(?:\\.${Qt[ft.PRERELEASEIDENTIFIER]})*))`);el("PRERELEASELOOSE",`(?:-?(${Qt[ft.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${Qt[ft.PRERELEASEIDENTIFIERLOOSE]})*))`);el("BUILDIDENTIFIER",`${Q4e}+`);el("BUILD",`(?:\\+(${Qt[ft.BUILDIDENTIFIER]}(?:\\.${Qt[ft.BUILDIDENTIFIER]})*))`);el("FULLPLAIN",`v?${Qt[ft.MAINVERSION]}${Qt[ft.PRERELEASE]}?${Qt[ft.BUILD]}?`);el("FULL",`^${Qt[ft.FULLPLAIN]}$`);el("LOOSEPLAIN",`[v=\\s]*${Qt[ft.MAINVERSIONLOOSE]}${Qt[ft.PRERELEASELOOSE]}?${Qt[ft.BUILD]}?`);el("LOOSE",`^${Qt[ft.LOOSEPLAIN]}$`);el("GTLT","((?:<|>)?=?)");el("XRANGEIDENTIFIERLOOSE",`${Qt[ft.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);el("XRANGEIDENTIFIER",`${Qt[ft.NUMERICIDENTIFIER]}|x|X|\\*`);el("XRANGEPLAIN",`[v=\\s]*(${Qt[ft.XRANGEIDENTIFIER]})(?:\\.(${Qt[ft.XRANGEIDENTIFIER]})(?:\\.(${Qt[ft.XRANGEIDENTIFIER]})(?:${Qt[ft.PRERELEASE]})?${Qt[ft.BUILD]}?)?)?`);el("XRANGEPLAINLOOSE",`[v=\\s]*(${Qt[ft.XRANGEIDENTIFIERLOOSE]})(?:\\.(${Qt[ft.XRANGEIDENTIFIERLOOSE]})(?:\\.(${Qt[ft.XRANGEIDENTIFIERLOOSE]})(?:${Qt[ft.PRERELEASELOOSE]})?${Qt[ft.BUILD]}?)?)?`);el("XRANGE",`^${Qt[ft.GTLT]}\\s*${Qt[ft.XRANGEPLAIN]}$`);el("XRANGELOOSE",`^${Qt[ft.GTLT]}\\s*${Qt[ft.XRANGEPLAINLOOSE]}$`);el("COERCEPLAIN",`(^|[^\\d])(\\d{1,${H4e}})(?:\\.(\\d{1,${H4e}}))?(?:\\.(\\d{1,${H4e}}))?`);el("COERCE",`${Qt[ft.COERCEPLAIN]}(?:$|[^\\d])`);el("COERCEFULL",Qt[ft.COERCEPLAIN]+`(?:${Qt[ft.PRERELEASE]})?(?:${Qt[ft.BUILD]})?(?:$|[^\\d])`);el("COERCERTL",Qt[ft.COERCE],!0);el("COERCERTLFULL",Qt[ft.COERCEFULL],!0);el("LONETILDE","(?:~>?)");el("TILDETRIM",`(\\s*)${Qt[ft.LONETILDE]}\\s+`,!0);kF.tildeTrimReplace="$1~";el("TILDE",`^${Qt[ft.LONETILDE]}${Qt[ft.XRANGEPLAIN]}$`);el("TILDELOOSE",`^${Qt[ft.LONETILDE]}${Qt[ft.XRANGEPLAINLOOSE]}$`);el("LONECARET","(?:\\^)");el("CARETTRIM",`(\\s*)${Qt[ft.LONECARET]}\\s+`,!0);kF.caretTrimReplace="$1^";el("CARET",`^${Qt[ft.LONECARET]}${Qt[ft.XRANGEPLAIN]}$`);el("CARETLOOSE",`^${Qt[ft.LONECARET]}${Qt[ft.XRANGEPLAINLOOSE]}$`);el("COMPARATORLOOSE",`^${Qt[ft.GTLT]}\\s*(${Qt[ft.LOOSEPLAIN]})$|^$`);el("COMPARATOR",`^${Qt[ft.GTLT]}\\s*(${Qt[ft.FULLPLAIN]})$|^$`);el("COMPARATORTRIM",`(\\s*)${Qt[ft.GTLT]}\\s*(${Qt[ft.LOOSEPLAIN]}|${Qt[ft.XRANGEPLAIN]})`,!0);kF.comparatorTrimReplace="$1$2$3";el("HYPHENRANGE",`^\\s*(${Qt[ft.XRANGEPLAIN]})\\s+-\\s+(${Qt[ft.XRANGEPLAIN]})\\s*$`);el("HYPHENRANGELOOSE",`^\\s*(${Qt[ft.XRANGEPLAINLOOSE]})\\s+-\\s+(${Qt[ft.XRANGEPLAINLOOSE]})\\s*$`);el("STAR","(<|>)?=?\\s*\\*");el("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");el("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var $Ge=Y((Rnc,vyt)=>{"use strict";o();var S8I=Object.freeze({loose:!0}),T8I=Object.freeze({}),_8I=t=>t?typeof t!="object"?S8I:t:T8I;vyt.exports=_8I});var f4e=Y((Fnc,Hyt)=>{"use strict";o();var yyt=/^[0-9]+$/,wyt=(t,e)=>{if(typeof t=="number"&&typeof e=="number")return t===e?0:twyt(e,t);Hyt.exports={compareIdentifiers:wyt,rcompareIdentifiers:K8I}});var ZG=Y((gnc,fyt)=>{"use strict";o();var ede=b6(),{MAX_LENGTH:Qyt,MAX_SAFE_INTEGER:tde}=u6(),{safeRe:Ide,t:lde}=oU(),D8I=$Ge(),{compareIdentifiers:E4e}=f4e(),J4e=class t{constructor(e,I){if(I=D8I(I),e instanceof t){if(e.loose===!!I.loose&&e.includePrerelease===!!I.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>Qyt)throw new TypeError(`version is longer than ${Qyt} characters`);ede("SemVer",e,I),this.options=I,this.loose=!!I.loose,this.includePrerelease=!!I.includePrerelease;let l=e.trim().match(I.loose?Ide[lde.LOOSE]:Ide[lde.FULL]);if(!l)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+l[1],this.minor=+l[2],this.patch=+l[3],this.major>tde||this.major<0)throw new TypeError("Invalid major version");if(this.minor>tde||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>tde||this.patch<0)throw new TypeError("Invalid patch version");l[4]?this.prerelease=l[4].split(".").map(n=>{if(/^[0-9]+$/.test(n)){let a=+n;if(a>=0&&ae.major?1:this.minore.minor?1:this.patche.patch?1:0}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let I=0;do{let l=this.prerelease[I],n=e.prerelease[I];if(ede("prerelease compare",I,l,n),l===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(l===void 0)return-1;if(l===n)continue;return E4e(l,n)}while(++I)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let I=0;do{let l=this.build[I],n=e.build[I];if(ede("build compare",I,l,n),l===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(l===void 0)return-1;if(l===n)continue;return E4e(l,n)}while(++I)}inc(e,I,l){if(e.startsWith("pre")){if(!I&&l===!1)throw new Error("invalid increment argument: identifier is empty");if(I){let n=`-${I}`.match(this.options.loose?Ide[lde.PRERELEASELOOSE]:Ide[lde.PRERELEASE]);if(!n||n[1]!==I)throw new Error(`invalid identifier: ${I}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",I,l);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",I,l);break;case"prepatch":this.prerelease.length=0,this.inc("patch",I,l),this.inc("pre",I,l);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",I,l),this.inc("pre",I,l);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 n=Number(l)?1:0;if(this.prerelease.length===0)this.prerelease=[n];else{let a=this.prerelease.length;for(;--a>=0;)typeof this.prerelease[a]=="number"&&(this.prerelease[a]++,a=-2);if(a===-1){if(I===this.prerelease.join(".")&&l===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(n)}}if(I){let a=[I,n];l===!1&&(a=[I]),E4e(this.prerelease[0],I)===0?isNaN(this.prerelease[1])&&(this.prerelease=a):this.prerelease=a}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};fyt.exports=J4e});var d5=Y((ync,Jyt)=>{"use strict";o();var Eyt=ZG(),q8I=(t,e,I=!1)=>{if(t instanceof Eyt)return t;try{return new Eyt(t,e)}catch(l){if(!I)return null;throw l}};Jyt.exports=q8I});var Lyt=Y((Hnc,Cyt)=>{"use strict";o();var P8I=d5(),$8I=(t,e)=>{let I=P8I(t,e);return I?I.version:null};Cyt.exports=$8I});var xyt=Y((fnc,kyt)=>{"use strict";o();var e$I=d5(),t$I=(t,e)=>{let I=e$I(t.trim().replace(/^[=v]+/,""),e);return I?I.version:null};kyt.exports=t$I});var Oyt=Y((Jnc,Uyt)=>{"use strict";o();var jyt=ZG(),I$I=(t,e,I,l,n)=>{typeof I=="string"&&(n=l,l=I,I=void 0);try{return new jyt(t instanceof jyt?t.version:t,I).inc(e,l,n).version}catch{return null}};Uyt.exports=I$I});var Myt=Y((Lnc,Byt)=>{"use strict";o();var zyt=d5(),l$I=(t,e)=>{let I=zyt(t,null,!0),l=zyt(e,null,!0),n=I.compare(l);if(n===0)return null;let a=n>0,c=a?I:l,r=a?l:I,s=!!c.prerelease.length;if(!!r.prerelease.length&&!s){if(!r.patch&&!r.minor)return"major";if(r.compareMain(c)===0)return r.minor&&!r.patch?"minor":"patch"}let G=s?"pre":"";return I.major!==l.major?G+"major":I.minor!==l.minor?G+"minor":I.patch!==l.patch?G+"patch":"prerelease"};Byt.exports=l$I});var Tyt=Y((xnc,Syt)=>{"use strict";o();var n$I=ZG(),a$I=(t,e)=>new n$I(t,e).major;Syt.exports=a$I});var Kyt=Y((Unc,_yt)=>{"use strict";o();var c$I=ZG(),r$I=(t,e)=>new c$I(t,e).minor;_yt.exports=r$I});var qyt=Y((znc,Dyt)=>{"use strict";o();var s$I=ZG(),o$I=(t,e)=>new s$I(t,e).patch;Dyt.exports=o$I});var $yt=Y((Mnc,Pyt)=>{"use strict";o();var i$I=d5(),G$I=(t,e)=>{let I=i$I(t,e);return I&&I.prerelease.length?I.prerelease:null};Pyt.exports=G$I});var Ih=Y((Tnc,twt)=>{"use strict";o();var ewt=ZG(),d$I=(t,e,I)=>new ewt(t,I).compare(new ewt(e,I));twt.exports=d$I});var lwt=Y((Knc,Iwt)=>{"use strict";o();var u$I=Ih(),b$I=(t,e,I)=>u$I(e,t,I);Iwt.exports=b$I});var awt=Y((qnc,nwt)=>{"use strict";o();var m$I=Ih(),Z$I=(t,e)=>m$I(t,e,!0);nwt.exports=Z$I});var nde=Y(($nc,rwt)=>{"use strict";o();var cwt=ZG(),p$I=(t,e,I)=>{let l=new cwt(t,I),n=new cwt(e,I);return l.compare(n)||l.compareBuild(n)};rwt.exports=p$I});var owt=Y((tac,swt)=>{"use strict";o();var h$I=nde(),W$I=(t,e)=>t.sort((I,l)=>h$I(I,l,e));swt.exports=W$I});var Gwt=Y((lac,iwt)=>{"use strict";o();var N$I=nde(),V$I=(t,e)=>t.sort((I,l)=>N$I(l,I,e));iwt.exports=V$I});var m6=Y((aac,dwt)=>{"use strict";o();var Y$I=Ih(),R$I=(t,e,I)=>Y$I(t,e,I)>0;dwt.exports=R$I});var ade=Y((rac,uwt)=>{"use strict";o();var A$I=Ih(),F$I=(t,e,I)=>A$I(t,e,I)<0;uwt.exports=F$I});var C4e=Y((oac,bwt)=>{"use strict";o();var X$I=Ih(),g$I=(t,e,I)=>X$I(t,e,I)===0;bwt.exports=g$I});var L4e=Y((Gac,mwt)=>{"use strict";o();var v$I=Ih(),y$I=(t,e,I)=>v$I(t,e,I)!==0;mwt.exports=y$I});var cde=Y((uac,Zwt)=>{"use strict";o();var w$I=Ih(),H$I=(t,e,I)=>w$I(t,e,I)>=0;Zwt.exports=H$I});var rde=Y((mac,pwt)=>{"use strict";o();var Q$I=Ih(),f$I=(t,e,I)=>Q$I(t,e,I)<=0;pwt.exports=f$I});var k4e=Y((pac,hwt)=>{"use strict";o();var E$I=C4e(),J$I=L4e(),C$I=m6(),L$I=cde(),k$I=ade(),x$I=rde(),j$I=(t,e,I,l)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof I=="object"&&(I=I.version),t===I;case"!==":return typeof t=="object"&&(t=t.version),typeof I=="object"&&(I=I.version),t!==I;case"":case"=":case"==":return E$I(t,I,l);case"!=":return J$I(t,I,l);case">":return C$I(t,I,l);case">=":return L$I(t,I,l);case"<":return k$I(t,I,l);case"<=":return x$I(t,I,l);default:throw new TypeError(`Invalid operator: ${e}`)}};hwt.exports=j$I});var Nwt=Y((Wac,Wwt)=>{"use strict";o();var U$I=ZG(),O$I=d5(),{safeRe:sde,t:ode}=oU(),z$I=(t,e)=>{if(t instanceof U$I)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let I=null;if(!e.rtl)I=t.match(e.includePrerelease?sde[ode.COERCEFULL]:sde[ode.COERCE]);else{let s=e.includePrerelease?sde[ode.COERCERTLFULL]:sde[ode.COERCERTL],i;for(;(i=s.exec(t))&&(!I||I.index+I[0].length!==t.length);)(!I||i.index+i[0].length!==I.index+I[0].length)&&(I=i),s.lastIndex=i.index+i[1].length+i[2].length;s.lastIndex=-1}if(I===null)return null;let l=I[2],n=I[3]||"0",a=I[4]||"0",c=e.includePrerelease&&I[5]?`-${I[5]}`:"",r=e.includePrerelease&&I[6]?`+${I[6]}`:"";return O$I(`${l}.${n}.${a}${c}${r}`,e)};Wwt.exports=z$I});var Ywt=Y((Vac,Vwt)=>{"use strict";o();var x4e=class{constructor(){this.max=1e3,this.map=new Map}get(e){let I=this.map.get(e);if(I!==void 0)return this.map.delete(e),this.map.set(e,I),I}delete(e){return this.map.delete(e)}set(e,I){if(!this.delete(e)&&I!==void 0){if(this.map.size>=this.max){let n=this.map.keys().next().value;this.delete(n)}this.map.set(e,I)}return this}};Vwt.exports=x4e});var lh=Y((Rac,Xwt)=>{"use strict";o();var B$I=/\s+/g,j4e=class t{constructor(e,I){if(I=S$I(I),e instanceof t)return e.loose===!!I.loose&&e.includePrerelease===!!I.includePrerelease?e:new t(e.raw,I);if(e instanceof U4e)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=I,this.loose=!!I.loose,this.includePrerelease=!!I.includePrerelease,this.raw=e.trim().replace(B$I," "),this.set=this.raw.split("||").map(l=>this.parseRange(l.trim())).filter(l=>l.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let l=this.set[0];if(this.set=this.set.filter(n=>!Awt(n[0])),this.set.length===0)this.set=[l];else if(this.set.length>1){for(let n of this.set)if(n.length===1&&$$I(n[0])){this.set=[n];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e0&&(this.formatted+="||");let I=this.set[e];for(let l=0;l0&&(this.formatted+=" "),this.formatted+=I[l].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let l=((this.options.includePrerelease&&q$I)|(this.options.loose&&P$I))+":"+e,n=Rwt.get(l);if(n)return n;let a=this.options.loose,c=a?Ib[pG.HYPHENRANGELOOSE]:Ib[pG.HYPHENRANGE];e=e.replace(c,oel(this.options.includePrerelease)),cc("hyphen replace",e),e=e.replace(Ib[pG.COMPARATORTRIM],_$I),cc("comparator trim",e),e=e.replace(Ib[pG.TILDETRIM],K$I),cc("tilde trim",e),e=e.replace(Ib[pG.CARETTRIM],D$I),cc("caret trim",e);let r=e.split(" ").map(d=>eel(d,this.options)).join(" ").split(/\s+/).map(d=>sel(d,this.options));a&&(r=r.filter(d=>(cc("loose invalid filter",d,this.options),!!d.match(Ib[pG.COMPARATORLOOSE])))),cc("range list",r);let s=new Map,i=r.map(d=>new U4e(d,this.options));for(let d of i){if(Awt(d))return[d];s.set(d.value,d)}s.size>1&&s.has("")&&s.delete("");let G=[...s.values()];return Rwt.set(l,G),G}intersects(e,I){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(l=>Fwt(l,I)&&e.set.some(n=>Fwt(n,I)&&l.every(a=>n.every(c=>a.intersects(c,I)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new T$I(e,this.options)}catch{return!1}for(let I=0;It.value==="<0.0.0-0",$$I=t=>t.value==="",Fwt=(t,e)=>{let I=!0,l=t.slice(),n=l.pop();for(;I&&l.length;)I=l.every(a=>n.intersects(a,e)),n=l.pop();return I},eel=(t,e)=>(t=t.replace(Ib[pG.BUILD],""),cc("comp",t,e),t=lel(t,e),cc("caret",t),t=tel(t,e),cc("tildes",t),t=ael(t,e),cc("xrange",t),t=rel(t,e),cc("stars",t),t),lb=t=>!t||t.toLowerCase()==="x"||t==="*",tel=(t,e)=>t.trim().split(/\s+/).map(I=>Iel(I,e)).join(" "),Iel=(t,e)=>{let I=e.loose?Ib[pG.TILDELOOSE]:Ib[pG.TILDE];return t.replace(I,(l,n,a,c,r)=>{cc("tilde",t,l,n,a,c,r);let s;return lb(n)?s="":lb(a)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:lb(c)?s=`>=${n}.${a}.0 <${n}.${+a+1}.0-0`:r?(cc("replaceTilde pr",r),s=`>=${n}.${a}.${c}-${r} <${n}.${+a+1}.0-0`):s=`>=${n}.${a}.${c} <${n}.${+a+1}.0-0`,cc("tilde return",s),s})},lel=(t,e)=>t.trim().split(/\s+/).map(I=>nel(I,e)).join(" "),nel=(t,e)=>{cc("caret",t,e);let I=e.loose?Ib[pG.CARETLOOSE]:Ib[pG.CARET],l=e.includePrerelease?"-0":"";return t.replace(I,(n,a,c,r,s)=>{cc("caret",t,n,a,c,r,s);let i;return lb(a)?i="":lb(c)?i=`>=${a}.0.0${l} <${+a+1}.0.0-0`:lb(r)?a==="0"?i=`>=${a}.${c}.0${l} <${a}.${+c+1}.0-0`:i=`>=${a}.${c}.0${l} <${+a+1}.0.0-0`:s?(cc("replaceCaret pr",s),a==="0"?c==="0"?i=`>=${a}.${c}.${r}-${s} <${a}.${c}.${+r+1}-0`:i=`>=${a}.${c}.${r}-${s} <${a}.${+c+1}.0-0`:i=`>=${a}.${c}.${r}-${s} <${+a+1}.0.0-0`):(cc("no pr"),a==="0"?c==="0"?i=`>=${a}.${c}.${r}${l} <${a}.${c}.${+r+1}-0`:i=`>=${a}.${c}.${r}${l} <${a}.${+c+1}.0-0`:i=`>=${a}.${c}.${r} <${+a+1}.0.0-0`),cc("caret return",i),i})},ael=(t,e)=>(cc("replaceXRanges",t,e),t.split(/\s+/).map(I=>cel(I,e)).join(" ")),cel=(t,e)=>{t=t.trim();let I=e.loose?Ib[pG.XRANGELOOSE]:Ib[pG.XRANGE];return t.replace(I,(l,n,a,c,r,s)=>{cc("xRange",t,l,n,a,c,r,s);let i=lb(a),G=i||lb(c),d=G||lb(r),u=d;return n==="="&&u&&(n=""),s=e.includePrerelease?"-0":"",i?n===">"||n==="<"?l="<0.0.0-0":l="*":n&&u?(G&&(c=0),r=0,n===">"?(n=">=",G?(a=+a+1,c=0,r=0):(c=+c+1,r=0)):n==="<="&&(n="<",G?a=+a+1:c=+c+1),n==="<"&&(s="-0"),l=`${n+a}.${c}.${r}${s}`):G?l=`>=${a}.0.0${s} <${+a+1}.0.0-0`:d&&(l=`>=${a}.${c}.0${s} <${a}.${+c+1}.0-0`),cc("xRange return",l),l})},rel=(t,e)=>(cc("replaceStars",t,e),t.trim().replace(Ib[pG.STAR],"")),sel=(t,e)=>(cc("replaceGTE0",t,e),t.trim().replace(Ib[e.includePrerelease?pG.GTE0PRE:pG.GTE0],"")),oel=t=>(e,I,l,n,a,c,r,s,i,G,d,u)=>(lb(l)?I="":lb(n)?I=`>=${l}.0.0${t?"-0":""}`:lb(a)?I=`>=${l}.${n}.0${t?"-0":""}`:c?I=`>=${I}`:I=`>=${I}${t?"-0":""}`,lb(i)?s="":lb(G)?s=`<${+i+1}.0.0-0`:lb(d)?s=`<${i}.${+G+1}.0-0`:u?s=`<=${i}.${G}.${d}-${u}`:t?s=`<${i}.${G}.${+d+1}-0`:s=`<=${s}`,`${I} ${s}`.trim()),iel=(t,e,I)=>{for(let l=0;l0){let n=t[l].semver;if(n.major===e.major&&n.minor===e.minor&&n.patch===e.patch)return!0}return!1}return!0}});var Z6=Y((Fac,Qwt)=>{"use strict";o();var p6=Symbol("SemVer ANY"),B4e=class t{static get ANY(){return p6}constructor(e,I){if(I=gwt(I),e instanceof t){if(e.loose===!!I.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),z4e("comparator",e,I),this.options=I,this.loose=!!I.loose,this.parse(e),this.semver===p6?this.value="":this.value=this.operator+this.semver.version,z4e("comp",this)}parse(e){let I=this.options.loose?vwt[ywt.COMPARATORLOOSE]:vwt[ywt.COMPARATOR],l=e.match(I);if(!l)throw new TypeError(`Invalid comparator: ${e}`);this.operator=l[1]!==void 0?l[1]:"",this.operator==="="&&(this.operator=""),l[2]?this.semver=new wwt(l[2],this.options.loose):this.semver=p6}toString(){return this.value}test(e){if(z4e("Comparator.test",e,this.options.loose),this.semver===p6||e===p6)return!0;if(typeof e=="string")try{e=new wwt(e,this.options)}catch{return!1}return O4e(e,this.operator,this.semver,this.options)}intersects(e,I){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Hwt(e.value,I).test(this.value):e.operator===""?e.value===""?!0:new Hwt(this.value,I).test(e.semver):(I=gwt(I),I.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!I.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||O4e(this.semver,"<",e.semver,I)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||O4e(this.semver,">",e.semver,I)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};Qwt.exports=B4e;var gwt=$Ge(),{safeRe:vwt,t:ywt}=oU(),O4e=k4e(),z4e=b6(),wwt=ZG(),Hwt=lh()});var h6=Y((gac,fwt)=>{"use strict";o();var Gel=lh(),del=(t,e,I)=>{try{e=new Gel(e,I)}catch{return!1}return e.test(t)};fwt.exports=del});var Jwt=Y((yac,Ewt)=>{"use strict";o();var uel=lh(),bel=(t,e)=>new uel(t,e).set.map(I=>I.map(l=>l.value).join(" ").trim().split(" "));Ewt.exports=bel});var Lwt=Y((Hac,Cwt)=>{"use strict";o();var mel=ZG(),Zel=lh(),pel=(t,e,I)=>{let l=null,n=null,a=null;try{a=new Zel(e,I)}catch{return null}return t.forEach(c=>{a.test(c)&&(!l||n.compare(c)===-1)&&(l=c,n=new mel(l,I))}),l};Cwt.exports=pel});var xwt=Y((fac,kwt)=>{"use strict";o();var hel=ZG(),Wel=lh(),Nel=(t,e,I)=>{let l=null,n=null,a=null;try{a=new Wel(e,I)}catch{return null}return t.forEach(c=>{a.test(c)&&(!l||n.compare(c)===1)&&(l=c,n=new hel(l,I))}),l};kwt.exports=Nel});var Owt=Y((Jac,Uwt)=>{"use strict";o();var M4e=ZG(),Vel=lh(),jwt=m6(),Yel=(t,e)=>{t=new Vel(t,e);let I=new M4e("0.0.0");if(t.test(I)||(I=new M4e("0.0.0-0"),t.test(I)))return I;I=null;for(let l=0;l{let r=new M4e(c.semver.version);switch(c.operator){case">":r.prerelease.length===0?r.patch++:r.prerelease.push(0),r.raw=r.format();case"":case">=":(!a||jwt(r,a))&&(a=r);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${c.operator}`)}}),a&&(!I||jwt(I,a))&&(I=a)}return I&&t.test(I)?I:null};Uwt.exports=Yel});var Bwt=Y((Lac,zwt)=>{"use strict";o();var Rel=lh(),Ael=(t,e)=>{try{return new Rel(t,e).range||"*"}catch{return null}};zwt.exports=Ael});var ide=Y((xac,_wt)=>{"use strict";o();var Fel=ZG(),Twt=Z6(),{ANY:Xel}=Twt,gel=lh(),vel=h6(),Mwt=m6(),Swt=ade(),yel=rde(),wel=cde(),Hel=(t,e,I,l)=>{t=new Fel(t,l),e=new gel(e,l);let n,a,c,r,s;switch(I){case">":n=Mwt,a=yel,c=Swt,r=">",s=">=";break;case"<":n=Swt,a=wel,c=Mwt,r="<",s="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(vel(t,e,l))return!1;for(let i=0;i{b.semver===Xel&&(b=new Twt(">=0.0.0")),d=d||b,u=u||b,n(b.semver,d.semver,l)?d=b:c(b.semver,u.semver,l)&&(u=b)}),d.operator===r||d.operator===s||(!u.operator||u.operator===r)&&a(t,u.semver))return!1;if(u.operator===s&&c(t,u.semver))return!1}return!0};_wt.exports=Hel});var Dwt=Y((Uac,Kwt)=>{"use strict";o();var Qel=ide(),fel=(t,e,I)=>Qel(t,e,">",I);Kwt.exports=fel});var Pwt=Y((zac,qwt)=>{"use strict";o();var Eel=ide(),Jel=(t,e,I)=>Eel(t,e,"<",I);qwt.exports=Jel});var tHt=Y((Mac,eHt)=>{"use strict";o();var $wt=lh(),Cel=(t,e,I)=>(t=new $wt(t,I),e=new $wt(e,I),t.intersects(e,I));eHt.exports=Cel});var lHt=Y((Tac,IHt)=>{"use strict";o();var Lel=h6(),kel=Ih();IHt.exports=(t,e,I)=>{let l=[],n=null,a=null,c=t.sort((G,d)=>kel(G,d,I));for(let G of c)Lel(G,e,I)?(a=G,n||(n=G)):(a&&l.push([n,a]),a=null,n=null);n&&l.push([n,null]);let r=[];for(let[G,d]of l)G===d?r.push(G):!d&&G===c[0]?r.push("*"):d?G===c[0]?r.push(`<=${d}`):r.push(`${G} - ${d}`):r.push(`>=${G}`);let s=r.join(" || "),i=typeof e.raw=="string"?e.raw:String(e);return s.length{"use strict";o();var nHt=lh(),T4e=Z6(),{ANY:S4e}=T4e,W6=h6(),_4e=Ih(),xel=(t,e,I={})=>{if(t===e)return!0;t=new nHt(t,I),e=new nHt(e,I);let l=!1;e:for(let n of t.set){for(let a of e.set){let c=Uel(n,a,I);if(l=l||c!==null,c)continue e}if(l)return!1}return!0},jel=[new T4e(">=0.0.0-0")],aHt=[new T4e(">=0.0.0")],Uel=(t,e,I)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===S4e){if(e.length===1&&e[0].semver===S4e)return!0;I.includePrerelease?t=jel:t=aHt}if(e.length===1&&e[0].semver===S4e){if(I.includePrerelease)return!0;e=aHt}let l=new Set,n,a;for(let b of t)b.operator===">"||b.operator===">="?n=cHt(n,b,I):b.operator==="<"||b.operator==="<="?a=rHt(a,b,I):l.add(b.semver);if(l.size>1)return null;let c;if(n&&a){if(c=_4e(n.semver,a.semver,I),c>0)return null;if(c===0&&(n.operator!==">="||a.operator!=="<="))return null}for(let b of l){if(n&&!W6(b,String(n),I)||a&&!W6(b,String(a),I))return null;for(let Z of e)if(!W6(b,String(Z),I))return!1;return!0}let r,s,i,G,d=a&&!I.includePrerelease&&a.semver.prerelease.length?a.semver:!1,u=n&&!I.includePrerelease&&n.semver.prerelease.length?n.semver:!1;d&&d.prerelease.length===1&&a.operator==="<"&&d.prerelease[0]===0&&(d=!1);for(let b of e){if(G=G||b.operator===">"||b.operator===">=",i=i||b.operator==="<"||b.operator==="<=",n){if(u&&b.semver.prerelease&&b.semver.prerelease.length&&b.semver.major===u.major&&b.semver.minor===u.minor&&b.semver.patch===u.patch&&(u=!1),b.operator===">"||b.operator===">="){if(r=cHt(n,b,I),r===b&&r!==n)return!1}else if(n.operator===">="&&!W6(n.semver,String(b),I))return!1}if(a){if(d&&b.semver.prerelease&&b.semver.prerelease.length&&b.semver.major===d.major&&b.semver.minor===d.minor&&b.semver.patch===d.patch&&(d=!1),b.operator==="<"||b.operator==="<="){if(s=rHt(a,b,I),s===b&&s!==a)return!1}else if(a.operator==="<="&&!W6(a.semver,String(b),I))return!1}if(!b.operator&&(a||n)&&c!==0)return!1}return!(n&&i&&!a&&c!==0||a&&G&&!n&&c!==0||u||d)},cHt=(t,e,I)=>{if(!t)return e;let l=_4e(t.semver,e.semver,I);return l>0?t:l<0||e.operator===">"&&t.operator===">="?e:t},rHt=(t,e,I)=>{if(!t)return e;let l=_4e(t.semver,e.semver,I);return l<0?t:l>0||e.operator==="<"&&t.operator==="<="?e:t};sHt.exports=xel});var Gde=Y((qac,dHt)=>{"use strict";o();var K4e=oU(),iHt=u6(),Oel=ZG(),GHt=f4e(),zel=d5(),Bel=Lyt(),Mel=xyt(),Sel=Oyt(),Tel=Myt(),_el=Tyt(),Kel=Kyt(),Del=qyt(),qel=$yt(),Pel=Ih(),$el=lwt(),etl=awt(),ttl=nde(),Itl=owt(),ltl=Gwt(),ntl=m6(),atl=ade(),ctl=C4e(),rtl=L4e(),stl=cde(),otl=rde(),itl=k4e(),Gtl=Nwt(),dtl=Z6(),utl=lh(),btl=h6(),mtl=Jwt(),Ztl=Lwt(),ptl=xwt(),htl=Owt(),Wtl=Bwt(),Ntl=ide(),Vtl=Dwt(),Ytl=Pwt(),Rtl=tHt(),Atl=lHt(),Ftl=oHt();dHt.exports={parse:zel,valid:Bel,clean:Mel,inc:Sel,diff:Tel,major:_el,minor:Kel,patch:Del,prerelease:qel,compare:Pel,rcompare:$el,compareLoose:etl,compareBuild:ttl,sort:Itl,rsort:ltl,gt:ntl,lt:atl,eq:ctl,neq:rtl,gte:stl,lte:otl,cmp:itl,coerce:Gtl,Comparator:dtl,Range:utl,satisfies:btl,toComparators:mtl,maxSatisfying:Ztl,minSatisfying:ptl,minVersion:htl,validRange:Wtl,outside:Ntl,gtr:Vtl,ltr:Ytl,intersects:Rtl,simplifyRange:Atl,subset:Ftl,SemVer:Oel,re:K4e.re,src:K4e.src,tokens:K4e.t,SEMVER_SPEC_VERSION:iHt.SEMVER_SPEC_VERSION,RELEASE_TYPES:iHt.RELEASE_TYPES,compareIdentifiers:GHt.compareIdentifiers,rcompareIdentifiers:GHt.rcompareIdentifiers}});var AHt=Y((hcc,pde)=>{o();pde.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&pde.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&pde.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var yHt=Y((Ncc,bU)=>{o();var yc=global.process,u5=function(t){return t&&typeof t=="object"&&typeof t.removeListener=="function"&&typeof t.emit=="function"&&typeof t.reallyExit=="function"&&typeof t.listeners=="function"&&typeof t.kill=="function"&&typeof t.pid=="number"&&typeof t.on=="function"};u5(yc)?(FHt=require("assert"),dU=AHt(),XHt=/^win/i.test(yc.platform),N6=require("events"),typeof N6!="function"&&(N6=N6.EventEmitter),yc.__signal_exit_emitter__?Qo=yc.__signal_exit_emitter__:(Qo=yc.__signal_exit_emitter__=new N6,Qo.count=0,Qo.emitted={}),Qo.infinite||(Qo.setMaxListeners(1/0),Qo.infinite=!0),bU.exports=function(t,e){if(!u5(global.process))return function(){};FHt.equal(typeof t,"function","a callback must be provided for exit handler"),uU===!1&&D4e();var I="exit";e&&e.alwaysLast&&(I="afterexit");var l=function(){Qo.removeListener(I,t),Qo.listeners("exit").length===0&&Qo.listeners("afterexit").length===0&&hde()};return Qo.on(I,t),l},hde=function(){!uU||!u5(global.process)||(uU=!1,dU.forEach(function(e){try{yc.removeListener(e,Wde[e])}catch{}}),yc.emit=Nde,yc.reallyExit=q4e,Qo.count-=1)},bU.exports.unload=hde,b5=function(e,I,l){Qo.emitted[e]||(Qo.emitted[e]=!0,Qo.emit(e,I,l))},Wde={},dU.forEach(function(t){Wde[t]=function(){if(u5(global.process)){var I=yc.listeners(t);I.length===Qo.count&&(hde(),b5("exit",null,t),b5("afterexit",null,t),XHt&&t==="SIGHUP"&&(t="SIGINT"),yc.kill(yc.pid,t))}}}),bU.exports.signals=function(){return dU},uU=!1,D4e=function(){uU||!u5(global.process)||(uU=!0,Qo.count+=1,dU=dU.filter(function(e){try{return yc.on(e,Wde[e]),!0}catch{return!1}}),yc.emit=vHt,yc.reallyExit=gHt)},bU.exports.load=D4e,q4e=yc.reallyExit,gHt=function(e){u5(global.process)&&(yc.exitCode=e||0,b5("exit",yc.exitCode,null),b5("afterexit",yc.exitCode,null),q4e.call(yc,yc.exitCode))},Nde=yc.emit,vHt=function(e,I){if(e==="exit"&&u5(global.process)){I!==void 0&&(yc.exitCode=I);var l=Nde.apply(this,arguments);return b5("exit",yc.exitCode,null),b5("afterexit",yc.exitCode,null),l}else return Nde.apply(this,arguments)}):bU.exports=function(){return function(){}};var FHt,dU,XHt,N6,Qo,hde,b5,Wde,uU,D4e,q4e,gHt,Nde,vHt});var $4e=Y(dr=>{o();var Ds=vo(),P4e="wx";process.version.match(/^v0\.[0-6]/)&&(V6=require("constants"),P4e=V6.O_TRUNC|V6.O_CREAT|V6.O_WRONLY|V6.O_EXCL);var V6,Jtl=require("os");dr.filetime="ctime";Jtl.platform()=="win32"&&(dr.filetime="mtime");var Wn,Vde=require("util");Vde.debuglog?Wn=Vde.debuglog("LOCKFILE"):/\blockfile\b/i.test(process.env.NODE_DEBUG)?Wn=function(){var t=Vde.format.apply(Vde,arguments);console.error("LOCKFILE %d %s",process.pid,t)}:Wn=function(){};var mU={},Ctl=yHt();Ctl(function(){Wn("exit listener"),Object.keys(mU).forEach(dr.unlockSync)});/^v0\.[0-8]\./.test(process.version)&&(Wn("uncaughtException, version = %s",process.version),process.on("uncaughtException",function t(e){Wn("uncaughtException");var I=process.listeners("uncaughtException").filter(function(l){return l!==t});if(!I.length){try{Object.keys(mU).forEach(dr.unlockSync)}catch{}throw process.removeListener("uncaughtException",t),e}}));dr.unlock=function(t,e){Wn("unlock",t),delete mU[t],Ds.unlink(t,function(I){e&&e()})};dr.unlockSync=function(t){Wn("unlockSync",t);try{Ds.unlinkSync(t)}catch{}delete mU[t]};dr.check=function(t,e,I){typeof e=="function"&&(I=e,e={}),Wn("check",t,e),Ds.open(t,"r",function(l,n){if(l)return l.code!=="ENOENT"?I(l):I(null,!1);if(!e.stale)return Ds.close(n,function(a){return I(a,!0)});Ds.fstat(n,function(a,c){if(a)return Ds.close(n,function(r){return I(a)});Ds.close(n,function(r){var s=Date.now()-c[dr.filetime].getTime();return I(r,s<=e.stale)})})})};dr.checkSync=function(t,e){if(e=e||{},Wn("checkSync",t,e),e.wait)throw new Error("opts.wait not supported sync for obvious reasons");try{var I=Ds.openSync(t,"r")}catch(a){if(a.code!=="ENOENT")throw a;return!1}if(!e.stale){try{Ds.closeSync(I)}catch{}return!0}if(e.stale){try{var l=Ds.fstatSync(I)}finally{Ds.closeSync(I)}var n=Date.now()-l[dr.filetime].getTime();return n<=e.stale}};var HHt=1;dr.lock=function(t,e,I){if(typeof e=="function"&&(I=e,e={}),e.req=e.req||HHt++,Wn("lock",t,e),e.start=e.start||Date.now(),typeof e.retries=="number"&&e.retries>0){Wn("has retries",e.retries);var l=e.retries;e.retries=0,I=function(n){return function a(c,r){if(Wn("retry-mutated callback"),l-=1,!c||l<0)return n(c,r);Wn("lock retry",t,e),e.retryWait?setTimeout(s,e.retryWait):s();function s(){e.start=Date.now(),Wn("retrying",e.start),dr.lock(t,e,a)}}}(I)}Ds.open(t,P4e,function(n,a){return n?(Wn("failed to acquire lock",n),n.code!=="EEXIST"?(Wn("not EEXIST error",n),I(n)):e.stale?QHt(n,t,e,!1,I):fHt(n,t,e,I)):(Wn("locked",t,a),mU[t]=a,Ds.close(a,function(){return I()}))}),Wn("lock return")};function QHt(t,e,I,l,n){Ds.stat(e,function(a,c){if(a){if(a.code==="ENOENT"){I.stale=!1,Wn("lock stale enoent retry",e,I),dr.lock(e,I,n);return}return n(a)}var r=Date.now()-c[dr.filetime].getTime();if(r<=I.stale)return fHt(t,e,I,n);Wn("lock stale",e,I),l?dr.unlock(e,function(s){if(s)return n(s);Wn("lock stale retry",e,I),Ds.link(e+".STALE",e,function(i){Ds.unlink(e+".STALE",function(){n(i)})})}):(Wn("acquire .STALE file lock",I),dr.lock(e+".STALE",I,function(s){if(s)return n(s);QHt(t,e,I,!0,n)}))})}function fHt(t,e,I,l){if(Wn("notStale",e,I),typeof I.wait!="number"||I.wait<=0)return Wn("notStale, wait is not a number"),l(t);var n=Date.now(),a=I.start||n,c=a+I.wait;if(c<=n)return l(t);Wn("now=%d, wait until %d (delta=%d)",a,c,c-a);var r=Math.min(c-a,I.pollPeriod||100),s=setTimeout(i,r);function i(){Wn("notStale, polling",e,I),dr.lock(e,I,l)}}dr.lockSync=function(t,e){if(e=e||{},e.req=e.req||HHt++,Wn("lockSync",t,e),e.wait||e.retryWait)throw new Error("opts.wait not supported sync for obvious reasons");try{var I=Ds.openSync(t,P4e);mU[t]=I;try{Ds.closeSync(I)}catch{}Wn("locked sync!",t,I);return}catch(c){if(c.code!=="EEXIST")return wHt(t,e,c);if(e.stale){var l=Ds.statSync(t),n=l[dr.filetime].getTime();!(n%1e3)&&e.stale%1e3&&(e.stale=1e3*Math.ceil(e.stale/1e3));var a=Date.now()-n;if(a>e.stale)return Wn("lockSync stale",t,e,a),dr.unlockSync(t),dr.lockSync(t,e)}return Wn("failed to lock",t,e,c),wHt(t,e,c)}};function wHt(t,e,I){if(typeof e.retries=="number"&&e.retries>0){var l=e.retries-1;return Wn("retryThrow",t,e,l),e.retries=l,dr.lockSync(t,e)}throw I}});var bQt=Y(Xa=>{"use strict";o();function dxe(t,e){var I=t.length;t.push(e);e:for(;0>>1,n=t[l];if(0>>1;lvde(r,I))svde(i,r)?(t[l]=i,t[s]=I,l=s):(t[l]=r,t[c]=I,l=c);else if(svde(i,I))t[l]=i,t[s]=I,l=s;else break e}}return e}function vde(t,e){var I=t.sortIndex-e.sortIndex;return I!==0?I:t.id-e.id}typeof performance=="object"&&typeof performance.now=="function"?(aQt=performance,Xa.unstable_now=function(){return aQt.now()}):(oxe=Date,cQt=oxe.now(),Xa.unstable_now=function(){return oxe.now()-cQt});var aQt,oxe,cQt,xF=[],zQ=[],Mtl=1,ch=null,NG=3,Hde=!1,p5=!1,v6=!1,oQt=typeof setTimeout=="function"?setTimeout:null,iQt=typeof clearTimeout=="function"?clearTimeout:null,rQt=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function uxe(t){for(var e=A0(zQ);e!==null;){if(e.callback===null)wde(zQ);else if(e.startTime<=t)wde(zQ),e.sortIndex=e.expirationTime,dxe(xF,e);else break;e=A0(zQ)}}function bxe(t){if(v6=!1,uxe(t),!p5)if(A0(xF)!==null)p5=!0,Zxe(mxe);else{var e=A0(zQ);e!==null&&pxe(bxe,e.startTime-t)}}function mxe(t,e){p5=!1,v6&&(v6=!1,iQt(y6),y6=-1),Hde=!0;var I=NG;try{for(uxe(e),ch=A0(xF);ch!==null&&(!(ch.expirationTime>e)||t&&!uQt());){var l=ch.callback;if(typeof l=="function"){ch.callback=null,NG=ch.priorityLevel;var n=l(ch.expirationTime<=e);e=Xa.unstable_now(),typeof n=="function"?ch.callback=n:ch===A0(xF)&&wde(xF),uxe(e)}else wde(xF);ch=A0(xF)}if(ch!==null)var a=!0;else{var c=A0(zQ);c!==null&&pxe(bxe,c.startTime-e),a=!1}return a}finally{ch=null,NG=I,Hde=!1}}var Qde=!1,yde=null,y6=-1,GQt=5,dQt=-1;function uQt(){return!(Xa.unstable_now()-dQtt||125l?(t.sortIndex=I,dxe(zQ,t),A0(xF)===null&&t===A0(zQ)&&(v6?(iQt(y6),y6=-1):v6=!0,pxe(bxe,I-l))):(t.sortIndex=n,dxe(xF,t),p5||Hde||(p5=!0,Zxe(mxe))),t};Xa.unstable_shouldYield=uQt;Xa.unstable_wrapCallback=function(t){var e=NG;return function(){var I=NG;NG=e;try{return t.apply(this,arguments)}finally{NG=I}}}});var ZQt=Y((Zrc,mQt)=>{"use strict";o();mQt.exports=bQt()});var N1t=Y(gZ=>{"use strict";o();var Stl=We(),FZ=ZQt();function et(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,I=1;I"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),jxe=Object.prototype.hasOwnProperty,Ttl=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,pQt={},hQt={};function _tl(t){return jxe.call(hQt,t)?!0:jxe.call(pQt,t)?!1:Ttl.test(t)?hQt[t]=!0:(pQt[t]=!0,!1)}function Ktl(t,e,I,l){if(I!==null&&I.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return l?!1:I!==null?!I.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function Dtl(t,e,I,l){if(e===null||typeof e>"u"||Ktl(t,e,I,l))return!0;if(l)return!1;if(I!==null)switch(I.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function cb(t,e,I,l,n,a,c){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=l,this.attributeNamespace=n,this.mustUseProperty=I,this.propertyName=t,this.type=e,this.sanitizeURL=a,this.removeEmptyString=c}var wi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){wi[t]=new cb(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];wi[e]=new cb(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){wi[t]=new cb(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){wi[t]=new cb(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){wi[t]=new cb(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){wi[t]=new cb(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){wi[t]=new cb(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){wi[t]=new cb(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){wi[t]=new cb(t,5,!1,t.toLowerCase(),null,!1,!1)});var Q3e=/[\-:]([a-z])/g;function f3e(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(Q3e,f3e);wi[e]=new cb(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(Q3e,f3e);wi[e]=new cb(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(Q3e,f3e);wi[e]=new cb(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){wi[t]=new cb(t,1,!1,t.toLowerCase(),null,!1,!1)});wi.xlinkHref=new cb("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){wi[t]=new cb(t,1,!1,t.toLowerCase(),null,!0,!0)});function E3e(t,e,I,l){var n=wi.hasOwnProperty(e)?wi[e]:null;(n!==null?n.type!==0:l||!(2r||n[c]!==a[r]){var s=` +`+n[c].replace(" at new "," at ");return t.displayName&&s.includes("")&&(s=s.replace("",t.displayName)),s}while(1<=c&&0<=r);break}}}finally{Wxe=!1,Error.prepareStackTrace=I}return(t=t?t.displayName||t.name:"")?k6(t):""}function qtl(t){switch(t.tag){case 5:return k6(t.type);case 16:return k6("Lazy");case 13:return k6("Suspense");case 19:return k6("SuspenseList");case 0:case 2:case 15:return t=Nxe(t.type,!1),t;case 11:return t=Nxe(t.type.render,!1),t;case 1:return t=Nxe(t.type,!0),t;default:return""}}function Bxe(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case RU:return"Fragment";case YU:return"Portal";case Uxe:return"Profiler";case J3e:return"StrictMode";case Oxe:return"Suspense";case zxe:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case Fft:return(t.displayName||"Context")+".Consumer";case Aft:return(t._context.displayName||"Context")+".Provider";case C3e:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case L3e:return e=t.displayName||null,e!==null?e:Bxe(t.type)||"Memo";case MQ:e=t._payload,t=t._init;try{return Bxe(t(e))}catch{}}return null}function Ptl(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Bxe(e);case 8:return e===J3e?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function af(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function gft(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function $tl(t){var e=gft(t)?"checked":"value",I=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),l=""+t[e];if(!t.hasOwnProperty(e)&&typeof I<"u"&&typeof I.get=="function"&&typeof I.set=="function"){var n=I.get,a=I.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return n.call(this)},set:function(c){l=""+c,a.call(this,c)}}),Object.defineProperty(t,e,{enumerable:I.enumerable}),{getValue:function(){return l},setValue:function(c){l=""+c},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Ede(t){t._valueTracker||(t._valueTracker=$tl(t))}function vft(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var I=e.getValue(),l="";return t&&(l=gft(t)?t.checked?"true":"false":t.value),t=l,t!==I?(e.setValue(t),!0):!1}function sue(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Mxe(t,e){var I=e.checked;return mr({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:I??t._wrapperState.initialChecked})}function NQt(t,e){var I=e.defaultValue==null?"":e.defaultValue,l=e.checked!=null?e.checked:e.defaultChecked;I=af(e.value!=null?e.value:I),t._wrapperState={initialChecked:l,initialValue:I,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function yft(t,e){e=e.checked,e!=null&&E3e(t,"checked",e,!1)}function Sxe(t,e){yft(t,e);var I=af(e.value),l=e.type;if(I!=null)l==="number"?(I===0&&t.value===""||t.value!=I)&&(t.value=""+I):t.value!==""+I&&(t.value=""+I);else if(l==="submit"||l==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?Txe(t,e.type,I):e.hasOwnProperty("defaultValue")&&Txe(t,e.type,af(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function VQt(t,e,I){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var l=e.type;if(!(l!=="submit"&&l!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,I||e===t.value||(t.value=e),t.defaultValue=e}I=t.name,I!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,I!==""&&(t.name=I)}function Txe(t,e,I){(e!=="number"||sue(t.ownerDocument)!==t)&&(I==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+I&&(t.defaultValue=""+I))}var x6=Array.isArray;function EU(t,e,I,l){if(t=t.options,e){e={};for(var n=0;n"+e.valueOf().toString()+"",e=Jde.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function P6(t,e){if(e){var I=t.firstChild;if(I&&I===t.lastChild&&I.nodeType===3){I.nodeValue=e;return}}t.textContent=e}var O6={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},eIl=["Webkit","ms","Moz","O"];Object.keys(O6).forEach(function(t){eIl.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),O6[e]=O6[t]})});function fft(t,e,I){return e==null||typeof e=="boolean"||e===""?"":I||typeof e!="number"||e===0||O6.hasOwnProperty(t)&&O6[t]?(""+e).trim():e+"px"}function Eft(t,e){t=t.style;for(var I in e)if(e.hasOwnProperty(I)){var l=I.indexOf("--")===0,n=fft(I,e[I],l);I==="float"&&(I="cssFloat"),l?t.setProperty(I,n):t[I]=n}}var tIl=mr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Dxe(t,e){if(e){if(tIl[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(et(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(et(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(et(61))}if(e.style!=null&&typeof e.style!="object")throw Error(et(62))}}function qxe(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Pxe=null;function k3e(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var $xe=null,JU=null,CU=null;function AQt(t){if(t=Zq(t)){if(typeof $xe!="function")throw Error(et(280));var e=t.stateNode;e&&(e=Cue(e),$xe(t.stateNode,t.type,e))}}function Jft(t){JU?CU?CU.push(t):CU=[t]:JU=t}function Cft(){if(JU){var t=JU,e=CU;if(CU=JU=null,AQt(t),e)for(t=0;t>>=0,t===0?32:31-(dIl(t)/uIl|0)|0}var Cde=64,Lde=4194304;function j6(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function due(t,e){var I=t.pendingLanes;if(I===0)return 0;var l=0,n=t.suspendedLanes,a=t.pingedLanes,c=I&268435455;if(c!==0){var r=c&~n;r!==0?l=j6(r):(a&=c,a!==0&&(l=j6(a)))}else c=I&~n,c!==0?l=j6(c):a!==0&&(l=j6(a));if(l===0)return 0;if(e!==0&&e!==l&&!(e&n)&&(n=l&-l,a=e&-e,n>=a||n===16&&(a&4194240)!==0))return e;if(l&4&&(l|=I&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=l;0I;I++)e.push(t);return e}function bq(t,e,I){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-y0(e),t[e]=I}function pIl(t,e){var I=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var l=t.eventTimes;for(t=t.expirationTimes;0=B6),fQt=" ",EQt=!1;function IEt(t,e){switch(t){case"keyup":return MIl.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function lEt(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var AU=!1;function TIl(t,e){switch(t){case"compositionend":return lEt(e);case"keypress":return e.which!==32?null:(EQt=!0,fQt);case"textInput":return t=e.data,t===fQt&&EQt?null:t;default:return null}}function _Il(t,e){if(AU)return t==="compositionend"||!S3e&&IEt(t,e)?(t=eEt(),$de=z3e=KQ=null,AU=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:I,offset:e-t};t=l}e:{for(;I;){if(I.nextSibling){I=I.nextSibling;break e}I=I.parentNode}I=void 0}I=LQt(I)}}function rEt(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?rEt(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function sEt(){for(var t=window,e=sue();e instanceof t.HTMLIFrameElement;){try{var I=typeof e.contentWindow.location.href=="string"}catch{I=!1}if(I)t=e.contentWindow;else break;e=sue(t.document)}return e}function T3e(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function lll(t){var e=sEt(),I=t.focusedElem,l=t.selectionRange;if(e!==I&&I&&I.ownerDocument&&rEt(I.ownerDocument.documentElement,I)){if(l!==null&&T3e(I)){if(e=l.start,t=l.end,t===void 0&&(t=e),"selectionStart"in I)I.selectionStart=e,I.selectionEnd=Math.min(t,I.value.length);else if(t=(e=I.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var n=I.textContent.length,a=Math.min(l.start,n);l=l.end===void 0?a:Math.min(l.end,n),!t.extend&&a>l&&(n=l,l=a,a=n),n=kQt(I,a);var c=kQt(I,l);n&&c&&(t.rangeCount!==1||t.anchorNode!==n.node||t.anchorOffset!==n.offset||t.focusNode!==c.node||t.focusOffset!==c.offset)&&(e=e.createRange(),e.setStart(n.node,n.offset),t.removeAllRanges(),a>l?(t.addRange(e),t.extend(c.node,c.offset)):(e.setEnd(c.node,c.offset),t.addRange(e)))}}for(e=[],t=I;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof I.focus=="function"&&I.focus(),I=0;I=document.documentMode,FU=null,a3e=null,S6=null,c3e=!1;function xQt(t,e,I){var l=I.window===I?I.document:I.nodeType===9?I:I.ownerDocument;c3e||FU==null||FU!==sue(l)||(l=FU,"selectionStart"in l&&T3e(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),S6&&nq(S6,l)||(S6=l,l=mue(a3e,"onSelect"),0vU||(t.current=d3e[vU],d3e[vU]=null,vU--)}function ga(t,e){vU++,d3e[vU]=t.current,t.current=e}var cf={},AG=sf(cf),lm=sf(!1),F5=cf;function UU(t,e){var I=t.type.contextTypes;if(!I)return cf;var l=t.stateNode;if(l&&l.__reactInternalMemoizedUnmaskedChildContext===e)return l.__reactInternalMemoizedMaskedChildContext;var n={},a;for(a in I)n[a]=e[a];return l&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=n),n}function nm(t){return t=t.childContextTypes,t!=null}function pue(){sc(lm),sc(AG)}function _Qt(t,e,I){if(AG.current!==cf)throw Error(et(168));ga(AG,e),ga(lm,I)}function pEt(t,e,I){var l=t.stateNode;if(e=e.childContextTypes,typeof l.getChildContext!="function")return I;l=l.getChildContext();for(var n in l)if(!(n in e))throw Error(et(108,Ptl(t)||"Unknown",n));return mr({},I,l)}function hue(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||cf,F5=AG.current,ga(AG,t),ga(lm,lm.current),!0}function KQt(t,e,I){var l=t.stateNode;if(!l)throw Error(et(169));I?(t=pEt(t,e,F5),l.__reactInternalMemoizedMergedChildContext=t,sc(lm),sc(AG),ga(AG,t)):sc(lm),ga(lm,I)}var Fg=null,Lue=!1,Hxe=!1;function hEt(t){Fg===null?Fg=[t]:Fg.push(t)}function ull(t){Lue=!0,hEt(t)}function of(){if(!Hxe&&Fg!==null){Hxe=!0;var t=0,e=Un;try{var I=Fg;for(Un=1;t>=c,n-=c,Xg=1<<32-y0(e)+n|I<w?(H=y,y=null):H=y.sibling;var f=u(h,y,V[w],R);if(f===null){y===null&&(y=H);break}t&&y&&f.alternate===null&&e(h,y),N=a(f,N,w),v===null?F=f:v.sibling=f,v=f,y=H}if(w===V.length)return I(h,y),wc&&h5(h,w),F;if(y===null){for(;ww?(H=y,y=null):H=y.sibling;var L=u(h,y,f.value,R);if(L===null){y===null&&(y=H);break}t&&y&&L.alternate===null&&e(h,y),N=a(L,N,w),v===null?F=L:v.sibling=L,v=L,y=H}if(f.done)return I(h,y),wc&&h5(h,w),F;if(y===null){for(;!f.done;w++,f=V.next())f=d(h,f.value,R),f!==null&&(N=a(f,N,w),v===null?F=f:v.sibling=f,v=f);return wc&&h5(h,w),F}for(y=l(h,y);!f.done;w++,f=V.next())f=b(y,h,w,f.value,R),f!==null&&(t&&f.alternate!==null&&y.delete(f.key===null?w:f.key),N=a(f,N,w),v===null?F=f:v.sibling=f,v=f);return t&&y.forEach(function(k){return e(h,k)}),wc&&h5(h,w),F}function W(h,N,V,R){if(typeof V=="object"&&V!==null&&V.type===RU&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case fde:e:{for(var F=V.key,v=N;v!==null;){if(v.key===F){if(F=V.type,F===RU){if(v.tag===7){I(h,v.sibling),N=n(v,V.props.children),N.return=h,h=N;break e}}else if(v.elementType===F||typeof F=="object"&&F!==null&&F.$$typeof===MQ&&PQt(F)===v.type){I(h,v.sibling),N=n(v,V.props),N.ref=E6(h,v,V),N.return=h,h=N;break e}I(h,v);break}else e(h,v);v=v.sibling}V.type===RU?(N=A5(V.props.children,h.mode,R,V.key),N.return=h,h=N):(R=rue(V.type,V.key,V.props,null,h.mode,R),R.ref=E6(h,N,V),R.return=h,h=R)}return c(h);case YU:e:{for(v=V.key;N!==null;){if(N.key===v)if(N.tag===4&&N.stateNode.containerInfo===V.containerInfo&&N.stateNode.implementation===V.implementation){I(h,N.sibling),N=n(N,V.children||[]),N.return=h,h=N;break e}else{I(h,N);break}else e(h,N);N=N.sibling}N=xxe(V,h.mode,R),N.return=h,h=N}return c(h);case MQ:return v=V._init,W(h,N,v(V._payload),R)}if(x6(V))return Z(h,N,V,R);if(w6(V))return p(h,N,V,R);_de(h,V)}return typeof V=="string"&&V!==""||typeof V=="number"?(V=""+V,N!==null&&N.tag===6?(I(h,N.sibling),N=n(N,V),N.return=h,h=N):(I(h,N),N=kxe(V,h.mode,R),N.return=h,h=N),c(h)):I(h,N)}return W}var zU=YEt(!0),REt=YEt(!1),Vue=sf(null),Yue=null,HU=null,q3e=null;function P3e(){q3e=HU=Yue=null}function $3e(t){var e=Vue.current;sc(Vue),t._currentValue=e}function m3e(t,e,I){for(;t!==null;){var l=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,l!==null&&(l.childLanes|=e)):l!==null&&(l.childLanes&e)!==e&&(l.childLanes|=e),t===I)break;t=t.return}}function kU(t,e){Yue=t,q3e=HU=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(Im=!0),t.firstContext=null)}function Gh(t){var e=t._currentValue;if(q3e!==t)if(t={context:t,memoizedValue:e,next:null},HU===null){if(Yue===null)throw Error(et(308));HU=t,Yue.dependencies={lanes:0,firstContext:t}}else HU=HU.next=t;return e}var V5=null;function eje(t){V5===null?V5=[t]:V5.push(t)}function AEt(t,e,I,l){var n=e.interleaved;return n===null?(I.next=I,eje(e)):(I.next=n.next,n.next=I),e.interleaved=I,Hg(t,l)}function Hg(t,e){t.lanes|=e;var I=t.alternate;for(I!==null&&(I.lanes|=e),I=t,t=t.return;t!==null;)t.childLanes|=e,I=t.alternate,I!==null&&(I.childLanes|=e),I=t,t=t.return;return I.tag===3?I.stateNode:null}var SQ=!1;function tje(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function FEt(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function vg(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function tf(t,e,I){var l=t.updateQueue;if(l===null)return null;if(l=l.shared,cn&2){var n=l.pending;return n===null?e.next=e:(e.next=n.next,n.next=e),l.pending=e,Hg(t,I)}return n=l.interleaved,n===null?(e.next=e,eje(l)):(e.next=n.next,n.next=e),l.interleaved=e,Hg(t,I)}function tue(t,e,I){if(e=e.updateQueue,e!==null&&(e=e.shared,(I&4194240)!==0)){var l=e.lanes;l&=t.pendingLanes,I|=l,e.lanes=I,j3e(t,I)}}function $Qt(t,e){var I=t.updateQueue,l=t.alternate;if(l!==null&&(l=l.updateQueue,I===l)){var n=null,a=null;if(I=I.firstBaseUpdate,I!==null){do{var c={eventTime:I.eventTime,lane:I.lane,tag:I.tag,payload:I.payload,callback:I.callback,next:null};a===null?n=a=c:a=a.next=c,I=I.next}while(I!==null);a===null?n=a=e:a=a.next=e}else n=a=e;I={baseState:l.baseState,firstBaseUpdate:n,lastBaseUpdate:a,shared:l.shared,effects:l.effects},t.updateQueue=I;return}t=I.lastBaseUpdate,t===null?I.firstBaseUpdate=e:t.next=e,I.lastBaseUpdate=e}function Rue(t,e,I,l){var n=t.updateQueue;SQ=!1;var a=n.firstBaseUpdate,c=n.lastBaseUpdate,r=n.shared.pending;if(r!==null){n.shared.pending=null;var s=r,i=s.next;s.next=null,c===null?a=i:c.next=i,c=s;var G=t.alternate;G!==null&&(G=G.updateQueue,r=G.lastBaseUpdate,r!==c&&(r===null?G.firstBaseUpdate=i:r.next=i,G.lastBaseUpdate=s))}if(a!==null){var d=n.baseState;c=0,G=i=s=null,r=a;do{var u=r.lane,b=r.eventTime;if((l&u)===u){G!==null&&(G=G.next={eventTime:b,lane:0,tag:r.tag,payload:r.payload,callback:r.callback,next:null});e:{var Z=t,p=r;switch(u=e,b=I,p.tag){case 1:if(Z=p.payload,typeof Z=="function"){d=Z.call(b,d,u);break e}d=Z;break e;case 3:Z.flags=Z.flags&-65537|128;case 0:if(Z=p.payload,u=typeof Z=="function"?Z.call(b,d,u):Z,u==null)break e;d=mr({},d,u);break e;case 2:SQ=!0}}r.callback!==null&&r.lane!==0&&(t.flags|=64,u=n.effects,u===null?n.effects=[r]:u.push(r))}else b={eventTime:b,lane:u,tag:r.tag,payload:r.payload,callback:r.callback,next:null},G===null?(i=G=b,s=d):G=G.next=b,c|=u;if(r=r.next,r===null){if(r=n.shared.pending,r===null)break;u=r,r=u.next,u.next=null,n.lastBaseUpdate=u,n.shared.pending=null}}while(!0);if(G===null&&(s=d),n.baseState=s,n.firstBaseUpdate=i,n.lastBaseUpdate=G,e=n.shared.interleaved,e!==null){n=e;do c|=n.lane,n=n.next;while(n!==e)}else a===null&&(n.shared.lanes=0);v5|=c,t.lanes=c,t.memoizedState=d}}function eft(t,e,I){if(t=e.effects,e.effects=null,t!==null)for(e=0;eI?I:4,t(!0);var l=fxe.transition;fxe.transition={};try{t(!1),e()}finally{Un=I,fxe.transition=l}}function OEt(){return dh().memoizedState}function pll(t,e,I){var l=lf(t);if(I={lane:l,action:I,hasEagerState:!1,eagerState:null,next:null},zEt(t))BEt(e,I);else if(I=AEt(t,e,I,l),I!==null){var n=ab();w0(I,t,l,n),MEt(I,e,l)}}function hll(t,e,I){var l=lf(t),n={lane:l,action:I,hasEagerState:!1,eagerState:null,next:null};if(zEt(t))BEt(e,n);else{var a=t.alternate;if(t.lanes===0&&(a===null||a.lanes===0)&&(a=e.lastRenderedReducer,a!==null))try{var c=e.lastRenderedState,r=a(c,I);if(n.hasEagerState=!0,n.eagerState=r,H0(r,c)){var s=e.interleaved;s===null?(n.next=n,eje(e)):(n.next=s.next,s.next=n),e.interleaved=n;return}}catch{}finally{}I=AEt(t,e,n,l),I!==null&&(n=ab(),w0(I,t,l,n),MEt(I,e,l))}}function zEt(t){var e=t.alternate;return t===br||e!==null&&e===br}function BEt(t,e){T6=Fue=!0;var I=t.pending;I===null?e.next=e:(e.next=I.next,I.next=e),t.pending=e}function MEt(t,e,I){if(I&4194240){var l=e.lanes;l&=t.pendingLanes,I|=l,e.lanes=I,j3e(t,I)}}var Xue={readContext:Gh,useCallback:VG,useContext:VG,useEffect:VG,useImperativeHandle:VG,useInsertionEffect:VG,useLayoutEffect:VG,useMemo:VG,useReducer:VG,useRef:VG,useState:VG,useDebugValue:VG,useDeferredValue:VG,useTransition:VG,useMutableSource:VG,useSyncExternalStore:VG,useId:VG,unstable_isNewReconciler:!1},Wll={readContext:Gh,useCallback:function(t,e){return UF().memoizedState=[t,e===void 0?null:e],t},useContext:Gh,useEffect:Ift,useImperativeHandle:function(t,e,I){return I=I!=null?I.concat([t]):null,lue(4194308,4,LEt.bind(null,e,t),I)},useLayoutEffect:function(t,e){return lue(4194308,4,t,e)},useInsertionEffect:function(t,e){return lue(4,2,t,e)},useMemo:function(t,e){var I=UF();return e=e===void 0?null:e,t=t(),I.memoizedState=[t,e],t},useReducer:function(t,e,I){var l=UF();return e=I!==void 0?I(e):e,l.memoizedState=l.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},l.queue=t,t=t.dispatch=pll.bind(null,br,t),[l.memoizedState,t]},useRef:function(t){var e=UF();return t={current:t},e.memoizedState=t},useState:tft,useDebugValue:oje,useDeferredValue:function(t){return UF().memoizedState=t},useTransition:function(){var t=tft(!1),e=t[0];return t=Zll.bind(null,t[1]),UF().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,I){var l=br,n=UF();if(wc){if(I===void 0)throw Error(et(407));I=I()}else{if(I=e(),Eo===null)throw Error(et(349));g5&30||yEt(l,e,I)}n.memoizedState=I;var a={value:I,getSnapshot:e};return n.queue=a,Ift(HEt.bind(null,l,a,t),[t]),l.flags|=2048,dq(9,wEt.bind(null,l,a,I,e),void 0,null),I},useId:function(){var t=UF(),e=Eo.identifierPrefix;if(wc){var I=gg,l=Xg;I=(l&~(1<<32-y0(l)-1)).toString(32)+I,e=":"+e+"R"+I,I=iq++,0<\/script>",t=t.removeChild(t.firstChild)):typeof l.is=="string"?t=c.createElement(I,{is:l.is}):(t=c.createElement(I),I==="select"&&(c=t,l.multiple?c.multiple=!0:l.size&&(c.size=l.size))):t=c.createElementNS(t,I),t[OF]=e,t[rq]=l,t1t(t,e,!1,!1),e.stateNode=t;e:{switch(c=qxe(I,l),I){case"dialog":rc("cancel",t),rc("close",t),n=l;break;case"iframe":case"object":case"embed":rc("load",t),n=l;break;case"video":case"audio":for(n=0;nSU&&(e.flags|=128,l=!0,J6(a,!1),e.lanes=4194304)}else{if(!l)if(t=Aue(c),t!==null){if(e.flags|=128,l=!0,I=t.updateQueue,I!==null&&(e.updateQueue=I,e.flags|=4),J6(a,!0),a.tail===null&&a.tailMode==="hidden"&&!c.alternate&&!wc)return YG(e),null}else 2*as()-a.renderingStartTime>SU&&I!==1073741824&&(e.flags|=128,l=!0,J6(a,!1),e.lanes=4194304);a.isBackwards?(c.sibling=e.child,e.child=c):(I=a.last,I!==null?I.sibling=c:e.child=c,a.last=c)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=as(),e.sibling=null,I=ur.current,ga(ur,l?I&1|2:I&1),e):(YG(e),null);case 22:case 23:return mje(),l=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==l&&(e.flags|=8192),l&&e.mode&1?YZ&1073741824&&(YG(e),e.subtreeFlags&6&&(e.flags|=8192)):YG(e),null;case 24:return null;case 25:return null}throw Error(et(156,e.tag))}function gll(t,e){switch(K3e(e),e.tag){case 1:return nm(e.type)&&pue(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return BU(),sc(lm),sc(AG),nje(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return lje(e),null;case 13:if(sc(ur),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(et(340));OU()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return sc(ur),null;case 4:return BU(),null;case 10:return $3e(e.type._context),null;case 22:case 23:return mje(),null;case 24:return null;default:return null}}var Dde=!1,RG=!1,vll=typeof WeakSet=="function"?WeakSet:Set,kt=null;function QU(t,e){var I=t.ref;if(I!==null)if(typeof I=="function")try{I(null)}catch(l){Lr(t,e,l)}else I.current=null}function A3e(t,e,I){try{I()}catch(l){Lr(t,e,l)}}var uft=!1;function yll(t,e){if(r3e=uue,t=sEt(),T3e(t)){if("selectionStart"in t)var I={start:t.selectionStart,end:t.selectionEnd};else e:{I=(I=t.ownerDocument)&&I.defaultView||window;var l=I.getSelection&&I.getSelection();if(l&&l.rangeCount!==0){I=l.anchorNode;var n=l.anchorOffset,a=l.focusNode;l=l.focusOffset;try{I.nodeType,a.nodeType}catch{I=null;break e}var c=0,r=-1,s=-1,i=0,G=0,d=t,u=null;t:for(;;){for(var b;d!==I||n!==0&&d.nodeType!==3||(r=c+n),d!==a||l!==0&&d.nodeType!==3||(s=c+l),d.nodeType===3&&(c+=d.nodeValue.length),(b=d.firstChild)!==null;)u=d,d=b;for(;;){if(d===t)break t;if(u===I&&++i===n&&(r=c),u===a&&++G===l&&(s=c),(b=d.nextSibling)!==null)break;d=u,u=d.parentNode}d=b}I=r===-1||s===-1?null:{start:r,end:s}}else I=null}I=I||{start:0,end:0}}else I=null;for(s3e={focusedElem:t,selectionRange:I},uue=!1,kt=e;kt!==null;)if(e=kt,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,kt=t;else for(;kt!==null;){e=kt;try{var Z=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(Z!==null){var p=Z.memoizedProps,W=Z.memoizedState,h=e.stateNode,N=h.getSnapshotBeforeUpdate(e.elementType===e.type?p:X0(e.type,p),W);h.__reactInternalSnapshotBeforeUpdate=N}break;case 3:var V=e.stateNode.containerInfo;V.nodeType===1?V.textContent="":V.nodeType===9&&V.documentElement&&V.removeChild(V.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(et(163))}}catch(R){Lr(e,e.return,R)}if(t=e.sibling,t!==null){t.return=e.return,kt=t;break}kt=e.return}return Z=uft,uft=!1,Z}function _6(t,e,I){var l=e.updateQueue;if(l=l!==null?l.lastEffect:null,l!==null){var n=l=l.next;do{if((n.tag&t)===t){var a=n.destroy;n.destroy=void 0,a!==void 0&&A3e(e,I,a)}n=n.next}while(n!==l)}}function jue(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var I=e=e.next;do{if((I.tag&t)===t){var l=I.create;I.destroy=l()}I=I.next}while(I!==e)}}function F3e(t){var e=t.ref;if(e!==null){var I=t.stateNode;switch(t.tag){case 5:t=I;break;default:t=I}typeof e=="function"?e(t):e.current=t}}function n1t(t){var e=t.alternate;e!==null&&(t.alternate=null,n1t(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[OF],delete e[rq],delete e[G3e],delete e[Gll],delete e[dll])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function a1t(t){return t.tag===5||t.tag===3||t.tag===4}function bft(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||a1t(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function X3e(t,e,I){var l=t.tag;if(l===5||l===6)t=t.stateNode,e?I.nodeType===8?I.parentNode.insertBefore(t,e):I.insertBefore(t,e):(I.nodeType===8?(e=I.parentNode,e.insertBefore(t,I)):(e=I,e.appendChild(t)),I=I._reactRootContainer,I!=null||e.onclick!==null||(e.onclick=Zue));else if(l!==4&&(t=t.child,t!==null))for(X3e(t,e,I),t=t.sibling;t!==null;)X3e(t,e,I),t=t.sibling}function g3e(t,e,I){var l=t.tag;if(l===5||l===6)t=t.stateNode,e?I.insertBefore(t,e):I.appendChild(t);else if(l!==4&&(t=t.child,t!==null))for(g3e(t,e,I),t=t.sibling;t!==null;)g3e(t,e,I),t=t.sibling}var vi=null,g0=!1;function BQ(t,e,I){for(I=I.child;I!==null;)c1t(t,e,I),I=I.sibling}function c1t(t,e,I){if(zF&&typeof zF.onCommitFiberUnmount=="function")try{zF.onCommitFiberUnmount(Que,I)}catch{}switch(I.tag){case 5:RG||QU(I,e);case 6:var l=vi,n=g0;vi=null,BQ(t,e,I),vi=l,g0=n,vi!==null&&(g0?(t=vi,I=I.stateNode,t.nodeType===8?t.parentNode.removeChild(I):t.removeChild(I)):vi.removeChild(I.stateNode));break;case 18:vi!==null&&(g0?(t=vi,I=I.stateNode,t.nodeType===8?wxe(t.parentNode,I):t.nodeType===1&&wxe(t,I),Iq(t)):wxe(vi,I.stateNode));break;case 4:l=vi,n=g0,vi=I.stateNode.containerInfo,g0=!0,BQ(t,e,I),vi=l,g0=n;break;case 0:case 11:case 14:case 15:if(!RG&&(l=I.updateQueue,l!==null&&(l=l.lastEffect,l!==null))){n=l=l.next;do{var a=n,c=a.destroy;a=a.tag,c!==void 0&&(a&2||a&4)&&A3e(I,e,c),n=n.next}while(n!==l)}BQ(t,e,I);break;case 1:if(!RG&&(QU(I,e),l=I.stateNode,typeof l.componentWillUnmount=="function"))try{l.props=I.memoizedProps,l.state=I.memoizedState,l.componentWillUnmount()}catch(r){Lr(I,e,r)}BQ(t,e,I);break;case 21:BQ(t,e,I);break;case 22:I.mode&1?(RG=(l=RG)||I.memoizedState!==null,BQ(t,e,I),RG=l):BQ(t,e,I);break;default:BQ(t,e,I)}}function mft(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var I=t.stateNode;I===null&&(I=t.stateNode=new vll),e.forEach(function(l){var n=kll.bind(null,t,l);I.has(l)||(I.add(l),l.then(n,n))})}}function F0(t,e){var I=e.deletions;if(I!==null)for(var l=0;ln&&(n=c),l&=~a}if(l=n,l=as()-l,l=(120>l?120:480>l?480:1080>l?1080:1920>l?1920:3e3>l?3e3:4320>l?4320:1960*Hll(l/1960))-l,10t?16:t,DQ===null)var l=!1;else{if(t=DQ,DQ=null,yue=0,cn&6)throw Error(et(331));var n=cn;for(cn|=4,kt=t.current;kt!==null;){var a=kt,c=a.child;if(kt.flags&16){var r=a.deletions;if(r!==null){for(var s=0;sas()-uje?R5(t,0):dje|=I),am(t,e)}function b1t(t,e){e===0&&(t.mode&1?(e=Lde,Lde<<=1,!(Lde&130023424)&&(Lde=4194304)):e=1);var I=ab();t=Hg(t,e),t!==null&&(bq(t,e,I),am(t,I))}function Lll(t){var e=t.memoizedState,I=0;e!==null&&(I=e.retryLane),b1t(t,I)}function kll(t,e){var I=0;switch(t.tag){case 13:var l=t.stateNode,n=t.memoizedState;n!==null&&(I=n.retryLane);break;case 19:l=t.stateNode;break;default:throw Error(et(314))}l!==null&&l.delete(e),b1t(t,I)}var m1t;m1t=function(t,e,I){if(t!==null)if(t.memoizedProps!==e.pendingProps||lm.current)Im=!0;else{if(!(t.lanes&I)&&!(e.flags&128))return Im=!1,Fll(t,e,I);Im=!!(t.flags&131072)}else Im=!1,wc&&e.flags&1048576&&WEt(e,Nue,e.index);switch(e.lanes=0,e.tag){case 2:var l=e.type;nue(t,e),t=e.pendingProps;var n=UU(e,AG.current);kU(e,I),n=cje(null,e,l,t,n,I);var a=rje();return e.flags|=1,typeof n=="object"&&n!==null&&typeof n.render=="function"&&n.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,nm(l)?(a=!0,hue(e)):a=!1,e.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,tje(e),n.updater=xue,e.stateNode=n,n._reactInternals=e,p3e(e,l,t,I),e=N3e(null,e,l,!0,a,I)):(e.tag=0,wc&&a&&_3e(e),nb(null,e,n,I),e=e.child),e;case 16:l=e.elementType;e:{switch(nue(t,e),t=e.pendingProps,n=l._init,l=n(l._payload),e.type=l,n=e.tag=jll(l),t=X0(l,t),n){case 0:e=W3e(null,e,l,t,I);break e;case 1:e=ift(null,e,l,t,I);break e;case 11:e=sft(null,e,l,t,I);break e;case 14:e=oft(null,e,l,X0(l.type,t),I);break e}throw Error(et(306,l,""))}return e;case 0:return l=e.type,n=e.pendingProps,n=e.elementType===l?n:X0(l,n),W3e(t,e,l,n,I);case 1:return l=e.type,n=e.pendingProps,n=e.elementType===l?n:X0(l,n),ift(t,e,l,n,I);case 3:e:{if(PEt(e),t===null)throw Error(et(387));l=e.pendingProps,a=e.memoizedState,n=a.element,FEt(t,e),Rue(e,l,null,I);var c=e.memoizedState;if(l=c.element,a.isDehydrated)if(a={element:l,isDehydrated:!1,cache:c.cache,pendingSuspenseBoundaries:c.pendingSuspenseBoundaries,transitions:c.transitions},e.updateQueue.baseState=a,e.memoizedState=a,e.flags&256){n=MU(Error(et(423)),e),e=Gft(t,e,l,I,n);break e}else if(l!==n){n=MU(Error(et(424)),e),e=Gft(t,e,l,I,n);break e}else for(RZ=ef(e.stateNode.containerInfo.firstChild),AZ=e,wc=!0,v0=null,I=REt(e,null,l,I),e.child=I;I;)I.flags=I.flags&-3|4096,I=I.sibling;else{if(OU(),l===n){e=Qg(t,e,I);break e}nb(t,e,l,I)}e=e.child}return e;case 5:return XEt(e),t===null&&b3e(e),l=e.type,n=e.pendingProps,a=t!==null?t.memoizedProps:null,c=n.children,o3e(l,n)?c=null:a!==null&&o3e(l,a)&&(e.flags|=32),qEt(t,e),nb(t,e,c,I),e.child;case 6:return t===null&&b3e(e),null;case 13:return $Et(t,e,I);case 4:return Ije(e,e.stateNode.containerInfo),l=e.pendingProps,t===null?e.child=zU(e,null,l,I):nb(t,e,l,I),e.child;case 11:return l=e.type,n=e.pendingProps,n=e.elementType===l?n:X0(l,n),sft(t,e,l,n,I);case 7:return nb(t,e,e.pendingProps,I),e.child;case 8:return nb(t,e,e.pendingProps.children,I),e.child;case 12:return nb(t,e,e.pendingProps.children,I),e.child;case 10:e:{if(l=e.type._context,n=e.pendingProps,a=e.memoizedProps,c=n.value,ga(Vue,l._currentValue),l._currentValue=c,a!==null)if(H0(a.value,c)){if(a.children===n.children&&!lm.current){e=Qg(t,e,I);break e}}else for(a=e.child,a!==null&&(a.return=e);a!==null;){var r=a.dependencies;if(r!==null){c=a.child;for(var s=r.firstContext;s!==null;){if(s.context===l){if(a.tag===1){s=vg(-1,I&-I),s.tag=2;var i=a.updateQueue;if(i!==null){i=i.shared;var G=i.pending;G===null?s.next=s:(s.next=G.next,G.next=s),i.pending=s}}a.lanes|=I,s=a.alternate,s!==null&&(s.lanes|=I),m3e(a.return,I,e),r.lanes|=I;break}s=s.next}}else if(a.tag===10)c=a.type===e.type?null:a.child;else if(a.tag===18){if(c=a.return,c===null)throw Error(et(341));c.lanes|=I,r=c.alternate,r!==null&&(r.lanes|=I),m3e(c,I,e),c=a.sibling}else c=a.child;if(c!==null)c.return=a;else for(c=a;c!==null;){if(c===e){c=null;break}if(a=c.sibling,a!==null){a.return=c.return,c=a;break}c=c.return}a=c}nb(t,e,n.children,I),e=e.child}return e;case 9:return n=e.type,l=e.pendingProps.children,kU(e,I),n=Gh(n),l=l(n),e.flags|=1,nb(t,e,l,I),e.child;case 14:return l=e.type,n=X0(l,e.pendingProps),n=X0(l.type,n),oft(t,e,l,n,I);case 15:return KEt(t,e,e.type,e.pendingProps,I);case 17:return l=e.type,n=e.pendingProps,n=e.elementType===l?n:X0(l,n),nue(t,e),e.tag=1,nm(l)?(t=!0,hue(e)):t=!1,kU(e,I),SEt(e,l,n),p3e(e,l,n,I),N3e(null,e,l,!0,t,I);case 19:return e1t(t,e,I);case 22:return DEt(t,e,I)}throw Error(et(156,e.tag))};function Z1t(t,e){return zft(t,e)}function xll(t,e,I,l){this.tag=t,this.key=I,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function oh(t,e,I,l){return new xll(t,e,I,l)}function pje(t){return t=t.prototype,!(!t||!t.isReactComponent)}function jll(t){if(typeof t=="function")return pje(t)?1:0;if(t!=null){if(t=t.$$typeof,t===C3e)return 11;if(t===L3e)return 14}return 2}function nf(t,e){var I=t.alternate;return I===null?(I=oh(t.tag,e,t.key,t.mode),I.elementType=t.elementType,I.type=t.type,I.stateNode=t.stateNode,I.alternate=t,t.alternate=I):(I.pendingProps=e,I.type=t.type,I.flags=0,I.subtreeFlags=0,I.deletions=null),I.flags=t.flags&14680064,I.childLanes=t.childLanes,I.lanes=t.lanes,I.child=t.child,I.memoizedProps=t.memoizedProps,I.memoizedState=t.memoizedState,I.updateQueue=t.updateQueue,e=t.dependencies,I.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},I.sibling=t.sibling,I.index=t.index,I.ref=t.ref,I}function rue(t,e,I,l,n,a){var c=2;if(l=t,typeof t=="function")pje(t)&&(c=1);else if(typeof t=="string")c=5;else e:switch(t){case RU:return A5(I.children,n,a,e);case J3e:c=8,n|=8;break;case Uxe:return t=oh(12,I,e,n|2),t.elementType=Uxe,t.lanes=a,t;case Oxe:return t=oh(13,I,e,n),t.elementType=Oxe,t.lanes=a,t;case zxe:return t=oh(19,I,e,n),t.elementType=zxe,t.lanes=a,t;case Xft:return Oue(I,n,a,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Aft:c=10;break e;case Fft:c=9;break e;case C3e:c=11;break e;case L3e:c=14;break e;case MQ:c=16,l=null;break e}throw Error(et(130,t==null?t:typeof t,""))}return e=oh(c,I,e,n),e.elementType=t,e.type=l,e.lanes=a,e}function A5(t,e,I,l){return t=oh(7,t,l,e),t.lanes=I,t}function Oue(t,e,I,l){return t=oh(22,t,l,e),t.elementType=Xft,t.lanes=I,t.stateNode={isHidden:!1},t}function kxe(t,e,I){return t=oh(6,t,null,e),t.lanes=I,t}function xxe(t,e,I){return e=oh(4,t.children!==null?t.children:[],t.key,e),e.lanes=I,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function Ull(t,e,I,l,n){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Yxe(0),this.expirationTimes=Yxe(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Yxe(0),this.identifierPrefix=l,this.onRecoverableError=n,this.mutableSourceEagerHydrationData=null}function hje(t,e,I,l,n,a,c,r,s){return t=new Ull(t,e,I,r,s),e===1?(e=1,a===!0&&(e|=8)):e=0,a=oh(3,null,null,e),t.current=a,a.stateNode=t,a.memoizedState={element:l,isDehydrated:I,cache:null,transitions:null,pendingSuspenseBoundaries:null},tje(a),t}function Oll(t,e,I){var l=3{"use strict";o();function V1t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(V1t)}catch(t){console.error(t)}}V1t(),Y1t.exports=N1t()});var uh=Y(Yje=>{"use strict";o();var R1t=hq();Yje.createRoot=R1t.createRoot,Yje.hydrateRoot=R1t.hydrateRoot;var Yrc});var y1t=Y(Nq=>{"use strict";o();Object.defineProperty(Nq,"__esModule",{value:!0});Nq.default=void 0;var Tll=Object.assign||function(t){for(var e=1;e{o();function wje(t,e,I){var l,n,a,c,r;e==null&&(e=100);function s(){var G=Date.now()-c;G=0?l=setTimeout(s,e-G):(l=null,I||(r=t.apply(a,n),a=n=null))}var i=function(){a=this,n=arguments,c=Date.now();var G=I&&!l;return l||(l=setTimeout(s,e)),G&&(r=t.apply(a,n),a=n=null),r};return i.clear=function(){l&&(clearTimeout(l),l=null)},i.flush=function(){l&&(r=t.apply(a,n),a=n=null,clearTimeout(l),l=null)},i}wje.debounce=wje;C1t.exports=wje});var U1t=Y(J5=>{"use strict";o();function x1t(t){return t&&typeof t=="object"&&"default"in t?t.default:t}Object.defineProperty(J5,"__esModule",{value:!0});var anl=x1t(L1t()),cnl=x1t(require("util"));function Hi(){Hi=function(){return t};var t={},e=Object.prototype,I=e.hasOwnProperty,l=Object.defineProperty||function(k,U,T){k[U]=T.value},n=typeof Symbol=="function"?Symbol:{},a=n.iterator||"@@iterator",c=n.asyncIterator||"@@asyncIterator",r=n.toStringTag||"@@toStringTag";function s(k,U,T){return Object.defineProperty(k,U,{value:T,enumerable:!0,configurable:!0,writable:!0}),k[U]}try{s({},"")}catch{s=function(U,T,q){return U[T]=q}}function i(k,U,T,q){var _=Object.create((U&&U.prototype instanceof u?U:u).prototype),$=new H(q||[]);return l(_,"_invoke",{value:F(k,T,$)}),_}function G(k,U,T){try{return{type:"normal",arg:k.call(U,T)}}catch(q){return{type:"throw",arg:q}}}t.wrap=i;var d={};function u(){}function b(){}function Z(){}var p={};s(p,a,function(){return this});var W=Object.getPrototypeOf,h=W&&W(W(f([])));h&&h!==e&&I.call(h,a)&&(p=h);var N=Z.prototype=u.prototype=Object.create(p);function V(k){["next","throw","return"].forEach(function(U){s(k,U,function(T){return this._invoke(U,T)})})}function R(k,U){var T;l(this,"_invoke",{value:function(q,_){function $(){return new U(function(ee,se){(function Ae(Ve,ct,Xe,_t){var Pt=G(k[Ve],k,ct);if(Pt.type!=="throw"){var S=Pt.arg,j=S.value;return j&&typeof j=="object"&&I.call(j,"__await")?U.resolve(j.__await).then(function(Ne){Ae("next",Ne,Xe,_t)},function(Ne){Ae("throw",Ne,Xe,_t)}):U.resolve(j).then(function(Ne){S.value=Ne,Xe(S)},function(Ne){return Ae("throw",Ne,Xe,_t)})}_t(Pt.arg)})(q,_,ee,se)})}return T=T?T.then($,$):$()}})}function F(k,U,T){var q="suspendedStart";return function(_,$){if(q==="executing")throw new Error("Generator is already running");if(q==="completed"){if(_==="throw")throw $;return{value:void 0,done:!0}}for(T.method=_,T.arg=$;;){var ee=T.delegate;if(ee){var se=v(ee,T);if(se){if(se===d)continue;return se}}if(T.method==="next")T.sent=T._sent=T.arg;else if(T.method==="throw"){if(q==="suspendedStart")throw q="completed",T.arg;T.dispatchException(T.arg)}else T.method==="return"&&T.abrupt("return",T.arg);q="executing";var Ae=G(k,U,T);if(Ae.type==="normal"){if(q=T.done?"completed":"suspendedYield",Ae.arg===d)continue;return{value:Ae.arg,done:T.done}}Ae.type==="throw"&&(q="completed",T.method="throw",T.arg=Ae.arg)}}}function v(k,U){var T=U.method,q=k.iterator[T];if(q===void 0)return U.delegate=null,T==="throw"&&k.iterator.return&&(U.method="return",U.arg=void 0,v(k,U),U.method==="throw")||T!=="return"&&(U.method="throw",U.arg=new TypeError("The iterator does not provide a '"+T+"' method")),d;var _=G(q,k.iterator,U.arg);if(_.type==="throw")return U.method="throw",U.arg=_.arg,U.delegate=null,d;var $=_.arg;return $?$.done?(U[k.resultName]=$.value,U.next=k.nextLoc,U.method!=="return"&&(U.method="next",U.arg=void 0),U.delegate=null,d):$:(U.method="throw",U.arg=new TypeError("iterator result is not an object"),U.delegate=null,d)}function y(k){var U={tryLoc:k[0]};1 in k&&(U.catchLoc=k[1]),2 in k&&(U.finallyLoc=k[2],U.afterLoc=k[3]),this.tryEntries.push(U)}function w(k){var U=k.completion||{};U.type="normal",delete U.arg,k.completion=U}function H(k){this.tryEntries=[{tryLoc:"root"}],k.forEach(y,this),this.reset(!0)}function f(k){if(k){var U=k[a];if(U)return U.call(k);if(typeof k.next=="function")return k;if(!isNaN(k.length)){var T=-1,q=function _(){for(;++T=0;--q){var _=this.tryEntries[q],$=_.completion;if(_.tryLoc==="root")return T("end");if(_.tryLoc<=this.prev){var ee=I.call(_,"catchLoc"),se=I.call(_,"finallyLoc");if(ee&&se){if(this.prev<_.catchLoc)return T(_.catchLoc,!0);if(this.prev<_.finallyLoc)return T(_.finallyLoc)}else if(ee){if(this.prev<_.catchLoc)return T(_.catchLoc,!0)}else{if(!se)throw new Error("try statement without catch or finally");if(this.prev<_.finallyLoc)return T(_.finallyLoc)}}}},abrupt:function(k,U){for(var T=this.tryEntries.length-1;T>=0;--T){var q=this.tryEntries[T];if(q.tryLoc<=this.prev&&I.call(q,"finallyLoc")&&this.prev=0;--U){var T=this.tryEntries[U];if(T.finallyLoc===k)return this.complete(T.completion,T.afterLoc),w(T),d}},catch:function(k){for(var U=this.tryEntries.length-1;U>=0;--U){var T=this.tryEntries[U];if(T.tryLoc===k){var q=T.completion;if(q.type==="throw"){var _=q.arg;w(T)}return _}}throw new Error("illegal catch attempt")},delegateYield:function(k,U,T){return this.delegate={iterator:f(k),resultName:U,nextLoc:T},this.method==="next"&&(this.arg=void 0),d}},t}function k1t(t,e,I,l,n,a,c){try{var r=t[a](c),s=r.value}catch(i){return void I(i)}r.done?e(s):Promise.resolve(s).then(l,n)}function uf(t){return function(){var e=this,I=arguments;return new Promise(function(l,n){var a=t.apply(e,I);function c(s){k1t(a,l,n,c,r,"next",s)}function r(s){k1t(a,l,n,c,r,"throw",s)}c(void 0)})}}function Hje(){return(Hje=Object.assign?Object.assign.bind():function(t){for(var e=1;ee.lifeTime&&(I={____timeOfCreation:I.____timeOfCreation})},r=function(){c();for(var s=arguments.length,i=new Array(s),G=0;G{"use strict";o();O1t.exports=U1t()});var M1t=Y((Rsc,Qje)=>{o();function B1t(t,e=100,I={}){if(typeof t!="function")throw new TypeError(`Expected the first parameter to be a function, got \`${typeof t}\`.`);if(e<0)throw new RangeError("`wait` must not be negative.");let{immediate:l}=typeof I=="boolean"?{immediate:I}:I,n,a,c,r,s;function i(){let u=n,b=a;return n=void 0,a=void 0,s=t.apply(u,b),s}function G(){let u=Date.now()-r;u=0?c=setTimeout(G,e-u):(c=void 0,l||(s=i()))}let d=function(...u){if(n&&this!==n&&Object.getPrototypeOf(this)===Object.getPrototypeOf(n))throw new Error("Debounced method called with different contexts of the same prototype.");n=this,a=u,r=Date.now();let b=l&&!c;return c||(c=setTimeout(G,e)),b&&(s=i()),s};return Object.defineProperty(d,"isPending",{get(){return c!==void 0}}),d.clear=()=>{c&&(clearTimeout(c),c=void 0)},d.flush=()=>{c&&d.trigger()},d.trigger=()=>{s=i(),d.clear()},d}Qje.exports.debounce=B1t;Qje.exports=B1t});var Kje=Y((wq,qU)=>{o();var pnl=200,mJt="__lodash_hash_undefined__",hnl=800,Wnl=16,ZJt=9007199254740991,pJt="[object Arguments]",Nnl="[object Array]",Vnl="[object AsyncFunction]",Ynl="[object Boolean]",Rnl="[object Date]",Anl="[object Error]",hJt="[object Function]",Fnl="[object GeneratorFunction]",Xnl="[object Map]",gnl="[object Number]",vnl="[object Null]",WJt="[object Object]",ynl="[object Proxy]",wnl="[object RegExp]",Hnl="[object Set]",Qnl="[object String]",fnl="[object Undefined]",Enl="[object WeakMap]",Jnl="[object ArrayBuffer]",Cnl="[object DataView]",Lnl="[object Float32Array]",knl="[object Float64Array]",xnl="[object Int8Array]",jnl="[object Int16Array]",Unl="[object Int32Array]",Onl="[object Uint8Array]",znl="[object Uint8ClampedArray]",Bnl="[object Uint16Array]",Mnl="[object Uint32Array]",Snl=/[\\^$.*+?()[\]{}|]/g,Tnl=/^\[object .+?Constructor\]$/,_nl=/^(?:0|[1-9]\d*)$/,oc={};oc[Lnl]=oc[knl]=oc[xnl]=oc[jnl]=oc[Unl]=oc[Onl]=oc[znl]=oc[Bnl]=oc[Mnl]=!0;oc[pJt]=oc[Nnl]=oc[Jnl]=oc[Ynl]=oc[Cnl]=oc[Rnl]=oc[Anl]=oc[hJt]=oc[Xnl]=oc[gnl]=oc[WJt]=oc[wnl]=oc[Hnl]=oc[Qnl]=oc[Enl]=!1;var NJt=typeof global=="object"&&global&&global.Object===Object&&global,Knl=typeof self=="object"&&self&&self.Object===Object&&self,fq=NJt||Knl||Function("return this")(),VJt=typeof wq=="object"&&wq&&!wq.nodeType&&wq,Hq=VJt&&typeof qU=="object"&&qU&&!qU.nodeType&&qU,YJt=Hq&&Hq.exports===VJt,xje=YJt&&NJt.process,cJt=function(){try{var t=Hq&&Hq.require&&Hq.require("util").types;return t||xje&&xje.binding&&xje.binding("util")}catch{}}(),rJt=cJt&&cJt.isTypedArray;function Dnl(t,e,I){switch(I.length){case 0:return t.call(e);case 1:return t.call(e,I[0]);case 2:return t.call(e,I[0],I[1]);case 3:return t.call(e,I[0],I[1],I[2])}return t.apply(e,I)}function qnl(t,e){for(var I=-1,l=Array(t);++I-1}function Wal(t,e){var I=this.__data__,l=Ibe(I,t);return l<0?(++this.size,I.push([t,e])):I[l][1]=e,this}Cg.prototype.clear=mal;Cg.prototype.delete=Zal;Cg.prototype.get=pal;Cg.prototype.has=hal;Cg.prototype.set=Wal;function PU(t){var e=-1,I=t==null?0:t.length;for(this.clear();++e1?I[n-1]:void 0,c=n>2?I[2]:void 0;for(a=t.length>3&&typeof a=="function"?(n--,a):void 0,c&&_al(I[0],I[1],c)&&(a=n<3?void 0:a,n=1),e=Object(e);++l-1&&t%1==0&&t0){if(++e>=hnl)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Icl(t){if(t!=null){try{return tbe.call(t)}catch{}try{return t+""}catch{}}return""}function abe(t,e){return t===e||t!==t&&e!==e}var zje=bJt(function(){return arguments}())?bJt:function(t){return Eq(t)&&Jg.call(t,"callee")&&!aal.call(t,"callee")},Bje=Array.isArray;function Tje(t){return t!=null&&wJt(t.length)&&!_je(t)}function lcl(t){return Eq(t)&&Tje(t)}var yJt=ral||scl;function _je(t){if(!j5(t))return!1;var e=lbe(t);return e==hJt||e==Fnl||e==Vnl||e==ynl}function wJt(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=ZJt}function j5(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function Eq(t){return t!=null&&typeof t=="object"}function ncl(t){if(!Eq(t)||lbe(t)!=WJt)return!1;var e=AJt(t);if(e===null)return!0;var I=Jg.call(e,"constructor")&&e.constructor;return typeof I=="function"&&I instanceof I&&tbe.call(I)==lal}var HJt=rJt?Pnl(rJt):Eal;function acl(t){return zal(t,QJt(t))}function QJt(t){return Tje(t)?wal(t,!0):Jal(t)}var ccl=Bal(function(t,e,I){XJt(t,e,I)});function rcl(t){return function(){return t}}function fJt(t){return t}function scl(){return!1}qU.exports=ccl});var rbe=Y((Zic,jJt)=>{o();var dcl=[EvalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError].filter(t=>typeof t=="function");function xJt(t){for(let e of dcl)if(t instanceof e)throw t}jJt.exports=function(e,I){return e.then(l=>l instanceof Error?(xJt(l),[l]):[void 0,l]).catch(l=>(xJt(l),[l])).finally(()=>{I&&typeof I=="function"&&I()})}});var DJt=Y((eGc,ucl)=>{ucl.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 PJt=Y((tGc,qJt)=>{o();qJt.exports=DJt()});var Lq=Y(cm=>{"use strict";o();var obe=PJt(),bcl=Qn().extname,$Jt=/^\s*([^;\s]*)(?:;|\s|$)/,mcl=/^text\//i;cm.charset=eCt;cm.charsets={lookup:eCt};cm.contentType=Zcl;cm.extension=pcl;cm.extensions=Object.create(null);cm.lookup=hcl;cm.types=Object.create(null);Wcl(cm.extensions,cm.types);function eCt(t){if(!t||typeof t!="string")return!1;var e=$Jt.exec(t),I=e&&obe[e[1].toLowerCase()];return I&&I.charset?I.charset:e&&mcl.test(e[1])?"UTF-8":!1}function Zcl(t){if(!t||typeof t!="string")return!1;var e=t.indexOf("/")===-1?cm.lookup(t):t;if(!e)return!1;if(e.indexOf("charset")===-1){var I=cm.charset(e);I&&(e+="; charset="+I.toLowerCase())}return e}function pcl(t){if(!t||typeof t!="string")return!1;var e=$Jt.exec(t),I=e&&cm.extensions[e[1].toLowerCase()];return!I||!I.length?!1:I[0]}function hcl(t){if(!t||typeof t!="string")return!1;var e=bcl("x."+t).toLowerCase().substr(1);return e&&cm.types[e]||!1}function Wcl(t,e){var I=["nginx","apache",void 0,"iana"];Object.keys(obe).forEach(function(n){var a=obe[n],c=a.extensions;if(!(!c||!c.length)){t[n]=c;for(var r=0;rG||i===G&&e[s].substr(0,12)==="application/"))continue}e[s]=n}}})}});var w5t=Y(Hbe=>{o();var hil=/~/,Wil=/~[01]/g;function Nil(t){switch(t){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+t)}function g5t(t){return hil.test(t)?t.replace(Wil,Nil):t}function Vil(t,e,I){for(var l,n,a=1,c=e.length;aa,typeof t[l]>"u"&&(Array.isArray(t)&&l==="-"&&(l=t.length),n&&(e[a]!==""&&e[a]<1/0||e[a]==="-"?t[l]=[]:t[l]={})),!n)break;t=t[l]}var r=t[l];return I===void 0?delete t[l]:t[l]=I,r}function ZUe(t){if(typeof t=="string"){if(t=t.split("/"),t[0]==="")return t;throw new Error("Invalid JSON pointer.")}else if(Array.isArray(t)){for(let e of t)if(typeof e!="string"&&typeof e!="number")throw new Error("Invalid JSON pointer. Must be of type string or number.");return t}throw new Error("Invalid JSON pointer.")}function v5t(t,e){if(typeof t!="object")throw new Error("Invalid input object.");e=ZUe(e);var I=e.length;if(I===1)return t;for(var l=1;l{o();function Mul(){this.__data__=[],this.size=0}Ikt.exports=Mul});var T5=Y((QXc,nkt)=>{o();function Sul(t,e){return t===e||t!==t&&e!==e}nkt.exports=Sul});var Kq=Y((EXc,akt)=>{o();var Tul=T5();function _ul(t,e){for(var I=t.length;I--;)if(Tul(t[I][0],e))return I;return-1}akt.exports=_ul});var rkt=Y((CXc,ckt)=>{o();var Kul=Kq(),Dul=Array.prototype,qul=Dul.splice;function Pul(t){var e=this.__data__,I=Kul(e,t);if(I<0)return!1;var l=e.length-1;return I==l?e.pop():qul.call(e,I,1),--this.size,!0}ckt.exports=Pul});var okt=Y((kXc,skt)=>{o();var $ul=Kq();function ebl(t){var e=this.__data__,I=$ul(e,t);return I<0?void 0:e[I][1]}skt.exports=ebl});var Gkt=Y((jXc,ikt)=>{o();var tbl=Kq();function Ibl(t){return tbl(this.__data__,t)>-1}ikt.exports=Ibl});var ukt=Y((OXc,dkt)=>{o();var lbl=Kq();function nbl(t,e){var I=this.__data__,l=lbl(I,t);return l<0?(++this.size,I.push([t,e])):I[l][1]=e,this}dkt.exports=nbl});var Dq=Y((BXc,bkt)=>{o();var abl=lkt(),cbl=rkt(),rbl=okt(),sbl=Gkt(),obl=ukt();function k9(t){var e=-1,I=t==null?0:t.length;for(this.clear();++e{o();var ibl=Dq();function Gbl(){this.__data__=new ibl,this.size=0}mkt.exports=Gbl});var hkt=Y((_Xc,pkt)=>{o();function dbl(t){var e=this.__data__,I=e.delete(t);return this.size=e.size,I}pkt.exports=dbl});var Nkt=Y((DXc,Wkt)=>{o();function ubl(t){return this.__data__.get(t)}Wkt.exports=ubl});var Ykt=Y((PXc,Vkt)=>{o();function bbl(t){return this.__data__.has(t)}Vkt.exports=bbl});var hUe=Y((egc,Rkt)=>{o();var mbl=typeof global=="object"&&global&&global.Object===Object&&global;Rkt.exports=mbl});var C0=Y((Igc,Akt)=>{o();var Zbl=hUe(),pbl=typeof self=="object"&&self&&self.Object===Object&&self,hbl=Zbl||pbl||Function("return this")();Akt.exports=hbl});var _5=Y((ngc,Fkt)=>{o();var Wbl=C0(),Nbl=Wbl.Symbol;Fkt.exports=Nbl});var ykt=Y((cgc,vkt)=>{o();var Xkt=_5(),gkt=Object.prototype,Vbl=gkt.hasOwnProperty,Ybl=gkt.toString,qq=Xkt?Xkt.toStringTag:void 0;function Rbl(t){var e=Vbl.call(t,qq),I=t[qq];try{t[qq]=void 0;var l=!0}catch{}var n=Ybl.call(t);return l&&(e?t[qq]=I:delete t[qq]),n}vkt.exports=Rbl});var Hkt=Y((sgc,wkt)=>{o();var Abl=Object.prototype,Fbl=Abl.toString;function Xbl(t){return Fbl.call(t)}wkt.exports=Xbl});var Lf=Y((igc,Ekt)=>{o();var Qkt=_5(),gbl=ykt(),vbl=Hkt(),ybl="[object Null]",wbl="[object Undefined]",fkt=Qkt?Qkt.toStringTag:void 0;function Hbl(t){return t==null?t===void 0?wbl:ybl:fkt&&fkt in Object(t)?gbl(t):vbl(t)}Ekt.exports=Hbl});var L0=Y((dgc,Jkt)=>{o();function Qbl(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}Jkt.exports=Qbl});var lme=Y((bgc,Ckt)=>{o();var fbl=Lf(),Ebl=L0(),Jbl="[object AsyncFunction]",Cbl="[object Function]",Lbl="[object GeneratorFunction]",kbl="[object Proxy]";function xbl(t){if(!Ebl(t))return!1;var e=fbl(t);return e==Cbl||e==Lbl||e==Jbl||e==kbl}Ckt.exports=xbl});var kkt=Y((Zgc,Lkt)=>{o();var jbl=C0(),Ubl=jbl["__core-js_shared__"];Lkt.exports=Ubl});var Ukt=Y((hgc,jkt)=>{o();var WUe=kkt(),xkt=function(){var t=/[^.]+$/.exec(WUe&&WUe.keys&&WUe.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Obl(t){return!!xkt&&xkt in t}jkt.exports=Obl});var NUe=Y((Ngc,Okt)=>{o();var zbl=Function.prototype,Bbl=zbl.toString;function Mbl(t){if(t!=null){try{return Bbl.call(t)}catch{}try{return t+""}catch{}}return""}Okt.exports=Mbl});var Bkt=Y((Ygc,zkt)=>{o();var Sbl=lme(),Tbl=Ukt(),_bl=L0(),Kbl=NUe(),Dbl=/[\\^$.*+?()[\]{}|]/g,qbl=/^\[object .+?Constructor\]$/,Pbl=Function.prototype,$bl=Object.prototype,eml=Pbl.toString,tml=$bl.hasOwnProperty,Iml=RegExp("^"+eml.call(tml).replace(Dbl,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function lml(t){if(!_bl(t)||Tbl(t))return!1;var e=Sbl(t)?Iml:qbl;return e.test(Kbl(t))}zkt.exports=lml});var Skt=Y((Agc,Mkt)=>{o();function nml(t,e){return t?.[e]}Mkt.exports=nml});var kf=Y((Xgc,Tkt)=>{o();var aml=Bkt(),cml=Skt();function rml(t,e){var I=cml(t,e);return aml(I)?I:void 0}Tkt.exports=rml});var nme=Y((vgc,_kt)=>{o();var sml=kf(),oml=C0(),iml=sml(oml,"Map");_kt.exports=iml});var Pq=Y((wgc,Kkt)=>{o();var Gml=kf(),dml=Gml(Object,"create");Kkt.exports=dml});var Pkt=Y((Qgc,qkt)=>{o();var Dkt=Pq();function uml(){this.__data__=Dkt?Dkt(null):{},this.size=0}qkt.exports=uml});var e4t=Y((Egc,$kt)=>{o();function bml(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}$kt.exports=bml});var I4t=Y((Cgc,t4t)=>{o();var mml=Pq(),Zml="__lodash_hash_undefined__",pml=Object.prototype,hml=pml.hasOwnProperty;function Wml(t){var e=this.__data__;if(mml){var I=e[t];return I===Zml?void 0:I}return hml.call(e,t)?e[t]:void 0}t4t.exports=Wml});var n4t=Y((kgc,l4t)=>{o();var Nml=Pq(),Vml=Object.prototype,Yml=Vml.hasOwnProperty;function Rml(t){var e=this.__data__;return Nml?e[t]!==void 0:Yml.call(e,t)}l4t.exports=Rml});var c4t=Y((jgc,a4t)=>{o();var Aml=Pq(),Fml="__lodash_hash_undefined__";function Xml(t,e){var I=this.__data__;return this.size+=this.has(t)?0:1,I[t]=Aml&&e===void 0?Fml:e,this}a4t.exports=Xml});var s4t=Y((Ogc,r4t)=>{o();var gml=Pkt(),vml=e4t(),yml=I4t(),wml=n4t(),Hml=c4t();function x9(t){var e=-1,I=t==null?0:t.length;for(this.clear();++e{o();var o4t=s4t(),Qml=Dq(),fml=nme();function Eml(){this.size=0,this.__data__={hash:new o4t,map:new(fml||Qml),string:new o4t}}i4t.exports=Eml});var u4t=Y((Sgc,d4t)=>{o();function Jml(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}d4t.exports=Jml});var $q=Y((_gc,b4t)=>{o();var Cml=u4t();function Lml(t,e){var I=t.__data__;return Cml(e)?I[typeof e=="string"?"string":"hash"]:I.map}b4t.exports=Lml});var Z4t=Y((Dgc,m4t)=>{o();var kml=$q();function xml(t){var e=kml(this,t).delete(t);return this.size-=e?1:0,e}m4t.exports=xml});var h4t=Y((Pgc,p4t)=>{o();var jml=$q();function Uml(t){return jml(this,t).get(t)}p4t.exports=Uml});var N4t=Y((evc,W4t)=>{o();var Oml=$q();function zml(t){return Oml(this,t).has(t)}W4t.exports=zml});var Y4t=Y((Ivc,V4t)=>{o();var Bml=$q();function Mml(t,e){var I=Bml(this,t),l=I.size;return I.set(t,e),this.size+=I.size==l?0:1,this}V4t.exports=Mml});var ame=Y((nvc,R4t)=>{o();var Sml=G4t(),Tml=Z4t(),_ml=h4t(),Kml=N4t(),Dml=Y4t();function j9(t){var e=-1,I=t==null?0:t.length;for(this.clear();++e{o();var qml=Dq(),Pml=nme(),$ml=ame(),eZl=200;function tZl(t,e){var I=this.__data__;if(I instanceof qml){var l=I.__data__;if(!Pml||l.length{o();var IZl=Dq(),lZl=Zkt(),nZl=hkt(),aZl=Nkt(),cZl=Ykt(),rZl=F4t();function U9(t){var e=this.__data__=new IZl(t);this.size=e.size}U9.prototype.clear=lZl;U9.prototype.delete=nZl;U9.prototype.get=aZl;U9.prototype.has=cZl;U9.prototype.set=rZl;X4t.exports=U9});var VUe=Y((ivc,g4t)=>{o();function sZl(t,e){for(var I=-1,l=t==null?0:t.length;++I{o();var oZl=kf(),iZl=function(){try{var t=oZl(Object,"defineProperty");return t({},"",{}),t}catch{}}();v4t.exports=iZl});var cme=Y((bvc,w4t)=>{o();var y4t=YUe();function GZl(t,e,I){e=="__proto__"&&y4t?y4t(t,e,{configurable:!0,enumerable:!0,value:I,writable:!0}):t[e]=I}w4t.exports=GZl});var RUe=Y((Zvc,H4t)=>{o();var dZl=cme(),uZl=T5(),bZl=Object.prototype,mZl=bZl.hasOwnProperty;function ZZl(t,e,I){var l=t[e];(!(mZl.call(t,e)&&uZl(l,I))||I===void 0&&!(e in t))&&dZl(t,e,I)}H4t.exports=ZZl});var O9=Y((hvc,Q4t)=>{o();var pZl=RUe(),hZl=cme();function WZl(t,e,I,l){var n=!I;I||(I={});for(var a=-1,c=e.length;++a{o();function NZl(t,e){for(var I=-1,l=Array(t);++I{o();function VZl(t){return t!=null&&typeof t=="object"}J4t.exports=VZl});var L4t=Y((Avc,C4t)=>{o();var YZl=Lf(),RZl=k0(),AZl="[object Arguments]";function FZl(t){return RZl(t)&&YZl(t)==AZl}C4t.exports=FZl});var tP=Y((Xvc,j4t)=>{o();var k4t=L4t(),XZl=k0(),x4t=Object.prototype,gZl=x4t.hasOwnProperty,vZl=x4t.propertyIsEnumerable,yZl=k4t(function(){return arguments}())?k4t:function(t){return XZl(t)&&gZl.call(t,"callee")&&!vZl.call(t,"callee")};j4t.exports=yZl});var om=Y((vvc,U4t)=>{o();var wZl=Array.isArray;U4t.exports=wZl});var z4t=Y((wvc,O4t)=>{o();function HZl(){return!1}O4t.exports=HZl});var lP=Y((IP,z9)=>{o();var QZl=C0(),fZl=z4t(),S4t=typeof IP=="object"&&IP&&!IP.nodeType&&IP,B4t=S4t&&typeof z9=="object"&&z9&&!z9.nodeType&&z9,EZl=B4t&&B4t.exports===S4t,M4t=EZl?QZl.Buffer:void 0,JZl=M4t?M4t.isBuffer:void 0,CZl=JZl||fZl;z9.exports=CZl});var rme=Y((fvc,T4t)=>{o();var LZl=9007199254740991,kZl=/^(?:0|[1-9]\d*)$/;function xZl(t,e){var I=typeof t;return e=e??LZl,!!e&&(I=="number"||I!="symbol"&&kZl.test(t))&&t>-1&&t%1==0&&t{o();var jZl=9007199254740991;function UZl(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=jZl}_4t.exports=UZl});var D4t=Y((Lvc,K4t)=>{o();var OZl=Lf(),zZl=sme(),BZl=k0(),MZl="[object Arguments]",SZl="[object Array]",TZl="[object Boolean]",_Zl="[object Date]",KZl="[object Error]",DZl="[object Function]",qZl="[object Map]",PZl="[object Number]",$Zl="[object Object]",epl="[object RegExp]",tpl="[object Set]",Ipl="[object String]",lpl="[object WeakMap]",npl="[object ArrayBuffer]",apl="[object DataView]",cpl="[object Float32Array]",rpl="[object Float64Array]",spl="[object Int8Array]",opl="[object Int16Array]",ipl="[object Int32Array]",Gpl="[object Uint8Array]",dpl="[object Uint8ClampedArray]",upl="[object Uint16Array]",bpl="[object Uint32Array]",Gc={};Gc[cpl]=Gc[rpl]=Gc[spl]=Gc[opl]=Gc[ipl]=Gc[Gpl]=Gc[dpl]=Gc[upl]=Gc[bpl]=!0;Gc[MZl]=Gc[SZl]=Gc[npl]=Gc[TZl]=Gc[apl]=Gc[_Zl]=Gc[KZl]=Gc[DZl]=Gc[qZl]=Gc[PZl]=Gc[$Zl]=Gc[epl]=Gc[tpl]=Gc[Ipl]=Gc[lpl]=!1;function mpl(t){return BZl(t)&&zZl(t.length)&&!!Gc[OZl(t)]}K4t.exports=mpl});var xf=Y((xvc,q4t)=>{o();function Zpl(t){return function(e){return t(e)}}q4t.exports=Zpl});var ome=Y((nP,B9)=>{o();var ppl=hUe(),P4t=typeof nP=="object"&&nP&&!nP.nodeType&&nP,aP=P4t&&typeof B9=="object"&&B9&&!B9.nodeType&&B9,hpl=aP&&aP.exports===P4t,AUe=hpl&&ppl.process,Wpl=function(){try{var t=aP&&aP.require&&aP.require("util").types;return t||AUe&&AUe.binding&&AUe.binding("util")}catch{}}();B9.exports=Wpl});var ime=Y((Ovc,txt)=>{o();var Npl=D4t(),Vpl=xf(),$4t=ome(),ext=$4t&&$4t.isTypedArray,Ypl=ext?Vpl(ext):Npl;txt.exports=Ypl});var FUe=Y((Bvc,Ixt)=>{o();var Rpl=E4t(),Apl=tP(),Fpl=om(),Xpl=lP(),gpl=rme(),vpl=ime(),ypl=Object.prototype,wpl=ypl.hasOwnProperty;function Hpl(t,e){var I=Fpl(t),l=!I&&Apl(t),n=!I&&!l&&Xpl(t),a=!I&&!l&&!n&&vpl(t),c=I||l||n||a,r=c?Rpl(t.length,String):[],s=r.length;for(var i in t)(e||wpl.call(t,i))&&!(c&&(i=="length"||n&&(i=="offset"||i=="parent")||a&&(i=="buffer"||i=="byteLength"||i=="byteOffset")||gpl(i,s)))&&r.push(i);return r}Ixt.exports=Hpl});var Gme=Y((Svc,lxt)=>{o();var Qpl=Object.prototype;function fpl(t){var e=t&&t.constructor,I=typeof e=="function"&&e.prototype||Qpl;return t===I}lxt.exports=fpl});var XUe=Y((_vc,nxt)=>{o();function Epl(t,e){return function(I){return t(e(I))}}nxt.exports=Epl});var cxt=Y((Dvc,axt)=>{o();var Jpl=XUe(),Cpl=Jpl(Object.keys,Object);axt.exports=Cpl});var sxt=Y((Pvc,rxt)=>{o();var Lpl=Gme(),kpl=cxt(),xpl=Object.prototype,jpl=xpl.hasOwnProperty;function Upl(t){if(!Lpl(t))return kpl(t);var e=[];for(var I in Object(t))jpl.call(t,I)&&I!="constructor"&&e.push(I);return e}rxt.exports=Upl});var K5=Y((eyc,oxt)=>{o();var Opl=lme(),zpl=sme();function Bpl(t){return t!=null&&zpl(t.length)&&!Opl(t)}oxt.exports=Bpl});var M9=Y((Iyc,ixt)=>{o();var Mpl=FUe(),Spl=sxt(),Tpl=K5();function _pl(t){return Tpl(t)?Mpl(t):Spl(t)}ixt.exports=_pl});var dxt=Y((nyc,Gxt)=>{o();var Kpl=O9(),Dpl=M9();function qpl(t,e){return t&&Kpl(e,Dpl(e),t)}Gxt.exports=qpl});var bxt=Y((cyc,uxt)=>{o();function Ppl(t){var e=[];if(t!=null)for(var I in Object(t))e.push(I);return e}uxt.exports=Ppl});var Zxt=Y((syc,mxt)=>{o();var $pl=L0(),ehl=Gme(),thl=bxt(),Ihl=Object.prototype,lhl=Ihl.hasOwnProperty;function nhl(t){if(!$pl(t))return thl(t);var e=ehl(t),I=[];for(var l in t)l=="constructor"&&(e||!lhl.call(t,l))||I.push(l);return I}mxt.exports=nhl});var D5=Y((iyc,pxt)=>{o();var ahl=FUe(),chl=Zxt(),rhl=K5();function shl(t){return rhl(t)?ahl(t,!0):chl(t)}pxt.exports=shl});var Wxt=Y((dyc,hxt)=>{o();var ohl=O9(),ihl=D5();function Ghl(t,e){return t&&ohl(e,ihl(e),t)}hxt.exports=Ghl});var gUe=Y((cP,S9)=>{o();var dhl=C0(),Rxt=typeof cP=="object"&&cP&&!cP.nodeType&&cP,Nxt=Rxt&&typeof S9=="object"&&S9&&!S9.nodeType&&S9,uhl=Nxt&&Nxt.exports===Rxt,Vxt=uhl?dhl.Buffer:void 0,Yxt=Vxt?Vxt.allocUnsafe:void 0;function bhl(t,e){if(e)return t.slice();var I=t.length,l=Yxt?Yxt(I):new t.constructor(I);return t.copy(l),l}S9.exports=bhl});var dme=Y((myc,Axt)=>{o();function mhl(t,e){var I=-1,l=t.length;for(e||(e=Array(l));++I{o();function Zhl(t,e){for(var I=-1,l=t==null?0:t.length,n=0,a=[];++I{o();function phl(){return[]}gxt.exports=phl});var ume=Y((Vyc,yxt)=>{o();var hhl=Xxt(),Whl=vUe(),Nhl=Object.prototype,Vhl=Nhl.propertyIsEnumerable,vxt=Object.getOwnPropertySymbols,Yhl=vxt?function(t){return t==null?[]:(t=Object(t),hhl(vxt(t),function(e){return Vhl.call(t,e)}))}:Whl;yxt.exports=Yhl});var Hxt=Y((Ryc,wxt)=>{o();var Rhl=O9(),Ahl=ume();function Fhl(t,e){return Rhl(t,Ahl(t),e)}wxt.exports=Fhl});var bme=Y((Fyc,Qxt)=>{o();function Xhl(t,e){for(var I=-1,l=e.length,n=t.length;++I{o();var ghl=XUe(),vhl=ghl(Object.getPrototypeOf,Object);fxt.exports=vhl});var yUe=Y((yyc,Ext)=>{o();var yhl=bme(),whl=mme(),Hhl=ume(),Qhl=vUe(),fhl=Object.getOwnPropertySymbols,Ehl=fhl?function(t){for(var e=[];t;)yhl(e,Hhl(t)),t=whl(t);return e}:Qhl;Ext.exports=Ehl});var Cxt=Y((Hyc,Jxt)=>{o();var Jhl=O9(),Chl=yUe();function Lhl(t,e){return Jhl(t,Chl(t),e)}Jxt.exports=Lhl});var wUe=Y((fyc,Lxt)=>{o();var khl=bme(),xhl=om();function jhl(t,e,I){var l=e(t);return xhl(t)?l:khl(l,I(t))}Lxt.exports=jhl});var HUe=Y((Jyc,kxt)=>{o();var Uhl=wUe(),Ohl=ume(),zhl=M9();function Bhl(t){return Uhl(t,zhl,Ohl)}kxt.exports=Bhl});var jxt=Y((Lyc,xxt)=>{o();var Mhl=wUe(),Shl=yUe(),Thl=D5();function _hl(t){return Mhl(t,Thl,Shl)}xxt.exports=_hl});var Oxt=Y((xyc,Uxt)=>{o();var Khl=kf(),Dhl=C0(),qhl=Khl(Dhl,"DataView");Uxt.exports=qhl});var Bxt=Y((Uyc,zxt)=>{o();var Phl=kf(),$hl=C0(),eWl=Phl($hl,"Promise");zxt.exports=eWl});var QUe=Y((zyc,Mxt)=>{o();var tWl=kf(),IWl=C0(),lWl=tWl(IWl,"Set");Mxt.exports=lWl});var Txt=Y((Myc,Sxt)=>{o();var nWl=kf(),aWl=C0(),cWl=nWl(aWl,"WeakMap");Sxt.exports=cWl});var rP=Y((Tyc,e3t)=>{o();var fUe=Oxt(),EUe=nme(),JUe=Bxt(),CUe=QUe(),LUe=Txt(),$xt=Lf(),T9=NUe(),_xt="[object Map]",rWl="[object Object]",Kxt="[object Promise]",Dxt="[object Set]",qxt="[object WeakMap]",Pxt="[object DataView]",sWl=T9(fUe),oWl=T9(EUe),iWl=T9(JUe),GWl=T9(CUe),dWl=T9(LUe),q5=$xt;(fUe&&q5(new fUe(new ArrayBuffer(1)))!=Pxt||EUe&&q5(new EUe)!=_xt||JUe&&q5(JUe.resolve())!=Kxt||CUe&&q5(new CUe)!=Dxt||LUe&&q5(new LUe)!=qxt)&&(q5=function(t){var e=$xt(t),I=e==rWl?t.constructor:void 0,l=I?T9(I):"";if(l)switch(l){case sWl:return Pxt;case oWl:return _xt;case iWl:return Kxt;case GWl:return Dxt;case dWl:return qxt}return e});e3t.exports=q5});var I3t=Y((Kyc,t3t)=>{o();var uWl=Object.prototype,bWl=uWl.hasOwnProperty;function mWl(t){var e=t.length,I=new t.constructor(e);return e&&typeof t[0]=="string"&&bWl.call(t,"index")&&(I.index=t.index,I.input=t.input),I}t3t.exports=mWl});var kUe=Y((qyc,l3t)=>{o();var ZWl=C0(),pWl=ZWl.Uint8Array;l3t.exports=pWl});var Zme=Y(($yc,a3t)=>{o();var n3t=kUe();function hWl(t){var e=new t.constructor(t.byteLength);return new n3t(e).set(new n3t(t)),e}a3t.exports=hWl});var r3t=Y((twc,c3t)=>{o();var WWl=Zme();function NWl(t,e){var I=e?WWl(t.buffer):t.buffer;return new t.constructor(I,t.byteOffset,t.byteLength)}c3t.exports=NWl});var o3t=Y((lwc,s3t)=>{o();var VWl=/\w*$/;function YWl(t){var e=new t.constructor(t.source,VWl.exec(t));return e.lastIndex=t.lastIndex,e}s3t.exports=YWl});var b3t=Y((awc,u3t)=>{o();var i3t=_5(),G3t=i3t?i3t.prototype:void 0,d3t=G3t?G3t.valueOf:void 0;function RWl(t){return d3t?Object(d3t.call(t)):{}}u3t.exports=RWl});var xUe=Y((rwc,m3t)=>{o();var AWl=Zme();function FWl(t,e){var I=e?AWl(t.buffer):t.buffer;return new t.constructor(I,t.byteOffset,t.length)}m3t.exports=FWl});var p3t=Y((owc,Z3t)=>{o();var XWl=Zme(),gWl=r3t(),vWl=o3t(),yWl=b3t(),wWl=xUe(),HWl="[object Boolean]",QWl="[object Date]",fWl="[object Map]",EWl="[object Number]",JWl="[object RegExp]",CWl="[object Set]",LWl="[object String]",kWl="[object Symbol]",xWl="[object ArrayBuffer]",jWl="[object DataView]",UWl="[object Float32Array]",OWl="[object Float64Array]",zWl="[object Int8Array]",BWl="[object Int16Array]",MWl="[object Int32Array]",SWl="[object Uint8Array]",TWl="[object Uint8ClampedArray]",_Wl="[object Uint16Array]",KWl="[object Uint32Array]";function DWl(t,e,I){var l=t.constructor;switch(e){case xWl:return XWl(t);case HWl:case QWl:return new l(+t);case jWl:return gWl(t,I);case UWl:case OWl:case zWl:case BWl:case MWl:case SWl:case TWl:case _Wl:case KWl:return wWl(t,I);case fWl:return new l;case EWl:case LWl:return new l(t);case JWl:return vWl(t);case CWl:return new l;case kWl:return yWl(t)}}Z3t.exports=DWl});var N3t=Y((Gwc,W3t)=>{o();var qWl=L0(),h3t=Object.create,PWl=function(){function t(){}return function(e){if(!qWl(e))return{};if(h3t)return h3t(e);t.prototype=e;var I=new t;return t.prototype=void 0,I}}();W3t.exports=PWl});var jUe=Y((uwc,V3t)=>{o();var $Wl=N3t(),eNl=mme(),tNl=Gme();function INl(t){return typeof t.constructor=="function"&&!tNl(t)?$Wl(eNl(t)):{}}V3t.exports=INl});var R3t=Y((mwc,Y3t)=>{o();var lNl=rP(),nNl=k0(),aNl="[object Map]";function cNl(t){return nNl(t)&&lNl(t)==aNl}Y3t.exports=cNl});var g3t=Y((pwc,X3t)=>{o();var rNl=R3t(),sNl=xf(),A3t=ome(),F3t=A3t&&A3t.isMap,oNl=F3t?sNl(F3t):rNl;X3t.exports=oNl});var y3t=Y((Wwc,v3t)=>{o();var iNl=rP(),GNl=k0(),dNl="[object Set]";function uNl(t){return GNl(t)&&iNl(t)==dNl}v3t.exports=uNl});var f3t=Y((Vwc,Q3t)=>{o();var bNl=y3t(),mNl=xf(),w3t=ome(),H3t=w3t&&w3t.isSet,ZNl=H3t?mNl(H3t):bNl;Q3t.exports=ZNl});var k3t=Y((Rwc,L3t)=>{o();var pNl=eP(),hNl=VUe(),WNl=RUe(),NNl=dxt(),VNl=Wxt(),YNl=gUe(),RNl=dme(),ANl=Hxt(),FNl=Cxt(),XNl=HUe(),gNl=jxt(),vNl=rP(),yNl=I3t(),wNl=p3t(),HNl=jUe(),QNl=om(),fNl=lP(),ENl=g3t(),JNl=L0(),CNl=f3t(),LNl=M9(),kNl=D5(),xNl=1,jNl=2,UNl=4,E3t="[object Arguments]",ONl="[object Array]",zNl="[object Boolean]",BNl="[object Date]",MNl="[object Error]",J3t="[object Function]",SNl="[object GeneratorFunction]",TNl="[object Map]",_Nl="[object Number]",C3t="[object Object]",KNl="[object RegExp]",DNl="[object Set]",qNl="[object String]",PNl="[object Symbol]",$Nl="[object WeakMap]",eVl="[object ArrayBuffer]",tVl="[object DataView]",IVl="[object Float32Array]",lVl="[object Float64Array]",nVl="[object Int8Array]",aVl="[object Int16Array]",cVl="[object Int32Array]",rVl="[object Uint8Array]",sVl="[object Uint8ClampedArray]",oVl="[object Uint16Array]",iVl="[object Uint32Array]",Qa={};Qa[E3t]=Qa[ONl]=Qa[eVl]=Qa[tVl]=Qa[zNl]=Qa[BNl]=Qa[IVl]=Qa[lVl]=Qa[nVl]=Qa[aVl]=Qa[cVl]=Qa[TNl]=Qa[_Nl]=Qa[C3t]=Qa[KNl]=Qa[DNl]=Qa[qNl]=Qa[PNl]=Qa[rVl]=Qa[sVl]=Qa[oVl]=Qa[iVl]=!0;Qa[MNl]=Qa[J3t]=Qa[$Nl]=!1;function pme(t,e,I,l,n,a){var c,r=e&xNl,s=e&jNl,i=e&UNl;if(I&&(c=n?I(t,l,n,a):I(t)),c!==void 0)return c;if(!JNl(t))return t;var G=QNl(t);if(G){if(c=yNl(t),!r)return RNl(t,c)}else{var d=vNl(t),u=d==J3t||d==SNl;if(fNl(t))return YNl(t,r);if(d==C3t||d==E3t||u&&!n){if(c=s||u?{}:HNl(t),!r)return s?FNl(t,VNl(c,t)):ANl(t,NNl(c,t))}else{if(!Qa[d])return n?t:{};c=wNl(t,d,r)}}a||(a=new pNl);var b=a.get(t);if(b)return b;a.set(t,c),CNl(t)?t.forEach(function(W){c.add(pme(W,e,I,W,t,a))}):ENl(t)&&t.forEach(function(W,h){c.set(h,pme(W,e,I,h,t,a))});var Z=i?s?gNl:XNl:s?kNl:LNl,p=G?void 0:Z(t);return hNl(p||t,function(W,h){p&&(h=W,W=t[h]),WNl(c,h,pme(W,e,I,h,t,a))}),c}L3t.exports=pme});var UUe=Y((Fwc,x3t)=>{o();var GVl=k3t(),dVl=1,uVl=4;function bVl(t){return GVl(t,dVl|uVl)}x3t.exports=bVl});var U3t=Y((gwc,j3t)=>{o();var mVl="__lodash_hash_undefined__";function ZVl(t){return this.__data__.set(t,mVl),this}j3t.exports=ZVl});var z3t=Y((ywc,O3t)=>{o();function pVl(t){return this.__data__.has(t)}O3t.exports=pVl});var sP=Y((Hwc,B3t)=>{o();var hVl=ame(),WVl=U3t(),NVl=z3t();function hme(t){var e=-1,I=t==null?0:t.length;for(this.__data__=new hVl;++e{o();function VVl(t,e){for(var I=-1,l=t==null?0:t.length;++I{o();function YVl(t,e){return t.has(e)}T3t.exports=YVl});var OUe=Y((Lwc,_3t)=>{o();var RVl=sP(),AVl=S3t(),FVl=oP(),XVl=1,gVl=2;function vVl(t,e,I,l,n,a){var c=I&XVl,r=t.length,s=e.length;if(r!=s&&!(c&&s>r))return!1;var i=a.get(t),G=a.get(e);if(i&&G)return i==e&&G==t;var d=-1,u=!0,b=I&gVl?new RVl:void 0;for(a.set(t,e),a.set(e,t);++d{o();function yVl(t){var e=-1,I=Array(t.size);return t.forEach(function(l,n){I[++e]=[n,l]}),I}K3t.exports=yVl});var Wme=Y((Uwc,q3t)=>{o();function wVl(t){var e=-1,I=Array(t.size);return t.forEach(function(l){I[++e]=l}),I}q3t.exports=wVl});var Ijt=Y((zwc,tjt)=>{o();var P3t=_5(),$3t=kUe(),HVl=T5(),QVl=OUe(),fVl=D3t(),EVl=Wme(),JVl=1,CVl=2,LVl="[object Boolean]",kVl="[object Date]",xVl="[object Error]",jVl="[object Map]",UVl="[object Number]",OVl="[object RegExp]",zVl="[object Set]",BVl="[object String]",MVl="[object Symbol]",SVl="[object ArrayBuffer]",TVl="[object DataView]",ejt=P3t?P3t.prototype:void 0,zUe=ejt?ejt.valueOf:void 0;function _Vl(t,e,I,l,n,a,c){switch(I){case TVl:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case SVl:return!(t.byteLength!=e.byteLength||!a(new $3t(t),new $3t(e)));case LVl:case kVl:case UVl:return HVl(+t,+e);case xVl:return t.name==e.name&&t.message==e.message;case OVl:case BVl:return t==e+"";case jVl:var r=fVl;case zVl:var s=l&JVl;if(r||(r=EVl),t.size!=e.size&&!s)return!1;var i=c.get(t);if(i)return i==e;l|=CVl,c.set(t,e);var G=QVl(r(t),r(e),l,n,a,c);return c.delete(t),G;case MVl:if(zUe)return zUe.call(t)==zUe.call(e)}return!1}tjt.exports=_Vl});var ajt=Y((Mwc,njt)=>{o();var ljt=HUe(),KVl=1,DVl=Object.prototype,qVl=DVl.hasOwnProperty;function PVl(t,e,I,l,n,a){var c=I&KVl,r=ljt(t),s=r.length,i=ljt(e),G=i.length;if(s!=G&&!c)return!1;for(var d=s;d--;){var u=r[d];if(!(c?u in e:qVl.call(e,u)))return!1}var b=a.get(t),Z=a.get(e);if(b&&Z)return b==e&&Z==t;var p=!0;a.set(t,e),a.set(e,t);for(var W=c;++d{o();var BUe=eP(),$Vl=OUe(),eYl=Ijt(),tYl=ajt(),cjt=rP(),rjt=om(),sjt=lP(),IYl=ime(),lYl=1,ojt="[object Arguments]",ijt="[object Array]",Nme="[object Object]",nYl=Object.prototype,Gjt=nYl.hasOwnProperty;function aYl(t,e,I,l,n,a){var c=rjt(t),r=rjt(e),s=c?ijt:cjt(t),i=r?ijt:cjt(e);s=s==ojt?Nme:s,i=i==ojt?Nme:i;var G=s==Nme,d=i==Nme,u=s==i;if(u&&sjt(t)){if(!sjt(e))return!1;c=!0,G=!1}if(u&&!G)return a||(a=new BUe),c||IYl(t)?$Vl(t,e,I,l,n,a):eYl(t,e,s,I,l,n,a);if(!(I&lYl)){var b=G&&Gjt.call(t,"__wrapped__"),Z=d&&Gjt.call(e,"__wrapped__");if(b||Z){var p=b?t.value():t,W=Z?e.value():e;return a||(a=new BUe),n(p,W,I,l,a)}}return u?(a||(a=new BUe),tYl(t,e,I,l,n,a)):!1}djt.exports=aYl});var Vme=Y((Kwc,Zjt)=>{o();var cYl=ujt(),bjt=k0();function mjt(t,e,I,l,n){return t===e?!0:t==null||e==null||!bjt(t)&&!bjt(e)?t!==t&&e!==e:cYl(t,e,I,l,mjt,n)}Zjt.exports=mjt});var MUe=Y((qwc,pjt)=>{o();var rYl=Vme();function sYl(t,e){return rYl(t,e)}pjt.exports=sYl});var Vjt=Y(($wc,Njt)=>{o();var hjt=_5(),oYl=tP(),iYl=om(),Wjt=hjt?hjt.isConcatSpreadable:void 0;function GYl(t){return iYl(t)||oYl(t)||!!(Wjt&&t&&t[Wjt])}Njt.exports=GYl});var Yme=Y((tHc,Rjt)=>{o();var dYl=bme(),uYl=Vjt();function Yjt(t,e,I,l,n){var a=-1,c=t.length;for(I||(I=uYl),n||(n=[]);++a0&&I(r)?e>1?Yjt(r,e-1,I,l,n):dYl(n,r):l||(n[n.length]=r)}return n}Rjt.exports=Yjt});var jf=Y((lHc,Ajt)=>{o();function bYl(t,e){for(var I=-1,l=t==null?0:t.length,n=Array(l);++I{o();var mYl=Lf(),ZYl=k0(),pYl="[object Symbol]";function hYl(t){return typeof t=="symbol"||ZYl(t)&&mYl(t)==pYl}Fjt.exports=hYl});var Rme=Y((rHc,Xjt)=>{o();var WYl=om(),NYl=iP(),VYl=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,YYl=/^\w*$/;function RYl(t,e){if(WYl(t))return!1;var I=typeof t;return I=="number"||I=="symbol"||I=="boolean"||t==null||NYl(t)?!0:YYl.test(t)||!VYl.test(t)||e!=null&&t in Object(e)}Xjt.exports=RYl});var yjt=Y((oHc,vjt)=>{o();var gjt=ame(),AYl="Expected a function";function SUe(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(AYl);var I=function(){var l=arguments,n=e?e.apply(this,l):l[0],a=I.cache;if(a.has(n))return a.get(n);var c=t.apply(this,l);return I.cache=a.set(n,c)||a,c};return I.cache=new(SUe.Cache||gjt),I}SUe.Cache=gjt;vjt.exports=SUe});var Hjt=Y((GHc,wjt)=>{o();var FYl=yjt(),XYl=500;function gYl(t){var e=FYl(t,function(l){return I.size===XYl&&I.clear(),l}),I=e.cache;return e}wjt.exports=gYl});var fjt=Y((uHc,Qjt)=>{o();var vYl=Hjt(),yYl=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,wYl=/\\(\\)?/g,HYl=vYl(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(yYl,function(I,l,n,a){e.push(n?a.replace(wYl,"$1"):l||I)}),e});Qjt.exports=HYl});var xjt=Y((mHc,kjt)=>{o();var Ejt=_5(),QYl=jf(),fYl=om(),EYl=iP(),JYl=1/0,Jjt=Ejt?Ejt.prototype:void 0,Cjt=Jjt?Jjt.toString:void 0;function Ljt(t){if(typeof t=="string")return t;if(fYl(t))return QYl(t,Ljt)+"";if(EYl(t))return Cjt?Cjt.call(t):"";var e=t+"";return e=="0"&&1/t==-JYl?"-0":e}kjt.exports=Ljt});var Ujt=Y((pHc,jjt)=>{o();var CYl=xjt();function LYl(t){return t==null?"":CYl(t)}jjt.exports=LYl});var TUe=Y((WHc,Ojt)=>{o();var kYl=om(),xYl=Rme(),jYl=fjt(),UYl=Ujt();function OYl(t,e){return kYl(t)?t:xYl(t,e)?[t]:jYl(UYl(t))}Ojt.exports=OYl});var GP=Y((VHc,zjt)=>{o();var zYl=iP(),BYl=1/0;function MYl(t){if(typeof t=="string"||zYl(t))return t;var e=t+"";return e=="0"&&1/t==-BYl?"-0":e}zjt.exports=MYl});var Ame=Y((RHc,Bjt)=>{o();var SYl=TUe(),TYl=GP();function _Yl(t,e){e=SYl(e,t);for(var I=0,l=e.length;t!=null&&I{o();var KYl=eP(),DYl=Vme(),qYl=1,PYl=2;function $Yl(t,e,I,l){var n=I.length,a=n,c=!l;if(t==null)return!a;for(t=Object(t);n--;){var r=I[n];if(c&&r[2]?r[1]!==t[r[0]]:!(r[0]in t))return!1}for(;++n{o();var eRl=L0();function tRl(t){return t===t&&!eRl(t)}Tjt.exports=tRl});var Kjt=Y((yHc,_jt)=>{o();var IRl=_Ue(),lRl=M9();function nRl(t){for(var e=lRl(t),I=e.length;I--;){var l=e[I],n=t[l];e[I]=[l,n,IRl(n)]}return e}_jt.exports=nRl});var KUe=Y((HHc,Djt)=>{o();function aRl(t,e){return function(I){return I==null?!1:I[t]===e&&(e!==void 0||t in Object(I))}}Djt.exports=aRl});var Pjt=Y((fHc,qjt)=>{o();var cRl=Sjt(),rRl=Kjt(),sRl=KUe();function oRl(t){var e=rRl(t);return e.length==1&&e[0][2]?sRl(e[0][0],e[0][1]):function(I){return I===t||cRl(I,t,e)}}qjt.exports=oRl});var eUt=Y((JHc,$jt)=>{o();var iRl=Ame();function GRl(t,e,I){var l=t==null?void 0:iRl(t,e);return l===void 0?I:l}$jt.exports=GRl});var IUt=Y((LHc,tUt)=>{o();function dRl(t,e){return t!=null&&e in Object(t)}tUt.exports=dRl});var nUt=Y((xHc,lUt)=>{o();var uRl=TUe(),bRl=tP(),mRl=om(),ZRl=rme(),pRl=sme(),hRl=GP();function WRl(t,e,I){e=uRl(e,t);for(var l=-1,n=e.length,a=!1;++l{o();var NRl=IUt(),VRl=nUt();function YRl(t,e){return t!=null&&VRl(t,e,NRl)}aUt.exports=YRl});var sUt=Y((zHc,rUt)=>{o();var RRl=Vme(),ARl=eUt(),FRl=cUt(),XRl=Rme(),gRl=_Ue(),vRl=KUe(),yRl=GP(),wRl=1,HRl=2;function QRl(t,e){return XRl(t)&&gRl(e)?vRl(yRl(t),e):function(I){var l=ARl(I,t);return l===void 0&&l===e?FRl(I,t):RRl(e,l,wRl|HRl)}}rUt.exports=QRl});var _9=Y((MHc,oUt)=>{o();function fRl(t){return t}oUt.exports=fRl});var GUt=Y((THc,iUt)=>{o();function ERl(t){return function(e){return e?.[t]}}iUt.exports=ERl});var uUt=Y((KHc,dUt)=>{o();var JRl=Ame();function CRl(t){return function(e){return JRl(e,t)}}dUt.exports=CRl});var mUt=Y((qHc,bUt)=>{o();var LRl=GUt(),kRl=uUt(),xRl=Rme(),jRl=GP();function URl(t){return xRl(t)?LRl(jRl(t)):kRl(t)}bUt.exports=URl});var pUt=Y(($Hc,ZUt)=>{o();var ORl=Pjt(),zRl=sUt(),BRl=_9(),MRl=om(),SRl=mUt();function TRl(t){return typeof t=="function"?t:t==null?BRl:typeof t=="object"?MRl(t)?zRl(t[0],t[1]):ORl(t):SRl(t)}ZUt.exports=TRl});var WUt=Y((tQc,hUt)=>{o();function _Rl(t){return function(e,I,l){for(var n=-1,a=Object(e),c=l(e),r=c.length;r--;){var s=c[t?r:++n];if(I(a[s],s,a)===!1)break}return e}}hUt.exports=_Rl});var DUe=Y((lQc,NUt)=>{o();var KRl=WUt(),DRl=KRl();NUt.exports=DRl});var YUt=Y((aQc,VUt)=>{o();var qRl=DUe(),PRl=M9();function $Rl(t,e){return t&&qRl(t,e,PRl)}VUt.exports=$Rl});var AUt=Y((rQc,RUt)=>{o();var e0l=K5();function t0l(t,e){return function(I,l){if(I==null)return I;if(!e0l(I))return t(I,l);for(var n=I.length,a=e?n:-1,c=Object(I);(e?a--:++a{o();var I0l=YUt(),l0l=AUt(),n0l=l0l(I0l);FUt.exports=n0l});var gUt=Y((GQc,XUt)=>{o();var a0l=qUe(),c0l=K5();function r0l(t,e){var I=-1,l=c0l(t)?Array(t.length):[];return a0l(t,function(n,a,c){l[++I]=e(n,a,c)}),l}XUt.exports=r0l});var yUt=Y((uQc,vUt)=>{o();function s0l(t,e){var I=t.length;for(t.sort(e);I--;)t[I]=t[I].value;return t}vUt.exports=s0l});var QUt=Y((mQc,HUt)=>{o();var wUt=iP();function o0l(t,e){if(t!==e){var I=t!==void 0,l=t===null,n=t===t,a=wUt(t),c=e!==void 0,r=e===null,s=e===e,i=wUt(e);if(!r&&!i&&!a&&t>e||a&&c&&s&&!r&&!i||l&&c&&s||!I&&s||!n)return 1;if(!l&&!a&&!i&&t{o();var i0l=QUt();function G0l(t,e,I){for(var l=-1,n=t.criteria,a=e.criteria,c=n.length,r=I.length;++l=r)return s;var i=I[l];return s*(i=="desc"?-1:1)}}return t.index-e.index}fUt.exports=G0l});var CUt=Y((WQc,JUt)=>{o();var PUe=jf(),d0l=Ame(),u0l=pUt(),b0l=gUt(),m0l=yUt(),Z0l=xf(),p0l=EUt(),h0l=_9(),W0l=om();function N0l(t,e,I){e.length?e=PUe(e,function(a){return W0l(a)?function(c){return d0l(c,a.length===1?a[0]:a)}:a}):e=[h0l];var l=-1;e=PUe(e,Z0l(u0l));var n=b0l(t,function(a,c,r){var s=PUe(e,function(i){return i(a)});return{criteria:s,index:++l,value:a}});return m0l(n,function(a,c){return p0l(a,c,I)})}JUt.exports=N0l});var $Ue=Y((VQc,LUt)=>{o();function V0l(t,e,I){switch(I.length){case 0:return t.call(e);case 1:return t.call(e,I[0]);case 2:return t.call(e,I[0],I[1]);case 3:return t.call(e,I[0],I[1],I[2])}return t.apply(e,I)}LUt.exports=V0l});var jUt=Y((RQc,xUt)=>{o();var Y0l=$Ue(),kUt=Math.max;function R0l(t,e,I){return e=kUt(e===void 0?t.length-1:e,0),function(){for(var l=arguments,n=-1,a=kUt(l.length-e,0),c=Array(a);++n{o();function A0l(t){return function(){return t}}UUt.exports=A0l});var MUt=Y((gQc,BUt)=>{o();var F0l=OUt(),zUt=YUe(),X0l=_9(),g0l=zUt?function(t,e){return zUt(t,"toString",{configurable:!0,enumerable:!1,value:F0l(e),writable:!0})}:X0l;BUt.exports=g0l});var TUt=Y((yQc,SUt)=>{o();var v0l=800,y0l=16,w0l=Date.now;function H0l(t){var e=0,I=0;return function(){var l=w0l(),n=y0l-(l-I);if(I=l,n>0){if(++e>=v0l)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}SUt.exports=H0l});var KUt=Y((HQc,_Ut)=>{o();var Q0l=MUt(),f0l=TUt(),E0l=f0l(Q0l);_Ut.exports=E0l});var Uf=Y((fQc,DUt)=>{o();var J0l=_9(),C0l=jUt(),L0l=KUt();function k0l(t,e){return L0l(C0l(t,e,J0l),t+"")}DUt.exports=k0l});var Fme=Y((JQc,qUt)=>{o();var x0l=T5(),j0l=K5(),U0l=rme(),O0l=L0();function z0l(t,e,I){if(!O0l(I))return!1;var l=typeof e;return(l=="number"?j0l(I)&&U0l(e,I.length):l=="string"&&e in I)?x0l(I[e],t):!1}qUt.exports=z0l});var e9e=Y((LQc,$Ut)=>{o();var B0l=Yme(),M0l=CUt(),S0l=Uf(),PUt=Fme(),T0l=S0l(function(t,e){if(t==null)return[];var I=e.length;return I>1&&PUt(t,e[0],e[1])?e=[]:I>2&&PUt(e[0],e[1],e[2])&&(e=[e[0]]),M0l(t,B0l(e,1),[])});$Ut.exports=T0l});var t9t=Y((xQc,e9t)=>{o();function _0l(t,e,I,l){for(var n=t.length,a=I+(l?1:-1);l?a--:++a{o();function K0l(t){return t!==t}I9t.exports=K0l});var a9t=Y((zQc,n9t)=>{o();function D0l(t,e,I){for(var l=I-1,n=t.length;++l{o();var q0l=t9t(),P0l=l9t(),$0l=a9t();function eAl(t,e,I){return e===e?$0l(t,e,I):q0l(t,P0l,I)}c9t.exports=eAl});var Xme=Y((TQc,r9t)=>{o();var tAl=t9e();function IAl(t,e){var I=t==null?0:t.length;return!!I&&tAl(t,e,0)>-1}r9t.exports=IAl});var gme=Y((KQc,s9t)=>{o();function lAl(t,e,I){for(var l=-1,n=t==null?0:t.length;++l{o();function nAl(){}o9t.exports=nAl});var d9t=Y(($Qc,G9t)=>{o();var I9e=QUe(),aAl=i9t(),cAl=Wme(),rAl=1/0,sAl=I9e&&1/cAl(new I9e([,-0]))[1]==rAl?function(t){return new I9e(t)}:aAl;G9t.exports=sAl});var l9e=Y((tfc,u9t)=>{o();var oAl=sP(),iAl=Xme(),GAl=gme(),dAl=oP(),uAl=d9t(),bAl=Wme(),mAl=200;function ZAl(t,e,I){var l=-1,n=iAl,a=t.length,c=!0,r=[],s=r;if(I)c=!1,n=GAl;else if(a>=mAl){var i=e?null:uAl(t);if(i)return bAl(i);c=!1,n=dAl,s=new oAl}else s=e?[]:r;e:for(;++l{o();var pAl=l9e();function hAl(t){return t&&t.length?pAl(t):[]}b9t.exports=hAl});var yme=Y((afc,m9t)=>{o();var WAl=l9e();function NAl(t,e){return e=typeof e=="function"?e:void 0,t&&t.length?WAl(t,void 0,e):[]}m9t.exports=NAl});var h9t=Y((rfc,p9t)=>{o();var VAl=Uf(),YAl=T5(),RAl=Fme(),AAl=D5(),Z9t=Object.prototype,FAl=Z9t.hasOwnProperty,XAl=VAl(function(t,e){t=Object(t);var I=-1,l=e.length,n=l>2?e[2]:void 0;for(n&&RAl(e[0],e[1],n)&&(l=1);++I{o();var gAl=sP(),vAl=Xme(),yAl=gme(),wAl=jf(),HAl=xf(),W9t=oP(),QAl=Math.min;function fAl(t,e,I){for(var l=I?yAl:vAl,n=t[0].length,a=t.length,c=a,r=Array(a),s=1/0,i=[];c--;){var G=t[c];c&&e&&(G=wAl(G,HAl(e))),s=QAl(G.length,s),r[c]=!I&&(e||n>=120&&G.length>=120)?new gAl(c&&G):void 0}G=t[0];var d=-1,u=r[0];e:for(;++d{o();var EAl=K5(),JAl=k0();function CAl(t){return JAl(t)&&EAl(t)}V9t.exports=CAl});var a9e=Y((ufc,Y9t)=>{o();var LAl=wme();function kAl(t){return LAl(t)?t:[]}Y9t.exports=kAl});var A9t=Y((mfc,R9t)=>{o();function xAl(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}R9t.exports=xAl});var c9e=Y((pfc,F9t)=>{o();var jAl=jf(),UAl=n9e(),OAl=Uf(),zAl=a9e(),BAl=A9t(),MAl=OAl(function(t){var e=BAl(t),I=jAl(t,zAl);return e=typeof e=="function"?e:void 0,e&&I.pop(),I.length&&I[0]===t[0]?UAl(I,void 0,e):[]});F9t.exports=MAl});var Of=Y((Wfc,g9t)=>{o();var SAl=Lf(),TAl=mme(),_Al=k0(),KAl="[object Object]",DAl=Function.prototype,qAl=Object.prototype,X9t=DAl.toString,PAl=qAl.hasOwnProperty,$Al=X9t.call(Object);function eFl(t){if(!_Al(t)||SAl(t)!=KAl)return!1;var e=TAl(t);if(e===null)return!0;var I=PAl.call(e,"constructor")&&e.constructor;return typeof I=="function"&&I instanceof I&&X9t.call(I)==$Al}g9t.exports=eFl});var y9t=Y((Vfc,v9t)=>{o();var tFl=Lf(),IFl=k0(),lFl="[object Boolean]";function nFl(t){return t===!0||t===!1||IFl(t)&&tFl(t)==lFl}v9t.exports=nFl});var Jme=Y((Rfc,C9t)=>{o();var x0=MUe(),aFl=e9e(),G9e=vme(),w9t=yme(),cFl=h9t(),rFl=c9e(),Eme=Of(),r9e=y9t(),H9t=t=>Array.isArray(t)?t:[t],Rh=t=>t===void 0,Hme=t=>Eme(t)||Array.isArray(t)?Object.keys(t):[],K9=(t,e)=>t.hasOwnProperty(e),D9=t=>aFl(G9e(t)),Q9t=t=>Rh(t)||Array.isArray(t)&&t.length===0,sFl=(t,e,I,l)=>e&&K9(e,I)&&t&&K9(t,I)&&l(t[I],e[I]),s9e=(t,e)=>Rh(t)&&e===0||Rh(e)&&t===0||x0(t,e),oFl=(t,e)=>Rh(t)&&e===!1||Rh(e)&&t===!1||x0(t,e),f9t=t=>Rh(t)||x0(t,{})||t===!0,Qme=t=>Rh(t)||x0(t,{}),E9t=t=>Rh(t)||Eme(t)||t===!0||t===!1;function J9t(t,e){return Q9t(t)&&Q9t(e)?!0:x0(D9(t),D9(e))}function iFl(t,e){return t=H9t(t),e=H9t(e),x0(D9(t),D9(e))}function fme(t,e,I,l){var n=G9e(Hme(t).concat(Hme(e)));return Qme(t)&&Qme(e)?!0:Qme(t)&&Hme(e).length||Qme(e)&&Hme(t).length?!1:n.every(function(a){var c=t[a],r=e[a];return Array.isArray(c)&&Array.isArray(r)?x0(D9(t),D9(e)):Array.isArray(c)&&!Array.isArray(r)||Array.isArray(r)&&!Array.isArray(c)?!1:sFl(t,e,a,l)})}function GFl(t,e,I,l){return Eme(t)&&Eme(e)?l(t,e):Array.isArray(t)&&Array.isArray(e)?fme(t,e,I,l):x0(t,e)}function o9e(t,e,I,l){var n=w9t(t,l),a=w9t(e,l),c=rFl(n,a,l);return c.length===Math.max(n.length,a.length)}var dFl={title:x0,uniqueItems:oFl,minLength:s9e,minItems:s9e,minProperties:s9e,required:J9t,enum:J9t,type:iFl,items:GFl,anyOf:o9e,allOf:o9e,oneOf:o9e,properties:fme,patternProperties:fme,dependencies:fme},uFl=["properties","patternProperties","dependencies","uniqueItems","minLength","minItems","minProperties","required"],bFl=["additionalProperties","additionalItems","contains","propertyNames","not"];function i9e(t,e,I){if(I=cFl(I,{ignore:[]}),f9t(t)&&f9t(e))return!0;if(!E9t(t)||!E9t(e))throw new Error("Either of the values are not a JSON schema.");if(t===e)return!0;if(r9e(t)&&r9e(e))return t===e;if(t===void 0&&e===!1||e===void 0&&t===!1||Rh(t)&&!Rh(e)||!Rh(t)&&Rh(e))return!1;var l=G9e(Object.keys(t).concat(Object.keys(e)));if(I.ignore.length&&(l=l.filter(a=>I.ignore.indexOf(a)===-1)),!l.length)return!0;function n(a,c){return i9e(a,c,I)}return l.every(function(a){var c=t[a],r=e[a];if(bFl.indexOf(a)!==-1)return i9e(c,r,I);var s=dFl[a];if(s||(s=x0),x0(c,r))return!0;if(uFl.indexOf(a)===-1&&(!K9(t,a)&&K9(e,a)||K9(t,a)&&!K9(e,a)))return c===r;var i=s(c,r,a,n);if(!r9e(i))throw new Error("Comparer must return true or false");return i})}C9t.exports=i9e});var Cme=Y((Ffc,L9t)=>{"use strict";o();function mFl(t){return Object.prototype.toString.call(t)==="[object Array]"}L9t.exports=Array.isArray||mFl});var x9t=Y((gfc,k9t)=>{"use strict";o();function ZFl(t){return(typeof t=="number"||Object.prototype.toString.call(t)==="[object Number]")&&t.valueOf()===t.valueOf()}k9t.exports=ZFl});var U9t=Y((yfc,j9t)=>{"use strict";o();var pFl=x9t();function hFl(t){return pFl(t)&&t%1===0}j9t.exports=hFl});var d9e=Y((Hfc,O9t)=>{"use strict";o();var WFl=Cme(),NFl=U9t();function VFl(t){var e;if(!WFl(t)||(e=t.length,!e))return!1;for(var I=0;I{"use strict";o();function YFl(t){return typeof t=="function"}z9t.exports=YFl});var _9t=Y((Jfc,T9t)=>{"use strict";o();var RFl=Cme(),B9t=d9e(),AFl=u9e(),Lme=Math.pow(2,31)-1;function M9t(t,e){var I=1,l;if(t===0)return e;if(e===0)return t;for(;t%2===0&&e%2===0;)t=t/2,e=e/2,I=I*2;for(;t%2===0;)t=t/2;for(;e;){for(;e%2===0;)e=e/2;t>e&&(l=e,e=t,t=l),e=e-t}return I*t}function S9t(t,e){var I=0,l;if(t===0)return e;if(e===0)return t;for(;!(t&1)&&!(e&1);)t>>>=1,e>>>=1,I++;for(;!(t&1);)t>>>=1;for(;e;){for(;!(e&1);)e>>>=1;t>e&&(l=e,e=t,t=l),e=e-t}return t<1){if(l=e[0],I=e[1],!AFl(I))throw new TypeError("gcd()::invalid input argument. Accessor must be a function. Value: `"+I+"`.")}else l=e[0];else throw new TypeError("gcd()::invalid input argument. Must provide an array of integers. Value: `"+e[0]+"`.");if(n=l.length,n<2)return null;if(I){for(a=new Array(n),r=0;r{"use strict";o();var K9t=_9t(),XFl=Cme(),D9t=d9e(),gFl=u9e();function vFl(){var t=arguments.length,e,I,l,n,a,c,r;for(e=new Array(t),r=0;r1){if(l=e[0],I=e[1],!gFl(I))throw new TypeError("lcm()::invalid input argument. Accessor must be a function. Value: `"+I+"`.")}else l=e[0];else throw new TypeError("lcm()::invalid input argument. Must provide an array of integers. Value: `"+e[0]+"`.");if(n=l.length,n<2)return null;if(I){for(a=new Array(n),r=0;r{o();var yFl=cme(),wFl=T5();function HFl(t,e,I){(I!==void 0&&!wFl(t[e],I)||I===void 0&&!(e in t))&&yFl(t,e,I)}$9t.exports=HFl});var m9e=Y((Ufc,eOt)=>{o();function QFl(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}eOt.exports=QFl});var IOt=Y((zfc,tOt)=>{o();var fFl=O9(),EFl=D5();function JFl(t){return fFl(t,EFl(t))}tOt.exports=JFl});var sOt=Y((Mfc,rOt)=>{o();var lOt=b9e(),CFl=gUe(),LFl=xUe(),kFl=dme(),xFl=jUe(),nOt=tP(),aOt=om(),jFl=wme(),UFl=lP(),OFl=lme(),zFl=L0(),BFl=Of(),MFl=ime(),cOt=m9e(),SFl=IOt();function TFl(t,e,I,l,n,a,c){var r=cOt(t,I),s=cOt(e,I),i=c.get(s);if(i){lOt(t,I,i);return}var G=a?a(r,s,I+"",t,e,c):void 0,d=G===void 0;if(d){var u=aOt(s),b=!u&&UFl(s),Z=!u&&!b&&MFl(s);G=s,u||b||Z?aOt(r)?G=r:jFl(r)?G=kFl(r):b?(d=!1,G=CFl(s,!0)):Z?(d=!1,G=LFl(s,!0)):G=[]:BFl(s)||nOt(s)?(G=r,nOt(r)?G=SFl(r):(!zFl(r)||OFl(r))&&(G=xFl(s))):d=!1}d&&(c.set(s,G),n(G,s,l,a,c),c.delete(s)),lOt(t,I,G)}rOt.exports=TFl});var kme=Y((Tfc,iOt)=>{o();var _Fl=eP(),KFl=b9e(),DFl=DUe(),qFl=sOt(),PFl=L0(),$Fl=D5(),e2l=m9e();function oOt(t,e,I,l,n){t!==e&&DFl(e,function(a,c){if(n||(n=new _Fl),PFl(a))qFl(t,e,c,I,oOt,l,n);else{var r=l?l(e2l(t,c),a,c+"",t,e,n):void 0;r===void 0&&(r=a),KFl(t,c,r)}},$Fl)}iOt.exports=oOt});var bOt=Y((Kfc,uOt)=>{o();var t2l=kme(),GOt=L0();function dOt(t,e,I,l,n,a){return GOt(t)&&GOt(e)&&(a.set(e,t),t2l(t,e,void 0,dOt,a),a.delete(e)),t}uOt.exports=dOt});var Z9e=Y((qfc,mOt)=>{o();var I2l=Uf(),l2l=Fme();function n2l(t){return I2l(function(e,I){var l=-1,n=I.length,a=n>1?I[n-1]:void 0,c=n>2?I[2]:void 0;for(a=t.length>3&&typeof a=="function"?(n--,a):void 0,c&&l2l(I[0],I[1],c)&&(a=n<3?void 0:a,n=1),e=Object(e);++l{o();var a2l=kme(),c2l=Z9e(),r2l=c2l(function(t,e,I,l){a2l(t,e,I,l)});ZOt.exports=r2l});var WOt=Y((tEc,hOt)=>{o();var s2l=$Ue(),o2l=Uf(),i2l=bOt(),G2l=pOt(),d2l=o2l(function(t){return t.push(void 0,i2l),s2l(G2l,void 0,t)});hOt.exports=d2l});var p9e=Y((lEc,NOt)=>{o();var u2l=Yme();function b2l(t){var e=t==null?0:t.length;return e?u2l(t,1):[]}NOt.exports=b2l});var h9e=Y((aEc,VOt)=>{o();var m2l=Yme(),Z2l=1/0;function p2l(t){var e=t==null?0:t.length;return e?m2l(t,Z2l):[]}VOt.exports=p2l});var ROt=Y((rEc,YOt)=>{o();var h2l=jf(),W2l=n9e(),N2l=Uf(),V2l=a9e(),Y2l=N2l(function(t){var e=h2l(t,V2l);return e.length&&e[0]===t[0]?W2l(e):[]});YOt.exports=Y2l});var FOt=Y((oEc,AOt)=>{o();function R2l(t,e,I,l){for(var n=I-1,a=t.length;++n{o();var A2l=jf(),F2l=t9e(),X2l=FOt(),g2l=xf(),v2l=dme(),y2l=Array.prototype,XOt=y2l.splice;function w2l(t,e,I,l){var n=l?X2l:F2l,a=-1,c=e.length,r=t;for(t===e&&(e=v2l(e)),I&&(r=A2l(t,g2l(I)));++a-1;)r!==t&&XOt.call(r,s,1),XOt.call(t,s,1);return t}gOt.exports=w2l});var wOt=Y((uEc,yOt)=>{o();var H2l=vOt();function Q2l(t,e){return t&&t.length&&e&&e.length?H2l(t,e):t}yOt.exports=Q2l});var QOt=Y((mEc,HOt)=>{o();var f2l=_9();function E2l(t){return typeof t=="function"?t:f2l}HOt.exports=E2l});var W9e=Y((pEc,fOt)=>{o();var J2l=VUe(),C2l=qUe(),L2l=QOt(),k2l=om();function x2l(t,e){var I=k2l(t)?J2l:C2l;return I(t,L2l(e))}fOt.exports=x2l});var JOt=Y((WEc,EOt)=>{o();var j2l=sP(),U2l=Xme(),O2l=gme(),z2l=jf(),B2l=xf(),M2l=oP(),S2l=200;function T2l(t,e,I,l){var n=-1,a=U2l,c=!0,r=t.length,s=[],i=e.length;if(!r)return s;I&&(e=z2l(e,B2l(I))),l?(a=O2l,c=!1):e.length>=S2l&&(a=M2l,c=!1,e=new j2l(e));e:for(;++n{o();var _2l=JOt(),K2l=Uf(),D2l=wme(),q2l=K2l(function(t,e){return D2l(t)?_2l(t,e):[]});COt.exports=q2l});var V9e=Y((REc,UOt)=>{o();var P2l=p9e(),$2l=h9e(),kOt=Of(),eXl=vme(),tXl=yme(),IXl=LOt();function lXl(t){for(let e in t)xOt(t,e)&&jOt(t[e])&&delete t[e];return t}var nXl=t=>eXl($2l(t.map(N9e))),aXl=(t,e)=>t.map(I=>I&&I[e]),xOt=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),N9e=t=>kOt(t)||Array.isArray(t)?Object.keys(t):[],cXl=t=>t!==void 0,rXl=t=>kOt(t)||t===!0||t===!1,jOt=t=>!N9e(t).length&&t!==!1&&t!==!0,sXl=(t,...e)=>IXl.apply(null,[t].concat(P2l(e)));UOt.exports={allUniqueKeys:nXl,deleteUndefinedProps:lXl,getValues:aXl,has:xOt,isEmptySchema:jOt,isSchema:rXl,keys:N9e,notUndefined:cXl,uniqWith:tXl,withoutArr:sXl}});var MOt=Y((FEc,BOt)=>{o();var oXl=Jme(),iXl=W9e(),{allUniqueKeys:GXl,deleteUndefinedProps:dXl,getValues:uXl,keys:dP,notUndefined:bXl,uniqWith:mXl,withoutArr:OOt}=V9e();function ZXl(t){iXl(t,function(e,I){e===!1&&delete t[I]})}function zOt(t,e){return GXl(t).reduce(function(l,n){let a=uXl(t,n),c=mXl(a.filter(bXl),oXl);return l[n]=e(c,n),l},{})}BOt.exports={keywords:["properties","patternProperties","additionalProperties"],resolver(t,e,I,l){l.ignoreAdditionalProperties||(t.forEach(function(a){let c=t.filter(G=>G!==a),r=dP(a.properties),i=dP(a.patternProperties).map(G=>new RegExp(G));c.forEach(function(G){let d=dP(G.properties),u=d.filter(Z=>i.some(p=>p.test(Z)));OOt(d,r,u).forEach(function(Z){G.properties[Z]=I.properties([G.properties[Z],a.additionalProperties],Z)})})}),t.forEach(function(a){let c=t.filter(s=>s!==a),r=dP(a.patternProperties);a.additionalProperties===!1&&c.forEach(function(s){let i=dP(s.patternProperties);OOt(i,r).forEach(d=>delete s.patternProperties[d])})}));let n={additionalProperties:I.additionalProperties(t.map(a=>a.additionalProperties)),patternProperties:zOt(t.map(a=>a.patternProperties),I.patternProperties),properties:zOt(t.map(a=>a.properties),I.properties)};return n.additionalProperties===!1&&ZXl(n.properties),dXl(n)}}});var KOt=Y((gEc,_Ot)=>{o();var pXl=Jme(),hXl=W9e(),{allUniqueKeys:WXl,deleteUndefinedProps:NXl,has:VXl,isSchema:SOt,notUndefined:TOt,uniqWith:YXl}=V9e();function RXl(t){hXl(t,function(e,I){e===!1&&t.splice(I,1)})}function AXl(t,e){return t.map(function(I){if(I)if(Array.isArray(I.items)){let l=I.items[e];if(SOt(l))return l;if(VXl(I,"additionalItems"))return I.additionalItems}else return I.items})}function FXl(t){return t.map(function(e){if(e)return Array.isArray(e.items)?e.additionalItems:e.items})}function XXl(t,e,I){return WXl(I).reduce(function(n,a){let c=AXl(t,a),r=YXl(c.filter(TOt),pXl);return n[a]=e(r,a),n},[])}_Ot.exports={keywords:["items","additionalItems"],resolver(t,e,I){let l=t.map(r=>r.items),n=l.filter(TOt),a={};n.every(SOt)?a.items=I.items(l):a.items=XXl(t,I.items,l);let c;return n.every(Array.isArray)?c=t.map(r=>r.additionalItems):n.some(Array.isArray)&&(c=FXl(t)),c&&(a.additionalItems=I.additionalItems(c)),a.additionalItems===!1&&Array.isArray(a.items)&&RXl(a.items),NXl(a)}}});var szt=Y((yEc,rzt)=>{o();var DOt=UUe(),jme=Jme(),gXl=P9t(),vXl=WOt(),qOt=p9e(),A9e=h9e(),yXl=ROt(),wXl=c9e(),Y9e=MUe(),P9=Of(),HXl=wOt(),POt=e9e(),F9e=vme(),q9=yme(),$Ot=MOt(),ezt=KOt(),xme=(t,e)=>t.indexOf(e)!==-1,QXl=t=>P9(t)||t===!0||t===!1,fXl=t=>t===!1,tzt=t=>t===!0,Ome=(t,e,I)=>I(t),Izt=t=>POt(F9e(A9e(t))),Ume=t=>t!==void 0,lzt=t=>F9e(A9e(t.map(xXl))),$9=t=>t[0],EXl=t=>Izt(t),uP=t=>Math.max.apply(Math,t),bP=t=>Math.min.apply(Math,t),JXl=t=>t.some(tzt),CXl=t=>q9(qOt(t),Y9e);function LXl(t){return function(e,I){return jme({[t]:e},{[t]:I})}}function nzt(t){let{allOf:e=[],...I}=t;return I=P9(t)?I:t,[I,...e.map(nzt)]}function azt(t,e){return t.map(I=>I&&I[e])}function kXl(t,e){return t.map(function(I,l){try{return e(I,l)}catch{return}}).filter(Ume)}function xXl(t){return P9(t)||Array.isArray(t)?Object.keys(t):[]}function R9e(t,e){if(e=e||[],!t.length)return e;let I=t.slice(0).shift(),l=t.slice(1);return e.length?R9e(l,qOt(e.map(n=>I.map(a=>[a].concat(n))))):R9e(l,I.map(n=>n))}function czt(t,e){let I;try{I=t.map(function(l){return JSON.stringify(l,null,2)}).join(` +`)}catch{I=t.join(", ")}throw new Error('Could not resolve values for path:"'+e.join(".")+`". They are probably incompatible. Values: +`+I)}function jXl(t,e,I,l,n,a){if(t.length){let c=n.complexResolvers[e];if(!c||!c.resolver)throw new Error("No resolver found for "+e);let r=I.map(d=>t.reduce((u,b)=>(d[b]!==void 0&&(u[b]=d[b]),u),{})),s=q9(r,jme),i=c.keywords.reduce((d,u)=>({...d,[u]:(b,Z=[])=>l(b,null,a.concat(u,Z))}),{}),G=c.resolver(s,a.concat(e),i,n);return P9(G)||czt(s,a.concat(e)),G}}function UXl(t){return{required:t}}var OXl=["properties","patternProperties","definitions","dependencies"],zXl=["anyOf","oneOf"],BXl=["additionalProperties","additionalItems","contains","propertyNames","not","items"],vn={type(t){if(t.some(Array.isArray)){let e=t.map(function(l){return Array.isArray(l)?l:[l]}),I=yXl.apply(null,e);if(I.length===1)return I[0];if(I.length>1)return F9e(I)}},dependencies(t,e,I){return lzt(t).reduce(function(n,a){let c=azt(t,a),r=q9(c.filter(Ume),Y9e),s=r.filter(Array.isArray);if(s.length){if(s.length===r.length)n[a]=Izt(r);else{let i=r.filter(QXl),G=s.map(UXl);n[a]=I(i.concat(G),a)}return n}return r=q9(r,jme),n[a]=I(r,a),n},{})},oneOf(t,e,I){let l=R9e(DOt(t)),n=kXl(l,I),a=q9(n,jme);if(a.length)return a},not(t){return{anyOf:t}},pattern(t){return t.map(e=>"(?="+e+")").join("")},multipleOf(t){let e=t.slice(0),I=1;for(;e.some(l=>!Number.isInteger(l));)e=e.map(l=>l*10),I=I*10;return gXl(e)/I},enum(t){let e=wXl.apply(null,t.concat(Y9e));if(e.length)return POt(e)}};vn.$id=$9;vn.$ref=$9;vn.$schema=$9;vn.additionalItems=Ome;vn.additionalProperties=Ome;vn.anyOf=vn.oneOf;vn.contains=Ome;vn.default=$9;vn.definitions=vn.dependencies;vn.description=$9;vn.examples=CXl;vn.exclusiveMaximum=bP;vn.exclusiveMinimum=uP;vn.items=ezt;vn.maximum=bP;vn.maxItems=bP;vn.maxLength=bP;vn.maxProperties=bP;vn.minimum=uP;vn.minItems=uP;vn.minLength=uP;vn.minProperties=uP;vn.properties=$Ot;vn.propertyNames=Ome;vn.required=EXl;vn.title=$9;vn.uniqueItems=JXl;var MXl={properties:$Ot,items:ezt};function X9e(t,e,I){I=I||[],e=vXl(e,{ignoreAdditionalProperties:!1,resolvers:vn,complexResolvers:MXl,deep:!0});let l=Object.entries(e.complexResolvers);function n(r,s,i){r=DOt(r.filter(Ume)),i=i||[];let G=P9(s)?s:{};if(!r.length)return;if(r.some(fXl))return!1;if(r.every(tzt))return!0;r=r.filter(P9);let d=lzt(r);if(e.deep&&xme(d,"allOf"))return X9e({allOf:r},e,I);let u=l.map(([b,Z])=>d.filter(p=>Z.keywords.includes(p)));return u.forEach(b=>HXl(d,b)),d.forEach(function(b){let Z=azt(r,b),p=q9(Z.filter(Ume),LXl(b));if(p.length===1&&xme(zXl,b))G[b]=p[0].map(W=>n([W],W));else if(p.length===1&&!xme(OXl,b)&&!xme(BXl,b))G[b]=p[0];else{let W=e.resolvers[b]||e.resolvers.defaultResolver;if(!W)throw new Error("No resolver found for key "+b+". You can provide a resolver for this keyword in the options, or provide a default resolver.");let h=(N,V=[])=>n(N,null,i.concat(b,V));G[b]=W(p,i.concat(b),h,e),G[b]===void 0?czt(p,i.concat(b)):G[b]===void 0&&delete G[b]}}),l.reduce((b,[Z,p],W)=>({...b,...jXl(u[W],Z,r,n,e,i)}),G)}let a=A9e(nzt(t));return n(a)}X9e.options={resolvers:vn};rzt.exports=X9e});var Nzt=Y(lZe=>{"use strict";o();var ogl=We(),igl=Symbol.for("react.element"),Ggl=Symbol.for("react.fragment"),dgl=Object.prototype.hasOwnProperty,ugl=ogl.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,bgl={key:!0,ref:!0,__self:!0,__source:!0};function Wzt(t,e,I){var l,n={},a=null,c=null;I!==void 0&&(a=""+I),e.key!==void 0&&(a=""+e.key),e.ref!==void 0&&(c=e.ref);for(l in e)dgl.call(e,l)&&!bgl.hasOwnProperty(l)&&(n[l]=e[l]);if(t&&t.defaultProps)for(l in e=t.defaultProps,e)n[l]===void 0&&(n[l]=e[l]);return{$$typeof:igl,type:t,key:a,ref:c,props:n,_owner:ugl.current}}lZe.Fragment=Ggl;lZe.jsx=Wzt;lZe.jsxs=Wzt});var aI=Y((j5c,Vzt)=>{"use strict";o();Vzt.exports=Nzt()});var Rzt=Y(zn=>{"use strict";o();var H9e=Symbol.for("react.element"),Q9e=Symbol.for("react.portal"),nZe=Symbol.for("react.fragment"),aZe=Symbol.for("react.strict_mode"),cZe=Symbol.for("react.profiler"),rZe=Symbol.for("react.provider"),sZe=Symbol.for("react.context"),mgl=Symbol.for("react.server_context"),oZe=Symbol.for("react.forward_ref"),iZe=Symbol.for("react.suspense"),GZe=Symbol.for("react.suspense_list"),dZe=Symbol.for("react.memo"),uZe=Symbol.for("react.lazy"),Zgl=Symbol.for("react.offscreen"),Yzt;Yzt=Symbol.for("react.module.reference");function Xh(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case H9e:switch(t=t.type,t){case nZe:case cZe:case aZe:case iZe:case GZe:return t;default:switch(t=t&&t.$$typeof,t){case mgl:case sZe:case oZe:case uZe:case dZe:case rZe:return t;default:return e}}case Q9e:return e}}}zn.ContextConsumer=sZe;zn.ContextProvider=rZe;zn.Element=H9e;zn.ForwardRef=oZe;zn.Fragment=nZe;zn.Lazy=uZe;zn.Memo=dZe;zn.Portal=Q9e;zn.Profiler=cZe;zn.StrictMode=aZe;zn.Suspense=iZe;zn.SuspenseList=GZe;zn.isAsyncMode=function(){return!1};zn.isConcurrentMode=function(){return!1};zn.isContextConsumer=function(t){return Xh(t)===sZe};zn.isContextProvider=function(t){return Xh(t)===rZe};zn.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===H9e};zn.isForwardRef=function(t){return Xh(t)===oZe};zn.isFragment=function(t){return Xh(t)===nZe};zn.isLazy=function(t){return Xh(t)===uZe};zn.isMemo=function(t){return Xh(t)===dZe};zn.isPortal=function(t){return Xh(t)===Q9e};zn.isProfiler=function(t){return Xh(t)===cZe};zn.isStrictMode=function(t){return Xh(t)===aZe};zn.isSuspense=function(t){return Xh(t)===iZe};zn.isSuspenseList=function(t){return Xh(t)===GZe};zn.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===nZe||t===cZe||t===aZe||t===iZe||t===GZe||t===Zgl||typeof t=="object"&&t!==null&&(t.$$typeof===uZe||t.$$typeof===dZe||t.$$typeof===rZe||t.$$typeof===sZe||t.$$typeof===oZe||t.$$typeof===Yzt||t.getModuleId!==void 0)};zn.typeOf=Xh});var Fzt=Y((B5c,Azt)=>{"use strict";o();Azt.exports=Rzt()});var NP=Y(rn=>{"use strict";o();Object.defineProperty(rn,"__esModule",{value:!0});rn.regexpCode=rn.getEsmExportName=rn.getProperty=rn.safeStringify=rn.stringify=rn.strConcat=rn.addCodeArg=rn.str=rn._=rn.nil=rn._Code=rn.Name=rn.IDENTIFIER=rn._CodeOrName=void 0;var hP=class{};rn._CodeOrName=hP;rn.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var IL=class extends hP{constructor(e){if(super(),!rn.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};rn.Name=IL;var gh=class extends hP{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((I,l)=>`${I}${l}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((I,l)=>(l instanceof IL&&(I[l.str]=(I[l.str]||0)+1),I),{})}};rn._Code=gh;rn.nil=new gh("");function Qzt(t,...e){let I=[t[0]],l=0;for(;l{"use strict";o();Object.defineProperty(um,"__esModule",{value:!0});um.ValueScope=um.ValueScopeName=um.Scope=um.varKinds=um.UsedValueState=void 0;var dm=NP(),L9e=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},RZe;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(RZe||(um.UsedValueState=RZe={}));um.varKinds={const:new dm.Name("const"),let:new dm.Name("let"),var:new dm.Name("var")};var AZe=class{constructor({prefixes:e,parent:I}={}){this._names={},this._prefixes=e,this._parent=I}toName(e){return e instanceof dm.Name?e:this.name(e)}name(e){return new dm.Name(this._newName(e))}_newName(e){let I=this._names[e]||this._nameGroup(e);return`${e}${I.index++}`}_nameGroup(e){var I,l;if(!((l=(I=this._parent)===null||I===void 0?void 0:I._prefixes)===null||l===void 0)&&l.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};um.Scope=AZe;var FZe=class extends dm.Name{constructor(e,I){super(I),this.prefix=e}setValue(e,{property:I,itemIndex:l}){this.value=e,this.scopePath=(0,dm._)`.${new dm.Name(I)}[${l}]`}};um.ValueScopeName=FZe;var Cgl=(0,dm._)`\n`,k9e=class extends AZe{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?Cgl:dm.nil}}get(){return this._scope}name(e){return new FZe(e,this._newName(e))}value(e,I){var l;if(I.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let n=this.toName(e),{prefix:a}=n,c=(l=I.key)!==null&&l!==void 0?l:I.ref,r=this._values[a];if(r){let G=r.get(c);if(G)return G}else r=this._values[a]=new Map;r.set(c,n);let s=this._scope[a]||(this._scope[a]=[]),i=s.length;return s[i]=I.ref,n.setValue(I,{property:a,itemIndex:i}),n}getValue(e,I){let l=this._values[e];if(l)return l.get(I)}scopeRefs(e,I=this._values){return this._reduceValues(I,l=>{if(l.scopePath===void 0)throw new Error(`CodeGen: name "${l}" has no value`);return(0,dm._)`${e}${l.scopePath}`})}scopeCode(e=this._values,I,l){return this._reduceValues(e,n=>{if(n.value===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return n.value.code},I,l)}_reduceValues(e,I,l={},n){let a=dm.nil;for(let c in e){let r=e[c];if(!r)continue;let s=l[c]=l[c]||new Map;r.forEach(i=>{if(s.has(i))return;s.set(i,RZe.Started);let G=I(i);if(G){let d=this.opts.es5?um.varKinds.var:um.varKinds.const;a=(0,dm._)`${a}${d} ${i} = ${G};${this.opts._n}`}else if(G=n?.(i))a=(0,dm._)`${a}${G}${this.opts._n}`;else throw new L9e(i);s.set(i,RZe.Completed)})}return a}};um.ValueScope=k9e});var Zl=Y(Al=>{"use strict";o();Object.defineProperty(Al,"__esModule",{value:!0});Al.or=Al.and=Al.not=Al.CodeGen=Al.operators=Al.varKinds=Al.ValueScopeName=Al.ValueScope=Al.Scope=Al.Name=Al.regexpCode=Al.stringify=Al.getProperty=Al.nil=Al.strConcat=Al.str=Al._=void 0;var _l=NP(),z0=x9e(),qf=NP();Object.defineProperty(Al,"_",{enumerable:!0,get:function(){return qf._}});Object.defineProperty(Al,"str",{enumerable:!0,get:function(){return qf.str}});Object.defineProperty(Al,"strConcat",{enumerable:!0,get:function(){return qf.strConcat}});Object.defineProperty(Al,"nil",{enumerable:!0,get:function(){return qf.nil}});Object.defineProperty(Al,"getProperty",{enumerable:!0,get:function(){return qf.getProperty}});Object.defineProperty(Al,"stringify",{enumerable:!0,get:function(){return qf.stringify}});Object.defineProperty(Al,"regexpCode",{enumerable:!0,get:function(){return qf.regexpCode}});Object.defineProperty(Al,"Name",{enumerable:!0,get:function(){return qf.Name}});var yZe=x9e();Object.defineProperty(Al,"Scope",{enumerable:!0,get:function(){return yZe.Scope}});Object.defineProperty(Al,"ValueScope",{enumerable:!0,get:function(){return yZe.ValueScope}});Object.defineProperty(Al,"ValueScopeName",{enumerable:!0,get:function(){return yZe.ValueScopeName}});Object.defineProperty(Al,"varKinds",{enumerable:!0,get:function(){return yZe.varKinds}});Al.operators={GT:new _l._Code(">"),GTE:new _l._Code(">="),LT:new _l._Code("<"),LTE:new _l._Code("<="),EQ:new _l._Code("==="),NEQ:new _l._Code("!=="),NOT:new _l._Code("!"),OR:new _l._Code("||"),AND:new _l._Code("&&"),ADD:new _l._Code("+")};var Ug=class{optimizeNodes(){return this}optimizeNames(e,I){return this}},j9e=class extends Ug{constructor(e,I,l){super(),this.varKind=e,this.name=I,this.rhs=l}render({es5:e,_n:I}){let l=e?z0.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${l} ${this.name}${n};`+I}optimizeNames(e,I){if(e[this.name.str])return this.rhs&&(this.rhs=NO(this.rhs,e,I)),this}get names(){return this.rhs instanceof _l._CodeOrName?this.rhs.names:{}}},XZe=class extends Ug{constructor(e,I,l){super(),this.lhs=e,this.rhs=I,this.sideEffects=l}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,I){if(!(this.lhs instanceof _l.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=NO(this.rhs,e,I),this}get names(){let e=this.lhs instanceof _l.Name?{}:{...this.lhs.names};return vZe(e,this.rhs)}},U9e=class extends XZe{constructor(e,I,l,n){super(e,l,n),this.op=I}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},O9e=class extends Ug{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},z9e=class extends Ug{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},B9e=class extends Ug{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},M9e=class extends Ug{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,I){return this.code=NO(this.code,e,I),this}get names(){return this.code instanceof _l._CodeOrName?this.code.names:{}}},VP=class extends Ug{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((I,l)=>I+l.render(e),"")}optimizeNodes(){let{nodes:e}=this,I=e.length;for(;I--;){let l=e[I].optimizeNodes();Array.isArray(l)?e.splice(I,1,...l):l?e[I]=l:e.splice(I,1)}return e.length>0?this:void 0}optimizeNames(e,I){let{nodes:l}=this,n=l.length;for(;n--;){let a=l[n];a.optimizeNames(e,I)||(Lgl(e,a.names),l.splice(n,1))}return l.length>0?this:void 0}get names(){return this.nodes.reduce((e,I)=>aL(e,I.names),{})}},Og=class extends VP{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},S9e=class extends VP{},WO=class extends Og{};WO.kind="else";var lL=class t extends Og{constructor(e,I){super(I),this.condition=e}render(e){let I=`if(${this.condition})`+super.render(e);return this.else&&(I+="else "+this.else.render(e)),I}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let I=this.else;if(I){let l=I.optimizeNodes();I=this.else=Array.isArray(l)?new WO(l):l}if(I)return e===!1?I instanceof t?I:I.nodes:this.nodes.length?this:new t(Ezt(e),I instanceof t?[I]:I.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,I){var l;if(this.else=(l=this.else)===null||l===void 0?void 0:l.optimizeNames(e,I),!!(super.optimizeNames(e,I)||this.else))return this.condition=NO(this.condition,e,I),this}get names(){let e=super.names;return vZe(e,this.condition),this.else&&aL(e,this.else.names),e}};lL.kind="if";var nL=class extends Og{};nL.kind="for";var T9e=class extends nL{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,I){if(super.optimizeNames(e,I))return this.iteration=NO(this.iteration,e,I),this}get names(){return aL(super.names,this.iteration.names)}},_9e=class extends nL{constructor(e,I,l,n){super(),this.varKind=e,this.name=I,this.from=l,this.to=n}render(e){let I=e.es5?z0.varKinds.var:this.varKind,{name:l,from:n,to:a}=this;return`for(${I} ${l}=${n}; ${l}<${a}; ${l}++)`+super.render(e)}get names(){let e=vZe(super.names,this.from);return vZe(e,this.to)}},gZe=class extends nL{constructor(e,I,l,n){super(),this.loop=e,this.varKind=I,this.name=l,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,I){if(super.optimizeNames(e,I))return this.iterable=NO(this.iterable,e,I),this}get names(){return aL(super.names,this.iterable.names)}},YP=class extends Og{constructor(e,I,l){super(),this.name=e,this.args=I,this.async=l}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};YP.kind="func";var RP=class extends VP{render(e){return"return "+super.render(e)}};RP.kind="return";var K9e=class extends Og{render(e){let I="try"+super.render(e);return this.catch&&(I+=this.catch.render(e)),this.finally&&(I+=this.finally.render(e)),I}optimizeNodes(){var e,I;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(I=this.finally)===null||I===void 0||I.optimizeNodes(),this}optimizeNames(e,I){var l,n;return super.optimizeNames(e,I),(l=this.catch)===null||l===void 0||l.optimizeNames(e,I),(n=this.finally)===null||n===void 0||n.optimizeNames(e,I),this}get names(){let e=super.names;return this.catch&&aL(e,this.catch.names),this.finally&&aL(e,this.finally.names),e}},AP=class extends Og{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};AP.kind="catch";var FP=class extends Og{render(e){return"finally"+super.render(e)}};FP.kind="finally";var D9e=class{constructor(e,I={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...I,_n:I.lines?` +`:""},this._extScope=e,this._scope=new z0.Scope({parent:e}),this._nodes=[new S9e]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,I){let l=this._extScope.value(e,I);return(this._values[l.prefix]||(this._values[l.prefix]=new Set)).add(l),l}getScopeValue(e,I){return this._extScope.getValue(e,I)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,I,l,n){let a=this._scope.toName(I);return l!==void 0&&n&&(this._constants[a.str]=l),this._leafNode(new j9e(e,a,l)),a}const(e,I,l){return this._def(z0.varKinds.const,e,I,l)}let(e,I,l){return this._def(z0.varKinds.let,e,I,l)}var(e,I,l){return this._def(z0.varKinds.var,e,I,l)}assign(e,I,l){return this._leafNode(new XZe(e,I,l))}add(e,I){return this._leafNode(new U9e(e,Al.operators.ADD,I))}code(e){return typeof e=="function"?e():e!==_l.nil&&this._leafNode(new M9e(e)),this}object(...e){let I=["{"];for(let[l,n]of e)I.length>1&&I.push(","),I.push(l),(l!==n||this.opts.es5)&&(I.push(":"),(0,_l.addCodeArg)(I,n));return I.push("}"),new _l._Code(I)}if(e,I,l){if(this._blockNode(new lL(e)),I&&l)this.code(I).else().code(l).endIf();else if(I)this.code(I).endIf();else if(l)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new lL(e))}else(){return this._elseNode(new WO)}endIf(){return this._endBlockNode(lL,WO)}_for(e,I){return this._blockNode(e),I&&this.code(I).endFor(),this}for(e,I){return this._for(new T9e(e),I)}forRange(e,I,l,n,a=this.opts.es5?z0.varKinds.var:z0.varKinds.let){let c=this._scope.toName(e);return this._for(new _9e(a,c,I,l),()=>n(c))}forOf(e,I,l,n=z0.varKinds.const){let a=this._scope.toName(e);if(this.opts.es5){let c=I instanceof _l.Name?I:this.var("_arr",I);return this.forRange("_i",0,(0,_l._)`${c}.length`,r=>{this.var(a,(0,_l._)`${c}[${r}]`),l(a)})}return this._for(new gZe("of",n,a,I),()=>l(a))}forIn(e,I,l,n=this.opts.es5?z0.varKinds.var:z0.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,_l._)`Object.keys(${I})`,l);let a=this._scope.toName(e);return this._for(new gZe("in",n,a,I),()=>l(a))}endFor(){return this._endBlockNode(nL)}label(e){return this._leafNode(new O9e(e))}break(e){return this._leafNode(new z9e(e))}return(e){let I=new RP;if(this._blockNode(I),this.code(e),I.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(RP)}try(e,I,l){if(!I&&!l)throw new Error('CodeGen: "try" without "catch" and "finally"');let n=new K9e;if(this._blockNode(n),this.code(e),I){let a=this.name("e");this._currNode=n.catch=new AP(a),I(a)}return l&&(this._currNode=n.finally=new FP,this.code(l)),this._endBlockNode(AP,FP)}throw(e){return this._leafNode(new B9e(e))}block(e,I){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(I),this}endBlock(e){let I=this._blockStarts.pop();if(I===void 0)throw new Error("CodeGen: not in self-balancing block");let l=this._nodes.length-I;if(l<0||e!==void 0&&l!==e)throw new Error(`CodeGen: wrong number of nodes: ${l} vs ${e} expected`);return this._nodes.length=I,this}func(e,I=_l.nil,l,n){return this._blockNode(new YP(e,I,l)),n&&this.code(n).endFunc(),this}endFunc(){return this._endBlockNode(YP)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,I){let l=this._currNode;if(l instanceof e||I&&l instanceof I)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${I?`${e.kind}/${I.kind}`:e.kind}"`)}_elseNode(e){let I=this._currNode;if(!(I instanceof lL))throw new Error('CodeGen: "else" without "if"');return this._currNode=I.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let I=this._nodes;I[I.length-1]=e}};Al.CodeGen=D9e;function aL(t,e){for(let I in e)t[I]=(t[I]||0)+(e[I]||0);return t}function vZe(t,e){return e instanceof _l._CodeOrName?aL(t,e.names):t}function NO(t,e,I){if(t instanceof _l.Name)return l(t);if(!n(t))return t;return new _l._Code(t._items.reduce((a,c)=>(c instanceof _l.Name&&(c=l(c)),c instanceof _l._Code?a.push(...c._items):a.push(c),a),[]));function l(a){let c=I[a.str];return c===void 0||e[a.str]!==1?a:(delete e[a.str],c)}function n(a){return a instanceof _l._Code&&a._items.some(c=>c instanceof _l.Name&&e[c.str]===1&&I[c.str]!==void 0)}}function Lgl(t,e){for(let I in e)t[I]=(t[I]||0)-(e[I]||0)}function Ezt(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,_l._)`!${q9e(t)}`}Al.not=Ezt;var kgl=Jzt(Al.operators.AND);function xgl(...t){return t.reduce(kgl)}Al.and=xgl;var jgl=Jzt(Al.operators.OR);function Ugl(...t){return t.reduce(jgl)}Al.or=Ugl;function Jzt(t){return(e,I)=>e===_l.nil?I:I===_l.nil?e:(0,_l._)`${q9e(e)} ${t} ${q9e(I)}`}function q9e(t){return t instanceof _l.Name?t:(0,_l._)`(${t})`}});var en=Y(vl=>{"use strict";o();Object.defineProperty(vl,"__esModule",{value:!0});vl.checkStrictMode=vl.getErrorPath=vl.Type=vl.useFunc=vl.setEvaluated=vl.evaluatedPropsToName=vl.mergeEvaluated=vl.eachItem=vl.unescapeJsonPointer=vl.escapeJsonPointer=vl.escapeFragment=vl.unescapeFragment=vl.schemaRefOrVal=vl.schemaHasRulesButRef=vl.schemaHasRules=vl.checkUnknownRules=vl.alwaysValidSchema=vl.toHash=void 0;var ia=Zl(),Ogl=NP();function zgl(t){let e={};for(let I of t)e[I]=!0;return e}vl.toHash=zgl;function Bgl(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(kzt(t,e),!xzt(e,t.self.RULES.all))}vl.alwaysValidSchema=Bgl;function kzt(t,e=t.schema){let{opts:I,self:l}=t;if(!I.strictSchema||typeof e=="boolean")return;let n=l.RULES.keywords;for(let a in e)n[a]||Ozt(t,`unknown keyword: "${a}"`)}vl.checkUnknownRules=kzt;function xzt(t,e){if(typeof t=="boolean")return!t;for(let I in t)if(e[I])return!0;return!1}vl.schemaHasRules=xzt;function Mgl(t,e){if(typeof t=="boolean")return!t;for(let I in t)if(I!=="$ref"&&e.all[I])return!0;return!1}vl.schemaHasRulesButRef=Mgl;function Sgl({topSchemaRef:t,schemaPath:e},I,l,n){if(!n){if(typeof I=="number"||typeof I=="boolean")return I;if(typeof I=="string")return(0,ia._)`${I}`}return(0,ia._)`${t}${e}${(0,ia.getProperty)(l)}`}vl.schemaRefOrVal=Sgl;function Tgl(t){return jzt(decodeURIComponent(t))}vl.unescapeFragment=Tgl;function _gl(t){return encodeURIComponent($9e(t))}vl.escapeFragment=_gl;function $9e(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}vl.escapeJsonPointer=$9e;function jzt(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}vl.unescapeJsonPointer=jzt;function Kgl(t,e){if(Array.isArray(t))for(let I of t)e(I);else e(t)}vl.eachItem=Kgl;function Czt({mergeNames:t,mergeToName:e,mergeValues:I,resultToName:l}){return(n,a,c,r)=>{let s=c===void 0?a:c instanceof ia.Name?(a instanceof ia.Name?t(n,a,c):e(n,a,c),c):a instanceof ia.Name?(e(n,c,a),a):I(a,c);return r===ia.Name&&!(s instanceof ia.Name)?l(n,s):s}}vl.mergeEvaluated={props:Czt({mergeNames:(t,e,I)=>t.if((0,ia._)`${I} !== true && ${e} !== undefined`,()=>{t.if((0,ia._)`${e} === true`,()=>t.assign(I,!0),()=>t.assign(I,(0,ia._)`${I} || {}`).code((0,ia._)`Object.assign(${I}, ${e})`))}),mergeToName:(t,e,I)=>t.if((0,ia._)`${I} !== true`,()=>{e===!0?t.assign(I,!0):(t.assign(I,(0,ia._)`${I} || {}`),eOe(t,I,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:Uzt}),items:Czt({mergeNames:(t,e,I)=>t.if((0,ia._)`${I} !== true && ${e} !== undefined`,()=>t.assign(I,(0,ia._)`${e} === true ? true : ${I} > ${e} ? ${I} : ${e}`)),mergeToName:(t,e,I)=>t.if((0,ia._)`${I} !== true`,()=>t.assign(I,e===!0?!0:(0,ia._)`${I} > ${e} ? ${I} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function Uzt(t,e){if(e===!0)return t.var("props",!0);let I=t.var("props",(0,ia._)`{}`);return e!==void 0&&eOe(t,I,e),I}vl.evaluatedPropsToName=Uzt;function eOe(t,e,I){Object.keys(I).forEach(l=>t.assign((0,ia._)`${e}${(0,ia.getProperty)(l)}`,!0))}vl.setEvaluated=eOe;var Lzt={};function Dgl(t,e){return t.scopeValue("func",{ref:e,code:Lzt[e.code]||(Lzt[e.code]=new Ogl._Code(e.code))})}vl.useFunc=Dgl;var P9e;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(P9e||(vl.Type=P9e={}));function qgl(t,e,I){if(t instanceof ia.Name){let l=e===P9e.Num;return I?l?(0,ia._)`"[" + ${t} + "]"`:(0,ia._)`"['" + ${t} + "']"`:l?(0,ia._)`"/" + ${t}`:(0,ia._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return I?(0,ia.getProperty)(t).toString():"/"+$9e(t)}vl.getErrorPath=qgl;function Ozt(t,e,I=t.opts.strictSchema){if(I){if(e=`strict mode: ${e}`,I===!0)throw new Error(e);t.self.logger.warn(e)}}vl.checkStrictMode=Ozt});var zg=Y(tOe=>{"use strict";o();Object.defineProperty(tOe,"__esModule",{value:!0});var yG=Zl(),Pgl={data:new yG.Name("data"),valCxt:new yG.Name("valCxt"),instancePath:new yG.Name("instancePath"),parentData:new yG.Name("parentData"),parentDataProperty:new yG.Name("parentDataProperty"),rootData:new yG.Name("rootData"),dynamicAnchors:new yG.Name("dynamicAnchors"),vErrors:new yG.Name("vErrors"),errors:new yG.Name("errors"),this:new yG.Name("this"),self:new yG.Name("self"),scope:new yG.Name("scope"),json:new yG.Name("json"),jsonPos:new yG.Name("jsonPos"),jsonLen:new yG.Name("jsonLen"),jsonPart:new yG.Name("jsonPart")};tOe.default=Pgl});var XP=Y(wG=>{"use strict";o();Object.defineProperty(wG,"__esModule",{value:!0});wG.extendErrors=wG.resetErrorsCount=wG.reportExtraError=wG.reportError=wG.keyword$DataError=wG.keywordError=void 0;var tn=Zl(),wZe=en(),ib=zg();wG.keywordError={message:({keyword:t})=>(0,tn.str)`must pass "${t}" keyword validation`};wG.keyword$DataError={message:({keyword:t,schemaType:e})=>e?(0,tn.str)`"${t}" keyword must be ${e} ($data)`:(0,tn.str)`"${t}" keyword is invalid ($data)`};function $gl(t,e=wG.keywordError,I,l){let{it:n}=t,{gen:a,compositeRule:c,allErrors:r}=n,s=Mzt(t,e,I);l??(c||r)?zzt(a,s):Bzt(n,(0,tn._)`[${s}]`)}wG.reportError=$gl;function evl(t,e=wG.keywordError,I){let{it:l}=t,{gen:n,compositeRule:a,allErrors:c}=l,r=Mzt(t,e,I);zzt(n,r),a||c||Bzt(l,ib.default.vErrors)}wG.reportExtraError=evl;function tvl(t,e){t.assign(ib.default.errors,e),t.if((0,tn._)`${ib.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,tn._)`${ib.default.vErrors}.length`,e),()=>t.assign(ib.default.vErrors,null)))}wG.resetErrorsCount=tvl;function Ivl({gen:t,keyword:e,schemaValue:I,data:l,errsCount:n,it:a}){if(n===void 0)throw new Error("ajv implementation error");let c=t.name("err");t.forRange("i",n,ib.default.errors,r=>{t.const(c,(0,tn._)`${ib.default.vErrors}[${r}]`),t.if((0,tn._)`${c}.instancePath === undefined`,()=>t.assign((0,tn._)`${c}.instancePath`,(0,tn.strConcat)(ib.default.instancePath,a.errorPath))),t.assign((0,tn._)`${c}.schemaPath`,(0,tn.str)`${a.errSchemaPath}/${e}`),a.opts.verbose&&(t.assign((0,tn._)`${c}.schema`,I),t.assign((0,tn._)`${c}.data`,l))})}wG.extendErrors=Ivl;function zzt(t,e){let I=t.const("err",e);t.if((0,tn._)`${ib.default.vErrors} === null`,()=>t.assign(ib.default.vErrors,(0,tn._)`[${I}]`),(0,tn._)`${ib.default.vErrors}.push(${I})`),t.code((0,tn._)`${ib.default.errors}++`)}function Bzt(t,e){let{gen:I,validateName:l,schemaEnv:n}=t;n.$async?I.throw((0,tn._)`new ${t.ValidationError}(${e})`):(I.assign((0,tn._)`${l}.errors`,e),I.return(!1))}var cL={keyword:new tn.Name("keyword"),schemaPath:new tn.Name("schemaPath"),params:new tn.Name("params"),propertyName:new tn.Name("propertyName"),message:new tn.Name("message"),schema:new tn.Name("schema"),parentSchema:new tn.Name("parentSchema")};function Mzt(t,e,I){let{createErrors:l}=t.it;return l===!1?(0,tn._)`{}`:lvl(t,e,I)}function lvl(t,e,I={}){let{gen:l,it:n}=t,a=[nvl(n,I),avl(t,I)];return cvl(t,e,a),l.object(...a)}function nvl({errorPath:t},{instancePath:e}){let I=e?(0,tn.str)`${t}${(0,wZe.getErrorPath)(e,wZe.Type.Str)}`:t;return[ib.default.instancePath,(0,tn.strConcat)(ib.default.instancePath,I)]}function avl({keyword:t,it:{errSchemaPath:e}},{schemaPath:I,parentSchema:l}){let n=l?e:(0,tn.str)`${e}/${t}`;return I&&(n=(0,tn.str)`${n}${(0,wZe.getErrorPath)(I,wZe.Type.Str)}`),[cL.schemaPath,n]}function cvl(t,{params:e,message:I},l){let{keyword:n,data:a,schemaValue:c,it:r}=t,{opts:s,propertyName:i,topSchemaRef:G,schemaPath:d}=r;l.push([cL.keyword,n],[cL.params,typeof e=="function"?e(t):e||(0,tn._)`{}`]),s.messages&&l.push([cL.message,typeof I=="function"?I(t):I]),s.verbose&&l.push([cL.schema,c],[cL.parentSchema,(0,tn._)`${G}${d}`],[ib.default.data,a]),i&&l.push([cL.propertyName,i])}});var Tzt=Y(VO=>{"use strict";o();Object.defineProperty(VO,"__esModule",{value:!0});VO.boolOrEmptySchema=VO.topBoolOrEmptySchema=void 0;var rvl=XP(),svl=Zl(),ovl=zg(),ivl={message:"boolean schema is false"};function Gvl(t){let{gen:e,schema:I,validateName:l}=t;I===!1?Szt(t,!1):typeof I=="object"&&I.$async===!0?e.return(ovl.default.data):(e.assign((0,svl._)`${l}.errors`,null),e.return(!0))}VO.topBoolOrEmptySchema=Gvl;function dvl(t,e){let{gen:I,schema:l}=t;l===!1?(I.var(e,!1),Szt(t)):I.var(e,!0)}VO.boolOrEmptySchema=dvl;function Szt(t,e){let{gen:I,data:l}=t,n={gen:I,keyword:"false schema",data:l,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,rvl.reportError)(n,ivl,void 0,e)}});var IOe=Y(YO=>{"use strict";o();Object.defineProperty(YO,"__esModule",{value:!0});YO.getRules=YO.isJSONType=void 0;var uvl=["string","number","integer","boolean","null","object","array"],bvl=new Set(uvl);function mvl(t){return typeof t=="string"&&bvl.has(t)}YO.isJSONType=mvl;function Zvl(){let t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}YO.getRules=Zvl});var lOe=Y(Pf=>{"use strict";o();Object.defineProperty(Pf,"__esModule",{value:!0});Pf.shouldUseRule=Pf.shouldUseGroup=Pf.schemaHasRulesForType=void 0;function pvl({schema:t,self:e},I){let l=e.RULES.types[I];return l&&l!==!0&&_zt(t,l)}Pf.schemaHasRulesForType=pvl;function _zt(t,e){return e.rules.some(I=>Kzt(t,I))}Pf.shouldUseGroup=_zt;function Kzt(t,e){var I;return t[e.keyword]!==void 0||((I=e.definition.implements)===null||I===void 0?void 0:I.some(l=>t[l]!==void 0))}Pf.shouldUseRule=Kzt});var gP=Y(HG=>{"use strict";o();Object.defineProperty(HG,"__esModule",{value:!0});HG.reportTypeError=HG.checkDataTypes=HG.checkDataType=HG.coerceAndCheckDataType=HG.getJSONTypes=HG.getSchemaTypes=HG.DataType=void 0;var hvl=IOe(),Wvl=lOe(),Nvl=XP(),il=Zl(),Dzt=en(),RO;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(RO||(HG.DataType=RO={}));function Vvl(t){let e=qzt(t.type);if(e.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&e.push("null")}return e}HG.getSchemaTypes=Vvl;function qzt(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(hvl.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}HG.getJSONTypes=qzt;function Yvl(t,e){let{gen:I,data:l,opts:n}=t,a=Rvl(e,n.coerceTypes),c=e.length>0&&!(a.length===0&&e.length===1&&(0,Wvl.schemaHasRulesForType)(t,e[0]));if(c){let r=aOe(e,l,n.strictNumbers,RO.Wrong);I.if(r,()=>{a.length?Avl(t,e,a):cOe(t)})}return c}HG.coerceAndCheckDataType=Yvl;var Pzt=new Set(["string","number","integer","boolean","null"]);function Rvl(t,e){return e?t.filter(I=>Pzt.has(I)||e==="array"&&I==="array"):[]}function Avl(t,e,I){let{gen:l,data:n,opts:a}=t,c=l.let("dataType",(0,il._)`typeof ${n}`),r=l.let("coerced",(0,il._)`undefined`);a.coerceTypes==="array"&&l.if((0,il._)`${c} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,()=>l.assign(n,(0,il._)`${n}[0]`).assign(c,(0,il._)`typeof ${n}`).if(aOe(e,n,a.strictNumbers),()=>l.assign(r,n))),l.if((0,il._)`${r} !== undefined`);for(let i of I)(Pzt.has(i)||i==="array"&&a.coerceTypes==="array")&&s(i);l.else(),cOe(t),l.endIf(),l.if((0,il._)`${r} !== undefined`,()=>{l.assign(n,r),Fvl(t,r)});function s(i){switch(i){case"string":l.elseIf((0,il._)`${c} == "number" || ${c} == "boolean"`).assign(r,(0,il._)`"" + ${n}`).elseIf((0,il._)`${n} === null`).assign(r,(0,il._)`""`);return;case"number":l.elseIf((0,il._)`${c} == "boolean" || ${n} === null + || (${c} == "string" && ${n} && ${n} == +${n})`).assign(r,(0,il._)`+${n}`);return;case"integer":l.elseIf((0,il._)`${c} === "boolean" || ${n} === null + || (${c} === "string" && ${n} && ${n} == +${n} && !(${n} % 1))`).assign(r,(0,il._)`+${n}`);return;case"boolean":l.elseIf((0,il._)`${n} === "false" || ${n} === 0 || ${n} === null`).assign(r,!1).elseIf((0,il._)`${n} === "true" || ${n} === 1`).assign(r,!0);return;case"null":l.elseIf((0,il._)`${n} === "" || ${n} === 0 || ${n} === false`),l.assign(r,null);return;case"array":l.elseIf((0,il._)`${c} === "string" || ${c} === "number" + || ${c} === "boolean" || ${n} === null`).assign(r,(0,il._)`[${n}]`)}}}function Fvl({gen:t,parentData:e,parentDataProperty:I},l){t.if((0,il._)`${e} !== undefined`,()=>t.assign((0,il._)`${e}[${I}]`,l))}function nOe(t,e,I,l=RO.Correct){let n=l===RO.Correct?il.operators.EQ:il.operators.NEQ,a;switch(t){case"null":return(0,il._)`${e} ${n} null`;case"array":a=(0,il._)`Array.isArray(${e})`;break;case"object":a=(0,il._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":a=c((0,il._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":a=c();break;default:return(0,il._)`typeof ${e} ${n} ${t}`}return l===RO.Correct?a:(0,il.not)(a);function c(r=il.nil){return(0,il.and)((0,il._)`typeof ${e} == "number"`,r,I?(0,il._)`isFinite(${e})`:il.nil)}}HG.checkDataType=nOe;function aOe(t,e,I,l){if(t.length===1)return nOe(t[0],e,I,l);let n,a=(0,Dzt.toHash)(t);if(a.array&&a.object){let c=(0,il._)`typeof ${e} != "object"`;n=a.null?c:(0,il._)`!${e} || ${c}`,delete a.null,delete a.array,delete a.object}else n=il.nil;a.number&&delete a.integer;for(let c in a)n=(0,il.and)(n,nOe(c,e,I,l));return n}HG.checkDataTypes=aOe;var Xvl={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,il._)`{type: ${t}}`:(0,il._)`{type: ${e}}`};function cOe(t){let e=gvl(t);(0,Nvl.reportError)(e,Xvl)}HG.reportTypeError=cOe;function gvl(t){let{gen:e,data:I,schema:l}=t,n=(0,Dzt.schemaRefOrVal)(t,l,"type");return{gen:e,keyword:"type",data:I,schema:l.type,schemaCode:n,schemaValue:n,parentSchema:l,params:{},it:t}}});var eBt=Y(HZe=>{"use strict";o();Object.defineProperty(HZe,"__esModule",{value:!0});HZe.assignDefaults=void 0;var AO=Zl(),vvl=en();function yvl(t,e){let{properties:I,items:l}=t.schema;if(e==="object"&&I)for(let n in I)$zt(t,n,I[n].default);else e==="array"&&Array.isArray(l)&&l.forEach((n,a)=>$zt(t,a,n.default))}HZe.assignDefaults=yvl;function $zt(t,e,I){let{gen:l,compositeRule:n,data:a,opts:c}=t;if(I===void 0)return;let r=(0,AO._)`${a}${(0,AO.getProperty)(e)}`;if(n){(0,vvl.checkStrictMode)(t,`default is ignored for: ${r}`);return}let s=(0,AO._)`${r} === undefined`;c.useDefaults==="empty"&&(s=(0,AO._)`${s} || ${r} === null || ${r} === ""`),l.if(s,(0,AO._)`${r} = ${(0,AO.stringify)(I)}`)}});var vh=Y(ta=>{"use strict";o();Object.defineProperty(ta,"__esModule",{value:!0});ta.validateUnion=ta.validateArray=ta.usePattern=ta.callValidateCode=ta.schemaProperties=ta.allSchemaProperties=ta.noPropertyInData=ta.propertyInData=ta.isOwnProperty=ta.hasPropFunc=ta.reportMissingProp=ta.checkMissingProp=ta.checkReportMissingProp=void 0;var dc=Zl(),rOe=en(),$f=zg(),wvl=en();function Hvl(t,e){let{gen:I,data:l,it:n}=t;I.if(oOe(I,l,e,n.opts.ownProperties),()=>{t.setParams({missingProperty:(0,dc._)`${e}`},!0),t.error()})}ta.checkReportMissingProp=Hvl;function Qvl({gen:t,data:e,it:{opts:I}},l,n){return(0,dc.or)(...l.map(a=>(0,dc.and)(oOe(t,e,a,I.ownProperties),(0,dc._)`${n} = ${a}`)))}ta.checkMissingProp=Qvl;function fvl(t,e){t.setParams({missingProperty:e},!0),t.error()}ta.reportMissingProp=fvl;function tBt(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,dc._)`Object.prototype.hasOwnProperty`})}ta.hasPropFunc=tBt;function sOe(t,e,I){return(0,dc._)`${tBt(t)}.call(${e}, ${I})`}ta.isOwnProperty=sOe;function Evl(t,e,I,l){let n=(0,dc._)`${e}${(0,dc.getProperty)(I)} !== undefined`;return l?(0,dc._)`${n} && ${sOe(t,e,I)}`:n}ta.propertyInData=Evl;function oOe(t,e,I,l){let n=(0,dc._)`${e}${(0,dc.getProperty)(I)} === undefined`;return l?(0,dc.or)(n,(0,dc.not)(sOe(t,e,I))):n}ta.noPropertyInData=oOe;function IBt(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}ta.allSchemaProperties=IBt;function Jvl(t,e){return IBt(e).filter(I=>!(0,rOe.alwaysValidSchema)(t,e[I]))}ta.schemaProperties=Jvl;function Cvl({schemaCode:t,data:e,it:{gen:I,topSchemaRef:l,schemaPath:n,errorPath:a},it:c},r,s,i){let G=i?(0,dc._)`${t}, ${e}, ${l}${n}`:e,d=[[$f.default.instancePath,(0,dc.strConcat)($f.default.instancePath,a)],[$f.default.parentData,c.parentData],[$f.default.parentDataProperty,c.parentDataProperty],[$f.default.rootData,$f.default.rootData]];c.opts.dynamicRef&&d.push([$f.default.dynamicAnchors,$f.default.dynamicAnchors]);let u=(0,dc._)`${G}, ${I.object(...d)}`;return s!==dc.nil?(0,dc._)`${r}.call(${s}, ${u})`:(0,dc._)`${r}(${u})`}ta.callValidateCode=Cvl;var Lvl=(0,dc._)`new RegExp`;function kvl({gen:t,it:{opts:e}},I){let l=e.unicodeRegExp?"u":"",{regExp:n}=e.code,a=n(I,l);return t.scopeValue("pattern",{key:a.toString(),ref:a,code:(0,dc._)`${n.code==="new RegExp"?Lvl:(0,wvl.useFunc)(t,n)}(${I}, ${l})`})}ta.usePattern=kvl;function xvl(t){let{gen:e,data:I,keyword:l,it:n}=t,a=e.name("valid");if(n.allErrors){let r=e.let("valid",!0);return c(()=>e.assign(r,!1)),r}return e.var(a,!0),c(()=>e.break()),a;function c(r){let s=e.const("len",(0,dc._)`${I}.length`);e.forRange("i",0,s,i=>{t.subschema({keyword:l,dataProp:i,dataPropType:rOe.Type.Num},a),e.if((0,dc.not)(a),r)})}}ta.validateArray=xvl;function jvl(t){let{gen:e,schema:I,keyword:l,it:n}=t;if(!Array.isArray(I))throw new Error("ajv implementation error");if(I.some(s=>(0,rOe.alwaysValidSchema)(n,s))&&!n.opts.unevaluated)return;let c=e.let("valid",!1),r=e.name("_valid");e.block(()=>I.forEach((s,i)=>{let G=t.subschema({keyword:l,schemaProp:i,compositeRule:!0},r);e.assign(c,(0,dc._)`${c} || ${r}`),t.mergeValidEvaluated(G,r)||e.if((0,dc.not)(c))})),t.result(c,()=>t.reset(),()=>t.error(!0))}ta.validateUnion=jvl});var aBt=Y(I2=>{"use strict";o();Object.defineProperty(I2,"__esModule",{value:!0});I2.validateKeywordUsage=I2.validSchemaType=I2.funcKeywordCode=I2.macroKeywordCode=void 0;var Gb=Zl(),rL=zg(),Uvl=vh(),Ovl=XP();function zvl(t,e){let{gen:I,keyword:l,schema:n,parentSchema:a,it:c}=t,r=e.macro.call(c.self,n,a,c),s=nBt(I,l,r);c.opts.validateSchema!==!1&&c.self.validateSchema(r,!0);let i=I.name("valid");t.subschema({schema:r,schemaPath:Gb.nil,errSchemaPath:`${c.errSchemaPath}/${l}`,topSchemaRef:s,compositeRule:!0},i),t.pass(i,()=>t.error(!0))}I2.macroKeywordCode=zvl;function Bvl(t,e){var I;let{gen:l,keyword:n,schema:a,parentSchema:c,$data:r,it:s}=t;Svl(s,e);let i=!r&&e.compile?e.compile.call(s.self,a,c,s):e.validate,G=nBt(l,n,i),d=l.let("valid");t.block$data(d,u),t.ok((I=e.valid)!==null&&I!==void 0?I:d);function u(){if(e.errors===!1)p(),e.modifying&&lBt(t),W(()=>t.error());else{let h=e.async?b():Z();e.modifying&&lBt(t),W(()=>Mvl(t,h))}}function b(){let h=l.let("ruleErrs",null);return l.try(()=>p((0,Gb._)`await `),N=>l.assign(d,!1).if((0,Gb._)`${N} instanceof ${s.ValidationError}`,()=>l.assign(h,(0,Gb._)`${N}.errors`),()=>l.throw(N))),h}function Z(){let h=(0,Gb._)`${G}.errors`;return l.assign(h,null),p(Gb.nil),h}function p(h=e.async?(0,Gb._)`await `:Gb.nil){let N=s.opts.passContext?rL.default.this:rL.default.self,V=!("compile"in e&&!r||e.schema===!1);l.assign(d,(0,Gb._)`${h}${(0,Uvl.callValidateCode)(t,G,N,V)}`,e.modifying)}function W(h){var N;l.if((0,Gb.not)((N=e.valid)!==null&&N!==void 0?N:d),h)}}I2.funcKeywordCode=Bvl;function lBt(t){let{gen:e,data:I,it:l}=t;e.if(l.parentData,()=>e.assign(I,(0,Gb._)`${l.parentData}[${l.parentDataProperty}]`))}function Mvl(t,e){let{gen:I}=t;I.if((0,Gb._)`Array.isArray(${e})`,()=>{I.assign(rL.default.vErrors,(0,Gb._)`${rL.default.vErrors} === null ? ${e} : ${rL.default.vErrors}.concat(${e})`).assign(rL.default.errors,(0,Gb._)`${rL.default.vErrors}.length`),(0,Ovl.extendErrors)(t)},()=>t.error())}function Svl({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function nBt(t,e,I){if(I===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof I=="function"?{ref:I}:{ref:I,code:(0,Gb.stringify)(I)})}function Tvl(t,e,I=!1){return!e.length||e.some(l=>l==="array"?Array.isArray(t):l==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==l||I&&typeof t>"u")}I2.validSchemaType=Tvl;function _vl({schema:t,opts:e,self:I,errSchemaPath:l},n,a){if(Array.isArray(n.keyword)?!n.keyword.includes(a):n.keyword!==a)throw new Error("ajv implementation error");let c=n.dependencies;if(c?.some(r=>!Object.prototype.hasOwnProperty.call(t,r)))throw new Error(`parent schema must have dependencies of ${a}: ${c.join(",")}`);if(n.validateSchema&&!n.validateSchema(t[a])){let s=`keyword "${a}" value is invalid at path "${l}": `+I.errorsText(n.validateSchema.errors);if(e.validateSchema==="log")I.logger.error(s);else throw new Error(s)}}I2.validateKeywordUsage=_vl});var rBt=Y(eE=>{"use strict";o();Object.defineProperty(eE,"__esModule",{value:!0});eE.extendSubschemaMode=eE.extendSubschemaData=eE.getSubschema=void 0;var l2=Zl(),cBt=en();function Kvl(t,{keyword:e,schemaProp:I,schema:l,schemaPath:n,errSchemaPath:a,topSchemaRef:c}){if(e!==void 0&&l!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let r=t.schema[e];return I===void 0?{schema:r,schemaPath:(0,l2._)`${t.schemaPath}${(0,l2.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:r[I],schemaPath:(0,l2._)`${t.schemaPath}${(0,l2.getProperty)(e)}${(0,l2.getProperty)(I)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,cBt.escapeFragment)(I)}`}}if(l!==void 0){if(n===void 0||a===void 0||c===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:l,schemaPath:n,topSchemaRef:c,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')}eE.getSubschema=Kvl;function Dvl(t,e,{dataProp:I,dataPropType:l,data:n,dataTypes:a,propertyName:c}){if(n!==void 0&&I!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:r}=e;if(I!==void 0){let{errorPath:i,dataPathArr:G,opts:d}=e,u=r.let("data",(0,l2._)`${e.data}${(0,l2.getProperty)(I)}`,!0);s(u),t.errorPath=(0,l2.str)`${i}${(0,cBt.getErrorPath)(I,l,d.jsPropertySyntax)}`,t.parentDataProperty=(0,l2._)`${I}`,t.dataPathArr=[...G,t.parentDataProperty]}if(n!==void 0){let i=n instanceof l2.Name?n:r.let("data",n,!0);s(i),c!==void 0&&(t.propertyName=c)}a&&(t.dataTypes=a);function s(i){t.data=i,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,i]}}eE.extendSubschemaData=Dvl;function qvl(t,{jtdDiscriminator:e,jtdMetadata:I,compositeRule:l,createErrors:n,allErrors:a}){l!==void 0&&(t.compositeRule=l),n!==void 0&&(t.createErrors=n),a!==void 0&&(t.allErrors=a),t.jtdDiscriminator=e,t.jtdMetadata=I}eE.extendSubschemaMode=qvl});var iOe=Y((xxc,sBt)=>{"use strict";o();sBt.exports=function t(e,I){if(e===I)return!0;if(e&&I&&typeof e=="object"&&typeof I=="object"){if(e.constructor!==I.constructor)return!1;var l,n,a;if(Array.isArray(e)){if(l=e.length,l!=I.length)return!1;for(n=l;n--!==0;)if(!t(e[n],I[n]))return!1;return!0}if(e.constructor===RegExp)return e.source===I.source&&e.flags===I.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===I.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===I.toString();if(a=Object.keys(e),l=a.length,l!==Object.keys(I).length)return!1;for(n=l;n--!==0;)if(!Object.prototype.hasOwnProperty.call(I,a[n]))return!1;for(n=l;n--!==0;){var c=a[n];if(!t(e[c],I[c]))return!1}return!0}return e!==e&&I!==I}});var iBt=Y((Uxc,oBt)=>{"use strict";o();var tE=oBt.exports=function(t,e,I){typeof e=="function"&&(I=e,e={}),I=e.cb||I;var l=typeof I=="function"?I:I.pre||function(){},n=I.post||function(){};QZe(e,l,n,t,"",t)};tE.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};tE.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};tE.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};tE.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function QZe(t,e,I,l,n,a,c,r,s,i){if(l&&typeof l=="object"&&!Array.isArray(l)){e(l,n,a,c,r,s,i);for(var G in l){var d=l[G];if(Array.isArray(d)){if(G in tE.arrayKeywords)for(var u=0;u{"use strict";o();Object.defineProperty(bm,"__esModule",{value:!0});bm.getSchemaRefs=bm.resolveUrl=bm.normalizeId=bm._getFullPath=bm.getFullPath=bm.inlineRef=void 0;var $vl=en(),eyl=iOe(),tyl=iBt(),Iyl=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function lyl(t,e=!0){return typeof t=="boolean"?!0:e===!0?!GOe(t):e?GBt(t)<=e:!1}bm.inlineRef=lyl;var nyl=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function GOe(t){for(let e in t){if(nyl.has(e))return!0;let I=t[e];if(Array.isArray(I)&&I.some(GOe)||typeof I=="object"&&GOe(I))return!0}return!1}function GBt(t){let e=0;for(let I in t){if(I==="$ref")return 1/0;if(e++,!Iyl.has(I)&&(typeof t[I]=="object"&&(0,$vl.eachItem)(t[I],l=>e+=GBt(l)),e===1/0))return 1/0}return e}function dBt(t,e="",I){I!==!1&&(e=FO(e));let l=t.parse(e);return uBt(t,l)}bm.getFullPath=dBt;function uBt(t,e){return t.serialize(e).split("#")[0]+"#"}bm._getFullPath=uBt;var ayl=/#\/?$/;function FO(t){return t?t.replace(ayl,""):""}bm.normalizeId=FO;function cyl(t,e,I){return I=FO(I),t.resolve(e,I)}bm.resolveUrl=cyl;var ryl=/^[a-z_][-a-z0-9._]*$/i;function syl(t,e){if(typeof t=="boolean")return{};let{schemaId:I,uriResolver:l}=this.opts,n=FO(t[I]||e),a={"":n},c=dBt(l,n,!1),r={},s=new Set;return tyl(t,{allKeys:!0},(d,u,b,Z)=>{if(Z===void 0)return;let p=c+u,W=a[Z];typeof d[I]=="string"&&(W=h.call(this,d[I])),N.call(this,d.$anchor),N.call(this,d.$dynamicAnchor),a[u]=W;function h(V){let R=this.opts.uriResolver.resolve;if(V=FO(W?R(W,V):V),s.has(V))throw G(V);s.add(V);let F=this.refs[V];return typeof F=="string"&&(F=this.refs[F]),typeof F=="object"?i(d,F.schema,V):V!==FO(p)&&(V[0]==="#"?(i(d,r[V],V),r[V]=d):this.refs[V]=p),V}function N(V){if(typeof V=="string"){if(!ryl.test(V))throw new Error(`invalid anchor "${V}"`);h.call(this,`#${V}`)}}}),r;function i(d,u,b){if(u!==void 0&&!eyl(d,u))throw G(b)}function G(d){return new Error(`reference "${d}" resolves to more than one schema`)}}bm.getSchemaRefs=syl});var HP=Y(IE=>{"use strict";o();Object.defineProperty(IE,"__esModule",{value:!0});IE.getData=IE.KeywordCxt=IE.validateFunctionCode=void 0;var hBt=Tzt(),bBt=gP(),uOe=lOe(),fZe=gP(),oyl=eBt(),wP=aBt(),dOe=rBt(),II=Zl(),OI=zg(),iyl=vP(),Bg=en(),yP=XP();function Gyl(t){if(VBt(t)&&(YBt(t),NBt(t))){byl(t);return}WBt(t,()=>(0,hBt.topBoolOrEmptySchema)(t))}IE.validateFunctionCode=Gyl;function WBt({gen:t,validateName:e,schema:I,schemaEnv:l,opts:n},a){n.code.es5?t.func(e,(0,II._)`${OI.default.data}, ${OI.default.valCxt}`,l.$async,()=>{t.code((0,II._)`"use strict"; ${mBt(I,n)}`),uyl(t,n),t.code(a)}):t.func(e,(0,II._)`${OI.default.data}, ${dyl(n)}`,l.$async,()=>t.code(mBt(I,n)).code(a))}function dyl(t){return(0,II._)`{${OI.default.instancePath}="", ${OI.default.parentData}, ${OI.default.parentDataProperty}, ${OI.default.rootData}=${OI.default.data}${t.dynamicRef?(0,II._)`, ${OI.default.dynamicAnchors}={}`:II.nil}}={}`}function uyl(t,e){t.if(OI.default.valCxt,()=>{t.var(OI.default.instancePath,(0,II._)`${OI.default.valCxt}.${OI.default.instancePath}`),t.var(OI.default.parentData,(0,II._)`${OI.default.valCxt}.${OI.default.parentData}`),t.var(OI.default.parentDataProperty,(0,II._)`${OI.default.valCxt}.${OI.default.parentDataProperty}`),t.var(OI.default.rootData,(0,II._)`${OI.default.valCxt}.${OI.default.rootData}`),e.dynamicRef&&t.var(OI.default.dynamicAnchors,(0,II._)`${OI.default.valCxt}.${OI.default.dynamicAnchors}`)},()=>{t.var(OI.default.instancePath,(0,II._)`""`),t.var(OI.default.parentData,(0,II._)`undefined`),t.var(OI.default.parentDataProperty,(0,II._)`undefined`),t.var(OI.default.rootData,OI.default.data),e.dynamicRef&&t.var(OI.default.dynamicAnchors,(0,II._)`{}`)})}function byl(t){let{schema:e,opts:I,gen:l}=t;WBt(t,()=>{I.$comment&&e.$comment&&ABt(t),Wyl(t),l.let(OI.default.vErrors,null),l.let(OI.default.errors,0),I.unevaluated&&myl(t),RBt(t),Yyl(t)})}function myl(t){let{gen:e,validateName:I}=t;t.evaluated=e.const("evaluated",(0,II._)`${I}.evaluated`),e.if((0,II._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,II._)`${t.evaluated}.props`,(0,II._)`undefined`)),e.if((0,II._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,II._)`${t.evaluated}.items`,(0,II._)`undefined`))}function mBt(t,e){let I=typeof t=="object"&&t[e.schemaId];return I&&(e.code.source||e.code.process)?(0,II._)`/*# sourceURL=${I} */`:II.nil}function Zyl(t,e){if(VBt(t)&&(YBt(t),NBt(t))){pyl(t,e);return}(0,hBt.boolOrEmptySchema)(t,e)}function NBt({schema:t,self:e}){if(typeof t=="boolean")return!t;for(let I in t)if(e.RULES.all[I])return!0;return!1}function VBt(t){return typeof t.schema!="boolean"}function pyl(t,e){let{schema:I,gen:l,opts:n}=t;n.$comment&&I.$comment&&ABt(t),Nyl(t),Vyl(t);let a=l.const("_errs",OI.default.errors);RBt(t,a),l.var(e,(0,II._)`${a} === ${OI.default.errors}`)}function YBt(t){(0,Bg.checkUnknownRules)(t),hyl(t)}function RBt(t,e){if(t.opts.jtd)return ZBt(t,[],!1,e);let I=(0,bBt.getSchemaTypes)(t.schema),l=(0,bBt.coerceAndCheckDataType)(t,I);ZBt(t,I,!l,e)}function hyl(t){let{schema:e,errSchemaPath:I,opts:l,self:n}=t;e.$ref&&l.ignoreKeywordsWithRef&&(0,Bg.schemaHasRulesButRef)(e,n.RULES)&&n.logger.warn(`$ref: keywords ignored in schema at path "${I}"`)}function Wyl(t){let{schema:e,opts:I}=t;e.default!==void 0&&I.useDefaults&&I.strictSchema&&(0,Bg.checkStrictMode)(t,"default is ignored in the schema root")}function Nyl(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,iyl.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function Vyl(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function ABt({gen:t,schemaEnv:e,schema:I,errSchemaPath:l,opts:n}){let a=I.$comment;if(n.$comment===!0)t.code((0,II._)`${OI.default.self}.logger.log(${a})`);else if(typeof n.$comment=="function"){let c=(0,II.str)`${l}/$comment`,r=t.scopeValue("root",{ref:e.root});t.code((0,II._)`${OI.default.self}.opts.$comment(${a}, ${c}, ${r}.schema)`)}}function Yyl(t){let{gen:e,schemaEnv:I,validateName:l,ValidationError:n,opts:a}=t;I.$async?e.if((0,II._)`${OI.default.errors} === 0`,()=>e.return(OI.default.data),()=>e.throw((0,II._)`new ${n}(${OI.default.vErrors})`)):(e.assign((0,II._)`${l}.errors`,OI.default.vErrors),a.unevaluated&&Ryl(t),e.return((0,II._)`${OI.default.errors} === 0`))}function Ryl({gen:t,evaluated:e,props:I,items:l}){I instanceof II.Name&&t.assign((0,II._)`${e}.props`,I),l instanceof II.Name&&t.assign((0,II._)`${e}.items`,l)}function ZBt(t,e,I,l){let{gen:n,schema:a,data:c,allErrors:r,opts:s,self:i}=t,{RULES:G}=i;if(a.$ref&&(s.ignoreKeywordsWithRef||!(0,Bg.schemaHasRulesButRef)(a,G))){n.block(()=>XBt(t,"$ref",G.all.$ref.definition));return}s.jtd||Ayl(t,e),n.block(()=>{for(let u of G.rules)d(u);d(G.post)});function d(u){(0,uOe.shouldUseGroup)(a,u)&&(u.type?(n.if((0,fZe.checkDataType)(u.type,c,s.strictNumbers)),pBt(t,u),e.length===1&&e[0]===u.type&&I&&(n.else(),(0,fZe.reportTypeError)(t)),n.endIf()):pBt(t,u),r||n.if((0,II._)`${OI.default.errors} === ${l||0}`))}}function pBt(t,e){let{gen:I,schema:l,opts:{useDefaults:n}}=t;n&&(0,oyl.assignDefaults)(t,e.type),I.block(()=>{for(let a of e.rules)(0,uOe.shouldUseRule)(l,a)&&XBt(t,a.keyword,a.definition,e.type)})}function Ayl(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(Fyl(t,e),t.opts.allowUnionTypes||Xyl(t,e),gyl(t,t.dataTypes))}function Fyl(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(I=>{FBt(t.dataTypes,I)||bOe(t,`type "${I}" not allowed by context "${t.dataTypes.join(",")}"`)}),yyl(t,e)}}function Xyl(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&bOe(t,"use allowUnionTypes to allow union type keyword")}function gyl(t,e){let I=t.self.RULES.all;for(let l in I){let n=I[l];if(typeof n=="object"&&(0,uOe.shouldUseRule)(t.schema,n)){let{type:a}=n.definition;a.length&&!a.some(c=>vyl(e,c))&&bOe(t,`missing type "${a.join(",")}" for keyword "${l}"`)}}}function vyl(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function FBt(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function yyl(t,e){let I=[];for(let l of t.dataTypes)FBt(e,l)?I.push(l):e.includes("integer")&&l==="number"&&I.push("integer");t.dataTypes=I}function bOe(t,e){let I=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${I}" (strictTypes)`,(0,Bg.checkStrictMode)(t,e,t.opts.strictTypes)}var EZe=class{constructor(e,I,l){if((0,wP.validateKeywordUsage)(e,I,l),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=l,this.data=e.data,this.schema=e.schema[l],this.$data=I.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Bg.schemaRefOrVal)(e,this.schema,l,this.$data),this.schemaType=I.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=I,this.$data)this.schemaCode=e.gen.const("vSchema",gBt(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,wP.validSchemaType)(this.schema,I.schemaType,I.allowUndefined))throw new Error(`${l} value must be ${JSON.stringify(I.schemaType)}`);("code"in I?I.trackErrors:I.errors!==!1)&&(this.errsCount=e.gen.const("_errs",OI.default.errors))}result(e,I,l){this.failResult((0,II.not)(e),I,l)}failResult(e,I,l){this.gen.if(e),l?l():this.error(),I?(this.gen.else(),I(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,I){this.failResult((0,II.not)(e),void 0,I)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:I}=this;this.fail((0,II._)`${I} !== undefined && (${(0,II.or)(this.invalid$data(),e)})`)}error(e,I,l){if(I){this.setParams(I),this._error(e,l),this.setParams({});return}this._error(e,l)}_error(e,I){(e?yP.reportExtraError:yP.reportError)(this,this.def.error,I)}$dataError(){(0,yP.reportError)(this,this.def.$dataError||yP.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,yP.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,I){I?Object.assign(this.params,e):this.params=e}block$data(e,I,l=II.nil){this.gen.block(()=>{this.check$data(e,l),I()})}check$data(e=II.nil,I=II.nil){if(!this.$data)return;let{gen:l,schemaCode:n,schemaType:a,def:c}=this;l.if((0,II.or)((0,II._)`${n} === undefined`,I)),e!==II.nil&&l.assign(e,!0),(a.length||c.validateSchema)&&(l.elseIf(this.invalid$data()),this.$dataError(),e!==II.nil&&l.assign(e,!1)),l.else()}invalid$data(){let{gen:e,schemaCode:I,schemaType:l,def:n,it:a}=this;return(0,II.or)(c(),r());function c(){if(l.length){if(!(I instanceof II.Name))throw new Error("ajv implementation error");let s=Array.isArray(l)?l:[l];return(0,II._)`${(0,fZe.checkDataTypes)(s,I,a.opts.strictNumbers,fZe.DataType.Wrong)}`}return II.nil}function r(){if(n.validateSchema){let s=e.scopeValue("validate$data",{ref:n.validateSchema});return(0,II._)`!${s}(${I})`}return II.nil}}subschema(e,I){let l=(0,dOe.getSubschema)(this.it,e);(0,dOe.extendSubschemaData)(l,this.it,e),(0,dOe.extendSubschemaMode)(l,e);let n={...this.it,...l,items:void 0,props:void 0};return Zyl(n,I),n}mergeEvaluated(e,I){let{it:l,gen:n}=this;l.opts.unevaluated&&(l.props!==!0&&e.props!==void 0&&(l.props=Bg.mergeEvaluated.props(n,e.props,l.props,I)),l.items!==!0&&e.items!==void 0&&(l.items=Bg.mergeEvaluated.items(n,e.items,l.items,I)))}mergeValidEvaluated(e,I){let{it:l,gen:n}=this;if(l.opts.unevaluated&&(l.props!==!0||l.items!==!0))return n.if(I,()=>this.mergeEvaluated(e,II.Name)),!0}};IE.KeywordCxt=EZe;function XBt(t,e,I,l){let n=new EZe(t,I,e);"code"in I?I.code(n,l):n.$data&&I.validate?(0,wP.funcKeywordCode)(n,I):"macro"in I?(0,wP.macroKeywordCode)(n,I):(I.compile||I.validate)&&(0,wP.funcKeywordCode)(n,I)}var wyl=/^\/(?:[^~]|~0|~1)*$/,Hyl=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function gBt(t,{dataLevel:e,dataNames:I,dataPathArr:l}){let n,a;if(t==="")return OI.default.rootData;if(t[0]==="/"){if(!wyl.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);n=t,a=OI.default.rootData}else{let i=Hyl.exec(t);if(!i)throw new Error(`Invalid JSON-pointer: ${t}`);let G=+i[1];if(n=i[2],n==="#"){if(G>=e)throw new Error(s("property/index",G));return l[e-G]}if(G>e)throw new Error(s("data",G));if(a=I[e-G],!n)return a}let c=a,r=n.split("/");for(let i of r)i&&(a=(0,II._)`${a}${(0,II.getProperty)((0,Bg.unescapeJsonPointer)(i))}`,c=(0,II._)`${c} && ${a}`);return c;function s(i,G){return`Cannot access ${i} ${G} levels up, current level is ${e}`}}IE.getData=gBt});var JZe=Y(ZOe=>{"use strict";o();Object.defineProperty(ZOe,"__esModule",{value:!0});var mOe=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};ZOe.default=mOe});var QP=Y(WOe=>{"use strict";o();Object.defineProperty(WOe,"__esModule",{value:!0});var pOe=vP(),hOe=class extends Error{constructor(e,I,l,n){super(n||`can't resolve reference ${l} from id ${I}`),this.missingRef=(0,pOe.resolveUrl)(e,I,l),this.missingSchema=(0,pOe.normalizeId)((0,pOe.getFullPath)(e,this.missingRef))}};WOe.default=hOe});var LZe=Y(yh=>{"use strict";o();Object.defineProperty(yh,"__esModule",{value:!0});yh.resolveSchema=yh.getCompilingSchema=yh.resolveRef=yh.compileSchema=yh.SchemaEnv=void 0;var B0=Zl(),Qyl=JZe(),sL=zg(),M0=vP(),vBt=en(),fyl=HP(),XO=class{constructor(e){var I;this.refs={},this.dynamicAnchors={};let l;typeof e.schema=="object"&&(l=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(I=e.baseId)!==null&&I!==void 0?I:(0,M0.normalizeId)(l?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=l?.$async,this.refs={}}};yh.SchemaEnv=XO;function VOe(t){let e=yBt.call(this,t);if(e)return e;let I=(0,M0.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:l,lines:n}=this.opts.code,{ownProperties:a}=this.opts,c=new B0.CodeGen(this.scope,{es5:l,lines:n,ownProperties:a}),r;t.$async&&(r=c.scopeValue("Error",{ref:Qyl.default,code:(0,B0._)`require("ajv/dist/runtime/validation_error").default`}));let s=c.scopeName("validate");t.validateName=s;let i={gen:c,allErrors:this.opts.allErrors,data:sL.default.data,parentData:sL.default.parentData,parentDataProperty:sL.default.parentDataProperty,dataNames:[sL.default.data],dataPathArr:[B0.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:c.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,B0.stringify)(t.schema)}:{ref:t.schema}),validateName:s,ValidationError:r,schema:t.schema,schemaEnv:t,rootId:I,baseId:t.baseId||I,schemaPath:B0.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,B0._)`""`,opts:this.opts,self:this},G;try{this._compilations.add(t),(0,fyl.validateFunctionCode)(i),c.optimize(this.opts.code.optimize);let d=c.toString();G=`${c.scopeRefs(sL.default.scope)}return ${d}`,this.opts.code.process&&(G=this.opts.code.process(G,t));let b=new Function(`${sL.default.self}`,`${sL.default.scope}`,G)(this,this.scope.get());if(this.scope.value(s,{ref:b}),b.errors=null,b.schema=t.schema,b.schemaEnv=t,t.$async&&(b.$async=!0),this.opts.code.source===!0&&(b.source={validateName:s,validateCode:d,scopeValues:c._values}),this.opts.unevaluated){let{props:Z,items:p}=i;b.evaluated={props:Z instanceof B0.Name?void 0:Z,items:p instanceof B0.Name?void 0:p,dynamicProps:Z instanceof B0.Name,dynamicItems:p instanceof B0.Name},b.source&&(b.source.evaluated=(0,B0.stringify)(b.evaluated))}return t.validate=b,t}catch(d){throw delete t.validate,delete t.validateName,G&&this.logger.error("Error compiling schema, function code:",G),d}finally{this._compilations.delete(t)}}yh.compileSchema=VOe;function Eyl(t,e,I){var l;I=(0,M0.resolveUrl)(this.opts.uriResolver,e,I);let n=t.refs[I];if(n)return n;let a=Lyl.call(this,t,I);if(a===void 0){let c=(l=t.localRefs)===null||l===void 0?void 0:l[I],{schemaId:r}=this.opts;c&&(a=new XO({schema:c,schemaId:r,root:t,baseId:e}))}if(a!==void 0)return t.refs[I]=Jyl.call(this,a)}yh.resolveRef=Eyl;function Jyl(t){return(0,M0.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:VOe.call(this,t)}function yBt(t){for(let e of this._compilations)if(Cyl(e,t))return e}yh.getCompilingSchema=yBt;function Cyl(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function Lyl(t,e){let I;for(;typeof(I=this.refs[e])=="string";)e=I;return I||this.schemas[e]||CZe.call(this,t,e)}function CZe(t,e){let I=this.opts.uriResolver.parse(e),l=(0,M0._getFullPath)(this.opts.uriResolver,I),n=(0,M0.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&l===n)return NOe.call(this,I,t);let a=(0,M0.normalizeId)(l),c=this.refs[a]||this.schemas[a];if(typeof c=="string"){let r=CZe.call(this,t,c);return typeof r?.schema!="object"?void 0:NOe.call(this,I,r)}if(typeof c?.schema=="object"){if(c.validate||VOe.call(this,c),a===(0,M0.normalizeId)(e)){let{schema:r}=c,{schemaId:s}=this.opts,i=r[s];return i&&(n=(0,M0.resolveUrl)(this.opts.uriResolver,n,i)),new XO({schema:r,schemaId:s,root:t,baseId:n})}return NOe.call(this,I,c)}}yh.resolveSchema=CZe;var kyl=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function NOe(t,{baseId:e,schema:I,root:l}){var n;if(((n=t.fragment)===null||n===void 0?void 0:n[0])!=="/")return;for(let r of t.fragment.slice(1).split("/")){if(typeof I=="boolean")return;let s=I[(0,vBt.unescapeFragment)(r)];if(s===void 0)return;I=s;let i=typeof I=="object"&&I[this.opts.schemaId];!kyl.has(r)&&i&&(e=(0,M0.resolveUrl)(this.opts.uriResolver,e,i))}let a;if(typeof I!="boolean"&&I.$ref&&!(0,vBt.schemaHasRulesButRef)(I,this.RULES)){let r=(0,M0.resolveUrl)(this.opts.uriResolver,e,I.$ref);a=CZe.call(this,l,r)}let{schemaId:c}=this.opts;if(a=a||new XO({schema:I,schemaId:c,root:l,baseId:e}),a.schema!==a.root.schema)return a}});var wBt=Y(($xc,xyl)=>{xyl.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var ROe=Y((e3c,EBt)=>{"use strict";o();var jyl=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),QBt=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function YOe(t){let e="",I=0,l=0;for(l=0;l=48&&I<=57||I>=65&&I<=70||I>=97&&I<=102))return"";e+=t[l];break}for(l+=1;l=48&&I<=57||I>=65&&I<=70||I>=97&&I<=102))return"";e+=t[l]}return e}var Uyl=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function HBt(t){return t.length=0,!0}function Oyl(t,e,I){if(t.length){let l=YOe(t);if(l!=="")e.push(l);else return I.error=!0,!1;t.length=0}return!0}function zyl(t){let e=0,I={error:!1,address:"",zone:""},l=[],n=[],a=!1,c=!1,r=Oyl;for(let s=0;s7){I.error=!0;break}s>0&&t[s-1]===":"&&(a=!0),l.push(":");continue}else if(i==="%"){if(!r(n,l,I))break;r=HBt}else{n.push(i);continue}}return n.length&&(r===HBt?I.zone=n.join(""):c?l.push(n.join("")):l.push(YOe(n))),I.address=l.join(""),I}function fBt(t){if(Byl(t,":")<2)return{host:t,isIPV6:!1};let e=zyl(t);if(e.error)return{host:t,isIPV6:!1};{let I=e.address,l=e.address;return e.zone&&(I+="%"+e.zone,l+="%25"+e.zone),{host:I,isIPV6:!0,escapedHost:l}}}function Byl(t,e){let I=0;for(let l=0;l{"use strict";o();var{isUUID:_yl}=ROe(),Kyl=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,Dyl=["http","https","ws","wss","urn","urn:uuid"];function qyl(t){return Dyl.indexOf(t)!==-1}function AOe(t){return t.secure===!0?!0:t.secure===!1?!1:t.scheme?t.scheme.length===3&&(t.scheme[0]==="w"||t.scheme[0]==="W")&&(t.scheme[1]==="s"||t.scheme[1]==="S")&&(t.scheme[2]==="s"||t.scheme[2]==="S"):!1}function JBt(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function CBt(t){let e=String(t.scheme).toLowerCase()==="https";return(t.port===(e?443:80)||t.port==="")&&(t.port=void 0),t.path||(t.path="/"),t}function Pyl(t){return t.secure=AOe(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function $yl(t){if((t.port===(AOe(t)?443:80)||t.port==="")&&(t.port=void 0),typeof t.secure=="boolean"&&(t.scheme=t.secure?"wss":"ws",t.secure=void 0),t.resourceName){let[e,I]=t.resourceName.split("?");t.path=e&&e!=="/"?e:void 0,t.query=I,t.resourceName=void 0}return t.fragment=void 0,t}function ewl(t,e){if(!t.path)return t.error="URN can not be parsed",t;let I=t.path.match(Kyl);if(I){let l=e.scheme||t.scheme||"urn";t.nid=I[1].toLowerCase(),t.nss=I[2];let n=`${l}:${e.nid||t.nid}`,a=FOe(n);t.path=void 0,a&&(t=a.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function twl(t,e){if(t.nid===void 0)throw new Error("URN without nid cannot be serialized");let I=e.scheme||t.scheme||"urn",l=t.nid.toLowerCase(),n=`${I}:${e.nid||l}`,a=FOe(n);a&&(t=a.serialize(t,e));let c=t,r=t.nss;return c.path=`${l||e.nid}:${r}`,e.skipEscape=!0,c}function Iwl(t,e){let I=t;return I.uuid=I.nss,I.nss=void 0,!e.tolerant&&(!I.uuid||!_yl(I.uuid))&&(I.error=I.error||"UUID is not valid."),I}function lwl(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var LBt={scheme:"http",domainHost:!0,parse:JBt,serialize:CBt},nwl={scheme:"https",domainHost:LBt.domainHost,parse:JBt,serialize:CBt},kZe={scheme:"ws",domainHost:!0,parse:Pyl,serialize:$yl},awl={scheme:"wss",domainHost:kZe.domainHost,parse:kZe.parse,serialize:kZe.serialize},cwl={scheme:"urn",parse:ewl,serialize:twl,skipNormalize:!0},rwl={scheme:"urn:uuid",parse:Iwl,serialize:lwl,skipNormalize:!0},xZe={http:LBt,https:nwl,ws:kZe,wss:awl,urn:cwl,"urn:uuid":rwl};Object.setPrototypeOf(xZe,null);function FOe(t){return t&&(xZe[t]||xZe[t.toLowerCase()])||void 0}kBt.exports={wsIsSecure:AOe,SCHEMES:xZe,isValidSchemeName:qyl,getSchemeHandler:FOe}});var OBt=Y((n3c,UZe)=>{"use strict";o();var{normalizeIPv6:swl,removeDotSegments:fP,recomposeAuthority:owl,normalizeComponentEncoding:jZe,isIPv4:iwl,nonSimpleDomain:Gwl}=ROe(),{SCHEMES:dwl,getSchemeHandler:jBt}=xBt();function uwl(t,e){return typeof t=="string"?t=n2(Mg(t,e),e):typeof t=="object"&&(t=Mg(n2(t,e),e)),t}function bwl(t,e,I){let l=I?Object.assign({scheme:"null"},I):{scheme:"null"},n=UBt(Mg(t,l),Mg(e,l),l,!0);return l.skipEscape=!0,n2(n,l)}function UBt(t,e,I,l){let n={};return l||(t=Mg(n2(t,I),I),e=Mg(n2(e,I),I)),I=I||{},!I.tolerant&&e.scheme?(n.scheme=e.scheme,n.userinfo=e.userinfo,n.host=e.host,n.port=e.port,n.path=fP(e.path||""),n.query=e.query):(e.userinfo!==void 0||e.host!==void 0||e.port!==void 0?(n.userinfo=e.userinfo,n.host=e.host,n.port=e.port,n.path=fP(e.path||""),n.query=e.query):(e.path?(e.path[0]==="/"?n.path=fP(e.path):((t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)&&!t.path?n.path="/"+e.path:t.path?n.path=t.path.slice(0,t.path.lastIndexOf("/")+1)+e.path:n.path=e.path,n.path=fP(n.path)),n.query=e.query):(n.path=t.path,e.query!==void 0?n.query=e.query:n.query=t.query),n.userinfo=t.userinfo,n.host=t.host,n.port=t.port),n.scheme=t.scheme),n.fragment=e.fragment,n}function mwl(t,e,I){return typeof t=="string"?(t=unescape(t),t=n2(jZe(Mg(t,I),!0),{...I,skipEscape:!0})):typeof t=="object"&&(t=n2(jZe(t,!0),{...I,skipEscape:!0})),typeof e=="string"?(e=unescape(e),e=n2(jZe(Mg(e,I),!0),{...I,skipEscape:!0})):typeof e=="object"&&(e=n2(jZe(e,!0),{...I,skipEscape:!0})),t.toLowerCase()===e.toLowerCase()}function n2(t,e){let I={host:t.host,scheme:t.scheme,userinfo:t.userinfo,port:t.port,path:t.path,query:t.query,nid:t.nid,nss:t.nss,uuid:t.uuid,fragment:t.fragment,reference:t.reference,resourceName:t.resourceName,secure:t.secure,error:""},l=Object.assign({},e),n=[],a=jBt(l.scheme||I.scheme);a&&a.serialize&&a.serialize(I,l),I.path!==void 0&&(l.skipEscape?I.path=unescape(I.path):(I.path=escape(I.path),I.scheme!==void 0&&(I.path=I.path.split("%3A").join(":")))),l.reference!=="suffix"&&I.scheme&&n.push(I.scheme,":");let c=owl(I);if(c!==void 0&&(l.reference!=="suffix"&&n.push("//"),n.push(c),I.path&&I.path[0]!=="/"&&n.push("/")),I.path!==void 0){let r=I.path;!l.absolutePath&&(!a||!a.absolutePath)&&(r=fP(r)),c===void 0&&r[0]==="/"&&r[1]==="/"&&(r="/%2F"+r.slice(2)),n.push(r)}return I.query!==void 0&&n.push("?",I.query),I.fragment!==void 0&&n.push("#",I.fragment),n.join("")}var Zwl=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function Mg(t,e){let I=Object.assign({},e),l={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},n=!1;I.reference==="suffix"&&(I.scheme?t=I.scheme+":"+t:t="//"+t);let a=t.match(Zwl);if(a){if(l.scheme=a[1],l.userinfo=a[3],l.host=a[4],l.port=parseInt(a[5],10),l.path=a[6]||"",l.query=a[7],l.fragment=a[8],isNaN(l.port)&&(l.port=a[5]),l.host)if(iwl(l.host)===!1){let s=swl(l.host);l.host=s.host.toLowerCase(),n=s.isIPV6}else n=!0;l.scheme===void 0&&l.userinfo===void 0&&l.host===void 0&&l.port===void 0&&l.query===void 0&&!l.path?l.reference="same-document":l.scheme===void 0?l.reference="relative":l.fragment===void 0?l.reference="absolute":l.reference="uri",I.reference&&I.reference!=="suffix"&&I.reference!==l.reference&&(l.error=l.error||"URI is not a "+I.reference+" reference.");let c=jBt(I.scheme||l.scheme);if(!I.unicodeSupport&&(!c||!c.unicodeSupport)&&l.host&&(I.domainHost||c&&c.domainHost)&&n===!1&&Gwl(l.host))try{l.host=URL.domainToASCII(l.host.toLowerCase())}catch(r){l.error=l.error||"Host's domain name can not be converted to ASCII: "+r}(!c||c&&!c.skipNormalize)&&(t.indexOf("%")!==-1&&(l.scheme!==void 0&&(l.scheme=unescape(l.scheme)),l.host!==void 0&&(l.host=unescape(l.host))),l.path&&(l.path=escape(unescape(l.path))),l.fragment&&(l.fragment=encodeURI(decodeURIComponent(l.fragment)))),c&&c.parse&&c.parse(l,I)}else l.error=l.error||"URI can not be parsed.";return l}var XOe={SCHEMES:dwl,normalize:uwl,resolve:bwl,resolveComponent:UBt,equal:mwl,serialize:n2,parse:Mg};UZe.exports=XOe;UZe.exports.default=XOe;UZe.exports.fastUri=XOe});var BBt=Y(gOe=>{"use strict";o();Object.defineProperty(gOe,"__esModule",{value:!0});var zBt=OBt();zBt.code='require("ajv/dist/runtime/uri").default';gOe.default=zBt});var PBt=Y(Li=>{"use strict";o();Object.defineProperty(Li,"__esModule",{value:!0});Li.CodeGen=Li.Name=Li.nil=Li.stringify=Li.str=Li._=Li.KeywordCxt=void 0;var pwl=HP();Object.defineProperty(Li,"KeywordCxt",{enumerable:!0,get:function(){return pwl.KeywordCxt}});var gO=Zl();Object.defineProperty(Li,"_",{enumerable:!0,get:function(){return gO._}});Object.defineProperty(Li,"str",{enumerable:!0,get:function(){return gO.str}});Object.defineProperty(Li,"stringify",{enumerable:!0,get:function(){return gO.stringify}});Object.defineProperty(Li,"nil",{enumerable:!0,get:function(){return gO.nil}});Object.defineProperty(Li,"Name",{enumerable:!0,get:function(){return gO.Name}});Object.defineProperty(Li,"CodeGen",{enumerable:!0,get:function(){return gO.CodeGen}});var hwl=JZe(),KBt=QP(),Wwl=IOe(),EP=LZe(),Nwl=Zl(),JP=vP(),OZe=gP(),yOe=en(),MBt=wBt(),Vwl=BBt(),DBt=(t,e)=>new RegExp(t,e);DBt.code="new RegExp";var Ywl=["removeAdditional","useDefaults","coerceTypes"],Rwl=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),Awl={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},Fwl={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},SBt=200;function Xwl(t){var e,I,l,n,a,c,r,s,i,G,d,u,b,Z,p,W,h,N,V,R,F,v,y,w,H;let f=t.strict,L=(e=t.code)===null||e===void 0?void 0:e.optimize,k=L===!0||L===void 0?1:L||0,U=(l=(I=t.code)===null||I===void 0?void 0:I.regExp)!==null&&l!==void 0?l:DBt,T=(n=t.uriResolver)!==null&&n!==void 0?n:Vwl.default;return{strictSchema:(c=(a=t.strictSchema)!==null&&a!==void 0?a:f)!==null&&c!==void 0?c:!0,strictNumbers:(s=(r=t.strictNumbers)!==null&&r!==void 0?r:f)!==null&&s!==void 0?s:!0,strictTypes:(G=(i=t.strictTypes)!==null&&i!==void 0?i:f)!==null&&G!==void 0?G:"log",strictTuples:(u=(d=t.strictTuples)!==null&&d!==void 0?d:f)!==null&&u!==void 0?u:"log",strictRequired:(Z=(b=t.strictRequired)!==null&&b!==void 0?b:f)!==null&&Z!==void 0?Z:!1,code:t.code?{...t.code,optimize:k,regExp:U}:{optimize:k,regExp:U},loopRequired:(p=t.loopRequired)!==null&&p!==void 0?p:SBt,loopEnum:(W=t.loopEnum)!==null&&W!==void 0?W:SBt,meta:(h=t.meta)!==null&&h!==void 0?h:!0,messages:(N=t.messages)!==null&&N!==void 0?N:!0,inlineRefs:(V=t.inlineRefs)!==null&&V!==void 0?V:!0,schemaId:(R=t.schemaId)!==null&&R!==void 0?R:"$id",addUsedSchema:(F=t.addUsedSchema)!==null&&F!==void 0?F:!0,validateSchema:(v=t.validateSchema)!==null&&v!==void 0?v:!0,validateFormats:(y=t.validateFormats)!==null&&y!==void 0?y:!0,unicodeRegExp:(w=t.unicodeRegExp)!==null&&w!==void 0?w:!0,int32range:(H=t.int32range)!==null&&H!==void 0?H:!0,uriResolver:T}}var CP=class{constructor(e={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...Xwl(e)};let{es5:I,lines:l}=this.opts.code;this.scope=new Nwl.ValueScope({scope:{},prefixes:Rwl,es5:I,lines:l}),this.logger=Qwl(e.logger);let n=e.validateFormats;e.validateFormats=!1,this.RULES=(0,Wwl.getRules)(),TBt.call(this,Awl,e,"NOT SUPPORTED"),TBt.call(this,Fwl,e,"DEPRECATED","warn"),this._metaOpts=wwl.call(this),e.formats&&vwl.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&ywl.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),gwl.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:I,schemaId:l}=this.opts,n=MBt;l==="id"&&(n={...MBt},n.id=n.$id,delete n.$id),I&&e&&this.addMetaSchema(n,n[l],!1)}defaultMeta(){let{meta:e,schemaId:I}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[I]||e:void 0}validate(e,I){let l;if(typeof e=="string"){if(l=this.getSchema(e),!l)throw new Error(`no schema with key or ref "${e}"`)}else l=this.compile(e);let n=l(I);return"$async"in l||(this.errors=l.errors),n}compile(e,I){let l=this._addSchema(e,I);return l.validate||this._compileSchemaEnv(l)}compileAsync(e,I){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:l}=this.opts;return n.call(this,e,I);async function n(G,d){await a.call(this,G.$schema);let u=this._addSchema(G,d);return u.validate||c.call(this,u)}async function a(G){G&&!this.getSchema(G)&&await n.call(this,{$ref:G},!0)}async function c(G){try{return this._compileSchemaEnv(G)}catch(d){if(!(d instanceof KBt.default))throw d;return r.call(this,d),await s.call(this,d.missingSchema),c.call(this,G)}}function r({missingSchema:G,missingRef:d}){if(this.refs[G])throw new Error(`AnySchema ${G} is loaded but ${d} cannot be resolved`)}async function s(G){let d=await i.call(this,G);this.refs[G]||await a.call(this,d.$schema),this.refs[G]||this.addSchema(d,G,I)}async function i(G){let d=this._loading[G];if(d)return d;try{return await(this._loading[G]=l(G))}finally{delete this._loading[G]}}}addSchema(e,I,l,n=this.opts.validateSchema){if(Array.isArray(e)){for(let c of e)this.addSchema(c,void 0,l,n);return this}let a;if(typeof e=="object"){let{schemaId:c}=this.opts;if(a=e[c],a!==void 0&&typeof a!="string")throw new Error(`schema ${c} must be string`)}return I=(0,JP.normalizeId)(I||a),this._checkUnique(I),this.schemas[I]=this._addSchema(e,l,I,n,!0),this}addMetaSchema(e,I,l=this.opts.validateSchema){return this.addSchema(e,I,!0,l),this}validateSchema(e,I){if(typeof e=="boolean")return!0;let l;if(l=e.$schema,l!==void 0&&typeof l!="string")throw new Error("$schema must be a string");if(l=l||this.opts.defaultMeta||this.defaultMeta(),!l)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let n=this.validate(l,e);if(!n&&I){let a="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(a);else throw new Error(a)}return n}getSchema(e){let I;for(;typeof(I=_Bt.call(this,e))=="string";)e=I;if(I===void 0){let{schemaId:l}=this.opts,n=new EP.SchemaEnv({schema:{},schemaId:l});if(I=EP.resolveSchema.call(this,n,e),!I)return;this.refs[e]=I}return I.validate||this._compileSchemaEnv(I)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let I=_Bt.call(this,e);return typeof I=="object"&&this._cache.delete(I.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let I=e;this._cache.delete(I);let l=e[this.opts.schemaId];return l&&(l=(0,JP.normalizeId)(l),delete this.schemas[l],delete this.refs[l]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let I of e)this.addKeyword(I);return this}addKeyword(e,I){let l;if(typeof e=="string")l=e,typeof I=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),I.keyword=l);else if(typeof e=="object"&&I===void 0){if(I=e,l=I.keyword,Array.isArray(l)&&!l.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Ewl.call(this,l,I),!I)return(0,yOe.eachItem)(l,a=>vOe.call(this,a)),this;Cwl.call(this,I);let n={...I,type:(0,OZe.getJSONTypes)(I.type),schemaType:(0,OZe.getJSONTypes)(I.schemaType)};return(0,yOe.eachItem)(l,n.type.length===0?a=>vOe.call(this,a,n):a=>n.type.forEach(c=>vOe.call(this,a,n,c))),this}getKeyword(e){let I=this.RULES.all[e];return typeof I=="object"?I.definition:!!I}removeKeyword(e){let{RULES:I}=this;delete I.keywords[e],delete I.all[e];for(let l of I.rules){let n=l.rules.findIndex(a=>a.keyword===e);n>=0&&l.rules.splice(n,1)}return this}addFormat(e,I){return typeof I=="string"&&(I=new RegExp(I)),this.formats[e]=I,this}errorsText(e=this.errors,{separator:I=", ",dataVar:l="data"}={}){return!e||e.length===0?"No errors":e.map(n=>`${l}${n.instancePath} ${n.message}`).reduce((n,a)=>n+I+a)}$dataMetaSchema(e,I){let l=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let n of I){let a=n.split("/").slice(1),c=e;for(let r of a)c=c[r];for(let r in l){let s=l[r];if(typeof s!="object")continue;let{$data:i}=s.definition,G=c[r];i&&G&&(c[r]=qBt(G))}}return e}_removeAllSchemas(e,I){for(let l in e){let n=e[l];(!I||I.test(l))&&(typeof n=="string"?delete e[l]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[l]))}}_addSchema(e,I,l,n=this.opts.validateSchema,a=this.opts.addUsedSchema){let c,{schemaId:r}=this.opts;if(typeof e=="object")c=e[r];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let s=this._cache.get(e);if(s!==void 0)return s;l=(0,JP.normalizeId)(c||l);let i=JP.getSchemaRefs.call(this,e,l);return s=new EP.SchemaEnv({schema:e,schemaId:r,meta:I,baseId:l,localRefs:i}),this._cache.set(s.schema,s),a&&!l.startsWith("#")&&(l&&this._checkUnique(l),this.refs[l]=s),n&&this.validateSchema(e,!0),s}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):EP.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let I=this.opts;this.opts=this._metaOpts;try{EP.compileSchema.call(this,e)}finally{this.opts=I}}};CP.ValidationError=hwl.default;CP.MissingRefError=KBt.default;Li.default=CP;function TBt(t,e,I,l="error"){for(let n in t){let a=n;a in e&&this.logger[l](`${I}: option ${n}. ${t[a]}`)}}function _Bt(t){return t=(0,JP.normalizeId)(t),this.schemas[t]||this.refs[t]}function gwl(){let t=this.opts.schemas;if(t)if(Array.isArray(t))this.addSchema(t);else for(let e in t)this.addSchema(t[e],e)}function vwl(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function ywl(t){if(Array.isArray(t)){this.addVocabulary(t);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in t){let I=t[e];I.keyword||(I.keyword=e),this.addKeyword(I)}}function wwl(){let t={...this.opts};for(let e of Ywl)delete t[e];return t}var Hwl={log(){},warn(){},error(){}};function Qwl(t){if(t===!1)return Hwl;if(t===void 0)return console;if(t.log&&t.warn&&t.error)return t;throw new Error("logger must implement log, warn and error methods")}var fwl=/^[a-z_$][a-z0-9_$:-]*$/i;function Ewl(t,e){let{RULES:I}=this;if((0,yOe.eachItem)(t,l=>{if(I.keywords[l])throw new Error(`Keyword ${l} is already defined`);if(!fwl.test(l))throw new Error(`Keyword ${l} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function vOe(t,e,I){var l;let n=e?.post;if(I&&n)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:a}=this,c=n?a.post:a.rules.find(({type:s})=>s===I);if(c||(c={type:I,rules:[]},a.rules.push(c)),a.keywords[t]=!0,!e)return;let r={keyword:t,definition:{...e,type:(0,OZe.getJSONTypes)(e.type),schemaType:(0,OZe.getJSONTypes)(e.schemaType)}};e.before?Jwl.call(this,c,r,e.before):c.rules.push(r),a.all[t]=r,(l=e.implements)===null||l===void 0||l.forEach(s=>this.addKeyword(s))}function Jwl(t,e,I){let l=t.rules.findIndex(n=>n.keyword===I);l>=0?t.rules.splice(l,0,e):(t.rules.push(e),this.logger.warn(`rule ${I} is not defined`))}function Cwl(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=qBt(e)),t.validateSchema=this.compile(e,!0))}var Lwl={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function qBt(t){return{anyOf:[t,Lwl]}}});var $Bt=Y(wOe=>{"use strict";o();Object.defineProperty(wOe,"__esModule",{value:!0});var kwl={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};wOe.default=kwl});var lMt=Y(oL=>{"use strict";o();Object.defineProperty(oL,"__esModule",{value:!0});oL.callRef=oL.getValidate=void 0;var xwl=QP(),eMt=vh(),mm=Zl(),vO=zg(),tMt=LZe(),zZe=en(),jwl={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:I,it:l}=t,{baseId:n,schemaEnv:a,validateName:c,opts:r,self:s}=l,{root:i}=a;if((I==="#"||I==="#/")&&n===i.baseId)return d();let G=tMt.resolveRef.call(s,i,n,I);if(G===void 0)throw new xwl.default(l.opts.uriResolver,n,I);if(G instanceof tMt.SchemaEnv)return u(G);return b(G);function d(){if(a===i)return BZe(t,c,a,a.$async);let Z=e.scopeValue("root",{ref:i});return BZe(t,(0,mm._)`${Z}.validate`,i,i.$async)}function u(Z){let p=IMt(t,Z);BZe(t,p,Z,Z.$async)}function b(Z){let p=e.scopeValue("schema",r.code.source===!0?{ref:Z,code:(0,mm.stringify)(Z)}:{ref:Z}),W=e.name("valid"),h=t.subschema({schema:Z,dataTypes:[],schemaPath:mm.nil,topSchemaRef:p,errSchemaPath:I},W);t.mergeEvaluated(h),t.ok(W)}}};function IMt(t,e){let{gen:I}=t;return e.validate?I.scopeValue("validate",{ref:e.validate}):(0,mm._)`${I.scopeValue("wrapper",{ref:e})}.validate`}oL.getValidate=IMt;function BZe(t,e,I,l){let{gen:n,it:a}=t,{allErrors:c,schemaEnv:r,opts:s}=a,i=s.passContext?vO.default.this:mm.nil;l?G():d();function G(){if(!r.$async)throw new Error("async schema referenced by sync schema");let Z=n.let("valid");n.try(()=>{n.code((0,mm._)`await ${(0,eMt.callValidateCode)(t,e,i)}`),b(e),c||n.assign(Z,!0)},p=>{n.if((0,mm._)`!(${p} instanceof ${a.ValidationError})`,()=>n.throw(p)),u(p),c||n.assign(Z,!1)}),t.ok(Z)}function d(){t.result((0,eMt.callValidateCode)(t,e,i),()=>b(e),()=>u(e))}function u(Z){let p=(0,mm._)`${Z}.errors`;n.assign(vO.default.vErrors,(0,mm._)`${vO.default.vErrors} === null ? ${p} : ${vO.default.vErrors}.concat(${p})`),n.assign(vO.default.errors,(0,mm._)`${vO.default.vErrors}.length`)}function b(Z){var p;if(!a.opts.unevaluated)return;let W=(p=I?.validate)===null||p===void 0?void 0:p.evaluated;if(a.props!==!0)if(W&&!W.dynamicProps)W.props!==void 0&&(a.props=zZe.mergeEvaluated.props(n,W.props,a.props));else{let h=n.var("props",(0,mm._)`${Z}.evaluated.props`);a.props=zZe.mergeEvaluated.props(n,h,a.props,mm.Name)}if(a.items!==!0)if(W&&!W.dynamicItems)W.items!==void 0&&(a.items=zZe.mergeEvaluated.items(n,W.items,a.items));else{let h=n.var("items",(0,mm._)`${Z}.evaluated.items`);a.items=zZe.mergeEvaluated.items(n,h,a.items,mm.Name)}}}oL.callRef=BZe;oL.default=jwl});var nMt=Y(HOe=>{"use strict";o();Object.defineProperty(HOe,"__esModule",{value:!0});var Uwl=$Bt(),Owl=lMt(),zwl=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Uwl.default,Owl.default];HOe.default=zwl});var aMt=Y(QOe=>{"use strict";o();Object.defineProperty(QOe,"__esModule",{value:!0});var MZe=Zl(),lE=MZe.operators,SZe={maximum:{okStr:"<=",ok:lE.LTE,fail:lE.GT},minimum:{okStr:">=",ok:lE.GTE,fail:lE.LT},exclusiveMaximum:{okStr:"<",ok:lE.LT,fail:lE.GTE},exclusiveMinimum:{okStr:">",ok:lE.GT,fail:lE.LTE}},Bwl={message:({keyword:t,schemaCode:e})=>(0,MZe.str)`must be ${SZe[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,MZe._)`{comparison: ${SZe[t].okStr}, limit: ${e}}`},Mwl={keyword:Object.keys(SZe),type:"number",schemaType:"number",$data:!0,error:Bwl,code(t){let{keyword:e,data:I,schemaCode:l}=t;t.fail$data((0,MZe._)`${I} ${SZe[e].fail} ${l} || isNaN(${I})`)}};QOe.default=Mwl});var cMt=Y(fOe=>{"use strict";o();Object.defineProperty(fOe,"__esModule",{value:!0});var LP=Zl(),Swl={message:({schemaCode:t})=>(0,LP.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,LP._)`{multipleOf: ${t}}`},Twl={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:Swl,code(t){let{gen:e,data:I,schemaCode:l,it:n}=t,a=n.opts.multipleOfPrecision,c=e.let("res"),r=a?(0,LP._)`Math.abs(Math.round(${c}) - ${c}) > 1e-${a}`:(0,LP._)`${c} !== parseInt(${c})`;t.fail$data((0,LP._)`(${l} === 0 || (${c} = ${I}/${l}, ${r}))`)}};fOe.default=Twl});var sMt=Y(EOe=>{"use strict";o();Object.defineProperty(EOe,"__esModule",{value:!0});function rMt(t){let e=t.length,I=0,l=0,n;for(;l=55296&&n<=56319&&l{"use strict";o();Object.defineProperty(JOe,"__esModule",{value:!0});var iL=Zl(),_wl=en(),Kwl=sMt(),Dwl={message({keyword:t,schemaCode:e}){let I=t==="maxLength"?"more":"fewer";return(0,iL.str)`must NOT have ${I} than ${e} characters`},params:({schemaCode:t})=>(0,iL._)`{limit: ${t}}`},qwl={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:Dwl,code(t){let{keyword:e,data:I,schemaCode:l,it:n}=t,a=e==="maxLength"?iL.operators.GT:iL.operators.LT,c=n.opts.unicode===!1?(0,iL._)`${I}.length`:(0,iL._)`${(0,_wl.useFunc)(t.gen,Kwl.default)}(${I})`;t.fail$data((0,iL._)`${c} ${a} ${l}`)}};JOe.default=qwl});var iMt=Y(COe=>{"use strict";o();Object.defineProperty(COe,"__esModule",{value:!0});var Pwl=vh(),$wl=en(),yO=Zl(),eHl={message:({schemaCode:t})=>(0,yO.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,yO._)`{pattern: ${t}}`},tHl={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:eHl,code(t){let{gen:e,data:I,$data:l,schema:n,schemaCode:a,it:c}=t,r=c.opts.unicodeRegExp?"u":"";if(l){let{regExp:s}=c.opts.code,i=s.code==="new RegExp"?(0,yO._)`new RegExp`:(0,$wl.useFunc)(e,s),G=e.let("valid");e.try(()=>e.assign(G,(0,yO._)`${i}(${a}, ${r}).test(${I})`),()=>e.assign(G,!1)),t.fail$data((0,yO._)`!${G}`)}else{let s=(0,Pwl.usePattern)(t,n);t.fail$data((0,yO._)`!${s}.test(${I})`)}}};COe.default=tHl});var GMt=Y(LOe=>{"use strict";o();Object.defineProperty(LOe,"__esModule",{value:!0});var kP=Zl(),IHl={message({keyword:t,schemaCode:e}){let I=t==="maxProperties"?"more":"fewer";return(0,kP.str)`must NOT have ${I} than ${e} properties`},params:({schemaCode:t})=>(0,kP._)`{limit: ${t}}`},lHl={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:IHl,code(t){let{keyword:e,data:I,schemaCode:l}=t,n=e==="maxProperties"?kP.operators.GT:kP.operators.LT;t.fail$data((0,kP._)`Object.keys(${I}).length ${n} ${l}`)}};LOe.default=lHl});var dMt=Y(kOe=>{"use strict";o();Object.defineProperty(kOe,"__esModule",{value:!0});var xP=vh(),jP=Zl(),nHl=en(),aHl={message:({params:{missingProperty:t}})=>(0,jP.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,jP._)`{missingProperty: ${t}}`},cHl={keyword:"required",type:"object",schemaType:"array",$data:!0,error:aHl,code(t){let{gen:e,schema:I,schemaCode:l,data:n,$data:a,it:c}=t,{opts:r}=c;if(!a&&I.length===0)return;let s=I.length>=r.loopRequired;if(c.allErrors?i():G(),r.strictRequired){let b=t.parentSchema.properties,{definedProperties:Z}=t.it;for(let p of I)if(b?.[p]===void 0&&!Z.has(p)){let W=c.schemaEnv.baseId+c.errSchemaPath,h=`required property "${p}" is not defined at "${W}" (strictRequired)`;(0,nHl.checkStrictMode)(c,h,c.opts.strictRequired)}}function i(){if(s||a)t.block$data(jP.nil,d);else for(let b of I)(0,xP.checkReportMissingProp)(t,b)}function G(){let b=e.let("missing");if(s||a){let Z=e.let("valid",!0);t.block$data(Z,()=>u(b,Z)),t.ok(Z)}else e.if((0,xP.checkMissingProp)(t,I,b)),(0,xP.reportMissingProp)(t,b),e.else()}function d(){e.forOf("prop",l,b=>{t.setParams({missingProperty:b}),e.if((0,xP.noPropertyInData)(e,n,b,r.ownProperties),()=>t.error())})}function u(b,Z){t.setParams({missingProperty:b}),e.forOf(b,l,()=>{e.assign(Z,(0,xP.propertyInData)(e,n,b,r.ownProperties)),e.if((0,jP.not)(Z),()=>{t.error(),e.break()})},jP.nil)}}};kOe.default=cHl});var uMt=Y(xOe=>{"use strict";o();Object.defineProperty(xOe,"__esModule",{value:!0});var UP=Zl(),rHl={message({keyword:t,schemaCode:e}){let I=t==="maxItems"?"more":"fewer";return(0,UP.str)`must NOT have ${I} than ${e} items`},params:({schemaCode:t})=>(0,UP._)`{limit: ${t}}`},sHl={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:rHl,code(t){let{keyword:e,data:I,schemaCode:l}=t,n=e==="maxItems"?UP.operators.GT:UP.operators.LT;t.fail$data((0,UP._)`${I}.length ${n} ${l}`)}};xOe.default=sHl});var TZe=Y(jOe=>{"use strict";o();Object.defineProperty(jOe,"__esModule",{value:!0});var bMt=iOe();bMt.code='require("ajv/dist/runtime/equal").default';jOe.default=bMt});var mMt=Y(OOe=>{"use strict";o();Object.defineProperty(OOe,"__esModule",{value:!0});var UOe=gP(),ki=Zl(),oHl=en(),iHl=TZe(),GHl={message:({params:{i:t,j:e}})=>(0,ki.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,ki._)`{i: ${t}, j: ${e}}`},dHl={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:GHl,code(t){let{gen:e,data:I,$data:l,schema:n,parentSchema:a,schemaCode:c,it:r}=t;if(!l&&!n)return;let s=e.let("valid"),i=a.items?(0,UOe.getSchemaTypes)(a.items):[];t.block$data(s,G,(0,ki._)`${c} === false`),t.ok(s);function G(){let Z=e.let("i",(0,ki._)`${I}.length`),p=e.let("j");t.setParams({i:Z,j:p}),e.assign(s,!0),e.if((0,ki._)`${Z} > 1`,()=>(d()?u:b)(Z,p))}function d(){return i.length>0&&!i.some(Z=>Z==="object"||Z==="array")}function u(Z,p){let W=e.name("item"),h=(0,UOe.checkDataTypes)(i,W,r.opts.strictNumbers,UOe.DataType.Wrong),N=e.const("indices",(0,ki._)`{}`);e.for((0,ki._)`;${Z}--;`,()=>{e.let(W,(0,ki._)`${I}[${Z}]`),e.if(h,(0,ki._)`continue`),i.length>1&&e.if((0,ki._)`typeof ${W} == "string"`,(0,ki._)`${W} += "_"`),e.if((0,ki._)`typeof ${N}[${W}] == "number"`,()=>{e.assign(p,(0,ki._)`${N}[${W}]`),t.error(),e.assign(s,!1).break()}).code((0,ki._)`${N}[${W}] = ${Z}`)})}function b(Z,p){let W=(0,oHl.useFunc)(e,iHl.default),h=e.name("outer");e.label(h).for((0,ki._)`;${Z}--;`,()=>e.for((0,ki._)`${p} = ${Z}; ${p}--;`,()=>e.if((0,ki._)`${W}(${I}[${Z}], ${I}[${p}])`,()=>{t.error(),e.assign(s,!1).break(h)})))}}};OOe.default=dHl});var ZMt=Y(BOe=>{"use strict";o();Object.defineProperty(BOe,"__esModule",{value:!0});var zOe=Zl(),uHl=en(),bHl=TZe(),mHl={message:"must be equal to constant",params:({schemaCode:t})=>(0,zOe._)`{allowedValue: ${t}}`},ZHl={keyword:"const",$data:!0,error:mHl,code(t){let{gen:e,data:I,$data:l,schemaCode:n,schema:a}=t;l||a&&typeof a=="object"?t.fail$data((0,zOe._)`!${(0,uHl.useFunc)(e,bHl.default)}(${I}, ${n})`):t.fail((0,zOe._)`${a} !== ${I}`)}};BOe.default=ZHl});var pMt=Y(MOe=>{"use strict";o();Object.defineProperty(MOe,"__esModule",{value:!0});var OP=Zl(),pHl=en(),hHl=TZe(),WHl={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,OP._)`{allowedValues: ${t}}`},NHl={keyword:"enum",schemaType:"array",$data:!0,error:WHl,code(t){let{gen:e,data:I,$data:l,schema:n,schemaCode:a,it:c}=t;if(!l&&n.length===0)throw new Error("enum must have non-empty array");let r=n.length>=c.opts.loopEnum,s,i=()=>s??(s=(0,pHl.useFunc)(e,hHl.default)),G;if(r||l)G=e.let("valid"),t.block$data(G,d);else{if(!Array.isArray(n))throw new Error("ajv implementation error");let b=e.const("vSchema",a);G=(0,OP.or)(...n.map((Z,p)=>u(b,p)))}t.pass(G);function d(){e.assign(G,!1),e.forOf("v",a,b=>e.if((0,OP._)`${i()}(${I}, ${b})`,()=>e.assign(G,!0).break()))}function u(b,Z){let p=n[Z];return typeof p=="object"&&p!==null?(0,OP._)`${i()}(${I}, ${b}[${Z}])`:(0,OP._)`${I} === ${p}`}}};MOe.default=NHl});var hMt=Y(SOe=>{"use strict";o();Object.defineProperty(SOe,"__esModule",{value:!0});var VHl=aMt(),YHl=cMt(),RHl=oMt(),AHl=iMt(),FHl=GMt(),XHl=dMt(),gHl=uMt(),vHl=mMt(),yHl=ZMt(),wHl=pMt(),HHl=[VHl.default,YHl.default,RHl.default,AHl.default,FHl.default,XHl.default,gHl.default,vHl.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},yHl.default,wHl.default];SOe.default=HHl});var _Oe=Y(zP=>{"use strict";o();Object.defineProperty(zP,"__esModule",{value:!0});zP.validateAdditionalItems=void 0;var GL=Zl(),TOe=en(),QHl={message:({params:{len:t}})=>(0,GL.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,GL._)`{limit: ${t}}`},fHl={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:QHl,code(t){let{parentSchema:e,it:I}=t,{items:l}=e;if(!Array.isArray(l)){(0,TOe.checkStrictMode)(I,'"additionalItems" is ignored when "items" is not an array of schemas');return}WMt(t,l)}};function WMt(t,e){let{gen:I,schema:l,data:n,keyword:a,it:c}=t;c.items=!0;let r=I.const("len",(0,GL._)`${n}.length`);if(l===!1)t.setParams({len:e.length}),t.pass((0,GL._)`${r} <= ${e.length}`);else if(typeof l=="object"&&!(0,TOe.alwaysValidSchema)(c,l)){let i=I.var("valid",(0,GL._)`${r} <= ${e.length}`);I.if((0,GL.not)(i),()=>s(i)),t.ok(i)}function s(i){I.forRange("i",e.length,r,G=>{t.subschema({keyword:a,dataProp:G,dataPropType:TOe.Type.Num},i),c.allErrors||I.if((0,GL.not)(i),()=>I.break())})}}zP.validateAdditionalItems=WMt;zP.default=fHl});var KOe=Y(BP=>{"use strict";o();Object.defineProperty(BP,"__esModule",{value:!0});BP.validateTuple=void 0;var NMt=Zl(),_Ze=en(),EHl=vh(),JHl={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:I}=t;if(Array.isArray(e))return VMt(t,"additionalItems",e);I.items=!0,!(0,_Ze.alwaysValidSchema)(I,e)&&t.ok((0,EHl.validateArray)(t))}};function VMt(t,e,I=t.schema){let{gen:l,parentSchema:n,data:a,keyword:c,it:r}=t;G(n),r.opts.unevaluated&&I.length&&r.items!==!0&&(r.items=_Ze.mergeEvaluated.items(l,I.length,r.items));let s=l.name("valid"),i=l.const("len",(0,NMt._)`${a}.length`);I.forEach((d,u)=>{(0,_Ze.alwaysValidSchema)(r,d)||(l.if((0,NMt._)`${i} > ${u}`,()=>t.subschema({keyword:c,schemaProp:u,dataProp:u},s)),t.ok(s))});function G(d){let{opts:u,errSchemaPath:b}=r,Z=I.length,p=Z===d.minItems&&(Z===d.maxItems||d[e]===!1);if(u.strictTuples&&!p){let W=`"${c}" is ${Z}-tuple, but minItems or maxItems/${e} are not specified or different at path "${b}"`;(0,_Ze.checkStrictMode)(r,W,u.strictTuples)}}}BP.validateTuple=VMt;BP.default=JHl});var YMt=Y(DOe=>{"use strict";o();Object.defineProperty(DOe,"__esModule",{value:!0});var CHl=KOe(),LHl={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,CHl.validateTuple)(t,"items")};DOe.default=LHl});var AMt=Y(qOe=>{"use strict";o();Object.defineProperty(qOe,"__esModule",{value:!0});var RMt=Zl(),kHl=en(),xHl=vh(),jHl=_Oe(),UHl={message:({params:{len:t}})=>(0,RMt.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,RMt._)`{limit: ${t}}`},OHl={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:UHl,code(t){let{schema:e,parentSchema:I,it:l}=t,{prefixItems:n}=I;l.items=!0,!(0,kHl.alwaysValidSchema)(l,e)&&(n?(0,jHl.validateAdditionalItems)(t,n):t.ok((0,xHl.validateArray)(t)))}};qOe.default=OHl});var FMt=Y(POe=>{"use strict";o();Object.defineProperty(POe,"__esModule",{value:!0});var wh=Zl(),KZe=en(),zHl={message:({params:{min:t,max:e}})=>e===void 0?(0,wh.str)`must contain at least ${t} valid item(s)`:(0,wh.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,wh._)`{minContains: ${t}}`:(0,wh._)`{minContains: ${t}, maxContains: ${e}}`},BHl={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:zHl,code(t){let{gen:e,schema:I,parentSchema:l,data:n,it:a}=t,c,r,{minContains:s,maxContains:i}=l;a.opts.next?(c=s===void 0?1:s,r=i):c=1;let G=e.const("len",(0,wh._)`${n}.length`);if(t.setParams({min:c,max:r}),r===void 0&&c===0){(0,KZe.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(r!==void 0&&c>r){(0,KZe.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,KZe.alwaysValidSchema)(a,I)){let p=(0,wh._)`${G} >= ${c}`;r!==void 0&&(p=(0,wh._)`${p} && ${G} <= ${r}`),t.pass(p);return}a.items=!0;let d=e.name("valid");r===void 0&&c===1?b(d,()=>e.if(d,()=>e.break())):c===0?(e.let(d,!0),r!==void 0&&e.if((0,wh._)`${n}.length > 0`,u)):(e.let(d,!1),u()),t.result(d,()=>t.reset());function u(){let p=e.name("_valid"),W=e.let("count",0);b(p,()=>e.if(p,()=>Z(W)))}function b(p,W){e.forRange("i",0,G,h=>{t.subschema({keyword:"contains",dataProp:h,dataPropType:KZe.Type.Num,compositeRule:!0},p),W()})}function Z(p){e.code((0,wh._)`${p}++`),r===void 0?e.if((0,wh._)`${p} >= ${c}`,()=>e.assign(d,!0).break()):(e.if((0,wh._)`${p} > ${r}`,()=>e.assign(d,!1).break()),c===1?e.assign(d,!0):e.if((0,wh._)`${p} >= ${c}`,()=>e.assign(d,!0)))}}};POe.default=BHl});var vMt=Y(a2=>{"use strict";o();Object.defineProperty(a2,"__esModule",{value:!0});a2.validateSchemaDeps=a2.validatePropertyDeps=a2.error=void 0;var $Oe=Zl(),MHl=en(),MP=vh();a2.error={message:({params:{property:t,depsCount:e,deps:I}})=>{let l=e===1?"property":"properties";return(0,$Oe.str)`must have ${l} ${I} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:I,missingProperty:l}})=>(0,$Oe._)`{property: ${t}, + missingProperty: ${l}, + depsCount: ${e}, + deps: ${I}}`};var SHl={keyword:"dependencies",type:"object",schemaType:"object",error:a2.error,code(t){let[e,I]=THl(t);XMt(t,e),gMt(t,I)}};function THl({schema:t}){let e={},I={};for(let l in t){if(l==="__proto__")continue;let n=Array.isArray(t[l])?e:I;n[l]=t[l]}return[e,I]}function XMt(t,e=t.schema){let{gen:I,data:l,it:n}=t;if(Object.keys(e).length===0)return;let a=I.let("missing");for(let c in e){let r=e[c];if(r.length===0)continue;let s=(0,MP.propertyInData)(I,l,c,n.opts.ownProperties);t.setParams({property:c,depsCount:r.length,deps:r.join(", ")}),n.allErrors?I.if(s,()=>{for(let i of r)(0,MP.checkReportMissingProp)(t,i)}):(I.if((0,$Oe._)`${s} && (${(0,MP.checkMissingProp)(t,r,a)})`),(0,MP.reportMissingProp)(t,a),I.else())}}a2.validatePropertyDeps=XMt;function gMt(t,e=t.schema){let{gen:I,data:l,keyword:n,it:a}=t,c=I.name("valid");for(let r in e)(0,MHl.alwaysValidSchema)(a,e[r])||(I.if((0,MP.propertyInData)(I,l,r,a.opts.ownProperties),()=>{let s=t.subschema({keyword:n,schemaProp:r},c);t.mergeValidEvaluated(s,c)},()=>I.var(c,!0)),t.ok(c))}a2.validateSchemaDeps=gMt;a2.default=SHl});var wMt=Y(eze=>{"use strict";o();Object.defineProperty(eze,"__esModule",{value:!0});var yMt=Zl(),_Hl=en(),KHl={message:"property name must be valid",params:({params:t})=>(0,yMt._)`{propertyName: ${t.propertyName}}`},DHl={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:KHl,code(t){let{gen:e,schema:I,data:l,it:n}=t;if((0,_Hl.alwaysValidSchema)(n,I))return;let a=e.name("valid");e.forIn("key",l,c=>{t.setParams({propertyName:c}),t.subschema({keyword:"propertyNames",data:c,dataTypes:["string"],propertyName:c,compositeRule:!0},a),e.if((0,yMt.not)(a),()=>{t.error(!0),n.allErrors||e.break()})}),t.ok(a)}};eze.default=DHl});var Ize=Y(tze=>{"use strict";o();Object.defineProperty(tze,"__esModule",{value:!0});var DZe=vh(),S0=Zl(),qHl=zg(),qZe=en(),PHl={message:"must NOT have additional properties",params:({params:t})=>(0,S0._)`{additionalProperty: ${t.additionalProperty}}`},$Hl={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:PHl,code(t){let{gen:e,schema:I,parentSchema:l,data:n,errsCount:a,it:c}=t;if(!a)throw new Error("ajv implementation error");let{allErrors:r,opts:s}=c;if(c.props=!0,s.removeAdditional!=="all"&&(0,qZe.alwaysValidSchema)(c,I))return;let i=(0,DZe.allSchemaProperties)(l.properties),G=(0,DZe.allSchemaProperties)(l.patternProperties);d(),t.ok((0,S0._)`${a} === ${qHl.default.errors}`);function d(){e.forIn("key",n,W=>{!i.length&&!G.length?Z(W):e.if(u(W),()=>Z(W))})}function u(W){let h;if(i.length>8){let N=(0,qZe.schemaRefOrVal)(c,l.properties,"properties");h=(0,DZe.isOwnProperty)(e,N,W)}else i.length?h=(0,S0.or)(...i.map(N=>(0,S0._)`${W} === ${N}`)):h=S0.nil;return G.length&&(h=(0,S0.or)(h,...G.map(N=>(0,S0._)`${(0,DZe.usePattern)(t,N)}.test(${W})`))),(0,S0.not)(h)}function b(W){e.code((0,S0._)`delete ${n}[${W}]`)}function Z(W){if(s.removeAdditional==="all"||s.removeAdditional&&I===!1){b(W);return}if(I===!1){t.setParams({additionalProperty:W}),t.error(),r||e.break();return}if(typeof I=="object"&&!(0,qZe.alwaysValidSchema)(c,I)){let h=e.name("valid");s.removeAdditional==="failing"?(p(W,h,!1),e.if((0,S0.not)(h),()=>{t.reset(),b(W)})):(p(W,h),r||e.if((0,S0.not)(h),()=>e.break()))}}function p(W,h,N){let V={keyword:"additionalProperties",dataProp:W,dataPropType:qZe.Type.Str};N===!1&&Object.assign(V,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(V,h)}}};tze.default=$Hl});var fMt=Y(nze=>{"use strict";o();Object.defineProperty(nze,"__esModule",{value:!0});var eQl=HP(),HMt=vh(),lze=en(),QMt=Ize(),tQl={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:I,parentSchema:l,data:n,it:a}=t;a.opts.removeAdditional==="all"&&l.additionalProperties===void 0&&QMt.default.code(new eQl.KeywordCxt(a,QMt.default,"additionalProperties"));let c=(0,HMt.allSchemaProperties)(I);for(let d of c)a.definedProperties.add(d);a.opts.unevaluated&&c.length&&a.props!==!0&&(a.props=lze.mergeEvaluated.props(e,(0,lze.toHash)(c),a.props));let r=c.filter(d=>!(0,lze.alwaysValidSchema)(a,I[d]));if(r.length===0)return;let s=e.name("valid");for(let d of r)i(d)?G(d):(e.if((0,HMt.propertyInData)(e,n,d,a.opts.ownProperties)),G(d),a.allErrors||e.else().var(s,!0),e.endIf()),t.it.definedProperties.add(d),t.ok(s);function i(d){return a.opts.useDefaults&&!a.compositeRule&&I[d].default!==void 0}function G(d){t.subschema({keyword:"properties",schemaProp:d,dataProp:d},s)}}};nze.default=tQl});var LMt=Y(aze=>{"use strict";o();Object.defineProperty(aze,"__esModule",{value:!0});var EMt=vh(),PZe=Zl(),JMt=en(),CMt=en(),IQl={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:I,data:l,parentSchema:n,it:a}=t,{opts:c}=a,r=(0,EMt.allSchemaProperties)(I),s=r.filter(p=>(0,JMt.alwaysValidSchema)(a,I[p]));if(r.length===0||s.length===r.length&&(!a.opts.unevaluated||a.props===!0))return;let i=c.strictSchema&&!c.allowMatchingProperties&&n.properties,G=e.name("valid");a.props!==!0&&!(a.props instanceof PZe.Name)&&(a.props=(0,CMt.evaluatedPropsToName)(e,a.props));let{props:d}=a;u();function u(){for(let p of r)i&&b(p),a.allErrors?Z(p):(e.var(G,!0),Z(p),e.if(G))}function b(p){for(let W in i)new RegExp(p).test(W)&&(0,JMt.checkStrictMode)(a,`property ${W} matches pattern ${p} (use allowMatchingProperties)`)}function Z(p){e.forIn("key",l,W=>{e.if((0,PZe._)`${(0,EMt.usePattern)(t,p)}.test(${W})`,()=>{let h=s.includes(p);h||t.subschema({keyword:"patternProperties",schemaProp:p,dataProp:W,dataPropType:CMt.Type.Str},G),a.opts.unevaluated&&d!==!0?e.assign((0,PZe._)`${d}[${W}]`,!0):!h&&!a.allErrors&&e.if((0,PZe.not)(G),()=>e.break())})})}}};aze.default=IQl});var kMt=Y(cze=>{"use strict";o();Object.defineProperty(cze,"__esModule",{value:!0});var lQl=en(),nQl={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:I,it:l}=t;if((0,lQl.alwaysValidSchema)(l,I)){t.fail();return}let n=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},n),t.failResult(n,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};cze.default=nQl});var xMt=Y(rze=>{"use strict";o();Object.defineProperty(rze,"__esModule",{value:!0});var aQl=vh(),cQl={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:aQl.validateUnion,error:{message:"must match a schema in anyOf"}};rze.default=cQl});var jMt=Y(sze=>{"use strict";o();Object.defineProperty(sze,"__esModule",{value:!0});var $Ze=Zl(),rQl=en(),sQl={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,$Ze._)`{passingSchemas: ${t.passing}}`},oQl={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:sQl,code(t){let{gen:e,schema:I,parentSchema:l,it:n}=t;if(!Array.isArray(I))throw new Error("ajv implementation error");if(n.opts.discriminator&&l.discriminator)return;let a=I,c=e.let("valid",!1),r=e.let("passing",null),s=e.name("_valid");t.setParams({passing:r}),e.block(i),t.result(c,()=>t.reset(),()=>t.error(!0));function i(){a.forEach((G,d)=>{let u;(0,rQl.alwaysValidSchema)(n,G)?e.var(s,!0):u=t.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},s),d>0&&e.if((0,$Ze._)`${s} && ${c}`).assign(c,!1).assign(r,(0,$Ze._)`[${r}, ${d}]`).else(),e.if(s,()=>{e.assign(c,!0),e.assign(r,d),u&&t.mergeEvaluated(u,$Ze.Name)})})}}};sze.default=oQl});var UMt=Y(oze=>{"use strict";o();Object.defineProperty(oze,"__esModule",{value:!0});var iQl=en(),GQl={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:I,it:l}=t;if(!Array.isArray(I))throw new Error("ajv implementation error");let n=e.name("valid");I.forEach((a,c)=>{if((0,iQl.alwaysValidSchema)(l,a))return;let r=t.subschema({keyword:"allOf",schemaProp:c},n);t.ok(n),t.mergeEvaluated(r)})}};oze.default=GQl});var BMt=Y(ize=>{"use strict";o();Object.defineProperty(ize,"__esModule",{value:!0});var epe=Zl(),zMt=en(),dQl={message:({params:t})=>(0,epe.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,epe._)`{failingKeyword: ${t.ifClause}}`},uQl={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:dQl,code(t){let{gen:e,parentSchema:I,it:l}=t;I.then===void 0&&I.else===void 0&&(0,zMt.checkStrictMode)(l,'"if" without "then" and "else" is ignored');let n=OMt(l,"then"),a=OMt(l,"else");if(!n&&!a)return;let c=e.let("valid",!0),r=e.name("_valid");if(s(),t.reset(),n&&a){let G=e.let("ifClause");t.setParams({ifClause:G}),e.if(r,i("then",G),i("else",G))}else n?e.if(r,i("then")):e.if((0,epe.not)(r),i("else"));t.pass(c,()=>t.error(!0));function s(){let G=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},r);t.mergeEvaluated(G)}function i(G,d){return()=>{let u=t.subschema({keyword:G},r);e.assign(c,r),t.mergeValidEvaluated(u,c),d?e.assign(d,(0,epe._)`${G}`):t.setParams({ifClause:G})}}}};function OMt(t,e){let I=t.schema[e];return I!==void 0&&!(0,zMt.alwaysValidSchema)(t,I)}ize.default=uQl});var MMt=Y(Gze=>{"use strict";o();Object.defineProperty(Gze,"__esModule",{value:!0});var bQl=en(),mQl={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:I}){e.if===void 0&&(0,bQl.checkStrictMode)(I,`"${t}" without "if" is ignored`)}};Gze.default=mQl});var SMt=Y(dze=>{"use strict";o();Object.defineProperty(dze,"__esModule",{value:!0});var ZQl=_Oe(),pQl=YMt(),hQl=KOe(),WQl=AMt(),NQl=FMt(),VQl=vMt(),YQl=wMt(),RQl=Ize(),AQl=fMt(),FQl=LMt(),XQl=kMt(),gQl=xMt(),vQl=jMt(),yQl=UMt(),wQl=BMt(),HQl=MMt();function QQl(t=!1){let e=[XQl.default,gQl.default,vQl.default,yQl.default,wQl.default,HQl.default,YQl.default,RQl.default,VQl.default,AQl.default,FQl.default];return t?e.push(pQl.default,WQl.default):e.push(ZQl.default,hQl.default),e.push(NQl.default),e}dze.default=QQl});var TMt=Y(uze=>{"use strict";o();Object.defineProperty(uze,"__esModule",{value:!0});var rs=Zl(),fQl={message:({schemaCode:t})=>(0,rs.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,rs._)`{format: ${t}}`},EQl={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:fQl,code(t,e){let{gen:I,data:l,$data:n,schema:a,schemaCode:c,it:r}=t,{opts:s,errSchemaPath:i,schemaEnv:G,self:d}=r;if(!s.validateFormats)return;n?u():b();function u(){let Z=I.scopeValue("formats",{ref:d.formats,code:s.code.formats}),p=I.const("fDef",(0,rs._)`${Z}[${c}]`),W=I.let("fType"),h=I.let("format");I.if((0,rs._)`typeof ${p} == "object" && !(${p} instanceof RegExp)`,()=>I.assign(W,(0,rs._)`${p}.type || "string"`).assign(h,(0,rs._)`${p}.validate`),()=>I.assign(W,(0,rs._)`"string"`).assign(h,p)),t.fail$data((0,rs.or)(N(),V()));function N(){return s.strictSchema===!1?rs.nil:(0,rs._)`${c} && !${h}`}function V(){let R=G.$async?(0,rs._)`(${p}.async ? await ${h}(${l}) : ${h}(${l}))`:(0,rs._)`${h}(${l})`,F=(0,rs._)`(typeof ${h} == "function" ? ${R} : ${h}.test(${l}))`;return(0,rs._)`${h} && ${h} !== true && ${W} === ${e} && !${F}`}}function b(){let Z=d.formats[a];if(!Z){N();return}if(Z===!0)return;let[p,W,h]=V(Z);p===e&&t.pass(R());function N(){if(s.strictSchema===!1){d.logger.warn(F());return}throw new Error(F());function F(){return`unknown format "${a}" ignored in schema at path "${i}"`}}function V(F){let v=F instanceof RegExp?(0,rs.regexpCode)(F):s.code.formats?(0,rs._)`${s.code.formats}${(0,rs.getProperty)(a)}`:void 0,y=I.scopeValue("formats",{key:a,ref:F,code:v});return typeof F=="object"&&!(F instanceof RegExp)?[F.type||"string",F.validate,(0,rs._)`${y}.validate`]:["string",F,y]}function R(){if(typeof Z=="object"&&!(Z instanceof RegExp)&&Z.async){if(!G.$async)throw new Error("async format in sync schema");return(0,rs._)`await ${h}(${l})`}return typeof W=="function"?(0,rs._)`${h}(${l})`:(0,rs._)`${h}.test(${l})`}}}};uze.default=EQl});var _Mt=Y(bze=>{"use strict";o();Object.defineProperty(bze,"__esModule",{value:!0});var JQl=TMt(),CQl=[JQl.default];bze.default=CQl});var KMt=Y(wO=>{"use strict";o();Object.defineProperty(wO,"__esModule",{value:!0});wO.contentVocabulary=wO.metadataVocabulary=void 0;wO.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];wO.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var qMt=Y(mze=>{"use strict";o();Object.defineProperty(mze,"__esModule",{value:!0});var LQl=nMt(),kQl=hMt(),xQl=SMt(),jQl=_Mt(),DMt=KMt(),UQl=[LQl.default,kQl.default,(0,xQl.default)(),jQl.default,DMt.metadataVocabulary,DMt.contentVocabulary];mze.default=UQl});var $Mt=Y(tpe=>{"use strict";o();Object.defineProperty(tpe,"__esModule",{value:!0});tpe.DiscrError=void 0;var PMt;(function(t){t.Tag="tag",t.Mapping="mapping"})(PMt||(tpe.DiscrError=PMt={}))});var tSt=Y(pze=>{"use strict";o();Object.defineProperty(pze,"__esModule",{value:!0});var HO=Zl(),Zze=$Mt(),eSt=LZe(),OQl=QP(),zQl=en(),BQl={message:({params:{discrError:t,tagName:e}})=>t===Zze.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:I}})=>(0,HO._)`{error: ${t}, tag: ${I}, tagValue: ${e}}`},MQl={keyword:"discriminator",type:"object",schemaType:"object",error:BQl,code(t){let{gen:e,data:I,schema:l,parentSchema:n,it:a}=t,{oneOf:c}=n;if(!a.opts.discriminator)throw new Error("discriminator: requires discriminator option");let r=l.propertyName;if(typeof r!="string")throw new Error("discriminator: requires propertyName");if(l.mapping)throw new Error("discriminator: mapping is not supported");if(!c)throw new Error("discriminator: requires oneOf keyword");let s=e.let("valid",!1),i=e.const("tag",(0,HO._)`${I}${(0,HO.getProperty)(r)}`);e.if((0,HO._)`typeof ${i} == "string"`,()=>G(),()=>t.error(!1,{discrError:Zze.DiscrError.Tag,tag:i,tagName:r})),t.ok(s);function G(){let b=u();e.if(!1);for(let Z in b)e.elseIf((0,HO._)`${i} === ${Z}`),e.assign(s,d(b[Z]));e.else(),t.error(!1,{discrError:Zze.DiscrError.Mapping,tag:i,tagName:r}),e.endIf()}function d(b){let Z=e.name("valid"),p=t.subschema({keyword:"oneOf",schemaProp:b},Z);return t.mergeEvaluated(p,HO.Name),Z}function u(){var b;let Z={},p=h(n),W=!0;for(let R=0;R{SQl.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var Wze=Y((uc,hze)=>{"use strict";o();Object.defineProperty(uc,"__esModule",{value:!0});uc.MissingRefError=uc.ValidationError=uc.CodeGen=uc.Name=uc.nil=uc.stringify=uc.str=uc._=uc.KeywordCxt=uc.Ajv=void 0;var TQl=PBt(),_Ql=qMt(),KQl=tSt(),lSt=ISt(),DQl=["/properties"],Ipe="http://json-schema.org/draft-07/schema",QO=class extends TQl.default{_addVocabularies(){super._addVocabularies(),_Ql.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(KQl.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(lSt,DQl):lSt;this.addMetaSchema(e,Ipe,!1),this.refs["http://json-schema.org/schema"]=Ipe}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Ipe)?Ipe:void 0)}};uc.Ajv=QO;hze.exports=uc=QO;hze.exports.Ajv=QO;Object.defineProperty(uc,"__esModule",{value:!0});uc.default=QO;var qQl=HP();Object.defineProperty(uc,"KeywordCxt",{enumerable:!0,get:function(){return qQl.KeywordCxt}});var fO=Zl();Object.defineProperty(uc,"_",{enumerable:!0,get:function(){return fO._}});Object.defineProperty(uc,"str",{enumerable:!0,get:function(){return fO.str}});Object.defineProperty(uc,"stringify",{enumerable:!0,get:function(){return fO.stringify}});Object.defineProperty(uc,"nil",{enumerable:!0,get:function(){return fO.nil}});Object.defineProperty(uc,"Name",{enumerable:!0,get:function(){return fO.Name}});Object.defineProperty(uc,"CodeGen",{enumerable:!0,get:function(){return fO.CodeGen}});var PQl=JZe();Object.defineProperty(uc,"ValidationError",{enumerable:!0,get:function(){return PQl.default}});var $Ql=QP();Object.defineProperty(uc,"MissingRefError",{enumerable:!0,get:function(){return $Ql.default}})});var oSt=Y(c2=>{"use strict";o();Object.defineProperty(c2,"__esModule",{value:!0});c2.formatNames=c2.fastFormats=c2.fullFormats=void 0;function EO(t,e){return{validate:t,compare:e}}c2.fullFormats={date:EO(cSt,Yze),time:EO(rSt,Rze),"date-time":EO(lfl,sSt),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:cfl,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:ufl,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:rfl,int32:{type:"number",validate:ifl},int64:{type:"number",validate:Gfl},float:{type:"number",validate:aSt},double:{type:"number",validate:aSt},password:!0,binary:!0};c2.fastFormats={...c2.fullFormats,date:EO(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Yze),time:EO(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Rze),"date-time":EO(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,sSt),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i};c2.formatNames=Object.keys(c2.fullFormats);function efl(t){return t%4===0&&(t%100!==0||t%400===0)}var tfl=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,Ifl=[0,31,28,31,30,31,30,31,31,30,31,30,31];function cSt(t){let e=tfl.exec(t);if(!e)return!1;let I=+e[1],l=+e[2],n=+e[3];return l>=1&&l<=12&&n>=1&&n<=(l===2&&efl(I)?29:Ifl[l])}function Yze(t,e){if(t&&e)return t>e?1:te?1:t=sfl}function Gfl(t){return Number.isInteger(t)}function aSt(){return!0}var dfl=/[^\\]\\Z/;function ufl(t){if(dfl.test(t))return!1;try{return new RegExp(t),!0}catch{return!1}}});var iSt=Y(JO=>{"use strict";o();Object.defineProperty(JO,"__esModule",{value:!0});JO.formatLimitDefinition=void 0;var bfl=Wze(),T0=Zl(),nE=T0.operators,lpe={formatMaximum:{okStr:"<=",ok:nE.LTE,fail:nE.GT},formatMinimum:{okStr:">=",ok:nE.GTE,fail:nE.LT},formatExclusiveMaximum:{okStr:"<",ok:nE.LT,fail:nE.GTE},formatExclusiveMinimum:{okStr:">",ok:nE.GT,fail:nE.LTE}},mfl={message:({keyword:t,schemaCode:e})=>T0.str`should be ${lpe[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>T0._`{comparison: ${lpe[t].okStr}, limit: ${e}}`};JO.formatLimitDefinition={keyword:Object.keys(lpe),type:"string",schemaType:"string",$data:!0,error:mfl,code(t){let{gen:e,data:I,schemaCode:l,keyword:n,it:a}=t,{opts:c,self:r}=a;if(!c.validateFormats)return;let s=new bfl.KeywordCxt(a,r.RULES.all.format.definition,"format");s.$data?i():G();function i(){let u=e.scopeValue("formats",{ref:r.formats,code:c.code.formats}),b=e.const("fmt",T0._`${u}[${s.schemaCode}]`);t.fail$data(T0.or(T0._`typeof ${b} != "object"`,T0._`${b} instanceof RegExp`,T0._`typeof ${b}.compare != "function"`,d(b)))}function G(){let u=s.schema,b=r.formats[u];if(!b||b===!0)return;if(typeof b!="object"||b instanceof RegExp||typeof b.compare!="function")throw new Error(`"${n}": format "${u}" does not define "compare" function`);let Z=e.scopeValue("formats",{key:u,ref:b,code:c.code.formats?T0._`${c.code.formats}${T0.getProperty(u)}`:void 0});t.fail$data(d(Z))}function d(u){return T0._`${u}.compare(${I}, ${l}) ${lpe[n].fail} 0`}},dependencies:["format"]};var Zfl=t=>(t.addKeyword(JO.formatLimitDefinition),t);JO.default=Zfl});var bSt=Y((SP,uSt)=>{"use strict";o();Object.defineProperty(SP,"__esModule",{value:!0});var CO=oSt(),pfl=iSt(),Aze=Zl(),GSt=new Aze.Name("fullFormats"),hfl=new Aze.Name("fastFormats"),Fze=(t,e={keywords:!0})=>{if(Array.isArray(e))return dSt(t,e,CO.fullFormats,GSt),t;let[I,l]=e.mode==="fast"?[CO.fastFormats,hfl]:[CO.fullFormats,GSt],n=e.formats||CO.formatNames;return dSt(t,n,I,l),e.keywords&&pfl.default(t),t};Fze.get=(t,e="full")=>{let l=(e==="fast"?CO.fastFormats:CO.fullFormats)[t];if(!l)throw new Error(`Unknown format "${t}"`);return l};function dSt(t,e,I,l){var n,a;(n=(a=t.opts.code).formats)!==null&&n!==void 0||(a.formats=Aze._`require("ajv-formats/dist/formats").${l}`);for(let c of e)t.addFormat(c,I[c])}uSt.exports=SP=Fze;Object.defineProperty(SP,"__esModule",{value:!0});SP.default=Fze});var OTt=Y((_Bc,UTt)=>{o();UTt.exports.IconsManifest=[{id:"fa",name:"Font Awesome",projectUrl:"https://fontawesome.com/",license:"CC BY 4.0 License",licenseUrl:"https://creativecommons.org/licenses/by/4.0/"},{id:"io",name:"Ionicons 4",projectUrl:"https://ionicons.com/",license:"MIT",licenseUrl:"https://github.com/ionic-team/ionicons/blob/master/LICENSE"},{id:"io5",name:"Ionicons 5",projectUrl:"https://ionicons.com/",license:"MIT",licenseUrl:"https://github.com/ionic-team/ionicons/blob/master/LICENSE"},{id:"md",name:"Material Design icons",projectUrl:"http://google.github.io/material-design-icons/",license:"Apache License Version 2.0",licenseUrl:"https://github.com/google/material-design-icons/blob/master/LICENSE"},{id:"ti",name:"Typicons",projectUrl:"http://s-ings.com/typicons/",license:"CC BY-SA 3.0",licenseUrl:"https://creativecommons.org/licenses/by-sa/3.0/"},{id:"go",name:"Github Octicons icons",projectUrl:"https://octicons.github.com/",license:"MIT",licenseUrl:"https://github.com/primer/octicons/blob/master/LICENSE"},{id:"fi",name:"Feather",projectUrl:"https://feathericons.com/",license:"MIT",licenseUrl:"https://github.com/feathericons/feather/blob/master/LICENSE"},{id:"gi",name:"Game Icons",projectUrl:"https://game-icons.net/",license:"CC BY 3.0",licenseUrl:"https://creativecommons.org/licenses/by/3.0/"},{id:"wi",name:"Weather Icons",projectUrl:"https://erikflowers.github.io/weather-icons/",license:"SIL OFL 1.1",licenseUrl:"http://scripts.sil.org/OFL"},{id:"di",name:"Devicons",projectUrl:"https://vorillaz.github.io/devicons/",license:"MIT",licenseUrl:"https://opensource.org/licenses/MIT"},{id:"ai",name:"Ant Design Icons",projectUrl:"https://github.com/ant-design/ant-design-icons",license:"MIT",licenseUrl:"https://opensource.org/licenses/MIT"},{id:"bs",name:"Bootstrap Icons",projectUrl:"https://github.com/twbs/icons",license:"MIT",licenseUrl:"https://opensource.org/licenses/MIT"},{id:"ri",name:"Remix Icon",projectUrl:"https://github.com/Remix-Design/RemixIcon",license:"Apache License Version 2.0",licenseUrl:"http://www.apache.org/licenses/"},{id:"fc",name:"Flat Color Icons",projectUrl:"https://github.com/icons8/flat-color-icons",license:"MIT",licenseUrl:"https://opensource.org/licenses/MIT"},{id:"gr",name:"Grommet-Icons",projectUrl:"https://github.com/grommet/grommet-icons",license:"Apache License Version 2.0",licenseUrl:"http://www.apache.org/licenses/"},{id:"hi",name:"Heroicons",projectUrl:"https://github.com/refactoringui/heroicons",license:"MIT",licenseUrl:"https://opensource.org/licenses/MIT"},{id:"si",name:"Simple Icons",projectUrl:"https://simpleicons.org/",license:"CC0 1.0 Universal",licenseUrl:"https://creativecommons.org/publicdomain/zero/1.0/"},{id:"im",name:"IcoMoon Free",projectUrl:"https://github.com/Keyamoon/IcoMoon-Free",license:"CC BY 4.0 License"},{id:"bi",name:"BoxIcons",projectUrl:"https://github.com/atisawd/boxicons",license:"CC BY 4.0 License"},{id:"cg",name:"css.gg",projectUrl:"https://github.com/astrit/css.gg",license:"MIT",licenseUrl:"https://opensource.org/licenses/MIT"},{id:"vsc",name:"VS Code Icons",projectUrl:"https://github.com/microsoft/vscode-codicons",license:"CC BY 4.0",licenseUrl:"https://creativecommons.org/licenses/by/4.0/"}]});var VBe=Y(hL=>{"use strict";o();Object.defineProperty(hL,"__esModule",{value:!0});hL.IconContext=hL.DefaultContext=void 0;var zTt=We();hL.DefaultContext={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0};hL.IconContext=zTt.createContext&&zTt.createContext(hL.DefaultContext)});var STt=Y(G2=>{"use strict";o();var GE=G2&&G2.__assign||function(){return GE=Object.assign||function(t){for(var e,I=1,l=arguments.length;I{"use strict";o();var u1l=Kg&&Kg.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I),Object.defineProperty(t,l,{enumerable:!0,get:function(){return e[I]}})}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),RBe=Kg&&Kg.__exportStar||function(t,e){for(var I in t)I!=="default"&&!e.hasOwnProperty(I)&&u1l(e,t,I)};Object.defineProperty(Kg,"__esModule",{value:!0});RBe(OTt(),Kg);RBe(STt(),Kg);RBe(VBe(),Kg)});var _Tt=Y((IMc,TTt)=>{o();var b1l=BO().GenIcon;TTt.exports.BsPlus=function(e){return b1l({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M8 3.5a.5.5 0 01.5.5v4a.5.5 0 01-.5.5H4a.5.5 0 010-1h3.5V4a.5.5 0 01.5-.5z",clipRule:"evenodd"}},{tag:"path",attr:{fillRule:"evenodd",d:"M7.5 8a.5.5 0 01.5-.5h4a.5.5 0 010 1H8.5V12a.5.5 0 01-1 0V8z",clipRule:"evenodd"}}]})(e)}});var qTt=Y((cSc,DTt)=>{o();var m1l=BO().GenIcon;DTt.exports.AiOutlineArrowDown=function(e){return m1l({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0 0 48.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z"}}]})(e)}});var $Tt=Y((sSc,PTt)=>{o();var Z1l=BO().GenIcon;PTt.exports.AiOutlineArrowUp=function(e){return Z1l({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M868 545.5L536.1 163a31.96 31.96 0 0 0-48.3 0L156 545.5a7.97 7.97 0 0 0 6 13.2h81c4.6 0 9-2 12.1-5.5L474 300.9V864c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V300.9l218.9 252.3c3 3.5 7.4 5.5 12.1 5.5h81c6.8 0 10.5-8 6-13.2z"}}]})(e)}});var t_t=Y((iSc,e_t)=>{o();var p1l=BO().GenIcon;e_t.exports.IoIosCopy=function(e){return p1l({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M352 115h90c3.3 0 6-2.7 6-6 0-8.2-3.7-16-10-21.3l-77.1-64.2c-4.9-4.1-14.2-7.4-20.6-7.4-4.1 0-7.4 3.3-7.4 7.4V96c.1 10.5 8.6 19 19.1 19z"}},{tag:"path",attr:{d:"M307 96V16H176c-17.6 0-32 14.4-32 32v336c0 17.6 14.4 32 32 32h240c17.6 0 32-14.4 32-32V141h-96c-24.8 0-45-20.2-45-45z"}},{tag:"path",attr:{d:"M116 412V80H96c-17.6 0-32 14.4-32 32v352c0 17.6 14.4 32 32 32h256c17.6 0 32-14.4 32-32v-20H148c-17.6 0-32-14.4-32-32z"}}]})(e)}});var l_t=Y((dSc,I_t)=>{o();var h1l=BO().GenIcon;I_t.exports.IoIosRemove=function(e){return h1l({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M368.5 240h-225c-8.8 0-16 7.2-16 16 0 4.4 1.8 8.4 4.7 11.3 2.9 2.9 6.9 4.7 11.3 4.7h225c8.8 0 16-7.2 16-16s-7.2-16-16-16z"}}]})(e)}});function i7(t,e){return t.lc_error_code=e,t.message=`${t.message} + +Troubleshooting URL: https://docs.langchain.com/oss/javascript/langchain/errors/${e}/ +`,t}var V_t=g(()=>{o()});function cI(t,e,I,l,n){if(l==="m")throw new TypeError("Private method is not writable");if(l==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return l==="a"?n.call(t,I):n?n.value=I:e.set(t,I),I}function me(t,e,I,l){if(I==="a"&&!l)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!l:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return I==="m"?l:I==="a"?l.call(t):l?l.value:e.get(t)}var Qh=g(()=>{o()});var LBe,kBe=g(()=>{o();LBe=function(){let{crypto:t}=globalThis;if(t?.randomUUID)return LBe=t.randomUUID.bind(t),t.randomUUID();let e=new Uint8Array(1),I=t?()=>t.getRandomValues(e)[0]:()=>Math.random()*255&255;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,l=>(+l^I()&15>>+l/4).toString(16))}});function G7(t){return typeof t=="object"&&t!==null&&("name"in t&&t.name==="AbortError"||"message"in t&&String(t.message).includes("FetchRequestCanceledException"))}var d7,Ope=g(()=>{o();d7=t=>{if(t instanceof Error)return t;if(typeof t=="object"&&t!==null){try{if(Object.prototype.toString.call(t)==="[object Error]"){let e=new Error(t.message,t.cause?{cause:t.cause}:{});return t.stack&&(e.stack=t.stack),t.cause&&!e.cause&&(e.cause=t.cause),t.name&&(e.name=t.name),e}}catch{}try{return new Error(JSON.stringify(t))}catch{}}return new Error(t)}});var ht,kr,xr,mE,u2,KO,DO,qO,PO,$O,ez,tz,Iz,lz,nz,b2,YL,u7,fh=g(()=>{o();Ope();ht=class extends Error{},kr=class t extends ht{constructor(e,I,l,n){super(`${t.makeMessage(e,I,l)}`),this.status=e,this.headers=n,this.requestID=n?.get("x-request-id"),this.error=I;let a=I;this.code=a?.code,this.param=a?.param,this.type=a?.type}static makeMessage(e,I,l){let n=I?.message?typeof I.message=="string"?I.message:JSON.stringify(I.message):I?JSON.stringify(I):l;return e&&n?`${e} ${n}`:e?`${e} status code (no body)`:n||"(no status code or body)"}static generate(e,I,l,n){if(!e||!n)return new mE({message:l,cause:d7(I)});let a=I?.error;return e===400?new KO(e,a,l,n):e===401?new DO(e,a,l,n):e===403?new qO(e,a,l,n):e===404?new PO(e,a,l,n):e===409?new $O(e,a,l,n):e===422?new ez(e,a,l,n):e===429?new tz(e,a,l,n):e>=500?new Iz(e,a,l,n):new t(e,a,l,n)}},xr=class extends kr{constructor({message:e}={}){super(void 0,void 0,e||"Request was aborted.",void 0)}},mE=class extends kr{constructor({message:e,cause:I}){super(void 0,void 0,e||"Connection error.",void 0),I&&(this.cause=I)}},u2=class extends mE{constructor({message:e}={}){super({message:e??"Request timed out."})}},KO=class extends kr{},DO=class extends kr{},qO=class extends kr{},PO=class extends kr{},$O=class extends kr{},ez=class extends kr{},tz=class extends kr{},Iz=class extends kr{},lz=class extends ht{constructor(){super("Could not parse response content as the length limit was reached")}},nz=class extends ht{constructor(){super("Could not parse response content as the request was rejected by the content filter")}},b2=class extends Error{constructor(e){super(e)}},YL=class extends kr{constructor(e,I,l){let n="OAuth2 authentication error",a;if(I&&typeof I=="object"){let c=I;a=c.error;let r=c.error_description;r&&typeof r=="string"?n=r:a&&(n=a)}super(e,I,n,l),this.error_code=a}},u7=class extends ht{constructor(e,I,l){super(e),this.provider=I,this.cause=l}}});function jBe(t){return typeof t!="object"?{}:t??{}}function UBe(t){if(!t)return!0;for(let e in t)return!1;return!0}function R_t(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function az(t){return t!=null&&typeof t=="object"&&!Array.isArray(t)}var A1l,Y_t,QG,xBe,A_t,F_t,qg=g(()=>{o();fh();A1l=/^[a-z][a-z0-9+.-]*:/i,Y_t=t=>A1l.test(t),QG=t=>(QG=Array.isArray,QG(t)),xBe=QG;A_t=(t,e)=>{if(typeof e!="number"||!Number.isInteger(e))throw new ht(`${t} must be an integer`);if(e<0)throw new ht(`${t} must be a positive integer`);return e},F_t=t=>{try{return JSON.parse(t)}catch{return}}});var m2,cz=g(()=>{o();m2=t=>new Promise(e=>setTimeout(e,t))});var ZE,OBe=g(()=>{o();ZE="6.34.0"});function F1l(){return typeof Deno<"u"&&Deno.build!=null?"deno":typeof EdgeRuntime<"u"?"edge":Object.prototype.toString.call(typeof globalThis.process<"u"?globalThis.process:0)==="[object process]"?"node":"unknown"}function g1l(){if(typeof navigator>"u"||!navigator)return null;let t=[{key:"edge",pattern:/Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"chrome",pattern:/Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"firefox",pattern:/Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"safari",pattern:/(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/}];for(let{key:e,pattern:I}of t){let l=I.exec(navigator.userAgent);if(l){let n=l[1]||0,a=l[2]||0,c=l[3]||0;return{browser:e,version:`${n}.${a}.${c}`}}}return null}var y_t,X1l,X_t,g_t,v_t,w_t,zBe=g(()=>{o();OBe();y_t=()=>typeof window<"u"&&typeof window.document<"u"&&typeof navigator<"u";X1l=()=>{let t=F1l();if(t==="deno")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":ZE,"X-Stainless-OS":g_t(Deno.build.os),"X-Stainless-Arch":X_t(Deno.build.arch),"X-Stainless-Runtime":"deno","X-Stainless-Runtime-Version":typeof Deno.version=="string"?Deno.version:Deno.version?.deno??"unknown"};if(typeof EdgeRuntime<"u")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":ZE,"X-Stainless-OS":"Unknown","X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":"edge","X-Stainless-Runtime-Version":globalThis.process.version};if(t==="node")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":ZE,"X-Stainless-OS":g_t(globalThis.process.platform??"unknown"),"X-Stainless-Arch":X_t(globalThis.process.arch??"unknown"),"X-Stainless-Runtime":"node","X-Stainless-Runtime-Version":globalThis.process.version??"unknown"};let e=g1l();return e?{"X-Stainless-Lang":"js","X-Stainless-Package-Version":ZE,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":`browser:${e.browser}`,"X-Stainless-Runtime-Version":e.version}:{"X-Stainless-Lang":"js","X-Stainless-Package-Version":ZE,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":"unknown","X-Stainless-Runtime-Version":"unknown"}};X_t=t=>t==="x32"?"x32":t==="x86_64"||t==="x64"?"x64":t==="arm"?"arm":t==="aarch64"||t==="arm64"?"arm64":t?`other:${t}`:"unknown",g_t=t=>(t=t.toLowerCase(),t.includes("ios")?"iOS":t==="android"?"Android":t==="darwin"?"MacOS":t==="win32"?"Windows":t==="freebsd"?"FreeBSD":t==="openbsd"?"OpenBSD":t==="linux"?"Linux":t?`Other:${t}`:"Unknown"),w_t=()=>v_t??(v_t=X1l())});function zpe(){if(typeof fetch<"u")return fetch;throw new Error("`fetch` is not defined as a global; Either pass `fetch` to the client, `new OpenAI({ fetch })` or polyfill the global, `globalThis.fetch = fetch`")}function BBe(...t){let e=globalThis.ReadableStream;if(typeof e>"u")throw new Error("`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`");return new e(...t)}function Bpe(t){let e=Symbol.asyncIterator in t?t[Symbol.asyncIterator]():t[Symbol.iterator]();return BBe({start(){},async pull(I){let{done:l,value:n}=await e.next();l?I.close():I.enqueue(n)},async cancel(){await e.return?.()}})}function MBe(t){if(t[Symbol.asyncIterator])return t;let e=t.getReader();return{async next(){try{let I=await e.read();return I?.done&&e.releaseLock(),I}catch(I){throw e.releaseLock(),I}},async return(){let I=e.cancel();return e.releaseLock(),await I,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}async function SBe(t){if(t===null||typeof t!="object")return;if(t[Symbol.asyncIterator]){await t[Symbol.asyncIterator]().return?.();return}let e=t.getReader(),I=e.cancel();e.releaseLock(),await I}var rz=g(()=>{o()});var Q_t,f_t=g(()=>{o();Q_t=({headers:t,body:e})=>({bodyHeaders:{"content-type":"application/json"},body:JSON.stringify(e)})});var TBe,_Be,KBe,E_t,DBe=g(()=>{o();TBe="RFC3986",_Be=t=>String(t),KBe={RFC1738:t=>String(t).replace(/%20/g,"+"),RFC3986:_Be},E_t="RFC1738"});function C_t(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))}function PBe(t,e){if(QG(t)){let I=[];for(let l=0;l{o();DBe();qg();Mpe=(t,e)=>(Mpe=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),Mpe(t,e)),Z2=(()=>{let t=[];for(let e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t})(),qBe=1024,J_t=(t,e,I,l,n)=>{if(t.length===0)return t;let a=t;if(typeof t=="symbol"?a=Symbol.prototype.toString.call(t):typeof t!="string"&&(a=String(t)),I==="iso-8859-1")return escape(a).replace(/%u[0-9a-f]{4}/gi,function(r){return"%26%23"+parseInt(r.slice(2),16)+"%3B"});let c="";for(let r=0;r=qBe?a.slice(r,r+qBe):a,i=[];for(let G=0;G=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||n===E_t&&(d===40||d===41)){i[i.length]=s.charAt(G);continue}if(d<128){i[i.length]=Z2[d];continue}if(d<2048){i[i.length]=Z2[192|d>>6]+Z2[128|d&63];continue}if(d<55296||d>=57344){i[i.length]=Z2[224|d>>12]+Z2[128|d>>6&63]+Z2[128|d&63];continue}G+=1,d=65536+((d&1023)<<10|s.charCodeAt(G)&1023),i[i.length]=Z2[240|d>>18]+Z2[128|d>>12&63]+Z2[128|d>>6&63]+Z2[128|d&63]}c+=i.join("")}return c}});function y1l(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"}function U_t(t,e,I,l,n,a,c,r,s,i,G,d,u,b,Z,p,W,h){let N=t,V=h,R=0,F=!1;for(;(V=V.get($Be))!==void 0&&!F;){let f=V.get(t);if(R+=1,typeof f<"u"){if(f===R)throw new RangeError("Cyclic object value");F=!0}typeof V.get($Be)>"u"&&(R=0)}if(typeof i=="function"?N=i(e,N):N instanceof Date?N=u?.(N):I==="comma"&&QG(N)&&(N=PBe(N,function(f){return f instanceof Date?u?.(f):f})),N===null){if(a)return s&&!p?s(e,Io.encoder,W,"key",b):e;N=""}if(y1l(N)||C_t(N)){if(s){let f=p?e:s(e,Io.encoder,W,"key",b);return[Z?.(f)+"="+Z?.(s(N,Io.encoder,W,"value",b))]}return[Z?.(e)+"="+Z?.(String(N))]}let v=[];if(typeof N>"u")return v;let y;if(I==="comma"&&QG(N))p&&s&&(N=PBe(N,s)),y=[{value:N.length>0?N.join(",")||null:void 0}];else if(QG(i))y=i;else{let f=Object.keys(N);y=G?f.sort(G):f}let w=r?String(e).replace(/\./g,"%2E"):String(e),H=l&&QG(N)&&N.length===1?w+"[]":w;if(n&&QG(N)&&N.length===0)return H+"[]";for(let f=0;f"u"?t.encodeDotInKeys?!0:Io.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:Io.addQueryPrefix,allowDots:c,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:Io.allowEmptyArrays,arrayFormat:a,charset:e,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Io.charsetSentinel,commaRoundTrip:!!t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?Io.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Io.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:Io.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:Io.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Io.encodeValuesOnly,filter:n,format:I,formatter:l,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Io.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Io.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Io.strictNullHandling}}function O_t(t,e={}){let I=t,l=w1l(e),n,a;typeof l.filter=="function"?(a=l.filter,I=a("",I)):QG(l.filter)&&(a=l.filter,n=a);let c=[];if(typeof I!="object"||I===null)return"";let r=x_t[l.arrayFormat],s=r==="comma"&&l.commaRoundTrip;n||(n=Object.keys(I)),l.sort&&n.sort(l.sort);let i=new WeakMap;for(let u=0;u0?d+G:""}var x_t,j_t,k_t,Io,$Be,z_t=g(()=>{o();L_t();DBe();qg();x_t={brackets(t){return String(t)+"[]"},comma:"comma",indices(t,e){return String(t)+"["+e+"]"},repeat(t){return String(t)}},j_t=function(t,e){Array.prototype.push.apply(t,QG(e)?e:[e])},Io={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:J_t,encodeValuesOnly:!1,format:TBe,formatter:_Be,indices:!1,serializeDate(t){return(k_t??(k_t=Function.prototype.call.bind(Date.prototype.toISOString)))(t)},skipNulls:!1,strictNullHandling:!1};$Be={}});function B_t(t){return O_t(t,{arrayFormat:"brackets"})}var eMe=g(()=>{o();z_t()});function T_t(t){let e=0;for(let n of t)e+=n.length;let I=new Uint8Array(e),l=0;for(let n of t)I.set(n,l),l+=n.length;return I}function sz(t){let e;return(M_t??(e=new globalThis.TextEncoder,M_t=e.encode.bind(e)))(t)}function tMe(t){let e;return(S_t??(e=new globalThis.TextDecoder,S_t=e.decode.bind(e)))(t)}var M_t,S_t,Spe=g(()=>{o()});function Q1l(t,e){for(let n=e??0;n{o();Qh();Spe();RL=class{constructor(){JZ.set(this,void 0),CZ.set(this,void 0),cI(this,JZ,new Uint8Array,"f"),cI(this,CZ,null,"f")}decode(e){if(e==null)return[];let I=e instanceof ArrayBuffer?new Uint8Array(e):typeof e=="string"?sz(e):e;cI(this,JZ,T_t([me(this,JZ,"f"),I]),"f");let l=[],n;for(;(n=Q1l(me(this,JZ,"f"),me(this,CZ,"f")))!=null;){if(n.carriage&&me(this,CZ,"f")==null){cI(this,CZ,n.index,"f");continue}if(me(this,CZ,"f")!=null&&(n.index!==me(this,CZ,"f")+1||n.carriage)){l.push(tMe(me(this,JZ,"f").subarray(0,me(this,CZ,"f")-1))),cI(this,JZ,me(this,JZ,"f").subarray(me(this,CZ,"f")),"f"),cI(this,CZ,null,"f");continue}let a=me(this,CZ,"f")!==null?n.preceding-1:n.preceding,c=tMe(me(this,JZ,"f").subarray(0,a));l.push(c),cI(this,JZ,me(this,JZ,"f").subarray(n.index),"f"),cI(this,CZ,null,"f")}return l}flush(){return me(this,JZ,"f").length?this.decode(` +`):[]}};JZ=new WeakMap,CZ=new WeakMap;RL.NEWLINE_CHARS=new Set([` +`,"\r"]);RL.NEWLINE_REGEXP=/\r\n|[\n\r]/g});function b7(){}function Tpe(t,e,I){return!e||_pe[t]>_pe[I]?b7:e[t].bind(e)}function ss(t){let e=t.logger,I=t.logLevel??"off";if(!e)return f1l;let l=D_t.get(e);if(l&&l[0]===I)return l[1];let n={error:Tpe("error",e,I),warn:Tpe("warn",e,I),info:Tpe("info",e,I),debug:Tpe("debug",e,I)};return D_t.set(e,[I,n]),n}var _pe,IMe,f1l,D_t,Pg,m7=g(()=>{o();qg();_pe={off:0,error:200,warn:300,info:400,debug:500},IMe=(t,e,I)=>{if(t){if(R_t(_pe,t))return t;ss(I).warn(`${e} was set to ${JSON.stringify(t)}, expected one of ${JSON.stringify(Object.keys(_pe))}`)}};f1l={error:b7,warn:b7,info:b7,debug:b7},D_t=new WeakMap;Pg=t=>(t.options&&(t.options={...t.options},delete t.options.headers),t.headers&&(t.headers=Object.fromEntries((t.headers instanceof Headers?[...t.headers]:Object.entries(t.headers)).map(([e,I])=>[e,e.toLowerCase()==="authorization"||e.toLowerCase()==="cookie"||e.toLowerCase()==="set-cookie"?"***":I]))),"retryOfRequestLogID"in t&&(t.retryOfRequestLogID&&(t.retryOf=t.retryOfRequestLogID),delete t.retryOfRequestLogID),t)});async function*E1l(t,e){if(!t.body)throw e.abort(),typeof globalThis.navigator<"u"&&globalThis.navigator.product==="ReactNative"?new ht("The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api"):new ht("Attempted to iterate over a response with no body");let I=new lMe,l=new RL,n=MBe(t.body);for await(let a of J1l(n))for(let c of l.decode(a)){let r=I.decode(c);r&&(yield r)}for(let a of l.flush()){let c=I.decode(a);c&&(yield c)}}async function*J1l(t){let e=new Uint8Array;for await(let I of t){if(I==null)continue;let l=I instanceof ArrayBuffer?new Uint8Array(I):typeof I=="string"?sz(I):I,n=new Uint8Array(e.length+l.length);n.set(e),n.set(l,e.length),e=n;let a;for(;(a=__t(e))!==-1;)yield e.slice(0,a),e=e.slice(a)}e.length>0&&(yield e)}function C1l(t,e){let I=t.indexOf(e);return I!==-1?[t.substring(0,I),e,t.substring(I+e.length)]:[t,"",""]}var Z7,p2,lMe,nMe=g(()=>{o();Qh();fh();rz();K_t();rz();Ope();Spe();m7();fh();p2=class t{constructor(e,I,l){this.iterator=e,Z7.set(this,void 0),this.controller=I,cI(this,Z7,l,"f")}static fromSSEResponse(e,I,l,n){let a=!1,c=l?ss(l):console;async function*r(){if(a)throw new ht("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");a=!0;let s=!1;try{for await(let i of E1l(e,I))if(!s){if(i.data.startsWith("[DONE]")){s=!0;continue}if(i.event===null||!i.event.startsWith("thread.")){let G;try{G=JSON.parse(i.data)}catch(d){throw c.error("Could not parse message into JSON:",i.data),c.error("From chunk:",i.raw),d}if(G&&G.error)throw new kr(void 0,G.error,void 0,e.headers);yield n?{event:i.event,data:G}:G}else{let G;try{G=JSON.parse(i.data)}catch(d){throw console.error("Could not parse message into JSON:",i.data),console.error("From chunk:",i.raw),d}if(i.event=="error")throw new kr(void 0,G.error,G.message,void 0);yield{event:i.event,data:G}}}s=!0}catch(i){if(G7(i))return;throw i}finally{s||I.abort()}}return new t(r,I,l)}static fromReadableStream(e,I,l){let n=!1;async function*a(){let r=new RL,s=MBe(e);for await(let i of s)for(let G of r.decode(i))yield G;for(let i of r.flush())yield i}async function*c(){if(n)throw new ht("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");n=!0;let r=!1;try{for await(let s of a())r||s&&(yield JSON.parse(s));r=!0}catch(s){if(G7(s))return;throw s}finally{r||I.abort()}}return new t(c,I,l)}[(Z7=new WeakMap,Symbol.asyncIterator)](){return this.iterator()}tee(){let e=[],I=[],l=this.iterator(),n=a=>({next:()=>{if(a.length===0){let c=l.next();e.push(c),I.push(c)}return a.shift()}});return[new t(()=>n(e),this.controller,me(this,Z7,"f")),new t(()=>n(I),this.controller,me(this,Z7,"f"))]}toReadableStream(){let e=this,I;return BBe({async start(){I=e[Symbol.asyncIterator]()},async pull(l){try{let{value:n,done:a}=await I.next();if(a)return l.close();let c=sz(JSON.stringify(n)+` +`);l.enqueue(c)}catch(n){l.error(n)}},async cancel(){await I.return?.()}})}};lMe=class{constructor(){this.event=null,this.data=[],this.chunks=[]}decode(e){if(e.endsWith("\r")&&(e=e.substring(0,e.length-1)),!e){if(!this.event&&!this.data.length)return null;let a={event:this.event,data:this.data.join(` +`),raw:this.chunks};return this.event=null,this.data=[],this.chunks=[],a}if(this.chunks.push(e),e.startsWith(":"))return null;let[I,l,n]=C1l(e,":");return n.startsWith(" ")&&(n=n.substring(1)),I==="event"?this.event=n:I==="data"&&this.data.push(n),null}}});async function Kpe(t,e){let{response:I,requestLogID:l,retryOfRequestLogID:n,startTime:a}=e,c=await(async()=>{if(e.options.stream)return ss(t).debug("response",I.status,I.url,I.headers,I.body),e.options.__streamClass?e.options.__streamClass.fromSSEResponse(I,e.controller,t,e.options.__synthesizeEventData):p2.fromSSEResponse(I,e.controller,t,e.options.__synthesizeEventData);if(I.status===204)return null;if(e.options.__binaryResponse)return I;let s=I.headers.get("content-type")?.split(";")[0]?.trim();if(s?.includes("application/json")||s?.endsWith("+json")){if(I.headers.get("content-length")==="0")return;let u=await I.json();return aMe(u,I)}return await I.text()})();return ss(t).debug(`[${l}] response parsed`,Pg({retryOfRequestLogID:n,url:I.url,status:I.status,body:c,durationMs:Date.now()-a})),c}function aMe(t,e){return!t||typeof t!="object"||Array.isArray(t)?t:Object.defineProperty(t,"_request_id",{value:e.headers.get("x-request-id"),enumerable:!1})}var cMe=g(()=>{o();nMe();m7()});var p7,AL,Dpe=g(()=>{o();Qh();cMe();AL=class t extends Promise{constructor(e,I,l=Kpe){super(n=>{n(null)}),this.responsePromise=I,this.parseResponse=l,p7.set(this,void 0),cI(this,p7,e,"f")}_thenUnwrap(e){return new t(me(this,p7,"f"),this.responsePromise,async(I,l)=>aMe(e(await this.parseResponse(I,l),l),l.response))}asResponse(){return this.responsePromise.then(e=>e.response)}async withResponse(){let[e,I]=await Promise.all([this.parse(),this.asResponse()]);return{data:e,response:I,request_id:I.headers.get("x-request-id")}}parse(){return this.parsedPromise||(this.parsedPromise=this.responsePromise.then(e=>this.parseResponse(me(this,p7,"f"),e))),this.parsedPromise}then(e,I){return this.parse().then(e,I)}catch(e){return this.parse().catch(e)}finally(e){return this.parse().finally(e)}};p7=new WeakMap});var qpe,h7,W7,h2,MI,K0,Bn=g(()=>{o();Qh();fh();cMe();Dpe();qg();h7=class{constructor(e,I,l,n){qpe.set(this,void 0),cI(this,qpe,e,"f"),this.options=n,this.response=I,this.body=l}hasNextPage(){return this.getPaginatedItems().length?this.nextPageRequestOptions()!=null:!1}async getNextPage(){let e=this.nextPageRequestOptions();if(!e)throw new ht("No next page expected; please check `.hasNextPage()` before calling `.getNextPage()`.");return await me(this,qpe,"f").requestAPIList(this.constructor,e)}async*iterPages(){let e=this;for(yield e;e.hasNextPage();)e=await e.getNextPage(),yield e}async*[(qpe=new WeakMap,Symbol.asyncIterator)](){for await(let e of this.iterPages())for(let I of e.getPaginatedItems())yield I}},W7=class extends AL{constructor(e,I,l){super(e,I,async(n,a)=>new l(n,a.response,await Kpe(n,a),a.options))}async*[Symbol.asyncIterator](){let e=await this;for await(let I of e)yield I}},h2=class extends h7{constructor(e,I,l,n){super(e,I,l,n),this.data=l.data||[],this.object=l.object}getPaginatedItems(){return this.data??[]}nextPageRequestOptions(){return null}},MI=class extends h7{constructor(e,I,l,n){super(e,I,l,n),this.data=l.data||[],this.has_more=l.has_more||!1}getPaginatedItems(){return this.data??[]}hasNextPage(){return this.has_more===!1?!1:super.hasNextPage()}nextPageRequestOptions(){let e=this.getPaginatedItems(),I=e[e.length-1]?.id;return I?{...this.options,query:{...jBe(this.options.query),after:I}}:null}},K0=class extends h7{constructor(e,I,l,n){super(e,I,l,n),this.data=l.data||[],this.has_more=l.has_more||!1,this.last_id=l.last_id||""}getPaginatedItems(){return this.data??[]}hasNextPage(){return this.has_more===!1?!1:super.hasNextPage()}nextPageRequestOptions(){let e=this.last_id;return e?{...this.options,query:{...jBe(this.options.query),after:e}}:null}}});var k1l,x1l,Ppe,q_t=g(()=>{o();rz();fh();k1l={jwt:"urn:ietf:params:oauth:token-type:jwt",id:"urn:ietf:params:oauth:token-type:id_token"},x1l="urn:ietf:params:oauth:grant-type:token-exchange",Ppe=class{constructor(e,I){this.cachedToken=null,this.refreshPromise=null,this.tokenExchangeUrl="https://auth.openai.com/oauth/token",this.config=e,this.fetch=I??zpe()}async getToken(){if(!this.cachedToken||this.isTokenExpired(this.cachedToken)){if(this.refreshPromise)return await this.refreshPromise;this.refreshPromise=this.refreshToken();try{return await this.refreshPromise}finally{this.refreshPromise=null}}return this.needsRefresh(this.cachedToken)&&!this.refreshPromise&&(this.refreshPromise=this.refreshToken().finally(()=>{this.refreshPromise=null})),this.cachedToken.token}async refreshToken(){let e=await this.config.provider.getToken(),I=await this.fetch(this.tokenExchangeUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({grant_type:x1l,client_id:this.config.clientId,subject_token:e,subject_token_type:k1l[this.config.provider.tokenType],identity_provider_id:this.config.identityProviderId,service_account_id:this.config.serviceAccountId})});if(!I.ok){let c=await I.text(),r;try{r=JSON.parse(c)}catch{}throw I.status===400||I.status===401||I.status===403?new YL(I.status,r,I.headers):kr.generate(I.status,r,`Token exchange failed with status ${I.status}`,I.headers)}let l=await I.json(),n=l.expires_in||3600,a=Date.now()+n*1e3;return this.cachedToken={token:l.access_token,expiresAt:a},l.access_token}isTokenExpired(e){return Date.now()>=e.expiresAt}needsRefresh(e){let l=(this.config.refreshBufferSeconds??1200)*1e3;return Date.now()>=e.expiresAt-l}invalidateToken(){this.cachedToken=null,this.refreshPromise=null}}});function oz(t,e,I){return oMe(),new File(t,e??"unknown_file",I)}function N7(t){return(typeof t=="object"&&t!==null&&("name"in t&&t.name&&String(t.name)||"url"in t&&t.url&&String(t.url)||"filename"in t&&t.filename&&String(t.filename)||"path"in t&&t.path&&String(t.path))||"").split(/[\\/]/).pop()||void 0}function j1l(t){let e=typeof t=="function"?t:t.fetch,I=P_t.get(e);if(I)return I;let l=(async()=>{try{let n="Response"in e?e.Response:(await e("data:,")).constructor,a=new FormData;return a.toString()!==await new n(a).text()}catch{return!0}})();return P_t.set(e,l),l}var oMe,$pe,pE,fG,P_t,$_t,eKt,U1l,rMe,sMe,Eh=g(()=>{o();rz();oMe=()=>{if(typeof File>"u"){let{process:t}=globalThis,e=typeof t?.versions?.node=="string"&&parseInt(t.versions.node.split("."))<20;throw new Error("`File` is not defined as a global, which is required for file uploads."+(e?" Update to Node 20 LTS or newer, or set `globalThis.File` to `import('node:buffer').File`.":""))}};$pe=t=>t!=null&&typeof t=="object"&&typeof t[Symbol.asyncIterator]=="function",pE=async(t,e)=>rMe(t.body)?{...t,body:await $_t(t.body,e)}:t,fG=async(t,e)=>({...t,body:await $_t(t.body,e)}),P_t=new WeakMap;$_t=async(t,e)=>{if(!await j1l(e))throw new TypeError("The provided fetch function does not support file uploads with the current global FormData class.");let I=new FormData;return await Promise.all(Object.entries(t||{}).map(([l,n])=>sMe(I,l,n))),I},eKt=t=>t instanceof Blob&&"name"in t,U1l=t=>typeof t=="object"&&t!==null&&(t instanceof Response||$pe(t)||eKt(t)),rMe=t=>{if(U1l(t))return!0;if(Array.isArray(t))return t.some(rMe);if(t&&typeof t=="object"){for(let e in t)if(rMe(t[e]))return!0}return!1},sMe=async(t,e,I)=>{if(I!==void 0){if(I==null)throw new TypeError(`Received null for "${e}"; to pass null in FormData, you must use the string 'null'`);if(typeof I=="string"||typeof I=="number"||typeof I=="boolean")t.append(e,String(I));else if(I instanceof Response)t.append(e,oz([await I.blob()],N7(I)));else if($pe(I))t.append(e,oz([await new Response(Bpe(I)).blob()],N7(I)));else if(eKt(I))t.append(e,I,N7(I));else if(Array.isArray(I))await Promise.all(I.map(l=>sMe(t,e+"[]",l)));else if(typeof I=="object")await Promise.all(Object.entries(I).map(([l,n])=>sMe(t,`${e}[${l}]`,n)));else throw new TypeError(`Invalid value given to form, expected a string, number, boolean, object, Array, File or Blob but got ${I} instead`)}}});async function iz(t,e,I){if(oMe(),t=await t,O1l(t))return t instanceof File?t:oz([await t.arrayBuffer()],t.name);if(z1l(t)){let n=await t.blob();return e||(e=new URL(t.url).pathname.split(/[\\/]/).pop()),oz(await iMe(n),e,I)}let l=await iMe(t);if(e||(e=N7(t)),!I?.type){let n=l.find(a=>typeof a=="object"&&"type"in a&&a.type);typeof n=="string"&&(I={...I,type:n})}return oz(l,e,I)}async function iMe(t){let e=[];if(typeof t=="string"||ArrayBuffer.isView(t)||t instanceof ArrayBuffer)e.push(t);else if(tKt(t))e.push(t instanceof Blob?t:await t.arrayBuffer());else if($pe(t))for await(let I of t)e.push(...await iMe(I));else{let I=t?.constructor?.name;throw new Error(`Unexpected data type: ${typeof t}${I?`; constructor: ${I}`:""}${B1l(t)}`)}return e}function B1l(t){return typeof t!="object"||t===null?"":`; props: [${Object.getOwnPropertyNames(t).map(I=>`"${I}"`).join(", ")}]`}var tKt,O1l,z1l,IKt=g(()=>{o();Eh();Eh();tKt=t=>t!=null&&typeof t=="object"&&typeof t.size=="number"&&typeof t.type=="string"&&typeof t.text=="function"&&typeof t.slice=="function"&&typeof t.arrayBuffer=="function",O1l=t=>t!=null&&typeof t=="object"&&typeof t.name=="string"&&typeof t.lastModified=="number"&&tKt(t),z1l=t=>t!=null&&typeof t=="object"&&typeof t.url=="string"&&typeof t.blob=="function"});var GMe=g(()=>{o();IKt()});var fe,Tt=g(()=>{o();fe=class{constructor(e){this._client=e}}});function nKt(t){return t.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g,encodeURIComponent)}var lKt,S1l,Ye,Cl=g(()=>{o();fh();lKt=Object.freeze(Object.create(null)),S1l=(t=nKt)=>function(I,...l){if(I.length===1)return I[0];let n=!1,a=[],c=I.reduce((G,d,u)=>{/[?#]/.test(d)&&(n=!0);let b=l[u],Z=(n?encodeURIComponent:t)(""+b);return u!==l.length&&(b==null||typeof b=="object"&&b.toString===Object.getPrototypeOf(Object.getPrototypeOf(b.hasOwnProperty??lKt)??lKt)?.toString)&&(Z=b+"",a.push({start:G.length+d.length,length:Z.length,error:`Value of type ${Object.prototype.toString.call(b).slice(8,-1)} is not a valid path parameter`})),G+d+(u===l.length?"":Z)},""),r=c.split(/[?#]/,1)[0],s=/(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi,i;for(;(i=s.exec(r))!==null;)a.push({start:i.index,length:i[0].length,error:`Value "${i[0]}" can't be safely passed as a path parameter`});if(a.sort((G,d)=>G.start-d.start),a.length>0){let G=0,d=a.reduce((u,b)=>{let Z=" ".repeat(b.start-G),p="^".repeat(b.length);return G=b.start+b.length,u+Z+p},"");throw new ht(`Path parameters result in path with invalid segments: +${a.map(u=>u.error).join(` +`)} +${c} +${d}`)}return c},Ye=S1l(nKt)});var FL,ehe=g(()=>{o();Tt();Bn();Cl();FL=class extends fe{list(e,I={},l){return this._client.getAPIList(Ye`/chat/completions/${e}/messages`,MI,{query:I,...l})}}});var D0=g(()=>{o();fh()});function V7(t){return t!==void 0&&"function"in t&&t.function!==void 0}function aKt(t,e){let I={...t};return Object.defineProperties(I,{$brand:{value:"auto-parseable-response-format",enumerable:!1},$parseRaw:{value:e,enumerable:!1}}),I}function Y7(t){return t?.$brand==="auto-parseable-response-format"}function XL(t){return t?.$brand==="auto-parseable-tool"}function cKt(t,e){return!e||!dMe(e)?{...t,choices:t.choices.map(I=>(sKt(I.message.tool_calls),{...I,message:{...I.message,parsed:null,...I.message.tool_calls?{tool_calls:I.message.tool_calls}:void 0}}))}:R7(t,e)}function R7(t,e){let I=t.choices.map(l=>{if(l.finish_reason==="length")throw new lz;if(l.finish_reason==="content_filter")throw new nz;return sKt(l.message.tool_calls),{...l,message:{...l.message,...l.message.tool_calls?{tool_calls:l.message.tool_calls?.map(n=>D1l(e,n))??void 0}:void 0,parsed:l.message.content&&!l.message.refusal?K1l(e,l.message.content):null}}});return{...t,choices:I}}function K1l(t,e){return t.response_format?.type!=="json_schema"?null:t.response_format?.type==="json_schema"?"$parseRaw"in t.response_format?t.response_format.$parseRaw(e):JSON.parse(e):null}function D1l(t,e){let I=t.tools?.find(l=>V7(l)&&l.function?.name===e.function.name);return{...e,function:{...e.function,parsed_arguments:XL(I)?I.$parseRaw(e.function.arguments):I?.function.strict?JSON.parse(e.function.arguments):null}}}function rKt(t,e){if(!t||!("tools"in t)||!t.tools)return!1;let I=t.tools?.find(l=>V7(l)&&l.function?.name===e.function.name);return V7(I)&&(XL(I)||I?.function.strict||!1)}function dMe(t){return Y7(t.response_format)?!0:t.tools?.some(e=>XL(e)||e.type==="function"&&e.function.strict===!0)??!1}function sKt(t){for(let e of t||[])if(e.type!=="function")throw new ht(`Currently only \`function\` tool calls are supported; Received \`${e.type}\``)}function oKt(t){for(let e of t??[]){if(e.type!=="function")throw new ht(`Currently only \`function\` tool types support auto-parsing; Received \`${e.type}\``);if(e.function.strict!==!0)throw new ht(`The \`${e.function.name}\` tool is not marked with \`strict: true\`. Only strict function tools can be auto-parsed`)}}var Gz=g(()=>{o();D0()});var dz,uMe,bMe=g(()=>{o();dz=t=>t?.role==="assistant",uMe=t=>t?.role==="tool"});var mMe,the,Ihe,A7,F7,lhe,X7,$g,g7,nhe,ahe,uz,iKt,hE,che=g(()=>{o();Qh();D0();hE=class{constructor(){mMe.add(this),this.controller=new AbortController,the.set(this,void 0),Ihe.set(this,()=>{}),A7.set(this,()=>{}),F7.set(this,void 0),lhe.set(this,()=>{}),X7.set(this,()=>{}),$g.set(this,{}),g7.set(this,!1),nhe.set(this,!1),ahe.set(this,!1),uz.set(this,!1),cI(this,the,new Promise((e,I)=>{cI(this,Ihe,e,"f"),cI(this,A7,I,"f")}),"f"),cI(this,F7,new Promise((e,I)=>{cI(this,lhe,e,"f"),cI(this,X7,I,"f")}),"f"),me(this,the,"f").catch(()=>{}),me(this,F7,"f").catch(()=>{})}_run(e){setTimeout(()=>{e().then(()=>{this._emitFinal(),this._emit("end")},me(this,mMe,"m",iKt).bind(this))},0)}_connected(){this.ended||(me(this,Ihe,"f").call(this),this._emit("connect"))}get ended(){return me(this,g7,"f")}get errored(){return me(this,nhe,"f")}get aborted(){return me(this,ahe,"f")}abort(){this.controller.abort()}on(e,I){return(me(this,$g,"f")[e]||(me(this,$g,"f")[e]=[])).push({listener:I}),this}off(e,I){let l=me(this,$g,"f")[e];if(!l)return this;let n=l.findIndex(a=>a.listener===I);return n>=0&&l.splice(n,1),this}once(e,I){return(me(this,$g,"f")[e]||(me(this,$g,"f")[e]=[])).push({listener:I,once:!0}),this}emitted(e){return new Promise((I,l)=>{cI(this,uz,!0,"f"),e!=="error"&&this.once("error",l),this.once(e,I)})}async done(){cI(this,uz,!0,"f"),await me(this,F7,"f")}_emit(e,...I){if(me(this,g7,"f"))return;e==="end"&&(cI(this,g7,!0,"f"),me(this,lhe,"f").call(this));let l=me(this,$g,"f")[e];if(l&&(me(this,$g,"f")[e]=l.filter(n=>!n.once),l.forEach(({listener:n})=>n(...I))),e==="abort"){let n=I[0];!me(this,uz,"f")&&!l?.length&&Promise.reject(n),me(this,A7,"f").call(this,n),me(this,X7,"f").call(this,n),this._emit("end");return}if(e==="error"){let n=I[0];!me(this,uz,"f")&&!l?.length&&Promise.reject(n),me(this,A7,"f").call(this,n),me(this,X7,"f").call(this,n),this._emit("end")}}_emitFinal(){}};the=new WeakMap,Ihe=new WeakMap,A7=new WeakMap,F7=new WeakMap,lhe=new WeakMap,X7=new WeakMap,$g=new WeakMap,g7=new WeakMap,nhe=new WeakMap,ahe=new WeakMap,uz=new WeakMap,mMe=new WeakSet,iKt=function(e){if(cI(this,nhe,!0,"f"),e instanceof Error&&e.name==="AbortError"&&(e=new xr),e instanceof xr)return cI(this,ahe,!0,"f"),this._emit("abort",e);if(e instanceof ht)return this._emit("error",e);if(e instanceof Error){let I=new ht(e.message);return I.cause=e,this._emit("error",I)}return this._emit("error",new ht(String(e)))}});function GKt(t){return typeof t.parse=="function"}var ZMe=g(()=>{o()});var bb,pMe,rhe,hMe,WMe,NMe,dKt,uKt,q1l,bz,VMe=g(()=>{o();Qh();D0();Gz();bMe();che();ZMe();q1l=10,bz=class extends hE{constructor(){super(...arguments),bb.add(this),this._chatCompletions=[],this.messages=[]}_addChatCompletion(e){this._chatCompletions.push(e),this._emit("chatCompletion",e);let I=e.choices[0]?.message;return I&&this._addMessage(I),e}_addMessage(e,I=!0){if("content"in e||(e.content=null),this.messages.push(e),I){if(this._emit("message",e),uMe(e)&&e.content)this._emit("functionToolCallResult",e.content);else if(dz(e)&&e.tool_calls)for(let l of e.tool_calls)l.type==="function"&&this._emit("functionToolCall",l.function)}}async finalChatCompletion(){await this.done();let e=this._chatCompletions[this._chatCompletions.length-1];if(!e)throw new ht("stream ended without producing a ChatCompletion");return e}async finalContent(){return await this.done(),me(this,bb,"m",pMe).call(this)}async finalMessage(){return await this.done(),me(this,bb,"m",rhe).call(this)}async finalFunctionToolCall(){return await this.done(),me(this,bb,"m",hMe).call(this)}async finalFunctionToolCallResult(){return await this.done(),me(this,bb,"m",WMe).call(this)}async totalUsage(){return await this.done(),me(this,bb,"m",NMe).call(this)}allChatCompletions(){return[...this._chatCompletions]}_emitFinal(){let e=this._chatCompletions[this._chatCompletions.length-1];e&&this._emit("finalChatCompletion",e);let I=me(this,bb,"m",rhe).call(this);I&&this._emit("finalMessage",I);let l=me(this,bb,"m",pMe).call(this);l&&this._emit("finalContent",l);let n=me(this,bb,"m",hMe).call(this);n&&this._emit("finalFunctionToolCall",n);let a=me(this,bb,"m",WMe).call(this);a!=null&&this._emit("finalFunctionToolCallResult",a),this._chatCompletions.some(c=>c.usage)&&this._emit("totalUsage",me(this,bb,"m",NMe).call(this))}async _createChatCompletion(e,I,l){let n=l?.signal;n&&(n.aborted&&this.controller.abort(),n.addEventListener("abort",()=>this.controller.abort())),me(this,bb,"m",dKt).call(this,I);let a=await e.chat.completions.create({...I,stream:!1},{...l,signal:this.controller.signal});return this._connected(),this._addChatCompletion(R7(a,I))}async _runChatCompletion(e,I,l){for(let n of I.messages)this._addMessage(n,!1);return await this._createChatCompletion(e,I,l)}async _runTools(e,I,l){let n="tool",{tool_choice:a="auto",stream:c,...r}=I,s=typeof a!="string"&&a.type==="function"&&a?.function?.name,{maxChatCompletions:i=q1l}=l||{},G=I.tools.map(b=>{if(XL(b)){if(!b.$callback)throw new ht("Tool given to `.runTools()` that does not have an associated function");return{type:"function",function:{function:b.$callback,name:b.function.name,description:b.function.description||"",parameters:b.function.parameters,parse:b.$parseRaw,strict:!0}}}return b}),d={};for(let b of G)b.type==="function"&&(d[b.function.name||b.function.function.name]=b.function);let u="tools"in I?G.map(b=>b.type==="function"?{type:"function",function:{name:b.function.name||b.function.function.name,parameters:b.function.parameters,description:b.function.description,strict:b.function.strict}}:b):void 0;for(let b of I.messages)this._addMessage(b,!1);for(let b=0;bJSON.stringify(H)).join(", ")}. Please try again`;this._addMessage({role:n,tool_call_id:h,content:w});continue}let F;try{F=GKt(R)?await R.parse(V):V}catch(w){let H=w instanceof Error?w.message:String(w);this._addMessage({role:n,tool_call_id:h,content:H});continue}let v=await R.function(F,this),y=me(this,bb,"m",uKt).call(this,v);if(this._addMessage({role:n,tool_call_id:h,content:y}),s)return}}}};bb=new WeakSet,pMe=function(){return me(this,bb,"m",rhe).call(this).content??null},rhe=function(){let e=this.messages.length;for(;e-- >0;){let I=this.messages[e];if(dz(I))return{...I,content:I.content??null,refusal:I.refusal??null}}throw new ht("stream ended without producing a ChatCompletionMessage with role=assistant")},hMe=function(){for(let e=this.messages.length-1;e>=0;e--){let I=this.messages[e];if(dz(I)&&I?.tool_calls?.length)return I.tool_calls.filter(l=>l.type==="function").at(-1)?.function}},WMe=function(){for(let e=this.messages.length-1;e>=0;e--){let I=this.messages[e];if(uMe(I)&&I.content!=null&&typeof I.content=="string"&&this.messages.some(l=>l.role==="assistant"&&l.tool_calls?.some(n=>n.type==="function"&&n.id===I.tool_call_id)))return I.content}},NMe=function(){let e={completion_tokens:0,prompt_tokens:0,total_tokens:0};for(let{usage:I}of this._chatCompletions)I&&(e.completion_tokens+=I.completion_tokens,e.prompt_tokens+=I.prompt_tokens,e.total_tokens+=I.total_tokens);return e},dKt=function(e){if(e.n!=null&&e.n>1)throw new ht("ChatCompletion convenience helpers only support n=1 at this time. To use n>1, please use chat.completions.create() directly.")},uKt=function(e){return typeof e=="string"?e:e===void 0?"undefined":JSON.stringify(e)}});var v7,YMe=g(()=>{o();VMe();bMe();v7=class t extends bz{static runTools(e,I,l){let n=new t,a={...l,headers:{...l?.headers,"X-Stainless-Helper-Method":"runTools"}};return n._run(()=>n._runTools(e,I,a)),n}_addMessage(e,I=!0){super._addMessage(e,I),dz(e)&&e.content&&this._emit("content",e.content)}}});function P1l(t,e=xo.ALL){if(typeof t!="string")throw new TypeError(`expecting str, got ${typeof t}`);if(!t.trim())throw new Error(`${t} is empty`);return $1l(t.trim(),e)}var xo,RMe,AMe,$1l,FMe,bKt=g(()=>{o();xo={STR:1,NUM:2,ARR:4,OBJ:8,NULL:16,BOOL:32,NAN:64,INFINITY:128,MINUS_INFINITY:256,INF:384,SPECIAL:496,ATOM:499,COLLECTION:12,ALL:511},RMe=class extends Error{},AMe=class extends Error{};$1l=(t,e)=>{let I=t.length,l=0,n=u=>{throw new RMe(`${u} at position ${l}`)},a=u=>{throw new AMe(`${u} at position ${l}`)},c=()=>(d(),l>=I&&n("Unexpected end of input"),t[l]==='"'?r():t[l]==="{"?s():t[l]==="["?i():t.substring(l,l+4)==="null"||xo.NULL&e&&I-l<4&&"null".startsWith(t.substring(l))?(l+=4,null):t.substring(l,l+4)==="true"||xo.BOOL&e&&I-l<4&&"true".startsWith(t.substring(l))?(l+=4,!0):t.substring(l,l+5)==="false"||xo.BOOL&e&&I-l<5&&"false".startsWith(t.substring(l))?(l+=5,!1):t.substring(l,l+8)==="Infinity"||xo.INFINITY&e&&I-l<8&&"Infinity".startsWith(t.substring(l))?(l+=8,1/0):t.substring(l,l+9)==="-Infinity"||xo.MINUS_INFINITY&e&&1{let u=l,b=!1;for(l++;l{l++,d();let u={};try{for(;t[l]!=="}";){if(d(),l>=I&&xo.OBJ&e)return u;let b=r();d(),l++;try{let Z=c();Object.defineProperty(u,b,{value:Z,writable:!0,enumerable:!0,configurable:!0})}catch(Z){if(xo.OBJ&e)return u;throw Z}d(),t[l]===","&&l++}}catch{if(xo.OBJ&e)return u;n("Expected '}' at end of object")}return l++,u},i=()=>{l++;let u=[];try{for(;t[l]!=="]";)u.push(c()),d(),t[l]===","&&l++}catch{if(xo.ARR&e)return u;n("Expected ']' at end of array")}return l++,u},G=()=>{if(l===0){t==="-"&&xo.NUM&e&&n("Not sure what '-' is");try{return JSON.parse(t)}catch(b){if(xo.NUM&e)try{return t[t.length-1]==="."?JSON.parse(t.substring(0,t.lastIndexOf("."))):JSON.parse(t.substring(0,t.lastIndexOf("e")))}catch{}a(String(b))}}let u=l;for(t[l]==="-"&&l++;t[l]&&!",]}".includes(t[l]);)l++;l==I&&!(xo.NUM&e)&&n("Unterminated number literal");try{return JSON.parse(t.substring(u,l))}catch{t.substring(u,l)==="-"&&xo.NUM&e&&n("Not sure what '-' is");try{return JSON.parse(t.substring(u,t.lastIndexOf("e")))}catch(Z){a(String(Z))}}},d=()=>{for(;lP1l(t,xo.ALL^xo.NUM)});var XMe=g(()=>{o();nMe()});function eJl(t,e){let{id:I,choices:l,created:n,model:a,system_fingerprint:c,...r}=t,s={...r,id:I,choices:l.map(({message:i,finish_reason:G,index:d,logprobs:u,...b})=>{if(!G)throw new ht(`missing finish_reason for choice ${d}`);let{content:Z=null,function_call:p,tool_calls:W,...h}=i,N=i.role;if(!N)throw new ht(`missing role for choice ${d}`);if(p){let{arguments:V,name:R}=p;if(V==null)throw new ht(`missing function_call.arguments for choice ${d}`);if(!R)throw new ht(`missing function_call.name for choice ${d}`);return{...b,message:{content:Z,function_call:{arguments:V,name:R},role:N,refusal:i.refusal??null},finish_reason:G,index:d,logprobs:u}}return W?{...b,index:d,finish_reason:G,logprobs:u,message:{...h,role:N,content:Z,refusal:i.refusal??null,tool_calls:W.map((V,R)=>{let{function:F,type:v,id:y,...w}=V,{arguments:H,name:f,...L}=F||{};if(y==null)throw new ht(`missing choices[${d}].tool_calls[${R}].id +${ihe(t)}`);if(v==null)throw new ht(`missing choices[${d}].tool_calls[${R}].type +${ihe(t)}`);if(f==null)throw new ht(`missing choices[${d}].tool_calls[${R}].function.name +${ihe(t)}`);if(H==null)throw new ht(`missing choices[${d}].tool_calls[${R}].function.arguments +${ihe(t)}`);return{...w,id:y,type:v,function:{...L,name:f,arguments:H}}})}}:{...b,message:{...h,content:Z,role:N,refusal:i.refusal??null},finish_reason:G,index:d,logprobs:u}}),created:n,model:a,object:"chat.completion",...c?{system_fingerprint:c}:{}};return cKt(s,e)}function ihe(t){return JSON.stringify(t)}var lo,ev,mz,WE,gMe,she,vMe,yMe,wMe,ohe,HMe,mKt,gL,Ghe=g(()=>{o();Qh();bKt();D0();Gz();XMe();VMe();gL=class t extends bz{constructor(e){super(),lo.add(this),ev.set(this,void 0),mz.set(this,void 0),WE.set(this,void 0),cI(this,ev,e,"f"),cI(this,mz,[],"f")}get currentChatCompletionSnapshot(){return me(this,WE,"f")}static fromReadableStream(e){let I=new t(null);return I._run(()=>I._fromReadableStream(e)),I}static createChatCompletion(e,I,l){let n=new t(I);return n._run(()=>n._runChatCompletion(e,{...I,stream:!0},{...l,headers:{...l?.headers,"X-Stainless-Helper-Method":"stream"}})),n}async _createChatCompletion(e,I,l){super._createChatCompletion;let n=l?.signal;n&&(n.aborted&&this.controller.abort(),n.addEventListener("abort",()=>this.controller.abort())),me(this,lo,"m",gMe).call(this);let a=await e.chat.completions.create({...I,stream:!0},{...l,signal:this.controller.signal});this._connected();for await(let c of a)me(this,lo,"m",vMe).call(this,c);if(a.controller.signal?.aborted)throw new xr;return this._addChatCompletion(me(this,lo,"m",ohe).call(this))}async _fromReadableStream(e,I){let l=I?.signal;l&&(l.aborted&&this.controller.abort(),l.addEventListener("abort",()=>this.controller.abort())),me(this,lo,"m",gMe).call(this),this._connected();let n=p2.fromReadableStream(e,this.controller),a;for await(let c of n)a&&a!==c.id&&this._addChatCompletion(me(this,lo,"m",ohe).call(this)),me(this,lo,"m",vMe).call(this,c),a=c.id;if(n.controller.signal?.aborted)throw new xr;return this._addChatCompletion(me(this,lo,"m",ohe).call(this))}[(ev=new WeakMap,mz=new WeakMap,WE=new WeakMap,lo=new WeakSet,gMe=function(){this.ended||cI(this,WE,void 0,"f")},she=function(I){let l=me(this,mz,"f")[I.index];return l||(l={content_done:!1,refusal_done:!1,logprobs_content_done:!1,logprobs_refusal_done:!1,done_tool_calls:new Set,current_tool_call_index:null},me(this,mz,"f")[I.index]=l,l)},vMe=function(I){if(this.ended)return;let l=me(this,lo,"m",mKt).call(this,I);this._emit("chunk",I,l);for(let n of I.choices){let a=l.choices[n.index];n.delta.content!=null&&a.message?.role==="assistant"&&a.message?.content&&(this._emit("content",n.delta.content,a.message.content),this._emit("content.delta",{delta:n.delta.content,snapshot:a.message.content,parsed:a.message.parsed})),n.delta.refusal!=null&&a.message?.role==="assistant"&&a.message?.refusal&&this._emit("refusal.delta",{delta:n.delta.refusal,snapshot:a.message.refusal}),n.logprobs?.content!=null&&a.message?.role==="assistant"&&this._emit("logprobs.content.delta",{content:n.logprobs?.content,snapshot:a.logprobs?.content??[]}),n.logprobs?.refusal!=null&&a.message?.role==="assistant"&&this._emit("logprobs.refusal.delta",{refusal:n.logprobs?.refusal,snapshot:a.logprobs?.refusal??[]});let c=me(this,lo,"m",she).call(this,a);a.finish_reason&&(me(this,lo,"m",wMe).call(this,a),c.current_tool_call_index!=null&&me(this,lo,"m",yMe).call(this,a,c.current_tool_call_index));for(let r of n.delta.tool_calls??[])c.current_tool_call_index!==r.index&&(me(this,lo,"m",wMe).call(this,a),c.current_tool_call_index!=null&&me(this,lo,"m",yMe).call(this,a,c.current_tool_call_index)),c.current_tool_call_index=r.index;for(let r of n.delta.tool_calls??[]){let s=a.message.tool_calls?.[r.index];s?.type&&(s?.type==="function"?this._emit("tool_calls.function.arguments.delta",{name:s.function?.name,index:r.index,arguments:s.function.arguments,parsed_arguments:s.function.parsed_arguments,arguments_delta:r.function?.arguments??""}):(s?.type,void 0))}}},yMe=function(I,l){if(me(this,lo,"m",she).call(this,I).done_tool_calls.has(l))return;let a=I.message.tool_calls?.[l];if(!a)throw new Error("no tool call snapshot");if(!a.type)throw new Error("tool call snapshot missing `type`");if(a.type==="function"){let c=me(this,ev,"f")?.tools?.find(r=>V7(r)&&r.function.name===a.function.name);this._emit("tool_calls.function.arguments.done",{name:a.function.name,index:l,arguments:a.function.arguments,parsed_arguments:XL(c)?c.$parseRaw(a.function.arguments):c?.function.strict?JSON.parse(a.function.arguments):null})}else a.type},wMe=function(I){let l=me(this,lo,"m",she).call(this,I);if(I.message.content&&!l.content_done){l.content_done=!0;let n=me(this,lo,"m",HMe).call(this);this._emit("content.done",{content:I.message.content,parsed:n?n.$parseRaw(I.message.content):null})}I.message.refusal&&!l.refusal_done&&(l.refusal_done=!0,this._emit("refusal.done",{refusal:I.message.refusal})),I.logprobs?.content&&!l.logprobs_content_done&&(l.logprobs_content_done=!0,this._emit("logprobs.content.done",{content:I.logprobs.content})),I.logprobs?.refusal&&!l.logprobs_refusal_done&&(l.logprobs_refusal_done=!0,this._emit("logprobs.refusal.done",{refusal:I.logprobs.refusal}))},ohe=function(){if(this.ended)throw new ht("stream has ended, this shouldn't happen");let I=me(this,WE,"f");if(!I)throw new ht("request ended without sending any chunks");return cI(this,WE,void 0,"f"),cI(this,mz,[],"f"),eJl(I,me(this,ev,"f"))},HMe=function(){let I=me(this,ev,"f")?.response_format;return Y7(I)?I:null},mKt=function(I){var l,n,a,c;let r=me(this,WE,"f"),{choices:s,...i}=I;r?Object.assign(r,i):r=cI(this,WE,{...i,choices:[]},"f");for(let{delta:G,finish_reason:d,index:u,logprobs:b=null,...Z}of I.choices){let p=r.choices[u];if(p||(p=r.choices[u]={finish_reason:d,index:u,message:{},logprobs:b,...Z}),b)if(!p.logprobs)p.logprobs=Object.assign({},b);else{let{content:v,refusal:y,...w}=b;Object.assign(p.logprobs,w),v&&((l=p.logprobs).content??(l.content=[]),p.logprobs.content.push(...v)),y&&((n=p.logprobs).refusal??(n.refusal=[]),p.logprobs.refusal.push(...y))}if(d&&(p.finish_reason=d,me(this,ev,"f")&&dMe(me(this,ev,"f")))){if(d==="length")throw new lz;if(d==="content_filter")throw new nz}if(Object.assign(p,Z),!G)continue;let{content:W,refusal:h,function_call:N,role:V,tool_calls:R,...F}=G;if(Object.assign(p.message,F),h&&(p.message.refusal=(p.message.refusal||"")+h),V&&(p.message.role=V),N&&(p.message.function_call?(N.name&&(p.message.function_call.name=N.name),N.arguments&&((a=p.message.function_call).arguments??(a.arguments=""),p.message.function_call.arguments+=N.arguments)):p.message.function_call=N),W&&(p.message.content=(p.message.content||"")+W,!p.message.refusal&&me(this,lo,"m",HMe).call(this)&&(p.message.parsed=FMe(p.message.content))),R){p.message.tool_calls||(p.message.tool_calls=[]);for(let{index:v,id:y,type:w,function:H,...f}of R){let L=(c=p.message.tool_calls)[v]??(c[v]={});Object.assign(L,f),y&&(L.id=y),w&&(L.type=w),H&&(L.function??(L.function={name:H.name??"",arguments:""})),H?.name&&(L.function.name=H.name),H?.arguments&&(L.function.arguments+=H.arguments,rKt(me(this,ev,"f"),L)&&(L.function.parsed_arguments=FMe(L.function.arguments)))}}}return r},Symbol.asyncIterator)](){let e=[],I=[],l=!1;return this.on("chunk",n=>{let a=I.shift();a?a.resolve(n):e.push(n)}),this.on("end",()=>{l=!0;for(let n of I)n.resolve(void 0);I.length=0}),this.on("abort",n=>{l=!0;for(let a of I)a.reject(n);I.length=0}),this.on("error",n=>{l=!0;for(let a of I)a.reject(n);I.length=0}),{next:async()=>e.length?{value:e.shift(),done:!1}:l?{value:void 0,done:!0}:new Promise((a,c)=>I.push({resolve:a,reject:c})).then(a=>a?{value:a,done:!1}:{value:void 0,done:!0}),return:async()=>(this.abort(),{value:void 0,done:!0})}}toReadableStream(){return new p2(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}}});var y7,QMe=g(()=>{o();Ghe();y7=class t extends gL{static fromReadableStream(e){let I=new t(null);return I._run(()=>I._fromReadableStream(e)),I}static runTools(e,I,l){let n=new t(I),a={...l,headers:{...l?.headers,"X-Stainless-Helper-Method":"runTools"}};return n._run(()=>n._runTools(e,I,a)),n}}});var tv,w7=g(()=>{o();Tt();ehe();ehe();Bn();Cl();YMe();QMe();Ghe();Gz();QMe();ZMe();Ghe();YMe();tv=class extends fe{constructor(){super(...arguments),this.messages=new FL(this._client)}create(e,I){return this._client.post("/chat/completions",{body:e,...I,stream:e.stream??!1})}retrieve(e,I){return this._client.get(Ye`/chat/completions/${e}`,I)}update(e,I,l){return this._client.post(Ye`/chat/completions/${e}`,{body:I,...l})}list(e={},I){return this._client.getAPIList("/chat/completions",MI,{query:e,...I})}delete(e,I){return this._client.delete(Ye`/chat/completions/${e}`,I)}parse(e,I){return oKt(e.tools),this._client.chat.completions.create(e,{...I,headers:{...I?.headers,"X-Stainless-Helper-Method":"chat.completions.parse"}})._thenUnwrap(l=>R7(l,e))}runTools(e,I){return e.stream?y7.runTools(this._client,e,I):v7.runTools(this._client,e,I)}stream(e,I){return gL.createChatCompletion(this._client,e,I)}};tv.Messages=FL});var NE,fMe=g(()=>{o();Tt();w7();w7();NE=class extends fe{constructor(){super(...arguments),this.completions=new tv(this._client)}};NE.Completions=tv});var ZKt=g(()=>{o();w7();w7();ehe()});var pKt=g(()=>{o();fMe();ZKt()});var hKt=g(()=>{o()});function*IJl(t){if(!t)return;if(WKt in t){let{values:l,nulls:n}=t;yield*l.entries();for(let a of n)yield[a,null];return}let e=!1,I;t instanceof Headers?I=t.entries():xBe(t)?I=t:(e=!0,I=Object.entries(t??{}));for(let l of I){let n=l[0];if(typeof n!="string")throw new TypeError("expected header name to be a string");let a=xBe(l[1])?l[1]:[l[1]],c=!1;for(let r of a)r!==void 0&&(e&&!c&&(c=!0,yield[n,null]),yield[n,r])}}var WKt,tt,fa=g(()=>{o();qg();WKt=Symbol("brand.privateNullableHeaders");tt=t=>{let e=new Headers,I=new Set;for(let l of t){let n=new Set;for(let[a,c]of IJl(l)){let r=a.toLowerCase();n.has(r)||(e.delete(a),n.add(r)),c===null?(e.delete(a),I.add(r)):(e.append(a,c),I.delete(r))}}return{[WKt]:!0,values:e,nulls:I}}});var Zz,EMe=g(()=>{o();Tt();fa();Zz=class extends fe{create(e,I){return this._client.post("/audio/speech",{body:e,...I,headers:tt([{Accept:"application/octet-stream"},I?.headers]),__binaryResponse:!0})}}});var pz,JMe=g(()=>{o();Tt();Eh();pz=class extends fe{create(e,I){return this._client.post("/audio/transcriptions",fG({body:e,...I,stream:e.stream??!1,__metadata:{model:e.model}},this._client))}}});var hz,CMe=g(()=>{o();Tt();Eh();hz=class extends fe{create(e,I){return this._client.post("/audio/translations",fG({body:e,...I,__metadata:{model:e.model}},this._client))}}});var W2,LMe=g(()=>{o();Tt();EMe();EMe();JMe();JMe();CMe();CMe();W2=class extends fe{constructor(){super(...arguments),this.transcriptions=new pz(this._client),this.translations=new hz(this._client),this.speech=new Zz(this._client)}};W2.Transcriptions=pz;W2.Translations=hz;W2.Speech=Zz});var vL,kMe=g(()=>{o();Tt();Bn();Cl();vL=class extends fe{create(e,I){return this._client.post("/batches",{body:e,...I})}retrieve(e,I){return this._client.get(Ye`/batches/${e}`,I)}list(e={},I){return this._client.getAPIList("/batches",MI,{query:e,...I})}cancel(e,I){return this._client.post(Ye`/batches/${e}/cancel`,I)}}});var Wz,xMe=g(()=>{o();Tt();Bn();fa();Cl();Wz=class extends fe{create(e,I){return this._client.post("/assistants",{body:e,...I,headers:tt([{"OpenAI-Beta":"assistants=v2"},I?.headers])})}retrieve(e,I){return this._client.get(Ye`/assistants/${e}`,{...I,headers:tt([{"OpenAI-Beta":"assistants=v2"},I?.headers])})}update(e,I,l){return this._client.post(Ye`/assistants/${e}`,{body:I,...l,headers:tt([{"OpenAI-Beta":"assistants=v2"},l?.headers])})}list(e={},I){return this._client.getAPIList("/assistants",MI,{query:e,...I,headers:tt([{"OpenAI-Beta":"assistants=v2"},I?.headers])})}delete(e,I){return this._client.delete(Ye`/assistants/${e}`,{...I,headers:tt([{"OpenAI-Beta":"assistants=v2"},I?.headers])})}}});var Nz,jMe=g(()=>{o();Tt();fa();Nz=class extends fe{create(e,I){return this._client.post("/realtime/sessions",{body:e,...I,headers:tt([{"OpenAI-Beta":"assistants=v2"},I?.headers])})}}});var Vz,UMe=g(()=>{o();Tt();fa();Vz=class extends fe{create(e,I){return this._client.post("/realtime/transcription_sessions",{body:e,...I,headers:tt([{"OpenAI-Beta":"assistants=v2"},I?.headers])})}}});var VE,OMe=g(()=>{o();Tt();jMe();jMe();UMe();UMe();VE=class extends fe{constructor(){super(...arguments),this.sessions=new Nz(this._client),this.transcriptionSessions=new Vz(this._client)}};VE.Sessions=Nz;VE.TranscriptionSessions=Vz});var Yz,zMe=g(()=>{o();Tt();fa();Cl();Yz=class extends fe{create(e,I){return this._client.post("/chatkit/sessions",{body:e,...I,headers:tt([{"OpenAI-Beta":"chatkit_beta=v1"},I?.headers])})}cancel(e,I){return this._client.post(Ye`/chatkit/sessions/${e}/cancel`,{...I,headers:tt([{"OpenAI-Beta":"chatkit_beta=v1"},I?.headers])})}}});var Rz,BMe=g(()=>{o();Tt();Bn();fa();Cl();Rz=class extends fe{retrieve(e,I){return this._client.get(Ye`/chatkit/threads/${e}`,{...I,headers:tt([{"OpenAI-Beta":"chatkit_beta=v1"},I?.headers])})}list(e={},I){return this._client.getAPIList("/chatkit/threads",K0,{query:e,...I,headers:tt([{"OpenAI-Beta":"chatkit_beta=v1"},I?.headers])})}delete(e,I){return this._client.delete(Ye`/chatkit/threads/${e}`,{...I,headers:tt([{"OpenAI-Beta":"chatkit_beta=v1"},I?.headers])})}listItems(e,I={},l){return this._client.getAPIList(Ye`/chatkit/threads/${e}/items`,K0,{query:I,...l,headers:tt([{"OpenAI-Beta":"chatkit_beta=v1"},l?.headers])})}}});var YE,MMe=g(()=>{o();Tt();zMe();zMe();BMe();BMe();YE=class extends fe{constructor(){super(...arguments),this.sessions=new Yz(this._client),this.threads=new Rz(this._client)}};YE.Sessions=Yz;YE.Threads=Rz});var Az,SMe=g(()=>{o();Tt();Bn();fa();Cl();Az=class extends fe{create(e,I,l){return this._client.post(Ye`/threads/${e}/messages`,{body:I,...l,headers:tt([{"OpenAI-Beta":"assistants=v2"},l?.headers])})}retrieve(e,I,l){let{thread_id:n}=I;return this._client.get(Ye`/threads/${n}/messages/${e}`,{...l,headers:tt([{"OpenAI-Beta":"assistants=v2"},l?.headers])})}update(e,I,l){let{thread_id:n,...a}=I;return this._client.post(Ye`/threads/${n}/messages/${e}`,{body:a,...l,headers:tt([{"OpenAI-Beta":"assistants=v2"},l?.headers])})}list(e,I={},l){return this._client.getAPIList(Ye`/threads/${e}/messages`,MI,{query:I,...l,headers:tt([{"OpenAI-Beta":"assistants=v2"},l?.headers])})}delete(e,I,l){let{thread_id:n}=I;return this._client.delete(Ye`/threads/${n}/messages/${e}`,{...l,headers:tt([{"OpenAI-Beta":"assistants=v2"},l?.headers])})}}});var Fz,TMe=g(()=>{o();Tt();Bn();fa();Cl();Fz=class extends fe{retrieve(e,I,l){let{thread_id:n,run_id:a,...c}=I;return this._client.get(Ye`/threads/${n}/runs/${a}/steps/${e}`,{query:c,...l,headers:tt([{"OpenAI-Beta":"assistants=v2"},l?.headers])})}list(e,I,l){let{thread_id:n,...a}=I;return this._client.getAPIList(Ye`/threads/${n}/runs/${e}/steps`,MI,{query:a,...l,headers:tt([{"OpenAI-Beta":"assistants=v2"},l?.headers])})}}});var NKt,VKt=g(()=>{o();fh();Spe();NKt=t=>{if(typeof m.Buffer<"u"){let e=m.Buffer.from(t,"base64");return Array.from(new Float32Array(e.buffer,e.byteOffset,e.length/Float32Array.BYTES_PER_ELEMENT))}else{let e=atob(t),I=e.length,l=new Uint8Array(I);for(let n=0;n{o();q0=t=>{if(typeof globalThis.process<"u")return globalThis.process.env?.[t]?.trim()??void 0;if(typeof globalThis.Deno<"u")return globalThis.Deno.env?.get?.(t)?.trim()}});var H7=g(()=>{o();qg();VKt();_Me();m7();kBe();cz();eMe()});var xi,wL,KMe,N2,dhe,P0,HL,Xz,yL,mhe,LZ,uhe,bhe,E7,Q7,f7,YKt,RKt,AKt,FKt,XKt,gKt,vKt,Iv,DMe=g(()=>{o();Qh();XMe();D0();che();H7();Iv=class extends hE{constructor(){super(...arguments),xi.add(this),KMe.set(this,[]),N2.set(this,{}),dhe.set(this,{}),P0.set(this,void 0),HL.set(this,void 0),Xz.set(this,void 0),yL.set(this,void 0),mhe.set(this,void 0),LZ.set(this,void 0),uhe.set(this,void 0),bhe.set(this,void 0),E7.set(this,void 0)}[(KMe=new WeakMap,N2=new WeakMap,dhe=new WeakMap,P0=new WeakMap,HL=new WeakMap,Xz=new WeakMap,yL=new WeakMap,mhe=new WeakMap,LZ=new WeakMap,uhe=new WeakMap,bhe=new WeakMap,E7=new WeakMap,xi=new WeakSet,Symbol.asyncIterator)](){let e=[],I=[],l=!1;return this.on("event",n=>{let a=I.shift();a?a.resolve(n):e.push(n)}),this.on("end",()=>{l=!0;for(let n of I)n.resolve(void 0);I.length=0}),this.on("abort",n=>{l=!0;for(let a of I)a.reject(n);I.length=0}),this.on("error",n=>{l=!0;for(let a of I)a.reject(n);I.length=0}),{next:async()=>e.length?{value:e.shift(),done:!1}:l?{value:void 0,done:!0}:new Promise((a,c)=>I.push({resolve:a,reject:c})).then(a=>a?{value:a,done:!1}:{value:void 0,done:!0}),return:async()=>(this.abort(),{value:void 0,done:!0})}}static fromReadableStream(e){let I=new wL;return I._run(()=>I._fromReadableStream(e)),I}async _fromReadableStream(e,I){let l=I?.signal;l&&(l.aborted&&this.controller.abort(),l.addEventListener("abort",()=>this.controller.abort())),this._connected();let n=p2.fromReadableStream(e,this.controller);for await(let a of n)me(this,xi,"m",Q7).call(this,a);if(n.controller.signal?.aborted)throw new xr;return this._addRun(me(this,xi,"m",f7).call(this))}toReadableStream(){return new p2(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}static createToolAssistantStream(e,I,l,n){let a=new wL;return a._run(()=>a._runToolAssistantStream(e,I,l,{...n,headers:{...n?.headers,"X-Stainless-Helper-Method":"stream"}})),a}async _createToolAssistantStream(e,I,l,n){let a=n?.signal;a&&(a.aborted&&this.controller.abort(),a.addEventListener("abort",()=>this.controller.abort()));let c={...l,stream:!0},r=await e.submitToolOutputs(I,c,{...n,signal:this.controller.signal});this._connected();for await(let s of r)me(this,xi,"m",Q7).call(this,s);if(r.controller.signal?.aborted)throw new xr;return this._addRun(me(this,xi,"m",f7).call(this))}static createThreadAssistantStream(e,I,l){let n=new wL;return n._run(()=>n._threadAssistantStream(e,I,{...l,headers:{...l?.headers,"X-Stainless-Helper-Method":"stream"}})),n}static createAssistantStream(e,I,l,n){let a=new wL;return a._run(()=>a._runAssistantStream(e,I,l,{...n,headers:{...n?.headers,"X-Stainless-Helper-Method":"stream"}})),a}currentEvent(){return me(this,uhe,"f")}currentRun(){return me(this,bhe,"f")}currentMessageSnapshot(){return me(this,P0,"f")}currentRunStepSnapshot(){return me(this,E7,"f")}async finalRunSteps(){return await this.done(),Object.values(me(this,N2,"f"))}async finalMessages(){return await this.done(),Object.values(me(this,dhe,"f"))}async finalRun(){if(await this.done(),!me(this,HL,"f"))throw Error("Final run was not received.");return me(this,HL,"f")}async _createThreadAssistantStream(e,I,l){let n=l?.signal;n&&(n.aborted&&this.controller.abort(),n.addEventListener("abort",()=>this.controller.abort()));let a={...I,stream:!0},c=await e.createAndRun(a,{...l,signal:this.controller.signal});this._connected();for await(let r of c)me(this,xi,"m",Q7).call(this,r);if(c.controller.signal?.aborted)throw new xr;return this._addRun(me(this,xi,"m",f7).call(this))}async _createAssistantStream(e,I,l,n){let a=n?.signal;a&&(a.aborted&&this.controller.abort(),a.addEventListener("abort",()=>this.controller.abort()));let c={...l,stream:!0},r=await e.create(I,c,{...n,signal:this.controller.signal});this._connected();for await(let s of r)me(this,xi,"m",Q7).call(this,s);if(r.controller.signal?.aborted)throw new xr;return this._addRun(me(this,xi,"m",f7).call(this))}static accumulateDelta(e,I){for(let[l,n]of Object.entries(I)){if(!e.hasOwnProperty(l)){e[l]=n;continue}let a=e[l];if(a==null){e[l]=n;continue}if(l==="index"||l==="type"){e[l]=n;continue}if(typeof a=="string"&&typeof n=="string")a+=n;else if(typeof a=="number"&&typeof n=="number")a+=n;else if(az(a)&&az(n))a=this.accumulateDelta(a,n);else if(Array.isArray(a)&&Array.isArray(n)){if(a.every(c=>typeof c=="string"||typeof c=="number")){a.push(...n);continue}for(let c of n){if(!az(c))throw new Error(`Expected array delta entry to be an object but got: ${c}`);let r=c.index;if(r==null)throw console.error(c),new Error("Expected array delta entry to have an `index` property");if(typeof r!="number")throw new Error(`Expected array delta entry \`index\` property to be a number but got ${r}`);let s=a[r];s==null?a.push(c):a[r]=this.accumulateDelta(s,c)}continue}else throw Error(`Unhandled record type: ${l}, deltaValue: ${n}, accValue: ${a}`);e[l]=a}return e}_addRun(e){return e}async _threadAssistantStream(e,I,l){return await this._createThreadAssistantStream(I,e,l)}async _runAssistantStream(e,I,l,n){return await this._createAssistantStream(I,e,l,n)}async _runToolAssistantStream(e,I,l,n){return await this._createToolAssistantStream(I,e,l,n)}};wL=Iv,Q7=function(e){if(!this.ended)switch(cI(this,uhe,e,"f"),me(this,xi,"m",AKt).call(this,e),e.event){case"thread.created":break;case"thread.run.created":case"thread.run.queued":case"thread.run.in_progress":case"thread.run.requires_action":case"thread.run.completed":case"thread.run.incomplete":case"thread.run.failed":case"thread.run.cancelling":case"thread.run.cancelled":case"thread.run.expired":me(this,xi,"m",vKt).call(this,e);break;case"thread.run.step.created":case"thread.run.step.in_progress":case"thread.run.step.delta":case"thread.run.step.completed":case"thread.run.step.failed":case"thread.run.step.cancelled":case"thread.run.step.expired":me(this,xi,"m",RKt).call(this,e);break;case"thread.message.created":case"thread.message.in_progress":case"thread.message.delta":case"thread.message.completed":case"thread.message.incomplete":me(this,xi,"m",YKt).call(this,e);break;case"error":throw new Error("Encountered an error event in event processing - errors should be processed earlier");default:}},f7=function(){if(this.ended)throw new ht("stream has ended, this shouldn't happen");if(!me(this,HL,"f"))throw Error("Final run has not been received");return me(this,HL,"f")},YKt=function(e){let[I,l]=me(this,xi,"m",XKt).call(this,e,me(this,P0,"f"));cI(this,P0,I,"f"),me(this,dhe,"f")[I.id]=I;for(let n of l){let a=I.content[n.index];a?.type=="text"&&this._emit("textCreated",a.text)}switch(e.event){case"thread.message.created":this._emit("messageCreated",e.data);break;case"thread.message.in_progress":break;case"thread.message.delta":if(this._emit("messageDelta",e.data.delta,I),e.data.delta.content)for(let n of e.data.delta.content){if(n.type=="text"&&n.text){let a=n.text,c=I.content[n.index];if(c&&c.type=="text")this._emit("textDelta",a,c.text);else throw Error("The snapshot associated with this text delta is not text or missing")}if(n.index!=me(this,Xz,"f")){if(me(this,yL,"f"))switch(me(this,yL,"f").type){case"text":this._emit("textDone",me(this,yL,"f").text,me(this,P0,"f"));break;case"image_file":this._emit("imageFileDone",me(this,yL,"f").image_file,me(this,P0,"f"));break}cI(this,Xz,n.index,"f")}cI(this,yL,I.content[n.index],"f")}break;case"thread.message.completed":case"thread.message.incomplete":if(me(this,Xz,"f")!==void 0){let n=e.data.content[me(this,Xz,"f")];if(n)switch(n.type){case"image_file":this._emit("imageFileDone",n.image_file,me(this,P0,"f"));break;case"text":this._emit("textDone",n.text,me(this,P0,"f"));break}}me(this,P0,"f")&&this._emit("messageDone",e.data),cI(this,P0,void 0,"f")}},RKt=function(e){let I=me(this,xi,"m",FKt).call(this,e);switch(cI(this,E7,I,"f"),e.event){case"thread.run.step.created":this._emit("runStepCreated",e.data);break;case"thread.run.step.delta":let l=e.data.delta;if(l.step_details&&l.step_details.type=="tool_calls"&&l.step_details.tool_calls&&I.step_details.type=="tool_calls")for(let a of l.step_details.tool_calls)a.index==me(this,mhe,"f")?this._emit("toolCallDelta",a,I.step_details.tool_calls[a.index]):(me(this,LZ,"f")&&this._emit("toolCallDone",me(this,LZ,"f")),cI(this,mhe,a.index,"f"),cI(this,LZ,I.step_details.tool_calls[a.index],"f"),me(this,LZ,"f")&&this._emit("toolCallCreated",me(this,LZ,"f")));this._emit("runStepDelta",e.data.delta,I);break;case"thread.run.step.completed":case"thread.run.step.failed":case"thread.run.step.cancelled":case"thread.run.step.expired":cI(this,E7,void 0,"f"),e.data.step_details.type=="tool_calls"&&me(this,LZ,"f")&&(this._emit("toolCallDone",me(this,LZ,"f")),cI(this,LZ,void 0,"f")),this._emit("runStepDone",e.data,I);break;case"thread.run.step.in_progress":break}},AKt=function(e){me(this,KMe,"f").push(e),this._emit("event",e)},FKt=function(e){switch(e.event){case"thread.run.step.created":return me(this,N2,"f")[e.data.id]=e.data,e.data;case"thread.run.step.delta":let I=me(this,N2,"f")[e.data.id];if(!I)throw Error("Received a RunStepDelta before creation of a snapshot");let l=e.data;if(l.delta){let n=wL.accumulateDelta(I,l.delta);me(this,N2,"f")[e.data.id]=n}return me(this,N2,"f")[e.data.id];case"thread.run.step.completed":case"thread.run.step.failed":case"thread.run.step.cancelled":case"thread.run.step.expired":case"thread.run.step.in_progress":me(this,N2,"f")[e.data.id]=e.data;break}if(me(this,N2,"f")[e.data.id])return me(this,N2,"f")[e.data.id];throw new Error("No snapshot available")},XKt=function(e,I){let l=[];switch(e.event){case"thread.message.created":return[e.data,l];case"thread.message.delta":if(!I)throw Error("Received a delta with no existing snapshot (there should be one from message creation)");let n=e.data;if(n.delta.content)for(let a of n.delta.content)if(a.index in I.content){let c=I.content[a.index];I.content[a.index]=me(this,xi,"m",gKt).call(this,a,c)}else I.content[a.index]=a,l.push(a);return[I,l];case"thread.message.in_progress":case"thread.message.completed":case"thread.message.incomplete":if(I)return[I,l];throw Error("Received thread message event with no existing snapshot")}throw Error("Tried to accumulate a non-message event")},gKt=function(e,I){return wL.accumulateDelta(I,e)},vKt=function(e){switch(cI(this,bhe,e.data,"f"),e.event){case"thread.run.created":break;case"thread.run.queued":break;case"thread.run.in_progress":break;case"thread.run.requires_action":case"thread.run.cancelled":case"thread.run.failed":case"thread.run.completed":case"thread.run.expired":case"thread.run.incomplete":cI(this,HL,e.data,"f"),me(this,LZ,"f")&&(this._emit("toolCallDone",me(this,LZ,"f")),cI(this,LZ,void 0,"f"));break;case"thread.run.cancelling":break}}});var QL,qMe=g(()=>{o();Tt();TMe();TMe();Bn();fa();DMe();cz();Cl();QL=class extends fe{constructor(){super(...arguments),this.steps=new Fz(this._client)}create(e,I,l){let{include:n,...a}=I;return this._client.post(Ye`/threads/${e}/runs`,{query:{include:n},body:a,...l,headers:tt([{"OpenAI-Beta":"assistants=v2"},l?.headers]),stream:I.stream??!1,__synthesizeEventData:!0})}retrieve(e,I,l){let{thread_id:n}=I;return this._client.get(Ye`/threads/${n}/runs/${e}`,{...l,headers:tt([{"OpenAI-Beta":"assistants=v2"},l?.headers])})}update(e,I,l){let{thread_id:n,...a}=I;return this._client.post(Ye`/threads/${n}/runs/${e}`,{body:a,...l,headers:tt([{"OpenAI-Beta":"assistants=v2"},l?.headers])})}list(e,I={},l){return this._client.getAPIList(Ye`/threads/${e}/runs`,MI,{query:I,...l,headers:tt([{"OpenAI-Beta":"assistants=v2"},l?.headers])})}cancel(e,I,l){let{thread_id:n}=I;return this._client.post(Ye`/threads/${n}/runs/${e}/cancel`,{...l,headers:tt([{"OpenAI-Beta":"assistants=v2"},l?.headers])})}async createAndPoll(e,I,l){let n=await this.create(e,I,l);return await this.poll(n.id,{thread_id:e},l)}createAndStream(e,I,l){return Iv.createAssistantStream(e,this._client.beta.threads.runs,I,l)}async poll(e,I,l){let n=tt([l?.headers,{"X-Stainless-Poll-Helper":"true","X-Stainless-Custom-Poll-Interval":l?.pollIntervalMs?.toString()??void 0}]);for(;;){let{data:a,response:c}=await this.retrieve(e,I,{...l,headers:{...l?.headers,...n}}).withResponse();switch(a.status){case"queued":case"in_progress":case"cancelling":let r=5e3;if(l?.pollIntervalMs)r=l.pollIntervalMs;else{let s=c.headers.get("openai-poll-after-ms");if(s){let i=parseInt(s);isNaN(i)||(r=i)}}await m2(r);break;case"requires_action":case"incomplete":case"cancelled":case"completed":case"failed":case"expired":return a}}}stream(e,I,l){return Iv.createAssistantStream(e,this._client.beta.threads.runs,I,l)}submitToolOutputs(e,I,l){let{thread_id:n,...a}=I;return this._client.post(Ye`/threads/${n}/runs/${e}/submit_tool_outputs`,{body:a,...l,headers:tt([{"OpenAI-Beta":"assistants=v2"},l?.headers]),stream:I.stream??!1,__synthesizeEventData:!0})}async submitToolOutputsAndPoll(e,I,l){let n=await this.submitToolOutputs(e,I,l);return await this.poll(n.id,I,l)}submitToolOutputsStream(e,I,l){return Iv.createToolAssistantStream(e,this._client.beta.threads.runs,I,l)}};QL.Steps=Fz});var RE,PMe=g(()=>{o();Tt();SMe();SMe();qMe();qMe();fa();DMe();Cl();RE=class extends fe{constructor(){super(...arguments),this.runs=new QL(this._client),this.messages=new Az(this._client)}create(e={},I){return this._client.post("/threads",{body:e,...I,headers:tt([{"OpenAI-Beta":"assistants=v2"},I?.headers])})}retrieve(e,I){return this._client.get(Ye`/threads/${e}`,{...I,headers:tt([{"OpenAI-Beta":"assistants=v2"},I?.headers])})}update(e,I,l){return this._client.post(Ye`/threads/${e}`,{body:I,...l,headers:tt([{"OpenAI-Beta":"assistants=v2"},l?.headers])})}delete(e,I){return this._client.delete(Ye`/threads/${e}`,{...I,headers:tt([{"OpenAI-Beta":"assistants=v2"},I?.headers])})}createAndRun(e,I){return this._client.post("/threads/runs",{body:e,...I,headers:tt([{"OpenAI-Beta":"assistants=v2"},I?.headers]),stream:e.stream??!1,__synthesizeEventData:!0})}async createAndRunPoll(e,I){let l=await this.createAndRun(e,I);return await this.runs.poll(l.id,{thread_id:l.thread_id},I)}createAndRunStream(e,I){return Iv.createThreadAssistantStream(e,this._client.beta.threads,I)}};RE.Runs=QL;RE.Messages=Az});var $0,$Me=g(()=>{o();Tt();xMe();xMe();OMe();OMe();MMe();MMe();PMe();PMe();$0=class extends fe{constructor(){super(...arguments),this.realtime=new VE(this._client),this.chatkit=new YE(this._client),this.assistants=new Wz(this._client),this.threads=new RE(this._client)}};$0.Realtime=VE;$0.ChatKit=YE;$0.Assistants=Wz;$0.Threads=RE});var fL,eSe=g(()=>{o();Tt();fL=class extends fe{create(e,I){return this._client.post("/completions",{body:e,...I,stream:e.stream??!1})}}});var gz,tSe=g(()=>{o();Tt();fa();Cl();gz=class extends fe{retrieve(e,I,l){let{container_id:n}=I;return this._client.get(Ye`/containers/${n}/files/${e}/content`,{...l,headers:tt([{Accept:"application/binary"},l?.headers]),__binaryResponse:!0})}}});var EL,ISe=g(()=>{o();Tt();tSe();tSe();Bn();fa();Eh();Cl();EL=class extends fe{constructor(){super(...arguments),this.content=new gz(this._client)}create(e,I,l){return this._client.post(Ye`/containers/${e}/files`,pE({body:I,...l},this._client))}retrieve(e,I,l){let{container_id:n}=I;return this._client.get(Ye`/containers/${n}/files/${e}`,l)}list(e,I={},l){return this._client.getAPIList(Ye`/containers/${e}/files`,MI,{query:I,...l})}delete(e,I,l){let{container_id:n}=I;return this._client.delete(Ye`/containers/${n}/files/${e}`,{...l,headers:tt([{Accept:"*/*"},l?.headers])})}};EL.Content=gz});var AE,lSe=g(()=>{o();Tt();ISe();ISe();Bn();fa();Cl();AE=class extends fe{constructor(){super(...arguments),this.files=new EL(this._client)}create(e,I){return this._client.post("/containers",{body:e,...I})}retrieve(e,I){return this._client.get(Ye`/containers/${e}`,I)}list(e={},I){return this._client.getAPIList("/containers",MI,{query:e,...I})}delete(e,I){return this._client.delete(Ye`/containers/${e}`,{...I,headers:tt([{Accept:"*/*"},I?.headers])})}};AE.Files=EL});var vz,nSe=g(()=>{o();Tt();Bn();Cl();vz=class extends fe{create(e,I,l){let{include:n,...a}=I;return this._client.post(Ye`/conversations/${e}/items`,{query:{include:n},body:a,...l})}retrieve(e,I,l){let{conversation_id:n,...a}=I;return this._client.get(Ye`/conversations/${n}/items/${e}`,{query:a,...l})}list(e,I={},l){return this._client.getAPIList(Ye`/conversations/${e}/items`,K0,{query:I,...l})}delete(e,I,l){let{conversation_id:n}=I;return this._client.delete(Ye`/conversations/${n}/items/${e}`,l)}}});var FE,aSe=g(()=>{o();Tt();nSe();nSe();Cl();FE=class extends fe{constructor(){super(...arguments),this.items=new vz(this._client)}create(e={},I){return this._client.post("/conversations",{body:e,...I})}retrieve(e,I){return this._client.get(Ye`/conversations/${e}`,I)}update(e,I,l){return this._client.post(Ye`/conversations/${e}`,{body:I,...l})}delete(e,I){return this._client.delete(Ye`/conversations/${e}`,I)}};FE.Items=vz});var JL,cSe=g(()=>{o();Tt();H7();JL=class extends fe{create(e,I){let l=!!e.encoding_format,n=l?e.encoding_format:"base64";l&&ss(this._client).debug("embeddings/user defined encoding_format:",e.encoding_format);let a=this._client.post("/embeddings",{body:{...e,encoding_format:n},...I});return l?a:(ss(this._client).debug("embeddings/decoding base64 embeddings from base64"),a._thenUnwrap(c=>(c&&c.data&&c.data.forEach(r=>{let s=r.embedding;r.embedding=NKt(s)}),c)))}}});var yz,rSe=g(()=>{o();Tt();Bn();Cl();yz=class extends fe{retrieve(e,I,l){let{eval_id:n,run_id:a}=I;return this._client.get(Ye`/evals/${n}/runs/${a}/output_items/${e}`,l)}list(e,I,l){let{eval_id:n,...a}=I;return this._client.getAPIList(Ye`/evals/${n}/runs/${e}/output_items`,MI,{query:a,...l})}}});var CL,sSe=g(()=>{o();Tt();rSe();rSe();Bn();Cl();CL=class extends fe{constructor(){super(...arguments),this.outputItems=new yz(this._client)}create(e,I,l){return this._client.post(Ye`/evals/${e}/runs`,{body:I,...l})}retrieve(e,I,l){let{eval_id:n}=I;return this._client.get(Ye`/evals/${n}/runs/${e}`,l)}list(e,I={},l){return this._client.getAPIList(Ye`/evals/${e}/runs`,MI,{query:I,...l})}delete(e,I,l){let{eval_id:n}=I;return this._client.delete(Ye`/evals/${n}/runs/${e}`,l)}cancel(e,I,l){let{eval_id:n}=I;return this._client.post(Ye`/evals/${n}/runs/${e}`,l)}};CL.OutputItems=yz});var XE,oSe=g(()=>{o();Tt();sSe();sSe();Bn();Cl();XE=class extends fe{constructor(){super(...arguments),this.runs=new CL(this._client)}create(e,I){return this._client.post("/evals",{body:e,...I})}retrieve(e,I){return this._client.get(Ye`/evals/${e}`,I)}update(e,I,l){return this._client.post(Ye`/evals/${e}`,{body:I,...l})}list(e={},I){return this._client.getAPIList("/evals",MI,{query:e,...I})}delete(e,I){return this._client.delete(Ye`/evals/${e}`,I)}};XE.Runs=CL});var LL,iSe=g(()=>{o();Tt();Bn();fa();cz();D0();Eh();Cl();LL=class extends fe{create(e,I){return this._client.post("/files",fG({body:e,...I},this._client))}retrieve(e,I){return this._client.get(Ye`/files/${e}`,I)}list(e={},I){return this._client.getAPIList("/files",MI,{query:e,...I})}delete(e,I){return this._client.delete(Ye`/files/${e}`,I)}content(e,I){return this._client.get(Ye`/files/${e}/content`,{...I,headers:tt([{Accept:"application/binary"},I?.headers]),__binaryResponse:!0})}async waitForProcessing(e,{pollInterval:I=5e3,maxWait:l=30*60*1e3}={}){let n=new Set(["processed","error","deleted"]),a=Date.now(),c=await this.retrieve(e);for(;!c.status||!n.has(c.status);)if(await m2(I),c=await this.retrieve(e),Date.now()-a>l)throw new u2({message:`Giving up on waiting for file ${e} to finish processing after ${l} milliseconds.`});return c}}});var wz,GSe=g(()=>{o();Tt();wz=class extends fe{}});var Hz,dSe=g(()=>{o();Tt();Hz=class extends fe{run(e,I){return this._client.post("/fine_tuning/alpha/graders/run",{body:e,...I})}validate(e,I){return this._client.post("/fine_tuning/alpha/graders/validate",{body:e,...I})}}});var kL,uSe=g(()=>{o();Tt();dSe();dSe();kL=class extends fe{constructor(){super(...arguments),this.graders=new Hz(this._client)}};kL.Graders=Hz});var Qz,bSe=g(()=>{o();Tt();Bn();Cl();Qz=class extends fe{create(e,I,l){return this._client.getAPIList(Ye`/fine_tuning/checkpoints/${e}/permissions`,h2,{body:I,method:"post",...l})}retrieve(e,I={},l){return this._client.get(Ye`/fine_tuning/checkpoints/${e}/permissions`,{query:I,...l})}list(e,I={},l){return this._client.getAPIList(Ye`/fine_tuning/checkpoints/${e}/permissions`,K0,{query:I,...l})}delete(e,I,l){let{fine_tuned_model_checkpoint:n}=I;return this._client.delete(Ye`/fine_tuning/checkpoints/${n}/permissions/${e}`,l)}}});var xL,mSe=g(()=>{o();Tt();bSe();bSe();xL=class extends fe{constructor(){super(...arguments),this.permissions=new Qz(this._client)}};xL.Permissions=Qz});var fz,ZSe=g(()=>{o();Tt();Bn();Cl();fz=class extends fe{list(e,I={},l){return this._client.getAPIList(Ye`/fine_tuning/jobs/${e}/checkpoints`,MI,{query:I,...l})}}});var jL,pSe=g(()=>{o();Tt();ZSe();ZSe();Bn();Cl();jL=class extends fe{constructor(){super(...arguments),this.checkpoints=new fz(this._client)}create(e,I){return this._client.post("/fine_tuning/jobs",{body:e,...I})}retrieve(e,I){return this._client.get(Ye`/fine_tuning/jobs/${e}`,I)}list(e={},I){return this._client.getAPIList("/fine_tuning/jobs",MI,{query:e,...I})}cancel(e,I){return this._client.post(Ye`/fine_tuning/jobs/${e}/cancel`,I)}listEvents(e,I={},l){return this._client.getAPIList(Ye`/fine_tuning/jobs/${e}/events`,MI,{query:I,...l})}pause(e,I){return this._client.post(Ye`/fine_tuning/jobs/${e}/pause`,I)}resume(e,I){return this._client.post(Ye`/fine_tuning/jobs/${e}/resume`,I)}};jL.Checkpoints=fz});var eA,hSe=g(()=>{o();Tt();GSe();GSe();uSe();uSe();mSe();mSe();pSe();pSe();eA=class extends fe{constructor(){super(...arguments),this.methods=new wz(this._client),this.jobs=new jL(this._client),this.checkpoints=new xL(this._client),this.alpha=new kL(this._client)}};eA.Methods=wz;eA.Jobs=jL;eA.Checkpoints=xL;eA.Alpha=kL});var Ez,WSe=g(()=>{o();Tt();Ez=class extends fe{}});var gE,NSe=g(()=>{o();Tt();WSe();WSe();gE=class extends fe{constructor(){super(...arguments),this.graderModels=new Ez(this._client)}};gE.GraderModels=Ez});var UL,VSe=g(()=>{o();Tt();Eh();UL=class extends fe{createVariation(e,I){return this._client.post("/images/variations",fG({body:e,...I},this._client))}edit(e,I){return this._client.post("/images/edits",fG({body:e,...I,stream:e.stream??!1},this._client))}generate(e,I){return this._client.post("/images/generations",{body:e,...I,stream:e.stream??!1})}}});var OL,YSe=g(()=>{o();Tt();Bn();Cl();OL=class extends fe{retrieve(e,I){return this._client.get(Ye`/models/${e}`,I)}list(e){return this._client.getAPIList("/models",h2,e)}delete(e,I){return this._client.delete(Ye`/models/${e}`,I)}}});var zL,RSe=g(()=>{o();Tt();zL=class extends fe{create(e,I){return this._client.post("/moderations",{body:e,...I})}}});var Jz,ASe=g(()=>{o();Tt();fa();Cl();Jz=class extends fe{accept(e,I,l){return this._client.post(Ye`/realtime/calls/${e}/accept`,{body:I,...l,headers:tt([{Accept:"*/*"},l?.headers])})}hangup(e,I){return this._client.post(Ye`/realtime/calls/${e}/hangup`,{...I,headers:tt([{Accept:"*/*"},I?.headers])})}refer(e,I,l){return this._client.post(Ye`/realtime/calls/${e}/refer`,{body:I,...l,headers:tt([{Accept:"*/*"},l?.headers])})}reject(e,I={},l){return this._client.post(Ye`/realtime/calls/${e}/reject`,{body:I,...l,headers:tt([{Accept:"*/*"},l?.headers])})}}});var Cz,FSe=g(()=>{o();Tt();Cz=class extends fe{create(e,I){return this._client.post("/realtime/client_secrets",{body:e,...I})}}});var lv,XSe=g(()=>{o();Tt();ASe();ASe();FSe();FSe();lv=class extends fe{constructor(){super(...arguments),this.clientSecrets=new Cz(this._client),this.calls=new Jz(this._client)}};lv.ClientSecrets=Cz;lv.Calls=Jz});function yKt(t,e){return!e||!fJl(e)?{...t,output_parsed:null,output:t.output.map(I=>I.type==="function_call"?{...I,parsed_arguments:null}:I.type==="message"?{...I,content:I.content.map(l=>({...l,parsed:null}))}:I)}:gSe(t,e)}function gSe(t,e){let I=t.output.map(n=>{if(n.type==="function_call")return{...n,parsed_arguments:CJl(e,n)};if(n.type==="message"){let a=n.content.map(c=>c.type==="output_text"?{...c,parsed:QJl(e,c.text)}:c);return{...n,content:a}}return n}),l=Object.assign({},t,{output:I});return Object.getOwnPropertyDescriptor(t,"output_text")||Zhe(l),Object.defineProperty(l,"output_parsed",{enumerable:!0,get(){for(let n of l.output)if(n.type==="message"){for(let a of n.content)if(a.type==="output_text"&&a.parsed!==null)return a.parsed}return null}}),l}function QJl(t,e){return t.text?.format?.type!=="json_schema"?null:"$parseRaw"in t.text?.format?(t.text?.format).$parseRaw(e):JSON.parse(e)}function fJl(t){return!!Y7(t.text?.format)}function EJl(t){return t?.$brand==="auto-parseable-tool"}function JJl(t,e){return t.find(I=>I.type==="function"&&I.name===e)}function CJl(t,e){let I=JJl(t.tools??[],e.name);return{...e,...e,parsed_arguments:EJl(I)?I.$parseRaw(e.arguments):I?.strict?JSON.parse(e.arguments):null}}function Zhe(t){let e=[];for(let I of t.output)if(I.type==="message")for(let l of I.content)l.type==="output_text"&&e.push(l.text);t.output_text=e.join("")}var phe=g(()=>{o();D0();Gz()});function LJl(t,e){return yKt(t,e)}var Lz,hhe,vE,Whe,wKt,HKt,QKt,fKt,Nhe,EKt=g(()=>{o();Qh();D0();che();phe();Nhe=class t extends hE{constructor(e){super(),Lz.add(this),hhe.set(this,void 0),vE.set(this,void 0),Whe.set(this,void 0),cI(this,hhe,e,"f")}static createResponse(e,I,l){let n=new t(I);return n._run(()=>n._createOrRetrieveResponse(e,I,{...l,headers:{...l?.headers,"X-Stainless-Helper-Method":"stream"}})),n}async _createOrRetrieveResponse(e,I,l){let n=l?.signal;n&&(n.aborted&&this.controller.abort(),n.addEventListener("abort",()=>this.controller.abort())),me(this,Lz,"m",wKt).call(this);let a,c=null;"response_id"in I?(a=await e.responses.retrieve(I.response_id,{stream:!0},{...l,signal:this.controller.signal,stream:!0}),c=I.starting_after??null):a=await e.responses.create({...I,stream:!0},{...l,signal:this.controller.signal}),this._connected();for await(let r of a)me(this,Lz,"m",HKt).call(this,r,c);if(a.controller.signal?.aborted)throw new xr;return me(this,Lz,"m",QKt).call(this)}[(hhe=new WeakMap,vE=new WeakMap,Whe=new WeakMap,Lz=new WeakSet,wKt=function(){this.ended||cI(this,vE,void 0,"f")},HKt=function(I,l){if(this.ended)return;let n=(c,r)=>{(l==null||r.sequence_number>l)&&this._emit(c,r)},a=me(this,Lz,"m",fKt).call(this,I);switch(n("event",I),I.type){case"response.output_text.delta":{let c=a.output[I.output_index];if(!c)throw new ht(`missing output at index ${I.output_index}`);if(c.type==="message"){let r=c.content[I.content_index];if(!r)throw new ht(`missing content at index ${I.content_index}`);if(r.type!=="output_text")throw new ht(`expected content to be 'output_text', got ${r.type}`);n("response.output_text.delta",{...I,snapshot:r.text})}break}case"response.function_call_arguments.delta":{let c=a.output[I.output_index];if(!c)throw new ht(`missing output at index ${I.output_index}`);c.type==="function_call"&&n("response.function_call_arguments.delta",{...I,snapshot:c.arguments});break}default:n(I.type,I);break}},QKt=function(){if(this.ended)throw new ht("stream has ended, this shouldn't happen");let I=me(this,vE,"f");if(!I)throw new ht("request ended without sending any events");cI(this,vE,void 0,"f");let l=LJl(I,me(this,hhe,"f"));return cI(this,Whe,l,"f"),l},fKt=function(I){let l=me(this,vE,"f");if(!l){if(I.type!=="response.created")throw new ht(`When snapshot hasn't been set yet, expected 'response.created' event, got ${I.type}`);return l=cI(this,vE,I.response,"f"),l}switch(I.type){case"response.output_item.added":{l.output.push(I.item);break}case"response.content_part.added":{let n=l.output[I.output_index];if(!n)throw new ht(`missing output at index ${I.output_index}`);let a=n.type,c=I.part;a==="message"&&c.type!=="reasoning_text"?n.content.push(c):a==="reasoning"&&c.type==="reasoning_text"&&(n.content||(n.content=[]),n.content.push(c));break}case"response.output_text.delta":{let n=l.output[I.output_index];if(!n)throw new ht(`missing output at index ${I.output_index}`);if(n.type==="message"){let a=n.content[I.content_index];if(!a)throw new ht(`missing content at index ${I.content_index}`);if(a.type!=="output_text")throw new ht(`expected content to be 'output_text', got ${a.type}`);a.text+=I.delta}break}case"response.function_call_arguments.delta":{let n=l.output[I.output_index];if(!n)throw new ht(`missing output at index ${I.output_index}`);n.type==="function_call"&&(n.arguments+=I.delta);break}case"response.reasoning_text.delta":{let n=l.output[I.output_index];if(!n)throw new ht(`missing output at index ${I.output_index}`);if(n.type==="reasoning"){let a=n.content?.[I.content_index];if(!a)throw new ht(`missing content at index ${I.content_index}`);if(a.type!=="reasoning_text")throw new ht(`expected content to be 'reasoning_text', got ${a.type}`);a.text+=I.delta}break}case"response.completed":{cI(this,vE,I.response,"f");break}}return l},Symbol.asyncIterator)](){let e=[],I=[],l=!1;return this.on("event",n=>{let a=I.shift();a?a.resolve(n):e.push(n)}),this.on("end",()=>{l=!0;for(let n of I)n.resolve(void 0);I.length=0}),this.on("abort",n=>{l=!0;for(let a of I)a.reject(n);I.length=0}),this.on("error",n=>{l=!0;for(let a of I)a.reject(n);I.length=0}),{next:async()=>e.length?{value:e.shift(),done:!1}:l?{value:void 0,done:!0}:new Promise((a,c)=>I.push({resolve:a,reject:c})).then(a=>a?{value:a,done:!1}:{value:void 0,done:!0}),return:async()=>(this.abort(),{value:void 0,done:!0})}}async finalResponse(){await this.done();let e=me(this,Whe,"f");if(!e)throw new ht("stream ended without producing a ChatCompletion");return e}}});var kz,vSe=g(()=>{o();Tt();Bn();Cl();kz=class extends fe{list(e,I={},l){return this._client.getAPIList(Ye`/responses/${e}/input_items`,MI,{query:I,...l})}}});var xz,ySe=g(()=>{o();Tt();xz=class extends fe{count(e={},I){return this._client.post("/responses/input_tokens",{body:e,...I})}}});var nv,wSe=g(()=>{o();phe();EKt();Tt();vSe();vSe();ySe();ySe();fa();Cl();nv=class extends fe{constructor(){super(...arguments),this.inputItems=new kz(this._client),this.inputTokens=new xz(this._client)}create(e,I){return this._client.post("/responses",{body:e,...I,stream:e.stream??!1})._thenUnwrap(l=>("object"in l&&l.object==="response"&&Zhe(l),l))}retrieve(e,I={},l){return this._client.get(Ye`/responses/${e}`,{query:I,...l,stream:I?.stream??!1})._thenUnwrap(n=>("object"in n&&n.object==="response"&&Zhe(n),n))}delete(e,I){return this._client.delete(Ye`/responses/${e}`,{...I,headers:tt([{Accept:"*/*"},I?.headers])})}parse(e,I){return this._client.responses.create(e,I)._thenUnwrap(l=>gSe(l,e))}stream(e,I){return Nhe.createResponse(this._client,e,I)}cancel(e,I){return this._client.post(Ye`/responses/${e}/cancel`,I)}compact(e,I){return this._client.post("/responses/compact",{body:e,...I})}};nv.InputItems=kz;nv.InputTokens=xz});var jz,HSe=g(()=>{o();Tt();fa();Cl();jz=class extends fe{retrieve(e,I){return this._client.get(Ye`/skills/${e}/content`,{...I,headers:tt([{Accept:"application/binary"},I?.headers]),__binaryResponse:!0})}}});var Uz,QSe=g(()=>{o();Tt();fa();Cl();Uz=class extends fe{retrieve(e,I,l){let{skill_id:n}=I;return this._client.get(Ye`/skills/${n}/versions/${e}/content`,{...l,headers:tt([{Accept:"application/binary"},l?.headers]),__binaryResponse:!0})}}});var BL,fSe=g(()=>{o();Tt();QSe();QSe();Bn();Eh();Cl();BL=class extends fe{constructor(){super(...arguments),this.content=new Uz(this._client)}create(e,I={},l){return this._client.post(Ye`/skills/${e}/versions`,pE({body:I,...l},this._client))}retrieve(e,I,l){let{skill_id:n}=I;return this._client.get(Ye`/skills/${n}/versions/${e}`,l)}list(e,I={},l){return this._client.getAPIList(Ye`/skills/${e}/versions`,MI,{query:I,...l})}delete(e,I,l){let{skill_id:n}=I;return this._client.delete(Ye`/skills/${n}/versions/${e}`,l)}};BL.Content=Uz});var av,ESe=g(()=>{o();Tt();HSe();HSe();fSe();fSe();Bn();Eh();Cl();av=class extends fe{constructor(){super(...arguments),this.content=new jz(this._client),this.versions=new BL(this._client)}create(e={},I){return this._client.post("/skills",pE({body:e,...I},this._client))}retrieve(e,I){return this._client.get(Ye`/skills/${e}`,I)}update(e,I,l){return this._client.post(Ye`/skills/${e}`,{body:I,...l})}list(e={},I){return this._client.getAPIList("/skills",MI,{query:e,...I})}delete(e,I){return this._client.delete(Ye`/skills/${e}`,I)}};av.Content=jz;av.Versions=BL});var Oz,JSe=g(()=>{o();Tt();Eh();Cl();Oz=class extends fe{create(e,I,l){return this._client.post(Ye`/uploads/${e}/parts`,fG({body:I,...l},this._client))}}});var yE,CSe=g(()=>{o();Tt();JSe();JSe();Cl();yE=class extends fe{constructor(){super(...arguments),this.parts=new Oz(this._client)}create(e,I){return this._client.post("/uploads",{body:e,...I})}cancel(e,I){return this._client.post(Ye`/uploads/${e}/cancel`,I)}complete(e,I,l){return this._client.post(Ye`/uploads/${e}/complete`,{body:I,...l})}};yE.Parts=Oz});var JKt,CKt=g(()=>{o();JKt=async t=>{let e=await Promise.allSettled(t),I=e.filter(n=>n.status==="rejected");if(I.length){for(let n of I)console.error(n.reason);throw new Error(`${I.length} promise(s) failed - see the above errors`)}let l=[];for(let n of e)n.status==="fulfilled"&&l.push(n.value);return l}});var zz,LSe=g(()=>{o();Tt();Bn();fa();cz();CKt();Cl();zz=class extends fe{create(e,I,l){return this._client.post(Ye`/vector_stores/${e}/file_batches`,{body:I,...l,headers:tt([{"OpenAI-Beta":"assistants=v2"},l?.headers])})}retrieve(e,I,l){let{vector_store_id:n}=I;return this._client.get(Ye`/vector_stores/${n}/file_batches/${e}`,{...l,headers:tt([{"OpenAI-Beta":"assistants=v2"},l?.headers])})}cancel(e,I,l){let{vector_store_id:n}=I;return this._client.post(Ye`/vector_stores/${n}/file_batches/${e}/cancel`,{...l,headers:tt([{"OpenAI-Beta":"assistants=v2"},l?.headers])})}async createAndPoll(e,I,l){let n=await this.create(e,I);return await this.poll(e,n.id,l)}listFiles(e,I,l){let{vector_store_id:n,...a}=I;return this._client.getAPIList(Ye`/vector_stores/${n}/file_batches/${e}/files`,MI,{query:a,...l,headers:tt([{"OpenAI-Beta":"assistants=v2"},l?.headers])})}async poll(e,I,l){let n=tt([l?.headers,{"X-Stainless-Poll-Helper":"true","X-Stainless-Custom-Poll-Interval":l?.pollIntervalMs?.toString()??void 0}]);for(;;){let{data:a,response:c}=await this.retrieve(I,{vector_store_id:e},{...l,headers:n}).withResponse();switch(a.status){case"in_progress":let r=5e3;if(l?.pollIntervalMs)r=l.pollIntervalMs;else{let s=c.headers.get("openai-poll-after-ms");if(s){let i=parseInt(s);isNaN(i)||(r=i)}}await m2(r);break;case"failed":case"cancelled":case"completed":return a}}}async uploadAndPoll(e,{files:I,fileIds:l=[]},n){if(I==null||I.length==0)throw new Error("No `files` provided to process. If you've already uploaded files you should use `.createAndPoll()` instead");let a=n?.maxConcurrency??5,c=Math.min(a,I.length),r=this._client,s=I.values(),i=[...l];async function G(u){for(let b of u){let Z=await r.files.create({file:b,purpose:"assistants"},n);i.push(Z.id)}}let d=Array(c).fill(s).map(G);return await JKt(d),await this.createAndPoll(e,{file_ids:i})}}});var Bz,kSe=g(()=>{o();Tt();Bn();fa();H7();Cl();Bz=class extends fe{create(e,I,l){return this._client.post(Ye`/vector_stores/${e}/files`,{body:I,...l,headers:tt([{"OpenAI-Beta":"assistants=v2"},l?.headers])})}retrieve(e,I,l){let{vector_store_id:n}=I;return this._client.get(Ye`/vector_stores/${n}/files/${e}`,{...l,headers:tt([{"OpenAI-Beta":"assistants=v2"},l?.headers])})}update(e,I,l){let{vector_store_id:n,...a}=I;return this._client.post(Ye`/vector_stores/${n}/files/${e}`,{body:a,...l,headers:tt([{"OpenAI-Beta":"assistants=v2"},l?.headers])})}list(e,I={},l){return this._client.getAPIList(Ye`/vector_stores/${e}/files`,MI,{query:I,...l,headers:tt([{"OpenAI-Beta":"assistants=v2"},l?.headers])})}delete(e,I,l){let{vector_store_id:n}=I;return this._client.delete(Ye`/vector_stores/${n}/files/${e}`,{...l,headers:tt([{"OpenAI-Beta":"assistants=v2"},l?.headers])})}async createAndPoll(e,I,l){let n=await this.create(e,I,l);return await this.poll(e,n.id,l)}async poll(e,I,l){let n=tt([l?.headers,{"X-Stainless-Poll-Helper":"true","X-Stainless-Custom-Poll-Interval":l?.pollIntervalMs?.toString()??void 0}]);for(;;){let a=await this.retrieve(I,{vector_store_id:e},{...l,headers:n}).withResponse(),c=a.data;switch(c.status){case"in_progress":let r=5e3;if(l?.pollIntervalMs)r=l.pollIntervalMs;else{let s=a.response.headers.get("openai-poll-after-ms");if(s){let i=parseInt(s);isNaN(i)||(r=i)}}await m2(r);break;case"failed":case"completed":return c}}}async upload(e,I,l){let n=await this._client.files.create({file:I,purpose:"assistants"},l);return this.create(e,{file_id:n.id},l)}async uploadAndPoll(e,I,l){let n=await this.upload(e,I,l);return await this.poll(e,n.id,l)}content(e,I,l){let{vector_store_id:n}=I;return this._client.getAPIList(Ye`/vector_stores/${n}/files/${e}/content`,h2,{...l,headers:tt([{"OpenAI-Beta":"assistants=v2"},l?.headers])})}}});var cv,xSe=g(()=>{o();Tt();LSe();LSe();kSe();kSe();Bn();fa();Cl();cv=class extends fe{constructor(){super(...arguments),this.files=new Bz(this._client),this.fileBatches=new zz(this._client)}create(e,I){return this._client.post("/vector_stores",{body:e,...I,headers:tt([{"OpenAI-Beta":"assistants=v2"},I?.headers])})}retrieve(e,I){return this._client.get(Ye`/vector_stores/${e}`,{...I,headers:tt([{"OpenAI-Beta":"assistants=v2"},I?.headers])})}update(e,I,l){return this._client.post(Ye`/vector_stores/${e}`,{body:I,...l,headers:tt([{"OpenAI-Beta":"assistants=v2"},l?.headers])})}list(e={},I){return this._client.getAPIList("/vector_stores",MI,{query:e,...I,headers:tt([{"OpenAI-Beta":"assistants=v2"},I?.headers])})}delete(e,I){return this._client.delete(Ye`/vector_stores/${e}`,{...I,headers:tt([{"OpenAI-Beta":"assistants=v2"},I?.headers])})}search(e,I,l){return this._client.getAPIList(Ye`/vector_stores/${e}/search`,h2,{body:I,method:"post",...l,headers:tt([{"OpenAI-Beta":"assistants=v2"},l?.headers])})}};cv.Files=Bz;cv.FileBatches=zz});var ML,jSe=g(()=>{o();Tt();Bn();fa();Eh();Cl();ML=class extends fe{create(e,I){return this._client.post("/videos",fG({body:e,...I},this._client))}retrieve(e,I){return this._client.get(Ye`/videos/${e}`,I)}list(e={},I){return this._client.getAPIList("/videos",K0,{query:e,...I})}delete(e,I){return this._client.delete(Ye`/videos/${e}`,I)}createCharacter(e,I){return this._client.post("/videos/characters",fG({body:e,...I},this._client))}downloadContent(e,I={},l){return this._client.get(Ye`/videos/${e}/content`,{query:I,...l,headers:tt([{Accept:"application/binary"},l?.headers]),__binaryResponse:!0})}edit(e,I){return this._client.post("/videos/edits",fG({body:e,...I},this._client))}extend(e,I){return this._client.post("/videos/extensions",fG({body:e,...I},this._client))}getCharacter(e,I){return this._client.get(Ye`/videos/characters/${e}`,I)}remix(e,I,l){return this._client.post(Ye`/videos/${e}/remix`,pE({body:I,...l},this._client))}}});var Mz,LKt,Vhe,SL,USe=g(()=>{o();Qh();D0();Tt();fa();SL=class extends fe{constructor(){super(...arguments),Mz.add(this)}async unwrap(e,I,l=this._client.webhookSecret,n=300){return await this.verifySignature(e,I,l,n),JSON.parse(e)}async verifySignature(e,I,l=this._client.webhookSecret,n=300){if(typeof crypto>"u"||typeof crypto.subtle.importKey!="function"||typeof crypto.subtle.verify!="function")throw new Error("Webhook signature verification is only supported when the `crypto` global is defined");me(this,Mz,"m",LKt).call(this,l);let a=tt([I]).values,c=me(this,Mz,"m",Vhe).call(this,a,"webhook-signature"),r=me(this,Mz,"m",Vhe).call(this,a,"webhook-timestamp"),s=me(this,Mz,"m",Vhe).call(this,a,"webhook-id"),i=parseInt(r,10);if(isNaN(i))throw new b2("Invalid webhook timestamp format");let G=Math.floor(Date.now()/1e3);if(G-i>n)throw new b2("Webhook timestamp is too old");if(i>G+n)throw new b2("Webhook timestamp is too new");let d=c.split(" ").map(p=>p.startsWith("v1,")?p.substring(3):p),u=l.startsWith("whsec_")?m.Buffer.from(l.replace("whsec_",""),"base64"):m.Buffer.from(l,"utf-8"),b=s?`${s}.${r}.${e}`:`${r}.${e}`,Z=await crypto.subtle.importKey("raw",u,{name:"HMAC",hash:"SHA-256"},!1,["verify"]);for(let p of d)try{let W=m.Buffer.from(p,"base64");if(await crypto.subtle.verify("HMAC",Z,W,new TextEncoder().encode(b)))return}catch{continue}throw new b2("The given webhook signature does not match the expected signature")}};Mz=new WeakSet,LKt=function(e){if(typeof e!="string"||e.length===0)throw new Error("The webhook secret must either be set using the env var, OPENAI_WEBHOOK_SECRET, on the client class, OpenAI({ webhookSecret: '123' }), or passed to this function")},Vhe=function(e,I){if(!e)throw new Error("Headers are required");let l=e.get(I);if(l==null)throw new Error(`Missing required header: ${I}`);return l}});var kKt=g(()=>{o();USe()});var xKt=g(()=>{o();kKt()});var jKt=g(()=>{o();pKt();hKt();LMe();kMe();$Me();eSe();lSe();aSe();cSe();oSe();iSe();hSe();NSe();VSe();YSe();RSe();XSe();wSe();ESe();CSe();xSe();jSe();xKt()});var zSe,BSe,Yhe,UKt,OSe,oI,Rhe=g(()=>{o();Qh();kBe();qg();cz();Ope();zBe();rz();f_t();eMe();OBe();fh();Bn();q_t();fh();GMe();jKt();Dpe();kMe();eSe();cSe();iSe();VSe();YSe();RSe();jSe();LMe();$Me();fMe();lSe();aSe();oSe();hSe();NSe();XSe();wSe();ESe();CSe();xSe();USe();zBe();fa();_Me();m7();qg();OSe="workload-identity-auth",oI=class{constructor({baseURL:e=q0("OPENAI_BASE_URL"),apiKey:I=q0("OPENAI_API_KEY"),organization:l=q0("OPENAI_ORG_ID")??null,project:n=q0("OPENAI_PROJECT_ID")??null,webhookSecret:a=q0("OPENAI_WEBHOOK_SECRET")??null,workloadIdentity:c,...r}={}){if(zSe.add(this),Yhe.set(this,void 0),this.completions=new fL(this),this.chat=new NE(this),this.embeddings=new JL(this),this.files=new LL(this),this.images=new UL(this),this.audio=new W2(this),this.moderations=new zL(this),this.models=new OL(this),this.fineTuning=new eA(this),this.graders=new gE(this),this.vectorStores=new cv(this),this.webhooks=new SL(this),this.beta=new $0(this),this.batches=new vL(this),this.uploads=new yE(this),this.responses=new nv(this),this.realtime=new lv(this),this.conversations=new FE(this),this.evals=new XE(this),this.containers=new AE(this),this.skills=new av(this),this.videos=new ML(this),c){if(I&&I!==OSe)throw new ht("The `apiKey` and `workloadIdentity` arguments are mutually exclusive; only one can be passed at a time.");I=OSe}else if(I===void 0)throw new ht("Missing credentials. Please pass an `apiKey`, `workloadIdentity`, or set the `OPENAI_API_KEY` environment variable.");let s={apiKey:I,organization:l,project:n,webhookSecret:a,workloadIdentity:c,...r,baseURL:e||"https://api.openai.com/v1"};if(!s.dangerouslyAllowBrowser&&y_t())throw new ht(`It looks like you're running in a browser-like environment. + +This is disabled by default, as it risks exposing your secret API credentials to attackers. +If you understand the risks and have appropriate mitigations in place, +you can set the \`dangerouslyAllowBrowser\` option to \`true\`, e.g., + +new OpenAI({ apiKey, dangerouslyAllowBrowser: true }); + +https://help.openai.com/en/articles/5112595-best-practices-for-api-key-safety +`);this.baseURL=s.baseURL,this.timeout=s.timeout??BSe.DEFAULT_TIMEOUT,this.logger=s.logger??console;let i="warn";this.logLevel=i,this.logLevel=IMe(s.logLevel,"ClientOptions.logLevel",this)??IMe(q0("OPENAI_LOG"),"process.env['OPENAI_LOG']",this)??i,this.fetchOptions=s.fetchOptions,this.maxRetries=s.maxRetries??2,this.fetch=s.fetch??zpe(),cI(this,Yhe,Q_t,"f"),this._options=s,c&&(this._workloadIdentityAuth=new Ppe(c,this.fetch)),this.apiKey=typeof I=="string"?I:"Missing Key",this.organization=l,this.project=n,this.webhookSecret=a}withOptions(e){return new this.constructor({...this._options,baseURL:this.baseURL,maxRetries:this.maxRetries,timeout:this.timeout,logger:this.logger,logLevel:this.logLevel,fetch:this.fetch,fetchOptions:this.fetchOptions,apiKey:this.apiKey,workloadIdentity:this._options.workloadIdentity,organization:this.organization,project:this.project,webhookSecret:this.webhookSecret,...e})}defaultQuery(){return this._options.defaultQuery}validateHeaders({values:e,nulls:I}){}async authHeaders(e){return tt([{Authorization:`Bearer ${this.apiKey}`}])}stringifyQuery(e){return B_t(e)}getUserAgent(){return`${this.constructor.name}/JS ${ZE}`}defaultIdempotencyKey(){return`stainless-node-retry-${LBe()}`}makeStatusError(e,I,l,n){return kr.generate(e,I,l,n)}async _callApiKey(){let e=this._options.apiKey;if(typeof e!="function")return!1;let I;try{I=await e()}catch(l){throw l instanceof ht?l:new ht(`Failed to get token from 'apiKey' function: ${l.message}`,{cause:l})}if(typeof I!="string"||!I)throw new ht(`Expected 'apiKey' function argument to return a string but it returned ${I}`);return this.apiKey=I,!0}buildURL(e,I,l){let n=!me(this,zSe,"m",UKt).call(this)&&l||this.baseURL,a=Y_t(e)?new URL(e):new URL(n+(n.endsWith("/")&&e.startsWith("/")?e.slice(1):e)),c=this.defaultQuery(),r=Object.fromEntries(a.searchParams);return(!UBe(c)||!UBe(r))&&(I={...r,...c,...I}),typeof I=="object"&&I&&!Array.isArray(I)&&(a.search=this.stringifyQuery(I)),a.toString()}async prepareOptions(e){await this._callApiKey()}async prepareRequest(e,{url:I,options:l}){}get(e,I){return this.methodRequest("get",e,I)}post(e,I){return this.methodRequest("post",e,I)}patch(e,I){return this.methodRequest("patch",e,I)}put(e,I){return this.methodRequest("put",e,I)}delete(e,I){return this.methodRequest("delete",e,I)}methodRequest(e,I,l){return this.request(Promise.resolve(l).then(n=>({method:e,path:I,...n})))}request(e,I=null){return new AL(this,this.makeRequest(e,I,void 0))}async makeRequest(e,I,l){let n=await e,a=n.maxRetries??this.maxRetries;I==null&&(I=a),await this.prepareOptions(n);let{req:c,url:r,timeout:s}=await this.buildRequest(n,{retryCount:a-I});await this.prepareRequest(c,{url:r,options:n});let i="log_"+(Math.random()*(1<<24)|0).toString(16).padStart(6,"0"),G=l===void 0?"":`, retryOf: ${l}`,d=Date.now();if(ss(this).debug(`[${i}] sending request`,Pg({retryOfRequestLogID:l,method:n.method,url:r,options:n,headers:c.headers})),n.signal?.aborted)throw new xr;let u=new AbortController,b=await this.fetchWithAuth(r,c,s,u).catch(d7),Z=Date.now();if(b instanceof globalThis.Error){let h=`retrying, ${I} attempts remaining`;if(n.signal?.aborted)throw new xr;let N=G7(b)||/timed? ?out/i.test(String(b)+("cause"in b?String(b.cause):""));if(I)return ss(this).info(`[${i}] connection ${N?"timed out":"failed"} - ${h}`),ss(this).debug(`[${i}] connection ${N?"timed out":"failed"} (${h})`,Pg({retryOfRequestLogID:l,url:r,durationMs:Z-d,message:b.message})),this.retryRequest(n,I,l??i);throw ss(this).info(`[${i}] connection ${N?"timed out":"failed"} - error; no more retries left`),ss(this).debug(`[${i}] connection ${N?"timed out":"failed"} (error; no more retries left)`,Pg({retryOfRequestLogID:l,url:r,durationMs:Z-d,message:b.message})),b instanceof YL||b instanceof u7?b:N?new u2:new mE({cause:b})}let p=[...b.headers.entries()].filter(([h])=>h==="x-request-id").map(([h,N])=>", "+h+": "+JSON.stringify(N)).join(""),W=`[${i}${G}${p}] ${c.method} ${r} ${b.ok?"succeeded":"failed"} with status ${b.status} in ${Z-d}ms`;if(!b.ok){if(b.status===401&&this._workloadIdentityAuth&&!n.__metadata?.hasStreamingBody&&!n.__metadata?.workloadIdentityTokenRefreshed)return await SBe(b.body),this._workloadIdentityAuth.invalidateToken(),this.makeRequest({...n,__metadata:{...n.__metadata,workloadIdentityTokenRefreshed:!0}},I,l??i);let h=await this.shouldRetry(b);if(I&&h){let y=`retrying, ${I} attempts remaining`;return await SBe(b.body),ss(this).info(`${W} - ${y}`),ss(this).debug(`[${i}] response error (${y})`,Pg({retryOfRequestLogID:l,url:b.url,status:b.status,headers:b.headers,durationMs:Z-d})),this.retryRequest(n,I,l??i,b.headers)}let N=h?"error; no more retries left":"error; not retryable";ss(this).info(`${W} - ${N}`);let V=await b.text().catch(y=>d7(y).message),R=F_t(V),F=R?void 0:V;throw ss(this).debug(`[${i}] response error (${N})`,Pg({retryOfRequestLogID:l,url:b.url,status:b.status,headers:b.headers,message:F,durationMs:Date.now()-d})),this.makeStatusError(b.status,R,F,b.headers)}return ss(this).info(W),ss(this).debug(`[${i}] response start`,Pg({retryOfRequestLogID:l,url:b.url,status:b.status,headers:b.headers,durationMs:Z-d})),{response:b,options:n,controller:u,requestLogID:i,retryOfRequestLogID:l,startTime:d}}getAPIList(e,I,l){return this.requestAPIList(I,l&&"then"in l?l.then(n=>({method:"get",path:e,...n})):{method:"get",path:e,...l})}requestAPIList(e,I){let l=this.makeRequest(I,null,void 0);return new W7(this,l,e)}async fetchWithAuth(e,I,l,n){if(this._workloadIdentityAuth){let c=I.headers,r=c.get("Authorization");if(!r||r===`Bearer ${OSe}`){let s=await this._workloadIdentityAuth.getToken();c.set("Authorization",`Bearer ${s}`)}}return await this.fetchWithTimeout(e,I,l,n)}async fetchWithTimeout(e,I,l,n){let{signal:a,method:c,...r}=I||{},s=this._makeAbort(n);a&&a.addEventListener("abort",s,{once:!0});let i=setTimeout(s,l),G=globalThis.ReadableStream&&r.body instanceof globalThis.ReadableStream||typeof r.body=="object"&&r.body!==null&&Symbol.asyncIterator in r.body,d={signal:n.signal,...G?{duplex:"half"}:{},method:"GET",...r};c&&(d.method=c.toUpperCase());try{return await this.fetch.call(void 0,e,d)}finally{clearTimeout(i)}}async shouldRetry(e){let I=e.headers.get("x-should-retry");return I==="true"?!0:I==="false"?!1:e.status===408||e.status===409||e.status===429||e.status>=500}async retryRequest(e,I,l,n){let a,c=n?.get("retry-after-ms");if(c){let s=parseFloat(c);Number.isNaN(s)||(a=s)}let r=n?.get("retry-after");if(r&&!a){let s=parseFloat(r);Number.isNaN(s)?a=Date.parse(r)-Date.now():a=s*1e3}if(a===void 0){let s=e.maxRetries??this.maxRetries;a=this.calculateDefaultRetryTimeoutMillis(I,s)}return await m2(a),this.makeRequest(e,I-1,l)}calculateDefaultRetryTimeoutMillis(e,I){let a=I-e,c=Math.min(.5*Math.pow(2,a),8),r=1-Math.random()*.25;return c*r*1e3}async buildRequest(e,{retryCount:I=0}={}){let l={...e},{method:n,path:a,query:c,defaultBaseURL:r}=l,s=this.buildURL(a,c,r);"timeout"in l&&A_t("timeout",l.timeout),l.timeout=l.timeout??this.timeout;let{bodyHeaders:i,body:G,isStreamingBody:d}=this.buildBody({options:l});d&&(e.__metadata={...e.__metadata,hasStreamingBody:!0});let u=await this.buildHeaders({options:e,method:n,bodyHeaders:i,retryCount:I});return{req:{method:n,headers:u,...l.signal&&{signal:l.signal},...globalThis.ReadableStream&&G instanceof globalThis.ReadableStream&&{duplex:"half"},...G&&{body:G},...this.fetchOptions??{},...l.fetchOptions??{}},url:s,timeout:l.timeout}}async buildHeaders({options:e,method:I,bodyHeaders:l,retryCount:n}){let a={};this.idempotencyHeader&&I!=="get"&&(e.idempotencyKey||(e.idempotencyKey=this.defaultIdempotencyKey()),a[this.idempotencyHeader]=e.idempotencyKey);let c=tt([a,{Accept:"application/json","User-Agent":this.getUserAgent(),"X-Stainless-Retry-Count":String(n),...e.timeout?{"X-Stainless-Timeout":String(Math.trunc(e.timeout/1e3))}:{},...w_t(),"OpenAI-Organization":this.organization,"OpenAI-Project":this.project},await this.authHeaders(e),this._options.defaultHeaders,l,e.headers]);return this.validateHeaders(c),c.values}_makeAbort(e){return()=>e.abort()}buildBody({options:{body:e,headers:I}}){if(!e)return{bodyHeaders:void 0,body:void 0,isStreamingBody:!1};let l=tt([I]),n=typeof globalThis.ReadableStream<"u"&&e instanceof globalThis.ReadableStream,a=!n&&(typeof e=="string"||e instanceof ArrayBuffer||ArrayBuffer.isView(e)||typeof globalThis.Blob<"u"&&e instanceof globalThis.Blob||e instanceof URLSearchParams||e instanceof FormData);return ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof DataView||typeof e=="string"&&l.values.has("content-type")||globalThis.Blob&&e instanceof globalThis.Blob||e instanceof FormData||e instanceof URLSearchParams||n?{bodyHeaders:void 0,body:e,isStreamingBody:!a}:typeof e=="object"&&(Symbol.asyncIterator in e||Symbol.iterator in e&&"next"in e&&typeof e.next=="function")?{bodyHeaders:void 0,body:Bpe(e),isStreamingBody:!0}:typeof e=="object"&&l.values.get("content-type")==="application/x-www-form-urlencoded"?{bodyHeaders:{"content-type":"application/x-www-form-urlencoded"},body:this.stringifyQuery(e),isStreamingBody:!1}:{...me(this,Yhe,"f").call(this,{body:e,headers:l}),isStreamingBody:!1}}};BSe=oI,Yhe=new WeakMap,zSe=new WeakSet,UKt=function(){return this.baseURL!=="https://api.openai.com/v1"};oI.OpenAI=BSe;oI.DEFAULT_TIMEOUT=6e5;oI.OpenAIError=ht;oI.APIError=kr;oI.APIConnectionError=mE;oI.APIConnectionTimeoutError=u2;oI.APIUserAbortError=xr;oI.NotFoundError=PO;oI.ConflictError=$O;oI.RateLimitError=tz;oI.BadRequestError=KO;oI.AuthenticationError=DO;oI.InternalServerError=Iz;oI.PermissionDeniedError=qO;oI.UnprocessableEntityError=ez;oI.InvalidWebhookSignatureError=b2;oI.toFile=iz;oI.Completions=fL;oI.Chat=NE;oI.Embeddings=JL;oI.Files=LL;oI.Images=UL;oI.Audio=W2;oI.Moderations=zL;oI.Models=OL;oI.FineTuning=eA;oI.Graders=gE;oI.VectorStores=cv;oI.Webhooks=SL;oI.Beta=$0;oI.Batches=vL;oI.Uploads=yE;oI.Responses=nv;oI.Realtime=lv;oI.Conversations=FE;oI.Evals=XE;oI.Containers=AE;oI.Skills=av;oI.Videos=ML});var rv,TJl,OKt=g(()=>{o();fa();D0();H7();Rhe();rv=class extends oI{constructor({baseURL:e=q0("OPENAI_BASE_URL"),apiKey:I=q0("AZURE_OPENAI_API_KEY"),apiVersion:l=q0("OPENAI_API_VERSION"),endpoint:n,deployment:a,azureADTokenProvider:c,dangerouslyAllowBrowser:r,...s}={}){if(!l)throw new ht("The OPENAI_API_VERSION environment variable is missing or empty; either provide it, or instantiate the AzureOpenAI client with an apiVersion option, like new AzureOpenAI({ apiVersion: 'My API Version' }).");if(typeof c=="function"&&(r=!0),!c&&!I)throw new ht("Missing credentials. Please pass one of `apiKey` and `azureADTokenProvider`, or set the `AZURE_OPENAI_API_KEY` environment variable.");if(c&&I)throw new ht("The `apiKey` and `azureADTokenProvider` arguments are mutually exclusive; only one can be passed at a time.");if(s.defaultQuery={...s.defaultQuery,"api-version":l},e){if(n)throw new ht("baseURL and endpoint are mutually exclusive")}else{if(n||(n=process.env.AZURE_OPENAI_ENDPOINT),!n)throw new ht("Must provide one of the `baseURL` or `endpoint` arguments, or the `AZURE_OPENAI_ENDPOINT` environment variable");e=`${n}/openai`}super({apiKey:c??I,baseURL:e,...s,...r!==void 0?{dangerouslyAllowBrowser:r}:{}}),this.apiVersion="",this.apiVersion=l,this.deploymentName=a}async buildRequest(e,I={}){if(TJl.has(e.path)&&e.method==="post"&&e.body!==void 0){if(!az(e.body))throw new Error("Expected request body to be an object");let l=this.deploymentName||e.body.model||e.__metadata?.model;l!==void 0&&!this.baseURL.includes("/deployments")&&(e.path=`/deployments/${l}${e.path}`)}return super.buildRequest(e,I)}async authHeaders(e){return typeof this._options.apiKey=="string"?tt([{"api-key":this.apiKey}]):super.authHeaders(e)}},TJl=new Set(["/completions","/chat/completions","/embeddings","/audio/transcriptions","/audio/translations","/audio/speech","/images/generations","/batches","/images/edits"])});var V2=g(()=>{o();Rhe();GMe();Dpe();Rhe();Bn();fh();OKt()});function _Jl(t){return!!(String(t).includes("context_length_exceeded")||"message"in t&&typeof t.message=="string"&&(t.message.includes("Input tokens exceed the configured limit")||t.message.includes("exceeds the context window")||t.message.includes("maximum context length")))}function pm(t){if(!t||typeof t!="object")return t;let e;return t.constructor.name===u2.name&&"message"in t&&typeof t.message=="string"?(e=new Error(t.message),e.name="TimeoutError"):t.constructor.name===xr.name&&"message"in t&&typeof t.message=="string"?(e=new Error(t.message),e.name="AbortError"):_Jl(t)?e=DS.fromError(t):"status"in t&&t.status===400&&"message"in t&&typeof t.message=="string"&&t.message.includes("tool_calls")?e=i7(t,"INVALID_TOOL_RESULTS"):"status"in t&&t.status===401?e=i7(t,"MODEL_AUTHENTICATION"):"status"in t&&t.status===429?e=i7(t,"MODEL_RATE_LIMIT"):"status"in t&&t.status===404?e=i7(t,"MODEL_NOT_FOUND"):e=t,e}var wE=g(()=>{o();V_t();V2();hX()});function sv(t){return t?!!(/^o\d/.test(t??"")||t.startsWith("gpt-5")&&!t.startsWith("gpt-5-chat")):!1}function KJl(t){return t.role!=="system"&&t.role!=="developer"&&t.role!=="assistant"&&t.role!=="user"&&t.role!=="function"&&t.role!=="tool"&&console.warn(`Unknown message role: ${t.role}`),t.role}function MSe(t){return t.metadata?.filename??t.metadata?.name??t.metadata?.title}function Sz(t){let e=t.metadata?.filename??t.metadata?.name??t.metadata?.title;return e||(console.warn("OpenAI may require a filename for file uploads. Specify a filename in the content block metadata, e.g.: { type: 'file', mimeType: '...', data: '...', metadata: { filename: 'my-file.pdf' } }. Using placeholder filename 'LC_AUTOGENERATED'."),DJl)}function Y2(t){let e=t._getType();switch(e){case"system":return"system";case"ai":return"assistant";case"human":return"user";case"function":return"function";case"tool":return"tool";case"generic":if(!Bs.isInstance(t))throw new Error("Invalid generic chat message");return KJl(t);default:throw new Error(`Unknown message type: ${e}`)}}function zKt(t){return!!(t.includes("gpt-5.2-pro")||t.includes("gpt-5.4-pro")||t.includes("gpt-5.5-pro")||t.includes("codex"))}var tA,DJl,HE=g(()=>{o();NI();tA=t=>t();DJl="LC_AUTOGENERATED"});function hm(t){let{azureOpenAIApiDeploymentName:e,azureOpenAIApiInstanceName:I,azureOpenAIApiKey:l,azureOpenAIBasePath:n,baseURL:a,azureADTokenProvider:c,azureOpenAIEndpoint:r}=t;if((l||c)&&n&&e)return`${n}/${e}`;if((l||c)&&r&&e)return`${r}/openai/deployments/${e}`;if(l||c){if(!I)throw new Error("azureOpenAIApiInstanceName is required when using azureOpenAIApiKey");if(!e)throw new Error("azureOpenAIApiDeploymentName is a required parameter when using azureOpenAIApiKey");return`https://${I}.openai.azure.com/openai/deployments/${e}`}return a}function Ahe(t){return typeof Headers<"u"&&t!==null&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Headers]"}function SSe(t){let e=tA(()=>{if(Ahe(t))return t;if(Array.isArray(t))return new Headers(t);if(typeof t=="object"&&t!==null&&"values"in t&&Ahe(t.values))return t.values;if(typeof t=="object"&&t!==null){let I=Object.entries(t).filter(([,l])=>typeof l=="string").map(([l,n])=>[l,n]);return new Headers(I)}return new Headers});return Object.fromEntries(e.entries())}function TSe(){let t=Ble();return(t==="node"||t==="deno")&&(t=`(${t}/${process.version}; ${process.platform}; ${process.arch})`),t}function Wm(t,e=!1,I="1.0.0"){let l=SSe(t),n=TSe(),a=`langchainjs${e?"-azure":""}-openai`;return{...l,"User-Agent":l["User-Agent"]?`${a}/${I} (${n})${l["User-Agent"]}`:`${a}/${I} (${n})`}}var QE=g(()=>{o();HE();ca()});function BKt(t,e){let I;return Ws(t)?I=aQ(t):I=t,e?.strict!==void 0&&(I.function.strict=e.strict),I}function qJl(t){return t.anyOf!==void 0&&Array.isArray(t.anyOf)}function MKt(t){let e=["namespace functions {",""];for(let I of t)I.description&&e.push(`// ${I.description}`),Object.keys(I.parameters.properties??{}).length>0?(e.push(`type ${I.name} = (_: {`),e.push(SKt(I.parameters,0)),e.push("}) => any;")):e.push(`type ${I.name} = () => any;`),e.push("");return e.push("} // namespace functions"),e.join(` +`)}function SKt(t,e){let I=[];for(let[l,n]of Object.entries(t.properties??{}))n.description&&e<2&&I.push(`// ${n.description}`),t.required?.includes(l)?I.push(`${l}: ${Fhe(n,e)},`):I.push(`${l}?: ${Fhe(n,e)},`);return I.map(l=>" ".repeat(e)+l).join(` +`)}function Fhe(t,e){if(qJl(t))return t.anyOf.map(I=>Fhe(I,e)).join(" | ");switch(t.type){case"string":return t.enum?t.enum.map(I=>`"${I}"`).join(" | "):"string";case"number":return t.enum?t.enum.map(I=>`${I}`).join(" | "):"number";case"integer":return t.enum?t.enum.map(I=>`${I}`).join(" | "):"number";case"boolean":return"boolean";case"null":return"null";case"object":return["{",SKt(t,e+2),"}"].join(` +`);case"array":return t.items?`${Fhe(t.items,e)}[]`:"any[]";default:return""}}function Xhe(t){if(t)return t==="any"||t==="required"?"required":t==="auto"?"auto":t==="none"?"none":typeof t=="string"?{type:"function",function:{name:t}}:t}function Tz(t){return"type"in t&&t.type!=="function"}function TKt(t){return typeof t=="object"&&t!==null&&"extras"in t&&typeof t.extras=="object"&&t.extras!==null&&"providerToolDefinition"in t.extras&&typeof t.extras.providerToolDefinition=="object"&&t.extras.providerToolDefinition!==null}function _Kt(t){return t!=null&&typeof t=="object"&&"type"in t&&t.type!=="function"}function TL(t){return typeof t=="object"&&t!==null&&"metadata"in t&&typeof t.metadata=="object"&&t.metadata!==null&&"customTool"in t.metadata&&typeof t.metadata.customTool=="object"&&t.metadata.customTool!==null}function ghe(t){return"type"in t&&t.type==="custom"&&"custom"in t&&typeof t.custom=="object"&&t.custom!==null}function KKt(t){if(t.type==="custom_tool_call")return{...t,type:"tool_call",call_id:t.id,id:t.call_id,name:t.name,isCustomTool:!0,args:{input:t.input}}}function DKt(t){if(t.type==="computer_call")return{...t,type:"tool_call",call_id:t.id,id:t.call_id,name:"computer_use",isComputerTool:!0,args:{action:t.action}}}function qKt(t){return typeof t=="object"&&t!==null&&"type"in t&&t.type==="tool_call"&&"isComputerTool"in t&&t.isComputerTool===!0}function PKt(t){return typeof t=="object"&&t!==null&&"type"in t&&t.type==="tool_call"&&"isCustomTool"in t&&t.isCustomTool===!0}function $Kt(t){let e=()=>{if(t.custom.format){if(t.custom.format.type==="grammar")return{type:"grammar",definition:t.custom.format.grammar.definition,syntax:t.custom.format.grammar.syntax};if(t.custom.format.type==="text")return{type:"text"}}};return{type:"custom",name:t.custom.name,description:t.custom.description,format:e()}}function eDt(t){let e=()=>{if(t.format){if(t.format.type==="grammar")return{type:"grammar",grammar:{definition:t.format.definition,syntax:t.format.syntax}};if(t.format.type==="text")return{type:"text"}}};return{type:"custom",custom:{name:t.name,description:t.description,format:e()}}}var _z=g(()=>{o();uF();Wa();aG()});var IDt,tDt,lDt,vhe=g(()=>{o();IDt=Symbol("Let zodToJsonSchema decide on which parser to use"),tDt={name:void 0,$refStrategy:"root",effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",nullableStrategy:"from-target",removeAdditionalStrategy:"passthrough",definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},lDt=t=>typeof t=="string"?{...tDt,basePath:["#"],definitions:{},name:t}:{...tDt,basePath:["#"],definitions:{},...t}});function nDt(t){if(!t)return!0;for(let e in t)return!1;return!0}var J7,_Se=g(()=>{o();J7=t=>"_def"in t?t._def:t});var aDt,KSe=g(()=>{o();vhe();_Se();aDt=t=>{let e=lDt(t),I=e.name!==void 0?[...e.basePath,e.definitionPath,e.name]:e.basePath;return{...e,currentPath:I,propertyPath:void 0,seenRefs:new Set,seen:new Map(Object.entries(e.definitions).map(([l,n])=>[J7(n),{def:J7(n),path:[...e.basePath,e.definitionPath,l],jsonSchema:void 0}]))}}});function DSe(t,e,I,l){l?.errorMessages&&I&&(t.errorMessage={...t.errorMessage,[e]:I})}function Kl(t,e,I,l,n){t[e]=I,DSe(t,e,l,n)}var fE=g(()=>{o()});function cDt(){return{}}var qSe=g(()=>{o()});function rDt(t,e){let I={type:"array"};return t.type?._def?.typeName!==Fe.ZodAny&&(I.items=RI(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&Kl(I,"minItems",t.minLength.value,t.minLength.message,e),t.maxLength&&Kl(I,"maxItems",t.maxLength.value,t.maxLength.message,e),t.exactLength&&(Kl(I,"minItems",t.exactLength.value,t.exactLength.message,e),Kl(I,"maxItems",t.exactLength.value,t.exactLength.message,e)),I}var PSe=g(()=>{o();Fc();fE();ys()});function sDt(t,e){let I={type:"integer",format:"int64"};if(!t.checks)return I;for(let l of t.checks)switch(l.kind){case"min":e.target==="jsonSchema7"?l.inclusive?Kl(I,"minimum",l.value,l.message,e):Kl(I,"exclusiveMinimum",l.value,l.message,e):(l.inclusive||(I.exclusiveMinimum=!0),Kl(I,"minimum",l.value,l.message,e));break;case"max":e.target==="jsonSchema7"?l.inclusive?Kl(I,"maximum",l.value,l.message,e):Kl(I,"exclusiveMaximum",l.value,l.message,e):(l.inclusive||(I.exclusiveMaximum=!0),Kl(I,"maximum",l.value,l.message,e));break;case"multipleOf":Kl(I,"multipleOf",l.value,l.message,e);break}return I}var $Se=g(()=>{o();fE()});function oDt(){return{type:"boolean"}}var eTe=g(()=>{o()});function iDt(t,e){return RI(t.type._def,e)}var tTe=g(()=>{o();ys()});var GDt,ITe=g(()=>{o();ys();GDt=(t,e)=>RI(t.innerType._def,e)});function lTe(t,e,I){let l=I??e.dateStrategy;if(Array.isArray(l))return{anyOf:l.map((n,a)=>lTe(t,e,n))};switch(l){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return PJl(t,e)}}var PJl,nTe=g(()=>{o();fE();PJl=(t,e)=>{let I={type:"integer",format:"unix-time"};if(e.target==="openApi3")return I;for(let l of t.checks)switch(l.kind){case"min":Kl(I,"minimum",l.value,l.message,e);break;case"max":Kl(I,"maximum",l.value,l.message,e);break}return I}});function dDt(t,e){return{...RI(t.innerType._def,e),default:t.defaultValue()}}var aTe=g(()=>{o();ys()});function uDt(t,e,I){return e.effectStrategy==="input"?RI(t.schema._def,e,I):{}}var cTe=g(()=>{o();ys()});function bDt(t){return{type:"string",enum:[...t.values]}}var rTe=g(()=>{o()});function mDt(t,e){let I=[RI(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),RI(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(a=>!!a),l=e.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0,n=[];return I.forEach(a=>{if($Jl(a))n.push(...a.allOf),a.unevaluatedProperties===void 0&&(l=void 0);else{let c=a;if("additionalProperties"in a&&a.additionalProperties===!1){let{additionalProperties:r,...s}=a;c=s}else l=void 0;n.push(c)}}),n.length?{allOf:n,...l}:void 0}var $Jl,sTe=g(()=>{o();ys();$Jl=t=>"type"in t&&t.type==="string"?!1:"allOf"in t});function ZDt(t,e){let I=typeof t.value;return I!=="bigint"&&I!=="number"&&I!=="boolean"&&I!=="string"?{type:Array.isArray(t.value)?"array":"object"}:e.target==="openApi3"?{type:I==="bigint"?"integer":I,enum:[t.value]}:{type:I==="bigint"?"integer":I,const:t.value}}var oTe=g(()=>{o()});function yhe(t,e){let I={type:"string"};function l(n){return e.patternStrategy==="escape"?eCl(n):n}if(t.checks)for(let n of t.checks)switch(n.kind){case"min":Kl(I,"minLength",typeof I.minLength=="number"?Math.max(I.minLength,n.value):n.value,n.message,e);break;case"max":Kl(I,"maxLength",typeof I.maxLength=="number"?Math.min(I.maxLength,n.value):n.value,n.message,e);break;case"email":switch(e.emailStrategy){case"format:email":IA(I,"email",n.message,e);break;case"format:idn-email":IA(I,"idn-email",n.message,e);break;case"pattern:zod":lA(I,_L.email,n.message,e);break}break;case"url":IA(I,"uri",n.message,e);break;case"uuid":IA(I,"uuid",n.message,e);break;case"regex":lA(I,n.regex,n.message,e);break;case"cuid":lA(I,_L.cuid,n.message,e);break;case"cuid2":lA(I,_L.cuid2,n.message,e);break;case"startsWith":lA(I,RegExp(`^${l(n.value)}`),n.message,e);break;case"endsWith":lA(I,RegExp(`${l(n.value)}$`),n.message,e);break;case"datetime":IA(I,"date-time",n.message,e);break;case"date":IA(I,"date",n.message,e);break;case"time":IA(I,"time",n.message,e);break;case"duration":IA(I,"duration",n.message,e);break;case"length":Kl(I,"minLength",typeof I.minLength=="number"?Math.max(I.minLength,n.value):n.value,n.message,e),Kl(I,"maxLength",typeof I.maxLength=="number"?Math.min(I.maxLength,n.value):n.value,n.message,e);break;case"includes":{lA(I,RegExp(l(n.value)),n.message,e);break}case"ip":{n.version!=="v6"&&IA(I,"ipv4",n.message,e),n.version!=="v4"&&IA(I,"ipv6",n.message,e);break}case"emoji":lA(I,_L.emoji,n.message,e);break;case"ulid":{lA(I,_L.ulid,n.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{IA(I,"binary",n.message,e);break}case"contentEncoding:base64":{Kl(I,"contentEncoding","base64",n.message,e);break}case"pattern:zod":{lA(I,_L.base64,n.message,e);break}}break}case"nanoid":lA(I,_L.nanoid,n.message,e);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return I}var iTe,_L,eCl,IA,lA,pDt,whe=g(()=>{o();fE();_L={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(iTe===void 0&&(iTe=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),iTe),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/};eCl=t=>Array.from(t).map(e=>/[a-zA-Z0-9]/.test(e)?e:`\\${e}`).join(""),IA=(t,e,I,l)=>{t.format||t.anyOf?.some(n=>n.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format,...t.errorMessage&&l.errorMessages&&{errorMessage:{format:t.errorMessage.format}}}),delete t.format,t.errorMessage&&(delete t.errorMessage.format,Object.keys(t.errorMessage).length===0&&delete t.errorMessage)),t.anyOf.push({format:e,...I&&l.errorMessages&&{errorMessage:{format:I}}})):Kl(t,"format",e,I,l)},lA=(t,e,I,l)=>{t.pattern||t.allOf?.some(n=>n.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern,...t.errorMessage&&l.errorMessages&&{errorMessage:{pattern:t.errorMessage.pattern}}}),delete t.pattern,t.errorMessage&&(delete t.errorMessage.pattern,Object.keys(t.errorMessage).length===0&&delete t.errorMessage)),t.allOf.push({pattern:pDt(e,l),...I&&l.errorMessages&&{errorMessage:{pattern:I}}})):Kl(t,"pattern",pDt(e,l),I,l)},pDt=(t,e)=>{let I=typeof t=="function"?t():t;if(!e.applyRegexFlags||!I.flags)return I.source;let l={i:I.flags.includes("i"),m:I.flags.includes("m"),s:I.flags.includes("s")},n=l.i?I.source.toLowerCase():I.source,a="",c=!1,r=!1,s=!1;for(let i=0;i({...l,[n]:RI(t.valueType._def,{...e,currentPath:[...e.currentPath,"properties",n]})??{}}),{}),additionalProperties:!1};let I={type:"object",additionalProperties:RI(t.valueType._def,{...e,currentPath:[...e.currentPath,"additionalProperties"]})??{}};if(e.target==="openApi3")return I;if(t.keyType?._def.typeName===Fe.ZodString&&t.keyType._def.checks?.length){let l=Object.entries(yhe(t.keyType._def,e)).reduce((n,[a,c])=>a==="type"?n:{...n,[a]:c},{});return{...I,propertyNames:l}}else if(t.keyType?._def.typeName===Fe.ZodEnum)return{...I,propertyNames:{enum:t.keyType._def.values}};return I}var Qhe=g(()=>{o();Fc();ys();whe()});function hDt(t,e){if(e.mapStrategy==="record")return Hhe(t,e);let I=RI(t.keyType._def,{...e,currentPath:[...e.currentPath,"items","items","0"]})||{},l=RI(t.valueType._def,{...e,currentPath:[...e.currentPath,"items","items","1"]})||{};return{type:"array",maxItems:125,items:{type:"array",items:[I,l],minItems:2,maxItems:2}}}var GTe=g(()=>{o();ys();Qhe()});function WDt(t){let e=t.values,l=Object.keys(t.values).filter(a=>typeof e[e[a]]!="number").map(a=>e[a]),n=Array.from(new Set(l.map(a=>typeof a)));return{type:n.length===1?n[0]==="string"?"string":"number":["string","number"],enum:l}}var dTe=g(()=>{o()});function NDt(){return{not:{}}}var uTe=g(()=>{o()});function VDt(t){return t.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}var bTe=g(()=>{o()});function RDt(t,e){if(e.target==="openApi3")return YDt(t,e);let I=t.options instanceof Map?Array.from(t.options.values()):t.options;if(I.every(l=>l._def.typeName in C7&&(!l._def.checks||!l._def.checks.length))){let l=I.reduce((n,a)=>{let c=C7[a._def.typeName];return c&&!n.includes(c)?[...n,c]:n},[]);return{type:l.length>1?l:l[0]}}else if(I.every(l=>l._def.typeName==="ZodLiteral"&&!l.description)){let l=I.reduce((n,a)=>{let c=typeof a._def.value;switch(c){case"string":case"number":case"boolean":return[...n,c];case"bigint":return[...n,"integer"];case"object":if(a._def.value===null)return[...n,"null"];case"symbol":case"undefined":case"function":default:return n}},[]);if(l.length===I.length){let n=l.filter((a,c,r)=>r.indexOf(a)===c);return{type:n.length>1?n:n[0],enum:I.reduce((a,c)=>a.includes(c._def.value)?a:[...a,c._def.value],[])}}}else if(I.every(l=>l._def.typeName==="ZodEnum"))return{type:"string",enum:I.reduce((l,n)=>[...l,...n._def.values.filter(a=>!l.includes(a))],[])};return YDt(t,e)}var C7,YDt,fhe=g(()=>{o();ys();C7={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};YDt=(t,e)=>{let I=(t.options instanceof Map?Array.from(t.options.values()):t.options).map((l,n)=>RI(l._def,{...e,currentPath:[...e.currentPath,"anyOf",`${n}`]})).filter(l=>!!l&&(!e.strictUnions||typeof l=="object"&&Object.keys(l).length>0));return I.length?{anyOf:I}:void 0}});function ADt(t,e){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(t.innerType._def.typeName)&&(!t.innerType._def.checks||!t.innerType._def.checks.length))return e.target==="openApi3"||e.nullableStrategy==="property"?{type:C7[t.innerType._def.typeName],nullable:!0}:{type:[C7[t.innerType._def.typeName],"null"]};if(e.target==="openApi3"){let l=RI(t.innerType._def,{...e,currentPath:[...e.currentPath]});return l&&"$ref"in l?{allOf:[l],nullable:!0}:l&&{...l,nullable:!0}}let I=RI(t.innerType._def,{...e,currentPath:[...e.currentPath,"anyOf","0"]});return I&&{anyOf:[I,{type:"null"}]}}var mTe=g(()=>{o();ys();fhe()});function FDt(t,e){let I={type:"number"};if(!t.checks)return I;for(let l of t.checks)switch(l.kind){case"int":I.type="integer",DSe(I,"type",l.message,e);break;case"min":e.target==="jsonSchema7"?l.inclusive?Kl(I,"minimum",l.value,l.message,e):Kl(I,"exclusiveMinimum",l.value,l.message,e):(l.inclusive||(I.exclusiveMinimum=!0),Kl(I,"minimum",l.value,l.message,e));break;case"max":e.target==="jsonSchema7"?l.inclusive?Kl(I,"maximum",l.value,l.message,e):Kl(I,"exclusiveMaximum",l.value,l.message,e):(l.inclusive||(I.exclusiveMaximum=!0),Kl(I,"maximum",l.value,l.message,e));break;case"multipleOf":Kl(I,"multipleOf",l.value,l.message,e);break}return I}var ZTe=g(()=>{o();fE()});function tCl(t,e){return e.removeAdditionalStrategy==="strict"?t.catchall._def.typeName==="ZodNever"?t.unknownKeys!=="strict":RI(t.catchall._def,{...e,currentPath:[...e.currentPath,"additionalProperties"]})??!0:t.catchall._def.typeName==="ZodNever"?t.unknownKeys==="passthrough":RI(t.catchall._def,{...e,currentPath:[...e.currentPath,"additionalProperties"]})??!0}function XDt(t,e){let I={type:"object",...Object.entries(t.shape()).reduce((l,[n,a])=>{if(a===void 0||a._def===void 0)return l;let c=[...e.currentPath,"properties",n],r=RI(a._def,{...e,currentPath:c,propertyPath:c});if(r===void 0)return l;if(e.openaiStrictMode&&a.isOptional()&&!a.isNullable()&&typeof a._def?.defaultValue>"u")throw new Error(`Zod field at \`${c.join("/")}\` uses \`.optional()\` without \`.nullable()\` which is not supported by the API. See: https://platform.openai.com/docs/guides/structured-outputs?api-mode=responses#all-fields-must-be-required`);return{properties:{...l.properties,[n]:r},required:a.isOptional()&&!e.openaiStrictMode?l.required:[...l.required,n]}},{properties:{},required:[]}),additionalProperties:tCl(t,e)};return I.required.length||delete I.required,I}var pTe=g(()=>{o();ys()});var gDt,hTe=g(()=>{o();ys();gDt=(t,e)=>{if(e.propertyPath&&e.currentPath.slice(0,e.propertyPath.length).toString()===e.propertyPath.toString())return RI(t.innerType._def,{...e,currentPath:e.currentPath});let I=RI(t.innerType._def,{...e,currentPath:[...e.currentPath,"anyOf","1"]});return I?{anyOf:[{not:{}},I]}:{}}});var vDt,WTe=g(()=>{o();ys();vDt=(t,e)=>{if(e.pipeStrategy==="input")return RI(t.in._def,e);if(e.pipeStrategy==="output")return RI(t.out._def,e);let I=RI(t.in._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),l=RI(t.out._def,{...e,currentPath:[...e.currentPath,"allOf",I?"1":"0"]});return{allOf:[I,l].filter(n=>n!==void 0)}}});function yDt(t,e){return RI(t.type._def,e)}var NTe=g(()=>{o();ys()});function wDt(t,e){let l={type:"array",uniqueItems:!0,items:RI(t.valueType._def,{...e,currentPath:[...e.currentPath,"items"]})};return t.minSize&&Kl(l,"minItems",t.minSize.value,t.minSize.message,e),t.maxSize&&Kl(l,"maxItems",t.maxSize.value,t.maxSize.message,e),l}var VTe=g(()=>{o();fE();ys()});function HDt(t,e){return t.rest?{type:"array",minItems:t.items.length,items:t.items.map((I,l)=>RI(I._def,{...e,currentPath:[...e.currentPath,"items",`${l}`]})).reduce((I,l)=>l===void 0?I:[...I,l],[]),additionalItems:RI(t.rest._def,{...e,currentPath:[...e.currentPath,"additionalItems"]})}:{type:"array",minItems:t.items.length,maxItems:t.items.length,items:t.items.map((I,l)=>RI(I._def,{...e,currentPath:[...e.currentPath,"items",`${l}`]})).reduce((I,l)=>l===void 0?I:[...I,l],[])}}var YTe=g(()=>{o();ys()});function QDt(){return{not:{}}}var RTe=g(()=>{o()});function fDt(){return{}}var ATe=g(()=>{o()});var EDt,FTe=g(()=>{o();ys();EDt=(t,e)=>RI(t.innerType._def,e)});function RI(t,e,I=!1){let l=e.seen.get(t);if(e.override){let c=e.override?.(t,e,l,I);if(c!==IDt)return c}if(l&&!I){let c=ICl(l,e);if(c!==void 0)return"$ref"in c&&e.seenRefs.add(c.$ref),c}let n={def:t,path:e.currentPath,jsonSchema:void 0};e.seen.set(t,n);let a=nCl(t,t.typeName,e,I);return a&&aCl(t,e,a),n.jsonSchema=a,a}var ICl,lCl,nCl,aCl,ys=g(()=>{o();Fc();qSe();PSe();$Se();eTe();tTe();ITe();nTe();aTe();cTe();rTe();sTe();oTe();GTe();dTe();uTe();bTe();mTe();ZTe();pTe();hTe();WTe();NTe();Qhe();VTe();whe();YTe();RTe();fhe();ATe();FTe();vhe();ICl=(t,e)=>{switch(e.$refStrategy){case"root":return{$ref:t.path.join("/")};case"extract-to-root":let I=t.path.slice(e.basePath.length+1).join("_");return I!==e.name&&e.nameStrategy==="duplicate-ref"&&(e.definitions[I]=t.def),{$ref:[...e.basePath,e.definitionPath,I].join("/")};case"relative":return{$ref:lCl(e.currentPath,t.path)};case"none":case"seen":return t.path.lengthe.currentPath[n]===l)?(console.warn(`Recursive reference detected at ${e.currentPath.join("/")}! Defaulting to any`),{}):e.$refStrategy==="seen"?{}:void 0}},lCl=(t,e)=>{let I=0;for(;I{switch(e){case Fe.ZodString:return yhe(t,I);case Fe.ZodNumber:return FDt(t,I);case Fe.ZodObject:return XDt(t,I);case Fe.ZodBigInt:return sDt(t,I);case Fe.ZodBoolean:return oDt();case Fe.ZodDate:return lTe(t,I);case Fe.ZodUndefined:return QDt();case Fe.ZodNull:return VDt(I);case Fe.ZodArray:return rDt(t,I);case Fe.ZodUnion:case Fe.ZodDiscriminatedUnion:return RDt(t,I);case Fe.ZodIntersection:return mDt(t,I);case Fe.ZodTuple:return HDt(t,I);case Fe.ZodRecord:return Hhe(t,I);case Fe.ZodLiteral:return ZDt(t,I);case Fe.ZodEnum:return bDt(t);case Fe.ZodNativeEnum:return WDt(t);case Fe.ZodNullable:return ADt(t,I);case Fe.ZodOptional:return gDt(t,I);case Fe.ZodMap:return hDt(t,I);case Fe.ZodSet:return wDt(t,I);case Fe.ZodLazy:return RI(t.getter()._def,I);case Fe.ZodPromise:return yDt(t,I);case Fe.ZodNaN:case Fe.ZodNever:return NDt();case Fe.ZodEffects:return uDt(t,I,l);case Fe.ZodAny:return cDt();case Fe.ZodUnknown:return fDt();case Fe.ZodDefault:return dDt(t,I);case Fe.ZodBranded:return iDt(t,I);case Fe.ZodReadonly:return EDt(t,I);case Fe.ZodCatch:return GDt(t,I);case Fe.ZodPipeline:return vDt(t,I);case Fe.ZodFunction:case Fe.ZodVoid:case Fe.ZodSymbol:return;default:return(n=>{})(e)}},aCl=(t,e,I)=>(t.description&&(I.description=t.description,e.markdownDescription&&(I.markdownDescription=t.description)),I)});var XTe,gTe=g(()=>{o();ys();KSe();_Se();XTe=(t,e)=>{let I=aDt(e),l=typeof e=="string"?e:e?.nameStrategy==="title"?void 0:e?.name,n=RI(t._def,l===void 0?I:{...I,currentPath:[...I.basePath,I.definitionPath,l]},!1)??{},a=typeof e=="object"&&e.name!==void 0&&e.nameStrategy==="title"?e.name:void 0;a!==void 0&&(n.title=a);let c=(()=>{if(nDt(I.definitions))return;let s={},i=new Set;for(let G=0;G<500;G++){let d=Object.entries(I.definitions).filter(([u])=>!i.has(u));if(d.length===0)break;for(let[u,b]of d)s[u]=RI(J7(b),{...I,currentPath:[...I.basePath,I.definitionPath,u]},!0)??{},i.add(u)}return s})(),r=l===void 0?c?{...n,[I.definitionPath]:c}:n:I.nameStrategy==="duplicate-ref"?{...n,...c||I.seenRefs.size?{[I.definitionPath]:{...c,...I.seenRefs.size?{[l]:n}:void 0}}:void 0}:{$ref:[...I.$refStrategy==="relative"?[]:I.basePath,I.definitionPath,l].join("/"),[I.definitionPath]:{...c,[l]:n}};return I.target==="jsonSchema7"?r.$schema="http://json-schema.org/draft-07/schema#":I.target==="jsonSchema2019-09"&&(r.$schema="https://json-schema.org/draft/2019-09/schema#"),r}});var JDt=g(()=>{o();vhe();KSe();fE();ys();qSe();PSe();$Se();eTe();tTe();ITe();nTe();aTe();cTe();rTe();sTe();oTe();GTe();dTe();uTe();bTe();mTe();ZTe();pTe();hTe();WTe();NTe();FTe();Qhe();VTe();whe();YTe();RTe();fhe();ATe();gTe();gTe()});function CDt(t){if(t.type!=="object")throw new Error(`Root schema must have type: 'object' but got type: ${t.type?`'${t.type}'`:"undefined"}`);let e=structuredClone(t);return ov(e,[],e)}function vTe(t){if(typeof t=="boolean")return!1;if(t.type==="null")return!0;for(let e of t.oneOf??[])if(vTe(e))return!0;for(let e of t.anyOf??[])if(vTe(e))return!0;return!1}function ov(t,e,I){if(typeof t=="boolean")throw new TypeError(`Expected object schema but got boolean; path=${e.join("/")}`);if(!KL(t))throw new TypeError(`Expected ${JSON.stringify(t)} to be an object; path=${e.join("/")}`);let l=t.$defs;if(KL(l))for(let[u,b]of Object.entries(l))ov(b,[...e,"$defs",u],I);let n=t.definitions;if(KL(n))for(let[u,b]of Object.entries(n))ov(b,[...e,"definitions",u],I);t.type==="object"&&!("additionalProperties"in t)&&(t.additionalProperties=!1);let c=t.required??[],r=t.properties;if(KL(r)){for(let[u,b]of Object.entries(r))if(!vTe(b)&&!c.includes(u))throw new Error(`Zod field at \`${[...e,"properties",u].join("/")}\` uses \`.optional()\` without \`.nullable()\` which is not supported by the API. See: https://platform.openai.com/docs/guides/structured-outputs?api-mode=responses#all-fields-must-be-required`);t.required=Object.keys(r),t.properties=Object.fromEntries(Object.entries(r).map(([u,b])=>[u,ov(b,[...e,"properties",u],I)]))}let s=t.items;KL(s)&&(t.items=ov(s,[...e,"items"],I));let i=t.anyOf;Array.isArray(i)&&(t.anyOf=i.map((u,b)=>ov(u,[...e,"anyOf",String(b)],I)));let G=t.allOf;if(Array.isArray(G))if(G.length===1){let u=ov(G[0],[...e,"allOf","0"],I);Object.assign(t,u),delete t.allOf}else t.allOf=G.map((u,b)=>ov(u,[...e,"allOf",String(b)],I));t.default===null&&delete t.default;let d=t.$ref;if(d&&rCl(t,1)){if(typeof d!="string")throw new TypeError(`Received non-string $ref - ${d}; path=${e.join("/")}`);let u=cCl(I,d);if(typeof u=="boolean")throw new Error(`Expected \`$ref: ${d}\` to resolve to an object schema but got boolean`);if(!KL(u))throw new Error(`Expected \`$ref: ${d}\` to resolve to an object but got ${JSON.stringify(u)}`);return Object.assign(t,{...u,...t}),delete t.$ref,ov(t,e,I)}return t}function cCl(t,e){if(!e.startsWith("#/"))throw new Error(`Unexpected $ref format ${JSON.stringify(e)}; Does not start with #/`);let I=e.slice(2).split("/"),l=t;for(let n of I){if(!KL(l))throw new Error(`encountered non-object entry while resolving ${e} - ${JSON.stringify(l)}`);let a=l[n];if(a===void 0)throw new Error(`Key ${n} not found while resolving ${e}`);l=a}return l}function KL(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function rCl(t,e){let I=0;for(let l in t)if(I++,I>e)return!0;return!1}var LDt=g(()=>{o()});function sCl(t,e){return XTe(t,{openaiStrictMode:!0,name:e.name,nameStrategy:"duplicate-ref",$refStrategy:"extract-to-root",nullableStrategy:"property"})}function oCl(t){return CDt(UH(t,{target:"draft-7"}))}function iCl(t){return"_zod"in t}function kDt(t,e,I){return aKt({type:"json_schema",json_schema:{...I,name:e,strict:!0,schema:iCl(t)?oCl(t):sCl(t,{name:e})}},l=>t.parse(JSON.parse(l)))}var xDt=g(()=>{o();sG();Gz();JDt();phe();LDt()});function UDt(t,e){if(typeof e<"u"&&!jDt.includes(e))throw new Error(`Invalid method: ${e}. Supported methods are: ${jDt.join(", ")}`);let I=!t.startsWith("gpt-3")&&!t.startsWith("gpt-4-")&&t!=="gpt-4";if(I&&!e)return"jsonSchema";if(!I&&e==="jsonSchema")throw new Error(`JSON Schema is not supported for model "${t}". Please use a different method, e.g. "functionCalling" or "jsonMode".`);return e??"functionCalling"}function GCl(t,e){let I={...t};return Object.defineProperties(I,{$brand:{value:"auto-parseable-response-format",enumerable:!1},$parseRaw:{value:e,enumerable:!1}}),I}function ODt(t,e,I){if(Yc(t))return kDt(t,e,I);if(mn(t))return GCl({type:"json_schema",json_schema:{...I,name:e,strict:!0,schema:DI(t,{cycles:"ref",reused:"ref",override(l){l.jsonSchema.title=e}})}},l=>zA(t,JSON.parse(l)));throw new Error("Unsupported schema response format")}function zDt(t,e){if(e&&typeof e=="object"&&"images"in e&&Array.isArray(e.images)){let I=e.images.filter(l=>typeof l?.image_url?.url=="string").map(l=>({type:"image",url:l.image_url.url}));return[{type:"text",text:t},...I]}return t}var jDt,yTe=g(()=>{o();Wa();aG();Vi();xDt();jDt=["jsonSchema","functionCalling","jsonMode"]});var BDt,MDt=g(()=>{o();BDt={"gpt-4o-2024-11-20":{maxInputTokens:128e3,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:16384,reasoningOutput:!1,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0,toolChoice:!0},"gpt-5.3-codex":{maxInputTokens:4e5,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:128e3,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0,toolChoice:!0},"gpt-5-codex":{maxInputTokens:4e5,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:128e3,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0,toolChoice:!0},"gpt-5-pro":{maxInputTokens:4e5,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:272e3,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0,toolChoice:!0},"gpt-4o-mini":{maxInputTokens:128e3,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:16384,reasoningOutput:!1,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0,toolChoice:!0},"text-embedding-ada-002":{maxInputTokens:8192,imageInputs:!1,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:1536,reasoningOutput:!1,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!1,structuredOutput:!0,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0,toolChoice:!0},"gpt-5-chat-latest":{maxInputTokens:4e5,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:128e3,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!1,structuredOutput:!0,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0,toolChoice:!0},"codex-mini-latest":{maxInputTokens:2e5,imageInputs:!1,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:1e5,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0,toolChoice:!0},"gpt-5.1-codex-max":{maxInputTokens:4e5,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:128e3,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0,toolChoice:!0},"gpt-4o-2024-05-13":{maxInputTokens:128e3,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:4096,reasoningOutput:!1,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0,toolChoice:!0},"gpt-5.2-chat-latest":{maxInputTokens:128e3,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:16384,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0,toolChoice:!0},"gpt-5.2-codex":{maxInputTokens:4e5,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:128e3,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0,toolChoice:!0},"o3-deep-research":{maxInputTokens:2e5,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:1e5,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0,toolChoice:!0},o1:{maxInputTokens:2e5,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:1e5,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0,toolChoice:!0},"gpt-5.1":{maxInputTokens:4e5,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:128e3,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0,toolChoice:!0},"o4-mini-deep-research":{maxInputTokens:2e5,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:1e5,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0,toolChoice:!0},"gpt-5.3-codex-spark":{maxInputTokens:128e3,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:32e3,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0,toolChoice:!0},o3:{maxInputTokens:2e5,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:1e5,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0,toolChoice:!0},"text-embedding-3-small":{maxInputTokens:8191,imageInputs:!1,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:1536,reasoningOutput:!1,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!1,structuredOutput:!0,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0,toolChoice:!0},"gpt-4.1-nano":{maxInputTokens:1047576,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:32768,reasoningOutput:!1,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0,toolChoice:!0},"text-embedding-3-large":{maxInputTokens:8191,imageInputs:!1,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:3072,reasoningOutput:!1,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!1,structuredOutput:!0,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0,toolChoice:!0},"gpt-3.5-turbo":{maxInputTokens:16385,imageInputs:!1,audioInputs:!1,pdfInputs:!1,videoInputs:!1,maxOutputTokens:4096,reasoningOutput:!1,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!1,structuredOutput:!1,imageUrlInputs:!1,pdfToolMessage:!1,imageToolMessage:!1,toolChoice:!0},"gpt-5.1-codex-mini":{maxInputTokens:4e5,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:128e3,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0,toolChoice:!0},"gpt-5.2":{maxInputTokens:4e5,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:128e3,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0,toolChoice:!0},"gpt-4.1":{maxInputTokens:1047576,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:32768,reasoningOutput:!1,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0,toolChoice:!0},"o3-pro":{maxInputTokens:2e5,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:1e5,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0,toolChoice:!0},"gpt-4-turbo":{maxInputTokens:128e3,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:4096,reasoningOutput:!1,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0,toolChoice:!0},"gpt-5":{maxInputTokens:4e5,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:128e3,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0,toolChoice:!0},"o4-mini":{maxInputTokens:2e5,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:1e5,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0,toolChoice:!0},"gpt-4.1-mini":{maxInputTokens:1047576,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:32768,reasoningOutput:!1,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0,toolChoice:!0},"gpt-5.4":{maxInputTokens:105e4,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:128e3,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0,toolChoice:!0},"o1-preview":{maxInputTokens:128e3,imageInputs:!1,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:32768,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!1,structuredOutput:!0,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0,toolChoice:!0},"gpt-5.4-pro":{maxInputTokens:105e4,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:128e3,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0,toolChoice:!0},"gpt-5.5":{maxInputTokens:105e4,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:13e4,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0,toolChoice:!0},"gpt-5.5-pro":{maxInputTokens:105e4,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:128e3,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0,toolChoice:!0},"o1-pro":{maxInputTokens:2e5,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:1e5,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0,toolChoice:!0},"gpt-5.1-codex":{maxInputTokens:4e5,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:128e3,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0,toolChoice:!0},"gpt-5.2-pro":{maxInputTokens:4e5,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:128e3,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0,toolChoice:!0},"o3-mini":{maxInputTokens:2e5,imageInputs:!1,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:1e5,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0,toolChoice:!0},"gpt-4o-2024-08-06":{maxInputTokens:128e3,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:16384,reasoningOutput:!1,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0,toolChoice:!0},"gpt-5-mini":{maxInputTokens:4e5,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:128e3,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0,toolChoice:!0},"gpt-5.1-chat-latest":{maxInputTokens:128e3,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:16384,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0,toolChoice:!0},"gpt-4":{maxInputTokens:8192,imageInputs:!1,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:8192,reasoningOutput:!1,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0,toolChoice:!0},"gpt-5-nano":{maxInputTokens:4e5,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:128e3,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0,toolChoice:!0},"o1-mini":{maxInputTokens:128e3,imageInputs:!1,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:65536,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!1,structuredOutput:!0,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0,toolChoice:!0},"gpt-4o":{maxInputTokens:128e3,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:16384,reasoningOutput:!1,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0,toolChoice:!0}}});function Kz(t,e){return typeof t=="string"?{model:t,...e??{}}:t??e}var EE,L7=g(()=>{o();wE();_z();HE();QE();yTe();MDt();V2();uF();Wa();aG();ca();l0();sZ();Xc();m3();wp();tQ();EE=class extends yr{temperature;topP;frequencyPenalty;presencePenalty;n;logitBias;model="gpt-3.5-turbo";modelKwargs;stop;stopSequences;user;timeout;streaming=!1;streamUsage=!0;maxTokens;logprobs;topLogprobs;apiKey;organization;__includeRawResponse;client;clientConfig;supportsStrictToolCalling;audio;modalities;reasoning;zdrEnabled;service_tier;promptCacheKey;promptCacheRetention;verbosity;defaultOptions;_llmType(){return"openai"}static lc_name(){return"ChatOpenAI"}get callKeys(){return[...super.callKeys,"options","function_call","functions","tools","tool_choice","promptIndex","response_format","seed","reasoning","reasoning_effort","service_tier"]}lc_serializable=!0;get lc_secrets(){return{apiKey:"OPENAI_API_KEY",organization:"OPENAI_ORGANIZATION"}}get lc_aliases(){return{apiKey:"openai_api_key",modelName:"model"}}get lc_serializable_keys(){return["configuration","logprobs","topLogprobs","prefixMessages","supportsStrictToolCalling","modalities","audio","temperature","maxTokens","topP","frequencyPenalty","presencePenalty","n","logitBias","user","streaming","streamUsage","model","modelName","modelKwargs","stop","stopSequences","timeout","apiKey","cache","maxConcurrency","maxRetries","verbose","callbacks","tags","metadata","disableStreaming","zdrEnabled","reasoning","promptCacheKey","promptCacheRetention","verbosity"]}getLsParams(t){let e=this.invocationParams(t);return{ls_provider:"openai",ls_model_name:this.model,ls_model_type:"chat",ls_temperature:e.temperature??void 0,ls_max_tokens:e.max_tokens??void 0,ls_stop:t.stop}}_identifyingParams(){return{model_name:this.model,...this.invocationParams(),...this.clientConfig}}identifyingParams(){return this._identifyingParams()}constructor(t){super(t??{});let e=typeof t?.configuration?.apiKey=="string"||typeof t?.configuration?.apiKey=="function"?t?.configuration?.apiKey:void 0;this.apiKey=t?.apiKey??e??gt("OPENAI_API_KEY"),this.organization=t?.configuration?.organization??gt("OPENAI_ORGANIZATION"),this.model=t?.model??t?.modelName??this.model,this.modelKwargs=t?.modelKwargs??{},this.timeout=t?.timeout,this.temperature=t?.temperature??this.temperature,this.topP=t?.topP??this.topP,this.frequencyPenalty=t?.frequencyPenalty??this.frequencyPenalty,this.presencePenalty=t?.presencePenalty??this.presencePenalty,this.logprobs=t?.logprobs,this.topLogprobs=t?.topLogprobs,this.n=t?.n??this.n,this.logitBias=t?.logitBias,this.stop=t?.stopSequences??t?.stop,this.stopSequences=this.stop,this.user=t?.user,this.__includeRawResponse=t?.__includeRawResponse,this.audio=t?.audio,this.modalities=t?.modalities,this.reasoning=t?.reasoning,this.maxTokens=t?.maxCompletionTokens??t?.maxTokens,this.promptCacheKey=t?.promptCacheKey??this.promptCacheKey,this.promptCacheRetention=t?.promptCacheRetention??this.promptCacheRetention,this.verbosity=t?.verbosity??this.verbosity,this.disableStreaming=t?.disableStreaming===!0,this.streaming=t?.streaming===!0,this.disableStreaming&&(this.streaming=!1),t?.streaming===!1&&(this.disableStreaming=!0),this.streamUsage=t?.streamUsage??this.streamUsage,this.disableStreaming&&(this.streamUsage=!1),this.clientConfig={apiKey:this.apiKey,organization:this.organization,dangerouslyAllowBrowser:!0,...t?.configuration},t?.supportsStrictToolCalling!==void 0&&(this.supportsStrictToolCalling=t.supportsStrictToolCalling),t?.service_tier!==void 0&&(this.service_tier=t.service_tier),this.zdrEnabled=t?.zdrEnabled??!1,this._addVersion("@langchain/openai","1.4.5")}_getReasoningParams(t){if(!sv(this.model))return;let e;return this.reasoning!==void 0&&(e={...e,...this.reasoning}),t?.reasoning!==void 0&&(e={...e,...t.reasoning}),t?.reasoningEffort!==void 0&&e?.effort===void 0&&(e={...e,effort:t.reasoningEffort}),e}_getResponseFormat(t){return t&&t.type==="json_schema"&&t.json_schema.schema&&Vl(t.json_schema.schema)?ODt(t.json_schema.schema,t.json_schema.name,{description:t.json_schema.description}):t}_combineCallOptions(t){return{...this.defaultOptions,...t??{}}}_getClientOptions(t){if(!this.client){let e=hm({baseURL:this.clientConfig.baseURL}),I={...this.clientConfig,baseURL:e,timeout:this.timeout,maxRetries:0};I.baseURL||delete I.baseURL,I.defaultHeaders=Wm(I.defaultHeaders),this.client=new oI(I)}return{...this.clientConfig,...t}}_convertChatOpenAIToolToCompletionsTool(t,e){return TL(t)?eDt(t.metadata.customTool):$R(t)?e?.strict!==void 0?{...t,function:{...t.function,strict:e.strict}}:t:BKt(t,e)}bindTools(t,e){let I;return e?.strict!==void 0?I=e.strict:this.supportsStrictToolCalling!==void 0&&(I=this.supportsStrictToolCalling),this.withConfig({tools:t.map(l=>{if(Tz(l)||TL(l))return l;if(TKt(l))return l.extras.providerToolDefinition;let n=this._convertChatOpenAIToolToCompletionsTool(l,{strict:I});return Ws(l)&&l.extras?.defer_loading===!0?{...n,defer_loading:!0}:n}),...e})}async stream(t,e){return super.stream(t,this._combineCallOptions(e))}async invoke(t,e){return super.invoke(t,this._combineCallOptions(e))}_combineLLMOutput(...t){return t.reduce((e,I)=>(I&&I.tokenUsage&&(e.tokenUsage.completionTokens+=I.tokenUsage.completionTokens??0,e.tokenUsage.promptTokens+=I.tokenUsage.promptTokens??0,e.tokenUsage.totalTokens+=I.tokenUsage.totalTokens??0),e),{tokenUsage:{completionTokens:0,promptTokens:0,totalTokens:0}})}async getNumTokensFromMessages(t){let e=0,I=0,l=0;this.model==="gpt-3.5-turbo-0301"?(I=4,l=-1):(I=3,l=1);let n=await Promise.all(t.map(async a=>{let[c,r]=await Promise.all([this.getNumTokens(a.content),this.getNumTokens(Y2(a))]),s=a.name!==void 0?l+await this.getNumTokens(a.name):0,i=c+I+r+s,G=a;if(G._getType()==="function"&&(i-=2),G.additional_kwargs?.function_call&&(i+=3),G?.additional_kwargs.function_call?.name&&(i+=await this.getNumTokens(G.additional_kwargs.function_call?.name)),G.additional_kwargs.function_call?.arguments)try{i+=await this.getNumTokens(JSON.stringify(JSON.parse(G.additional_kwargs.function_call?.arguments)))}catch(d){console.error("Error parsing function arguments",d,JSON.stringify(G.additional_kwargs.function_call)),i+=await this.getNumTokens(G.additional_kwargs.function_call?.arguments)}return e+=i,i}));return e+=3,{totalCount:e,countPerMessage:n}}async _getNumTokensFromGenerations(t){return(await Promise.all(t.map(async e=>e.message.additional_kwargs?.function_call?(await this.getNumTokensFromMessages([e.message])).countPerMessage[0]:await this.getNumTokens(e.message.content)))).reduce((e,I)=>e+I,0)}async _getEstimatedTokenCountFromPrompt(t,e,I){let l=(await this.getNumTokensFromMessages(t)).totalCount;if(e&&I!=="auto"){let n=MKt(e);l+=await this.getNumTokens(n),l+=9}return e&&t.find(n=>n._getType()==="system")&&(l-=4),I==="none"?l+=1:typeof I=="object"&&(l+=await this.getNumTokens(I.name)+4),l}async moderateContent(t,e){let I=this._getClientOptions(e?.options),l={input:t,model:e?.model??"omni-moderation-latest"};return this.caller.call(async()=>{try{return await this.client.moderations.create(l,I)}catch(n){throw pm(n)}})}get profile(){return BDt[this.model]??{}}_getStructuredOutputMethod(t){let e={...t};if(!this.model.startsWith("gpt-3")&&!this.model.startsWith("gpt-4-")&&this.model!=="gpt-4"){if(e?.method===void 0)return"jsonSchema"}else e.method==="jsonSchema"&&console.warn(`[WARNING]: JSON Schema is not supported for model "${this.model}". Falling back to tool calling.`);return e.method}withStructuredOutput(t,e){let I,l,{schema:n,name:a,includeRaw:c}={...e,schema:t};if(e?.strict!==void 0&&e.method==="jsonMode")throw new Error("Argument `strict` is only supported for `method` = 'function_calling'");let r=UDt(this.model,e?.method);if(r==="jsonMode"){l=Ep(n);let s=DI(n);I=this.withConfig({outputVersion:"v0",response_format:{type:"json_object"},ls_structured_output_format:{kwargs:{method:"json_mode"},schema:{title:a??"extract",...s}}})}else if(r==="jsonSchema"){let s=DI(n),i={name:a??"extract",description:lZ(s),schema:Vl(n)?n:s,strict:e?.strict};if(I=this.withConfig({outputVersion:"v0",response_format:{type:"json_schema",json_schema:i},ls_structured_output_format:{kwargs:{method:"json_schema"},schema:{title:i.name,description:i.description,...s}}}),Vl(n)||jn(n)){let G=Ep(n);l=sr.from(async d=>"parsed"in d.additional_kwargs?d.additional_kwargs.parsed:G.invoke(d.content))}else l=new d3}else{let s=a??"extract",i=DI(n),G;Vl(n)||jn(n)?G={name:s,description:i.description,parameters:i}:typeof n.name=="string"&&typeof n.parameters=="object"&&n.parameters!=null?(G=n,s=n.name):(s=n.title??s,G={name:s,description:n.description??"",parameters:n}),I=this.withConfig({outputVersion:"v0",tools:[{type:"function",function:G}],tool_choice:{type:"function",function:{name:s}},ls_structured_output_format:{kwargs:{method:"function_calling"},schema:{title:s,...i}},...e?.strict!==void 0?{strict:e.strict}:{}}),l=I0(n,s)}return oZ(I,l,c)}}});var k7,Ehe,Jhe,wTe,HTe,DL,Dz=g(()=>{o();HE();yTe();NI();bK();k7={providerName:"ChatOpenAI",fromStandardTextBlock(t){return{type:"text",text:t.text}},fromStandardImageBlock(t){if(t.source_type==="url")return{type:"image_url",image_url:{url:t.url,...t.metadata?.detail?{detail:t.metadata.detail}:{}}};if(t.source_type==="base64")return{type:"image_url",image_url:{url:`data:${t.mime_type??""};base64,${t.data}`,...t.metadata?.detail?{detail:t.metadata.detail}:{}}};throw new Error(`Image content blocks with source_type ${t.source_type} are not supported for ChatOpenAI`)},fromStandardAudioBlock(t){if(t.source_type==="url"){let e=ui({dataUrl:t.url});if(!e)throw new Error(`URL audio blocks with source_type ${t.source_type} must be formatted as a data URL for ChatOpenAI`);let I=e.mime_type||t.mime_type||"",l;try{l=SS(I)}catch{throw new Error(`Audio blocks with source_type ${t.source_type} must have mime type of audio/wav or audio/mp3`)}if(l.type!=="audio"||l.subtype!=="wav"&&l.subtype!=="mp3")throw new Error(`Audio blocks with source_type ${t.source_type} must have mime type of audio/wav or audio/mp3`);return{type:"input_audio",input_audio:{format:l.subtype,data:e.data}}}if(t.source_type==="base64"){let e;try{e=SS(t.mime_type??"")}catch{throw new Error(`Audio blocks with source_type ${t.source_type} must have mime type of audio/wav or audio/mp3`)}if(e.type!=="audio"||e.subtype!=="wav"&&e.subtype!=="mp3")throw new Error(`Audio blocks with source_type ${t.source_type} must have mime type of audio/wav or audio/mp3`);return{type:"input_audio",input_audio:{format:e.subtype,data:t.data}}}throw new Error(`Audio content blocks with source_type ${t.source_type} are not supported for ChatOpenAI`)},fromStandardFileBlock(t){if(t.source_type==="url"){let e=ui({dataUrl:t.url}),I=Sz(t);if(!e)throw new Error(`URL file blocks with source_type ${t.source_type} must be formatted as a data URL for ChatOpenAI`);return{type:"file",file:{file_data:t.url,filename:I}}}if(t.source_type==="base64"){let e=Sz(t);return{type:"file",file:{file_data:`data:${t.mime_type??""};base64,${t.data}`,filename:e}}}if(t.source_type==="id")return{type:"file",file:{file_id:t.id}};throw new Error(`File content blocks with source_type ${t.source_type} are not supported for ChatOpenAI`)}},Ehe=({message:t,rawResponse:e,includeRawResponse:I})=>{let l=t.tool_calls,n=t.reasoning_content;switch(t.role){case"assistant":{let a=[],c=[];for(let i of l??[])try{a.push(OX(i,{returnId:!0}))}catch(G){c.push(nF(i,G.message))}let r={function_call:t.function_call,tool_calls:l};I!==void 0&&(r.__raw_response=e),n!==void 0&&(r.reasoning_content=n);let s={model_provider:"openai",model_name:e.model,...e.system_fingerprint?{usage:{...e.usage},system_fingerprint:e.system_fingerprint}:{}};return t.audio&&(r.audio=t.audio),new He({content:zDt(t.content||"",e.choices?.[0]?.message),tool_calls:a,invalid_tool_calls:c,additional_kwargs:r,response_metadata:s,id:e.id})}default:return new Bs(t.content||"",t.role??"unknown")}},Jhe=({delta:t,rawResponse:e,includeRawResponse:I,defaultRole:l})=>{let n=t.role??l,a=t.content??"",c;t.function_call?c={function_call:t.function_call}:t.tool_calls?c={tool_calls:t.tool_calls}:c={},I&&(c.__raw_response=e),t.reasoning_content!==void 0&&(c.reasoning_content=t.reasoning_content),t.audio&&(c.audio={...t.audio,index:e.choices[0].index});let r={model_provider:"openai",usage:{...e.usage}};if(n==="user")return new No({content:a,response_metadata:r});if(n==="assistant"){let s=[];if(Array.isArray(t.tool_calls))for(let i of t.tool_calls)s.push({name:i.function?.name,args:i.function?.arguments,id:i.id,index:i.index,type:"tool_call_chunk"});return new eI({content:a,tool_call_chunks:s,additional_kwargs:c,id:e.id,response_metadata:r})}else return n==="system"?new Ms({content:a,response_metadata:r}):n==="developer"?new Ms({content:a,response_metadata:r,additional_kwargs:{__openai_role__:"developer"}}):n==="function"?new Dm({content:a,additional_kwargs:c,name:t.name,response_metadata:r}):n==="tool"?new bi({content:a,additional_kwargs:c,tool_call_id:t.tool_call_id,response_metadata:r}):new Km({content:a,role:n,response_metadata:r})},wTe=t=>{if(t.type==="image"){if(t.url)return{type:"image_url",image_url:{url:t.url}};if(t.data)return{type:"image_url",image_url:{url:`data:${t.mimeType};base64,${t.data}`}}}if(t.type==="audio"&&t.data){let e=jle(()=>{let[,I]=t.mimeType.split("/");return I==="wav"||I==="mp3"?I:"wav"});return{type:"input_audio",input_audio:{data:t.data.toString(),format:e}}}if(t.type==="file"){if(t.data){let e=Sz(t);return{type:"file",file:{file_data:`data:${t.mimeType};base64,${t.data}`,filename:e}}}if(t.fileId)return{type:"file",file:{file_id:t.fileId}}}},HTe=({message:t,model:e})=>{let I=Y2(t);if(I==="system"&&sv(e)&&(I="developer"),I==="developer")return{role:"developer",content:t.contentBlocks.filter(n=>n.type==="text")};if(I==="system")return{role:"system",content:t.contentBlocks.filter(n=>n.type==="text")};if(I==="assistant")return{role:"assistant",content:t.contentBlocks.filter(n=>n.type==="text")};if(I==="tool"&&pt.isInstance(t))return{role:"tool",tool_call_id:t.tool_call_id,content:t.contentBlocks.filter(n=>n.type==="text")};if(I==="function")return{role:"function",name:t.name??"",content:t.contentBlocks.filter(n=>n.type==="text").join("")};function*l(n){for(let a of n){a.type==="text"&&(yield{type:"text",text:a.text});let c=wTe(a);c&&(yield c)}}return{role:"user",content:Array.from(l(t.contentBlocks))}},DL=({messages:t,model:e})=>t.flatMap(I=>{if("output_version"in I.response_metadata&&I.response_metadata?.output_version==="v1")return HTe({message:I});let l=Y2(I);l==="system"&&sv(e)&&(l="developer");let n=typeof I.content=="string"?I.content:I.content.flatMap(c=>ho(c)?QA(c,k7):typeof c=="object"&&c!==null&&"type"in c&&c.type==="tool_use"?[]:c),a={role:l,content:n};return I.name!=null&&(a.name=I.name),I.additional_kwargs.function_call!=null&&(a.function_call=I.additional_kwargs.function_call),He.isInstance(I)&&I.tool_calls?.length?a.tool_calls=I.tool_calls.map(Z3):(I.additional_kwargs.tool_calls!=null&&(a.tool_calls=I.additional_kwargs.tool_calls),pt.isInstance(I)&&I.tool_call_id!=null&&(a.tool_call_id=I.tool_call_id)),I.additional_kwargs.audio&&typeof I.additional_kwargs.audio=="object"&&"id"in I.additional_kwargs.audio?[a,{role:"assistant",audio:{id:I.additional_kwargs.audio.id}}]:a})});var qz,Che=g(()=>{o();wE();_z();HE();L7();Dz();NI();Yo();qz=class extends EE{constructor(t,e){super(Kz(t,e))}invocationParams(t,e){let I;t?.strict!==void 0?I=t.strict:this.supportsStrictToolCalling!==void 0&&(I=this.supportsStrictToolCalling);let l={};t?.stream_options!==void 0?l={stream_options:t.stream_options}:this.streamUsage&&(this.streaming||e?.streaming)&&(l={stream_options:{include_usage:!0}});let n={model:this.model,temperature:this.temperature,top_p:this.topP,frequency_penalty:this.frequencyPenalty,presence_penalty:this.presencePenalty,logprobs:this.logprobs,top_logprobs:this.topLogprobs,n:this.n,logit_bias:this.logitBias,stop:t?.stop??this.stopSequences,user:this.user,stream:this.streaming,functions:t?.functions,function_call:t?.function_call,tools:t?.tools?.length?t.tools.map(c=>this._convertChatOpenAIToolToCompletionsTool(c,{strict:I})):void 0,tool_choice:Xhe(t?.tool_choice),response_format:this._getResponseFormat(t?.response_format),seed:t?.seed,...l,parallel_tool_calls:t?.parallel_tool_calls,...this.audio||t?.audio?{audio:this.audio||t?.audio}:{},...this.modalities||t?.modalities?{modalities:this.modalities||t?.modalities}:{},...this.modelKwargs,prompt_cache_key:t?.promptCacheKey??this.promptCacheKey,prompt_cache_retention:t?.promptCacheRetention??this.promptCacheRetention,verbosity:t?.verbosity??this.verbosity};t?.prediction!==void 0&&(n.prediction=t.prediction),this.service_tier!==void 0&&(n.service_tier=this.service_tier),t?.service_tier!==void 0&&(n.service_tier=t.service_tier);let a=this._getReasoningParams(t);return a!==void 0&&a.effort!==void 0&&(n.reasoning_effort=a.effort),sv(n.model)?n.max_completion_tokens=this.maxTokens===-1?void 0:this.maxTokens:n.max_tokens=this.maxTokens===-1?void 0:this.maxTokens,n}async _generate(t,e,I){e.signal?.throwIfAborted();let l={},n=this.invocationParams(e),a=DL({messages:t,model:this.model});if(n.stream){let c=this._streamResponseChunks(t,e,I),r={};for await(let b of c){b.message.response_metadata={...b.generationInfo,...b.message.response_metadata};let Z=b.generationInfo?.completion??0;r[Z]===void 0?r[Z]=b:r[Z]=r[Z].concat(b)}let s=Object.entries(r).sort(([b],[Z])=>parseInt(b,10)-parseInt(Z,10)).map(([b,Z])=>Z),{functions:i,function_call:G}=this.invocationParams(e),d=await this._getEstimatedTokenCountFromPrompt(t,i,G),u=await this._getNumTokensFromGenerations(s);return l.input_tokens=d,l.output_tokens=u,l.total_tokens=d+u,{generations:s,llmOutput:{estimatedTokenUsage:{promptTokens:l.input_tokens,completionTokens:l.output_tokens,totalTokens:l.total_tokens}}}}else{let c=await this.completionWithRetry({...n,stream:!1,messages:a},{signal:e?.signal,...e?.options}),{completion_tokens:r,prompt_tokens:s,total_tokens:i,prompt_tokens_details:G,completion_tokens_details:d}=c?.usage??{};r&&(l.output_tokens=(l.output_tokens??0)+r),s&&(l.input_tokens=(l.input_tokens??0)+s),i&&(l.total_tokens=(l.total_tokens??0)+i),(G?.audio_tokens!==null||G?.cached_tokens!==null)&&(l.input_token_details={...G?.audio_tokens!==null&&{audio:G?.audio_tokens},...G?.cached_tokens!==null&&{cache_read:G?.cached_tokens}}),(d?.audio_tokens!==null||d?.reasoning_tokens!==null)&&(l.output_token_details={...d?.audio_tokens!==null&&{audio:d?.audio_tokens},...d?.reasoning_tokens!==null&&{reasoning:d?.reasoning_tokens}});let u=[];for(let b of c?.choices??[]){let Z={text:b.message?.content??"",message:this._convertCompletionsMessageToBaseMessage(b.message??{role:"assistant"},c)};Z.generationInfo={...b.finish_reason?{finish_reason:b.finish_reason}:{},...b.logprobs?{logprobs:b.logprobs}:{}},jR(Z.message)&&(Z.message.usage_metadata=l),Z.message=new He(Object.fromEntries(Object.entries(Z.message).filter(([p])=>!p.startsWith("lc_")))),u.push(Z)}return{generations:u,llmOutput:{tokenUsage:{promptTokens:l.input_tokens,completionTokens:l.output_tokens,totalTokens:l.total_tokens}}}}}async*_streamResponseChunks(t,e,I){let l=DL({messages:t,model:this.model}),n={...this.invocationParams(e,{streaming:!0}),messages:l,stream:!0},a,c=await this.completionWithRetry(n,e),r;for await(let s of c){if(e.signal?.aborted)return;let i=s?.choices?.[0];if(s.usage&&(r=s.usage),!i)continue;let{delta:G}=i;if(!G)continue;let d=this._convertCompletionsDeltaToBaseMessageChunk(G,s,a);a=G.role??a;let u={prompt:e.promptIndex??0,completion:i.index??0};if(typeof d.content!="string"){console.log("[WARNING]: Received non-string content from OpenAI. This is currently not supported.");continue}let b={...u};i.finish_reason!=null&&(b.finish_reason=i.finish_reason,b.system_fingerprint=s.system_fingerprint,b.model_name=s.model,b.service_tier=s.service_tier),this.logprobs&&(b.logprobs=i.logprobs);let Z=new Nc({message:d,text:d.content,generationInfo:b});yield Z,await I?.handleLLMNewToken(Z.text??"",u,void 0,void 0,void 0,{chunk:Z})}if(r){let s={...r.prompt_tokens_details?.audio_tokens!==null&&{audio:r.prompt_tokens_details?.audio_tokens},...r.prompt_tokens_details?.cached_tokens!==null&&{cache_read:r.prompt_tokens_details?.cached_tokens}},i={...r.completion_tokens_details?.audio_tokens!==null&&{audio:r.completion_tokens_details?.audio_tokens},...r.completion_tokens_details?.reasoning_tokens!==null&&{reasoning:r.completion_tokens_details?.reasoning_tokens}},G=new Nc({message:new eI({content:"",response_metadata:{usage:{...r}},usage_metadata:{input_tokens:r.prompt_tokens,output_tokens:r.completion_tokens,total_tokens:r.total_tokens,...Object.keys(s).length>0&&{input_token_details:s},...Object.keys(i).length>0&&{output_token_details:i}}}),text:""});yield G,await I?.handleLLMNewToken(G.text??"",{prompt:0,completion:0},void 0,void 0,void 0,{chunk:G})}if(e.signal?.aborted)throw new Error("AbortError")}async completionWithRetry(t,e){let I=this._getClientOptions(e),l=t.response_format&&t.response_format.type==="json_schema";return this.caller.call(async()=>{try{return l&&!t.stream?await this.client.chat.completions.parse(t,I):await this.client.chat.completions.create(t,I)}catch(n){throw pm(n)}})}_convertCompletionsDeltaToBaseMessageChunk(t,e,I){return Jhe({delta:t,rawResponse:e,includeRawResponse:this.__includeRawResponse,defaultRole:I})}_convertCompletionsMessageToBaseMessage(t,e){return Ehe({message:t,rawResponse:e,includeRawResponse:this.__includeRawResponse})}}});function tB(t,e){return typeof t=="string"?{model:t,deploymentName:t,azureOpenAIApiDeploymentName:t,...e??{}}:t??e}function IB(t){if(this.azureOpenAIApiKey=t?.azureOpenAIApiKey??(typeof t?.openAIApiKey=="string"?t?.openAIApiKey:void 0)??(typeof t?.apiKey=="string"?t?.apiKey:void 0)??gt("AZURE_OPENAI_API_KEY"),this.azureOpenAIApiInstanceName=t?.azureOpenAIApiInstanceName??gt("AZURE_OPENAI_API_INSTANCE_NAME"),this.azureOpenAIApiDeploymentName=t?.azureOpenAIApiDeploymentName??t?.deploymentName??gt("AZURE_OPENAI_API_DEPLOYMENT_NAME"),this.azureOpenAIApiVersion=t?.azureOpenAIApiVersion??t?.openAIApiVersion??gt("AZURE_OPENAI_API_VERSION"),this.azureOpenAIBasePath=t?.azureOpenAIBasePath??gt("AZURE_OPENAI_BASE_PATH"),this.azureOpenAIEndpoint=t?.azureOpenAIEndpoint??gt("AZURE_OPENAI_ENDPOINT"),this.azureADTokenProvider=t?.azureADTokenProvider,!this.azureOpenAIApiKey&&!this.apiKey&&!this.azureADTokenProvider)throw new Error("Azure OpenAI API key or Token Provider not found")}function Lhe(t){if(!this.client){let I={azureOpenAIApiDeploymentName:this.azureOpenAIApiDeploymentName,azureOpenAIApiInstanceName:this.azureOpenAIApiInstanceName,azureOpenAIApiKey:this.azureOpenAIApiKey,azureOpenAIBasePath:this.azureOpenAIBasePath,azureADTokenProvider:this.azureADTokenProvider,baseURL:this.clientConfig.baseURL,azureOpenAIEndpoint:this.azureOpenAIEndpoint},l=hm(I),{apiKey:n,...a}=this.clientConfig,c={...a,baseURL:l,timeout:this.timeout,maxRetries:0};this.azureADTokenProvider||(c.apiKey=I.azureOpenAIApiKey),c.baseURL||delete c.baseURL,c.defaultHeaders=Wm(c.defaultHeaders,!0,"2.0.0"),this.client=new rv({apiVersion:this.azureOpenAIApiVersion,azureADTokenProvider:this.azureADTokenProvider,deployment:this.azureOpenAIApiDeploymentName,...c})}let e={...this.clientConfig,...t};return this.azureOpenAIApiKey&&(e.headers={"api-key":this.azureOpenAIApiKey,...e.headers},e.query={"api-version":this.azureOpenAIApiVersion,...e.query}),e}function lB(t){let e=t;function I(l){return typeof l=="object"&&l!=null}if(I(e)&&I(e.kwargs)){if(delete e.kwargs.azure_openai_base_path,delete e.kwargs.azure_openai_api_deployment_name,delete e.kwargs.azure_openai_api_key,delete e.kwargs.azure_openai_api_version,delete e.kwargs.azure_open_ai_base_path,!e.kwargs.azure_endpoint&&this.azureOpenAIEndpoint&&(e.kwargs.azure_endpoint=this.azureOpenAIEndpoint),!e.kwargs.azure_endpoint&&this.azureOpenAIBasePath){let l=this.azureOpenAIBasePath.split("/openai/deployments/");if(l.length===2&&l[0].startsWith("http")){let[n]=l;e.kwargs.azure_endpoint=n}}if(!e.kwargs.azure_endpoint&&this.azureOpenAIApiInstanceName&&(e.kwargs.azure_endpoint=`https://${this.azureOpenAIApiInstanceName}.openai.azure.com/`),!e.kwargs.deployment_name&&this.azureOpenAIApiDeploymentName&&(e.kwargs.deployment_name=this.azureOpenAIApiDeploymentName),!e.kwargs.deployment_name&&this.azureOpenAIBasePath){let l=this.azureOpenAIBasePath.split("/openai/deployments/");if(l.length===2){let[,n]=l;e.kwargs.deployment_name=n}}e.kwargs.azure_endpoint&&e.kwargs.deployment_name&&e.kwargs.openai_api_base&&delete e.kwargs.openai_api_base,e.kwargs.azure_openai_api_instance_name&&e.kwargs.azure_endpoint&&delete e.kwargs.azure_openai_api_instance_name}return e}var Pz,$z,eB,khe=g(()=>{o();QE();V2();ca();Pz={openAIApiKey:"openai_api_key",openAIApiVersion:"openai_api_version",openAIBasePath:"openai_api_base",deploymentName:"deployment_name",azureOpenAIEndpoint:"azure_endpoint",azureOpenAIApiVersion:"openai_api_version",azureOpenAIBasePath:"openai_api_base",azureOpenAIApiDeploymentName:"deployment_name"},$z={azureOpenAIApiKey:"AZURE_OPENAI_API_KEY"},eB=["azureOpenAIApiKey","azureOpenAIApiVersion","azureOpenAIBasePath","azureOpenAIEndpoint","azureOpenAIApiInstanceName","azureOpenAIApiDeploymentName","deploymentName","openAIApiKey","openAIApiVersion"]});var xhe,QTe=g(()=>{o();Che();khe();xhe=class extends qz{azureOpenAIApiVersion;azureOpenAIApiKey;azureADTokenProvider;azureOpenAIApiInstanceName;azureOpenAIApiDeploymentName;azureOpenAIBasePath;azureOpenAIEndpoint;_llmType(){return"azure_openai"}get lc_aliases(){return{...super.lc_aliases,...Pz}}get lc_secrets(){return{...super.lc_secrets,...$z}}get lc_serializable_keys(){return[...super.lc_serializable_keys,...eB]}getLsParams(t){let e=super.getLsParams(t);return e.ls_provider="azure",e}constructor(t,e){let I=tB(t,e);super(I),IB.call(this,I)}_getClientOptions(t){return Lhe.call(this,t)}toJSON(){return lB.call(this,super.toJSON())}}});function SDt(t){return t.type==="url_citation"?{type:"citation",source:"url_citation",url:t.url,title:t.title,startIndex:t.start_index,endIndex:t.end_index}:t.type==="file_citation"?{type:"citation",source:"file_citation",title:t.filename,startIndex:t.index,file_id:t.file_id}:t.type==="container_file_citation"?{type:"citation",source:"container_file_citation",title:t.filename,startIndex:t.start_index,endIndex:t.end_index,file_id:t.file_id,container_id:t.container_id}:t.type==="file_path"?{type:"citation",source:"file_path",startIndex:t.index,file_id:t.file_id}:{type:"non_standard",value:t}}function dCl(t){if(t.type==="url_citation"||t.type==="file_citation"||t.type==="container_file_citation"||t.type==="file_path")return t;if(t.type==="citation"){let e=t;if(e.source==="url_citation")return{type:"url_citation",url:e.url??"",title:e.title??"",start_index:e.startIndex??0,end_index:e.endIndex??0};if(e.source==="file_citation")return{type:"file_citation",file_id:e.file_id??"",filename:e.title??"",index:e.startIndex??0};if(e.source==="container_file_citation")return{type:"container_file_citation",file_id:e.file_id??"",filename:e.title??"",container_id:e.container_id??"",start_index:e.startIndex??0,end_index:e.endIndex??0};if(e.source==="file_path")return{type:"file_path",file_id:e.file_id??"",index:e.startIndex??0}}return t.type==="non_standard"?t.value:t}var jhe,Uhe,x7,fTe,Ohe,ETe,j7,zhe=g(()=>{o();_z();HE();Dz();NI();Yo();bK();jhe="__openai_function_call_ids__";Uhe=t=>{let e={...t?.input_tokens_details?.cached_tokens!=null&&{cache_read:t?.input_tokens_details?.cached_tokens}},I={...t?.output_tokens_details?.reasoning_tokens!=null&&{reasoning:t?.output_tokens_details?.reasoning_tokens}};return{input_tokens:t?.input_tokens??0,output_tokens:t?.output_tokens??0,total_tokens:t?.total_tokens??0,input_token_details:e,output_token_details:I}},x7=t=>{if(t.error){let s=new Error(t.error.message);throw s.name=t.error.code,s}let e,I=[],l=[],n=[],a=t.output.map(s=>{if(s.type==="function_call"&&"parsed_arguments"in s){let i={...s};return delete i.parsed_arguments,i}return s}),c={model_provider:"openai",model:t.model,created_at:t.created_at,id:t.id,incomplete_details:t.incomplete_details,metadata:t.metadata,object:t.object,output:a,status:t.status,user:t.user,service_tier:t.service_tier,model_name:t.model},r={};for(let s of t.output)if(s.type==="message")e=s.id,I.push(...s.content.flatMap(i=>i.type==="output_text"?("parsed"in i&&i.parsed!=null&&(r.parsed=i.parsed),{type:"text",text:i.text,annotations:i.annotations.map(SDt),...s.phase!==null?{phase:s.phase}:{}}):i.type==="refusal"?(r.refusal=i.refusal,[]):i));else if(s.type==="function_call"){let i={function:{name:s.name,arguments:s.arguments},id:s.call_id};try{l.push(OX(i,{returnId:!0}))}catch(G){let d;typeof G=="object"&&G!=null&&"message"in G&&typeof G.message=="string"&&(d=G.message),n.push(nF(i,d))}r[jhe]??={},s.id&&(r[jhe][s.call_id]=s.id)}else if(s.type==="reasoning"){r.reasoning=s;let i=s.summary?.map(G=>G.text).filter(Boolean).join("");i&&I.push({type:"reasoning",reasoning:i})}else if(s.type==="custom_tool_call"){let i=KKt(s);i?l.push(i):n.push(nF(s,"Malformed custom tool call"))}else if(s.type==="computer_call"){let i=DKt(s);i?l.push(i):n.push(nF(s,"Malformed computer call"))}else s.type==="image_generation_call"?(s.result&&I.push({type:"image",mimeType:"image/png",data:s.result,id:s.id,metadata:{status:s.status}}),r.tool_outputs??=[],r.tool_outputs.push(s)):(r.tool_outputs??=[],r.tool_outputs.push(s));return new He({id:e,content:I,tool_calls:l,invalid_tool_calls:n,usage_metadata:Uhe(t.usage),additional_kwargs:r,response_metadata:c})},fTe=t=>{let e=(t.summary.length>1?t.summary.reduce((I,l)=>{let n=I[I.length-1];return n.index===l.index?n.text+=l.text:I.push(l),I},[{...t.summary[0]}]):t.summary).map(I=>Object.fromEntries(Object.entries(I).filter(([l])=>l!=="index")));return{...t,summary:e}},Ohe=t=>{let e=[],I={},l,n=[],a={model_provider:"openai"},c={},r;if(t.type==="response.output_text.delta")e.push({type:"text",text:t.delta,index:t.content_index});else if(t.type==="response.output_text.annotation.added")e.push({type:"text",text:"",annotations:[SDt(t.annotation)],index:t.content_index});else if(t.type==="response.output_item.added"&&t.item.type==="message"){r=t.item.id;let s="phase"in t.item?t.item.phase:void 0;s&&e.push({type:"text",text:"",phase:s,index:0})}else if(t.type==="response.output_item.added"&&t.item.type==="function_call")n.push({type:"tool_call_chunk",name:t.item.name,args:t.item.arguments,id:t.item.call_id,index:t.output_index}),c[jhe]={[t.item.call_id]:t.item.id};else if(t.type==="response.output_item.done"&&t.item.type==="computer_call")n.push({type:"tool_call_chunk",name:"computer_use",args:JSON.stringify({action:t.item.action}),id:t.item.call_id,index:t.output_index}),c.tool_outputs=[t.item];else if(t.type==="response.output_item.done"&&t.item.type==="image_generation_call")t.item.result&&e.push({type:"image",mimeType:"image/png",data:t.item.result,id:t.item.id,metadata:{status:t.item.status}}),c.tool_outputs=[t.item];else if(t.type==="response.output_item.done"&&["web_search_call","file_search_call","code_interpreter_call","shell_call","local_shell_call","mcp_call","mcp_list_tools","mcp_approval_request","custom_tool_call","tool_search_call","tool_search_output"].includes(t.item.type))c.tool_outputs=[t.item];else if(t.type==="response.created")a.id=t.response.id,a.model_name=t.response.model,a.model=t.response.model;else if(t.type==="response.completed"){let s=x7(t.response);l=Uhe(t.response.usage),t.response.text?.format?.type==="json_schema"&&s.text&&(c.parsed??=JSON.parse(s.text));for(let[i,G]of Object.entries(t.response))i!=="id"&&(i==="output"?a[i]=s.response_metadata.output:a[i]=G)}else if(t.type==="response.function_call_arguments.delta"||t.type==="response.custom_tool_call_input.delta")n.push({type:"tool_call_chunk",args:t.delta,index:t.output_index});else if(t.type==="response.web_search_call.completed"||t.type==="response.file_search_call.completed")I={tool_outputs:{id:t.item_id,type:t.type.replace("response.","").replace(".completed",""),status:"completed"}};else if(t.type==="response.refusal.done")c.refusal=t.refusal;else if(t.type==="response.output_item.added"&&"item"in t&&t.item.type==="reasoning"){let s=t.item.summary?t.item.summary.map((G,d)=>({...G,index:d})):void 0;c.reasoning={id:t.item.id,type:t.item.type,...s?{summary:s}:{}};let i=t.item.summary?.map(G=>G.text).filter(Boolean).join("");i&&e.push({type:"reasoning",reasoning:i})}else if(t.type==="response.reasoning_summary_part.added")c.reasoning={type:"reasoning",summary:[{...t.part,index:t.summary_index}]},t.part.text&&e.push({type:"reasoning",reasoning:t.part.text,index:t.summary_index});else if(t.type==="response.reasoning_summary_text.delta")c.reasoning={type:"reasoning",summary:[{text:t.delta,type:"summary_text",index:t.summary_index}]},t.delta&&e.push({type:"reasoning",reasoning:t.delta,index:t.summary_index});else return t.type==="response.image_generation_call.partial_image",null;return new Nc({text:e.map(s=>s.text).join(""),message:new eI({id:r,content:e,tool_call_chunks:n,usage_metadata:l,additional_kwargs:c,response_metadata:a}),generationInfo:I})},ETe=t=>{let e=He.isInstance(t)&&t.response_metadata?.model_provider==="openai";function*I(){let l=tA(()=>{try{let h=Y2(t);return h==="system"||h==="developer"||h==="assistant"||h==="user"?h:"assistant"}catch{return"assistant"}}),n,a=new Set,c=new Set,r=new Map,s=new Map;function*i(){if(!n)return;let h=n.content;(typeof h=="string"&&h.length>0||Array.isArray(h)&&h.length>0)&&(yield n),n=void 0}let G=(h,N)=>{n||(n={type:"message",role:l,content:[],...N?{phase:N}:{}}),typeof n.content=="string"?n.content=n.content.length>0?[{type:"input_text",text:n.content},...h]:[...h]:n.content.push(...h)},d=h=>{if(typeof h=="string")return h;try{return JSON.stringify(h??{})}catch{return"{}"}},u=h=>{let N=tA(()=>{let V=h.metadata?.detail;return V==="low"||V==="high"||V==="auto"?V:"auto"});if(h.fileId)return{type:"input_image",detail:N,file_id:h.fileId};if(h.url)return{type:"input_image",detail:N,image_url:h.url};if(h.data){let V=typeof h.data=="string"?h.data:m.Buffer.from(h.data).toString("base64");return{type:"input_image",detail:N,image_url:`data:${h.mimeType??"image/png"};base64,${V}`}}},b=h=>{if(h.fileId){let N=MSe(h);return{type:"input_file",file_id:h.fileId,...N?{filename:N}:{}}}if(h.url){let N=MSe(h);return{...N?{filename:N}:{},type:"input_file",file_url:h.url}}if(h.data){let N=Sz(h),V=typeof h.data=="string"?h.data:m.Buffer.from(h.data).toString("base64");return{type:"input_file",file_data:`data:${h.mimeType??"application/octet-stream"};base64,${V}`,filename:N}}},Z=h=>{let N=tA(()=>{if(Array.isArray(h.summary)){let F=h.summary?.map(v=>v?.text).filter(v=>typeof v=="string")??[];if(F.length>0)return F}return h.reasoning?[h.reasoning]:[]}),V=N.length>0?N.map(F=>({type:"summary_text",text:F})):[{type:"summary_text",text:""}],R={type:"reasoning",id:h.id??"",summary:V};return h.reasoning&&(R.content=[{type:"reasoning_text",text:h.reasoning}]),R},p=h=>({type:"function_call",name:h.name??"",call_id:h.id??"",arguments:d(h.args)}),W=h=>{let N=d(h.output),V=h.status==="success"?"completed":h.status==="error"?"incomplete":void 0;return{type:"function_call_output",call_id:h.toolCallId??"",output:N,...V?{status:V}:{}}};for(let h of t.contentBlocks)if(h.type==="text"){let N=tA(()=>{if("extras"in h&&typeof h.extras=="object"&&h.extras!==null&&"phase"in h.extras)return h.extras.phase});G([{type:"input_text",text:h.text}],N)}else if(h.type!=="invalid_tool_call"){if(h.type==="reasoning")yield*i(),yield Z(h);else if(h.type==="tool_call"){yield*i();let N=h.id??"";N&&(a.add(N),r.delete(N)),yield p(h)}else if(h.type==="tool_call_chunk"){if(h.id){let N=r.get(h.id)??{name:h.name,args:[]};h.name&&(N.name=h.name),h.args&&N.args.push(h.args),r.set(h.id,N)}}else if(h.type==="server_tool_call"){yield*i();let N=h.id??"";N&&(c.add(N),s.delete(N)),yield p(h)}else if(h.type==="server_tool_call_chunk"){if(h.id){let N=s.get(h.id)??{name:h.name,args:[]};h.name&&(N.name=h.name),h.args&&N.args.push(h.args),s.set(h.id,N)}}else if(h.type==="server_tool_call_result")yield*i(),yield W(h);else if(h.type!=="audio")if(h.type==="file"){let N=b(h);N&&G([N])}else if(h.type==="image"){let N=u(h);N&&G([N])}else if(h.type==="video"){let N=b(h);N&&G([N])}else h.type==="text-plain"?h.text&&G([{type:"input_text",text:h.text}]):h.type==="non_standard"&&e&&(yield*i(),yield h.value)}yield*i();for(let[h,N]of r){if(!h||a.has(h))continue;let V=N.args.join("");!N.name&&!V||(yield{type:"function_call",call_id:h,name:N.name??"",arguments:V})}for(let[h,N]of s){if(!h||c.has(h))continue;let V=N.args.join("");!N.name&&!V||(yield{type:"function_call",call_id:h,name:N.name??"",arguments:V})}}return Array.from(I())},j7=({messages:t,zdrEnabled:e,model:I})=>t.flatMap(l=>{let n=l.response_metadata;if(n?.output_version==="v1")return ETe(l);let a=l.additional_kwargs,c=Y2(l);if(c==="system"&&sv(I)&&(c="developer"),c==="function")throw new Error("Function messages are not supported in Responses API");if(c==="tool"){let r=l;if(a?.type==="computer_call_output")return{type:"computer_call_output",output:(()=>{if(typeof r.content=="string")return{type:"input_image",image_url:r.content};if(Array.isArray(r.content)){let i=r.content.find(u=>u.type==="input_image");if(i)return i;let G=r.content.find(u=>u.type==="computer_screenshot");if(G)return G;let d=r.content.find(u=>u.type==="image_url");if(d)return{type:"input_image",image_url:typeof d.image_url=="string"?d.image_url:d.image_url.url}}throw new Error("Invalid computer call output")})(),call_id:r.tool_call_id};if(r.additional_kwargs?.customTool)return{type:"custom_tool_call_output",call_id:r.tool_call_id,output:r.content};let s=Array.isArray(r.content)&&r.content.every(i=>typeof i=="object"&&i!==null&&"type"in i&&(i.type==="input_file"||i.type==="input_image"||i.type==="input_text"));return{type:"function_call_output",call_id:r.tool_call_id,id:r.id?.startsWith("fc_")?r.id:void 0,output:s?r.content:typeof r.content!="string"?JSON.stringify(r.content):r.content}}if(c==="assistant"){if(!e&&n?.output!=null&&Array.isArray(n?.output)&&n?.output.length>0&&n?.output.every(Z=>"type"in Z))return n?.output;let r=[],s=a?.reasoning,i=!!s?.encrypted_content;if(s&&(!e||i)){let Z=fTe(s);r.push(Z)}let{content:G}=l;if(a?.refusal&&(typeof G=="string"&&(G=[{type:"output_text",text:G,annotations:[]}]),G=[...G,{type:"refusal",refusal:a.refusal}]),typeof G=="string"||G.length>0){let Z={type:"message",role:"assistant",...l.id&&!e&&l.id.startsWith("msg_")?{id:l.id}:{},content:tA(()=>typeof G=="string"?G:G.flatMap(p=>{if(p.type==="text"){let W=p;return{type:"output_text",text:W.text,annotations:(W.annotations??[]).map(dCl)}}return p.type==="output_text"||p.type==="refusal"?p:[]})),phase:tA(()=>{if(Array.isArray(G))return G.find(p=>"phase"in p&&typeof p.phase=="string")?.phase})};r.push(Z)}let d=a?.[jhe];He.isInstance(l)&&l.tool_calls?.length?r.push(...l.tool_calls.map(Z=>PKt(Z)?{type:"custom_tool_call",id:Z.call_id,call_id:Z.id??"",input:Z.args.input,name:Z.name}:qKt(Z)?{type:"computer_call",id:Z.call_id,call_id:Z.id??"",action:Z.args.action}:{type:"function_call",name:Z.name,arguments:JSON.stringify(Z.args),call_id:Z.id,...e?{}:{id:d?.[Z.id]}})):a?.tool_calls&&r.push(...a.tool_calls.map(Z=>({type:"function_call",name:Z.function.name,call_id:Z.id,arguments:Z.function.arguments,...e?{}:{id:d?.[Z.id]}})));let u=n?.output?.length?n?.output:a.tool_outputs,b=["computer_call","mcp_call","code_interpreter_call","image_generation_call","shell_call","local_shell_call"];if(u!=null){let Z=u?.filter(p=>b.includes(p.type));Z.length>0&&r.push(...Z)}return r}if(c==="user"||c==="system"||c==="developer"){if(typeof l.content=="string")return{type:"message",role:c,content:l.content};let r=[],s=l.content.flatMap(i=>(i.type==="mcp_approval_response"&&r.push({type:"mcp_approval_response",approval_request_id:i.approval_request_id,approve:i.approve}),ho(i)?QA(i,k7):i.type==="text"?{type:"input_text",text:i.text}:i.type==="image_url"?{type:"input_image",image_url:tA(()=>{if(typeof i.image_url=="string")return i.image_url;if(typeof i.image_url=="object"&&i.image_url!==null&&"url"in i.image_url)return i.image_url.url}),detail:tA(()=>{if(typeof i.image_url=="string")return"auto";if(typeof i.image_url=="object"&&i.image_url!==null&&"detail"in i.image_url)return i.image_url.detail})}:i.type==="input_text"||i.type==="input_image"||i.type==="input_file"?i:[]));return s.length>0&&r.push({type:"message",role:c,content:s}),r}return console.warn(`Unsupported role found when converting to OpenAI Responses API: ${c}`),[]})});var nB,Bhe=g(()=>{o();wE();_z();L7();zhe();sZ();nB=class extends EE{constructor(t,e){super(Kz(t,e))}invocationParams(t){let e;t?.strict!==void 0&&(e=t.strict),e===void 0&&this.supportsStrictToolCalling!==void 0&&(e=this.supportsStrictToolCalling);let I={model:this.model,temperature:this.temperature,top_p:this.topP,user:this.user,service_tier:this.service_tier,stream:this.streaming,previous_response_id:t?.previous_response_id,truncation:t?.truncation,include:t?.include,tools:t?.tools?.length?this._reduceChatOpenAITools(t.tools,{stream:this.streaming,strict:e}):void 0,tool_choice:_Kt(t?.tool_choice)?t?.tool_choice:(()=>{let n=Xhe(t?.tool_choice);if(typeof n=="object"&&"type"in n){if(n.type==="function")return{type:"function",name:n.function.name};if(n.type==="allowed_tools")return{type:"allowed_tools",mode:n.allowed_tools.mode,tools:n.allowed_tools.tools};if(n.type==="custom")return{type:"custom",name:n.custom.name}}})(),text:(()=>{if(t?.text)return t.text;let n=this._getResponseFormat(t?.response_format);return n?.type==="json_schema"?n.json_schema.schema!=null?{format:{type:"json_schema",schema:n.json_schema.schema,description:n.json_schema.description,name:n.json_schema.name,strict:n.json_schema.strict},verbosity:t?.verbosity}:void 0:{format:n,verbosity:t?.verbosity}})(),parallel_tool_calls:t?.parallel_tool_calls,max_output_tokens:this.maxTokens===-1?void 0:this.maxTokens,prompt_cache_key:t?.promptCacheKey??this.promptCacheKey,prompt_cache_retention:t?.promptCacheRetention??this.promptCacheRetention,...this.zdrEnabled?{store:!1}:{},...this.modelKwargs},l=this._getReasoningParams(t);return l!==void 0&&(I.reasoning=l),I}async _generate(t,e,I){e.signal?.throwIfAborted();let l=this.invocationParams(e);if(l.stream){let n=this._streamResponseChunks(t,e,I),a;for await(let c of n)c.message.response_metadata={...c.generationInfo,...c.message.response_metadata},a=a?.concat(c)??c;return{generations:a?[a]:[],llmOutput:{estimatedTokenUsage:a?.message?.usage_metadata}}}else{let n=await this.completionWithRetry({input:j7({messages:t,zdrEnabled:this.zdrEnabled??!1,model:this.model}),...l,stream:!1},{signal:e?.signal,...e?.options});return{generations:[{text:n.output_text,message:x7(n)}],llmOutput:{id:n.id,estimatedTokenUsage:n.usage?{promptTokens:n.usage.input_tokens,completionTokens:n.usage.output_tokens,totalTokens:n.usage.total_tokens}:void 0}}}}async*_streamResponseChunks(t,e,I){let l=await this.completionWithRetry({...this.invocationParams(e),input:j7({messages:t,zdrEnabled:this.zdrEnabled??!1,model:this.model}),stream:!0},e);for await(let n of l){if(e.signal?.aborted)return;let a=Ohe(n);a!=null&&(yield a,await I?.handleLLMNewToken(a.text||"",{prompt:e.promptIndex??0,completion:0},void 0,void 0,void 0,{chunk:a}))}}async completionWithRetry(t,e){return this.caller.call(async()=>{let I=this._getClientOptions(e);try{return t.text?.format?.type==="json_schema"&&!t.stream?await this.client.responses.parse(t,I):await this.client.responses.create(t,I)}catch(l){throw pm(l)}})}_reduceChatOpenAITools(t,e){let I=[];for(let l of t)if(Tz(l))l.type==="image_generation"&&e?.stream&&(l.partial_images=1),I.push(l);else if(TL(l)){let n=l.metadata.customTool;I.push({type:"custom",name:n.name,description:n.description,format:n.format})}else if($R(l)){let n={};for(let[a,c]of Object.entries(l))a!=="type"&&a!=="function"&&(n[a]=c);I.push({type:"function",name:l.function.name,parameters:l.function.parameters,description:l.function.description,strict:e?.strict??null,...n})}else ghe(l)&&I.push($Kt(l));return I}}});var Mhe,JTe=g(()=>{o();khe();Bhe();Mhe=class extends nB{azureOpenAIApiVersion;azureOpenAIApiKey;azureADTokenProvider;azureOpenAIApiInstanceName;azureOpenAIApiDeploymentName;azureOpenAIBasePath;azureOpenAIEndpoint;_llmType(){return"azure_openai"}get lc_aliases(){return{...super.lc_aliases,...Pz}}get lc_secrets(){return{...super.lc_secrets,...$z}}get lc_serializable_keys(){return[...super.lc_serializable_keys,...eB]}getLsParams(t){let e=super.getLsParams(t);return e.ls_provider="azure",e}constructor(t,e){let I=tB(t,e);super(I),IB.call(this,I)}_getClientOptions(t){return Lhe.call(this,t)}toJSON(){return lB.call(this,super.toJSON())}}});var aB,CTe=g(()=>{o();_z();HE();L7();Che();Bhe();aB=class TDt extends EE{useResponsesApi=!1;responses;completions;get lc_serializable_keys(){return[...super.lc_serializable_keys,"useResponsesApi"]}get callKeys(){return[...super.callKeys,"useResponsesApi"]}fields;constructor(e,I){let l=Kz(e,I);super(l),this.fields=l,this.useResponsesApi=l?.useResponsesApi??!1,this.responses=l?.responses??new nB(l),this.completions=l?.completions??new qz(l)}_useResponsesApi(e){let I=e?.tools?.some(Tz),l=e?.previous_response_id!=null||e?.text!=null||e?.truncation!=null||e?.include!=null||e?.reasoning?.summary!=null||this.reasoning?.summary!=null,n=e?.tools?.some(ghe)||e?.tools?.some(TL);return this.useResponsesApi||I||l||n||zKt(this.model)}getLsParams(e){let I=this._combineCallOptions(e);return this._useResponsesApi(e)?this.responses.getLsParams(I):this.completions.getLsParams(I)}invocationParams(e){let I=this._combineCallOptions(e);return this._useResponsesApi(e)?this.responses.invocationParams(I):this.completions.invocationParams(I)}async _generate(e,I,l){return this._useResponsesApi(I)?this.responses._generate(e,I,l):this.completions._generate(e,I,l)}async*_streamResponseChunks(e,I,l){if(this._useResponsesApi(I)){yield*this.responses._streamResponseChunks(e,this._combineCallOptions(I),l);return}yield*this.completions._streamResponseChunks(e,this._combineCallOptions(I),l)}withConfig(e){let I=new TDt(this.fields);return I.defaultOptions={...this.defaultOptions,...e},I}}});var _Dt,KDt=g(()=>{o();khe();QTe();JTe();CTe();_Dt=class extends aB{azureOpenAIApiVersion;azureOpenAIApiKey;azureADTokenProvider;azureOpenAIApiInstanceName;azureOpenAIApiDeploymentName;azureOpenAIBasePath;azureOpenAIEndpoint;_llmType(){return"azure_openai"}get lc_aliases(){return{...super.lc_aliases,...Pz}}get lc_secrets(){return{...super.lc_secrets,...$z}}get lc_serializable_keys(){return[...super.lc_serializable_keys,...eB]}getLsParams(t){let e=super.getLsParams(t);return e.ls_provider="azure",e}constructor(t,e){let I=tB(t,e);super({...I,completions:new xhe(I),responses:new Mhe(I)}),IB.call(this,I)}_getStructuredOutputMethod(t){let e={...t};return this.model.startsWith("gpt-4o")&&e?.method===void 0?"functionCalling":super._getStructuredOutputMethod(e)}toJSON(){return lB.call(this,super.toJSON())}}});var She,LTe=g(()=>{o();wE();QE();V2();Yo();ca();sZ();WC();RC();She=class extends tse{static lc_name(){return"OpenAI"}get callKeys(){return[...super.callKeys,"options"]}lc_serializable=!0;get lc_secrets(){return{openAIApiKey:"OPENAI_API_KEY",apiKey:"OPENAI_API_KEY",organization:"OPENAI_ORGANIZATION"}}get lc_aliases(){return{modelName:"model",openAIApiKey:"openai_api_key",apiKey:"openai_api_key"}}temperature;maxTokens;topP;frequencyPenalty;presencePenalty;n=1;bestOf;logitBias;model="gpt-3.5-turbo-instruct";modelName;modelKwargs;batchSize=20;timeout;stop;stopSequences;user;streaming=!1;openAIApiKey;apiKey;organization;client;clientConfig;constructor(t){if(super(t??{}),this._addVersion("@langchain/openai","1.4.5"),this.openAIApiKey=t?.apiKey??t?.openAIApiKey??gt("OPENAI_API_KEY"),this.apiKey=this.openAIApiKey,this.organization=t?.configuration?.organization??gt("OPENAI_ORGANIZATION"),this.model=t?.model??t?.modelName??this.model,(this.model?.startsWith("gpt-3.5-turbo")||this.model?.startsWith("gpt-4")||this.model?.startsWith("o1"))&&!this.model?.includes("-instruct"))throw new Error([`Your chosen OpenAI model, "${this.model}", is a chat model and not a text-in/text-out LLM.`,'Passing it into the "OpenAI" class is no longer supported.','Please use the "ChatOpenAI" class instead.',"","See this page for more information:","|","\u2514> https://js.langchain.com/docs/integrations/chat/openai"].join(` +`));if(this.modelName=this.model,this.modelKwargs=t?.modelKwargs??{},this.batchSize=t?.batchSize??this.batchSize,this.timeout=t?.timeout,this.temperature=t?.temperature??this.temperature,this.maxTokens=t?.maxTokens??this.maxTokens,this.topP=t?.topP??this.topP,this.frequencyPenalty=t?.frequencyPenalty??this.frequencyPenalty,this.presencePenalty=t?.presencePenalty??this.presencePenalty,this.n=t?.n??this.n,this.bestOf=t?.bestOf??this.bestOf,this.logitBias=t?.logitBias,this.stop=t?.stopSequences??t?.stop,this.stopSequences=this.stop,this.user=t?.user,this.streaming=t?.streaming??!1,this.streaming&&this.bestOf&&this.bestOf>1)throw new Error("Cannot stream results when bestOf > 1");this.clientConfig={apiKey:this.apiKey,organization:this.organization,dangerouslyAllowBrowser:!0,...t?.configuration}}invocationParams(t){return{model:this.model,temperature:this.temperature,max_tokens:this.maxTokens,top_p:this.topP,frequency_penalty:this.frequencyPenalty,presence_penalty:this.presencePenalty,n:this.n,best_of:this.bestOf,logit_bias:this.logitBias,stop:t?.stop??this.stopSequences,user:this.user,stream:this.streaming,...this.modelKwargs}}_identifyingParams(){return{model_name:this.model,...this.invocationParams(),...this.clientConfig}}identifyingParams(){return this._identifyingParams()}async _generate(t,e,I){let l=Op(t,this.batchSize),n=[],a={},c=this.invocationParams(e);if(c.max_tokens===-1){if(t.length!==1)throw new Error("max_tokens set to -1 not supported for multiple inputs");c.max_tokens=await dEe({prompt:t[0],modelName:this.model})}for(let r=0;r{let u=[],b,Z=await this.completionWithRetry({...c,stream:!0,prompt:l[r]},e);for await(let p of Z){b||(b={id:p.id,object:p.object,created:p.created,model:p.model});for(let W of p.choices){if(!u[W.index])u[W.index]=W;else{let h=u[W.index];h.text+=W.text,h.finish_reason=W.finish_reason,h.logprobs=W.logprobs}I?.handleLLMNewToken(W.text,{prompt:Math.floor(W.index/this.n),completion:W.index%this.n})}}if(e.signal?.aborted)throw new Error("AbortError");return{...b,choices:u}})():await this.completionWithRetry({...c,stream:!1,prompt:l[r]},{signal:e.signal,...e.options});n.push(...s.choices);let{completion_tokens:i,prompt_tokens:G,total_tokens:d}=s.usage?s.usage:{completion_tokens:void 0,prompt_tokens:void 0,total_tokens:void 0};i&&(a.completionTokens=(a.completionTokens??0)+i),G&&(a.promptTokens=(a.promptTokens??0)+G),d&&(a.totalTokens=(a.totalTokens??0)+d)}return{generations:Op(n,this.n).map(r=>r.map(s=>({text:s.text??"",generationInfo:{finishReason:s.finish_reason,logprobs:s.logprobs}}))),llmOutput:{tokenUsage:a}}}async*_streamResponseChunks(t,e,I){let l={...this.invocationParams(e),prompt:t,stream:!0},n=await this.completionWithRetry(l,e);for await(let a of n){let c=a?.choices[0];if(!c)continue;let r=new Pr({text:c.text,generationInfo:{finishReason:c.finish_reason}});yield r,I?.handleLLMNewToken(r.text??"")}if(e.signal?.aborted)throw new Error("AbortError")}async completionWithRetry(t,e){let I=this._getClientOptions(e);return this.caller.call(async()=>{try{return await this.client.completions.create(t,I)}catch(l){throw pm(l)}})}_getClientOptions(t){if(!this.client){let e=hm({baseURL:this.clientConfig.baseURL}),I={...this.clientConfig,baseURL:e,timeout:this.timeout,maxRetries:0};I.baseURL||delete I.baseURL,I.defaultHeaders=Wm(I.defaultHeaders),this.client=new oI(I)}return{...this.clientConfig,...t}}_llmType(){return"openai"}}});var DDt,qDt=g(()=>{o();QE();LTe();V2();ca();DDt=class extends She{azureOpenAIApiVersion;azureOpenAIApiKey;azureADTokenProvider;azureOpenAIApiInstanceName;azureOpenAIApiDeploymentName;azureOpenAIBasePath;azureOpenAIEndpoint;get lc_aliases(){return{...super.lc_aliases,openAIApiKey:"openai_api_key",openAIApiVersion:"openai_api_version",openAIBasePath:"openai_api_base",deploymentName:"deployment_name",azureOpenAIEndpoint:"azure_endpoint",azureOpenAIApiVersion:"openai_api_version",azureOpenAIBasePath:"openai_api_base",azureOpenAIApiDeploymentName:"deployment_name"}}get lc_secrets(){return{...super.lc_secrets,azureOpenAIApiKey:"AZURE_OPENAI_API_KEY"}}constructor(t){if(super(t),this.azureOpenAIApiDeploymentName=(t?.azureOpenAIApiCompletionsDeploymentName||t?.azureOpenAIApiDeploymentName)??(gt("AZURE_OPENAI_API_COMPLETIONS_DEPLOYMENT_NAME")||gt("AZURE_OPENAI_API_DEPLOYMENT_NAME")),this.azureOpenAIApiKey=t?.azureOpenAIApiKey??(typeof t?.openAIApiKey=="string"?t?.openAIApiKey:void 0)??(typeof t?.apiKey=="string"?t?.apiKey:void 0)??gt("AZURE_OPENAI_API_KEY"),this.azureOpenAIApiInstanceName=t?.azureOpenAIApiInstanceName??gt("AZURE_OPENAI_API_INSTANCE_NAME"),this.azureOpenAIApiVersion=t?.azureOpenAIApiVersion??t?.openAIApiVersion??gt("AZURE_OPENAI_API_VERSION"),this.azureOpenAIBasePath=t?.azureOpenAIBasePath??gt("AZURE_OPENAI_BASE_PATH"),this.azureOpenAIEndpoint=t?.azureOpenAIEndpoint??gt("AZURE_OPENAI_ENDPOINT"),this.azureADTokenProvider=t?.azureADTokenProvider,!this.azureOpenAIApiKey&&!this.apiKey&&!this.azureADTokenProvider)throw new Error("Azure OpenAI API key or Token Provider not found")}_getClientOptions(t){if(!this.client){let I={azureOpenAIApiDeploymentName:this.azureOpenAIApiDeploymentName,azureOpenAIApiInstanceName:this.azureOpenAIApiInstanceName,azureOpenAIApiKey:this.azureOpenAIApiKey,azureOpenAIBasePath:this.azureOpenAIBasePath,azureADTokenProvider:this.azureADTokenProvider,baseURL:this.clientConfig.baseURL},l=hm(I),{apiKey:n,...a}=this.clientConfig,c={...a,baseURL:l,timeout:this.timeout,maxRetries:0};this.azureADTokenProvider||(c.apiKey=I.azureOpenAIApiKey),c.baseURL||delete c.baseURL,c.defaultHeaders=Wm(c.defaultHeaders,!0,"2.0.0"),this.client=new rv({apiVersion:this.azureOpenAIApiVersion,azureADTokenProvider:this.azureADTokenProvider,...c})}let e={...this.clientConfig,...t};return this.azureOpenAIApiKey&&(e.headers={"api-key":this.azureOpenAIApiKey,...e.headers},e.query={"api-version":this.azureOpenAIApiVersion,...e.query}),e}toJSON(){let t=super.toJSON();function e(I){return typeof I=="object"&&I!=null}return e(t)&&e(t.kwargs)&&(delete t.kwargs.azure_openai_base_path,delete t.kwargs.azure_openai_api_deployment_name,delete t.kwargs.azure_openai_api_key,delete t.kwargs.azure_openai_api_version,delete t.kwargs.azure_open_ai_base_path),t}}});var The,kTe=g(()=>{o();wE();QE();V2();ca();RC();hC();The=class extends Up{model="text-embedding-ada-002";modelName;batchSize=512;stripNewLines=!0;dimensions;timeout;organization;encodingFormat;client;clientConfig;apiKey;constructor(t){let e={maxConcurrency:2,...t};super(e);let I=e?.apiKey??e?.openAIApiKey??gt("OPENAI_API_KEY");this.organization=e?.configuration?.organization??gt("OPENAI_ORGANIZATION"),this.model=e?.model??e?.modelName??this.model,this.modelName=this.model,this.batchSize=e?.batchSize??this.batchSize,this.stripNewLines=e?.stripNewLines??this.stripNewLines,this.timeout=e?.timeout,this.dimensions=e?.dimensions,this.encodingFormat=e?.encodingFormat,this.clientConfig={apiKey:I,organization:this.organization,dangerouslyAllowBrowser:!0,...t?.configuration}}async embedDocuments(t){let e=Op(this.stripNewLines?t.map(a=>a.replace(/\n/g," ")):t,this.batchSize),I=e.map(a=>{let c={model:this.model,input:a};return this.dimensions&&(c.dimensions=this.dimensions),this.encodingFormat&&(c.encoding_format=this.encodingFormat),this.embeddingWithRetry(c)}),l=await Promise.all(I),n=[];for(let a=0;a{try{return await this.client.embeddings.create(t,e)}catch(I){throw pm(I)}})}}});var PDt,$Dt=g(()=>{o();wE();QE();kTe();V2();ca();PDt=class extends The{azureOpenAIApiVersion;azureOpenAIApiKey;azureADTokenProvider;azureOpenAIApiInstanceName;azureOpenAIApiDeploymentName;azureOpenAIBasePath;constructor(t){super(t),this.batchSize=t?.batchSize??1,this.azureOpenAIApiKey=t?.azureOpenAIApiKey??(typeof t?.apiKey=="string"?t?.apiKey:void 0)??gt("AZURE_OPENAI_API_KEY"),this.azureOpenAIApiVersion=t?.azureOpenAIApiVersion??t?.openAIApiVersion??gt("AZURE_OPENAI_API_VERSION"),this.azureOpenAIBasePath=t?.azureOpenAIBasePath??gt("AZURE_OPENAI_BASE_PATH"),this.azureOpenAIApiInstanceName=t?.azureOpenAIApiInstanceName??gt("AZURE_OPENAI_API_INSTANCE_NAME"),this.azureOpenAIApiDeploymentName=(t?.azureOpenAIApiEmbeddingsDeploymentName||t?.azureOpenAIApiDeploymentName)??(gt("AZURE_OPENAI_API_EMBEDDINGS_DEPLOYMENT_NAME")||gt("AZURE_OPENAI_API_DEPLOYMENT_NAME")),this.azureADTokenProvider=t?.azureADTokenProvider}async embeddingWithRetry(t){if(!this.client){let I={azureOpenAIApiDeploymentName:this.azureOpenAIApiDeploymentName,azureOpenAIApiInstanceName:this.azureOpenAIApiInstanceName,azureOpenAIApiKey:this.azureOpenAIApiKey,azureOpenAIBasePath:this.azureOpenAIBasePath,azureADTokenProvider:this.azureADTokenProvider,baseURL:this.clientConfig.baseURL},l=hm(I),{apiKey:n,...a}=this.clientConfig,c={...a,baseURL:l,timeout:this.timeout,maxRetries:0};this.azureADTokenProvider||(c.apiKey=I.azureOpenAIApiKey),c.baseURL||delete c.baseURL,c.defaultHeaders=Wm(c.defaultHeaders,!0,"2.0.0"),this.client=new rv({apiVersion:this.azureOpenAIApiVersion,azureADTokenProvider:this.azureADTokenProvider,deployment:this.azureOpenAIApiDeploymentName,...c})}let e={};return this.azureOpenAIApiKey&&(e.headers={"api-key":this.azureOpenAIApiKey,...e.headers},e.query={"api-version":this.azureOpenAIApiVersion,...e.query}),this.caller.call(async()=>{try{return await this.client.embeddings.create(t,e)}catch(I){throw pm(I)}})}}});var e6t,xTe=g(()=>{o();V2();ca();Ns();e6t=class extends BX{static lc_name(){return"DallEAPIWrapper"}name="dalle_api_wrapper";description="A wrapper around OpenAI DALL-E API. Useful for when you need to generate images from a text description. Input should be an image description.";client;static toolName="dalle_api_wrapper";model="dall-e-3";style="vivid";quality="standard";n=1;size="1024x1024";dallEResponseFormat="url";user;constructor(t){t?.responseFormat!==void 0&&["url","b64_json"].includes(t.responseFormat)&&(t.dallEResponseFormat=t.responseFormat,t.responseFormat="content"),super(t),this.client=new oI({apiKey:t?.apiKey??t?.openAIApiKey??gt("OPENAI_API_KEY"),organization:t?.organization??gt("OPENAI_ORGANIZATION"),dangerouslyAllowBrowser:!0,baseURL:t?.baseUrl}),this.model=t?.model??t?.modelName??this.model,this.style=t?.style??this.style,this.quality=t?.quality??this.quality,this.n=t?.n??this.n,this.size=t?.size??this.size,this.dallEResponseFormat=t?.dallEResponseFormat??this.dallEResponseFormat,this.user=t?.user}processMultipleGeneratedUrls(t){return this.dallEResponseFormat==="url"?t.flatMap(e=>e.data?.flatMap(I=>I.url?{type:"image_url",image_url:I.url}:[]).filter(I=>I!==void 0&&I.type==="image_url"&&typeof I.image_url=="string"&&I.image_url!==void 0)??[]):t.flatMap(e=>e.data?.flatMap(I=>I.b64_json?{type:"image_url",image_url:{url:I.b64_json}}:[]).filter(I=>I!==void 0&&I.type==="image_url"&&typeof I.image_url=="object"&&"url"in I.image_url&&typeof I.image_url.url=="string"&&I.image_url.url!==void 0)??[])}async _call(t){let e={model:this.model,prompt:t,n:1,size:this.size,response_format:this.dallEResponseFormat,style:this.style,quality:this.quality,user:this.user};if(this.n>1){let n=await Promise.all(Array.from({length:this.n}).map(()=>this.client.images.generate(e)));return this.processMultipleGeneratedUrls(n)}let I=await this.client.images.generate(e),l="";return this.dallEResponseFormat==="url"?[l]=I.data?.map(n=>n.url).filter(n=>n!=="undefined")??[]:[l]=I.data?.map(n=>n.b64_json).filter(n=>n!=="undefined")??[],l}}});function t6t(t){return{type:"web_search",filters:t?.filters?.allowedDomains?{allowed_domains:t.filters.allowedDomains}:void 0,user_location:t?.userLocation,search_context_size:t?.search_context_size}}var I6t=g(()=>{o()});function jTe(t){return{tool_names:t.toolNames,read_only:t.readOnly}}function uCl(t){if(t)return Array.isArray(t)?t:jTe(t)}function bCl(t){if(t)return typeof t=="string"?t:{always:t.always?jTe(t.always):void 0,never:t.never?jTe(t.never):void 0}}function l6t(t){let e={type:"mcp",server_label:t.serverLabel,allowed_tools:uCl(t.allowedTools),authorization:t.authorization,headers:t.headers,require_approval:bCl(t.requireApproval),server_description:t.serverDescription};return"serverUrl"in t?{...e,server_url:t.serverUrl}:{...e,connector_id:t.connectorId}}var n6t=g(()=>{o()});function mCl(t){return typeof t=="string"?t:{type:"auto",file_ids:t?.fileIds,memory_limit:t?.memoryLimit}}function a6t(t){return{type:"code_interpreter",container:mCl(t?.container)}}var c6t=g(()=>{o()});function ZCl(t){if(t)return{ranker:t.ranker,score_threshold:t.scoreThreshold,hybrid_search:t.hybridSearch?{embedding_weight:t.hybridSearch.embeddingWeight,text_weight:t.hybridSearch.textWeight}:void 0}}function r6t(t){return{type:"file_search",vector_store_ids:t.vectorStoreIds,max_num_results:t.maxNumResults,filters:t.filters,ranking_options:ZCl(t.rankingOptions)}}var s6t=g(()=>{o()});function pCl(t){if(t)return{image_url:t.imageUrl,file_id:t.fileId}}function o6t(t){return{type:"image_generation",action:t?.action,background:t?.background,input_fidelity:t?.inputFidelity,input_image_mask:pCl(t?.inputImageMask),model:t?.model,moderation:t?.moderation,output_compression:t?.outputCompression,output_format:t?.outputFormat,partial_images:t?.partialImages,quality:t?.quality,size:t?.size}}var i6t=g(()=>{o()});function G6t(t){let e=ir(async(I,l)=>{let n=l.state?.messages.at(-1)?.tool_calls?.find(c=>c.name==="computer_use")?.id;if(!n)throw new Error("Computer use call id not found");let a=await t.execute(I.action,l);return typeof a=="string"?new pt({content:a,tool_call_id:n,additional_kwargs:{type:"computer_call_output"}}):new pt({...a,tool_call_id:n,additional_kwargs:{type:"computer_call_output",...a.additional_kwargs}})},{name:yCl,description:"Control a computer interface by executing mouse clicks, keyboard input, scrolling, and other actions.",schema:vCl});return e.extras={...e.extras??{},providerToolDefinition:{type:"computer_use_preview",display_width:t.displayWidth,display_height:t.displayHeight,environment:t.environment}},e}var hCl,WCl,NCl,VCl,YCl,RCl,ACl,FCl,XCl,gCl,vCl,yCl,d6t=g(()=>{o();NI();Ns();sG();hCl=ae.object({type:ae.literal("screenshot")}),WCl=ae.object({type:ae.literal("click"),x:ae.number(),y:ae.number(),button:ae.enum(["left","right","wheel","back","forward"]).default("left")}),NCl=ae.object({type:ae.literal("double_click"),x:ae.number(),y:ae.number(),button:ae.enum(["left","right","wheel","back","forward"]).default("left")}),VCl=ae.object({type:ae.literal("drag"),path:ae.array(ae.object({x:ae.number(),y:ae.number()}))}),YCl=ae.object({type:ae.literal("keypress"),keys:ae.array(ae.string())}),RCl=ae.object({type:ae.literal("move"),x:ae.number(),y:ae.number()}),ACl=ae.object({type:ae.literal("scroll"),x:ae.number(),y:ae.number(),scroll_x:ae.number(),scroll_y:ae.number()}),FCl=ae.object({type:ae.literal("type"),text:ae.string()}),XCl=ae.object({type:ae.literal("wait"),duration:ae.number().optional()}),gCl=ae.union([hCl,WCl,NCl,VCl,YCl,RCl,ACl,FCl,XCl]),vCl=ae.object({action:gCl}),yCl="computer_use"});function u6t(t){let e=ir(t.execute,{name:QCl,description:"Execute shell commands locally on the machine. Commands are provided as argv tokens.",schema:HCl});return e.extras={...e.extras??{},providerToolDefinition:{type:"local_shell"}},e}var wCl,HCl,QCl,b6t=g(()=>{o();Ns();sG();wCl=ae.object({type:ae.literal("exec"),command:ae.array(ae.string()),env:ae.record(ae.string(),ae.string()).optional(),working_directory:ae.string().optional(),timeout_ms:ae.number().optional(),user:ae.string().optional()}),HCl=ae.union([wCl]),QCl="local_shell"});function m6t(t){let I=ir(async l=>{let n=await t.execute(l);return JSON.stringify({output:n.output,max_output_length:n.maxOutputLength})},{name:ECl,description:"Execute shell commands in a managed environment. Commands can be run concurrently.",schema:fCl});return I.extras={...I.extras??{},providerToolDefinition:{type:"shell"}},I}var fCl,ECl,Z6t=g(()=>{o();Ns();sG();fCl=ae.object({commands:ae.array(ae.string()).describe("Array of shell commands to execute"),timeout_ms:ae.number().optional().describe("Optional timeout in milliseconds for the commands"),max_output_length:ae.number().optional().describe("Optional maximum number of characters to return from each command")}),ECl="shell"});function p6t(t){let e=ir(t.execute,{name:xCl,description:"Apply structured diffs to create, update, or delete files in the codebase.",schema:kCl});return e.extras={...e.extras??{},providerToolDefinition:{type:"apply_patch"}},e}var JCl,CCl,LCl,kCl,xCl,h6t=g(()=>{o();Ns();sG();JCl=ae.object({type:ae.literal("create_file"),path:ae.string(),diff:ae.string()}),CCl=ae.object({type:ae.literal("update_file"),path:ae.string(),diff:ae.string()}),LCl=ae.object({type:ae.literal("delete_file"),path:ae.string()}),kCl=ae.union([JCl,CCl,LCl]),xCl="apply_patch"});function W6t(t){return{type:"tool_search",...t?.execution?{execution:t.execution}:{},...t?.description?{description:t.description}:{},...t?.parameters!==void 0?{parameters:t.parameters}:{}}}var N6t=g(()=>{o()});var V6t,Y6t=g(()=>{o();xTe();I6t();n6t();c6t();s6t();i6t();d6t();b6t();Z6t();h6t();N6t();V6t={webSearch:t6t,mcp:l6t,codeInterpreter:a6t,fileSearch:r6t,imageGeneration:o6t,computerUse:G6t,localShell:u6t,shell:m6t,applyPatch:p6t,toolSearch:W6t}});function R6t(t,e){return new MX({...e,description:"",metadata:{customTool:e},func:async(I,l,n)=>new Promise((a,c)=>{let r=Nl(n,{callbacks:l?.getChild()});dl.runWithConfig(Vo(r),async()=>{try{a(t(I,r))}catch(s){c(s)}})})})}var A6t=g(()=>{o();Xc();Ns();Bu()});function F6t(t){return{messages:DL({messages:t.toChatMessages()})}}var X6t=g(()=>{o();Dz()});var g6t=g(()=>{o();Dz();zhe()});var JE={};tr(JE,{AzureChatOpenAI:()=>_Dt,AzureChatOpenAICompletions:()=>xhe,AzureChatOpenAIResponses:()=>Mhe,AzureOpenAI:()=>DDt,AzureOpenAIEmbeddings:()=>PDt,BaseChatOpenAI:()=>EE,ChatOpenAI:()=>aB,ChatOpenAICompletions:()=>qz,ChatOpenAIResponses:()=>nB,DallEAPIWrapper:()=>e6t,OpenAI:()=>She,OpenAIClient:()=>oI,OpenAIEmbeddings:()=>The,completionsApiContentBlockConverter:()=>k7,convertCompletionsDeltaToBaseMessageChunk:()=>Jhe,convertCompletionsMessageToBaseMessage:()=>Ehe,convertMessagesToCompletionsMessageParams:()=>DL,convertMessagesToResponsesInput:()=>j7,convertPromptToOpenAI:()=>F6t,convertReasoningSummaryToResponsesReasoningItem:()=>fTe,convertResponsesDeltaToChatGenerationChunk:()=>Ohe,convertResponsesMessageToAIMessage:()=>x7,convertResponsesUsageToUsageMetadata:()=>Uhe,convertStandardContentBlockToCompletionsContentPart:()=>wTe,convertStandardContentMessageToCompletionsMessage:()=>HTe,convertStandardContentMessageToResponsesInput:()=>ETe,customTool:()=>R6t,getEndpoint:()=>hm,getFormattedEnv:()=>TSe,getHeadersWithUserAgent:()=>Wm,isHeaders:()=>Ahe,messageToOpenAIRole:()=>Y2,normalizeHeaders:()=>SSe,toFile:()=>iz,tools:()=>V6t,wrapOpenAIClientError:()=>pm});var iv=g(()=>{o();wE();HE();QE();L7();Dz();Che();QTe();zhe();Bhe();JTe();CTe();KDt();LTe();qDt();kTe();$Dt();xTe();Y6t();A6t();X6t();g6t();V2()});function OCl(t){return UCl.test(t)}function zCl(t){let e=t,I="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";if(e===0)return I[0];let l=[],n=62;for(;e;)l.push(I[e%n]),e=Math.floor(e/n);return l.reverse().join("")}function BCl(t){let e=0;for(let I=0;I=9?e.slice(0,9):e.padStart(9,"0")}}function OTe(t){return t?typeof t=="string"?t:t.map(e=>{if(e.type==="image_url"){if(typeof e.imageUrl!="string"&&e.imageUrl?.detail){let{detail:I}=e.imageUrl;if(I!=="high"&&I!=="auto"&&I!=="low")return{type:e.type,image_url:{url:e.imageUrl.url}}}return{type:e.type,image_url:e.imageUrl}}return e.type==="text"?{type:e.type,text:e.text}:e}):""}var UCl,Q6t=g(()=>{o();UCl=/^[a-zA-Z0-9]{9}$/});var Ee=Y(zTe=>{"use strict";o();Object.defineProperty(zTe,"__esModule",{value:!0});zTe.pathToFunc=SCl;var MCl=Object.prototype.hasOwnProperty;function SCl(t,e){let I=/\{([a-zA-Z0-9_][a-zA-Z0-9_-]*?)\}/g;return function(n={}){return t.replace(I,function(a,c){if(!MCl.call(n,c))throw new Error(`Parameter '${c}' is required`);let r=n[c];if(typeof r!="string"&&typeof r!="number")throw new Error(`Parameter '${c}' must be a string or number`);return e?.charEncoding==="percent"?encodeURIComponent(`${r}`):`${r}`})}}});var Khe=Y(Jh=>{"use strict";o();Object.defineProperty(Jh,"__esModule",{value:!0});Jh.SDK_METADATA=Jh.ServerList=Jh.ServerEu=void 0;Jh.serverURLFromOptions=_Cl;var TCl=Ee();Jh.ServerEu="eu";Jh.ServerList={[Jh.ServerEu]:"https://api.mistral.ai"};function _Cl(t){let e=t.serverURL,I={};if(!e){let n=t.server??Jh.ServerEu;e=Jh.ServerList[n]||""}let l=(0,TCl.pathToFunc)(e)(I);return new URL(l)}Jh.SDK_METADATA={language:"typescript",openapiDocVersion:"1.0.0",sdkVersion:"1.15.1",genVersion:"2.797.1",userAgent:"speakeasy-sdk/typescript 1.15.1 2.797.1 1.0.0 @mistralai/mistralai"}});var rB=Y(Dhe=>{"use strict";o();Object.defineProperty(Dhe,"__esModule",{value:!0});Dhe.readableStreamToArrayBuffer=KCl;Dhe.getContentTypeFromFileName=DCl;async function KCl(t){let e=t.getReader(),I=[],l=0,n=!1;for(;!n;){let{value:r,done:s}=await e.read();s?n=!0:(I.push(r),l+=r.length)}let a=new Uint8Array(l),c=0;for(let r of I)a.set(r,c),c+=r.length;return a.buffer}function DCl(t){if(!t)return null;let e=t.toLowerCase().split(".").pop();return e&&{json:"application/json",xml:"application/xml",html:"text/html",htm:"text/html",txt:"text/plain",csv:"text/csv",pdf:"application/pdf",png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",svg:"image/svg+xml",js:"application/javascript",css:"text/css",zip:"application/zip",tar:"application/x-tar",gz:"application/gzip",mp4:"video/mp4",mp3:"audio/mpeg",wav:"audio/wav",webp:"image/webp",ico:"image/x-icon",woff:"font/woff",woff2:"font/woff2",ttf:"font/ttf",otf:"font/otf"}[e]||null}});var LE=Y(R2=>{"use strict";o();Object.defineProperty(R2,"__esModule",{value:!0});R2.HTTPClient=void 0;R2.matchContentType=E6t;R2.matchStatusCode=J6t;R2.matchResponse=$Cl;R2.isConnectionError=e5l;R2.isTimeoutError=t5l;R2.isAbortError=I5l;var qCl=(t,e)=>e==null?fetch(t):fetch(t,e),BTe=class t{constructor(e={}){this.options=e,this.requestHooks=[],this.requestErrorHooks=[],this.responseHooks=[],this.fetcher=e.fetcher||qCl}async request(e){let I=e;for(let l of this.requestHooks){let n=await l(I);n&&(I=n)}try{let l=await this.fetcher(I);for(let n of this.responseHooks)await n(l,I);return l}catch(l){for(let n of this.requestErrorHooks)await n(l,I);throw l}}addHook(...e){if(e[0]==="beforeRequest")this.requestHooks.push(e[1]);else if(e[0]==="requestError")this.requestErrorHooks.push(e[1]);else if(e[0]==="response")this.responseHooks.push(e[1]);else throw new Error(`Invalid hook type: ${e[0]}`);return this}removeHook(...e){let I;if(e[0]==="beforeRequest")I=this.requestHooks;else if(e[0]==="requestError")I=this.requestErrorHooks;else if(e[0]==="response")I=this.responseHooks;else throw new Error(`Invalid hook type: ${e[0]}`);let l=I.findIndex(n=>n===e[1]);return l>=0&&I.splice(l,1),this}clone(){let e=new t(this.options);return e.requestHooks=this.requestHooks.slice(),e.requestErrorHooks=this.requestErrorHooks.slice(),e.responseHooks=this.responseHooks.slice(),e}};R2.HTTPClient=BTe;var f6t=/\s*;\s*/g;function E6t(t,e){if(e==="*")return!0;let I=t.headers.get("content-type")?.trim()||"application/octet-stream";I=I.toLowerCase();let l=e.toLowerCase().trim().split(f6t),[n="",...a]=l;if(n.split("/").length!==2)return!1;let c=I.split(f6t),[r="",...s]=c,[i="",G=""]=r.split("/");if(!i||!G||n!=="*/*"&&r!==n&&`${i}/*`!==n&&`*/${G}`!==n||s.length{let a=`${n}`;if(a==="default")return!0;if(!PCl.test(`${a}`))return a===I;let c=a.charAt(0);if(!c)throw new Error("Invalid status code range");let r=I.charAt(0);if(!r)throw new Error(`Invalid response status code: ${I}`);return r===c}):!1}function $Cl(t,e,I){return J6t(t,e)&&E6t(t,I)}function e5l(t){if(typeof t!="object"||t==null)return!1;let e=t instanceof TypeError&&t.message.toLowerCase().startsWith("failed to fetch"),I=t instanceof TypeError&&t.message.toLowerCase().startsWith("fetch failed"),l="name"in t&&t.name==="ConnectionError",n="code"in t&&typeof t.code=="string"&&t.code.toLowerCase()==="econnreset";return e||I||n||l}function t5l(t){if(typeof t!="object"||t==null)return!1;let e="name"in t&&t.name==="TimeoutError",I="code"in t&&t.code===23,l="code"in t&&typeof t.code=="string"&&t.code.toLowerCase()==="econnaborted";return e||I||l}function I5l(t){if(typeof t!="object"||t==null)return!1;let e="name"in t&&t.name==="AbortError",I="code"in t&&t.code===20,l="code"in t&&typeof t.code=="string"&&t.code.toLowerCase()==="econnaborted";return e||I||l}});var C6t=Y(qhe=>{"use strict";o();Object.defineProperty(qhe,"__esModule",{value:!0});qhe.CustomUserAgentHook=void 0;var l5l=Khe(),MTe=class{beforeRequest(e,I){let n=`mistral-client-typescript/${l5l.SDK_METADATA.sdkVersion}`;return I.headers.set("user-agent",n),I.headers.get("user-agent")||I.headers.set("x-mistral-user-agent",n),I}};qhe.CustomUserAgentHook=MTe});var k6t=Y(Phe=>{"use strict";o();Object.defineProperty(Phe,"__esModule",{value:!0});Phe.DeprecationWarningHook=void 0;var L6t="x-model-deprecation-timestamp",STe=class{afterSuccess(e,I){return I.headers.has(L6t)&&I.clone().json().then(l=>{let n=l.model;console.warn(`WARNING: The model ${n} is deprecated and will be removed on ${I.headers.get(L6t)}. Please refer to https://docs.mistral.ai/getting-started/models/#api-versioning for more information.`)}),I}};Phe.DeprecationWarningHook=STe});var x6t=Y(TTe=>{"use strict";o();Object.defineProperty(TTe,"__esModule",{value:!0});TTe.initHooks=c5l;var n5l=C6t(),a5l=k6t();function c5l(t){let e=new n5l.CustomUserAgentHook;t.registerBeforeRequestHook(e);let I=new a5l.DeprecationWarningHook;t.registerAfterSuccessHook(I)}});var j6t=Y($he=>{"use strict";o();Object.defineProperty($he,"__esModule",{value:!0});$he.SDKHooks=void 0;var r5l=x6t(),_Te=class{constructor(){this.sdkInitHooks=[],this.beforeCreateRequestHooks=[],this.beforeRequestHooks=[],this.afterSuccessHooks=[],this.afterErrorHooks=[];let e=[];for(let I of e)"sdkInit"in I&&this.registerSDKInitHook(I),"beforeCreateRequest"in I&&this.registerBeforeCreateRequestHook(I),"beforeRequest"in I&&this.registerBeforeRequestHook(I),"afterSuccess"in I&&this.registerAfterSuccessHook(I),"afterError"in I&&this.registerAfterErrorHook(I);(0,r5l.initHooks)(this)}registerSDKInitHook(e){this.sdkInitHooks.push(e)}registerBeforeCreateRequestHook(e){this.beforeCreateRequestHooks.push(e)}registerBeforeRequestHook(e){this.beforeRequestHooks.push(e)}registerAfterSuccessHook(e){this.afterSuccessHooks.push(e)}registerAfterErrorHook(e){this.afterErrorHooks.push(e)}sdkInit(e){return this.sdkInitHooks.reduce((I,l)=>l.sdkInit(I),e)}beforeCreateRequest(e,I){let l=I;for(let n of this.beforeCreateRequestHooks)l=n.beforeCreateRequest(e,l);return l}async beforeRequest(e,I){let l=I;for(let n of this.beforeRequestHooks)l=await n.beforeRequest(e,l);return l}async afterSuccess(e,I){let l=I;for(let n of this.afterSuccessHooks)l=await n.afterSuccess(e,l);return l}async afterError(e,I,l){let n=I,a=l;for(let c of this.afterErrorHooks){let r=await c.afterError(e,n,a);n=r.response,a=r.error}return{response:n,error:a}}};$he.SDKHooks=_Te});var e_e=Y(Nm=>{"use strict";o();Object.defineProperty(Nm,"__esModule",{value:!0});Nm.ConnectionError=Nm.RequestTimeoutError=Nm.RequestAbortedError=Nm.InvalidRequestError=Nm.UnexpectedClientError=Nm.HTTPClientError=void 0;var kE=class extends Error{constructor(e,I){let l=e;I?.cause&&(l+=`: ${I.cause}`),super(l,I),this.name="HTTPClientError",typeof this.cause>"u"&&(this.cause=I?.cause)}};Nm.HTTPClientError=kE;var KTe=class extends kE{constructor(){super(...arguments),this.name="UnexpectedClientError"}};Nm.UnexpectedClientError=KTe;var DTe=class extends kE{constructor(){super(...arguments),this.name="InvalidRequestError"}};Nm.InvalidRequestError=DTe;var qTe=class extends kE{constructor(){super(...arguments),this.name="RequestAbortedError"}};Nm.RequestAbortedError=qTe;var PTe=class extends kE{constructor(){super(...arguments),this.name="RequestTimeoutError"}};Nm.RequestTimeoutError=PTe;var $Te=class extends kE{constructor(){super(...arguments),this.name="ConnectionError"}};Nm.ConnectionError=$Te});var da=Y(sB=>{"use strict";o();Object.defineProperty(sB,"__esModule",{value:!0});sB.OK=s5l;sB.ERR=o5l;sB.unwrap=i5l;sB.unwrapAsync=G5l;function s5l(t){return{ok:!0,value:t}}function o5l(t){return{ok:!1,error:t}}function i5l(t){if(!t.ok)throw t.error;return t.value}async function G5l(t){let e=await t;if(!e.ok)throw e.error;return e.value}});var z7=Y(Ea=>{"use strict";o();Object.defineProperty(Ea,"__esModule",{value:!0});Ea.getParsedType=Ea.ZodParsedType=Ea.objectUtil=Ea.util=void 0;var t_e;(function(t){t.assertEqual=n=>{};function e(n){}t.assertIs=e;function I(n){throw new Error}t.assertNever=I,t.arrayToEnum=n=>{let a={};for(let c of n)a[c]=c;return a},t.getValidEnumValues=n=>{let a=t.objectKeys(n).filter(r=>typeof n[n[r]]!="number"),c={};for(let r of a)c[r]=n[r];return t.objectValues(c)},t.objectValues=n=>t.objectKeys(n).map(function(a){return n[a]}),t.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let a=[];for(let c in n)Object.prototype.hasOwnProperty.call(n,c)&&a.push(c);return a},t.find=(n,a)=>{for(let c of n)if(a(c))return c},t.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function l(n,a=" | "){return n.map(c=>typeof c=="string"?`'${c}'`:c).join(a)}t.joinValues=l,t.jsonStringifyReplacer=(n,a)=>typeof a=="bigint"?a.toString():a})(t_e||(Ea.util=t_e={}));var U6t;(function(t){t.mergeShapes=(e,I)=>({...e,...I})})(U6t||(Ea.objectUtil=U6t={}));Ea.ZodParsedType=t_e.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);var d5l=t=>{switch(typeof t){case"undefined":return Ea.ZodParsedType.undefined;case"string":return Ea.ZodParsedType.string;case"number":return Number.isNaN(t)?Ea.ZodParsedType.nan:Ea.ZodParsedType.number;case"boolean":return Ea.ZodParsedType.boolean;case"function":return Ea.ZodParsedType.function;case"bigint":return Ea.ZodParsedType.bigint;case"symbol":return Ea.ZodParsedType.symbol;case"object":return Array.isArray(t)?Ea.ZodParsedType.array:t===null?Ea.ZodParsedType.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?Ea.ZodParsedType.promise:typeof Map<"u"&&t instanceof Map?Ea.ZodParsedType.map:typeof Set<"u"&&t instanceof Set?Ea.ZodParsedType.set:typeof Date<"u"&&t instanceof Date?Ea.ZodParsedType.date:Ea.ZodParsedType.object;default:return Ea.ZodParsedType.unknown}};Ea.getParsedType=d5l});var eWe=Y(xE=>{"use strict";o();Object.defineProperty(xE,"__esModule",{value:!0});xE.ZodError=xE.quotelessJson=xE.ZodIssueCode=void 0;var O6t=z7();xE.ZodIssueCode=O6t.util.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);var u5l=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");xE.quotelessJson=u5l;var B7=class t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=l=>{this.issues=[...this.issues,l]},this.addIssues=(l=[])=>{this.issues=[...this.issues,...l]};let I=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,I):this.__proto__=I,this.name="ZodError",this.issues=e}format(e){let I=e||function(a){return a.message},l={_errors:[]},n=a=>{for(let c of a.issues)if(c.code==="invalid_union")c.unionErrors.map(n);else if(c.code==="invalid_return_type")n(c.returnTypeError);else if(c.code==="invalid_arguments")n(c.argumentsError);else if(c.path.length===0)l._errors.push(I(c));else{let r=l,s=0;for(;sI.message){let I={},l=[];for(let n of this.issues)if(n.path.length>0){let a=n.path[0];I[a]=I[a]||[],I[a].push(e(n))}else l.push(e(n));return{formErrors:l,fieldErrors:I}}get formErrors(){return this.flatten()}};xE.ZodError=B7;B7.create=t=>new B7(t)});var l_e=Y(I_e=>{"use strict";o();Object.defineProperty(I_e,"__esModule",{value:!0});var EG=eWe(),qL=z7(),b5l=(t,e)=>{let I;switch(t.code){case EG.ZodIssueCode.invalid_type:t.received===qL.ZodParsedType.undefined?I="Required":I=`Expected ${t.expected}, received ${t.received}`;break;case EG.ZodIssueCode.invalid_literal:I=`Invalid literal value, expected ${JSON.stringify(t.expected,qL.util.jsonStringifyReplacer)}`;break;case EG.ZodIssueCode.unrecognized_keys:I=`Unrecognized key(s) in object: ${qL.util.joinValues(t.keys,", ")}`;break;case EG.ZodIssueCode.invalid_union:I="Invalid input";break;case EG.ZodIssueCode.invalid_union_discriminator:I=`Invalid discriminator value. Expected ${qL.util.joinValues(t.options)}`;break;case EG.ZodIssueCode.invalid_enum_value:I=`Invalid enum value. Expected ${qL.util.joinValues(t.options)}, received '${t.received}'`;break;case EG.ZodIssueCode.invalid_arguments:I="Invalid function arguments";break;case EG.ZodIssueCode.invalid_return_type:I="Invalid function return type";break;case EG.ZodIssueCode.invalid_date:I="Invalid date";break;case EG.ZodIssueCode.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(I=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(I=`${I} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?I=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?I=`Invalid input: must end with "${t.validation.endsWith}"`:qL.util.assertNever(t.validation):t.validation!=="regex"?I=`Invalid ${t.validation}`:I="Invalid";break;case EG.ZodIssueCode.too_small:t.type==="array"?I=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?I=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?I=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?I=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?I=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:I="Invalid input";break;case EG.ZodIssueCode.too_big:t.type==="array"?I=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?I=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?I=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?I=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?I=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:I="Invalid input";break;case EG.ZodIssueCode.custom:I="Invalid input";break;case EG.ZodIssueCode.invalid_intersection_types:I="Intersection results could not be merged";break;case EG.ZodIssueCode.not_multiple_of:I=`Number must be a multiple of ${t.multipleOf}`;break;case EG.ZodIssueCode.not_finite:I="Number must be finite";break;default:I=e.defaultError,qL.util.assertNever(t)}return{message:I}};I_e.default=b5l});var tWe=Y(jE=>{"use strict";o();var m5l=jE&&jE.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(jE,"__esModule",{value:!0});jE.defaultErrorMap=void 0;jE.setErrorMap=Z5l;jE.getErrorMap=p5l;var z6t=m5l(l_e());jE.defaultErrorMap=z6t.default;var B6t=z6t.default;function Z5l(t){B6t=t}function p5l(){return B6t}});var a_e=Y(Sn=>{"use strict";o();var h5l=Sn&&Sn.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Sn,"__esModule",{value:!0});Sn.isAsync=Sn.isValid=Sn.isDirty=Sn.isAborted=Sn.OK=Sn.DIRTY=Sn.INVALID=Sn.ParseStatus=Sn.EMPTY_PATH=Sn.makeIssue=void 0;Sn.addIssueToContext=V5l;var W5l=tWe(),M6t=h5l(l_e()),N5l=t=>{let{data:e,path:I,errorMaps:l,issueData:n}=t,a=[...I,...n.path||[]],c={...n,path:a};if(n.message!==void 0)return{...n,path:a,message:n.message};let r="",s=l.filter(i=>!!i).slice().reverse();for(let i of s)r=i(c,{data:e,defaultError:r}).message;return{...n,path:a,message:r}};Sn.makeIssue=N5l;Sn.EMPTY_PATH=[];function V5l(t,e){let I=(0,W5l.getErrorMap)(),l=(0,Sn.makeIssue)({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,I,I===M6t.default?void 0:M6t.default].filter(n=>!!n)});t.common.issues.push(l)}var n_e=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,I){let l=[];for(let n of I){if(n.status==="aborted")return Sn.INVALID;n.status==="dirty"&&e.dirty(),l.push(n.value)}return{status:e.value,value:l}}static async mergeObjectAsync(e,I){let l=[];for(let n of I){let a=await n.key,c=await n.value;l.push({key:a,value:c})}return t.mergeObjectSync(e,l)}static mergeObjectSync(e,I){let l={};for(let n of I){let{key:a,value:c}=n;if(a.status==="aborted"||c.status==="aborted")return Sn.INVALID;a.status==="dirty"&&e.dirty(),c.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof c.value<"u"||n.alwaysSet)&&(l[a.value]=c.value)}return{status:e.value,value:l}}};Sn.ParseStatus=n_e;Sn.INVALID=Object.freeze({status:"aborted"});var Y5l=t=>({status:"dirty",value:t});Sn.DIRTY=Y5l;var R5l=t=>({status:"valid",value:t});Sn.OK=R5l;var A5l=t=>t.status==="aborted";Sn.isAborted=A5l;var F5l=t=>t.status==="dirty";Sn.isDirty=F5l;var X5l=t=>t.status==="valid";Sn.isValid=X5l;var g5l=t=>typeof Promise<"u"&&t instanceof Promise;Sn.isAsync=g5l});var T6t=Y(S6t=>{"use strict";o();Object.defineProperty(S6t,"__esModule",{value:!0})});var K6t=Y(IWe=>{"use strict";o();Object.defineProperty(IWe,"__esModule",{value:!0});IWe.errorUtil=void 0;var _6t;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(_6t||(IWe.errorUtil=_6t={}))});var rqt=Y(Ge=>{"use strict";o();Object.defineProperty(Ge,"__esModule",{value:!0});Ge.discriminatedUnion=Ge.date=Ge.boolean=Ge.bigint=Ge.array=Ge.any=Ge.coerce=Ge.ZodFirstPartyTypeKind=Ge.late=Ge.ZodSchema=Ge.Schema=Ge.ZodReadonly=Ge.ZodPipeline=Ge.ZodBranded=Ge.BRAND=Ge.ZodNaN=Ge.ZodCatch=Ge.ZodDefault=Ge.ZodNullable=Ge.ZodOptional=Ge.ZodTransformer=Ge.ZodEffects=Ge.ZodPromise=Ge.ZodNativeEnum=Ge.ZodEnum=Ge.ZodLiteral=Ge.ZodLazy=Ge.ZodFunction=Ge.ZodSet=Ge.ZodMap=Ge.ZodRecord=Ge.ZodTuple=Ge.ZodIntersection=Ge.ZodDiscriminatedUnion=Ge.ZodUnion=Ge.ZodObject=Ge.ZodArray=Ge.ZodVoid=Ge.ZodNever=Ge.ZodUnknown=Ge.ZodAny=Ge.ZodNull=Ge.ZodUndefined=Ge.ZodSymbol=Ge.ZodDate=Ge.ZodBoolean=Ge.ZodBigInt=Ge.ZodNumber=Ge.ZodString=Ge.ZodType=void 0;Ge.NEVER=Ge.void=Ge.unknown=Ge.union=Ge.undefined=Ge.tuple=Ge.transformer=Ge.symbol=Ge.string=Ge.strictObject=Ge.set=Ge.record=Ge.promise=Ge.preprocess=Ge.pipeline=Ge.ostring=Ge.optional=Ge.onumber=Ge.oboolean=Ge.object=Ge.number=Ge.nullable=Ge.null=Ge.never=Ge.nativeEnum=Ge.nan=Ge.map=Ge.literal=Ge.lazy=Ge.intersection=Ge.instanceof=Ge.function=Ge.enum=Ge.effect=void 0;Ge.datetimeRegex=eqt;Ge.custom=Iqt;var st=eWe(),lWe=tWe(),lI=K6t(),ue=a_e(),bt=z7(),Lh=class{constructor(e,I,l,n){this._cachedPath=[],this.parent=e,this.data=I,this._path=l,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},D6t=(t,e)=>{if((0,ue.isValid)(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let I=new st.ZodError(t.common.issues);return this._error=I,this._error}}};function nl(t){if(!t)return{};let{errorMap:e,invalid_type_error:I,required_error:l,description:n}=t;if(e&&(I||l))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(c,r)=>{let{message:s}=t;return c.code==="invalid_enum_value"?{message:s??r.defaultError}:typeof r.data>"u"?{message:s??l??r.defaultError}:c.code!=="invalid_type"?{message:r.defaultError}:{message:s??I??r.defaultError}},description:n}}var al=class{get description(){return this._def.description}_getType(e){return(0,bt.getParsedType)(e.data)}_getOrReturnCtx(e,I){return I||{common:e.parent.common,data:e.data,parsedType:(0,bt.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new ue.ParseStatus,ctx:{common:e.parent.common,data:e.data,parsedType:(0,bt.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let I=this._parse(e);if((0,ue.isAsync)(I))throw new Error("Synchronous parse encountered promise.");return I}_parseAsync(e){let I=this._parse(e);return Promise.resolve(I)}parse(e,I){let l=this.safeParse(e,I);if(l.success)return l.data;throw l.error}safeParse(e,I){let l={common:{issues:[],async:I?.async??!1,contextualErrorMap:I?.errorMap},path:I?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,bt.getParsedType)(e)},n=this._parseSync({data:e,path:l.path,parent:l});return D6t(l,n)}"~validate"(e){let I={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,bt.getParsedType)(e)};if(!this["~standard"].async)try{let l=this._parseSync({data:e,path:[],parent:I});return(0,ue.isValid)(l)?{value:l.value}:{issues:I.common.issues}}catch(l){l?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),I.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:I}).then(l=>(0,ue.isValid)(l)?{value:l.value}:{issues:I.common.issues})}async parseAsync(e,I){let l=await this.safeParseAsync(e,I);if(l.success)return l.data;throw l.error}async safeParseAsync(e,I){let l={common:{issues:[],contextualErrorMap:I?.errorMap,async:!0},path:I?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,bt.getParsedType)(e)},n=this._parse({data:e,path:l.path,parent:l}),a=await((0,ue.isAsync)(n)?n:Promise.resolve(n));return D6t(l,a)}refine(e,I){let l=n=>typeof I=="string"||typeof I>"u"?{message:I}:typeof I=="function"?I(n):I;return this._refinement((n,a)=>{let c=e(n),r=()=>a.addIssue({code:st.ZodIssueCode.custom,...l(n)});return typeof Promise<"u"&&c instanceof Promise?c.then(s=>s?!0:(r(),!1)):c?!0:(r(),!1)})}refinement(e,I){return this._refinement((l,n)=>e(l)?!0:(n.addIssue(typeof I=="function"?I(l,n):I),!1))}_refinement(e){return new kZ({schema:this,typeName:QI.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:I=>this["~validate"](I)}}optional(){return Ch.create(this,this._def)}nullable(){return F2.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return uv.create(this)}promise(){return zE.create(this,this._def)}or(e){return nk.create([this,e],this._def)}and(e){return ak.create(this,e,this._def)}transform(e){return new kZ({...nl(this._def),schema:this,typeName:QI.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let I=typeof e=="function"?e:()=>e;return new ik({...nl(this._def),innerType:this,defaultValue:I,typeName:QI.ZodDefault})}brand(){return new M7({typeName:QI.ZodBranded,type:this,...nl(this._def)})}catch(e){let I=typeof e=="function"?e:()=>e;return new Gk({...nl(this._def),innerType:this,catchValue:I,typeName:QI.ZodCatch})}describe(e){let I=this.constructor;return new I({...this._def,description:e})}pipe(e){return S7.create(this,e)}readonly(){return dk.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};Ge.ZodType=al;Ge.Schema=al;Ge.ZodSchema=al;var v5l=/^c[^\s-]{8,}$/i,y5l=/^[0-9a-z]+$/,w5l=/^[0-9A-HJKMNP-TV-Z]{26}$/i,H5l=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Q5l=/^[a-z0-9_-]{21}$/i,f5l=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,E5l=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,J5l=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,C5l="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",c_e,L5l=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,k5l=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,x5l=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,j5l=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,U5l=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,O5l=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,P6t="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",z5l=new RegExp(`^${P6t}$`);function $6t(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);let I=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${I}`}function B5l(t){return new RegExp(`^${$6t(t)}$`)}function eqt(t){let e=`${P6t}T${$6t(t)}`,I=[];return I.push(t.local?"Z?":"Z"),t.offset&&I.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${I.join("|")})`,new RegExp(`^${e}$`)}function M5l(t,e){return!!((e==="v4"||!e)&&L5l.test(t)||(e==="v6"||!e)&&x5l.test(t))}function S5l(t,e){if(!f5l.test(t))return!1;try{let[I]=t.split(".");if(!I)return!1;let l=I.replace(/-/g,"+").replace(/_/g,"/").padEnd(I.length+(4-I.length%4)%4,"="),n=JSON.parse(atob(l));return!(typeof n!="object"||n===null||"typ"in n&&n?.typ!=="JWT"||!n.alg||e&&n.alg!==e)}catch{return!1}}function T5l(t,e){return!!((e==="v4"||!e)&&k5l.test(t)||(e==="v6"||!e)&&j5l.test(t))}var UE=class t extends al{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==bt.ZodParsedType.string){let a=this._getOrReturnCtx(e);return(0,ue.addIssueToContext)(a,{code:st.ZodIssueCode.invalid_type,expected:bt.ZodParsedType.string,received:a.parsedType}),ue.INVALID}let l=new ue.ParseStatus,n;for(let a of this._def.checks)if(a.kind==="min")e.data.lengtha.value&&(n=this._getOrReturnCtx(e,n),(0,ue.addIssueToContext)(n,{code:st.ZodIssueCode.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),l.dirty());else if(a.kind==="length"){let c=e.data.length>a.value,r=e.data.lengthe.test(n),{validation:I,code:st.ZodIssueCode.invalid_string,...lI.errorUtil.errToObj(l)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...lI.errorUtil.errToObj(e)})}url(e){return this._addCheck({kind:"url",...lI.errorUtil.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...lI.errorUtil.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...lI.errorUtil.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...lI.errorUtil.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...lI.errorUtil.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...lI.errorUtil.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...lI.errorUtil.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...lI.errorUtil.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...lI.errorUtil.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...lI.errorUtil.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...lI.errorUtil.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...lI.errorUtil.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...lI.errorUtil.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...lI.errorUtil.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...lI.errorUtil.errToObj(e)})}regex(e,I){return this._addCheck({kind:"regex",regex:e,...lI.errorUtil.errToObj(I)})}includes(e,I){return this._addCheck({kind:"includes",value:e,position:I?.position,...lI.errorUtil.errToObj(I?.message)})}startsWith(e,I){return this._addCheck({kind:"startsWith",value:e,...lI.errorUtil.errToObj(I)})}endsWith(e,I){return this._addCheck({kind:"endsWith",value:e,...lI.errorUtil.errToObj(I)})}min(e,I){return this._addCheck({kind:"min",value:e,...lI.errorUtil.errToObj(I)})}max(e,I){return this._addCheck({kind:"max",value:e,...lI.errorUtil.errToObj(I)})}length(e,I){return this._addCheck({kind:"length",value:e,...lI.errorUtil.errToObj(I)})}nonempty(e){return this.min(1,lI.errorUtil.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let I of this._def.checks)I.kind==="min"&&(e===null||I.value>e)&&(e=I.value);return e}get maxLength(){let e=null;for(let I of this._def.checks)I.kind==="max"&&(e===null||I.valuenew UE({checks:[],typeName:QI.ZodString,coerce:t?.coerce??!1,...nl(t)});function _5l(t,e){let I=(t.toString().split(".")[1]||"").length,l=(e.toString().split(".")[1]||"").length,n=I>l?I:l,a=Number.parseInt(t.toFixed(n).replace(".","")),c=Number.parseInt(e.toFixed(n).replace(".",""));return a%c/10**n}var PL=class t extends al{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==bt.ZodParsedType.number){let a=this._getOrReturnCtx(e);return(0,ue.addIssueToContext)(a,{code:st.ZodIssueCode.invalid_type,expected:bt.ZodParsedType.number,received:a.parsedType}),ue.INVALID}let l,n=new ue.ParseStatus;for(let a of this._def.checks)a.kind==="int"?bt.util.isInteger(e.data)||(l=this._getOrReturnCtx(e,l),(0,ue.addIssueToContext)(l,{code:st.ZodIssueCode.invalid_type,expected:"integer",received:"float",message:a.message}),n.dirty()):a.kind==="min"?(a.inclusive?e.dataa.value:e.data>=a.value)&&(l=this._getOrReturnCtx(e,l),(0,ue.addIssueToContext)(l,{code:st.ZodIssueCode.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="multipleOf"?_5l(e.data,a.value)!==0&&(l=this._getOrReturnCtx(e,l),(0,ue.addIssueToContext)(l,{code:st.ZodIssueCode.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(l=this._getOrReturnCtx(e,l),(0,ue.addIssueToContext)(l,{code:st.ZodIssueCode.not_finite,message:a.message}),n.dirty()):bt.util.assertNever(a);return{status:n.value,value:e.data}}gte(e,I){return this.setLimit("min",e,!0,lI.errorUtil.toString(I))}gt(e,I){return this.setLimit("min",e,!1,lI.errorUtil.toString(I))}lte(e,I){return this.setLimit("max",e,!0,lI.errorUtil.toString(I))}lt(e,I){return this.setLimit("max",e,!1,lI.errorUtil.toString(I))}setLimit(e,I,l,n){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:I,inclusive:l,message:lI.errorUtil.toString(n)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:lI.errorUtil.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:lI.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:lI.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:lI.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:lI.errorUtil.toString(e)})}multipleOf(e,I){return this._addCheck({kind:"multipleOf",value:e,message:lI.errorUtil.toString(I)})}finite(e){return this._addCheck({kind:"finite",message:lI.errorUtil.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:lI.errorUtil.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:lI.errorUtil.toString(e)})}get minValue(){let e=null;for(let I of this._def.checks)I.kind==="min"&&(e===null||I.value>e)&&(e=I.value);return e}get maxValue(){let e=null;for(let I of this._def.checks)I.kind==="max"&&(e===null||I.valuee.kind==="int"||e.kind==="multipleOf"&&bt.util.isInteger(e.value))}get isFinite(){let e=null,I=null;for(let l of this._def.checks){if(l.kind==="finite"||l.kind==="int"||l.kind==="multipleOf")return!0;l.kind==="min"?(I===null||l.value>I)&&(I=l.value):l.kind==="max"&&(e===null||l.valuenew PL({checks:[],typeName:QI.ZodNumber,coerce:t?.coerce||!1,...nl(t)});var $L=class t extends al{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==bt.ZodParsedType.bigint)return this._getInvalidInput(e);let l,n=new ue.ParseStatus;for(let a of this._def.checks)a.kind==="min"?(a.inclusive?e.dataa.value:e.data>=a.value)&&(l=this._getOrReturnCtx(e,l),(0,ue.addIssueToContext)(l,{code:st.ZodIssueCode.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(l=this._getOrReturnCtx(e,l),(0,ue.addIssueToContext)(l,{code:st.ZodIssueCode.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):bt.util.assertNever(a);return{status:n.value,value:e.data}}_getInvalidInput(e){let I=this._getOrReturnCtx(e);return(0,ue.addIssueToContext)(I,{code:st.ZodIssueCode.invalid_type,expected:bt.ZodParsedType.bigint,received:I.parsedType}),ue.INVALID}gte(e,I){return this.setLimit("min",e,!0,lI.errorUtil.toString(I))}gt(e,I){return this.setLimit("min",e,!1,lI.errorUtil.toString(I))}lte(e,I){return this.setLimit("max",e,!0,lI.errorUtil.toString(I))}lt(e,I){return this.setLimit("max",e,!1,lI.errorUtil.toString(I))}setLimit(e,I,l,n){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:I,inclusive:l,message:lI.errorUtil.toString(n)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:lI.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:lI.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:lI.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:lI.errorUtil.toString(e)})}multipleOf(e,I){return this._addCheck({kind:"multipleOf",value:e,message:lI.errorUtil.toString(I)})}get minValue(){let e=null;for(let I of this._def.checks)I.kind==="min"&&(e===null||I.value>e)&&(e=I.value);return e}get maxValue(){let e=null;for(let I of this._def.checks)I.kind==="max"&&(e===null||I.valuenew $L({checks:[],typeName:QI.ZodBigInt,coerce:t?.coerce??!1,...nl(t)});var ek=class extends al{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==bt.ZodParsedType.boolean){let l=this._getOrReturnCtx(e);return(0,ue.addIssueToContext)(l,{code:st.ZodIssueCode.invalid_type,expected:bt.ZodParsedType.boolean,received:l.parsedType}),ue.INVALID}return(0,ue.OK)(e.data)}};Ge.ZodBoolean=ek;ek.create=t=>new ek({typeName:QI.ZodBoolean,coerce:t?.coerce||!1,...nl(t)});var tk=class t extends al{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==bt.ZodParsedType.date){let a=this._getOrReturnCtx(e);return(0,ue.addIssueToContext)(a,{code:st.ZodIssueCode.invalid_type,expected:bt.ZodParsedType.date,received:a.parsedType}),ue.INVALID}if(Number.isNaN(e.data.getTime())){let a=this._getOrReturnCtx(e);return(0,ue.addIssueToContext)(a,{code:st.ZodIssueCode.invalid_date}),ue.INVALID}let l=new ue.ParseStatus,n;for(let a of this._def.checks)a.kind==="min"?e.data.getTime()a.value&&(n=this._getOrReturnCtx(e,n),(0,ue.addIssueToContext)(n,{code:st.ZodIssueCode.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),l.dirty()):bt.util.assertNever(a);return{status:l.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,I){return this._addCheck({kind:"min",value:e.getTime(),message:lI.errorUtil.toString(I)})}max(e,I){return this._addCheck({kind:"max",value:e.getTime(),message:lI.errorUtil.toString(I)})}get minDate(){let e=null;for(let I of this._def.checks)I.kind==="min"&&(e===null||I.value>e)&&(e=I.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let I of this._def.checks)I.kind==="max"&&(e===null||I.valuenew tk({checks:[],coerce:t?.coerce||!1,typeName:QI.ZodDate,...nl(t)});var iB=class extends al{_parse(e){if(this._getType(e)!==bt.ZodParsedType.symbol){let l=this._getOrReturnCtx(e);return(0,ue.addIssueToContext)(l,{code:st.ZodIssueCode.invalid_type,expected:bt.ZodParsedType.symbol,received:l.parsedType}),ue.INVALID}return(0,ue.OK)(e.data)}};Ge.ZodSymbol=iB;iB.create=t=>new iB({typeName:QI.ZodSymbol,...nl(t)});var Ik=class extends al{_parse(e){if(this._getType(e)!==bt.ZodParsedType.undefined){let l=this._getOrReturnCtx(e);return(0,ue.addIssueToContext)(l,{code:st.ZodIssueCode.invalid_type,expected:bt.ZodParsedType.undefined,received:l.parsedType}),ue.INVALID}return(0,ue.OK)(e.data)}};Ge.ZodUndefined=Ik;Ik.create=t=>new Ik({typeName:QI.ZodUndefined,...nl(t)});var lk=class extends al{_parse(e){if(this._getType(e)!==bt.ZodParsedType.null){let l=this._getOrReturnCtx(e);return(0,ue.addIssueToContext)(l,{code:st.ZodIssueCode.invalid_type,expected:bt.ZodParsedType.null,received:l.parsedType}),ue.INVALID}return(0,ue.OK)(e.data)}};Ge.ZodNull=lk;lk.create=t=>new lk({typeName:QI.ZodNull,...nl(t)});var OE=class extends al{constructor(){super(...arguments),this._any=!0}_parse(e){return(0,ue.OK)(e.data)}};Ge.ZodAny=OE;OE.create=t=>new OE({typeName:QI.ZodAny,...nl(t)});var dv=class extends al{constructor(){super(...arguments),this._unknown=!0}_parse(e){return(0,ue.OK)(e.data)}};Ge.ZodUnknown=dv;dv.create=t=>new dv({typeName:QI.ZodUnknown,...nl(t)});var nA=class extends al{_parse(e){let I=this._getOrReturnCtx(e);return(0,ue.addIssueToContext)(I,{code:st.ZodIssueCode.invalid_type,expected:bt.ZodParsedType.never,received:I.parsedType}),ue.INVALID}};Ge.ZodNever=nA;nA.create=t=>new nA({typeName:QI.ZodNever,...nl(t)});var GB=class extends al{_parse(e){if(this._getType(e)!==bt.ZodParsedType.undefined){let l=this._getOrReturnCtx(e);return(0,ue.addIssueToContext)(l,{code:st.ZodIssueCode.invalid_type,expected:bt.ZodParsedType.void,received:l.parsedType}),ue.INVALID}return(0,ue.OK)(e.data)}};Ge.ZodVoid=GB;GB.create=t=>new GB({typeName:QI.ZodVoid,...nl(t)});var uv=class t extends al{_parse(e){let{ctx:I,status:l}=this._processInputParams(e),n=this._def;if(I.parsedType!==bt.ZodParsedType.array)return(0,ue.addIssueToContext)(I,{code:st.ZodIssueCode.invalid_type,expected:bt.ZodParsedType.array,received:I.parsedType}),ue.INVALID;if(n.exactLength!==null){let c=I.data.length>n.exactLength.value,r=I.data.lengthn.maxLength.value&&((0,ue.addIssueToContext)(I,{code:st.ZodIssueCode.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),l.dirty()),I.common.async)return Promise.all([...I.data].map((c,r)=>n.type._parseAsync(new Lh(I,c,I.path,r)))).then(c=>ue.ParseStatus.mergeArray(l,c));let a=[...I.data].map((c,r)=>n.type._parseSync(new Lh(I,c,I.path,r)));return ue.ParseStatus.mergeArray(l,a)}get element(){return this._def.type}min(e,I){return new t({...this._def,minLength:{value:e,message:lI.errorUtil.toString(I)}})}max(e,I){return new t({...this._def,maxLength:{value:e,message:lI.errorUtil.toString(I)}})}length(e,I){return new t({...this._def,exactLength:{value:e,message:lI.errorUtil.toString(I)}})}nonempty(e){return this.min(1,e)}};Ge.ZodArray=uv;uv.create=(t,e)=>new uv({type:t,minLength:null,maxLength:null,exactLength:null,typeName:QI.ZodArray,...nl(e)});function oB(t){if(t instanceof Vm){let e={};for(let I in t.shape){let l=t.shape[I];e[I]=Ch.create(oB(l))}return new Vm({...t._def,shape:()=>e})}else return t instanceof uv?new uv({...t._def,type:oB(t.element)}):t instanceof Ch?Ch.create(oB(t.unwrap())):t instanceof F2?F2.create(oB(t.unwrap())):t instanceof A2?A2.create(t.items.map(e=>oB(e))):t}var Vm=class t extends al{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),I=bt.util.objectKeys(e);return this._cached={shape:e,keys:I},this._cached}_parse(e){if(this._getType(e)!==bt.ZodParsedType.object){let i=this._getOrReturnCtx(e);return(0,ue.addIssueToContext)(i,{code:st.ZodIssueCode.invalid_type,expected:bt.ZodParsedType.object,received:i.parsedType}),ue.INVALID}let{status:l,ctx:n}=this._processInputParams(e),{shape:a,keys:c}=this._getCached(),r=[];if(!(this._def.catchall instanceof nA&&this._def.unknownKeys==="strip"))for(let i in n.data)c.includes(i)||r.push(i);let s=[];for(let i of c){let G=a[i],d=n.data[i];s.push({key:{status:"valid",value:i},value:G._parse(new Lh(n,d,n.path,i)),alwaysSet:i in n.data})}if(this._def.catchall instanceof nA){let i=this._def.unknownKeys;if(i==="passthrough")for(let G of r)s.push({key:{status:"valid",value:G},value:{status:"valid",value:n.data[G]}});else if(i==="strict")r.length>0&&((0,ue.addIssueToContext)(n,{code:st.ZodIssueCode.unrecognized_keys,keys:r}),l.dirty());else if(i!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let i=this._def.catchall;for(let G of r){let d=n.data[G];s.push({key:{status:"valid",value:G},value:i._parse(new Lh(n,d,n.path,G)),alwaysSet:G in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let i=[];for(let G of s){let d=await G.key,u=await G.value;i.push({key:d,value:u,alwaysSet:G.alwaysSet})}return i}).then(i=>ue.ParseStatus.mergeObjectSync(l,i)):ue.ParseStatus.mergeObjectSync(l,s)}get shape(){return this._def.shape()}strict(e){return lI.errorUtil.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(I,l)=>{let n=this._def.errorMap?.(I,l).message??l.defaultError;return I.code==="unrecognized_keys"?{message:lI.errorUtil.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:QI.ZodObject})}setKey(e,I){return this.augment({[e]:I})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let I={};for(let l of bt.util.objectKeys(e))e[l]&&this.shape[l]&&(I[l]=this.shape[l]);return new t({...this._def,shape:()=>I})}omit(e){let I={};for(let l of bt.util.objectKeys(this.shape))e[l]||(I[l]=this.shape[l]);return new t({...this._def,shape:()=>I})}deepPartial(){return oB(this)}partial(e){let I={};for(let l of bt.util.objectKeys(this.shape)){let n=this.shape[l];e&&!e[l]?I[l]=n:I[l]=n.optional()}return new t({...this._def,shape:()=>I})}required(e){let I={};for(let l of bt.util.objectKeys(this.shape))if(e&&!e[l])I[l]=this.shape[l];else{let a=this.shape[l];for(;a instanceof Ch;)a=a._def.innerType;I[l]=a}return new t({...this._def,shape:()=>I})}keyof(){return tqt(bt.util.objectKeys(this.shape))}};Ge.ZodObject=Vm;Vm.create=(t,e)=>new Vm({shape:()=>t,unknownKeys:"strip",catchall:nA.create(),typeName:QI.ZodObject,...nl(e)});Vm.strictCreate=(t,e)=>new Vm({shape:()=>t,unknownKeys:"strict",catchall:nA.create(),typeName:QI.ZodObject,...nl(e)});Vm.lazycreate=(t,e)=>new Vm({shape:t,unknownKeys:"strip",catchall:nA.create(),typeName:QI.ZodObject,...nl(e)});var nk=class extends al{_parse(e){let{ctx:I}=this._processInputParams(e),l=this._def.options;function n(a){for(let r of a)if(r.result.status==="valid")return r.result;for(let r of a)if(r.result.status==="dirty")return I.common.issues.push(...r.ctx.common.issues),r.result;let c=a.map(r=>new st.ZodError(r.ctx.common.issues));return(0,ue.addIssueToContext)(I,{code:st.ZodIssueCode.invalid_union,unionErrors:c}),ue.INVALID}if(I.common.async)return Promise.all(l.map(async a=>{let c={...I,common:{...I.common,issues:[]},parent:null};return{result:await a._parseAsync({data:I.data,path:I.path,parent:c}),ctx:c}})).then(n);{let a,c=[];for(let s of l){let i={...I,common:{...I.common,issues:[]},parent:null},G=s._parseSync({data:I.data,path:I.path,parent:i});if(G.status==="valid")return G;G.status==="dirty"&&!a&&(a={result:G,ctx:i}),i.common.issues.length&&c.push(i.common.issues)}if(a)return I.common.issues.push(...a.ctx.common.issues),a.result;let r=c.map(s=>new st.ZodError(s));return(0,ue.addIssueToContext)(I,{code:st.ZodIssueCode.invalid_union,unionErrors:r}),ue.INVALID}}get options(){return this._def.options}};Ge.ZodUnion=nk;nk.create=(t,e)=>new nk({options:t,typeName:QI.ZodUnion,...nl(e)});var Gv=t=>t instanceof ck?Gv(t.schema):t instanceof kZ?Gv(t.innerType()):t instanceof rk?[t.value]:t instanceof sk?t.options:t instanceof ok?bt.util.objectValues(t.enum):t instanceof ik?Gv(t._def.innerType):t instanceof Ik?[void 0]:t instanceof lk?[null]:t instanceof Ch?[void 0,...Gv(t.unwrap())]:t instanceof F2?[null,...Gv(t.unwrap())]:t instanceof M7||t instanceof dk?Gv(t.unwrap()):t instanceof Gk?Gv(t._def.innerType):[],nWe=class t extends al{_parse(e){let{ctx:I}=this._processInputParams(e);if(I.parsedType!==bt.ZodParsedType.object)return(0,ue.addIssueToContext)(I,{code:st.ZodIssueCode.invalid_type,expected:bt.ZodParsedType.object,received:I.parsedType}),ue.INVALID;let l=this.discriminator,n=I.data[l],a=this.optionsMap.get(n);return a?I.common.async?a._parseAsync({data:I.data,path:I.path,parent:I}):a._parseSync({data:I.data,path:I.path,parent:I}):((0,ue.addIssueToContext)(I,{code:st.ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[l]}),ue.INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,I,l){let n=new Map;for(let a of I){let c=Gv(a.shape[e]);if(!c.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let r of c){if(n.has(r))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(r)}`);n.set(r,a)}}return new t({typeName:QI.ZodDiscriminatedUnion,discriminator:e,options:I,optionsMap:n,...nl(l)})}};Ge.ZodDiscriminatedUnion=nWe;function r_e(t,e){let I=(0,bt.getParsedType)(t),l=(0,bt.getParsedType)(e);if(t===e)return{valid:!0,data:t};if(I===bt.ZodParsedType.object&&l===bt.ZodParsedType.object){let n=bt.util.objectKeys(e),a=bt.util.objectKeys(t).filter(r=>n.indexOf(r)!==-1),c={...t,...e};for(let r of a){let s=r_e(t[r],e[r]);if(!s.valid)return{valid:!1};c[r]=s.data}return{valid:!0,data:c}}else if(I===bt.ZodParsedType.array&&l===bt.ZodParsedType.array){if(t.length!==e.length)return{valid:!1};let n=[];for(let a=0;a{if((0,ue.isAborted)(a)||(0,ue.isAborted)(c))return ue.INVALID;let r=r_e(a.value,c.value);return r.valid?(((0,ue.isDirty)(a)||(0,ue.isDirty)(c))&&I.dirty(),{status:I.value,value:r.data}):((0,ue.addIssueToContext)(l,{code:st.ZodIssueCode.invalid_intersection_types}),ue.INVALID)};return l.common.async?Promise.all([this._def.left._parseAsync({data:l.data,path:l.path,parent:l}),this._def.right._parseAsync({data:l.data,path:l.path,parent:l})]).then(([a,c])=>n(a,c)):n(this._def.left._parseSync({data:l.data,path:l.path,parent:l}),this._def.right._parseSync({data:l.data,path:l.path,parent:l}))}};Ge.ZodIntersection=ak;ak.create=(t,e,I)=>new ak({left:t,right:e,typeName:QI.ZodIntersection,...nl(I)});var A2=class t extends al{_parse(e){let{status:I,ctx:l}=this._processInputParams(e);if(l.parsedType!==bt.ZodParsedType.array)return(0,ue.addIssueToContext)(l,{code:st.ZodIssueCode.invalid_type,expected:bt.ZodParsedType.array,received:l.parsedType}),ue.INVALID;if(l.data.lengththis._def.items.length&&((0,ue.addIssueToContext)(l,{code:st.ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),I.dirty());let a=[...l.data].map((c,r)=>{let s=this._def.items[r]||this._def.rest;return s?s._parse(new Lh(l,c,l.path,r)):null}).filter(c=>!!c);return l.common.async?Promise.all(a).then(c=>ue.ParseStatus.mergeArray(I,c)):ue.ParseStatus.mergeArray(I,a)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};Ge.ZodTuple=A2;A2.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new A2({items:t,typeName:QI.ZodTuple,rest:null,...nl(e)})};var aWe=class t extends al{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:I,ctx:l}=this._processInputParams(e);if(l.parsedType!==bt.ZodParsedType.object)return(0,ue.addIssueToContext)(l,{code:st.ZodIssueCode.invalid_type,expected:bt.ZodParsedType.object,received:l.parsedType}),ue.INVALID;let n=[],a=this._def.keyType,c=this._def.valueType;for(let r in l.data)n.push({key:a._parse(new Lh(l,r,l.path,r)),value:c._parse(new Lh(l,l.data[r],l.path,r)),alwaysSet:r in l.data});return l.common.async?ue.ParseStatus.mergeObjectAsync(I,n):ue.ParseStatus.mergeObjectSync(I,n)}get element(){return this._def.valueType}static create(e,I,l){return I instanceof al?new t({keyType:e,valueType:I,typeName:QI.ZodRecord,...nl(l)}):new t({keyType:UE.create(),valueType:e,typeName:QI.ZodRecord,...nl(I)})}};Ge.ZodRecord=aWe;var dB=class extends al{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:I,ctx:l}=this._processInputParams(e);if(l.parsedType!==bt.ZodParsedType.map)return(0,ue.addIssueToContext)(l,{code:st.ZodIssueCode.invalid_type,expected:bt.ZodParsedType.map,received:l.parsedType}),ue.INVALID;let n=this._def.keyType,a=this._def.valueType,c=[...l.data.entries()].map(([r,s],i)=>({key:n._parse(new Lh(l,r,l.path,[i,"key"])),value:a._parse(new Lh(l,s,l.path,[i,"value"]))}));if(l.common.async){let r=new Map;return Promise.resolve().then(async()=>{for(let s of c){let i=await s.key,G=await s.value;if(i.status==="aborted"||G.status==="aborted")return ue.INVALID;(i.status==="dirty"||G.status==="dirty")&&I.dirty(),r.set(i.value,G.value)}return{status:I.value,value:r}})}else{let r=new Map;for(let s of c){let i=s.key,G=s.value;if(i.status==="aborted"||G.status==="aborted")return ue.INVALID;(i.status==="dirty"||G.status==="dirty")&&I.dirty(),r.set(i.value,G.value)}return{status:I.value,value:r}}}};Ge.ZodMap=dB;dB.create=(t,e,I)=>new dB({valueType:e,keyType:t,typeName:QI.ZodMap,...nl(I)});var uB=class t extends al{_parse(e){let{status:I,ctx:l}=this._processInputParams(e);if(l.parsedType!==bt.ZodParsedType.set)return(0,ue.addIssueToContext)(l,{code:st.ZodIssueCode.invalid_type,expected:bt.ZodParsedType.set,received:l.parsedType}),ue.INVALID;let n=this._def;n.minSize!==null&&l.data.sizen.maxSize.value&&((0,ue.addIssueToContext)(l,{code:st.ZodIssueCode.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),I.dirty());let a=this._def.valueType;function c(s){let i=new Set;for(let G of s){if(G.status==="aborted")return ue.INVALID;G.status==="dirty"&&I.dirty(),i.add(G.value)}return{status:I.value,value:i}}let r=[...l.data.values()].map((s,i)=>a._parse(new Lh(l,s,l.path,i)));return l.common.async?Promise.all(r).then(s=>c(s)):c(r)}min(e,I){return new t({...this._def,minSize:{value:e,message:lI.errorUtil.toString(I)}})}max(e,I){return new t({...this._def,maxSize:{value:e,message:lI.errorUtil.toString(I)}})}size(e,I){return this.min(e,I).max(e,I)}nonempty(e){return this.min(1,e)}};Ge.ZodSet=uB;uB.create=(t,e)=>new uB({valueType:t,minSize:null,maxSize:null,typeName:QI.ZodSet,...nl(e)});var cWe=class t extends al{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:I}=this._processInputParams(e);if(I.parsedType!==bt.ZodParsedType.function)return(0,ue.addIssueToContext)(I,{code:st.ZodIssueCode.invalid_type,expected:bt.ZodParsedType.function,received:I.parsedType}),ue.INVALID;function l(r,s){return(0,ue.makeIssue)({data:r,path:I.path,errorMaps:[I.common.contextualErrorMap,I.schemaErrorMap,(0,lWe.getErrorMap)(),lWe.defaultErrorMap].filter(i=>!!i),issueData:{code:st.ZodIssueCode.invalid_arguments,argumentsError:s}})}function n(r,s){return(0,ue.makeIssue)({data:r,path:I.path,errorMaps:[I.common.contextualErrorMap,I.schemaErrorMap,(0,lWe.getErrorMap)(),lWe.defaultErrorMap].filter(i=>!!i),issueData:{code:st.ZodIssueCode.invalid_return_type,returnTypeError:s}})}let a={errorMap:I.common.contextualErrorMap},c=I.data;if(this._def.returns instanceof zE){let r=this;return(0,ue.OK)(async function(...s){let i=new st.ZodError([]),G=await r._def.args.parseAsync(s,a).catch(b=>{throw i.addIssue(l(s,b)),i}),d=await Reflect.apply(c,this,G);return await r._def.returns._def.type.parseAsync(d,a).catch(b=>{throw i.addIssue(n(d,b)),i})})}else{let r=this;return(0,ue.OK)(function(...s){let i=r._def.args.safeParse(s,a);if(!i.success)throw new st.ZodError([l(s,i.error)]);let G=Reflect.apply(c,this,i.data),d=r._def.returns.safeParse(G,a);if(!d.success)throw new st.ZodError([n(G,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:A2.create(e).rest(dv.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,I,l){return new t({args:e||A2.create([]).rest(dv.create()),returns:I||dv.create(),typeName:QI.ZodFunction,...nl(l)})}};Ge.ZodFunction=cWe;var ck=class extends al{get schema(){return this._def.getter()}_parse(e){let{ctx:I}=this._processInputParams(e);return this._def.getter()._parse({data:I.data,path:I.path,parent:I})}};Ge.ZodLazy=ck;ck.create=(t,e)=>new ck({getter:t,typeName:QI.ZodLazy,...nl(e)});var rk=class extends al{_parse(e){if(e.data!==this._def.value){let I=this._getOrReturnCtx(e);return(0,ue.addIssueToContext)(I,{received:I.data,code:st.ZodIssueCode.invalid_literal,expected:this._def.value}),ue.INVALID}return{status:"valid",value:e.data}}get value(){return this._def.value}};Ge.ZodLiteral=rk;rk.create=(t,e)=>new rk({value:t,typeName:QI.ZodLiteral,...nl(e)});function tqt(t,e){return new sk({values:t,typeName:QI.ZodEnum,...nl(e)})}var sk=class t extends al{_parse(e){if(typeof e.data!="string"){let I=this._getOrReturnCtx(e),l=this._def.values;return(0,ue.addIssueToContext)(I,{expected:bt.util.joinValues(l),received:I.parsedType,code:st.ZodIssueCode.invalid_type}),ue.INVALID}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let I=this._getOrReturnCtx(e),l=this._def.values;return(0,ue.addIssueToContext)(I,{received:I.data,code:st.ZodIssueCode.invalid_enum_value,options:l}),ue.INVALID}return(0,ue.OK)(e.data)}get options(){return this._def.values}get enum(){let e={};for(let I of this._def.values)e[I]=I;return e}get Values(){let e={};for(let I of this._def.values)e[I]=I;return e}get Enum(){let e={};for(let I of this._def.values)e[I]=I;return e}extract(e,I=this._def){return t.create(e,{...this._def,...I})}exclude(e,I=this._def){return t.create(this.options.filter(l=>!e.includes(l)),{...this._def,...I})}};Ge.ZodEnum=sk;sk.create=tqt;var ok=class extends al{_parse(e){let I=bt.util.getValidEnumValues(this._def.values),l=this._getOrReturnCtx(e);if(l.parsedType!==bt.ZodParsedType.string&&l.parsedType!==bt.ZodParsedType.number){let n=bt.util.objectValues(I);return(0,ue.addIssueToContext)(l,{expected:bt.util.joinValues(n),received:l.parsedType,code:st.ZodIssueCode.invalid_type}),ue.INVALID}if(this._cache||(this._cache=new Set(bt.util.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let n=bt.util.objectValues(I);return(0,ue.addIssueToContext)(l,{received:l.data,code:st.ZodIssueCode.invalid_enum_value,options:n}),ue.INVALID}return(0,ue.OK)(e.data)}get enum(){return this._def.values}};Ge.ZodNativeEnum=ok;ok.create=(t,e)=>new ok({values:t,typeName:QI.ZodNativeEnum,...nl(e)});var zE=class extends al{unwrap(){return this._def.type}_parse(e){let{ctx:I}=this._processInputParams(e);if(I.parsedType!==bt.ZodParsedType.promise&&I.common.async===!1)return(0,ue.addIssueToContext)(I,{code:st.ZodIssueCode.invalid_type,expected:bt.ZodParsedType.promise,received:I.parsedType}),ue.INVALID;let l=I.parsedType===bt.ZodParsedType.promise?I.data:Promise.resolve(I.data);return(0,ue.OK)(l.then(n=>this._def.type.parseAsync(n,{path:I.path,errorMap:I.common.contextualErrorMap})))}};Ge.ZodPromise=zE;zE.create=(t,e)=>new zE({type:t,typeName:QI.ZodPromise,...nl(e)});var kZ=class extends al{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===QI.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:I,ctx:l}=this._processInputParams(e),n=this._def.effect||null,a={addIssue:c=>{(0,ue.addIssueToContext)(l,c),c.fatal?I.abort():I.dirty()},get path(){return l.path}};if(a.addIssue=a.addIssue.bind(a),n.type==="preprocess"){let c=n.transform(l.data,a);if(l.common.async)return Promise.resolve(c).then(async r=>{if(I.value==="aborted")return ue.INVALID;let s=await this._def.schema._parseAsync({data:r,path:l.path,parent:l});return s.status==="aborted"?ue.INVALID:s.status==="dirty"||I.value==="dirty"?(0,ue.DIRTY)(s.value):s});{if(I.value==="aborted")return ue.INVALID;let r=this._def.schema._parseSync({data:c,path:l.path,parent:l});return r.status==="aborted"?ue.INVALID:r.status==="dirty"||I.value==="dirty"?(0,ue.DIRTY)(r.value):r}}if(n.type==="refinement"){let c=r=>{let s=n.refinement(r,a);if(l.common.async)return Promise.resolve(s);if(s instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return r};if(l.common.async===!1){let r=this._def.schema._parseSync({data:l.data,path:l.path,parent:l});return r.status==="aborted"?ue.INVALID:(r.status==="dirty"&&I.dirty(),c(r.value),{status:I.value,value:r.value})}else return this._def.schema._parseAsync({data:l.data,path:l.path,parent:l}).then(r=>r.status==="aborted"?ue.INVALID:(r.status==="dirty"&&I.dirty(),c(r.value).then(()=>({status:I.value,value:r.value}))))}if(n.type==="transform")if(l.common.async===!1){let c=this._def.schema._parseSync({data:l.data,path:l.path,parent:l});if(!(0,ue.isValid)(c))return ue.INVALID;let r=n.transform(c.value,a);if(r instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:I.value,value:r}}else return this._def.schema._parseAsync({data:l.data,path:l.path,parent:l}).then(c=>(0,ue.isValid)(c)?Promise.resolve(n.transform(c.value,a)).then(r=>({status:I.value,value:r})):ue.INVALID);bt.util.assertNever(n)}};Ge.ZodEffects=kZ;Ge.ZodTransformer=kZ;kZ.create=(t,e,I)=>new kZ({schema:t,typeName:QI.ZodEffects,effect:e,...nl(I)});kZ.createWithPreprocess=(t,e,I)=>new kZ({schema:e,effect:{type:"preprocess",transform:t},typeName:QI.ZodEffects,...nl(I)});var Ch=class extends al{_parse(e){return this._getType(e)===bt.ZodParsedType.undefined?(0,ue.OK)(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Ge.ZodOptional=Ch;Ch.create=(t,e)=>new Ch({innerType:t,typeName:QI.ZodOptional,...nl(e)});var F2=class extends al{_parse(e){return this._getType(e)===bt.ZodParsedType.null?(0,ue.OK)(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Ge.ZodNullable=F2;F2.create=(t,e)=>new F2({innerType:t,typeName:QI.ZodNullable,...nl(e)});var ik=class extends al{_parse(e){let{ctx:I}=this._processInputParams(e),l=I.data;return I.parsedType===bt.ZodParsedType.undefined&&(l=this._def.defaultValue()),this._def.innerType._parse({data:l,path:I.path,parent:I})}removeDefault(){return this._def.innerType}};Ge.ZodDefault=ik;ik.create=(t,e)=>new ik({innerType:t,typeName:QI.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...nl(e)});var Gk=class extends al{_parse(e){let{ctx:I}=this._processInputParams(e),l={...I,common:{...I.common,issues:[]}},n=this._def.innerType._parse({data:l.data,path:l.path,parent:{...l}});return(0,ue.isAsync)(n)?n.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new st.ZodError(l.common.issues)},input:l.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new st.ZodError(l.common.issues)},input:l.data})}}removeCatch(){return this._def.innerType}};Ge.ZodCatch=Gk;Gk.create=(t,e)=>new Gk({innerType:t,typeName:QI.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...nl(e)});var bB=class extends al{_parse(e){if(this._getType(e)!==bt.ZodParsedType.nan){let l=this._getOrReturnCtx(e);return(0,ue.addIssueToContext)(l,{code:st.ZodIssueCode.invalid_type,expected:bt.ZodParsedType.nan,received:l.parsedType}),ue.INVALID}return{status:"valid",value:e.data}}};Ge.ZodNaN=bB;bB.create=t=>new bB({typeName:QI.ZodNaN,...nl(t)});Ge.BRAND=Symbol("zod_brand");var M7=class extends al{_parse(e){let{ctx:I}=this._processInputParams(e),l=I.data;return this._def.type._parse({data:l,path:I.path,parent:I})}unwrap(){return this._def.type}};Ge.ZodBranded=M7;var S7=class t extends al{_parse(e){let{status:I,ctx:l}=this._processInputParams(e);if(l.common.async)return(async()=>{let a=await this._def.in._parseAsync({data:l.data,path:l.path,parent:l});return a.status==="aborted"?ue.INVALID:a.status==="dirty"?(I.dirty(),(0,ue.DIRTY)(a.value)):this._def.out._parseAsync({data:a.value,path:l.path,parent:l})})();{let n=this._def.in._parseSync({data:l.data,path:l.path,parent:l});return n.status==="aborted"?ue.INVALID:n.status==="dirty"?(I.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:l.path,parent:l})}}static create(e,I){return new t({in:e,out:I,typeName:QI.ZodPipeline})}};Ge.ZodPipeline=S7;var dk=class extends al{_parse(e){let I=this._def.innerType._parse(e),l=n=>((0,ue.isValid)(n)&&(n.value=Object.freeze(n.value)),n);return(0,ue.isAsync)(I)?I.then(n=>l(n)):l(I)}unwrap(){return this._def.innerType}};Ge.ZodReadonly=dk;dk.create=(t,e)=>new dk({innerType:t,typeName:QI.ZodReadonly,...nl(e)});function q6t(t,e){let I=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof I=="string"?{message:I}:I}function Iqt(t,e={},I){return t?OE.create().superRefine((l,n)=>{let a=t(l);if(a instanceof Promise)return a.then(c=>{if(!c){let r=q6t(e,l),s=r.fatal??I??!0;n.addIssue({code:"custom",...r,fatal:s})}});if(!a){let c=q6t(e,l),r=c.fatal??I??!0;n.addIssue({code:"custom",...c,fatal:r})}}):OE.create()}Ge.late={object:Vm.lazycreate};var QI;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(QI||(Ge.ZodFirstPartyTypeKind=QI={}));var K5l=(t,e={message:`Input not instance of ${t.name}`})=>Iqt(I=>I instanceof t,e);Ge.instanceof=K5l;var lqt=UE.create;Ge.string=lqt;var nqt=PL.create;Ge.number=nqt;var D5l=bB.create;Ge.nan=D5l;var q5l=$L.create;Ge.bigint=q5l;var aqt=ek.create;Ge.boolean=aqt;var P5l=tk.create;Ge.date=P5l;var $5l=iB.create;Ge.symbol=$5l;var eLl=Ik.create;Ge.undefined=eLl;var tLl=lk.create;Ge.null=tLl;var ILl=OE.create;Ge.any=ILl;var lLl=dv.create;Ge.unknown=lLl;var nLl=nA.create;Ge.never=nLl;var aLl=GB.create;Ge.void=aLl;var cLl=uv.create;Ge.array=cLl;var rLl=Vm.create;Ge.object=rLl;var sLl=Vm.strictCreate;Ge.strictObject=sLl;var oLl=nk.create;Ge.union=oLl;var iLl=nWe.create;Ge.discriminatedUnion=iLl;var GLl=ak.create;Ge.intersection=GLl;var dLl=A2.create;Ge.tuple=dLl;var uLl=aWe.create;Ge.record=uLl;var bLl=dB.create;Ge.map=bLl;var mLl=uB.create;Ge.set=mLl;var ZLl=cWe.create;Ge.function=ZLl;var pLl=ck.create;Ge.lazy=pLl;var hLl=rk.create;Ge.literal=hLl;var WLl=sk.create;Ge.enum=WLl;var NLl=ok.create;Ge.nativeEnum=NLl;var VLl=zE.create;Ge.promise=VLl;var cqt=kZ.create;Ge.effect=cqt;Ge.transformer=cqt;var YLl=Ch.create;Ge.optional=YLl;var RLl=F2.create;Ge.nullable=RLl;var ALl=kZ.createWithPreprocess;Ge.preprocess=ALl;var FLl=S7.create;Ge.pipeline=FLl;var XLl=()=>lqt().optional();Ge.ostring=XLl;var gLl=()=>nqt().optional();Ge.onumber=gLl;var vLl=()=>aqt().optional();Ge.oboolean=vLl;Ge.coerce={string:t=>UE.create({...t,coerce:!0}),number:t=>PL.create({...t,coerce:!0}),boolean:t=>ek.create({...t,coerce:!0}),bigint:t=>$L.create({...t,coerce:!0}),date:t=>tk.create({...t,coerce:!0})};Ge.NEVER=ue.INVALID});var s_e=Y(kh=>{"use strict";o();var yLl=kh&&kh.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),mB=kh&&kh.__exportStar||function(t,e){for(var I in t)I!=="default"&&!Object.prototype.hasOwnProperty.call(e,I)&&yLl(e,t,I)};Object.defineProperty(kh,"__esModule",{value:!0});mB(tWe(),kh);mB(a_e(),kh);mB(T6t(),kh);mB(z7(),kh);mB(rqt(),kh);mB(eWe(),kh)});var J=Y(Ym=>{"use strict";o();var sqt=Ym&&Ym.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),wLl=Ym&&Ym.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),HLl=Ym&&Ym.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var I in t)I!=="default"&&Object.prototype.hasOwnProperty.call(t,I)&&sqt(e,t,I);return wLl(e,t),e},QLl=Ym&&Ym.__exportStar||function(t,e){for(var I in t)I!=="default"&&!Object.prototype.hasOwnProperty.call(e,I)&&sqt(e,t,I)};Object.defineProperty(Ym,"__esModule",{value:!0});Ym.z=void 0;var oqt=HLl(s_e());Ym.z=oqt;QLl(s_e(),Ym);Ym.default=oqt});var G_e=Y(jo=>{"use strict";o();var fLl=jo&&jo.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),ELl=jo&&jo.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),JLl=jo&&jo.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;ne.charCodeAt(0))}function i_e(t){return new TextEncoder().encode(t)}function Gqt(t){return new TextDecoder().decode(t)}function CLl(t){return iqt(i_e(t))}function LLl(t){return Gqt(o_e(t))}jo.zodOutbound=rWe.instanceof(Uint8Array).or(rWe.string().transform(i_e));jo.zodInbound=rWe.instanceof(Uint8Array).or(rWe.string().transform(o_e))});var u_e=Y(d_e=>{"use strict";o();Object.defineProperty(d_e,"__esModule",{value:!0});d_e.isPlainObject=kLl;function kLl(t){if(typeof t!="object"||t===null)return!1;let e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}});var je=Y(In=>{"use strict";o();Object.defineProperty(In,"__esModule",{value:!0});In.encodeDeepObjectQuery=In.encodePipeDelimitedQuery=In.encodeSpaceDelimitedQuery=In.encodeFormQuery=In.encodeJSONQuery=In.encodeSimple=In.encodePipeDelimited=In.encodeSpaceDelimited=In.encodeForm=In.EncodingError=void 0;In.encodeMatrix=xLl;In.encodeLabel=jLl;In.encodeBodyForm=ULl;In.encodeDeepObject=uqt;In.encodeDeepObjectObject=m_e;In.encodeJSON=bqt;In.queryJoin=mqt;In.queryEncoder=pB;In.appendForm=zLl;var dqt=G_e(),aA=u_e(),T7=class extends Error{constructor(e){super(e),this.name="EncodingError"}};In.EncodingError=T7;function xLl(t,e,I){let l="",n=I?.explode?_7(t,e):[[t,e]];if(n.every(([r,s])=>s==null))return;let a=r=>I?.charEncoding==="percent"?encodeURIComponent(r):r,c=r=>a(ZB(r));return n.forEach(([r,s])=>{let i="",G=null;if(s==null||(Array.isArray(s)?G=K7(s,u=>`${c(u)}`)?.join(","):(0,aA.isPlainObject)(s)?G=oWe(Object.entries(s),([b,Z])=>`,${a(b)},${c(Z)}`)?.join("").slice(1):G=`${c(s)}`,G==null))return;let d=a(r);i=`${d}=${G}`,i===`${d}=`&&(i=i.slice(0,-1)),i&&(l+=`;${i}`)}),l}function jLl(t,e,I){let l="",n=I?.explode?_7(t,e):[[t,e]];if(n.every(([r,s])=>s==null))return;let a=r=>I?.charEncoding==="percent"?encodeURIComponent(r):r,c=r=>a(ZB(r));return n.forEach(([r,s])=>{let i="";s!=null&&(Array.isArray(s)?i=K7(s,G=>`${c(G)}`)?.join("."):(0,aA.isPlainObject)(s)?i=oWe(Object.entries(s),([d,u])=>`.${a(d)}.${c(u)}`)?.join("").slice(1):i=`${I?.explode&&(0,aA.isPlainObject)(e)?`${a(r)}=`:""}${c(s)}`,l+=i==null?"":`.${i}`)}),l}function b_e(t){return(e,I,l)=>{let n="",a=l?.explode?_7(e,I):[[e,I]];if(a.every(([i,G])=>G==null))return;let c=i=>l?.charEncoding==="percent"?encodeURIComponent(i):i,r=i=>c(ZB(i)),s=c(t);return a.forEach(([i,G])=>{let d="",u=null;G!=null&&(Array.isArray(G)?u=K7(G,b=>`${r(b)}`)?.join(s):(0,aA.isPlainObject)(G)?u=oWe(Object.entries(G),([b,Z])=>`${c(b)}${s}${r(Z)}`)?.join(s):u=`${r(G)}`,u!=null&&(d=`${c(i)}=${u}`,!(!d||d==="=")&&(n+=`&${d}`)))}),n.slice(1)}}In.encodeForm=b_e(",");In.encodeSpaceDelimited=b_e(" ");In.encodePipeDelimited=b_e("|");function ULl(t,e,I){let l="",n=I?.explode?_7(t,e):[[t,e]],a=r=>I?.charEncoding==="percent"?encodeURIComponent(r):r,c=r=>a(ZB(r));return n.forEach(([r,s])=>{let i="",G="";s!=null&&(Array.isArray(s)||(0,aA.isPlainObject)(s)?G=JSON.stringify(s,sWe):G=`${c(s)}`,i=`${a(r)}=${G}`,!(!i||i==="=")&&(l+=`&${i}`))}),l.slice(1)}function uqt(t,e,I){if(e!=null){if(!(0,aA.isPlainObject)(e))throw new T7(`Value of parameter '${t}' which uses deepObject encoding must be an object or null`);return m_e(t,e,I)}}function m_e(t,e,I){if(e==null)return;let l="",n=a=>I?.charEncoding==="percent"?encodeURIComponent(a):a;if(!(0,aA.isPlainObject)(e))throw new T7(`Expected parameter '${t}' to be an object.`);return Object.entries(e).forEach(([a,c])=>{if(c==null)return;let r=`${t}[${a}]`;if((0,aA.isPlainObject)(c)){let G=m_e(r,c,I);l+=G==null?"":`&${G}`;return}let s=Array.isArray(c)?c:[c],i=K7(s,G=>`${n(r)}=${n(ZB(G))}`)?.join("&");l+=i==null?"":`&${i}`}),l.slice(1)}function bqt(t,e,I){if(typeof e>"u")return;let l=a=>I?.charEncoding==="percent"?encodeURIComponent(a):a,n=l(JSON.stringify(e,sWe));return I?.explode?n:`${l(t)}=${n}`}var OLl=(t,e,I)=>{let l="",n=I?.explode?_7(t,e):[[t,e]];if(n.every(([r,s])=>s==null))return;let a=r=>I?.charEncoding==="percent"?encodeURIComponent(r):r,c=r=>a(ZB(r));return n.forEach(([r,s])=>{let i="";s!=null&&(Array.isArray(s)?i=K7(s,G=>`${c(G)}`)?.join(","):(0,aA.isPlainObject)(s)?i=oWe(Object.entries(s),([d,u])=>`,${a(d)},${c(u)}`)?.join("").slice(1):i=`${I?.explode&&(0,aA.isPlainObject)(e)?`${r}=`:""}${c(s)}`,l+=i?`,${i}`:"")}),l.slice(1)};In.encodeSimple=OLl;function _7(t,e){return Array.isArray(e)?e.map(I=>[t,I]):(0,aA.isPlainObject)(e)?Object.entries(e??{}).map(([l,n])=>[l,n]):[[t,e]]}function ZB(t){return t==null?"":t instanceof Date?t.toISOString():t instanceof Uint8Array?(0,dqt.bytesToBase64)(t):typeof t=="object"?JSON.stringify(t,sWe):`${t}`}function sWe(t,e){return e instanceof Uint8Array?(0,dqt.bytesToBase64)(e):e}function K7(t,e){let I=t.reduce((l,n)=>{if(n==null)return l;let a=e(n);return a==null||l.push(a),l},[]);return I.length?I:null}function oWe(t,e){let I=[];for(let[l,n]of t){if(n==null)continue;let a=e([l,n]);a!=null&&I.push(a)}return I.length?I:null}function mqt(...t){return t.filter(Boolean).join("&")}function pB(t){return function(I,l){let n={...l,explode:l?.explode??!0,charEncoding:l?.charEncoding??"percent"},a=new Set(l?.allowEmptyValue??[]),c=Object.entries(I).map(([r,s])=>a.has(r)&&(s==null||s===""||Array.isArray(s)&&s.length===0)?`${encodeURIComponent(r)}=`:t(r,s,n));return mqt(...c)}}In.encodeJSONQuery=pB(bqt);In.encodeFormQuery=pB(In.encodeForm);In.encodeSpaceDelimitedQuery=pB(In.encodeSpaceDelimited);In.encodePipeDelimitedQuery=pB(In.encodePipeDelimited);In.encodeDeepObjectQuery=pB(uqt);function zLl(t,e,I,l){I!=null&&(I instanceof Blob&&l?t.append(e,I,l):I instanceof Blob?t.append(e,I):t.append(e,String(I)))}});var Zqt=Y(Z_e=>{"use strict";o();Object.defineProperty(Z_e,"__esModule",{value:!0});Z_e.dlv=BLl;function BLl(t,e,I,l,n){for(e=Array.isArray(e)?e:e.split("."),l=0;l{"use strict";o();var MLl=xZ&&xZ.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),SLl=xZ&&xZ.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),TLl=xZ&&xZ.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();Object.defineProperty(bk,"__esModule",{value:!0});bk.TemporaryError=bk.PermanentError=void 0;bk.retry=$Ll;var pqt=LE(),PLl={initialInterval:500,maxInterval:6e4,exponent:1.5,maxElapsedTime:36e5},q7=class t extends Error{constructor(e,I){let l=e;I?.cause&&(l+=`: ${I.cause}`),super(l,I),this.name="PermanentError",typeof this.cause>"u"&&(this.cause=I?.cause),Object.setPrototypeOf(this,t.prototype)}};bk.PermanentError=q7;var uk=class t extends Error{constructor(e,I){super(e),this.response=I,this.name="TemporaryError",Object.setPrototypeOf(this,t.prototype)}};bk.TemporaryError=uk;async function $Ll(t,e){switch(e.config.strategy){case"backoff":return lkl(ekl(t,{statusCodes:e.statusCodes,retryConnectionErrors:!!e.config.retryConnectionErrors}),e.config.backoff??PLl);default:return await t()}}function ekl(t,e){return async()=>{try{let I=await t();if(Ikl(I,e.statusCodes))throw new uk("Response failed with retryable status code",I);return I}catch(I){throw I instanceof uk||e.retryConnectionErrors&&((0,pqt.isTimeoutError)(I)||(0,pqt.isConnectionError)(I))?I:new q7("Permanent error",{cause:I})}}}var tkl=new RegExp("^[0-9]xx$","i");function Ikl(t,e){let I=`${t.status}`;return e.some(l=>{if(!tkl.test(l))return l===I;let n=l.charAt(0);if(!n)throw new Error("Invalid status code range");let a=I.charAt(0);if(!a)throw new Error(`Invalid response status code: ${I}`);return a===n})}async function lkl(t,e){let{maxElapsedTime:I,initialInterval:l,exponent:n,maxInterval:a}=e,c=Date.now(),r=0;for(;;)try{return await t()}catch(s){if(s instanceof q7)throw s.cause;if(Date.now()-c>I){if(s instanceof uk)return s.response;throw s}let G=0;s instanceof uk&&(G=nkl(s.response)),G<=0&&(G=l*Math.pow(r,n)+Math.random()*1e3);let d=Math.min(G,a);await akl(d),r++}}function nkl(t){let e=t.headers.get("retry-after")||"";if(!e)return 0;let I=Number(e);if(Number.isInteger(I))return I*1e3;let l=Date.parse(e);if(Number.isInteger(l)){let n=l-Date.now();return n>0?Math.ceil(n):0}return 0}async function akl(t){return new Promise(e=>setTimeout(e,t))}});var En=Y(ME=>{"use strict";o();var P7=ME&&ME.__classPrivateFieldSet||function(t,e,I,l,n){if(l==="m")throw new TypeError("Private method is not writable");if(l==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return l==="a"?n.call(t,I):n?n.value=I:e.set(t,I),I},xh=ME&&ME.__classPrivateFieldGet||function(t,e,I,l){if(I==="a"&&!l)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!l:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return I==="m"?l:I==="a"?l.call(t):l?l.value:e.get(t)},GWe,X2,bv;Object.defineProperty(ME,"__esModule",{value:!0});ME.ClientSDK=void 0;var Wqt=j6t(),hB=e_e(),BE=da(),ckl=G_e(),Nqt=Khe(),rkl=je(),skl=h_e(),g2=LE(),okl=hqt(),iWe=typeof globalThis>"u"?null:globalThis,ikl=typeof iWe=="object"&&iWe!=null&&"importScripts"in iWe&&typeof iWe.importScripts=="function",Gkl=ikl||typeof navigator<"u"&&"serviceWorker"in navigator||typeof window=="object"&&typeof window.document<"u",W_e=class{constructor(e={}){GWe.set(this,void 0),X2.set(this,void 0),bv.set(this,void 0);let I=e;typeof I=="object"&&I!=null&&"hooks"in I&&I.hooks instanceof Wqt.SDKHooks?P7(this,X2,I.hooks,"f"):P7(this,X2,new Wqt.SDKHooks,"f");let l=(0,Nqt.serverURLFromOptions)(e);l&&(l.pathname=l.pathname.replace(/\/+$/,"")+"/");let{baseURL:n,client:a}=xh(this,X2,"f").sdkInit({baseURL:l,client:e.httpClient||new g2.HTTPClient});this._baseURL=n,P7(this,GWe,a,"f"),this._options={...e,hooks:xh(this,X2,"f")},P7(this,bv,this._options.debugLogger,"f"),!xh(this,bv,"f")&&(0,skl.env)().MISTRAL_DEBUG&&P7(this,bv,console,"f")}_createRequest(e,I,l){let{method:n,path:a,query:c,headers:r,security:s}=I,i=I.baseURL??this._baseURL;if(!i)return(0,BE.ERR)(new hB.InvalidRequestError("No base URL provided for operation"));let G=new URL(i),d=new URL(a,G);a&&(G.pathname+=G.pathname.endsWith("/")?"":"/",G.pathname+=d.pathname.replace(/^\/+/,""));let u=c||"",b=[];for(let[v,y]of Object.entries(s?.queryParams||{})){let w=(0,rkl.encodeForm)(v,y,{charEncoding:"percent"});typeof w<"u"&&b.push(w)}if(b.length&&(u+=`&${b.join("&")}`),u){let v=u.startsWith("&")?u.slice(1):u;G.search=`?${v}`}let Z=new Headers(r),p=s?.basic.username,W=s?.basic.password;if(p!=null||W!=null){let v=(0,ckl.stringToBase64)([p||"",W||""].join(":"));Z.set("Authorization",`Basic ${v}`)}let h=new Headers(s?.headers||{});for(let[v,y]of h)Z.set(v,y);let N=Z.get("cookie")||"";for(let[v,y]of Object.entries(s?.cookies||{}))N+=`; ${v}=${y}`;N=N.startsWith("; ")?N.slice(2):N,Z.set("cookie",N);let V=new Headers(l?.headers??l?.fetchOptions?.headers);for(let[v,y]of V)Z.set(v,y);Gkl||Z.set(I.uaHeader??"user-agent",I.userAgent??Nqt.SDK_METADATA.userAgent);let R={...l?.fetchOptions,...l};if(!R?.signal&&I.timeoutMs&&I.timeoutMs>0){let v=AbortSignal.timeout(I.timeoutMs);R.signal=v}I.body instanceof ReadableStream&&Object.assign(R,{duplex:"half"});let F;try{F=xh(this,X2,"f").beforeCreateRequest(e,{url:G,options:{...R,body:I.body??null,headers:Z,method:n}})}catch(v){return(0,BE.ERR)(new hB.UnexpectedClientError("Create request hook failed to execute",{cause:v}))}return(0,BE.OK)(new Request(F.url,F.options))}async _do(e,I){let{context:l,errorCodes:n}=I;return(0,okl.retry)(async()=>{let a=await xh(this,X2,"f").beforeRequest(l,e.clone());await dkl(xh(this,bv,"f"),a).catch(r=>xh(this,bv,"f")?.log("Failed to log request:",r));let c=await xh(this,GWe,"f").request(a);try{if((0,g2.matchStatusCode)(c,n)){let r=await xh(this,X2,"f").afterError(l,c,null);if(r.error)throw r.error;c=r.response||c}else c=await xh(this,X2,"f").afterSuccess(l,c)}finally{await ukl(xh(this,bv,"f"),c,a).catch(r=>xh(this,bv,"f")?.log("Failed to log response:",r))}return c},{config:I.retryConfig,statusCodes:I.retryCodes}).then(a=>(0,BE.OK)(a),a=>{switch(!0){case(0,g2.isAbortError)(a):return(0,BE.ERR)(new hB.RequestAbortedError("Request aborted by client",{cause:a}));case(0,g2.isTimeoutError)(a):return(0,BE.ERR)(new hB.RequestTimeoutError("Request timed out",{cause:a}));case(0,g2.isConnectionError)(a):return(0,BE.ERR)(new hB.ConnectionError("Unable to make request",{cause:a}));default:return(0,BE.ERR)(new hB.UnexpectedClientError("Unexpected HTTP client error",{cause:a}))}})}};ME.ClientSDK=W_e;GWe=new WeakMap,X2=new WeakMap,bv=new WeakMap;var Yqt=/^(application|text)\/([^+]+\+)*json.*/,Vqt=/^(application|text)\/([^+]+\+)*(jsonl|x-ndjson)\b.*/;async function dkl(t,e){if(!t)return;let I=e.headers.get("content-type"),l=I?.split(";")[0]||"";t.group(`> Request: ${e.method} ${e.url}`),t.group("Headers:");for(let[n,a]of e.headers.entries())t.log(`${n}: ${a}`);switch(t.groupEnd(),t.group("Body:"),!0){case Yqt.test(l):t.log(await e.clone().json());break;case l.startsWith("text/"):t.log(await e.clone().text());break;case l==="multipart/form-data":{let n=await e.clone().formData();for(let[a,c]of n){let r=c instanceof Blob?"":c;t.log(`${a}: ${r}`)}break}default:t.log(`<${I}>`);break}t.groupEnd(),t.groupEnd()}async function ukl(t,e,I){if(!t)return;let l=e.headers.get("content-type"),n=l?.split(";")[0]||"";t.group(`< Response: ${I.method} ${I.url}`),t.log("Status Code:",e.status,e.statusText),t.group("Headers:");for(let[a,c]of e.headers.entries())t.log(`${a}: ${c}`);switch(t.groupEnd(),t.group("Body:"),!0){case((0,g2.matchContentType)(e,"application/json")||Yqt.test(n)&&!Vqt.test(n)):t.log(await e.clone().json());break;case((0,g2.matchContentType)(e,"application/jsonl")||Vqt.test(n)):t.log(await e.clone().text());break;case(0,g2.matchContentType)(e,"text/event-stream"):t.log(`<${l}>`);break;case(0,g2.matchContentType)(e,"text/*"):t.log(await e.clone().text());break;case(0,g2.matchContentType)(e,"multipart/form-data"):{let a=await e.clone().formData();for(let[c,r]of a){let s=r instanceof Blob?"":r;t.log(`${c}: ${s}`)}break}default:t.log(`<${l}>`);break}t.groupEnd(),t.groupEnd()}});var WB=Y(dWe=>{"use strict";o();Object.defineProperty(dWe,"__esModule",{value:!0});dWe.MistralError=void 0;var N_e=class extends Error{constructor(e,I){super(e),this.statusCode=I.response.status,this.body=I.body,this.headers=I.response.headers,this.contentType=I.response.headers.get("content-type")||"",this.rawResponse=I.response,this.name="MistralError"}};dWe.MistralError=N_e});var uWe=Y(cA=>{"use strict";o();var bkl=cA&&cA.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),mkl=cA&&cA.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Zkl=cA&&cA.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n0?`\u2502${I}`:I,I+=" ".repeat(e);let l="",n=r=>l+=` +${I}${r}`,a=t.issues.length,c=a===1?`${a} issue found`:`${a} issues found`;a&&n(`\u250C ${c}:`);for(let r of t.issues){let s=r.path.join(".");switch(s=s?`.${s}`:"",n(`\u2502 \u2022 [${s}]: ${r.message} (${r.code})`),r.code){case"invalid_literal":case"invalid_type":{n(`\u2502 Want: ${r.expected}`),n(`\u2502 Got: ${r.received}`);break}case"unrecognized_keys":{n(`\u2502 Keys: ${r.keys.join(", ")}`);break}case"invalid_enum_value":{n(`\u2502 Allowed: ${r.options.join(", ")}`),n(`\u2502 Got: ${r.received}`);break}case"invalid_union_discriminator":{n(`\u2502 Allowed: ${r.options.join(", ")}`);break}case"invalid_union":{let i=r.unionErrors.length;n(`\u2502 \u2716\uFE0E Attemped to deserialize into one of ${i} union members:`),r.unionErrors.forEach((G,d)=>{n(`\u2502 \u2716\uFE0E Member ${d+1} of ${i}`),n(`${Y_e(G,e+1)}`)})}}}return t.issues.length&&n("\u2514\u2500*"),l.slice(1)}});var A_e=Y(v2=>{"use strict";o();var hkl=v2&&v2.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Wkl=v2&&v2.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Nkl=v2&&v2.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();Object.defineProperty(bWe,"__esModule",{value:!0});bWe.SDKError=void 0;var Akl=WB(),F_e=class extends Akl.MistralError{constructor(e,I){e&&(e+=": "),e+=`Status ${I.response.status}`;let l=I.response.headers.get("content-type")||'""';l!=="application/json"&&(e+=` Content-Type ${l.includes(" ")?`"${l}"`:l}`);let n=I.body||'""';e+=n.length>100?` +`:". ";let a=n;if(n.length>1e4){let c=n.substring(0,1e4),r=n.length-1e4;a=`${c}...and ${r} more chars`}e+=`Body: ${a}`,e=e.trim(),super(e,I),this.name="SDKError"}};bWe.SDKError=F_e});var Le=Y(no=>{"use strict";o();Object.defineProperty(no,"__esModule",{value:!0});no.jsonErr=gkl;no.json=vkl;no.jsonl=ykl;no.jsonlErr=wkl;no.textErr=Hkl;no.text=Qkl;no.bytesErr=fkl;no.bytes=Ekl;no.streamErr=Jkl;no.stream=Ckl;no.sseErr=Lkl;no.sse=kkl;no.nilErr=xkl;no.nil=jkl;no.fail=Ukl;no.match=Okl;no.unpackHeaders=mWe;var Fkl=A_e(),Rqt=X_e(),Aqt=da(),Fqt=LE(),Xqt=u_e(),Xkl={jsonl:"application/jsonl",json:"application/json",text:"text/plain",bytes:"application/octet-stream",stream:"application/octet-stream",sse:"text/event-stream",nil:"*",fail:"*"};function gkl(t,e,I){return{...I,err:!0,enc:"json",codes:t,schema:e}}function vkl(t,e,I){return{...I,enc:"json",codes:t,schema:e}}function ykl(t,e,I){return{...I,enc:"jsonl",codes:t,schema:e}}function wkl(t,e,I){return{...I,err:!0,enc:"jsonl",codes:t,schema:e}}function Hkl(t,e,I){return{...I,err:!0,enc:"text",codes:t,schema:e}}function Qkl(t,e,I){return{...I,enc:"text",codes:t,schema:e}}function fkl(t,e,I){return{...I,err:!0,enc:"bytes",codes:t,schema:e}}function Ekl(t,e,I){return{...I,enc:"bytes",codes:t,schema:e}}function Jkl(t,e,I){return{...I,err:!0,enc:"stream",codes:t,schema:e}}function Ckl(t,e,I){return{...I,enc:"stream",codes:t,schema:e}}function Lkl(t,e,I){return{...I,err:!0,enc:"sse",codes:t,schema:e}}function kkl(t,e,I){return{...I,enc:"sse",codes:t,schema:e}}function xkl(t,e,I){return{...I,err:!0,enc:"nil",codes:t,schema:e}}function jkl(t,e,I){return{...I,enc:"nil",codes:t,schema:e}}function Ukl(t){return{enc:"fail",codes:t}}function Okl(...t){return async function(I,l,n){let a,c;for(let d of t){let{codes:u}=d,b="ctype"in d?d.ctype:Xkl[d.enc];if(b&&(0,Fqt.matchResponse)(I,u,b)){c=d;break}else if(!b&&(0,Fqt.matchStatusCode)(I,u)){c=d;break}}if(!c)return[{ok:!1,error:new Rqt.SDKError("Unexpected Status or Content-Type",{response:I,request:l,body:await I.text().catch(()=>"")})},a];let r=c.enc,s="";switch(r){case"json":s=await I.text(),a=JSON.parse(s);break;case"jsonl":a=I.body;break;case"bytes":a=new Uint8Array(await I.arrayBuffer());break;case"stream":a=I.body;break;case"text":s=await I.text(),a=s;break;case"sse":a=I.body;break;case"nil":s=await I.text(),a=void 0;break;case"fail":s=await I.text(),a=s;break;default:throw new Error(`Unsupported response type: ${r}`)}if(c.enc==="fail")return[{ok:!1,error:new Rqt.SDKError("API error occurred",{request:l,response:I,body:s})},a];let i=c.key||n?.resultKey,G;if("err"in c?G={...n?.extraFields,...c.hdrs?{Headers:mWe(I.headers)}:null,...(0,Xqt.isPlainObject)(a)?a:null,request$:l,response$:I,body$:s}:i?G={...n?.extraFields,...c.hdrs?{Headers:mWe(I.headers)}:null,[i]:a}:c.hdrs?G={...n?.extraFields,...c.hdrs?{Headers:mWe(I.headers)}:null,...(0,Xqt.isPlainObject)(a)?a:null}:G=a,"err"in c){let d=gqt(G,u=>c.schema.parse(u),"Response validation failed",{request:l,response:I,body:s});return[d.ok?{ok:!1,error:d.value}:d,a]}else return[gqt(G,d=>c.schema.parse(d),"Response validation failed",{request:l,response:I,body:s}),a]}}var zkl=/, */;function mWe(t){let e={};for(let[I,l]of t.entries())e[I]=l.split(zkl);return e}function gqt(t,e,I,l){try{return(0,Aqt.OK)(e(t))}catch(n){return(0,Aqt.ERR)(new Fkl.ResponseValidationError(I,{cause:n,rawValue:t,rawMessage:I,...l}))}}});var x=Y(SE=>{"use strict";o();Object.defineProperty(SE,"__esModule",{value:!0});SE.invariant=Bkl;SE.remap=Mkl;SE.combineSignals=Skl;SE.abortSignalAny=vqt;SE.compactMap=Tkl;SE.allRequired=_kl;var g_e=class extends Error{constructor(e){super(e),this.name="InvariantError"}};function Bkl(t,e){if(!t)throw new g_e(e)}function Mkl(t,e){let I={};if(!Object.keys(e).length)return I=t,I;for(let[l,n]of Object.entries(t)){let a=e[l];a!==null&&(I[a??l]=n)}return I}function Skl(...t){let e=[];for(let I of t)I&&e.push(I);switch(e.length){case 0:case 1:return e[0]||null;default:return"any"in AbortSignal&&typeof AbortSignal.any=="function"?AbortSignal.any(e):vqt(e)}}function vqt(t){let e=new AbortController,I=e.signal;if(!t.length)return e.signal;if(t.length===1)return t[0]||e.signal;for(let c of t)if(c.aborted)return c;function l(){e.abort(this.reason),a()}let n=[];function a(){for(let c of n){let r=c.deref();r&&r.removeEventListener("abort",l)}}for(let c of t)n.push(new WeakRef(c)),c.addEventListener("abort",l);return I}function Tkl(t){let e={};for(let[I,l]of Object.entries(t))typeof l<"u"&&(e[I]=l);return e}function _kl(t){if(!Object.values(t).every(e=>e==null))return t}});var M=Y($7=>{"use strict";o();Object.defineProperty($7,"__esModule",{value:!0});$7.parse=Dkl;$7.safeParse=qkl;$7.collectExtraKeys=Pkl;var Kkl=J(),wqt=uWe(),yqt=da();function Dkl(t,e,I){try{return e(t)}catch(l){throw l instanceof Kkl.ZodError?new wqt.SDKValidationError(I,l,t):l}}function qkl(t,e,I){try{return(0,yqt.OK)(e(t))}catch(l){return(0,yqt.ERR)(new wqt.SDKValidationError(I,l,t))}}function Pkl(t,e,I){return t.transform(l=>{let n={},{shape:a}=t;for(let[c]of Object.entries(l)){if(c in a)continue;let r=l[c];typeof r>"u"||(n[c]=r,delete l[c])}return I&&Object.keys(n).length===0?l:{...l,[e]:n}})}});var ke=Y(mv=>{"use strict";o();Object.defineProperty(mv,"__esModule",{value:!0});mv.SecurityError=mv.SecurityErrorCode=void 0;mv.resolveSecurity=Hqt;mv.resolveGlobalSecurity=t4l;mv.extractSecurity=I4l;var $kl=h_e(),pWe;(function(t){t.Incomplete="incomplete",t.UnrecognisedSecurityType="unrecognized_security_type"})(pWe||(mv.SecurityErrorCode=pWe={}));var hWe=class t extends Error{constructor(e,I){super(I),this.code=e,this.name="SecurityError"}static incomplete(){return new t(pWe.Incomplete,"Security requirements not met in order to perform the operation")}static unrecognizedType(e){return new t(pWe.UnrecognisedSecurityType,`Unrecognised security type: ${e}`)}};mv.SecurityError=hWe;function Hqt(...t){let e={basic:{},headers:{},queryParams:{},cookies:{},oauth2:{type:"none"}},I=t.find(l=>l.every(n=>{if(n.value==null)return!1;if(n.type==="http:basic")return n.value.username!=null||n.value.password!=null;if(n.type==="http:custom")return null;if(n.type==="oauth2:password")return typeof n.value=="string"&&!!n.value;if(n.type==="oauth2:client_credentials")return typeof n.value=="string"?!!n.value:n.value.clientID!=null||n.value.clientSecret!=null;if(typeof n.value=="string")return!!n.value;throw new Error(`Unrecognized security type: ${n.type} (value type: ${typeof n.value})`)}));return I==null?null:(I.forEach(l=>{if(l.value==null)return;let{type:n}=l;switch(n){case"apiKey:header":e.headers[l.fieldName]=l.value;break;case"apiKey:query":e.queryParams[l.fieldName]=l.value;break;case"apiKey:cookie":e.cookies[l.fieldName]=l.value;break;case"http:basic":e4l(e,l);break;case"http:custom":break;case"http:bearer":ZWe(e,l);break;case"oauth2":ZWe(e,l);break;case"oauth2:password":ZWe(e,l);break;case"oauth2:client_credentials":break;case"openIdConnect":ZWe(e,l);break;default:throw hWe.unrecognizedType(n)}}),e)}function e4l(t,e){e.value!=null&&(t.basic=e.value)}function ZWe(t,e){if(typeof e.value!="string"||!e.value)return;let I=e.value;I.slice(0,7).toLowerCase()!=="bearer "&&(I=`Bearer ${I}`),e.fieldName!==void 0&&(t.headers[e.fieldName]=I)}function t4l(t){return Hqt([{fieldName:"Authorization",type:"http:bearer",value:t?.apiKey??(0,$kl.env)().MISTRAL_API_KEY}])}async function I4l(t){if(t!=null)return typeof t=="function"?t():t}});var mk=Y(JG=>{"use strict";o();var l4l=JG&&JG.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),n4l=JG&&JG.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a4l=JG&&JG.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Qqt.remap)(t,{requires_confirmation:"requiresConfirmation"}));JG.ToolConfiguration$outboundSchema=ws.object({exclude:ws.nullable(ws.array(ws.string())).optional(),include:ws.nullable(ws.array(ws.string())).optional(),requiresConfirmation:ws.nullable(ws.array(ws.string())).optional()}).transform(t=>(0,Qqt.remap)(t,{requiresConfirmation:"requires_confirmation"}));function r4l(t){return JSON.stringify(JG.ToolConfiguration$outboundSchema.parse(t))}function s4l(t){return(0,c4l.safeParse)(t,e=>JG.ToolConfiguration$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ToolConfiguration' from JSON")}});var TE=Y(Ja=>{"use strict";o();var o4l=Ja&&Ja.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),i4l=Ja&&Ja.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),G4l=Ja&&Ja.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,fqt.remap)(t,{tool_configuration:"toolConfiguration"}));Ja.CodeInterpreterTool$outboundSchema=e8.object({toolConfiguration:e8.nullable(Eqt.ToolConfiguration$outboundSchema).optional(),type:Ja.CodeInterpreterToolType$outboundSchema.default("code_interpreter")}).transform(t=>(0,fqt.remap)(t,{toolConfiguration:"tool_configuration"}));function u4l(t){return JSON.stringify(Ja.CodeInterpreterTool$outboundSchema.parse(t))}function b4l(t){return(0,d4l.safeParse)(t,e=>Ja.CodeInterpreterTool$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'CodeInterpreterTool' from JSON")}});var v_e=Y(CG=>{"use strict";o();var m4l=CG&&CG.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Z4l=CG&&CG.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),p4l=CG&&CG.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nCG.CompletionArgsStop$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'CompletionArgsStop' from JSON")}});var Zk=Y(LG=>{"use strict";o();var V4l=LG&&LG.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Y4l=LG&&LG.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),R4l=LG&&LG.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nLG.Prediction$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'Prediction' from JSON")}});var y_e=Y(kG=>{"use strict";o();var g4l=kG&&kG.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),v4l=kG&&kG.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),y4l=kG&&kG.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Jqt.remap)(t,{schema:"schemaDefinition"}));kG.JsonSchema$outboundSchema=Rm.object({name:Rm.string(),description:Rm.nullable(Rm.string()).optional(),schemaDefinition:Rm.record(Rm.any()),strict:Rm.boolean().optional()}).transform(t=>(0,Jqt.remap)(t,{schemaDefinition:"schema"}));function H4l(t){return JSON.stringify(kG.JsonSchema$outboundSchema.parse(t))}function Q4l(t){return(0,w4l.safeParse)(t,e=>kG.JsonSchema$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'JsonSchema' from JSON")}});var w_e=Y(xG=>{"use strict";o();var f4l=xG&&xG.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),E4l=xG&&xG.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),J4l=xG&&xG.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var L4l=jG&&jG.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),k4l=jG&&jG.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),x4l=jG&&jG.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Cqt.remap)(t,{json_schema:"jsonSchema"}));jG.ResponseFormat$outboundSchema=WWe.object({type:kqt.ResponseFormats$outboundSchema.optional(),jsonSchema:WWe.nullable(Lqt.JsonSchema$outboundSchema).optional()}).transform(t=>(0,Cqt.remap)(t,{jsonSchema:"json_schema"}));function U4l(t){return JSON.stringify(jG.ResponseFormat$outboundSchema.parse(t))}function O4l(t){return(0,j4l.safeParse)(t,e=>jG.ResponseFormat$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ResponseFormat' from JSON")}});var pk=Y(UG=>{"use strict";o();var z4l=UG&&UG.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),B4l=UG&&UG.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),M4l=UG&&UG.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var T4l=OG&&OG.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),_4l=OG&&OG.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),K4l=OG&&OG.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,xqt.remap)(t,{presence_penalty:"presencePenalty",frequency_penalty:"frequencyPenalty",top_p:"topP",max_tokens:"maxTokens",random_seed:"randomSeed",response_format:"responseFormat",tool_choice:"toolChoice"}));OG.CompletionArgs$outboundSchema=Yn.object({stop:Yn.nullable(jqt.CompletionArgsStop$outboundSchema).optional(),presencePenalty:Yn.nullable(Yn.number()).optional(),frequencyPenalty:Yn.nullable(Yn.number()).optional(),temperature:Yn.nullable(Yn.number()).optional(),topP:Yn.nullable(Yn.number()).optional(),maxTokens:Yn.nullable(Yn.number().int()).optional(),randomSeed:Yn.nullable(Yn.number().int()).optional(),prediction:Yn.nullable(Uqt.Prediction$outboundSchema).optional(),responseFormat:Yn.nullable(Oqt.ResponseFormat$outboundSchema).optional(),toolChoice:zqt.ToolChoiceEnum$outboundSchema.optional()}).transform(t=>(0,xqt.remap)(t,{presencePenalty:"presence_penalty",frequencyPenalty:"frequency_penalty",topP:"top_p",maxTokens:"max_tokens",randomSeed:"random_seed",responseFormat:"response_format",toolChoice:"tool_choice"}));function q4l(t){return JSON.stringify(OG.CompletionArgs$outboundSchema.parse(t))}function P4l(t){return(0,D4l.safeParse)(t,e=>OG.CompletionArgs$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'CompletionArgs' from JSON")}});var DE=Y(Ca=>{"use strict";o();var $4l=Ca&&Ca.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),exl=Ca&&Ca.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),txl=Ca&&Ca.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Bqt.remap)(t,{tool_configuration:"toolConfiguration",library_ids:"libraryIds"}));Ca.DocumentLibraryTool$outboundSchema=Zv.object({toolConfiguration:Zv.nullable(Mqt.ToolConfiguration$outboundSchema).optional(),type:Ca.DocumentLibraryToolType$outboundSchema.default("document_library"),libraryIds:Zv.array(Zv.string())}).transform(t=>(0,Bqt.remap)(t,{toolConfiguration:"tool_configuration",libraryIds:"library_ids"}));function lxl(t){return JSON.stringify(Ca.DocumentLibraryTool$outboundSchema.parse(t))}function nxl(t){return(0,Ixl.safeParse)(t,e=>Ca.DocumentLibraryTool$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'DocumentLibraryTool' from JSON")}});var NWe=Y(zG=>{"use strict";o();var axl=zG&&zG.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),cxl=zG&&zG.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),rxl=zG&&zG.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nzG.FunctionT$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'FunctionT' from JSON")}});var qE=Y(La=>{"use strict";o();var Gxl=La&&La.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),dxl=La&&La.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),uxl=La&&La.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nLa.FunctionTool$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'FunctionTool' from JSON")}});var Q_e=Y(BG=>{"use strict";o();var pxl=BG&&BG.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),hxl=BG&&BG.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Wxl=BG&&BG.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var Vxl=MG&&MG.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Yxl=MG&&MG.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Rxl=MG&&MG.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Tqt.remap)(t,{hate_and_discrimination:"hateAndDiscrimination",violence_and_threats:"violenceAndThreats",dangerous_and_criminal_content:"dangerousAndCriminalContent"}));MG.ModerationLlmv1CategoryThresholds$outboundSchema=yl.object({sexual:yl.nullable(yl.number()).optional(),hateAndDiscrimination:yl.nullable(yl.number()).optional(),violenceAndThreats:yl.nullable(yl.number()).optional(),dangerousAndCriminalContent:yl.nullable(yl.number()).optional(),selfharm:yl.nullable(yl.number()).optional(),health:yl.nullable(yl.number()).optional(),financial:yl.nullable(yl.number()).optional(),law:yl.nullable(yl.number()).optional(),pii:yl.nullable(yl.number()).optional()}).transform(t=>(0,Tqt.remap)(t,{hateAndDiscrimination:"hate_and_discrimination",violenceAndThreats:"violence_and_threats",dangerousAndCriminalContent:"dangerous_and_criminal_content"}));function Fxl(t){return JSON.stringify(MG.ModerationLlmv1CategoryThresholds$outboundSchema.parse(t))}function Xxl(t){return(0,Axl.safeParse)(t,e=>MG.ModerationLlmv1CategoryThresholds$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ModerationLlmv1CategoryThresholds' from JSON")}});var E_e=Y(SG=>{"use strict";o();var gxl=SG&&SG.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),vxl=SG&&SG.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),yxl=SG&&SG.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,_qt.remap)(t,{model_name:"modelName",custom_category_thresholds:"customCategoryThresholds",ignore_other_categories:"ignoreOtherCategories"}));SG.ModerationLlmv1Config$outboundSchema=PE.object({modelName:PE.string().default("mistral-moderation-2411"),customCategoryThresholds:PE.nullable(Dqt.ModerationLlmv1CategoryThresholds$outboundSchema).optional(),ignoreOtherCategories:PE.boolean().default(!1),action:Kqt.ModerationLlmv1Action$outboundSchema.optional()}).transform(t=>(0,_qt.remap)(t,{modelName:"model_name",customCategoryThresholds:"custom_category_thresholds",ignoreOtherCategories:"ignore_other_categories"}));function Hxl(t){return JSON.stringify(SG.ModerationLlmv1Config$outboundSchema.parse(t))}function Qxl(t){return(0,wxl.safeParse)(t,e=>SG.ModerationLlmv1Config$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ModerationLlmv1Config' from JSON")}});var y2=Y(TG=>{"use strict";o();var fxl=TG&&TG.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Exl=TG&&TG.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Jxl=TG&&TG.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,qqt.remap)(t,{block_on_error:"blockOnError",moderation_llm_v1:"moderationLlmV1"}));TG.GuardrailConfig$outboundSchema=VB.object({blockOnError:VB.boolean().default(!1),moderationLlmV1:VB.nullable(Pqt.ModerationLlmv1Config$outboundSchema)}).transform(t=>(0,qqt.remap)(t,{blockOnError:"block_on_error",moderationLlmV1:"moderation_llm_v1"}));function Lxl(t){return JSON.stringify(TG.GuardrailConfig$outboundSchema.parse(t))}function kxl(t){return(0,Cxl.safeParse)(t,e=>TG.GuardrailConfig$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'GuardrailConfig' from JSON")}});var $E=Y(ka=>{"use strict";o();var xxl=ka&&ka.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),jxl=ka&&ka.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Uxl=ka&&ka.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,$qt.remap)(t,{tool_configuration:"toolConfiguration"}));ka.ImageGenerationTool$outboundSchema=t8.object({toolConfiguration:t8.nullable(ePt.ToolConfiguration$outboundSchema).optional(),type:ka.ImageGenerationToolType$outboundSchema.default("image_generation")}).transform(t=>(0,$qt.remap)(t,{toolConfiguration:"tool_configuration"}));function zxl(t){return JSON.stringify(ka.ImageGenerationTool$outboundSchema.parse(t))}function Bxl(t){return(0,Oxl.safeParse)(t,e=>ka.ImageGenerationTool$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ImageGenerationTool' from JSON")}});var e1=Y(xa=>{"use strict";o();var Mxl=xa&&xa.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Sxl=xa&&xa.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Txl=xa&&xa.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,tPt.remap)(t,{tool_configuration:"toolConfiguration"}));xa.WebSearchPremiumTool$outboundSchema=I8.object({toolConfiguration:I8.nullable(IPt.ToolConfiguration$outboundSchema).optional(),type:xa.WebSearchPremiumToolType$outboundSchema.default("web_search_premium")}).transform(t=>(0,tPt.remap)(t,{toolConfiguration:"tool_configuration"}));function Kxl(t){return JSON.stringify(xa.WebSearchPremiumTool$outboundSchema.parse(t))}function Dxl(t){return(0,_xl.safeParse)(t,e=>xa.WebSearchPremiumTool$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'WebSearchPremiumTool' from JSON")}});var t1=Y(ja=>{"use strict";o();var qxl=ja&&ja.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Pxl=ja&&ja.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),$xl=ja&&ja.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,lPt.remap)(t,{tool_configuration:"toolConfiguration"}));ja.WebSearchTool$outboundSchema=l8.object({toolConfiguration:l8.nullable(nPt.ToolConfiguration$outboundSchema).optional(),type:ja.WebSearchToolType$outboundSchema.default("web_search")}).transform(t=>(0,lPt.remap)(t,{toolConfiguration:"tool_configuration"}));function t3l(t){return JSON.stringify(ja.WebSearchTool$outboundSchema.parse(t))}function I3l(t){return(0,e3l.safeParse)(t,e=>ja.WebSearchTool$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'WebSearchTool' from JSON")}});var dPt=Y(_G=>{"use strict";o();var l3l=_G&&_G.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),n3l=_G&&_G.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a3l=_G&&_G.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n_G.AgentTools$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'AgentTools' from JSON")}_G.Agent$inboundSchema=mI.object({instructions:mI.nullable(mI.string()).optional(),tools:mI.array(mI.union([cPt.CodeInterpreterTool$inboundSchema.and(mI.object({type:mI.literal("code_interpreter")})),rPt.DocumentLibraryTool$inboundSchema.and(mI.object({type:mI.literal("document_library")})),sPt.FunctionTool$inboundSchema.and(mI.object({type:mI.literal("function")})),oPt.ImageGenerationTool$inboundSchema.and(mI.object({type:mI.literal("image_generation")})),GPt.WebSearchTool$inboundSchema.and(mI.object({type:mI.literal("web_search")})),iPt.WebSearchPremiumTool$inboundSchema.and(mI.object({type:mI.literal("web_search_premium")}))])).optional(),completion_args:r3l.CompletionArgs$inboundSchema.optional(),guardrails:mI.nullable(mI.array(s3l.GuardrailConfig$inboundSchema)).optional(),model:mI.string(),name:mI.string(),description:mI.nullable(mI.string()).optional(),handoffs:mI.nullable(mI.array(mI.string())).optional(),metadata:mI.nullable(mI.record(mI.any())).optional(),object:mI.literal("agent").default("agent"),id:mI.string(),version:mI.number().int(),versions:mI.array(mI.number().int()),created_at:mI.string().datetime({offset:!0}).transform(t=>new Date(t)),updated_at:mI.string().datetime({offset:!0}).transform(t=>new Date(t)),deployment_chat:mI.boolean(),source:mI.string(),version_message:mI.nullable(mI.string()).optional()}).transform(t=>(0,c3l.remap)(t,{completion_args:"completionArgs",created_at:"createdAt",updated_at:"updatedAt",deployment_chat:"deploymentChat",version_message:"versionMessage"}));function i3l(t){return(0,aPt.safeParse)(t,e=>_G.Agent$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'Agent' from JSON")}});var uPt=Y(Oh=>{"use strict";o();var G3l=Oh&&Oh.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),d3l=Oh&&Oh.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),u3l=Oh&&Oh.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nnew Date(t)),updated_at:n8.string().datetime({offset:!0}).transform(t=>new Date(t))}).transform(t=>(0,b3l.remap)(t,{created_at:"createdAt",updated_at:"updatedAt"}));function Z3l(t){return(0,m3l.safeParse)(t,e=>Oh.AgentAliasResponse$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'AgentAliasResponse' from JSON")}});var mPt=Y(KG=>{"use strict";o();var p3l=KG&&KG.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),h3l=KG&&KG.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),W3l=KG&&KG.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nKG.AgentConversationAgentVersion$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'AgentConversationAgentVersion' from JSON")}KG.AgentConversation$inboundSchema=Hs.object({name:Hs.nullable(Hs.string()).optional(),description:Hs.nullable(Hs.string()).optional(),metadata:Hs.nullable(Hs.record(Hs.any())).optional(),object:Hs.literal("conversation").default("conversation"),id:Hs.string(),created_at:Hs.string().datetime({offset:!0}).transform(t=>new Date(t)),updated_at:Hs.string().datetime({offset:!0}).transform(t=>new Date(t)),agent_id:Hs.string(),agent_version:Hs.nullable(Hs.union([Hs.string(),Hs.number().int()])).optional()}).transform(t=>(0,N3l.remap)(t,{created_at:"createdAt",updated_at:"updatedAt",agent_id:"agentId",agent_version:"agentVersion"}));function Y3l(t){return(0,bPt.safeParse)(t,e=>KG.AgentConversation$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'AgentConversation' from JSON")}});var YPt=Y(DG=>{"use strict";o();var R3l=DG&&DG.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),A3l=DG&&DG.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),F3l=DG&&DG.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,X3l.remap)(t,{completionArgs:"completion_args",versionMessage:"version_message"}));function w3l(t){return JSON.stringify(DG.AgentCreationRequest$outboundSchema.parse(t))}});var J_e=Y(zh=>{"use strict";o();var H3l=zh&&zh.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Q3l=zh&&zh.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),f3l=zh&&zh.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nnew Date(t)).optional(),output_index:hk.number().int().default(0),id:hk.string(),next_agent_id:hk.string(),next_agent_name:hk.string()}).transform(t=>(0,E3l.remap)(t,{created_at:"createdAt",output_index:"outputIndex",next_agent_id:"nextAgentId",next_agent_name:"nextAgentName"}));function C3l(t){return(0,J3l.safeParse)(t,e=>zh.AgentHandoffDoneEvent$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'AgentHandoffDoneEvent' from JSON")}});var a8=Y(qG=>{"use strict";o();var L3l=qG&&qG.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),k3l=qG&&qG.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),x3l=qG&&qG.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nnew Date(t)).optional(),completed_at:jr.nullable(jr.string().datetime({offset:!0}).transform(t=>new Date(t))).optional(),id:jr.string().optional(),previous_agent_id:jr.string(),previous_agent_name:jr.string(),next_agent_id:jr.string(),next_agent_name:jr.string()}).transform(t=>(0,RPt.remap)(t,{created_at:"createdAt",completed_at:"completedAt",previous_agent_id:"previousAgentId",previous_agent_name:"previousAgentName",next_agent_id:"nextAgentId",next_agent_name:"nextAgentName"}));qG.AgentHandoffEntry$outboundSchema=jr.object({object:jr.literal("entry").default("entry"),type:jr.literal("agent.handoff").default("agent.handoff"),createdAt:jr.date().transform(t=>t.toISOString()).optional(),completedAt:jr.nullable(jr.date().transform(t=>t.toISOString())).optional(),id:jr.string().optional(),previousAgentId:jr.string(),previousAgentName:jr.string(),nextAgentId:jr.string(),nextAgentName:jr.string()}).transform(t=>(0,RPt.remap)(t,{createdAt:"created_at",completedAt:"completed_at",previousAgentId:"previous_agent_id",previousAgentName:"previous_agent_name",nextAgentId:"next_agent_id",nextAgentName:"next_agent_name"}));function U3l(t){return JSON.stringify(qG.AgentHandoffEntry$outboundSchema.parse(t))}function O3l(t){return(0,j3l.safeParse)(t,e=>qG.AgentHandoffEntry$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'AgentHandoffEntry' from JSON")}});var C_e=Y(Bh=>{"use strict";o();var z3l=Bh&&Bh.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),B3l=Bh&&Bh.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),M3l=Bh&&Bh.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nnew Date(t)).optional(),output_index:Wk.number().int().default(0),id:Wk.string(),previous_agent_id:Wk.string(),previous_agent_name:Wk.string()}).transform(t=>(0,S3l.remap)(t,{created_at:"createdAt",output_index:"outputIndex",previous_agent_id:"previousAgentId",previous_agent_name:"previousAgentName"}));function _3l(t){return(0,T3l.safeParse)(t,e=>Bh.AgentHandoffStartedEvent$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'AgentHandoffStartedEvent' from JSON")}});var L_e=Y(PG=>{"use strict";o();var K3l=PG&&PG.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),D3l=PG&&PG.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),q3l=PG&&PG.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,APt.remap)(t,{input_audio:"inputAudio"}));PG.AudioChunk$outboundSchema=YB.object({type:YB.literal("input_audio").default("input_audio"),inputAudio:YB.string()}).transform(t=>(0,APt.remap)(t,{inputAudio:"input_audio"}));function $3l(t){return JSON.stringify(PG.AudioChunk$outboundSchema.parse(t))}function ejl(t){return(0,P3l.safeParse)(t,e=>PG.AudioChunk$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'AudioChunk' from JSON")}});var k_e=Y($G=>{"use strict";o();var tjl=$G&&$G.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Ijl=$G&&$G.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ljl=$G&&$G.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n$G.AudioURL$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'AudioURL' from JSON")}});var x_e=Y(fc=>{"use strict";o();var rjl=fc&&fc.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),sjl=fc&&fc.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ojl=fc&&fc.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nfc.AudioURLChunkAudioURL$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'AudioURLChunkAudioURL' from JSON")}fc.AudioURLChunk$inboundSchema=Mh.object({type:Mh.literal("audio_url").default("audio_url"),audio_url:Mh.union([YWe.AudioURL$inboundSchema,Mh.string()])}).transform(t=>(0,FPt.remap)(t,{audio_url:"audioUrl"}));fc.AudioURLChunk$outboundSchema=Mh.object({type:Mh.literal("audio_url").default("audio_url"),audioUrl:Mh.union([YWe.AudioURL$outboundSchema,Mh.string()])}).transform(t=>(0,FPt.remap)(t,{audioUrl:"audio_url"}));function djl(t){return JSON.stringify(fc.AudioURLChunk$outboundSchema.parse(t))}function ujl(t){return(0,XPt.safeParse)(t,e=>fc.AudioURLChunk$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'AudioURLChunk' from JSON")}});var Nk=Y(ed=>{"use strict";o();var bjl=ed&&ed.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),mjl=ed&&ed.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Zjl=ed&&ed.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,gPt.remap)(t,{document_url:"documentUrl",document_name:"documentName"}));ed.DocumentURLChunk$outboundSchema=w2.object({type:w2.literal("document_url").default("document_url"),documentUrl:w2.string(),documentName:w2.nullable(w2.string()).optional()}).transform(t=>(0,gPt.remap)(t,{documentUrl:"document_url",documentName:"document_name"}));function hjl(t){return JSON.stringify(ed.DocumentURLChunk$outboundSchema.parse(t))}function Wjl(t){return(0,pjl.safeParse)(t,e=>ed.DocumentURLChunk$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'DocumentURLChunk' from JSON")}});var RWe=Y(td=>{"use strict";o();var Njl=td&&td.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Vjl=td&&td.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Yjl=td&&td.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,vPt.remap)(t,{file_id:"fileId"}));td.FileChunk$outboundSchema=RB.object({type:RB.literal("file").default("file"),fileId:RB.string()}).transform(t=>(0,vPt.remap)(t,{fileId:"file_id"}));function Ajl(t){return JSON.stringify(td.FileChunk$outboundSchema.parse(t))}function Fjl(t){return(0,Rjl.safeParse)(t,e=>td.FileChunk$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'FileChunk' from JSON")}});var j_e=Y(Id=>{"use strict";o();var Xjl=Id&&Id.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),gjl=Id&&Id.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),vjl=Id&&Id.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var wjl=ld&&ld.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Hjl=ld&&ld.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Qjl=ld&&ld.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nld.ImageURL$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ImageURL' from JSON")}});var Vk=Y(Ec=>{"use strict";o();var Cjl=Ec&&Ec.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Ljl=Ec&&Ec.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),kjl=Ec&&Ec.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nEc.ImageURLChunkImageURL$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ImageURLChunkImageURL' from JSON")}Ec.ImageURLChunk$inboundSchema=Sh.object({type:Sh.literal("image_url").default("image_url"),image_url:Sh.union([AWe.ImageURL$inboundSchema,Sh.string()])}).transform(t=>(0,wPt.remap)(t,{image_url:"imageUrl"}));Ec.ImageURLChunk$outboundSchema=Sh.object({type:Sh.literal("image_url").default("image_url"),imageUrl:Sh.union([AWe.ImageURL$outboundSchema,Sh.string()])}).transform(t=>(0,wPt.remap)(t,{imageUrl:"image_url"}));function Ujl(t){return JSON.stringify(Ec.ImageURLChunk$outboundSchema.parse(t))}function Ojl(t){return(0,HPt.safeParse)(t,e=>Ec.ImageURLChunk$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ImageURLChunk' from JSON")}});var FWe=Y(nd=>{"use strict";o();var zjl=nd&&nd.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Bjl=nd&&nd.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Mjl=nd&&nd.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,QPt.remap)(t,{reference_ids:"referenceIds"}));nd.ReferenceChunk$outboundSchema=I1.object({type:I1.literal("reference").default("reference"),referenceIds:I1.array(I1.number().int())}).transform(t=>(0,QPt.remap)(t,{referenceIds:"reference_ids"}));function Tjl(t){return JSON.stringify(nd.ReferenceChunk$outboundSchema.parse(t))}function _jl(t){return(0,Sjl.safeParse)(t,e=>nd.ReferenceChunk$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ReferenceChunk' from JSON")}});var l1=Y(ad=>{"use strict";o();var Kjl=ad&&ad.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Djl=ad&&ad.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),qjl=ad&&ad.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nad.TextChunk$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'TextChunk' from JSON")}});var n1=Y(cd=>{"use strict";o();var tUl=cd&&cd.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),IUl=cd&&cd.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),lUl=cd&&cd.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var aUl=Jc&&Jc.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),cUl=Jc&&Jc.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),rUl=Jc&&Jc.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nJc.ToolReferenceChunkTool$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ToolReferenceChunkTool' from JSON")}Jc.ToolReferenceChunk$inboundSchema=Ua.object({type:Ua.literal("tool_reference").default("tool_reference"),tool:Ua.union([XWe.BuiltInConnectors$inboundSchema,Ua.string()]),title:Ua.string(),url:Ua.nullable(Ua.string()).optional(),favicon:Ua.nullable(Ua.string()).optional(),description:Ua.nullable(Ua.string()).optional()});Jc.ToolReferenceChunk$outboundSchema=Ua.object({type:Ua.literal("tool_reference").default("tool_reference"),tool:Ua.union([XWe.BuiltInConnectors$outboundSchema,Ua.string()]),title:Ua.string(),url:Ua.nullable(Ua.string()).optional(),favicon:Ua.nullable(Ua.string()).optional(),description:Ua.nullable(Ua.string()).optional()});function iUl(t){return JSON.stringify(Jc.ToolReferenceChunk$outboundSchema.parse(t))}function GUl(t){return(0,fPt.safeParse)(t,e=>Jc.ToolReferenceChunk$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ToolReferenceChunk' from JSON")}});var Yk=Y(Cc=>{"use strict";o();var dUl=Cc&&Cc.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),uUl=Cc&&Cc.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),bUl=Cc&&Cc.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nCc.Thinking$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'Thinking' from JSON")}Cc.ThinkChunk$inboundSchema=Th.object({type:Th.literal("thinking").default("thinking"),thinking:Th.array(Th.union([yWe.ToolReferenceChunk$inboundSchema,vWe.TextChunk$inboundSchema,gWe.ReferenceChunk$inboundSchema])),closed:Th.boolean().optional()});Cc.ThinkChunk$outboundSchema=Th.object({type:Th.literal("thinking").default("thinking"),thinking:Th.array(Th.union([yWe.ToolReferenceChunk$outboundSchema,vWe.TextChunk$outboundSchema,gWe.ReferenceChunk$outboundSchema])),closed:Th.boolean().optional()});function pUl(t){return JSON.stringify(Cc.ThinkChunk$outboundSchema.parse(t))}function hUl(t){return(0,EPt.safeParse)(t,e=>Cc.ThinkChunk$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ThinkChunk' from JSON")}});var XB=Y(rd=>{"use strict";o();var WUl=rd&&rd.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),NUl=rd&&rd.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),VUl=rd&&rd.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nrd.ContentChunk$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ContentChunk' from JSON")}});var O_e=Y(Lc=>{"use strict";o();var FUl=Lc&&Lc.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),XUl=Lc&&Lc.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),gUl=Lc&&Lc.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nLc.Arguments$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'Arguments' from JSON")}Lc.FunctionCall$inboundSchema=Qs.object({name:Qs.string(),arguments:Qs.union([Qs.record(Qs.any()),Qs.string()])});Lc.FunctionCall$outboundSchema=Qs.object({name:Qs.string(),arguments:Qs.union([Qs.record(Qs.any()),Qs.string()])});function wUl(t){return JSON.stringify(Lc.FunctionCall$outboundSchema.parse(t))}function HUl(t){return(0,zPt.safeParse)(t,e=>Lc.FunctionCall$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'FunctionCall' from JSON")}});var MPt=Y(wWe=>{"use strict";o();Object.defineProperty(wWe,"__esModule",{value:!0});wWe.startCountingUnrecognized=fUl;wWe.unrecognized=QUl;function QUl(t){return r8++,t}var r8=0,BPt=0;function fUl(){BPt++;let t=r8;return{end:e=>{let I=r8-t;return r8=t+(e??I),--BPt===0&&(r8=0),I}}}});var Kh=Y(_h=>{"use strict";o();var EUl=_h&&_h.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),JUl=_h&&_h.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),CUl=_h&&_h.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;na1.literal(I)),a1.string().transform(I=>(0,SPt.unrecognized)(I))])}function kUl(t){let e=Object.values(t).filter(I=>typeof I=="number");return a1.union([...e.map(I=>a1.literal(I)),a1.number().int().transform(I=>(0,SPt.unrecognized)(I))])}function xUl(t){return a1.string()}function jUl(t){return a1.number().int()}});var s8=Y(sd=>{"use strict";o();var UUl=sd&&sd.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),OUl=sd&&sd.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),zUl=sd&&sd.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var BUl=od&&od.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),MUl=od&&od.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),SUl=od&&od.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nod.ToolCall$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ToolCall' from JSON")}});var pv=Y(xc=>{"use strict";o();var DUl=xc&&xc.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),qUl=xc&&xc.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),PUl=xc&&xc.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nxc.AssistantMessageContent$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'AssistantMessageContent' from JSON")}xc.AssistantMessage$inboundSchema=kc.object({role:kc.literal("assistant").default("assistant"),content:kc.nullable(kc.union([kc.string(),kc.array(QWe.ContentChunk$inboundSchema)])).optional(),tool_calls:kc.nullable(kc.array(PPt.ToolCall$inboundSchema)).optional(),prefix:kc.boolean().default(!1)}).transform(t=>(0,DPt.remap)(t,{tool_calls:"toolCalls"}));xc.AssistantMessage$outboundSchema=kc.object({role:kc.literal("assistant").default("assistant"),content:kc.nullable(kc.union([kc.string(),kc.array(QWe.ContentChunk$outboundSchema)])).optional(),toolCalls:kc.nullable(kc.array(PPt.ToolCall$outboundSchema)).optional(),prefix:kc.boolean().default(!1)}).transform(t=>(0,DPt.remap)(t,{toolCalls:"tool_calls"}));function t9l(t){return JSON.stringify(xc.AssistantMessage$outboundSchema.parse(t))}function I9l(t){return(0,qPt.safeParse)(t,e=>xc.AssistantMessage$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'AssistantMessage' from JSON")}});var vB=Y(jZ=>{"use strict";o();var l9l=jZ&&jZ.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),n9l=jZ&&jZ.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a9l=jZ&&jZ.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var r9l=Dh&&Dh.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),s9l=Dh&&Dh.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o9l=Dh&&Dh.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var u9l=id&&id.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),b9l=id&&id.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),m9l=id&&id.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var h9l=qh&&qh.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),W9l=qh&&qh.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),N9l=qh&&qh.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var F9l=Ph&&Ph.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),X9l=Ph&&Ph.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),g9l=Ph&&Ph.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var y9l=$h&&$h.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),w9l=$h&&$h.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),H9l=$h&&$h.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var C9l=Gd&&Gd.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),L9l=Gd&&Gd.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),k9l=Gd&&Gd.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,x9l.remap)(t,{toolCallId:"tool_call_id"}));function U9l(t){return JSON.stringify(Gd.ToolMessage$outboundSchema.parse(t))}});var o1=Y(dd=>{"use strict";o();var O9l=dd&&dd.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),z9l=dd&&dd.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),B9l=dd&&dd.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var T9l=jc&&jc.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),_9l=jc&&jc.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),K9l=jc&&jc.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,D9l.remap)(t,{maxTokens:"max_tokens",randomSeed:"random_seed",responseFormat:"response_format",toolChoice:"tool_choice",presencePenalty:"presence_penalty",frequencyPenalty:"frequency_penalty",parallelToolCalls:"parallel_tool_calls",promptMode:"prompt_mode",agentId:"agent_id"}));function nOl(t){return JSON.stringify(jc.AgentsCompletionRequest$outboundSchema.parse(t))}});var Z7t=Y(Uc=>{"use strict";o();var aOl=Uc&&Uc.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),cOl=Uc&&Uc.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),rOl=Uc&&Uc.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,sOl.remap)(t,{maxTokens:"max_tokens",randomSeed:"random_seed",responseFormat:"response_format",toolChoice:"tool_choice",presencePenalty:"presence_penalty",frequencyPenalty:"frequency_penalty",parallelToolCalls:"parallel_tool_calls",promptMode:"prompt_mode",agentId:"agent_id"}));function ZOl(t){return JSON.stringify(Uc.AgentsCompletionStreamRequest$outboundSchema.parse(t))}});var R7t=Y(ud=>{"use strict";o();var pOl=ud&&ud.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),hOl=ud&&ud.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),WOl=ud&&ud.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,NOl.remap)(t,{completionArgs:"completion_args",deploymentChat:"deployment_chat",versionMessage:"version_message"}));function AOl(t){return JSON.stringify(ud.AgentUpdateRequest$outboundSchema.parse(t))}});var Ak=Y(Uo=>{"use strict";o();var FOl=Uo&&Uo.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),XOl=Uo&&Uo.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),gOl=Uo&&Uo.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nUo.Annotations$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'Annotations' from JSON")}});var M_e=Y(OZ=>{"use strict";o();var yOl=OZ&&OZ.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),wOl=OZ&&OZ.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),HOl=OZ&&OZ.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var fOl=eW&&eW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),EOl=eW&&eW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),JOl=eW&&eW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;neW.ArchiveFTModelOut$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ArchiveFTModelOut' from JSON")}});var S_e=Y(tW=>{"use strict";o();var kOl=tW&&tW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),xOl=tW&&tW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),jOl=tW&&tW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,UOl.remap)(t,{_meta:"meta"}));function zOl(t){return(0,X7t.safeParse)(t,e=>tW.AudioContent$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'AudioContent' from JSON")}});var T_e=Y(bd=>{"use strict";o();var BOl=bd&&bd.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),MOl=bd&&bd.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),SOl=bd&&bd.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var TOl=md&&md.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),_Ol=md&&md.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),KOl=md&&md.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,v7t.remap)(t,{sample_rate:"sampleRate"}));md.AudioFormat$outboundSchema=EWe.object({encoding:y7t.AudioEncoding$outboundSchema,sampleRate:EWe.number().int()}).transform(t=>(0,v7t.remap)(t,{sampleRate:"sample_rate"}));function qOl(t){return JSON.stringify(md.AudioFormat$outboundSchema.parse(t))}function POl(t){return(0,DOl.safeParse)(t,e=>md.AudioFormat$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'AudioFormat' from JSON")}});var Nv=Y(rA=>{"use strict";o();var $Ol=rA&&rA.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),ezl=rA&&rA.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),tzl=rA&&rA.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var lzl=IW&&IW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),nzl=IW&&IW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),azl=IW&&IW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var rzl=zZ&&zZ.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),szl=zZ&&zZ.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ozl=zZ&&zZ.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var Gzl=lW&&lW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),dzl=lW&&lW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),uzl=lW&&lW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,bzl.remap)(t,{fileUrl:"file_url",fileId:"file_id",contextBias:"context_bias",timestampGranularities:"timestamp_granularities"}));function hzl(t){return JSON.stringify(lW.AudioTranscriptionRequest$outboundSchema.parse(t))}});var Q7t=Y(nW=>{"use strict";o();var Wzl=nW&&nW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Nzl=nW&&nW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Vzl=nW&&nW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Yzl.remap)(t,{fileUrl:"file_url",fileId:"file_id",contextBias:"context_bias",timestampGranularities:"timestamp_granularities"}));function Xzl(t){return JSON.stringify(nW.AudioTranscriptionRequestStream$outboundSchema.parse(t))}});var kWe=Y(aW=>{"use strict";o();var gzl=aW&&aW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),vzl=aW&&aW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),yzl=aW&&aW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,wzl.remap)(t,{clientId:"client_id",clientSecret:"client_secret"}));function Hzl(t){return JSON.stringify(aW.AuthData$outboundSchema.parse(t))}});var D_e=Y(Oc=>{"use strict";o();var Qzl=Oc&&Oc.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),fzl=Oc&&Oc.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Ezl=Oc&&Oc.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Jzl.remap)(t,{supported_operators:"supportedOperators"}));function Lzl(t){return(0,Czl.safeParse)(t,e=>Oc.BaseFieldDefinition$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'BaseFieldDefinition' from JSON")}});var xWe=Y(cW=>{"use strict";o();var kzl=cW&&cW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),xzl=cW&&cW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),jzl=cW&&cW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Uzl.remap)(t,{completion_chat:"completionChat",function_calling:"functionCalling",completion_fim:"completionFim",fine_tuning:"fineTuning",audio_transcription:"audioTranscription"}));function zzl(t){return(0,Ozl.safeParse)(t,e=>cW.ModelCapabilities$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ModelCapabilities' from JSON")}});var q_e=Y(rW=>{"use strict";o();var Bzl=rW&&rW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Mzl=rW&&rW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Szl=rW&&rW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nnew Date(t))).optional(),deprecation_replacement_model:ao.nullable(ao.string()).optional(),default_model_temperature:ao.nullable(ao.number()).optional(),type:ao.literal("base").default("base")}).transform(t=>(0,Tzl.remap)(t,{owned_by:"ownedBy",max_context_length:"maxContextLength",deprecation_replacement_model:"deprecationReplacementModel",default_model_temperature:"defaultModelTemperature"}));function Dzl(t){return(0,_zl.safeParse)(t,e=>rW.BaseModelCard$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'BaseModelCard' from JSON")}});var jWe=Y(BZ=>{"use strict";o();var qzl=BZ&&BZ.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Pzl=BZ&&BZ.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),$zl=BZ&&BZ.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var tBl=sW&&sW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),IBl=sW&&sW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),lBl=sW&&sW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nsW.BatchError$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'BatchError' from JSON")}});var eKe=Y(oW=>{"use strict";o();var cBl=oW&&oW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),rBl=oW&&oW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),sBl=oW&&oW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,oBl.remap)(t,{customId:"custom_id"}));function iBl(t){return JSON.stringify(oW.BatchRequest$outboundSchema.parse(t))}});var f7t=Y(iW=>{"use strict";o();var GBl=iW&&iW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),dBl=iW&&iW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),uBl=iW&&iW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,bBl.remap)(t,{inputFiles:"input_files",agentId:"agent_id",timeoutHours:"timeout_hours"}));function pBl(t){return JSON.stringify(iW.BatchJobIn$outboundSchema.parse(t))}});var tKe=Y(Zd=>{"use strict";o();var hBl=Zd&&Zd.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),WBl=Zd&&Zd.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),NBl=Zd&&Zd.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var YBl=GW&&GW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),RBl=GW&&GW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ABl=GW&&GW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,FBl.remap)(t,{input_files:"inputFiles",agent_id:"agentId",output_file:"outputFile",error_file:"errorFile",created_at:"createdAt",total_requests:"totalRequests",completed_requests:"completedRequests",succeeded_requests:"succeededRequests",failed_requests:"failedRequests",started_at:"startedAt",completed_at:"completedAt"}));function yBl(t){return(0,XBl.safeParse)(t,e=>GW.BatchJobOut$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'BatchJobOut' from JSON")}});var E7t=Y(dW=>{"use strict";o();var wBl=dW&&dW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),HBl=dW&&dW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),QBl=dW&&dW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;ndW.BatchJobsOut$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'BatchJobsOut' from JSON")}});var lKe=Y(uW=>{"use strict";o();var CBl=uW&&uW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),LBl=uW&&uW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),kBl=uW&&uW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,xBl.remap)(t,{_meta:"meta"}));function jBl(t){return(0,J7t.safeParse)(t,e=>uW.BlobResourceContents$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'BlobResourceContents' from JSON")}});var OWe=Y(Oa=>{"use strict";o();var UBl=Oa&&Oa.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),OBl=Oa&&Oa.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),zBl=Oa&&Oa.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nOa.FilterCondition$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'FilterCondition' from JSON")}});var aKe=Y(pl=>{"use strict";o();var TBl=pl&&pl.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),_Bl=pl&&pl.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),KBl=pl&&pl.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;npl.FilterGroup$inboundSchema)]);pl.Or$outboundSchema=za.union([G1.FilterCondition$outboundSchema,za.lazy(()=>pl.FilterGroup$outboundSchema)]);function DBl(t){return JSON.stringify(pl.Or$outboundSchema.parse(t))}function qBl(t){return(0,nKe.safeParse)(t,e=>pl.Or$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'Or' from JSON")}pl.FilterGroup$inboundSchema=za.object({AND:za.nullable(za.array(za.union([G1.FilterCondition$inboundSchema,za.lazy(()=>pl.FilterGroup$inboundSchema)]))).optional(),OR:za.nullable(za.array(za.union([G1.FilterCondition$inboundSchema,za.lazy(()=>pl.FilterGroup$inboundSchema)]))).optional()}).transform(t=>(0,C7t.remap)(t,{AND:"and",OR:"or"}));pl.FilterGroup$outboundSchema=za.object({and:za.nullable(za.array(za.union([G1.FilterCondition$outboundSchema,za.lazy(()=>pl.FilterGroup$outboundSchema)]))).optional(),or:za.nullable(za.array(za.union([G1.FilterCondition$outboundSchema,za.lazy(()=>pl.FilterGroup$outboundSchema)]))).optional()}).transform(t=>(0,C7t.remap)(t,{and:"AND",or:"OR"}));function PBl(t){return JSON.stringify(pl.FilterGroup$outboundSchema.parse(t))}function $Bl(t){return(0,nKe.safeParse)(t,e=>pl.FilterGroup$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'FilterGroup' from JSON")}pl.And$inboundSchema=za.union([G1.FilterCondition$inboundSchema,za.lazy(()=>pl.FilterGroup$inboundSchema)]);pl.And$outboundSchema=za.union([G1.FilterCondition$outboundSchema,za.lazy(()=>pl.FilterGroup$outboundSchema)]);function eMl(t){return JSON.stringify(pl.And$outboundSchema.parse(t))}function tMl(t){return(0,nKe.safeParse)(t,e=>pl.And$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'And' from JSON")}});var gk=Y(zc=>{"use strict";o();var IMl=zc&&zc.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),lMl=zc&&zc.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),nMl=zc&&zc.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nzc.Filters$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'Filters' from JSON")}zc.FilterPayload$inboundSchema=d1.object({filters:d1.nullable(d1.union([zWe.FilterCondition$inboundSchema,BWe.FilterGroup$inboundSchema]))});zc.FilterPayload$outboundSchema=d1.object({filters:d1.nullable(d1.union([zWe.FilterCondition$outboundSchema,BWe.FilterGroup$outboundSchema]))});function rMl(t){return JSON.stringify(zc.FilterPayload$outboundSchema.parse(t))}function sMl(t){return(0,L7t.safeParse)(t,e=>zc.FilterPayload$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'FilterPayload' from JSON")}});var cKe=Y(pd=>{"use strict";o();var oMl=pd&&pd.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),iMl=pd&&pd.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),GMl=pd&&pd.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;npd.JudgeClassificationOutputOption$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'JudgeClassificationOutputOption' from JSON")}});var G8=Y(hd=>{"use strict";o();var mMl=hd&&hd.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),ZMl=hd&&hd.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),pMl=hd&&hd.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nhd.JudgeClassificationOutput$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'JudgeClassificationOutput' from JSON")}});var d8=Y(Wd=>{"use strict";o();var VMl=Wd&&Wd.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),YMl=Wd&&Wd.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),RMl=Wd&&Wd.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,x7t.remap)(t,{min_description:"minDescription",max_description:"maxDescription"}));Wd.JudgeRegressionOutput$outboundSchema=bW.object({type:bW.literal("REGRESSION").default("REGRESSION"),min:bW.number().default(0),minDescription:bW.string(),max:bW.number().default(1),maxDescription:bW.string()}).transform(t=>(0,x7t.remap)(t,{minDescription:"min_description",maxDescription:"max_description"}));function FMl(t){return JSON.stringify(Wd.JudgeRegressionOutput$outboundSchema.parse(t))}function XMl(t){return(0,AMl.safeParse)(t,e=>Wd.JudgeRegressionOutput$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'JudgeRegressionOutput' from JSON")}});var MWe=Y(Nd=>{"use strict";o();var gMl=Nd&&Nd.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),vMl=Nd&&Nd.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),yMl=Nd&&Nd.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nNd.JudgePreviewOutput$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'JudgePreviewOutput' from JSON")}Nd.JudgePreview$inboundSchema=Jn.object({id:Jn.string(),created_at:Jn.string().datetime({offset:!0}).transform(t=>new Date(t)),updated_at:Jn.string().datetime({offset:!0}).transform(t=>new Date(t)),deleted_at:Jn.nullable(Jn.string().datetime({offset:!0}).transform(t=>new Date(t))),owner_id:Jn.string(),workspace_id:Jn.string(),name:Jn.string(),description:Jn.string(),model_name:Jn.string(),output:Jn.union([U7t.JudgeClassificationOutput$inboundSchema.and(Jn.object({type:Jn.literal("CLASSIFICATION")})),O7t.JudgeRegressionOutput$inboundSchema.and(Jn.object({type:Jn.literal("REGRESSION")}))]),instructions:Jn.string(),tools:Jn.array(Jn.string()),up_revision:Jn.nullable(Jn.string()).optional(),down_revision:Jn.nullable(Jn.string()).optional(),base_revision:Jn.nullable(Jn.string()).optional()}).transform(t=>(0,wMl.remap)(t,{created_at:"createdAt",updated_at:"updatedAt",deleted_at:"deletedAt",owner_id:"ownerId",workspace_id:"workspaceId",model_name:"modelName",up_revision:"upRevision",down_revision:"downRevision",base_revision:"baseRevision"}));function QMl(t){return(0,j7t.safeParse)(t,e=>Nd.JudgePreview$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'JudgePreview' from JSON")}});var rKe=Y(mW=>{"use strict";o();var fMl=mW&&mW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),EMl=mW&&mW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),JMl=mW&&mW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nnew Date(t)),updated_at:oA.string().datetime({offset:!0}).transform(t=>new Date(t)),deleted_at:oA.nullable(oA.string().datetime({offset:!0}).transform(t=>new Date(t))),name:oA.string(),owner_id:oA.string(),workspace_id:oA.string(),description:oA.string(),max_nb_events:oA.number().int(),search_params:kMl.FilterPayload$inboundSchema,judge:xMl.JudgePreview$inboundSchema}).transform(t=>(0,CMl.remap)(t,{created_at:"createdAt",updated_at:"updatedAt",deleted_at:"deletedAt",owner_id:"ownerId",workspace_id:"workspaceId",max_nb_events:"maxNbEvents",search_params:"searchParams"}));function jMl(t){return(0,LMl.safeParse)(t,e=>mW.CampaignPreview$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'CampaignPreview' from JSON")}});var sKe=Y(ZW=>{"use strict";o();var UMl=ZW&&ZW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),OMl=ZW&&ZW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),zMl=ZW&&ZW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nZW.PaginatedResultCampaignPreview$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'PaginatedResultCampaignPreview' from JSON")}});var z7t=Y(pW=>{"use strict";o();var TMl=pW&&pW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),_Ml=pW&&pW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),KMl=pW&&pW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;npW.CampaignPreviews$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'CampaignPreviews' from JSON")}});var SWe=Y(Vd=>{"use strict";o();var eSl=Vd&&Vd.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),tSl=Vd&&Vd.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ISl=Vd&&Vd.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nnew Date(t)),Bc.array(Bc.string())]);function nSl(t){return(0,B7t.safeParse)(t,e=>Vd.ExtraFields$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ExtraFields' from JSON")}Vd.ChatCompletionEventPreview$inboundSchema=Bc.object({event_id:Bc.string(),correlation_id:Bc.string(),created_at:Bc.string().datetime({offset:!0}).transform(t=>new Date(t)),extra_fields:Bc.record(Bc.nullable(Bc.union([Bc.boolean(),Bc.number().int(),Bc.number(),Bc.string(),Bc.string().datetime({offset:!0}).transform(t=>new Date(t)),Bc.array(Bc.string())]))),nb_input_tokens:Bc.number().int(),nb_output_tokens:Bc.number().int()}).transform(t=>(0,lSl.remap)(t,{event_id:"eventId",correlation_id:"correlationId",created_at:"createdAt",extra_fields:"extraFields",nb_input_tokens:"nbInputTokens",nb_output_tokens:"nbOutputTokens"}));function aSl(t){return(0,B7t.safeParse)(t,e=>Vd.ChatCompletionEventPreview$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ChatCompletionEventPreview' from JSON")}});var oKe=Y(hW=>{"use strict";o();var cSl=hW&&hW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),rSl=hW&&hW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),sSl=hW&&hW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nhW.PaginatedResultChatCompletionEventPreview$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'PaginatedResultChatCompletionEventPreview' from JSON")}});var M7t=Y(WW=>{"use strict";o();var dSl=WW&&WW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),uSl=WW&&WW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),bSl=WW&&WW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,ZSl.remap)(t,{completion_events:"completionEvents"}));function WSl(t){return(0,pSl.safeParse)(t,e=>WW.CampaignSelectedEvents$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'CampaignSelectedEvents' from JSON")}});var S7t=Y(NW=>{"use strict";o();var NSl=NW&&NW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),VSl=NW&&NW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),YSl=NW&&NW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nNW.CampaignStatus$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'CampaignStatus' from JSON")}});var iKe=Y(Yd=>{"use strict";o();var gSl=Yd&&Yd.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),vSl=Yd&&Yd.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ySl=Yd&&Yd.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var QSl=VW&&VW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),fSl=VW&&VW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ESl=VW&&VW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var CSl=YW&&YW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),LSl=YW&&YW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),kSl=YW&&YW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,xSl.remap)(t,{inputs:"input"}));function USl(t){return JSON.stringify(YW.ChatClassificationRequest$outboundSchema.parse(t))}});var TWe=Y(Oo=>{"use strict";o();var OSl=Oo&&Oo.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),zSl=Oo&&Oo.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),I8t=Oo&&Oo.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,BSl.remap)(t,{finish_reason:"finishReason"}));function _Sl(t){return(0,MSl.safeParse)(t,e=>Oo.ChatCompletionChoice$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ChatCompletionChoice' from JSON")}});var dKe=Y(RW=>{"use strict";o();var KSl=RW&&RW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),DSl=RW&&RW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),qSl=RW&&RW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,PSl.remap)(t,{audio_url:"audioUrl",response_message:"responseMessage"}));function eTl(t){return(0,$Sl.safeParse)(t,e=>RW.ChatTranscriptionEvent$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ChatTranscriptionEvent' from JSON")}});var n8t=Y(Rd=>{"use strict";o();var tTl=Rd&&Rd.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),ITl=Rd&&Rd.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),lTl=Rd&&Rd.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nnew Date(t)),Dl.array(Dl.string())]);function cTl(t){return(0,l8t.safeParse)(t,e=>Rd.ChatCompletionEventExtraFields$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ChatCompletionEventExtraFields' from JSON")}Rd.ChatCompletionEvent$inboundSchema=Dl.object({event_id:Dl.string(),correlation_id:Dl.string(),created_at:Dl.string().datetime({offset:!0}).transform(t=>new Date(t)),extra_fields:Dl.record(Dl.nullable(Dl.union([Dl.boolean(),Dl.number().int(),Dl.number(),Dl.string(),Dl.string().datetime({offset:!0}).transform(t=>new Date(t)),Dl.array(Dl.string())]))),nb_input_tokens:Dl.number().int(),nb_output_tokens:Dl.number().int(),enabled_tools:Dl.array(Dl.record(Dl.any())),request_messages:Dl.array(Dl.record(Dl.any())),response_messages:Dl.array(Dl.record(Dl.any())),nb_messages:Dl.number().int(),chat_transcription_events:Dl.array(aTl.ChatTranscriptionEvent$inboundSchema)}).transform(t=>(0,nTl.remap)(t,{event_id:"eventId",correlation_id:"correlationId",created_at:"createdAt",extra_fields:"extraFields",nb_input_tokens:"nbInputTokens",nb_output_tokens:"nbOutputTokens",enabled_tools:"enabledTools",request_messages:"requestMessages",response_messages:"responseMessages",nb_messages:"nbMessages",chat_transcription_events:"chatTranscriptionEvents"}));function rTl(t){return(0,l8t.safeParse)(t,e=>Rd.ChatCompletionEvent$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ChatCompletionEvent' from JSON")}});var a8t=Y(AW=>{"use strict";o();var sTl=AW&&AW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),oTl=AW&&AW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),iTl=AW&&AW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,GTl.remap)(t,{completion_event_ids:"completionEventIds"}));function uTl(t){return(0,dTl.safeParse)(t,e=>AW.ChatCompletionEventIds$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ChatCompletionEventIds' from JSON")}});var bKe=Y(FW=>{"use strict";o();var bTl=FW&&FW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),mTl=FW&&FW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ZTl=FW&&FW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nFW.FeedResultChatCompletionEventPreview$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'FeedResultChatCompletionEventPreview' from JSON")}});var c8t=Y(XW=>{"use strict";o();var NTl=XW&&XW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),VTl=XW&&XW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),YTl=XW&&XW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,ATl.remap)(t,{completion_events:"completionEvents"}));function gTl(t){return(0,FTl.safeParse)(t,e=>XW.ChatCompletionEvents$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ChatCompletionEvents' from JSON")}});var s8t=Y(Ad=>{"use strict";o();var vTl=Ad&&Ad.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),yTl=Ad&&Ad.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),wTl=Ad&&Ad.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nAd.Options$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'Options' from JSON")}Ad.ChatCompletionFieldOptions$inboundSchema=H2.object({options:H2.nullable(H2.array(H2.nullable(H2.union([H2.string(),H2.boolean()])))).optional()});function QTl(t){return(0,r8t.safeParse)(t,e=>Ad.ChatCompletionFieldOptions$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ChatCompletionFieldOptions' from JSON")}});var ZKe=Y(gW=>{"use strict";o();var fTl=gW&&gW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),ETl=gW&&gW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),JTl=gW&&gW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;ngW.FieldGroup$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'FieldGroup' from JSON")}});var o8t=Y(vW=>{"use strict";o();var kTl=vW&&vW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),xTl=vW&&vW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),jTl=vW&&vW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,UTl.remap)(t,{field_definitions:"fieldDefinitions",field_groups:"fieldGroups"}));function MTl(t){return(0,OTl.safeParse)(t,e=>vW.ChatCompletionFields$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ChatCompletionFields' from JSON")}});var Z8t=Y(Mc=>{"use strict";o();var STl=Mc&&Mc.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),TTl=Mc&&Mc.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),_Tl=Mc&&Mc.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,KTl.remap)(t,{topP:"top_p",maxTokens:"max_tokens",randomSeed:"random_seed",responseFormat:"response_format",toolChoice:"tool_choice",presencePenalty:"presence_penalty",frequencyPenalty:"frequency_penalty",parallelToolCalls:"parallel_tool_calls",promptMode:"prompt_mode",safePrompt:"safe_prompt"}));function l_l(t){return JSON.stringify(Mc.ChatCompletionRequest$outboundSchema.parse(t))}});var u1=Y(Fd=>{"use strict";o();var n_l=Fd&&Fd.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),a_l=Fd&&Fd.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),c_l=Fd&&Fd.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,p8t.remap)(t,{prompt_tokens:"promptTokens",completion_tokens:"completionTokens",total_tokens:"totalTokens",prompt_audio_seconds:"promptAudioSeconds"}));Fd.UsageInfo$outboundSchema=pb.object({promptTokens:pb.number().int().default(0),completionTokens:pb.number().int().default(0),totalTokens:pb.number().int().default(0),promptAudioSeconds:pb.nullable(pb.number().int()).optional(),additionalProperties:pb.record(pb.any()).optional()}).transform(t=>({...t.additionalProperties,...(0,p8t.remap)(t,{promptTokens:"prompt_tokens",completionTokens:"completion_tokens",totalTokens:"total_tokens",promptAudioSeconds:"prompt_audio_seconds",additionalProperties:null})}));function r_l(t){return JSON.stringify(Fd.UsageInfo$outboundSchema.parse(t))}function s_l(t){return(0,h8t.safeParse)(t,e=>Fd.UsageInfo$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'UsageInfo' from JSON")}});var W8t=Y(yW=>{"use strict";o();var o_l=yW&&yW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),i_l=yW&&yW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),G_l=yW&&yW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nyW.ChatCompletionResponse$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ChatCompletionResponse' from JSON")}});var X8t=Y(Sc=>{"use strict";o();var Z_l=Sc&&Sc.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),p_l=Sc&&Sc.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),h_l=Sc&&Sc.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,W_l.remap)(t,{topP:"top_p",maxTokens:"max_tokens",randomSeed:"random_seed",responseFormat:"response_format",toolChoice:"tool_choice",presencePenalty:"presence_penalty",frequencyPenalty:"frequency_penalty",parallelToolCalls:"parallel_tool_calls",promptMode:"prompt_mode",safePrompt:"safe_prompt"}));function g_l(t){return JSON.stringify(Sc.ChatCompletionStreamRequest$outboundSchema.parse(t))}});var g8t=Y(Tc=>{"use strict";o();var v_l=Tc&&Tc.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),y_l=Tc&&Tc.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),w_l=Tc&&Tc.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,H_l.remap)(t,{inputs:"input"}));function J_l(t){return JSON.stringify(Tc.ChatModerationRequest$outboundSchema.parse(t))}});var hKe=Y(wW=>{"use strict";o();var C_l=wW&&wW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),L_l=wW&&wW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),k_l=wW&&wW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,x_l.remap)(t,{train_loss:"trainLoss",valid_loss:"validLoss",valid_mean_token_accuracy:"validMeanTokenAccuracy"}));function U_l(t){return(0,j_l.safeParse)(t,e=>wW.MetricOut$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'MetricOut' from JSON")}});var _We=Y(HW=>{"use strict";o();var O_l=HW&&HW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),z_l=HW&&HW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),B_l=HW&&HW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,M_l.remap)(t,{step_number:"stepNumber",created_at:"createdAt"}));function __l(t){return(0,S_l.safeParse)(t,e=>HW.CheckpointOut$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'CheckpointOut' from JSON")}});var v8t=Y(Xd=>{"use strict";o();var K_l=Xd&&Xd.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),D_l=Xd&&Xd.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),q_l=Xd&&Xd.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,P_l.remap)(t,{inputs:"input"}));function eKl(t){return JSON.stringify(Xd.ClassificationRequest$outboundSchema.parse(t))}});var VKe=Y(QW=>{"use strict";o();var tKl=QW&&QW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),IKl=QW&&QW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),lKl=QW&&QW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nQW.ClassificationTargetResult$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ClassificationTargetResult' from JSON")}});var y8t=Y(fW=>{"use strict";o();var cKl=fW&&fW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),rKl=fW&&fW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),sKl=fW&&fW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nfW.ClassificationResponse$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ClassificationResponse' from JSON")}});var KWe=Y(gd=>{"use strict";o();var dKl=gd&&gd.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),uKl=gd&&gd.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),bKl=gd&&gd.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var ZKl=EW&&EW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),pKl=EW&&EW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),hKl=EW&&EW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,WKl.remap)(t,{loss_function:"lossFunction"}));function YKl(t){return(0,NKl.safeParse)(t,e=>EW.ClassifierTargetOut$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ClassifierTargetOut' from JSON")}});var qWe=Y(CW=>{"use strict";o();var RKl=CW&&CW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),AKl=CW&&CW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),FKl=CW&&CW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,XKl.remap)(t,{training_steps:"trainingSteps",learning_rate:"learningRate",weight_decay:"weightDecay",warmup_fraction:"warmupFraction",seq_len:"seqLen"}));function vKl(t){return(0,gKl.safeParse)(t,e=>CW.ClassifierTrainingParameters$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ClassifierTrainingParameters' from JSON")}});var PWe=Y(LW=>{"use strict";o();var yKl=LW&&LW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),wKl=LW&&LW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),HKl=LW&&LW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,QKl.remap)(t,{created_at:"createdAt"}));function EKl(t){return(0,fKl.safeParse)(t,e=>LW.EventOut$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'EventOut' from JSON")}});var jB=Y(kW=>{"use strict";o();var JKl=kW&&kW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),CKl=kW&&kW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),LKl=kW&&kW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,kKl.remap)(t,{expected_duration_seconds:"expectedDurationSeconds",cost_currency:"costCurrency",train_tokens_per_step:"trainTokensPerStep",train_tokens:"trainTokens",data_tokens:"dataTokens",estimated_start_time:"estimatedStartTime"}));function jKl(t){return(0,xKl.safeParse)(t,e=>kW.JobMetadataOut$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'JobMetadataOut' from JSON")}});var UB=Y(xW=>{"use strict";o();var UKl=xW&&xW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),OKl=xW&&xW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),zKl=xW&&xW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,BKl.remap)(t,{run_name:"runName"}));function SKl(t){return(0,MKl.safeParse)(t,e=>xW.WandbIntegrationOut$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'WandbIntegrationOut' from JSON")}});var Q8t=Y(Ur=>{"use strict";o();var TKl=Ur&&Ur.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),_Kl=Ur&&Ur.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),KKl=Ur&&Ur.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nUr.ClassifierDetailedJobOutIntegrations$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ClassifierDetailedJobOutIntegrations' from JSON")}Ur.ClassifierDetailedJobOut$inboundSchema=Ba.object({id:Ba.string(),auto_start:Ba.boolean(),model:Ba.string(),status:Ur.ClassifierDetailedJobOutStatus$inboundSchema,created_at:Ba.number().int(),modified_at:Ba.number().int(),training_files:Ba.array(Ba.string()),validation_files:Ba.nullable(Ba.array(Ba.string())).optional(),object:Ba.literal("job").default("job"),fine_tuned_model:Ba.nullable(Ba.string()).optional(),suffix:Ba.nullable(Ba.string()).optional(),integrations:Ba.nullable(Ba.array(H8t.WandbIntegrationOut$inboundSchema)).optional(),trained_tokens:Ba.nullable(Ba.number().int()).optional(),metadata:Ba.nullable(tDl.JobMetadataOut$inboundSchema).optional(),job_type:Ba.literal("classifier").default("classifier"),hyperparameters:$Kl.ClassifierTrainingParameters$inboundSchema,events:Ba.array(eDl.EventOut$inboundSchema).optional(),checkpoints:Ba.array(qKl.CheckpointOut$inboundSchema).optional(),classifier_targets:Ba.array(PKl.ClassifierTargetOut$inboundSchema)}).transform(t=>(0,DKl.remap)(t,{auto_start:"autoStart",created_at:"createdAt",modified_at:"modifiedAt",training_files:"trainingFiles",validation_files:"validationFiles",fine_tuned_model:"fineTunedModel",trained_tokens:"trainedTokens",job_type:"jobType",classifier_targets:"classifierTargets"}));function lDl(t){return(0,w8t.safeParse)(t,e=>Ur.ClassifierDetailedJobOut$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ClassifierDetailedJobOut' from JSON")}});var $We=Y(jW=>{"use strict";o();var nDl=jW&&jW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),aDl=jW&&jW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),cDl=jW&&jW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,rDl.remap)(t,{completion_chat:"completionChat",completion_fim:"completionFim",function_calling:"functionCalling",fine_tuning:"fineTuning"}));function oDl(t){return(0,sDl.safeParse)(t,e=>jW.FTModelCapabilitiesOut$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'FTModelCapabilitiesOut' from JSON")}});var f8t=Y(UW=>{"use strict";o();var iDl=UW&&UW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),GDl=UW&&UW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),dDl=UW&&UW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,uDl.remap)(t,{owned_by:"ownedBy",workspace_id:"workspaceId",root_version:"rootVersion",max_context_length:"maxContextLength",classifier_targets:"classifierTargets",model_type:"modelType"}));function pDl(t){return(0,bDl.safeParse)(t,e=>UW.ClassifierFTModelOut$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ClassifierFTModelOut' from JSON")}});var YKe=Y(Or=>{"use strict";o();var hDl=Or&&Or.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),WDl=Or&&Or.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),NDl=Or&&Or.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nOr.ClassifierJobOutIntegrations$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ClassifierJobOutIntegrations' from JSON")}Or.ClassifierJobOut$inboundSchema=Wr.object({id:Wr.string(),auto_start:Wr.boolean(),model:Wr.string(),status:Or.ClassifierJobOutStatus$inboundSchema,created_at:Wr.number().int(),modified_at:Wr.number().int(),training_files:Wr.array(Wr.string()),validation_files:Wr.nullable(Wr.array(Wr.string())).optional(),object:Wr.literal("job").default("job"),fine_tuned_model:Wr.nullable(Wr.string()).optional(),suffix:Wr.nullable(Wr.string()).optional(),integrations:Wr.nullable(Wr.array(J8t.WandbIntegrationOut$inboundSchema)).optional(),trained_tokens:Wr.nullable(Wr.number().int()).optional(),metadata:Wr.nullable(RDl.JobMetadataOut$inboundSchema).optional(),job_type:Wr.literal("classifier").default("classifier"),hyperparameters:YDl.ClassifierTrainingParameters$inboundSchema}).transform(t=>(0,VDl.remap)(t,{auto_start:"autoStart",created_at:"createdAt",modified_at:"modifiedAt",training_files:"trainingFiles",validation_files:"validationFiles",fine_tuned_model:"fineTunedModel",trained_tokens:"trainedTokens",job_type:"jobType"}));function FDl(t){return(0,E8t.safeParse)(t,e=>Or.ClassifierJobOut$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ClassifierJobOut' from JSON")}});var RKe=Y(OW=>{"use strict";o();var XDl=OW&&OW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),gDl=OW&&OW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),vDl=OW&&OW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,yDl.remap)(t,{lossFunction:"loss_function"}));function HDl(t){return JSON.stringify(OW.ClassifierTargetIn$outboundSchema.parse(t))}});var AKe=Y(BW=>{"use strict";o();var QDl=BW&&BW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),fDl=BW&&BW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),EDl=BW&&BW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,JDl.remap)(t,{trainingSteps:"training_steps",learningRate:"learning_rate",weightDecay:"weight_decay",warmupFraction:"warmup_fraction",seqLen:"seq_len"}));function CDl(t){return JSON.stringify(BW.ClassifierTrainingParametersIn$outboundSchema.parse(t))}});var FKe=Y(vd=>{"use strict";o();var LDl=vd&&vd.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),kDl=vd&&vd.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),xDl=vd&&vd.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nvd.DeltaMessageContent$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'DeltaMessageContent' from JSON")}vd.DeltaMessage$inboundSchema=MW.object({role:MW.nullable(MW.string()).optional(),content:MW.nullable(MW.union([MW.string(),MW.array(L8t.ContentChunk$inboundSchema)])).optional(),tool_calls:MW.nullable(MW.array(UDl.ToolCall$inboundSchema)).optional()}).transform(t=>(0,jDl.remap)(t,{tool_calls:"toolCalls"}));function zDl(t){return(0,C8t.safeParse)(t,e=>vd.DeltaMessage$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'DeltaMessage' from JSON")}});var gKe=Y(zo=>{"use strict";o();var BDl=zo&&zo.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),MDl=zo&&zo.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),k8t=zo&&zo.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,SDl.remap)(t,{finish_reason:"finishReason"}));function DDl(t){return(0,TDl.safeParse)(t,e=>zo.CompletionResponseStreamChoice$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'CompletionResponseStreamChoice' from JSON")}});var vKe=Y(SW=>{"use strict";o();var qDl=SW&&SW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),PDl=SW&&SW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),$Dl=SW&&SW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nSW.CompletionChunk$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'CompletionChunk' from JSON")}});var eNe=Y(TW=>{"use strict";o();var n6l=TW&&TW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),a6l=TW&&TW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),c6l=TW&&TW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,r6l.remap)(t,{training_steps:"trainingSteps",learning_rate:"learningRate",weight_decay:"weightDecay",warmup_fraction:"warmupFraction",seq_len:"seqLen",fim_ratio:"fimRatio"}));function o6l(t){return(0,s6l.safeParse)(t,e=>TW.CompletionTrainingParameters$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'CompletionTrainingParameters' from JSON")}});var tNe=Y(_W=>{"use strict";o();var i6l=_W&&_W.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),G6l=_W&&_W.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),d6l=_W&&_W.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,u6l.remap)(t,{commit_id:"commitId"}));function m6l(t){return(0,b6l.safeParse)(t,e=>_W.GithubRepositoryOut$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'GithubRepositoryOut' from JSON")}});var U8t=Y(Sa=>{"use strict";o();var Z6l=Sa&&Sa.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),p6l=Sa&&Sa.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),h6l=Sa&&Sa.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nSa.CompletionDetailedJobOutIntegrations$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'CompletionDetailedJobOutIntegrations' from JSON")}Sa.CompletionDetailedJobOutRepositories$inboundSchema=x8t.GithubRepositoryOut$inboundSchema;function F6l(t){return(0,yKe.safeParse)(t,e=>Sa.CompletionDetailedJobOutRepositories$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'CompletionDetailedJobOutRepositories' from JSON")}Sa.CompletionDetailedJobOut$inboundSchema=Ma.object({id:Ma.string(),auto_start:Ma.boolean(),model:Ma.string(),status:Sa.CompletionDetailedJobOutStatus$inboundSchema,created_at:Ma.number().int(),modified_at:Ma.number().int(),training_files:Ma.array(Ma.string()),validation_files:Ma.nullable(Ma.array(Ma.string())).optional(),object:Ma.literal("job").default("job"),fine_tuned_model:Ma.nullable(Ma.string()).optional(),suffix:Ma.nullable(Ma.string()).optional(),integrations:Ma.nullable(Ma.array(j8t.WandbIntegrationOut$inboundSchema)).optional(),trained_tokens:Ma.nullable(Ma.number().int()).optional(),metadata:Ma.nullable(R6l.JobMetadataOut$inboundSchema).optional(),job_type:Ma.literal("completion").default("completion"),hyperparameters:V6l.CompletionTrainingParameters$inboundSchema,repositories:Ma.array(x8t.GithubRepositoryOut$inboundSchema).optional(),events:Ma.array(Y6l.EventOut$inboundSchema).optional(),checkpoints:Ma.array(N6l.CheckpointOut$inboundSchema).optional()}).transform(t=>(0,W6l.remap)(t,{auto_start:"autoStart",created_at:"createdAt",modified_at:"modifiedAt",training_files:"trainingFiles",validation_files:"validationFiles",fine_tuned_model:"fineTunedModel",trained_tokens:"trainedTokens",job_type:"jobType"}));function X6l(t){return(0,yKe.safeParse)(t,e=>Sa.CompletionDetailedJobOut$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'CompletionDetailedJobOut' from JSON")}});var O8t=Y(KW=>{"use strict";o();var g6l=KW&&KW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),v6l=KW&&KW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),y6l=KW&&KW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{try{return JSON.parse(t)}catch(I){return e.addIssue({code:"custom",message:`malformed json: ${I}`}),wKe.NEVER}}).pipe(H6l.CompletionChunk$inboundSchema)});function Q6l(t){return(0,w6l.safeParse)(t,e=>KW.CompletionEvent$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'CompletionEvent' from JSON")}});var z8t=Y(DW=>{"use strict";o();var f6l=DW&&DW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),E6l=DW&&DW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),J6l=DW&&DW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,C6l.remap)(t,{owned_by:"ownedBy",workspace_id:"workspaceId",root_version:"rootVersion",max_context_length:"maxContextLength",model_type:"modelType"}));function x6l(t){return(0,L6l.safeParse)(t,e=>DW.CompletionFTModelOut$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'CompletionFTModelOut' from JSON")}});var QKe=Y(Ta=>{"use strict";o();var j6l=Ta&&Ta.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),U6l=Ta&&Ta.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),O6l=Ta&&Ta.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nTa.Integrations$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'Integrations' from JSON")}Ta.Repositories$inboundSchema=B8t.GithubRepositoryOut$inboundSchema;function T6l(t){return(0,HKe.safeParse)(t,e=>Ta.Repositories$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'Repositories' from JSON")}Ta.CompletionJobOut$inboundSchema=_c.object({id:_c.string(),auto_start:_c.boolean(),model:_c.string(),status:Ta.Status$inboundSchema,created_at:_c.number().int(),modified_at:_c.number().int(),training_files:_c.array(_c.string()),validation_files:_c.nullable(_c.array(_c.string())).optional(),object:_c.literal("job").default("job"),fine_tuned_model:_c.nullable(_c.string()).optional(),suffix:_c.nullable(_c.string()).optional(),integrations:_c.nullable(_c.array(M8t.WandbIntegrationOut$inboundSchema)).optional(),trained_tokens:_c.nullable(_c.number().int()).optional(),metadata:_c.nullable(M6l.JobMetadataOut$inboundSchema).optional(),job_type:_c.literal("completion").default("completion"),hyperparameters:B6l.CompletionTrainingParameters$inboundSchema,repositories:_c.array(B8t.GithubRepositoryOut$inboundSchema).optional()}).transform(t=>(0,z6l.remap)(t,{auto_start:"autoStart",created_at:"createdAt",modified_at:"modifiedAt",training_files:"trainingFiles",validation_files:"validationFiles",fine_tuned_model:"fineTunedModel",trained_tokens:"trainedTokens",job_type:"jobType"}));function _6l(t){return(0,HKe.safeParse)(t,e=>Ta.CompletionJobOut$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'CompletionJobOut' from JSON")}});var fKe=Y(qW=>{"use strict";o();var K6l=qW&&qW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),D6l=qW&&qW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),q6l=qW&&qW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,P6l.remap)(t,{trainingSteps:"training_steps",learningRate:"learning_rate",weightDecay:"weight_decay",warmupFraction:"warmup_fraction",seqLen:"seq_len",fimRatio:"fim_ratio"}));function $6l(t){return JSON.stringify(qW.CompletionTrainingParametersIn$outboundSchema.parse(t))}});var JKe=Y(PW=>{"use strict";o();var eql=PW&&PW.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),tql=PW&&PW.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Iql=PW&&PW.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nPW.ExecutionConfig$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ExecutionConfig' from JSON")}});var CKe=Y($W=>{"use strict";o();var nql=$W&&$W.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),aql=$W&&$W.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),cql=$W&&$W.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,rql.remap)(t,{usage_sentence:"usageSentence"}));function oql(t){return(0,sql.safeParse)(t,e=>$W.IntegrationsSchemasTurbineToolLocale$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'IntegrationsSchemasTurbineToolLocale' from JSON")}});var INe=Y(yd=>{"use strict";o();var iql=yd&&yd.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Gql=yd&&yd.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),dql=yd&&yd.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var bql=eN&&eN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),mql=eN&&eN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Zql=eN&&eN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nnew Date(t)),modified_at:Wb.string().datetime({offset:!0}).transform(t=>new Date(t)),active:Wb.nullable(Wb.boolean()).optional()}).transform(t=>(0,pql.remap)(t,{system_prompt:"systemPrompt",execution_config:"executionConfig",created_at:"createdAt",modified_at:"modifiedAt"}));function Yql(t){return(0,hql.safeParse)(t,e=>eN.IntegrationsSchemasApiToolTool$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'IntegrationsSchemasApiToolTool' from JSON")}});var kKe=Y(IN=>{"use strict";o();var Rql=IN&&IN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Aql=IN&&IN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Fql=IN&&IN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nnew Date(t)),modified_at:tN.string().datetime({offset:!0}).transform(t=>new Date(t)),server:tN.nullable(tN.string()).optional(),auth_type:tN.nullable(tN.string()).optional(),tools:tN.nullable(tN.array(vql.IntegrationsSchemasApiToolTool$inboundSchema)).optional()}).transform(t=>(0,Xql.remap)(t,{created_at:"createdAt",modified_at:"modifiedAt",auth_type:"authType"}));function yql(t){return(0,gql.safeParse)(t,e=>IN.Connector$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'Connector' from JSON")}});var T8t=Y(nN=>{"use strict";o();var wql=nN&&nN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Hql=nN&&nN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Qql=nN&&nN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,fql.remap)(t,{iconUrl:"icon_url",authData:"auth_data",systemPrompt:"system_prompt"}));function Cql(t){return JSON.stringify(nN.ConnectorMCPCreate$outboundSchema.parse(t))}});var _8t=Y(aN=>{"use strict";o();var Lql=aN&&aN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),kql=aN&&aN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),xql=aN&&aN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,jql.remap)(t,{iconUrl:"icon_url",systemPrompt:"system_prompt",connectionConfig:"connection_config",connectionSecrets:"connection_secrets",authData:"auth_data"}));function Oql(t){return JSON.stringify(aN.ConnectorMCPUpdate$outboundSchema.parse(t))}});var K8t=Y(cN=>{"use strict";o();var zql=cN&&cN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Bql=cN&&cN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Mql=cN&&cN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Sql.remap)(t,{fetchConnectionSecrets:"fetch_connection_secrets"}));function Tql(t){return JSON.stringify(cN.ConnectorsQueryFilters$outboundSchema.parse(t))}});var xKe=Y(wd=>{"use strict";o();var _ql=wd&&wd.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Kql=wd&&wd.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Dql=wd&&wd.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nwd.FunctionCallEntryArguments$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'FunctionCallEntryArguments' from JSON")}});var Z8=Y(_a=>{"use strict";o();var ePl=_a&&_a.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),tPl=_a&&_a.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),IPl=_a&&_a.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nnew Date(t)).optional(),completed_at:Tn.nullable(Tn.string().datetime({offset:!0}).transform(t=>new Date(t))).optional(),agent_id:Tn.nullable(Tn.string()).optional(),model:Tn.nullable(Tn.string()).optional(),id:Tn.string().optional(),tool_call_id:Tn.string(),name:Tn.string(),arguments:q8t.FunctionCallEntryArguments$inboundSchema,confirmation_status:Tn.nullable(_a.ConfirmationStatus$inboundSchema).optional()}).transform(t=>(0,D8t.remap)(t,{created_at:"createdAt",completed_at:"completedAt",agent_id:"agentId",tool_call_id:"toolCallId",confirmation_status:"confirmationStatus"}));_a.FunctionCallEntry$outboundSchema=Tn.object({object:Tn.literal("entry").default("entry"),type:Tn.literal("function.call").default("function.call"),createdAt:Tn.date().transform(t=>t.toISOString()).optional(),completedAt:Tn.nullable(Tn.date().transform(t=>t.toISOString())).optional(),agentId:Tn.nullable(Tn.string()).optional(),model:Tn.nullable(Tn.string()).optional(),id:Tn.string().optional(),toolCallId:Tn.string(),name:Tn.string(),arguments:q8t.FunctionCallEntryArguments$outboundSchema,confirmationStatus:Tn.nullable(_a.ConfirmationStatus$outboundSchema).optional()}).transform(t=>(0,D8t.remap)(t,{createdAt:"created_at",completedAt:"completed_at",agentId:"agent_id",toolCallId:"tool_call_id",confirmationStatus:"confirmation_status"}));function nPl(t){return JSON.stringify(_a.FunctionCallEntry$outboundSchema.parse(t))}function aPl(t){return(0,lPl.safeParse)(t,e=>_a.FunctionCallEntry$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'FunctionCallEntry' from JSON")}});var nNe=Y(Hd=>{"use strict";o();var cPl=Hd&&Hd.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),rPl=Hd&&Hd.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),sPl=Hd&&Hd.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nnew Date(t)).optional(),completed_at:Mo.nullable(Mo.string().datetime({offset:!0}).transform(t=>new Date(t))).optional(),id:Mo.string().optional(),tool_call_id:Mo.string(),result:Mo.string()}).transform(t=>(0,P8t.remap)(t,{created_at:"createdAt",completed_at:"completedAt",tool_call_id:"toolCallId"}));Hd.FunctionResultEntry$outboundSchema=Mo.object({object:Mo.literal("entry").default("entry"),type:Mo.literal("function.result").default("function.result"),createdAt:Mo.date().transform(t=>t.toISOString()).optional(),completedAt:Mo.nullable(Mo.date().transform(t=>t.toISOString())).optional(),id:Mo.string().optional(),toolCallId:Mo.string(),result:Mo.string()}).transform(t=>(0,P8t.remap)(t,{createdAt:"created_at",completedAt:"completed_at",toolCallId:"tool_call_id"}));function iPl(t){return JSON.stringify(Hd.FunctionResultEntry$outboundSchema.parse(t))}function GPl(t){return(0,oPl.safeParse)(t,e=>Hd.FunctionResultEntry$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'FunctionResultEntry' from JSON")}});var p8=Y(Kc=>{"use strict";o();var dPl=Kc&&Kc.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),uPl=Kc&&Kc.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),bPl=Kc&&Kc.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nKc.ToolFileChunkTool$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ToolFileChunkTool' from JSON")}Kc.ToolFileChunk$inboundSchema=zr.object({type:zr.literal("tool_file").default("tool_file"),tool:zr.union([aNe.BuiltInConnectors$inboundSchema,zr.string()]),file_id:zr.string(),file_name:zr.nullable(zr.string()).optional(),file_type:zr.nullable(zr.string()).optional()}).transform(t=>(0,$8t.remap)(t,{file_id:"fileId",file_name:"fileName",file_type:"fileType"}));Kc.ToolFileChunk$outboundSchema=zr.object({type:zr.literal("tool_file").default("tool_file"),tool:zr.union([aNe.BuiltInConnectors$outboundSchema,zr.string()]),fileId:zr.string(),fileName:zr.nullable(zr.string()).optional(),fileType:zr.nullable(zr.string()).optional()}).transform(t=>(0,$8t.remap)(t,{fileId:"file_id",fileName:"file_name",fileType:"file_type"}));function pPl(t){return JSON.stringify(Kc.ToolFileChunk$outboundSchema.parse(t))}function hPl(t){return(0,e$t.safeParse)(t,e=>Kc.ToolFileChunk$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ToolFileChunk' from JSON")}});var jKe=Y(Qd=>{"use strict";o();var WPl=Qd&&Qd.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),NPl=Qd&&Qd.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),VPl=Qd&&Qd.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nQd.MessageInputContentChunks$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'MessageInputContentChunks' from JSON")}});var h8=Y(nn=>{"use strict";o();var FPl=nn&&nn.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),XPl=nn&&nn.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),gPl=nn&&nn.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nnn.MessageInputEntryContent$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'MessageInputEntryContent' from JSON")}nn.MessageInputEntry$inboundSchema=_n.object({object:_n.literal("entry").default("entry"),type:_n.literal("message.input").default("message.input"),created_at:_n.string().datetime({offset:!0}).transform(t=>new Date(t)).optional(),completed_at:_n.nullable(_n.string().datetime({offset:!0}).transform(t=>new Date(t))).optional(),id:_n.string().optional(),role:nn.Role$inboundSchema,content:_n.union([_n.string(),_n.array(cNe.MessageInputContentChunks$inboundSchema)]),prefix:_n.boolean().default(!1)}).transform(t=>(0,r$t.remap)(t,{created_at:"createdAt",completed_at:"completedAt"}));nn.MessageInputEntry$outboundSchema=_n.object({object:_n.literal("entry").default("entry"),type:_n.literal("message.input").default("message.input"),createdAt:_n.date().transform(t=>t.toISOString()).optional(),completedAt:_n.nullable(_n.date().transform(t=>t.toISOString())).optional(),id:_n.string().optional(),role:nn.Role$outboundSchema,content:_n.union([_n.string(),_n.array(cNe.MessageInputContentChunks$outboundSchema)]),prefix:_n.boolean().default(!1)}).transform(t=>(0,r$t.remap)(t,{createdAt:"created_at",completedAt:"completed_at"}));function wPl(t){return JSON.stringify(nn.MessageInputEntry$outboundSchema.parse(t))}function HPl(t){return(0,s$t.safeParse)(t,e=>nn.MessageInputEntry$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'MessageInputEntry' from JSON")}});var UKe=Y(fd=>{"use strict";o();var QPl=fd&&fd.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),fPl=fd&&fd.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),EPl=fd&&fd.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nfd.MessageOutputContentChunks$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'MessageOutputContentChunks' from JSON")}});var MB=Y(Dc=>{"use strict";o();var kPl=Dc&&Dc.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),xPl=Dc&&Dc.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),jPl=Dc&&Dc.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nDc.MessageOutputEntryContent$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'MessageOutputEntryContent' from JSON")}Dc.MessageOutputEntry$inboundSchema=jl.object({object:jl.literal("entry").default("entry"),type:jl.literal("message.output").default("message.output"),created_at:jl.string().datetime({offset:!0}).transform(t=>new Date(t)).optional(),completed_at:jl.nullable(jl.string().datetime({offset:!0}).transform(t=>new Date(t))).optional(),agent_id:jl.nullable(jl.string()).optional(),model:jl.nullable(jl.string()).optional(),id:jl.string().optional(),role:jl.literal("assistant").default("assistant"),content:jl.union([jl.string(),jl.array(rNe.MessageOutputContentChunks$inboundSchema)])}).transform(t=>(0,Z$t.remap)(t,{created_at:"createdAt",completed_at:"completedAt",agent_id:"agentId"}));Dc.MessageOutputEntry$outboundSchema=jl.object({object:jl.literal("entry").default("entry"),type:jl.literal("message.output").default("message.output"),createdAt:jl.date().transform(t=>t.toISOString()).optional(),completedAt:jl.nullable(jl.date().transform(t=>t.toISOString())).optional(),agentId:jl.nullable(jl.string()).optional(),model:jl.nullable(jl.string()).optional(),id:jl.string().optional(),role:jl.literal("assistant").default("assistant"),content:jl.union([jl.string(),jl.array(rNe.MessageOutputContentChunks$outboundSchema)])}).transform(t=>(0,Z$t.remap)(t,{createdAt:"created_at",completedAt:"completed_at",agentId:"agent_id"}));function zPl(t){return JSON.stringify(Dc.MessageOutputEntry$outboundSchema.parse(t))}function BPl(t){return(0,p$t.safeParse)(t,e=>Dc.MessageOutputEntry$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'MessageOutputEntry' from JSON")}});var W8=Y(qc=>{"use strict";o();var MPl=qc&&qc.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),SPl=qc&&qc.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),TPl=qc&&qc.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nqc.Name$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'Name' from JSON")}qc.ToolExecutionEntry$inboundSchema=Ul.object({object:Ul.literal("entry").default("entry"),type:Ul.literal("tool.execution").default("tool.execution"),created_at:Ul.string().datetime({offset:!0}).transform(t=>new Date(t)).optional(),completed_at:Ul.nullable(Ul.string().datetime({offset:!0}).transform(t=>new Date(t))).optional(),agent_id:Ul.nullable(Ul.string()).optional(),model:Ul.nullable(Ul.string()).optional(),id:Ul.string().optional(),name:Ul.union([sNe.BuiltInConnectors$inboundSchema,Ul.string()]),arguments:Ul.string(),info:Ul.record(Ul.any()).optional()}).transform(t=>(0,h$t.remap)(t,{created_at:"createdAt",completed_at:"completedAt",agent_id:"agentId"}));qc.ToolExecutionEntry$outboundSchema=Ul.object({object:Ul.literal("entry").default("entry"),type:Ul.literal("tool.execution").default("tool.execution"),createdAt:Ul.date().transform(t=>t.toISOString()).optional(),completedAt:Ul.nullable(Ul.date().transform(t=>t.toISOString())).optional(),agentId:Ul.nullable(Ul.string()).optional(),model:Ul.nullable(Ul.string()).optional(),id:Ul.string().optional(),name:Ul.union([sNe.BuiltInConnectors$outboundSchema,Ul.string()]),arguments:Ul.string(),info:Ul.record(Ul.any()).optional()}).transform(t=>(0,h$t.remap)(t,{createdAt:"created_at",completedAt:"completed_at",agentId:"agent_id"}));function DPl(t){return JSON.stringify(qc.ToolExecutionEntry$outboundSchema.parse(t))}function qPl(t){return(0,W$t.safeParse)(t,e=>qc.ToolExecutionEntry$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ToolExecutionEntry' from JSON")}});var OKe=Y(rN=>{"use strict";o();var PPl=rN&&rN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),$Pl=rN&&rN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),e7l=rN&&rN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var o7l=sN&&sN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),i7l=sN&&sN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),G7l=sN&&sN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var b7l=So&&So.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),m7l=So&&So.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Z7l=So&&So.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,p7l.remap)(t,{toolCallId:"tool_call_id"}));function h7l(t){return JSON.stringify(So.ToolCallConfirmation$outboundSchema.parse(t))}});var N$t=Y(To=>{"use strict";o();var W7l=To&&To.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),N7l=To&&To.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),V7l=To&&To.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Y7l.remap)(t,{handoffExecution:"handoff_execution",completionArgs:"completion_args",toolConfirmations:"tool_confirmations"}));function X7l(t){return JSON.stringify(To.ConversationAppendRequest$outboundSchema.parse(t))}});var V$t=Y(_o=>{"use strict";o();var g7l=_o&&_o.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),v7l=_o&&_o.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),y7l=_o&&_o.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,w7l.remap)(t,{handoffExecution:"handoff_execution",completionArgs:"completion_args",toolConfirmations:"tool_confirmations"}));function E7l(t){return JSON.stringify(_o.ConversationAppendStreamRequest$outboundSchema.parse(t))}});var MKe=Y(Ko=>{"use strict";o();var J7l=Ko&&Ko.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),C7l=Ko&&Ko.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),L7l=Ko&&Ko.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nnew Date(t)).optional(),output_index:gm.number().int().default(0),id:gm.string(),model:gm.nullable(gm.string()).optional(),agent_id:gm.nullable(gm.string()).optional(),name:gm.string(),tool_call_id:gm.string(),arguments:gm.string(),confirmation_status:gm.nullable(Ko.FunctionCallEventConfirmationStatus$inboundSchema).optional()}).transform(t=>(0,k7l.remap)(t,{created_at:"createdAt",output_index:"outputIndex",agent_id:"agentId",tool_call_id:"toolCallId",confirmation_status:"confirmationStatus"}));function j7l(t){return(0,x7l.safeParse)(t,e=>Ko.FunctionCallEvent$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'FunctionCallEvent' from JSON")}});var SKe=Y(oN=>{"use strict";o();var U7l=oN&&oN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),O7l=oN&&oN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),z7l=oN&&oN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;noN.OutputContentChunks$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'OutputContentChunks' from JSON")}});var TKe=Y(Ed=>{"use strict";o();var $7l=Ed&&Ed.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),e8l=Ed&&Ed.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),t8l=Ed&&Ed.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nEd.MessageOutputEventContent$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'MessageOutputEventContent' from JSON")}Ed.MessageOutputEvent$inboundSchema=Nb.object({type:Nb.literal("message.output.delta").default("message.output.delta"),created_at:Nb.string().datetime({offset:!0}).transform(t=>new Date(t)).optional(),output_index:Nb.number().int().default(0),id:Nb.string(),content_index:Nb.number().int().default(0),model:Nb.nullable(Nb.string()).optional(),agent_id:Nb.nullable(Nb.string()).optional(),role:Nb.literal("assistant").default("assistant"),content:Nb.union([Nb.string(),R$t.OutputContentChunks$inboundSchema])}).transform(t=>(0,I8l.remap)(t,{created_at:"createdAt",output_index:"outputIndex",content_index:"contentIndex",agent_id:"agentId"}));function n8l(t){return(0,Y$t.safeParse)(t,e=>Ed.MessageOutputEvent$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'MessageOutputEvent' from JSON")}});var iNe=Y(iN=>{"use strict";o();var a8l=iN&&iN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),c8l=iN&&iN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),r8l=iN&&iN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,s8l.remap)(t,{prompt_tokens:"promptTokens",completion_tokens:"completionTokens",total_tokens:"totalTokens",connector_tokens:"connectorTokens"}));function i8l(t){return(0,o8l.safeParse)(t,e=>iN.ConversationUsageInfo$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ConversationUsageInfo' from JSON")}});var KKe=Y(GN=>{"use strict";o();var G8l=GN&&GN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),d8l=GN&&GN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),u8l=GN&&GN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nnew Date(t)).optional(),usage:Z8l.ConversationUsageInfo$inboundSchema}).transform(t=>(0,b8l.remap)(t,{created_at:"createdAt"}));function p8l(t){return(0,m8l.safeParse)(t,e=>GN.ResponseDoneEvent$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ResponseDoneEvent' from JSON")}});var DKe=Y(dN=>{"use strict";o();var h8l=dN&&dN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),W8l=dN&&dN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),N8l=dN&&dN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nnew Date(t)).optional(),message:N8.string(),code:N8.number().int()}).transform(t=>(0,V8l.remap)(t,{created_at:"createdAt"}));function R8l(t){return(0,Y8l.safeParse)(t,e=>dN.ResponseErrorEvent$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ResponseErrorEvent' from JSON")}});var qKe=Y(uN=>{"use strict";o();var A8l=uN&&uN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),F8l=uN&&uN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),X8l=uN&&uN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nnew Date(t)).optional(),conversation_id:GNe.string()}).transform(t=>(0,g8l.remap)(t,{created_at:"createdAt",conversation_id:"conversationId"}));function y8l(t){return(0,v8l.safeParse)(t,e=>uN.ResponseStartedEvent$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ResponseStartedEvent' from JSON")}});var PKe=Y(SZ=>{"use strict";o();var w8l=SZ&&SZ.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),H8l=SZ&&SZ.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Q8l=SZ&&SZ.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var E8l=Jd&&Jd.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),J8l=Jd&&Jd.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),C8l=Jd&&Jd.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nJd.ToolExecutionDeltaEventName$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ToolExecutionDeltaEventName' from JSON")}Jd.ToolExecutionDeltaEvent$inboundSchema=Q2.object({type:Q2.literal("tool.execution.delta").default("tool.execution.delta"),created_at:Q2.string().datetime({offset:!0}).transform(t=>new Date(t)).optional(),output_index:Q2.number().int().default(0),id:Q2.string(),name:Q2.union([F$t.BuiltInConnectors$inboundSchema,Q2.string()]),arguments:Q2.string()}).transform(t=>(0,L8l.remap)(t,{created_at:"createdAt",output_index:"outputIndex"}));function x8l(t){return(0,A$t.safeParse)(t,e=>Jd.ToolExecutionDeltaEvent$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ToolExecutionDeltaEvent' from JSON")}});var eDe=Y(Cd=>{"use strict";o();var j8l=Cd&&Cd.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),U8l=Cd&&Cd.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),O8l=Cd&&Cd.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nCd.ToolExecutionDoneEventName$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ToolExecutionDoneEventName' from JSON")}Cd.ToolExecutionDoneEvent$inboundSchema=iA.object({type:iA.literal("tool.execution.done").default("tool.execution.done"),created_at:iA.string().datetime({offset:!0}).transform(t=>new Date(t)).optional(),output_index:iA.number().int().default(0),id:iA.string(),name:iA.union([g$t.BuiltInConnectors$inboundSchema,iA.string()]),info:iA.record(iA.any()).optional()}).transform(t=>(0,z8l.remap)(t,{created_at:"createdAt",output_index:"outputIndex"}));function M8l(t){return(0,X$t.safeParse)(t,e=>Cd.ToolExecutionDoneEvent$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ToolExecutionDoneEvent' from JSON")}});var tDe=Y(Ld=>{"use strict";o();var S8l=Ld&&Ld.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),T8l=Ld&&Ld.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),_8l=Ld&&Ld.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nLd.ToolExecutionStartedEventName$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ToolExecutionStartedEventName' from JSON")}Ld.ToolExecutionStartedEvent$inboundSchema=vm.object({type:vm.literal("tool.execution.started").default("tool.execution.started"),created_at:vm.string().datetime({offset:!0}).transform(t=>new Date(t)).optional(),output_index:vm.number().int().default(0),id:vm.string(),model:vm.nullable(vm.string()).optional(),agent_id:vm.nullable(vm.string()).optional(),name:vm.union([y$t.BuiltInConnectors$inboundSchema,vm.string()]),arguments:vm.string()}).transform(t=>(0,K8l.remap)(t,{created_at:"createdAt",output_index:"outputIndex",agent_id:"agentId"}));function q8l(t){return(0,v$t.safeParse)(t,e=>Ld.ToolExecutionStartedEvent$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ToolExecutionStartedEvent' from JSON")}});var U$t=Y(kd=>{"use strict";o();var P8l=kd&&kd.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),$8l=kd&&kd.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),e$l=kd&&kd.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nkd.ConversationEventsData$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ConversationEventsData' from JSON")}kd.ConversationEvents$inboundSchema=SI.object({event:t$l.SSETypes$inboundSchema,data:SI.string().transform((t,e)=>{try{return JSON.parse(t)}catch(I){return e.addIssue({code:"custom",message:`malformed json: ${I}`}),SI.NEVER}}).pipe(SI.union([H$t.AgentHandoffDoneEvent$inboundSchema.and(SI.object({type:SI.literal("agent.handoff.done")})),Q$t.AgentHandoffStartedEvent$inboundSchema.and(SI.object({type:SI.literal("agent.handoff.started")})),J$t.ResponseDoneEvent$inboundSchema.and(SI.object({type:SI.literal("conversation.response.done")})),C$t.ResponseErrorEvent$inboundSchema.and(SI.object({type:SI.literal("conversation.response.error")})),L$t.ResponseStartedEvent$inboundSchema.and(SI.object({type:SI.literal("conversation.response.started")})),f$t.FunctionCallEvent$inboundSchema.and(SI.object({type:SI.literal("function.call.delta")})),E$t.MessageOutputEvent$inboundSchema.and(SI.object({type:SI.literal("message.output.delta")})),k$t.ToolExecutionDeltaEvent$inboundSchema.and(SI.object({type:SI.literal("tool.execution.delta")})),x$t.ToolExecutionDoneEvent$inboundSchema.and(SI.object({type:SI.literal("tool.execution.done")})),j$t.ToolExecutionStartedEvent$inboundSchema.and(SI.object({type:SI.literal("tool.execution.started")}))]))});function l$l(t){return(0,w$t.safeParse)(t,e=>kd.ConversationEvents$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ConversationEvents' from JSON")}});var K$t=Y(xd=>{"use strict";o();var n$l=xd&&xd.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),a$l=xd&&xd.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),c$l=xd&&xd.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nxd.Entries$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'Entries' from JSON")}xd.ConversationHistory$inboundSchema=_B.object({object:_B.literal("conversation.history").default("conversation.history"),conversation_id:_B.string(),entries:_B.array(_B.union([z$t.AgentHandoffEntry$inboundSchema,B$t.FunctionCallEntry$inboundSchema,S$t.MessageInputEntry$inboundSchema,M$t.FunctionResultEntry$inboundSchema,_$t.ToolExecutionEntry$inboundSchema,T$t.MessageOutputEntry$inboundSchema]))}).transform(t=>(0,r$l.remap)(t,{conversation_id:"conversationId"}));function o$l(t){return(0,O$t.safeParse)(t,e=>xd.ConversationHistory$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ConversationHistory' from JSON")}});var IDe=Y(bN=>{"use strict";o();var i$l=bN&&bN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),G$l=bN&&bN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),d$l=bN&&bN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nbN.MessageEntries$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'MessageEntries' from JSON")}});var D$t=Y(mN=>{"use strict";o();var h$l=mN&&mN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),W$l=mN&&mN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),N$l=mN&&mN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,V$l.remap)(t,{conversation_id:"conversationId"}));function A$l(t){return(0,Y$l.safeParse)(t,e=>mN.ConversationMessages$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ConversationMessages' from JSON")}});var V8=Y(jd=>{"use strict";o();var F$l=jd&&jd.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),X$l=jd&&jd.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),g$l=jd&&jd.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n({...t.additionalProperties,...(0,v$l.remap)(t,{additionalProperties:null})}));function y$l(t){return JSON.stringify(jd.ConversationPayload$outboundSchema.parse(t))}function w$l(t){return(0,q$t.safeParse)(t,e=>jd.ConversationPayload$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ConversationPayload' from JSON")}});var neI=Y(Ka=>{"use strict";o();var H$l=Ka&&Ka.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Q$l=Ka&&Ka.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),f$l=Ka&&Ka.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,E$l.remap)(t,{handoffExecution:"handoff_execution",completionArgs:"completion_args",agentId:"agent_id",agentVersion:"agent_version"}));function j$l(t){return JSON.stringify(Ka.ConversationRequest$outboundSchema.parse(t))}});var oeI=Y(is=>{"use strict";o();var U$l=is&&is.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),O$l=is&&is.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),z$l=is&&is.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nis.Outputs$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'Outputs' from JSON")}is.Guardrails$inboundSchema=f2.object({});function T$l(t){return(0,lDe.safeParse)(t,e=>is.Guardrails$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'Guardrails' from JSON")}is.ConversationResponse$inboundSchema=f2.object({object:f2.literal("conversation.response").default("conversation.response"),conversation_id:f2.string(),outputs:f2.array(f2.union([aeI.AgentHandoffEntry$inboundSchema,ceI.FunctionCallEntry$inboundSchema,seI.ToolExecutionEntry$inboundSchema,reI.MessageOutputEntry$inboundSchema])),usage:M$l.ConversationUsageInfo$inboundSchema,guardrails:f2.nullable(f2.array(f2.lazy(()=>is.Guardrails$inboundSchema))).optional()}).transform(t=>(0,B$l.remap)(t,{conversation_id:"conversationId"}));function _$l(t){return(0,lDe.safeParse)(t,e=>is.ConversationResponse$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ConversationResponse' from JSON")}});var ieI=Y(Br=>{"use strict";o();var K$l=Br&&Br.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),D$l=Br&&Br.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),q$l=Br&&Br.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,P$l.remap)(t,{handoffExecution:"handoff_execution",completionArgs:"completion_args",fromEntryId:"from_entry_id",agentVersion:"agent_version"}));function len(t){return JSON.stringify(Br.ConversationRestartRequest$outboundSchema.parse(t))}});var GeI=Y(Mr=>{"use strict";o();var nen=Mr&&Mr.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),aen=Mr&&Mr.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),cen=Mr&&Mr.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,ren.remap)(t,{handoffExecution:"handoff_execution",completionArgs:"completion_args",fromEntryId:"from_entry_id",agentVersion:"agent_version"}));function den(t){return JSON.stringify(Mr.ConversationRestartStreamRequest$outboundSchema.parse(t))}});var nDe=Y(TZ=>{"use strict";o();var uen=TZ&&TZ.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),ben=TZ&&TZ.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),men=TZ&&TZ.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var pen=Da&&Da.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),hen=Da&&Da.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Wen=Da&&Da.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Nen.remap)(t,{handoffExecution:"handoff_execution",completionArgs:"completion_args",agentId:"agent_id",agentVersion:"agent_version"}));function Xen(t){return JSON.stringify(Da.ConversationStreamRequest$outboundSchema.parse(t))}});var WeI=Y(ZN=>{"use strict";o();var gen=ZN&&ZN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),ven=ZN&&ZN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),yen=ZN&&ZN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nnew Date(t)),updated_at:E2.string().datetime({offset:!0}).transform(t=>new Date(t)),deleted_at:E2.nullable(E2.string().datetime({offset:!0}).transform(t=>new Date(t))),name:E2.string(),description:E2.string(),owner_id:E2.string(),workspace_id:E2.string()}).transform(t=>(0,wen.remap)(t,{created_at:"createdAt",updated_at:"updatedAt",deleted_at:"deletedAt",owner_id:"ownerId",workspace_id:"workspaceId"}));function Qen(t){return(0,Hen.safeParse)(t,e=>ZN.Dataset$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'Dataset' from JSON")}});var VeI=Y(pN=>{"use strict";o();var fen=pN&&pN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Een=pN&&pN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Jen=pN&&pN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Cen.remap)(t,{file_url:"fileUrl"}));function ken(t){return(0,Len.safeParse)(t,e=>pN.DatasetExport$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'DatasetExport' from JSON")}});var aDe=Y(hN=>{"use strict";o();var xen=hN&&hN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),jen=hN&&hN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Uen=hN&&hN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nnew Date(t)),updated_at:_Z.string().datetime({offset:!0}).transform(t=>new Date(t)),deleted_at:_Z.nullable(_Z.string().datetime({offset:!0}).transform(t=>new Date(t))),creator_id:_Z.string(),dataset_id:_Z.string(),workspace_id:_Z.string(),status:Ben.BaseTaskStatus$inboundSchema,progress:_Z.nullable(_Z.number().int()).optional(),message:_Z.nullable(_Z.string()).optional()}).transform(t=>(0,Oen.remap)(t,{created_at:"createdAt",updated_at:"updatedAt",deleted_at:"deletedAt",creator_id:"creatorId",dataset_id:"datasetId",workspace_id:"workspaceId"}));function Men(t){return(0,zen.safeParse)(t,e=>hN.DatasetImportTask$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'DatasetImportTask' from JSON")}});var cDe=Y(WN=>{"use strict";o();var Sen=WN&&WN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Ten=WN&&WN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),_en=WN&&WN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nWN.PaginatedResultDatasetImportTask$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'PaginatedResultDatasetImportTask' from JSON")}});var YeI=Y(NN=>{"use strict";o();var Pen=NN&&NN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),$en=NN&&NN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),etn=NN&&NN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nNN.DatasetImportTasks$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'DatasetImportTasks' from JSON")}});var rDe=Y(VN=>{"use strict";o();var atn=VN&&VN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),ctn=VN&&VN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),rtn=VN&&VN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nnew Date(t)),updated_at:J2.string().datetime({offset:!0}).transform(t=>new Date(t)),deleted_at:J2.nullable(J2.string().datetime({offset:!0}).transform(t=>new Date(t))),name:J2.string(),description:J2.string(),owner_id:J2.string(),workspace_id:J2.string()}).transform(t=>(0,stn.remap)(t,{created_at:"createdAt",updated_at:"updatedAt",deleted_at:"deletedAt",owner_id:"ownerId",workspace_id:"workspaceId"}));function itn(t){return(0,otn.safeParse)(t,e=>VN.DatasetPreview$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'DatasetPreview' from JSON")}});var sDe=Y(YN=>{"use strict";o();var Gtn=YN&&YN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),dtn=YN&&YN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),utn=YN&&YN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nYN.PaginatedResultDatasetPreview$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'PaginatedResultDatasetPreview' from JSON")}});var ReI=Y(RN=>{"use strict";o();var ptn=RN&&RN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),htn=RN&&RN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Wtn=RN&&RN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nRN.DatasetPreviews$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'DatasetPreviews' from JSON")}});var oDe=Y(AN=>{"use strict";o();var Atn=AN&&AN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Ftn=AN&&AN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Xtn=AN&&AN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nnew Date(t)),updated_at:Av.string().datetime({offset:!0}).transform(t=>new Date(t)),deleted_at:Av.nullable(Av.string().datetime({offset:!0}).transform(t=>new Date(t))),dataset_id:Av.string(),payload:ytn.ConversationPayload$inboundSchema,properties:Av.record(Av.any()),source:wtn.ConversationSource$inboundSchema}).transform(t=>(0,gtn.remap)(t,{created_at:"createdAt",updated_at:"updatedAt",deleted_at:"deletedAt",dataset_id:"datasetId"}));function Htn(t){return(0,vtn.safeParse)(t,e=>AN.DatasetRecord$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'DatasetRecord' from JSON")}});var iDe=Y(FN=>{"use strict";o();var Qtn=FN&&FN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),ftn=FN&&FN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Etn=FN&&FN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nFN.PaginatedResultDatasetRecord$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'PaginatedResultDatasetRecord' from JSON")}});var AeI=Y(XN=>{"use strict";o();var ktn=XN&&XN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),xtn=XN&&XN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),jtn=XN&&XN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nXN.DatasetRecords$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'DatasetRecords' from JSON")}});var FeI=Y(gN=>{"use strict";o();var Mtn=gN&&gN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Stn=gN&&gN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Ttn=gN&&gN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,_tn.remap)(t,{datasetRecordIds:"dataset_record_ids"}));function Ktn(t){return JSON.stringify(gN.DeleteDatasetRecordsInSchema$outboundSchema.parse(t))}});var XeI=Y(vN=>{"use strict";o();var Dtn=vN&&vN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),qtn=vN&&vN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Ptn=vN&&vN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nvN.DeleteFileOut$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'DeleteFileOut' from JSON")}});var geI=Y(yN=>{"use strict";o();var tIn=yN&&yN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),IIn=yN&&yN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),lIn=yN&&yN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nyN.DeleteModelOut$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'DeleteModelOut' from JSON")}});var mNe=Y(KZ=>{"use strict";o();var cIn=KZ&&KZ.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),rIn=KZ&&KZ.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),sIn=KZ&&KZ.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var iIn=wN&&wN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),GIn=wN&&wN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),dIn=wN&&wN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nnew Date(t)),last_processed_at:sn.nullable(sn.string().datetime({offset:!0}).transform(t=>new Date(t))).optional(),number_of_pages:sn.nullable(sn.number().int()).optional(),process_status:mIn.ProcessStatus$inboundSchema,uploaded_by_id:sn.nullable(sn.string()),uploaded_by_type:sn.string(),tokens_processing_main_content:sn.nullable(sn.number().int()).optional(),tokens_processing_summary:sn.nullable(sn.number().int()).optional(),url:sn.nullable(sn.string()).optional(),attributes:sn.nullable(sn.record(sn.any())).optional(),processing_status:sn.string(),tokens_processing_total:sn.number().int()}).transform(t=>(0,uIn.remap)(t,{library_id:"libraryId",mime_type:"mimeType",created_at:"createdAt",last_processed_at:"lastProcessedAt",number_of_pages:"numberOfPages",process_status:"processStatus",uploaded_by_id:"uploadedById",uploaded_by_type:"uploadedByType",tokens_processing_main_content:"tokensProcessingMainContent",tokens_processing_summary:"tokensProcessingSummary",processing_status:"processingStatus",tokens_processing_total:"tokensProcessingTotal"}));function ZIn(t){return(0,bIn.safeParse)(t,e=>wN.DocumentOut$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'DocumentOut' from JSON")}});var yeI=Y(HN=>{"use strict";o();var pIn=HN&&HN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),hIn=HN&&HN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),WIn=HN&&HN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nHN.DocumentTextContent$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'DocumentTextContent' from JSON")}});var weI=Y(Ud=>{"use strict";o();var YIn=Ud&&Ud.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),RIn=Ud&&Ud.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),AIn=Ud&&Ud.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nt.toISOString()),on.array(on.string()),on.array(on.number().int()),on.array(on.number()),on.array(on.boolean())]);function FIn(t){return JSON.stringify(Ud.Attributes$outboundSchema.parse(t))}Ud.DocumentUpdateIn$outboundSchema=on.object({name:on.nullable(on.string()).optional(),attributes:on.nullable(on.record(on.union([on.boolean(),on.string(),on.number().int(),on.number(),on.date().transform(t=>t.toISOString()),on.array(on.string()),on.array(on.number().int()),on.array(on.number()),on.array(on.boolean())]))).optional()});function XIn(t){return JSON.stringify(Ud.DocumentUpdateIn$outboundSchema.parse(t))}});var uDe=Y(QN=>{"use strict";o();var gIn=QN&&QN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),vIn=QN&&QN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),yIn=QN&&QN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,wIn.remap)(t,{_meta:"meta"}));function HIn(t){return(0,HeI.safeParse)(t,e=>QN.TextResourceContents$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'TextResourceContents' from JSON")}});var mDe=Y(Od=>{"use strict";o();var QIn=Od&&Od.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),fIn=Od&&Od.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),EIn=Od&&Od.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nOd.Resource$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'Resource' from JSON")}Od.EmbeddedResource$inboundSchema=(0,bDe.collectExtraKeys)(Xv.object({type:Xv.literal("resource").default("resource").optional(),resource:Xv.union([feI.TextResourceContents$inboundSchema,QeI.BlobResourceContents$inboundSchema]),annotations:Xv.nullable(CIn.Annotations$inboundSchema).optional(),_meta:Xv.nullable(Xv.record(Xv.any())).optional()}).catchall(Xv.any()),"additionalProperties",!0).transform(t=>(0,JIn.remap)(t,{_meta:"meta"}));function kIn(t){return(0,bDe.safeParse)(t,e=>Od.EmbeddedResource$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'EmbeddedResource' from JSON")}});var ZDe=Y(DZ=>{"use strict";o();var xIn=DZ&&DZ.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),jIn=DZ&&DZ.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),UIn=DZ&&DZ.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var zIn=qZ&&qZ.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),BIn=qZ&&qZ.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),MIn=qZ&&qZ.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var TIn=zd&&zd.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),_In=zd&&zd.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),KIn=zd&&zd.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,DIn.remap)(t,{inputs:"input",outputDimension:"output_dimension",outputDtype:"output_dtype",encodingFormat:"encoding_format"}));function eln(t){return JSON.stringify(zd.EmbeddingRequest$outboundSchema.parse(t))}});var hDe=Y(fN=>{"use strict";o();var tln=fN&&fN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Iln=fN&&fN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),lln=fN&&fN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nfN.EmbeddingResponseData$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'EmbeddingResponseData' from JSON")}});var JeI=Y(EN=>{"use strict";o();var cln=EN&&EN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),rln=EN&&EN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),sln=EN&&EN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nEN.EmbeddingResponse$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'EmbeddingResponse' from JSON")}});var ZNe=Y(PZ=>{"use strict";o();var uln=PZ&&PZ.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),bln=PZ&&PZ.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),mln=PZ&&PZ.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var pln=JN&&JN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),hln=JN&&JN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Wln=JN&&JN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nJN.FieldOptionCountItem$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'FieldOptionCountItem' from JSON")}});var LeI=Y(CN=>{"use strict";o();var Yln=CN&&CN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Rln=CN&&CN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Aln=CN&&CN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nCN.FieldOptionCounts$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'FieldOptionCounts' from JSON")}});var xeI=Y(LN=>{"use strict";o();var vln=LN&&LN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),yln=LN&&LN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),wln=LN&&LN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Hln.remap)(t,{filterParams:"filter_params"}));function fln(t){return JSON.stringify(LN.FieldOptionCountsInSchema$outboundSchema.parse(t))}});var A8=Y(Bd=>{"use strict";o();var Eln=Bd&&Bd.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Jln=Bd&&Bd.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Cln=Bd&&Bd.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var Lln=$Z&&$Z.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),kln=$Z&&$Z.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),xln=$Z&&$Z.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var Uln=Md&&Md.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Oln=Md&&Md.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),zln=Md&&Md.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var Bln=Sd&&Sd.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Mln=Sd&&Sd.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Sln=Sd&&Sd.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var Tln=kN&&kN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),_ln=kN&&kN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Kln=kN&&kN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Dln.remap)(t,{bytes:"sizeBytes",created_at:"createdAt",sample_type:"sampleType",num_lines:"numLines",expires_at:"expiresAt"}));function Inn(t){return(0,qln.safeParse)(t,e=>kN.FileSchema$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'FileSchema' from JSON")}});var BeI=Y(xN=>{"use strict";o();var lnn=xN&&xN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),nnn=xN&&xN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ann=xN&&xN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nxN.FileSignedURL$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'FileSignedURL' from JSON")}});var MeI=Y(Td=>{"use strict";o();var snn=Td&&Td.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),onn=Td&&Td.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),inn=Td&&Td.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Gnn.remap)(t,{topP:"top_p",maxTokens:"max_tokens",randomSeed:"random_seed",minTokens:"min_tokens"}));function unn(t){return JSON.stringify(Td.FIMCompletionRequest$outboundSchema.parse(t))}});var SeI=Y(jN=>{"use strict";o();var bnn=jN&&jN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),mnn=jN&&jN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Znn=jN&&jN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;njN.FIMCompletionResponse$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'FIMCompletionResponse' from JSON")}});var TeI=Y(_d=>{"use strict";o();var Vnn=_d&&_d.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Ynn=_d&&_d.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Rnn=_d&&_d.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Ann.remap)(t,{topP:"top_p",maxTokens:"max_tokens",randomSeed:"random_seed",minTokens:"min_tokens"}));function Xnn(t){return JSON.stringify(_d.FIMCompletionStreamRequest$outboundSchema.parse(t))}});var YDe=Y(ep=>{"use strict";o();var gnn=ep&&ep.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),vnn=ep&&ep.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ynn=ep&&ep.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var Hnn=UN&&UN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Qnn=UN&&UN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),fnn=UN&&UN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nnew Date(t))).optional(),deprecation_replacement_model:Sr.nullable(Sr.string()).optional(),default_model_temperature:Sr.nullable(Sr.number()).optional(),type:Sr.literal("fine-tuned").default("fine-tuned"),job:Sr.string(),root:Sr.string(),archived:Sr.boolean().default(!1)}).transform(t=>(0,Enn.remap)(t,{owned_by:"ownedBy",max_context_length:"maxContextLength",deprecation_replacement_model:"deprecationReplacementModel",default_model_temperature:"defaultModelTemperature"}));function Lnn(t){return(0,Jnn.safeParse)(t,e=>UN.FTModelCard$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'FTModelCard' from JSON")}});var _eI=Y(ON=>{"use strict";o();var knn=ON&&ON.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),xnn=ON&&ON.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),jnn=ON&&ON.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Unn.remap)(t,{searchParams:"search_params",extraFields:"extra_fields"}));function znn(t){return JSON.stringify(ON.GetChatCompletionEventIdsInSchema$outboundSchema.parse(t))}});var KeI=Y(zN=>{"use strict";o();var Bnn=zN&&zN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Mnn=zN&&zN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Snn=zN&&zN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Tnn.remap)(t,{searchParams:"search_params",extraFields:"extra_fields"}));function Knn(t){return JSON.stringify(zN.GetChatCompletionEventsInSchema$outboundSchema.parse(t))}});var ADe=Y(BN=>{"use strict";o();var Dnn=BN&&BN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),qnn=BN&&BN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Pnn=BN&&BN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var ean=MN&&MN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),tan=MN&&MN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Ian=MN&&MN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,lan.remap)(t,{_meta:"meta"}));function aan(t){return(0,DeI.safeParse)(t,e=>MN.ImageContent$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ImageContent' from JSON")}});var gDe=Y(SN=>{"use strict";o();var can=SN&&SN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),ran=SN&&SN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),san=SN&&SN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,oan.remap)(t,{fileId:"file_id"}));function ian(t){return JSON.stringify(SN.TrainingFile$outboundSchema.parse(t))}});var vDe=Y(TN=>{"use strict";o();var Gan=TN&&TN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),dan=TN&&TN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),uan=TN&&TN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,ban.remap)(t,{apiKey:"api_key",runName:"run_name"}));function man(t){return JSON.stringify(TN.WandbIntegration$outboundSchema.parse(t))}});var ttI=Y(Pc=>{"use strict";o();var Zan=Pc&&Pc.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),pan=Pc&&Pc.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),han=Pc&&Pc.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Wan.remap)(t,{trainingFiles:"training_files",validationFiles:"validation_files",autoStart:"auto_start",invalidSampleSkipPercentage:"invalid_sample_skip_percentage",jobType:"job_type",classifierTargets:"classifier_targets"}));function Xan(t){return JSON.stringify(Pc.JobIn$outboundSchema.parse(t))}});var atI=Y(Kd=>{"use strict";o();var gan=Kd&&Kd.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),van=Kd&&Kd.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),yan=Kd&&Kd.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n({jobType:t.job_type}))),ntI.CompletionJobOut$inboundSchema.and(ym.object({job_type:ym.literal("completion")}).transform(t=>({jobType:t.job_type})))]);function wan(t){return(0,ItI.safeParse)(t,e=>Kd.JobsOutData$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'JobsOutData' from JSON")}Kd.JobsOut$inboundSchema=ym.object({data:ym.array(ym.union([ltI.ClassifierJobOut$inboundSchema.and(ym.object({job_type:ym.literal("classifier")}).transform(t=>({jobType:t.job_type}))),ntI.CompletionJobOut$inboundSchema.and(ym.object({job_type:ym.literal("completion")}).transform(t=>({jobType:t.job_type})))])).optional(),object:ym.literal("list").default("list"),total:ym.number().int()});function Han(t){return(0,ItI.safeParse)(t,e=>Kd.JobsOut$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'JobsOut' from JSON")}});var rtI=Y(Dd=>{"use strict";o();var Qan=Dd&&Dd.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),fan=Dd&&Dd.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Ean=Dd&&Dd.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nDd.Answer$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'Answer' from JSON")}Dd.JudgeOutput$inboundSchema=W1.object({analysis:W1.string(),answer:W1.union([W1.string(),W1.number()])});function Can(t){return(0,ctI.safeParse)(t,e=>Dd.JudgeOutput$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'JudgeOutput' from JSON")}});var stI=Y(tp=>{"use strict";o();var Lan=tp&&tp.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),kan=tp&&tp.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),xan=tp&&tp.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var Uan=_N&&_N.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Oan=_N&&_N.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),zan=_N&&_N.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n_N.PaginatedResultJudgePreview$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'PaginatedResultJudgePreview' from JSON")}});var otI=Y(KN=>{"use strict";o();var Tan=KN&&KN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),_an=KN&&KN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Kan=KN&&KN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nKN.JudgePreviews$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'JudgePreviews' from JSON")}});var itI=Y(DN=>{"use strict";o();var ecn=DN&&DN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),tcn=DN&&DN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Icn=DN&&DN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,lcn.remap)(t,{expected_duration_seconds:"expectedDurationSeconds",cost_currency:"costCurrency",train_tokens_per_step:"trainTokensPerStep",train_tokens:"trainTokens",data_tokens:"dataTokens",estimated_start_time:"estimatedStartTime",training_steps:"trainingSteps"}));function acn(t){return(0,ncn.safeParse)(t,e=>DN.LegacyJobMetadataOut$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'LegacyJobMetadataOut' from JSON")}});var GtI=Y(qN=>{"use strict";o();var ccn=qN&&qN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),rcn=qN&&qN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),scn=qN&&qN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,ocn.remap)(t,{chunkSize:"chunk_size"}));function icn(t){return JSON.stringify(qN.LibraryIn$outboundSchema.parse(t))}});var dtI=Y(PN=>{"use strict";o();var Gcn=PN&&PN.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),dcn=PN&&PN.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ucn=PN&&PN.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var mcn=$N&&$N.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Zcn=$N&&$N.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),pcn=$N&&$N.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nnew Date(t)),updated_at:$a.string().datetime({offset:!0}).transform(t=>new Date(t)),owner_id:$a.nullable($a.string()),owner_type:$a.string(),total_size:$a.number().int(),nb_documents:$a.number().int(),chunk_size:$a.nullable($a.number().int()),emoji:$a.nullable($a.string()).optional(),description:$a.nullable($a.string()).optional(),generated_description:$a.nullable($a.string()).optional(),explicit_user_members_count:$a.nullable($a.number().int()).optional(),explicit_workspace_members_count:$a.nullable($a.number().int()).optional(),org_sharing_role:$a.nullable($a.string()).optional(),generated_name:$a.nullable($a.string()).optional()}).transform(t=>(0,hcn.remap)(t,{created_at:"createdAt",updated_at:"updatedAt",owner_id:"ownerId",owner_type:"ownerType",total_size:"totalSize",nb_documents:"nbDocuments",chunk_size:"chunkSize",generated_description:"generatedDescription",explicit_user_members_count:"explicitUserMembersCount",explicit_workspace_members_count:"explicitWorkspaceMembersCount",org_sharing_role:"orgSharingRole",generated_name:"generatedName"}));function Ncn(t){return(0,Wcn.safeParse)(t,e=>$N.LibraryOut$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'LibraryOut' from JSON")}});var HDe=Y(eV=>{"use strict";o();var Vcn=eV&&eV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Ycn=eV&&eV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Rcn=eV&&eV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Acn.remap)(t,{total_items:"totalItems",total_pages:"totalPages",current_page:"currentPage",page_size:"pageSize",has_more:"hasMore"}));function Xcn(t){return(0,Fcn.safeParse)(t,e=>eV.PaginationInfo$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'PaginationInfo' from JSON")}});var btI=Y(tV=>{"use strict";o();var gcn=tV&&tV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),vcn=tV&&tV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ycn=tV&&tV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;ntV.ListDocumentOut$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ListDocumentOut' from JSON")}});var mtI=Y(IV=>{"use strict";o();var Ecn=IV&&IV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Jcn=IV&&IV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Ccn=IV&&IV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nIV.ListFilesOut$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ListFilesOut' from JSON")}});var ptI=Y(lV=>{"use strict";o();var jcn=lV&&lV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Ucn=lV&&lV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Ocn=lV&&lV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nlV.ListLibraryOut$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ListLibraryOut' from JSON")}});var QDe=Y(nV=>{"use strict";o();var Scn=nV&&nV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Tcn=nV&&nV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),_cn=nV&&nV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Kcn.remap)(t,{library_id:"libraryId",user_id:"userId",org_id:"orgId",share_with_type:"shareWithType",share_with_uuid:"shareWithUuid"}));function qcn(t){return(0,Dcn.safeParse)(t,e=>nV.SharingOut$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'SharingOut' from JSON")}});var WtI=Y(aV=>{"use strict";o();var Pcn=aV&&aV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),$cn=aV&&aV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ern=aV&&aV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;naV.ListSharingOut$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ListSharingOut' from JSON")}});var fDe=Y(cV=>{"use strict";o();var nrn=cV&&cV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),arn=cV&&cV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),crn=cV&&cV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,rrn.remap)(t,{_meta:"meta"}));function srn(t){return(0,NtI.safeParse)(t,e=>cV.MCPResultMetadata$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'MCPResultMetadata' from JSON")}});var EDe=Y(rV=>{"use strict";o();var orn=rV&&rV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),irn=rV&&rV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Grn=rV&&rV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nrV.MCPServerIcon$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'MCPServerIcon' from JSON")}});var CDe=Y(sV=>{"use strict";o();var urn=sV&&sV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),brn=sV&&sV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),mrn=sV&&sV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Zrn.remap)(t,{mcp_meta:"mcpMeta"}));function hrn(t){return(0,YtI.safeParse)(t,e=>sV.MCPToolCallMetadata$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'MCPToolCallMetadata' from JSON")}});var RtI=Y(oV=>{"use strict";o();var Wrn=oV&&oV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Nrn=oV&&oV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Vrn=oV&&oV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var Rrn=iV&&iV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Arn=iV&&iV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Frn=iV&&iV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Xrn.remap)(t,{_meta:"meta"}));function yrn(t){return(0,AtI.safeParse)(t,e=>iV.ResourceLink$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ResourceLink' from JSON")}});var xDe=Y(GV=>{"use strict";o();var wrn=GV&&GV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Hrn=GV&&GV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Qrn=GV&&GV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,frn.remap)(t,{_meta:"meta"}));function Jrn(t){return(0,FtI.safeParse)(t,e=>GV.TextContent$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'TextContent' from JSON")}});var HtI=Y(qd=>{"use strict";o();var Crn=qd&&qd.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Lrn=qd&&qd.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),krn=qd&&qd.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nqd.Content$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'Content' from JSON")}qd.MCPToolCallResponse$inboundSchema=(0,jDe.collectExtraKeys)(PB.object({content:PB.array(PB.union([wtI.TextContent$inboundSchema,vtI.ImageContent$inboundSchema,XtI.AudioContent$inboundSchema,ytI.ResourceLink$inboundSchema,gtI.EmbeddedResource$inboundSchema])),metadata:PB.nullable(xrn.MCPToolCallMetadata$inboundSchema).optional()}).catchall(PB.any()),"additionalProperties",!0);function Urn(t){return(0,jDe.safeParse)(t,e=>qd.MCPToolCallResponse$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'MCPToolCallResponse' from JSON")}});var ftI=Y(dV=>{"use strict";o();var Orn=dV&&dV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),zrn=dV&&dV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Brn=dV&&dV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;ndV.MessageResponse$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'MessageResponse' from JSON")}});var UtI=Y(Pd=>{"use strict";o();var Trn=Pd&&Pd.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),_rn=Pd&&Pd.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Krn=Pd&&Pd.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nPd.ModelConversationTools$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ModelConversationTools' from JSON")}Pd.ModelConversation$inboundSchema=PI.object({instructions:PI.nullable(PI.string()).optional(),tools:PI.array(PI.union([JtI.CodeInterpreterTool$inboundSchema.and(PI.object({type:PI.literal("code_interpreter")})),CtI.DocumentLibraryTool$inboundSchema.and(PI.object({type:PI.literal("document_library")})),LtI.FunctionTool$inboundSchema.and(PI.object({type:PI.literal("function")})),ktI.ImageGenerationTool$inboundSchema.and(PI.object({type:PI.literal("image_generation")})),jtI.WebSearchTool$inboundSchema.and(PI.object({type:PI.literal("web_search")})),xtI.WebSearchPremiumTool$inboundSchema.and(PI.object({type:PI.literal("web_search_premium")}))])).optional(),completion_args:qrn.CompletionArgs$inboundSchema.optional(),guardrails:PI.nullable(PI.array(Prn.GuardrailConfig$inboundSchema)).optional(),name:PI.nullable(PI.string()).optional(),description:PI.nullable(PI.string()).optional(),metadata:PI.nullable(PI.record(PI.any())).optional(),object:PI.literal("conversation").default("conversation"),id:PI.string(),created_at:PI.string().datetime({offset:!0}).transform(t=>new Date(t)),updated_at:PI.string().datetime({offset:!0}).transform(t=>new Date(t)),model:PI.string()}).transform(t=>(0,Drn.remap)(t,{completion_args:"completionArgs",created_at:"createdAt",updated_at:"updatedAt"}));function esn(t){return(0,EtI.safeParse)(t,e=>Pd.ModelConversation$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ModelConversation' from JSON")}});var MtI=Y($d=>{"use strict";o();var tsn=$d&&$d.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Isn=$d&&$d.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),lsn=$d&&$d.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n$d.Data$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'Data' from JSON")}$d.ModelList$inboundSchema=Ip.object({object:Ip.string().default("list"),data:Ip.array(Ip.union([ztI.BaseModelCard$inboundSchema.and(Ip.object({type:Ip.literal("base")})),BtI.FTModelCard$inboundSchema.and(Ip.object({type:Ip.literal("fine-tuned")}))])).optional()});function asn(t){return(0,OtI.safeParse)(t,e=>$d.ModelList$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ModelList' from JSON")}});var UDe=Y(uV=>{"use strict";o();var csn=uV&&uV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),rsn=uV&&uV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ssn=uV&&uV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,osn.remap)(t,{category_scores:"categoryScores"}));function Gsn(t){return(0,isn.safeParse)(t,e=>uV.ModerationObject$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ModerationObject' from JSON")}});var StI=Y(bV=>{"use strict";o();var dsn=bV&&bV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),usn=bV&&bV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),bsn=bV&&bV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nbV.ModerationResponse$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ModerationResponse' from JSON")}});var ODe=Y(lp=>{"use strict";o();var hsn=lp&&lp.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Wsn=lp&&lp.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Nsn=lp&&lp.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var Ysn=mV&&mV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Rsn=mV&&mV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Asn=mV&&mV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Fsn.remap)(t,{error_code:"errorCode"}));function vsn(t){return(0,Xsn.safeParse)(t,e=>mV.ObservabilityErrorDetail$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ObservabilityErrorDetail' from JSON")}});var BDe=Y(ZV=>{"use strict";o();var ysn=ZV&&ZV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),wsn=ZV&&ZV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Hsn=ZV&&ZV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Qsn.remap)(t,{top_left_x:"topLeftX",top_left_y:"topLeftY",bottom_right_x:"bottomRightX",bottom_right_y:"bottomRightY",image_base64:"imageBase64",image_annotation:"imageAnnotation"}));function Esn(t){return(0,fsn.safeParse)(t,e=>ZV.OCRImageObject$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'OCRImageObject' from JSON")}});var MDe=Y(pV=>{"use strict";o();var Jsn=pV&&pV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Csn=pV&&pV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Lsn=pV&&pV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;npV.OCRPageDimensions$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'OCRPageDimensions' from JSON")}});var SDe=Y(Do=>{"use strict";o();var jsn=Do&&Do.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Usn=Do&&Do.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Osn=Do&&Do.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nDo.OCRTableObject$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'OCRTableObject' from JSON")}});var TDe=Y(WV=>{"use strict";o();var Msn=WV&&WV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Ssn=WV&&WV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Tsn=WV&&WV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nWV.OCRPageObject$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'OCRPageObject' from JSON")}});var PtI=Y(_r=>{"use strict";o();var $sn=_r&&_r.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),eon=_r&&_r.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ton=_r&&_r.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Ion.remap)(t,{includeImageBase64:"include_image_base64",imageLimit:"image_limit",imageMinSize:"image_min_size",bboxAnnotationFormat:"bbox_annotation_format",documentAnnotationFormat:"document_annotation_format",documentAnnotationPrompt:"document_annotation_prompt",tableFormat:"table_format",extractHeader:"extract_header",extractFooter:"extract_footer"}));function non(t){return JSON.stringify(_r.OCRRequest$outboundSchema.parse(t))}});var _De=Y(NV=>{"use strict";o();var aon=NV&&NV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),con=NV&&NV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ron=NV&&NV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,son.remap)(t,{pages_processed:"pagesProcessed",doc_size_bytes:"docSizeBytes"}));function ion(t){return(0,oon.safeParse)(t,e=>NV.OCRUsageInfo$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'OCRUsageInfo' from JSON")}});var $tI=Y(VV=>{"use strict";o();var Gon=VV&&VV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),don=VV&&VV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),uon=VV&&VV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,bon.remap)(t,{document_annotation:"documentAnnotation",usage_info:"usageInfo"}));function hon(t){return(0,mon.safeParse)(t,e=>VV.OCRResponse$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'OCRResponse' from JSON")}});var KDe=Y(YV=>{"use strict";o();var Won=YV&&YV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Non=YV&&YV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Von=YV&&YV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Yon.remap)(t,{next_cursor:"nextCursor",page_size:"pageSize"}));function Aon(t){return(0,Ron.safeParse)(t,e=>YV.PaginationResponse$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'PaginationResponse' from JSON")}});var tII=Y(RV=>{"use strict";o();var Fon=RV&&RV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Xon=RV&&RV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),gon=RV&&RV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nRV.PaginatedConnectors$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'PaginatedConnectors' from JSON")}});var III=Y(AV=>{"use strict";o();var Qon=AV&&AV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),fon=AV&&AV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Eon=AV&&AV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var Con=FV&&FV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Lon=FV&&FV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),kon=FV&&FV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,xon.remap)(t,{searchParams:"search_params",judgeId:"judge_id",maxNbEvents:"max_nb_events"}));function Uon(t){return JSON.stringify(FV.PostCampaignInSchema$outboundSchema.parse(t))}});var ANe=Y(eu=>{"use strict";o();var Oon=eu&&eu.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),zon=eu&&eu.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Bon=eu&&eu.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Mon.remap)(t,{modelName:"model_name"}));function Ton(t){return JSON.stringify(eu.PostJudgeInSchema$outboundSchema.parse(t))}});var cII=Y(XV=>{"use strict";o();var _on=XV&&XV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Kon=XV&&XV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Don=XV&&XV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Pon.remap)(t,{judgeDefinition:"judge_definition"}));function ein(t){return JSON.stringify(XV.PostChatCompletionEventJudgingInSchema$outboundSchema.parse(t))}});var sII=Y(gV=>{"use strict";o();var tin=gV&&gV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Iin=gV&&gV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),lin=gV&&gV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,nin.remap)(t,{campaignId:"campaign_id"}));function ain(t){return JSON.stringify(gV.PostDatasetImportFromCampaignInSchema$outboundSchema.parse(t))}});var oII=Y(vV=>{"use strict";o();var cin=vV&&vV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),rin=vV&&vV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),sin=vV&&vV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,oin.remap)(t,{datasetRecordIds:"dataset_record_ids"}));function iin(t){return JSON.stringify(vV.PostDatasetImportFromDatasetInSchema$outboundSchema.parse(t))}});var iII=Y(yV=>{"use strict";o();var Gin=yV&&yV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),din=yV&&yV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),uin=yV&&yV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,bin.remap)(t,{completionEventIds:"completion_event_ids"}));function min(t){return JSON.stringify(yV.PostDatasetImportFromExplorerInSchema$outboundSchema.parse(t))}});var dII=Y(wV=>{"use strict";o();var Zin=wV&&wV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),pin=wV&&wV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),hin=wV&&wV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Win.remap)(t,{fileId:"file_id"}));function Nin(t){return JSON.stringify(wV.PostDatasetImportFromFileInSchema$outboundSchema.parse(t))}});var uII=Y(HV=>{"use strict";o();var Vin=HV&&HV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Yin=HV&&HV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Rin=HV&&HV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Ain.remap)(t,{conversationIds:"conversation_ids"}));function Fin(t){return JSON.stringify(HV.PostDatasetImportFromPlaygroundInSchema$outboundSchema.parse(t))}});var bII=Y(QV=>{"use strict";o();var Xin=QV&&QV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),gin=QV&&QV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),vin=QV&&QV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var win=fV&&fV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Hin=fV&&fV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Qin=fV&&fV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var Jin=EV&&EV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Cin=EV&&EV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Lin=EV&&EV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,xin.remap)(t,{judgeDefinition:"judge_definition"}));function Uin(t){return JSON.stringify(EV.PostDatasetRecordJudgingInSchema$outboundSchema.parse(t))}});var pII=Y(JV=>{"use strict";o();var Oin=JV&&JV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),zin=JV&&JV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Bin=JV&&JV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Min.remap)(t,{document_id:"documentId",process_status:"processStatus",processing_status:"processingStatus"}));function _in(t){return(0,Sin.safeParse)(t,e=>JV.ProcessingStatusOut$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ProcessingStatusOut' from JSON")}});var hII=Y(CV=>{"use strict";o();var Kin=CV&&CV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Din=CV&&CV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),qin=CV&&CV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var tGn=LV&&LV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),IGn=LV&&LV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),lGn=LV&&LV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var aGn=tu&&tu.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),cGn=tu&&tu.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),rGn=tu&&tu.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,sGn.remap)(t,{modelName:"model_name"}));function iGn(t){return JSON.stringify(tu.PutJudgeInSchema$outboundSchema.parse(t))}});var l6e=Y($c=>{"use strict";o();var GGn=$c&&$c.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),dGn=$c&&$c.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),uGn=$c&&$c.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n$c.Message$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'Message' from JSON")}$c.RealtimeTranscriptionErrorDetail$inboundSchema=Es.object({message:Es.union([Es.string(),Es.record(Es.any())]),code:Es.number().int()});$c.RealtimeTranscriptionErrorDetail$outboundSchema=Es.object({message:Es.union([Es.string(),Es.record(Es.any())]),code:Es.number().int()});function ZGn(t){return JSON.stringify($c.RealtimeTranscriptionErrorDetail$outboundSchema.parse(t))}function pGn(t){return(0,RII.safeParse)(t,e=>$c.RealtimeTranscriptionErrorDetail$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'RealtimeTranscriptionErrorDetail' from JSON")}});var FII=Y(Iu=>{"use strict";o();var hGn=Iu&&Iu.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),WGn=Iu&&Iu.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),NGn=Iu&&Iu.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nIu.RealtimeTranscriptionError$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'RealtimeTranscriptionError' from JSON")}});var XII=Y(lu=>{"use strict";o();var AGn=lu&&lu.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),FGn=lu&&lu.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),XGn=lu&&lu.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nlu.RealtimeTranscriptionInputAudioAppend$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'RealtimeTranscriptionInputAudioAppend' from JSON")}});var gII=Y(nu=>{"use strict";o();var wGn=nu&&nu.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),HGn=nu&&nu.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),QGn=nu&&nu.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nnu.RealtimeTranscriptionInputAudioEnd$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'RealtimeTranscriptionInputAudioEnd' from JSON")}});var vII=Y(au=>{"use strict";o();var CGn=au&&au.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),LGn=au&&au.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),kGn=au&&au.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nau.RealtimeTranscriptionInputAudioFlush$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'RealtimeTranscriptionInputAudioFlush' from JSON")}});var vNe=Y(cu=>{"use strict";o();var OGn=cu&&cu.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),zGn=cu&&cu.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),BGn=cu&&cu.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,yII.remap)(t,{request_id:"requestId",audio_format:"audioFormat",target_streaming_delay_ms:"targetStreamingDelayMs"}));cu.RealtimeTranscriptionSession$outboundSchema=C2.object({requestId:C2.string(),model:C2.string(),audioFormat:wII.AudioFormat$outboundSchema,targetStreamingDelayMs:C2.nullable(C2.number().int()).optional()}).transform(t=>(0,yII.remap)(t,{requestId:"request_id",audioFormat:"audio_format",targetStreamingDelayMs:"target_streaming_delay_ms"}));function SGn(t){return JSON.stringify(cu.RealtimeTranscriptionSession$outboundSchema.parse(t))}function TGn(t){return(0,MGn.safeParse)(t,e=>cu.RealtimeTranscriptionSession$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'RealtimeTranscriptionSession' from JSON")}});var QII=Y(ru=>{"use strict";o();var _Gn=ru&&ru.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),KGn=ru&&ru.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),DGn=ru&&ru.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nru.RealtimeTranscriptionSessionCreated$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'RealtimeTranscriptionSessionCreated' from JSON")}});var EII=Y(su=>{"use strict";o();var edn=su&&su.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),tdn=su&&su.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Idn=su&&su.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nsu.RealtimeTranscriptionSessionUpdated$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'RealtimeTranscriptionSessionUpdated' from JSON")}});var n6e=Y(ou=>{"use strict";o();var cdn=ou&&ou.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),rdn=ou&&ou.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),sdn=ou&&ou.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,JII.remap)(t,{audio_format:"audioFormat",target_streaming_delay_ms:"targetStreamingDelayMs"}));ou.RealtimeTranscriptionSessionUpdatePayload$outboundSchema=Y1.object({audioFormat:Y1.nullable(CII.AudioFormat$outboundSchema).optional(),targetStreamingDelayMs:Y1.nullable(Y1.number().int()).optional()}).transform(t=>(0,JII.remap)(t,{audioFormat:"audio_format",targetStreamingDelayMs:"target_streaming_delay_ms"}));function idn(t){return JSON.stringify(ou.RealtimeTranscriptionSessionUpdatePayload$outboundSchema.parse(t))}function Gdn(t){return(0,odn.safeParse)(t,e=>ou.RealtimeTranscriptionSessionUpdatePayload$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'RealtimeTranscriptionSessionUpdatePayload' from JSON")}});var kII=Y(iu=>{"use strict";o();var ddn=iu&&iu.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),udn=iu&&iu.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),bdn=iu&&iu.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;niu.RealtimeTranscriptionSessionUpdateMessage$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'RealtimeTranscriptionSessionUpdateMessage' from JSON")}});var xII=Y(np=>{"use strict";o();var hdn=np&&np.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Wdn=np&&np.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Ndn=np&&np.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var Ydn=kV&&kV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Rdn=kV&&kV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Adn=kV&&kV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Fdn.remap)(t,{bytes:"sizeBytes",created_at:"createdAt",sample_type:"sampleType",num_lines:"numLines",expires_at:"expiresAt"}));function Hdn(t){return(0,Xdn.safeParse)(t,e=>kV.RetrieveFileOut$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'RetrieveFileOut' from JSON")}});var OII=Y(xV=>{"use strict";o();var Qdn=xV&&xV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),fdn=xV&&xV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Edn=xV&&xV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Jdn.remap)(t,{apiKey:"ApiKey"}));function Cdn(t){return JSON.stringify(xV.Security$outboundSchema.parse(t))}});var a6e=Y(ap=>{"use strict";o();var Ldn=ap&&ap.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),kdn=ap&&ap.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),xdn=ap&&ap.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var Udn=jV&&jV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Odn=jV&&jV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),zdn=jV&&jV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Bdn.remap)(t,{orgId:"org_id",shareWithUuid:"share_with_uuid",shareWithType:"share_with_type"}));function Sdn(t){return JSON.stringify(jV.SharingDelete$outboundSchema.parse(t))}});var BII=Y(UV=>{"use strict";o();var Tdn=UV&&UV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),_dn=UV&&UV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Kdn=UV&&UV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Ddn.remap)(t,{orgId:"org_id",shareWithUuid:"share_with_uuid",shareWithType:"share_with_type"}));function $dn(t){return JSON.stringify(UV.SharingIn$outboundSchema.parse(t))}});var ENe=Y(du=>{"use strict";o();var eun=du&&du.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),tun=du&&du.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Iun=du&&du.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,MII.remap)(t,{speaker_id:"speakerId"}));du.TranscriptionSegmentChunk$outboundSchema=Gs.object({type:Gs.literal("transcription_segment").default("transcription_segment"),text:Gs.string(),start:Gs.number(),end:Gs.number(),score:Gs.nullable(Gs.number()).optional(),speakerId:Gs.nullable(Gs.string()).optional(),additionalProperties:Gs.record(Gs.any()).optional()}).transform(t=>({...t.additionalProperties,...(0,MII.remap)(t,{speakerId:"speaker_id",additionalProperties:null})}));function lun(t){return JSON.stringify(du.TranscriptionSegmentChunk$outboundSchema.parse(t))}function nun(t){return(0,SII.safeParse)(t,e=>du.TranscriptionSegmentChunk$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'TranscriptionSegmentChunk' from JSON")}});var _II=Y(OV=>{"use strict";o();var aun=OV&&OV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),cun=OV&&OV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),run=OV&&OV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nOV.TranscriptionResponse$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'TranscriptionResponse' from JSON")}});var c6e=Y(uu=>{"use strict";o();var Gun=uu&&uu.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),dun=uu&&uu.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),uun=uu&&uu.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n({...t.additionalProperties,...(0,bun.remap)(t,{additionalProperties:null})}));function mun(t){return JSON.stringify(uu.TranscriptionStreamDone$outboundSchema.parse(t))}function Zun(t){return(0,KII.safeParse)(t,e=>uu.TranscriptionStreamDone$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'TranscriptionStreamDone' from JSON")}});var r6e=Y(cp=>{"use strict";o();var pun=cp&&cp.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),hun=cp&&cp.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Wun=cp&&cp.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var Vun=bu&&bu.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Yun=bu&&bu.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Run=bu&&bu.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,PII.remap)(t,{audio_language:"audioLanguage"}));bu.TranscriptionStreamLanguage$outboundSchema=wv.object({type:wv.literal("transcription.language").default("transcription.language"),audioLanguage:wv.string(),additionalProperties:wv.record(wv.any()).optional()}).transform(t=>({...t.additionalProperties,...(0,PII.remap)(t,{audioLanguage:"audio_language",additionalProperties:null})}));function Aun(t){return JSON.stringify(bu.TranscriptionStreamLanguage$outboundSchema.parse(t))}function Fun(t){return(0,$II.safeParse)(t,e=>bu.TranscriptionStreamLanguage$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'TranscriptionStreamLanguage' from JSON")}});var o6e=Y(zV=>{"use strict";o();var Xun=zV&&zV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),gun=zV&&zV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),vun=zV&&zV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,yun.remap)(t,{speaker_id:"speakerId"}));function wun(t){return(0,elI.safeParse)(t,e=>zV.TranscriptionStreamSegmentDelta$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'TranscriptionStreamSegmentDelta' from JSON")}});var i6e=Y(mu=>{"use strict";o();var Hun=mu&&mu.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Qun=mu&&mu.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),fun=mu&&mu.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n({...t.additionalProperties,...(0,Eun.remap)(t,{additionalProperties:null})}));function Jun(t){return JSON.stringify(mu.TranscriptionStreamTextDelta$outboundSchema.parse(t))}function Cun(t){return(0,tlI.safeParse)(t,e=>mu.TranscriptionStreamTextDelta$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'TranscriptionStreamTextDelta' from JSON")}});var rlI=Y(Zu=>{"use strict";o();var Lun=Zu&&Zu.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),kun=Zu&&Zu.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),xun=Zu&&Zu.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nZu.TranscriptionStreamEventsData$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'TranscriptionStreamEventsData' from JSON")}Zu.TranscriptionStreamEvents$inboundSchema=ds.object({event:jun.TranscriptionStreamEventTypes$inboundSchema,data:ds.string().transform((t,e)=>{try{return JSON.parse(t)}catch(I){return e.addIssue({code:"custom",message:`malformed json: ${I}`}),ds.NEVER}}).pipe(ds.union([llI.TranscriptionStreamDone$inboundSchema.and(ds.object({type:ds.literal("transcription.done")})),nlI.TranscriptionStreamLanguage$inboundSchema.and(ds.object({type:ds.literal("transcription.language")})),alI.TranscriptionStreamSegmentDelta$inboundSchema.and(ds.object({type:ds.literal("transcription.segment")})),clI.TranscriptionStreamTextDelta$inboundSchema.and(ds.object({type:ds.literal("transcription.text.delta")}))]))});function Oun(t){return(0,IlI.safeParse)(t,e=>Zu.TranscriptionStreamEvents$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'TranscriptionStreamEvents' from JSON")}});var slI=Y(BV=>{"use strict";o();var zun=BV&&BV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Mun=BV&&BV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Sun=BV&&BV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nBV.UnarchiveFTModelOut$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'UnarchiveFTModelOut' from JSON")}});var olI=Y(MV=>{"use strict";o();var Kun=MV&&MV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Dun=MV&&MV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),qun=MV&&MV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var $un=SV&&SV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),ebn=SV&&SV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),tbn=SV&&SV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Ibn.remap)(t,{bytes:"sizeBytes",created_at:"createdAt",sample_type:"sampleType",num_lines:"numLines",expires_at:"expiresAt"}));function sbn(t){return(0,lbn.safeParse)(t,e=>SV.UploadFileOut$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'UploadFileOut' from JSON")}});var GlI=Y(us=>{"use strict";o();var obn=us&&us.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),ibn=us&&us.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Gbn=us&&us.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nus.Loc$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'Loc' from JSON")}us.Context$inboundSchema=rp.object({});function ubn(t){return(0,G6e.safeParse)(t,e=>us.Context$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'Context' from JSON")}us.ValidationError$inboundSchema=rp.object({loc:rp.array(rp.union([rp.string(),rp.number().int()])),msg:rp.string(),type:rp.string(),input:rp.any().optional(),ctx:rp.lazy(()=>us.Context$inboundSchema).optional()});function bbn(t){return(0,G6e.safeParse)(t,e=>us.ValidationError$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ValidationError' from JSON")}});var d6e=Y(Ze=>{"use strict";o();Object.defineProperty(Ze,"__esModule",{value:!0});Ze.AgentConversationObject=Ze.AgentObject=Ze.ReportErrorEventType=Ze.ReportCompletedEventType=Ze.ReportStartedEventType=Ze.TaskErrorEventType=Ze.TaskCanceledEventType=Ze.TaskCompletedEventType=Ze.TaskStartedEventType=Ze.StepErrorEventType=Ze.StepCompletedEventType=Ze.StepStartedEventType=Ze.AgentHandoffDoneEventType=Ze.AgentHandoffStartedEventType=Ze.ToolExecutionDoneEventType=Ze.ToolExecutionDeltaEventType=Ze.ToolExecutionStartedEventType=Ze.ResponseErrorEventType=Ze.ResponseDoneEventType=Ze.ResponseStartedEventType=Ze.ConversationEventType=Ze.FunctionCallEventType=Ze.MessageOutputEventRole=Ze.MessageOutputEventType=Ze.AgentHandoffEntryObject=Ze.ToolExecutionEntryObject=Ze.FunctionCallEntryObject=Ze.FunctionResultEntryObject=Ze.MessageInputEntryObject=Ze.MessageOutputEntryObject=Ze.AgentHandoffEntryType=Ze.ToolExecutionEntryType=Ze.FunctionCallEntryType=Ze.FunctionResultEntryType=Ze.MessageInputEntryType=Ze.MessageOutputEntryType=Ze.ToolMessageRole=Ze.UserMessageRole=Ze.SystemMessageRole=Ze.AssistantMessageRole=Ze.TranscriptionSegmentChunkType=Ze.FileURLChunkType=Ze.ToolReferenceChunkType=Ze.ToolFileChunkType=Ze.ReferenceChunkType=Ze.AudioChunkType=Ze.DocumentURLChunkType=Ze.ImageURLChunkType=Ze.ThinkChunkType=Ze.TextChunkType=void 0;Ze.FunctionToolType=Ze.UnarchiveFTModelOutObject=Ze.ArchiveFTModelOutObject=Ze.ModelType=Ze.CompletionFTModelOutObject=Ze.ClassifierFTModelOutModelType=Ze.ClassifierFTModelOutObject=Ze.LegacyJobMetadataOutObject=Ze.WandbIntegrationType=Ze.WandbIntegrationOutType=Ze.GithubRepositoryInType=Ze.GithubRepositoryOutType=Ze.BatchJobsOutObject=Ze.BatchJobOutObject=Ze.JobsOutObject=Ze.CompletionDetailedJobOutJobType=Ze.CompletionDetailedJobOutObject=Ze.ClassifierDetailedJobOutJobType=Ze.ClassifierDetailedJobOutObject=Ze.CompletionJobOutJobType=Ze.CompletionJobOutObject=Ze.ClassifierJobOutJobType=Ze.ClassifierJobOutObject=Ze.TranscriptionStreamTextDeltaType=Ze.TranscriptionStreamSegmentDeltaType=Ze.TranscriptionStreamLanguageType=Ze.TranscriptionStreamDoneType=Ze.ConversationResponseObject=Ze.ConversationMessagesObject=Ze.ConversationHistoryObject=Ze.ModelConversationObject=void 0;Ze.TextChunkType={Text:"text"};Ze.ThinkChunkType={Thinking:"thinking"};Ze.ImageURLChunkType={ImageUrl:"image_url"};Ze.DocumentURLChunkType={DocumentUrl:"document_url"};Ze.AudioChunkType={InputAudio:"input_audio"};Ze.ReferenceChunkType={Reference:"reference"};Ze.ToolFileChunkType={ToolFile:"tool_file"};Ze.ToolReferenceChunkType={ToolReference:"tool_reference"};Ze.FileURLChunkType={FileUrl:"file_url"};Ze.TranscriptionSegmentChunkType={TranscriptionSegment:"transcription_segment"};Ze.AssistantMessageRole={Assistant:"assistant"};Ze.SystemMessageRole={System:"system"};Ze.UserMessageRole={User:"user"};Ze.ToolMessageRole={Tool:"tool"};Ze.MessageOutputEntryType={MessageOutput:"message.output"};Ze.MessageInputEntryType={MessageInput:"message.input"};Ze.FunctionResultEntryType={FunctionResult:"function.result"};Ze.FunctionCallEntryType={FunctionCall:"function.call"};Ze.ToolExecutionEntryType={ToolExecution:"tool.execution"};Ze.AgentHandoffEntryType={AgentHandoff:"agent.handoff"};Ze.MessageOutputEntryObject={MessageOutput:"message.output"};Ze.MessageInputEntryObject={MessageInput:"message.input"};Ze.FunctionResultEntryObject={FunctionResult:"function.result"};Ze.FunctionCallEntryObject={FunctionCall:"function.call"};Ze.ToolExecutionEntryObject={ToolExecution:"tool.execution"};Ze.AgentHandoffEntryObject={AgentHandoff:"agent.handoff"};Ze.MessageOutputEventType={MessageOutputDelta:"message.output.delta"};Ze.MessageOutputEventRole={Assistant:"assistant"};Ze.FunctionCallEventType={FunctionCallDelta:"function.call.delta"};Ze.ConversationEventType={ConversationEvent:"conversation.event"};Ze.ResponseStartedEventType={ResponseStarted:"response.started"};Ze.ResponseDoneEventType={ResponseDone:"response.done"};Ze.ResponseErrorEventType={ResponseError:"response.error"};Ze.ToolExecutionStartedEventType={ToolExecutionStarted:"tool.execution.started"};Ze.ToolExecutionDeltaEventType={ToolExecutionDelta:"tool.execution.delta"};Ze.ToolExecutionDoneEventType={ToolExecutionDone:"tool.execution.done"};Ze.AgentHandoffStartedEventType={AgentHandoffStarted:"agent.handoff.started"};Ze.AgentHandoffDoneEventType={AgentHandoffDone:"agent.handoff.done"};Ze.StepStartedEventType={StepStarted:"step.started"};Ze.StepCompletedEventType={StepCompleted:"step.completed"};Ze.StepErrorEventType={StepError:"step.error"};Ze.TaskStartedEventType={TaskStarted:"task.started"};Ze.TaskCompletedEventType={TaskCompleted:"task.completed"};Ze.TaskCanceledEventType={TaskCanceled:"task.canceled"};Ze.TaskErrorEventType={TaskError:"task.error"};Ze.ReportStartedEventType={ReportStarted:"report.started"};Ze.ReportCompletedEventType={ReportCompleted:"report.completed"};Ze.ReportErrorEventType={ReportError:"report.error"};Ze.AgentObject={Agent:"agent"};Ze.AgentConversationObject={AgentConversation:"agent.conversation"};Ze.ModelConversationObject={ModelConversation:"model.conversation"};Ze.ConversationHistoryObject={ConversationHistory:"conversation.history"};Ze.ConversationMessagesObject={ConversationMessages:"conversation.messages"};Ze.ConversationResponseObject={ConversationResponse:"conversation.response"};Ze.TranscriptionStreamDoneType={TranscriptionDone:"transcription.done"};Ze.TranscriptionStreamLanguageType={TranscriptionLanguage:"transcription.language"};Ze.TranscriptionStreamSegmentDeltaType={TranscriptionSegment:"transcription.segment"};Ze.TranscriptionStreamTextDeltaType={TranscriptionTextDelta:"transcription.text.delta"};Ze.ClassifierJobOutObject={Job:"job"};Ze.ClassifierJobOutJobType={Classifier:"classifier"};Ze.CompletionJobOutObject={Job:"job"};Ze.CompletionJobOutJobType={Completion:"completion"};Ze.ClassifierDetailedJobOutObject={Job:"job"};Ze.ClassifierDetailedJobOutJobType={Classifier:"classifier"};Ze.CompletionDetailedJobOutObject={Job:"job"};Ze.CompletionDetailedJobOutJobType={Completion:"completion"};Ze.JobsOutObject={List:"list"};Ze.BatchJobOutObject={Batch:"batch"};Ze.BatchJobsOutObject={List:"list"};Ze.GithubRepositoryOutType={Github:"github"};Ze.GithubRepositoryInType={Github:"github"};Ze.WandbIntegrationOutType={Wandb:"wandb"};Ze.WandbIntegrationType={Wandb:"wandb"};Ze.LegacyJobMetadataOutObject={JobMetadata:"job.metadata"};Ze.ClassifierFTModelOutObject={Model:"model"};Ze.ClassifierFTModelOutModelType={Classifier:"classifier"};Ze.CompletionFTModelOutObject={Model:"model"};Ze.ModelType={Completion:"completion"};Ze.ArchiveFTModelOutObject={Model:"model"};Ze.UnarchiveFTModelOutObject={Model:"model"};Ze.FunctionToolType={Function:"function"}});var Re=Y(K=>{"use strict";o();var mbn=K&&K.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),D=K&&K.__exportStar||function(t,e){for(var I in t)I!=="default"&&!Object.prototype.hasOwnProperty.call(e,I)&&mbn(e,t,I)};Object.defineProperty(K,"__esModule",{value:!0});D(dPt(),K);D(uPt(),K);D(mPt(),K);D(YPt(),K);D(J_e(),K);D(a8(),K);D(C_e(),K);D(o7t(),K);D(Z7t(),K);D(R7t(),K);D(Ak(),K);D(M_e(),K);D(F7t(),K);D(pv(),K);D(L_e(),K);D(S_e(),K);D(T_e(),K);D(JWe(),K);D(H7t(),K);D(Q7t(),K);D(k_e(),K);D(x_e(),K);D(kWe(),K);D(D_e(),K);D(q_e(),K);D(jWe(),K);D($_e(),K);D(f7t(),K);D(IKe(),K);D(E7t(),K);D(tKe(),K);D(eKe(),K);D(lKe(),K);D(n1(),K);D(rKe(),K);D(z7t(),K);D(M7t(),K);D(S7t(),K);D(e8t(),K);D(TWe(),K);D(n8t(),K);D(a8t(),K);D(SWe(),K);D(c8t(),K);D(s8t(),K);D(o8t(),K);D(Z8t(),K);D(W8t(),K);D(X8t(),K);D(g8t(),K);D(dKe(),K);D(_We(),K);D(v8t(),K);D(y8t(),K);D(VKe(),K);D(Q8t(),K);D(f8t(),K);D(YKe(),K);D(RKe(),K);D(DWe(),K);D(qWe(),K);D(AKe(),K);D(TE(),K);D(jh(),K);D(v_e(),K);D(vKe(),K);D(U8t(),K);D(O8t(),K);D(z8t(),K);D(QKe(),K);D(gKe(),K);D(eNe(),K);D(fKe(),K);D(kKe(),K);D(T8t(),K);D(_8t(),K);D(K8t(),K);D(XB(),K);D(N$t(),K);D(V$t(),K);D(U$t(),K);D(K$t(),K);D(Z1(),K);D(D$t(),K);D(V8(),K);D(neI(),K);D(oeI(),K);D(ieI(),K);D(GeI(),K);D(nDe(),K);D(heI(),K);D(iNe(),K);D(WeI(),K);D(VeI(),K);D(aDe(),K);D(YeI(),K);D(rDe(),K);D(ReI(),K);D(oDe(),K);D(AeI(),K);D(FeI(),K);D(XeI(),K);D(geI(),K);D(FKe(),K);D(DE(),K);D(dDe(),K);D(yeI(),K);D(weI(),K);D(Nk(),K);D(mDe(),K);D(ZDe(),K);D(EeI(),K);D(JeI(),K);D(hDe(),K);D(pDe(),K);D(ZNe(),K);D(PWe(),K);D(JKe(),K);D(bKe(),K);D(ZKe(),K);D(NDe(),K);D(LeI(),K);D(xeI(),K);D(CWe(),K);D(RWe(),K);D(A8(),K);D(VDe(),K);D(BeI(),K);D(F8(),K);D(OWe(),K);D(aKe(),K);D(gk(),K);D(MeI(),K);D(SeI(),K);D(TeI(),K);D(YDe(),K);D(KWe(),K);D($We(),K);D(RDe(),K);D(NWe(),K);D(O_e(),K);D(Z8(),K);D(xKe(),K);D(MKe(),K);D(B_e(),K);D(nNe(),K);D(qE(),K);D(_eI(),K);D(KeI(),K);D(ADe(),K);D(tNe(),K);D(y2(),K);D(FDe(),K);D(j_e(),K);D($E(),K);D(U_e(),K);D(Vk(),K);D(OKe(),K);D(GKe(),K);D(iKe(),K);D(LKe(),K);D(CKe(),K);D(ttI(),K);D(jB(),K);D(atI(),K);D(y_e(),K);D(G8(),K);D(cKe(),K);D(rtI(),K);D(stI(),K);D(MWe(),K);D(otI(),K);D(d8(),K);D(itI(),K);D(GtI(),K);D(dtI(),K);D(wDe(),K);D(btI(),K);D(mtI(),K);D(ptI(),K);D(WtI(),K);D(fDe(),K);D(EDe(),K);D(CDe(),K);D(RtI(),K);D(HtI(),K);D(IDe(),K);D(jKe(),K);D(h8(),K);D(UKe(),K);D(MB(),K);D(TKe(),K);D(ftI(),K);D(hKe(),K);D(vB(),K);D(xWe(),K);D(UtI(),K);D(MtI(),K);D(Q_e(),K);D(f_e(),K);D(E_e(),K);D(UDe(),K);D(StI(),K);D(ODe(),K);D(TtI(),K);D(BDe(),K);D(MDe(),K);D(TDe(),K);D(PtI(),K);D($tI(),K);D(SDe(),K);D(_De(),K);D(SKe(),K);D(tII(),K);D(sKe(),K);D(oKe(),K);D(cDe(),K);D(sDe(),K);D(iDe(),K);D(yDe(),K);D(HDe(),K);D(KDe(),K);D(III(),K);D(lII(),K);D(cII(),K);D(sII(),K);D(oII(),K);D(iII(),K);D(dII(),K);D(uII(),K);D(bII(),K);D(mII(),K);D(ZII(),K);D(ANe(),K);D(Zk(),K);D(pII(),K);D(mNe(),K);D(hII(),K);D(WII(),K);D(YII(),K);D(FII(),K);D(l6e(),K);D(XII(),K);D(gII(),K);D(vII(),K);D(vNe(),K);D(QII(),K);D(EII(),K);D(kII(),K);D(n6e(),K);D(FWe(),K);D(xII(),K);D(kDe(),K);D(INe(),K);D(KKe(),K);D(DKe(),K);D(KE(),K);D(w_e(),K);D(qKe(),K);D(jII(),K);D(X8(),K);D(OII(),K);D(a6e(),K);D(zII(),K);D(BII(),K);D(QDe(),K);D(g8(),K);D(PKe(),K);D(r1(),K);D(z_e(),K);D(l1(),K);D(xDe(),K);D(uDe(),K);D(Yk(),K);D(LWe(),K);D(yB(),K);D(HWe(),K);D(oNe(),K);D(wB(),K);D(pk(),K);D(mk(),K);D($Ke(),K);D(eDe(),K);D(W8(),K);D(tDe(),K);D(p8(),K);D(s1(),K);D(c8(),K);D(s8(),K);D(gDe(),K);D(_II(),K);D(ENe(),K);D(c6e(),K);D(rlI(),K);D(r6e(),K);D(s6e(),K);D(o6e(),K);D(i6e(),K);D(slI(),K);D(olI(),K);D(ilI(),K);D(u1(),K);D(o1(),K);D(GlI(),K);D(vDe(),K);D(UB(),K);D(e1(),K);D(t1(),K);D(d6e(),K)});var ulI=Y(TV=>{"use strict";o();var Zbn=TV&&TV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),pbn=TV&&TV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),dlI=TV&&TV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nnew CNe(t,{request:t.request$,response:t.response$,body:t.body$}))});var mlI=Y(_V=>{"use strict";o();var Nbn=_V&&_V.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Vbn=_V&&_V.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),blI=_V&&_V.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nnew kNe(t,{request:t.request$,response:t.response$,body:t.body$}))});var Te=Y(sp=>{"use strict";o();var Abn=sp&&sp.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Lk=sp&&sp.__exportStar||function(t,e){for(var I in t)I!=="default"&&!Object.prototype.hasOwnProperty.call(e,I)&&Abn(e,t,I)};Object.defineProperty(sp,"__esModule",{value:!0});Lk(e_e(),sp);Lk(ulI(),sp);Lk(WB(),sp);Lk(mlI(),sp);Lk(A_e(),sp);Lk(X_e(),sp);Lk(uWe(),sp)});var xe=Y(A1=>{"use strict";o();var ZlI=A1&&A1.__classPrivateFieldSet||function(t,e,I,l,n){if(l==="m")throw new TypeError("Private method is not writable");if(l==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return l==="a"?n.call(t,I):n?n.value=I:e.set(t,I),I},C8=A1&&A1.__classPrivateFieldGet||function(t,e,I,l){if(I==="a"&&!l)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!l:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return I==="m"?l:I==="a"?l.call(t):l?l.value:e.get(t)},eM,L8,plI;Object.defineProperty(A1,"__esModule",{value:!0});A1.APIPromise=void 0;var u6e=class{constructor(e){eM.set(this,void 0),L8.set(this,void 0),this[plI]="APIPromise",ZlI(this,eM,e instanceof Promise?e:Promise.resolve(e),"f"),ZlI(this,L8,e instanceof Promise?C8(this,eM,"f").then(([I])=>I):Promise.resolve(e[0]),"f")}then(e,I){return C8(this,eM,"f").then(e?([l])=>e(l):void 0,I)}catch(e){return C8(this,L8,"f").catch(e)}finally(e){return C8(this,L8,"f").finally(e)}$inspect(){return C8(this,eM,"f")}};A1.APIPromise=u6e;eM=new WeakMap,L8=new WeakMap,plI=Symbol.toStringTag});var NlI=Y(Qv=>{"use strict";o();var Fbn=Qv&&Qv.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Xbn=Qv&&Qv.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),b6e=Qv&&Qv.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nWlI.AgentsCompletionRequest$outboundSchema.parse(N),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,gbn.encodeJSON)("body",n,{explode:!0}),c=(0,wbn.pathToFunc)("/v1/agents/completions")(),r=new Headers((0,vbn.compactMap)({"Content-Type":"application/json",Accept:"application/json"})),s=await(0,hlI.extractSecurity)(t._options.apiKey),i=s==null?{}:{apiKey:s},G=(0,hlI.resolveGlobalSecurity)(i),d={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"agents_completion_v1_agents_completions_post",oAuth2Scopes:null,resolvedSecurity:G,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},u=t._createRequest(d,{security:G,method:"POST",baseURL:I?.serverURL,path:c,headers:r,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!u.ok)return[u,{status:"invalid"}];let b=u.value,Z=await t._do(b,{context:d,errorCodes:["422","4XX","5XX"],retryConfig:d.retryConfig,retryCodes:d.retryCodes});if(!Z.ok)return[Z,{status:"request-error",request:b}];let p=Z.value,W={HttpMeta:{Response:p,Request:b}},[h]=await k8.match(k8.json(200,WlI.ChatCompletionResponse$inboundSchema),k8.jsonErr(422,Hbn.HTTPValidationError$inboundSchema),k8.fail("4XX"),k8.fail("5XX"))(p,b,{extraFields:W});return h.ok?[h,{status:"complete",request:b,response:p}]:[h,{status:"complete",request:b,response:p}]}});var F1=Y(xNe=>{"use strict";o();Object.defineProperty(xNe,"__esModule",{value:!0});xNe.EventStream=void 0;var m6e=class extends ReadableStream{constructor(e,I){let l=e.getReader(),n=new Uint8Array;super({async pull(a){try{for(;;){let c=Cbn(n);if(!c){let i=await l.read();if(i.done)return a.close();n=Jbn(n,i.value);continue}let r=n.slice(0,c.index);n=n.slice(c.index+c.length);let s=Lbn(r,I);if(s&&!s.done)return a.enqueue(s.value);if(s?.done)return await l.cancel("done"),a.close()}}catch(c){a.error(c),await l.cancel(c)}},cancel:a=>l.cancel(a)})}[Symbol.asyncIterator](){let e=ReadableStream.prototype[Symbol.asyncIterator];if(typeof e=="function")return e.call(this);let I=this.getReader();return{next:async()=>{let l=await I.read();return l.done?(I.releaseLock(),{done:!0,value:void 0}):{done:!1,value:l.value}},throw:async l=>(await I.cancel(l),I.releaseLock(),{done:!0,value:void 0}),return:async()=>(await I.cancel("done"),I.releaseLock(),{done:!0,value:void 0}),[Symbol.asyncIterator](){return this}}}};xNe.EventStream=m6e;function Jbn(t,e){let I=new Uint8Array(t.length+e.length);return I.set(t,0),I.set(e,t.length),I}function Cbn(t){let e=t.length;for(let I=0;I{"use strict";o();var kbn=fv&&fv.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),xbn=fv&&fv.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),jNe=fv&&fv.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nYlI.AgentsCompletionStreamRequest$outboundSchema.parse(N),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,Ubn.encodeJSON)("body",n,{explode:!0}),c=(0,Mbn.pathToFunc)("/v1/agents/completions#stream")(),r=new Headers((0,zbn.compactMap)({"Content-Type":"application/json",Accept:"text/event-stream"})),s=await(0,VlI.extractSecurity)(t._options.apiKey),i=s==null?{}:{apiKey:s},G=(0,VlI.resolveGlobalSecurity)(i),d={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"stream_agents",oAuth2Scopes:null,resolvedSecurity:G,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},u=t._createRequest(d,{security:G,method:"POST",baseURL:I?.serverURL,path:c,headers:r,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!u.ok)return[u,{status:"invalid"}];let b=u.value,Z=await t._do(b,{context:d,errorCodes:["422","4XX","5XX"],retryConfig:d.retryConfig,retryCodes:d.retryCodes});if(!Z.ok)return[Z,{status:"request-error",request:b}];let p=Z.value,W={HttpMeta:{Response:p,Request:b}},[h]=await x8.match(x8.sse(200,jbn.instanceof(ReadableStream).transform(N=>new Obn.EventStream(N,V=>V.data==="[DONE]"?{done:!0}:{value:YlI.CompletionEvent$inboundSchema.parse(V)}))),x8.jsonErr(422,Sbn.HTTPValidationError$inboundSchema),x8.fail("4XX"),x8.fail("5XX"))(p,b,{extraFields:W});return h.ok?[h,{status:"complete",request:b,response:p}]:[h,{status:"complete",request:b,response:p}]}});var FlI=Y(UNe=>{"use strict";o();Object.defineProperty(UNe,"__esModule",{value:!0});UNe.Agents=void 0;var Dbn=NlI(),qbn=RlI(),Pbn=En(),AlI=da(),Z6e=class extends Pbn.ClientSDK{async complete(e,I){return(0,AlI.unwrapAsync)((0,Dbn.agentsComplete)(this,e,I))}async stream(e,I){return(0,AlI.unwrapAsync)((0,qbn.agentsStream)(this,e,I))}};UNe.Agents=Z6e});var j8=Y(p6e=>{"use strict";o();Object.defineProperty(p6e,"__esModule",{value:!0});p6e.isReadableStream=$bn;function $bn(t){if(typeof t!="object"||t===null)return!1;let e=t;return typeof e.getReader=="function"&&typeof e.cancel=="function"&&typeof e.tee=="function"}});var ylI=Y(Ev=>{"use strict";o();var emn=Ev&&Ev.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),tmn=Ev&&Ev.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),vlI=Ev&&Ev.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nglI.AudioTranscriptionRequest$outboundSchema.parse(h),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=new FormData;if((0,KV.appendForm)(a,"model",n.model),n.context_bias!==void 0&&(0,KV.appendForm)(a,"context_bias",n.context_bias),n.diarize!==void 0&&(0,KV.appendForm)(a,"diarize",n.diarize),n.file!==void 0)if((0,cmn.isBlobLike)(n.file))(0,KV.appendForm)(a,"file",n.file);else if((0,rmn.isReadableStream)(n.file.content)){let h=await(0,h6e.readableStreamToArrayBuffer)(n.file.content),N=(0,h6e.getContentTypeFromFileName)(n.file.fileName)||"application/octet-stream",V=new Blob([h],{type:N});(0,KV.appendForm)(a,"file",V,n.file.fileName)}else{let h=(0,h6e.getContentTypeFromFileName)(n.file.fileName)||"application/octet-stream";(0,KV.appendForm)(a,"file",new Blob([n.file.content],{type:h}),n.file.fileName)}n.file_id!==void 0&&(0,KV.appendForm)(a,"file_id",n.file_id),n.file_url!==void 0&&(0,KV.appendForm)(a,"file_url",n.file_url),n.language!==void 0&&(0,KV.appendForm)(a,"language",n.language),n.stream!==void 0&&(0,KV.appendForm)(a,"stream",n.stream),n.temperature!==void 0&&(0,KV.appendForm)(a,"temperature",n.temperature),n.timestamp_granularities!==void 0&&(0,KV.appendForm)(a,"timestamp_granularities",n.timestamp_granularities);let c=(0,nmn.pathToFunc)("/v1/audio/transcriptions")(),r=new Headers((0,Imn.compactMap)({Accept:"application/json"})),s=await(0,XlI.extractSecurity)(t._options.apiKey),i=s==null?{}:{apiKey:s},G=(0,XlI.resolveGlobalSecurity)(i),d={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"audio_api_v1_transcriptions_post",oAuth2Scopes:null,resolvedSecurity:G,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},u=t._createRequest(d,{security:G,method:"POST",baseURL:I?.serverURL,path:c,headers:r,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!u.ok)return[u,{status:"invalid"}];let b=u.value,Z=await t._do(b,{context:d,errorCodes:["4XX","5XX"],retryConfig:d.retryConfig,retryCodes:d.retryCodes});if(!Z.ok)return[Z,{status:"request-error",request:b}];let p=Z.value,[W]=await ONe.match(ONe.json(200,glI.TranscriptionResponse$inboundSchema),ONe.fail("4XX"),ONe.fail("5XX"))(p,b);return W.ok?[W,{status:"complete",request:b,response:p}]:[W,{status:"complete",request:b,response:p}]}});var QlI=Y(Jv=>{"use strict";o();var imn=Jv&&Jv.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Gmn=Jv&&Jv.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),N6e=Jv&&Jv.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nHlI.AudioTranscriptionRequestStream$outboundSchema.parse(h),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=new FormData;if((0,DV.appendForm)(a,"model",n.model),n.context_bias!==void 0&&(0,DV.appendForm)(a,"context_bias",n.context_bias),n.diarize!==void 0&&(0,DV.appendForm)(a,"diarize",n.diarize),n.file!==void 0)if((0,hmn.isBlobLike)(n.file))(0,DV.appendForm)(a,"file",n.file);else if((0,Wmn.isReadableStream)(n.file.content)){let h=await(0,W6e.readableStreamToArrayBuffer)(n.file.content),N=(0,W6e.getContentTypeFromFileName)(n.file.fileName)||"application/octet-stream",V=new Blob([h],{type:N});(0,DV.appendForm)(a,"file",V,n.file.fileName)}else{let h=(0,W6e.getContentTypeFromFileName)(n.file.fileName)||"application/octet-stream";(0,DV.appendForm)(a,"file",new Blob([n.file.content],{type:h}),n.file.fileName)}n.file_id!==void 0&&(0,DV.appendForm)(a,"file_id",n.file_id),n.file_url!==void 0&&(0,DV.appendForm)(a,"file_url",n.file_url),n.language!==void 0&&(0,DV.appendForm)(a,"language",n.language),n.stream!==void 0&&(0,DV.appendForm)(a,"stream",n.stream),n.temperature!==void 0&&(0,DV.appendForm)(a,"temperature",n.temperature),n.timestamp_granularities!==void 0&&(0,DV.appendForm)(a,"timestamp_granularities",n.timestamp_granularities);let c=(0,Zmn.pathToFunc)("/v1/audio/transcriptions#stream")(),r=new Headers((0,bmn.compactMap)({Accept:"text/event-stream"})),s=await(0,wlI.extractSecurity)(t._options.apiKey),i=s==null?{}:{apiKey:s},G=(0,wlI.resolveGlobalSecurity)(i),d={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"audio_api_v1_transcriptions_post_stream",oAuth2Scopes:null,resolvedSecurity:G,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},u=t._createRequest(d,{security:G,method:"POST",baseURL:I?.serverURL,path:c,headers:r,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!u.ok)return[u,{status:"invalid"}];let b=u.value,Z=await t._do(b,{context:d,errorCodes:["4XX","5XX"],retryConfig:d.retryConfig,retryCodes:d.retryCodes});if(!Z.ok)return[Z,{status:"request-error",request:b}];let p=Z.value,[W]=await zNe.match(zNe.sse(200,dmn.instanceof(ReadableStream).transform(h=>new umn.EventStream(h,N=>({value:HlI.TranscriptionStreamEvents$inboundSchema.parse(N)})))),zNe.fail("4XX"),zNe.fail("5XX"))(p,b);return W.ok?[W,{status:"complete",request:b,response:p}]:[W,{status:"complete",request:b,response:p}]}});var ElI=Y(BNe=>{"use strict";o();Object.defineProperty(BNe,"__esModule",{value:!0});BNe.Transcriptions=void 0;var Ymn=ylI(),Rmn=QlI(),Amn=En(),flI=da(),V6e=class extends Amn.ClientSDK{async complete(e,I){return(0,flI.unwrapAsync)((0,Ymn.audioTranscriptionsComplete)(this,e,I))}async stream(e,I){return(0,flI.unwrapAsync)((0,Rmn.audioTranscriptionsStream)(this,e,I))}};BNe.Transcriptions=V6e});var JlI=Y(MNe=>{"use strict";o();Object.defineProperty(MNe,"__esModule",{value:!0});MNe.Audio=void 0;var Fmn=En(),Xmn=ElI(),Y6e=class extends Fmn.ClientSDK{get transcriptions(){return this._transcriptions??(this._transcriptions=new Xmn.Transcriptions(this._options))}};MNe.Audio=Y6e});var ClI=Y(qV=>{"use strict";o();var gmn=qV&&qV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),vmn=qV&&qV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ymn=qV&&qV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,wmn.remap)(t,{agentId:"agent_id"}));function Hmn(t){return JSON.stringify(qV.AgentsApiV1AgentsCreateOrUpdateAliasRequest$outboundSchema.parse(t))}});var klI=Y(PV=>{"use strict";o();var Qmn=PV&&PV.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),fmn=PV&&PV.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Emn=PV&&PV.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Jmn.remap)(t,{agentId:"agent_id"}));function Cmn(t){return JSON.stringify(PV.AgentsApiV1AgentsDeleteRequest$outboundSchema.parse(t))}});var xlI=Y($V=>{"use strict";o();var Lmn=$V&&$V.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),kmn=$V&&$V.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),xmn=$V&&$V.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,jmn.remap)(t,{agentId:"agent_id"}));function Umn(t){return JSON.stringify($V.AgentsApiV1AgentsDeleteAliasRequest$outboundSchema.parse(t))}});var jlI=Y(pu=>{"use strict";o();var Omn=pu&&pu.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),zmn=pu&&pu.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Bmn=pu&&pu.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Mmn.remap)(t,{agentId:"agent_id",agentVersion:"agent_version"}));function Tmn(t){return JSON.stringify(pu.AgentsApiV1AgentsGetRequest$outboundSchema.parse(t))}});var UlI=Y(eY=>{"use strict";o();var _mn=eY&&eY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Kmn=eY&&eY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Dmn=eY&&eY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,qmn.remap)(t,{agentId:"agent_id"}));function Pmn(t){return JSON.stringify(eY.AgentsApiV1AgentsGetVersionRequest$outboundSchema.parse(t))}});var zlI=Y(tY=>{"use strict";o();var $mn=tY&&tY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),eZn=tY&&tY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),OlI=tY&&tY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,tZn.remap)(t,{pageSize:"page_size",deploymentChat:"deployment_chat"}));function lZn(t){return JSON.stringify(tY.AgentsApiV1AgentsListRequest$outboundSchema.parse(t))}});var MlI=Y(IY=>{"use strict";o();var nZn=IY&&IY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),aZn=IY&&IY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),cZn=IY&&IY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,rZn.remap)(t,{agentId:"agent_id"}));function sZn(t){return JSON.stringify(IY.AgentsApiV1AgentsListVersionAliasesRequest$outboundSchema.parse(t))}});var SlI=Y(lY=>{"use strict";o();var oZn=lY&&lY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),iZn=lY&&lY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),GZn=lY&&lY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,dZn.remap)(t,{agentId:"agent_id",pageSize:"page_size"}));function uZn(t){return JSON.stringify(lY.AgentsApiV1AgentsListVersionsRequest$outboundSchema.parse(t))}});var KlI=Y(nY=>{"use strict";o();var bZn=nY&&nY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),mZn=nY&&nY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),_lI=nY&&nY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,ZZn.remap)(t,{agentId:"agent_id",agentUpdateRequest:"AgentUpdateRequest"}));function hZn(t){return JSON.stringify(nY.AgentsApiV1AgentsUpdateRequest$outboundSchema.parse(t))}});var DlI=Y(aY=>{"use strict";o();var WZn=aY&&aY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),NZn=aY&&aY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),VZn=aY&&aY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,YZn.remap)(t,{agentId:"agent_id"}));function RZn(t){return JSON.stringify(aY.AgentsApiV1AgentsUpdateVersionRequest$outboundSchema.parse(t))}});var $lI=Y(cY=>{"use strict";o();var AZn=cY&&cY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),FZn=cY&&cY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),PlI=cY&&cY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,XZn.remap)(t,{conversationId:"conversation_id",conversationAppendRequest:"ConversationAppendRequest"}));function vZn(t){return JSON.stringify(cY.AgentsApiV1ConversationsAppendRequest$outboundSchema.parse(t))}});var InI=Y(rY=>{"use strict";o();var yZn=rY&&rY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),wZn=rY&&rY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),tnI=rY&&rY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,HZn.remap)(t,{conversationId:"conversation_id",conversationAppendStreamRequest:"ConversationAppendStreamRequest"}));function fZn(t){return JSON.stringify(rY.AgentsApiV1ConversationsAppendStreamRequest$outboundSchema.parse(t))}});var nnI=Y(sY=>{"use strict";o();var EZn=sY&&sY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),JZn=sY&&sY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),CZn=sY&&sY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,LZn.remap)(t,{conversationId:"conversation_id"}));function kZn(t){return JSON.stringify(sY.AgentsApiV1ConversationsDeleteRequest$outboundSchema.parse(t))}});var rnI=Y(Wu=>{"use strict";o();var xZn=Wu&&Wu.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),jZn=Wu&&Wu.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),cnI=Wu&&Wu.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,UZn.remap)(t,{conversationId:"conversation_id"}));function zZn(t){return JSON.stringify(Wu.AgentsApiV1ConversationsGetRequest$outboundSchema.parse(t))}Wu.AgentsApiV1ConversationsGetResponseV1ConversationsGet$inboundSchema=X6e.union([anI.ModelConversation$inboundSchema,anI.AgentConversation$inboundSchema]);function BZn(t){return(0,OZn.safeParse)(t,e=>Wu.AgentsApiV1ConversationsGetResponseV1ConversationsGet$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'AgentsApiV1ConversationsGetResponseV1ConversationsGet' from JSON")}});var onI=Y(oY=>{"use strict";o();var MZn=oY&&oY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),SZn=oY&&oY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),TZn=oY&&oY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,_Zn.remap)(t,{conversationId:"conversation_id"}));function KZn(t){return JSON.stringify(oY.AgentsApiV1ConversationsHistoryRequest$outboundSchema.parse(t))}});var dnI=Y(Nu=>{"use strict";o();var DZn=Nu&&Nu.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),qZn=Nu&&Nu.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),GnI=Nu&&Nu.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,PZn.remap)(t,{pageSize:"page_size"}));function epn(t){return JSON.stringify(Nu.AgentsApiV1ConversationsListRequest$outboundSchema.parse(t))}Nu.ResponseBody$inboundSchema=kk.union([inI.ModelConversation$inboundSchema,inI.AgentConversation$inboundSchema]);function tpn(t){return(0,$Zn.safeParse)(t,e=>Nu.ResponseBody$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'ResponseBody' from JSON")}});var bnI=Y(iY=>{"use strict";o();var Ipn=iY&&iY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),lpn=iY&&iY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),npn=iY&&iY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,apn.remap)(t,{conversationId:"conversation_id"}));function cpn(t){return JSON.stringify(iY.AgentsApiV1ConversationsMessagesRequest$outboundSchema.parse(t))}});var pnI=Y(GY=>{"use strict";o();var rpn=GY&&GY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),spn=GY&&GY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ZnI=GY&&GY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,opn.remap)(t,{conversationId:"conversation_id",conversationRestartRequest:"ConversationRestartRequest"}));function Gpn(t){return JSON.stringify(GY.AgentsApiV1ConversationsRestartRequest$outboundSchema.parse(t))}});var NnI=Y(dY=>{"use strict";o();var dpn=dY&&dY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),upn=dY&&dY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),WnI=dY&&dY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,bpn.remap)(t,{conversationId:"conversation_id",conversationRestartStreamRequest:"ConversationRestartStreamRequest"}));function Zpn(t){return JSON.stringify(dY.AgentsApiV1ConversationsRestartStreamRequest$outboundSchema.parse(t))}});var YnI=Y(uY=>{"use strict";o();var ppn=uY&&uY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),hpn=uY&&uY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),VnI=uY&&uY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Wpn.remap)(t,{toolName:"tool_name",connectorIdOrName:"connector_id_or_name",mcpToolCallRequest:"MCPToolCallRequest"}));function Vpn(t){return JSON.stringify(uY.ConnectorCallToolV1Request$outboundSchema.parse(t))}});var AnI=Y(bY=>{"use strict";o();var Ypn=bY&&bY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Rpn=bY&&bY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Apn=bY&&bY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Fpn.remap)(t,{connectorId:"connector_id"}));function Xpn(t){return JSON.stringify(bY.ConnectorDeleteV1Request$outboundSchema.parse(t))}});var FnI=Y(mY=>{"use strict";o();var gpn=mY&&mY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),vpn=mY&&mY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ypn=mY&&mY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,wpn.remap)(t,{fetchCustomerData:"fetch_customer_data",fetchConnectionSecrets:"fetch_connection_secrets",connectorIdOrName:"connector_id_or_name"}));function Hpn(t){return JSON.stringify(mY.ConnectorGetV1Request$outboundSchema.parse(t))}});var gnI=Y(ZY=>{"use strict";o();var Qpn=ZY&&ZY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),fpn=ZY&&ZY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),XnI=ZY&&ZY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Epn.remap)(t,{queryFilters:"query_filters",pageSize:"page_size"}));function Cpn(t){return JSON.stringify(ZY.ConnectorListV1Request$outboundSchema.parse(t))}});var wnI=Y(pY=>{"use strict";o();var Lpn=pY&&pY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),kpn=pY&&pY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ynI=pY&&pY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,xpn.remap)(t,{connectorId:"connector_id",connectorMCPUpdate:"ConnectorMCPUpdate"}));function Upn(t){return JSON.stringify(pY.ConnectorUpdateV1Request$outboundSchema.parse(t))}});var fnI=Y(hY=>{"use strict";o();var Opn=hY&&hY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),zpn=hY&&hY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),QnI=hY&&hY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Bpn.remap)(t,{datasetId:"dataset_id",postDatasetRecordInSchema:"PostDatasetRecordInSchema"}));function Spn(t){return JSON.stringify(hY.CreateDatasetRecordV1ObservabilityDatasetsDatasetIdRecordsPostRequest$outboundSchema.parse(t))}});var JnI=Y(WY=>{"use strict";o();var Tpn=WY&&WY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),_pn=WY&&WY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Kpn=WY&&WY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Dpn.remap)(t,{campaignId:"campaign_id"}));function qpn(t){return JSON.stringify(WY.DeleteCampaignV1ObservabilityCampaignsCampaignIdDeleteRequest$outboundSchema.parse(t))}});var LnI=Y(NY=>{"use strict";o();var Ppn=NY&&NY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),$pn=NY&&NY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ehn=NY&&NY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,thn.remap)(t,{datasetRecordId:"dataset_record_id"}));function Ihn(t){return JSON.stringify(NY.DeleteDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIdDeleteRequest$outboundSchema.parse(t))}});var xnI=Y(VY=>{"use strict";o();var lhn=VY&&VY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),nhn=VY&&VY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ahn=VY&&VY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,chn.remap)(t,{datasetId:"dataset_id"}));function rhn(t){return JSON.stringify(VY.DeleteDatasetV1ObservabilityDatasetsDatasetIdDeleteRequest$outboundSchema.parse(t))}});var UnI=Y(YY=>{"use strict";o();var shn=YY&&YY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),ohn=YY&&YY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ihn=YY&&YY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Ghn.remap)(t,{judgeId:"judge_id"}));function dhn(t){return JSON.stringify(YY.DeleteJudgeV1ObservabilityJudgesJudgeIdDeleteRequest$outboundSchema.parse(t))}});var znI=Y(RY=>{"use strict";o();var uhn=RY&&RY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),bhn=RY&&RY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),mhn=RY&&RY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Zhn.remap)(t,{modelId:"model_id"}));function phn(t){return JSON.stringify(RY.DeleteModelV1ModelsModelIdDeleteRequest$outboundSchema.parse(t))}});var MnI=Y(AY=>{"use strict";o();var hhn=AY&&AY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Whn=AY&&AY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Nhn=AY&&AY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Vhn.remap)(t,{datasetId:"dataset_id"}));function Yhn(t){return JSON.stringify(AY.ExportDatasetToJsonlV1ObservabilityDatasetsDatasetIdExportsToJsonlGetRequest$outboundSchema.parse(t))}});var TnI=Y(FY=>{"use strict";o();var Rhn=FY&&FY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Ahn=FY&&FY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Fhn=FY&&FY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Xhn.remap)(t,{fileId:"file_id"}));function ghn(t){return JSON.stringify(FY.FilesApiRoutesDeleteFileRequest$outboundSchema.parse(t))}});var KnI=Y(XY=>{"use strict";o();var vhn=XY&&XY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),yhn=XY&&XY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),whn=XY&&XY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Hhn.remap)(t,{fileId:"file_id"}));function Qhn(t){return JSON.stringify(XY.FilesApiRoutesDownloadFileRequest$outboundSchema.parse(t))}});var DnI=Y(gY=>{"use strict";o();var fhn=gY&&gY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Ehn=gY&&gY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Jhn=gY&&gY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Chn.remap)(t,{fileId:"file_id"}));function Lhn(t){return JSON.stringify(gY.FilesApiRoutesGetSignedUrlRequest$outboundSchema.parse(t))}});var PnI=Y(vY=>{"use strict";o();var khn=vY&&vY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),xhn=vY&&vY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),qnI=vY&&vY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,jhn.remap)(t,{pageSize:"page_size",includeTotal:"include_total",sampleType:"sample_type"}));function Uhn(t){return JSON.stringify(vY.FilesApiRoutesListFilesRequest$outboundSchema.parse(t))}});var eaI=Y(yY=>{"use strict";o();var Ohn=yY&&yY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),zhn=yY&&yY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Bhn=yY&&yY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,Mhn.remap)(t,{fileId:"file_id"}));function Shn(t){return JSON.stringify(yY.FilesApiRoutesRetrieveFileRequest$outboundSchema.parse(t))}});var laI=Y(qo=>{"use strict";o();var Thn=qo&&qo.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),_hn=qo&&qo.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),IaI=qo&&qo.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var qhn=wY&&wY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Phn=wY&&wY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),$hn=wY&&wY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,eWn.remap)(t,{campaignId:"campaign_id"}));function tWn(t){return JSON.stringify(wY.GetCampaignByIdV1ObservabilityCampaignsCampaignIdGetRequest$outboundSchema.parse(t))}});var caI=Y(HY=>{"use strict";o();var IWn=HY&&HY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),lWn=HY&&HY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),nWn=HY&&HY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,aWn.remap)(t,{campaignId:"campaign_id",pageSize:"page_size"}));function cWn(t){return JSON.stringify(HY.GetCampaignSelectedEventsV1ObservabilityCampaignsCampaignIdSelectedEventsGetRequest$outboundSchema.parse(t))}});var saI=Y(QY=>{"use strict";o();var rWn=QY&&QY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),sWn=QY&&QY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),oWn=QY&&QY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,iWn.remap)(t,{campaignId:"campaign_id"}));function GWn(t){return JSON.stringify(QY.GetCampaignStatusByIdV1ObservabilityCampaignsCampaignIdStatusGetRequest$outboundSchema.parse(t))}});var oaI=Y(fY=>{"use strict";o();var dWn=fY&&fY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),uWn=fY&&fY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),bWn=fY&&fY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,mWn.remap)(t,{pageSize:"page_size"}));function ZWn(t){return JSON.stringify(fY.GetCampaignsV1ObservabilityCampaignsGetRequest$outboundSchema.parse(t))}});var GaI=Y(EY=>{"use strict";o();var pWn=EY&&EY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),hWn=EY&&EY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),iaI=EY&&EY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,WWn.remap)(t,{pageSize:"page_size",getChatCompletionEventsInSchema:"GetChatCompletionEventsInSchema"}));function VWn(t){return JSON.stringify(EY.GetChatCompletionEventsV1ObservabilityChatCompletionEventsSearchPostRequest$outboundSchema.parse(t))}});var uaI=Y(JY=>{"use strict";o();var YWn=JY&&JY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),RWn=JY&&JY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),AWn=JY&&JY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,FWn.remap)(t,{eventId:"event_id"}));function XWn(t){return JSON.stringify(JY.GetChatCompletionEventV1ObservabilityChatCompletionEventsEventIdGetRequest$outboundSchema.parse(t))}});var ZaI=Y(CY=>{"use strict";o();var gWn=CY&&CY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),vWn=CY&&CY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),maI=CY&&CY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,yWn.remap)(t,{fieldName:"field_name",fieldOptionCountsInSchema:"FieldOptionCountsInSchema"}));function HWn(t){return JSON.stringify(CY.GetChatCompletionFieldOptionsCountsV1ObservabilityChatCompletionFieldsFieldNameOptionsCountsPostRequest$outboundSchema.parse(t))}});var paI=Y(Po=>{"use strict";o();var QWn=Po&&Po.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),fWn=Po&&Po.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),EWn=Po&&Po.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,JWn.remap)(t,{fieldName:"field_name"}));function CWn(t){return JSON.stringify(Po.GetChatCompletionFieldOptionsV1ObservabilityChatCompletionFieldsFieldNameOptionsGetRequest$outboundSchema.parse(t))}});var WaI=Y(LY=>{"use strict";o();var LWn=LY&&LY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),kWn=LY&&LY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),xWn=LY&&LY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,jWn.remap)(t,{datasetId:"dataset_id"}));function UWn(t){return JSON.stringify(LY.GetDatasetByIdV1ObservabilityDatasetsDatasetIdGetRequest$outboundSchema.parse(t))}});var NaI=Y(kY=>{"use strict";o();var OWn=kY&&kY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),zWn=kY&&kY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),BWn=kY&&kY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,MWn.remap)(t,{datasetId:"dataset_id",pageSize:"page_size"}));function SWn(t){return JSON.stringify(kY.GetDatasetImportTasksV1ObservabilityDatasetsDatasetIdTasksGetRequest$outboundSchema.parse(t))}});var VaI=Y(xY=>{"use strict";o();var TWn=xY&&xY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),_Wn=xY&&xY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),KWn=xY&&xY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,DWn.remap)(t,{datasetId:"dataset_id",taskId:"task_id"}));function qWn(t){return JSON.stringify(xY.GetDatasetImportTaskV1ObservabilityDatasetsDatasetIdTasksTaskIdGetRequest$outboundSchema.parse(t))}});var YaI=Y(jY=>{"use strict";o();var PWn=jY&&jY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),$Wn=jY&&jY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),eNn=jY&&jY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,tNn.remap)(t,{datasetId:"dataset_id",pageSize:"page_size"}));function INn(t){return JSON.stringify(jY.GetDatasetRecordsV1ObservabilityDatasetsDatasetIdRecordsGetRequest$outboundSchema.parse(t))}});var AaI=Y(UY=>{"use strict";o();var lNn=UY&&UY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),nNn=UY&&UY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),aNn=UY&&UY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,cNn.remap)(t,{datasetRecordId:"dataset_record_id"}));function rNn(t){return JSON.stringify(UY.GetDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIdGetRequest$outboundSchema.parse(t))}});var FaI=Y(OY=>{"use strict";o();var sNn=OY&&OY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),oNn=OY&&OY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),iNn=OY&&OY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,GNn.remap)(t,{pageSize:"page_size"}));function dNn(t){return JSON.stringify(OY.GetDatasetsV1ObservabilityDatasetsGetRequest$outboundSchema.parse(t))}});var gaI=Y(zY=>{"use strict";o();var uNn=zY&&zY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),bNn=zY&&zY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),mNn=zY&&zY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,ZNn.remap)(t,{judgeId:"judge_id"}));function pNn(t){return JSON.stringify(zY.GetJudgeByIdV1ObservabilityJudgesJudgeIdGetRequest$outboundSchema.parse(t))}});var yaI=Y(BY=>{"use strict";o();var hNn=BY&&BY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),WNn=BY&&BY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),vaI=BY&&BY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,NNn.remap)(t,{typeFilter:"type_filter",modelFilter:"model_filter",pageSize:"page_size"}));function YNn(t){return JSON.stringify(BY.GetJudgesV1ObservabilityJudgesGetRequest$outboundSchema.parse(t))}});var HaI=Y(MY=>{"use strict";o();var RNn=MY&&MY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),ANn=MY&&MY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),FNn=MY&&MY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,XNn.remap)(t,{eventId:"event_id"}));function gNn(t){return JSON.stringify(MY.GetSimilarChatCompletionEventsV1ObservabilityChatCompletionEventsEventIdSimilarEventsGetRequest$outboundSchema.parse(t))}});var faI=Y(SY=>{"use strict";o();var vNn=SY&&SY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),yNn=SY&&SY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),wNn=SY&&SY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,HNn.remap)(t,{jobId:"job_id"}));function QNn(t){return JSON.stringify(SY.JobsApiRoutesBatchCancelBatchJobRequest$outboundSchema.parse(t))}});var EaI=Y(TY=>{"use strict";o();var fNn=TY&&TY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),ENn=TY&&TY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),JNn=TY&&TY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,CNn.remap)(t,{jobId:"job_id"}));function LNn(t){return JSON.stringify(TY.JobsApiRoutesBatchGetBatchJobRequest$outboundSchema.parse(t))}});var CaI=Y($o=>{"use strict";o();var kNn=$o&&$o.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),xNn=$o&&$o.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),JaI=$o&&$o.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nt.toISOString())).optional(),createdByMe:Vu.boolean().default(!1),status:Vu.nullable(Vu.array(UNn.BatchJobStatus$outboundSchema)).optional(),orderBy:$o.OrderBy$outboundSchema.default("-created")}).transform(t=>(0,jNn.remap)(t,{pageSize:"page_size",agentId:"agent_id",createdAfter:"created_after",createdByMe:"created_by_me",orderBy:"order_by"}));function ONn(t){return JSON.stringify($o.JobsApiRoutesBatchGetBatchJobsRequest$outboundSchema.parse(t))}});var kaI=Y(_Y=>{"use strict";o();var zNn=_Y&&_Y.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),BNn=_Y&&_Y.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),MNn=_Y&&_Y.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,SNn.remap)(t,{modelId:"model_id"}));function TNn(t){return JSON.stringify(_Y.JobsApiRoutesFineTuningArchiveFineTunedModelRequest$outboundSchema.parse(t))}});var UaI=Y(Yu=>{"use strict";o();var _Nn=Yu&&Yu.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),KNn=Yu&&Yu.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),jaI=Yu&&Yu.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,DNn.remap)(t,{jobId:"job_id"}));function PNn(t){return JSON.stringify(Yu.JobsApiRoutesFineTuningCancelFineTuningJobRequest$outboundSchema.parse(t))}Yu.JobsApiRoutesFineTuningCancelFineTuningJobResponse$inboundSchema=xk.union([xaI.ClassifierDetailedJobOut$inboundSchema.and(xk.object({job_type:xk.literal("classifier")}).transform(t=>({jobType:t.job_type}))),xaI.CompletionDetailedJobOut$inboundSchema.and(xk.object({job_type:xk.literal("completion")}).transform(t=>({jobType:t.job_type})))]);function $Nn(t){return(0,qNn.safeParse)(t,e=>Yu.JobsApiRoutesFineTuningCancelFineTuningJobResponse$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'JobsApiRoutesFineTuningCancelFineTuningJobResponse' from JSON")}});var BaI=Y(Ru=>{"use strict";o();var eVn=Ru&&Ru.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),tVn=Ru&&Ru.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),OaI=Ru&&Ru.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n({jobType:t.job_type}))),z8.CompletionJobOut$inboundSchema.and(dA.object({job_type:dA.literal("completion")}).transform(t=>({jobType:t.job_type})))]);function IVn(t){return(0,zaI.safeParse)(t,e=>Ru.One$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'One' from JSON")}Ru.JobsApiRoutesFineTuningCreateFineTuningJobResponse$inboundSchema=dA.union([z8.LegacyJobMetadataOut$inboundSchema,dA.union([z8.ClassifierJobOut$inboundSchema.and(dA.object({job_type:dA.literal("classifier")}).transform(t=>({jobType:t.job_type}))),z8.CompletionJobOut$inboundSchema.and(dA.object({job_type:dA.literal("completion")}).transform(t=>({jobType:t.job_type})))])]);function lVn(t){return(0,zaI.safeParse)(t,e=>Ru.JobsApiRoutesFineTuningCreateFineTuningJobResponse$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'JobsApiRoutesFineTuningCreateFineTuningJobResponse' from JSON")}});var TaI=Y(Au=>{"use strict";o();var nVn=Au&&Au.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),aVn=Au&&Au.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),SaI=Au&&Au.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,cVn.remap)(t,{jobId:"job_id"}));function sVn(t){return JSON.stringify(Au.JobsApiRoutesFineTuningGetFineTuningJobRequest$outboundSchema.parse(t))}Au.JobsApiRoutesFineTuningGetFineTuningJobResponse$inboundSchema=jk.union([MaI.ClassifierDetailedJobOut$inboundSchema.and(jk.object({job_type:jk.literal("classifier")}).transform(t=>({jobType:t.job_type}))),MaI.CompletionDetailedJobOut$inboundSchema.and(jk.object({job_type:jk.literal("completion")}).transform(t=>({jobType:t.job_type})))]);function oVn(t){return(0,rVn.safeParse)(t,e=>Au.JobsApiRoutesFineTuningGetFineTuningJobResponse$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'JobsApiRoutesFineTuningGetFineTuningJobResponse' from JSON")}});var _aI=Y(ti=>{"use strict";o();var iVn=ti&&ti.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),GVn=ti&&ti.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),dVn=ti&&ti.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nt.toISOString())).optional(),createdBefore:ei.nullable(ei.date().transform(t=>t.toISOString())).optional(),createdByMe:ei.boolean().default(!1),status:ei.nullable(ti.Status$outboundSchema).optional(),wandbProject:ei.nullable(ei.string()).optional(),wandbName:ei.nullable(ei.string()).optional(),suffix:ei.nullable(ei.string()).optional()}).transform(t=>(0,uVn.remap)(t,{pageSize:"page_size",createdAfter:"created_after",createdBefore:"created_before",createdByMe:"created_by_me",wandbProject:"wandb_project",wandbName:"wandb_name"}));function bVn(t){return JSON.stringify(ti.JobsApiRoutesFineTuningGetFineTuningJobsRequest$outboundSchema.parse(t))}});var qaI=Y(Fu=>{"use strict";o();var mVn=Fu&&Fu.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),ZVn=Fu&&Fu.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),DaI=Fu&&Fu.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,pVn.remap)(t,{jobId:"job_id"}));function WVn(t){return JSON.stringify(Fu.JobsApiRoutesFineTuningStartFineTuningJobRequest$outboundSchema.parse(t))}Fu.JobsApiRoutesFineTuningStartFineTuningJobResponse$inboundSchema=Uk.union([KaI.ClassifierDetailedJobOut$inboundSchema.and(Uk.object({job_type:Uk.literal("classifier")}).transform(t=>({jobType:t.job_type}))),KaI.CompletionDetailedJobOut$inboundSchema.and(Uk.object({job_type:Uk.literal("completion")}).transform(t=>({jobType:t.job_type})))]);function NVn(t){return(0,hVn.safeParse)(t,e=>Fu.JobsApiRoutesFineTuningStartFineTuningJobResponse$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'JobsApiRoutesFineTuningStartFineTuningJobResponse' from JSON")}});var $aI=Y(KY=>{"use strict";o();var VVn=KY&&KY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),YVn=KY&&KY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),RVn=KY&&KY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,AVn.remap)(t,{modelId:"model_id"}));function FVn(t){return JSON.stringify(KY.JobsApiRoutesFineTuningUnarchiveFineTunedModelRequest$outboundSchema.parse(t))}});var tcI=Y(Xu=>{"use strict";o();var XVn=Xu&&Xu.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),gVn=Xu&&Xu.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ecI=Xu&&Xu.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,vVn.remap)(t,{modelId:"model_id",updateFTModelIn:"UpdateFTModelIn"}));function wVn(t){return JSON.stringify(Xu.JobsApiRoutesFineTuningUpdateFineTunedModelRequest$outboundSchema.parse(t))}Xu.JobsApiRoutesFineTuningUpdateFineTunedModelResponse$inboundSchema=Ok.union([Q6e.ClassifierFTModelOut$inboundSchema.and(Ok.object({model_type:Ok.literal("classifier")}).transform(t=>({modelType:t.model_type}))),Q6e.CompletionFTModelOut$inboundSchema.and(Ok.object({model_type:Ok.literal("completion")}).transform(t=>({modelType:t.model_type})))]);function HVn(t){return(0,yVn.safeParse)(t,e=>Xu.JobsApiRoutesFineTuningUpdateFineTunedModelResponse$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'JobsApiRoutesFineTuningUpdateFineTunedModelResponse' from JSON")}});var ncI=Y(DY=>{"use strict";o();var QVn=DY&&DY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),fVn=DY&&DY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),lcI=DY&&DY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,EVn.remap)(t,{eventId:"event_id",postChatCompletionEventJudgingInSchema:"PostChatCompletionEventJudgingInSchema"}));function CVn(t){return JSON.stringify(DY.JudgeChatCompletionEventV1ObservabilityChatCompletionEventsEventIdLiveJudgingPostRequest$outboundSchema.parse(t))}});var rcI=Y(qY=>{"use strict";o();var LVn=qY&&qY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),kVn=qY&&qY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ccI=qY&&qY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,xVn.remap)(t,{datasetRecordId:"dataset_record_id",postDatasetRecordJudgingInSchema:"PostDatasetRecordJudgingInSchema"}));function UVn(t){return JSON.stringify(qY.JudgeDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIdLiveJudgingPostRequest$outboundSchema.parse(t))}});var ocI=Y(PY=>{"use strict";o();var OVn=PY&&PY.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),zVn=PY&&PY.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),BVn=PY&&PY.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,MVn.remap)(t,{libraryId:"library_id"}));function SVn(t){return JSON.stringify(PY.LibrariesDeleteV1Request$outboundSchema.parse(t))}});var icI=Y($Y=>{"use strict";o();var TVn=$Y&&$Y.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),_Vn=$Y&&$Y.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),KVn=$Y&&$Y.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,DVn.remap)(t,{libraryId:"library_id",documentId:"document_id"}));function qVn(t){return JSON.stringify($Y.LibrariesDocumentsDeleteV1Request$outboundSchema.parse(t))}});var GcI=Y(eR=>{"use strict";o();var PVn=eR&&eR.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),$Vn=eR&&eR.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),eYn=eR&&eR.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,tYn.remap)(t,{libraryId:"library_id",documentId:"document_id"}));function IYn(t){return JSON.stringify(eR.LibrariesDocumentsGetExtractedTextSignedUrlV1Request$outboundSchema.parse(t))}});var dcI=Y(tR=>{"use strict";o();var lYn=tR&&tR.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),nYn=tR&&tR.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),aYn=tR&&tR.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,cYn.remap)(t,{libraryId:"library_id",documentId:"document_id"}));function rYn(t){return JSON.stringify(tR.LibrariesDocumentsGetSignedUrlV1Request$outboundSchema.parse(t))}});var ucI=Y(IR=>{"use strict";o();var sYn=IR&&IR.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),oYn=IR&&IR.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),iYn=IR&&IR.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,GYn.remap)(t,{libraryId:"library_id",documentId:"document_id"}));function dYn(t){return JSON.stringify(IR.LibrariesDocumentsGetStatusV1Request$outboundSchema.parse(t))}});var bcI=Y(lR=>{"use strict";o();var uYn=lR&&lR.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),bYn=lR&&lR.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),mYn=lR&&lR.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,ZYn.remap)(t,{libraryId:"library_id",documentId:"document_id"}));function pYn(t){return JSON.stringify(lR.LibrariesDocumentsGetTextContentV1Request$outboundSchema.parse(t))}});var mcI=Y(nR=>{"use strict";o();var hYn=nR&&nR.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),WYn=nR&&nR.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),NYn=nR&&nR.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,VYn.remap)(t,{libraryId:"library_id",documentId:"document_id"}));function YYn(t){return JSON.stringify(nR.LibrariesDocumentsGetV1Request$outboundSchema.parse(t))}});var ZcI=Y(aR=>{"use strict";o();var RYn=aR&&aR.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),AYn=aR&&aR.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),FYn=aR&&aR.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,XYn.remap)(t,{libraryId:"library_id",pageSize:"page_size",filtersAttributes:"filters_attributes",sortBy:"sort_by",sortOrder:"sort_order"}));function gYn(t){return JSON.stringify(aR.LibrariesDocumentsListV1Request$outboundSchema.parse(t))}});var pcI=Y(cR=>{"use strict";o();var vYn=cR&&cR.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),yYn=cR&&cR.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),wYn=cR&&cR.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,HYn.remap)(t,{libraryId:"library_id",documentId:"document_id"}));function QYn(t){return JSON.stringify(cR.LibrariesDocumentsReprocessV1Request$outboundSchema.parse(t))}});var WcI=Y(rR=>{"use strict";o();var fYn=rR&&rR.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),EYn=rR&&rR.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),hcI=rR&&rR.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,JYn.remap)(t,{libraryId:"library_id",documentId:"document_id",documentUpdateIn:"DocumentUpdateIn"}));function LYn(t){return JSON.stringify(rR.LibrariesDocumentsUpdateV1Request$outboundSchema.parse(t))}});var VcI=Y(Mi=>{"use strict";o();var kYn=Mi&&Mi.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),xYn=Mi&&Mi.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),NcI=Mi&&Mi.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nMi.LibrariesDocumentsUploadV1DocumentUpload$outboundSchema)}).transform(t=>(0,jYn.remap)(t,{libraryId:"library_id",requestBody:"RequestBody"}));function BYn(t){return JSON.stringify(Mi.LibrariesDocumentsUploadV1Request$outboundSchema.parse(t))}});var RcI=Y(sR=>{"use strict";o();var MYn=sR&&sR.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),SYn=sR&&sR.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),TYn=sR&&sR.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,_Yn.remap)(t,{libraryId:"library_id"}));function KYn(t){return JSON.stringify(sR.LibrariesGetV1Request$outboundSchema.parse(t))}});var XcI=Y(oR=>{"use strict";o();var DYn=oR&&oR.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),qYn=oR&&oR.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),FcI=oR&&oR.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,PYn.remap)(t,{libraryId:"library_id",sharingIn:"SharingIn"}));function eRn(t){return JSON.stringify(oR.LibrariesShareCreateV1Request$outboundSchema.parse(t))}});var ycI=Y(iR=>{"use strict";o();var tRn=iR&&iR.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),IRn=iR&&iR.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),vcI=iR&&iR.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,lRn.remap)(t,{libraryId:"library_id",sharingDelete:"SharingDelete"}));function aRn(t){return JSON.stringify(iR.LibrariesShareDeleteV1Request$outboundSchema.parse(t))}});var HcI=Y(GR=>{"use strict";o();var cRn=GR&&GR.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),rRn=GR&&GR.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),sRn=GR&&GR.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,oRn.remap)(t,{libraryId:"library_id"}));function iRn(t){return JSON.stringify(GR.LibrariesShareListV1Request$outboundSchema.parse(t))}});var EcI=Y(dR=>{"use strict";o();var GRn=dR&&dR.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),dRn=dR&&dR.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),fcI=dR&&dR.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,uRn.remap)(t,{libraryId:"library_id",libraryInUpdate:"LibraryInUpdate"}));function mRn(t){return JSON.stringify(dR.LibrariesUpdateV1Request$outboundSchema.parse(t))}});var JcI=Y(uR=>{"use strict";o();var ZRn=uR&&uR.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),pRn=uR&&uR.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),hRn=uR&&uR.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var NRn=bR&&bR.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),VRn=bR&&bR.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),LcI=bR&&bR.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,YRn.remap)(t,{datasetId:"dataset_id",postDatasetImportFromCampaignInSchema:"PostDatasetImportFromCampaignInSchema"}));function ARn(t){return JSON.stringify(bR.PostDatasetRecordsFromCampaignV1ObservabilityDatasetsDatasetIdImportsFromCampaignPostRequest$outboundSchema.parse(t))}});var UcI=Y(mR=>{"use strict";o();var FRn=mR&&mR.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),XRn=mR&&mR.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),jcI=mR&&mR.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,gRn.remap)(t,{datasetId:"dataset_id",postDatasetImportFromDatasetInSchema:"PostDatasetImportFromDatasetInSchema"}));function yRn(t){return JSON.stringify(mR.PostDatasetRecordsFromDatasetV1ObservabilityDatasetsDatasetIdImportsFromDatasetPostRequest$outboundSchema.parse(t))}});var BcI=Y(ZR=>{"use strict";o();var wRn=ZR&&ZR.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),HRn=ZR&&ZR.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),zcI=ZR&&ZR.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,QRn.remap)(t,{datasetId:"dataset_id",postDatasetImportFromExplorerInSchema:"PostDatasetImportFromExplorerInSchema"}));function ERn(t){return JSON.stringify(ZR.PostDatasetRecordsFromExplorerV1ObservabilityDatasetsDatasetIdImportsFromExplorerPostRequest$outboundSchema.parse(t))}});var TcI=Y(pR=>{"use strict";o();var JRn=pR&&pR.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),CRn=pR&&pR.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ScI=pR&&pR.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,LRn.remap)(t,{datasetId:"dataset_id",postDatasetImportFromFileInSchema:"PostDatasetImportFromFileInSchema"}));function xRn(t){return JSON.stringify(pR.PostDatasetRecordsFromFileV1ObservabilityDatasetsDatasetIdImportsFromFilePostRequest$outboundSchema.parse(t))}});var DcI=Y(hR=>{"use strict";o();var jRn=hR&&hR.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),URn=hR&&hR.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),KcI=hR&&hR.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,ORn.remap)(t,{datasetId:"dataset_id",postDatasetImportFromPlaygroundInSchema:"PostDatasetImportFromPlaygroundInSchema"}));function BRn(t){return JSON.stringify(hR.PostDatasetRecordsFromPlaygroundV1ObservabilityDatasetsDatasetIdImportsFromPlaygroundPostRequest$outboundSchema.parse(t))}});var $cI=Y(gu=>{"use strict";o();var MRn=gu&&gu.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),SRn=gu&&gu.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),PcI=gu&&gu.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,TRn.remap)(t,{modelId:"model_id"}));function KRn(t){return JSON.stringify(gu.RetrieveModelV1ModelsModelIdGetRequest$outboundSchema.parse(t))}gu.RetrieveModelV1ModelsModelIdGetResponseRetrieveModelV1ModelsModelIdGet$inboundSchema=zk.union([qcI.BaseModelCard$inboundSchema.and(zk.object({type:zk.literal("base")})),qcI.FTModelCard$inboundSchema.and(zk.object({type:zk.literal("fine-tuned")}))]);function DRn(t){return(0,_Rn.safeParse)(t,e=>gu.RetrieveModelV1ModelsModelIdGetResponseRetrieveModelV1ModelsModelIdGet$inboundSchema.parse(JSON.parse(e)),"Failed to parse 'RetrieveModelV1ModelsModelIdGetResponseRetrieveModelV1ModelsModelIdGet' from JSON")}});var IrI=Y(WR=>{"use strict";o();var qRn=WR&&WR.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),PRn=WR&&WR.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),trI=WR&&WR.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,$Rn.remap)(t,{datasetRecordId:"dataset_record_id",putDatasetRecordPayloadInSchema:"PutDatasetRecordPayloadInSchema"}));function t0n(t){return JSON.stringify(WR.UpdateDatasetRecordPayloadV1ObservabilityDatasetRecordsDatasetRecordIdPayloadPutRequest$outboundSchema.parse(t))}});var arI=Y(NR=>{"use strict";o();var I0n=NR&&NR.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),l0n=NR&&NR.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),nrI=NR&&NR.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,n0n.remap)(t,{datasetRecordId:"dataset_record_id",putDatasetRecordPropertiesInSchema:"PutDatasetRecordPropertiesInSchema"}));function c0n(t){return JSON.stringify(NR.UpdateDatasetRecordPropertiesV1ObservabilityDatasetRecordsDatasetRecordIdPropertiesPutRequest$outboundSchema.parse(t))}});var srI=Y(VR=>{"use strict";o();var r0n=VR&&VR.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),s0n=VR&&VR.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),rrI=VR&&VR.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,o0n.remap)(t,{datasetId:"dataset_id",patchDatasetInSchema:"PatchDatasetInSchema"}));function G0n(t){return JSON.stringify(VR.UpdateDatasetV1ObservabilityDatasetsDatasetIdPatchRequest$outboundSchema.parse(t))}});var GrI=Y(YR=>{"use strict";o();var d0n=YR&&YR.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),u0n=YR&&YR.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),irI=YR&&YR.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n(0,b0n.remap)(t,{judgeId:"judge_id",putJudgeInSchema:"PutJudgeInSchema"}));function Z0n(t){return JSON.stringify(YR.UpdateJudgeV1ObservabilityJudgesJudgeIdPutRequest$outboundSchema.parse(t))}});var Pe=Y(_e=>{"use strict";o();var p0n=_e&&_e.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),$e=_e&&_e.__exportStar||function(t,e){for(var I in t)I!=="default"&&!Object.prototype.hasOwnProperty.call(e,I)&&p0n(e,t,I)};Object.defineProperty(_e,"__esModule",{value:!0});$e(ClI(),_e);$e(klI(),_e);$e(xlI(),_e);$e(jlI(),_e);$e(UlI(),_e);$e(zlI(),_e);$e(MlI(),_e);$e(SlI(),_e);$e(KlI(),_e);$e(DlI(),_e);$e($lI(),_e);$e(InI(),_e);$e(nnI(),_e);$e(rnI(),_e);$e(onI(),_e);$e(dnI(),_e);$e(bnI(),_e);$e(pnI(),_e);$e(NnI(),_e);$e(YnI(),_e);$e(AnI(),_e);$e(FnI(),_e);$e(gnI(),_e);$e(wnI(),_e);$e(fnI(),_e);$e(JnI(),_e);$e(LnI(),_e);$e(xnI(),_e);$e(UnI(),_e);$e(znI(),_e);$e(MnI(),_e);$e(TnI(),_e);$e(KnI(),_e);$e(DnI(),_e);$e(PnI(),_e);$e(eaI(),_e);$e(laI(),_e);$e(aaI(),_e);$e(caI(),_e);$e(saI(),_e);$e(oaI(),_e);$e(GaI(),_e);$e(uaI(),_e);$e(ZaI(),_e);$e(paI(),_e);$e(WaI(),_e);$e(NaI(),_e);$e(VaI(),_e);$e(YaI(),_e);$e(AaI(),_e);$e(FaI(),_e);$e(gaI(),_e);$e(yaI(),_e);$e(HaI(),_e);$e(faI(),_e);$e(EaI(),_e);$e(CaI(),_e);$e(kaI(),_e);$e(UaI(),_e);$e(BaI(),_e);$e(TaI(),_e);$e(_aI(),_e);$e(qaI(),_e);$e($aI(),_e);$e(tcI(),_e);$e(ncI(),_e);$e(rcI(),_e);$e(ocI(),_e);$e(icI(),_e);$e(GcI(),_e);$e(dcI(),_e);$e(ucI(),_e);$e(bcI(),_e);$e(mcI(),_e);$e(ZcI(),_e);$e(pcI(),_e);$e(WcI(),_e);$e(VcI(),_e);$e(RcI(),_e);$e(XcI(),_e);$e(ycI(),_e);$e(HcI(),_e);$e(EcI(),_e);$e(JcI(),_e);$e(kcI(),_e);$e(UcI(),_e);$e(BcI(),_e);$e(TcI(),_e);$e(DcI(),_e);$e($cI(),_e);$e(IrI(),_e);$e(arI(),_e);$e(srI(),_e);$e(GrI(),_e)});var urI=Y(Lv=>{"use strict";o();var h0n=Lv&&Lv.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),W0n=Lv&&Lv.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),U6e=Lv&&Lv.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nF0n.JobsApiRoutesBatchCancelBatchJobRequest$outboundSchema.parse(N),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={job_id:(0,N0n.encodeSimple)("job_id",n.job_id,{explode:!1,charEncoding:"percent"})},r=(0,R0n.pathToFunc)("/v1/batch/jobs/{job_id}/cancel")(c),s=new Headers((0,V0n.compactMap)({Accept:"application/json"})),i=await(0,drI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,drI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"jobs_api_routes_batch_cancel_batch_job",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"POST",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,[h]=await lVe.match(lVe.json(200,A0n.BatchJobOut$inboundSchema),lVe.fail("4XX"),lVe.fail("5XX"))(W,Z);return h.ok?[h,{status:"complete",request:Z,response:W}]:[h,{status:"complete",request:Z,response:W}]}});var prI=Y(kv=>{"use strict";o();var y0n=kv&&kv.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),w0n=kv&&kv.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ZrI=kv&&kv.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nmrI.BatchJobIn$outboundSchema.parse(h),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,H0n.encodeJSON)("body",n,{explode:!0}),c=(0,E0n.pathToFunc)("/v1/batch/jobs")(),r=new Headers((0,Q0n.compactMap)({"Content-Type":"application/json",Accept:"application/json"})),s=await(0,brI.extractSecurity)(t._options.apiKey),i=s==null?{}:{apiKey:s},G=(0,brI.resolveGlobalSecurity)(i),d={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"jobs_api_routes_batch_create_batch_job",oAuth2Scopes:null,resolvedSecurity:G,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},u=t._createRequest(d,{security:G,method:"POST",baseURL:I?.serverURL,path:c,headers:r,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!u.ok)return[u,{status:"invalid"}];let b=u.value,Z=await t._do(b,{context:d,errorCodes:["4XX","5XX"],retryConfig:d.retryConfig,retryCodes:d.retryCodes});if(!Z.ok)return[Z,{status:"request-error",request:b}];let p=Z.value,[W]=await nVe.match(nVe.json(200,mrI.BatchJobOut$inboundSchema),nVe.fail("4XX"),nVe.fail("5XX"))(p,b);return W.ok?[W,{status:"complete",request:b,response:p}]:[W,{status:"complete",request:b,response:p}]}});var NrI=Y(xv=>{"use strict";o();var k0n=xv&&xv.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),x0n=xv&&xv.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),O6e=xv&&xv.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nB0n.JobsApiRoutesBatchGetBatchJobRequest$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={job_id:(0,hrI.encodeSimple)("job_id",n.job_id,{explode:!1,charEncoding:"percent"})},r=(0,O0n.pathToFunc)("/v1/batch/jobs/{job_id}")(c),s=(0,hrI.encodeFormQuery)({inline:n.inline}),i=new Headers((0,j0n.compactMap)({Accept:"application/json"})),G=await(0,WrI.extractSecurity)(t._options.apiKey),d=G==null?{}:{apiKey:G},u=(0,WrI.resolveGlobalSecurity)(d),b={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"jobs_api_routes_batch_get_batch_job",oAuth2Scopes:null,resolvedSecurity:u,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},Z=t._createRequest(b,{security:u,method:"GET",baseURL:I?.serverURL,path:r,headers:i,query:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!Z.ok)return[Z,{status:"invalid"}];let p=Z.value,W=await t._do(p,{context:b,errorCodes:["4XX","5XX"],retryConfig:b.retryConfig,retryCodes:b.retryCodes});if(!W.ok)return[W,{status:"request-error",request:p}];let h=W.value,[N]=await aVe.match(aVe.json(200,z0n.BatchJobOut$inboundSchema),aVe.fail("4XX"),aVe.fail("5XX"))(h,p);return N.ok?[N,{status:"complete",request:p,response:h}]:[N,{status:"complete",request:p,response:h}]}});var YrI=Y(jv=>{"use strict";o();var _0n=jv&&jv.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),K0n=jv&&jv.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),z6e=jv&&jv.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;ntAn.JobsApiRoutesBatchGetBatchJobsRequest$outboundSchema.optional().parse(N),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c=(0,$0n.pathToFunc)("/v1/batch/jobs")(),r=(0,D0n.encodeFormQuery)({agent_id:n?.agent_id,created_after:n?.created_after,created_by_me:n?.created_by_me,metadata:n?.metadata,model:n?.model,order_by:n?.order_by,page:n?.page,page_size:n?.page_size,status:n?.status}),s=new Headers((0,q0n.compactMap)({Accept:"application/json"})),i=await(0,VrI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,VrI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"jobs_api_routes_batch_get_batch_jobs",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"GET",baseURL:I?.serverURL,path:c,headers:s,query:r,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,[h]=await cVe.match(cVe.json(200,eAn.BatchJobsOut$inboundSchema),cVe.fail("4XX"),cVe.fail("5XX"))(W,Z);return h.ok?[h,{status:"complete",request:Z,response:W}]:[h,{status:"complete",request:Z,response:W}]}});var RrI=Y(sVe=>{"use strict";o();Object.defineProperty(sVe,"__esModule",{value:!0});sVe.MistralJobs=void 0;var aAn=urI(),cAn=prI(),rAn=NrI(),sAn=YrI(),oAn=En(),rVe=da(),B6e=class extends oAn.ClientSDK{async list(e,I){return(0,rVe.unwrapAsync)((0,sAn.batchJobsList)(this,e,I))}async create(e,I){return(0,rVe.unwrapAsync)((0,cAn.batchJobsCreate)(this,e,I))}async get(e,I){return(0,rVe.unwrapAsync)((0,rAn.batchJobsGet)(this,e,I))}async cancel(e,I){return(0,rVe.unwrapAsync)((0,aAn.batchJobsCancel)(this,e,I))}};sVe.MistralJobs=B6e});var ArI=Y(oVe=>{"use strict";o();Object.defineProperty(oVe,"__esModule",{value:!0});oVe.Batch=void 0;var iAn=En(),GAn=RrI(),M6e=class extends iAn.ClientSDK{get jobs(){return this._jobs??(this._jobs=new GAn.MistralJobs(this._options))}};oVe.Batch=M6e});var XrI=Y(Uv=>{"use strict";o();var dAn=Uv&&Uv.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),uAn=Uv&&Uv.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),iVe=Uv&&Uv.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nWAn.ConnectorCallToolV1Request$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,S6e.encodeJSON)("body",n.MCPToolCallRequest,{explode:!0}),c={connector_id_or_name:(0,S6e.encodeSimple)("connector_id_or_name",n.connector_id_or_name,{explode:!1,charEncoding:"percent"}),tool_name:(0,S6e.encodeSimple)("tool_name",n.tool_name,{explode:!1,charEncoding:"percent"})},r=(0,ZAn.pathToFunc)("/v1/connectors/{connector_id_or_name}/tools/{tool_name}/call")(c),s=new Headers((0,bAn.compactMap)({"Content-Type":"application/json",Accept:"application/json"})),i=await(0,FrI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,FrI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"connector_call_tool_v1",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"POST",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await M8.match(M8.json(200,pAn.MCPToolCallResponse$inboundSchema),M8.jsonErr(422,hAn.HTTPValidationError$inboundSchema),M8.fail("4XX"),M8.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var yrI=Y(Ov=>{"use strict";o();var RAn=Ov&&Ov.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),AAn=Ov&&Ov.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),T6e=Ov&&Ov.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nvrI.ConnectorMCPCreate$outboundSchema.parse(N),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,FAn.encodeJSON)("body",n,{explode:!0}),c=(0,vAn.pathToFunc)("/v1/connectors")(),r=new Headers((0,XAn.compactMap)({"Content-Type":"application/json",Accept:"application/json"})),s=await(0,grI.extractSecurity)(t._options.apiKey),i=s==null?{}:{apiKey:s},G=(0,grI.resolveGlobalSecurity)(i),d={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"connector_create_v1",oAuth2Scopes:null,resolvedSecurity:G,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},u=t._createRequest(d,{security:G,method:"POST",baseURL:I?.serverURL,path:c,headers:r,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!u.ok)return[u,{status:"invalid"}];let b=u.value,Z=await t._do(b,{context:d,errorCodes:["422","4XX","5XX"],retryConfig:d.retryConfig,retryCodes:d.retryCodes});if(!Z.ok)return[Z,{status:"request-error",request:b}];let p=Z.value,W={HttpMeta:{Response:p,Request:b}},[h]=await S8.match(S8.json(201,vrI.Connector$inboundSchema),S8.jsonErr(422,yAn.HTTPValidationError$inboundSchema),S8.fail("4XX"),S8.fail("5XX"))(p,b,{extraFields:W});return h.ok?[h,{status:"complete",request:b,response:p}]:[h,{status:"complete",request:b,response:p}]}});var HrI=Y(zv=>{"use strict";o();var fAn=zv&&zv.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),EAn=zv&&zv.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),GVe=zv&&zv.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nUAn.ConnectorDeleteV1Request$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={connector_id:(0,JAn.encodeSimple)("connector_id",n.connector_id,{explode:!1,charEncoding:"percent"})},r=(0,kAn.pathToFunc)("/v1/connectors/{connector_id}#id")(c),s=new Headers((0,CAn.compactMap)({Accept:"application/json"})),i=await(0,wrI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,wrI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"connector_delete_v1",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"DELETE",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await T8.match(T8.json(200,xAn.MessageResponse$inboundSchema),T8.jsonErr(422,jAn.HTTPValidationError$inboundSchema),T8.fail("4XX"),T8.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var ErI=Y(Bv=>{"use strict";o();var MAn=Bv&&Bv.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),SAn=Bv&&Bv.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),dVe=Bv&&Bv.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nPAn.ConnectorGetV1Request$outboundSchema.parse(R),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={connector_id_or_name:(0,QrI.encodeSimple)("connector_id_or_name",n.connector_id_or_name,{explode:!1,charEncoding:"percent"})},r=(0,KAn.pathToFunc)("/v1/connectors/{connector_id_or_name}#idOrName")(c),s=(0,QrI.encodeFormQuery)({fetch_connection_secrets:n.fetch_connection_secrets,fetch_customer_data:n.fetch_customer_data}),i=new Headers((0,TAn.compactMap)({Accept:"application/json"})),G=await(0,frI.extractSecurity)(t._options.apiKey),d=G==null?{}:{apiKey:G},u=(0,frI.resolveGlobalSecurity)(d),b={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"connector_get_v1",oAuth2Scopes:null,resolvedSecurity:u,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},Z=t._createRequest(b,{security:u,method:"GET",baseURL:I?.serverURL,path:r,headers:i,query:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!Z.ok)return[Z,{status:"invalid"}];let p=Z.value,W=await t._do(p,{context:b,errorCodes:["422","4XX","5XX"],retryConfig:b.retryConfig,retryCodes:b.retryCodes});if(!W.ok)return[W,{status:"request-error",request:p}];let h=W.value,N={HttpMeta:{Response:h,Request:p}},[V]=await _8.match(_8.json(200,DAn.Connector$inboundSchema),_8.jsonErr(422,qAn.HTTPValidationError$inboundSchema),_8.fail("4XX"),_8.fail("5XX"))(h,p,{extraFields:N});return V.ok?[V,{status:"complete",request:p,response:h}]:[V,{status:"complete",request:p,response:h}]}});var CrI=Y(Mv=>{"use strict";o();var IFn=Mv&&Mv.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),lFn=Mv&&Mv.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),uVe=Mv&&Mv.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;niFn.ConnectorListV1Request$outboundSchema.optional().parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c=(0,rFn.pathToFunc)("/v1/connectors")(),r=(0,nFn.encodeFormQuery)({cursor:n?.cursor,page_size:n?.page_size,query_filters:n?.query_filters}),s=new Headers((0,aFn.compactMap)({Accept:"application/json"})),i=await(0,JrI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,JrI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"connector_list_v1",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"GET",baseURL:I?.serverURL,path:c,headers:s,query:r,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await K8.match(K8.json(200,sFn.PaginatedConnectors$inboundSchema),K8.jsonErr(422,oFn.HTTPValidationError$inboundSchema),K8.fail("4XX"),K8.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var xrI=Y(Sv=>{"use strict";o();var bFn=Sv&&Sv.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),mFn=Sv&&Sv.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),bVe=Sv&&Sv.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nVFn.ConnectorUpdateV1Request$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,LrI.encodeJSON)("body",n.ConnectorMCPUpdate,{explode:!0}),c={connector_id:(0,LrI.encodeSimple)("connector_id",n.connector_id,{explode:!1,charEncoding:"percent"})},r=(0,hFn.pathToFunc)("/v1/connectors/{connector_id}#id")(c),s=new Headers((0,ZFn.compactMap)({"Content-Type":"application/json",Accept:"application/json"})),i=await(0,krI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,krI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"connector_update_v1",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"PATCH",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await D8.match(D8.json(200,WFn.Connector$inboundSchema),D8.jsonErr(422,NFn.HTTPValidationError$inboundSchema),D8.fail("4XX"),D8.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var jrI=Y(mVe=>{"use strict";o();Object.defineProperty(mVe,"__esModule",{value:!0});mVe.Connectors=void 0;var FFn=XrI(),XFn=yrI(),gFn=HrI(),vFn=ErI(),yFn=CrI(),wFn=xrI(),HFn=En(),tM=da(),_6e=class extends HFn.ClientSDK{async create(e,I){return(0,tM.unwrapAsync)((0,XFn.betaConnectorsCreate)(this,e,I))}async list(e,I){return(0,tM.unwrapAsync)((0,yFn.betaConnectorsList)(this,e,I))}async callTool(e,I){return(0,tM.unwrapAsync)((0,FFn.betaConnectorsCallTool)(this,e,I))}async get(e,I){return(0,tM.unwrapAsync)((0,vFn.betaConnectorsGet)(this,e,I))}async update(e,I){return(0,tM.unwrapAsync)((0,wFn.betaConnectorsUpdate)(this,e,I))}async delete(e,I){return(0,tM.unwrapAsync)((0,gFn.betaConnectorsDelete)(this,e,I))}};mVe.Connectors=_6e});var zrI=Y(Tv=>{"use strict";o();var QFn=Tv&&Tv.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),fFn=Tv&&Tv.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ZVe=Tv&&Tv.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nxFn.AgentsApiV1ConversationsAppendRequest$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,UrI.encodeJSON)("body",n.ConversationAppendRequest,{explode:!0}),c={conversation_id:(0,UrI.encodeSimple)("conversation_id",n.conversation_id,{explode:!1,charEncoding:"percent"})},r=(0,CFn.pathToFunc)("/v1/conversations/{conversation_id}")(c),s=new Headers((0,EFn.compactMap)({"Content-Type":"application/json",Accept:"application/json"})),i=await(0,OrI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,OrI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"agents_api_v1_conversations_append",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"POST",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await q8.match(q8.json(200,LFn.ConversationResponse$inboundSchema),q8.jsonErr(422,kFn.HTTPValidationError$inboundSchema),q8.fail("4XX"),q8.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var SrI=Y(_v=>{"use strict";o();var zFn=_v&&_v.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),BFn=_v&&_v.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),$8=_v&&_v.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nPFn.AgentsApiV1ConversationsAppendStreamRequest$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,BrI.encodeJSON)("body",n.ConversationAppendStreamRequest,{explode:!0}),c={conversation_id:(0,BrI.encodeSimple)("conversation_id",n.conversation_id,{explode:!1,charEncoding:"percent"})},r=(0,KFn.pathToFunc)("/v1/conversations/{conversation_id}#stream")(c),s=new Headers((0,TFn.compactMap)({"Content-Type":"application/json",Accept:"text/event-stream"})),i=await(0,MrI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,MrI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"agents_api_v1_conversations_append_stream",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"POST",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await P8.match(P8.sse(200,MFn.instanceof(ReadableStream).transform(V=>new SFn.EventStream(V,R=>({value:DFn.ConversationEvents$inboundSchema.parse(R)})))),P8.jsonErr(422,qFn.HTTPValidationError$inboundSchema),P8.fail("4XX"),P8.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var _rI=Y(Kv=>{"use strict";o();var I2n=Kv&&Kv.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),l2n=Kv&&Kv.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),pVe=Kv&&Kv.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;ni2n.AgentsApiV1ConversationsDeleteRequest$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={conversation_id:(0,a2n.encodeSimple)("conversation_id",n.conversation_id,{explode:!1,charEncoding:"percent"})},r=(0,s2n.pathToFunc)("/v1/conversations/{conversation_id}")(c),s=new Headers((0,c2n.compactMap)({Accept:"application/json"})),i=await(0,TrI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,TrI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"agents_api_v1_conversations_delete",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"DELETE",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await e$.match(e$.nil(204,n2n.void()),e$.jsonErr(422,o2n.HTTPValidationError$inboundSchema),e$.fail("4XX"),e$.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var qrI=Y(Dv=>{"use strict";o();var b2n=Dv&&Dv.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),m2n=Dv&&Dv.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),K6e=Dv&&Dv.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nDrI.AgentsApiV1ConversationsGetRequest$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={conversation_id:(0,Z2n.encodeSimple)("conversation_id",n.conversation_id,{explode:!1,charEncoding:"percent"})},r=(0,W2n.pathToFunc)("/v1/conversations/{conversation_id}")(c),s=new Headers((0,p2n.compactMap)({Accept:"application/json"})),i=await(0,KrI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,KrI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"agents_api_v1_conversations_get",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"GET",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await t$.match(t$.json(200,DrI.AgentsApiV1ConversationsGetResponseV1ConversationsGet$inboundSchema),t$.jsonErr(422,N2n.HTTPValidationError$inboundSchema),t$.fail("4XX"),t$.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var $rI=Y(qv=>{"use strict";o();var A2n=qv&&qv.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),F2n=qv&&qv.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),hVe=qv&&qv.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nQ2n.AgentsApiV1ConversationsHistoryRequest$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={conversation_id:(0,X2n.encodeSimple)("conversation_id",n.conversation_id,{explode:!1,charEncoding:"percent"})},r=(0,y2n.pathToFunc)("/v1/conversations/{conversation_id}/history")(c),s=new Headers((0,g2n.compactMap)({Accept:"application/json"})),i=await(0,PrI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,PrI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"agents_api_v1_conversations_history",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"GET",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await I$.match(I$.json(200,w2n.ConversationHistory$inboundSchema),I$.jsonErr(422,H2n.HTTPValidationError$inboundSchema),I$.fail("4XX"),I$.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var tsI=Y(Pv=>{"use strict";o();var C2n=Pv&&Pv.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),L2n=Pv&&Pv.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),WVe=Pv&&Pv.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nB2n.AgentsApiV1ConversationsMessagesRequest$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={conversation_id:(0,k2n.encodeSimple)("conversation_id",n.conversation_id,{explode:!1,charEncoding:"percent"})},r=(0,U2n.pathToFunc)("/v1/conversations/{conversation_id}/messages")(c),s=new Headers((0,x2n.compactMap)({Accept:"application/json"})),i=await(0,esI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,esI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"agents_api_v1_conversations_messages",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"GET",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await l$.match(l$.json(200,O2n.ConversationMessages$inboundSchema),l$.jsonErr(422,z2n.HTTPValidationError$inboundSchema),l$.fail("4XX"),l$.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var nsI=Y($v=>{"use strict";o();var _2n=$v&&$v.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),K2n=$v&&$v.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),NVe=$v&&$v.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nlsI.AgentsApiV1ConversationsListRequest$outboundSchema.optional().parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c=(0,$2n.pathToFunc)("/v1/conversations")(),r=(0,D6e.queryJoin)((0,D6e.encodeFormQuery)({page:n?.page,page_size:n?.page_size}),(0,D6e.encodeJSONQuery)({metadata:n?.metadata},{explode:!1})),s=new Headers((0,q2n.compactMap)({Accept:"application/json"})),i=await(0,IsI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,IsI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"agents_api_v1_conversations_list",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"GET",baseURL:I?.serverURL,path:c,headers:s,query:r,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await n$.match(n$.json(200,D2n.array(lsI.ResponseBody$inboundSchema)),n$.jsonErr(422,eXn.HTTPValidationError$inboundSchema),n$.fail("4XX"),n$.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var rsI=Y(ey=>{"use strict";o();var nXn=ey&&ey.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),aXn=ey&&ey.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),VVe=ey&&ey.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nGXn.AgentsApiV1ConversationsRestartRequest$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,asI.encodeJSON)("body",n.ConversationRestartRequest,{explode:!0}),c={conversation_id:(0,asI.encodeSimple)("conversation_id",n.conversation_id,{explode:!1,charEncoding:"percent"})},r=(0,sXn.pathToFunc)("/v1/conversations/{conversation_id}/restart")(c),s=new Headers((0,cXn.compactMap)({"Content-Type":"application/json",Accept:"application/json"})),i=await(0,csI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,csI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"agents_api_v1_conversations_restart",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"POST",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await a$.match(a$.json(200,oXn.ConversationResponse$inboundSchema),a$.jsonErr(422,iXn.HTTPValidationError$inboundSchema),a$.fail("4XX"),a$.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var isI=Y(ty=>{"use strict";o();var mXn=ty&&ty.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),ZXn=ty&&ty.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),r$=ty&&ty.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nAXn.AgentsApiV1ConversationsRestartStreamRequest$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,ssI.encodeJSON)("body",n.ConversationRestartStreamRequest,{explode:!0}),c={conversation_id:(0,ssI.encodeSimple)("conversation_id",n.conversation_id,{explode:!1,charEncoding:"percent"})},r=(0,VXn.pathToFunc)("/v1/conversations/{conversation_id}/restart#stream")(c),s=new Headers((0,WXn.compactMap)({"Content-Type":"application/json",Accept:"text/event-stream"})),i=await(0,osI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,osI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"agents_api_v1_conversations_restart_stream",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"POST",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await c$.match(c$.sse(200,pXn.instanceof(ReadableStream).transform(V=>new hXn.EventStream(V,R=>({value:YXn.ConversationEvents$inboundSchema.parse(R)})))),c$.jsonErr(422,RXn.HTTPValidationError$inboundSchema),c$.fail("4XX"),c$.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var usI=Y(Iy=>{"use strict";o();var vXn=Iy&&Iy.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),yXn=Iy&&Iy.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),q6e=Iy&&Iy.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;ndsI.ConversationRequest$outboundSchema.parse(N),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,wXn.encodeJSON)("body",n,{explode:!0}),c=(0,fXn.pathToFunc)("/v1/conversations")(),r=new Headers((0,HXn.compactMap)({"Content-Type":"application/json",Accept:"application/json"})),s=await(0,GsI.extractSecurity)(t._options.apiKey),i=s==null?{}:{apiKey:s},G=(0,GsI.resolveGlobalSecurity)(i),d={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"agents_api_v1_conversations_start",oAuth2Scopes:null,resolvedSecurity:G,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},u=t._createRequest(d,{security:G,method:"POST",baseURL:I?.serverURL,path:c,headers:r,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!u.ok)return[u,{status:"invalid"}];let b=u.value,Z=await t._do(b,{context:d,errorCodes:["422","4XX","5XX"],retryConfig:d.retryConfig,retryCodes:d.retryCodes});if(!Z.ok)return[Z,{status:"request-error",request:b}];let p=Z.value,W={HttpMeta:{Response:p,Request:b}},[h]=await s$.match(s$.json(200,dsI.ConversationResponse$inboundSchema),s$.jsonErr(422,EXn.HTTPValidationError$inboundSchema),s$.fail("4XX"),s$.fail("5XX"))(p,b,{extraFields:W});return h.ok?[h,{status:"complete",request:b,response:p}]:[h,{status:"complete",request:b,response:p}]}});var ZsI=Y(ly=>{"use strict";o();var kXn=ly&&ly.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),xXn=ly&&ly.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),YVe=ly&&ly.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nmsI.ConversationStreamRequest$outboundSchema.parse(N),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,UXn.encodeJSON)("body",n,{explode:!0}),c=(0,MXn.pathToFunc)("/v1/conversations#stream")(),r=new Headers((0,zXn.compactMap)({"Content-Type":"application/json",Accept:"text/event-stream"})),s=await(0,bsI.extractSecurity)(t._options.apiKey),i=s==null?{}:{apiKey:s},G=(0,bsI.resolveGlobalSecurity)(i),d={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"agents_api_v1_conversations_start_stream",oAuth2Scopes:null,resolvedSecurity:G,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},u=t._createRequest(d,{security:G,method:"POST",baseURL:I?.serverURL,path:c,headers:r,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!u.ok)return[u,{status:"invalid"}];let b=u.value,Z=await t._do(b,{context:d,errorCodes:["422","4XX","5XX"],retryConfig:d.retryConfig,retryCodes:d.retryCodes});if(!Z.ok)return[Z,{status:"request-error",request:b}];let p=Z.value,W={HttpMeta:{Response:p,Request:b}},[h]=await o$.match(o$.sse(200,jXn.instanceof(ReadableStream).transform(N=>new OXn.EventStream(N,V=>({value:msI.ConversationEvents$inboundSchema.parse(V)})))),o$.jsonErr(422,SXn.HTTPValidationError$inboundSchema),o$.fail("4XX"),o$.fail("5XX"))(p,b,{extraFields:W});return h.ok?[h,{status:"complete",request:b,response:p}]:[h,{status:"complete",request:b,response:p}]}});var psI=Y(RVe=>{"use strict";o();Object.defineProperty(RVe,"__esModule",{value:!0});RVe.Conversations=void 0;var DXn=zrI(),qXn=SrI(),PXn=_rI(),$Xn=qrI(),egn=$rI(),tgn=tsI(),Ign=nsI(),lgn=rsI(),ngn=isI(),agn=usI(),cgn=ZsI(),rgn=En(),uA=da(),P6e=class extends rgn.ClientSDK{async start(e,I){return(0,uA.unwrapAsync)((0,agn.betaConversationsStart)(this,e,I))}async list(e,I){return(0,uA.unwrapAsync)((0,Ign.betaConversationsList)(this,e,I))}async get(e,I){return(0,uA.unwrapAsync)((0,$Xn.betaConversationsGet)(this,e,I))}async delete(e,I){return(0,uA.unwrapAsync)((0,PXn.betaConversationsDelete)(this,e,I))}async append(e,I){return(0,uA.unwrapAsync)((0,DXn.betaConversationsAppend)(this,e,I))}async getHistory(e,I){return(0,uA.unwrapAsync)((0,egn.betaConversationsGetHistory)(this,e,I))}async getMessages(e,I){return(0,uA.unwrapAsync)((0,tgn.betaConversationsGetMessages)(this,e,I))}async restart(e,I){return(0,uA.unwrapAsync)((0,lgn.betaConversationsRestart)(this,e,I))}async startStream(e,I){return(0,uA.unwrapAsync)((0,cgn.betaConversationsStartStream)(this,e,I))}async appendStream(e,I){return(0,uA.unwrapAsync)((0,qXn.betaConversationsAppendStream)(this,e,I))}async restartStream(e,I){return(0,uA.unwrapAsync)((0,ngn.betaConversationsRestartStream)(this,e,I))}};RVe.Conversations=P6e});var NsI=Y(ny=>{"use strict";o();var sgn=ny&&ny.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),ogn=ny&&ny.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),$6e=ny&&ny.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nWsI.LibraryIn$outboundSchema.parse(N),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,ign.encodeJSON)("body",n,{explode:!0}),c=(0,ugn.pathToFunc)("/v1/libraries")(),r=new Headers((0,Ggn.compactMap)({"Content-Type":"application/json",Accept:"application/json"})),s=await(0,hsI.extractSecurity)(t._options.apiKey),i=s==null?{}:{apiKey:s},G=(0,hsI.resolveGlobalSecurity)(i),d={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"libraries_create_v1",oAuth2Scopes:null,resolvedSecurity:G,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},u=t._createRequest(d,{security:G,method:"POST",baseURL:I?.serverURL,path:c,headers:r,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!u.ok)return[u,{status:"invalid"}];let b=u.value,Z=await t._do(b,{context:d,errorCodes:["422","4XX","5XX"],retryConfig:d.retryConfig,retryCodes:d.retryCodes});if(!Z.ok)return[Z,{status:"request-error",request:b}];let p=Z.value,W={HttpMeta:{Response:p,Request:b}},[h]=await i$.match(i$.json(201,WsI.LibraryOut$inboundSchema),i$.jsonErr(422,bgn.HTTPValidationError$inboundSchema),i$.fail("4XX"),i$.fail("5XX"))(p,b,{extraFields:W});return h.ok?[h,{status:"complete",request:b,response:p}]:[h,{status:"complete",request:b,response:p}]}});var YsI=Y(ay=>{"use strict";o();var hgn=ay&&ay.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Wgn=ay&&ay.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),AVe=ay&&ay.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nXgn.LibrariesDeleteV1Request$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={library_id:(0,Ngn.encodeSimple)("library_id",n.library_id,{explode:!1,charEncoding:"percent"})},r=(0,Rgn.pathToFunc)("/v1/libraries/{library_id}")(c),s=new Headers((0,Vgn.compactMap)({Accept:"application/json"})),i=await(0,VsI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,VsI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"libraries_delete_v1",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"DELETE",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await G$.match(G$.json(200,Agn.LibraryOut$inboundSchema),G$.jsonErr(422,Fgn.HTTPValidationError$inboundSchema),G$.fail("4XX"),G$.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var AsI=Y(cy=>{"use strict";o();var wgn=cy&&cy.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Hgn=cy&&cy.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),FVe=cy&&cy.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nkgn.LibrariesGetV1Request$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={library_id:(0,Qgn.encodeSimple)("library_id",n.library_id,{explode:!1,charEncoding:"percent"})},r=(0,Jgn.pathToFunc)("/v1/libraries/{library_id}")(c),s=new Headers((0,fgn.compactMap)({Accept:"application/json"})),i=await(0,RsI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,RsI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"libraries_get_v1",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"GET",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await d$.match(d$.json(200,Cgn.LibraryOut$inboundSchema),d$.jsonErr(422,Lgn.HTTPValidationError$inboundSchema),d$.fail("4XX"),d$.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var gsI=Y(ry=>{"use strict";o();var Ogn=ry&&ry.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),zgn=ry&&ry.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),XsI=ry&&ry.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();var Dgn=sy&&sy.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),qgn=sy&&sy.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),gVe=sy&&sy.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nlvn.LibrariesUpdateV1Request$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,vsI.encodeJSON)("body",n.LibraryInUpdate,{explode:!0}),c={library_id:(0,vsI.encodeSimple)("library_id",n.library_id,{explode:!1,charEncoding:"percent"})},r=(0,evn.pathToFunc)("/v1/libraries/{library_id}")(c),s=new Headers((0,Pgn.compactMap)({"Content-Type":"application/json",Accept:"application/json"})),i=await(0,ysI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,ysI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"libraries_update_v1",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"PUT",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await u$.match(u$.json(200,tvn.LibraryOut$inboundSchema),u$.jsonErr(422,Ivn.HTTPValidationError$inboundSchema),u$.fail("4XX"),u$.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var fsI=Y(oy=>{"use strict";o();var rvn=oy&&oy.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),svn=oy&&oy.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),vVe=oy&&oy.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nbvn.LibrariesShareDeleteV1Request$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,HsI.encodeJSON)("body",n.SharingDelete,{explode:!0}),c={library_id:(0,HsI.encodeSimple)("library_id",n.library_id,{explode:!1,charEncoding:"percent"})},r=(0,Gvn.pathToFunc)("/v1/libraries/{library_id}/share")(c),s=new Headers((0,ovn.compactMap)({"Content-Type":"application/json",Accept:"application/json"})),i=await(0,QsI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,QsI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"libraries_share_delete_v1",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"DELETE",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await b$.match(b$.json(200,dvn.SharingOut$inboundSchema),b$.jsonErr(422,uvn.HTTPValidationError$inboundSchema),b$.fail("4XX"),b$.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var JsI=Y(iy=>{"use strict";o();var hvn=iy&&iy.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Wvn=iy&&iy.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),yVe=iy&&iy.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nXvn.LibrariesShareListV1Request$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={library_id:(0,Nvn.encodeSimple)("library_id",n.library_id,{explode:!1,charEncoding:"percent"})},r=(0,Rvn.pathToFunc)("/v1/libraries/{library_id}/share")(c),s=new Headers((0,Vvn.compactMap)({Accept:"application/json"})),i=await(0,EsI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,EsI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"libraries_share_list_v1",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"GET",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await m$.match(m$.json(200,Avn.ListSharingOut$inboundSchema),m$.jsonErr(422,Fvn.HTTPValidationError$inboundSchema),m$.fail("4XX"),m$.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var ksI=Y(Gy=>{"use strict";o();var wvn=Gy&&Gy.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Hvn=Gy&&Gy.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),wVe=Gy&&Gy.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nLvn.LibrariesShareCreateV1Request$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,CsI.encodeJSON)("body",n.SharingIn,{explode:!0}),c={library_id:(0,CsI.encodeSimple)("library_id",n.library_id,{explode:!1,charEncoding:"percent"})},r=(0,Evn.pathToFunc)("/v1/libraries/{library_id}/share")(c),s=new Headers((0,Qvn.compactMap)({"Content-Type":"application/json",Accept:"application/json"})),i=await(0,LsI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,LsI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"libraries_share_create_v1",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"PUT",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await Z$.match(Z$.json(200,Jvn.SharingOut$inboundSchema),Z$.jsonErr(422,Cvn.HTTPValidationError$inboundSchema),Z$.fail("4XX"),Z$.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var xsI=Y(HVe=>{"use strict";o();Object.defineProperty(HVe,"__esModule",{value:!0});HVe.Accesses=void 0;var Uvn=fsI(),Ovn=JsI(),zvn=ksI(),Bvn=En(),eqe=da(),tqe=class extends Bvn.ClientSDK{async list(e,I){return(0,eqe.unwrapAsync)((0,Ovn.betaLibrariesAccessesList)(this,e,I))}async updateOrCreate(e,I){return(0,eqe.unwrapAsync)((0,zvn.betaLibrariesAccessesUpdateOrCreate)(this,e,I))}async delete(e,I){return(0,eqe.unwrapAsync)((0,Uvn.betaLibrariesAccessesDelete)(this,e,I))}};HVe.Accesses=tqe});var OsI=Y(dy=>{"use strict";o();var Mvn=dy&&dy.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Svn=dy&&dy.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),QVe=dy&&dy.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nPvn.LibrariesDocumentsDeleteV1Request$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={document_id:(0,jsI.encodeSimple)("document_id",n.document_id,{explode:!1,charEncoding:"percent"}),library_id:(0,jsI.encodeSimple)("library_id",n.library_id,{explode:!1,charEncoding:"percent"})},r=(0,Dvn.pathToFunc)("/v1/libraries/{library_id}/documents/{document_id}")(c),s=new Headers((0,_vn.compactMap)({Accept:"application/json"})),i=await(0,UsI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,UsI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"libraries_documents_delete_v1",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"DELETE",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await p$.match(p$.nil(204,Tvn.void()),p$.jsonErr(422,qvn.HTTPValidationError$inboundSchema),p$.fail("4XX"),p$.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var MsI=Y(uy=>{"use strict";o();var Iyn=uy&&uy.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),lyn=uy&&uy.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),fVe=uy&&uy.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;noyn.LibrariesDocumentsGetExtractedTextSignedUrlV1Request$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={document_id:(0,zsI.encodeSimple)("document_id",n.document_id,{explode:!1,charEncoding:"percent"}),library_id:(0,zsI.encodeSimple)("library_id",n.library_id,{explode:!1,charEncoding:"percent"})},r=(0,ryn.pathToFunc)("/v1/libraries/{library_id}/documents/{document_id}/extracted-text-signed-url")(c),s=new Headers((0,ayn.compactMap)({Accept:"application/json"})),i=await(0,BsI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,BsI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"libraries_documents_get_extracted_text_signed_url_v1",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"GET",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await h$.match(h$.json(200,nyn.string()),h$.jsonErr(422,syn.HTTPValidationError$inboundSchema),h$.fail("4XX"),h$.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var _sI=Y(by=>{"use strict";o();var uyn=by&&by.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),byn=by&&by.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),EVe=by&&by.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nNyn.LibrariesDocumentsGetV1Request$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={document_id:(0,SsI.encodeSimple)("document_id",n.document_id,{explode:!1,charEncoding:"percent"}),library_id:(0,SsI.encodeSimple)("library_id",n.library_id,{explode:!1,charEncoding:"percent"})},r=(0,pyn.pathToFunc)("/v1/libraries/{library_id}/documents/{document_id}")(c),s=new Headers((0,myn.compactMap)({Accept:"application/json"})),i=await(0,TsI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,TsI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"libraries_documents_get_v1",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"GET",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await W$.match(W$.json(200,hyn.DocumentOut$inboundSchema),W$.jsonErr(422,Wyn.HTTPValidationError$inboundSchema),W$.fail("4XX"),W$.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var qsI=Y(my=>{"use strict";o();var Ayn=my&&my.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Fyn=my&&my.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),JVe=my&&my.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nHyn.LibrariesDocumentsGetSignedUrlV1Request$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={document_id:(0,KsI.encodeSimple)("document_id",n.document_id,{explode:!1,charEncoding:"percent"}),library_id:(0,KsI.encodeSimple)("library_id",n.library_id,{explode:!1,charEncoding:"percent"})},r=(0,yyn.pathToFunc)("/v1/libraries/{library_id}/documents/{document_id}/signed-url")(c),s=new Headers((0,gyn.compactMap)({Accept:"application/json"})),i=await(0,DsI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,DsI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"libraries_documents_get_signed_url_v1",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"GET",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await N$.match(N$.json(200,Xyn.string()),N$.jsonErr(422,wyn.HTTPValidationError$inboundSchema),N$.fail("4XX"),N$.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var eoI=Y(Zy=>{"use strict";o();var Jyn=Zy&&Zy.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Cyn=Zy&&Zy.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),CVe=Zy&&Zy.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nOyn.LibrariesDocumentsListV1Request$outboundSchema.parse(R),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={library_id:(0,PsI.encodeSimple)("library_id",n.library_id,{explode:!1,charEncoding:"percent"})},r=(0,xyn.pathToFunc)("/v1/libraries/{library_id}/documents")(c),s=(0,PsI.encodeFormQuery)({filters_attributes:n.filters_attributes,page:n.page,page_size:n.page_size,search:n.search,sort_by:n.sort_by,sort_order:n.sort_order}),i=new Headers((0,Lyn.compactMap)({Accept:"application/json"})),G=await(0,$sI.extractSecurity)(t._options.apiKey),d=G==null?{}:{apiKey:G},u=(0,$sI.resolveGlobalSecurity)(d),b={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"libraries_documents_list_v1",oAuth2Scopes:null,resolvedSecurity:u,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},Z=t._createRequest(b,{security:u,method:"GET",baseURL:I?.serverURL,path:r,headers:i,query:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!Z.ok)return[Z,{status:"invalid"}];let p=Z.value,W=await t._do(p,{context:b,errorCodes:["422","4XX","5XX"],retryConfig:b.retryConfig,retryCodes:b.retryCodes});if(!W.ok)return[W,{status:"request-error",request:p}];let h=W.value,N={HttpMeta:{Response:h,Request:p}},[V]=await V$.match(V$.json(200,jyn.ListDocumentOut$inboundSchema),V$.jsonErr(422,Uyn.HTTPValidationError$inboundSchema),V$.fail("4XX"),V$.fail("5XX"))(h,p,{extraFields:N});return V.ok?[V,{status:"complete",request:p,response:h}]:[V,{status:"complete",request:p,response:h}]}});var loI=Y(py=>{"use strict";o();var Syn=py&&py.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Tyn=py&&py.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),LVe=py&&py.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n$yn.LibrariesDocumentsReprocessV1Request$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={document_id:(0,toI.encodeSimple)("document_id",n.document_id,{explode:!1,charEncoding:"percent"}),library_id:(0,toI.encodeSimple)("library_id",n.library_id,{explode:!1,charEncoding:"percent"})},r=(0,qyn.pathToFunc)("/v1/libraries/{library_id}/documents/{document_id}/reprocess")(c),s=new Headers((0,Kyn.compactMap)({Accept:"application/json"})),i=await(0,IoI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,IoI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"libraries_documents_reprocess_v1",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"POST",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await Y$.match(Y$.nil(204,_yn.void()),Y$.jsonErr(422,Pyn.HTTPValidationError$inboundSchema),Y$.fail("4XX"),Y$.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var coI=Y(hy=>{"use strict";o();var lwn=hy&&hy.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),nwn=hy&&hy.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),kVe=hy&&hy.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;niwn.LibrariesDocumentsGetStatusV1Request$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={document_id:(0,noI.encodeSimple)("document_id",n.document_id,{explode:!1,charEncoding:"percent"}),library_id:(0,noI.encodeSimple)("library_id",n.library_id,{explode:!1,charEncoding:"percent"})},r=(0,rwn.pathToFunc)("/v1/libraries/{library_id}/documents/{document_id}/status")(c),s=new Headers((0,awn.compactMap)({Accept:"application/json"})),i=await(0,aoI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,aoI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"libraries_documents_get_status_v1",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"GET",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await R$.match(R$.json(200,swn.ProcessingStatusOut$inboundSchema),R$.jsonErr(422,own.HTTPValidationError$inboundSchema),R$.fail("4XX"),R$.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var ooI=Y(Wy=>{"use strict";o();var bwn=Wy&&Wy.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),mwn=Wy&&Wy.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),xVe=Wy&&Wy.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nVwn.LibrariesDocumentsGetTextContentV1Request$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={document_id:(0,roI.encodeSimple)("document_id",n.document_id,{explode:!1,charEncoding:"percent"}),library_id:(0,roI.encodeSimple)("library_id",n.library_id,{explode:!1,charEncoding:"percent"})},r=(0,hwn.pathToFunc)("/v1/libraries/{library_id}/documents/{document_id}/text_content")(c),s=new Headers((0,Zwn.compactMap)({Accept:"application/json"})),i=await(0,soI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,soI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"libraries_documents_get_text_content_v1",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"GET",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await A$.match(A$.json(200,Wwn.DocumentTextContent$inboundSchema),A$.jsonErr(422,Nwn.HTTPValidationError$inboundSchema),A$.fail("4XX"),A$.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var GoI=Y(Ny=>{"use strict";o();var Fwn=Ny&&Ny.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Xwn=Ny&&Ny.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),jVe=Ny&&Ny.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nQwn.LibrariesDocumentsUpdateV1Request$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,Iqe.encodeJSON)("body",n.DocumentUpdateIn,{explode:!0}),c={document_id:(0,Iqe.encodeSimple)("document_id",n.document_id,{explode:!1,charEncoding:"percent"}),library_id:(0,Iqe.encodeSimple)("library_id",n.library_id,{explode:!1,charEncoding:"percent"})},r=(0,ywn.pathToFunc)("/v1/libraries/{library_id}/documents/{document_id}")(c),s=new Headers((0,gwn.compactMap)({"Content-Type":"application/json",Accept:"application/json"})),i=await(0,ioI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,ioI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"libraries_documents_update_v1",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"PUT",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await F$.match(F$.json(200,wwn.DocumentOut$inboundSchema),F$.jsonErr(422,Hwn.HTTPValidationError$inboundSchema),F$.fail("4XX"),F$.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var uoI=Y(Vy=>{"use strict";o();var Cwn=Vy&&Vy.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Lwn=Vy&&Vy.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),OVe=Vy&&Vy.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nzwn.LibrariesDocumentsUploadV1Request$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=new FormData;if((0,Mwn.isBlobLike)(n.RequestBody.file))(0,UVe.appendForm)(a,"file",n.RequestBody.file);else if((0,Swn.isReadableStream)(n.RequestBody.file.content)){let V=await(0,lqe.readableStreamToArrayBuffer)(n.RequestBody.file.content),R=(0,lqe.getContentTypeFromFileName)(n.RequestBody.file.fileName)||"application/octet-stream",F=new Blob([V],{type:R});(0,UVe.appendForm)(a,"file",F,n.RequestBody.file.fileName)}else{let V=(0,lqe.getContentTypeFromFileName)(n.RequestBody.file.fileName)||"application/octet-stream";(0,UVe.appendForm)(a,"file",new Blob([n.RequestBody.file.content],{type:V}),n.RequestBody.file.fileName)}let c={library_id:(0,UVe.encodeSimple)("library_id",n.library_id,{explode:!1,charEncoding:"percent"})},r=(0,jwn.pathToFunc)("/v1/libraries/{library_id}/documents")(c),s=new Headers((0,kwn.compactMap)({Accept:"application/json"})),i=await(0,doI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,doI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"libraries_documents_upload_v1",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"POST",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await X$.match(X$.json([200,201],Uwn.DocumentOut$inboundSchema),X$.jsonErr(422,Own.HTTPValidationError$inboundSchema),X$.fail("4XX"),X$.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var boI=Y(zVe=>{"use strict";o();Object.defineProperty(zVe,"__esModule",{value:!0});zVe.Documents=void 0;var Kwn=OsI(),Dwn=MsI(),qwn=_sI(),Pwn=qsI(),$wn=eoI(),eHn=loI(),tHn=coI(),IHn=ooI(),lHn=GoI(),nHn=uoI(),aHn=En(),x2=da(),nqe=class extends aHn.ClientSDK{async list(e,I){return(0,x2.unwrapAsync)((0,$wn.betaLibrariesDocumentsList)(this,e,I))}async upload(e,I){return(0,x2.unwrapAsync)((0,nHn.betaLibrariesDocumentsUpload)(this,e,I))}async get(e,I){return(0,x2.unwrapAsync)((0,qwn.betaLibrariesDocumentsGet)(this,e,I))}async update(e,I){return(0,x2.unwrapAsync)((0,lHn.betaLibrariesDocumentsUpdate)(this,e,I))}async delete(e,I){return(0,x2.unwrapAsync)((0,Kwn.betaLibrariesDocumentsDelete)(this,e,I))}async textContent(e,I){return(0,x2.unwrapAsync)((0,IHn.betaLibrariesDocumentsTextContent)(this,e,I))}async status(e,I){return(0,x2.unwrapAsync)((0,tHn.betaLibrariesDocumentsStatus)(this,e,I))}async getSignedUrl(e,I){return(0,x2.unwrapAsync)((0,Pwn.betaLibrariesDocumentsGetSignedUrl)(this,e,I))}async extractedTextSignedUrl(e,I){return(0,x2.unwrapAsync)((0,Dwn.betaLibrariesDocumentsExtractedTextSignedUrl)(this,e,I))}async reprocess(e,I){return(0,x2.unwrapAsync)((0,eHn.betaLibrariesDocumentsReprocess)(this,e,I))}};zVe.Documents=nqe});var moI=Y(BVe=>{"use strict";o();Object.defineProperty(BVe,"__esModule",{value:!0});BVe.Libraries=void 0;var cHn=NsI(),rHn=YsI(),sHn=AsI(),oHn=gsI(),iHn=wsI(),GHn=En(),g$=da(),dHn=xsI(),uHn=boI(),aqe=class extends GHn.ClientSDK{get documents(){return this._documents??(this._documents=new uHn.Documents(this._options))}get accesses(){return this._accesses??(this._accesses=new dHn.Accesses(this._options))}async list(e){return(0,g$.unwrapAsync)((0,oHn.betaLibrariesList)(this,e))}async create(e,I){return(0,g$.unwrapAsync)((0,cHn.betaLibrariesCreate)(this,e,I))}async get(e,I){return(0,g$.unwrapAsync)((0,sHn.betaLibrariesGet)(this,e,I))}async delete(e,I){return(0,g$.unwrapAsync)((0,rHn.betaLibrariesDelete)(this,e,I))}async update(e,I){return(0,g$.unwrapAsync)((0,iHn.betaLibrariesUpdate)(this,e,I))}};BVe.Libraries=aqe});var hoI=Y(Yy=>{"use strict";o();var bHn=Yy&&Yy.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),mHn=Yy&&Yy.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),cqe=Yy&&Yy.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;npoI.AgentCreationRequest$outboundSchema.parse(N),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,ZHn.encodeJSON)("body",n,{explode:!0}),c=(0,WHn.pathToFunc)("/v1/agents")(),r=new Headers((0,pHn.compactMap)({"Content-Type":"application/json",Accept:"application/json"})),s=await(0,ZoI.extractSecurity)(t._options.apiKey),i=s==null?{}:{apiKey:s},G=(0,ZoI.resolveGlobalSecurity)(i),d={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"agents_api_v1_agents_create",oAuth2Scopes:null,resolvedSecurity:G,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},u=t._createRequest(d,{security:G,method:"POST",baseURL:I?.serverURL,path:c,headers:r,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!u.ok)return[u,{status:"invalid"}];let b=u.value,Z=await t._do(b,{context:d,errorCodes:["422","4XX","5XX"],retryConfig:d.retryConfig,retryCodes:d.retryCodes});if(!Z.ok)return[Z,{status:"request-error",request:b}];let p=Z.value,W={HttpMeta:{Response:p,Request:b}},[h]=await v$.match(v$.json(200,poI.Agent$inboundSchema),v$.jsonErr(422,NHn.HTTPValidationError$inboundSchema),v$.fail("4XX"),v$.fail("5XX"))(p,b,{extraFields:W});return h.ok?[h,{status:"complete",request:b,response:p}]:[h,{status:"complete",request:b,response:p}]}});var VoI=Y(Ry=>{"use strict";o();var AHn=Ry&&Ry.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),FHn=Ry&&Ry.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),MVe=Ry&&Ry.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nHHn.AgentsApiV1AgentsCreateOrUpdateAliasRequest$outboundSchema.parse(R),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={agent_id:(0,WoI.encodeSimple)("agent_id",n.agent_id,{explode:!1,charEncoding:"percent"})},r=(0,vHn.pathToFunc)("/v1/agents/{agent_id}/aliases")(c),s=(0,WoI.encodeFormQuery)({alias:n.alias,version:n.version}),i=new Headers((0,XHn.compactMap)({Accept:"application/json"})),G=await(0,NoI.extractSecurity)(t._options.apiKey),d=G==null?{}:{apiKey:G},u=(0,NoI.resolveGlobalSecurity)(d),b={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"agents_api_v1_agents_create_or_update_alias",oAuth2Scopes:null,resolvedSecurity:u,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},Z=t._createRequest(b,{security:u,method:"PUT",baseURL:I?.serverURL,path:r,headers:i,query:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!Z.ok)return[Z,{status:"invalid"}];let p=Z.value,W=await t._do(p,{context:b,errorCodes:["422","4XX","5XX"],retryConfig:b.retryConfig,retryCodes:b.retryCodes});if(!W.ok)return[W,{status:"request-error",request:p}];let h=W.value,N={HttpMeta:{Response:h,Request:p}},[V]=await y$.match(y$.json(200,yHn.AgentAliasResponse$inboundSchema),y$.jsonErr(422,wHn.HTTPValidationError$inboundSchema),y$.fail("4XX"),y$.fail("5XX"))(h,p,{extraFields:N});return V.ok?[V,{status:"complete",request:p,response:h}]:[V,{status:"complete",request:p,response:h}]}});var RoI=Y(Ay=>{"use strict";o();var JHn=Ay&&Ay.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),CHn=Ay&&Ay.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),SVe=Ay&&Ay.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nzHn.AgentsApiV1AgentsDeleteRequest$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={agent_id:(0,kHn.encodeSimple)("agent_id",n.agent_id,{explode:!1,charEncoding:"percent"})},r=(0,UHn.pathToFunc)("/v1/agents/{agent_id}")(c),s=new Headers((0,xHn.compactMap)({Accept:"application/json"})),i=await(0,YoI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,YoI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"agents_api_v1_agents_delete",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"DELETE",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await w$.match(w$.nil(204,LHn.void()),w$.jsonErr(422,OHn.HTTPValidationError$inboundSchema),w$.fail("4XX"),w$.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var XoI=Y(Fy=>{"use strict";o();var THn=Fy&&Fy.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),_Hn=Fy&&Fy.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),TVe=Fy&&Fy.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;neQn.AgentsApiV1AgentsDeleteAliasRequest$outboundSchema.parse(R),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={agent_id:(0,AoI.encodeSimple)("agent_id",n.agent_id,{explode:!1,charEncoding:"percent"})},r=(0,PHn.pathToFunc)("/v1/agents/{agent_id}/aliases")(c),s=(0,AoI.encodeFormQuery)({alias:n.alias}),i=new Headers((0,DHn.compactMap)({Accept:"application/json"})),G=await(0,FoI.extractSecurity)(t._options.apiKey),d=G==null?{}:{apiKey:G},u=(0,FoI.resolveGlobalSecurity)(d),b={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"agents_api_v1_agents_delete_alias",oAuth2Scopes:null,resolvedSecurity:u,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},Z=t._createRequest(b,{security:u,method:"DELETE",baseURL:I?.serverURL,path:r,headers:i,query:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!Z.ok)return[Z,{status:"invalid"}];let p=Z.value,W=await t._do(p,{context:b,errorCodes:["422","4XX","5XX"],retryConfig:b.retryConfig,retryCodes:b.retryCodes});if(!W.ok)return[W,{status:"request-error",request:p}];let h=W.value,N={HttpMeta:{Response:h,Request:p}},[V]=await H$.match(H$.nil(204,KHn.void()),H$.jsonErr(422,$Hn.HTTPValidationError$inboundSchema),H$.fail("4XX"),H$.fail("5XX"))(h,p,{extraFields:N});return V.ok?[V,{status:"complete",request:p,response:h}]:[V,{status:"complete",request:p,response:h}]}});var yoI=Y(Xy=>{"use strict";o();var nQn=Xy&&Xy.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),aQn=Xy&&Xy.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),_Ve=Xy&&Xy.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nGQn.AgentsApiV1AgentsGetRequest$outboundSchema.parse(R),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={agent_id:(0,goI.encodeSimple)("agent_id",n.agent_id,{explode:!1,charEncoding:"percent"})},r=(0,sQn.pathToFunc)("/v1/agents/{agent_id}")(c),s=(0,goI.encodeFormQuery)({agent_version:n.agent_version}),i=new Headers((0,cQn.compactMap)({Accept:"application/json"})),G=await(0,voI.extractSecurity)(t._options.apiKey),d=G==null?{}:{apiKey:G},u=(0,voI.resolveGlobalSecurity)(d),b={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"agents_api_v1_agents_get",oAuth2Scopes:null,resolvedSecurity:u,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},Z=t._createRequest(b,{security:u,method:"GET",baseURL:I?.serverURL,path:r,headers:i,query:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!Z.ok)return[Z,{status:"invalid"}];let p=Z.value,W=await t._do(p,{context:b,errorCodes:["422","4XX","5XX"],retryConfig:b.retryConfig,retryCodes:b.retryCodes});if(!W.ok)return[W,{status:"request-error",request:p}];let h=W.value,N={HttpMeta:{Response:h,Request:p}},[V]=await Q$.match(Q$.json(200,oQn.Agent$inboundSchema),Q$.jsonErr(422,iQn.HTTPValidationError$inboundSchema),Q$.fail("4XX"),Q$.fail("5XX"))(h,p,{extraFields:N});return V.ok?[V,{status:"complete",request:p,response:h}]:[V,{status:"complete",request:p,response:h}]}});var QoI=Y(gy=>{"use strict";o();var mQn=gy&&gy.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),ZQn=gy&&gy.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),KVe=gy&&gy.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nYQn.AgentsApiV1AgentsGetVersionRequest$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={agent_id:(0,woI.encodeSimple)("agent_id",n.agent_id,{explode:!1,charEncoding:"percent"}),version:(0,woI.encodeSimple)("version",n.version,{explode:!1,charEncoding:"percent"})},r=(0,WQn.pathToFunc)("/v1/agents/{agent_id}/versions/{version}")(c),s=new Headers((0,pQn.compactMap)({Accept:"application/json"})),i=await(0,HoI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,HoI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"agents_api_v1_agents_get_version",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"GET",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await f$.match(f$.json(200,NQn.Agent$inboundSchema),f$.jsonErr(422,VQn.HTTPValidationError$inboundSchema),f$.fail("4XX"),f$.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var EoI=Y(vy=>{"use strict";o();var XQn=vy&&vy.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),gQn=vy&&vy.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),J$=vy&&vy.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nEQn.AgentsApiV1AgentsListRequest$outboundSchema.optional().parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c=(0,HQn.pathToFunc)("/v1/agents")(),r=(0,rqe.queryJoin)((0,rqe.encodeFormQuery)({deployment_chat:n?.deployment_chat,id:n?.id,name:n?.name,page:n?.page,page_size:n?.page_size,search:n?.search,sources:n?.sources}),(0,rqe.encodeJSONQuery)({metadata:n?.metadata},{explode:!1})),s=new Headers((0,yQn.compactMap)({Accept:"application/json"})),i=await(0,foI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,foI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"agents_api_v1_agents_list",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"GET",baseURL:I?.serverURL,path:c,headers:s,query:r,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await E$.match(E$.json(200,vQn.array(QQn.Agent$inboundSchema)),E$.jsonErr(422,fQn.HTTPValidationError$inboundSchema),E$.fail("4XX"),E$.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var CoI=Y(yy=>{"use strict";o();var kQn=yy&&yy.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),xQn=yy&&yy.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),L$=yy&&yy.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nTQn.AgentsApiV1AgentsListVersionAliasesRequest$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={agent_id:(0,UQn.encodeSimple)("agent_id",n.agent_id,{explode:!1,charEncoding:"percent"})},r=(0,BQn.pathToFunc)("/v1/agents/{agent_id}/aliases")(c),s=new Headers((0,OQn.compactMap)({Accept:"application/json"})),i=await(0,JoI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,JoI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"agents_api_v1_agents_list_version_aliases",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"GET",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await C$.match(C$.json(200,jQn.array(MQn.AgentAliasResponse$inboundSchema)),C$.jsonErr(422,SQn.HTTPValidationError$inboundSchema),C$.fail("4XX"),C$.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var xoI=Y(wy=>{"use strict";o();var qQn=wy&&wy.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),PQn=wy&&wy.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),x$=wy&&wy.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nafn.AgentsApiV1AgentsListVersionsRequest$outboundSchema.parse(R),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={agent_id:(0,LoI.encodeSimple)("agent_id",n.agent_id,{explode:!1,charEncoding:"percent"})},r=(0,Ifn.pathToFunc)("/v1/agents/{agent_id}/versions")(c),s=(0,LoI.encodeFormQuery)({page:n.page,page_size:n.page_size}),i=new Headers((0,efn.compactMap)({Accept:"application/json"})),G=await(0,koI.extractSecurity)(t._options.apiKey),d=G==null?{}:{apiKey:G},u=(0,koI.resolveGlobalSecurity)(d),b={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"agents_api_v1_agents_list_versions",oAuth2Scopes:null,resolvedSecurity:u,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},Z=t._createRequest(b,{security:u,method:"GET",baseURL:I?.serverURL,path:r,headers:i,query:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!Z.ok)return[Z,{status:"invalid"}];let p=Z.value,W=await t._do(p,{context:b,errorCodes:["422","4XX","5XX"],retryConfig:b.retryConfig,retryCodes:b.retryCodes});if(!W.ok)return[W,{status:"request-error",request:p}];let h=W.value,N={HttpMeta:{Response:h,Request:p}},[V]=await k$.match(k$.json(200,$Qn.array(lfn.Agent$inboundSchema)),k$.jsonErr(422,nfn.HTTPValidationError$inboundSchema),k$.fail("4XX"),k$.fail("5XX"))(h,p,{extraFields:N});return V.ok?[V,{status:"complete",request:p,response:h}]:[V,{status:"complete",request:p,response:h}]}});var OoI=Y(Hy=>{"use strict";o();var ofn=Hy&&Hy.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),ifn=Hy&&Hy.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),DVe=Hy&&Hy.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nZfn.AgentsApiV1AgentsUpdateRequest$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,joI.encodeJSON)("body",n.AgentUpdateRequest,{explode:!0}),c={agent_id:(0,joI.encodeSimple)("agent_id",n.agent_id,{explode:!1,charEncoding:"percent"})},r=(0,ufn.pathToFunc)("/v1/agents/{agent_id}")(c),s=new Headers((0,Gfn.compactMap)({"Content-Type":"application/json",Accept:"application/json"})),i=await(0,UoI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,UoI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"agents_api_v1_agents_update",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"PATCH",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await j$.match(j$.json(200,bfn.Agent$inboundSchema),j$.jsonErr(422,mfn.HTTPValidationError$inboundSchema),j$.fail("4XX"),j$.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var MoI=Y(Qy=>{"use strict";o();var Nfn=Qy&&Qy.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Vfn=Qy&&Qy.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),qVe=Qy&&Qy.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;ngfn.AgentsApiV1AgentsUpdateVersionRequest$outboundSchema.parse(R),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={agent_id:(0,zoI.encodeSimple)("agent_id",n.agent_id,{explode:!1,charEncoding:"percent"})},r=(0,Afn.pathToFunc)("/v1/agents/{agent_id}/version")(c),s=(0,zoI.encodeFormQuery)({version:n.version}),i=new Headers((0,Yfn.compactMap)({Accept:"application/json"})),G=await(0,BoI.extractSecurity)(t._options.apiKey),d=G==null?{}:{apiKey:G},u=(0,BoI.resolveGlobalSecurity)(d),b={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"agents_api_v1_agents_update_version",oAuth2Scopes:null,resolvedSecurity:u,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},Z=t._createRequest(b,{security:u,method:"PATCH",baseURL:I?.serverURL,path:r,headers:i,query:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!Z.ok)return[Z,{status:"invalid"}];let p=Z.value,W=await t._do(p,{context:b,errorCodes:["422","4XX","5XX"],retryConfig:b.retryConfig,retryCodes:b.retryCodes});if(!W.ok)return[W,{status:"request-error",request:p}];let h=W.value,N={HttpMeta:{Response:h,Request:p}},[V]=await U$.match(U$.json(200,Ffn.Agent$inboundSchema),U$.jsonErr(422,Xfn.HTTPValidationError$inboundSchema),U$.fail("4XX"),U$.fail("5XX"))(h,p,{extraFields:N});return V.ok?[V,{status:"complete",request:p,response:h}]:[V,{status:"complete",request:p,response:h}]}});var SoI=Y(PVe=>{"use strict";o();Object.defineProperty(PVe,"__esModule",{value:!0});PVe.MistralAgents=void 0;var Hfn=hoI(),Qfn=VoI(),ffn=RoI(),Efn=XoI(),Jfn=yoI(),Cfn=QoI(),Lfn=EoI(),kfn=CoI(),xfn=xoI(),jfn=OoI(),Ufn=MoI(),Ofn=En(),bA=da(),sqe=class extends Ofn.ClientSDK{async create(e,I){return(0,bA.unwrapAsync)((0,Hfn.betaAgentsCreate)(this,e,I))}async list(e,I){return(0,bA.unwrapAsync)((0,Lfn.betaAgentsList)(this,e,I))}async get(e,I){return(0,bA.unwrapAsync)((0,Jfn.betaAgentsGet)(this,e,I))}async update(e,I){return(0,bA.unwrapAsync)((0,jfn.betaAgentsUpdate)(this,e,I))}async delete(e,I){return(0,bA.unwrapAsync)((0,ffn.betaAgentsDelete)(this,e,I))}async updateVersion(e,I){return(0,bA.unwrapAsync)((0,Ufn.betaAgentsUpdateVersion)(this,e,I))}async listVersions(e,I){return(0,bA.unwrapAsync)((0,xfn.betaAgentsListVersions)(this,e,I))}async getVersion(e,I){return(0,bA.unwrapAsync)((0,Cfn.betaAgentsGetVersion)(this,e,I))}async createVersionAlias(e,I){return(0,bA.unwrapAsync)((0,Qfn.betaAgentsCreateVersionAlias)(this,e,I))}async listVersionAliases(e,I){return(0,bA.unwrapAsync)((0,kfn.betaAgentsListVersionAliases)(this,e,I))}async deleteVersionAlias(e,I){return(0,bA.unwrapAsync)((0,Efn.betaAgentsDeleteVersionAlias)(this,e,I))}};PVe.MistralAgents=sqe});var KoI=Y(fy=>{"use strict";o();var zfn=fy&&fy.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Bfn=fy&&fy.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),oqe=fy&&fy.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n_oI.PostCampaignInSchema$outboundSchema.parse(N),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,Mfn.encodeJSON)("body",n,{explode:!0}),c=(0,_fn.pathToFunc)("/v1/observability/campaigns")(),r=new Headers((0,Sfn.compactMap)({"Content-Type":"application/json",Accept:"application/json"})),s=await(0,ToI.extractSecurity)(t._options.apiKey),i=s==null?{}:{apiKey:s},G=(0,ToI.resolveGlobalSecurity)(i),d={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"create_campaign_v1_observability_campaigns_post",oAuth2Scopes:null,resolvedSecurity:G,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},u=t._createRequest(d,{security:G,method:"POST",baseURL:I?.serverURL,path:c,headers:r,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!u.ok)return[u,{status:"invalid"}];let b=u.value,Z=await t._do(b,{context:d,errorCodes:["400","404","408","409","422","4XX","5XX"],retryConfig:d.retryConfig,retryCodes:d.retryCodes});if(!Z.ok)return[Z,{status:"request-error",request:b}];let p=Z.value,W={HttpMeta:{Response:p,Request:b}},[h]=await O$.match(O$.json(201,_oI.CampaignPreview$inboundSchema),O$.jsonErr([400,404,408,409,422],Kfn.ObservabilityError$inboundSchema),O$.fail("4XX"),O$.fail("5XX"))(p,b,{extraFields:W});return h.ok?[h,{status:"complete",request:b,response:p}]:[h,{status:"complete",request:b,response:p}]}});var qoI=Y(Ey=>{"use strict";o();var $fn=Ey&&Ey.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),eEn=Ey&&Ey.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),$Ve=Ey&&Ey.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nrEn.DeleteCampaignV1ObservabilityCampaignsCampaignIdDeleteRequest$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={campaign_id:(0,IEn.encodeSimple)("campaign_id",n.campaign_id,{explode:!1,charEncoding:"percent"})},r=(0,aEn.pathToFunc)("/v1/observability/campaigns/{campaign_id}")(c),s=new Headers((0,lEn.compactMap)({Accept:"application/json"})),i=await(0,DoI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,DoI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"delete_campaign_v1_observability_campaigns__campaign_id__delete",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"DELETE",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["400","404","408","409","422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await z$.match(z$.nil(204,tEn.void()),z$.jsonErr([400,404,408,409,422],cEn.ObservabilityError$inboundSchema),z$.fail("4XX"),z$.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var $oI=Y(Jy=>{"use strict";o();var GEn=Jy&&Jy.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),dEn=Jy&&Jy.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),eYe=Jy&&Jy.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nWEn.GetCampaignByIdV1ObservabilityCampaignsCampaignIdGetRequest$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={campaign_id:(0,uEn.encodeSimple)("campaign_id",n.campaign_id,{explode:!1,charEncoding:"percent"})},r=(0,ZEn.pathToFunc)("/v1/observability/campaigns/{campaign_id}")(c),s=new Headers((0,bEn.compactMap)({Accept:"application/json"})),i=await(0,PoI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,PoI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"get_campaign_by_id_v1_observability_campaigns__campaign_id__get",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"GET",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["400","404","408","409","422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await B$.match(B$.json(200,pEn.CampaignPreview$inboundSchema),B$.jsonErr([400,404,408,409,422],hEn.ObservabilityError$inboundSchema),B$.fail("4XX"),B$.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var tiI=Y(Cy=>{"use strict";o();var REn=Cy&&Cy.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),AEn=Cy&&Cy.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),tYe=Cy&&Cy.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nHEn.GetCampaignStatusByIdV1ObservabilityCampaignsCampaignIdStatusGetRequest$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={campaign_id:(0,FEn.encodeSimple)("campaign_id",n.campaign_id,{explode:!1,charEncoding:"percent"})},r=(0,vEn.pathToFunc)("/v1/observability/campaigns/{campaign_id}/status")(c),s=new Headers((0,XEn.compactMap)({Accept:"application/json"})),i=await(0,eiI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,eiI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"get_campaign_status_by_id_v1_observability_campaigns__campaign_id__status_get",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"GET",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["400","404","408","409","422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await M$.match(M$.json(200,yEn.CampaignStatus$inboundSchema),M$.jsonErr([400,404,408,409,422],wEn.ObservabilityError$inboundSchema),M$.fail("4XX"),M$.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var liI=Y(Ly=>{"use strict";o();var JEn=Ly&&Ly.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),CEn=Ly&&Ly.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),IYe=Ly&&Ly.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nzEn.GetCampaignsV1ObservabilityCampaignsGetRequest$outboundSchema.optional().parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c=(0,jEn.pathToFunc)("/v1/observability/campaigns")(),r=(0,LEn.encodeFormQuery)({page:n?.page,page_size:n?.page_size,q:n?.q}),s=new Headers((0,kEn.compactMap)({Accept:"application/json"})),i=await(0,IiI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,IiI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"get_campaigns_v1_observability_campaigns_get",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"GET",baseURL:I?.serverURL,path:c,headers:s,query:r,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["400","404","408","409","422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await S$.match(S$.json(200,UEn.CampaignPreviews$inboundSchema),S$.jsonErr([400,404,408,409,422],OEn.ObservabilityError$inboundSchema),S$.fail("4XX"),S$.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var ciI=Y(ky=>{"use strict";o();var TEn=ky&&ky.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),_En=ky&&ky.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),lYe=ky&&ky.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;ne1n.GetCampaignSelectedEventsV1ObservabilityCampaignsCampaignIdSelectedEventsGetRequest$outboundSchema.parse(R),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={campaign_id:(0,niI.encodeSimple)("campaign_id",n.campaign_id,{explode:!1,charEncoding:"percent"})},r=(0,qEn.pathToFunc)("/v1/observability/campaigns/{campaign_id}/selected-events")(c),s=(0,niI.encodeFormQuery)({page:n.page,page_size:n.page_size}),i=new Headers((0,KEn.compactMap)({Accept:"application/json"})),G=await(0,aiI.extractSecurity)(t._options.apiKey),d=G==null?{}:{apiKey:G},u=(0,aiI.resolveGlobalSecurity)(d),b={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"get_campaign_selected_events_v1_observability_campaigns__campaign_id__selected_events_get",oAuth2Scopes:null,resolvedSecurity:u,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},Z=t._createRequest(b,{security:u,method:"GET",baseURL:I?.serverURL,path:r,headers:i,query:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!Z.ok)return[Z,{status:"invalid"}];let p=Z.value,W=await t._do(p,{context:b,errorCodes:["400","404","408","409","422","4XX","5XX"],retryConfig:b.retryConfig,retryCodes:b.retryCodes});if(!W.ok)return[W,{status:"request-error",request:p}];let h=W.value,N={HttpMeta:{Response:h,Request:p}},[V]=await T$.match(T$.json(200,PEn.CampaignSelectedEvents$inboundSchema),T$.jsonErr([400,404,408,409,422],$En.ObservabilityError$inboundSchema),T$.fail("4XX"),T$.fail("5XX"))(h,p,{extraFields:N});return V.ok?[V,{status:"complete",request:p,response:h}]:[V,{status:"complete",request:p,response:h}]}});var riI=Y(nYe=>{"use strict";o();Object.defineProperty(nYe,"__esModule",{value:!0});nYe.Campaigns=void 0;var n1n=KoI(),a1n=qoI(),c1n=$oI(),r1n=tiI(),s1n=liI(),o1n=ciI(),i1n=En(),IM=da(),iqe=class extends i1n.ClientSDK{async create(e,I){return(0,IM.unwrapAsync)((0,n1n.betaObservabilityCampaignsCreate)(this,e,I))}async list(e,I){return(0,IM.unwrapAsync)((0,s1n.betaObservabilityCampaignsList)(this,e,I))}async fetch(e,I){return(0,IM.unwrapAsync)((0,c1n.betaObservabilityCampaignsFetch)(this,e,I))}async delete(e,I){return(0,IM.unwrapAsync)((0,a1n.betaObservabilityCampaignsDelete)(this,e,I))}async fetchStatus(e,I){return(0,IM.unwrapAsync)((0,r1n.betaObservabilityCampaignsFetchStatus)(this,e,I))}async listEvents(e,I){return(0,IM.unwrapAsync)((0,o1n.betaObservabilityCampaignsListEvents)(this,e,I))}};nYe.Campaigns=iqe});var oiI=Y(xy=>{"use strict";o();var G1n=xy&&xy.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),d1n=xy&&xy.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),aYe=xy&&xy.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nW1n.GetChatCompletionEventV1ObservabilityChatCompletionEventsEventIdGetRequest$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={event_id:(0,u1n.encodeSimple)("event_id",n.event_id,{explode:!1,charEncoding:"percent"})},r=(0,Z1n.pathToFunc)("/v1/observability/chat-completion-events/{event_id}")(c),s=new Headers((0,b1n.compactMap)({Accept:"application/json"})),i=await(0,siI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,siI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"get_chat_completion_event_v1_observability_chat_completion_events__event_id__get",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"GET",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["400","404","408","409","422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await _$.match(_$.json(200,p1n.ChatCompletionEvent$inboundSchema),_$.jsonErr([400,404,408,409,422],h1n.ObservabilityError$inboundSchema),_$.fail("4XX"),_$.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var GiI=Y(jy=>{"use strict";o();var R1n=jy&&jy.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),A1n=jy&&jy.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),cYe=jy&&jy.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nH1n.GetSimilarChatCompletionEventsV1ObservabilityChatCompletionEventsEventIdSimilarEventsGetRequest$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={event_id:(0,F1n.encodeSimple)("event_id",n.event_id,{explode:!1,charEncoding:"percent"})},r=(0,v1n.pathToFunc)("/v1/observability/chat-completion-events/{event_id}/similar-events")(c),s=new Headers((0,X1n.compactMap)({Accept:"application/json"})),i=await(0,iiI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,iiI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"get_similar_chat_completion_events_v1_observability_chat_completion_events__event_id__similar_events_get",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"GET",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["400","404","408","409","422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await K$.match(K$.json(200,y1n.ChatCompletionEvents$inboundSchema),K$.jsonErr([400,404,408,409,422],w1n.ObservabilityError$inboundSchema),K$.fail("4XX"),K$.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var biI=Y(Uy=>{"use strict";o();var J1n=Uy&&Uy.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),C1n=Uy&&Uy.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),rYe=Uy&&Uy.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nO1n.JudgeChatCompletionEventV1ObservabilityChatCompletionEventsEventIdLiveJudgingPostRequest$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,diI.encodeJSON)("body",n.PostChatCompletionEventJudgingInSchema,{explode:!0}),c={event_id:(0,diI.encodeSimple)("event_id",n.event_id,{explode:!1,charEncoding:"percent"})},r=(0,x1n.pathToFunc)("/v1/observability/chat-completion-events/{event_id}/live-judging")(c),s=new Headers((0,L1n.compactMap)({"Content-Type":"application/json",Accept:"application/json"})),i=await(0,uiI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,uiI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"judge_chat_completion_event_v1_observability_chat_completion_events__event_id__live_judging_post",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"POST",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["400","404","408","409","422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await D$.match(D$.json(200,j1n.JudgeOutput$inboundSchema),D$.jsonErr([400,404,408,409,422],U1n.ObservabilityError$inboundSchema),D$.fail("4XX"),D$.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var piI=Y(Oy=>{"use strict";o();var S1n=Oy&&Oy.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),T1n=Oy&&Oy.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),sYe=Oy&&Oy.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n$1n.GetChatCompletionEventsV1ObservabilityChatCompletionEventsSearchPostRequest$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,miI.encodeJSON)("body",n.GetChatCompletionEventsInSchema,{explode:!0}),c=(0,D1n.pathToFunc)("/v1/observability/chat-completion-events/search")(),r=(0,miI.encodeFormQuery)({cursor:n.cursor,page_size:n.page_size}),s=new Headers((0,_1n.compactMap)({"Content-Type":"application/json",Accept:"application/json"})),i=await(0,ZiI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,ZiI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"get_chat_completion_events_v1_observability_chat_completion_events_search_post",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"POST",baseURL:I?.serverURL,path:c,headers:s,query:r,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["400","404","408","409","422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await q$.match(q$.json(200,q1n.ChatCompletionEvents$inboundSchema),q$.jsonErr([400,404,408,409,422],P1n.ObservabilityError$inboundSchema),q$.fail("4XX"),q$.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var NiI=Y(zy=>{"use strict";o();var lJn=zy&&zy.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),nJn=zy&&zy.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Gqe=zy&&zy.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nWiI.GetChatCompletionEventIdsInSchema$outboundSchema.parse(N),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,aJn.encodeJSON)("body",n,{explode:!0}),c=(0,sJn.pathToFunc)("/v1/observability/chat-completion-events/search-ids")(),r=new Headers((0,cJn.compactMap)({"Content-Type":"application/json",Accept:"application/json"})),s=await(0,hiI.extractSecurity)(t._options.apiKey),i=s==null?{}:{apiKey:s},G=(0,hiI.resolveGlobalSecurity)(i),d={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"get_chat_completion_event_ids_v1_observability_chat_completion_events_search_ids_post",oAuth2Scopes:null,resolvedSecurity:G,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},u=t._createRequest(d,{security:G,method:"POST",baseURL:I?.serverURL,path:c,headers:r,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!u.ok)return[u,{status:"invalid"}];let b=u.value,Z=await t._do(b,{context:d,errorCodes:["400","404","408","409","422","4XX","5XX"],retryConfig:d.retryConfig,retryCodes:d.retryCodes});if(!Z.ok)return[Z,{status:"request-error",request:b}];let p=Z.value,W={HttpMeta:{Response:p,Request:b}},[h]=await P$.match(P$.json(200,WiI.ChatCompletionEventIds$inboundSchema),P$.jsonErr([400,404,408,409,422],oJn.ObservabilityError$inboundSchema),P$.fail("4XX"),P$.fail("5XX"))(p,b,{extraFields:W});return h.ok?[h,{status:"complete",request:b,response:p}]:[h,{status:"complete",request:b,response:p}]}});var RiI=Y(By=>{"use strict";o();var uJn=By&&By.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),bJn=By&&By.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),oYe=By&&By.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nNJn.GetChatCompletionFieldOptionsCountsV1ObservabilityChatCompletionFieldsFieldNameOptionsCountsPostRequest$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,ViI.encodeJSON)("body",n.FieldOptionCountsInSchema,{explode:!0}),c={field_name:(0,ViI.encodeSimple)("field_name",n.field_name,{explode:!1,charEncoding:"percent"})},r=(0,pJn.pathToFunc)("/v1/observability/chat-completion-fields/{field_name}/options-counts")(c),s=new Headers((0,mJn.compactMap)({"Content-Type":"application/json",Accept:"application/json"})),i=await(0,YiI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,YiI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"get_chat_completion_field_options_counts_v1_observability_chat_completion_fields__field_name__options_counts_post",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"POST",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["400","404","408","409","422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await $$.match($$.json(200,hJn.FieldOptionCounts$inboundSchema),$$.jsonErr([400,404,408,409,422],WJn.ObservabilityError$inboundSchema),$$.fail("4XX"),$$.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var XiI=Y(My=>{"use strict";o();var AJn=My&&My.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),FJn=My&&My.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),iYe=My&&My.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nHJn.GetChatCompletionFieldOptionsV1ObservabilityChatCompletionFieldsFieldNameOptionsGetRequest$outboundSchema.parse(R),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={field_name:(0,AiI.encodeSimple)("field_name",n.field_name,{explode:!1,charEncoding:"percent"})},r=(0,vJn.pathToFunc)("/v1/observability/chat-completion-fields/{field_name}/options")(c),s=(0,AiI.encodeFormQuery)({operator:n.operator}),i=new Headers((0,XJn.compactMap)({Accept:"application/json"})),G=await(0,FiI.extractSecurity)(t._options.apiKey),d=G==null?{}:{apiKey:G},u=(0,FiI.resolveGlobalSecurity)(d),b={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"get_chat_completion_field_options_v1_observability_chat_completion_fields__field_name__options_get",oAuth2Scopes:null,resolvedSecurity:u,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},Z=t._createRequest(b,{security:u,method:"GET",baseURL:I?.serverURL,path:r,headers:i,query:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!Z.ok)return[Z,{status:"invalid"}];let p=Z.value,W=await t._do(p,{context:b,errorCodes:["400","404","408","409","422","4XX","5XX"],retryConfig:b.retryConfig,retryCodes:b.retryCodes});if(!W.ok)return[W,{status:"request-error",request:p}];let h=W.value,N={HttpMeta:{Response:h,Request:p}},[V]=await eee.match(eee.json(200,yJn.ChatCompletionFieldOptions$inboundSchema),eee.jsonErr([400,404,408,409,422],wJn.ObservabilityError$inboundSchema),eee.fail("4XX"),eee.fail("5XX"))(h,p,{extraFields:N});return V.ok?[V,{status:"complete",request:p,response:h}]:[V,{status:"complete",request:p,response:h}]}});var viI=Y(Sy=>{"use strict";o();var JJn=Sy&&Sy.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),CJn=Sy&&Sy.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),dqe=Sy&&Sy.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{"use strict";o();Object.defineProperty(GYe,"__esModule",{value:!0});GYe.Fields=void 0;var BJn=RiI(),MJn=XiI(),SJn=viI(),TJn=En(),uqe=da(),bqe=class extends TJn.ClientSDK{async list(e){return(0,uqe.unwrapAsync)((0,SJn.betaObservabilityChatCompletionEventsFieldsList)(this,e))}async fetchOptions(e,I){return(0,uqe.unwrapAsync)((0,MJn.betaObservabilityChatCompletionEventsFieldsFetchOptions)(this,e,I))}async fetchOptionCounts(e,I){return(0,uqe.unwrapAsync)((0,BJn.betaObservabilityChatCompletionEventsFieldsFetchOptionCounts)(this,e,I))}};GYe.Fields=bqe});var wiI=Y(dYe=>{"use strict";o();Object.defineProperty(dYe,"__esModule",{value:!0});dYe.ChatCompletionEvents=void 0;var _Jn=oiI(),KJn=GiI(),DJn=biI(),qJn=piI(),PJn=NiI(),$Jn=En(),Iee=da(),eCn=yiI(),mqe=class extends $Jn.ClientSDK{get fields(){return this._fields??(this._fields=new eCn.Fields(this._options))}async search(e,I){return(0,Iee.unwrapAsync)((0,qJn.betaObservabilityChatCompletionEventsSearch)(this,e,I))}async searchIds(e,I){return(0,Iee.unwrapAsync)((0,PJn.betaObservabilityChatCompletionEventsSearchIds)(this,e,I))}async fetch(e,I){return(0,Iee.unwrapAsync)((0,_Jn.betaObservabilityChatCompletionEventsFetch)(this,e,I))}async fetchSimilarEvents(e,I){return(0,Iee.unwrapAsync)((0,KJn.betaObservabilityChatCompletionEventsFetchSimilarEvents)(this,e,I))}async judge(e,I){return(0,Iee.unwrapAsync)((0,DJn.betaObservabilityChatCompletionEventsJudge)(this,e,I))}};dYe.ChatCompletionEvents=mqe});var fiI=Y(Ty=>{"use strict";o();var tCn=Ty&&Ty.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),ICn=Ty&&Ty.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Zqe=Ty&&Ty.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nQiI.PostDatasetInSchema$outboundSchema.parse(N),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,lCn.encodeJSON)("body",n,{explode:!0}),c=(0,cCn.pathToFunc)("/v1/observability/datasets")(),r=new Headers((0,nCn.compactMap)({"Content-Type":"application/json",Accept:"application/json"})),s=await(0,HiI.extractSecurity)(t._options.apiKey),i=s==null?{}:{apiKey:s},G=(0,HiI.resolveGlobalSecurity)(i),d={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"create_dataset_v1_observability_datasets_post",oAuth2Scopes:null,resolvedSecurity:G,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},u=t._createRequest(d,{security:G,method:"POST",baseURL:I?.serverURL,path:c,headers:r,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!u.ok)return[u,{status:"invalid"}];let b=u.value,Z=await t._do(b,{context:d,errorCodes:["400","404","408","409","422","4XX","5XX"],retryConfig:d.retryConfig,retryCodes:d.retryCodes});if(!Z.ok)return[Z,{status:"request-error",request:b}];let p=Z.value,W={HttpMeta:{Response:p,Request:b}},[h]=await lee.match(lee.json(201,QiI.Dataset$inboundSchema),lee.jsonErr([400,404,408,409,422],rCn.ObservabilityError$inboundSchema),lee.fail("4XX"),lee.fail("5XX"))(p,b,{extraFields:W});return h.ok?[h,{status:"complete",request:b,response:p}]:[h,{status:"complete",request:b,response:p}]}});var CiI=Y(_y=>{"use strict";o();var GCn=_y&&_y.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),dCn=_y&&_y.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),uYe=_y&&_y.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nhCn.CreateDatasetRecordV1ObservabilityDatasetsDatasetIdRecordsPostRequest$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,EiI.encodeJSON)("body",n.PostDatasetRecordInSchema,{explode:!0}),c={dataset_id:(0,EiI.encodeSimple)("dataset_id",n.dataset_id,{explode:!1,charEncoding:"percent"})},r=(0,mCn.pathToFunc)("/v1/observability/datasets/{dataset_id}/records")(c),s=new Headers((0,uCn.compactMap)({"Content-Type":"application/json",Accept:"application/json"})),i=await(0,JiI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,JiI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"create_dataset_record_v1_observability_datasets__dataset_id__records_post",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"POST",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["400","404","408","409","422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await nee.match(nee.json(201,ZCn.DatasetRecord$inboundSchema),nee.jsonErr([400,404,408,409,422],pCn.ObservabilityError$inboundSchema),nee.fail("4XX"),nee.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var kiI=Y(Ky=>{"use strict";o();var YCn=Ky&&Ky.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),RCn=Ky&&Ky.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),bYe=Ky&&Ky.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nwCn.DeleteDatasetV1ObservabilityDatasetsDatasetIdDeleteRequest$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={dataset_id:(0,FCn.encodeSimple)("dataset_id",n.dataset_id,{explode:!1,charEncoding:"percent"})},r=(0,vCn.pathToFunc)("/v1/observability/datasets/{dataset_id}")(c),s=new Headers((0,XCn.compactMap)({Accept:"application/json"})),i=await(0,LiI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,LiI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"delete_dataset_v1_observability_datasets__dataset_id__delete",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"DELETE",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["400","404","408","409","422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await aee.match(aee.nil(204,ACn.void()),aee.jsonErr([400,404,408,409,422],yCn.ObservabilityError$inboundSchema),aee.fail("4XX"),aee.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var jiI=Y(Dy=>{"use strict";o();var ECn=Dy&&Dy.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),JCn=Dy&&Dy.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),mYe=Dy&&Dy.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nOCn.ExportDatasetToJsonlV1ObservabilityDatasetsDatasetIdExportsToJsonlGetRequest$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={dataset_id:(0,CCn.encodeSimple)("dataset_id",n.dataset_id,{explode:!1,charEncoding:"percent"})},r=(0,xCn.pathToFunc)("/v1/observability/datasets/{dataset_id}/exports/to-jsonl")(c),s=new Headers((0,LCn.compactMap)({Accept:"application/json"})),i=await(0,xiI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,xiI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"export_dataset_to_jsonl_v1_observability_datasets__dataset_id__exports_to_jsonl_get",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"GET",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["400","404","408","409","422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await cee.match(cee.json(200,jCn.DatasetExport$inboundSchema),cee.jsonErr([400,404,408,409,422],UCn.ObservabilityError$inboundSchema),cee.fail("4XX"),cee.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var OiI=Y(qy=>{"use strict";o();var SCn=qy&&qy.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),TCn=qy&&qy.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ZYe=qy&&qy.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;ne5n.GetDatasetByIdV1ObservabilityDatasetsDatasetIdGetRequest$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={dataset_id:(0,_Cn.encodeSimple)("dataset_id",n.dataset_id,{explode:!1,charEncoding:"percent"})},r=(0,qCn.pathToFunc)("/v1/observability/datasets/{dataset_id}")(c),s=new Headers((0,KCn.compactMap)({Accept:"application/json"})),i=await(0,UiI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,UiI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"get_dataset_by_id_v1_observability_datasets__dataset_id__get",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"GET",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["400","404","408","409","422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await ree.match(ree.json(200,PCn.DatasetPreview$inboundSchema),ree.jsonErr([400,404,408,409,422],$Cn.ObservabilityError$inboundSchema),ree.fail("4XX"),ree.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var MiI=Y(Py=>{"use strict";o();var n5n=Py&&Py.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),a5n=Py&&Py.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),pYe=Py&&Py.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nG5n.GetDatasetImportTaskV1ObservabilityDatasetsDatasetIdTasksTaskIdGetRequest$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={dataset_id:(0,ziI.encodeSimple)("dataset_id",n.dataset_id,{explode:!1,charEncoding:"percent"}),task_id:(0,ziI.encodeSimple)("task_id",n.task_id,{explode:!1,charEncoding:"percent"})},r=(0,s5n.pathToFunc)("/v1/observability/datasets/{dataset_id}/tasks/{task_id}")(c),s=new Headers((0,c5n.compactMap)({Accept:"application/json"})),i=await(0,BiI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,BiI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"get_dataset_import_task_v1_observability_datasets__dataset_id__tasks__task_id__get",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"GET",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["400","404","408","409","422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await see.match(see.json(200,o5n.DatasetImportTask$inboundSchema),see.jsonErr([400,404,408,409,422],i5n.ObservabilityError$inboundSchema),see.fail("4XX"),see.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var _iI=Y($y=>{"use strict";o();var m5n=$y&&$y.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Z5n=$y&&$y.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),hYe=$y&&$y.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nY5n.PostDatasetRecordsFromCampaignV1ObservabilityDatasetsDatasetIdImportsFromCampaignPostRequest$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,SiI.encodeJSON)("body",n.PostDatasetImportFromCampaignInSchema,{explode:!0}),c={dataset_id:(0,SiI.encodeSimple)("dataset_id",n.dataset_id,{explode:!1,charEncoding:"percent"})},r=(0,W5n.pathToFunc)("/v1/observability/datasets/{dataset_id}/imports/from-campaign")(c),s=new Headers((0,p5n.compactMap)({"Content-Type":"application/json",Accept:"application/json"})),i=await(0,TiI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,TiI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"post_dataset_records_from_campaign_v1_observability_datasets__dataset_id__imports_from_campaign_post",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"POST",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["400","404","408","409","422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await oee.match(oee.json(202,N5n.DatasetImportTask$inboundSchema),oee.jsonErr([400,404,408,409,422],V5n.ObservabilityError$inboundSchema),oee.fail("4XX"),oee.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var qiI=Y(ew=>{"use strict";o();var X5n=ew&&ew.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),g5n=ew&&ew.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),WYe=ew&&ew.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nf5n.PostDatasetRecordsFromDatasetV1ObservabilityDatasetsDatasetIdImportsFromDatasetPostRequest$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,KiI.encodeJSON)("body",n.PostDatasetImportFromDatasetInSchema,{explode:!0}),c={dataset_id:(0,KiI.encodeSimple)("dataset_id",n.dataset_id,{explode:!1,charEncoding:"percent"})},r=(0,w5n.pathToFunc)("/v1/observability/datasets/{dataset_id}/imports/from-dataset")(c),s=new Headers((0,v5n.compactMap)({"Content-Type":"application/json",Accept:"application/json"})),i=await(0,DiI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,DiI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"post_dataset_records_from_dataset_v1_observability_datasets__dataset_id__imports_from_dataset_post",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"POST",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["400","404","408","409","422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await iee.match(iee.json(202,H5n.DatasetImportTask$inboundSchema),iee.jsonErr([400,404,408,409,422],Q5n.ObservabilityError$inboundSchema),iee.fail("4XX"),iee.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var eGI=Y(tw=>{"use strict";o();var L5n=tw&&tw.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),k5n=tw&&tw.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),NYe=tw&&tw.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nB5n.PostDatasetRecordsFromExplorerV1ObservabilityDatasetsDatasetIdImportsFromExplorerPostRequest$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,PiI.encodeJSON)("body",n.PostDatasetImportFromExplorerInSchema,{explode:!0}),c={dataset_id:(0,PiI.encodeSimple)("dataset_id",n.dataset_id,{explode:!1,charEncoding:"percent"})},r=(0,U5n.pathToFunc)("/v1/observability/datasets/{dataset_id}/imports/from-explorer")(c),s=new Headers((0,x5n.compactMap)({"Content-Type":"application/json",Accept:"application/json"})),i=await(0,$iI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,$iI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"post_dataset_records_from_explorer_v1_observability_datasets__dataset_id__imports_from_explorer_post",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"POST",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["400","404","408","409","422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await Gee.match(Gee.json(202,O5n.DatasetImportTask$inboundSchema),Gee.jsonErr([400,404,408,409,422],z5n.ObservabilityError$inboundSchema),Gee.fail("4XX"),Gee.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var lGI=Y(Iw=>{"use strict";o();var _5n=Iw&&Iw.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),K5n=Iw&&Iw.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),VYe=Iw&&Iw.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;ntLn.PostDatasetRecordsFromFileV1ObservabilityDatasetsDatasetIdImportsFromFilePostRequest$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,tGI.encodeJSON)("body",n.PostDatasetImportFromFileInSchema,{explode:!0}),c={dataset_id:(0,tGI.encodeSimple)("dataset_id",n.dataset_id,{explode:!1,charEncoding:"percent"})},r=(0,P5n.pathToFunc)("/v1/observability/datasets/{dataset_id}/imports/from-file")(c),s=new Headers((0,D5n.compactMap)({"Content-Type":"application/json",Accept:"application/json"})),i=await(0,IGI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,IGI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"post_dataset_records_from_file_v1_observability_datasets__dataset_id__imports_from_file_post",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"POST",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["400","404","408","409","422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await dee.match(dee.json(202,$5n.DatasetImportTask$inboundSchema),dee.jsonErr([400,404,408,409,422],eLn.ObservabilityError$inboundSchema),dee.fail("4XX"),dee.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var cGI=Y(lw=>{"use strict";o();var aLn=lw&&lw.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),cLn=lw&&lw.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),YYe=lw&&lw.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;ndLn.PostDatasetRecordsFromPlaygroundV1ObservabilityDatasetsDatasetIdImportsFromPlaygroundPostRequest$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,nGI.encodeJSON)("body",n.PostDatasetImportFromPlaygroundInSchema,{explode:!0}),c={dataset_id:(0,nGI.encodeSimple)("dataset_id",n.dataset_id,{explode:!1,charEncoding:"percent"})},r=(0,oLn.pathToFunc)("/v1/observability/datasets/{dataset_id}/imports/from-playground")(c),s=new Headers((0,rLn.compactMap)({"Content-Type":"application/json",Accept:"application/json"})),i=await(0,aGI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,aGI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"post_dataset_records_from_playground_v1_observability_datasets__dataset_id__imports_from_playground_post",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"POST",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["400","404","408","409","422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await uee.match(uee.json(202,iLn.DatasetImportTask$inboundSchema),uee.jsonErr([400,404,408,409,422],GLn.ObservabilityError$inboundSchema),uee.fail("4XX"),uee.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var sGI=Y(nw=>{"use strict";o();var ZLn=nw&&nw.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),pLn=nw&&nw.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),RYe=nw&&nw.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nALn.GetDatasetsV1ObservabilityDatasetsGetRequest$outboundSchema.optional().parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c=(0,VLn.pathToFunc)("/v1/observability/datasets")(),r=(0,hLn.encodeFormQuery)({page:n?.page,page_size:n?.page_size,q:n?.q}),s=new Headers((0,WLn.compactMap)({Accept:"application/json"})),i=await(0,rGI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,rGI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"get_datasets_v1_observability_datasets_get",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"GET",baseURL:I?.serverURL,path:c,headers:s,query:r,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["400","404","408","409","422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await bee.match(bee.json(200,YLn.DatasetPreviews$inboundSchema),bee.jsonErr([400,404,408,409,422],RLn.ObservabilityError$inboundSchema),bee.fail("4XX"),bee.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var GGI=Y(aw=>{"use strict";o();var vLn=aw&&aw.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),yLn=aw&&aw.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),AYe=aw&&aw.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nJLn.GetDatasetRecordsV1ObservabilityDatasetsDatasetIdRecordsGetRequest$outboundSchema.parse(R),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={dataset_id:(0,oGI.encodeSimple)("dataset_id",n.dataset_id,{explode:!1,charEncoding:"percent"})},r=(0,QLn.pathToFunc)("/v1/observability/datasets/{dataset_id}/records")(c),s=(0,oGI.encodeFormQuery)({page:n.page,page_size:n.page_size}),i=new Headers((0,wLn.compactMap)({Accept:"application/json"})),G=await(0,iGI.extractSecurity)(t._options.apiKey),d=G==null?{}:{apiKey:G},u=(0,iGI.resolveGlobalSecurity)(d),b={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"get_dataset_records_v1_observability_datasets__dataset_id__records_get",oAuth2Scopes:null,resolvedSecurity:u,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},Z=t._createRequest(b,{security:u,method:"GET",baseURL:I?.serverURL,path:r,headers:i,query:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!Z.ok)return[Z,{status:"invalid"}];let p=Z.value,W=await t._do(p,{context:b,errorCodes:["400","404","408","409","422","4XX","5XX"],retryConfig:b.retryConfig,retryCodes:b.retryCodes});if(!W.ok)return[W,{status:"request-error",request:p}];let h=W.value,N={HttpMeta:{Response:h,Request:p}},[V]=await mee.match(mee.json(200,fLn.DatasetRecords$inboundSchema),mee.jsonErr([400,404,408,409,422],ELn.ObservabilityError$inboundSchema),mee.fail("4XX"),mee.fail("5XX"))(h,p,{extraFields:N});return V.ok?[V,{status:"complete",request:p,response:h}]:[V,{status:"complete",request:p,response:h}]}});var bGI=Y(cw=>{"use strict";o();var xLn=cw&&cw.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),jLn=cw&&cw.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),FYe=cw&&cw.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nSLn.GetDatasetImportTasksV1ObservabilityDatasetsDatasetIdTasksGetRequest$outboundSchema.parse(R),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={dataset_id:(0,dGI.encodeSimple)("dataset_id",n.dataset_id,{explode:!1,charEncoding:"percent"})},r=(0,zLn.pathToFunc)("/v1/observability/datasets/{dataset_id}/tasks")(c),s=(0,dGI.encodeFormQuery)({page:n.page,page_size:n.page_size}),i=new Headers((0,ULn.compactMap)({Accept:"application/json"})),G=await(0,uGI.extractSecurity)(t._options.apiKey),d=G==null?{}:{apiKey:G},u=(0,uGI.resolveGlobalSecurity)(d),b={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"get_dataset_import_tasks_v1_observability_datasets__dataset_id__tasks_get",oAuth2Scopes:null,resolvedSecurity:u,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},Z=t._createRequest(b,{security:u,method:"GET",baseURL:I?.serverURL,path:r,headers:i,query:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!Z.ok)return[Z,{status:"invalid"}];let p=Z.value,W=await t._do(p,{context:b,errorCodes:["400","404","408","409","422","4XX","5XX"],retryConfig:b.retryConfig,retryCodes:b.retryCodes});if(!W.ok)return[W,{status:"request-error",request:p}];let h=W.value,N={HttpMeta:{Response:h,Request:p}},[V]=await Zee.match(Zee.json(200,BLn.DatasetImportTasks$inboundSchema),Zee.jsonErr([400,404,408,409,422],MLn.ObservabilityError$inboundSchema),Zee.fail("4XX"),Zee.fail("5XX"))(h,p,{extraFields:N});return V.ok?[V,{status:"complete",request:p,response:h}]:[V,{status:"complete",request:p,response:h}]}});var pGI=Y(rw=>{"use strict";o();var DLn=rw&&rw.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),qLn=rw&&rw.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),XYe=rw&&rw.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nlkn.UpdateDatasetV1ObservabilityDatasetsDatasetIdPatchRequest$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,mGI.encodeJSON)("body",n.PatchDatasetInSchema,{explode:!0}),c={dataset_id:(0,mGI.encodeSimple)("dataset_id",n.dataset_id,{explode:!1,charEncoding:"percent"})},r=(0,ekn.pathToFunc)("/v1/observability/datasets/{dataset_id}")(c),s=new Headers((0,PLn.compactMap)({"Content-Type":"application/json",Accept:"application/json"})),i=await(0,ZGI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,ZGI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"update_dataset_v1_observability_datasets__dataset_id__patch",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"PATCH",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["400","404","408","409","422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await pee.match(pee.json(200,tkn.DatasetPreview$inboundSchema),pee.jsonErr([400,404,408,409,422],Ikn.ObservabilityError$inboundSchema),pee.fail("4XX"),pee.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var WGI=Y(sw=>{"use strict";o();var rkn=sw&&sw.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),skn=sw&&sw.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),gYe=sw&&sw.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nbkn.DeleteDatasetRecordsInSchema$outboundSchema.parse(N),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,ikn.encodeJSON)("body",n,{explode:!0}),c=(0,ukn.pathToFunc)("/v1/observability/dataset-records/bulk-delete")(),r=new Headers((0,Gkn.compactMap)({"Content-Type":"application/json",Accept:"application/json"})),s=await(0,hGI.extractSecurity)(t._options.apiKey),i=s==null?{}:{apiKey:s},G=(0,hGI.resolveGlobalSecurity)(i),d={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"delete_dataset_records_v1_observability_dataset_records_bulk_delete_post",oAuth2Scopes:null,resolvedSecurity:G,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},u=t._createRequest(d,{security:G,method:"POST",baseURL:I?.serverURL,path:c,headers:r,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!u.ok)return[u,{status:"invalid"}];let b=u.value,Z=await t._do(b,{context:d,errorCodes:["400","404","408","409","422","4XX","5XX"],retryConfig:d.retryConfig,retryCodes:d.retryCodes});if(!Z.ok)return[Z,{status:"request-error",request:b}];let p=Z.value,W={HttpMeta:{Response:p,Request:b}},[h]=await hee.match(hee.nil(204,okn.void()),hee.jsonErr([400,404,408,409,422],mkn.ObservabilityError$inboundSchema),hee.fail("4XX"),hee.fail("5XX"))(p,b,{extraFields:W});return h.ok?[h,{status:"complete",request:b,response:p}]:[h,{status:"complete",request:b,response:p}]}});var VGI=Y(ow=>{"use strict";o();var Wkn=ow&&ow.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Nkn=ow&&ow.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),vYe=ow&&ow.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;ngkn.DeleteDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIdDeleteRequest$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={dataset_record_id:(0,Ykn.encodeSimple)("dataset_record_id",n.dataset_record_id,{explode:!1,charEncoding:"percent"})},r=(0,Fkn.pathToFunc)("/v1/observability/dataset-records/{dataset_record_id}")(c),s=new Headers((0,Rkn.compactMap)({Accept:"application/json"})),i=await(0,NGI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,NGI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"delete_dataset_record_v1_observability_dataset_records__dataset_record_id__delete",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"DELETE",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["400","404","408","409","422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await Wee.match(Wee.nil(204,Vkn.void()),Wee.jsonErr([400,404,408,409,422],Xkn.ObservabilityError$inboundSchema),Wee.fail("4XX"),Wee.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var RGI=Y(iw=>{"use strict";o();var Hkn=iw&&iw.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Qkn=iw&&iw.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),yYe=iw&&iw.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nxkn.GetDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIdGetRequest$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={dataset_record_id:(0,fkn.encodeSimple)("dataset_record_id",n.dataset_record_id,{explode:!1,charEncoding:"percent"})},r=(0,Ckn.pathToFunc)("/v1/observability/dataset-records/{dataset_record_id}")(c),s=new Headers((0,Ekn.compactMap)({Accept:"application/json"})),i=await(0,YGI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,YGI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"get_dataset_record_v1_observability_dataset_records__dataset_record_id__get",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"GET",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["400","404","408","409","422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await Nee.match(Nee.json(200,Lkn.DatasetRecord$inboundSchema),Nee.jsonErr([400,404,408,409,422],kkn.ObservabilityError$inboundSchema),Nee.fail("4XX"),Nee.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var XGI=Y(Gw=>{"use strict";o();var zkn=Gw&&Gw.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Bkn=Gw&&Gw.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),wYe=Gw&&Gw.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nDkn.JudgeDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIdLiveJudgingPostRequest$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,AGI.encodeJSON)("body",n.PostDatasetRecordJudgingInSchema,{explode:!0}),c={dataset_record_id:(0,AGI.encodeSimple)("dataset_record_id",n.dataset_record_id,{explode:!1,charEncoding:"percent"})},r=(0,Tkn.pathToFunc)("/v1/observability/dataset-records/{dataset_record_id}/live-judging")(c),s=new Headers((0,Mkn.compactMap)({"Content-Type":"application/json",Accept:"application/json"})),i=await(0,FGI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,FGI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"judge_dataset_record_v1_observability_dataset_records__dataset_record_id__live_judging_post",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"POST",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["400","404","408","409","422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await Vee.match(Vee.json(200,_kn.JudgeOutput$inboundSchema),Vee.jsonErr([400,404,408,409,422],Kkn.ObservabilityError$inboundSchema),Vee.fail("4XX"),Vee.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var yGI=Y(dw=>{"use strict";o();var e4n=dw&&dw.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),t4n=dw&&dw.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),HYe=dw&&dw.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nr4n.UpdateDatasetRecordPayloadV1ObservabilityDatasetRecordsDatasetRecordIdPayloadPutRequest$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,gGI.encodeJSON)("body",n.PutDatasetRecordPayloadInSchema,{explode:!0}),c={dataset_record_id:(0,gGI.encodeSimple)("dataset_record_id",n.dataset_record_id,{explode:!1,charEncoding:"percent"})},r=(0,a4n.pathToFunc)("/v1/observability/dataset-records/{dataset_record_id}/payload")(c),s=new Headers((0,l4n.compactMap)({"Content-Type":"application/json",Accept:"application/json"})),i=await(0,vGI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,vGI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"update_dataset_record_payload_v1_observability_dataset_records__dataset_record_id__payload_put",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"PUT",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["400","404","408","409","422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await Yee.match(Yee.nil(204,I4n.void()),Yee.jsonErr([400,404,408,409,422],c4n.ObservabilityError$inboundSchema),Yee.fail("4XX"),Yee.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var QGI=Y(uw=>{"use strict";o();var G4n=uw&&uw.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),d4n=uw&&uw.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),QYe=uw&&uw.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nh4n.UpdateDatasetRecordPropertiesV1ObservabilityDatasetRecordsDatasetRecordIdPropertiesPutRequest$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,wGI.encodeJSON)("body",n.PutDatasetRecordPropertiesInSchema,{explode:!0}),c={dataset_record_id:(0,wGI.encodeSimple)("dataset_record_id",n.dataset_record_id,{explode:!1,charEncoding:"percent"})},r=(0,Z4n.pathToFunc)("/v1/observability/dataset-records/{dataset_record_id}/properties")(c),s=new Headers((0,b4n.compactMap)({"Content-Type":"application/json",Accept:"application/json"})),i=await(0,HGI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,HGI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"update_dataset_record_properties_v1_observability_dataset_records__dataset_record_id__properties_put",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"PUT",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["400","404","408","409","422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await Ree.match(Ree.nil(204,u4n.void()),Ree.jsonErr([400,404,408,409,422],p4n.ObservabilityError$inboundSchema),Ree.fail("4XX"),Ree.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var fGI=Y(fYe=>{"use strict";o();Object.defineProperty(fYe,"__esModule",{value:!0});fYe.Records=void 0;var Y4n=WGI(),R4n=VGI(),A4n=RGI(),F4n=XGI(),X4n=yGI(),g4n=QGI(),v4n=En(),lM=da(),pqe=class extends v4n.ClientSDK{async fetch(e,I){return(0,lM.unwrapAsync)((0,A4n.betaObservabilityDatasetsRecordsFetch)(this,e,I))}async delete(e,I){return(0,lM.unwrapAsync)((0,R4n.betaObservabilityDatasetsRecordsDelete)(this,e,I))}async bulkDelete(e,I){return(0,lM.unwrapAsync)((0,Y4n.betaObservabilityDatasetsRecordsBulkDelete)(this,e,I))}async judge(e,I){return(0,lM.unwrapAsync)((0,F4n.betaObservabilityDatasetsRecordsJudge)(this,e,I))}async updatePayload(e,I){return(0,lM.unwrapAsync)((0,X4n.betaObservabilityDatasetsRecordsUpdatePayload)(this,e,I))}async updateProperties(e,I){return(0,lM.unwrapAsync)((0,g4n.betaObservabilityDatasetsRecordsUpdateProperties)(this,e,I))}};fYe.Records=pqe});var EGI=Y(EYe=>{"use strict";o();Object.defineProperty(EYe,"__esModule",{value:!0});EYe.Datasets=void 0;var y4n=fiI(),w4n=CiI(),H4n=kiI(),Q4n=jiI(),f4n=OiI(),E4n=MiI(),J4n=_iI(),C4n=qiI(),L4n=eGI(),k4n=lGI(),x4n=cGI(),j4n=sGI(),U4n=GGI(),O4n=bGI(),z4n=pGI(),B4n=En(),Ab=da(),M4n=fGI(),hqe=class extends B4n.ClientSDK{get records(){return this._records??(this._records=new M4n.Records(this._options))}async create(e,I){return(0,Ab.unwrapAsync)((0,y4n.betaObservabilityDatasetsCreate)(this,e,I))}async list(e,I){return(0,Ab.unwrapAsync)((0,j4n.betaObservabilityDatasetsList)(this,e,I))}async fetch(e,I){return(0,Ab.unwrapAsync)((0,f4n.betaObservabilityDatasetsFetch)(this,e,I))}async delete(e,I){return(0,Ab.unwrapAsync)((0,H4n.betaObservabilityDatasetsDelete)(this,e,I))}async update(e,I){return(0,Ab.unwrapAsync)((0,z4n.betaObservabilityDatasetsUpdate)(this,e,I))}async listRecords(e,I){return(0,Ab.unwrapAsync)((0,U4n.betaObservabilityDatasetsListRecords)(this,e,I))}async createRecord(e,I){return(0,Ab.unwrapAsync)((0,w4n.betaObservabilityDatasetsCreateRecord)(this,e,I))}async importFromCampaign(e,I){return(0,Ab.unwrapAsync)((0,J4n.betaObservabilityDatasetsImportFromCampaign)(this,e,I))}async importFromExplorer(e,I){return(0,Ab.unwrapAsync)((0,L4n.betaObservabilityDatasetsImportFromExplorer)(this,e,I))}async importFromFile(e,I){return(0,Ab.unwrapAsync)((0,k4n.betaObservabilityDatasetsImportFromFile)(this,e,I))}async importFromPlayground(e,I){return(0,Ab.unwrapAsync)((0,x4n.betaObservabilityDatasetsImportFromPlayground)(this,e,I))}async importFromDatasetRecords(e,I){return(0,Ab.unwrapAsync)((0,C4n.betaObservabilityDatasetsImportFromDatasetRecords)(this,e,I))}async exportToJsonl(e,I){return(0,Ab.unwrapAsync)((0,Q4n.betaObservabilityDatasetsExportToJsonl)(this,e,I))}async fetchTask(e,I){return(0,Ab.unwrapAsync)((0,E4n.betaObservabilityDatasetsFetchTask)(this,e,I))}async listTasks(e,I){return(0,Ab.unwrapAsync)((0,O4n.betaObservabilityDatasetsListTasks)(this,e,I))}};EYe.Datasets=hqe});var LGI=Y(bw=>{"use strict";o();var S4n=bw&&bw.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),T4n=bw&&bw.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Wqe=bw&&bw.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nCGI.PostJudgeInSchema$outboundSchema.parse(N),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,_4n.encodeJSON)("body",n,{explode:!0}),c=(0,q4n.pathToFunc)("/v1/observability/judges")(),r=new Headers((0,K4n.compactMap)({"Content-Type":"application/json",Accept:"application/json"})),s=await(0,JGI.extractSecurity)(t._options.apiKey),i=s==null?{}:{apiKey:s},G=(0,JGI.resolveGlobalSecurity)(i),d={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"create_judge_v1_observability_judges_post",oAuth2Scopes:null,resolvedSecurity:G,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},u=t._createRequest(d,{security:G,method:"POST",baseURL:I?.serverURL,path:c,headers:r,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!u.ok)return[u,{status:"invalid"}];let b=u.value,Z=await t._do(b,{context:d,errorCodes:["400","404","408","409","422","4XX","5XX"],retryConfig:d.retryConfig,retryCodes:d.retryCodes});if(!Z.ok)return[Z,{status:"request-error",request:b}];let p=Z.value,W={HttpMeta:{Response:p,Request:b}},[h]=await Aee.match(Aee.json(201,CGI.JudgePreview$inboundSchema),Aee.jsonErr([400,404,408,409,422],P4n.ObservabilityError$inboundSchema),Aee.fail("4XX"),Aee.fail("5XX"))(p,b,{extraFields:W});return h.ok?[h,{status:"complete",request:b,response:p}]:[h,{status:"complete",request:b,response:p}]}});var xGI=Y(mw=>{"use strict";o();var Ixn=mw&&mw.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),lxn=mw&&mw.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),JYe=mw&&mw.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nixn.DeleteJudgeV1ObservabilityJudgesJudgeIdDeleteRequest$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={judge_id:(0,axn.encodeSimple)("judge_id",n.judge_id,{explode:!1,charEncoding:"percent"})},r=(0,sxn.pathToFunc)("/v1/observability/judges/{judge_id}")(c),s=new Headers((0,cxn.compactMap)({Accept:"application/json"})),i=await(0,kGI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,kGI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"delete_judge_v1_observability_judges__judge_id__delete",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"DELETE",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["400","404","408","409","422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await Fee.match(Fee.nil(204,nxn.void()),Fee.jsonErr([400,404,408,409,422],oxn.ObservabilityError$inboundSchema),Fee.fail("4XX"),Fee.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var UGI=Y(Zw=>{"use strict";o();var bxn=Zw&&Zw.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),mxn=Zw&&Zw.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),CYe=Zw&&Zw.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nYxn.GetJudgeByIdV1ObservabilityJudgesJudgeIdGetRequest$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={judge_id:(0,Zxn.encodeSimple)("judge_id",n.judge_id,{explode:!1,charEncoding:"percent"})},r=(0,Wxn.pathToFunc)("/v1/observability/judges/{judge_id}")(c),s=new Headers((0,pxn.compactMap)({Accept:"application/json"})),i=await(0,jGI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,jGI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"get_judge_by_id_v1_observability_judges__judge_id__get",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"GET",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["400","404","408","409","422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await Xee.match(Xee.json(200,Nxn.JudgePreview$inboundSchema),Xee.jsonErr([400,404,408,409,422],Vxn.ObservabilityError$inboundSchema),Xee.fail("4XX"),Xee.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var zGI=Y(pw=>{"use strict";o();var Xxn=pw&&pw.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),gxn=pw&&pw.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),LYe=pw&&pw.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nExn.GetJudgesV1ObservabilityJudgesGetRequest$outboundSchema.optional().parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c=(0,Hxn.pathToFunc)("/v1/observability/judges")(),r=(0,vxn.encodeFormQuery)({model_filter:n?.model_filter,page:n?.page,page_size:n?.page_size,q:n?.q,type_filter:n?.type_filter}),s=new Headers((0,yxn.compactMap)({Accept:"application/json"})),i=await(0,OGI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,OGI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"get_judges_v1_observability_judges_get",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"GET",baseURL:I?.serverURL,path:c,headers:s,query:r,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["400","404","408","409","422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await gee.match(gee.json(200,Qxn.JudgePreviews$inboundSchema),gee.jsonErr([400,404,408,409,422],fxn.ObservabilityError$inboundSchema),gee.fail("4XX"),gee.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var SGI=Y(hw=>{"use strict";o();var kxn=hw&&hw.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),xxn=hw&&hw.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),kYe=hw&&hw.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nMxn.UpdateJudgeV1ObservabilityJudgesJudgeIdPutRequest$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,BGI.encodeJSON)("body",n.PutJudgeInSchema,{explode:!0}),c={judge_id:(0,BGI.encodeSimple)("judge_id",n.judge_id,{explode:!1,charEncoding:"percent"})},r=(0,zxn.pathToFunc)("/v1/observability/judges/{judge_id}")(c),s=new Headers((0,Uxn.compactMap)({"Content-Type":"application/json",Accept:"application/json"})),i=await(0,MGI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,MGI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"update_judge_v1_observability_judges__judge_id__put",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"PUT",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["400","404","408","409","422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await vee.match(vee.nil(204,jxn.void()),vee.jsonErr([400,404,408,409,422],Bxn.ObservabilityError$inboundSchema),vee.fail("4XX"),vee.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var TGI=Y(xYe=>{"use strict";o();Object.defineProperty(xYe,"__esModule",{value:!0});xYe.Judges=void 0;var Kxn=LGI(),Dxn=xGI(),qxn=UGI(),Pxn=zGI(),$xn=SGI(),e3n=En(),yee=da(),Nqe=class extends e3n.ClientSDK{async create(e,I){return(0,yee.unwrapAsync)((0,Kxn.betaObservabilityJudgesCreate)(this,e,I))}async list(e,I){return(0,yee.unwrapAsync)((0,Pxn.betaObservabilityJudgesList)(this,e,I))}async fetch(e,I){return(0,yee.unwrapAsync)((0,qxn.betaObservabilityJudgesFetch)(this,e,I))}async delete(e,I){return(0,yee.unwrapAsync)((0,Dxn.betaObservabilityJudgesDelete)(this,e,I))}async update(e,I){return(0,yee.unwrapAsync)((0,$xn.betaObservabilityJudgesUpdate)(this,e,I))}};xYe.Judges=Nqe});var _GI=Y(jYe=>{"use strict";o();Object.defineProperty(jYe,"__esModule",{value:!0});jYe.Observability=void 0;var t3n=En(),I3n=riI(),l3n=wiI(),n3n=EGI(),a3n=TGI(),Vqe=class extends t3n.ClientSDK{get chatCompletionEvents(){return this._chatCompletionEvents??(this._chatCompletionEvents=new l3n.ChatCompletionEvents(this._options))}get judges(){return this._judges??(this._judges=new a3n.Judges(this._options))}get campaigns(){return this._campaigns??(this._campaigns=new I3n.Campaigns(this._options))}get datasets(){return this._datasets??(this._datasets=new n3n.Datasets(this._options))}};jYe.Observability=Vqe});var KGI=Y(UYe=>{"use strict";o();Object.defineProperty(UYe,"__esModule",{value:!0});UYe.Beta=void 0;var c3n=En(),r3n=jrI(),s3n=psI(),o3n=moI(),i3n=SoI(),G3n=_GI(),Yqe=class extends c3n.ClientSDK{get conversations(){return this._conversations??(this._conversations=new s3n.Conversations(this._options))}get agents(){return this._agents??(this._agents=new i3n.MistralAgents(this._options))}get libraries(){return this._libraries??(this._libraries=new o3n.Libraries(this._options))}get observability(){return this._observability??(this._observability=new G3n.Observability(this._options))}get connectors(){return this._connectors??(this._connectors=new r3n.Connectors(this._options))}};UYe.Beta=Yqe});var PGI=Y(Ww=>{"use strict";o();var d3n=Ww&&Ww.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),u3n=Ww&&Ww.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Rqe=Ww&&Ww.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nqGI.ChatCompletionRequest$outboundSchema.parse(N),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,b3n.encodeJSON)("body",n,{explode:!0}),c=(0,p3n.pathToFunc)("/v1/chat/completions")(),r=new Headers((0,m3n.compactMap)({"Content-Type":"application/json",Accept:"application/json"})),s=await(0,DGI.extractSecurity)(t._options.apiKey),i=s==null?{}:{apiKey:s},G=(0,DGI.resolveGlobalSecurity)(i),d={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"chat_completion_v1_chat_completions_post",oAuth2Scopes:null,resolvedSecurity:G,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},u=t._createRequest(d,{security:G,method:"POST",baseURL:I?.serverURL,path:c,headers:r,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!u.ok)return[u,{status:"invalid"}];let b=u.value,Z=await t._do(b,{context:d,errorCodes:["422","4XX","5XX"],retryConfig:d.retryConfig,retryCodes:d.retryCodes});if(!Z.ok)return[Z,{status:"request-error",request:b}];let p=Z.value,W={HttpMeta:{Response:p,Request:b}},[h]=await wee.match(wee.json(200,qGI.ChatCompletionResponse$inboundSchema),wee.jsonErr(422,h3n.HTTPValidationError$inboundSchema),wee.fail("4XX"),wee.fail("5XX"))(p,b,{extraFields:W});return h.ok?[h,{status:"complete",request:b,response:p}]:[h,{status:"complete",request:b,response:p}]}});var tdI=Y(Nw=>{"use strict";o();var Y3n=Nw&&Nw.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),R3n=Nw&&Nw.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),OYe=Nw&&Nw.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nedI.ChatCompletionStreamRequest$outboundSchema.parse(N),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,F3n.encodeJSON)("body",n,{explode:!0}),c=(0,y3n.pathToFunc)("/v1/chat/completions#stream")(),r=new Headers((0,g3n.compactMap)({"Content-Type":"application/json",Accept:"text/event-stream"})),s=await(0,$GI.extractSecurity)(t._options.apiKey),i=s==null?{}:{apiKey:s},G=(0,$GI.resolveGlobalSecurity)(i),d={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"stream_chat",oAuth2Scopes:null,resolvedSecurity:G,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},u=t._createRequest(d,{security:G,method:"POST",baseURL:I?.serverURL,path:c,headers:r,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!u.ok)return[u,{status:"invalid"}];let b=u.value,Z=await t._do(b,{context:d,errorCodes:["422","4XX","5XX"],retryConfig:d.retryConfig,retryCodes:d.retryCodes});if(!Z.ok)return[Z,{status:"request-error",request:b}];let p=Z.value,W={HttpMeta:{Response:p,Request:b}},[h]=await Hee.match(Hee.sse(200,A3n.instanceof(ReadableStream).transform(N=>new X3n.EventStream(N,V=>V.data==="[DONE]"?{done:!0}:{value:edI.CompletionEvent$inboundSchema.parse(V)}))),Hee.jsonErr(422,w3n.HTTPValidationError$inboundSchema),Hee.fail("4XX"),Hee.fail("5XX"))(p,b,{extraFields:W});return h.ok?[h,{status:"complete",request:b,response:p}]:[h,{status:"complete",request:b,response:p}]}});var zYe=Y(RR=>{"use strict";o();Object.defineProperty(RR,"__esModule",{value:!0});RR.getDefaultOptions=RR.defaultOptions=RR.jsonDescription=RR.ignoreOverride=void 0;RR.ignoreOverride=Symbol("Let zodToJsonSchema decide on which parser to use");var E3n=(t,e)=>{if(e.description)try{return{...t,...JSON.parse(e.description)}}catch{}return t};RR.jsonDescription=E3n;RR.defaultOptions={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref",openAiAnyTypeName:"OpenAiAnyType"};var J3n=t=>typeof t=="string"?{...RR.defaultOptions,name:t}:{...RR.defaultOptions,...t};RR.getDefaultOptions=J3n});var Aqe=Y(BYe=>{"use strict";o();Object.defineProperty(BYe,"__esModule",{value:!0});BYe.getRefs=void 0;var C3n=zYe(),L3n=t=>{let e=(0,C3n.getDefaultOptions)(t),I=e.name!==void 0?[...e.basePath,e.definitionPath,e.name]:e.basePath;return{...e,flags:{hasReferencedOpenAiAnyType:!1},currentPath:I,propertyPath:void 0,seen:new Map(Object.entries(e.definitions).map(([l,n])=>[n._def,{def:n._def,path:[...e.basePath,e.definitionPath,l],jsonSchema:void 0}]))}};BYe.getRefs=L3n});var X1=Y(nM=>{"use strict";o();Object.defineProperty(nM,"__esModule",{value:!0});nM.setResponseValueAndErrors=nM.addErrorMessage=void 0;function IdI(t,e,I,l){l?.errorMessages&&I&&(t.errorMessage={...t.errorMessage,[e]:I})}nM.addErrorMessage=IdI;function k3n(t,e,I,l,n){t[e]=I,IdI(t,e,l,n)}nM.setResponseValueAndErrors=k3n});var SYe=Y(MYe=>{"use strict";o();Object.defineProperty(MYe,"__esModule",{value:!0});MYe.getRelativePath=void 0;var x3n=(t,e)=>{let I=0;for(;I{"use strict";o();Object.defineProperty(TYe,"__esModule",{value:!0});TYe.parseAnyDef=void 0;var j3n=SYe();function U3n(t){if(t.target!=="openAi")return{};let e=[...t.basePath,t.definitionPath,t.openAiAnyTypeName];return t.flags.hasReferencedOpenAiAnyType=!0,{$ref:t.$refStrategy==="relative"?(0,j3n.getRelativePath)(e,t.currentPath):e.join("/")}}TYe.parseAnyDef=U3n});var Fqe=Y(KYe=>{"use strict";o();Object.defineProperty(KYe,"__esModule",{value:!0});KYe.parseArrayDef=void 0;var O3n=J(),_Ye=X1(),z3n=Js();function B3n(t,e){let I={type:"array"};return t.type?._def&&t.type?._def?.typeName!==O3n.ZodFirstPartyTypeKind.ZodAny&&(I.items=(0,z3n.parseDef)(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&(0,_Ye.setResponseValueAndErrors)(I,"minItems",t.minLength.value,t.minLength.message,e),t.maxLength&&(0,_Ye.setResponseValueAndErrors)(I,"maxItems",t.maxLength.value,t.maxLength.message,e),t.exactLength&&((0,_Ye.setResponseValueAndErrors)(I,"minItems",t.exactLength.value,t.exactLength.message,e),(0,_Ye.setResponseValueAndErrors)(I,"maxItems",t.exactLength.value,t.exactLength.message,e)),I}KYe.parseArrayDef=B3n});var Xqe=Y(DYe=>{"use strict";o();Object.defineProperty(DYe,"__esModule",{value:!0});DYe.parseBigintDef=void 0;var Bk=X1();function M3n(t,e){let I={type:"integer",format:"int64"};if(!t.checks)return I;for(let l of t.checks)switch(l.kind){case"min":e.target==="jsonSchema7"?l.inclusive?(0,Bk.setResponseValueAndErrors)(I,"minimum",l.value,l.message,e):(0,Bk.setResponseValueAndErrors)(I,"exclusiveMinimum",l.value,l.message,e):(l.inclusive||(I.exclusiveMinimum=!0),(0,Bk.setResponseValueAndErrors)(I,"minimum",l.value,l.message,e));break;case"max":e.target==="jsonSchema7"?l.inclusive?(0,Bk.setResponseValueAndErrors)(I,"maximum",l.value,l.message,e):(0,Bk.setResponseValueAndErrors)(I,"exclusiveMaximum",l.value,l.message,e):(l.inclusive||(I.exclusiveMaximum=!0),(0,Bk.setResponseValueAndErrors)(I,"maximum",l.value,l.message,e));break;case"multipleOf":(0,Bk.setResponseValueAndErrors)(I,"multipleOf",l.value,l.message,e);break}return I}DYe.parseBigintDef=M3n});var gqe=Y(qYe=>{"use strict";o();Object.defineProperty(qYe,"__esModule",{value:!0});qYe.parseBooleanDef=void 0;function S3n(){return{type:"boolean"}}qYe.parseBooleanDef=S3n});var $Ye=Y(PYe=>{"use strict";o();Object.defineProperty(PYe,"__esModule",{value:!0});PYe.parseBrandedDef=void 0;var T3n=Js();function _3n(t,e){return(0,T3n.parseDef)(t.type._def,e)}PYe.parseBrandedDef=_3n});var vqe=Y(eRe=>{"use strict";o();Object.defineProperty(eRe,"__esModule",{value:!0});eRe.parseCatchDef=void 0;var K3n=Js(),D3n=(t,e)=>(0,K3n.parseDef)(t.innerType._def,e);eRe.parseCatchDef=D3n});var yqe=Y(tRe=>{"use strict";o();Object.defineProperty(tRe,"__esModule",{value:!0});tRe.parseDateDef=void 0;var ldI=X1();function ndI(t,e,I){let l=I??e.dateStrategy;if(Array.isArray(l))return{anyOf:l.map((n,a)=>ndI(t,e,n))};switch(l){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return q3n(t,e)}}tRe.parseDateDef=ndI;var q3n=(t,e)=>{let I={type:"integer",format:"unix-time"};if(e.target==="openApi3")return I;for(let l of t.checks)switch(l.kind){case"min":(0,ldI.setResponseValueAndErrors)(I,"minimum",l.value,l.message,e);break;case"max":(0,ldI.setResponseValueAndErrors)(I,"maximum",l.value,l.message,e);break}return I}});var wqe=Y(IRe=>{"use strict";o();Object.defineProperty(IRe,"__esModule",{value:!0});IRe.parseDefaultDef=void 0;var P3n=Js();function $3n(t,e){return{...(0,P3n.parseDef)(t.innerType._def,e),default:t.defaultValue()}}IRe.parseDefaultDef=$3n});var Hqe=Y(lRe=>{"use strict";o();Object.defineProperty(lRe,"__esModule",{value:!0});lRe.parseEffectsDef=void 0;var ejn=Js(),tjn=AR();function Ijn(t,e){return e.effectStrategy==="input"?(0,ejn.parseDef)(t.schema._def,e):(0,tjn.parseAnyDef)(e)}lRe.parseEffectsDef=Ijn});var Qqe=Y(nRe=>{"use strict";o();Object.defineProperty(nRe,"__esModule",{value:!0});nRe.parseEnumDef=void 0;function ljn(t){return{type:"string",enum:Array.from(t.values)}}nRe.parseEnumDef=ljn});var fqe=Y(aRe=>{"use strict";o();Object.defineProperty(aRe,"__esModule",{value:!0});aRe.parseIntersectionDef=void 0;var adI=Js(),njn=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function ajn(t,e){let I=[(0,adI.parseDef)(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),(0,adI.parseDef)(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(a=>!!a),l=e.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0,n=[];return I.forEach(a=>{if(njn(a))n.push(...a.allOf),a.unevaluatedProperties===void 0&&(l=void 0);else{let c=a;if("additionalProperties"in a&&a.additionalProperties===!1){let{additionalProperties:r,...s}=a;c=s}else l=void 0;n.push(c)}}),n.length?{allOf:n,...l}:void 0}aRe.parseIntersectionDef=ajn});var Eqe=Y(cRe=>{"use strict";o();Object.defineProperty(cRe,"__esModule",{value:!0});cRe.parseLiteralDef=void 0;function cjn(t,e){let I=typeof t.value;return I!=="bigint"&&I!=="number"&&I!=="boolean"&&I!=="string"?{type:Array.isArray(t.value)?"array":"object"}:e.target==="openApi3"?{type:I==="bigint"?"integer":I,enum:[t.value]}:{type:I==="bigint"?"integer":I,const:t.value}}cRe.parseLiteralDef=cjn});var rRe=Y(Si=>{"use strict";o();Object.defineProperty(Si,"__esModule",{value:!0});Si.parseStringDef=Si.zodPatterns=void 0;var Mk=X1(),Jqe;Si.zodPatterns={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(Jqe===void 0&&(Jqe=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Jqe),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function rjn(t,e){let I={type:"string"};if(t.checks)for(let l of t.checks)switch(l.kind){case"min":(0,Mk.setResponseValueAndErrors)(I,"minLength",typeof I.minLength=="number"?Math.max(I.minLength,l.value):l.value,l.message,e);break;case"max":(0,Mk.setResponseValueAndErrors)(I,"maxLength",typeof I.maxLength=="number"?Math.min(I.maxLength,l.value):l.value,l.message,e);break;case"email":switch(e.emailStrategy){case"format:email":mA(I,"email",l.message,e);break;case"format:idn-email":mA(I,"idn-email",l.message,e);break;case"pattern:zod":Fb(I,Si.zodPatterns.email,l.message,e);break}break;case"url":mA(I,"uri",l.message,e);break;case"uuid":mA(I,"uuid",l.message,e);break;case"regex":Fb(I,l.regex,l.message,e);break;case"cuid":Fb(I,Si.zodPatterns.cuid,l.message,e);break;case"cuid2":Fb(I,Si.zodPatterns.cuid2,l.message,e);break;case"startsWith":Fb(I,RegExp(`^${Cqe(l.value,e)}`),l.message,e);break;case"endsWith":Fb(I,RegExp(`${Cqe(l.value,e)}$`),l.message,e);break;case"datetime":mA(I,"date-time",l.message,e);break;case"date":mA(I,"date",l.message,e);break;case"time":mA(I,"time",l.message,e);break;case"duration":mA(I,"duration",l.message,e);break;case"length":(0,Mk.setResponseValueAndErrors)(I,"minLength",typeof I.minLength=="number"?Math.max(I.minLength,l.value):l.value,l.message,e),(0,Mk.setResponseValueAndErrors)(I,"maxLength",typeof I.maxLength=="number"?Math.min(I.maxLength,l.value):l.value,l.message,e);break;case"includes":{Fb(I,RegExp(Cqe(l.value,e)),l.message,e);break}case"ip":{l.version!=="v6"&&mA(I,"ipv4",l.message,e),l.version!=="v4"&&mA(I,"ipv6",l.message,e);break}case"base64url":Fb(I,Si.zodPatterns.base64url,l.message,e);break;case"jwt":Fb(I,Si.zodPatterns.jwt,l.message,e);break;case"cidr":{l.version!=="v6"&&Fb(I,Si.zodPatterns.ipv4Cidr,l.message,e),l.version!=="v4"&&Fb(I,Si.zodPatterns.ipv6Cidr,l.message,e);break}case"emoji":Fb(I,Si.zodPatterns.emoji(),l.message,e);break;case"ulid":{Fb(I,Si.zodPatterns.ulid,l.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{mA(I,"binary",l.message,e);break}case"contentEncoding:base64":{(0,Mk.setResponseValueAndErrors)(I,"contentEncoding","base64",l.message,e);break}case"pattern:zod":{Fb(I,Si.zodPatterns.base64,l.message,e);break}}break}case"nanoid":Fb(I,Si.zodPatterns.nanoid,l.message,e);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return I}Si.parseStringDef=rjn;function Cqe(t,e){return e.patternStrategy==="escape"?ojn(t):t}var sjn=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function ojn(t){let e="";for(let I=0;In.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format,...t.errorMessage&&l.errorMessages&&{errorMessage:{format:t.errorMessage.format}}}),delete t.format,t.errorMessage&&(delete t.errorMessage.format,Object.keys(t.errorMessage).length===0&&delete t.errorMessage)),t.anyOf.push({format:e,...I&&l.errorMessages&&{errorMessage:{format:I}}})):(0,Mk.setResponseValueAndErrors)(t,"format",e,I,l)}function Fb(t,e,I,l){t.pattern||t.allOf?.some(n=>n.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern,...t.errorMessage&&l.errorMessages&&{errorMessage:{pattern:t.errorMessage.pattern}}}),delete t.pattern,t.errorMessage&&(delete t.errorMessage.pattern,Object.keys(t.errorMessage).length===0&&delete t.errorMessage)),t.allOf.push({pattern:cdI(e,l),...I&&l.errorMessages&&{errorMessage:{pattern:I}}})):(0,Mk.setResponseValueAndErrors)(t,"pattern",cdI(e,l),I,l)}function cdI(t,e){if(!e.applyRegexFlags||!t.flags)return t.source;let I={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},l=I.i?t.source.toLowerCase():t.source,n="",a=!1,c=!1,r=!1;for(let s=0;s{"use strict";o();Object.defineProperty(sRe,"__esModule",{value:!0});sRe.parseRecordDef=void 0;var Qee=J(),rdI=Js(),ijn=rRe(),Gjn=$Ye(),djn=AR();function ujn(t,e){if(e.target==="openAi"&&console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."),e.target==="openApi3"&&t.keyType?._def.typeName===Qee.ZodFirstPartyTypeKind.ZodEnum)return{type:"object",required:t.keyType._def.values,properties:t.keyType._def.values.reduce((l,n)=>({...l,[n]:(0,rdI.parseDef)(t.valueType._def,{...e,currentPath:[...e.currentPath,"properties",n]})??(0,djn.parseAnyDef)(e)}),{}),additionalProperties:e.rejectedAdditionalProperties};let I={type:"object",additionalProperties:(0,rdI.parseDef)(t.valueType._def,{...e,currentPath:[...e.currentPath,"additionalProperties"]})??e.allowedAdditionalProperties};if(e.target==="openApi3")return I;if(t.keyType?._def.typeName===Qee.ZodFirstPartyTypeKind.ZodString&&t.keyType._def.checks?.length){let{type:l,...n}=(0,ijn.parseStringDef)(t.keyType._def,e);return{...I,propertyNames:n}}else{if(t.keyType?._def.typeName===Qee.ZodFirstPartyTypeKind.ZodEnum)return{...I,propertyNames:{enum:t.keyType._def.values}};if(t.keyType?._def.typeName===Qee.ZodFirstPartyTypeKind.ZodBranded&&t.keyType._def.type._def.typeName===Qee.ZodFirstPartyTypeKind.ZodString&&t.keyType._def.type._def.checks?.length){let{type:l,...n}=(0,Gjn.parseBrandedDef)(t.keyType._def,e);return{...I,propertyNames:n}}}return I}sRe.parseRecordDef=ujn});var Lqe=Y(iRe=>{"use strict";o();Object.defineProperty(iRe,"__esModule",{value:!0});iRe.parseMapDef=void 0;var sdI=Js(),bjn=oRe(),odI=AR();function mjn(t,e){if(e.mapStrategy==="record")return(0,bjn.parseRecordDef)(t,e);let I=(0,sdI.parseDef)(t.keyType._def,{...e,currentPath:[...e.currentPath,"items","items","0"]})||(0,odI.parseAnyDef)(e),l=(0,sdI.parseDef)(t.valueType._def,{...e,currentPath:[...e.currentPath,"items","items","1"]})||(0,odI.parseAnyDef)(e);return{type:"array",maxItems:125,items:{type:"array",items:[I,l],minItems:2,maxItems:2}}}iRe.parseMapDef=mjn});var kqe=Y(GRe=>{"use strict";o();Object.defineProperty(GRe,"__esModule",{value:!0});GRe.parseNativeEnumDef=void 0;function Zjn(t){let e=t.values,l=Object.keys(t.values).filter(a=>typeof e[e[a]]!="number").map(a=>e[a]),n=Array.from(new Set(l.map(a=>typeof a)));return{type:n.length===1?n[0]==="string"?"string":"number":["string","number"],enum:l}}GRe.parseNativeEnumDef=Zjn});var xqe=Y(dRe=>{"use strict";o();Object.defineProperty(dRe,"__esModule",{value:!0});dRe.parseNeverDef=void 0;var pjn=AR();function hjn(t){return t.target==="openAi"?void 0:{not:(0,pjn.parseAnyDef)({...t,currentPath:[...t.currentPath,"not"]})}}dRe.parseNeverDef=hjn});var jqe=Y(uRe=>{"use strict";o();Object.defineProperty(uRe,"__esModule",{value:!0});uRe.parseNullDef=void 0;function Wjn(t){return t.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}uRe.parseNullDef=Wjn});var bRe=Y(g1=>{"use strict";o();Object.defineProperty(g1,"__esModule",{value:!0});g1.parseUnionDef=g1.primitiveMappings=void 0;var Njn=Js();g1.primitiveMappings={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function Vjn(t,e){if(e.target==="openApi3")return idI(t,e);let I=t.options instanceof Map?Array.from(t.options.values()):t.options;if(I.every(l=>l._def.typeName in g1.primitiveMappings&&(!l._def.checks||!l._def.checks.length))){let l=I.reduce((n,a)=>{let c=g1.primitiveMappings[a._def.typeName];return c&&!n.includes(c)?[...n,c]:n},[]);return{type:l.length>1?l:l[0]}}else if(I.every(l=>l._def.typeName==="ZodLiteral"&&!l.description)){let l=I.reduce((n,a)=>{let c=typeof a._def.value;switch(c){case"string":case"number":case"boolean":return[...n,c];case"bigint":return[...n,"integer"];case"object":if(a._def.value===null)return[...n,"null"];case"symbol":case"undefined":case"function":default:return n}},[]);if(l.length===I.length){let n=l.filter((a,c,r)=>r.indexOf(a)===c);return{type:n.length>1?n:n[0],enum:I.reduce((a,c)=>a.includes(c._def.value)?a:[...a,c._def.value],[])}}}else if(I.every(l=>l._def.typeName==="ZodEnum"))return{type:"string",enum:I.reduce((l,n)=>[...l,...n._def.values.filter(a=>!l.includes(a))],[])};return idI(t,e)}g1.parseUnionDef=Vjn;var idI=(t,e)=>{let I=(t.options instanceof Map?Array.from(t.options.values()):t.options).map((l,n)=>(0,Njn.parseDef)(l._def,{...e,currentPath:[...e.currentPath,"anyOf",`${n}`]})).filter(l=>!!l&&(!e.strictUnions||typeof l=="object"&&Object.keys(l).length>0));return I.length?{anyOf:I}:void 0}});var Uqe=Y(mRe=>{"use strict";o();Object.defineProperty(mRe,"__esModule",{value:!0});mRe.parseNullableDef=void 0;var GdI=Js(),ddI=bRe();function Yjn(t,e){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(t.innerType._def.typeName)&&(!t.innerType._def.checks||!t.innerType._def.checks.length))return e.target==="openApi3"?{type:ddI.primitiveMappings[t.innerType._def.typeName],nullable:!0}:{type:[ddI.primitiveMappings[t.innerType._def.typeName],"null"]};if(e.target==="openApi3"){let l=(0,GdI.parseDef)(t.innerType._def,{...e,currentPath:[...e.currentPath]});return l&&"$ref"in l?{allOf:[l],nullable:!0}:l&&{...l,nullable:!0}}let I=(0,GdI.parseDef)(t.innerType._def,{...e,currentPath:[...e.currentPath,"anyOf","0"]});return I&&{anyOf:[I,{type:"null"}]}}mRe.parseNullableDef=Yjn});var Oqe=Y(ZRe=>{"use strict";o();Object.defineProperty(ZRe,"__esModule",{value:!0});ZRe.parseNumberDef=void 0;var v1=X1();function Rjn(t,e){let I={type:"number"};if(!t.checks)return I;for(let l of t.checks)switch(l.kind){case"int":I.type="integer",(0,v1.addErrorMessage)(I,"type",l.message,e);break;case"min":e.target==="jsonSchema7"?l.inclusive?(0,v1.setResponseValueAndErrors)(I,"minimum",l.value,l.message,e):(0,v1.setResponseValueAndErrors)(I,"exclusiveMinimum",l.value,l.message,e):(l.inclusive||(I.exclusiveMinimum=!0),(0,v1.setResponseValueAndErrors)(I,"minimum",l.value,l.message,e));break;case"max":e.target==="jsonSchema7"?l.inclusive?(0,v1.setResponseValueAndErrors)(I,"maximum",l.value,l.message,e):(0,v1.setResponseValueAndErrors)(I,"exclusiveMaximum",l.value,l.message,e):(l.inclusive||(I.exclusiveMaximum=!0),(0,v1.setResponseValueAndErrors)(I,"maximum",l.value,l.message,e));break;case"multipleOf":(0,v1.setResponseValueAndErrors)(I,"multipleOf",l.value,l.message,e);break}return I}ZRe.parseNumberDef=Rjn});var zqe=Y(pRe=>{"use strict";o();Object.defineProperty(pRe,"__esModule",{value:!0});pRe.parseObjectDef=void 0;var udI=Js();function Ajn(t,e){let I=e.target==="openAi",l={type:"object",properties:{}},n=[],a=t.shape();for(let r in a){let s=a[r];if(s===void 0||s._def===void 0)continue;let i=Xjn(s);i&&I&&(s._def.typeName==="ZodOptional"&&(s=s._def.innerType),s.isNullable()||(s=s.nullable()),i=!1);let G=(0,udI.parseDef)(s._def,{...e,currentPath:[...e.currentPath,"properties",r],propertyPath:[...e.currentPath,"properties",r]});G!==void 0&&(l.properties[r]=G,i||n.push(r))}n.length&&(l.required=n);let c=Fjn(t,e);return c!==void 0&&(l.additionalProperties=c),l}pRe.parseObjectDef=Ajn;function Fjn(t,e){if(t.catchall._def.typeName!=="ZodNever")return(0,udI.parseDef)(t.catchall._def,{...e,currentPath:[...e.currentPath,"additionalProperties"]});switch(t.unknownKeys){case"passthrough":return e.allowedAdditionalProperties;case"strict":return e.rejectedAdditionalProperties;case"strip":return e.removeAdditionalStrategy==="strict"?e.allowedAdditionalProperties:e.rejectedAdditionalProperties}}function Xjn(t){try{return t.isOptional()}catch{return!0}}});var Bqe=Y(hRe=>{"use strict";o();Object.defineProperty(hRe,"__esModule",{value:!0});hRe.parseOptionalDef=void 0;var bdI=Js(),mdI=AR(),gjn=(t,e)=>{if(e.currentPath.toString()===e.propertyPath?.toString())return(0,bdI.parseDef)(t.innerType._def,e);let I=(0,bdI.parseDef)(t.innerType._def,{...e,currentPath:[...e.currentPath,"anyOf","1"]});return I?{anyOf:[{not:(0,mdI.parseAnyDef)(e)},I]}:(0,mdI.parseAnyDef)(e)};hRe.parseOptionalDef=gjn});var Mqe=Y(NRe=>{"use strict";o();Object.defineProperty(NRe,"__esModule",{value:!0});NRe.parsePipelineDef=void 0;var WRe=Js(),vjn=(t,e)=>{if(e.pipeStrategy==="input")return(0,WRe.parseDef)(t.in._def,e);if(e.pipeStrategy==="output")return(0,WRe.parseDef)(t.out._def,e);let I=(0,WRe.parseDef)(t.in._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),l=(0,WRe.parseDef)(t.out._def,{...e,currentPath:[...e.currentPath,"allOf",I?"1":"0"]});return{allOf:[I,l].filter(n=>n!==void 0)}};NRe.parsePipelineDef=vjn});var Sqe=Y(VRe=>{"use strict";o();Object.defineProperty(VRe,"__esModule",{value:!0});VRe.parsePromiseDef=void 0;var yjn=Js();function wjn(t,e){return(0,yjn.parseDef)(t.type._def,e)}VRe.parsePromiseDef=wjn});var Tqe=Y(YRe=>{"use strict";o();Object.defineProperty(YRe,"__esModule",{value:!0});YRe.parseSetDef=void 0;var ZdI=X1(),Hjn=Js();function Qjn(t,e){let l={type:"array",uniqueItems:!0,items:(0,Hjn.parseDef)(t.valueType._def,{...e,currentPath:[...e.currentPath,"items"]})};return t.minSize&&(0,ZdI.setResponseValueAndErrors)(l,"minItems",t.minSize.value,t.minSize.message,e),t.maxSize&&(0,ZdI.setResponseValueAndErrors)(l,"maxItems",t.maxSize.value,t.maxSize.message,e),l}YRe.parseSetDef=Qjn});var Kqe=Y(RRe=>{"use strict";o();Object.defineProperty(RRe,"__esModule",{value:!0});RRe.parseTupleDef=void 0;var _qe=Js();function fjn(t,e){return t.rest?{type:"array",minItems:t.items.length,items:t.items.map((I,l)=>(0,_qe.parseDef)(I._def,{...e,currentPath:[...e.currentPath,"items",`${l}`]})).reduce((I,l)=>l===void 0?I:[...I,l],[]),additionalItems:(0,_qe.parseDef)(t.rest._def,{...e,currentPath:[...e.currentPath,"additionalItems"]})}:{type:"array",minItems:t.items.length,maxItems:t.items.length,items:t.items.map((I,l)=>(0,_qe.parseDef)(I._def,{...e,currentPath:[...e.currentPath,"items",`${l}`]})).reduce((I,l)=>l===void 0?I:[...I,l],[])}}RRe.parseTupleDef=fjn});var Dqe=Y(ARe=>{"use strict";o();Object.defineProperty(ARe,"__esModule",{value:!0});ARe.parseUndefinedDef=void 0;var Ejn=AR();function Jjn(t){return{not:(0,Ejn.parseAnyDef)(t)}}ARe.parseUndefinedDef=Jjn});var qqe=Y(FRe=>{"use strict";o();Object.defineProperty(FRe,"__esModule",{value:!0});FRe.parseUnknownDef=void 0;var Cjn=AR();function Ljn(t){return(0,Cjn.parseAnyDef)(t)}FRe.parseUnknownDef=Ljn});var Pqe=Y(XRe=>{"use strict";o();Object.defineProperty(XRe,"__esModule",{value:!0});XRe.parseReadonlyDef=void 0;var kjn=Js(),xjn=(t,e)=>(0,kjn.parseDef)(t.innerType._def,e);XRe.parseReadonlyDef=xjn});var $qe=Y(gRe=>{"use strict";o();Object.defineProperty(gRe,"__esModule",{value:!0});gRe.selectParser=void 0;var Ol=J(),jjn=AR(),Ujn=Fqe(),Ojn=Xqe(),zjn=gqe(),Bjn=$Ye(),Mjn=vqe(),Sjn=yqe(),Tjn=wqe(),_jn=Hqe(),Kjn=Qqe(),Djn=fqe(),qjn=Eqe(),Pjn=Lqe(),$jn=kqe(),eUn=xqe(),tUn=jqe(),IUn=Uqe(),lUn=Oqe(),nUn=zqe(),aUn=Bqe(),cUn=Mqe(),rUn=Sqe(),sUn=oRe(),oUn=Tqe(),iUn=rRe(),GUn=Kqe(),dUn=Dqe(),uUn=bRe(),bUn=qqe(),mUn=Pqe(),ZUn=(t,e,I)=>{switch(e){case Ol.ZodFirstPartyTypeKind.ZodString:return(0,iUn.parseStringDef)(t,I);case Ol.ZodFirstPartyTypeKind.ZodNumber:return(0,lUn.parseNumberDef)(t,I);case Ol.ZodFirstPartyTypeKind.ZodObject:return(0,nUn.parseObjectDef)(t,I);case Ol.ZodFirstPartyTypeKind.ZodBigInt:return(0,Ojn.parseBigintDef)(t,I);case Ol.ZodFirstPartyTypeKind.ZodBoolean:return(0,zjn.parseBooleanDef)();case Ol.ZodFirstPartyTypeKind.ZodDate:return(0,Sjn.parseDateDef)(t,I);case Ol.ZodFirstPartyTypeKind.ZodUndefined:return(0,dUn.parseUndefinedDef)(I);case Ol.ZodFirstPartyTypeKind.ZodNull:return(0,tUn.parseNullDef)(I);case Ol.ZodFirstPartyTypeKind.ZodArray:return(0,Ujn.parseArrayDef)(t,I);case Ol.ZodFirstPartyTypeKind.ZodUnion:case Ol.ZodFirstPartyTypeKind.ZodDiscriminatedUnion:return(0,uUn.parseUnionDef)(t,I);case Ol.ZodFirstPartyTypeKind.ZodIntersection:return(0,Djn.parseIntersectionDef)(t,I);case Ol.ZodFirstPartyTypeKind.ZodTuple:return(0,GUn.parseTupleDef)(t,I);case Ol.ZodFirstPartyTypeKind.ZodRecord:return(0,sUn.parseRecordDef)(t,I);case Ol.ZodFirstPartyTypeKind.ZodLiteral:return(0,qjn.parseLiteralDef)(t,I);case Ol.ZodFirstPartyTypeKind.ZodEnum:return(0,Kjn.parseEnumDef)(t);case Ol.ZodFirstPartyTypeKind.ZodNativeEnum:return(0,$jn.parseNativeEnumDef)(t);case Ol.ZodFirstPartyTypeKind.ZodNullable:return(0,IUn.parseNullableDef)(t,I);case Ol.ZodFirstPartyTypeKind.ZodOptional:return(0,aUn.parseOptionalDef)(t,I);case Ol.ZodFirstPartyTypeKind.ZodMap:return(0,Pjn.parseMapDef)(t,I);case Ol.ZodFirstPartyTypeKind.ZodSet:return(0,oUn.parseSetDef)(t,I);case Ol.ZodFirstPartyTypeKind.ZodLazy:return()=>t.getter()._def;case Ol.ZodFirstPartyTypeKind.ZodPromise:return(0,rUn.parsePromiseDef)(t,I);case Ol.ZodFirstPartyTypeKind.ZodNaN:case Ol.ZodFirstPartyTypeKind.ZodNever:return(0,eUn.parseNeverDef)(I);case Ol.ZodFirstPartyTypeKind.ZodEffects:return(0,_jn.parseEffectsDef)(t,I);case Ol.ZodFirstPartyTypeKind.ZodAny:return(0,jjn.parseAnyDef)(I);case Ol.ZodFirstPartyTypeKind.ZodUnknown:return(0,bUn.parseUnknownDef)(I);case Ol.ZodFirstPartyTypeKind.ZodDefault:return(0,Tjn.parseDefaultDef)(t,I);case Ol.ZodFirstPartyTypeKind.ZodBranded:return(0,Bjn.parseBrandedDef)(t,I);case Ol.ZodFirstPartyTypeKind.ZodReadonly:return(0,mUn.parseReadonlyDef)(t,I);case Ol.ZodFirstPartyTypeKind.ZodCatch:return(0,Mjn.parseCatchDef)(t,I);case Ol.ZodFirstPartyTypeKind.ZodPipeline:return(0,cUn.parsePipelineDef)(t,I);case Ol.ZodFirstPartyTypeKind.ZodFunction:case Ol.ZodFirstPartyTypeKind.ZodVoid:case Ol.ZodFirstPartyTypeKind.ZodSymbol:return;default:return(l=>{})(e)}};gRe.selectParser=ZUn});var Js=Y(vRe=>{"use strict";o();Object.defineProperty(vRe,"__esModule",{value:!0});vRe.parseDef=void 0;var pUn=zYe(),hUn=$qe(),WUn=SYe(),pdI=AR();function hdI(t,e,I=!1){let l=e.seen.get(t);if(e.override){let r=e.override?.(t,e,l,I);if(r!==pUn.ignoreOverride)return r}if(l&&!I){let r=NUn(l,e);if(r!==void 0)return r}let n={def:t,path:e.currentPath,jsonSchema:void 0};e.seen.set(t,n);let a=(0,hUn.selectParser)(t,t.typeName,e),c=typeof a=="function"?hdI(a(),e):a;if(c&&VUn(t,e,c),e.postProcess){let r=e.postProcess(c,t,e);return n.jsonSchema=c,r}return n.jsonSchema=c,c}vRe.parseDef=hdI;var NUn=(t,e)=>{switch(e.$refStrategy){case"root":return{$ref:t.path.join("/")};case"relative":return{$ref:(0,WUn.getRelativePath)(e.currentPath,t.path)};case"none":case"seen":return t.path.lengthe.currentPath[l]===I)?(console.warn(`Recursive reference detected at ${e.currentPath.join("/")}! Defaulting to any`),(0,pdI.parseAnyDef)(e)):e.$refStrategy==="seen"?(0,pdI.parseAnyDef)(e):void 0}},VUn=(t,e,I)=>(t.description&&(I.description=t.description,e.markdownDescription&&(I.markdownDescription=t.description)),I)});var NdI=Y(WdI=>{"use strict";o();Object.defineProperty(WdI,"__esModule",{value:!0})});var ePe=Y(yRe=>{"use strict";o();Object.defineProperty(yRe,"__esModule",{value:!0});yRe.zodToJsonSchema=void 0;var VdI=Js(),YUn=Aqe(),YdI=AR(),RUn=(t,e)=>{let I=(0,YUn.getRefs)(e),l=typeof e=="object"&&e.definitions?Object.entries(e.definitions).reduce((s,[i,G])=>({...s,[i]:(0,VdI.parseDef)(G._def,{...I,currentPath:[...I.basePath,I.definitionPath,i]},!0)??(0,YdI.parseAnyDef)(I)}),{}):void 0,n=typeof e=="string"?e:e?.nameStrategy==="title"?void 0:e?.name,a=(0,VdI.parseDef)(t._def,n===void 0?I:{...I,currentPath:[...I.basePath,I.definitionPath,n]},!1)??(0,YdI.parseAnyDef)(I),c=typeof e=="object"&&e.name!==void 0&&e.nameStrategy==="title"?e.name:void 0;c!==void 0&&(a.title=c),I.flags.hasReferencedOpenAiAnyType&&(l||(l={}),l[I.openAiAnyTypeName]||(l[I.openAiAnyTypeName]={type:["string","number","integer","boolean","array","null"],items:{$ref:I.$refStrategy==="relative"?"1":[...I.basePath,I.definitionPath,I.openAiAnyTypeName].join("/")}}));let r=n===void 0?l?{...a,[I.definitionPath]:l}:a:{$ref:[...I.$refStrategy==="relative"?[]:I.basePath,I.definitionPath,n].join("/"),[I.definitionPath]:{...l,[n]:a}};return I.target==="jsonSchema7"?r.$schema="http://json-schema.org/draft-07/schema#":(I.target==="jsonSchema2019-09"||I.target==="openAi")&&(r.$schema="https://json-schema.org/draft/2019-09/schema#"),I.target==="openAi"&&("anyOf"in r||"oneOf"in r||"allOf"in r||"type"in r&&Array.isArray(r.type))&&console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."),r};yRe.zodToJsonSchema=RUn});var RdI=Y(TI=>{"use strict";o();var AUn=TI&&TI.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),wl=TI&&TI.__exportStar||function(t,e){for(var I in t)I!=="default"&&!Object.prototype.hasOwnProperty.call(e,I)&&AUn(e,t,I)};Object.defineProperty(TI,"__esModule",{value:!0});wl(zYe(),TI);wl(Aqe(),TI);wl(X1(),TI);wl(SYe(),TI);wl(Js(),TI);wl(NdI(),TI);wl(AR(),TI);wl(Fqe(),TI);wl(Xqe(),TI);wl(gqe(),TI);wl($Ye(),TI);wl(vqe(),TI);wl(yqe(),TI);wl(wqe(),TI);wl(Hqe(),TI);wl(Qqe(),TI);wl(fqe(),TI);wl(Eqe(),TI);wl(Lqe(),TI);wl(kqe(),TI);wl(xqe(),TI);wl(jqe(),TI);wl(Uqe(),TI);wl(Oqe(),TI);wl(zqe(),TI);wl(Bqe(),TI);wl(Mqe(),TI);wl(Sqe(),TI);wl(Pqe(),TI);wl(oRe(),TI);wl(Tqe(),TI);wl(rRe(),TI);wl(Kqe(),TI);wl(Dqe(),TI);wl(bRe(),TI);wl(qqe(),TI);wl($qe(),TI);wl(ePe(),TI);var FUn=ePe();TI.default=FUn.zodToJsonSchema});var FdI=Y(fee=>{"use strict";o();Object.defineProperty(fee,"__esModule",{value:!0});fee.transformToChatCompletionRequest=gUn;fee.convertToParsedChatCompletionResponse=vUn;fee.responseFormatFromZodObject=AdI;var XUn=RdI();function gUn(t){let{responseFormat:e,...I}=t,l=AdI(e);return{...I,responseFormat:l}}function vUn(t,e){if(t.choices===void 0||t.choices.length===0)return{...t,choices:t.choices===void 0?void 0:[]};let I=[];for(let l of t.choices)l.message===null||typeof l.message>"u"?I.push({...l,message:void 0}):l.message.content!==null&&typeof l.message.content<"u"&&!Array.isArray(l.message.content)&&I.push({...l,message:{...l.message,parsed:e.safeParse(JSON.parse(l.message.content)).data}});return{...t,choices:I}}function AdI(t){return{type:"json_schema",jsonSchema:{name:"placeholderName",schemaDefinition:(0,XUn.zodToJsonSchema)(t),strict:!0}}}});var vdI=Y(HRe=>{"use strict";o();Object.defineProperty(HRe,"__esModule",{value:!0});HRe.Chat=void 0;var XdI=PGI(),gdI=tdI(),yUn=En(),wRe=da(),tPe=FdI(),IPe=class extends yUn.ClientSDK{async parse(e,I){let l=(0,tPe.transformToChatCompletionRequest)(e),n=await(0,wRe.unwrapAsync)((0,XdI.chatComplete)(this,l,I));return(0,tPe.convertToParsedChatCompletionResponse)(n,e.responseFormat)}async parseStream(e,I){let l=(0,tPe.transformToChatCompletionRequest)(e);return(0,wRe.unwrapAsync)((0,gdI.chatStream)(this,l,I))}async complete(e,I){return(0,wRe.unwrapAsync)((0,XdI.chatComplete)(this,e,I))}async stream(e,I){return(0,wRe.unwrapAsync)((0,gdI.chatStream)(this,e,I))}};HRe.Chat=IPe});var HdI=Y(Vw=>{"use strict";o();var wUn=Vw&&Vw.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),HUn=Vw&&Vw.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),lPe=Vw&&Vw.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nwdI.ClassificationRequest$outboundSchema.parse(N),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,QUn.encodeJSON)("body",n,{explode:!0}),c=(0,JUn.pathToFunc)("/v1/classifications")(),r=new Headers((0,fUn.compactMap)({"Content-Type":"application/json",Accept:"application/json"})),s=await(0,ydI.extractSecurity)(t._options.apiKey),i=s==null?{}:{apiKey:s},G=(0,ydI.resolveGlobalSecurity)(i),d={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"classifications_v1_classifications_post",oAuth2Scopes:null,resolvedSecurity:G,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},u=t._createRequest(d,{security:G,method:"POST",baseURL:I?.serverURL,path:c,headers:r,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!u.ok)return[u,{status:"invalid"}];let b=u.value,Z=await t._do(b,{context:d,errorCodes:["422","4XX","5XX"],retryConfig:d.retryConfig,retryCodes:d.retryCodes});if(!Z.ok)return[Z,{status:"request-error",request:b}];let p=Z.value,W={HttpMeta:{Response:p,Request:b}},[h]=await Eee.match(Eee.json(200,wdI.ClassificationResponse$inboundSchema),Eee.jsonErr(422,CUn.HTTPValidationError$inboundSchema),Eee.fail("4XX"),Eee.fail("5XX"))(p,b,{extraFields:W});return h.ok?[h,{status:"complete",request:b,response:p}]:[h,{status:"complete",request:b,response:p}]}});var EdI=Y(Yw=>{"use strict";o();var jUn=Yw&&Yw.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),UUn=Yw&&Yw.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),nPe=Yw&&Yw.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nfdI.ChatClassificationRequest$outboundSchema.parse(N),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,OUn.encodeJSON)("body",n,{explode:!0}),c=(0,MUn.pathToFunc)("/v1/chat/classifications")(),r=new Headers((0,zUn.compactMap)({"Content-Type":"application/json",Accept:"application/json"})),s=await(0,QdI.extractSecurity)(t._options.apiKey),i=s==null?{}:{apiKey:s},G=(0,QdI.resolveGlobalSecurity)(i),d={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"chat_classifications_v1_chat_classifications_post",oAuth2Scopes:null,resolvedSecurity:G,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},u=t._createRequest(d,{security:G,method:"POST",baseURL:I?.serverURL,path:c,headers:r,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!u.ok)return[u,{status:"invalid"}];let b=u.value,Z=await t._do(b,{context:d,errorCodes:["422","4XX","5XX"],retryConfig:d.retryConfig,retryCodes:d.retryCodes});if(!Z.ok)return[Z,{status:"request-error",request:b}];let p=Z.value,W={HttpMeta:{Response:p,Request:b}},[h]=await Jee.match(Jee.json(200,fdI.ClassificationResponse$inboundSchema),Jee.jsonErr(422,SUn.HTTPValidationError$inboundSchema),Jee.fail("4XX"),Jee.fail("5XX"))(p,b,{extraFields:W});return h.ok?[h,{status:"complete",request:b,response:p}]:[h,{status:"complete",request:b,response:p}]}});var LdI=Y(Rw=>{"use strict";o();var DUn=Rw&&Rw.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),qUn=Rw&&Rw.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),aPe=Rw&&Rw.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nCdI.ClassificationRequest$outboundSchema.parse(N),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,PUn.encodeJSON)("body",n,{explode:!0}),c=(0,t9n.pathToFunc)("/v1/moderations")(),r=new Headers((0,$Un.compactMap)({"Content-Type":"application/json",Accept:"application/json"})),s=await(0,JdI.extractSecurity)(t._options.apiKey),i=s==null?{}:{apiKey:s},G=(0,JdI.resolveGlobalSecurity)(i),d={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"moderations_v1_moderations_post",oAuth2Scopes:null,resolvedSecurity:G,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},u=t._createRequest(d,{security:G,method:"POST",baseURL:I?.serverURL,path:c,headers:r,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!u.ok)return[u,{status:"invalid"}];let b=u.value,Z=await t._do(b,{context:d,errorCodes:["422","4XX","5XX"],retryConfig:d.retryConfig,retryCodes:d.retryCodes});if(!Z.ok)return[Z,{status:"request-error",request:b}];let p=Z.value,W={HttpMeta:{Response:p,Request:b}},[h]=await Cee.match(Cee.json(200,CdI.ModerationResponse$inboundSchema),Cee.jsonErr(422,I9n.HTTPValidationError$inboundSchema),Cee.fail("4XX"),Cee.fail("5XX"))(p,b,{extraFields:W});return h.ok?[h,{status:"complete",request:b,response:p}]:[h,{status:"complete",request:b,response:p}]}});var jdI=Y(Aw=>{"use strict";o();var c9n=Aw&&Aw.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),r9n=Aw&&Aw.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),cPe=Aw&&Aw.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nxdI.ChatModerationRequest$outboundSchema.parse(N),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,s9n.encodeJSON)("body",n,{explode:!0}),c=(0,G9n.pathToFunc)("/v1/chat/moderations")(),r=new Headers((0,o9n.compactMap)({"Content-Type":"application/json",Accept:"application/json"})),s=await(0,kdI.extractSecurity)(t._options.apiKey),i=s==null?{}:{apiKey:s},G=(0,kdI.resolveGlobalSecurity)(i),d={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"chat_moderations_v1_chat_moderations_post",oAuth2Scopes:null,resolvedSecurity:G,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},u=t._createRequest(d,{security:G,method:"POST",baseURL:I?.serverURL,path:c,headers:r,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!u.ok)return[u,{status:"invalid"}];let b=u.value,Z=await t._do(b,{context:d,errorCodes:["422","4XX","5XX"],retryConfig:d.retryConfig,retryCodes:d.retryCodes});if(!Z.ok)return[Z,{status:"request-error",request:b}];let p=Z.value,W={HttpMeta:{Response:p,Request:b}},[h]=await Lee.match(Lee.json(200,xdI.ModerationResponse$inboundSchema),Lee.jsonErr(422,d9n.HTTPValidationError$inboundSchema),Lee.fail("4XX"),Lee.fail("5XX"))(p,b,{extraFields:W});return h.ok?[h,{status:"complete",request:b,response:p}]:[h,{status:"complete",request:b,response:p}]}});var UdI=Y(fRe=>{"use strict";o();Object.defineProperty(fRe,"__esModule",{value:!0});fRe.Classifiers=void 0;var Z9n=HdI(),p9n=EdI(),h9n=LdI(),W9n=jdI(),N9n=En(),QRe=da(),rPe=class extends N9n.ClientSDK{async moderate(e,I){return(0,QRe.unwrapAsync)((0,h9n.classifiersModerate)(this,e,I))}async moderateChat(e,I){return(0,QRe.unwrapAsync)((0,W9n.classifiersModerateChat)(this,e,I))}async classify(e,I){return(0,QRe.unwrapAsync)((0,Z9n.classifiersClassify)(this,e,I))}async classifyChat(e,I){return(0,QRe.unwrapAsync)((0,p9n.classifiersClassifyChat)(this,e,I))}};fRe.Classifiers=rPe});var BdI=Y(Fw=>{"use strict";o();var V9n=Fw&&Fw.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Y9n=Fw&&Fw.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),sPe=Fw&&Fw.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nzdI.EmbeddingRequest$outboundSchema.parse(N),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,R9n.encodeJSON)("body",n,{explode:!0}),c=(0,X9n.pathToFunc)("/v1/embeddings")(),r=new Headers((0,A9n.compactMap)({"Content-Type":"application/json",Accept:"application/json"})),s=await(0,OdI.extractSecurity)(t._options.apiKey),i=s==null?{}:{apiKey:s},G=(0,OdI.resolveGlobalSecurity)(i),d={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"embeddings_v1_embeddings_post",oAuth2Scopes:null,resolvedSecurity:G,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},u=t._createRequest(d,{security:G,method:"POST",baseURL:I?.serverURL,path:c,headers:r,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!u.ok)return[u,{status:"invalid"}];let b=u.value,Z=await t._do(b,{context:d,errorCodes:["422","4XX","5XX"],retryConfig:d.retryConfig,retryCodes:d.retryCodes});if(!Z.ok)return[Z,{status:"request-error",request:b}];let p=Z.value,W={HttpMeta:{Response:p,Request:b}},[h]=await kee.match(kee.json(200,zdI.EmbeddingResponse$inboundSchema),kee.jsonErr(422,g9n.HTTPValidationError$inboundSchema),kee.fail("4XX"),kee.fail("5XX"))(p,b,{extraFields:W});return h.ok?[h,{status:"complete",request:b,response:p}]:[h,{status:"complete",request:b,response:p}]}});var MdI=Y(ERe=>{"use strict";o();Object.defineProperty(ERe,"__esModule",{value:!0});ERe.Embeddings=void 0;var H9n=BdI(),Q9n=En(),f9n=da(),oPe=class extends Q9n.ClientSDK{async create(e,I){return(0,f9n.unwrapAsync)((0,H9n.embeddingsCreate)(this,e,I))}};ERe.Embeddings=oPe});var TdI=Y(Xw=>{"use strict";o();var E9n=Xw&&Xw.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),J9n=Xw&&Xw.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),iPe=Xw&&Xw.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nU9n.FilesApiRoutesDeleteFileRequest$outboundSchema.parse(N),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={file_id:(0,C9n.encodeSimple)("file_id",n.file_id,{explode:!1,charEncoding:"percent"})},r=(0,x9n.pathToFunc)("/v1/files/{file_id}")(c),s=new Headers((0,L9n.compactMap)({Accept:"application/json"})),i=await(0,SdI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,SdI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"files_api_routes_delete_file",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"DELETE",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,[h]=await JRe.match(JRe.json(200,j9n.DeleteFileOut$inboundSchema),JRe.fail("4XX"),JRe.fail("5XX"))(W,Z);return h.ok?[h,{status:"complete",request:Z,response:W}]:[h,{status:"complete",request:Z,response:W}]}});var KdI=Y(gw=>{"use strict";o();var M9n=gw&&gw.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),S9n=gw&&gw.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),GPe=gw&&gw.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nP9n.FilesApiRoutesDownloadFileRequest$outboundSchema.parse(N),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={file_id:(0,_9n.encodeSimple)("file_id",n.file_id,{explode:!1,charEncoding:"percent"})},r=(0,q9n.pathToFunc)("/v1/files/{file_id}/content")(c),s=new Headers((0,K9n.compactMap)({Accept:"application/octet-stream"})),i=await(0,_dI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,_dI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"files_api_routes_download_file",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"GET",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,[h]=await CRe.match(CRe.stream(200,T9n.instanceof(ReadableStream)),CRe.fail("4XX"),CRe.fail("5XX"))(W,Z);return h.ok?[h,{status:"complete",request:Z,response:W}]:[h,{status:"complete",request:Z,response:W}]}});var PdI=Y(vw=>{"use strict";o();var IOn=vw&&vw.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),lOn=vw&&vw.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),dPe=vw&&vw.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nsOn.FilesApiRoutesGetSignedUrlRequest$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={file_id:(0,DdI.encodeSimple)("file_id",n.file_id,{explode:!1,charEncoding:"percent"})},r=(0,cOn.pathToFunc)("/v1/files/{file_id}/url")(c),s=(0,DdI.encodeFormQuery)({expiry:n.expiry}),i=new Headers((0,nOn.compactMap)({Accept:"application/json"})),G=await(0,qdI.extractSecurity)(t._options.apiKey),d=G==null?{}:{apiKey:G},u=(0,qdI.resolveGlobalSecurity)(d),b={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"files_api_routes_get_signed_url",oAuth2Scopes:null,resolvedSecurity:u,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},Z=t._createRequest(b,{security:u,method:"GET",baseURL:I?.serverURL,path:r,headers:i,query:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!Z.ok)return[Z,{status:"invalid"}];let p=Z.value,W=await t._do(p,{context:b,errorCodes:["4XX","5XX"],retryConfig:b.retryConfig,retryCodes:b.retryCodes});if(!W.ok)return[W,{status:"request-error",request:p}];let h=W.value,[N]=await LRe.match(LRe.json(200,rOn.FileSignedURL$inboundSchema),LRe.fail("4XX"),LRe.fail("5XX"))(h,p);return N.ok?[N,{status:"complete",request:p,response:h}]:[N,{status:"complete",request:p,response:h}]}});var euI=Y(yw=>{"use strict";o();var dOn=yw&&yw.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),uOn=yw&&yw.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),uPe=yw&&yw.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nWOn.FilesApiRoutesListFilesRequest$outboundSchema.optional().parse(N),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c=(0,pOn.pathToFunc)("/v1/files")(),r=(0,bOn.encodeFormQuery)({include_total:n?.include_total,mimetypes:n?.mimetypes,page:n?.page,page_size:n?.page_size,purpose:n?.purpose,sample_type:n?.sample_type,search:n?.search,source:n?.source}),s=new Headers((0,mOn.compactMap)({Accept:"application/json"})),i=await(0,$dI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,$dI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"files_api_routes_list_files",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"GET",baseURL:I?.serverURL,path:c,headers:s,query:r,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,[h]=await kRe.match(kRe.json(200,hOn.ListFilesOut$inboundSchema),kRe.fail("4XX"),kRe.fail("5XX"))(W,Z);return h.ok?[h,{status:"complete",request:Z,response:W}]:[h,{status:"complete",request:Z,response:W}]}});var IuI=Y(ww=>{"use strict";o();var ROn=ww&&ww.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),AOn=ww&&ww.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),bPe=ww&&ww.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nwOn.FilesApiRoutesRetrieveFileRequest$outboundSchema.parse(N),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={file_id:(0,FOn.encodeSimple)("file_id",n.file_id,{explode:!1,charEncoding:"percent"})},r=(0,vOn.pathToFunc)("/v1/files/{file_id}")(c),s=new Headers((0,XOn.compactMap)({Accept:"application/json"})),i=await(0,tuI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,tuI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"files_api_routes_retrieve_file",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"GET",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,[h]=await xRe.match(xRe.json(200,yOn.RetrieveFileOut$inboundSchema),xRe.fail("4XX"),xRe.fail("5XX"))(W,Z);return h.ok?[h,{status:"complete",request:Z,response:W}]:[h,{status:"complete",request:Z,response:W}]}});var nuI=Y(Hw=>{"use strict";o();var EOn=Hw&&Hw.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),JOn=Hw&&Hw.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ZPe=Hw&&Hw.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;njOn.FilesApiRoutesUploadFileMultiPartBodyParams$outboundSchema.parse(h),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=new FormData;if((0,OOn.isBlobLike)(n.file))(0,aM.appendForm)(a,"file",n.file);else if((0,zOn.isReadableStream)(n.file.content)){let h=await(0,mPe.readableStreamToArrayBuffer)(n.file.content),N=(0,mPe.getContentTypeFromFileName)(n.file.fileName)||"application/octet-stream",V=new Blob([h],{type:N});(0,aM.appendForm)(a,"file",V,n.file.fileName)}else{let h=(0,mPe.getContentTypeFromFileName)(n.file.fileName)||"application/octet-stream";(0,aM.appendForm)(a,"file",new Blob([n.file.content],{type:h}),n.file.fileName)}n.expiry!==void 0&&(0,aM.appendForm)(a,"expiry",n.expiry),n.purpose!==void 0&&(0,aM.appendForm)(a,"purpose",n.purpose),n.visibility!==void 0&&(0,aM.appendForm)(a,"visibility",n.visibility);let c=(0,kOn.pathToFunc)("/v1/files")(),r=new Headers((0,COn.compactMap)({Accept:"application/json"})),s=await(0,luI.extractSecurity)(t._options.apiKey),i=s==null?{}:{apiKey:s},G=(0,luI.resolveGlobalSecurity)(i),d={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"files_api_routes_upload_file",oAuth2Scopes:null,resolvedSecurity:G,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},u=t._createRequest(d,{security:G,method:"POST",baseURL:I?.serverURL,path:c,headers:r,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!u.ok)return[u,{status:"invalid"}];let b=u.value,Z=await t._do(b,{context:d,errorCodes:["4XX","5XX"],retryConfig:d.retryConfig,retryCodes:d.retryCodes});if(!Z.ok)return[Z,{status:"request-error",request:b}];let p=Z.value,[W]=await jRe.match(jRe.json(200,xOn.UploadFileOut$inboundSchema),jRe.fail("4XX"),jRe.fail("5XX"))(p,b);return W.ok?[W,{status:"complete",request:b,response:p}]:[W,{status:"complete",request:b,response:p}]}});var auI=Y(URe=>{"use strict";o();Object.defineProperty(URe,"__esModule",{value:!0});URe.Files=void 0;var SOn=TdI(),TOn=KdI(),_On=PdI(),KOn=euI(),DOn=IuI(),qOn=nuI(),POn=En(),cM=da(),pPe=class extends POn.ClientSDK{async upload(e,I){return(0,cM.unwrapAsync)((0,qOn.filesUpload)(this,e,I))}async list(e,I){return(0,cM.unwrapAsync)((0,KOn.filesList)(this,e,I))}async retrieve(e,I){return(0,cM.unwrapAsync)((0,DOn.filesRetrieve)(this,e,I))}async delete(e,I){return(0,cM.unwrapAsync)((0,SOn.filesDelete)(this,e,I))}async download(e,I){return(0,cM.unwrapAsync)((0,TOn.filesDownload)(this,e,I))}async getSignedUrl(e,I){return(0,cM.unwrapAsync)((0,_On.filesGetSignedUrl)(this,e,I))}};URe.Files=pPe});var suI=Y(Qw=>{"use strict";o();var $On=Qw&&Qw.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),ezn=Qw&&Qw.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),hPe=Qw&&Qw.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nruI.FIMCompletionRequest$outboundSchema.parse(N),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,tzn.encodeJSON)("body",n,{explode:!0}),c=(0,nzn.pathToFunc)("/v1/fim/completions")(),r=new Headers((0,Izn.compactMap)({"Content-Type":"application/json",Accept:"application/json"})),s=await(0,cuI.extractSecurity)(t._options.apiKey),i=s==null?{}:{apiKey:s},G=(0,cuI.resolveGlobalSecurity)(i),d={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"fim_completion_v1_fim_completions_post",oAuth2Scopes:null,resolvedSecurity:G,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},u=t._createRequest(d,{security:G,method:"POST",baseURL:I?.serverURL,path:c,headers:r,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!u.ok)return[u,{status:"invalid"}];let b=u.value,Z=await t._do(b,{context:d,errorCodes:["422","4XX","5XX"],retryConfig:d.retryConfig,retryCodes:d.retryCodes});if(!Z.ok)return[Z,{status:"request-error",request:b}];let p=Z.value,W={HttpMeta:{Response:p,Request:b}},[h]=await xee.match(xee.json(200,ruI.FIMCompletionResponse$inboundSchema),xee.jsonErr(422,azn.HTTPValidationError$inboundSchema),xee.fail("4XX"),xee.fail("5XX"))(p,b,{extraFields:W});return h.ok?[h,{status:"complete",request:b,response:p}]:[h,{status:"complete",request:b,response:p}]}});var GuI=Y(fw=>{"use strict";o();var ozn=fw&&fw.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),izn=fw&&fw.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ORe=fw&&fw.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;niuI.FIMCompletionStreamRequest$outboundSchema.parse(N),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,dzn.encodeJSON)("body",n,{explode:!0}),c=(0,Zzn.pathToFunc)("/v1/fim/completions#stream")(),r=new Headers((0,bzn.compactMap)({"Content-Type":"application/json",Accept:"text/event-stream"})),s=await(0,ouI.extractSecurity)(t._options.apiKey),i=s==null?{}:{apiKey:s},G=(0,ouI.resolveGlobalSecurity)(i),d={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"stream_fim",oAuth2Scopes:null,resolvedSecurity:G,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},u=t._createRequest(d,{security:G,method:"POST",baseURL:I?.serverURL,path:c,headers:r,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!u.ok)return[u,{status:"invalid"}];let b=u.value,Z=await t._do(b,{context:d,errorCodes:["422","4XX","5XX"],retryConfig:d.retryConfig,retryCodes:d.retryCodes});if(!Z.ok)return[Z,{status:"request-error",request:b}];let p=Z.value,W={HttpMeta:{Response:p,Request:b}},[h]=await jee.match(jee.sse(200,Gzn.instanceof(ReadableStream).transform(N=>new uzn.EventStream(N,V=>V.data==="[DONE]"?{done:!0}:{value:iuI.CompletionEvent$inboundSchema.parse(V)}))),jee.jsonErr(422,pzn.HTTPValidationError$inboundSchema),jee.fail("4XX"),jee.fail("5XX"))(p,b,{extraFields:W});return h.ok?[h,{status:"complete",request:b,response:p}]:[h,{status:"complete",request:b,response:p}]}});var uuI=Y(zRe=>{"use strict";o();Object.defineProperty(zRe,"__esModule",{value:!0});zRe.Fim=void 0;var Vzn=suI(),Yzn=GuI(),Rzn=En(),duI=da(),WPe=class extends Rzn.ClientSDK{async complete(e,I){return(0,duI.unwrapAsync)((0,Vzn.fimComplete)(this,e,I))}async stream(e,I){return(0,duI.unwrapAsync)((0,Yzn.fimStream)(this,e,I))}};zRe.Fim=WPe});var puI=Y(Ew=>{"use strict";o();var Azn=Ew&&Ew.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Fzn=Ew&&Ew.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ZuI=Ew&&Ew.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nmuI.JobsApiRoutesFineTuningCancelFineTuningJobRequest$outboundSchema.parse(N),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={job_id:(0,Xzn.encodeSimple)("job_id",n.job_id,{explode:!1,charEncoding:"percent"})},r=(0,yzn.pathToFunc)("/v1/fine_tuning/jobs/{job_id}/cancel")(c),s=new Headers((0,gzn.compactMap)({Accept:"application/json"})),i=await(0,buI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,buI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"jobs_api_routes_fine_tuning_cancel_fine_tuning_job",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"POST",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,[h]=await BRe.match(BRe.json(200,muI.JobsApiRoutesFineTuningCancelFineTuningJobResponse$inboundSchema),BRe.fail("4XX"),BRe.fail("5XX"))(W,Z);return h.ok?[h,{status:"complete",request:Z,response:W}]:[h,{status:"complete",request:Z,response:W}]}});var WuI=Y(Jw=>{"use strict";o();var fzn=Jw&&Jw.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Ezn=Jw&&Jw.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),NPe=Jw&&Jw.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nxzn.JobIn$outboundSchema.parse(h),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,Jzn.encodeJSON)("body",n,{explode:!0}),c=(0,kzn.pathToFunc)("/v1/fine_tuning/jobs")(),r=new Headers((0,Czn.compactMap)({"Content-Type":"application/json",Accept:"application/json"})),s=await(0,huI.extractSecurity)(t._options.apiKey),i=s==null?{}:{apiKey:s},G=(0,huI.resolveGlobalSecurity)(i),d={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"jobs_api_routes_fine_tuning_create_fine_tuning_job",oAuth2Scopes:null,resolvedSecurity:G,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},u=t._createRequest(d,{security:G,method:"POST",baseURL:I?.serverURL,path:c,headers:r,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!u.ok)return[u,{status:"invalid"}];let b=u.value,Z=await t._do(b,{context:d,errorCodes:["4XX","5XX"],retryConfig:d.retryConfig,retryCodes:d.retryCodes});if(!Z.ok)return[Z,{status:"request-error",request:b}];let p=Z.value,[W]=await MRe.match(MRe.json(200,jzn.JobsApiRoutesFineTuningCreateFineTuningJobResponse$inboundSchema),MRe.fail("4XX"),MRe.fail("5XX"))(p,b);return W.ok?[W,{status:"complete",request:b,response:p}]:[W,{status:"complete",request:b,response:p}]}});var RuI=Y(Cw=>{"use strict";o();var Bzn=Cw&&Cw.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Mzn=Cw&&Cw.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),YuI=Cw&&Cw.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nVuI.JobsApiRoutesFineTuningGetFineTuningJobRequest$outboundSchema.parse(N),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={job_id:(0,Szn.encodeSimple)("job_id",n.job_id,{explode:!1,charEncoding:"percent"})},r=(0,Kzn.pathToFunc)("/v1/fine_tuning/jobs/{job_id}")(c),s=new Headers((0,Tzn.compactMap)({Accept:"application/json"})),i=await(0,NuI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,NuI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"jobs_api_routes_fine_tuning_get_fine_tuning_job",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"GET",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,[h]=await SRe.match(SRe.json(200,VuI.JobsApiRoutesFineTuningGetFineTuningJobResponse$inboundSchema),SRe.fail("4XX"),SRe.fail("5XX"))(W,Z);return h.ok?[h,{status:"complete",request:Z,response:W}]:[h,{status:"complete",request:Z,response:W}]}});var FuI=Y(Lw=>{"use strict";o();var $zn=Lw&&Lw.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),eBn=Lw&&Lw.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),VPe=Lw&&Lw.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;ncBn.JobsApiRoutesFineTuningGetFineTuningJobsRequest$outboundSchema.optional().parse(N),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c=(0,nBn.pathToFunc)("/v1/fine_tuning/jobs")(),r=(0,tBn.encodeFormQuery)({created_after:n?.created_after,created_before:n?.created_before,created_by_me:n?.created_by_me,model:n?.model,page:n?.page,page_size:n?.page_size,status:n?.status,suffix:n?.suffix,wandb_name:n?.wandb_name,wandb_project:n?.wandb_project}),s=new Headers((0,IBn.compactMap)({Accept:"application/json"})),i=await(0,AuI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,AuI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"jobs_api_routes_fine_tuning_get_fine_tuning_jobs",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"GET",baseURL:I?.serverURL,path:c,headers:s,query:r,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,[h]=await TRe.match(TRe.json(200,aBn.JobsOut$inboundSchema),TRe.fail("4XX"),TRe.fail("5XX"))(W,Z);return h.ok?[h,{status:"complete",request:Z,response:W}]:[h,{status:"complete",request:Z,response:W}]}});var yuI=Y(kw=>{"use strict";o();var iBn=kw&&kw.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),GBn=kw&&kw.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),vuI=kw&&kw.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nguI.JobsApiRoutesFineTuningStartFineTuningJobRequest$outboundSchema.parse(N),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={job_id:(0,dBn.encodeSimple)("job_id",n.job_id,{explode:!1,charEncoding:"percent"})},r=(0,mBn.pathToFunc)("/v1/fine_tuning/jobs/{job_id}/start")(c),s=new Headers((0,uBn.compactMap)({Accept:"application/json"})),i=await(0,XuI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,XuI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"jobs_api_routes_fine_tuning_start_fine_tuning_job",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"POST",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,[h]=await _Re.match(_Re.json(200,guI.JobsApiRoutesFineTuningStartFineTuningJobResponse$inboundSchema),_Re.fail("4XX"),_Re.fail("5XX"))(W,Z);return h.ok?[h,{status:"complete",request:Z,response:W}]:[h,{status:"complete",request:Z,response:W}]}});var wuI=Y(KRe=>{"use strict";o();Object.defineProperty(KRe,"__esModule",{value:!0});KRe.Jobs=void 0;var WBn=puI(),NBn=WuI(),VBn=RuI(),YBn=FuI(),RBn=yuI(),ABn=En(),Uee=da(),YPe=class extends ABn.ClientSDK{async list(e,I){return(0,Uee.unwrapAsync)((0,YBn.fineTuningJobsList)(this,e,I))}async create(e,I){return(0,Uee.unwrapAsync)((0,NBn.fineTuningJobsCreate)(this,e,I))}async get(e,I){return(0,Uee.unwrapAsync)((0,VBn.fineTuningJobsGet)(this,e,I))}async cancel(e,I){return(0,Uee.unwrapAsync)((0,WBn.fineTuningJobsCancel)(this,e,I))}async start(e,I){return(0,Uee.unwrapAsync)((0,RBn.fineTuningJobsStart)(this,e,I))}};KRe.Jobs=YPe});var HuI=Y(DRe=>{"use strict";o();Object.defineProperty(DRe,"__esModule",{value:!0});DRe.FineTuning=void 0;var FBn=En(),XBn=wuI(),RPe=class extends FBn.ClientSDK{get jobs(){return this._jobs??(this._jobs=new XBn.Jobs(this._options))}};DRe.FineTuning=RPe});var fuI=Y(xw=>{"use strict";o();var gBn=xw&&xw.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),vBn=xw&&xw.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),APe=xw&&xw.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nEBn.JobsApiRoutesFineTuningArchiveFineTunedModelRequest$outboundSchema.parse(N),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={model_id:(0,yBn.encodeSimple)("model_id",n.model_id,{explode:!1,charEncoding:"percent"})},r=(0,QBn.pathToFunc)("/v1/fine_tuning/models/{model_id}/archive")(c),s=new Headers((0,wBn.compactMap)({Accept:"application/json"})),i=await(0,QuI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,QuI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"jobs_api_routes_fine_tuning_archive_fine_tuned_model",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"POST",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,[h]=await qRe.match(qRe.json(200,fBn.ArchiveFTModelOut$inboundSchema),qRe.fail("4XX"),qRe.fail("5XX"))(W,Z);return h.ok?[h,{status:"complete",request:Z,response:W}]:[h,{status:"complete",request:Z,response:W}]}});var JuI=Y(jw=>{"use strict";o();var kBn=jw&&jw.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),xBn=jw&&jw.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),PRe=jw&&jw.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nSBn.DeleteModelV1ModelsModelIdDeleteRequest$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={model_id:(0,jBn.encodeSimple)("model_id",n.model_id,{explode:!1,charEncoding:"percent"})},r=(0,zBn.pathToFunc)("/v1/models/{model_id}")(c),s=new Headers((0,UBn.compactMap)({Accept:"application/json"})),i=await(0,EuI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,EuI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"delete_model_v1_models__model_id__delete",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"DELETE",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await Oee.match(Oee.json(200,BBn.DeleteModelOut$inboundSchema),Oee.jsonErr(422,MBn.HTTPValidationError$inboundSchema),Oee.fail("4XX"),Oee.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var LuI=Y(Uw=>{"use strict";o();var DBn=Uw&&Uw.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),qBn=Uw&&Uw.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),$Re=Uw&&Uw.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nnMn.ListModelsV1ModelsGetRequest$outboundSchema.optional().parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c=(0,tMn.pathToFunc)("/v1/models")(),r=(0,PBn.encodeFormQuery)({model:n?.model,provider:n?.provider}),s=new Headers((0,$Bn.compactMap)({Accept:"application/json"})),i=await(0,CuI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,CuI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"list_models_v1_models_get",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"GET",baseURL:I?.serverURL,path:c,headers:s,query:r,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await zee.match(zee.json(200,IMn.ModelList$inboundSchema),zee.jsonErr(422,lMn.HTTPValidationError$inboundSchema),zee.fail("4XX"),zee.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var juI=Y(Ow=>{"use strict";o();var sMn=Ow&&Ow.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),oMn=Ow&&Ow.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),FPe=Ow&&Ow.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nxuI.RetrieveModelV1ModelsModelIdGetRequest$outboundSchema.parse(V),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={model_id:(0,iMn.encodeSimple)("model_id",n.model_id,{explode:!1,charEncoding:"percent"})},r=(0,uMn.pathToFunc)("/v1/models/{model_id}")(c),s=new Headers((0,GMn.compactMap)({Accept:"application/json"})),i=await(0,kuI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,kuI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"retrieve_model_v1_models__model_id__get",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"GET",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["422","4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,h={HttpMeta:{Response:W,Request:Z}},[N]=await Bee.match(Bee.json(200,xuI.RetrieveModelV1ModelsModelIdGetResponseRetrieveModelV1ModelsModelIdGet$inboundSchema),Bee.jsonErr(422,bMn.HTTPValidationError$inboundSchema),Bee.fail("4XX"),Bee.fail("5XX"))(W,Z,{extraFields:h});return N.ok?[N,{status:"complete",request:Z,response:W}]:[N,{status:"complete",request:Z,response:W}]}});var OuI=Y(zw=>{"use strict";o();var hMn=zw&&zw.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),WMn=zw&&zw.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),XPe=zw&&zw.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nFMn.JobsApiRoutesFineTuningUnarchiveFineTunedModelRequest$outboundSchema.parse(N),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=null,c={model_id:(0,NMn.encodeSimple)("model_id",n.model_id,{explode:!1,charEncoding:"percent"})},r=(0,RMn.pathToFunc)("/v1/fine_tuning/models/{model_id}/archive")(c),s=new Headers((0,VMn.compactMap)({Accept:"application/json"})),i=await(0,UuI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,UuI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"jobs_api_routes_fine_tuning_unarchive_fine_tuned_model",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"DELETE",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,[h]=await e0e.match(e0e.json(200,AMn.UnarchiveFTModelOut$inboundSchema),e0e.fail("4XX"),e0e.fail("5XX"))(W,Z);return h.ok?[h,{status:"complete",request:Z,response:W}]:[h,{status:"complete",request:Z,response:W}]}});var TuI=Y(Bw=>{"use strict";o();var yMn=Bw&&Bw.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),wMn=Bw&&Bw.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),SuI=Bw&&Bw.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nMuI.JobsApiRoutesFineTuningUpdateFineTunedModelRequest$outboundSchema.parse(N),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,zuI.encodeJSON)("body",n.UpdateFTModelIn,{explode:!0}),c={model_id:(0,zuI.encodeSimple)("model_id",n.model_id,{explode:!1,charEncoding:"percent"})},r=(0,fMn.pathToFunc)("/v1/fine_tuning/models/{model_id}")(c),s=new Headers((0,HMn.compactMap)({"Content-Type":"application/json",Accept:"application/json"})),i=await(0,BuI.extractSecurity)(t._options.apiKey),G=i==null?{}:{apiKey:i},d=(0,BuI.resolveGlobalSecurity)(G),u={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"jobs_api_routes_fine_tuning_update_fine_tuned_model",oAuth2Scopes:null,resolvedSecurity:d,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},b=t._createRequest(u,{security:d,method:"PATCH",baseURL:I?.serverURL,path:r,headers:s,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!b.ok)return[b,{status:"invalid"}];let Z=b.value,p=await t._do(Z,{context:u,errorCodes:["4XX","5XX"],retryConfig:u.retryConfig,retryCodes:u.retryCodes});if(!p.ok)return[p,{status:"request-error",request:Z}];let W=p.value,[h]=await t0e.match(t0e.json(200,MuI.JobsApiRoutesFineTuningUpdateFineTunedModelResponse$inboundSchema),t0e.fail("4XX"),t0e.fail("5XX"))(W,Z);return h.ok?[h,{status:"complete",request:Z,response:W}]:[h,{status:"complete",request:Z,response:W}]}});var _uI=Y(I0e=>{"use strict";o();Object.defineProperty(I0e,"__esModule",{value:!0});I0e.Models=void 0;var LMn=fuI(),kMn=JuI(),xMn=LuI(),jMn=juI(),UMn=OuI(),OMn=TuI(),zMn=En(),rM=da(),gPe=class extends zMn.ClientSDK{async list(e,I){return(0,rM.unwrapAsync)((0,xMn.modelsList)(this,e,I))}async retrieve(e,I){return(0,rM.unwrapAsync)((0,jMn.modelsRetrieve)(this,e,I))}async delete(e,I){return(0,rM.unwrapAsync)((0,kMn.modelsDelete)(this,e,I))}async update(e,I){return(0,rM.unwrapAsync)((0,OMn.modelsUpdate)(this,e,I))}async archive(e,I){return(0,rM.unwrapAsync)((0,LMn.modelsArchive)(this,e,I))}async unarchive(e,I){return(0,rM.unwrapAsync)((0,UMn.modelsUnarchive)(this,e,I))}};I0e.Models=gPe});var quI=Y(Mw=>{"use strict";o();var BMn=Mw&&Mw.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),MMn=Mw&&Mw.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),vPe=Mw&&Mw.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;nDuI.OCRRequest$outboundSchema.parse(N),"Input validation failed");if(!l.ok)return[l,{status:"invalid"}];let n=l.value,a=(0,SMn.encodeJSON)("body",n,{explode:!0}),c=(0,KMn.pathToFunc)("/v1/ocr")(),r=new Headers((0,TMn.compactMap)({"Content-Type":"application/json",Accept:"application/json"})),s=await(0,KuI.extractSecurity)(t._options.apiKey),i=s==null?{}:{apiKey:s},G=(0,KuI.resolveGlobalSecurity)(i),d={options:t._options,baseURL:I?.serverURL??t._baseURL??"",operationID:"ocr_v1_ocr_post",oAuth2Scopes:null,resolvedSecurity:G,securitySource:t._options.apiKey,retryConfig:I?.retries||t._options.retryConfig||{strategy:"none"},retryCodes:I?.retryCodes||["429","500","502","503","504"]},u=t._createRequest(d,{security:G,method:"POST",baseURL:I?.serverURL,path:c,headers:r,body:a,userAgent:t._options.userAgent,timeoutMs:I?.timeoutMs||t._options.timeoutMs||-1},I);if(!u.ok)return[u,{status:"invalid"}];let b=u.value,Z=await t._do(b,{context:d,errorCodes:["422","4XX","5XX"],retryConfig:d.retryConfig,retryCodes:d.retryCodes});if(!Z.ok)return[Z,{status:"request-error",request:b}];let p=Z.value,W={HttpMeta:{Response:p,Request:b}},[h]=await Mee.match(Mee.json(200,DuI.OCRResponse$inboundSchema),Mee.jsonErr(422,DMn.HTTPValidationError$inboundSchema),Mee.fail("4XX"),Mee.fail("5XX"))(p,b,{extraFields:W});return h.ok?[h,{status:"complete",request:b,response:p}]:[h,{status:"complete",request:b,response:p}]}});var PuI=Y(l0e=>{"use strict";o();Object.defineProperty(l0e,"__esModule",{value:!0});l0e.Ocr=void 0;var eSn=quI(),tSn=En(),ISn=da(),yPe=class extends tSn.ClientSDK{async process(e,I){return(0,ISn.unwrapAsync)((0,eSn.ocrProcess)(this,e,I))}};l0e.Ocr=yPe});var $uI=Y(n0e=>{"use strict";o();Object.defineProperty(n0e,"__esModule",{value:!0});n0e.Mistral=void 0;var lSn=En(),nSn=FlI(),aSn=JlI(),cSn=ArI(),rSn=KGI(),sSn=vdI(),oSn=UdI(),iSn=MdI(),GSn=auI(),dSn=uuI(),uSn=HuI(),bSn=_uI(),mSn=PuI(),wPe=class extends lSn.ClientSDK{get models(){return this._models??(this._models=new bSn.Models(this._options))}get beta(){return this._beta??(this._beta=new rSn.Beta(this._options))}get files(){return this._files??(this._files=new GSn.Files(this._options))}get fineTuning(){return this._fineTuning??(this._fineTuning=new uSn.FineTuning(this._options))}get batch(){return this._batch??(this._batch=new cSn.Batch(this._options))}get chat(){return this._chat??(this._chat=new sSn.Chat(this._options))}get fim(){return this._fim??(this._fim=new dSn.Fim(this._options))}get agents(){return this._agents??(this._agents=new nSn.Agents(this._options))}get embeddings(){return this._embeddings??(this._embeddings=new iSn.Embeddings(this._options))}get classifiers(){return this._classifiers??(this._classifiers=new oSn.Classifiers(this._options))}get ocr(){return this._ocr??(this._ocr=new mSn.Ocr(this._options))}get audio(){return this._audio??(this._audio=new aSn.Audio(this._options))}};n0e.Mistral=wPe});var a0e=Y(Ti=>{"use strict";o();var ebI=Ti&&Ti.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),ZSn=Ti&&Ti.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),HPe=Ti&&Ti.__exportStar||function(t,e){for(var I in t)I!=="default"&&!Object.prototype.hasOwnProperty.call(e,I)&&ebI(e,t,I)},pSn=Ti&&Ti.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(I){var l=[];for(var n in I)Object.prototype.hasOwnProperty.call(I,n)&&(l[l.length]=n);return l},t(e)};return function(e){if(e&&e.__esModule)return e;var I={};if(e!=null)for(var l=t(e),n=0;n{switch(a){case"human":return"user";case"ai":return"assistant";case"system":return"system";case"tool":return"tool";case"function":return"assistant";default:throw new Error(`Unknown message type: ${a}`)}},I=(a,c)=>{let r=(s,i)=>{if(s.type==="image_url"&&(i==="user"||i==="assistant"))return{type:s.type,imageUrl:s?.image_url};if(s.type==="text")return{type:s.type,text:s?.text};throw new Error(`ChatMistralAI only supports messages of "image_url" for roles "user" and "assistant", and "text" for all others. + +Received: ${JSON.stringify(a,null,2)}`)};if(typeof a=="string")return a;if(Array.isArray(a)){let s=e(c),i=[];return a.forEach(G=>{if(G.type==="text"||G.type==="image_url")i.push(r(G,s));else throw new Error('Mistral only supports types "text" or "image_url" for complex message types.')}),i}throw new Error(`Message content must be a string or an array. + +Received: ${JSON.stringify(a,null,2)}`)},l=a=>{if(He.isInstance(a)&&a.tool_calls?.length)return a.tool_calls.map(c=>({...c,id:O7(c.id??"")})).map(Z3)},n=new Set;for(let a of t)"tool_call_id"in a&&typeof a.tool_call_id=="string"&&n.add(O7(a.tool_call_id));return t.flatMap(a=>{let c=l(a),r=I(a.content,a.getType());if("tool_call_id"in a&&typeof a.tool_call_id=="string")return[{role:e(a.getType()),content:r,name:a.name,toolCallId:O7(a.tool_call_id)}];if(He.isInstance(a)){if(c===void 0)return[{role:e(a.getType()),content:r}];{let s=c.filter(i=>n.has(O7(i.id??"")));return s.length===0?typeof r=="string"&&r.trim()===""||Array.isArray(r)&&r.length===0?[]:[{role:e(a.getType()),content:r}]:[{role:e(a.getType()),toolCalls:s}]}}return[{role:e(a.getType()),content:r}]})}function WSn(t,e){let{message:I}=t;if(I===void 0)throw new Error("No message found in response");let l=[];"toolCalls"in I&&Array.isArray(I.toolCalls)&&(l=I.toolCalls);let n=OTe(I.content);switch(I.role){case"assistant":{let a=[],c=[];for(let r of l)try{let s=OX(r,{returnId:!0});a.push({...s,id:s.id??ju().replace(/-/g,"")})}catch(s){c.push(nF(r,s.message))}return new He({content:n,tool_calls:a,invalid_tool_calls:c,additional_kwargs:{},usage_metadata:e?{input_tokens:e.promptTokens??0,output_tokens:e.completionTokens??0,total_tokens:e.totalTokens??0}:void 0})}default:return new ZI({content:n})}}function NSn(t,e){if(!t.content&&!t.toolCalls)return e?new eI({content:"",usage_metadata:e?{input_tokens:e.promptTokens??0,output_tokens:e.completionTokens??0,total_tokens:e.totalTokens??0}:void 0}):null;let I=t.toolCalls?.length?t.toolCalls?.map((r,s)=>({...r,index:s,id:r.id??ju().replace(/-/g,""),type:"function"})):void 0,l="assistant";t.role&&(l=t.role);let n=OTe(t.content),a,c=[];if(I!==void 0)for(let r of I){let s=r.function?.arguments,i=s===void 0||typeof s=="string"?s:JSON.stringify(s);c.push({name:r.function?.name,args:i,id:r.id,index:r.index,type:"tool_call_chunk"})}else a={};return l==="user"?new No({content:n}):l==="assistant"?new eI({content:n,tool_call_chunks:c,additional_kwargs:a,usage_metadata:e?{input_tokens:e.promptTokens??0,output_tokens:e.completionTokens??0,total_tokens:e.totalTokens??0}:void 0}):l==="tool"?new bi({content:n,additional_kwargs:a,tool_call_id:I?.[0].id??""}):l==="function"?new Dm({content:n,additional_kwargs:a}):new Km({content:n,role:l})}function tbI(t){if(!(!t||!t.length))return t.map(e=>{if("function"in e)return{type:e.type??"function",function:e.function};if(Ws(e)){let I=e.description??`Tool: ${e.name}`;return{type:"function",function:{name:e.name,description:I,parameters:Vl(e.schema)?DI(e.schema):e.schema}}}throw new Error(`Unknown tool type passed to ChatMistral: ${JSON.stringify(e,null,2)}`)})}var IbI,lbI,nbI,abI=g(()=>{o();Q6t();UR();IbI=z(a0e(),1),lbI=z(LE(),1);NI();l0();Yo();JH();ca();bK();Xc();aG();uF();Wa();wp();tQ();nbI=class extends yr{static lc_name(){return"ChatMistralAI"}lc_namespace=["langchain","chat_models","mistralai"];model="mistral-small-latest";apiKey;endpoint;serverURL;temperature=.7;streaming=!1;topP=1;maxTokens;safeMode=!1;safePrompt=!1;randomSeed;seed;maxRetries;lc_serializable=!0;streamUsage=!0;beforeRequestHooks;requestErrorHooks;responseHooks;httpClient;presencePenalty;frequencyPenalty;numCompletions;constructor(t,e){let I=typeof t=="string"?{...e??{},model:t}:t??{};super(I),this._addVersion("@langchain/mistralai","1.0.8");let l=I.apiKey??gt("MISTRAL_API_KEY");if(!l)throw new Error("API key MISTRAL_API_KEY is missing for MistralAI, but it is required.");this.apiKey=l,this.streaming=I.streaming??this.streaming,this.serverURL=I.serverURL??this.serverURL,this.temperature=I.temperature??this.temperature,this.topP=I.topP??this.topP,this.maxTokens=I.maxTokens??this.maxTokens,this.safePrompt=I.safePrompt??this.safePrompt,this.randomSeed=I.seed??I.randomSeed??this.seed,this.seed=this.randomSeed,this.maxRetries=I.maxRetries,this.httpClient=I.httpClient,this.model=I.model??I.modelName??this.model,this.streamUsage=I.streamUsage??this.streamUsage,this.beforeRequestHooks=I.beforeRequestHooks??this.beforeRequestHooks,this.requestErrorHooks=I.requestErrorHooks??this.requestErrorHooks,this.responseHooks=I.responseHooks??this.responseHooks,this.presencePenalty=I.presencePenalty??this.presencePenalty,this.frequencyPenalty=I.frequencyPenalty??this.frequencyPenalty,this.numCompletions=I.numCompletions??this.numCompletions,this.addAllHooksToHttpClient()}get lc_secrets(){return{apiKey:"MISTRAL_API_KEY"}}get lc_aliases(){return{apiKey:"mistral_api_key"}}getLsParams(t){let e=this.invocationParams(t);return{ls_provider:"mistral",ls_model_name:this.model,ls_model_type:"chat",ls_temperature:e.temperature??void 0,ls_max_tokens:e.maxTokens??void 0}}_llmType(){return"mistral_ai"}invocationParams(t){let{response_format:e,tools:I,tool_choice:l}=t??{},n=I?.length?tbI(I):void 0;return{model:this.model,tools:n,temperature:this.temperature,maxTokens:this.maxTokens,topP:this.topP,randomSeed:this.seed,safePrompt:this.safePrompt,toolChoice:l,responseFormat:e,presencePenalty:this.presencePenalty,frequencyPenalty:this.frequencyPenalty,n:this.numCompletions}}bindTools(t,e){let I=tbI(t);return new ha({bound:this,kwargs:{...e??{},tools:I},config:{}})}async completionWithRetry(t,e){let I=new tZ({maxRetries:this.maxRetries}),l=new IbI.Mistral({apiKey:this.apiKey,serverURL:this.serverURL,...this.httpClient?{httpClient:this.httpClient}:{}});return I.call(async()=>{try{let n;return e?n=await l.chat.stream({...t,stream:!0}):n=await l.chat.complete(t),n}catch(n){throw(n.message?.includes("status: 400")||n.message?.toLowerCase().includes("status 400")||n.message?.includes("validation failed"))&&(n.status=400),n}})}async _generate(t,e,I){e.signal?.throwIfAborted();let l={},n=this.invocationParams(e),a=c0e(t),c={...n,messages:a},r=e.signal??!!e.timeout;if(this.streaming||r){let b=this._streamResponseChunks(t,e,I),Z={};for await(let p of b){let W=p.generationInfo?.completion??0;Z[W]===void 0?Z[W]=p:Z[W]=Z[W].concat(p)}return{generations:Object.entries(Z).sort(([p],[W])=>parseInt(p,10)-parseInt(W,10)).map(([p,W])=>W),llmOutput:{estimatedTokenUsage:l}}}let s=await this.completionWithRetry(c,!1),{completionTokens:i,promptTokens:G,totalTokens:d}=s?.usage??{};i&&(l.completionTokens=(l.completionTokens??0)+i),G&&(l.promptTokens=(l.promptTokens??0)+G),d&&(l.totalTokens=(l.totalTokens??0)+d);let u=[];for(let b of s?.choices??[]){if("delta"in b)throw new Error("Delta not supported in non-streaming mode.");if(!("message"in b))throw new Error("No message found in the choice.");let Z=b.message?.content??"";Array.isArray(Z)&&(Z=Z[0].type==="text"?Z[0].text:"");let p={text:Z,message:WSn(b,s?.usage)};b.finishReason&&(p.generationInfo={finishReason:b.finishReason}),u.push(p)}return{generations:u,llmOutput:{tokenUsage:l}}}async*_streamResponseChunks(t,e,I){let l=c0e(t),n={...this.invocationParams(e),messages:l},a=await this.completionWithRetry(n,!0);for await(let{data:c}of a){if(e.signal?.aborted)return;let r=c?.choices[0];if(!r||!("delta"in r))continue;let{delta:s}=r;if(!s)continue;let i={prompt:0,completion:r.index??0},G=NSn(s,this.streamUsage||e.streamUsage?c.usage:null);if(G===null)continue;let d=s.content??"";Array.isArray(d)&&(d=d[0].type==="text"?d[0].text:"");let u=new Nc({message:G,text:d,generationInfo:i});yield u,I?.handleLLMNewToken(u.text??"",i,void 0,void 0,void 0,{chunk:u})}}addAllHooksToHttpClient(){try{if(this.removeAllHooksFromHttpClient(),[this.beforeRequestHooks,this.requestErrorHooks,this.responseHooks].some(t=>t&&t.length>0)&&!this.httpClient&&(this.httpClient=new lbI.HTTPClient),this.beforeRequestHooks)for(let t of this.beforeRequestHooks)this.httpClient?.addHook("beforeRequest",t);if(this.requestErrorHooks)for(let t of this.requestErrorHooks)this.httpClient?.addHook("requestError",t);if(this.responseHooks)for(let t of this.responseHooks)this.httpClient?.addHook("response",t)}catch{throw new Error("Error in adding all hooks")}}removeAllHooksFromHttpClient(){try{if(this.beforeRequestHooks)for(let t of this.beforeRequestHooks)this.httpClient?.removeHook("beforeRequest",t);if(this.requestErrorHooks)for(let t of this.requestErrorHooks)this.httpClient?.removeHook("requestError",t);if(this.responseHooks)for(let t of this.responseHooks)this.httpClient?.removeHook("response",t)}catch{throw new Error("Error in removing hooks")}}removeHookFromHttpClient(t){try{this.httpClient?.removeHook("beforeRequest",t),this.httpClient?.removeHook("requestError",t),this.httpClient?.removeHook("response",t)}catch{throw new Error("Error in removing hook")}}_combineLLMOutput(){return[]}withStructuredOutput(t,e){let I=t,l=e?.name,n=e?.method,a=e?.includeRaw,c,r;if(n==="jsonMode"){r=Ep(I);let s=Vl(I)||jn(I)?DI(I):void 0;c=this.withConfig({response_format:{type:"json_object"},ls_structured_output_format:{kwargs:{method:"jsonMode"},schema:s}})}else{let s=l??"extract",i;if(Vl(I)||jn(I)){let G=DI(I);i={name:s,description:G.description,parameters:G}}else typeof I.name=="string"&&typeof I.parameters=="object"&&I.parameters!=null?(i=I,s=I.name):i={name:s,description:I.description??"",parameters:I};c=this.bindTools([{type:"function",function:i}]).withConfig({tool_choice:"any",...(Vl(I)||jn(I))&&{ls_structured_output_format:{kwargs:{method:"functionCalling"},schema:i.parameters}}}),r=I0(I,s)}return oZ(c,r,a)}}});var cbI,rbI,sbI=g(()=>{o();cbI=z(LE(),1);ca();hC();RC();rbI=class extends Up{modelName="mistral-embed";model="mistral-embed";encodingFormat="float";batchSize=512;stripNewLines=!0;apiKey;endpoint;serverURL;beforeRequestHooks;requestErrorHooks;responseHooks;httpClient;constructor(t){super(t??{});let e=t?.apiKey??gt("MISTRAL_API_KEY");if(!e)throw new Error("API key missing for MistralAI, but it is required.");this.apiKey=e,this.serverURL=t?.serverURL??this.serverURL,this.modelName=t?.model??t?.modelName??this.model,this.model=this.modelName,this.encodingFormat=t?.encodingFormat??this.encodingFormat,this.batchSize=t?.batchSize??this.batchSize,this.stripNewLines=t?.stripNewLines??this.stripNewLines,this.beforeRequestHooks=t?.beforeRequestHooks??this.beforeRequestHooks,this.requestErrorHooks=t?.requestErrorHooks??this.requestErrorHooks,this.responseHooks=t?.responseHooks??this.responseHooks,this.httpClient=t?.httpClient??this.httpClient,this.addAllHooksToHttpClient()}async embedDocuments(t){let e=Op(this.stripNewLines?t.map(a=>a.replace(/\n/g," ")):t,this.batchSize),I=e.map(a=>this.embeddingWithRetry(a)),l=await Promise.all(I),n=[];for(let a=0;aawait I.embeddings.create(l))}addAllHooksToHttpClient(){try{if(this.removeAllHooksFromHttpClient(),[this.beforeRequestHooks,this.requestErrorHooks,this.responseHooks].some(t=>t&&t.length>0)&&!this.httpClient&&(this.httpClient=new cbI.HTTPClient),this.beforeRequestHooks)for(let t of this.beforeRequestHooks)this.httpClient?.addHook("beforeRequest",t);if(this.requestErrorHooks)for(let t of this.requestErrorHooks)this.httpClient?.addHook("requestError",t);if(this.responseHooks)for(let t of this.responseHooks)this.httpClient?.addHook("response",t)}catch{throw new Error("Error in adding all hooks")}}removeAllHooksFromHttpClient(){try{if(this.beforeRequestHooks)for(let t of this.beforeRequestHooks)this.httpClient?.removeHook("beforeRequest",t);if(this.requestErrorHooks)for(let t of this.requestErrorHooks)this.httpClient?.removeHook("requestError",t);if(this.responseHooks)for(let t of this.responseHooks)this.httpClient?.removeHook("response",t)}catch{throw new Error("Error in removing hooks")}}removeHookFromHttpClient(t){try{this.httpClient?.removeHook("beforeRequest",t),this.httpClient?.removeHook("requestError",t),this.httpClient?.removeHook("response",t)}catch{throw new Error("Error in removing hook")}}async imports(){let{Mistral:t}=await Promise.resolve().then(()=>z(a0e(),1));return{Mistral:t}}}});function VSn(t){return t.toLowerCase().includes("codestral")}var obI,ibI,GbI=g(()=>{o();obI=z(LE(),1);Yo();JH();ca();RC();WC();ibI=class extends dF{static lc_name(){return"MistralAI"}lc_namespace=["langchain","llms","mistralai"];lc_serializable=!0;model="codestral-latest";temperature=0;topP;maxTokens;randomSeed;streaming=!1;batchSize=20;apiKey;endpoint;serverURL;maxRetries;maxConcurrency;beforeRequestHooks;requestErrorHooks;responseHooks;httpClient;useFim;constructor(t){super(t??{}),this._addVersion("@langchain/mistralai","1.0.8"),this.model=t?.model??this.model,this.temperature=t?.temperature??this.temperature,this.topP=t?.topP??this.topP,this.maxTokens=t?.maxTokens??this.maxTokens,this.randomSeed=t?.randomSeed??this.randomSeed,this.batchSize=t?.batchSize??this.batchSize,this.streaming=t?.streaming??this.streaming,this.serverURL=t?.serverURL??this.serverURL,this.maxRetries=t?.maxRetries,this.maxConcurrency=t?.maxConcurrency,this.beforeRequestHooks=t?.beforeRequestHooks??this.beforeRequestHooks,this.requestErrorHooks=t?.requestErrorHooks??this.requestErrorHooks,this.responseHooks=t?.responseHooks??this.responseHooks,this.httpClient=t?.httpClient??this.httpClient,this.useFim=t?.useFim??VSn(this.model);let e=t?.apiKey??gt("MISTRAL_API_KEY");if(!e)throw new Error(`MistralAI requires an API key to be set. +Either provide one via the "apiKey" field in the constructor, or set the "MISTRAL_API_KEY" environment variable.`);this.apiKey=e,this.addAllHooksToHttpClient()}get lc_secrets(){return{apiKey:"MISTRAL_API_KEY"}}get lc_aliases(){return{apiKey:"mistral_api_key"}}_llmType(){return"mistralai"}invocationParams(t){return{model:this.model,suffix:t.suffix,temperature:this.temperature,maxTokens:this.maxTokens,topP:this.topP,randomSeed:this.randomSeed,stop:t.stop}}async _call(t,e){let I={...this.invocationParams(e),prompt:t},l=(await this.completionWithRetry(I,e,!1))?.choices?.[0].message.content??"";return Array.isArray(l)&&(l=l[0].type==="text"?l[0].text:""),l}async _generate(t,e,I){let l=Op(t,this.batchSize),n=[],a=this.invocationParams(e);for(let c=0;c{if(this.streaming){let s=[];for(let i=0;is.choices??[]))}return{generations:n.map(c=>c.map(r=>{let s=r.message?.content??"";return Array.isArray(s)&&(s=s[0].type==="text"?s[0].text:""),{text:s,generationInfo:{finishReason:r.finishReason}}}))}}async completionWithRetry(t,e,I){let{Mistral:l}=await this.imports(),n=new tZ({maxConcurrency:e.maxConcurrency||this.maxConcurrency,maxRetries:this.maxRetries}),a=new l({apiKey:this.apiKey,serverURL:this.serverURL,timeoutMs:e.timeout,...this.httpClient?{httpClient:this.httpClient}:{}});return n.callWithOptions({signal:e.signal},async()=>{try{let c;if(this.useFim)I?c=await a.fim.stream({...t,stream:!0}):c=await a.fim.complete(t);else{let r={model:t.model,messages:[{role:"user",content:t.prompt}],temperature:t.temperature,maxTokens:t.maxTokens,topP:t.topP,randomSeed:t.randomSeed,stop:t.stop};I?c=await a.chat.stream({...r,stream:!0}):c=await a.chat.complete(r)}return c}catch(c){throw(c.message?.includes("status: 400")||c.message?.toLowerCase().includes("status 400")||c.message?.includes("validation failed"))&&(c.status=400),c}})}async*_streamResponseChunks(t,e,I){let l={...this.invocationParams(e),prompt:t},n=await this.completionWithRetry(l,e,!0);for await(let a of n){let{data:c}=a,r=c?.choices[0];if(!r)continue;let s=r.delta.content??"";Array.isArray(s)&&(s=s[0].type==="text"?s[0].text:"");let i=new Pr({text:s,generationInfo:{finishReason:r.finishReason,tokenUsage:c.usage}});yield i,I?.handleLLMNewToken(i.text??"")}if(e.signal?.aborted)throw new Error("AbortError")}addAllHooksToHttpClient(){try{if(this.removeAllHooksFromHttpClient(),[this.beforeRequestHooks,this.requestErrorHooks,this.responseHooks].some(t=>t&&t.length>0)&&!this.httpClient&&(this.httpClient=new obI.HTTPClient),this.beforeRequestHooks)for(let t of this.beforeRequestHooks)this.httpClient?.addHook("beforeRequest",t);if(this.requestErrorHooks)for(let t of this.requestErrorHooks)this.httpClient?.addHook("requestError",t);if(this.responseHooks)for(let t of this.responseHooks)this.httpClient?.addHook("response",t)}catch{throw new Error("Error in adding all hooks")}}removeAllHooksFromHttpClient(){try{if(this.beforeRequestHooks)for(let t of this.beforeRequestHooks)this.httpClient?.removeHook("beforeRequest",t);if(this.requestErrorHooks)for(let t of this.requestErrorHooks)this.httpClient?.removeHook("requestError",t);if(this.responseHooks)for(let t of this.responseHooks)this.httpClient?.removeHook("response",t)}catch{throw new Error("Error in removing hooks")}}removeHookFromHttpClient(t){try{this.httpClient?.removeHook("beforeRequest",t),this.httpClient?.removeHook("requestError",t),this.httpClient?.removeHook("response",t)}catch{throw new Error("Error in removing hook")}}async imports(){let{Mistral:t}=await Promise.resolve().then(()=>z(a0e(),1));return{Mistral:t}}}});var dbI={};tr(dbI,{ChatMistralAI:()=>nbI,MistralAI:()=>ibI,MistralAIEmbeddings:()=>rbI,convertMessagesToMistralMessages:()=>c0e});var ubI=g(()=>{o();abI();sbI();GbI()});var ZbI,pbI,hbI=g(()=>{o();ZbI=Object.defineProperty,pbI=(t,e)=>{let I={};for(var l in t)ZbI(I,l,{get:t[l],enumerable:!0});return e||ZbI(I,Symbol.toStringTag,{value:"Module"}),I}});var emI={};tr(emI,{HfInference:()=>QSn,HfInferenceEndpoint:()=>$bI,InferenceOutputError:()=>Ia,audioClassification:()=>AbI,audioToAudio:()=>gbI,automaticSpeechRecognition:()=>FbI,chatCompletion:()=>TbI,chatCompletionStream:()=>_bI,documentQuestionAnswering:()=>KbI,featureExtraction:()=>JbI,fillMask:()=>CbI,imageClassification:()=>vbI,imageSegmentation:()=>ybI,imageToImage:()=>fbI,imageToText:()=>wbI,objectDetection:()=>HbI,questionAnswering:()=>LbI,request:()=>Cn,sentenceSimilarity:()=>kbI,streamingRequest:()=>_ee,summarization:()=>xbI,tableQuestionAnswering:()=>jbI,tabularClassification:()=>PbI,tabularRegression:()=>qbI,textClassification:()=>UbI,textGeneration:()=>ObI,textGenerationStream:()=>zbI,textToImage:()=>QbI,textToSpeech:()=>XbI,tokenClassification:()=>BbI,translation:()=>MbI,visualQuestionAnswering:()=>DbI,zeroShotClassification:()=>SbI,zeroShotImageClassification:()=>EbI});function ASn(t,e){return Object.assign({},...e.map(I=>{if(t[I]!==void 0)return{[I]:t[I]}}))}function FSn(t,e){return t.includes(e)}function XSn(t,e){let I=Array.isArray(e)?e:[e],l=Object.keys(t).filter(n=>!FSn(I,n));return ASn(t,l)}function s0e(t){return/^http(s?):/.test(t)||t.startsWith("/")}async function YbI(t,e,I){if(s0e(t))return null;let l=`${t}:${e}`,n=sM.get(l);if(n&&n.datec.json()).then(c=>c.pipeline_tag).catch(()=>null);if(!a)return null;n={task:a,date:new Date},sM.set(l,{task:a,date:new Date}),sM.size>vSn&&sM.delete(sM.keys().next().value)}return n.task}async function RbI(t,e){let{accessToken:I,endpointUrl:l,...n}=t,{model:a}=t,{forceTask:c,includeCredentials:r,taskHint:s,wait_for_model:i,use_cache:G,dont_load_model:d,chatCompletion:u}=e??{},b={};if(I&&(b.Authorization=`Bearer ${I}`),!a&&!r0e&&s){let N=await fetch(`${VbI}/api/tasks`);N.ok&&(r0e=await N.json())}if(!a&&r0e&&s){let N=r0e[s];N&&(a=N.models[0].id)}if(!a)throw new Error("No model provided, and no default model found for this task");let Z="data"in t&&!!t.data;Z||(b["Content-Type"]="application/json"),i&&(b["X-Wait-For-Model"]="true"),G===!1&&(b["X-Use-Cache"]="false"),d&&(b["X-Load-Model"]="0");let p=(()=>{if(l&&s0e(a))throw new TypeError("Both model and endpointUrl cannot be URLs");return s0e(a)?(console.warn("Using a model URL is deprecated, please use the `endpointUrl` parameter instead"),a):l||(c?`${WbI}/pipeline/${c}/${a}`:`${WbI}/models/${a}`)})();u&&!p.endsWith("/chat/completions")&&(p+="/v1/chat/completions");let W;typeof r=="string"?W=r:r===!0&&(W="include");let h={headers:b,method:"POST",body:Z?t.data:JSON.stringify({...n.model&&s0e(n.model)?XSn(n,"model"):n}),...W&&{credentials:W},signal:e?.signal};return{url:p,info:h}}async function Cn(t,e){let{url:I,info:l}=await RbI(t,e),n=await(e?.fetch??fetch)(I,l);if(e?.retry_on_error!==!1&&n.status===503&&!e?.wait_for_model)return Cn(t,{...e,wait_for_model:!0});if(!n.ok){if(n.headers.get("Content-Type")?.startsWith("application/json")){let a=await n.json();if([400,422,404,500].includes(n.status)&&e?.chatCompletion)throw new Error(`Server ${t.model} does not seem to support chat completion. Error: ${a.error}`);if(a.error)throw new Error(a.error)}throw new Error("An error occurred while fetching the blob")}return n.headers.get("Content-Type")?.startsWith("application/json")?await n.json():await n.blob()}function ySn(t){let e,I,l,n=!1;return function(c){e===void 0?(e=c,I=0,l=-1):e=HSn(e,c);let r=e.length,s=0;for(;I0){let s=n.decode(c.subarray(0,r)),i=r+(c[r+1]===32?2:1),G=n.decode(c.subarray(i));switch(s){case"data":l.data=l.data?l.data+` +`+G:G;break;case"event":l.event=G;break;case"id":t(l.id=G);break;case"retry":let d=parseInt(G,10);isNaN(d)||e(l.retry=d);break}}}}function HSn(t,e){let I=new Uint8Array(t.length+e.length);return I.set(t),I.set(e,t.length),I}function NbI(){return{data:"",event:"",id:"",retry:void 0}}async function*_ee(t,e){let{url:I,info:l}=await RbI({...t,stream:!0},e),n=await(e?.fetch??fetch)(I,l);if(e?.retry_on_error!==!1&&n.status===503&&!e?.wait_for_model)return yield*_ee(t,{...e,wait_for_model:!0});if(!n.ok){if(n.headers.get("Content-Type")?.startsWith("application/json")){let i=await n.json();if([400,422,404,500].includes(n.status)&&e?.chatCompletion)throw new Error(`Server ${t.model} does not seem to support chat completion. Error: ${i.error}`);if(i.error)throw new Error(i.error)}throw new Error(`Server response contains error: ${n.status}`)}if(!n.headers.get("content-type")?.startsWith("text/event-stream"))throw new Error("Server does not support event stream content type, it returned "+n.headers.get("content-type"));if(!n.body)return;let a=n.body.getReader(),c=[],s=ySn(wSn(()=>{},()=>{},i=>{c.push(i)}));try{for(;;){let{done:i,value:G}=await a.read();if(i)return;s(G);for(let d of c)if(d.data.length>0){if(d.data==="[DONE]")return;let u=JSON.parse(d.data);if(typeof u=="object"&&u!==null&&"error"in u)throw new Error(u.error);yield u}c=[]}}finally{a.releaseLock()}}async function AbI(t,e){let I=await Cn(t,{...e,taskHint:"audio-classification"});if(!(Array.isArray(I)&&I.every(n=>typeof n.label=="string"&&typeof n.score=="number")))throw new Ia("Expected Array<{label: string, score: number}>");return I}async function FbI(t,e){let I=await Cn(t,{...e,taskHint:"automatic-speech-recognition"});if(!(typeof I?.text=="string"))throw new Ia("Expected {text: string}");return I}async function XbI(t,e){let I=await Cn(t,{...e,taskHint:"text-to-speech"});if(!(I&&I instanceof Blob))throw new Ia("Expected Blob");return I}async function gbI(t,e){let I=await Cn(t,{...e,taskHint:"audio-to-audio"});if(!(Array.isArray(I)&&I.every(n=>typeof n.label=="string"&&typeof n.blob=="string"&&typeof n["content-type"]=="string")))throw new Ia("Expected Array<{label: string, blob: string, content-type: string}>");return I}async function vbI(t,e){let I=await Cn(t,{...e,taskHint:"image-classification"});if(!(Array.isArray(I)&&I.every(n=>typeof n.label=="string"&&typeof n.score=="number")))throw new Ia("Expected Array<{label: string, score: number}>");return I}async function ybI(t,e){let I=await Cn(t,{...e,taskHint:"image-segmentation"});if(!(Array.isArray(I)&&I.every(n=>typeof n.label=="string"&&typeof n.mask=="string"&&typeof n.score=="number")))throw new Ia("Expected Array<{label: string, mask: string, score: number}>");return I}async function wbI(t,e){let I=(await Cn(t,{...e,taskHint:"image-to-text"}))?.[0];if(typeof I?.generated_text!="string")throw new Ia("Expected {generated_text: string}");return I}async function HbI(t,e){let I=await Cn(t,{...e,taskHint:"object-detection"});if(!(Array.isArray(I)&&I.every(n=>typeof n.label=="string"&&typeof n.score=="number"&&typeof n.box.xmin=="number"&&typeof n.box.ymin=="number"&&typeof n.box.xmax=="number"&&typeof n.box.ymax=="number")))throw new Ia("Expected Array<{label:string; score:number; box:{xmin:number; ymin:number; xmax:number; ymax:number}}>");return I}async function QbI(t,e){let I=await Cn(t,{...e,taskHint:"text-to-image"});if(!(I&&I instanceof Blob))throw new Ia("Expected Blob");return I}function o0e(t){if(globalThis.Buffer)return globalThis.Buffer.from(t).toString("base64");{let e=[];return t.forEach(I=>{e.push(String.fromCharCode(I))}),globalThis.btoa(e.join(""))}}async function fbI(t,e){let I;t.parameters?I={...t,inputs:o0e(new Uint8Array(t.inputs instanceof ArrayBuffer?t.inputs:await t.inputs.arrayBuffer()))}:I={accessToken:t.accessToken,model:t.model,data:t.inputs};let l=await Cn(I,{...e,taskHint:"image-to-image"});if(!(l&&l instanceof Blob))throw new Ia("Expected Blob");return l}async function EbI(t,e){let I={...t,inputs:{image:o0e(new Uint8Array(t.inputs.image instanceof ArrayBuffer?t.inputs.image:await t.inputs.image.arrayBuffer()))}},l=await Cn(I,{...e,taskHint:"zero-shot-image-classification"});if(!(Array.isArray(l)&&l.every(a=>typeof a.label=="string"&&typeof a.score=="number")))throw new Ia("Expected Array<{label: string, score: number}>");return l}async function JbI(t,e){let I=t.model?await YbI(t.model,t.accessToken,e):void 0,l=await Cn(t,{...e,taskHint:"feature-extraction",...I==="sentence-similarity"&&{forceTask:"feature-extraction"}}),n=!0,a=(c,r,s=0)=>s>r?!1:c.every(i=>Array.isArray(i))?c.every(i=>a(i,r,s+1)):c.every(i=>typeof i=="number");if(n=Array.isArray(l)&&a(l,3,0),!n)throw new Ia("Expected Array");return l}async function CbI(t,e){let I=await Cn(t,{...e,taskHint:"fill-mask"});if(!(Array.isArray(I)&&I.every(n=>typeof n.score=="number"&&typeof n.sequence=="string"&&typeof n.token=="number"&&typeof n.token_str=="string")))throw new Ia("Expected Array<{score: number, sequence: string, token: number, token_str: string}>");return I}async function LbI(t,e){let I=await Cn(t,{...e,taskHint:"question-answering"});if(!(typeof I=="object"&&!!I&&typeof I.answer=="string"&&typeof I.end=="number"&&typeof I.score=="number"&&typeof I.start=="number"))throw new Ia("Expected {answer: string, end: number, score: number, start: number}");return I}async function kbI(t,e){let I=t.model?await YbI(t.model,t.accessToken,e):void 0,l=await Cn(t,{...e,taskHint:"sentence-similarity",...I==="feature-extraction"&&{forceTask:"sentence-similarity"}});if(!(Array.isArray(l)&&l.every(a=>typeof a=="number")))throw new Ia("Expected number[]");return l}async function xbI(t,e){let I=await Cn(t,{...e,taskHint:"summarization"});if(!(Array.isArray(I)&&I.every(n=>typeof n?.summary_text=="string")))throw new Ia("Expected Array<{summary_text: string}>");return I?.[0]}async function jbI(t,e){let I=await Cn(t,{...e,taskHint:"table-question-answering"});if(!(typeof I?.aggregator=="string"&&typeof I.answer=="string"&&Array.isArray(I.cells)&&I.cells.every(n=>typeof n=="string")&&Array.isArray(I.coordinates)&&I.coordinates.every(n=>Array.isArray(n)&&n.every(a=>typeof a=="number"))))throw new Ia("Expected {aggregator: string, answer: string, cells: string[], coordinates: number[][]}");return I}async function UbI(t,e){let I=(await Cn(t,{...e,taskHint:"text-classification"}))?.[0];if(!(Array.isArray(I)&&I.every(n=>typeof n?.label=="string"&&typeof n.score=="number")))throw new Ia("Expected Array<{label: string, score: number}>");return I}async function ObI(t,e){let I=await Cn(t,{...e,taskHint:"text-generation"});if(!(Array.isArray(I)&&I.every(n=>typeof n?.generated_text=="string")))throw new Ia("Expected Array<{generated_text: string}>");return I?.[0]}async function*zbI(t,e){yield*_ee(t,{...e,taskHint:"text-generation"})}function CPe(t){return Array.isArray(t)?t:[t]}async function BbI(t,e){let I=CPe(await Cn(t,{...e,taskHint:"token-classification"}));if(!(Array.isArray(I)&&I.every(n=>typeof n.end=="number"&&typeof n.entity_group=="string"&&typeof n.score=="number"&&typeof n.start=="number"&&typeof n.word=="string")))throw new Ia("Expected Array<{end: number, entity_group: string, score: number, start: number, word: string}>");return I}async function MbI(t,e){let I=await Cn(t,{...e,taskHint:"translation"});if(!(Array.isArray(I)&&I.every(n=>typeof n?.translation_text=="string")))throw new Ia("Expected type Array<{translation_text: string}>");return I?.length===1?I?.[0]:I}async function SbI(t,e){let I=CPe(await Cn(t,{...e,taskHint:"zero-shot-classification"}));if(!(Array.isArray(I)&&I.every(n=>Array.isArray(n.labels)&&n.labels.every(a=>typeof a=="string")&&Array.isArray(n.scores)&&n.scores.every(a=>typeof a=="number")&&typeof n.sequence=="string")))throw new Ia("Expected Array<{labels: string[], scores: number[], sequence: string}>");return I}async function TbI(t,e){let I=await Cn(t,{...e,taskHint:"text-generation",chatCompletion:!0});if(!(typeof I=="object"&&Array.isArray(I?.choices)&&typeof I?.created=="number"&&typeof I?.id=="string"&&typeof I?.model=="string"&&typeof I?.system_fingerprint=="string"&&typeof I?.usage=="object"))throw new Ia("Expected ChatCompletionOutput");return I}async function*_bI(t,e){yield*_ee(t,{...e,taskHint:"text-generation",chatCompletion:!0})}async function KbI(t,e){let I={...t,inputs:{question:t.inputs.question,image:o0e(new Uint8Array(t.inputs.image instanceof ArrayBuffer?t.inputs.image:await t.inputs.image.arrayBuffer()))}},l=CPe(await Cn(I,{...e,taskHint:"document-question-answering"}))?.[0];if(!(typeof l?.answer=="string"&&(typeof l.end=="number"||typeof l.end>"u")&&(typeof l.score=="number"||typeof l.score>"u")&&(typeof l.start=="number"||typeof l.start>"u")))throw new Ia("Expected Array<{answer: string, end?: number, score?: number, start?: number}>");return l}async function DbI(t,e){let I={...t,inputs:{question:t.inputs.question,image:o0e(new Uint8Array(t.inputs.image instanceof ArrayBuffer?t.inputs.image:await t.inputs.image.arrayBuffer()))}},l=(await Cn(I,{...e,taskHint:"visual-question-answering"}))?.[0];if(!(typeof l?.answer=="string"&&typeof l.score=="number"))throw new Ia("Expected Array<{answer: string, score: number}>");return l}async function qbI(t,e){let I=await Cn(t,{...e,taskHint:"tabular-regression"});if(!(Array.isArray(I)&&I.every(n=>typeof n=="number")))throw new Ia("Expected number[]");return I}async function PbI(t,e){let I=await Cn(t,{...e,taskHint:"tabular-classification"});if(!(Array.isArray(I)&&I.every(n=>typeof n=="number")))throw new Ia("Expected number[]");return I}var YSn,RSn,JPe,sM,gSn,vSn,VbI,WbI,r0e,Ia,QSn,$bI,tmI=g(()=>{o();YSn=Object.defineProperty,RSn=(t,e)=>{for(var I in e)YSn(t,I,{get:e[I],enumerable:!0})},JPe={};RSn(JPe,{audioClassification:()=>AbI,audioToAudio:()=>gbI,automaticSpeechRecognition:()=>FbI,chatCompletion:()=>TbI,chatCompletionStream:()=>_bI,documentQuestionAnswering:()=>KbI,featureExtraction:()=>JbI,fillMask:()=>CbI,imageClassification:()=>vbI,imageSegmentation:()=>ybI,imageToImage:()=>fbI,imageToText:()=>wbI,objectDetection:()=>HbI,questionAnswering:()=>LbI,request:()=>Cn,sentenceSimilarity:()=>kbI,streamingRequest:()=>_ee,summarization:()=>xbI,tableQuestionAnswering:()=>jbI,tabularClassification:()=>PbI,tabularRegression:()=>qbI,textClassification:()=>UbI,textGeneration:()=>ObI,textGenerationStream:()=>zbI,textToImage:()=>QbI,textToSpeech:()=>XbI,tokenClassification:()=>BbI,translation:()=>MbI,visualQuestionAnswering:()=>DbI,zeroShotClassification:()=>SbI,zeroShotImageClassification:()=>EbI});sM=new Map,gSn=10*60*1e3,vSn=1e3,VbI="https://huggingface.co";WbI="https://api-inference.huggingface.co",r0e=null;Ia=class extends TypeError{constructor(t){super(`Invalid inference output: ${t}. Use the 'request' method with the same parameters to do a custom call with no type checking.`),this.name="InferenceOutputError"}};QSn=class{accessToken;defaultOptions;constructor(t="",e={}){this.accessToken=t,this.defaultOptions=e;for(let[I,l]of Object.entries(JPe))Object.defineProperty(this,I,{enumerable:!1,value:(n,a)=>l({...n,accessToken:t},{...e,...a})})}endpoint(t){return new $bI(t,this.accessToken,this.defaultOptions)}},$bI=class{constructor(t,e="",I={}){for(let[l,n]of Object.entries(JPe))Object.defineProperty(this,l,{enumerable:!1,value:(a,c)=>n({...a,accessToken:e,endpointUrl:t},{...I,...c})})}}});var nmI={};tr(nmI,{HuggingFaceInference:()=>ImI,hf_exports:()=>fSn});var fSn,ImI,amI=g(()=>{o();hbI();Yo();ca();WC();fSn=pbI({HuggingFaceInference:()=>ImI}),ImI=class lmI extends dF{lc_serializable=!0;get lc_secrets(){return{apiKey:"HUGGINGFACEHUB_API_KEY"}}model="gpt2";temperature=void 0;maxTokens=void 0;stopSequences=void 0;topP=void 0;topK=void 0;frequencyPenalty=void 0;apiKey=void 0;endpointUrl=void 0;includeCredentials=void 0;constructor(e){if(super(e??{}),this.model=e?.model??this.model,this.temperature=e?.temperature??this.temperature,this.maxTokens=e?.maxTokens??this.maxTokens,this.stopSequences=e?.stopSequences??this.stopSequences,this.topP=e?.topP??this.topP,this.topK=e?.topK??this.topK,this.frequencyPenalty=e?.frequencyPenalty??this.frequencyPenalty,this.apiKey=e?.apiKey??gt("HUGGINGFACEHUB_API_KEY"),this.endpointUrl=e?.endpointUrl,this.includeCredentials=e?.includeCredentials,!this.apiKey)throw new Error('Please set an API key for HuggingFace Hub in the environment variable "HUGGINGFACEHUB_API_KEY" or in the apiKey field of the HuggingFaceInference constructor.')}_llmType(){return"hf"}invocationParams(e){return{model:this.model,parameters:{return_full_text:!1,temperature:this.temperature,max_new_tokens:this.maxTokens,stop:e?.stop??this.stopSequences,top_p:this.topP,top_k:this.topK,repetition_penalty:this.frequencyPenalty}}}async*_streamResponseChunks(e,I,l){let n=await this._prepareHFInference(),a=await this.caller.call(async()=>n.textGenerationStream({...this.invocationParams(I),inputs:e}));for await(let c of a){let r=c.token.text;yield new Pr({text:r,generationInfo:c}),await l?.handleLLMNewToken(r??""),c.generated_text&&(yield new Pr({text:"",generationInfo:{finished:!0}}))}}async _call(e,I){let l=await this._prepareHFInference(),n={...this.invocationParams(I),inputs:e};return(await this.caller.callWithOptions({signal:I.signal},l.textGeneration.bind(l),n)).generated_text}async _prepareHFInference(){let{HfInference:e}=await lmI.imports(),I=new e(this.apiKey,{includeCredentials:this.includeCredentials});return this.endpointUrl?I.endpoint(this.endpointUrl):I}static async imports(){try{let{HfInference:e}=await Promise.resolve().then(()=>(tmI(),emI));return{HfInference:e}}catch{throw new Error("Please install huggingface as a dependency with, e.g. `pnpm install @huggingface/inference`")}}}});function LPe(t){let e=[];for(let I of t)I.type==="tool_use"&&e.push({name:I.name,args:I.input,id:I.id,type:"tool_call"});return e}var rmI,kPe=g(()=>{o();Wa();m3();rmI=class extends IF{static lc_name(){return"AnthropicToolsOutputParser"}lc_namespace=["langchain","anthropic","output_parsers"];returnId=!1;keyName;returnSingle=!1;zodSchema;serializableSchema;constructor(t){super(t),this.keyName=t.keyName,this.returnSingle=t.returnSingle??this.returnSingle,this.zodSchema=t.zodSchema,this.serializableSchema=t.serializableSchema}async _validateResult(t){let e=t;if(typeof t=="string")try{e=JSON.parse(t)}catch(l){throw new or(`Failed to parse. Text: "${JSON.stringify(t,null,2)}". Error: ${JSON.stringify(l.message)}`,t)}else e=t;if(this.serializableSchema!==void 0){let l=await this.serializableSchema["~standard"].validate(e);if(l.issues)throw new or(`Failed to parse. Text: "${JSON.stringify(e,null,2)}". Error: ${JSON.stringify(l.issues)}`,JSON.stringify(e,null,2));return l.value}if(this.zodSchema===void 0)return e;let I=await BA(this.zodSchema,e);if(I.success)return I.data;throw new or(`Failed to parse. Text: "${JSON.stringify(t,null,2)}". Error: ${JSON.stringify(I.error.issues)}`,JSON.stringify(e,null,2))}async parseResult(t){let e=t.flatMap(l=>{let{message:n}=l;return Array.isArray(n.content)?LPe(n.content)[0]:[]});if(e[0]===void 0)throw new Error("No parseable tool calls provided to AnthropicToolsOutputParser.");let[I]=e;return await this._validateResult(I.args)}}});function smI(t){if(t)return t==="any"||t==="required"?{type:"any"}:t==="auto"?{type:"auto"}:t==="none"?{type:"none"}:typeof t=="string"?{type:"tool",name:t}:t}var omI,xPe,imI=g(()=>{o();sG();omI=$Ee({cache_control:r1e().optional().nullable(),defer_loading:vre().optional(),input_examples:W3(uC()).optional(),allowed_callers:W3(uC()).optional()}),xPe={tool_search_tool_regex_20251119:"advanced-tool-use-2025-11-20",tool_search_tool_bm25_20251119:"advanced-tool-use-2025-11-20",memory_20250818:"context-management-2025-06-27",web_fetch_20250910:"web-fetch-2025-09-10",code_execution_20250825:"code-execution-2025-08-25",computer_20251124:"computer-use-2025-11-24",computer_20250124:"computer-use-2025-01-24",mcp_toolset:"mcp-client-2025-11-20"}});function GmI(t){return typeof t=="object"&&t!==null&&"type"in t&&t.type==="thinking"}function dmI(t){return typeof t=="object"&&t!==null&&"type"in t&&t.type==="redacted_thinking"}function i0e(t){return typeof t=="object"&&t!==null&&"type"in t&&t.type==="compaction"}function umI(t){return typeof t=="object"&&t!==null&&"type"in t&&t.type==="search_result"}function bmI(t){return typeof t!="object"||t==null||!("type"in t)||t.type!=="image"||!("source"in t)||typeof t.source!="object"||t.source==null||!("type"in t.source)?!1:t.source.type==="base64"?!(!("media_type"in t.source)||typeof t.source.media_type!="string"||!("data"in t.source)||typeof t.source.data!="string"):t.source.type==="url"?!(!("url"in t.source)||typeof t.source.url!="string"):!1}var mmI,jPe=g(()=>{o();NI();mmI={providerName:"anthropic",fromStandardTextBlock(t){return{type:"text",text:t.text,..."citations"in(t.metadata??{})?{citations:t.metadata.citations}:{},..."cache_control"in(t.metadata??{})?{cache_control:t.metadata.cache_control}:{}}},fromStandardImageBlock(t){if(t.source_type==="url"){let e=ui({dataUrl:t.url,asTypedArray:!1});return e?{type:"image",source:{type:"base64",data:e.data,media_type:e.mime_type},..."cache_control"in(t.metadata??{})?{cache_control:t.metadata.cache_control}:{}}:{type:"image",source:{type:"url",url:t.url},..."cache_control"in(t.metadata??{})?{cache_control:t.metadata.cache_control}:{}}}else{if(t.source_type==="base64")return{type:"image",source:{type:"base64",data:t.data,media_type:t.mime_type??""},..."cache_control"in(t.metadata??{})?{cache_control:t.metadata.cache_control}:{}};throw new Error(`Unsupported image source type: ${t.source_type}`)}},fromStandardFileBlock(t){let e=(t.mime_type??"").split(";")[0];if(t.source_type==="url"){if(e==="application/pdf"||e==="")return{type:"document",source:{type:"url",url:t.url},..."cache_control"in(t.metadata??{})?{cache_control:t.metadata.cache_control}:{},..."citations"in(t.metadata??{})?{citations:t.metadata.citations}:{},..."context"in(t.metadata??{})?{context:t.metadata.context}:{},..."title"in(t.metadata??{})?{title:t.metadata.title}:{}};throw new Error(`Unsupported file mime type for file url source: ${t.mime_type}`)}else if(t.source_type==="text"){if(e==="text/plain"||e==="")return{type:"document",source:{type:"text",data:t.text,media_type:t.mime_type??""},..."cache_control"in(t.metadata??{})?{cache_control:t.metadata.cache_control}:{},..."citations"in(t.metadata??{})?{citations:t.metadata.citations}:{},..."context"in(t.metadata??{})?{context:t.metadata.context}:{},..."title"in(t.metadata??{})?{title:t.metadata.title}:{}};throw new Error(`Unsupported file mime type for file text source: ${t.mime_type}`)}else if(t.source_type==="base64"){if(e==="application/pdf"||e==="")return{type:"document",source:{type:"base64",data:t.data,media_type:"application/pdf"},..."cache_control"in(t.metadata??{})?{cache_control:t.metadata.cache_control}:{},..."citations"in(t.metadata??{})?{citations:t.metadata.citations}:{},..."context"in(t.metadata??{})?{context:t.metadata.context}:{},..."title"in(t.metadata??{})?{title:t.metadata.title}:{}};if(["image/jpeg","image/png","image/gif","image/webp"].includes(e))return{type:"document",source:{type:"content",content:[{type:"image",source:{type:"base64",data:t.data,media_type:e}}]},..."cache_control"in(t.metadata??{})?{cache_control:t.metadata.cache_control}:{},..."citations"in(t.metadata??{})?{citations:t.metadata.citations}:{},..."context"in(t.metadata??{})?{context:t.metadata.context}:{},..."title"in(t.metadata??{})?{title:t.metadata.title}:{}};throw new Error(`Unsupported file mime type for file base64 source: ${t.mime_type}`)}else throw new Error(`Unsupported file source type: ${t.source_type}`)}}});var ZmI,pmI=g(()=>{o();ZmI=t=>t()});function ESn(t){return typeof t=="object"&&t!==null&&"type"in t&&t.type==="citation"}function JSn(t){function*e(){for(let I of t)ESn(I)&&(I.source==="char"?yield{type:"char_location",file_id:I.url??"",start_char_index:I.startIndex??0,end_char_index:I.endIndex??0,document_title:I.title??null,document_index:0,cited_text:I.citedText??""}:I.source==="page"?yield{type:"page_location",file_id:I.url??"",start_page_number:I.startIndex??0,end_page_number:I.endIndex??0,document_title:I.title??null,document_index:0,cited_text:I.citedText??""}:I.source==="block"?yield{type:"content_block_location",file_id:I.url??"",start_block_index:I.startIndex??0,end_block_index:I.endIndex??0,document_title:I.title??null,document_index:0,cited_text:I.citedText??""}:I.source==="url"?yield{type:"web_search_result_location",url:I.url??"",title:I.title??null,encrypted_index:String(I.startIndex??0),cited_text:I.citedText??""}:I.source==="search"&&(yield{type:"search_result_location",title:I.title??null,start_block_index:I.startIndex??0,end_block_index:I.endIndex??0,search_result_index:0,source:I.source??"",cited_text:I.citedText??""}))}return Array.from(e())}function Dee(t){return typeof t=="string"?t:CSn(t)}function CSn(t){let e=[];for(let I=0,{length:l}=t;I{if(typeof n.args!="string")return n.args;try{return JSON.parse(n.args)}catch{return{}}});e.push({type:"tool_use",id:n.id??"",name:n.name??"",input:a})}else if(n.type==="reasoning"&&l)e.push({type:"thinking",thinking:n.reasoning,signature:String(n.signature)});else if(n.type==="server_tool_call"&&l)n.name==="web_search"?e.push({type:"server_tool_use",name:n.name,id:n.id??"",input:n.args}):n.name==="code_execution"&&e.push({type:"server_tool_use",name:n.name,id:n.id??"",input:n.args});else if(n.type==="server_tool_call_result"&&l)if(n.name==="web_search"&&Array.isArray(n.output.urls)){let a=n.output.urls.map(c=>({type:"web_search_result",title:"",encrypted_content:"",url:c}));e.push({type:"web_search_tool_result",tool_use_id:n.toolCallId??"",content:a})}else n.name==="code_execution"?e.push({type:"code_execution_tool_result",tool_use_id:n.toolCallId??"",content:n.output}):n.name==="mcp_tool_result"&&e.push({type:"mcp_tool_result",tool_use_id:n.toolCallId??"",content:n.output});else{if(n.type==="audio")throw new Error("Anthropic does not support audio content blocks.");if(n.type==="file"){let a=n.metadata;if(n.fileId){e.push(oM({type:"document",source:{type:"file",file_id:n.fileId}},a));continue}if(n.url){let c=UPe(n.mimeType);if(c==="application/pdf"||c===""){e.push(oM({type:"document",source:{type:"url",url:n.url}},a));continue}}if(n.data){let c=UPe(n.mimeType);if(c===""||c==="application/pdf")e.push(oM({type:"document",source:{type:"base64",data:Dee(n.data),media_type:"application/pdf"}},a));else if(c==="text/plain")e.push(oM({type:"document",source:{type:"text",data:Dee(n.data),media_type:"text/plain"}},a));else if(hmI(c))e.push(oM({type:"document",source:{type:"content",content:[{type:"image",source:{type:"base64",data:Dee(n.data),media_type:c}}]}},a));else throw new Error(`Unsupported file mime type for Anthropic base64 source: ${c}`);continue}throw new Error("File content block must include a fileId, url, or data property.")}else if(n.type==="image"){let a=n.metadata;if(n.fileId){e.push(OPe({type:"image",source:{type:"file",file_id:n.fileId}},a));continue}if(n.url){e.push(OPe({type:"image",source:{type:"url",url:n.url}},a));continue}if(n.data){let c=UPe(n.mimeType)||"image/png";hmI(c)&&e.push(OPe({type:"image",source:{type:"base64",data:Dee(n.data),media_type:c}},a));continue}throw new Error("Image content block must include a fileId, url, or data property.")}else n.type==="video"||(n.type==="text-plain"?n.data&&e.push(oM({type:"document",source:{type:"text",data:Dee(n.data),media_type:"text/plain"}},n.metadata)):n.type==="non_standard"&&l&&e.push(n.value))}return e}var NmI=g(()=>{o();pmI()});function zPe(t){let e=ui({dataUrl:t});if(e)return{type:"base64",media_type:e.mime_type,data:e.data};let I;try{I=new URL(t)}catch{throw new Error([`Malformed image URL: ${JSON.stringify(t)}. Content blocks of type 'image_url' must be a valid http, https, or base64-encoded data URL.`,"Example: data:image/png;base64,/9j/4AAQSk...","Example: https://example.com/image.jpg"].join(` + +`))}if(I.protocol==="http:"||I.protocol==="https:")return{type:"url",url:t};throw new Error([`Invalid image URL protocol: ${JSON.stringify(I.protocol)}. Anthropic only supports images as http, https, or base64-encoded data URLs on 'image_url' content blocks.`,"Example: data:image/png;base64,/9j/4AAQSk...","Example: https://example.com/image.jpg"].join(` + +`))}function LSn(t){let e=[];for(let I of t)if(I._getType()==="tool")if(typeof I.content=="string"){let l=e[e.length-1];l?._getType()==="human"&&Array.isArray(l.content)&&"type"in l.content[0]&&l.content[0].type==="tool_result"?l.content.push({type:"tool_result",content:I.content,tool_use_id:I.tool_call_id}):e.push(new ZI({content:[{type:"tool_result",content:I.content,tool_use_id:I.tool_call_id}]}))}else e.push(new ZI({content:[{type:"tool_result",...I.content!=null?{content:MPe(I)}:{},tool_use_id:I.tool_call_id}]}));else e.push(I);return e}function BPe(t){if(t.id===void 0)throw new Error('Anthropic requires all tool calls to have an "id".');return{type:"tool_use",id:t.id,name:t.name,input:t.args}}function*kSn(t,e){let I=["bash_code_execution_tool_result","input_json_delta","server_tool_use","text_editor_code_execution_tool_result","tool_result","tool_use","web_search_result","web_search_tool_result"],l=["text","text_delta"];for(let n of t){ho(n)&&(yield QA(n,mmI));let a="cache_control"in n?n.cache_control:void 0;if(n.type==="image_url"){let c;typeof n.image_url=="string"?c=zPe(n.image_url):typeof n.image_url=="object"&&n.image_url!==null&&"url"in n.image_url&&typeof n.image_url.url=="string"&&(c=zPe(n.image_url.url)),c&&(yield{type:"image",source:c,...a?{cache_control:a}:{}})}else if(bmI(n))yield n;else if(n.type==="image"){let c;"url"in n&&typeof n.url=="string"?c=zPe(n.url):"data"in n&&(typeof n.data=="string"||n.data instanceof Uint8Array)?c={type:"base64",media_type:"mimeType"in n&&typeof n.mimeType=="string"?n.mimeType:"image/jpeg",data:typeof n.data=="string"?n.data:m.Buffer.from(n.data).toString("base64")}:"fileId"in n&&typeof n.fileId=="string"&&(c={type:"file",file_id:n.fileId}),c&&(yield{type:"image",source:c,...a?{cache_control:a}:{}})}else if(n.type==="file"){let c;"url"in n&&typeof n.url=="string"?c={type:"url",url:n.url}:"data"in n&&(typeof n.data=="string"||n.data instanceof Uint8Array)?c={type:"base64",media_type:"mimeType"in n&&typeof n.mimeType=="string"?n.mimeType:"application/pdf",data:typeof n.data=="string"?n.data:m.Buffer.from(n.data).toString("base64")}:"fileId"in n&&typeof n.fileId=="string"&&(c={type:"file",file_id:n.fileId}),c&&(yield{type:"document",source:c,...a?{cache_control:a}:{}})}else if(n.type==="document")yield{...n,...a?{cache_control:a}:{}};else if(GmI(n))yield{type:"thinking",thinking:n.thinking,signature:n.signature,...a?{cache_control:a}:{}};else if(dmI(n))yield{type:"redacted_thinking",data:n.data,...a?{cache_control:a}:{}};else if(i0e(n))yield{type:"compaction",content:n.content,...a?{cache_control:a}:{}};else if(umI(n))yield{type:"search_result",title:n.title,source:n.source,..."cache_control"in n&&n.cache_control?{cache_control:n.cache_control}:{},..."citations"in n&&n.citations?{citations:n.citations}:{},content:n.content};else if(l.find(c=>c===n.type)&&"text"in n)yield{type:"text",text:n.text,...a?{cache_control:a}:{},..."citations"in n&&n.citations?{citations:n.citations}:{}};else if(I.find(c=>c===n.type)){let c={...n};if(c.type==="input_json_delta")continue;if(c.type==="tool_use"&&typeof c.input=="string"){let r=e?.find(s=>s.id===c.id);r?c.input=r.args:c.input=t.filter(s=>s.index===c.index&&s.type==="input_json_delta"&&typeof s.input=="string").reduce((s,i)=>s+i.input,c.input)}if("index"in c&&delete c.index,"input"in c&&typeof c.input=="string")try{c.input=JSON.parse(c.input)}catch{c.input={}}yield{...c,...a?{cache_control:a}:{}}}else n.type==="container_upload"&&(yield{...n,...a?{cache_control:a}:{}})}}function MPe(t,e){let{content:I}=t;return typeof I=="string"?I:Array.from(kSn(I,e))}function Pee(t){let e=LSn(t),I;return e.length>0&&e[0]._getType()==="system"&&(I=t[0].content),{messages:xSn((I!==void 0?e.slice(1):e).map(l=>{let n;if(l._getType()==="human")n="user";else if(l._getType()==="ai")n="assistant";else if(l._getType()==="tool")n="user";else throw l._getType()==="system"?new Error("System messages are only permitted as the first passed message."):new Error(`Message type "${l.type}" is not supported.`);if(He.isInstance(l)&&l.response_metadata?.output_version==="v1")return{role:n,content:WmI(l)};if(He.isInstance(l)&&l.tool_calls?.length){if(typeof l.content=="string")return l.content===""?{role:n,content:l.tool_calls.map(BPe)}:{role:n,content:[{type:"text",text:l.content},...l.tool_calls.map(BPe)]};{let{content:a}=l,c=MPe(l,l.tool_calls),r=Array.isArray(c)?c:[{type:"text",text:c}],s=l.tool_calls.filter(i=>!a.find(G=>(G.type==="tool_use"||G.type==="input_json_delta"||G.type==="server_tool_use")&&G.id===i.id));return{role:n,content:[...r,...s.map(BPe)]}}}else return{role:n,content:MPe(l,He.isInstance(l)?l.tool_calls:void 0)}})),system:I}}function SPe(t,e){if(!t.messages||t.messages.length===0)return t;let I=[...t.messages],l=I.length-1,n=I[l];if(!n)return t;if(typeof n.content=="string")return I[l]={...n,content:[{type:"text",text:n.content,cache_control:e}]},{...t,messages:I};if(Array.isArray(n.content)&&n.content.length>0){let a=[...n.content],c=a.length-1;return a[c]={...a[c],cache_control:e},I[l]={...n,content:a},{...t,messages:I}}return t}function xSn(t){if(!t||t.length<=1)return t;let e=[],I=t[0],l=a=>typeof a=="string"?[{type:"text",text:a}]:a,n=a=>a.role!=="user"||typeof a.content=="string"?!1:Array.isArray(a.content)&&a.content.every(c=>c.type==="tool_result");for(let a=1;a{o();jPe();NmI();NI()});function VmI(t){return t.type==="enabled"||t.type==="adaptive"}function _Pe(t){return t?.startsWith("claude-opus-4-7")??!1}function YmI(t,e){let I=e&&typeof e=="object"&&"task_budget"in e&&e.task_budget!=null;return _Pe(t)&&I?["task-budgets-2026-03-13"]:[]}function RmI(t){let{model:e,thinking:I,topK:l,topP:n,temperature:a}=t,c=_Pe(e);if(c&&I.type==="enabled")throw new Error('thinking.type="enabled" is not supported for claude-opus-4-7; use thinking.type="adaptive" instead');if(c&&typeof I=="object"&&I!=null&&"budget_tokens"in I)throw new Error("thinking.budget_tokens is not supported for claude-opus-4-7; use outputConfig.effort instead");if(c){if(l!==void 0)throw new Error("topK is not supported for claude-opus-4-7; omit topK/topP/temperature or use model prompting instead");if(n!==void 0&&n!==1)throw new Error("topP is not supported for claude-opus-4-7 when set to non-default values");if(a!==void 0&&a!==1)throw new Error("temperature is not supported for claude-opus-4-7 when set to non-default values")}if(VmI(I)){if(l!==void 0)throw new Error("topK is not supported when thinking is enabled");if(n!==void 0)throw new Error("topP is not supported when thinking is enabled");if(a!==void 0&&a!==1)throw new Error("temperature is not supported when thinking is enabled")}}function AmI(t){let{model:e,thinking:I,topK:l,topP:n,temperature:a}=t,c={};return VmI(I)||_Pe(e)||(a!==void 0&&(c.temperature=a),l!==void 0&&(c.top_k=l),n!==void 0&&(c.top_p=n)),c}var FmI=g(()=>{o()});function XmI(t,e){let I={model_provider:"anthropic"};if(t.type==="message_start"){let{content:l,usage:n,...a}=t.message,c={};for(let[d,u]of Object.entries(a))u!=null&&(c[d]=u);let{input_tokens:r,output_tokens:s,...i}=n??{},G=vmI(n);return{chunk:new eI({content:e.coerceContentToString?"":[],additional_kwargs:c,usage_metadata:e.streamUsage?G:void 0,response_metadata:{...I,usage:{...i}},id:t.message.id})}}else if(t.type==="message_delta"){let l={input_tokens:0,output_tokens:t.usage.output_tokens,total_tokens:t.usage.output_tokens},n="context_management"in t.delta?{context_management:t.delta.context_management}:void 0;return{chunk:new eI({content:e.coerceContentToString?"":[],response_metadata:n,additional_kwargs:{...t.delta},usage_metadata:e.streamUsage?l:void 0})}}else if(t.type==="content_block_start"&&["tool_use","document","server_tool_use","web_search_tool_result"].includes(t.content_block.type)){let l=t.content_block,n;return l.type==="tool_use"?n=[{id:l.id,index:t.index,name:l.name,args:""}]:n=[],{chunk:new eI({content:e.coerceContentToString?"":[{index:t.index,...t.content_block,input:l.type==="server_tool_use"||l.type==="tool_use"?"":void 0}],response_metadata:I,additional_kwargs:{},tool_call_chunks:n})}}else if(t.type==="content_block_delta"&&["text_delta","citations_delta","thinking_delta","signature_delta"].includes(t.delta.type)){if(e.coerceContentToString&&"text"in t.delta)return{chunk:new eI({content:t.delta.text})};{let l=t.delta;return"citation"in l&&(l.citations=[l.citation],delete l.citation),l.type==="thinking_delta"||l.type==="signature_delta"?{chunk:new eI({content:[{index:t.index,...l,type:"thinking"}],response_metadata:I})}:{chunk:new eI({content:[{index:t.index,...l,type:"text"}],response_metadata:I})}}}else{if(t.type==="content_block_delta"&&t.delta.type==="input_json_delta")return{chunk:new eI({content:e.coerceContentToString?"":[{index:t.index,input:t.delta.partial_json,type:t.delta.type}],response_metadata:I,additional_kwargs:{},tool_call_chunks:[{index:t.index,args:t.delta.partial_json}]})};if(t.type==="content_block_start"&&t.content_block.type==="text"){let l=t.content_block?.text;if(l!==void 0)return{chunk:new eI({content:e.coerceContentToString?l:[{index:t.index,...t.content_block}],response_metadata:I,additional_kwargs:{}})}}else{if(t.type==="content_block_start"&&t.content_block.type==="redacted_thinking")return{chunk:new eI({content:e.coerceContentToString?"":[{index:t.index,...t.content_block}],response_metadata:I})};if(t.type==="content_block_start"&&t.content_block.type==="thinking"){let l=t.content_block.thinking;return{chunk:new eI({content:e.coerceContentToString?l:[{index:t.index,...t.content_block}],response_metadata:I})}}else{if(t.type==="content_block_start"&&i0e(t.content_block))return{chunk:new eI({content:e.coerceContentToString?"":[{index:t.index,...t.content_block}],response_metadata:I})};if(t.type==="content_block_delta"&&t.delta.type==="compaction_delta")return{chunk:new eI({content:e.coerceContentToString?"":[{index:t.index,...t.delta,type:"compaction"}],response_metadata:I})}}}}return null}function gmI(t,e){let I={...e,model_provider:"anthropic"},l=e.usage,n=l!=null?vmI(l):void 0;return t.length===1&&t[0].type==="text"?[{text:t[0].text,message:new He({content:t[0].text,additional_kwargs:e,usage_metadata:n,response_metadata:I,id:e.id})}]:[{text:"",message:new He({content:t,additional_kwargs:e,tool_calls:LPe(t),usage_metadata:n,response_metadata:I,id:e.id})}]}function vmI(t){let e=t.cache_creation_input_tokens??0,I=t.cache_read_input_tokens??0,l=t.input_tokens+e+I;return{input_tokens:l,output_tokens:t.output_tokens,total_tokens:l+t.output_tokens,input_token_details:{cache_creation:e,cache_read:I}}}var ymI=g(()=>{o();kPe();jPe();NI()});function $ee(t,e){return t.lc_error_code=e,t.message=`${t.message} + +Troubleshooting URL: https://docs.langchain.com/oss/javascript/langchain/errors/${e}/ +`,t}function KPe(t){let e;return t.status===400&&typeof t.message=="string"&&t.message.includes("prompt is too long")?e=$ee(DS.fromError(t),"CONTEXT_OVERFLOW"):t.status===400&&t.message.includes("tool")?e=$ee(t,"INVALID_TOOL_RESULTS"):t.status===401?e=$ee(t,"MODEL_AUTHENTICATION"):t.status===404?e=$ee(t,"MODEL_NOT_FOUND"):t.status===429?e=$ee(t,"MODEL_RATE_LIMIT"):e=t,e}var wmI=g(()=>{o();hX()});var HmI,QmI=g(()=>{o();HmI={"claude-3-sonnet-20240229":{maxInputTokens:2e5,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:4096,reasoningOutput:!1,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!1,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0},"claude-haiku-4-5":{maxInputTokens:2e5,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:64e3,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!1,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0},"claude-opus-4-5-20251101":{maxInputTokens:2e5,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:64e3,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!1,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0},"claude-3-opus-20240229":{maxInputTokens:2e5,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:4096,reasoningOutput:!1,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!1,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0},"claude-3-5-haiku-20241022":{maxInputTokens:2e5,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:8192,reasoningOutput:!1,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!1,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0},"claude-3-5-sonnet-20241022":{maxInputTokens:2e5,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:8192,reasoningOutput:!1,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!1,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0},"claude-sonnet-4-6":{maxInputTokens:1e6,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:64e3,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!1,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0},"claude-opus-4-0":{maxInputTokens:2e5,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:32e3,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!1,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0},"claude-opus-4-7":{maxInputTokens:1e6,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:128e3,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!1,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0},"claude-3-haiku-20240307":{maxInputTokens:2e5,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:4096,reasoningOutput:!1,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!1,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0},"claude-sonnet-4-5-20250929":{maxInputTokens:2e5,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:64e3,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!1,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0},"claude-3-5-haiku-latest":{maxInputTokens:2e5,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:8192,reasoningOutput:!1,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!1,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0},"claude-opus-4-1":{maxInputTokens:2e5,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:32e3,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!1,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0},"claude-sonnet-4-0":{maxInputTokens:2e5,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:64e3,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!1,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0},"claude-3-5-sonnet-20240620":{maxInputTokens:2e5,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:8192,reasoningOutput:!1,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!1,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0},"claude-opus-4-5":{maxInputTokens:2e5,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:64e3,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!1,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0},"claude-opus-4-1-20250805":{maxInputTokens:2e5,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:32e3,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!1,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0},"claude-haiku-4-5-20251001":{maxInputTokens:2e5,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:64e3,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!1,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0},"claude-sonnet-4-20250514":{maxInputTokens:2e5,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:64e3,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!1,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0},"claude-opus-4-6":{maxInputTokens:1e6,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:128e3,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!1,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0},"claude-3-7-sonnet-20250219":{maxInputTokens:2e5,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:64e3,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!1,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0},"claude-sonnet-4-5":{maxInputTokens:2e5,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:64e3,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!1,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0},"claude-opus-4-20250514":{maxInputTokens:2e5,imageInputs:!0,audioInputs:!1,pdfInputs:!0,videoInputs:!1,maxOutputTokens:32e3,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!1,imageUrlInputs:!0,pdfToolMessage:!0,imageToolMessage:!0}}});function Wt(t,e,I,l,n){if(l==="m")throw new TypeError("Private method is not writable");if(l==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return l==="a"?n.call(t,I):n?n.value=I:e.set(t,I),I}function be(t,e,I,l){if(I==="a"&&!l)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!l:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return I==="m"?l:I==="a"?l.call(t):l?l.value:e.get(t)}var Sw=g(()=>{o()});var DPe,qPe=g(()=>{o();DPe=function(){let{crypto:t}=globalThis;if(t?.randomUUID)return DPe=t.randomUUID.bind(t),t.randomUUID();let e=new Uint8Array(1),I=t?()=>t.getRandomValues(e)[0]:()=>Math.random()*255&255;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,l=>(+l^I()&15>>+l/4).toString(16))}});function Tw(t){return typeof t=="object"&&t!==null&&("name"in t&&t.name==="AbortError"||"message"in t&&String(t.message).includes("FetchRequestCanceledException"))}var ete,iM=g(()=>{o();ete=t=>{if(t instanceof Error)return t;if(typeof t=="object"&&t!==null){try{if(Object.prototype.toString.call(t)==="[object Error]"){let e=new Error(t.message,t.cause?{cause:t.cause}:{});return t.stack&&(e.stack=t.stack),t.cause&&!e.cause&&(e.cause=t.cause),t.name&&(e.name=t.name),e}}catch{}try{return new Error(JSON.stringify(t))}catch{}}return new Error(t)}});var Bt,li,_i,y1,GM,dM,uM,bM,mM,ZM,pM,hM,WM,Xb=g(()=>{o();iM();Bt=class extends Error{},li=class t extends Bt{constructor(e,I,l,n,a){super(`${t.makeMessage(e,I,l)}`),this.status=e,this.headers=n,this.requestID=n?.get("request-id"),this.error=I,this.type=a??null}static makeMessage(e,I,l){let n=I?.message?typeof I.message=="string"?I.message:JSON.stringify(I.message):I?JSON.stringify(I):l;return e&&n?`${e} ${n}`:e?`${e} status code (no body)`:n||"(no status code or body)"}static generate(e,I,l,n){if(!e||!n)return new y1({message:l,cause:ete(I)});let a=I,c=a?.error?.type;return e===400?new dM(e,a,l,n,c):e===401?new uM(e,a,l,n,c):e===403?new bM(e,a,l,n,c):e===404?new mM(e,a,l,n,c):e===409?new ZM(e,a,l,n,c):e===422?new pM(e,a,l,n,c):e===429?new hM(e,a,l,n,c):e>=500?new WM(e,a,l,n,c):new t(e,a,l,n,c)}},_i=class extends li{constructor({message:e}={}){super(void 0,void 0,e||"Request was aborted.",void 0)}},y1=class extends li{constructor({message:e,cause:I}){super(void 0,void 0,e||"Connection error.",void 0),I&&(this.cause=I)}},GM=class extends y1{constructor({message:e}={}){super({message:e??"Request timed out."})}},dM=class extends li{},uM=class extends li{},bM=class extends li{},mM=class extends li{},ZM=class extends li{},pM=class extends li{},hM=class extends li{},WM=class extends li{}});function G0e(t){return typeof t!="object"?{}:t??{}}function e7e(t){if(!t)return!0;for(let e in t)return!1;return!0}function EmI(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var USn,fmI,PPe,$Pe,JmI,d0e,gb,w1=g(()=>{o();Xb();USn=/^[a-z][a-z0-9+.-]*:/i,fmI=t=>USn.test(t),PPe=t=>(PPe=Array.isArray,PPe(t)),$Pe=PPe;JmI=(t,e)=>{if(typeof e!="number"||!Number.isInteger(e))throw new Bt(`${t} must be an integer`);if(e<0)throw new Bt(`${t} must be a positive integer`);return e},d0e=t=>{try{return JSON.parse(t)}catch{return}},gb=(t,e)=>{let I=t[e];return delete t[e],I}});var CmI,t7e=g(()=>{o();CmI=t=>new Promise(e=>setTimeout(e,t))});var H1,I7e=g(()=>{o();H1="0.90.0"});function OSn(){return typeof Deno<"u"&&Deno.build!=null?"deno":typeof EdgeRuntime<"u"?"edge":Object.prototype.toString.call(typeof globalThis.process<"u"?globalThis.process:0)==="[object process]"?"node":"unknown"}function BSn(){if(typeof navigator>"u"||!navigator)return null;let t=[{key:"edge",pattern:/Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"chrome",pattern:/Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"firefox",pattern:/Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"safari",pattern:/(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/}];for(let{key:e,pattern:I}of t){let l=I.exec(navigator.userAgent);if(l){let n=l[1]||0,a=l[2]||0,c=l[3]||0;return{browser:e,version:`${n}.${a}.${c}`}}}return null}var jmI,zSn,LmI,kmI,xmI,UmI,l7e=g(()=>{o();I7e();jmI=()=>typeof window<"u"&&typeof window.document<"u"&&typeof navigator<"u";zSn=()=>{let t=OSn();if(t==="deno")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":H1,"X-Stainless-OS":kmI(Deno.build.os),"X-Stainless-Arch":LmI(Deno.build.arch),"X-Stainless-Runtime":"deno","X-Stainless-Runtime-Version":typeof Deno.version=="string"?Deno.version:Deno.version?.deno??"unknown"};if(typeof EdgeRuntime<"u")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":H1,"X-Stainless-OS":"Unknown","X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":"edge","X-Stainless-Runtime-Version":globalThis.process.version};if(t==="node")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":H1,"X-Stainless-OS":kmI(globalThis.process.platform??"unknown"),"X-Stainless-Arch":LmI(globalThis.process.arch??"unknown"),"X-Stainless-Runtime":"node","X-Stainless-Runtime-Version":globalThis.process.version??"unknown"};let e=BSn();return e?{"X-Stainless-Lang":"js","X-Stainless-Package-Version":H1,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":`browser:${e.browser}`,"X-Stainless-Runtime-Version":e.version}:{"X-Stainless-Lang":"js","X-Stainless-Package-Version":H1,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":"unknown","X-Stainless-Runtime-Version":"unknown"}};LmI=t=>t==="x32"?"x32":t==="x86_64"||t==="x64"?"x64":t==="arm"?"arm":t==="aarch64"||t==="arm64"?"arm64":t?`other:${t}`:"unknown",kmI=t=>(t=t.toLowerCase(),t.includes("ios")?"iOS":t==="android"?"Android":t==="darwin"?"MacOS":t==="win32"?"Windows":t==="freebsd"?"FreeBSD":t==="openbsd"?"OpenBSD":t==="linux"?"Linux":t?`Other:${t}`:"Unknown"),UmI=()=>xmI??(xmI=zSn())});function OmI(){if(typeof fetch<"u")return fetch;throw new Error("`fetch` is not defined as a global; Either pass `fetch` to the client, `new Anthropic({ fetch })` or polyfill the global, `globalThis.fetch = fetch`")}function n7e(...t){let e=globalThis.ReadableStream;if(typeof e>"u")throw new Error("`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`");return new e(...t)}function u0e(t){let e=Symbol.asyncIterator in t?t[Symbol.asyncIterator]():t[Symbol.iterator]();return n7e({start(){},async pull(I){let{done:l,value:n}=await e.next();l?I.close():I.enqueue(n)},async cancel(){await e.return?.()}})}function tte(t){if(t[Symbol.asyncIterator])return t;let e=t.getReader();return{async next(){try{let I=await e.read();return I?.done&&e.releaseLock(),I}catch(I){throw e.releaseLock(),I}},async return(){let I=e.cancel();return e.releaseLock(),await I,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}async function zmI(t){if(t===null||typeof t!="object")return;if(t[Symbol.asyncIterator]){await t[Symbol.asyncIterator]().return?.();return}let e=t.getReader(),I=e.cancel();e.releaseLock(),await I}var NM=g(()=>{o()});var BmI,MmI=g(()=>{o();BmI=({headers:t,body:e})=>({bodyHeaders:{"content-type":"application/json"},body:JSON.stringify(e)})});function SmI(t){return Object.entries(t).filter(([e,I])=>typeof I<"u").map(([e,I])=>{if(typeof I=="string"||typeof I=="number"||typeof I=="boolean")return`${encodeURIComponent(e)}=${encodeURIComponent(I)}`;if(I===null)return`${encodeURIComponent(e)}=`;throw new Bt(`Cannot stringify type ${typeof I}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`)}).join("&")}var a7e=g(()=>{o();Xb()});function KmI(t){let e=0;for(let n of t)e+=n.length;let I=new Uint8Array(e),l=0;for(let n of t)I.set(n,l),l+=n.length;return I}function VM(t){let e;return(TmI??(e=new globalThis.TextEncoder,TmI=e.encode.bind(e)))(t)}function c7e(t){let e;return(_mI??(e=new globalThis.TextDecoder,_mI=e.decode.bind(e)))(t)}var TmI,_mI,b0e=g(()=>{o()});function TSn(t,e){for(let n=e??0;n{o();Sw();b0e();_w=class{constructor(){op.set(this,void 0),ip.set(this,void 0),Wt(this,op,new Uint8Array,"f"),Wt(this,ip,null,"f")}decode(e){if(e==null)return[];let I=e instanceof ArrayBuffer?new Uint8Array(e):typeof e=="string"?VM(e):e;Wt(this,op,KmI([be(this,op,"f"),I]),"f");let l=[],n;for(;(n=TSn(be(this,op,"f"),be(this,ip,"f")))!=null;){if(n.carriage&&be(this,ip,"f")==null){Wt(this,ip,n.index,"f");continue}if(be(this,ip,"f")!=null&&(n.index!==be(this,ip,"f")+1||n.carriage)){l.push(c7e(be(this,op,"f").subarray(0,be(this,ip,"f")-1))),Wt(this,op,be(this,op,"f").subarray(be(this,ip,"f")),"f"),Wt(this,ip,null,"f");continue}let a=be(this,ip,"f")!==null?n.preceding-1:n.preceding,c=c7e(be(this,op,"f").subarray(0,a));l.push(c),Wt(this,op,be(this,op,"f").subarray(n.index),"f"),Wt(this,ip,null,"f")}return l}flush(){return be(this,op,"f").length?this.decode(` +`):[]}};op=new WeakMap,ip=new WeakMap;_w.NEWLINE_CHARS=new Set([` +`,"\r"]);_w.NEWLINE_REGEXP=/\r\n|[\n\r]/g});function Ite(){}function m0e(t,e,I){return!e||Z0e[t]>Z0e[I]?Ite:e[t].bind(e)}function ni(t){let e=t.logger,I=t.logLevel??"off";if(!e)return _Sn;let l=qmI.get(e);if(l&&l[0]===I)return l[1];let n={error:m0e("error",e,I),warn:m0e("warn",e,I),info:m0e("info",e,I),debug:m0e("debug",e,I)};return qmI.set(e,[I,n]),n}var Z0e,s7e,_Sn,qmI,Kw,lte=g(()=>{o();w1();Z0e={off:0,error:200,warn:300,info:400,debug:500},s7e=(t,e,I)=>{if(t){if(EmI(Z0e,t))return t;ni(I).warn(`${e} was set to ${JSON.stringify(t)}, expected one of ${JSON.stringify(Object.keys(Z0e))}`)}};_Sn={error:Ite,warn:Ite,info:Ite,debug:Ite},qmI=new WeakMap;Kw=t=>(t.options&&(t.options={...t.options},delete t.options.headers),t.headers&&(t.headers=Object.fromEntries((t.headers instanceof Headers?[...t.headers]:Object.entries(t.headers)).map(([e,I])=>[e,e.toLowerCase()==="x-api-key"||e.toLowerCase()==="authorization"||e.toLowerCase()==="cookie"||e.toLowerCase()==="set-cookie"?"***":I]))),"retryOfRequestLogID"in t&&(t.retryOfRequestLogID&&(t.retryOf=t.retryOfRequestLogID),delete t.retryOfRequestLogID),t)});async function*KSn(t,e){if(!t.body)throw e.abort(),typeof globalThis.navigator<"u"&&globalThis.navigator.product==="ReactNative"?new Bt("The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api"):new Bt("Attempted to iterate over a response with no body");let I=new o7e,l=new _w,n=tte(t.body);for await(let a of DSn(n))for(let c of l.decode(a)){let r=I.decode(c);r&&(yield r)}for(let a of l.flush()){let c=I.decode(a);c&&(yield c)}}async function*DSn(t){let e=new Uint8Array;for await(let I of t){if(I==null)continue;let l=I instanceof ArrayBuffer?new Uint8Array(I):typeof I=="string"?VM(I):I,n=new Uint8Array(e.length+l.length);n.set(e),n.set(l,e.length),e=n;let a;for(;(a=DmI(e))!==-1;)yield e.slice(0,a),e=e.slice(a)}e.length>0&&(yield e)}function qSn(t,e){let I=t.indexOf(e);return I!==-1?[t.substring(0,I),e,t.substring(I+e.length)]:[t,"",""]}var nte,j2,o7e,i7e=g(()=>{o();Sw();Xb();NM();r7e();NM();iM();w1();b0e();lte();Xb();j2=class t{constructor(e,I,l){this.iterator=e,nte.set(this,void 0),this.controller=I,Wt(this,nte,l,"f")}static fromSSEResponse(e,I,l){let n=!1,a=l?ni(l):console;async function*c(){if(n)throw new Bt("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");n=!0;let r=!1;try{for await(let s of KSn(e,I)){if(s.event==="completion")try{yield JSON.parse(s.data)}catch(i){throw a.error("Could not parse message into JSON:",s.data),a.error("From chunk:",s.raw),i}if(s.event==="message_start"||s.event==="message_delta"||s.event==="message_stop"||s.event==="content_block_start"||s.event==="content_block_delta"||s.event==="content_block_stop"||s.event==="message"||s.event==="user.message"||s.event==="user.interrupt"||s.event==="user.tool_confirmation"||s.event==="user.custom_tool_result"||s.event==="agent.message"||s.event==="agent.thinking"||s.event==="agent.tool_use"||s.event==="agent.tool_result"||s.event==="agent.mcp_tool_use"||s.event==="agent.mcp_tool_result"||s.event==="agent.custom_tool_use"||s.event==="agent.thread_context_compacted"||s.event==="session.status_running"||s.event==="session.status_idle"||s.event==="session.status_rescheduled"||s.event==="session.status_terminated"||s.event==="session.error"||s.event==="session.deleted"||s.event==="span.model_request_start"||s.event==="span.model_request_end")try{yield JSON.parse(s.data)}catch(i){throw a.error("Could not parse message into JSON:",s.data),a.error("From chunk:",s.raw),i}if(s.event!=="ping"&&s.event==="error"){let i=d0e(s.data)??s.data,G=i?.error?.type;throw new li(void 0,i,void 0,e.headers,G)}}r=!0}catch(s){if(Tw(s))return;throw s}finally{r||I.abort()}}return new t(c,I,l)}static fromReadableStream(e,I,l){let n=!1;async function*a(){let r=new _w,s=tte(e);for await(let i of s)for(let G of r.decode(i))yield G;for(let i of r.flush())yield i}async function*c(){if(n)throw new Bt("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");n=!0;let r=!1;try{for await(let s of a())r||s&&(yield JSON.parse(s));r=!0}catch(s){if(Tw(s))return;throw s}finally{r||I.abort()}}return new t(c,I,l)}[(nte=new WeakMap,Symbol.asyncIterator)](){return this.iterator()}tee(){let e=[],I=[],l=this.iterator(),n=a=>({next:()=>{if(a.length===0){let c=l.next();e.push(c),I.push(c)}return a.shift()}});return[new t(()=>n(e),this.controller,be(this,nte,"f")),new t(()=>n(I),this.controller,be(this,nte,"f"))]}toReadableStream(){let e=this,I;return n7e({async start(){I=e[Symbol.asyncIterator]()},async pull(l){try{let{value:n,done:a}=await I.next();if(a)return l.close();let c=VM(JSON.stringify(n)+` +`);l.enqueue(c)}catch(n){l.error(n)}},async cancel(){await I.return?.()}})}};o7e=class{constructor(){this.event=null,this.data=[],this.chunks=[]}decode(e){if(e.endsWith("\r")&&(e=e.substring(0,e.length-1)),!e){if(!this.event&&!this.data.length)return null;let a={event:this.event,data:this.data.join(` +`),raw:this.chunks};return this.event=null,this.data=[],this.chunks=[],a}if(this.chunks.push(e),e.startsWith(":"))return null;let[I,l,n]=qSn(e,":");return n.startsWith(" ")&&(n=n.substring(1)),I==="event"?this.event=n:I==="data"&&this.data.push(n),null}}});async function p0e(t,e){let{response:I,requestLogID:l,retryOfRequestLogID:n,startTime:a}=e,c=await(async()=>{if(e.options.stream)return ni(t).debug("response",I.status,I.url,I.headers,I.body),e.options.__streamClass?e.options.__streamClass.fromSSEResponse(I,e.controller):j2.fromSSEResponse(I,e.controller);if(I.status===204)return null;if(e.options.__binaryResponse)return I;let s=I.headers.get("content-type")?.split(";")[0]?.trim();if(s?.includes("application/json")||s?.endsWith("+json")){if(I.headers.get("content-length")==="0")return;let u=await I.json();return G7e(u,I)}return await I.text()})();return ni(t).debug(`[${l}] response parsed`,Kw({retryOfRequestLogID:n,url:I.url,status:I.status,body:c,durationMs:Date.now()-a})),c}function G7e(t,e){return!t||typeof t!="object"||Array.isArray(t)?t:Object.defineProperty(t,"_request_id",{value:e.headers.get("request-id"),enumerable:!1})}var d7e=g(()=>{o();i7e();lte()});var ate,Sk,h0e=g(()=>{o();Sw();d7e();Sk=class t extends Promise{constructor(e,I,l=p0e){super(n=>{n(null)}),this.responsePromise=I,this.parseResponse=l,ate.set(this,void 0),Wt(this,ate,e,"f")}_thenUnwrap(e){return new t(be(this,ate,"f"),this.responsePromise,async(I,l)=>G7e(e(await this.parseResponse(I,l),l),l.response))}asResponse(){return this.responsePromise.then(e=>e.response)}async withResponse(){let[e,I]=await Promise.all([this.parse(),this.asResponse()]);return{data:e,response:I,request_id:I.headers.get("request-id")}}parse(){return this.parsedPromise||(this.parsedPromise=this.responsePromise.then(e=>this.parseResponse(be(this,ate,"f"),e))),this.parsedPromise}then(e,I){return this.parse().then(e,I)}catch(e){return this.parse().catch(e)}finally(e){return this.parse().finally(e)}};ate=new WeakMap});var W0e,N0e,cte,FR,er,oo=g(()=>{o();Sw();Xb();d7e();h0e();w1();N0e=class{constructor(e,I,l,n){W0e.set(this,void 0),Wt(this,W0e,e,"f"),this.options=n,this.response=I,this.body=l}hasNextPage(){return this.getPaginatedItems().length?this.nextPageRequestOptions()!=null:!1}async getNextPage(){let e=this.nextPageRequestOptions();if(!e)throw new Bt("No next page expected; please check `.hasNextPage()` before calling `.getNextPage()`.");return await be(this,W0e,"f").requestAPIList(this.constructor,e)}async*iterPages(){let e=this;for(yield e;e.hasNextPage();)e=await e.getNextPage(),yield e}async*[(W0e=new WeakMap,Symbol.asyncIterator)](){for await(let e of this.iterPages())for(let I of e.getPaginatedItems())yield I}},cte=class extends Sk{constructor(e,I,l){super(e,I,async(n,a)=>new l(n,a.response,await p0e(n,a),a.options))}async*[Symbol.asyncIterator](){let e=await this;for await(let I of e)yield I}},FR=class extends N0e{constructor(e,I,l,n){super(e,I,l,n),this.data=l.data||[],this.has_more=l.has_more||!1,this.first_id=l.first_id||null,this.last_id=l.last_id||null}getPaginatedItems(){return this.data??[]}hasNextPage(){return this.has_more===!1?!1:super.hasNextPage()}nextPageRequestOptions(){if(this.options.query?.before_id){let I=this.first_id;return I?{...this.options,query:{...G0e(this.options.query),before_id:I}}:null}let e=this.last_id;return e?{...this.options,query:{...G0e(this.options.query),after_id:e}}:null}},er=class extends N0e{constructor(e,I,l,n){super(e,I,l,n),this.data=l.data||[],this.next_page=l.next_page||null}getPaginatedItems(){return this.data??[]}nextPageRequestOptions(){let e=this.next_page;return e?{...this.options,query:{...G0e(this.options.query),page:e}}:null}}});function Tk(t,e,I){return b7e(),new File(t,e??"unknown_file",I)}function rte(t,e){let I=typeof t=="object"&&t!==null&&("name"in t&&t.name&&String(t.name)||"url"in t&&t.url&&String(t.url)||"filename"in t&&t.filename&&String(t.filename)||"path"in t&&t.path&&String(t.path))||"";return e?I.split(/[\\/]/).pop()||void 0:I}function $Sn(t){let e=typeof t=="function"?t:t.fetch,I=PmI.get(e);if(I)return I;let l=(async()=>{try{let n="Response"in e?e.Response:(await e("data:,")).constructor,a=new FormData;return a.toString()!==await new n(a).text()}catch{return!0}})();return PmI.set(e,l),l}var b7e,m7e,YM,PmI,eTn,tTn,u7e,RM=g(()=>{o();NM();b7e=()=>{if(typeof File>"u"){let{process:t}=globalThis,e=typeof t?.versions?.node=="string"&&parseInt(t.versions.node.split("."))<20;throw new Error("`File` is not defined as a global, which is required for file uploads."+(e?" Update to Node 20 LTS or newer, or set `globalThis.File` to `import('node:buffer').File`.":""))}};m7e=t=>t!=null&&typeof t=="object"&&typeof t[Symbol.asyncIterator]=="function",YM=async(t,e,I=!0)=>({...t,body:await eTn(t.body,e,I)}),PmI=new WeakMap;eTn=async(t,e,I=!0)=>{if(!await $Sn(e))throw new TypeError("The provided fetch function does not support file uploads with the current global FormData class.");let l=new FormData;return await Promise.all(Object.entries(t||{}).map(([n,a])=>u7e(l,n,a,I))),l},tTn=t=>t instanceof Blob&&"name"in t,u7e=async(t,e,I,l)=>{if(I!==void 0){if(I==null)throw new TypeError(`Received null for "${e}"; to pass null in FormData, you must use the string 'null'`);if(typeof I=="string"||typeof I=="number"||typeof I=="boolean")t.append(e,String(I));else if(I instanceof Response){let n={},a=I.headers.get("Content-Type");a&&(n={type:a}),t.append(e,Tk([await I.blob()],rte(I,l),n))}else if(m7e(I))t.append(e,Tk([await new Response(u0e(I)).blob()],rte(I,l)));else if(tTn(I))t.append(e,Tk([I],rte(I,l),{type:I.type}));else if(Array.isArray(I))await Promise.all(I.map(n=>u7e(t,e+"[]",n,l)));else if(typeof I=="object")await Promise.all(Object.entries(I).map(([n,a])=>u7e(t,`${e}[${n}]`,a,l)));else throw new TypeError(`Invalid value given to form, expected a string, number, boolean, object, Array, File or Blob but got ${I} instead`)}}});async function V0e(t,e,I){if(b7e(),t=await t,e||(e=rte(t,!0)),ITn(t))return t instanceof File&&e==null&&I==null?t:Tk([await t.arrayBuffer()],e??t.name,{type:t.type,lastModified:t.lastModified,...I});if(lTn(t)){let n=await t.blob();return e||(e=new URL(t.url).pathname.split(/[\\/]/).pop()),Tk(await Z7e(n),e,I)}let l=await Z7e(t);if(!I?.type){let n=l.find(a=>typeof a=="object"&&"type"in a&&a.type);typeof n=="string"&&(I={...I,type:n})}return Tk(l,e,I)}async function Z7e(t){let e=[];if(typeof t=="string"||ArrayBuffer.isView(t)||t instanceof ArrayBuffer)e.push(t);else if($mI(t))e.push(t instanceof Blob?t:await t.arrayBuffer());else if(m7e(t))for await(let I of t)e.push(...await Z7e(I));else{let I=t?.constructor?.name;throw new Error(`Unexpected data type: ${typeof t}${I?`; constructor: ${I}`:""}${nTn(t)}`)}return e}function nTn(t){return typeof t!="object"||t===null?"":`; props: [${Object.getOwnPropertyNames(t).map(I=>`"${I}"`).join(", ")}]`}var $mI,ITn,lTn,eZI=g(()=>{o();RM();RM();$mI=t=>t!=null&&typeof t=="object"&&typeof t.size=="number"&&typeof t.type=="string"&&typeof t.text=="function"&&typeof t.slice=="function"&&typeof t.arrayBuffer=="function",ITn=t=>t!=null&&typeof t=="object"&&typeof t.name=="string"&&typeof t.lastModified=="number"&&$mI(t),lTn=t=>t!=null&&typeof t=="object"&&typeof t.url=="string"&&typeof t.blob=="function"});var p7e=g(()=>{o();eZI()});var tZI=g(()=>{o()});var cl,bs=g(()=>{o();cl=class{constructor(e){this._client=e}}});function*cTn(t){if(!t)return;if(IZI in t){let{values:l,nulls:n}=t;yield*l.entries();for(let a of n)yield[a,null];return}let e=!1,I;t instanceof Headers?I=t.entries():$Pe(t)?I=t:(e=!0,I=Object.entries(t??{}));for(let l of I){let n=l[0];if(typeof n!="string")throw new TypeError("expected header name to be a string");let a=$Pe(l[1])?l[1]:[l[1]],c=!1;for(let r of a)r!==void 0&&(e&&!c&&(c=!0,yield[n,null]),yield[n,r])}}var IZI,Ke,Kr=g(()=>{o();w1();IZI=Symbol.for("brand.privateNullableHeaders");Ke=t=>{let e=new Headers,I=new Set;for(let l of t){let n=new Set;for(let[a,c]of cTn(l)){let r=a.toLowerCase();n.has(r)||(e.delete(a),n.add(r)),c===null?(e.delete(a),I.add(r)):(e.append(a,c),I.delete(r))}}return{[IZI]:!0,values:e,nulls:I}}});function nZI(t){return t.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g,encodeURIComponent)}var lZI,rTn,xt,Ki=g(()=>{o();Xb();lZI=Object.freeze(Object.create(null)),rTn=(t=nZI)=>function(I,...l){if(I.length===1)return I[0];let n=!1,a=[],c=I.reduce((G,d,u)=>{/[?#]/.test(d)&&(n=!0);let b=l[u],Z=(n?encodeURIComponent:t)(""+b);return u!==l.length&&(b==null||typeof b=="object"&&b.toString===Object.getPrototypeOf(Object.getPrototypeOf(b.hasOwnProperty??lZI)??lZI)?.toString)&&(Z=b+"",a.push({start:G.length+d.length,length:Z.length,error:`Value of type ${Object.prototype.toString.call(b).slice(8,-1)} is not a valid path parameter`})),G+d+(u===l.length?"":Z)},""),r=c.split(/[?#]/,1)[0],s=/(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi,i;for(;(i=s.exec(r))!==null;)a.push({start:i.index,length:i[0].length,error:`Value "${i[0]}" can't be safely passed as a path parameter`});if(a.sort((G,d)=>G.start-d.start),a.length>0){let G=0,d=a.reduce((u,b)=>{let Z=" ".repeat(b.start-G),p="^".repeat(b.length);return G=b.start+b.length,u+Z+p},"");throw new Bt(`Path parameters result in path with invalid segments: +${a.map(u=>u.error).join(` +`)} +${c} +${d}`)}return c},xt=rTn(nZI)});var AM,h7e=g(()=>{o();bs();oo();Kr();Ki();AM=class extends cl{create(e,I){let{betas:l,...n}=e;return this._client.post("/v1/environments?beta=true",{body:n,...I,headers:Ke([{"anthropic-beta":[...l??[],"managed-agents-2026-04-01"].toString()},I?.headers])})}retrieve(e,I={},l){let{betas:n}=I??{};return this._client.get(xt`/v1/environments/${e}?beta=true`,{...l,headers:Ke([{"anthropic-beta":[...n??[],"managed-agents-2026-04-01"].toString()},l?.headers])})}update(e,I,l){let{betas:n,...a}=I;return this._client.post(xt`/v1/environments/${e}?beta=true`,{body:a,...l,headers:Ke([{"anthropic-beta":[...n??[],"managed-agents-2026-04-01"].toString()},l?.headers])})}list(e={},I){let{betas:l,...n}=e??{};return this._client.getAPIList("/v1/environments?beta=true",er,{query:n,...I,headers:Ke([{"anthropic-beta":[...l??[],"managed-agents-2026-04-01"].toString()},I?.headers])})}delete(e,I={},l){let{betas:n}=I??{};return this._client.delete(xt`/v1/environments/${e}?beta=true`,{...l,headers:Ke([{"anthropic-beta":[...n??[],"managed-agents-2026-04-01"].toString()},l?.headers])})}archive(e,I={},l){let{betas:n}=I??{};return this._client.post(xt`/v1/environments/${e}/archive?beta=true`,{...l,headers:Ke([{"anthropic-beta":[...n??[],"managed-agents-2026-04-01"].toString()},l?.headers])})}}});function Y0e(t){return typeof t=="object"&&t!==null&&ste in t}function W7e(t,e){let I=new Set;if(t)for(let l of t)Y0e(l)&&I.add(l[ste]);if(e){for(let l of e)if(Y0e(l)&&I.add(l[ste]),Array.isArray(l.content))for(let n of l.content)Y0e(n)&&I.add(n[ste])}return Array.from(I)}function R0e(t,e){let I=W7e(t,e);return I.length===0?{}:{"x-stainless-helper":I.join(", ")}}function aZI(t){return Y0e(t)?{"x-stainless-helper":t[ste]}:{}}var ste,ote=g(()=>{o();ste=Symbol("anthropic.sdk.stainlessHelper")});var FM,N7e=g(()=>{o();bs();oo();Kr();ote();RM();Ki();FM=class extends cl{list(e={},I){let{betas:l,...n}=e??{};return this._client.getAPIList("/v1/files",FR,{query:n,...I,headers:Ke([{"anthropic-beta":[...l??[],"files-api-2025-04-14"].toString()},I?.headers])})}delete(e,I={},l){let{betas:n}=I??{};return this._client.delete(xt`/v1/files/${e}`,{...l,headers:Ke([{"anthropic-beta":[...n??[],"files-api-2025-04-14"].toString()},l?.headers])})}download(e,I={},l){let{betas:n}=I??{};return this._client.get(xt`/v1/files/${e}/content`,{...l,headers:Ke([{"anthropic-beta":[...n??[],"files-api-2025-04-14"].toString(),Accept:"application/binary"},l?.headers]),__binaryResponse:!0})}retrieveMetadata(e,I={},l){let{betas:n}=I??{};return this._client.get(xt`/v1/files/${e}`,{...l,headers:Ke([{"anthropic-beta":[...n??[],"files-api-2025-04-14"].toString()},l?.headers])})}upload(e,I){let{betas:l,...n}=e;return this._client.post("/v1/files",YM({body:n,...I,headers:Ke([{"anthropic-beta":[...l??[],"files-api-2025-04-14"].toString()},aZI(n.file),I?.headers])},this._client))}}});var XM,V7e=g(()=>{o();bs();oo();Kr();Ki();XM=class extends cl{retrieve(e,I={},l){let{betas:n}=I??{};return this._client.get(xt`/v1/models/${e}?beta=true`,{...l,headers:Ke([{...n?.toString()!=null?{"anthropic-beta":n?.toString()}:void 0},l?.headers])})}list(e={},I){let{betas:l,...n}=e??{};return this._client.getAPIList("/v1/models?beta=true",FR,{query:n,...I,headers:Ke([{...l?.toString()!=null?{"anthropic-beta":l?.toString()}:void 0},I?.headers])})}}});var gM,Y7e=g(()=>{o();bs();oo();Kr();Ki();gM=class extends cl{create(e,I){let{betas:l,...n}=e;return this._client.post("/v1/user_profiles?beta=true",{body:n,...I,headers:Ke([{"anthropic-beta":[...l??[],"user-profiles-2026-03-24"].toString()},I?.headers])})}retrieve(e,I={},l){let{betas:n}=I??{};return this._client.get(xt`/v1/user_profiles/${e}?beta=true`,{...l,headers:Ke([{"anthropic-beta":[...n??[],"user-profiles-2026-03-24"].toString()},l?.headers])})}update(e,I,l){let{betas:n,...a}=I;return this._client.post(xt`/v1/user_profiles/${e}?beta=true`,{body:a,...l,headers:Ke([{"anthropic-beta":[...n??[],"user-profiles-2026-03-24"].toString()},l?.headers])})}list(e={},I){let{betas:l,...n}=e??{};return this._client.getAPIList("/v1/user_profiles?beta=true",er,{query:n,...I,headers:Ke([{"anthropic-beta":[...l??[],"user-profiles-2026-03-24"].toString()},I?.headers])})}createEnrollmentURL(e,I={},l){let{betas:n}=I??{};return this._client.post(xt`/v1/user_profiles/${e}/enrollment_url?beta=true`,{...l,headers:Ke([{"anthropic-beta":[...n??[],"user-profiles-2026-03-24"].toString()},l?.headers])})}}});var vM,R7e=g(()=>{o();bs();oo();Kr();Ki();vM=class extends cl{list(e,I={},l){let{betas:n,...a}=I??{};return this._client.getAPIList(xt`/v1/agents/${e}/versions?beta=true`,er,{query:a,...l,headers:Ke([{"anthropic-beta":[...n??[],"managed-agents-2026-04-01"].toString()},l?.headers])})}}});var _k,A7e=g(()=>{o();bs();R7e();R7e();oo();Kr();Ki();_k=class extends cl{constructor(){super(...arguments),this.versions=new vM(this._client)}create(e,I){let{betas:l,...n}=e;return this._client.post("/v1/agents?beta=true",{body:n,...I,headers:Ke([{"anthropic-beta":[...l??[],"managed-agents-2026-04-01"].toString()},I?.headers])})}retrieve(e,I={},l){let{betas:n,...a}=I??{};return this._client.get(xt`/v1/agents/${e}?beta=true`,{query:a,...l,headers:Ke([{"anthropic-beta":[...n??[],"managed-agents-2026-04-01"].toString()},l?.headers])})}update(e,I,l){let{betas:n,...a}=I;return this._client.post(xt`/v1/agents/${e}?beta=true`,{body:a,...l,headers:Ke([{"anthropic-beta":[...n??[],"managed-agents-2026-04-01"].toString()},l?.headers])})}list(e={},I){let{betas:l,...n}=e??{};return this._client.getAPIList("/v1/agents?beta=true",er,{query:n,...I,headers:Ke([{"anthropic-beta":[...l??[],"managed-agents-2026-04-01"].toString()},I?.headers])})}archive(e,I={},l){let{betas:n}=I??{};return this._client.post(xt`/v1/agents/${e}/archive?beta=true`,{...l,headers:Ke([{"anthropic-beta":[...n??[],"managed-agents-2026-04-01"].toString()},l?.headers])})}};_k.Versions=vM});var yM=g(()=>{o();Xb()});var A0e,F7e=g(()=>{o();A0e={"claude-opus-4-20250514":8192,"claude-opus-4-0":8192,"claude-4-opus-20250514":8192,"anthropic.claude-opus-4-20250514-v1:0":8192,"claude-opus-4@20250514":8192,"claude-opus-4-1-20250805":8192,"anthropic.claude-opus-4-1-20250805-v1:0":8192,"claude-opus-4-1@20250805":8192}});function cZI(t){return t?.output_format??t?.output_config?.format}function X7e(t,e,I){let l=cZI(e);return!e||!("parse"in(l??{}))?{...t,content:t.content.map(n=>{if(n.type==="text"){let a=Object.defineProperty({...n},"parsed_output",{value:null,enumerable:!1});return Object.defineProperty(a,"parsed",{get(){return I.logger.warn("The `parsed` property on `text` blocks is deprecated, please use `parsed_output` instead."),null},enumerable:!1})}return n}),parsed_output:null}:g7e(t,e,I)}function g7e(t,e,I){let l=null,n=t.content.map(a=>{if(a.type==="text"){let c=bTn(e,a.text);l===null&&(l=c);let r=Object.defineProperty({...a},"parsed_output",{value:c,enumerable:!1});return Object.defineProperty(r,"parsed",{get(){return I.logger.warn("The `parsed` property on `text` blocks is deprecated, please use `parsed_output` instead."),c},enumerable:!1})}return a});return{...t,content:n,parsed_output:l}}function bTn(t,e){let I=cZI(t);if(I?.type!=="json_schema")return null;try{return"parse"in I?I.parse(e):JSON.parse(e)}catch(l){throw new Bt(`Failed to parse structured output: ${l}`)}}var v7e=g(()=>{o();Xb()});var mTn,wM,ZTn,pTn,F0e,y7e=g(()=>{o();mTn=t=>{let e=0,I=[];for(;e{if(t.length===0)return t;let e=t[t.length-1];switch(e.type){case"separator":return t=t.slice(0,t.length-1),wM(t);break;case"number":let I=e.value[e.value.length-1];if(I==="."||I==="-")return t=t.slice(0,t.length-1),wM(t);case"string":let l=t[t.length-2];if(l?.type==="delimiter")return t=t.slice(0,t.length-1),wM(t);if(l?.type==="brace"&&l.value==="{")return t=t.slice(0,t.length-1),wM(t);break;case"delimiter":return t=t.slice(0,t.length-1),wM(t);break}return t},ZTn=t=>{let e=[];return t.map(I=>{I.type==="brace"&&(I.value==="{"?e.push("}"):e.splice(e.lastIndexOf("}"),1)),I.type==="paren"&&(I.value==="["?e.push("]"):e.splice(e.lastIndexOf("]"),1))}),e.length>0&&e.reverse().map(I=>{I==="}"?t.push({type:"brace",value:"}"}):I==="]"&&t.push({type:"paren",value:"]"})}),t},pTn=t=>{let e="";return t.map(I=>{switch(I.type){case"string":e+='"'+I.value+'"';break;default:e+=I.value;break}}),e},F0e=t=>JSON.parse(pTn(ZTn(wM(mTn(t)))))});var w7e=g(()=>{o();i7e()});function iZI(t){return t.type==="tool_use"||t.type==="server_tool_use"||t.type==="mcp_tool_use"}var XR,Q1,HM,ite,X0e,Gte,dte,g0e,ute,Dw,bte,v0e,y0e,Kk,w0e,H0e,mte,H7e,rZI,Q0e,Q7e,f7e,E7e,sZI,oZI,f0e,GZI=g(()=>{o();Sw();y7e();yM();iM();w7e();v7e();oZI="__json_buf";f0e=class t{constructor(e,I){XR.add(this),this.messages=[],this.receivedMessages=[],Q1.set(this,void 0),HM.set(this,null),this.controller=new AbortController,ite.set(this,void 0),X0e.set(this,()=>{}),Gte.set(this,()=>{}),dte.set(this,void 0),g0e.set(this,()=>{}),ute.set(this,()=>{}),Dw.set(this,{}),bte.set(this,!1),v0e.set(this,!1),y0e.set(this,!1),Kk.set(this,!1),w0e.set(this,void 0),H0e.set(this,void 0),mte.set(this,void 0),Q0e.set(this,l=>{if(Wt(this,v0e,!0,"f"),Tw(l)&&(l=new _i),l instanceof _i)return Wt(this,y0e,!0,"f"),this._emit("abort",l);if(l instanceof Bt)return this._emit("error",l);if(l instanceof Error){let n=new Bt(l.message);return n.cause=l,this._emit("error",n)}return this._emit("error",new Bt(String(l)))}),Wt(this,ite,new Promise((l,n)=>{Wt(this,X0e,l,"f"),Wt(this,Gte,n,"f")}),"f"),Wt(this,dte,new Promise((l,n)=>{Wt(this,g0e,l,"f"),Wt(this,ute,n,"f")}),"f"),be(this,ite,"f").catch(()=>{}),be(this,dte,"f").catch(()=>{}),Wt(this,HM,e,"f"),Wt(this,mte,I?.logger??console,"f")}get response(){return be(this,w0e,"f")}get request_id(){return be(this,H0e,"f")}async withResponse(){Wt(this,Kk,!0,"f");let e=await be(this,ite,"f");if(!e)throw new Error("Could not resolve a `Response` object");return{data:this,response:e,request_id:e.headers.get("request-id")}}static fromReadableStream(e){let I=new t(null);return I._run(()=>I._fromReadableStream(e)),I}static createMessage(e,I,l,{logger:n}={}){let a=new t(I,{logger:n});for(let c of I.messages)a._addMessageParam(c);return Wt(a,HM,{...I,stream:!0},"f"),a._run(()=>a._createMessage(e,{...I,stream:!0},{...l,headers:{...l?.headers,"X-Stainless-Helper-Method":"stream"}})),a}_run(e){e().then(()=>{this._emitFinal(),this._emit("end")},be(this,Q0e,"f"))}_addMessageParam(e){this.messages.push(e)}_addMessage(e,I=!0){this.receivedMessages.push(e),I&&this._emit("message",e)}async _createMessage(e,I,l){let n=l?.signal,a;n&&(n.aborted&&this.controller.abort(),a=this.controller.abort.bind(this.controller),n.addEventListener("abort",a));try{be(this,XR,"m",Q7e).call(this);let{response:c,data:r}=await e.create({...I,stream:!0},{...l,signal:this.controller.signal}).withResponse();this._connected(c);for await(let s of r)be(this,XR,"m",f7e).call(this,s);if(r.controller.signal?.aborted)throw new _i;be(this,XR,"m",E7e).call(this)}finally{n&&a&&n.removeEventListener("abort",a)}}_connected(e){this.ended||(Wt(this,w0e,e,"f"),Wt(this,H0e,e?.headers.get("request-id"),"f"),be(this,X0e,"f").call(this,e),this._emit("connect"))}get ended(){return be(this,bte,"f")}get errored(){return be(this,v0e,"f")}get aborted(){return be(this,y0e,"f")}abort(){this.controller.abort()}on(e,I){return(be(this,Dw,"f")[e]||(be(this,Dw,"f")[e]=[])).push({listener:I}),this}off(e,I){let l=be(this,Dw,"f")[e];if(!l)return this;let n=l.findIndex(a=>a.listener===I);return n>=0&&l.splice(n,1),this}once(e,I){return(be(this,Dw,"f")[e]||(be(this,Dw,"f")[e]=[])).push({listener:I,once:!0}),this}emitted(e){return new Promise((I,l)=>{Wt(this,Kk,!0,"f"),e!=="error"&&this.once("error",l),this.once(e,I)})}async done(){Wt(this,Kk,!0,"f"),await be(this,dte,"f")}get currentMessage(){return be(this,Q1,"f")}async finalMessage(){return await this.done(),be(this,XR,"m",H7e).call(this)}async finalText(){return await this.done(),be(this,XR,"m",rZI).call(this)}_emit(e,...I){if(be(this,bte,"f"))return;e==="end"&&(Wt(this,bte,!0,"f"),be(this,g0e,"f").call(this));let l=be(this,Dw,"f")[e];if(l&&(be(this,Dw,"f")[e]=l.filter(n=>!n.once),l.forEach(({listener:n})=>n(...I))),e==="abort"){let n=I[0];!be(this,Kk,"f")&&!l?.length&&Promise.reject(n),be(this,Gte,"f").call(this,n),be(this,ute,"f").call(this,n),this._emit("end");return}if(e==="error"){let n=I[0];!be(this,Kk,"f")&&!l?.length&&Promise.reject(n),be(this,Gte,"f").call(this,n),be(this,ute,"f").call(this,n),this._emit("end")}}_emitFinal(){this.receivedMessages.at(-1)&&this._emit("finalMessage",be(this,XR,"m",H7e).call(this))}async _fromReadableStream(e,I){let l=I?.signal,n;l&&(l.aborted&&this.controller.abort(),n=this.controller.abort.bind(this.controller),l.addEventListener("abort",n));try{be(this,XR,"m",Q7e).call(this),this._connected(null);let a=j2.fromReadableStream(e,this.controller);for await(let c of a)be(this,XR,"m",f7e).call(this,c);if(a.controller.signal?.aborted)throw new _i;be(this,XR,"m",E7e).call(this)}finally{l&&n&&l.removeEventListener("abort",n)}}[(Q1=new WeakMap,HM=new WeakMap,ite=new WeakMap,X0e=new WeakMap,Gte=new WeakMap,dte=new WeakMap,g0e=new WeakMap,ute=new WeakMap,Dw=new WeakMap,bte=new WeakMap,v0e=new WeakMap,y0e=new WeakMap,Kk=new WeakMap,w0e=new WeakMap,H0e=new WeakMap,mte=new WeakMap,Q0e=new WeakMap,XR=new WeakSet,H7e=function(){if(this.receivedMessages.length===0)throw new Bt("stream ended without producing a Message with role=assistant");return this.receivedMessages.at(-1)},rZI=function(){if(this.receivedMessages.length===0)throw new Bt("stream ended without producing a Message with role=assistant");let I=this.receivedMessages.at(-1).content.filter(l=>l.type==="text").map(l=>l.text);if(I.length===0)throw new Bt("stream ended without producing a content block with type=text");return I.join(" ")},Q7e=function(){this.ended||Wt(this,Q1,void 0,"f")},f7e=function(I){if(this.ended)return;let l=be(this,XR,"m",sZI).call(this,I);switch(this._emit("streamEvent",I,l),I.type){case"content_block_delta":{let n=l.content.at(-1);switch(I.delta.type){case"text_delta":{n.type==="text"&&this._emit("text",I.delta.text,n.text||"");break}case"citations_delta":{n.type==="text"&&this._emit("citation",I.delta.citation,n.citations??[]);break}case"input_json_delta":{iZI(n)&&n.input&&this._emit("inputJson",I.delta.partial_json,n.input);break}case"thinking_delta":{n.type==="thinking"&&this._emit("thinking",I.delta.thinking,n.thinking);break}case"signature_delta":{n.type==="thinking"&&this._emit("signature",n.signature);break}case"compaction_delta":{n.type==="compaction"&&n.content&&this._emit("compaction",n.content);break}default:I.delta}break}case"message_stop":{this._addMessageParam(l),this._addMessage(X7e(l,be(this,HM,"f"),{logger:be(this,mte,"f")}),!0);break}case"content_block_stop":{this._emit("contentBlock",l.content.at(-1));break}case"message_start":{Wt(this,Q1,l,"f");break}case"content_block_start":case"message_delta":break}},E7e=function(){if(this.ended)throw new Bt("stream has ended, this shouldn't happen");let I=be(this,Q1,"f");if(!I)throw new Bt("request ended without sending any chunks");return Wt(this,Q1,void 0,"f"),X7e(I,be(this,HM,"f"),{logger:be(this,mte,"f")})},sZI=function(I){let l=be(this,Q1,"f");if(I.type==="message_start"){if(l)throw new Bt(`Unexpected event order, got ${I.type} before receiving "message_stop"`);return I.message}if(!l)throw new Bt(`Unexpected event order, got ${I.type} before "message_start"`);switch(I.type){case"message_stop":return l;case"message_delta":return l.container=I.delta.container,l.stop_reason=I.delta.stop_reason,l.stop_sequence=I.delta.stop_sequence,l.usage.output_tokens=I.usage.output_tokens,l.context_management=I.context_management,I.usage.input_tokens!=null&&(l.usage.input_tokens=I.usage.input_tokens),I.usage.cache_creation_input_tokens!=null&&(l.usage.cache_creation_input_tokens=I.usage.cache_creation_input_tokens),I.usage.cache_read_input_tokens!=null&&(l.usage.cache_read_input_tokens=I.usage.cache_read_input_tokens),I.usage.server_tool_use!=null&&(l.usage.server_tool_use=I.usage.server_tool_use),I.usage.iterations!=null&&(l.usage.iterations=I.usage.iterations),l;case"content_block_start":return l.content.push(I.content_block),l;case"content_block_delta":{let n=l.content.at(I.index);switch(I.delta.type){case"text_delta":{n?.type==="text"&&(l.content[I.index]={...n,text:(n.text||"")+I.delta.text});break}case"citations_delta":{n?.type==="text"&&(l.content[I.index]={...n,citations:[...n.citations??[],I.delta.citation]});break}case"input_json_delta":{if(n&&iZI(n)){let a=n[oZI]||"";a+=I.delta.partial_json;let c={...n};if(Object.defineProperty(c,oZI,{value:a,enumerable:!1,writable:!0}),a)try{c.input=F0e(a)}catch(r){let s=new Bt(`Unable to parse tool parameter JSON from model. Please retry your request or adjust your prompt. Error: ${r}. JSON: ${a}`);be(this,Q0e,"f").call(this,s)}l.content[I.index]=c}break}case"thinking_delta":{n?.type==="thinking"&&(l.content[I.index]={...n,thinking:n.thinking+I.delta.thinking});break}case"signature_delta":{n?.type==="thinking"&&(l.content[I.index]={...n,signature:I.delta.signature});break}case"compaction_delta":{n?.type==="compaction"&&(l.content[I.index]={...n,content:(n.content||"")+I.delta.content});break}default:I.delta}return l}case"content_block_stop":return l}},Symbol.asyncIterator)](){let e=[],I=[],l=!1;return this.on("streamEvent",n=>{let a=I.shift();a?a.resolve(n):e.push(n)}),this.on("end",()=>{l=!0;for(let n of I)n.resolve(void 0);I.length=0}),this.on("abort",n=>{l=!0;for(let a of I)a.reject(n);I.length=0}),this.on("error",n=>{l=!0;for(let a of I)a.reject(n);I.length=0}),{next:async()=>e.length?{value:e.shift(),done:!1}:l?{value:void 0,done:!0}:new Promise((a,c)=>I.push({resolve:a,reject:c})).then(a=>a?{value:a,done:!1}:{value:void 0,done:!0}),return:async()=>(this.abort(),{value:void 0,done:!0})}}toReadableStream(){return new j2(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}}});var Dk,E0e=g(()=>{o();Dk=class extends Error{constructor(e){let I=typeof e=="string"?e:e.map(l=>l.type==="text"?l.text:`[${l.type}]`).join(" ");super(I),this.name="ToolError",this.content=e}}});var dZI,uZI=g(()=>{o();dZI=`You have been working on the task described above but have not yet completed it. Write a continuation summary that will allow you (or another instance of yourself) to resume work efficiently in a future context window where the conversation history will be replaced with this summary. Your summary should be structured, concise, and actionable. Include: +1. Task Overview +The user's core request and success criteria +Any clarifications or constraints they specified +2. Current State +What has been completed so far +Files created, modified, or analyzed (with paths if relevant) +Key outputs or artifacts produced +3. Important Discoveries +Technical constraints or requirements uncovered +Decisions made and their rationale +Errors encountered and how they were resolved +What approaches were tried that didn't work (and why) +4. Next Steps +Specific actions needed to complete the task +Any blockers or open questions to resolve +Priority order if multiple steps remain +5. Context to Preserve +User preferences or style requirements +Domain-specific details that aren't obvious +Any promises made to the user +Be concise but complete\u2014err on the side of including information that would prevent duplicate work or repeated mistakes. Write in a way that enables immediate resumption of the task. +Wrap your summary in tags.`});function mZI(){let t,e;return{promise:new Promise((l,n)=>{t=l,e=n}),resolve:t,reject:e}}async function WTn(t,e=t.messages.at(-1),I){if(!e||e.role!=="assistant"||!e.content||typeof e.content=="string")return null;let l=e.content.filter(a=>a.type==="tool_use");return l.length===0?null:{role:"user",content:await Promise.all(l.map(async a=>{let c=t.tools.find(r=>("name"in r?r.name:r.mcp_server_name)===a.name);if(!c||!("run"in c))return{type:"tool_result",tool_use_id:a.id,content:`Error: Tool '${a.name}' not found`,is_error:!0};try{let r=a.input;"parse"in c&&c.parse&&(r=c.parse(r));let s=await c.run(r,{toolUseBlock:a,signal:I?.signal});return{type:"tool_result",tool_use_id:a.id,content:s}}catch(r){return{type:"tool_result",tool_use_id:a.id,content:r instanceof Dk?r.content:`Error: ${r instanceof Error?r.message:String(r)}`,is_error:!0}}}))}}var Zte,QM,qk,io,Qm,Gp,qw,f1,pte,bZI,J7e,fM,C7e=g(()=>{o();Sw();E0e();Xb();Kr();uZI();ote();fM=class{constructor(e,I,l){Zte.add(this),this.client=e,QM.set(this,!1),qk.set(this,!1),io.set(this,void 0),Qm.set(this,void 0),Gp.set(this,void 0),qw.set(this,void 0),f1.set(this,void 0),pte.set(this,0),Wt(this,io,{params:{...I,messages:structuredClone(I.messages)}},"f");let a=["BetaToolRunner",...W7e(I.tools,I.messages)].join(", ");Wt(this,Qm,{...l,headers:Ke([{"x-stainless-helper":a},l?.headers])},"f"),Wt(this,f1,mZI(),"f"),I.compactionControl?.enabled&&console.warn('Anthropic: The `compactionControl` parameter is deprecated and will be removed in a future version. Use server-side compaction instead by passing `edits: [{ type: "compact_20260112" }]` in the params passed to `toolRunner()`. See https://platform.claude.com/docs/en/build-with-claude/compaction')}async*[(QM=new WeakMap,qk=new WeakMap,io=new WeakMap,Qm=new WeakMap,Gp=new WeakMap,qw=new WeakMap,f1=new WeakMap,pte=new WeakMap,Zte=new WeakSet,bZI=async function(){let I=be(this,io,"f").params.compactionControl;if(!I||!I.enabled)return!1;let l=0;if(be(this,Gp,"f")!==void 0)try{let i=await be(this,Gp,"f");l=i.usage.input_tokens+(i.usage.cache_creation_input_tokens??0)+(i.usage.cache_read_input_tokens??0)+i.usage.output_tokens}catch{return!1}let n=I.contextTokenThreshold??1e5;if(ld.type!=="tool_use");G.length===0?r.pop():i.content=G}}let s=await this.client.beta.messages.create({model:a,messages:[...r,{role:"user",content:[{type:"text",text:c}]}],max_tokens:be(this,io,"f").params.max_tokens},{signal:be(this,Qm,"f").signal,headers:Ke([be(this,Qm,"f").headers,{"x-stainless-helper":"compaction"}])});if(s.content[0]?.type!=="text")throw new Bt("Expected text response for compaction");return be(this,io,"f").params.messages=[{role:"user",content:s.content}],!0},Symbol.asyncIterator)](){var e;if(be(this,QM,"f"))throw new Bt("Cannot iterate over a consumed stream");Wt(this,QM,!0,"f"),Wt(this,qk,!0,"f"),Wt(this,qw,void 0,"f");try{for(;;){let I;try{if(be(this,io,"f").params.max_iterations&&be(this,pte,"f")>=be(this,io,"f").params.max_iterations)break;Wt(this,qk,!1,"f"),Wt(this,qw,void 0,"f"),Wt(this,pte,(e=be(this,pte,"f"),e++,e),"f"),Wt(this,Gp,void 0,"f");let{max_iterations:l,compactionControl:n,...a}=be(this,io,"f").params;if(a.stream?(I=this.client.beta.messages.stream({...a},be(this,Qm,"f")),Wt(this,Gp,I.finalMessage(),"f"),be(this,Gp,"f").catch(()=>{}),yield I):(Wt(this,Gp,this.client.beta.messages.create({...a,stream:!1},be(this,Qm,"f")),"f"),yield be(this,Gp,"f")),!await be(this,Zte,"m",bZI).call(this)){if(!be(this,qk,"f")){let{role:s,content:i}=await be(this,Gp,"f");be(this,io,"f").params.messages.push({role:s,content:i})}let r=await be(this,Zte,"m",J7e).call(this,be(this,io,"f").params.messages.at(-1));if(r)be(this,io,"f").params.messages.push(r);else if(!be(this,qk,"f"))break}}finally{I&&I.abort()}}if(!be(this,Gp,"f"))throw new Bt("ToolRunner concluded without a message from the server");be(this,f1,"f").resolve(await be(this,Gp,"f"))}catch(I){throw Wt(this,QM,!1,"f"),be(this,f1,"f").promise.catch(()=>{}),be(this,f1,"f").reject(I),Wt(this,f1,mZI(),"f"),I}}setMessagesParams(e){typeof e=="function"?be(this,io,"f").params=e(be(this,io,"f").params):be(this,io,"f").params=e,Wt(this,qk,!0,"f"),Wt(this,qw,void 0,"f")}setRequestOptions(e){typeof e=="function"?Wt(this,Qm,e(be(this,Qm,"f")),"f"):Wt(this,Qm,{...be(this,Qm,"f"),...e},"f")}async generateToolResponse(e=be(this,Qm,"f").signal){let I=await be(this,Gp,"f")??this.params.messages.at(-1);return I?be(this,Zte,"m",J7e).call(this,I,e):null}done(){return be(this,f1,"f").promise}async runUntilDone(){if(!be(this,QM,"f"))for await(let e of this);return this.done()}get params(){return be(this,io,"f").params}pushMessages(...e){this.setMessagesParams(I=>({...I,messages:[...I.messages,...e]}))}then(e,I){return this.runUntilDone().then(e,I)}};J7e=async function(e,I=be(this,Qm,"f").signal){return be(this,qw,"f")!==void 0?be(this,qw,"f"):(Wt(this,qw,WTn(be(this,io,"f").params,e,{...be(this,Qm,"f"),signal:I}),"f"),be(this,qw,"f"))}});var EM,L7e=g(()=>{o();Xb();NM();r7e();EM=class t{constructor(e,I){this.iterator=e,this.controller=I}async*decoder(){let e=new _w;for await(let I of this.iterator)for(let l of e.decode(I))yield JSON.parse(l);for(let I of e.flush())yield JSON.parse(I)}[Symbol.asyncIterator](){return this.decoder()}static fromResponse(e,I){if(!e.body)throw I.abort(),typeof globalThis.navigator<"u"&&globalThis.navigator.product==="ReactNative"?new Bt("The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api"):new Bt("Attempted to iterate over a response with no body");return new t(tte(e.body),I)}}});var JM,k7e=g(()=>{o();bs();oo();Kr();L7e();yM();Ki();JM=class extends cl{create(e,I){let{betas:l,...n}=e;return this._client.post("/v1/messages/batches?beta=true",{body:n,...I,headers:Ke([{"anthropic-beta":[...l??[],"message-batches-2024-09-24"].toString()},I?.headers])})}retrieve(e,I={},l){let{betas:n}=I??{};return this._client.get(xt`/v1/messages/batches/${e}?beta=true`,{...l,headers:Ke([{"anthropic-beta":[...n??[],"message-batches-2024-09-24"].toString()},l?.headers])})}list(e={},I){let{betas:l,...n}=e??{};return this._client.getAPIList("/v1/messages/batches?beta=true",FR,{query:n,...I,headers:Ke([{"anthropic-beta":[...l??[],"message-batches-2024-09-24"].toString()},I?.headers])})}delete(e,I={},l){let{betas:n}=I??{};return this._client.delete(xt`/v1/messages/batches/${e}?beta=true`,{...l,headers:Ke([{"anthropic-beta":[...n??[],"message-batches-2024-09-24"].toString()},l?.headers])})}cancel(e,I={},l){let{betas:n}=I??{};return this._client.post(xt`/v1/messages/batches/${e}/cancel?beta=true`,{...l,headers:Ke([{"anthropic-beta":[...n??[],"message-batches-2024-09-24"].toString()},l?.headers])})}async results(e,I={},l){let n=await this.retrieve(e);if(!n.results_url)throw new Bt(`No batch \`results_url\`; Has it finished processing? ${n.processing_status} - ${n.id}`);let{betas:a}=I??{};return this._client.get(n.results_url,{...l,headers:Ke([{"anthropic-beta":[...a??[],"message-batches-2024-09-24"].toString(),Accept:"application/binary"},l?.headers]),stream:!0,__binaryResponse:!0})._thenUnwrap((c,r)=>EM.fromResponse(r.response,r.controller))}}});function pZI(t){if(!t.output_format)return t;if(t.output_config?.format)throw new Bt("Both output_format and output_config.format were provided. Please use only output_config.format (output_format is deprecated).");let{output_format:e,...I}=t;return{...I,output_config:{...t.output_config,format:e}}}var ZZI,VTn,Pw,x7e=g(()=>{o();yM();bs();F7e();Kr();ote();v7e();GZI();C7e();E0e();k7e();k7e();C7e();E0e();ZZI={"claude-1.3":"November 6th, 2024","claude-1.3-100k":"November 6th, 2024","claude-instant-1.1":"November 6th, 2024","claude-instant-1.1-100k":"November 6th, 2024","claude-instant-1.2":"November 6th, 2024","claude-3-sonnet-20240229":"July 21st, 2025","claude-3-opus-20240229":"January 5th, 2026","claude-2.1":"July 21st, 2025","claude-2.0":"July 21st, 2025","claude-3-7-sonnet-latest":"February 19th, 2026","claude-3-7-sonnet-20250219":"February 19th, 2026"},VTn=["claude-mythos-preview","claude-opus-4-6"],Pw=class extends cl{constructor(){super(...arguments),this.batches=new JM(this._client)}create(e,I){let l=pZI(e),{betas:n,...a}=l;a.model in ZZI&&console.warn(`The model '${a.model}' is deprecated and will reach end-of-life on ${ZZI[a.model]} +Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`),VTn.includes(a.model)&&a.thinking&&a.thinking.type==="enabled"&&console.warn(`Using Claude with ${a.model} and 'thinking.type=enabled' is deprecated. Use 'thinking.type=adaptive' instead which results in better model performance in our testing: https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking`);let c=this._client._options.timeout;if(!a.stream&&c==null){let s=A0e[a.model]??void 0;c=this._client.calculateNonstreamingTimeout(a.max_tokens,s)}let r=R0e(a.tools,a.messages);return this._client.post("/v1/messages?beta=true",{body:a,timeout:c??6e5,...I,headers:Ke([{...n?.toString()!=null?{"anthropic-beta":n?.toString()}:void 0},r,I?.headers]),stream:l.stream??!1})}parse(e,I){return I={...I,headers:Ke([{"anthropic-beta":[...e.betas??[],"structured-outputs-2025-12-15"].toString()},I?.headers])},this.create(e,I).then(l=>g7e(l,e,{logger:this._client.logger??console}))}stream(e,I){return f0e.createMessage(this,e,I)}countTokens(e,I){let l=pZI(e),{betas:n,...a}=l;return this._client.post("/v1/messages/count_tokens?beta=true",{body:a,...I,headers:Ke([{"anthropic-beta":[...n??[],"token-counting-2024-11-01"].toString()},I?.headers])})}toolRunner(e,I){return new fM(this._client,e,I)}};Pw.Batches=JM;Pw.BetaToolRunner=fM;Pw.ToolError=Dk});var CM,j7e=g(()=>{o();bs();oo();Kr();Ki();CM=class extends cl{list(e,I={},l){let{betas:n,...a}=I??{};return this._client.getAPIList(xt`/v1/sessions/${e}/events?beta=true`,er,{query:a,...l,headers:Ke([{"anthropic-beta":[...n??[],"managed-agents-2026-04-01"].toString()},l?.headers])})}send(e,I,l){let{betas:n,...a}=I;return this._client.post(xt`/v1/sessions/${e}/events?beta=true`,{body:a,...l,headers:Ke([{"anthropic-beta":[...n??[],"managed-agents-2026-04-01"].toString()},l?.headers])})}stream(e,I={},l){let{betas:n}=I??{};return this._client.get(xt`/v1/sessions/${e}/events/stream?beta=true`,{...l,headers:Ke([{"anthropic-beta":[...n??[],"managed-agents-2026-04-01"].toString()},l?.headers]),stream:!0})}}});var LM,U7e=g(()=>{o();bs();oo();Kr();Ki();LM=class extends cl{retrieve(e,I,l){let{session_id:n,betas:a}=I;return this._client.get(xt`/v1/sessions/${n}/resources/${e}?beta=true`,{...l,headers:Ke([{"anthropic-beta":[...a??[],"managed-agents-2026-04-01"].toString()},l?.headers])})}update(e,I,l){let{session_id:n,betas:a,...c}=I;return this._client.post(xt`/v1/sessions/${n}/resources/${e}?beta=true`,{body:c,...l,headers:Ke([{"anthropic-beta":[...a??[],"managed-agents-2026-04-01"].toString()},l?.headers])})}list(e,I={},l){let{betas:n,...a}=I??{};return this._client.getAPIList(xt`/v1/sessions/${e}/resources?beta=true`,er,{query:a,...l,headers:Ke([{"anthropic-beta":[...n??[],"managed-agents-2026-04-01"].toString()},l?.headers])})}delete(e,I,l){let{session_id:n,betas:a}=I;return this._client.delete(xt`/v1/sessions/${n}/resources/${e}?beta=true`,{...l,headers:Ke([{"anthropic-beta":[...a??[],"managed-agents-2026-04-01"].toString()},l?.headers])})}add(e,I,l){let{betas:n,...a}=I;return this._client.post(xt`/v1/sessions/${e}/resources?beta=true`,{body:a,...l,headers:Ke([{"anthropic-beta":[...n??[],"managed-agents-2026-04-01"].toString()},l?.headers])})}}});var E1,O7e=g(()=>{o();bs();j7e();j7e();U7e();U7e();oo();Kr();Ki();E1=class extends cl{constructor(){super(...arguments),this.events=new CM(this._client),this.resources=new LM(this._client)}create(e,I){let{betas:l,...n}=e;return this._client.post("/v1/sessions?beta=true",{body:n,...I,headers:Ke([{"anthropic-beta":[...l??[],"managed-agents-2026-04-01"].toString()},I?.headers])})}retrieve(e,I={},l){let{betas:n}=I??{};return this._client.get(xt`/v1/sessions/${e}?beta=true`,{...l,headers:Ke([{"anthropic-beta":[...n??[],"managed-agents-2026-04-01"].toString()},l?.headers])})}update(e,I,l){let{betas:n,...a}=I;return this._client.post(xt`/v1/sessions/${e}?beta=true`,{body:a,...l,headers:Ke([{"anthropic-beta":[...n??[],"managed-agents-2026-04-01"].toString()},l?.headers])})}list(e={},I){let{betas:l,...n}=e??{};return this._client.getAPIList("/v1/sessions?beta=true",er,{query:n,...I,headers:Ke([{"anthropic-beta":[...l??[],"managed-agents-2026-04-01"].toString()},I?.headers])})}delete(e,I={},l){let{betas:n}=I??{};return this._client.delete(xt`/v1/sessions/${e}?beta=true`,{...l,headers:Ke([{"anthropic-beta":[...n??[],"managed-agents-2026-04-01"].toString()},l?.headers])})}archive(e,I={},l){let{betas:n}=I??{};return this._client.post(xt`/v1/sessions/${e}/archive?beta=true`,{...l,headers:Ke([{"anthropic-beta":[...n??[],"managed-agents-2026-04-01"].toString()},l?.headers])})}};E1.Events=CM;E1.Resources=LM});var kM,z7e=g(()=>{o();bs();oo();Kr();RM();Ki();kM=class extends cl{create(e,I={},l){let{betas:n,...a}=I??{};return this._client.post(xt`/v1/skills/${e}/versions?beta=true`,YM({body:a,...l,headers:Ke([{"anthropic-beta":[...n??[],"skills-2025-10-02"].toString()},l?.headers])},this._client))}retrieve(e,I,l){let{skill_id:n,betas:a}=I;return this._client.get(xt`/v1/skills/${n}/versions/${e}?beta=true`,{...l,headers:Ke([{"anthropic-beta":[...a??[],"skills-2025-10-02"].toString()},l?.headers])})}list(e,I={},l){let{betas:n,...a}=I??{};return this._client.getAPIList(xt`/v1/skills/${e}/versions?beta=true`,er,{query:a,...l,headers:Ke([{"anthropic-beta":[...n??[],"skills-2025-10-02"].toString()},l?.headers])})}delete(e,I,l){let{skill_id:n,betas:a}=I;return this._client.delete(xt`/v1/skills/${n}/versions/${e}?beta=true`,{...l,headers:Ke([{"anthropic-beta":[...a??[],"skills-2025-10-02"].toString()},l?.headers])})}}});var Pk,B7e=g(()=>{o();bs();z7e();z7e();oo();Kr();RM();Ki();Pk=class extends cl{constructor(){super(...arguments),this.versions=new kM(this._client)}create(e={},I){let{betas:l,...n}=e??{};return this._client.post("/v1/skills?beta=true",YM({body:n,...I,headers:Ke([{"anthropic-beta":[...l??[],"skills-2025-10-02"].toString()},I?.headers])},this._client,!1))}retrieve(e,I={},l){let{betas:n}=I??{};return this._client.get(xt`/v1/skills/${e}?beta=true`,{...l,headers:Ke([{"anthropic-beta":[...n??[],"skills-2025-10-02"].toString()},l?.headers])})}list(e={},I){let{betas:l,...n}=e??{};return this._client.getAPIList("/v1/skills?beta=true",er,{query:n,...I,headers:Ke([{"anthropic-beta":[...l??[],"skills-2025-10-02"].toString()},I?.headers])})}delete(e,I={},l){let{betas:n}=I??{};return this._client.delete(xt`/v1/skills/${e}?beta=true`,{...l,headers:Ke([{"anthropic-beta":[...n??[],"skills-2025-10-02"].toString()},l?.headers])})}};Pk.Versions=kM});var xM,M7e=g(()=>{o();bs();oo();Kr();Ki();xM=class extends cl{create(e,I,l){let{betas:n,...a}=I;return this._client.post(xt`/v1/vaults/${e}/credentials?beta=true`,{body:a,...l,headers:Ke([{"anthropic-beta":[...n??[],"managed-agents-2026-04-01"].toString()},l?.headers])})}retrieve(e,I,l){let{vault_id:n,betas:a}=I;return this._client.get(xt`/v1/vaults/${n}/credentials/${e}?beta=true`,{...l,headers:Ke([{"anthropic-beta":[...a??[],"managed-agents-2026-04-01"].toString()},l?.headers])})}update(e,I,l){let{vault_id:n,betas:a,...c}=I;return this._client.post(xt`/v1/vaults/${n}/credentials/${e}?beta=true`,{body:c,...l,headers:Ke([{"anthropic-beta":[...a??[],"managed-agents-2026-04-01"].toString()},l?.headers])})}list(e,I={},l){let{betas:n,...a}=I??{};return this._client.getAPIList(xt`/v1/vaults/${e}/credentials?beta=true`,er,{query:a,...l,headers:Ke([{"anthropic-beta":[...n??[],"managed-agents-2026-04-01"].toString()},l?.headers])})}delete(e,I,l){let{vault_id:n,betas:a}=I;return this._client.delete(xt`/v1/vaults/${n}/credentials/${e}?beta=true`,{...l,headers:Ke([{"anthropic-beta":[...a??[],"managed-agents-2026-04-01"].toString()},l?.headers])})}archive(e,I,l){let{vault_id:n,betas:a}=I;return this._client.post(xt`/v1/vaults/${n}/credentials/${e}/archive?beta=true`,{...l,headers:Ke([{"anthropic-beta":[...a??[],"managed-agents-2026-04-01"].toString()},l?.headers])})}}});var $k,S7e=g(()=>{o();bs();M7e();M7e();oo();Kr();Ki();$k=class extends cl{constructor(){super(...arguments),this.credentials=new xM(this._client)}create(e,I){let{betas:l,...n}=e;return this._client.post("/v1/vaults?beta=true",{body:n,...I,headers:Ke([{"anthropic-beta":[...l??[],"managed-agents-2026-04-01"].toString()},I?.headers])})}retrieve(e,I={},l){let{betas:n}=I??{};return this._client.get(xt`/v1/vaults/${e}?beta=true`,{...l,headers:Ke([{"anthropic-beta":[...n??[],"managed-agents-2026-04-01"].toString()},l?.headers])})}update(e,I,l){let{betas:n,...a}=I;return this._client.post(xt`/v1/vaults/${e}?beta=true`,{body:a,...l,headers:Ke([{"anthropic-beta":[...n??[],"managed-agents-2026-04-01"].toString()},l?.headers])})}list(e={},I){let{betas:l,...n}=e??{};return this._client.getAPIList("/v1/vaults?beta=true",er,{query:n,...I,headers:Ke([{"anthropic-beta":[...l??[],"managed-agents-2026-04-01"].toString()},I?.headers])})}delete(e,I={},l){let{betas:n}=I??{};return this._client.delete(xt`/v1/vaults/${e}?beta=true`,{...l,headers:Ke([{"anthropic-beta":[...n??[],"managed-agents-2026-04-01"].toString()},l?.headers])})}archive(e,I={},l){let{betas:n}=I??{};return this._client.post(xt`/v1/vaults/${e}/archive?beta=true`,{...l,headers:Ke([{"anthropic-beta":[...n??[],"managed-agents-2026-04-01"].toString()},l?.headers])})}};$k.Credentials=xM});var yu,T7e=g(()=>{o();bs();h7e();h7e();N7e();N7e();V7e();V7e();Y7e();Y7e();A7e();A7e();x7e();x7e();O7e();O7e();B7e();B7e();S7e();S7e();yu=class extends cl{constructor(){super(...arguments),this.models=new XM(this._client),this.messages=new Pw(this._client),this.agents=new _k(this._client),this.environments=new AM(this._client),this.sessions=new E1(this._client),this.vaults=new $k(this._client),this.files=new FM(this._client),this.skills=new Pk(this._client),this.userProfiles=new gM(this._client)}};yu.Models=XM;yu.Messages=Pw;yu.Agents=_k;yu.Environments=AM;yu.Sessions=E1;yu.Vaults=$k;yu.Files=FM;yu.Skills=Pk;yu.UserProfiles=gM});var e4,_7e=g(()=>{o();bs();Kr();e4=class extends cl{create(e,I){let{betas:l,...n}=e;return this._client.post("/v1/complete",{body:n,timeout:this._client._options.timeout??6e5,...I,headers:Ke([{...l?.toString()!=null?{"anthropic-beta":l?.toString()}:void 0},I?.headers]),stream:e.stream??!1})}}});function hZI(t){return t?.output_config?.format}function K7e(t,e,I){let l=hZI(e);return!e||!("parse"in(l??{}))?{...t,content:t.content.map(n=>n.type==="text"?Object.defineProperty({...n},"parsed_output",{value:null,enumerable:!1}):n),parsed_output:null}:D7e(t,e,I)}function D7e(t,e,I){let l=null,n=t.content.map(a=>{if(a.type==="text"){let c=wTn(e,a.text);return l===null&&(l=c),Object.defineProperty({...a},"parsed_output",{value:c,enumerable:!1})}return a});return{...t,content:n,parsed_output:l}}function wTn(t,e){let I=hZI(t);if(I?.type!=="json_schema")return null;try{return"parse"in I?I.parse(e):JSON.parse(e)}catch(l){throw new Bt(`Failed to parse structured output: ${l}`)}}var q7e=g(()=>{o();Xb()});function YZI(t){return t.type==="tool_use"||t.type==="server_tool_use"}var gR,J1,jM,hte,J0e,Wte,Nte,C0e,Vte,$w,Yte,L0e,k0e,t4,x0e,j0e,Rte,P7e,WZI,$7e,e8e,t8e,I8e,NZI,VZI,U0e,RZI=g(()=>{o();Sw();iM();yM();w7e();y7e();q7e();VZI="__json_buf";U0e=class t{constructor(e,I){gR.add(this),this.messages=[],this.receivedMessages=[],J1.set(this,void 0),jM.set(this,null),this.controller=new AbortController,hte.set(this,void 0),J0e.set(this,()=>{}),Wte.set(this,()=>{}),Nte.set(this,void 0),C0e.set(this,()=>{}),Vte.set(this,()=>{}),$w.set(this,{}),Yte.set(this,!1),L0e.set(this,!1),k0e.set(this,!1),t4.set(this,!1),x0e.set(this,void 0),j0e.set(this,void 0),Rte.set(this,void 0),$7e.set(this,l=>{if(Wt(this,L0e,!0,"f"),Tw(l)&&(l=new _i),l instanceof _i)return Wt(this,k0e,!0,"f"),this._emit("abort",l);if(l instanceof Bt)return this._emit("error",l);if(l instanceof Error){let n=new Bt(l.message);return n.cause=l,this._emit("error",n)}return this._emit("error",new Bt(String(l)))}),Wt(this,hte,new Promise((l,n)=>{Wt(this,J0e,l,"f"),Wt(this,Wte,n,"f")}),"f"),Wt(this,Nte,new Promise((l,n)=>{Wt(this,C0e,l,"f"),Wt(this,Vte,n,"f")}),"f"),be(this,hte,"f").catch(()=>{}),be(this,Nte,"f").catch(()=>{}),Wt(this,jM,e,"f"),Wt(this,Rte,I?.logger??console,"f")}get response(){return be(this,x0e,"f")}get request_id(){return be(this,j0e,"f")}async withResponse(){Wt(this,t4,!0,"f");let e=await be(this,hte,"f");if(!e)throw new Error("Could not resolve a `Response` object");return{data:this,response:e,request_id:e.headers.get("request-id")}}static fromReadableStream(e){let I=new t(null);return I._run(()=>I._fromReadableStream(e)),I}static createMessage(e,I,l,{logger:n}={}){let a=new t(I,{logger:n});for(let c of I.messages)a._addMessageParam(c);return Wt(a,jM,{...I,stream:!0},"f"),a._run(()=>a._createMessage(e,{...I,stream:!0},{...l,headers:{...l?.headers,"X-Stainless-Helper-Method":"stream"}})),a}_run(e){e().then(()=>{this._emitFinal(),this._emit("end")},be(this,$7e,"f"))}_addMessageParam(e){this.messages.push(e)}_addMessage(e,I=!0){this.receivedMessages.push(e),I&&this._emit("message",e)}async _createMessage(e,I,l){let n=l?.signal,a;n&&(n.aborted&&this.controller.abort(),a=this.controller.abort.bind(this.controller),n.addEventListener("abort",a));try{be(this,gR,"m",e8e).call(this);let{response:c,data:r}=await e.create({...I,stream:!0},{...l,signal:this.controller.signal}).withResponse();this._connected(c);for await(let s of r)be(this,gR,"m",t8e).call(this,s);if(r.controller.signal?.aborted)throw new _i;be(this,gR,"m",I8e).call(this)}finally{n&&a&&n.removeEventListener("abort",a)}}_connected(e){this.ended||(Wt(this,x0e,e,"f"),Wt(this,j0e,e?.headers.get("request-id"),"f"),be(this,J0e,"f").call(this,e),this._emit("connect"))}get ended(){return be(this,Yte,"f")}get errored(){return be(this,L0e,"f")}get aborted(){return be(this,k0e,"f")}abort(){this.controller.abort()}on(e,I){return(be(this,$w,"f")[e]||(be(this,$w,"f")[e]=[])).push({listener:I}),this}off(e,I){let l=be(this,$w,"f")[e];if(!l)return this;let n=l.findIndex(a=>a.listener===I);return n>=0&&l.splice(n,1),this}once(e,I){return(be(this,$w,"f")[e]||(be(this,$w,"f")[e]=[])).push({listener:I,once:!0}),this}emitted(e){return new Promise((I,l)=>{Wt(this,t4,!0,"f"),e!=="error"&&this.once("error",l),this.once(e,I)})}async done(){Wt(this,t4,!0,"f"),await be(this,Nte,"f")}get currentMessage(){return be(this,J1,"f")}async finalMessage(){return await this.done(),be(this,gR,"m",P7e).call(this)}async finalText(){return await this.done(),be(this,gR,"m",WZI).call(this)}_emit(e,...I){if(be(this,Yte,"f"))return;e==="end"&&(Wt(this,Yte,!0,"f"),be(this,C0e,"f").call(this));let l=be(this,$w,"f")[e];if(l&&(be(this,$w,"f")[e]=l.filter(n=>!n.once),l.forEach(({listener:n})=>n(...I))),e==="abort"){let n=I[0];!be(this,t4,"f")&&!l?.length&&Promise.reject(n),be(this,Wte,"f").call(this,n),be(this,Vte,"f").call(this,n),this._emit("end");return}if(e==="error"){let n=I[0];!be(this,t4,"f")&&!l?.length&&Promise.reject(n),be(this,Wte,"f").call(this,n),be(this,Vte,"f").call(this,n),this._emit("end")}}_emitFinal(){this.receivedMessages.at(-1)&&this._emit("finalMessage",be(this,gR,"m",P7e).call(this))}async _fromReadableStream(e,I){let l=I?.signal,n;l&&(l.aborted&&this.controller.abort(),n=this.controller.abort.bind(this.controller),l.addEventListener("abort",n));try{be(this,gR,"m",e8e).call(this),this._connected(null);let a=j2.fromReadableStream(e,this.controller);for await(let c of a)be(this,gR,"m",t8e).call(this,c);if(a.controller.signal?.aborted)throw new _i;be(this,gR,"m",I8e).call(this)}finally{l&&n&&l.removeEventListener("abort",n)}}[(J1=new WeakMap,jM=new WeakMap,hte=new WeakMap,J0e=new WeakMap,Wte=new WeakMap,Nte=new WeakMap,C0e=new WeakMap,Vte=new WeakMap,$w=new WeakMap,Yte=new WeakMap,L0e=new WeakMap,k0e=new WeakMap,t4=new WeakMap,x0e=new WeakMap,j0e=new WeakMap,Rte=new WeakMap,$7e=new WeakMap,gR=new WeakSet,P7e=function(){if(this.receivedMessages.length===0)throw new Bt("stream ended without producing a Message with role=assistant");return this.receivedMessages.at(-1)},WZI=function(){if(this.receivedMessages.length===0)throw new Bt("stream ended without producing a Message with role=assistant");let I=this.receivedMessages.at(-1).content.filter(l=>l.type==="text").map(l=>l.text);if(I.length===0)throw new Bt("stream ended without producing a content block with type=text");return I.join(" ")},e8e=function(){this.ended||Wt(this,J1,void 0,"f")},t8e=function(I){if(this.ended)return;let l=be(this,gR,"m",NZI).call(this,I);switch(this._emit("streamEvent",I,l),I.type){case"content_block_delta":{let n=l.content.at(-1);switch(I.delta.type){case"text_delta":{n.type==="text"&&this._emit("text",I.delta.text,n.text||"");break}case"citations_delta":{n.type==="text"&&this._emit("citation",I.delta.citation,n.citations??[]);break}case"input_json_delta":{YZI(n)&&n.input&&this._emit("inputJson",I.delta.partial_json,n.input);break}case"thinking_delta":{n.type==="thinking"&&this._emit("thinking",I.delta.thinking,n.thinking);break}case"signature_delta":{n.type==="thinking"&&this._emit("signature",n.signature);break}default:I.delta}break}case"message_stop":{this._addMessageParam(l),this._addMessage(K7e(l,be(this,jM,"f"),{logger:be(this,Rte,"f")}),!0);break}case"content_block_stop":{this._emit("contentBlock",l.content.at(-1));break}case"message_start":{Wt(this,J1,l,"f");break}case"content_block_start":case"message_delta":break}},I8e=function(){if(this.ended)throw new Bt("stream has ended, this shouldn't happen");let I=be(this,J1,"f");if(!I)throw new Bt("request ended without sending any chunks");return Wt(this,J1,void 0,"f"),K7e(I,be(this,jM,"f"),{logger:be(this,Rte,"f")})},NZI=function(I){let l=be(this,J1,"f");if(I.type==="message_start"){if(l)throw new Bt(`Unexpected event order, got ${I.type} before receiving "message_stop"`);return I.message}if(!l)throw new Bt(`Unexpected event order, got ${I.type} before "message_start"`);switch(I.type){case"message_stop":return l;case"message_delta":return l.stop_reason=I.delta.stop_reason,l.stop_sequence=I.delta.stop_sequence,l.usage.output_tokens=I.usage.output_tokens,I.usage.input_tokens!=null&&(l.usage.input_tokens=I.usage.input_tokens),I.usage.cache_creation_input_tokens!=null&&(l.usage.cache_creation_input_tokens=I.usage.cache_creation_input_tokens),I.usage.cache_read_input_tokens!=null&&(l.usage.cache_read_input_tokens=I.usage.cache_read_input_tokens),I.usage.server_tool_use!=null&&(l.usage.server_tool_use=I.usage.server_tool_use),l;case"content_block_start":return l.content.push({...I.content_block}),l;case"content_block_delta":{let n=l.content.at(I.index);switch(I.delta.type){case"text_delta":{n?.type==="text"&&(l.content[I.index]={...n,text:(n.text||"")+I.delta.text});break}case"citations_delta":{n?.type==="text"&&(l.content[I.index]={...n,citations:[...n.citations??[],I.delta.citation]});break}case"input_json_delta":{if(n&&YZI(n)){let a=n[VZI]||"";a+=I.delta.partial_json;let c={...n};Object.defineProperty(c,VZI,{value:a,enumerable:!1,writable:!0}),a&&(c.input=F0e(a)),l.content[I.index]=c}break}case"thinking_delta":{n?.type==="thinking"&&(l.content[I.index]={...n,thinking:n.thinking+I.delta.thinking});break}case"signature_delta":{n?.type==="thinking"&&(l.content[I.index]={...n,signature:I.delta.signature});break}default:I.delta}return l}case"content_block_stop":return l}},Symbol.asyncIterator)](){let e=[],I=[],l=!1;return this.on("streamEvent",n=>{let a=I.shift();a?a.resolve(n):e.push(n)}),this.on("end",()=>{l=!0;for(let n of I)n.resolve(void 0);I.length=0}),this.on("abort",n=>{l=!0;for(let a of I)a.reject(n);I.length=0}),this.on("error",n=>{l=!0;for(let a of I)a.reject(n);I.length=0}),{next:async()=>e.length?{value:e.shift(),done:!1}:l?{value:void 0,done:!0}:new Promise((a,c)=>I.push({resolve:a,reject:c})).then(a=>a?{value:a,done:!1}:{value:void 0,done:!0}),return:async()=>(this.abort(),{value:void 0,done:!0})}}toReadableStream(){return new j2(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}}});var UM,l8e=g(()=>{o();bs();oo();Kr();L7e();yM();Ki();UM=class extends cl{create(e,I){return this._client.post("/v1/messages/batches",{body:e,...I})}retrieve(e,I){return this._client.get(xt`/v1/messages/batches/${e}`,I)}list(e={},I){return this._client.getAPIList("/v1/messages/batches",FR,{query:e,...I})}delete(e,I){return this._client.delete(xt`/v1/messages/batches/${e}`,I)}cancel(e,I){return this._client.post(xt`/v1/messages/batches/${e}/cancel`,I)}async results(e,I){let l=await this.retrieve(e);if(!l.results_url)throw new Bt(`No batch \`results_url\`; Has it finished processing? ${l.processing_status} - ${l.id}`);return this._client.get(l.results_url,{...I,headers:Ke([{Accept:"application/binary"},I?.headers]),stream:!0,__binaryResponse:!0})._thenUnwrap((n,a)=>EM.fromResponse(a.response,a.controller))}}});var C1,AZI,QTn,n8e=g(()=>{o();bs();Kr();ote();RZI();q7e();l8e();l8e();F7e();C1=class extends cl{constructor(){super(...arguments),this.batches=new UM(this._client)}create(e,I){e.model in AZI&&console.warn(`The model '${e.model}' is deprecated and will reach end-of-life on ${AZI[e.model]} +Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`),QTn.includes(e.model)&&e.thinking&&e.thinking.type==="enabled"&&console.warn(`Using Claude with ${e.model} and 'thinking.type=enabled' is deprecated. Use 'thinking.type=adaptive' instead which results in better model performance in our testing: https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking`);let l=this._client._options.timeout;if(!e.stream&&l==null){let a=A0e[e.model]??void 0;l=this._client.calculateNonstreamingTimeout(e.max_tokens,a)}let n=R0e(e.tools,e.messages);return this._client.post("/v1/messages",{body:e,timeout:l??6e5,...I,headers:Ke([n,I?.headers]),stream:e.stream??!1})}parse(e,I){return this.create(e,I).then(l=>D7e(l,e,{logger:this._client.logger??console}))}stream(e,I){return U0e.createMessage(this,e,I,{logger:this._client.logger??console})}countTokens(e,I){return this._client.post("/v1/messages/count_tokens",{body:e,...I})}},AZI={"claude-1.3":"November 6th, 2024","claude-1.3-100k":"November 6th, 2024","claude-instant-1.1":"November 6th, 2024","claude-instant-1.1-100k":"November 6th, 2024","claude-instant-1.2":"November 6th, 2024","claude-3-sonnet-20240229":"July 21st, 2025","claude-3-opus-20240229":"January 5th, 2026","claude-2.1":"July 21st, 2025","claude-2.0":"July 21st, 2025","claude-3-7-sonnet-latest":"February 19th, 2026","claude-3-7-sonnet-20250219":"February 19th, 2026","claude-3-5-haiku-latest":"February 19th, 2026","claude-3-5-haiku-20241022":"February 19th, 2026","claude-opus-4-0":"June 15th, 2026","claude-opus-4-20250514":"June 15th, 2026","claude-sonnet-4-0":"June 15th, 2026","claude-sonnet-4-20250514":"June 15th, 2026"},QTn=["claude-mythos-preview","claude-opus-4-6"];C1.Batches=UM});var I4,a8e=g(()=>{o();bs();oo();Kr();Ki();I4=class extends cl{retrieve(e,I={},l){let{betas:n}=I??{};return this._client.get(xt`/v1/models/${e}`,{...l,headers:Ke([{...n?.toString()!=null?{"anthropic-beta":n?.toString()}:void 0},l?.headers])})}list(e={},I){let{betas:l,...n}=e??{};return this._client.getAPIList("/v1/models",FR,{query:n,...I,headers:Ke([{...l?.toString()!=null?{"anthropic-beta":l?.toString()}:void 0},I?.headers])})}}});var FZI=g(()=>{o();tZI();T7e();_7e();n8e();a8e()});var Ate,c8e=g(()=>{o();Ate=t=>{if(typeof globalThis.process<"u")return globalThis.process.env?.[t]?.trim()||void 0;if(typeof globalThis.Deno<"u")return globalThis.Deno.env?.get?.(t)?.trim()||void 0}});var r8e,s8e,O0e,XZI,gZI,vZI,Yr,U2,o8e=g(()=>{o();Sw();qPe();w1();t7e();iM();l7e();NM();MmI();a7e();I7e();Xb();oo();p7e();FZI();h0e();_7e();a8e();T7e();n8e();l7e();Kr();c8e();lte();w1();gZI="\\n\\nHuman:",vZI="\\n\\nAssistant:",Yr=class{constructor({baseURL:e=Ate("ANTHROPIC_BASE_URL"),apiKey:I=Ate("ANTHROPIC_API_KEY")??null,authToken:l=Ate("ANTHROPIC_AUTH_TOKEN")??null,...n}={}){r8e.add(this),O0e.set(this,void 0);let a={apiKey:I,authToken:l,...n,baseURL:e||"https://api.anthropic.com"};if(!a.dangerouslyAllowBrowser&&jmI())throw new Bt(`It looks like you're running in a browser-like environment. + +This is disabled by default, as it risks exposing your secret API credentials to attackers. +If you understand the risks and have appropriate mitigations in place, +you can set the \`dangerouslyAllowBrowser\` option to \`true\`, e.g., + +new Anthropic({ apiKey, dangerouslyAllowBrowser: true }); +`);this.baseURL=a.baseURL,this.timeout=a.timeout??s8e.DEFAULT_TIMEOUT,this.logger=a.logger??console;let c="warn";this.logLevel=c,this.logLevel=s7e(a.logLevel,"ClientOptions.logLevel",this)??s7e(Ate("ANTHROPIC_LOG"),"process.env['ANTHROPIC_LOG']",this)??c,this.fetchOptions=a.fetchOptions,this.maxRetries=a.maxRetries??2,this.fetch=a.fetch??OmI(),Wt(this,O0e,BmI,"f"),this._options=a,this.apiKey=typeof I=="string"?I:null,this.authToken=l}withOptions(e){return new this.constructor({...this._options,baseURL:this.baseURL,maxRetries:this.maxRetries,timeout:this.timeout,logger:this.logger,logLevel:this.logLevel,fetch:this.fetch,fetchOptions:this.fetchOptions,apiKey:this.apiKey,authToken:this.authToken,...e})}defaultQuery(){return this._options.defaultQuery}validateHeaders({values:e,nulls:I}){if(!(e.get("x-api-key")||e.get("authorization"))&&!(this.apiKey&&e.get("x-api-key"))&&!I.has("x-api-key")&&!(this.authToken&&e.get("authorization"))&&!I.has("authorization"))throw new Error('Could not resolve authentication method. Expected either apiKey or authToken to be set. Or for one of the "X-Api-Key" or "Authorization" headers to be explicitly omitted')}async authHeaders(e){return Ke([await this.apiKeyAuth(e),await this.bearerAuth(e)])}async apiKeyAuth(e){if(this.apiKey!=null)return Ke([{"X-Api-Key":this.apiKey}])}async bearerAuth(e){if(this.authToken!=null)return Ke([{Authorization:`Bearer ${this.authToken}`}])}stringifyQuery(e){return SmI(e)}getUserAgent(){return`${this.constructor.name}/JS ${H1}`}defaultIdempotencyKey(){return`stainless-node-retry-${DPe()}`}makeStatusError(e,I,l,n){return li.generate(e,I,l,n)}buildURL(e,I,l){let n=!be(this,r8e,"m",XZI).call(this)&&l||this.baseURL,a=fmI(e)?new URL(e):new URL(n+(n.endsWith("/")&&e.startsWith("/")?e.slice(1):e)),c=this.defaultQuery(),r=Object.fromEntries(a.searchParams);return(!e7e(c)||!e7e(r))&&(I={...r,...c,...I}),typeof I=="object"&&I&&!Array.isArray(I)&&(a.search=this.stringifyQuery(I)),a.toString()}_calculateNonstreamingTimeout(e){if(3600*e/128e3>600)throw new Bt("Streaming is required for operations that may take longer than 10 minutes. See https://github.com/anthropics/anthropic-sdk-typescript#streaming-responses for more details");return 600*1e3}async prepareOptions(e){}async prepareRequest(e,{url:I,options:l}){}get(e,I){return this.methodRequest("get",e,I)}post(e,I){return this.methodRequest("post",e,I)}patch(e,I){return this.methodRequest("patch",e,I)}put(e,I){return this.methodRequest("put",e,I)}delete(e,I){return this.methodRequest("delete",e,I)}methodRequest(e,I,l){return this.request(Promise.resolve(l).then(n=>({method:e,path:I,...n})))}request(e,I=null){return new Sk(this,this.makeRequest(e,I,void 0))}async makeRequest(e,I,l){let n=await e,a=n.maxRetries??this.maxRetries;I==null&&(I=a),await this.prepareOptions(n);let{req:c,url:r,timeout:s}=await this.buildRequest(n,{retryCount:a-I});await this.prepareRequest(c,{url:r,options:n});let i="log_"+(Math.random()*(1<<24)|0).toString(16).padStart(6,"0"),G=l===void 0?"":`, retryOf: ${l}`,d=Date.now();if(ni(this).debug(`[${i}] sending request`,Kw({retryOfRequestLogID:l,method:n.method,url:r,options:n,headers:c.headers})),n.signal?.aborted)throw new _i;let u=new AbortController,b=await this.fetchWithTimeout(r,c,s,u).catch(ete),Z=Date.now();if(b instanceof globalThis.Error){let h=`retrying, ${I} attempts remaining`;if(n.signal?.aborted)throw new _i;let N=Tw(b)||/timed? ?out/i.test(String(b)+("cause"in b?String(b.cause):""));if(I)return ni(this).info(`[${i}] connection ${N?"timed out":"failed"} - ${h}`),ni(this).debug(`[${i}] connection ${N?"timed out":"failed"} (${h})`,Kw({retryOfRequestLogID:l,url:r,durationMs:Z-d,message:b.message})),this.retryRequest(n,I,l??i);throw ni(this).info(`[${i}] connection ${N?"timed out":"failed"} - error; no more retries left`),ni(this).debug(`[${i}] connection ${N?"timed out":"failed"} (error; no more retries left)`,Kw({retryOfRequestLogID:l,url:r,durationMs:Z-d,message:b.message})),N?new GM:new y1({cause:b})}let p=[...b.headers.entries()].filter(([h])=>h==="request-id").map(([h,N])=>", "+h+": "+JSON.stringify(N)).join(""),W=`[${i}${G}${p}] ${c.method} ${r} ${b.ok?"succeeded":"failed"} with status ${b.status} in ${Z-d}ms`;if(!b.ok){let h=await this.shouldRetry(b);if(I&&h){let y=`retrying, ${I} attempts remaining`;return await zmI(b.body),ni(this).info(`${W} - ${y}`),ni(this).debug(`[${i}] response error (${y})`,Kw({retryOfRequestLogID:l,url:b.url,status:b.status,headers:b.headers,durationMs:Z-d})),this.retryRequest(n,I,l??i,b.headers)}let N=h?"error; no more retries left":"error; not retryable";ni(this).info(`${W} - ${N}`);let V=await b.text().catch(y=>ete(y).message),R=d0e(V),F=R?void 0:V;throw ni(this).debug(`[${i}] response error (${N})`,Kw({retryOfRequestLogID:l,url:b.url,status:b.status,headers:b.headers,message:F,durationMs:Date.now()-d})),this.makeStatusError(b.status,R,F,b.headers)}return ni(this).info(W),ni(this).debug(`[${i}] response start`,Kw({retryOfRequestLogID:l,url:b.url,status:b.status,headers:b.headers,durationMs:Z-d})),{response:b,options:n,controller:u,requestLogID:i,retryOfRequestLogID:l,startTime:d}}getAPIList(e,I,l){return this.requestAPIList(I,l&&"then"in l?l.then(n=>({method:"get",path:e,...n})):{method:"get",path:e,...l})}requestAPIList(e,I){let l=this.makeRequest(I,null,void 0);return new cte(this,l,e)}async fetchWithTimeout(e,I,l,n){let{signal:a,method:c,...r}=I||{},s=this._makeAbort(n);a&&a.addEventListener("abort",s,{once:!0});let i=setTimeout(s,l),G=globalThis.ReadableStream&&r.body instanceof globalThis.ReadableStream||typeof r.body=="object"&&r.body!==null&&Symbol.asyncIterator in r.body,d={signal:n.signal,...G?{duplex:"half"}:{},method:"GET",...r};c&&(d.method=c.toUpperCase());try{return await this.fetch.call(void 0,e,d)}finally{clearTimeout(i)}}async shouldRetry(e){let I=e.headers.get("x-should-retry");return I==="true"?!0:I==="false"?!1:e.status===408||e.status===409||e.status===429||e.status>=500}async retryRequest(e,I,l,n){let a,c=n?.get("retry-after-ms");if(c){let s=parseFloat(c);Number.isNaN(s)||(a=s)}let r=n?.get("retry-after");if(r&&!a){let s=parseFloat(r);Number.isNaN(s)?a=Date.parse(r)-Date.now():a=s*1e3}if(a===void 0){let s=e.maxRetries??this.maxRetries;a=this.calculateDefaultRetryTimeoutMillis(I,s)}return await CmI(a),this.makeRequest(e,I-1,l)}calculateDefaultRetryTimeoutMillis(e,I){let a=I-e,c=Math.min(.5*Math.pow(2,a),8),r=1-Math.random()*.25;return c*r*1e3}calculateNonstreamingTimeout(e,I){if(36e5*e/128e3>6e5||I!=null&&e>I)throw new Bt("Streaming is required for operations that may take longer than 10 minutes. See https://github.com/anthropics/anthropic-sdk-typescript#long-requests for more details");return 6e5}async buildRequest(e,{retryCount:I=0}={}){let l={...e},{method:n,path:a,query:c,defaultBaseURL:r}=l,s=this.buildURL(a,c,r);"timeout"in l&&JmI("timeout",l.timeout),l.timeout=l.timeout??this.timeout;let{bodyHeaders:i,body:G}=this.buildBody({options:l}),d=await this.buildHeaders({options:e,method:n,bodyHeaders:i,retryCount:I});return{req:{method:n,headers:d,...l.signal&&{signal:l.signal},...globalThis.ReadableStream&&G instanceof globalThis.ReadableStream&&{duplex:"half"},...G&&{body:G},...this.fetchOptions??{},...l.fetchOptions??{}},url:s,timeout:l.timeout}}async buildHeaders({options:e,method:I,bodyHeaders:l,retryCount:n}){let a={};this.idempotencyHeader&&I!=="get"&&(e.idempotencyKey||(e.idempotencyKey=this.defaultIdempotencyKey()),a[this.idempotencyHeader]=e.idempotencyKey);let c=Ke([a,{Accept:"application/json","User-Agent":this.getUserAgent(),"X-Stainless-Retry-Count":String(n),...e.timeout?{"X-Stainless-Timeout":String(Math.trunc(e.timeout/1e3))}:{},...UmI(),...this._options.dangerouslyAllowBrowser?{"anthropic-dangerous-direct-browser-access":"true"}:void 0,"anthropic-version":"2023-06-01"},await this.authHeaders(e),this._options.defaultHeaders,l,e.headers]);return this.validateHeaders(c),c.values}_makeAbort(e){return()=>e.abort()}buildBody({options:{body:e,headers:I}}){if(!e)return{bodyHeaders:void 0,body:void 0};let l=Ke([I]);return ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof DataView||typeof e=="string"&&l.values.has("content-type")||globalThis.Blob&&e instanceof globalThis.Blob||e instanceof FormData||e instanceof URLSearchParams||globalThis.ReadableStream&&e instanceof globalThis.ReadableStream?{bodyHeaders:void 0,body:e}:typeof e=="object"&&(Symbol.asyncIterator in e||Symbol.iterator in e&&"next"in e&&typeof e.next=="function")?{bodyHeaders:void 0,body:u0e(e)}:typeof e=="object"&&l.values.get("content-type")==="application/x-www-form-urlencoded"?{bodyHeaders:{"content-type":"application/x-www-form-urlencoded"},body:this.stringifyQuery(e)}:be(this,O0e,"f").call(this,{body:e,headers:l})}};s8e=Yr,O0e=new WeakMap,r8e=new WeakSet,XZI=function(){return this.baseURL!=="https://api.anthropic.com"};Yr.Anthropic=s8e;Yr.HUMAN_PROMPT=gZI;Yr.AI_PROMPT=vZI;Yr.DEFAULT_TIMEOUT=6e5;Yr.AnthropicError=Bt;Yr.APIError=li;Yr.APIConnectionError=y1;Yr.APIConnectionTimeoutError=GM;Yr.APIUserAbortError=_i;Yr.NotFoundError=mM;Yr.ConflictError=ZM;Yr.RateLimitError=hM;Yr.BadRequestError=dM;Yr.AuthenticationError=uM;Yr.InternalServerError=WM;Yr.PermissionDeniedError=bM;Yr.UnprocessableEntityError=pM;Yr.toFile=V0e;U2=class extends Yr{constructor(){super(...arguments),this.completions=new e4(this),this.messages=new C1(this),this.models=new I4(this),this.beta=new yu(this)}};U2.Completions=e4;U2.Messages=C1;U2.Models=I4;U2.Beta=yu});var yZI=g(()=>{o();o8e();p7e();h0e();o8e();oo();Xb()});var wZI=g(()=>{o();Xb();b0e()});var HZI=g(()=>{o();w1();wZI();c8e();lte();qPe();t7e();a7e()});function JTn(t){return JSON.parse(JSON.stringify(t))}function QZI(t){let e=JTn(t);return l4(e)}function l4(t){let e={},I=gb(t,"$ref");if(I!==void 0)return e.$ref=I,e;let l=gb(t,"$defs");if(l!==void 0){let G={};e.$defs=G;for(let[d,u]of Object.entries(l))G[d]=l4(u)}let n=gb(t,"type"),a=gb(t,"anyOf"),c=gb(t,"oneOf"),r=gb(t,"allOf");if(Array.isArray(a))e.anyOf=a.map(G=>l4(G));else if(Array.isArray(c))e.anyOf=c.map(G=>l4(G));else if(Array.isArray(r))e.allOf=r.map(G=>l4(G));else{if(n===void 0)throw new Error("JSON schema must have a type defined if anyOf/oneOf/allOf are not used");e.type=n}let s=gb(t,"description");s!==void 0&&(e.description=s);let i=gb(t,"title");if(i!==void 0&&(e.title=i),n==="object"){let G=gb(t,"properties")||{};e.properties=Object.fromEntries(Object.entries(G).map(([u,b])=>[u,l4(b)])),gb(t,"additionalProperties"),e.additionalProperties=!1;let d=gb(t,"required");d!==void 0&&(e.required=d)}else if(n==="string"){let G=gb(t,"format");G!==void 0&&ETn.has(G)?e.format=G:G!==void 0&&(t.format=G)}else if(n==="array"){let G=gb(t,"items");G!==void 0&&(e.items=l4(G));let d=gb(t,"minItems");d!==void 0&&(d===0||d===1)?e.minItems=d:d!==void 0&&(t.minItems=d)}if(Object.keys(t).length>0){let G=e.description;e.description=(G?G+` + +`:"")+"{"+Object.entries(t).map(([d,u])=>`${d}: ${JSON.stringify(u)}`).join(", ")+"}"}return e}var ETn,fZI=g(()=>{o();HZI();ETn=new Set(["date-time","time","date","duration","email","hostname","uri","ipv4","ipv6","uuid"])});function LTn(t){return t?Object.entries(CTn).find(([e])=>t.startsWith(e))?.[1]??EZI:EZI}function kTn(t){return!!(t.tools&&t.tools.length>0)}function xTn(t){for(let e of t.messages??[])if(typeof e.content!="string"){for(let I of e.content??[])if(typeof I=="object"&&I!=null&&I.type==="document"&&typeof I.citations=="object"&&I.citations?.enabled)return!0}return!1}function jTn(t){return!!(t.thinking&&(t.thinking.type==="enabled"||t.thinking.type==="adaptive"))}function UTn(t){return!!t.context_management?.edits?.some(e=>e.type==="compact_20260112")}function OTn(t){return"input_schema"in t}function zTn(t){return typeof t=="object"&&t!==null&&"type"in t&&("name"in t||"mcp_server_name"in t)&&typeof t.type=="string"&&["text_editor_","computer_","bash_","web_search_","web_fetch_","str_replace_editor_","str_replace_based_edit_tool_","code_execution_","memory_","tool_search_","mcp_toolset"].some(e=>typeof t.type=="string"&&t.type.startsWith(e))}function BTn(t,e,...I){return Array.from(new Set([...t??[],...e??[],...I.flatMap(l=>Array.from(l))]))}function MTn(t){if(typeof t.content=="string")return t.content;if(Array.isArray(t.content)&&t.content.length>=1&&"input"in t.content[0])return typeof t.content[0].input=="string"?t.content[0].input:JSON.stringify(t.content[0].input);if(Array.isArray(t.content)&&t.content.length>=1&&"text"in t.content[0]&&typeof t.content[0].text=="string")return t.content[0].text}var CTn,EZI,i8e,JZI,CZI=g(()=>{o();kPe();imI();TPe();FmI();ymI();wmI();QmI();yZI();fZI();NI();Yo();ca();l0();sZ();aG();Wa();uF();wp();tQ();CTn={"claude-opus-4-7":16384,"claude-opus-4-6":16384,"claude-sonnet-4-6":16384,"claude-opus-4-5":16384,"claude-sonnet-4-5":16384,"claude-haiku-4-5":16384,"claude-opus-4-1":16384,"claude-sonnet-4":16384,"claude-opus-4":16384,"claude-3-7-sonnet":8192,"claude-3-5-sonnet":8192,"claude-3-5-haiku":8192,"claude-3-opus":4096,"claude-3-sonnet":4096,"claude-3-haiku":4096},EZI=4096;i8e=class extends yr{static lc_name(){return"ChatAnthropic"}get lc_secrets(){return{anthropicApiKey:"ANTHROPIC_API_KEY",apiKey:"ANTHROPIC_API_KEY"}}get lc_aliases(){return{modelName:"model"}}lc_serializable=!0;anthropicApiKey;apiKey;apiUrl;temperature;topK;topP;maxTokens;modelName="claude-sonnet-4-5-20250929";model="claude-sonnet-4-5-20250929";invocationKwargs;stopSequences;streaming=!1;clientOptions;thinking={type:"disabled"};contextManagement;outputConfig;inferenceGeo;batchClient;streamingClient;streamUsage=!0;betas;createClient;constructor(t,e){let I=typeof t=="string"?{...e??{},model:t}:t??{};if(super(I??{}),this._addVersion("@langchain/anthropic","1.3.28"),this.anthropicApiKey=I?.apiKey??I?.anthropicApiKey??gt("ANTHROPIC_API_KEY"),!this.anthropicApiKey&&!I?.createClient)throw new Error("Anthropic API key not found");this.clientOptions=I?.clientOptions??{},this.apiKey=this.anthropicApiKey,this.apiUrl=I?.anthropicApiUrl,this.modelName=I?.model??I?.modelName??this.model,this.model=this.modelName,this.invocationKwargs=I?.invocationKwargs??{},this.topP=I?.topP??this.topP,this.temperature=I?.temperature??this.temperature,this.topK=I?.topK??this.topK,this.maxTokens=I?.maxTokens??LTn(this.model),this.stopSequences=I?.stopSequences??this.stopSequences,this.streaming=I?.streaming??!1,this.streamUsage=I?.streamUsage??this.streamUsage,this.thinking=I?.thinking??this.thinking,this.contextManagement=I?.contextManagement??this.contextManagement,this.outputConfig=I?.outputConfig??this.outputConfig,this.inferenceGeo=I?.inferenceGeo??this.inferenceGeo,this.betas=I?.betas??this.betas,this.createClient=I?.createClient??(l=>new U2(l))}getLsParams(t){let e=this.invocationParams(t);return{ls_provider:"anthropic",ls_model_name:this.model,ls_model_type:"chat",ls_temperature:e.temperature??void 0,ls_max_tokens:e.max_tokens??void 0,ls_stop:t.stop}}formatStructuredToolToAnthropic(t){if(t)return t.map(e=>{if(Ws(e)&&e.extras?.providerToolDefinition)return e.extras.providerToolDefinition;if(zTn(e)||OTn(e))return e;if($R(e))return{name:e.function.name,description:e.function.description,input_schema:e.function.parameters};if(Ws(e))return{name:e.name,description:e.description,input_schema:Vl(e.schema)?DI(e.schema):e.schema,...e.extras?omI.parse(e.extras):{}};throw new Error(`Unknown tool type passed to ChatAnthropic: ${JSON.stringify(e,null,2)}`)})}bindTools(t,e){return this.withConfig({tools:this.formatStructuredToolToAnthropic(t),...e})}invocationParams(t){let e=smI(t?.tool_choice),I=t?.tools?.reduce((r,s)=>{if(typeof s=="object"&&"type"in s&&s.type in xPe){let i=xPe[s.type];if(!r.includes(i))return[...r,i]}return r},[]),l=(()=>{let r={...this.outputConfig,...t?.outputConfig};return t?.outputFormat&&!r.format&&(r.format=t.outputFormat),Object.keys(r).length>0?r:void 0})(),n=this.contextManagement?.edits?.some(r=>r.type==="compact_20260112")?["compact-2026-01-12"]:[],a=YmI(this.model,l),c={model:this.model,stop_sequences:t?.stop??this.stopSequences,stream:this.streaming,max_tokens:this.maxTokens,tools:this.formatStructuredToolToAnthropic(t?.tools),tool_choice:e,thinking:this.thinking,context_management:this.contextManagement,...this.invocationKwargs,container:t?.container,betas:BTn(this.betas,t?.betas,I??[],n,a),output_config:l,inference_geo:t?.inferenceGeo??this.inferenceGeo,mcp_servers:t?.mcp_servers};return RmI({model:this.model,thinking:this.thinking,topK:this.topK,topP:this.topP,temperature:this.temperature}),Object.assign(c,AmI({model:this.model,thinking:this.thinking,topK:this.topK,topP:this.topP,temperature:this.temperature})),c}_identifyingParams(){return{model_name:this.model,...this.invocationParams()}}identifyingParams(){return{model_name:this.model,...this.invocationParams()}}async*_streamResponseChunks(t,e,I){let l=this.invocationParams(e),n=Pee(t);e.cache_control&&(n=SPe(n,e.cache_control));let a={...l,...n,stream:!0},c=!kTn(a)&&!xTn(a)&&!jTn(a)&&!UTn(a),r=await this.createStreamWithRetry(a,{headers:e.headers,signal:e.signal});for await(let s of r){if(e.signal?.aborted){r.controller.abort();return}let i=this.streamUsage??e.streamUsage,G=XmI(s,{streamUsage:i,coerceContentToString:c});if(!G)continue;let{chunk:d}=G,u=MTn(d),b=new Nc({message:new eI({content:d.content,additional_kwargs:d.additional_kwargs,tool_call_chunks:d.tool_call_chunks,usage_metadata:i?d.usage_metadata:void 0,response_metadata:d.response_metadata,id:d.id}),text:u??""});yield b,await I?.handleLLMNewToken(u??"",void 0,void 0,void 0,void 0,{chunk:b})}}async _generateNonStreaming(t,e,I,l){let n=Pee(t);l&&(n=SPe(n,l));let{content:a,...c}=await this.completionWithRetry({...e,stream:!1,...n},I),r=gmI(a,c),{role:s,type:i,...G}=c;return{generations:r,llmOutput:G}}async _generate(t,e,I){if(e.signal?.throwIfAborted(),this.stopSequences&&e.stop)throw new Error('"stopSequence" parameter found in input and default params');let l=this.invocationParams(e);if(l.stream){let n,a=this._streamResponseChunks(t,e,I);for await(let c of a)n===void 0?n=c:n=n.concat(c);if(n===void 0)throw new Error("No chunks returned from Anthropic API.");return{generations:[{text:n.text,message:n.message}]}}else return this._generateNonStreaming(t,l,{signal:e.signal,headers:e.headers},e.cache_control)}async createStreamWithRetry(t,e){if(!this.streamingClient){let a=this.apiUrl?{baseURL:this.apiUrl}:void 0;this.streamingClient=this.createClient({dangerouslyAllowBrowser:!0,...this.clientOptions,...a,apiKey:this.apiKey,maxRetries:0})}let{betas:I,...l}=t,n=async()=>{try{return t?.betas?.length?await this.streamingClient.beta.messages.create({...l,betas:I,...this.invocationKwargs,stream:!0},e):await this.streamingClient.messages.create({...l,...this.invocationKwargs,stream:!0},e)}catch(a){throw KPe(a)}};return this.caller.call(n)}async completionWithRetry(t,e){if(!this.batchClient){let a=this.apiUrl?{baseURL:this.apiUrl}:void 0;this.batchClient=this.createClient({dangerouslyAllowBrowser:!0,...this.clientOptions,...a,apiKey:this.apiKey,maxRetries:0})}let{betas:I,...l}=t,n=async()=>{try{return t?.betas?.length?await this.batchClient.beta.messages.create({...l,...this.invocationKwargs,betas:I},e):await this.batchClient.messages.create({...l,...this.invocationKwargs},e)}catch(a){throw KPe(a)}};return this.caller.callWithOptions({signal:e.signal??void 0},n)}_llmType(){return"anthropic"}get profile(){return HmI[this.model]??{}}withStructuredOutput(t,e){let I,l,{schema:n,name:a,includeRaw:c}={...e,schema:t},r=e?.method??"functionCalling";if(r==="jsonMode"&&(console.warn('"jsonMode" is not supported for Anthropic models. Falling back to "jsonSchema".'),r="jsonSchema"),r==="jsonSchema"){l=Ep(n);let s=QZI(DI(n));I=this.withConfig({outputVersion:"v0",outputConfig:{format:{type:"json_schema",schema:s}},ls_structured_output_format:{kwargs:{method:"json_schema"},schema:s}})}else if(r==="functionCalling"){let s=a??"extract",i;if(Vl(n)||jn(n)){let G=DI(n);i=[{name:s,description:G.description??"A function available to call.",input_schema:G}]}else typeof n.name=="string"&&typeof n.description=="string"&&typeof n.input_schema=="object"&&n.input_schema!=null?(i=[n],s=n.name):i=[{name:s,description:n.description??"",input_schema:n}];if(l=I0(n,s,rmI),this.thinking?.type==="enabled"||this.thinking?.type==="adaptive"){let G="Anthropic structured output relies on forced tool calling, which is not supported when `thinking` is enabled. This method will raise OutputParserException if tool calls are not generated. Consider disabling `thinking` or adjust your prompt to ensure the tool is called.";console.warn(G),I=this.withConfig({outputVersion:"v0",tools:i,ls_structured_output_format:{kwargs:{method:"functionCalling"},schema:DI(n)}});let d=u=>{if(!u.tool_calls||u.tool_calls.length===0)throw new Error(G);return u};I=I.pipe(d)}else I=this.withConfig({outputVersion:"v0",tools:i,tool_choice:{type:"tool",name:s},ls_structured_output_format:{kwargs:{method:"functionCalling"},schema:DI(n)}})}else throw new TypeError(`Unrecognized structured output method '${r}'. Expected 'functionCalling' or 'jsonSchema'`);return oZ(I,l,c,c?"StructuredOutputRunnable":"ChatAnthropicStructuredOutput")}},JZI=class extends i8e{}});function LZI(t){let e=Pee(t.toChatMessages());return e.messages===void 0&&(e.messages=[]),e}var kZI=g(()=>{o();TPe()});var STn,TTn,_Tn,KTn,DTn,qTn,xZI,PTn,$Tn,e_n,t_n,jZI,ZA,UZI,OZI,zZI,BZI,MZI,SZI,TZI,_ZI,KZI,DZI,qZI,PZI,$ZI,epI,tpI,I_n,IpI,lpI,l_n,n_n,npI,Fte=g(()=>{o();sG();STn=ae.object({command:ae.literal("view"),path:ae.string()}),TTn=ae.object({command:ae.literal("create"),path:ae.string(),file_text:ae.string()}),_Tn=ae.object({command:ae.literal("str_replace"),path:ae.string(),old_str:ae.string(),new_str:ae.string()}),KTn=ae.object({command:ae.literal("insert"),path:ae.string(),insert_line:ae.number(),insert_text:ae.string()}),DTn=ae.object({command:ae.literal("delete"),path:ae.string()}),qTn=ae.object({command:ae.literal("rename"),old_path:ae.string(),new_path:ae.string()}),xZI=ae.discriminatedUnion("command",[STn,TTn,_Tn,KTn,DTn,qTn]),PTn=ae.object({command:ae.literal("view"),path:ae.string(),view_range:ae.tuple([ae.number(),ae.number()]).optional()}),$Tn=ae.object({command:ae.literal("str_replace"),path:ae.string(),old_str:ae.string(),new_str:ae.string()}),e_n=ae.object({command:ae.literal("create"),path:ae.string(),file_text:ae.string()}),t_n=ae.object({command:ae.literal("insert"),path:ae.string(),insert_line:ae.number(),new_str:ae.string()}),jZI=ae.discriminatedUnion("command",[PTn,$Tn,e_n,t_n]),ZA=ae.tuple([ae.number(),ae.number()]),UZI=ae.object({action:ae.literal("screenshot")}),OZI=ae.object({action:ae.literal("left_click"),coordinate:ZA}),zZI=ae.object({action:ae.literal("right_click"),coordinate:ZA}),BZI=ae.object({action:ae.literal("middle_click"),coordinate:ZA}),MZI=ae.object({action:ae.literal("double_click"),coordinate:ZA}),SZI=ae.object({action:ae.literal("triple_click"),coordinate:ZA}),TZI=ae.object({action:ae.literal("left_click_drag"),start_coordinate:ZA,end_coordinate:ZA}),_ZI=ae.object({action:ae.literal("left_mouse_down"),coordinate:ZA}),KZI=ae.object({action:ae.literal("left_mouse_up"),coordinate:ZA}),DZI=ae.object({action:ae.literal("scroll"),coordinate:ZA,scroll_direction:ae.enum(["up","down","left","right"]),scroll_amount:ae.number()}),qZI=ae.object({action:ae.literal("type"),text:ae.string()}),PZI=ae.object({action:ae.literal("key"),key:ae.string()}),$ZI=ae.object({action:ae.literal("mouse_move"),coordinate:ZA}),epI=ae.object({action:ae.literal("hold_key"),key:ae.string()}),tpI=ae.object({action:ae.literal("wait"),duration:ae.number().optional()}),I_n=ae.object({action:ae.literal("zoom"),region:ae.tuple([ae.number(),ae.number(),ae.number(),ae.number()])}),IpI=ae.discriminatedUnion("action",[UZI,OZI,zZI,BZI,MZI,SZI,TZI,_ZI,KZI,DZI,qZI,PZI,$ZI,epI,tpI]),lpI=ae.discriminatedUnion("action",[UZI,OZI,zZI,BZI,MZI,SZI,TZI,_ZI,KZI,DZI,qZI,PZI,$ZI,epI,tpI,I_n]),l_n=ae.object({command:ae.string().describe("The bash command to run")}),n_n=ae.object({restart:ae.literal(!0).describe("Set to true to restart the bash session")}),npI=ae.union([l_n,n_n])});function apI(t){let e=ir(t?.execute,{name:"memory",schema:xZI});return e.extras={...e.extras??{},providerToolDefinition:{type:"memory_20250818",name:"memory"}},e}var cpI=g(()=>{o();Fte();Ns()});function rpI(t){return{type:"web_search_20250305",name:"web_search",max_uses:t?.maxUses,allowed_domains:t?.allowedDomains,blocked_domains:t?.blockedDomains,cache_control:t?.cacheControl,defer_loading:t?.deferLoading,strict:t?.strict,user_location:t?.userLocation}}var spI=g(()=>{o()});function opI(t){return{type:"web_fetch_20250910",name:"web_fetch",max_uses:t?.maxUses,allowed_domains:t?.allowedDomains,blocked_domains:t?.blockedDomains,cache_control:t?.cacheControl,citations:t?.citations,max_content_tokens:t?.maxContentTokens}}var ipI=g(()=>{o()});function GpI(t){return{type:"tool_search_tool_regex_20251119",name:"tool_search_tool_regex",cache_control:t?.cacheControl}}function dpI(t){return{type:"tool_search_tool_bm25_20251119",name:"tool_search_tool_bm25",cache_control:t?.cacheControl}}var upI=g(()=>{o()});function bpI(t){let e="str_replace_based_edit_tool",I=ir(t?.execute,{name:e,description:"A tool for editing text files",schema:jZI});return I.extras={...I.extras??{},providerToolDefinition:{type:"text_editor_20250728",name:e,...t?.maxCharacters!==void 0&&{max_characters:t.maxCharacters}}},I}var mpI=g(()=>{o();Fte();Ns()});function ppI(t){let e=ZpI,I=ir(t.execute,{name:e,schema:lpI});return I.extras={...I.extras??{},providerToolDefinition:{type:"computer_20251124",name:e,display_width_px:t.displayWidthPx,display_height_px:t.displayHeightPx,...t.displayNumber!==void 0&&{display_number:t.displayNumber},...t.enableZoom!==void 0&&{enable_zoom:t.enableZoom}}},I}function hpI(t){let e=ZpI,I=ir(t.execute,{name:e,description:"A tool for interacting with the computer",schema:IpI});return I.extras={...I.extras??{},providerToolDefinition:{type:"computer_20250124",name:e,display_width_px:t.displayWidthPx,display_height_px:t.displayHeightPx,...t.displayNumber!==void 0&&{display_number:t.displayNumber}}},I}var ZpI,WpI=g(()=>{o();Fte();Ns();ZpI="computer"});function NpI(t){return{type:"code_execution_20250825",name:"code_execution",cache_control:t?.cacheControl}}var VpI=g(()=>{o()});function YpI(t){let e="bash",I=ir(t?.execute,{name:e,description:"A tool for executing bash commands",schema:npI});return I.extras={...I.extras??{},providerToolDefinition:{type:"bash_20250124",name:e}},I}var RpI=g(()=>{o();Fte();Ns()});function ApI(t){let e=t.defaultConfig?.enabled!==void 0||t.defaultConfig?.deferLoading!==void 0?{enabled:t.defaultConfig?.enabled,defer_loading:t.defaultConfig?.deferLoading}:void 0,I=t.configs?Object.fromEntries(Object.entries(t.configs).map(([l,n])=>[l,{enabled:n.enabled,defer_loading:n.deferLoading}])):void 0;return{type:"mcp_toolset",mcp_server_name:t.serverName,default_config:e,configs:I,cache_control:t.cacheControl}}var FpI=g(()=>{o()});var XpI,gpI=g(()=>{o();cpI();spI();ipI();upI();mpI();WpI();VpI();RpI();FpI();XpI={memory_20250818:apI,webSearch_20250305:rpI,webFetch_20250910:opI,toolSearchRegex_20251119:GpI,toolSearchBM25_20251119:dpI,textEditor_20250728:bpI,computer_20251124:ppI,computer_20250124:hpI,codeExecution_20250825:NpI,bash_20250124:YpI,mcpToolset_20251120:ApI}});var vpI={};tr(vpI,{ChatAnthropic:()=>JZI,ChatAnthropicMessages:()=>i8e,convertPromptToAnthropic:()=>LZI,tools:()=>XpI});var ypI=g(()=>{o();CZI();kZI();gpI()});function QpI(t,e){return new eI({content:t.content??"",additional_kwargs:t.thinking&&t.thinking!==""?{reasoning_content:t.thinking}:{},tool_call_chunks:t.tool_calls?.map(I=>({name:I.function.name,args:JSON.stringify(I.function.arguments),type:"tool_call_chunk",index:0,id:ju()})),response_metadata:{...e?.responseMetadata,model_provider:"ollama"},usage_metadata:e?.usageMetadata})}function HpI(t){let e=t.match(/^data:.*?;base64,(.*)$/);return e?e[1]:""}function a_n(t){if(typeof t.content=="string"){if(t.tool_calls?.length){let l=t.tool_calls.map(n=>({id:n.id,type:"function",function:{name:n.name,arguments:n.args}}));return[{role:"assistant",content:t.content,tool_calls:l}]}return[{role:"assistant",content:t.content}]}let e=t.content.filter(l=>l.type==="text"&&typeof l.text=="string").map(l=>({role:"assistant",content:l.text})),I;if(t.content.find(l=>l.type==="tool_use")&&t.tool_calls?.length){let l=t.tool_calls?.map(n=>({id:n.id,type:"function",function:{name:n.name,arguments:n.args}}));l&&(I={role:"assistant",tool_calls:l,content:""})}else if(t.content.find(l=>l.type==="tool_use")&&!t.tool_calls?.length)throw new Error("'tool_use' content type is not supported without tool calls.");return[...e,...I?[I]:[]]}function c_n(t){return typeof t.content=="string"?[{role:"user",content:t.content}]:t.content.map(e=>{if(e.type==="text")return{role:"user",content:e.text};if(e.type==="image_url"){if(typeof e.image_url=="string")return{role:"user",content:"",images:[HpI(e.image_url)]};if(e.image_url.url&&typeof e.image_url.url=="string")return{role:"user",content:"",images:[HpI(e.image_url.url)]}}throw new Error(`Unsupported content type: ${e.type}`)})}function r_n(t){if(typeof t.content=="string")return[{role:"system",content:t.content}];if(t.content.every(e=>e.type==="text"&&typeof e.text=="string"))return t.content.map(e=>({role:"system",content:e.text}));throw new Error(`Unsupported content type(s): ${t.content.map(e=>e.type).join(", ")}`)}function s_n(t){if(typeof t.content!="string")throw new Error("Non string tool message content is not supported");return[{role:"tool",content:t.content}]}function fpI(t){return t.flatMap(e=>{if(["human","generic"].includes(e._getType()))return c_n(e);if(e._getType()==="ai")return a_n(e);if(e._getType()==="system")return r_n(e);if(e._getType()==="tool")return s_n(e);throw new Error(`Unsupported message type: ${e._getType()}`)})}var EpI=g(()=>{o();NI();UR()});function o_n(t){return t&&DataView.prototype.isPrototypeOf(t)}function OM(t){if(typeof t!="string"&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||t==="")throw new TypeError('Invalid character in header field name: "'+t+'"');return t.toLowerCase()}function d8e(t){return typeof t!="string"&&(t=String(t)),t}function u8e(t){var e={next:function(){var I=t.shift();return{done:I===void 0,value:I}}};return vb.iterable&&(e[Symbol.iterator]=function(){return e}),e}function Go(t){this.map={},t instanceof Go?t.forEach(function(e,I){this.append(I,e)},this):Array.isArray(t)?t.forEach(function(e){if(e.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function G8e(t){if(!t._noBody){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}}function kpI(t){return new Promise(function(e,I){t.onload=function(){e(t.result)},t.onerror=function(){I(t.error)}})}function i_n(t){var e=new FileReader,I=kpI(e);return e.readAsArrayBuffer(t),I}function G_n(t){var e=new FileReader,I=kpI(e),l=/charset=([A-Za-z0-9_-]+)/.exec(t.type),n=l?l[1]:"utf-8";return e.readAsText(t,n),I}function d_n(t){for(var e=new Uint8Array(t),I=new Array(e.length),l=0;l-1?e:t}function a4(t,e){if(!(this instanceof a4))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');e=e||{};var I=e.body;if(t instanceof a4){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new Go(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,!I&&t._bodyInit!=null&&(I=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",(e.headers||!this.headers)&&(this.headers=new Go(e.headers)),this.method=b_n(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal||function(){if("AbortController"in Di){var a=new AbortController;return a.signal}}(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&I)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(I),(this.method==="GET"||this.method==="HEAD")&&(e.cache==="no-store"||e.cache==="no-cache")){var l=/([?&])_=[^&]*/;if(l.test(this.url))this.url=this.url.replace(l,"$1_="+new Date().getTime());else{var n=/\?/;this.url+=(n.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}function m_n(t){var e=new FormData;return t.trim().split("&").forEach(function(I){if(I){var l=I.split("="),n=l.shift().replace(/\+/g," "),a=l.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(a))}}),e}function Z_n(t){var e=new Go,I=t.replace(/\r?\n[\t ]+/g," ");return I.split("\r").map(function(l){return l.indexOf(` +`)===0?l.substr(1,l.length):l}).forEach(function(l){var n=l.split(":"),a=n.shift().trim();if(a){var c=n.join(":").trim();try{e.append(a,c)}catch(r){console.warn("Response "+r.message)}}}),e}function O2(t,e){if(!(this instanceof O2))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(e||(e={}),this.type="default",this.status=e.status===void 0?200:e.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=e.statusText===void 0?"":""+e.statusText,this.headers=new Go(e.headers),this.url=e.url||"",this._initBody(t)}function jpI(t,e){return new Promise(function(I,l){var n=new a4(t,e);if(n.signal&&n.signal.aborted)return l(new n4("Aborted","AbortError"));var a=new XMLHttpRequest;function c(){a.abort()}a.onload=function(){var i={statusText:a.statusText,headers:Z_n(a.getAllResponseHeaders()||"")};n.url.indexOf("file://")===0&&(a.status<200||a.status>599)?i.status=200:i.status=a.status,i.url="responseURL"in a?a.responseURL:i.headers.get("X-Request-URL");var G="response"in a?a.response:a.responseText;setTimeout(function(){I(new O2(G,i))},0)},a.onerror=function(){setTimeout(function(){l(new TypeError("Network request failed"))},0)},a.ontimeout=function(){setTimeout(function(){l(new TypeError("Network request timed out"))},0)},a.onabort=function(){setTimeout(function(){l(new n4("Aborted","AbortError"))},0)};function r(i){try{return i===""&&Di.location.href?Di.location.href:i}catch{return i}}if(a.open(n.method,r(n.url),!0),n.credentials==="include"?a.withCredentials=!0:n.credentials==="omit"&&(a.withCredentials=!1),"responseType"in a&&(vb.blob?a.responseType="blob":vb.arrayBuffer&&(a.responseType="arraybuffer")),e&&typeof e.headers=="object"&&!(e.headers instanceof Go||Di.Headers&&e.headers instanceof Di.Headers)){var s=[];Object.getOwnPropertyNames(e.headers).forEach(function(i){s.push(OM(i)),a.setRequestHeader(i,d8e(e.headers[i]))}),n.headers.forEach(function(i,G){s.indexOf(G)===-1&&a.setRequestHeader(G,i)})}else n.headers.forEach(function(i,G){a.setRequestHeader(G,i)});n.signal&&(n.signal.addEventListener("abort",c),a.onreadystatechange=function(){a.readyState===4&&n.signal.removeEventListener("abort",c)}),a.send(typeof n._bodyInit>"u"?null:n._bodyInit)})}var Di,vb,JpI,LpI,u_n,p_n,n4,UpI=g(()=>{o();Di=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof global<"u"&&global||{},vb={searchParams:"URLSearchParams"in Di,iterable:"Symbol"in Di&&"iterator"in Symbol,blob:"FileReader"in Di&&"Blob"in Di&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in Di,arrayBuffer:"ArrayBuffer"in Di};vb.arrayBuffer&&(JpI=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],LpI=ArrayBuffer.isView||function(t){return t&&JpI.indexOf(Object.prototype.toString.call(t))>-1});Go.prototype.append=function(t,e){t=OM(t),e=d8e(e);var I=this.map[t];this.map[t]=I?I+", "+e:e};Go.prototype.delete=function(t){delete this.map[OM(t)]};Go.prototype.get=function(t){return t=OM(t),this.has(t)?this.map[t]:null};Go.prototype.has=function(t){return this.map.hasOwnProperty(OM(t))};Go.prototype.set=function(t,e){this.map[OM(t)]=d8e(e)};Go.prototype.forEach=function(t,e){for(var I in this.map)this.map.hasOwnProperty(I)&&t.call(e,this.map[I],I,this)};Go.prototype.keys=function(){var t=[];return this.forEach(function(e,I){t.push(I)}),u8e(t)};Go.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),u8e(t)};Go.prototype.entries=function(){var t=[];return this.forEach(function(e,I){t.push([I,e])}),u8e(t)};vb.iterable&&(Go.prototype[Symbol.iterator]=Go.prototype.entries);u_n=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];a4.prototype.clone=function(){return new a4(this,{body:this._bodyInit})};xpI.call(a4.prototype);xpI.call(O2.prototype);O2.prototype.clone=function(){return new O2(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Go(this.headers),url:this.url})};O2.error=function(){var t=new O2(null,{status:200,statusText:""});return t.ok=!1,t.status=0,t.type="error",t};p_n=[301,302,303,307,308];O2.redirect=function(t,e){if(p_n.indexOf(e)===-1)throw new RangeError("Invalid status code");return new O2(null,{status:e,headers:{location:t}})};n4=Di.DOMException;try{new n4}catch{n4=function(e,I){this.message=e,this.name=I;var l=Error(e);this.stack=l.stack},n4.prototype=Object.create(Error.prototype),n4.prototype.constructor=n4}jpI.polyfill=!0;Di.fetch||(Di.fetch=jpI,Di.Headers=Go,Di.Request=a4,Di.Response=O2)});function V_n(){if(typeof window<"u"&&window.navigator){let t=navigator;return"userAgentData"in t&&t.userAgentData?.platform?`${t.userAgentData.platform.toLowerCase()} Browser/${navigator.userAgent};`:navigator.platform?`${navigator.platform.toLowerCase()} Browser/${navigator.userAgent};`:`unknown Browser/${navigator.userAgent};`}else if(typeof process<"u")return`${process.arch} ${process.platform} Node.js/${process.version}`;return""}function Y_n(t){if(t instanceof Headers){let e={};return t.forEach((I,l)=>{e[l]=I}),e}else return Array.isArray(t)?Object.fromEntries(t):t||{}}var OpI,zpI,h_n,W_n,N_n,b8e,p8e,h8e,W8e,R_n,N8e,m8e,L1,A_n,F_n,X_n,g_n,v_n,Z8e,c4,Fxr,z0e=g(()=>{o();UpI();OpI="11434",zpI=`http://127.0.0.1:${OpI}`,h_n="0.6.3",W_n=Object.defineProperty,N_n=(t,e,I)=>e in t?W_n(t,e,{enumerable:!0,configurable:!0,writable:!0,value:I}):t[e]=I,b8e=(t,e,I)=>(N_n(t,typeof e!="symbol"?e+"":e,I),I),p8e=class t extends Error{constructor(e,I){super(e),this.error=e,this.status_code=I,this.name="ResponseError",Error.captureStackTrace&&Error.captureStackTrace(this,t)}},h8e=class{constructor(e,I,l){b8e(this,"abortController"),b8e(this,"itr"),b8e(this,"doneCallback"),this.abortController=e,this.itr=I,this.doneCallback=l}abort(){this.abortController.abort()}async*[Symbol.asyncIterator](){for await(let e of this.itr){if("error"in e)throw new Error(e.error);if(yield e,e.done||e.status==="success"){this.doneCallback();return}}throw new Error("Did not receive done or success response in stream.")}},W8e=async t=>{if(t.ok)return;let e=`Error ${t.status}: ${t.statusText}`,I=null;if(t.headers.get("content-type")?.includes("application/json"))try{I=await t.json(),e=I.error||e}catch{console.log("Failed to parse error response as JSON")}else try{console.log("Getting text from response"),e=await t.text()||e}catch{console.log("Failed to get text from error response")}throw new p8e(e,t.status)};R_n=(t,e)=>t[e],N8e=async(t,e,I={})=>{let l={"Content-Type":"application/json",Accept:"application/json","User-Agent":`ollama-js/${h_n} (${V_n()})`};I.headers=Y_n(I.headers);try{let a=new URL(e);if(a.protocol==="https:"&&a.hostname==="ollama.com"){let c=typeof process=="object"&&process!==null&&typeof process.env=="object"&&process.env!==null?R_n(process.env,"OLLAMA_API_KEY"):void 0;!(I.headers.authorization||I.headers.Authorization)&&c&&(I.headers.Authorization=`Bearer ${c}`)}}catch(a){console.error("error parsing url",a)}let n=Object.fromEntries(Object.entries(I.headers).filter(([a])=>!Object.keys(l).some(c=>c.toLowerCase()===a.toLowerCase())));return I.headers={...l,...n},t(e,I)},m8e=async(t,e,I)=>{let l=await N8e(t,e,{headers:I?.headers});return await W8e(l),l},L1=async(t,e,I,l)=>{let a=(r=>r!==null&&typeof r=="object"&&!Array.isArray(r))(I)?JSON.stringify(I):I,c=await N8e(t,e,{method:"POST",body:a,signal:l?.signal,headers:l?.headers});return await W8e(c),c},A_n=async(t,e,I,l)=>{let n=await N8e(t,e,{method:"DELETE",body:JSON.stringify(I),headers:l?.headers});return await W8e(n),n},F_n=async function*(t){let e=new TextDecoder("utf-8"),I="",l=t.getReader();for(;;){let{done:n,value:a}=await l.read();if(n)break;I+=e.decode(a,{stream:!0});let c=I.split(` +`);I=c.pop()??"";for(let r of c)try{yield JSON.parse(r)}catch{console.warn("invalid json: ",r)}}I+=e.decode();for(let n of I.split(` +`).filter(a=>a!==""))try{yield JSON.parse(n)}catch{console.warn("invalid json: ",n)}},X_n=t=>{if(!t)return zpI;let e=t.includes("://");t.startsWith(":")&&(t=`http://127.0.0.1${t}`,e=!0),e||(t=`http://${t}`);let I=new URL(t),l=I.port;l||(e?l=I.protocol==="https:"?"443":"80":l=OpI);let n="";I.username&&(n=I.username,I.password&&(n+=`:${I.password}`),n+="@");let a=`${I.protocol}//${n}${I.hostname}:${l}${I.pathname}`;return a.endsWith("/")&&(a=a.slice(0,-1)),a},g_n=Object.defineProperty,v_n=(t,e,I)=>e in t?g_n(t,e,{enumerable:!0,configurable:!0,writable:!0,value:I}):t[e]=I,Z8e=(t,e,I)=>(v_n(t,typeof e!="symbol"?e+"":e,I),I),c4=class{constructor(e){Z8e(this,"config"),Z8e(this,"fetch"),Z8e(this,"ongoingStreamedRequests",[]),this.config={host:"",headers:e?.headers},e?.proxy||(this.config.host=X_n(e?.host??zpI)),this.fetch=e?.fetch??fetch}abort(){for(let e of this.ongoingStreamedRequests)e.abort();this.ongoingStreamedRequests.length=0}async processStreamableRequest(e,I){I.stream=I.stream??!1;let l=`${this.config.host}/api/${e}`;if(I.stream){let a=new AbortController,c=await L1(this.fetch,l,I,{signal:a.signal,headers:this.config.headers});if(!c.body)throw new Error("Missing body");let r=F_n(c.body),s=new h8e(a,r,()=>{let i=this.ongoingStreamedRequests.indexOf(s);i>-1&&this.ongoingStreamedRequests.splice(i,1)});return this.ongoingStreamedRequests.push(s),s}return await(await L1(this.fetch,l,I,{headers:this.config.headers})).json()}async encodeImage(e){if(typeof e!="string"){let I=new Uint8Array(e),l="",n=I.byteLength;for(let a=0;a{o();EpI();NI();l0();z0e();Yo();uF();Lb();ca();Wa();aG();wp();tQ();BpI=class extends yr{static lc_name(){return"ChatOllama"}model="llama3";numa;numCtx;numBatch;numGpu;mainGpu;lowVram;f16Kv;logitsAll;vocabOnly;useMmap;useMlock;embeddingOnly;numThread;numKeep;seed;numPredict;topK;topP;tfsZ;typicalP;repeatLastN;temperature;repeatPenalty;presencePenalty;frequencyPenalty;mirostat;mirostatTau;mirostatEta;penalizeNewline;streaming;format;keepAlive;client;checkOrPullModel=!1;baseUrl="http://127.0.0.1:11434";think;constructor(t,e){let I=typeof t=="string"?{...e??{},model:t}:t??{};super(I),this._addVersion("@langchain/ollama","1.2.7"),this.baseUrl=I.baseUrl??gt("OLLAMA_BASE_URL")??this.baseUrl,this.client=new c4({fetch:I.fetch,host:this.baseUrl,headers:I.headers}),this.model=I.model??this.model,this.numa=I.numa,this.numCtx=I.numCtx,this.numBatch=I.numBatch,this.numGpu=I.numGpu,this.mainGpu=I.mainGpu,this.lowVram=I.lowVram,this.f16Kv=I.f16Kv,this.logitsAll=I.logitsAll,this.vocabOnly=I.vocabOnly,this.useMmap=I.useMmap,this.useMlock=I.useMlock,this.embeddingOnly=I.embeddingOnly,this.numThread=I.numThread,this.numKeep=I.numKeep,this.seed=I.seed,this.numPredict=I.numPredict,this.topK=I.topK,this.topP=I.topP,this.tfsZ=I.tfsZ,this.typicalP=I.typicalP,this.repeatLastN=I.repeatLastN,this.temperature=I.temperature,this.repeatPenalty=I.repeatPenalty,this.presencePenalty=I.presencePenalty,this.frequencyPenalty=I.frequencyPenalty,this.mirostat=I.mirostat,this.mirostatTau=I.mirostatTau,this.mirostatEta=I.mirostatEta,this.penalizeNewline=I.penalizeNewline,this.streaming=I.streaming,this.format=I.format,this.keepAlive=I.keepAlive,this.think=I.think,this.checkOrPullModel=I.checkOrPullModel??this.checkOrPullModel}_llmType(){return"ollama"}async pull(t,e){let{stream:I,insecure:l,logProgress:n}={stream:!0,...e};if(I)for await(let a of await this.client.pull({model:t,insecure:l,stream:I}))n&&console.log(a);else{let a=await this.client.pull({model:t,insecure:l});n&&console.log(a)}}bindTools(t,e){return this.withConfig({tools:t.map(I=>aQ(I)),...e})}getLsParams(t){let e=this.invocationParams(t);return{ls_provider:"ollama",ls_model_name:this.model,ls_model_type:"chat",ls_temperature:e.options?.temperature??void 0,ls_max_tokens:e.options?.num_predict??void 0,ls_stop:t.stop}}invocationParams(t){return{model:this.model,format:t?.format??this.format,keep_alive:this.keepAlive,think:this.think,options:{numa:this.numa,num_ctx:this.numCtx,num_batch:this.numBatch,num_gpu:this.numGpu,main_gpu:this.mainGpu,low_vram:this.lowVram,f16_kv:this.f16Kv,logits_all:this.logitsAll,vocab_only:this.vocabOnly,use_mmap:this.useMmap,use_mlock:this.useMlock,embedding_only:this.embeddingOnly,num_thread:this.numThread,num_keep:this.numKeep,seed:this.seed,num_predict:this.numPredict,top_k:this.topK,top_p:this.topP,tfs_z:this.tfsZ,typical_p:this.typicalP,repeat_last_n:this.repeatLastN,temperature:this.temperature,repeat_penalty:this.repeatPenalty,presence_penalty:this.presencePenalty,frequency_penalty:this.frequencyPenalty,mirostat:this.mirostat,mirostat_tau:this.mirostatTau,mirostat_eta:this.mirostatEta,penalize_newline:this.penalizeNewline,stop:t?.stop},tools:t?.tools?.length?t.tools.map(e=>aQ(e)):void 0}}async checkModelExistsOnMachine(t){let{models:e}=await this.client.list();return!!e.find(I=>I.name===t||I.name===`${t}:latest`)}async _generate(t,e,I){e.signal?.throwIfAborted(),this.checkOrPullModel&&(await this.checkModelExistsOnMachine(this.model)||await this.pull(this.model,{logProgress:!0}));let l;for await(let a of this._streamResponseChunks(t,e,I))l?l=Su(l,a.message):l=a.message;let n=new He({id:l?.id,content:l?.content??"",additional_kwargs:l?.additional_kwargs,tool_calls:l?.tool_calls,response_metadata:l?.response_metadata,usage_metadata:l?.usage_metadata});return{generations:[{text:typeof n.content=="string"?n.content:"",message:n}]}}async*_streamResponseChunks(t,e,I){this.checkOrPullModel&&(await this.checkModelExistsOnMachine(this.model)||await this.pull(this.model,{logProgress:!0}));let l=this.invocationParams(e),n=fpI(t),a={input_tokens:0,output_tokens:0,total_tokens:0},c=await this.client.chat({...l,messages:n,stream:!0}),r;for await(let s of c){if(e.signal?.aborted){this.client.abort();return}let{message:i,...G}=s;a.input_tokens+=G.prompt_eval_count??0,a.output_tokens+=G.eval_count??0,a.total_tokens=a.input_tokens+a.output_tokens,r=G;let d=this.think?i.thinking??i.content??"":i.content??"",u=new Nc({text:d,message:QpI(i)});yield u,await I?.handleLLMNewToken(d,void 0,void 0,void 0,void 0,{chunk:u})}yield new Nc({text:"",message:new eI({content:"",response_metadata:{...r,model_provider:"ollama"},usage_metadata:a})})}withStructuredOutput(t,e){let I,l,{schema:n,name:a,includeRaw:c}={...e,schema:t},r=e?.method??"jsonSchema";if(r==="functionCalling"){let s=a??"extract",i,G=DI(n);Vl(n)||jn(n)?i={name:s,description:G.description,parameters:G}:typeof n.name=="string"&&typeof n.parameters=="object"&&n.parameters!=null?(i=n,s=n.name):i={name:s,description:n.description??"",parameters:n},I=this.bindTools([{type:"function",function:i}]).withConfig({ls_structured_output_format:{kwargs:{method:r},schema:Vl(n)||jn(n)?G:n}}),l=I0(n,s)}else if(r==="jsonMode"||r==="jsonSchema"){l=Ep(n);let s=DI(n);I=this.withConfig({format:r==="jsonMode"?"json":s,ls_structured_output_format:{kwargs:{method:r},schema:s}})}else throw new TypeError(`Unrecognized structured output method '${r}'. Expected one of 'functionCalling', 'jsonMode', or 'jsonSchema'`);return oZ(I,l,c,c?"StructuredOutputRunnable":"ChatOllamaStructuredOutput")}}});var SpI,TpI=g(()=>{o();z0e();ca();hC();SpI=class extends Up{model="mxbai-embed-large";baseUrl="http://localhost:11434";dimensions;keepAlive;requestOptions;client;truncate=!1;constructor(t){super({maxConcurrency:1,...t}),this.baseUrl=t?.baseUrl??gt("OLLAMA_BASE_URL")??this.baseUrl,this.client=new c4({fetch:t?.fetch,host:this.baseUrl,headers:t?.headers?new Headers(t.headers):void 0}),this.model=t?.model??this.model,this.dimensions=t?.dimensions,this.keepAlive=t?.keepAlive,this.truncate=t?.truncate??this.truncate,this.requestOptions=t?.requestOptions?this._convertOptions(t?.requestOptions):void 0}_convertOptions(t){let e={},I={embeddingOnly:"embedding_only",frequencyPenalty:"frequency_penalty",keepAlive:"keep_alive",logitsAll:"logits_all",lowVram:"low_vram",mainGpu:"main_gpu",mirostat:"mirostat",mirostatEta:"mirostat_eta",mirostatTau:"mirostat_tau",numBatch:"num_batch",numCtx:"num_ctx",numGpu:"num_gpu",numKeep:"num_keep",numPredict:"num_predict",numThread:"num_thread",penalizeNewline:"penalize_newline",presencePenalty:"presence_penalty",repeatLastN:"repeat_last_n",repeatPenalty:"repeat_penalty",temperature:"temperature",stop:"stop",tfsZ:"tfs_z",topK:"top_k",topP:"top_p",typicalP:"typical_p",useMlock:"use_mlock",useMmap:"use_mmap",vocabOnly:"vocab_only",f16Kv:"f16_kv",numa:"numa",seed:"seed"};for(let[l,n]of Object.entries(t)){let a=I[l];a?e[a]=n:e[l]=n}return e}async embedDocuments(t){return this.embeddingWithRetry(t)}async embedQuery(t){return(await this.embeddingWithRetry([t]))[0]}async embeddingWithRetry(t){return(await this.caller.call(()=>this.client.embed({model:this.model,input:t,dimensions:this.dimensions,keep_alive:this.keepAlive,options:this.requestOptions,truncate:this.truncate}))).embeddings}}});var _pI,KpI=g(()=>{o();z0e();Yo();ca();WC();_pI=class extends dF{static lc_name(){return"Ollama"}lc_serializable=!0;model="llama3";baseUrl="http://localhost:11434";think;keepAlive;embeddingOnly;f16KV;frequencyPenalty;logitsAll;lowVram;mainGpu;mirostat;mirostatEta;mirostatTau;numBatch;numCtx;numGpu;numKeep;numPredict;numThread;penalizeNewline;presencePenalty;repeatLastN;repeatPenalty;temperature;stop;tfsZ;topK;topP;typicalP;useMLock;useMMap;vocabOnly;format;client;constructor(t){super(t??{}),this._addVersion("@langchain/ollama","1.2.7"),this.model=t?.model??this.model,this.baseUrl=t?.baseUrl?t?.baseUrl.endsWith("/")?t?.baseUrl.slice(0,-1):t?.baseUrl:gt("OLLAMA_BASE_URL")??this.baseUrl,this.client=new c4({fetch:t?.fetch,host:this.baseUrl,headers:t?.headers}),this.keepAlive=t?.keepAlive,this.think=t?.think,this.embeddingOnly=t?.embeddingOnly,this.f16KV=t?.f16Kv,this.frequencyPenalty=t?.frequencyPenalty,this.logitsAll=t?.logitsAll,this.lowVram=t?.lowVram,this.mainGpu=t?.mainGpu,this.mirostat=t?.mirostat,this.mirostatEta=t?.mirostatEta,this.mirostatTau=t?.mirostatTau,this.numBatch=t?.numBatch,this.numCtx=t?.numCtx,this.numGpu=t?.numGpu,this.numKeep=t?.numKeep,this.numPredict=t?.numPredict,this.numThread=t?.numThread,this.penalizeNewline=t?.penalizeNewline,this.presencePenalty=t?.presencePenalty,this.repeatLastN=t?.repeatLastN,this.repeatPenalty=t?.repeatPenalty,this.temperature=t?.temperature,this.stop=t?.stop,this.tfsZ=t?.tfsZ,this.topK=t?.topK,this.topP=t?.topP,this.typicalP=t?.typicalP,this.useMLock=t?.useMlock,this.useMMap=t?.useMmap,this.vocabOnly=t?.vocabOnly,this.format=t?.format}_llmType(){return"ollama"}invocationParams(t){return{model:this.model,format:this.format,keep_alive:this.keepAlive,think:this.think,images:t?.images,options:{embedding_only:this.embeddingOnly,f16_kv:this.f16KV,frequency_penalty:this.frequencyPenalty,logits_all:this.logitsAll,low_vram:this.lowVram,main_gpu:this.mainGpu,mirostat:this.mirostat,mirostat_eta:this.mirostatEta,mirostat_tau:this.mirostatTau,num_batch:this.numBatch,num_ctx:this.numCtx,num_gpu:this.numGpu,num_keep:this.numKeep,num_predict:this.numPredict,num_thread:this.numThread,penalize_newline:this.penalizeNewline,presence_penalty:this.presencePenalty,repeat_last_n:this.repeatLastN,repeat_penalty:this.repeatPenalty,temperature:this.temperature,stop:t?.stop??this.stop,tfs_z:this.tfsZ,top_k:this.topK,top_p:this.topP,typical_p:this.typicalP,use_mlock:this.useMLock,use_mmap:this.useMMap,vocab_only:this.vocabOnly}}}async*_streamResponseChunks(t,e,I){let l=await this.caller.call(async()=>this.client.generate({...this.invocationParams(e),prompt:t,stream:!0}));for await(let n of l){if(e.signal?.aborted)throw new Error("This operation was aborted");if(n.done)yield new Pr({text:"",generationInfo:{model:n.model,total_duration:n.total_duration,load_duration:n.load_duration,prompt_eval_count:n.prompt_eval_count,prompt_eval_duration:n.prompt_eval_duration,eval_count:n.eval_count,eval_duration:n.eval_duration}});else{let a=this.think||this.think===void 0?n.thinking??n.response??"":n.response??"";yield new Pr({text:a,generationInfo:{...n,response:void 0}}),await I?.handleLLMNewToken(a)}}}async _call(t,e,I){let l=[];for await(let n of this._streamResponseChunks(t,e,I))l.push(n.text);return l.join("")}}});var DpI={};tr(DpI,{ChatOllama:()=>BpI,Ollama:()=>_pI,OllamaEmbeddings:()=>SpI});var qpI=g(()=>{o();MpI();TpI();KpI()});function eH(t){if(typeof t=="object"&&t!==null){let e={...t};"additionalProperties"in e&&delete e.additionalProperties,"$schema"in e&&delete e.$schema,"strict"in e&&delete e.strict;for(let I in e)I in e&&(Array.isArray(e[I])?e[I]=e[I].map(eH):typeof e[I]=="object"&&e[I]!==null&&(e[I]=eH(e[I])));return e}return t}function Hte(t){let{$schema:e,...I}=eH(Vl(t)||jn(t)?DI(t):t);return I}function thI(t){let{$schema:e,...I}=eH(t);return I}var B0e=g(()=>{o();Wa();aG();wp()});function o4(t,e,I=[]){if(t==null||typeof t!="object")return;let l=t;if(Array.isArray(l.enum)&&l.enum.some(n=>n==="")){let n=I.length?` at path "${I.join(".")}"`:"",a=e?` in tool "${e}"`:"";throw new Error(`Invalid enum: empty string not allowed${a}${n}. Gemini API rejects empty strings in enums.`)}if(l.type==="object"&&l.properties&&typeof l.properties=="object")for(let[n,a]of Object.entries(l.properties))o4(a,e,[...I,n]);l.items&&o4(l.items,e,[...I,"[]"]);for(let n of["anyOf","oneOf","allOf"]){let a=l[n];Array.isArray(a)&&a.forEach((c,r)=>o4(c,e,[...I,`${n}[${r}]`]))}l.additionalProperties&&typeof l.additionalProperties=="object"&&o4(l.additionalProperties,e,[...I,"additionalProperties"])}var IhI=g(()=>{o()});function f_n(t){return Bs.isInstance(t)?t.role:t.type}function E_n(t){switch(t){case"supervisor":case"ai":case"model":return"model";case"system":return"system";case"human":return"user";case"tool":case"function":return"function";default:throw new Error(`Unknown / unsupported author: ${t}`)}}function J_n(t){if("mimeType"in t&&"data"in t)return{inlineData:{mimeType:t.mimeType,data:t.data}};if("mimeType"in t&&"fileUri"in t)return{fileData:{mimeType:t.mimeType,fileUri:t.fileUri}};throw new Error("Invalid media content")}function C_n(t,e){return e.map(I=>jR(I)?I.tool_calls??[]:[]).flat().find(I=>I.id===t.tool_call_id)?.name}function Qte(t,e){if("data"in t&&t.data!==void 0){let I=t.data instanceof Uint8Array?btoa(String.fromCharCode(...t.data)):t.data;return{inlineData:{mimeType:t.mimeType||e,data:I}}}if("url"in t&&t.url!==void 0){let I=ui({dataUrl:t.url});return I?{inlineData:{mimeType:I.mime_type,data:I.data}}:{fileData:{mimeType:t.mimeType||e,fileUri:t.url}}}throw"fileId"in t&&t.fileId!==void 0?new Error("ContentBlock.Multimodal fileId is not supported by Google Generative AI. Use a URL or base64 data instead."):new Error(`Invalid multimodal content block: must have "data", "url", or "fileId" property. Received: ${JSON.stringify(t)}`)}function L_n(t){return{providerName:"Google Gemini",fromStandardTextBlock(e){return{text:e.text}},fromStandardImageBlock(e){if(!t)throw new Error("This model does not support images");if(e.source_type==="url"){let I=ui({dataUrl:e.url});return I?{inlineData:{mimeType:I.mime_type,data:I.data}}:{fileData:{mimeType:e.mime_type??"",fileUri:e.url}}}if(e.source_type==="base64")return{inlineData:{mimeType:e.mime_type??"",data:e.data}};throw new Error(`Unsupported source type: ${e.source_type}`)},fromStandardAudioBlock(e){if(!t)throw new Error("This model does not support audio");if(e.source_type==="url"){let I=ui({dataUrl:e.url});return I?{inlineData:{mimeType:I.mime_type,data:I.data}}:{fileData:{mimeType:e.mime_type??"",fileUri:e.url}}}if(e.source_type==="base64")return{inlineData:{mimeType:e.mime_type??"",data:e.data}};throw new Error(`Unsupported source type: ${e.source_type}`)},fromStandardFileBlock(e){if(!t)throw new Error("This model does not support files");if(e.source_type==="text")return{text:e.text};if(e.source_type==="url"){let I=ui({dataUrl:e.url});return I?{inlineData:{mimeType:I.mime_type,data:I.data}}:{fileData:{mimeType:e.mime_type??"",fileUri:e.url}}}if(e.source_type==="base64")return{inlineData:{mimeType:e.mime_type??"",data:e.data}};throw new Error(`Unsupported source type: ${e.source_type}`)}}}function lhI(t,e){if(ho(t))return QA(t,L_n(e));if(t.type==="text")return{text:t.text};if(t.type==="executableCode")return{executableCode:t.executableCode};if(t.type==="codeExecutionResult")return{codeExecutionResult:t.codeExecutionResult};if(t.type==="image_url"){if(!e)throw new Error("This model does not support images");let I;if(typeof t.image_url=="string")I=t.image_url;else if(typeof t.image_url=="object"&&"url"in t.image_url)I=t.image_url.url;else throw new Error("Please provide image as base64 encoded data URL");let[l,n]=I.split(",");if(!l.startsWith("data:"))throw new Error("Please provide image as base64 encoded data URL");let[a,c]=l.replace(/^data:/,"").split(";");if(c!=="base64")throw new Error("Please provide image as base64 encoded data URL");return{inlineData:{data:n,mimeType:a}}}else{if(t.type==="media")return J_n(t);if(t.type==="image")return Qte(t,"image/png");if(t.type==="video")return Qte(t,"video/mp4");if(t.type==="audio")return Qte(t,"audio/mpeg");if(t.type==="file")return Qte(t,"application/octet-stream");if(t.type==="text-plain")return"text"in t&&typeof t.text=="string"?{text:t.text}:Qte(t,"text/plain");if(t.type==="tool_use")return{functionCall:{name:t.name,args:t.input}};if(t.type==="tool_call")return{functionCall:{name:t.name,args:t.args}};if(t.type?.includes("/")&&t.type.split("/").length===2&&"data"in t&&typeof t.data=="string")return{inlineData:{mimeType:t.type,data:t.data}};if(t.type==="thinking"){let I=t;return{text:I.thinking,thought:!0,...I.signature?{thoughtSignature:I.signature}:{}}}else{if("functionCall"in t)return;throw"type"in t?new Error(`Unknown content type ${t.type}`):new Error(`Unknown content ${JSON.stringify(t)}`)}}}function k_n(t,e,I,l){if(cJ(t)){let r=t.name??C_n(t,I);if(r===void 0)throw new Error(`Google requires a tool name for each tool call response, and we could not infer a called tool name for ToolMessage "${t.id}" from your passed messages. Please populate a "name" field on that ToolMessage explicitly.`);let s=Array.isArray(t.content)?t.content.map(i=>lhI(i,e)).filter(i=>i!==void 0):t.content;return t.status==="error"?[{functionResponse:{name:r,response:{error:{details:s}}}}]:[{functionResponse:{name:r,response:{result:s}}}]}let n=[],a=[];typeof t.content=="string"&&t.content&&a.push({text:t.content}),Array.isArray(t.content)&&a.push(...t.content.map(r=>lhI(r,e)).filter(r=>r!==void 0));let c=t.additional_kwargs?.[V8e];return jR(t)&&t.tool_calls?.length&&(n=t.tool_calls.map(r=>{let s=Q_n(()=>{if(r.id){let i=c?.[r.id];if(i)return i}return l?.includes("gemini-3")?H_n:""});return{functionCall:{name:r.name,args:r.args},...s?{thoughtSignature:s}:{}}})),[...a,...n]}function Y8e(t,e,I=!1,l){return t.reduce((n,a,c)=>{if(!ma(a))throw new Error("Unsupported message input");let r=f_n(a);if(r==="system"&&c!==0)throw new Error("System message should be the first one");let s=E_n(r),i=n.content[n.content.length];if(!n.mergeWithPreviousContent&&i&&i.role===s)throw new Error("Google Generative AI requires alternate messages between authors");let G=k_n(a,e,t.slice(0,c),l);if(n.mergeWithPreviousContent){let b=n.content[n.content.length-1];if(!b)throw new Error("There was a problem parsing your system message. Please try a prompt without one.");return b.parts.push(...G),{mergeWithPreviousContent:!1,content:n.content}}let d=s;(d==="function"||d==="system"&&!I)&&(d="user");let u={role:d,parts:G};return{mergeWithPreviousContent:r==="system"&&!I,content:[...n.content,u]}},{content:[],mergeWithPreviousContent:!1}).content}function nhI(t,e){if(!t.candidates||t.candidates.length===0||!t.candidates[0])return{generations:[],llmOutput:{filters:t.promptFeedback}};let[I]=t.candidates,{content:l,...n}=I,a=l?.parts?.reduce((G,d)=>("functionCall"in d&&d.functionCall&&G.push({...d,id:"id"in d.functionCall&&typeof d.functionCall.id=="string"?d.functionCall.id:ju()}),G),[]),c,r=l?.parts;Array.isArray(r)&&r.length===1&&"text"in r[0]&&r[0].text&&!r[0].thought?c=r[0].text:Array.isArray(r)&&r.length>0?c=r.map(G=>G.thought&&"text"in G&&G.text?{type:"thinking",thinking:G.text,...G.thoughtSignature?{signature:G.thoughtSignature}:{}}:"text"in G?{type:"text",text:G.text}:"inlineData"in G?{type:"inlineData",inlineData:G.inlineData}:"functionCall"in G?{type:"functionCall",functionCall:G.functionCall}:"functionResponse"in G?{type:"functionResponse",functionResponse:G.functionResponse}:"fileData"in G?{type:"fileData",fileData:G.fileData}:"executableCode"in G?{type:"executableCode",executableCode:G.executableCode}:"codeExecutionResult"in G?{type:"codeExecutionResult",codeExecutionResult:G.codeExecutionResult}:G):c=[];let s=a?.reduce((G,d)=>("thoughtSignature"in d&&typeof d.thoughtSignature=="string"&&(G[d.id]=d.thoughtSignature),G),{}),i="";return typeof c=="string"?i=c:Array.isArray(c)&&c.length>0&&(i=c.find(G=>"text"in G)?.text??i),{generations:[{text:i,message:new He({content:c??"",tool_calls:a?.map(G=>({type:"tool_call",id:G.id,name:G.functionCall.name,args:G.functionCall.args})),additional_kwargs:{...n,[V8e]:s},usage_metadata:e?.usageMetadata}),generationInfo:n}],llmOutput:{tokenUsage:{promptTokens:e?.usageMetadata?.input_tokens,completionTokens:e?.usageMetadata?.output_tokens,totalTokens:e?.usageMetadata?.total_tokens}}}}function ahI(t,e){if(!t.candidates||t.candidates.length===0)return null;let[I]=t.candidates,{content:l,...n}=I,a=l.parts?.reduce((d,u)=>("functionCall"in u&&u.functionCall&&d.push({...u,id:"id"in u.functionCall&&typeof u.functionCall.id=="string"?u.functionCall.id:ju()}),d),[]),c,r=l?.parts;Array.isArray(r)&&r.every(d=>"text"in d&&!d.thought)?c=r.map(d=>d.text).join(""):Array.isArray(r)?c=r.map(d=>d.thought&&"text"in d&&d.text?{type:"thinking",thinking:d.text,...d.thoughtSignature?{signature:d.thoughtSignature}:{}}:"text"in d?{type:"text",text:d.text}:"inlineData"in d?{type:"inlineData",inlineData:d.inlineData}:"functionCall"in d?{type:"functionCall",functionCall:d.functionCall}:"functionResponse"in d?{type:"functionResponse",functionResponse:d.functionResponse}:"fileData"in d?{type:"fileData",fileData:d.fileData}:"executableCode"in d?{type:"executableCode",executableCode:d.executableCode}:"codeExecutionResult"in d?{type:"codeExecutionResult",codeExecutionResult:d.codeExecutionResult}:d):c=[];let s="";c&&typeof c=="string"?s=c:Array.isArray(c)&&(s=c.find(d=>"text"in d)?.text??"");let i=[];a&&i.push(...a.map(d=>({type:"tool_call_chunk",id:d.id,name:d.functionCall.name,args:JSON.stringify(d.functionCall.args)})));let G=a?.reduce((d,u)=>("thoughtSignature"in u&&typeof u.thoughtSignature=="string"&&(d[u.id]=u.thoughtSignature),d),{});return new Nc({text:s,message:new eI({content:c||"",name:l?l.role:void 0,tool_call_chunks:i,additional_kwargs:{[V8e]:G},response_metadata:{model_provider:"google-genai"},usage_metadata:e.usageMetadata}),generationInfo:n})}function chI(t){return t.every(e=>"functionDeclarations"in e&&Array.isArray(e.functionDeclarations))?t:[{functionDeclarations:t.map(e=>{if(Ws(e)){let I=Hte(e.schema);return I.type==="object"&&"properties"in I&&Object.keys(I.properties).length===0?{name:e.name,description:e.description}:(o4(I,e.name),{name:e.name,description:e.description,parameters:I})}if($R(e)){let I=thI(e.function.parameters);return o4(I,e.function.name),{name:e.function.name,description:e.function.description??"A function available to call.",parameters:I}}return e})}]}function R8e(t,e){let I={input_tokens:t?.promptTokenCount??0,output_tokens:t?.candidatesTokenCount??0,total_tokens:t?.totalTokenCount??0};if(t?.cachedContentTokenCount&&(I.input_token_details??={},I.input_token_details.cache_read=t.cachedContentTokenCount),e==="gemini-3-pro-preview"){let l=Math.max(0,t?.promptTokenCount??-2e5),n=Math.max(0,t?.cachedContentTokenCount??-2e5);l&&(I.input_token_details={...I.input_token_details,over_200k:l}),n&&(I.input_token_details={...I.input_token_details,cache_read_over_200k:n})}return I}var V8e,H_n,Q_n,A8e=g(()=>{o();B0e();IhI();NI();Yo();uF();sZ();UR();V8e="__gemini_function_call_thought_signatures__",H_n="ErYCCrMCAdHtim9kOoOkrPiCNVsmlpMIKd7ZMxgiFbVQOkgp7nlLcDMzVsZwIzvuT7nQROivoXA72ccC2lSDvR0Gh7dkWaGuj7ctv6t7ZceHnecx0QYa+ix8tYpRfjhyWozQ49lWiws6+YGjCt10KRTyWsZ2h6O7iHTYJwKIRwGUHRKy/qK/6kFxJm5ML00gLq4D8s5Z6DBpp2ZlR+uF4G8jJgeWQgyHWVdx2wGYElaceVAc66tZdPQRdOHpWtgYSI1YdaXgVI8KHY3/EfNc2YqqMIulvkDBAnuMhkAjV9xmBa54Tq+ih3Im4+r3DzqhGqYdsSkhS0kZMwte4Hjs65dZzCw9lANxIqYi1DJ639WNPYihp/DCJCos7o+/EeSPJaio5sgWDyUnMGkY1atsJZ+m7pj7DD5tvQ==",Q_n=t=>t()});var rhI,shI=g(()=>{o();Wa();m3();rhI=class extends IF{static lc_name(){return"GoogleGenerativeAIToolsOutputParser"}lc_namespace=["langchain","google_genai","output_parsers"];returnId=!1;keyName;returnSingle=!1;zodSchema;serializableSchema;constructor(t){super(t),this.keyName=t.keyName,this.returnSingle=t.returnSingle??this.returnSingle,this.zodSchema=t.zodSchema,this.serializableSchema=t.serializableSchema}async _validateResult(t){if(this.serializableSchema!==void 0){let I=await this.serializableSchema["~standard"].validate(t);if(I.issues)throw new or(`Failed to parse. Text: "${JSON.stringify(t,null,2)}". Error: ${JSON.stringify(I.issues)}`,JSON.stringify(t,null,2));return I.value}if(this.zodSchema===void 0)return t;let e=await BA(this.zodSchema,t);if(e.success)return e.data;throw new or(`Failed to parse. Text: "${JSON.stringify(t,null,2)}". Error: ${JSON.stringify(e.error.issues)}`,JSON.stringify(t,null,2))}async parseResult(t){let e=t.flatMap(l=>{let{message:n}=l;return!("tool_calls"in n)||!Array.isArray(n.tool_calls)?[]:n.tool_calls});if(e[0]===void 0)throw new Error("No parseable tool calls provided to GoogleGenerativeAIToolsOutputParser.");let[I]=e;return await this._validateResult(I.args)}}});function z_n(t){let e=[];return t?.apiClient&&e.push(t.apiClient),e.push(`${O_n}/${U_n}`),e.join(" ")}async function B_n(t){var e;let I=new Headers;I.append("Content-Type","application/json"),I.append("x-goog-api-client",z_n(t.requestOptions)),I.append("x-goog-api-key",t.apiKey);let l=(e=t.requestOptions)===null||e===void 0?void 0:e.customHeaders;if(l){if(!(l instanceof Headers))try{l=new Headers(l)}catch(n){throw new z2(`unable to convert customHeaders value ${JSON.stringify(l)} to Headers: ${n.message}`)}for(let[n,a]of l.entries()){if(n==="x-goog-api-key")throw new z2(`Cannot set reserved header name ${n}`);if(n==="x-goog-api-client")throw new z2(`Header name ${n} can only be set using the apiClient field`);I.append(n,a)}}return I}async function M_n(t,e,I,l,n,a){let c=new F8e(t,e,I,l,a);return{url:c.toString(),fetchOptions:Object.assign(Object.assign({},K_n(a)),{method:"POST",headers:await B_n(c),body:n})}}async function Cte(t,e,I,l,n,a={},c=fetch){let{url:r,fetchOptions:s}=await M_n(t,e,I,l,n,a);return S_n(r,s,c)}async function S_n(t,e,I=fetch){let l;try{l=await I(t,e)}catch(n){T_n(n,t)}return l.ok||await __n(l,t),l}function T_n(t,e){let I=t;throw I.name==="AbortError"?(I=new T0e(`Request aborted when fetching ${e.toString()}: ${t.message}`),I.stack=t.stack):t instanceof S0e||t instanceof z2||(I=new ai(`Error fetching from ${e.toString()}: ${t.message}`),I.stack=t.stack),I}async function __n(t,e){let I="",l;try{let n=await t.json();I=n.error.message,n.error.details&&(I+=` ${JSON.stringify(n.error.details)}`,l=n.error.details)}catch{}throw new S0e(`Error fetching from ${e.toString()}: [${t.status} ${t.statusText}] ${I}`,t.status,t.statusText,l)}function K_n(t){let e={};if(t?.signal!==void 0||t?.timeout>=0){let I=new AbortController;t?.timeout>=0&&setTimeout(()=>I.abort(),t.timeout),t?.signal&&t.signal.addEventListener("abort",()=>{I.abort()}),e.signal=I.signal}return e}function g8e(t){return t.text=()=>{if(t.candidates&&t.candidates.length>0){if(t.candidates.length>1&&console.warn(`This response had ${t.candidates.length} candidates. Returning text from the first candidate only. Access response.candidates directly to use the other candidates.`),M0e(t.candidates[0]))throw new k1(`${x1(t)}`,t);return D_n(t)}else if(t.promptFeedback)throw new k1(`Text not available. ${x1(t)}`,t);return""},t.functionCall=()=>{if(t.candidates&&t.candidates.length>0){if(t.candidates.length>1&&console.warn(`This response had ${t.candidates.length} candidates. Returning function calls from the first candidate only. Access response.candidates directly to use the other candidates.`),M0e(t.candidates[0]))throw new k1(`${x1(t)}`,t);return console.warn("response.functionCall() is deprecated. Use response.functionCalls() instead."),WhI(t)[0]}else if(t.promptFeedback)throw new k1(`Function call not available. ${x1(t)}`,t)},t.functionCalls=()=>{if(t.candidates&&t.candidates.length>0){if(t.candidates.length>1&&console.warn(`This response had ${t.candidates.length} candidates. Returning function calls from the first candidate only. Access response.candidates directly to use the other candidates.`),M0e(t.candidates[0]))throw new k1(`${x1(t)}`,t);return WhI(t)}else if(t.promptFeedback)throw new k1(`Function call not available. ${x1(t)}`,t)},t}function D_n(t){var e,I,l,n;let a=[];if(!((I=(e=t.candidates)===null||e===void 0?void 0:e[0].content)===null||I===void 0)&&I.parts)for(let c of(n=(l=t.candidates)===null||l===void 0?void 0:l[0].content)===null||n===void 0?void 0:n.parts)c.text&&a.push(c.text),c.executableCode&&a.push("\n```"+c.executableCode.language+` +`+c.executableCode.code+"\n```\n"),c.codeExecutionResult&&a.push("\n```\n"+c.codeExecutionResult.output+"\n```\n");return a.length>0?a.join(""):""}function WhI(t){var e,I,l,n;let a=[];if(!((I=(e=t.candidates)===null||e===void 0?void 0:e[0].content)===null||I===void 0)&&I.parts)for(let c of(n=(l=t.candidates)===null||l===void 0?void 0:l[0].content)===null||n===void 0?void 0:n.parts)c.functionCall&&a.push(c.functionCall);if(a.length>0)return a}function M0e(t){return!!t.finishReason&&q_n.includes(t.finishReason)}function x1(t){var e,I,l;let n="";if((!t.candidates||t.candidates.length===0)&&t.promptFeedback)n+="Response was blocked",!((e=t.promptFeedback)===null||e===void 0)&&e.blockReason&&(n+=` due to ${t.promptFeedback.blockReason}`),!((I=t.promptFeedback)===null||I===void 0)&&I.blockReasonMessage&&(n+=`: ${t.promptFeedback.blockReasonMessage}`);else if(!((l=t.candidates)===null||l===void 0)&&l[0]){let a=t.candidates[0];M0e(a)&&(n+=`Candidate was blocked due to ${a.finishReason}`,a.finishMessage&&(n+=`: ${a.finishMessage}`))}return n}function Ete(t){return this instanceof Ete?(this.v=t,this):new Ete(t)}function P_n(t,e,I){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var l=I.apply(t,e||[]),n,a=[];return n={},c("next"),c("throw"),c("return"),n[Symbol.asyncIterator]=function(){return this},n;function c(u){l[u]&&(n[u]=function(b){return new Promise(function(Z,p){a.push([u,b,Z,p])>1||r(u,b)})})}function r(u,b){try{s(l[u](b))}catch(Z){d(a[0][3],Z)}}function s(u){u.value instanceof Ete?Promise.resolve(u.value.v).then(i,G):d(a[0][2],u)}function i(u){r("next",u)}function G(u){r("throw",u)}function d(u,b){u(b),a.shift(),a.length&&r(a[0][0],a[0][1])}}function $_n(t){let e=t.body.pipeThrough(new TextDecoderStream("utf8",{fatal:!0})),I=IKn(e),[l,n]=I.tee();return{stream:tKn(l),response:eKn(n)}}async function eKn(t){let e=[],I=t.getReader();for(;;){let{done:l,value:n}=await I.read();if(l)return g8e(lKn(e));e.push(n)}}function tKn(t){return P_n(this,arguments,function*(){let I=t.getReader();for(;;){let{value:l,done:n}=yield Ete(I.read());if(n)break;yield yield Ete(g8e(l))}})}function IKn(t){let e=t.getReader();return new ReadableStream({start(l){let n="";return a();function a(){return e.read().then(({value:c,done:r})=>{if(r){if(n.trim()){l.error(new ai("Failed to parse stream"));return}l.close();return}n+=c;let s=n.match(NhI),i;for(;s;){try{i=JSON.parse(s[1])}catch{l.error(new ai(`Error parsing JSON response: "${s[1]}"`));return}l.enqueue(i),n=n.substring(s[0].length),s=n.match(NhI)}return a()}).catch(c=>{let r=c;throw r.stack=c.stack,r.name==="AbortError"?r=new T0e("Request aborted when reading from the stream"):r=new ai("Error reading from the stream"),r})}}})}function lKn(t){let e=t[t.length-1],I={promptFeedback:e?.promptFeedback};for(let l of t){if(l.candidates){let n=0;for(let a of l.candidates)if(I.candidates||(I.candidates=[]),I.candidates[n]||(I.candidates[n]={index:n}),I.candidates[n].citationMetadata=a.citationMetadata,I.candidates[n].groundingMetadata=a.groundingMetadata,I.candidates[n].finishReason=a.finishReason,I.candidates[n].finishMessage=a.finishMessage,I.candidates[n].safetyRatings=a.safetyRatings,a.content&&a.content.parts){I.candidates[n].content||(I.candidates[n].content={role:a.content.role||"user",parts:[]});let c={};for(let r of a.content.parts)r.text&&(c.text=r.text),r.functionCall&&(c.functionCall=r.functionCall),r.executableCode&&(c.executableCode=r.executableCode),r.codeExecutionResult&&(c.codeExecutionResult=r.codeExecutionResult),Object.keys(c).length===0&&(c.text=""),I.candidates[n].content.parts.push(c)}n++}l.usageMetadata&&(I.usageMetadata=l.usageMetadata)}return I}async function FhI(t,e,I,l){let n=await Cte(e,G4.STREAM_GENERATE_CONTENT,t,!0,JSON.stringify(I),l);return $_n(n)}async function XhI(t,e,I,l){let a=await(await Cte(e,G4.GENERATE_CONTENT,t,!1,JSON.stringify(I),l)).json();return{response:g8e(a)}}function ghI(t){if(t!=null){if(typeof t=="string")return{role:"system",parts:[{text:t}]};if(t.text)return{role:"system",parts:[t]};if(t.parts)return t.role?t:{role:"system",parts:t.parts}}}function Jte(t){let e=[];if(typeof t=="string")e=[{text:t}];else for(let I of t)typeof I=="string"?e.push({text:I}):e.push(I);return nKn(e)}function nKn(t){let e={role:"user",parts:[]},I={role:"function",parts:[]},l=!1,n=!1;for(let a of t)"functionResponse"in a?(I.parts.push(a),n=!0):(e.parts.push(a),l=!0);if(l&&n)throw new ai("Within a single message, FunctionResponse cannot be mixed with other type of part in the request for sending chat message.");if(!l&&!n)throw new ai("No content is provided for sending chat message.");return l?e:I}function aKn(t,e){var I;let l={model:e?.model,generationConfig:e?.generationConfig,safetySettings:e?.safetySettings,tools:e?.tools,toolConfig:e?.toolConfig,systemInstruction:e?.systemInstruction,cachedContent:(I=e?.cachedContent)===null||I===void 0?void 0:I.name,contents:[]},n=t.generateContentRequest!=null;if(t.contents){if(n)throw new z2("CountTokensRequest must have one of contents or generateContentRequest, not both.");l.contents=t.contents}else if(n)l=Object.assign(Object.assign({},l),t.generateContentRequest);else{let a=Jte(t);l.contents=[a]}return{generateContentRequest:l}}function VhI(t){let e;return t.contents?e=t:e={contents:[Jte(t)]},t.systemInstruction&&(e.systemInstruction=ghI(t.systemInstruction)),e}function cKn(t){return typeof t=="string"||Array.isArray(t)?{content:Jte(t)}:t}function sKn(t){let e=!1;for(let I of t){let{role:l,parts:n}=I;if(!e&&l!=="user")throw new ai(`First content should be with role 'user', got ${l}`);if(!dhI.includes(l))throw new ai(`Each item should include role field. Got ${l} but valid roles are: ${JSON.stringify(dhI)}`);if(!Array.isArray(n))throw new ai("Content should have 'parts' property with an array of Parts");if(n.length===0)throw new ai("Each Content should have at least one part");let a={text:0,inlineData:0,functionCall:0,functionResponse:0,fileData:0,executableCode:0,codeExecutionResult:0};for(let r of n)for(let s of YhI)s in r&&(a[s]+=1);let c=rKn[l];for(let r of YhI)if(!c.includes(r)&&a[r]>0)throw new ai(`Content with role '${l}' can't contain '${r}' part`);e=!0}}function RhI(t){var e;if(t.candidates===void 0||t.candidates.length===0)return!1;let I=(e=t.candidates[0])===null||e===void 0?void 0:e.content;if(I===void 0||I.parts===void 0||I.parts.length===0)return!1;for(let l of I.parts)if(l===void 0||Object.keys(l).length===0||l.text!==void 0&&l.text==="")return!1;return!0}async function oKn(t,e,I,l){return(await Cte(e,G4.COUNT_TOKENS,t,!1,JSON.stringify(I),l)).json()}async function iKn(t,e,I,l){return(await Cte(e,G4.EMBED_CONTENT,t,!1,JSON.stringify(I),l)).json()}async function GKn(t,e,I,l){let n=I.requests.map(c=>Object.assign(Object.assign({},c),{model:e}));return(await Cte(e,G4.BATCH_EMBED_CONTENTS,t,!1,JSON.stringify({requests:n}),l)).json()}var ohI,ihI,GhI,dhI,uhI,bhI,mhI,ZhI,fte,phI,i4,hhI,ai,k1,S0e,z2,T0e,x_n,j_n,U_n,O_n,G4,F8e,q_n,NhI,YhI,rKn,AhI,X8e,_0e,d4,K0e=g(()=>{o();(function(t){t.STRING="string",t.NUMBER="number",t.INTEGER="integer",t.BOOLEAN="boolean",t.ARRAY="array",t.OBJECT="object"})(ohI||(ohI={}));(function(t){t.LANGUAGE_UNSPECIFIED="language_unspecified",t.PYTHON="python"})(ihI||(ihI={}));(function(t){t.OUTCOME_UNSPECIFIED="outcome_unspecified",t.OUTCOME_OK="outcome_ok",t.OUTCOME_FAILED="outcome_failed",t.OUTCOME_DEADLINE_EXCEEDED="outcome_deadline_exceeded"})(GhI||(GhI={}));dhI=["user","model","function","system"];(function(t){t.HARM_CATEGORY_UNSPECIFIED="HARM_CATEGORY_UNSPECIFIED",t.HARM_CATEGORY_HATE_SPEECH="HARM_CATEGORY_HATE_SPEECH",t.HARM_CATEGORY_SEXUALLY_EXPLICIT="HARM_CATEGORY_SEXUALLY_EXPLICIT",t.HARM_CATEGORY_HARASSMENT="HARM_CATEGORY_HARASSMENT",t.HARM_CATEGORY_DANGEROUS_CONTENT="HARM_CATEGORY_DANGEROUS_CONTENT",t.HARM_CATEGORY_CIVIC_INTEGRITY="HARM_CATEGORY_CIVIC_INTEGRITY"})(uhI||(uhI={}));(function(t){t.HARM_BLOCK_THRESHOLD_UNSPECIFIED="HARM_BLOCK_THRESHOLD_UNSPECIFIED",t.BLOCK_LOW_AND_ABOVE="BLOCK_LOW_AND_ABOVE",t.BLOCK_MEDIUM_AND_ABOVE="BLOCK_MEDIUM_AND_ABOVE",t.BLOCK_ONLY_HIGH="BLOCK_ONLY_HIGH",t.BLOCK_NONE="BLOCK_NONE"})(bhI||(bhI={}));(function(t){t.HARM_PROBABILITY_UNSPECIFIED="HARM_PROBABILITY_UNSPECIFIED",t.NEGLIGIBLE="NEGLIGIBLE",t.LOW="LOW",t.MEDIUM="MEDIUM",t.HIGH="HIGH"})(mhI||(mhI={}));(function(t){t.BLOCKED_REASON_UNSPECIFIED="BLOCKED_REASON_UNSPECIFIED",t.SAFETY="SAFETY",t.OTHER="OTHER"})(ZhI||(ZhI={}));(function(t){t.FINISH_REASON_UNSPECIFIED="FINISH_REASON_UNSPECIFIED",t.STOP="STOP",t.MAX_TOKENS="MAX_TOKENS",t.SAFETY="SAFETY",t.RECITATION="RECITATION",t.LANGUAGE="LANGUAGE",t.BLOCKLIST="BLOCKLIST",t.PROHIBITED_CONTENT="PROHIBITED_CONTENT",t.SPII="SPII",t.MALFORMED_FUNCTION_CALL="MALFORMED_FUNCTION_CALL",t.OTHER="OTHER"})(fte||(fte={}));(function(t){t.TASK_TYPE_UNSPECIFIED="TASK_TYPE_UNSPECIFIED",t.RETRIEVAL_QUERY="RETRIEVAL_QUERY",t.RETRIEVAL_DOCUMENT="RETRIEVAL_DOCUMENT",t.SEMANTIC_SIMILARITY="SEMANTIC_SIMILARITY",t.CLASSIFICATION="CLASSIFICATION",t.CLUSTERING="CLUSTERING"})(phI||(phI={}));(function(t){t.MODE_UNSPECIFIED="MODE_UNSPECIFIED",t.AUTO="AUTO",t.ANY="ANY",t.NONE="NONE"})(i4||(i4={}));(function(t){t.MODE_UNSPECIFIED="MODE_UNSPECIFIED",t.MODE_DYNAMIC="MODE_DYNAMIC"})(hhI||(hhI={}));ai=class extends Error{constructor(e){super(`[GoogleGenerativeAI Error]: ${e}`)}},k1=class extends ai{constructor(e,I){super(e),this.response=I}},S0e=class extends ai{constructor(e,I,l,n){super(e),this.status=I,this.statusText=l,this.errorDetails=n}},z2=class extends ai{},T0e=class extends ai{};x_n="https://generativelanguage.googleapis.com",j_n="v1beta",U_n="0.24.1",O_n="genai-js";(function(t){t.GENERATE_CONTENT="generateContent",t.STREAM_GENERATE_CONTENT="streamGenerateContent",t.COUNT_TOKENS="countTokens",t.EMBED_CONTENT="embedContent",t.BATCH_EMBED_CONTENTS="batchEmbedContents"})(G4||(G4={}));F8e=class{constructor(e,I,l,n,a){this.model=e,this.task=I,this.apiKey=l,this.stream=n,this.requestOptions=a}toString(){var e,I;let l=((e=this.requestOptions)===null||e===void 0?void 0:e.apiVersion)||j_n,a=`${((I=this.requestOptions)===null||I===void 0?void 0:I.baseUrl)||x_n}/${l}/${this.model}:${this.task}`;return this.stream&&(a+="?alt=sse"),a}};q_n=[fte.RECITATION,fte.SAFETY,fte.LANGUAGE];NhI=/^data\: (.*)(?:\n\n|\r\r|\r\n\r\n)/;YhI=["text","inlineData","functionCall","functionResponse","executableCode","codeExecutionResult"],rKn={user:["text","inlineData"],function:["functionResponse"],model:["text","functionCall","executableCode","codeExecutionResult"],system:["text"]};AhI="SILENT_ERROR",X8e=class{constructor(e,I,l,n={}){this.model=I,this.params=l,this._requestOptions=n,this._history=[],this._sendPromise=Promise.resolve(),this._apiKey=e,l?.history&&(sKn(l.history),this._history=l.history)}async getHistory(){return await this._sendPromise,this._history}async sendMessage(e,I={}){var l,n,a,c,r,s;await this._sendPromise;let i=Jte(e),G={safetySettings:(l=this.params)===null||l===void 0?void 0:l.safetySettings,generationConfig:(n=this.params)===null||n===void 0?void 0:n.generationConfig,tools:(a=this.params)===null||a===void 0?void 0:a.tools,toolConfig:(c=this.params)===null||c===void 0?void 0:c.toolConfig,systemInstruction:(r=this.params)===null||r===void 0?void 0:r.systemInstruction,cachedContent:(s=this.params)===null||s===void 0?void 0:s.cachedContent,contents:[...this._history,i]},d=Object.assign(Object.assign({},this._requestOptions),I),u;return this._sendPromise=this._sendPromise.then(()=>XhI(this._apiKey,this.model,G,d)).then(b=>{var Z;if(RhI(b.response)){this._history.push(i);let p=Object.assign({parts:[],role:"model"},(Z=b.response.candidates)===null||Z===void 0?void 0:Z[0].content);this._history.push(p)}else{let p=x1(b.response);p&&console.warn(`sendMessage() was unsuccessful. ${p}. Inspect response object for details.`)}u=b}).catch(b=>{throw this._sendPromise=Promise.resolve(),b}),await this._sendPromise,u}async sendMessageStream(e,I={}){var l,n,a,c,r,s;await this._sendPromise;let i=Jte(e),G={safetySettings:(l=this.params)===null||l===void 0?void 0:l.safetySettings,generationConfig:(n=this.params)===null||n===void 0?void 0:n.generationConfig,tools:(a=this.params)===null||a===void 0?void 0:a.tools,toolConfig:(c=this.params)===null||c===void 0?void 0:c.toolConfig,systemInstruction:(r=this.params)===null||r===void 0?void 0:r.systemInstruction,cachedContent:(s=this.params)===null||s===void 0?void 0:s.cachedContent,contents:[...this._history,i]},d=Object.assign(Object.assign({},this._requestOptions),I),u=FhI(this._apiKey,this.model,G,d);return this._sendPromise=this._sendPromise.then(()=>u).catch(b=>{throw new Error(AhI)}).then(b=>b.response).then(b=>{if(RhI(b)){this._history.push(i);let Z=Object.assign({},b.candidates[0].content);Z.role||(Z.role="model"),this._history.push(Z)}else{let Z=x1(b);Z&&console.warn(`sendMessageStream() was unsuccessful. ${Z}. Inspect response object for details.`)}}).catch(b=>{b.message!==AhI&&console.error(b)}),u}};_0e=class{constructor(e,I,l={}){this.apiKey=e,this._requestOptions=l,I.model.includes("/")?this.model=I.model:this.model=`models/${I.model}`,this.generationConfig=I.generationConfig||{},this.safetySettings=I.safetySettings||[],this.tools=I.tools,this.toolConfig=I.toolConfig,this.systemInstruction=ghI(I.systemInstruction),this.cachedContent=I.cachedContent}async generateContent(e,I={}){var l;let n=VhI(e),a=Object.assign(Object.assign({},this._requestOptions),I);return XhI(this.apiKey,this.model,Object.assign({generationConfig:this.generationConfig,safetySettings:this.safetySettings,tools:this.tools,toolConfig:this.toolConfig,systemInstruction:this.systemInstruction,cachedContent:(l=this.cachedContent)===null||l===void 0?void 0:l.name},n),a)}async generateContentStream(e,I={}){var l;let n=VhI(e),a=Object.assign(Object.assign({},this._requestOptions),I);return FhI(this.apiKey,this.model,Object.assign({generationConfig:this.generationConfig,safetySettings:this.safetySettings,tools:this.tools,toolConfig:this.toolConfig,systemInstruction:this.systemInstruction,cachedContent:(l=this.cachedContent)===null||l===void 0?void 0:l.name},n),a)}startChat(e){var I;return new X8e(this.apiKey,this.model,Object.assign({generationConfig:this.generationConfig,safetySettings:this.safetySettings,tools:this.tools,toolConfig:this.toolConfig,systemInstruction:this.systemInstruction,cachedContent:(I=this.cachedContent)===null||I===void 0?void 0:I.name},e),this._requestOptions)}async countTokens(e,I={}){let l=aKn(e,{model:this.model,generationConfig:this.generationConfig,safetySettings:this.safetySettings,tools:this.tools,toolConfig:this.toolConfig,systemInstruction:this.systemInstruction,cachedContent:this.cachedContent}),n=Object.assign(Object.assign({},this._requestOptions),I);return oKn(this.apiKey,this.model,l,n)}async embedContent(e,I={}){let l=cKn(e),n=Object.assign(Object.assign({},this._requestOptions),I);return iKn(this.apiKey,this.model,l,n)}async batchEmbedContents(e,I={}){let l=Object.assign(Object.assign({},this._requestOptions),I);return GKn(this.apiKey,this.model,e,l)}};d4=class{constructor(e){this.apiKey=e}getGenerativeModel(e,I){if(!e.model)throw new ai("Must provide a model name. Example: genai.getGenerativeModel({ model: 'my-model-name' })");return new _0e(this.apiKey,e,I)}getGenerativeModelFromCachedContent(e,I,l){if(!e.name)throw new z2("Cached content must contain a `name` field.");if(!e.model)throw new z2("Cached content must contain a `model` field.");let n=["model","systemInstruction"];for(let c of n)if(I?.[c]&&e[c]&&I?.[c]!==e[c]){if(c==="model"){let r=I.model.startsWith("models/")?I.model.replace("models/",""):I.model,s=e.model.startsWith("models/")?e.model.replace("models/",""):e.model;if(r===s)continue}throw new z2(`Different value for "${c}" specified in modelParams (${I[c]}) and cachedContent (${e[c]})`)}let a=Object.assign(Object.assign({},I),{model:e.model,tools:e.tools,toolConfig:e.toolConfig,systemInstruction:e.systemInstruction,cachedContent:e});return new _0e(this.apiKey,a,l)}}});function v8e(t,e){let I=dKn(t);return{tools:I,toolConfig:bKn(I,e)}}function dKn(t){let e=[],I=[];return t.forEach(l=>{if(Ws(l)){let[n]=chI([l]);n.functionDeclarations&&e.push(...n.functionDeclarations)}else if($R(l)){let{functionDeclarations:n}=uKn(l);if(n)e.push(...n);else throw new Error("Failed to convert OpenAI structured tool to GenerativeAI tool")}else I.push(l)}),I.find(l=>"functionDeclarations"in l)?I.map(l=>{if(e?.length>0&&"functionDeclarations"in l){let n={functionDeclarations:[...l.functionDeclarations||[],...e]};return e=[],n}return l}):[...I,...e.length>0?[{functionDeclarations:e}]:[]]}function uKn(t){return{functionDeclarations:[{name:t.function.name,description:t.function.description,parameters:eH(t.function.parameters)}]}}function bKn(t,e){if(!t.length||!e)return;let{toolChoice:I,allowedFunctionNames:l}=e,n={any:i4.ANY,auto:i4.AUTO,none:i4.NONE};if(I&&["any","auto","none"].includes(I))return{functionCallingConfig:{mode:n[I]??"MODE_UNSPECIFIED",allowedFunctionNames:l}};if(typeof I=="string"||l)return{functionCallingConfig:{mode:i4.ANY,allowedFunctionNames:[...l??[],...I&&typeof I=="string"?[I]:[]]}}}var vhI=g(()=>{o();B0e();A8e();K0e();uF();sZ()});var yhI,whI=g(()=>{o();yhI={"gemini-embedding-001":{maxInputTokens:2048,imageInputs:!1,audioInputs:!1,pdfInputs:!1,videoInputs:!1,maxOutputTokens:3072,reasoningOutput:!1,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!1,structuredOutput:!1},"gemini-2.5-flash-lite-preview-09-2025":{maxInputTokens:1048576,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:65536,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0},"gemini-2.5-pro-preview-06-05":{maxInputTokens:1048576,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:65536,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0},"gemini-2.5-flash-preview-04-17":{maxInputTokens:1048576,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:65536,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!1},"gemini-2.5-flash-preview-09-2025":{maxInputTokens:1048576,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:65536,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0},"gemini-2.5-pro-preview-05-06":{maxInputTokens:1048576,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:65536,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0},"gemini-2.5-flash-preview-05-20":{maxInputTokens:1048576,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:65536,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0},"gemini-2.5-flash":{maxInputTokens:1048576,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:65536,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0},"gemini-live-2.5-flash":{maxInputTokens:128e3,imageInputs:!0,audioInputs:!0,pdfInputs:!1,videoInputs:!0,maxOutputTokens:8e3,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!0,videoOutputs:!1,toolCalling:!0,structuredOutput:!1},"gemini-3-flash-preview":{maxInputTokens:1048576,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:65536,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0},"gemini-live-2.5-flash-preview-native-audio":{maxInputTokens:131072,imageInputs:!1,audioInputs:!0,pdfInputs:!1,videoInputs:!0,maxOutputTokens:65536,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!0,videoOutputs:!1,toolCalling:!0,structuredOutput:!1},"gemini-2.5-flash-lite":{maxInputTokens:1048576,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:65536,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0},"gemini-2.5-flash-preview-tts":{maxInputTokens:8e3,imageInputs:!1,audioInputs:!1,pdfInputs:!1,videoInputs:!1,maxOutputTokens:16e3,reasoningOutput:!1,imageOutputs:!1,audioOutputs:!0,videoOutputs:!1,toolCalling:!1,structuredOutput:!1},"gemini-flash-latest":{maxInputTokens:1048576,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:65536,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0},"gemini-2.5-flash-lite-preview-06-17":{maxInputTokens:1048576,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:65536,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!1},"gemini-2.5-flash-image":{maxInputTokens:32768,imageInputs:!0,audioInputs:!1,pdfInputs:!1,videoInputs:!1,maxOutputTokens:32768,reasoningOutput:!0,imageOutputs:!0,audioOutputs:!1,videoOutputs:!1,toolCalling:!1,structuredOutput:!1},"gemini-2.5-pro-preview-tts":{maxInputTokens:8e3,imageInputs:!1,audioInputs:!1,pdfInputs:!1,videoInputs:!1,maxOutputTokens:16e3,reasoningOutput:!1,imageOutputs:!1,audioOutputs:!0,videoOutputs:!1,toolCalling:!1,structuredOutput:!1},"gemini-2.5-flash-image-preview":{maxInputTokens:32768,imageInputs:!0,audioInputs:!1,pdfInputs:!1,videoInputs:!1,maxOutputTokens:32768,reasoningOutput:!0,imageOutputs:!0,audioOutputs:!1,videoOutputs:!1,toolCalling:!1,structuredOutput:!1},"gemini-1.5-flash-8b":{maxInputTokens:1e6,imageInputs:!0,audioInputs:!0,pdfInputs:!1,videoInputs:!0,maxOutputTokens:8192,reasoningOutput:!1,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!1},"gemini-3-pro-preview":{maxInputTokens:1e6,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:64e3,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0},"gemini-2.0-flash-lite":{maxInputTokens:1048576,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:8192,reasoningOutput:!1,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0},"gemini-1.5-flash":{maxInputTokens:1e6,imageInputs:!0,audioInputs:!0,pdfInputs:!1,videoInputs:!0,maxOutputTokens:8192,reasoningOutput:!1,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!1},"gemini-flash-lite-latest":{maxInputTokens:1048576,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:65536,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0},"gemini-2.5-pro":{maxInputTokens:1048576,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:65536,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0},"gemini-2.0-flash":{maxInputTokens:1048576,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:8192,reasoningOutput:!1,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0},"gemini-1.5-pro":{maxInputTokens:1e6,imageInputs:!0,audioInputs:!0,pdfInputs:!1,videoInputs:!0,maxOutputTokens:8192,reasoningOutput:!1,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!1}}});var HhI,QhI=g(()=>{o();B0e();A8e();shI();vhI();whI();K0e();ca();l0();Wa();wp();tQ();HhI=class extends yr{static lc_name(){return"ChatGoogleGenerativeAI"}lc_serializable=!0;get lc_secrets(){return{apiKey:"GOOGLE_API_KEY"}}lc_namespace=["langchain","chat_models","google_genai"];get lc_aliases(){return{apiKey:"google_api_key"}}model;temperature;maxOutputTokens;topP;topK;stopSequences=[];safetySettings;apiKey;streaming=!1;json;streamUsage=!0;convertSystemMessageToHumanContent;thinkingConfig;client;get _isMultimodalModel(){return this.model.includes("vision")||this.model.startsWith("gemini-1.5")||this.model.startsWith("gemini-2")||this.model.startsWith("gemma-3-")&&!this.model.startsWith("gemma-3-1b")||this.model.startsWith("gemini-3")}constructor(t,e){let I=typeof t=="string"?{...e??{},model:t}:t;if(super(I),this._addVersion("@langchain/google-genai","2.1.29"),this.model=I.model.replace(/^models\//,""),this.maxOutputTokens=I.maxOutputTokens??this.maxOutputTokens,this.maxOutputTokens&&this.maxOutputTokens<0)throw new Error("`maxOutputTokens` must be a positive integer");if(this.temperature=I.temperature??this.temperature,this.temperature&&(this.temperature<0||this.temperature>2))throw new Error("`temperature` must be in the range of [0.0,2.0]");if(this.topP=I.topP??this.topP,this.topP&&this.topP<0)throw new Error("`topP` must be a positive integer");if(this.topP&&this.topP>1)throw new Error("`topP` must be below 1.");if(this.topK=I.topK??this.topK,this.topK&&this.topK<0)throw new Error("`topK` must be a positive integer");if(this.stopSequences=I.stopSequences??this.stopSequences,this.apiKey=I.apiKey??gt("GOOGLE_API_KEY"),!this.apiKey)throw new Error("Please set an API key for Google GenerativeAI in the environment variable GOOGLE_API_KEY or in the `apiKey` field of the ChatGoogleGenerativeAI constructor");if(this.safetySettings=I.safetySettings??this.safetySettings,this.safetySettings&&this.safetySettings.length>0&&new Set(this.safetySettings.map(l=>l.category)).size!==this.safetySettings.length)throw new Error("The categories in `safetySettings` array must be unique");this.streaming=I.streaming??this.streaming,this.json=I.json,this.thinkingConfig=I.thinkingConfig??this.thinkingConfig,this.client=new d4(this.apiKey).getGenerativeModel({model:this.model,safetySettings:this.safetySettings,generationConfig:{stopSequences:this.stopSequences,maxOutputTokens:this.maxOutputTokens,temperature:this.temperature,topP:this.topP,topK:this.topK,...this.json?{responseMimeType:"application/json"}:{},...this.thinkingConfig?{thinkingConfig:this.thinkingConfig}:{}}},{apiVersion:I.apiVersion,baseUrl:I.baseUrl,customHeaders:I.customHeaders}),this.streamUsage=I.streamUsage??this.streamUsage}useCachedContent(t,e,I){this.apiKey&&(this.client=new d4(this.apiKey).getGenerativeModelFromCachedContent(t,e,I))}get useSystemInstruction(){return typeof this.convertSystemMessageToHumanContent=="boolean"?!this.convertSystemMessageToHumanContent:this.computeUseSystemInstruction}get computeUseSystemInstruction(){return this.model==="gemini-1.0-pro-001"||this.model.startsWith("gemini-pro-vision")||this.model.startsWith("gemini-1.0-pro-vision")?!1:this.model!=="gemini-pro"}getLsParams(t){return{ls_provider:"google_genai",ls_model_name:this.model,ls_model_type:"chat",ls_temperature:this.client.generationConfig.temperature,ls_max_tokens:this.client.generationConfig.maxOutputTokens,ls_stop:t.stop}}_combineLLMOutput(){return[]}_llmType(){return"googlegenerativeai"}bindTools(t,e){return this.withConfig({tools:v8e(t)?.tools,...e})}invocationParams(t){let e=t?.tools?.length?v8e(t.tools,{toolChoice:t.tool_choice,allowedFunctionNames:t.allowedFunctionNames}):void 0;return t?.responseSchema?(this.client.generationConfig.responseSchema=t.responseSchema,this.client.generationConfig.responseMimeType="application/json"):(this.client.generationConfig.responseSchema=void 0,this.client.generationConfig.responseMimeType=this.json?"application/json":void 0),{...e?.tools?{tools:e.tools}:{},...e?.toolConfig?{toolConfig:e.toolConfig}:{}}}async _generate(t,e,I){e.signal?.throwIfAborted();let l=Y8e(t,this._isMultimodalModel,this.useSystemInstruction,this.model),n=l;if(l[0].role==="system"){let[i]=l;this.client.systemInstruction=i,n=l.slice(1)}let a=this.invocationParams(e);if(this.streaming){let i={},G=this._streamResponseChunks(t,e,I),d=[];for await(let u of G){let b=u.generationInfo?.completion??0;d[b]===void 0?d[b]=u:d[b]=d[b].concat(u)}return{generations:d.filter(u=>u!==void 0),llmOutput:{estimatedTokenUsage:i}}}let c=await this.completionWithRetry({...a,contents:n}),r;"usageMetadata"in c.response&&(r=R8e(c.response.usageMetadata,this.model));let s=nhI(c.response,{usageMetadata:r});return s.generations?.length>0&&await I?.handleLLMNewToken(s.generations[0]?.text??""),s}async*_streamResponseChunks(t,e,I){let l=Y8e(t,this._isMultimodalModel,this.useSystemInstruction,this.model),n=l;if(l[0].role==="system"){let[u]=l;this.client.systemInstruction=u,n=l.slice(1)}let a={...this.invocationParams(e),contents:n},c=await this.caller.callWithOptions({signal:e?.signal},async()=>{let{stream:u}=await this.client.generateContentStream(a,{signal:e?.signal});return u}),r,s=0,i=0,G=0,d=0;for await(let u of c){if(e.signal?.aborted)return;if("usageMetadata"in u&&u.usageMetadata!==void 0&&this.streamUsage!==!1&&e.streamUsage!==!1){r=R8e(u.usageMetadata,this.model);let Z=u.usageMetadata.promptTokenCount??0;r.input_tokens=Math.max(0,Z-s),s=Z;let p=u.usageMetadata.candidatesTokenCount??0;r.output_tokens=Math.max(0,p-i),i=p;let W=u.usageMetadata.totalTokenCount??0;r.total_tokens=Math.max(0,W-G),G=W}let b=ahI(u,{usageMetadata:r,index:d});d+=1,b&&(yield b,await I?.handleLLMNewToken(b.text??""))}}async completionWithRetry(t,e){return this.caller.callWithOptions({signal:e?.signal},async()=>{try{return await this.client.generateContent(t,{signal:e?.signal})}catch(I){throw I.message?.includes("400 Bad Request")&&(I.status=400),I}})}get profile(){return yhI[this.model]??{}}withStructuredOutput(t,e){let I=t,l=e?.name,n=e?.method,a=e?.includeRaw;if(n==="jsonMode")throw new Error('ChatGoogleGenerativeAI only supports "jsonSchema" or "functionCalling" as a method.');let c,r;if(n==="functionCalling"){let s=l??"extract",i;if(Vl(I)||jn(I)){let d=Hte(I);i={name:s,description:d.description??"A function available to call.",parameters:d}}else typeof I.name=="string"&&typeof I.parameters=="object"&&I.parameters!=null?(i=I,i.parameters=eH(I.parameters),s=I.name):i={name:s,description:I.description??"",parameters:eH(I)};let G=[{functionDeclarations:[i]}];c=this.bindTools(G).withConfig({allowedFunctionNames:[s]}),r=I0(I,s,rhI)}else{let s=Hte(I);c=this.withConfig({responseSchema:s}),r=Ep(I)}return oZ(c,r,a,a?"StructuredOutputRunnable":"ChatGoogleGenerativeAIStructuredOutput")}}});var fhI,EhI=g(()=>{o();K0e();ca();hC();RC();fhI=class extends Up{apiKey;modelName="embedding-001";model="embedding-001";taskType;title;stripNewLines=!0;maxBatchSize=100;client;constructor(t){if(super(t??{}),this.modelName=t?.model?.replace(/^models\//,"")??t?.modelName?.replace(/^models\//,"")??this.modelName,this.model=this.modelName,this.taskType=t?.taskType??this.taskType,this.title=t?.title??this.title,this.title&&this.taskType!=="RETRIEVAL_DOCUMENT")throw new Error("title can only be sepcified with TaskType.RETRIEVAL_DOCUMENT");if(this.apiKey=t?.apiKey??gt("GOOGLE_API_KEY"),!this.apiKey)throw new Error("Please set an API key for Google GenerativeAI in the environmentb variable GOOGLE_API_KEY or in the `apiKey` field of the GoogleGenerativeAIEmbeddings constructor");this.client=new d4(this.apiKey).getGenerativeModel({model:this.model},{baseUrl:t?.baseUrl})}_convertToContent(t){return{content:{role:"user",parts:[{text:this.stripNewLines?t.replace(/\n/g," "):t}]},taskType:this.taskType,title:this.title}}async _embedQueryContent(t){let e=this._convertToContent(t);return(await this.client.embedContent(e)).embedding.values??[]}async _embedDocumentsContent(t){let e=Op(t,this.maxBatchSize),I=e.map(l=>({requests:l.map(n=>this._convertToContent(n))}));return(await Promise.allSettled(I.map(l=>this.client.batchEmbedContents(l)))).flatMap((l,n)=>l.status==="fulfilled"?l.value.embeddings.map(a=>a.values||[]):Array(e[n].length).fill([]))}embedQuery(t){return this.caller.call(this._embedQueryContent.bind(this),t)}embedDocuments(t){return this.caller.call(this._embedDocumentsContent.bind(this),t)}}});var y8e={};tr(y8e,{ChatGoogleGenerativeAI:()=>HhI,GoogleGenerativeAIEmbeddings:()=>fhI});var w8e=g(()=>{o();QhI();EhI()});var Q8e=Y((QUr,zhI)=>{"use strict";o();zhI.exports=Object});var MhI=Y((EUr,BhI)=>{"use strict";o();BhI.exports=Error});var ThI=Y((CUr,ShI)=>{"use strict";o();ShI.exports=EvalError});var KhI=Y((kUr,_hI)=>{"use strict";o();_hI.exports=RangeError});var qhI=Y((jUr,DhI)=>{"use strict";o();DhI.exports=ReferenceError});var $hI=Y((OUr,PhI)=>{"use strict";o();PhI.exports=SyntaxError});var q0e=Y((BUr,eWI)=>{"use strict";o();eWI.exports=TypeError});var IWI=Y((SUr,tWI)=>{"use strict";o();tWI.exports=URIError});var nWI=Y((_Ur,lWI)=>{"use strict";o();lWI.exports=Math.abs});var cWI=Y((DUr,aWI)=>{"use strict";o();aWI.exports=Math.floor});var sWI=Y((PUr,rWI)=>{"use strict";o();rWI.exports=Math.max});var iWI=Y((e9r,oWI)=>{"use strict";o();oWI.exports=Math.min});var dWI=Y((I9r,GWI)=>{"use strict";o();GWI.exports=Math.pow});var bWI=Y((n9r,uWI)=>{"use strict";o();uWI.exports=Math.round});var ZWI=Y((c9r,mWI)=>{"use strict";o();mWI.exports=Number.isNaN||function(e){return e!==e}});var hWI=Y((s9r,pWI)=>{"use strict";o();var hKn=ZWI();pWI.exports=function(e){return hKn(e)||e===0?e:e<0?-1:1}});var NWI=Y((i9r,WWI)=>{"use strict";o();WWI.exports=Object.getOwnPropertyDescriptor});var $0e=Y((d9r,VWI)=>{"use strict";o();var P0e=NWI();if(P0e)try{P0e([],"length")}catch{P0e=null}VWI.exports=P0e});var RWI=Y((b9r,YWI)=>{"use strict";o();var eAe=Object.defineProperty||!1;if(eAe)try{eAe({},"a",{value:1})}catch{eAe=!1}YWI.exports=eAe});var f8e=Y((Z9r,AWI)=>{"use strict";o();AWI.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},I=Symbol("test"),l=Object(I);if(typeof I=="string"||Object.prototype.toString.call(I)!=="[object Symbol]"||Object.prototype.toString.call(l)!=="[object Symbol]")return!1;var n=42;e[I]=n;for(var a in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var c=Object.getOwnPropertySymbols(e);if(c.length!==1||c[0]!==I||!Object.prototype.propertyIsEnumerable.call(e,I))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var r=Object.getOwnPropertyDescriptor(e,I);if(r.value!==n||r.enumerable!==!0)return!1}return!0}});var gWI=Y((h9r,XWI)=>{"use strict";o();var FWI=typeof Symbol<"u"&&Symbol,WKn=f8e();XWI.exports=function(){return typeof FWI!="function"||typeof Symbol!="function"||typeof FWI("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:WKn()}});var E8e=Y((N9r,vWI)=>{"use strict";o();vWI.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var J8e=Y((Y9r,yWI)=>{"use strict";o();var NKn=Q8e();yWI.exports=NKn.getPrototypeOf||null});var QWI=Y((A9r,HWI)=>{"use strict";o();var VKn="Function.prototype.bind called on incompatible ",YKn=Object.prototype.toString,RKn=Math.max,AKn="[object Function]",wWI=function(e,I){for(var l=[],n=0;n{"use strict";o();var gKn=QWI();fWI.exports=Function.prototype.bind||gKn});var tAe=Y((v9r,EWI)=>{"use strict";o();EWI.exports=Function.prototype.call});var C8e=Y((w9r,JWI)=>{"use strict";o();JWI.exports=Function.prototype.apply});var LWI=Y((Q9r,CWI)=>{"use strict";o();CWI.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var xWI=Y((E9r,kWI)=>{"use strict";o();var vKn=Mte(),yKn=C8e(),wKn=tAe(),HKn=LWI();kWI.exports=HKn||vKn.call(wKn,yKn)});var L8e=Y((C9r,jWI)=>{"use strict";o();var QKn=Mte(),fKn=q0e(),EKn=tAe(),JKn=xWI();jWI.exports=function(e){if(e.length<1||typeof e[0]!="function")throw new fKn("a function is required");return JKn(QKn,EKn,e)}});var SWI=Y((k9r,MWI)=>{"use strict";o();var CKn=L8e(),UWI=$0e(),zWI;try{zWI=[].__proto__===Array.prototype}catch(t){if(!t||typeof t!="object"||!("code"in t)||t.code!=="ERR_PROTO_ACCESS")throw t}var k8e=!!zWI&&UWI&&UWI(Object.prototype,"__proto__"),BWI=Object,OWI=BWI.getPrototypeOf;MWI.exports=k8e&&typeof k8e.get=="function"?CKn([k8e.get]):typeof OWI=="function"?function(e){return OWI(e==null?e:BWI(e))}:!1});var x8e=Y((j9r,DWI)=>{"use strict";o();var TWI=E8e(),_WI=J8e(),KWI=SWI();DWI.exports=TWI?function(e){return TWI(e)}:_WI?function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return _WI(e)}:KWI?function(e){return KWI(e)}:null});var j8e=Y((O9r,qWI)=>{"use strict";o();var LKn=Function.prototype.call,kKn=Object.prototype.hasOwnProperty,xKn=Mte();qWI.exports=xKn.call(LKn,kKn)});var nNI=Y((B9r,lNI)=>{"use strict";o();var Ll,jKn=Q8e(),UKn=MhI(),OKn=ThI(),zKn=KhI(),BKn=qhI(),SM=$hI(),MM=q0e(),MKn=IWI(),SKn=nWI(),TKn=cWI(),_Kn=sWI(),KKn=iWI(),DKn=dWI(),qKn=bWI(),PKn=hWI(),tNI=Function,U8e=function(t){try{return tNI('"use strict"; return ('+t+").constructor;")()}catch{}},Ste=$0e(),$Kn=RWI(),O8e=function(){throw new MM},eDn=Ste?function(){try{return arguments.callee,O8e}catch{try{return Ste(arguments,"callee").get}catch{return O8e}}}():O8e,zM=gWI()(),ci=x8e(),tDn=J8e(),IDn=E8e(),INI=C8e(),Tte=tAe(),BM={},lDn=typeof Uint8Array>"u"||!ci?Ll:ci(Uint8Array),b4={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Ll:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Ll:ArrayBuffer,"%ArrayIteratorPrototype%":zM&&ci?ci([][Symbol.iterator]()):Ll,"%AsyncFromSyncIteratorPrototype%":Ll,"%AsyncFunction%":BM,"%AsyncGenerator%":BM,"%AsyncGeneratorFunction%":BM,"%AsyncIteratorPrototype%":BM,"%Atomics%":typeof Atomics>"u"?Ll:Atomics,"%BigInt%":typeof BigInt>"u"?Ll:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Ll:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Ll:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Ll:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":UKn,"%eval%":eval,"%EvalError%":OKn,"%Float16Array%":typeof Float16Array>"u"?Ll:Float16Array,"%Float32Array%":typeof Float32Array>"u"?Ll:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Ll:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Ll:FinalizationRegistry,"%Function%":tNI,"%GeneratorFunction%":BM,"%Int8Array%":typeof Int8Array>"u"?Ll:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Ll:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Ll:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":zM&&ci?ci(ci([][Symbol.iterator]())):Ll,"%JSON%":typeof JSON=="object"?JSON:Ll,"%Map%":typeof Map>"u"?Ll:Map,"%MapIteratorPrototype%":typeof Map>"u"||!zM||!ci?Ll:ci(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":jKn,"%Object.getOwnPropertyDescriptor%":Ste,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Ll:Promise,"%Proxy%":typeof Proxy>"u"?Ll:Proxy,"%RangeError%":zKn,"%ReferenceError%":BKn,"%Reflect%":typeof Reflect>"u"?Ll:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Ll:Set,"%SetIteratorPrototype%":typeof Set>"u"||!zM||!ci?Ll:ci(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Ll:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":zM&&ci?ci(""[Symbol.iterator]()):Ll,"%Symbol%":zM?Symbol:Ll,"%SyntaxError%":SM,"%ThrowTypeError%":eDn,"%TypedArray%":lDn,"%TypeError%":MM,"%Uint8Array%":typeof Uint8Array>"u"?Ll:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Ll:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Ll:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Ll:Uint32Array,"%URIError%":MKn,"%WeakMap%":typeof WeakMap>"u"?Ll:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Ll:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Ll:WeakSet,"%Function.prototype.call%":Tte,"%Function.prototype.apply%":INI,"%Object.defineProperty%":$Kn,"%Object.getPrototypeOf%":tDn,"%Math.abs%":SKn,"%Math.floor%":TKn,"%Math.max%":_Kn,"%Math.min%":KKn,"%Math.pow%":DKn,"%Math.round%":qKn,"%Math.sign%":PKn,"%Reflect.getPrototypeOf%":IDn};if(ci)try{null.error}catch(t){PWI=ci(ci(t)),b4["%Error.prototype%"]=PWI}var PWI,nDn=function t(e){var I;if(e==="%AsyncFunction%")I=U8e("async function () {}");else if(e==="%GeneratorFunction%")I=U8e("function* () {}");else if(e==="%AsyncGeneratorFunction%")I=U8e("async function* () {}");else if(e==="%AsyncGenerator%"){var l=t("%AsyncGeneratorFunction%");l&&(I=l.prototype)}else if(e==="%AsyncIteratorPrototype%"){var n=t("%AsyncGenerator%");n&&ci&&(I=ci(n.prototype))}return b4[e]=I,I},$WI={__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"]},_te=Mte(),IAe=j8e(),aDn=_te.call(Tte,Array.prototype.concat),cDn=_te.call(INI,Array.prototype.splice),eNI=_te.call(Tte,String.prototype.replace),lAe=_te.call(Tte,String.prototype.slice),rDn=_te.call(Tte,RegExp.prototype.exec),sDn=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,oDn=/\\(\\)?/g,iDn=function(e){var I=lAe(e,0,1),l=lAe(e,-1);if(I==="%"&&l!=="%")throw new SM("invalid intrinsic syntax, expected closing `%`");if(l==="%"&&I!=="%")throw new SM("invalid intrinsic syntax, expected opening `%`");var n=[];return eNI(e,sDn,function(a,c,r,s){n[n.length]=r?eNI(s,oDn,"$1"):c||a}),n},GDn=function(e,I){var l=e,n;if(IAe($WI,l)&&(n=$WI[l],l="%"+n[0]+"%"),IAe(b4,l)){var a=b4[l];if(a===BM&&(a=nDn(l)),typeof a>"u"&&!I)throw new MM("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:l,value:a}}throw new SM("intrinsic "+e+" does not exist!")};lNI.exports=function(e,I){if(typeof e!="string"||e.length===0)throw new MM("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof I!="boolean")throw new MM('"allowMissing" argument must be a boolean');if(rDn(/^%?[^%]*%?$/,e)===null)throw new SM("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var l=iDn(e),n=l.length>0?l[0]:"",a=GDn("%"+n+"%",I),c=a.name,r=a.value,s=!1,i=a.alias;i&&(n=i[0],cDn(l,aDn([0,1],i)));for(var G=1,d=!0;G=l.length){var p=Ste(r,u);d=!!p,d&&"get"in p&&!("originalValue"in p.get)?r=p.get:r=r[u]}else d=IAe(r,u),r=r[u];d&&!s&&(b4[c]=r)}}return r}});var nAe=Y((S9r,rNI)=>{"use strict";o();var aNI=nNI(),cNI=L8e(),dDn=cNI([aNI("%String.prototype.indexOf%")]);rNI.exports=function(e,I){var l=aNI(e,!!I);return typeof l=="function"&&dDn(e,".prototype.")>-1?cNI([l]):l}});var z8e=Y((_9r,sNI)=>{"use strict";o();var uDn=f8e();sNI.exports=function(){return uDn()&&!!Symbol.toStringTag}});var bNI=Y((D9r,uNI)=>{"use strict";o();var oNI=nAe(),bDn=z8e()(),mDn=j8e(),ZDn=$0e(),S8e;bDn?(iNI=oNI("RegExp.prototype.exec"),B8e={},aAe=function(){throw B8e},M8e={toString:aAe,valueOf:aAe},typeof Symbol.toPrimitive=="symbol"&&(M8e[Symbol.toPrimitive]=aAe),S8e=function(e){if(!e||typeof e!="object")return!1;var I=ZDn(e,"lastIndex"),l=I&&mDn(I,"value");if(!l)return!1;try{iNI(e,M8e)}catch(n){return n===B8e}}):(GNI=oNI("Object.prototype.toString"),dNI="[object RegExp]",S8e=function(e){return!e||typeof e!="object"&&typeof e!="function"?!1:GNI(e)===dNI});var iNI,B8e,aAe,M8e,GNI,dNI;uNI.exports=S8e});var ZNI=Y((P9r,mNI)=>{"use strict";o();var pDn=nAe(),hDn=bNI(),WDn=pDn("RegExp.prototype.exec"),NDn=q0e();mNI.exports=function(e){if(!hDn(e))throw new NDn("`regex` must be a RegExp");return function(l){return WDn(e,l)!==null}}});var hNI=Y((eOr,pNI)=>{"use strict";o();var VDn=function*(){}.constructor;pNI.exports=()=>VDn});var YNI=Y((IOr,VNI)=>{"use strict";o();var NNI=nAe(),YDn=ZNI(),RDn=YDn(/^\s*(?:function)?\*/),ADn=z8e()(),WNI=x8e(),FDn=NNI("Object.prototype.toString"),XDn=NNI("Function.prototype.toString"),gDn=hNI();VNI.exports=function(e){if(typeof e!="function")return!1;if(RDn(XDn(e)))return!0;if(!ADn){var I=FDn(e);return I==="[object GeneratorFunction]"}if(!WNI)return!1;var l=gDn();return l&&WNI(e)===l.prototype}});var ANI=Y((nOr,RNI)=>{o();var TM=1e3,_M=TM*60,KM=_M*60,m4=KM*24,vDn=m4*7,yDn=m4*365.25;RNI.exports=function(t,e){e=e||{};var I=typeof t;if(I==="string"&&t.length>0)return wDn(t);if(I==="number"&&isFinite(t))return e.long?QDn(t):HDn(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function wDn(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var I=parseFloat(e[1]),l=(e[2]||"ms").toLowerCase();switch(l){case"years":case"year":case"yrs":case"yr":case"y":return I*yDn;case"weeks":case"week":case"w":return I*vDn;case"days":case"day":case"d":return I*m4;case"hours":case"hour":case"hrs":case"hr":case"h":return I*KM;case"minutes":case"minute":case"mins":case"min":case"m":return I*_M;case"seconds":case"second":case"secs":case"sec":case"s":return I*TM;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return I;default:return}}}}function HDn(t){var e=Math.abs(t);return e>=m4?Math.round(t/m4)+"d":e>=KM?Math.round(t/KM)+"h":e>=_M?Math.round(t/_M)+"m":e>=TM?Math.round(t/TM)+"s":t+"ms"}function QDn(t){var e=Math.abs(t);return e>=m4?cAe(t,e,m4,"day"):e>=KM?cAe(t,e,KM,"hour"):e>=_M?cAe(t,e,_M,"minute"):e>=TM?cAe(t,e,TM,"second"):t+" ms"}function cAe(t,e,I,l){var n=e>=I*1.5;return Math.round(t/I)+" "+l+(n?"s":"")}});var XNI=Y((cOr,FNI)=>{o();function fDn(t){I.debug=I,I.default=I,I.coerce=s,I.disable=c,I.enable=n,I.enabled=r,I.humanize=ANI(),I.destroy=i,Object.keys(t).forEach(G=>{I[G]=t[G]}),I.names=[],I.skips=[],I.formatters={};function e(G){let d=0;for(let u=0;u{if(v==="%%")return"%";R++;let w=I.formatters[y];if(typeof w=="function"){let H=W[R];v=w.call(h,H),W.splice(R,1),R--}return v}),I.formatArgs.call(h,W),(h.log||I.log).apply(h,W)}return p.namespace=G,p.useColors=I.useColors(),p.color=I.selectColor(G),p.extend=l,p.destroy=I.destroy,Object.defineProperty(p,"enabled",{enumerable:!0,configurable:!1,get:()=>u!==null?u:(b!==I.namespaces&&(b=I.namespaces,Z=I.enabled(G)),Z),set:W=>{u=W}}),typeof I.init=="function"&&I.init(p),p}function l(G,d){let u=I(this.namespace+(typeof d>"u"?":":d)+G);return u.log=this.log,u}function n(G){I.save(G),I.namespaces=G,I.names=[],I.skips=[];let d=(typeof G=="string"?G:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let u of d)u[0]==="-"?I.skips.push(u.slice(1)):I.names.push(u)}function a(G,d){let u=0,b=0,Z=-1,p=0;for(;u"-"+d)].join(",");return I.enable(""),G}function r(G){for(let d of I.skips)if(a(G,d))return!1;for(let d of I.names)if(a(G,d))return!0;return!1}function s(G){return G instanceof Error?G.stack||G.message:G}function i(){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 I.enable(I.load()),I}FNI.exports=fDn});var gNI=Y((fm,rAe)=>{o();fm.formatArgs=JDn;fm.save=CDn;fm.load=LDn;fm.useColors=EDn;fm.storage=kDn();fm.destroy=(()=>{let t=!1;return()=>{t||(t=!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`."))}})();fm.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 EDn(){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 t;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&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function JDn(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+rAe.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let I=0,l=0;t[0].replace(/%[a-zA-Z%]/g,n=>{n!=="%%"&&(I++,n==="%c"&&(l=I))}),t.splice(l,0,e)}fm.log=console.debug||console.log||(()=>{});function CDn(t){try{t?fm.storage.setItem("debug",t):fm.storage.removeItem("debug")}catch{}}function LDn(){let t;try{t=fm.storage.getItem("debug")||fm.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function kDn(){try{return localStorage}catch{}}rAe.exports=XNI()(fm);var{formatters:xDn}=rAe.exports;xDn.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var yNI=Y((oOr,vNI)=>{"use strict";o();vNI.exports=jDn;function jDn(t,e){if(!Array.isArray(t))throw new TypeError("arg must be an array of [ee, events...] arrays");for(var I=[],l=0;l{"use strict";o();T8e.exports=zDn;T8e.exports.isFinished=QNI;var wNI=_Dn(),HNI=yNI(),ODn=typeof setImmediate=="function"?setImmediate:function(t){process.nextTick(t.bind.apply(t,arguments))};function zDn(t,e){return QNI(t)!==!1?(ODn(e,null,t),t):(MDn(t,KDn(e)),t)}function QNI(t){var e=t.socket;if(typeof t.finished=="boolean")return!!(t.finished||e&&!e.writable);if(typeof t.complete=="boolean")return!!(t.upgrade||!e||!e.readable||t.complete&&!t.readable)}function BDn(t,e){var I,l,n=!1;function a(r){I.cancel(),l.cancel(),n=!0,e(r)}I=l=HNI([[t,"end","finish"]],a);function c(r){t.removeListener("socket",c),!n&&I===l&&(l=HNI([[r,"error","close"]],a))}if(t.socket){c(t.socket);return}t.on("socket",c),t.socket===void 0&&TDn(t,c)}function MDn(t,e){var I=t.__onFinished;(!I||!I.queue)&&(I=t.__onFinished=SDn(t),BDn(t,I)),I.queue.push(e)}function SDn(t){function e(I){if(t.__onFinished===e&&(t.__onFinished=null),!!e.queue){var l=e.queue;e.queue=null;for(var n=0;n{o();var sAe=Wle(),B2=sAe.Buffer;function fNI(t,e){for(var I in t)e[I]=t[I]}B2.from&&B2.alloc&&B2.allocUnsafe&&B2.allocUnsafeSlow?ENI.exports=sAe:(fNI(sAe,K8e),K8e.Buffer=Z4);function Z4(t,e,I){return B2(t,e,I)}Z4.prototype=Object.create(B2.prototype);fNI(B2,Z4);Z4.from=function(t,e,I){if(typeof t=="number")throw new TypeError("Argument must not be a number");return B2(t,e,I)};Z4.alloc=function(t,e,I){if(typeof t!="number")throw new TypeError("Argument must be a number");var l=B2(t);return e!==void 0?typeof I=="string"?l.fill(e,I):l.fill(e):l.fill(0),l};Z4.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return B2(t)};Z4.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return sAe.SlowBuffer(t)}});var UNI=Y((bOr,D8e)=>{"use strict";o();D8e.exports=c6n;D8e.exports.parse=i6n;var CNI=Qn().basename,DDn=JNI().Buffer,qDn=/[\x00-\x20"'()*,/:;<=>?@[\\\]{}\x7f]/g,PDn=/%[0-9A-Fa-f]{2}/,$Dn=/%([0-9A-Fa-f]{2})/g,kNI=/[^\x20-\x7e\xa0-\xff]/g,e6n=/\\([\u0000-\u007f])/g,t6n=/([\\"])/g,LNI=/;[\x09\x20]*([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*=[\x09\x20]*("(?:[\x20!\x23-\x5b\x5d-\x7e\x80-\xff]|\\[\x20-\x7e])*"|[!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*/g,I6n=/^[\x20-\x7e\x80-\xff]+$/,l6n=/^[!#$%&'*+.0-9A-Z^_`a-z|~-]+$/,n6n=/^([A-Za-z0-9!#$%&+\-^_`{}~]+)'(?:[A-Za-z]{2,3}(?:-[A-Za-z]{3}){0,3}|[A-Za-z]{4,8}|)'((?:%[0-9A-Fa-f]{2}|[A-Za-z0-9!#$&+.^_`|~-])+)$/,a6n=/^([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*(?:$|;)/;function c6n(t,e){var I=e||{},l=I.type||"attachment",n=r6n(t,I.fallback);return s6n(new jNI(l,n))}function r6n(t,e){if(t!==void 0){var I={};if(typeof t!="string")throw new TypeError("filename must be a string");if(e===void 0&&(e=!0),typeof e!="string"&&typeof e!="boolean")throw new TypeError("fallback must be a string or boolean");if(typeof e=="string"&&kNI.test(e))throw new TypeError("fallback must be ISO-8859-1 string");var l=CNI(t),n=I6n.test(l),a=typeof e!="string"?e&&xNI(l):CNI(e),c=typeof a=="string"&&a!==l;return(c||!n||PDn.test(l))&&(I["filename*"]=l),(n||c)&&(I.filename=c?a:l),I}}function s6n(t){var e=t.parameters,I=t.type;if(!I||typeof I!="string"||!l6n.test(I))throw new TypeError("invalid type");var l=String(I).toLowerCase();if(e&&typeof e=="object")for(var n,a=Object.keys(e).sort(),c=0;c{"use strict";o();var q8e=class{constructor(e){this.max=e,this.size=0,this.cache=new Map,this._cache=new Map}get(e,I){let l=this.cache.get(e),n=I&&I.maxAge,a;function c(){return a=a||Date.now(),a}if(l){if(l.expired&&c()>l.expired)l.expired=0,l.value=void 0;else if(n!==void 0){let r=n?c()+n:0;l.expired=r}return l.value}if(l=this._cache.get(e),l){if(l.expired&&c()>l.expired)l.expired=0,l.value=void 0;else if(this._update(e,l),n!==void 0){let r=n?c()+n:0;l.expired=r}return l.value}}set(e,I,l){let n=l&&l.maxAge,a=n?Date.now()+n:0,c=this.cache.get(e);c?(c.expired=a,c.value=I):(c={value:I,expired:a},this._update(e,c))}keys(){let e=new Set,I=Date.now();for(let n of this.cache.entries())l(n);for(let n of this._cache.entries())l(n);function l(n){let a=n[0],c=n[1];(n[1].value&&!n[1].expired||c.expired>=I)&&e.add(a)}return Array.from(e.keys())}reset(){this.size=0,this.cache.clear(),this._cache.clear()}_update(e,I){this.cache.set(e,I),this.size++,this.size>=this.max&&(this.size=0,this._cache=this.cache,this.cache=new Map)}};ONI.exports=q8e});var SNI=Y((hOr,MNI)=>{"use strict";o();var m6n=Lq(),Z6n=zNI(),BNI=new Z6n(100);MNI.exports=t=>{let e=BNI.get(t);return e||(e=m6n.contentType(t),BNI.set(t,e)),e}});var _NI=Y((NOr,TNI)=>{"use strict";o();var p6n=/["'&<>]/;TNI.exports=h6n;function h6n(t){var e=""+t,I=p6n.exec(e);if(!I)return e;var l,n="",a=0,c=0;for(a=I.index;a{o();var KNI=/; *([!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) *= *("(?:[ !\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u0020-\u007e])*"|[!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) */g,W6n=/^[\u0020-\u007e\u0080-\u00ff]+$/,qNI=/^[!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+$/,N6n=/\\([\u0000-\u007f])/g,V6n=/([\\"])/g,Y6n=/^[A-Za-z0-9][A-Za-z0-9!#$&^_.-]{0,126}$/,DNI=/^[A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126}$/,R6n=/^ *([A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126})\/([A-Za-z0-9][A-Za-z0-9!#$&^_.+-]{0,126}) *$/;P8e.format=A6n;P8e.parse=F6n;function A6n(t){if(!t||typeof t!="object")throw new TypeError("argument obj is required");var e=t.parameters,I=t.subtype,l=t.suffix,n=t.type;if(!n||!DNI.test(n))throw new TypeError("invalid type");if(!I||!Y6n.test(I))throw new TypeError("invalid subtype");var a=n+"/"+I;if(l){if(!DNI.test(l))throw new TypeError("invalid suffix");a+="+"+l}if(e&&typeof e=="object")for(var c,r=Object.keys(e).sort(),s=0;s0&&!W6n.test(e))throw new TypeError("invalid parameter value");return'"'+e.replace(V6n,"\\$1")+'"'}function v6n(t){var e=R6n.exec(t.toLowerCase());if(!e)throw new TypeError("invalid media type");var I=e[1],l=e[2],n,a=l.lastIndexOf("+");a!==-1&&(n=l.substr(a+1),l=l.substr(0,a));var c={type:I,subtype:l,suffix:n};return c}});var $8e=Y((AOr,DM)=>{"use strict";o();var $NI=PNI(),y6n=Lq();DM.exports=w6n;DM.exports.is=eVI;DM.exports.hasBody=tVI;DM.exports.normalize=IVI;DM.exports.match=lVI;function eVI(t,e){var I,l=e,n=Q6n(t);if(!n)return!1;if(l&&!Array.isArray(l))for(l=new Array(arguments.length-1),I=0;I2){I=new Array(arguments.length-1);for(var l=0;l{f6n.exports={"100":"Continue","101":"Switching Protocols","102":"Processing","103":"Early Hints","200":"OK","201":"Created","202":"Accepted","203":"Non-Authoritative Information","204":"No Content","205":"Reset Content","206":"Partial Content","207":"Multi-Status","208":"Already Reported","226":"IM Used","300":"Multiple Choices","301":"Moved Permanently","302":"Found","303":"See Other","304":"Not Modified","305":"Use Proxy","306":"(Unused)","307":"Temporary Redirect","308":"Permanent Redirect","400":"Bad Request","401":"Unauthorized","402":"Payment Required","403":"Forbidden","404":"Not Found","405":"Method Not Allowed","406":"Not Acceptable","407":"Proxy Authentication Required","408":"Request Timeout","409":"Conflict","410":"Gone","411":"Length Required","412":"Precondition Failed","413":"Payload Too Large","414":"URI Too Long","415":"Unsupported Media Type","416":"Range Not Satisfiable","417":"Expectation Failed","418":"I'm a teapot","421":"Misdirected Request","422":"Unprocessable Entity","423":"Locked","424":"Failed Dependency","425":"Unordered Collection","426":"Upgrade Required","428":"Precondition Required","429":"Too Many Requests","431":"Request Header Fields Too Large","451":"Unavailable For Legal Reasons","500":"Internal Server Error","501":"Not Implemented","502":"Bad Gateway","503":"Service Unavailable","504":"Gateway Timeout","505":"HTTP Version Not Supported","506":"Variant Also Negotiates","507":"Insufficient Storage","508":"Loop Detected","509":"Bandwidth Limit Exceeded","510":"Not Extended","511":"Network Authentication Required"}});var qM=Y((gOr,cVI)=>{"use strict";o();var aVI=nVI();cVI.exports=M2;M2.STATUS_CODES=aVI;M2.codes=E6n(M2,aVI);M2.redirect={300:!0,301:!0,302:!0,303:!0,305:!0,307:!0,308:!0};M2.empty={204:!0,205:!0,304:!0};M2.retry={502:!0,503:!0,504:!0};function E6n(t,e){var I=[];return Object.keys(e).forEach(function(n){var a=e[n],c=Number(n);t[c]=a,t[a]=c,t[a.toLowerCase()]=c,I.push(c)}),I}function M2(t){if(typeof t=="number"){if(!M2[t])throw new Error("invalid status code: "+t);return t}if(typeof t!="string")throw new TypeError("code must be a number or string");var e=parseInt(t,10);if(!isNaN(e)){if(!M2[e])throw new Error("invalid status code: "+e);return e}if(e=M2[t.toLowerCase()],!e)throw new Error('invalid status message: "'+t+'"');return e}});var oVI=Y((yOr,sVI)=>{"use strict";o();var J6n=require("events").EventEmitter,C6n=vo().ReadStream,rVI=require("stream"),p4=require("zlib");sVI.exports=L6n;function L6n(t,e){return z6n(t)?k6n(t):B6n(t)?j6n(t):U6n(t)&&t.destroy(),O6n(t)&&e&&(t.removeAllListeners("error"),t.addListener("error",M6n)),t}function k6n(t){t.destroy(),typeof t.close=="function"&&t.on("open",T6n)}function x6n(t){if(t._hadError===!0){var e=t._binding===null?"_binding":"_handle";t[e]={close:function(){this[e]=null}}}t.close()}function j6n(t){typeof t.destroy=="function"?t._binding?(t.destroy(),t._processing?(t._needDrain=!0,t.once("drain",S6n)):t._binding.clear()):t._destroy&&t._destroy!==rVI.Transform.prototype._destroy?t.destroy():t._destroy&&typeof t.close=="function"?(t.destroyed=!0,t.close()):t.destroy():typeof t.close=="function"&&x6n(t)}function U6n(t){return t instanceof rVI&&typeof t.destroy=="function"}function O6n(t){return t instanceof J6n}function z6n(t){return t instanceof C6n}function B6n(t){return t instanceof p4.Gzip||t instanceof p4.Gunzip||t instanceof p4.Deflate||t instanceof p4.DeflateRaw||t instanceof p4.Inflate||t instanceof p4.InflateRaw||t instanceof p4.Unzip}function M6n(){}function S6n(){this._binding.clear()}function T6n(){typeof this.fd=="number"&&this.close()}});var t$e=Y((HOr,e$e)=>{"use strict";o();e$e.exports=K6n;e$e.exports.append=GVI;var _6n=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function GVI(t,e){if(typeof t!="string")throw new TypeError("header argument is required");if(!e)throw new TypeError("field argument is required");for(var I=Array.isArray(e)?e:iVI(String(e)),l=0;l{o();dVI.exports=function(t,e){return t=t||{},typeof e=="string"&&(e=e.split(/ +/)),e.reduce(function(I,l){return t[l]==null||(I[l]=t[l]),I},{})}});var bVI=Y((JOr,uVI)=>{"use strict";o();uVI.exports=$6n;var D6n=/(?:[^\x21\x25\x26-\x3B\x3D\x3F-\x5B\x5D\x5F\x61-\x7A\x7E]|%(?:[^0-9A-Fa-f]|[0-9A-Fa-f][^0-9A-Fa-f]|$))+/g,q6n=/(^|[^\uD800-\uDBFF])[\uDC00-\uDFFF]|[\uD800-\uDBFF]([^\uDC00-\uDFFF]|$)/g,P6n="$1\uFFFD$2";function $6n(t){return String(t).replace(q6n,P6n).replace(D6n,encodeURI)}});var WVI=Y((LOr,iAe)=>{"use strict";o();var eqn=UNI(),tqn=SNI(),Iqn=_8e(),lqn=_NI(),nqn=$8e().is,Kte=qM(),aqn=oVI(),mVI=require("assert"),cqn=Qn().extname,rqn=t$e(),sqn=oAe(),ZVI=require("util"),oqn=bVI(),pVI=require("stream"),hVI=require("url").URL;iAe.exports={get socket(){return this.res.socket},get header(){let{res:t}=this;return typeof t.getHeaders=="function"?t.getHeaders():t._headers||{}},get headers(){return this.header},get status(){return this.res.statusCode},set status(t){this.headerSent||(mVI(Number.isInteger(t),"status code must be a number"),mVI(t>=100&&t<=999,`invalid status code: ${t}`),this._explicitStatus=!0,this.res.statusCode=t,this.req.httpVersionMajor<2&&(this.res.statusMessage=Kte[t]),this.body&&Kte.empty[t]&&(this.body=null))},get message(){return this.res.statusMessage||Kte[this.status]},set message(t){this.res.statusMessage=t},get body(){return this._body},set body(t){let e=this._body;if(this._body=t,t==null){Kte.empty[this.status]||(this.status=204),t===null&&(this._explicitNullBody=!0),this.remove("Content-Type"),this.remove("Content-Length"),this.remove("Transfer-Encoding");return}this._explicitStatus||(this.status=200);let I=!this.has("Content-Type");if(typeof t=="string"){I&&(this.type=/^\s*this.ctx.onerror(l)),e!=null&&this.remove("Content-Length")),I&&(this.type="bin");return}this.remove("Content-Length"),this.type="json"},set length(t){this.has("Transfer-Encoding")||this.set("Content-Length",t)},get length(){if(this.has("Content-Length"))return parseInt(this.get("Content-Length"),10)||0;let{body:t}=this;if(!(!t||t instanceof pVI))return typeof t=="string"?m.Buffer.byteLength(t):m.Buffer.isBuffer(t)?t.length:m.Buffer.byteLength(JSON.stringify(t))},get headerSent(){return this.res.headersSent},vary(t){this.headerSent||rqn(this.res,t)},_getBackReferrer(){let t=this.ctx.get("Referrer");if(t&&new hVI(t,this.ctx.href).host===this.ctx.host)return t},redirect(t,e){if(t==="back"&&(t=this._getBackReferrer()||e||"/"),/^https?:\/\//i.test(t)&&(t=new hVI(t).toString()),this.set("Location",oqn(t)),Kte.redirect[this.status]||(this.status=302),this.ctx.accepts("html")){t=lqn(t),this.type="text/html; charset=utf-8",this.body=`Redirecting to ${t}.`;return}this.type="text/plain; charset=utf-8",this.body=`Redirecting to ${t}.`},attachment(t,e){t&&(this.type=cqn(t)),this.set("Content-Disposition",eqn(t,e))},set type(t){t=tqn(t),t?this.set("Content-Type",t):this.remove("Content-Type")},set lastModified(t){typeof t=="string"&&(t=new Date(t)),this.set("Last-Modified",t.toUTCString())},get lastModified(){let t=this.get("last-modified");if(t)return new Date(t)},set etag(t){/^(W\/)?"/.test(t)||(t=`"${t}"`),this.set("ETag",t)},get etag(){return this.get("ETag")},get type(){let t=this.get("Content-Type");return t?t.split(";",1)[0]:""},is(t,...e){return nqn(this.type,t,...e)},get(t){return this.header[t.toLowerCase()]||""},has(t){return typeof this.res.hasHeader=="function"?this.res.hasHeader(t):t.toLowerCase()in this.headers},set(t,e){if(!this.headerSent)if(arguments.length===2)Array.isArray(e)?e=e.map(I=>typeof I=="string"?I:String(I)):typeof e!="string"&&(e=String(e)),this.res.setHeader(t,e);else for(let I in t)this.set(I,t[I])},append(t,e){let I=this.get(t);return I&&(e=Array.isArray(I)?I.concat(e):[I].concat(e)),this.set(t,e)},remove(t){this.headerSent||this.res.removeHeader(t)},get writable(){if(this.res.writableEnded||this.res.finished)return!1;let t=this.res.socket;return t?t.writable:!0},inspect(){if(!this.res)return;let t=this.toJSON();return t.body=this.body,t},toJSON(){return sqn(this,["status","message","header"])},flushHeaders(){this.res.flushHeaders()}};ZVI.inspect.custom&&(iAe.exports[ZVI.inspect.custom]=iAe.exports.inspect)});var I$e=Y((xOr,NVI)=>{"use strict";o();NVI.exports=iqn;function iqn(t){if(!Array.isArray(t))throw new TypeError("Middleware stack must be an array!");for(let e of t)if(typeof e!="function")throw new TypeError("Middleware must be composed of functions!");return function(e,I){let l=-1;return n(0);function n(a){if(a<=l)return Promise.reject(new Error("next() called multiple times"));l=a;let c=t[a];if(a===t.length&&(c=I),!c)return Promise.resolve();try{return Promise.resolve(c(e,n.bind(null,a+1)))}catch(r){return Promise.reject(r)}}}}});var YVI=Y((UOr,VVI)=>{"use strict";o();VVI.exports=Gqn;function Gqn(t){if(!t)throw new TypeError("argument namespace is required");function e(I){}return e._file=void 0,e._ignored=!0,e._namespace=t,e._traced=!1,e._warned=Object.create(null),e.function=dqn,e.property=uqn,e}function dqn(t,e){if(typeof t!="function")throw new TypeError("argument fn must be a function");return t}function uqn(t,e,I){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("argument obj must be object");var l=Object.getOwnPropertyDescriptor(t,e);if(!l)throw new TypeError("must call property on owner object");if(!l.configurable)throw new TypeError("property must be configurable")}});var AVI=Y((zOr,RVI)=>{"use strict";o();RVI.exports=Object.setPrototypeOf||({__proto__:[]}instanceof Array?bqn:mqn);function bqn(t,e){return t.__proto__=e,t}function mqn(t,e){for(var I in e)Object.prototype.hasOwnProperty.call(t,I)||(t[I]=e[I]);return t}});var FVI=Y((MOr,l$e)=>{o();typeof Object.create=="function"?l$e.exports=function(e,I){I&&(e.super_=I,e.prototype=Object.create(I.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:l$e.exports=function(e,I){if(I){e.super_=I;var l=function(){};l.prototype=I.prototype,e.prototype=new l,e.prototype.constructor=e}}});var gVI=Y((TOr,XVI)=>{"use strict";o();XVI.exports=Zqn;function Zqn(t){return t.split(" ").map(function(e){return e.slice(0,1).toUpperCase()+e.slice(1)}).join("").replace(/[^ _0-9a-z]/gi,"")}});var dAe=Y((KOr,h4)=>{"use strict";o();var n$e=YVI()("http-errors"),vVI=AVI(),PM=qM(),a$e=FVI(),pqn=gVI();h4.exports=GAe;h4.exports.HttpError=hqn();h4.exports.isHttpError=Nqn(h4.exports.HttpError);Yqn(h4.exports,PM.codes,h4.exports.HttpError);function yVI(t){return+(String(t).charAt(0)+"00")}function GAe(){for(var t,e,I=500,l={},n=0;n=600)&&n$e("non-error status code; use only 4xx or 5xx status codes"),(typeof I!="number"||!PM[I]&&(I<400||I>=600))&&(I=500);var c=GAe[I]||GAe[yVI(I)];t||(t=c?new c(e):new Error(e||PM[I]),Error.captureStackTrace(t,GAe)),(!c||!(t instanceof c)||t.status!==I)&&(t.expose=I<500,t.status=t.statusCode=I);for(var r in l)r!=="status"&&r!=="statusCode"&&(t[r]=l[r]);return t}function hqn(){function t(){throw new TypeError("cannot construct abstract class")}return a$e(t,Error),t}function Wqn(t,e,I){var l=HVI(e);function n(a){var c=a??PM[I],r=new Error(c);return Error.captureStackTrace(r,n),vVI(r,n.prototype),Object.defineProperty(r,"message",{enumerable:!0,configurable:!0,value:c,writable:!0}),Object.defineProperty(r,"name",{enumerable:!1,configurable:!0,value:l,writable:!0}),r}return a$e(n,t),wVI(n,l),n.prototype.status=I,n.prototype.statusCode=I,n.prototype.expose=!0,n}function Nqn(t){return function(I){return!I||typeof I!="object"?!1:I instanceof t?!0:I instanceof Error&&typeof I.expose=="boolean"&&typeof I.statusCode=="number"&&I.status===I.statusCode}}function Vqn(t,e,I){var l=HVI(e);function n(a){var c=a??PM[I],r=new Error(c);return Error.captureStackTrace(r,n),vVI(r,n.prototype),Object.defineProperty(r,"message",{enumerable:!0,configurable:!0,value:c,writable:!0}),Object.defineProperty(r,"name",{enumerable:!1,configurable:!0,value:l,writable:!0}),r}return a$e(n,t),wVI(n,l),n.prototype.status=I,n.prototype.statusCode=I,n.prototype.expose=!1,n}function wVI(t,e){var I=Object.getOwnPropertyDescriptor(t,"name");I&&I.configurable&&(I.value=e,Object.defineProperty(t,"name",I))}function Yqn(t,e,I){e.forEach(function(n){var a,c=pqn(PM[n]);switch(yVI(n)){case 400:a=Wqn(I,c,n);break;case 500:a=Vqn(I,c,n);break}a&&(t[n]=a,t[c]=a)}),t["I'mateapot"]=n$e.function(t.ImATeapot,`"I'mateapot"; use "ImATeapot" instead`)}function HVI(t){return t.substr(-5)!=="Error"?t+"Error":t}});var EVI=Y((c$e,fVI)=>{o();c$e=fVI.exports=typeof Object.keys=="function"?Object.keys:QVI;c$e.shim=QVI;function QVI(t){var e=[];for(var I in t)e.push(I);return e}});var kVI=Y((uAe,LVI)=>{o();var Rqn=function(){return Object.prototype.toString.call(arguments)}()=="[object Arguments]";uAe=LVI.exports=Rqn?JVI:CVI;uAe.supported=JVI;function JVI(t){return Object.prototype.toString.call(t)=="[object Arguments]"}uAe.unsupported=CVI;function CVI(t){return t&&typeof t=="object"&&typeof t.length=="number"&&Object.prototype.hasOwnProperty.call(t,"callee")&&!Object.prototype.propertyIsEnumerable.call(t,"callee")||!1}});var SVI=Y(($Or,MVI)=>{o();var xVI=Array.prototype.slice,jVI=EVI(),UVI=kVI(),OVI=MVI.exports=function(t,e,I){return I||(I={}),t===e?!0:t instanceof Date&&e instanceof Date?t.getTime()===e.getTime():!t||!e||typeof t!="object"&&typeof e!="object"?I.strict?t===e:t==e:Aqn(t,e,I)};function zVI(t){return t==null}function BVI(t){return!(!t||typeof t!="object"||typeof t.length!="number"||typeof t.copy!="function"||typeof t.slice!="function"||t.length>0&&typeof t[0]!="number")}function Aqn(t,e,I){var l,n;if(zVI(t)||zVI(e)||t.prototype!==e.prototype)return!1;if(UVI(t))return UVI(e)?(t=xVI.call(t),e=xVI.call(e),OVI(t,e,I)):!1;if(BVI(t)){if(!BVI(e)||t.length!==e.length)return!1;for(l=0;l=0;l--)if(a[l]!=c[l])return!1;for(l=a.length-1;l>=0;l--)if(n=a[l],!OVI(t[n],e[n],I))return!1;return typeof t==typeof e}});var KVI=Y((tzr,_VI)=>{o();var Fqn=dAe(),TVI=SVI();_VI.exports=qi;function qi(t,e,I,l){if(!t)throw Fqn(e,I,l)}qi.fail=function(t,e,I){qi(!1,t,e,I)};qi.equal=function(t,e,I,l,n){qi(t==e,I,l,n)};qi.notEqual=function(t,e,I,l,n){qi(t!=e,I,l,n)};qi.ok=function(t,e,I,l){qi(t,e,I,l)};qi.strictEqual=function(t,e,I,l,n){qi(t===e,I,l,n)};qi.notStrictEqual=function(t,e,I,l,n){qi(t!==e,I,l,n)};qi.deepEqual=function(t,e,I,l,n){qi(TVI(t,e),I,l,n)};qi.notDeepEqual=function(t,e,I,l,n){qi(!TVI(t,e),I,l,n)}});var qVI=Y((lzr,DVI)=>{o();DVI.exports=j1;function j1(t,e){if(!(this instanceof j1))return new j1(t,e);this.proto=t,this.target=e,this.methods=[],this.getters=[],this.setters=[],this.fluents=[]}j1.prototype.method=function(t){var e=this.proto,I=this.target;return this.methods.push(t),e[t]=function(){return this[I][t].apply(this[I],arguments)},this};j1.prototype.access=function(t){return this.getter(t).setter(t)};j1.prototype.getter=function(t){var e=this.proto,I=this.target;return this.getters.push(t),e.__defineGetter__(t,function(){return this[I][t]}),this};j1.prototype.setter=function(t){var e=this.proto,I=this.target;return this.setters.push(t),e.__defineSetter__(t,function(l){return this[I][t]=l}),this};j1.prototype.fluent=function(t){var e=this.proto,I=this.target;return this.fluents.push(t),e[t]=function(l){return typeof l<"u"?(this[I][t]=l,this):this[I][t]},this}});var r$e=Y((azr,PVI)=>{"use strict";o();PVI.exports=Xqn;function Xqn(t){if(!t)throw new TypeError("argument namespace is required");function e(I){}return e._file=void 0,e._ignored=!0,e._namespace=t,e._traced=!1,e._warned=Object.create(null),e.function=gqn,e.property=vqn,e}function gqn(t,e){if(typeof t!="function")throw new TypeError("argument fn must be a function");return t}function vqn(t,e,I){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("argument obj must be object");var l=Object.getOwnPropertyDescriptor(t,e);if(!l)throw new TypeError("must call property on owner object");if(!l.configurable)throw new TypeError("property must be configurable")}});var eYI=Y((rzr,$VI)=>{"use strict";o();var Dte=require("crypto");function yqn(t,e){if(t.length!==e.length)return!1;if(Dte.timingSafeEqual)return Dte.timingSafeEqual(t,e);for(var I=0;I{"use strict";o();var Hqn=eYI(),Qqn=require("crypto");function $M(t,e,I){if(e||(e="sha1"),I||(I="base64"),!(this instanceof $M))return new $M(t,e,I);if(!t||!(0 in t))throw new Error("Keys must be provided.");function l(n,a){return Qqn.createHmac(e,a).update(n).digest(I).replace(/\/|\+|=/g,function(c){return{"/":"_","+":"-","=":""}[c]})}this.sign=function(n){return l(n,t[0])},this.verify=function(n,a){return this.index(n,a)>-1},this.index=function(n,a){for(var c=0,r=t.length;c)")};tYI.exports=$M});var cYI=Y((Gzr,aYI)=>{"use strict";o();var mAe=r$e()("cookies"),lYI=IYI(),fqn=require("http"),bAe=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Eqn=/^(?:low|medium|high)$/i,s$e=Object.create(null),Jqn=/[\^$\\.*+?()[\]{}|]/g,Cqn=/[;=]/,Lqn=/[;]/,kqn=/^(?:lax|none|strict)$/i;function IH(t,e,I){if(!(this instanceof IH))return new IH(t,e,I);this.secure=void 0,this.request=t,this.response=e,I&&(Array.isArray(I)?(mAe('"keys" argument; provide using options {"keys": [...]}'),this.keys=new lYI(I)):I.constructor&&I.constructor.name==="Keygrip"?(mAe('"keys" argument; provide using options {"keys": keygrip}'),this.keys=I):(this.keys=Array.isArray(I.keys)?new lYI(I.keys):I.keys,this.secure=I.secure))}IH.prototype.get=function(t,e){var I=t+".sig",l,n,a,c,r,s,i=e&&e.signed!==void 0?e.signed:!!this.keys;if(l=this.request.headers.cookie,!!l&&(n=l.match(xqn(t)),!!n)){if(a=n[1],a[0]==='"'&&(a=a.slice(1,-1)),!e||!i)return a;if(c=this.get(I),!!c){if(r=t+"="+a,!this.keys)throw new Error(".keys required for signed cookies");if(s=this.keys.index(r,c),s<0)this.set(I,null,{path:"/",signed:!1});else return s&&this.set(I,this.keys.sign(r),{signed:!1}),a}}};IH.prototype.set=function(t,e,I){var l=this.response,n=this.request,a=l.getHeader("Set-Cookie")||[],c=new yb(t,e,I),r=I&&I.signed!==void 0?I.signed:!!this.keys,s=this.secure===void 0?n.protocol==="https"||jqn(n):!!this.secure;if(typeof a=="string"&&(a=[a]),!s&&I&&I.secure)throw new Error("Cannot send secure cookie over unencrypted connection");if(c.secure=I&&I.secure!==void 0?I.secure:s,I&&"secureProxy"in I&&(mAe('"secureProxy" option; use "secure" option, provide "secure" to constructor if needed'),c.secure=I.secureProxy),nYI(a,c),I&&r){if(!this.keys)throw new Error(".keys required for signed cookies");c.value=this.keys.sign(c.toString()),c.name+=".sig",nYI(a,c)}var i=l.set?fqn.OutgoingMessage.prototype.setHeader:l.setHeader;return i.call(l,"Set-Cookie",a),this};function yb(t,e,I){if(!bAe.test(t)||Cqn.test(t))throw new TypeError("argument name is invalid");if(e&&(!bAe.test(e)||Lqn.test(e)))throw new TypeError("argument value is invalid");this.name=t,this.value=e||"";for(var t in I)this[t]=I[t];if(this.value||(this.expires=new Date(0),this.maxAge=null),this.path&&!bAe.test(this.path))throw new TypeError("option path is invalid");if(this.domain&&!bAe.test(this.domain))throw new TypeError("option domain is invalid");if(typeof this.maxAge=="number"?isNaN(this.maxAge)||!isFinite(this.maxAge):this.maxAge)throw new TypeError("option maxAge is invalid");if(this.priority&&!Eqn.test(this.priority))throw new TypeError("option priority is invalid");if(this.sameSite&&this.sameSite!==!0&&!kqn.test(this.sameSite))throw new TypeError("option sameSite is invalid")}yb.prototype.path="/";yb.prototype.expires=void 0;yb.prototype.domain=void 0;yb.prototype.httpOnly=!0;yb.prototype.partitioned=!1;yb.prototype.priority=void 0;yb.prototype.sameSite=!1;yb.prototype.secure=!1;yb.prototype.overwrite=!1;yb.prototype.toString=function(){return this.name+"="+this.value};yb.prototype.toHeader=function(){var t=this.toString();return this.maxAge&&(this.expires=new Date(Date.now()+this.maxAge)),this.path&&(t+="; path="+this.path),this.expires&&(t+="; expires="+this.expires.toUTCString()),this.domain&&(t+="; domain="+this.domain),this.priority&&(t+="; priority="+this.priority.toLowerCase()),this.sameSite&&(t+="; samesite="+(this.sameSite===!0?"strict":this.sameSite.toLowerCase())),this.secure&&(t+="; secure"),this.httpOnly&&(t+="; httponly"),this.partitioned&&(t+="; partitioned"),t};Object.defineProperty(yb.prototype,"maxage",{configurable:!0,enumerable:!0,get:function(){return this.maxAge},set:function(t){return this.maxAge=t}});mAe.property(yb.prototype,"maxage",'"maxage"; use "maxAge" instead');function xqn(t){return s$e[t]||(s$e[t]=new RegExp("(?:^|;) *"+t.replace(Jqn,"\\$&")+"=([^;]*)")),s$e[t]}function jqn(t){return t.socket?t.socket.encrypted:t.connection.encrypted}function nYI(t,e){if(e.overwrite)for(var I=t.length-1;I>=0;I--)t[I].indexOf(e.name+"=")===0&&t.splice(I,1);t.push(e.toHeader())}IH.connect=IH.express=function(t){return function(e,I,l){e.cookies=I.cookies=new IH(e,I,{keys:t}),l()}};IH.Cookie=yb;aYI.exports=IH});var oYI=Y((uzr,pAe)=>{"use strict";o();var o$e=require("util"),Uqn=dAe(),Oqn=KVI(),sYI=qVI(),rYI=qM(),zqn=cYI(),ZAe=Symbol("context#cookies"),i$e=pAe.exports={inspect(){return this===i$e?this:this.toJSON()},toJSON(){return{request:this.request.toJSON(),response:this.response.toJSON(),app:this.app.toJSON(),originalUrl:this.originalUrl,req:"",res:"",socket:""}},assert:Oqn,throw(...t){throw Uqn(...t)},onerror(t){if(t==null)return;Object.prototype.toString.call(t)==="[object Error]"||t instanceof Error||(t=new Error(o$e.format("non-error thrown: %j",t)));let I=!1;if((this.headerSent||!this.writable)&&(I=t.headerSent=!0),this.app.emit("error",t,this),I)return;let{res:l}=this;typeof l.getHeaderNames=="function"?l.getHeaderNames().forEach(r=>l.removeHeader(r)):l._headers={},this.set(t.headers),this.type="text";let n=t.status||t.statusCode;t.code==="ENOENT"&&(n=404),(typeof n!="number"||!rYI[n])&&(n=500);let a=rYI[n],c=t.expose?t.message:a;this.status=t.status=n,this.length=m.Buffer.byteLength(c),l.end(c)},get cookies(){return this[ZAe]||(this[ZAe]=new zqn(this.req,this.res,{keys:this.app.keys,secure:this.request.secure})),this[ZAe]},set cookies(t){this[ZAe]=t}};o$e.inspect.custom&&(pAe.exports[o$e.inspect.custom]=pAe.exports.inspect);sYI(i$e,"response").method("attachment").method("redirect").method("remove").method("vary").method("has").method("set").method("append").method("flushHeaders").access("status").access("message").access("body").access("length").access("type").access("lastModified").access("etag").getter("headerSent").getter("writable");sYI(i$e,"request").method("acceptsLanguages").method("acceptsEncodings").method("acceptsCharsets").method("accepts").method("get").method("is").access("querystring").access("idempotent").access("socket").access("search").access("method").access("query").access("path").access("url").access("accept").getter("origin").getter("href").getter("subdomains").getter("protocol").getter("host").getter("hostname").getter("URL").getter("header").getter("headers").getter("secure").getter("stale").getter("fresh").getter("ips").getter("ip")});var uYI=Y((mzr,G$e)=>{"use strict";o();G$e.exports=dYI;G$e.exports.preferredCharsets=dYI;var Bqn=/^\s*([^\s;]+)\s*(?:;(.*))?$/;function Mqn(t){for(var e=t.split(","),I=0,l=0;I0}});var hYI=Y((pzr,d$e)=>{"use strict";o();d$e.exports=pYI;d$e.exports.preferredEncodings=pYI;var Dqn=/^\s*([^\s;]+)\s*(?:;(.*))?$/;function qqn(t){for(var e=t.split(","),I=!1,l=1,n=0,a=0;n0}});var RYI=Y((Wzr,u$e)=>{"use strict";o();u$e.exports=YYI;u$e.exports.preferredLanguages=YYI;var tPn=/^\s*([^\s\-;]+)(?:-([^\s;]+))?\s*(?:;(.*))?$/;function IPn(t){for(var e=t.split(","),I=0,l=0;I0}});var yYI=Y((Vzr,b$e)=>{"use strict";o();b$e.exports=gYI;b$e.exports.preferredMediaTypes=gYI;var cPn=/^\s*([^\s\/;]+)\/([^;\s]+)\s*(?:;(.*))?$/;function rPn(t){for(var e=dPn(t),I=0,l=0;I0)if(a.every(function(c){return e.params[c]=="*"||(e.params[c]||"").toLowerCase()==(l.params[c]||"").toLowerCase()}))n|=1;else return null;return{i:I,o:e.i,q:e.q,s:n}}function gYI(t,e){var I=rPn(t===void 0?"*/*":t||"");if(!e)return I.filter(FYI).sort(AYI).map(iPn);var l=e.map(function(a,c){return sPn(a,I,c)});return l.filter(FYI).sort(AYI).map(function(a){return e[l.indexOf(a)]})}function AYI(t,e){return e.q-t.q||e.s-t.s||t.o-e.o||t.i-e.i||0}function iPn(t){return t.type+"/"+t.subtype}function FYI(t){return t.q>0}function vYI(t){for(var e=0,I=0;(I=t.indexOf('"',I))!==-1;)e++,I++;return e}function GPn(t){var e=t.indexOf("="),I,l;return e===-1?I=t:(I=t.substr(0,e),l=t.substr(e+1)),[I,l]}function dPn(t){for(var e=t.split(","),I=1,l=0;I{"use strict";o();var bPn=uYI(),mPn=hYI(),ZPn=RYI(),pPn=yYI();m$e.exports=la;m$e.exports.Negotiator=la;function la(t){if(!(this instanceof la))return new la(t);this.request=t}la.prototype.charset=function(e){var I=this.charsets(e);return I&&I[0]};la.prototype.charsets=function(e){return bPn(this.request.headers["accept-charset"],e)};la.prototype.encoding=function(e){var I=this.encodings(e);return I&&I[0]};la.prototype.encodings=function(e){return mPn(this.request.headers["accept-encoding"],e)};la.prototype.language=function(e){var I=this.languages(e);return I&&I[0]};la.prototype.languages=function(e){return ZPn(this.request.headers["accept-language"],e)};la.prototype.mediaType=function(e){var I=this.mediaTypes(e);return I&&I[0]};la.prototype.mediaTypes=function(e){return pPn(this.request.headers.accept,e)};la.prototype.preferredCharset=la.prototype.charset;la.prototype.preferredCharsets=la.prototype.charsets;la.prototype.preferredEncoding=la.prototype.encoding;la.prototype.preferredEncodings=la.prototype.encodings;la.prototype.preferredLanguage=la.prototype.language;la.prototype.preferredLanguages=la.prototype.languages;la.prototype.preferredMediaType=la.prototype.mediaType;la.prototype.preferredMediaTypes=la.prototype.mediaTypes});var QYI=Y((Fzr,HYI)=>{"use strict";o();var hPn=wYI(),WPn=Lq();HYI.exports=dp;function dp(t){if(!(this instanceof dp))return new dp(t);this.headers=t.headers,this.negotiator=new hPn(t)}dp.prototype.type=dp.prototype.types=function(t){var e=t;if(e&&!Array.isArray(e)){e=new Array(arguments.length);for(var I=0;I{"use strict";o();var fYI=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,YPn=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,EYI=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,RPn=/\\([\u000b\u0020-\u00ff])/g,APn=/([\\"])/g,JYI=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;Z$e.format=FPn;Z$e.parse=XPn;function FPn(t){if(!t||typeof t!="object")throw new TypeError("argument obj is required");var e=t.parameters,I=t.type;if(!I||!JYI.test(I))throw new TypeError("invalid type");var l=I;if(e&&typeof e=="object")for(var n,a=Object.keys(e).sort(),c=0;c0&&!YPn.test(e))throw new TypeError("invalid parameter value");return'"'+e.replace(APn,"\\$1")+'"'}function yPn(t){this.parameters=Object.create(null),this.type=t}});var OYI=Y((yzr,p$e)=>{"use strict";o();var kYI=require("url"),LYI=kYI.parse,hAe=kYI.Url;p$e.exports=xYI;p$e.exports.original=wPn;function xYI(t){var e=t.url;if(e!==void 0){var I=t._parsedUrl;return UYI(e,I)?I:(I=jYI(e),I._raw=e,t._parsedUrl=I)}}function wPn(t){var e=t.originalUrl;if(typeof e!="string")return xYI(t);var I=t._parsedOriginalUrl;return UYI(e,I)?I:(I=jYI(e),I._raw=e,t._parsedOriginalUrl=I)}function jYI(t){if(typeof t!="string"||t.charCodeAt(0)!==47)return LYI(t);for(var e=t,I=null,l=null,n=1;n{"use strict";o();var HPn=/(?:^|,)\s*?no-cache\s*?(?:,|$)/;BYI.exports=QPn;function QPn(t,e){var I=t["if-modified-since"],l=t["if-none-match"];if(!I&&!l)return!1;var n=t["cache-control"];if(n&&HPn.test(n))return!1;if(l&&l!=="*"){var a=e.etag;if(!a)return!1;for(var c=!0,r=fPn(l),s=0;s{"use strict";o();var SYI=require("url").URL,EPn=require("net"),JPn=QYI(),CPn=CYI(),TYI=require("url").format,WAe=OYI(),_YI=require("querystring"),LPn=$8e(),kPn=MYI(),xPn=oAe(),KYI=require("util"),NAe=Symbol("context#ip");VAe.exports={get header(){return this.req.headers},set header(t){this.req.headers=t},get headers(){return this.req.headers},set headers(t){this.req.headers=t},get url(){return this.req.url},set url(t){this.req.url=t},get origin(){return`${this.protocol}://${this.host}`},get href(){return/^https?:\/\//i.test(this.originalUrl)?this.originalUrl:this.origin+this.originalUrl},get method(){return this.req.method},set method(t){this.req.method=t},get path(){return WAe(this.req).pathname},set path(t){let e=WAe(this.req);e.pathname!==t&&(e.pathname=t,e.path=null,this.url=TYI(e))},get query(){let t=this.querystring,e=this._querycache=this._querycache||{};return e[t]||(e[t]=_YI.parse(t))},set query(t){this.querystring=_YI.stringify(t)},get querystring(){return this.req&&WAe(this.req).query||""},set querystring(t){let e=WAe(this.req);e.search!==`?${t}`&&(e.search=t,e.path=null,this.url=TYI(e))},get search(){return this.querystring?`?${this.querystring}`:""},set search(t){this.querystring=t},get host(){let e=this.app.proxy&&this.get("X-Forwarded-Host");if(e||(this.req.httpVersionMajor>=2&&(e=this.get(":authority")),e||(e=this.get("Host"))),!e)return"";if(e=h$e(e,1)[0],e.includes("@"))try{e=new SYI(`http://${e}`).host}catch{return""}return e},get hostname(){let t=this.host;return t?t[0]==="["?this.URL.hostname||"":t.split(":",1)[0]:""},get URL(){if(!this.memoizedURL){let t=this.originalUrl||"";try{this.memoizedURL=new SYI(`${this.origin}${t}`)}catch{this.memoizedURL=Object.create(null)}}return this.memoizedURL},get fresh(){let t=this.method,e=this.ctx.status;return t!=="GET"&&t!=="HEAD"?!1:e>=200&&e<300||e===304?kPn(this.header,this.response.header):!1},get stale(){return!this.fresh},get idempotent(){return!!~["GET","HEAD","PUT","DELETE","OPTIONS","TRACE"].indexOf(this.method)},get socket(){return this.req.socket},get charset(){try{let{parameters:t}=CPn.parse(this.req);return t.charset||""}catch{return""}},get length(){let t=this.get("Content-Length");if(t!=="")return~~t},get protocol(){if(this.socket.encrypted)return"https";if(!this.app.proxy)return"http";let t=this.get("X-Forwarded-Proto");return t?h$e(t,1)[0]:"http"},get secure(){return this.protocol==="https"},get ips(){let t=this.app.proxy,e=this.get(this.app.proxyIpHeader),I=t&&e?h$e(e):[];return this.app.maxIpsCount>0&&(I=I.slice(-this.app.maxIpsCount)),I},get ip(){return this[NAe]||(this[NAe]=this.ips[0]||this.socket.remoteAddress||""),this[NAe]},set ip(t){this[NAe]=t},get subdomains(){let t=this.app.subdomainOffset,e=this.hostname;return EPn.isIP(e)?[]:e.split(".").reverse().slice(t)},get accept(){return this._accept||(this._accept=JPn(this.req))},set accept(t){this._accept=t},accepts(...t){return this.accept.types(...t)},acceptsEncodings(...t){return this.accept.encodings(...t)},acceptsCharsets(...t){return this.accept.charsets(...t)},acceptsLanguages(...t){return this.accept.languages(...t)},is(t,...e){return LPn(this.req,t,...e)},get type(){let t=this.get("Content-Type");return t?t.split(";")[0]:""},get(t){let e=this.req;switch(t=t.toLowerCase()){case"referer":case"referrer":return e.headers.referrer||e.headers.referer||"";default:return e.headers[t]||""}},inspect(){if(this.req)return this.toJSON()},toJSON(){return xPn(this,["method","url","header"])}};KYI.inspect.custom&&(VAe.exports[KYI.inspect.custom]=VAe.exports.inspect);function h$e(t,e){return t.split(",",e).map(I=>I.trim())}});var eRI=Y((Jzr,$YI)=>{o();var qYI=Array.prototype.slice;$YI.exports=eS.default=eS.co=eS;eS.wrap=function(t){return e.__generatorFunction__=t,e;function e(){return eS.call(this,t.apply(this,arguments))}};function eS(t){var e=this,I=qYI.call(arguments,1);return new Promise(function(l,n){if(typeof t=="function"&&(t=t.apply(e,I)),!t||typeof t.next!="function")return l(t);a();function a(s){var i;try{i=t.next(s)}catch(G){return n(G)}r(i)}function c(s){var i;try{i=t.throw(s)}catch(G){return n(G)}r(i)}function r(s){if(s.done)return l(s.value);var i=W$e.call(e,s.value);return i&&N$e(i)?i.then(a,c):c(new TypeError('You may only yield a function, promise, generator, array, or object, but the following object was passed: "'+String(s.value)+'"'))}})}function W$e(t){return!t||N$e(t)?t:zPn(t)||PYI(t)?eS.call(this,t):typeof t=="function"?jPn.call(this,t):Array.isArray(t)?UPn.call(this,t):BPn(t)?OPn.call(this,t):t}function jPn(t){var e=this;return new Promise(function(I,l){t.call(e,function(n,a){if(n)return l(n);arguments.length>2&&(a=qYI.call(arguments,1)),I(a)})})}function UPn(t){return Promise.all(t.map(W$e,this))}function OPn(t){for(var e=new t.constructor,I=Object.keys(t),l=[],n=0;n{"use strict";o();var tRI=eRI(),MPn=I$e();IRI.exports=YAe;function YAe(t){if(typeof t!="function")throw new TypeError("middleware must be a function");if(t.constructor.name!=="GeneratorFunction"&&t.constructor.name!=="AsyncGeneratorFunction")return t;let e=function(I,l){return tRI.call(I,t.call(I,function*(n){return yield n()}(l)))};return e._name=t._name||t.name,e}YAe.compose=function(t){return Array.isArray(t)||(t=Array.from(arguments)),MPn(t.map(YAe))};YAe.back=function(t){if(typeof t!="function")throw new TypeError("middleware must be a function");if(t.constructor.name==="GeneratorFunction"||t.constructor.name==="AsyncGeneratorFunction")return t;let e=function*(I){let l=this,n=!1;yield t(l,function(){if(n)throw new Error("next() called multiple times");return n=!0,tRI.call(l,I)})};return e._name=t._name||t.name,e}});var cRI=Y((xzr,Y$e)=>{"use strict";o();var SPn=YNI(),nRI=gNI()("koa:application"),TPn=_8e(),_Pn=require("assert"),KPn=WVI(),DPn=I$e(),qPn=oYI(),PPn=DYI(),$Pn=qM(),e7n=require("events"),V$e=require("util"),t7n=require("stream"),I7n=require("http"),l7n=oAe(),n7n=lRI(),a7n=r$e()("koa"),{HttpError:c7n}=dAe();Y$e.exports=class aRI extends e7n{constructor(e){if(super(),e=e||{},this.proxy=e.proxy||!1,this.subdomainOffset=e.subdomainOffset||2,this.proxyIpHeader=e.proxyIpHeader||"X-Forwarded-For",this.maxIpsCount=e.maxIpsCount||0,this.env=e.env||"production",e.keys&&(this.keys=e.keys),this.middleware=[],this.context=Object.create(qPn),this.request=Object.create(PPn),this.response=Object.create(KPn),V$e.inspect.custom&&(this[V$e.inspect.custom]=this.inspect),e.asyncLocalStorage){let{AsyncLocalStorage:I}=require("async_hooks");_Pn(I,"Requires node 12.17.0 or higher to enable asyncLocalStorage"),this.ctxStorage=new I}}listen(...e){return nRI("listen"),I7n.createServer(this.callback()).listen(...e)}toJSON(){return l7n(this,["subdomainOffset","proxy","env"])}inspect(){return this.toJSON()}use(e){if(typeof e!="function")throw new TypeError("middleware must be a function!");return SPn(e)&&(a7n("Support for generators will be removed in v3. See the documentation for examples of how to convert old middleware https://github.com/koajs/koa/blob/master/docs/migration.md"),e=n7n(e)),nRI("use %s",e._name||e.name||"-"),this.middleware.push(e),this}callback(){let e=DPn(this.middleware);return this.listenerCount("error")||this.on("error",this.onerror),(l,n)=>{let a=this.createContext(l,n);return this.ctxStorage?this.ctxStorage.run(a,async()=>await this.handleRequest(a,e)):this.handleRequest(a,e)}}get currentContext(){if(this.ctxStorage)return this.ctxStorage.getStore()}handleRequest(e,I){let l=e.res;l.statusCode=404;let n=c=>e.onerror(c),a=()=>r7n(e);return TPn(l,n),I(e).then(a).catch(n)}createContext(e,I){let l=Object.create(this.context),n=l.request=Object.create(this.request),a=l.response=Object.create(this.response);return l.app=n.app=a.app=this,l.req=n.req=a.req=e,l.res=n.res=a.res=I,n.ctx=a.ctx=l,n.response=a,a.request=n,l.originalUrl=n.originalUrl=e.url,l.state={},l}onerror(e){if(!(Object.prototype.toString.call(e)==="[object Error]"||e instanceof Error))throw new TypeError(V$e.format("non-error thrown: %j",e));if(e.status===404||e.expose||this.silent)return;let l=e.stack||e.toString();console.error(` +${l.replace(/^/gm," ")} +`)}static get default(){return aRI}createAsyncCtxStorageMiddleware(){let e=this;return async function(l,n){await e.ctxStorage.run(l,async()=>await n())}}};function r7n(t){if(t.respond===!1||!t.writable)return;let e=t.res,I=t.body,l=t.status;if($Pn.empty[l])return t.body=null,e.end();if(t.method==="HEAD"){if(!e.headersSent&&!t.response.has("Content-Length")){let{length:n}=t.response;Number.isInteger(n)&&(t.length=n)}return e.end()}if(I==null)return t.response._explicitNullBody?(t.response.remove("Content-Type"),t.response.remove("Transfer-Encoding"),e.end()):(t.req.httpVersionMajor>=2?I=String(l):I=t.message||String(l),e.headersSent||(t.type="text",t.length=m.Buffer.byteLength(I)),e.end(I));if(m.Buffer.isBuffer(I)||typeof I=="string")return e.end(I);if(I instanceof t7n)return I.pipe(e);I=JSON.stringify(I),e.headersSent||(t.length=m.Buffer.byteLength(I)),e.end(I)}Y$e.exports.HttpError=c7n});var rRI={};tr(rRI,{HttpError:()=>o7n,default:()=>s7n});var R$e,s7n,o7n,sRI=g(()=>{o();R$e=z(cRI(),1),s7n=R$e.default,o7n=R$e.default.HttpError});var iRI=Y((Ozr,oRI)=>{o();var i7n=t$e();oRI.exports=function(t){return t={...{allowMethods:"GET,HEAD,PUT,POST,DELETE,PATCH",secureContext:!1},...t},Array.isArray(t.exposeHeaders)&&(t.exposeHeaders=t.exposeHeaders.join(",")),Array.isArray(t.allowMethods)&&(t.allowMethods=t.allowMethods.join(",")),Array.isArray(t.allowHeaders)&&(t.allowHeaders=t.allowHeaders.join(",")),t.maxAge&&(t.maxAge=String(t.maxAge)),t.keepHeadersOnError=t.keepHeadersOnError===void 0||!!t.keepHeadersOnError,async function(l,n){let a=l.get("Origin");l.vary("Origin");let c;if(typeof t.origin=="function"){if(c=await t.origin(l),!c)return await n()}else c=t.origin||"*";let r;typeof t.credentials=="function"?r=await t.credentials(l):r=!!t.credentials,r&&c==="*"&&(c=a);let s={};function i(G,d){l.set(G,d),s[G]=d}if(l.method!=="OPTIONS"){if(i("Access-Control-Allow-Origin",c),r===!0&&i("Access-Control-Allow-Credentials","true"),t.exposeHeaders&&i("Access-Control-Expose-Headers",t.exposeHeaders),t.secureContext&&(i("Cross-Origin-Opener-Policy","same-origin"),i("Cross-Origin-Embedder-Policy","require-corp")),!t.keepHeadersOnError)return await n();try{return await n()}catch(G){let d=G.headers||{},u=i7n.append(d.vary||d.Vary||"","Origin");throw delete d.Vary,G.headers={...d,...s,vary:u},G}}else{if(!l.get("Access-Control-Request-Method"))return await n();l.set("Access-Control-Allow-Origin",c),r===!0&&l.set("Access-Control-Allow-Credentials","true"),t.maxAge&&l.set("Access-Control-Max-Age",t.maxAge),t.privateNetworkAccess&&l.get("Access-Control-Request-Private-Network")&&l.set("Access-Control-Allow-Private-Network","true"),t.allowMethods&&l.set("Access-Control-Allow-Methods",t.allowMethods),t.secureContext&&(i("Cross-Origin-Opener-Policy","same-origin"),i("Cross-Origin-Embedder-Policy","require-corp"));let G=t.allowHeaders;G||(G=l.get("Access-Control-Request-Headers")),G&&l.set("Access-Control-Allow-Headers",G),l.status=204}}}});var dRI=Y((Bzr,GRI)=>{"use strict";o();GRI.exports=function(e,I){if(I=I.split(":")[0],e=+e,!e)return!1;switch(I){case"http":case"ws":return e!==80;case"https":case"wss":return e!==443;case"ftp":return e!==21;case"gopher":return e!==70;case"file":return!1}return e!==0}});var qte=Y(bRI=>{o();var lH=bRI,G7n=require("url"),uRI=require("util")._extend,d7n=dRI(),u7n=/(^|,)\s*upgrade\s*($|,)/i,A$e=/^https|wss/;lH.isSSL=A$e;lH.setupOutgoing=function(t,e,I,l){t.port=e[l||"target"].port||(A$e.test(e[l||"target"].protocol)?443:80),["host","hostname","socketPath","pfx","key","passphrase","cert","ca","ciphers","secureProtocol"].forEach(function(r){t[r]=e[l||"target"][r]}),t.method=e.method||I.method,t.headers=uRI({},I.headers),e.headers&&uRI(t.headers,e.headers),e.auth&&(t.auth=e.auth),e.ca&&(t.ca=e.ca),A$e.test(e[l||"target"].protocol)&&(t.rejectUnauthorized=typeof e.secure>"u"?!0:e.secure),t.agent=e.agent||!1,t.localAddress=e.localAddress,t.agent||(t.headers=t.headers||{},(typeof t.headers.connection!="string"||!u7n.test(t.headers.connection))&&(t.headers.connection="close"));var n=e[l||"target"],a=n&&e.prependPath!==!1&&n.path||"",c=e.toProxy?I.url:G7n.parse(I.url).path||"";return c=e.ignorePath?"":c,t.path=lH.urlJoin(a,c),e.changeOrigin&&(t.headers.host=d7n(t.port,e[l||"target"].protocol)&&!b7n(t.host)?t.host+":"+t.port:t.host),t};lH.setupSocket=function(t){return t.setTimeout(0),t.setNoDelay(!0),t.setKeepAlive(!0,0),t};lH.getPort=function(t){var e=t.headers.host?t.headers.host.match(/:(\d+)/):"";return e?e[1]:lH.hasEncryptedConnection(t)?"443":"80"};lH.hasEncryptedConnection=function(t){return!!(t.connection.encrypted||t.connection.pair)};lH.urlJoin=function(){var t=Array.prototype.slice.call(arguments),e=t.length-1,I=t[e],l=I.split("?"),n;return t[e]=l.shift(),n=[t.filter(Boolean).join("/").replace(/\/+/g,"/").replace("http:/","http://").replace("https:/","https://")],n.push.apply(n,l),n.join("?")};lH.rewriteCookieProperty=function t(e,I,l){return Array.isArray(e)?e.map(function(n){return t(n,I,l)}):e.replace(new RegExp("(;\\s*"+l+"=)([^;]+)","i"),function(n,a,c){var r;if(c in I)r=I[c];else if("*"in I)r=I["*"];else return n;return r?a+r:""})};function b7n(t){return!!~t.indexOf(":")}});var hRI=Y((_zr,pRI)=>{o();var mRI=require("url"),ZRI=qte(),m7n=/^201|30(1|2|7|8)$/;pRI.exports={removeChunked:function(e,I,l){e.httpVersion==="1.0"&&delete l.headers["transfer-encoding"]},setConnection:function(e,I,l){e.httpVersion==="1.0"?l.headers.connection=e.headers.connection||"close":e.httpVersion!=="2.0"&&!l.headers.connection&&(l.headers.connection=e.headers.connection||"keep-alive")},setRedirectHostRewrite:function(e,I,l,n){if((n.hostRewrite||n.autoRewrite||n.protocolRewrite)&&l.headers.location&&m7n.test(l.statusCode)){var a=mRI.parse(n.target),c=mRI.parse(l.headers.location);if(a.host!=c.host)return;n.hostRewrite?c.host=n.hostRewrite:n.autoRewrite&&(c.host=e.headers.host),n.protocolRewrite&&(c.protocol=n.protocolRewrite),l.headers.location=c.format()}},writeHeaders:function(e,I,l,n){var a=n.cookieDomainRewrite,c=n.cookiePathRewrite,r=n.preserveHeaderKeyCase,s,i=function(u,b){b!=null&&(a&&u.toLowerCase()==="set-cookie"&&(b=ZRI.rewriteCookieProperty(b,a,"domain")),c&&u.toLowerCase()==="set-cookie"&&(b=ZRI.rewriteCookieProperty(b,c,"path")),I.setHeader(String(u).trim(),b))};if(typeof a=="string"&&(a={"*":a}),typeof c=="string"&&(c={"*":c}),r&&l.rawHeaders!=null){s={};for(var G=0;G{o();var Pte;WRI.exports=function(){if(!Pte){try{Pte=uI()("follow-redirects")}catch{}typeof Pte!="function"&&(Pte=function(){})}Pte.apply(null,arguments)}});var FRI=Y((Pzr,C$e)=>{o();var eIe=require("url"),$te=eIe.URL,Z7n=require("http"),p7n=require("https"),y$e=require("stream").Writable,w$e=require("assert"),VRI=NRI();(function(){var e=typeof process<"u",I=typeof window<"u"&&typeof document<"u",l=N4(Error.captureStackTrace);!e&&(I||!l)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var H$e=!1;try{w$e(new $te(""))}catch(t){H$e=t.code==="ERR_INVALID_URL"}var h7n=["Authorization","Proxy-Authorization","Cookie"],W7n=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],Q$e=["abort","aborted","connect","error","socket","timeout"],f$e=Object.create(null);Q$e.forEach(function(t){f$e[t]=function(e,I,l){this._redirectable.emit(t,e,I,l)}});var X$e=tIe("ERR_INVALID_URL","Invalid URL",TypeError),g$e=tIe("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),N7n=tIe("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",g$e),V7n=tIe("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),Y7n=tIe("ERR_STREAM_WRITE_AFTER_END","write after end"),R7n=y$e.prototype.destroy||RRI;function Em(t,e){y$e.call(this),this._sanitizeOptions(t),this._options=t,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],e&&this.on("response",e);var I=this;this._onNativeResponse=function(l){try{I._processResponse(l)}catch(n){I.emit("error",n instanceof g$e?n:new g$e({cause:n}))}},this._headerFilter=new RegExp("^(?:"+h7n.concat(t.sensitiveHeaders).map(y7n).join("|")+")$","i"),this._performRequest()}Em.prototype=Object.create(y$e.prototype);Em.prototype.abort=function(){J$e(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};Em.prototype.destroy=function(t){return J$e(this._currentRequest,t),R7n.call(this,t),this};Em.prototype.write=function(t,e,I){if(this._ending)throw new Y7n;if(!W4(t)&&!g7n(t))throw new TypeError("data should be a string, Buffer or Uint8Array");if(N4(e)&&(I=e,e=null),t.length===0){I&&I();return}this._requestBodyLength+t.length<=this._options.maxBodyLength?(this._requestBodyLength+=t.length,this._requestBodyBuffers.push({data:t,encoding:e}),this._currentRequest.write(t,e,I)):(this.emit("error",new V7n),this.abort())};Em.prototype.end=function(t,e,I){if(N4(t)?(I=t,t=e=null):N4(e)&&(I=e,e=null),!t)this._ended=this._ending=!0,this._currentRequest.end(null,null,I);else{var l=this,n=this._currentRequest;this.write(t,e,function(){l._ended=!0,n.end(null,null,I)}),this._ending=!0}};Em.prototype.setHeader=function(t,e){this._options.headers[t]=e,this._currentRequest.setHeader(t,e)};Em.prototype.removeHeader=function(t){delete this._options.headers[t],this._currentRequest.removeHeader(t)};Em.prototype.setTimeout=function(t,e){var I=this;function l(c){c.setTimeout(t),c.removeListener("timeout",c.destroy),c.addListener("timeout",c.destroy)}function n(c){I._timeout&&clearTimeout(I._timeout),I._timeout=setTimeout(function(){I.emit("timeout"),a()},t),l(c)}function a(){I._timeout&&(clearTimeout(I._timeout),I._timeout=null),I.removeListener("abort",a),I.removeListener("error",a),I.removeListener("response",a),I.removeListener("close",a),e&&I.removeListener("timeout",e),I.socket||I._currentRequest.removeListener("socket",n)}return e&&this.on("timeout",e),this.socket?n(this.socket):this._currentRequest.once("socket",n),this.on("socket",l),this.on("abort",a),this.on("error",a),this.on("response",a),this.on("close",a),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(t){Em.prototype[t]=function(e,I){return this._currentRequest[t](e,I)}});["aborted","connection","socket"].forEach(function(t){Object.defineProperty(Em.prototype,t,{get:function(){return this._currentRequest[t]}})});Em.prototype._sanitizeOptions=function(t){if(t.headers||(t.headers={}),X7n(t.sensitiveHeaders)||(t.sensitiveHeaders=[]),t.host&&(t.hostname||(t.hostname=t.host),delete t.host),!t.pathname&&t.path){var e=t.path.indexOf("?");e<0?t.pathname=t.path:(t.pathname=t.path.substring(0,e),t.search=t.path.substring(e))}};Em.prototype._performRequest=function(){var t=this._options.protocol,e=this._options.nativeProtocols[t];if(!e)throw new TypeError("Unsupported protocol "+t);if(this._options.agents){var I=t.slice(0,-1);this._options.agent=this._options.agents[I]}var l=this._currentRequest=e.request(this._options,this._onNativeResponse);l._redirectable=this;for(var n of Q$e)l.on(n,f$e[n]);if(this._currentUrl=/^\//.test(this._options.path)?eIe.format(this._options):this._options.path,this._isRedirect){var a=0,c=this,r=this._requestBodyBuffers;(function s(i){if(l===c._currentRequest)if(i)c.emit("error",i);else if(a=400){t.responseUrl=this._currentUrl,t.redirects=this._redirects,this.emit("response",t),this._requestBodyBuffers=[];return}if(J$e(this._currentRequest),t.destroy(),++this._redirectCount>this._options.maxRedirects)throw new N7n;var l,n=this._options.beforeRedirect;n&&(l=Object.assign({Host:t.req.getHeader("host")},this._options.headers));var a=this._options.method;((e===301||e===302)&&this._options.method==="POST"||e===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],F$e(/^content-/i,this._options.headers));var c=F$e(/^host$/i,this._options.headers),r=E$e(this._currentUrl),s=c||r.host,i=/^\w+:/.test(I)?this._currentUrl:eIe.format(Object.assign(r,{host:s})),G=A7n(I,i);if(VRI("redirecting to",G.href),this._isRedirect=!0,v$e(G,this._options),(G.protocol!==r.protocol&&G.protocol!=="https:"||G.host!==s&&!F7n(G.host,s))&&F$e(this._headerFilter,this._options.headers),N4(n)){var d={headers:t.headers,statusCode:e},u={url:i,method:a,headers:l};n(this._options,d,u),this._sanitizeOptions(this._options)}this._performRequest()};function YRI(t){var e={maxRedirects:21,maxBodyLength:10485760},I={};return Object.keys(t).forEach(function(l){var n=l+":",a=I[n]=t[l],c=e[l]=Object.create(a);function r(i,G,d){return v7n(i)?i=v$e(i):W4(i)?i=v$e(E$e(i)):(d=G,G=ARI(i),i={protocol:n}),N4(G)&&(d=G,G=null),G=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},i,G),G.nativeProtocols=I,!W4(G.host)&&!W4(G.hostname)&&(G.hostname="::1"),w$e.equal(G.protocol,n,"protocol mismatch"),VRI("options",G),new Em(G,d)}function s(i,G,d){var u=c.request(i,G,d);return u.end(),u}Object.defineProperties(c,{request:{value:r,configurable:!0,enumerable:!0,writable:!0},get:{value:s,configurable:!0,enumerable:!0,writable:!0}})}),e}function RRI(){}function E$e(t){var e;if(H$e)e=new $te(t);else if(e=ARI(eIe.parse(t)),!W4(e.protocol))throw new X$e({input:t});return e}function A7n(t,e){return H$e?new $te(t,e):E$e(eIe.resolve(e,t))}function ARI(t){if(/^\[/.test(t.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(t.hostname))throw new X$e({input:t.href||t});if(/^\[/.test(t.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(t.host))throw new X$e({input:t.href||t});return t}function v$e(t,e){var I=e||{};for(var l of W7n)I[l]=t[l];return I.hostname.startsWith("[")&&(I.hostname=I.hostname.slice(1,-1)),I.port!==""&&(I.port=Number(I.port)),I.path=I.search?I.pathname+I.search:I.pathname,I}function F$e(t,e){var I;for(var l in e)t.test(l)&&(I=e[l],delete e[l]);return I===null||typeof I>"u"?void 0:String(I).trim()}function tIe(t,e,I){function l(n){N4(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,n||{}),this.code=t,this.message=this.cause?e+": "+this.cause.message:e}return l.prototype=new(I||Error),Object.defineProperties(l.prototype,{constructor:{value:l,enumerable:!1},name:{value:"Error ["+t+"]",enumerable:!1}}),l}function J$e(t,e){for(var I of Q$e)t.removeListener(I,f$e[I]);t.on("error",RRI),t.destroy(e)}function F7n(t,e){w$e(W4(t)&&W4(e));var I=t.length-e.length-1;return I>0&&t[I]==="."&&t.endsWith(e)}function X7n(t){return t instanceof Array}function W4(t){return typeof t=="string"||t instanceof String}function N4(t){return typeof t=="function"}function g7n(t){return typeof t=="object"&&"length"in t}function v7n(t){return $te&&t instanceof $te}function y7n(t){return t.replace(/[\]\\/()*+?.$]/g,"\\$&")}C$e.exports=YRI({http:Z7n,https:p7n});C$e.exports.wrap=YRI});var gRI=Y((eBr,XRI)=>{o();var w7n=require("http"),H7n=require("https"),IIe=hRI(),RAe=qte(),Q7n=FRI();IIe=Object.keys(IIe).map(function(t){return IIe[t]});var f7n={http:w7n,https:H7n};XRI.exports={deleteLength:function(e,I,l){(e.method==="DELETE"||e.method==="OPTIONS")&&!e.headers["content-length"]&&(e.headers["content-length"]="0",delete e.headers["transfer-encoding"])},timeout:function(e,I,l){l.timeout&&e.socket.setTimeout(l.timeout)},XHeaders:function(e,I,l){if(l.xfwd){var n=e.isSpdy||RAe.hasEncryptedConnection(e),a={for:e.connection.remoteAddress||e.socket.remoteAddress,port:RAe.getPort(e),proto:n?"https":"http"};["for","port","proto"].forEach(function(c){e.headers["x-forwarded-"+c]=(e.headers["x-forwarded-"+c]||"")+(e.headers["x-forwarded-"+c]?",":"")+a[c]}),e.headers["x-forwarded-host"]=e.headers["x-forwarded-host"]||e.headers.host||""}},stream:function(e,I,l,n,a,c){a.emit("start",e,I,l.target||l.forward);var r=l.followRedirects?Q7n:f7n,s=r.http,i=r.https;if(l.forward){var G=(l.forward.protocol==="https:"?i:s).request(RAe.setupOutgoing(l.ssl||{},l,e,"forward")),d=Z(G,l.forward);if(e.on("error",d),G.on("error",d),(l.buffer||e).pipe(G),!l.target)return I.end()}var u=(l.target.protocol==="https:"?i:s).request(RAe.setupOutgoing(l.ssl||{},l,e));u.on("socket",function(p){a&&!u.getHeader("expect")&&a.emit("proxyReq",u,e,I,l)}),l.proxyTimeout&&u.setTimeout(l.proxyTimeout,function(){u.abort()}),e.on("aborted",function(){u.abort()});var b=Z(u,l.target);e.on("error",b),u.on("error",b);function Z(p,W){return function(N){if(e.socket.destroyed&&N.code==="ECONNRESET")return a.emit("econnreset",N,e,I,W),p.abort();c?c(N,e,I,W):a.emit("error",N,e,I,W)}}(l.buffer||e).pipe(u),u.on("response",function(p){if(a&&a.emit("proxyRes",p,e,I),!I.headersSent&&!l.selfHandleResponse)for(var W=0;W{o();var E7n=require("http"),J7n=require("https"),tS=qte();vRI.exports={checkMethodAndHeader:function(e,I){if(e.method!=="GET"||!e.headers.upgrade||e.headers.upgrade.toLowerCase()!=="websocket")return I.destroy(),!0},XHeaders:function(e,I,l){if(l.xfwd){var n={for:e.connection.remoteAddress||e.socket.remoteAddress,port:tS.getPort(e),proto:tS.hasEncryptedConnection(e)?"wss":"ws"};["for","port","proto"].forEach(function(a){e.headers["x-forwarded-"+a]=(e.headers["x-forwarded-"+a]||"")+(e.headers["x-forwarded-"+a]?",":"")+n[a]})}},stream:function(e,I,l,n,a,c){var r=function(G,d){return Object.keys(d).reduce(function(u,b){var Z=d[b];if(!Array.isArray(Z))return u.push(b+": "+Z),u;for(var p=0;p{o();var fRI=JRI.exports,wRI=require("util")._extend,C7n=require("url").parse,ERI=$ge(),L7n=require("http"),k7n=require("https"),HRI=gRI(),QRI=yRI();fRI.Server=V4;function L$e(t){return function(e){return function(I,l){var n=t==="ws"?this.wsPasses:this.webPasses,a=[].slice.call(arguments),c=a.length-1,r,s;typeof a[c]=="function"&&(s=a[c],c--);var i=e;if(!(a[c]instanceof m.Buffer)&&a[c]!==l&&(i=wRI({},e),wRI(i,a[c]),c--),a[c]instanceof m.Buffer&&(r=a[c]),["target","forward"].forEach(function(d){typeof i[d]=="string"&&(i[d]=C7n(i[d]))}),!i.target&&!i.forward)return this.emit("error",new Error("Must provide a proper URL as target"));for(var G=0;G{o();var lIe=CRI().Server;function k$e(t){return new lIe(t)}lIe.createProxyServer=k$e;lIe.createServer=k$e;lIe.createProxy=k$e;LRI.exports=lIe});var jRI=Y((sBr,xRI)=>{o();xRI.exports=kRI()});var ORI=Y((iBr,URI)=>{o();URI.exports=Array.isArray||function(t){return Object.prototype.toString.call(t)=="[object Array]"}});var SRI=Y((dBr,IS)=>{o();var AAe=ORI();IS.exports=MRI;IS.exports.parse=x$e;IS.exports.compile=U7n;IS.exports.tokensToFunction=zRI;IS.exports.tokensToRegExp=BRI;var x7n=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function x$e(t,e){for(var I=[],l=0,n=0,a="",c=e&&e.delimiter||"/",r;(r=x7n.exec(t))!=null;){var s=r[0],i=r[1],G=r.index;if(a+=t.slice(n,G),n=G+s.length,i){a+=i[1];continue}var d=t[n],u=r[2],b=r[3],Z=r[4],p=r[5],W=r[6],h=r[7];a&&(I.push(a),a="");var N=u!=null&&d!=null&&d!==u,V=W==="+"||W==="*",R=W==="?"||W==="*",F=u||c,v=Z||p,y=u||(typeof I[I.length-1]=="string"?I[I.length-1]:"");I.push({name:b||l++,prefix:u||"",delimiter:F,optional:R,repeat:V,partial:N,asterisk:!!h,pattern:v?B7n(v):h?".*":j7n(F,y)})}return n-1?"[^"+Y4(t)+"]+?":Y4(e)+"|(?:(?!"+Y4(e)+")[^"+Y4(t)+"])+?"}function U7n(t,e){return zRI(x$e(t,e),e)}function O7n(t){return encodeURI(t).replace(/[\/?#]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function z7n(t){return encodeURI(t).replace(/[?#]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function zRI(t,e){for(var I=new Array(t.length),l=0;l{o();typeof Object.create=="function"?O$e.exports=function(e,I){e.super_=I,e.prototype=Object.create(I.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:O$e.exports=function(e,I){e.super_=I;var l=function(){};l.prototype=I.prototype,e.prototype=new l,e.prototype.constructor=e}});var KRI=Y((S2,_RI)=>{o();var lS=qM(),z$e=TRI();function _7n(t){return t.split(" ").map(function(e){return e.slice(0,1).toUpperCase()+e.slice(1)}).join("").replace(/[^ _0-9a-z]/gi,"")}S2=_RI.exports=function t(){for(var e,I,l=500,n={},a=0;a=400});K7n.forEach(function(t){var e=_7n(lS[t]),I=e.match(/Error$/)?e:e+"Error";if(t>=500){var l=function a(c){var r=new Error(c??lS[t]);return Error.captureStackTrace(r,a),r.__proto__=a.prototype,Object.defineProperty(r,"name",{enumerable:!1,configurable:!0,value:I,writable:!0}),r};z$e(l,B$e),l.prototype.status=l.prototype.statusCode=t,l.prototype.expose=!1,S2[t]=S2[e]=l;return}var n=function a(c){var r=new Error(c??lS[t]);return Error.captureStackTrace(r,a),r.__proto__=a.prototype,Object.defineProperty(r,"name",{enumerable:!1,configurable:!0,value:I,writable:!0}),r};z$e(n,B$e),n.prototype.status=n.prototype.statusCode=t,n.prototype.expose=!0,S2[t]=S2[e]=n});S2["I'mateapot"]=S2.ImATeapot});var qRI=Y((pBr,DRI)=>{o();var D7n=SRI(),q7n=KRI();DRI.exports=function(t){return t=t||{},function(e){var I=[],l=D7n(e,I,t);return function(n,a){var c=l.exec(n);if(!c)return!1;a=a||{};for(var r,s,i=0;i{o();$7n=new Uint8Array(16)});var PRI,$RI=g(()=>{o();PRI=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});function e8n(t){return typeof t=="string"&&PRI.test(t)}var U1,aIe=g(()=>{o();$RI();U1=e8n});function t8n(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,I=(Pi[t[e+0]]+Pi[t[e+1]]+Pi[t[e+2]]+Pi[t[e+3]]+"-"+Pi[t[e+4]]+Pi[t[e+5]]+"-"+Pi[t[e+6]]+Pi[t[e+7]]+"-"+Pi[t[e+8]]+Pi[t[e+9]]+"-"+Pi[t[e+10]]+Pi[t[e+11]]+Pi[t[e+12]]+Pi[t[e+13]]+Pi[t[e+14]]+Pi[t[e+15]]).toLowerCase();if(!U1(I))throw TypeError("Stringified UUID is invalid");return I}var Pi,XAe,O1,cIe=g(()=>{o();aIe();Pi=[];for(XAe=0;XAe<256;++XAe)Pi.push((XAe+256).toString(16).substr(1));O1=t8n});function I8n(t,e,I){var l=e&&I||0,n=e||new Array(16);t=t||{};var a=t.node||e0I,c=t.clockseq!==void 0?t.clockseq:S$e;if(a==null||c==null){var r=t.random||(t.rng||nIe)();a==null&&(a=e0I=[r[0]|1,r[1],r[2],r[3],r[4],r[5]]),c==null&&(c=S$e=(r[6]<<8|r[7])&16383)}var s=t.msecs!==void 0?t.msecs:Date.now(),i=t.nsecs!==void 0?t.nsecs:_$e+1,G=s-T$e+(i-_$e)/1e4;if(G<0&&t.clockseq===void 0&&(c=c+1&16383),(G<0||s>T$e)&&t.nsecs===void 0&&(i=0),i>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");T$e=s,_$e=i,S$e=c,s+=122192928e5;var d=((s&268435455)*1e4+i)%4294967296;n[l++]=d>>>24&255,n[l++]=d>>>16&255,n[l++]=d>>>8&255,n[l++]=d&255;var u=s/4294967296*1e4&268435455;n[l++]=u>>>8&255,n[l++]=u&255,n[l++]=u>>>24&15|16,n[l++]=u>>>16&255,n[l++]=c>>>8|128,n[l++]=c&255;for(var b=0;b<6;++b)n[l+b]=a[b];return e||O1(n)}var e0I,S$e,T$e,_$e,t0I,I0I=g(()=>{o();M$e();cIe();T$e=0,_$e=0;t0I=I8n});function l8n(t){if(!U1(t))throw TypeError("Invalid UUID");var e,I=new Uint8Array(16);return I[0]=(e=parseInt(t.slice(0,8),16))>>>24,I[1]=e>>>16&255,I[2]=e>>>8&255,I[3]=e&255,I[4]=(e=parseInt(t.slice(9,13),16))>>>8,I[5]=e&255,I[6]=(e=parseInt(t.slice(14,18),16))>>>8,I[7]=e&255,I[8]=(e=parseInt(t.slice(19,23),16))>>>8,I[9]=e&255,I[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,I[11]=e/4294967296&255,I[12]=e>>>24&255,I[13]=e>>>16&255,I[14]=e>>>8&255,I[15]=e&255,I}var gAe,K$e=g(()=>{o();aIe();gAe=l8n});function n8n(t){t=unescape(encodeURIComponent(t));for(var e=[],I=0;I{o();cIe();K$e();a8n="6ba7b810-9dad-11d1-80b4-00c04fd430c8",c8n="6ba7b811-9dad-11d1-80b4-00c04fd430c8"});function r8n(t){if(typeof t=="string"){var e=unescape(encodeURIComponent(t));t=new Uint8Array(e.length);for(var I=0;I>5]>>>n%32&255,c=parseInt(l.charAt(a>>>4&15)+l.charAt(a&15),16);e.push(c)}return e}function l0I(t){return(t+64>>>9<<4)+14+1}function o8n(t,e){t[e>>5]|=128<>5]|=(t[l/8]&255)<>16)+(e>>16)+(I>>16);return l<<16|I&65535}function G8n(t,e){return t<>>32-e}function yAe(t,e,I,l,n,a){return z1(G8n(z1(z1(e,t),z1(l,a)),n),I)}function wu(t,e,I,l,n,a,c){return yAe(e&I|~e&l,t,e,n,a,c)}function Hu(t,e,I,l,n,a,c){return yAe(e&l|I&~l,t,e,n,a,c)}function Qu(t,e,I,l,n,a,c){return yAe(e^I^l,t,e,n,a,c)}function fu(t,e,I,l,n,a,c){return yAe(I^(e|~l),t,e,n,a,c)}var n0I,a0I=g(()=>{o();n0I=r8n});var d8n,c0I,r0I=g(()=>{o();D$e();a0I();d8n=vAe("v3",48,n0I),c0I=d8n});function u8n(t,e,I){t=t||{};var l=t.random||(t.rng||nIe)();if(l[6]=l[6]&15|64,l[8]=l[8]&63|128,e){I=I||0;for(var n=0;n<16;++n)e[I+n]=l[n];return e}return O1(l)}var s0I,o0I=g(()=>{o();M$e();cIe();s0I=u8n});function b8n(t,e,I,l){switch(t){case 0:return e&I^~e&l;case 1:return e^I^l;case 2:return e&I^e&l^I&l;case 3:return e^I^l}}function q$e(t,e){return t<>>32-e}function m8n(t){var e=[1518500249,1859775393,2400959708,3395469782],I=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof t=="string"){var l=unescape(encodeURIComponent(t));t=[];for(var n=0;n>>0;V=N,N=h,h=q$e(W,30)>>>0,W=p,p=v}I[0]=I[0]+p>>>0,I[1]=I[1]+W>>>0,I[2]=I[2]+h>>>0,I[3]=I[3]+N>>>0,I[4]=I[4]+V>>>0}return[I[0]>>24&255,I[0]>>16&255,I[0]>>8&255,I[0]&255,I[1]>>24&255,I[1]>>16&255,I[1]>>8&255,I[1]&255,I[2]>>24&255,I[2]>>16&255,I[2]>>8&255,I[2]&255,I[3]>>24&255,I[3]>>16&255,I[3]>>8&255,I[3]&255,I[4]>>24&255,I[4]>>16&255,I[4]>>8&255,I[4]&255]}var i0I,G0I=g(()=>{o();i0I=m8n});var Z8n,d0I,u0I=g(()=>{o();D$e();G0I();Z8n=vAe("v5",80,i0I),d0I=Z8n});var b0I,m0I=g(()=>{o();b0I="00000000-0000-0000-0000-000000000000"});function p8n(t){if(!U1(t))throw TypeError("Invalid UUID");return parseInt(t.substr(14,1),16)}var Z0I,p0I=g(()=>{o();aIe();Z0I=p8n});var h0I={};tr(h0I,{NIL:()=>b0I,parse:()=>gAe,stringify:()=>O1,v1:()=>t0I,v3:()=>c0I,v4:()=>s0I,v5:()=>d0I,validate:()=>U1,version:()=>Z0I});var W0I=g(()=>{o();I0I();r0I();o0I();u0I();m0I();p0I();aIe();cIe();K$e()});var N0I=Y((pMr,eet)=>{o();var{URL:h8n}=require("url"),W8n=jRI(),N8n=qte(),V8n=qRI(),{v4:Y8n}=(W0I(),Zlt(h0I)),R8n=require("url"),$$e=W8n.createProxyServer(),A8n=V8n({sensitive:!1,strict:!1,end:!1}),P$e="__KOA_PROXIES_MIDDLEWARE_ID__",R4={};function F8n(t){if(!(["error","proxyReq","proxyRes"].indexOf(t)<0))return R4[t]=new Map,$$e.on(t,(...e)=>{let I=e[1],l=R4[t].get(I[P$e]);typeof l=="function"&&l(...e)}),R4[t]}eet.exports=(t,e)=>{let I=Y8n();return(l,n)=>{let c=A8n(t)(l.path);if(!c)return n();let r;if(typeof e=="function"){if(r=e.call(e,c,l),r===!1)return n()}else r=Object.assign({},e);let{logs:s,rewrite:i,events:G,...d}=r;return new Promise((u,b)=>{l.req.oldPath=l.req.url,typeof i=="function"&&(l.req.url=i(l.req.url,l)),s&&(typeof s=="function"?s(l,r.target):X8n(l,d)),G&&typeof G=="object"&&(l.req[P$e]=I,Object.entries(G).forEach(([Z,p])=>{let W=R4[Z]==null?F8n(Z):R4[Z];typeof W=="object"&&!W.has(I)&&W.set(I,p)})),l.res.on("close",()=>{b(new Error(`Http response closed while proxying ${l.req.oldPath}`))}),l.res.on("finish",()=>{u()}),$$e.web(l.req,l.res,d,(Z,...p)=>{let W=R4.error&&R4.error.get(l.req[P$e]);typeof W=="function"&&W(Z,...p);let h={ECONNREFUSED:503,ETIMEOUT:504}[Z.code];l.status=h||500,u()})})}};eet.exports.proxy=$$e;function X8n(t,e){let I={},l;try{let n={...e,target:R8n.parse(e.target||"")};N8n.setupOutgoing(I,n,t.req),l=new h8n("",`${n.target.protocol}//${I.host}${I.path}`)}catch{console.error("Error occurs when logging. Please check if target is a valid URL.")}console.log("%s - %s %s proxy to -> %s",new Date().toISOString(),t.req.method,t.req.oldPath,`${l||e.target}`)}});var Q0I=Y((RSr,H0I)=>{o();H0I.exports=function(){return{"pretty-error":{display:"block",marginLeft:"2"},"pretty-error > header":{display:"block"},"pretty-error > header > title > kind":{background:"red",color:"bright-white"},"pretty-error > header > title > wrapper":{marginRight:"1",color:"grey"},"pretty-error > header > colon":{color:"grey",marginRight:1},"pretty-error > header > message":{color:"bright-white"},"pretty-error > trace":{display:"block",marginTop:1},"pretty-error > trace > item":{display:"block",marginBottom:1,marginLeft:2,bullet:'"-"'},"pretty-error > trace > item > header":{display:"block"},"pretty-error > trace > item > header > pointer > file":{color:"bright-yellow"},"pretty-error > trace > item > header > pointer > colon":{color:"grey"},"pretty-error > trace > item > header > pointer > line":{color:"bright-yellow",marginRight:1},"pretty-error > trace > item > header > what":{color:"white"},"pretty-error > trace > item > footer":{display:"block"},"pretty-error > trace > item > footer > addr":{display:"block",color:"grey"},"pretty-error > trace > item > footer > extra":{display:"block",color:"grey"}}}});var L0I=Y((FSr,C0I)=>{o();var E0I,GIe,oet,J0I,HAe,f0I,iet;oet=Qn();C0I.exports=E0I=function(){function t(e){this.error=e,this._parse()}return t.prototype._parse=function(){var e;this._trace=[],this._kind="Error",this._wrapper="",this.error.wrapper!=null&&(this._wrapper=String(this.error.wrapper)),typeof this.error!="object"?this._message=String(this.error):(this._stack=this.error.stack,this.error.kind!=null?this._kind=String(this.error.kind):typeof this._stack=="string"&&(e=this._stack.match(/^([a-zA-Z0-9\_\$]+):\ /))&&(this._kind=e[1]),this._message=this.error.message!=null&&String(this.error.message)||"",typeof this._stack=="string"&&this._parseStack())},t.prototype._parseStack=function(){var e,I,l,n,a,c,r;for(l=[],n=!1,r=this._stack.split(` +`),a=0,c=r.length;a)"||e==="Error (:null:null)"))return d=e,V=null,I=null,Z=null,a=null,c=null,i=null,l=null,s=null,r=null,N=null,h=null,u="[current]",(G=e.match(/\(([^\)]+)\)$/))&&(I=G[1].trim()),I!=null&&(V=e.substr(0,e.length-I.length-2),V=V.trim()),I==null&&(I=e.trim()),I=this._fixPath(I),W=I,(G=W.match(/\,\ :(\d+):(\d+)$/))&&(s=G[1],r=G[2],W=W.substr(0,W.length-G[0].length)),(G=W.match(/:(\d+):(\d+)$/))&&(i=G[1],l=G[2],W=W.substr(0,W.length-G[0].length),Z=W),Z!=null&&(c=oet.basename(Z),a=oet.dirname(Z),a==="."&&(a=""),Z=this._fixPath(Z),c=this._fixPath(c),a=this._fixPath(a)),a!=null&&(n=a.replace(/[\\]{1,2}/g,"/"),(G=n.match(/node_modules\/([^\/]+)(?!.*node_modules.*)/))&&(u=G[1])),s==null&&(s=i,r=l),Z!=null&&(p=this._rectifyPath(Z),N=p.path,h=N+I.substr(Z.length,I.length),b=p.packages),{original:d,what:V,addr:I,path:Z,dir:a,file:c,line:parseInt(i),col:parseInt(l),jsLine:parseInt(s),jsCol:parseInt(r),packageName:u,shortenedPath:N,shortenedAddr:h,packages:b||[]}}},t.prototype._getMessage=function(){return this._message},t.prototype._getKind=function(){return this._kind},t.prototype._getWrapper=function(){return this._wrapper},t.prototype._getStack=function(){return this._stack},t.prototype._getArguments=function(){return this.error.arguments},t.prototype._getType=function(){return this.error.type},t.prototype._getTrace=function(){return this._trace},t.prototype._fixPath=function(e){return e.replace(/[\\]{1,2}/g,"/")},t.prototype._rectifyPath=function(e,I){var l,n,a,c,r;if(e=String(e),c=e,!(l=e.match(/^(.+?)\/node_modules\/(.+)$/)))return{path:e,packages:[]};for(a=[],n=[],typeof I=="string"?(a.push("["+I+"]"),n.push("["+I+"]")):(a.push("["+l[1].match(/([^\/]+)$/)[1]+"]"),n.push(l[1].match(/([^\/]+)$/)[1])),r=l[2];l=r.match(/([^\/]+)\/node_modules\/(.+)$/);)a.push("["+l[1]+"]"),n.push(l[1]),r=l[2];return(l=r.match(/([^\/]+)\/(.+)$/))&&(a.push("["+l[1]+"]"),n.push(l[1]),r=l[2]),a.push(r),{path:a.join("/"),packages:n}},t}();iet=["message","kind","arguments","type","stack","trace","wrapper"];J0I=function(){var t;return t="_get"+GIe[0].toUpperCase()+GIe.substr(1,GIe.length),Object.defineProperty(E0I.prototype,GIe,{get:function(){return this[t]()}})};for(HAe=0,f0I=iet.length;HAe{o();k0I.exports=["_debugger.js","_http_agent.js","_http_client.js","_http_common.js","_http_incoming.js","_http_outgoing.js","_http_server.js","_linklist.js","_stream_duplex.js","_stream_passthrough.js","_stream_readable.js","_stream_transform.js","_stream_writable.js","_tls_legacy.js","_tls_wrap.js","assert.js","buffer.js","child_process.js","cluster.js","console.js","constants.js","crypto.js","dgram.js","dns.js","domain.js","events.js","freelist.js","fs.js","http.js","https.js","module.js","net.js","os.js","path.js","punycode.js","querystring.js","readline.js","repl.js","smalloc.js","stream.js","string_decoder.js","sys.js","timers.js","tls.js","tty.js","url.js","util.js","vm.js","zlib.js","node.js"]});var det=Y(dIe=>{"use strict";o();var QAe=dIe&&dIe.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(dIe,"__esModule",{value:!0});var y8n=QAe(YLe()),w8n=QAe(fie()),Get=QAe(VLe()),H8n=QAe(Eie());function mp(t){return t===" "||t===` +`||t===" "||t==="\f"||t==="\r"}function j0I(t){return t>="a"&&t<="z"||t>="A"&&t<="Z"}function ri(t,e,I){var l=t.toLowerCase();return t===l?function(n,a){a===l?n._state=e:(n._state=I,n._index--)}:function(n,a){a===l||a===t?n._state=e:(n._state=I,n._index--)}}function pA(t,e){var I=t.toLowerCase();return function(l,n){n===I||n===t?l._state=e:(l._state=3,l._index--)}}var Q8n=ri("C",24,16),f8n=ri("D",25,16),E8n=ri("A",26,16),J8n=ri("T",27,16),C8n=ri("A",28,16),L8n=pA("R",35),k8n=pA("I",36),x8n=pA("P",37),j8n=pA("T",38),U8n=ri("R",40,1),O8n=ri("I",41,1),z8n=ri("P",42,1),B8n=ri("T",43,1),M8n=pA("Y",45),S8n=pA("L",46),T8n=pA("E",47),_8n=ri("Y",49,1),K8n=ri("L",50,1),D8n=ri("E",51,1),q8n=pA("I",54),P8n=pA("T",55),$8n=pA("L",56),e$n=pA("E",57),t$n=ri("I",58,1),I$n=ri("T",59,1),l$n=ri("L",60,1),n$n=ri("E",61,1),a$n=ri("#",63,64),c$n=ri("X",66,65),r$n=function(){function t(e,I){var l;this._state=1,this.buffer="",this.sectionStart=0,this._index=0,this.bufferOffset=0,this.baseState=1,this.special=1,this.running=!0,this.ended=!1,this.cbs=I,this.xmlMode=!!e?.xmlMode,this.decodeEntities=(l=e?.decodeEntities)!==null&&l!==void 0?l:!0}return t.prototype.reset=function(){this._state=1,this.buffer="",this.sectionStart=0,this._index=0,this.bufferOffset=0,this.baseState=1,this.special=1,this.running=!0,this.ended=!1},t.prototype.write=function(e){this.ended&&this.cbs.onerror(Error(".write() after done!")),this.buffer+=e,this.parse()},t.prototype.end=function(e){this.ended&&this.cbs.onerror(Error(".end() after done!")),e&&this.write(e),this.ended=!0,this.running&&this.finish()},t.prototype.pause=function(){this.running=!1},t.prototype.resume=function(){this.running=!0,this._indexthis.sectionStart&&this.cbs.ontext(this.getSection()),this._state=2,this.sectionStart=this._index):this.decodeEntities&&e==="&"&&(this.special===1||this.special===4)&&(this._index>this.sectionStart&&this.cbs.ontext(this.getSection()),this.baseState=1,this._state=62,this.sectionStart=this._index)},t.prototype.isTagStartChar=function(e){return j0I(e)||this.xmlMode&&!mp(e)&&e!=="/"&&e!==">"},t.prototype.stateBeforeTagName=function(e){e==="/"?this._state=5:e==="<"?(this.cbs.ontext(this.getSection()),this.sectionStart=this._index):e===">"||this.special!==1||mp(e)?this._state=1:e==="!"?(this._state=15,this.sectionStart=this._index+1):e==="?"?(this._state=17,this.sectionStart=this._index+1):this.isTagStartChar(e)?(this._state=!this.xmlMode&&(e==="s"||e==="S")?32:!this.xmlMode&&(e==="t"||e==="T")?52:3,this.sectionStart=this._index):this._state=1},t.prototype.stateInTagName=function(e){(e==="/"||e===">"||mp(e))&&(this.emitToken("onopentagname"),this._state=8,this._index--)},t.prototype.stateBeforeClosingTagName=function(e){mp(e)||(e===">"?this._state=1:this.special!==1?this.special!==4&&(e==="s"||e==="S")?this._state=33:this.special===4&&(e==="t"||e==="T")?this._state=53:(this._state=1,this._index--):this.isTagStartChar(e)?(this._state=6,this.sectionStart=this._index):(this._state=20,this.sectionStart=this._index))},t.prototype.stateInClosingTagName=function(e){(e===">"||mp(e))&&(this.emitToken("onclosetag"),this._state=7,this._index--)},t.prototype.stateAfterClosingTagName=function(e){e===">"&&(this._state=1,this.sectionStart=this._index+1)},t.prototype.stateBeforeAttributeName=function(e){e===">"?(this.cbs.onopentagend(),this._state=1,this.sectionStart=this._index+1):e==="/"?this._state=4:mp(e)||(this._state=9,this.sectionStart=this._index)},t.prototype.stateInSelfClosingTag=function(e){e===">"?(this.cbs.onselfclosingtag(),this._state=1,this.sectionStart=this._index+1,this.special=1):mp(e)||(this._state=8,this._index--)},t.prototype.stateInAttributeName=function(e){(e==="="||e==="/"||e===">"||mp(e))&&(this.cbs.onattribname(this.getSection()),this.sectionStart=-1,this._state=10,this._index--)},t.prototype.stateAfterAttributeName=function(e){e==="="?this._state=11:e==="/"||e===">"?(this.cbs.onattribend(void 0),this._state=8,this._index--):mp(e)||(this.cbs.onattribend(void 0),this._state=9,this.sectionStart=this._index)},t.prototype.stateBeforeAttributeValue=function(e){e==='"'?(this._state=12,this.sectionStart=this._index+1):e==="'"?(this._state=13,this.sectionStart=this._index+1):mp(e)||(this._state=14,this.sectionStart=this._index,this._index--)},t.prototype.handleInAttributeValue=function(e,I){e===I?(this.emitToken("onattribdata"),this.cbs.onattribend(I),this._state=8):this.decodeEntities&&e==="&"&&(this.emitToken("onattribdata"),this.baseState=this._state,this._state=62,this.sectionStart=this._index)},t.prototype.stateInAttributeValueDoubleQuotes=function(e){this.handleInAttributeValue(e,'"')},t.prototype.stateInAttributeValueSingleQuotes=function(e){this.handleInAttributeValue(e,"'")},t.prototype.stateInAttributeValueNoQuotes=function(e){mp(e)||e===">"?(this.emitToken("onattribdata"),this.cbs.onattribend(null),this._state=8,this._index--):this.decodeEntities&&e==="&"&&(this.emitToken("onattribdata"),this.baseState=this._state,this._state=62,this.sectionStart=this._index)},t.prototype.stateBeforeDeclaration=function(e){this._state=e==="["?23:e==="-"?18:16},t.prototype.stateInDeclaration=function(e){e===">"&&(this.cbs.ondeclaration(this.getSection()),this._state=1,this.sectionStart=this._index+1)},t.prototype.stateInProcessingInstruction=function(e){e===">"&&(this.cbs.onprocessinginstruction(this.getSection()),this._state=1,this.sectionStart=this._index+1)},t.prototype.stateBeforeComment=function(e){e==="-"?(this._state=19,this.sectionStart=this._index+1):this._state=16},t.prototype.stateInComment=function(e){e==="-"&&(this._state=21)},t.prototype.stateInSpecialComment=function(e){e===">"&&(this.cbs.oncomment(this.buffer.substring(this.sectionStart,this._index)),this._state=1,this.sectionStart=this._index+1)},t.prototype.stateAfterComment1=function(e){e==="-"?this._state=22:this._state=19},t.prototype.stateAfterComment2=function(e){e===">"?(this.cbs.oncomment(this.buffer.substring(this.sectionStart,this._index-2)),this._state=1,this.sectionStart=this._index+1):e!=="-"&&(this._state=19)},t.prototype.stateBeforeCdata6=function(e){e==="["?(this._state=29,this.sectionStart=this._index+1):(this._state=16,this._index--)},t.prototype.stateInCdata=function(e){e==="]"&&(this._state=30)},t.prototype.stateAfterCdata1=function(e){e==="]"?this._state=31:this._state=29},t.prototype.stateAfterCdata2=function(e){e===">"?(this.cbs.oncdata(this.buffer.substring(this.sectionStart,this._index-2)),this._state=1,this.sectionStart=this._index+1):e!=="]"&&(this._state=29)},t.prototype.stateBeforeSpecialS=function(e){e==="c"||e==="C"?this._state=34:e==="t"||e==="T"?this._state=44:(this._state=3,this._index--)},t.prototype.stateBeforeSpecialSEnd=function(e){this.special===2&&(e==="c"||e==="C")?this._state=39:this.special===3&&(e==="t"||e==="T")?this._state=48:this._state=1},t.prototype.stateBeforeSpecialLast=function(e,I){(e==="/"||e===">"||mp(e))&&(this.special=I),this._state=3,this._index--},t.prototype.stateAfterSpecialLast=function(e,I){e===">"||mp(e)?(this.special=1,this._state=6,this.sectionStart=this._index-I,this._index--):this._state=1},t.prototype.parseFixedEntity=function(e){if(e===void 0&&(e=this.xmlMode?H8n.default:w8n.default),this.sectionStart+1=2;){var l=this.buffer.substr(e,I);if(Object.prototype.hasOwnProperty.call(Get.default,l)){this.emitPartial(Get.default[l]),this.sectionStart+=I+1;return}I--}},t.prototype.stateInNamedEntity=function(e){e===";"?(this.parseFixedEntity(),this.baseState===1&&this.sectionStart+1"9")&&!j0I(e)&&(this.xmlMode||this.sectionStart+1===this._index||(this.baseState!==1?e!=="="&&this.parseFixedEntity(Get.default):this.parseLegacyEntity()),this._state=this.baseState,this._index--)},t.prototype.decodeNumericEntity=function(e,I,l){var n=this.sectionStart+e;if(n!==this._index){var a=this.buffer.substring(n,this._index),c=parseInt(a,I);this.emitPartial(y8n.default(c)),this.sectionStart=l?this._index+1:this._index}this._state=this.baseState},t.prototype.stateInNumericEntity=function(e){e===";"?this.decodeNumericEntity(2,10,!0):(e<"0"||e>"9")&&(this.xmlMode?this._state=this.baseState:this.decodeNumericEntity(2,10,!1),this._index--)},t.prototype.stateInHexEntity=function(e){e===";"?this.decodeNumericEntity(3,16,!0):(e<"a"||e>"f")&&(e<"A"||e>"F")&&(e<"0"||e>"9")&&(this.xmlMode?this._state=this.baseState:this.decodeNumericEntity(3,16,!1),this._index--)},t.prototype.cleanup=function(){this.sectionStart<0?(this.buffer="",this.bufferOffset+=this._index,this._index=0):this.running&&(this._state===1?(this.sectionStart!==this._index&&this.cbs.ontext(this.buffer.substr(this.sectionStart)),this.buffer="",this.bufferOffset+=this._index,this._index=0):this.sectionStart===this._index?(this.buffer="",this.bufferOffset+=this._index,this._index=0):(this.buffer=this.buffer.substr(this.sectionStart),this._index-=this.sectionStart,this.bufferOffset+=this.sectionStart),this.sectionStart=0)},t.prototype.parse=function(){for(;this._index{"use strict";o();var s$n=oS&&oS.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(oS,"__esModule",{value:!0});oS.Parser=void 0;var o$n=s$n(det()),sS=new Set(["input","option","optgroup","select","button","datalist","textarea"]),na=new Set(["p"]),U0I={tr:new Set(["tr","th","td"]),th:new Set(["th"]),td:new Set(["thead","th","td"]),body:new Set(["head","link","script"]),li:new Set(["li"]),p:na,h1:na,h2:na,h3:na,h4:na,h5:na,h6:na,select:sS,input:sS,output:sS,button:sS,datalist:sS,textarea:sS,option:new Set(["option"]),optgroup:new Set(["optgroup","option"]),dd:new Set(["dt","dd"]),dt:new Set(["dt","dd"]),address:na,article:na,aside:na,blockquote:na,details:na,div:na,dl:na,fieldset:na,figcaption:na,figure:na,footer:na,form:na,header:na,hr:na,main:na,nav:na,ol:na,pre:na,section:na,table:na,ul:na,rt:new Set(["rt","rp"]),rp:new Set(["rt","rp"]),tbody:new Set(["thead","tbody"]),tfoot:new Set(["thead","tbody"])},uet=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),O0I=new Set(["math","svg"]),z0I=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),i$n=/\s|\//,G$n=function(){function t(e,I){I===void 0&&(I={});var l,n,a,c,r;this.startIndex=0,this.endIndex=null,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.foreignContext=[],this.options=I,this.cbs=e??{},this.lowerCaseTagNames=(l=I.lowerCaseTags)!==null&&l!==void 0?l:!I.xmlMode,this.lowerCaseAttributeNames=(n=I.lowerCaseAttributeNames)!==null&&n!==void 0?n:!I.xmlMode,this.tokenizer=new((a=I.Tokenizer)!==null&&a!==void 0?a:o$n.default)(this.options,this),(r=(c=this.cbs).onparserinit)===null||r===void 0||r.call(c,this)}return t.prototype.updatePosition=function(e){this.endIndex===null?this.tokenizer.sectionStart<=e?this.startIndex=0:this.startIndex=this.tokenizer.sectionStart-e:this.startIndex=this.endIndex+1,this.endIndex=this.tokenizer.getAbsoluteIndex()},t.prototype.ontext=function(e){var I,l;this.updatePosition(1),this.endIndex--,(l=(I=this.cbs).ontext)===null||l===void 0||l.call(I,e)},t.prototype.onopentagname=function(e){var I,l;if(this.lowerCaseTagNames&&(e=e.toLowerCase()),this.tagname=e,!this.options.xmlMode&&Object.prototype.hasOwnProperty.call(U0I,e))for(var n=void 0;this.stack.length>0&&U0I[e].has(n=this.stack[this.stack.length-1]);)this.onclosetag(n);(this.options.xmlMode||!uet.has(e))&&(this.stack.push(e),O0I.has(e)?this.foreignContext.push(!0):z0I.has(e)&&this.foreignContext.push(!1)),(l=(I=this.cbs).onopentagname)===null||l===void 0||l.call(I,e),this.cbs.onopentag&&(this.attribs={})},t.prototype.onopentagend=function(){var e,I;this.updatePosition(1),this.attribs&&((I=(e=this.cbs).onopentag)===null||I===void 0||I.call(e,this.tagname,this.attribs),this.attribs=null),!this.options.xmlMode&&this.cbs.onclosetag&&uet.has(this.tagname)&&this.cbs.onclosetag(this.tagname),this.tagname=""},t.prototype.onclosetag=function(e){if(this.updatePosition(1),this.lowerCaseTagNames&&(e=e.toLowerCase()),(O0I.has(e)||z0I.has(e))&&this.foreignContext.pop(),this.stack.length&&(this.options.xmlMode||!uet.has(e))){var I=this.stack.lastIndexOf(e);if(I!==-1)if(this.cbs.onclosetag)for(I=this.stack.length-I;I--;)this.cbs.onclosetag(this.stack.pop());else this.stack.length=I;else e==="p"&&!this.options.xmlMode&&(this.onopentagname(e),this.closeCurrentTag())}else!this.options.xmlMode&&(e==="br"||e==="p")&&(this.onopentagname(e),this.closeCurrentTag())},t.prototype.onselfclosingtag=function(){this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?this.closeCurrentTag():this.onopentagend()},t.prototype.closeCurrentTag=function(){var e,I,l=this.tagname;this.onopentagend(),this.stack[this.stack.length-1]===l&&((I=(e=this.cbs).onclosetag)===null||I===void 0||I.call(e,l),this.stack.pop())},t.prototype.onattribname=function(e){this.lowerCaseAttributeNames&&(e=e.toLowerCase()),this.attribname=e},t.prototype.onattribdata=function(e){this.attribvalue+=e},t.prototype.onattribend=function(e){var I,l;(l=(I=this.cbs).onattribute)===null||l===void 0||l.call(I,this.attribname,this.attribvalue,e),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribname="",this.attribvalue=""},t.prototype.getInstructionName=function(e){var I=e.search(i$n),l=I<0?e:e.substr(0,I);return this.lowerCaseTagNames&&(l=l.toLowerCase()),l},t.prototype.ondeclaration=function(e){if(this.cbs.onprocessinginstruction){var I=this.getInstructionName(e);this.cbs.onprocessinginstruction("!"+I,"!"+e)}},t.prototype.onprocessinginstruction=function(e){if(this.cbs.onprocessinginstruction){var I=this.getInstructionName(e);this.cbs.onprocessinginstruction("?"+I,"?"+e)}},t.prototype.oncomment=function(e){var I,l,n,a;this.updatePosition(4),(l=(I=this.cbs).oncomment)===null||l===void 0||l.call(I,e),(a=(n=this.cbs).oncommentend)===null||a===void 0||a.call(n)},t.prototype.oncdata=function(e){var I,l,n,a,c,r;this.updatePosition(1),this.options.xmlMode||this.options.recognizeCDATA?((l=(I=this.cbs).oncdatastart)===null||l===void 0||l.call(I),(a=(n=this.cbs).ontext)===null||a===void 0||a.call(n,e),(r=(c=this.cbs).oncdataend)===null||r===void 0||r.call(c)):this.oncomment("[CDATA["+e+"]]")},t.prototype.onerror=function(e){var I,l;(l=(I=this.cbs).onerror)===null||l===void 0||l.call(I,e)},t.prototype.onend=function(){var e,I;if(this.cbs.onclosetag)for(var l=this.stack.length;l>0;this.cbs.onclosetag(this.stack[--l]));(I=(e=this.cbs).onend)===null||I===void 0||I.call(e)},t.prototype.reset=function(){var e,I,l,n;(I=(e=this.cbs).onreset)===null||I===void 0||I.call(e),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack=[],(n=(l=this.cbs).onparserinit)===null||n===void 0||n.call(l,this)},t.prototype.parseComplete=function(e){this.reset(),this.end(e)},t.prototype.write=function(e){this.tokenizer.write(e)},t.prototype.end=function(e){this.tokenizer.end(e)},t.prototype.pause=function(){this.tokenizer.pause()},t.prototype.resume=function(){this.tokenizer.resume()},t.prototype.parseChunk=function(e){this.write(e)},t.prototype.done=function(e){this.end(e)},t}();oS.Parser=G$n});var iS=Y(mc=>{"use strict";o();Object.defineProperty(mc,"__esModule",{value:!0});mc.Doctype=mc.CDATA=mc.Tag=mc.Style=mc.Script=mc.Comment=mc.Directive=mc.Text=mc.Root=mc.isTag=mc.ElementType=void 0;var Zp;(function(t){t.Root="root",t.Text="text",t.Directive="directive",t.Comment="comment",t.Script="script",t.Style="style",t.Tag="tag",t.CDATA="cdata",t.Doctype="doctype"})(Zp=mc.ElementType||(mc.ElementType={}));function d$n(t){return t.type===Zp.Tag||t.type===Zp.Script||t.type===Zp.Style}mc.isTag=d$n;mc.Root=Zp.Root;mc.Text=Zp.Text;mc.Directive=Zp.Directive;mc.Comment=Zp.Comment;mc.Script=Zp.Script;mc.Style=Zp.Style;mc.Tag=Zp.Tag;mc.CDATA=Zp.CDATA;mc.Doctype=Zp.Doctype});var het=Y(Hl=>{"use strict";o();var A4=Hl&&Hl.__extends||function(){var t=function(e,I){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,n){l.__proto__=n}||function(l,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(l[a]=n[a])},t(e,I)};return function(e,I){if(typeof I!="function"&&I!==null)throw new TypeError("Class extends value "+String(I)+" is not a constructor or null");t(e,I);function l(){this.constructor=e}e.prototype=I===null?Object.create(I):(l.prototype=I.prototype,new l)}}(),uIe=Hl&&Hl.__assign||function(){return uIe=Object.assign||function(t){for(var e,I=1,l=arguments.length;I0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"childNodes",{get:function(){return this.children},set:function(I){this.children=I},enumerable:!1,configurable:!0}),e}(Zet);Hl.NodeWithChildren=EAe;var T0I=function(t){A4(e,t);function e(I){return t.call(this,Dr.ElementType.Root,I)||this}return e}(EAe);Hl.Document=T0I;var _0I=function(t){A4(e,t);function e(I,l,n,a){n===void 0&&(n=[]),a===void 0&&(a=I==="script"?Dr.ElementType.Script:I==="style"?Dr.ElementType.Style:Dr.ElementType.Tag);var c=t.call(this,a,n)||this;return c.name=I,c.attribs=l,c}return Object.defineProperty(e.prototype,"tagName",{get:function(){return this.name},set:function(I){this.name=I},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attributes",{get:function(){var I=this;return Object.keys(this.attribs).map(function(l){var n,a;return{name:l,value:I.attribs[l],namespace:(n=I["x-attribsNamespace"])===null||n===void 0?void 0:n[l],prefix:(a=I["x-attribsPrefix"])===null||a===void 0?void 0:a[l]}})},enumerable:!1,configurable:!0}),e}(EAe);Hl.Element=_0I;function K0I(t){return(0,Dr.isTag)(t)}Hl.isTag=K0I;function D0I(t){return t.type===Dr.ElementType.CDATA}Hl.isCDATA=D0I;function q0I(t){return t.type===Dr.ElementType.Text}Hl.isText=q0I;function P0I(t){return t.type===Dr.ElementType.Comment}Hl.isComment=P0I;function $0I(t){return t.type===Dr.ElementType.Directive}Hl.isDirective=$0I;function eAI(t){return t.type===Dr.ElementType.Root}Hl.isDocument=eAI;function b$n(t){return Object.prototype.hasOwnProperty.call(t,"children")}Hl.hasChildren=b$n;function pet(t,e){e===void 0&&(e=!1);var I;if(q0I(t))I=new B0I(t.data);else if(P0I(t))I=new M0I(t.data);else if(K0I(t)){var l=e?met(t.children):[],n=new _0I(t.name,uIe({},t.attribs),l);l.forEach(function(s){return s.parent=n}),t.namespace!=null&&(n.namespace=t.namespace),t["x-attribsNamespace"]&&(n["x-attribsNamespace"]=uIe({},t["x-attribsNamespace"])),t["x-attribsPrefix"]&&(n["x-attribsPrefix"]=uIe({},t["x-attribsPrefix"])),I=n}else if(D0I(t)){var l=e?met(t.children):[],a=new EAe(Dr.ElementType.CDATA,l);l.forEach(function(i){return i.parent=a}),I=a}else if(eAI(t)){var l=e?met(t.children):[],c=new T0I(l);l.forEach(function(i){return i.parent=c}),t["x-mode"]&&(c["x-mode"]=t["x-mode"]),I=c}else if($0I(t)){var r=new S0I(t.name,t.data);t["x-name"]!=null&&(r["x-name"]=t["x-name"],r["x-publicId"]=t["x-publicId"],r["x-systemId"]=t["x-systemId"]),I=r}else throw new Error("Not implemented yet: ".concat(t.type));return I.startIndex=t.startIndex,I.endIndex=t.endIndex,t.sourceCodeLocation!=null&&(I.sourceCodeLocation=t.sourceCodeLocation),I}Hl.cloneNode=pet;function met(t){for(var e=t.map(function(l){return pet(l,!0)}),I=1;I{"use strict";o();var m$n=T2&&T2.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Z$n=T2&&T2.__exportStar||function(t,e){for(var I in t)I!=="default"&&!Object.prototype.hasOwnProperty.call(e,I)&&m$n(e,t,I)};Object.defineProperty(T2,"__esModule",{value:!0});T2.DomHandler=void 0;var JAe=iS(),B1=het();Z$n(het(),T2);var tAI=/\s+/g,IAI={normalizeWhitespace:!1,withStartIndices:!1,withEndIndices:!1,xmlMode:!1},lAI=function(){function t(e,I,l){this.dom=[],this.root=new B1.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof I=="function"&&(l=I,I=IAI),typeof e=="object"&&(I=e,e=void 0),this.callback=e??null,this.options=I??IAI,this.elementCB=l??null}return t.prototype.onparserinit=function(e){this.parser=e},t.prototype.onreset=function(){this.dom=[],this.root=new B1.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},t.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},t.prototype.onerror=function(e){this.handleCallback(e)},t.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},t.prototype.onopentag=function(e,I){var l=this.options.xmlMode?JAe.ElementType.Tag:void 0,n=new B1.Element(e,I,void 0,l);this.addNode(n),this.tagStack.push(n)},t.prototype.ontext=function(e){var I=this.options.normalizeWhitespace,l=this.lastNode;if(l&&l.type===JAe.ElementType.Text)I?l.data=(l.data+e).replace(tAI," "):l.data+=e,this.options.withEndIndices&&(l.endIndex=this.parser.endIndex);else{I&&(e=e.replace(tAI," "));var n=new B1.Text(e);this.addNode(n),this.lastNode=n}},t.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===JAe.ElementType.Comment){this.lastNode.data+=e;return}var I=new B1.Comment(e);this.addNode(I),this.lastNode=I},t.prototype.oncommentend=function(){this.lastNode=null},t.prototype.oncdatastart=function(){var e=new B1.Text(""),I=new B1.NodeWithChildren(JAe.ElementType.CDATA,[e]);this.addNode(I),e.parent=I,this.lastNode=e},t.prototype.oncdataend=function(){this.lastNode=null},t.prototype.onprocessinginstruction=function(e,I){var l=new B1.ProcessingInstruction(e,I);this.addNode(l)},t.prototype.handleCallback=function(e){if(typeof this.callback=="function")this.callback(e,this.dom);else if(e)throw e},t.prototype.addNode=function(e){var I=this.tagStack[this.tagStack.length-1],l=I.children[I.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),I.children.push(e),l&&(e.prev=l,l.next=e),e.parent=I,this.lastNode=null},t}();T2.DomHandler=lAI;T2.default=lAI});var nAI=Y(GS=>{"use strict";o();Object.defineProperty(GS,"__esModule",{value:!0});GS.attributeNames=GS.elementNames=void 0;GS.elementNames=new Map([["altglyph","altGlyph"],["altglyphdef","altGlyphDef"],["altglyphitem","altGlyphItem"],["animatecolor","animateColor"],["animatemotion","animateMotion"],["animatetransform","animateTransform"],["clippath","clipPath"],["feblend","feBlend"],["fecolormatrix","feColorMatrix"],["fecomponenttransfer","feComponentTransfer"],["fecomposite","feComposite"],["feconvolvematrix","feConvolveMatrix"],["fediffuselighting","feDiffuseLighting"],["fedisplacementmap","feDisplacementMap"],["fedistantlight","feDistantLight"],["fedropshadow","feDropShadow"],["feflood","feFlood"],["fefunca","feFuncA"],["fefuncb","feFuncB"],["fefuncg","feFuncG"],["fefuncr","feFuncR"],["fegaussianblur","feGaussianBlur"],["feimage","feImage"],["femerge","feMerge"],["femergenode","feMergeNode"],["femorphology","feMorphology"],["feoffset","feOffset"],["fepointlight","fePointLight"],["fespecularlighting","feSpecularLighting"],["fespotlight","feSpotLight"],["fetile","feTile"],["feturbulence","feTurbulence"],["foreignobject","foreignObject"],["glyphref","glyphRef"],["lineargradient","linearGradient"],["radialgradient","radialGradient"],["textpath","textPath"]]);GS.attributeNames=new Map([["definitionurl","definitionURL"],["attributename","attributeName"],["attributetype","attributeType"],["basefrequency","baseFrequency"],["baseprofile","baseProfile"],["calcmode","calcMode"],["clippathunits","clipPathUnits"],["diffuseconstant","diffuseConstant"],["edgemode","edgeMode"],["filterunits","filterUnits"],["glyphref","glyphRef"],["gradienttransform","gradientTransform"],["gradientunits","gradientUnits"],["kernelmatrix","kernelMatrix"],["kernelunitlength","kernelUnitLength"],["keypoints","keyPoints"],["keysplines","keySplines"],["keytimes","keyTimes"],["lengthadjust","lengthAdjust"],["limitingconeangle","limitingConeAngle"],["markerheight","markerHeight"],["markerunits","markerUnits"],["markerwidth","markerWidth"],["maskcontentunits","maskContentUnits"],["maskunits","maskUnits"],["numoctaves","numOctaves"],["pathlength","pathLength"],["patterncontentunits","patternContentUnits"],["patterntransform","patternTransform"],["patternunits","patternUnits"],["pointsatx","pointsAtX"],["pointsaty","pointsAtY"],["pointsatz","pointsAtZ"],["preservealpha","preserveAlpha"],["preserveaspectratio","preserveAspectRatio"],["primitiveunits","primitiveUnits"],["refx","refX"],["refy","refY"],["repeatcount","repeatCount"],["repeatdur","repeatDur"],["requiredextensions","requiredExtensions"],["requiredfeatures","requiredFeatures"],["specularconstant","specularConstant"],["specularexponent","specularExponent"],["spreadmethod","spreadMethod"],["startoffset","startOffset"],["stddeviation","stdDeviation"],["stitchtiles","stitchTiles"],["surfacescale","surfaceScale"],["systemlanguage","systemLanguage"],["tablevalues","tableValues"],["targetx","targetX"],["targety","targetY"],["textlength","textLength"],["viewbox","viewBox"],["viewtarget","viewTarget"],["xchannelselector","xChannelSelector"],["ychannelselector","yChannelSelector"],["zoomandpan","zoomAndPan"]])});var sAI=Y(hA=>{"use strict";o();var dS=hA&&hA.__assign||function(){return dS=Object.assign||function(t){for(var e,I=1,l=arguments.length;I0&&(l+=Wet(t.children,e)),(e.xmlMode||!aAI.has(t.name))&&(l+="")),l}function X$n(t){return"<"+t.data+">"}function g$n(t,e){var I=t.data||"";return e.decodeEntities!==!1&&!(!e.xmlMode&&t.parent&&N$n.has(t.parent.name))&&(I=cAI.encodeXML(I)),I}function v$n(t){return""}function y$n(t){return""}});var Yet=Y(Jm=>{"use strict";o();var w$n=Jm&&Jm.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Jm,"__esModule",{value:!0});Jm.innerText=Jm.textContent=Jm.getText=Jm.getInnerHTML=Jm.getOuterHTML=void 0;var _2=aH(),H$n=w$n(sAI()),Q$n=iS();function oAI(t,e){return(0,H$n.default)(t,e)}Jm.getOuterHTML=oAI;function f$n(t,e){return(0,_2.hasChildren)(t)?t.children.map(function(I){return oAI(I,e)}).join(""):""}Jm.getInnerHTML=f$n;function CAe(t){return Array.isArray(t)?t.map(CAe).join(""):(0,_2.isTag)(t)?t.name==="br"?` +`:CAe(t.children):(0,_2.isCDATA)(t)?CAe(t.children):(0,_2.isText)(t)?t.data:""}Jm.getText=CAe;function Net(t){return Array.isArray(t)?t.map(Net).join(""):(0,_2.hasChildren)(t)&&!(0,_2.isComment)(t)?Net(t.children):(0,_2.isText)(t)?t.data:""}Jm.textContent=Net;function Vet(t){return Array.isArray(t)?t.map(Vet).join(""):(0,_2.hasChildren)(t)&&(t.type===Q$n.ElementType.Tag||(0,_2.isCDATA)(t))?Vet(t.children):(0,_2.isText)(t)?t.data:""}Jm.innerText=Vet});var uAI=Y(si=>{"use strict";o();Object.defineProperty(si,"__esModule",{value:!0});si.prevElementSibling=si.nextElementSibling=si.getName=si.hasAttrib=si.getAttributeValue=si.getSiblings=si.getParent=si.getChildren=void 0;var iAI=aH(),E$n=[];function GAI(t){var e;return(e=t.children)!==null&&e!==void 0?e:E$n}si.getChildren=GAI;function dAI(t){return t.parent||null}si.getParent=dAI;function J$n(t){var e,I,l=dAI(t);if(l!=null)return GAI(l);for(var n=[t],a=t.prev,c=t.next;a!=null;)n.unshift(a),e=a,a=e.prev;for(;c!=null;)n.push(c),I=c,c=I.next;return n}si.getSiblings=J$n;function C$n(t,e){var I;return(I=t.attribs)===null||I===void 0?void 0:I[e]}si.getAttributeValue=C$n;function L$n(t,e){return t.attribs!=null&&Object.prototype.hasOwnProperty.call(t.attribs,e)&&t.attribs[e]!=null}si.hasAttrib=L$n;function k$n(t){return t.name}si.getName=k$n;function x$n(t){for(var e,I=t.next;I!==null&&!(0,iAI.isTag)(I);)e=I,I=e.next;return I}si.nextElementSibling=x$n;function j$n(t){for(var e,I=t.prev;I!==null&&!(0,iAI.isTag)(I);)e=I,I=e.prev;return I}si.prevElementSibling=j$n});var bAI=Y(Cm=>{"use strict";o();Object.defineProperty(Cm,"__esModule",{value:!0});Cm.prepend=Cm.prependChild=Cm.append=Cm.appendChild=Cm.replaceElement=Cm.removeElement=void 0;function bIe(t){if(t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t.parent){var e=t.parent.children;e.splice(e.lastIndexOf(t),1)}}Cm.removeElement=bIe;function U$n(t,e){var I=e.prev=t.prev;I&&(I.next=e);var l=e.next=t.next;l&&(l.prev=e);var n=e.parent=t.parent;if(n){var a=n.children;a[a.lastIndexOf(t)]=e}}Cm.replaceElement=U$n;function O$n(t,e){if(bIe(e),e.next=null,e.parent=t,t.children.push(e)>1){var I=t.children[t.children.length-2];I.next=e,e.prev=I}else e.prev=null}Cm.appendChild=O$n;function z$n(t,e){bIe(e);var I=t.parent,l=t.next;if(e.next=l,e.prev=t,t.next=e,e.parent=I,l){if(l.prev=e,I){var n=I.children;n.splice(n.lastIndexOf(l),0,e)}}else I&&I.children.push(e)}Cm.append=z$n;function B$n(t,e){if(bIe(e),e.parent=t,e.prev=null,t.children.unshift(e)!==1){var I=t.children[1];I.prev=e,e.next=I}else e.next=null}Cm.prependChild=B$n;function M$n(t,e){bIe(e);var I=t.parent;if(I){var l=I.children;l.splice(l.indexOf(t),0,e)}t.prev&&(t.prev.next=e),e.parent=I,e.prev=t.prev,e.next=t,t.prev=e}Cm.prepend=M$n});var Aet=Y(Lm=>{"use strict";o();Object.defineProperty(Lm,"__esModule",{value:!0});Lm.findAll=Lm.existsOne=Lm.findOne=Lm.findOneChild=Lm.find=Lm.filter=void 0;var mIe=aH();function S$n(t,e,I,l){return I===void 0&&(I=!0),l===void 0&&(l=1/0),Array.isArray(e)||(e=[e]),Ret(t,e,I,l)}Lm.filter=S$n;function Ret(t,e,I,l){for(var n=[],a=0,c=e;a0){var s=Ret(t,r.children,I,l);if(n.push.apply(n,s),l-=s.length,l<=0)break}}return n}Lm.find=Ret;function T$n(t,e){return e.find(t)}Lm.findOneChild=T$n;function mAI(t,e,I){I===void 0&&(I=!0);for(var l=null,n=0;n0&&(l=mAI(t,a.children));else continue}return l}Lm.findOne=mAI;function ZAI(t,e){return e.some(function(I){return(0,mIe.isTag)(I)&&(t(I)||I.children.length>0&&ZAI(t,I.children))})}Lm.existsOne=ZAI;function _$n(t,e){for(var I,l=[],n=e.filter(mIe.isTag),a;a=n.shift();){var c=(I=a.children)===null||I===void 0?void 0:I.filter(mIe.isTag);c&&c.length>0&&n.unshift.apply(n,c),t(a)&&l.push(a)}return l}Lm.findAll=_$n});var Fet=Y(wR=>{"use strict";o();Object.defineProperty(wR,"__esModule",{value:!0});wR.getElementsByTagType=wR.getElementsByTagName=wR.getElementById=wR.getElements=wR.testElement=void 0;var F4=aH(),kAe=Aet(),LAe={tag_name:function(t){return typeof t=="function"?function(e){return(0,F4.isTag)(e)&&t(e.name)}:t==="*"?F4.isTag:function(e){return(0,F4.isTag)(e)&&e.name===t}},tag_type:function(t){return typeof t=="function"?function(e){return t(e.type)}:function(e){return e.type===t}},tag_contains:function(t){return typeof t=="function"?function(e){return(0,F4.isText)(e)&&t(e.data)}:function(e){return(0,F4.isText)(e)&&e.data===t}}};function pAI(t,e){return typeof e=="function"?function(I){return(0,F4.isTag)(I)&&e(I.attribs[t])}:function(I){return(0,F4.isTag)(I)&&I.attribs[t]===e}}function K$n(t,e){return function(I){return t(I)||e(I)}}function hAI(t){var e=Object.keys(t).map(function(I){var l=t[I];return Object.prototype.hasOwnProperty.call(LAe,I)?LAe[I](l):pAI(I,l)});return e.length===0?null:e.reduce(K$n)}function D$n(t,e){var I=hAI(t);return I?I(e):!0}wR.testElement=D$n;function q$n(t,e,I,l){l===void 0&&(l=1/0);var n=hAI(t);return n?(0,kAe.filter)(n,e,I,l):[]}wR.getElements=q$n;function P$n(t,e,I){return I===void 0&&(I=!0),Array.isArray(e)||(e=[e]),(0,kAe.findOne)(pAI("id",t),e,I)}wR.getElementById=P$n;function $$n(t,e,I,l){return I===void 0&&(I=!0),l===void 0&&(l=1/0),(0,kAe.filter)(LAe.tag_name(t),e,I,l)}wR.getElementsByTagName=$$n;function eea(t,e,I,l){return I===void 0&&(I=!0),l===void 0&&(l=1/0),(0,kAe.filter)(LAe.tag_type(t),e,I,l)}wR.getElementsByTagType=eea});var VAI=Y(M1=>{"use strict";o();Object.defineProperty(M1,"__esModule",{value:!0});M1.uniqueSort=M1.compareDocumentPosition=M1.removeSubsets=void 0;var WAI=aH();function tea(t){for(var e=t.length;--e>=0;){var I=t[e];if(e>0&&t.lastIndexOf(I,e-1)>=0){t.splice(e,1);continue}for(var l=I.parent;l;l=l.parent)if(t.includes(l)){t.splice(e,1);break}}return t}M1.removeSubsets=tea;function NAI(t,e){var I=[],l=[];if(t===e)return 0;for(var n=(0,WAI.hasChildren)(t)?t:t.parent;n;)I.unshift(n),n=n.parent;for(n=(0,WAI.hasChildren)(e)?e:e.parent;n;)l.unshift(n),n=n.parent;for(var a=Math.min(I.length,l.length),c=0;cs.indexOf(G)?r===e?20:4:r===t?10:2}M1.compareDocumentPosition=NAI;function Iea(t){return t=t.filter(function(e,I,l){return!l.includes(e,I+1)}),t.sort(function(e,I){var l=NAI(e,I);return l&2?-1:l&4?1:0}),t}M1.uniqueSort=Iea});var RAI=Y(jAe=>{"use strict";o();Object.defineProperty(jAe,"__esModule",{value:!0});jAe.getFeed=void 0;var lea=Yet(),ZIe=Fet();function nea(t){var e=xAe(oea,t);return e?e.name==="feed"?aea(e):cea(e):null}jAe.getFeed=nea;function aea(t){var e,I=t.children,l={type:"atom",items:(0,ZIe.getElementsByTagName)("entry",I).map(function(c){var r,s=c.children,i={media:YAI(s)};km(i,"id","id",s),km(i,"title","title",s);var G=(r=xAe("link",s))===null||r===void 0?void 0:r.attribs.href;G&&(i.link=G);var d=X4("summary",s)||X4("content",s);d&&(i.description=d);var u=X4("updated",s);return u&&(i.pubDate=new Date(u)),i})};km(l,"id","id",I),km(l,"title","title",I);var n=(e=xAe("link",I))===null||e===void 0?void 0:e.attribs.href;n&&(l.link=n),km(l,"description","subtitle",I);var a=X4("updated",I);return a&&(l.updated=new Date(a)),km(l,"author","email",I,!0),l}function cea(t){var e,I,l=(I=(e=xAe("channel",t.children))===null||e===void 0?void 0:e.children)!==null&&I!==void 0?I:[],n={type:t.name.substr(0,3),id:"",items:(0,ZIe.getElementsByTagName)("item",t.children).map(function(c){var r=c.children,s={media:YAI(r)};km(s,"id","guid",r),km(s,"title","title",r),km(s,"link","link",r),km(s,"description","description",r);var i=X4("pubDate",r);return i&&(s.pubDate=new Date(i)),s})};km(n,"title","title",l),km(n,"link","link",l),km(n,"description","description",l);var a=X4("lastBuildDate",l);return a&&(n.updated=new Date(a)),km(n,"author","managingEditor",l,!0),n}var rea=["url","type","lang"],sea=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function YAI(t){return(0,ZIe.getElementsByTagName)("media:content",t).map(function(e){for(var I=e.attribs,l={medium:I.medium,isDefault:!!I.isDefault},n=0,a=rea;n{"use strict";o();var iea=Zc&&Zc.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I),Object.defineProperty(t,l,{enumerable:!0,get:function(){return e[I]}})}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),g4=Zc&&Zc.__exportStar||function(t,e){for(var I in t)I!=="default"&&!Object.prototype.hasOwnProperty.call(e,I)&&iea(e,t,I)};Object.defineProperty(Zc,"__esModule",{value:!0});Zc.hasChildren=Zc.isDocument=Zc.isComment=Zc.isText=Zc.isCDATA=Zc.isTag=void 0;g4(Yet(),Zc);g4(uAI(),Zc);g4(bAI(),Zc);g4(Aet(),Zc);g4(Fet(),Zc);g4(VAI(),Zc);g4(RAI(),Zc);var uS=aH();Object.defineProperty(Zc,"isTag",{enumerable:!0,get:function(){return uS.isTag}});Object.defineProperty(Zc,"isCDATA",{enumerable:!0,get:function(){return uS.isCDATA}});Object.defineProperty(Zc,"isText",{enumerable:!0,get:function(){return uS.isText}});Object.defineProperty(Zc,"isComment",{enumerable:!0,get:function(){return uS.isComment}});Object.defineProperty(Zc,"isDocument",{enumerable:!0,get:function(){return uS.isDocument}});Object.defineProperty(Zc,"hasChildren",{enumerable:!0,get:function(){return uS.hasChildren}})});var get=Y(Eu=>{"use strict";o();var Gea=Eu&&Eu.__extends||function(){var t=function(e,I){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,n){l.__proto__=n}||function(l,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(l[a]=n[a])},t(e,I)};return function(e,I){if(typeof I!="function"&&I!==null)throw new TypeError("Class extends value "+String(I)+" is not a constructor or null");t(e,I);function l(){this.constructor=e}e.prototype=I===null?Object.create(I):(l.prototype=I.prototype,new l)}}(),dea=Eu&&Eu.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I),Object.defineProperty(t,l,{enumerable:!0,get:function(){return e[I]}})}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),uea=Eu&&Eu.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),bea=Eu&&Eu.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var I in t)I!=="default"&&Object.prototype.hasOwnProperty.call(t,I)&&dea(e,t,I);return uea(e,t),e},mea=Eu&&Eu.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Eu,"__esModule",{value:!0});Eu.parseFeed=Eu.FeedHandler=void 0;var Zea=mea(aH()),zAe=bea(UAe()),pea=bet(),AAI;(function(t){t[t.image=0]="image",t[t.audio=1]="audio",t[t.video=2]="video",t[t.document=3]="document",t[t.executable=4]="executable"})(AAI||(AAI={}));var FAI;(function(t){t[t.sample=0]="sample",t[t.full=1]="full",t[t.nonstop=2]="nonstop"})(FAI||(FAI={}));var vAI=function(t){Gea(e,t);function e(I,l){var n=this;return typeof I=="object"&&(I=void 0,l=I),n=t.call(this,I,l)||this,n}return e.prototype.onend=function(){var I,l,n=OAe(hea,this.dom);if(!n){this.handleCallback(new Error("couldn't find root of feed"));return}var a={};if(n.name==="feed"){var c=n.children;a.type="atom",xm(a,"id","id",c),xm(a,"title","title",c);var r=gAI("href",OAe("link",c));r&&(a.link=r),xm(a,"description","subtitle",c);var s=v4("updated",c);s&&(a.updated=new Date(s)),xm(a,"author","email",c,!0),a.items=Xet("entry",c).map(function(i){var G={},d=i.children;xm(G,"id","id",d),xm(G,"title","title",d);var u=gAI("href",OAe("link",d));u&&(G.link=u);var b=v4("summary",d)||v4("content",d);b&&(G.description=b);var Z=v4("updated",d);return Z&&(G.pubDate=new Date(Z)),G.media=XAI(d),G})}else{var c=(l=(I=OAe("channel",n.children))===null||I===void 0?void 0:I.children)!==null&&l!==void 0?l:[];a.type=n.name.substr(0,3),a.id="",xm(a,"title","title",c),xm(a,"link","link",c),xm(a,"description","description",c);var s=v4("lastBuildDate",c);s&&(a.updated=new Date(s)),xm(a,"author","managingEditor",c,!0),a.items=Xet("item",n.children).map(function(d){var u={},b=d.children;xm(u,"id","guid",b),xm(u,"title","title",b),xm(u,"link","link",b),xm(u,"description","description",b);var Z=v4("pubDate",b);return Z&&(u.pubDate=new Date(Z)),u.media=XAI(b),u})}this.feed=a,this.handleCallback(null)},e}(Zea.default);Eu.FeedHandler=vAI;function XAI(t){return Xet("media:content",t).map(function(e){var I={medium:e.attribs.medium,isDefault:!!e.attribs.isDefault};return e.attribs.url&&(I.url=e.attribs.url),e.attribs.fileSize&&(I.fileSize=parseInt(e.attribs.fileSize,10)),e.attribs.type&&(I.type=e.attribs.type),e.attribs.expression&&(I.expression=e.attribs.expression),e.attribs.bitrate&&(I.bitrate=parseInt(e.attribs.bitrate,10)),e.attribs.framerate&&(I.framerate=parseInt(e.attribs.framerate,10)),e.attribs.samplingrate&&(I.samplingrate=parseInt(e.attribs.samplingrate,10)),e.attribs.channels&&(I.channels=parseInt(e.attribs.channels,10)),e.attribs.duration&&(I.duration=parseInt(e.attribs.duration,10)),e.attribs.height&&(I.height=parseInt(e.attribs.height,10)),e.attribs.width&&(I.width=parseInt(e.attribs.width,10)),e.attribs.lang&&(I.lang=e.attribs.lang),I})}function Xet(t,e){return zAe.getElementsByTagName(t,e,!0)}function OAe(t,e){return zAe.getElementsByTagName(t,e,!0,1)[0]}function v4(t,e,I){return I===void 0&&(I=!1),zAe.getText(zAe.getElementsByTagName(t,e,I,1)).trim()}function gAI(t,e){if(!e)return null;var I=e.attribs;return I[t]}function xm(t,e,I,l,n){n===void 0&&(n=!1);var a=v4(I,l,n);a&&(t[e]=a)}function hea(t){return t==="rss"||t==="feed"||t==="rdf:RDF"}function Wea(t,e){e===void 0&&(e={xmlMode:!0});var I=new vAI(e);return new pea.Parser(I,e).end(t),I.feed}Eu.parseFeed=Wea});var QAI=Y(dn=>{"use strict";o();var yAI=dn&&dn.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I),Object.defineProperty(t,l,{enumerable:!0,get:function(){return e[I]}})}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),Nea=dn&&dn.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),wAI=dn&&dn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var I in t)I!=="default"&&Object.prototype.hasOwnProperty.call(t,I)&&yAI(e,t,I);return Nea(e,t),e},Vea=dn&&dn.__exportStar||function(t,e){for(var I in t)I!=="default"&&!Object.prototype.hasOwnProperty.call(e,I)&&yAI(e,t,I)},Yea=dn&&dn.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(dn,"__esModule",{value:!0});dn.RssHandler=dn.DefaultHandler=dn.DomUtils=dn.ElementType=dn.Tokenizer=dn.createDomStream=dn.parseDOM=dn.parseDocument=dn.DomHandler=dn.Parser=void 0;var vet=bet();Object.defineProperty(dn,"Parser",{enumerable:!0,get:function(){return vet.Parser}});var BAe=aH();Object.defineProperty(dn,"DomHandler",{enumerable:!0,get:function(){return BAe.DomHandler}});Object.defineProperty(dn,"DefaultHandler",{enumerable:!0,get:function(){return BAe.DomHandler}});function HAI(t,e){var I=new BAe.DomHandler(void 0,e);return new vet.Parser(I,e).end(t),I.root}dn.parseDocument=HAI;function Rea(t,e){return HAI(t,e).children}dn.parseDOM=Rea;function Aea(t,e,I){var l=new BAe.DomHandler(t,e,I);return new vet.Parser(l,e)}dn.createDomStream=Aea;var Fea=det();Object.defineProperty(dn,"Tokenizer",{enumerable:!0,get:function(){return Yea(Fea).default}});var Xea=wAI(iS());dn.ElementType=Xea;Vea(get(),dn);dn.DomUtils=wAI(UAe());var gea=get();Object.defineProperty(dn,"RssHandler",{enumerable:!0,get:function(){return gea.FeedHandler}})});var yet=Y((oTr,fAI)=>{o();var vea;fAI.exports=vea={from:function(t){return Array.prototype.slice.call(t)},simpleClone:function(t){return t.slice(0)},shallowEqual:function(t,e){var I,l,n,a;if(!(Array.isArray(t)&&Array.isArray(e)&&t.length===e.length))return!1;for(I=n=0,a=t.length;ne&&(t[I-1]=t[I]);return t.length=t.length-1,t},pluckItem:function(t,e){var I,l,n,a,c;if(t.length<1)return t;for(l=0,I=a=0,c=t.length;a0&&(t.length=t.length-l),t},pluckOneItem:function(t,e){var I,l,n,a,c;if(t.length<1)return t;for(l=!1,I=a=0,c=t.length;a0&&(t.length=t.length-l),t},pluckMultiple:function(t,e){var I,l,n,a;if(t.length<1)return t;for(l=0,e.sort(),n=0,a=e.length;n{o();var wet,EAI=[].slice;JAI.exports=wet={};wet.implement=function(){var t,e,I,l,n,a,c,r,s;for(a=2<=arguments.length?EAI.call(arguments,0,c=arguments.length-1):(c=0,[]),e=arguments[c++],r=0,s=a.length;r{o();var S1;LAI.exports=S1={isBareObject:function(t){return t!=null&&t.constructor===Object},typeOf:function(t){var e;if(t===null)return"null";if(typeof t!="object")return typeof t;if(Array.isArray(t))return"array";if(t.nodeName){if(t.nodeType===1)return"element";if(t.nodeType===3)return(e=/\S/.test(t.nodeValue))!=null?e:{textnode:"whitespace"}}else if(typeof t.length=="number"&&t.callee)return"arguments";return typeof t},clone:function(t,e){switch(e==null&&(e=!1),S1.typeOf(t)){case"array":return S1._cloneArray(t,e);case"object":return S1._cloneObject(t,e);default:return t}},_cloneObject:function(t,e){var I,l;if(e==null&&(e=!1),S1.isBareObject(t)){I={};for(l in t)I[l]=S1.clone(t[l],e);return I}else{if(!e||t instanceof Function)return t;I=Object.create(t.constructor.prototype);for(l in t)t.hasOwnProperty(l)&&(I[l]=S1.clone(t[l],e));return I}},_cloneArray:function(t,e){var I,l;for(e==null&&(e=!1),l=t.length,I=new Array(l);l--;)I[l]=S1.clone(t[l],e);return I}}});var jAI=Y((mTr,xAI)=>{o();var yea,y4,wea={}.hasOwnProperty;y4=kAI();xAI.exports=yea={isBareObject:y4.isBareObject.bind(y4),isInstance:function(t){return!this.isBareObject(t)},typeOf:y4.typeOf.bind(y4),clone:y4.clone.bind(y4),empty:function(t){var e;for(e in t)t.hasOwnProperty(e)&&delete t[e];return t},fastEmpty:function(t){var e;for(e in t)delete t[e];return t},overrideOnto:function(t,e){var I,l,n;if(!this.isBareObject(e)||!this.isBareObject(t))return t;for(I in t)n=t[I],l=e[I],l!==void 0&&(typeof l!="object"||this.isInstance(l)?t[I]=this.clone(l):typeof n!="object"||this.isInstance(n)?t[I]=this.clone(l):this.overrideOnto(n,l));return t},override:function(t,e){return this.overrideOnto(this.clone(t),e)},append:function(t,e){return this.appendOnto(this.clone(t),e)},appendOnto:function(t,e){var I,l,n;if(!this.isBareObject(e)||!this.isBareObject(t))return t;for(I in e)wea.call(e,I)&&(l=e[I],l!==void 0&&(typeof l!="object"||this.isInstance(l)?t[I]=l:(n=t[I],typeof n!="object"||this.isInstance(n)?t[I]=this.clone(l):this.appendOnto(n,l))));return t},groupProps:function(t,e){var I,l,n,a,c,r,s,i,G;n={};for(c in e)l=e[c],n[c]={};n.rest={};e:for(a in t){s=t[a],r=!1;for(c in e)for(l=e[c],Array.isArray(l)||(l=[l]),i=0,G=l.length;i{o();UAI.exports={pad:function(t,e,I){return I==null&&(I="0"),t=t+"",t.length>=e?t:new Array(e-t.length+1).join(I)+t}}});var MAI=Y((WTr,BAI)=>{o();var Hea,zAI;zAI=yet();BAI.exports=Hea=function(){function t(){this._listeners={},this._listenersForAnyEvent=[],this._disabledEmitters={}}return t.prototype.on=function(e,I){return this._listeners[e]==null&&(this._listeners[e]=[]),this._listeners[e].push(I),this},t.prototype.once=function(e,I){var l,n,a=this;return n=!1,l=function(){if(!n)return n=!0,I(),setTimeout(function(){return a.removeEvent(e,l)},0)},this.on(e,l),this},t.prototype.onAnyEvent=function(e){return this._listenersForAnyEvent.push(e),this},t.prototype.removeEvent=function(e,I){return this._listeners[e]==null?this:(zAI.pluckOneItem(this._listeners[e],I),this)},t.prototype.removeListeners=function(e){return this._listeners[e]==null?this:(this._listeners[e].length=0,this)},t.prototype.removeAllListeners=function(){var e,I,l;l=this._listeners;for(I in l)e=l[I],e.length=0;return this},t.prototype._emit=function(e,I){var l,n,a,c,r,s,i;for(s=this._listenersForAnyEvent,n=0,c=s.length;n{o();var Qea;SAI.exports=Qea={array:yet(),classic:CAI(),object:jAI(),string:OAI(),Emitter:MAI()}});var _AI=Y((RTr,TAI)=>{o();var Qet,w4,fea={}.hasOwnProperty;Qet=Het().object;TAI.exports=w4={sanitize:function(t){return w4._toChildren(t)},_toChildren:function(t){var e;if(Qet.isBareObject(t))return w4._objectToChildren(t);if(Array.isArray(t))return w4._arrayToChildren(t);if(t===null||typeof t>"u")return[];if((e=typeof t)=="string"||e==="number")return[String(t)];throw Error("not a valid child node: `"+t)},_objectToChildren:function(t){var e,I,l,n;e=[];for(l in t)fea.call(t,l)&&(n=t[l],I={},I[l]=w4.sanitize(n),e.push(I));return e},_arrayToChildren:function(t){var e,I,l,n;for(l=[],e=0,I=t.length;e{o();var K2,Eea={}.hasOwnProperty;KAI.exports=K2={convert:function(t){return K2._arrayToChildren(t)},_arrayToChildren:function(t,e){var I,l,n,a,c,r;for(e==null&&(e=null),I=[],c=null,l=0,n=t.length;l0)throw Error("_objectToNode() only accepts an object with one key/value");a=n,G=i,l++}if(r={},typeof a!="string")throw Error("_objectToNode()'s key must be a string of tag name and classes");if(typeof G=="string")I=[K2._getTextNodeFor(G)];else if(Array.isArray(G))I=K2._arrayToChildren(G,r);else throw inspect(t),Error("_objectToNode()'s key's value must only be a string or an array");return r.type="tag",s=K2._parseTag(a),c=s.name,e=s.attribs,r.name=c,r.attribs=e,r.children=I,r},_getTextNodeFor:function(t){return{type:"text",data:t}},_nameRx:/^[a-zA-Z\-\_]{1}[a-zA-Z0-9\-\_]*$/,_parseTag:function(t){var e,I,l,n,a,c,r;if(!t.match(/^[a-zA-Z0-9\#\-\_\.\[\]\"\'\=\,\s]+$/)||t.match(/^[0-9]+/))throw Error("cannot parse tag `"+t+"`");if(e={},r={name:"",attribs:e},a=t.match(/^([^\.#]+)/)){if(c=a[1],!c.match(K2._nameRx))throw Error("tag name `"+c+"` is not valid");r.name=c,t=t.substr(c.length,t.length)}if(a=t.match(/^#([a-zA-Z0-9\-]+)/)){if(n=a[1],!n.match(K2._nameRx))throw Error("tag id `"+n+"` is not valid");e.id=n,t=t.substr(n.length+1,t.length)}for(I=[];a=t.match(/\.([a-zA-Z0-9\-\_]+)/);){if(l=a[1],!l.match(K2._nameRx))throw Error("tag class `"+l+"` is not valid");I.push(l),t=t.replace("."+l,"")}return I.length&&(e.class=I.join(" ")),r}}});var qAI=Y(()=>{o()});var IFI=Y((wTr,tFI)=>{o();var Eet,PAI,$AI,eFI,fet;$AI=_AI();eFI=DAI();Eet=qAI();PAI=Het().object;tFI.exports=fet={objectToDom:function(t){return t=fet._object2SaneObject(t),eFI.convert(t)},object2markup:function(t){var e;return e=fet.objectToDom(t),Eet.convert(e)},domToMarkup:function(t){return Eet.convert(t)},_object2SaneObject:function(t){if(!Array.isArray(t)&&!PAI.isBareObject(t))throw Error("toDom() only accepts arrays and bare objects as input");return $AI.sanitize(t)}}});var MAe=Y((QTr,lFI)=>{o();var Jea=kme(),Cea=Z9e(),Lea=Cea(function(t,e,I){Jea(t,e,I)});lFI.exports=Lea});var wb=Y((ETr,rFI)=>{"use strict";o();var nFI,Jet,Cet,aFI,cFI,H4;Jet=QAI();var kea=IFI();cFI=kea.objectToDom;aFI=MAe();nFI=UUe();Cet=Of();rFI.exports=H4={repeatString:function(e,I){var l,n,a,c;for(a="",l=n=0,c=I;0<=c?nc;l=0<=c?++n:--n)a+=e;return a},cloneAndMergeDeep:function(e,I){return aFI(nFI(e),I)},toDom:function(e){if(typeof e=="string")return H4.stringToDom(e);if(Cet(e))return H4._objectToDom(e);throw Error("tools.toDom() only supports strings and objects")},stringToDom:function(e){var I,l;return I=new Jet.DomHandler,l=new Jet.Parser(I),l.write(e),l.end(),I.dom},_fixQuotesInDom:function(e){var I,l,n;if(Array.isArray(e)){for(I=0,l=e.length;I/g,">").replace(/\"/g,""").replace(/\ /g,"&sp;").replace(/\n/g,"
")},_quoteNodeText:function(e){return String(e).replace(/\&/g,"&").replace(//g,">").replace(/\"/g,""").replace(/\ /g,"&sp;").replace(/\n/g,"&nl;")},getCols:function(){var e,I;return I=require("tty"),e=function(){try{if(I.isatty(1)&&I.isatty(2)){if(process.stdout.getWindowSize)return process.stdout.getWindowSize(1)[0];if(I.getWindowSize)return I.getWindowSize()[1];if(process.stdout.columns)return process.stdout.columns}}catch{}}(),typeof e=="number"&&e>30?e:80}}});var iFI=Y((CTr,oFI)=>{"use strict";o();var Q4,Let,SAe,sFI,TAe;oFI.exports=TAe={none:{color:"none",bg:"none"},"bg-none":{color:"inherit",bg:"none"},"color-none":{color:"none",bg:"inherit"}};Let=["black","red","green","yellow","blue","magenta","cyan","white","grey","bright-red","bright-green","bright-yellow","bright-blue","bright-magenta","bright-cyan","bright-white"];for(SAe=0,sFI=Let.length;SAe{"use strict";o();var _Ae,pIe;GFI.exports=pIe={};pIe.codes=_Ae={none:0,black:30,red:31,green:32,yellow:33,blue:34,magenta:35,cyan:36,white:37,grey:90,"bright-red":91,"bright-green":92,"bright-yellow":93,"bright-blue":94,"bright-magenta":95,"bright-cyan":96,"bright-white":97,"bg-black":40,"bg-red":41,"bg-green":42,"bg-yellow":43,"bg-blue":44,"bg-magenta":45,"bg-cyan":46,"bg-white":47,"bg-grey":100,"bg-bright-red":101,"bg-bright-green":102,"bg-bright-yellow":103,"bg-bright-blue":104,"bg-bright-magenta":105,"bg-bright-cyan":106,"bg-bright-white":107};pIe.color=function(t){var e;if(t==="none")return"";if(e=_Ae[t],e==null)throw Error("Unknown color `".concat(t,"`"));return"\x1B["+e+"m"};pIe.bg=function(t){var e;if(t==="none")return"";if(e=_Ae["bg-"+t],e==null)throw Error("Unknown bg color `".concat(t,"`"));return"\x1B["+e+"m"};pIe.none=function(t){return"\x1B["+_Ae.none+"m"}});var ket=Y((jTr,ZFI)=>{"use strict";o();function xea(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function uFI(t,e){for(var I=0;I").replace(/"/g,'"').replace(/&/g,"&")}},{key:"_parse",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return a&&(n=""+n+""),mFI.toDom(n)}},{key:"_renderDom",value:function(n){var a;return a={bg:"none",color:"none"},this._renderChildren(n,a)}},{key:"_renderChildren",value:function(n,a){var c,r,s;s="";for(r in n)bFI.call(n,r)&&(c=n[r],s+=this._renderNode(c,a));return s}},{key:"_renderNode",value:function(n,a){return n.type==="text"?this._renderTextNode(n,a):this._renderTag(n,a)}},{key:"_renderTextNode",value:function(n,a){return this._wrapInStyle(n.data,a)}},{key:"_wrapInStyle",value:function(n,a){return KAe.color(a.color)+KAe.bg(a.bg)+n+KAe.none()}},{key:"_renderTag",value:function(n,a){var c,r;return r=this._getStylesForTagName(n.name),c=this._mixStyles(a,r),this._renderChildren(n.children,c)}},{key:"_mixStyles",value:function(){var n,a,c,r,s,i;n={};for(var G=arguments.length,d=new Array(G),u=0;u{"use strict";o();var xet,Oea;xet=ket();pFI.exports=Oea={getStyleTagsFor:function(e){var I,l,n,a,c,r;if(r=[],e.color!=null){if(c="color-"+e.color,xet.tags[c]==null)throw Error("Unknown color `".concat(e.color,"`"));r.push(c)}if(e.background!=null){if(c="bg-"+e.background,xet.tags[c]==null)throw Error("Unknown background `".concat(e.background,"`"));r.push(c)}for(n={before:"",after:""},I=0,l=r.length;I")+n.before,n.after=n.after+"");return n}}});var NFI=Y((BTr,WFI)=>{"use strict";o();var hFI,zea,Bea,hIe;hIe=wb();hFI=jet();WFI.exports=zea=Bea={applyTo:function(e,I){var l;return l=hFI.getStyleTagsFor(I),I.marginLeft!=null&&(l.before=hIe.repeatString("&sp;",parseInt(I.marginLeft))+l.before),I.marginRight!=null&&(l.after+=hIe.repeatString("&sp;",parseInt(I.marginRight))),I.paddingLeft!=null&&(l.before+=hIe.repeatString("&sp;",parseInt(I.paddingLeft))),I.paddingRight!=null&&(l.after=hIe.repeatString("&sp;",parseInt(I.paddingRight))+l.after),l}}});var YFI=Y((STr,VFI)=>{"use strict";o();var Uet,Mea,bS,Sea;Uet=jet();bS=MAe();VFI.exports=Mea=Sea={applyTo:function(e,I){var l,n;return n=Uet.getStyleTagsFor(I),n.blockConfig=l={},this._margins(I,l),this._bullet(I,l),this._dims(I,l),n},_margins:function(e,I){e.marginLeft!=null&&bS(I,{linePrependor:{options:{amount:parseInt(e.marginLeft)}}}),e.marginRight!=null&&bS(I,{lineAppendor:{options:{amount:parseInt(e.marginRight)}}}),e.marginTop!=null&&bS(I,{blockPrependor:{options:{amount:parseInt(e.marginTop)}}}),e.marginBottom!=null&&bS(I,{blockAppendor:{options:{amount:parseInt(e.marginBottom)}}})},_bullet:function(e,I){var l,n,a,c;if(e.bullet!=null&&e.bullet.enabled){a=e.bullet,c={},c.alignment=e.bullet.alignment;var r=Uet.getStyleTagsFor({color:a.color,background:a.background});n=r.before,l=r.after,c.char=n+a.char+l,bS(I,{linePrependor:{options:{bullet:c}}})}},_dims:function(e,I){var l;e.width!=null&&(l=parseInt(e.width),I.width=l)}}});var T1=Y((_Tr,RFI)=>{o();RFI.exports={trueFunc:function(){return!0},falseFunc:function(){return!1}}});var qAe=Y(D2=>{"use strict";o();Object.defineProperty(D2,"__esModule",{value:!0});D2.AttributeAction=D2.IgnoreCaseMode=D2.SelectorType=void 0;var Tea;(function(t){t.Attribute="attribute",t.Pseudo="pseudo",t.PseudoElement="pseudo-element",t.Tag="tag",t.Universal="universal",t.Adjacent="adjacent",t.Child="child",t.Descendant="descendant",t.Parent="parent",t.Sibling="sibling",t.ColumnCombinator="column-combinator"})(Tea=D2.SelectorType||(D2.SelectorType={}));D2.IgnoreCaseMode={Unknown:null,QuirksMode:"quirks",IgnoreCase:!0,CaseSensitive:!1};var _ea;(function(t){t.Any="any",t.Element="element",t.End="end",t.Equals="equals",t.Exists="exists",t.Hyphen="hyphen",t.Not="not",t.Start="start"})(_ea=D2.AttributeAction||(D2.AttributeAction={}))});var vFI=Y(mS=>{"use strict";o();Object.defineProperty(mS,"__esModule",{value:!0});mS.parse=mS.isTraversal=void 0;var wn=qAe(),AFI=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,Kea=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,Dea=new Map([[126,wn.AttributeAction.Element],[94,wn.AttributeAction.Start],[36,wn.AttributeAction.End],[42,wn.AttributeAction.Any],[33,wn.AttributeAction.Not],[124,wn.AttributeAction.Hyphen]]),qea=new Set(["has","not","matches","is","where","host","host-context"]);function XFI(t){switch(t.type){case wn.SelectorType.Adjacent:case wn.SelectorType.Child:case wn.SelectorType.Descendant:case wn.SelectorType.Parent:case wn.SelectorType.Sibling:case wn.SelectorType.ColumnCombinator:return!0;default:return!1}}mS.isTraversal=XFI;var Pea=new Set(["contains","icontains"]);function $ea(t,e,I){var l=parseInt(e,16)-65536;return l!==l||I?e:l<0?String.fromCharCode(l+65536):String.fromCharCode(l>>10|55296,l&1023|56320)}function WIe(t){return t.replace(Kea,$ea)}function Oet(t){return t===39||t===34}function FFI(t){return t===32||t===9||t===10||t===12||t===13}function eta(t){var e=[],I=gFI(e,"".concat(t),0);if(I0&&I0&&XFI(l[l.length-1]))throw new Error("Did not expect successive traversals.")}function i(U){if(l.length>0&&l[l.length-1].type===wn.SelectorType.Descendant){l[l.length-1].type=U;return}s(),l.push({type:U})}function G(U,T){l.push({type:wn.SelectorType.Attribute,name:U,action:T,value:n(1),namespace:null,ignoreCase:"quirks"})}function d(){if(l.length&&l[l.length-1].type===wn.SelectorType.Descendant&&l.pop(),l.length===0)throw new Error("Empty sub-selector");t.push(l)}if(a(0),e.length===I)return I;e:for(;I{"use strict";o();var PAe=pS&&pS.__spreadArray||function(t,e,I){if(I||arguments.length===2)for(var l=0,n=e.length,a;l ":" > ";case qr.SelectorType.Parent:return e===0?"< ":" < ";case qr.SelectorType.Sibling:return e===0?"~ ":" ~ ";case qr.SelectorType.Adjacent:return e===0?"+ ":" + ";case qr.SelectorType.Descendant:return" ";case qr.SelectorType.ColumnCombinator:return e===0?"|| ":" || ";case qr.SelectorType.Universal:return t.namespace==="*"&&e+10?l+t.slice(I):t}});var NIe=Y(pp=>{"use strict";o();var nta=pp&&pp.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),ata=pp&&pp.__exportStar||function(t,e){for(var I in t)I!=="default"&&!Object.prototype.hasOwnProperty.call(e,I)&&nta(e,t,I)};Object.defineProperty(pp,"__esModule",{value:!0});pp.stringify=pp.parse=pp.isTraversal=void 0;ata(qAe(),pp);var CFI=vFI();Object.defineProperty(pp,"isTraversal",{enumerable:!0,get:function(){return CFI.isTraversal}});Object.defineProperty(pp,"parse",{enumerable:!0,get:function(){return CFI.parse}});var cta=JFI();Object.defineProperty(pp,"stringify",{enumerable:!0,get:function(){return cta.stringify}})});var $Ae=Y(f4=>{"use strict";o();Object.defineProperty(f4,"__esModule",{value:!0});f4.isTraversal=f4.procedure=void 0;f4.procedure={universal:50,tag:30,attribute:1,pseudo:0,"pseudo-element":0,"column-combinator":-1,descendant:-1,child:-1,parent:-1,sibling:-1,adjacent:-1,_flexibleDescendant:-1};function rta(t){return f4.procedure[t.type]<0}f4.isTraversal=rta});var jFI=Y(zet=>{"use strict";o();Object.defineProperty(zet,"__esModule",{value:!0});var LFI=NIe(),sta=$Ae(),kFI={exists:10,equals:8,not:7,start:6,end:6,any:5,hyphen:4,element:4};function ota(t){for(var e=t.map(xFI),I=1;I=0&&l>=1);else if(t.type===LFI.SelectorType.Pseudo)if(!t.data)e=3;else if(t.name==="has"||t.name==="contains")e=0;else if(Array.isArray(t.data)){e=0;for(var I=0;Ie&&(e=l)}t.data.length>1&&e>0&&(e-=1)}else e=1;return e}});var OFI=Y(tFe=>{"use strict";o();Object.defineProperty(tFe,"__esModule",{value:!0});tFe.attributeRules=void 0;var eFe=T1(),ita=/[-[\]{}()*+?.,\\^$|#\s]/g;function UFI(t){return t.replace(ita,"\\$&")}var Gta=new Set(["accept","accept-charset","align","alink","axis","bgcolor","charset","checked","clear","codetype","color","compact","declare","defer","dir","direction","disabled","enctype","face","frame","hreflang","http-equiv","lang","language","link","media","method","multiple","nohref","noresize","noshade","nowrap","readonly","rel","rev","rules","scope","scrolling","selected","shape","target","text","type","valign","valuetype","vlink"]);function E4(t,e){return typeof t.ignoreCase=="boolean"?t.ignoreCase:t.ignoreCase==="quirks"?!!e.quirksMode:!e.xmlMode&&Gta.has(t.name)}tFe.attributeRules={equals:function(t,e,I){var l=I.adapter,n=e.name,a=e.value;return E4(e,I)?(a=a.toLowerCase(),function(c){var r=l.getAttributeValue(c,n);return r!=null&&r.length===a.length&&r.toLowerCase()===a&&t(c)}):function(c){return l.getAttributeValue(c,n)===a&&t(c)}},hyphen:function(t,e,I){var l=I.adapter,n=e.name,a=e.value,c=a.length;return E4(e,I)?(a=a.toLowerCase(),function(s){var i=l.getAttributeValue(s,n);return i!=null&&(i.length===c||i.charAt(c)==="-")&&i.substr(0,c).toLowerCase()===a&&t(s)}):function(s){var i=l.getAttributeValue(s,n);return i!=null&&(i.length===c||i.charAt(c)==="-")&&i.substr(0,c)===a&&t(s)}},element:function(t,e,I){var l=I.adapter,n=e.name,a=e.value;if(/\s/.test(a))return eFe.falseFunc;var c=new RegExp("(?:^|\\s)".concat(UFI(a),"(?:$|\\s)"),E4(e,I)?"i":"");return function(s){var i=l.getAttributeValue(s,n);return i!=null&&i.length>=a.length&&c.test(i)&&t(s)}},exists:function(t,e,I){var l=e.name,n=I.adapter;return function(a){return n.hasAttrib(a,l)&&t(a)}},start:function(t,e,I){var l=I.adapter,n=e.name,a=e.value,c=a.length;return c===0?eFe.falseFunc:E4(e,I)?(a=a.toLowerCase(),function(r){var s=l.getAttributeValue(r,n);return s!=null&&s.length>=c&&s.substr(0,c).toLowerCase()===a&&t(r)}):function(r){var s;return!!(!((s=l.getAttributeValue(r,n))===null||s===void 0)&&s.startsWith(a))&&t(r)}},end:function(t,e,I){var l=I.adapter,n=e.name,a=e.value,c=-a.length;return c===0?eFe.falseFunc:E4(e,I)?(a=a.toLowerCase(),function(r){var s;return((s=l.getAttributeValue(r,n))===null||s===void 0?void 0:s.substr(c).toLowerCase())===a&&t(r)}):function(r){var s;return!!(!((s=l.getAttributeValue(r,n))===null||s===void 0)&&s.endsWith(a))&&t(r)}},any:function(t,e,I){var l=I.adapter,n=e.name,a=e.value;if(a==="")return eFe.falseFunc;if(E4(e,I)){var c=new RegExp(UFI(a),"i");return function(s){var i=l.getAttributeValue(s,n);return i!=null&&i.length>=a.length&&c.test(i)&&t(s)}}return function(r){var s;return!!(!((s=l.getAttributeValue(r,n))===null||s===void 0)&&s.includes(a))&&t(r)}},not:function(t,e,I){var l=I.adapter,n=e.name,a=e.value;return a===""?function(c){return!!l.getAttributeValue(c,n)&&t(c)}:E4(e,I)?(a=a.toLowerCase(),function(c){var r=l.getAttributeValue(c,n);return(r==null||r.length!==a.length||r.toLowerCase()!==a)&&t(c)}):function(c){return l.getAttributeValue(c,n)!==a&&t(c)}}}});var BFI=Y(IFe=>{"use strict";o();Object.defineProperty(IFe,"__esModule",{value:!0});IFe.parse=void 0;var dta=new Set([9,10,12,13,32]),zFI=48,uta=57;function bta(t){if(t=t.trim().toLowerCase(),t==="even")return[2,0];if(t==="odd")return[2,1];var e=0,I=0,l=a(),n=c();if(e=zFI&&t.charCodeAt(e)<=uta;)i=i*10+(t.charCodeAt(e)-zFI),e++;return e===s?null:i}function r(){for(;e{"use strict";o();var mta=_1&&_1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(_1,"__esModule",{value:!0});_1.generate=_1.compile=void 0;var MFI=mta(T1());function Zta(t){var e=t[0],I=t[1]-1;if(I<0&&e<=0)return MFI.default.falseFunc;if(e===-1)return function(a){return a<=I};if(e===0)return function(a){return a===I};if(e===1)return I<0?MFI.default.trueFunc:function(a){return a>=I};var l=Math.abs(e),n=(I%l+l)%l;return e>1?function(a){return a>=I&&a%l===n}:function(a){return a<=I&&a%l===n}}_1.compile=Zta;function pta(t){var e=t[0],I=t[1]-1,l=0;if(e<0){var n=-e,a=(I%n+n)%n;return function(){var c=a+n*l++;return c>I?null:c}}return e===0?I<0?function(){return null}:function(){return l++===0?I:null}:(I<0&&(I+=e*Math.ceil(-I/e)),function(){return e*l+++I})}_1.generate=pta});var TFI=Y(WA=>{"use strict";o();Object.defineProperty(WA,"__esModule",{value:!0});WA.sequence=WA.generate=WA.compile=WA.parse=void 0;var Bet=BFI();Object.defineProperty(WA,"parse",{enumerable:!0,get:function(){return Bet.parse}});var lFe=SFI();Object.defineProperty(WA,"compile",{enumerable:!0,get:function(){return lFe.compile}});Object.defineProperty(WA,"generate",{enumerable:!0,get:function(){return lFe.generate}});function hta(t){return(0,lFe.compile)((0,Bet.parse)(t))}WA.default=hta;function Wta(t){return(0,lFe.generate)((0,Bet.parse)(t))}WA.sequence=Wta});var _FI=Y(J4=>{"use strict";o();var Nta=J4&&J4.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(J4,"__esModule",{value:!0});J4.filters=void 0;var nFe=Nta(TFI()),hp=T1();function aFe(t,e){return function(I){var l=e.getParent(I);return l!=null&&e.isTag(l)&&t(I)}}J4.filters={contains:function(t,e,I){var l=I.adapter;return function(a){return t(a)&&l.getText(a).includes(e)}},icontains:function(t,e,I){var l=I.adapter,n=e.toLowerCase();return function(c){return t(c)&&l.getText(c).toLowerCase().includes(n)}},"nth-child":function(t,e,I){var l=I.adapter,n=I.equals,a=(0,nFe.default)(e);return a===hp.falseFunc?hp.falseFunc:a===hp.trueFunc?aFe(t,l):function(r){for(var s=l.getSiblings(r),i=0,G=0;G=0&&!n(r,s[G]);G--)l.isTag(s[G])&&i++;return a(i)&&t(r)}},"nth-of-type":function(t,e,I){var l=I.adapter,n=I.equals,a=(0,nFe.default)(e);return a===hp.falseFunc?hp.falseFunc:a===hp.trueFunc?aFe(t,l):function(r){for(var s=l.getSiblings(r),i=0,G=0;G=0;G--){var d=s[G];if(n(r,d))break;l.isTag(d)&&l.getName(d)===l.getName(r)&&i++}return a(i)&&t(r)}},root:function(t,e,I){var l=I.adapter;return function(n){var a=l.getParent(n);return(a==null||!l.isTag(a))&&t(n)}},scope:function(t,e,I,l){var n=I.equals;return!l||l.length===0?J4.filters.root(t,e,I):l.length===1?function(a){return n(l[0],a)&&t(a)}:function(a){return l.includes(a)&&t(a)}},hover:Met("isHovered"),visited:Met("isVisited"),active:Met("isActive")};function Met(t){return function(I,l,n){var a=n.adapter,c=a[t];return typeof c!="function"?hp.falseFunc:function(s){return c(s)&&I(s)}}}});var KFI=Y(hS=>{"use strict";o();Object.defineProperty(hS,"__esModule",{value:!0});hS.verifyPseudoArgs=hS.pseudos=void 0;hS.pseudos={empty:function(t,e){var I=e.adapter;return!I.getChildren(t).some(function(l){return I.isTag(l)||I.getText(l)!==""})},"first-child":function(t,e){var I=e.adapter,l=e.equals,n=I.getSiblings(t).find(function(a){return I.isTag(a)});return n!=null&&l(t,n)},"last-child":function(t,e){for(var I=e.adapter,l=e.equals,n=I.getSiblings(t),a=n.length-1;a>=0;a--){if(l(t,n[a]))return!0;if(I.isTag(n[a]))break}return!1},"first-of-type":function(t,e){for(var I=e.adapter,l=e.equals,n=I.getSiblings(t),a=I.getName(t),c=0;c=0;c--){var r=n[c];if(l(t,r))return!0;if(I.isTag(r)&&I.getName(r)===a)break}return!1},"only-of-type":function(t,e){var I=e.adapter,l=e.equals,n=I.getName(t);return I.getSiblings(t).every(function(a){return l(t,a)||!I.isTag(a)||I.getName(a)!==n})},"only-child":function(t,e){var I=e.adapter,l=e.equals;return I.getSiblings(t).every(function(n){return l(t,n)||!I.isTag(n)})}};function Vta(t,e,I){if(I===null){if(t.length>2)throw new Error("pseudo-selector :".concat(e," requires an argument"))}else if(t.length===2)throw new Error("pseudo-selector :".concat(e," doesn't have any arguments"))}hS.verifyPseudoArgs=Vta});var DFI=Y(cFe=>{"use strict";o();Object.defineProperty(cFe,"__esModule",{value:!0});cFe.aliases=void 0;cFe.aliases={"any-link":":is(a, area, link)[href]",link:":any-link:not(:visited)",disabled:`:is( + :is(button, input, select, textarea, optgroup, option)[disabled], + optgroup[disabled] > option, + fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *) + )`,enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"}});var rFe=Y(Wp=>{"use strict";o();var qFI=Wp&&Wp.__spreadArray||function(t,e,I){if(I||arguments.length===2)for(var l=0,n=e.length,a;l{"use strict";o();Object.defineProperty(q2,"__esModule",{value:!0});q2.compilePseudoSelector=q2.aliases=q2.pseudos=q2.filters=void 0;var _et=T1(),Rta=NIe(),Ket=_FI();Object.defineProperty(q2,"filters",{enumerable:!0,get:function(){return Ket.filters}});var sFe=KFI();Object.defineProperty(q2,"pseudos",{enumerable:!0,get:function(){return sFe.pseudos}});var Det=DFI();Object.defineProperty(q2,"aliases",{enumerable:!0,get:function(){return Det.aliases}});var e2I=rFe();function Ata(t,e,I,l,n){var a=e.name,c=e.data;if(Array.isArray(c))return e2I.subselects[a](t,c,I,l,n);if(a in Det.aliases){if(c!=null)throw new Error("Pseudo ".concat(a," doesn't have any arguments"));var r=(0,Rta.parse)(Det.aliases[a]);return e2I.subselects.is(t,r,I,l,n)}if(a in Ket.filters)return Ket.filters[a](t,c,I,l);if(a in sFe.pseudos){var s=sFe.pseudos[a];return(0,sFe.verifyPseudoArgs)(s,a,c),s===_et.falseFunc?_et.falseFunc:t===_et.trueFunc?function(i){return s(i,I,c)}:function(i){return s(i,I,c)&&t(i)}}throw new Error("unmatched pseudo-class :".concat(a))}q2.compilePseudoSelector=Ata});var t2I=Y(oFe=>{"use strict";o();Object.defineProperty(oFe,"__esModule",{value:!0});oFe.compileGeneralSelector=void 0;var Fta=OFI(),Xta=qet(),NA=NIe();function gta(t,e,I,l,n){var a=I.adapter,c=I.equals;switch(e.type){case NA.SelectorType.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case NA.SelectorType.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case NA.SelectorType.Attribute:{if(e.namespace!=null)throw new Error("Namespaced attributes are not yet supported by css-select");return(!I.xmlMode||I.lowerCaseAttributeNames)&&(e.name=e.name.toLowerCase()),Fta.attributeRules[e.action](t,e,I)}case NA.SelectorType.Pseudo:return(0,Xta.compilePseudoSelector)(t,e,I,l,n);case NA.SelectorType.Tag:{if(e.namespace!=null)throw new Error("Namespaced tag names are not yet supported by css-select");var r=e.name;return(!I.xmlMode||I.lowerCaseTags)&&(r=r.toLowerCase()),function(G){return a.getName(G)===r&&t(G)}}case NA.SelectorType.Descendant:{if(I.cacheResults===!1||typeof WeakSet>"u")return function(G){for(var d=G;d=a.getParent(d);)if(a.isTag(d)&&t(d))return!0;return!1};var s=new WeakSet;return function(G){for(var d=G;d=a.getParent(d);)if(!s.has(d)){if(a.isTag(d)&&t(d))return!0;s.add(d)}return!1}}case"_flexibleDescendant":return function(G){var d=G;do if(a.isTag(d)&&t(d))return!0;while(d=a.getParent(d));return!1};case NA.SelectorType.Parent:return function(G){return a.getChildren(G).some(function(d){return a.isTag(d)&&t(d)})};case NA.SelectorType.Child:return function(G){var d=a.getParent(G);return d!=null&&a.isTag(d)&&t(d)};case NA.SelectorType.Sibling:return function(G){for(var d=a.getSiblings(G),u=0;u{"use strict";o();var vta=P2&&P2.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(P2,"__esModule",{value:!0});P2.compileToken=P2.compileUnsafe=P2.compile=void 0;var Pet=NIe(),D1=T1(),yta=vta(jFI()),wta=$Ae(),Hta=t2I(),I2I=rFe();function Qta(t,e,I){var l=l2I(t,e,I);return(0,I2I.ensureIsTag)(l,e.adapter)}P2.compile=Qta;function l2I(t,e,I){var l=typeof t=="string"?(0,Pet.parse)(t):t;return $et(l,e,I)}P2.compileUnsafe=l2I;function n2I(t){return t.type==="pseudo"&&(t.name==="scope"||Array.isArray(t.data)&&t.data.some(function(e){return e.some(n2I)}))}var fta={type:Pet.SelectorType.Descendant},Eta={type:"_flexibleDescendant"},Jta={type:Pet.SelectorType.Pseudo,name:"scope",data:null};function Cta(t,e,I){for(var l=e.adapter,n=!!I?.every(function(s){var i=l.isTag(s)&&l.getParent(s);return s===I2I.PLACEHOLDER_ELEMENT||i&&l.isTag(i)}),a=0,c=t;a0&&(0,wta.isTraversal)(r[0])&&r[0].type!=="descendant"))if(n&&!r.some(n2I))r.unshift(fta);else continue;r.unshift(Jta)}}function $et(t,e,I){var l;t=t.filter(function(s){return s.length>0}),t.forEach(yta.default),I=(l=e.context)!==null&&l!==void 0?l:I;var n=Array.isArray(I),a=I&&(Array.isArray(I)?I:[I]);Cta(t,e,a);var c=!1,r=t.map(function(s){if(s.length>=2){var i=s[0],G=s[1];i.type!=="pseudo"||i.name!=="scope"||(n&&G.type==="descendant"?s[1]=Eta:(G.type==="adjacent"||G.type==="sibling")&&(c=!0))}return Lta(s,e,a)}).reduce(kta,D1.falseFunc);return r.shouldTestNextSiblings=c,r}P2.compileToken=$et;function Lta(t,e,I){var l;return t.reduce(function(n,a){return n===D1.falseFunc?D1.falseFunc:(0,Hta.compileGeneralSelector)(n,a,e,I,$et)},(l=e.rootFunc)!==null&&l!==void 0?l:D1.trueFunc)}function kta(t,e){return e===D1.falseFunc||t===D1.trueFunc?t:t===D1.falseFunc||e===D1.trueFunc?e:function(l){return t(l)||e(l)}}});var G2I=Y(Ln=>{"use strict";o();var xta=Ln&&Ln.__createBinding||(Object.create?function(t,e,I,l){l===void 0&&(l=I);var n=Object.getOwnPropertyDescriptor(e,I);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[I]}}),Object.defineProperty(t,l,n)}:function(t,e,I,l){l===void 0&&(l=I),t[l]=e[I]}),jta=Ln&&Ln.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Uta=Ln&&Ln.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var I in t)I!=="default"&&Object.prototype.hasOwnProperty.call(t,I)&&xta(e,t,I);return jta(e,t),e};Object.defineProperty(Ln,"__esModule",{value:!0});Ln.aliases=Ln.pseudos=Ln.filters=Ln.is=Ln.selectOne=Ln.selectAll=Ln.prepareContext=Ln._compileToken=Ln._compileUnsafe=Ln.compile=void 0;var c2I=Uta(UAe()),r2I=T1(),VIe=a2I(),Ota=rFe(),s2I=function(t,e){return t===e},zta={adapter:c2I,equals:s2I};function ett(t){var e,I,l,n,a=t??zta;return(e=a.adapter)!==null&&e!==void 0||(a.adapter=c2I),(I=a.equals)!==null&&I!==void 0||(a.equals=(n=(l=a.adapter)===null||l===void 0?void 0:l.equals)!==null&&n!==void 0?n:s2I),a}function ttt(t){return function(I,l,n){var a=ett(l);return t(I,a,n)}}Ln.compile=ttt(VIe.compile);Ln._compileUnsafe=ttt(VIe.compileUnsafe);Ln._compileToken=ttt(VIe.compileToken);function o2I(t){return function(I,l,n){var a=ett(n);typeof I!="function"&&(I=(0,VIe.compileUnsafe)(I,a,l));var c=i2I(l,a.adapter,I.shouldTestNextSiblings);return t(I,c,a)}}function i2I(t,e,I){return I===void 0&&(I=!1),I&&(t=Bta(t,e)),Array.isArray(t)?e.removeSubsets(t):e.getChildren(t)}Ln.prepareContext=i2I;function Bta(t,e){for(var I=Array.isArray(t)?t.slice(0):[t],l=I.length,n=0;n{"use strict";o();function Sta(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function d2I(t,e){for(var I=0;I{"use strict";o();function Kta(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m2I(t,e){for(var I=0;I{"use strict";o();function iFe(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?iFe=function(I){return typeof I}:iFe=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},iFe(t)}function Pta(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function $ta(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&ntt(t,e)}function ntt(t,e){return ntt=Object.setPrototypeOf||function(l,n){return l.__proto__=n,l},ntt(t,e)}function eIa(t){var e=lIa();return function(){var l=GFe(t),n;if(e){var a=GFe(this).constructor;n=Reflect.construct(l,arguments,a)}else n=l.apply(this,arguments);return tIa(this,n)}}function tIa(t,e){return e&&(iFe(e)==="object"||typeof e=="function")?e:IIa(t)}function IIa(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function lIa(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function GFe(t){return GFe=Object.setPrototypeOf?Object.getPrototypeOf:function(I){return I.__proto__||Object.getPrototypeOf(I)},GFe(t)}var nIa,p2I;p2I=sH();h2I.exports=nIa=function(t){$ta(I,t);var e=eIa(I);function I(){return Pta(this,I),e.apply(this,arguments)}return I}(p2I)});var Y2I=Y((k_r,V2I)=>{"use strict";o();function dFe(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?dFe=function(I){return typeof I}:dFe=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},dFe(t)}function aIa(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function cIa(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&att(t,e)}function att(t,e){return att=Object.setPrototypeOf||function(l,n){return l.__proto__=n,l},att(t,e)}function rIa(t){var e=iIa();return function(){var l=uFe(t),n;if(e){var a=uFe(this).constructor;n=Reflect.construct(l,arguments,a)}else n=l.apply(this,arguments);return sIa(this,n)}}function sIa(t,e){return e&&(dFe(e)==="object"||typeof e=="function")?e:oIa(t)}function oIa(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function iIa(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function uFe(t){return uFe=Object.setPrototypeOf?Object.getPrototypeOf:function(I){return I.__proto__||Object.getPrototypeOf(I)},uFe(t)}var GIa,N2I;N2I=sH();V2I.exports=GIa=function(t){cIa(I,t);var e=rIa(I);function I(){return aIa(this,I),e.apply(this,arguments)}return I}(N2I)});var F2I=Y((j_r,A2I)=>{"use strict";o();function bFe(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?bFe=function(I){return typeof I}:bFe=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},bFe(t)}function dIa(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function uIa(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&ctt(t,e)}function ctt(t,e){return ctt=Object.setPrototypeOf||function(l,n){return l.__proto__=n,l},ctt(t,e)}function bIa(t){var e=pIa();return function(){var l=mFe(t),n;if(e){var a=mFe(this).constructor;n=Reflect.construct(l,arguments,a)}else n=l.apply(this,arguments);return mIa(this,n)}}function mIa(t,e){return e&&(bFe(e)==="object"||typeof e=="function")?e:ZIa(t)}function ZIa(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function pIa(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function mFe(t){return mFe=Object.setPrototypeOf?Object.getPrototypeOf:function(I){return I.__proto__||Object.getPrototypeOf(I)},mFe(t)}var hIa,R2I;R2I=sH();A2I.exports=hIa=function(t){uIa(I,t);var e=bIa(I);function I(){return dIa(this,I),e.apply(this,arguments)}return I}(R2I)});var VA=Y((O_r,v2I)=>{"use strict";o();function ZFe(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ZFe=function(I){return typeof I}:ZFe=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},ZFe(t)}function WIa(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function X2I(t,e){for(var I=0;I"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function pFe(t){return pFe=Object.setPrototypeOf?Object.getPrototypeOf:function(I){return I.__proto__||Object.getPrototypeOf(I)},pFe(t)}var g2I,XIa;g2I=sH();v2I.exports=XIa=function(t){VIa(I,t);var e=YIa(I);function I(){return WIa(this,I),e.apply(this,arguments)}return NIa(I,[{key:"_set",value:function(n){if(!/^[0-9]+$/.test(String(n)))throw Error("`".concat(this.prop,"` only takes an integer for value"));return this.val=parseInt(n)}}]),I}(g2I)});var H2I=Y((B_r,w2I)=>{"use strict";o();function hFe(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?hFe=function(I){return typeof I}:hFe=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},hFe(t)}function gIa(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function vIa(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&stt(t,e)}function stt(t,e){return stt=Object.setPrototypeOf||function(l,n){return l.__proto__=n,l},stt(t,e)}function yIa(t){var e=QIa();return function(){var l=WFe(t),n;if(e){var a=WFe(this).constructor;n=Reflect.construct(l,arguments,a)}else n=l.apply(this,arguments);return wIa(this,n)}}function wIa(t,e){return e&&(hFe(e)==="object"||typeof e=="function")?e:HIa(t)}function HIa(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function QIa(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function WFe(t){return WFe=Object.setPrototypeOf?Object.getPrototypeOf:function(I){return I.__proto__||Object.getPrototypeOf(I)},WFe(t)}var fIa,y2I;y2I=VA();w2I.exports=fIa=function(t){vIa(I,t);var e=yIa(I);function I(){return gIa(this,I),e.apply(this,arguments)}return I}(y2I)});var E2I=Y((S_r,f2I)=>{"use strict";o();function NFe(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?NFe=function(I){return typeof I}:NFe=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},NFe(t)}function EIa(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function JIa(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&ott(t,e)}function ott(t,e){return ott=Object.setPrototypeOf||function(l,n){return l.__proto__=n,l},ott(t,e)}function CIa(t){var e=xIa();return function(){var l=VFe(t),n;if(e){var a=VFe(this).constructor;n=Reflect.construct(l,arguments,a)}else n=l.apply(this,arguments);return LIa(this,n)}}function LIa(t,e){return e&&(NFe(e)==="object"||typeof e=="function")?e:kIa(t)}function kIa(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function xIa(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function VFe(t){return VFe=Object.setPrototypeOf?Object.getPrototypeOf:function(I){return I.__proto__||Object.getPrototypeOf(I)},VFe(t)}var jIa,Q2I;Q2I=VA();f2I.exports=jIa=function(t){JIa(I,t);var e=CIa(I);function I(){return EIa(this,I),e.apply(this,arguments)}return I}(Q2I)});var k2I=Y((__r,L2I)=>{"use strict";o();function YFe(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?YFe=function(I){return typeof I}:YFe=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},YFe(t)}function UIa(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function J2I(t,e){for(var I=0;I"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function RFe(t){return RFe=Object.setPrototypeOf?Object.getPrototypeOf:function(I){return I.__proto__||Object.getPrototypeOf(I)},RFe(t)}var _Ia,C2I;C2I=sH();L2I.exports=_Ia=function(){var t,e=function(I){zIa(n,I);var l=BIa(n);function n(){return UIa(this,n),l.apply(this,arguments)}return OIa(n,[{key:"_set",value:function(c){var r,s,i,G,d,u,b;if(c=String(c),b=c,i=null,d=!1,G="none",s="none",(u=c.match(/\"([^"]+)\"/)||(u=c.match(/\'([^']+)\'/)))&&(i=u[1],c=c.replace(u[0],""),d=!0),(u=c.match(/(none|left|right|center)/))?(r=u[1],c=c.replace(u[0],"")):r="left",r==="none"&&(d=!1),(u=c.match(/color\:([\w\-]+)/))&&(G=u[1],c=c.replace(u[0],"")),(u=c.match(/bg\:([\w\-]+)/))&&(s=u[1],c=c.replace(u[0],"")),c.trim()!=="")throw Error("Unrecognizable value `".concat(b,"` for `").concat(this.prop,"`"));return this.val={enabled:d,char:i,alignment:r,background:s,color:G}}}]),n}(C2I);return t=e,e}.call(void 0)});var O2I=Y((D_r,U2I)=>{"use strict";o();function AFe(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?AFe=function(I){return typeof I}:AFe=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},AFe(t)}function KIa(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function x2I(t,e){for(var I=0;I"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function FFe(t){return FFe=Object.setPrototypeOf?Object.getPrototypeOf:function(I){return I.__proto__||Object.getPrototypeOf(I)},FFe(t)}var Ila,j2I,lla=[].indexOf;j2I=sH();U2I.exports=Ila=function(){var t,e=function(I){qIa(n,I);var l=PIa(n);function n(){return KIa(this,n),l.apply(this,arguments)}return DIa(n,[{key:"_set",value:function(c){if(c=String(c).toLowerCase(),lla.call(t._allowed,c)<0)throw Error("Unrecognizable value `".concat(c,"` for `").concat(this.prop,"`"));return this.val=c}}]),n}(j2I);return t=e,e._allowed=["inline","block","none"],e}.call(void 0)});var utt=Y((P_r,B2I)=>{"use strict";o();function XFe(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?XFe=function(I){return typeof I}:XFe=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},XFe(t)}function nla(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ala(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&dtt(t,e)}function dtt(t,e){return dtt=Object.setPrototypeOf||function(l,n){return l.__proto__=n,l},dtt(t,e)}function cla(t){var e=ola();return function(){var l=gFe(t),n;if(e){var a=gFe(this).constructor;n=Reflect.construct(l,arguments,a)}else n=l.apply(this,arguments);return rla(this,n)}}function rla(t,e){return e&&(XFe(e)==="object"||typeof e=="function")?e:sla(t)}function sla(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ola(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function gFe(t){return gFe=Object.setPrototypeOf?Object.getPrototypeOf:function(I){return I.__proto__||Object.getPrototypeOf(I)},gFe(t)}var ila,z2I;z2I=VA();B2I.exports=ila=function(t){ala(I,t);var e=cla(I);function I(){return nla(this,I),e.apply(this,arguments)}return I}(z2I)});var mtt=Y((eKr,S2I)=>{"use strict";o();function vFe(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?vFe=function(I){return typeof I}:vFe=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},vFe(t)}function Gla(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function dla(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&btt(t,e)}function btt(t,e){return btt=Object.setPrototypeOf||function(l,n){return l.__proto__=n,l},btt(t,e)}function ula(t){var e=Zla();return function(){var l=yFe(t),n;if(e){var a=yFe(this).constructor;n=Reflect.construct(l,arguments,a)}else n=l.apply(this,arguments);return bla(this,n)}}function bla(t,e){return e&&(vFe(e)==="object"||typeof e=="function")?e:mla(t)}function mla(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Zla(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function yFe(t){return yFe=Object.setPrototypeOf?Object.getPrototypeOf:function(I){return I.__proto__||Object.getPrototypeOf(I)},yFe(t)}var pla,M2I;M2I=VA();S2I.exports=pla=function(t){dla(I,t);var e=ula(I);function I(){return Gla(this,I),e.apply(this,arguments)}return I}(M2I)});var ptt=Y((IKr,_2I)=>{"use strict";o();function wFe(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?wFe=function(I){return typeof I}:wFe=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},wFe(t)}function hla(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Wla(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ztt(t,e)}function Ztt(t,e){return Ztt=Object.setPrototypeOf||function(l,n){return l.__proto__=n,l},Ztt(t,e)}function Nla(t){var e=Rla();return function(){var l=HFe(t),n;if(e){var a=HFe(this).constructor;n=Reflect.construct(l,arguments,a)}else n=l.apply(this,arguments);return Vla(this,n)}}function Vla(t,e){return e&&(wFe(e)==="object"||typeof e=="function")?e:Yla(t)}function Yla(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Rla(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function HFe(t){return HFe=Object.setPrototypeOf?Object.getPrototypeOf:function(I){return I.__proto__||Object.getPrototypeOf(I)},HFe(t)}var Ala,T2I;T2I=VA();_2I.exports=Ala=function(t){Wla(I,t);var e=Nla(I);function I(){return hla(this,I),e.apply(this,arguments)}return I}(T2I)});var Wtt=Y((nKr,D2I)=>{"use strict";o();function QFe(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?QFe=function(I){return typeof I}:QFe=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},QFe(t)}function Fla(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Xla(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&htt(t,e)}function htt(t,e){return htt=Object.setPrototypeOf||function(l,n){return l.__proto__=n,l},htt(t,e)}function gla(t){var e=wla();return function(){var l=fFe(t),n;if(e){var a=fFe(this).constructor;n=Reflect.construct(l,arguments,a)}else n=l.apply(this,arguments);return vla(this,n)}}function vla(t,e){return e&&(QFe(e)==="object"||typeof e=="function")?e:yla(t)}function yla(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function wla(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function fFe(t){return fFe=Object.setPrototypeOf?Object.getPrototypeOf:function(I){return I.__proto__||Object.getPrototypeOf(I)},fFe(t)}var Hla,K2I;K2I=VA();D2I.exports=Hla=function(t){Xla(I,t);var e=gla(I);function I(){return Fla(this,I),e.apply(this,arguments)}return I}(K2I)});var $2I=Y((cKr,P2I)=>{"use strict";o();function EFe(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?EFe=function(I){return typeof I}:EFe=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},EFe(t)}function Qla(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function q2I(t,e){for(var I=0;I"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function JFe(t){return JFe=Object.setPrototypeOf?Object.getPrototypeOf:function(I){return I.__proto__||Object.getPrototypeOf(I)},JFe(t)}var xla,jla,Ula,Ola,YIe,RIe;RIe=sH();YIe=utt();Ula=mtt();Ola=ptt();jla=Wtt();P2I.exports=xla=function(){var t,e=function(I){Ela(n,I);var l=Jla(n);function n(){return Qla(this,n),l.apply(this,arguments)}return fla(n,null,[{key:"setOnto",value:function(c,r,s){var i,G,d;if(i="",G=RIe.sanitizeValue(s),RIe.importantClauseRx.test(String(G))&&(i=" !important",G=G.replace(RIe.importantClauseRx,"")),G=G.trim(),G.length===0)return t._setAllDirections(c,i,i,i,i);if(d=G.split(" ").map(function(u){return u+i}),d.length===1)return t._setAllDirections(c,d[0],d[0],d[0],d[0]);if(d.length===2)return t._setAllDirections(c,d[0],d[1],d[0],d[1]);if(d.length===3)return t._setAllDirections(c,d[0],d[1],d[2],d[1]);if(d.length===4)return t._setAllDirections(c,d[0],d[1],d[2],d[3]);throw Error("Can't understand value for margin: `".concat(s,"`"))}},{key:"_setAllDirections",value:function(c,r,s,i,G){YIe.setOnto(c,"marginTop",r),YIe.setOnto(c,"marginRight",s),YIe.setOnto(c,"marginBottom",i),YIe.setOnto(c,"marginLeft",G)}}]),n}(RIe);return t=e,e}.call(void 0)});var Ytt=Y((sKr,tXI)=>{"use strict";o();function CFe(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?CFe=function(I){return typeof I}:CFe=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},CFe(t)}function zla(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Bla(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Vtt(t,e)}function Vtt(t,e){return Vtt=Object.setPrototypeOf||function(l,n){return l.__proto__=n,l},Vtt(t,e)}function Mla(t){var e=_la();return function(){var l=LFe(t),n;if(e){var a=LFe(this).constructor;n=Reflect.construct(l,arguments,a)}else n=l.apply(this,arguments);return Sla(this,n)}}function Sla(t,e){return e&&(CFe(e)==="object"||typeof e=="function")?e:Tla(t)}function Tla(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _la(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function LFe(t){return LFe=Object.setPrototypeOf?Object.getPrototypeOf:function(I){return I.__proto__||Object.getPrototypeOf(I)},LFe(t)}var Kla,eXI;eXI=VA();tXI.exports=Kla=function(t){Bla(I,t);var e=Mla(I);function I(){return zla(this,I),e.apply(this,arguments)}return I}(eXI)});var Att=Y((iKr,lXI)=>{"use strict";o();function kFe(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?kFe=function(I){return typeof I}:kFe=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},kFe(t)}function Dla(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function qla(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Rtt(t,e)}function Rtt(t,e){return Rtt=Object.setPrototypeOf||function(l,n){return l.__proto__=n,l},Rtt(t,e)}function Pla(t){var e=tna();return function(){var l=xFe(t),n;if(e){var a=xFe(this).constructor;n=Reflect.construct(l,arguments,a)}else n=l.apply(this,arguments);return $la(this,n)}}function $la(t,e){return e&&(kFe(e)==="object"||typeof e=="function")?e:ena(t)}function ena(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function tna(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function xFe(t){return xFe=Object.setPrototypeOf?Object.getPrototypeOf:function(I){return I.__proto__||Object.getPrototypeOf(I)},xFe(t)}var Ina,IXI;IXI=VA();lXI.exports=Ina=function(t){qla(I,t);var e=Pla(I);function I(){return Dla(this,I),e.apply(this,arguments)}return I}(IXI)});var Xtt=Y((dKr,aXI)=>{"use strict";o();function jFe(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?jFe=function(I){return typeof I}:jFe=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},jFe(t)}function lna(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nna(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ftt(t,e)}function Ftt(t,e){return Ftt=Object.setPrototypeOf||function(l,n){return l.__proto__=n,l},Ftt(t,e)}function ana(t){var e=sna();return function(){var l=UFe(t),n;if(e){var a=UFe(this).constructor;n=Reflect.construct(l,arguments,a)}else n=l.apply(this,arguments);return cna(this,n)}}function cna(t,e){return e&&(jFe(e)==="object"||typeof e=="function")?e:rna(t)}function rna(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function sna(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function UFe(t){return UFe=Object.setPrototypeOf?Object.getPrototypeOf:function(I){return I.__proto__||Object.getPrototypeOf(I)},UFe(t)}var ona,nXI;nXI=VA();aXI.exports=ona=function(t){nna(I,t);var e=ana(I);function I(){return lna(this,I),e.apply(this,arguments)}return I}(nXI)});var vtt=Y((bKr,rXI)=>{"use strict";o();function OFe(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?OFe=function(I){return typeof I}:OFe=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},OFe(t)}function ina(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Gna(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&>t(t,e)}function gtt(t,e){return gtt=Object.setPrototypeOf||function(l,n){return l.__proto__=n,l},gtt(t,e)}function dna(t){var e=mna();return function(){var l=zFe(t),n;if(e){var a=zFe(this).constructor;n=Reflect.construct(l,arguments,a)}else n=l.apply(this,arguments);return una(this,n)}}function una(t,e){return e&&(OFe(e)==="object"||typeof e=="function")?e:bna(t)}function bna(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function mna(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function zFe(t){return zFe=Object.setPrototypeOf?Object.getPrototypeOf:function(I){return I.__proto__||Object.getPrototypeOf(I)},zFe(t)}var Zna,cXI;cXI=VA();rXI.exports=Zna=function(t){Gna(I,t);var e=dna(I);function I(){return ina(this,I),e.apply(this,arguments)}return I}(cXI)});var iXI=Y((ZKr,oXI)=>{"use strict";o();function BFe(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?BFe=function(I){return typeof I}:BFe=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},BFe(t)}function pna(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function sXI(t,e){for(var I=0;I"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function MFe(t){return MFe=Object.setPrototypeOf?Object.getPrototypeOf:function(I){return I.__proto__||Object.getPrototypeOf(I)},MFe(t)}var Ana,Fna,Xna,gna,AIe,FIe;FIe=sH();AIe=Ytt();Xna=Att();gna=Xtt();Fna=vtt();oXI.exports=Ana=function(){var t,e=function(I){Wna(n,I);var l=Nna(n);function n(){return pna(this,n),l.apply(this,arguments)}return hna(n,null,[{key:"setOnto",value:function(c,r,s){var i,G,d;if(i="",G=FIe.sanitizeValue(s),FIe.importantClauseRx.test(String(G))&&(i=" !important",G=G.replace(FIe.importantClauseRx,"")),G=G.trim(),G.length===0)return t._setAllDirections(c,i,i,i,i);if(d=G.split(" ").map(function(u){return u+i}),d.length===1)return t._setAllDirections(c,d[0],d[0],d[0],d[0]);if(d.length===2)return t._setAllDirections(c,d[0],d[1],d[0],d[1]);if(d.length===3)return t._setAllDirections(c,d[0],d[1],d[2],d[1]);if(d.length===4)return t._setAllDirections(c,d[0],d[1],d[2],d[3]);throw Error("Can't understand value for padding: `".concat(s,"`"))}},{key:"_setAllDirections",value:function(c,r,s,i,G){AIe.setOnto(c,"paddingTop",r),AIe.setOnto(c,"paddingRight",s),AIe.setOnto(c,"paddingBottom",i),AIe.setOnto(c,"paddingLeft",G)}}]),n}(FIe);return t=e,e}.call(void 0)});var mXI=Y((hKr,bXI)=>{"use strict";o();function SFe(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?SFe=function(I){return typeof I}:SFe=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},SFe(t)}function vna(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function GXI(t,e){for(var I=0;I{"use strict";o();function Hna(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ZXI(t,e){for(var I=0;I{"use strict";o();function TFe(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?TFe=function(I){return typeof I}:TFe=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},TFe(t)}function Ena(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function VXI(t,e){for(var I=0;I\,\+]{1})[\s]*/g,"$1").trim()}},{key:"splitSelectors",value:function(n){return n.trim().split(",")}}]),I}();return t=e,e}.call(void 0)});var gXI=Y((AKr,XXI)=>{"use strict";o();function Lna(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function FXI(t,e){for(var I=0;Ii.selector.priority}),a=0,c=n.length;a{"use strict";o();function jna(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function vXI(t,e){for(var I=0;I{"use strict";o();function zna(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fXI(t,e){for(var I=0;I1&&arguments[1]!==void 0?arguments[1]:!1,c,r,s,i;return c="",r=0,i=[],s=!1,t._countChars(this._str,function(G,d){return(r>n||r+d>n)&&(i.push(c),c="",r=0),r===0&&G===" "&&!s&&a?s=!0:(c+=G,r+=d,s=!1)}),c.length>0&&i.push(c),i}},{key:"trim",value:function(){return new I(this.str.trim())}},{key:"_getLength",value:function(){var n;return n=0,t._countChars(this._str,function(a,c){n+=c}),n}},{key:"cut",value:function(n,a){var c=this,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,s,i,G,d;if(a==null&&(a=this.length),n=parseInt(n),n>=a)throw Error("`from` shouldn't be larger than `to`");return i="",s="",d="",G=0,t._countChars(this._str,function(u,b){c.str==="ab"&&console.log(b,u),!(G===n&&u.match(/^\s+$/)&&r)&&(G]+>/,e._quotedHtmlRx=/^&(gt|lt|quot|amp|apos|sp);/,e}.call(void 0);Htt=["str","length"];for(_Fe=0,EXI=Htt.length;_Fe{"use strict";o();function Mna(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function LXI(t,e){for(var I=0;I{"use strict";o();function DFe(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?DFe=function(I){return typeof I}:DFe=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},DFe(t)}function _na(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function jXI(t,e){for(var I=0;I"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function qFe(t){return qFe=Object.setPrototypeOf?Object.getPrototypeOf:function(I){return I.__proto__||Object.getPrototypeOf(I)},qFe(t)}var taa,UXI;UXI=wb();OXI.exports=taa=function(t){Dna(I,t);var e=qna(I);function I(){return _na(this,I),e.apply(this,arguments)}return Kna(I,[{key:"_render",value:function(n){return UXI.repeatString(` +`,this._config.amount)}}]),I}(xXI())});var SXI=Y((EKr,MXI)=>{"use strict";o();function Iaa(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function BXI(t,e){for(var I=0;I{"use strict";o();function PFe(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?PFe=function(I){return typeof I}:PFe=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},PFe(t)}function aaa(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function TXI(t,e){for(var I=0;I"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function $Fe(t){return $Fe=Object.setPrototypeOf?Object.getPrototypeOf:function(I){return I.__proto__||Object.getPrototypeOf(I)},$Fe(t)}var daa,_XI;_XI=wb();KXI.exports=daa=function(t){raa(I,t);var e=saa(I);function I(){return aaa(this,I),e.apply(this,arguments)}return caa(I,[{key:"_render",value:function(n){return _XI.repeatString(` +`,this._config.amount)}}]),I}(SXI())});var $XI=Y((kKr,PXI)=>{"use strict";o();function uaa(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function qXI(t,e){for(var I=0;I"+this._render(I,l)+""}}]),t}()});var ngI=Y((jKr,lgI)=>{"use strict";o();function e2e(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e2e=function(I){return typeof I}:e2e=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},e2e(t)}function Zaa(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function egI(t,e){for(var I=0;I"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function t2e(t){return t2e=Object.setPrototypeOf?Object.getPrototypeOf:function(I){return I.__proto__||Object.getPrototypeOf(I)},t2e(t)}var Raa,tgI,IgI;IgI=wb();tgI=KFe();lgI.exports=Raa=function(){var t,e=function(I){haa(n,I);var l=Waa(n);function n(){return Zaa(this,n),l.apply(this,arguments)}return paa(n,[{key:"_render",value:function(c,r){var s,i,G,d,u,b,Z,p,W,h,N;if(this._lineNo===0&&(d=this._config.bullet)){if(u=d.char,b=new tgI(u).length,G=d.alignment,h=this._config.amount,N=u,s="",i="",h>b)if(Z=h-b,G==="right")s=t.pad(Z);else if(G==="left")i=t.pad(Z);else if(G==="center")p=Math.round(Z/2),s=t.pad(p),i=t.pad(Z-p);else throw Error("Unknown alignment `".concat(G,"`"));W=s+u+i}else W=t.pad(this._config.amount);return c+W}}],[{key:"pad",value:function(c){return IgI.repeatString(" ",c)}}]),n}($XI());return t=e,e}.call(void 0)});var rgI=Y((OKr,cgI)=>{"use strict";o();function Aaa(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function agI(t,e){for(var I=0;I"+this._render(I,l)+""}}]),t}()});var GgI=Y((BKr,igI)=>{"use strict";o();function I2e(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I2e=function(I){return typeof I}:I2e=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},I2e(t)}function gaa(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function sgI(t,e){for(var I=0;I"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function l2e(t){return l2e=Object.setPrototypeOf?Object.getPrototypeOf:function(I){return I.__proto__||Object.getPrototypeOf(I)},l2e(t)}var Eaa,ogI;ogI=wb();igI.exports=Eaa=function(t){yaa(I,t);var e=waa(I);function I(){return gaa(this,I),e.apply(this,arguments)}return vaa(I,[{key:"_render",value:function(n,a){return n+ogI.repeatString(" ",this._config.amount)}}]),I}(rgI())});var bgI=Y((SKr,ugI)=>{"use strict";o();function Jaa(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function dgI(t,e){for(var I=0;I{"use strict";o();function n2e(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?n2e=function(I){return typeof I}:n2e=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},n2e(t)}function kaa(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function mgI(t,e){for(var I=0;I"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function a2e(t){return a2e=Object.setPrototypeOf?Object.getPrototypeOf:function(I){return I.__proto__||Object.getPrototypeOf(I)},a2e(t)}var Maa;ZgI.exports=Maa=function(t){jaa(I,t);var e=Uaa(I);function I(){return kaa(this,I),e.apply(this,arguments)}return xaa(I,[{key:"_render",value:function(){}}]),I}(bgI())});var YgI=Y((DKr,VgI)=>{"use strict";o();function Saa(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function hgI(t,e){for(var I=0;I2&&arguments[2]!==void 0?arguments[2]:{},c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"";Saa(this,I),this._layout=l,this._parent=n,this._name=c,this._config=WgI(t.defaultConfig,a),this._closed=!1,this._wasOpenOnce=!1,this._active=!1,this._buffer="",this._didSeparateBlock=!1,this._linePrependor=new this._config.linePrependor.fn(this._config.linePrependor.options),this._lineAppendor=new this._config.lineAppendor.fn(this._config.lineAppendor.options),this._blockPrependor=new this._config.blockPrependor.fn(this._config.blockPrependor.options),this._blockAppendor=new this._config.blockAppendor.fn(this._config.blockAppendor.options)}return Taa(I,[{key:"_activate",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(this._active)throw Error("This block is already active. This is probably a bug in RenderKid itself");if(this._closed)throw Error("This block is closed and cannot be activated. This is probably a bug in RenderKid itself");return this._active=!0,this._layout._activeBlock=this,n&&this._parent!=null&&this._parent._deactivate(!1),this}},{key:"_deactivate",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return this._ensureActive(),this._flushBuffer(),n&&this._parent!=null&&this._parent._activate(!1),this._active=!1,this}},{key:"_ensureActive",value:function(){if(!this._wasOpenOnce)throw Error("This block has never been open before. This is probably a bug in RenderKid itself.");if(!this._active)throw Error("This block is not active. This is probably a bug in RenderKid itself.");if(this._closed)throw Error("This block is already closed. This is probably a bug in RenderKid itself.")}},{key:"_open",value:function(){if(this._wasOpenOnce)throw Error("Block._open() has been called twice. This is probably a RenderKid bug.");return this._wasOpenOnce=!0,this._parent!=null&&this._parent.write(this._whatToPrependToBlock()),this._activate(),this}},{key:"close",value:function(){return this._deactivate(),this._closed=!0,this._parent!=null&&this._parent.write(this._whatToAppendToBlock()),this}},{key:"isOpen",value:function(){return this._wasOpenOnce&&!this._closed}},{key:"write",value:function(n){if(this._ensureActive(),n!=="")return n=String(n),this._buffer+=n,this}},{key:"openBlock",value:function(n,a){var c;return this._ensureActive(),c=new I(this._layout,this,n,a),c._open(),c}},{key:"_flushBuffer",value:function(){var n;this._buffer!==""&&(n=this._buffer,this._buffer="",this._writeInline(n))}},{key:"_toPrependToLine",value:function(){var n;return n="",this._parent!=null&&(n=this._parent._toPrependToLine()),this._linePrependor.render(n)}},{key:"_toAppendToLine",value:function(){var n;return n="",this._parent!=null&&(n=this._parent._toAppendToLine()),this._lineAppendor.render(n)}},{key:"_whatToPrependToBlock",value:function(){return this._blockPrependor.render()}},{key:"_whatToAppendToBlock",value:function(){return this._blockAppendor.render()}},{key:"_writeInline",value:function(n){var a,c,r,s,i,G,d,u,b,Z;if(new gIe(n).isOnlySpecialChars()){this._layout._append(n);return}if(Z=n,i=0,G=Z.match(/^\n+/)){for(a=c=1,d=G[0].length;1<=d?c<=d:c>=d;a=1<=d?++c:--c)this._writeLine("");Z=Z.substr(G[0].length,Z.length)}for((G=Z.match(/\n+$/))&&(i=G[0].length,Z=Z.substr(0,Z.length-G[0].length));Z.length>0;)if(G=Z.match(/^[^\n]+/))this._writeLine(G[0]),Z=Z.substr(G[0].length,Z.length);else if(G=Z.match(/^\n+/)){for(a=r=1,u=G[0].length;1<=u?ru;a=1<=u?++r:--r)this._writeLine("");Z=Z.substr(G[0].length,Z.length)}if(i>0)for(a=s=1,b=i;1<=b?s<=b:s>=b;a=1<=b?++s:--s)this._writeLine("")}},{key:"_writeLine",value:function(n){var a,c,r,s,i,G,d,u,b;for(s=new gIe(n);u=this._toPrependToLine(),b=new gIe(u).length,G=this._toAppendToLine(),d=new gIe(G).length,i=this._layout._config.terminalWidth-(b+d),r=Math.min(this._config.width,i),c=s.cut(0,r,!0),a=u+c.str+G,this._layout._appendLine(a),!s.isEmpty(););}}]),I}();return t=e,e.defaultConfig={blockPrependor:{fn:zXI(),options:{amount:0}},blockAppendor:{fn:DXI(),options:{amount:0}},linePrependor:{fn:ngI(),options:{amount:0}},lineAppendor:{fn:GgI(),options:{amount:0}},lineWrapper:{fn:pgI(),options:{lineWidth:null}},width:NgI,prefixRaw:"",suffixRaw:""},e}.call(void 0)});var HgI=Y((PKr,wgI)=>{"use strict";o();function Daa(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function RgI(t,e){for(var I=0;I0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Daa(this,I);var a;this._written=[],this._activeBlock=null,this._config=Ltt(t._defaultConfig,l),a=Ltt(t._rootBlockDefaultConfig,n),this._root=new XgI(this,null,a,"__root"),this._root._open()}return qaa(I,[{key:"getRootBlock",value:function(){return this._root}},{key:"_append",value:function(n){return this._written.push(n)}},{key:"_appendLine",value:function(n){var a;return this._append(n),a=new vgI(n),a.length +`),this}},{key:"get",value:function(){return this._ensureClosed(),this._written[this._written.length-1]===` +`&&this._written.pop(),this._written.join("")}},{key:"_ensureClosed",value:function(){if(this._activeBlock!==this._root)throw Error("Not all the blocks have been closed. Please call block.close() on all open blocks.");this._root.isOpen()&&this._root.close()}}]),I}();return t=e,e._rootBlockDefaultConfig={linePrependor:{options:{amount:0}},lineAppendor:{options:{amount:0}},blockPrependor:{options:{amount:0}},blockAppendor:{options:{amount:0}}},e._defaultConfig={terminalWidth:ygI},e}.call(void 0);ktt=["openBlock","write"];for(c2e=0,AgI=ktt.length;c2e{"use strict";o();QgI.exports=({onlyFirst:t=!1}={})=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t?void 0:"g")}});var JgI=Y((IDr,EgI)=>{"use strict";o();var $aa=fgI();EgI.exports=t=>typeof t=="string"?t.replace($aa(),""):t});var MgI=Y((nDr,BgI)=>{"use strict";o();function eca(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function CgI(t,e){for(var I=0;I0&&arguments[0]!==void 0?arguments[0]:{};eca(this,I),this.tools=t.tools,this._config=xgI(t._defaultConfig,l),this._initStyles()}return tca(I,[{key:"_initStyles",value:function(){return this._styles=new LgI}},{key:"style",value:function(){return this._styles.setRule.apply(this._styles,arguments)}},{key:"_getStyleFor",value:function(n){return this._styles.getStyleFor(n)}},{key:"render",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return this._paint(this._renderDom(this._toDom(n)),a)}},{key:"_toDom",value:function(n){if(typeof n=="string")return this._parse(n);if(UgI(n)||Array.isArray(n))return this._objToDom(n);throw Error("Invalid input type. Only strings, arrays and objects are accepted")}},{key:"_objToDom",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return a&&(n={body:n}),vIe.objectToDom(n)}},{key:"_paint",value:function(n,a){var c;return c=xtt.paint(n),a?c:OgI(c)}},{key:"_parse",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return a&&(n=""+n+""),vIe.stringToDom(n)}},{key:"_renderDom",value:function(n){var a,c,r;return a=n[0],c=new jtt(this._config.layout),r=c.getRootBlock(),this._renderBlockNode(a,null,r),c.get()}},{key:"_renderChildrenOf",value:function(n,a){var c,r,s,i;for(i=n.children,c=0,r=i.length;c{o();var Ott,TgI,_gI,C4,KgI,L4,DgI,qgI,ztt,yIe,PgI,r2e,SgI,Btt,$2=[].slice,Utt=[].indexOf||function(t){for(var e=0,I=this.length;e0&&(t.length=t.length-l),t},pluckOneItem:function(t,e){var I,l,n,a,c;if(t.length<1)return t;for(l=!1,I=a=0,c=t.length;athis._maxItems)break;if(typeof c=="string"){s.push({item:{custom:c}});continue}s.push(function(){var u;return u={item:{header:{pointer:function(){return c.file==null?"":{file:c.file,colon:":",line:c.line}}()},footer:function(){var b;return b={addr:c.shortenedAddr},c.extra!=null&&(b.extra=c.extra),b}()}},typeof c.what=="string"&&c.what.trim().length>0&&(u.item.header.what=c.what),u}())}return r={"pretty-error":{header:n}},s.length>0&&(r["pretty-error"].trace=s),r},e.prototype._skipOrFilter=function(I,l){var n,a,c,r,s,i,G,d,u,b,Z,p,W,h,N,V,R;if(typeof I=="object"){if(p=I.modName,Utt.call(this._packagesToSkip,p)>=0||(W=I.path,Utt.call(this._pathsToSkip,W)>=0))return!0;for(h=I.packages,r=0,d=h.length;r=0)return!0;if(typeof I.shortenedAddr=="string")for(N=this._aliases,s=0,u=N.length;s{"use strict";o();function nca(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function tvI(t,e){for(var I=0;I=t.length?{done:!0}:{done:!1,value:t[l++]}},e:function(i){throw i},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,c=!1,r;return{s:function(){I=I.call(t)},n:function(){var i=I.next();return a=i.done,i},e:function(i){c=!0,r=i},f:function(){try{!a&&I.return!=null&&I.return()}finally{if(c)throw r}}}}function cca(t,e){if(t){if(typeof t=="string")return IvI(t,e);var I=Object.prototype.toString.call(t).slice(8,-1);if(I==="Object"&&t.constructor&&(I=t.constructor.name),I==="Map"||I==="Set")return Array.from(t);if(I==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(I))return IvI(t,e)}}function IvI(t,e){(e==null||e>t.length)&&(e=t.length);for(var I=0,l=new Array(e);I0?t*40+55:0,c=e>0?e*40+55:0,r=I>0?I*40+55:0;l[n]=ica([a,c,r])}function svI(t){for(var e=t.toString(16);e.length<2;)e="0"+e;return e}function ica(t){var e=[],I=rvI(t),l;try{for(I.s();!(l=I.n()).done;){var n=l.value;e.push(svI(n))}}catch(a){I.e(a)}finally{I.f()}return"#"+e.join("")}function nvI(t,e,I,l){var n;return e==="text"?n=bca(I,l):e==="display"?n=dca(t,I,l):e==="xterm256Foreground"?n=i2e(t,l.colors[I]):e==="xterm256Background"?n=G2e(t,l.colors[I]):e==="rgb"&&(n=Gca(t,I)),n}function Gca(t,e){e=e.substring(2).slice(0,-1);var I=+e.substr(0,2),l=e.substring(5).split(";"),n=l.map(function(a){return("0"+Number(a).toString(16)).substr(-2)}).join("");return o2e(t,(I===38?"color:#":"background-color:#")+n)}function dca(t,e,I){e=parseInt(e,10);var l={"-1":function(){return"
"},0:function(){return t.length&&ovI(t)},1:function(){return q1(t,"b")},3:function(){return q1(t,"i")},4:function(){return q1(t,"u")},8:function(){return o2e(t,"display:none")},9:function(){return q1(t,"strike")},22:function(){return o2e(t,"font-weight:normal;text-decoration:none;font-style:normal")},23:function(){return cvI(t,"i")},24:function(){return cvI(t,"u")},39:function(){return i2e(t,I.fg)},49:function(){return G2e(t,I.bg)},53:function(){return o2e(t,"text-decoration:overline")}},n;return l[e]?n=l[e]():4"}).join("")}function s2e(t,e){for(var I=[],l=t;l<=e;l++)I.push(l);return I}function uca(t){return function(e){return(t===null||e.category!==t)&&t!=="all"}}function avI(t){t=parseInt(t,10);var e=null;return t===0?e="all":t===1?e="bold":2")}function o2e(t,e){return q1(t,"span",e)}function i2e(t,e){return q1(t,"span","color:"+e)}function G2e(t,e){return q1(t,"span","background-color:"+e)}function cvI(t,e){var I;if(t.slice(-1)[0]===e&&(I=t.pop()),I)return""}function mca(t,e,I){var l=!1,n=3;function a(){return""}function c(F,v){return I("xterm256Foreground",v),""}function r(F,v){return I("xterm256Background",v),""}function s(F){return e.newline?I("display",-1):I("text",F),""}function i(F,v){l=!0,v.trim().length===0&&(v="0"),v=v.trimRight(";").split(";");var y=rvI(v),w;try{for(y.s();!(w=y.n()).done;){var H=w.value;I("display",H)}}catch(f){y.e(f)}finally{y.f()}return""}function G(F){return I("text",F),""}function d(F){return I("rgb",F),""}var u=[{pattern:/^\x08+/,sub:a},{pattern:/^\x1b\[[012]?K/,sub:a},{pattern:/^\x1b\[\(B/,sub:a},{pattern:/^\x1b\[[34]8;2;\d+;\d+;\d+m/,sub:d},{pattern:/^\x1b\[38;5;(\d+)m/,sub:c},{pattern:/^\x1b\[48;5;(\d+)m/,sub:r},{pattern:/^\n/,sub:s},{pattern:/^\r+\n/,sub:s},{pattern:/^\r/,sub:s},{pattern:/^\x1b\[((?:\d{1,3};?)+|)m/,sub:i},{pattern:/^\x1b\[\d?J/,sub:a},{pattern:/^\x1b\[\d{0,3};\d{0,3}f/,sub:a},{pattern:/^\x1b\[?[\d;]{0,3}/,sub:a},{pattern:/^(([^\x1b\x08\r\n])+)/,sub:G}];function b(F,v){v>n&&l||(l=!1,t=t.replace(F.pattern,F.sub))}var Z=[],p=t,W=p.length;e:for(;W>0;){for(var h=0,N=0,V=u.length;N{"use strict";o();var gca=Hb&&Hb.__extends||function(){var t=function(e,I){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,n){l.__proto__=n}||function(l,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(l[a]=n[a])},t(e,I)};return function(e,I){if(typeof I!="function"&&I!==null)throw new TypeError("Class extends value "+String(I)+" is not a constructor or null");t(e,I);function l(){this.constructor=e}e.prototype=I===null?Object.create(I):(l.prototype=I.prototype,new l)}}(),oi=Hb&&Hb.__assign||function(){return oi=Object.assign||function(t){for(var e,I=1,l=arguments.length;I-1){I._history.stack=i.slice(0,G+1);var d=I._history.stack.length;if(d>fvI){var u=d-fvI;I._history.stack=i.slice(u,d),I._history.offset=Math.max(I._history.offset-u,0)}}var b=Date.now();if(n){var Z=I._history.stack[I._history.offset];if(Z&&b-Z.timestamp=p&&U<=W&&k.startsWith(b)?k.substring(b.length):k}).join(` +`);if(G!==h){var N=Z[p];I._applyEdits({value:h,selectionStart:N?.startsWith(b)?d-b.length:d,selectionEnd:u-(G.length-h.length)})}}else if(d!==u){var Z=I._getLines(G,d),V=Z.length-1,R=I._getLines(G,u).length-1,N=Z[V];I._applyEdits({value:G.split(` +`).map(function(T,q){return q>=V&&q<=R?b+T:T}).join(` +`),selectionStart:N&&/\S/.test(N)?d+b.length:d,selectionEnd:u+b.length*(R-V+1)})}else{var F=d+b.length;I._applyEdits({value:G.substring(0,d)+b+G.substring(u),selectionStart:F,selectionEnd:F})}else if(l.keyCode===Eca){var v=d!==u,y=G.substring(0,d);if(y.endsWith(b)&&!v){l.preventDefault();var F=d-b.length;I._applyEdits({value:G.substring(0,d-b.length)+G.substring(u),selectionStart:F,selectionEnd:F})}}else if(l.keyCode===Qca){if(d===u){var w=I._getLines(G,d).pop(),H=w?.match(/^\s+/);if(H?.[0]){l.preventDefault();var f=` +`+H[0],F=d+f.length;I._applyEdits({value:G.substring(0,d)+f+G.substring(u),selectionStart:F,selectionEnd:F})}}}else if(l.keyCode===yvI||l.keyCode===wvI||l.keyCode===HvI||l.keyCode===QvI){var L=void 0;l.keyCode===yvI&&l.shiftKey?L=["(",")"]:l.keyCode===wvI?l.shiftKey?L=["{","}"]:L=["[","]"]:l.keyCode===HvI?l.shiftKey?L=['"','"']:L=["'","'"]:l.keyCode===QvI&&!l.shiftKey&&(L=["`","`"]),d!==u&&L&&(l.preventDefault(),I._applyEdits({value:G.substring(0,d)+L[0]+G.substring(d,u)+L[1]+G.substring(u),selectionStart:d,selectionEnd:u+2}))}else(qtt?l.metaKey&&l.keyCode===Y2e:l.ctrlKey&&l.keyCode===Y2e)&&!l.shiftKey&&!l.altKey?(l.preventDefault(),I._undoEdit()):(qtt?l.metaKey&&l.keyCode===Y2e&&l.shiftKey:xca?l.ctrlKey&&l.keyCode===Jca:l.ctrlKey&&l.keyCode===Y2e&&l.shiftKey)&&!l.altKey?(l.preventDefault(),I._redoEdit()):l.keyCode===Cca&&l.ctrlKey&&(!qtt||l.shiftKey)&&(l.preventDefault(),I.setState(function(k){return{capture:!k.capture}}))}},I._handleChange=function(l){var n=l.currentTarget,a=n.value,c=n.selectionStart,r=n.selectionEnd;I._recordChange({value:a,selectionStart:c,selectionEnd:r},!0),I.props.onValueChange(a)},I._history={stack:[],offset:-1},I._input=null,I}return e.prototype.componentDidMount=function(){this._recordCurrentState()},Object.defineProperty(e.prototype,"session",{get:function(){return{history:this._history}},set:function(I){this._history=I.history},enumerable:!1,configurable:!0}),e.prototype.render=function(){var I=this,l=this.props,n=l.value,a=l.style,c=l.padding,r=l.highlight,s=l.textareaId,i=l.textareaClassName,G=l.autoFocus,d=l.disabled,u=l.form,b=l.maxLength,Z=l.minLength,p=l.name,W=l.placeholder,h=l.readOnly,N=l.required,V=l.onClick,R=l.onFocus,F=l.onBlur,v=l.onKeyUp,y=l.onKeyDown,w=l.onValueChange,H=l.tabSize,f=l.insertSpaces,L=l.ignoreTabKey,k=l.preClassName,U=Hca(l,["value","style","padding","highlight","textareaId","textareaClassName","autoFocus","disabled","form","maxLength","minLength","name","placeholder","readOnly","required","onClick","onFocus","onBlur","onKeyUp","onKeyDown","onValueChange","tabSize","insertSpaces","ignoreTabKey","preClassName"]),T={paddingTop:typeof c=="object"?c.top:c,paddingRight:typeof c=="object"?c.right:c,paddingBottom:typeof c=="object"?c.bottom:c,paddingLeft:typeof c=="object"?c.left:c},q=r(n);return fIe.createElement("div",oi({},U,{style:oi(oi({},EIe.container),a)}),fIe.createElement("pre",oi({className:k,"aria-hidden":"true",style:oi(oi(oi({},EIe.editor),EIe.highlight),T)},typeof q=="string"?{dangerouslySetInnerHTML:{__html:q+"
"}}:{children:q})),fIe.createElement("textarea",{ref:function(_){return I._input=_},style:oi(oi(oi({},EIe.editor),EIe.textarea),T),className:R2e+(i?" ".concat(i):""),id:s,value:n,onChange:this._handleChange,onKeyDown:this._handleKeyDown,onClick:V,onKeyUp:v,onFocus:R,onBlur:F,disabled:d,form:u,maxLength:b,minLength:Z,name:p,placeholder:W,readOnly:h,required:N,autoFocus:G,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"data-gramm":!1}),fIe.createElement("style",{dangerouslySetInnerHTML:{__html:jca}}))},e.defaultProps={tabSize:2,insertSpaces:!0,ignoreTabKey:!1,padding:0},e}(fIe.Component);Hb.default=Uca;var EIe={container:{position:"relative",textAlign:"left",boxSizing:"border-box",padding:0,overflow:"hidden"},textarea:{position:"absolute",top:0,left:0,height:"100%",width:"100%",resize:"none",color:"inherit",overflow:"hidden",MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",WebkitTextFillColor:"transparent"},highlight:{position:"relative",pointerEvents:"none"},editor:{margin:0,border:0,background:"none",boxSizing:"inherit",display:"inherit",fontFamily:"inherit",fontSize:"inherit",fontStyle:"inherit",fontVariantLigatures:"inherit",fontWeight:"inherit",letterSpacing:"inherit",lineHeight:"inherit",tabSize:"inherit",textIndent:"inherit",textRendering:"inherit",textTransform:"inherit",whiteSpace:"pre-wrap",wordBreak:"keep-all",overflowWrap:"break-word"}}});var CvI=Y((j6r,A2e)=>{o();var Oca=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};var JvI=function(t){var e=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,I=0,l={},n={manual:t.Prism&&t.Prism.manual,disableWorkerMessageHandler:t.Prism&&t.Prism.disableWorkerMessageHandler,util:{encode:function p(W){return W instanceof a?new a(W.type,p(W.content),W.alias):Array.isArray(W)?W.map(p):W.replace(/&/g,"&").replace(/"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(N){var p=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(N.stack)||[])[1];if(p){var W=document.getElementsByTagName("script");for(var h in W)if(W[h].src==p)return W[h]}return null}},isActive:function(p,W,h){for(var N="no-"+W;p;){var V=p.classList;if(V.contains(W))return!0;if(V.contains(N))return!1;p=p.parentElement}return!!h}},languages:{plain:l,plaintext:l,text:l,txt:l,extend:function(p,W){var h=n.util.clone(n.languages[p]);for(var N in W)h[N]=W[N];return h},insertBefore:function(p,W,h,N){N=N||n.languages;var V=N[p],R={};for(var F in V)if(V.hasOwnProperty(F)){if(F==W)for(var v in h)h.hasOwnProperty(v)&&(R[v]=h[v]);h.hasOwnProperty(F)||(R[F]=V[F])}var y=N[p];return N[p]=R,n.languages.DFS(n.languages,function(w,H){H===y&&w!=p&&(this[w]=R)}),R},DFS:function p(W,h,N,V){V=V||{};var R=n.util.objId;for(var F in W)if(W.hasOwnProperty(F)){h.call(W,F,W[F],N||F);var v=W[F],y=n.util.type(v);y==="Object"&&!V[R(v)]?(V[R(v)]=!0,p(v,h,null,V)):y==="Array"&&!V[R(v)]&&(V[R(v)]=!0,p(v,h,F,V))}}},plugins:{},highlightAll:function(p,W){n.highlightAllUnder(document,p,W)},highlightAllUnder:function(p,W,h){var N={callback:h,container:p,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};n.hooks.run("before-highlightall",N),N.elements=Array.prototype.slice.apply(N.container.querySelectorAll(N.selector)),n.hooks.run("before-all-elements-highlight",N);for(var V=0,R;R=N.elements[V++];)n.highlightElement(R,W===!0,N.callback)},highlightElement:function(p,W,h){var N=n.util.getLanguage(p),V=n.languages[N];n.util.setLanguage(p,N);var R=p.parentElement;R&&R.nodeName.toLowerCase()==="pre"&&n.util.setLanguage(R,N);var F=p.textContent,v={element:p,language:N,grammar:V,code:F};function y(H){v.highlightedCode=H,n.hooks.run("before-insert",v),v.element.innerHTML=v.highlightedCode,n.hooks.run("after-highlight",v),n.hooks.run("complete",v),h&&h.call(v.element)}if(n.hooks.run("before-sanity-check",v),R=v.element.parentElement,R&&R.nodeName.toLowerCase()==="pre"&&!R.hasAttribute("tabindex")&&R.setAttribute("tabindex","0"),!v.code){n.hooks.run("complete",v),h&&h.call(v.element);return}if(n.hooks.run("before-highlight",v),!v.grammar){y(n.util.encode(v.code));return}if(W&&t.Worker){var w=new Worker(n.filename);w.onmessage=function(H){y(H.data)},w.postMessage(JSON.stringify({language:v.language,code:v.code,immediateClose:!0}))}else y(n.highlight(v.code,v.grammar,v.language))},highlight:function(p,W,h){var N={code:p,grammar:W,language:h};if(n.hooks.run("before-tokenize",N),!N.grammar)throw new Error('The language "'+N.language+'" has no grammar.');return N.tokens=n.tokenize(N.code,N.grammar),n.hooks.run("after-tokenize",N),a.stringify(n.util.encode(N.tokens),N.language)},tokenize:function(p,W){var h=W.rest;if(h){for(var N in h)W[N]=h[N];delete W.rest}var V=new s;return i(V,V.head,p),r(p,V,W,V.head,0),d(V)},hooks:{all:{},add:function(p,W){var h=n.hooks.all;h[p]=h[p]||[],h[p].push(W)},run:function(p,W){var h=n.hooks.all[p];if(!(!h||!h.length))for(var N=0,V;V=h[N++];)V(W)}},Token:a};t.Prism=n;function a(p,W,h,N){this.type=p,this.content=W,this.alias=h,this.length=(N||"").length|0}a.stringify=function p(W,h){if(typeof W=="string")return W;if(Array.isArray(W)){var N="";return W.forEach(function(y){N+=p(y,h)}),N}var V={type:W.type,content:p(W.content,h),tag:"span",classes:["token",W.type],attributes:{},language:h},R=W.alias;R&&(Array.isArray(R)?Array.prototype.push.apply(V.classes,R):V.classes.push(R)),n.hooks.run("wrap",V);var F="";for(var v in V.attributes)F+=" "+v+'="'+(V.attributes[v]||"").replace(/"/g,""")+'"';return"<"+V.tag+' class="'+V.classes.join(" ")+'"'+F+">"+V.content+""};function c(p,W,h,N){p.lastIndex=W;var V=p.exec(h);if(V&&N&&V[1]){var R=V[1].length;V.index+=R,V[0]=V[0].slice(R)}return V}function r(p,W,h,N,V,R){for(var F in h)if(!(!h.hasOwnProperty(F)||!h[F])){var v=h[F];v=Array.isArray(v)?v:[v];for(var y=0;y=R.reach);_+=q.value.length,q=q.next){var $=q.value;if(W.length>p.length)return;if(!($ instanceof a)){var ee=1,se;if(L){if(se=c(T,_,p,f),!se||se.index>=p.length)break;var Xe=se.index,Ae=se.index+se[0].length,Ve=_;for(Ve+=q.value.length;Xe>=Ve;)q=q.next,Ve+=q.value.length;if(Ve-=q.value.length,_=Ve,q.value instanceof a)continue;for(var ct=q;ct!==W.tail&&(VeR.reach&&(R.reach=j);var Ne=q.prev;Pt&&(Ne=i(W,Ne,Pt),_+=Pt.length),G(W,Ne,ee);var ce=new a(F,H?n.tokenize(_t,H):_t,k,_t);if(q=i(W,Ne,ce),S&&i(W,q,S),ee>1){var St={cause:F+","+y,reach:j};r(p,W,h,q.prev,_,St),R&&St.reach>R.reach&&(R.reach=St.reach)}}}}}}function s(){var p={value:null,prev:null,next:null},W={value:null,prev:p,next:null};p.next=W,this.head=p,this.tail=W,this.length=0}function i(p,W,h){var N=W.next,V={value:h,prev:W,next:N};return W.next=V,N.prev=V,p.length++,V}function G(p,W,h){for(var N=W.next,V=0;VaXe});module.exports=Zlt(Dsa);o();var CHI=z(LXe()),Zo=require("obsidian");o();var SHt=z(uI());NI();X_();var $Ht=z(t3());o();var UHt=require("obsidian"),hU=z(cEe());o();o();o();var fbt=["langchain/chat_models/universal","langchain/cache/file_system","langchain/storage/file_system","langchain/hub/index","langchain/hub/node"];o();tF();aF();o();tF();aF();eoe();bQ();zK();Tb();BK();Rs();noe();soe();ooe();PK();uoe();boe();moe();Zoe();hoe();Woe();Noe();Voe();Yoe();Foe();Xoe();goe();voe();yoe();RCe();NI();Ns();ise();NC();H3();ose();var CVt=Ro({AIMessage:()=>He,AIMessageChunk:()=>eI,BaseMessage:()=>Ml,BaseMessageChunk:()=>gr,ClearToolUsesEdit:()=>bj,Document:()=>Hr,DynamicStructuredTool:()=>bC,DynamicTool:()=>MX,FakeToolCallingModel:()=>MK,HumanMessage:()=>ZI,HumanMessageChunk:()=>No,InMemoryStore:()=>nQ,MIDDLEWARE_BRAND:()=>CC,MiddlewareError:()=>Ig,MultipleStructuredOutputsError:()=>dQ,MultipleToolsBoundError:()=>GQ,PIIDetectionError:()=>cj,ProviderStrategy:()=>Sb,StructuredOutputParsingError:()=>JC,StructuredTool:()=>cF,SystemMessage:()=>Gl,SystemMessageChunk:()=>Ms,TODO_LIST_MIDDLEWARE_SYSTEM_PROMPT:()=>Zj,Tool:()=>BX,ToolCallLimitExceededError:()=>mj,ToolInvocationError:()=>uQ,ToolMessage:()=>pt,ToolMessageChunk:()=>bi,ToolStrategy:()=>$u,anthropicPromptCachingMiddleware:()=>uD,applyStrategy:()=>uj,context:()=>J3,contextEditingMiddleware:()=>nD,countTokensApproximately:()=>lg,createAgent:()=>KK,createMiddleware:()=>El,detectCreditCard:()=>sj,detectEmail:()=>rj,detectIP:()=>oj,detectMacAddress:()=>ij,detectUrl:()=>Gj,dynamicSystemPromptMiddleware:()=>$K,fakeModel:()=>YC,filterMessages:()=>DJ,humanInTheLoopMiddleware:()=>DK,initChatModel:()=>Fo,langchainMatchers:()=>VC,llmToolSelectorMiddleware:()=>eD,modelCallLimitMiddleware:()=>rD,modelFallbackMiddleware:()=>sD,modelRetryMiddleware:()=>oD,openAIModerationMiddleware:()=>dD,piiMiddleware:()=>tD,piiRedactionMiddleware:()=>lD,providerStrategy:()=>OK,resolveRedactionRule:()=>dj,summarizationMiddleware:()=>qK,todoListMiddleware:()=>cD,tool:()=>EC,toolCallLimitMiddleware:()=>aD,toolEmulatorMiddleware:()=>GD,toolRetryMiddleware:()=>iD,toolStrategy:()=>UK,trimMessages:()=>fX});FCe();o();tF();eoe();var kVt=Ro({tool:()=>EC});o();tF();Jb();Jb();var XCe=Ro({});Jbt(XCe,SXe);o();tF();NC();H3();var xVt=Ro({EncoderBackedStore:()=>jVt,createDocumentStoreFromByteStore:()=>kSI}),jVt=class extends f3{lc_namespace=["langchain","storage"];store;keyEncoder;valueSerializer;valueDeserializer;constructor(t){super(t),this.store=t.store,this.keyEncoder=t.keyEncoder,this.valueSerializer=t.valueSerializer,this.valueDeserializer=t.valueDeserializer}async mget(t){let e=t.map(this.keyEncoder);return(await this.store.mget(e)).map(I=>{if(I!==void 0)return this.valueDeserializer(I)})}async mset(t){let e=t.map(([I,l])=>[this.keyEncoder(I),this.valueSerializer(l)]);return this.store.mset(e)}async mdelete(t){let e=t.map(this.keyEncoder);return this.store.mdelete(e)}async*yieldKeys(t){yield*this.store.yieldKeys(t)}};function kSI(t){let e=new TextEncoder,I=new TextDecoder;return new jVt({store:t,keyEncoder:l=>l,valueSerializer:l=>e.encode(JSON.stringify({pageContent:l.pageContent,metadata:l.metadata})),valueDeserializer:l=>new Hr(JSON.parse(I.decode(l)))})}o();tF();NC();var Gr=z(require("node:fs/promises"),1),jC=z(require("node:path"),1),UVt=Ro({LocalFileStore:()=>xSI}),xSI=class extends f3{lc_namespace=["langchain","storage"];rootPath;keyLocks=new Map;constructor(t){super(t),this.rootPath=t.rootPath}async getParsedFile(t){if(!/^[a-zA-Z0-9_\-:.]+$/.test(t))throw new Error("Invalid key. Only alphanumeric characters, underscores, hyphens, colons, and periods are allowed.");try{let e=await Gr.readFile(this.getFullPath(t));return e||void 0}catch(e){if("code"in e&&e.code==="ENOENT")return;throw new Error(`Error reading and parsing file at path: ${this.rootPath}. +Error: ${JSON.stringify(e)}`)}}async setFileContent(t,e){await this.withKeyLock(e,async()=>{let I=this.getFullPath(e);try{await this.writeFileAtomically(t,I)}catch(l){throw new Error(`Error writing file at path: ${I}. +Error: ${JSON.stringify(l)}`)}})}getFullPath(t){try{let e=`${t}.txt`;if(!/^[a-zA-Z0-9_.\-/]+$/.test(t))throw new Error(`Invalid characters in key: ${t}`);let I=jC.resolve(this.rootPath,e),l=jC.resolve(this.rootPath);if(!I.startsWith(l))throw new Error(`Invalid key: ${t}. Key should be relative to the root path. Root path: ${this.rootPath}, Full path: ${I}`);return I}catch(e){throw new Error(`Error getting full path for key: ${t}. +Error: ${String(e)}`)}}async mget(t){let e=[];for(let I of t){let l=await this.getParsedFile(I);e.push(l)}return e}async mset(t){let e=new Map;for(let[I,l]of t)e.set(I,l);await Promise.all(Array.from(e.entries(),([I,l])=>this.setFileContent(l,I)))}async mdelete(t){await Promise.all(t.map(e=>this.withKeyLock(e,async()=>{try{await Gr.unlink(this.getFullPath(e))}catch(I){if(!I||I.code!=="ENOENT")throw I}})))}async*yieldKeys(t){let e=(await Gr.readdir(this.rootPath)).filter(I=>I.endsWith(".txt")).map(I=>I.replace(/\.txt$/,""));for(let I of e)(t===void 0||I.startsWith(t))&&(yield I)}static async fromPath(t){try{await Gr.access(t,Gr.constants.R_OK|Gr.constants.W_OK)}catch{try{await Gr.mkdir(t,{recursive:!0})}catch(e){throw new Error(`An error occurred creating directory at: ${t}. +Error: ${JSON.stringify(e)}`)}}try{let e=await Gr.readdir(t);await Promise.all(e.filter(I=>I.endsWith(".tmp")).map(I=>Gr.unlink(jC.join(t,I)).catch(()=>{})))}catch{}return new this({rootPath:t})}async withKeyLock(t,e){let I=(this.keyLocks.get(t)??Promise.resolve()).catch(()=>{}),l,n=new Promise(c=>{l=c}),a=I.then(()=>n);this.keyLocks.set(t,a),await I;try{return await e()}finally{l?.(),this.keyLocks.get(t)===a&&this.keyLocks.delete(t)}}async writeFileAtomically(t,e){let I=jC.dirname(e);await Gr.mkdir(I,{recursive:!0});let l=`${e}.${Date.now()}-${Math.random().toString(16).slice(2)}.tmp`;try{await Gr.writeFile(l,t);try{await Gr.rename(l,e)}catch(n){let a=n.code;if(n&&(a==="EPERM"||a==="EACCES"))await Gr.writeFile(e,t),await Gr.unlink(l).catch(()=>{});else throw n}}catch(n){throw await Gr.unlink(l).catch(()=>{}),n}}};o();tF();NC();var OVt=Ro({InMemoryStore:()=>nQ});NI();Xc();X_();PJ();Yo();var zVt=Ro({browser:()=>ACe,chat_models__universal:()=>hmt,index:()=>CVt,load__serializable:()=>XCe,prompts__base:()=>MSI,prompts__chat:()=>OSI,prompts__image:()=>zSI,prompts__pipeline:()=>BSI,prompts__prompt:()=>jSI,schema:()=>USI,schema__output:()=>TSI,schema__runnable:()=>SSI,storage__encoder_backed:()=>xVt,storage__file_system:()=>UVt,storage__in_memory:()=>OVt,tools:()=>kVt}),jSI={PromptTemplate:Ts},USI={AIMessage:He,AIMessageChunk:eI,BaseMessage:Ml,BaseMessageChunk:gr,ChatMessage:Bs,ChatMessageChunk:Km,FunctionMessage:WX,FunctionMessageChunk:Dm,HumanMessage:ZI,HumanMessageChunk:No,SystemMessage:Gl,SystemMessageChunk:Ms,ToolMessage:pt,ToolMessageChunk:bi},OSI={AIMessagePromptTemplate:A_,ChatMessagePromptTemplate:R_,ChatPromptTemplate:qH,HumanMessagePromptTemplate:$x,MessagesPlaceholder:Px,SystemMessagePromptTemplate:IC},zSI={ImagePromptTemplate:DH},BSI={PipelinePromptTemplate:mce},MSI={StringPromptValue:qJ},SSI={RouterRunnable:ore,RunnableAssign:KJ,RunnableBinding:ha,RunnableBranch:ire,RunnableEach:rce,RunnableMap:qA,RunnableParallel:sce,RunnablePassthrough:e0,RunnablePick:u_,RunnableRetry:Tx,RunnableSequence:$r,RunnableWithFallbacks:d_,RunnableWithMessageHistory:Gre},TSI={ChatGenerationChunk:Nc,GenerationChunk:Pr};dJe();async function BVt(t,e={},I={},l={},n){return pse(t,{secretsMap:e,optionalImportsMap:I,optionalImportEntrypoints:fbt,importMap:{...zVt,...l},secretsFromEnv:n})}o();Vx();async function MVt(t,e){let I=await(e?.client??new Yp(e)).pullPromptCommit(t,{includeModel:e?.includeModel,skipCache:e?.skipCache});if(I.manifest.kwargs?.metadata===void 0&&(I.manifest.kwargs={...I.manifest.kwargs,metadata:{}}),I.manifest.kwargs.metadata={...I.manifest.kwargs.metadata,lc_hub_owner:I.owner,lc_hub_repo:I.repo,lc_hub_commit_hash:I.commit_hash},I.manifest.kwargs.template_format==="mustache"){let l=c=>c.split(".")[0],{input_variables:n}=I.manifest.kwargs;Array.isArray(n)&&(I.manifest.kwargs.input_variables=n.map(l));let{messages:a}=I.manifest.kwargs;Array.isArray(a)&&(I.manifest.kwargs.messages=a.map(c=>{let r=c?.kwargs?.prompt?.kwargs?.input_variables;return Array.isArray(r)&&(c.kwargs.prompt.kwargs.input_variables=r.map(l)),c}))}return I}function SVt(t){let e={};if(t!==void 0){let I=t?.lc_name(),l;if(I==="ChatOpenAI")l="chat_models__openai";else if(I==="ChatAnthropic")l="chat_models__anthropic";else if(I==="ChatAzureOpenAI")l="chat_models__openai";else if(I==="ChatVertexAI")l="chat_models__vertexai";else if(I==="ChatGoogleGenerativeAI")l="chat_models__google_genai";else if(I==="ChatBedrockConverse")l="chat_models__chat_bedrock_converse";else if(I==="ChatMistralAI")l="chat_models__mistralai";else if(I==="ChatMistral")l="chat_models__mistralai";else if(I==="ChatFireworks")l="chat_models__fireworks";else if(I==="ChatGroq")l="chat_models__groq";else throw new Error("Received unsupported model class when pulling prompt.");e[l]={...e[l],[I]:t}}return e}function TVt(t){let e={};if(t!==void 0){let I=t?.lc_name(),l;I==="ChatGoogleGenerativeAI"?l="langchain_google_genai/chat_models":I==="ChatBedrockConverse"?l="langchain_aws/chat_models":I==="ChatGroq"&&(l="langchain_groq/chat_models"),l!==void 0&&(e[l]={[I]:t})}return e}function _Vt(t){return"first"in t&&t.first!==null&&typeof t.first=="object"&&"schema"in t.first&&"last"in t&&t.last!==null&&typeof t.last=="object"&&("bound"in t.last&&t.last.bound!==null&&typeof t.last.bound=="object"&&"withStructuredOutput"in t.last.bound&&typeof t.last.bound.withStructuredOutput=="function"?t.last.bound=t.last.bound.withStructuredOutput(t.first.schema):"withStructuredOutput"in t.last&&typeof t.last.withStructuredOutput=="function"&&(t.last=t.last.withStructuredOutput(t.first.schema))),t}async function woe(t,e){let I=await MVt(t,e);try{return _Vt(await BVt(JSON.stringify(I.manifest),e?.secrets,TVt(e?.modelClass),SVt(e?.modelClass),e?.secretsFromEnv))}catch(l){throw e?.includeModel?new Error([l.message,"",'To load prompts with an associated non-OpenAI model, you must use the "langchain/hub/node" entrypoint, or pass a "modelClass" parameter like this:',"","```",'import { pull } from "langchain/hub";','import { ChatAnthropic } from "@langchain/anthropic";',"",'const prompt = await pull("my-prompt", {'," includeModel: true,"," modelClass: ChatAnthropic,","});","```"].join(` +`)):l}}var OHt=z(o5e()),txe=z(XRt());o();var LRt=z(CRt());function FD(t){let e=t.compile,I=t.VM.template,l=t.JavaScriptCompiler.prototype.mergeSource;return t.JavaScriptCompiler.prototype.mergeSource=function(n){return l.call(this,n).prepend("return (async () => {").add(" })()")},t.JavaScriptCompiler.prototype.appendToBuffer=function(n,a,c){return Array.isArray(n)||(n=[n]),n=this.source.wrap(n,a),this.environment.isSimple?["return await ",n,";"]:c?["buffer += await ",n,";"]:(n.appendToBuffer=!0,n.prepend("await "),n)},t.template=function(n){return n.main_d=(a,c,r,s,i,G,d)=>async u=>n.main(r,u,r.helpers,r.partials,i,G,d),I(n,t)},t.compile=function(){let n=e.apply(t,[...arguments,{noEscape:!0}]);return function(a,c){return a=a||{},n.call(t,a,c)}},(0,LRt.registerCoreHelpers)(t),t}o();function kRt(t,e,I){window.PluginApi=window.PluginApi||{},window.PluginApi[t]=e,I.register(()=>{delete window.PluginApi[t]})}function eie(t){return window.PluginApi[t]}o();o();var jRt=require("obsidian");o();var Fi=class{constructor(e,I){this.app=e,this.plugin=I}async convert(e,I){throw Error("Function convert is not implemented")}async extract(e,I){throw Error("Function extract is not implemented")}};var URt=z(uI()),xRt=(0,URt.default)("textgenerator:Extractor:PdfExtractor"),XD=class extends Fi{constructor(e,I){super(e,I)}async convert(e){xRt("convert",{docPath:e});let I=await this.app.vault.adapter.readBinary(e),n=await(await(0,jRt.loadPdfJs)()).getDocument(I).promise,r=(await Promise.all(Array.from({length:n.numPages},(s,i)=>n.getPage(i+1).then(G=>G.getTextContent())))).map((s,i)=>`Page ${i+1}: `+s.items.map(G=>G.str).join(" ").replace(/\s+/g," ")).join(` +`);return xRt("convert end",{text:r}),r}async extract(e){let I=this.app.metadataCache.getCache(e)?.embeds?.filter(l=>l.link.endsWith(".pdf"));return I?I.map(l=>this.app.metadataCache.getFirstLinkpathDest(l.link,e)?.path).filter(Boolean):[]}};o();var gD=require("obsidian");var ORt=z(uI()),zRt=z(Kb()),BRt;gD.Platform.isMobile||(BRt=require("electron")?.remote);var u5e=(0,ORt.default)("textgenerator:Extractor:WebPageExtractor"),TC=class extends Fi{constructor(e,I){super(e,I)}async getContent(e,I){u5e("convert",{url:e});let l;if(gD.Platform.isMobile)l=await(0,gD.request)({url:e});else{let r=new BRt.BrowserWindow({show:!1,height:500,width:400}),s={url:new URL(e).origin,name:"dummy_name",value:"dummy"};await r.webContents.session.cookies.set(s),l=await new Promise(async i=>{r.webContents.on("dom-ready",async()=>{let u=50,b=setInterval(async()=>{let Z=await r.webContents.executeJavaScript("document.documentElement.innerText"),p=await r.webContents.executeJavaScript(` + document.body.innerHTML`);(Z.length||u<=0)&&(clearInterval(b),i(p),u--)},.2*1e3)}),await r.loadURL(e,{userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) obsidian/1.4.16 Chrome/114.0.5735.289 Electron/25.8.1 Safari/537.36"})}),r.destroy()}let a=new DOMParser().parseFromString(l,"text/html");try{I=zRt.default.parse(I)}catch{}if(I){let r=Array.isArray(I)?I:[I],s=[];r.forEach(G=>{a.body.querySelectorAll(G).forEach(d=>{s.push(d)})}),a.body.innerHTML="";let i=a.body.createEl(s.length>1?"ol":"div");s.forEach(G=>(s.length>1?i.createEl("li"):i).appendChild(G))}let c=a.getElementsByTagName("a");for(let r=0;r!l.test(c)))]:[]}};o();o();function dKI(t){for(var e=1;e0&&t[e-1]===` +`;)e--;return t.substring(0,e)}function KRt(t){return _Rt(TRt(t))}var uKI=["ADDRESS","ARTICLE","ASIDE","AUDIO","BLOCKQUOTE","BODY","CANVAS","CENTER","DD","DIR","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","FRAMESET","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","HTML","ISINDEX","LI","MAIN","MENU","NAV","NOFRAMES","NOSCRIPT","OL","OUTPUT","P","PRE","SECTION","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"];function h5e(t){return W5e(t,uKI)}var DRt=["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"];function qRt(t){return W5e(t,DRt)}function bKI(t){return $Rt(t,DRt)}var PRt=["A","TABLE","THEAD","TBODY","TFOOT","TH","TD","IFRAME","SCRIPT","AUDIO","VIDEO"];function mKI(t){return W5e(t,PRt)}function ZKI(t){return $Rt(t,PRt)}function W5e(t,e){return e.indexOf(t.nodeName)>=0}function $Rt(t,e){return t.getElementsByTagName&&e.some(function(I){return t.getElementsByTagName(I).length})}var pKI=[[/\\/g,"\\\\"],[/\*/g,"\\*"],[/^-/g,"\\-"],[/^\+ /g,"\\+ "],[/^(=+)/g,"\\$1"],[/^(#{1,6}) /g,"\\$1 "],[/`/g,"\\`"],[/^~~~/g,"\\~~~"],[/\[/g,"\\["],[/\]/g,"\\]"],[/^>/g,"\\>"],[/_/g,"\\_"],[/^(\d+)\. /g,"$1\\. "]];function e0t(t){return pKI.reduce(function(e,I){return e.replace(I[0],I[1])},t)}var GG={};GG.paragraph={filter:"p",replacement:function(t){return` + +`+t+` + +`}};GG.lineBreak={filter:"br",replacement:function(t,e,I){return I.br+` +`}};GG.heading={filter:["h1","h2","h3","h4","h5","h6"],replacement:function(t,e,I){var l=Number(e.nodeName.charAt(1));if(I.headingStyle==="setext"&&l<3){var n=p5e(l===1?"=":"-",t.length);return` + +`+t+` +`+n+` + +`}else return` + +`+p5e("#",l)+" "+t+` + +`}};GG.blockquote={filter:"blockquote",replacement:function(t){return t=KRt(t).replace(/^/gm,"> "),` + +`+t+` + +`}};GG.list={filter:["ul","ol"],replacement:function(t,e){var I=e.parentNode;return I.nodeName==="LI"&&I.lastElementChild===e?` +`+t:` + +`+t+` + +`}};GG.listItem={filter:"li",replacement:function(t,e,I){var l=I.bulletListMarker+" ",n=e.parentNode;if(n.nodeName==="OL"){var a=n.getAttribute("start"),c=Array.prototype.indexOf.call(n.children,e);l=(a?Number(a)+c:c+1)+". "}var r=/\n$/.test(t);return t=KRt(t)+(r?` +`:""),t=t.replace(/\n/gm,` +`+" ".repeat(l.length)),l+t+(e.nextSibling?` +`:"")}};GG.indentedCodeBlock={filter:function(t,e){return e.codeBlockStyle==="indented"&&t.nodeName==="PRE"&&t.firstChild&&t.firstChild.nodeName==="CODE"},replacement:function(t,e,I){return` + + `+e.firstChild.textContent.replace(/\n/g,` + `)+` + +`}};GG.fencedCodeBlock={filter:function(t,e){return e.codeBlockStyle==="fenced"&&t.nodeName==="PRE"&&t.firstChild&&t.firstChild.nodeName==="CODE"},replacement:function(t,e,I){for(var l=e.firstChild.getAttribute("class")||"",n=(l.match(/language-(\S+)/)||[null,""])[1],a=e.firstChild.textContent,c=I.fence.charAt(0),r=3,s=new RegExp("^"+c+"{3,}","gm"),i;i=s.exec(a);)i[0].length>=r&&(r=i[0].length+1);var G=p5e(c,r);return` + +`+G+n+` +`+a.replace(/\n$/,"")+` +`+G+` + +`}};GG.horizontalRule={filter:"hr",replacement:function(t,e,I){return` + +`+I.hr+` + +`}};GG.inlineLink={filter:function(t,e){return e.linkStyle==="inlined"&&t.nodeName==="A"&&t.getAttribute("href")},replacement:function(t,e){var I=N5e(e.getAttribute("href")),l=V5e(tie(e.getAttribute("title"))),n=l?' "'+l+'"':"";return"["+t+"]("+I+n+")"}};GG.referenceLink={filter:function(t,e){return e.linkStyle==="referenced"&&t.nodeName==="A"&&t.getAttribute("href")},replacement:function(t,e,I){var l=N5e(e.getAttribute("href")),n=tie(e.getAttribute("title"));n&&(n=' "'+V5e(n)+'"');var a,c;switch(I.linkReferenceStyle){case"collapsed":a="["+t+"][]",c="["+t+"]: "+l+n;break;case"shortcut":a="["+t+"]",c="["+t+"]: "+l+n;break;default:var r=this.references.length+1;a="["+t+"]["+r+"]",c="["+r+"]: "+l+n}return this.references.push(c),a},references:[],append:function(t){var e="";return this.references.length&&(e=` + +`+this.references.join(` +`)+` + +`,this.references=[]),e}};GG.emphasis={filter:["em","i"],replacement:function(t,e,I){return t.trim()?I.emDelimiter+t+I.emDelimiter:""}};GG.strong={filter:["strong","b"],replacement:function(t,e,I){return t.trim()?I.strongDelimiter+t+I.strongDelimiter:""}};GG.code={filter:function(t){var e=t.previousSibling||t.nextSibling,I=t.parentNode.nodeName==="PRE"&&!e;return t.nodeName==="CODE"&&!I},replacement:function(t){if(!t)return"";t=t.replace(/\r?\n|\r/g," ");for(var e=/^`|^ .*?[^ ].* $|`$/.test(t)?" ":"",I="`",l=t.match(/`+/gm)||[];l.indexOf(I)!==-1;)I=I+"`";return I+e+t+e+I}};GG.image={filter:"img",replacement:function(t,e){var I=e0t(tie(e.getAttribute("alt"))),l=N5e(e.getAttribute("src")||""),n=tie(e.getAttribute("title")),a=n?' "'+V5e(n)+'"':"";return l?"!["+I+"]("+l+a+")":""}};function tie(t){return t?t.replace(/(\n+\s*)+/g,` +`):""}function N5e(t){var e=t.replace(/([<>()])/g,"\\$1");return e.indexOf(" ")>=0?"<"+e+">":e}function V5e(t){return t.replace(/"/g,'\\"')}function t0t(t){this.options=t,this._keep=[],this._remove=[],this.blankRule={replacement:t.blankReplacement},this.keepReplacement=t.keepReplacement,this.defaultRule={replacement:t.defaultReplacement},this.array=[];for(var e in t.rules)this.array.push(t.rules[e])}t0t.prototype={add:function(t,e){this.array.unshift(e)},keep:function(t){this._keep.unshift({filter:t,replacement:this.keepReplacement})},remove:function(t){this._remove.unshift({filter:t,replacement:function(){return""}})},forNode:function(t){if(t.isBlank)return this.blankRule;var e;return(e=b5e(this.array,t,this.options))||(e=b5e(this._keep,t,this.options))||(e=b5e(this._remove,t,this.options))?e:this.defaultRule},forEach:function(t){for(var e=0;e-1)return!0}else if(typeof l=="function"){if(l.call(t,e,I))return!0}else throw new TypeError("`filter` needs to be a string, array, or function")}function WKI(t){var e=t.element,I=t.isBlock,l=t.isVoid,n=t.isPre||function(d){return d.nodeName==="PRE"};if(!(!e.firstChild||n(e))){for(var a=null,c=!1,r=null,s=MRt(r,e,n);s!==e;){if(s.nodeType===3||s.nodeType===4){var i=s.data.replace(/[ \r\n\t]+/g," ");if((!a||/ $/.test(a.data))&&!c&&i[0]===" "&&(i=i.substr(1)),!i){s=m5e(s);continue}s.data=i,a=s}else if(s.nodeType===1)I(s)||s.nodeName==="BR"?(a&&(a.data=a.data.replace(/ $/,"")),a=null,c=!1):l(s)||n(s)?(a=null,c=!0):a&&(c=!1);else{s=m5e(s);continue}var G=MRt(r,s,n);r=s,s=G}a&&(a.data=a.data.replace(/ $/,""),a.data||m5e(a))}}function m5e(t){var e=t.nextSibling||t.parentNode;return t.parentNode.removeChild(t),e}function MRt(t,e,I){return t&&t.parentNode===e||I(e)?e.nextSibling||e.parentNode:e.firstChild||e.nextSibling||e.parentNode}var Y5e=typeof window<"u"?window:{};function NKI(){var t=Y5e.DOMParser,e=!1;try{new t().parseFromString("","text/html")&&(e=!0)}catch{}return e}function VKI(){var t=function(){};return YKI()?t.prototype.parseFromString=function(e){var I=new window.ActiveXObject("htmlfile");return I.designMode="on",I.open(),I.write(e),I.close(),I}:t.prototype.parseFromString=function(e){var I=document.implementation.createHTMLDocument("");return I.open(),I.write(e),I.close(),I},t}function YKI(){var t=!1;try{document.implementation.createHTMLDocument("").open()}catch{Y5e.ActiveXObject&&(t=!0)}return t}var RKI=NKI()?Y5e.DOMParser:VKI();function AKI(t,e){var I;if(typeof t=="string"){var l=FKI().parseFromString(''+t+"","text/html");I=l.getElementById("turndown-root")}else I=t.cloneNode(!0);return WKI({element:I,isBlock:h5e,isVoid:qRt,isPre:e.preformattedCode?XKI:null}),I}var Z5e;function FKI(){return Z5e=Z5e||new RKI,Z5e}function XKI(t){return t.nodeName==="PRE"||t.nodeName==="CODE"}function gKI(t,e){return t.isBlock=h5e(t),t.isCode=t.nodeName==="CODE"||t.parentNode.isCode,t.isBlank=vKI(t),t.flankingWhitespace=yKI(t,e),t}function vKI(t){return!qRt(t)&&!mKI(t)&&/^\s*$/i.test(t.textContent)&&!bKI(t)&&!ZKI(t)}function yKI(t,e){if(t.isBlock||e.preformattedCode&&t.isCode)return{leading:"",trailing:""};var I=wKI(t.textContent);return I.leadingAscii&&SRt("left",t,e)&&(I.leading=I.leadingNonAscii),I.trailingAscii&&SRt("right",t,e)&&(I.trailing=I.trailingNonAscii),{leading:I.leading,trailing:I.trailing}}function wKI(t){var e=t.match(/^(([ \t\r\n]*)(\s*))(?:(?=\S)[\s\S]*\S)?((\s*?)([ \t\r\n]*))$/);return{leading:e[1],leadingAscii:e[2],leadingNonAscii:e[3],trailing:e[4],trailingNonAscii:e[5],trailingAscii:e[6]}}function SRt(t,e,I){var l,n,a;return t==="left"?(l=e.previousSibling,n=/ $/):(l=e.nextSibling,n=/^ /),l&&(l.nodeType===3?a=n.test(l.nodeValue):I.preformattedCode&&l.nodeName==="CODE"?a=!1:l.nodeType===1&&!h5e(l)&&(a=n.test(l.textContent))),a}var HKI=Array.prototype.reduce;function vD(t){if(!(this instanceof vD))return new vD(t);var e={rules:GG,headingStyle:"setext",hr:"* * *",bulletListMarker:"*",codeBlockStyle:"indented",fence:"```",emDelimiter:"_",strongDelimiter:"**",linkStyle:"inlined",linkReferenceStyle:"full",br:" ",preformattedCode:!1,blankReplacement:function(I,l){return l.isBlock?` + +`:""},keepReplacement:function(I,l){return l.isBlock?` + +`+l.outerHTML+` + +`:l.outerHTML},defaultReplacement:function(I,l){return l.isBlock?` + +`+I+` + +`:I}};this.options=dKI({},e,t),this.rules=new t0t(this.options)}vD.prototype={turndown:function(t){if(!EKI(t))throw new TypeError(t+" is not a string, or an element/document/fragment node.");if(t==="")return"";var e=I0t.call(this,new AKI(t,this.options));return QKI.call(this,e)},use:function(t){if(Array.isArray(t))for(var e=0;e([^<]*)<\/text>/g,Iie=class extends Error{constructor(e){super(`[YoutubeTranscript] \u{1F6A8} ${e}`)}},lie=class{static async fetchTranscript(e,I){let l=this.retrieveVideoId(e);try{let n=await(0,F5e.request)(`https://www.youtube.com/watch?v=${l}`),a=n.split('"captions":');if(a.length<=1)throw n.includes('class="g-recaptcha"')?new Error("Captcha detected, please try again later."):n.includes('"playabilityStatus":')?new Error("Transcript is disabled on this video"):new Error("Video not found or private.");let r=JSON.parse(a[1].split(',"videoDetails')[0].replace(` +`,""))?.playerCaptionsTracklistRenderer;if(!r)throw new Error("Transcript is disabled on this video");if(!("captionTracks"in r))throw new Error("Transcript is disabled on this video");if(I?.lang&&!r.captionTracks.some(d=>d.languageCode===I?.lang))throw new Error("Transcript is disabled on this video");let s=(I?.lang?r.captionTracks.find(d=>d.languageCode===I?.lang):r.captionTracks[0]).baseUrl;return[...(await(0,F5e.request)(s)).matchAll(jKI)].map(d=>({text:d[3],duration:parseFloat(d[2]),offset:parseFloat(d[1]),lang:I?.lang?I.lang:r.captionTracks[0].languageCode}))}catch(n){throw new Iie(n)}}static retrieveVideoId(e){if(e.length===11)return e;let I=e.match(xKI);if(I&&I.length)return I[1];throw new Iie("Impossible to retrieve Youtube video ID.")}};var u0t=z(uI()),nie=(0,u0t.default)("textgenerator:Extractor:YoutubeTranscriptionExtractor"),wD=class extends Fi{constructor(e,I){super(e,I)}async convert(e){nie("convert",{url:e});let l=(await lie.fetchTranscript(e))?.reduce((n,a)=>n+a.text+" ","");return nie("convert end",{text:l}),l||""}async extract(e,I){nie("extract",{filePath:e});let l=this.extractUrls(I);return nie("extract end",{urls:l}),l}extractUrls(e){let I=/(https?:\/\/(?:www\.)?(?:youtube\.com\/watch\?v=|youtu\.be\/)[^\s)\]]+)/g,l=e.match(I);return l?[...new Set(l)]:[]}};o();var q0t=z(uI());o();var dG=z(We());o();var _C=z(We()),J0t=z(We());o();var g0t=z(We()),H5e={loading:!0,setLoading(){},plugin:{},triggerReload(){},trg:!1},Q5e=(0,g0t.createContext)(H5e);o();var gn=z(We(),1),C5e=z(H0t(),1);function sie(t=!1){if(typeof t!="boolean")throw new Error("defaultValue must be `true` or `false`");let[e,I]=(0,gn.useState)(t),l=(0,gn.useCallback)(()=>{I(!0)},[]),n=(0,gn.useCallback)(()=>{I(!1)},[]),a=(0,gn.useCallback)(()=>{I(c=>!c)},[]);return{value:e,setValue:I,setTrue:l,setFalse:n,toggle:a}}var E0t=typeof window<"u"?gn.useLayoutEffect:gn.useEffect;function Q0t(t,e,I,l){let n=(0,gn.useRef)(e);E0t(()=>{n.current=e},[e]),(0,gn.useEffect)(()=>{let a=I?.current??window;if(!(a&&a.addEventListener))return;let c=r=>{n.current(r)};return a.addEventListener(t,c,l),()=>{a.removeEventListener(t,c,l)}},[t,I,l])}function f0t(t){let e=(0,gn.useRef)(()=>{throw new Error("Cannot call an event handler while rendering.")});return E0t(()=>{e.current=t},[t]),(0,gn.useCallback)((...I)=>{var l;return(l=e.current)==null?void 0:l.call(e,...I)},[e])}var J5e=typeof window>"u";function L5e(t,e,I={}){let{initializeWithValue:l=!0}=I,n=(0,gn.useCallback)(u=>I.serializer?I.serializer(u):JSON.stringify(u),[I]),a=(0,gn.useCallback)(u=>{if(I.deserializer)return I.deserializer(u);if(u==="undefined")return;let b=e instanceof Function?e():e,Z;try{Z=JSON.parse(u)}catch(p){return console.error("Error parsing JSON:",p),b}return Z},[I,e]),c=(0,gn.useCallback)(()=>{let u=e instanceof Function?e():e;if(J5e)return u;try{let b=window.localStorage.getItem(t);return b?a(b):u}catch(b){return console.warn(`Error reading localStorage key \u201C${t}\u201D:`,b),u}},[e,t,a]),[r,s]=(0,gn.useState)(()=>l?c():e instanceof Function?e():e),i=f0t(u=>{J5e&&console.warn(`Tried setting localStorage key \u201C${t}\u201D even though environment is not a client`);try{let b=u instanceof Function?u(c()):u;window.localStorage.setItem(t,n(b)),s(b),window.dispatchEvent(new StorageEvent("local-storage",{key:t}))}catch(b){console.warn(`Error setting localStorage key \u201C${t}\u201D:`,b)}}),G=f0t(()=>{J5e&&console.warn(`Tried removing localStorage key \u201C${t}\u201D even though environment is not a client`);let u=e instanceof Function?e():e;window.localStorage.removeItem(t),s(u),window.dispatchEvent(new StorageEvent("local-storage",{key:t}))});(0,gn.useEffect)(()=>{s(c())},[t]);let d=(0,gn.useCallback)(u=>{u.key&&u.key!==t||s(c())},[t,c]);return Q0t("storage",d),Q0t("local-storage",d),[r,i,G]}function WDI(t){let e=(0,gn.useRef)(t);e.current=t,(0,gn.useEffect)(()=>()=>{e.current()},[])}function RF(t,e=500,I){let l=(0,gn.useRef)();WDI(()=>{l.current&&l.current.cancel()});let n=(0,gn.useMemo)(()=>{let a=(0,C5e.default)(t,e,I),c=(...r)=>a(...r);return c.cancel=()=>{a.cancel()},c.isPending=()=>!!l.current,c.flush=()=>a.flush(),c},[t,e,I]);return(0,gn.useEffect)(()=>{l.current=(0,C5e.default)(t,e,I)},[t,e,I]),n}function oie(t,e,I){let l=I?.equalityFn??((i,G)=>i===G),n=t instanceof Function?t():t,[a,c]=(0,gn.useState)(n),r=(0,gn.useRef)(n),s=RF(c,e,I);return l(r.current,n)||(s(n),r.current=n),[a,s]}function _p(t){let[e,I]=(0,gn.useState)(!!t),l=(0,gn.useCallback)(()=>{I(n=>!n)},[]);return[e,l,I]}var k5e=new Event("triggerReloadGlobalReact-textgenerator");function AF(t){let[e,I]=(0,_C.useState)(H5e.loading),[l,n]=_p(),[a]=oie(l,80);(0,_C.useEffect)(()=>{if(!e)return;let r=setTimeout(()=>{e==!0&&I(!1)},60*1e3);return()=>{clearTimeout(r)}},[e]),(0,_C.useEffect)(()=>{let r=()=>{n()};return window.addEventListener(k5e.type,r),()=>{window.removeEventListener(k5e.type,r)}},[]);let c={loading:e,setLoading:I,triggerReload(){window.dispatchEvent(k5e)},trg:a,plugin:t.plugin};return _C.default.createElement(Q5e.Provider,{value:c},t.children)}function zI(){return(0,J0t.useContext)(Q5e)}o();o();function C0t(t){var e,I,l="";if(typeof t=="string"||typeof t=="number")l+=t;else if(typeof t=="object")if(Array.isArray(t)){var n=t.length;for(e=0;e(t.register?.register?.(e,`${t.name}, ${t.description}`.toLocaleLowerCase(),t.sectionId),()=>t.register?.unRegister?.(e)),[e,t.name,t.description]),FF.default.createElement("div",{"data-tip":t.tip,className:wI("plug-tg-flex plug-tg-w-full plug-tg-gap-2 plug-tg-py-2",{"plug-tg-items-center plug-tg-justify-between":!t.textArea,"plug-tg-flex-col":t.textArea},t.className,{"plug-tg-hidden":t.register&&!t.register.listOfAllowed.contains(e),"plug-tg-tooltip":t.tip?.length})},FF.default.createElement("div",{className:"plug-tg-flex plug-tg-flex-col plug-tg-gap-1"},FF.default.createElement("div",null,t.name),FF.default.createElement("div",{className:"plug-tg-text-[8px] plug-tg-opacity-70 md:plug-tg-text-xs"},t.description)),FF.default.createElement("div",{className:"plug-tg-flex plug-tg-items-center plug-tg-gap-2"},t.children))}o();var mZ=z(We());function Cr(t){let[e,I]=(0,mZ.useState)(!0),l=!t.alwaysOpen&&e;return(0,mZ.useEffect)(()=>{t.register.register(t.id,t.title,t.id)},[t.id]),(0,mZ.useEffect)(()=>I(!t.register.searchTerm.length),[t.register.searchTerm.length]),mZ.default.createElement("div",{className:wI("plug-tg-collapse",t.className,{"plug-tg-max-h-16 plug-tg-opacity-50":l,"plug-tg-collapse-open":!l,"plug-tg-hidden":t.hidden||!t.register.activeSections[t.id]})},!t.hideTitle&&mZ.default.createElement("div",{className:wI("plug-tg-group plug-tg-cursor-pointer plug-tg-px-2",{"hover:plug-tg-bg-gray-100/10":l})},mZ.default.createElement("div",{className:"plug-tg-flex plug-tg-w-full plug-tg-flex-wrap plug-tg-items-center plug-tg-justify-between plug-tg-text-left plug-tg-font-medium","data-accordion-target":"#accordion-flush-body-1","aria-expanded":"true","aria-controls":"accordion-flush-body-1",onClick:()=>I(n=>!n)},mZ.default.createElement("h3",null,t.title),!t.alwaysOpen&&mZ.default.createElement("svg",{"data-accordion-icon":!0,className:wI("plug-tg-h-3 plug-tg-w-3 plug-tg-shrink-0 plug-tg-transition-all",{"-plug-tg-rotate-180":!l,"plug-tg-upsidedown":l,"plug-tg-hidden group-hover:plug-tg-block":l}),"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 10 6"},mZ.default.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 5 5 1 1 5"})))),mZ.default.createElement("div",{className:wI("plug-tg-collapse-content plug-tg-h-full plug-tg-w-full")},t.children))}o();var XF=z(We());o();o();var QD=z(We()),VQ=z(j5e());o();var B0t={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var YDI=Object.defineProperty,RDI=Object.defineProperties,ADI=Object.getOwnPropertyDescriptors,iie=Object.getOwnPropertySymbols,T0t=Object.prototype.hasOwnProperty,_0t=Object.prototype.propertyIsEnumerable,M0t=(t,e,I)=>e in t?YDI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:I}):t[e]=I,S0t=(t,e)=>{for(var I in e||(e={}))T0t.call(e,I)&&M0t(t,I,e[I]);if(iie)for(var I of iie(e))_0t.call(e,I)&&M0t(t,I,e[I]);return t},FDI=(t,e)=>RDI(t,ADI(e)),XDI=(t,e)=>{var I={};for(var l in t)T0t.call(t,l)&&e.indexOf(l)<0&&(I[l]=t[l]);if(t!=null&&iie)for(var l of iie(t))e.indexOf(l)<0&&_0t.call(t,l)&&(I[l]=t[l]);return I},Ya=(t,e,I)=>{let l=(0,QD.forwardRef)((n,a)=>{var c=n,{color:r="currentColor",size:s=24,stroke:i=2,children:G}=c,d=XDI(c,["color","size","stroke","children"]);return(0,QD.createElement)("svg",S0t(FDI(S0t({ref:a},B0t),{width:s,height:s,stroke:r,strokeWidth:i,className:`tabler-icon tabler-icon-${t}`}),d),[...I.map(([u,b])=>(0,QD.createElement)(u,b)),...G||[]])});return l.propTypes={color:VQ.default.string,size:VQ.default.oneOfType([VQ.default.string,VQ.default.number]),stroke:VQ.default.oneOfType([VQ.default.string,VQ.default.number])},l.displayName=`${e}`,l};o();var XI=Ya("external-link","IconExternalLink",[["path",{d:"M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6",key:"svg-0"}],["path",{d:"M11 13l9 -9",key:"svg-1"}],["path",{d:"M15 4h5v5",key:"svg-2"}]]);o();var U5e=Ya("eye-closed","IconEyeClosed",[["path",{d:"M21 9c-2.4 2.667 -5.4 4 -9 4c-3.6 0 -6.6 -1.333 -9 -4",key:"svg-0"}],["path",{d:"M3 15l2.5 -3.8",key:"svg-1"}],["path",{d:"M21 14.976l-2.492 -3.776",key:"svg-2"}],["path",{d:"M9 17l.5 -4",key:"svg-3"}],["path",{d:"M15 17l-.5 -4",key:"svg-4"}]]);o();var O5e=Ya("eye","IconEye",[["path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6",key:"svg-1"}]]);o();var z5e=Ya("file-upload","IconFileUpload",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M12 11v6",key:"svg-2"}],["path",{d:"M9.5 13.5l2.5 -2.5l2.5 2.5",key:"svg-3"}]]);o();var B5e=Ya("list","IconList",[["path",{d:"M9 6l11 0",key:"svg-0"}],["path",{d:"M9 12l11 0",key:"svg-1"}],["path",{d:"M9 18l11 0",key:"svg-2"}],["path",{d:"M5 6l0 .01",key:"svg-3"}],["path",{d:"M5 12l0 .01",key:"svg-4"}],["path",{d:"M5 18l0 .01",key:"svg-5"}]]);o();var M5e=Ya("package-export","IconPackageExport",[["path",{d:"M12 21l-8 -4.5v-9l8 -4.5l8 4.5v4.5",key:"svg-0"}],["path",{d:"M12 12l8 -4.5",key:"svg-1"}],["path",{d:"M12 12v9",key:"svg-2"}],["path",{d:"M12 12l-8 -4.5",key:"svg-3"}],["path",{d:"M15 18h7",key:"svg-4"}],["path",{d:"M19 15l3 3l-3 3",key:"svg-5"}]]);o();var S5e=Ya("pencil","IconPencil",[["path",{d:"M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4",key:"svg-0"}],["path",{d:"M13.5 6.5l4 4",key:"svg-1"}]]);o();var T5e=Ya("plus","IconPlus",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]]);o();var _5e=Ya("reload","IconReload",[["path",{d:"M19.933 13.041a8 8 0 1 1 -9.925 -8.788c3.899 -1 7.935 1.007 9.425 4.747",key:"svg-0"}],["path",{d:"M20 4v5h-5",key:"svg-1"}]]);o();var K5e=Ya("screenshot","IconScreenshot",[["path",{d:"M7 19a2 2 0 0 1 -2 -2",key:"svg-0"}],["path",{d:"M5 13v-2",key:"svg-1"}],["path",{d:"M5 7a2 2 0 0 1 2 -2",key:"svg-2"}],["path",{d:"M11 5h2",key:"svg-3"}],["path",{d:"M17 5a2 2 0 0 1 2 2",key:"svg-4"}],["path",{d:"M19 11v2",key:"svg-5"}],["path",{d:"M19 17v4",key:"svg-6"}],["path",{d:"M21 19h-4",key:"svg-7"}],["path",{d:"M13 19h-2",key:"svg-8"}]]);o();var D5e=Ya("trash","IconTrash",[["path",{d:"M4 7l16 0",key:"svg-0"}],["path",{d:"M10 11l0 6",key:"svg-1"}],["path",{d:"M14 11l0 6",key:"svg-2"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-3"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-4"}]]);o();var q5e=Ya("video","IconVideo",[["path",{d:"M15 10l4.553 -2.276a1 1 0 0 1 1.447 .894v6.764a1 1 0 0 1 -1.447 .894l-4.553 -2.276v-4z",key:"svg-0"}],["path",{d:"M3 6m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z",key:"svg-1"}]]);o();var P5e=Ya("wave-sine","IconWaveSine",[["path",{d:"M21 12h-2c-.894 0 -1.662 -.857 -1.761 -2c-.296 -3.45 -.749 -6 -2.749 -6s-2.5 3.582 -2.5 8s-.5 8 -2.5 8s-2.452 -2.547 -2.749 -6c-.1 -1.147 -.867 -2 -1.763 -2h-2",key:"svg-0"}]]);var K0t=z(Kb());function jt(t){let[e,I]=(0,XF.useState)(t.value),[l,n]=(0,XF.useState)(!1),[a,c]=(0,XF.useState)(""),r=RF(t.setValue,t.type==="checkbox"?0:t.debounceMs??500);return XF.default.createElement("div",{className:wI("plug-tg-flex plug-tg-items-center plug-tg-gap-2 ",{"checkbox-container plug-tg-cursor-pointer":t.type=="checkbox","is-enabled":t.type=="checkbox"&&t.value=="true","plug-tg-tooltip":a}),onClick:t.type=="checkbox"?s=>{t.setValue(t.value!="true"?"true":"false")}:void 0,"data-tip":a||""},XF.default.createElement("input",{type:t.type=="password"?l?"search":"password":t.type,list:t.datalistId,placeholder:t.placeholder,className:wI("plug-tg-input plug-tg-bg-[var(--background-modifier-form-field)]",{"plug-tg-toggle":t.type=="checkbox","plug-tg-text-red-300 plug-tg-outline plug-tg-outline-red-400":a},t.className),value:e,defaultChecked:t.type=="checkbox"?t.value=="true":void 0,onChange:t.type!="checkbox"?s=>{try{I(s.target.value);let i=t.type=="number"?s.target.valueAsNumber||0:s.target.value;c(""),t.validator?.parse(i),r(""+i)}catch(i){c(K0t.default.parse(i?.message)?.[0]?.message)}}:void 0}),t.type=="password"&&XF.default.createElement("button",{className:"plug-tg-btn plug-tg-btn-xs",onClick:()=>n(s=>!s)},l?XF.default.createElement(O5e,{size:11}):XF.default.createElement(U5e,{size:11})))}o();var yj=z(We()),Gie=z(We());function fD(t){let{value:e,toggle:I,setFalse:l}=sie(!1);(0,Gie.useEffect)(()=>{if(!e)return;let a=c=>{if(c.target instanceof HTMLElement){if(c.target.closest(".dropdown"))return;l()}};return document.addEventListener("click",a),()=>document.removeEventListener("click",a)},[e]);let n=(0,Gie.useId)();return yj.default.createElement(yj.default.Fragment,null,yj.default.createElement("datalist",{id:n},[...t.values].map(a=>yj.default.createElement("option",{key:a,value:t.aliases?.[a]||a}))),yj.default.createElement("input",{className:"input",type:"search",value:t.aliases?.[t.value]||t.value||"",list:n,placeholder:t.placeHolder||"Enter your Model name",onChange:a=>{let c=""+a.target.value;if(t.aliases)for(let r in t.aliases)t.aliases[r]===c&&(c=r);t.setValue(c??t.defaultValue)}}))}var ED="whisper",YQ={base_path:"https://api.openai.com/v1",model:"whisper-1",api_key:"",api_version:""};function $5e(t){let e=zI(),I=(0,dG.useId)(),l=e.plugin.settings.LLMProviderOptions[ED]??={...YQ};return dG.default.createElement(dG.default.Fragment,null,dG.default.createElement(Cr,{title:"Whisper Settings",className:"plug-tg-flex plug-tg-w-full plug-tg-flex-col",register:t.register,id:I},dG.default.createElement(Nt,{name:"BasePath",description:"default to openai",register:t.register,sectionId:I},dG.default.createElement(jt,{value:l.basePath||YQ.base_path,placeholder:YQ.base_path,setValue:async n=>{l.basePath=n,await e.plugin.saveSettings(),e.triggerReload()}})),dG.default.createElement(Nt,{name:"API Key",description:"default to openai provider's apikey",register:t.register,sectionId:I},dG.default.createElement(jt,{type:"password",value:l.api_key||YQ.api_key,setValue:async n=>{l.api_key=n,await e.plugin.saveSettings(),e.triggerReload()}})),dG.default.createElement(Nt,{name:"Model",description:"default to whisper-1",register:t.register,sectionId:I},dG.default.createElement(jt,{value:l.model||YQ.model,setValue:async n=>{l.model=n,await e.plugin.saveSettings(),e.triggerReload()}})),dG.default.createElement(Nt,{name:"API Version",description:"Api version (Azure only)",register:t.register,className:wI({"plug-tg-opacity-60":!l.api_version}),sectionId:I},dG.default.createElement(jt,{value:l.api_version||YQ.api_version,placeholder:"2024-02-01",setValue:async n=>{l.api_version=n,await e.plugin.saveSettings(),e.triggerReload()}})),dG.default.createElement(Nt,{name:"Language",description:"default to (none)",register:t.register,sectionId:I},dG.default.createElement(fD,{values:gDI,value:l.language,setValue:async n=>{l.language=n,await e.plugin.saveSettings(),e.triggerReload()}}))))}var gDI=["Afrikaans","Arabic","Armenian","Azerbaijani","Belarusian","Bosnian","Bulgarian","Catalan","Chinese","Croatian","Czech","Danish","Dutch","English","Estonian","Finnish","French","Galician","German","Greek","Hebrew","Hindi","Hungarian","Icelandic","Indonesian","Italian","Japanese","Kannada","Kazakh","Korean","Latvian","Lithuanian","Macedonian","Malay","Marathi","Maori","Nepali","Norwegian","Persian","Polish","Portuguese","Romanian","Russian","Serbian","Slovak","Slovenian","Spanish","Swahili","Swedish","Tagalog","Tamil","Thai","Turkish","Ukrainian","Urdu","Vietnamese","Welsh"];var D0t=(0,q0t.default)("textgenerator:Extractor:AudioExtractor"),eLe=["mp3","mp4","mpeg","mpga","m4a","wav","webm","ogg"],JD=class extends Fi{constructor(e,I){super(e,I)}async convert(e){D0t("convert",{docPath:e});let I=e.split("."),l=I[I.length-1],n=await this.app.vault.adapter.readBinary(e);if(n.byteLength/(1024*1024)>24)return this.plugin.handelError(new Error("File size exceeds the 24 MB limit.")),"";let c=await this.generateTranscript(n,l);return D0t("convert end",{transcript:c}),c}async extract(e){let I=this.app.metadataCache.getCache(e)?.embeds?.filter(l=>eLe.some(n=>l.link.toLowerCase().endsWith(`.${n}`)));return I?I.map(l=>this.app.metadataCache.getFirstLinkpathDest(l.link,e)?.path).filter(Boolean):[]}async generateTranscript(e,I){let l=this.plugin.settings.LLMProviderOptions[ED],n=l?.api_key||this.plugin.settings.api_key;try{let a=new URL(l?.basePath||this.plugin.settings.endpoint||this.plugin.defaultSettings.endpoint);if(l?.api_version?.length&&a.searchParams.set("api-version",l.api_version),a.pathname=a.pathname.replace(/\/$/,"")+"/audio/transcriptions",a.host.contains("openai")&&n.length<1)throw new Error("OpenAI API Key is not provided.");let c=this.createFormData(e,I);this.plugin.startProcessing(!1);let s=await(await fetch(a.href,{method:"POST",headers:{Authorization:`Bearer ${n}`},body:c})).json();if("text"in s)return s.text;this.plugin.handelError(new Error("Error. "+JSON.stringify(s)))}catch(a){this.plugin.handelError(a)}finally{this.plugin.endProcessing(!1)}}createFormData(e,I){let l=new FormData,n=new Blob([e],{type:`audio/${I}`});l.append("file",n,`audio.${I}`),l.append("model",this.plugin.settings.LLMProviderOptions[ED]?.model||YQ.model);let a=this.plugin.settings.LLMProviderOptions[ED]?.language;return a?.length&&l.append("language",a),l}};var S2t=z(uI());o();var SAt=z(oLe()),TAt=z(uI());var wj=(0,TAt.default)("textgenerator:Extractor:ImageExtractor"),LD=class extends Fi{constructor(e,I){super(e,I)}async convert(e){wj("convert",{url:e});try{let l=(await SAt.default.recognize(e,"eng",{logger:n=>wj(n)})).data.text;return wj("convert end",{extractedText:l}),l}catch(I){return wj("convert error",{error:I}),"Error extracting text from the image."}}async extract(e,I){wj("extract",{filePath:e});let l=this.extractUrls(I);return wj("extract end",{urls:l}),l}extractUrls(e){let I=/https?:\/\/[^\s]+\.(?:jpe?g|png|webp|bmp|pbm)/gi,l=e.match(I);return l?[...new Set(l)]:[]}};o();var _At=z(oLe()),KAt=z(uI());var mie=(0,KAt.default)("textgenerator:Extractor:ImageExtractorEmbded"),kD=class extends Fi{constructor(e,I){super(e,I)}async convert(e){mie("convert",{docPath:e});let I=await this.app.vault.adapter.readBinary(e);try{let n=(await _At.default.recognize(m.Buffer.from(I),"eng",{logger:a=>mie(a)})).data.text;return mie("convert end",{extractedText:n}),n}catch(l){return mie("convert error",{error:l}),"Error extracting text from the image."}}async extract(e){let I=this.app.metadataCache.getCache(e)?.embeds?.filter(l=>/\.(jpe?g|png|webp|bmp|pbm)$/i.test(l.link));return I?I.map(l=>this.app.metadataCache.getFirstLinkpathDest(l.link,e)?.path).filter(Boolean):[]}};o();var vLe=require("obsidian");var z2t=z(uI()),B2t;vLe.Platform.isDesktop&&(B2t=O2t());var OD=(0,z2t.default)("textgenerator:Extractor:RssExtractor"),zD=class extends Fi{constructor(e,I){super(e,I),this.parser=new B2t}async convert(e){if(!vLe.Platform.isDesktop)throw new Error("rss is only supported in desktop");OD("convert",{url:e});try{let l=(await this.parser.parseURL(e)).items.reduce((n,a)=>n+this.itemToText(a),"");return OD("convert end",{text:l}),l}catch(I){throw OD("convert error",I),I}}async extract(e,I){OD("extract",{filePath:e});let l=this.extractUrls(I);return OD("extract end",{urls:l}),l}extractUrls(e){let I=/https?:\/\/[^\s]+?(?:\.rss|:feed|\/rss|\/feeds)\b(?![\w\-\.%])/g,l=e.match(I);return console.log({text:e,matches:l}),l?Array.from(new Set(l)):[]}async extractFromFile(e){let I=await this.app.vault.read(e);return this.extractUrls(I)}itemToText(e){let I="";return e.title&&(I+=`Title: ${e.title} +`),e.link&&(I+=`Link: ${e.link} +`),e.contentSnippet&&(I+=`Description: ${e.contentSnippet} +`),e.content&&(I+=`Content: + ${e.content} +`),I+=` +`,I}};var O6I=(0,S2t.default)("textgenerator:Extractor"),z6I=["PDFExtractor","WebPageExtractor","YoutubeExtractor","AudioExtractor","ImageExtractor","ImageExtractorEmbded","RssExtractor"],M2t={PDFExtractor:XD,WebPageExtractor:yD,WebPageExtractorHTML:TC,YoutubeExtractor:wD,AudioExtractor:JD,ImageExtractor:LD,ImageExtractorEmbded:kD,RssExtractor:zD},N0={pdf:"PDFExtractor",web:"WebPageExtractor",web_md:"WebPageExtractor",web_html:"WebPageExtractorHTML",yt:"YoutubeExtractor",youtube:"YoutubeExtractor",audio:"AudioExtractor",img:"ImageExtractor",ImgEmbd:"ImageExtractorEmbded",rss:"RssExtractor"},yLe={};for(let t in N0)Object.prototype.hasOwnProperty.call(N0,t)&&(yLe[N0[t]]=t);var pZ=class{constructor(e,I){this.app=e,this.plugin=I}setExtractor(e){O6I("set Extractor",{extractorName:e}),this.extractor=this.createExtractor(e)}async convert(e,I){this.plugin.startProcessing(!1);let l=await this.extractor.convert(e.trimStart().trimEnd(),I);return this.plugin.endProcessing(!1),l}async extract(e,I){let l=I||await this.app.vault.cachedRead(this.app.vault.getAbstractFileByPath(e));return this.extractor.extract(e,l)}createExtractor(e){if(!M2t[e])throw new Error(`Unknown Extractor: ${e}`);return new M2t[e](this.app,this.plugin)}},jie=()=>z6I;o();async function BD(t,e,I){if(!e.app.vault.adapter.exists(t))throw"file doesn't exist";let l=t.split(".").reverse()[0].toLowerCase(),n=new pZ(e.app,e);switch(eLe.includes(l?.toLowerCase())&&n.setExtractor("AudioExtractor"),l){case"pdf":n.setExtractor("PDFExtractor");break;case"png":n.setExtractor("ImageExtractor");break;case"jpeg":n.setExtractor("ImageExtractor");break;default:{let a=e.app.vault.getAbstractFileByPath(t);if(!a)throw new Error("file doesn't exist");return e.app.vault.cachedRead(a)}}return await n.convert(t,I)}var Y6=z(XQ()),zHt=z(t3()),Z5=z(Kb());o();var exe=require("obsidian"),CHt=z(cEe());var LHt=z(XQ()),kHt=z(t3()),xHt=z(Kb());var xLe={};tr(xLe,{chains:()=>Mie,splitters:()=>fj});o();o();o();H3();nre();var Qj=class extends GK{lc_namespace=["langchain","document_transformers","text_splitters"];chunkSize=1e3;chunkOverlap=200;keepSeparator=!1;lengthFunction;constructor(t){if(super(t),this.chunkSize=t?.chunkSize??this.chunkSize,this.chunkOverlap=t?.chunkOverlap??this.chunkOverlap,this.keepSeparator=t?.keepSeparator??this.keepSeparator,this.lengthFunction=t?.lengthFunction??(e=>e.length),this.chunkOverlap>=this.chunkSize)throw new Error("Cannot have chunkOverlap >= chunkSize")}async transformDocuments(t,e={}){return this.splitDocuments(t,e)}splitOnSeparator(t,e){let I;if(e)if(this.keepSeparator){let l=e.replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&");I=t.split(new RegExp(`(?=${l})`))}else I=t.split(e);else I=t.split("");return I.filter(l=>l!=="")}async createDocuments(t,e=[],I={}){let l=e.length>0?e:[...Array(t.length)].map(()=>({})),{chunkHeader:n="",chunkOverlapHeader:a="(cont'd) ",appendChunkOverlapHeader:c=!1}=I,r=new Array;for(let s=0;sp){let R=this.numberOfNewLines(i,p,V);G-=R}c&&(Z+=a)}let W=this.numberOfNewLines(b),h=l[s].loc&&typeof l[s].loc=="object"?{...l[s].loc}:{};h.lines={from:G,to:G+W};let N={...l[s],loc:h};Z+=b,r.push(new Hr({pageContent:Z,metadata:N})),G+=W,d=b,u=p}}return r}numberOfNewLines(t,e,I){return(t.slice(e,I).match(/\n/g)||[]).length}async splitDocuments(t,e={}){let I=t.filter(a=>a.pageContent!==void 0),l=I.map(a=>a.pageContent),n=I.map(a=>a.metadata);return this.createDocuments(l,n,e)}joinDocs(t,e){let I=t.join(e).trim();return I===""?null:I}async mergeSplits(t,e){let I=[],l=[],n=0;for(let c of t){let r=await this.lengthFunction(c);if(n+r+l.length*e.length>this.chunkSize&&(n>this.chunkSize&&console.warn(`Created a chunk of size ${n}, + +which is longer than the specified ${this.chunkSize}`),l.length>0)){let s=this.joinDocs(l,e);for(s!==null&&I.push(s);n>this.chunkOverlap||n+r+l.length*e.length>this.chunkSize&&n>0;)n-=await this.lengthFunction(l[0]),l.shift()}l.push(c),n+=r}let a=this.joinDocs(l,e);return a!==null&&I.push(a),I}},JLe=class extends Qj{static lc_name(){return"CharacterTextSplitter"}separator=` + +`;constructor(t){super(t),this.separator=t?.separator??this.separator}async splitText(t){let e=this.splitOnSeparator(t,this.separator);return this.mergeSplits(e,this.keepSeparator?"":this.separator)}};var $C=class ELe extends Qj{static lc_name(){return"RecursiveCharacterTextSplitter"}separators=[` + +`,` +`," ",""];constructor(e){super(e),this.separators=e?.separators??this.separators,this.keepSeparator=e?.keepSeparator??!0}async _splitText(e,I){let l=[],n=I[I.length-1],a;for(let i=0;i","
","

","
","

  • ","

    ","

    ","

    ","

    ","

    ","
    ","","","","
    ","","
      ","
        ","
        ","