soonjs 0.0.25 → 0.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/index.cjs +4 -4
  2. package/dist/index.d.ts +3 -0
  3. package/dist/index.js +70 -61
  4. package/dist/types.d.ts +1 -0
  5. package/dist/vite-plugin-soon-client.cjs +2 -2
  6. package/dist/vite-plugin-soon-client.js +14 -14
  7. package/dist/vite-plugin-soon-server.cjs +4 -1
  8. package/dist/vite-plugin-soon-server.js +4 -1
  9. package/package.json +1 -1
  10. /package/dist/deps/{acorn-pz2l75c0o.js → acorn-63l42ciyb.js} +0 -0
  11. /package/dist/deps/{acorn-h9ik2adbc.js → acorn-anqp0uy6j.js} +0 -0
  12. /package/dist/deps/{angular-5mug9tjtw.js → angular-6eqe81rmp.js} +0 -0
  13. /package/dist/deps/{angular-ylbwe6o4m.js → angular-zw5oic5ku.js} +0 -0
  14. /package/dist/deps/{babel-gsmsm27fz.js → babel-4qh4iup2l.js} +0 -0
  15. /package/dist/deps/{babel-rrk5vxekq.js → babel-ly0w2f9gt.js} +0 -0
  16. /package/dist/deps/{estree-wuafkfp9r.js → estree-9f8ovhtb1.js} +0 -0
  17. /package/dist/deps/{estree-sxd1ofglp.js → estree-zxumoq6qz.js} +0 -0
  18. /package/dist/deps/{flow-0e9ntu2qg.js → flow-niz9iy21e.js} +0 -0
  19. /package/dist/deps/{flow-hpccmvmui.js → flow-p4uemghmk.js} +0 -0
  20. /package/dist/deps/{glimmer-gib57ikuk.js → glimmer-6qbhhpyhp.js} +0 -0
  21. /package/dist/deps/{glimmer-7hp8ol5n5.js → glimmer-vvnfh71r6.js} +0 -0
  22. /package/dist/deps/{graphql-ai6h9mpsh.js → graphql-dgk8o6z8k.js} +0 -0
  23. /package/dist/deps/{graphql-ay3rfc6fx.js → graphql-dx88uylp4.js} +0 -0
  24. /package/dist/deps/{html-zy50aitzs.js → html-awy57fcu4.js} +0 -0
  25. /package/dist/deps/{html-5uq22xok6.js → html-gzei84ljz.js} +0 -0
  26. /package/dist/deps/{markdown-v9xop8dr8.js → markdown-d10pykzzv.js} +0 -0
  27. /package/dist/deps/{markdown-u4i48dgph.js → markdown-g9in9megz.js} +0 -0
  28. /package/dist/deps/{meriyah-17x46u0y3.js → meriyah-kcg8mxjpm.js} +0 -0
  29. /package/dist/deps/{meriyah-texsyhmbu.js → meriyah-vfexh9fuw.js} +0 -0
  30. /package/dist/deps/{postcss-gfyslywcs.js → postcss-bfwau6mgf.js} +0 -0
  31. /package/dist/deps/{postcss-kthjj0530.js → postcss-ggzdvxigr.js} +0 -0
  32. /package/dist/deps/{soon-id-wk8xbb2g0.js → soon-id-a6raaezni.js} +0 -0
  33. /package/dist/deps/{soon-id-gcjwh4b6w.js → soon-id-unm7ynfew.js} +0 -0
  34. /package/dist/deps/{typescript-fdojtxvy4.js → typescript-4xb86hasm.js} +0 -0
  35. /package/dist/deps/{typescript-tobx6ffbh.js → typescript-zgna0nw0e.js} +0 -0
  36. /package/dist/deps/{yaml-gua1y1aqq.js → yaml-8f94xxplf.js} +0 -0
  37. /package/dist/deps/{yaml-28qc0mo82.js → yaml-zv7u9r84n.js} +0 -0
package/dist/index.cjs CHANGED
@@ -1,7 +1,7 @@
1
- "use strict";var vt=Object.defineProperty;var gt=(r,e,t)=>e in r?vt(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var x=(r,e,t)=>gt(r,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const wt=require("stream"),J=require("./deps/soon-id-gcjwh4b6w.js"),bt=require("util");var k={};Object.defineProperty(k,"__esModule",{value:!0});k.TokenData=void 0;k.parse=Te;k.compile=It;var St=k.match=Ct;k.pathToRegexp=_t;const Et="/",nr=r=>r,At=new RegExp("^\\p{XID_Continue}$","u"),fe="https://git.new/pathToRegexpError",Pt={"!":"!","@":"@",";":";",",":",","*":"*","+":"+","?":"?","{":"{","}":"}"};function $t(r){const e=[...r],t=[];let n=0;for(;n<e.length;){const a=e[n],o=Pt[a];if(o){t.push({type:o,index:n++,value:a});continue}if(a==="\\"){t.push({type:"ESCAPED",index:n++,value:e[n++]});continue}if(a===":"){let i="";for(;At.test(e[++n]);)i+=e[n];if(!i)throw new TypeError(`Missing parameter name at ${n}`);t.push({type:"NAME",index:n,value:i});continue}if(a==="("){const i=n++;let f=1,l="";if(e[n]==="?")throw new TypeError(`Pattern cannot start with "?" at ${n}`);for(;n<e.length;){if(e[n]==="\\"){l+=e[n++]+e[n++];continue}if(e[n]===")"){if(f--,f===0){n++;break}}else if(e[n]==="("&&(f++,e[n+1]!=="?"))throw new TypeError(`Capturing groups are not allowed at ${n}`);l+=e[n++]}if(f)throw new TypeError(`Unbalanced pattern at ${i}`);if(!l)throw new TypeError(`Missing pattern at ${i}`);t.push({type:"PATTERN",index:n,value:l});continue}t.push({type:"CHAR",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),new xt(t)}class xt{constructor(e){this.tokens=e,this.index=0}peek(){return this.tokens[this.index]}tryConsume(e){const t=this.peek();if(t.type===e)return this.index++,t.value}consume(e){const t=this.tryConsume(e);if(t!==void 0)return t;const{type:n,index:a}=this.peek();throw new TypeError(`Unexpected ${n} at ${a}, expected ${e}: ${fe}`)}text(){let e="",t;for(;t=this.tryConsume("CHAR")||this.tryConsume("ESCAPED");)e+=t;return e}modifier(){return this.tryConsume("?")||this.tryConsume("*")||this.tryConsume("+")}}class pe{constructor(e,t){this.tokens=e,this.delimiter=t}}k.TokenData=pe;function Te(r,e={}){const{encodePath:t=nr,delimiter:n=t(Et)}=e,a=[],o=$t(r);let i=0;do{const f=o.text();f&&a.push(t(f));const l=o.tryConsume("NAME"),u=o.tryConsume("PATTERN");if(l||u){a.push({name:l||String(i++),pattern:u});const c=o.peek();if(c.type==="*")throw new TypeError(`Unexpected * at ${c.index}, you probably want \`/*\` or \`{/:foo}*\`: ${fe}`);continue}if(o.tryConsume("*")){a.push({name:String(i++),pattern:`(?:(?!${X(n)}).)*`,modifier:"*",separator:n});continue}if(o.tryConsume("{")){const c=o.text(),d=o.tryConsume("NAME"),y=o.tryConsume("PATTERN"),m=o.text(),g=o.tryConsume(";")&&o.text();o.consume("}");const S=o.modifier();a.push({name:d||(y?String(i++):""),prefix:t(c),suffix:t(m),pattern:y,modifier:S,separator:g});continue}o.consume("END");break}while(!0);return new pe(a,n)}function It(r,e={}){const t=r instanceof pe?r:Te(r,e);return Tt(t,e)}function Ot(r,e){if(typeof r=="string")return()=>r;const t=e||nr,n=r.modifier==="+"||r.modifier==="*",a=r.modifier==="?"||r.modifier==="*",{prefix:o="",suffix:i="",separator:f=i+o}=r;if(e&&n){const u=(p,c)=>{if(typeof p!="string")throw new TypeError(`Expected "${r.name}/${c}" to be a string`);return t(p)},s=p=>{if(!Array.isArray(p))throw new TypeError(`Expected "${r.name}" to be an array`);return p.length===0?"":o+p.map(u).join(f)+i};return a?p=>{const c=p[r.name];return c==null?"":c.length?s(c):""}:p=>{const c=p[r.name];return s(c)}}const l=u=>{if(typeof u!="string")throw new TypeError(`Expected "${r.name}" to be a string`);return o+t(u)+i};return a?u=>{const s=u[r.name];return s==null?"":l(s)}:u=>{const s=u[r.name];return l(s)}}function Tt(r,e){const{encode:t=encodeURIComponent,loose:n=!0,validate:a=!0,strict:o=!1}=e,i=Lr(e),f=ar(n,r.delimiter),l=qr(r,f,[],i,o),u=r.tokens.map((s,p)=>{const c=Ot(s,t);if(!a||typeof s=="string")return c;const d=new RegExp(`^${l[p]}$`,i);return y=>{const m=c(y);if(!d.test(m))throw new TypeError(`Invalid value for "${s.name}": ${JSON.stringify(m)}`);return m}});return function(p={}){let c="";for(const d of u)c+=d(p);return c}}function Ct(r,e={}){const{decode:t=decodeURIComponent,loose:n=!0}=e,a=r instanceof pe?r:Te(r,e),o=ar(n,a.delimiter),i=[],f=Wr(a,i,e),l=i.map(u=>{if(t&&(u.modifier==="+"||u.modifier==="*")){const{prefix:s="",suffix:p="",separator:c=p+s}=u,d=new RegExp(o(c),"g");return y=>y.split(d).map(t)}return t||nr});return function(s){const p=f.exec(s);if(!p)return!1;const{0:c,index:d}=p,y=Object.create(null);for(let m=1;m<p.length;m++){if(p[m]===void 0)continue;const g=i[m-1],S=l[m-1];y[g.name]=S(p[m])}return{path:c,index:d,params:y}}}function X(r){return r.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}function Rt(r,e){const t=X(r);return e?`(?:${t})+(?!${t})`:t}function ar(r,e){if(!r)return X;const t=new RegExp(`(?:(?!${X(e)}).)+|(.)`,"g");return n=>n.replace(t,Rt)}function Lr(r){return r.sensitive?"":"i"}function Wr(r,e,t){const{trailing:n=!0,loose:a=!0,start:o=!0,end:i=!0,strict:f=!1}=t,l=Lr(t),u=ar(a,r.delimiter),s=qr(r,u,e,l,f);let p=o?"^":"";return p+=s.join(""),n&&(p+=`(?:${u(r.delimiter)})?`),p+=i?"$":`(?=${X(r.delimiter)}|$)`,new RegExp(p,l)}function qr(r,e,t,n,a){const o=`(?:(?!${X(r.delimiter)}).)+?`;let i="",f=!0;return r.tokens.map((l,u)=>{if(typeof l=="string")return i=l,e(l);const{prefix:s="",suffix:p="",separator:c=p+s,modifier:d=""}=l,y=e(s),m=e(p);if(l.name){const g=l.pattern?`(?:${l.pattern})`:o,S=Dt(g,l.name,n);if(f||(f=Me(S,s||i)),!f)throw new TypeError(`Ambiguous pattern for "${l.name}": ${fe}`);if(f=!a||Me(S,p),i="",t.push(l),d==="+"||d==="*"){const P=d==="*"?"?":"",h=e(c);if(!h)throw new TypeError(`Missing separator for "${l.name}": ${fe}`);if(f||(f=!a||Me(S,c)),!f)throw new TypeError(`Ambiguous pattern for "${l.name}" separator: ${fe}`);return f=!a,`(?:${y}(${g}(?:${h}${g})*)${m})${P}`}return`(?:${y}(${g})${m})${d}`}return`(?:${y}${m})${d}`})}function Dt(r,e,t){try{return new RegExp(`^${r}$`,t)}catch(n){throw new TypeError(`Invalid pattern for "${e}": ${n.message}`)}}function Me(r,e){return e?!r.test(e):!1}function _t(r,e={}){const t=r instanceof pe?r:Te(r,e),n=[],a=Wr(t,n,e);return Object.assign(a,{keys:n})}var Ce={};Object.defineProperty(Ce,"__esModule",{value:!0});Ce.Observable=void 0;const Gr=r=>!!Symbol[r],or=r=>Gr(r)?Symbol[r]:"@@"+r,Mt=or("iterator"),Qe=or("observable"),kr=or("species");function Pe(r,e){let t=r[e];if(t!=null){if(typeof t!="function")throw new TypeError(t+" is not a function");return t}}function ie(r){let e=r.constructor;return e!==void 0&&(e=e[kr],e===null&&(e=void 0)),e!==void 0?e:Re}function Nt(r){return r instanceof Re}function Y(r){Y.log?Y.log(r):setTimeout(()=>{throw r})}function be(r){Promise.resolve().then(()=>{try{r()}catch(e){Y(e)}})}function zr(r){let e=r._cleanup;if(e!==void 0&&(r._cleanup=void 0,!!e))try{if(typeof e=="function")e();else{let t=Pe(e,"unsubscribe");t&&t.call(e)}}catch(t){Y(t)}}function je(r){r._observer=void 0,r._queue=void 0,r._state="closed"}function Bt(r){let e=r._queue;if(e){r._queue=void 0,r._state="ready";for(let t=0;t<e.length&&(Hr(r,e[t].type,e[t].value),r._state!=="closed");++t);}}function Hr(r,e,t){r._state="running";let n=r._observer;try{let a=Pe(n,e);switch(e){case"next":a&&a.call(n,t);break;case"error":if(je(r),a)a.call(n,t);else throw t;break;case"complete":je(r),a&&a.call(n);break}}catch(a){Y(a)}r._state==="closed"?zr(r):r._state==="running"&&(r._state="ready")}function Ne(r,e,t){if(r._state!=="closed"){if(r._state==="buffering"){r._queue.push({type:e,value:t});return}if(r._state!=="ready"){r._state="buffering",r._queue=[{type:e,value:t}],be(()=>Bt(r));return}Hr(r,e,t)}}class Ut{constructor(e,t){this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state="initializing";let n=this,a={get closed(){return n._state==="closed"},next(o){Ne(n,"next",o)},error(o){Ne(n,"error",o)},complete(){Ne(n,"complete")}};try{this._cleanup=t.call(void 0,a)}catch(o){a.error(o)}this._state==="initializing"&&(this._state="ready")}get closed(){return this._state==="closed"}unsubscribe(){this._state!=="closed"&&(je(this),zr(this))}}let Re=class Se{constructor(e){if(!(this instanceof Se))throw new TypeError("Observable cannot be called as a function");if(typeof e!="function")throw new TypeError("Observable initializer must be a function");this._subscriber=e}subscribe(e){return(typeof e!="object"||e===null)&&(e={next:e,error:arguments[1],complete:arguments[2]}),new Ut(e,this._subscriber)}forEach(e){return new Promise((t,n)=>{if(typeof e!="function"){n(new TypeError(e+" is not a function"));return}function a(){o.unsubscribe(),t()}let o=this.subscribe({next(i){try{e(i,a)}catch(f){n(f),o.unsubscribe()}},error:n,complete:t})})}map(e){if(typeof e!="function")throw new TypeError(e+" is not a function");let t=ie(this);return new t(n=>this.subscribe({next(a){try{a=e(a)}catch(o){return n.error(o)}n.next(a)},error(a){n.error(a)},complete(){n.complete()}}))}filter(e){if(typeof e!="function")throw new TypeError(e+" is not a function");let t=ie(this);return new t(n=>this.subscribe({next(a){try{if(!e(a))return}catch(o){return n.error(o)}n.next(a)},error(a){n.error(a)},complete(){n.complete()}}))}reduce(e){if(typeof e!="function")throw new TypeError(e+" is not a function");let t=ie(this),n=arguments.length>1,a=!1,i=arguments[1];return new t(f=>this.subscribe({next(l){let u=!a;if(a=!0,!u||n)try{i=e(i,l)}catch(s){return f.error(s)}else i=l},error(l){f.error(l)},complete(){if(!a&&!n)return f.error(new TypeError("Cannot reduce an empty sequence"));f.next(i),f.complete()}}))}async all(){let e=[];return await this.forEach(t=>e.push(t)),e}concat(...e){let t=ie(this);return new t(n=>{let a,o=0;function i(f){a=f.subscribe({next(l){n.next(l)},error(l){n.error(l)},complete(){o===e.length?(a=void 0,n.complete()):i(t.from(e[o++]))}})}return i(this),()=>{a&&(a.unsubscribe(),a=void 0)}})}flatMap(e){if(typeof e!="function")throw new TypeError(e+" is not a function");let t=ie(this);return new t(n=>{let a=[],o=this.subscribe({next(f){if(e)try{f=e(f)}catch(u){return n.error(u)}let l=t.from(f).subscribe({next(u){n.next(u)},error(u){n.error(u)},complete(){let u=a.indexOf(l);u>=0&&a.splice(u,1),i()}});a.push(l)},error(f){n.error(f)},complete(){i()}});function i(){o.closed&&a.length===0&&n.complete()}return()=>{a.forEach(f=>f.unsubscribe()),o.unsubscribe()}})}[Qe](){return this}static from(e){let t=typeof this=="function"?this:Se;if(e==null)throw new TypeError(e+" is not an object");let n=Pe(e,Qe);if(n){let a=n.call(e);if(Object(a)!==a)throw new TypeError(a+" is not an object");return Nt(a)&&a.constructor===t?a:new t(o=>a.subscribe(o))}if(Gr("iterator")&&(n=Pe(e,Mt),n))return new t(a=>{be(()=>{if(!a.closed){for(let o of n.call(e))if(a.next(o),a.closed)return;a.complete()}})});if(Array.isArray(e))return new t(a=>{be(()=>{if(!a.closed){for(let o=0;o<e.length;++o)if(a.next(e[o]),a.closed)return;a.complete()}})});throw new TypeError(e+" is not observable")}static of(...e){let t=typeof this=="function"?this:Se;return new t(n=>{be(()=>{if(!n.closed){for(let a=0;a<e.length;++a)if(n.next(e[a]),n.closed)return;n.complete()}})})}static get[kr](){return this}};Ce.Observable=Re;Object.defineProperty(Re,Symbol("extensions"),{value:{symbol:Qe,hostReportError:Y},configurable:!0});var Ft=Ce.Observable;const ir=J.getDefaultExportFromCjs(Ft);var Lt=Error,Wt=EvalError,qt=RangeError,Gt=ReferenceError,Kr=SyntaxError,ye=TypeError,kt=URIError,zt=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var a=42;e[t]=a;for(t in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var o=Object.getOwnPropertySymbols(e);if(o.length!==1||o[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var i=Object.getOwnPropertyDescriptor(e,t);if(i.value!==a||i.enumerable!==!0)return!1}return!0},mr=typeof Symbol<"u"&&Symbol,Ht=zt,Kt=function(){return typeof mr!="function"||typeof Symbol!="function"||typeof mr("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Ht()},Be={__proto__:null,foo:{}},Vt=Object,Qt=function(){return{__proto__:Be}.foo===Be.foo&&!(Be instanceof Vt)},jt="Function.prototype.bind called on incompatible ",Jt=Object.prototype.toString,Xt=Math.max,Yt="[object Function]",hr=function(e,t){for(var n=[],a=0;a<e.length;a+=1)n[a]=e[a];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n},Zt=function(e,t){for(var n=[],a=t,o=0;a<e.length;a+=1,o+=1)n[o]=e[a];return n},en=function(r,e){for(var t="",n=0;n<r.length;n+=1)t+=r[n],n+1<r.length&&(t+=e);return t},rn=function(e){var t=this;if(typeof t!="function"||Jt.apply(t)!==Yt)throw new TypeError(jt+t);for(var n=Zt(arguments,1),a,o=function(){if(this instanceof a){var s=t.apply(this,hr(n,arguments));return Object(s)===s?s:this}return t.apply(e,hr(n,arguments))},i=Xt(0,t.length-n.length),f=[],l=0;l<i;l++)f[l]="$"+l;if(a=Function("binder","return function ("+en(f,",")+"){ return binder.apply(this,arguments); }")(o),t.prototype){var u=function(){};u.prototype=t.prototype,a.prototype=new u,u.prototype=null}return a},tn=rn,lr=Function.prototype.bind||tn,nn=Function.prototype.call,an=Object.prototype.hasOwnProperty,on=lr,ln=on.call(nn,an),v,fn=Lt,un=Wt,cn=qt,sn=Gt,Z=Kr,j=ye,pn=kt,Vr=Function,Ue=function(r){try{return Vr('"use strict"; return ('+r+").constructor;")()}catch{}},q=Object.getOwnPropertyDescriptor;if(q)try{q({},"")}catch{q=null}var Fe=function(){throw new j},yn=q?function(){try{return arguments.callee,Fe}catch{try{return q(arguments,"callee").get}catch{return Fe}}}():Fe,K=Kt(),dn=Qt(),A=Object.getPrototypeOf||(dn?function(r){return r.__proto__}:null),Q={},mn=typeof Uint8Array>"u"||!A?v:A(Uint8Array),G={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?v:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?v:ArrayBuffer,"%ArrayIteratorPrototype%":K&&A?A([][Symbol.iterator]()):v,"%AsyncFromSyncIteratorPrototype%":v,"%AsyncFunction%":Q,"%AsyncGenerator%":Q,"%AsyncGeneratorFunction%":Q,"%AsyncIteratorPrototype%":Q,"%Atomics%":typeof Atomics>"u"?v:Atomics,"%BigInt%":typeof BigInt>"u"?v:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?v:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?v:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?v:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":fn,"%eval%":eval,"%EvalError%":un,"%Float32Array%":typeof Float32Array>"u"?v:Float32Array,"%Float64Array%":typeof Float64Array>"u"?v:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?v:FinalizationRegistry,"%Function%":Vr,"%GeneratorFunction%":Q,"%Int8Array%":typeof Int8Array>"u"?v:Int8Array,"%Int16Array%":typeof Int16Array>"u"?v:Int16Array,"%Int32Array%":typeof Int32Array>"u"?v:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":K&&A?A(A([][Symbol.iterator]())):v,"%JSON%":typeof JSON=="object"?JSON:v,"%Map%":typeof Map>"u"?v:Map,"%MapIteratorPrototype%":typeof Map>"u"||!K||!A?v:A(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?v:Promise,"%Proxy%":typeof Proxy>"u"?v:Proxy,"%RangeError%":cn,"%ReferenceError%":sn,"%Reflect%":typeof Reflect>"u"?v:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?v:Set,"%SetIteratorPrototype%":typeof Set>"u"||!K||!A?v:A(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?v:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":K&&A?A(""[Symbol.iterator]()):v,"%Symbol%":K?Symbol:v,"%SyntaxError%":Z,"%ThrowTypeError%":yn,"%TypedArray%":mn,"%TypeError%":j,"%Uint8Array%":typeof Uint8Array>"u"?v:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?v:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?v:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?v:Uint32Array,"%URIError%":pn,"%WeakMap%":typeof WeakMap>"u"?v:WeakMap,"%WeakRef%":typeof WeakRef>"u"?v:WeakRef,"%WeakSet%":typeof WeakSet>"u"?v:WeakSet};if(A)try{null.error}catch(r){var hn=A(A(r));G["%Error.prototype%"]=hn}var vn=function r(e){var t;if(e==="%AsyncFunction%")t=Ue("async function () {}");else if(e==="%GeneratorFunction%")t=Ue("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=Ue("async function* () {}");else if(e==="%AsyncGenerator%"){var n=r("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var a=r("%AsyncGenerator%");a&&A&&(t=A(a.prototype))}return G[e]=t,t},vr={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},de=lr,$e=ln,gn=de.call(Function.call,Array.prototype.concat),wn=de.call(Function.apply,Array.prototype.splice),gr=de.call(Function.call,String.prototype.replace),xe=de.call(Function.call,String.prototype.slice),bn=de.call(Function.call,RegExp.prototype.exec),Sn=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,En=/\\(\\)?/g,An=function(e){var t=xe(e,0,1),n=xe(e,-1);if(t==="%"&&n!=="%")throw new Z("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new Z("invalid intrinsic syntax, expected opening `%`");var a=[];return gr(e,Sn,function(o,i,f,l){a[a.length]=f?gr(l,En,"$1"):i||o}),a},Pn=function(e,t){var n=e,a;if($e(vr,n)&&(a=vr[n],n="%"+a[0]+"%"),$e(G,n)){var o=G[n];if(o===Q&&(o=vn(n)),typeof o>"u"&&!t)throw new j("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:a,name:n,value:o}}throw new Z("intrinsic "+e+" does not exist!")},te=function(e,t){if(typeof e!="string"||e.length===0)throw new j("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new j('"allowMissing" argument must be a boolean');if(bn(/^%?[^%]*%?$/,e)===null)throw new Z("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=An(e),a=n.length>0?n[0]:"",o=Pn("%"+a+"%",t),i=o.name,f=o.value,l=!1,u=o.alias;u&&(a=u[0],wn(n,gn([0,1],u)));for(var s=1,p=!0;s<n.length;s+=1){var c=n[s],d=xe(c,0,1),y=xe(c,-1);if((d==='"'||d==="'"||d==="`"||y==='"'||y==="'"||y==="`")&&d!==y)throw new Z("property names with quotes must have matching quotes");if((c==="constructor"||!p)&&(l=!0),a+="."+c,i="%"+a+"%",$e(G,i))f=G[i];else if(f!=null){if(!(c in f)){if(!t)throw new j("base intrinsic for "+e+" exists, but the property is not available.");return}if(q&&s+1>=n.length){var m=q(f,c);p=!!m,p&&"get"in m&&!("originalValue"in m.get)?f=m.get:f=f[c]}else p=$e(f,c),f=f[c];p&&!l&&(G[i]=f)}}return f},Qr={exports:{}},Le,wr;function fr(){if(wr)return Le;wr=1;var r=te,e=r("%Object.defineProperty%",!0)||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Le=e,Le}var $n=te,Ee=$n("%Object.getOwnPropertyDescriptor%",!0);if(Ee)try{Ee([],"length")}catch{Ee=null}var jr=Ee,br=fr(),xn=Kr,V=ye,Sr=jr,In=function(e,t,n){if(!e||typeof e!="object"&&typeof e!="function")throw new V("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new V("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new V("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new V("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new V("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new V("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,i=arguments.length>5?arguments[5]:null,f=arguments.length>6?arguments[6]:!1,l=!!Sr&&Sr(e,t);if(br)br(e,t,{configurable:i===null&&l?l.configurable:!i,enumerable:a===null&&l?l.enumerable:!a,value:n,writable:o===null&&l?l.writable:!o});else if(f||!a&&!o&&!i)e[t]=n;else throw new xn("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Je=fr(),Jr=function(){return!!Je};Jr.hasArrayLengthDefineBug=function(){if(!Je)return null;try{return Je([],"length",{value:1}).length!==1}catch{return!0}};var On=Jr,Tn=te,Er=In,Cn=On(),Ar=jr,Pr=ye,Rn=Tn("%Math.floor%"),Dn=function(e,t){if(typeof e!="function")throw new Pr("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||Rn(t)!==t)throw new Pr("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],a=!0,o=!0;if("length"in e&&Ar){var i=Ar(e,"length");i&&!i.configurable&&(a=!1),i&&!i.writable&&(o=!1)}return(a||o||!n)&&(Cn?Er(e,"length",t,!0,!0):Er(e,"length",t)),e};(function(r){var e=lr,t=te,n=Dn,a=ye,o=t("%Function.prototype.apply%"),i=t("%Function.prototype.call%"),f=t("%Reflect.apply%",!0)||e.call(i,o),l=fr(),u=t("%Math.max%");r.exports=function(c){if(typeof c!="function")throw new a("a function is required");var d=f(e,i,arguments);return n(d,1+u(0,c.length-(arguments.length-1)),!0)};var s=function(){return f(e,o,arguments)};l?l(r.exports,"apply",{value:s}):r.exports.apply=s})(Qr);var _n=Qr.exports,Xr=te,Yr=_n,Mn=Yr(Xr("String.prototype.indexOf")),Nn=function(e,t){var n=Xr(e,!!t);return typeof n=="function"&&Mn(e,".prototype.")>-1?Yr(n):n},Bn=bt.inspect,ur=typeof Map=="function"&&Map.prototype,We=Object.getOwnPropertyDescriptor&&ur?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Ie=ur&&We&&typeof We.get=="function"?We.get:null,$r=ur&&Map.prototype.forEach,cr=typeof Set=="function"&&Set.prototype,qe=Object.getOwnPropertyDescriptor&&cr?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Oe=cr&&qe&&typeof qe.get=="function"?qe.get:null,xr=cr&&Set.prototype.forEach,Un=typeof WeakMap=="function"&&WeakMap.prototype,ue=Un?WeakMap.prototype.has:null,Fn=typeof WeakSet=="function"&&WeakSet.prototype,ce=Fn?WeakSet.prototype.has:null,Ln=typeof WeakRef=="function"&&WeakRef.prototype,Ir=Ln?WeakRef.prototype.deref:null,Wn=Boolean.prototype.valueOf,qn=Object.prototype.toString,Gn=Function.prototype.toString,kn=String.prototype.match,sr=String.prototype.slice,B=String.prototype.replace,zn=String.prototype.toUpperCase,Or=String.prototype.toLowerCase,Zr=RegExp.prototype.test,Tr=Array.prototype.concat,C=Array.prototype.join,Hn=Array.prototype.slice,Cr=Math.floor,Xe=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Ge=Object.getOwnPropertySymbols,Ye=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,ee=typeof Symbol=="function"&&typeof Symbol.iterator=="object",$=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===ee||!0)?Symbol.toStringTag:null,et=Object.prototype.propertyIsEnumerable,Rr=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(r){return r.__proto__}:null);function Dr(r,e){if(r===1/0||r===-1/0||r!==r||r&&r>-1e3&&r<1e3||Zr.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof r=="number"){var n=r<0?-Cr(-r):Cr(r);if(n!==r){var a=String(n),o=sr.call(e,a.length+1);return B.call(a,t,"$&_")+"."+B.call(B.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return B.call(e,t,"$&_")}var Ze=Bn,_r=Ze.custom,Mr=tt(_r)?_r:null,Kn=function r(e,t,n,a){var o=t||{};if(N(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(N(o,"maxStringLength")&&(typeof o.maxStringLength=="number"?o.maxStringLength<0&&o.maxStringLength!==1/0:o.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var i=N(o,"customInspect")?o.customInspect:!0;if(typeof i!="boolean"&&i!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(N(o,"indent")&&o.indent!==null&&o.indent!==" "&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(N(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var f=o.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return at(e,o);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var l=String(e);return f?Dr(e,l):l}if(typeof e=="bigint"){var u=String(e)+"n";return f?Dr(e,u):u}var s=typeof o.depth>"u"?5:o.depth;if(typeof n>"u"&&(n=0),n>=s&&s>0&&typeof e=="object")return er(e)?"[Array]":"[Object]";var p=ca(o,n);if(typeof a>"u")a=[];else if(nt(a,e)>=0)return"[Circular]";function c(I,_,M){if(_&&(a=Hn.call(a),a.push(_)),M){var oe={depth:o.depth};return N(o,"quoteStyle")&&(oe.quoteStyle=o.quoteStyle),r(I,oe,n+1,a)}return r(I,o,n+1,a)}if(typeof e=="function"&&!Nr(e)){var d=ra(e),y=ve(e,c);return"[Function"+(d?": "+d:" (anonymous)")+"]"+(y.length>0?" { "+C.call(y,", ")+" }":"")}if(tt(e)){var m=ee?B.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Ye.call(e);return typeof e=="object"&&!ee?le(m):m}if(la(e)){for(var g="<"+Or.call(String(e.nodeName)),S=e.attributes||[],P=0;P<S.length;P++)g+=" "+S[P].name+"="+rt(Vn(S[P].value),"double",o);return g+=">",e.childNodes&&e.childNodes.length&&(g+="..."),g+="</"+Or.call(String(e.nodeName))+">",g}if(er(e)){if(e.length===0)return"[]";var h=ve(e,c);return p&&!ua(h)?"["+rr(h,p)+"]":"[ "+C.call(h,", ")+" ]"}if(jn(e)){var R=ve(e,c);return!("cause"in Error.prototype)&&"cause"in e&&!et.call(e,"cause")?"{ ["+String(e)+"] "+C.call(Tr.call("[cause]: "+c(e.cause),R),", ")+" }":R.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+C.call(R,", ")+" }"}if(typeof e=="object"&&i){if(Mr&&typeof e[Mr]=="function"&&Ze)return Ze(e,{depth:s-n});if(i!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(ta(e)){var F=[];return $r&&$r.call(e,function(I,_){F.push(c(_,e,!0)+" => "+c(I,e))}),Br("Map",Ie.call(e),F,p)}if(oa(e)){var ae=[];return xr&&xr.call(e,function(I){ae.push(c(I,e))}),Br("Set",Oe.call(e),ae,p)}if(na(e))return ke("WeakMap");if(ia(e))return ke("WeakSet");if(aa(e))return ke("WeakRef");if(Xn(e))return le(c(Number(e)));if(Zn(e))return le(c(Xe.call(e)));if(Yn(e))return le(Wn.call(e));if(Jn(e))return le(c(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(typeof globalThis<"u"&&e===globalThis||typeof J.commonjsGlobal<"u"&&e===J.commonjsGlobal)return"{ [object globalThis] }";if(!Qn(e)&&!Nr(e)){var z=ve(e,c),me=Rr?Rr(e)===Object.prototype:e instanceof Object||e.constructor===Object,L=e instanceof Object?"":"null prototype",D=!me&&$&&Object(e)===e&&$ in e?sr.call(U(e),8,-1):L?"Object":"",he=me||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",H=he+(D||L?"["+C.call(Tr.call([],D||[],L||[]),": ")+"] ":"");return z.length===0?H+"{}":p?H+"{"+rr(z,p)+"}":H+"{ "+C.call(z,", ")+" }"}return String(e)};function rt(r,e,t){var n=(t.quoteStyle||e)==="double"?'"':"'";return n+r+n}function Vn(r){return B.call(String(r),/"/g,"&quot;")}function er(r){return U(r)==="[object Array]"&&(!$||!(typeof r=="object"&&$ in r))}function Qn(r){return U(r)==="[object Date]"&&(!$||!(typeof r=="object"&&$ in r))}function Nr(r){return U(r)==="[object RegExp]"&&(!$||!(typeof r=="object"&&$ in r))}function jn(r){return U(r)==="[object Error]"&&(!$||!(typeof r=="object"&&$ in r))}function Jn(r){return U(r)==="[object String]"&&(!$||!(typeof r=="object"&&$ in r))}function Xn(r){return U(r)==="[object Number]"&&(!$||!(typeof r=="object"&&$ in r))}function Yn(r){return U(r)==="[object Boolean]"&&(!$||!(typeof r=="object"&&$ in r))}function tt(r){if(ee)return r&&typeof r=="object"&&r instanceof Symbol;if(typeof r=="symbol")return!0;if(!r||typeof r!="object"||!Ye)return!1;try{return Ye.call(r),!0}catch{}return!1}function Zn(r){if(!r||typeof r!="object"||!Xe)return!1;try{return Xe.call(r),!0}catch{}return!1}var ea=Object.prototype.hasOwnProperty||function(r){return r in this};function N(r,e){return ea.call(r,e)}function U(r){return qn.call(r)}function ra(r){if(r.name)return r.name;var e=kn.call(Gn.call(r),/^function\s*([\w$]+)/);return e?e[1]:null}function nt(r,e){if(r.indexOf)return r.indexOf(e);for(var t=0,n=r.length;t<n;t++)if(r[t]===e)return t;return-1}function ta(r){if(!Ie||!r||typeof r!="object")return!1;try{Ie.call(r);try{Oe.call(r)}catch{return!0}return r instanceof Map}catch{}return!1}function na(r){if(!ue||!r||typeof r!="object")return!1;try{ue.call(r,ue);try{ce.call(r,ce)}catch{return!0}return r instanceof WeakMap}catch{}return!1}function aa(r){if(!Ir||!r||typeof r!="object")return!1;try{return Ir.call(r),!0}catch{}return!1}function oa(r){if(!Oe||!r||typeof r!="object")return!1;try{Oe.call(r);try{Ie.call(r)}catch{return!0}return r instanceof Set}catch{}return!1}function ia(r){if(!ce||!r||typeof r!="object")return!1;try{ce.call(r,ce);try{ue.call(r,ue)}catch{return!0}return r instanceof WeakSet}catch{}return!1}function la(r){return!r||typeof r!="object"?!1:typeof HTMLElement<"u"&&r instanceof HTMLElement?!0:typeof r.nodeName=="string"&&typeof r.getAttribute=="function"}function at(r,e){if(r.length>e.maxStringLength){var t=r.length-e.maxStringLength,n="... "+t+" more character"+(t>1?"s":"");return at(sr.call(r,0,e.maxStringLength),e)+n}var a=B.call(B.call(r,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,fa);return rt(a,"single",e)}function fa(r){var e=r.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\"+t:"\\x"+(e<16?"0":"")+zn.call(e.toString(16))}function le(r){return"Object("+r+")"}function ke(r){return r+" { ? }"}function Br(r,e,t,n){var a=n?rr(t,n):C.call(t,", ");return r+" ("+e+") {"+a+"}"}function ua(r){for(var e=0;e<r.length;e++)if(nt(r[e],`
2
- `)>=0)return!1;return!0}function ca(r,e){var t;if(r.indent===" ")t=" ";else if(typeof r.indent=="number"&&r.indent>0)t=C.call(Array(r.indent+1)," ");else return null;return{base:t,prev:C.call(Array(e+1),t)}}function rr(r,e){if(r.length===0)return"";var t=`
3
- `+e.prev+e.base;return t+C.call(r,","+t)+`
4
- `+e.prev}function ve(r,e){var t=er(r),n=[];if(t){n.length=r.length;for(var a=0;a<r.length;a++)n[a]=N(r,a)?e(r[a],r):""}var o=typeof Ge=="function"?Ge(r):[],i;if(ee){i={};for(var f=0;f<o.length;f++)i["$"+o[f]]=o[f]}for(var l in r)N(r,l)&&(t&&String(Number(l))===l&&l<r.length||ee&&i["$"+l]instanceof Symbol||(Zr.call(/[^\w$]/,l)?n.push(e(l,r)+": "+e(r[l],r)):n.push(l+": "+e(r[l],r))));if(typeof Ge=="function")for(var u=0;u<o.length;u++)et.call(r,o[u])&&n.push("["+e(o[u])+"]: "+e(r[o[u]],r));return n}var ot=te,ne=Nn,sa=Kn,pa=ye,ge=ot("%WeakMap%",!0),we=ot("%Map%",!0),ya=ne("WeakMap.prototype.get",!0),da=ne("WeakMap.prototype.set",!0),ma=ne("WeakMap.prototype.has",!0),ha=ne("Map.prototype.get",!0),va=ne("Map.prototype.set",!0),ga=ne("Map.prototype.has",!0),pr=function(r,e){for(var t=r,n;(n=t.next)!==null;t=n)if(n.key===e)return t.next=n.next,n.next=r.next,r.next=n,n},wa=function(r,e){var t=pr(r,e);return t&&t.value},ba=function(r,e,t){var n=pr(r,e);n?n.value=t:r.next={key:e,next:r.next,value:t}},Sa=function(r,e){return!!pr(r,e)},Ea=function(){var e,t,n,a={assert:function(o){if(!a.has(o))throw new pa("Side channel does not contain "+sa(o))},get:function(o){if(ge&&o&&(typeof o=="object"||typeof o=="function")){if(e)return ya(e,o)}else if(we){if(t)return ha(t,o)}else if(n)return wa(n,o)},has:function(o){if(ge&&o&&(typeof o=="object"||typeof o=="function")){if(e)return ma(e,o)}else if(we){if(t)return ga(t,o)}else if(n)return Sa(n,o);return!1},set:function(o,i){ge&&o&&(typeof o=="object"||typeof o=="function")?(e||(e=new ge),da(e,o,i)):we?(t||(t=new we),va(t,o,i)):(n||(n={key:{},next:null}),ba(n,o,i))}};return a},Aa=String.prototype.replace,Pa=/%20/g,ze={RFC1738:"RFC1738",RFC3986:"RFC3986"},yr={default:ze.RFC3986,formatters:{RFC1738:function(r){return Aa.call(r,Pa,"+")},RFC3986:function(r){return String(r)}},RFC1738:ze.RFC1738,RFC3986:ze.RFC3986},$a=yr,He=Object.prototype.hasOwnProperty,W=Array.isArray,O=function(){for(var r=[],e=0;e<256;++e)r.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return r}(),xa=function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(W(n)){for(var a=[],o=0;o<n.length;++o)typeof n[o]<"u"&&a.push(n[o]);t.obj[t.prop]=a}}},it=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},a=0;a<e.length;++a)typeof e[a]<"u"&&(n[a]=e[a]);return n},Ia=function r(e,t,n){if(!t)return e;if(typeof t!="object"){if(W(e))e.push(t);else if(e&&typeof e=="object")(n&&(n.plainObjects||n.allowPrototypes)||!He.call(Object.prototype,t))&&(e[t]=!0);else return[e,t];return e}if(!e||typeof e!="object")return[e].concat(t);var a=e;return W(e)&&!W(t)&&(a=it(e,n)),W(e)&&W(t)?(t.forEach(function(o,i){if(He.call(e,i)){var f=e[i];f&&typeof f=="object"&&o&&typeof o=="object"?e[i]=r(f,o,n):e.push(o)}else e[i]=o}),e):Object.keys(t).reduce(function(o,i){var f=t[i];return He.call(o,i)?o[i]=r(o[i],f,n):o[i]=f,o},a)},Oa=function(e,t){return Object.keys(t).reduce(function(n,a){return n[a]=t[a],n},e)},Ta=function(r,e,t){var n=r.replace(/\+/g," ");if(t==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},Ke=1024,Ca=function(e,t,n,a,o){if(e.length===0)return e;var i=e;if(typeof e=="symbol"?i=Symbol.prototype.toString.call(e):typeof e!="string"&&(i=String(e)),n==="iso-8859-1")return escape(i).replace(/%u[0-9a-f]{4}/gi,function(d){return"%26%23"+parseInt(d.slice(2),16)+"%3B"});for(var f="",l=0;l<i.length;l+=Ke){for(var u=i.length>=Ke?i.slice(l,l+Ke):i,s=[],p=0;p<u.length;++p){var c=u.charCodeAt(p);if(c===45||c===46||c===95||c===126||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||o===$a.RFC1738&&(c===40||c===41)){s[s.length]=u.charAt(p);continue}if(c<128){s[s.length]=O[c];continue}if(c<2048){s[s.length]=O[192|c>>6]+O[128|c&63];continue}if(c<55296||c>=57344){s[s.length]=O[224|c>>12]+O[128|c>>6&63]+O[128|c&63];continue}p+=1,c=65536+((c&1023)<<10|u.charCodeAt(p)&1023),s[s.length]=O[240|c>>18]+O[128|c>>12&63]+O[128|c>>6&63]+O[128|c&63]}f+=s.join("")}return f},Ra=function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],a=0;a<t.length;++a)for(var o=t[a],i=o.obj[o.prop],f=Object.keys(i),l=0;l<f.length;++l){var u=f[l],s=i[u];typeof s=="object"&&s!==null&&n.indexOf(s)===-1&&(t.push({obj:i,prop:u}),n.push(s))}return xa(t),e},Da=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},_a=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},Ma=function(e,t){return[].concat(e,t)},Na=function(e,t){if(W(e)){for(var n=[],a=0;a<e.length;a+=1)n.push(t(e[a]));return n}return t(e)},lt={arrayToObject:it,assign:Oa,combine:Ma,compact:Ra,decode:Ta,encode:Ca,isBuffer:_a,isRegExp:Da,maybeMap:Na,merge:Ia},ft=Ea,Ae=lt,se=yr,Ba=Object.prototype.hasOwnProperty,ut={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},T=Array.isArray,Ua=Array.prototype.push,ct=function(r,e){Ua.apply(r,T(e)?e:[e])},Fa=Date.prototype.toISOString,Ur=se.default,E={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:Ae.encode,encodeValuesOnly:!1,format:Ur,formatter:se.formatters[Ur],indices:!1,serializeDate:function(e){return Fa.call(e)},skipNulls:!1,strictNullHandling:!1},La=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},Ve={},Wa=function r(e,t,n,a,o,i,f,l,u,s,p,c,d,y,m,g,S,P){for(var h=e,R=P,F=0,ae=!1;(R=R.get(Ve))!==void 0&&!ae;){var z=R.get(e);if(F+=1,typeof z<"u"){if(z===F)throw new RangeError("Cyclic object value");ae=!0}typeof R.get(Ve)>"u"&&(F=0)}if(typeof s=="function"?h=s(t,h):h instanceof Date?h=d(h):n==="comma"&&T(h)&&(h=Ae.maybeMap(h,function(_e){return _e instanceof Date?d(_e):_e})),h===null){if(i)return u&&!g?u(t,E.encoder,S,"key",y):t;h=""}if(La(h)||Ae.isBuffer(h)){if(u){var me=g?t:u(t,E.encoder,S,"key",y);return[m(me)+"="+m(u(h,E.encoder,S,"value",y))]}return[m(t)+"="+m(String(h))]}var L=[];if(typeof h>"u")return L;var D;if(n==="comma"&&T(h))g&&u&&(h=Ae.maybeMap(h,u)),D=[{value:h.length>0?h.join(",")||null:void 0}];else if(T(s))D=s;else{var he=Object.keys(h);D=p?he.sort(p):he}var H=l?t.replace(/\./g,"%2E"):t,I=a&&T(h)&&h.length===1?H+"[]":H;if(o&&T(h)&&h.length===0)return I+"[]";for(var _=0;_<D.length;++_){var M=D[_],oe=typeof M=="object"&&typeof M.value<"u"?M.value:h[M];if(!(f&&oe===null)){var De=c&&l?M.replace(/\./g,"%2E"):M,ht=T(h)?typeof n=="function"?n(I,De):I:I+(c?"."+De:"["+De+"]");P.set(e,F);var dr=ft();dr.set(Ve,P),ct(L,r(oe,ht,n,a,o,i,f,l,n==="comma"&&g&&T(h)?null:u,s,p,c,d,y,m,g,S,dr))}}return L},qa=function(e){if(!e)return E;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.encodeDotInKeys<"u"&&typeof e.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(e.encoder!==null&&typeof e.encoder<"u"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var t=e.charset||E.charset;if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=se.default;if(typeof e.format<"u"){if(!Ba.call(se.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var a=se.formatters[n],o=E.filter;(typeof e.filter=="function"||T(e.filter))&&(o=e.filter);var i;if(e.arrayFormat in ut?i=e.arrayFormat:"indices"in e?i=e.indices?"indices":"repeat":i=E.arrayFormat,"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var f=typeof e.allowDots>"u"?e.encodeDotInKeys===!0?!0:E.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:E.addQueryPrefix,allowDots:f,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:E.allowEmptyArrays,arrayFormat:i,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:E.charsetSentinel,commaRoundTrip:e.commaRoundTrip,delimiter:typeof e.delimiter>"u"?E.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:E.encode,encodeDotInKeys:typeof e.encodeDotInKeys=="boolean"?e.encodeDotInKeys:E.encodeDotInKeys,encoder:typeof e.encoder=="function"?e.encoder:E.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:E.encodeValuesOnly,filter:o,format:n,formatter:a,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:E.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:E.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:E.strictNullHandling}},Ga=function(r,e){var t=r,n=qa(e),a,o;typeof n.filter=="function"?(o=n.filter,t=o("",t)):T(n.filter)&&(o=n.filter,a=o);var i=[];if(typeof t!="object"||t===null)return"";var f=ut[n.arrayFormat],l=f==="comma"&&n.commaRoundTrip;a||(a=Object.keys(t)),n.sort&&a.sort(n.sort);for(var u=ft(),s=0;s<a.length;++s){var p=a[s];n.skipNulls&&t[p]===null||ct(i,Wa(t[p],p,f,l,n.allowEmptyArrays,n.strictNullHandling,n.skipNulls,n.encodeDotInKeys,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,u))}var c=i.join(n.delimiter),d=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?d+="utf8=%26%2310003%3B&":d+="utf8=%E2%9C%93&"),c.length>0?d+c:""},re=lt,tr=Object.prototype.hasOwnProperty,ka=Array.isArray,b={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:re.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},za=function(r){return r.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},st=function(r,e){return r&&typeof r=="string"&&e.comma&&r.indexOf(",")>-1?r.split(","):r},Ha="utf8=%26%2310003%3B",Ka="utf8=%E2%9C%93",Va=function(e,t){var n={__proto__:null},a=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;a=a.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var o=t.parameterLimit===1/0?void 0:t.parameterLimit,i=a.split(t.delimiter,o),f=-1,l,u=t.charset;if(t.charsetSentinel)for(l=0;l<i.length;++l)i[l].indexOf("utf8=")===0&&(i[l]===Ka?u="utf-8":i[l]===Ha&&(u="iso-8859-1"),f=l,l=i.length);for(l=0;l<i.length;++l)if(l!==f){var s=i[l],p=s.indexOf("]="),c=p===-1?s.indexOf("="):p+1,d,y;c===-1?(d=t.decoder(s,b.decoder,u,"key"),y=t.strictNullHandling?null:""):(d=t.decoder(s.slice(0,c),b.decoder,u,"key"),y=re.maybeMap(st(s.slice(c+1),t),function(g){return t.decoder(g,b.decoder,u,"value")})),y&&t.interpretNumericEntities&&u==="iso-8859-1"&&(y=za(y)),s.indexOf("[]=")>-1&&(y=ka(y)?[y]:y);var m=tr.call(n,d);m&&t.duplicates==="combine"?n[d]=re.combine(n[d],y):(!m||t.duplicates==="last")&&(n[d]=y)}return n},Qa=function(r,e,t,n){for(var a=n?e:st(e,t),o=r.length-1;o>=0;--o){var i,f=r[o];if(f==="[]"&&t.parseArrays)i=t.allowEmptyArrays&&(a===""||t.strictNullHandling&&a===null)?[]:[].concat(a);else{i=t.plainObjects?Object.create(null):{};var l=f.charAt(0)==="["&&f.charAt(f.length-1)==="]"?f.slice(1,-1):f,u=t.decodeDotInKeys?l.replace(/%2E/g,"."):l,s=parseInt(u,10);!t.parseArrays&&u===""?i={0:a}:!isNaN(s)&&f!==u&&String(s)===u&&s>=0&&t.parseArrays&&s<=t.arrayLimit?(i=[],i[s]=a):u!=="__proto__"&&(i[u]=a)}a=i}return a},ja=function(e,t,n,a){if(e){var o=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/,f=/(\[[^[\]]*])/g,l=n.depth>0&&i.exec(o),u=l?o.slice(0,l.index):o,s=[];if(u){if(!n.plainObjects&&tr.call(Object.prototype,u)&&!n.allowPrototypes)return;s.push(u)}for(var p=0;n.depth>0&&(l=f.exec(o))!==null&&p<n.depth;){if(p+=1,!n.plainObjects&&tr.call(Object.prototype,l[1].slice(1,-1))&&!n.allowPrototypes)return;s.push(l[1])}if(l){if(n.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+n.depth+" and strictDepth is true");s.push("["+o.slice(l.index)+"]")}return Qa(s,t,n,a)}},Ja=function(e){if(!e)return b;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.decodeDotInKeys<"u"&&typeof e.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(e.decoder!==null&&typeof e.decoder<"u"&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=typeof e.charset>"u"?b.charset:e.charset,n=typeof e.duplicates>"u"?b.duplicates:e.duplicates;if(n!=="combine"&&n!=="first"&&n!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var a=typeof e.allowDots>"u"?e.decodeDotInKeys===!0?!0:b.allowDots:!!e.allowDots;return{allowDots:a,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:b.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:b.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:b.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:b.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:b.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:b.comma,decodeDotInKeys:typeof e.decodeDotInKeys=="boolean"?e.decodeDotInKeys:b.decodeDotInKeys,decoder:typeof e.decoder=="function"?e.decoder:b.decoder,delimiter:typeof e.delimiter=="string"||re.isRegExp(e.delimiter)?e.delimiter:b.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:b.depth,duplicates:n,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:b.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:b.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:b.plainObjects,strictDepth:typeof e.strictDepth=="boolean"?!!e.strictDepth:b.strictDepth,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:b.strictNullHandling}},Xa=function(r,e){var t=Ja(e);if(r===""||r===null||typeof r>"u")return t.plainObjects?Object.create(null):{};for(var n=typeof r=="string"?Va(r,t):r,a=t.plainObjects?Object.create(null):{},o=Object.keys(n),i=0;i<o.length;++i){var f=o[i],l=ja(f,n[f],t,typeof r=="string");a=re.merge(a,l,t)}return t.allowSparse===!0?a:re.compact(a)},Ya=Ga,Za=Xa,eo=yr,ro={formats:eo,parse:Za,stringify:Ya};const to=J.getDefaultExportFromCjs(ro);function Fr(r){if(!Array.isArray(r))throw new TypeError("Middleware stack must be an array!");for(const e of r)if(typeof e!="function")throw new TypeError("Middleware must be composed of functions!");return function(e,t){let n=-1;return a(0);function a(o){if(o<=n)return Promise.reject(new Error("next() called multiple times"));n=o;let i=r[o];if(o===r.length&&(i=t),!i)return Promise.resolve();try{return Promise.resolve(i(e,a.bind(null,o+1)))}catch(f){return Promise.reject(f)}}}}const w={app:null,appPending:!0,appCb:[],services:new Map,servicePending:new Map,serviceCb:new Map,config:null,configPending:!1,configCb:[]};async function no(r){if(w.config)return w.config;if(w.configPending)return new Promise(t=>{w.configCb.push(n=>t(n))});w.configPending=!0;const e=await r();return w.config=e,w.configCb.forEach(t=>t(e)),w.configCb=[],w.configPending=!1,e}class pt{constructor(e={},t){x(this,"options");x(this,"apis",[]);x(this,"middlewares",[]);x(this,"defaultMiddlewares",[async(e,t)=>{try{await t()}catch(n){e.res.body=n.message||""}}]);x(this,"api404");x(this,"fnMiddleware");x(this,"getId");x(this,"extensions",new Map);x(this,"onDestroyCbs",[]);x(this,"config");x(this,"apiList");this.options={...e,baseUrl:e.baseUrl??"/"},this.options.baseUrl=this.options.baseUrl.split("/").map(a=>encodeURIComponent(a)).join("/"),this.middlewares.push(...this.defaultMiddlewares),this.middlewares.push(...e.middlewares||[]);const n=((e==null?void 0:e.apis)??[]).sort((a,o)=>{const i=o.path.substr(-1,1),f=i==="*"?0:i==="/"?.1:.2,l=a.path.substr(-1,1),u=l==="*"?0:l==="/"?.1:.2;return o.path.split("/").length+f-(a.path.split("/").length+u)}).map(a=>({...a,method:a.method??(e==null?void 0:e.defaultMethod)??"post"}));this.apiList=n,this.apis=n.filter(a=>!a.disabled),this.api404={path:"*",method:"all",action:(a,o)=>{throw o.res.status=404,Error("Not Found")}},this.fnMiddleware=Fr(this.middlewares),this.getId=J.useSoonIdGen({workerId:e.workId}),this.init(t)}async init(e){var t,n,a,o;try{if(this.options.config){const i=await this.options.config();this.config=i}await((n=(t=this.options)==null?void 0:t.onInit)==null?void 0:n.call(t,this)),w.app=this,w.appPending=!1,w.appCb.forEach(i=>i(this)),await((o=(a=this.options)==null?void 0:a.onReady)==null?void 0:o.call(a,this)),e==null||e(null,this)}catch(i){e==null||e(i,this)}}async fetchRaw(e,t,n){var c,d;const a=(n==null?void 0:n.url)??e,o=new URL(a,"http://localhost"),i=this.getId(),f={baseUrl:this.options.baseUrl??"",headers:(n==null?void 0:n.headers)??{},method:(n==null?void 0:n.method)??this.options.defaultMethod??"post",body:(n==null?void 0:n.body)??t,params:{},path:o.pathname,queryString:n!=null&&n.query?"?"+to.stringify(n.query):o.search,query:(n==null?void 0:n.query)??Object.fromEntries(o.searchParams),url:a,reqId:i,requestId:i,ip:(n==null?void 0:n.ip)??"",namespace:(n==null?void 0:n.namespace)??"default"};let l=this.api404;for(let y=0;y<this.apis.length;y++){const m=this.apis[y];if((m.namespace??"default")===f.namespace&&(m.method==="all"||m.method===((d=(c=f.method)==null?void 0:c.toLowerCase)==null?void 0:d.call(c)))){const P=St((this.options.baseUrl??"")+m.path,{loose:!1,trailing:!1})(f.path);if(P){f.params=P.params,l=m;break}}}const u={body:void 0,headers:{},status:200},s={app:this,currentAPI:l,req:f,request:f,reqId:i,requestId:i,res:u,response:u,platform:n==null?void 0:n.platform,config:this.config,meta:l.meta??{},service:{}},p=async()=>{var g,S;let y=f.body;if(l.bodySchema)if((g=l.bodySchema)!=null&&g.parse)try{y=l.bodySchema.parse(f.body)}catch(P){u.status=400;const h=(S=P==null?void 0:P.issues)==null?void 0:S[0];throw h&&(h.message=(h.path??[]).join(".")+" "+h.message),h?{...h,code:0}:new Error("参数错误")}else throw u.status=500,new Error("bodySchema must be ZodType");const m=await l.action(y,s);m!==void 0&&(u.body=m)};if(l.middlewares&&l.middlewares.length>0){const y=Fr(l.middlewares);await this.fnMiddleware(s,()=>y(s,p))}else await this.fnMiddleware(s,p);return s.res}async fetch(e,t,n){return(await this.fetchRaw(e,t,n)).body}mount(e,t){this.extensions.set(e,t)}get(e){return this.extensions.get(e)}onUnloadService(e){this.onDestroyCbs.push(e)}async unloadService(){return Promise.all(this.onDestroyCbs.map(e=>e==null?void 0:e()))}get baseUrl(){return this.options.baseUrl??""}}const yt=Symbol("soon-api");function ao(r){const e={...r};return e._soon_symbol=yt,e}const dt=Symbol("soon-service");function oo(r){async function e(){var o;const t=r.service;let n=w.services.get(t);if(n)return n;if(w.servicePending.get(t)){let i=w.serviceCb.get(t);return i||(i=[],w.serviceCb.set(t,i)),new Promise(f=>{i.push(l=>f(l))})}return w.servicePending.set(t,!0),await new Promise(i=>{w.app?i(1):w.appCb.push(()=>i(1))}),n=await t(w.app),w.services.set(t,n),(o=w.serviceCb.get(t))==null||o.forEach(i=>i(n)),w.serviceCb.delete(t),w.servicePending.delete(t),n}return e._soon_symbol=dt,e.serviceName=(r==null?void 0:r.serviceName)??"",e.autoInject=(r==null?void 0:r.autoInject)??!1,e.enableClient=(r==null?void 0:r.enableClient)??!1,e}function io(r){return r}function lo(r){return async function(){return await no(r)}}async function fo(r){return await new Promise((e,t)=>{new pt(r,(n,a)=>{if(n){t(n);return}e(a)})})}class uo extends Error{constructor(t,n){super(t);x(this,"code");this.code=n}}class co extends Error{constructor(t,n){super(t);x(this,"status");this.status=n}}function so({pingTime:r=0,action:e}){let t=()=>null;const n=new ir(a=>{let o;r>0&&(o=setInterval(()=>{f.closed?clearInterval(o):a.next({event:"ping",message:`: ping
1
+ "use strict";var vt=Object.defineProperty;var gt=(r,e,t)=>e in r?vt(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var x=(r,e,t)=>gt(r,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const wt=require("stream"),J=require("./deps/soon-id-unm7ynfew.js"),bt=require("util");var k={};Object.defineProperty(k,"__esModule",{value:!0});k.TokenData=void 0;k.parse=Ce;k.compile=It;var St=k.match=Ot;k.pathToRegexp=_t;const Et="/",nr=r=>r,At=new RegExp("^\\p{XID_Continue}$","u"),fe="https://git.new/pathToRegexpError",Pt={"!":"!","@":"@",";":";",",":",","*":"*","+":"+","?":"?","{":"{","}":"}"};function $t(r){const e=[...r],t=[];let n=0;for(;n<e.length;){const a=e[n],o=Pt[a];if(o){t.push({type:o,index:n++,value:a});continue}if(a==="\\"){t.push({type:"ESCAPED",index:n++,value:e[n++]});continue}if(a===":"){let i="";for(;At.test(e[++n]);)i+=e[n];if(!i)throw new TypeError(`Missing parameter name at ${n}`);t.push({type:"NAME",index:n,value:i});continue}if(a==="("){const i=n++;let f=1,l="";if(e[n]==="?")throw new TypeError(`Pattern cannot start with "?" at ${n}`);for(;n<e.length;){if(e[n]==="\\"){l+=e[n++]+e[n++];continue}if(e[n]===")"){if(f--,f===0){n++;break}}else if(e[n]==="("&&(f++,e[n+1]!=="?"))throw new TypeError(`Capturing groups are not allowed at ${n}`);l+=e[n++]}if(f)throw new TypeError(`Unbalanced pattern at ${i}`);if(!l)throw new TypeError(`Missing pattern at ${i}`);t.push({type:"PATTERN",index:n,value:l});continue}t.push({type:"CHAR",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),new xt(t)}class xt{constructor(e){this.tokens=e,this.index=0}peek(){return this.tokens[this.index]}tryConsume(e){const t=this.peek();if(t.type===e)return this.index++,t.value}consume(e){const t=this.tryConsume(e);if(t!==void 0)return t;const{type:n,index:a}=this.peek();throw new TypeError(`Unexpected ${n} at ${a}, expected ${e}: ${fe}`)}text(){let e="",t;for(;t=this.tryConsume("CHAR")||this.tryConsume("ESCAPED");)e+=t;return e}modifier(){return this.tryConsume("?")||this.tryConsume("*")||this.tryConsume("+")}}class pe{constructor(e,t){this.tokens=e,this.delimiter=t}}k.TokenData=pe;function Ce(r,e={}){const{encodePath:t=nr,delimiter:n=t(Et)}=e,a=[],o=$t(r);let i=0;do{const f=o.text();f&&a.push(t(f));const l=o.tryConsume("NAME"),u=o.tryConsume("PATTERN");if(l||u){a.push({name:l||String(i++),pattern:u});const c=o.peek();if(c.type==="*")throw new TypeError(`Unexpected * at ${c.index}, you probably want \`/*\` or \`{/:foo}*\`: ${fe}`);continue}if(o.tryConsume("*")){a.push({name:String(i++),pattern:`(?:(?!${X(n)}).)*`,modifier:"*",separator:n});continue}if(o.tryConsume("{")){const c=o.text(),d=o.tryConsume("NAME"),y=o.tryConsume("PATTERN"),m=o.text(),g=o.tryConsume(";")&&o.text();o.consume("}");const S=o.modifier();a.push({name:d||(y?String(i++):""),prefix:t(c),suffix:t(m),pattern:y,modifier:S,separator:g});continue}o.consume("END");break}while(!0);return new pe(a,n)}function It(r,e={}){const t=r instanceof pe?r:Ce(r,e);return Ct(t,e)}function Tt(r,e){if(typeof r=="string")return()=>r;const t=e||nr,n=r.modifier==="+"||r.modifier==="*",a=r.modifier==="?"||r.modifier==="*",{prefix:o="",suffix:i="",separator:f=i+o}=r;if(e&&n){const u=(p,c)=>{if(typeof p!="string")throw new TypeError(`Expected "${r.name}/${c}" to be a string`);return t(p)},s=p=>{if(!Array.isArray(p))throw new TypeError(`Expected "${r.name}" to be an array`);return p.length===0?"":o+p.map(u).join(f)+i};return a?p=>{const c=p[r.name];return c==null?"":c.length?s(c):""}:p=>{const c=p[r.name];return s(c)}}const l=u=>{if(typeof u!="string")throw new TypeError(`Expected "${r.name}" to be a string`);return o+t(u)+i};return a?u=>{const s=u[r.name];return s==null?"":l(s)}:u=>{const s=u[r.name];return l(s)}}function Ct(r,e){const{encode:t=encodeURIComponent,loose:n=!0,validate:a=!0,strict:o=!1}=e,i=Lr(e),f=ar(n,r.delimiter),l=qr(r,f,[],i,o),u=r.tokens.map((s,p)=>{const c=Tt(s,t);if(!a||typeof s=="string")return c;const d=new RegExp(`^${l[p]}$`,i);return y=>{const m=c(y);if(!d.test(m))throw new TypeError(`Invalid value for "${s.name}": ${JSON.stringify(m)}`);return m}});return function(p={}){let c="";for(const d of u)c+=d(p);return c}}function Ot(r,e={}){const{decode:t=decodeURIComponent,loose:n=!0}=e,a=r instanceof pe?r:Ce(r,e),o=ar(n,a.delimiter),i=[],f=Wr(a,i,e),l=i.map(u=>{if(t&&(u.modifier==="+"||u.modifier==="*")){const{prefix:s="",suffix:p="",separator:c=p+s}=u,d=new RegExp(o(c),"g");return y=>y.split(d).map(t)}return t||nr});return function(s){const p=f.exec(s);if(!p)return!1;const{0:c,index:d}=p,y=Object.create(null);for(let m=1;m<p.length;m++){if(p[m]===void 0)continue;const g=i[m-1],S=l[m-1];y[g.name]=S(p[m])}return{path:c,index:d,params:y}}}function X(r){return r.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}function Rt(r,e){const t=X(r);return e?`(?:${t})+(?!${t})`:t}function ar(r,e){if(!r)return X;const t=new RegExp(`(?:(?!${X(e)}).)+|(.)`,"g");return n=>n.replace(t,Rt)}function Lr(r){return r.sensitive?"":"i"}function Wr(r,e,t){const{trailing:n=!0,loose:a=!0,start:o=!0,end:i=!0,strict:f=!1}=t,l=Lr(t),u=ar(a,r.delimiter),s=qr(r,u,e,l,f);let p=o?"^":"";return p+=s.join(""),n&&(p+=`(?:${u(r.delimiter)})?`),p+=i?"$":`(?=${X(r.delimiter)}|$)`,new RegExp(p,l)}function qr(r,e,t,n,a){const o=`(?:(?!${X(r.delimiter)}).)+?`;let i="",f=!0;return r.tokens.map((l,u)=>{if(typeof l=="string")return i=l,e(l);const{prefix:s="",suffix:p="",separator:c=p+s,modifier:d=""}=l,y=e(s),m=e(p);if(l.name){const g=l.pattern?`(?:${l.pattern})`:o,S=Dt(g,l.name,n);if(f||(f=Me(S,s||i)),!f)throw new TypeError(`Ambiguous pattern for "${l.name}": ${fe}`);if(f=!a||Me(S,p),i="",t.push(l),d==="+"||d==="*"){const P=d==="*"?"?":"",h=e(c);if(!h)throw new TypeError(`Missing separator for "${l.name}": ${fe}`);if(f||(f=!a||Me(S,c)),!f)throw new TypeError(`Ambiguous pattern for "${l.name}" separator: ${fe}`);return f=!a,`(?:${y}(${g}(?:${h}${g})*)${m})${P}`}return`(?:${y}(${g})${m})${d}`}return`(?:${y}${m})${d}`})}function Dt(r,e,t){try{return new RegExp(`^${r}$`,t)}catch(n){throw new TypeError(`Invalid pattern for "${e}": ${n.message}`)}}function Me(r,e){return e?!r.test(e):!1}function _t(r,e={}){const t=r instanceof pe?r:Ce(r,e),n=[],a=Wr(t,n,e);return Object.assign(a,{keys:n})}var Oe={};Object.defineProperty(Oe,"__esModule",{value:!0});Oe.Observable=void 0;const Gr=r=>!!Symbol[r],or=r=>Gr(r)?Symbol[r]:"@@"+r,Mt=or("iterator"),Qe=or("observable"),kr=or("species");function Pe(r,e){let t=r[e];if(t!=null){if(typeof t!="function")throw new TypeError(t+" is not a function");return t}}function ie(r){let e=r.constructor;return e!==void 0&&(e=e[kr],e===null&&(e=void 0)),e!==void 0?e:Re}function Nt(r){return r instanceof Re}function Y(r){Y.log?Y.log(r):setTimeout(()=>{throw r})}function be(r){Promise.resolve().then(()=>{try{r()}catch(e){Y(e)}})}function zr(r){let e=r._cleanup;if(e!==void 0&&(r._cleanup=void 0,!!e))try{if(typeof e=="function")e();else{let t=Pe(e,"unsubscribe");t&&t.call(e)}}catch(t){Y(t)}}function je(r){r._observer=void 0,r._queue=void 0,r._state="closed"}function Bt(r){let e=r._queue;if(e){r._queue=void 0,r._state="ready";for(let t=0;t<e.length&&(Hr(r,e[t].type,e[t].value),r._state!=="closed");++t);}}function Hr(r,e,t){r._state="running";let n=r._observer;try{let a=Pe(n,e);switch(e){case"next":a&&a.call(n,t);break;case"error":if(je(r),a)a.call(n,t);else throw t;break;case"complete":je(r),a&&a.call(n);break}}catch(a){Y(a)}r._state==="closed"?zr(r):r._state==="running"&&(r._state="ready")}function Ne(r,e,t){if(r._state!=="closed"){if(r._state==="buffering"){r._queue.push({type:e,value:t});return}if(r._state!=="ready"){r._state="buffering",r._queue=[{type:e,value:t}],be(()=>Bt(r));return}Hr(r,e,t)}}class Ut{constructor(e,t){this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state="initializing";let n=this,a={get closed(){return n._state==="closed"},next(o){Ne(n,"next",o)},error(o){Ne(n,"error",o)},complete(){Ne(n,"complete")}};try{this._cleanup=t.call(void 0,a)}catch(o){a.error(o)}this._state==="initializing"&&(this._state="ready")}get closed(){return this._state==="closed"}unsubscribe(){this._state!=="closed"&&(je(this),zr(this))}}let Re=class Se{constructor(e){if(!(this instanceof Se))throw new TypeError("Observable cannot be called as a function");if(typeof e!="function")throw new TypeError("Observable initializer must be a function");this._subscriber=e}subscribe(e){return(typeof e!="object"||e===null)&&(e={next:e,error:arguments[1],complete:arguments[2]}),new Ut(e,this._subscriber)}forEach(e){return new Promise((t,n)=>{if(typeof e!="function"){n(new TypeError(e+" is not a function"));return}function a(){o.unsubscribe(),t()}let o=this.subscribe({next(i){try{e(i,a)}catch(f){n(f),o.unsubscribe()}},error:n,complete:t})})}map(e){if(typeof e!="function")throw new TypeError(e+" is not a function");let t=ie(this);return new t(n=>this.subscribe({next(a){try{a=e(a)}catch(o){return n.error(o)}n.next(a)},error(a){n.error(a)},complete(){n.complete()}}))}filter(e){if(typeof e!="function")throw new TypeError(e+" is not a function");let t=ie(this);return new t(n=>this.subscribe({next(a){try{if(!e(a))return}catch(o){return n.error(o)}n.next(a)},error(a){n.error(a)},complete(){n.complete()}}))}reduce(e){if(typeof e!="function")throw new TypeError(e+" is not a function");let t=ie(this),n=arguments.length>1,a=!1,i=arguments[1];return new t(f=>this.subscribe({next(l){let u=!a;if(a=!0,!u||n)try{i=e(i,l)}catch(s){return f.error(s)}else i=l},error(l){f.error(l)},complete(){if(!a&&!n)return f.error(new TypeError("Cannot reduce an empty sequence"));f.next(i),f.complete()}}))}async all(){let e=[];return await this.forEach(t=>e.push(t)),e}concat(...e){let t=ie(this);return new t(n=>{let a,o=0;function i(f){a=f.subscribe({next(l){n.next(l)},error(l){n.error(l)},complete(){o===e.length?(a=void 0,n.complete()):i(t.from(e[o++]))}})}return i(this),()=>{a&&(a.unsubscribe(),a=void 0)}})}flatMap(e){if(typeof e!="function")throw new TypeError(e+" is not a function");let t=ie(this);return new t(n=>{let a=[],o=this.subscribe({next(f){if(e)try{f=e(f)}catch(u){return n.error(u)}let l=t.from(f).subscribe({next(u){n.next(u)},error(u){n.error(u)},complete(){let u=a.indexOf(l);u>=0&&a.splice(u,1),i()}});a.push(l)},error(f){n.error(f)},complete(){i()}});function i(){o.closed&&a.length===0&&n.complete()}return()=>{a.forEach(f=>f.unsubscribe()),o.unsubscribe()}})}[Qe](){return this}static from(e){let t=typeof this=="function"?this:Se;if(e==null)throw new TypeError(e+" is not an object");let n=Pe(e,Qe);if(n){let a=n.call(e);if(Object(a)!==a)throw new TypeError(a+" is not an object");return Nt(a)&&a.constructor===t?a:new t(o=>a.subscribe(o))}if(Gr("iterator")&&(n=Pe(e,Mt),n))return new t(a=>{be(()=>{if(!a.closed){for(let o of n.call(e))if(a.next(o),a.closed)return;a.complete()}})});if(Array.isArray(e))return new t(a=>{be(()=>{if(!a.closed){for(let o=0;o<e.length;++o)if(a.next(e[o]),a.closed)return;a.complete()}})});throw new TypeError(e+" is not observable")}static of(...e){let t=typeof this=="function"?this:Se;return new t(n=>{be(()=>{if(!n.closed){for(let a=0;a<e.length;++a)if(n.next(e[a]),n.closed)return;n.complete()}})})}static get[kr](){return this}};Oe.Observable=Re;Object.defineProperty(Re,Symbol("extensions"),{value:{symbol:Qe,hostReportError:Y},configurable:!0});var Ft=Oe.Observable;const ir=J.getDefaultExportFromCjs(Ft);var Lt=Error,Wt=EvalError,qt=RangeError,Gt=ReferenceError,Kr=SyntaxError,ye=TypeError,kt=URIError,zt=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var a=42;e[t]=a;for(t in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var o=Object.getOwnPropertySymbols(e);if(o.length!==1||o[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var i=Object.getOwnPropertyDescriptor(e,t);if(i.value!==a||i.enumerable!==!0)return!1}return!0},mr=typeof Symbol<"u"&&Symbol,Ht=zt,Kt=function(){return typeof mr!="function"||typeof Symbol!="function"||typeof mr("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Ht()},Be={__proto__:null,foo:{}},Vt=Object,Qt=function(){return{__proto__:Be}.foo===Be.foo&&!(Be instanceof Vt)},jt="Function.prototype.bind called on incompatible ",Jt=Object.prototype.toString,Xt=Math.max,Yt="[object Function]",hr=function(e,t){for(var n=[],a=0;a<e.length;a+=1)n[a]=e[a];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n},Zt=function(e,t){for(var n=[],a=t,o=0;a<e.length;a+=1,o+=1)n[o]=e[a];return n},en=function(r,e){for(var t="",n=0;n<r.length;n+=1)t+=r[n],n+1<r.length&&(t+=e);return t},rn=function(e){var t=this;if(typeof t!="function"||Jt.apply(t)!==Yt)throw new TypeError(jt+t);for(var n=Zt(arguments,1),a,o=function(){if(this instanceof a){var s=t.apply(this,hr(n,arguments));return Object(s)===s?s:this}return t.apply(e,hr(n,arguments))},i=Xt(0,t.length-n.length),f=[],l=0;l<i;l++)f[l]="$"+l;if(a=Function("binder","return function ("+en(f,",")+"){ return binder.apply(this,arguments); }")(o),t.prototype){var u=function(){};u.prototype=t.prototype,a.prototype=new u,u.prototype=null}return a},tn=rn,lr=Function.prototype.bind||tn,nn=Function.prototype.call,an=Object.prototype.hasOwnProperty,on=lr,ln=on.call(nn,an),v,fn=Lt,un=Wt,cn=qt,sn=Gt,Z=Kr,j=ye,pn=kt,Vr=Function,Ue=function(r){try{return Vr('"use strict"; return ('+r+").constructor;")()}catch{}},q=Object.getOwnPropertyDescriptor;if(q)try{q({},"")}catch{q=null}var Fe=function(){throw new j},yn=q?function(){try{return arguments.callee,Fe}catch{try{return q(arguments,"callee").get}catch{return Fe}}}():Fe,K=Kt(),dn=Qt(),A=Object.getPrototypeOf||(dn?function(r){return r.__proto__}:null),Q={},mn=typeof Uint8Array>"u"||!A?v:A(Uint8Array),G={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?v:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?v:ArrayBuffer,"%ArrayIteratorPrototype%":K&&A?A([][Symbol.iterator]()):v,"%AsyncFromSyncIteratorPrototype%":v,"%AsyncFunction%":Q,"%AsyncGenerator%":Q,"%AsyncGeneratorFunction%":Q,"%AsyncIteratorPrototype%":Q,"%Atomics%":typeof Atomics>"u"?v:Atomics,"%BigInt%":typeof BigInt>"u"?v:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?v:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?v:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?v:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":fn,"%eval%":eval,"%EvalError%":un,"%Float32Array%":typeof Float32Array>"u"?v:Float32Array,"%Float64Array%":typeof Float64Array>"u"?v:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?v:FinalizationRegistry,"%Function%":Vr,"%GeneratorFunction%":Q,"%Int8Array%":typeof Int8Array>"u"?v:Int8Array,"%Int16Array%":typeof Int16Array>"u"?v:Int16Array,"%Int32Array%":typeof Int32Array>"u"?v:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":K&&A?A(A([][Symbol.iterator]())):v,"%JSON%":typeof JSON=="object"?JSON:v,"%Map%":typeof Map>"u"?v:Map,"%MapIteratorPrototype%":typeof Map>"u"||!K||!A?v:A(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?v:Promise,"%Proxy%":typeof Proxy>"u"?v:Proxy,"%RangeError%":cn,"%ReferenceError%":sn,"%Reflect%":typeof Reflect>"u"?v:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?v:Set,"%SetIteratorPrototype%":typeof Set>"u"||!K||!A?v:A(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?v:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":K&&A?A(""[Symbol.iterator]()):v,"%Symbol%":K?Symbol:v,"%SyntaxError%":Z,"%ThrowTypeError%":yn,"%TypedArray%":mn,"%TypeError%":j,"%Uint8Array%":typeof Uint8Array>"u"?v:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?v:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?v:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?v:Uint32Array,"%URIError%":pn,"%WeakMap%":typeof WeakMap>"u"?v:WeakMap,"%WeakRef%":typeof WeakRef>"u"?v:WeakRef,"%WeakSet%":typeof WeakSet>"u"?v:WeakSet};if(A)try{null.error}catch(r){var hn=A(A(r));G["%Error.prototype%"]=hn}var vn=function r(e){var t;if(e==="%AsyncFunction%")t=Ue("async function () {}");else if(e==="%GeneratorFunction%")t=Ue("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=Ue("async function* () {}");else if(e==="%AsyncGenerator%"){var n=r("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var a=r("%AsyncGenerator%");a&&A&&(t=A(a.prototype))}return G[e]=t,t},vr={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},de=lr,$e=ln,gn=de.call(Function.call,Array.prototype.concat),wn=de.call(Function.apply,Array.prototype.splice),gr=de.call(Function.call,String.prototype.replace),xe=de.call(Function.call,String.prototype.slice),bn=de.call(Function.call,RegExp.prototype.exec),Sn=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,En=/\\(\\)?/g,An=function(e){var t=xe(e,0,1),n=xe(e,-1);if(t==="%"&&n!=="%")throw new Z("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new Z("invalid intrinsic syntax, expected opening `%`");var a=[];return gr(e,Sn,function(o,i,f,l){a[a.length]=f?gr(l,En,"$1"):i||o}),a},Pn=function(e,t){var n=e,a;if($e(vr,n)&&(a=vr[n],n="%"+a[0]+"%"),$e(G,n)){var o=G[n];if(o===Q&&(o=vn(n)),typeof o>"u"&&!t)throw new j("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:a,name:n,value:o}}throw new Z("intrinsic "+e+" does not exist!")},te=function(e,t){if(typeof e!="string"||e.length===0)throw new j("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new j('"allowMissing" argument must be a boolean');if(bn(/^%?[^%]*%?$/,e)===null)throw new Z("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=An(e),a=n.length>0?n[0]:"",o=Pn("%"+a+"%",t),i=o.name,f=o.value,l=!1,u=o.alias;u&&(a=u[0],wn(n,gn([0,1],u)));for(var s=1,p=!0;s<n.length;s+=1){var c=n[s],d=xe(c,0,1),y=xe(c,-1);if((d==='"'||d==="'"||d==="`"||y==='"'||y==="'"||y==="`")&&d!==y)throw new Z("property names with quotes must have matching quotes");if((c==="constructor"||!p)&&(l=!0),a+="."+c,i="%"+a+"%",$e(G,i))f=G[i];else if(f!=null){if(!(c in f)){if(!t)throw new j("base intrinsic for "+e+" exists, but the property is not available.");return}if(q&&s+1>=n.length){var m=q(f,c);p=!!m,p&&"get"in m&&!("originalValue"in m.get)?f=m.get:f=f[c]}else p=$e(f,c),f=f[c];p&&!l&&(G[i]=f)}}return f},Qr={exports:{}},Le,wr;function fr(){if(wr)return Le;wr=1;var r=te,e=r("%Object.defineProperty%",!0)||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Le=e,Le}var $n=te,Ee=$n("%Object.getOwnPropertyDescriptor%",!0);if(Ee)try{Ee([],"length")}catch{Ee=null}var jr=Ee,br=fr(),xn=Kr,V=ye,Sr=jr,In=function(e,t,n){if(!e||typeof e!="object"&&typeof e!="function")throw new V("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new V("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new V("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new V("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new V("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new V("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,i=arguments.length>5?arguments[5]:null,f=arguments.length>6?arguments[6]:!1,l=!!Sr&&Sr(e,t);if(br)br(e,t,{configurable:i===null&&l?l.configurable:!i,enumerable:a===null&&l?l.enumerable:!a,value:n,writable:o===null&&l?l.writable:!o});else if(f||!a&&!o&&!i)e[t]=n;else throw new xn("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Je=fr(),Jr=function(){return!!Je};Jr.hasArrayLengthDefineBug=function(){if(!Je)return null;try{return Je([],"length",{value:1}).length!==1}catch{return!0}};var Tn=Jr,Cn=te,Er=In,On=Tn(),Ar=jr,Pr=ye,Rn=Cn("%Math.floor%"),Dn=function(e,t){if(typeof e!="function")throw new Pr("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||Rn(t)!==t)throw new Pr("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],a=!0,o=!0;if("length"in e&&Ar){var i=Ar(e,"length");i&&!i.configurable&&(a=!1),i&&!i.writable&&(o=!1)}return(a||o||!n)&&(On?Er(e,"length",t,!0,!0):Er(e,"length",t)),e};(function(r){var e=lr,t=te,n=Dn,a=ye,o=t("%Function.prototype.apply%"),i=t("%Function.prototype.call%"),f=t("%Reflect.apply%",!0)||e.call(i,o),l=fr(),u=t("%Math.max%");r.exports=function(c){if(typeof c!="function")throw new a("a function is required");var d=f(e,i,arguments);return n(d,1+u(0,c.length-(arguments.length-1)),!0)};var s=function(){return f(e,o,arguments)};l?l(r.exports,"apply",{value:s}):r.exports.apply=s})(Qr);var _n=Qr.exports,Xr=te,Yr=_n,Mn=Yr(Xr("String.prototype.indexOf")),Nn=function(e,t){var n=Xr(e,!!t);return typeof n=="function"&&Mn(e,".prototype.")>-1?Yr(n):n},Bn=bt.inspect,ur=typeof Map=="function"&&Map.prototype,We=Object.getOwnPropertyDescriptor&&ur?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Ie=ur&&We&&typeof We.get=="function"?We.get:null,$r=ur&&Map.prototype.forEach,cr=typeof Set=="function"&&Set.prototype,qe=Object.getOwnPropertyDescriptor&&cr?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Te=cr&&qe&&typeof qe.get=="function"?qe.get:null,xr=cr&&Set.prototype.forEach,Un=typeof WeakMap=="function"&&WeakMap.prototype,ue=Un?WeakMap.prototype.has:null,Fn=typeof WeakSet=="function"&&WeakSet.prototype,ce=Fn?WeakSet.prototype.has:null,Ln=typeof WeakRef=="function"&&WeakRef.prototype,Ir=Ln?WeakRef.prototype.deref:null,Wn=Boolean.prototype.valueOf,qn=Object.prototype.toString,Gn=Function.prototype.toString,kn=String.prototype.match,sr=String.prototype.slice,B=String.prototype.replace,zn=String.prototype.toUpperCase,Tr=String.prototype.toLowerCase,Zr=RegExp.prototype.test,Cr=Array.prototype.concat,O=Array.prototype.join,Hn=Array.prototype.slice,Or=Math.floor,Xe=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Ge=Object.getOwnPropertySymbols,Ye=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,ee=typeof Symbol=="function"&&typeof Symbol.iterator=="object",$=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===ee||!0)?Symbol.toStringTag:null,et=Object.prototype.propertyIsEnumerable,Rr=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(r){return r.__proto__}:null);function Dr(r,e){if(r===1/0||r===-1/0||r!==r||r&&r>-1e3&&r<1e3||Zr.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof r=="number"){var n=r<0?-Or(-r):Or(r);if(n!==r){var a=String(n),o=sr.call(e,a.length+1);return B.call(a,t,"$&_")+"."+B.call(B.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return B.call(e,t,"$&_")}var Ze=Bn,_r=Ze.custom,Mr=tt(_r)?_r:null,Kn=function r(e,t,n,a){var o=t||{};if(N(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(N(o,"maxStringLength")&&(typeof o.maxStringLength=="number"?o.maxStringLength<0&&o.maxStringLength!==1/0:o.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var i=N(o,"customInspect")?o.customInspect:!0;if(typeof i!="boolean"&&i!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(N(o,"indent")&&o.indent!==null&&o.indent!==" "&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(N(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var f=o.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return at(e,o);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var l=String(e);return f?Dr(e,l):l}if(typeof e=="bigint"){var u=String(e)+"n";return f?Dr(e,u):u}var s=typeof o.depth>"u"?5:o.depth;if(typeof n>"u"&&(n=0),n>=s&&s>0&&typeof e=="object")return er(e)?"[Array]":"[Object]";var p=ca(o,n);if(typeof a>"u")a=[];else if(nt(a,e)>=0)return"[Circular]";function c(I,_,M){if(_&&(a=Hn.call(a),a.push(_)),M){var oe={depth:o.depth};return N(o,"quoteStyle")&&(oe.quoteStyle=o.quoteStyle),r(I,oe,n+1,a)}return r(I,o,n+1,a)}if(typeof e=="function"&&!Nr(e)){var d=ra(e),y=ve(e,c);return"[Function"+(d?": "+d:" (anonymous)")+"]"+(y.length>0?" { "+O.call(y,", ")+" }":"")}if(tt(e)){var m=ee?B.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Ye.call(e);return typeof e=="object"&&!ee?le(m):m}if(la(e)){for(var g="<"+Tr.call(String(e.nodeName)),S=e.attributes||[],P=0;P<S.length;P++)g+=" "+S[P].name+"="+rt(Vn(S[P].value),"double",o);return g+=">",e.childNodes&&e.childNodes.length&&(g+="..."),g+="</"+Tr.call(String(e.nodeName))+">",g}if(er(e)){if(e.length===0)return"[]";var h=ve(e,c);return p&&!ua(h)?"["+rr(h,p)+"]":"[ "+O.call(h,", ")+" ]"}if(jn(e)){var R=ve(e,c);return!("cause"in Error.prototype)&&"cause"in e&&!et.call(e,"cause")?"{ ["+String(e)+"] "+O.call(Cr.call("[cause]: "+c(e.cause),R),", ")+" }":R.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+O.call(R,", ")+" }"}if(typeof e=="object"&&i){if(Mr&&typeof e[Mr]=="function"&&Ze)return Ze(e,{depth:s-n});if(i!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(ta(e)){var F=[];return $r&&$r.call(e,function(I,_){F.push(c(_,e,!0)+" => "+c(I,e))}),Br("Map",Ie.call(e),F,p)}if(oa(e)){var ae=[];return xr&&xr.call(e,function(I){ae.push(c(I,e))}),Br("Set",Te.call(e),ae,p)}if(na(e))return ke("WeakMap");if(ia(e))return ke("WeakSet");if(aa(e))return ke("WeakRef");if(Xn(e))return le(c(Number(e)));if(Zn(e))return le(c(Xe.call(e)));if(Yn(e))return le(Wn.call(e));if(Jn(e))return le(c(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(typeof globalThis<"u"&&e===globalThis||typeof J.commonjsGlobal<"u"&&e===J.commonjsGlobal)return"{ [object globalThis] }";if(!Qn(e)&&!Nr(e)){var z=ve(e,c),me=Rr?Rr(e)===Object.prototype:e instanceof Object||e.constructor===Object,L=e instanceof Object?"":"null prototype",D=!me&&$&&Object(e)===e&&$ in e?sr.call(U(e),8,-1):L?"Object":"",he=me||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",H=he+(D||L?"["+O.call(Cr.call([],D||[],L||[]),": ")+"] ":"");return z.length===0?H+"{}":p?H+"{"+rr(z,p)+"}":H+"{ "+O.call(z,", ")+" }"}return String(e)};function rt(r,e,t){var n=(t.quoteStyle||e)==="double"?'"':"'";return n+r+n}function Vn(r){return B.call(String(r),/"/g,"&quot;")}function er(r){return U(r)==="[object Array]"&&(!$||!(typeof r=="object"&&$ in r))}function Qn(r){return U(r)==="[object Date]"&&(!$||!(typeof r=="object"&&$ in r))}function Nr(r){return U(r)==="[object RegExp]"&&(!$||!(typeof r=="object"&&$ in r))}function jn(r){return U(r)==="[object Error]"&&(!$||!(typeof r=="object"&&$ in r))}function Jn(r){return U(r)==="[object String]"&&(!$||!(typeof r=="object"&&$ in r))}function Xn(r){return U(r)==="[object Number]"&&(!$||!(typeof r=="object"&&$ in r))}function Yn(r){return U(r)==="[object Boolean]"&&(!$||!(typeof r=="object"&&$ in r))}function tt(r){if(ee)return r&&typeof r=="object"&&r instanceof Symbol;if(typeof r=="symbol")return!0;if(!r||typeof r!="object"||!Ye)return!1;try{return Ye.call(r),!0}catch{}return!1}function Zn(r){if(!r||typeof r!="object"||!Xe)return!1;try{return Xe.call(r),!0}catch{}return!1}var ea=Object.prototype.hasOwnProperty||function(r){return r in this};function N(r,e){return ea.call(r,e)}function U(r){return qn.call(r)}function ra(r){if(r.name)return r.name;var e=kn.call(Gn.call(r),/^function\s*([\w$]+)/);return e?e[1]:null}function nt(r,e){if(r.indexOf)return r.indexOf(e);for(var t=0,n=r.length;t<n;t++)if(r[t]===e)return t;return-1}function ta(r){if(!Ie||!r||typeof r!="object")return!1;try{Ie.call(r);try{Te.call(r)}catch{return!0}return r instanceof Map}catch{}return!1}function na(r){if(!ue||!r||typeof r!="object")return!1;try{ue.call(r,ue);try{ce.call(r,ce)}catch{return!0}return r instanceof WeakMap}catch{}return!1}function aa(r){if(!Ir||!r||typeof r!="object")return!1;try{return Ir.call(r),!0}catch{}return!1}function oa(r){if(!Te||!r||typeof r!="object")return!1;try{Te.call(r);try{Ie.call(r)}catch{return!0}return r instanceof Set}catch{}return!1}function ia(r){if(!ce||!r||typeof r!="object")return!1;try{ce.call(r,ce);try{ue.call(r,ue)}catch{return!0}return r instanceof WeakSet}catch{}return!1}function la(r){return!r||typeof r!="object"?!1:typeof HTMLElement<"u"&&r instanceof HTMLElement?!0:typeof r.nodeName=="string"&&typeof r.getAttribute=="function"}function at(r,e){if(r.length>e.maxStringLength){var t=r.length-e.maxStringLength,n="... "+t+" more character"+(t>1?"s":"");return at(sr.call(r,0,e.maxStringLength),e)+n}var a=B.call(B.call(r,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,fa);return rt(a,"single",e)}function fa(r){var e=r.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\"+t:"\\x"+(e<16?"0":"")+zn.call(e.toString(16))}function le(r){return"Object("+r+")"}function ke(r){return r+" { ? }"}function Br(r,e,t,n){var a=n?rr(t,n):O.call(t,", ");return r+" ("+e+") {"+a+"}"}function ua(r){for(var e=0;e<r.length;e++)if(nt(r[e],`
2
+ `)>=0)return!1;return!0}function ca(r,e){var t;if(r.indent===" ")t=" ";else if(typeof r.indent=="number"&&r.indent>0)t=O.call(Array(r.indent+1)," ");else return null;return{base:t,prev:O.call(Array(e+1),t)}}function rr(r,e){if(r.length===0)return"";var t=`
3
+ `+e.prev+e.base;return t+O.call(r,","+t)+`
4
+ `+e.prev}function ve(r,e){var t=er(r),n=[];if(t){n.length=r.length;for(var a=0;a<r.length;a++)n[a]=N(r,a)?e(r[a],r):""}var o=typeof Ge=="function"?Ge(r):[],i;if(ee){i={};for(var f=0;f<o.length;f++)i["$"+o[f]]=o[f]}for(var l in r)N(r,l)&&(t&&String(Number(l))===l&&l<r.length||ee&&i["$"+l]instanceof Symbol||(Zr.call(/[^\w$]/,l)?n.push(e(l,r)+": "+e(r[l],r)):n.push(l+": "+e(r[l],r))));if(typeof Ge=="function")for(var u=0;u<o.length;u++)et.call(r,o[u])&&n.push("["+e(o[u])+"]: "+e(r[o[u]],r));return n}var ot=te,ne=Nn,sa=Kn,pa=ye,ge=ot("%WeakMap%",!0),we=ot("%Map%",!0),ya=ne("WeakMap.prototype.get",!0),da=ne("WeakMap.prototype.set",!0),ma=ne("WeakMap.prototype.has",!0),ha=ne("Map.prototype.get",!0),va=ne("Map.prototype.set",!0),ga=ne("Map.prototype.has",!0),pr=function(r,e){for(var t=r,n;(n=t.next)!==null;t=n)if(n.key===e)return t.next=n.next,n.next=r.next,r.next=n,n},wa=function(r,e){var t=pr(r,e);return t&&t.value},ba=function(r,e,t){var n=pr(r,e);n?n.value=t:r.next={key:e,next:r.next,value:t}},Sa=function(r,e){return!!pr(r,e)},Ea=function(){var e,t,n,a={assert:function(o){if(!a.has(o))throw new pa("Side channel does not contain "+sa(o))},get:function(o){if(ge&&o&&(typeof o=="object"||typeof o=="function")){if(e)return ya(e,o)}else if(we){if(t)return ha(t,o)}else if(n)return wa(n,o)},has:function(o){if(ge&&o&&(typeof o=="object"||typeof o=="function")){if(e)return ma(e,o)}else if(we){if(t)return ga(t,o)}else if(n)return Sa(n,o);return!1},set:function(o,i){ge&&o&&(typeof o=="object"||typeof o=="function")?(e||(e=new ge),da(e,o,i)):we?(t||(t=new we),va(t,o,i)):(n||(n={key:{},next:null}),ba(n,o,i))}};return a},Aa=String.prototype.replace,Pa=/%20/g,ze={RFC1738:"RFC1738",RFC3986:"RFC3986"},yr={default:ze.RFC3986,formatters:{RFC1738:function(r){return Aa.call(r,Pa,"+")},RFC3986:function(r){return String(r)}},RFC1738:ze.RFC1738,RFC3986:ze.RFC3986},$a=yr,He=Object.prototype.hasOwnProperty,W=Array.isArray,T=function(){for(var r=[],e=0;e<256;++e)r.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return r}(),xa=function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(W(n)){for(var a=[],o=0;o<n.length;++o)typeof n[o]<"u"&&a.push(n[o]);t.obj[t.prop]=a}}},it=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},a=0;a<e.length;++a)typeof e[a]<"u"&&(n[a]=e[a]);return n},Ia=function r(e,t,n){if(!t)return e;if(typeof t!="object"){if(W(e))e.push(t);else if(e&&typeof e=="object")(n&&(n.plainObjects||n.allowPrototypes)||!He.call(Object.prototype,t))&&(e[t]=!0);else return[e,t];return e}if(!e||typeof e!="object")return[e].concat(t);var a=e;return W(e)&&!W(t)&&(a=it(e,n)),W(e)&&W(t)?(t.forEach(function(o,i){if(He.call(e,i)){var f=e[i];f&&typeof f=="object"&&o&&typeof o=="object"?e[i]=r(f,o,n):e.push(o)}else e[i]=o}),e):Object.keys(t).reduce(function(o,i){var f=t[i];return He.call(o,i)?o[i]=r(o[i],f,n):o[i]=f,o},a)},Ta=function(e,t){return Object.keys(t).reduce(function(n,a){return n[a]=t[a],n},e)},Ca=function(r,e,t){var n=r.replace(/\+/g," ");if(t==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},Ke=1024,Oa=function(e,t,n,a,o){if(e.length===0)return e;var i=e;if(typeof e=="symbol"?i=Symbol.prototype.toString.call(e):typeof e!="string"&&(i=String(e)),n==="iso-8859-1")return escape(i).replace(/%u[0-9a-f]{4}/gi,function(d){return"%26%23"+parseInt(d.slice(2),16)+"%3B"});for(var f="",l=0;l<i.length;l+=Ke){for(var u=i.length>=Ke?i.slice(l,l+Ke):i,s=[],p=0;p<u.length;++p){var c=u.charCodeAt(p);if(c===45||c===46||c===95||c===126||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||o===$a.RFC1738&&(c===40||c===41)){s[s.length]=u.charAt(p);continue}if(c<128){s[s.length]=T[c];continue}if(c<2048){s[s.length]=T[192|c>>6]+T[128|c&63];continue}if(c<55296||c>=57344){s[s.length]=T[224|c>>12]+T[128|c>>6&63]+T[128|c&63];continue}p+=1,c=65536+((c&1023)<<10|u.charCodeAt(p)&1023),s[s.length]=T[240|c>>18]+T[128|c>>12&63]+T[128|c>>6&63]+T[128|c&63]}f+=s.join("")}return f},Ra=function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],a=0;a<t.length;++a)for(var o=t[a],i=o.obj[o.prop],f=Object.keys(i),l=0;l<f.length;++l){var u=f[l],s=i[u];typeof s=="object"&&s!==null&&n.indexOf(s)===-1&&(t.push({obj:i,prop:u}),n.push(s))}return xa(t),e},Da=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},_a=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},Ma=function(e,t){return[].concat(e,t)},Na=function(e,t){if(W(e)){for(var n=[],a=0;a<e.length;a+=1)n.push(t(e[a]));return n}return t(e)},lt={arrayToObject:it,assign:Ta,combine:Ma,compact:Ra,decode:Ca,encode:Oa,isBuffer:_a,isRegExp:Da,maybeMap:Na,merge:Ia},ft=Ea,Ae=lt,se=yr,Ba=Object.prototype.hasOwnProperty,ut={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},C=Array.isArray,Ua=Array.prototype.push,ct=function(r,e){Ua.apply(r,C(e)?e:[e])},Fa=Date.prototype.toISOString,Ur=se.default,E={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:Ae.encode,encodeValuesOnly:!1,format:Ur,formatter:se.formatters[Ur],indices:!1,serializeDate:function(e){return Fa.call(e)},skipNulls:!1,strictNullHandling:!1},La=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},Ve={},Wa=function r(e,t,n,a,o,i,f,l,u,s,p,c,d,y,m,g,S,P){for(var h=e,R=P,F=0,ae=!1;(R=R.get(Ve))!==void 0&&!ae;){var z=R.get(e);if(F+=1,typeof z<"u"){if(z===F)throw new RangeError("Cyclic object value");ae=!0}typeof R.get(Ve)>"u"&&(F=0)}if(typeof s=="function"?h=s(t,h):h instanceof Date?h=d(h):n==="comma"&&C(h)&&(h=Ae.maybeMap(h,function(_e){return _e instanceof Date?d(_e):_e})),h===null){if(i)return u&&!g?u(t,E.encoder,S,"key",y):t;h=""}if(La(h)||Ae.isBuffer(h)){if(u){var me=g?t:u(t,E.encoder,S,"key",y);return[m(me)+"="+m(u(h,E.encoder,S,"value",y))]}return[m(t)+"="+m(String(h))]}var L=[];if(typeof h>"u")return L;var D;if(n==="comma"&&C(h))g&&u&&(h=Ae.maybeMap(h,u)),D=[{value:h.length>0?h.join(",")||null:void 0}];else if(C(s))D=s;else{var he=Object.keys(h);D=p?he.sort(p):he}var H=l?t.replace(/\./g,"%2E"):t,I=a&&C(h)&&h.length===1?H+"[]":H;if(o&&C(h)&&h.length===0)return I+"[]";for(var _=0;_<D.length;++_){var M=D[_],oe=typeof M=="object"&&typeof M.value<"u"?M.value:h[M];if(!(f&&oe===null)){var De=c&&l?M.replace(/\./g,"%2E"):M,ht=C(h)?typeof n=="function"?n(I,De):I:I+(c?"."+De:"["+De+"]");P.set(e,F);var dr=ft();dr.set(Ve,P),ct(L,r(oe,ht,n,a,o,i,f,l,n==="comma"&&g&&C(h)?null:u,s,p,c,d,y,m,g,S,dr))}}return L},qa=function(e){if(!e)return E;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.encodeDotInKeys<"u"&&typeof e.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(e.encoder!==null&&typeof e.encoder<"u"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var t=e.charset||E.charset;if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=se.default;if(typeof e.format<"u"){if(!Ba.call(se.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var a=se.formatters[n],o=E.filter;(typeof e.filter=="function"||C(e.filter))&&(o=e.filter);var i;if(e.arrayFormat in ut?i=e.arrayFormat:"indices"in e?i=e.indices?"indices":"repeat":i=E.arrayFormat,"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var f=typeof e.allowDots>"u"?e.encodeDotInKeys===!0?!0:E.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:E.addQueryPrefix,allowDots:f,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:E.allowEmptyArrays,arrayFormat:i,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:E.charsetSentinel,commaRoundTrip:e.commaRoundTrip,delimiter:typeof e.delimiter>"u"?E.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:E.encode,encodeDotInKeys:typeof e.encodeDotInKeys=="boolean"?e.encodeDotInKeys:E.encodeDotInKeys,encoder:typeof e.encoder=="function"?e.encoder:E.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:E.encodeValuesOnly,filter:o,format:n,formatter:a,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:E.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:E.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:E.strictNullHandling}},Ga=function(r,e){var t=r,n=qa(e),a,o;typeof n.filter=="function"?(o=n.filter,t=o("",t)):C(n.filter)&&(o=n.filter,a=o);var i=[];if(typeof t!="object"||t===null)return"";var f=ut[n.arrayFormat],l=f==="comma"&&n.commaRoundTrip;a||(a=Object.keys(t)),n.sort&&a.sort(n.sort);for(var u=ft(),s=0;s<a.length;++s){var p=a[s];n.skipNulls&&t[p]===null||ct(i,Wa(t[p],p,f,l,n.allowEmptyArrays,n.strictNullHandling,n.skipNulls,n.encodeDotInKeys,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,u))}var c=i.join(n.delimiter),d=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?d+="utf8=%26%2310003%3B&":d+="utf8=%E2%9C%93&"),c.length>0?d+c:""},re=lt,tr=Object.prototype.hasOwnProperty,ka=Array.isArray,b={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:re.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},za=function(r){return r.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},st=function(r,e){return r&&typeof r=="string"&&e.comma&&r.indexOf(",")>-1?r.split(","):r},Ha="utf8=%26%2310003%3B",Ka="utf8=%E2%9C%93",Va=function(e,t){var n={__proto__:null},a=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;a=a.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var o=t.parameterLimit===1/0?void 0:t.parameterLimit,i=a.split(t.delimiter,o),f=-1,l,u=t.charset;if(t.charsetSentinel)for(l=0;l<i.length;++l)i[l].indexOf("utf8=")===0&&(i[l]===Ka?u="utf-8":i[l]===Ha&&(u="iso-8859-1"),f=l,l=i.length);for(l=0;l<i.length;++l)if(l!==f){var s=i[l],p=s.indexOf("]="),c=p===-1?s.indexOf("="):p+1,d,y;c===-1?(d=t.decoder(s,b.decoder,u,"key"),y=t.strictNullHandling?null:""):(d=t.decoder(s.slice(0,c),b.decoder,u,"key"),y=re.maybeMap(st(s.slice(c+1),t),function(g){return t.decoder(g,b.decoder,u,"value")})),y&&t.interpretNumericEntities&&u==="iso-8859-1"&&(y=za(y)),s.indexOf("[]=")>-1&&(y=ka(y)?[y]:y);var m=tr.call(n,d);m&&t.duplicates==="combine"?n[d]=re.combine(n[d],y):(!m||t.duplicates==="last")&&(n[d]=y)}return n},Qa=function(r,e,t,n){for(var a=n?e:st(e,t),o=r.length-1;o>=0;--o){var i,f=r[o];if(f==="[]"&&t.parseArrays)i=t.allowEmptyArrays&&(a===""||t.strictNullHandling&&a===null)?[]:[].concat(a);else{i=t.plainObjects?Object.create(null):{};var l=f.charAt(0)==="["&&f.charAt(f.length-1)==="]"?f.slice(1,-1):f,u=t.decodeDotInKeys?l.replace(/%2E/g,"."):l,s=parseInt(u,10);!t.parseArrays&&u===""?i={0:a}:!isNaN(s)&&f!==u&&String(s)===u&&s>=0&&t.parseArrays&&s<=t.arrayLimit?(i=[],i[s]=a):u!=="__proto__"&&(i[u]=a)}a=i}return a},ja=function(e,t,n,a){if(e){var o=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/,f=/(\[[^[\]]*])/g,l=n.depth>0&&i.exec(o),u=l?o.slice(0,l.index):o,s=[];if(u){if(!n.plainObjects&&tr.call(Object.prototype,u)&&!n.allowPrototypes)return;s.push(u)}for(var p=0;n.depth>0&&(l=f.exec(o))!==null&&p<n.depth;){if(p+=1,!n.plainObjects&&tr.call(Object.prototype,l[1].slice(1,-1))&&!n.allowPrototypes)return;s.push(l[1])}if(l){if(n.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+n.depth+" and strictDepth is true");s.push("["+o.slice(l.index)+"]")}return Qa(s,t,n,a)}},Ja=function(e){if(!e)return b;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.decodeDotInKeys<"u"&&typeof e.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(e.decoder!==null&&typeof e.decoder<"u"&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=typeof e.charset>"u"?b.charset:e.charset,n=typeof e.duplicates>"u"?b.duplicates:e.duplicates;if(n!=="combine"&&n!=="first"&&n!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var a=typeof e.allowDots>"u"?e.decodeDotInKeys===!0?!0:b.allowDots:!!e.allowDots;return{allowDots:a,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:b.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:b.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:b.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:b.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:b.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:b.comma,decodeDotInKeys:typeof e.decodeDotInKeys=="boolean"?e.decodeDotInKeys:b.decodeDotInKeys,decoder:typeof e.decoder=="function"?e.decoder:b.decoder,delimiter:typeof e.delimiter=="string"||re.isRegExp(e.delimiter)?e.delimiter:b.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:b.depth,duplicates:n,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:b.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:b.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:b.plainObjects,strictDepth:typeof e.strictDepth=="boolean"?!!e.strictDepth:b.strictDepth,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:b.strictNullHandling}},Xa=function(r,e){var t=Ja(e);if(r===""||r===null||typeof r>"u")return t.plainObjects?Object.create(null):{};for(var n=typeof r=="string"?Va(r,t):r,a=t.plainObjects?Object.create(null):{},o=Object.keys(n),i=0;i<o.length;++i){var f=o[i],l=ja(f,n[f],t,typeof r=="string");a=re.merge(a,l,t)}return t.allowSparse===!0?a:re.compact(a)},Ya=Ga,Za=Xa,eo=yr,ro={formats:eo,parse:Za,stringify:Ya};const to=J.getDefaultExportFromCjs(ro);function Fr(r){if(!Array.isArray(r))throw new TypeError("Middleware stack must be an array!");for(const e of r)if(typeof e!="function")throw new TypeError("Middleware must be composed of functions!");return function(e,t){let n=-1;return a(0);function a(o){if(o<=n)return Promise.reject(new Error("next() called multiple times"));n=o;let i=r[o];if(o===r.length&&(i=t),!i)return Promise.resolve();try{return Promise.resolve(i(e,a.bind(null,o+1)))}catch(f){return Promise.reject(f)}}}}const w={app:null,appPending:!0,appCb:[],services:new Map,servicePending:new Map,serviceCb:new Map,config:null,configPending:!1,configCb:[]};async function no(r){if(w.config)return w.config;if(w.configPending)return new Promise(t=>{w.configCb.push(n=>t(n))});w.configPending=!0;const e=await r();return w.config=e,w.configCb.forEach(t=>t(e)),w.configCb=[],w.configPending=!1,e}class pt{constructor(e={},t){x(this,"options");x(this,"apis",[]);x(this,"middlewares",[]);x(this,"defaultMiddlewares",[async(e,t)=>{try{await t()}catch(n){e.res.body=n.message||""}}]);x(this,"api404");x(this,"fnMiddleware");x(this,"getId");x(this,"extensions",new Map);x(this,"onDestroyCbs",[]);x(this,"config");x(this,"apiList");this.options={...e,baseUrl:e.baseUrl??"/"},this.options.baseUrl=this.options.baseUrl.split("/").map(a=>encodeURIComponent(a)).join("/"),this.middlewares.push(...this.defaultMiddlewares),this.middlewares.push(...e.middlewares||[]);const n=((e==null?void 0:e.apis)??[]).sort((a,o)=>{const i=o.path.substr(-1,1),f=i==="*"?0:i==="/"?.1:.2,l=a.path.substr(-1,1),u=l==="*"?0:l==="/"?.1:.2;return o.path.split("/").length+f-(a.path.split("/").length+u)}).map(a=>({...a,method:a.method??(e==null?void 0:e.defaultMethod)??"post"}));this.apiList=n,this.apis=n.filter(a=>!a.disabled),this.api404={path:"*",method:"all",action:(a,o)=>{throw o.res.status=404,Error("Not Found")}},this.fnMiddleware=Fr(this.middlewares),this.getId=J.useSoonIdGen({workerId:e.workId}),this.init(t)}async init(e){var t,n,a,o;try{if(this.options.config){const i=await this.options.config();this.config=i}await((n=(t=this.options)==null?void 0:t.onInit)==null?void 0:n.call(t,this)),w.app=this,w.appPending=!1,w.appCb.forEach(i=>i(this)),await((o=(a=this.options)==null?void 0:a.onReady)==null?void 0:o.call(a,this)),e==null||e(null,this)}catch(i){e==null||e(i,this)}}async fetchRaw(e,t,n){var c,d;const a=(n==null?void 0:n.url)??e,o=new URL(a,"http://localhost"),i=this.getId(),f={baseUrl:this.options.baseUrl??"",headers:(n==null?void 0:n.headers)??{},method:(n==null?void 0:n.method)??this.options.defaultMethod??"post",body:(n==null?void 0:n.body)??t,params:{},path:o.pathname,queryString:n!=null&&n.query?"?"+to.stringify(n.query):o.search,query:(n==null?void 0:n.query)??Object.fromEntries(o.searchParams),url:a,reqId:i,requestId:i,ip:(n==null?void 0:n.ip)??"",namespace:(n==null?void 0:n.namespace)??"default"};let l=this.api404;for(let y=0;y<this.apis.length;y++){const m=this.apis[y];if((m.namespace??"default")===f.namespace&&(m.method==="all"||m.method===((d=(c=f.method)==null?void 0:c.toLowerCase)==null?void 0:d.call(c)))){const P=St((this.options.baseUrl??"")+m.path,{loose:!1,trailing:!1})(f.path);if(P){f.params=P.params,l=m;break}}}const u={body:void 0,headers:{},status:200},s={app:this,currentAPI:l,req:f,request:f,reqId:i,requestId:i,res:u,response:u,platform:n==null?void 0:n.platform,config:this.config,meta:l.meta??{},service:{}},p=async()=>{var g,S;let y=f.body;if(l.bodySchema)if((g=l.bodySchema)!=null&&g.parse)try{y=l.bodySchema.parse(f.body)}catch(P){u.status=400;const h=(S=P==null?void 0:P.issues)==null?void 0:S[0];throw h&&(h.message=(h.path??[]).join(".")+" "+h.message),h?{...h,code:0}:new Error("参数错误")}else throw u.status=500,new Error("bodySchema must be ZodType");const m=await l.action(y,s);m!==void 0&&(u.body=m)};if(l.middlewares&&l.middlewares.length>0){const y=Fr(l.middlewares),m=async()=>await y(s,p);n!=null&&n.noPublicMiddleware?await m:await this.fnMiddleware(s,m)}else n!=null&&n.noPublicMiddleware?await this.fnMiddleware(s,p):await p();return s.res}async fetch(e,t,n){return(await this.fetchRaw(e,t,n)).body}async action(e,t,n){const a={...n??{},url:(n==null?void 0:n.url)??e,noPublicMiddleware:!0};return await this.fetch(e,t,a)}mount(e,t){this.extensions.set(e,t)}get(e){return this.extensions.get(e)}onUnloadService(e){this.onDestroyCbs.push(e)}async unloadService(){return Promise.all(this.onDestroyCbs.map(e=>e==null?void 0:e()))}get baseUrl(){return this.options.baseUrl??""}}const yt=Symbol("soon-api");function ao(r){const e={...r};return e._soon_symbol=yt,e}const dt=Symbol("soon-service");function oo(r){async function e(){var o;const t=r.service;let n=w.services.get(t);if(n)return n;if(w.servicePending.get(t)){let i=w.serviceCb.get(t);return i||(i=[],w.serviceCb.set(t,i)),new Promise(f=>{i.push(l=>f(l))})}return w.servicePending.set(t,!0),await new Promise(i=>{w.app?i(1):w.appCb.push(()=>i(1))}),n=await t(w.app),w.services.set(t,n),(o=w.serviceCb.get(t))==null||o.forEach(i=>i(n)),w.serviceCb.delete(t),w.servicePending.delete(t),n}return e._soon_symbol=dt,e.serviceName=(r==null?void 0:r.serviceName)??"",e.autoInject=(r==null?void 0:r.autoInject)??!1,e.enableClient=(r==null?void 0:r.enableClient)??!1,e}function io(r){return r}function lo(r){return async function(){return await no(r)}}async function fo(r){return await new Promise((e,t)=>{new pt(r,(n,a)=>{if(n){t(n);return}e(a)})})}class uo extends Error{constructor(t,n){super(t);x(this,"code");this.code=n}}class co extends Error{constructor(t,n){super(t);x(this,"status");this.status=n}}function so({pingTime:r=0,action:e}){let t=()=>null;const n=new ir(a=>{let o;r>0&&(o=setInterval(()=>{f.closed?clearInterval(o):a.next({event:"ping",message:`: ping
5
5
 
6
6
  `})},r));const i=[],f={send(l){try{a.next({...l,message:`${l.event?`event: ${l.event}
7
7
  `:""}data: ${typeof l.data=="string"?l.data:JSON.stringify(l.data)}
package/dist/index.d.ts CHANGED
@@ -19,6 +19,8 @@ export interface Extensions {
19
19
  export interface Namespace {
20
20
  default: any;
21
21
  }
22
+ export interface ApiMap {
23
+ }
22
24
  export { Context, SoonFetchOptions };
23
25
  export type ReturnRealType<T extends (...args: any) => any | Promise<(...args: any) => any>, R = ReturnType<T>> = R extends Promise<infer U> ? U : R;
24
26
  export type ReturnConfig<ConfigDefine extends () => any, T = ReturnType<ConfigDefine>> = T extends Promise<infer U> ? U : T;
@@ -41,6 +43,7 @@ export declare class SoonApp {
41
43
  */
42
44
  fetchRaw(url: string, body?: any, soonFetchOptions?: SoonFetchOptions): Promise<Response<any>>;
43
45
  fetch(url: string, body?: any, soonFetchOptions?: SoonFetchOptions): Promise<any>;
46
+ action<T extends keyof ApiMap>(url: T, body?: ApiMap[T]['body'], soonFetchOptions?: Omit<SoonFetchOptions, 'noPublicMiddleware'>): Promise<Response<ApiMap[T]['action']['body']>>;
44
47
  mount(extensionName: string, extension: any): void;
45
48
  get<T extends keyof Extensions>(extensionName: T): Extensions[T];
46
49
  onUnloadService(callback: () => void): void;
package/dist/index.js CHANGED
@@ -2,14 +2,14 @@ var dt = Object.defineProperty;
2
2
  var mt = (r, e, t) => e in r ? dt(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
3
  var x = (r, e, t) => mt(r, typeof e != "symbol" ? e + "" : e, t);
4
4
  import { PassThrough as ht } from "stream";
5
- import { g as Fr, c as yr, u as vt } from "./deps/soon-id-wk8xbb2g0.js";
5
+ import { g as Fr, c as yr, u as vt } from "./deps/soon-id-a6raaezni.js";
6
6
  import gt from "util";
7
7
  var k = {};
8
8
  Object.defineProperty(k, "__esModule", { value: !0 });
9
9
  k.TokenData = void 0;
10
- k.parse = Oe;
10
+ k.parse = Te;
11
11
  k.compile = $t;
12
- var wt = k.match = Ot;
12
+ var wt = k.match = Tt;
13
13
  k.pathToRegexp = Rt;
14
14
  const bt = "/", tr = (r) => r, St = new RegExp("^\\p{XID_Continue}$", "u"), le = "https://git.new/pathToRegexpError", Et = {
15
15
  "!": "!",
@@ -109,7 +109,7 @@ class se {
109
109
  }
110
110
  }
111
111
  k.TokenData = se;
112
- function Oe(r, e = {}) {
112
+ function Te(r, e = {}) {
113
113
  const { encodePath: t = tr, delimiter: n = t(bt) } = e, a = [], o = At(r);
114
114
  let i = 0;
115
115
  do {
@@ -155,7 +155,7 @@ function Oe(r, e = {}) {
155
155
  return new se(a, n);
156
156
  }
157
157
  function $t(r, e = {}) {
158
- const t = r instanceof se ? r : Oe(r, e);
158
+ const t = r instanceof se ? r : Te(r, e);
159
159
  return It(t, e);
160
160
  }
161
161
  function xt(r, e) {
@@ -213,8 +213,8 @@ function It(r, e) {
213
213
  return c;
214
214
  };
215
215
  }
216
- function Ot(r, e = {}) {
217
- const { decode: t = decodeURIComponent, loose: n = !0 } = e, a = r instanceof se ? r : Oe(r, e), o = nr(n, a.delimiter), i = [], f = Wr(a, i, e), l = i.map((u) => {
216
+ function Tt(r, e = {}) {
217
+ const { decode: t = decodeURIComponent, loose: n = !0 } = e, a = r instanceof se ? r : Te(r, e), o = nr(n, a.delimiter), i = [], f = Wr(a, i, e), l = i.map((u) => {
218
218
  if (t && (u.modifier === "+" || u.modifier === "*")) {
219
219
  const { prefix: s = "", suffix: p = "", separator: c = p + s } = u, d = new RegExp(o(c), "g");
220
220
  return (y) => y.split(d).map(t);
@@ -238,7 +238,7 @@ function Ot(r, e = {}) {
238
238
  function J(r) {
239
239
  return r.replace(/([.+*?^${}()[\]|/\\])/g, "\\$1");
240
240
  }
241
- function Tt(r, e) {
241
+ function Ct(r, e) {
242
242
  const t = J(r);
243
243
  return e ? `(?:${t})+(?!${t})` : t;
244
244
  }
@@ -246,7 +246,7 @@ function nr(r, e) {
246
246
  if (!r)
247
247
  return J;
248
248
  const t = new RegExp(`(?:(?!${J(e)}).)+|(.)`, "g");
249
- return (n) => n.replace(t, Tt);
249
+ return (n) => n.replace(t, Ct);
250
250
  }
251
251
  function Lr(r) {
252
252
  return r.sensitive ? "" : "i";
@@ -264,7 +264,7 @@ function qr(r, e, t, n, a) {
264
264
  return i = l, e(l);
265
265
  const { prefix: s = "", suffix: p = "", separator: c = p + s, modifier: d = "" } = l, y = e(s), m = e(p);
266
266
  if (l.name) {
267
- const g = l.pattern ? `(?:${l.pattern})` : o, S = Ct(g, l.name, n);
267
+ const g = l.pattern ? `(?:${l.pattern})` : o, S = Ot(g, l.name, n);
268
268
  if (f || (f = _e(S, s || i)), !f)
269
269
  throw new TypeError(`Ambiguous pattern for "${l.name}": ${le}`);
270
270
  if (f = !a || _e(S, p), i = "", t.push(l), d === "+" || d === "*") {
@@ -280,7 +280,7 @@ function qr(r, e, t, n, a) {
280
280
  return `(?:${y}${m})${d}`;
281
281
  });
282
282
  }
283
- function Ct(r, e, t) {
283
+ function Ot(r, e, t) {
284
284
  try {
285
285
  return new RegExp(`^${r}$`, t);
286
286
  } catch (n) {
@@ -291,14 +291,14 @@ function _e(r, e) {
291
291
  return e ? !r.test(e) : !1;
292
292
  }
293
293
  function Rt(r, e = {}) {
294
- const t = r instanceof se ? r : Oe(r, e), n = [], a = Wr(t, n, e);
294
+ const t = r instanceof se ? r : Te(r, e), n = [], a = Wr(t, n, e);
295
295
  return Object.assign(a, { keys: n });
296
296
  }
297
- var Te = {};
298
- Object.defineProperty(Te, "__esModule", {
297
+ var Ce = {};
298
+ Object.defineProperty(Ce, "__esModule", {
299
299
  value: !0
300
300
  });
301
- Te.Observable = void 0;
301
+ Ce.Observable = void 0;
302
302
  const Gr = (r) => !!Symbol[r], ar = (r) => Gr(r) ? Symbol[r] : "@@" + r, Dt = ar("iterator"), Ve = ar("observable"), kr = ar("species");
303
303
  function Ae(r, e) {
304
304
  let t = r[e];
@@ -309,10 +309,10 @@ function Ae(r, e) {
309
309
  }
310
310
  function oe(r) {
311
311
  let e = r.constructor;
312
- return e !== void 0 && (e = e[kr], e === null && (e = void 0)), e !== void 0 ? e : Ce;
312
+ return e !== void 0 && (e = e[kr], e === null && (e = void 0)), e !== void 0 ? e : Oe;
313
313
  }
314
314
  function _t(r) {
315
- return r instanceof Ce;
315
+ return r instanceof Oe;
316
316
  }
317
317
  function X(r) {
318
318
  X.log ? X.log(r) : setTimeout(() => {
@@ -425,7 +425,7 @@ class Nt {
425
425
  this._state !== "closed" && (Qe(this), zr(this));
426
426
  }
427
427
  }
428
- let Ce = class be {
428
+ let Oe = class be {
429
429
  constructor(e) {
430
430
  if (!(this instanceof be)) throw new TypeError("Observable cannot be called as a function");
431
431
  if (typeof e != "function") throw new TypeError("Observable initializer must be a function");
@@ -641,15 +641,15 @@ let Ce = class be {
641
641
  return this;
642
642
  }
643
643
  };
644
- Te.Observable = Ce;
645
- Object.defineProperty(Ce, Symbol("extensions"), {
644
+ Ce.Observable = Oe;
645
+ Object.defineProperty(Oe, Symbol("extensions"), {
646
646
  value: {
647
647
  symbol: Ve,
648
648
  hostReportError: X
649
649
  },
650
650
  configurable: !0
651
651
  });
652
- var Ut = Te.Observable;
652
+ var Ut = Ce.Observable;
653
653
  const Kr = /* @__PURE__ */ Fr(Ut);
654
654
  var Bt = Error, Ft = EvalError, Lt = RangeError, Wt = ReferenceError, Vr = SyntaxError, pe = TypeError, qt = URIError, Gt = function() {
655
655
  if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
@@ -1001,17 +1001,17 @@ Xr.hasArrayLengthDefineBug = function() {
1001
1001
  return !0;
1002
1002
  }
1003
1003
  };
1004
- var xn = Xr, In = re, Sr = $n, On = xn(), Er = Jr, Ar = pe, Tn = In("%Math.floor%"), Cn = function(e, t) {
1004
+ var xn = Xr, In = re, Sr = $n, Tn = xn(), Er = Jr, Ar = pe, Cn = In("%Math.floor%"), On = function(e, t) {
1005
1005
  if (typeof e != "function")
1006
1006
  throw new Ar("`fn` is not a function");
1007
- if (typeof t != "number" || t < 0 || t > 4294967295 || Tn(t) !== t)
1007
+ if (typeof t != "number" || t < 0 || t > 4294967295 || Cn(t) !== t)
1008
1008
  throw new Ar("`length` must be a positive 32-bit integer");
1009
1009
  var n = arguments.length > 2 && !!arguments[2], a = !0, o = !0;
1010
1010
  if ("length" in e && Er) {
1011
1011
  var i = Er(e, "length");
1012
1012
  i && !i.configurable && (a = !1), i && !i.writable && (o = !1);
1013
1013
  }
1014
- return (a || o || !n) && (On ? Sr(
1014
+ return (a || o || !n) && (Tn ? Sr(
1015
1015
  /** @type {Parameters<define>[0]} */
1016
1016
  e,
1017
1017
  "length",
@@ -1026,7 +1026,7 @@ var xn = Xr, In = re, Sr = $n, On = xn(), Er = Jr, Ar = pe, Tn = In("%Math.floor
1026
1026
  )), e;
1027
1027
  };
1028
1028
  (function(r) {
1029
- var e = or, t = re, n = Cn, a = pe, o = t("%Function.prototype.apply%"), i = t("%Function.prototype.call%"), f = t("%Reflect.apply%", !0) || e.call(i, o), l = ir(), u = t("%Math.max%");
1029
+ var e = or, t = re, n = On, a = pe, o = t("%Function.prototype.apply%"), i = t("%Function.prototype.call%"), f = t("%Reflect.apply%", !0) || e.call(i, o), l = ir(), u = t("%Math.max%");
1030
1030
  r.exports = function(c) {
1031
1031
  if (typeof c != "function")
1032
1032
  throw new a("a function is required");
@@ -1045,7 +1045,7 @@ var xn = Xr, In = re, Sr = $n, On = xn(), Er = Jr, Ar = pe, Tn = In("%Math.floor
1045
1045
  var Rn = jr.exports, Yr = re, Zr = Rn, Dn = Zr(Yr("String.prototype.indexOf")), _n = function(e, t) {
1046
1046
  var n = Yr(e, !!t);
1047
1047
  return typeof n == "function" && Dn(e, ".prototype.") > -1 ? Zr(n) : n;
1048
- }, Mn = gt.inspect, lr = typeof Map == "function" && Map.prototype, Le = Object.getOwnPropertyDescriptor && lr ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, xe = lr && Le && typeof Le.get == "function" ? Le.get : null, Pr = lr && Map.prototype.forEach, fr = typeof Set == "function" && Set.prototype, We = Object.getOwnPropertyDescriptor && fr ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, Ie = fr && We && typeof We.get == "function" ? We.get : null, $r = fr && Set.prototype.forEach, Nn = typeof WeakMap == "function" && WeakMap.prototype, fe = Nn ? WeakMap.prototype.has : null, Un = typeof WeakSet == "function" && WeakSet.prototype, ue = Un ? WeakSet.prototype.has : null, Bn = typeof WeakRef == "function" && WeakRef.prototype, xr = Bn ? WeakRef.prototype.deref : null, Fn = Boolean.prototype.valueOf, Ln = Object.prototype.toString, Wn = Function.prototype.toString, qn = String.prototype.match, ur = String.prototype.slice, U = String.prototype.replace, Gn = String.prototype.toUpperCase, Ir = String.prototype.toLowerCase, et = RegExp.prototype.test, Or = Array.prototype.concat, C = Array.prototype.join, kn = Array.prototype.slice, Tr = Math.floor, Je = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, qe = Object.getOwnPropertySymbols, Xe = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, Z = typeof Symbol == "function" && typeof Symbol.iterator == "object", $ = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === Z || !0) ? Symbol.toStringTag : null, rt = Object.prototype.propertyIsEnumerable, Cr = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(r) {
1048
+ }, Mn = gt.inspect, lr = typeof Map == "function" && Map.prototype, Le = Object.getOwnPropertyDescriptor && lr ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, xe = lr && Le && typeof Le.get == "function" ? Le.get : null, Pr = lr && Map.prototype.forEach, fr = typeof Set == "function" && Set.prototype, We = Object.getOwnPropertyDescriptor && fr ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, Ie = fr && We && typeof We.get == "function" ? We.get : null, $r = fr && Set.prototype.forEach, Nn = typeof WeakMap == "function" && WeakMap.prototype, fe = Nn ? WeakMap.prototype.has : null, Un = typeof WeakSet == "function" && WeakSet.prototype, ue = Un ? WeakSet.prototype.has : null, Bn = typeof WeakRef == "function" && WeakRef.prototype, xr = Bn ? WeakRef.prototype.deref : null, Fn = Boolean.prototype.valueOf, Ln = Object.prototype.toString, Wn = Function.prototype.toString, qn = String.prototype.match, ur = String.prototype.slice, U = String.prototype.replace, Gn = String.prototype.toUpperCase, Ir = String.prototype.toLowerCase, et = RegExp.prototype.test, Tr = Array.prototype.concat, O = Array.prototype.join, kn = Array.prototype.slice, Cr = Math.floor, Je = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, qe = Object.getOwnPropertySymbols, Xe = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, Z = typeof Symbol == "function" && typeof Symbol.iterator == "object", $ = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === Z || !0) ? Symbol.toStringTag : null, rt = Object.prototype.propertyIsEnumerable, Or = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(r) {
1049
1049
  return r.__proto__;
1050
1050
  } : null);
1051
1051
  function Rr(r, e) {
@@ -1053,7 +1053,7 @@ function Rr(r, e) {
1053
1053
  return e;
1054
1054
  var t = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
1055
1055
  if (typeof r == "number") {
1056
- var n = r < 0 ? -Tr(-r) : Tr(r);
1056
+ var n = r < 0 ? -Cr(-r) : Cr(r);
1057
1057
  if (n !== r) {
1058
1058
  var a = String(n), o = ur.call(e, a.length + 1);
1059
1059
  return U.call(a, t, "$&_") + "." + U.call(U.call(o, /([0-9]{3})/g, "$&_"), /_$/, "");
@@ -1112,7 +1112,7 @@ var Ye = Mn, Dr = Ye.custom, _r = nt(Dr) ? Dr : null, zn = function r(e, t, n, a
1112
1112
  }
1113
1113
  if (typeof e == "function" && !Mr(e)) {
1114
1114
  var d = Zn(e), y = he(e, c);
1115
- return "[Function" + (d ? ": " + d : " (anonymous)") + "]" + (y.length > 0 ? " { " + C.call(y, ", ") + " }" : "");
1115
+ return "[Function" + (d ? ": " + d : " (anonymous)") + "]" + (y.length > 0 ? " { " + O.call(y, ", ") + " }" : "");
1116
1116
  }
1117
1117
  if (nt(e)) {
1118
1118
  var m = Z ? U.call(String(e), /^(Symbol\(.*\))_[^)]*$/, "$1") : Xe.call(e);
@@ -1127,11 +1127,11 @@ var Ye = Mn, Dr = Ye.custom, _r = nt(Dr) ? Dr : null, zn = function r(e, t, n, a
1127
1127
  if (e.length === 0)
1128
1128
  return "[]";
1129
1129
  var h = he(e, c);
1130
- return p && !la(h) ? "[" + er(h, p) + "]" : "[ " + C.call(h, ", ") + " ]";
1130
+ return p && !la(h) ? "[" + er(h, p) + "]" : "[ " + O.call(h, ", ") + " ]";
1131
1131
  }
1132
1132
  if (Vn(e)) {
1133
1133
  var R = he(e, c);
1134
- return !("cause" in Error.prototype) && "cause" in e && !rt.call(e, "cause") ? "{ [" + String(e) + "] " + C.call(Or.call("[cause]: " + c(e.cause), R), ", ") + " }" : R.length === 0 ? "[" + String(e) + "]" : "{ [" + String(e) + "] " + C.call(R, ", ") + " }";
1134
+ return !("cause" in Error.prototype) && "cause" in e && !rt.call(e, "cause") ? "{ [" + String(e) + "] " + O.call(Tr.call("[cause]: " + c(e.cause), R), ", ") + " }" : R.length === 0 ? "[" + String(e) + "]" : "{ [" + String(e) + "] " + O.call(R, ", ") + " }";
1135
1135
  }
1136
1136
  if (typeof e == "object" && i) {
1137
1137
  if (_r && typeof e[_r] == "function" && Ye)
@@ -1170,8 +1170,8 @@ var Ye = Mn, Dr = Ye.custom, _r = nt(Dr) ? Dr : null, zn = function r(e, t, n, a
1170
1170
  if (typeof globalThis < "u" && e === globalThis || typeof yr < "u" && e === yr)
1171
1171
  return "{ [object globalThis] }";
1172
1172
  if (!Kn(e) && !Mr(e)) {
1173
- var z = he(e, c), de = Cr ? Cr(e) === Object.prototype : e instanceof Object || e.constructor === Object, L = e instanceof Object ? "" : "null prototype", D = !de && $ && Object(e) === e && $ in e ? ur.call(B(e), 8, -1) : L ? "Object" : "", me = de || typeof e.constructor != "function" ? "" : e.constructor.name ? e.constructor.name + " " : "", H = me + (D || L ? "[" + C.call(Or.call([], D || [], L || []), ": ") + "] " : "");
1174
- return z.length === 0 ? H + "{}" : p ? H + "{" + er(z, p) + "}" : H + "{ " + C.call(z, ", ") + " }";
1173
+ var z = he(e, c), de = Or ? Or(e) === Object.prototype : e instanceof Object || e.constructor === Object, L = e instanceof Object ? "" : "null prototype", D = !de && $ && Object(e) === e && $ in e ? ur.call(B(e), 8, -1) : L ? "Object" : "", me = de || typeof e.constructor != "function" ? "" : e.constructor.name ? e.constructor.name + " " : "", H = me + (D || L ? "[" + O.call(Tr.call([], D || [], L || []), ": ") + "] " : "");
1174
+ return z.length === 0 ? H + "{}" : p ? H + "{" + er(z, p) + "}" : H + "{ " + O.call(z, ", ") + " }";
1175
1175
  }
1176
1176
  return String(e);
1177
1177
  };
@@ -1345,7 +1345,7 @@ function Ge(r) {
1345
1345
  return r + " { ? }";
1346
1346
  }
1347
1347
  function Nr(r, e, t, n) {
1348
- var a = n ? er(t, n) : C.call(t, ", ");
1348
+ var a = n ? er(t, n) : O.call(t, ", ");
1349
1349
  return r + " (" + e + ") {" + a + "}";
1350
1350
  }
1351
1351
  function la(r) {
@@ -1360,12 +1360,12 @@ function fa(r, e) {
1360
1360
  if (r.indent === " ")
1361
1361
  t = " ";
1362
1362
  else if (typeof r.indent == "number" && r.indent > 0)
1363
- t = C.call(Array(r.indent + 1), " ");
1363
+ t = O.call(Array(r.indent + 1), " ");
1364
1364
  else
1365
1365
  return null;
1366
1366
  return {
1367
1367
  base: t,
1368
- prev: C.call(Array(e + 1), t)
1368
+ prev: O.call(Array(e + 1), t)
1369
1369
  };
1370
1370
  }
1371
1371
  function er(r, e) {
@@ -1373,7 +1373,7 @@ function er(r, e) {
1373
1373
  return "";
1374
1374
  var t = `
1375
1375
  ` + e.prev + e.base;
1376
- return t + C.call(r, "," + t) + `
1376
+ return t + O.call(r, "," + t) + `
1377
1377
  ` + e.prev;
1378
1378
  }
1379
1379
  function he(r, e) {
@@ -1462,7 +1462,7 @@ var it = re, te = _n, ua = zn, ca = pe, ve = it("%WeakMap%", !0), ge = it("%Map%
1462
1462
  },
1463
1463
  RFC1738: ke.RFC1738,
1464
1464
  RFC3986: ke.RFC3986
1465
- }, Aa = sr, ze = Object.prototype.hasOwnProperty, W = Array.isArray, O = function() {
1465
+ }, Aa = sr, ze = Object.prototype.hasOwnProperty, W = Array.isArray, T = function() {
1466
1466
  for (var r = [], e = 0; e < 256; ++e)
1467
1467
  r.push("%" + ((e < 16 ? "0" : "") + e.toString(16)).toUpperCase());
1468
1468
  return r;
@@ -1517,7 +1517,7 @@ var it = re, te = _n, ua = zn, ca = pe, ve = it("%WeakMap%", !0), ge = it("%Map%
1517
1517
  } catch {
1518
1518
  return n;
1519
1519
  }
1520
- }, He = 1024, Oa = function(e, t, n, a, o) {
1520
+ }, He = 1024, Ta = function(e, t, n, a, o) {
1521
1521
  if (e.length === 0)
1522
1522
  return e;
1523
1523
  var i = e;
@@ -1533,30 +1533,30 @@ var it = re, te = _n, ua = zn, ca = pe, ve = it("%WeakMap%", !0), ge = it("%Map%
1533
1533
  continue;
1534
1534
  }
1535
1535
  if (c < 128) {
1536
- s[s.length] = O[c];
1536
+ s[s.length] = T[c];
1537
1537
  continue;
1538
1538
  }
1539
1539
  if (c < 2048) {
1540
- s[s.length] = O[192 | c >> 6] + O[128 | c & 63];
1540
+ s[s.length] = T[192 | c >> 6] + T[128 | c & 63];
1541
1541
  continue;
1542
1542
  }
1543
1543
  if (c < 55296 || c >= 57344) {
1544
- s[s.length] = O[224 | c >> 12] + O[128 | c >> 6 & 63] + O[128 | c & 63];
1544
+ s[s.length] = T[224 | c >> 12] + T[128 | c >> 6 & 63] + T[128 | c & 63];
1545
1545
  continue;
1546
1546
  }
1547
- p += 1, c = 65536 + ((c & 1023) << 10 | u.charCodeAt(p) & 1023), s[s.length] = O[240 | c >> 18] + O[128 | c >> 12 & 63] + O[128 | c >> 6 & 63] + O[128 | c & 63];
1547
+ p += 1, c = 65536 + ((c & 1023) << 10 | u.charCodeAt(p) & 1023), s[s.length] = T[240 | c >> 18] + T[128 | c >> 12 & 63] + T[128 | c >> 6 & 63] + T[128 | c & 63];
1548
1548
  }
1549
1549
  f += s.join("");
1550
1550
  }
1551
1551
  return f;
1552
- }, Ta = function(e) {
1552
+ }, Ca = function(e) {
1553
1553
  for (var t = [{ obj: { o: e }, prop: "o" }], n = [], a = 0; a < t.length; ++a)
1554
1554
  for (var o = t[a], i = o.obj[o.prop], f = Object.keys(i), l = 0; l < f.length; ++l) {
1555
1555
  var u = f[l], s = i[u];
1556
1556
  typeof s == "object" && s !== null && n.indexOf(s) === -1 && (t.push({ obj: i, prop: u }), n.push(s));
1557
1557
  }
1558
1558
  return Pa(t), e;
1559
- }, Ca = function(e) {
1559
+ }, Oa = function(e) {
1560
1560
  return Object.prototype.toString.call(e) === "[object RegExp]";
1561
1561
  }, Ra = function(e) {
1562
1562
  return !e || typeof e != "object" ? !1 : !!(e.constructor && e.constructor.isBuffer && e.constructor.isBuffer(e));
@@ -1573,11 +1573,11 @@ var it = re, te = _n, ua = zn, ca = pe, ve = it("%WeakMap%", !0), ge = it("%Map%
1573
1573
  arrayToObject: lt,
1574
1574
  assign: xa,
1575
1575
  combine: Da,
1576
- compact: Ta,
1576
+ compact: Ca,
1577
1577
  decode: Ia,
1578
- encode: Oa,
1578
+ encode: Ta,
1579
1579
  isBuffer: Ra,
1580
- isRegExp: Ca,
1580
+ isRegExp: Oa,
1581
1581
  maybeMap: _a,
1582
1582
  merge: $a
1583
1583
  }, ut = ba, Ee = ft, ce = sr, Ma = Object.prototype.hasOwnProperty, ct = {
@@ -1591,8 +1591,8 @@ var it = re, te = _n, ua = zn, ca = pe, ve = it("%WeakMap%", !0), ge = it("%Map%
1591
1591
  repeat: function(e) {
1592
1592
  return e;
1593
1593
  }
1594
- }, T = Array.isArray, Na = Array.prototype.push, st = function(r, e) {
1595
- Na.apply(r, T(e) ? e : [e]);
1594
+ }, C = Array.isArray, Na = Array.prototype.push, st = function(r, e) {
1595
+ Na.apply(r, C(e) ? e : [e]);
1596
1596
  }, Ua = Date.prototype.toISOString, Ur = ce.default, E = {
1597
1597
  addQueryPrefix: !1,
1598
1598
  allowDots: !1,
@@ -1626,7 +1626,7 @@ var it = re, te = _n, ua = zn, ca = pe, ve = it("%WeakMap%", !0), ge = it("%Map%
1626
1626
  }
1627
1627
  typeof R.get(Ke) > "u" && (F = 0);
1628
1628
  }
1629
- if (typeof s == "function" ? h = s(t, h) : h instanceof Date ? h = d(h) : n === "comma" && T(h) && (h = Ee.maybeMap(h, function(De) {
1629
+ if (typeof s == "function" ? h = s(t, h) : h instanceof Date ? h = d(h) : n === "comma" && C(h) && (h = Ee.maybeMap(h, function(De) {
1630
1630
  return De instanceof Date ? d(De) : De;
1631
1631
  })), h === null) {
1632
1632
  if (i)
@@ -1644,21 +1644,21 @@ var it = re, te = _n, ua = zn, ca = pe, ve = it("%WeakMap%", !0), ge = it("%Map%
1644
1644
  if (typeof h > "u")
1645
1645
  return L;
1646
1646
  var D;
1647
- if (n === "comma" && T(h))
1647
+ if (n === "comma" && C(h))
1648
1648
  g && u && (h = Ee.maybeMap(h, u)), D = [{ value: h.length > 0 ? h.join(",") || null : void 0 }];
1649
- else if (T(s))
1649
+ else if (C(s))
1650
1650
  D = s;
1651
1651
  else {
1652
1652
  var me = Object.keys(h);
1653
1653
  D = p ? me.sort(p) : me;
1654
1654
  }
1655
- var H = l ? t.replace(/\./g, "%2E") : t, I = a && T(h) && h.length === 1 ? H + "[]" : H;
1656
- if (o && T(h) && h.length === 0)
1655
+ var H = l ? t.replace(/\./g, "%2E") : t, I = a && C(h) && h.length === 1 ? H + "[]" : H;
1656
+ if (o && C(h) && h.length === 0)
1657
1657
  return I + "[]";
1658
1658
  for (var _ = 0; _ < D.length; ++_) {
1659
1659
  var M = D[_], ae = typeof M == "object" && typeof M.value < "u" ? M.value : h[M];
1660
1660
  if (!(f && ae === null)) {
1661
- var Re = c && l ? M.replace(/\./g, "%2E") : M, yt = T(h) ? typeof n == "function" ? n(I, Re) : I : I + (c ? "." + Re : "[" + Re + "]");
1661
+ var Re = c && l ? M.replace(/\./g, "%2E") : M, yt = C(h) ? typeof n == "function" ? n(I, Re) : I : I + (c ? "." + Re : "[" + Re + "]");
1662
1662
  P.set(e, F);
1663
1663
  var pr = ut();
1664
1664
  pr.set(Ke, P), st(L, r(
@@ -1670,7 +1670,7 @@ var it = re, te = _n, ua = zn, ca = pe, ve = it("%WeakMap%", !0), ge = it("%Map%
1670
1670
  i,
1671
1671
  f,
1672
1672
  l,
1673
- n === "comma" && g && T(h) ? null : u,
1673
+ n === "comma" && g && C(h) ? null : u,
1674
1674
  s,
1675
1675
  p,
1676
1676
  c,
@@ -1703,7 +1703,7 @@ var it = re, te = _n, ua = zn, ca = pe, ve = it("%WeakMap%", !0), ge = it("%Map%
1703
1703
  n = e.format;
1704
1704
  }
1705
1705
  var a = ce.formatters[n], o = E.filter;
1706
- (typeof e.filter == "function" || T(e.filter)) && (o = e.filter);
1706
+ (typeof e.filter == "function" || C(e.filter)) && (o = e.filter);
1707
1707
  var i;
1708
1708
  if (e.arrayFormat in ct ? i = e.arrayFormat : "indices" in e ? i = e.indices ? "indices" : "repeat" : i = E.arrayFormat, "commaRoundTrip" in e && typeof e.commaRoundTrip != "boolean")
1709
1709
  throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
@@ -1731,7 +1731,7 @@ var it = re, te = _n, ua = zn, ca = pe, ve = it("%WeakMap%", !0), ge = it("%Map%
1731
1731
  };
1732
1732
  }, Wa = function(r, e) {
1733
1733
  var t = r, n = La(e), a, o;
1734
- typeof n.filter == "function" ? (o = n.filter, t = o("", t)) : T(n.filter) && (o = n.filter, a = o);
1734
+ typeof n.filter == "function" ? (o = n.filter, t = o("", t)) : C(n.filter) && (o = n.filter, a = o);
1735
1735
  var i = [];
1736
1736
  if (typeof t != "object" || t === null)
1737
1737
  return "";
@@ -2056,15 +2056,24 @@ class to {
2056
2056
  m !== void 0 && (u.body = m);
2057
2057
  };
2058
2058
  if (l.middlewares && l.middlewares.length > 0) {
2059
- const y = Br(l.middlewares);
2060
- await this.fnMiddleware(s, () => y(s, p));
2059
+ const y = Br(l.middlewares), m = async () => await y(s, p);
2060
+ n != null && n.noPublicMiddleware ? await m : await this.fnMiddleware(s, m);
2061
2061
  } else
2062
- await this.fnMiddleware(s, p);
2062
+ n != null && n.noPublicMiddleware ? await this.fnMiddleware(s, p) : await p();
2063
2063
  return s.res;
2064
2064
  }
2065
2065
  async fetch(e, t, n) {
2066
2066
  return (await this.fetchRaw(e, t, n)).body;
2067
2067
  }
2068
+ // API间互相调用
2069
+ async action(e, t, n) {
2070
+ const a = {
2071
+ ...n ?? {},
2072
+ url: (n == null ? void 0 : n.url) ?? e,
2073
+ noPublicMiddleware: !0
2074
+ };
2075
+ return await this.fetch(e, t, a);
2076
+ }
2068
2077
  mount(e, t) {
2069
2078
  this.extensions.set(e, t);
2070
2079
  }
package/dist/types.d.ts CHANGED
@@ -85,6 +85,7 @@ export type SoonFetchOptions = {
85
85
  ip?: string;
86
86
  platform?: Context['platform'];
87
87
  namespace?: keyof Namespace;
88
+ noPublicMiddleware?: boolean;
88
89
  };
89
90
  export type Middleware = (context: Context, next: () => any) => Promise<void> | void;
90
91
  export type SoonAppOptions = {
@@ -1,4 +1,4 @@
1
- "use strict";var rT=Object.defineProperty;var nT=(e,t,r)=>t in e?rT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var yi=(e,t,r)=>nT(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const St=require("fs"),rt=require("path"),Ns=require("module"),xe=require("url"),Fr=require("process"),tc=require("os"),xs=require("tty"),Ii=require("fs/promises"),rr=require("assert"),iT=require("v8"),Fs=require("util"),Jr=require("./deps/soon-id-gcjwh4b6w.js"),sT=require("crypto");var ro=typeof document<"u"?document.currentScript:null;function aT(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const no=aT(rt);var oT=Object.defineProperty,uT=(e,t)=>{for(var r in t)oT(e,r,{get:t[r],enumerable:!0})},Em={};uT(Em,{builders:()=>Fm,printer:()=>_m,utils:()=>wm});var si="string",zr="array",ai="cursor",An="indent",Cn="align",Pn="trim",nr="group",xn="fill",mr="if-break",Fn="indent-if-break",_n="line-suffix",wn="line-suffix-boundary",Ut="line",In="label",wr="break-parent",bm=new Set([ai,An,Cn,Pn,nr,xn,mr,Fn,_n,wn,Ut,In,wr]);function lT(e){if(typeof e=="string")return si;if(Array.isArray(e))return zr;if(!e)return;const{type:t}=e;if(bm.has(t))return t}var oi=lT,cT=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function fT(e){const t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}',
1
+ "use strict";var rT=Object.defineProperty;var nT=(e,t,r)=>t in e?rT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var yi=(e,t,r)=>nT(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const St=require("fs"),rt=require("path"),Ns=require("module"),xe=require("url"),Fr=require("process"),tc=require("os"),xs=require("tty"),Ii=require("fs/promises"),rr=require("assert"),iT=require("v8"),Fs=require("util"),Jr=require("./deps/soon-id-unm7ynfew.js"),sT=require("crypto");var ro=typeof document<"u"?document.currentScript:null;function aT(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const no=aT(rt);var oT=Object.defineProperty,uT=(e,t)=>{for(var r in t)oT(e,r,{get:t[r],enumerable:!0})},Em={};uT(Em,{builders:()=>Fm,printer:()=>_m,utils:()=>wm});var si="string",zr="array",ai="cursor",An="indent",Cn="align",Pn="trim",nr="group",xn="fill",mr="if-break",Fn="indent-if-break",_n="line-suffix",wn="line-suffix-boundary",Ut="line",In="label",wr="break-parent",bm=new Set([ai,An,Cn,Pn,nr,xn,mr,Fn,_n,wn,Ut,In,wr]);function lT(e){if(typeof e=="string")return si;if(Array.isArray(e))return zr;if(!e)return;const{type:t}=e;if(bm.has(t))return t}var oi=lT,cT=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function fT(e){const t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}',
2
2
  Expected it to be 'string' or 'object'.`;if(oi(e))throw new Error("doc is valid.");const r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;const n=cT([...bm].map(i=>`'${i}'`));return`Unexpected doc.type '${e.type}'.
3
3
  Expected it to be ${n}.`}var pT=class extends Error{constructor(r){super(fT(r));yi(this,"name","InvalidDocError");this.doc=r}},Oi=pT,Uf={};function hT(e,t,r,n){const i=[e];for(;i.length>0;){const s=i.pop();if(s===Uf){r(i.pop());continue}r&&i.push(s,Uf);const a=oi(s);if(!a)throw new Oi(s);if((t==null?void 0:t(s))!==!1)switch(a){case zr:case xn:{const o=a===zr?s:s.parts;for(let u=o.length,l=u-1;l>=0;--l)i.push(o[l]);break}case mr:i.push(s.flatContents,s.breakContents);break;case nr:if(n&&s.expandedStates)for(let o=s.expandedStates.length,u=o-1;u>=0;--u)i.push(s.expandedStates[u]);else i.push(s.contents);break;case Cn:case An:case Fn:case In:case _n:i.push(s.contents);break;case si:case ai:case Pn:case wn:case Ut:case wr:break;default:throw new Oi(s)}}}var rc=hT,dT=()=>{},mT=dT;function io(e){return{type:An,contents:e}}function Ni(e,t){return{type:Cn,contents:t,n:e}}function Tm(e,t={}){return mT(t.expandedStates),{type:nr,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function yT(e){return Ni(Number.NEGATIVE_INFINITY,e)}function DT(e){return Ni({type:"root"},e)}function gT(e){return Ni(-1,e)}function ET(e,t){return Tm(e[0],{...t,expandedStates:e})}function Sm(e){return{type:xn,parts:e}}function bT(e,t="",r={}){return{type:mr,breakContents:e,flatContents:t,groupId:r.groupId}}function TT(e,t){return{type:Fn,contents:e,groupId:t.groupId,negate:t.negate}}function ST(e){return{type:_n,contents:e}}var vT={type:wn},nc={type:wr},AT={type:Pn},ic={type:Ut,hard:!0},vm={type:Ut,hard:!0,literal:!0},CT={type:Ut},PT={type:Ut,soft:!0},xT=[ic,nc],Am=[vm,nc],FT={type:ai};function Cm(e,t){const r=[];for(let n=0;n<t.length;n++)n!==0&&r.push(e),r.push(t[n]);return r}function _T(e,t,r){let n=e;if(t>0){for(let i=0;i<Math.floor(t/r);++i)n=io(n);n=Ni(t%r,n),n=Ni(Number.NEGATIVE_INFINITY,n)}return n}function wT(e,t){return e?{type:In,label:e,contents:t}:t}var IT=(e,t,r)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[r<0?t.length+r:r]:t.at(r)},yn=IT,OT=(e,t,r,n)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)},NT=OT;function BT(e){switch(e){case"cr":return"\r";case"crlf":return`\r
4
4
  `;default:return`
@@ -102,7 +102,7 @@ in order for it to be formatted.`,cliCategory:"Other"},tabWidth:{type:"int",cate
102
102
  `&&(p+=Hy(h.slice(0,p),`
103
103
  `)),h=Ls(!1,h,`
104
104
  `,d)}return{formatted:h,cursorOffset:p,comments:c.comments}}function Ou(e,t,r){return typeof t!="number"||Number.isNaN(t)||t<0||t>e.length?r:t}function Yp(e,t){let{cursorOffset:r,rangeStart:n,rangeEnd:i}=t;return r=Ou(e,r,-1),n=Ou(e,n,0),i=Ou(e,i,e.length),{...t,cursorOffset:r,rangeStart:n,rangeEnd:i}}function y0(e,t){let{cursorOffset:r,rangeStart:n,rangeEnd:i,endOfLine:s}=Yp(e,t);const a=e.charAt(0)===d0;if(a&&(e=e.slice(1),r--,n--,i--),s==="auto"&&(s=Kx(e)),e.includes("\r")){const o=u=>Hy(e.slice(0,Math.max(u,0)),`\r
105
- `);r-=o(r),n-=o(n),i-=o(i),e=Wx(e)}return{hasBOM:a,text:e,options:Yp(e,{...t,cursorOffset:r,rangeStart:n,rangeEnd:i,endOfLine:s})}}async function Xp(e,t){const r=await c0(t);return!r.hasPragma||r.hasPragma(e)}async function D0(e,t){let{hasBOM:r,text:n,options:i}=y0(e,await $i(t));if(i.rangeStart>=i.rangeEnd&&n!==""||i.requirePragma&&!await Xp(n,i))return{formatted:e,cursorOffset:t.cursorOffset,comments:[]};let s;return i.rangeStart>0||i.rangeEnd<n.length?s=await d2(n,i):(!i.requirePragma&&i.insertPragma&&i.printer.insertPragma&&!await Xp(n,i)&&(n=i.printer.insertPragma(n)),s=await m0(n,i)),r&&(s.formatted=d0+s.formatted,s.cursorOffset>=0&&s.cursorOffset++),s}async function m2(e,t,r){const{text:n,options:i}=y0(e,await $i(t)),s=await Rs(n,i);return r&&(r.preprocessForPrint&&(s.ast=await p0(s.ast,i)),r.massage&&(s.ast=s2(s.ast,i))),s}async function y2(e,t){t=await $i(t);const r=await Io(e,t);return Fc(r,t)}async function D2(e,t){const r=tF(e),{formatted:n}=await D0(r,{...t,parser:"__js_expression"});return n}async function g2(e,t){t=await $i(t);const{ast:r}=await Rs(e,t);return Io(r,t)}async function E2(e,t){return Fc(e,await $i(t))}var g0={};Ri(g0,{CATEGORY_CONFIG:()=>b2,CATEGORY_EDITOR:()=>T2,CATEGORY_FORMAT:()=>S2,CATEGORY_GLOBAL:()=>C2,CATEGORY_OTHER:()=>v2,CATEGORY_OUTPUT:()=>A2,CATEGORY_SPECIAL:()=>P2});var b2="Config",T2="Editor",S2="Format",v2="Other",A2="Output",C2="Global",P2="Special",E0={};Ri(E0,{languages:()=>X2,options:()=>Y2,parsers:()=>J2,printers:()=>z2});var x2=[{linguistLanguageId:50,name:"CSS",type:"markup",tmScope:"source.css",aceMode:"css",codemirrorMode:"css",codemirrorMimeType:"text/css",color:"#563d7c",extensions:[".css",".wxss"],parsers:["css"],vscodeLanguageIds:["css"]},{linguistLanguageId:262764437,name:"PostCSS",type:"markup",color:"#dc3a0c",tmScope:"source.postcss",group:"CSS",extensions:[".pcss",".postcss"],aceMode:"text",parsers:["css"],vscodeLanguageIds:["postcss"]},{linguistLanguageId:198,name:"Less",type:"markup",color:"#1d365d",aliases:["less-css"],extensions:[".less"],tmScope:"source.css.less",aceMode:"less",codemirrorMode:"css",codemirrorMimeType:"text/css",parsers:["less"],vscodeLanguageIds:["less"]},{linguistLanguageId:329,name:"SCSS",type:"markup",color:"#c6538c",tmScope:"source.css.scss",aceMode:"scss",codemirrorMode:"css",codemirrorMimeType:"text/x-scss",extensions:[".scss"],parsers:["scss"],vscodeLanguageIds:["scss"]}],Xt={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}},F2={singleQuote:Xt.singleQuote},_2=F2,w2=[{linguistLanguageId:139,name:"GraphQL",type:"data",color:"#e10098",extensions:[".graphql",".gql",".graphqls"],tmScope:"source.graphql",aceMode:"text",parsers:["graphql"],vscodeLanguageIds:["graphql"]}],I2={bracketSpacing:Xt.bracketSpacing},O2=I2,N2=[{linguistLanguageId:155,name:"Handlebars",type:"markup",color:"#f7931e",aliases:["hbs","htmlbars"],extensions:[".handlebars",".hbs"],tmScope:"text.html.handlebars",aceMode:"handlebars",parsers:["glimmer"],vscodeLanguageIds:["handlebars"]}],B2=[{linguistLanguageId:146,name:"Angular",type:"markup",tmScope:"text.html.basic",aceMode:"html",codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",color:"#e34c26",aliases:["xhtml"],extensions:[".component.html"],parsers:["angular"],vscodeLanguageIds:["html"],filenames:[]},{linguistLanguageId:146,name:"HTML",type:"markup",tmScope:"text.html.basic",aceMode:"html",codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",color:"#e34c26",aliases:["xhtml"],extensions:[".html",".hta",".htm",".html.hl",".inc",".xht",".xhtml",".mjml"],parsers:["html"],vscodeLanguageIds:["html"]},{linguistLanguageId:146,name:"Lightning Web Components",type:"markup",tmScope:"text.html.basic",aceMode:"html",codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",color:"#e34c26",aliases:["xhtml"],extensions:[],parsers:["lwc"],vscodeLanguageIds:["html"],filenames:[]},{linguistLanguageId:391,name:"Vue",type:"markup",color:"#41b883",extensions:[".vue"],tmScope:"text.html.vue",aceMode:"html",parsers:["vue"],vscodeLanguageIds:["vue"]}],Jp="HTML",L2={bracketSameLine:Xt.bracketSameLine,htmlWhitespaceSensitivity:{category:Jp,type:"choice",default:"css",description:"How to handle whitespaces in HTML.",choices:[{value:"css",description:"Respect the default value of CSS display property."},{value:"strict",description:"Whitespaces are considered sensitive."},{value:"ignore",description:"Whitespaces are considered insensitive."}]},singleAttributePerLine:Xt.singleAttributePerLine,vueIndentScriptAndStyle:{category:Jp,type:"boolean",default:!1,description:"Indent script and style tags in Vue files."}},k2=L2,R2=[{linguistLanguageId:183,name:"JavaScript",type:"programming",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",color:"#f1e05a",aliases:["js","node"],extensions:[".js","._js",".bones",".cjs",".es",".es6",".frag",".gs",".jake",".javascript",".jsb",".jscad",".jsfl",".jslib",".jsm",".jspre",".jss",".mjs",".njs",".pac",".sjs",".ssjs",".xsjs",".xsjslib",".wxs"],filenames:["Jakefile"],interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell","zx"],parsers:["babel","acorn","espree","meriyah","babel-flow","babel-ts","flow","typescript"],vscodeLanguageIds:["javascript","mongo"]},{linguistLanguageId:183,name:"Flow",type:"programming",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",color:"#f1e05a",aliases:[],extensions:[".js.flow"],filenames:[],interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell"],parsers:["flow","babel-flow"],vscodeLanguageIds:["javascript"]},{linguistLanguageId:183,name:"JSX",type:"programming",tmScope:"source.js.jsx",aceMode:"javascript",codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",color:void 0,aliases:void 0,extensions:[".jsx"],filenames:void 0,interpreters:void 0,parsers:["babel","babel-flow","babel-ts","flow","typescript","espree","meriyah"],vscodeLanguageIds:["javascriptreact"],group:"JavaScript"},{linguistLanguageId:378,name:"TypeScript",type:"programming",color:"#3178c6",aliases:["ts"],interpreters:["deno","ts-node"],extensions:[".ts",".cts",".mts"],tmScope:"source.ts",aceMode:"typescript",codemirrorMode:"javascript",codemirrorMimeType:"application/typescript",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescript"]},{linguistLanguageId:94901924,name:"TSX",type:"programming",color:"#3178c6",group:"TypeScript",extensions:[".tsx"],tmScope:"source.tsx",aceMode:"javascript",codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescriptreact"]}],Gn="JavaScript",M2={arrowParens:{category:Gn,type:"choice",default:"always",description:"Include parentheses around a sole arrow function parameter.",choices:[{value:"always",description:"Always include parens. Example: `(x) => x`"},{value:"avoid",description:"Omit parens when possible. Example: `x => x`"}]},bracketSameLine:Xt.bracketSameLine,bracketSpacing:Xt.bracketSpacing,jsxBracketSameLine:{category:Gn,type:"boolean",description:"Put > on the last line instead of at a new line.",deprecated:"2.4.0"},semi:{category:Gn,type:"boolean",default:!0,description:"Print semicolons.",oppositeDescription:"Do not print semicolons, except at the beginning of lines which may need them."},experimentalTernaries:{category:Gn,type:"boolean",default:!1,description:"Use curious ternaries, with the question mark after the condition.",oppositeDescription:"Default behavior of ternaries; keep question marks on the same line as the consequent."},singleQuote:Xt.singleQuote,jsxSingleQuote:{category:Gn,type:"boolean",default:!1,description:"Use single quotes in JSX."},quoteProps:{category:Gn,type:"choice",default:"as-needed",description:"Change when properties in objects are quoted.",choices:[{value:"as-needed",description:"Only add quotes around object properties where required."},{value:"consistent",description:"If at least one property in an object requires quotes, quote all properties."},{value:"preserve",description:"Respect the input use of quotes in object properties."}]},trailingComma:{category:Gn,type:"choice",default:"all",description:"Print trailing commas wherever possible when multi-line.",choices:[{value:"all",description:"Trailing commas wherever possible (including function arguments)."},{value:"es5",description:"Trailing commas where valid in ES5 (objects, arrays, etc.)"},{value:"none",description:"No trailing commas."}]},singleAttributePerLine:Xt.singleAttributePerLine},j2=M2,$2=[{linguistLanguageId:174,name:"JSON.stringify",type:"data",color:"#292929",tmScope:"source.json",aceMode:"json",codemirrorMode:"javascript",codemirrorMimeType:"application/json",aliases:["geojson","jsonl","topojson"],extensions:[".importmap"],filenames:["package.json","package-lock.json","composer.json"],parsers:["json-stringify"],vscodeLanguageIds:["json"]},{linguistLanguageId:174,name:"JSON",type:"data",color:"#292929",tmScope:"source.json",aceMode:"json",codemirrorMode:"javascript",codemirrorMimeType:"application/json",aliases:["geojson","jsonl","topojson"],extensions:[".json",".4DForm",".4DProject",".avsc",".geojson",".gltf",".har",".ice",".JSON-tmLanguage",".mcmeta",".tfstate",".tfstate.backup",".topojson",".webapp",".webmanifest",".yy",".yyp"],filenames:[".all-contributorsrc",".arcconfig",".auto-changelog",".c8rc",".htmlhintrc",".imgbotconfig",".nycrc",".tern-config",".tern-project",".watchmanconfig","Pipfile.lock","composer.lock","flake.lock","mcmod.info",".babelrc",".jscsrc",".jshintrc",".jslintrc",".swcrc"],parsers:["json"],vscodeLanguageIds:["json"]},{linguistLanguageId:423,name:"JSON with Comments",type:"data",color:"#292929",group:"JSON",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",aliases:["jsonc"],extensions:[".jsonc",".code-snippets",".code-workspace",".sublime-build",".sublime-commands",".sublime-completions",".sublime-keymap",".sublime-macro",".sublime-menu",".sublime-mousemap",".sublime-project",".sublime-settings",".sublime-theme",".sublime-workspace",".sublime_metrics",".sublime_session"],filenames:[],parsers:["jsonc"],vscodeLanguageIds:["jsonc"]},{linguistLanguageId:175,name:"JSON5",type:"data",color:"#267CB9",extensions:[".json5"],tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"application/json",parsers:["json5"],vscodeLanguageIds:["json5"]}],U2=[{linguistLanguageId:222,name:"Markdown",type:"prose",color:"#083fa1",aliases:["md","pandoc"],aceMode:"markdown",codemirrorMode:"gfm",codemirrorMimeType:"text/x-gfm",wrap:!0,extensions:[".md",".livemd",".markdown",".mdown",".mdwn",".mkd",".mkdn",".mkdown",".ronn",".scd",".workbook"],filenames:["contents.lr","README"],tmScope:"text.md",parsers:["markdown"],vscodeLanguageIds:["markdown"]},{linguistLanguageId:222,name:"MDX",type:"prose",color:"#083fa1",aliases:["md","pandoc"],aceMode:"markdown",codemirrorMode:"gfm",codemirrorMimeType:"text/x-gfm",wrap:!0,extensions:[".mdx"],filenames:[],tmScope:"text.md",parsers:["mdx"],vscodeLanguageIds:["mdx"]}],V2={proseWrap:Xt.proseWrap,singleQuote:Xt.singleQuote},q2=V2,K2=[{linguistLanguageId:407,name:"YAML",type:"data",color:"#cb171e",tmScope:"source.yaml",aliases:["yml"],extensions:[".yml",".mir",".reek",".rviz",".sublime-syntax",".syntax",".yaml",".yaml-tmlanguage",".yaml.sed",".yml.mysql"],filenames:[".clang-format",".clang-tidy",".gemrc","CITATION.cff","glide.lock",".prettierrc",".stylelintrc",".lintstagedrc"],aceMode:"yaml",codemirrorMode:"yaml",codemirrorMimeType:"text/x-yaml",parsers:["yaml"],vscodeLanguageIds:["yaml","ansible","home-assistant"]}],W2={bracketSpacing:Xt.bracketSpacing,singleQuote:Xt.singleQuote,proseWrap:Xt.proseWrap},H2=W2;function G2(e){const t=Object.create(null),r=Object.create(null);for(const{importPlugin:n,parsers:i=[],printers:s=[]}of e){const a=async()=>{const o=await n();return Object.assign(t,o.parsers),Object.assign(r,o.printers),o};for(const o of i)t[o]=async()=>(await a()).parsers[o];for(const o of s)r[o]=async()=>(await a()).printers[o]}return{parsers:t,printers:r}}var Y2={..._2,...O2,...k2,...j2,...q2,...H2},X2=[...x2,...w2,...N2,...B2,...R2,...$2,...U2,...K2],{parsers:J2,printers:z2}=G2([{importPlugin:()=>Promise.resolve().then(()=>require("./deps/acorn-pz2l75c0o.js")),parsers:["acorn","espree"]},{importPlugin:()=>Promise.resolve().then(()=>require("./deps/angular-ylbwe6o4m.js")),parsers:["__ng_action","__ng_binding","__ng_interpolation","__ng_directive"]},{importPlugin:()=>Promise.resolve().then(()=>require("./deps/babel-rrk5vxekq.js")),parsers:["babel","babel-flow","babel-ts","__js_expression","__ts_expression","__vue_expression","__vue_ts_expression","__vue_event_binding","__vue_ts_event_binding","__babel_estree","json","json5","jsonc","json-stringify"]},{importPlugin:()=>Promise.resolve().then(()=>require("./deps/estree-sxd1ofglp.js")),printers:["estree","estree-json"]},{importPlugin:()=>Promise.resolve().then(()=>require("./deps/flow-0e9ntu2qg.js")),parsers:["flow"]},{importPlugin:()=>Promise.resolve().then(()=>require("./deps/glimmer-7hp8ol5n5.js")),parsers:["glimmer"],printers:["glimmer"]},{importPlugin:()=>Promise.resolve().then(()=>require("./deps/graphql-ay3rfc6fx.js")),parsers:["graphql"],printers:["graphql"]},{importPlugin:()=>Promise.resolve().then(()=>require("./deps/html-5uq22xok6.js")),parsers:["html","angular","vue","lwc"],printers:["html"]},{importPlugin:()=>Promise.resolve().then(()=>require("./deps/markdown-u4i48dgph.js")),parsers:["markdown","mdx","remark"],printers:["mdast"]},{importPlugin:()=>Promise.resolve().then(()=>require("./deps/meriyah-texsyhmbu.js")),parsers:["meriyah"]},{importPlugin:()=>Promise.resolve().then(()=>require("./deps/postcss-gfyslywcs.js")),parsers:["css","less","scss"],printers:["postcss"]},{importPlugin:()=>Promise.resolve().then(()=>require("./deps/typescript-tobx6ffbh.js")),parsers:["typescript"]},{importPlugin:()=>Promise.resolve().then(()=>require("./deps/yaml-28qc0mo82.js")),parsers:["yaml"],printers:["yaml"]}]);function Q2(){return[E0]}var Z2=Q2;function e_(e,t){return $y(e,rt.join(t,"noop.js"))}var t_=e_;async function r_(e,t){if(rt.isAbsolute(e))return import(xe.pathToFileURL(e).href);try{return await import(xe.pathToFileURL(rt.resolve(e)).href)}catch{return t_(e,t)}}async function n_(e,t){const r=await r_(e,t);return{name:e,...r.default??r}}var Ja=new Map;function i_(e){if(typeof e!="string")return e;const t=process.cwd(),r=JSON.stringify({name:e,cwd:t});return Ja.has(r)||Ja.set(r,n_(e,t)),Ja.get(r)}function s_(){Ja.clear()}function a_(e=[]){return Promise.all(e.map(t=>i_(t)))}var o_=a_;function u_(e,t){return t=new Set(t),Object.fromEntries(Object.entries(e).filter(([r])=>!t.has(r)))}var l_=u_,c_="3.3.3",b0={};Ri(b0,{addDanglingComment:()=>zn,addLeadingComment:()=>Ai,addTrailingComment:()=>Ci,getAlignmentSize:()=>_c,getIndentSize:()=>y_,getMaxContinuousCount:()=>E_,getNextNonSpaceNonCommentCharacter:()=>T_,getNextNonSpaceNonCommentCharacterIndex:()=>__,getStringWidth:()=>xc,hasNewline:()=>gn,hasNewlineInRange:()=>v_,hasSpaces:()=>C_,isNextLineEmpty:()=>N_,isNextLineEmptyAfterIndex:()=>Rc,isPreviousLineEmpty:()=>I_,makeString:()=>x_,skip:()=>ks,skipEverythingButNewLine:()=>e0,skipInlineComment:()=>Bc,skipNewline:()=>ii,skipSpaces:()=>vn,skipToLineEnd:()=>Zy,skipTrailingComment:()=>Lc,skipWhitespace:()=>SF});function f_(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let r=t+2;r<e.length;++r)if(e.charAt(r)==="*"&&e.charAt(r+1)==="/")return r+2}return t}var Bc=f_;function p_(e,t){return t===!1?!1:e.charAt(t)==="/"&&e.charAt(t+1)==="/"?e0(e,t):t}var Lc=p_;function h_(e,t){let r=null,n=t;for(;n!==r;)r=n,n=vn(e,n),n=Bc(e,n),n=Lc(e,n),n=ii(e,n);return n}var kc=h_;function d_(e,t){let r=null,n=t;for(;n!==r;)r=n,n=Zy(e,n),n=Bc(e,n),n=vn(e,n);return n=Lc(e,n),n=ii(e,n),n!==!1&&gn(e,n)}var Rc=d_;function m_(e,t){const r=e.lastIndexOf(`
105
+ `);r-=o(r),n-=o(n),i-=o(i),e=Wx(e)}return{hasBOM:a,text:e,options:Yp(e,{...t,cursorOffset:r,rangeStart:n,rangeEnd:i,endOfLine:s})}}async function Xp(e,t){const r=await c0(t);return!r.hasPragma||r.hasPragma(e)}async function D0(e,t){let{hasBOM:r,text:n,options:i}=y0(e,await $i(t));if(i.rangeStart>=i.rangeEnd&&n!==""||i.requirePragma&&!await Xp(n,i))return{formatted:e,cursorOffset:t.cursorOffset,comments:[]};let s;return i.rangeStart>0||i.rangeEnd<n.length?s=await d2(n,i):(!i.requirePragma&&i.insertPragma&&i.printer.insertPragma&&!await Xp(n,i)&&(n=i.printer.insertPragma(n)),s=await m0(n,i)),r&&(s.formatted=d0+s.formatted,s.cursorOffset>=0&&s.cursorOffset++),s}async function m2(e,t,r){const{text:n,options:i}=y0(e,await $i(t)),s=await Rs(n,i);return r&&(r.preprocessForPrint&&(s.ast=await p0(s.ast,i)),r.massage&&(s.ast=s2(s.ast,i))),s}async function y2(e,t){t=await $i(t);const r=await Io(e,t);return Fc(r,t)}async function D2(e,t){const r=tF(e),{formatted:n}=await D0(r,{...t,parser:"__js_expression"});return n}async function g2(e,t){t=await $i(t);const{ast:r}=await Rs(e,t);return Io(r,t)}async function E2(e,t){return Fc(e,await $i(t))}var g0={};Ri(g0,{CATEGORY_CONFIG:()=>b2,CATEGORY_EDITOR:()=>T2,CATEGORY_FORMAT:()=>S2,CATEGORY_GLOBAL:()=>C2,CATEGORY_OTHER:()=>v2,CATEGORY_OUTPUT:()=>A2,CATEGORY_SPECIAL:()=>P2});var b2="Config",T2="Editor",S2="Format",v2="Other",A2="Output",C2="Global",P2="Special",E0={};Ri(E0,{languages:()=>X2,options:()=>Y2,parsers:()=>J2,printers:()=>z2});var x2=[{linguistLanguageId:50,name:"CSS",type:"markup",tmScope:"source.css",aceMode:"css",codemirrorMode:"css",codemirrorMimeType:"text/css",color:"#563d7c",extensions:[".css",".wxss"],parsers:["css"],vscodeLanguageIds:["css"]},{linguistLanguageId:262764437,name:"PostCSS",type:"markup",color:"#dc3a0c",tmScope:"source.postcss",group:"CSS",extensions:[".pcss",".postcss"],aceMode:"text",parsers:["css"],vscodeLanguageIds:["postcss"]},{linguistLanguageId:198,name:"Less",type:"markup",color:"#1d365d",aliases:["less-css"],extensions:[".less"],tmScope:"source.css.less",aceMode:"less",codemirrorMode:"css",codemirrorMimeType:"text/css",parsers:["less"],vscodeLanguageIds:["less"]},{linguistLanguageId:329,name:"SCSS",type:"markup",color:"#c6538c",tmScope:"source.css.scss",aceMode:"scss",codemirrorMode:"css",codemirrorMimeType:"text/x-scss",extensions:[".scss"],parsers:["scss"],vscodeLanguageIds:["scss"]}],Xt={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}},F2={singleQuote:Xt.singleQuote},_2=F2,w2=[{linguistLanguageId:139,name:"GraphQL",type:"data",color:"#e10098",extensions:[".graphql",".gql",".graphqls"],tmScope:"source.graphql",aceMode:"text",parsers:["graphql"],vscodeLanguageIds:["graphql"]}],I2={bracketSpacing:Xt.bracketSpacing},O2=I2,N2=[{linguistLanguageId:155,name:"Handlebars",type:"markup",color:"#f7931e",aliases:["hbs","htmlbars"],extensions:[".handlebars",".hbs"],tmScope:"text.html.handlebars",aceMode:"handlebars",parsers:["glimmer"],vscodeLanguageIds:["handlebars"]}],B2=[{linguistLanguageId:146,name:"Angular",type:"markup",tmScope:"text.html.basic",aceMode:"html",codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",color:"#e34c26",aliases:["xhtml"],extensions:[".component.html"],parsers:["angular"],vscodeLanguageIds:["html"],filenames:[]},{linguistLanguageId:146,name:"HTML",type:"markup",tmScope:"text.html.basic",aceMode:"html",codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",color:"#e34c26",aliases:["xhtml"],extensions:[".html",".hta",".htm",".html.hl",".inc",".xht",".xhtml",".mjml"],parsers:["html"],vscodeLanguageIds:["html"]},{linguistLanguageId:146,name:"Lightning Web Components",type:"markup",tmScope:"text.html.basic",aceMode:"html",codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",color:"#e34c26",aliases:["xhtml"],extensions:[],parsers:["lwc"],vscodeLanguageIds:["html"],filenames:[]},{linguistLanguageId:391,name:"Vue",type:"markup",color:"#41b883",extensions:[".vue"],tmScope:"text.html.vue",aceMode:"html",parsers:["vue"],vscodeLanguageIds:["vue"]}],Jp="HTML",L2={bracketSameLine:Xt.bracketSameLine,htmlWhitespaceSensitivity:{category:Jp,type:"choice",default:"css",description:"How to handle whitespaces in HTML.",choices:[{value:"css",description:"Respect the default value of CSS display property."},{value:"strict",description:"Whitespaces are considered sensitive."},{value:"ignore",description:"Whitespaces are considered insensitive."}]},singleAttributePerLine:Xt.singleAttributePerLine,vueIndentScriptAndStyle:{category:Jp,type:"boolean",default:!1,description:"Indent script and style tags in Vue files."}},k2=L2,R2=[{linguistLanguageId:183,name:"JavaScript",type:"programming",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",color:"#f1e05a",aliases:["js","node"],extensions:[".js","._js",".bones",".cjs",".es",".es6",".frag",".gs",".jake",".javascript",".jsb",".jscad",".jsfl",".jslib",".jsm",".jspre",".jss",".mjs",".njs",".pac",".sjs",".ssjs",".xsjs",".xsjslib",".wxs"],filenames:["Jakefile"],interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell","zx"],parsers:["babel","acorn","espree","meriyah","babel-flow","babel-ts","flow","typescript"],vscodeLanguageIds:["javascript","mongo"]},{linguistLanguageId:183,name:"Flow",type:"programming",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",color:"#f1e05a",aliases:[],extensions:[".js.flow"],filenames:[],interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell"],parsers:["flow","babel-flow"],vscodeLanguageIds:["javascript"]},{linguistLanguageId:183,name:"JSX",type:"programming",tmScope:"source.js.jsx",aceMode:"javascript",codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",color:void 0,aliases:void 0,extensions:[".jsx"],filenames:void 0,interpreters:void 0,parsers:["babel","babel-flow","babel-ts","flow","typescript","espree","meriyah"],vscodeLanguageIds:["javascriptreact"],group:"JavaScript"},{linguistLanguageId:378,name:"TypeScript",type:"programming",color:"#3178c6",aliases:["ts"],interpreters:["deno","ts-node"],extensions:[".ts",".cts",".mts"],tmScope:"source.ts",aceMode:"typescript",codemirrorMode:"javascript",codemirrorMimeType:"application/typescript",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescript"]},{linguistLanguageId:94901924,name:"TSX",type:"programming",color:"#3178c6",group:"TypeScript",extensions:[".tsx"],tmScope:"source.tsx",aceMode:"javascript",codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescriptreact"]}],Gn="JavaScript",M2={arrowParens:{category:Gn,type:"choice",default:"always",description:"Include parentheses around a sole arrow function parameter.",choices:[{value:"always",description:"Always include parens. Example: `(x) => x`"},{value:"avoid",description:"Omit parens when possible. Example: `x => x`"}]},bracketSameLine:Xt.bracketSameLine,bracketSpacing:Xt.bracketSpacing,jsxBracketSameLine:{category:Gn,type:"boolean",description:"Put > on the last line instead of at a new line.",deprecated:"2.4.0"},semi:{category:Gn,type:"boolean",default:!0,description:"Print semicolons.",oppositeDescription:"Do not print semicolons, except at the beginning of lines which may need them."},experimentalTernaries:{category:Gn,type:"boolean",default:!1,description:"Use curious ternaries, with the question mark after the condition.",oppositeDescription:"Default behavior of ternaries; keep question marks on the same line as the consequent."},singleQuote:Xt.singleQuote,jsxSingleQuote:{category:Gn,type:"boolean",default:!1,description:"Use single quotes in JSX."},quoteProps:{category:Gn,type:"choice",default:"as-needed",description:"Change when properties in objects are quoted.",choices:[{value:"as-needed",description:"Only add quotes around object properties where required."},{value:"consistent",description:"If at least one property in an object requires quotes, quote all properties."},{value:"preserve",description:"Respect the input use of quotes in object properties."}]},trailingComma:{category:Gn,type:"choice",default:"all",description:"Print trailing commas wherever possible when multi-line.",choices:[{value:"all",description:"Trailing commas wherever possible (including function arguments)."},{value:"es5",description:"Trailing commas where valid in ES5 (objects, arrays, etc.)"},{value:"none",description:"No trailing commas."}]},singleAttributePerLine:Xt.singleAttributePerLine},j2=M2,$2=[{linguistLanguageId:174,name:"JSON.stringify",type:"data",color:"#292929",tmScope:"source.json",aceMode:"json",codemirrorMode:"javascript",codemirrorMimeType:"application/json",aliases:["geojson","jsonl","topojson"],extensions:[".importmap"],filenames:["package.json","package-lock.json","composer.json"],parsers:["json-stringify"],vscodeLanguageIds:["json"]},{linguistLanguageId:174,name:"JSON",type:"data",color:"#292929",tmScope:"source.json",aceMode:"json",codemirrorMode:"javascript",codemirrorMimeType:"application/json",aliases:["geojson","jsonl","topojson"],extensions:[".json",".4DForm",".4DProject",".avsc",".geojson",".gltf",".har",".ice",".JSON-tmLanguage",".mcmeta",".tfstate",".tfstate.backup",".topojson",".webapp",".webmanifest",".yy",".yyp"],filenames:[".all-contributorsrc",".arcconfig",".auto-changelog",".c8rc",".htmlhintrc",".imgbotconfig",".nycrc",".tern-config",".tern-project",".watchmanconfig","Pipfile.lock","composer.lock","flake.lock","mcmod.info",".babelrc",".jscsrc",".jshintrc",".jslintrc",".swcrc"],parsers:["json"],vscodeLanguageIds:["json"]},{linguistLanguageId:423,name:"JSON with Comments",type:"data",color:"#292929",group:"JSON",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",aliases:["jsonc"],extensions:[".jsonc",".code-snippets",".code-workspace",".sublime-build",".sublime-commands",".sublime-completions",".sublime-keymap",".sublime-macro",".sublime-menu",".sublime-mousemap",".sublime-project",".sublime-settings",".sublime-theme",".sublime-workspace",".sublime_metrics",".sublime_session"],filenames:[],parsers:["jsonc"],vscodeLanguageIds:["jsonc"]},{linguistLanguageId:175,name:"JSON5",type:"data",color:"#267CB9",extensions:[".json5"],tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"application/json",parsers:["json5"],vscodeLanguageIds:["json5"]}],U2=[{linguistLanguageId:222,name:"Markdown",type:"prose",color:"#083fa1",aliases:["md","pandoc"],aceMode:"markdown",codemirrorMode:"gfm",codemirrorMimeType:"text/x-gfm",wrap:!0,extensions:[".md",".livemd",".markdown",".mdown",".mdwn",".mkd",".mkdn",".mkdown",".ronn",".scd",".workbook"],filenames:["contents.lr","README"],tmScope:"text.md",parsers:["markdown"],vscodeLanguageIds:["markdown"]},{linguistLanguageId:222,name:"MDX",type:"prose",color:"#083fa1",aliases:["md","pandoc"],aceMode:"markdown",codemirrorMode:"gfm",codemirrorMimeType:"text/x-gfm",wrap:!0,extensions:[".mdx"],filenames:[],tmScope:"text.md",parsers:["mdx"],vscodeLanguageIds:["mdx"]}],V2={proseWrap:Xt.proseWrap,singleQuote:Xt.singleQuote},q2=V2,K2=[{linguistLanguageId:407,name:"YAML",type:"data",color:"#cb171e",tmScope:"source.yaml",aliases:["yml"],extensions:[".yml",".mir",".reek",".rviz",".sublime-syntax",".syntax",".yaml",".yaml-tmlanguage",".yaml.sed",".yml.mysql"],filenames:[".clang-format",".clang-tidy",".gemrc","CITATION.cff","glide.lock",".prettierrc",".stylelintrc",".lintstagedrc"],aceMode:"yaml",codemirrorMode:"yaml",codemirrorMimeType:"text/x-yaml",parsers:["yaml"],vscodeLanguageIds:["yaml","ansible","home-assistant"]}],W2={bracketSpacing:Xt.bracketSpacing,singleQuote:Xt.singleQuote,proseWrap:Xt.proseWrap},H2=W2;function G2(e){const t=Object.create(null),r=Object.create(null);for(const{importPlugin:n,parsers:i=[],printers:s=[]}of e){const a=async()=>{const o=await n();return Object.assign(t,o.parsers),Object.assign(r,o.printers),o};for(const o of i)t[o]=async()=>(await a()).parsers[o];for(const o of s)r[o]=async()=>(await a()).printers[o]}return{parsers:t,printers:r}}var Y2={..._2,...O2,...k2,...j2,...q2,...H2},X2=[...x2,...w2,...N2,...B2,...R2,...$2,...U2,...K2],{parsers:J2,printers:z2}=G2([{importPlugin:()=>Promise.resolve().then(()=>require("./deps/acorn-63l42ciyb.js")),parsers:["acorn","espree"]},{importPlugin:()=>Promise.resolve().then(()=>require("./deps/angular-zw5oic5ku.js")),parsers:["__ng_action","__ng_binding","__ng_interpolation","__ng_directive"]},{importPlugin:()=>Promise.resolve().then(()=>require("./deps/babel-ly0w2f9gt.js")),parsers:["babel","babel-flow","babel-ts","__js_expression","__ts_expression","__vue_expression","__vue_ts_expression","__vue_event_binding","__vue_ts_event_binding","__babel_estree","json","json5","jsonc","json-stringify"]},{importPlugin:()=>Promise.resolve().then(()=>require("./deps/estree-zxumoq6qz.js")),printers:["estree","estree-json"]},{importPlugin:()=>Promise.resolve().then(()=>require("./deps/flow-niz9iy21e.js")),parsers:["flow"]},{importPlugin:()=>Promise.resolve().then(()=>require("./deps/glimmer-vvnfh71r6.js")),parsers:["glimmer"],printers:["glimmer"]},{importPlugin:()=>Promise.resolve().then(()=>require("./deps/graphql-dx88uylp4.js")),parsers:["graphql"],printers:["graphql"]},{importPlugin:()=>Promise.resolve().then(()=>require("./deps/html-gzei84ljz.js")),parsers:["html","angular","vue","lwc"],printers:["html"]},{importPlugin:()=>Promise.resolve().then(()=>require("./deps/markdown-g9in9megz.js")),parsers:["markdown","mdx","remark"],printers:["mdast"]},{importPlugin:()=>Promise.resolve().then(()=>require("./deps/meriyah-vfexh9fuw.js")),parsers:["meriyah"]},{importPlugin:()=>Promise.resolve().then(()=>require("./deps/postcss-bfwau6mgf.js")),parsers:["css","less","scss"],printers:["postcss"]},{importPlugin:()=>Promise.resolve().then(()=>require("./deps/typescript-zgna0nw0e.js")),parsers:["typescript"]},{importPlugin:()=>Promise.resolve().then(()=>require("./deps/yaml-zv7u9r84n.js")),parsers:["yaml"],printers:["yaml"]}]);function Q2(){return[E0]}var Z2=Q2;function e_(e,t){return $y(e,rt.join(t,"noop.js"))}var t_=e_;async function r_(e,t){if(rt.isAbsolute(e))return import(xe.pathToFileURL(e).href);try{return await import(xe.pathToFileURL(rt.resolve(e)).href)}catch{return t_(e,t)}}async function n_(e,t){const r=await r_(e,t);return{name:e,...r.default??r}}var Ja=new Map;function i_(e){if(typeof e!="string")return e;const t=process.cwd(),r=JSON.stringify({name:e,cwd:t});return Ja.has(r)||Ja.set(r,n_(e,t)),Ja.get(r)}function s_(){Ja.clear()}function a_(e=[]){return Promise.all(e.map(t=>i_(t)))}var o_=a_;function u_(e,t){return t=new Set(t),Object.fromEntries(Object.entries(e).filter(([r])=>!t.has(r)))}var l_=u_,c_="3.3.3",b0={};Ri(b0,{addDanglingComment:()=>zn,addLeadingComment:()=>Ai,addTrailingComment:()=>Ci,getAlignmentSize:()=>_c,getIndentSize:()=>y_,getMaxContinuousCount:()=>E_,getNextNonSpaceNonCommentCharacter:()=>T_,getNextNonSpaceNonCommentCharacterIndex:()=>__,getStringWidth:()=>xc,hasNewline:()=>gn,hasNewlineInRange:()=>v_,hasSpaces:()=>C_,isNextLineEmpty:()=>N_,isNextLineEmptyAfterIndex:()=>Rc,isPreviousLineEmpty:()=>I_,makeString:()=>x_,skip:()=>ks,skipEverythingButNewLine:()=>e0,skipInlineComment:()=>Bc,skipNewline:()=>ii,skipSpaces:()=>vn,skipToLineEnd:()=>Zy,skipTrailingComment:()=>Lc,skipWhitespace:()=>SF});function f_(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let r=t+2;r<e.length;++r)if(e.charAt(r)==="*"&&e.charAt(r+1)==="/")return r+2}return t}var Bc=f_;function p_(e,t){return t===!1?!1:e.charAt(t)==="/"&&e.charAt(t+1)==="/"?e0(e,t):t}var Lc=p_;function h_(e,t){let r=null,n=t;for(;n!==r;)r=n,n=vn(e,n),n=Bc(e,n),n=Lc(e,n),n=ii(e,n);return n}var kc=h_;function d_(e,t){let r=null,n=t;for(;n!==r;)r=n,n=Zy(e,n),n=Bc(e,n),n=vn(e,n);return n=Lc(e,n),n=ii(e,n),n!==!1&&gn(e,n)}var Rc=d_;function m_(e,t){const r=e.lastIndexOf(`
106
106
  `);return r===-1?0:_c(e.slice(r+1).match(/^[\t ]*/u)[0],t)}var y_=m_;function D_(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function g_(e,t){const r=e.match(new RegExp(`(${D_(t)})+`,"gu"));return r===null?0:r.reduce((n,i)=>Math.max(n,i.length/t.length),0)}var E_=g_;function b_(e,t){const r=kc(e,t);return r===!1?"":e.charAt(r)}var T_=b_;function S_(e,t,r){for(let n=t;n<r;++n)if(e.charAt(n)===`
107
107
  `)return!0;return!1}var v_=S_;function A_(e,t,r={}){return vn(e,r.backwards?t-1:t,r)!==t}var C_=A_;function P_(e,t,r){const n=t==='"'?"'":'"',s=Ls(!1,e,/\\(.)|(["'])/gsu,(a,o,u)=>o===n?o:u===t?"\\"+u:u||(r&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(o)?o:"\\"+o));return t+s+t}var x_=P_;function F_(e,t,r){return kc(e,r(t))}function __(e,t){return arguments.length===2||typeof t=="number"?kc(e,t):F_(...arguments)}function w_(e,t,r){return Oc(e,r(t))}function I_(e,t){return arguments.length===2||typeof t=="number"?Oc(e,t):w_(...arguments)}function O_(e,t,r){return Rc(e,r(t))}function N_(e,t){return arguments.length===2||typeof t=="number"?Rc(e,t):O_(...arguments)}function mn(e,t=1){return async(...r)=>{const n=r[t]??{},{plugins:i=[]}=n;return r[t]={...n,plugins:(await Promise.all([Z2(),o_(i)])).flat()},e(...r)}}var T0=mn(D0);async function S0(e,t){const{formatted:r}=await T0(e,{...t,cursorOffset:-1});return r}async function B_(e,t){return await S0(e,t)===e}async function L_(){Sx(),s_()}var k_=mn(qx),R_=mn(Nc,0),M_={errors:ay,optionCategories:g0,createIsIgnoredFunction:qy,formatOptionsHiddenDefaults:Bl,normalizeOptions:o0,getSupportInfoWithoutPlugins:Nc,normalizeOptionSettings:a0,vnopts:{ChoiceSchema:sy,apiDescriptor:Zn},fastGlob:uv.default,createTwoFilesPatch:ov,utils:{isNonEmptyArray:t0,partition:ly,omit:l_},mockable:gc},j_={parse:mn(m2),formatAST:mn(y2),formatDoc:mn(D2),printToDoc:mn(g2),printDocToString:mn(E2),mockable:gc},$_=zm,Ui={};Object.defineProperty(Ui,"__esModule",{value:!0});function U_(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;r[n]=e[n]}return r}class En{constructor(t,r,n){this.line=void 0,this.column=void 0,this.index=void 0,this.line=t,this.column=r,this.index=n}}class Do{constructor(t,r){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=t,this.end=r}}function $t(e,t){const{line:r,column:n,index:i}=e;return new En(r,n+t,i+t)}const zp="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED";var V_={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:zp},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:zp}};const Qp={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},za=e=>e.type==="UpdateExpression"?Qp.UpdateExpression[`${e.prefix}`]:Qp[e.type];var q_={AccessorIsGenerator:({kind:e})=>`A ${e}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncFunction:"'await' is only allowed within async functions.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:e})=>`Missing initializer in ${e} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName:e})=>`\`${e}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",DynamicImportPhaseRequiresImportExpressions:({phase:e})=>`'import.${e}(...)' can only be parsed when using the 'createImportExpressions' option.`,ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:e,exportName:t})=>`A string literal cannot be used as an exported binding without \`from\`.
108
108
  - Did you mean \`export { '${e}' as '${t}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:e})=>`'${e==="ForInStatement"?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:e})=>`Unsyntactic ${e==="BreakStatement"?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedAssertSyntax: true` option in the import attributes plugin to suppress this error.",ImportBindingIsString:({importName:e})=>`A string literal cannot be used as an imported binding.
@@ -13,7 +13,7 @@ import Oi from "fs/promises";
13
13
  import rr from "assert";
14
14
  import ET from "v8";
15
15
  import bT, { format as TT, inspect as pl } from "util";
16
- import { c as ii, g as ST, u as vT } from "./deps/soon-id-wk8xbb2g0.js";
16
+ import { c as ii, g as ST, u as vT } from "./deps/soon-id-a6raaezni.js";
17
17
  import { createHash as AT } from "crypto";
18
18
  var CT = Object.defineProperty, PT = (e, t) => {
19
19
  for (var r in t)
@@ -15960,11 +15960,11 @@ var p_ = {
15960
15960
  ...u_
15961
15961
  ], { parsers: d_, printers: m_ } = f_([
15962
15962
  {
15963
- importPlugin: () => import("./deps/acorn-h9ik2adbc.js"),
15963
+ importPlugin: () => import("./deps/acorn-anqp0uy6j.js"),
15964
15964
  parsers: ["acorn", "espree"]
15965
15965
  },
15966
15966
  {
15967
- importPlugin: () => import("./deps/angular-5mug9tjtw.js"),
15967
+ importPlugin: () => import("./deps/angular-6eqe81rmp.js"),
15968
15968
  parsers: [
15969
15969
  "__ng_action",
15970
15970
  "__ng_binding",
@@ -15973,7 +15973,7 @@ var p_ = {
15973
15973
  ]
15974
15974
  },
15975
15975
  {
15976
- importPlugin: () => import("./deps/babel-gsmsm27fz.js"),
15976
+ importPlugin: () => import("./deps/babel-4qh4iup2l.js"),
15977
15977
  parsers: [
15978
15978
  "babel",
15979
15979
  "babel-flow",
@@ -15992,48 +15992,48 @@ var p_ = {
15992
15992
  ]
15993
15993
  },
15994
15994
  {
15995
- importPlugin: () => import("./deps/estree-wuafkfp9r.js"),
15995
+ importPlugin: () => import("./deps/estree-9f8ovhtb1.js"),
15996
15996
  printers: ["estree", "estree-json"]
15997
15997
  },
15998
15998
  {
15999
- importPlugin: () => import("./deps/flow-hpccmvmui.js"),
15999
+ importPlugin: () => import("./deps/flow-p4uemghmk.js"),
16000
16000
  parsers: ["flow"]
16001
16001
  },
16002
16002
  {
16003
- importPlugin: () => import("./deps/glimmer-gib57ikuk.js"),
16003
+ importPlugin: () => import("./deps/glimmer-6qbhhpyhp.js"),
16004
16004
  parsers: ["glimmer"],
16005
16005
  printers: ["glimmer"]
16006
16006
  },
16007
16007
  {
16008
- importPlugin: () => import("./deps/graphql-ai6h9mpsh.js"),
16008
+ importPlugin: () => import("./deps/graphql-dgk8o6z8k.js"),
16009
16009
  parsers: ["graphql"],
16010
16010
  printers: ["graphql"]
16011
16011
  },
16012
16012
  {
16013
- importPlugin: () => import("./deps/html-zy50aitzs.js"),
16013
+ importPlugin: () => import("./deps/html-awy57fcu4.js"),
16014
16014
  parsers: ["html", "angular", "vue", "lwc"],
16015
16015
  printers: ["html"]
16016
16016
  },
16017
16017
  {
16018
- importPlugin: () => import("./deps/markdown-v9xop8dr8.js"),
16018
+ importPlugin: () => import("./deps/markdown-d10pykzzv.js"),
16019
16019
  parsers: ["markdown", "mdx", "remark"],
16020
16020
  printers: ["mdast"]
16021
16021
  },
16022
16022
  {
16023
- importPlugin: () => import("./deps/meriyah-17x46u0y3.js"),
16023
+ importPlugin: () => import("./deps/meriyah-kcg8mxjpm.js"),
16024
16024
  parsers: ["meriyah"]
16025
16025
  },
16026
16026
  {
16027
- importPlugin: () => import("./deps/postcss-kthjj0530.js"),
16027
+ importPlugin: () => import("./deps/postcss-ggzdvxigr.js"),
16028
16028
  parsers: ["css", "less", "scss"],
16029
16029
  printers: ["postcss"]
16030
16030
  },
16031
16031
  {
16032
- importPlugin: () => import("./deps/typescript-fdojtxvy4.js"),
16032
+ importPlugin: () => import("./deps/typescript-4xb86hasm.js"),
16033
16033
  parsers: ["typescript"]
16034
16034
  },
16035
16035
  {
16036
- importPlugin: () => import("./deps/yaml-gua1y1aqq.js"),
16036
+ importPlugin: () => import("./deps/yaml-8f94xxplf.js"),
16037
16037
  parsers: ["yaml"],
16038
16038
  printers: ["yaml"]
16039
16039
  }
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Pe=require("fs"),k=require("path"),Dt=require("./deps/soon-id-gcjwh4b6w.js"),Ht=require("os"),Gr=require("util"),Ke=require("stream"),Mn=require("events");var q={},F={},Se={};Object.defineProperty(Se,"__esModule",{value:!0});Se.splitWhen=Se.flatten=void 0;function In(t){return t.reduce((e,r)=>[].concat(e,r),[])}Se.flatten=In;function Nn(t,e){const r=[[]];let n=0;for(const s of t)e(s)?(n++,r[n]=[]):r[n].push(s);return r}Se.splitWhen=Nn;var Qe={};Object.defineProperty(Qe,"__esModule",{value:!0});Qe.isEnoentCodeError=void 0;function Fn(t){return t.code==="ENOENT"}Qe.isEnoentCodeError=Fn;var Ye={};Object.defineProperty(Ye,"__esModule",{value:!0});Ye.createDirentFromStats=void 0;let Bn=class{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function jn(t,e){return new Bn(t,e)}Ye.createDirentFromStats=jn;var G={};Object.defineProperty(G,"__esModule",{value:!0});G.convertPosixPathToPattern=G.convertWindowsPathToPattern=G.convertPathToPattern=G.escapePosixPath=G.escapeWindowsPath=G.escape=G.removeLeadingDotSegment=G.makeAbsolute=G.unixify=void 0;const Gn=Ht,Un=k,Ur=Gn.platform()==="win32",Wn=2,qn=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g,Vn=/(\\?)([()[\]{}]|^!|[!+@](?=\())/g,Kn=/^\\\\([.?])/,Qn=/\\(?![!()+@[\]{}])/g;function Yn(t){return t.replace(/\\/g,"/")}G.unixify=Yn;function Xn(t,e){return Un.resolve(t,e)}G.makeAbsolute=Xn;function Zn(t){if(t.charAt(0)==="."){const e=t.charAt(1);if(e==="/"||e==="\\")return t.slice(Wn)}return t}G.removeLeadingDotSegment=Zn;G.escape=Ur?Mt:It;function Mt(t){return t.replace(Vn,"\\$2")}G.escapeWindowsPath=Mt;function It(t){return t.replace(qn,"\\$2")}G.escapePosixPath=It;G.convertPathToPattern=Ur?Wr:qr;function Wr(t){return Mt(t).replace(Kn,"//$1").replace(Qn,"/")}G.convertWindowsPathToPattern=Wr;function qr(t){return It(t)}G.convertPosixPathToPattern=qr;var E={};/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Pe=require("fs"),k=require("path"),Dt=require("./deps/soon-id-unm7ynfew.js"),Ht=require("os"),Gr=require("util"),Ke=require("stream"),Mn=require("events");var q={},F={},Se={};Object.defineProperty(Se,"__esModule",{value:!0});Se.splitWhen=Se.flatten=void 0;function In(t){return t.reduce((e,r)=>[].concat(e,r),[])}Se.flatten=In;function Nn(t,e){const r=[[]];let n=0;for(const s of t)e(s)?(n++,r[n]=[]):r[n].push(s);return r}Se.splitWhen=Nn;var Qe={};Object.defineProperty(Qe,"__esModule",{value:!0});Qe.isEnoentCodeError=void 0;function Fn(t){return t.code==="ENOENT"}Qe.isEnoentCodeError=Fn;var Ye={};Object.defineProperty(Ye,"__esModule",{value:!0});Ye.createDirentFromStats=void 0;let Bn=class{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function jn(t,e){return new Bn(t,e)}Ye.createDirentFromStats=jn;var G={};Object.defineProperty(G,"__esModule",{value:!0});G.convertPosixPathToPattern=G.convertWindowsPathToPattern=G.convertPathToPattern=G.escapePosixPath=G.escapeWindowsPath=G.escape=G.removeLeadingDotSegment=G.makeAbsolute=G.unixify=void 0;const Gn=Ht,Un=k,Ur=Gn.platform()==="win32",Wn=2,qn=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g,Vn=/(\\?)([()[\]{}]|^!|[!+@](?=\())/g,Kn=/^\\\\([.?])/,Qn=/\\(?![!()+@[\]{}])/g;function Yn(t){return t.replace(/\\/g,"/")}G.unixify=Yn;function Xn(t,e){return Un.resolve(t,e)}G.makeAbsolute=Xn;function Zn(t){if(t.charAt(0)==="."){const e=t.charAt(1);if(e==="/"||e==="\\")return t.slice(Wn)}return t}G.removeLeadingDotSegment=Zn;G.escape=Ur?Mt:It;function Mt(t){return t.replace(Vn,"\\$2")}G.escapeWindowsPath=Mt;function It(t){return t.replace(qn,"\\$2")}G.escapePosixPath=It;G.convertPathToPattern=Ur?Wr:qr;function Wr(t){return Mt(t).replace(Kn,"//$1").replace(Qn,"/")}G.convertWindowsPathToPattern=Wr;function qr(t){return It(t)}G.convertPosixPathToPattern=qr;var E={};/*!
2
2
  * is-extglob <https://github.com/jonschlinkert/is-extglob>
3
3
  *
4
4
  * Copyright (c) 2014-2016, Jon Schlinkert.
@@ -131,6 +131,9 @@ declare module 'soonjs' {
131
131
  interface ServiceContext {
132
132
  $$$services-content$$$
133
133
  }
134
+
135
+ import { soonApis } from 'soonjs:auto/client';
136
+ interface ApiMap extends soonApis {}
134
137
  }`;function Cu(t){let e=!1;const r=process.cwd(),n=(t==null?void 0:t.apisDir)||"./src/api",s=k.join(r,n);let a=[];const i="./auto",o=k.join(r,i);let u=[];const h=(t==null?void 0:t.servicesDir)||"./src/service",c=k.join(r,h);let _=[];const f=(t==null?void 0:t.importDirResolve)??(A=>A.replace(/^(\.\/src\/|src\/)/,"~/")),$="soonjs:auto/server",g="\0"+$,m=Dt.useSoonIdGen();let P;return{name:"vite-plugin-soon-server",configureServer(A){P=A},config(A,B){B.command==="build"&&(e=!0)},closeBundle(){try{const A=(t==null?void 0:t.entryPath)||"./dist/entry.js";t!=null&&t.removeEntry&&e&&Pe.existsSync(A)&&Pe.rmSync(A)}catch{}},watchChange(A,B){(B.event==="create"||B.event==="delete")&&(!k.relative(s,A).startsWith("..")||!k.relative(c,A).startsWith("..")||!k.relative(o,A).startsWith(".."))&&(P==null||P.moduleGraph.invalidateModule(P==null?void 0:P.moduleGraph.getModuleById(g)),P==null||P.ws.send({type:"full-reload"}))},resolveId(A){if(A===$)return g},async load(A){if(A===g)return t!=null&&t.disableApis?"export const apis = [];":(a=(await vt([Be.convertPathToPattern(k.join(n,"/**/*.ts"))],{ignore:(t==null?void 0:t.exclude)??[]})).map(v=>({id:"__api__"+m()+"_",importPath:f(v==null?void 0:v.replace(/\.ts$/,"")),file:v,fullPath:k.join(r,v),apiPath:"/"+k.relative(n,v).replace(/\.ts$/,"").replace(/\\/g,"/"),clientDtsImportPath:k.join(".soonjs",v==null?void 0:v.replace(/\.ts$/,"")).replace(/\\/g,"/")})),u=(await vt([Be.convertPathToPattern(k.join(i,"/**/*.ts"))])).map(v=>({id:"__auto__"+m()+"_",importPath:".soonjs/"+(v==null?void 0:v.replace(/\.ts$/,"")),file:v,fullPath:k.join(r,v),apiPath:"/"+k.relative(i,v).replace(/\.ts$/,"").replace(/\\/g,"/"),clientDtsImportPath:k.join(".soonjs",v==null?void 0:v.replace(/\.ts$/,"")).replace(/\\/g,"/")})),_=(await vt([Be.convertPathToPattern(k.join(h,"/**/*.ts"))],{ignore:(t==null?void 0:t.exclude)??[]})).map(v=>({id:"__service__"+m()+"_",importPath:f(v==null?void 0:v.replace(/\.ts$/,"")),file:v,fullPath:k.join(r,v),servicePath:"/"+k.relative(h,v).replace(/\.ts$/,"").replace(/\\/g,"/"),clientDtsImportPath:k.join(".soonjs",v==null?void 0:v.replace(/\.ts$/,"")).replace(/\\/g,"/")})),`import { soonApiSymbol, soonServiceSymbol, defineMiddleware } from 'soonjs';
135
138
  import { exists, mkdir, writeFile } from 'fs';
136
139
  import path from 'path';
@@ -1,6 +1,6 @@
1
1
  import Lt, { existsSync as Hn, rmSync as Mn } from "fs";
2
2
  import k from "path";
3
- import { c as In, g as Nn, u as Fn } from "./deps/soon-id-wk8xbb2g0.js";
3
+ import { c as In, g as Nn, u as Fn } from "./deps/soon-id-a6raaezni.js";
4
4
  import Dt from "os";
5
5
  import jr from "util";
6
6
  import Ke from "stream";
@@ -3322,6 +3322,9 @@ declare module 'soonjs' {
3322
3322
  interface ServiceContext {
3323
3323
  $$$services-content$$$
3324
3324
  }
3325
+
3326
+ import { soonApis } from 'soonjs:auto/client';
3327
+ interface ApiMap extends soonApis {}
3325
3328
  }`;
3326
3329
  function Gu(t) {
3327
3330
  let e = !1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "soonjs",
3
- "version": "0.0.25",
3
+ "version": "0.0.26",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",