ts-openapi-codegen 0.2.9 → 0.3.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/README.md +42 -39
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.3.1] - 2023-05-11
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
Fixed relative path calculation mechanism for model, model import and model schema.
|
|
12
|
+
|
|
13
|
+
## [0.3.0] - 2023-05-11
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
- Added new option - useCancelableRequest: Use CancelablePromise wrapper to request
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
- Added missing parameters in tests
|
|
20
|
+
|
|
8
21
|
## [0.2.9] - 2023-04-03
|
|
9
22
|
|
|
10
23
|
- Bump json-schema version
|
package/README.md
CHANGED
|
@@ -68,6 +68,7 @@ $ openapi --help
|
|
|
68
68
|
--interfacePrefix <value> Prefix for interface model(default: "I")
|
|
69
69
|
--enumPrefix <value> Prefix for enum model(default: "E")
|
|
70
70
|
--typePrefix <value> Prefix for type model(default: "T")
|
|
71
|
+
--useCancelableRequest Use cancelled promise as returned data type in request(default: false)
|
|
71
72
|
|
|
72
73
|
Examples
|
|
73
74
|
$ openapi --input ./spec.json
|
|
@@ -116,45 +117,47 @@ or with common block
|
|
|
116
117
|
}
|
|
117
118
|
```
|
|
118
119
|
|
|
119
|
-
| Name
|
|
120
|
-
|
|
121
|
-
| output
|
|
122
|
-
| outputCore
|
|
123
|
-
| outputServices
|
|
124
|
-
| outputModels
|
|
125
|
-
| outputSchemas
|
|
126
|
-
| client
|
|
127
|
-
| useOptions
|
|
128
|
-
| useUnionTypes
|
|
129
|
-
| exportCore
|
|
130
|
-
| exportServices
|
|
131
|
-
| exportModels
|
|
132
|
-
| exportSchemas
|
|
133
|
-
| clean
|
|
134
|
-
| request
|
|
135
|
-
| interfacePrefix
|
|
136
|
-
| enumPrefix
|
|
137
|
-
| typePrefix
|
|
138
|
-
|
|
|
139
|
-
|
|
|
140
|
-
|
|
|
141
|
-
|
|
|
142
|
-
|
|
|
143
|
-
|
|
|
144
|
-
|
|
|
145
|
-
|
|
|
146
|
-
|
|
|
147
|
-
|
|
|
148
|
-
|
|
|
149
|
-
|
|
|
150
|
-
|
|
|
151
|
-
|
|
|
152
|
-
|
|
|
153
|
-
|
|
|
154
|
-
|
|
|
155
|
-
|
|
|
156
|
-
|
|
|
157
|
-
|
|
|
120
|
+
| Name | Item | type | Default | Description |
|
|
121
|
+
|----------------------|----------------------|-------------|----------|-----------------------------------------------------------|
|
|
122
|
+
| output | | string | |The relative location of the output directory |
|
|
123
|
+
| outputCore | | string | {output} |The relative location of the output directory for core |
|
|
124
|
+
| outputServices | | string | {output} |The relative location of the output directory for services |
|
|
125
|
+
| outputModels | | string | {output} |The relative location of the output directory for models |
|
|
126
|
+
| outputSchemas | | string | {output} |The relative location of the output directory for schemas |
|
|
127
|
+
| client | | string |'fetch' |The selected httpClient (fetch or XHR) |
|
|
128
|
+
| useOptions | | boolean |false |Use options or arguments functions |
|
|
129
|
+
| useUnionTypes | | boolean |false |Use union types instead of enums |
|
|
130
|
+
| exportCore | | boolean |true |Generate core client classes |
|
|
131
|
+
| exportServices | | boolean |true |Generate services |
|
|
132
|
+
| exportModels | | boolean |true |Generate models |
|
|
133
|
+
| exportSchemas | | boolean |false |Generate schemas |
|
|
134
|
+
| clean | | boolean |true |Clean a directory before generation |
|
|
135
|
+
| request | | string | |Path to custom request file |
|
|
136
|
+
| interfacePrefix | | string |'I' |Prefix for interface model |
|
|
137
|
+
| enumPrefix | | string |'E' |Prefix for enum model |
|
|
138
|
+
| typePrefix | | string |'T' |Prefix for type model |
|
|
139
|
+
| useCancelableRequest | | boolean |false |Use cancelled promise as returned data type in request |
|
|
140
|
+
| items | | array | | |
|
|
141
|
+
| | input | string | |The relative location of the OpenAPI spec |
|
|
142
|
+
| | output | string | | |
|
|
143
|
+
| | outputCore | string | | |
|
|
144
|
+
| | outputServices | string | | |
|
|
145
|
+
| | outputModels | string | | |
|
|
146
|
+
| | outputSchemas | string | | |
|
|
147
|
+
| | client | string |'fetch' |The selected httpClient (fetch or XHR) |
|
|
148
|
+
| | useOptions | boolean |false |Use options or arguments functions |
|
|
149
|
+
| | useUnionTypes | boolean |false |Use union types instead of enums |
|
|
150
|
+
| | exportCore | boolean |true |Generate core client classes |
|
|
151
|
+
| | exportServices | boolean |true |Generate services client classes |
|
|
152
|
+
| | exportModels | boolean |true |Generate models client classes |
|
|
153
|
+
| | exportSchemas | boolean |true |Generate schemas client classes |
|
|
154
|
+
| | clean | boolean |true |Clean a directory before generation |
|
|
155
|
+
| | request | string | |Path to custom request file |
|
|
156
|
+
| | write | boolean |true |Write the files to disk (true or false) |
|
|
157
|
+
| | interfacePrefix | string | |Prefix for interface model(I) |
|
|
158
|
+
| | enumPrefix | string | |Prefix for enum model(E) |
|
|
159
|
+
| | typePrefix | string | |Prefix for type model(T) |
|
|
160
|
+
| | useCancelableRequest | boolean |false |Use cancelled promise as returned data type in request |
|
|
158
161
|
|
|
159
162
|
## Example
|
|
160
163
|
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("path"),n=require("os"),t=require("camelcase"),r=require("fs"),a=require("mkdirp"),o=require("rimraf"),l=require("util"),i=require("json-schema-ref-parser"),s=require("handlebars/runtime");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function p(e){if(e&&e.__esModule)return e;var n=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}})),n.default=e,Object.freeze(n)}var c=u(e),m=u(t),d=u(a),f=u(o),h=u(i),y=p(s);function v(n){const t=e.extname(n),r=e.basename(n);return t?r.substr(0,r.length-t.length):r}function g(e){return"string"==typeof e}const P=/\\/g;function b(e){return c.default.dirname(e).replace(P,"/")}function O(...e){return c.default.join(...e).replace(P,"/")}function x(e,n){const t=`./${c.default.relative(e,n)}`,r=t.length>0&&t.endsWith("/");return`${t.replace(P,"/")}`.concat(r?"":"/")}function R(...e){return c.default.resolve(...e).replace(P,"/")}class k{constructor(e,n,t){this.prefix={interface:"I",enum:"E",type:"T"};const r=R(process.cwd(),n.output);return this._output={output:r,outputCore:n.outputCore?R(process.cwd(),n.outputCore):r,outputServices:n.outputServices?R(process.cwd(),n.outputServices):r,outputModels:n.outputModels?R(process.cwd(),n.outputModels):r,outputSchemas:n.outputSchemas?R(process.cwd(),n.outputSchemas):r},this._refs={},g(e)?this._root={path:b(e),fileName:v(e)}:this._root={path:""},t&&(this.prefix=t),this}addRefs(e){return this._refs=e,this}values(...e){if(!this._refs)throw new Error("Context must be initialized");return this._refs.values(...e)}get(e){if(!this._refs)throw new Error("Context must be initialized");return this._refs.get(e)}paths(...e){if(!this._refs)throw new Error("Context must be initialized");return this._refs.paths(...e)}exists(e){if(!this._refs)throw new Error("Context must be initialized");return this._refs.exists(e)}fileName(){if(!this._root)throw new Error("Context must be initialized");return this._root.fileName?this._root.fileName:""}}var w;function C(e){return null==e?void 0:e.replace(/\\/g,"\\\\")}function q(e,n){const t=n["x-enum-varnames"],r=n["x-enum-descriptions"];return e.map(((e,n)=>({name:(null==t?void 0:t[n])||e.name,description:(null==r?void 0:r[n])||e.description,value:e.value,type:e.type})))}function A(e){return e?e.replace(/(\*\/)/g,"*_/").replace(/\r?\n(.*)/g,((e,t)=>`${n.EOL} * ${t.trim()}`)):null}function T(e){return null!=e&&""!==e}function S(e){return Array.isArray(e)?e.filter(((e,n,t)=>t.indexOf(e)===n)).filter(T).map((e=>"number"==typeof e?{name:`'_${e}'`,value:String(e),type:"number",description:null}:{name:String(e).replace(/\W+/g,"_").replace(/^(\d+)/g,"_$1").replace(/([a-z])([A-Z]+)/g,"$1_$2").toUpperCase(),value:`'${e}'`,type:"string",description:null})):[]}function j(e){if(/^(\w+=[0-9]+)/g.test(e)){const n=e.match(/(\w+=[0-9]+,?)/g);if(n){const e=[];return n.forEach((n=>{const t=n.split("=")[0],r=parseInt(n.split("=")[1].replace(/[^0-9]/g,""));t&&Number.isInteger(r)&&e.push({name:t.replace(/\W+/g,"_").replace(/^(\d+)/g,"_$1").replace(/([a-z])([A-Z]+)/g,"$1_$2").toUpperCase(),value:String(r),type:"number",description:null})})),e.filter(((e,n,t)=>t.map((e=>e.name)).indexOf(e.name)===n))}}return[]}function E(e){if(!e)return e;return e.replace(/\\/g,"/")}exports.HttpClient=void 0,(w=exports.HttpClient||(exports.HttpClient={})).FETCH="fetch",w.XHR="xhr",w.NODE="node",w.AXIOS="axios";const $=new Map([["File","File"],["file","File"],["any","any"],["object","any"],["array","any[]"],["boolean","boolean"],["byte","number"],["int","number"],["integer","number"],["float","number"],["double","number"],["short","number"],["long","number"],["number","number"],["char","string"],["date","string"],["date-time","string"],["password","string"],["string","string"],["void","void"],["null","null"]]);function D(e){return e.replace(/^[^a-zA-Z_$]+/g,"").replace(/[^\w$]+/g,"_")}function H(e,n){const t={type:"any",base:"any",template:null,imports:[],path:""},r=function(e){return e.trim().replace(/^#\/definitions\//,"").replace(/^#\/parameters\//,"").replace(/^#\/responses\//,"").replace(/^#\/securityDefinitions\//,"")}(E(e)||"");if(t.path=function(e){if(!e)return"";const n=e.lastIndexOf("/");return-1===n?"":e.substring(0,n+1)}(r),/\[.*\]$/g.test(r)){const e=r.match(/(.*?)\[(.*)\]$/);if(null==e?void 0:e.length){const n=H(e[1]);t.path=n.path;const r=H(e[2]);"any[]"===n.type?(t.type=`${r.type}[]`,t.base=r.type,n.imports=[]):r.type?(t.type=`${n.type}<${r.type}>`,t.base=n.type,t.template=r.type):(t.type=n.type,t.base=n.type,t.template=n.type),t.imports.push(...n.imports),t.imports.push(...r.imports)}}else if(a=r,$.has(a)){const e=function(e){return $.get(e)}(r);t.path=r,e&&(t.type=e,t.base=e)}else if(r){const e=function(e){const n=e.lastIndexOf("/");return D(-1===n?e:e.substring(n,e.length))}(r);t.path=r,t.type=e,t.base=e,t.imports.push({name:e,alias:"",path:r})}var a;return t.type===n&&(t.type="T",t.base="T",t.imports=[]),t}function I(e){var n;const{openApi:t,definition:r,isDefinition:a=!1,name:o="",path:l="",parentRef:i}=e,s={name:o,path:l,alias:"",export:"interface",type:"any",base:"any",template:null,link:null,description:A(r.description),isDefinition:a,isReadOnly:!0===r.readOnly,isNullable:!0===r["x-nullable"],isRequired:void 0!==r.default,format:r.format,maximum:r.maximum,exclusiveMaximum:r.exclusiveMaximum,minimum:r.minimum,exclusiveMinimum:r.exclusiveMinimum,multipleOf:r.multipleOf,maxLength:r.maxLength,minLength:r.minLength,maxItems:r.maxItems,minItems:r.minItems,uniqueItems:r.uniqueItems,maxProperties:r.maxProperties,minProperties:r.minProperties,pattern:C(r.pattern),imports:[],enum:[],enums:[],properties:[]};if(r.$ref){const e=H(r.$ref);return s.export="reference",s.type=e.type,s.base=e.base,s.template=e.template,s.imports.push(...e.imports),s}if(r.enum&&"boolean"!==r.type){const e=q(S(r.enum),r);if(e.length)return s.export="enum",s.type="string",s.base="string",s.enum.push(...e),s}if(("int"===r.type||"integer"===r.type)&&r.description){const e=j(r.description);if(e.length)return s.export="enum",s.type="number",s.base="number",s.enum.push(...e),s}if("array"===r.type&&r.items){if(r.items.$ref){const e=H(r.items.$ref);return s.export="array",s.type=e.type,s.base=e.base,s.template=e.template,s.imports.push(...e.imports),s}{const e=this.getModel({openApi:t,definition:r.items,parentRef:i});return s.export="array",s.type=e.type,s.base=e.base,s.template=e.template,s.link=e,s.imports.push(...e.imports),s}}if("object"===r.type&&"object"==typeof r.additionalProperties){if(r.additionalProperties.$ref){const e=H(r.additionalProperties.$ref);return s.export="dictionary",s.type=e.type,s.base=e.base,s.template=e.template,s.imports.push(...e.imports),s}{const e=this.getModel({openApi:t,definition:r.additionalProperties,parentRef:i});return s.export="dictionary",s.type=e.type,s.base=e.base,s.template=e.template,s.link=e,s.imports.push(...e.imports),s}}if(null===(n=r.allOf)||void 0===n?void 0:n.length){const e=this.getModelComposition(t,r,r.allOf,"all-of",i);return s.export=e.type,s.imports.push(...e.imports),s.properties.push(...e.properties),s.enums.push(...e.enums),s}if("object"===r.type){if(s.export="interface",s.type="any",s.base="any",r.properties){this.getModelProperties(t,r,i).forEach((e=>{s.imports.push(...e.imports),s.enums.push(...e.enums),s.properties.push(e),"enum"===e.export&&s.enums.push(e)}))}return s}if(r.type){const e=H(r.type);return s.export="generic",s.type=e.type,s.base=e.base,s.template=e.template,s.imports.push(...e.imports),s}return s}function N(e,n,t,r,a){const o={type:r,imports:[],enums:[],properties:[]},l=t.map((n=>this.getModel({openApi:e,definition:n,parentRef:a})));if(l.filter((e=>{const n=e.properties.length,t=e.enums.length;return!("any"===e.type&&!n&&!t)})).forEach((e=>{o.imports.push(...e.imports),o.enums.push(...e.enums),o.properties.push(e)})),n.properties){const t=this.getModelProperties(e,n,a);t.forEach((e=>{o.imports.push(...e.imports),o.enums.push(...e.enums)})),o.properties.push({name:"properties",alias:"",path:"",export:"interface",type:"any",base:"any",template:null,link:null,description:"",isDefinition:!1,isReadOnly:!1,isNullable:!1,isRequired:!1,imports:[],enum:[],enums:[],properties:t})}return o}function _(e){if(e){if(!/^[a-zA-Z_$][\w$]+$/g.test(e))return`'${e}'`}return e}function B(e,n,t){var r;const a=[];for(const o in n.properties)if(n.properties.hasOwnProperty(o)){const l=n.properties[o],i=(null===(r=n.required)||void 0===r?void 0:r.includes(o))||void 0!==l.default;if(l.$ref){const e=H(l.$ref);a.push({name:_(o),alias:"",path:"",export:"reference",type:e.type,base:e.base,template:e.template,link:null,description:A(l.description),isDefinition:!1,isReadOnly:!0===l.readOnly,isRequired:i,isNullable:!0===l["x-nullable"],format:l.format,maximum:l.maximum,exclusiveMaximum:l.exclusiveMaximum,minimum:l.minimum,exclusiveMinimum:l.exclusiveMinimum,multipleOf:l.multipleOf,maxLength:l.maxLength,minLength:l.minLength,maxItems:l.maxItems,minItems:l.minItems,uniqueItems:l.uniqueItems,maxProperties:l.maxProperties,minProperties:l.minProperties,pattern:C(l.pattern),imports:e.imports,enum:[],enums:[],properties:[]})}else{const n=this.getModel({openApi:e,definition:l,parentRef:t});a.push({name:_(o),alias:"",path:n.path,export:n.export,type:n.type,base:n.base,template:n.template,link:n.link,description:A(l.description),isDefinition:!1,isReadOnly:!0===l.readOnly,isRequired:i,isNullable:!0===l["x-nullable"],format:l.format,maximum:l.maximum,exclusiveMaximum:l.exclusiveMaximum,minimum:l.minimum,exclusiveMinimum:l.exclusiveMinimum,multipleOf:l.multipleOf,maxLength:l.maxLength,minLength:l.minLength,maxItems:l.maxItems,minItems:l.minItems,uniqueItems:l.uniqueItems,maxProperties:l.maxProperties,minProperties:l.minProperties,pattern:C(l.pattern),imports:n.imports,enum:n.enum,enums:n.enums,properties:n.properties})}}return a}var M,U=function e(n,t){if(n===t)return!0;if(n&&t&&"object"==typeof n&&"object"==typeof t){if(n.constructor!==t.constructor)return!1;var r,a,o;if(Array.isArray(n)){if((r=n.length)!=t.length)return!1;for(a=r;0!=a--;)if(!e(n[a],t[a]))return!1;return!0}if(n.constructor===RegExp)return n.source===t.source&&n.flags===t.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===t.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===t.toString();if((r=(o=Object.keys(n)).length)!==Object.keys(t).length)return!1;for(a=r;0!=a--;)if(!Object.prototype.hasOwnProperty.call(t,o[a]))return!1;for(a=r;0!=a--;){var l=o[a];if(!e(n[l],t[l]))return!1}return!0}return n!=n&&t!=t};function L(e,n,t=[],r="",a=!1){if(n.$ref){const o=n.$ref.match(/^(http:\/\/|https:\/\/)/g)?n.$ref:n.$ref.match(/^(#\/)/g)?O(r,n.$ref):O(b(r),n.$ref);if(function(e,n){return-1!==e.findIndex((e=>U(e.value,n)))}(t,o))return t;a?t.push({value:o,type:M.SCHEMA}):t.push({value:o,type:M.OTHERS});const l=e.get(o),i=n.$ref.match(/^(http:\/\/|https:\/\/)/g)?"":n.$ref.match(/^(#\/)/g)?r:O(b(r),n.$ref);return L(e,l,t,i,a)}return n.schema?Object.values(n).forEach(((n,a)=>{n instanceof Object&&L(e,n,t,r,!0)})):Object.values(n).forEach(((n,o)=>{n instanceof Object&&L(e,n,t,r,a)})),t}function F(e,n){return L(e,n).filter((e=>e.type===M.SCHEMA)).map((e=>e.value))}function V(e){return e.sort(((e,n)=>{const t=e.name.toLowerCase(),r=n.name.toLowerCase();return t.localeCompare(r,"en")}))}function W(e,n,t){return function(e,n,t){for(let r=0;r<t.length;++r)if(U(e,t[r]))return n===r;return!1}(e,n,t)}function Q(e){let n=[];const t=F(this.context,e);if(t){for(const r of t){const t=this.context.get(r),a=this.getType(r,""),o=this.getModel({openApi:e,definition:t,isDefinition:!0,name:a.base,path:a.path,parentRef:r});n.push(o)}let r;n=V(n.filter(W));let a=1;n.forEach((e=>{r&&r.name===e.name?(1===a&&(r.alias=`${e.name}$${a}`,a++),e.alias=`${e.name}$${a}`,a++):(e.alias="",a=1),r=e})),n.forEach((e=>{e.imports=e.imports.map((t=>{const r=n.filter((e=>`${e.path}${e.name}`===t.path&&e.name===t.name));return r.length>0?Object.assign(t,{alias:r[0].alias,path:O(x(e.path,r[0].path),t.name)}):t}))}))}return n.filter(W)}!function(e){e[e.SCHEMA=0]="SCHEMA",e[e.OTHERS=1]="OTHERS"}(M||(M={}));const z=/^(arguments|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|eval|export|extends|false|finally|for|function|if|implements|import|in|instanceof|interface|let|new|null|package|private|protected|public|return|static|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)$/g;function J(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim();return m.default(n).replace(z,"_$1")}function Z(e,n){const t=e.type===n.type&&e.base===n.base&&e.template===n.template;return t&&e.link&&n.link?Z(e.link,n.link):t}function G(e){const n=[];return e.forEach((e=>{const{code:t}=e;t&&204!==t&&t>=200&&t<300&&n.push(e)})),n.length||n.push({in:"response",name:"",alias:"",path:"",code:200,description:"",export:"generic",type:"void",base:"void",template:null,link:null,isDefinition:!1,isReadOnly:!1,isRequired:!1,isNullable:!1,imports:[],enum:[],enums:[],properties:[]}),n.filter(((e,n,t)=>t.findIndex((n=>Z(n,e)))===n))}function X(e,n,t,r,a){var o;const l=function(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim(),t=m.default(n,{pascalCase:!0});return t&&!t.endsWith("Service")?`${t}Service`:t}((null===(o=r.tags)||void 0===o?void 0:o[0])||"Service"),i=`${t}${l}`,s=function(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim();return m.default(n)}(r.operationId||i),u=function(e){return e.replace(/\{(.*?)\}/g,((e,n)=>`\${${J(n)}}`)).replace("${apiVersion}","${OpenAPI.VERSION}")}(n),p={service:l,name:s,summary:A(r.summary),description:A(r.description),deprecated:!0===r.deprecated,method:t.toUpperCase(),path:u,parameters:[...a.parameters],parametersPath:[...a.parametersPath],parametersQuery:[...a.parametersQuery],parametersForm:[...a.parametersForm],parametersHeader:[...a.parametersHeader],parametersCookie:[...a.parametersCookie],parametersBody:a.parametersBody,imports:[],errors:[],results:[],responseHeader:null};if(r.parameters){const n=this.getOperationParameters(e,r.parameters);p.imports.push(...n.imports),p.parameters.push(...n.parameters),p.parametersPath.push(...n.parametersPath),p.parametersQuery.push(...n.parametersQuery),p.parametersForm.push(...n.parametersForm),p.parametersHeader.push(...n.parametersHeader),p.parametersCookie.push(...n.parametersCookie),p.parametersBody=n.parametersBody}if(r.responses){const n=this.getOperationResponses(e,r.responses),t=G(n);p.errors=function(e){return e.filter((e=>e.code>=300&&e.description)).map((e=>{return{code:e.code,description:(n=e.description,n.replace(/([^\\])`/g,"$1\\`").replace(/(\*\/)/g,"*_/"))};var n}))}(n),p.responseHeader=function(e){const n=e.find((e=>"header"===e.in));return n?n.name:null}(t),t.forEach((e=>{p.results.push(e),p.imports.push(...e.imports)}))}return p}function K(e,n){var t;if(void 0===e.default)return;if(null===e.default)return"null";switch(e.type||typeof e.default){case"int":case"integer":case"number":return"enum"===n.export&&(null===(t=n.enum)||void 0===t?void 0:t[e.default])?n.enum[e.default].value:e.default;case"boolean":return JSON.stringify(e.default);case"string":return`'${e.default}'`;case"object":try{return JSON.stringify(e.default,null,4)}catch(e){}}}function Y(e,n){const t={path:"",in:n.in,prop:n.name,export:"interface",name:J(n.name),alias:"",type:"any",base:"any",template:null,link:null,description:A(n.description),isDefinition:!1,isReadOnly:!1,isRequired:!0===n.required,isNullable:!0===n["x-nullable"],format:n.format,maximum:n.maximum,exclusiveMaximum:n.exclusiveMaximum,minimum:n.minimum,exclusiveMinimum:n.exclusiveMinimum,multipleOf:n.multipleOf,maxLength:n.maxLength,minLength:n.minLength,maxItems:n.maxItems,minItems:n.minItems,uniqueItems:n.uniqueItems,pattern:C(n.pattern),imports:[],enum:[],enums:[],properties:[],mediaType:null};if(n.$ref){const e=H(n.$ref);return t.export="reference",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t.default=K(n,t),t.path=e.path,t}if(n.enum){const e=q(S(n.enum),n);if(e.length)return t.export="enum",t.type="string",t.base="string",t.enum.push(...e),t.default=K(n,t),t}if(("int"===n.type||"integer"===n.type)&&n.description){const e=j(n.description);if(e.length)return t.export="enum",t.type="number",t.base="number",t.enum.push(...e),t.default=K(n,t),t}if("array"===n.type&&n.items){const e=H(n.items.type);return t.export="array",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t.default=K(n,t),t}if("object"===n.type&&n.items){const e=H(n.items.type);return t.export="dictionary",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t.default=K(n,t),t}if(n.schema){if(n.schema.$ref){const e=H(n.schema.$ref);return t.export="reference",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t.default=K(n,t),t}{const r=this.getModel({openApi:e,definition:n.schema,parentRef:""});return t.export=r.export,t.type=r.type,t.base=r.base,t.template=r.template,t.link=r.link,t.imports.push(...r.imports),t.enum.push(...r.enum),t.enums.push(...r.enums),t.properties.push(...r.properties),t.default=K(n,t),t}}if(n.type){const e=H(n.type);return t.export="generic",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t.default=K(n,t),t}return t}function ee(e,n){return!e.isRequired&&n.isRequired?1:e.isRequired&&!n.isRequired||e.isRequired&&void 0===e.default&&void 0!==n.default||e.isRequired&&void 0!==e.default&&void 0===n.default?-1:e.isRequired&&void 0!==e.default&&void 0===n.default||!e.isRequired&&void 0===e.default&&void 0!==n.default?1:0}function ne(e,n){const t={imports:[],parameters:[],parametersPath:[],parametersQuery:[],parametersForm:[],parametersCookie:[],parametersHeader:[],parametersBody:null};return n.forEach((n=>{const r=n.$ref?this.context.get(n.$ref):n,a=this.getOperationParameter(e,r);if("api-version"!==a.prop)switch(a.in){case"path":t.parametersPath.push(a),t.parameters.push(a),t.imports.push(...a.imports);break;case"query":t.parametersQuery.push(a),t.parameters.push(a),t.imports.push(...a.imports);break;case"header":t.parametersHeader.push(a),t.parameters.push(a),t.imports.push(...a.imports);break;case"formData":t.parametersForm.push(a),t.parameters.push(a),t.imports.push(...a.imports);break;case"body":t.parametersBody=a,t.parameters.push(a),t.imports.push(...a.imports)}})),t.parameters=t.parameters.sort(ee),t.parametersPath=t.parametersPath.sort(ee),t.parametersQuery=t.parametersQuery.sort(ee),t.parametersForm=t.parametersForm.sort(ee),t.parametersCookie=t.parametersCookie.sort(ee),t.parametersHeader=t.parametersHeader.sort(ee),t}function te(e,n,t){const r={in:"response",name:"",alias:"",path:"",code:t,description:A(n.description),export:"generic",type:"any",base:"any",template:null,link:null,isDefinition:!1,isReadOnly:!1,isRequired:!1,isNullable:!1,imports:[],enum:[],enums:[],properties:[]};if(n.schema){if(n.schema.$ref){const e=H(n.schema.$ref);return r.export="reference",r.type=e.type,r.base=e.base,r.template=e.template,r.imports.push(...e.imports),r}{const t=this.getModel({openApi:e,definition:n.schema,parentRef:""});return r.export=t.export,r.type=t.type,r.base=t.base,r.template=t.template,r.link=t.link,r.isReadOnly=t.isReadOnly,r.isRequired=t.isRequired,r.isNullable=t.isNullable,r.format=t.format,r.maximum=t.maximum,r.exclusiveMaximum=t.exclusiveMaximum,r.minimum=t.minimum,r.exclusiveMinimum=t.exclusiveMinimum,r.multipleOf=t.multipleOf,r.maxLength=t.maxLength,r.minLength=t.minLength,r.maxItems=t.maxItems,r.minItems=t.minItems,r.uniqueItems=t.uniqueItems,r.maxProperties=t.maxProperties,r.minProperties=t.minProperties,r.pattern=C(t.pattern),r.imports.push(...t.imports),r.enum.push(...t.enum),r.enums.push(...t.enums),r.properties.push(...t.properties),r}}if(n.headers)for(const e in n.headers)if(n.headers.hasOwnProperty(e))return r.in="header",r.name=e,r.type="string",r.base="string",r;return r}function re(e){if("default"===e)return 200;if(/[0-9]+/g.test(e)){const n=parseInt(e);if(Number.isInteger(n))return Math.abs(n)}return null}function ae(e,n){const t=[];for(const r in n)if(n.hasOwnProperty(r)){const a=n[r],o=a.$ref?this.context.get(a.$ref):a,l=re(r);if(l){const n=this.getOperationResponse(e,o,l);t.push(n)}}return t.sort(((e,n)=>e.code<n.code?-1:e.code>n.code?1:0))}function oe(e){const n=new Map;for(const t in e.paths)if(e.paths.hasOwnProperty(t)){const r=e.paths[t],a=this.getOperationParameters(e,r.parameters||[]);for(const o in r)if(r.hasOwnProperty(o))switch(o){case"get":case"put":case"post":case"delete":case"options":case"head":case"patch":const l=r[o],i=this.getOperation(e,t,o,l,a),s=n.get(i.service)||{name:i.service,originName:i.service,operations:[],imports:[]};s.operations.push(i),s.imports.push(...i.imports),n.set(i.service,s)}}return Array.from(n.values())}function le(e){const n=function(e="1.0"){return e.replace(/^v/gi,"")}(e.info.version),t=function(e){var n;const t=(null===(n=e.schemes)||void 0===n?void 0:n[0])||"http",r=e.host,a=e.basePath||"";return r?`${t}://${r}${a}`:a}(e);return{version:n,server:t,models:this.getModels(e),services:this.getServices(e)}}class ie{constructor(e){this.parse=le,this.getModels=Q,this.getType=H,this.getModel=I,this.getModelComposition=N,this.getModelProperties=B,this.getServices=oe,this.getOperationParameters=ne,this.getOperationParameter=Y,this.getOperation=X,this.getOperationResponses=ae,this.getOperationResponse=te,this.context=e}getTypeNameByRef(e,n){if(n){const t=this.context.get(n);if(t.oneOf||t.anyOf||t.allOf||["string","number","integer","boolean","array"].includes(t.type))return`${this.context.prefix.type}${e}`;if(t.enum&&"boolean"!==t)return`${this.context.prefix.enum}${e}`;if("object"===t.type)return`${this.context.prefix.interface}${e}`}return e}}function se(e){return e?e.replace(/(\*\/)/g,"*_/").replace(/\r?\n(.*)/g,((e,t)=>`${n.EOL} * ${t.trim()}`)):null}function ue(e,n){var t;if(void 0===e.default)return;if(null===e.default)return"null";switch(e.type||typeof e.default){case"int":case"integer":case"number":return"enum"===(null==n?void 0:n.export)&&(null===(t=n.enum)||void 0===t?void 0:t[e.default])?n.enum[e.default].value:e.default;case"boolean":return JSON.stringify(e.default);case"string":return`'${e.default}'`;case"object":try{return JSON.stringify(e.default,null,4)}catch(e){}}}function pe(e){var n,t,r;const{openApi:a,definition:o,isDefinition:l=!1,name:i="",path:s="",parentRef:u}=e,p={name:i,alias:"",path:s,export:"interface",type:"any",base:"any",link:null,template:null,description:se(o.description),isDefinition:l,isReadOnly:!0===o.readOnly,isNullable:!0===o.nullable,isRequired:void 0!==o.default,format:o.format,maximum:o.maximum,exclusiveMaximum:o.exclusiveMaximum,minimum:o.minimum,exclusiveMinimum:o.exclusiveMinimum,multipleOf:o.multipleOf,maxLength:o.maxLength,minLength:o.minLength,maxItems:o.maxItems,minItems:o.minItems,uniqueItems:o.uniqueItems,maxProperties:o.maxProperties,minProperties:o.minProperties,pattern:C(o.pattern),imports:[],enum:[],enums:[],properties:[]};if(o.$ref){const e=this.getType(o.$ref,u);return p.export="reference",p.type=e.type,p.base=e.base,p.imports.push(...e.imports),p.default=ue(o,p),p}if(o.enum&&"boolean"!==o.type){const e=function(e,n){const t=n["x-enum-varnames"],r=n["x-enum-descriptions"];return e.map(((e,n)=>({name:(null==t?void 0:t[n])||e.name,description:(null==r?void 0:r[n])||e.description,value:e.value,type:e.type})))}((c=o.enum,Array.isArray(c)?c.filter(((e,n,t)=>t.indexOf(e)===n)).filter(T).map((e=>"number"==typeof e?{name:`'_${e}'`,value:String(e),type:"number",description:null}:{name:String(e).replace(/\W+/g,"_").replace(/^(\d+)/g,"_$1").replace(/([a-z])([A-Z]+)/g,"$1_$2").toUpperCase(),value:`'${e}'`,type:"string",description:null})):[]),o);if(e.length)return p.export="enum",p.type="string",p.base="string",p.enum.push(...e),p.default=ue(o,p),p}var c;if(("int"===o.type||"integer"===o.type)&&o.description){const e=function(e){if(/^(\w+=[0-9]+)/g.test(e)){const n=e.match(/(\w+=[0-9]+,?)/g);if(n){const e=[];return n.forEach((n=>{const t=n.split("=")[0],r=parseInt(n.split("=")[1].replace(/[^0-9]/g,""));t&&Number.isInteger(r)&&e.push({name:t.replace(/\W+/g,"_").replace(/^(\d+)/g,"_$1").replace(/([a-z])([A-Z]+)/g,"$1_$2").toUpperCase(),value:String(r),type:"number",description:null})})),e.filter(((e,n,t)=>t.map((e=>e.name)).indexOf(e.name)===n))}}return[]}(o.description);if(e.length)return p.export="enum",p.type="number",p.base="number",p.enum.push(...e),p.default=ue(o,p),p}if("array"===o.type&&o.items){if(o.items.$ref){const e=this.getType(o.items.$ref,u);return p.export="array",p.type=e.type,p.base=e.base,p.imports.push(...e.imports),p.default=ue(o,p),p}{const e=this.getModel({openApi:a,definition:o.items,parentRef:u});return p.export="array",p.type=e.type,p.base=e.base,p.link=e,p.imports.push(...e.imports),p.default=ue(o,p),p}}if("object"===o.type&&"object"==typeof o.additionalProperties){if(o.additionalProperties.$ref){const e=this.getType(o.additionalProperties.$ref,u);return p.export="dictionary",p.type=e.type,p.base=e.base,p.imports.push(...e.imports),p.default=ue(o,p),p}{const e=this.getModel({openApi:a,definition:o.additionalProperties,parentRef:u});return p.export="dictionary",p.type=e.type,p.base=e.base,p.link=e,p.imports.push(...e.imports),p.default=ue(o,p),p}}if(null===(n=o.oneOf)||void 0===n?void 0:n.length){const e=this.getModelComposition(a,o,o.oneOf,"one-of",u);return p.export=e.type,p.imports.push(...e.imports),p.properties.push(...e.properties),p.enums.push(...e.enums),p}if(null===(t=o.anyOf)||void 0===t?void 0:t.length){const e=this.getModelComposition(a,o,o.anyOf,"any-of",u);return p.export=e.type,p.imports.push(...e.imports),p.properties.push(...e.properties),p.enums.push(...e.enums),p}if(null===(r=o.allOf)||void 0===r?void 0:r.length){const e=this.getModelComposition(a,o,o.allOf,"all-of",u);return p.export=e.type,p.imports.push(...e.imports),p.properties.push(...e.properties),p.enums.push(...e.enums),p}if("object"===o.type){if(p.export="interface",p.type="any",p.base="any",p.default=ue(o,p),o.properties){this.getModelProperties(a,o,u).forEach((e=>{p.imports.push(...e.imports),p.enums.push(...e.enums),p.properties.push(e),"enum"===e.export&&p.enums.push(e)}))}return p}if(o.type){const e=this.getType(o.type,u);return p.export="generic",p.type=e.type,p.base=e.base,p.imports.push(...e.imports),p.default=ue(o,p),p}return p}function ce(e,n,t,r,a){const o={type:r,imports:[],enums:[],properties:[]},l=t.map((n=>this.getModel({openApi:e,definition:n,parentRef:a})));if(l.filter((e=>{const n=e.properties.length,t=e.enums.length;return!("any"===e.type&&!n&&!t)})).forEach((e=>{o.imports.push(...e.imports),o.enums.push(...e.enums),o.properties.push(e)})),n.properties){const t=this.getModelProperties(e,n,a);t.forEach((e=>{o.imports.push(...e.imports),o.enums.push(...e.enums)})),o.properties.push({name:"properties",alias:"",path:"",export:"interface",type:"any",base:"any",template:null,link:null,description:"",isDefinition:!1,isReadOnly:!1,isNullable:!1,isRequired:!1,imports:[],enum:[],enums:[],properties:t})}return o.imports=o.imports.filter(W),o}function me(e){if(e){if(!/^[a-zA-Z_$][\w$]+$/g.test(e))return`'${e}'`}return e}function de(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim();return m.default(n).replace(/^./,(e=>e.toUpperCase()))}function fe(e,n,t){var r;const a=[];for(const o in n.properties)if(n.properties.hasOwnProperty(o)){const l=n.properties[o],i=(null===(r=n.required)||void 0===r?void 0:r.includes(o))||void 0!==l.default;if(l.$ref){const e=this.getType(l.$ref,t);a.push({name:me(o),alias:"",path:e.path,export:"reference",type:e.type,base:e.base,template:e.template,link:null,description:se(l.description),isDefinition:!1,isReadOnly:!0===l.readOnly,isRequired:i,isNullable:!0===l.nullable,format:l.format,maximum:l.maximum,exclusiveMaximum:l.exclusiveMaximum,minimum:l.minimum,exclusiveMinimum:l.exclusiveMinimum,multipleOf:l.multipleOf,maxLength:l.maxLength,minLength:l.minLength,maxItems:l.maxItems,minItems:l.minItems,uniqueItems:l.uniqueItems,maxProperties:l.maxProperties,minProperties:l.minProperties,pattern:C(l.pattern),imports:e.imports,enum:[],enums:[],properties:[]})}else{const n=this.getModel({openApi:e,definition:l,parentRef:t});a.push({name:me(o),alias:"enum"===n.export?`${this.context.prefix.enum}${de(me(o))}`:"",path:n.path,export:n.export,type:n.type,base:n.base,template:n.template,link:n.link,description:se(l.description),isDefinition:!1,isReadOnly:!0===l.readOnly,isRequired:i,isNullable:!0===l.nullable,format:l.format,maximum:l.maximum,exclusiveMaximum:l.exclusiveMaximum,minimum:l.minimum,exclusiveMinimum:l.exclusiveMinimum,multipleOf:l.multipleOf,maxLength:l.maxLength,minLength:l.minLength,maxItems:l.maxItems,minItems:l.minItems,uniqueItems:l.uniqueItems,maxProperties:l.maxProperties,minProperties:l.minProperties,pattern:C(l.pattern),imports:n.imports,enum:n.enum,enums:n.enums,properties:n.properties})}}return a}function he(e){let n=[];const t=F(this.context,e);if(t){for(const r of t){const t=this.context.get(r),a=this.getType(r,""),o=this.getModel({openApi:e,definition:t,isDefinition:!0,name:a.base,path:a.path,parentRef:r});n.push(o)}let r;n=V(n.filter(W));let a=1;n.forEach((e=>{r&&r.name===e.name?(1===a&&(r.alias=`${e.name}$${a}`,a++),e.alias=`${e.name}$${a}`,a++):(e.alias="",a=1),r=e})),n.forEach((e=>{e.imports=e.imports.map((t=>{const r=n.filter((e=>`${e.path}${e.name}`===t.path&&e.name===t.name));return r.length>0?Object.assign(t,{alias:r[0].alias,path:O(x(e.path,r[0].path),t.name)}):t}))}))}return n.filter(W)}const ye=/^(arguments|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|eval|export|extends|false|finally|for|function|if|implements|import|in|instanceof|interface|let|new|null|package|private|protected|public|return|static|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)$/g;function ve(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim();return m.default(n).replace(ye,"_$1")}function ge(e,n){const t=e.type===n.type&&e.base===n.base&&e.template===n.template;return t&&e.link&&n.link?ge(e.link,n.link):t}function Pe(e){const n=[];return e.forEach((e=>{const{code:t}=e;t&&204!==t&&t>=200&&t<300&&n.push(e)})),n.length||n.push({in:"response",name:"",alias:"",path:"",code:200,description:"",export:"generic",type:"void",base:"void",template:null,link:null,isDefinition:!1,isReadOnly:!1,isRequired:!1,isNullable:!1,imports:[],enum:[],enums:[],properties:[]}),n.filter(((e,n,t)=>t.findIndex((n=>ge(n,e)))===n))}function be(e,n,t,r,a,o){const l=`${t}${o}`,i=function(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim();return m.default(n)}(r.operationId||l),s=function(e){return e.replace(/\{(.*?)\}/g,((e,n)=>`\${${ve(n)}}`)).replace("${apiVersion}","${OpenAPI.VERSION}")}(n),u={service:o,name:i,summary:se(r.summary),description:se(r.description),deprecated:!0===r.deprecated,method:t.toUpperCase(),path:s,parameters:[...a.parameters],parametersPath:[...a.parametersPath],parametersQuery:[...a.parametersQuery],parametersForm:[...a.parametersForm],parametersHeader:[...a.parametersHeader],parametersCookie:[...a.parametersCookie],parametersBody:a.parametersBody,imports:[],errors:[],results:[],responseHeader:null};if(r.parameters){const n=this.getOperationParameters(e,r.parameters);u.imports.push(...n.imports),u.parameters.push(...n.parameters),u.parametersPath.push(...n.parametersPath),u.parametersQuery.push(...n.parametersQuery),u.parametersForm.push(...n.parametersForm),u.parametersHeader.push(...n.parametersHeader),u.parametersCookie.push(...n.parametersCookie),u.parametersBody=n.parametersBody}if(r.requestBody){const n=r.requestBody.$ref?this.context.get(r.requestBody.$ref):r.requestBody,t=this.getOperationRequestBody(e,n,"");u.imports.push(...t.imports),u.parameters.push(t),u.parameters=u.parameters.sort(ee),u.parametersBody=t}if(r.responses){const n=this.getOperationResponses(e,r.responses),t=Pe(n);u.errors=function(e){return e.filter((e=>e.code>=300&&e.description)).map((e=>{return{code:e.code,description:(n=e.description,n.replace(/([^\\])`/g,"$1\\`").replace(/(\*\/)/g,"*_/"))};var n}))}(n),u.responseHeader=function(e){const n=e.find((e=>"header"===e.in));return n?n.name:null}(t),t.forEach((e=>{u.results.push(e),u.imports.push(...e.imports)}))}return u}function Oe(e,n){const t={in:n.in,prop:n.name,export:"interface",name:ve(n.name),alias:"",path:"",type:"any",base:"any",template:null,link:null,description:se(n.description),isDefinition:!1,isReadOnly:!1,isRequired:!0===n.required,isNullable:!0===n.nullable,imports:[],enum:[],enums:[],properties:[],mediaType:null};if(n.$ref){const e=this.getType(n.$ref,"");return t.export="reference",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t}if(n.schema){if(n.schema.$ref){const e=this.getType(n.schema.$ref,"");return t.export="reference",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t.default=ue(n.schema),t}{const r=this.getModel({openApi:e,definition:n.schema,parentRef:""});return t.export=r.export,t.type=r.type,t.base=r.base,t.template=r.template,t.link=r.link,t.isReadOnly=r.isReadOnly,t.isRequired=t.isRequired||r.isRequired,t.isNullable=t.isNullable||r.isNullable,t.format=r.format,t.maximum=r.maximum,t.exclusiveMaximum=r.exclusiveMaximum,t.minimum=r.minimum,t.exclusiveMinimum=r.exclusiveMinimum,t.multipleOf=r.multipleOf,t.maxLength=r.maxLength,t.minLength=r.minLength,t.maxItems=r.maxItems,t.minItems=r.minItems,t.uniqueItems=r.uniqueItems,t.maxProperties=r.maxProperties,t.minProperties=r.minProperties,t.pattern=C(r.pattern),t.default=r.default,t.imports.push(...r.imports),t.enum.push(...r.enum),t.enums.push(...r.enums),t.properties.push(...r.properties),t}}return t}function xe(e,n){const t={imports:[],parameters:[],parametersPath:[],parametersQuery:[],parametersForm:[],parametersCookie:[],parametersHeader:[],parametersBody:null};return n.forEach((n=>{const r=n.$ref?this.context.get(n.$ref):n,a=this.getOperationParameter(e,r);if("api-version"!==a.prop)switch(r.in){case"path":t.parametersPath.push(a),t.parameters.push(a),t.imports.push(...a.imports);break;case"query":t.parametersQuery.push(a),t.parameters.push(a),t.imports.push(...a.imports);break;case"formData":t.parametersForm.push(a),t.parameters.push(a),t.imports.push(...a.imports);break;case"cookie":t.parametersCookie.push(a),t.parameters.push(a),t.imports.push(...a.imports);break;case"header":t.parametersHeader.push(a),t.parameters.push(a),t.imports.push(...a.imports)}})),t.parameters=t.parameters.sort(ee),t.parametersPath=t.parametersPath.sort(ee),t.parametersQuery=t.parametersQuery.sort(ee),t.parametersForm=t.parametersForm.sort(ee),t.parametersCookie=t.parametersCookie.sort(ee),t.parametersHeader=t.parametersHeader.sort(ee),t}function Re(e,n){return n["application/json-patch+json"]&&n["application/json-patch+json"].schema||n["application/json"]&&n["application/json"].schema||n["text/json"]&&n["text/json"].schema||n["text/plain"]&&n["text/plain"].schema||n["multipart/mixed"]&&n["multipart/mixed"].schema||n["multipart/related"]&&n["multipart/related"].schema||n["multipart/batch"]&&n["multipart/batch"].schema||null}function ke(e,n,t){const r={in:"body",prop:"body",export:"interface",name:"requestBody",alias:"",path:"",type:"any",base:"any",template:null,link:null,description:se(n.description),default:void 0,isDefinition:!1,isReadOnly:!1,isRequired:!0===n.required,isNullable:!0===n.nullable,imports:[],enum:[],enums:[],properties:[],mediaType:null};if(n.content){const o=Re(0,n.content);if(o){if(r.mediaType=(a=n.content,Object.keys(a).find((e=>["application/json-patch+json","application/json","text/json","text/plain","multipart/mixed","multipart/related","multipart/batch"].includes(e)))||null),null==o?void 0:o.$ref){const e=this.getType(o.$ref,t);return r.export="reference",r.type=e.type,r.base=e.base,r.path=e.path,r.template=e.template,r.imports.push(...e.imports),r}{const n=this.getModel({openApi:e,definition:o,parentRef:t});return r.export=n.export,r.type=n.type,r.base=n.base,r.path=n.path,r.template=n.template,r.link=n.link,r.isReadOnly=n.isReadOnly,r.isRequired=r.isRequired||n.isRequired,r.isNullable=r.isNullable||n.isNullable,r.format=n.format,r.maximum=n.maximum,r.exclusiveMaximum=n.exclusiveMaximum,r.minimum=n.minimum,r.exclusiveMinimum=n.exclusiveMinimum,r.multipleOf=n.multipleOf,r.maxLength=n.maxLength,r.minLength=n.minLength,r.maxItems=n.maxItems,r.minItems=n.minItems,r.uniqueItems=n.uniqueItems,r.maxProperties=n.maxProperties,r.minProperties=n.minProperties,r.pattern=C(n.pattern),r.imports.push(...n.imports),r.enum.push(...n.enum),r.enums.push(...n.enums),r.properties.push(...n.properties),r}}}var a;return r}function we(e,n,t,r){const a={in:"response",name:"",alias:"",path:"",code:t,description:se(n.description),export:"generic",type:"any",base:"any",template:null,link:null,isDefinition:!1,isReadOnly:!1,isRequired:!1,isNullable:!1,imports:[],enum:[],enums:[],properties:[]};if(n.content){const t=Re(0,n.content);if(t){if(null==t?void 0:t.$ref){const e=this.getType(t.$ref,r);return a.export="reference",a.type=e.type,a.base=e.base,a.path=e.path,a.template=e.template,a.imports.push(...e.imports),a}{const n=this.getModel({openApi:e,definition:t,parentRef:r});return a.export=n.export,a.type=n.type,a.base=n.base,a.path=n.path,a.template=n.template,a.link=n.link,a.isReadOnly=n.isReadOnly,a.isRequired=n.isRequired,a.isNullable=n.isNullable,a.format=n.format,a.maximum=n.maximum,a.exclusiveMaximum=n.exclusiveMaximum,a.minimum=n.minimum,a.exclusiveMinimum=n.exclusiveMinimum,a.multipleOf=n.multipleOf,a.maxLength=n.maxLength,a.minLength=n.minLength,a.maxItems=n.maxItems,a.minItems=n.minItems,a.uniqueItems=n.uniqueItems,a.maxProperties=n.maxProperties,a.minProperties=n.minProperties,a.pattern=C(n.pattern),a.imports.push(...n.imports),a.enum.push(...n.enum),a.enums.push(...n.enums),a.properties.push(...n.properties),a}}}if(n.headers)for(const e in n.headers)if(n.headers.hasOwnProperty(e))return a.in="header",a.name=e,a.type="string",a.base="string",a;return a}function Ce(e){if("default"===e)return 200;if(/[0-9]+/g.test(e)){const n=parseInt(e);if(Number.isInteger(n))return Math.abs(n)}return null}function qe(e,n){const t=[];for(const r in n)if(n.hasOwnProperty(r)){const a=n[r],o=a.$ref?this.context.get(a.$ref):a,l=Ce(r);if(l){const n=this.getOperationResponse(e,o,l,"");t.push(n)}}return t.sort(((e,n)=>e.code<n.code?-1:e.code>n.code?1:0))}function Ae(e,n){var t;return function(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim(),t=m.default(n,{pascalCase:!0});return t&&!t.endsWith("Service")?`${t}Service`:t}((null===(t=e.tags)||void 0===t?void 0:t[0])||`${de(n)}Service`)}function Te(e,n){e.filter((e=>e.path===n.path&&e.type===n.name&&n.alias)).forEach((e=>{e.alias=n.alias,e.base=n.alias}))}function Se(e){var n;const t=new Map;for(const r in e.paths)if(e.paths.hasOwnProperty(r)){const a=e.paths[r],o=this.getOperationParameters(e,a.parameters||[]);for(const l in a)if(a.hasOwnProperty(l))switch(l){case"get":case"put":case"post":case"delete":case"options":case"head":case"patch":const i=a[l],s=this.context.fileName(),u=Ae(i,s),p=t.get(u)||{name:u,originName:de((null===(n=i.tags)||void 0===n?void 0:n[0])||s),operations:[],imports:[]},c=this.getOperation(e,r,l,i,o,u);p.operations.push(c),c.imports=c.imports.map((e=>{const n=p.imports.find((n=>n.path===e.path));return n||e})),p.imports.push(...c.imports),t.set(c.service,p)}}return t.forEach((e=>{let n;e.imports=e.imports.filter(W).sort(((e,n)=>{const t=e.name.toLowerCase(),r=n.name.toLowerCase();return t.localeCompare(r,"en")}));let t=1;e.imports=e.imports.map((e=>(n&&n.name===e.name?(1===t&&(n.alias=`${e.name}$${t}`,t++),e.alias=`${e.name}$${t}`,t++):(e.alias="",t=1),n=e,e))),e.imports.forEach((n=>{for(const t of e.operations)Te(t.results,n),Te(t.parameters,n)}))})),Array.from(t.values())}function je(e){return e.replace(/^[^a-zA-Z_$]+/g,"").replace(/[^\w$]+/g,"_")}const Ee=new Map([["File","File"],["file","File"],["any","any"],["object","any"],["array","any[]"],["boolean","boolean"],["byte","number"],["int","number"],["integer","number"],["float","number"],["double","number"],["short","number"],["long","number"],["number","number"],["char","string"],["date","string"],["date-time","string"],["password","string"],["string","string"],["void","void"],["null","null"]]);function $e(e){return Ee.has(e)}function De(n,t){const r={type:"any",base:"any",imports:[],path:"",template:null},a=function(n){if(!n||$e(n))return n;if(!n.match(/^(http:\/\/|https:\/\/|#\/)/g)&&!$e(n)&&!n.match(/^array\[[a-z]+\]$/g)){const t=n.match(/^(.*)#/),r=b(t?t[1]:n),a=e.extname(n),o=a.toLowerCase().match(/(\.json|\.yaml|\.yml)$/g)?de(e.basename(n,a)):de(e.basename(n));return r?O(r,o):o}const t=n.trim().replace(/^#\/components\/schemas\//,"").replace(/^#\/components\/responses\//,"").replace(/^#\/components\/parameters\//,"").replace(/^#\/components\/examples\//,"").replace(/^#\/components\/requestBodies\//,"").replace(/^#\/components\/headers\//,"").replace(/^#\/components\/securitySchemes\//,"").replace(/^#\/components\/links\//,"").replace(/^#\/components\/callbacks\//,""),r=b(t),a=de(e.basename(t));return r?O(r,a):a}(E(n)||"");if($e(a)){const e=(o=a,Ee.get(o));r.path=a,e&&(r.type=e,r.base=e)}else if(a){const e=this.getTypeNameByRef(function(e){const n=e.lastIndexOf("/");return je(-1===n?e:e.substring(n,e.length))}(a),function(e,n){return e?n&&n.match(/^(#\/)/g)?e:e.match(/^(#\/)/g)?`${n}${e}`:O(b(n),e):n.match(/^(#\/)/g)?"":n}(n,t));r.path=a,r.type=e,r.base=e,r.imports.push({name:e,alias:"",path:a})}var o;return r}function He(e){const n=function(e="1.0"){return e.replace(/^v/gi,"")}(e.info.version),t=function(e){var n;const t=null===(n=e.servers)||void 0===n?void 0:n[0],r=(null==t?void 0:t.variables)||{};let a=(null==t?void 0:t.url)||"";for(const e in r)r.hasOwnProperty(e)&&(a=a.replace(`{${e}}`,r[e].default));return a}(e);return{version:n,server:t,models:this.getModels(e),services:this.getServices(e)}}class Ie{constructor(e){this.parse=He,this.getModels=he,this.getType=De,this.getModel=pe,this.getModelComposition=ce,this.getModelProperties=fe,this.getServices=Se,this.getOperationParameters=xe,this.getOperationParameter=Oe,this.getOperation=be,this.getOperationResponses=qe,this.getOperationResponse=we,this.getOperationRequestBody=ke,this._context=e}get context(){return this._context}getTypeNameByRef(e,n){if(n){const t=this.context.get(n);if(t.enum&&"boolean"!==t)return`${this.context.prefix.enum}${e}`;if(t.oneOf||t.anyOf||t.allOf||["string","number","integer","boolean","array"].includes(t.type))return`${this.context.prefix.type}${e}`;if("object"===t.type)return`${this.context.prefix.interface}${e}`}return e}}l.promisify(r.readFile);const Ne=l.promisify(r.writeFile),_e=l.promisify(r.copyFile),Be=l.promisify(r.exists),Me=d.default,Ue=e=>new Promise(((n,t)=>{f.default(e,(e=>{e?t(e):n()}))}));function Le(n,t,r){if(!n.$ref||e.isAbsolute(n.$ref)||n.$ref.match(/^(http:\/\/|https:\/\/|#\/)/g))for(const e of Object.keys(n))n[e]instanceof Object&&Le(n[e],t,r);else n.$ref=O(r,n.$ref);return n}var Fe;function Ve(e){var n;return null===(n=null==e?void 0:e.enum)||void 0===n?void 0:n.filter(((e,n,t)=>t.findIndex((n=>n.name===e.name))===n))}function We(e){var n;return null===(n=null==e?void 0:e.enums)||void 0===n?void 0:n.filter(((e,n,t)=>t.findIndex((n=>n.name===e.name))===n))}function Qe(e,n){return e instanceof Object&&"name"in e&&"alias"in e&&"path"in e?function(e,n){const t=`${e.path}${e.name}`.toLowerCase(),r=`${n.path}${n.name}`.toLowerCase();return t.localeCompare(r,"en")}(e,n):function(e,n){const t=e.toLowerCase(),r=n.toLowerCase();return t.localeCompare(r,"en")}(e,n)}function ze(e){var n,t,r;return null===(r=null===(t=null===(n=null==e?void 0:e.imports)||void 0===n?void 0:n.filter(W))||void 0===t?void 0:t.sort(Qe))||void 0===r?void 0:r.filter((n=>e.name!==n.name))}function Je(e,n){const t=[];return e.map(n).forEach((e=>{t.push(...e)})),t}function Ze(e){const n=Object.assign({},e);return n.operations=function(e){const n=new Map;return e.operations.map((t=>{const r=Object.assign({},t);r.imports.push(...Je(r.parameters,(n=>n.imports.map((n=>e.imports.filter((e=>e.path===n.path))[0]))))),r.imports.push(...Je(r.results,(n=>n.imports.map((n=>e.imports.filter((e=>e.path===n.path))[0])))));const a=r.name,o=n.get(a)||0;return o>0&&(r.name=`${a}${o}`),n.set(a,o+1),r}))}(n),n.operations.forEach((e=>{n.imports.push(...e.imports)})),n.imports=n.imports.filter(W),n.imports=function(e){return e.imports.filter(W).sort(Qe).filter((n=>e.name!==n.name))}(n),n}function Ge(e){return Object.assign(Object.assign({},e),{models:e.models.map((e=>function(e){return Object.assign(Object.assign({},e),{imports:ze(e),enums:We(e),enum:Ve(e)})}(e))),services:e.services.map((e=>Ze(e)))})}!function(e){e[e.V2=2]="V2",e[e.V3=3]="V3"}(Fe||(Fe={}));var Xe={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nimport type { ApiResult } from './ApiResult';\n\nexport class ApiError extends Error {\n public readonly url: string;\n public readonly status: number;\n public readonly statusText: string;\n public readonly body: any;\n\n constructor(response: ApiResult, message: string) {\n super(message);\n\n this.url = response.url;\n this.status = response.status;\n this.statusText = response.statusText;\n this.body = response.body;\n }\n}"},usePartial:!0,useData:!0},Ke={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nexport type ApiRequestOptions = {\n readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH';\n readonly path: string;\n readonly cookies?: Record<string, any>;\n readonly headers?: Record<string, any>;\n readonly query?: Record<string, any>;\n readonly formData?: Record<string, any>;\n readonly body?: any;\n readonly mediaType?: string;\n readonly responseHeader?: string;\n // TODO TS2344: Redesign the logic for generating errors. Use the string value of the error code.\n // @ts-ignore\n readonly errors?: Record<number, string>;\n}"},usePartial:!0,useData:!0},Ye={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nexport type ApiResult = {\n readonly url: string;\n readonly ok: boolean;\n readonly status: number;\n readonly statusText: string;\n readonly body: any;\n}"},usePartial:!0,useData:!0},en={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"export enum EHTTP_STATUS_CODES {\n BAD_REQUEST = 400,\n UNAUTHORIZED = 401,\n FORBIDDEN = 403,\n NOT_FOUND = 404,\n INTERNAL_SERVER_ERROR = 500,\n BAD_GATEWAY = 502,\n SERVICE_UNAVAILABLE = 503,\n}\n\nexport enum EHTTP_STATUS_NAME {\n BAD_REQUEST = 'Bad Request',\n UNAUTHORIZED = 'Unauthorized',\n FORBIDDEN = 'Forbidden',\n NOT_FOUND = 'Not Found',\n INTERNAL_SERVER_ERROR = 'Internal Server Error',\n BAD_GATEWAY = 'Bad Gateway',\n SERVICE_UNAVAILABLE = 'Service Unavailable',\n}"},useData:!0},nn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function getHeaders(options: ApiRequestOptions): Promise<AxiosRequestHeaders> {\n const token = await resolve(options, OpenAPI.TOKEN);\n const username = await resolve(options, OpenAPI.USERNAME);\n const password = await resolve(options, OpenAPI.PASSWORD);\n const defaultHeaders = await resolve(options, OpenAPI.HEADERS);\n\n const headers: AxiosRequestHeaders = {\n Accept: 'application/json',\n ...defaultHeaders,\n ...options.headers,\n };\n\n if (isStringWithValue(token)) {\n headers['Authorization'] = `Bearer ${token}`;\n }\n\n if (isStringWithValue(username) && isStringWithValue(password)) {\n const credentials = Buffer.from(`${username}:${password}`).toString('base64');\n headers['Authorization'] = `Bearer ${credentials}`;\n }\n\n if (options.body) {\n if (options.mediaType) {\n headers['Content-Type'] = options.mediaType;\n } else if (isBinary(options.body)) {\n headers['Content-Type'] = 'application/octet-stream';\n } else if (isString(options.body)) {\n headers['Content-Type'] = 'text/plain';\n } else {\n headers['Content-Type'] = 'application/json';\n }\n }\n return headers;\n}"},useData:!0},tn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getRequestBody(options: ApiRequestOptions): any {\n if (options.formData) {\n return getFormData(options.formData);\n }\n if (options.body) {\n if (options.mediaType?.includes('/json')) {\n return JSON.stringify(options.body)\n } else if (isString(options.body) || isBinary(options.body)) {\n return options.body;\n } else {\n return JSON.stringify(options.body);\n }\n }\n return undefined;\n}"},useData:!0},rn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getResponseBody(response: AxiosResponse): any {\n try {\n const contentType = response.headers['content-type'];\n if (contentType) {\n const isJSON = typeof contentType === 'string' && contentType.toLowerCase().startsWith('application/json');\n\n if (isJSON && isString(response.data)) {\n return JSON.parse(response.data);\n } else {\n return response.data;\n }\n }\n } catch (error) {\n console.error(error);\n }\n return null;\n}"},useData:!0},an={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getResponseHeader(response: AxiosResponse, responseHeader?: string): string | null {\n if (responseHeader) {\n let content = '';\n\n Object.keys(response.headers).forEach((header) => {\n if (header === responseHeader) {\n content = header;\n }\n });\n\n if (isString(content)) {\n return content;\n }\n }\n return null;\n}"},useData:!0},on={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nimport axios from 'axios';\nimport type { AxiosError, AxiosRequestConfig, AxiosResponse, AxiosRequestHeaders } from 'axios';\nimport FormData from 'form-data';\nimport { types } from 'util';\n\nimport { ApiError } from './ApiError';\nimport type { ApiRequestOptions } from './ApiRequestOptions';\nimport type { ApiResult } from './ApiResult';\nimport { CancelablePromise } from './CancelablePromise';\nimport { OpenAPI } from './OpenAPI';\nimport { EHTTP_STATUS_CODES, EHTTP_STATUS_NAME } from './HttpStatusCode';\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isDefined"),n,{name:"functions/isDefined",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isString"),n,{name:"functions/isString",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isStringWithValue"),n,{name:"functions/isStringWithValue",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isBinary"),n,{name:"functions/isBinary",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isSuccess"),n,{name:"functions/isSuccess",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/getQueryString"),n,{name:"functions/getQueryString",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/getUrl"),n,{name:"functions/getUrl",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/getFormData"),n,{name:"functions/getFormData",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/resolve"),n,{name:"functions/resolve",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"axios/getRequestBody"),n,{name:"axios/getRequestBody",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"axios/sendRequest"),n,{name:"axios/sendRequest",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"axios/getHeaders"),n,{name:"axios/getHeaders",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"axios/getResponseHeader"),n,{name:"axios/getResponseHeader",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"axios/getResponseBody"),n,{name:"axios/getResponseBody",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/catchErrors"),n,{name:"functions/catchErrors",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n/**\n * Request using axios client\n * @param options The request options from the the service\n * @returns ApiResult\n * @throws ApiError\n */\n export function request<T>(options: ApiRequestOptions): CancelablePromise<T> {\n return new CancelablePromise(async(resolve, reject, onCancel) => {\n try {\n const url = getUrl(options);\n \n if (!onCancel.isCancelled) {\n const response = await sendRequest<T>(options, url, onCancel);\n const responseBody = getResponseBody(response);\n const responseHeader = getResponseHeader(response, options.responseHeader);\n const result: ApiResult = {\n url,\n ok: isSuccess(response.status),\n status: response.status,\n statusText: response.statusText,\n body: responseHeader || responseBody,\n };\n\n catchErrors(options, result);\n resolve(result.body);\n }\n } catch (error) {\n reject(error);\n }\n });\n}"},usePartial:!0,useData:!0},ln={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function sendRequest<T>(options: ApiRequestOptions, url: string, onCancel: (cancelHandler: () => void) => void): Promise<AxiosResponse<T>> {\n const source = axios.CancelToken.source();\n \n const requestConfig: AxiosRequestConfig = {\n method: options.method,\n headers: await getHeaders(options),\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n data: getRequestBody(options),\n url,\n cancelToken: source.token,\n };\n\n onCancel(() => source.cancel('The user aborted a request.'));\n\n try {\n\t\treturn await axios.request(requestConfig);\n\t} catch (error) {\n\t\tconst axiosError = error as AxiosError<T>;\n\t\tif (axiosError.response) {\n\t\t\treturn axiosError.response;\n\t\t}\n\t\tthrow error;\n\t}\n}"},useData:!0},sn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function getHeaders(options: ApiRequestOptions): Promise<Headers> {\n const token = await resolve(options, OpenAPI.TOKEN);\n const username = await resolve(options, OpenAPI.USERNAME);\n const password = await resolve(options, OpenAPI.PASSWORD);\n const defaultHeaders = await resolve(options, OpenAPI.HEADERS);\n\n const headers = new Headers({\n Accept: 'application/json',\n ...defaultHeaders,\n ...options.headers,\n });\n\n if (isStringWithValue(token)) {\n headers.append('Authorization', `Bearer ${token}`);\n }\n\n if (isStringWithValue(username) && isStringWithValue(password)) {\n const credentials = btoa(`${username}:${password}`);\n headers.append('Authorization', `Basic ${credentials}`);\n }\n\n if (options.body) {\n if (options.mediaType) {\n headers.append('Content-Type', options.mediaType);\n } else if (isBlob(options.body)) {\n headers.append('Content-Type', options.body.type || 'application/octet-stream');\n } else if (isString(options.body)) {\n headers.append('Content-Type', 'text/plain');\n } else {\n headers.append('Content-Type', 'application/json');\n }\n }\n return headers;\n}"},useData:!0},un={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getRequestBody(options: ApiRequestOptions): BodyInit | undefined {\n if (options.formData) {\n return getFormData(options.formData);\n }\n if (options.body) {\n if (options.mediaType?.includes('/json')) {\n return JSON.stringify(options.body)\n } else if (isString(options.body) || isBlob(options.body)) {\n return options.body;\n } else {\n return JSON.stringify(options.body);\n }\n }\n return undefined;\n}"},useData:!0},pn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function getResponseBody(response: Response): Promise<any> {\n try {\n const contentType = response.headers.get('Content-Type');\n if (contentType) {\n const isJSON = contentType.toLowerCase().startsWith('application/json');\n if (isJSON) {\n return await response.json();\n } else {\n return await response.text();\n }\n }\n } catch (error) {\n console.error(error);\n }\n return null;\n}"},useData:!0},cn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getResponseHeader(response: Response, responseHeader?: string): string | null {\n if (responseHeader) {\n const content = response.headers.get(responseHeader);\n if (isString(content)) {\n return content;\n }\n }\n return null;\n}"},useData:!0},mn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nimport { ApiError } from './ApiError';\nimport type { ApiRequestOptions } from './ApiRequestOptions';\nimport type { ApiResult } from './ApiResult';\nimport { CancelablePromise } from './CancelablePromise';\nimport { OpenAPI } from './OpenAPI';\nimport { EHTTP_STATUS_CODES, EHTTP_STATUS_NAME } from './HttpStatusCode';\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isDefined"),n,{name:"functions/isDefined",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isString"),n,{name:"functions/isString",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isStringWithValue"),n,{name:"functions/isStringWithValue",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isBlob"),n,{name:"functions/isBlob",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/getQueryString"),n,{name:"functions/getQueryString",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/getUrl"),n,{name:"functions/getUrl",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/getFormData"),n,{name:"functions/getFormData",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/resolve"),n,{name:"functions/resolve",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"fetch/getHeaders"),n,{name:"fetch/getHeaders",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"fetch/getRequestBody"),n,{name:"fetch/getRequestBody",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"fetch/sendRequest"),n,{name:"fetch/sendRequest",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"fetch/getResponseHeader"),n,{name:"fetch/getResponseHeader",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"fetch/getResponseBody"),n,{name:"fetch/getResponseBody",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/catchErrors"),n,{name:"functions/catchErrors",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n/**\n * Request using fetch client\n * @param options The request options from the the service\n * @returns ApiResult\n * @throws ApiError\n */\nexport function request<T>(options: ApiRequestOptions): CancelablePromise<T> {\n return new CancelablePromise(async(resolve, reject, onCancel) => {\n try {\n const url = getUrl(options);\n\n if (!onCancel.isCancelled) {\n const response = await sendRequest(options, url, onCancel);\n const responseBody = await getResponseBody(response);\n const responseHeader = getResponseHeader(response, options.responseHeader);\n const result: ApiResult = {\n url,\n ok: response.ok,\n status: response.status,\n statusText: response.statusText,\n body: responseHeader || responseBody,\n };\n catchErrors(options, result);\n resolve(result.body);\n }\n } catch (error) {\n reject(error);\n }\n });\n}"},usePartial:!0,useData:!0},dn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function sendRequest(options: ApiRequestOptions, url: string, onCancel: (cancelHandler: () => void) => void): Promise<Response> {\n const controller = new AbortController();\n\n const request: RequestInit = {\n method: options.method,\n headers: await getHeaders(options),\n body: getRequestBody(options),\n signal: controller.signal,\n };\n\n if (OpenAPI.WITH_CREDENTIALS) {\n request.credentials = 'include';\n }\n \n onCancel(() => controller.abort());\n\n return await fetch(url, request);\n}"},useData:!0},fn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function catchErrors(options: ApiRequestOptions, result: ApiResult): void {\n const errors: Record<string, string> = {\n [EHTTP_STATUS_CODES.BAD_GATEWAY]: EHTTP_STATUS_NAME.BAD_GATEWAY,\n [EHTTP_STATUS_CODES.BAD_REQUEST]: EHTTP_STATUS_NAME.BAD_REQUEST,\n [EHTTP_STATUS_CODES.FORBIDDEN]: EHTTP_STATUS_NAME.FORBIDDEN,\n [EHTTP_STATUS_CODES.INTERNAL_SERVER_ERROR]: EHTTP_STATUS_NAME.INTERNAL_SERVER_ERROR,\n [EHTTP_STATUS_CODES.NOT_FOUND]: EHTTP_STATUS_NAME.NOT_FOUND,\n [EHTTP_STATUS_CODES.SERVICE_UNAVAILABLE]: EHTTP_STATUS_NAME.SERVICE_UNAVAILABLE,\n [EHTTP_STATUS_CODES.UNAUTHORIZED]: EHTTP_STATUS_NAME.UNAUTHORIZED,\n ...options.errors,\n }\n\n const error = errors[result.status];\n if (error) {\n throw new ApiError(result, error);\n }\n\n if (!result.ok) {\n throw new ApiError(result, 'Generic Error');\n }\n}"},useData:!0},hn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getFormData(params: Record<string, any>): FormData {\n const formData = new FormData();\n Object.keys(params).forEach(key => {\n const value = params[key];\n if (isDefined(value)) {\n formData.append(key, value);\n }\n });\n return formData;\n}"},useData:!0},yn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getQueryString(params: Record<string, any>): string {\n const qs: string[] = [];\n Object.keys(params).forEach(key => {\n const value = params[key];\n if (isDefined(value)) {\n if (Array.isArray(value)) {\n value.forEach(value => {\n qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);\n });\n } else {\n qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);\n }\n }\n });\n if (qs.length > 0) {\n return `?${qs.join('&')}`;\n }\n return '';\n}"},useData:!0},vn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getUrl(options: ApiRequestOptions): string {\n const path = options.path.replace(/[:]/g, '_');\n const url = `${OpenAPI.BASE}${path}`;\n\n if (options.query) {\n return `${url}${getQueryString(options.query)}`;\n }\n return url;\n}"},useData:!0},gn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function isBinary(value: any): value is Buffer | ArrayBuffer | ArrayBufferView {\n const isBuffer = Buffer.isBuffer(value);\n const isArrayBuffer = types.isArrayBuffer(value);\n const isArrayBufferView = types.isArrayBufferView(value);\n return isBuffer || isArrayBuffer || isArrayBufferView;\n}"},useData:!0},Pn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function isBlob(value: any): value is Blob {\n return value instanceof Blob;\n}"},useData:!0},bn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function isDefined<T>(value: T | null | undefined): value is Exclude<T, null | undefined> {\n return value !== undefined && value !== null;\n}"},useData:!0},On={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function isString(value: any): value is string {\n return typeof value === 'string';\n}"},useData:!0},xn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function isStringWithValue(value: any): value is string {\n return isString(value) && value !== '';\n}"},useData:!0},Rn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function isSuccess(status: number): boolean {\n return status >= 200 && status < 300;\n}"},useData:!0},kn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;\n\nasync function resolve<T>(options: ApiRequestOptions, resolver?: T | Resolver<T>): Promise<T | undefined> {\n if (typeof resolver === 'function') {\n return (resolver as Resolver<T>)(options);\n }\n return resolver;\n}"},useData:!0},wn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function getHeaders(options: ApiRequestOptions): Promise<Headers> {\n const token = await resolve(options, OpenAPI.TOKEN);\n const username = await resolve(options, OpenAPI.USERNAME);\n const password = await resolve(options, OpenAPI.PASSWORD);\n const defaultHeaders = await resolve(options, OpenAPI.HEADERS);\n\n const headers = new Headers({\n Accept: 'application/json',\n ...defaultHeaders,\n ...options.headers,\n });\n\n if (isStringWithValue(token)) {\n headers.append('Authorization', `Bearer ${token}`);\n }\n\n if (isStringWithValue(username) && isStringWithValue(password)) {\n const credentials = Buffer.from(`${username}:${password}`).toString('base64');\n headers.append('Authorization', `Basic ${credentials}`);\n }\n\n if (options.body) {\n if (options.mediaType) {\n headers.append('Content-Type', options.mediaType);\n } else if (isBinary(options.body)) {\n headers.append('Content-Type', 'application/octet-stream');\n } else if (isString(options.body)) {\n headers.append('Content-Type', 'text/plain');\n } else {\n headers.append('Content-Type', 'application/json');\n }\n }\n return headers;\n}"},useData:!0},Cn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getRequestBody(options: ApiRequestOptions): BodyInit | undefined {\n if (options.formData) {\n return getFormData(options.formData);\n }\n if (options.body) {\n if (options.mediaType?.includes('/json')) {\n return JSON.stringify(options.body)\n } else if (isString(options.body) || isBinary(options.body)) {\n return options.body;\n } else {\n return JSON.stringify(options.body);\n }\n }\n return undefined;\n}"},useData:!0},qn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function getResponseBody(response: Response): Promise<any> {\n try {\n const contentType = response.headers.get('Content-Type');\n if (contentType) {\n const isJSON = contentType.toLowerCase().startsWith('application/json');\n if (isJSON) {\n return await response.json();\n } else {\n return await response.text();\n }\n }\n } catch (error) {\n console.error(error);\n }\n return null;\n}"},useData:!0},An={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getResponseHeader(response: Response, responseHeader?: string): string | null {\n if (responseHeader) {\n const content = response.headers.get(responseHeader);\n if (isString(content)) {\n return content;\n }\n }\n return null;\n}"},useData:!0},Tn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nimport { AbortController } from 'abort-controller';\nimport FormData from 'form-data';\nimport fetch, { BodyInit, Headers, RequestInit, Response } from 'node-fetch';\nimport { types } from 'util';\n\nimport { ApiError } from './ApiError';\nimport type { ApiRequestOptions } from './ApiRequestOptions';\nimport type { ApiResult } from './ApiResult';\nimport { CancelablePromise } from './CancelablePromise';\nimport { OpenAPI } from './OpenAPI';\nimport { EHTTP_STATUS_CODES, EHTTP_STATUS_NAME } from './HttpStatusCode';\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isDefined"),n,{name:"functions/isDefined",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isString"),n,{name:"functions/isString",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isStringWithValue"),n,{name:"functions/isStringWithValue",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isBinary"),n,{name:"functions/isBinary",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/getQueryString"),n,{name:"functions/getQueryString",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/getUrl"),n,{name:"functions/getUrl",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/getFormData"),n,{name:"functions/getFormData",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/resolve"),n,{name:"functions/resolve",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"node/getHeaders"),n,{name:"node/getHeaders",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"node/getRequestBody"),n,{name:"node/getRequestBody",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"node/sendRequest"),n,{name:"node/sendRequest",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"node/getResponseHeader"),n,{name:"node/getResponseHeader",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"node/getResponseBody"),n,{name:"node/getResponseBody",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/catchErrors"),n,{name:"functions/catchErrors",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n/**\n * Request using node-fetch client\n * @param options The request options from the the service\n * @returns ApiResult\n * @throws ApiError\n */\nexport function request<T>(options: ApiRequestOptions): CancelablePromise<T> {\n return new CancelablePromise(async (resolve, reject, onCancel) => {\n try {\n const url = getUrl(options);\n\n if (!onCancel.isCancelled) {\n const response = await sendRequest(options, url, onCancel);\n const responseBody = await getResponseBody(response);\n const responseHeader = getResponseHeader(response, options.responseHeader);\n const result: ApiResult = {\n url,\n ok: response.ok,\n status: response.status,\n statusText: response.statusText,\n body: responseHeader || responseBody,\n };\n\n catchErrors(options, result);\n resolve(result.body);\n }\n } catch (error) {\n reject(error);\n }\n });\n}"},usePartial:!0,useData:!0},Sn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function sendRequest(options: ApiRequestOptions, url: string, onCancel: (cancelHandler: () => void) => void): Promise<Response> {\n const controller = new AbortController();\n\n const request: RequestInit = {\n method: options.method,\n headers: await getHeaders(options),\n body: getRequestBody(options),\n signal: controller.signal,\n };\n \n onCancel(() => controller.abort());\n\n return await fetch(url, request);\n}"},useData:!0},jn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(s(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nimport type { ApiRequestOptions } from './ApiRequestOptions';\n\ntype Resolver<T> = (options: ApiRequestOptions) => Promise<T>;\ntype Headers = Record<string, string>;\n\ntype Config = {\n BASE: string;\n VERSION: string;\n WITH_CREDENTIALS: boolean;\n TOKEN?: string | Resolver<string>;\n USERNAME?: string | Resolver<string>;\n PASSWORD?: string | Resolver<string>;\n HEADERS?: Headers | Resolver<Headers>;\n}\n\nexport const OpenAPI: Config = {\n BASE: '"+(null!=(o=i(l(n,"server",{start:{line:19,column:14},end:{line:19,column:20}}),n))?o:"")+"',\n VERSION: '"+(null!=(o=i(l(n,"version",{start:{line:20,column:17},end:{line:20,column:24}}),n))?o:"")+"',\n WITH_CREDENTIALS: false,\n TOKEN: undefined,\n USERNAME: undefined,\n PASSWORD: undefined,\n HEADERS: undefined,\n};"},usePartial:!0,useData:!0},En={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\nexport interface ICancelProps {\n readonly isResolved: boolean;\n readonly isRejected: boolean;\n readonly isCancelled: boolean;\n\n (cancelHandler: () => void): void;\n}\n\nexport class CancelablePromise<T> implements Promise<T> {\n readonly [Symbol.toStringTag]!: string;\n\n private _isResolved: boolean;\n private _isRejected: boolean;\n private _isCancelled: boolean;\n private readonly _cancelHandlers: (() => void)[];\n private readonly _promise: Promise<T>;\n private _resolve?: (value: T | PromiseLike<T>) => void;\n private _reject?: (reason?: any) => void;\n\n constructor(executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void, onCancel: ICancelProps) => void) {\n this._isResolved = false;\n this._isRejected = false;\n this._isCancelled = false;\n this._cancelHandlers = [];\n this._promise = new Promise<T>((resolve, reject) => {\n this._resolve = resolve;\n this._reject = reject;\n\n const onResolve = (value: T | PromiseLike<T>): void => {\n if (this._isResolved || this._isRejected || this._isCancelled) {\n return;\n }\n this._isResolved = true;\n this._resolve?.(value);\n };\n\n const onReject = (reason?: any): void => {\n if (this._isResolved || this._isRejected || this._isCancelled) {\n return;\n }\n this._isRejected = true;\n this._reject?.(reason);\n };\n\n const onCancel = (cancelHandler: () => void): void => {\n if (this._isResolved || this._isRejected || this._isCancelled) {\n return;\n }\n this._cancelHandlers.push(cancelHandler);\n };\n\n Object.defineProperty(onCancel, 'isResolved', {\n get: (): boolean => this._isResolved,\n });\n\n Object.defineProperty(onCancel, 'isRejected', {\n get: (): boolean => this._isRejected,\n });\n\n Object.defineProperty(onCancel, 'isCancelled', {\n get: (): boolean => this._isCancelled,\n });\n\n return executor(onResolve, onReject, onCancel as ICancelProps);\n });\n }\n\n public then<TResult1 = T, TResult2 = never>(\n onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,\n onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null\n ): Promise<TResult1 | TResult2> {\n return this._promise.then(onFulfilled, onRejected);\n }\n\n public catch<TResult = never>(onRejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null): Promise<T | TResult> {\n return this._promise.catch(onRejected);\n }\n\n public finally(onFinally?: (() => void) | null): Promise<T> {\n return this._promise.finally(onFinally);\n }\n\n public cancel(): void {\n if (this._isResolved || this._isRejected || this._isCancelled) {\n return;\n }\n this._isCancelled = true;\n if (this._cancelHandlers.length) {\n try {\n for (const cancelHandler of this._cancelHandlers) {\n cancelHandler();\n }\n } catch (error) {\n console.warn('Cancellation threw an error', error);\n return;\n }\n }\n this._cancelHandlers.length = 0;\n this._reject?.(new Error('CancelError: Request aborted'));\n }\n}"},useData:!0},$n={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"fetch/request"),n,{name:"fetch/request",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},3:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"xhr/request"),n,{name:"xhr/request",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},5:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"node/request"),n,{name:"node/request",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},7:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"axios/request"),n,{name:"axios/request",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=i(t,"equals").call(l,i(i(a,"root"),"httpClient"),"fetch",{name:"equals",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:1,column:67}}}))?o:"")+(null!=(o=i(t,"equals").call(l,i(i(a,"root"),"httpClient"),"xhr",{name:"equals",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:0},end:{line:2,column:63}}}))?o:"")+(null!=(o=i(t,"equals").call(l,i(i(a,"root"),"httpClient"),"node",{name:"equals",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:3,column:65}}}))?o:"")+(null!=(o=i(t,"equals").call(l,i(i(a,"root"),"httpClient"),"axios",{name:"equals",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:4,column:67}}}))?o:"")},usePartial:!0,useData:!0},Dn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function getHeaders(options: ApiRequestOptions): Promise<Headers> {\n const token = await resolve(options, OpenAPI.TOKEN);\n const username = await resolve(options, OpenAPI.USERNAME);\n const password = await resolve(options, OpenAPI.PASSWORD);\n const defaultHeaders = await resolve(options, OpenAPI.HEADERS);\n\n const headers = new Headers({\n Accept: 'application/json',\n ...defaultHeaders,\n ...options.headers,\n });\n\n if (isStringWithValue(token)) {\n headers.append('Authorization', `Bearer ${token}`);\n }\n\n if (isStringWithValue(username) && isStringWithValue(password)) {\n const credentials = btoa(`${username}:${password}`);\n headers.append('Authorization', `Basic ${credentials}`);\n }\n\n if (options.body) {\n if (options.mediaType) {\n headers.append('Content-Type', options.mediaType);\n } else if (isBlob(options.body)) {\n headers.append('Content-Type', options.body.type || 'application/octet-stream');\n } else if (isString(options.body)) {\n headers.append('Content-Type', 'text/plain');\n } else {\n headers.append('Content-Type', 'application/json');\n }\n }\n return headers;\n}"},useData:!0},Hn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getRequestBody(options: ApiRequestOptions): any {\n if (options.formData) {\n return getFormData(options.formData);\n }\n if (options.body) {\n if (options.mediaType?.includes('/json')) {\n return JSON.stringify(options.body)\n } else if (isString(options.body) || isBlob(options.body)) {\n return options.body;\n } else {\n return JSON.stringify(options.body);\n }\n }\n return undefined;\n}"},useData:!0},In={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getResponseBody(xhr: XMLHttpRequest): any {\n try {\n const contentType = xhr.getResponseHeader('Content-Type');\n if (contentType) {\n const isJSON = contentType.toLowerCase().startsWith('application/json');\n if (isJSON) {\n return JSON.parse(xhr.responseText);\n } else {\n return xhr.responseText;\n }\n }\n } catch (error) {\n console.error(error);\n }\n return null;\n}"},useData:!0},Nn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getResponseHeader(xhr: XMLHttpRequest, responseHeader?: string): string | null {\n if (responseHeader) {\n const content = xhr.getResponseHeader(responseHeader);\n if (isString(content)) {\n return content;\n }\n }\n return null;\n}"},useData:!0},_n={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nimport { ApiError } from './ApiError';\nimport type { ApiRequestOptions } from './ApiRequestOptions';\nimport type { ApiResult } from './ApiResult';\nimport { CancelablePromise } from './CancelablePromise';\nimport { OpenAPI } from './OpenAPI';\nimport { EHTTP_STATUS_CODES, EHTTP_STATUS_NAME } from './HttpStatusCode';\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isDefined"),n,{name:"functions/isDefined",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isString"),n,{name:"functions/isString",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isStringWithValue"),n,{name:"functions/isStringWithValue",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isBlob"),n,{name:"functions/isBlob",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isSuccess"),n,{name:"functions/isSuccess",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/getQueryString"),n,{name:"functions/getQueryString",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/getUrl"),n,{name:"functions/getUrl",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/getFormData"),n,{name:"functions/getFormData",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/resolve"),n,{name:"functions/resolve",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"fetch/getHeaders"),n,{name:"fetch/getHeaders",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"xhr/getRequestBody"),n,{name:"xhr/getRequestBody",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"xhr/sendRequest"),n,{name:"xhr/sendRequest",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"xhr/getResponseHeader"),n,{name:"xhr/getResponseHeader",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"xhr/getResponseBody"),n,{name:"xhr/getResponseBody",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/catchErrors"),n,{name:"functions/catchErrors",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n/**\n * Request using XHR client\n * @param options The request options from the the service\n * @returns ApiResult\n * @throws ApiError\n */\nexport function request<T>(options: ApiRequestOptions): CancelablePromise<T> {\n return new CancelablePromise(async (resolve, reject, onCancel) => {\n try {\n const url = getUrl(options);\n\n if (!onCancel.isCancelled) {\n const response = await sendRequest(options, url, onCancel);\n const responseBody = getResponseBody(response);\n const responseHeader = getResponseHeader(response, options.responseHeader);\n const result: ApiResult = {\n url,\n ok: isSuccess(response.status),\n status: response.status,\n statusText: response.statusText,\n body: responseHeader || responseBody,\n };\n\n catchErrors(options, result);\n resolve(result.body);\n }\n } catch (error) {\n reject(error);\n }\n });\n}"},usePartial:!0,useData:!0},Bn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function sendRequest(options: ApiRequestOptions, url: string, onCancel: (cancelHandler: () => void) => void): Promise<XMLHttpRequest> {\n\n const xhr = new XMLHttpRequest();\n xhr.open(options.method, url, true);\n xhr.withCredentials = OpenAPI.WITH_CREDENTIALS;\n\n const headers = await getHeaders(options);\n headers.forEach((value: string, key: string) => {\n xhr.setRequestHeader(key, value);\n });\n\n return new Promise<XMLHttpRequest>((resolve, reject) => {\n xhr.onreadystatechange = () => {\n if (xhr.readyState === XMLHttpRequest.DONE) {\n resolve(xhr);\n }\n // TODO разобраться с ситуацией!\n console.log(xhr.readyState);\n if (xhr.readyState === XMLHttpRequest.DONE) {\n reject();\n }\n };\n xhr.send(getRequestBody(options));\n\n onCancel(() => xhr.abort());\n });\n}"},useData:!0},Mn={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"imports"),{name:"each",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:5,column:0},end:{line:7,column:9}}}))?o:"")},2:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"import type { "+(null!=(o=i(l(n,"name",{start:{line:6,column:17},end:{line:6,column:21}}),n))?o:"")+(null!=(o=s(t,"if").call(null!=n?n:e.nullContext||{},s(n,"alias"),{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:6,column:24},end:{line:6,column:59}}}))?o:"")+" } from './"+(null!=(o=i(l(n,"path",{start:{line:6,column:73},end:{line:6,column:77}}),n))?o:"")+"';\n"},3:function(e,n,t,r,a){var o;return" as "+(null!=(o=e.lambda(e.strict(n,"alias",{start:{line:6,column:44},end:{line:6,column:49}}),n))?o:"")},5:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"exportInterface"),n,{name:"exportInterface",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},7:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"one-of",{name:"equals",hash:{},fn:e.program(8,a,0),inverse:e.program(10,a,0),data:a,loc:{start:{line:12,column:0},end:{line:22,column:0}}}))?o:""},8:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"exportComposition"),n,{name:"exportComposition",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},10:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"any-of",{name:"equals",hash:{},fn:e.program(8,a,0),inverse:e.program(11,a,0),data:a,loc:{start:{line:14,column:0},end:{line:22,column:0}}}))?o:""},11:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"all-of",{name:"equals",hash:{},fn:e.program(8,a,0),inverse:e.program(12,a,0),data:a,loc:{start:{line:16,column:0},end:{line:22,column:0}}}))?o:""},12:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"enum",{name:"equals",hash:{},fn:e.program(13,a,0),inverse:e.program(15,a,0),data:a,loc:{start:{line:18,column:0},end:{line:22,column:0}}}))?o:""},13:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"exportEnum"),n,{name:"exportEnum",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},15:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"exportType"),n,{name:"exportType",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(i(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n"+(null!=(o=i(t,"if").call(l,i(n,"imports"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:8,column:7}}}))?o:"")+"\n"+(null!=(o=i(t,"equals").call(l,i(n,"export"),"interface",{name:"equals",hash:{},fn:e.program(5,a,0),inverse:e.program(7,a,0),data:a,loc:{start:{line:10,column:0},end:{line:22,column:11}}}))?o:"")},usePartial:!0,useData:!0},Un={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nexport const "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:3,column:16},end:{line:3,column:20}}),n))?o:"")+"Schema = "+(null!=(o=e.invokePartial(l(r,"schema"),n,{name:"schema",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+";"},usePartial:!0,useData:!0},Ln={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"imports"),{name:"each",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:6,column:9}}}))?o:""},2:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"import type { "+(null!=(o=i(l(n,"name",{start:{line:5,column:17},end:{line:5,column:21}}),n))?o:"")+(null!=(o=s(t,"if").call(null!=n?n:e.nullContext||{},s(n,"alias"),{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:5,column:24},end:{line:5,column:59}}}))?o:"")+" } from '"+(null!=(o=i(l(s(a,"root"),"outputModels",{start:{line:5,column:71},end:{line:5,column:89}}),n))?o:"")+(null!=(o=i(l(n,"path",{start:{line:5,column:95},end:{line:5,column:99}}),n))?o:"")+"';\n"},3:function(e,n,t,r,a){var o;return" as "+(null!=(o=e.lambda(e.strict(n,"alias",{start:{line:5,column:44},end:{line:5,column:49}}),n))?o:"")},5:function(e,n,t,r,a){var o;return"import { OpenAPI } from '"+(null!=(o=e.lambda(e.strict(n,"outputCore",{start:{line:12,column:28},end:{line:12,column:38}}),n))?o:"")+"OpenAPI';\n"},7:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"const "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:16,column:9},end:{line:16,column:13}}),n))?o:"")+" = ("+(null!=(o=e.invokePartial(l(r,"parameters"),n,{name:"parameters",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"): ApiRequestOptions => ({\n "+(null!=(o=e.invokePartial(l(r,"serviceOption"),n,{name:"serviceOption",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"});\n\n"},9:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:24,column:7},end:{line:24,column:11}}),n))?o:"")+": ("+(null!=(o=e.invokePartial(l(r,"parametersDefinition"),n,{name:"parametersDefinition",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+") => ApiRequestOptions;\n"},11:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda;return" "+(null!=(o=i(l(n,"name",{start:{line:30,column:7},end:{line:30,column:11}}),n))?o:"")+": "+(null!=(o=i(l(n,"name",{start:{line:30,column:19},end:{line:30,column:23}}),n))?o:"")+",\n"},13:function(e,n,t,r,a,o,l){var i,s=null!=n?n:e.nullContext||{},u=e.strict,p=e.lambda,c=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" /**\n"+(null!=(i=c(t,"if").call(s,c(n,"deprecated"),{name:"if",hash:{},fn:e.program(14,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:38,column:4},end:{line:40,column:11}}}))?i:"")+(null!=(i=c(t,"if").call(s,c(n,"summary"),{name:"if",hash:{},fn:e.program(16,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:41,column:4},end:{line:43,column:11}}}))?i:"")+(null!=(i=c(t,"if").call(s,c(n,"description"),{name:"if",hash:{},fn:e.program(18,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:44,column:4},end:{line:46,column:11}}}))?i:"")+(null!=(i=c(t,"unless").call(s,c(c(a,"root"),"useOptions"),{name:"unless",hash:{},fn:e.program(20,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:47,column:4},end:{line:53,column:15}}}))?i:"")+(null!=(i=c(t,"each").call(s,c(n,"results"),{name:"each",hash:{},fn:e.program(24,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:54,column:4},end:{line:56,column:13}}}))?i:"")+" * @throws ApiError\n */\n public static "+(null!=(i=p(u(n,"name",{start:{line:59,column:21},end:{line:59,column:25}}),n))?i:"")+"("+(null!=(i=e.invokePartial(c(r,"parameters"),n,{name:"parameters",data:a,helpers:t,partials:r,decorators:e.decorators}))?i:"")+"): CancelablePromise<"+(null!=(i=e.invokePartial(c(r,"result"),n,{name:"result",data:a,helpers:t,partials:r,decorators:e.decorators}))?i:"")+"> {\n return __request<"+(null!=(i=e.invokePartial(c(r,"result"),n,{name:"result",data:a,helpers:t,partials:r,decorators:e.decorators}))?i:"")+">("+(null!=(i=p(u(l[1],"originName",{start:{line:60,column:40},end:{line:60,column:53}}),n))?i:"")+"Options."+(null!=(i=p(u(n,"name",{start:{line:60,column:66},end:{line:60,column:70}}),n))?i:"")+"("+(null!=(i=e.invokePartial(c(r,"parameterValues"),n,{name:"parameterValues",data:a,helpers:t,partials:r,decorators:e.decorators}))?i:"")+"));\n }\n\n"},14:function(e,n,t,r,a){return" * @deprecated\n"},16:function(e,n,t,r,a){var o;return" * "+(null!=(o=e.lambda(e.strict(n,"summary",{start:{line:42,column:10},end:{line:42,column:17}}),n))?o:"")+"\n"},18:function(e,n,t,r,a){var o;return" * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:45,column:10},end:{line:45,column:21}}),n))?o:"")+"\n"},20:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"parameters"),{name:"if",hash:{},fn:e.program(21,a,0),inverse:e.noop,data:a,loc:{start:{line:48,column:4},end:{line:52,column:11}}}))?o:""},21:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"parameters"),{name:"each",hash:{},fn:e.program(22,a,0),inverse:e.noop,data:a,loc:{start:{line:49,column:4},end:{line:51,column:13}}}))?o:""},22:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda;return" * @param "+(null!=(o=i(l(n,"name",{start:{line:50,column:17},end:{line:50,column:21}}),n))?o:"")+" "+(null!=(o=i(l(n,"description",{start:{line:50,column:28},end:{line:50,column:39}}),n))?o:"")+"\n"},24:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda;return" * @returns "+(null!=(o=i(l(n,"type",{start:{line:55,column:19},end:{line:55,column:23}}),n))?o:"")+" "+(null!=(o=i(l(n,"description",{start:{line:55,column:30},end:{line:55,column:41}}),n))?o:"")+"\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a,o,l){var i,s=null!=n?n:e.nullContext||{},u=e.strict,p=e.lambda,c=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(i=e.invokePartial(c(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?i:"")+"\n"+(null!=(i=c(t,"if").call(s,c(n,"imports"),{name:"if",hash:{},fn:e.program(1,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:7,column:7}}}))?i:"")+"import type { CancelablePromise } from '"+(null!=(i=p(u(n,"outputCore",{start:{line:8,column:43},end:{line:8,column:53}}),n))?i:"")+"CancelablePromise';\nimport { request as __request } from '"+(null!=(i=p(u(n,"outputCore",{start:{line:9,column:41},end:{line:9,column:51}}),n))?i:"")+"request';\nimport type { ApiRequestOptions } from '"+(null!=(i=p(u(n,"outputCore",{start:{line:10,column:43},end:{line:10,column:53}}),n))?i:"")+"ApiRequestOptions';\n"+(null!=(i=c(t,"if").call(s,c(c(a,"root"),"useVersion"),{name:"if",hash:{},fn:e.program(5,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:11,column:0},end:{line:13,column:7}}}))?i:"")+"\n"+(null!=(i=c(t,"each").call(s,c(n,"operations"),{name:"each",hash:{},fn:e.program(7,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:15,column:0},end:{line:20,column:9}}}))?i:"")+"\nexport type T"+(null!=(i=p(u(n,"originName",{start:{line:22,column:16},end:{line:22,column:26}}),n))?i:"")+"Options = {\n"+(null!=(i=c(t,"each").call(s,c(n,"operations"),{name:"each",hash:{},fn:e.program(9,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:23,column:0},end:{line:25,column:9}}}))?i:"")+"}\n\nexport const "+(null!=(i=p(u(n,"originName",{start:{line:28,column:16},end:{line:28,column:26}}),n))?i:"")+"Options: T"+(null!=(i=p(u(n,"originName",{start:{line:28,column:42},end:{line:28,column:52}}),n))?i:"")+"Options = {\n"+(null!=(i=c(t,"each").call(s,c(n,"operations"),{name:"each",hash:{},fn:e.program(11,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:29,column:0},end:{line:31,column:9}}}))?i:"")+"}\n\nexport class "+(null!=(i=p(u(n,"name",{start:{line:34,column:16},end:{line:34,column:20}}),n))?i:"")+" {\n\n"+(null!=(i=c(t,"each").call(s,c(n,"operations"),{name:"each",hash:{},fn:e.program(13,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:36,column:4},end:{line:63,column:13}}}))?i:"")+"}"},usePartial:!0,useData:!0,useDepths:!0},Fn={1:function(e,n,t,r,a,o,l){var i,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\n"+(null!=(i=s(t,"each").call(null!=n?n:e.nullContext||{},s(n,"core"),{name:"each",hash:{},fn:e.program(2,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:8,column:9}}}))?i:"")},2:function(e,n,t,r,a,o,l){var i,s=null!=n?n:e.nullContext||{},u=e.lambda,p=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"export { ApiError"+(null!=(i=p(t,"notEquals").call(s,p(p(l[1],"core"),"length"),1,{name:"notEquals",hash:{},fn:e.program(3,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:5,column:17},end:{line:5,column:87}}}))?i:"")+" } from './"+(null!=(i=u(n,n))?i:"")+"ApiError';\nexport { CancelablePromise } from './"+(null!=(i=u(n,n))?i:"")+"CancelablePromise';\nexport { OpenAPI"+(null!=(i=p(t,"notEquals").call(s,p(p(l[1],"core"),"length"),1,{name:"notEquals",hash:{},fn:e.program(5,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:7,column:16},end:{line:7,column:86}}}))?i:"")+" } from './"+(null!=(i=u(n,n))?i:"")+"OpenAPI';\n"},3:function(e,n,t,r,a){var o;return" as ApiError$"+(null!=(o=e.lambda(e.strict(a,"index",{start:{line:5,column:64},end:{line:5,column:70}}),n))?o:"")},5:function(e,n,t,r,a){var o;return" as OpenAPI$"+(null!=(o=e.lambda(e.strict(a,"index",{start:{line:7,column:63},end:{line:7,column:69}}),n))?o:"")},7:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"models"),{name:"each",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a,loc:{start:{line:12,column:0},end:{line:22,column:9}}}))?o:"")},8:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"enum"),{name:"if",hash:{},fn:e.program(9,a,0),inverse:e.program(12,a,0),data:a,loc:{start:{line:13,column:0},end:{line:21,column:7}}}))?o:""},9:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"export { "+(null!=(o=i(l(n,"name",{start:{line:14,column:12},end:{line:14,column:16}}),n))?o:"")+(null!=(o=s(t,"if").call(null!=n?n:e.nullContext||{},s(n,"alias"),{name:"if",hash:{},fn:e.program(10,a,0),inverse:e.noop,data:a,loc:{start:{line:14,column:19},end:{line:14,column:55}}}))?o:"")+" } from './"+(null!=(o=i(l(n,"package",{start:{line:14,column:69},end:{line:14,column:76}}),n))?o:"")+(null!=(o=i(l(n,"path",{start:{line:14,column:82},end:{line:14,column:86}}),n))?o:"")+"';\n"},10:function(e,n,t,r,a){var o;return" as "+(null!=(o=e.lambda(e.strict(n,"alias",{start:{line:14,column:40},end:{line:14,column:45}}),n))?o:"")},12:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"useUnionTypes"),{name:"if",hash:{},fn:e.program(13,a,0),inverse:e.program(15,a,0),data:a,loc:{start:{line:15,column:0},end:{line:21,column:0}}}))?o:""},13:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"export type { "+(null!=(o=i(l(n,"name",{start:{line:16,column:17},end:{line:16,column:21}}),n))?o:"")+(null!=(o=s(t,"if").call(null!=n?n:e.nullContext||{},s(n,"alias"),{name:"if",hash:{},fn:e.program(10,a,0),inverse:e.noop,data:a,loc:{start:{line:16,column:24},end:{line:16,column:60}}}))?o:"")+" } from './"+(null!=(o=i(l(n,"package",{start:{line:16,column:74},end:{line:16,column:81}}),n))?o:"")+(null!=(o=i(l(n,"path",{start:{line:16,column:87},end:{line:16,column:91}}),n))?o:"")+"';\n"},15:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"enums"),{name:"if",hash:{},fn:e.program(9,a,0),inverse:e.program(13,a,0),data:a,loc:{start:{line:17,column:0},end:{line:21,column:0}}}))?o:""},17:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"schemas"),{name:"each",hash:{},fn:e.program(18,a,0),inverse:e.noop,data:a,loc:{start:{line:26,column:0},end:{line:28,column:9}}}))?o:"")},18:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"export { "+(null!=(o=i(l(n,"name",{start:{line:27,column:12},end:{line:27,column:16}}),n))?o:"")+"Schema"+(null!=(o=s(t,"if").call(null!=n?n:e.nullContext||{},s(n,"alias"),{name:"if",hash:{},fn:e.program(19,a,0),inverse:e.noop,data:a,loc:{start:{line:27,column:25},end:{line:27,column:67}}}))?o:"")+" } from './"+(null!=(o=i(l(n,"package",{start:{line:27,column:81},end:{line:27,column:88}}),n))?o:"")+(null!=(o=i(l(n,"path",{start:{line:27,column:94},end:{line:27,column:98}}),n))?o:"")+"Schema';\n"},19:function(e,n,t,r,a){var o;return" as "+(null!=(o=e.lambda(e.strict(n,"alias",{start:{line:27,column:46},end:{line:27,column:51}}),n))?o:"")+"Schema"},21:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"services"),{name:"each",hash:{},fn:e.program(22,a,0),inverse:e.noop,data:a,loc:{start:{line:32,column:0},end:{line:34,column:9}}}))?o:"")},22:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda;return"export { "+(null!=(o=i(l(n,"name",{start:{line:33,column:12},end:{line:33,column:16}}),n))?o:"")+" } from './"+(null!=(o=i(l(n,"package",{start:{line:33,column:33},end:{line:33,column:40}}),n))?o:"")+(null!=(o=i(l(n,"name",{start:{line:33,column:46},end:{line:33,column:50}}),n))?o:"")+"';\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a,o,l){var i,s=null!=n?n:e.nullContext||{},u=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(i=e.invokePartial(u(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?i:"")+(null!=(i=u(t,"if").call(s,u(n,"core"),{name:"if",hash:{},fn:e.program(1,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:2,column:0},end:{line:9,column:7}}}))?i:"")+(null!=(i=u(t,"if").call(s,u(n,"models"),{name:"if",hash:{},fn:e.program(7,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:10,column:0},end:{line:23,column:7}}}))?i:"")+(null!=(i=u(t,"if").call(s,u(n,"schemas"),{name:"if",hash:{},fn:e.program(17,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:24,column:0},end:{line:29,column:7}}}))?i:"")+(null!=(i=u(t,"if").call(s,u(n,"services"),{name:"if",hash:{},fn:e.program(21,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:30,column:0},end:{line:35,column:7}}}))?i:"")},usePartial:!0,useData:!0,useDepths:!0},Vn={1:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=i(t,"equals").call(l,i(i(a,"root"),"httpClient"),"fetch",{name:"equals",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:0},end:{line:2,column:53}}}))?o:"")+(null!=(o=i(t,"equals").call(l,i(i(a,"root"),"httpClient"),"xhr",{name:"equals",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:3,column:51}}}))?o:"")+(null!=(o=i(t,"equals").call(l,i(i(a,"root"),"httpClient"),"node",{name:"equals",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:4,column:86}}}))?o:"")+(null!=(o=i(t,"equals").call(l,i(i(a,"root"),"httpClient"),"axios",{name:"equals",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:5,column:0},end:{line:5,column:87}}}))?o:"")},2:function(e,n,t,r,a){return"Blob"},4:function(e,n,t,r,a){return"Buffer | ArrayBuffer | ArrayBufferView"},6:function(e,n,t,r,a){var o;return null!=(o=e.lambda(e.strict(n,"base",{start:{line:7,column:3},end:{line:7,column:7}}),n))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"base"),"File",{name:"equals",hash:{},fn:e.program(1,a,0),inverse:e.program(6,a,0),data:a,loc:{start:{line:1,column:0},end:{line:8,column:13}}}))?o:""},useData:!0},Wn={1:function(e,n,t,r,a){var o;return"/**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:3,column:6},end:{line:3,column:17}}),n))?o:"")+"\n */\n"},3:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"unless").call(null!=n?n:e.nullContext||{},l(l(a,"root"),"useUnionTypes"),{name:"unless",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:8,column:0},end:{line:27,column:11}}}))?o:""},4:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\nexport namespace "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:10,column:20},end:{line:10,column:24}}),n))?o:"")+" {\n\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"enums"),{name:"each",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:12,column:4},end:{line:24,column:13}}}))?o:"")+"\n}\n"},5:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=i(t,"if").call(l,i(n,"description"),{name:"if",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a,loc:{start:{line:13,column:4},end:{line:17,column:11}}}))?o:"")+" export enum "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:18,column:19},end:{line:18,column:23}}),n))?o:"")+" {\n"+(null!=(o=i(t,"each").call(l,i(n,"enum"),{name:"each",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a,loc:{start:{line:19,column:8},end:{line:21,column:17}}}))?o:"")+" }\n\n"},6:function(e,n,t,r,a){var o;return" /**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:15,column:10},end:{line:15,column:21}}),n))?o:"")+"\n */\n"},8:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda;return" "+(null!=(o=i(l(n,"name",{start:{line:20,column:11},end:{line:20,column:15}}),n))?o:"")+" = "+(null!=(o=i(l(n,"value",{start:{line:20,column:24},end:{line:20,column:29}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=i(t,"if").call(l,i(n,"description"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:5,column:7}}}))?o:"")+"export type "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:6,column:15},end:{line:6,column:19}}),n))?o:"")+" = "+(null!=(o=e.invokePartial(i(r,"type"),n,{name:"type",hash:{parent:i(n,"name")},data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+";\n"+(null!=(o=i(t,"if").call(l,i(n,"enums"),{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:7,column:0},end:{line:28,column:7}}}))?o:"")},usePartial:!0,useData:!0},Qn={1:function(e,n,t,r,a){var o;return"/**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:3,column:6},end:{line:3,column:17}}),n))?o:"")+"\n */\n"},3:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=i(t,"if").call(l,i(n,"description"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:8,column:4},end:{line:12,column:11}}}))?o:"")+(null!=(o=i(t,"containsSpaces").call(l,i(n,"name"),{name:"containsSpaces",hash:{},fn:e.program(6,a,0),inverse:e.program(8,a,0),data:a,loc:{start:{line:13,column:4},end:{line:17,column:23}}}))?o:"")},4:function(e,n,t,r,a){var o;return" /**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:10,column:10},end:{line:10,column:21}}),n))?o:"")+"\n */\n"},6:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda;return' "'+(null!=(o=i(l(n,"name",{start:{line:14,column:8},end:{line:14,column:12}}),n))?o:"")+'" = '+(null!=(o=i(l(n,"value",{start:{line:14,column:22},end:{line:14,column:27}}),n))?o:"")+",\n"},8:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda;return" "+(null!=(o=i(l(n,"name",{start:{line:16,column:7},end:{line:16,column:11}}),n))?o:"")+" = "+(null!=(o=i(l(n,"value",{start:{line:16,column:20},end:{line:16,column:25}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=i(t,"if").call(l,i(n,"description"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:5,column:7}}}))?o:"")+"export enum "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:6,column:15},end:{line:6,column:19}}),n))?o:"")+" {\n"+(null!=(o=i(t,"each").call(l,i(n,"enum"),{name:"each",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:7,column:4},end:{line:18,column:13}}}))?o:"")+"}"},useData:!0},zn={1:function(e,n,t,r,a){var o;return"/**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:3,column:6},end:{line:3,column:17}}),n))?o:"")+"\n */\n"},3:function(e,n,t,r,a,o,l){var i,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(i=s(t,"if").call(null!=n?n:e.nullContext||{},s(n,"description"),{name:"if",hash:{},fn:e.program(4,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:8,column:4},end:{line:12,column:11}}}))?i:"")+" "+(null!=(i=e.invokePartial(s(r,"isReadOnly"),n,{name:"isReadOnly",data:a,helpers:t,partials:r,decorators:e.decorators}))?i:"")+(null!=(i=e.lambda(e.strict(n,"name",{start:{line:13,column:22},end:{line:13,column:26}}),n))?i:"")+(null!=(i=e.invokePartial(s(r,"isRequired"),n,{name:"isRequired",data:a,helpers:t,partials:r,decorators:e.decorators}))?i:"")+": "+(null!=(i=e.invokePartial(s(r,"type"),n,{name:"type",hash:{parent:s(l[1],"name")},data:a,helpers:t,partials:r,decorators:e.decorators}))?i:"")+";\n"},4:function(e,n,t,r,a){var o;return" /**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:10,column:10},end:{line:10,column:21}}),n))?o:"")+"\n */\n"},6:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"unless").call(null!=n?n:e.nullContext||{},l(l(a,"root"),"useUnionTypes"),{name:"unless",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:17,column:0},end:{line:40,column:11}}}))?o:""},7:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\nexport namespace "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:19,column:20},end:{line:19,column:24}}),n))?o:"")+" {\n\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"enums"),{name:"each",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a,loc:{start:{line:21,column:4},end:{line:37,column:13}}}))?o:"")+"\n}\n"},8:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=i(t,"if").call(l,i(n,"description"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:22,column:4},end:{line:26,column:11}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"alias"),{name:"if",hash:{},fn:e.program(9,a,0),inverse:e.program(11,a,0),data:a,loc:{start:{line:27,column:4},end:{line:31,column:11}}}))?o:"")+(null!=(o=i(t,"each").call(l,i(n,"enum"),{name:"each",hash:{},fn:e.program(13,a,0),inverse:e.noop,data:a,loc:{start:{line:32,column:8},end:{line:34,column:17}}}))?o:"")+" }\n\n"},9:function(e,n,t,r,a){var o;return" export enum "+(null!=(o=e.lambda(e.strict(n,"alias",{start:{line:28,column:19},end:{line:28,column:24}}),n))?o:"")+" {\n"},11:function(e,n,t,r,a){var o;return" export enum "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:30,column:19},end:{line:30,column:23}}),n))?o:"")+" {\n"},13:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda;return" "+(null!=(o=i(l(n,"name",{start:{line:33,column:11},end:{line:33,column:15}}),n))?o:"")+" = "+(null!=(o=i(l(n,"value",{start:{line:33,column:24},end:{line:33,column:29}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a,o,l){var i,s=null!=n?n:e.nullContext||{},u=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(i=u(t,"if").call(s,u(n,"description"),{name:"if",hash:{},fn:e.program(1,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:5,column:7}}}))?i:"")+"export interface "+(null!=(i=e.lambda(e.strict(n,"name",{start:{line:6,column:20},end:{line:6,column:24}}),n))?i:"")+" {\n"+(null!=(i=u(t,"each").call(s,u(n,"properties"),{name:"each",hash:{},fn:e.program(3,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:7,column:4},end:{line:14,column:13}}}))?i:"")+"}\n"+(null!=(i=u(t,"if").call(s,u(n,"enums"),{name:"if",hash:{},fn:e.program(6,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:16,column:0},end:{line:41,column:7}}}))?i:"")},usePartial:!0,useData:!0,useDepths:!0},Jn={1:function(e,n,t,r,a){var o;return"/**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:3,column:6},end:{line:3,column:17}}),n))?o:"")+"\n */\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"description"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:5,column:7}}}))?o:"")+"export type "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:6,column:15},end:{line:6,column:19}}),n))?o:"")+" = "+(null!=(o=e.invokePartial(l(r,"type"),n,{name:"type",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+";"},usePartial:!0,useData:!0},Zn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */"},useData:!0},Gn={1:function(e,n,t,r,a){return" | null"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"isNullable"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:1,column:32}}}))?o:""},useData:!0},Xn={1:function(e,n,t,r,a){return"readonly "},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:1,column:34}}}))?o:""},useData:!0},Kn={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"unless").call(null!=n?n:e.nullContext||{},l(n,"isRequired"),{name:"unless",hash:{},fn:e.program(2,a,0),inverse:e.program(4,a,0),data:a,loc:{start:{line:2,column:0},end:{line:2,column:54}}}))?o:""},2:function(e,n,t,r,a){return"?"},4:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"default"),{name:"if",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:23},end:{line:2,column:43}}}))?o:""},6:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"unless").call(null!=n?n:e.nullContext||{},l(n,"isRequired"),{name:"unless",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:4,column:64}}}))?o:""},7:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"unless").call(null!=n?n:e.nullContext||{},l(n,"default"),{name:"unless",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:22},end:{line:4,column:53}}}))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(l(a,"root"),"useOptions"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(6,a,0),data:a,loc:{start:{line:1,column:0},end:{line:5,column:9}}}))?o:""},useData:!0},Yn={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(l(a,"root"),"useOptions"),{name:"if",hash:{},fn:e.program(2,a,0),inverse:e.program(9,a,0),data:a,loc:{start:{line:2,column:0},end:{line:20,column:7}}}))?o:""},2:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n"+(null!=(o=i(t,"each").call(l,i(n,"parameters"),{name:"each",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:6,column:9}}}))?o:"")+"}: {\n"+(null!=(o=i(t,"each").call(l,i(n,"parameters"),{name:"each",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a,loc:{start:{line:8,column:0},end:{line:13,column:9}}}))?o:"")+"}"},3:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.lambda(e.strict(n,"name",{start:{line:5,column:3},end:{line:5,column:7}}),n))?o:"")+(null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"default"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:5,column:10},end:{line:5,column:48}}}))?o:"")+",\n"},4:function(e,n,t,r,a){var o;return" = "+(null!=(o=e.lambda(e.strict(n,"default",{start:{line:5,column:31},end:{line:5,column:38}}),n))?o:"")},6:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"description"),{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:9,column:0},end:{line:11,column:7}}}))?o:"")+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:12,column:3},end:{line:12,column:7}}),n))?o:"")+(null!=(o=e.invokePartial(l(r,"isRequired"),n,{name:"isRequired",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+": "+(null!=(o=e.invokePartial(l(r,"type"),n,{name:"type",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+",\n"},7:function(e,n,t,r,a){var o;return"/** "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:10,column:7},end:{line:10,column:18}}),n))?o:"")+" **/\n"},9:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"parameters"),{name:"each",hash:{},fn:e.program(10,a,0),inverse:e.noop,data:a,loc:{start:{line:17,column:0},end:{line:19,column:9}}}))?o:"")},10:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.lambda(e.strict(n,"name",{start:{line:18,column:3},end:{line:18,column:7}}),n))?o:"")+(null!=(o=e.invokePartial(l(r,"isRequired"),n,{name:"isRequired",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+": "+(null!=(o=e.invokePartial(l(r,"type"),n,{name:"type",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+(null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"default"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:18,column:36},end:{line:18,column:74}}}))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"parameters"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:21,column:7}}}))?o:""},usePartial:!0,useData:!0},et={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(l(a,"root"),"useOptions"),{name:"if",hash:{},fn:e.program(2,a,0),inverse:e.program(7,a,0),data:a,loc:{start:{line:2,column:0},end:{line:17,column:7}}}))?o:""},2:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n"+(null!=(o=i(t,"each").call(l,i(n,"parameters"),{name:"each",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:6,column:9}}}))?o:"")+"}: {\n"+(null!=(o=i(t,"each").call(l,i(n,"parameters"),{name:"each",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:8,column:0},end:{line:10,column:9}}}))?o:"")+"}"},3:function(e,n,t,r,a){var o;return(null!=(o=e.lambda(e.strict(n,"name",{start:{line:5,column:3},end:{line:5,column:7}}),n))?o:"")+",\n"},5:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.lambda(e.strict(n,"name",{start:{line:9,column:3},end:{line:9,column:7}}),n))?o:"")+(null!=(o=e.invokePartial(l(r,"isRequired"),n,{name:"isRequired",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+": "+(null!=(o=e.invokePartial(l(r,"type"),n,{name:"type",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+",\n"},7:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"parameters"),{name:"each",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:14,column:0},end:{line:16,column:9}}}))?o:"")},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"parameters"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:18,column:7}}}))?o:""},usePartial:!0,useData:!0},nt={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(l(a,"root"),"useOptions"),{name:"if",hash:{},fn:e.program(2,a,0),inverse:e.program(5,a,0),data:a,loc:{start:{line:2,column:0},end:{line:13,column:7}}}))?o:""},2:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"parameters"),{name:"each",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:4},end:{line:6,column:13}}}))?o:"")+" }"},3:function(e,n,t,r,a){var o;return" "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:5,column:11},end:{line:5,column:15}}),n))?o:"")+",\n"},5:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"parameters"),{name:"each",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:10,column:4},end:{line:12,column:13}}}))?o:"")},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"parameters"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:14,column:7}}}))?o:""},useData:!0},tt={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"results"),{name:"each",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:0},end:{line:2,column:66}}}))?o:""},2:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"type"),n,{name:"type",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+(null!=(o=l(t,"unless").call(null!=n?n:e.nullContext||{},l(a,"last"),{name:"unless",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:26},end:{line:2,column:57}}}))?o:"")},3:function(e,n,t,r,a){return" | "},5:function(e,n,t,r,a){return"void"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"results"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(5,a,0),data:a,loc:{start:{line:1,column:0},end:{line:5,column:9}}}))?o:""},usePartial:!0,useData:!0},rt={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"schemaInterface"),n,{name:"schemaInterface",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},3:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"enum",{name:"equals",hash:{},fn:e.program(4,a,0),inverse:e.program(6,a,0),data:a,loc:{start:{line:3,column:0},end:{line:17,column:0}}}))?o:""},4:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"schemaEnum"),n,{name:"schemaEnum",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},6:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"array",{name:"equals",hash:{},fn:e.program(7,a,0),inverse:e.program(9,a,0),data:a,loc:{start:{line:5,column:0},end:{line:17,column:0}}}))?o:""},7:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"schemaArray"),n,{name:"schemaArray",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},9:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"dictionary",{name:"equals",hash:{},fn:e.program(10,a,0),inverse:e.program(12,a,0),data:a,loc:{start:{line:7,column:0},end:{line:17,column:0}}}))?o:""},10:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"schemaDictionary"),n,{name:"schemaDictionary",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},12:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"any-of",{name:"equals",hash:{},fn:e.program(13,a,0),inverse:e.program(15,a,0),data:a,loc:{start:{line:9,column:0},end:{line:17,column:0}}}))?o:""},13:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"schemaComposition"),n,{name:"schemaComposition",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},15:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"all-of",{name:"equals",hash:{},fn:e.program(13,a,0),inverse:e.program(16,a,0),data:a,loc:{start:{line:11,column:0},end:{line:17,column:0}}}))?o:""},16:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"one-of",{name:"equals",hash:{},fn:e.program(13,a,0),inverse:e.program(17,a,0),data:a,loc:{start:{line:13,column:0},end:{line:17,column:0}}}))?o:""},17:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"schemaGeneric"),n,{name:"schemaGeneric",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"interface",{name:"equals",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a,loc:{start:{line:1,column:0},end:{line:17,column:11}}}))?o:""},usePartial:!0,useData:!0},at={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" contains: "+(null!=(o=e.invokePartial(l(r,"schema"),l(n,"link"),{name:"schema",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+",\n"},3:function(e,n,t,r,a){var o;return" contains: {\n type: '"+(null!=(o=e.lambda(e.strict(n,"base",{start:{line:7,column:18},end:{line:7,column:22}}),n))?o:"")+"',\n },\n"},5:function(e,n,t,r,a){var o;return" isReadOnly: "+(null!=(o=e.lambda(e.strict(n,"isReadOnly",{start:{line:11,column:19},end:{line:11,column:29}}),n))?o:"")+",\n"},7:function(e,n,t,r,a){var o;return" isRequired: "+(null!=(o=e.lambda(e.strict(n,"isRequired",{start:{line:14,column:19},end:{line:14,column:29}}),n))?o:"")+",\n"},9:function(e,n,t,r,a){var o;return" isNullable: "+(null!=(o=e.lambda(e.strict(n,"isNullable",{start:{line:17,column:19},end:{line:17,column:29}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n type: 'array',\n"+(null!=(o=i(t,"if").call(l,i(n,"link"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a,loc:{start:{line:3,column:0},end:{line:9,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:10,column:0},end:{line:12,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isRequired"),{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:13,column:0},end:{line:15,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isNullable"),{name:"if",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a,loc:{start:{line:16,column:0},end:{line:18,column:7}}}))?o:"")+"}"},usePartial:!0,useData:!0},ot={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"schema"),n,{name:"schema",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+(null!=(o=l(t,"unless").call(null!=n?n:e.nullContext||{},l(a,"last"),{name:"unless",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:46},end:{line:3,column:76}}}))?o:"")},2:function(e,n,t,r,a){return", "},4:function(e,n,t,r,a){var o;return" isReadOnly: "+(null!=(o=e.lambda(e.strict(n,"isReadOnly",{start:{line:5,column:19},end:{line:5,column:29}}),n))?o:"")+",\n"},6:function(e,n,t,r,a){var o;return" isRequired: "+(null!=(o=e.lambda(e.strict(n,"isRequired",{start:{line:8,column:19},end:{line:8,column:29}}),n))?o:"")+",\n"},8:function(e,n,t,r,a){var o;return" isNullable: "+(null!=(o=e.lambda(e.strict(n,"isNullable",{start:{line:11,column:19},end:{line:11,column:29}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n type: '"+(null!=(o=e.lambda(e.strict(n,"export",{start:{line:2,column:13},end:{line:2,column:19}}),n))?o:"")+"',\n contains: ["+(null!=(o=i(t,"each").call(l,i(n,"properties"),{name:"each",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:15},end:{line:3,column:85}}}))?o:"")+"],\n"+(null!=(o=i(t,"if").call(l,i(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:6,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isRequired"),{name:"if",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a,loc:{start:{line:7,column:0},end:{line:9,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isNullable"),{name:"if",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a,loc:{start:{line:10,column:0},end:{line:12,column:7}}}))?o:"")+"}"},usePartial:!0,useData:!0},lt={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" contains: "+(null!=(o=e.invokePartial(l(r,"schema"),l(n,"link"),{name:"schema",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+",\n"},3:function(e,n,t,r,a){var o;return" contains: {\n type: '"+(null!=(o=e.lambda(e.strict(n,"base",{start:{line:7,column:18},end:{line:7,column:22}}),n))?o:"")+"',\n },\n"},5:function(e,n,t,r,a){var o;return" isReadOnly: "+(null!=(o=e.lambda(e.strict(n,"isReadOnly",{start:{line:11,column:19},end:{line:11,column:29}}),n))?o:"")+",\n"},7:function(e,n,t,r,a){var o;return" isRequired: "+(null!=(o=e.lambda(e.strict(n,"isRequired",{start:{line:14,column:19},end:{line:14,column:29}}),n))?o:"")+",\n"},9:function(e,n,t,r,a){var o;return" isNullable: "+(null!=(o=e.lambda(e.strict(n,"isNullable",{start:{line:17,column:19},end:{line:17,column:29}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n type: 'dictionary',\n"+(null!=(o=i(t,"if").call(l,i(n,"link"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a,loc:{start:{line:3,column:0},end:{line:9,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:10,column:0},end:{line:12,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isRequired"),{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:13,column:0},end:{line:15,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isNullable"),{name:"if",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a,loc:{start:{line:16,column:0},end:{line:18,column:7}}}))?o:"")+"}"},usePartial:!0,useData:!0},it={1:function(e,n,t,r,a){var o;return" isReadOnly: "+(null!=(o=e.lambda(e.strict(n,"isReadOnly",{start:{line:4,column:19},end:{line:4,column:29}}),n))?o:"")+",\n"},3:function(e,n,t,r,a){var o;return" isRequired: "+(null!=(o=e.lambda(e.strict(n,"isRequired",{start:{line:7,column:19},end:{line:7,column:29}}),n))?o:"")+",\n"},5:function(e,n,t,r,a){var o;return" isNullable: "+(null!=(o=e.lambda(e.strict(n,"isNullable",{start:{line:10,column:19},end:{line:10,column:29}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n type: 'Enum',\n"+(null!=(o=i(t,"if").call(l,i(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:5,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isRequired"),{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:6,column:0},end:{line:8,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isNullable"),{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:9,column:0},end:{line:11,column:7}}}))?o:"")+"}"},useData:!0},st={1:function(e,n,t,r,a){var o;return" type: '"+(null!=(o=e.lambda(e.strict(n,"base",{start:{line:3,column:14},end:{line:3,column:18}}),n))?o:"")+"',\n"},3:function(e,n,t,r,a){var o;return" isReadOnly: "+(null!=(o=e.lambda(e.strict(n,"isReadOnly",{start:{line:6,column:19},end:{line:6,column:29}}),n))?o:"")+",\n"},5:function(e,n,t,r,a){var o;return" isRequired: "+(null!=(o=e.lambda(e.strict(n,"isRequired",{start:{line:9,column:19},end:{line:9,column:29}}),n))?o:"")+",\n"},7:function(e,n,t,r,a){var o;return" isNullable: "+(null!=(o=e.lambda(e.strict(n,"isNullable",{start:{line:12,column:19},end:{line:12,column:29}}),n))?o:"")+",\n"},9:function(e,n,t,r,a){var o;return" format: '"+(null!=(o=e.lambda(e.strict(n,"format",{start:{line:15,column:16},end:{line:15,column:22}}),n))?o:"")+"',\n"},11:function(e,n,t,r,a){var o;return" maximum: "+(null!=(o=e.lambda(e.strict(n,"maximum",{start:{line:18,column:16},end:{line:18,column:23}}),n))?o:"")+",\n"},13:function(e,n,t,r,a){var o;return" exclusiveMaximum: "+(null!=(o=e.lambda(e.strict(n,"exclusiveMaximum",{start:{line:21,column:25},end:{line:21,column:41}}),n))?o:"")+",\n"},15:function(e,n,t,r,a){var o;return" minimum: "+(null!=(o=e.lambda(e.strict(n,"minimum",{start:{line:24,column:16},end:{line:24,column:23}}),n))?o:"")+",\n"},17:function(e,n,t,r,a){var o;return" exclusiveMinimum: "+(null!=(o=e.lambda(e.strict(n,"exclusiveMinimum",{start:{line:27,column:25},end:{line:27,column:41}}),n))?o:"")+",\n"},19:function(e,n,t,r,a){var o;return" multipleOf: "+(null!=(o=e.lambda(e.strict(n,"multipleOf",{start:{line:30,column:19},end:{line:30,column:29}}),n))?o:"")+",\n"},21:function(e,n,t,r,a){var o;return" maxLength: "+(null!=(o=e.lambda(e.strict(n,"maxLength",{start:{line:33,column:18},end:{line:33,column:27}}),n))?o:"")+",\n"},23:function(e,n,t,r,a){var o;return" minLength: "+(null!=(o=e.lambda(e.strict(n,"minLength",{start:{line:36,column:18},end:{line:36,column:27}}),n))?o:"")+",\n"},25:function(e,n,t,r,a){var o;return" pattern: '"+(null!=(o=e.lambda(e.strict(n,"pattern",{start:{line:39,column:17},end:{line:39,column:24}}),n))?o:"")+"',\n"},27:function(e,n,t,r,a){var o;return" maxItems: "+(null!=(o=e.lambda(e.strict(n,"maxItems",{start:{line:42,column:17},end:{line:42,column:25}}),n))?o:"")+",\n"},29:function(e,n,t,r,a){var o;return" minItems: "+(null!=(o=e.lambda(e.strict(n,"minItems",{start:{line:45,column:17},end:{line:45,column:25}}),n))?o:"")+",\n"},31:function(e,n,t,r,a){var o;return" uniqueItems: "+(null!=(o=e.lambda(e.strict(n,"uniqueItems",{start:{line:48,column:20},end:{line:48,column:31}}),n))?o:"")+",\n"},33:function(e,n,t,r,a){var o;return" maxProperties: "+(null!=(o=e.lambda(e.strict(n,"maxProperties",{start:{line:51,column:22},end:{line:51,column:35}}),n))?o:"")+",\n"},35:function(e,n,t,r,a){var o;return" minProperties: "+(null!=(o=e.lambda(e.strict(n,"minProperties",{start:{line:54,column:22},end:{line:54,column:35}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n"+(null!=(o=i(t,"if").call(l,i(n,"type"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:0},end:{line:4,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:5,column:0},end:{line:7,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isRequired"),{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:8,column:0},end:{line:10,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isNullable"),{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:11,column:0},end:{line:13,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"format"),{name:"if",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a,loc:{start:{line:14,column:0},end:{line:16,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"maximum"),{name:"if",hash:{},fn:e.program(11,a,0),inverse:e.noop,data:a,loc:{start:{line:17,column:0},end:{line:19,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"exclusiveMaximum"),{name:"if",hash:{},fn:e.program(13,a,0),inverse:e.noop,data:a,loc:{start:{line:20,column:0},end:{line:22,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"minimum"),{name:"if",hash:{},fn:e.program(15,a,0),inverse:e.noop,data:a,loc:{start:{line:23,column:0},end:{line:25,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"exclusiveMinimum"),{name:"if",hash:{},fn:e.program(17,a,0),inverse:e.noop,data:a,loc:{start:{line:26,column:0},end:{line:28,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"multipleOf"),{name:"if",hash:{},fn:e.program(19,a,0),inverse:e.noop,data:a,loc:{start:{line:29,column:0},end:{line:31,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"maxLength"),{name:"if",hash:{},fn:e.program(21,a,0),inverse:e.noop,data:a,loc:{start:{line:32,column:0},end:{line:34,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"minLength"),{name:"if",hash:{},fn:e.program(23,a,0),inverse:e.noop,data:a,loc:{start:{line:35,column:0},end:{line:37,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"pattern"),{name:"if",hash:{},fn:e.program(25,a,0),inverse:e.noop,data:a,loc:{start:{line:38,column:0},end:{line:40,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"maxItems"),{name:"if",hash:{},fn:e.program(27,a,0),inverse:e.noop,data:a,loc:{start:{line:41,column:0},end:{line:43,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"minItems"),{name:"if",hash:{},fn:e.program(29,a,0),inverse:e.noop,data:a,loc:{start:{line:44,column:0},end:{line:46,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"uniqueItems"),{name:"if",hash:{},fn:e.program(31,a,0),inverse:e.noop,data:a,loc:{start:{line:47,column:0},end:{line:49,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"maxProperties"),{name:"if",hash:{},fn:e.program(33,a,0),inverse:e.noop,data:a,loc:{start:{line:50,column:0},end:{line:52,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"minProperties"),{name:"if",hash:{},fn:e.program(35,a,0),inverse:e.noop,data:a,loc:{start:{line:53,column:0},end:{line:55,column:7}}}))?o:"")+"}"},useData:!0},ut={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"properties"),{name:"each",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:4},end:{line:6,column:13}}}))?o:""},2:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:5,column:11},end:{line:5,column:15}}),n))?o:"")+": "+(null!=(o=e.invokePartial(l(r,"schema"),n,{name:"schema",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+",\n"},4:function(e,n,t,r,a){var o;return" isReadOnly: "+(null!=(o=e.lambda(e.strict(n,"isReadOnly",{start:{line:10,column:19},end:{line:10,column:29}}),n))?o:"")+",\n"},6:function(e,n,t,r,a){var o;return" isRequired: "+(null!=(o=e.lambda(e.strict(n,"isRequired",{start:{line:13,column:19},end:{line:13,column:29}}),n))?o:"")+",\n"},8:function(e,n,t,r,a){var o;return" isNullable: "+(null!=(o=e.lambda(e.strict(n,"isNullable",{start:{line:16,column:19},end:{line:16,column:29}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n properties: {\n"+(null!=(o=i(t,"if").call(l,i(n,"properties"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:7,column:7}}}))?o:"")+" },\n"+(null!=(o=i(t,"if").call(l,i(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:9,column:0},end:{line:11,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isRequired"),{name:"if",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a,loc:{start:{line:12,column:0},end:{line:14,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isNullable"),{name:"if",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a,loc:{start:{line:15,column:0},end:{line:17,column:7}}}))?o:"")+"}"},usePartial:!0,useData:!0},pt={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" cookies: {\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"parametersCookie"),{name:"each",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:5,column:4},end:{line:7,column:13}}}))?o:"")+" },\n"},2:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda;return" '"+(null!=(o=i(l(n,"prop",{start:{line:6,column:12},end:{line:6,column:16}}),n))?o:"")+"': "+(null!=(o=i(l(n,"name",{start:{line:6,column:25},end:{line:6,column:29}}),n))?o:"")+",\n"},4:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" headers: {\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"parametersHeader"),{name:"each",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:12,column:4},end:{line:14,column:13}}}))?o:"")+" },\n"},6:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" query: {\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"parametersQuery"),{name:"each",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:19,column:4},end:{line:21,column:13}}}))?o:"")+" },\n"},8:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" formData: {\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"parametersForm"),{name:"each",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:26,column:4},end:{line:28,column:13}}}))?o:"")+" },\n"},10:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" body: "+(null!=(o=e.lambda(e.strict(l(n,"parametersBody"),"name",{start:{line:32,column:13},end:{line:32,column:32}}),n))?o:"")+",\n"+(null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(l(n,"parametersBody"),"mediaType"),{name:"if",hash:{},fn:e.program(11,a,0),inverse:e.noop,data:a,loc:{start:{line:33,column:4},end:{line:35,column:11}}}))?o:"")},11:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" mediaType: '"+(null!=(o=e.lambda(e.strict(l(n,"parametersBody"),"mediaType",{start:{line:34,column:23},end:{line:34,column:47}}),n))?o:"")+"',\n"},13:function(e,n,t,r,a){var o;return" responseHeader: '"+(null!=(o=e.lambda(e.strict(n,"responseHeader",{start:{line:38,column:24},end:{line:38,column:38}}),n))?o:"")+"',\n"},15:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" errors: {\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"errors"),{name:"each",hash:{},fn:e.program(16,a,0),inverse:e.noop,data:a,loc:{start:{line:42,column:4},end:{line:44,column:13}}}))?o:"")+" },\n"},16:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda;return" "+(null!=(o=i(l(n,"code",{start:{line:43,column:11},end:{line:43,column:15}}),n))?o:"")+": `"+(null!=(o=i(l(n,"description",{start:{line:43,column:24},end:{line:43,column:35}}),n))?o:"")+"`,\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda,s=null!=n?n:e.nullContext||{},u=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"method: '"+(null!=(o=i(l(n,"method",{start:{line:1,column:12},end:{line:1,column:18}}),n))?o:"")+"',\npath: `"+(null!=(o=i(l(n,"path",{start:{line:2,column:10},end:{line:2,column:14}}),n))?o:"")+"`,\n"+(null!=(o=u(t,"if").call(s,u(n,"parametersCookie"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:9,column:7}}}))?o:"")+(null!=(o=u(t,"if").call(s,u(n,"parametersHeader"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:10,column:0},end:{line:16,column:7}}}))?o:"")+(null!=(o=u(t,"if").call(s,u(n,"parametersQuery"),{name:"if",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a,loc:{start:{line:17,column:0},end:{line:23,column:7}}}))?o:"")+(null!=(o=u(t,"if").call(s,u(n,"parametersForm"),{name:"if",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a,loc:{start:{line:24,column:0},end:{line:30,column:7}}}))?o:"")+(null!=(o=u(t,"if").call(s,u(n,"parametersBody"),{name:"if",hash:{},fn:e.program(10,a,0),inverse:e.noop,data:a,loc:{start:{line:31,column:0},end:{line:36,column:7}}}))?o:"")+(null!=(o=u(t,"if").call(s,u(n,"responseHeader"),{name:"if",hash:{},fn:e.program(13,a,0),inverse:e.noop,data:a,loc:{start:{line:37,column:0},end:{line:39,column:7}}}))?o:"")+(null!=(o=u(t,"if").call(s,u(n,"errors"),{name:"if",hash:{},fn:e.program(15,a,0),inverse:e.noop,data:a,loc:{start:{line:40,column:0},end:{line:46,column:7}}}))?o:"")},useData:!0},ct={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"typeInterface"),n,{name:"typeInterface",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},3:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"reference",{name:"equals",hash:{},fn:e.program(4,a,0),inverse:e.program(6,a,0),data:a,loc:{start:{line:3,column:0},end:{line:19,column:0}}}))?o:""},4:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"typeReference"),n,{name:"typeReference",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},6:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"enum",{name:"equals",hash:{},fn:e.program(7,a,0),inverse:e.program(9,a,0),data:a,loc:{start:{line:5,column:0},end:{line:19,column:0}}}))?o:""},7:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"typeEnum"),n,{name:"typeEnum",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},9:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"array",{name:"equals",hash:{},fn:e.program(10,a,0),inverse:e.program(12,a,0),data:a,loc:{start:{line:7,column:0},end:{line:19,column:0}}}))?o:""},10:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"typeArray"),n,{name:"typeArray",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},12:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"dictionary",{name:"equals",hash:{},fn:e.program(13,a,0),inverse:e.program(15,a,0),data:a,loc:{start:{line:9,column:0},end:{line:19,column:0}}}))?o:""},13:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"typeDictionary"),n,{name:"typeDictionary",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},15:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"one-of",{name:"equals",hash:{},fn:e.program(16,a,0),inverse:e.program(18,a,0),data:a,loc:{start:{line:11,column:0},end:{line:19,column:0}}}))?o:""},16:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"typeUnion"),n,{name:"typeUnion",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},18:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"any-of",{name:"equals",hash:{},fn:e.program(16,a,0),inverse:e.program(19,a,0),data:a,loc:{start:{line:13,column:0},end:{line:19,column:0}}}))?o:""},19:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"all-of",{name:"equals",hash:{},fn:e.program(20,a,0),inverse:e.program(22,a,0),data:a,loc:{start:{line:15,column:0},end:{line:19,column:0}}}))?o:""},20:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"typeIntersection"),n,{name:"typeIntersection",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},22:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"typeGeneric"),n,{name:"typeGeneric",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"interface",{name:"equals",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a,loc:{start:{line:1,column:0},end:{line:19,column:11}}}))?o:""},usePartial:!0,useData:!0},mt={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"Array<"+(null!=(o=e.invokePartial(l(r,"type"),l(n,"link"),{name:"type",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+">"+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},3:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"Array<"+(null!=(o=e.invokePartial(l(r,"base"),n,{name:"base",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+">"+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"link"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a,loc:{start:{line:1,column:0},end:{line:5,column:9}}}))?o:""},usePartial:!0,useData:!0},dt={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"Record<string, "+(null!=(o=e.invokePartial(l(r,"type"),l(n,"link"),{name:"type",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+">"+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},3:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"Record<string, "+(null!=(o=e.invokePartial(l(r,"base"),n,{name:"base",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+">"+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"link"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a,loc:{start:{line:1,column:0},end:{line:5,column:9}}}))?o:""},usePartial:!0,useData:!0},ft={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=l(t,"enumerator").call(null!=n?n:e.nullContext||{},l(n,"enum"),l(n,"parent"),l(n,"alias"),{name:"enumerator",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:0},end:{line:2,column:58}}}))?o:"")+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},2:function(e,n,t,r,a){var o;return null!=(o=e.lambda(n,n))?o:""},4:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=l(t,"enumerator").call(null!=n?n:e.nullContext||{},l(n,"enum"),l(n,"parent"),l(n,"name"),{name:"enumerator",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:4,column:57}}}))?o:"")+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"alias"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(4,a,0),data:a,loc:{start:{line:1,column:0},end:{line:5,column:9}}}))?o:""},usePartial:!0,useData:!0},ht={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"base"),n,{name:"base",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},usePartial:!0,useData:!0},yt={1:function(e,n,t,r,a,o,l){var i,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n"+(null!=(i=s(t,"each").call(null!=n?n:e.nullContext||{},s(n,"properties"),{name:"each",hash:{},fn:e.program(2,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:14,column:9}}}))?i:"")+"}"+(null!=(i=e.invokePartial(s(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?i:"")},2:function(e,n,t,r,a,o,l){var i,s=null!=n?n:e.nullContext||{},u=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(i=u(t,"if").call(s,u(n,"description"),{name:"if",hash:{},fn:e.program(3,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:8,column:7}}}))?i:"")+(null!=(i=u(t,"if").call(s,u(l[1],"parent"),{name:"if",hash:{},fn:e.program(5,a,0,o,l),inverse:e.program(7,a,0,o,l),data:a,loc:{start:{line:9,column:0},end:{line:13,column:7}}}))?i:"")},3:function(e,n,t,r,a){var o;return"/**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:6,column:6},end:{line:6,column:17}}),n))?o:"")+"\n */\n"},5:function(e,n,t,r,a,o,l){var i,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(i=e.invokePartial(s(r,"isReadOnly"),n,{name:"isReadOnly",data:a,helpers:t,partials:r,decorators:e.decorators}))?i:"")+(null!=(i=e.lambda(e.strict(n,"name",{start:{line:10,column:18},end:{line:10,column:22}}),n))?i:"")+(null!=(i=e.invokePartial(s(r,"isRequired"),n,{name:"isRequired",data:a,helpers:t,partials:r,decorators:e.decorators}))?i:"")+": "+(null!=(i=e.invokePartial(s(r,"type"),n,{name:"type",hash:{parent:s(l[1],"parent")},data:a,helpers:t,partials:r,decorators:e.decorators}))?i:"")+",\n"},7:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"isReadOnly"),n,{name:"isReadOnly",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:12,column:18},end:{line:12,column:22}}),n))?o:"")+(null!=(o=e.invokePartial(l(r,"isRequired"),n,{name:"isRequired",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+": "+(null!=(o=e.invokePartial(l(r,"type"),n,{name:"type",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+",\n"},9:function(e,n,t,r,a){return"any"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a,o,l){var i,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(i=s(t,"if").call(null!=n?n:e.nullContext||{},s(n,"properties"),{name:"if",hash:{},fn:e.program(1,a,0,o,l),inverse:e.program(9,a,0,o,l),data:a,loc:{start:{line:1,column:0},end:{line:18,column:9}}}))?i:""},usePartial:!0,useData:!0,useDepths:!0},vt={1:function(e,n,t,r,a){var o;return null!=(o=e.lambda(n,n))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=l(t,"intersection").call(null!=n?n:e.nullContext||{},l(n,"properties"),l(n,"parent"),{name:"intersection",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:1,column:60}}}))?o:"")+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},usePartial:!0,useData:!0},gt={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"base"),n,{name:"base",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},usePartial:!0,useData:!0},Pt={1:function(e,n,t,r,a){var o;return null!=(o=e.lambda(n,n))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=l(t,"union").call(null!=n?n:e.nullContext||{},l(n,"properties"),l(n,"parent"),{name:"union",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:1,column:46}}}))?o:"")+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},usePartial:!0,useData:!0};function bt(e){!function(e){y.registerHelper("equals",(function(e,n,t){return e===n?t.fn(this):t.inverse(this)})),y.registerHelper("notEquals",(function(e,n,t){return e!==n?t.fn(this):t.inverse(this)})),y.registerHelper("containsSpaces",(function(e,n){return/\s+/.test(e)?n.fn(this):n.inverse(this)})),y.registerHelper("union",(function(n,t,r){const a=y.partials.type,o=n.map((n=>a(Object.assign(Object.assign(Object.assign({},e),n),{parent:t})))).filter(W);let l=o.join(" | ");return o.length>1&&(l=`(${l})`),r.fn(l)})),y.registerHelper("intersection",(function(n,t,r){const a=y.partials.type,o=n.map((n=>a(Object.assign(Object.assign(Object.assign({},e),n),{parent:t})))).filter(W);let l=o.join(" & ");return o.length>1&&(l=`(${l})`),r.fn(l)})),y.registerHelper("enumerator",(function(n,t,r,a){return!e.useUnionTypes&&t&&r?`${t}.${r}`:a.fn(n.map((e=>e.value)).filter(W).join(" | "))}))}(e);const n={index:y.template(Fn),exports:{model:y.template(Mn),schema:y.template(Un),service:y.template(Ln)},core:{settings:y.template(jn),apiError:y.template(Xe),apiRequestOptions:y.template(Ke),apiResult:y.template(Ye),request:y.template($n),cancelablePromise:y.template(En),httpStatusCode:y.template(en)}};return y.registerPartial("exportEnum",y.template(Qn)),y.registerPartial("exportInterface",y.template(zn)),y.registerPartial("exportComposition",y.template(Wn)),y.registerPartial("exportType",y.template(Jn)),y.registerPartial("header",y.template(Zn)),y.registerPartial("isNullable",y.template(Gn)),y.registerPartial("isReadOnly",y.template(Xn)),y.registerPartial("isRequired",y.template(Kn)),y.registerPartial("parameters",y.template(Yn)),y.registerPartial("parametersDefinition",y.template(et)),y.registerPartial("parameterValues",y.template(nt)),y.registerPartial("result",y.template(tt)),y.registerPartial("serviceOption",y.template(pt)),y.registerPartial("schema",y.template(rt)),y.registerPartial("schemaArray",y.template(at)),y.registerPartial("schemaDictionary",y.template(lt)),y.registerPartial("schemaEnum",y.template(it)),y.registerPartial("schemaGeneric",y.template(st)),y.registerPartial("schemaInterface",y.template(ut)),y.registerPartial("schemaComposition",y.template(ot)),y.registerPartial("type",y.template(ct)),y.registerPartial("typeArray",y.template(mt)),y.registerPartial("typeDictionary",y.template(dt)),y.registerPartial("typeEnum",y.template(ft)),y.registerPartial("typeGeneric",y.template(ht)),y.registerPartial("typeInterface",y.template(yt)),y.registerPartial("typeReference",y.template(gt)),y.registerPartial("typeUnion",y.template(Pt)),y.registerPartial("typeIntersection",y.template(vt)),y.registerPartial("base",y.template(Vn)),y.registerPartial("functions/catchErrors",y.template(fn)),y.registerPartial("functions/getFormData",y.template(hn)),y.registerPartial("functions/getQueryString",y.template(yn)),y.registerPartial("functions/getUrl",y.template(vn)),y.registerPartial("functions/isBinary",y.template(gn)),y.registerPartial("functions/isBlob",y.template(Pn)),y.registerPartial("functions/isDefined",y.template(bn)),y.registerPartial("functions/isString",y.template(On)),y.registerPartial("functions/isStringWithValue",y.template(xn)),y.registerPartial("functions/isSuccess",y.template(Rn)),y.registerPartial("functions/resolve",y.template(kn)),y.registerPartial("fetch/getHeaders",y.template(sn)),y.registerPartial("fetch/getRequestBody",y.template(un)),y.registerPartial("fetch/getResponseBody",y.template(pn)),y.registerPartial("fetch/getResponseHeader",y.template(cn)),y.registerPartial("fetch/sendRequest",y.template(dn)),y.registerPartial("fetch/request",y.template(mn)),y.registerPartial("xhr/getHeaders",y.template(Dn)),y.registerPartial("xhr/getRequestBody",y.template(Hn)),y.registerPartial("xhr/getResponseBody",y.template(In)),y.registerPartial("xhr/getResponseHeader",y.template(Nn)),y.registerPartial("xhr/sendRequest",y.template(Bn)),y.registerPartial("xhr/request",y.template(_n)),y.registerPartial("node/getHeaders",y.template(wn)),y.registerPartial("node/getRequestBody",y.template(Cn)),y.registerPartial("node/getResponseBody",y.template(qn)),y.registerPartial("node/getResponseHeader",y.template(An)),y.registerPartial("node/sendRequest",y.template(Sn)),y.registerPartial("node/request",y.template(Tn)),y.registerPartial("axios/getHeaders",y.template(nn)),y.registerPartial("axios/getRequestBody",y.template(tn)),y.registerPartial("axios/getResponseBody",y.template(rn)),y.registerPartial("axios/getResponseHeader",y.template(an)),y.registerPartial("axios/sendRequest",y.template(ln)),y.registerPartial("axios/request",y.template(on)),n}function Ot(n,t){return e.relative(t,n).startsWith("..")}async function xt(n){const{templates:t,outputPath:r,core:a,models:o,schemas:l,services:i}=n;await Ne(e.resolve(r,"index.ts"),t.index({core:a,models:o,schemas:l,services:i}))}function Rt(e){return e.replace(/^(?:\.{2})?(?:\/\.{2})*\//,"")}function kt(e){let t=0,r=e.split(n.EOL);return r=r.map((e=>{e=e.trim().replace(/^\*/g," *");let n=t;(e.endsWith("(")||e.endsWith("{")||e.endsWith("["))&&t++,(e.startsWith(")")||e.startsWith("}")||e.startsWith("]"))&&n&&(t--,n--);const r=`${" ".repeat(n)}${e}`;return""===r.trim()?"":r})),r.join(n.EOL)}function wt(e,n){return e.name>n.name?1:e.name<n.name?-1:0}function Ct(e){let n,t=1;for(const r of e)n&&r.name===n.name?(r.alias=`${r.name}$${t}`,n.alias||(n.alias=`${n.name}$${t-1}`),t++):n&&r.name!==n.name&&(t=1),n=r}class qt{constructor(){this.options=new Map}async writeClient(n){const{client:t,templates:a,output:o,httpClient:l,useOptions:i,useUnionTypes:s,exportCore:u,exportServices:p,exportModels:c,exportSchemas:m,request:d}=n,f=R(process.cwd(),o.output),h=o.outputCore?R(process.cwd(),o.outputCore):R(f,"core"),y=o.outputModels?R(process.cwd(),o.outputModels):R(f,"models"),v=o.outputSchemas?R(process.cwd(),o.outputSchemas):R(f,"schemas"),g=o.outputServices?R(process.cwd(),o.outputServices):R(f,"services");if(!Ot(process.cwd(),o.output))throw new Error("Output folder is not a subdirectory of the current working directory");if(o.outputCore&&!Ot(process.cwd(),o.outputCore))throw new Error("Output folder(core) is not a subdirectory of the current working directory");if(o.outputSchemas&&!Ot(process.cwd(),o.outputSchemas))throw new Error("Output folder(schemas) is not a subdirectory of the current working directory");if(o.outputModels&&!Ot(process.cwd(),o.outputModels))throw new Error("Output folder(models) is not a subdirectory of the current working directory");if(o.outputServices&&!Ot(process.cwd(),o.outputServices))throw new Error("Output folder(services) is not a subdirectory of the current working directory");u&&(await Me(h),await async function(n){const{client:t,templates:r,outputPath:a,httpClient:o,request:l}=n,i={httpClient:o,server:t.server,version:t.version};if(await Ne(e.resolve(a,"OpenAPI.ts"),r.core.settings(i)),await Ne(e.resolve(a,"ApiError.ts"),r.core.apiError({})),await Ne(e.resolve(a,"ApiRequestOptions.ts"),r.core.apiRequestOptions({})),await Ne(e.resolve(a,"ApiResult.ts"),r.core.apiResult({})),await Ne(e.resolve(a,"CancelablePromise.ts"),r.core.cancelablePromise({})),await Ne(e.resolve(a,"HttpStatusCode.ts"),r.core.httpStatusCode({})),await Ne(e.resolve(a,"request.ts"),r.core.request(i)),l){const n=e.resolve(process.cwd(),l);if(!await Be(n))throw new Error(`Custom request file "${n}" does not exists`);await _e(n,e.resolve(a,"request.ts"))}}({client:t,templates:a,outputPath:h,httpClient:l,request:d})),p&&(await Me(g),await async function(n){const{services:t,templates:r,outputPath:a,httpClient:o,useUnionTypes:l,useOptions:i,useCustomRequest:s,outputCore:u,outputModels:p}=n;for(const n of t){const t=e.resolve(a,`${n.name}.ts`),c=n.operations.some((e=>e.path.includes("OpenAPI.VERSION"))),m=r.exports.service(Object.assign(Object.assign({},n),{httpClient:o,useUnionTypes:l,useVersion:c,useOptions:i,useCustomRequest:s,outputCore:u,outputModels:p}));await Ne(t,kt(m))}}({services:t.services,templates:a,outputPath:g,httpClient:l,useUnionTypes:s,useOptions:i,useCustomRequest:!!d,outputModels:c?`${x(g,y)}`:"../models/",outputCore:u?`${x(g,h)}`:"../core/"})),m&&(await Me(v),await async function(e){const{models:n,templates:t,outputPath:a,httpClient:o,useUnionTypes:l}=e;for(const e of n){const n=Rt(e.path),i=b(n);if(i){const e=R(a,i);r.mkdirSync(e,{recursive:!0})}const s=R(a,`${n}Schema.ts`),u=t.exports.schema(Object.assign(Object.assign({},e),{httpClient:o,useUnionTypes:l}));await Ne(s,kt(u))}}({models:t.models,templates:a,outputPath:v,httpClient:l,useUnionTypes:s})),c&&(await Me(y),await async function(e){const{models:n,templates:t,outputPath:a,httpClient:o,useUnionTypes:l}=e;for(const e of n){const n=Rt(e.path),i=b(n);if(i){const e=R(a,i);r.mkdirSync(e,{recursive:!0})}const s=R(a,`${n}.ts`),u=t.exports.model(Object.assign(Object.assign({},e),{httpClient:o,useUnionTypes:l}));await Ne(s,kt(u))}}({models:t.models,templates:a,outputPath:y,httpClient:l,useUnionTypes:s})),(u||p||m||c)&&(await Me(f),await this.writeClientIndex({client:t,templates:a,output:{output:f,outputCore:h,outputServices:g,outputModels:y,outputSchemas:v},useUnionTypes:s,exportCore:u,exportServices:p,exportModels:c,exportSchemas:m}))}async writeClientIndex(e){const{output:n}=e,t=this.options.get(n.output);t?t.push(e):this.options.set(n.output,Array.of(e))}async combineAndWrite(){const e=new Map;for(const[n,t]of this.options.entries())for(const r of t){const{exportCore:t,output:a,exportModels:o,exportSchemas:l,exportServices:i,client:s,templates:u}=r,p=a.outputCore?R(process.cwd(),a.outputCore):R(n,"core"),c=a.outputModels?R(process.cwd(),a.outputModels):R(n,"models"),m=a.outputSchemas?R(process.cwd(),a.outputSchemas):R(n,"schemas"),d=a.outputServices?R(process.cwd(),a.outputServices):R(n,"services");let f=e.get(`${n}`);if(f||(f={templates:u,outputPath:n,core:[],models:[],schemas:[],services:[]},e.set(`${n}`,f)),t){const e=`${x(n,p)}`,t=f.core.find((n=>n===e));t||f.core.push(e)}if(o||l){const e=`${x(n,c)}`,t=`${x(n,m)}`;for(const n of s.models){const a={name:n.name,alias:"",path:n.path,package:e,enum:n.enum&&n.enum.length>0,useUnionTypes:r.useUnionTypes,enums:n.enums&&n.enums.length>0};if(o){const e=f.models.find((e=>e.name===a.name&&e.path===a.path&&e.package===a.package&&e.enum===a.enum&&e.enums===a.enums&&e.useUnionTypes===a.useUnionTypes));e||f.models.push(a)}if(l){const e=Object.assign(Object.assign({},a),{package:t}),n=f.schemas.find((n=>n.name===e.name&&n.path===e.path&&n.package===e.package));n||f.schemas.push(e)}}}if(i){const e=`${x(n,d)}`;for(const n of s.services){const t=f.services.find((t=>t.name===n.name&&t.package===e));t||f.services.push({name:n.name,package:e})}}}for(const n of e.values())n.models=n.models.filter(W).sort(wt),Ct(n.models),n.schemas=n.schemas.filter(W).sort(wt),Ct(n.schemas),await xt(n)}}async function At({input:e,output:n,outputCore:t,outputServices:r,outputModels:a,outputSchemas:o,httpClient:l=exports.HttpClient.FETCH,useOptions:i=!1,useUnionTypes:s=!1,exportCore:u=!0,exportServices:p=!0,exportModels:c=!0,exportSchemas:m=!1,clean:d=!0,request:f,write:y=!0,interfacePrefix:v="I",enumPrefix:P="E",typePrefix:O="T"},x){const w={output:n,outputCore:t,outputServices:r,outputModels:a,outputSchemas:o},C=new k(e,w,{interface:v,enum:P,type:O}),q=g(e)?await async function(e,n){const t=R(process.cwd(),n);if(!n)throw new Error(`Could not find OpenApi spec: "${t}"`);if(!await Be(t))throw new Error(`Could not read OpenApi spec: "${t}"`);const r=new h.default;e.addRefs(await r.resolve(n));const a=Object.assign({},r.schema);let o={};for(const n of Object.entries(a.paths)){const t=n[0],r=n[1];if(r.$ref){let n=e.get(r.$ref);n=Le(n,e,b(r.$ref)),o=Object.assign(o,{[t]:n})}else Object.assign(o,{[t]:r})}return r.schema=Object.assign(r.schema,{paths:o}),new Promise((e=>e(r.schema)))}(C,e):e,A=function(e){const n=e.swagger||e.openapi;if("string"==typeof n){const e=n.charAt(0),t=Number.parseInt(e);if(t===Fe.V2||t===Fe.V3)return t}throw new Error(`Unsupported Open API version: "${String(n)}"`)}(q),T=bt({httpClient:l,useUnionTypes:s,useOptions:i});switch(A){case Fe.V2:{const e=Ge(new ie(C).parse(q));if(!y)break;await x.writeClient({client:e,templates:T,output:w,httpClient:l,useOptions:i,useUnionTypes:s,exportCore:u,exportServices:p,exportModels:c,exportSchemas:m,clean:d,request:f});break}case Fe.V3:{const e=Ge(new Ie(C).parse(q));if(!y)break;await x.writeClient({client:e,templates:T,output:w,httpClient:l,useOptions:i,useUnionTypes:s,exportCore:u,exportServices:p,exportModels:c,exportSchemas:m,clean:d,request:f});break}}}exports.generate=async function(e){const n=Array.isArray(e)?e:Array.of(e);for(const e of n)e.output&&await Ue(e.output),e.outputCore&&await Ue(e.outputCore),e.outputSchemas&&await Ue(e.outputSchemas),e.outputModels&&await Ue(e.outputModels),e.outputServices&&await Ue(e.outputServices);const t=new qt;for(const e of n)await At(e,t);await t.combineAndWrite()};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("path"),n=require("os"),t=require("camelcase"),r=require("fs"),a=require("mkdirp"),o=require("rimraf"),l=require("util"),s=require("json-schema-ref-parser"),i=require("handlebars/runtime");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function p(e){if(e&&e.__esModule)return e;var n=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}})),n.default=e,Object.freeze(n)}var c=u(e),m=u(t),d=u(a),f=u(o),h=u(s),y=p(i);function v(n){const t=e.extname(n),r=e.basename(n);return t?r.substr(0,r.length-t.length):r}function g(e){return"string"==typeof e}const b=/\\/g;function P(e){return c.default.dirname(e).replace(b,"/")}function O(...e){return c.default.join(...e).replace(b,"/")}function x(e,n){const t=`./${c.default.relative(e,n)}`,r=t.length>0&&t.endsWith("/");return`${t.replace(b,"/")}`.concat(r?"":"/")}function R(...e){return c.default.resolve(...e).replace(b,"/")}class k{constructor(e,n,t){this.prefix={interface:"I",enum:"E",type:"T"};const r=R(process.cwd(),n.output);return this._output={output:r,outputCore:n.outputCore?R(process.cwd(),n.outputCore):r,outputServices:n.outputServices?R(process.cwd(),n.outputServices):r,outputModels:n.outputModels?R(process.cwd(),n.outputModels):r,outputSchemas:n.outputSchemas?R(process.cwd(),n.outputSchemas):r},this._refs={},g(e)?this._root={path:P(e),fileName:v(e)}:this._root={path:""},t&&(this.prefix=t),this}addRefs(e){return this._refs=e,this}values(...e){if(!this._refs)throw new Error("Context must be initialized");return this._refs.values(...e)}get(e){if(!this._refs)throw new Error("Context must be initialized");return this._refs.get(e)}paths(...e){if(!this._refs)throw new Error("Context must be initialized");return this._refs.paths(...e)}exists(e){if(!this._refs)throw new Error("Context must be initialized");return this._refs.exists(e)}fileName(){if(!this._root)throw new Error("Context must be initialized");return this._root.fileName?this._root.fileName:""}}var w;function C(e){return null==e?void 0:e.replace(/\\/g,"\\\\")}function q(e,n){const t=n["x-enum-varnames"],r=n["x-enum-descriptions"];return e.map(((e,n)=>({name:(null==t?void 0:t[n])||e.name,description:(null==r?void 0:r[n])||e.description,value:e.value,type:e.type})))}function T(e){return e?e.replace(/(\*\/)/g,"*_/").replace(/\r?\n(.*)/g,((e,t)=>`${n.EOL} * ${t.trim()}`)):null}function A(e){return null!=e&&""!==e}function j(e){return Array.isArray(e)?e.filter(((e,n,t)=>t.indexOf(e)===n)).filter(A).map((e=>"number"==typeof e?{name:`'_${e}'`,value:String(e),type:"number",description:null}:{name:String(e).replace(/\W+/g,"_").replace(/^(\d+)/g,"_$1").replace(/([a-z])([A-Z]+)/g,"$1_$2").toUpperCase(),value:`'${e}'`,type:"string",description:null})):[]}function S(e){if(/^(\w+=[0-9]+)/g.test(e)){const n=e.match(/(\w+=[0-9]+,?)/g);if(n){const e=[];return n.forEach((n=>{const t=n.split("=")[0],r=parseInt(n.split("=")[1].replace(/[^0-9]/g,""));t&&Number.isInteger(r)&&e.push({name:t.replace(/\W+/g,"_").replace(/^(\d+)/g,"_$1").replace(/([a-z])([A-Z]+)/g,"$1_$2").toUpperCase(),value:String(r),type:"number",description:null})})),e.filter(((e,n,t)=>t.map((e=>e.name)).indexOf(e.name)===n))}}return[]}function E(e){if(!e)return e;return e.replace(/\\/g,"/")}exports.HttpClient=void 0,(w=exports.HttpClient||(exports.HttpClient={})).FETCH="fetch",w.XHR="xhr",w.NODE="node",w.AXIOS="axios";const $=new Map([["File","File"],["file","File"],["any","any"],["object","any"],["array","any[]"],["boolean","boolean"],["byte","number"],["int","number"],["integer","number"],["float","number"],["double","number"],["short","number"],["long","number"],["number","number"],["char","string"],["date","string"],["date-time","string"],["password","string"],["string","string"],["void","void"],["null","null"]]);function H(e){return e.replace(/^[^a-zA-Z_$]+/g,"").replace(/[^\w$]+/g,"_")}function D(e,n){const t={type:"any",base:"any",template:null,imports:[],path:""},r=function(e){return e.trim().replace(/^#\/definitions\//,"").replace(/^#\/parameters\//,"").replace(/^#\/responses\//,"").replace(/^#\/securityDefinitions\//,"")}(E(e)||"");if(t.path=function(e){if(!e)return"";const n=e.lastIndexOf("/");return-1===n?"":e.substring(0,n+1)}(r),/\[.*\]$/g.test(r)){const e=r.match(/(.*?)\[(.*)\]$/);if(null==e?void 0:e.length){const n=D(e[1]);t.path=n.path;const r=D(e[2]);"any[]"===n.type?(t.type=`${r.type}[]`,t.base=r.type,n.imports=[]):r.type?(t.type=`${n.type}<${r.type}>`,t.base=n.type,t.template=r.type):(t.type=n.type,t.base=n.type,t.template=n.type),t.imports.push(...n.imports),t.imports.push(...r.imports)}}else if(a=r,$.has(a)){const e=function(e){return $.get(e)}(r);t.path=r,e&&(t.type=e,t.base=e)}else if(r){const e=function(e){const n=e.lastIndexOf("/");return H(-1===n?e:e.substring(n,e.length))}(r);t.path=r,t.type=e,t.base=e,t.imports.push({name:e,alias:"",path:r})}var a;return t.type===n&&(t.type="T",t.base="T",t.imports=[]),t}function I(e){var n;const{openApi:t,definition:r,isDefinition:a=!1,name:o="",path:l="",parentRef:s}=e,i={name:o,path:l,alias:"",export:"interface",type:"any",base:"any",template:null,link:null,description:T(r.description),isDefinition:a,isReadOnly:!0===r.readOnly,isNullable:!0===r["x-nullable"],isRequired:void 0!==r.default,format:r.format,maximum:r.maximum,exclusiveMaximum:r.exclusiveMaximum,minimum:r.minimum,exclusiveMinimum:r.exclusiveMinimum,multipleOf:r.multipleOf,maxLength:r.maxLength,minLength:r.minLength,maxItems:r.maxItems,minItems:r.minItems,uniqueItems:r.uniqueItems,maxProperties:r.maxProperties,minProperties:r.minProperties,pattern:C(r.pattern),imports:[],enum:[],enums:[],properties:[]};if(r.$ref){const e=D(r.$ref);return i.export="reference",i.type=e.type,i.base=e.base,i.template=e.template,i.imports.push(...e.imports),i}if(r.enum&&"boolean"!==r.type){const e=q(j(r.enum),r);if(e.length)return i.export="enum",i.type="string",i.base="string",i.enum.push(...e),i}if(("int"===r.type||"integer"===r.type)&&r.description){const e=S(r.description);if(e.length)return i.export="enum",i.type="number",i.base="number",i.enum.push(...e),i}if("array"===r.type&&r.items){if(r.items.$ref){const e=D(r.items.$ref);return i.export="array",i.type=e.type,i.base=e.base,i.template=e.template,i.imports.push(...e.imports),i}{const e=this.getModel({openApi:t,definition:r.items,parentRef:s});return i.export="array",i.type=e.type,i.base=e.base,i.template=e.template,i.link=e,i.imports.push(...e.imports),i}}if("object"===r.type&&"object"==typeof r.additionalProperties){if(r.additionalProperties.$ref){const e=D(r.additionalProperties.$ref);return i.export="dictionary",i.type=e.type,i.base=e.base,i.template=e.template,i.imports.push(...e.imports),i}{const e=this.getModel({openApi:t,definition:r.additionalProperties,parentRef:s});return i.export="dictionary",i.type=e.type,i.base=e.base,i.template=e.template,i.link=e,i.imports.push(...e.imports),i}}if(null===(n=r.allOf)||void 0===n?void 0:n.length){const e=this.getModelComposition(t,r,r.allOf,"all-of",s);return i.export=e.type,i.imports.push(...e.imports),i.properties.push(...e.properties),i.enums.push(...e.enums),i}if("object"===r.type){if(i.export="interface",i.type="any",i.base="any",r.properties){this.getModelProperties(t,r,s).forEach((e=>{i.imports.push(...e.imports),i.enums.push(...e.enums),i.properties.push(e),"enum"===e.export&&i.enums.push(e)}))}return i}if(r.type){const e=D(r.type);return i.export="generic",i.type=e.type,i.base=e.base,i.template=e.template,i.imports.push(...e.imports),i}return i}function N(e,n,t,r,a){const o={type:r,imports:[],enums:[],properties:[]},l=t.map((n=>this.getModel({openApi:e,definition:n,parentRef:a})));if(l.filter((e=>{const n=e.properties.length,t=e.enums.length;return!("any"===e.type&&!n&&!t)})).forEach((e=>{o.imports.push(...e.imports),o.enums.push(...e.enums),o.properties.push(e)})),n.properties){const t=this.getModelProperties(e,n,a);t.forEach((e=>{o.imports.push(...e.imports),o.enums.push(...e.enums)})),o.properties.push({name:"properties",alias:"",path:"",export:"interface",type:"any",base:"any",template:null,link:null,description:"",isDefinition:!1,isReadOnly:!1,isNullable:!1,isRequired:!1,imports:[],enum:[],enums:[],properties:t})}return o}function _(e){if(e){if(!/^[a-zA-Z_$][\w$]+$/g.test(e))return`'${e}'`}return e}function B(e,n,t){var r;const a=[];for(const o in n.properties)if(n.properties.hasOwnProperty(o)){const l=n.properties[o],s=(null===(r=n.required)||void 0===r?void 0:r.includes(o))||void 0!==l.default;if(l.$ref){const e=D(l.$ref);a.push({name:_(o),alias:"",path:"",export:"reference",type:e.type,base:e.base,template:e.template,link:null,description:T(l.description),isDefinition:!1,isReadOnly:!0===l.readOnly,isRequired:s,isNullable:!0===l["x-nullable"],format:l.format,maximum:l.maximum,exclusiveMaximum:l.exclusiveMaximum,minimum:l.minimum,exclusiveMinimum:l.exclusiveMinimum,multipleOf:l.multipleOf,maxLength:l.maxLength,minLength:l.minLength,maxItems:l.maxItems,minItems:l.minItems,uniqueItems:l.uniqueItems,maxProperties:l.maxProperties,minProperties:l.minProperties,pattern:C(l.pattern),imports:e.imports,enum:[],enums:[],properties:[]})}else{const n=this.getModel({openApi:e,definition:l,parentRef:t});a.push({name:_(o),alias:"",path:n.path,export:n.export,type:n.type,base:n.base,template:n.template,link:n.link,description:T(l.description),isDefinition:!1,isReadOnly:!0===l.readOnly,isRequired:s,isNullable:!0===l["x-nullable"],format:l.format,maximum:l.maximum,exclusiveMaximum:l.exclusiveMaximum,minimum:l.minimum,exclusiveMinimum:l.exclusiveMinimum,multipleOf:l.multipleOf,maxLength:l.maxLength,minLength:l.minLength,maxItems:l.maxItems,minItems:l.minItems,uniqueItems:l.uniqueItems,maxProperties:l.maxProperties,minProperties:l.minProperties,pattern:C(l.pattern),imports:n.imports,enum:n.enum,enums:n.enums,properties:n.properties})}}return a}var M,U=function e(n,t){if(n===t)return!0;if(n&&t&&"object"==typeof n&&"object"==typeof t){if(n.constructor!==t.constructor)return!1;var r,a,o;if(Array.isArray(n)){if((r=n.length)!=t.length)return!1;for(a=r;0!=a--;)if(!e(n[a],t[a]))return!1;return!0}if(n.constructor===RegExp)return n.source===t.source&&n.flags===t.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===t.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===t.toString();if((r=(o=Object.keys(n)).length)!==Object.keys(t).length)return!1;for(a=r;0!=a--;)if(!Object.prototype.hasOwnProperty.call(t,o[a]))return!1;for(a=r;0!=a--;){var l=o[a];if(!e(n[l],t[l]))return!1}return!0}return n!=n&&t!=t};function L(e,n,t=[],r="",a=!1){if(n.$ref){const o=n.$ref.match(/^(http:\/\/|https:\/\/)/g)?n.$ref:n.$ref.match(/^(#\/)/g)?O(r,n.$ref):O(P(r),n.$ref);if(function(e,n){return-1!==e.findIndex((e=>U(e.value,n)))}(t,o))return t;a?t.push({value:o,type:M.SCHEMA}):t.push({value:o,type:M.OTHERS});const l=e.get(o),s=n.$ref.match(/^(http:\/\/|https:\/\/)/g)?"":n.$ref.match(/^(#\/)/g)?r:O(P(r),n.$ref);return L(e,l,t,s,a)}return n.schema?Object.values(n).forEach(((n,a)=>{n instanceof Object&&L(e,n,t,r,!0)})):Object.values(n).forEach(((n,o)=>{n instanceof Object&&L(e,n,t,r,a)})),t}function F(e,n){return L(e,n).filter((e=>e.type===M.SCHEMA)).map((e=>e.value))}function V(e){return e.sort(((e,n)=>{const t=e.name.toLowerCase(),r=n.name.toLowerCase();return t.localeCompare(r,"en")}))}function W(e,n,t){return function(e,n,t){for(let r=0;r<t.length;++r)if(U(e,t[r]))return n===r;return!1}(e,n,t)}function Q(e){let n=[];const t=F(this.context,e);if(t){for(const r of t){const t=this.context.get(r),a=this.getType(r,""),o=this.getModel({openApi:e,definition:t,isDefinition:!0,name:a.base,path:a.path,parentRef:r});n.push(o)}let r;n=V(n.filter(W));let a=1;n.forEach((e=>{r&&r.name===e.name?(1===a&&(r.alias=`${e.name}$${a}`,a++),e.alias=`${e.name}$${a}`,a++):(e.alias="",a=1),r=e})),n.forEach((e=>{e.imports=e.imports.map((t=>{const r=n.filter((e=>`${e.path}${e.name}`===t.path&&e.name===t.name));return r.length>0?Object.assign(t,{alias:r[0].alias,path:O(x(e.path,r[0].path),t.name)}):t}))}))}return n.filter(W)}!function(e){e[e.SCHEMA=0]="SCHEMA",e[e.OTHERS=1]="OTHERS"}(M||(M={}));const z=/^(arguments|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|eval|export|extends|false|finally|for|function|if|implements|import|in|instanceof|interface|let|new|null|package|private|protected|public|return|static|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)$/g;function J(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim();return m.default(n).replace(z,"_$1")}function Z(e,n){const t=e.type===n.type&&e.base===n.base&&e.template===n.template;return t&&e.link&&n.link?Z(e.link,n.link):t}function G(e){const n=[];return e.forEach((e=>{const{code:t}=e;t&&204!==t&&t>=200&&t<300&&n.push(e)})),n.length||n.push({in:"response",name:"",alias:"",path:"",code:200,description:"",export:"generic",type:"void",base:"void",template:null,link:null,isDefinition:!1,isReadOnly:!1,isRequired:!1,isNullable:!1,imports:[],enum:[],enums:[],properties:[]}),n.filter(((e,n,t)=>t.findIndex((n=>Z(n,e)))===n))}function X(e,n,t,r,a){var o;const l=function(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim(),t=m.default(n,{pascalCase:!0});return t&&!t.endsWith("Service")?`${t}Service`:t}((null===(o=r.tags)||void 0===o?void 0:o[0])||"Service"),s=`${t}${l}`,i=function(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim();return m.default(n)}(r.operationId||s),u=function(e){return e.replace(/\{(.*?)\}/g,((e,n)=>`\${${J(n)}}`)).replace("${apiVersion}","${OpenAPI.VERSION}")}(n),p={service:l,name:i,summary:T(r.summary),description:T(r.description),deprecated:!0===r.deprecated,method:t.toUpperCase(),path:u,parameters:[...a.parameters],parametersPath:[...a.parametersPath],parametersQuery:[...a.parametersQuery],parametersForm:[...a.parametersForm],parametersHeader:[...a.parametersHeader],parametersCookie:[...a.parametersCookie],parametersBody:a.parametersBody,imports:[],errors:[],results:[],responseHeader:null};if(r.parameters){const n=this.getOperationParameters(e,r.parameters);p.imports.push(...n.imports),p.parameters.push(...n.parameters),p.parametersPath.push(...n.parametersPath),p.parametersQuery.push(...n.parametersQuery),p.parametersForm.push(...n.parametersForm),p.parametersHeader.push(...n.parametersHeader),p.parametersCookie.push(...n.parametersCookie),p.parametersBody=n.parametersBody}if(r.responses){const n=this.getOperationResponses(e,r.responses),t=G(n);p.errors=function(e){return e.filter((e=>e.code>=300&&e.description)).map((e=>{return{code:e.code,description:(n=e.description,n.replace(/([^\\])`/g,"$1\\`").replace(/(\*\/)/g,"*_/"))};var n}))}(n),p.responseHeader=function(e){const n=e.find((e=>"header"===e.in));return n?n.name:null}(t),t.forEach((e=>{p.results.push(e),p.imports.push(...e.imports)}))}return p}function K(e,n){var t;if(void 0===e.default)return;if(null===e.default)return"null";switch(e.type||typeof e.default){case"int":case"integer":case"number":return"enum"===n.export&&(null===(t=n.enum)||void 0===t?void 0:t[e.default])?n.enum[e.default].value:e.default;case"boolean":return JSON.stringify(e.default);case"string":return`'${e.default}'`;case"object":try{return JSON.stringify(e.default,null,4)}catch(e){}}}function Y(e,n){const t={path:"",in:n.in,prop:n.name,export:"interface",name:J(n.name),alias:"",type:"any",base:"any",template:null,link:null,description:T(n.description),isDefinition:!1,isReadOnly:!1,isRequired:!0===n.required,isNullable:!0===n["x-nullable"],format:n.format,maximum:n.maximum,exclusiveMaximum:n.exclusiveMaximum,minimum:n.minimum,exclusiveMinimum:n.exclusiveMinimum,multipleOf:n.multipleOf,maxLength:n.maxLength,minLength:n.minLength,maxItems:n.maxItems,minItems:n.minItems,uniqueItems:n.uniqueItems,pattern:C(n.pattern),imports:[],enum:[],enums:[],properties:[],mediaType:null};if(n.$ref){const e=D(n.$ref);return t.export="reference",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t.default=K(n,t),t.path=e.path,t}if(n.enum){const e=q(j(n.enum),n);if(e.length)return t.export="enum",t.type="string",t.base="string",t.enum.push(...e),t.default=K(n,t),t}if(("int"===n.type||"integer"===n.type)&&n.description){const e=S(n.description);if(e.length)return t.export="enum",t.type="number",t.base="number",t.enum.push(...e),t.default=K(n,t),t}if("array"===n.type&&n.items){const e=D(n.items.type);return t.export="array",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t.default=K(n,t),t}if("object"===n.type&&n.items){const e=D(n.items.type);return t.export="dictionary",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t.default=K(n,t),t}if(n.schema){if(n.schema.$ref){const e=D(n.schema.$ref);return t.export="reference",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t.default=K(n,t),t}{const r=this.getModel({openApi:e,definition:n.schema,parentRef:""});return t.export=r.export,t.type=r.type,t.base=r.base,t.template=r.template,t.link=r.link,t.imports.push(...r.imports),t.enum.push(...r.enum),t.enums.push(...r.enums),t.properties.push(...r.properties),t.default=K(n,t),t}}if(n.type){const e=D(n.type);return t.export="generic",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t.default=K(n,t),t}return t}function ee(e,n){return!e.isRequired&&n.isRequired?1:e.isRequired&&!n.isRequired||e.isRequired&&void 0===e.default&&void 0!==n.default||e.isRequired&&void 0!==e.default&&void 0===n.default?-1:e.isRequired&&void 0!==e.default&&void 0===n.default||!e.isRequired&&void 0===e.default&&void 0!==n.default?1:0}function ne(e,n){const t={imports:[],parameters:[],parametersPath:[],parametersQuery:[],parametersForm:[],parametersCookie:[],parametersHeader:[],parametersBody:null};return n.forEach((n=>{const r=n.$ref?this.context.get(n.$ref):n,a=this.getOperationParameter(e,r);if("api-version"!==a.prop)switch(a.in){case"path":t.parametersPath.push(a),t.parameters.push(a),t.imports.push(...a.imports);break;case"query":t.parametersQuery.push(a),t.parameters.push(a),t.imports.push(...a.imports);break;case"header":t.parametersHeader.push(a),t.parameters.push(a),t.imports.push(...a.imports);break;case"formData":t.parametersForm.push(a),t.parameters.push(a),t.imports.push(...a.imports);break;case"body":t.parametersBody=a,t.parameters.push(a),t.imports.push(...a.imports)}})),t.parameters=t.parameters.sort(ee),t.parametersPath=t.parametersPath.sort(ee),t.parametersQuery=t.parametersQuery.sort(ee),t.parametersForm=t.parametersForm.sort(ee),t.parametersCookie=t.parametersCookie.sort(ee),t.parametersHeader=t.parametersHeader.sort(ee),t}function te(e,n,t){const r={in:"response",name:"",alias:"",path:"",code:t,description:T(n.description),export:"generic",type:"any",base:"any",template:null,link:null,isDefinition:!1,isReadOnly:!1,isRequired:!1,isNullable:!1,imports:[],enum:[],enums:[],properties:[]};if(n.schema){if(n.schema.$ref){const e=D(n.schema.$ref);return r.export="reference",r.type=e.type,r.base=e.base,r.template=e.template,r.imports.push(...e.imports),r}{const t=this.getModel({openApi:e,definition:n.schema,parentRef:""});return r.export=t.export,r.type=t.type,r.base=t.base,r.template=t.template,r.link=t.link,r.isReadOnly=t.isReadOnly,r.isRequired=t.isRequired,r.isNullable=t.isNullable,r.format=t.format,r.maximum=t.maximum,r.exclusiveMaximum=t.exclusiveMaximum,r.minimum=t.minimum,r.exclusiveMinimum=t.exclusiveMinimum,r.multipleOf=t.multipleOf,r.maxLength=t.maxLength,r.minLength=t.minLength,r.maxItems=t.maxItems,r.minItems=t.minItems,r.uniqueItems=t.uniqueItems,r.maxProperties=t.maxProperties,r.minProperties=t.minProperties,r.pattern=C(t.pattern),r.imports.push(...t.imports),r.enum.push(...t.enum),r.enums.push(...t.enums),r.properties.push(...t.properties),r}}if(n.headers)for(const e in n.headers)if(n.headers.hasOwnProperty(e))return r.in="header",r.name=e,r.type="string",r.base="string",r;return r}function re(e){if("default"===e)return 200;if(/[0-9]+/g.test(e)){const n=parseInt(e);if(Number.isInteger(n))return Math.abs(n)}return null}function ae(e,n){const t=[];for(const r in n)if(n.hasOwnProperty(r)){const a=n[r],o=a.$ref?this.context.get(a.$ref):a,l=re(r);if(l){const n=this.getOperationResponse(e,o,l);t.push(n)}}return t.sort(((e,n)=>e.code<n.code?-1:e.code>n.code?1:0))}function oe(e){const n=new Map;for(const t in e.paths)if(e.paths.hasOwnProperty(t)){const r=e.paths[t],a=this.getOperationParameters(e,r.parameters||[]);for(const o in r)if(r.hasOwnProperty(o))switch(o){case"get":case"put":case"post":case"delete":case"options":case"head":case"patch":const l=r[o],s=this.getOperation(e,t,o,l,a),i=n.get(s.service)||{name:s.service,originName:s.service,operations:[],imports:[]};i.operations.push(s),i.imports.push(...s.imports),n.set(s.service,i)}}return Array.from(n.values())}function le(e){const n=function(e="1.0"){return e.replace(/^v/gi,"")}(e.info.version),t=function(e){var n;const t=(null===(n=e.schemes)||void 0===n?void 0:n[0])||"http",r=e.host,a=e.basePath||"";return r?`${t}://${r}${a}`:a}(e);return{version:n,server:t,models:this.getModels(e),services:this.getServices(e)}}class se{constructor(e){this.parse=le,this.getModels=Q,this.getType=D,this.getModel=I,this.getModelComposition=N,this.getModelProperties=B,this.getServices=oe,this.getOperationParameters=ne,this.getOperationParameter=Y,this.getOperation=X,this.getOperationResponses=ae,this.getOperationResponse=te,this.context=e}getTypeNameByRef(e,n){if(n){const t=this.context.get(n);if(t.oneOf||t.anyOf||t.allOf||["string","number","integer","boolean","array"].includes(t.type))return`${this.context.prefix.type}${e}`;if(t.enum&&"boolean"!==t)return`${this.context.prefix.enum}${e}`;if("object"===t.type)return`${this.context.prefix.interface}${e}`}return e}}function ie(e){return e?e.replace(/(\*\/)/g,"*_/").replace(/\r?\n(.*)/g,((e,t)=>`${n.EOL} * ${t.trim()}`)):null}function ue(e,n){var t;if(void 0===e.default)return;if(null===e.default)return"null";switch(e.type||typeof e.default){case"int":case"integer":case"number":return"enum"===(null==n?void 0:n.export)&&(null===(t=n.enum)||void 0===t?void 0:t[e.default])?n.enum[e.default].value:e.default;case"boolean":return JSON.stringify(e.default);case"string":return`'${e.default}'`;case"object":try{return JSON.stringify(e.default,null,4)}catch(e){}}}function pe(e){var n,t,r;const{openApi:a,definition:o,isDefinition:l=!1,name:s="",path:i="",parentRef:u}=e,p={name:s,alias:"",path:i,export:"interface",type:"any",base:"any",link:null,template:null,description:ie(o.description),isDefinition:l,isReadOnly:!0===o.readOnly,isNullable:!0===o.nullable,isRequired:void 0!==o.default,format:o.format,maximum:o.maximum,exclusiveMaximum:o.exclusiveMaximum,minimum:o.minimum,exclusiveMinimum:o.exclusiveMinimum,multipleOf:o.multipleOf,maxLength:o.maxLength,minLength:o.minLength,maxItems:o.maxItems,minItems:o.minItems,uniqueItems:o.uniqueItems,maxProperties:o.maxProperties,minProperties:o.minProperties,pattern:C(o.pattern),imports:[],enum:[],enums:[],properties:[]};if(o.$ref){const e=this.getType(o.$ref,u);return p.export="reference",p.type=e.type,p.base=e.base,p.imports.push(...e.imports),p.default=ue(o,p),p}if(o.enum&&"boolean"!==o.type){const e=function(e,n){const t=n["x-enum-varnames"],r=n["x-enum-descriptions"];return e.map(((e,n)=>({name:(null==t?void 0:t[n])||e.name,description:(null==r?void 0:r[n])||e.description,value:e.value,type:e.type})))}((c=o.enum,Array.isArray(c)?c.filter(((e,n,t)=>t.indexOf(e)===n)).filter(A).map((e=>"number"==typeof e?{name:`'_${e}'`,value:String(e),type:"number",description:null}:{name:String(e).replace(/\W+/g,"_").replace(/^(\d+)/g,"_$1").replace(/([a-z])([A-Z]+)/g,"$1_$2").toUpperCase(),value:`'${e}'`,type:"string",description:null})):[]),o);if(e.length)return p.export="enum",p.type="string",p.base="string",p.enum.push(...e),p.default=ue(o,p),p}var c;if(("int"===o.type||"integer"===o.type)&&o.description){const e=function(e){if(/^(\w+=[0-9]+)/g.test(e)){const n=e.match(/(\w+=[0-9]+,?)/g);if(n){const e=[];return n.forEach((n=>{const t=n.split("=")[0],r=parseInt(n.split("=")[1].replace(/[^0-9]/g,""));t&&Number.isInteger(r)&&e.push({name:t.replace(/\W+/g,"_").replace(/^(\d+)/g,"_$1").replace(/([a-z])([A-Z]+)/g,"$1_$2").toUpperCase(),value:String(r),type:"number",description:null})})),e.filter(((e,n,t)=>t.map((e=>e.name)).indexOf(e.name)===n))}}return[]}(o.description);if(e.length)return p.export="enum",p.type="number",p.base="number",p.enum.push(...e),p.default=ue(o,p),p}if("array"===o.type&&o.items){if(o.items.$ref){const e=this.getType(o.items.$ref,u);return p.export="array",p.type=e.type,p.base=e.base,p.imports.push(...e.imports),p.default=ue(o,p),p}{const e=this.getModel({openApi:a,definition:o.items,parentRef:u});return p.export="array",p.type=e.type,p.base=e.base,p.link=e,p.imports.push(...e.imports),p.default=ue(o,p),p}}if("object"===o.type&&"object"==typeof o.additionalProperties){if(o.additionalProperties.$ref){const e=this.getType(o.additionalProperties.$ref,u);return p.export="dictionary",p.type=e.type,p.base=e.base,p.imports.push(...e.imports),p.default=ue(o,p),p}{const e=this.getModel({openApi:a,definition:o.additionalProperties,parentRef:u});return p.export="dictionary",p.type=e.type,p.base=e.base,p.link=e,p.imports.push(...e.imports),p.default=ue(o,p),p}}if(null===(n=o.oneOf)||void 0===n?void 0:n.length){const e=this.getModelComposition(a,o,o.oneOf,"one-of",u);return p.export=e.type,p.imports.push(...e.imports),p.properties.push(...e.properties),p.enums.push(...e.enums),p}if(null===(t=o.anyOf)||void 0===t?void 0:t.length){const e=this.getModelComposition(a,o,o.anyOf,"any-of",u);return p.export=e.type,p.imports.push(...e.imports),p.properties.push(...e.properties),p.enums.push(...e.enums),p}if(null===(r=o.allOf)||void 0===r?void 0:r.length){const e=this.getModelComposition(a,o,o.allOf,"all-of",u);return p.export=e.type,p.imports.push(...e.imports),p.properties.push(...e.properties),p.enums.push(...e.enums),p}if("object"===o.type){if(p.export="interface",p.type="any",p.base="any",p.default=ue(o,p),o.properties){this.getModelProperties(a,o,u).forEach((e=>{p.imports.push(...e.imports),p.enums.push(...e.enums),p.properties.push(e),"enum"===e.export&&p.enums.push(e)}))}return p}if(o.type){const e=this.getType(o.type,u);return p.export="generic",p.type=e.type,p.base=e.base,p.imports.push(...e.imports),p.default=ue(o,p),p}return p}function ce(e,n,t,r,a){const o={type:r,imports:[],enums:[],properties:[]},l=t.map((n=>this.getModel({openApi:e,definition:n,parentRef:a})));if(l.filter((e=>{const n=e.properties.length,t=e.enums.length;return!("any"===e.type&&!n&&!t)})).forEach((e=>{o.imports.push(...e.imports),o.enums.push(...e.enums),o.properties.push(e)})),n.properties){const t=this.getModelProperties(e,n,a);t.forEach((e=>{o.imports.push(...e.imports),o.enums.push(...e.enums)})),o.properties.push({name:"properties",alias:"",path:"",export:"interface",type:"any",base:"any",template:null,link:null,description:"",isDefinition:!1,isReadOnly:!1,isNullable:!1,isRequired:!1,imports:[],enum:[],enums:[],properties:t})}return o.imports=o.imports.filter(W),o}function me(e){if(e){if(!/^[a-zA-Z_$][\w$]+$/g.test(e))return`'${e}'`}return e}function de(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim();return m.default(n).replace(/^./,(e=>e.toUpperCase()))}function fe(e,n,t){var r;const a=[];for(const o in n.properties)if(n.properties.hasOwnProperty(o)){const l=n.properties[o],s=(null===(r=n.required)||void 0===r?void 0:r.includes(o))||void 0!==l.default;if(l.$ref){const e=this.getType(l.$ref,t);a.push({name:me(o),alias:"",path:e.path,export:"reference",type:e.type,base:e.base,template:e.template,link:null,description:ie(l.description),isDefinition:!1,isReadOnly:!0===l.readOnly,isRequired:s,isNullable:!0===l.nullable,format:l.format,maximum:l.maximum,exclusiveMaximum:l.exclusiveMaximum,minimum:l.minimum,exclusiveMinimum:l.exclusiveMinimum,multipleOf:l.multipleOf,maxLength:l.maxLength,minLength:l.minLength,maxItems:l.maxItems,minItems:l.minItems,uniqueItems:l.uniqueItems,maxProperties:l.maxProperties,minProperties:l.minProperties,pattern:C(l.pattern),imports:e.imports,enum:[],enums:[],properties:[]})}else{const n=this.getModel({openApi:e,definition:l,parentRef:t});a.push({name:me(o),alias:"enum"===n.export?`${this.context.prefix.enum}${de(me(o))}`:"",path:n.path,export:n.export,type:n.type,base:n.base,template:n.template,link:n.link,description:ie(l.description),isDefinition:!1,isReadOnly:!0===l.readOnly,isRequired:s,isNullable:!0===l.nullable,format:l.format,maximum:l.maximum,exclusiveMaximum:l.exclusiveMaximum,minimum:l.minimum,exclusiveMinimum:l.exclusiveMinimum,multipleOf:l.multipleOf,maxLength:l.maxLength,minLength:l.minLength,maxItems:l.maxItems,minItems:l.minItems,uniqueItems:l.uniqueItems,maxProperties:l.maxProperties,minProperties:l.minProperties,pattern:C(l.pattern),imports:n.imports,enum:n.enum,enums:n.enums,properties:n.properties})}}return a}function he(e){let n=[];const t=F(this.context,e);if(t){for(const r of t){const t=this.context.get(r),a=this.getType(r,""),o=this.getModel({openApi:e,definition:t,isDefinition:!0,name:a.base,path:a.path,parentRef:r});n.push(o)}let r;n=V(n.filter(W));let a=1;n.forEach((e=>{r&&r.name===e.name?(1===a&&(r.alias=`${e.name}$${a}`,a++),e.alias=`${e.name}$${a}`,a++):(e.alias="",a=1),r=e})),n.forEach((e=>{e.imports=e.imports.map((t=>{const r=n.filter((e=>`${e.path}${e.name}`===t.path&&e.name===t.name));return r.length>0?Object.assign(t,{alias:r[0].alias,path:O(x(e.path,r[0].path),t.name)}):t}))}))}return n.filter(W)}const ye=/^(arguments|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|eval|export|extends|false|finally|for|function|if|implements|import|in|instanceof|interface|let|new|null|package|private|protected|public|return|static|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)$/g;function ve(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim();return m.default(n).replace(ye,"_$1")}function ge(e,n){const t=e.type===n.type&&e.base===n.base&&e.template===n.template;return t&&e.link&&n.link?ge(e.link,n.link):t}function be(e){const n=[];return e.forEach((e=>{const{code:t}=e;t&&204!==t&&t>=200&&t<300&&n.push(e)})),n.length||n.push({in:"response",name:"",alias:"",path:"",code:200,description:"",export:"generic",type:"void",base:"void",template:null,link:null,isDefinition:!1,isReadOnly:!1,isRequired:!1,isNullable:!1,imports:[],enum:[],enums:[],properties:[]}),n.filter(((e,n,t)=>t.findIndex((n=>ge(n,e)))===n))}function Pe(e,n,t,r,a,o){const l=`${t}${o}`,s=function(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim();return m.default(n)}(r.operationId||l),i=function(e){return e.replace(/\{(.*?)\}/g,((e,n)=>`\${${ve(n)}}`)).replace("${apiVersion}","${OpenAPI.VERSION}")}(n),u={service:o,name:s,summary:ie(r.summary),description:ie(r.description),deprecated:!0===r.deprecated,method:t.toUpperCase(),path:i,parameters:[...a.parameters],parametersPath:[...a.parametersPath],parametersQuery:[...a.parametersQuery],parametersForm:[...a.parametersForm],parametersHeader:[...a.parametersHeader],parametersCookie:[...a.parametersCookie],parametersBody:a.parametersBody,imports:[],errors:[],results:[],responseHeader:null};if(r.parameters){const n=this.getOperationParameters(e,r.parameters);u.imports.push(...n.imports),u.parameters.push(...n.parameters),u.parametersPath.push(...n.parametersPath),u.parametersQuery.push(...n.parametersQuery),u.parametersForm.push(...n.parametersForm),u.parametersHeader.push(...n.parametersHeader),u.parametersCookie.push(...n.parametersCookie),u.parametersBody=n.parametersBody}if(r.requestBody){const n=r.requestBody.$ref?this.context.get(r.requestBody.$ref):r.requestBody,t=this.getOperationRequestBody(e,n,"");u.imports.push(...t.imports),u.parameters.push(t),u.parameters=u.parameters.sort(ee),u.parametersBody=t}if(r.responses){const n=this.getOperationResponses(e,r.responses),t=be(n);u.errors=function(e){return e.filter((e=>e.code>=300&&e.description)).map((e=>{return{code:e.code,description:(n=e.description,n.replace(/([^\\])`/g,"$1\\`").replace(/(\*\/)/g,"*_/"))};var n}))}(n),u.responseHeader=function(e){const n=e.find((e=>"header"===e.in));return n?n.name:null}(t),t.forEach((e=>{u.results.push(e),u.imports.push(...e.imports)}))}return u}function Oe(e,n){const t={in:n.in,prop:n.name,export:"interface",name:ve(n.name),alias:"",path:"",type:"any",base:"any",template:null,link:null,description:ie(n.description),isDefinition:!1,isReadOnly:!1,isRequired:!0===n.required,isNullable:!0===n.nullable,imports:[],enum:[],enums:[],properties:[],mediaType:null};if(n.$ref){const e=this.getType(n.$ref,"");return t.export="reference",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t}if(n.schema){if(n.schema.$ref){const e=this.getType(n.schema.$ref,"");return t.export="reference",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t.default=ue(n.schema),t}{const r=this.getModel({openApi:e,definition:n.schema,parentRef:""});return t.export=r.export,t.type=r.type,t.base=r.base,t.template=r.template,t.link=r.link,t.isReadOnly=r.isReadOnly,t.isRequired=t.isRequired||r.isRequired,t.isNullable=t.isNullable||r.isNullable,t.format=r.format,t.maximum=r.maximum,t.exclusiveMaximum=r.exclusiveMaximum,t.minimum=r.minimum,t.exclusiveMinimum=r.exclusiveMinimum,t.multipleOf=r.multipleOf,t.maxLength=r.maxLength,t.minLength=r.minLength,t.maxItems=r.maxItems,t.minItems=r.minItems,t.uniqueItems=r.uniqueItems,t.maxProperties=r.maxProperties,t.minProperties=r.minProperties,t.pattern=C(r.pattern),t.default=r.default,t.imports.push(...r.imports),t.enum.push(...r.enum),t.enums.push(...r.enums),t.properties.push(...r.properties),t}}return t}function xe(e,n){const t={imports:[],parameters:[],parametersPath:[],parametersQuery:[],parametersForm:[],parametersCookie:[],parametersHeader:[],parametersBody:null};return n.forEach((n=>{const r=n.$ref?this.context.get(n.$ref):n,a=this.getOperationParameter(e,r);if("api-version"!==a.prop)switch(r.in){case"path":t.parametersPath.push(a),t.parameters.push(a),t.imports.push(...a.imports);break;case"query":t.parametersQuery.push(a),t.parameters.push(a),t.imports.push(...a.imports);break;case"formData":t.parametersForm.push(a),t.parameters.push(a),t.imports.push(...a.imports);break;case"cookie":t.parametersCookie.push(a),t.parameters.push(a),t.imports.push(...a.imports);break;case"header":t.parametersHeader.push(a),t.parameters.push(a),t.imports.push(...a.imports)}})),t.parameters=t.parameters.sort(ee),t.parametersPath=t.parametersPath.sort(ee),t.parametersQuery=t.parametersQuery.sort(ee),t.parametersForm=t.parametersForm.sort(ee),t.parametersCookie=t.parametersCookie.sort(ee),t.parametersHeader=t.parametersHeader.sort(ee),t}function Re(e,n){return n["application/json-patch+json"]&&n["application/json-patch+json"].schema||n["application/json"]&&n["application/json"].schema||n["text/json"]&&n["text/json"].schema||n["text/plain"]&&n["text/plain"].schema||n["multipart/mixed"]&&n["multipart/mixed"].schema||n["multipart/related"]&&n["multipart/related"].schema||n["multipart/batch"]&&n["multipart/batch"].schema||null}function ke(e,n,t){const r={in:"body",prop:"body",export:"interface",name:"requestBody",alias:"",path:"",type:"any",base:"any",template:null,link:null,description:ie(n.description),default:void 0,isDefinition:!1,isReadOnly:!1,isRequired:!0===n.required,isNullable:!0===n.nullable,imports:[],enum:[],enums:[],properties:[],mediaType:null};if(n.content){const o=Re(0,n.content);if(o){if(r.mediaType=(a=n.content,Object.keys(a).find((e=>["application/json-patch+json","application/json","text/json","text/plain","multipart/mixed","multipart/related","multipart/batch"].includes(e)))||null),null==o?void 0:o.$ref){const e=this.getType(o.$ref,t);return r.export="reference",r.type=e.type,r.base=e.base,r.path=e.path,r.template=e.template,r.imports.push(...e.imports),r}{const n=this.getModel({openApi:e,definition:o,parentRef:t});return r.export=n.export,r.type=n.type,r.base=n.base,r.path=n.path,r.template=n.template,r.link=n.link,r.isReadOnly=n.isReadOnly,r.isRequired=r.isRequired||n.isRequired,r.isNullable=r.isNullable||n.isNullable,r.format=n.format,r.maximum=n.maximum,r.exclusiveMaximum=n.exclusiveMaximum,r.minimum=n.minimum,r.exclusiveMinimum=n.exclusiveMinimum,r.multipleOf=n.multipleOf,r.maxLength=n.maxLength,r.minLength=n.minLength,r.maxItems=n.maxItems,r.minItems=n.minItems,r.uniqueItems=n.uniqueItems,r.maxProperties=n.maxProperties,r.minProperties=n.minProperties,r.pattern=C(n.pattern),r.imports.push(...n.imports),r.enum.push(...n.enum),r.enums.push(...n.enums),r.properties.push(...n.properties),r}}}var a;return r}function we(e,n,t,r){const a={in:"response",name:"",alias:"",path:"",code:t,description:ie(n.description),export:"generic",type:"any",base:"any",template:null,link:null,isDefinition:!1,isReadOnly:!1,isRequired:!1,isNullable:!1,imports:[],enum:[],enums:[],properties:[]};if(n.content){const t=Re(0,n.content);if(t){if(null==t?void 0:t.$ref){const e=this.getType(t.$ref,r);return a.export="reference",a.type=e.type,a.base=e.base,a.path=e.path,a.template=e.template,a.imports.push(...e.imports),a}{const n=this.getModel({openApi:e,definition:t,parentRef:r});return a.export=n.export,a.type=n.type,a.base=n.base,a.path=n.path,a.template=n.template,a.link=n.link,a.isReadOnly=n.isReadOnly,a.isRequired=n.isRequired,a.isNullable=n.isNullable,a.format=n.format,a.maximum=n.maximum,a.exclusiveMaximum=n.exclusiveMaximum,a.minimum=n.minimum,a.exclusiveMinimum=n.exclusiveMinimum,a.multipleOf=n.multipleOf,a.maxLength=n.maxLength,a.minLength=n.minLength,a.maxItems=n.maxItems,a.minItems=n.minItems,a.uniqueItems=n.uniqueItems,a.maxProperties=n.maxProperties,a.minProperties=n.minProperties,a.pattern=C(n.pattern),a.imports.push(...n.imports),a.enum.push(...n.enum),a.enums.push(...n.enums),a.properties.push(...n.properties),a}}}if(n.headers)for(const e in n.headers)if(n.headers.hasOwnProperty(e))return a.in="header",a.name=e,a.type="string",a.base="string",a;return a}function Ce(e){if("default"===e)return 200;if(/[0-9]+/g.test(e)){const n=parseInt(e);if(Number.isInteger(n))return Math.abs(n)}return null}function qe(e,n){const t=[];for(const r in n)if(n.hasOwnProperty(r)){const a=n[r],o=a.$ref?this.context.get(a.$ref):a,l=Ce(r);if(l){const n=this.getOperationResponse(e,o,l,"");t.push(n)}}return t.sort(((e,n)=>e.code<n.code?-1:e.code>n.code?1:0))}function Te(e,n){var t;return function(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim(),t=m.default(n,{pascalCase:!0});return t&&!t.endsWith("Service")?`${t}Service`:t}((null===(t=e.tags)||void 0===t?void 0:t[0])||`${de(n)}Service`)}function Ae(e,n){e.filter((e=>e.path===n.path&&e.type===n.name&&n.alias)).forEach((e=>{e.alias=n.alias,e.base=n.alias}))}function je(e){var n;const t=new Map;for(const r in e.paths)if(e.paths.hasOwnProperty(r)){const a=e.paths[r],o=this.getOperationParameters(e,a.parameters||[]);for(const l in a)if(a.hasOwnProperty(l))switch(l){case"get":case"put":case"post":case"delete":case"options":case"head":case"patch":const s=a[l],i=this.context.fileName(),u=Te(s,i),p=t.get(u)||{name:u,originName:de((null===(n=s.tags)||void 0===n?void 0:n[0])||i),operations:[],imports:[]},c=this.getOperation(e,r,l,s,o,u);p.operations.push(c),c.imports=c.imports.map((e=>{const n=p.imports.find((n=>n.path===e.path));return n||e})),p.imports.push(...c.imports),t.set(c.service,p)}}return t.forEach((e=>{let n;e.imports=e.imports.filter(W).sort(((e,n)=>{const t=e.name.toLowerCase(),r=n.name.toLowerCase();return t.localeCompare(r,"en")}));let t=1;e.imports=e.imports.map((e=>(n&&n.name===e.name?(1===t&&(n.alias=`${e.name}$${t}`,t++),e.alias=`${e.name}$${t}`,t++):(e.alias="",t=1),n=e,e))),e.imports.forEach((n=>{for(const t of e.operations)Ae(t.results,n),Ae(t.parameters,n)}))})),Array.from(t.values())}function Se(e){return e.replace(/^[^a-zA-Z_$]+/g,"").replace(/[^\w$]+/g,"_")}const Ee=new Map([["File","File"],["file","File"],["any","any"],["object","any"],["array","any[]"],["boolean","boolean"],["byte","number"],["int","number"],["integer","number"],["float","number"],["double","number"],["short","number"],["long","number"],["number","number"],["char","string"],["date","string"],["date-time","string"],["password","string"],["string","string"],["void","void"],["null","null"]]);function $e(e){return Ee.has(e)}function He(n,t){const r={type:"any",base:"any",imports:[],path:"",template:null},a=function(n){if(!n||$e(n))return n;if(!n.match(/^(http:\/\/|https:\/\/|#\/)/g)&&!$e(n)&&!n.match(/^array\[[a-z]+\]$/g)){const t=n.match(/^(.*)#/),r=P(t?t[1]:n),a=e.extname(n),o=a.toLowerCase().match(/(\.json|\.yaml|\.yml)$/g)?de(e.basename(n,a)):de(e.basename(n));return r?O(r,o):o}const t=n.trim().replace(/^#\/components\/schemas\//,"").replace(/^#\/components\/responses\//,"").replace(/^#\/components\/parameters\//,"").replace(/^#\/components\/examples\//,"").replace(/^#\/components\/requestBodies\//,"").replace(/^#\/components\/headers\//,"").replace(/^#\/components\/securitySchemes\//,"").replace(/^#\/components\/links\//,"").replace(/^#\/components\/callbacks\//,""),r=P(t),a=de(e.basename(t));return r?O(r,a):a}(E(n)||"");if($e(a)){const e=(o=a,Ee.get(o));r.path=a,e&&(r.type=e,r.base=e)}else if(a){const e=this.getTypeNameByRef(function(e){const n=e.lastIndexOf("/");return Se(-1===n?e:e.substring(n,e.length))}(a),function(e,n){return e?n&&n.match(/^(#\/)/g)?e:e.match(/^(#\/)/g)?`${n}${e}`:O(P(n),e):n.match(/^(#\/)/g)?"":n}(n,t));r.path=a,r.type=e,r.base=e,r.imports.push({name:e,alias:"",path:a})}var o;return r}function De(e){const n=function(e="1.0"){return e.replace(/^v/gi,"")}(e.info.version),t=function(e){var n;const t=null===(n=e.servers)||void 0===n?void 0:n[0],r=(null==t?void 0:t.variables)||{};let a=(null==t?void 0:t.url)||"";for(const e in r)r.hasOwnProperty(e)&&(a=a.replace(`{${e}}`,r[e].default));return a}(e);return{version:n,server:t,models:this.getModels(e),services:this.getServices(e)}}class Ie{constructor(e){this.parse=De,this.getModels=he,this.getType=He,this.getModel=pe,this.getModelComposition=ce,this.getModelProperties=fe,this.getServices=je,this.getOperationParameters=xe,this.getOperationParameter=Oe,this.getOperation=Pe,this.getOperationResponses=qe,this.getOperationResponse=we,this.getOperationRequestBody=ke,this._context=e}get context(){return this._context}getTypeNameByRef(e,n){if(n){const t=this.context.get(n);if(t.enum&&"boolean"!==t)return`${this.context.prefix.enum}${e}`;if(t.oneOf||t.anyOf||t.allOf||["string","number","integer","boolean","array"].includes(t.type))return`${this.context.prefix.type}${e}`;if("object"===t.type)return`${this.context.prefix.interface}${e}`}return e}}l.promisify(r.readFile);const Ne=l.promisify(r.writeFile),_e=l.promisify(r.copyFile),Be=l.promisify(r.exists),Me=d.default,Ue=e=>new Promise(((n,t)=>{f.default(e,(e=>{e?t(e):n()}))}));function Le(n,t,r){if(!n.$ref||e.isAbsolute(n.$ref)||n.$ref.match(/^(http:\/\/|https:\/\/|#\/)/g))for(const e of Object.keys(n))n[e]instanceof Object&&Le(n[e],t,r);else n.$ref=O(r,n.$ref);return n}var Fe;function Ve(e){var n;return null===(n=null==e?void 0:e.enum)||void 0===n?void 0:n.filter(((e,n,t)=>t.findIndex((n=>n.name===e.name))===n))}function We(e){var n;return null===(n=null==e?void 0:e.enums)||void 0===n?void 0:n.filter(((e,n,t)=>t.findIndex((n=>n.name===e.name))===n))}function Qe(e,n){return e instanceof Object&&"name"in e&&"alias"in e&&"path"in e?function(e,n){const t=`${e.path}${e.name}`.toLowerCase(),r=`${n.path}${n.name}`.toLowerCase();return t.localeCompare(r,"en")}(e,n):function(e,n){const t=e.toLowerCase(),r=n.toLowerCase();return t.localeCompare(r,"en")}(e,n)}function ze(e){var n,t,r;return null===(r=null===(t=null===(n=null==e?void 0:e.imports)||void 0===n?void 0:n.filter(W))||void 0===t?void 0:t.sort(Qe))||void 0===r?void 0:r.filter((n=>e.name!==n.name))}function Je(e,n){const t=[];return e.map(n).forEach((e=>{t.push(...e)})),t}function Ze(e){const n=Object.assign({},e);return n.operations=function(e){const n=new Map;return e.operations.map((t=>{const r=Object.assign({},t);r.imports.push(...Je(r.parameters,(n=>n.imports.map((n=>e.imports.filter((e=>e.path===n.path))[0]))))),r.imports.push(...Je(r.results,(n=>n.imports.map((n=>e.imports.filter((e=>e.path===n.path))[0])))));const a=r.name,o=n.get(a)||0;return o>0&&(r.name=`${a}${o}`),n.set(a,o+1),r}))}(n),n.operations.forEach((e=>{n.imports.push(...e.imports)})),n.imports=n.imports.filter(W),n.imports=function(e){return e.imports.filter(W).sort(Qe).filter((n=>e.name!==n.name))}(n),n}function Ge(e){return Object.assign(Object.assign({},e),{models:e.models.map((e=>function(e){return Object.assign(Object.assign({},e),{imports:ze(e),enums:We(e),enum:Ve(e)})}(e))),services:e.services.map((e=>Ze(e)))})}!function(e){e[e.V2=2]="V2",e[e.V3=3]="V3"}(Fe||(Fe={}));var Xe={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nimport type { ApiResult } from './ApiResult';\n\nexport class ApiError extends Error {\n public readonly url: string;\n public readonly status: number;\n public readonly statusText: string;\n public readonly body: any;\n\n constructor(response: ApiResult, message: string) {\n super(message);\n\n this.url = response.url;\n this.status = response.status;\n this.statusText = response.statusText;\n this.body = response.body;\n }\n}"},usePartial:!0,useData:!0},Ke={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nexport type ApiRequestOptions = {\n readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH';\n readonly path: string;\n readonly cookies?: Record<string, any>;\n readonly headers?: Record<string, any>;\n readonly query?: Record<string, any>;\n readonly formData?: Record<string, any>;\n readonly body?: any;\n readonly mediaType?: string;\n readonly responseHeader?: string;\n // TODO TS2344: Redesign the logic for generating errors. Use the string value of the error code.\n // @ts-ignore\n readonly errors?: Record<number, string>;\n}"},usePartial:!0,useData:!0},Ye={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nexport type ApiResult = {\n readonly url: string;\n readonly ok: boolean;\n readonly status: number;\n readonly statusText: string;\n readonly body: any;\n}"},usePartial:!0,useData:!0},en={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"export enum EHTTP_STATUS_CODES {\n BAD_REQUEST = 400,\n UNAUTHORIZED = 401,\n FORBIDDEN = 403,\n NOT_FOUND = 404,\n INTERNAL_SERVER_ERROR = 500,\n BAD_GATEWAY = 502,\n SERVICE_UNAVAILABLE = 503,\n}\n\nexport enum EHTTP_STATUS_NAME {\n BAD_REQUEST = 'Bad Request',\n UNAUTHORIZED = 'Unauthorized',\n FORBIDDEN = 'Forbidden',\n NOT_FOUND = 'Not Found',\n INTERNAL_SERVER_ERROR = 'Internal Server Error',\n BAD_GATEWAY = 'Bad Gateway',\n SERVICE_UNAVAILABLE = 'Service Unavailable',\n}"},useData:!0},nn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function getHeaders(options: ApiRequestOptions): Promise<AxiosRequestHeaders> {\n const token = await resolve(options, OpenAPI.TOKEN);\n const username = await resolve(options, OpenAPI.USERNAME);\n const password = await resolve(options, OpenAPI.PASSWORD);\n const defaultHeaders = await resolve(options, OpenAPI.HEADERS);\n\n const headers = {\n Accept: 'application/json',\n ...defaultHeaders,\n ...options.headers,\n } as AxiosRequestHeaders;\n\n if (isStringWithValue(token)) {\n headers['Authorization'] = `Bearer ${token}`;\n }\n\n if (isStringWithValue(username) && isStringWithValue(password)) {\n const credentials = Buffer.from(`${username}:${password}`).toString('base64');\n headers['Authorization'] = `Bearer ${credentials}`;\n }\n\n if (options.body) {\n if (options.mediaType) {\n headers['Content-Type'] = options.mediaType;\n } else if (isBinary(options.body)) {\n headers['Content-Type'] = 'application/octet-stream';\n } else if (isString(options.body)) {\n headers['Content-Type'] = 'text/plain';\n } else {\n headers['Content-Type'] = 'application/json';\n }\n }\n return headers;\n}"},useData:!0},tn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getRequestBody(options: ApiRequestOptions): any {\n if (options.formData) {\n return getFormData(options.formData);\n }\n if (options.body) {\n if (options.mediaType?.includes('/json')) {\n return JSON.stringify(options.body)\n } else if (isString(options.body) || isBinary(options.body)) {\n return options.body;\n } else {\n return JSON.stringify(options.body);\n }\n }\n return undefined;\n}"},useData:!0},rn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getResponseBody(response: AxiosResponse): any {\n try {\n const contentType = response.headers['content-type'];\n if (contentType) {\n const isJSON = typeof contentType === 'string' && contentType.toLowerCase().startsWith('application/json');\n\n if (isJSON && isString(response.data)) {\n return JSON.parse(response.data);\n } else {\n return response.data;\n }\n }\n } catch (error) {\n console.error(error);\n }\n return null;\n}"},useData:!0},an={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getResponseHeader(response: AxiosResponse, responseHeader?: string): string | null {\n if (responseHeader) {\n let content = '';\n\n Object.keys(response.headers).forEach((header) => {\n if (header === responseHeader) {\n content = header;\n }\n });\n\n if (isString(content)) {\n return content;\n }\n }\n return null;\n}"},useData:!0},on={1:function(e,n,t,r,a){return"import { CancelablePromise } from './CancelablePromise';\n"},3:function(e,n,t,r,a){return" export function request<T>(options: ApiRequestOptions): CancelablePromise<T> {\n return new CancelablePromise(async(resolve, reject, onCancel) => {\n try {\n const url = getUrl(options);\n \n if (!onCancel.isCancelled) {\n const response = await sendRequest<T>(options, url, onCancel);\n const responseBody = getResponseBody(response);\n const responseHeader = getResponseHeader(response, options.responseHeader);\n const result: ApiResult = {\n url,\n ok: isSuccess(response.status),\n status: response.status,\n statusText: response.statusText,\n body: responseHeader || responseBody,\n };\n\n catchErrors(options, result);\n resolve(result.body);\n }\n } catch (error) {\n reject(error);\n }\n });\n}\n"},5:function(e,n,t,r,a){return"export async function request<T>(options: ApiRequestOptions): Promise<T> {\n return new Promise(async (resolve, reject) => {\n try {\n const url = getUrl(options);\n const response = await sendRequest(options, url);\n const responseBody = getResponseBody(response);\n const responseHeader = getResponseHeader(response, options.responseHeader);\n\n const result: ApiResult = {\n url,\n ok: isSuccess(response.status),\n status: response.status,\n statusText: response.statusText,\n body: responseHeader || responseBody,\n };\n\n catchErrors(options, result);\n resolve(result.body);\n } catch (error) {\n reject(error);\n }\n });\n}\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(s(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nimport axios from 'axios';\nimport type { AxiosError, AxiosRequestConfig, AxiosResponse, AxiosRequestHeaders } from 'axios';\nimport FormData from 'form-data';\nimport { types } from 'util';\n\nimport { ApiError } from './ApiError';\nimport type { ApiRequestOptions } from './ApiRequestOptions';\nimport type { ApiResult } from './ApiResult';\n"+(null!=(o=s(t,"if").call(l,s(s(a,"root"),"useCancelableRequest"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:11,column:0},end:{line:13,column:7}}}))?o:"")+"import { OpenAPI } from './OpenAPI';\nimport { EHTTP_STATUS_CODES, EHTTP_STATUS_NAME } from './HttpStatusCode';\n\n"+(null!=(o=e.invokePartial(s(r,"functions/isDefined"),n,{name:"functions/isDefined",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"functions/isString"),n,{name:"functions/isString",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"functions/isStringWithValue"),n,{name:"functions/isStringWithValue",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"functions/isBinary"),n,{name:"functions/isBinary",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"functions/isSuccess"),n,{name:"functions/isSuccess",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"functions/getQueryString"),n,{name:"functions/getQueryString",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"functions/getUrl"),n,{name:"functions/getUrl",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"functions/getFormData"),n,{name:"functions/getFormData",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"functions/resolve"),n,{name:"functions/resolve",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"axios/getRequestBody"),n,{name:"axios/getRequestBody",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"axios/sendRequest"),n,{name:"axios/sendRequest",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"axios/getHeaders"),n,{name:"axios/getHeaders",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"axios/getResponseHeader"),n,{name:"axios/getResponseHeader",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"axios/getResponseBody"),n,{name:"axios/getResponseBody",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"functions/catchErrors"),n,{name:"functions/catchErrors",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n/**\n * Request using axios client\n * @param options The request options from the the service\n * @returns ApiResult\n * @throws ApiError\n */\n"+(null!=(o=s(t,"if").call(l,s(s(a,"root"),"useCancelableRequest"),{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.program(5,a,0),data:a,loc:{start:{line:68,column:0},end:{line:118,column:7}}}))?o:"")},usePartial:!0,useData:!0},ln={1:function(e,n,t,r,a){return"async function sendRequest<T>(options: ApiRequestOptions, url: string, onCancel: (cancelHandler: () => void) => void): Promise<AxiosResponse<T>> {\n const source = axios.CancelToken.source();\n"},3:function(e,n,t,r,a){return"async function sendRequest<T>(options: ApiRequestOptions, url: string): Promise<AxiosResponse<T>> {\n"},5:function(e,n,t,r,a){return" cancelToken: source.token,\n"},7:function(e,n,t,r,a){return" onCancel(() => source.cancel('The user aborted a request.'));\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=s(t,"if").call(l,s(s(a,"root"),"useCancelableRequest"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a,loc:{start:{line:1,column:0},end:{line:6,column:7}}}))?o:"")+" \n const requestConfig: AxiosRequestConfig = {\n method: options.method,\n headers: await getHeaders(options),\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n data: getRequestBody(options),\n url,\n"+(null!=(o=s(t,"if").call(l,s(s(a,"root"),"useCancelableRequest"),{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:14,column:4},end:{line:16,column:11}}}))?o:"")+" };\n\n"+(null!=(o=s(t,"if").call(l,s(s(a,"root"),"useCancelableRequest"),{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:19,column:2},end:{line:21,column:9}}}))?o:"")+"\n try {\n\t\treturn await axios.request(requestConfig);\n\t} catch (error) {\n\t\tconst axiosError = error as AxiosError<T>;\n\t\tif (axiosError.response) {\n\t\t\treturn axiosError.response;\n\t\t}\n\t\tthrow error;\n\t}\n}"},useData:!0},sn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function getHeaders(options: ApiRequestOptions): Promise<Headers> {\n const token = await resolve(options, OpenAPI.TOKEN);\n const username = await resolve(options, OpenAPI.USERNAME);\n const password = await resolve(options, OpenAPI.PASSWORD);\n const defaultHeaders = await resolve(options, OpenAPI.HEADERS);\n\n const headers = new Headers({\n Accept: 'application/json',\n ...defaultHeaders,\n ...options.headers,\n });\n\n if (isStringWithValue(token)) {\n headers.append('Authorization', `Bearer ${token}`);\n }\n\n if (isStringWithValue(username) && isStringWithValue(password)) {\n const credentials = btoa(`${username}:${password}`);\n headers.append('Authorization', `Basic ${credentials}`);\n }\n\n if (options.body) {\n if (options.mediaType) {\n headers.append('Content-Type', options.mediaType);\n } else if (isBlob(options.body)) {\n headers.append('Content-Type', options.body.type || 'application/octet-stream');\n } else if (isString(options.body)) {\n headers.append('Content-Type', 'text/plain');\n } else {\n headers.append('Content-Type', 'application/json');\n }\n }\n return headers;\n}"},useData:!0},un={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getRequestBody(options: ApiRequestOptions): BodyInit | undefined {\n if (options.formData) {\n return getFormData(options.formData);\n }\n if (options.body) {\n if (options.mediaType?.includes('/json')) {\n return JSON.stringify(options.body)\n } else if (isString(options.body) || isBlob(options.body)) {\n return options.body;\n } else {\n return JSON.stringify(options.body);\n }\n }\n return undefined;\n}"},useData:!0},pn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function getResponseBody(response: Response): Promise<any> {\n try {\n const contentType = response.headers.get('Content-Type');\n if (contentType) {\n const isJSON = contentType.toLowerCase().startsWith('application/json');\n if (isJSON) {\n return await response.json();\n } else {\n return await response.text();\n }\n }\n } catch (error) {\n console.error(error);\n }\n return null;\n}"},useData:!0},cn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getResponseHeader(response: Response, responseHeader?: string): string | null {\n if (responseHeader) {\n const content = response.headers.get(responseHeader);\n if (isString(content)) {\n return content;\n }\n }\n return null;\n}"},useData:!0},mn={1:function(e,n,t,r,a){return"import { CancelablePromise } from './CancelablePromise';\n"},3:function(e,n,t,r,a){return"export function request<T>(options: ApiRequestOptions): CancelablePromise<T> {\n return new CancelablePromise(async(resolve, reject, onCancel) => {\n try {\n const url = getUrl(options);\n\n if (!onCancel.isCancelled) {\n const response = await sendRequest(options, url, onCancel);\n const responseBody = await getResponseBody(response);\n const responseHeader = getResponseHeader(response, options.responseHeader);\n const result: ApiResult = {\n url,\n ok: response.ok,\n status: response.status,\n statusText: response.statusText,\n body: responseHeader || responseBody,\n };\n catchErrors(options, result);\n resolve(result.body);\n }\n } catch (error) {\n reject(error);\n }\n });\n}\n"},5:function(e,n,t,r,a){return"export async function request<T>(options: ApiRequestOptions): Promise<T> {\n return new Promise(async (resolve, reject) => {\n try {\n const url = getUrl(options);\n const response = await sendRequest(options, url);\n const responseBody = await getResponseBody(response);\n const responseHeader = getResponseHeader(response, options.responseHeader);\n\n const result: ApiResult = {\n url,\n ok: response.ok,\n status: response.status,\n statusText: response.statusText,\n body: responseHeader || responseBody,\n };\n\n catchErrors(options, result);\n resolve(result.body);\n } catch (error) {\n reject(error);\n }\n });\n}\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(s(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nimport { ApiError } from './ApiError';\nimport type { ApiRequestOptions } from './ApiRequestOptions';\nimport type { ApiResult } from './ApiResult';\n"+(null!=(o=s(t,"if").call(l,s(s(a,"root"),"useCancelableRequest"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:6,column:0},end:{line:8,column:7}}}))?o:"")+"import { OpenAPI } from './OpenAPI';\nimport { EHTTP_STATUS_CODES, EHTTP_STATUS_NAME } from './HttpStatusCode';\n\n"+(null!=(o=e.invokePartial(s(r,"functions/isDefined"),n,{name:"functions/isDefined",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"functions/isString"),n,{name:"functions/isString",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"functions/isStringWithValue"),n,{name:"functions/isStringWithValue",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"functions/isBlob"),n,{name:"functions/isBlob",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"functions/getQueryString"),n,{name:"functions/getQueryString",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"functions/getUrl"),n,{name:"functions/getUrl",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"functions/getFormData"),n,{name:"functions/getFormData",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"functions/resolve"),n,{name:"functions/resolve",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"fetch/getHeaders"),n,{name:"fetch/getHeaders",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"fetch/getRequestBody"),n,{name:"fetch/getRequestBody",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"fetch/sendRequest"),n,{name:"fetch/sendRequest",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"fetch/getResponseHeader"),n,{name:"fetch/getResponseHeader",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"fetch/getResponseBody"),n,{name:"fetch/getResponseBody",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"functions/catchErrors"),n,{name:"functions/catchErrors",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n/**\n * Request using fetch client\n * @param options The request options from the the service\n * @returns ApiResult\n * @throws ApiError\n */\n"+(null!=(o=s(t,"if").call(l,s(s(a,"root"),"useCancelableRequest"),{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.program(5,a,0),data:a,loc:{start:{line:60,column:0},end:{line:109,column:7}}}))?o:"")},usePartial:!0,useData:!0},dn={1:function(e,n,t,r,a){return"async function sendRequest(options: ApiRequestOptions, url: string, onCancel: (cancelHandler: () => void) => void): Promise<Response> {\n const controller = new AbortController();\n"},3:function(e,n,t,r,a){return"async function sendRequest(options: ApiRequestOptions, url: string): Promise<Response> {\n"},5:function(e,n,t,r,a){return" signal: controller.signal,\n"},7:function(e,n,t,r,a){return" onCancel(() => controller.abort());\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=s(t,"if").call(l,s(s(a,"root"),"useCancelableRequest"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a,loc:{start:{line:1,column:0},end:{line:6,column:7}}}))?o:"")+"\n const request: RequestInit = {\n method: options.method,\n headers: await getHeaders(options),\n body: getRequestBody(options),\n"+(null!=(o=s(t,"if").call(l,s(s(a,"root"),"useCancelableRequest"),{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:12,column:8},end:{line:14,column:15}}}))?o:"")+" };\n\n if (OpenAPI.WITH_CREDENTIALS) {\n request.credentials = 'include';\n }\n\n"+(null!=(o=s(t,"if").call(l,s(s(a,"root"),"useCancelableRequest"),{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:21,column:4},end:{line:23,column:11}}}))?o:"")+"\n return await fetch(url, request);\n}"},useData:!0},fn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function catchErrors(options: ApiRequestOptions, result: ApiResult): void {\n const errors: Record<string, string> = {\n [EHTTP_STATUS_CODES.BAD_GATEWAY]: EHTTP_STATUS_NAME.BAD_GATEWAY,\n [EHTTP_STATUS_CODES.BAD_REQUEST]: EHTTP_STATUS_NAME.BAD_REQUEST,\n [EHTTP_STATUS_CODES.FORBIDDEN]: EHTTP_STATUS_NAME.FORBIDDEN,\n [EHTTP_STATUS_CODES.INTERNAL_SERVER_ERROR]: EHTTP_STATUS_NAME.INTERNAL_SERVER_ERROR,\n [EHTTP_STATUS_CODES.NOT_FOUND]: EHTTP_STATUS_NAME.NOT_FOUND,\n [EHTTP_STATUS_CODES.SERVICE_UNAVAILABLE]: EHTTP_STATUS_NAME.SERVICE_UNAVAILABLE,\n [EHTTP_STATUS_CODES.UNAUTHORIZED]: EHTTP_STATUS_NAME.UNAUTHORIZED,\n ...options.errors,\n }\n\n const error = errors[result.status];\n if (error) {\n throw new ApiError(result, error);\n }\n\n if (!result.ok) {\n throw new ApiError(result, 'Generic Error');\n }\n}"},useData:!0},hn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getFormData(params: Record<string, any>): FormData {\n const formData = new FormData();\n Object.keys(params).forEach(key => {\n const value = params[key];\n if (isDefined(value)) {\n formData.append(key, value);\n }\n });\n return formData;\n}"},useData:!0},yn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getQueryString(params: Record<string, any>): string {\n const qs: string[] = [];\n Object.keys(params).forEach(key => {\n const value = params[key];\n if (isDefined(value)) {\n if (Array.isArray(value)) {\n value.forEach(value => {\n qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);\n });\n } else {\n qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);\n }\n }\n });\n if (qs.length > 0) {\n return `?${qs.join('&')}`;\n }\n return '';\n}"},useData:!0},vn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getUrl(options: ApiRequestOptions): string {\n const path = options.path.replace(/[:]/g, '_');\n const url = `${OpenAPI.BASE}${path}`;\n\n if (options.query) {\n return `${url}${getQueryString(options.query)}`;\n }\n return url;\n}"},useData:!0},gn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function isBinary(value: any): value is Buffer | ArrayBuffer | ArrayBufferView {\n const isBuffer = Buffer.isBuffer(value);\n const isArrayBuffer = types.isArrayBuffer(value);\n const isArrayBufferView = types.isArrayBufferView(value);\n return isBuffer || isArrayBuffer || isArrayBufferView;\n}"},useData:!0},bn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function isBlob(value: any): value is Blob {\n return value instanceof Blob;\n}"},useData:!0},Pn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function isDefined<T>(value: T | null | undefined): value is Exclude<T, null | undefined> {\n return value !== undefined && value !== null;\n}"},useData:!0},On={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function isString(value: any): value is string {\n return typeof value === 'string';\n}"},useData:!0},xn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function isStringWithValue(value: any): value is string {\n return isString(value) && value !== '';\n}"},useData:!0},Rn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function isSuccess(status: number): boolean {\n return status >= 200 && status < 300;\n}"},useData:!0},kn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;\n\nasync function resolve<T>(options: ApiRequestOptions, resolver?: T | Resolver<T>): Promise<T | undefined> {\n if (typeof resolver === 'function') {\n return (resolver as Resolver<T>)(options);\n }\n return resolver;\n}"},useData:!0},wn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function getHeaders(options: ApiRequestOptions): Promise<Headers> {\n const token = await resolve(options, OpenAPI.TOKEN);\n const username = await resolve(options, OpenAPI.USERNAME);\n const password = await resolve(options, OpenAPI.PASSWORD);\n const defaultHeaders = await resolve(options, OpenAPI.HEADERS);\n\n const headers = new Headers({\n Accept: 'application/json',\n ...defaultHeaders,\n ...options.headers,\n });\n\n if (isStringWithValue(token)) {\n headers.append('Authorization', `Bearer ${token}`);\n }\n\n if (isStringWithValue(username) && isStringWithValue(password)) {\n const credentials = Buffer.from(`${username}:${password}`).toString('base64');\n headers.append('Authorization', `Basic ${credentials}`);\n }\n\n if (options.body) {\n if (options.mediaType) {\n headers.append('Content-Type', options.mediaType);\n } else if (isBinary(options.body)) {\n headers.append('Content-Type', 'application/octet-stream');\n } else if (isString(options.body)) {\n headers.append('Content-Type', 'text/plain');\n } else {\n headers.append('Content-Type', 'application/json');\n }\n }\n return headers;\n}"},useData:!0},Cn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getRequestBody(options: ApiRequestOptions): BodyInit | undefined {\n if (options.formData) {\n return getFormData(options.formData);\n }\n if (options.body) {\n if (options.mediaType?.includes('/json')) {\n return JSON.stringify(options.body)\n } else if (isString(options.body) || isBinary(options.body)) {\n return options.body;\n } else {\n return JSON.stringify(options.body);\n }\n }\n return undefined;\n}"},useData:!0},qn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function getResponseBody(response: Response): Promise<any> {\n try {\n const contentType = response.headers.get('Content-Type');\n if (contentType) {\n const isJSON = contentType.toLowerCase().startsWith('application/json');\n if (isJSON) {\n return await response.json();\n } else {\n return await response.text();\n }\n }\n } catch (error) {\n console.error(error);\n }\n return null;\n}"},useData:!0},Tn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getResponseHeader(response: Response, responseHeader?: string): string | null {\n if (responseHeader) {\n const content = response.headers.get(responseHeader);\n if (isString(content)) {\n return content;\n }\n }\n return null;\n}"},useData:!0},An={1:function(e,n,t,r,a){return"import { CancelablePromise } from './CancelablePromise';\n"},3:function(e,n,t,r,a){return"export function request<T>(options: ApiRequestOptions): CancelablePromise<T> {\n return new CancelablePromise(async (resolve, reject, onCancel) => {\n try {\n const url = getUrl(options);\n\n if (!onCancel.isCancelled) {\n const response = await sendRequest(options, url, onCancel);\n const responseBody = await getResponseBody(response);\n const responseHeader = getResponseHeader(response, options.responseHeader);\n const result: ApiResult = {\n url,\n ok: response.ok,\n status: response.status,\n statusText: response.statusText,\n body: responseHeader || responseBody,\n };\n\n catchErrors(options, result);\n resolve(result.body);\n }\n } catch (error) {\n reject(error);\n }\n });\n}\n"},5:function(e,n,t,r,a){return"export async function request<T>(options: ApiRequestOptions): Promise<T> {\n return new Promise(async (resolve, reject) => {\n try {\n const url = getUrl(options);\n const response = await sendRequest(options, url);\n const responseBody = await getResponseBody(response);\n const responseHeader = getResponseHeader(response, options.responseHeader);\n\n const result: ApiResult = {\n url,\n ok: response.ok,\n status: response.status,\n statusText: response.statusText,\n body: responseHeader || responseBody,\n };\n\n catchErrors(options, result);\n resolve(result.body);\n } catch (error) {\n reject(error);\n }\n });\n}\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(s(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nimport { AbortController } from 'abort-controller';\nimport FormData from 'form-data';\nimport fetch, { BodyInit, Headers, RequestInit, Response } from 'node-fetch';\nimport { types } from 'util';\n\nimport { ApiError } from './ApiError';\nimport type { ApiRequestOptions } from './ApiRequestOptions';\nimport type { ApiResult } from './ApiResult';\n"+(null!=(o=s(t,"if").call(l,s(s(a,"root"),"useCancelableRequest"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:11,column:0},end:{line:13,column:7}}}))?o:"")+"import { OpenAPI } from './OpenAPI';\nimport { EHTTP_STATUS_CODES, EHTTP_STATUS_NAME } from './HttpStatusCode';\n\n"+(null!=(o=e.invokePartial(s(r,"functions/isDefined"),n,{name:"functions/isDefined",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"functions/isString"),n,{name:"functions/isString",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"functions/isStringWithValue"),n,{name:"functions/isStringWithValue",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"functions/isBinary"),n,{name:"functions/isBinary",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"functions/getQueryString"),n,{name:"functions/getQueryString",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"functions/getUrl"),n,{name:"functions/getUrl",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"functions/getFormData"),n,{name:"functions/getFormData",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"functions/resolve"),n,{name:"functions/resolve",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"node/getHeaders"),n,{name:"node/getHeaders",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"node/getRequestBody"),n,{name:"node/getRequestBody",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"node/sendRequest"),n,{name:"node/sendRequest",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"node/getResponseHeader"),n,{name:"node/getResponseHeader",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"node/getResponseBody"),n,{name:"node/getResponseBody",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"functions/catchErrors"),n,{name:"functions/catchErrors",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n/**\n * Request using node-fetch client\n * @param options The request options from the the service\n * @returns ApiResult\n * @throws ApiError\n */\n"+(null!=(o=s(t,"if").call(l,s(s(a,"root"),"useCancelableRequest"),{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.program(5,a,0),data:a,loc:{start:{line:65,column:0},end:{line:115,column:7}}}))?o:"")},usePartial:!0,useData:!0},jn={1:function(e,n,t,r,a){return"async function sendRequest(options: ApiRequestOptions, url: string, onCancel: (cancelHandler: () => void) => void): Promise<Response> {\n const controller = new AbortController();\n"},3:function(e,n,t,r,a){return"async function sendRequest(options: ApiRequestOptions, url: string): Promise<Response> {\n"},5:function(e,n,t,r,a){return" signal: controller.signal,\n"},7:function(e,n,t,r,a){return" onCancel(() => controller.abort());\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=s(t,"if").call(l,s(s(a,"root"),"useCancelableRequest"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a,loc:{start:{line:1,column:0},end:{line:6,column:7}}}))?o:"")+"\n const request: RequestInit = {\n method: options.method,\n headers: await getHeaders(options),\n body: getRequestBody(options),\n"+(null!=(o=s(t,"if").call(l,s(s(a,"root"),"useCancelableRequest"),{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:12,column:8},end:{line:14,column:15}}}))?o:"")+" };\n \n"+(null!=(o=s(t,"if").call(l,s(s(a,"root"),"useCancelableRequest"),{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:17,column:4},end:{line:19,column:11}}}))?o:"")+"\n return await fetch(url, request);\n}"},useData:!0},Sn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.strict,s=e.lambda,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(i(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nimport type { ApiRequestOptions } from './ApiRequestOptions';\n\ntype Resolver<T> = (options: ApiRequestOptions) => Promise<T>;\ntype Headers = Record<string, string>;\n\ntype Config = {\n BASE: string;\n VERSION: string;\n WITH_CREDENTIALS: boolean;\n TOKEN?: string | Resolver<string>;\n USERNAME?: string | Resolver<string>;\n PASSWORD?: string | Resolver<string>;\n HEADERS?: Headers | Resolver<Headers>;\n}\n\nexport const OpenAPI: Config = {\n BASE: '"+(null!=(o=s(l(n,"server",{start:{line:19,column:14},end:{line:19,column:20}}),n))?o:"")+"',\n VERSION: '"+(null!=(o=s(l(n,"version",{start:{line:20,column:17},end:{line:20,column:24}}),n))?o:"")+"',\n WITH_CREDENTIALS: false,\n TOKEN: undefined,\n USERNAME: undefined,\n PASSWORD: undefined,\n HEADERS: undefined,\n};"},usePartial:!0,useData:!0},En={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */\nexport interface ICancelProps {\n readonly isResolved: boolean;\n readonly isRejected: boolean;\n readonly isCancelled: boolean;\n\n (cancelHandler: () => void): void;\n}\n\nexport class CancelablePromise<T> implements Promise<T> {\n readonly [Symbol.toStringTag]!: string;\n\n private _isResolved: boolean;\n private _isRejected: boolean;\n private _isCancelled: boolean;\n private readonly _cancelHandlers: (() => void)[];\n private readonly _promise: Promise<T>;\n private _resolve?: (value: T | PromiseLike<T>) => void;\n private _reject?: (reason?: any) => void;\n\n constructor(executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void, onCancel: ICancelProps) => void) {\n this._isResolved = false;\n this._isRejected = false;\n this._isCancelled = false;\n this._cancelHandlers = [];\n this._promise = new Promise<T>((resolve, reject) => {\n this._resolve = resolve;\n this._reject = reject;\n\n const onResolve = (value: T | PromiseLike<T>): void => {\n if (this._isResolved || this._isRejected || this._isCancelled) {\n return;\n }\n this._isResolved = true;\n this._resolve?.(value);\n };\n\n const onReject = (reason?: any): void => {\n if (this._isResolved || this._isRejected || this._isCancelled) {\n return;\n }\n this._isRejected = true;\n this._reject?.(reason);\n };\n\n const onCancel = (cancelHandler: () => void): void => {\n if (this._isResolved || this._isRejected || this._isCancelled) {\n return;\n }\n this._cancelHandlers.push(cancelHandler);\n };\n\n Object.defineProperty(onCancel, 'isResolved', {\n get: (): boolean => this._isResolved,\n });\n\n Object.defineProperty(onCancel, 'isRejected', {\n get: (): boolean => this._isRejected,\n });\n\n Object.defineProperty(onCancel, 'isCancelled', {\n get: (): boolean => this._isCancelled,\n });\n\n return executor(onResolve, onReject, onCancel as ICancelProps);\n });\n }\n\n public then<TResult1 = T, TResult2 = never>(\n onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,\n onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null\n ): Promise<TResult1 | TResult2> {\n return this._promise.then(onFulfilled, onRejected);\n }\n\n public catch<TResult = never>(onRejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null): Promise<T | TResult> {\n return this._promise.catch(onRejected);\n }\n\n public finally(onFinally?: (() => void) | null): Promise<T> {\n return this._promise.finally(onFinally);\n }\n\n public cancel(): void {\n if (this._isResolved || this._isRejected || this._isCancelled) {\n return;\n }\n this._isCancelled = true;\n if (this._cancelHandlers.length) {\n try {\n for (const cancelHandler of this._cancelHandlers) {\n cancelHandler();\n }\n } catch (error) {\n console.warn('Cancellation threw an error', error);\n return;\n }\n }\n this._cancelHandlers.length = 0;\n this._reject?.(new Error('CancelError: Request aborted'));\n }\n}"},useData:!0},$n={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"fetch/request"),n,{name:"fetch/request",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},3:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"xhr/request"),n,{name:"xhr/request",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},5:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"node/request"),n,{name:"node/request",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},7:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"axios/request"),n,{name:"axios/request",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=s(t,"equals").call(l,s(s(a,"root"),"httpClient"),"fetch",{name:"equals",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:1,column:67}}}))?o:"")+(null!=(o=s(t,"equals").call(l,s(s(a,"root"),"httpClient"),"xhr",{name:"equals",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:0},end:{line:2,column:63}}}))?o:"")+(null!=(o=s(t,"equals").call(l,s(s(a,"root"),"httpClient"),"node",{name:"equals",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:3,column:65}}}))?o:"")+(null!=(o=s(t,"equals").call(l,s(s(a,"root"),"httpClient"),"axios",{name:"equals",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:4,column:67}}}))?o:"")},usePartial:!0,useData:!0},Hn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function getHeaders(options: ApiRequestOptions): Promise<Headers> {\n const token = await resolve(options, OpenAPI.TOKEN);\n const username = await resolve(options, OpenAPI.USERNAME);\n const password = await resolve(options, OpenAPI.PASSWORD);\n const defaultHeaders = await resolve(options, OpenAPI.HEADERS);\n\n const headers = new Headers({\n Accept: 'application/json',\n ...defaultHeaders,\n ...options.headers,\n });\n\n if (isStringWithValue(token)) {\n headers.append('Authorization', `Bearer ${token}`);\n }\n\n if (isStringWithValue(username) && isStringWithValue(password)) {\n const credentials = btoa(`${username}:${password}`);\n headers.append('Authorization', `Basic ${credentials}`);\n }\n\n if (options.body) {\n if (options.mediaType) {\n headers.append('Content-Type', options.mediaType);\n } else if (isBlob(options.body)) {\n headers.append('Content-Type', options.body.type || 'application/octet-stream');\n } else if (isString(options.body)) {\n headers.append('Content-Type', 'text/plain');\n } else {\n headers.append('Content-Type', 'application/json');\n }\n }\n return headers;\n}"},useData:!0},Dn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getRequestBody(options: ApiRequestOptions): any {\n if (options.formData) {\n return getFormData(options.formData);\n }\n if (options.body) {\n if (options.mediaType?.includes('/json')) {\n return JSON.stringify(options.body)\n } else if (isString(options.body) || isBlob(options.body)) {\n return options.body;\n } else {\n return JSON.stringify(options.body);\n }\n }\n return undefined;\n}"},useData:!0},In={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getResponseBody(xhr: XMLHttpRequest): any {\n try {\n const contentType = xhr.getResponseHeader('Content-Type');\n if (contentType) {\n const isJSON = contentType.toLowerCase().startsWith('application/json');\n if (isJSON) {\n return JSON.parse(xhr.responseText);\n } else {\n return xhr.responseText;\n }\n }\n } catch (error) {\n console.error(error);\n }\n return null;\n}"},useData:!0},Nn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getResponseHeader(xhr: XMLHttpRequest, responseHeader?: string): string | null {\n if (responseHeader) {\n const content = xhr.getResponseHeader(responseHeader);\n if (isString(content)) {\n return content;\n }\n }\n return null;\n}"},useData:!0},_n={1:function(e,n,t,r,a){return"import { CancelablePromise } from './CancelablePromise';\n"},3:function(e,n,t,r,a){return"export function request<T>(options: ApiRequestOptions): CancelablePromise<T> {\n return new CancelablePromise(async (resolve, reject, onCancel) => {\n try {\n const url = getUrl(options);\n\n if (!onCancel.isCancelled) {\n const response = await sendRequest(options, url, onCancel);\n const responseBody = getResponseBody(response);\n const responseHeader = getResponseHeader(response, options.responseHeader);\n const result: ApiResult = {\n url,\n ok: isSuccess(response.status),\n status: response.status,\n statusText: response.statusText,\n body: responseHeader || responseBody,\n };\n\n catchErrors(options, result);\n resolve(result.body);\n }\n } catch (error) {\n reject(error);\n }\n });\n}\n"},5:function(e,n,t,r,a){return"export async function request<T>(options: ApiRequestOptions): Promise<T> {\n return new Promise(async (resolve, reject) => {\n try {\n const url = getUrl(options);\n const response = await sendRequest(options, url);\n const responseBody = getResponseBody(response);\n const responseHeader = getResponseHeader(response, options.responseHeader);\n\n const result: ApiResult = {\n url,\n ok: isSuccess(response.status),\n status: response.status,\n statusText: response.statusText,\n body: responseHeader || responseBody,\n };\n\n catchErrors(options, result);\n resolve(result.body);\n } catch (error) {\n reject(error);\n }\n });\n}\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(s(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nimport { ApiError } from './ApiError';\nimport type { ApiRequestOptions } from './ApiRequestOptions';\nimport type { ApiResult } from './ApiResult';\n"+(null!=(o=s(t,"if").call(l,s(s(a,"root"),"useCancelableRequest"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:6,column:0},end:{line:8,column:7}}}))?o:"")+"import { OpenAPI } from './OpenAPI';\nimport { EHTTP_STATUS_CODES, EHTTP_STATUS_NAME } from './HttpStatusCode';\n\n"+(null!=(o=e.invokePartial(s(r,"functions/isDefined"),n,{name:"functions/isDefined",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"functions/isString"),n,{name:"functions/isString",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"functions/isStringWithValue"),n,{name:"functions/isStringWithValue",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"functions/isBlob"),n,{name:"functions/isBlob",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"functions/isSuccess"),n,{name:"functions/isSuccess",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"functions/getQueryString"),n,{name:"functions/getQueryString",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"functions/getUrl"),n,{name:"functions/getUrl",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"functions/getFormData"),n,{name:"functions/getFormData",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"functions/resolve"),n,{name:"functions/resolve",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"fetch/getHeaders"),n,{name:"fetch/getHeaders",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"xhr/getRequestBody"),n,{name:"xhr/getRequestBody",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"xhr/sendRequest"),n,{name:"xhr/sendRequest",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"xhr/getResponseHeader"),n,{name:"xhr/getResponseHeader",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"xhr/getResponseBody"),n,{name:"xhr/getResponseBody",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(s(r,"functions/catchErrors"),n,{name:"functions/catchErrors",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n/**\n * Request using XHR client\n * @param options The request options from the the service\n * @returns ApiResult\n * @throws ApiError\n */\n"+(null!=(o=s(t,"if").call(l,s(s(a,"root"),"useCancelableRequest"),{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.program(5,a,0),data:a,loc:{start:{line:63,column:0},end:{line:113,column:7}}}))?o:"")},usePartial:!0,useData:!0},Bn={1:function(e,n,t,r,a){return"async function sendRequest(options: ApiRequestOptions, url: string, onCancel: (cancelHandler: () => void) => void): Promise<XMLHttpRequest> {\n"},3:function(e,n,t,r,a){return"async function sendRequest(options: ApiRequestOptions, url: string): Promise<XMLHttpRequest> {\n"},5:function(e,n,t,r,a){return" return new Promise<XMLHttpRequest>((resolve, reject) => {\n"},7:function(e,n,t,r,a){return" return new Promise<XMLHttpRequest>((resolve) => {\n"},9:function(e,n,t,r,a){return" // TODO разобраться с ситуацией!\n console.log(xhr.readyState);\n if (xhr.readyState === XMLHttpRequest.DONE) {\n reject();\n }\n"},11:function(e,n,t,r,a){return" onCancel(() => xhr.abort());\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=s(t,"if").call(l,s(s(a,"root"),"useCancelableRequest"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a,loc:{start:{line:1,column:0},end:{line:5,column:7}}}))?o:"")+"\n const xhr = new XMLHttpRequest();\n xhr.open(options.method, url, true);\n xhr.withCredentials = OpenAPI.WITH_CREDENTIALS;\n\n const headers = await getHeaders(options);\n headers.forEach((value: string, key: string) => {\n xhr.setRequestHeader(key, value);\n });\n\n"+(null!=(o=s(t,"if").call(l,s(s(a,"root"),"useCancelableRequest"),{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.program(7,a,0),data:a,loc:{start:{line:16,column:4},end:{line:20,column:11}}}))?o:"")+" xhr.onreadystatechange = () => {\n if (xhr.readyState === XMLHttpRequest.DONE) {\n resolve(xhr);\n }\n"+(null!=(o=s(t,"if").call(l,s(s(a,"root"),"useCancelableRequest"),{name:"if",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a,loc:{start:{line:25,column:12},end:{line:31,column:19}}}))?o:"")+" };\n xhr.send(getRequestBody(options));\n\n"+(null!=(o=s(t,"if").call(l,s(s(a,"root"),"useCancelableRequest"),{name:"if",hash:{},fn:e.program(11,a,0),inverse:e.noop,data:a,loc:{start:{line:35,column:8},end:{line:37,column:15}}}))?o:"")+" });\n}"},useData:!0},Mn={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"imports"),{name:"each",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:5,column:0},end:{line:7,column:9}}}))?o:"")},2:function(e,n,t,r,a){var o,l=e.strict,s=e.lambda,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"import type { "+(null!=(o=s(l(n,"name",{start:{line:6,column:17},end:{line:6,column:21}}),n))?o:"")+(null!=(o=i(t,"if").call(null!=n?n:e.nullContext||{},i(n,"alias"),{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:6,column:24},end:{line:6,column:59}}}))?o:"")+" } from './"+(null!=(o=s(l(n,"path",{start:{line:6,column:73},end:{line:6,column:77}}),n))?o:"")+"';\n"},3:function(e,n,t,r,a){var o;return" as "+(null!=(o=e.lambda(e.strict(n,"alias",{start:{line:6,column:44},end:{line:6,column:49}}),n))?o:"")},5:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"exportInterface"),n,{name:"exportInterface",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},7:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"one-of",{name:"equals",hash:{},fn:e.program(8,a,0),inverse:e.program(10,a,0),data:a,loc:{start:{line:12,column:0},end:{line:22,column:0}}}))?o:""},8:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"exportComposition"),n,{name:"exportComposition",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},10:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"any-of",{name:"equals",hash:{},fn:e.program(8,a,0),inverse:e.program(11,a,0),data:a,loc:{start:{line:14,column:0},end:{line:22,column:0}}}))?o:""},11:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"all-of",{name:"equals",hash:{},fn:e.program(8,a,0),inverse:e.program(12,a,0),data:a,loc:{start:{line:16,column:0},end:{line:22,column:0}}}))?o:""},12:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"enum",{name:"equals",hash:{},fn:e.program(13,a,0),inverse:e.program(15,a,0),data:a,loc:{start:{line:18,column:0},end:{line:22,column:0}}}))?o:""},13:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"exportEnum"),n,{name:"exportEnum",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},15:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"exportType"),n,{name:"exportType",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(s(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n"+(null!=(o=s(t,"if").call(l,s(n,"imports"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:8,column:7}}}))?o:"")+"\n"+(null!=(o=s(t,"equals").call(l,s(n,"export"),"interface",{name:"equals",hash:{},fn:e.program(5,a,0),inverse:e.program(7,a,0),data:a,loc:{start:{line:10,column:0},end:{line:22,column:11}}}))?o:"")},usePartial:!0,useData:!0},Un={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nexport const "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:3,column:16},end:{line:3,column:20}}),n))?o:"")+"Schema = "+(null!=(o=e.invokePartial(l(r,"schema"),n,{name:"schema",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+";"},usePartial:!0,useData:!0},Ln={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"imports"),{name:"each",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:6,column:9}}}))?o:""},2:function(e,n,t,r,a){var o,l=e.strict,s=e.lambda,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"import type { "+(null!=(o=s(l(n,"name",{start:{line:5,column:17},end:{line:5,column:21}}),n))?o:"")+(null!=(o=i(t,"if").call(null!=n?n:e.nullContext||{},i(n,"alias"),{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:5,column:24},end:{line:5,column:59}}}))?o:"")+" } from '"+(null!=(o=s(l(i(a,"root"),"outputModels",{start:{line:5,column:71},end:{line:5,column:89}}),n))?o:"")+(null!=(o=s(l(n,"path",{start:{line:5,column:95},end:{line:5,column:99}}),n))?o:"")+"';\n"},3:function(e,n,t,r,a){var o;return" as "+(null!=(o=e.lambda(e.strict(n,"alias",{start:{line:5,column:44},end:{line:5,column:49}}),n))?o:"")},5:function(e,n,t,r,a){var o;return"import type { CancelablePromise } from '"+(null!=(o=e.lambda(e.strict(n,"outputCore",{start:{line:9,column:43},end:{line:9,column:53}}),n))?o:"")+"CancelablePromise';\n"},7:function(e,n,t,r,a){var o;return"import { OpenAPI } from '"+(null!=(o=e.lambda(e.strict(n,"outputCore",{start:{line:14,column:28},end:{line:14,column:38}}),n))?o:"")+"OpenAPI';\n"},9:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"const "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:18,column:9},end:{line:18,column:13}}),n))?o:"")+" = ("+(null!=(o=e.invokePartial(l(r,"parameters"),n,{name:"parameters",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"): ApiRequestOptions => ({\n "+(null!=(o=e.invokePartial(l(r,"serviceOption"),n,{name:"serviceOption",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"});\n\n"},11:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:26,column:7},end:{line:26,column:11}}),n))?o:"")+": ("+(null!=(o=e.invokePartial(l(r,"parametersDefinition"),n,{name:"parametersDefinition",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+") => ApiRequestOptions;\n"},13:function(e,n,t,r,a){var o,l=e.strict,s=e.lambda;return" "+(null!=(o=s(l(n,"name",{start:{line:32,column:7},end:{line:32,column:11}}),n))?o:"")+": "+(null!=(o=s(l(n,"name",{start:{line:32,column:19},end:{line:32,column:23}}),n))?o:"")+",\n"},15:function(e,n,t,r,a,o,l){var s,i=null!=n?n:e.nullContext||{},u=e.strict,p=e.lambda,c=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" /**\n"+(null!=(s=c(t,"if").call(i,c(n,"deprecated"),{name:"if",hash:{},fn:e.program(16,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:40,column:4},end:{line:42,column:11}}}))?s:"")+(null!=(s=c(t,"if").call(i,c(n,"summary"),{name:"if",hash:{},fn:e.program(18,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:43,column:4},end:{line:45,column:11}}}))?s:"")+(null!=(s=c(t,"if").call(i,c(n,"description"),{name:"if",hash:{},fn:e.program(20,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:46,column:4},end:{line:48,column:11}}}))?s:"")+(null!=(s=c(t,"unless").call(i,c(c(a,"root"),"useOptions"),{name:"unless",hash:{},fn:e.program(22,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:49,column:4},end:{line:55,column:15}}}))?s:"")+(null!=(s=c(t,"each").call(i,c(n,"results"),{name:"each",hash:{},fn:e.program(26,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:56,column:4},end:{line:58,column:13}}}))?s:"")+" * @throws ApiError\n */\n"+(null!=(s=c(t,"if").call(i,c(c(a,"root"),"useCancelableRequest"),{name:"if",hash:{},fn:e.program(28,a,0,o,l),inverse:e.program(30,a,0,o,l),data:a,loc:{start:{line:61,column:4},end:{line:65,column:11}}}))?s:"")+" return __request<"+(null!=(s=e.invokePartial(c(r,"result"),n,{name:"result",data:a,helpers:t,partials:r,decorators:e.decorators}))?s:"")+">("+(null!=(s=p(u(l[1],"originName",{start:{line:66,column:40},end:{line:66,column:53}}),n))?s:"")+"Options."+(null!=(s=p(u(n,"name",{start:{line:66,column:66},end:{line:66,column:70}}),n))?s:"")+"("+(null!=(s=e.invokePartial(c(r,"parameterValues"),n,{name:"parameterValues",data:a,helpers:t,partials:r,decorators:e.decorators}))?s:"")+"));\n }\n"},16:function(e,n,t,r,a){return" * @deprecated\n"},18:function(e,n,t,r,a){var o;return" * "+(null!=(o=e.lambda(e.strict(n,"summary",{start:{line:44,column:10},end:{line:44,column:17}}),n))?o:"")+"\n"},20:function(e,n,t,r,a){var o;return" * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:47,column:10},end:{line:47,column:21}}),n))?o:"")+"\n"},22:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"parameters"),{name:"if",hash:{},fn:e.program(23,a,0),inverse:e.noop,data:a,loc:{start:{line:50,column:4},end:{line:54,column:11}}}))?o:""},23:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"parameters"),{name:"each",hash:{},fn:e.program(24,a,0),inverse:e.noop,data:a,loc:{start:{line:51,column:4},end:{line:53,column:13}}}))?o:""},24:function(e,n,t,r,a){var o,l=e.strict,s=e.lambda;return" * @param "+(null!=(o=s(l(n,"name",{start:{line:52,column:17},end:{line:52,column:21}}),n))?o:"")+" "+(null!=(o=s(l(n,"description",{start:{line:52,column:28},end:{line:52,column:39}}),n))?o:"")+"\n"},26:function(e,n,t,r,a){var o,l=e.strict,s=e.lambda;return" * @returns "+(null!=(o=s(l(n,"type",{start:{line:57,column:19},end:{line:57,column:23}}),n))?o:"")+" "+(null!=(o=s(l(n,"description",{start:{line:57,column:30},end:{line:57,column:41}}),n))?o:"")+"\n"},28:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" public static "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:62,column:21},end:{line:62,column:25}}),n))?o:"")+"("+(null!=(o=e.invokePartial(l(r,"parameters"),n,{name:"parameters",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"): CancelablePromise<"+(null!=(o=e.invokePartial(l(r,"result"),n,{name:"result",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"> {\n"},30:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" public static "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:64,column:21},end:{line:64,column:25}}),n))?o:"")+"("+(null!=(o=e.invokePartial(l(r,"parameters"),n,{name:"parameters",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"): Promise<"+(null!=(o=e.invokePartial(l(r,"result"),n,{name:"result",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"> {\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a,o,l){var s,i=null!=n?n:e.nullContext||{},u=e.strict,p=e.lambda,c=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(s=e.invokePartial(c(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?s:"")+"\n"+(null!=(s=c(t,"if").call(i,c(n,"imports"),{name:"if",hash:{},fn:e.program(1,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:7,column:7}}}))?s:"")+(null!=(s=c(t,"if").call(i,c(c(a,"root"),"useCancelableRequest"),{name:"if",hash:{},fn:e.program(5,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:8,column:0},end:{line:10,column:7}}}))?s:"")+"import { request as __request } from '"+(null!=(s=p(u(n,"outputCore",{start:{line:11,column:41},end:{line:11,column:51}}),n))?s:"")+"request';\nimport type { ApiRequestOptions } from '"+(null!=(s=p(u(n,"outputCore",{start:{line:12,column:43},end:{line:12,column:53}}),n))?s:"")+"ApiRequestOptions';\n"+(null!=(s=c(t,"if").call(i,c(c(a,"root"),"useVersion"),{name:"if",hash:{},fn:e.program(7,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:13,column:0},end:{line:15,column:7}}}))?s:"")+"\n"+(null!=(s=c(t,"each").call(i,c(n,"operations"),{name:"each",hash:{},fn:e.program(9,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:17,column:0},end:{line:22,column:9}}}))?s:"")+"\nexport type T"+(null!=(s=p(u(n,"originName",{start:{line:24,column:16},end:{line:24,column:26}}),n))?s:"")+"Options = {\n"+(null!=(s=c(t,"each").call(i,c(n,"operations"),{name:"each",hash:{},fn:e.program(11,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:25,column:0},end:{line:27,column:9}}}))?s:"")+"}\n\nexport const "+(null!=(s=p(u(n,"originName",{start:{line:30,column:16},end:{line:30,column:26}}),n))?s:"")+"Options: T"+(null!=(s=p(u(n,"originName",{start:{line:30,column:42},end:{line:30,column:52}}),n))?s:"")+"Options = {\n"+(null!=(s=c(t,"each").call(i,c(n,"operations"),{name:"each",hash:{},fn:e.program(13,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:31,column:0},end:{line:33,column:9}}}))?s:"")+"}\n\nexport class "+(null!=(s=p(u(n,"name",{start:{line:36,column:16},end:{line:36,column:20}}),n))?s:"")+" {\n\n"+(null!=(s=c(t,"each").call(i,c(n,"operations"),{name:"each",hash:{},fn:e.program(15,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:38,column:4},end:{line:68,column:13}}}))?s:"")+"}"},usePartial:!0,useData:!0,useDepths:!0},Fn={1:function(e,n,t,r,a,o,l){var s,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\n"+(null!=(s=i(t,"each").call(null!=n?n:e.nullContext||{},i(n,"core"),{name:"each",hash:{},fn:e.program(2,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:10,column:9}}}))?s:"")},2:function(e,n,t,r,a,o,l){var s,i=null!=n?n:e.nullContext||{},u=e.lambda,p=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"export { ApiError"+(null!=(s=p(t,"notEquals").call(i,p(p(l[1],"core"),"length"),1,{name:"notEquals",hash:{},fn:e.program(3,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:5,column:17},end:{line:5,column:87}}}))?s:"")+" } from './"+(null!=(s=u(n,n))?s:"")+"ApiError';\n"+(null!=(s=p(t,"if").call(i,p(p(a,"root"),"useCancelableRequest"),{name:"if",hash:{},fn:e.program(5,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:6,column:0},end:{line:8,column:7}}}))?s:"")+"export { OpenAPI"+(null!=(s=p(t,"notEquals").call(i,p(p(l[1],"core"),"length"),1,{name:"notEquals",hash:{},fn:e.program(7,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:9,column:16},end:{line:9,column:86}}}))?s:"")+" } from './"+(null!=(s=u(n,n))?s:"")+"OpenAPI';\n"},3:function(e,n,t,r,a){var o;return" as ApiError$"+(null!=(o=e.lambda(e.strict(a,"index",{start:{line:5,column:64},end:{line:5,column:70}}),n))?o:"")},5:function(e,n,t,r,a){var o;return"export { CancelablePromise } from './"+(null!=(o=e.lambda(n,n))?o:"")+"CancelablePromise';\n"},7:function(e,n,t,r,a){var o;return" as OpenAPI$"+(null!=(o=e.lambda(e.strict(a,"index",{start:{line:9,column:63},end:{line:9,column:69}}),n))?o:"")},9:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"models"),{name:"each",hash:{},fn:e.program(10,a,0),inverse:e.noop,data:a,loc:{start:{line:14,column:0},end:{line:24,column:9}}}))?o:"")},10:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"enum"),{name:"if",hash:{},fn:e.program(11,a,0),inverse:e.program(14,a,0),data:a,loc:{start:{line:15,column:0},end:{line:23,column:7}}}))?o:""},11:function(e,n,t,r,a){var o,l=e.strict,s=e.lambda,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"export { "+(null!=(o=s(l(n,"name",{start:{line:16,column:12},end:{line:16,column:16}}),n))?o:"")+(null!=(o=i(t,"if").call(null!=n?n:e.nullContext||{},i(n,"alias"),{name:"if",hash:{},fn:e.program(12,a,0),inverse:e.noop,data:a,loc:{start:{line:16,column:19},end:{line:16,column:55}}}))?o:"")+" } from './"+(null!=(o=s(l(n,"package",{start:{line:16,column:69},end:{line:16,column:76}}),n))?o:"")+(null!=(o=s(l(n,"path",{start:{line:16,column:82},end:{line:16,column:86}}),n))?o:"")+"';\n"},12:function(e,n,t,r,a){var o;return" as "+(null!=(o=e.lambda(e.strict(n,"alias",{start:{line:16,column:40},end:{line:16,column:45}}),n))?o:"")},14:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"useUnionTypes"),{name:"if",hash:{},fn:e.program(15,a,0),inverse:e.program(17,a,0),data:a,loc:{start:{line:17,column:0},end:{line:23,column:0}}}))?o:""},15:function(e,n,t,r,a){var o,l=e.strict,s=e.lambda,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"export type { "+(null!=(o=s(l(n,"name",{start:{line:18,column:17},end:{line:18,column:21}}),n))?o:"")+(null!=(o=i(t,"if").call(null!=n?n:e.nullContext||{},i(n,"alias"),{name:"if",hash:{},fn:e.program(12,a,0),inverse:e.noop,data:a,loc:{start:{line:18,column:24},end:{line:18,column:60}}}))?o:"")+" } from './"+(null!=(o=s(l(n,"package",{start:{line:18,column:74},end:{line:18,column:81}}),n))?o:"")+(null!=(o=s(l(n,"path",{start:{line:18,column:87},end:{line:18,column:91}}),n))?o:"")+"';\n"},17:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"enums"),{name:"if",hash:{},fn:e.program(11,a,0),inverse:e.program(15,a,0),data:a,loc:{start:{line:19,column:0},end:{line:23,column:0}}}))?o:""},19:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"schemas"),{name:"each",hash:{},fn:e.program(20,a,0),inverse:e.noop,data:a,loc:{start:{line:28,column:0},end:{line:30,column:9}}}))?o:"")},20:function(e,n,t,r,a){var o,l=e.strict,s=e.lambda,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"export { "+(null!=(o=s(l(n,"name",{start:{line:29,column:12},end:{line:29,column:16}}),n))?o:"")+"Schema"+(null!=(o=i(t,"if").call(null!=n?n:e.nullContext||{},i(n,"alias"),{name:"if",hash:{},fn:e.program(21,a,0),inverse:e.noop,data:a,loc:{start:{line:29,column:25},end:{line:29,column:67}}}))?o:"")+" } from './"+(null!=(o=s(l(n,"package",{start:{line:29,column:81},end:{line:29,column:88}}),n))?o:"")+(null!=(o=s(l(n,"path",{start:{line:29,column:94},end:{line:29,column:98}}),n))?o:"")+"Schema';\n"},21:function(e,n,t,r,a){var o;return" as "+(null!=(o=e.lambda(e.strict(n,"alias",{start:{line:29,column:46},end:{line:29,column:51}}),n))?o:"")+"Schema"},23:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"services"),{name:"each",hash:{},fn:e.program(24,a,0),inverse:e.noop,data:a,loc:{start:{line:34,column:0},end:{line:36,column:9}}}))?o:"")},24:function(e,n,t,r,a){var o,l=e.strict,s=e.lambda;return"export { "+(null!=(o=s(l(n,"name",{start:{line:35,column:12},end:{line:35,column:16}}),n))?o:"")+" } from './"+(null!=(o=s(l(n,"package",{start:{line:35,column:33},end:{line:35,column:40}}),n))?o:"")+(null!=(o=s(l(n,"name",{start:{line:35,column:46},end:{line:35,column:50}}),n))?o:"")+"';\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a,o,l){var s,i=null!=n?n:e.nullContext||{},u=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(s=e.invokePartial(u(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?s:"")+(null!=(s=u(t,"if").call(i,u(n,"core"),{name:"if",hash:{},fn:e.program(1,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:2,column:0},end:{line:11,column:7}}}))?s:"")+(null!=(s=u(t,"if").call(i,u(n,"models"),{name:"if",hash:{},fn:e.program(9,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:12,column:0},end:{line:25,column:7}}}))?s:"")+(null!=(s=u(t,"if").call(i,u(n,"schemas"),{name:"if",hash:{},fn:e.program(19,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:26,column:0},end:{line:31,column:7}}}))?s:"")+(null!=(s=u(t,"if").call(i,u(n,"services"),{name:"if",hash:{},fn:e.program(23,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:32,column:0},end:{line:37,column:7}}}))?s:"")},usePartial:!0,useData:!0,useDepths:!0},Vn={1:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=s(t,"equals").call(l,s(s(a,"root"),"httpClient"),"fetch",{name:"equals",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:0},end:{line:2,column:53}}}))?o:"")+(null!=(o=s(t,"equals").call(l,s(s(a,"root"),"httpClient"),"xhr",{name:"equals",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:3,column:51}}}))?o:"")+(null!=(o=s(t,"equals").call(l,s(s(a,"root"),"httpClient"),"node",{name:"equals",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:4,column:86}}}))?o:"")+(null!=(o=s(t,"equals").call(l,s(s(a,"root"),"httpClient"),"axios",{name:"equals",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:5,column:0},end:{line:5,column:87}}}))?o:"")},2:function(e,n,t,r,a){return"Blob"},4:function(e,n,t,r,a){return"Buffer | ArrayBuffer | ArrayBufferView"},6:function(e,n,t,r,a){var o;return null!=(o=e.lambda(e.strict(n,"base",{start:{line:7,column:3},end:{line:7,column:7}}),n))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"base"),"File",{name:"equals",hash:{},fn:e.program(1,a,0),inverse:e.program(6,a,0),data:a,loc:{start:{line:1,column:0},end:{line:8,column:13}}}))?o:""},useData:!0},Wn={1:function(e,n,t,r,a){var o;return"/**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:3,column:6},end:{line:3,column:17}}),n))?o:"")+"\n */\n"},3:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"unless").call(null!=n?n:e.nullContext||{},l(l(a,"root"),"useUnionTypes"),{name:"unless",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:8,column:0},end:{line:27,column:11}}}))?o:""},4:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\nexport namespace "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:10,column:20},end:{line:10,column:24}}),n))?o:"")+" {\n\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"enums"),{name:"each",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:12,column:4},end:{line:24,column:13}}}))?o:"")+"\n}\n"},5:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=s(t,"if").call(l,s(n,"description"),{name:"if",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a,loc:{start:{line:13,column:4},end:{line:17,column:11}}}))?o:"")+" export enum "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:18,column:19},end:{line:18,column:23}}),n))?o:"")+" {\n"+(null!=(o=s(t,"each").call(l,s(n,"enum"),{name:"each",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a,loc:{start:{line:19,column:8},end:{line:21,column:17}}}))?o:"")+" }\n\n"},6:function(e,n,t,r,a){var o;return" /**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:15,column:10},end:{line:15,column:21}}),n))?o:"")+"\n */\n"},8:function(e,n,t,r,a){var o,l=e.strict,s=e.lambda;return" "+(null!=(o=s(l(n,"name",{start:{line:20,column:11},end:{line:20,column:15}}),n))?o:"")+" = "+(null!=(o=s(l(n,"value",{start:{line:20,column:24},end:{line:20,column:29}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=s(t,"if").call(l,s(n,"description"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:5,column:7}}}))?o:"")+"export type "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:6,column:15},end:{line:6,column:19}}),n))?o:"")+" = "+(null!=(o=e.invokePartial(s(r,"type"),n,{name:"type",hash:{parent:s(n,"name")},data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+";\n"+(null!=(o=s(t,"if").call(l,s(n,"enums"),{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:7,column:0},end:{line:28,column:7}}}))?o:"")},usePartial:!0,useData:!0},Qn={1:function(e,n,t,r,a){var o;return"/**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:3,column:6},end:{line:3,column:17}}),n))?o:"")+"\n */\n"},3:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=s(t,"if").call(l,s(n,"description"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:8,column:4},end:{line:12,column:11}}}))?o:"")+(null!=(o=s(t,"containsSpaces").call(l,s(n,"name"),{name:"containsSpaces",hash:{},fn:e.program(6,a,0),inverse:e.program(8,a,0),data:a,loc:{start:{line:13,column:4},end:{line:17,column:23}}}))?o:"")},4:function(e,n,t,r,a){var o;return" /**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:10,column:10},end:{line:10,column:21}}),n))?o:"")+"\n */\n"},6:function(e,n,t,r,a){var o,l=e.strict,s=e.lambda;return' "'+(null!=(o=s(l(n,"name",{start:{line:14,column:8},end:{line:14,column:12}}),n))?o:"")+'" = '+(null!=(o=s(l(n,"value",{start:{line:14,column:22},end:{line:14,column:27}}),n))?o:"")+",\n"},8:function(e,n,t,r,a){var o,l=e.strict,s=e.lambda;return" "+(null!=(o=s(l(n,"name",{start:{line:16,column:7},end:{line:16,column:11}}),n))?o:"")+" = "+(null!=(o=s(l(n,"value",{start:{line:16,column:20},end:{line:16,column:25}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=s(t,"if").call(l,s(n,"description"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:5,column:7}}}))?o:"")+"export enum "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:6,column:15},end:{line:6,column:19}}),n))?o:"")+" {\n"+(null!=(o=s(t,"each").call(l,s(n,"enum"),{name:"each",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:7,column:4},end:{line:18,column:13}}}))?o:"")+"}"},useData:!0},zn={1:function(e,n,t,r,a){var o;return"/**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:3,column:6},end:{line:3,column:17}}),n))?o:"")+"\n */\n"},3:function(e,n,t,r,a,o,l){var s,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(s=i(t,"if").call(null!=n?n:e.nullContext||{},i(n,"description"),{name:"if",hash:{},fn:e.program(4,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:8,column:4},end:{line:12,column:11}}}))?s:"")+" "+(null!=(s=e.invokePartial(i(r,"isReadOnly"),n,{name:"isReadOnly",data:a,helpers:t,partials:r,decorators:e.decorators}))?s:"")+(null!=(s=e.lambda(e.strict(n,"name",{start:{line:13,column:22},end:{line:13,column:26}}),n))?s:"")+(null!=(s=e.invokePartial(i(r,"isRequired"),n,{name:"isRequired",data:a,helpers:t,partials:r,decorators:e.decorators}))?s:"")+": "+(null!=(s=e.invokePartial(i(r,"type"),n,{name:"type",hash:{parent:i(l[1],"name")},data:a,helpers:t,partials:r,decorators:e.decorators}))?s:"")+";\n"},4:function(e,n,t,r,a){var o;return" /**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:10,column:10},end:{line:10,column:21}}),n))?o:"")+"\n */\n"},6:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"unless").call(null!=n?n:e.nullContext||{},l(l(a,"root"),"useUnionTypes"),{name:"unless",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:17,column:0},end:{line:40,column:11}}}))?o:""},7:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\nexport namespace "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:19,column:20},end:{line:19,column:24}}),n))?o:"")+" {\n\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"enums"),{name:"each",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a,loc:{start:{line:21,column:4},end:{line:37,column:13}}}))?o:"")+"\n}\n"},8:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=s(t,"if").call(l,s(n,"description"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:22,column:4},end:{line:26,column:11}}}))?o:"")+(null!=(o=s(t,"if").call(l,s(n,"alias"),{name:"if",hash:{},fn:e.program(9,a,0),inverse:e.program(11,a,0),data:a,loc:{start:{line:27,column:4},end:{line:31,column:11}}}))?o:"")+(null!=(o=s(t,"each").call(l,s(n,"enum"),{name:"each",hash:{},fn:e.program(13,a,0),inverse:e.noop,data:a,loc:{start:{line:32,column:8},end:{line:34,column:17}}}))?o:"")+" }\n\n"},9:function(e,n,t,r,a){var o;return" export enum "+(null!=(o=e.lambda(e.strict(n,"alias",{start:{line:28,column:19},end:{line:28,column:24}}),n))?o:"")+" {\n"},11:function(e,n,t,r,a){var o;return" export enum "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:30,column:19},end:{line:30,column:23}}),n))?o:"")+" {\n"},13:function(e,n,t,r,a){var o,l=e.strict,s=e.lambda;return" "+(null!=(o=s(l(n,"name",{start:{line:33,column:11},end:{line:33,column:15}}),n))?o:"")+" = "+(null!=(o=s(l(n,"value",{start:{line:33,column:24},end:{line:33,column:29}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a,o,l){var s,i=null!=n?n:e.nullContext||{},u=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(s=u(t,"if").call(i,u(n,"description"),{name:"if",hash:{},fn:e.program(1,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:5,column:7}}}))?s:"")+"export interface "+(null!=(s=e.lambda(e.strict(n,"name",{start:{line:6,column:20},end:{line:6,column:24}}),n))?s:"")+" {\n"+(null!=(s=u(t,"each").call(i,u(n,"properties"),{name:"each",hash:{},fn:e.program(3,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:7,column:4},end:{line:14,column:13}}}))?s:"")+"}\n"+(null!=(s=u(t,"if").call(i,u(n,"enums"),{name:"if",hash:{},fn:e.program(6,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:16,column:0},end:{line:41,column:7}}}))?s:"")},usePartial:!0,useData:!0,useDepths:!0},Jn={1:function(e,n,t,r,a){var o;return"/**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:3,column:6},end:{line:3,column:17}}),n))?o:"")+"\n */\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"description"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:5,column:7}}}))?o:"")+"export type "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:6,column:15},end:{line:6,column:19}}),n))?o:"")+" = "+(null!=(o=e.invokePartial(l(r,"type"),n,{name:"type",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+";"},usePartial:!0,useData:!0},Zn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */"},useData:!0},Gn={1:function(e,n,t,r,a){return" | null"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"isNullable"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:1,column:32}}}))?o:""},useData:!0},Xn={1:function(e,n,t,r,a){return"readonly "},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:1,column:34}}}))?o:""},useData:!0},Kn={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"unless").call(null!=n?n:e.nullContext||{},l(n,"isRequired"),{name:"unless",hash:{},fn:e.program(2,a,0),inverse:e.program(4,a,0),data:a,loc:{start:{line:2,column:0},end:{line:2,column:54}}}))?o:""},2:function(e,n,t,r,a){return"?"},4:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"default"),{name:"if",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:23},end:{line:2,column:43}}}))?o:""},6:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"unless").call(null!=n?n:e.nullContext||{},l(n,"isRequired"),{name:"unless",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:4,column:64}}}))?o:""},7:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"unless").call(null!=n?n:e.nullContext||{},l(n,"default"),{name:"unless",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:22},end:{line:4,column:53}}}))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(l(a,"root"),"useOptions"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(6,a,0),data:a,loc:{start:{line:1,column:0},end:{line:5,column:9}}}))?o:""},useData:!0},Yn={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(l(a,"root"),"useOptions"),{name:"if",hash:{},fn:e.program(2,a,0),inverse:e.program(9,a,0),data:a,loc:{start:{line:2,column:0},end:{line:20,column:7}}}))?o:""},2:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n"+(null!=(o=s(t,"each").call(l,s(n,"parameters"),{name:"each",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:6,column:9}}}))?o:"")+"}: {\n"+(null!=(o=s(t,"each").call(l,s(n,"parameters"),{name:"each",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a,loc:{start:{line:8,column:0},end:{line:13,column:9}}}))?o:"")+"}"},3:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.lambda(e.strict(n,"name",{start:{line:5,column:3},end:{line:5,column:7}}),n))?o:"")+(null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"default"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:5,column:10},end:{line:5,column:48}}}))?o:"")+",\n"},4:function(e,n,t,r,a){var o;return" = "+(null!=(o=e.lambda(e.strict(n,"default",{start:{line:5,column:31},end:{line:5,column:38}}),n))?o:"")},6:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"description"),{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:9,column:0},end:{line:11,column:7}}}))?o:"")+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:12,column:3},end:{line:12,column:7}}),n))?o:"")+(null!=(o=e.invokePartial(l(r,"isRequired"),n,{name:"isRequired",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+": "+(null!=(o=e.invokePartial(l(r,"type"),n,{name:"type",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+",\n"},7:function(e,n,t,r,a){var o;return"/** "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:10,column:7},end:{line:10,column:18}}),n))?o:"")+" **/\n"},9:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"parameters"),{name:"each",hash:{},fn:e.program(10,a,0),inverse:e.noop,data:a,loc:{start:{line:17,column:0},end:{line:19,column:9}}}))?o:"")},10:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.lambda(e.strict(n,"name",{start:{line:18,column:3},end:{line:18,column:7}}),n))?o:"")+(null!=(o=e.invokePartial(l(r,"isRequired"),n,{name:"isRequired",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+": "+(null!=(o=e.invokePartial(l(r,"type"),n,{name:"type",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+(null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"default"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:18,column:36},end:{line:18,column:74}}}))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"parameters"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:21,column:7}}}))?o:""},usePartial:!0,useData:!0},et={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(l(a,"root"),"useOptions"),{name:"if",hash:{},fn:e.program(2,a,0),inverse:e.program(7,a,0),data:a,loc:{start:{line:2,column:0},end:{line:17,column:7}}}))?o:""},2:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n"+(null!=(o=s(t,"each").call(l,s(n,"parameters"),{name:"each",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:6,column:9}}}))?o:"")+"}: {\n"+(null!=(o=s(t,"each").call(l,s(n,"parameters"),{name:"each",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:8,column:0},end:{line:10,column:9}}}))?o:"")+"}"},3:function(e,n,t,r,a){var o;return(null!=(o=e.lambda(e.strict(n,"name",{start:{line:5,column:3},end:{line:5,column:7}}),n))?o:"")+",\n"},5:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.lambda(e.strict(n,"name",{start:{line:9,column:3},end:{line:9,column:7}}),n))?o:"")+(null!=(o=e.invokePartial(l(r,"isRequired"),n,{name:"isRequired",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+": "+(null!=(o=e.invokePartial(l(r,"type"),n,{name:"type",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+",\n"},7:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"parameters"),{name:"each",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:14,column:0},end:{line:16,column:9}}}))?o:"")},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"parameters"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:18,column:7}}}))?o:""},usePartial:!0,useData:!0},nt={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(l(a,"root"),"useOptions"),{name:"if",hash:{},fn:e.program(2,a,0),inverse:e.program(5,a,0),data:a,loc:{start:{line:2,column:0},end:{line:13,column:7}}}))?o:""},2:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"parameters"),{name:"each",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:4},end:{line:6,column:13}}}))?o:"")+" }"},3:function(e,n,t,r,a){var o;return" "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:5,column:11},end:{line:5,column:15}}),n))?o:"")+",\n"},5:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"parameters"),{name:"each",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:10,column:4},end:{line:12,column:13}}}))?o:"")},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"parameters"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:14,column:7}}}))?o:""},useData:!0},tt={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"results"),{name:"each",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:0},end:{line:2,column:66}}}))?o:""},2:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"type"),n,{name:"type",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+(null!=(o=l(t,"unless").call(null!=n?n:e.nullContext||{},l(a,"last"),{name:"unless",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:26},end:{line:2,column:57}}}))?o:"")},3:function(e,n,t,r,a){return" | "},5:function(e,n,t,r,a){return"void"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"results"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(5,a,0),data:a,loc:{start:{line:1,column:0},end:{line:5,column:9}}}))?o:""},usePartial:!0,useData:!0},rt={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"schemaInterface"),n,{name:"schemaInterface",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},3:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"enum",{name:"equals",hash:{},fn:e.program(4,a,0),inverse:e.program(6,a,0),data:a,loc:{start:{line:3,column:0},end:{line:17,column:0}}}))?o:""},4:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"schemaEnum"),n,{name:"schemaEnum",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},6:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"array",{name:"equals",hash:{},fn:e.program(7,a,0),inverse:e.program(9,a,0),data:a,loc:{start:{line:5,column:0},end:{line:17,column:0}}}))?o:""},7:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"schemaArray"),n,{name:"schemaArray",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},9:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"dictionary",{name:"equals",hash:{},fn:e.program(10,a,0),inverse:e.program(12,a,0),data:a,loc:{start:{line:7,column:0},end:{line:17,column:0}}}))?o:""},10:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"schemaDictionary"),n,{name:"schemaDictionary",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},12:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"any-of",{name:"equals",hash:{},fn:e.program(13,a,0),inverse:e.program(15,a,0),data:a,loc:{start:{line:9,column:0},end:{line:17,column:0}}}))?o:""},13:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"schemaComposition"),n,{name:"schemaComposition",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},15:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"all-of",{name:"equals",hash:{},fn:e.program(13,a,0),inverse:e.program(16,a,0),data:a,loc:{start:{line:11,column:0},end:{line:17,column:0}}}))?o:""},16:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"one-of",{name:"equals",hash:{},fn:e.program(13,a,0),inverse:e.program(17,a,0),data:a,loc:{start:{line:13,column:0},end:{line:17,column:0}}}))?o:""},17:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"schemaGeneric"),n,{name:"schemaGeneric",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"interface",{name:"equals",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a,loc:{start:{line:1,column:0},end:{line:17,column:11}}}))?o:""},usePartial:!0,useData:!0},at={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" contains: "+(null!=(o=e.invokePartial(l(r,"schema"),l(n,"link"),{name:"schema",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+",\n"},3:function(e,n,t,r,a){var o;return" contains: {\n type: '"+(null!=(o=e.lambda(e.strict(n,"base",{start:{line:7,column:18},end:{line:7,column:22}}),n))?o:"")+"',\n },\n"},5:function(e,n,t,r,a){var o;return" isReadOnly: "+(null!=(o=e.lambda(e.strict(n,"isReadOnly",{start:{line:11,column:19},end:{line:11,column:29}}),n))?o:"")+",\n"},7:function(e,n,t,r,a){var o;return" isRequired: "+(null!=(o=e.lambda(e.strict(n,"isRequired",{start:{line:14,column:19},end:{line:14,column:29}}),n))?o:"")+",\n"},9:function(e,n,t,r,a){var o;return" isNullable: "+(null!=(o=e.lambda(e.strict(n,"isNullable",{start:{line:17,column:19},end:{line:17,column:29}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n type: 'array',\n"+(null!=(o=s(t,"if").call(l,s(n,"link"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a,loc:{start:{line:3,column:0},end:{line:9,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(l,s(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:10,column:0},end:{line:12,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(l,s(n,"isRequired"),{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:13,column:0},end:{line:15,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(l,s(n,"isNullable"),{name:"if",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a,loc:{start:{line:16,column:0},end:{line:18,column:7}}}))?o:"")+"}"},usePartial:!0,useData:!0},ot={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"schema"),n,{name:"schema",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+(null!=(o=l(t,"unless").call(null!=n?n:e.nullContext||{},l(a,"last"),{name:"unless",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:46},end:{line:3,column:76}}}))?o:"")},2:function(e,n,t,r,a){return", "},4:function(e,n,t,r,a){var o;return" isReadOnly: "+(null!=(o=e.lambda(e.strict(n,"isReadOnly",{start:{line:5,column:19},end:{line:5,column:29}}),n))?o:"")+",\n"},6:function(e,n,t,r,a){var o;return" isRequired: "+(null!=(o=e.lambda(e.strict(n,"isRequired",{start:{line:8,column:19},end:{line:8,column:29}}),n))?o:"")+",\n"},8:function(e,n,t,r,a){var o;return" isNullable: "+(null!=(o=e.lambda(e.strict(n,"isNullable",{start:{line:11,column:19},end:{line:11,column:29}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n type: '"+(null!=(o=e.lambda(e.strict(n,"export",{start:{line:2,column:13},end:{line:2,column:19}}),n))?o:"")+"',\n contains: ["+(null!=(o=s(t,"each").call(l,s(n,"properties"),{name:"each",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:15},end:{line:3,column:85}}}))?o:"")+"],\n"+(null!=(o=s(t,"if").call(l,s(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:6,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(l,s(n,"isRequired"),{name:"if",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a,loc:{start:{line:7,column:0},end:{line:9,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(l,s(n,"isNullable"),{name:"if",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a,loc:{start:{line:10,column:0},end:{line:12,column:7}}}))?o:"")+"}"},usePartial:!0,useData:!0},lt={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" contains: "+(null!=(o=e.invokePartial(l(r,"schema"),l(n,"link"),{name:"schema",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+",\n"},3:function(e,n,t,r,a){var o;return" contains: {\n type: '"+(null!=(o=e.lambda(e.strict(n,"base",{start:{line:7,column:18},end:{line:7,column:22}}),n))?o:"")+"',\n },\n"},5:function(e,n,t,r,a){var o;return" isReadOnly: "+(null!=(o=e.lambda(e.strict(n,"isReadOnly",{start:{line:11,column:19},end:{line:11,column:29}}),n))?o:"")+",\n"},7:function(e,n,t,r,a){var o;return" isRequired: "+(null!=(o=e.lambda(e.strict(n,"isRequired",{start:{line:14,column:19},end:{line:14,column:29}}),n))?o:"")+",\n"},9:function(e,n,t,r,a){var o;return" isNullable: "+(null!=(o=e.lambda(e.strict(n,"isNullable",{start:{line:17,column:19},end:{line:17,column:29}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n type: 'dictionary',\n"+(null!=(o=s(t,"if").call(l,s(n,"link"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a,loc:{start:{line:3,column:0},end:{line:9,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(l,s(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:10,column:0},end:{line:12,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(l,s(n,"isRequired"),{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:13,column:0},end:{line:15,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(l,s(n,"isNullable"),{name:"if",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a,loc:{start:{line:16,column:0},end:{line:18,column:7}}}))?o:"")+"}"},usePartial:!0,useData:!0},st={1:function(e,n,t,r,a){var o;return" isReadOnly: "+(null!=(o=e.lambda(e.strict(n,"isReadOnly",{start:{line:4,column:19},end:{line:4,column:29}}),n))?o:"")+",\n"},3:function(e,n,t,r,a){var o;return" isRequired: "+(null!=(o=e.lambda(e.strict(n,"isRequired",{start:{line:7,column:19},end:{line:7,column:29}}),n))?o:"")+",\n"},5:function(e,n,t,r,a){var o;return" isNullable: "+(null!=(o=e.lambda(e.strict(n,"isNullable",{start:{line:10,column:19},end:{line:10,column:29}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n type: 'Enum',\n"+(null!=(o=s(t,"if").call(l,s(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:5,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(l,s(n,"isRequired"),{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:6,column:0},end:{line:8,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(l,s(n,"isNullable"),{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:9,column:0},end:{line:11,column:7}}}))?o:"")+"}"},useData:!0},it={1:function(e,n,t,r,a){var o;return" type: '"+(null!=(o=e.lambda(e.strict(n,"base",{start:{line:3,column:14},end:{line:3,column:18}}),n))?o:"")+"',\n"},3:function(e,n,t,r,a){var o;return" isReadOnly: "+(null!=(o=e.lambda(e.strict(n,"isReadOnly",{start:{line:6,column:19},end:{line:6,column:29}}),n))?o:"")+",\n"},5:function(e,n,t,r,a){var o;return" isRequired: "+(null!=(o=e.lambda(e.strict(n,"isRequired",{start:{line:9,column:19},end:{line:9,column:29}}),n))?o:"")+",\n"},7:function(e,n,t,r,a){var o;return" isNullable: "+(null!=(o=e.lambda(e.strict(n,"isNullable",{start:{line:12,column:19},end:{line:12,column:29}}),n))?o:"")+",\n"},9:function(e,n,t,r,a){var o;return" format: '"+(null!=(o=e.lambda(e.strict(n,"format",{start:{line:15,column:16},end:{line:15,column:22}}),n))?o:"")+"',\n"},11:function(e,n,t,r,a){var o;return" maximum: "+(null!=(o=e.lambda(e.strict(n,"maximum",{start:{line:18,column:16},end:{line:18,column:23}}),n))?o:"")+",\n"},13:function(e,n,t,r,a){var o;return" exclusiveMaximum: "+(null!=(o=e.lambda(e.strict(n,"exclusiveMaximum",{start:{line:21,column:25},end:{line:21,column:41}}),n))?o:"")+",\n"},15:function(e,n,t,r,a){var o;return" minimum: "+(null!=(o=e.lambda(e.strict(n,"minimum",{start:{line:24,column:16},end:{line:24,column:23}}),n))?o:"")+",\n"},17:function(e,n,t,r,a){var o;return" exclusiveMinimum: "+(null!=(o=e.lambda(e.strict(n,"exclusiveMinimum",{start:{line:27,column:25},end:{line:27,column:41}}),n))?o:"")+",\n"},19:function(e,n,t,r,a){var o;return" multipleOf: "+(null!=(o=e.lambda(e.strict(n,"multipleOf",{start:{line:30,column:19},end:{line:30,column:29}}),n))?o:"")+",\n"},21:function(e,n,t,r,a){var o;return" maxLength: "+(null!=(o=e.lambda(e.strict(n,"maxLength",{start:{line:33,column:18},end:{line:33,column:27}}),n))?o:"")+",\n"},23:function(e,n,t,r,a){var o;return" minLength: "+(null!=(o=e.lambda(e.strict(n,"minLength",{start:{line:36,column:18},end:{line:36,column:27}}),n))?o:"")+",\n"},25:function(e,n,t,r,a){var o;return" pattern: '"+(null!=(o=e.lambda(e.strict(n,"pattern",{start:{line:39,column:17},end:{line:39,column:24}}),n))?o:"")+"',\n"},27:function(e,n,t,r,a){var o;return" maxItems: "+(null!=(o=e.lambda(e.strict(n,"maxItems",{start:{line:42,column:17},end:{line:42,column:25}}),n))?o:"")+",\n"},29:function(e,n,t,r,a){var o;return" minItems: "+(null!=(o=e.lambda(e.strict(n,"minItems",{start:{line:45,column:17},end:{line:45,column:25}}),n))?o:"")+",\n"},31:function(e,n,t,r,a){var o;return" uniqueItems: "+(null!=(o=e.lambda(e.strict(n,"uniqueItems",{start:{line:48,column:20},end:{line:48,column:31}}),n))?o:"")+",\n"},33:function(e,n,t,r,a){var o;return" maxProperties: "+(null!=(o=e.lambda(e.strict(n,"maxProperties",{start:{line:51,column:22},end:{line:51,column:35}}),n))?o:"")+",\n"},35:function(e,n,t,r,a){var o;return" minProperties: "+(null!=(o=e.lambda(e.strict(n,"minProperties",{start:{line:54,column:22},end:{line:54,column:35}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n"+(null!=(o=s(t,"if").call(l,s(n,"type"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:0},end:{line:4,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(l,s(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:5,column:0},end:{line:7,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(l,s(n,"isRequired"),{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:8,column:0},end:{line:10,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(l,s(n,"isNullable"),{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:11,column:0},end:{line:13,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(l,s(n,"format"),{name:"if",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a,loc:{start:{line:14,column:0},end:{line:16,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(l,s(n,"maximum"),{name:"if",hash:{},fn:e.program(11,a,0),inverse:e.noop,data:a,loc:{start:{line:17,column:0},end:{line:19,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(l,s(n,"exclusiveMaximum"),{name:"if",hash:{},fn:e.program(13,a,0),inverse:e.noop,data:a,loc:{start:{line:20,column:0},end:{line:22,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(l,s(n,"minimum"),{name:"if",hash:{},fn:e.program(15,a,0),inverse:e.noop,data:a,loc:{start:{line:23,column:0},end:{line:25,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(l,s(n,"exclusiveMinimum"),{name:"if",hash:{},fn:e.program(17,a,0),inverse:e.noop,data:a,loc:{start:{line:26,column:0},end:{line:28,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(l,s(n,"multipleOf"),{name:"if",hash:{},fn:e.program(19,a,0),inverse:e.noop,data:a,loc:{start:{line:29,column:0},end:{line:31,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(l,s(n,"maxLength"),{name:"if",hash:{},fn:e.program(21,a,0),inverse:e.noop,data:a,loc:{start:{line:32,column:0},end:{line:34,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(l,s(n,"minLength"),{name:"if",hash:{},fn:e.program(23,a,0),inverse:e.noop,data:a,loc:{start:{line:35,column:0},end:{line:37,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(l,s(n,"pattern"),{name:"if",hash:{},fn:e.program(25,a,0),inverse:e.noop,data:a,loc:{start:{line:38,column:0},end:{line:40,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(l,s(n,"maxItems"),{name:"if",hash:{},fn:e.program(27,a,0),inverse:e.noop,data:a,loc:{start:{line:41,column:0},end:{line:43,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(l,s(n,"minItems"),{name:"if",hash:{},fn:e.program(29,a,0),inverse:e.noop,data:a,loc:{start:{line:44,column:0},end:{line:46,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(l,s(n,"uniqueItems"),{name:"if",hash:{},fn:e.program(31,a,0),inverse:e.noop,data:a,loc:{start:{line:47,column:0},end:{line:49,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(l,s(n,"maxProperties"),{name:"if",hash:{},fn:e.program(33,a,0),inverse:e.noop,data:a,loc:{start:{line:50,column:0},end:{line:52,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(l,s(n,"minProperties"),{name:"if",hash:{},fn:e.program(35,a,0),inverse:e.noop,data:a,loc:{start:{line:53,column:0},end:{line:55,column:7}}}))?o:"")+"}"},useData:!0},ut={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"properties"),{name:"each",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:4},end:{line:6,column:13}}}))?o:""},2:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:5,column:11},end:{line:5,column:15}}),n))?o:"")+": "+(null!=(o=e.invokePartial(l(r,"schema"),n,{name:"schema",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+",\n"},4:function(e,n,t,r,a){var o;return" isReadOnly: "+(null!=(o=e.lambda(e.strict(n,"isReadOnly",{start:{line:10,column:19},end:{line:10,column:29}}),n))?o:"")+",\n"},6:function(e,n,t,r,a){var o;return" isRequired: "+(null!=(o=e.lambda(e.strict(n,"isRequired",{start:{line:13,column:19},end:{line:13,column:29}}),n))?o:"")+",\n"},8:function(e,n,t,r,a){var o;return" isNullable: "+(null!=(o=e.lambda(e.strict(n,"isNullable",{start:{line:16,column:19},end:{line:16,column:29}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n properties: {\n"+(null!=(o=s(t,"if").call(l,s(n,"properties"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:7,column:7}}}))?o:"")+" },\n"+(null!=(o=s(t,"if").call(l,s(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:9,column:0},end:{line:11,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(l,s(n,"isRequired"),{name:"if",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a,loc:{start:{line:12,column:0},end:{line:14,column:7}}}))?o:"")+(null!=(o=s(t,"if").call(l,s(n,"isNullable"),{name:"if",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a,loc:{start:{line:15,column:0},end:{line:17,column:7}}}))?o:"")+"}"},usePartial:!0,useData:!0},pt={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" cookies: {\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"parametersCookie"),{name:"each",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:5,column:4},end:{line:7,column:13}}}))?o:"")+" },\n"},2:function(e,n,t,r,a){var o,l=e.strict,s=e.lambda;return" '"+(null!=(o=s(l(n,"prop",{start:{line:6,column:12},end:{line:6,column:16}}),n))?o:"")+"': "+(null!=(o=s(l(n,"name",{start:{line:6,column:25},end:{line:6,column:29}}),n))?o:"")+",\n"},4:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" headers: {\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"parametersHeader"),{name:"each",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:12,column:4},end:{line:14,column:13}}}))?o:"")+" },\n"},6:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" query: {\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"parametersQuery"),{name:"each",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:19,column:4},end:{line:21,column:13}}}))?o:"")+" },\n"},8:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" formData: {\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"parametersForm"),{name:"each",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:26,column:4},end:{line:28,column:13}}}))?o:"")+" },\n"},10:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" body: "+(null!=(o=e.lambda(e.strict(l(n,"parametersBody"),"name",{start:{line:32,column:13},end:{line:32,column:32}}),n))?o:"")+",\n"+(null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(l(n,"parametersBody"),"mediaType"),{name:"if",hash:{},fn:e.program(11,a,0),inverse:e.noop,data:a,loc:{start:{line:33,column:4},end:{line:35,column:11}}}))?o:"")},11:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" mediaType: '"+(null!=(o=e.lambda(e.strict(l(n,"parametersBody"),"mediaType",{start:{line:34,column:23},end:{line:34,column:47}}),n))?o:"")+"',\n"},13:function(e,n,t,r,a){var o;return" responseHeader: '"+(null!=(o=e.lambda(e.strict(n,"responseHeader",{start:{line:38,column:24},end:{line:38,column:38}}),n))?o:"")+"',\n"},15:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" errors: {\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"errors"),{name:"each",hash:{},fn:e.program(16,a,0),inverse:e.noop,data:a,loc:{start:{line:42,column:4},end:{line:44,column:13}}}))?o:"")+" },\n"},16:function(e,n,t,r,a){var o,l=e.strict,s=e.lambda;return" "+(null!=(o=s(l(n,"code",{start:{line:43,column:11},end:{line:43,column:15}}),n))?o:"")+": `"+(null!=(o=s(l(n,"description",{start:{line:43,column:24},end:{line:43,column:35}}),n))?o:"")+"`,\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.strict,s=e.lambda,i=null!=n?n:e.nullContext||{},u=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"method: '"+(null!=(o=s(l(n,"method",{start:{line:1,column:12},end:{line:1,column:18}}),n))?o:"")+"',\npath: `"+(null!=(o=s(l(n,"path",{start:{line:2,column:10},end:{line:2,column:14}}),n))?o:"")+"`,\n"+(null!=(o=u(t,"if").call(i,u(n,"parametersCookie"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:9,column:7}}}))?o:"")+(null!=(o=u(t,"if").call(i,u(n,"parametersHeader"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:10,column:0},end:{line:16,column:7}}}))?o:"")+(null!=(o=u(t,"if").call(i,u(n,"parametersQuery"),{name:"if",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a,loc:{start:{line:17,column:0},end:{line:23,column:7}}}))?o:"")+(null!=(o=u(t,"if").call(i,u(n,"parametersForm"),{name:"if",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a,loc:{start:{line:24,column:0},end:{line:30,column:7}}}))?o:"")+(null!=(o=u(t,"if").call(i,u(n,"parametersBody"),{name:"if",hash:{},fn:e.program(10,a,0),inverse:e.noop,data:a,loc:{start:{line:31,column:0},end:{line:36,column:7}}}))?o:"")+(null!=(o=u(t,"if").call(i,u(n,"responseHeader"),{name:"if",hash:{},fn:e.program(13,a,0),inverse:e.noop,data:a,loc:{start:{line:37,column:0},end:{line:39,column:7}}}))?o:"")+(null!=(o=u(t,"if").call(i,u(n,"errors"),{name:"if",hash:{},fn:e.program(15,a,0),inverse:e.noop,data:a,loc:{start:{line:40,column:0},end:{line:46,column:7}}}))?o:"")},useData:!0},ct={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"typeInterface"),n,{name:"typeInterface",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},3:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"reference",{name:"equals",hash:{},fn:e.program(4,a,0),inverse:e.program(6,a,0),data:a,loc:{start:{line:3,column:0},end:{line:19,column:0}}}))?o:""},4:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"typeReference"),n,{name:"typeReference",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},6:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"enum",{name:"equals",hash:{},fn:e.program(7,a,0),inverse:e.program(9,a,0),data:a,loc:{start:{line:5,column:0},end:{line:19,column:0}}}))?o:""},7:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"typeEnum"),n,{name:"typeEnum",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},9:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"array",{name:"equals",hash:{},fn:e.program(10,a,0),inverse:e.program(12,a,0),data:a,loc:{start:{line:7,column:0},end:{line:19,column:0}}}))?o:""},10:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"typeArray"),n,{name:"typeArray",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},12:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"dictionary",{name:"equals",hash:{},fn:e.program(13,a,0),inverse:e.program(15,a,0),data:a,loc:{start:{line:9,column:0},end:{line:19,column:0}}}))?o:""},13:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"typeDictionary"),n,{name:"typeDictionary",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},15:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"one-of",{name:"equals",hash:{},fn:e.program(16,a,0),inverse:e.program(18,a,0),data:a,loc:{start:{line:11,column:0},end:{line:19,column:0}}}))?o:""},16:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"typeUnion"),n,{name:"typeUnion",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},18:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"any-of",{name:"equals",hash:{},fn:e.program(16,a,0),inverse:e.program(19,a,0),data:a,loc:{start:{line:13,column:0},end:{line:19,column:0}}}))?o:""},19:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"all-of",{name:"equals",hash:{},fn:e.program(20,a,0),inverse:e.program(22,a,0),data:a,loc:{start:{line:15,column:0},end:{line:19,column:0}}}))?o:""},20:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"typeIntersection"),n,{name:"typeIntersection",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},22:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"typeGeneric"),n,{name:"typeGeneric",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"interface",{name:"equals",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a,loc:{start:{line:1,column:0},end:{line:19,column:11}}}))?o:""},usePartial:!0,useData:!0},mt={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"Array<"+(null!=(o=e.invokePartial(l(r,"type"),l(n,"link"),{name:"type",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+">"+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},3:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"Array<"+(null!=(o=e.invokePartial(l(r,"base"),n,{name:"base",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+">"+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"link"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a,loc:{start:{line:1,column:0},end:{line:5,column:9}}}))?o:""},usePartial:!0,useData:!0},dt={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"Record<string, "+(null!=(o=e.invokePartial(l(r,"type"),l(n,"link"),{name:"type",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+">"+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},3:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"Record<string, "+(null!=(o=e.invokePartial(l(r,"base"),n,{name:"base",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+">"+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"link"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a,loc:{start:{line:1,column:0},end:{line:5,column:9}}}))?o:""},usePartial:!0,useData:!0},ft={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=l(t,"enumerator").call(null!=n?n:e.nullContext||{},l(n,"enum"),l(n,"parent"),l(n,"alias"),{name:"enumerator",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:0},end:{line:2,column:58}}}))?o:"")+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},2:function(e,n,t,r,a){var o;return null!=(o=e.lambda(n,n))?o:""},4:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=l(t,"enumerator").call(null!=n?n:e.nullContext||{},l(n,"enum"),l(n,"parent"),l(n,"name"),{name:"enumerator",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:4,column:57}}}))?o:"")+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"alias"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(4,a,0),data:a,loc:{start:{line:1,column:0},end:{line:5,column:9}}}))?o:""},usePartial:!0,useData:!0},ht={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"base"),n,{name:"base",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},usePartial:!0,useData:!0},yt={1:function(e,n,t,r,a,o,l){var s,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n"+(null!=(s=i(t,"each").call(null!=n?n:e.nullContext||{},i(n,"properties"),{name:"each",hash:{},fn:e.program(2,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:14,column:9}}}))?s:"")+"}"+(null!=(s=e.invokePartial(i(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?s:"")},2:function(e,n,t,r,a,o,l){var s,i=null!=n?n:e.nullContext||{},u=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(s=u(t,"if").call(i,u(n,"description"),{name:"if",hash:{},fn:e.program(3,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:8,column:7}}}))?s:"")+(null!=(s=u(t,"if").call(i,u(l[1],"parent"),{name:"if",hash:{},fn:e.program(5,a,0,o,l),inverse:e.program(7,a,0,o,l),data:a,loc:{start:{line:9,column:0},end:{line:13,column:7}}}))?s:"")},3:function(e,n,t,r,a){var o;return"/**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:6,column:6},end:{line:6,column:17}}),n))?o:"")+"\n */\n"},5:function(e,n,t,r,a,o,l){var s,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(s=e.invokePartial(i(r,"isReadOnly"),n,{name:"isReadOnly",data:a,helpers:t,partials:r,decorators:e.decorators}))?s:"")+(null!=(s=e.lambda(e.strict(n,"name",{start:{line:10,column:18},end:{line:10,column:22}}),n))?s:"")+(null!=(s=e.invokePartial(i(r,"isRequired"),n,{name:"isRequired",data:a,helpers:t,partials:r,decorators:e.decorators}))?s:"")+": "+(null!=(s=e.invokePartial(i(r,"type"),n,{name:"type",hash:{parent:i(l[1],"parent")},data:a,helpers:t,partials:r,decorators:e.decorators}))?s:"")+",\n"},7:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"isReadOnly"),n,{name:"isReadOnly",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:12,column:18},end:{line:12,column:22}}),n))?o:"")+(null!=(o=e.invokePartial(l(r,"isRequired"),n,{name:"isRequired",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+": "+(null!=(o=e.invokePartial(l(r,"type"),n,{name:"type",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+",\n"},9:function(e,n,t,r,a){return"any"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a,o,l){var s,i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(s=i(t,"if").call(null!=n?n:e.nullContext||{},i(n,"properties"),{name:"if",hash:{},fn:e.program(1,a,0,o,l),inverse:e.program(9,a,0,o,l),data:a,loc:{start:{line:1,column:0},end:{line:18,column:9}}}))?s:""},usePartial:!0,useData:!0,useDepths:!0},vt={1:function(e,n,t,r,a){var o;return null!=(o=e.lambda(n,n))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=l(t,"intersection").call(null!=n?n:e.nullContext||{},l(n,"properties"),l(n,"parent"),{name:"intersection",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:1,column:60}}}))?o:"")+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},usePartial:!0,useData:!0},gt={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"base"),n,{name:"base",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},usePartial:!0,useData:!0},bt={1:function(e,n,t,r,a){var o;return null!=(o=e.lambda(n,n))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=l(t,"union").call(null!=n?n:e.nullContext||{},l(n,"properties"),l(n,"parent"),{name:"union",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:1,column:46}}}))?o:"")+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},usePartial:!0,useData:!0};function Pt(e){!function(e){y.registerHelper("equals",(function(e,n,t){return e===n?t.fn(this):t.inverse(this)})),y.registerHelper("notEquals",(function(e,n,t){return e!==n?t.fn(this):t.inverse(this)})),y.registerHelper("containsSpaces",(function(e,n){return/\s+/.test(e)?n.fn(this):n.inverse(this)})),y.registerHelper("union",(function(n,t,r){const a=y.partials.type,o=n.map((n=>a(Object.assign(Object.assign(Object.assign({},e),n),{parent:t})))).filter(W);let l=o.join(" | ");return o.length>1&&(l=`(${l})`),r.fn(l)})),y.registerHelper("intersection",(function(n,t,r){const a=y.partials.type,o=n.map((n=>a(Object.assign(Object.assign(Object.assign({},e),n),{parent:t})))).filter(W);let l=o.join(" & ");return o.length>1&&(l=`(${l})`),r.fn(l)})),y.registerHelper("enumerator",(function(n,t,r,a){return!e.useUnionTypes&&t&&r?`${t}.${r}`:a.fn(n.map((e=>e.value)).filter(W).join(" | "))}))}(e);const n={index:y.template(Fn),exports:{model:y.template(Mn),schema:y.template(Un),service:y.template(Ln)},core:{settings:y.template(Sn),apiError:y.template(Xe),apiRequestOptions:y.template(Ke),apiResult:y.template(Ye),request:y.template($n),cancelablePromise:y.template(En),httpStatusCode:y.template(en)}};return y.registerPartial("exportEnum",y.template(Qn)),y.registerPartial("exportInterface",y.template(zn)),y.registerPartial("exportComposition",y.template(Wn)),y.registerPartial("exportType",y.template(Jn)),y.registerPartial("header",y.template(Zn)),y.registerPartial("isNullable",y.template(Gn)),y.registerPartial("isReadOnly",y.template(Xn)),y.registerPartial("isRequired",y.template(Kn)),y.registerPartial("parameters",y.template(Yn)),y.registerPartial("parametersDefinition",y.template(et)),y.registerPartial("parameterValues",y.template(nt)),y.registerPartial("result",y.template(tt)),y.registerPartial("serviceOption",y.template(pt)),y.registerPartial("schema",y.template(rt)),y.registerPartial("schemaArray",y.template(at)),y.registerPartial("schemaDictionary",y.template(lt)),y.registerPartial("schemaEnum",y.template(st)),y.registerPartial("schemaGeneric",y.template(it)),y.registerPartial("schemaInterface",y.template(ut)),y.registerPartial("schemaComposition",y.template(ot)),y.registerPartial("type",y.template(ct)),y.registerPartial("typeArray",y.template(mt)),y.registerPartial("typeDictionary",y.template(dt)),y.registerPartial("typeEnum",y.template(ft)),y.registerPartial("typeGeneric",y.template(ht)),y.registerPartial("typeInterface",y.template(yt)),y.registerPartial("typeReference",y.template(gt)),y.registerPartial("typeUnion",y.template(bt)),y.registerPartial("typeIntersection",y.template(vt)),y.registerPartial("base",y.template(Vn)),y.registerPartial("functions/catchErrors",y.template(fn)),y.registerPartial("functions/getFormData",y.template(hn)),y.registerPartial("functions/getQueryString",y.template(yn)),y.registerPartial("functions/getUrl",y.template(vn)),y.registerPartial("functions/isBinary",y.template(gn)),y.registerPartial("functions/isBlob",y.template(bn)),y.registerPartial("functions/isDefined",y.template(Pn)),y.registerPartial("functions/isString",y.template(On)),y.registerPartial("functions/isStringWithValue",y.template(xn)),y.registerPartial("functions/isSuccess",y.template(Rn)),y.registerPartial("functions/resolve",y.template(kn)),y.registerPartial("fetch/getHeaders",y.template(sn)),y.registerPartial("fetch/getRequestBody",y.template(un)),y.registerPartial("fetch/getResponseBody",y.template(pn)),y.registerPartial("fetch/getResponseHeader",y.template(cn)),y.registerPartial("fetch/sendRequest",y.template(dn)),y.registerPartial("fetch/request",y.template(mn)),y.registerPartial("xhr/getHeaders",y.template(Hn)),y.registerPartial("xhr/getRequestBody",y.template(Dn)),y.registerPartial("xhr/getResponseBody",y.template(In)),y.registerPartial("xhr/getResponseHeader",y.template(Nn)),y.registerPartial("xhr/sendRequest",y.template(Bn)),y.registerPartial("xhr/request",y.template(_n)),y.registerPartial("node/getHeaders",y.template(wn)),y.registerPartial("node/getRequestBody",y.template(Cn)),y.registerPartial("node/getResponseBody",y.template(qn)),y.registerPartial("node/getResponseHeader",y.template(Tn)),y.registerPartial("node/sendRequest",y.template(jn)),y.registerPartial("node/request",y.template(An)),y.registerPartial("axios/getHeaders",y.template(nn)),y.registerPartial("axios/getRequestBody",y.template(tn)),y.registerPartial("axios/getResponseBody",y.template(rn)),y.registerPartial("axios/getResponseHeader",y.template(an)),y.registerPartial("axios/sendRequest",y.template(ln)),y.registerPartial("axios/request",y.template(on)),n}function Ot(e,n){let t="",r=n;if(r.startsWith("../")){const e=r.split(c.default.sep).filter(Boolean);for(;".."===e[0];)e.shift();r=e.join(c.default.sep)}return c.default.resolve(e,r).startsWith(e)&&(t=r),t}function xt(n,t){return e.relative(t,n).startsWith("..")}async function Rt(n){const{templates:t,outputPath:r,core:a,models:o,schemas:l,services:s}=n;await Ne(e.resolve(r,"index.ts"),t.index({core:a,models:o,schemas:l,services:s}))}function kt(e){let t=0,r=e.split(n.EOL);return r=r.map((e=>{e=e.trim().replace(/^\*/g," *");let n=t;(e.endsWith("(")||e.endsWith("{")||e.endsWith("["))&&t++,(e.startsWith(")")||e.startsWith("}")||e.startsWith("]"))&&n&&(t--,n--);const r=`${" ".repeat(n)}${e}`;return""===r.trim()?"":r})),r.join(n.EOL)}function wt(e,n,t){const r=c.default.normalize(n);if(!r.startsWith(".."))return r;return function(e,n){const t=e.split("/"),r=n.split("/");let a=0;for(;a<t.length&&a<r.length&&t[a]===r[a];)a++;const o="../".repeat(t.length-a-1),l=r.slice(a).join("/");return o+l}(R(e,t),R(e,Ot(e,r)))}function Ct(e,n){var t;return null===(t=null==e?void 0:e.imports)||void 0===t?void 0:t.map((t=>Object.assign(Object.assign({},t),{path:wt(n,t.path,null==e?void 0:e.path)})))}function qt(e,n){return Ot(n,null==e?void 0:e.path)}function Tt(e,n){const t=Object.assign(Object.assign({},e),{path:qt(e,n)});return Object.assign(Object.assign({},t),{imports:Ct(t,n)})}function At(e,n){return e.name>n.name?1:e.name<n.name?-1:0}function jt(e){let n,t=1;for(const r of e)n&&r.name===n.name?(r.alias=`${r.name}$${t}`,n.alias||(n.alias=`${n.name}$${t-1}`),t++):n&&r.name!==n.name&&(t=1),n=r}class St{constructor(){this.options=new Map}async writeClient(n){const{client:t,templates:a,output:o,httpClient:l,useOptions:s,useUnionTypes:i,exportCore:u,exportServices:p,exportModels:c,exportSchemas:m,request:d,useCancelableRequest:f=!1}=n,h=R(process.cwd(),o.output),y=o.outputCore?R(process.cwd(),o.outputCore):R(h,"core"),v=o.outputModels?R(process.cwd(),o.outputModels):R(h,"models"),g=o.outputSchemas?R(process.cwd(),o.outputSchemas):R(h,"schemas"),b=o.outputServices?R(process.cwd(),o.outputServices):R(h,"services");if(!xt(process.cwd(),o.output))throw new Error("Output folder is not a subdirectory of the current working directory");if(o.outputCore&&!xt(process.cwd(),o.outputCore))throw new Error("Output folder(core) is not a subdirectory of the current working directory");if(o.outputSchemas&&!xt(process.cwd(),o.outputSchemas))throw new Error("Output folder(schemas) is not a subdirectory of the current working directory");if(o.outputModels&&!xt(process.cwd(),o.outputModels))throw new Error("Output folder(models) is not a subdirectory of the current working directory");if(o.outputServices&&!xt(process.cwd(),o.outputServices))throw new Error("Output folder(services) is not a subdirectory of the current working directory");u&&(await Me(y),await async function(n){const{client:t,templates:r,outputPath:a,httpClient:o,request:l,useCancelableRequest:s}=n,i={httpClient:o,server:t.server,version:t.version,useCancelableRequest:s};if(await Ne(e.resolve(a,"OpenAPI.ts"),r.core.settings(i)),await Ne(e.resolve(a,"ApiError.ts"),r.core.apiError({})),await Ne(e.resolve(a,"ApiRequestOptions.ts"),r.core.apiRequestOptions({})),await Ne(e.resolve(a,"ApiResult.ts"),r.core.apiResult({})),s&&await Ne(e.resolve(a,"CancelablePromise.ts"),r.core.cancelablePromise({})),await Ne(e.resolve(a,"HttpStatusCode.ts"),r.core.httpStatusCode({})),await Ne(e.resolve(a,"request.ts"),r.core.request(i)),l){const n=e.resolve(process.cwd(),l);if(!await Be(n))throw new Error(`Custom request file "${n}" does not exists`);await _e(n,e.resolve(a,"request.ts"))}}({client:t,templates:a,outputPath:y,httpClient:l,request:d,useCancelableRequest:f})),p&&(await Me(b),await async function(n){const{services:t,templates:r,outputPath:a,httpClient:o,useUnionTypes:l,useOptions:s,outputCore:i,outputModels:u,useCancelableRequest:p}=n;for(const n of t){const t=e.resolve(a,`${n.name}.ts`),c=n.operations.some((e=>e.path.includes("OpenAPI.VERSION"))),m=r.exports.service(Object.assign(Object.assign({},n),{httpClient:o,useUnionTypes:l,useVersion:c,useOptions:s,outputCore:i,outputModels:u,useCancelableRequest:p}));await Ne(t,kt(m))}}({services:t.services,templates:a,outputPath:b,httpClient:l,useUnionTypes:i,useOptions:s,outputModels:c?`${x(b,v)}`:"../models/",outputCore:u?`${x(b,y)}`:"../core/",useCancelableRequest:f})),m&&(await Me(g),await async function(e){const{models:n,templates:t,outputPath:a,httpClient:o,useUnionTypes:l}=e;for(const e of n){const n=Tt(e,a),s=null==n?void 0:n.path,i=P(s);if(i){const e=R(a,i);r.mkdirSync(e,{recursive:!0})}const u=R(a,`${s}Schema.ts`),p=t.exports.schema(Object.assign(Object.assign({},n),{httpClient:o,useUnionTypes:l}));await Ne(u,kt(p))}}({models:t.models,templates:a,outputPath:g,httpClient:l,useUnionTypes:i})),c&&(await Me(v),await async function(e){const{models:n,templates:t,outputPath:a,httpClient:o,useUnionTypes:l}=e;for(const e of n){const n=Tt(e,a),s=null==n?void 0:n.path;if(!s)return;const i=P(s);if(i){const e=R(a,i);r.mkdirSync(e,{recursive:!0})}const u=R(a,`${s}.ts`),p=t.exports.model(Object.assign(Object.assign({},n),{httpClient:o,useUnionTypes:l}));await Ne(u,kt(p))}}({models:t.models,templates:a,outputPath:v,httpClient:l,useUnionTypes:i})),(u||p||m||c)&&(await Me(h),await this.writeClientIndex({client:t,templates:a,output:{output:h,outputCore:y,outputServices:b,outputModels:v,outputSchemas:g},useUnionTypes:i,exportCore:u,exportServices:p,exportModels:c,exportSchemas:m}))}async writeClientIndex(e){const{output:n}=e,t=this.options.get(n.output);t?t.push(e):this.options.set(n.output,Array.of(e))}async combineAndWrite(){const e=new Map;for(const[n,t]of this.options.entries())for(const r of t){const{exportCore:t,output:a,exportModels:o,exportSchemas:l,exportServices:s,client:i,templates:u}=r,p=a.outputCore?R(process.cwd(),a.outputCore):R(n,"core"),c=a.outputModels?R(process.cwd(),a.outputModels):R(n,"models"),m=a.outputSchemas?R(process.cwd(),a.outputSchemas):R(n,"schemas"),d=a.outputServices?R(process.cwd(),a.outputServices):R(n,"services");let f=e.get(`${n}`);if(f||(f={templates:u,outputPath:n,core:[],models:[],schemas:[],services:[]},e.set(`${n}`,f)),t){const e=`${x(n,p)}`,t=f.core.find((n=>n===e));t||f.core.push(e)}if(o||l){const e=`${x(n,c)}`,t=`${x(n,m)}`;for(const n of i.models){const a={name:n.name,alias:"",path:n.path,package:e,enum:n.enum&&n.enum.length>0,useUnionTypes:r.useUnionTypes,enums:n.enums&&n.enums.length>0};if(o){const e=f.models.find((e=>e.name===a.name&&e.path===a.path&&e.package===a.package&&e.enum===a.enum&&e.enums===a.enums&&e.useUnionTypes===a.useUnionTypes));e||f.models.push(a)}if(l){const e=Object.assign(Object.assign({},a),{package:t}),n=f.schemas.find((n=>n.name===e.name&&n.path===e.path&&n.package===e.package));n||f.schemas.push(e)}}}if(s){const e=`${x(n,d)}`;for(const n of i.services){const t=f.services.find((t=>t.name===n.name&&t.package===e));t||f.services.push({name:n.name,package:e})}}}for(const n of e.values())n.models=n.models.filter(W).sort(At).map((e=>Object.assign(Object.assign({},e),{path:Ot(R(n.outputPath,"models"),null==e?void 0:e.path)}))),jt(n.models),n.schemas=n.schemas.filter(W).sort(At).map((e=>Object.assign(Object.assign({},e),{path:Ot(R(n.outputPath,"schemas"),null==e?void 0:e.path)}))),jt(n.schemas),await Rt(n)}}async function Et({input:e,output:n,outputCore:t,outputServices:r,outputModels:a,outputSchemas:o,httpClient:l=exports.HttpClient.FETCH,useOptions:s=!1,useUnionTypes:i=!1,exportCore:u=!0,exportServices:p=!0,exportModels:c=!0,exportSchemas:m=!1,clean:d=!0,request:f,write:y=!0,interfacePrefix:v="I",enumPrefix:b="E",typePrefix:O="T",useCancelableRequest:x=!1},w){const C={output:n,outputCore:t,outputServices:r,outputModels:a,outputSchemas:o},q=new k(e,C,{interface:v,enum:b,type:O}),T=g(e)?await async function(e,n){const t=R(process.cwd(),n);if(!n)throw new Error(`Could not find OpenApi spec: "${t}"`);if(!await Be(t))throw new Error(`Could not read OpenApi spec: "${t}"`);const r=new h.default;e.addRefs(await r.resolve(n));const a=Object.assign({},r.schema);let o={};for(const n of Object.entries(a.paths)){const t=n[0],r=n[1];if(r.$ref){let n=e.get(r.$ref);n=Le(n,e,P(r.$ref)),o=Object.assign(o,{[t]:n})}else Object.assign(o,{[t]:r})}return r.schema=Object.assign(r.schema,{paths:o}),new Promise((e=>e(r.schema)))}(q,e):e,A=function(e){const n=e.swagger||e.openapi;if("string"==typeof n){const e=n.charAt(0),t=Number.parseInt(e);if(t===Fe.V2||t===Fe.V3)return t}throw new Error(`Unsupported Open API version: "${String(n)}"`)}(T),j=Pt({httpClient:l,useUnionTypes:i,useOptions:s});switch(A){case Fe.V2:{const e=Ge(new se(q).parse(T));if(!y)break;await w.writeClient({client:e,templates:j,output:C,httpClient:l,useOptions:s,useUnionTypes:i,exportCore:u,exportServices:p,exportModels:c,exportSchemas:m,clean:d,request:f,useCancelableRequest:x});break}case Fe.V3:{const e=Ge(new Ie(q).parse(T));if(!y)break;await w.writeClient({client:e,templates:j,output:C,httpClient:l,useOptions:s,useUnionTypes:i,exportCore:u,exportServices:p,exportModels:c,exportSchemas:m,clean:d,request:f,useCancelableRequest:x});break}}}exports.generate=async function(e){const n=Array.isArray(e)?e:Array.of(e);for(const e of n)e.output&&await Ue(e.output),e.outputCore&&await Ue(e.outputCore),e.outputSchemas&&await Ue(e.outputSchemas),e.outputModels&&await Ue(e.outputModels),e.outputServices&&await Ue(e.outputServices);const t=new St;for(const e of n)await Et(e,t);await t.combineAndWrite()};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ts-openapi-codegen",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1-beta.0",
|
|
4
4
|
"description": "Library that generates Typescript clients based on the OpenAPI specification. It bases on openapi-typescript-codegen",
|
|
5
5
|
"author": "Alexey Zverev",
|
|
6
6
|
"homepage": "https://github.com/ozonophore/openapi-codegen.git",
|