@api-helper/core
Version:
根据 Swagger 的接口定义生成 TypeScript/JavaScript 的接口类型及其请求函数代码。
13 lines • 257 kB
JavaScript
/*!
* @api-helper/core v3.0.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 i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}: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}),o=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 i(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)),s=u(r(8009)),c=o(r(2710));function l(t,e,r,n,i,o,u,c){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,i,o,u,c);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=s.default.join(r,e),h=s.default.join(n,e),d=p[e];a.default.isAllowed$Ref(d)?f(p,e,r,h,i,o,u,c):l(p,e,t,h,i,o,u,c)}}}function f(t,e,r,n,i,o,u,f){const p=null===e?t:t[e],h=c.resolve(r,p.$ref),d=u._resolve(h,n,f);if(null===d)return;const v=s.default.parse(n).length,y=c.stripHash(d.path),g=c.getHash(d.path),m=y!==u._root$Ref.path,b=a.default.isExtended$Ref(p);i+=d.indirections;const _=function(t,e,r){for(const n of t)if(n&&n.parent===e&&n.key===r)return n;return}(o,t,e);if(_){if(!(v<_.depth||i<_.indirections))return;!function(t,e){const r=t.indexOf(e);t.splice(r,1)}(o,_)}o.push({$ref:p,parent:t,key:e,pathFromRoot:n,depth:v,file:y,hash:g,value:d.value,circular:d.circular,extended:b,external:m,indirections:i}),_&&!m||l(d.value,null,d.path,n,i+1,o,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 i of t)i.external?i.file===e&&i.hash===r?i.$ref.$ref=n:i.file===e&&0===i.hash.indexOf(r+"/")?i.$ref.$ref=s.default.join(n,s.default.parse(i.hash.replace(r,"#"))):(e=i.file,r=i.hash,n=i.pathFromRoot,i.$ref=i.parent[i.key]=a.default.dereference(i.$ref,i.value),i.circular&&(i.$ref.$ref=i.pathFromRoot)):i.$ref.$ref=i.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 i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}: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}),o=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 i(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)),s=u(r(8009)),c=r(3935),l=o(r(2710)),f=r(7099);function p(t,e,r,n,i,o,u,c,l){let v;const y={value:t,circular:!1};if(c&&c.timeoutMs&&Date.now()-l>c.timeoutMs)throw new f.TimeoutError(c.timeoutMs);const g=c.dereference||{},m=g.excludedPathMatcher||(()=>!1);if(("ignore"===g?.circular||!i.has(t))&&t&&"object"==typeof t&&!ArrayBuffer.isView(t)&&!m(r)){if(n.add(t),i.add(t),a.default.isAllowed$Ref(t,c))v=h(t,e,r,n,i,o,u,c,l),y.circular=v.circular,y.value=v.value;else for(const f of Object.keys(t)){const b=s.default.join(e,f),_=s.default.join(r,f);if(m(_))continue;const w=t[f];let x=!1;a.default.isAllowed$Ref(w,c)?(v=h(w,b,_,n,i,o,u,c,l),x=v.circular,t[f]!==v.value&&(t[f]=v.value,g?.onDereference?.(w.$ref,t[f],t,f))):n.has(w)?x=d(b,u,c):(v=p(w,b,_,n,i,o,u,c,l),x=v.circular,t[f]!==v.value&&(t[f]=v.value)),y.circular=y.circular||x}n.delete(t)}return y}function h(t,e,r,n,i,o,u,s,c){const f=a.default.isExternal$Ref(t)&&"root"===s?.dereference?.externalReferenceResolution,h=l.resolve(f?l.cwd():e,t.$ref),v=o.get(h);if(v&&!v.circular){const e=Object.keys(t);if(e.length>1){const r={};for(const n of e)"$ref"===n||n in v.value||(r[n]=t[n]);return{circular:v.circular,value:Object.assign({},v.value,r)}}return v}const y=u._resolve(h,e,s);if(null===y)return{circular:!1,value:null};const g=y.circular;let m=g||n.has(y.value);m&&d(e,u,s);let b=a.default.dereference(t,y.value);if(!m){const t=p(b,y.path,r,n,i,o,u,s,c);m=t.circular,b=t.value}m&&!g&&"ignore"===s.dereference?.circular&&(b=t),g&&(b.$ref=r);const _={circular:m,value:b};return 1===Object.keys(t).length&&o.set(h,_),_}function d(t,e,r){if(e.circular=!0,!r.dereference.circular)throw c.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,i=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}: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}),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)&&i(e,t,r);return o(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 s=a(r(1683)),c=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)),v=r(7099);Object.defineProperty(e,"JSONParserError",{enumerable:!0,get:function(){return v.JSONParserError}}),Object.defineProperty(e,"InvalidPointerError",{enumerable:!0,get:function(){return v.InvalidPointerError}}),Object.defineProperty(e,"MissingPointerError",{enumerable:!0,get:function(){return v.MissingPointerError}}),Object.defineProperty(e,"ResolverError",{enumerable:!0,get:function(){return v.ResolverError}}),Object.defineProperty(e,"ParserError",{enumerable:!0,get:function(){return v.ParserError}}),Object.defineProperty(e,"UnmatchedParserError",{enumerable:!0,get:function(){return v.UnmatchedParserError}}),Object.defineProperty(e,"UnmatchedResolverError",{enumerable:!0,get:function(){return v.UnmatchedResolverError}}),Object.defineProperty(e,"isHandledError",{enumerable:!0,get:function(){return v.isHandledError}}),Object.defineProperty(e,"JSONParserErrorGroup",{enumerable:!0,get:function(){return v.JSONParserErrorGroup}});const y=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 s.default}async parse(){const t=(0,l.default)(arguments);let e;if(!t.path&&!t.schema){const e=(0,y.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 s.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,c.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 y.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,v.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(v.JSONParserErrorGroup.getParserErrors(t).length>0)throw new v.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=i;const n=r(4617);function i(t){let e,r,i,o;const u=Array.prototype.slice.call(t);"function"==typeof u[u.length-1]&&(o=u.pop()),"string"==typeof u[0]?(e=u[0],"object"==typeof u[2]?(r=u[1],i=u[2]):(r=void 0,i=u[1])):(e="",r=u[0],i=u[1]);try{i=(0,n.getNewOptions)(i)}catch(t){console.error(`JSON Schema Ref Parser: Error normalizing options: ${t}`)}return i.mutateInputSchema||"object"!=typeof r||(r=JSON.parse(JSON.stringify(r))),{path:e,schema:r,options:i,callback:o}}e.default=i},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 i=n(r(3484)),o=n(r(4920)),u=n(r(1901)),a=n(r(6252)),s=n(r(9238)),c=n(r(9253));e.getJsonSchemaRefParserDefaultOptions=()=>({parse:{json:{...i.default},yaml:{...o.default},text:{...u.default},binary:{...a.default}},resolve:{file:{...s.default},http:{...c.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 i=r[n],o=e[i],u=t[i];f(o)?t[i]=l(u||{},o):void 0!==o&&(t[i]=o)}}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,i=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}: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}),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)&&i(e,t,r);return o(e,t),e};Object.defineProperty(e,"__esModule",{value:!0});const a=r(3935),s=u(r(2710)),c=u(r(2767)),l=r(7099);e.default=async function(t,e,r){const i=t.indexOf("#");let o="";i>=0&&(o=t.substring(i),t=t.substring(0,i));const u=e._add(t),f={url:t,hash:o,extension:s.getExtension(t)};try{const t=await async function(t,e,r){let n=c.all(e.resolve);n=c.filter(n,"canRead",t),c.sort(n);try{return await c.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 i=await async function(t,e,r){const i=c.all(e.parse),o=c.filter(i,"canParse",t),u=o.length>0?o:i;c.sort(u);try{const e=await c.run(u,"parse",t,r);if(!e.plugin.allowEmpty&&(void 0===(s=e.result)||"object"==typeof s&&0===Object.keys(s).length||"string"==typeof s&&0===s.trim().length||n.isBuffer(s)&&0===s.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 s}(f,r,e);return u.value=i.result,i.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 i=/\.(jpeg|jpg|gif|png|bmp|ico)$/i;e.default={order:400,allowEmpty:!0,canParse:t=>n.isBuffer(t.data)&&i.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 i=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 i.ParserError(e.message,t.url)}throw new i.ParserError(r.message,t.url)}}}},1901:function(t,e,r){"use strict";var n=r(5313).lW;Object.defineProperty(e,"__esModule",{value:!0});const i=r(7099),o=/\.(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))&&o.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 i.ParserError("data is not text",t.url)}}},4920:function(t,e,r){"use strict";var n=r(5313).lW,i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const o=r(7099),u=i(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 o.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 i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}: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}),o=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 i(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)),s=o(r(2710)),c=r(7099),l=/\//g,f=/~/g,p=/~1/g,h=/~0/g,d=t=>{try{return decodeURIComponent(t)}catch{return t}};class v{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=v.parse(this.path,this.originalPath);this.value=m(t);for(let t=0;t<n.length;t++){if(y(this,e,r)&&(this.path=v.join(this.path,n.slice(t))),"object"==typeof this.value&&null!==this.value&&!b(r)&&"$ref"in this.value)return this;const i=n[t];if(void 0===this.value[i]||null===this.value[i]&&t===n.length-1){let e=!1;for(let r=n.length-1;r>t;r--){const i=n.slice(t,r+1).join("/");if(void 0!==this.value[i]){this.value=this.value[i],t=r,e=!0;break}}if(e)continue;throw this.value=null,new c.MissingPointerError(i,decodeURI(this.originalPath))}this.value=this.value[i]}return(!this.value||this.value.$ref&&s.resolve(this.path,this.value.$ref)!==r)&&y(this,e,r),this}set(t,e,r){const n=v.parse(this.path);let i;if(0===n.length)return this.value=e,e;this.value=m(t);for(let t=0;t<n.length-1;t++)y(this,r),i=n[t],this.value&&void 0!==this.value[i]?this.value=this.value[i]:this.value=g(this,i,{});return y(this,r),i=n[n.length-1],g(this,i,e),t}static parse(t,e){const r=s.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 c.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 y(t,e,r){if(a.default.isAllowed$Ref(t.value,e)){const n=s.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 c.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,c.isHandledError)(t))throw t;return t}function b(t){return"string"==typeof t&&0==v.parse(t).length}e.default=v},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 i=n(r(8009)),o=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(o.normalizeError).filter((({footprint:t})=>!e.includes(t)))):"footprint"in t&&e.includes(t.footprint)||this.errors.push((0,o.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 i.default(this,t,r);try{return a.resolve(this.value,e,n)}catch(t){if(!e||!e.continueOnError||!(0,o.isHandledError)(t))throw t;return null===t.path&&(t.path=(0,u.safePointerToPath)((0,u.getHash)(n))),t instanceof o.InvalidPointerError&&(t.source=decodeURI((0,u.stripHash)(n))),this.addError(t),null}}set(t,e){const r=new i.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 i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}: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}),o=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 i(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),s=u(r(2245)),c=o(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?c.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=c.resolve(this._root$Ref.path,t),n=c.stripHash(r),i=this._$refs[n];if(!i)throw(0,a.ono)(`Error resolving $ref pointer "${t}". \n"${n}" not found.`);i.set(r,e)}_get$Ref(t){t=c.resolve(this._root$Ref.path,t);const e=c.stripHash(t);return this._$refs[e]}_add(t){const e=c.stripHash(t),r=new s.default(this);return r.path=e,this._$refs[e]=r,this._root$Ref=this._root$Ref||r,r}_resolve(t,e,r){const n=c.resolve(this._root$Ref.path,t),i=c.stripHash(n),o=this._$refs[i];if(!o)throw(0,a.ono)(`Error resolving $ref pointer "${t}". \n"${i}" not found.`);return o.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 i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}: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}),o=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 i(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)),s=u(r(8009)),c=u(r(5455)),l=o(r(2710)),f=r(7099);function p(t,e,r,n,i,o){i||(i=new Set);let u=[];if(t&&"object"==typeof t&&!ArrayBuffer.isView(t)&&!i.has(t)){i.add(t),a.default.isExternal$Ref(t)&&u.push(async function(t,e,r,n){const i="root"===n.dereference?.externalReferenceResolution,o=l.resolve(i?l.cwd():e,t.$ref),u=l.stripHash(o),a=r._$refs[u];if(a)return Promise.resolve(a.value);try{const t=p(await(0,c.default)(o,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 c=s.default.join(e,a),l=t[a];u=u.concat(p(l,c,r,n,i,o))}}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 i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}: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}),o=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 i(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)),s=r(3935),c=o(r(2710)),l=r(7099);e.default={order:100,canRead:t=>c.isFileSystemPath(t.url),async read(t){let e;try{e=c.toFileSystemPath(t.url)}catch(e){throw new l.ResolverError(s.ono.uri(e,`Malformed URI: ${t.url}`),t.url)}try{return await a.default.promises.readFile(e)}catch(t){throw new l.ResolverError((0,s.ono)(t,`Error opening file "${e}"`),e)}}}},9253:function(t,e,r){"use strict";var n=r(5313).lW,i=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}: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}),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)&&i(e,t,r);return o(e,t),e};Object.defineProperty(e,"__esModule",{value:!0});const a=r(3935),s=u(r(2710)),c=r(7099);async function l(t,e,r){t=s.parse(t);const i=r||[];i.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 i=await fetch(t,{method:"GET",headers:e.headers||{},credentials:e.withCredentials?"include":"same-origin",signal:r?r.signal:null});n&&clearTimeout(n);return i}(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)&&i.length>e.redirects)throw new c.ResolverError((0,a.ono)({status:r.status},`Error downloading ${i[0]}. \nToo many redirects: \n ${i.join(" \n ")}`));if("location"in r.headers&&r.headers.location){return l(s.resolve(t.href,r.headers.location),e,i)}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 c.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=>s.isHttp(t.url),read(t){const e=s.parse(t.url);return"undefined"==typeof window||e.protocol||(e.protocol=s.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(i.default?.win32?.sep).join(i.default?.posix?.sep??"/")};const i=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 o||t instanceof u},e.normalizeError=function(t){null===t.path&&(t.path=[]);return t};const n=r(3935),i=r(2710);class o 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=o;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,i.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 o{constructor(t,e){super(`Error parsing ${e}: ${t}`,e),this.code="EPARSER",this.name="ParserError"}};e.UnmatchedParserError=class extends o{constructor(t){super(`Could not find parser for "${t}"`,t),this.code="EUNMATCHEDPARSER",this.name="UnmatchedParserError"}};e.ResolverError=class extends o{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 o{constructor(t){super(`Could not find resolver for "${t}"`,t),this.code="EUNMATCHEDRESOLVER",this.name="UnmatchedResolverError"}};e.MissingPointerError=class extends o{constructor(t,e){super(`Token "${t}" does not exist.`,(0,i.stripHash)(e)),this.code="EUNMATCHEDRESOLVER",this.name="MissingPointerError"}};e.TimeoutError=class extends o{constructor(t){super(`Dereferencing timeout reached: ${t}ms`),this.code="ETIMEOUT",this.name="TimeoutError"}};e.InvalidPointerError=class extends o{constructor(t,e){super(`Invalid $ref pointer "${t}". Pointers must begin with "#/"`,(0,i.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,i.default)((function(){t(null,e)}))}),(function(e){(0,i.default)((function(){t(e)}))})):e};const i=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,i){const o=t[e];if("function"==typeof o)return o.apply(t,[r,n,i]);if(!n){if(o instanceof RegExp)return o.test(r.url);if("string"==typeof o)return o===r.extension;if(Array.isArray(o))return-1!==o.indexOf(r.extension)}return o}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,i){let o,u,a=0;return new Promise(((s,c)=>{function l(){if(o=t[a++],!o)return c(u);try{const u=r(o,e,n,f,i);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){s({plugin:o,result:t})}function h(t){u={plugin:o,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 i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}: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}),o=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 i(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(),i=r.includes(n),o=r.includes(n),u=s.win32?.isAbsolute(t)||t.startsWith("http://")||t.startsWith("https://")||t.startsWith("file://");i||o||u||e.startsWith("http")||(t=(0,h.join)(e,t)),t=(0,a.default)(t)}t=encodeURI(t);for(const e of v)t=t.replace(e[0],e[1]);return t},e.toFileSystemPath=function(t,e){t=decodeURI(t);for(let e=0;e<y.length;e+=2)t=t.replace(y[e],y[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(c,"\\")).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=s.default.dirname(x(t)),n=x(e);return s.default.relative(r,n)+w(e)};const a=u(r(5699)),s=o(r(4203)),c=/\//g,l=/^(\w{2,}):\/\//i,f=/~1/g,p=/~0/g,h=r(4203),d=r(9741),v=[[/\?/g,"%3F"],[/#/g,"%23"]],y=[/%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),i=e.match(/(\s*)$/)?.[1]||"";if("resolve:"===n.protocol){const{pathname:t,search:e,hash:r}=n;return t+e+r+i}return n.toString()+i}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,i=!1,o=/\r?\n/,u=/\bono[ @]/;function a(t,e){let r=c(t.stack),n=e?e.stack:void 0;return r&&n?r+"\n\n"+n:r||n}function s(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:()=>c(e.get.apply(t)),enumerable:!1,configurable:!0})}(e,t)}function c(t){if(t){let e,r=t.split(o);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],i=typeof n;l.includes(i)||(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 v=["name","message","stack"];function y(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)):s(r,t,e)}(n,e),e&&"object"==typeof e&&function(t,e){let r=d(e,v),n=t,i=e;for(let t of r)if(void 0===n[t])try{n[t]=i[t]}catch(t){}}(n,e),n.toJSON=h,i&&i(n),r&&"object"==typeof r&&Object.assign(n,r),n}const g=m;function m(t,e){function r(...r){let{originalError:n,props:i,message:o}=function(t,e){let r,n,i,o="";return"string"==typeof t[0]?i=t:"string"==typeof t[1]?(t[0]instanceof Error?r=t[0]:n=t[0],i=t.slice(1)):(r=t[0],n=t[1],i=t.slice(2)),i.length>0&&(o=e.format?e.format.apply(void 0,i):i.join(" ")),e.concatMessages&&r&&r.message&&(o+=(o?" \n":"")+r.message),{originalError:r,props:n,message:o}}(r,e);return y(new t(o),n,i)}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?y(t,e,r):e?y(t,void 0,e):y(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(3338);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,o=a(t),u=o[0],s=o[1],c=new i(function(t,e,r){return 3*(e+r)/4-r}(0,u,s)),l=0,f=s>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)],c[l++]=e>>16&255,c[l++]=e>>8&255,c[l++]=255&e;2===s&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,c[l++]=255&e);1===s&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,c[l++]=e>>8&255,c[l++]=255&e);return c},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],u=16383,a=0,c=n-i;a<c;a+=u)o.push(s(t,a,a+u>c?c:a+u));1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0;u<64;++u)r[u]=o[u],n[o.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 s(t,e,n){for(var i,o,u=[],a=e;a<n;a+=3)i=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),u.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);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),i=r(7164),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.lW=s,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,s.prototype),e}function s(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 c(t,e,r)}function c(t,e,r){if("string"==typeof t)return function(t,e){"string"==typeof e&&""!==e||(e="utf8");if(!s.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=0|v(t,e);let n=a(r);const i=n.write(t,e);i!==r&&(n=n.slice(0,i));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 s.from(n,e,r);const i=function(t){if(s.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(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return s.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,s.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 v(t,e){if(s.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 i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return H(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return V(t).length;default:if(i)return n?-1:H(t).length;e=(""+e).toLowerCase(),i=!0}}function y(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 k(this,e,r);case"utf8":case"utf-8":return E(this,e,r);case"ascii":return I(this,e,r);case"latin1":case"binary":return P(this,e,r);case"base64":return A(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(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,i){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=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=s.from(e,n)),s.isBuffer(e))return 0===e.length?-1:b(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):b(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function b(t,e,r,n,i){let o,u=1,a=t.length,s=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,s/=2,r/=2}function c(t,e){return 1===u?t[e]:t.readUInt16BE(e*u)}if(i){let n=-1;for(o=r;o<a;o++)if(c(t,o)===c(e,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===s)return n*u}else-1!==n&&(o-=o-n),n=-1}else for(r+s>a&&(r=a-s),o=r;o>=0;o--){let r=!0;for(let n=0;n<s;n++)if(c(t,o+n)!==c(e,n)){r=!1;break}if(r)return o}return-1}function _(t,e,r,n){r=Number(r)||0;const i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=e.length;let u;for(n>o/2&&(n=o/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(H(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(V(e),t,r,n)}function O(t,e,r,n){return K(function(t,e){let r,n,i;const o=[];for(let u=0;u<t.length&&!((e-=2)<0);++u)r=t.charCodeAt(u),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(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 i=e;for(;i<r;){const e=t[i];let o=null,u=e>239?4:e>223?3:e>191?2:1;if(i+u<=r){let r,n,a,s;switch(u){case 1:e<128&&(o=e);break;case 2:r=t[i+1],128==(192&r)&&(s=(31&e)<<6|63&r,s>127&&(o=s));break;case 3:r=t[i+1],n=t[i+2],128==(192&r)&&128==(192&n)&&(s=(15&e)<<12|(63&r)<<6|63&n,s>2047&&(s<55296||s>57343)&&(o=s));break;case 4:r=t[i+1],n=t[i+2],a=t[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(s=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&a,s>65535&&s<1114112&&(o=s))}}null===o?(o=65533,u=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=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)}s.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}}(),s.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(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(t,e,r){return c(t,e,r)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.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)},s.allocUnsafe=function(t){return f(t)},s.allocUnsafeSlow=function(t){return f(t)},s.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==s.prototype},s.compare=function(t,e){if(J(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),J(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(t)||!s.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 i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},s.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}},s.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);let r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;const n=s.allocUnsafe(e);let i=0;for(r=0;r<t.length;++r){let e=t[r];if(J(e,Uint8Array))i+e.length>n.length?(s.isBuffer(e)||(e=s.from(e)),e.copy(n,i)):Uint8Array.prototype.set.call(n,e,i);else{if(!s.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,i)}i+=e.length}return n},s.byteLength=v,s.prototype._isBuffer=!0,s.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},s.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer siz