@sockethub/examples 1.0.0-alpha.21 → 1.0.0-alpha.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/_app/immutable/chunks/{BdtHEGL_.js → BJzWT4a_.js} +1 -1
- package/build/_app/immutable/chunks/CfO10NxU.js +1 -0
- package/build/_app/immutable/chunks/{B9A0qc9a.js → ClXGuyPN.js} +1 -1
- package/build/_app/immutable/chunks/{3J8QMP2Y.js → D1Y6vir5.js} +1 -1
- package/build/_app/immutable/chunks/{DKx16QfD.js → D8LSvHGD.js} +1 -1
- package/build/_app/immutable/chunks/{DwTLqTAf.js → DJkUObd4.js} +1 -1
- package/build/_app/immutable/chunks/{DhdgPWDb.js → DM-HM6I1.js} +1 -1
- package/build/_app/immutable/entry/{app.CJ3NoyW-.js → app.DFtHEDt4.js} +2 -2
- package/build/_app/immutable/entry/start.D9VP5-bu.js +1 -0
- package/build/_app/immutable/nodes/{0.BG1tT4ER.js → 0.m3qGA7pa.js} +1 -1
- package/build/_app/immutable/nodes/{1.QkdmjIv3.js → 1.C9WfOSx0.js} +1 -1
- package/build/_app/immutable/nodes/{2.DHzfe_7I.js → 2.0BsUoT1J.js} +1 -1
- package/build/_app/immutable/nodes/{3.BgzPo3wO.js → 3.BQPqD7QE.js} +1 -1
- package/build/_app/immutable/nodes/{4.BKsANTJg.js → 4.BqgBlJlH.js} +1 -1
- package/build/_app/immutable/nodes/{5.BOOK1ims.js → 5.u6f77lcO.js} +1 -1
- package/build/_app/immutable/nodes/{6.Cki5_5wn.js → 6.CeMQ6TVQ.js} +1 -1
- package/build/_app/immutable/nodes/{7.DPbQKnzj.js → 7.IpDR0NHe.js} +1 -1
- package/build/_app/immutable/nodes/{8.DfIFUyXA.js → 8.CMc3hKqE.js} +1 -1
- package/build/_app/immutable/nodes/{9.DG2yRUwB.js → 9.X8n5ZkeX.js} +1 -1
- package/build/_app/version.json +1 -1
- package/build/caldav.html +7 -7
- package/build/carddav.html +7 -7
- package/build/dummy.html +7 -7
- package/build/feeds.html +7 -7
- package/build/index.html +7 -7
- package/build/irc.html +7 -7
- package/build/metadata.html +7 -7
- package/build/xmpp.html +7 -7
- package/package.json +4 -4
- package/build/_app/immutable/chunks/hmWg30fU.js +0 -1
- package/build/_app/immutable/entry/start.tteBvzOb.js +0 -1
|
@@ -33,7 +33,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),tt=se,Le=de),Re===void
|
|
|
33
33
|
`)},u.prototype.displayStateStack=function(f,w){for(var $,E=0,b=0;b<f.length;b++){var S=f[b],h=S.rule.toString(S.dot);h===$?E++:(E>0&&w.push(" ^ "+E+" more lines identical to this"),E=0,w.push(" "+h)),$=h}},u.prototype.getSymbolDisplay=function(f){return o(f)},u.prototype.buildFirstStateStack=function(f,w){if(w.indexOf(f)!==-1)return null;if(f.wantedBy.length===0)return[f];var $=f.wantedBy[0],E=[f].concat(w),b=this.buildFirstStateStack($,E);return b===null?null:[f].concat(b)},u.prototype.save=function(){var f=this.table[this.current];return f.lexerState=this.lexerState,f},u.prototype.restore=function(f){var w=f.index;this.current=w,this.table[w]=f,this.table.splice(w+1),this.lexerState=f.lexerState,this.results=this.finish()},u.prototype.rewind=function(f){if(!this.options.keepHistory)throw new Error("set option `keepHistory` to enable rewinding");this.restore(this.table[f])},u.prototype.finish=function(){var f=[],w=this.grammar.start,$=this.table[this.table.length-1];return $.states.forEach(function(E){E.rule.name===w&&E.dot===E.rule.symbols.length&&E.reference===0&&E.data!==u.fail&&f.push(E)}),f.map(function(E){return E.data})};function o(f){var w=typeof f;if(w==="string")return f;if(w==="object"){if(f.literal)return JSON.stringify(f.literal);if(f instanceof RegExp)return"character matching "+f;if(f.type)return f.type+" token";if(f.test)return"token matching "+String(f.test);throw new Error("Unknown symbol type: "+f)}}function y(f){var w=typeof f;if(w==="string")return f;if(w==="object"){if(f.literal)return JSON.stringify(f.literal);if(f instanceof RegExp)return f.toString();if(f.type)return"%"+f.type;if(f.test)return"<"+String(f.test)+">";throw new Error("Unknown symbol type: "+f)}}return{Parser:u,Grammar:c,Rule:r}})}),xf=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});function e(c){return c[0]}var r=c=>[].concat(...c.map(s=>Array.isArray(s)?r(s):s));function n(c){return c?Array.isArray(c)?r(c).join(""):c:""}var a={Lexer:void 0,ParserRules:[{name:"Reverse_path",symbols:["Path"]},{name:"Reverse_path$string$1",symbols:[{literal:"<"},{literal:">"}],postprocess:c=>c.join("")},{name:"Reverse_path",symbols:["Reverse_path$string$1"]},{name:"Forward_path$subexpression$1$subexpression$1",symbols:[{literal:"<"},/[pP]/,/[oO]/,/[sS]/,/[tT]/,/[mM]/,/[aA]/,/[sS]/,/[tT]/,/[eE]/,/[rR]/,{literal:"@"}],postprocess:function(c){return c.join("")}},{name:"Forward_path$subexpression$1",symbols:["Forward_path$subexpression$1$subexpression$1","Domain",{literal:">"}]},{name:"Forward_path",symbols:["Forward_path$subexpression$1"]},{name:"Forward_path$subexpression$2",symbols:[{literal:"<"},/[pP]/,/[oO]/,/[sS]/,/[tT]/,/[mM]/,/[aA]/,/[sS]/,/[tT]/,/[eE]/,/[rR]/,{literal:">"}],postprocess:function(c){return c.join("")}},{name:"Forward_path",symbols:["Forward_path$subexpression$2"]},{name:"Forward_path",symbols:["Path"]},{name:"Path$ebnf$1$subexpression$1",symbols:["A_d_l",{literal:":"}]},{name:"Path$ebnf$1",symbols:["Path$ebnf$1$subexpression$1"],postprocess:e},{name:"Path$ebnf$1",symbols:[],postprocess:()=>null},{name:"Path",symbols:[{literal:"<"},"Path$ebnf$1","Mailbox",{literal:">"}]},{name:"A_d_l$ebnf$1",symbols:[]},{name:"A_d_l$ebnf$1$subexpression$1",symbols:[{literal:","},"At_domain"]},{name:"A_d_l$ebnf$1",symbols:["A_d_l$ebnf$1","A_d_l$ebnf$1$subexpression$1"],postprocess:c=>c[0].concat([c[1]])},{name:"A_d_l",symbols:["At_domain","A_d_l$ebnf$1"]},{name:"At_domain",symbols:[{literal:"@"},"Domain"]},{name:"Domain$ebnf$1",symbols:[]},{name:"Domain$ebnf$1$subexpression$1",symbols:[{literal:"."},"sub_domain"]},{name:"Domain$ebnf$1",symbols:["Domain$ebnf$1","Domain$ebnf$1$subexpression$1"],postprocess:c=>c[0].concat([c[1]])},{name:"Domain",symbols:["sub_domain","Domain$ebnf$1"]},{name:"sub_domain",symbols:["U_label"]},{name:"Let_dig",symbols:["ALPHA_DIGIT"],postprocess:e},{name:"Ldh_str$ebnf$1",symbols:[]},{name:"Ldh_str$ebnf$1",symbols:["Ldh_str$ebnf$1","ALPHA_DIG_DASH"],postprocess:c=>c[0].concat([c[1]])},{name:"Ldh_str",symbols:["Ldh_str$ebnf$1","Let_dig"]},{name:"U_Let_dig",symbols:["ALPHA_DIGIT_U"],postprocess:e},{name:"U_Ldh_str$ebnf$1",symbols:[]},{name:"U_Ldh_str$ebnf$1",symbols:["U_Ldh_str$ebnf$1","ALPHA_DIG_DASH_U"],postprocess:c=>c[0].concat([c[1]])},{name:"U_Ldh_str",symbols:["U_Ldh_str$ebnf$1","U_Let_dig"]},{name:"U_label$ebnf$1$subexpression$1",symbols:["U_Ldh_str"]},{name:"U_label$ebnf$1",symbols:["U_label$ebnf$1$subexpression$1"],postprocess:e},{name:"U_label$ebnf$1",symbols:[],postprocess:()=>null},{name:"U_label",symbols:["U_Let_dig","U_label$ebnf$1"]},{name:"address_literal$subexpression$1",symbols:["IPv4_address_literal"]},{name:"address_literal$subexpression$1",symbols:["IPv6_address_literal"]},{name:"address_literal$subexpression$1",symbols:["General_address_literal"]},{name:"address_literal",symbols:[{literal:"["},"address_literal$subexpression$1",{literal:"]"}]},{name:"non_local_part",symbols:["Domain"],postprocess:function(c){return{DomainName:n(c[0])}}},{name:"non_local_part",symbols:["address_literal"],postprocess:function(c){return{AddressLiteral:n(c[0])}}},{name:"Mailbox",symbols:["Local_part",{literal:"@"},"non_local_part"],postprocess:function(c){return{localPart:n(c[0]),domainPart:n(c[2])}}},{name:"Local_part",symbols:["Dot_string"],postprocess:function(c){return{DotString:n(c[0])}}},{name:"Local_part",symbols:["Quoted_string"],postprocess:function(c){return{QuotedString:n(c[0])}}},{name:"Dot_string$ebnf$1",symbols:[]},{name:"Dot_string$ebnf$1$subexpression$1",symbols:[{literal:"."},"Atom"]},{name:"Dot_string$ebnf$1",symbols:["Dot_string$ebnf$1","Dot_string$ebnf$1$subexpression$1"],postprocess:c=>c[0].concat([c[1]])},{name:"Dot_string",symbols:["Atom","Dot_string$ebnf$1"]},{name:"Atom$ebnf$1",symbols:[/[0-9A-Za-z!#$%&'*+\-/=?^_`{|}~\u0080-\uFFFF/]/]},{name:"Atom$ebnf$1",symbols:["Atom$ebnf$1",/[0-9A-Za-z!#$%&'*+\-/=?^_`{|}~\u0080-\uFFFF/]/],postprocess:c=>c[0].concat([c[1]])},{name:"Atom",symbols:["Atom$ebnf$1"]},{name:"Quoted_string$ebnf$1",symbols:[]},{name:"Quoted_string$ebnf$1",symbols:["Quoted_string$ebnf$1","QcontentSMTP"],postprocess:c=>c[0].concat([c[1]])},{name:"Quoted_string",symbols:["DQUOTE","Quoted_string$ebnf$1","DQUOTE"]},{name:"QcontentSMTP",symbols:["qtextSMTP"]},{name:"QcontentSMTP",symbols:["quoted_pairSMTP"]},{name:"quoted_pairSMTP",symbols:[{literal:"\\"},/[\x20-\x7e]/]},{name:"qtextSMTP",symbols:[/[\x20-\x21\x23-\x5b\x5d-\x7e\u0080-\uFFFF]/],postprocess:e},{name:"IPv4_address_literal$macrocall$2",symbols:[{literal:"."},"Snum"]},{name:"IPv4_address_literal$macrocall$1",symbols:["IPv4_address_literal$macrocall$2","IPv4_address_literal$macrocall$2","IPv4_address_literal$macrocall$2"]},{name:"IPv4_address_literal",symbols:["Snum","IPv4_address_literal$macrocall$1"]},{name:"IPv6_address_literal$subexpression$1",symbols:[/[iI]/,/[pP]/,/[vV]/,{literal:"6"},{literal:":"}],postprocess:function(c){return c.join("")}},{name:"IPv6_address_literal",symbols:["IPv6_address_literal$subexpression$1","IPv6_addr"]},{name:"General_address_literal$ebnf$1",symbols:["dcontent"]},{name:"General_address_literal$ebnf$1",symbols:["General_address_literal$ebnf$1","dcontent"],postprocess:c=>c[0].concat([c[1]])},{name:"General_address_literal",symbols:["Standardized_tag",{literal:":"},"General_address_literal$ebnf$1"]},{name:"Standardized_tag",symbols:["Ldh_str"]},{name:"dcontent",symbols:[/[\x21-\x5a\x5e-\x7e]/],postprocess:e},{name:"Snum",symbols:["DIGIT"]},{name:"Snum$subexpression$1",symbols:[/[1-9]/,"DIGIT"]},{name:"Snum",symbols:["Snum$subexpression$1"]},{name:"Snum$subexpression$2",symbols:[{literal:"1"},"DIGIT","DIGIT"]},{name:"Snum",symbols:["Snum$subexpression$2"]},{name:"Snum$subexpression$3",symbols:[{literal:"2"},/[0-4]/,"DIGIT"]},{name:"Snum",symbols:["Snum$subexpression$3"]},{name:"Snum$subexpression$4",symbols:[{literal:"2"},{literal:"5"},/[0-5]/]},{name:"Snum",symbols:["Snum$subexpression$4"]},{name:"IPv6_addr",symbols:["IPv6_full"]},{name:"IPv6_addr",symbols:["IPv6_comp"]},{name:"IPv6_addr",symbols:["IPv6v4_full"]},{name:"IPv6_addr",symbols:["IPv6v4_comp"]},{name:"IPv6_hex",symbols:["HEXDIG"]},{name:"IPv6_hex$subexpression$1",symbols:["HEXDIG","HEXDIG"]},{name:"IPv6_hex",symbols:["IPv6_hex$subexpression$1"]},{name:"IPv6_hex$subexpression$2",symbols:["HEXDIG","HEXDIG","HEXDIG"]},{name:"IPv6_hex",symbols:["IPv6_hex$subexpression$2"]},{name:"IPv6_hex$subexpression$3",symbols:["HEXDIG","HEXDIG","HEXDIG","HEXDIG"]},{name:"IPv6_hex",symbols:["IPv6_hex$subexpression$3"]},{name:"IPv6_full$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6_full$macrocall$1",symbols:["IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2"]},{name:"IPv6_full",symbols:["IPv6_hex","IPv6_full$macrocall$1"]},{name:"IPv6_comp$ebnf$1$subexpression$1$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6_comp$ebnf$1$subexpression$1$macrocall$1",symbols:["IPv6_comp$ebnf$1$subexpression$1$macrocall$2","IPv6_comp$ebnf$1$subexpression$1$macrocall$2","IPv6_comp$ebnf$1$subexpression$1$macrocall$2","IPv6_comp$ebnf$1$subexpression$1$macrocall$2","IPv6_comp$ebnf$1$subexpression$1$macrocall$2"]},{name:"IPv6_comp$ebnf$1$subexpression$1",symbols:["IPv6_hex","IPv6_comp$ebnf$1$subexpression$1$macrocall$1"]},{name:"IPv6_comp$ebnf$1",symbols:["IPv6_comp$ebnf$1$subexpression$1"],postprocess:e},{name:"IPv6_comp$ebnf$1",symbols:[],postprocess:()=>null},{name:"IPv6_comp$string$1",symbols:[{literal:":"},{literal:":"}],postprocess:c=>c.join("")},{name:"IPv6_comp$ebnf$2$subexpression$1$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6_comp$ebnf$2$subexpression$1$macrocall$1",symbols:["IPv6_comp$ebnf$2$subexpression$1$macrocall$2","IPv6_comp$ebnf$2$subexpression$1$macrocall$2","IPv6_comp$ebnf$2$subexpression$1$macrocall$2","IPv6_comp$ebnf$2$subexpression$1$macrocall$2","IPv6_comp$ebnf$2$subexpression$1$macrocall$2"]},{name:"IPv6_comp$ebnf$2$subexpression$1",symbols:["IPv6_hex","IPv6_comp$ebnf$2$subexpression$1$macrocall$1"]},{name:"IPv6_comp$ebnf$2",symbols:["IPv6_comp$ebnf$2$subexpression$1"],postprocess:e},{name:"IPv6_comp$ebnf$2",symbols:[],postprocess:()=>null},{name:"IPv6_comp",symbols:["IPv6_comp$ebnf$1","IPv6_comp$string$1","IPv6_comp$ebnf$2"]},{name:"IPv6v4_full$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6v4_full$macrocall$1",symbols:["IPv6v4_full$macrocall$2","IPv6v4_full$macrocall$2","IPv6v4_full$macrocall$2","IPv6v4_full$macrocall$2","IPv6v4_full$macrocall$2"]},{name:"IPv6v4_full",symbols:["IPv6_hex","IPv6v4_full$macrocall$1",{literal:":"},"IPv4_address_literal"]},{name:"IPv6v4_comp$ebnf$1$subexpression$1$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6v4_comp$ebnf$1$subexpression$1$macrocall$1",symbols:["IPv6v4_comp$ebnf$1$subexpression$1$macrocall$2","IPv6v4_comp$ebnf$1$subexpression$1$macrocall$2","IPv6v4_comp$ebnf$1$subexpression$1$macrocall$2"]},{name:"IPv6v4_comp$ebnf$1$subexpression$1",symbols:["IPv6_hex","IPv6v4_comp$ebnf$1$subexpression$1$macrocall$1"]},{name:"IPv6v4_comp$ebnf$1",symbols:["IPv6v4_comp$ebnf$1$subexpression$1"],postprocess:e},{name:"IPv6v4_comp$ebnf$1",symbols:[],postprocess:()=>null},{name:"IPv6v4_comp$string$1",symbols:[{literal:":"},{literal:":"}],postprocess:c=>c.join("")},{name:"IPv6v4_comp$ebnf$2$subexpression$1$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6v4_comp$ebnf$2$subexpression$1$macrocall$1",symbols:["IPv6v4_comp$ebnf$2$subexpression$1$macrocall$2","IPv6v4_comp$ebnf$2$subexpression$1$macrocall$2","IPv6v4_comp$ebnf$2$subexpression$1$macrocall$2"]},{name:"IPv6v4_comp$ebnf$2$subexpression$1",symbols:["IPv6_hex","IPv6v4_comp$ebnf$2$subexpression$1$macrocall$1",{literal:":"}]},{name:"IPv6v4_comp$ebnf$2",symbols:["IPv6v4_comp$ebnf$2$subexpression$1"],postprocess:e},{name:"IPv6v4_comp$ebnf$2",symbols:[],postprocess:()=>null},{name:"IPv6v4_comp",symbols:["IPv6v4_comp$ebnf$1","IPv6v4_comp$string$1","IPv6v4_comp$ebnf$2","IPv4_address_literal"]},{name:"DIGIT",symbols:[/[0-9]/],postprocess:e},{name:"ALPHA_DIGIT_U",symbols:[/[0-9A-Za-z\u0080-\uFFFF]/],postprocess:e},{name:"ALPHA_DIGIT",symbols:[/[0-9A-Za-z]/],postprocess:e},{name:"ALPHA_DIG_DASH",symbols:[/[-0-9A-Za-z]/],postprocess:e},{name:"ALPHA_DIG_DASH_U",symbols:[/[-0-9A-Za-z\u0080-\uFFFF]/],postprocess:e},{name:"HEXDIG",symbols:[/[0-9A-Fa-f]/],postprocess:e},{name:"DQUOTE",symbols:[{literal:'"'}],postprocess:e}],ParserStart:"Reverse_path"};t.default=a}),ga=Q(function(t){var e=t&&t.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(t,"__esModule",{value:!0}),t.canonicalize=t.canonicalize_quoted_string=t.normalize=t.normalize_dot_string=t.parse=void 0;var r=Gf(),n=e(xf());n.default.ParserStart="Mailbox";var a=r.Grammar.fromCompiled(n.default);function c(f){if(f.length>986)throw new Error("address too long");const $=new r.Parser(a);if($.feed(f),$.results.length!==1)throw new Error("address parsing failed: ambiguous grammar");const E=f.lastIndexOf("@"),b=f.substring(E+1);if(b[0]!=="["){if(b.length>253)throw new Error("domain too long");const S=b.split(".");if(S.length<2)throw new Error("domain not fully qualified");if(S[S.length-1].length<2)throw new Error("top level domain label too short");if(S.sort(function(h,i){return i.length-h.length}),S[0].length>63)throw new Error("domain label too long")}return $.results[0]}t.parse=c;function s(f){return function(){const E=f.indexOf("+");return E===-1?f:f.substr(0,E)}().replace(/\./g,"").toLowerCase()}t.normalize_dot_string=s;function u(f){var w,$;const E=c(f),b=(w=E.domainPart.AddressLiteral)!==null&&w!==void 0?w:E.domainPart.DomainName.toLowerCase();return`${($=E.localPart.QuotedString)!==null&&$!==void 0?$:s(E.localPart.DotString)}@${b}`}t.normalize=u;function o(f){return`"${f.substr(1).substr(0,f.length-2).replace(/(?:\\(.))/g,"$1").replace(/(?:(["\\]))/g,"\\$1")}"`}t.canonicalize_quoted_string=o;function y(f){var w;const $=c(f),E=(w=$.domainPart.AddressLiteral)!==null&&w!==void 0?w:$.domainPart.DomainName.toLowerCase();return`${$.localPart.QuotedString?o($.localPart.QuotedString):$.localPart.DotString}@${E}`}t.canonicalize=y}),Wf=Q(function(t,e){var r=Object.prototype.hasOwnProperty,n=Object.prototype.toString,a=Object.defineProperty,c=Object.getOwnPropertyDescriptor,s=function(w){return typeof Array.isArray=="function"?Array.isArray(w):n.call(w)==="[object Array]"},u=function(w){if(!w||n.call(w)!=="[object Object]")return!1;var $=r.call(w,"constructor"),E=w.constructor&&w.constructor.prototype&&r.call(w.constructor.prototype,"isPrototypeOf");if(w.constructor&&!$&&!E)return!1;var b;for(b in w);return typeof b>"u"||r.call(w,b)},o=function(w,$){a&&$.name==="__proto__"?a(w,$.name,{enumerable:!0,configurable:!0,value:$.newValue,writable:!0}):w[$.name]=$.newValue},y=function(w,$){if($==="__proto__")if(r.call(w,$)){if(c)return c(w,$).value}else return;return w[$]};e.exports=function f(){var w,$,E,b,S,h,i=arguments[0],d=1,l=arguments.length,_=!1;for(typeof i=="boolean"&&(_=i,i=arguments[1]||{},d=2),(i==null||typeof i!="object"&&typeof i!="function")&&(i={});d<l;++d)if(w=arguments[d],w!=null)for($ in w)E=y(i,$),b=y(w,$),i!==b&&(_&&b&&(u(b)||(S=s(b)))?(S?(S=!1,h=E&&s(E)?E:[]):h=E&&u(E)?E:{},o(i,{name:$,newValue:f(_,h,b)})):typeof b<"u"&&o(i,{name:$,newValue:b}));return i}}),Jf=Q(function(t,e){e.exports=[{scheme:"aaa",description:"Diameter Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6733"}]},{scheme:"aaas",description:"Diameter Protocol with Secure Transport",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6733"}]},{scheme:"about",description:"about",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6694"}]},{scheme:"acap",description:"application configuration access protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2244"}]},{scheme:"acct",description:"acct",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7565"}]},{scheme:"cap",description:"Calendar Access Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4324"}]},{scheme:"cid",description:"content identifier",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2392"}]},{scheme:"coap",description:"coap",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7252"}]},{scheme:"coaps",description:"coaps",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7252"}]},{scheme:"crid",description:"TV-Anytime Content Reference Identifier",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4078"}]},{scheme:"data",description:"data",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2397"}]},{scheme:"dav",description:"dav",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4918"}]},{scheme:"dict",description:"dictionary service protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2229"}]},{scheme:"dns",description:"Domain Name System",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4501"}]},{scheme:"example",description:"example",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7595"}]},{scheme:"file",description:"Host-specific file names",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc1738"}]},{scheme:"ftp",description:"File Transfer Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc1738"}]},{scheme:"geo",description:"Geographic Locations",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5870"}]},{scheme:"go",description:"go",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3368"}]},{scheme:"gopher",description:"The Gopher Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4266"}]},{scheme:"h323",description:"H.323",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3508"}]},{scheme:"http",description:"Hypertext Transfer Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7230"}]},{scheme:"https",description:"Hypertext Transfer Protocol Secure",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7230"}]},{scheme:"iax",description:"Inter-Asterisk eXchange Version 2",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5456"}]},{scheme:"icap",description:"Internet Content Adaptation Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3507"}]},{scheme:"im",description:"Instant Messaging",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3860"}]},{scheme:"imap",description:"internet message access protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5092"}]},{scheme:"info",description:`Information Assets with Identifiers in Public Namespaces.
|
|
34
34
|
(section 3) defines an "info" registry
|
|
35
35
|
of public namespaces, which is maintained by NISO and can be accessed
|
|
36
|
-
from .`,reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4452"}]},{scheme:"ipp",description:"Internet Printing Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3510"}]},{scheme:"ipps",description:"Internet Printing Protocol over HTTPS",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7472"}]},{scheme:"iris",description:"Internet Registry Information Service",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3981"}]},{scheme:"iris.beep",description:"iris.beep",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3983"}]},{scheme:"iris.lwz",description:"iris.lwz",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4993"}]},{scheme:"iris.xpc",description:"iris.xpc",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4992"}]},{scheme:"iris.xpcs",description:"iris.xpcs",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4992"}]},{scheme:"jabber",description:"jabber",reference:[],template:"http://www.iana.org/assignments/uri-schemes/perm/jabber"},{scheme:"ldap",description:"Lightweight Directory Access Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4516"}]},{scheme:"mailto",description:"Electronic mail address",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6068"}]},{scheme:"mid",description:"message identifier",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2392"}]},{scheme:"msrp",description:"Message Session Relay Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4975"}]},{scheme:"msrps",description:"Message Session Relay Protocol Secure",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4975"}]},{scheme:"mtqp",description:"Message Tracking Query Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3887"}]},{scheme:"mupdate",description:"Mailbox Update (MUPDATE) Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3656"}]},{scheme:"news",description:"USENET news",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5538"}]},{scheme:"nfs",description:"network file system protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2224"}]},{scheme:"ni",description:"ni",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6920"}]},{scheme:"nih",description:"nih",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6920"}]},{scheme:"nntp",description:"USENET news using NNTP access",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5538"}]},{scheme:"opaquelocktoken",description:"opaquelocktokent",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4918"}]},{scheme:"pkcs11",description:"PKCS#11",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7512"}]},{scheme:"pop",description:"Post Office Protocol v3",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2384"}]},{scheme:"pres",description:"Presence",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3859"}]},{scheme:"reload",description:"reload",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6940"}]},{scheme:"rtsp",description:"Real-time Streaming Protocol (RTSP)",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2326"},{type:"draft",href:"http://www.iana.org/go/RFC-ietf-mmusic-rfc2326bis-40"}]},{scheme:"rtsps",description:"Real-time Streaming Protocol (RTSP) over TLS",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2326"},{type:"draft",href:"http://www.iana.org/go/RFC-ietf-mmusic-rfc2326bis-40"}]},{scheme:"rtspu",description:"Real-time Streaming Protocol (RTSP) over unreliable datagram transport",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2326"}]},{scheme:"service",description:"service location",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2609"}]},{scheme:"session",description:"session",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6787"}]},{scheme:"shttp",description:"Secure Hypertext Transfer Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2660"}]},{scheme:"sieve",description:"ManageSieve Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5804"}]},{scheme:"sip",description:"session initiation protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3261"}]},{scheme:"sips",description:"secure session initiation protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3261"}]},{scheme:"sms",description:"Short Message Service",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5724"}]},{scheme:"snmp",description:"Simple Network Management Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4088"}]},{scheme:"soap.beep",description:"soap.beep",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4227"}]},{scheme:"soap.beeps",description:"soap.beeps",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4227"}]},{scheme:"stun",description:"stun",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7064"}]},{scheme:"stuns",description:"stuns",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7064"}]},{scheme:"tag",description:"tag",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4151"}]},{scheme:"tel",description:"telephone",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3966"}]},{scheme:"telnet",description:"Reference to interactive sessions",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4248"}]},{scheme:"tftp",description:"Trivial File Transfer Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3617"}]},{scheme:"thismessage",description:"multipart/related relative reference resolution",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2557"}],template:"http://www.iana.org/assignments/uri-schemes/perm/thismessage"},{scheme:"tip",description:"Transaction Internet Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2371"}]},{scheme:"tn3270",description:"Interactive 3270 emulation sessions",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6270"}]},{scheme:"turn",description:"turn",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7065"}]},{scheme:"turns",description:"turns",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7065"}]},{scheme:"tv",description:"TV Broadcasts",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2838"}]},{scheme:"urn",description:"Uniform Resource Names",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2141"},{type:"registry",href:"http://www.iana.org/assignments/urn-namespaces"}]},{scheme:"vemmi",description:"versatile multimedia interface",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2122"}]},{scheme:"vnc",description:"Remote Framebuffer Protocol",reference:[{type:"draft",href:"http://www.iana.org/go/RFC-warden-appsawg-vnc-scheme-10"}]},{scheme:"ws",description:"WebSocket connections",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6455"}]},{scheme:"wss",description:"Encrypted WebSocket connections",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6455"}]},{scheme:"xcon",description:"xcon",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6501"}]},{scheme:"xcon-userid",description:"xcon-userid",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6501"}]},{scheme:"xmlrpc.beep",description:"xmlrpc.beep",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3529"}]},{scheme:"xmlrpc.beeps",description:"xmlrpc.beeps",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3529"}]},{scheme:"xmpp",description:"Extensible Messaging and Presence Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5122"}]},{scheme:"z39.50r",description:"Z39.50 Retrieval",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2056"}]},{scheme:"z39.50s",description:"Z39.50 Session",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2056"}]}]}),Qf=Q(function(t,e){e.exports=[{scheme:"acr",description:"acr",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/acr"},{scheme:"adiumxtra",description:"adiumxtra",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/adiumxtra"},{scheme:"afp",description:"afp",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/afp"},{scheme:"afs",description:"Andrew File System global file names",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc1738"}]},{scheme:"aim",description:"aim",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/aim"},{scheme:"appdata",description:"appdata",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/appdata"},{scheme:"apt",description:"apt",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/apt"},{scheme:"attachment",description:"attachment",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/attachment"},{scheme:"aw",description:"aw",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/aw"},{scheme:"barion",description:"barion",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/barion"},{scheme:"beshare",description:"beshare",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/beshare"},{scheme:"bitcoin",description:"bitcoin",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/bitcoin"},{scheme:"blob",description:"blob",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/blob"},{scheme:"bolo",description:"bolo",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/bolo"},{scheme:"callto",description:"callto",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/callto"},{scheme:"chrome",description:"chrome",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/chrome"},{scheme:"chrome-extension",description:"chrome-extension",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/chrome-extension"},{scheme:"com-eventbrite-attendee",description:"com-eventbrite-attendee",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/com-eventbrite-attendee"},{scheme:"content",description:"content",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/content"},{scheme:"cvs",description:"cvs",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/cvs"},{scheme:"dis",description:"dis",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/dis"},{scheme:"dlna-playcontainer",description:"dlna-playcontainer",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/dlna-playcontainer"},{scheme:"dlna-playsingle",description:"dlna-playsingle",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/dlna-playsingle"},{scheme:"dntp",description:"dntp",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/dntp"},{scheme:"dtn",description:"DTNRG research and development",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5050"}]},{scheme:"dvb",description:"dvb",reference:[{type:"draft",href:"http://www.iana.org/go/draft-mcroberts-uri-dvb"}]},{scheme:"ed2k",description:"ed2k",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ed2k"},{scheme:"facetime",description:"facetime",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/facetime"},{scheme:"feed",description:"feed",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/feed"},{scheme:"feedready",description:"feedready",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/feedready"},{scheme:"finger",description:"finger",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/finger"},{scheme:"fish",description:"fish",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/fish"},{scheme:"gg",description:"gg",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/gg"},{scheme:"git",description:"git",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/git"},{scheme:"gizmoproject",description:"gizmoproject",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/gizmoproject"},{scheme:"gtalk",description:"gtalk",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/gtalk"},{scheme:"ham",description:"ham",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7046"}]},{scheme:"hcp",description:"hcp",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/hcp"},{scheme:"icon",description:"icon",reference:[{type:"draft",href:"http://www.iana.org/go/draft-lafayette-icon-uri-scheme"}]},{scheme:"iotdisco",description:"iotdisco",reference:[{type:"uri",href:"http://www.iana.org/assignments/uri-schemes/prov/iotdisco.pdf"}],template:"http://www.iana.org/assignments/uri-schemes/prov/iotdisco"},{scheme:"ipn",description:"ipn",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6260"}]},{scheme:"irc",description:"irc",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/irc"},{scheme:"irc6",description:"irc6",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/irc6"},{scheme:"ircs",description:"ircs",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ircs"},{scheme:"isostore",description:"isostore",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/isostore"},{scheme:"itms",description:"itms",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/itms"},{scheme:"jar",description:"jar",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/jar"},{scheme:"jms",description:"Java Message Service",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6167"}]},{scheme:"keyparc",description:"keyparc",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/keyparc"},{scheme:"lastfm",description:"lastfm",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/lastfm"},{scheme:"ldaps",description:"ldaps",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ldaps"},{scheme:"magnet",description:"magnet",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/magnet"},{scheme:"maps",description:"maps",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/maps"},{scheme:"market",description:"market",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/market"},{scheme:"message",description:"message",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/message"},{scheme:"mms",description:"mms",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/mms"},{scheme:"ms-access",description:"ms-access",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-access"},{scheme:"ms-drive-to",description:"ms-drive-to",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-drive-to"},{scheme:"ms-enrollment",description:"ms-enrollment",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-enrollment"},{scheme:"ms-excel",description:"ms-excel",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-excel"},{scheme:"ms-getoffice",description:"ms-getoffice",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-getoffice"},{scheme:"ms-help",description:"ms-help",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-help"},{scheme:"ms-infopath",description:"ms-infopath",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-infopath"},{scheme:"ms-media-stream-id",description:"ms-media-stream-id",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-media-stream-id"},{scheme:"ms-powerpoint",description:"ms-powerpoint",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-powerpoint"},{scheme:"ms-project",description:"ms-project",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-project"},{scheme:"ms-publisher",description:"ms-publisher",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-publisher"},{scheme:"ms-search-repair",description:"ms-search-repair",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-search-repair"},{scheme:"ms-secondary-screen-controller",description:"ms-secondary-screen-controller",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-secondary-screen-controller"},{scheme:"ms-secondary-screen-setup",description:"ms-secondary-screen-setup",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-secondary-screen-setup"},{scheme:"ms-settings",description:"ms-settings",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings"},{scheme:"ms-settings-airplanemode",description:"ms-settings-airplanemode",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-airplanemode"},{scheme:"ms-settings-bluetooth",description:"ms-settings-bluetooth",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-bluetooth"},{scheme:"ms-settings-camera",description:"ms-settings-camera",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-camera"},{scheme:"ms-settings-cellular",description:"ms-settings-cellular",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-cellular"},{scheme:"ms-settings-cloudstorage",description:"ms-settings-cloudstorage",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-cloudstorage"},{scheme:"ms-settings-connectabledevices",description:"ms-settings-connectabledevices",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-connectabledevices"},{scheme:"ms-settings-displays-topology",description:"ms-settings-displays-topology",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-displays-topology"},{scheme:"ms-settings-emailandaccounts",description:"ms-settings-emailandaccounts",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-emailandaccounts"},{scheme:"ms-settings-language",description:"ms-settings-language",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-language"},{scheme:"ms-settings-location",description:"ms-settings-location",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-location"},{scheme:"ms-settings-lock",description:"ms-settings-lock",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-lock"},{scheme:"ms-settings-nfctransactions",description:"ms-settings-nfctransactions",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-nfctransactions"},{scheme:"ms-settings-notifications",description:"ms-settings-notifications",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-notifications"},{scheme:"ms-settings-power",description:"ms-settings-power",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-power"},{scheme:"ms-settings-privacy",description:"ms-settings-privacy",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-privacy"},{scheme:"ms-settings-proximity",description:"ms-settings-proximity",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-proximity"},{scheme:"ms-settings-screenrotation",description:"ms-settings-screenrotation",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-screenrotation"},{scheme:"ms-settings-wifi",description:"ms-settings-wifi",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-wifi"},{scheme:"ms-settings-workplace",description:"ms-settings-workplace",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-workplace"},{scheme:"ms-spd",description:"ms-spd",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-spd"},{scheme:"ms-transit-to",description:"ms-transit-to",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-transit-to"},{scheme:"ms-visio",description:"ms-visio",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-visio"},{scheme:"ms-walk-to",description:"ms-walk-to",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-walk-to"},{scheme:"ms-word",description:"ms-word",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-word"},{scheme:"msnim",description:"msnim",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/msnim"},{scheme:"mumble",description:"mumble",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/mumble"},{scheme:"mvn",description:"mvn",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/mvn"},{scheme:"notes",description:"notes",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/notes"},{scheme:"oid",description:"oid",reference:[{type:"draft",href:"http://www.iana.org/go/draft-larmouth-oid-iri"}],template:"http://www.iana.org/assignments/uri-schemes/prov/oid"},{scheme:"palm",description:"palm",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/palm"},{scheme:"paparazzi",description:"paparazzi",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/paparazzi"},{scheme:"platform",description:"platform",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/platform"},{scheme:"proxy",description:"proxy",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/proxy"},{scheme:"psyc",description:"psyc",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/psyc"},{scheme:"query",description:"query",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/query"},{scheme:"redis",description:"redis",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/redis"},{scheme:"rediss",description:"rediss",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/rediss"},{scheme:"res",description:"res",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/res"},{scheme:"resource",description:"resource",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/resource"},{scheme:"rmi",description:"rmi",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/rmi"},{scheme:"rsync",description:"rsync",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5781"}]},{scheme:"rtmfp",description:"rtmfp",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7425"}],template:"http://www.iana.org/assignments/uri-schemes/prov/rtmfp"},{scheme:"rtmp",description:"rtmp",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/rtmp"},{scheme:"secondlife",description:"query",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/secondlife"},{scheme:"sftp",description:"query",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/sftp"},{scheme:"sgn",description:"sgn",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/sgn"},{scheme:"skype",description:"skype",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/skype"},{scheme:"smb",description:"smb",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/smb"},{scheme:"smtp",description:"smtp",reference:[{type:"draft",href:"http://www.iana.org/go/draft-melnikov-smime-msa-to-mda"}],template:"http://www.iana.org/assignments/uri-schemes/prov/smtp"},{scheme:"soldat",description:"soldat",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/soldat"},{scheme:"spotify",description:"spotify",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/spotify"},{scheme:"ssh",description:"ssh",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ssh"},{scheme:"steam",description:"steam",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/steam"},{scheme:"submit",description:"submit",reference:[{type:"draft",href:"http://www.iana.org/go/draft-melnikov-smime-msa-to-mda"}],template:"http://www.iana.org/assignments/uri-schemes/prov/submit"},{scheme:"svn",description:"svn",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/svn"},{scheme:"teamspeak",description:"teamspeak",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/teamspeak"},{scheme:"teliaeid",description:"teliaeid",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/teliaeid"},{scheme:"things",description:"things",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/things"},{scheme:"tool",description:"tool",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/tool"},{scheme:"udp",description:"udp",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/udp"},{scheme:"unreal",description:"unreal",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/unreal"},{scheme:"ut2004",description:"ut2004",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ut2004"},{scheme:"v-event",description:"v-event",reference:[{type:"draft",href:"http://www.iana.org/go/draft-menderico-v-event-uri"}],template:"http://www.iana.org/assignments/uri-schemes/prov/v-event"},{scheme:"ventrilo",description:"ventrilo",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ventrilo"},{scheme:"view-source",description:"view-source",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/view-source"},{scheme:"webcal",description:"webcal",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/webcal"},{scheme:"wpid",description:"wpid",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/wpid"},{scheme:"wtai",description:"wtai",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/wtai"},{scheme:"wyciwyg",description:"wyciwyg",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/wyciwyg"},{scheme:"xfire",description:"xfire",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/xfire"},{scheme:"xri",description:"xri",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/xri"},{scheme:"ymsgr",description:"ymsgr",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ymsgr"}]}),Xf=Q(function(t,e){e.exports=[{scheme:"fax",description:"fax",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2806"},{type:"rfc",href:"http://www.iana.org/go/rfc3966"}]},{scheme:"filesystem",description:"filesystem",reference:[],template:"http://www.iana.org/assignments/uri-schemes/historic/filesystem"},{scheme:"mailserver",description:"Access to data available from mail servers",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6196"}]},{scheme:"modem",description:"modem",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2806"},{type:"rfc",href:"http://www.iana.org/go/rfc3966"}]},{scheme:"pack",description:"pack",reference:[{type:"draft",href:"http://www.iana.org/go/draft-shur-pack-uri-scheme"}],template:"http://www.iana.org/assignments/uri-schemes/historic/pack"},{scheme:"prospero",description:"Prospero Directory Service",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4157"}]},{scheme:"snews",description:"NNTP over SSL/TLS",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5538"}]},{scheme:"videotex",description:"videotex",reference:[{type:"draft",href:"http://www.iana.org/go/draft-mavrakis-videotex-url-spec"},{type:"rfc",href:"http://www.iana.org/go/rfc2122"},{type:"rfc",href:"http://www.iana.org/go/rfc3986"}],template:"http://www.iana.org/assignments/uri-schemes/historic/videotex"},{scheme:"wais",description:"Wide Area Information Servers",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4156"}]},{scheme:"z39.50",description:"Z39.50 information access",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc1738"},{type:"rfc",href:"http://www.iana.org/go/rfc2056"}]}]}),Yf=Q(function(t,e){e.exports=[{scheme:"android-app"},{scheme:"webpack"},{scheme:"s3",description:"Amazon Web Services S3 bucket"},{scheme:"gs",description:"Google Cloud Storage"},{scheme:"mqtt",description:"Message Queuing Telemetry Transport Protocol"},{scheme:"modbus+tcp",description:"Modbus over TCP"}]}),Go=Q(function(t,e){var r=Wf(),n={permanent:Jf(),provosional:Qf(),historical:Xf()},a={};Object.keys(n).forEach(function(c){n[c].forEach(function(s){a[s.scheme]=r(s,{type:c})})}),n.unofficial=Yf().filter(function(c){return!a[c.scheme]}),n.unofficial.forEach(function(c){a[c.scheme]=r(c,{type:"unofficial"})}),e.exports=r(n,{allByName:a})}),Zf=Q(function(t,e){var{parse:r}=pa(),{addressParser:n}=ga(),a=Go();function c(s){try{return n(s),!0}catch{return!1}}e.exports=s=>{const u=r(s);return!!(u.scheme==="mailto"&&u.to.every(c)||u.reference==="absolute"&&a.allByName[u.scheme])}}),ed=Q(function(t,e){e.exports=/^P(?!$)(\d+(?:\.\d+)?Y)?(\d+(?:\.\d+)?M)?(\d+(?:\.\d+)?W)?(\d+(?:\.\d+)?D)?(T(?=\d)(\d+(?:\.\d+)?H)?(\d+(?:\.\d+)?M)?(\d+(?:\.\d+)?S)?)?$/}),td=Q(function(t,e){var{parse:r}=ga();e.exports=n=>{try{return r(n),!0}catch{return!1}}}),xo={};al(xo,{default:()=>Xo});function Wo(t){return this[t]}function rd(t,e){this[t]=id.bind(null,e)}var Jo,Qo,Lr,ya,va,nd=(t,e,r)=>{var n=ya(e);for(let a of n)!va.call(t,a)&&a!=="default"&&Lr(t,a,{get:Wo.bind(e,a),enumerable:!0})},sd,Ha=(t,e,r)=>{var n=t!=null&&typeof t=="object";if(n){var a=sd??(sd=new WeakMap),c=a.get(t);if(c)return c}r=t!=null?Jo(Qo(t)):{};let s=e||!t||!t.__esModule?Lr(r,"default",{value:t,enumerable:!0}):r;for(let u of ya(t))va.call(s,u)||Lr(s,u,{get:Wo.bind(t,u),enumerable:!0});return n&&a.set(t,s),s},ad=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),id=t=>t,od=(t,e)=>{for(var r in e)Lr(t,r,{get:e[r],enumerable:!0,configurable:!0,set:rd.bind(e,r)})},Rs,Ts,Is,Xo,cd=il(()=>{Jo=Object.create,{getPrototypeOf:Qo,defineProperty:Lr,getOwnPropertyNames:ya}=Object,va=Object.prototype.hasOwnProperty,Rs=ad((t,e)=>{var r=/^xn--/,n=/[^\0-\x7F]/,a=/[\x2E\u3002\uFF0E\uFF61]/g,c={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},s=Math.floor,u=String.fromCharCode;function o(m){throw RangeError(c[m])}function y(m,g){let v=[],k=m.length;for(;k--;)v[k]=g(m[k]);return v}function f(m,g){let v=m.split("@"),k="";v.length>1&&(k=v[0]+"@",m=v[1]),m=m.replace(a,".");let T=m.split("."),j=y(T,g).join(".");return k+j}function w(m){let g=[],v=0,k=m.length;for(;v<k;){let T=m.charCodeAt(v++);if(T>=55296&&T<=56319&&v<k){let j=m.charCodeAt(v++);(j&64512)==56320?g.push(((T&1023)<<10)+(j&1023)+65536):(g.push(T),v--)}else g.push(T)}return g}var $=m=>String.fromCodePoint(...m),E=function(m){return m>=48&&m<58?26+(m-48):m>=65&&m<91?m-65:m>=97&&m<123?m-97:36},b=function(m,g){return m+22+75*(m<26)-((g!=0)<<5)},S=function(m,g,v){let k=0;for(m=v?s(m/700):m>>1,m+=s(m/g);m>455;k+=36)m=s(m/35);return s(k+36*m/(m+38))},h=function(m){let g=[],v=m.length,k=0,T=128,j=72,V=m.lastIndexOf("-");V<0&&(V=0);for(let q=0;q<V;++q)m.charCodeAt(q)>=128&&o("not-basic"),g.push(m.charCodeAt(q));for(let q=V>0?V+1:0;q<v;){let W=k;for(let te=1,ue=36;;ue+=36){q>=v&&o("invalid-input");let ve=E(m.charCodeAt(q++));ve>=36&&o("invalid-input"),ve>s((2147483647-k)/te)&&o("overflow"),k+=ve*te;let fe=ue<=j?1:ue>=j+26?26:ue-j;if(ve<fe)break;let ae=36-fe;te>s(2147483647/ae)&&o("overflow"),te*=ae}let x=g.length+1;j=S(k-W,x,W==0),s(k/x)>2147483647-T&&o("overflow"),T+=s(k/x),k%=x,g.splice(k++,0,T)}return String.fromCodePoint(...g)},i=function(m){let g=[];m=w(m);let v=m.length,k=128,T=0,j=72;for(let W of m)W<128&&g.push(u(W));let V=g.length,q=V;for(V&&g.push("-");q<v;){let W=2147483647;for(let te of m)te>=k&&te<W&&(W=te);let x=q+1;W-k>s((2147483647-T)/x)&&o("overflow"),T+=(W-k)*x,k=W;for(let te of m)if(te<k&&++T>2147483647&&o("overflow"),te===k){let ue=T;for(let ve=36;;ve+=36){let fe=ve<=j?1:ve>=j+26?26:ve-j;if(ue<fe)break;let ae=ue-fe,L=36-fe;g.push(u(b(fe+ae%L,0))),ue=s(ae/L)}g.push(u(b(ue,0))),j=S(T,x,q===V),T=0,++q}++T,++k}return g.join("")},d=function(m){return f(m,function(g){return r.test(g)?h(g.slice(4).toLowerCase()):g})},l=function(m){return f(m,function(g){return n.test(g)?"xn--"+i(g):g})},_={version:"2.3.1",ucs2:{decode:w,encode:$},decode:h,encode:i,toASCII:l,toUnicode:d};e.exports=_}),Ts={},od(Ts,{default:()=>Is.default}),nd(Ts,Ha(Rs(),1)),Is=Ha(Rs(),1),Xo=Is.default}),ud=Q(function(t,e){var{toASCII:r}=(cd(),rl(xo)),n=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i;e.exports=a=>{const c=r(a);return c.replace(/\.$/,"").length<=253&&n.test(c)}}),ld=Q(function(t,e){var{parse:r}=pa(),{addressParser:n}=ga(),a=Go();function c(s){try{return n(s),!0}catch{return!1}}e.exports=s=>{const u=r(s);return u.scheme==="mailto"&&u.to.every(c)||u.reference==="absolute"&&u.path!==void 0&&a.allByName[u.scheme]?!0:u.scheme&&!a.allByName[u.scheme]?!1:u.path!==void 0&&(u.reference==="relative"||u.reference==="same-document"||u.reference==="uri")}}),fd=Q(function(t,e){t.iri=Zf(),t.duration=ed(),t["idn-email"]=td(),t["idn-hostname"]=ud(),t["iri-reference"]=ld()}),dd=Q(function(t,e){var r=fd();e.exports=(n,a={})=>{const c=Object.keys(r);let s=c;if(a.formats){if(!Array.isArray(a.formats))throw new Error("options.formats must be an array");s=a.formats}return c.filter(u=>s.includes(u)).forEach(u=>{n.addFormat(u,r[u])}),n}}),hd=Q(function(t,e){var r=Object.prototype.hasOwnProperty,n="~";function a(){}Object.create&&(a.prototype=Object.create(null),new a().__proto__||(n=!1));function c(y,f,w){this.fn=y,this.context=f,this.once=w||!1}function s(y,f,w,$,E){if(typeof w!="function")throw new TypeError("The listener must be a function");var b=new c(w,$||y,E),S=n?n+f:f;return y._events[S]?y._events[S].fn?y._events[S]=[y._events[S],b]:y._events[S].push(b):(y._events[S]=b,y._eventsCount++),y}function u(y,f){--y._eventsCount===0?y._events=new a:delete y._events[f]}function o(){this._events=new a,this._eventsCount=0}o.prototype.eventNames=function(){var f=[],w,$;if(this._eventsCount===0)return f;for($ in w=this._events)r.call(w,$)&&f.push(n?$.slice(1):$);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(w)):f},o.prototype.listeners=function(f){var w=n?n+f:f,$=this._events[w];if(!$)return[];if($.fn)return[$.fn];for(var E=0,b=$.length,S=new Array(b);E<b;E++)S[E]=$[E].fn;return S},o.prototype.listenerCount=function(f){var w=n?n+f:f,$=this._events[w];return $?$.fn?1:$.length:0},o.prototype.emit=function(f,w,$,E,b,S){var h=n?n+f:f;if(!this._events[h])return!1;var i=this._events[h],d=arguments.length,l,_;if(i.fn){switch(i.once&&this.removeListener(f,i.fn,void 0,!0),d){case 1:return i.fn.call(i.context),!0;case 2:return i.fn.call(i.context,w),!0;case 3:return i.fn.call(i.context,w,$),!0;case 4:return i.fn.call(i.context,w,$,E),!0;case 5:return i.fn.call(i.context,w,$,E,b),!0;case 6:return i.fn.call(i.context,w,$,E,b,S),!0}for(_=1,l=new Array(d-1);_<d;_++)l[_-1]=arguments[_];i.fn.apply(i.context,l)}else{var m=i.length,g;for(_=0;_<m;_++)switch(i[_].once&&this.removeListener(f,i[_].fn,void 0,!0),d){case 1:i[_].fn.call(i[_].context);break;case 2:i[_].fn.call(i[_].context,w);break;case 3:i[_].fn.call(i[_].context,w,$);break;case 4:i[_].fn.call(i[_].context,w,$,E);break;default:if(!l)for(g=1,l=new Array(d-1);g<d;g++)l[g-1]=arguments[g];i[_].fn.apply(i[_].context,l)}}return!0},o.prototype.on=function(f,w,$){return s(this,f,w,$,!1)},o.prototype.once=function(f,w,$){return s(this,f,w,$,!0)},o.prototype.removeListener=function(f,w,$,E){var b=n?n+f:f;if(!this._events[b])return this;if(!w)return u(this,b),this;var S=this._events[b];if(S.fn)S.fn===w&&(!E||S.once)&&(!$||S.context===$)&&u(this,b);else{for(var h=0,i=[],d=S.length;h<d;h++)(S[h].fn!==w||E&&!S[h].once||$&&S[h].context!==$)&&i.push(S[h]);i.length?this._events[b]=i.length===1?i[0]:i:u(this,b)}return this},o.prototype.removeAllListeners=function(f){var w;return f?(w=n?n+f:f,this._events[w]&&u(this,w)):(this._events=new a,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=n,o.EventEmitter=o,typeof e<"u"&&(e.exports=o)}),pd="https://www.w3.org/ns/activitystreams",md="https://sockethub.org/ns/context/v1.jsonld",gd="error",yd="https://sockethub.org/ns/context/platform/error/v1.jsonld",vd="sockethub:internal",_d="https://sockethub.org/ns/context/platform/sockethub:internal/v1.jsonld",_a=new Map,Yo=new Map,Zo=new Map;function wd(t){return Array.isArray(t)?t.filter(e=>typeof e=="string"):[]}function $d(t){return wd(t["@context"])}function ec(t,e,r,n){_a.set(e,t),Yo.set(e,r),Zo.set(e,n)}function fs(t){const r=$d(t).filter(n=>_a.has(n));return r.length!==1?null:r[0]}function tc(t){return _a.get(t)}function bd(t){return Yo.get(t)}function Ed(t){return Zo.get(t)}var Sd=Fr(Uo());new Sd.default({strictTypes:!1,allErrors:!0});var rc={feed:{required:["id","type"],additionalProperties:!0,properties:{type:{enum:["feed"]},id:{type:"string",format:"iri"},name:{type:"string"},description:{type:"string"},author:{type:"string"},favicon:{type:"string"}}},person:{required:["id","type"],additionalProperties:!0,properties:{id:{type:"string"},type:{enum:["person"]},name:{type:"string"}}},room:{required:["id","type"],additionalProperties:!0,properties:{id:{type:"string"},type:{enum:["room"]},name:{type:"string"}}},service:{required:["id","type"],additionalProperties:!0,properties:{id:{type:"string"},type:{enum:["service"]},name:{type:"string"}}},platform:{required:["id","type"],additionalProperties:!0,properties:{id:{type:"string"},type:{enum:["platform"]},name:{type:"string"}}},website:{required:["id","type"],additionalProperties:!0,properties:{id:{type:"string",format:"iri"},type:{enum:["website"]},name:{type:"string"}}},address:{required:["type"],additionalProperties:!1,properties:{type:{enum:["address"]}}},calendar:{required:["id","type"],additionalProperties:!0,properties:{id:{type:"string",format:"iri"},type:{enum:["calendar"]},name:{type:"string"},components:{type:"array",items:{enum:["event","task"]}}}},addressBook:{required:["id","type"],additionalProperties:!1,properties:{id:{type:"string",format:"iri"},type:{enum:["addressBook"]}}}},Pd=Object.keys(rc),nc=["person","room","service","feed","website","platform"],sc=["person","room","service","feed","website","platform","address","calendar","addressBook"],kd=nc.map(t=>({$ref:`#/definitions/type/${t}`})),Od=sc.map(t=>({$ref:`#/definitions/type/${t}`})),Nd={type:"array",minItems:3,maxItems:3,items:{type:"string"},allOf:[{contains:{const:pd}},{contains:{const:md}}]},Rd={type:"string"},Td={$id:"https://sockethub.org/schemas/v/activity-stream.json",description:"Schema for Sockethub Activity Streams",type:"object",required:["@context","type","actor"],additionalProperties:!1,properties:{"@context":Nd,id:{type:"string"},type:Rd,actor:{type:"object",oneOf:kd},target:{type:"object",oneOf:Od},object:{type:"object"},published:{type:"string",format:"date-time"}},definitions:{type:rc}},Id={version:"3.0.0-alpha.21"};function Cd(t,e){return t.replace("/v/",`/${e}/`)}var Ad={$id:"https://sockethub.org/schemas/v/sockethub-config.json"};Cd(Ad.$id,Id.version);var jd=Fr(Uo()),Md=Fr(Bf()),Dd=Fr(dd());function qd(t){let e=`${t.instancePath?t.instancePath:"activity stream"}: ${t.message}`;return t.keyword==="additionalProperties"?e+=`: ${t.params.additionalProperty}`:t.keyword==="enum"&&(e+=`: ${t.params.allowedValues.join(", ")}`),e}function jr(t){const e=[];t!=null&&t.type&&e.push(t.type);const r=t;for(const n in r){const a=r[n];a&&typeof a=="object"&&"type"in a&&e.push(...jr(a))}return e}function Vd(t){const e=t.schemaPath.match(/#\/\w+\/\w+\/([\w-]+)\//);return e?e[1]:void 0}function Ld(t){const e=t.instancePath.match(/\/(\w+)/);return e?e[1]:void 0}function Ud(t,e){const r=Vd(t),n=Ld(t);if(!n)return-1;const a=e[n];return!a||!r||!a.includes(r)?-1:t.instancePath.split("/").length}function zd(t){if(!Array.isArray(t["@context"]))return{actor:[],target:[],object:jr(t)};const e=t;return{actor:jr(e.actor),target:jr(e.target),object:e.object?jr(e.object):[]}}function Fd(t,e,r){const n=zd(t);let a=0,c=-1;for(let s=0;s<e.length;s++){const u=Ud(e[s],n);u>c&&(c=u,a=s)}return c>=0?qd(e[a]):Hd(e[e.length-1],r)}function Kd(t,e){if(!(e!=null&&e.excludeTypes)||e.excludeTypes.length===0)return t;const r=new Set(e.excludeTypes);return t.filter(n=>!r.has(n))}function Hd(t,e){let r;if(t.keyword==="oneOf"){const n=t.instancePath.split("/")[1],a=n==="actor"?nc:n==="target"?sc:Pd,c=Kd(a,e),s=c.length>0?c:a;r=`${t.instancePath}: ${t.message}: ${s.join(", ")}`}else r=`${t.instancePath?t.instancePath:"activity stream"}: ${t.message}`;return"additionalProperty"in t.params&&(r+=`: ${t.params.additionalProperty}`),r}var Ht=new jd.default({strictTypes:!1,allErrors:!0});Md.default(Ht);Dd.default(Ht);var Bt="https://sockethub.org/schemas/v0",Xs={},Bd={},Ba=!1;Xs[`${Bt}/activity-stream`]=Td;for(const t in Xs)Ht.addSchema(Xs[t],t);function Ga(t,e){ec(t,e,`${Bt}/context/${t}/messages`,`${Bt}/context/${t}/credentials`);const r=`${Bt}/context/${t}/messages`;Ht.getSchema(r)||Ht.addSchema({},r);const n=`${Bt}/context/${t}/credentials`;Ht.getSchema(n)||Ht.addSchema({},n)}function Gd(){Ba||(Ga(gd,yd),Ga(vd,_d),Ba=!0)}Gd();function es(t,e){const r=Ht.getSchema(t);if(!r)return`schema ${t} not found`;if(!r(e)){let a=Fd(e,r.errors,Bd);if(Array.isArray(e["@context"])){const c=fs(e);if(c){const s=tc(c);s&&(a=`[${s}] ${a}`)}}return a}return""}function xd(t){const e=es(`${Bt}/activity-stream`,t);if(e)return e;const r=fs(t);if(!r)return"activity streams must have exactly one registered platform context URL in @context";const n=bd(r);return n?es(n,t):`platform context URL ${r} does not have a registered message schema`}function Wd(t){if(!Array.isArray(t["@context"]))return"credential activity streams must have an @context set";if(t.type!=="credentials")return"credential activity streams must have credentials set as type";const e=es(`${Bt}/activity-stream`,t);if(e)return e;const r=fs(t);if(!r)return"credential activity streams must have exactly one registered platform context URL in @context";const n=Ed(r);return n?es(n,t):`platform context URL ${r} does not have a registered credentials schema`}function xa(t,e){const r=`${Bt}/context/${e}`;Ht.getSchema(r)||Ht.addSchema(t,r)}function Jd(t,e){ec(t,e,`${Bt}/context/${t}/messages`,`${Bt}/context/${t}/credentials`)}function Qd(t){const e=fs(t);return e?tc(e)??null:null}var Wa={actor:"id",target:"id",object:"content"};function Xd(t,e){return typeof t=="string"?{[e]:t}:Array.isArray(t)?t.map(r=>typeof r=="string"?{id:r}:r):t}function Cs(t){const e={...t};for(const r of Object.keys(Wa))r in e&&(e[r]=Xd(e[r],Wa[r]));return e}var Yd=Fr(hd()),Zd=Yd.default;class Ur{constructor(e,r={}){ct(this,"events",{credentials:new Map,connect:new Map,join:new Map});ct(this,"_socket");ct(this,"socket");ct(this,"debug",!0);ct(this,"options");ct(this,"platformRegistry",new Map);ct(this,"asContextUrl");ct(this,"sockethubContextUrl");ct(this,"sockethubVersion");ct(this,"initState","idle");ct(this,"hasReadyOnce",!1);ct(this,"initCycle");ct(this,"initTokenCounter",0);ct(this,"initTimeoutTimer");ct(this,"waitingWarningTimer");ct(this,"waitingWarningIntervalMs",1e4);ct(this,"readyWaiters",[]);ct(this,"outboundQueue",[]);ct(this,"outboundSequence",0);ct(this,"registryFingerprint");ct(this,"latestReadyInfo");if(!e)throw new Error("SockethubClient requires a socket.io instance");this._socket=e,this.options={initTimeoutMs:r.initTimeoutMs??5e3,maxQueuedOutbound:r.maxQueuedOutbound??1e3,maxQueuedAgeMs:r.maxQueuedAgeMs??3e4},this.socket=this.createPublicEmitter(),this.registerSocketIOHandlers(),this._socket.connected&&(this.socket.connected=!0,this.socket.id=this._socket.id,this.socket._emit("connect"),this.startInitialization("initial-connect",!0))}clearCredentials(){this.events.credentials.clear()}getRegisteredPlatforms(){return Array.from(this.platformRegistry.values()).map(e=>({...e,types:[...e.types],schemas:{...e.schemas}}))}isSchemasReady(){return this.isReady()}isReady(){return this.initState==="ready"}getInitState(){return this.initState}getRegisteredBaseContexts(){if(!this.asContextUrl||!this.sockethubContextUrl)throw new Error("Schema registry not loaded yet. Wait for client ready state after connect.");return{as:this.asContextUrl,sockethub:this.sockethubContextUrl}}getPlatformSchema(e,r="messages"){var a,c;const n=e==null?void 0:e.trim();if(n)return(c=(a=this.platformRegistry.get(n))==null?void 0:a.schemas)==null?void 0:c[r]}async waitForSchemas(e=2e3){return await this.ready(e),this.buildPlatformRegistryPayload()}ready(e=this.options.initTimeoutMs){return this.isReady()&&this.latestReadyInfo?Promise.resolve(this.latestReadyInfo):new Promise((r,n)=>{const a={resolve:r,reject:n};e>0&&(a.timer=setTimeout(()=>{this.readyWaiters=this.readyWaiters.filter(c=>c!==a),n(new Error(`SockethubClient ready() timed out after ${e}ms`))},e)),this.readyWaiters.push(a),this.socket.connected&&this.initState==="idle"&&this.startInitialization(this.hasReadyOnce?"reconnect":"initial-connect",!0)})}validateActivity(e){return e.type==="credentials"?Wd(e):xd(e)}contextFor(e){if(typeof e!="string"||e.trim().length===0)throw new Error("SockethubClient.contextFor(platform) requires a non-empty platform string");if(!this.asContextUrl||!this.sockethubContextUrl)throw new Error("Schema registry not loaded yet. Wait for client ready state after connect.");const r=e.trim(),n=this.platformRegistry.get(r);if(!n){const a=Array.from(this.platformRegistry.keys()).sort();throw new Error(`unknown platform '${r}'. Registered platforms: ${a.join(", ")}`)}return[this.asContextUrl,this.sockethubContextUrl,n.contextUrl]}createPublicEmitter(){const e=new Zd;return e._emit=e.emit,e.emit=(r,n,a)=>{this.handlePublicEmit(r,n,a)},e.connected=!1,e.disconnect=()=>{this._socket.disconnect()},e.connect=()=>{this._socket.connect()},e}requestSchemaRegistry(){"io"in this._socket&&this._socket.emit("schemas",this.registryFingerprint,r=>{this.handleSchemasPayload(r)})}applyPlatformRegistry(e){var s,u,o,y;if(!e||typeof e!="object")return;const r=e,n=(s=r.contexts)==null?void 0:s.as,a=(u=r.contexts)==null?void 0:u.sockethub;if(typeof n!="string"||typeof a!="string"||!Array.isArray(r.platforms))return;this.sockethubVersion=typeof r.version=="string"?r.version:"unknown",this.asContextUrl=n,this.sockethubContextUrl=a,this.platformRegistry.clear();for(const f of r.platforms)if(!(!f||typeof f!="object"||typeof f.id!="string"||typeof f.version!="string"||typeof f.contextUrl!="string")){this.platformRegistry.set(f.id,{...f,version:f.version,types:Array.isArray(f.types)?f.types:[],schemas:f.schemas||{}}),Jd(f.id,f.contextUrl);try{const w=(o=f.schemas)==null?void 0:o.credentials;w&&typeof w=="object"&&!Array.isArray(w)&&xa(w,`${f.id}/credentials`);const $=(y=f.schemas)==null?void 0:y.messages;$&&typeof $=="object"&&!Array.isArray($)&&xa($,`${f.id}/messages`)}catch(w){const $=w instanceof Error?w.message:String(w);console.warn(`[SockethubClient] Failed to register schemas for platform ${f.id}: ${$}`)}}const c=this.buildPlatformRegistryPayload();return this.registryFingerprint=typeof r.fingerprint=="string"?r.fingerprint:void 0,this.socket._emit("schemas",c),c}eventCredentials(e){e.object&&e.object.type==="credentials"&&this.events.credentials.set(Ur.getKey(e),e)}eventMessage(e){if(!this._socket.connected)return;const r=Ur.getKey(e);e.type==="join"||e.type==="connect"?this.events[e.type].set(r,e):e.type==="leave"?this.events.join.delete(r):e.type==="disconnect"&&this.events.connect.delete(r)}static getKey(e){var c;const r=((c=e.actor)==null?void 0:c.id)||e.actor;if(!r)throw new Error(`actor property not present for message type: ${e==null?void 0:e.type}`);const n=e.target?e.target.id||e.target:"";return`${Qd(e)??""}:${r}-${n}`}buildPlatformRegistryPayload(){return{version:this.sockethubVersion,contexts:this.asContextUrl&&this.sockethubContextUrl?{as:this.asContextUrl,sockethub:this.sockethubContextUrl}:void 0,platforms:this.getRegisteredPlatforms()}}buildReadyInfo(e){if(!(!this.sockethubVersion||!this.asContextUrl||!this.sockethubContextUrl))return{state:"ready",reason:e,sockethubVersion:this.sockethubVersion,contexts:{as:this.asContextUrl,sockethub:this.sockethubContextUrl},platforms:this.getRegisteredPlatforms().map(r=>({id:r.id,version:r.version,contextUrl:r.contextUrl,contextVersion:r.contextVersion,schemaVersion:r.schemaVersion,types:[...r.types]}))}}resolveReadyWaiters(e){const r=this.readyWaiters;this.readyWaiters=[];for(const n of r)n.timer&&clearTimeout(n.timer),n.resolve(e)}rejectReadyWaiters(e){const r=this.readyWaiters;this.readyWaiters=[];for(const n of r)n.timer&&clearTimeout(n.timer),n.reject(e)}emitInitError(e,r,n){this.socket._emit("init_error",{error:e,phase:r,retrying:n})}emitClientError(e,r,n){if(typeof r=="function"){r({error:n});return}this.socket._emit("client_error",{event:e,error:n})}clearInitTimers(){this.initTimeoutTimer&&(clearTimeout(this.initTimeoutTimer),this.initTimeoutTimer=void 0),this.waitingWarningTimer&&(clearInterval(this.waitingWarningTimer),this.waitingWarningTimer=void 0)}startWaitingWarnings(){this.waitingWarningTimer||(this.waitingWarningTimer=setInterval(()=>{if(this.isReady()||this.initState==="closed"){this.clearInitTimers();return}const e=this.outboundQueue.length,r=this.outboundQueue[0],n=r?((Date.now()-r.enqueuedAt)/1e3).toFixed(1):"0.0";console.warn(`[SockethubClient] Still waiting for schemas; queued outbound messages: ${e}; oldest queued age: ${n}s.`)},this.waitingWarningIntervalMs))}startInitialization(e,r){if(!this.socket.connected||this.initState==="closed")return;const n=++this.initTokenCounter;this.initCycle={token:n,reason:e,startedAt:Date.now(),replayOnReady:r,timedOut:!1},this.initState="initializing",this.clearInitTimers(),this.initTimeoutTimer=setTimeout(()=>{if(!this.initCycle||this.initCycle.token!==n)return;this.initCycle.timedOut=!0,this.initState="init_error";const a=`Initialization timed out after ${this.options.initTimeoutMs}ms waiting for schemas`;console.warn(`[SockethubClient] ${a}; queued outbound messages: ${this.outboundQueue.length}. Waiting for schemas event from server.`),this.emitInitError(a,"timeout",!1),this.startWaitingWarnings()},this.options.initTimeoutMs);try{this.requestSchemaRegistry()}catch(a){this.initState="init_error";const c=a instanceof Error?a.message:String(a);this.emitInitError(c,"schemas-request",!1),this.startWaitingWarnings()}}markReady(e){const r=this.initCycle,n=!!(r!=null&&r.replayOnReady);this.initCycle=void 0,this.clearInitTimers(),this.initState="ready",this.hasReadyOnce=!0;const a=this.buildReadyInfo(e);if(!a){const c=new Error("Failed to build ready payload");this.initState="init_error",this.emitInitError(c.message,"schemas-apply",!0),this.rejectReadyWaiters(c);return}this.socket._emit("ready",a),this.latestReadyInfo=a,this.resolveReadyWaiters(a),n&&(this.replay("credentials",this.events.credentials),this.replay("message",this.events.connect),this.replay("message",this.events.join)),this.flushOutboundQueue()}handleSchemasPayload(e){if(!e||typeof e!="object")return;if(e.unchanged===!0&&typeof this.registryFingerprint=="string"&&this.platformRegistry.size>0){this.initCycle?this.markReady(this.initCycle.reason):this.initState!=="ready"&&this.markReady("schemas-update");return}const r=e.fingerprint;if(this.initState==="ready"&&!this.initCycle&&r&&r===this.registryFingerprint)return;if(this.initState==="ready"&&!this.initCycle&&(this.initState="initializing"),!this.applyPlatformRegistry(e)){this.initState="init_error",this.emitInitError("Received invalid schemas payload from server","schemas-apply",!0),this.startWaitingWarnings();return}if(this.initCycle){this.markReady(this.initCycle.reason);return}this.markReady("schemas-update")}handlePublicEmit(e,r,n){const a={event:e,content:r,callback:n,enqueuedAt:Date.now(),sequence:this.outboundSequence++};if(!this.isReady()){this.enqueueOutbound(a);return}this.sendOutbound(a)}enqueueOutbound(e){if(this.outboundQueue.push(e),this.outboundQueue.length<=this.options.maxQueuedOutbound)return;const r=this.outboundQueue.shift();r&&this.emitClientError(r.event,r.callback,"SockethubClient queue overflow before ready")}flushOutboundQueue(){if(!this.isReady()||this.outboundQueue.length===0)return;const e=Date.now(),r=this.outboundQueue.sort((n,a)=>n.sequence-a.sequence);this.outboundQueue=[];for(const n of r){if(e-n.enqueuedAt>this.options.maxQueuedAgeMs){this.emitClientError(n.event,n.callback,`SockethubClient queued message expired after ${this.options.maxQueuedAgeMs}ms before initialization`);continue}this.sendOutbound(n)}}sendOutbound(e){let r=e.content;try{if(e.event==="credentials"||e.event==="message"){if(r=Cs(e.content),r&&typeof r=="object"){const n=r;e.event==="credentials"&&!n.type&&(n.type="credentials"),n.actor&&typeof n.actor=="object"&&!n.actor.type&&(n.actor.type="person")}if(this.platformRegistry.size>0){const n=this.validateActivity(r);if(n){this.emitClientError(e.event,e.callback,`SockethubClient validation failed: ${n}`);return}}}e.event==="credentials"?this.eventCredentials(r):e.event==="message"&&this.eventMessage(r),this._socket.emit(e.event,r,e.callback)}catch(n){const a=n instanceof Error?n.message:String(n);this.emitClientError(e.event,e.callback,a)}}log(e,r){this.debug&&console.log(e,r)}registerSocketIOHandlers(){this._socket.on("connect",()=>{this.socket.id=this._socket.id,this.socket.connected=!0,this.socket._emit("connect"),this.startInitialization(this.hasReadyOnce?"reconnect":"initial-connect",!0)}),this._socket.on("connect_error",e=>{this.socket._emit("connect_error",e)}),this._socket.on("disconnect",e=>{this.socket.connected=!1,this.initState!=="closed"&&(this.initState="idle"),this.clearInitTimers(),this.socket._emit("disconnect",e)}),this._socket.on("schemas",e=>{this.handleSchemasPayload(e)}),this._socket.on("message",e=>{this.socket._emit("message",Cs(e))})}hasActorId(e){return"actor"in e&&e.actor!==null&&typeof e.actor=="object"&&"id"in e.actor&&typeof e.actor.id=="string"}replay(e,r){for(const n of r.values()){const a=Cs(n);let c=a==null?void 0:a.id;if(this.hasActorId(a)){const s=a.actor;c=typeof s=="string"?s:s.id}this.log(`replaying ${e} for ${c}`),this._socket.emit(e,a)}}}(t=>{t.SockethubClient=Ur})(typeof globalThis=="object"?globalThis:{});const xt=Object.create(null);xt.open="0";xt.close="1";xt.ping="2";xt.pong="3";xt.message="4";xt.upgrade="5";xt.noop="6";const zn=Object.create(null);Object.keys(xt).forEach(t=>{zn[xt[t]]=t});const Ys={type:"error",data:"parser error"},ac=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",ic=typeof ArrayBuffer=="function",oc=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,wa=({type:t,data:e},r,n)=>ac&&e instanceof Blob?r?n(e):Ja(e,n):ic&&(e instanceof ArrayBuffer||oc(e))?r?n(e):Ja(new Blob([e]),n):n(xt[t]+(e||"")),Ja=(t,e)=>{const r=new FileReader;return r.onload=function(){const n=r.result.split(",")[1];e("b"+(n||""))},r.readAsDataURL(t)};function Qa(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let As;function eh(t,e){if(ac&&t.data instanceof Blob)return t.data.arrayBuffer().then(Qa).then(e);if(ic&&(t.data instanceof ArrayBuffer||oc(t.data)))return e(Qa(t.data));wa(t,!1,r=>{As||(As=new TextEncoder),e(As.encode(r))})}const Xa="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Mr=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<Xa.length;t++)Mr[Xa.charCodeAt(t)]=t;const th=t=>{let e=t.length*.75,r=t.length,n,a=0,c,s,u,o;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const y=new ArrayBuffer(e),f=new Uint8Array(y);for(n=0;n<r;n+=4)c=Mr[t.charCodeAt(n)],s=Mr[t.charCodeAt(n+1)],u=Mr[t.charCodeAt(n+2)],o=Mr[t.charCodeAt(n+3)],f[a++]=c<<2|s>>4,f[a++]=(s&15)<<4|u>>2,f[a++]=(u&3)<<6|o&63;return y},rh=typeof ArrayBuffer=="function",$a=(t,e)=>{if(typeof t!="string")return{type:"message",data:cc(t,e)};const r=t.charAt(0);return r==="b"?{type:"message",data:nh(t.substring(1),e)}:zn[r]?t.length>1?{type:zn[r],data:t.substring(1)}:{type:zn[r]}:Ys},nh=(t,e)=>{if(rh){const r=th(t);return cc(r,e)}else return{base64:!0,data:t}},cc=(t,e)=>{switch(e){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},uc="",sh=(t,e)=>{const r=t.length,n=new Array(r);let a=0;t.forEach((c,s)=>{wa(c,!1,u=>{n[s]=u,++a===r&&e(n.join(uc))})})},ah=(t,e)=>{const r=t.split(uc),n=[];for(let a=0;a<r.length;a++){const c=$a(r[a],e);if(n.push(c),c.type==="error")break}return n};function ih(){return new TransformStream({transform(t,e){eh(t,r=>{const n=r.length;let a;if(n<126)a=new Uint8Array(1),new DataView(a.buffer).setUint8(0,n);else if(n<65536){a=new Uint8Array(3);const c=new DataView(a.buffer);c.setUint8(0,126),c.setUint16(1,n)}else{a=new Uint8Array(9);const c=new DataView(a.buffer);c.setUint8(0,127),c.setBigUint64(1,BigInt(n))}t.data&&typeof t.data!="string"&&(a[0]|=128),e.enqueue(a),e.enqueue(r)})}})}let js;function Yr(t){return t.reduce((e,r)=>e+r.length,0)}function Zr(t,e){if(t[0].length===e)return t.shift();const r=new Uint8Array(e);let n=0;for(let a=0;a<e;a++)r[a]=t[0][n++],n===t[0].length&&(t.shift(),n=0);return t.length&&n<t[0].length&&(t[0]=t[0].slice(n)),r}function oh(t,e){js||(js=new TextDecoder);const r=[];let n=0,a=-1,c=!1;return new TransformStream({transform(s,u){for(r.push(s);;){if(n===0){if(Yr(r)<1)break;const o=Zr(r,1);c=(o[0]&128)===128,a=o[0]&127,a<126?n=3:a===126?n=1:n=2}else if(n===1){if(Yr(r)<2)break;const o=Zr(r,2);a=new DataView(o.buffer,o.byteOffset,o.length).getUint16(0),n=3}else if(n===2){if(Yr(r)<8)break;const o=Zr(r,8),y=new DataView(o.buffer,o.byteOffset,o.length),f=y.getUint32(0);if(f>Math.pow(2,21)-1){u.enqueue(Ys);break}a=f*Math.pow(2,32)+y.getUint32(4),n=3}else{if(Yr(r)<a)break;const o=Zr(r,a);u.enqueue($a(c?o:js.decode(o),e)),n=0}if(a===0||a>t){u.enqueue(Ys);break}}}})}const lc=4;function ht(t){if(t)return ch(t)}function ch(t){for(var e in ht.prototype)t[e]=ht.prototype[e];return t}ht.prototype.on=ht.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};ht.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this};ht.prototype.off=ht.prototype.removeListener=ht.prototype.removeAllListeners=ht.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+t];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var n,a=0;a<r.length;a++)if(n=r[a],n===e||n.fn===e){r.splice(a,1);break}return r.length===0&&delete this._callbacks["$"+t],this};ht.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),r=this._callbacks["$"+t],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(r){r=r.slice(0);for(var n=0,a=r.length;n<a;++n)r[n].apply(this,e)}return this};ht.prototype.emitReserved=ht.prototype.emit;ht.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};ht.prototype.hasListeners=function(t){return!!this.listeners(t).length};const ds=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,r)=>r(e,0),jt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),uh="arraybuffer";function fc(t,...e){return e.reduce((r,n)=>(t.hasOwnProperty(n)&&(r[n]=t[n]),r),{})}const lh=jt.setTimeout,fh=jt.clearTimeout;function hs(t,e){e.useNativeTimers?(t.setTimeoutFn=lh.bind(jt),t.clearTimeoutFn=fh.bind(jt)):(t.setTimeoutFn=jt.setTimeout.bind(jt),t.clearTimeoutFn=jt.clearTimeout.bind(jt))}const dh=1.33;function hh(t){return typeof t=="string"?ph(t):Math.ceil((t.byteLength||t.size)*dh)}function ph(t){let e=0,r=0;for(let n=0,a=t.length;n<a;n++)e=t.charCodeAt(n),e<128?r+=1:e<2048?r+=2:e<55296||e>=57344?r+=3:(n++,r+=4);return r}function dc(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function mh(t){let e="";for(let r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}function gh(t){let e={},r=t.split("&");for(let n=0,a=r.length;n<a;n++){let c=r[n].split("=");e[decodeURIComponent(c[0])]=decodeURIComponent(c[1])}return e}class yh extends Error{constructor(e,r,n){super(e),this.description=r,this.context=n,this.type="TransportError"}}class ba extends ht{constructor(e){super(),this.writable=!1,hs(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,r,n){return super.emitReserved("error",new yh(e,r,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const r=$a(e,this.socket.binaryType);this.onPacket(r)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,r={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(r)}_hostname(){const e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){const r=mh(e);return r.length?"?"+r:""}}class vh extends ba{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";const r=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let n=0;this._polling&&(n++,this.once("pollComplete",function(){--n||r()})),this.writable||(n++,this.once("drain",function(){--n||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const r=n=>{if(this.readyState==="opening"&&n.type==="open"&&this.onOpen(),n.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(n)};ah(e,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,sh(e,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=dc()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(e,r)}}let hc=!1;try{hc=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const _h=hc;function wh(){}class $h extends vh{constructor(e){if(super(e),typeof location<"u"){const r=location.protocol==="https:";let n=location.port;n||(n=r?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||n!==e.port}}doWrite(e,r){const n=this.request({method:"POST",data:e});n.on("success",r),n.on("error",(a,c)=>{this.onError("xhr post error",a,c)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(r,n)=>{this.onError("xhr poll error",r,n)}),this.pollXhr=e}}class Gt extends ht{constructor(e,r,n){super(),this.createRequest=e,hs(this,n),this._opts=n,this._method=n.method||"GET",this._uri=r,this._data=n.data!==void 0?n.data:null,this._create()}_create(){var e;const r=fc(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;const n=this._xhr=this.createRequest(r);try{n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let a in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(a)&&n.setRequestHeader(a,this._opts.extraHeaders[a])}}catch{}if(this._method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(n),"withCredentials"in n&&(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var a;n.readyState===3&&((a=this._opts.cookieJar)===null||a===void 0||a.parseCookies(n.getResponseHeader("set-cookie"))),n.readyState===4&&(n.status===200||n.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof n.status=="number"?n.status:0)},0))},n.send(this._data)}catch(a){this.setTimeoutFn(()=>{this._onError(a)},0);return}typeof document<"u"&&(this._index=Gt.requestsCount++,Gt.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=wh,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Gt.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Gt.requestsCount=0;Gt.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Ya);else if(typeof addEventListener=="function"){const t="onpagehide"in jt?"pagehide":"unload";addEventListener(t,Ya,!1)}}function Ya(){for(let t in Gt.requests)Gt.requests.hasOwnProperty(t)&&Gt.requests[t].abort()}const bh=function(){const t=pc({xdomain:!1});return t&&t.responseType!==null}();class Eh extends $h{constructor(e){super(e);const r=e&&e.forceBase64;this.supportsBinary=bh&&!r}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new Gt(pc,this.uri(),e)}}function pc(t){const e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||_h))return new XMLHttpRequest}catch{}if(!e)try{return new jt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const mc=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Sh extends ba{get name(){return"websocket"}doOpen(){const e=this.uri(),r=this.opts.protocols,n=mc?{}:fc(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,r,n)}catch(a){return this.emitReserved("error",a)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let r=0;r<e.length;r++){const n=e[r],a=r===e.length-1;wa(n,this.supportsBinary,c=>{try{this.doWrite(n,c)}catch{}a&&ds(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=dc()),this.supportsBinary||(r.b64=1),this.createUri(e,r)}}const Ms=jt.WebSocket||jt.MozWebSocket;class Ph extends Sh{createSocket(e,r,n){return mc?new Ms(e,r,n):r?new Ms(e,r):new Ms(e)}doWrite(e,r){this.ws.send(r)}}class kh extends ba{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const r=oh(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=e.readable.pipeThrough(r).getReader(),a=ih();a.readable.pipeTo(e.writable),this._writer=a.writable.getWriter();const c=()=>{n.read().then(({done:u,value:o})=>{u||(this.onPacket(o),c())}).catch(u=>{})};c();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this._writer.write(s).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let r=0;r<e.length;r++){const n=e[r],a=r===e.length-1;this._writer.write(n).then(()=>{a&&ds(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}const Oh={websocket:Ph,webtransport:kh,polling:Eh},Nh=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Rh=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Zs(t){if(t.length>8e3)throw"URI too long";const e=t,r=t.indexOf("["),n=t.indexOf("]");r!=-1&&n!=-1&&(t=t.substring(0,r)+t.substring(r,n).replace(/:/g,";")+t.substring(n,t.length));let a=Nh.exec(t||""),c={},s=14;for(;s--;)c[Rh[s]]=a[s]||"";return r!=-1&&n!=-1&&(c.source=e,c.host=c.host.substring(1,c.host.length-1).replace(/;/g,":"),c.authority=c.authority.replace("[","").replace("]","").replace(/;/g,":"),c.ipv6uri=!0),c.pathNames=Th(c,c.path),c.queryKey=Ih(c,c.query),c}function Th(t,e){const r=/\/{2,9}/g,n=e.replace(r,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&n.splice(0,1),e.slice(-1)=="/"&&n.splice(n.length-1,1),n}function Ih(t,e){const r={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,a,c){a&&(r[a]=c)}),r}const ea=typeof addEventListener=="function"&&typeof removeEventListener=="function",Fn=[];ea&&addEventListener("offline",()=>{Fn.forEach(t=>t())},!1);class cr extends ht{constructor(e,r){if(super(),this.binaryType=uh,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(r=e,e=null),e){const n=Zs(e);r.hostname=n.host,r.secure=n.protocol==="https"||n.protocol==="wss",r.port=n.port,n.query&&(r.query=n.query)}else r.host&&(r.hostname=Zs(r.host).host);hs(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},r.transports.forEach(n=>{const a=n.prototype.name;this.transports.push(a),this._transportsByName[a]=n}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=gh(this.opts.query)),ea&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Fn.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const r=Object.assign({},this.opts.query);r.EIO=lc,r.transport=e,this.id&&(r.sid=this.id);const n=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const e=this.opts.rememberUpgrade&&cr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const r=this.createTransport(e);r.open(),this.setTransport(r)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",r=>this._onClose("transport close",r))}onOpen(){this.readyState="open",cr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const r=new Error("server error");r.code=e.data,this._onError(r);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let n=0;n<this.writeBuffer.length;n++){const a=this.writeBuffer[n].data;if(a&&(r+=hh(a)),n>0&&r>this._maxPayload)return this.writeBuffer.slice(0,n);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,ds(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,r,n){return this._sendPacket("message",e,r,n),this}send(e,r,n){return this._sendPacket("message",e,r,n),this}_sendPacket(e,r,n,a){if(typeof r=="function"&&(a=r,r=void 0),typeof n=="function"&&(a=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;const c={type:e,data:r,options:n};this.emitReserved("packetCreate",c),this.writeBuffer.push(c),a&&this.once("flush",a),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),e()},n=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():e()}):this.upgrading?n():e()),this}_onError(e){if(cr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),ea&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const n=Fn.indexOf(this._offlineEventListener);n!==-1&&Fn.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,r),this.writeBuffer=[],this._prevBufferLen=0}}}cr.protocol=lc;class Ch extends cr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let r=this.createTransport(e),n=!1;cr.priorWebsocketSuccess=!1;const a=()=>{n||(r.send([{type:"ping",data:"probe"}]),r.once("packet",w=>{if(!n)if(w.type==="pong"&&w.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;cr.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{n||this.readyState!=="closed"&&(f(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{const $=new Error("probe error");$.transport=r.name,this.emitReserved("upgradeError",$)}}))};function c(){n||(n=!0,f(),r.close(),r=null)}const s=w=>{const $=new Error("probe error: "+w);$.transport=r.name,c(),this.emitReserved("upgradeError",$)};function u(){s("transport closed")}function o(){s("socket closed")}function y(w){r&&w.name!==r.name&&c()}const f=()=>{r.removeListener("open",a),r.removeListener("error",s),r.removeListener("close",u),this.off("close",o),this.off("upgrading",y)};r.once("open",a),r.once("error",s),r.once("close",u),this.once("close",o),this.once("upgrading",y),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{n||r.open()},200):r.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const r=[];for(let n=0;n<e.length;n++)~this.transports.indexOf(e[n])&&r.push(e[n]);return r}}let Ah=class extends Ch{constructor(e,r={}){const n=typeof e=="object"?e:r;(!n.transports||n.transports&&typeof n.transports[0]=="string")&&(n.transports=(n.transports||["polling","websocket","webtransport"]).map(a=>Oh[a]).filter(a=>!!a)),super(e,n)}};function jh(t,e="",r){let n=t;r=r||typeof location<"u"&&location,t==null&&(t=r.protocol+"//"+r.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=r.protocol+t:t=r.host+t),/^(https?|wss?):\/\//.test(t)||(typeof r<"u"?t=r.protocol+"//"+t:t="https://"+t),n=Zs(t)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const c=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+c+":"+n.port+e,n.href=n.protocol+"://"+c+(r&&r.port===n.port?"":":"+n.port),n}const Mh=typeof ArrayBuffer=="function",Dh=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,gc=Object.prototype.toString,qh=typeof Blob=="function"||typeof Blob<"u"&&gc.call(Blob)==="[object BlobConstructor]",Vh=typeof File=="function"||typeof File<"u"&&gc.call(File)==="[object FileConstructor]";function Ea(t){return Mh&&(t instanceof ArrayBuffer||Dh(t))||qh&&t instanceof Blob||Vh&&t instanceof File}function Kn(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let r=0,n=t.length;r<n;r++)if(Kn(t[r]))return!0;return!1}if(Ea(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return Kn(t.toJSON(),!0);for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&Kn(t[r]))return!0;return!1}function Lh(t){const e=[],r=t.data,n=t;return n.data=ta(r,e),n.attachments=e.length,{packet:n,buffers:e}}function ta(t,e){if(!t)return t;if(Ea(t)){const r={_placeholder:!0,num:e.length};return e.push(t),r}else if(Array.isArray(t)){const r=new Array(t.length);for(let n=0;n<t.length;n++)r[n]=ta(t[n],e);return r}else if(typeof t=="object"&&!(t instanceof Date)){const r={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=ta(t[n],e));return r}return t}function Uh(t,e){return t.data=ra(t.data,e),delete t.attachments,t}function ra(t,e){if(!t)return t;if(t&&t._placeholder===!0){if(typeof t.num=="number"&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}else if(Array.isArray(t))for(let r=0;r<t.length;r++)t[r]=ra(t[r],e);else if(typeof t=="object")for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=ra(t[r],e));return t}const zh=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Fh=5;var Ue;(function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"})(Ue||(Ue={}));class Kh{constructor(e){this.replacer=e}encode(e){return(e.type===Ue.EVENT||e.type===Ue.ACK)&&Kn(e)?this.encodeAsBinary({type:e.type===Ue.EVENT?Ue.BINARY_EVENT:Ue.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let r=""+e.type;return(e.type===Ue.BINARY_EVENT||e.type===Ue.BINARY_ACK)&&(r+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(r+=e.nsp+","),e.id!=null&&(r+=e.id),e.data!=null&&(r+=JSON.stringify(e.data,this.replacer)),r}encodeAsBinary(e){const r=Lh(e),n=this.encodeAsString(r.packet),a=r.buffers;return a.unshift(n),a}}function Za(t){return Object.prototype.toString.call(t)==="[object Object]"}class Sa extends ht{constructor(e){super(),this.reviver=e}add(e){let r;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(e);const n=r.type===Ue.BINARY_EVENT;n||r.type===Ue.BINARY_ACK?(r.type=n?Ue.EVENT:Ue.ACK,this.reconstructor=new Hh(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(Ea(e)||e.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(e),r&&(this.reconstructor=null,super.emitReserved("decoded",r));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let r=0;const n={type:Number(e.charAt(0))};if(Ue[n.type]===void 0)throw new Error("unknown packet type "+n.type);if(n.type===Ue.BINARY_EVENT||n.type===Ue.BINARY_ACK){const c=r+1;for(;e.charAt(++r)!=="-"&&r!=e.length;);const s=e.substring(c,r);if(s!=Number(s)||e.charAt(r)!=="-")throw new Error("Illegal attachments");n.attachments=Number(s)}if(e.charAt(r+1)==="/"){const c=r+1;for(;++r&&!(e.charAt(r)===","||r===e.length););n.nsp=e.substring(c,r)}else n.nsp="/";const a=e.charAt(r+1);if(a!==""&&Number(a)==a){const c=r+1;for(;++r;){const s=e.charAt(r);if(s==null||Number(s)!=s){--r;break}if(r===e.length)break}n.id=Number(e.substring(c,r+1))}if(e.charAt(++r)){const c=this.tryParse(e.substr(r));if(Sa.isPayloadValid(n.type,c))n.data=c;else throw new Error("invalid payload")}return n}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,r){switch(e){case Ue.CONNECT:return Za(r);case Ue.DISCONNECT:return r===void 0;case Ue.CONNECT_ERROR:return typeof r=="string"||Za(r);case Ue.EVENT:case Ue.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&zh.indexOf(r[0])===-1);case Ue.ACK:case Ue.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Hh{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const r=Uh(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Bh=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Sa,Encoder:Kh,get PacketType(){return Ue},protocol:Fh},Symbol.toStringTag,{value:"Module"}));function Vt(t,e,r){return t.on(e,r),function(){t.off(e,r)}}const Gh=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class yc extends ht{constructor(e,r,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=r,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[Vt(e,"open",this.onopen.bind(this)),Vt(e,"packet",this.onpacket.bind(this)),Vt(e,"error",this.onerror.bind(this)),Vt(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...r){var n,a,c;if(Gh.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(r.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(r),this;const s={type:Ue.EVENT,data:r};if(s.options={},s.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){const f=this.ids++,w=r.pop();this._registerAckCallback(f,w),s.id=f}const u=(a=(n=this.io.engine)===null||n===void 0?void 0:n.transport)===null||a===void 0?void 0:a.writable,o=this.connected&&!(!((c=this.io.engine)===null||c===void 0)&&c._hasPingExpired());return this.flags.volatile&&!u||(o?(this.notifyOutgoingListeners(s),this.packet(s)):this.sendBuffer.push(s)),this.flags={},this}_registerAckCallback(e,r){var n;const a=(n=this.flags.timeout)!==null&&n!==void 0?n:this._opts.ackTimeout;if(a===void 0){this.acks[e]=r;return}const c=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let u=0;u<this.sendBuffer.length;u++)this.sendBuffer[u].id===e&&this.sendBuffer.splice(u,1);r.call(this,new Error("operation has timed out"))},a),s=(...u)=>{this.io.clearTimeoutFn(c),r.apply(this,u)};s.withError=!0,this.acks[e]=s}emitWithAck(e,...r){return new Promise((n,a)=>{const c=(s,u)=>s?a(s):n(u);c.withError=!0,r.push(c),this.emit(e,...r)})}_addToQueue(e){let r;typeof e[e.length-1]=="function"&&(r=e.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((a,...c)=>(this._queue[0],a!==null?n.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(a)):(this._queue.shift(),r&&r(null,...c)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const r=this._queue[0];r.pending&&!e||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:Ue.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(n=>String(n.id)===e)){const n=this.acks[e];delete this.acks[e],n.withError&&n.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case Ue.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ue.EVENT:case Ue.BINARY_EVENT:this.onevent(e);break;case Ue.ACK:case Ue.BINARY_ACK:this.onack(e);break;case Ue.DISCONNECT:this.ondisconnect();break;case Ue.CONNECT_ERROR:this.destroy();const n=new Error(e.data.message);n.data=e.data.data,this.emitReserved("connect_error",n);break}}onevent(e){const r=e.data||[];e.id!=null&&r.push(this.ack(e.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const r=this._anyListeners.slice();for(const n of r)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const r=this;let n=!1;return function(...a){n||(n=!0,r.packet({type:Ue.ACK,id:e,data:a}))}}onack(e){const r=this.acks[e.id];typeof r=="function"&&(delete this.acks[e.id],r.withError&&e.data.unshift(null),r.apply(this,e.data))}onconnect(e,r){this.id=e,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ue.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const r=this._anyListeners;for(let n=0;n<r.length;n++)if(e===r[n])return r.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const r=this._anyOutgoingListeners;for(let n=0;n<r.length;n++)if(e===r[n])return r.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const r=this._anyOutgoingListeners.slice();for(const n of r)n.apply(this,e.data)}}}function Sr(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}Sr.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),r=Math.floor(e*this.jitter*t);t=(Math.floor(e*10)&1)==0?t-r:t+r}return Math.min(t,this.max)|0};Sr.prototype.reset=function(){this.attempts=0};Sr.prototype.setMin=function(t){this.ms=t};Sr.prototype.setMax=function(t){this.max=t};Sr.prototype.setJitter=function(t){this.jitter=t};class na extends ht{constructor(e,r){var n;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(r=e,e=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,hs(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((n=r.randomizationFactor)!==null&&n!==void 0?n:.5),this.backoff=new Sr({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=e;const a=r.parser||Bh;this.encoder=new a.Encoder,this.decoder=new a.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var r;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(r=this.backoff)===null||r===void 0||r.setMin(e),this)}randomizationFactor(e){var r;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(r=this.backoff)===null||r===void 0||r.setJitter(e),this)}reconnectionDelayMax(e){var r;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(r=this.backoff)===null||r===void 0||r.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new Ah(this.uri,this.opts);const r=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const a=Vt(r,"open",function(){n.onopen(),e&&e()}),c=u=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",u),e?e(u):this.maybeReconnectOnOpen()},s=Vt(r,"error",c);if(this._timeout!==!1){const u=this._timeout,o=this.setTimeoutFn(()=>{a(),c(new Error("timeout")),r.close()},u);this.opts.autoUnref&&o.unref(),this.subs.push(()=>{this.clearTimeoutFn(o)})}return this.subs.push(a),this.subs.push(s),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(Vt(e,"ping",this.onping.bind(this)),Vt(e,"data",this.ondata.bind(this)),Vt(e,"error",this.onerror.bind(this)),Vt(e,"close",this.onclose.bind(this)),Vt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(r){this.onclose("parse error",r)}}ondecoded(e){ds(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,r){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new yc(this,e,r),this.nsps[e]=n),n}_destroy(e){const r=Object.keys(this.nsps);for(const n of r)if(this.nsps[n].active)return;this._close()}_packet(e){const r=this.encoder.encode(e);for(let n=0;n<r.length;n++)this.engine.write(r[n],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,r){var n;this.cleanup(),(n=this.engine)===null||n===void 0||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const r=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(a=>{a?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",a)):e.onreconnect()}))},r);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const Rr={};function Hn(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const r=jh(t,e.path||"/socket.io"),n=r.source,a=r.id,c=r.path,s=Rr[a]&&c in Rr[a].nsps,u=e.forceNew||e["force new connection"]||e.multiplex===!1||s;let o;return u?o=new na(n,e):(Rr[a]||(Rr[a]=new na(n,e)),o=Rr[a]),r.query&&!e.query&&(e.query=r.queryKey),o.socket(r.path,e)}Object.assign(Hn,{Manager:na,Socket:yc,io:Hn,connect:Hn});var en={exports:{}},Ds={},Xt={},mr={},qs={},Vs={},Ls={},ei;function ts(){return ei||(ei=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends e{constructor(d){if(super(),!t.IDENTIFIER.test(d))throw new Error("CodeGen: name must be a valid identifier");this.str=d}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=r;class n extends e{constructor(d){super(),this._items=typeof d=="string"?[d]:d}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const d=this._items[0];return d===""||d==='""'}get str(){var d;return(d=this._str)!==null&&d!==void 0?d:this._str=this._items.reduce((l,_)=>`${l}${_}`,"")}get names(){var d;return(d=this._names)!==null&&d!==void 0?d:this._names=this._items.reduce((l,_)=>(_ instanceof r&&(l[_.str]=(l[_.str]||0)+1),l),{})}}t._Code=n,t.nil=new n("");function a(i,...d){const l=[i[0]];let _=0;for(;_<d.length;)u(l,d[_]),l.push(i[++_]);return new n(l)}t._=a;const c=new n("+");function s(i,...d){const l=[E(i[0])];let _=0;for(;_<d.length;)l.push(c),u(l,d[_]),l.push(c,E(i[++_]));return o(l),new n(l)}t.str=s;function u(i,d){d instanceof n?i.push(...d._items):d instanceof r?i.push(d):i.push(w(d))}t.addCodeArg=u;function o(i){let d=1;for(;d<i.length-1;){if(i[d]===c){const l=y(i[d-1],i[d+1]);if(l!==void 0){i.splice(d-1,3,l);continue}i[d++]="+"}d++}}function y(i,d){if(d==='""')return i;if(i==='""')return d;if(typeof i=="string")return d instanceof r||i[i.length-1]!=='"'?void 0:typeof d!="string"?`${i.slice(0,-1)}${d}"`:d[0]==='"'?i.slice(0,-1)+d.slice(1):void 0;if(typeof d=="string"&&d[0]==='"'&&!(i instanceof r))return`"${i}${d.slice(1)}`}function f(i,d){return d.emptyStr()?i:i.emptyStr()?d:s`${i}${d}`}t.strConcat=f;function w(i){return typeof i=="number"||typeof i=="boolean"||i===null?i:E(Array.isArray(i)?i.join(","):i)}function $(i){return new n(E(i))}t.stringify=$;function E(i){return JSON.stringify(i).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=E;function b(i){return typeof i=="string"&&t.IDENTIFIER.test(i)?new n(`.${i}`):a`[${i}]`}t.getProperty=b;function S(i){if(typeof i=="string"&&t.IDENTIFIER.test(i))return new n(`${i}`);throw new Error(`CodeGen: invalid export name: ${i}, use explicit $id name mapping`)}t.getEsmExportName=S;function h(i){return new n(i.toString())}t.regexpCode=h}(Ls)),Ls}var Us={},ti;function ri(){return ti||(ti=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const e=ts();class r extends Error{constructor(y){super(`CodeGen: "code" for ${y} not defined`),this.value=y.value}}var n;(function(o){o[o.Started=0]="Started",o[o.Completed=1]="Completed"})(n||(t.UsedValueState=n={})),t.varKinds={const:new e.Name("const"),let:new e.Name("let"),var:new e.Name("var")};class a{constructor({prefixes:y,parent:f}={}){this._names={},this._prefixes=y,this._parent=f}toName(y){return y instanceof e.Name?y:this.name(y)}name(y){return new e.Name(this._newName(y))}_newName(y){const f=this._names[y]||this._nameGroup(y);return`${y}${f.index++}`}_nameGroup(y){var f,w;if(!((w=(f=this._parent)===null||f===void 0?void 0:f._prefixes)===null||w===void 0)&&w.has(y)||this._prefixes&&!this._prefixes.has(y))throw new Error(`CodeGen: prefix "${y}" is not allowed in this scope`);return this._names[y]={prefix:y,index:0}}}t.Scope=a;class c extends e.Name{constructor(y,f){super(f),this.prefix=y}setValue(y,{property:f,itemIndex:w}){this.value=y,this.scopePath=(0,e._)`.${new e.Name(f)}[${w}]`}}t.ValueScopeName=c;const s=(0,e._)`\n`;class u extends a{constructor(y){super(y),this._values={},this._scope=y.scope,this.opts={...y,_n:y.lines?s:e.nil}}get(){return this._scope}name(y){return new c(y,this._newName(y))}value(y,f){var w;if(f.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const $=this.toName(y),{prefix:E}=$,b=(w=f.key)!==null&&w!==void 0?w:f.ref;let S=this._values[E];if(S){const d=S.get(b);if(d)return d}else S=this._values[E]=new Map;S.set(b,$);const h=this._scope[E]||(this._scope[E]=[]),i=h.length;return h[i]=f.ref,$.setValue(f,{property:E,itemIndex:i}),$}getValue(y,f){const w=this._values[y];if(w)return w.get(f)}scopeRefs(y,f=this._values){return this._reduceValues(f,w=>{if(w.scopePath===void 0)throw new Error(`CodeGen: name "${w}" has no value`);return(0,e._)`${y}${w.scopePath}`})}scopeCode(y=this._values,f,w){return this._reduceValues(y,$=>{if($.value===void 0)throw new Error(`CodeGen: name "${$}" has no value`);return $.value.code},f,w)}_reduceValues(y,f,w={},$){let E=e.nil;for(const b in y){const S=y[b];if(!S)continue;const h=w[b]=w[b]||new Map;S.forEach(i=>{if(h.has(i))return;h.set(i,n.Started);let d=f(i);if(d){const l=this.opts.es5?t.varKinds.var:t.varKinds.const;E=(0,e._)`${E}${l} ${i} = ${d};${this.opts._n}`}else if(d=$==null?void 0:$(i))E=(0,e._)`${E}${d}${this.opts._n}`;else throw new r(i);h.set(i,n.Completed)})}return E}}t.ValueScope=u}(Us)),Us}var ni;function qe(){return ni||(ni=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const e=ts(),r=ri();var n=ts();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return n.Name}});var a=ri();Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return a.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return a.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return a.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return a.varKinds}}),t.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class c{optimizeNodes(){return this}optimizeNames(p,P){return this}}class s extends c{constructor(p,P,C){super(),this.varKind=p,this.name=P,this.rhs=C}render({es5:p,_n:P}){const C=p?r.varKinds.var:this.varKind,B=this.rhs===void 0?"":` = ${this.rhs}`;return`${C} ${this.name}${B};`+P}optimizeNames(p,P){if(p[this.name.str])return this.rhs&&(this.rhs=x(this.rhs,p,P)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class u extends c{constructor(p,P,C){super(),this.lhs=p,this.rhs=P,this.sideEffects=C}render({_n:p}){return`${this.lhs} = ${this.rhs};`+p}optimizeNames(p,P){if(!(this.lhs instanceof e.Name&&!p[this.lhs.str]&&!this.sideEffects))return this.rhs=x(this.rhs,p,P),this}get names(){const p=this.lhs instanceof e.Name?{}:{...this.lhs.names};return W(p,this.rhs)}}class o extends u{constructor(p,P,C,B){super(p,C,B),this.op=P}render({_n:p}){return`${this.lhs} ${this.op}= ${this.rhs};`+p}}class y extends c{constructor(p){super(),this.label=p,this.names={}}render({_n:p}){return`${this.label}:`+p}}class f extends c{constructor(p){super(),this.label=p,this.names={}}render({_n:p}){return`break${this.label?` ${this.label}`:""};`+p}}class w extends c{constructor(p){super(),this.error=p}render({_n:p}){return`throw ${this.error};`+p}get names(){return this.error.names}}class $ extends c{constructor(p){super(),this.code=p}render({_n:p}){return`${this.code};`+p}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(p,P){return this.code=x(this.code,p,P),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class E extends c{constructor(p=[]){super(),this.nodes=p}render(p){return this.nodes.reduce((P,C)=>P+C.render(p),"")}optimizeNodes(){const{nodes:p}=this;let P=p.length;for(;P--;){const C=p[P].optimizeNodes();Array.isArray(C)?p.splice(P,1,...C):C?p[P]=C:p.splice(P,1)}return p.length>0?this:void 0}optimizeNames(p,P){const{nodes:C}=this;let B=C.length;for(;B--;){const G=C[B];G.optimizeNames(p,P)||(te(p,G.names),C.splice(B,1))}return C.length>0?this:void 0}get names(){return this.nodes.reduce((p,P)=>q(p,P.names),{})}}class b extends E{render(p){return"{"+p._n+super.render(p)+"}"+p._n}}class S extends E{}class h extends b{}h.kind="else";class i extends b{constructor(p,P){super(P),this.condition=p}render(p){let P=`if(${this.condition})`+super.render(p);return this.else&&(P+="else "+this.else.render(p)),P}optimizeNodes(){super.optimizeNodes();const p=this.condition;if(p===!0)return this.nodes;let P=this.else;if(P){const C=P.optimizeNodes();P=this.else=Array.isArray(C)?new h(C):C}if(P)return p===!1?P instanceof i?P:P.nodes:this.nodes.length?this:new i(ue(p),P instanceof i?[P]:P.nodes);if(!(p===!1||!this.nodes.length))return this}optimizeNames(p,P){var C;if(this.else=(C=this.else)===null||C===void 0?void 0:C.optimizeNames(p,P),!!(super.optimizeNames(p,P)||this.else))return this.condition=x(this.condition,p,P),this}get names(){const p=super.names;return W(p,this.condition),this.else&&q(p,this.else.names),p}}i.kind="if";class d extends b{}d.kind="for";class l extends d{constructor(p){super(),this.iteration=p}render(p){return`for(${this.iteration})`+super.render(p)}optimizeNames(p,P){if(super.optimizeNames(p,P))return this.iteration=x(this.iteration,p,P),this}get names(){return q(super.names,this.iteration.names)}}class _ extends d{constructor(p,P,C,B){super(),this.varKind=p,this.name=P,this.from=C,this.to=B}render(p){const P=p.es5?r.varKinds.var:this.varKind,{name:C,from:B,to:G}=this;return`for(${P} ${C}=${B}; ${C}<${G}; ${C}++)`+super.render(p)}get names(){const p=W(super.names,this.from);return W(p,this.to)}}class m extends d{constructor(p,P,C,B){super(),this.loop=p,this.varKind=P,this.name=C,this.iterable=B}render(p){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(p)}optimizeNames(p,P){if(super.optimizeNames(p,P))return this.iterable=x(this.iterable,p,P),this}get names(){return q(super.names,this.iterable.names)}}class g extends b{constructor(p,P,C){super(),this.name=p,this.args=P,this.async=C}render(p){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(p)}}g.kind="func";class v extends E{render(p){return"return "+super.render(p)}}v.kind="return";class k extends b{render(p){let P="try"+super.render(p);return this.catch&&(P+=this.catch.render(p)),this.finally&&(P+=this.finally.render(p)),P}optimizeNodes(){var p,P;return super.optimizeNodes(),(p=this.catch)===null||p===void 0||p.optimizeNodes(),(P=this.finally)===null||P===void 0||P.optimizeNodes(),this}optimizeNames(p,P){var C,B;return super.optimizeNames(p,P),(C=this.catch)===null||C===void 0||C.optimizeNames(p,P),(B=this.finally)===null||B===void 0||B.optimizeNames(p,P),this}get names(){const p=super.names;return this.catch&&q(p,this.catch.names),this.finally&&q(p,this.finally.names),p}}class T extends b{constructor(p){super(),this.error=p}render(p){return`catch(${this.error})`+super.render(p)}}T.kind="catch";class j extends b{render(p){return"finally"+super.render(p)}}j.kind="finally";class V{constructor(p,P={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...P,_n:P.lines?`
|
|
36
|
+
from .`,reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4452"}]},{scheme:"ipp",description:"Internet Printing Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3510"}]},{scheme:"ipps",description:"Internet Printing Protocol over HTTPS",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7472"}]},{scheme:"iris",description:"Internet Registry Information Service",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3981"}]},{scheme:"iris.beep",description:"iris.beep",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3983"}]},{scheme:"iris.lwz",description:"iris.lwz",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4993"}]},{scheme:"iris.xpc",description:"iris.xpc",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4992"}]},{scheme:"iris.xpcs",description:"iris.xpcs",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4992"}]},{scheme:"jabber",description:"jabber",reference:[],template:"http://www.iana.org/assignments/uri-schemes/perm/jabber"},{scheme:"ldap",description:"Lightweight Directory Access Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4516"}]},{scheme:"mailto",description:"Electronic mail address",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6068"}]},{scheme:"mid",description:"message identifier",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2392"}]},{scheme:"msrp",description:"Message Session Relay Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4975"}]},{scheme:"msrps",description:"Message Session Relay Protocol Secure",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4975"}]},{scheme:"mtqp",description:"Message Tracking Query Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3887"}]},{scheme:"mupdate",description:"Mailbox Update (MUPDATE) Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3656"}]},{scheme:"news",description:"USENET news",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5538"}]},{scheme:"nfs",description:"network file system protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2224"}]},{scheme:"ni",description:"ni",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6920"}]},{scheme:"nih",description:"nih",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6920"}]},{scheme:"nntp",description:"USENET news using NNTP access",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5538"}]},{scheme:"opaquelocktoken",description:"opaquelocktokent",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4918"}]},{scheme:"pkcs11",description:"PKCS#11",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7512"}]},{scheme:"pop",description:"Post Office Protocol v3",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2384"}]},{scheme:"pres",description:"Presence",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3859"}]},{scheme:"reload",description:"reload",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6940"}]},{scheme:"rtsp",description:"Real-time Streaming Protocol (RTSP)",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2326"},{type:"draft",href:"http://www.iana.org/go/RFC-ietf-mmusic-rfc2326bis-40"}]},{scheme:"rtsps",description:"Real-time Streaming Protocol (RTSP) over TLS",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2326"},{type:"draft",href:"http://www.iana.org/go/RFC-ietf-mmusic-rfc2326bis-40"}]},{scheme:"rtspu",description:"Real-time Streaming Protocol (RTSP) over unreliable datagram transport",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2326"}]},{scheme:"service",description:"service location",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2609"}]},{scheme:"session",description:"session",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6787"}]},{scheme:"shttp",description:"Secure Hypertext Transfer Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2660"}]},{scheme:"sieve",description:"ManageSieve Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5804"}]},{scheme:"sip",description:"session initiation protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3261"}]},{scheme:"sips",description:"secure session initiation protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3261"}]},{scheme:"sms",description:"Short Message Service",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5724"}]},{scheme:"snmp",description:"Simple Network Management Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4088"}]},{scheme:"soap.beep",description:"soap.beep",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4227"}]},{scheme:"soap.beeps",description:"soap.beeps",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4227"}]},{scheme:"stun",description:"stun",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7064"}]},{scheme:"stuns",description:"stuns",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7064"}]},{scheme:"tag",description:"tag",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4151"}]},{scheme:"tel",description:"telephone",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3966"}]},{scheme:"telnet",description:"Reference to interactive sessions",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4248"}]},{scheme:"tftp",description:"Trivial File Transfer Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3617"}]},{scheme:"thismessage",description:"multipart/related relative reference resolution",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2557"}],template:"http://www.iana.org/assignments/uri-schemes/perm/thismessage"},{scheme:"tip",description:"Transaction Internet Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2371"}]},{scheme:"tn3270",description:"Interactive 3270 emulation sessions",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6270"}]},{scheme:"turn",description:"turn",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7065"}]},{scheme:"turns",description:"turns",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7065"}]},{scheme:"tv",description:"TV Broadcasts",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2838"}]},{scheme:"urn",description:"Uniform Resource Names",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2141"},{type:"registry",href:"http://www.iana.org/assignments/urn-namespaces"}]},{scheme:"vemmi",description:"versatile multimedia interface",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2122"}]},{scheme:"vnc",description:"Remote Framebuffer Protocol",reference:[{type:"draft",href:"http://www.iana.org/go/RFC-warden-appsawg-vnc-scheme-10"}]},{scheme:"ws",description:"WebSocket connections",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6455"}]},{scheme:"wss",description:"Encrypted WebSocket connections",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6455"}]},{scheme:"xcon",description:"xcon",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6501"}]},{scheme:"xcon-userid",description:"xcon-userid",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6501"}]},{scheme:"xmlrpc.beep",description:"xmlrpc.beep",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3529"}]},{scheme:"xmlrpc.beeps",description:"xmlrpc.beeps",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3529"}]},{scheme:"xmpp",description:"Extensible Messaging and Presence Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5122"}]},{scheme:"z39.50r",description:"Z39.50 Retrieval",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2056"}]},{scheme:"z39.50s",description:"Z39.50 Session",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2056"}]}]}),Qf=Q(function(t,e){e.exports=[{scheme:"acr",description:"acr",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/acr"},{scheme:"adiumxtra",description:"adiumxtra",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/adiumxtra"},{scheme:"afp",description:"afp",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/afp"},{scheme:"afs",description:"Andrew File System global file names",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc1738"}]},{scheme:"aim",description:"aim",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/aim"},{scheme:"appdata",description:"appdata",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/appdata"},{scheme:"apt",description:"apt",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/apt"},{scheme:"attachment",description:"attachment",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/attachment"},{scheme:"aw",description:"aw",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/aw"},{scheme:"barion",description:"barion",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/barion"},{scheme:"beshare",description:"beshare",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/beshare"},{scheme:"bitcoin",description:"bitcoin",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/bitcoin"},{scheme:"blob",description:"blob",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/blob"},{scheme:"bolo",description:"bolo",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/bolo"},{scheme:"callto",description:"callto",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/callto"},{scheme:"chrome",description:"chrome",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/chrome"},{scheme:"chrome-extension",description:"chrome-extension",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/chrome-extension"},{scheme:"com-eventbrite-attendee",description:"com-eventbrite-attendee",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/com-eventbrite-attendee"},{scheme:"content",description:"content",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/content"},{scheme:"cvs",description:"cvs",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/cvs"},{scheme:"dis",description:"dis",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/dis"},{scheme:"dlna-playcontainer",description:"dlna-playcontainer",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/dlna-playcontainer"},{scheme:"dlna-playsingle",description:"dlna-playsingle",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/dlna-playsingle"},{scheme:"dntp",description:"dntp",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/dntp"},{scheme:"dtn",description:"DTNRG research and development",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5050"}]},{scheme:"dvb",description:"dvb",reference:[{type:"draft",href:"http://www.iana.org/go/draft-mcroberts-uri-dvb"}]},{scheme:"ed2k",description:"ed2k",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ed2k"},{scheme:"facetime",description:"facetime",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/facetime"},{scheme:"feed",description:"feed",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/feed"},{scheme:"feedready",description:"feedready",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/feedready"},{scheme:"finger",description:"finger",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/finger"},{scheme:"fish",description:"fish",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/fish"},{scheme:"gg",description:"gg",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/gg"},{scheme:"git",description:"git",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/git"},{scheme:"gizmoproject",description:"gizmoproject",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/gizmoproject"},{scheme:"gtalk",description:"gtalk",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/gtalk"},{scheme:"ham",description:"ham",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7046"}]},{scheme:"hcp",description:"hcp",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/hcp"},{scheme:"icon",description:"icon",reference:[{type:"draft",href:"http://www.iana.org/go/draft-lafayette-icon-uri-scheme"}]},{scheme:"iotdisco",description:"iotdisco",reference:[{type:"uri",href:"http://www.iana.org/assignments/uri-schemes/prov/iotdisco.pdf"}],template:"http://www.iana.org/assignments/uri-schemes/prov/iotdisco"},{scheme:"ipn",description:"ipn",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6260"}]},{scheme:"irc",description:"irc",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/irc"},{scheme:"irc6",description:"irc6",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/irc6"},{scheme:"ircs",description:"ircs",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ircs"},{scheme:"isostore",description:"isostore",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/isostore"},{scheme:"itms",description:"itms",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/itms"},{scheme:"jar",description:"jar",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/jar"},{scheme:"jms",description:"Java Message Service",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6167"}]},{scheme:"keyparc",description:"keyparc",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/keyparc"},{scheme:"lastfm",description:"lastfm",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/lastfm"},{scheme:"ldaps",description:"ldaps",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ldaps"},{scheme:"magnet",description:"magnet",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/magnet"},{scheme:"maps",description:"maps",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/maps"},{scheme:"market",description:"market",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/market"},{scheme:"message",description:"message",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/message"},{scheme:"mms",description:"mms",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/mms"},{scheme:"ms-access",description:"ms-access",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-access"},{scheme:"ms-drive-to",description:"ms-drive-to",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-drive-to"},{scheme:"ms-enrollment",description:"ms-enrollment",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-enrollment"},{scheme:"ms-excel",description:"ms-excel",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-excel"},{scheme:"ms-getoffice",description:"ms-getoffice",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-getoffice"},{scheme:"ms-help",description:"ms-help",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-help"},{scheme:"ms-infopath",description:"ms-infopath",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-infopath"},{scheme:"ms-media-stream-id",description:"ms-media-stream-id",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-media-stream-id"},{scheme:"ms-powerpoint",description:"ms-powerpoint",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-powerpoint"},{scheme:"ms-project",description:"ms-project",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-project"},{scheme:"ms-publisher",description:"ms-publisher",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-publisher"},{scheme:"ms-search-repair",description:"ms-search-repair",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-search-repair"},{scheme:"ms-secondary-screen-controller",description:"ms-secondary-screen-controller",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-secondary-screen-controller"},{scheme:"ms-secondary-screen-setup",description:"ms-secondary-screen-setup",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-secondary-screen-setup"},{scheme:"ms-settings",description:"ms-settings",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings"},{scheme:"ms-settings-airplanemode",description:"ms-settings-airplanemode",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-airplanemode"},{scheme:"ms-settings-bluetooth",description:"ms-settings-bluetooth",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-bluetooth"},{scheme:"ms-settings-camera",description:"ms-settings-camera",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-camera"},{scheme:"ms-settings-cellular",description:"ms-settings-cellular",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-cellular"},{scheme:"ms-settings-cloudstorage",description:"ms-settings-cloudstorage",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-cloudstorage"},{scheme:"ms-settings-connectabledevices",description:"ms-settings-connectabledevices",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-connectabledevices"},{scheme:"ms-settings-displays-topology",description:"ms-settings-displays-topology",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-displays-topology"},{scheme:"ms-settings-emailandaccounts",description:"ms-settings-emailandaccounts",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-emailandaccounts"},{scheme:"ms-settings-language",description:"ms-settings-language",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-language"},{scheme:"ms-settings-location",description:"ms-settings-location",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-location"},{scheme:"ms-settings-lock",description:"ms-settings-lock",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-lock"},{scheme:"ms-settings-nfctransactions",description:"ms-settings-nfctransactions",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-nfctransactions"},{scheme:"ms-settings-notifications",description:"ms-settings-notifications",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-notifications"},{scheme:"ms-settings-power",description:"ms-settings-power",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-power"},{scheme:"ms-settings-privacy",description:"ms-settings-privacy",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-privacy"},{scheme:"ms-settings-proximity",description:"ms-settings-proximity",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-proximity"},{scheme:"ms-settings-screenrotation",description:"ms-settings-screenrotation",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-screenrotation"},{scheme:"ms-settings-wifi",description:"ms-settings-wifi",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-wifi"},{scheme:"ms-settings-workplace",description:"ms-settings-workplace",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-workplace"},{scheme:"ms-spd",description:"ms-spd",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-spd"},{scheme:"ms-transit-to",description:"ms-transit-to",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-transit-to"},{scheme:"ms-visio",description:"ms-visio",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-visio"},{scheme:"ms-walk-to",description:"ms-walk-to",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-walk-to"},{scheme:"ms-word",description:"ms-word",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-word"},{scheme:"msnim",description:"msnim",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/msnim"},{scheme:"mumble",description:"mumble",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/mumble"},{scheme:"mvn",description:"mvn",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/mvn"},{scheme:"notes",description:"notes",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/notes"},{scheme:"oid",description:"oid",reference:[{type:"draft",href:"http://www.iana.org/go/draft-larmouth-oid-iri"}],template:"http://www.iana.org/assignments/uri-schemes/prov/oid"},{scheme:"palm",description:"palm",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/palm"},{scheme:"paparazzi",description:"paparazzi",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/paparazzi"},{scheme:"platform",description:"platform",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/platform"},{scheme:"proxy",description:"proxy",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/proxy"},{scheme:"psyc",description:"psyc",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/psyc"},{scheme:"query",description:"query",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/query"},{scheme:"redis",description:"redis",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/redis"},{scheme:"rediss",description:"rediss",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/rediss"},{scheme:"res",description:"res",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/res"},{scheme:"resource",description:"resource",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/resource"},{scheme:"rmi",description:"rmi",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/rmi"},{scheme:"rsync",description:"rsync",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5781"}]},{scheme:"rtmfp",description:"rtmfp",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7425"}],template:"http://www.iana.org/assignments/uri-schemes/prov/rtmfp"},{scheme:"rtmp",description:"rtmp",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/rtmp"},{scheme:"secondlife",description:"query",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/secondlife"},{scheme:"sftp",description:"query",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/sftp"},{scheme:"sgn",description:"sgn",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/sgn"},{scheme:"skype",description:"skype",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/skype"},{scheme:"smb",description:"smb",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/smb"},{scheme:"smtp",description:"smtp",reference:[{type:"draft",href:"http://www.iana.org/go/draft-melnikov-smime-msa-to-mda"}],template:"http://www.iana.org/assignments/uri-schemes/prov/smtp"},{scheme:"soldat",description:"soldat",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/soldat"},{scheme:"spotify",description:"spotify",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/spotify"},{scheme:"ssh",description:"ssh",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ssh"},{scheme:"steam",description:"steam",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/steam"},{scheme:"submit",description:"submit",reference:[{type:"draft",href:"http://www.iana.org/go/draft-melnikov-smime-msa-to-mda"}],template:"http://www.iana.org/assignments/uri-schemes/prov/submit"},{scheme:"svn",description:"svn",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/svn"},{scheme:"teamspeak",description:"teamspeak",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/teamspeak"},{scheme:"teliaeid",description:"teliaeid",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/teliaeid"},{scheme:"things",description:"things",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/things"},{scheme:"tool",description:"tool",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/tool"},{scheme:"udp",description:"udp",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/udp"},{scheme:"unreal",description:"unreal",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/unreal"},{scheme:"ut2004",description:"ut2004",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ut2004"},{scheme:"v-event",description:"v-event",reference:[{type:"draft",href:"http://www.iana.org/go/draft-menderico-v-event-uri"}],template:"http://www.iana.org/assignments/uri-schemes/prov/v-event"},{scheme:"ventrilo",description:"ventrilo",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ventrilo"},{scheme:"view-source",description:"view-source",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/view-source"},{scheme:"webcal",description:"webcal",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/webcal"},{scheme:"wpid",description:"wpid",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/wpid"},{scheme:"wtai",description:"wtai",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/wtai"},{scheme:"wyciwyg",description:"wyciwyg",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/wyciwyg"},{scheme:"xfire",description:"xfire",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/xfire"},{scheme:"xri",description:"xri",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/xri"},{scheme:"ymsgr",description:"ymsgr",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ymsgr"}]}),Xf=Q(function(t,e){e.exports=[{scheme:"fax",description:"fax",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2806"},{type:"rfc",href:"http://www.iana.org/go/rfc3966"}]},{scheme:"filesystem",description:"filesystem",reference:[],template:"http://www.iana.org/assignments/uri-schemes/historic/filesystem"},{scheme:"mailserver",description:"Access to data available from mail servers",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6196"}]},{scheme:"modem",description:"modem",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2806"},{type:"rfc",href:"http://www.iana.org/go/rfc3966"}]},{scheme:"pack",description:"pack",reference:[{type:"draft",href:"http://www.iana.org/go/draft-shur-pack-uri-scheme"}],template:"http://www.iana.org/assignments/uri-schemes/historic/pack"},{scheme:"prospero",description:"Prospero Directory Service",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4157"}]},{scheme:"snews",description:"NNTP over SSL/TLS",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5538"}]},{scheme:"videotex",description:"videotex",reference:[{type:"draft",href:"http://www.iana.org/go/draft-mavrakis-videotex-url-spec"},{type:"rfc",href:"http://www.iana.org/go/rfc2122"},{type:"rfc",href:"http://www.iana.org/go/rfc3986"}],template:"http://www.iana.org/assignments/uri-schemes/historic/videotex"},{scheme:"wais",description:"Wide Area Information Servers",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4156"}]},{scheme:"z39.50",description:"Z39.50 information access",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc1738"},{type:"rfc",href:"http://www.iana.org/go/rfc2056"}]}]}),Yf=Q(function(t,e){e.exports=[{scheme:"android-app"},{scheme:"webpack"},{scheme:"s3",description:"Amazon Web Services S3 bucket"},{scheme:"gs",description:"Google Cloud Storage"},{scheme:"mqtt",description:"Message Queuing Telemetry Transport Protocol"},{scheme:"modbus+tcp",description:"Modbus over TCP"}]}),Go=Q(function(t,e){var r=Wf(),n={permanent:Jf(),provosional:Qf(),historical:Xf()},a={};Object.keys(n).forEach(function(c){n[c].forEach(function(s){a[s.scheme]=r(s,{type:c})})}),n.unofficial=Yf().filter(function(c){return!a[c.scheme]}),n.unofficial.forEach(function(c){a[c.scheme]=r(c,{type:"unofficial"})}),e.exports=r(n,{allByName:a})}),Zf=Q(function(t,e){var{parse:r}=pa(),{addressParser:n}=ga(),a=Go();function c(s){try{return n(s),!0}catch{return!1}}e.exports=s=>{const u=r(s);return!!(u.scheme==="mailto"&&u.to.every(c)||u.reference==="absolute"&&a.allByName[u.scheme])}}),ed=Q(function(t,e){e.exports=/^P(?!$)(\d+(?:\.\d+)?Y)?(\d+(?:\.\d+)?M)?(\d+(?:\.\d+)?W)?(\d+(?:\.\d+)?D)?(T(?=\d)(\d+(?:\.\d+)?H)?(\d+(?:\.\d+)?M)?(\d+(?:\.\d+)?S)?)?$/}),td=Q(function(t,e){var{parse:r}=ga();e.exports=n=>{try{return r(n),!0}catch{return!1}}}),xo={};al(xo,{default:()=>Xo});function Wo(t){return this[t]}function rd(t,e){this[t]=id.bind(null,e)}var Jo,Qo,Lr,ya,va,nd=(t,e,r)=>{var n=ya(e);for(let a of n)!va.call(t,a)&&a!=="default"&&Lr(t,a,{get:Wo.bind(e,a),enumerable:!0})},sd,Ha=(t,e,r)=>{var n=t!=null&&typeof t=="object";if(n){var a=sd??(sd=new WeakMap),c=a.get(t);if(c)return c}r=t!=null?Jo(Qo(t)):{};let s=e||!t||!t.__esModule?Lr(r,"default",{value:t,enumerable:!0}):r;for(let u of ya(t))va.call(s,u)||Lr(s,u,{get:Wo.bind(t,u),enumerable:!0});return n&&a.set(t,s),s},ad=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),id=t=>t,od=(t,e)=>{for(var r in e)Lr(t,r,{get:e[r],enumerable:!0,configurable:!0,set:rd.bind(e,r)})},Rs,Ts,Is,Xo,cd=il(()=>{Jo=Object.create,{getPrototypeOf:Qo,defineProperty:Lr,getOwnPropertyNames:ya}=Object,va=Object.prototype.hasOwnProperty,Rs=ad((t,e)=>{var r=/^xn--/,n=/[^\0-\x7F]/,a=/[\x2E\u3002\uFF0E\uFF61]/g,c={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},s=Math.floor,u=String.fromCharCode;function o(m){throw RangeError(c[m])}function y(m,g){let v=[],k=m.length;for(;k--;)v[k]=g(m[k]);return v}function f(m,g){let v=m.split("@"),k="";v.length>1&&(k=v[0]+"@",m=v[1]),m=m.replace(a,".");let T=m.split("."),j=y(T,g).join(".");return k+j}function w(m){let g=[],v=0,k=m.length;for(;v<k;){let T=m.charCodeAt(v++);if(T>=55296&&T<=56319&&v<k){let j=m.charCodeAt(v++);(j&64512)==56320?g.push(((T&1023)<<10)+(j&1023)+65536):(g.push(T),v--)}else g.push(T)}return g}var $=m=>String.fromCodePoint(...m),E=function(m){return m>=48&&m<58?26+(m-48):m>=65&&m<91?m-65:m>=97&&m<123?m-97:36},b=function(m,g){return m+22+75*(m<26)-((g!=0)<<5)},S=function(m,g,v){let k=0;for(m=v?s(m/700):m>>1,m+=s(m/g);m>455;k+=36)m=s(m/35);return s(k+36*m/(m+38))},h=function(m){let g=[],v=m.length,k=0,T=128,j=72,V=m.lastIndexOf("-");V<0&&(V=0);for(let q=0;q<V;++q)m.charCodeAt(q)>=128&&o("not-basic"),g.push(m.charCodeAt(q));for(let q=V>0?V+1:0;q<v;){let W=k;for(let te=1,ue=36;;ue+=36){q>=v&&o("invalid-input");let ve=E(m.charCodeAt(q++));ve>=36&&o("invalid-input"),ve>s((2147483647-k)/te)&&o("overflow"),k+=ve*te;let fe=ue<=j?1:ue>=j+26?26:ue-j;if(ve<fe)break;let ae=36-fe;te>s(2147483647/ae)&&o("overflow"),te*=ae}let x=g.length+1;j=S(k-W,x,W==0),s(k/x)>2147483647-T&&o("overflow"),T+=s(k/x),k%=x,g.splice(k++,0,T)}return String.fromCodePoint(...g)},i=function(m){let g=[];m=w(m);let v=m.length,k=128,T=0,j=72;for(let W of m)W<128&&g.push(u(W));let V=g.length,q=V;for(V&&g.push("-");q<v;){let W=2147483647;for(let te of m)te>=k&&te<W&&(W=te);let x=q+1;W-k>s((2147483647-T)/x)&&o("overflow"),T+=(W-k)*x,k=W;for(let te of m)if(te<k&&++T>2147483647&&o("overflow"),te===k){let ue=T;for(let ve=36;;ve+=36){let fe=ve<=j?1:ve>=j+26?26:ve-j;if(ue<fe)break;let ae=ue-fe,L=36-fe;g.push(u(b(fe+ae%L,0))),ue=s(ae/L)}g.push(u(b(ue,0))),j=S(T,x,q===V),T=0,++q}++T,++k}return g.join("")},d=function(m){return f(m,function(g){return r.test(g)?h(g.slice(4).toLowerCase()):g})},l=function(m){return f(m,function(g){return n.test(g)?"xn--"+i(g):g})},_={version:"2.3.1",ucs2:{decode:w,encode:$},decode:h,encode:i,toASCII:l,toUnicode:d};e.exports=_}),Ts={},od(Ts,{default:()=>Is.default}),nd(Ts,Ha(Rs(),1)),Is=Ha(Rs(),1),Xo=Is.default}),ud=Q(function(t,e){var{toASCII:r}=(cd(),rl(xo)),n=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i;e.exports=a=>{const c=r(a);return c.replace(/\.$/,"").length<=253&&n.test(c)}}),ld=Q(function(t,e){var{parse:r}=pa(),{addressParser:n}=ga(),a=Go();function c(s){try{return n(s),!0}catch{return!1}}e.exports=s=>{const u=r(s);return u.scheme==="mailto"&&u.to.every(c)||u.reference==="absolute"&&u.path!==void 0&&a.allByName[u.scheme]?!0:u.scheme&&!a.allByName[u.scheme]?!1:u.path!==void 0&&(u.reference==="relative"||u.reference==="same-document"||u.reference==="uri")}}),fd=Q(function(t,e){t.iri=Zf(),t.duration=ed(),t["idn-email"]=td(),t["idn-hostname"]=ud(),t["iri-reference"]=ld()}),dd=Q(function(t,e){var r=fd();e.exports=(n,a={})=>{const c=Object.keys(r);let s=c;if(a.formats){if(!Array.isArray(a.formats))throw new Error("options.formats must be an array");s=a.formats}return c.filter(u=>s.includes(u)).forEach(u=>{n.addFormat(u,r[u])}),n}}),hd=Q(function(t,e){var r=Object.prototype.hasOwnProperty,n="~";function a(){}Object.create&&(a.prototype=Object.create(null),new a().__proto__||(n=!1));function c(y,f,w){this.fn=y,this.context=f,this.once=w||!1}function s(y,f,w,$,E){if(typeof w!="function")throw new TypeError("The listener must be a function");var b=new c(w,$||y,E),S=n?n+f:f;return y._events[S]?y._events[S].fn?y._events[S]=[y._events[S],b]:y._events[S].push(b):(y._events[S]=b,y._eventsCount++),y}function u(y,f){--y._eventsCount===0?y._events=new a:delete y._events[f]}function o(){this._events=new a,this._eventsCount=0}o.prototype.eventNames=function(){var f=[],w,$;if(this._eventsCount===0)return f;for($ in w=this._events)r.call(w,$)&&f.push(n?$.slice(1):$);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(w)):f},o.prototype.listeners=function(f){var w=n?n+f:f,$=this._events[w];if(!$)return[];if($.fn)return[$.fn];for(var E=0,b=$.length,S=new Array(b);E<b;E++)S[E]=$[E].fn;return S},o.prototype.listenerCount=function(f){var w=n?n+f:f,$=this._events[w];return $?$.fn?1:$.length:0},o.prototype.emit=function(f,w,$,E,b,S){var h=n?n+f:f;if(!this._events[h])return!1;var i=this._events[h],d=arguments.length,l,_;if(i.fn){switch(i.once&&this.removeListener(f,i.fn,void 0,!0),d){case 1:return i.fn.call(i.context),!0;case 2:return i.fn.call(i.context,w),!0;case 3:return i.fn.call(i.context,w,$),!0;case 4:return i.fn.call(i.context,w,$,E),!0;case 5:return i.fn.call(i.context,w,$,E,b),!0;case 6:return i.fn.call(i.context,w,$,E,b,S),!0}for(_=1,l=new Array(d-1);_<d;_++)l[_-1]=arguments[_];i.fn.apply(i.context,l)}else{var m=i.length,g;for(_=0;_<m;_++)switch(i[_].once&&this.removeListener(f,i[_].fn,void 0,!0),d){case 1:i[_].fn.call(i[_].context);break;case 2:i[_].fn.call(i[_].context,w);break;case 3:i[_].fn.call(i[_].context,w,$);break;case 4:i[_].fn.call(i[_].context,w,$,E);break;default:if(!l)for(g=1,l=new Array(d-1);g<d;g++)l[g-1]=arguments[g];i[_].fn.apply(i[_].context,l)}}return!0},o.prototype.on=function(f,w,$){return s(this,f,w,$,!1)},o.prototype.once=function(f,w,$){return s(this,f,w,$,!0)},o.prototype.removeListener=function(f,w,$,E){var b=n?n+f:f;if(!this._events[b])return this;if(!w)return u(this,b),this;var S=this._events[b];if(S.fn)S.fn===w&&(!E||S.once)&&(!$||S.context===$)&&u(this,b);else{for(var h=0,i=[],d=S.length;h<d;h++)(S[h].fn!==w||E&&!S[h].once||$&&S[h].context!==$)&&i.push(S[h]);i.length?this._events[b]=i.length===1?i[0]:i:u(this,b)}return this},o.prototype.removeAllListeners=function(f){var w;return f?(w=n?n+f:f,this._events[w]&&u(this,w)):(this._events=new a,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=n,o.EventEmitter=o,typeof e<"u"&&(e.exports=o)}),pd="https://www.w3.org/ns/activitystreams",md="https://sockethub.org/ns/context/v1.jsonld",gd="error",yd="https://sockethub.org/ns/context/platform/error/v1.jsonld",vd="sockethub:internal",_d="https://sockethub.org/ns/context/platform/sockethub:internal/v1.jsonld",_a=new Map,Yo=new Map,Zo=new Map;function wd(t){return Array.isArray(t)?t.filter(e=>typeof e=="string"):[]}function $d(t){return wd(t["@context"])}function ec(t,e,r,n){_a.set(e,t),Yo.set(e,r),Zo.set(e,n)}function fs(t){const r=$d(t).filter(n=>_a.has(n));return r.length!==1?null:r[0]}function tc(t){return _a.get(t)}function bd(t){return Yo.get(t)}function Ed(t){return Zo.get(t)}var Sd=Fr(Uo());new Sd.default({strictTypes:!1,allErrors:!0});var rc={feed:{required:["id","type"],additionalProperties:!0,properties:{type:{enum:["feed"]},id:{type:"string",format:"iri"},name:{type:"string"},description:{type:"string"},author:{type:"string"},favicon:{type:"string"}}},person:{required:["id","type"],additionalProperties:!0,properties:{id:{type:"string"},type:{enum:["person"]},name:{type:"string"}}},room:{required:["id","type"],additionalProperties:!0,properties:{id:{type:"string"},type:{enum:["room"]},name:{type:"string"}}},service:{required:["id","type"],additionalProperties:!0,properties:{id:{type:"string"},type:{enum:["service"]},name:{type:"string"}}},platform:{required:["id","type"],additionalProperties:!0,properties:{id:{type:"string"},type:{enum:["platform"]},name:{type:"string"}}},website:{required:["id","type"],additionalProperties:!0,properties:{id:{type:"string",format:"iri"},type:{enum:["website"]},name:{type:"string"}}},address:{required:["type"],additionalProperties:!1,properties:{type:{enum:["address"]}}},calendar:{required:["id","type"],additionalProperties:!0,properties:{id:{type:"string",format:"iri"},type:{enum:["calendar"]},name:{type:"string"},components:{type:"array",items:{enum:["event","task"]}}}},addressBook:{required:["id","type"],additionalProperties:!1,properties:{id:{type:"string",format:"iri"},type:{enum:["addressBook"]}}}},Pd=Object.keys(rc),nc=["person","room","service","feed","website","platform"],sc=["person","room","service","feed","website","platform","address","calendar","addressBook"],kd=nc.map(t=>({$ref:`#/definitions/type/${t}`})),Od=sc.map(t=>({$ref:`#/definitions/type/${t}`})),Nd={type:"array",minItems:3,maxItems:3,items:{type:"string"},allOf:[{contains:{const:pd}},{contains:{const:md}}]},Rd={type:"string"},Td={$id:"https://sockethub.org/schemas/v/activity-stream.json",description:"Schema for Sockethub Activity Streams",type:"object",required:["@context","type","actor"],additionalProperties:!1,properties:{"@context":Nd,id:{type:"string"},type:Rd,actor:{type:"object",oneOf:kd},target:{type:"object",oneOf:Od},object:{type:"object"},published:{type:"string",format:"date-time"}},definitions:{type:rc}},Id={version:"3.0.0-alpha.22"};function Cd(t,e){return t.replace("/v/",`/${e}/`)}var Ad={$id:"https://sockethub.org/schemas/v/sockethub-config.json"};Cd(Ad.$id,Id.version);var jd=Fr(Uo()),Md=Fr(Bf()),Dd=Fr(dd());function qd(t){let e=`${t.instancePath?t.instancePath:"activity stream"}: ${t.message}`;return t.keyword==="additionalProperties"?e+=`: ${t.params.additionalProperty}`:t.keyword==="enum"&&(e+=`: ${t.params.allowedValues.join(", ")}`),e}function jr(t){const e=[];t!=null&&t.type&&e.push(t.type);const r=t;for(const n in r){const a=r[n];a&&typeof a=="object"&&"type"in a&&e.push(...jr(a))}return e}function Vd(t){const e=t.schemaPath.match(/#\/\w+\/\w+\/([\w-]+)\//);return e?e[1]:void 0}function Ld(t){const e=t.instancePath.match(/\/(\w+)/);return e?e[1]:void 0}function Ud(t,e){const r=Vd(t),n=Ld(t);if(!n)return-1;const a=e[n];return!a||!r||!a.includes(r)?-1:t.instancePath.split("/").length}function zd(t){if(!Array.isArray(t["@context"]))return{actor:[],target:[],object:jr(t)};const e=t;return{actor:jr(e.actor),target:jr(e.target),object:e.object?jr(e.object):[]}}function Fd(t,e,r){const n=zd(t);let a=0,c=-1;for(let s=0;s<e.length;s++){const u=Ud(e[s],n);u>c&&(c=u,a=s)}return c>=0?qd(e[a]):Hd(e[e.length-1],r)}function Kd(t,e){if(!(e!=null&&e.excludeTypes)||e.excludeTypes.length===0)return t;const r=new Set(e.excludeTypes);return t.filter(n=>!r.has(n))}function Hd(t,e){let r;if(t.keyword==="oneOf"){const n=t.instancePath.split("/")[1],a=n==="actor"?nc:n==="target"?sc:Pd,c=Kd(a,e),s=c.length>0?c:a;r=`${t.instancePath}: ${t.message}: ${s.join(", ")}`}else r=`${t.instancePath?t.instancePath:"activity stream"}: ${t.message}`;return"additionalProperty"in t.params&&(r+=`: ${t.params.additionalProperty}`),r}var Ht=new jd.default({strictTypes:!1,allErrors:!0});Md.default(Ht);Dd.default(Ht);var Bt="https://sockethub.org/schemas/v0",Xs={},Bd={},Ba=!1;Xs[`${Bt}/activity-stream`]=Td;for(const t in Xs)Ht.addSchema(Xs[t],t);function Ga(t,e){ec(t,e,`${Bt}/context/${t}/messages`,`${Bt}/context/${t}/credentials`);const r=`${Bt}/context/${t}/messages`;Ht.getSchema(r)||Ht.addSchema({},r);const n=`${Bt}/context/${t}/credentials`;Ht.getSchema(n)||Ht.addSchema({},n)}function Gd(){Ba||(Ga(gd,yd),Ga(vd,_d),Ba=!0)}Gd();function es(t,e){const r=Ht.getSchema(t);if(!r)return`schema ${t} not found`;if(!r(e)){let a=Fd(e,r.errors,Bd);if(Array.isArray(e["@context"])){const c=fs(e);if(c){const s=tc(c);s&&(a=`[${s}] ${a}`)}}return a}return""}function xd(t){const e=es(`${Bt}/activity-stream`,t);if(e)return e;const r=fs(t);if(!r)return"activity streams must have exactly one registered platform context URL in @context";const n=bd(r);return n?es(n,t):`platform context URL ${r} does not have a registered message schema`}function Wd(t){if(!Array.isArray(t["@context"]))return"credential activity streams must have an @context set";if(t.type!=="credentials")return"credential activity streams must have credentials set as type";const e=es(`${Bt}/activity-stream`,t);if(e)return e;const r=fs(t);if(!r)return"credential activity streams must have exactly one registered platform context URL in @context";const n=Ed(r);return n?es(n,t):`platform context URL ${r} does not have a registered credentials schema`}function xa(t,e){const r=`${Bt}/context/${e}`;Ht.getSchema(r)||Ht.addSchema(t,r)}function Jd(t,e){ec(t,e,`${Bt}/context/${t}/messages`,`${Bt}/context/${t}/credentials`)}function Qd(t){const e=fs(t);return e?tc(e)??null:null}var Wa={actor:"id",target:"id",object:"content"};function Xd(t,e){return typeof t=="string"?{[e]:t}:Array.isArray(t)?t.map(r=>typeof r=="string"?{id:r}:r):t}function Cs(t){const e={...t};for(const r of Object.keys(Wa))r in e&&(e[r]=Xd(e[r],Wa[r]));return e}var Yd=Fr(hd()),Zd=Yd.default;class Ur{constructor(e,r={}){ct(this,"events",{credentials:new Map,connect:new Map,join:new Map});ct(this,"_socket");ct(this,"socket");ct(this,"debug",!0);ct(this,"options");ct(this,"platformRegistry",new Map);ct(this,"asContextUrl");ct(this,"sockethubContextUrl");ct(this,"sockethubVersion");ct(this,"initState","idle");ct(this,"hasReadyOnce",!1);ct(this,"initCycle");ct(this,"initTokenCounter",0);ct(this,"initTimeoutTimer");ct(this,"waitingWarningTimer");ct(this,"waitingWarningIntervalMs",1e4);ct(this,"readyWaiters",[]);ct(this,"outboundQueue",[]);ct(this,"outboundSequence",0);ct(this,"registryFingerprint");ct(this,"latestReadyInfo");if(!e)throw new Error("SockethubClient requires a socket.io instance");this._socket=e,this.options={initTimeoutMs:r.initTimeoutMs??5e3,maxQueuedOutbound:r.maxQueuedOutbound??1e3,maxQueuedAgeMs:r.maxQueuedAgeMs??3e4},this.socket=this.createPublicEmitter(),this.registerSocketIOHandlers(),this._socket.connected&&(this.socket.connected=!0,this.socket.id=this._socket.id,this.socket._emit("connect"),this.startInitialization("initial-connect",!0))}clearCredentials(){this.events.credentials.clear()}getRegisteredPlatforms(){return Array.from(this.platformRegistry.values()).map(e=>({...e,types:[...e.types],schemas:{...e.schemas}}))}isSchemasReady(){return this.isReady()}isReady(){return this.initState==="ready"}getInitState(){return this.initState}getRegisteredBaseContexts(){if(!this.asContextUrl||!this.sockethubContextUrl)throw new Error("Schema registry not loaded yet. Wait for client ready state after connect.");return{as:this.asContextUrl,sockethub:this.sockethubContextUrl}}getPlatformSchema(e,r="messages"){var a,c;const n=e==null?void 0:e.trim();if(n)return(c=(a=this.platformRegistry.get(n))==null?void 0:a.schemas)==null?void 0:c[r]}async waitForSchemas(e=2e3){return await this.ready(e),this.buildPlatformRegistryPayload()}ready(e=this.options.initTimeoutMs){return this.isReady()&&this.latestReadyInfo?Promise.resolve(this.latestReadyInfo):new Promise((r,n)=>{const a={resolve:r,reject:n};e>0&&(a.timer=setTimeout(()=>{this.readyWaiters=this.readyWaiters.filter(c=>c!==a),n(new Error(`SockethubClient ready() timed out after ${e}ms`))},e)),this.readyWaiters.push(a),this.socket.connected&&this.initState==="idle"&&this.startInitialization(this.hasReadyOnce?"reconnect":"initial-connect",!0)})}validateActivity(e){return e.type==="credentials"?Wd(e):xd(e)}contextFor(e){if(typeof e!="string"||e.trim().length===0)throw new Error("SockethubClient.contextFor(platform) requires a non-empty platform string");if(!this.asContextUrl||!this.sockethubContextUrl)throw new Error("Schema registry not loaded yet. Wait for client ready state after connect.");const r=e.trim(),n=this.platformRegistry.get(r);if(!n){const a=Array.from(this.platformRegistry.keys()).sort();throw new Error(`unknown platform '${r}'. Registered platforms: ${a.join(", ")}`)}return[this.asContextUrl,this.sockethubContextUrl,n.contextUrl]}createPublicEmitter(){const e=new Zd;return e._emit=e.emit,e.emit=(r,n,a)=>{this.handlePublicEmit(r,n,a)},e.connected=!1,e.disconnect=()=>{this._socket.disconnect()},e.connect=()=>{this._socket.connect()},e}requestSchemaRegistry(){"io"in this._socket&&this._socket.emit("schemas",this.registryFingerprint,r=>{this.handleSchemasPayload(r)})}applyPlatformRegistry(e){var s,u,o,y;if(!e||typeof e!="object")return;const r=e,n=(s=r.contexts)==null?void 0:s.as,a=(u=r.contexts)==null?void 0:u.sockethub;if(typeof n!="string"||typeof a!="string"||!Array.isArray(r.platforms))return;this.sockethubVersion=typeof r.version=="string"?r.version:"unknown",this.asContextUrl=n,this.sockethubContextUrl=a,this.platformRegistry.clear();for(const f of r.platforms)if(!(!f||typeof f!="object"||typeof f.id!="string"||typeof f.version!="string"||typeof f.contextUrl!="string")){this.platformRegistry.set(f.id,{...f,version:f.version,types:Array.isArray(f.types)?f.types:[],schemas:f.schemas||{}}),Jd(f.id,f.contextUrl);try{const w=(o=f.schemas)==null?void 0:o.credentials;w&&typeof w=="object"&&!Array.isArray(w)&&xa(w,`${f.id}/credentials`);const $=(y=f.schemas)==null?void 0:y.messages;$&&typeof $=="object"&&!Array.isArray($)&&xa($,`${f.id}/messages`)}catch(w){const $=w instanceof Error?w.message:String(w);console.warn(`[SockethubClient] Failed to register schemas for platform ${f.id}: ${$}`)}}const c=this.buildPlatformRegistryPayload();return this.registryFingerprint=typeof r.fingerprint=="string"?r.fingerprint:void 0,this.socket._emit("schemas",c),c}eventCredentials(e){e.object&&e.object.type==="credentials"&&this.events.credentials.set(Ur.getKey(e),e)}eventMessage(e){if(!this._socket.connected)return;const r=Ur.getKey(e);e.type==="join"||e.type==="connect"?this.events[e.type].set(r,e):e.type==="leave"?this.events.join.delete(r):e.type==="disconnect"&&this.events.connect.delete(r)}static getKey(e){var c;const r=((c=e.actor)==null?void 0:c.id)||e.actor;if(!r)throw new Error(`actor property not present for message type: ${e==null?void 0:e.type}`);const n=e.target?e.target.id||e.target:"";return`${Qd(e)??""}:${r}-${n}`}buildPlatformRegistryPayload(){return{version:this.sockethubVersion,contexts:this.asContextUrl&&this.sockethubContextUrl?{as:this.asContextUrl,sockethub:this.sockethubContextUrl}:void 0,platforms:this.getRegisteredPlatforms()}}buildReadyInfo(e){if(!(!this.sockethubVersion||!this.asContextUrl||!this.sockethubContextUrl))return{state:"ready",reason:e,sockethubVersion:this.sockethubVersion,contexts:{as:this.asContextUrl,sockethub:this.sockethubContextUrl},platforms:this.getRegisteredPlatforms().map(r=>({id:r.id,version:r.version,contextUrl:r.contextUrl,contextVersion:r.contextVersion,schemaVersion:r.schemaVersion,types:[...r.types]}))}}resolveReadyWaiters(e){const r=this.readyWaiters;this.readyWaiters=[];for(const n of r)n.timer&&clearTimeout(n.timer),n.resolve(e)}rejectReadyWaiters(e){const r=this.readyWaiters;this.readyWaiters=[];for(const n of r)n.timer&&clearTimeout(n.timer),n.reject(e)}emitInitError(e,r,n){this.socket._emit("init_error",{error:e,phase:r,retrying:n})}emitClientError(e,r,n){if(typeof r=="function"){r({error:n});return}this.socket._emit("client_error",{event:e,error:n})}clearInitTimers(){this.initTimeoutTimer&&(clearTimeout(this.initTimeoutTimer),this.initTimeoutTimer=void 0),this.waitingWarningTimer&&(clearInterval(this.waitingWarningTimer),this.waitingWarningTimer=void 0)}startWaitingWarnings(){this.waitingWarningTimer||(this.waitingWarningTimer=setInterval(()=>{if(this.isReady()||this.initState==="closed"){this.clearInitTimers();return}const e=this.outboundQueue.length,r=this.outboundQueue[0],n=r?((Date.now()-r.enqueuedAt)/1e3).toFixed(1):"0.0";console.warn(`[SockethubClient] Still waiting for schemas; queued outbound messages: ${e}; oldest queued age: ${n}s.`)},this.waitingWarningIntervalMs))}startInitialization(e,r){if(!this.socket.connected||this.initState==="closed")return;const n=++this.initTokenCounter;this.initCycle={token:n,reason:e,startedAt:Date.now(),replayOnReady:r,timedOut:!1},this.initState="initializing",this.clearInitTimers(),this.initTimeoutTimer=setTimeout(()=>{if(!this.initCycle||this.initCycle.token!==n)return;this.initCycle.timedOut=!0,this.initState="init_error";const a=`Initialization timed out after ${this.options.initTimeoutMs}ms waiting for schemas`;console.warn(`[SockethubClient] ${a}; queued outbound messages: ${this.outboundQueue.length}. Waiting for schemas event from server.`),this.emitInitError(a,"timeout",!1),this.startWaitingWarnings()},this.options.initTimeoutMs);try{this.requestSchemaRegistry()}catch(a){this.initState="init_error";const c=a instanceof Error?a.message:String(a);this.emitInitError(c,"schemas-request",!1),this.startWaitingWarnings()}}markReady(e){const r=this.initCycle,n=!!(r!=null&&r.replayOnReady);this.initCycle=void 0,this.clearInitTimers(),this.initState="ready",this.hasReadyOnce=!0;const a=this.buildReadyInfo(e);if(!a){const c=new Error("Failed to build ready payload");this.initState="init_error",this.emitInitError(c.message,"schemas-apply",!0),this.rejectReadyWaiters(c);return}this.socket._emit("ready",a),this.latestReadyInfo=a,this.resolveReadyWaiters(a),n&&(this.replay("credentials",this.events.credentials),this.replay("message",this.events.connect),this.replay("message",this.events.join)),this.flushOutboundQueue()}handleSchemasPayload(e){if(!e||typeof e!="object")return;if(e.unchanged===!0&&typeof this.registryFingerprint=="string"&&this.platformRegistry.size>0){this.initCycle?this.markReady(this.initCycle.reason):this.initState!=="ready"&&this.markReady("schemas-update");return}const r=e.fingerprint;if(this.initState==="ready"&&!this.initCycle&&r&&r===this.registryFingerprint)return;if(this.initState==="ready"&&!this.initCycle&&(this.initState="initializing"),!this.applyPlatformRegistry(e)){this.initState="init_error",this.emitInitError("Received invalid schemas payload from server","schemas-apply",!0),this.startWaitingWarnings();return}if(this.initCycle){this.markReady(this.initCycle.reason);return}this.markReady("schemas-update")}handlePublicEmit(e,r,n){const a={event:e,content:r,callback:n,enqueuedAt:Date.now(),sequence:this.outboundSequence++};if(!this.isReady()){this.enqueueOutbound(a);return}this.sendOutbound(a)}enqueueOutbound(e){if(this.outboundQueue.push(e),this.outboundQueue.length<=this.options.maxQueuedOutbound)return;const r=this.outboundQueue.shift();r&&this.emitClientError(r.event,r.callback,"SockethubClient queue overflow before ready")}flushOutboundQueue(){if(!this.isReady()||this.outboundQueue.length===0)return;const e=Date.now(),r=this.outboundQueue.sort((n,a)=>n.sequence-a.sequence);this.outboundQueue=[];for(const n of r){if(e-n.enqueuedAt>this.options.maxQueuedAgeMs){this.emitClientError(n.event,n.callback,`SockethubClient queued message expired after ${this.options.maxQueuedAgeMs}ms before initialization`);continue}this.sendOutbound(n)}}sendOutbound(e){let r=e.content;try{if(e.event==="credentials"||e.event==="message"){if(r=Cs(e.content),r&&typeof r=="object"){const n=r;e.event==="credentials"&&!n.type&&(n.type="credentials"),n.actor&&typeof n.actor=="object"&&!n.actor.type&&(n.actor.type="person")}if(this.platformRegistry.size>0){const n=this.validateActivity(r);if(n){this.emitClientError(e.event,e.callback,`SockethubClient validation failed: ${n}`);return}}}e.event==="credentials"?this.eventCredentials(r):e.event==="message"&&this.eventMessage(r),this._socket.emit(e.event,r,e.callback)}catch(n){const a=n instanceof Error?n.message:String(n);this.emitClientError(e.event,e.callback,a)}}log(e,r){this.debug&&console.log(e,r)}registerSocketIOHandlers(){this._socket.on("connect",()=>{this.socket.id=this._socket.id,this.socket.connected=!0,this.socket._emit("connect"),this.startInitialization(this.hasReadyOnce?"reconnect":"initial-connect",!0)}),this._socket.on("connect_error",e=>{this.socket._emit("connect_error",e)}),this._socket.on("disconnect",e=>{this.socket.connected=!1,this.initState!=="closed"&&(this.initState="idle"),this.clearInitTimers(),this.socket._emit("disconnect",e)}),this._socket.on("schemas",e=>{this.handleSchemasPayload(e)}),this._socket.on("message",e=>{this.socket._emit("message",Cs(e))})}hasActorId(e){return"actor"in e&&e.actor!==null&&typeof e.actor=="object"&&"id"in e.actor&&typeof e.actor.id=="string"}replay(e,r){for(const n of r.values()){const a=Cs(n);let c=a==null?void 0:a.id;if(this.hasActorId(a)){const s=a.actor;c=typeof s=="string"?s:s.id}this.log(`replaying ${e} for ${c}`),this._socket.emit(e,a)}}}(t=>{t.SockethubClient=Ur})(typeof globalThis=="object"?globalThis:{});const xt=Object.create(null);xt.open="0";xt.close="1";xt.ping="2";xt.pong="3";xt.message="4";xt.upgrade="5";xt.noop="6";const zn=Object.create(null);Object.keys(xt).forEach(t=>{zn[xt[t]]=t});const Ys={type:"error",data:"parser error"},ac=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",ic=typeof ArrayBuffer=="function",oc=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,wa=({type:t,data:e},r,n)=>ac&&e instanceof Blob?r?n(e):Ja(e,n):ic&&(e instanceof ArrayBuffer||oc(e))?r?n(e):Ja(new Blob([e]),n):n(xt[t]+(e||"")),Ja=(t,e)=>{const r=new FileReader;return r.onload=function(){const n=r.result.split(",")[1];e("b"+(n||""))},r.readAsDataURL(t)};function Qa(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let As;function eh(t,e){if(ac&&t.data instanceof Blob)return t.data.arrayBuffer().then(Qa).then(e);if(ic&&(t.data instanceof ArrayBuffer||oc(t.data)))return e(Qa(t.data));wa(t,!1,r=>{As||(As=new TextEncoder),e(As.encode(r))})}const Xa="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Mr=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<Xa.length;t++)Mr[Xa.charCodeAt(t)]=t;const th=t=>{let e=t.length*.75,r=t.length,n,a=0,c,s,u,o;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const y=new ArrayBuffer(e),f=new Uint8Array(y);for(n=0;n<r;n+=4)c=Mr[t.charCodeAt(n)],s=Mr[t.charCodeAt(n+1)],u=Mr[t.charCodeAt(n+2)],o=Mr[t.charCodeAt(n+3)],f[a++]=c<<2|s>>4,f[a++]=(s&15)<<4|u>>2,f[a++]=(u&3)<<6|o&63;return y},rh=typeof ArrayBuffer=="function",$a=(t,e)=>{if(typeof t!="string")return{type:"message",data:cc(t,e)};const r=t.charAt(0);return r==="b"?{type:"message",data:nh(t.substring(1),e)}:zn[r]?t.length>1?{type:zn[r],data:t.substring(1)}:{type:zn[r]}:Ys},nh=(t,e)=>{if(rh){const r=th(t);return cc(r,e)}else return{base64:!0,data:t}},cc=(t,e)=>{switch(e){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},uc="",sh=(t,e)=>{const r=t.length,n=new Array(r);let a=0;t.forEach((c,s)=>{wa(c,!1,u=>{n[s]=u,++a===r&&e(n.join(uc))})})},ah=(t,e)=>{const r=t.split(uc),n=[];for(let a=0;a<r.length;a++){const c=$a(r[a],e);if(n.push(c),c.type==="error")break}return n};function ih(){return new TransformStream({transform(t,e){eh(t,r=>{const n=r.length;let a;if(n<126)a=new Uint8Array(1),new DataView(a.buffer).setUint8(0,n);else if(n<65536){a=new Uint8Array(3);const c=new DataView(a.buffer);c.setUint8(0,126),c.setUint16(1,n)}else{a=new Uint8Array(9);const c=new DataView(a.buffer);c.setUint8(0,127),c.setBigUint64(1,BigInt(n))}t.data&&typeof t.data!="string"&&(a[0]|=128),e.enqueue(a),e.enqueue(r)})}})}let js;function Yr(t){return t.reduce((e,r)=>e+r.length,0)}function Zr(t,e){if(t[0].length===e)return t.shift();const r=new Uint8Array(e);let n=0;for(let a=0;a<e;a++)r[a]=t[0][n++],n===t[0].length&&(t.shift(),n=0);return t.length&&n<t[0].length&&(t[0]=t[0].slice(n)),r}function oh(t,e){js||(js=new TextDecoder);const r=[];let n=0,a=-1,c=!1;return new TransformStream({transform(s,u){for(r.push(s);;){if(n===0){if(Yr(r)<1)break;const o=Zr(r,1);c=(o[0]&128)===128,a=o[0]&127,a<126?n=3:a===126?n=1:n=2}else if(n===1){if(Yr(r)<2)break;const o=Zr(r,2);a=new DataView(o.buffer,o.byteOffset,o.length).getUint16(0),n=3}else if(n===2){if(Yr(r)<8)break;const o=Zr(r,8),y=new DataView(o.buffer,o.byteOffset,o.length),f=y.getUint32(0);if(f>Math.pow(2,21)-1){u.enqueue(Ys);break}a=f*Math.pow(2,32)+y.getUint32(4),n=3}else{if(Yr(r)<a)break;const o=Zr(r,a);u.enqueue($a(c?o:js.decode(o),e)),n=0}if(a===0||a>t){u.enqueue(Ys);break}}}})}const lc=4;function ht(t){if(t)return ch(t)}function ch(t){for(var e in ht.prototype)t[e]=ht.prototype[e];return t}ht.prototype.on=ht.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};ht.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this};ht.prototype.off=ht.prototype.removeListener=ht.prototype.removeAllListeners=ht.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+t];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var n,a=0;a<r.length;a++)if(n=r[a],n===e||n.fn===e){r.splice(a,1);break}return r.length===0&&delete this._callbacks["$"+t],this};ht.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),r=this._callbacks["$"+t],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(r){r=r.slice(0);for(var n=0,a=r.length;n<a;++n)r[n].apply(this,e)}return this};ht.prototype.emitReserved=ht.prototype.emit;ht.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};ht.prototype.hasListeners=function(t){return!!this.listeners(t).length};const ds=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,r)=>r(e,0),jt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),uh="arraybuffer";function fc(t,...e){return e.reduce((r,n)=>(t.hasOwnProperty(n)&&(r[n]=t[n]),r),{})}const lh=jt.setTimeout,fh=jt.clearTimeout;function hs(t,e){e.useNativeTimers?(t.setTimeoutFn=lh.bind(jt),t.clearTimeoutFn=fh.bind(jt)):(t.setTimeoutFn=jt.setTimeout.bind(jt),t.clearTimeoutFn=jt.clearTimeout.bind(jt))}const dh=1.33;function hh(t){return typeof t=="string"?ph(t):Math.ceil((t.byteLength||t.size)*dh)}function ph(t){let e=0,r=0;for(let n=0,a=t.length;n<a;n++)e=t.charCodeAt(n),e<128?r+=1:e<2048?r+=2:e<55296||e>=57344?r+=3:(n++,r+=4);return r}function dc(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function mh(t){let e="";for(let r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}function gh(t){let e={},r=t.split("&");for(let n=0,a=r.length;n<a;n++){let c=r[n].split("=");e[decodeURIComponent(c[0])]=decodeURIComponent(c[1])}return e}class yh extends Error{constructor(e,r,n){super(e),this.description=r,this.context=n,this.type="TransportError"}}class ba extends ht{constructor(e){super(),this.writable=!1,hs(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,r,n){return super.emitReserved("error",new yh(e,r,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const r=$a(e,this.socket.binaryType);this.onPacket(r)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,r={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(r)}_hostname(){const e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){const r=mh(e);return r.length?"?"+r:""}}class vh extends ba{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";const r=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let n=0;this._polling&&(n++,this.once("pollComplete",function(){--n||r()})),this.writable||(n++,this.once("drain",function(){--n||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const r=n=>{if(this.readyState==="opening"&&n.type==="open"&&this.onOpen(),n.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(n)};ah(e,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,sh(e,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=dc()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(e,r)}}let hc=!1;try{hc=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const _h=hc;function wh(){}class $h extends vh{constructor(e){if(super(e),typeof location<"u"){const r=location.protocol==="https:";let n=location.port;n||(n=r?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||n!==e.port}}doWrite(e,r){const n=this.request({method:"POST",data:e});n.on("success",r),n.on("error",(a,c)=>{this.onError("xhr post error",a,c)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(r,n)=>{this.onError("xhr poll error",r,n)}),this.pollXhr=e}}class Gt extends ht{constructor(e,r,n){super(),this.createRequest=e,hs(this,n),this._opts=n,this._method=n.method||"GET",this._uri=r,this._data=n.data!==void 0?n.data:null,this._create()}_create(){var e;const r=fc(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;const n=this._xhr=this.createRequest(r);try{n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let a in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(a)&&n.setRequestHeader(a,this._opts.extraHeaders[a])}}catch{}if(this._method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(n),"withCredentials"in n&&(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var a;n.readyState===3&&((a=this._opts.cookieJar)===null||a===void 0||a.parseCookies(n.getResponseHeader("set-cookie"))),n.readyState===4&&(n.status===200||n.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof n.status=="number"?n.status:0)},0))},n.send(this._data)}catch(a){this.setTimeoutFn(()=>{this._onError(a)},0);return}typeof document<"u"&&(this._index=Gt.requestsCount++,Gt.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=wh,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Gt.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Gt.requestsCount=0;Gt.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Ya);else if(typeof addEventListener=="function"){const t="onpagehide"in jt?"pagehide":"unload";addEventListener(t,Ya,!1)}}function Ya(){for(let t in Gt.requests)Gt.requests.hasOwnProperty(t)&&Gt.requests[t].abort()}const bh=function(){const t=pc({xdomain:!1});return t&&t.responseType!==null}();class Eh extends $h{constructor(e){super(e);const r=e&&e.forceBase64;this.supportsBinary=bh&&!r}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new Gt(pc,this.uri(),e)}}function pc(t){const e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||_h))return new XMLHttpRequest}catch{}if(!e)try{return new jt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const mc=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Sh extends ba{get name(){return"websocket"}doOpen(){const e=this.uri(),r=this.opts.protocols,n=mc?{}:fc(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,r,n)}catch(a){return this.emitReserved("error",a)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let r=0;r<e.length;r++){const n=e[r],a=r===e.length-1;wa(n,this.supportsBinary,c=>{try{this.doWrite(n,c)}catch{}a&&ds(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=dc()),this.supportsBinary||(r.b64=1),this.createUri(e,r)}}const Ms=jt.WebSocket||jt.MozWebSocket;class Ph extends Sh{createSocket(e,r,n){return mc?new Ms(e,r,n):r?new Ms(e,r):new Ms(e)}doWrite(e,r){this.ws.send(r)}}class kh extends ba{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const r=oh(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=e.readable.pipeThrough(r).getReader(),a=ih();a.readable.pipeTo(e.writable),this._writer=a.writable.getWriter();const c=()=>{n.read().then(({done:u,value:o})=>{u||(this.onPacket(o),c())}).catch(u=>{})};c();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this._writer.write(s).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let r=0;r<e.length;r++){const n=e[r],a=r===e.length-1;this._writer.write(n).then(()=>{a&&ds(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}const Oh={websocket:Ph,webtransport:kh,polling:Eh},Nh=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Rh=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Zs(t){if(t.length>8e3)throw"URI too long";const e=t,r=t.indexOf("["),n=t.indexOf("]");r!=-1&&n!=-1&&(t=t.substring(0,r)+t.substring(r,n).replace(/:/g,";")+t.substring(n,t.length));let a=Nh.exec(t||""),c={},s=14;for(;s--;)c[Rh[s]]=a[s]||"";return r!=-1&&n!=-1&&(c.source=e,c.host=c.host.substring(1,c.host.length-1).replace(/;/g,":"),c.authority=c.authority.replace("[","").replace("]","").replace(/;/g,":"),c.ipv6uri=!0),c.pathNames=Th(c,c.path),c.queryKey=Ih(c,c.query),c}function Th(t,e){const r=/\/{2,9}/g,n=e.replace(r,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&n.splice(0,1),e.slice(-1)=="/"&&n.splice(n.length-1,1),n}function Ih(t,e){const r={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,a,c){a&&(r[a]=c)}),r}const ea=typeof addEventListener=="function"&&typeof removeEventListener=="function",Fn=[];ea&&addEventListener("offline",()=>{Fn.forEach(t=>t())},!1);class cr extends ht{constructor(e,r){if(super(),this.binaryType=uh,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(r=e,e=null),e){const n=Zs(e);r.hostname=n.host,r.secure=n.protocol==="https"||n.protocol==="wss",r.port=n.port,n.query&&(r.query=n.query)}else r.host&&(r.hostname=Zs(r.host).host);hs(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},r.transports.forEach(n=>{const a=n.prototype.name;this.transports.push(a),this._transportsByName[a]=n}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=gh(this.opts.query)),ea&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Fn.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const r=Object.assign({},this.opts.query);r.EIO=lc,r.transport=e,this.id&&(r.sid=this.id);const n=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const e=this.opts.rememberUpgrade&&cr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const r=this.createTransport(e);r.open(),this.setTransport(r)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",r=>this._onClose("transport close",r))}onOpen(){this.readyState="open",cr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const r=new Error("server error");r.code=e.data,this._onError(r);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let n=0;n<this.writeBuffer.length;n++){const a=this.writeBuffer[n].data;if(a&&(r+=hh(a)),n>0&&r>this._maxPayload)return this.writeBuffer.slice(0,n);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,ds(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,r,n){return this._sendPacket("message",e,r,n),this}send(e,r,n){return this._sendPacket("message",e,r,n),this}_sendPacket(e,r,n,a){if(typeof r=="function"&&(a=r,r=void 0),typeof n=="function"&&(a=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;const c={type:e,data:r,options:n};this.emitReserved("packetCreate",c),this.writeBuffer.push(c),a&&this.once("flush",a),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),e()},n=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():e()}):this.upgrading?n():e()),this}_onError(e){if(cr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),ea&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const n=Fn.indexOf(this._offlineEventListener);n!==-1&&Fn.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,r),this.writeBuffer=[],this._prevBufferLen=0}}}cr.protocol=lc;class Ch extends cr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let r=this.createTransport(e),n=!1;cr.priorWebsocketSuccess=!1;const a=()=>{n||(r.send([{type:"ping",data:"probe"}]),r.once("packet",w=>{if(!n)if(w.type==="pong"&&w.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;cr.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{n||this.readyState!=="closed"&&(f(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{const $=new Error("probe error");$.transport=r.name,this.emitReserved("upgradeError",$)}}))};function c(){n||(n=!0,f(),r.close(),r=null)}const s=w=>{const $=new Error("probe error: "+w);$.transport=r.name,c(),this.emitReserved("upgradeError",$)};function u(){s("transport closed")}function o(){s("socket closed")}function y(w){r&&w.name!==r.name&&c()}const f=()=>{r.removeListener("open",a),r.removeListener("error",s),r.removeListener("close",u),this.off("close",o),this.off("upgrading",y)};r.once("open",a),r.once("error",s),r.once("close",u),this.once("close",o),this.once("upgrading",y),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{n||r.open()},200):r.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const r=[];for(let n=0;n<e.length;n++)~this.transports.indexOf(e[n])&&r.push(e[n]);return r}}let Ah=class extends Ch{constructor(e,r={}){const n=typeof e=="object"?e:r;(!n.transports||n.transports&&typeof n.transports[0]=="string")&&(n.transports=(n.transports||["polling","websocket","webtransport"]).map(a=>Oh[a]).filter(a=>!!a)),super(e,n)}};function jh(t,e="",r){let n=t;r=r||typeof location<"u"&&location,t==null&&(t=r.protocol+"//"+r.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=r.protocol+t:t=r.host+t),/^(https?|wss?):\/\//.test(t)||(typeof r<"u"?t=r.protocol+"//"+t:t="https://"+t),n=Zs(t)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const c=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+c+":"+n.port+e,n.href=n.protocol+"://"+c+(r&&r.port===n.port?"":":"+n.port),n}const Mh=typeof ArrayBuffer=="function",Dh=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,gc=Object.prototype.toString,qh=typeof Blob=="function"||typeof Blob<"u"&&gc.call(Blob)==="[object BlobConstructor]",Vh=typeof File=="function"||typeof File<"u"&&gc.call(File)==="[object FileConstructor]";function Ea(t){return Mh&&(t instanceof ArrayBuffer||Dh(t))||qh&&t instanceof Blob||Vh&&t instanceof File}function Kn(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let r=0,n=t.length;r<n;r++)if(Kn(t[r]))return!0;return!1}if(Ea(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return Kn(t.toJSON(),!0);for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&Kn(t[r]))return!0;return!1}function Lh(t){const e=[],r=t.data,n=t;return n.data=ta(r,e),n.attachments=e.length,{packet:n,buffers:e}}function ta(t,e){if(!t)return t;if(Ea(t)){const r={_placeholder:!0,num:e.length};return e.push(t),r}else if(Array.isArray(t)){const r=new Array(t.length);for(let n=0;n<t.length;n++)r[n]=ta(t[n],e);return r}else if(typeof t=="object"&&!(t instanceof Date)){const r={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=ta(t[n],e));return r}return t}function Uh(t,e){return t.data=ra(t.data,e),delete t.attachments,t}function ra(t,e){if(!t)return t;if(t&&t._placeholder===!0){if(typeof t.num=="number"&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}else if(Array.isArray(t))for(let r=0;r<t.length;r++)t[r]=ra(t[r],e);else if(typeof t=="object")for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=ra(t[r],e));return t}const zh=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Fh=5;var Ue;(function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"})(Ue||(Ue={}));class Kh{constructor(e){this.replacer=e}encode(e){return(e.type===Ue.EVENT||e.type===Ue.ACK)&&Kn(e)?this.encodeAsBinary({type:e.type===Ue.EVENT?Ue.BINARY_EVENT:Ue.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let r=""+e.type;return(e.type===Ue.BINARY_EVENT||e.type===Ue.BINARY_ACK)&&(r+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(r+=e.nsp+","),e.id!=null&&(r+=e.id),e.data!=null&&(r+=JSON.stringify(e.data,this.replacer)),r}encodeAsBinary(e){const r=Lh(e),n=this.encodeAsString(r.packet),a=r.buffers;return a.unshift(n),a}}function Za(t){return Object.prototype.toString.call(t)==="[object Object]"}class Sa extends ht{constructor(e){super(),this.reviver=e}add(e){let r;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(e);const n=r.type===Ue.BINARY_EVENT;n||r.type===Ue.BINARY_ACK?(r.type=n?Ue.EVENT:Ue.ACK,this.reconstructor=new Hh(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(Ea(e)||e.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(e),r&&(this.reconstructor=null,super.emitReserved("decoded",r));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let r=0;const n={type:Number(e.charAt(0))};if(Ue[n.type]===void 0)throw new Error("unknown packet type "+n.type);if(n.type===Ue.BINARY_EVENT||n.type===Ue.BINARY_ACK){const c=r+1;for(;e.charAt(++r)!=="-"&&r!=e.length;);const s=e.substring(c,r);if(s!=Number(s)||e.charAt(r)!=="-")throw new Error("Illegal attachments");n.attachments=Number(s)}if(e.charAt(r+1)==="/"){const c=r+1;for(;++r&&!(e.charAt(r)===","||r===e.length););n.nsp=e.substring(c,r)}else n.nsp="/";const a=e.charAt(r+1);if(a!==""&&Number(a)==a){const c=r+1;for(;++r;){const s=e.charAt(r);if(s==null||Number(s)!=s){--r;break}if(r===e.length)break}n.id=Number(e.substring(c,r+1))}if(e.charAt(++r)){const c=this.tryParse(e.substr(r));if(Sa.isPayloadValid(n.type,c))n.data=c;else throw new Error("invalid payload")}return n}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,r){switch(e){case Ue.CONNECT:return Za(r);case Ue.DISCONNECT:return r===void 0;case Ue.CONNECT_ERROR:return typeof r=="string"||Za(r);case Ue.EVENT:case Ue.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&zh.indexOf(r[0])===-1);case Ue.ACK:case Ue.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Hh{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const r=Uh(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Bh=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Sa,Encoder:Kh,get PacketType(){return Ue},protocol:Fh},Symbol.toStringTag,{value:"Module"}));function Vt(t,e,r){return t.on(e,r),function(){t.off(e,r)}}const Gh=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class yc extends ht{constructor(e,r,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=r,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[Vt(e,"open",this.onopen.bind(this)),Vt(e,"packet",this.onpacket.bind(this)),Vt(e,"error",this.onerror.bind(this)),Vt(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...r){var n,a,c;if(Gh.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(r.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(r),this;const s={type:Ue.EVENT,data:r};if(s.options={},s.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){const f=this.ids++,w=r.pop();this._registerAckCallback(f,w),s.id=f}const u=(a=(n=this.io.engine)===null||n===void 0?void 0:n.transport)===null||a===void 0?void 0:a.writable,o=this.connected&&!(!((c=this.io.engine)===null||c===void 0)&&c._hasPingExpired());return this.flags.volatile&&!u||(o?(this.notifyOutgoingListeners(s),this.packet(s)):this.sendBuffer.push(s)),this.flags={},this}_registerAckCallback(e,r){var n;const a=(n=this.flags.timeout)!==null&&n!==void 0?n:this._opts.ackTimeout;if(a===void 0){this.acks[e]=r;return}const c=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let u=0;u<this.sendBuffer.length;u++)this.sendBuffer[u].id===e&&this.sendBuffer.splice(u,1);r.call(this,new Error("operation has timed out"))},a),s=(...u)=>{this.io.clearTimeoutFn(c),r.apply(this,u)};s.withError=!0,this.acks[e]=s}emitWithAck(e,...r){return new Promise((n,a)=>{const c=(s,u)=>s?a(s):n(u);c.withError=!0,r.push(c),this.emit(e,...r)})}_addToQueue(e){let r;typeof e[e.length-1]=="function"&&(r=e.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((a,...c)=>(this._queue[0],a!==null?n.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(a)):(this._queue.shift(),r&&r(null,...c)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const r=this._queue[0];r.pending&&!e||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:Ue.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(n=>String(n.id)===e)){const n=this.acks[e];delete this.acks[e],n.withError&&n.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case Ue.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ue.EVENT:case Ue.BINARY_EVENT:this.onevent(e);break;case Ue.ACK:case Ue.BINARY_ACK:this.onack(e);break;case Ue.DISCONNECT:this.ondisconnect();break;case Ue.CONNECT_ERROR:this.destroy();const n=new Error(e.data.message);n.data=e.data.data,this.emitReserved("connect_error",n);break}}onevent(e){const r=e.data||[];e.id!=null&&r.push(this.ack(e.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const r=this._anyListeners.slice();for(const n of r)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const r=this;let n=!1;return function(...a){n||(n=!0,r.packet({type:Ue.ACK,id:e,data:a}))}}onack(e){const r=this.acks[e.id];typeof r=="function"&&(delete this.acks[e.id],r.withError&&e.data.unshift(null),r.apply(this,e.data))}onconnect(e,r){this.id=e,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ue.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const r=this._anyListeners;for(let n=0;n<r.length;n++)if(e===r[n])return r.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const r=this._anyOutgoingListeners;for(let n=0;n<r.length;n++)if(e===r[n])return r.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const r=this._anyOutgoingListeners.slice();for(const n of r)n.apply(this,e.data)}}}function Sr(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}Sr.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),r=Math.floor(e*this.jitter*t);t=(Math.floor(e*10)&1)==0?t-r:t+r}return Math.min(t,this.max)|0};Sr.prototype.reset=function(){this.attempts=0};Sr.prototype.setMin=function(t){this.ms=t};Sr.prototype.setMax=function(t){this.max=t};Sr.prototype.setJitter=function(t){this.jitter=t};class na extends ht{constructor(e,r){var n;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(r=e,e=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,hs(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((n=r.randomizationFactor)!==null&&n!==void 0?n:.5),this.backoff=new Sr({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=e;const a=r.parser||Bh;this.encoder=new a.Encoder,this.decoder=new a.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var r;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(r=this.backoff)===null||r===void 0||r.setMin(e),this)}randomizationFactor(e){var r;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(r=this.backoff)===null||r===void 0||r.setJitter(e),this)}reconnectionDelayMax(e){var r;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(r=this.backoff)===null||r===void 0||r.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new Ah(this.uri,this.opts);const r=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const a=Vt(r,"open",function(){n.onopen(),e&&e()}),c=u=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",u),e?e(u):this.maybeReconnectOnOpen()},s=Vt(r,"error",c);if(this._timeout!==!1){const u=this._timeout,o=this.setTimeoutFn(()=>{a(),c(new Error("timeout")),r.close()},u);this.opts.autoUnref&&o.unref(),this.subs.push(()=>{this.clearTimeoutFn(o)})}return this.subs.push(a),this.subs.push(s),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(Vt(e,"ping",this.onping.bind(this)),Vt(e,"data",this.ondata.bind(this)),Vt(e,"error",this.onerror.bind(this)),Vt(e,"close",this.onclose.bind(this)),Vt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(r){this.onclose("parse error",r)}}ondecoded(e){ds(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,r){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new yc(this,e,r),this.nsps[e]=n),n}_destroy(e){const r=Object.keys(this.nsps);for(const n of r)if(this.nsps[n].active)return;this._close()}_packet(e){const r=this.encoder.encode(e);for(let n=0;n<r.length;n++)this.engine.write(r[n],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,r){var n;this.cleanup(),(n=this.engine)===null||n===void 0||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const r=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(a=>{a?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",a)):e.onreconnect()}))},r);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const Rr={};function Hn(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const r=jh(t,e.path||"/socket.io"),n=r.source,a=r.id,c=r.path,s=Rr[a]&&c in Rr[a].nsps,u=e.forceNew||e["force new connection"]||e.multiplex===!1||s;let o;return u?o=new na(n,e):(Rr[a]||(Rr[a]=new na(n,e)),o=Rr[a]),r.query&&!e.query&&(e.query=r.queryKey),o.socket(r.path,e)}Object.assign(Hn,{Manager:na,Socket:yc,io:Hn,connect:Hn});var en={exports:{}},Ds={},Xt={},mr={},qs={},Vs={},Ls={},ei;function ts(){return ei||(ei=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends e{constructor(d){if(super(),!t.IDENTIFIER.test(d))throw new Error("CodeGen: name must be a valid identifier");this.str=d}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=r;class n extends e{constructor(d){super(),this._items=typeof d=="string"?[d]:d}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const d=this._items[0];return d===""||d==='""'}get str(){var d;return(d=this._str)!==null&&d!==void 0?d:this._str=this._items.reduce((l,_)=>`${l}${_}`,"")}get names(){var d;return(d=this._names)!==null&&d!==void 0?d:this._names=this._items.reduce((l,_)=>(_ instanceof r&&(l[_.str]=(l[_.str]||0)+1),l),{})}}t._Code=n,t.nil=new n("");function a(i,...d){const l=[i[0]];let _=0;for(;_<d.length;)u(l,d[_]),l.push(i[++_]);return new n(l)}t._=a;const c=new n("+");function s(i,...d){const l=[E(i[0])];let _=0;for(;_<d.length;)l.push(c),u(l,d[_]),l.push(c,E(i[++_]));return o(l),new n(l)}t.str=s;function u(i,d){d instanceof n?i.push(...d._items):d instanceof r?i.push(d):i.push(w(d))}t.addCodeArg=u;function o(i){let d=1;for(;d<i.length-1;){if(i[d]===c){const l=y(i[d-1],i[d+1]);if(l!==void 0){i.splice(d-1,3,l);continue}i[d++]="+"}d++}}function y(i,d){if(d==='""')return i;if(i==='""')return d;if(typeof i=="string")return d instanceof r||i[i.length-1]!=='"'?void 0:typeof d!="string"?`${i.slice(0,-1)}${d}"`:d[0]==='"'?i.slice(0,-1)+d.slice(1):void 0;if(typeof d=="string"&&d[0]==='"'&&!(i instanceof r))return`"${i}${d.slice(1)}`}function f(i,d){return d.emptyStr()?i:i.emptyStr()?d:s`${i}${d}`}t.strConcat=f;function w(i){return typeof i=="number"||typeof i=="boolean"||i===null?i:E(Array.isArray(i)?i.join(","):i)}function $(i){return new n(E(i))}t.stringify=$;function E(i){return JSON.stringify(i).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=E;function b(i){return typeof i=="string"&&t.IDENTIFIER.test(i)?new n(`.${i}`):a`[${i}]`}t.getProperty=b;function S(i){if(typeof i=="string"&&t.IDENTIFIER.test(i))return new n(`${i}`);throw new Error(`CodeGen: invalid export name: ${i}, use explicit $id name mapping`)}t.getEsmExportName=S;function h(i){return new n(i.toString())}t.regexpCode=h}(Ls)),Ls}var Us={},ti;function ri(){return ti||(ti=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const e=ts();class r extends Error{constructor(y){super(`CodeGen: "code" for ${y} not defined`),this.value=y.value}}var n;(function(o){o[o.Started=0]="Started",o[o.Completed=1]="Completed"})(n||(t.UsedValueState=n={})),t.varKinds={const:new e.Name("const"),let:new e.Name("let"),var:new e.Name("var")};class a{constructor({prefixes:y,parent:f}={}){this._names={},this._prefixes=y,this._parent=f}toName(y){return y instanceof e.Name?y:this.name(y)}name(y){return new e.Name(this._newName(y))}_newName(y){const f=this._names[y]||this._nameGroup(y);return`${y}${f.index++}`}_nameGroup(y){var f,w;if(!((w=(f=this._parent)===null||f===void 0?void 0:f._prefixes)===null||w===void 0)&&w.has(y)||this._prefixes&&!this._prefixes.has(y))throw new Error(`CodeGen: prefix "${y}" is not allowed in this scope`);return this._names[y]={prefix:y,index:0}}}t.Scope=a;class c extends e.Name{constructor(y,f){super(f),this.prefix=y}setValue(y,{property:f,itemIndex:w}){this.value=y,this.scopePath=(0,e._)`.${new e.Name(f)}[${w}]`}}t.ValueScopeName=c;const s=(0,e._)`\n`;class u extends a{constructor(y){super(y),this._values={},this._scope=y.scope,this.opts={...y,_n:y.lines?s:e.nil}}get(){return this._scope}name(y){return new c(y,this._newName(y))}value(y,f){var w;if(f.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const $=this.toName(y),{prefix:E}=$,b=(w=f.key)!==null&&w!==void 0?w:f.ref;let S=this._values[E];if(S){const d=S.get(b);if(d)return d}else S=this._values[E]=new Map;S.set(b,$);const h=this._scope[E]||(this._scope[E]=[]),i=h.length;return h[i]=f.ref,$.setValue(f,{property:E,itemIndex:i}),$}getValue(y,f){const w=this._values[y];if(w)return w.get(f)}scopeRefs(y,f=this._values){return this._reduceValues(f,w=>{if(w.scopePath===void 0)throw new Error(`CodeGen: name "${w}" has no value`);return(0,e._)`${y}${w.scopePath}`})}scopeCode(y=this._values,f,w){return this._reduceValues(y,$=>{if($.value===void 0)throw new Error(`CodeGen: name "${$}" has no value`);return $.value.code},f,w)}_reduceValues(y,f,w={},$){let E=e.nil;for(const b in y){const S=y[b];if(!S)continue;const h=w[b]=w[b]||new Map;S.forEach(i=>{if(h.has(i))return;h.set(i,n.Started);let d=f(i);if(d){const l=this.opts.es5?t.varKinds.var:t.varKinds.const;E=(0,e._)`${E}${l} ${i} = ${d};${this.opts._n}`}else if(d=$==null?void 0:$(i))E=(0,e._)`${E}${d}${this.opts._n}`;else throw new r(i);h.set(i,n.Completed)})}return E}}t.ValueScope=u}(Us)),Us}var ni;function qe(){return ni||(ni=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const e=ts(),r=ri();var n=ts();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return n.Name}});var a=ri();Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return a.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return a.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return a.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return a.varKinds}}),t.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class c{optimizeNodes(){return this}optimizeNames(p,P){return this}}class s extends c{constructor(p,P,C){super(),this.varKind=p,this.name=P,this.rhs=C}render({es5:p,_n:P}){const C=p?r.varKinds.var:this.varKind,B=this.rhs===void 0?"":` = ${this.rhs}`;return`${C} ${this.name}${B};`+P}optimizeNames(p,P){if(p[this.name.str])return this.rhs&&(this.rhs=x(this.rhs,p,P)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class u extends c{constructor(p,P,C){super(),this.lhs=p,this.rhs=P,this.sideEffects=C}render({_n:p}){return`${this.lhs} = ${this.rhs};`+p}optimizeNames(p,P){if(!(this.lhs instanceof e.Name&&!p[this.lhs.str]&&!this.sideEffects))return this.rhs=x(this.rhs,p,P),this}get names(){const p=this.lhs instanceof e.Name?{}:{...this.lhs.names};return W(p,this.rhs)}}class o extends u{constructor(p,P,C,B){super(p,C,B),this.op=P}render({_n:p}){return`${this.lhs} ${this.op}= ${this.rhs};`+p}}class y extends c{constructor(p){super(),this.label=p,this.names={}}render({_n:p}){return`${this.label}:`+p}}class f extends c{constructor(p){super(),this.label=p,this.names={}}render({_n:p}){return`break${this.label?` ${this.label}`:""};`+p}}class w extends c{constructor(p){super(),this.error=p}render({_n:p}){return`throw ${this.error};`+p}get names(){return this.error.names}}class $ extends c{constructor(p){super(),this.code=p}render({_n:p}){return`${this.code};`+p}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(p,P){return this.code=x(this.code,p,P),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class E extends c{constructor(p=[]){super(),this.nodes=p}render(p){return this.nodes.reduce((P,C)=>P+C.render(p),"")}optimizeNodes(){const{nodes:p}=this;let P=p.length;for(;P--;){const C=p[P].optimizeNodes();Array.isArray(C)?p.splice(P,1,...C):C?p[P]=C:p.splice(P,1)}return p.length>0?this:void 0}optimizeNames(p,P){const{nodes:C}=this;let B=C.length;for(;B--;){const G=C[B];G.optimizeNames(p,P)||(te(p,G.names),C.splice(B,1))}return C.length>0?this:void 0}get names(){return this.nodes.reduce((p,P)=>q(p,P.names),{})}}class b extends E{render(p){return"{"+p._n+super.render(p)+"}"+p._n}}class S extends E{}class h extends b{}h.kind="else";class i extends b{constructor(p,P){super(P),this.condition=p}render(p){let P=`if(${this.condition})`+super.render(p);return this.else&&(P+="else "+this.else.render(p)),P}optimizeNodes(){super.optimizeNodes();const p=this.condition;if(p===!0)return this.nodes;let P=this.else;if(P){const C=P.optimizeNodes();P=this.else=Array.isArray(C)?new h(C):C}if(P)return p===!1?P instanceof i?P:P.nodes:this.nodes.length?this:new i(ue(p),P instanceof i?[P]:P.nodes);if(!(p===!1||!this.nodes.length))return this}optimizeNames(p,P){var C;if(this.else=(C=this.else)===null||C===void 0?void 0:C.optimizeNames(p,P),!!(super.optimizeNames(p,P)||this.else))return this.condition=x(this.condition,p,P),this}get names(){const p=super.names;return W(p,this.condition),this.else&&q(p,this.else.names),p}}i.kind="if";class d extends b{}d.kind="for";class l extends d{constructor(p){super(),this.iteration=p}render(p){return`for(${this.iteration})`+super.render(p)}optimizeNames(p,P){if(super.optimizeNames(p,P))return this.iteration=x(this.iteration,p,P),this}get names(){return q(super.names,this.iteration.names)}}class _ extends d{constructor(p,P,C,B){super(),this.varKind=p,this.name=P,this.from=C,this.to=B}render(p){const P=p.es5?r.varKinds.var:this.varKind,{name:C,from:B,to:G}=this;return`for(${P} ${C}=${B}; ${C}<${G}; ${C}++)`+super.render(p)}get names(){const p=W(super.names,this.from);return W(p,this.to)}}class m extends d{constructor(p,P,C,B){super(),this.loop=p,this.varKind=P,this.name=C,this.iterable=B}render(p){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(p)}optimizeNames(p,P){if(super.optimizeNames(p,P))return this.iterable=x(this.iterable,p,P),this}get names(){return q(super.names,this.iterable.names)}}class g extends b{constructor(p,P,C){super(),this.name=p,this.args=P,this.async=C}render(p){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(p)}}g.kind="func";class v extends E{render(p){return"return "+super.render(p)}}v.kind="return";class k extends b{render(p){let P="try"+super.render(p);return this.catch&&(P+=this.catch.render(p)),this.finally&&(P+=this.finally.render(p)),P}optimizeNodes(){var p,P;return super.optimizeNodes(),(p=this.catch)===null||p===void 0||p.optimizeNodes(),(P=this.finally)===null||P===void 0||P.optimizeNodes(),this}optimizeNames(p,P){var C,B;return super.optimizeNames(p,P),(C=this.catch)===null||C===void 0||C.optimizeNames(p,P),(B=this.finally)===null||B===void 0||B.optimizeNames(p,P),this}get names(){const p=super.names;return this.catch&&q(p,this.catch.names),this.finally&&q(p,this.finally.names),p}}class T extends b{constructor(p){super(),this.error=p}render(p){return`catch(${this.error})`+super.render(p)}}T.kind="catch";class j extends b{render(p){return"finally"+super.render(p)}}j.kind="finally";class V{constructor(p,P={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...P,_n:P.lines?`
|
|
37
37
|
`:""},this._extScope=p,this._scope=new r.Scope({parent:p}),this._nodes=[new S]}toString(){return this._root.render(this.opts)}name(p){return this._scope.name(p)}scopeName(p){return this._extScope.name(p)}scopeValue(p,P){const C=this._extScope.value(p,P);return(this._values[C.prefix]||(this._values[C.prefix]=new Set)).add(C),C}getScopeValue(p,P){return this._extScope.getValue(p,P)}scopeRefs(p){return this._extScope.scopeRefs(p,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(p,P,C,B){const G=this._scope.toName(P);return C!==void 0&&B&&(this._constants[G.str]=C),this._leafNode(new s(p,G,C)),G}const(p,P,C){return this._def(r.varKinds.const,p,P,C)}let(p,P,C){return this._def(r.varKinds.let,p,P,C)}var(p,P,C){return this._def(r.varKinds.var,p,P,C)}assign(p,P,C){return this._leafNode(new u(p,P,C))}add(p,P){return this._leafNode(new o(p,t.operators.ADD,P))}code(p){return typeof p=="function"?p():p!==e.nil&&this._leafNode(new $(p)),this}object(...p){const P=["{"];for(const[C,B]of p)P.length>1&&P.push(","),P.push(C),(C!==B||this.opts.es5)&&(P.push(":"),(0,e.addCodeArg)(P,B));return P.push("}"),new e._Code(P)}if(p,P,C){if(this._blockNode(new i(p)),P&&C)this.code(P).else().code(C).endIf();else if(P)this.code(P).endIf();else if(C)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(p){return this._elseNode(new i(p))}else(){return this._elseNode(new h)}endIf(){return this._endBlockNode(i,h)}_for(p,P){return this._blockNode(p),P&&this.code(P).endFor(),this}for(p,P){return this._for(new l(p),P)}forRange(p,P,C,B,G=this.opts.es5?r.varKinds.var:r.varKinds.let){const re=this._scope.toName(p);return this._for(new _(G,re,P,C),()=>B(re))}forOf(p,P,C,B=r.varKinds.const){const G=this._scope.toName(p);if(this.opts.es5){const re=P instanceof e.Name?P:this.var("_arr",P);return this.forRange("_i",0,(0,e._)`${re}.length`,Z=>{this.var(G,(0,e._)`${re}[${Z}]`),C(G)})}return this._for(new m("of",B,G,P),()=>C(G))}forIn(p,P,C,B=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(p,(0,e._)`Object.keys(${P})`,C);const G=this._scope.toName(p);return this._for(new m("in",B,G,P),()=>C(G))}endFor(){return this._endBlockNode(d)}label(p){return this._leafNode(new y(p))}break(p){return this._leafNode(new f(p))}return(p){const P=new v;if(this._blockNode(P),this.code(p),P.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(v)}try(p,P,C){if(!P&&!C)throw new Error('CodeGen: "try" without "catch" and "finally"');const B=new k;if(this._blockNode(B),this.code(p),P){const G=this.name("e");this._currNode=B.catch=new T(G),P(G)}return C&&(this._currNode=B.finally=new j,this.code(C)),this._endBlockNode(T,j)}throw(p){return this._leafNode(new w(p))}block(p,P){return this._blockStarts.push(this._nodes.length),p&&this.code(p).endBlock(P),this}endBlock(p){const P=this._blockStarts.pop();if(P===void 0)throw new Error("CodeGen: not in self-balancing block");const C=this._nodes.length-P;if(C<0||p!==void 0&&C!==p)throw new Error(`CodeGen: wrong number of nodes: ${C} vs ${p} expected`);return this._nodes.length=P,this}func(p,P=e.nil,C,B){return this._blockNode(new g(p,P,C)),B&&this.code(B).endFunc(),this}endFunc(){return this._endBlockNode(g)}optimize(p=1){for(;p-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(p){return this._currNode.nodes.push(p),this}_blockNode(p){this._currNode.nodes.push(p),this._nodes.push(p)}_endBlockNode(p,P){const C=this._currNode;if(C instanceof p||P&&C instanceof P)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${P?`${p.kind}/${P.kind}`:p.kind}"`)}_elseNode(p){const P=this._currNode;if(!(P instanceof i))throw new Error('CodeGen: "else" without "if"');return this._currNode=P.else=p,this}get _root(){return this._nodes[0]}get _currNode(){const p=this._nodes;return p[p.length-1]}set _currNode(p){const P=this._nodes;P[P.length-1]=p}}t.CodeGen=V;function q(R,p){for(const P in p)R[P]=(R[P]||0)+(p[P]||0);return R}function W(R,p){return p instanceof e._CodeOrName?q(R,p.names):R}function x(R,p,P){if(R instanceof e.Name)return C(R);if(!B(R))return R;return new e._Code(R._items.reduce((G,re)=>(re instanceof e.Name&&(re=C(re)),re instanceof e._Code?G.push(...re._items):G.push(re),G),[]));function C(G){const re=P[G.str];return re===void 0||p[G.str]!==1?G:(delete p[G.str],re)}function B(G){return G instanceof e._Code&&G._items.some(re=>re instanceof e.Name&&p[re.str]===1&&P[re.str]!==void 0)}}function te(R,p){for(const P in p)R[P]=(R[P]||0)-(p[P]||0)}function ue(R){return typeof R=="boolean"||typeof R=="number"||R===null?!R:(0,e._)`!${A(R)}`}t.not=ue;const ve=O(t.operators.AND);function fe(...R){return R.reduce(ve)}t.and=fe;const ae=O(t.operators.OR);function L(...R){return R.reduce(ae)}t.or=L;function O(R){return(p,P)=>p===e.nil?P:P===e.nil?p:(0,e._)`${A(p)} ${R} ${A(P)}`}function A(R){return R instanceof e.Name?R:(0,e._)`(${R})`}}(Vs)),Vs}var je={},si;function He(){if(si)return je;si=1,Object.defineProperty(je,"__esModule",{value:!0}),je.checkStrictMode=je.getErrorPath=je.Type=je.useFunc=je.setEvaluated=je.evaluatedPropsToName=je.mergeEvaluated=je.eachItem=je.unescapeJsonPointer=je.escapeJsonPointer=je.escapeFragment=je.unescapeFragment=je.schemaRefOrVal=je.schemaHasRulesButRef=je.schemaHasRules=je.checkUnknownRules=je.alwaysValidSchema=je.toHash=void 0;const t=qe(),e=ts();function r(m){const g={};for(const v of m)g[v]=!0;return g}je.toHash=r;function n(m,g){return typeof g=="boolean"?g:Object.keys(g).length===0?!0:(a(m,g),!c(g,m.self.RULES.all))}je.alwaysValidSchema=n;function a(m,g=m.schema){const{opts:v,self:k}=m;if(!v.strictSchema||typeof g=="boolean")return;const T=k.RULES.keywords;for(const j in g)T[j]||_(m,`unknown keyword: "${j}"`)}je.checkUnknownRules=a;function c(m,g){if(typeof m=="boolean")return!m;for(const v in m)if(g[v])return!0;return!1}je.schemaHasRules=c;function s(m,g){if(typeof m=="boolean")return!m;for(const v in m)if(v!=="$ref"&&g.all[v])return!0;return!1}je.schemaHasRulesButRef=s;function u({topSchemaRef:m,schemaPath:g},v,k,T){if(!T){if(typeof v=="number"||typeof v=="boolean")return v;if(typeof v=="string")return(0,t._)`${v}`}return(0,t._)`${m}${g}${(0,t.getProperty)(k)}`}je.schemaRefOrVal=u;function o(m){return w(decodeURIComponent(m))}je.unescapeFragment=o;function y(m){return encodeURIComponent(f(m))}je.escapeFragment=y;function f(m){return typeof m=="number"?`${m}`:m.replace(/~/g,"~0").replace(/\//g,"~1")}je.escapeJsonPointer=f;function w(m){return m.replace(/~1/g,"/").replace(/~0/g,"~")}je.unescapeJsonPointer=w;function $(m,g){if(Array.isArray(m))for(const v of m)g(v);else g(m)}je.eachItem=$;function E({mergeNames:m,mergeToName:g,mergeValues:v,resultToName:k}){return(T,j,V,q)=>{const W=V===void 0?j:V instanceof t.Name?(j instanceof t.Name?m(T,j,V):g(T,j,V),V):j instanceof t.Name?(g(T,V,j),j):v(j,V);return q===t.Name&&!(W instanceof t.Name)?k(T,W):W}}je.mergeEvaluated={props:E({mergeNames:(m,g,v)=>m.if((0,t._)`${v} !== true && ${g} !== undefined`,()=>{m.if((0,t._)`${g} === true`,()=>m.assign(v,!0),()=>m.assign(v,(0,t._)`${v} || {}`).code((0,t._)`Object.assign(${v}, ${g})`))}),mergeToName:(m,g,v)=>m.if((0,t._)`${v} !== true`,()=>{g===!0?m.assign(v,!0):(m.assign(v,(0,t._)`${v} || {}`),S(m,v,g))}),mergeValues:(m,g)=>m===!0?!0:{...m,...g},resultToName:b}),items:E({mergeNames:(m,g,v)=>m.if((0,t._)`${v} !== true && ${g} !== undefined`,()=>m.assign(v,(0,t._)`${g} === true ? true : ${v} > ${g} ? ${v} : ${g}`)),mergeToName:(m,g,v)=>m.if((0,t._)`${v} !== true`,()=>m.assign(v,g===!0?!0:(0,t._)`${v} > ${g} ? ${v} : ${g}`)),mergeValues:(m,g)=>m===!0?!0:Math.max(m,g),resultToName:(m,g)=>m.var("items",g)})};function b(m,g){if(g===!0)return m.var("props",!0);const v=m.var("props",(0,t._)`{}`);return g!==void 0&&S(m,v,g),v}je.evaluatedPropsToName=b;function S(m,g,v){Object.keys(v).forEach(k=>m.assign((0,t._)`${g}${(0,t.getProperty)(k)}`,!0))}je.setEvaluated=S;const h={};function i(m,g){return m.scopeValue("func",{ref:g,code:h[g.code]||(h[g.code]=new e._Code(g.code))})}je.useFunc=i;var d;(function(m){m[m.Num=0]="Num",m[m.Str=1]="Str"})(d||(je.Type=d={}));function l(m,g,v){if(m instanceof t.Name){const k=g===d.Num;return v?k?(0,t._)`"[" + ${m} + "]"`:(0,t._)`"['" + ${m} + "']"`:k?(0,t._)`"/" + ${m}`:(0,t._)`"/" + ${m}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return v?(0,t.getProperty)(m).toString():"/"+f(m)}je.getErrorPath=l;function _(m,g,v=m.opts.strictSchema){if(v){if(g=`strict mode: ${g}`,v===!0)throw new Error(g);m.self.logger.warn(g)}}return je.checkStrictMode=_,je}var tn={},ai;function fr(){if(ai)return tn;ai=1,Object.defineProperty(tn,"__esModule",{value:!0});const t=qe(),e={data:new t.Name("data"),valCxt:new t.Name("valCxt"),instancePath:new t.Name("instancePath"),parentData:new t.Name("parentData"),parentDataProperty:new t.Name("parentDataProperty"),rootData:new t.Name("rootData"),dynamicAnchors:new t.Name("dynamicAnchors"),vErrors:new t.Name("vErrors"),errors:new t.Name("errors"),this:new t.Name("this"),self:new t.Name("self"),scope:new t.Name("scope"),json:new t.Name("json"),jsonPos:new t.Name("jsonPos"),jsonLen:new t.Name("jsonLen"),jsonPart:new t.Name("jsonPart")};return tn.default=e,tn}var ii;function ps(){return ii||(ii=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const e=qe(),r=He(),n=fr();t.keywordError={message:({keyword:h})=>(0,e.str)`must pass "${h}" keyword validation`},t.keyword$DataError={message:({keyword:h,schemaType:i})=>i?(0,e.str)`"${h}" keyword must be ${i} ($data)`:(0,e.str)`"${h}" keyword is invalid ($data)`};function a(h,i=t.keywordError,d,l){const{it:_}=h,{gen:m,compositeRule:g,allErrors:v}=_,k=w(h,i,d);l??(g||v)?o(m,k):y(_,(0,e._)`[${k}]`)}t.reportError=a;function c(h,i=t.keywordError,d){const{it:l}=h,{gen:_,compositeRule:m,allErrors:g}=l,v=w(h,i,d);o(_,v),m||g||y(l,n.default.vErrors)}t.reportExtraError=c;function s(h,i){h.assign(n.default.errors,i),h.if((0,e._)`${n.default.vErrors} !== null`,()=>h.if(i,()=>h.assign((0,e._)`${n.default.vErrors}.length`,i),()=>h.assign(n.default.vErrors,null)))}t.resetErrorsCount=s;function u({gen:h,keyword:i,schemaValue:d,data:l,errsCount:_,it:m}){if(_===void 0)throw new Error("ajv implementation error");const g=h.name("err");h.forRange("i",_,n.default.errors,v=>{h.const(g,(0,e._)`${n.default.vErrors}[${v}]`),h.if((0,e._)`${g}.instancePath === undefined`,()=>h.assign((0,e._)`${g}.instancePath`,(0,e.strConcat)(n.default.instancePath,m.errorPath))),h.assign((0,e._)`${g}.schemaPath`,(0,e.str)`${m.errSchemaPath}/${i}`),m.opts.verbose&&(h.assign((0,e._)`${g}.schema`,d),h.assign((0,e._)`${g}.data`,l))})}t.extendErrors=u;function o(h,i){const d=h.const("err",i);h.if((0,e._)`${n.default.vErrors} === null`,()=>h.assign(n.default.vErrors,(0,e._)`[${d}]`),(0,e._)`${n.default.vErrors}.push(${d})`),h.code((0,e._)`${n.default.errors}++`)}function y(h,i){const{gen:d,validateName:l,schemaEnv:_}=h;_.$async?d.throw((0,e._)`new ${h.ValidationError}(${i})`):(d.assign((0,e._)`${l}.errors`,i),d.return(!1))}const f={keyword:new e.Name("keyword"),schemaPath:new e.Name("schemaPath"),params:new e.Name("params"),propertyName:new e.Name("propertyName"),message:new e.Name("message"),schema:new e.Name("schema"),parentSchema:new e.Name("parentSchema")};function w(h,i,d){const{createErrors:l}=h.it;return l===!1?(0,e._)`{}`:$(h,i,d)}function $(h,i,d={}){const{gen:l,it:_}=h,m=[E(_,d),b(h,d)];return S(h,i,m),l.object(...m)}function E({errorPath:h},{instancePath:i}){const d=i?(0,e.str)`${h}${(0,r.getErrorPath)(i,r.Type.Str)}`:h;return[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,d)]}function b({keyword:h,it:{errSchemaPath:i}},{schemaPath:d,parentSchema:l}){let _=l?i:(0,e.str)`${i}/${h}`;return d&&(_=(0,e.str)`${_}${(0,r.getErrorPath)(d,r.Type.Str)}`),[f.schemaPath,_]}function S(h,{params:i,message:d},l){const{keyword:_,data:m,schemaValue:g,it:v}=h,{opts:k,propertyName:T,topSchemaRef:j,schemaPath:V}=v;l.push([f.keyword,_],[f.params,typeof i=="function"?i(h):i||(0,e._)`{}`]),k.messages&&l.push([f.message,typeof d=="function"?d(h):d]),k.verbose&&l.push([f.schema,g],[f.parentSchema,(0,e._)`${j}${V}`],[n.default.data,m]),T&&l.push([f.propertyName,T])}}(qs)),qs}var oi;function xh(){if(oi)return mr;oi=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.boolOrEmptySchema=mr.topBoolOrEmptySchema=void 0;const t=ps(),e=qe(),r=fr(),n={message:"boolean schema is false"};function a(u){const{gen:o,schema:y,validateName:f}=u;y===!1?s(u,!1):typeof y=="object"&&y.$async===!0?o.return(r.default.data):(o.assign((0,e._)`${f}.errors`,null),o.return(!0))}mr.topBoolOrEmptySchema=a;function c(u,o){const{gen:y,schema:f}=u;f===!1?(y.var(o,!1),s(u)):y.var(o,!0)}mr.boolOrEmptySchema=c;function s(u,o){const{gen:y,data:f}=u,w={gen:y,keyword:"false schema",data:f,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:u};(0,t.reportError)(w,n,void 0,o)}return mr}var yt={},gr={},ci;function vc(){if(ci)return gr;ci=1,Object.defineProperty(gr,"__esModule",{value:!0}),gr.getRules=gr.isJSONType=void 0;const t=["string","number","integer","boolean","null","object","array"],e=new Set(t);function r(a){return typeof a=="string"&&e.has(a)}gr.isJSONType=r;function n(){const a={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...a,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},a.number,a.string,a.array,a.object],post:{rules:[]},all:{},keywords:{}}}return gr.getRules=n,gr}var Yt={},ui;function _c(){if(ui)return Yt;ui=1,Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.shouldUseRule=Yt.shouldUseGroup=Yt.schemaHasRulesForType=void 0;function t({schema:n,self:a},c){const s=a.RULES.types[c];return s&&s!==!0&&e(n,s)}Yt.schemaHasRulesForType=t;function e(n,a){return a.rules.some(c=>r(n,c))}Yt.shouldUseGroup=e;function r(n,a){var c;return n[a.keyword]!==void 0||((c=a.definition.implements)===null||c===void 0?void 0:c.some(s=>n[s]!==void 0))}return Yt.shouldUseRule=r,Yt}var li;function rs(){if(li)return yt;li=1,Object.defineProperty(yt,"__esModule",{value:!0}),yt.reportTypeError=yt.checkDataTypes=yt.checkDataType=yt.coerceAndCheckDataType=yt.getJSONTypes=yt.getSchemaTypes=yt.DataType=void 0;const t=vc(),e=_c(),r=ps(),n=qe(),a=He();var c;(function(d){d[d.Correct=0]="Correct",d[d.Wrong=1]="Wrong"})(c||(yt.DataType=c={}));function s(d){const l=u(d.type);if(l.includes("null")){if(d.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!l.length&&d.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');d.nullable===!0&&l.push("null")}return l}yt.getSchemaTypes=s;function u(d){const l=Array.isArray(d)?d:d?[d]:[];if(l.every(t.isJSONType))return l;throw new Error("type must be JSONType or JSONType[]: "+l.join(","))}yt.getJSONTypes=u;function o(d,l){const{gen:_,data:m,opts:g}=d,v=f(l,g.coerceTypes),k=l.length>0&&!(v.length===0&&l.length===1&&(0,e.schemaHasRulesForType)(d,l[0]));if(k){const T=b(l,m,g.strictNumbers,c.Wrong);_.if(T,()=>{v.length?w(d,l,v):h(d)})}return k}yt.coerceAndCheckDataType=o;const y=new Set(["string","number","integer","boolean","null"]);function f(d,l){return l?d.filter(_=>y.has(_)||l==="array"&&_==="array"):[]}function w(d,l,_){const{gen:m,data:g,opts:v}=d,k=m.let("dataType",(0,n._)`typeof ${g}`),T=m.let("coerced",(0,n._)`undefined`);v.coerceTypes==="array"&&m.if((0,n._)`${k} == 'object' && Array.isArray(${g}) && ${g}.length == 1`,()=>m.assign(g,(0,n._)`${g}[0]`).assign(k,(0,n._)`typeof ${g}`).if(b(l,g,v.strictNumbers),()=>m.assign(T,g))),m.if((0,n._)`${T} !== undefined`);for(const V of _)(y.has(V)||V==="array"&&v.coerceTypes==="array")&&j(V);m.else(),h(d),m.endIf(),m.if((0,n._)`${T} !== undefined`,()=>{m.assign(g,T),$(d,T)});function j(V){switch(V){case"string":m.elseIf((0,n._)`${k} == "number" || ${k} == "boolean"`).assign(T,(0,n._)`"" + ${g}`).elseIf((0,n._)`${g} === null`).assign(T,(0,n._)`""`);return;case"number":m.elseIf((0,n._)`${k} == "boolean" || ${g} === null
|
|
38
38
|
|| (${k} == "string" && ${g} && ${g} == +${g})`).assign(T,(0,n._)`+${g}`);return;case"integer":m.elseIf((0,n._)`${k} === "boolean" || ${g} === null
|
|
39
39
|
|| (${k} === "string" && ${g} && ${g} == +${g} && !(${g} % 1))`).assign(T,(0,n._)`+${g}`);return;case"boolean":m.elseIf((0,n._)`${g} === "false" || ${g} === 0 || ${g} === null`).assign(T,!1).elseIf((0,n._)`${g} === "true" || ${g} === 1`).assign(T,!0);return;case"null":m.elseIf((0,n._)`${g} === "" || ${g} === 0 || ${g} === false`),m.assign(T,null);return;case"array":m.elseIf((0,n._)`${k} === "string" || ${k} === "number"
|