UNPKG

@api-helper/core

Version:

根据 Swagger 的接口定义生成 TypeScript/JavaScript 的接口类型及其请求函数代码。

13 lines 286 kB
/*! * @api-helper/core v3.4.2 * (c) 2023-present ztz2 * Released under the MIT License. */ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.apihCore=e():t.apihCore=e()}(self,(function(){return function(){var t={6230:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const a=u(r(2245)),c=u(r(8009)),s=i(r(2710));function l(t,e,r,n,o,i,u,s){const p=null===e?t:t[e];if(p&&"object"==typeof p&&!ArrayBuffer.isView(p))if(a.default.isAllowed$Ref(p))f(t,e,r,n,o,i,u,s);else{const t=Object.keys(p).sort(((t,e)=>"definitions"===t?-1:"definitions"===e?1:t.length-e.length));for(const e of t){const t=c.default.join(r,e),h=c.default.join(n,e),d=p[e];a.default.isAllowed$Ref(d)?f(p,e,r,h,o,i,u,s):l(p,e,t,h,o,i,u,s)}}}function f(t,e,r,n,o,i,u,f){const p=null===e?t:t[e],h=s.resolve(r,p.$ref),d=u._resolve(h,n,f);if(null===d)return;const y=c.default.parse(n).length,v=s.stripHash(d.path),g=s.getHash(d.path),m=v!==u._root$Ref.path,b=a.default.isExtended$Ref(p);o+=d.indirections;const _=function(t,e,r){for(const n of t)if(n&&n.parent===e&&n.key===r)return n;return}(i,t,e);if(_){if(!(y<_.depth||o<_.indirections))return;!function(t,e){const r=t.indexOf(e);t.splice(r,1)}(i,_)}i.push({$ref:p,parent:t,key:e,pathFromRoot:n,depth:y,file:v,hash:g,value:d.value,circular:d.circular,extended:b,external:m,indirections:o}),_&&!m||l(d.value,null,d.path,n,o+1,i,u,f)}e.default=function(t,e){const r=[];l(t,"schema",t.$refs._root$Ref.path+"#","#",0,r,t.$refs,e),function(t){let e,r,n;t.sort(((t,e)=>{if(t.file!==e.file)return t.file<e.file?-1:1;if(t.hash!==e.hash)return t.hash<e.hash?-1:1;if(t.circular!==e.circular)return t.circular?-1:1;if(t.extended!==e.extended)return t.extended?1:-1;if(t.indirections!==e.indirections)return t.indirections-e.indirections;if(t.depth!==e.depth)return t.depth-e.depth;{const r=t.pathFromRoot.lastIndexOf("/definitions"),n=e.pathFromRoot.lastIndexOf("/definitions");return r!==n?n-r:t.pathFromRoot.length-e.pathFromRoot.length}}));for(const o of t)o.external?o.file===e&&o.hash===r?o.$ref.$ref=n:o.file===e&&0===o.hash.indexOf(r+"/")?o.$ref.$ref=c.default.join(n,c.default.parse(o.hash.replace(r,"#"))):(e=o.file,r=o.hash,n=o.pathFromRoot,o.$ref=o.parent[o.key]=a.default.dereference(o.$ref,o.value),o.circular&&(o.$ref.$ref=o.pathFromRoot)):o.$ref.$ref=o.hash}(r)}},410:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const a=u(r(2245)),c=u(r(8009)),s=r(3935),l=i(r(2710)),f=r(7099);function p(t,e,r,n,o,i,u,s,l){let y;const v={value:t,circular:!1};if(s&&s.timeoutMs&&Date.now()-l>s.timeoutMs)throw new f.TimeoutError(s.timeoutMs);const g=s.dereference||{},m=g.excludedPathMatcher||(()=>!1);if(("ignore"===g?.circular||!o.has(t))&&t&&"object"==typeof t&&!ArrayBuffer.isView(t)&&!m(r)){if(n.add(t),o.add(t),a.default.isAllowed$Ref(t,s))y=h(t,e,r,n,o,i,u,s,l),v.circular=y.circular,v.value=y.value;else for(const f of Object.keys(t)){const b=c.default.join(e,f),_=c.default.join(r,f);if(m(_))continue;const w=t[f];let x=!1;a.default.isAllowed$Ref(w,s)?(y=h(w,b,_,n,o,i,u,s,l),x=y.circular,t[f]!==y.value&&(t[f]=y.value,g?.onDereference?.(w.$ref,t[f],t,f))):n.has(w)?x=d(b,u,s):(y=p(w,b,_,n,o,i,u,s,l),x=y.circular,t[f]!==y.value&&(t[f]=y.value)),v.circular=v.circular||x}n.delete(t)}return v}function h(t,e,r,n,o,i,u,c,s){const f=a.default.isExternal$Ref(t)&&"root"===c?.dereference?.externalReferenceResolution,h=l.resolve(f?l.cwd():e,t.$ref),y=i.get(h);if(y&&!y.circular){const e=Object.keys(t);if(e.length>1){const r={};for(const n of e)"$ref"===n||n in y.value||(r[n]=t[n]);return{circular:y.circular,value:Object.assign({},y.value,r)}}return y}const v=u._resolve(h,e,c);if(null===v)return{circular:!1,value:null};const g=v.circular;let m=g||n.has(v.value);m&&d(e,u,c);let b=a.default.dereference(t,v.value);if(!m){const t=p(b,v.path,r,n,o,i,u,c,s);m=t.circular,b=t.value}m&&!g&&"ignore"===c.dereference?.circular&&(b=t),g&&(b.$ref=r);const _={circular:m,value:b};return 1===Object.keys(t).length&&i.set(h,_),_}function d(t,e,r){if(e.circular=!0,!r.dereference.circular)throw s.ono.reference(`Circular $ref pointer found at ${t}`);return!0}e.default=function(t,e){const r=Date.now(),n=p(t.schema,t.$refs._root$Ref.path,"#",new Set,new Set,new Map,t.$refs,e,r);t.$refs.circular=n.circular,t.schema=n.value}},9902:function(t,e,r){"use strict";var n=r(5313).lW,o=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),u=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&o(e,t,r);return i(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.getJsonSchemaRefParserDefaultOptions=e.jsonSchemaParserNormalizeArgs=e.dereferenceInternal=e.JSONParserErrorGroup=e.isHandledError=e.UnmatchedParserError=e.ParserError=e.ResolverError=e.MissingPointerError=e.InvalidPointerError=e.JSONParserError=e.UnmatchedResolverError=e.dereference=e.bundle=e.resolve=e.parse=e.$RefParser=void 0;const c=a(r(1683)),s=a(r(5455)),l=a(r(7259));e.jsonSchemaParserNormalizeArgs=l.default;const f=a(r(7941)),p=a(r(6230)),h=a(r(410));e.dereferenceInternal=h.default;const d=u(r(2710)),y=r(7099);Object.defineProperty(e,"JSONParserError",{enumerable:!0,get:function(){return y.JSONParserError}}),Object.defineProperty(e,"InvalidPointerError",{enumerable:!0,get:function(){return y.InvalidPointerError}}),Object.defineProperty(e,"MissingPointerError",{enumerable:!0,get:function(){return y.MissingPointerError}}),Object.defineProperty(e,"ResolverError",{enumerable:!0,get:function(){return y.ResolverError}}),Object.defineProperty(e,"ParserError",{enumerable:!0,get:function(){return y.ParserError}}),Object.defineProperty(e,"UnmatchedParserError",{enumerable:!0,get:function(){return y.UnmatchedParserError}}),Object.defineProperty(e,"UnmatchedResolverError",{enumerable:!0,get:function(){return y.UnmatchedResolverError}}),Object.defineProperty(e,"isHandledError",{enumerable:!0,get:function(){return y.isHandledError}}),Object.defineProperty(e,"JSONParserErrorGroup",{enumerable:!0,get:function(){return y.JSONParserErrorGroup}});const v=r(3935),g=a(r(7344)),m=r(4617);Object.defineProperty(e,"getJsonSchemaRefParserDefaultOptions",{enumerable:!0,get:function(){return m.getJsonSchemaRefParserDefaultOptions}});class b{constructor(){this.schema=null,this.$refs=new c.default}async parse(){const t=(0,l.default)(arguments);let e;if(!t.path&&!t.schema){const e=(0,v.ono)(`Expected a file path, URL, or object. Got ${t.path||t.schema}`);return(0,g.default)(t.callback,Promise.reject(e))}this.schema=null,this.$refs=new c.default;let r="http";if(d.isFileSystemPath(t.path))t.path=d.fromFileSystemPath(t.path),r="file";else if(!t.path&&t.schema&&"$id"in t.schema&&t.schema.$id){const e=d.parse(t.schema.$id),r="https:"===e.protocol?443:80;t.path=`${e.protocol}//${e.hostname}:${r}`}if(t.path=d.resolve(d.cwd(),t.path),t.schema&&"object"==typeof t.schema){const n=this.$refs._add(t.path);n.value=t.schema,n.pathType=r,e=Promise.resolve(t.schema)}else e=(0,s.default)(t.path,this.$refs,t.options);try{const r=await e;if(null===r||"object"!=typeof r||n.isBuffer(r)){if(t.options.continueOnError)return this.schema=null,(0,g.default)(t.callback,Promise.resolve(this.schema));throw v.ono.syntax(`"${this.$refs._root$Ref.path||r}" is not a valid JSON Schema`)}return this.schema=r,(0,g.default)(t.callback,Promise.resolve(this.schema))}catch(e){return t.options.continueOnError&&(0,y.isHandledError)(e)?(this.$refs._$refs[d.stripHash(t.path)]&&this.$refs._$refs[d.stripHash(t.path)].addError(e),(0,g.default)(t.callback,Promise.resolve(null))):(0,g.default)(t.callback,Promise.reject(e))}}static parse(){const t=new b;return t.parse.apply(t,arguments)}async resolve(){const t=(0,l.default)(arguments);try{return await this.parse(t.path,t.schema,t.options),await(0,f.default)(this,t.options),_(this),(0,g.default)(t.callback,Promise.resolve(this.$refs))}catch(e){return(0,g.default)(t.callback,Promise.reject(e))}}static resolve(){const t=new b;return t.resolve.apply(t,arguments)}static bundle(){const t=new b;return t.bundle.apply(t,arguments)}async bundle(){const t=(0,l.default)(arguments);try{return await this.resolve(t.path,t.schema,t.options),(0,p.default)(this,t.options),_(this),(0,g.default)(t.callback,Promise.resolve(this.schema))}catch(e){return(0,g.default)(t.callback,Promise.reject(e))}}static dereference(){const t=new b;return t.dereference.apply(t,arguments)}async dereference(){const t=(0,l.default)(arguments);try{return await this.resolve(t.path,t.schema,t.options),(0,h.default)(this,t.options),_(this),(0,g.default)(t.callback,Promise.resolve(this.schema))}catch(e){return(0,g.default)(t.callback,Promise.reject(e))}}}function _(t){if(y.JSONParserErrorGroup.getParserErrors(t).length>0)throw new y.JSONParserErrorGroup(t)}e.$RefParser=b,e.default=b,e.parse=b.parse,e.resolve=b.resolve,e.bundle=b.bundle,e.dereference=b.dereference},7259:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.normalizeArgs=o;const n=r(4617);function o(t){let e,r,o,i;const u=Array.prototype.slice.call(t);"function"==typeof u[u.length-1]&&(i=u.pop()),"string"==typeof u[0]?(e=u[0],"object"==typeof u[2]?(r=u[1],o=u[2]):(r=void 0,o=u[1])):(e="",r=u[0],o=u[1]);try{o=(0,n.getNewOptions)(o)}catch(t){console.error(`JSON Schema Ref Parser: Error normalizing options: ${t}`)}return o.mutateInputSchema||"object"!=typeof r||(r=JSON.parse(JSON.stringify(r))),{path:e,schema:r,options:o,callback:i}}e.default=o},4617:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.getNewOptions=e.getJsonSchemaRefParserDefaultOptions=void 0;const o=n(r(3484)),i=n(r(4920)),u=n(r(1901)),a=n(r(6252)),c=n(r(9238)),s=n(r(9253));e.getJsonSchemaRefParserDefaultOptions=()=>({parse:{json:{...o.default},yaml:{...i.default},text:{...u.default},binary:{...a.default}},resolve:{file:{...c.default},http:{...s.default},external:!0},continueOnError:!1,dereference:{circular:!0,excludedPathMatcher:()=>!1,referenceResolution:"relative"},mutateInputSchema:!0});function l(t,e){if(f(e)){const r=Object.keys(e).filter((t=>!["__proto__","constructor","prototype"].includes(t)));for(let n=0;n<r.length;n++){const o=r[n],i=e[o],u=t[o];f(i)?t[o]=l(u||{},i):void 0!==i&&(t[o]=i)}}return t}function f(t){return t&&"object"==typeof t&&!Array.isArray(t)&&!(t instanceof RegExp)&&!(t instanceof Date)}e.getNewOptions=t=>{const r=(0,e.getJsonSchemaRefParserDefaultOptions)();return t&&l(r,t),r}},5455:function(t,e,r){"use strict";var n=r(5313).lW,o=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),u=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&o(e,t,r);return i(e,t),e};Object.defineProperty(e,"__esModule",{value:!0});const a=r(3935),c=u(r(2710)),s=u(r(2767)),l=r(7099);e.default=async function(t,e,r){const o=t.indexOf("#");let i="";o>=0&&(i=t.substring(o),t=t.substring(0,o));const u=e._add(t),f={url:t,hash:i,extension:c.getExtension(t)};try{const t=await async function(t,e,r){let n=s.all(e.resolve);n=s.filter(n,"canRead",t),s.sort(n);try{return await s.run(n,"read",t,r)}catch(r){throw!r&&e.continueOnError?new l.UnmatchedResolverError(t.url):r&&"error"in r?r.error instanceof l.ResolverError?r.error:new l.ResolverError(r,t.url):a.ono.syntax(`Unable to resolve $ref pointer "${t.url}"`)}}(f,r,e);u.pathType=t.plugin.name,f.data=t.result;const o=await async function(t,e,r){const o=s.all(e.parse),i=s.filter(o,"canParse",t),u=i.length>0?i:o;s.sort(u);try{const e=await s.run(u,"parse",t,r);if(!e.plugin.allowEmpty&&(void 0===(c=e.result)||"object"==typeof c&&0===Object.keys(c).length||"string"==typeof c&&0===c.trim().length||n.isBuffer(c)&&0===c.length))throw a.ono.syntax(`Error parsing "${t.url}" as ${e.plugin.name}. \nParsed value is empty`);return e}catch(r){throw!r&&e.continueOnError?new l.UnmatchedParserError(t.url):r&&r.message&&r.message.startsWith("Error parsing")?r:r&&"error"in r?r.error instanceof l.ParserError?r.error:new l.ParserError(r.error.message,t.url):a.ono.syntax(`Unable to parse ${t.url}`)}var c}(f,r,e);return u.value=o.result,o.result}catch(t){throw(0,l.isHandledError)(t)&&(u.value=t),t}}},6252:function(t,e,r){"use strict";var n=r(5313).lW;Object.defineProperty(e,"__esModule",{value:!0});const o=/\.(jpeg|jpg|gif|png|bmp|ico)$/i;e.default={order:400,allowEmpty:!0,canParse:t=>n.isBuffer(t.data)&&o.test(t.url),parse:t=>n.isBuffer(t.data)?t.data:n.from(t.data)}},3484:function(t,e,r){"use strict";var n=r(5313).lW;Object.defineProperty(e,"__esModule",{value:!0});const o=r(7099);e.default={order:100,allowEmpty:!0,canParse:".json",allowBOM:!0,async parse(t){let e=t.data;if(n.isBuffer(e)&&(e=e.toString()),"string"!=typeof e)return e;if(0!==e.trim().length)try{return JSON.parse(e)}catch(r){if(this.allowBOM)try{const t=e.indexOf("{");return e=e.slice(t),JSON.parse(e)}catch(e){throw new o.ParserError(e.message,t.url)}throw new o.ParserError(r.message,t.url)}}}},1901:function(t,e,r){"use strict";var n=r(5313).lW;Object.defineProperty(e,"__esModule",{value:!0});const o=r(7099),i=/\.(txt|htm|html|md|xml|js|min|map|css|scss|less|svg)$/i;e.default={order:300,allowEmpty:!0,encoding:"utf8",canParse:t=>("string"==typeof t.data||n.isBuffer(t.data))&&i.test(t.url),parse(t){if("string"==typeof t.data)return t.data;if(n.isBuffer(t.data))return t.data.toString(this.encoding);throw new o.ParserError("data is not text",t.url)}}},4920:function(t,e,r){"use strict";var n=r(5313).lW,o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const i=r(7099),u=o(r(97)),a=r(97);e.default={order:200,allowEmpty:!0,canParse:[".yaml",".yml",".json"],async parse(t){let e=t.data;if(n.isBuffer(e)&&(e=e.toString()),"string"!=typeof e)return e;try{return u.default.load(e,{schema:a.JSON_SCHEMA})}catch(e){throw new i.ParserError(e?.message||"Parser Error",t.url)}}}},8009:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const a=u(r(2245)),c=i(r(2710)),s=r(7099),l=/\//g,f=/~/g,p=/~1/g,h=/~0/g,d=t=>{try{return decodeURIComponent(t)}catch{return t}};class y{constructor(t,e,r){this.$ref=t,this.path=e,this.originalPath=r||e,this.value=void 0,this.circular=!1,this.indirections=0}resolve(t,e,r){const n=y.parse(this.path,this.originalPath);this.value=m(t);for(let t=0;t<n.length;t++){if(v(this,e,r)&&(this.path=y.join(this.path,n.slice(t))),"object"==typeof this.value&&null!==this.value&&!b(r)&&"$ref"in this.value)return this;const o=n[t];if(void 0===this.value[o]||null===this.value[o]&&t===n.length-1){let e=!1;for(let r=n.length-1;r>t;r--){const o=n.slice(t,r+1).join("/");if(void 0!==this.value[o]){this.value=this.value[o],t=r,e=!0;break}}if(e)continue;throw this.value=null,new s.MissingPointerError(o,decodeURI(this.originalPath))}this.value=this.value[o]}return(!this.value||this.value.$ref&&c.resolve(this.path,this.value.$ref)!==r)&&v(this,e,r),this}set(t,e,r){const n=y.parse(this.path);let o;if(0===n.length)return this.value=e,e;this.value=m(t);for(let t=0;t<n.length-1;t++)v(this,r),o=n[t],this.value&&void 0!==this.value[o]?this.value=this.value[o]:this.value=g(this,o,{});return v(this,r),o=n[n.length-1],g(this,o,e),t}static parse(t,e){const r=c.getHash(t).substring(1);if(!r)return[];const n=r.split("/");for(let t=0;t<n.length;t++)n[t]=d(n[t].replace(p,"/").replace(h,"~"));if(""!==n[0])throw new s.InvalidPointerError(n,void 0===e?t:e);return n.slice(1)}static join(t,e){-1===t.indexOf("#")&&(t+="#"),e=Array.isArray(e)?e:[e];for(let r=0;r<e.length;r++){const n=e[r];t+="/"+encodeURIComponent(n.replace(f,"~0").replace(l,"~1"))}return t}}function v(t,e,r){if(a.default.isAllowed$Ref(t.value,e)){const n=c.resolve(t.path,t.value.$ref);if(n!==t.path||b(r)){const r=t.$ref.$refs._resolve(n,t.path,e);return null!==r&&(t.indirections+=r.indirections+1,a.default.isExtended$Ref(t.value)?(t.value=a.default.dereference(t.value,r.value),!1):(t.$ref=r.$ref,t.path=r.path,t.value=r.value,!0))}t.circular=!0}}function g(t,e,r){if(!t.value||"object"!=typeof t.value)throw new s.JSONParserError(`Error assigning $ref pointer "${t.path}". \nCannot set "${e}" of a non-object.`);return"-"===e&&Array.isArray(t.value)?t.value.push(r):t.value[e]=r,r}function m(t){if((0,s.isHandledError)(t))throw t;return t}function b(t){return"string"==typeof t&&0==y.parse(t).length}e.default=y},2245:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const o=n(r(8009)),i=r(7099),u=r(2710);class a{constructor(t){this.errors=[],this.$refs=t}addError(t){void 0===this.errors&&(this.errors=[]);const e=this.errors.map((({footprint:t})=>t));"errors"in t&&Array.isArray(t.errors)?this.errors.push(...t.errors.map(i.normalizeError).filter((({footprint:t})=>!e.includes(t)))):"footprint"in t&&e.includes(t.footprint)||this.errors.push((0,i.normalizeError)(t))}exists(t,e){try{return this.resolve(t,e),!0}catch{return!1}}get(t,e){return this.resolve(t,e)?.value}resolve(t,e,r,n){const a=new o.default(this,t,r);try{return a.resolve(this.value,e,n)}catch(t){if(!e||!e.continueOnError||!(0,i.isHandledError)(t))throw t;return null===t.path&&(t.path=(0,u.safePointerToPath)((0,u.getHash)(n))),t instanceof i.InvalidPointerError&&(t.source=decodeURI((0,u.stripHash)(n))),this.addError(t),null}}set(t,e){const r=new o.default(this,t);this.value=r.set(this.value,e)}static is$Ref(t){return Boolean(t)&&"object"==typeof t&&null!==t&&"$ref"in t&&"string"==typeof t.$ref&&t.$ref.length>0}static isExternal$Ref(t){return a.is$Ref(t)&&"#"!==t.$ref[0]}static isAllowed$Ref(t,e){if(this.is$Ref(t)){if("#/"===t.$ref.substring(0,2)||"#"===t.$ref)return!0;if("#"!==t.$ref[0]&&(!e||e.resolve?.external))return!0}}static isExtended$Ref(t){return a.is$Ref(t)&&Object.keys(t).length>1}static dereference(t,e){if(e&&"object"==typeof e&&a.isExtended$Ref(t)){const r={};for(const e of Object.keys(t))"$ref"!==e&&(r[e]=t[e]);for(const t of Object.keys(e))t in r||(r[t]=e[t]);return r}return e}}e.default=a},1683:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const a=r(3935),c=u(r(2245)),s=i(r(2710)),l=u(r(5699));function f(t,e){let r=Object.keys(t);return(e=Array.isArray(e[0])?e[0]:Array.prototype.slice.call(e)).length>0&&e[0]&&(r=r.filter((r=>e.includes(t[r].pathType)))),r.map((e=>({encoded:e,decoded:"file"===t[e].pathType?s.toFileSystemPath(e,!0):e})))}e.default=class{paths(...t){return f(this._$refs,t.flat()).map((t=>(0,l.default)(t.decoded)))}values(...t){const e=this._$refs;return f(e,t.flat()).reduce(((t,r)=>(t[(0,l.default)(r.decoded)]=e[r.encoded].value,t)),{})}exists(t,e){try{return this._resolve(t,"",e),!0}catch{return!1}}get(t,e){return this._resolve(t,"",e).value}set(t,e){const r=s.resolve(this._root$Ref.path,t),n=s.stripHash(r),o=this._$refs[n];if(!o)throw(0,a.ono)(`Error resolving $ref pointer "${t}". \n"${n}" not found.`);o.set(r,e)}_get$Ref(t){t=s.resolve(this._root$Ref.path,t);const e=s.stripHash(t);return this._$refs[e]}_add(t){const e=s.stripHash(t),r=new c.default(this);return r.path=e,this._$refs[e]=r,this._root$Ref=this._root$Ref||r,r}_resolve(t,e,r){const n=s.resolve(this._root$Ref.path,t),o=s.stripHash(n),i=this._$refs[o];if(!i)throw(0,a.ono)(`Error resolving $ref pointer "${t}". \n"${o}" not found.`);return i.resolve(n,r,t,e)}constructor(){this._$refs={},this.toJSON=this.values,this.circular=!1,this._$refs={},this._root$Ref=null}}},7941:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const a=u(r(2245)),c=u(r(8009)),s=u(r(5455)),l=i(r(2710)),f=r(7099);function p(t,e,r,n,o,i){o||(o=new Set);let u=[];if(t&&"object"==typeof t&&!ArrayBuffer.isView(t)&&!o.has(t)){o.add(t),a.default.isExternal$Ref(t)&&u.push(async function(t,e,r,n){const o="root"===n.dereference?.externalReferenceResolution,i=l.resolve(o?l.cwd():e,t.$ref),u=l.stripHash(i),a=r._$refs[u];if(a)return Promise.resolve(a.value);try{const t=p(await(0,s.default)(i,r,n),u+"#",r,n,new Set,!0);return Promise.all(t)}catch(t){if(!n?.continueOnError||!(0,f.isHandledError)(t))throw t;return r._$refs[u]&&(t.source=decodeURI(l.stripHash(e)),t.path=l.safePointerToPath(l.getHash(e))),[]}}(t,e,r,n));const h=Object.keys(t);for(const a of h){const s=c.default.join(e,a),l=t[a];u=u.concat(p(l,s,r,n,o,i))}}return u}e.default=function(t,e){if(!e.resolve?.external)return Promise.resolve();try{const r=p(t.schema,t.$refs._root$Ref.path+"#",t.$refs,e);return Promise.all(r)}catch(t){return Promise.reject(t)}}},9238:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const a=u(r(4497)),c=r(3935),s=i(r(2710)),l=r(7099);e.default={order:100,canRead:t=>s.isFileSystemPath(t.url),async read(t){let e;try{e=s.toFileSystemPath(t.url)}catch(e){throw new l.ResolverError(c.ono.uri(e,`Malformed URI: ${t.url}`),t.url)}try{return await a.default.promises.readFile(e)}catch(t){throw new l.ResolverError((0,c.ono)(t,`Error opening file "${e}"`),e)}}}},9253:function(t,e,r){"use strict";var n=r(5313).lW,o=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),u=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&o(e,t,r);return i(e,t),e};Object.defineProperty(e,"__esModule",{value:!0});const a=r(3935),c=u(r(2710)),s=r(7099);async function l(t,e,r){t=c.parse(t);const o=r||[];o.push(t.href);try{const r=await async function(t,e){let r,n;e.timeout&&(r=new AbortController,n=setTimeout((()=>r.abort()),e.timeout));const o=await fetch(t,{method:"GET",headers:e.headers||{},credentials:e.withCredentials?"include":"same-origin",signal:r?r.signal:null});n&&clearTimeout(n);return o}(t,e);if(r.status>=400)throw(0,a.ono)({status:r.status},`HTTP ERROR ${r.status}`);if(r.status>=300){if(!Number.isNaN(e.redirects)&&o.length>e.redirects)throw new s.ResolverError((0,a.ono)({status:r.status},`Error downloading ${o[0]}. \nToo many redirects: \n ${o.join(" \n ")}`));if("location"in r.headers&&r.headers.location){return l(c.resolve(t.href,r.headers.location),e,o)}throw(0,a.ono)({status:r.status},`HTTP ${r.status} redirect with no location header`)}if(r.body){const t=await r.arrayBuffer();return n.from(t)}return n.alloc(0)}catch(e){throw new s.ResolverError((0,a.ono)(e,`Error downloading ${t.href}`),t.href)}}e.default={order:200,headers:null,timeout:6e4,redirects:5,withCredentials:!1,canRead:t=>c.isHttp(t.url),read(t){const e=c.parse(t.url);return"undefined"==typeof window||e.protocol||(e.protocol=c.parse(location.href).protocol),l(e,this)}}},5699:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if(t.startsWith("\\\\?\\"))return t;return t.split(o.default?.win32?.sep).join(o.default?.posix?.sep??"/")};const o=n(r(4203))},7099:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InvalidPointerError=e.TimeoutError=e.MissingPointerError=e.UnmatchedResolverError=e.ResolverError=e.UnmatchedParserError=e.ParserError=e.JSONParserErrorGroup=e.JSONParserError=void 0,e.isHandledError=function(t){return t instanceof i||t instanceof u},e.normalizeError=function(t){null===t.path&&(t.path=[]);return t};const n=r(3935),o=r(2710);class i extends Error{constructor(t,e){super(),this.code="EUNKNOWN",this.name="JSONParserError",this.message=t,this.source=e,this.path=null,n.Ono.extend(this)}get footprint(){return`${this.path}+${this.source}+${this.code}+${this.message}`}}e.JSONParserError=i;class u extends Error{constructor(t){super(),this.files=t,this.name="JSONParserErrorGroup",this.message=`${this.errors.length} error${this.errors.length>1?"s":""} occurred while reading '${(0,o.toFileSystemPath)(t.$refs._root$Ref.path)}'`,n.Ono.extend(this)}static getParserErrors(t){const e=[];for(const r of Object.values(t.$refs._$refs))r.errors&&e.push(...r.errors);return e}get errors(){return u.getParserErrors(this.files)}}e.JSONParserErrorGroup=u;e.ParserError=class extends i{constructor(t,e){super(`Error parsing ${e}: ${t}`,e),this.code="EPARSER",this.name="ParserError"}};e.UnmatchedParserError=class extends i{constructor(t){super(`Could not find parser for "${t}"`,t),this.code="EUNMATCHEDPARSER",this.name="UnmatchedParserError"}};e.ResolverError=class extends i{constructor(t,e){super(t.message||`Error reading file "${e}"`,e),this.code="ERESOLVER",this.name="ResolverError","code"in t&&(this.ioErrorCode=String(t.code))}};e.UnmatchedResolverError=class extends i{constructor(t){super(`Could not find resolver for "${t}"`,t),this.code="EUNMATCHEDRESOLVER",this.name="UnmatchedResolverError"}};e.MissingPointerError=class extends i{constructor(t,e){super(`Token "${t}" does not exist.`,(0,o.stripHash)(e)),this.code="EUNMATCHEDRESOLVER",this.name="MissingPointerError"}};e.TimeoutError=class extends i{constructor(t){super(`Dereferencing timeout reached: ${t}ms`),this.code="ETIMEOUT",this.name="TimeoutError"}};e.InvalidPointerError=class extends i{constructor(t,e){super(`Invalid $ref pointer "${t}". Pointers must begin with "#/"`,(0,o.stripHash)(e)),this.code="EUNMATCHEDRESOLVER",this.name="InvalidPointerError"}}},9741:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isWindows=void 0;const r=/^win/.test(globalThis.process?globalThis.process.platform:"");e.isWindows=()=>r},7344:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){return t?void e.then((function(e){(0,o.default)((function(){t(null,e)}))}),(function(e){(0,o.default)((function(){t(e)}))})):e};const o=n(r(6578))},6578:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default="function"==typeof{env:{NODE_ENV:"development",APP_ENV:"browser"},cwd:function(){return""}}.nextTick?{env:{NODE_ENV:"development",APP_ENV:"browser"},cwd:function(){return""}}.nextTick:"function"==typeof setImmediate?setImmediate:function(t){setTimeout(t,0)}},2767:function(t,e){"use strict";function r(t,e,r,n,o){const i=t[e];if("function"==typeof i)return i.apply(t,[r,n,o]);if(!n){if(i instanceof RegExp)return i.test(r.url);if("string"==typeof i)return i===r.extension;if(Array.isArray(i))return-1!==i.indexOf(r.extension)}return i}Object.defineProperty(e,"__esModule",{value:!0}),e.all=function(t){return Object.keys(t||{}).filter((e=>"object"==typeof t[e])).map((e=>(t[e].name=e,t[e])))},e.filter=function(t,e,n){return t.filter((t=>!!r(t,e,n)))},e.sort=function(t){for(const e of t)e.order=e.order||Number.MAX_SAFE_INTEGER;return t.sort(((t,e)=>t.order-e.order))},e.run=async function(t,e,n,o){let i,u,a=0;return new Promise(((c,s)=>{function l(){if(i=t[a++],!i)return s(u);try{const u=r(i,e,n,f,o);if(u&&"function"==typeof u.then)u.then(p,h);else if(void 0!==u)p(u);else if(a===t.length)throw new Error("No promise has been returned or callback has been called.")}catch(t){h(t)}}function f(t,e){t?h(t):p(e)}function p(t){c({plugin:i,result:t})}function h(t){u={plugin:i,error:t},l()}l()}))}},2710:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.parse=void 0,e.resolve=g,e.cwd=m,e.getProtocol=b,e.getExtension=function(t){const e=t.lastIndexOf(".");if(e>=0)return _(t.substr(e).toLowerCase());return""},e.stripQuery=_,e.getHash=w,e.stripHash=x,e.isHttp=function(t){const e=b(t);return"http"===e||"https"===e||void 0===e&&"undefined"!=typeof window},e.isFileSystemPath=j,e.fromFileSystemPath=function(t){if((0,d.isWindows)()){const e=m(),r=t.toUpperCase(),n=(0,a.default)(e).toUpperCase(),o=r.includes(n),i=r.includes(n),u=c.win32?.isAbsolute(t)||t.startsWith("http://")||t.startsWith("https://")||t.startsWith("file://");o||i||u||e.startsWith("http")||(t=(0,h.join)(e,t)),t=(0,a.default)(t)}t=encodeURI(t);for(const e of y)t=t.replace(e[0],e[1]);return t},e.toFileSystemPath=function(t,e){t=decodeURI(t);for(let e=0;e<v.length;e+=2)t=t.replace(v[e],v[e+1]);let r="file://"===t.substr(0,7).toLowerCase();r&&(t="/"===t[7]?t.substr(8):t.substr(7),(0,d.isWindows)()&&"/"===t[1]&&(t=t[0]+":"+t.substr(1)),e?t="file:///"+t:(r=!1,t=(0,d.isWindows)()?t:"/"+t));(0,d.isWindows)()&&!r&&":\\"===(t=t.replace(s,"\\")).substr(1,2)&&(t=t[0].toUpperCase()+t.substr(1));return t},e.safePointerToPath=function(t){if(t.length<=1||"#"!==t[0]||"/"!==t[1])return[];return t.slice(2).split("/").map((t=>decodeURIComponent(t).replace(f,"/").replace(p,"~")))},e.relative=function(t,e){if(!j(t)||!j(e))return g(t,e);const r=c.default.dirname(x(t)),n=x(e);return c.default.relative(r,n)+w(e)};const a=u(r(5699)),c=i(r(4203)),s=/\//g,l=/^(\w{2,}):\/\//i,f=/~1/g,p=/~0/g,h=r(4203),d=r(9741),y=[[/\?/g,"%3F"],[/#/g,"%23"]],v=[/%23/g,"#",/%24/g,"$",/%26/g,"&",/%2C/g,",",/%40/g,"@"];function g(t,e){const r=new URL((0,a.default)(t),"resolve://"),n=new URL((0,a.default)(e),r),o=e.match(/(\s*)$/)?.[1]||"";if("resolve:"===n.protocol){const{pathname:t,search:e,hash:r}=n;return t+e+r+o}return n.toString()+o}function m(){if("undefined"!=typeof window)return location.href;const t="",e=t.slice(-1);return"/"===e||"\\"===e?t:t+"/"}function b(t){const e=l.exec(t||"");if(e)return e[1].toLowerCase()}function _(t){const e=t.indexOf("?");return e>=0&&(t=t.substr(0,e)),t}function w(t){if(!t)return"#";const e=t.indexOf("#");return e>=0?t.substring(e):"#"}function x(t){if(!t)return"";const e=t.indexOf("#");return e>=0&&(t=t.substring(0,e)),t}function j(t){if("undefined"!=typeof window||{env:{NODE_ENV:"development",APP_ENV:"browser"},cwd:function(){return""}}.browser)return!1;const e=b(t);return void 0===e||"file"===e}e.parse=t=>new URL(t)},3935:function(t,e,r){"use strict";r.r(e),r.d(e,{Ono:function(){return g},default:function(){return x},ono:function(){return b}});const n=!1,o=!1,i=/\r?\n/,u=/\bono[ @]/;function a(t,e){let r=s(t.stack),n=e?e.stack:void 0;return r&&n?r+"\n\n"+n:r||n}function c(t,e,r){r?Object.defineProperty(e,"stack",{get:()=>a({stack:t.get.apply(e)},r),enumerable:!1,configurable:!0}):function(t,e){Object.defineProperty(t,"stack",{get:()=>s(e.get.apply(t)),enumerable:!1,configurable:!0})}(e,t)}function s(t){if(t){let e,r=t.split(i);for(let t=0;t<r.length;t++){let n=r[t];if(u.test(n))void 0===e&&(e=t);else if(void 0!==e){r.splice(e,t-e);break}}if(r.length>0)return r.join("\n")}return t}const l=["function","symbol","undefined"],f=["constructor","prototype","__proto__"],p=Object.getPrototypeOf({});function h(){let t={},e=this;for(let r of d(e))if("string"==typeof r){let n=e[r],o=typeof n;l.includes(o)||(t[r]=n)}return t}function d(t,e=[]){let r=[];for(;t&&t!==p;)r=r.concat(Object.getOwnPropertyNames(t),Object.getOwnPropertySymbols(t)),t=Object.getPrototypeOf(t);let n=new Set(r);for(let t of e.concat(f))n.delete(t);return n}const y=["name","message","stack"];function v(t,e,r){let n=t;return function(t,e){let r=Object.getOwnPropertyDescriptor(t,"stack");!function(t){return Boolean(t&&t.configurable&&"function"==typeof t.get)}(r)?function(t){return Boolean(!t||t.writable||"function"==typeof t.set)}(r)&&(t.stack=a(t,e)):c(r,t,e)}(n,e),e&&"object"==typeof e&&function(t,e){let r=d(e,y),n=t,o=e;for(let t of r)if(void 0===n[t])try{n[t]=o[t]}catch(t){}}(n,e),n.toJSON=h,o&&o(n),r&&"object"==typeof r&&Object.assign(n,r),n}const g=m;function m(t,e){function r(...r){let{originalError:n,props:o,message:i}=function(t,e){let r,n,o,i="";return"string"==typeof t[0]?o=t:"string"==typeof t[1]?(t[0]instanceof Error?r=t[0]:n=t[0],o=t.slice(1)):(r=t[0],n=t[1],o=t.slice(2)),o.length>0&&(i=e.format?e.format.apply(void 0,o):o.join(" ")),e.concatMessages&&r&&r.message&&(i+=(i?" \n":"")+r.message),{originalError:r,props:n,message:i}}(r,e);return v(new t(i),n,o)}return e=function(t){return{concatMessages:void 0===(t=t||{}).concatMessages||Boolean(t.concatMessages),format:void 0===t.format?n:"function"==typeof t.format&&t.format}}(e),r[Symbol.species]=t,r}m.toJSON=function(t){return h.call(t)},m.extend=function(t,e,r){return r||e instanceof Error?v(t,e,r):e?v(t,void 0,e):v(t)};const b=w;w.error=new g(Error),w.eval=new g(EvalError),w.range=new g(RangeError),w.reference=new g(ReferenceError),w.syntax=new g(SyntaxError),w.type=new g(TypeError),w.uri=new g(URIError);const _=w;function w(...t){let e=t[0];if("object"==typeof e&&"string"==typeof e.name)for(let r of Object.values(_))if("function"==typeof r&&"ono"===r.name){let n=r[Symbol.species];if(n&&n!==Error&&(e instanceof n||e.name===n.name))return r.apply(void 0,t)}return w.error.apply(void 0,t)}r(911);t=r.hmd(t);var x=b;"object"==typeof t.exports&&(t.exports=Object.assign(t.exports.default,t.exports))},6446:function(t,e){"use strict";e.byteLength=function(t){var e=a(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,i=a(t),u=i[0],c=i[1],s=new o(function(t,e,r){return 3*(e+r)/4-r}(0,u,c)),l=0,f=c>0?u-4:u;for(r=0;r<f;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],s[l++]=e>>16&255,s[l++]=e>>8&255,s[l++]=255&e;2===c&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,s[l++]=255&e);1===c&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,s[l++]=e>>8&255,s[l++]=255&e);return s},e.fromByteArray=function(t){for(var e,n=t.length,o=n%3,i=[],u=16383,a=0,s=n-o;a<s;a+=u)i.push(c(t,a,a+u>s?s:a+u));1===o?(e=t[n-1],i.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],i.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0;u<64;++u)r[u]=i[u],n[i.charCodeAt(u)]=u;function a(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function c(t,e,n){for(var o,i,u=[],a=e;a<n;a+=3)o=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),u.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return u.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},5313:function(t,e,r){"use strict"; /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh <https://feross.org> * @license MIT */ const n=r(6446),o=r(7164),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.lW=c,e.h2=50;const u=2147483647;function a(t){if(t>u)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,c.prototype),e}function c(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return f(t)}return s(t,e,r)}function s(t,e,r){if("string"==typeof t)return function(t,e){"string"==typeof e&&""!==e||(e="utf8");if(!c.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=0|y(t,e);let n=a(r);const o=n.write(t,e);o!==r&&(n=n.slice(0,o));return n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(J(t,Uint8Array)){const e=new Uint8Array(t);return h(e.buffer,e.byteOffset,e.byteLength)}return p(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(J(t,ArrayBuffer)||t&&J(t.buffer,ArrayBuffer))return h(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(J(t,SharedArrayBuffer)||t&&J(t.buffer,SharedArrayBuffer)))return h(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return c.from(n,e,r);const o=function(t){if(c.isBuffer(t)){const e=0|d(t.length),r=a(e);return 0===r.length||t.copy(r,0,0,e),r}if(void 0!==t.length)return"number"!=typeof t.length||Y(t.length)?a(0):p(t);if("Buffer"===t.type&&Array.isArray(t.data))return p(t.data)}(t);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return c.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function f(t){return l(t),a(t<0?0:0|d(t))}function p(t){const e=t.length<0?0:0|d(t.length),r=a(e);for(let n=0;n<e;n+=1)r[n]=255&t[n];return r}function h(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(n,c.prototype),n}function d(t){if(t>=u)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u.toString(16)+" bytes");return 0|t}function y(t,e){if(c.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||J(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let o=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return V(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return H(t).length;default:if(o)return n?-1:V(t).length;e=(""+e).toLowerCase(),o=!0}}function v(t,e,r){let n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return T(this,e,r);case"utf8":case"utf-8":return E(this,e,r);case"ascii":return P(this,e,r);case"latin1":case"binary":return I(this,e,r);case"base64":return A(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function g(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function m(t,e,r,n,o){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Y(r=+r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=c.from(e,n)),c.isBuffer(e))return 0===e.length?-1:b(t,e,r,n,o);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):b(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function b(t,e,r,n,o){let i,u=1,a=t.length,c=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;u=2,a/=2,c/=2,r/=2}function s(t,e){return 1===u?t[e]:t.readUInt16BE(e*u)}if(o){let n=-1;for(i=r;i<a;i++)if(s(t,i)===s(e,-1===n?0:i-n)){if(-1===n&&(n=i),i-n+1===c)return n*u}else-1!==n&&(i-=i-n),n=-1}else for(r+c>a&&(r=a-c),i=r;i>=0;i--){let r=!0;for(let n=0;n<c;n++)if(s(t,i+n)!==s(e,n)){r=!1;break}if(r)return i}return-1}function _(t,e,r,n){r=Number(r)||0;const o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;const i=e.length;let u;for(n>i/2&&(n=i/2),u=0;u<n;++u){const n=parseInt(e.substr(2*u,2),16);if(Y(n))return u;t[r+u]=n}return u}function w(t,e,r,n){return K(V(e,t.length-r),t,r,n)}function x(t,e,r,n){return K(function(t){const e=[];for(let r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function j(t,e,r,n){return K(H(e),t,r,n)}function O(t,e,r,n){return K(function(t,e){let r,n,o;const i=[];for(let u=0;u<t.length&&!((e-=2)<0);++u)r=t.charCodeAt(u),n=r>>8,o=r%256,i.push(o),i.push(n);return i}(e,t.length-r),t,r,n)}function A(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function E(t,e,r){r=Math.min(t.length,r);const n=[];let o=e;for(;o<r;){const e=t[o];let i=null,u=e>239?4:e>223?3:e>191?2:1;if(o+u<=r){let r,n,a,c;switch(u){case 1:e<128&&(i=e);break;case 2:r=t[o+1],128==(192&r)&&(c=(31&e)<<6|63&r,c>127&&(i=c));break;case 3:r=t[o+1],n=t[o+2],128==(192&r)&&128==(192&n)&&(c=(15&e)<<12|(63&r)<<6|63&n,c>2047&&(c<55296||c>57343)&&(i=c));break;case 4:r=t[o+1],n=t[o+2],a=t[o+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(c=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&a,c>65535&&c<1114112&&(i=c))}}null===i?(i=65533,u=1):i>65535&&(i-=65536,n.push(i>>>10&1023|55296),i=56320|1023&i),n.push(i),o+=u}return function(t){const e=t.length;if(e<=S)return String.fromCharCode.apply(String,t);let r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=S));return r}(n)}c.TYPED_ARRAY_SUPPORT=function(){try{const t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),c.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(t,e,r){return s(t,e,r)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(t,e,r){return function(t,e,r){return l(t),t<=0?a(t):void 0!==e?"string"==typeof r?a(t).fill(e,r):a(t).fill(e):a(t)}(t,e,r)},c.allocUnsafe=function(t){return f(t)},c.allocUnsafeSlow=function(t){return f(t)},c.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==c.prototype},c.compare=function(t,e){if(J(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),J(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(t)||!c.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let r=t.length,n=e.length;for(let o=0,i=Math.min(r,n);o<i;++o)if(t[o]!==e[o]){r=t[o],n=e[o];break}return r<n?-1:n<r?1:0},c.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return c.alloc(0);let r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;const n=c.allocUnsafe(e);let o=0;for(r=0;r<t.length;++r){let e=t[r];if(J(e,Uint8Array))o+e.length>n.length?(c.isBuffer(e)||(e=c.from(e)),e.copy(n,o)):Uint8Array.prototype.set.call(n,e,o);else{if(!c.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,o)}o+=e.length}return n},c.byteLength=y,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)g(this,e,e+1);return this},c.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer size