@agentica/chat 0.10.1-dev.20250302 → 0.10.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2024 Wrtn Technologies
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Wrtn Technologies
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -2448,7 +2448,7 @@ them all into the \`functions\` property.
2448
2448
  Also, if you A.I. agent can't specify a specific function to call due to lack
2449
2449
  of specificity or homogeneity of candidate functions, just assign all of them
2450
2450
  by in the\` functions\` property\` too. Instead, when you A.I. agent can specify
2451
- a specific function to call, the others would be eliminated.`}]};var fUt;(o=>{o.execute=s=>async d=>{const m=[];if(d.ready()===!1){if((s==null?void 0:s.initialize)===null)await d.initialize();else if(m.push(...await((s==null?void 0:s.initialize)??lUt.execute)(d)),d.ready()===!1)return m}if(d.stack.length!==0&&m.push(...await((s==null?void 0:s.cancel)??IX.execute)(d)),m.push(...await((s==null?void 0:s.select)??hUt.execute)(d)),d.stack.length===0)return m;for(;;){const I=await((s==null?void 0:s.call)??cUt.execute)(d);m.push(...I);const B=I.filter(L=>L.type==="execute");for(const L of B)await IX.cancelFunction(d,{reason:"completed",name:L.function.name});if(m.push(...await((s==null?void 0:s.describe)??uUt.execute)(d,B)),B.length===0||d.stack.length===0)break}return m}})(fUt||(fUt={}));const BOe=(o,s,d)=>{const m=o.get(s);if(m)return m;const I=d();return o.set(s,I),I};var AUt;(o=>{o.compose=d=>{var j;const m=d.controllers.length===1||(()=>{const tt=d.controllers.map(rt=>rt.application.functions.map(it=>it.name)).flat();return new Set(tt).size===tt.length})(),I=(tt,rt)=>m?tt:`_${rt}_${tt}`,B=d.controllers.map((tt,rt)=>tt.protocol==="http"?tt.application.functions.map(it=>({protocol:"http",controller:tt,function:it,name:I(it.name,rt)})):tt.application.functions.map(it=>({protocol:"class",controller:tt,function:it,name:I(it.name,rt)}))).flat(),L=(j=d.config)!=null&&j.capacity&&B.length>d.config.capacity?s({array:B,capacity:d.config.capacity}):void 0,Q=new Map,z=new Map;for(const tt of B)Q.set(tt.name,tt),BOe(z,tt.controller.name,()=>new Map).set(tt.name,tt);return{array:B,divided:L,flat:Q,group:z}};const s=d=>{const m=Math.ceil(d.array.length/d.capacity),I=Math.ceil(d.array.length/m),B=d.array.slice();return new Array(m).fill(0).map(()=>B.splice(0,I))}})(AUt||(AUt={}));var dUt;(o=>{o.transform=m=>m.input.type==="text"?m.input:m.input.type==="select"||m.input.type==="cancel"?{...m.input,operations:m.input.operations.map(I=>l2.selection({...d({operations:m.operations,input:I}),reason:I.reason}))}:m.input.type==="execute"?s({operations:m.operations,input:m.input}):{type:"describe",text:m.input.text,executions:m.input.executions.map(I=>s({operations:m.operations,input:I}))};const s=m=>{const I=d({operations:m.operations,input:m.input});return l2.execute({type:"execute",protocol:I.protocol,controller:I.controller,function:I.function,id:m.input.id,name:m.input.name,arguments:m.input.arguments,value:m.input.value})},d=m=>{var B;const I=(B=m.operations.get(m.input.controller))==null?void 0:B.get(m.input.function);if(I===void 0)throw new Error(`No operation found: (controller: ${m.input.controller}, function: ${m.input.function})`);return I}})(dUt||(dUt={}));var pmt;(o=>{o.aggregate=s=>{var B,L,Q,z,j;if(!s.completion.usage)return;const d=s.usage[s.kind];d.total+=s.completion.usage.total_tokens,d.input.total+=s.completion.usage.prompt_tokens,(B=s.completion.usage.prompt_tokens_details)==null||B.audio_tokens,d.input.cached+=((L=s.completion.usage.prompt_tokens_details)==null?void 0:L.cached_tokens)??0,d.output.total+=s.completion.usage.total_tokens,d.output.accepted_prediction+=((Q=s.completion.usage.completion_tokens_details)==null?void 0:Q.accepted_prediction_tokens)??0,d.output.reasoning+=((z=s.completion.usage.completion_tokens_details)==null?void 0:z.reasoning_tokens)??0,d.output.rejected_prediction+=((j=s.completion.usage.completion_tokens_details)==null?void 0:j.rejected_prediction_tokens)??0;const m=tt=>Object.entries(s.usage).filter(([rt])=>rt!=="aggregate").map(([rt,it])=>tt(it)).reduce((rt,it)=>rt+it,0),I=s.usage.aggregate;I.total=m(tt=>tt.total),I.input.total=m(tt=>tt.input.total),I.input.cached=m(tt=>tt.input.cached),I.output.total=m(tt=>tt.output.total),I.output.reasoning=m(tt=>tt.output.reasoning),I.output.accepted_prediction=m(tt=>tt.output.accepted_prediction),I.output.rejected_prediction=m(tt=>tt.output.rejected_prediction)},o.plus=(s,d)=>{const m=(I,B)=>({total:I.total+B.total,input:{total:I.input.total+B.input.total,cached:I.input.cached+B.input.cached},output:{total:I.output.total+B.output.total,reasoning:I.output.reasoning+B.output.reasoning,accepted_prediction:I.output.accepted_prediction+B.output.accepted_prediction,rejected_prediction:I.output.rejected_prediction+B.output.rejected_prediction}});return{aggregate:m(s.aggregate,d.aggregate),initialize:m(s.initialize,d.initialize),select:m(s.select,d.select),cancel:m(s.cancel,d.cancel),call:m(s.call,d.call),describe:m(s.describe,d.describe)}},o.zero=()=>{const s=()=>({total:0,input:{total:0,cached:0},output:{total:0,reasoning:0,accepted_prediction:0,rejected_prediction:0}});return{aggregate:s(),initialize:s(),select:s(),cancel:s(),call:s(),describe:s()}}})(pmt||(pmt={}));class OOe{constructor(s){var d,m;this.props=s,this.operations_=AUt.compose({controllers:s.controllers,config:s.config}),this.stack_=[],this.listeners_=new Map,this.prompt_histories_=(s.histories??[]).map(I=>dUt.transform({operations:this.operations_.group,input:I})),this.token_usage_=pmt.zero(),this.ready_=!1,this.executor_=typeof((d=s.config)==null?void 0:d.executor)=="function"?s.config.executor:fUt.execute(((m=s.config)==null?void 0:m.executor)??null)}clone(){var s;return new OOe({...this.props,histories:(s=this.props.histories)==null?void 0:s.slice()})}async conversate(s){const d={type:"text",role:"user",text:s};await this.dispatch(d);const m=await this.executor_(this.getContext({prompt:d,usage:this.token_usage_}));return this.prompt_histories_.push(d,...m),[d,...m]}getConfig(){return this.props.config}getVendor(){return this.props.vendor}getControllers(){return this.props.controllers}getOperations(){return this.operations_.array}getPromptHistories(){return this.prompt_histories_}getTokenUsage(){return this.token_usage_}getContext(s){const d=m=>this.dispatch(m);return{operations:this.operations_,config:this.props.config,histories:this.prompt_histories_,stack:this.stack_,ready:()=>this.ready_,prompt:s.prompt,dispatch:m=>this.dispatch(m),request:async(m,I)=>{const B={type:"request",source:m,body:{...I,model:this.props.vendor.model},options:this.props.vendor.options};await d(B);const L=await this.props.vendor.api.chat.completions.create(B.body,B.options);return pmt.aggregate({kind:m,completion:L,usage:s.usage}),await d({type:"response",source:m,body:B.body,options:B.options,value:L}),L},initialize:async()=>{this.ready_=!0,await d({type:"initialize"})}}}on(s,d){return BOe(this.listeners_,s,()=>new Set).add(d),this}off(s,d){const m=this.listeners_.get(s);return m&&(m.delete(d),m.size===0&&this.listeners_.delete(s)),this}async dispatch(s){const d=this.listeners_.get(s.type);d&&await Promise.all(Array.from(d).map(async m=>{try{await m(s)}catch{}}))}}const pUt="RFC3986",gUt={RFC1738:o=>String(o).replace(/%20/g,"+"),RFC3986:o=>String(o)},hRn="RFC1738",fRn=Array.isArray,BE=(()=>{const o=[];for(let s=0;s<256;++s)o.push("%"+((s<16?"0":"")+s.toString(16)).toUpperCase());return o})(),QDt=1024,ARn=(o,s,d,m,I)=>{if(o.length===0)return o;let B=o;if(typeof o=="symbol"?B=Symbol.prototype.toString.call(o):typeof o!="string"&&(B=String(o)),d==="iso-8859-1")return escape(B).replace(/%u[0-9a-f]{4}/gi,function(Q){return"%26%23"+parseInt(Q.slice(2),16)+"%3B"});let L="";for(let Q=0;Q<B.length;Q+=QDt){const z=B.length>=QDt?B.slice(Q,Q+QDt):B,j=[];for(let tt=0;tt<z.length;++tt){let rt=z.charCodeAt(tt);if(rt===45||rt===46||rt===95||rt===126||rt>=48&&rt<=57||rt>=65&&rt<=90||rt>=97&&rt<=122||I===hRn&&(rt===40||rt===41)){j[j.length]=z.charAt(tt);continue}if(rt<128){j[j.length]=BE[rt];continue}if(rt<2048){j[j.length]=BE[192|rt>>6]+BE[128|rt&63];continue}if(rt<55296||rt>=57344){j[j.length]=BE[224|rt>>12]+BE[128|rt>>6&63]+BE[128|rt&63];continue}tt+=1,rt=65536+((rt&1023)<<10|z.charCodeAt(tt)&1023),j[j.length]=BE[240|rt>>18]+BE[128|rt>>12&63]+BE[128|rt>>6&63]+BE[128|rt&63]}L+=j.join("")}return L};function dRn(o){return!o||typeof o!="object"?!1:!!(o.constructor&&o.constructor.isBuffer&&o.constructor.isBuffer(o))}function d8e(o,s){if(fRn(o)){const d=[];for(let m=0;m<o.length;m+=1)d.push(s(o[m]));return d}return s(o)}const pRn=Object.prototype.hasOwnProperty,LOe={brackets(o){return String(o)+"[]"},comma:"comma",indices(o,s){return String(o)+"["+s+"]"},repeat(o){return String(o)}},NE=Array.isArray,gRn=Array.prototype.push,NOe=function(o,s){gRn.apply(o,NE(s)?s:[s])},bRn=Date.prototype.toISOString,ap={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:ARn,encodeValuesOnly:!1,format:pUt,formatter:gUt[pUt],indices:!1,serializeDate(o){return bRn.call(o)},skipNulls:!1,strictNullHandling:!1};function mRn(o){return typeof o=="string"||typeof o=="number"||typeof o=="boolean"||typeof o=="symbol"||typeof o=="bigint"}const HDt={};function FOe(o,s,d,m,I,B,L,Q,z,j,tt,rt,it,ut,ot,Lt,Mt,zt){let Zt=o,ae=zt,pe=0,Ve=!1;for(;(ae=ae.get(HDt))!==void 0&&!Ve;){const Xn=ae.get(o);if(pe+=1,typeof Xn<"u"){if(Xn===pe)throw new RangeError("Cyclic object value");Ve=!0}typeof ae.get(HDt)>"u"&&(pe=0)}if(typeof j=="function"?Zt=j(s,Zt):Zt instanceof Date?Zt=it==null?void 0:it(Zt):d==="comma"&&NE(Zt)&&(Zt=d8e(Zt,function(Xn){return Xn instanceof Date?it==null?void 0:it(Xn):Xn})),Zt===null){if(B)return z&&!Lt?z(s,ap.encoder,Mt,"key",ut):s;Zt=""}if(mRn(Zt)||dRn(Zt)){if(z){const Xn=Lt?s:z(s,ap.encoder,Mt,"key",ut);return[(ot==null?void 0:ot(Xn))+"="+(ot==null?void 0:ot(z(Zt,ap.encoder,Mt,"value",ut)))]}return[(ot==null?void 0:ot(s))+"="+(ot==null?void 0:ot(String(Zt)))]}const ue=[];if(typeof Zt>"u")return ue;let bn;if(d==="comma"&&NE(Zt))Lt&&z&&(Zt=d8e(Zt,z)),bn=[{value:Zt.length>0?Zt.join(",")||null:void 0}];else if(NE(j))bn=j;else{const Xn=Object.keys(Zt);bn=tt?Xn.sort(tt):Xn}const Yn=Q?String(s).replace(/\./g,"%2E"):String(s),xn=m&&NE(Zt)&&Zt.length===1?Yn+"[]":Yn;if(I&&NE(Zt)&&Zt.length===0)return xn+"[]";for(let Xn=0;Xn<bn.length;++Xn){const pn=bn[Xn],Dn=typeof pn=="object"&&typeof pn.value<"u"?pn.value:Zt[pn];if(L&&Dn===null)continue;const ur=rt&&Q?pn.replace(/\./g,"%2E"):pn,vr=NE(Zt)?typeof d=="function"?d(xn,ur):xn:xn+(rt?"."+ur:"["+ur+"]");zt.set(o,pe);const dr=new WeakMap;dr.set(HDt,zt),NOe(ue,FOe(Dn,vr,d,m,I,B,L,Q,d==="comma"&&Lt&&NE(Zt)?null:z,j,tt,rt,it,ut,ot,Lt,Mt,dr))}return ue}function wRn(o=ap){if(typeof o.allowEmptyArrays<"u"&&typeof o.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof o.encodeDotInKeys<"u"&&typeof o.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(o.encoder!==null&&typeof o.encoder<"u"&&typeof o.encoder!="function")throw new TypeError("Encoder has to be a function.");const s=o.charset||ap.charset;if(typeof o.charset<"u"&&o.charset!=="utf-8"&&o.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");let d=pUt;if(typeof o.format<"u"){if(!pRn.call(gUt,o.format))throw new TypeError("Unknown format option provided.");d=o.format}const m=gUt[d];let I=ap.filter;(typeof o.filter=="function"||NE(o.filter))&&(I=o.filter);let B;if(o.arrayFormat&&o.arrayFormat in LOe?B=o.arrayFormat:"indices"in o?B=o.indices?"indices":"repeat":B=ap.arrayFormat,"commaRoundTrip"in o&&typeof o.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");const L=typeof o.allowDots>"u"?o.encodeDotInKeys?!0:ap.allowDots:!!o.allowDots;return{addQueryPrefix:typeof o.addQueryPrefix=="boolean"?o.addQueryPrefix:ap.addQueryPrefix,allowDots:L,allowEmptyArrays:typeof o.allowEmptyArrays=="boolean"?!!o.allowEmptyArrays:ap.allowEmptyArrays,arrayFormat:B,charset:s,charsetSentinel:typeof o.charsetSentinel=="boolean"?o.charsetSentinel:ap.charsetSentinel,commaRoundTrip:!!o.commaRoundTrip,delimiter:typeof o.delimiter>"u"?ap.delimiter:o.delimiter,encode:typeof o.encode=="boolean"?o.encode:ap.encode,encodeDotInKeys:typeof o.encodeDotInKeys=="boolean"?o.encodeDotInKeys:ap.encodeDotInKeys,encoder:typeof o.encoder=="function"?o.encoder:ap.encoder,encodeValuesOnly:typeof o.encodeValuesOnly=="boolean"?o.encodeValuesOnly:ap.encodeValuesOnly,filter:I,format:d,formatter:m,serializeDate:typeof o.serializeDate=="function"?o.serializeDate:ap.serializeDate,skipNulls:typeof o.skipNulls=="boolean"?o.skipNulls:ap.skipNulls,sort:typeof o.sort=="function"?o.sort:null,strictNullHandling:typeof o.strictNullHandling=="boolean"?o.strictNullHandling:ap.strictNullHandling}}function yRn(o,s={}){let d=o;const m=wRn(s);let I,B;typeof m.filter=="function"?(B=m.filter,d=B("",d)):NE(m.filter)&&(B=m.filter,I=B);const L=[];if(typeof d!="object"||d===null)return"";const Q=LOe[m.arrayFormat],z=Q==="comma"&&m.commaRoundTrip;I||(I=Object.keys(d)),m.sort&&I.sort(m.sort);const j=new WeakMap;for(let it=0;it<I.length;++it){const ut=I[it];m.skipNulls&&d[ut]===null||NOe(L,FOe(d[ut],ut,Q,z,m.allowEmptyArrays,m.strictNullHandling,m.skipNulls,m.encodeDotInKeys,m.encode?m.encoder:null,m.filter,m.sort,m.allowDots,m.serializeDate,m.format,m.formatter,m.encodeValuesOnly,m.charset,j))}const tt=L.join(m.delimiter);let rt=m.addQueryPrefix===!0?"?":"";return m.charsetSentinel&&(m.charset==="iso-8859-1"?rt+="utf8=%26%2310003%3B&":rt+="utf8=%E2%9C%93&"),tt.length>0?rt+tt:""}const iU="4.85.4";let p8e=!1,sX,POe,MOe,bUt,DOe,ROe,UOe,QOe,HOe;function vRn(o,s={auto:!1}){if(p8e)throw new Error(`you must \`import 'openai/shims/${o.kind}'\` before importing anything else from openai`);if(sX)throw new Error(`can't \`import 'openai/shims/${o.kind}'\` after \`import 'openai/shims/${sX}'\``);p8e=s.auto,sX=o.kind,POe=o.fetch,MOe=o.FormData,bUt=o.File,DOe=o.ReadableStream,ROe=o.getMultipartRequestOptions,UOe=o.getDefaultAgent,QOe=o.fileFromPath,HOe=o.isFsReadStream}class xRn{constructor(s){this.body=s}get[Symbol.toStringTag](){return"MultipartBody"}}function ERn({manuallyImported:o}={}){const s=o?"You may need to use polyfills":"Add one of these imports before your first `import … from 'openai'`:\n- `import 'openai/shims/node'` (if you're running on Node)\n- `import 'openai/shims/web'` (otherwise)\n";let d,m,I,B;try{d=fetch,m=Request,I=Response,B=Headers}catch(L){throw new Error(`this environment is missing the following Web Fetch API type: ${L.message}. ${s}`)}return{kind:"web",fetch:d,Request:m,Response:I,Headers:B,FormData:typeof FormData<"u"?FormData:class{constructor(){throw new Error(`file uploads aren't supported in this environment yet as 'FormData' is undefined. ${s}`)}},Blob:typeof Blob<"u"?Blob:class{constructor(){throw new Error(`file uploads aren't supported in this environment yet as 'Blob' is undefined. ${s}`)}},File:typeof File<"u"?File:class{constructor(){throw new Error(`file uploads aren't supported in this environment yet as 'File' is undefined. ${s}`)}},ReadableStream:typeof ReadableStream<"u"?ReadableStream:class{constructor(){throw new Error(`streaming isn't supported in this environment yet as 'ReadableStream' is undefined. ${s}`)}},getMultipartRequestOptions:async(L,Q)=>({...Q,body:new xRn(L)}),getDefaultAgent:L=>{},fileFromPath:()=>{throw new Error("The `fileFromPath` function is only supported in Node. See the README for more details: https://www.github.com/openai/openai-node#file-uploads")},isFsReadStream:L=>!1}}sX||vRn(ERn(),{auto:!0});class qu extends Error{}class Q0 extends qu{constructor(s,d,m,I){super(`${Q0.makeMessage(s,d,m)}`),this.status=s,this.headers=I,this.request_id=I==null?void 0:I["x-request-id"],this.error=d;const B=d;this.code=B==null?void 0:B.code,this.param=B==null?void 0:B.param,this.type=B==null?void 0:B.type}static makeMessage(s,d,m){const I=d!=null&&d.message?typeof d.message=="string"?d.message:JSON.stringify(d.message):d?JSON.stringify(d):m;return s&&I?`${s} ${I}`:s?`${s} status code (no body)`:I||"(no status code or body)"}static generate(s,d,m,I){if(!s||!I)return new Hmt({message:m,cause:wUt(d)});const B=d==null?void 0:d.error;return s===400?new jOe(s,B,m,I):s===401?new $Oe(s,B,m,I):s===403?new KOe(s,B,m,I):s===404?new GOe(s,B,m,I):s===409?new zOe(s,B,m,I):s===422?new qOe(s,B,m,I):s===429?new WOe(s,B,m,I):s>=500?new VOe(s,B,m,I):new Q0(s,B,m,I)}}class l5 extends Q0{constructor({message:s}={}){super(void 0,void 0,s||"Request was aborted.",void 0)}}class Hmt extends Q0{constructor({message:s,cause:d}){super(void 0,void 0,s||"Connection error.",void 0),d&&(this.cause=d)}}class _Qt extends Hmt{constructor({message:s}={}){super({message:s??"Request timed out."})}}class jOe extends Q0{}class $Oe extends Q0{}class KOe extends Q0{}class GOe extends Q0{}class zOe extends Q0{}class qOe extends Q0{}class WOe extends Q0{}class VOe extends Q0{}class JOe extends qu{constructor(){super("Could not parse response content as the length limit was reached")}}class YOe extends qu{constructor(){super("Could not parse response content as the request was rejected by the content filter")}}var dbt=function(o,s,d,m,I){if(m==="m")throw new TypeError("Private method is not writable");if(m==="a"&&!I)throw new TypeError("Private accessor was defined without a setter");if(typeof s=="function"?o!==s||!I:!s.has(o))throw new TypeError("Cannot write private member to an object whose class did not declare it");return m==="a"?I.call(o,d):I?I.value=d:s.set(o,d),d},bL=function(o,s,d,m){if(d==="a"&&!m)throw new TypeError("Private accessor was defined without a getter");if(typeof s=="function"?o!==s||!m:!s.has(o))throw new TypeError("Cannot read private member from an object whose class did not declare it");return d==="m"?m:d==="a"?m.call(o):m?m.value:s.get(o)},Ow;class jmt{constructor(){Ow.set(this,void 0),this.buffer=new Uint8Array,dbt(this,Ow,null,"f")}decode(s){if(s==null)return[];const d=s instanceof ArrayBuffer?new Uint8Array(s):typeof s=="string"?new TextEncoder().encode(s):s;let m=new Uint8Array(this.buffer.length+d.length);m.set(this.buffer),m.set(d,this.buffer.length),this.buffer=m;const I=[];let B;for(;(B=CRn(this.buffer,bL(this,Ow,"f")))!=null;){if(B.carriage&&bL(this,Ow,"f")==null){dbt(this,Ow,B.index,"f");continue}if(bL(this,Ow,"f")!=null&&(B.index!==bL(this,Ow,"f")+1||B.carriage)){I.push(this.decodeText(this.buffer.slice(0,bL(this,Ow,"f")-1))),this.buffer=this.buffer.slice(bL(this,Ow,"f")),dbt(this,Ow,null,"f");continue}const L=bL(this,Ow,"f")!==null?B.preceding-1:B.preceding,Q=this.decodeText(this.buffer.slice(0,L));I.push(Q),this.buffer=this.buffer.slice(B.index),dbt(this,Ow,null,"f")}return I}decodeText(s){if(s==null)return"";if(typeof s=="string")return s;if(typeof Buffer<"u"){if(s instanceof Buffer)return s.toString();if(s instanceof Uint8Array)return Buffer.from(s).toString();throw new qu(`Unexpected: received non-Uint8Array (${s.constructor.name}) stream chunk in an environment with a global "Buffer" defined, which this library assumes to be Node. Please report this error.`)}if(typeof TextDecoder<"u"){if(s instanceof Uint8Array||s instanceof ArrayBuffer)return this.textDecoder??(this.textDecoder=new TextDecoder("utf8")),this.textDecoder.decode(s);throw new qu(`Unexpected: received non-Uint8Array/ArrayBuffer (${s.constructor.name}) in a web platform. Please report this error.`)}throw new qu("Unexpected: neither Buffer nor TextDecoder are available as globals. Please report this error.")}flush(){return this.buffer.length?this.decode(`
2451
+ a specific function to call, the others would be eliminated.`}]};var fUt;(o=>{o.execute=s=>async d=>{const m=[];if(d.ready()===!1){if((s==null?void 0:s.initialize)===null)await d.initialize();else if(m.push(...await((s==null?void 0:s.initialize)??lUt.execute)(d)),d.ready()===!1)return m}if(d.stack.length!==0&&m.push(...await((s==null?void 0:s.cancel)??IX.execute)(d)),m.push(...await((s==null?void 0:s.select)??hUt.execute)(d)),d.stack.length===0)return m;for(;;){const I=await((s==null?void 0:s.call)??cUt.execute)(d);m.push(...I);const B=I.filter(L=>L.type==="execute");for(const L of B)await IX.cancelFunction(d,{reason:"completed",name:L.function.name});if(m.push(...await((s==null?void 0:s.describe)??uUt.execute)(d,B)),B.length===0||d.stack.length===0)break}return m}})(fUt||(fUt={}));const BOe=(o,s,d)=>{const m=o.get(s);if(m)return m;const I=d();return o.set(s,I),I};var AUt;(o=>{o.compose=d=>{var j;const m=d.controllers.length===1||(()=>{const tt=d.controllers.map(rt=>rt.application.functions.map(it=>it.name)).flat();return new Set(tt).size===tt.length})(),I=(tt,rt)=>m?tt:`_${rt}_${tt}`,B=d.controllers.map((tt,rt)=>tt.protocol==="http"?tt.application.functions.map(it=>({protocol:"http",controller:tt,function:it,name:I(it.name,rt)})):tt.application.functions.map(it=>({protocol:"class",controller:tt,function:it,name:I(it.name,rt)}))).flat(),L=(j=d.config)!=null&&j.capacity&&B.length>d.config.capacity?s({array:B,capacity:d.config.capacity}):void 0,Q=new Map,z=new Map;for(const tt of B)Q.set(tt.name,tt),BOe(z,tt.controller.name,()=>new Map).set(tt.name,tt);return{array:B,divided:L,flat:Q,group:z}};const s=d=>{const m=Math.ceil(d.array.length/d.capacity),I=Math.ceil(d.array.length/m),B=d.array.slice();return new Array(m).fill(0).map(()=>B.splice(0,I))}})(AUt||(AUt={}));var dUt;(o=>{o.transform=m=>m.input.type==="text"?m.input:m.input.type==="select"||m.input.type==="cancel"?{...m.input,operations:m.input.operations.map(I=>l2.selection({...d({operations:m.operations,input:I}),reason:I.reason}))}:m.input.type==="execute"?s({operations:m.operations,input:m.input}):{type:"describe",text:m.input.text,executions:m.input.executions.map(I=>s({operations:m.operations,input:I}))};const s=m=>{const I=d({operations:m.operations,input:m.input});return l2.execute({type:"execute",protocol:I.protocol,controller:I.controller,function:I.function,id:m.input.id,name:m.input.name,arguments:m.input.arguments,value:m.input.value})},d=m=>{var B;const I=(B=m.operations.get(m.input.controller))==null?void 0:B.get(m.input.function);if(I===void 0)throw new Error(`No operation found: (controller: ${m.input.controller}, function: ${m.input.function})`);return I}})(dUt||(dUt={}));var pmt;(o=>{o.aggregate=s=>{var B,L,Q,z,j;if(!s.completion.usage)return;const d=s.usage[s.kind];d.total+=s.completion.usage.total_tokens,d.input.total+=s.completion.usage.prompt_tokens,(B=s.completion.usage.prompt_tokens_details)==null||B.audio_tokens,d.input.cached+=((L=s.completion.usage.prompt_tokens_details)==null?void 0:L.cached_tokens)??0,d.output.total+=s.completion.usage.total_tokens,d.output.accepted_prediction+=((Q=s.completion.usage.completion_tokens_details)==null?void 0:Q.accepted_prediction_tokens)??0,d.output.reasoning+=((z=s.completion.usage.completion_tokens_details)==null?void 0:z.reasoning_tokens)??0,d.output.rejected_prediction+=((j=s.completion.usage.completion_tokens_details)==null?void 0:j.rejected_prediction_tokens)??0;const m=tt=>Object.entries(s.usage).filter(([rt])=>rt!=="aggregate").map(([rt,it])=>tt(it)).reduce((rt,it)=>rt+it,0),I=s.usage.aggregate;I.total=m(tt=>tt.total),I.input.total=m(tt=>tt.input.total),I.input.cached=m(tt=>tt.input.cached),I.output.total=m(tt=>tt.output.total),I.output.reasoning=m(tt=>tt.output.reasoning),I.output.accepted_prediction=m(tt=>tt.output.accepted_prediction),I.output.rejected_prediction=m(tt=>tt.output.rejected_prediction)},o.plus=(s,d)=>{const m=(I,B)=>({total:I.total+B.total,input:{total:I.input.total+B.input.total,cached:I.input.cached+B.input.cached},output:{total:I.output.total+B.output.total,reasoning:I.output.reasoning+B.output.reasoning,accepted_prediction:I.output.accepted_prediction+B.output.accepted_prediction,rejected_prediction:I.output.rejected_prediction+B.output.rejected_prediction}});return{aggregate:m(s.aggregate,d.aggregate),initialize:m(s.initialize,d.initialize),select:m(s.select,d.select),cancel:m(s.cancel,d.cancel),call:m(s.call,d.call),describe:m(s.describe,d.describe)}},o.zero=()=>{const s=()=>({total:0,input:{total:0,cached:0},output:{total:0,reasoning:0,accepted_prediction:0,rejected_prediction:0}});return{aggregate:s(),initialize:s(),select:s(),cancel:s(),call:s(),describe:s()}}})(pmt||(pmt={}));class OOe{constructor(s){var d,m;this.props=s,this.operations_=AUt.compose({controllers:s.controllers,config:s.config}),this.stack_=[],this.listeners_=new Map,this.prompt_histories_=(s.histories??[]).map(I=>dUt.transform({operations:this.operations_.group,input:I})),this.token_usage_=pmt.zero(),this.ready_=!1,this.executor_=typeof((d=s.config)==null?void 0:d.executor)=="function"?s.config.executor:fUt.execute(((m=s.config)==null?void 0:m.executor)??null)}clone(){var s;return new OOe({...this.props,histories:(s=this.props.histories)==null?void 0:s.slice()})}async conversate(s){const d={type:"text",role:"user",text:s};await this.dispatch(d);const m=await this.executor_(this.getContext({prompt:d,usage:this.token_usage_}));return this.prompt_histories_.push(d,...m),[d,...m]}getConfig(){return this.props.config}getVendor(){return this.props.vendor}getControllers(){return this.props.controllers}getOperations(){return this.operations_.array}getPromptHistories(){return this.prompt_histories_}getTokenUsage(){return this.token_usage_}getContext(s){const d=m=>this.dispatch(m);return{operations:this.operations_,config:this.props.config,histories:this.prompt_histories_,stack:this.stack_,ready:()=>this.ready_,prompt:s.prompt,dispatch:m=>this.dispatch(m),request:async(m,I)=>{const B={type:"request",source:m,body:{...I,model:this.props.vendor.model},options:this.props.vendor.options};await d(B);const L=await this.props.vendor.api.chat.completions.create(B.body,B.options);return pmt.aggregate({kind:m,completion:L,usage:s.usage}),await d({type:"response",source:m,body:B.body,options:B.options,value:L}),L},initialize:async()=>{this.ready_=!0,await d({type:"initialize"})}}}on(s,d){return BOe(this.listeners_,s,()=>new Set).add(d),this}off(s,d){const m=this.listeners_.get(s);return m&&(m.delete(d),m.size===0&&this.listeners_.delete(s)),this}async dispatch(s){const d=this.listeners_.get(s.type);d&&await Promise.all(Array.from(d).map(async m=>{try{await m(s)}catch{}}))}}const pUt="RFC3986",gUt={RFC1738:o=>String(o).replace(/%20/g,"+"),RFC3986:o=>String(o)},hRn="RFC1738",fRn=Array.isArray,BE=(()=>{const o=[];for(let s=0;s<256;++s)o.push("%"+((s<16?"0":"")+s.toString(16)).toUpperCase());return o})(),QDt=1024,ARn=(o,s,d,m,I)=>{if(o.length===0)return o;let B=o;if(typeof o=="symbol"?B=Symbol.prototype.toString.call(o):typeof o!="string"&&(B=String(o)),d==="iso-8859-1")return escape(B).replace(/%u[0-9a-f]{4}/gi,function(Q){return"%26%23"+parseInt(Q.slice(2),16)+"%3B"});let L="";for(let Q=0;Q<B.length;Q+=QDt){const z=B.length>=QDt?B.slice(Q,Q+QDt):B,j=[];for(let tt=0;tt<z.length;++tt){let rt=z.charCodeAt(tt);if(rt===45||rt===46||rt===95||rt===126||rt>=48&&rt<=57||rt>=65&&rt<=90||rt>=97&&rt<=122||I===hRn&&(rt===40||rt===41)){j[j.length]=z.charAt(tt);continue}if(rt<128){j[j.length]=BE[rt];continue}if(rt<2048){j[j.length]=BE[192|rt>>6]+BE[128|rt&63];continue}if(rt<55296||rt>=57344){j[j.length]=BE[224|rt>>12]+BE[128|rt>>6&63]+BE[128|rt&63];continue}tt+=1,rt=65536+((rt&1023)<<10|z.charCodeAt(tt)&1023),j[j.length]=BE[240|rt>>18]+BE[128|rt>>12&63]+BE[128|rt>>6&63]+BE[128|rt&63]}L+=j.join("")}return L};function dRn(o){return!o||typeof o!="object"?!1:!!(o.constructor&&o.constructor.isBuffer&&o.constructor.isBuffer(o))}function d8e(o,s){if(fRn(o)){const d=[];for(let m=0;m<o.length;m+=1)d.push(s(o[m]));return d}return s(o)}const pRn=Object.prototype.hasOwnProperty,LOe={brackets(o){return String(o)+"[]"},comma:"comma",indices(o,s){return String(o)+"["+s+"]"},repeat(o){return String(o)}},NE=Array.isArray,gRn=Array.prototype.push,NOe=function(o,s){gRn.apply(o,NE(s)?s:[s])},bRn=Date.prototype.toISOString,ap={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:ARn,encodeValuesOnly:!1,format:pUt,formatter:gUt[pUt],indices:!1,serializeDate(o){return bRn.call(o)},skipNulls:!1,strictNullHandling:!1};function mRn(o){return typeof o=="string"||typeof o=="number"||typeof o=="boolean"||typeof o=="symbol"||typeof o=="bigint"}const HDt={};function FOe(o,s,d,m,I,B,L,Q,z,j,tt,rt,it,ut,ot,Lt,Mt,zt){let Zt=o,ae=zt,pe=0,Ve=!1;for(;(ae=ae.get(HDt))!==void 0&&!Ve;){const Xn=ae.get(o);if(pe+=1,typeof Xn<"u"){if(Xn===pe)throw new RangeError("Cyclic object value");Ve=!0}typeof ae.get(HDt)>"u"&&(pe=0)}if(typeof j=="function"?Zt=j(s,Zt):Zt instanceof Date?Zt=it==null?void 0:it(Zt):d==="comma"&&NE(Zt)&&(Zt=d8e(Zt,function(Xn){return Xn instanceof Date?it==null?void 0:it(Xn):Xn})),Zt===null){if(B)return z&&!Lt?z(s,ap.encoder,Mt,"key",ut):s;Zt=""}if(mRn(Zt)||dRn(Zt)){if(z){const Xn=Lt?s:z(s,ap.encoder,Mt,"key",ut);return[(ot==null?void 0:ot(Xn))+"="+(ot==null?void 0:ot(z(Zt,ap.encoder,Mt,"value",ut)))]}return[(ot==null?void 0:ot(s))+"="+(ot==null?void 0:ot(String(Zt)))]}const ue=[];if(typeof Zt>"u")return ue;let bn;if(d==="comma"&&NE(Zt))Lt&&z&&(Zt=d8e(Zt,z)),bn=[{value:Zt.length>0?Zt.join(",")||null:void 0}];else if(NE(j))bn=j;else{const Xn=Object.keys(Zt);bn=tt?Xn.sort(tt):Xn}const Yn=Q?String(s).replace(/\./g,"%2E"):String(s),xn=m&&NE(Zt)&&Zt.length===1?Yn+"[]":Yn;if(I&&NE(Zt)&&Zt.length===0)return xn+"[]";for(let Xn=0;Xn<bn.length;++Xn){const pn=bn[Xn],Dn=typeof pn=="object"&&typeof pn.value<"u"?pn.value:Zt[pn];if(L&&Dn===null)continue;const ur=rt&&Q?pn.replace(/\./g,"%2E"):pn,vr=NE(Zt)?typeof d=="function"?d(xn,ur):xn:xn+(rt?"."+ur:"["+ur+"]");zt.set(o,pe);const dr=new WeakMap;dr.set(HDt,zt),NOe(ue,FOe(Dn,vr,d,m,I,B,L,Q,d==="comma"&&Lt&&NE(Zt)?null:z,j,tt,rt,it,ut,ot,Lt,Mt,dr))}return ue}function wRn(o=ap){if(typeof o.allowEmptyArrays<"u"&&typeof o.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof o.encodeDotInKeys<"u"&&typeof o.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(o.encoder!==null&&typeof o.encoder<"u"&&typeof o.encoder!="function")throw new TypeError("Encoder has to be a function.");const s=o.charset||ap.charset;if(typeof o.charset<"u"&&o.charset!=="utf-8"&&o.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");let d=pUt;if(typeof o.format<"u"){if(!pRn.call(gUt,o.format))throw new TypeError("Unknown format option provided.");d=o.format}const m=gUt[d];let I=ap.filter;(typeof o.filter=="function"||NE(o.filter))&&(I=o.filter);let B;if(o.arrayFormat&&o.arrayFormat in LOe?B=o.arrayFormat:"indices"in o?B=o.indices?"indices":"repeat":B=ap.arrayFormat,"commaRoundTrip"in o&&typeof o.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");const L=typeof o.allowDots>"u"?o.encodeDotInKeys?!0:ap.allowDots:!!o.allowDots;return{addQueryPrefix:typeof o.addQueryPrefix=="boolean"?o.addQueryPrefix:ap.addQueryPrefix,allowDots:L,allowEmptyArrays:typeof o.allowEmptyArrays=="boolean"?!!o.allowEmptyArrays:ap.allowEmptyArrays,arrayFormat:B,charset:s,charsetSentinel:typeof o.charsetSentinel=="boolean"?o.charsetSentinel:ap.charsetSentinel,commaRoundTrip:!!o.commaRoundTrip,delimiter:typeof o.delimiter>"u"?ap.delimiter:o.delimiter,encode:typeof o.encode=="boolean"?o.encode:ap.encode,encodeDotInKeys:typeof o.encodeDotInKeys=="boolean"?o.encodeDotInKeys:ap.encodeDotInKeys,encoder:typeof o.encoder=="function"?o.encoder:ap.encoder,encodeValuesOnly:typeof o.encodeValuesOnly=="boolean"?o.encodeValuesOnly:ap.encodeValuesOnly,filter:I,format:d,formatter:m,serializeDate:typeof o.serializeDate=="function"?o.serializeDate:ap.serializeDate,skipNulls:typeof o.skipNulls=="boolean"?o.skipNulls:ap.skipNulls,sort:typeof o.sort=="function"?o.sort:null,strictNullHandling:typeof o.strictNullHandling=="boolean"?o.strictNullHandling:ap.strictNullHandling}}function yRn(o,s={}){let d=o;const m=wRn(s);let I,B;typeof m.filter=="function"?(B=m.filter,d=B("",d)):NE(m.filter)&&(B=m.filter,I=B);const L=[];if(typeof d!="object"||d===null)return"";const Q=LOe[m.arrayFormat],z=Q==="comma"&&m.commaRoundTrip;I||(I=Object.keys(d)),m.sort&&I.sort(m.sort);const j=new WeakMap;for(let it=0;it<I.length;++it){const ut=I[it];m.skipNulls&&d[ut]===null||NOe(L,FOe(d[ut],ut,Q,z,m.allowEmptyArrays,m.strictNullHandling,m.skipNulls,m.encodeDotInKeys,m.encode?m.encoder:null,m.filter,m.sort,m.allowDots,m.serializeDate,m.format,m.formatter,m.encodeValuesOnly,m.charset,j))}const tt=L.join(m.delimiter);let rt=m.addQueryPrefix===!0?"?":"";return m.charsetSentinel&&(m.charset==="iso-8859-1"?rt+="utf8=%26%2310003%3B&":rt+="utf8=%E2%9C%93&"),tt.length>0?rt+tt:""}const iU="4.86.1";let p8e=!1,sX,POe,MOe,bUt,DOe,ROe,UOe,QOe,HOe;function vRn(o,s={auto:!1}){if(p8e)throw new Error(`you must \`import 'openai/shims/${o.kind}'\` before importing anything else from openai`);if(sX)throw new Error(`can't \`import 'openai/shims/${o.kind}'\` after \`import 'openai/shims/${sX}'\``);p8e=s.auto,sX=o.kind,POe=o.fetch,MOe=o.FormData,bUt=o.File,DOe=o.ReadableStream,ROe=o.getMultipartRequestOptions,UOe=o.getDefaultAgent,QOe=o.fileFromPath,HOe=o.isFsReadStream}class xRn{constructor(s){this.body=s}get[Symbol.toStringTag](){return"MultipartBody"}}function ERn({manuallyImported:o}={}){const s=o?"You may need to use polyfills":"Add one of these imports before your first `import … from 'openai'`:\n- `import 'openai/shims/node'` (if you're running on Node)\n- `import 'openai/shims/web'` (otherwise)\n";let d,m,I,B;try{d=fetch,m=Request,I=Response,B=Headers}catch(L){throw new Error(`this environment is missing the following Web Fetch API type: ${L.message}. ${s}`)}return{kind:"web",fetch:d,Request:m,Response:I,Headers:B,FormData:typeof FormData<"u"?FormData:class{constructor(){throw new Error(`file uploads aren't supported in this environment yet as 'FormData' is undefined. ${s}`)}},Blob:typeof Blob<"u"?Blob:class{constructor(){throw new Error(`file uploads aren't supported in this environment yet as 'Blob' is undefined. ${s}`)}},File:typeof File<"u"?File:class{constructor(){throw new Error(`file uploads aren't supported in this environment yet as 'File' is undefined. ${s}`)}},ReadableStream:typeof ReadableStream<"u"?ReadableStream:class{constructor(){throw new Error(`streaming isn't supported in this environment yet as 'ReadableStream' is undefined. ${s}`)}},getMultipartRequestOptions:async(L,Q)=>({...Q,body:new xRn(L)}),getDefaultAgent:L=>{},fileFromPath:()=>{throw new Error("The `fileFromPath` function is only supported in Node. See the README for more details: https://www.github.com/openai/openai-node#file-uploads")},isFsReadStream:L=>!1}}sX||vRn(ERn(),{auto:!0});class qu extends Error{}class Q0 extends qu{constructor(s,d,m,I){super(`${Q0.makeMessage(s,d,m)}`),this.status=s,this.headers=I,this.request_id=I==null?void 0:I["x-request-id"],this.error=d;const B=d;this.code=B==null?void 0:B.code,this.param=B==null?void 0:B.param,this.type=B==null?void 0:B.type}static makeMessage(s,d,m){const I=d!=null&&d.message?typeof d.message=="string"?d.message:JSON.stringify(d.message):d?JSON.stringify(d):m;return s&&I?`${s} ${I}`:s?`${s} status code (no body)`:I||"(no status code or body)"}static generate(s,d,m,I){if(!s||!I)return new Hmt({message:m,cause:wUt(d)});const B=d==null?void 0:d.error;return s===400?new jOe(s,B,m,I):s===401?new $Oe(s,B,m,I):s===403?new KOe(s,B,m,I):s===404?new GOe(s,B,m,I):s===409?new zOe(s,B,m,I):s===422?new qOe(s,B,m,I):s===429?new WOe(s,B,m,I):s>=500?new VOe(s,B,m,I):new Q0(s,B,m,I)}}class l5 extends Q0{constructor({message:s}={}){super(void 0,void 0,s||"Request was aborted.",void 0)}}class Hmt extends Q0{constructor({message:s,cause:d}){super(void 0,void 0,s||"Connection error.",void 0),d&&(this.cause=d)}}class _Qt extends Hmt{constructor({message:s}={}){super({message:s??"Request timed out."})}}class jOe extends Q0{}class $Oe extends Q0{}class KOe extends Q0{}class GOe extends Q0{}class zOe extends Q0{}class qOe extends Q0{}class WOe extends Q0{}class VOe extends Q0{}class JOe extends qu{constructor(){super("Could not parse response content as the length limit was reached")}}class YOe extends qu{constructor(){super("Could not parse response content as the request was rejected by the content filter")}}var dbt=function(o,s,d,m,I){if(m==="m")throw new TypeError("Private method is not writable");if(m==="a"&&!I)throw new TypeError("Private accessor was defined without a setter");if(typeof s=="function"?o!==s||!I:!s.has(o))throw new TypeError("Cannot write private member to an object whose class did not declare it");return m==="a"?I.call(o,d):I?I.value=d:s.set(o,d),d},bL=function(o,s,d,m){if(d==="a"&&!m)throw new TypeError("Private accessor was defined without a getter");if(typeof s=="function"?o!==s||!m:!s.has(o))throw new TypeError("Cannot read private member from an object whose class did not declare it");return d==="m"?m:d==="a"?m.call(o):m?m.value:s.get(o)},Ow;class jmt{constructor(){Ow.set(this,void 0),this.buffer=new Uint8Array,dbt(this,Ow,null,"f")}decode(s){if(s==null)return[];const d=s instanceof ArrayBuffer?new Uint8Array(s):typeof s=="string"?new TextEncoder().encode(s):s;let m=new Uint8Array(this.buffer.length+d.length);m.set(this.buffer),m.set(d,this.buffer.length),this.buffer=m;const I=[];let B;for(;(B=CRn(this.buffer,bL(this,Ow,"f")))!=null;){if(B.carriage&&bL(this,Ow,"f")==null){dbt(this,Ow,B.index,"f");continue}if(bL(this,Ow,"f")!=null&&(B.index!==bL(this,Ow,"f")+1||B.carriage)){I.push(this.decodeText(this.buffer.slice(0,bL(this,Ow,"f")-1))),this.buffer=this.buffer.slice(bL(this,Ow,"f")),dbt(this,Ow,null,"f");continue}const L=bL(this,Ow,"f")!==null?B.preceding-1:B.preceding,Q=this.decodeText(this.buffer.slice(0,L));I.push(Q),this.buffer=this.buffer.slice(B.index),dbt(this,Ow,null,"f")}return I}decodeText(s){if(s==null)return"";if(typeof s=="string")return s;if(typeof Buffer<"u"){if(s instanceof Buffer)return s.toString();if(s instanceof Uint8Array)return Buffer.from(s).toString();throw new qu(`Unexpected: received non-Uint8Array (${s.constructor.name}) stream chunk in an environment with a global "Buffer" defined, which this library assumes to be Node. Please report this error.`)}if(typeof TextDecoder<"u"){if(s instanceof Uint8Array||s instanceof ArrayBuffer)return this.textDecoder??(this.textDecoder=new TextDecoder("utf8")),this.textDecoder.decode(s);throw new qu(`Unexpected: received non-Uint8Array/ArrayBuffer (${s.constructor.name}) in a web platform. Please report this error.`)}throw new qu("Unexpected: neither Buffer nor TextDecoder are available as globals. Please report this error.")}flush(){return this.buffer.length?this.decode(`
2452
2452
  `):[]}}Ow=new WeakMap;jmt.NEWLINE_CHARS=new Set([`
2453
2453
  `,"\r"]);jmt.NEWLINE_REGEXP=/\r\n|[\n\r]/g;function CRn(o,s){for(let I=s??0;I<o.length;I++){if(o[I]===10)return{preceding:I,index:I+1,carriage:!1};if(o[I]===13)return{preceding:I,index:I+1,carriage:!0}}return null}function kRn(o){for(let m=0;m<o.length-1;m++){if(o[m]===10&&o[m+1]===10||o[m]===13&&o[m+1]===13)return m+2;if(o[m]===13&&o[m+1]===10&&m+3<o.length&&o[m+2]===13&&o[m+3]===10)return m+4}return-1}function XOe(o){if(o[Symbol.asyncIterator])return o;const s=o.getReader();return{async next(){try{const d=await s.read();return d!=null&&d.done&&s.releaseLock(),d}catch(d){throw s.releaseLock(),d}},async return(){const d=s.cancel();return s.releaseLock(),await d,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}class DE{constructor(s,d){this.iterator=s,this.controller=d}static fromSSEResponse(s,d){let m=!1;async function*I(){if(m)throw new Error("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");m=!0;let B=!1;try{for await(const L of TRn(s,d))if(!B){if(L.data.startsWith("[DONE]")){B=!0;continue}if(L.event===null){let Q;try{Q=JSON.parse(L.data)}catch(z){throw console.error("Could not parse message into JSON:",L.data),console.error("From chunk:",L.raw),z}if(Q&&Q.error)throw new Q0(void 0,Q.error,void 0,void 0);yield Q}else{let Q;try{Q=JSON.parse(L.data)}catch(z){throw console.error("Could not parse message into JSON:",L.data),console.error("From chunk:",L.raw),z}if(L.event=="error")throw new Q0(void 0,Q.error,Q.message,void 0);yield{event:L.event,data:Q}}}B=!0}catch(L){if(L instanceof Error&&L.name==="AbortError")return;throw L}finally{B||d.abort()}}return new DE(I,d)}static fromReadableStream(s,d){let m=!1;async function*I(){const L=new jmt,Q=XOe(s);for await(const z of Q)for(const j of L.decode(z))yield j;for(const z of L.flush())yield z}async function*B(){if(m)throw new Error("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");m=!0;let L=!1;try{for await(const Q of I())L||Q&&(yield JSON.parse(Q));L=!0}catch(Q){if(Q instanceof Error&&Q.name==="AbortError")return;throw Q}finally{L||d.abort()}}return new DE(B,d)}[Symbol.asyncIterator](){return this.iterator()}tee(){const s=[],d=[],m=this.iterator(),I=B=>({next:()=>{if(B.length===0){const L=m.next();s.push(L),d.push(L)}return B.shift()}});return[new DE(()=>I(s),this.controller),new DE(()=>I(d),this.controller)]}toReadableStream(){const s=this;let d;const m=new TextEncoder;return new DOe({async start(){d=s[Symbol.asyncIterator]()},async pull(I){try{const{value:B,done:L}=await d.next();if(L)return I.close();const Q=m.encode(JSON.stringify(B)+`
2454
2454
  `);I.enqueue(Q)}catch(B){I.error(B)}},async cancel(){var I;await((I=d.return)==null?void 0:I.call(d))}})}}async function*TRn(o,s){if(!o.body)throw s.abort(),new qu("Attempted to iterate over a response with no body");const d=new _Rn,m=new jmt,I=XOe(o.body);for await(const B of IRn(I))for(const L of m.decode(B)){const Q=d.decode(L);Q&&(yield Q)}for(const B of m.flush()){const L=d.decode(B);L&&(yield L)}}async function*IRn(o){let s=new Uint8Array;for await(const d of o){if(d==null)continue;const m=d instanceof ArrayBuffer?new Uint8Array(d):typeof d=="string"?new TextEncoder().encode(d):d;let I=new Uint8Array(s.length+m.length);I.set(s),I.set(m,s.length),s=I;let B;for(;(B=kRn(s))!==-1;)yield s.slice(0,B),s=s.slice(B)}s.length>0&&(yield s)}class _Rn{constructor(){this.event=null,this.data=[],this.chunks=[]}decode(s){if(s.endsWith("\r")&&(s=s.substring(0,s.length-1)),!s){if(!this.event&&!this.data.length)return null;const B={event:this.event,data:this.data.join(`
@@ -1 +1 @@
1
- import{l as x,m as K,n as F}from"./AgenticaChatApplication-BAduZMpY.js";var A;(function(a){a.is=m=>typeof m=="object"&&m!==null&&typeof m.openapi=="string"&&m.openapi.startsWith("3.0")})(A||(A={}));var S;(function(a){a.is=m=>typeof m=="object"&&m!==null&&typeof m.openapi=="string"&&m.openapi.startsWith("3.1")})(S||(S={}));var _;(function(a){a.is=m=>typeof m=="object"&&m!==null&&typeof m.swagger=="string"&&m.swagger.startsWith("2.0")})(_||(_={}));var q;(function(a){a.convert=i=>i["x-samchon-emended"]===!0?i:{...i,components:w(i.components??{}),paths:i.paths?Object.fromEntries(Object.entries(i.paths).filter(([e,r])=>r!==void 0).map(([e,r])=>[e,O(i)(r)])):void 0,webhooks:i.webhooks?Object.fromEntries(Object.entries(i.webhooks).filter(([e,r])=>r!==void 0).map(([e,r])=>[e,m(i)(r)]).filter(([e,r])=>r!==void 0)):void 0,"x-samchon-emended":!0};const m=i=>e=>{var o,d;if(!n.isReference(e))return O(i)(e);const r=(d=(o=i.components)==null?void 0:o.pathItems)==null?void 0:d[e.$ref.split("/").pop()??""];return r?O(i)(r):void 0},O=i=>e=>({...e,...e.get?{get:b(i)(e)(e.get)}:void 0,...e.put?{put:b(i)(e)(e.put)}:void 0,...e.post?{post:b(i)(e)(e.post)}:void 0,...e.delete?{delete:b(i)(e)(e.delete)}:void 0,...e.options?{options:b(i)(e)(e.options)}:void 0,...e.head?{head:b(i)(e)(e.head)}:void 0,...e.patch?{patch:b(i)(e)(e.patch)}:void 0,...e.trace?{trace:b(i)(e)(e.trace)}:void 0}),b=i=>e=>r=>({...r,parameters:e.parameters!==void 0||r.parameters!==void 0?[...e.parameters??[],...r.parameters??[]].map(o=>{var u,s,v,p;if(!n.isReference(o))return g(i.components??{})(o);const d=o.$ref.startsWith("#/components/headers/")?(s=(u=i.components)==null?void 0:u.headers)==null?void 0:s[o.$ref.split("/").pop()??""]:(p=(v=i.components)==null?void 0:v.parameters)==null?void 0:p[o.$ref.split("/").pop()??""];return d!==void 0?g(i.components??{})({...d,in:"header"}):void 0}).filter((o,d)=>d!==void 0):void 0,requestBody:r.requestBody?$(i)(r.requestBody):void 0,responses:r.responses?Object.fromEntries(Object.entries(r.responses).filter(([o,d])=>d!==void 0).map(([o,d])=>[o,R(i)(d)]).filter(([o,d])=>d!==void 0)):void 0}),g=i=>e=>({...e,schema:l(i)(e.schema),examples:e.examples?Object.fromEntries(Object.entries(e.examples).map(([r,o])=>{var d;return[r,n.isReference(o)?(d=i.examples)==null?void 0:d[o.$ref.split("/").pop()??""]:o]}).filter(([r,o])=>o!==void 0)):void 0}),$=i=>e=>{var r,o;if(n.isReference(e)){const d=(o=(r=i.components)==null?void 0:r.requestBodies)==null?void 0:o[e.$ref.split("/").pop()??""];if(d===void 0)return;e=d}return{...e,content:e.content?E(i.components??{})(e.content):void 0}},R=i=>e=>{var r,o;if(n.isReference(e)){const d=(o=(r=i.components)==null?void 0:r.responses)==null?void 0:o[e.$ref.split("/").pop()??""];if(d===void 0)return;e=d}return{...e,content:e.content?E(i.components??{})(e.content):void 0,headers:e.headers?Object.fromEntries(Object.entries(e.headers).filter(([d,u])=>u!==void 0).map(([d,u])=>[d,(()=>{var v,p;if(n.isReference(u)===!1)return g(i.components??{})({...u,in:"header"});const s=u.$ref.startsWith("#/components/headers/")?(p=(v=i.components)==null?void 0:v.headers)==null?void 0:p[u.$ref.split("/").pop()??""]:void 0;return s!==void 0?g(i.components??{})({...s,in:"header"}):void 0})()]).filter(([d,u])=>u!==void 0)):void 0}},E=i=>e=>Object.fromEntries(Object.entries(e).filter(([r,o])=>o!==void 0).map(([r,o])=>[r,{...o,schema:o.schema?l(i)(o.schema):void 0,examples:o.examples?Object.fromEntries(Object.entries(o.examples).map(([d,u])=>{var s;return[d,n.isReference(u)?(s=i.examples)==null?void 0:s[u.$ref.split("/").pop()??""]:u]}).filter(([d,u])=>u!==void 0)):void 0}])),w=i=>({schemas:Object.fromEntries(Object.entries(i.schemas??{}).filter(([e,r])=>r!==void 0).map(([e,r])=>[e,l(i)(r)])),securitySchemes:i.securitySchemes}),l=i=>e=>{const r=[],o={title:e.title,description:e.description,...Object.fromEntries(Object.entries(e).filter(([s,v])=>s.startsWith("x-")&&v!==void 0))},d={value:!1,default:void 0},u=s=>{var v,p,j,N,z,M,U;if(s.nullable===!0&&(d.value||(d.value=!0),s.default===null&&(d.default=null)),Array.isArray(s.enum)&&((v=s.enum)!=null&&v.length)&&((p=s.enum)!=null&&p.some(c=>c===null))&&(d.value||(d.value=!0)),n.isMixed(s)){s.const!==void 0&&u({...s,type:void 0,oneOf:void 0,anyOf:void 0,allOf:void 0,$ref:void 0}),s.oneOf!==void 0&&u({...s,type:void 0,anyOf:void 0,allOf:void 0,$ref:void 0}),s.anyOf!==void 0&&u({...s,type:void 0,oneOf:void 0,allOf:void 0,$ref:void 0}),s.allOf!==void 0&&u({...s,type:void 0,oneOf:void 0,anyOf:void 0,$ref:void 0});for(const c of s.type)u(c==="boolean"||c==="number"||c==="string"?{...s,enum:(j=s.enum)!=null&&j.length&&s.enum.filter(y=>y!==null)?s.enum.filter(y=>typeof y===c):void 0,type:c}:c==="integer"?{...s,enum:(N=s.enum)!=null&&N.length&&s.enum.filter(y=>y!==null)?s.enum.filter(y=>y!==null&&typeof y=="number"&&Number.isInteger(y)):void 0,type:c}:{...s,type:c})}else if(n.isOneOf(s))s.oneOf.forEach(u);else if(n.isAnyOf(s))s.anyOf.forEach(u);else if(n.isAllOf(s))s.allOf.length===1?u(s.allOf[0]):r.push(f(i)(s));else if(n.isBoolean(s))if((z=s.enum)!=null&&z.length&&s.enum.filter(c=>c!==null).length)for(const c of s.enum.filter(y=>y!==null))r.push({const:c,...s,type:void 0,enum:void 0,default:void 0});else r.push({...s,default:s.default??void 0,enum:void 0});else if(n.isInteger(s)||n.isNumber(s))if((M=s.enum)!=null&&M.length&&s.enum.filter(c=>c!==null))for(const c of s.enum.filter(y=>y!==null))r.push({const:c,...s,type:void 0,enum:void 0,default:void 0,minimum:void 0,maximum:void 0,exclusiveMinimum:void 0,exclusiveMaximum:void 0,multipleOf:void 0});else r.push({...s,default:s.default??void 0,enum:void 0,...typeof s.exclusiveMinimum=="number"?{minimum:s.exclusiveMinimum,exclusiveMinimum:!0}:{exclusiveMinimum:s.exclusiveMinimum},...typeof s.exclusiveMaximum=="number"?{maximum:s.exclusiveMaximum,exclusiveMaximum:!0}:{exclusiveMaximum:s.exclusiveMaximum}});else if(n.isString(s))if((U=s.enum)!=null&&U.length&&s.enum.filter(c=>c!==null).length)for(const c of s.enum.filter(y=>y!==null))r.push({const:c,...s,type:void 0,enum:void 0,default:void 0});else r.push({...s,default:s.default??void 0,enum:void 0});else n.isArray(s)?Array.isArray(s.items)?r.push({...s,items:void 0,prefixItems:s.items.map(l(i)),additionalItems:typeof s.additionalItems=="object"&&s.additionalItems!==null?l(i)(s.additionalItems):s.additionalItems}):Array.isArray(s.prefixItems)?r.push({...s,items:void 0,prefixItems:s.prefixItems.map(l(i)),additionalItems:typeof s.additionalItems=="object"&&s.additionalItems!==null?l(i)(s.additionalItems):s.additionalItems}):s.items===void 0?r.push({...s,items:void 0,prefixItems:[]}):r.push({...s,items:l(i)(s.items),prefixItems:void 0,additionalItems:void 0}):n.isObject(s)?r.push({...s,properties:s.properties?Object.fromEntries(Object.entries(s.properties).filter(([c,y])=>y!==void 0).map(([c,y])=>[c,l(i)(y)])):{},additionalProperties:s.additionalProperties?typeof s.additionalProperties=="object"&&s.additionalProperties!==null?l(i)(s.additionalProperties):s.additionalProperties:void 0,required:s.required??[]}):n.isRecursiveReference(s)?r.push({...s,$ref:s.$recursiveRef,$recursiveRef:void 0}):r.push(s)};return u(e),d.value===!0&&!r.some(s=>s.type==="null")&&r.push({type:"null",default:d.default}),{...r.length===0?{type:void 0}:r.length===1?{...r[0]}:{oneOf:r.map(s=>({...s,nullable:void 0}))},...o,nullable:void 0}},f=i=>e=>{const r=e.allOf.map(o=>t(i)(o));return r.some(o=>o===null)?{type:void 0,allOf:void 0}:{...e,type:"object",properties:Object.fromEntries(r.map(o=>Object.entries((o==null?void 0:o.properties)??{})).flat().map(([o,d])=>[o,l(i)(d)])),allOf:void 0,required:[...new Set(r.map(o=>(o==null?void 0:o.required)??[]).flat())]}},t=i=>(e,r=new Set)=>{var o,d;return n.isObject(e)?e.properties!==void 0&&!e.additionalProperties?e:null:r.has(e)?null:(r.add(e),n.isReference(e)?t(i)(((o=i.schemas)==null?void 0:o[e.$ref.split("/").pop()??""])??{},r):n.isRecursiveReference(e)?t(i)(((d=i.schemas)==null?void 0:d[e.$recursiveRef.split("/").pop()??""])??{},r):null)};let n;(function(i){i.isConstant=e=>e.const!==void 0,i.isBoolean=e=>e.type==="boolean",i.isInteger=e=>e.type==="integer",i.isNumber=e=>e.type==="number",i.isString=e=>e.type==="string",i.isArray=e=>e.type==="array",i.isObject=e=>e.type==="object",i.isReference=e=>e.$ref!==void 0,i.isRecursiveReference=e=>e.$recursiveRef!==void 0,i.isAllOf=e=>e.allOf!==void 0,i.isAnyOf=e=>e.anyOf!==void 0,i.isOneOf=e=>e.oneOf!==void 0,i.isNullOnly=e=>e.type==="null",i.isMixed=e=>Array.isArray(e.type)})(n||(n={}))})(q||(q={}));var P;(function(a){a.downgrade=l=>{var t,n,i;const f=a.downgradeComponents(l.components);return{swagger:"2.0",info:l.info,host:(n=(t=l.servers)==null?void 0:t[0])!=null&&n.url?l.servers[0].url.split("://").pop():"",definitions:f.downgraded,securityDefinitions:(i=l.components)!=null&&i.securitySchemes?Object.fromEntries(Object.entries(l.components.securitySchemes).filter(([e,r])=>r!==void 0).map(([e,r])=>E(r).map(o=>[e,o])).flat()):void 0,paths:l.paths?Object.fromEntries(Object.entries(l.paths).filter(([e,r])=>r!==void 0).map(([e,r])=>[e,m(f)(r)])):void 0,security:l.security,tags:l.tags}};const m=l=>f=>({...f,...f.get?{get:O(l)(f.get)}:void 0,...f.put?{put:O(l)(f.put)}:void 0,...f.post?{post:O(l)(f.post)}:void 0,...f.delete?{delete:O(l)(f.delete)}:void 0,...f.options?{options:O(l)(f.options)}:void 0,...f.head?{head:O(l)(f.head)}:void 0,...f.patch?{patch:O(l)(f.patch)}:void 0,...f.trace?{trace:O(l)(f.trace)}:void 0}),O=l=>f=>({...f,parameters:f.parameters!==void 0||f.requestBody!==void 0?[...(f.parameters??[]).map(b(l)),...f.requestBody?[g(l)(f.requestBody)]:[]]:void 0,responses:f.responses?Object.fromEntries(Object.entries(f.responses).filter(([t,n])=>n!==void 0).map(([t,n])=>[t,$(l)(n)])):void 0,requestBody:void 0,servers:void 0}),b=l=>(f,t)=>{var n;return{...a.downgradeSchema(l)(f.schema),...f,required:(n=f.schema)==null?void 0:n.required,schema:void 0,name:f.name??`p${t}`,example:void 0,examples:void 0}},g=l=>f=>{var t;return{name:"body",in:"body",description:f.description,required:f.required,schema:a.downgradeSchema(l)(((t=Object.values(f.content??{})[0])==null?void 0:t.schema)??{})}},$=l=>f=>{var t;return{description:f.description,schema:a.downgradeSchema(l)(((t=Object.values(f.content??{})[0])==null?void 0:t.schema)??{}),headers:f.headers?Object.fromEntries(Object.entries(f.headers).filter(([n,i])=>i!==void 0).map(([n,i])=>[n,{...i,schema:a.downgradeSchema(l)(i.schema),example:void 0,examples:void 0}])):void 0}};a.downgradeComponents=l=>{const f={original:l,downgraded:{}};if(l.schemas){f.downgraded.schemas={};for(const[t,n]of Object.entries(l.schemas))n!==void 0&&(f.downgraded[t.split("/").pop()]=a.downgradeSchema(f)(n))}return f},a.downgradeSchema=l=>f=>{const t=w(new Set)(l.original)(f),n=[],i={title:f.title,description:f.description,example:f.example,examples:f.examples?Object.values(f.examples):void 0,...Object.fromEntries(Object.entries(f).filter(([r,o])=>r.startsWith("x-")&&o!==void 0))},e=r=>{x.isBoolean(r)?n.push({type:"boolean"}):x.isBoolean(r)||x.isInteger(r)||x.isNumber(r)||x.isString(r)?n.push({...r,examples:r.examples?Object.values(r.examples):void 0}):x.isReference(r)?n.push({$ref:`#/definitions/${r.$ref.split("/").pop()}`}):x.isArray(r)?n.push({...r,items:a.downgradeSchema(l)(r.items),examples:r.examples?Object.values(r.examples):void 0}):x.isTuple(r)?n.push({...r,items:(()=>{if(r.additionalItems===!0)return{};const o=[...r.prefixItems,...typeof r.additionalItems=="object"?[a.downgradeSchema(l)(r.additionalItems)]:[]];return o.length===0?{}:{"x-oneOf":o.map(a.downgradeSchema(l))}})(),minItems:r.prefixItems.length,maxItems:r.additionalItems?void 0:r.prefixItems.length,prefixItems:void 0,additionalItems:void 0,examples:r.examples?Object.values(r.examples):void 0}):x.isObject(r)?n.push({...r,properties:r.properties?Object.fromEntries(Object.entries(r.properties).filter(([o,d])=>d!==void 0).map(([o,d])=>[o,a.downgradeSchema(l)(d)])):void 0,additionalProperties:typeof r.additionalProperties=="object"?a.downgradeSchema(l)(r.additionalProperties):r.additionalProperties,required:r.required,examples:r.examples?Object.values(r.examples):void 0}):x.isOneOf(r)&&r.oneOf.forEach(e)};if(e(f),t)for(const r of n)x.isReference(r)?R(new Set)(l)(r):r["x-nullable"]=!0;return t===!0&&n.length===0?{type:"null",...i}:{...n.length===0?{type:void 0}:n.length===1?{...n[0]}:{"x-oneOf":n},...i,...n.length>1?{discriminator:void 0}:{}}};const R=l=>f=>t=>{var e;const n=t.$ref.split("/").pop();if(n.endsWith(".Nullable"))return;const i=(e=f.original.schemas)==null?void 0:e[n];if(i!==void 0){{if(w(l)(f.original)(i)===!0)return;f.downgraded[`${n}.Nullable`]===void 0&&(f.downgraded[`${n}.Nullable`]={},f.downgraded[`${n}.Nullable`]=a.downgradeSchema(f)(x.isOneOf(i)?{...i,oneOf:[...i.oneOf,{type:"null"}]}:{title:i.title,description:i.description,example:i.example,examples:i.examples?Object.values(i.examples):void 0,...Object.fromEntries(Object.entries(i).filter(([r,o])=>r.startsWith("x-")&&o!==void 0)),oneOf:[i,{type:"null"}]}))}t.$ref+=".Nullable"}},E=l=>{if(l.type==="apiKey")return[l];if(l.type==="http")return l.scheme==="basic"?[{type:"basic",description:l.description}]:[];if(l.type==="oauth2"){const f=[];return l.flows.implicit&&f.push({type:"oauth2",flow:"implicit",authorizationUrl:l.flows.implicit.authorizationUrl,scopes:l.flows.implicit.scopes}),l.flows.password&&f.push({type:"oauth2",flow:"password",tokenUrl:l.flows.password.tokenUrl,scopes:l.flows.password.scopes}),l.flows.clientCredentials&&f.push({type:"oauth2",flow:"application",tokenUrl:l.flows.clientCredentials.tokenUrl,scopes:l.flows.clientCredentials.scopes}),l.flows.authorizationCode&&f.push({type:"oauth2",flow:"accessCode",authorizationUrl:l.flows.authorizationCode.authorizationUrl,tokenUrl:l.flows.authorizationCode.tokenUrl,scopes:l.flows.authorizationCode.scopes}),f}return[]},w=l=>f=>t=>{var n;if(x.isNull(t))return!0;if(x.isReference(t)){if(l.has(t.$ref))return!1;l.add(t.$ref);const i=t.$ref.split("/").pop(),e=(n=f.schemas)==null?void 0:n[i];return e?w(l)(f)(e):!1}return x.isOneOf(t)&&t.oneOf.some(w(l)(f))}})(P||(P={}));var B;(function(a){a.convert=t=>({openapi:"3.1.0",info:t.info,components:R(t),paths:t.paths?Object.fromEntries(Object.entries(t.paths).filter(([n,i])=>i!==void 0).map(([n,i])=>[n,m(t)(i)])):void 0,servers:t.host?[{url:t.host}]:void 0,security:t.security,tags:t.tags,"x-samchon-emended":!0});const m=t=>n=>({...n,...n.get?{get:O(t)(n)(n.get)}:void 0,...n.put?{put:O(t)(n)(n.put)}:void 0,...n.post?{post:O(t)(n)(n.post)}:void 0,...n.delete?{delete:O(t)(n)(n.delete)}:void 0,...n.options?{options:O(t)(n)(n.options)}:void 0,...n.head?{head:O(t)(n)(n.head)}:void 0,...n.patch?{patch:O(t)(n)(n.patch)}:void 0,...n.trace?{trace:O(t)(n)(n.trace)}:void 0}),O=t=>n=>i=>({...i,parameters:n.parameters!==void 0||i.parameters!==void 0?[...n.parameters??[],...i.parameters??[]].map(e=>{var r;return f.isReference(e)?(r=t.parameters)==null?void 0:r[e.$ref.split("/").pop()??""]:e}).filter(e=>e!==void 0&&e.in!=="body"&&e.schema===void 0).map(b(t.definitions??{})):void 0,requestBody:(()=>{var r;const e=(r=i.parameters)==null?void 0:r.find(o=>{var d;return f.isReference(o)&&(o=(d=t.parameters)==null?void 0:d[o.$ref.split("/").pop()??""]),(o==null?void 0:o.schema)!==void 0});return e?g(t.definitions??{})(e):void 0})(),responses:i.responses?Object.fromEntries(Object.entries(i.responses).filter(([e,r])=>r!==void 0).map(([e,r])=>[e,$(t)(r)]).filter(([e,r])=>r!==void 0)):void 0}),b=t=>n=>({name:n.name,in:n.in,description:n.description,schema:a.convertSchema(t)(n),required:!0}),g=t=>n=>({description:n.description,content:{"application/json":{schema:a.convertSchema(t)(n.schema)}}}),$=t=>n=>{var i;if(f.isReference(n)){const e=(i=t.responses)==null?void 0:i[n.$ref.split("/").pop()??""];if(e===void 0)return;n=e}return{description:n.description,content:n.schema?{"application/json":{schema:a.convertSchema(t.definitions??{})(n.schema),example:n.example}}:void 0,headers:n.headers?Object.fromEntries(Object.entries(n.headers).filter(([e,r])=>r!==void 0).map(([e,r])=>[e,{schema:a.convertSchema(t.definitions??{})(r),in:"header"}])):void 0}},R=t=>({schemas:Object.fromEntries(Object.entries(t.definitions??{}).filter(([n,i])=>i!==void 0).map(([n,i])=>[n,a.convertSchema(t.definitions??{})(i)])),securitySchemes:t.securityDefinitions?Object.fromEntries(Object.entries(t.securityDefinitions).filter(([n,i])=>i!==void 0).map(([n,i])=>[n,E(i)]).filter(([n,i])=>i!==void 0)):void 0}),E=t=>{if(t.type==="apiKey")return t;if(t.type==="basic")return{type:"http",scheme:"basic",description:t.description};if(t.type==="oauth2")return t.flow==="implicit"?{type:"oauth2",description:t.description,flows:{implicit:{authorizationUrl:t.authorizationUrl,scopes:t.scopes}}}:t.flow==="accessCode"?{type:"oauth2",description:t.description,flows:{authorizationCode:{authorizationUrl:t.authorizationUrl,tokenUrl:t.tokenUrl,scopes:t.scopes}}}:t.flow==="password"?{type:"oauth2",description:t.description,flows:{password:{tokenUrl:t.tokenUrl,scopes:t.scopes}}}:t.flow==="application"?{type:"oauth2",description:t.description,flows:{clientCredentials:{tokenUrl:t.tokenUrl,scopes:t.scopes}}}:void 0};a.convertSchema=t=>n=>{const i={value:!1,default:void 0},e=[],r={title:n.title,description:n.description,...Object.fromEntries(Object.entries(n).filter(([d,u])=>d.startsWith("x-")&&u!==void 0)),example:n.example,examples:n.examples?Object.fromEntries(n.examples.map((d,u)=>[u.toString(),d])):void 0},o=d=>{var u,s,v;d["x-nullable"]===!0&&(i.value||(i.value=!0),d.default===null&&(i.default=null)),Array.isArray(d.enum)&&((u=d.enum)!=null&&u.length)&&((s=d.enum)!=null&&s.some(p=>p===null))&&(i.value||(i.value=!0)),f.isAnyOf(d)?d["x-anyOf"].forEach(o):f.isOneOf(d)?d["x-oneOf"].forEach(o):f.isAllOf(d)?d.allOf.length===1?o(d.allOf[0]):e.push(w(t)(d)):f.isBoolean(d)||f.isInteger(d)||f.isNumber(d)||f.isString(d)?(v=d.enum)!=null&&v.length&&d.enum.filter(p=>p!==null).length?e.push(...d.enum.filter(p=>p!==null).map(p=>({const:p}))):e.push({...d,default:d.default??void 0,examples:d.examples?Object.fromEntries(d.examples.map((p,j)=>[j.toString(),p])):void 0,enum:void 0}):f.isArray(d)?e.push({...d,items:a.convertSchema(t)(d.items),examples:d.examples?Object.fromEntries(d.examples.map((p,j)=>[j.toString(),p])):void 0}):f.isObject(d)?e.push({...d,properties:d.properties?Object.fromEntries(Object.entries(d.properties).filter(([p,j])=>j!==void 0).map(([p,j])=>[p,a.convertSchema(t)(j)])):{},additionalProperties:d.additionalProperties?typeof d.additionalProperties=="object"&&d.additionalProperties!==null?a.convertSchema(t)(d.additionalProperties):d.additionalProperties:void 0,examples:d.examples?Object.fromEntries(d.examples.map((p,j)=>[j.toString(),p])):void 0,required:d.required??[]}):f.isReference(d)?e.push({...d,$ref:d.$ref.replace("#/definitions/","#/components/schemas/"),examples:d.examples?Object.fromEntries(d.examples.map((p,j)=>[j.toString(),p])):void 0}):e.push({...d,examples:d.examples?Object.fromEntries(d.examples.map((p,j)=>[j.toString(),p])):void 0})};if(o(n),i.value===!0&&!e.some(d=>d.type==="null")&&e.push({type:"null",default:i.default}),e.length===2&&e.filter(d=>x.isNull(d)).length===1){const d=e.filter(u=>x.isNull(u)===!1)[0];for(const u of["title","description","deprecated","example","examples"])d[u]!==void 0&&delete d[u]}return{...e.length===0?{type:void 0}:e.length===1?{...e[0]}:{oneOf:e.map(d=>({...d,"x-nullable":void 0}))},...r,"x-nullable":void 0}};const w=t=>n=>{const i=n.allOf.map(e=>l(t)(e));return i.some(e=>e===null)?{type:void 0,allOf:void 0}:{...n,type:"object",properties:Object.fromEntries(i.map(e=>Object.entries((e==null?void 0:e.properties)??{})).flat().map(([e,r])=>[e,a.convertSchema(t)(r)])),allOf:void 0,required:[...new Set(i.map(e=>(e==null?void 0:e.required)??[]).flat())]}},l=t=>(n,i=new Set)=>f.isObject(n)?n.properties!==void 0&&!n.additionalProperties?n:null:i.has(n)?null:(i.add(n),f.isReference(n)?l(t)((t==null?void 0:t[n.$ref.split("/").pop()??""])??{},i):null);let f;(function(t){t.isBoolean=n=>n.type==="boolean",t.isInteger=n=>n.type==="integer",t.isNumber=n=>n.type==="number",t.isString=n=>n.type==="string",t.isArray=n=>n.type==="array",t.isObject=n=>n.type==="object",t.isReference=n=>n.$ref!==void 0,t.isAllOf=n=>n.allOf!==void 0,t.isOneOf=n=>n["x-oneOf"]!==void 0,t.isAnyOf=n=>n["x-anyOf"]!==void 0,t.isNullOnly=n=>n.type==="null"})(f||(f={}))})(B||(B={}));var W;(function(a){function m(b){if(S.is(b))return q.convert(b);if(A.is(b))return K.convert(b);if(_.is(b))return B.convert(b);throw new TypeError("Unrecognized Swagger/OpenAPI version.")}a.convert=m;function O(b,g){if(g==="2.0")return P.downgrade(b);if(g==="3.0")return F.downgrade(b);throw new TypeError("Unrecognized Swagger/OpenAPI version.")}a.downgrade=O})(W||(W={}));export{W as O,_ as S,A as a,S as b};
1
+ import{l as x,m as K,n as F}from"./AgenticaChatApplication-BKEsRS5q.js";var A;(function(a){a.is=m=>typeof m=="object"&&m!==null&&typeof m.openapi=="string"&&m.openapi.startsWith("3.0")})(A||(A={}));var S;(function(a){a.is=m=>typeof m=="object"&&m!==null&&typeof m.openapi=="string"&&m.openapi.startsWith("3.1")})(S||(S={}));var _;(function(a){a.is=m=>typeof m=="object"&&m!==null&&typeof m.swagger=="string"&&m.swagger.startsWith("2.0")})(_||(_={}));var q;(function(a){a.convert=i=>i["x-samchon-emended"]===!0?i:{...i,components:w(i.components??{}),paths:i.paths?Object.fromEntries(Object.entries(i.paths).filter(([e,r])=>r!==void 0).map(([e,r])=>[e,O(i)(r)])):void 0,webhooks:i.webhooks?Object.fromEntries(Object.entries(i.webhooks).filter(([e,r])=>r!==void 0).map(([e,r])=>[e,m(i)(r)]).filter(([e,r])=>r!==void 0)):void 0,"x-samchon-emended":!0};const m=i=>e=>{var o,d;if(!n.isReference(e))return O(i)(e);const r=(d=(o=i.components)==null?void 0:o.pathItems)==null?void 0:d[e.$ref.split("/").pop()??""];return r?O(i)(r):void 0},O=i=>e=>({...e,...e.get?{get:b(i)(e)(e.get)}:void 0,...e.put?{put:b(i)(e)(e.put)}:void 0,...e.post?{post:b(i)(e)(e.post)}:void 0,...e.delete?{delete:b(i)(e)(e.delete)}:void 0,...e.options?{options:b(i)(e)(e.options)}:void 0,...e.head?{head:b(i)(e)(e.head)}:void 0,...e.patch?{patch:b(i)(e)(e.patch)}:void 0,...e.trace?{trace:b(i)(e)(e.trace)}:void 0}),b=i=>e=>r=>({...r,parameters:e.parameters!==void 0||r.parameters!==void 0?[...e.parameters??[],...r.parameters??[]].map(o=>{var u,s,v,p;if(!n.isReference(o))return g(i.components??{})(o);const d=o.$ref.startsWith("#/components/headers/")?(s=(u=i.components)==null?void 0:u.headers)==null?void 0:s[o.$ref.split("/").pop()??""]:(p=(v=i.components)==null?void 0:v.parameters)==null?void 0:p[o.$ref.split("/").pop()??""];return d!==void 0?g(i.components??{})({...d,in:"header"}):void 0}).filter((o,d)=>d!==void 0):void 0,requestBody:r.requestBody?$(i)(r.requestBody):void 0,responses:r.responses?Object.fromEntries(Object.entries(r.responses).filter(([o,d])=>d!==void 0).map(([o,d])=>[o,R(i)(d)]).filter(([o,d])=>d!==void 0)):void 0}),g=i=>e=>({...e,schema:l(i)(e.schema),examples:e.examples?Object.fromEntries(Object.entries(e.examples).map(([r,o])=>{var d;return[r,n.isReference(o)?(d=i.examples)==null?void 0:d[o.$ref.split("/").pop()??""]:o]}).filter(([r,o])=>o!==void 0)):void 0}),$=i=>e=>{var r,o;if(n.isReference(e)){const d=(o=(r=i.components)==null?void 0:r.requestBodies)==null?void 0:o[e.$ref.split("/").pop()??""];if(d===void 0)return;e=d}return{...e,content:e.content?E(i.components??{})(e.content):void 0}},R=i=>e=>{var r,o;if(n.isReference(e)){const d=(o=(r=i.components)==null?void 0:r.responses)==null?void 0:o[e.$ref.split("/").pop()??""];if(d===void 0)return;e=d}return{...e,content:e.content?E(i.components??{})(e.content):void 0,headers:e.headers?Object.fromEntries(Object.entries(e.headers).filter(([d,u])=>u!==void 0).map(([d,u])=>[d,(()=>{var v,p;if(n.isReference(u)===!1)return g(i.components??{})({...u,in:"header"});const s=u.$ref.startsWith("#/components/headers/")?(p=(v=i.components)==null?void 0:v.headers)==null?void 0:p[u.$ref.split("/").pop()??""]:void 0;return s!==void 0?g(i.components??{})({...s,in:"header"}):void 0})()]).filter(([d,u])=>u!==void 0)):void 0}},E=i=>e=>Object.fromEntries(Object.entries(e).filter(([r,o])=>o!==void 0).map(([r,o])=>[r,{...o,schema:o.schema?l(i)(o.schema):void 0,examples:o.examples?Object.fromEntries(Object.entries(o.examples).map(([d,u])=>{var s;return[d,n.isReference(u)?(s=i.examples)==null?void 0:s[u.$ref.split("/").pop()??""]:u]}).filter(([d,u])=>u!==void 0)):void 0}])),w=i=>({schemas:Object.fromEntries(Object.entries(i.schemas??{}).filter(([e,r])=>r!==void 0).map(([e,r])=>[e,l(i)(r)])),securitySchemes:i.securitySchemes}),l=i=>e=>{const r=[],o={title:e.title,description:e.description,...Object.fromEntries(Object.entries(e).filter(([s,v])=>s.startsWith("x-")&&v!==void 0))},d={value:!1,default:void 0},u=s=>{var v,p,j,N,z,M,U;if(s.nullable===!0&&(d.value||(d.value=!0),s.default===null&&(d.default=null)),Array.isArray(s.enum)&&((v=s.enum)!=null&&v.length)&&((p=s.enum)!=null&&p.some(c=>c===null))&&(d.value||(d.value=!0)),n.isMixed(s)){s.const!==void 0&&u({...s,type:void 0,oneOf:void 0,anyOf:void 0,allOf:void 0,$ref:void 0}),s.oneOf!==void 0&&u({...s,type:void 0,anyOf:void 0,allOf:void 0,$ref:void 0}),s.anyOf!==void 0&&u({...s,type:void 0,oneOf:void 0,allOf:void 0,$ref:void 0}),s.allOf!==void 0&&u({...s,type:void 0,oneOf:void 0,anyOf:void 0,$ref:void 0});for(const c of s.type)u(c==="boolean"||c==="number"||c==="string"?{...s,enum:(j=s.enum)!=null&&j.length&&s.enum.filter(y=>y!==null)?s.enum.filter(y=>typeof y===c):void 0,type:c}:c==="integer"?{...s,enum:(N=s.enum)!=null&&N.length&&s.enum.filter(y=>y!==null)?s.enum.filter(y=>y!==null&&typeof y=="number"&&Number.isInteger(y)):void 0,type:c}:{...s,type:c})}else if(n.isOneOf(s))s.oneOf.forEach(u);else if(n.isAnyOf(s))s.anyOf.forEach(u);else if(n.isAllOf(s))s.allOf.length===1?u(s.allOf[0]):r.push(f(i)(s));else if(n.isBoolean(s))if((z=s.enum)!=null&&z.length&&s.enum.filter(c=>c!==null).length)for(const c of s.enum.filter(y=>y!==null))r.push({const:c,...s,type:void 0,enum:void 0,default:void 0});else r.push({...s,default:s.default??void 0,enum:void 0});else if(n.isInteger(s)||n.isNumber(s))if((M=s.enum)!=null&&M.length&&s.enum.filter(c=>c!==null))for(const c of s.enum.filter(y=>y!==null))r.push({const:c,...s,type:void 0,enum:void 0,default:void 0,minimum:void 0,maximum:void 0,exclusiveMinimum:void 0,exclusiveMaximum:void 0,multipleOf:void 0});else r.push({...s,default:s.default??void 0,enum:void 0,...typeof s.exclusiveMinimum=="number"?{minimum:s.exclusiveMinimum,exclusiveMinimum:!0}:{exclusiveMinimum:s.exclusiveMinimum},...typeof s.exclusiveMaximum=="number"?{maximum:s.exclusiveMaximum,exclusiveMaximum:!0}:{exclusiveMaximum:s.exclusiveMaximum}});else if(n.isString(s))if((U=s.enum)!=null&&U.length&&s.enum.filter(c=>c!==null).length)for(const c of s.enum.filter(y=>y!==null))r.push({const:c,...s,type:void 0,enum:void 0,default:void 0});else r.push({...s,default:s.default??void 0,enum:void 0});else n.isArray(s)?Array.isArray(s.items)?r.push({...s,items:void 0,prefixItems:s.items.map(l(i)),additionalItems:typeof s.additionalItems=="object"&&s.additionalItems!==null?l(i)(s.additionalItems):s.additionalItems}):Array.isArray(s.prefixItems)?r.push({...s,items:void 0,prefixItems:s.prefixItems.map(l(i)),additionalItems:typeof s.additionalItems=="object"&&s.additionalItems!==null?l(i)(s.additionalItems):s.additionalItems}):s.items===void 0?r.push({...s,items:void 0,prefixItems:[]}):r.push({...s,items:l(i)(s.items),prefixItems:void 0,additionalItems:void 0}):n.isObject(s)?r.push({...s,properties:s.properties?Object.fromEntries(Object.entries(s.properties).filter(([c,y])=>y!==void 0).map(([c,y])=>[c,l(i)(y)])):{},additionalProperties:s.additionalProperties?typeof s.additionalProperties=="object"&&s.additionalProperties!==null?l(i)(s.additionalProperties):s.additionalProperties:void 0,required:s.required??[]}):n.isRecursiveReference(s)?r.push({...s,$ref:s.$recursiveRef,$recursiveRef:void 0}):r.push(s)};return u(e),d.value===!0&&!r.some(s=>s.type==="null")&&r.push({type:"null",default:d.default}),{...r.length===0?{type:void 0}:r.length===1?{...r[0]}:{oneOf:r.map(s=>({...s,nullable:void 0}))},...o,nullable:void 0}},f=i=>e=>{const r=e.allOf.map(o=>t(i)(o));return r.some(o=>o===null)?{type:void 0,allOf:void 0}:{...e,type:"object",properties:Object.fromEntries(r.map(o=>Object.entries((o==null?void 0:o.properties)??{})).flat().map(([o,d])=>[o,l(i)(d)])),allOf:void 0,required:[...new Set(r.map(o=>(o==null?void 0:o.required)??[]).flat())]}},t=i=>(e,r=new Set)=>{var o,d;return n.isObject(e)?e.properties!==void 0&&!e.additionalProperties?e:null:r.has(e)?null:(r.add(e),n.isReference(e)?t(i)(((o=i.schemas)==null?void 0:o[e.$ref.split("/").pop()??""])??{},r):n.isRecursiveReference(e)?t(i)(((d=i.schemas)==null?void 0:d[e.$recursiveRef.split("/").pop()??""])??{},r):null)};let n;(function(i){i.isConstant=e=>e.const!==void 0,i.isBoolean=e=>e.type==="boolean",i.isInteger=e=>e.type==="integer",i.isNumber=e=>e.type==="number",i.isString=e=>e.type==="string",i.isArray=e=>e.type==="array",i.isObject=e=>e.type==="object",i.isReference=e=>e.$ref!==void 0,i.isRecursiveReference=e=>e.$recursiveRef!==void 0,i.isAllOf=e=>e.allOf!==void 0,i.isAnyOf=e=>e.anyOf!==void 0,i.isOneOf=e=>e.oneOf!==void 0,i.isNullOnly=e=>e.type==="null",i.isMixed=e=>Array.isArray(e.type)})(n||(n={}))})(q||(q={}));var P;(function(a){a.downgrade=l=>{var t,n,i;const f=a.downgradeComponents(l.components);return{swagger:"2.0",info:l.info,host:(n=(t=l.servers)==null?void 0:t[0])!=null&&n.url?l.servers[0].url.split("://").pop():"",definitions:f.downgraded,securityDefinitions:(i=l.components)!=null&&i.securitySchemes?Object.fromEntries(Object.entries(l.components.securitySchemes).filter(([e,r])=>r!==void 0).map(([e,r])=>E(r).map(o=>[e,o])).flat()):void 0,paths:l.paths?Object.fromEntries(Object.entries(l.paths).filter(([e,r])=>r!==void 0).map(([e,r])=>[e,m(f)(r)])):void 0,security:l.security,tags:l.tags}};const m=l=>f=>({...f,...f.get?{get:O(l)(f.get)}:void 0,...f.put?{put:O(l)(f.put)}:void 0,...f.post?{post:O(l)(f.post)}:void 0,...f.delete?{delete:O(l)(f.delete)}:void 0,...f.options?{options:O(l)(f.options)}:void 0,...f.head?{head:O(l)(f.head)}:void 0,...f.patch?{patch:O(l)(f.patch)}:void 0,...f.trace?{trace:O(l)(f.trace)}:void 0}),O=l=>f=>({...f,parameters:f.parameters!==void 0||f.requestBody!==void 0?[...(f.parameters??[]).map(b(l)),...f.requestBody?[g(l)(f.requestBody)]:[]]:void 0,responses:f.responses?Object.fromEntries(Object.entries(f.responses).filter(([t,n])=>n!==void 0).map(([t,n])=>[t,$(l)(n)])):void 0,requestBody:void 0,servers:void 0}),b=l=>(f,t)=>{var n;return{...a.downgradeSchema(l)(f.schema),...f,required:(n=f.schema)==null?void 0:n.required,schema:void 0,name:f.name??`p${t}`,example:void 0,examples:void 0}},g=l=>f=>{var t;return{name:"body",in:"body",description:f.description,required:f.required,schema:a.downgradeSchema(l)(((t=Object.values(f.content??{})[0])==null?void 0:t.schema)??{})}},$=l=>f=>{var t;return{description:f.description,schema:a.downgradeSchema(l)(((t=Object.values(f.content??{})[0])==null?void 0:t.schema)??{}),headers:f.headers?Object.fromEntries(Object.entries(f.headers).filter(([n,i])=>i!==void 0).map(([n,i])=>[n,{...i,schema:a.downgradeSchema(l)(i.schema),example:void 0,examples:void 0}])):void 0}};a.downgradeComponents=l=>{const f={original:l,downgraded:{}};if(l.schemas){f.downgraded.schemas={};for(const[t,n]of Object.entries(l.schemas))n!==void 0&&(f.downgraded[t.split("/").pop()]=a.downgradeSchema(f)(n))}return f},a.downgradeSchema=l=>f=>{const t=w(new Set)(l.original)(f),n=[],i={title:f.title,description:f.description,example:f.example,examples:f.examples?Object.values(f.examples):void 0,...Object.fromEntries(Object.entries(f).filter(([r,o])=>r.startsWith("x-")&&o!==void 0))},e=r=>{x.isBoolean(r)?n.push({type:"boolean"}):x.isBoolean(r)||x.isInteger(r)||x.isNumber(r)||x.isString(r)?n.push({...r,examples:r.examples?Object.values(r.examples):void 0}):x.isReference(r)?n.push({$ref:`#/definitions/${r.$ref.split("/").pop()}`}):x.isArray(r)?n.push({...r,items:a.downgradeSchema(l)(r.items),examples:r.examples?Object.values(r.examples):void 0}):x.isTuple(r)?n.push({...r,items:(()=>{if(r.additionalItems===!0)return{};const o=[...r.prefixItems,...typeof r.additionalItems=="object"?[a.downgradeSchema(l)(r.additionalItems)]:[]];return o.length===0?{}:{"x-oneOf":o.map(a.downgradeSchema(l))}})(),minItems:r.prefixItems.length,maxItems:r.additionalItems?void 0:r.prefixItems.length,prefixItems:void 0,additionalItems:void 0,examples:r.examples?Object.values(r.examples):void 0}):x.isObject(r)?n.push({...r,properties:r.properties?Object.fromEntries(Object.entries(r.properties).filter(([o,d])=>d!==void 0).map(([o,d])=>[o,a.downgradeSchema(l)(d)])):void 0,additionalProperties:typeof r.additionalProperties=="object"?a.downgradeSchema(l)(r.additionalProperties):r.additionalProperties,required:r.required,examples:r.examples?Object.values(r.examples):void 0}):x.isOneOf(r)&&r.oneOf.forEach(e)};if(e(f),t)for(const r of n)x.isReference(r)?R(new Set)(l)(r):r["x-nullable"]=!0;return t===!0&&n.length===0?{type:"null",...i}:{...n.length===0?{type:void 0}:n.length===1?{...n[0]}:{"x-oneOf":n},...i,...n.length>1?{discriminator:void 0}:{}}};const R=l=>f=>t=>{var e;const n=t.$ref.split("/").pop();if(n.endsWith(".Nullable"))return;const i=(e=f.original.schemas)==null?void 0:e[n];if(i!==void 0){{if(w(l)(f.original)(i)===!0)return;f.downgraded[`${n}.Nullable`]===void 0&&(f.downgraded[`${n}.Nullable`]={},f.downgraded[`${n}.Nullable`]=a.downgradeSchema(f)(x.isOneOf(i)?{...i,oneOf:[...i.oneOf,{type:"null"}]}:{title:i.title,description:i.description,example:i.example,examples:i.examples?Object.values(i.examples):void 0,...Object.fromEntries(Object.entries(i).filter(([r,o])=>r.startsWith("x-")&&o!==void 0)),oneOf:[i,{type:"null"}]}))}t.$ref+=".Nullable"}},E=l=>{if(l.type==="apiKey")return[l];if(l.type==="http")return l.scheme==="basic"?[{type:"basic",description:l.description}]:[];if(l.type==="oauth2"){const f=[];return l.flows.implicit&&f.push({type:"oauth2",flow:"implicit",authorizationUrl:l.flows.implicit.authorizationUrl,scopes:l.flows.implicit.scopes}),l.flows.password&&f.push({type:"oauth2",flow:"password",tokenUrl:l.flows.password.tokenUrl,scopes:l.flows.password.scopes}),l.flows.clientCredentials&&f.push({type:"oauth2",flow:"application",tokenUrl:l.flows.clientCredentials.tokenUrl,scopes:l.flows.clientCredentials.scopes}),l.flows.authorizationCode&&f.push({type:"oauth2",flow:"accessCode",authorizationUrl:l.flows.authorizationCode.authorizationUrl,tokenUrl:l.flows.authorizationCode.tokenUrl,scopes:l.flows.authorizationCode.scopes}),f}return[]},w=l=>f=>t=>{var n;if(x.isNull(t))return!0;if(x.isReference(t)){if(l.has(t.$ref))return!1;l.add(t.$ref);const i=t.$ref.split("/").pop(),e=(n=f.schemas)==null?void 0:n[i];return e?w(l)(f)(e):!1}return x.isOneOf(t)&&t.oneOf.some(w(l)(f))}})(P||(P={}));var B;(function(a){a.convert=t=>({openapi:"3.1.0",info:t.info,components:R(t),paths:t.paths?Object.fromEntries(Object.entries(t.paths).filter(([n,i])=>i!==void 0).map(([n,i])=>[n,m(t)(i)])):void 0,servers:t.host?[{url:t.host}]:void 0,security:t.security,tags:t.tags,"x-samchon-emended":!0});const m=t=>n=>({...n,...n.get?{get:O(t)(n)(n.get)}:void 0,...n.put?{put:O(t)(n)(n.put)}:void 0,...n.post?{post:O(t)(n)(n.post)}:void 0,...n.delete?{delete:O(t)(n)(n.delete)}:void 0,...n.options?{options:O(t)(n)(n.options)}:void 0,...n.head?{head:O(t)(n)(n.head)}:void 0,...n.patch?{patch:O(t)(n)(n.patch)}:void 0,...n.trace?{trace:O(t)(n)(n.trace)}:void 0}),O=t=>n=>i=>({...i,parameters:n.parameters!==void 0||i.parameters!==void 0?[...n.parameters??[],...i.parameters??[]].map(e=>{var r;return f.isReference(e)?(r=t.parameters)==null?void 0:r[e.$ref.split("/").pop()??""]:e}).filter(e=>e!==void 0&&e.in!=="body"&&e.schema===void 0).map(b(t.definitions??{})):void 0,requestBody:(()=>{var r;const e=(r=i.parameters)==null?void 0:r.find(o=>{var d;return f.isReference(o)&&(o=(d=t.parameters)==null?void 0:d[o.$ref.split("/").pop()??""]),(o==null?void 0:o.schema)!==void 0});return e?g(t.definitions??{})(e):void 0})(),responses:i.responses?Object.fromEntries(Object.entries(i.responses).filter(([e,r])=>r!==void 0).map(([e,r])=>[e,$(t)(r)]).filter(([e,r])=>r!==void 0)):void 0}),b=t=>n=>({name:n.name,in:n.in,description:n.description,schema:a.convertSchema(t)(n),required:!0}),g=t=>n=>({description:n.description,content:{"application/json":{schema:a.convertSchema(t)(n.schema)}}}),$=t=>n=>{var i;if(f.isReference(n)){const e=(i=t.responses)==null?void 0:i[n.$ref.split("/").pop()??""];if(e===void 0)return;n=e}return{description:n.description,content:n.schema?{"application/json":{schema:a.convertSchema(t.definitions??{})(n.schema),example:n.example}}:void 0,headers:n.headers?Object.fromEntries(Object.entries(n.headers).filter(([e,r])=>r!==void 0).map(([e,r])=>[e,{schema:a.convertSchema(t.definitions??{})(r),in:"header"}])):void 0}},R=t=>({schemas:Object.fromEntries(Object.entries(t.definitions??{}).filter(([n,i])=>i!==void 0).map(([n,i])=>[n,a.convertSchema(t.definitions??{})(i)])),securitySchemes:t.securityDefinitions?Object.fromEntries(Object.entries(t.securityDefinitions).filter(([n,i])=>i!==void 0).map(([n,i])=>[n,E(i)]).filter(([n,i])=>i!==void 0)):void 0}),E=t=>{if(t.type==="apiKey")return t;if(t.type==="basic")return{type:"http",scheme:"basic",description:t.description};if(t.type==="oauth2")return t.flow==="implicit"?{type:"oauth2",description:t.description,flows:{implicit:{authorizationUrl:t.authorizationUrl,scopes:t.scopes}}}:t.flow==="accessCode"?{type:"oauth2",description:t.description,flows:{authorizationCode:{authorizationUrl:t.authorizationUrl,tokenUrl:t.tokenUrl,scopes:t.scopes}}}:t.flow==="password"?{type:"oauth2",description:t.description,flows:{password:{tokenUrl:t.tokenUrl,scopes:t.scopes}}}:t.flow==="application"?{type:"oauth2",description:t.description,flows:{clientCredentials:{tokenUrl:t.tokenUrl,scopes:t.scopes}}}:void 0};a.convertSchema=t=>n=>{const i={value:!1,default:void 0},e=[],r={title:n.title,description:n.description,...Object.fromEntries(Object.entries(n).filter(([d,u])=>d.startsWith("x-")&&u!==void 0)),example:n.example,examples:n.examples?Object.fromEntries(n.examples.map((d,u)=>[u.toString(),d])):void 0},o=d=>{var u,s,v;d["x-nullable"]===!0&&(i.value||(i.value=!0),d.default===null&&(i.default=null)),Array.isArray(d.enum)&&((u=d.enum)!=null&&u.length)&&((s=d.enum)!=null&&s.some(p=>p===null))&&(i.value||(i.value=!0)),f.isAnyOf(d)?d["x-anyOf"].forEach(o):f.isOneOf(d)?d["x-oneOf"].forEach(o):f.isAllOf(d)?d.allOf.length===1?o(d.allOf[0]):e.push(w(t)(d)):f.isBoolean(d)||f.isInteger(d)||f.isNumber(d)||f.isString(d)?(v=d.enum)!=null&&v.length&&d.enum.filter(p=>p!==null).length?e.push(...d.enum.filter(p=>p!==null).map(p=>({const:p}))):e.push({...d,default:d.default??void 0,examples:d.examples?Object.fromEntries(d.examples.map((p,j)=>[j.toString(),p])):void 0,enum:void 0}):f.isArray(d)?e.push({...d,items:a.convertSchema(t)(d.items),examples:d.examples?Object.fromEntries(d.examples.map((p,j)=>[j.toString(),p])):void 0}):f.isObject(d)?e.push({...d,properties:d.properties?Object.fromEntries(Object.entries(d.properties).filter(([p,j])=>j!==void 0).map(([p,j])=>[p,a.convertSchema(t)(j)])):{},additionalProperties:d.additionalProperties?typeof d.additionalProperties=="object"&&d.additionalProperties!==null?a.convertSchema(t)(d.additionalProperties):d.additionalProperties:void 0,examples:d.examples?Object.fromEntries(d.examples.map((p,j)=>[j.toString(),p])):void 0,required:d.required??[]}):f.isReference(d)?e.push({...d,$ref:d.$ref.replace("#/definitions/","#/components/schemas/"),examples:d.examples?Object.fromEntries(d.examples.map((p,j)=>[j.toString(),p])):void 0}):e.push({...d,examples:d.examples?Object.fromEntries(d.examples.map((p,j)=>[j.toString(),p])):void 0})};if(o(n),i.value===!0&&!e.some(d=>d.type==="null")&&e.push({type:"null",default:i.default}),e.length===2&&e.filter(d=>x.isNull(d)).length===1){const d=e.filter(u=>x.isNull(u)===!1)[0];for(const u of["title","description","deprecated","example","examples"])d[u]!==void 0&&delete d[u]}return{...e.length===0?{type:void 0}:e.length===1?{...e[0]}:{oneOf:e.map(d=>({...d,"x-nullable":void 0}))},...r,"x-nullable":void 0}};const w=t=>n=>{const i=n.allOf.map(e=>l(t)(e));return i.some(e=>e===null)?{type:void 0,allOf:void 0}:{...n,type:"object",properties:Object.fromEntries(i.map(e=>Object.entries((e==null?void 0:e.properties)??{})).flat().map(([e,r])=>[e,a.convertSchema(t)(r)])),allOf:void 0,required:[...new Set(i.map(e=>(e==null?void 0:e.required)??[]).flat())]}},l=t=>(n,i=new Set)=>f.isObject(n)?n.properties!==void 0&&!n.additionalProperties?n:null:i.has(n)?null:(i.add(n),f.isReference(n)?l(t)((t==null?void 0:t[n.$ref.split("/").pop()??""])??{},i):null);let f;(function(t){t.isBoolean=n=>n.type==="boolean",t.isInteger=n=>n.type==="integer",t.isNumber=n=>n.type==="number",t.isString=n=>n.type==="string",t.isArray=n=>n.type==="array",t.isObject=n=>n.type==="object",t.isReference=n=>n.$ref!==void 0,t.isAllOf=n=>n.allOf!==void 0,t.isOneOf=n=>n["x-oneOf"]!==void 0,t.isAnyOf=n=>n["x-anyOf"]!==void 0,t.isNullOnly=n=>n.type==="null"})(f||(f={}))})(B||(B={}));var W;(function(a){function m(b){if(S.is(b))return q.convert(b);if(A.is(b))return K.convert(b);if(_.is(b))return B.convert(b);throw new TypeError("Unrecognized Swagger/OpenAPI version.")}a.convert=m;function O(b,g){if(g==="2.0")return P.downgrade(b);if(g==="3.0")return F.downgrade(b);throw new TypeError("Unrecognized Swagger/OpenAPI version.")}a.downgrade=O})(W||(W={}));export{W as O,_ as S,A as a,S as b};
@@ -1,4 +1,4 @@
1
- import{j as a,o as B,r as y,T as g}from"../client-BwmHWUFW.js";import{v as T,A as C,O as w,_ as v,e as R,F as S,T as I,R as _,c as x,d as j,B as P}from"../AgenticaChatApplication-BAduZMpY.js";import{a as f,_ as b}from"../_isFormatUri-YqTfGpHo.js";import{D as U}from"../Divider-D4B39gYv.js";class k{constructor(){this.articles=[]}index(){return this.articles}create(o){const l={id:T(),title:o.input.title,body:o.input.body,thumbnail:o.input.thumbnail,created_at:new Date().toISOString(),updated_at:new Date().toISOString()};return this.articles.push(l),l}update(o){const l=this.articles.find(d=>d.id===o.id);if(l===void 0)throw new Error("Unable to find the matched article.");o.input.title!==void 0&&(l.title=o.input.title),o.input.body!==void 0&&(l.body=o.input.body),o.input.thumbnail!==void 0&&(l.thumbnail=o.input.thumbnail),l.updated_at=new Date().toISOString()}erase(o){const l=this.articles.findIndex(d=>d.id===o.id);if(l===-1)throw new Error("Unable to find the matched article.");this.articles.splice(l,1)}}const F=u=>{const o=new k,l=new C({model:"chatgpt",vendor:{api:new w({apiKey:u.apiKey,dangerouslyAllowBrowser:!0}),model:u.model??"gpt-4o-mini"},controllers:[{protocol:"class",name:"bbs",application:{model:"chatgpt",options:{reference:!1,strict:!1,separate:null},functions:[{name:"index",parameters:{type:"object",properties:{},additionalProperties:!1,required:[],$defs:{}},output:{description:"List of every articles",type:"array",items:{description:"Article entity.\n\n`IBbsArticle` is an entity representing an article in the BBS (Bulletin Board System).",type:"object",properties:{id:{title:"Primary Key",description:`Primary Key.
1
+ import{j as a,o as B,r as y,T as g}from"../client-BwmHWUFW.js";import{v as T,A as C,O as w,_ as v,e as R,F as S,T as I,R as _,c as x,d as j,B as P}from"../AgenticaChatApplication-BKEsRS5q.js";import{a as f,_ as b}from"../_isFormatUri-YqTfGpHo.js";import{D as U}from"../Divider-D4B39gYv.js";class k{constructor(){this.articles=[]}index(){return this.articles}create(o){const l={id:T(),title:o.input.title,body:o.input.body,thumbnail:o.input.thumbnail,created_at:new Date().toISOString(),updated_at:new Date().toISOString()};return this.articles.push(l),l}update(o){const l=this.articles.find(d=>d.id===o.id);if(l===void 0)throw new Error("Unable to find the matched article.");o.input.title!==void 0&&(l.title=o.input.title),o.input.body!==void 0&&(l.body=o.input.body),o.input.thumbnail!==void 0&&(l.thumbnail=o.input.thumbnail),l.updated_at=new Date().toISOString()}erase(o){const l=this.articles.findIndex(d=>d.id===o.id);if(l===-1)throw new Error("Unable to find the matched article.");this.articles.splice(l,1)}}const F=u=>{const o=new k,l=new C({model:"chatgpt",vendor:{api:new w({apiKey:u.apiKey,dangerouslyAllowBrowser:!0}),model:u.model??"gpt-4o-mini"},controllers:[{protocol:"class",name:"bbs",application:{model:"chatgpt",options:{reference:!1,strict:!1,separate:null},functions:[{name:"index",parameters:{type:"object",properties:{},additionalProperties:!1,required:[],$defs:{}},output:{description:"List of every articles",type:"array",items:{description:"Article entity.\n\n`IBbsArticle` is an entity representing an article in the BBS (Bulletin Board System).",type:"object",properties:{id:{title:"Primary Key",description:`Primary Key.
2
2
 
3
3
 
4
4
  @format uuid`,type:"string"},created_at:{title:"Creation time of the article",description:`Creation time of the article.
@@ -1 +1 @@
1
- import{c as q,j as s,g as $,a as B,r as l,u as N,L as f,b as st,d as _,s as R,e as I,f as F,B as ot,h as nt,m as tt,i as V,k as at,l as K,n as Q,T as w,t as X,o as rt,R as D,p as it}from"./client-BwmHWUFW.js";import{D as Z}from"./Divider-D4B39gYv.js";const ct=q(s.jsx("path",{d:"M11 9h2V6h3V4h-3V1h-2v3H8v2h3zm-4 9c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2m10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2m-9.83-3.25.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.86-7.01L19.42 4h-.01l-1.1 2-2.76 5H8.53l-.13-.27L6.16 6l-.95-2-.94-2H1v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.13 0-.25-.11-.25-.25"}),"AddShoppingCart"),lt=q(s.jsx("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm2 16H8v-2h8zm0-4H8v-2h8zm-3-5V3.5L18.5 9z"}),"Description"),dt=q(s.jsx("path",{d:"M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-9 8H3V9h9zm0-4H3V5h9z"}),"FeaturedPlayList");function pt(t){return $("MuiListItem",t)}B("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]);function ut(t){return $("MuiListItemButton",t)}const A=B("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),mt=(t,e)=>{const{ownerState:o}=t;return[e.root,o.dense&&e.dense,o.alignItems==="flex-start"&&e.alignItemsFlexStart,o.divider&&e.divider,!o.disableGutters&&e.gutters]},yt=t=>{const{alignItems:e,classes:o,dense:n,disabled:a,disableGutters:i,divider:r,selected:c}=t,y=F({root:["root",n&&"dense",!i&&"gutters",r&&"divider",a&&"disabled",e==="flex-start"&&"alignItemsFlexStart",c&&"selected"]},ut,o);return{...o,...y}},gt=R(ot,{shouldForwardProp:t=>nt(t)||t==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:mt})(tt(({theme:t})=>({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${A.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:V(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${A.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:V(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${A.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:V(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:V(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${A.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${A.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},variants:[{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.dense,style:{paddingTop:4,paddingBottom:4}}]}))),ht=l.forwardRef(function(e,o){const n=N({props:e,name:"MuiListItemButton"}),{alignItems:a="center",autoFocus:i=!1,component:r="div",children:c,dense:d=!1,disableGutters:y=!1,divider:C=!1,focusVisibleClassName:T,selected:P=!1,className:S,...u}=n,b=l.useContext(f),m=l.useMemo(()=>({dense:d||b.dense||!1,alignItems:a,disableGutters:y}),[a,b.dense,d,y]),p=l.useRef(null);st(()=>{i&&p.current&&p.current.focus()},[i]);const g={...n,alignItems:a,dense:m.dense,disableGutters:y,divider:C,selected:P},h=yt(g),L=_(p,o);return s.jsx(f.Provider,{value:m,children:s.jsx(gt,{ref:L,href:u.href||u.to,component:(u.href||u.to)&&r==="div"?"button":r,focusVisibleClassName:I(h.focusVisible,T),ownerState:g,className:I(h.root,S),...u,classes:h,children:c})})});function vt(t){return $("MuiListItemSecondaryAction",t)}B("MuiListItemSecondaryAction",["root","disableGutters"]);const xt=t=>{const{disableGutters:e,classes:o}=t;return F({root:["root",e&&"disableGutters"]},vt,o)},ft=R("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:o}=t;return[e.root,o.disableGutters&&e.disableGutters]}})({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)",variants:[{props:({ownerState:t})=>t.disableGutters,style:{right:0}}]}),et=l.forwardRef(function(e,o){const n=N({props:e,name:"MuiListItemSecondaryAction"}),{className:a,...i}=n,r=l.useContext(f),c={...n,disableGutters:r.disableGutters},d=xt(c);return s.jsx(ft,{className:I(d.root,a),ownerState:c,ref:o,...i})});et.muiName="ListItemSecondaryAction";const bt=(t,e)=>{const{ownerState:o}=t;return[e.root,o.dense&&e.dense,o.alignItems==="flex-start"&&e.alignItemsFlexStart,o.divider&&e.divider,!o.disableGutters&&e.gutters,!o.disablePadding&&e.padding,o.hasSecondaryAction&&e.secondaryAction]},It=t=>{const{alignItems:e,classes:o,dense:n,disableGutters:a,disablePadding:i,divider:r,hasSecondaryAction:c}=t;return F({root:["root",n&&"dense",!a&&"gutters",!i&&"padding",r&&"divider",e==="flex-start"&&"alignItemsFlexStart",c&&"secondaryAction"],container:["container"]},pt,o)},Ct=R("div",{name:"MuiListItem",slot:"Root",overridesResolver:bt})(tt(({theme:t})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>!e.disablePadding&&e.dense,style:{paddingTop:4,paddingBottom:4}},{props:({ownerState:e})=>!e.disablePadding&&!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>!e.disablePadding&&!!e.secondaryAction,style:{paddingRight:48}},{props:({ownerState:e})=>!!e.secondaryAction,style:{[`& > .${A.root}`]:{paddingRight:48}}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:e})=>e.button,style:{transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}}},{props:({ownerState:e})=>e.hasSecondaryAction,style:{paddingRight:48}}]}))),St=R("li",{name:"MuiListItem",slot:"Container",overridesResolver:(t,e)=>e.container})({position:"relative"}),Lt=l.forwardRef(function(e,o){const n=N({props:e,name:"MuiListItem"}),{alignItems:a="center",children:i,className:r,component:c,components:d={},componentsProps:y={},ContainerComponent:C="li",ContainerProps:{className:T,...P}={},dense:S=!1,disableGutters:u=!1,disablePadding:b=!1,divider:m=!1,secondaryAction:p,slotProps:g={},slots:h={},...L}=n,G=l.useContext(f),v=l.useMemo(()=>({dense:S||G.dense||!1,alignItems:a,disableGutters:u}),[a,G.dense,S,u]),z=l.useRef(null),x=l.Children.toArray(i),W=x.length&&at(x[x.length-1],["ListItemSecondaryAction"]),O={...n,alignItems:a,dense:v.dense,disableGutters:u,disablePadding:b,divider:m,hasSecondaryAction:W},J=It(O),Y=_(z,o),U=h.root||d.Root||Ct,k=g.root||y.root||{},M={className:I(J.root,k.className,r),...L};let j=c||"li";return W?(j=!M.component&&!c?"div":j,C==="li"&&(j==="li"?j="div":M.component==="li"&&(M.component="div")),s.jsx(f.Provider,{value:v,children:s.jsxs(St,{as:C,className:I(J.container,T),ref:Y,ownerState:O,...P,children:[s.jsx(U,{...k,...!K(U)&&{as:j,ownerState:{...O,...k.ownerState}},...M,children:x}),x.pop()]})})):s.jsx(f.Provider,{value:v,children:s.jsxs(U,{...k,as:j,ref:Y,...!K(U)&&{ownerState:{...O,...k.ownerState}},...M,children:[x,p&&s.jsx(et,{children:p})]})})});function jt(t){return $("MuiListItemAvatar",t)}B("MuiListItemAvatar",["root","alignItemsFlexStart"]);const At=t=>{const{alignItems:e,classes:o}=t;return F({root:["root",e==="flex-start"&&"alignItemsFlexStart"]},jt,o)},wt=R("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:o}=t;return[e.root,o.alignItems==="flex-start"&&e.alignItemsFlexStart]}})({minWidth:56,flexShrink:0,variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}),Rt=l.forwardRef(function(e,o){const n=N({props:e,name:"MuiListItemAvatar"}),{className:a,...i}=n,r=l.useContext(f),c={...n,alignItems:r.alignItems},d=At(c);return s.jsx(wt,{className:I(d.root,a),ownerState:c,ref:o,...i})});function Tt(t){return $("MuiListItemText",t)}const H=B("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),Pt=t=>{const{classes:e,inset:o,primary:n,secondary:a,dense:i}=t;return F({root:["root",o&&"inset",i&&"dense",n&&a&&"multiline"],primary:["primary"],secondary:["secondary"]},Tt,e)},kt=R("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:o}=t;return[{[`& .${H.primary}`]:e.primary},{[`& .${H.secondary}`]:e.secondary},e.root,o.inset&&e.inset,o.primary&&o.secondary&&e.multiline,o.dense&&e.dense]}})({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4,[`.${X.root}:where(& .${H.primary})`]:{display:"block"},[`.${X.root}:where(& .${H.secondary})`]:{display:"block"},variants:[{props:({ownerState:t})=>t.primary&&t.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:t})=>t.inset,style:{paddingLeft:56}}]}),Mt=l.forwardRef(function(e,o){const n=N({props:e,name:"MuiListItemText"}),{children:a,className:i,disableTypography:r=!1,inset:c=!1,primary:d,primaryTypographyProps:y,secondary:C,secondaryTypographyProps:T,slots:P={},slotProps:S={},...u}=n,{dense:b}=l.useContext(f);let m=d??a,p=C;const g={...n,disableTypography:r,inset:c,primary:!!m,secondary:!!p,dense:b},h=Pt(g),L={slots:P,slotProps:{primary:y,secondary:T,...S}},[G,v]=Q("primary",{className:h.primary,elementType:w,externalForwardedProps:L,ownerState:g}),[z,x]=Q("secondary",{className:h.secondary,elementType:w,externalForwardedProps:L,ownerState:g});return m!=null&&m.type!==w&&!r&&(m=s.jsx(G,{variant:b?"body2":"body1",component:v!=null&&v.variant?void 0:"span",...v,children:m})),p!=null&&p.type!==w&&!r&&(p=s.jsx(z,{variant:"body2",color:"textSecondary",...x,children:p})),s.jsxs(kt,{className:I(h.root,i),ownerState:g,ref:o,...u,children:[m,p]})}),E=t=>s.jsx(Lt,{alignItems:"flex-start",children:s.jsxs(ht,{href:t.href,children:[s.jsx(Rt,{children:t.icon}),s.jsx(Mt,{primary:t.title,secondary:s.jsxs(D.Fragment,{children:[s.jsx(w,{component:"span",variant:"body2",sx:{color:"text.primary",display:"inline"},children:t.summary}),t.description]})})]})}),$t=()=>s.jsxs(D.Fragment,{children:[s.jsx(w,{variant:"h4",children:"Agentica Chatbot Examples"}),s.jsx("hr",{}),s.jsxs(it,{sx:{width:"100%",maxWidth:720,bgcolor:"background.paper"},children:[s.jsx(E,{href:"./playground.html",title:"Agentica Playground",summary:"Test your backend server's AI chatbot",icon:s.jsx(dt,{}),description:s.jsx("p",{children:"Upload your Swagger document file to the playground website, and start conversation with your backend server. Validate your backend server's Swagger documentation quality before developing your AI chatbot application."})}),s.jsx(Z,{variant:"inset",component:"li"}),s.jsx(E,{href:"./shopping.html",title:"Shopping AI Chatbot",summary:"AI chatbot by Swagger document",icon:s.jsx(ct,{}),description:s.jsxs(D.Fragment,{children:[s.jsx("p",{children:"Shopping AI chatbot which can search products, and take orders just by conversation texts."}),s.jsxs("p",{children:["This example project has been developed to prove a key concept of ",s.jsx("code",{children:"nestia/agent"})," that every backend servers providing Swagger documents can be conversed with the AI chatbot. You can search products, and take orders just by conversation texts."]}),s.jsx("p",{children:"If you've developed a backend server, then you can chat with the backend server just by delivering the Swagger document. If your documentation quality is enough, you can experience the new AI era. No more GUI development required. Just develop only backend server and chat with it."})]})}),s.jsx(Z,{variant:"inset",component:"li"}),s.jsx(E,{href:"./bbs.html",title:"BBS AI Chatbot",summary:"AI chatbot by TypeScript Class",icon:s.jsx(lt,{}),description:s.jsxs(D.Fragment,{children:[s.jsx("p",{children:"BBS (Bullet-in Board System) AI chatbot posting articles just by conversation texts."}),s.jsxs("p",{children:["This example project has been developed to demonstrate"," ",s.jsx("code",{children:"typia.llm.application<App, Model>()"})," function which can generate LLM (Large Language Model) function calling application schema from a TypeScript class type."]}),s.jsx("p",{children:"If you've developed a TypeScript facade class, then you can chat with the class just by taking the class type. If you've done enough documentations on the class methods and DTO (Data Transfer Object) types, you can experience the new AI era. No more GUI development required. Just develop only TypeScript class containing the business logics and chat with it."})]})})]})]});rt(window.document.getElementById("root")).render(s.jsx($t,{}));
1
+ import{c as q,j as s,g as $,a as B,r as l,u as N,L as f,b as st,d as _,s as R,e as I,f as F,B as ot,h as nt,m as tt,i as V,k as at,l as K,n as Q,T as w,t as X,o as rt,R as D,p as it}from"./client-BwmHWUFW.js";import{D as Z}from"./Divider-D4B39gYv.js";const ct=q(s.jsx("path",{d:"M11 9h2V6h3V4h-3V1h-2v3H8v2h3zm-4 9c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2m10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2m-9.83-3.25.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.86-7.01L19.42 4h-.01l-1.1 2-2.76 5H8.53l-.13-.27L6.16 6l-.95-2-.94-2H1v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.13 0-.25-.11-.25-.25"}),"AddShoppingCart"),lt=q(s.jsx("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm2 16H8v-2h8zm0-4H8v-2h8zm-3-5V3.5L18.5 9z"}),"Description"),dt=q(s.jsx("path",{d:"M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-9 8H3V9h9zm0-4H3V5h9z"}),"FeaturedPlayList");function pt(t){return $("MuiListItem",t)}B("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]);function ut(t){return $("MuiListItemButton",t)}const A=B("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),mt=(t,e)=>{const{ownerState:o}=t;return[e.root,o.dense&&e.dense,o.alignItems==="flex-start"&&e.alignItemsFlexStart,o.divider&&e.divider,!o.disableGutters&&e.gutters]},yt=t=>{const{alignItems:e,classes:o,dense:n,disabled:a,disableGutters:i,divider:r,selected:c}=t,y=F({root:["root",n&&"dense",!i&&"gutters",r&&"divider",a&&"disabled",e==="flex-start"&&"alignItemsFlexStart",c&&"selected"]},ut,o);return{...o,...y}},gt=R(ot,{shouldForwardProp:t=>nt(t)||t==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:mt})(tt(({theme:t})=>({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${A.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:V(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${A.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:V(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${A.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:V(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:V(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${A.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${A.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},variants:[{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.dense,style:{paddingTop:4,paddingBottom:4}}]}))),vt=l.forwardRef(function(e,o){const n=N({props:e,name:"MuiListItemButton"}),{alignItems:a="center",autoFocus:i=!1,component:r="div",children:c,dense:d=!1,disableGutters:y=!1,divider:C=!1,focusVisibleClassName:T,selected:P=!1,className:S,...u}=n,b=l.useContext(f),m=l.useMemo(()=>({dense:d||b.dense||!1,alignItems:a,disableGutters:y}),[a,b.dense,d,y]),p=l.useRef(null);st(()=>{i&&p.current&&p.current.focus()},[i]);const g={...n,alignItems:a,dense:m.dense,disableGutters:y,divider:C,selected:P},v=yt(g),L=_(p,o);return s.jsx(f.Provider,{value:m,children:s.jsx(gt,{ref:L,href:u.href||u.to,component:(u.href||u.to)&&r==="div"?"button":r,focusVisibleClassName:I(v.focusVisible,T),ownerState:g,className:I(v.root,S),...u,classes:v,children:c})})});function ht(t){return $("MuiListItemSecondaryAction",t)}B("MuiListItemSecondaryAction",["root","disableGutters"]);const xt=t=>{const{disableGutters:e,classes:o}=t;return F({root:["root",e&&"disableGutters"]},ht,o)},ft=R("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:o}=t;return[e.root,o.disableGutters&&e.disableGutters]}})({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)",variants:[{props:({ownerState:t})=>t.disableGutters,style:{right:0}}]}),et=l.forwardRef(function(e,o){const n=N({props:e,name:"MuiListItemSecondaryAction"}),{className:a,...i}=n,r=l.useContext(f),c={...n,disableGutters:r.disableGutters},d=xt(c);return s.jsx(ft,{className:I(d.root,a),ownerState:c,ref:o,...i})});et.muiName="ListItemSecondaryAction";const bt=(t,e)=>{const{ownerState:o}=t;return[e.root,o.dense&&e.dense,o.alignItems==="flex-start"&&e.alignItemsFlexStart,o.divider&&e.divider,!o.disableGutters&&e.gutters,!o.disablePadding&&e.padding,o.hasSecondaryAction&&e.secondaryAction]},It=t=>{const{alignItems:e,classes:o,dense:n,disableGutters:a,disablePadding:i,divider:r,hasSecondaryAction:c}=t;return F({root:["root",n&&"dense",!a&&"gutters",!i&&"padding",r&&"divider",e==="flex-start"&&"alignItemsFlexStart",c&&"secondaryAction"],container:["container"]},pt,o)},Ct=R("div",{name:"MuiListItem",slot:"Root",overridesResolver:bt})(tt(({theme:t})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>!e.disablePadding&&e.dense,style:{paddingTop:4,paddingBottom:4}},{props:({ownerState:e})=>!e.disablePadding&&!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>!e.disablePadding&&!!e.secondaryAction,style:{paddingRight:48}},{props:({ownerState:e})=>!!e.secondaryAction,style:{[`& > .${A.root}`]:{paddingRight:48}}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:e})=>e.button,style:{transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}}},{props:({ownerState:e})=>e.hasSecondaryAction,style:{paddingRight:48}}]}))),St=R("li",{name:"MuiListItem",slot:"Container",overridesResolver:(t,e)=>e.container})({position:"relative"}),Lt=l.forwardRef(function(e,o){const n=N({props:e,name:"MuiListItem"}),{alignItems:a="center",children:i,className:r,component:c,components:d={},componentsProps:y={},ContainerComponent:C="li",ContainerProps:{className:T,...P}={},dense:S=!1,disableGutters:u=!1,disablePadding:b=!1,divider:m=!1,secondaryAction:p,slotProps:g={},slots:v={},...L}=n,G=l.useContext(f),h=l.useMemo(()=>({dense:S||G.dense||!1,alignItems:a,disableGutters:u}),[a,G.dense,S,u]),z=l.useRef(null),x=l.Children.toArray(i),W=x.length&&at(x[x.length-1],["ListItemSecondaryAction"]),O={...n,alignItems:a,dense:h.dense,disableGutters:u,disablePadding:b,divider:m,hasSecondaryAction:W},J=It(O),Y=_(z,o),U=v.root||d.Root||Ct,k=g.root||y.root||{},M={className:I(J.root,k.className,r),...L};let j=c||"li";return W?(j=!M.component&&!c?"div":j,C==="li"&&(j==="li"?j="div":M.component==="li"&&(M.component="div")),s.jsx(f.Provider,{value:h,children:s.jsxs(St,{as:C,className:I(J.container,T),ref:Y,ownerState:O,...P,children:[s.jsx(U,{...k,...!K(U)&&{as:j,ownerState:{...O,...k.ownerState}},...M,children:x}),x.pop()]})})):s.jsx(f.Provider,{value:h,children:s.jsxs(U,{...k,as:j,ref:Y,...!K(U)&&{ownerState:{...O,...k.ownerState}},...M,children:[x,p&&s.jsx(et,{children:p})]})})});function jt(t){return $("MuiListItemAvatar",t)}B("MuiListItemAvatar",["root","alignItemsFlexStart"]);const At=t=>{const{alignItems:e,classes:o}=t;return F({root:["root",e==="flex-start"&&"alignItemsFlexStart"]},jt,o)},wt=R("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:o}=t;return[e.root,o.alignItems==="flex-start"&&e.alignItemsFlexStart]}})({minWidth:56,flexShrink:0,variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}),Rt=l.forwardRef(function(e,o){const n=N({props:e,name:"MuiListItemAvatar"}),{className:a,...i}=n,r=l.useContext(f),c={...n,alignItems:r.alignItems},d=At(c);return s.jsx(wt,{className:I(d.root,a),ownerState:c,ref:o,...i})});function Tt(t){return $("MuiListItemText",t)}const H=B("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),Pt=t=>{const{classes:e,inset:o,primary:n,secondary:a,dense:i}=t;return F({root:["root",o&&"inset",i&&"dense",n&&a&&"multiline"],primary:["primary"],secondary:["secondary"]},Tt,e)},kt=R("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:o}=t;return[{[`& .${H.primary}`]:e.primary},{[`& .${H.secondary}`]:e.secondary},e.root,o.inset&&e.inset,o.primary&&o.secondary&&e.multiline,o.dense&&e.dense]}})({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4,[`.${X.root}:where(& .${H.primary})`]:{display:"block"},[`.${X.root}:where(& .${H.secondary})`]:{display:"block"},variants:[{props:({ownerState:t})=>t.primary&&t.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:t})=>t.inset,style:{paddingLeft:56}}]}),Mt=l.forwardRef(function(e,o){const n=N({props:e,name:"MuiListItemText"}),{children:a,className:i,disableTypography:r=!1,inset:c=!1,primary:d,primaryTypographyProps:y,secondary:C,secondaryTypographyProps:T,slots:P={},slotProps:S={},...u}=n,{dense:b}=l.useContext(f);let m=d??a,p=C;const g={...n,disableTypography:r,inset:c,primary:!!m,secondary:!!p,dense:b},v=Pt(g),L={slots:P,slotProps:{primary:y,secondary:T,...S}},[G,h]=Q("primary",{className:v.primary,elementType:w,externalForwardedProps:L,ownerState:g}),[z,x]=Q("secondary",{className:v.secondary,elementType:w,externalForwardedProps:L,ownerState:g});return m!=null&&m.type!==w&&!r&&(m=s.jsx(G,{variant:b?"body2":"body1",component:h!=null&&h.variant?void 0:"span",...h,children:m})),p!=null&&p.type!==w&&!r&&(p=s.jsx(z,{variant:"body2",color:"textSecondary",...x,children:p})),s.jsxs(kt,{className:I(v.root,i),ownerState:g,ref:o,...u,children:[m,p]})}),E=t=>s.jsx(Lt,{alignItems:"flex-start",children:s.jsxs(vt,{href:t.href,children:[s.jsx(Rt,{children:t.icon}),s.jsx(Mt,{primary:t.title,secondary:s.jsxs(D.Fragment,{children:[s.jsx(w,{component:"span",variant:"body2",sx:{color:"text.primary",display:"inline"},children:t.summary}),t.description]})})]})}),$t=()=>s.jsxs(D.Fragment,{children:[s.jsx(w,{variant:"h4",children:"Agentica Chatbot Examples"}),s.jsx("hr",{}),s.jsxs(it,{sx:{width:"100%",maxWidth:720,bgcolor:"background.paper"},children:[s.jsx(E,{href:"./playground/",title:"Agentica Playground",summary:"Test your backend server's AI chatbot",icon:s.jsx(dt,{}),description:s.jsx("p",{children:"Upload your Swagger document file to the playground website, and start conversation with your backend server. Validate your backend server's Swagger documentation quality before developing your AI chatbot application."})}),s.jsx(Z,{variant:"inset",component:"li"}),s.jsx(E,{href:"./shopping/",title:"Shopping AI Chatbot",summary:"AI chatbot by Swagger document",icon:s.jsx(ct,{}),description:s.jsxs(D.Fragment,{children:[s.jsx("p",{children:"Shopping AI chatbot which can search products, and take orders just by conversation texts."}),s.jsxs("p",{children:["This example project has been developed to prove a key concept of ",s.jsx("code",{children:"nestia/agent"})," that every backend servers providing Swagger documents can be conversed with the AI chatbot. You can search products, and take orders just by conversation texts."]}),s.jsx("p",{children:"If you've developed a backend server, then you can chat with the backend server just by delivering the Swagger document. If your documentation quality is enough, you can experience the new AI era. No more GUI development required. Just develop only backend server and chat with it."})]})}),s.jsx(Z,{variant:"inset",component:"li"}),s.jsx(E,{href:"./bbs/",title:"BBS AI Chatbot",summary:"AI chatbot by TypeScript Class",icon:s.jsx(lt,{}),description:s.jsxs(D.Fragment,{children:[s.jsx("p",{children:"BBS (Bullet-in Board System) AI chatbot posting articles just by conversation texts."}),s.jsxs("p",{children:["This example project has been developed to demonstrate"," ",s.jsx("code",{children:"typia.llm.application<App, Model>()"})," function which can generate LLM (Large Language Model) function calling application schema from a TypeScript class type."]}),s.jsx("p",{children:"If you've developed a TypeScript facade class, then you can chat with the class just by taking the class type. If you've done enough documentations on the class methods and DTO (Data Transfer Object) types, you can experience the new AI era. No more GUI development required. Just develop only TypeScript class containing the business logics and chat with it."})]})})]})]});rt(window.document.getElementById("root")).render(s.jsx($t,{}));