Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@hyperjump/json-schema-core

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hyperjump/json-schema-core - npm Package Compare versions

Comparing version 0.28.4 to 0.28.5

4

dist/json-schema-core-amd.min.js

@@ -1,3 +0,3 @@

define(["exports"],(function(e){"use strict";var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=function(e,r){return function t(){null==r&&(r=e.length);var n=[].slice.call(arguments);return n.length>=r?e.apply(this,n):function(){return t.apply(this,n.concat([].slice.call(arguments)))}}};var n={exports:{}};!function(e,t){!function(r,n){var o={};r.PubSub?(o=r.PubSub,console.warn("PubSub already loaded, using existing version")):(r.PubSub=o,function(e){var r={},t=-1,n="*";function o(e){var r;for(r in e)if(Object.prototype.hasOwnProperty.call(e,r))return!0;return!1}function a(e){return function(){throw e}}function i(e,r,t){try{e(r,t)}catch(e){setTimeout(a(e),0)}}function s(e,r,t){e(r,t)}function c(e,t,n,o){var a,c=r[t],u=o?s:i;if(Object.prototype.hasOwnProperty.call(r,t))for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&u(c[a],e,n)}function u(e,r,t){return function(){var o=String(e),a=o.lastIndexOf(".");for(c(e,e,r,t);-1!==a;)a=(o=o.substr(0,a)).lastIndexOf("."),c(e,o,r,t);c(e,n,r,t)}}function l(e){var t=String(e);return Boolean(Object.prototype.hasOwnProperty.call(r,t)&&o(r[t]))}function p(e){for(var r=String(e),t=l(r)||l(n),o=r.lastIndexOf(".");!t&&-1!==o;)o=(r=r.substr(0,o)).lastIndexOf("."),t=l(r);return t}function f(e,r,t,n){var o=u(e="symbol"==typeof e?e.toString():e,r,n);return!!p(e)&&(!0===t?o():setTimeout(o,0),!0)}e.publish=function(r,t){return f(r,t,!1,e.immediateExceptions)},e.publishSync=function(r,t){return f(r,t,!0,e.immediateExceptions)},e.subscribe=function(e,n){if("function"!=typeof n)return!1;e="symbol"==typeof e?e.toString():e,Object.prototype.hasOwnProperty.call(r,e)||(r[e]={});var o="uid_"+String(++t);return r[e][o]=n,o},e.subscribeAll=function(r){return e.subscribe(n,r)},e.subscribeOnce=function(r,t){var n=e.subscribe(r,(function(){e.unsubscribe(n),t.apply(this,arguments)}));return e},e.clearAllSubscriptions=function(){r={}},e.clearSubscriptions=function(e){var t;for(t in r)Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)&&delete r[t]},e.countSubscriptions=function(e){var t,n,o=0;for(t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)){for(n in r[t])o++;break}return o},e.getSubscriptions=function(e){var t,n=[];for(t in r)Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)&&n.push(t);return n},e.unsubscribe=function(t){var n,o,a,i=function(e){var t;for(t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e))return!0;return!1},s="string"==typeof t&&(Object.prototype.hasOwnProperty.call(r,t)||i(t)),c=!s&&"string"==typeof t,u="function"==typeof t,l=!1;if(!s){for(n in r)if(Object.prototype.hasOwnProperty.call(r,n)){if(o=r[n],c&&o[t]){delete o[t],l=t;break}if(u)for(a in o)Object.prototype.hasOwnProperty.call(o,a)&&o[a]===t&&(delete o[a],l=!0)}return l}e.clearSubscriptions(t)}}(o)),void 0!==e&&e.exports&&(t=e.exports=o),t.PubSub=o,e.exports=t=o}("object"==typeof window&&window||r)}(n,n.exports);var o={exports:{}};
/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */!function(e,r){!function(e){function r(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length>1){r[0]=r[0].slice(0,-1);for(var n=r.length-1,o=1;o<n;++o)r[o]=r[o].slice(1,-1);return r[n]=r[n].slice(1),r.join("")}return r[0]}function t(e){return"(?:"+e+")"}function n(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function a(e){return null!=e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function i(e,r){var t=e;if(r)for(var n in r)t[n]=r[n];return t}function s(e){var n="[A-Za-z]",o="[0-9]",a=r(o,"[A-Fa-f]"),i=t(t("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+t("%[89A-Fa-f]"+a+"%"+a+a)+"|"+t("%"+a+a)),s="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",c=r("[\\:\\/\\?\\#\\[\\]\\@]",s),u=e?"[\\uE000-\\uF8FF]":"[]",l=r(n,o,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");t(n+r(n,o,"[\\+\\-\\.]")+"*"),t(t(i+"|"+r(l,s,"[\\:]"))+"*");var p=t(t("25[0-5]")+"|"+t("2[0-4]"+o)+"|"+t("1"+o+o)+"|"+t("0?[1-9]"+o)+"|0?0?"+o),f=t(p+"\\."+p+"\\."+p+"\\."+p),d=t(a+"{1,4}"),h=t(t(d+"\\:"+d)+"|"+f),v=t(t(d+"\\:")+"{6}"+h),y=t("\\:\\:"+t(d+"\\:")+"{5}"+h),m=t(t(d)+"?\\:\\:"+t(d+"\\:")+"{4}"+h),g=t(t(t(d+"\\:")+"{0,1}"+d)+"?\\:\\:"+t(d+"\\:")+"{3}"+h),b=t(t(t(d+"\\:")+"{0,2}"+d)+"?\\:\\:"+t(d+"\\:")+"{2}"+h),w=t(t(t(d+"\\:")+"{0,3}"+d)+"?\\:\\:"+d+"\\:"+h),E=t(t(t(d+"\\:")+"{0,4}"+d)+"?\\:\\:"+h),S=t(t(t(d+"\\:")+"{0,5}"+d)+"?\\:\\:"+d),O=t(t(t(d+"\\:")+"{0,6}"+d)+"?\\:\\:"),C=t([v,y,m,g,b,w,E,S,O].join("|")),A=t(t(l+"|"+i)+"+");t("[vV]"+a+"+\\."+r(l,s,"[\\:]")+"+"),t(t(i+"|"+r(l,s))+"*");var I=t(i+"|"+r(l,s,"[\\:\\@]"));return t(t(i+"|"+r(l,s,"[\\@]"))+"+"),t(t(I+"|"+r("[\\/\\?]",u))+"*"),{NOT_SCHEME:new RegExp(r("[^]",n,o,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(r("[^\\%\\:]",l,s),"g"),NOT_HOST:new RegExp(r("[^\\%\\[\\]\\:]",l,s),"g"),NOT_PATH:new RegExp(r("[^\\%\\/\\:\\@]",l,s),"g"),NOT_PATH_NOSCHEME:new RegExp(r("[^\\%\\/\\@]",l,s),"g"),NOT_QUERY:new RegExp(r("[^\\%]",l,s,"[\\:\\@\\/\\?]",u),"g"),NOT_FRAGMENT:new RegExp(r("[^\\%]",l,s,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(r("[^]",l,s),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(r("[^\\%]",l,c),"g"),PCT_ENCODED:new RegExp(i,"g"),IPV4ADDRESS:new RegExp("^("+f+")$"),IPV6ADDRESS:new RegExp("^\\[?("+C+")"+t(t("\\%25|\\%(?!"+a+"{2})")+"("+A+")")+"?\\]?$")}}var c=s(!1),u=s(!0),l=function(){function e(e,r){var t=[],n=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(n=(i=s.next()).done)&&(t.push(i.value),!r||t.length!==r);n=!0);}catch(e){o=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(o)throw a}}return t}return function(r,t){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return e(r,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),p=function(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);r<e.length;r++)t[r]=e[r];return t}return Array.from(e)},f=2147483647,d=36,h=1,v=26,y=38,m=700,g=72,b=128,w="-",E=/^xn--/,S=/[^\0-\x7E]/,O=/[\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"},A=d-h,I=Math.floor,j=String.fromCharCode;function T(e){throw new RangeError(C[e])}function x(e,r){for(var t=[],n=e.length;n--;)t[n]=r(e[n]);return t}function $(e,r){var t=e.split("@"),n="";return t.length>1&&(n=t[0]+"@",e=t[1]),n+x((e=e.replace(O,".")).split("."),r).join(".")}function D(e){for(var r=[],t=0,n=e.length;t<n;){var o=e.charCodeAt(t++);if(o>=55296&&o<=56319&&t<n){var a=e.charCodeAt(t++);56320==(64512&a)?r.push(((1023&o)<<10)+(1023&a)+65536):(r.push(o),t--)}else r.push(o)}return r}var P=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:d},N=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},R=function(e,r,t){var n=0;for(e=t?I(e/m):e>>1,e+=I(e/r);e>A*v>>1;n+=d)e=I(e/A);return I(n+(A+1)*e/(e+y))},F=function(e){var r=[],t=e.length,n=0,o=b,a=g,i=e.lastIndexOf(w);i<0&&(i=0);for(var s=0;s<i;++s)e.charCodeAt(s)>=128&&T("not-basic"),r.push(e.charCodeAt(s));for(var c=i>0?i+1:0;c<t;){for(var u=n,l=1,p=d;;p+=d){c>=t&&T("invalid-input");var y=P(e.charCodeAt(c++));(y>=d||y>I((f-n)/l))&&T("overflow"),n+=y*l;var m=p<=a?h:p>=a+v?v:p-a;if(y<m)break;var E=d-m;l>I(f/E)&&T("overflow"),l*=E}var S=r.length+1;a=R(n-u,S,0==u),I(n/S)>f-o&&T("overflow"),o+=I(n/S),n%=S,r.splice(n++,0,o)}return String.fromCodePoint.apply(String,r)},_=function(e){var r=[],t=(e=D(e)).length,n=b,o=0,a=g,i=!0,s=!1,c=void 0;try{for(var u,l=e[Symbol.iterator]();!(i=(u=l.next()).done);i=!0){var p=u.value;p<128&&r.push(j(p))}}catch(e){s=!0,c=e}finally{try{!i&&l.return&&l.return()}finally{if(s)throw c}}var y=r.length,m=y;for(y&&r.push(w);m<t;){var E=f,S=!0,O=!1,C=void 0;try{for(var A,x=e[Symbol.iterator]();!(S=(A=x.next()).done);S=!0){var $=A.value;$>=n&&$<E&&(E=$)}}catch(e){O=!0,C=e}finally{try{!S&&x.return&&x.return()}finally{if(O)throw C}}var P=m+1;E-n>I((f-o)/P)&&T("overflow"),o+=(E-n)*P,n=E;var F=!0,_=!1,U=void 0;try{for(var k,q=e[Symbol.iterator]();!(F=(k=q.next()).done);F=!0){var z=k.value;if(z<n&&++o>f&&T("overflow"),z==n){for(var L=o,H=d;;H+=d){var V=H<=a?h:H>=a+v?v:H-a;if(L<V)break;var M=L-V,K=d-V;r.push(j(N(V+M%K,0))),L=I(M/K)}r.push(j(N(L,0))),a=R(o,P,m==y),o=0,++m}}}catch(e){_=!0,U=e}finally{try{!F&&q.return&&q.return()}finally{if(_)throw U}}++o,++n}return r.join("")},U=function(e){return $(e,(function(e){return E.test(e)?F(e.slice(4).toLowerCase()):e}))},k=function(e){return $(e,(function(e){return S.test(e)?"xn--"+_(e):e}))},q={version:"2.1.0",ucs2:{decode:D,encode:function(e){return String.fromCodePoint.apply(String,p(e))}},decode:F,encode:_,toASCII:k,toUnicode:U},z={};function L(e){var r=e.charCodeAt(0);return r<16?"%0"+r.toString(16).toUpperCase():r<128?"%"+r.toString(16).toUpperCase():r<2048?"%"+(r>>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function H(e){for(var r="",t=0,n=e.length;t<n;){var o=parseInt(e.substr(t+1,2),16);if(o<128)r+=String.fromCharCode(o),t+=3;else if(o>=194&&o<224){if(n-t>=6){var a=parseInt(e.substr(t+4,2),16);r+=String.fromCharCode((31&o)<<6|63&a)}else r+=e.substr(t,6);t+=6}else if(o>=224){if(n-t>=9){var i=parseInt(e.substr(t+4,2),16),s=parseInt(e.substr(t+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&s)}else r+=e.substr(t,9);t+=9}else r+=e.substr(t,3),t+=3}return r}function V(e,r){function t(e){var t=H(e);return t.match(r.UNRESERVED)?t:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,t).replace(r.NOT_USERINFO,L).replace(r.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_HOST,L).replace(r.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(r.PCT_ENCODED,t).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,L).replace(r.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(r.PCT_ENCODED,t).replace(r.NOT_QUERY,L).replace(r.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,t).replace(r.NOT_FRAGMENT,L).replace(r.PCT_ENCODED,o)),e}function M(e){return e.replace(/^0*(.*)/,"$1")||"0"}function K(e,r){var t=e.match(r.IPV4ADDRESS)||[],n=l(t,2)[1];return n?n.split(".").map(M).join("."):e}function Z(e,r){var t=e.match(r.IPV6ADDRESS)||[],n=l(t,3),o=n[1],a=n[2];if(o){for(var i=o.toLowerCase().split("::").reverse(),s=l(i,2),c=s[0],u=s[1],p=u?u.split(":").map(M):[],f=c.split(":").map(M),d=r.IPV4ADDRESS.test(f[f.length-1]),h=d?7:8,v=f.length-h,y=Array(h),m=0;m<h;++m)y[m]=p[m]||f[v+m]||"";d&&(y[h-1]=K(y[h-1],r));var g=y.reduce((function(e,r,t){if(!r||"0"===r){var n=e[e.length-1];n&&n.index+n.length===t?n.length++:e.push({index:t,length:1})}return e}),[]).sort((function(e,r){return r.length-e.length}))[0],b=void 0;if(g&&g.length>1){var w=y.slice(0,g.index),E=y.slice(g.index+g.length);b=w.join(":")+"::"+E.join(":")}else b=y.join(":");return a&&(b+="%"+a),b}return e}var J=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,B=void 0==="".match(/(){0}/)[1];function W(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t={},n=!1!==r.iri?u:c;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(J);if(o){B?(t.scheme=o[1],t.userinfo=o[3],t.host=o[4],t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=o[7],t.fragment=o[8],isNaN(t.port)&&(t.port=o[5])):(t.scheme=o[1]||void 0,t.userinfo=-1!==e.indexOf("@")?o[3]:void 0,t.host=-1!==e.indexOf("//")?o[4]:void 0,t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=-1!==e.indexOf("?")?o[7]:void 0,t.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(t.port)&&(t.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),t.host&&(t.host=Z(K(t.host,n),n)),void 0!==t.scheme||void 0!==t.userinfo||void 0!==t.host||void 0!==t.port||t.path||void 0!==t.query?void 0===t.scheme?t.reference="relative":void 0===t.fragment?t.reference="absolute":t.reference="uri":t.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==t.reference&&(t.error=t.error||"URI is not a "+r.reference+" reference.");var a=z[(r.scheme||t.scheme||"").toLowerCase()];if(r.unicodeSupport||a&&a.unicodeSupport)V(t,n);else{if(t.host&&(r.domainHost||a&&a.domainHost))try{t.host=q.toASCII(t.host.replace(n.PCT_ENCODED,H).toLowerCase())}catch(e){t.error=t.error||"Host's domain name can not be converted to ASCII via punycode: "+e}V(t,c)}a&&a.parse&&a.parse(t,r)}else t.error=t.error||"URI can not be parsed.";return t}function G(e,r){var t=!1!==r.iri?u:c,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(Z(K(String(e.host),t),t).replace(t.IPV6ADDRESS,(function(e,r,t){return"["+r+(t?"%25"+t:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}var Q=/^\.\.?\//,Y=/^\/\.(\/|$)/,X=/^\/\.\.(\/|$)/,ee=/^\/?(?:.|\n)*?(?=\/|$)/;function re(e){for(var r=[];e.length;)if(e.match(Q))e=e.replace(Q,"");else if(e.match(Y))e=e.replace(Y,"/");else if(e.match(X))e=e.replace(X,"/"),r.pop();else if("."===e||".."===e)e="";else{var t=e.match(ee);if(!t)throw new Error("Unexpected dot segment condition");var n=t[0];e=e.slice(n.length),r.push(n)}return r.join("")}function te(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.iri?u:c,n=[],o=z[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(t.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?q.toUnicode(e.host):q.toASCII(e.host.replace(t.PCT_ENCODED,H).toLowerCase())}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+t}V(e,t),"suffix"!==r.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var a=G(e,r);if(void 0!==a&&("suffix"!==r.reference&&n.push("//"),n.push(a),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var i=e.path;r.absolutePath||o&&o.absolutePath||(i=re(i)),void 0===a&&(i=i.replace(/^\/\//,"/%2F")),n.push(i)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function ne(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=W(te(e,t),t),r=W(te(r,t),t)),!(t=t||{}).tolerant&&r.scheme?(n.scheme=r.scheme,n.userinfo=r.userinfo,n.host=r.host,n.port=r.port,n.path=re(r.path||""),n.query=r.query):(void 0!==r.userinfo||void 0!==r.host||void 0!==r.port?(n.userinfo=r.userinfo,n.host=r.host,n.port=r.port,n.path=re(r.path||""),n.query=r.query):(r.path?("/"===r.path.charAt(0)?n.path=re(r.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:n.path=r.path:n.path="/"+r.path,n.path=re(n.path)),n.query=r.query):(n.path=e.path,void 0!==r.query?n.query=r.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=r.fragment,n}function oe(e,r,t){var n=i({scheme:"null"},t);return te(ne(W(e,n),W(r,n),n,!0),n)}function ae(e,r){return"string"==typeof e?e=te(W(e,r),r):"object"===n(e)&&(e=W(te(e,r),r)),e}function ie(e,r,t){return"string"==typeof e?e=te(W(e,t),t):"object"===n(e)&&(e=te(e,t)),"string"==typeof r?r=te(W(r,t),t):"object"===n(r)&&(r=te(r,t)),e===r}function se(e,r){return e&&e.toString().replace(r&&r.iri?u.ESCAPE:c.ESCAPE,L)}function ce(e,r){return e&&e.toString().replace(r&&r.iri?u.PCT_ENCODED:c.PCT_ENCODED,H)}var ue={scheme:"http",domainHost:!0,parse:function(e,r){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,r){var t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},le={scheme:"https",domainHost:ue.domainHost,parse:ue.parse,serialize:ue.serialize};function pe(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var fe={scheme:"ws",domainHost:!0,parse:function(e,r){var t=e;return t.secure=pe(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t},serialize:function(e,r){if(e.port!==(pe(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var t=e.resourceName.split("?"),n=l(t,2),o=n[0],a=n[1];e.path=o&&"/"!==o?o:void 0,e.query=a,e.resourceName=void 0}return e.fragment=void 0,e}},de={scheme:"wss",domainHost:fe.domainHost,parse:fe.parse,serialize:fe.serialize},he={},ve="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ye="[0-9A-Fa-f]",me=t(t("%[EFef]"+ye+"%"+ye+ye+"%"+ye+ye)+"|"+t("%[89A-Fa-f]"+ye+"%"+ye+ye)+"|"+t("%"+ye+ye)),ge="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",be=r("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),we="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Ee=new RegExp(ve,"g"),Se=new RegExp(me,"g"),Oe=new RegExp(r("[^]",ge,"[\\.]",'[\\"]',be),"g"),Ce=new RegExp(r("[^]",ve,we),"g"),Ae=Ce;function Ie(e){var r=H(e);return r.match(Ee)?r:e}var je={scheme:"mailto",parse:function(e,r){var t=e,n=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var o=!1,a={},i=t.query.split("&"),s=0,c=i.length;s<c;++s){var u=i[s].split("=");switch(u[0]){case"to":for(var l=u[1].split(","),p=0,f=l.length;p<f;++p)n.push(l[p]);break;case"subject":t.subject=ce(u[1],r);break;case"body":t.body=ce(u[1],r);break;default:o=!0,a[ce(u[0],r)]=ce(u[1],r)}}o&&(t.headers=a)}t.query=void 0;for(var d=0,h=n.length;d<h;++d){var v=n[d].split("@");if(v[0]=ce(v[0]),r.unicodeSupport)v[1]=ce(v[1],r).toLowerCase();else try{v[1]=q.toASCII(ce(v[1],r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[d]=v.join("@")}return t},serialize:function(e,r){var t=e,n=a(e.to);if(n){for(var i=0,s=n.length;i<s;++i){var c=String(n[i]),u=c.lastIndexOf("@"),l=c.slice(0,u).replace(Se,Ie).replace(Se,o).replace(Oe,L),p=c.slice(u+1);try{p=r.iri?q.toUnicode(p):q.toASCII(ce(p,r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+e}n[i]=l+"@"+p}t.path=n.join(",")}var f=e.headers=e.headers||{};e.subject&&(f.subject=e.subject),e.body&&(f.body=e.body);var d=[];for(var h in f)f[h]!==he[h]&&d.push(h.replace(Se,Ie).replace(Se,o).replace(Ce,L)+"="+f[h].replace(Se,Ie).replace(Se,o).replace(Ae,L));return d.length&&(t.query=d.join("&")),t}},Te=/^([^\:]+)\:(.*)/,xe={scheme:"urn",parse:function(e,r){var t=e.path&&e.path.match(Te),n=e;if(t){var o=r.scheme||n.scheme||"urn",a=t[1].toLowerCase(),i=t[2],s=o+":"+(r.nid||a),c=z[s];n.nid=a,n.nss=i,n.path=void 0,c&&(n=c.parse(n,r))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,r){var t=r.scheme||e.scheme||"urn",n=e.nid,o=t+":"+(r.nid||n),a=z[o];a&&(e=a.serialize(e,r));var i=e,s=e.nss;return i.path=(n||r.nid)+":"+s,i}},$e=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,De={scheme:"urn:uuid",parse:function(e,r){var t=e;return t.uuid=t.nss,t.nss=void 0,r.tolerant||t.uuid&&t.uuid.match($e)||(t.error=t.error||"UUID is not valid."),t},serialize:function(e,r){var t=e;return t.nss=(e.uuid||"").toLowerCase(),t}};z[ue.scheme]=ue,z[le.scheme]=le,z[fe.scheme]=fe,z[de.scheme]=de,z[je.scheme]=je,z[xe.scheme]=xe,z[De.scheme]=De,e.SCHEMES=z,e.pctEncChar=L,e.pctDecChars=H,e.parse=W,e.removeDotSegments=re,e.serialize=te,e.resolveComponents=ne,e.resolve=oe,e.normalize=ae,e.equal=ie,e.escapeComponent=se,e.unescapeComponent=ce,Object.defineProperty(e,"__esModule",{value:!0})}(r)}(0,o.exports);const a=o.exports,i={null:e=>null===e,boolean:e=>"boolean"==typeof e,object:e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,array:e=>Array.isArray(e),number:e=>"number"==typeof e,integer:e=>Number.isInteger(e),string:e=>"string"==typeof e};var s={jsonTypeOf:(e,r)=>i[r](e),resolveUrl:(e,r)=>{const t=a.resolve(e,r,{iri:!0});if(a.resolve(e,"",{iri:!0})&&"file"===a.parse(t).scheme&&"file"!==a.parse(e).scheme)throw Error(`Can't access file '${t}' resource from network context '${e}'`);return t},urlFragment:e=>a.unescapeComponent(a.parse(e).fragment)||"",pathRelative:(e,r)=>{if(e===r)return"";let t=1;const n=e.length-1,o=r.length-t,a=n<o?n:o;let i=-1,s=0;for(;s<a;s++){const n=e.charCodeAt(s+1);if(n!==r.charCodeAt(t+s))break;47===n&&(i=s)}if(o>a){if(47===r.charCodeAt(t+s))return r.slice(t+s+1);if(0===s)return r.slice(t+s)}n>a&&(47===e.charCodeAt(s+1)?i=s:0===a&&(i=0));let c="";for(s=i+2;s<=e.length;++s)s!==e.length&&47!==e.charCodeAt(s)||(c+=0===c.length?"..":"/..");return t+=i,c.length>0?`${c}${r.slice(t,r.length)}`:(47===r.charCodeAt(t)&&++t,r.slice(t,r.length))}};const c=t,u=e=>{if(e.length>0&&"/"!==e[0])throw Error("Invalid JSON Pointer");return e.split("/").slice(1).map(y)},l=(e,r,t,n)=>{if(0===e.length)return t;if(e.length>1){const o=e.shift();return{...r,[o]:l(e,g(r,o,n),t,h(o,n))}}if(Array.isArray(r)){const n=[...r];return n[m(r,e[0])]=t,n}return"object"==typeof r&&null!==r?{...r,[e[0]]:t}:g(r,e[0],n)},p=(e,r,t,n)=>{if(0!==e.length)if(1!==e.length||b(r)){const o=e.shift();p(e,g(r,o,n),t,h(o,n))}else{r[m(r,e[0])]=t}},f=(e,r,t)=>{if(0!=e.length){if(e.length>1){const n=e.shift(),o=g(r,n,t);return{...r,[n]:f(e,o,h(n,t))}}if(Array.isArray(r))return r.filter(((r,t)=>t!=e[0]));if("object"==typeof r&&null!==r){const{[e[0]]:t,...n}=r;return n}return g(r,e[0],t)}},d=(e,r,t)=>{if(0!==e.length)if(e.length>1){const n=e.shift(),o=g(r,n,t);d(e,o,h(n,t))}else Array.isArray(r)?r.splice(e[0],1):"object"==typeof r&&null!==r?delete r[e[0]]:g(r,e[0],t)},h=c(((e,r)=>r+"/"+v(e))),v=e=>e.toString().replace(/~/g,"~0").replace(/\//g,"~1"),y=e=>e.toString().replace(/~1/g,"/").replace(/~0/g,"~"),m=(e,r)=>Array.isArray(e)&&"-"===r?e.length:r,g=(e,r,t="")=>{if(void 0===e)throw TypeError(`Value at '${t}' is undefined and does not have property '${r}'`);if(null===e)throw TypeError(`Value at '${t}' is null and does not have property '${r}'`);if(b(e))throw TypeError(`Value at '${t}' is a ${typeof e} and does not have property '${r}'`);return e[m(e,r)]},b=e=>null===e||"object"!=typeof e;var w={nil:"",append:h,get:(e,r)=>{const t=u(e),n=e=>t.reduce((([e,r],t)=>[g(e,t,r),h(t,r)]),[e,""])[0];return void 0===r?n:n(r)},set:(e,r,t)=>{const n=u(e),o=c(((e,r)=>l(n,e,r,"")));return void 0===r?o:o(r,t)},assign:(e,r,t)=>{const n=u(e),o=c(((e,r)=>p(n,e,r,"")));return void 0===r?o:o(r,t)},unset:(e,r)=>{const t=u(e),n=e=>f(t,e,"");return void 0===r?n:n(r)},remove:(e,r)=>{const t=u(e),n=e=>d(t,e,"");return void 0===r?n:n(r)}};const E=Symbol("$__value"),S=Symbol("$__href");var O={cons:(e,r)=>Object.freeze({[S]:e,[E]:r}),isReference:e=>e&&void 0!==e[S],href:e=>e[S],value:e=>e[E]};const C=w,A=t,{resolveUrl:I,jsonTypeOf:j}=s,T=O,x=Object.freeze({id:"",pointer:"",instance:void 0,value:void 0}),$=e=>T.isReference(e.value)?T.value(e.value):e.value,D=A(((e,r)=>j($(e),r))),P=(e,r)=>Object.freeze({...r,pointer:C.append(e,r.pointer),value:$(r)[e]}),N=A(((e,r)=>$(r).map(((t,n,o,a)=>e(P(n,r),n,o,a))))),R=A(((e,r)=>$(r).forEach(((t,n,o,a)=>e(P(n,r),n,o,a))))),F=A(((e,r)=>$(r).map(((e,t,n,o)=>P(t,r))).filter(((r,t,n,o)=>e(r,t,n,o))))),_=A(((e,r,t)=>$(t).reduce(((r,n,o)=>e(r,P(o,t),o)),r))),U=A(((e,r)=>$(r).every(((t,n,o,a)=>e(P(n,r),n,o,a))))),k=A(((e,r)=>$(r).some(((t,n,o,a)=>e(P(n,r),n,o,a)))));var q={nil:x,cons:(e,r="")=>Object.freeze({...x,id:I(r,""),instance:e,value:e}),get:(e,r=x)=>{if(!e.startsWith("#"))throw Error(`No JSON document found at '${e.split("#")[0]}'`);return Object.freeze({...r,pointer:e.substr(1)})},uri:e=>`${e.id}#${encodeURI(e.pointer)}`,value:$,has:(e,r)=>e in $(r),typeOf:D,length:e=>$(e).length,step:P,entries:e=>Object.keys($(e)).map((r=>[r,P(r,e)])),keys:e=>Object.keys($(e)),map:N,forEach:R,filter:F,reduce:_,every:U,some:k},z=async e=>Object.entries(await e);var L=t((async(e,r)=>(await r).map(e)));var H=t((async(e,r,t)=>(await t).reduce((async(r,t)=>e(await r,t)),r)));const V=H;var M=t((async(e,r,t={})=>V((async(r,t)=>await e(t)?r.concat([t]):r),[],r,t)));const K=L;var Z=t((async(e,r)=>{const t=await K(e,r);return(await Promise.all(t)).some((e=>e))}));const J=L;var B=t((async(e,r)=>{const t=await J(e,r);return(await Promise.all(t)).every((e=>e))}));var W=t(((e,r)=>e.reduce((async(e,r)=>r(await e)),r)));const G=W,Q=z,Y=H;var X={entries:z,map:L,filter:M,reduce:H,some:Z,every:B,pipeline:W,all:e=>Promise.all(e),allValues:e=>G([Q,Y((async(e,[r,t])=>(e[r]=await t,e)),{})],e)},ee=fetch,re={},te=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,ne=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,oe=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,ae=/\\([\u000b\u0020-\u00ff])/g,ie=/([\\"])/g,se=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;function ce(e){var r=String(e);if(oe.test(r))return r;if(r.length>0&&!ne.test(r))throw new TypeError("invalid parameter value");return'"'+r.replace(ie,"\\$1")+'"'}function ue(e){this.parameters=Object.create(null),this.type=e}re.format=function(e){if(!e||"object"!=typeof e)throw new TypeError("argument obj is required");var r=e.parameters,t=e.type;if(!t||!se.test(t))throw new TypeError("invalid type");var n=t;if(r&&"object"==typeof r)for(var o,a=Object.keys(r).sort(),i=0;i<a.length;i++){if(o=a[i],!oe.test(o))throw new TypeError("invalid parameter name");n+="; "+o+"="+ce(r[o])}return n},re.parse=function(e){if(!e)throw new TypeError("argument string is required");var r="object"==typeof e?function(e){var r;"function"==typeof e.getHeader?r=e.getHeader("content-type"):"object"==typeof e.headers&&(r=e.headers&&e.headers["content-type"]);if("string"!=typeof r)throw new TypeError("content-type header is missing from object");return r}(e):e;if("string"!=typeof r)throw new TypeError("argument string is required to be a string");var t=r.indexOf(";"),n=-1!==t?r.substr(0,t).trim():r.trim();if(!se.test(n))throw new TypeError("invalid media type");var o=new ue(n.toLowerCase());if(-1!==t){var a,i,s;for(te.lastIndex=t;i=te.exec(r);){if(i.index!==t)throw new TypeError("invalid parameter format");t+=i[0].length,a=i[1].toLowerCase(),'"'===(s=i[2])[0]&&(s=s.substr(1,s.length-2).replace(ae,"$1")),o.parameters[a]=s}if(t!==r.length)throw new TypeError("invalid parameter format")}return o};const le=re,pe={};var fe={addPlugin:(e,r)=>{pe[e]=r},parse:e=>{const r=le.parse(e.headers.get("content-type"));if(!(r.type in pe))throw Error(`${e.url} is not a schema. Found a document with media type: ${r.type}`);return pe[r.type].parse(e,r.parameters)},getContentType:e=>{for(const r in pe)if(pe[r].matcher(e))return r;return"application/octet-stream"}};const de=t,he=X,ve=w,{jsonTypeOf:ye,resolveUrl:me,urlFragment:ge,pathRelative:be}=s,we=ee,Ee=O,Se=fe,Oe="https://json-schema.org/draft/2019-09/vocab/core",Ce="https://json-schema.org/draft/2020-12/vocab/core",Ae={},Ie={},je=(e,r)=>{const t=Ie[e];return Ae[t]?.[r]},Te={},xe={},$e=(e,r="",t="")=>{e=JSON.parse(JSON.stringify(e));const n=me(r,""),o=me(e.$schema||t,"");if(!o)throw Error("Couldn't determine schema dialect");if(delete e.$schema,!(o in Ie))if(!0===e?.$vocabulary?.[Oe]&&o===De(e,n,Oe)[0])Ie[o]=Oe;else if(!0===e?.$vocabulary?.[Ce]&&o===De(e,n,Ce)[0])Ie[o]=Ce;else{const e=Te[o];if(!e)throw Error(`Couldn't determine JSON Schema version for dialect: '${o}'`);!0===e.vocabulary[Oe]?Ie[o]=Oe:!0===e.vocabulary[Ce]?Ie[o]=Ce:Ie[o]=Ie[e.dialectId]}const[a,i]=De(e,n,Ie[o]);if(!a)throw Error("Couldn't determine an identifier for the schema");const s=je(o,"baseToken");delete e[s],n&&(xe[n]=a);const c=je(o,"anchorToken");i&&s===c&&(e[c]=c!==s?encodeURI(i):`#${encodeURI(i)}`);const u={},l=je(o,"recursiveAnchorToken");let p;!0===e[l]&&(u[""]=`${a}#`,e[c]="",delete e[l]);const f=je(o,"vocabularyToken");ye(e[f],"object")?(p=e[f],delete e[f]):p={[Ie[o]]:!0};const d={"":""};return Te[a]={id:a,dialectId:o,schema:Pe(e,a,o,ve.nil,d,u),anchors:d,dynamicAnchors:u,vocabulary:p,validated:!1},a},De=(e,r,t)=>{const n=Ae[t]?.baseToken,o=me(r,e[n]||"");return[me(o,""),ge(o)]},Pe=(e,r,t,n,o,a)=>{if(ye(e,"object")){const i="string"==typeof e.$schema?me(e.$schema,""):t,s=je(i,"embeddedToken"),c=je(i,"anchorToken");if("string"==typeof e[s]&&(s!==c||"#"!==e[s][0])){const n=me(r,e[s]);return e[je(i,"baseToken")]=n,$e(e,n,t),Ee.cons(e[s],e)}const u=je(t,"anchorToken"),l=je(t,"dynamicAnchorToken");"string"==typeof e[l]&&(a[e[l]]=`${r}#${encodeURI(n)}`,o[e[l]]=n,delete e[l]);const p=je(t,"embeddedToken");if("string"==typeof e[u]){const r=u!==p?e[u]:e[u].slice(1);o[r]=n,delete e[u]}const f=je(t,"jrefToken");if("string"==typeof e[f])return Ee.cons(e[f],e);for(const i in e)e[i]=Pe(e[i],r,t,ve.append(i,n),o,a);return e}return Array.isArray(e)?e.map(((e,i)=>Pe(e,r,t,ve.append(i,n),o,a))):e},Ne=e=>Te[xe[e]]||Te[e],Re=Object.freeze({id:"",dialectId:void 0,vocabulary:{},pointer:ve.nil,schema:void 0,value:void 0,anchors:{},dynamicAnchors:{},validated:!0}),Fe=async(e,r=Re)=>{const t=me(ke(r),e),n=me(t,""),o=ge(t);if(!(e=>e in Te||e in xe)(n)){const e=await we(n,{headers:{Accept:"application/schema+json"}});if(e.status>=400)throw await e.text(),Error(`Failed to retrieve schema with id: ${n}`);const[r,t]=await Se.parse(e);let o;o=r.$schema?me(r.$schema,""):t?me(n,t):"",o&&n!==o&&!(o in Ie)&&await Fe(o),$e(r,n,o)}const a=Ne(n),i="/"!==o[0]?Ue(a,o):o,s=Object.freeze({...a,pointer:i,value:ve.get(i,a.schema)});return _e(s)},_e=e=>Ee.isReference(e.value)?Fe(Ee.href(e.value),e):e,Ue=(e,r)=>{if(!(r in e.anchors))throw Error(`No such anchor '${encodeURI(e.id)}#${encodeURI(r)}'`);return e.anchors[r]},ke=e=>`${e.id}#${encodeURI(e.pointer)}`,qe=e=>Ee.isReference(e.value)?Ee.value(e.value):e.value,ze=(e,r)=>{const t=Ne(r.id),n=Object.freeze({...r,pointer:ve.append(e,r.pointer),value:qe(r)[e],validated:t.validated});return _e(n)},Le=de(((e,r)=>he.pipeline([qe,he.map((async(t,n)=>e(await ze(n,r),n))),he.all],r))),He={parentId:"",parentDialect:"",includeEmbedded:!0},Ve=(e,r)=>{if(r.startsWith("file://")){const t=e.slice(7,e.lastIndexOf("/"));return""===e?"":be(t,r.slice(7))}return r};var Me={setConfig:(e,r,t)=>{Ie[e]=e,Ae[e]||(Ae[e]={}),Ae[e][r]=t},getConfig:je,add:$e,get:Fe,markValidated:e=>{Te[e].validated=!0},uri:ke,value:qe,getAnchorPointer:Ue,typeOf:(e,r)=>ye(qe(e),r),has:(e,r)=>e in qe(r),step:ze,keys:e=>Object.keys(qe(e)),entries:e=>he.pipeline([qe,Object.keys,he.map((async r=>[r,await ze(r,e)])),he.all],e),map:Le,length:e=>qe(e).length,toSchema:(e,r={})=>{const t={...He,...r},n=JSON.parse(JSON.stringify(e.schema,((r,n)=>{if(!Ee.isReference(n))return n;const o=Ee.value(n),a="string"==typeof o.$schema?me(o.$schema,""):e.dialectId,i=je(a,"embeddedToken");return!t.includeEmbedded&&i in o?void 0:Ee.value(n)}))),o=je(e.dialectId,"dynamicAnchorToken");Object.entries(e.dynamicAnchors).forEach((([e,r])=>{const t=ve.append(o,ge(r));ve.assign(t,n,e)}));const a=je(e.dialectId,"anchorToken");Object.entries(e.anchors).filter((([r])=>""!==r&&!(r in e.dynamicAnchors))).forEach((([e,r])=>{const t=ve.append(a,r);ve.assign(t,n,e)}));const i=je(e.dialectId,"baseToken"),s=Ve(t.parentId,e.id),c=t.parentDialect===e.dialectId?"":e.dialectId;return{...s&&{[i]:s},...c&&{$schema:c},...n}}};class Ke extends Error{constructor(e){super("Invalid Schema"),this.name=this.constructor.name,this.output=e}}var Ze=Ke;const Je=Me;var Be={compile:e=>Je.value(e),interpret:()=>!0};const We=t,Ge=n.exports,{resolveUrl:Qe}=s,Ye=q,Xe=Me,er=Ze,rr=fe,tr=Be,nr="FLAG",or="BASIC",ar="DETAILED",ir="VERBOSE";let sr=ar,cr=!0;rr.addPlugin("application/schema+json",{parse:async(e,r)=>[await e.json(),r.schema||r.profile],matcher:e=>e.endsWith(".schema.json")});const ur=async e=>{const r={metaData:{}};return{ast:r,schemaUri:await mr(e,r)}},lr=We((({ast:e,schemaUri:r},t,n=nr)=>{if(![nr,or,ar,ir].includes(n))throw Error(`The '${n}' error format is not supported`);const o=[],a=Ge.subscribe("result",pr(n,o));return br(r,t,e,{}),Ge.unsubscribe(a),o[0]})),pr=(e,r)=>{const t=[];return(n,o)=>{if("result"===n){const{keyword:e,absoluteKeywordLocation:r,instanceLocation:n,valid:a}=o,i={keyword:e,absoluteKeywordLocation:r,instanceLocation:n,valid:a,errors:[]};t.push(i)}else if("result.start"===n)t.push(n);else if("result.end"===n){const n=t.pop();for(;"result.start"!==t[t.length-1];){const r=t.pop(),o=[r];e===or&&(o.push(...r.errors),delete r.errors),(e===ir||e!==nr&&!r.valid)&&n.errors.unshift(...o)}t[t.length-1]=n,r[0]=n}}},fr={},dr=e=>fr[e]||tr,hr=e=>e in fr,vr={},yr={},mr=async(e,r)=>{if(e=await gr(e),!hr(`${e.dialectId}#validate`)){const r=await Xe.get(e.dialectId);(Xe.getConfig(r.id,"mandatoryVocabularies")||[]).forEach((e=>{if(!r.vocabulary[e])throw Error(`Vocabulary '${e}' must be explicitly declared and required`)})),Object.entries(r.vocabulary).forEach((([e,t])=>{if(e in vr)Object.entries(vr[e]).forEach((([e,t])=>{((e,r)=>{fr[e]={collectEvaluatedItems:(e,t,n,o,a)=>r.interpret(e,t,n,o,a)&&new Set,collectEvaluatedProperties:(e,t,n,o,a)=>r.interpret(e,t,n,o,a)&&[],...r}})(`${r.id}#${e}`,t)}));else if(t)throw Error(`Missing required vocabulary: ${e}`)}))}if(cr&&!e.validated){if(Xe.markValidated(e.id),!(e.dialectId in yr)){const r=await Xe.get(e.dialectId),t=await ur(r);yr[r.id]=lr(t)}const r=Ye.cons(e.schema,e.id),t=yr[e.dialectId](r,sr);if(!t.valid)throw new er(t)}return e.id in r.metaData||(r.metaData[e.id]={id:e.id,dynamicAnchors:e.dynamicAnchors,anchors:e.anchors}),dr(`${e.dialectId}#validate`).compile(e,r)},gr=async e=>Xe.typeOf(e,"string")?gr(await Xe.get(Xe.value(e),e)):e,br=(e,r,t,n)=>{const o=wr(e,t),a=Qe(e,"");return dr(o).interpret(e,r,t,{...t.metaData[a].dynamicAnchors,...n})},wr=(e,r)=>{if(!(e in r))throw Error(`No schema found at ${e}`);return r[e][0]};var Er={validate:async(e,r,t)=>{const n=await ur(e),o=(e,r)=>lr(n,Ye.cons(e),r);return void 0===r?o:o(r,t)},compile:ur,interpret:lr,setMetaOutputFormat:e=>{sr=e},setShouldMetaValidate:e=>{cr=e},FLAG:nr,BASIC:or,DETAILED:ar,VERBOSE:ir,add:(e,r="",t="")=>{const n=Xe.add(e,r,t);delete yr[n]},getKeyword:dr,hasKeyword:hr,defineVocabulary:(e,r)=>{vr[e]=r},compileSchema:mr,interpretSchema:br,collectEvaluatedProperties:(e,r,t,n,o)=>{const a=wr(e,t);return dr(a).collectEvaluatedProperties(e,r,t,n,o)},collectEvaluatedItems:(e,r,t,n,o)=>{const a=wr(e,t);return dr(a).collectEvaluatedItems(e,r,t,n,o)},addMediaTypePlugin:rr.addPlugin};const Sr=X,Or=n.exports,Cr=Er,Ar=q,Ir=Me;var jr={compile:async(e,r)=>{const t=Ir.uri(e);if(!(t in r)){r[t]=!1;const n=Ir.value(e);if(!["object","boolean"].includes(typeof n))throw Error(`No schema found at '${Ir.uri(e)}'`);r[t]=[`${e.dialectId}#validate`,Ir.uri(e),"boolean"==typeof n?n:await Sr.pipeline([Ir.entries,Sr.map((([r,t])=>[`${e.dialectId}#${r}`,t])),Sr.filter((([r])=>r!==`${e.dialectId}#validate`)),Sr.map((async([t,n])=>{const o=await Cr.getKeyword(t).compile(n,r,e);return[t,Ir.uri(n),o]})),Sr.all],e)]}return t},interpret:(e,r,t,n)=>{const[o,a,i]=t[e];Or.publishSync("result.start");const s="boolean"==typeof i?i:i.every((([e,o,a])=>{Or.publishSync("result.start");const i=Cr.getKeyword(e).interpret(a,r,t,n);return Or.publishSync("result",{keyword:e,absoluteKeywordLocation:o,instanceLocation:Ar.uri(r),valid:i,ast:a}),Or.publishSync("result.end"),i}));return Or.publishSync("result",{keyword:o,absoluteKeywordLocation:a,instanceLocation:Ar.uri(r),valid:s,ast:e}),Or.publishSync("result.end"),s},collectEvaluatedProperties:(e,r,t,n,o=!1)=>{const a=t[e][2];return"boolean"==typeof a?!!a&&[]:a.filter((([e])=>!o||!e.endsWith("#unevaluatedProperties"))).reduce(((e,[o,,a])=>{const i=e&&Cr.getKeyword(o).collectEvaluatedProperties(a,r,t,n);return!1!==i&&[...e,...i]}),[])},collectEvaluatedItems:(e,r,t,n,o=!1)=>{const a=t[e][2];return"boolean"==typeof a?!!a&&new Set:a.filter((([e])=>!o||!e.endsWith("#unevaluatedItems"))).reduce(((e,[o,,a])=>{const i=!1!==e&&Cr.getKeyword(o).collectEvaluatedItems(a,r,t,n);return!1!==i&&new Set([...e,...i])}),new Set)}};var Tr={Core:Er,Schema:Me,Instance:q,Reference:O,Keywords:{metaData:Be,validate:jr},InvalidSchemaError:Ze};e.default=Tr,Object.defineProperty(e,"__esModule",{value:!0})}));
define(["exports"],(function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},r=function(e,t){return function r(){null==t&&(t=e.length);var n=[].slice.call(arguments);return n.length>=t?e.apply(this,n):function(){return r.apply(this,n.concat([].slice.call(arguments)))}}};var n={exports:{}};!function(e,r){!function(t,n){var o={};t.PubSub?(o=t.PubSub,console.warn("PubSub already loaded, using existing version")):(t.PubSub=o,function(e){var t={},r=-1,n="*";function o(e){var t;for(t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!0;return!1}function a(e){return function(){throw e}}function i(e,t,r){try{e(t,r)}catch(e){setTimeout(a(e),0)}}function s(e,t,r){e(t,r)}function c(e,r,n,o){var a,c=t[r],u=o?s:i;if(Object.prototype.hasOwnProperty.call(t,r))for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&u(c[a],e,n)}function u(e,t,r){return function(){var o=String(e),a=o.lastIndexOf(".");for(c(e,e,t,r);-1!==a;)a=(o=o.substr(0,a)).lastIndexOf("."),c(e,o,t,r);c(e,n,t,r)}}function l(e){var r=String(e);return Boolean(Object.prototype.hasOwnProperty.call(t,r)&&o(t[r]))}function p(e){for(var t=String(e),r=l(t)||l(n),o=t.lastIndexOf(".");!r&&-1!==o;)o=(t=t.substr(0,o)).lastIndexOf("."),r=l(t);return r}function f(e,t,r,n){var o=u(e="symbol"==typeof e?e.toString():e,t,n);return!!p(e)&&(!0===r?o():setTimeout(o,0),!0)}e.publish=function(t,r){return f(t,r,!1,e.immediateExceptions)},e.publishSync=function(t,r){return f(t,r,!0,e.immediateExceptions)},e.subscribe=function(e,n){if("function"!=typeof n)return!1;e="symbol"==typeof e?e.toString():e,Object.prototype.hasOwnProperty.call(t,e)||(t[e]={});var o="uid_"+String(++r);return t[e][o]=n,o},e.subscribeAll=function(t){return e.subscribe(n,t)},e.subscribeOnce=function(t,r){var n=e.subscribe(t,(function(){e.unsubscribe(n),r.apply(this,arguments)}));return e},e.clearAllSubscriptions=function(){t={}},e.clearSubscriptions=function(e){var r;for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&0===r.indexOf(e)&&delete t[r]},e.countSubscriptions=function(e){var r,n,o=0;for(r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&0===r.indexOf(e)){for(n in t[r])o++;break}return o},e.getSubscriptions=function(e){var r,n=[];for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&0===r.indexOf(e)&&n.push(r);return n},e.unsubscribe=function(r){var n,o,a,i=function(e){var r;for(r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&0===r.indexOf(e))return!0;return!1},s="string"==typeof r&&(Object.prototype.hasOwnProperty.call(t,r)||i(r)),c=!s&&"string"==typeof r,u="function"==typeof r,l=!1;if(!s){for(n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(o=t[n],c&&o[r]){delete o[r],l=r;break}if(u)for(a in o)Object.prototype.hasOwnProperty.call(o,a)&&o[a]===r&&(delete o[a],l=!0)}return l}e.clearSubscriptions(r)}}(o)),void 0!==e&&e.exports&&(r=e.exports=o),r.PubSub=o,e.exports=r=o}("object"==typeof window&&window||t)}(n,n.exports);var o={exports:{}};
/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */!function(e,t){!function(e){function t(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(t.length>1){t[0]=t[0].slice(0,-1);for(var n=t.length-1,o=1;o<n;++o)t[o]=t[o].slice(1,-1);return t[n]=t[n].slice(1),t.join("")}return t[0]}function r(e){return"(?:"+e+")"}function n(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function a(e){return null!=e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function i(e,t){var r=e;if(t)for(var n in t)r[n]=t[n];return r}function s(e){var n="[A-Za-z]",o="[0-9]",a=t(o,"[A-Fa-f]"),i=r(r("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+r("%[89A-Fa-f]"+a+"%"+a+a)+"|"+r("%"+a+a)),s="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",c=t("[\\:\\/\\?\\#\\[\\]\\@]",s),u=e?"[\\uE000-\\uF8FF]":"[]",l=t(n,o,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");r(n+t(n,o,"[\\+\\-\\.]")+"*"),r(r(i+"|"+t(l,s,"[\\:]"))+"*");var p=r(r("25[0-5]")+"|"+r("2[0-4]"+o)+"|"+r("1"+o+o)+"|"+r("0?[1-9]"+o)+"|0?0?"+o),f=r(p+"\\."+p+"\\."+p+"\\."+p),h=r(a+"{1,4}"),d=r(r(h+"\\:"+h)+"|"+f),v=r(r(h+"\\:")+"{6}"+d),y=r("\\:\\:"+r(h+"\\:")+"{5}"+d),g=r(r(h)+"?\\:\\:"+r(h+"\\:")+"{4}"+d),m=r(r(r(h+"\\:")+"{0,1}"+h)+"?\\:\\:"+r(h+"\\:")+"{3}"+d),b=r(r(r(h+"\\:")+"{0,2}"+h)+"?\\:\\:"+r(h+"\\:")+"{2}"+d),w=r(r(r(h+"\\:")+"{0,3}"+h)+"?\\:\\:"+h+"\\:"+d),E=r(r(r(h+"\\:")+"{0,4}"+h)+"?\\:\\:"+d),x=r(r(r(h+"\\:")+"{0,5}"+h)+"?\\:\\:"+h),S=r(r(r(h+"\\:")+"{0,6}"+h)+"?\\:\\:"),O=r([v,y,g,m,b,w,E,x,S].join("|")),C=r(r(l+"|"+i)+"+");r("[vV]"+a+"+\\."+t(l,s,"[\\:]")+"+"),r(r(i+"|"+t(l,s))+"*");var A=r(i+"|"+t(l,s,"[\\:\\@]"));return r(r(i+"|"+t(l,s,"[\\@]"))+"+"),r(r(A+"|"+t("[\\/\\?]",u))+"*"),{NOT_SCHEME:new RegExp(t("[^]",n,o,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(t("[^\\%\\:]",l,s),"g"),NOT_HOST:new RegExp(t("[^\\%\\[\\]\\:]",l,s),"g"),NOT_PATH:new RegExp(t("[^\\%\\/\\:\\@]",l,s),"g"),NOT_PATH_NOSCHEME:new RegExp(t("[^\\%\\/\\@]",l,s),"g"),NOT_QUERY:new RegExp(t("[^\\%]",l,s,"[\\:\\@\\/\\?]",u),"g"),NOT_FRAGMENT:new RegExp(t("[^\\%]",l,s,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(t("[^]",l,s),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(t("[^\\%]",l,c),"g"),PCT_ENCODED:new RegExp(i,"g"),IPV4ADDRESS:new RegExp("^("+f+")$"),IPV6ADDRESS:new RegExp("^\\[?("+O+")"+r(r("\\%25|\\%(?!"+a+"{2})")+"("+C+")")+"?\\]?$")}}var c=s(!1),u=s(!0),l=function(){function e(e,t){var r=[],n=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(n=(i=s.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(o)throw a}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),p=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)},f=2147483647,h=36,d=1,v=26,y=38,g=700,m=72,b=128,w="-",E=/^xn--/,x=/[^\0-\x7E]/,S=/[\x2E\u3002\uFF0E\uFF61]/g,O={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},C=h-d,A=Math.floor,k=String.fromCharCode;function T(e){throw new RangeError(O[e])}function j(e,t){for(var r=[],n=e.length;n--;)r[n]=t(e[n]);return r}function I(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+j((e=e.replace(S,".")).split("."),t).join(".")}function $(e){for(var t=[],r=0,n=e.length;r<n;){var o=e.charCodeAt(r++);if(o>=55296&&o<=56319&&r<n){var a=e.charCodeAt(r++);56320==(64512&a)?t.push(((1023&o)<<10)+(1023&a)+65536):(t.push(o),r--)}else t.push(o)}return t}var P=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:h},R=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},N=function(e,t,r){var n=0;for(e=r?A(e/g):e>>1,e+=A(e/t);e>C*v>>1;n+=h)e=A(e/C);return A(n+(C+1)*e/(e+y))},D=function(e){var t=[],r=e.length,n=0,o=b,a=m,i=e.lastIndexOf(w);i<0&&(i=0);for(var s=0;s<i;++s)e.charCodeAt(s)>=128&&T("not-basic"),t.push(e.charCodeAt(s));for(var c=i>0?i+1:0;c<r;){for(var u=n,l=1,p=h;;p+=h){c>=r&&T("invalid-input");var y=P(e.charCodeAt(c++));(y>=h||y>A((f-n)/l))&&T("overflow"),n+=y*l;var g=p<=a?d:p>=a+v?v:p-a;if(y<g)break;var E=h-g;l>A(f/E)&&T("overflow"),l*=E}var x=t.length+1;a=N(n-u,x,0==u),A(n/x)>f-o&&T("overflow"),o+=A(n/x),n%=x,t.splice(n++,0,o)}return String.fromCodePoint.apply(String,t)},_=function(e){var t=[],r=(e=$(e)).length,n=b,o=0,a=m,i=!0,s=!1,c=void 0;try{for(var u,l=e[Symbol.iterator]();!(i=(u=l.next()).done);i=!0){var p=u.value;p<128&&t.push(k(p))}}catch(e){s=!0,c=e}finally{try{!i&&l.return&&l.return()}finally{if(s)throw c}}var y=t.length,g=y;for(y&&t.push(w);g<r;){var E=f,x=!0,S=!1,O=void 0;try{for(var C,j=e[Symbol.iterator]();!(x=(C=j.next()).done);x=!0){var I=C.value;I>=n&&I<E&&(E=I)}}catch(e){S=!0,O=e}finally{try{!x&&j.return&&j.return()}finally{if(S)throw O}}var P=g+1;E-n>A((f-o)/P)&&T("overflow"),o+=(E-n)*P,n=E;var D=!0,_=!1,F=void 0;try{for(var q,U=e[Symbol.iterator]();!(D=(q=U.next()).done);D=!0){var z=q.value;if(z<n&&++o>f&&T("overflow"),z==n){for(var L=o,H=h;;H+=h){var V=H<=a?d:H>=a+v?v:H-a;if(L<V)break;var M=L-V,B=h-V;t.push(k(R(V+M%B,0))),L=A(M/B)}t.push(k(R(L,0))),a=N(o,P,g==y),o=0,++g}}}catch(e){_=!0,F=e}finally{try{!D&&U.return&&U.return()}finally{if(_)throw F}}++o,++n}return t.join("")},F=function(e){return I(e,(function(e){return E.test(e)?D(e.slice(4).toLowerCase()):e}))},q=function(e){return I(e,(function(e){return x.test(e)?"xn--"+_(e):e}))},U={version:"2.1.0",ucs2:{decode:$,encode:function(e){return String.fromCodePoint.apply(String,p(e))}},decode:D,encode:_,toASCII:q,toUnicode:F},z={};function L(e){var t=e.charCodeAt(0);return t<16?"%0"+t.toString(16).toUpperCase():t<128?"%"+t.toString(16).toUpperCase():t<2048?"%"+(t>>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function H(e){for(var t="",r=0,n=e.length;r<n;){var o=parseInt(e.substr(r+1,2),16);if(o<128)t+=String.fromCharCode(o),r+=3;else if(o>=194&&o<224){if(n-r>=6){var a=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((31&o)<<6|63&a)}else t+=e.substr(r,6);r+=6}else if(o>=224){if(n-r>=9){var i=parseInt(e.substr(r+4,2),16),s=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&s)}else t+=e.substr(r,9);r+=9}else t+=e.substr(r,3),r+=3}return t}function V(e,t){function r(e){var r=H(e);return r.match(t.UNRESERVED)?r:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,r).replace(t.NOT_USERINFO,L).replace(t.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_HOST,L).replace(t.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,r).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,L).replace(t.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,r).replace(t.NOT_QUERY,L).replace(t.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,r).replace(t.NOT_FRAGMENT,L).replace(t.PCT_ENCODED,o)),e}function M(e){return e.replace(/^0*(.*)/,"$1")||"0"}function B(e,t){var r=e.match(t.IPV4ADDRESS)||[],n=l(r,2)[1];return n?n.split(".").map(M).join("."):e}function J(e,t){var r=e.match(t.IPV6ADDRESS)||[],n=l(r,3),o=n[1],a=n[2];if(o){for(var i=o.toLowerCase().split("::").reverse(),s=l(i,2),c=s[0],u=s[1],p=u?u.split(":").map(M):[],f=c.split(":").map(M),h=t.IPV4ADDRESS.test(f[f.length-1]),d=h?7:8,v=f.length-d,y=Array(d),g=0;g<d;++g)y[g]=p[g]||f[v+g]||"";h&&(y[d-1]=B(y[d-1],t));var m=y.reduce((function(e,t,r){if(!t||"0"===t){var n=e[e.length-1];n&&n.index+n.length===r?n.length++:e.push({index:r,length:1})}return e}),[]).sort((function(e,t){return t.length-e.length}))[0],b=void 0;if(m&&m.length>1){var w=y.slice(0,m.index),E=y.slice(m.index+m.length);b=w.join(":")+"::"+E.join(":")}else b=y.join(":");return a&&(b+="%"+a),b}return e}var K=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,G=void 0==="".match(/(){0}/)[1];function Z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={},n=!1!==t.iri?u:c;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var o=e.match(K);if(o){G?(r.scheme=o[1],r.userinfo=o[3],r.host=o[4],r.port=parseInt(o[5],10),r.path=o[6]||"",r.query=o[7],r.fragment=o[8],isNaN(r.port)&&(r.port=o[5])):(r.scheme=o[1]||void 0,r.userinfo=-1!==e.indexOf("@")?o[3]:void 0,r.host=-1!==e.indexOf("//")?o[4]:void 0,r.port=parseInt(o[5],10),r.path=o[6]||"",r.query=-1!==e.indexOf("?")?o[7]:void 0,r.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(r.port)&&(r.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),r.host&&(r.host=J(B(r.host,n),n)),void 0!==r.scheme||void 0!==r.userinfo||void 0!==r.host||void 0!==r.port||r.path||void 0!==r.query?void 0===r.scheme?r.reference="relative":void 0===r.fragment?r.reference="absolute":r.reference="uri":r.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==r.reference&&(r.error=r.error||"URI is not a "+t.reference+" reference.");var a=z[(t.scheme||r.scheme||"").toLowerCase()];if(t.unicodeSupport||a&&a.unicodeSupport)V(r,n);else{if(r.host&&(t.domainHost||a&&a.domainHost))try{r.host=U.toASCII(r.host.replace(n.PCT_ENCODED,H).toLowerCase())}catch(e){r.error=r.error||"Host's domain name can not be converted to ASCII via punycode: "+e}V(r,c)}a&&a.parse&&a.parse(r,t)}else r.error=r.error||"URI can not be parsed.";return r}function W(e,t){var r=!1!==t.iri?u:c,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(J(B(String(e.host),r),r).replace(r.IPV6ADDRESS,(function(e,t,r){return"["+t+(r?"%25"+r:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}var Q=/^\.\.?\//,Y=/^\/\.(\/|$)/,X=/^\/\.\.(\/|$)/,ee=/^\/?(?:.|\n)*?(?=\/|$)/;function te(e){for(var t=[];e.length;)if(e.match(Q))e=e.replace(Q,"");else if(e.match(Y))e=e.replace(Y,"/");else if(e.match(X))e=e.replace(X,"/"),t.pop();else if("."===e||".."===e)e="";else{var r=e.match(ee);if(!r)throw new Error("Unexpected dot segment condition");var n=r[0];e=e.slice(n.length),t.push(n)}return t.join("")}function re(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.iri?u:c,n=[],o=z[(t.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,t),e.host)if(r.IPV6ADDRESS.test(e.host));else if(t.domainHost||o&&o.domainHost)try{e.host=t.iri?U.toUnicode(e.host):U.toASCII(e.host.replace(r.PCT_ENCODED,H).toLowerCase())}catch(r){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+r}V(e,r),"suffix"!==t.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var a=W(e,t);if(void 0!==a&&("suffix"!==t.reference&&n.push("//"),n.push(a),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var i=e.path;t.absolutePath||o&&o.absolutePath||(i=te(i)),void 0===a&&(i=i.replace(/^\/\//,"/%2F")),n.push(i)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function ne(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=Z(re(e,r),r),t=Z(re(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=te(t.path||""),n.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=te(t.path||""),n.query=t.query):(t.path?("/"===t.path.charAt(0)?n.path=te(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path:n.path="/"+t.path,n.path=te(n.path)),n.query=t.query):(n.path=e.path,void 0!==t.query?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function oe(e,t,r){var n=i({scheme:"null"},r);return re(ne(Z(e,n),Z(t,n),n,!0),n)}function ae(e,t){return"string"==typeof e?e=re(Z(e,t),t):"object"===n(e)&&(e=Z(re(e,t),t)),e}function ie(e,t,r){return"string"==typeof e?e=re(Z(e,r),r):"object"===n(e)&&(e=re(e,r)),"string"==typeof t?t=re(Z(t,r),r):"object"===n(t)&&(t=re(t,r)),e===t}function se(e,t){return e&&e.toString().replace(t&&t.iri?u.ESCAPE:c.ESCAPE,L)}function ce(e,t){return e&&e.toString().replace(t&&t.iri?u.PCT_ENCODED:c.PCT_ENCODED,H)}var ue={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){var r="https"===String(e.scheme).toLowerCase();return e.port!==(r?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},le={scheme:"https",domainHost:ue.domainHost,parse:ue.parse,serialize:ue.serialize};function pe(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var fe={scheme:"ws",domainHost:!0,parse:function(e,t){var r=e;return r.secure=pe(r),r.resourceName=(r.path||"/")+(r.query?"?"+r.query:""),r.path=void 0,r.query=void 0,r},serialize:function(e,t){if(e.port!==(pe(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var r=e.resourceName.split("?"),n=l(r,2),o=n[0],a=n[1];e.path=o&&"/"!==o?o:void 0,e.query=a,e.resourceName=void 0}return e.fragment=void 0,e}},he={scheme:"wss",domainHost:fe.domainHost,parse:fe.parse,serialize:fe.serialize},de={},ve="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ye="[0-9A-Fa-f]",ge=r(r("%[EFef]"+ye+"%"+ye+ye+"%"+ye+ye)+"|"+r("%[89A-Fa-f]"+ye+"%"+ye+ye)+"|"+r("%"+ye+ye)),me="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",be=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),we="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Ee=new RegExp(ve,"g"),xe=new RegExp(ge,"g"),Se=new RegExp(t("[^]",me,"[\\.]",'[\\"]',be),"g"),Oe=new RegExp(t("[^]",ve,we),"g"),Ce=Oe;function Ae(e){var t=H(e);return t.match(Ee)?t:e}var ke={scheme:"mailto",parse:function(e,t){var r=e,n=r.to=r.path?r.path.split(","):[];if(r.path=void 0,r.query){for(var o=!1,a={},i=r.query.split("&"),s=0,c=i.length;s<c;++s){var u=i[s].split("=");switch(u[0]){case"to":for(var l=u[1].split(","),p=0,f=l.length;p<f;++p)n.push(l[p]);break;case"subject":r.subject=ce(u[1],t);break;case"body":r.body=ce(u[1],t);break;default:o=!0,a[ce(u[0],t)]=ce(u[1],t)}}o&&(r.headers=a)}r.query=void 0;for(var h=0,d=n.length;h<d;++h){var v=n[h].split("@");if(v[0]=ce(v[0]),t.unicodeSupport)v[1]=ce(v[1],t).toLowerCase();else try{v[1]=U.toASCII(ce(v[1],t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[h]=v.join("@")}return r},serialize:function(e,t){var r=e,n=a(e.to);if(n){for(var i=0,s=n.length;i<s;++i){var c=String(n[i]),u=c.lastIndexOf("@"),l=c.slice(0,u).replace(xe,Ae).replace(xe,o).replace(Se,L),p=c.slice(u+1);try{p=t.iri?U.toUnicode(p):U.toASCII(ce(p,t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+e}n[i]=l+"@"+p}r.path=n.join(",")}var f=e.headers=e.headers||{};e.subject&&(f.subject=e.subject),e.body&&(f.body=e.body);var h=[];for(var d in f)f[d]!==de[d]&&h.push(d.replace(xe,Ae).replace(xe,o).replace(Oe,L)+"="+f[d].replace(xe,Ae).replace(xe,o).replace(Ce,L));return h.length&&(r.query=h.join("&")),r}},Te=/^([^\:]+)\:(.*)/,je={scheme:"urn",parse:function(e,t){var r=e.path&&e.path.match(Te),n=e;if(r){var o=t.scheme||n.scheme||"urn",a=r[1].toLowerCase(),i=r[2],s=o+":"+(t.nid||a),c=z[s];n.nid=a,n.nss=i,n.path=void 0,c&&(n=c.parse(n,t))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,t){var r=t.scheme||e.scheme||"urn",n=e.nid,o=r+":"+(t.nid||n),a=z[o];a&&(e=a.serialize(e,t));var i=e,s=e.nss;return i.path=(n||t.nid)+":"+s,i}},Ie=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,$e={scheme:"urn:uuid",parse:function(e,t){var r=e;return r.uuid=r.nss,r.nss=void 0,t.tolerant||r.uuid&&r.uuid.match(Ie)||(r.error=r.error||"UUID is not valid."),r},serialize:function(e,t){var r=e;return r.nss=(e.uuid||"").toLowerCase(),r}};z[ue.scheme]=ue,z[le.scheme]=le,z[fe.scheme]=fe,z[he.scheme]=he,z[ke.scheme]=ke,z[je.scheme]=je,z[$e.scheme]=$e,e.SCHEMES=z,e.pctEncChar=L,e.pctDecChars=H,e.parse=Z,e.removeDotSegments=te,e.serialize=re,e.resolveComponents=ne,e.resolve=oe,e.normalize=ae,e.equal=ie,e.escapeComponent=se,e.unescapeComponent=ce,Object.defineProperty(e,"__esModule",{value:!0})}(t)}(0,o.exports);const a=o.exports,i={null:e=>null===e,boolean:e=>"boolean"==typeof e,object:e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,array:e=>Array.isArray(e),number:e=>"number"==typeof e,integer:e=>Number.isInteger(e),string:e=>"string"==typeof e};var s={jsonTypeOf:(e,t)=>i[t](e),resolveUrl:(e,t)=>{const r=a.resolve(e,t,{iri:!0});if(a.resolve(e,"",{iri:!0})&&"file"===a.parse(r).scheme&&"file"!==a.parse(e).scheme)throw Error(`Can't access file '${r}' resource from network context '${e}'`);return r},urlFragment:e=>a.unescapeComponent(a.parse(e).fragment)||"",pathRelative:(e,t)=>{if(e===t)return"";let r=1;const n=e.length-1,o=t.length-r,a=n<o?n:o;let i=-1,s=0;for(;s<a;s++){const n=e.charCodeAt(s+1);if(n!==t.charCodeAt(r+s))break;47===n&&(i=s)}if(o>a){if(47===t.charCodeAt(r+s))return t.slice(r+s+1);if(0===s)return t.slice(r+s)}n>a&&(47===e.charCodeAt(s+1)?i=s:0===a&&(i=0));let c="";for(s=i+2;s<=e.length;++s)s!==e.length&&47!==e.charCodeAt(s)||(c+=0===c.length?"..":"/..");return r+=i,c.length>0?`${c}${t.slice(r,t.length)}`:(47===t.charCodeAt(r)&&++r,t.slice(r,t.length))}};const c=r,u=e=>{if(e.length>0&&"/"!==e[0])throw Error("Invalid JSON Pointer");return e.split("/").slice(1).map(y)},l=(e,t,r,n)=>{if(0===e.length)return r;if(e.length>1){if(Array.isArray(t)){const o=e.shift(),a=[...t];return a[o]=l(e,m(t,o,n),r,d(o,n)),a}{const o=e.shift();return{...t,[o]:l(e,m(t,o,n),r,d(o,n))}}}if(Array.isArray(t)){const n=[...t];return n[g(t,e[0])]=r,n}return"object"==typeof t&&null!==t?{...t,[e[0]]:r}:m(t,e[0],n)},p=(e,t,r,n)=>{if(0!==e.length)if(1!==e.length||b(t)){const o=e.shift();p(e,m(t,o,n),r,d(o,n))}else{t[g(t,e[0])]=r}},f=(e,t,r)=>{if(0!=e.length){if(e.length>1){const n=e.shift(),o=m(t,n,r);return{...t,[n]:f(e,o,d(n,r))}}if(Array.isArray(t))return t.filter(((t,r)=>r!=e[0]));if("object"==typeof t&&null!==t){const{[e[0]]:r,...n}=t;return n}return m(t,e[0],r)}},h=(e,t,r)=>{if(0!==e.length)if(e.length>1){const n=e.shift(),o=m(t,n,r);h(e,o,d(n,r))}else Array.isArray(t)?t.splice(e[0],1):"object"==typeof t&&null!==t?delete t[e[0]]:m(t,e[0],r)},d=c(((e,t)=>t+"/"+v(e))),v=e=>e.toString().replace(/~/g,"~0").replace(/\//g,"~1"),y=e=>e.toString().replace(/~1/g,"/").replace(/~0/g,"~"),g=(e,t)=>Array.isArray(e)&&"-"===t?e.length:t,m=(e,t,r="")=>{if(void 0===e)throw TypeError(`Value at '${r}' is undefined and does not have property '${t}'`);if(null===e)throw TypeError(`Value at '${r}' is null and does not have property '${t}'`);if(b(e))throw TypeError(`Value at '${r}' is a ${typeof e} and does not have property '${t}'`);return e[g(e,t)]},b=e=>null===e||"object"!=typeof e;var w={nil:"",append:d,get:(e,t)=>{const r=u(e),n=e=>r.reduce((([e,t],r)=>[m(e,r,t),d(r,t)]),[e,""])[0];return void 0===t?n:n(t)},set:(e,t,r)=>{const n=u(e),o=c(((e,t)=>l(n,e,t,"")));return void 0===t?o:o(t,r)},assign:(e,t,r)=>{const n=u(e),o=c(((e,t)=>p(n,e,t,"")));return void 0===t?o:o(t,r)},unset:(e,t)=>{const r=u(e),n=e=>f(r,e,"");return void 0===t?n:n(t)},remove:(e,t)=>{const r=u(e),n=e=>h(r,e,"");return void 0===t?n:n(t)}};const E=Symbol("$__value"),x=Symbol("$__href");var S={cons:(e,t)=>Object.freeze({[x]:e,[E]:t}),isReference:e=>e&&void 0!==e[x],href:e=>e[x],value:e=>e[E]};const O=w,C=r,{resolveUrl:A,jsonTypeOf:k}=s,T=S,j=Object.freeze({id:"",pointer:"",instance:void 0,value:void 0}),I=e=>T.isReference(e.value)?T.value(e.value):e.value,$=C(((e,t)=>k(I(e),t))),P=(e,t)=>Object.freeze({...t,pointer:O.append(e,t.pointer),value:I(t)[e]}),R=C(((e,t)=>I(t).map(((r,n,o,a)=>e(P(n,t),n,o,a))))),N=C(((e,t)=>I(t).forEach(((r,n,o,a)=>e(P(n,t),n,o,a))))),D=C(((e,t)=>I(t).map(((e,r,n,o)=>P(r,t))).filter(((t,r,n,o)=>e(t,r,n,o))))),_=C(((e,t,r)=>I(r).reduce(((t,n,o)=>e(t,P(o,r),o)),t))),F=C(((e,t)=>I(t).every(((r,n,o,a)=>e(P(n,t),n,o,a))))),q=C(((e,t)=>I(t).some(((r,n,o,a)=>e(P(n,t),n,o,a)))));var U={nil:j,cons:(e,t="")=>Object.freeze({...j,id:A(t,""),instance:e,value:e}),get:(e,t=j)=>{if(!e.startsWith("#"))throw Error(`No JSON document found at '${e.split("#")[0]}'`);return Object.freeze({...t,pointer:e.substr(1)})},uri:e=>`${e.id}#${encodeURI(e.pointer)}`,value:I,has:(e,t)=>e in I(t),typeOf:$,length:e=>I(e).length,step:P,entries:e=>Object.keys(I(e)).map((t=>[t,P(t,e)])),keys:e=>Object.keys(I(e)),map:R,forEach:N,filter:D,reduce:_,every:F,some:q},z=async e=>Object.entries(await e),L=function(e,t){return function r(){null==t&&(t=e.length);var n=[].slice.call(arguments);return n.length>=t?e.apply(this,n):function(){return r.apply(this,n.concat([].slice.call(arguments)))}}};var H=L((async(e,t)=>(await t).map(e)));var V=L((async(e,t,r)=>(await r).reduce((async(t,r)=>e(await t,r)),t)));const M=V;var B=L((async(e,t,r={})=>M((async(t,r)=>await e(r)?t.concat([r]):t),[],t,r)));const J=H;var K=L((async(e,t)=>{const r=await J(e,t);return(await Promise.all(r)).some((e=>e))}));const G=H;var Z=L((async(e,t)=>{const r=await G(e,t);return(await Promise.all(r)).every((e=>e))}));var W=L(((e,t)=>e.reduce((async(e,t)=>t(await e)),t)));const Q=W,Y=z,X=V;var ee,te,re,ne={entries:z,map:H,filter:B,reduce:V,some:K,every:Z,pipeline:W,all:e=>Promise.all(e),allValues:e=>Q([Y,X((async(e,[t,r])=>(e[t]=await r,e)),{})],e)},oe={exports:{}};te=t,re=function(){var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r="boolean"==typeof(new RegExp).sticky;function n(e){return e&&"[object RegExp]"===t.call(e)}function o(e){return e&&"object"==typeof e&&!n(e)&&!Array.isArray(e)}function a(e){return"("+e+")"}function i(e){return e.length?"(?:"+e.map((function(e){return"(?:"+e+")"})).join("|")+")":"(?!)"}function s(e){if("string"==typeof e)return"(?:"+e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+")";if(n(e)){if(e.ignoreCase)throw new Error("RegExp /i flag not allowed");if(e.global)throw new Error("RegExp /g flag is implied");if(e.sticky)throw new Error("RegExp /y flag is implied");if(e.multiline)throw new Error("RegExp /m flag is implied");return e.source}throw new Error("Not a pattern: "+e)}function c(t,r){if(o(r)||(r={match:r}),r.include)throw new Error("Matching rules cannot also include states");var a={defaultType:t,lineBreaks:!!r.error||!!r.fallback,pop:!1,next:null,push:null,error:!1,fallback:!1,value:null,type:null,shouldThrow:!1};for(var i in r)e.call(r,i)&&(a[i]=r[i]);if("string"==typeof a.type&&t!==a.type)throw new Error("Type transform cannot be a string (type '"+a.type+"' for token '"+t+"')");var s=a.match;return a.match=Array.isArray(s)?s:s?[s]:[],a.match.sort((function(e,t){return n(e)&&n(t)?0:n(t)?-1:n(e)?1:t.length-e.length})),a}function u(e){return Array.isArray(e)?function(e){for(var t=[],r=0;r<e.length;r++){var n=e[r];if(n.include)for(var o=[].concat(n.include),a=0;a<o.length;a++)t.push({include:o[a]});else{if(!n.type)throw new Error("Rule has no type: "+JSON.stringify(n));t.push(c(n.type,n))}}return t}(e):function(e){for(var t=Object.getOwnPropertyNames(e),r=[],n=0;n<t.length;n++){var a=t[n],i=e[a],s=[].concat(i);if("include"!==a){var u=[];s.forEach((function(e){o(e)?(u.length&&r.push(c(a,u)),r.push(c(a,e)),u=[]):u.push(e)})),u.length&&r.push(c(a,u))}else for(var l=0;l<s.length;l++)r.push({include:s[l]})}return r}(e)}var l=c("error",{lineBreaks:!0,shouldThrow:!0});function p(e,t){for(var o=null,c=Object.create(null),u=!0,p=null,f=[],h=[],d=0;d<e.length;d++)e[d].fallback&&(u=!1);for(d=0;d<e.length;d++){var v=e[d];if(v.include)throw new Error("Inheritance is not allowed in stateless lexers");if(v.error||v.fallback){if(o)throw!v.fallback==!o.fallback?new Error("Multiple "+(v.fallback?"fallback":"error")+" rules not allowed (for token '"+v.defaultType+"')"):new Error("fallback and error are mutually exclusive (for token '"+v.defaultType+"')");o=v}var y=v.match.slice();if(u)for(;y.length&&"string"==typeof y[0]&&1===y[0].length;)c[y.shift().charCodeAt(0)]=v;if(v.pop||v.push||v.next){if(!t)throw new Error("State-switching options are not allowed in stateless lexers (for token '"+v.defaultType+"')");if(v.fallback)throw new Error("State-switching options are not allowed on fallback tokens (for token '"+v.defaultType+"')")}if(0!==y.length){u=!1,f.push(v);for(var g=0;g<y.length;g++){var m=y[g];if(n(m))if(null===p)p=m.unicode;else if(p!==m.unicode&&!1===v.fallback)throw new Error("If one rule is /u then all must be")}var b=i(y.map(s)),w=new RegExp(b);if(w.test(""))throw new Error("RegExp matches empty string: "+w);if(new RegExp("|"+b).exec("").length-1>0)throw new Error("RegExp has capture groups: "+w+"\nUse (?: … ) instead");if(!v.lineBreaks&&w.test("\n"))throw new Error("Rule should declare lineBreaks: "+w);h.push(a(b))}}var E=o&&o.fallback,x=r&&!E?"ym":"gm",S=r||E?"":"|";return!0===p&&(x+="u"),{regexp:new RegExp(i(h)+S,x),groups:f,fast:c,error:o||l}}function f(e,t,r){var n=e&&(e.push||e.next);if(n&&!r[n])throw new Error("Missing state '"+n+"' (in token '"+e.defaultType+"' of state '"+t+"')");if(e&&e.pop&&1!=+e.pop)throw new Error("pop must be 1 (in token '"+e.defaultType+"' of state '"+t+"')")}var h=function(e,t){this.startState=t,this.states=e,this.buffer="",this.stack=[],this.reset()};h.prototype.reset=function(e,t){return this.buffer=e||"",this.index=0,this.line=t?t.line:1,this.col=t?t.col:1,this.queuedToken=t?t.queuedToken:null,this.queuedThrow=t?t.queuedThrow:null,this.setState(t?t.state:this.startState),this.stack=t&&t.stack?t.stack.slice():[],this},h.prototype.save=function(){return{line:this.line,col:this.col,state:this.state,stack:this.stack.slice(),queuedToken:this.queuedToken,queuedThrow:this.queuedThrow}},h.prototype.setState=function(e){if(e&&this.state!==e){this.state=e;var t=this.states[e];this.groups=t.groups,this.error=t.error,this.re=t.regexp,this.fast=t.fast}},h.prototype.popState=function(){this.setState(this.stack.pop())},h.prototype.pushState=function(e){this.stack.push(this.state),this.setState(e)};var d=r?function(e,t){return e.exec(t)}:function(e,t){var r=e.exec(t);return 0===r[0].length?null:r};function v(){return this.value}if(h.prototype._getGroup=function(e){for(var t=this.groups.length,r=0;r<t;r++)if(void 0!==e[r+1])return this.groups[r];throw new Error("Cannot find token type for matched text")},h.prototype.next=function(){var e=this.index;if(this.queuedGroup){var t=this._token(this.queuedGroup,this.queuedText,e);return this.queuedGroup=null,this.queuedText="",t}var r=this.buffer;if(e!==r.length){if(i=this.fast[r.charCodeAt(e)])return this._token(i,r.charAt(e),e);var n=this.re;n.lastIndex=e;var o=d(n,r),a=this.error;if(null==o)return this._token(a,r.slice(e,r.length),e);var i=this._getGroup(o),s=o[0];return a.fallback&&o.index!==e?(this.queuedGroup=i,this.queuedText=s,this._token(a,r.slice(e,o.index),e)):this._token(i,s,e)}},h.prototype._token=function(e,t,r){var n=0;if(e.lineBreaks){var o=/\n/g,a=1;if("\n"===t)n=1;else for(;o.exec(t);)n++,a=o.lastIndex}var i={type:"function"==typeof e.type&&e.type(t)||e.defaultType,value:"function"==typeof e.value?e.value(t):t,text:t,toString:v,offset:r,lineBreaks:n,line:this.line,col:this.col},s=t.length;if(this.index+=s,this.line+=n,0!==n?this.col=s-a+1:this.col+=s,e.shouldThrow)throw new Error(this.formatError(i,"invalid syntax"));return e.pop?this.popState():e.push?this.pushState(e.push):e.next&&this.setState(e.next),i},"undefined"!=typeof Symbol&&Symbol.iterator){var y=function(e){this.lexer=e};y.prototype.next=function(){var e=this.lexer.next();return{value:e,done:!e}},y.prototype[Symbol.iterator]=function(){return this},h.prototype[Symbol.iterator]=function(){return new y(this)}}return h.prototype.formatError=function(e,t){if(null==e){var r=this.buffer.slice(this.index);e={text:r,offset:this.index,lineBreaks:-1===r.indexOf("\n")?0:1,line:this.line,col:this.col}}var n=Math.max(0,e.offset-e.col+1),o=e.lineBreaks?e.text.indexOf("\n"):e.text.length,a=this.buffer.substring(n,e.offset+o);return t+=" at line "+e.line+" col "+e.col+":\n\n",t+=" "+a+"\n",t+=" "+Array(e.col).join(" ")+"^"},h.prototype.clone=function(){return new h(this.states,this.state)},h.prototype.has=function(e){return!0},{compile:function(e){var t=p(u(e));return new h({start:t},"start")},states:function(e,t){var r=e.$all?u(e.$all):[];delete e.$all;var n=Object.getOwnPropertyNames(e);t||(t=n[0]);for(var o=Object.create(null),a=0;a<n.length;a++)o[b=n[a]]=u(e[b]).concat(r);for(a=0;a<n.length;a++)for(var i=o[b=n[a]],s=Object.create(null),c=0;c<i.length;c++){var l=i[c];if(l.include){var d=[c,1];if(l.include!==b&&!s[l.include]){s[l.include]=!0;var v=o[l.include];if(!v)throw new Error("Cannot include nonexistent state '"+l.include+"' (in state '"+b+"')");for(var y=0;y<v.length;y++){var g=v[y];-1===i.indexOf(g)&&d.push(g)}}i.splice.apply(i,d),c--}}var m=Object.create(null);for(a=0;a<n.length;a++){var b;m[b=n[a]]=p(o[b],!0)}for(a=0;a<n.length;a++){var w=n[a],E=m[w],x=E.groups;for(c=0;c<x.length;c++)f(x[c],w,m);var S=Object.getOwnPropertyNames(E.fast);for(c=0;c<S.length;c++)f(E.fast[S[c]],w,m)}return new h(m,t)},error:Object.freeze({error:!0}),fallback:Object.freeze({fallback:!0}),keywords:function(e){for(var t=Object.create(null),r=Object.create(null),n=Object.getOwnPropertyNames(e),o=0;o<n.length;o++){var a=n[o],i=e[a];(Array.isArray(i)?i:[i]).forEach((function(e){if((r[e.length]=r[e.length]||[]).push(e),"string"!=typeof e)throw new Error("keyword must be string (in keyword '"+a+"')");t[e]=a}))}function s(e){return JSON.stringify(e)}var c="";for(var u in c+="switch (value.length) {\n",r){var l=r[u];c+="case "+u+":\n",c+="switch (value) {\n",l.forEach((function(e){var r=t[e];c+="case "+s(e)+": return "+s(r)+"\n"})),c+="}\n"}return c+="}\n",Function("value",c)}}},(ee=oe).exports?ee.exports=re():te.moo=re();const ae=oe.exports;const ie=w,se=e=>{const t=ae.states({main:{WS:{match:new RegExp("(?:(?:\\r?\\n)|[ \\t])+","u"),lineBreaks:!0},true:{match:"true",value:()=>!0},false:{match:"false",value:()=>!1},null:{match:"null",value:()=>null},number:{match:new RegExp("-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?:[eE][-+]?[0-9]+)?","u"),value:parseFloat},string:{match:new RegExp('"(?:[\\x20-\\x21\\x23-\\x5b\\x5d-\\u{10ffff}]|\\\\(?:["\\/\\\\brfnt]|u[0-9a-fA-F]{4}))*"',"u"),value:JSON.parse},"{":"{","}":"}","[":"[","]":"]",":":":",",":",",error:ae.error}});t.reset(e);const r=()=>{let e;do{if(e=t.next(),"error"===e?.type)throw SyntaxError(t.formatError(e,"Unrecognized token"))}while("WS"===e?.type);return e};let n,o=r();const a={offset:0,line:1,col:0,text:""};return{next:e=>{if(n=o,o=r(),e&&n?.type!==e)throw SyntaxError(t.formatError(n,`Expected a '${e}'`));return n},peek:()=>o,syntaxError:e=>{const r=n||a,o={...r,offset:r.offset+r.text.length,col:r.col+r.text.length};throw new SyntaxError(t.formatError(o,e))}}},ce=(e,t)=>t,ue=(e,t,r,n)=>{let o;const a=e.next();switch(a?.type){case"true":case"false":case"null":case"number":case"string":o=a.value;break;case"{":o=le(e,t,r,n);break;case"[":o=fe(e,t,r,n);break;default:e.syntaxError("Expected a JSON value")}return n(t,o,r)},le=(e,t,r,n)=>{const o={};return"}"!==e.peek()?.type&&pe(e,t,r,n,o),e.next("}"),o},pe=(e,t,r,n,o)=>{const a=e.next("string").value;e.next(":"),ve(e.peek())||e.syntaxError("Expected a JSON value"),o[a]=ue(e,a,ie.append(a,r),n),","===e.peek()?.type?(e.next(),pe(e,a,r,n,o)):ve(e.peek())&&e.next(",")},fe=(e,t,r,n)=>{const o=[];return"]"!==e.peek()?.type&&he(e,0,r,n,o),e.next("]"),o},he=(e,t,r,n,o)=>{ve(e.peek())||e.syntaxError("Expected a JSON value"),o[t]=ue(e,t,ie.append(t,r),n),","===e.peek()?.type?(e.next(),he(e,t+1,r,n,o)):ve(e.peek())&&e.next(",")},de=new Set(["string","number","true","false","null","[","{"]),ve=e=>de.has(e?.type);var ye=(e,t=ce)=>{const r=se(e),n=ue(r,"",ie.nil,t);return r.peek()&&r.syntaxError("A value has been parsed, but more tokens were found"),n};const ge=w,me=(e,t)=>t,be=(e,t,r,n,o,a)=>{let i;return e=t(n,e,o),i=Array.isArray(e)?we(e,t,r,o,a):"object"==typeof e&&null!==e?Ee(e,t,r,o,a):JSON.stringify(e),i},we=(e,t,r,n,o)=>{0===e.length&&(r="");const a=r?`\n${r.repeat(o-1)}`:"";return"["+a+r+e.map(((e,a)=>{const i=ge.append(a,n);return be(e,t,r,a,i,o+1)})).join(`,${a}${r}`)+a+"]"},Ee=(e,t,r,n,o)=>{0===Object.keys(e).length&&(r="");const a=r?`\n${r.repeat(o-1)}`:"",i=r?" ":"";return"{"+a+r+Object.entries(e).map((([e,a])=>{const s=ge.append(e,n);return JSON.stringify(e)+":"+i+be(a,t,r,e,s,o+1)})).join(`,${a}${r}`)+a+"}"};var xe=(e,t=me,r="")=>be(e,t,r,"",ge.nil,1);var Se={parse:ye,stringify:xe},Oe=fetch,Ce={},Ae=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,ke=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,Te=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,je=/\\([\u000b\u0020-\u00ff])/g,Ie=/([\\"])/g,$e=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;function Pe(e){var t=String(e);if(Te.test(t))return t;if(t.length>0&&!ke.test(t))throw new TypeError("invalid parameter value");return'"'+t.replace(Ie,"\\$1")+'"'}function Re(e){this.parameters=Object.create(null),this.type=e}Ce.format=function(e){if(!e||"object"!=typeof e)throw new TypeError("argument obj is required");var t=e.parameters,r=e.type;if(!r||!$e.test(r))throw new TypeError("invalid type");var n=r;if(t&&"object"==typeof t)for(var o,a=Object.keys(t).sort(),i=0;i<a.length;i++){if(o=a[i],!Te.test(o))throw new TypeError("invalid parameter name");n+="; "+o+"="+Pe(t[o])}return n},Ce.parse=function(e){if(!e)throw new TypeError("argument string is required");var t="object"==typeof e?function(e){var t;"function"==typeof e.getHeader?t=e.getHeader("content-type"):"object"==typeof e.headers&&(t=e.headers&&e.headers["content-type"]);if("string"!=typeof t)throw new TypeError("content-type header is missing from object");return t}(e):e;if("string"!=typeof t)throw new TypeError("argument string is required to be a string");var r=t.indexOf(";"),n=-1!==r?t.substr(0,r).trim():t.trim();if(!$e.test(n))throw new TypeError("invalid media type");var o=new Re(n.toLowerCase());if(-1!==r){var a,i,s;for(Ae.lastIndex=r;i=Ae.exec(t);){if(i.index!==r)throw new TypeError("invalid parameter format");r+=i[0].length,a=i[1].toLowerCase(),'"'===(s=i[2])[0]&&(s=s.substr(1,s.length-2).replace(je,"$1")),o.parameters[a]=s}if(r!==t.length)throw new TypeError("invalid parameter format")}return o};const Ne=Ce,De={};var _e={addPlugin:(e,t)=>{De[e]=t},parse:e=>{const t=Ne.parse(e.headers.get("content-type"));if(!(t.type in De))throw Error(`${e.url} is not a schema. Found a document with media type: ${t.type}`);return De[t.type].parse(e,t.parameters)},getContentType:e=>{for(const t in De)if(De[t].matcher(e))return t;return"application/octet-stream"}};const Fe=r,qe=ne,Ue=Se,ze=w,{jsonTypeOf:Le,resolveUrl:He,urlFragment:Ve,pathRelative:Me}=s,Be=Oe,Je=S,Ke=_e,Ge="https://json-schema.org/draft/2019-09/vocab/core",Ze="https://json-schema.org/draft/2020-12/vocab/core",We={},Qe={},Ye=(e,t)=>{const r=Qe[e];return We[r]?.[t]},Xe={},et={},tt=(e,t="",r="")=>{e=JSON.parse(JSON.stringify(e));const n=He(t,""),o=He(e.$schema||r,"");if(!o)throw Error("Couldn't determine schema dialect");if(delete e.$schema,!(o in Qe))if(!0===e?.$vocabulary?.[Ge]&&o===rt(e,n,Ge)[0])Qe[o]=Ge;else if(!0===e?.$vocabulary?.[Ze]&&o===rt(e,n,Ze)[0])Qe[o]=Ze;else{const e=Xe[o];if(!e)throw Error(`Couldn't determine JSON Schema version for dialect: '${o}'`);!0===e.vocabulary[Ge]?Qe[o]=Ge:!0===e.vocabulary[Ze]?Qe[o]=Ze:Qe[o]=Qe[e.dialectId]}const[a,i]=rt(e,n,Qe[o]);if(!a)throw Error("Couldn't determine an identifier for the schema");const s=Ye(o,"baseToken");delete e[s],n&&(et[n]=a);const c=Ye(o,"anchorToken");i&&s===c&&(e[c]=c!==s?encodeURI(i):`#${encodeURI(i)}`);const u={},l=Ye(o,"recursiveAnchorToken");let p;!0===e[l]&&(u[""]=`${a}#`,e[c]="",delete e[l]);const f=Ye(o,"vocabularyToken");Le(e[f],"object")?(p=e[f],delete e[f]):p={[Qe[o]]:!0};const h={"":""};return Xe[a]={id:a,dialectId:o,schema:nt(e,a,o,ze.nil,h,u),anchors:h,dynamicAnchors:u,vocabulary:p,validated:!1},a},rt=(e,t,r)=>{const n=We[r]?.baseToken,o=He(t,e[n]||"");return[He(o,""),Ve(o)]},nt=(e,t,r,n,o,a)=>{if(Le(e,"object")){const i="string"==typeof e.$schema?He(e.$schema,""):r,s=Ye(i,"embeddedToken"),c=Ye(i,"anchorToken");if("string"==typeof e[s]&&(s!==c||"#"!==e[s][0])){const n=He(t,e[s]);return e[Ye(i,"baseToken")]=n,tt(e,n,r),Je.cons(e[s],e)}const u=Ye(r,"anchorToken"),l=Ye(r,"dynamicAnchorToken");"string"==typeof e[l]&&(a[e[l]]=`${t}#${encodeURI(n)}`,o[e[l]]=n,delete e[l]);const p=Ye(r,"embeddedToken");if("string"==typeof e[u]){const t=u!==p?e[u]:e[u].slice(1);o[t]=n,delete e[u]}const f=Ye(r,"jrefToken");if("string"==typeof e[f])return Je.cons(e[f],e);for(const i in e)e[i]=nt(e[i],t,r,ze.append(i,n),o,a);return e}return Array.isArray(e)?e.map(((e,i)=>nt(e,t,r,ze.append(i,n),o,a))):e},ot=e=>Xe[et[e]]||Xe[e],at=Object.freeze({id:"",dialectId:void 0,vocabulary:{},pointer:ze.nil,schema:void 0,value:void 0,anchors:{},dynamicAnchors:{},validated:!0}),it=async(e,t=at)=>{const r=He(ut(t),e),n=He(r,""),o=Ve(r);if(!(e=>e in Xe||e in et)(n)){const e=await Be(n,{headers:{Accept:"application/schema+json"}});if(e.status>=400)throw await e.text(),Error(`Failed to retrieve schema with id: ${n}`);const[t,r]=await Ke.parse(e);let o;o=t.$schema?He(t.$schema,""):r?He(n,r):"",o&&n!==o&&!(o in Qe)&&await it(o),tt(t,n,o)}const a=ot(n),i="/"!==o[0]?ct(a,o):o,s=Object.freeze({...a,pointer:i,value:ze.get(i,a.schema)});return st(s)},st=e=>Je.isReference(e.value)?it(Je.href(e.value),e):e,ct=(e,t)=>{if(!(t in e.anchors))throw Error(`No such anchor '${encodeURI(e.id)}#${encodeURI(t)}'`);return e.anchors[t]},ut=e=>`${e.id}#${encodeURI(e.pointer)}`,lt=e=>Je.isReference(e.value)?Je.value(e.value):e.value,pt=(e,t)=>{const r=ot(t.id),n=Object.freeze({...t,pointer:ze.append(e,t.pointer),value:lt(t)[e],validated:r.validated});return st(n)},ft=Fe(((e,t)=>qe.pipeline([lt,qe.map((async(r,n)=>e(await pt(n,t),n))),qe.all],t))),ht={parentId:"",parentDialect:"",includeEmbedded:!0},dt=(e,t)=>{if(t.startsWith("file://")){const r=e.slice(7,e.lastIndexOf("/"));return""===e?"":Me(r,t.slice(7))}return t};var vt={setConfig:(e,t,r)=>{Qe[e]=e,We[e]||(We[e]={}),We[e][t]=r},getConfig:Ye,add:tt,get:it,markValidated:e=>{Xe[e].validated=!0},uri:ut,value:lt,getAnchorPointer:ct,typeOf:(e,t)=>Le(lt(e),t),has:(e,t)=>e in lt(t),step:pt,keys:e=>Object.keys(lt(e)),entries:e=>qe.pipeline([lt,Object.keys,qe.map((async t=>[t,await pt(t,e)])),qe.all],e),map:ft,length:e=>lt(e).length,toSchema:(e,t={})=>{const r={...ht,...t},n=Ye(e.dialectId,"anchorToken"),o=Ye(e.dialectId,"dynamicAnchorToken"),a={};for(const t in e.anchors)""===t||e.dynamicAnchors[t]||(a[e.anchors[t]]=t);const i={};for(const t in e.dynamicAnchors){const r=Ve(e.dynamicAnchors[t]);i[r]=t}const s=JSON.parse(Ue.stringify(e.schema,((t,s,c)=>{if(Je.isReference(s)){const t=Je.value(s),n="string"==typeof t.$schema?He(t.$schema,""):e.dialectId,o=Ye(n,"embeddedToken");return!r.includeEmbedded&&o in t?void 0:Je.value(s)}return c in a&&(s={[n]:a[c],...s}),c in i&&(s={[o]:i[c],...s}),s}))),c=Ye(e.dialectId,"baseToken"),u=dt(r.parentId,e.id),l=r.parentDialect===e.dialectId?"":e.dialectId;return{...u&&{[c]:u},...l&&{$schema:l},...s}}};class yt extends Error{constructor(e){super("Invalid Schema"),this.name=this.constructor.name,this.output=e}}var gt=yt;const mt=vt;var bt={compile:e=>mt.value(e),interpret:()=>!0};const wt=r,Et=n.exports,{resolveUrl:xt}=s,St=U,Ot=vt,Ct=gt,At=_e,kt=bt,Tt="FLAG",jt="BASIC",It="DETAILED",$t="VERBOSE";let Pt=It,Rt=!0;At.addPlugin("application/schema+json",{parse:async(e,t)=>[await e.json(),t.schema||t.profile],matcher:e=>e.endsWith(".schema.json")});const Nt=async e=>{const t={metaData:{}};return{ast:t,schemaUri:await Ht(e,t)}},Dt=wt((({ast:e,schemaUri:t},r,n=Tt)=>{if(![Tt,jt,It,$t].includes(n))throw Error(`The '${n}' error format is not supported`);const o=[],a=Et.subscribe("result",_t(n,o));return Mt(t,r,e,{}),Et.unsubscribe(a),o[0]})),_t=(e,t)=>{const r=[];return(n,o)=>{if("result"===n){const{keyword:e,absoluteKeywordLocation:t,instanceLocation:n,valid:a}=o,i={keyword:e,absoluteKeywordLocation:t,instanceLocation:n,valid:a,errors:[]};r.push(i)}else if("result.start"===n)r.push(n);else if("result.end"===n){const n=r.pop();for(;"result.start"!==r[r.length-1];){const t=r.pop(),o=[t];e===jt&&(o.push(...t.errors),delete t.errors),(e===$t||e!==Tt&&!t.valid)&&n.errors.unshift(...o)}r[r.length-1]=n,t[0]=n}}},Ft={},qt=e=>Ft[e]||kt,Ut=e=>e in Ft,zt={},Lt={},Ht=async(e,t)=>{if(e=await Vt(e),!Ut(`${e.dialectId}#validate`)){const t=await Ot.get(e.dialectId);(Ot.getConfig(t.id,"mandatoryVocabularies")||[]).forEach((e=>{if(!t.vocabulary[e])throw Error(`Vocabulary '${e}' must be explicitly declared and required`)})),Object.entries(t.vocabulary).forEach((([e,r])=>{if(e in zt)Object.entries(zt[e]).forEach((([e,r])=>{((e,t)=>{Ft[e]={collectEvaluatedItems:(e,r,n,o,a)=>t.interpret(e,r,n,o,a)&&new Set,collectEvaluatedProperties:(e,r,n,o,a)=>t.interpret(e,r,n,o,a)&&[],...t}})(`${t.id}#${e}`,r)}));else if(r)throw Error(`Missing required vocabulary: ${e}`)}))}if(Rt&&!e.validated){if(Ot.markValidated(e.id),!(e.dialectId in Lt)){const t=await Ot.get(e.dialectId),r=await Nt(t);Lt[t.id]=Dt(r)}const t=St.cons(e.schema,e.id),r=Lt[e.dialectId](t,Pt);if(!r.valid)throw new Ct(r)}return e.id in t.metaData||(t.metaData[e.id]={id:e.id,dynamicAnchors:e.dynamicAnchors,anchors:e.anchors}),qt(`${e.dialectId}#validate`).compile(e,t)},Vt=async e=>Ot.typeOf(e,"string")?Vt(await Ot.get(Ot.value(e),e)):e,Mt=(e,t,r,n)=>{const o=Bt(e,r),a=xt(e,"");return qt(o).interpret(e,t,r,{...r.metaData[a].dynamicAnchors,...n})},Bt=(e,t)=>{if(!(e in t))throw Error(`No schema found at ${e}`);return t[e][0]};var Jt={validate:async(e,t,r)=>{const n=await Nt(e),o=(e,t)=>Dt(n,St.cons(e),t);return void 0===t?o:o(t,r)},compile:Nt,interpret:Dt,setMetaOutputFormat:e=>{Pt=e},setShouldMetaValidate:e=>{Rt=e},FLAG:Tt,BASIC:jt,DETAILED:It,VERBOSE:$t,add:(e,t="",r="")=>{const n=Ot.add(e,t,r);delete Lt[n]},getKeyword:qt,hasKeyword:Ut,defineVocabulary:(e,t)=>{zt[e]=t},compileSchema:Ht,interpretSchema:Mt,collectEvaluatedProperties:(e,t,r,n,o)=>{const a=Bt(e,r);return qt(a).collectEvaluatedProperties(e,t,r,n,o)},collectEvaluatedItems:(e,t,r,n,o)=>{const a=Bt(e,r);return qt(a).collectEvaluatedItems(e,t,r,n,o)},addMediaTypePlugin:At.addPlugin};const Kt=ne,Gt=n.exports,Zt=Jt,Wt=U,Qt=vt;var Yt={compile:async(e,t)=>{const r=Qt.uri(e);if(!(r in t)){t[r]=!1;const n=Qt.value(e);if(!["object","boolean"].includes(typeof n))throw Error(`No schema found at '${Qt.uri(e)}'`);t[r]=[`${e.dialectId}#validate`,Qt.uri(e),"boolean"==typeof n?n:await Kt.pipeline([Qt.entries,Kt.map((([t,r])=>[`${e.dialectId}#${t}`,r])),Kt.filter((([t])=>t!==`${e.dialectId}#validate`)),Kt.map((async([r,n])=>{const o=await Zt.getKeyword(r).compile(n,t,e);return[r,Qt.uri(n),o]})),Kt.all],e)]}return r},interpret:(e,t,r,n)=>{const[o,a,i]=r[e];Gt.publishSync("result.start");const s="boolean"==typeof i?i:i.every((([e,o,a])=>{Gt.publishSync("result.start");const i=Zt.getKeyword(e).interpret(a,t,r,n);return Gt.publishSync("result",{keyword:e,absoluteKeywordLocation:o,instanceLocation:Wt.uri(t),valid:i,ast:a}),Gt.publishSync("result.end"),i}));return Gt.publishSync("result",{keyword:o,absoluteKeywordLocation:a,instanceLocation:Wt.uri(t),valid:s,ast:e}),Gt.publishSync("result.end"),s},collectEvaluatedProperties:(e,t,r,n,o=!1)=>{const a=r[e][2];return"boolean"==typeof a?!!a&&[]:a.filter((([e])=>!o||!e.endsWith("#unevaluatedProperties"))).reduce(((e,[o,,a])=>{const i=e&&Zt.getKeyword(o).collectEvaluatedProperties(a,t,r,n);return!1!==i&&[...e,...i]}),[])},collectEvaluatedItems:(e,t,r,n,o=!1)=>{const a=r[e][2];return"boolean"==typeof a?!!a&&new Set:a.filter((([e])=>!o||!e.endsWith("#unevaluatedItems"))).reduce(((e,[o,,a])=>{const i=!1!==e&&Zt.getKeyword(o).collectEvaluatedItems(a,t,r,n);return!1!==i&&new Set([...e,...i])}),new Set)}};var Xt={Core:Jt,Schema:vt,Instance:U,Reference:S,Keywords:{metaData:bt,validate:Yt},InvalidSchemaError:gt};e.default=Xt,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=json-schema-core-amd.min.js.map

@@ -1,3 +0,3 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},r=function(e,r){return function t(){null==r&&(r=e.length);var n=[].slice.call(arguments);return n.length>=r?e.apply(this,n):function(){return t.apply(this,n.concat([].slice.call(arguments)))}}};var t={exports:{}};!function(r,t){!function(e,n){var o={};e.PubSub?(o=e.PubSub,console.warn("PubSub already loaded, using existing version")):(e.PubSub=o,function(e){var r={},t=-1,n="*";function o(e){var r;for(r in e)if(Object.prototype.hasOwnProperty.call(e,r))return!0;return!1}function a(e){return function(){throw e}}function i(e,r,t){try{e(r,t)}catch(e){setTimeout(a(e),0)}}function s(e,r,t){e(r,t)}function c(e,t,n,o){var a,c=r[t],u=o?s:i;if(Object.prototype.hasOwnProperty.call(r,t))for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&u(c[a],e,n)}function u(e,r,t){return function(){var o=String(e),a=o.lastIndexOf(".");for(c(e,e,r,t);-1!==a;)a=(o=o.substr(0,a)).lastIndexOf("."),c(e,o,r,t);c(e,n,r,t)}}function l(e){var t=String(e);return Boolean(Object.prototype.hasOwnProperty.call(r,t)&&o(r[t]))}function p(e){for(var r=String(e),t=l(r)||l(n),o=r.lastIndexOf(".");!t&&-1!==o;)o=(r=r.substr(0,o)).lastIndexOf("."),t=l(r);return t}function f(e,r,t,n){var o=u(e="symbol"==typeof e?e.toString():e,r,n);return!!p(e)&&(!0===t?o():setTimeout(o,0),!0)}e.publish=function(r,t){return f(r,t,!1,e.immediateExceptions)},e.publishSync=function(r,t){return f(r,t,!0,e.immediateExceptions)},e.subscribe=function(e,n){if("function"!=typeof n)return!1;e="symbol"==typeof e?e.toString():e,Object.prototype.hasOwnProperty.call(r,e)||(r[e]={});var o="uid_"+String(++t);return r[e][o]=n,o},e.subscribeAll=function(r){return e.subscribe(n,r)},e.subscribeOnce=function(r,t){var n=e.subscribe(r,(function(){e.unsubscribe(n),t.apply(this,arguments)}));return e},e.clearAllSubscriptions=function(){r={}},e.clearSubscriptions=function(e){var t;for(t in r)Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)&&delete r[t]},e.countSubscriptions=function(e){var t,n,o=0;for(t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)){for(n in r[t])o++;break}return o},e.getSubscriptions=function(e){var t,n=[];for(t in r)Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)&&n.push(t);return n},e.unsubscribe=function(t){var n,o,a,i=function(e){var t;for(t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e))return!0;return!1},s="string"==typeof t&&(Object.prototype.hasOwnProperty.call(r,t)||i(t)),c=!s&&"string"==typeof t,u="function"==typeof t,l=!1;if(!s){for(n in r)if(Object.prototype.hasOwnProperty.call(r,n)){if(o=r[n],c&&o[t]){delete o[t],l=t;break}if(u)for(a in o)Object.prototype.hasOwnProperty.call(o,a)&&o[a]===t&&(delete o[a],l=!0)}return l}e.clearSubscriptions(t)}}(o)),void 0!==r&&r.exports&&(t=r.exports=o),t.PubSub=o,r.exports=t=o}("object"==typeof window&&window||e)}(t,t.exports);var n={exports:{}};
/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */!function(e){function r(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length>1){r[0]=r[0].slice(0,-1);for(var n=r.length-1,o=1;o<n;++o)r[o]=r[o].slice(1,-1);return r[n]=r[n].slice(1),r.join("")}return r[0]}function t(e){return"(?:"+e+")"}function n(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function a(e){return null!=e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function i(e,r){var t=e;if(r)for(var n in r)t[n]=r[n];return t}function s(e){var n="[A-Za-z]",o="[0-9]",a=r(o,"[A-Fa-f]"),i=t(t("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+t("%[89A-Fa-f]"+a+"%"+a+a)+"|"+t("%"+a+a)),s="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",c=r("[\\:\\/\\?\\#\\[\\]\\@]",s),u=e?"[\\uE000-\\uF8FF]":"[]",l=r(n,o,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");t(n+r(n,o,"[\\+\\-\\.]")+"*"),t(t(i+"|"+r(l,s,"[\\:]"))+"*");var p=t(t("25[0-5]")+"|"+t("2[0-4]"+o)+"|"+t("1"+o+o)+"|"+t("0?[1-9]"+o)+"|0?0?"+o),f=t(p+"\\."+p+"\\."+p+"\\."+p),d=t(a+"{1,4}"),h=t(t(d+"\\:"+d)+"|"+f),v=t(t(d+"\\:")+"{6}"+h),y=t("\\:\\:"+t(d+"\\:")+"{5}"+h),m=t(t(d)+"?\\:\\:"+t(d+"\\:")+"{4}"+h),g=t(t(t(d+"\\:")+"{0,1}"+d)+"?\\:\\:"+t(d+"\\:")+"{3}"+h),b=t(t(t(d+"\\:")+"{0,2}"+d)+"?\\:\\:"+t(d+"\\:")+"{2}"+h),w=t(t(t(d+"\\:")+"{0,3}"+d)+"?\\:\\:"+d+"\\:"+h),E=t(t(t(d+"\\:")+"{0,4}"+d)+"?\\:\\:"+h),S=t(t(t(d+"\\:")+"{0,5}"+d)+"?\\:\\:"+d),O=t(t(t(d+"\\:")+"{0,6}"+d)+"?\\:\\:"),C=t([v,y,m,g,b,w,E,S,O].join("|")),A=t(t(l+"|"+i)+"+");t("[vV]"+a+"+\\."+r(l,s,"[\\:]")+"+"),t(t(i+"|"+r(l,s))+"*");var I=t(i+"|"+r(l,s,"[\\:\\@]"));return t(t(i+"|"+r(l,s,"[\\@]"))+"+"),t(t(I+"|"+r("[\\/\\?]",u))+"*"),{NOT_SCHEME:new RegExp(r("[^]",n,o,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(r("[^\\%\\:]",l,s),"g"),NOT_HOST:new RegExp(r("[^\\%\\[\\]\\:]",l,s),"g"),NOT_PATH:new RegExp(r("[^\\%\\/\\:\\@]",l,s),"g"),NOT_PATH_NOSCHEME:new RegExp(r("[^\\%\\/\\@]",l,s),"g"),NOT_QUERY:new RegExp(r("[^\\%]",l,s,"[\\:\\@\\/\\?]",u),"g"),NOT_FRAGMENT:new RegExp(r("[^\\%]",l,s,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(r("[^]",l,s),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(r("[^\\%]",l,c),"g"),PCT_ENCODED:new RegExp(i,"g"),IPV4ADDRESS:new RegExp("^("+f+")$"),IPV6ADDRESS:new RegExp("^\\[?("+C+")"+t(t("\\%25|\\%(?!"+a+"{2})")+"("+A+")")+"?\\]?$")}}var c=s(!1),u=s(!0),l=function(){function e(e,r){var t=[],n=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(n=(i=s.next()).done)&&(t.push(i.value),!r||t.length!==r);n=!0);}catch(e){o=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(o)throw a}}return t}return function(r,t){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return e(r,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),p=function(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);r<e.length;r++)t[r]=e[r];return t}return Array.from(e)},f=2147483647,d=36,h=1,v=26,y=38,m=700,g=72,b=128,w="-",E=/^xn--/,S=/[^\0-\x7E]/,O=/[\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"},A=d-h,I=Math.floor,j=String.fromCharCode;function T(e){throw new RangeError(C[e])}function x(e,r){for(var t=[],n=e.length;n--;)t[n]=r(e[n]);return t}function $(e,r){var t=e.split("@"),n="";return t.length>1&&(n=t[0]+"@",e=t[1]),n+x((e=e.replace(O,".")).split("."),r).join(".")}function D(e){for(var r=[],t=0,n=e.length;t<n;){var o=e.charCodeAt(t++);if(o>=55296&&o<=56319&&t<n){var a=e.charCodeAt(t++);56320==(64512&a)?r.push(((1023&o)<<10)+(1023&a)+65536):(r.push(o),t--)}else r.push(o)}return r}var P=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:d},N=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},R=function(e,r,t){var n=0;for(e=t?I(e/m):e>>1,e+=I(e/r);e>A*v>>1;n+=d)e=I(e/A);return I(n+(A+1)*e/(e+y))},F=function(e){var r=[],t=e.length,n=0,o=b,a=g,i=e.lastIndexOf(w);i<0&&(i=0);for(var s=0;s<i;++s)e.charCodeAt(s)>=128&&T("not-basic"),r.push(e.charCodeAt(s));for(var c=i>0?i+1:0;c<t;){for(var u=n,l=1,p=d;;p+=d){c>=t&&T("invalid-input");var y=P(e.charCodeAt(c++));(y>=d||y>I((f-n)/l))&&T("overflow"),n+=y*l;var m=p<=a?h:p>=a+v?v:p-a;if(y<m)break;var E=d-m;l>I(f/E)&&T("overflow"),l*=E}var S=r.length+1;a=R(n-u,S,0==u),I(n/S)>f-o&&T("overflow"),o+=I(n/S),n%=S,r.splice(n++,0,o)}return String.fromCodePoint.apply(String,r)},_=function(e){var r=[],t=(e=D(e)).length,n=b,o=0,a=g,i=!0,s=!1,c=void 0;try{for(var u,l=e[Symbol.iterator]();!(i=(u=l.next()).done);i=!0){var p=u.value;p<128&&r.push(j(p))}}catch(e){s=!0,c=e}finally{try{!i&&l.return&&l.return()}finally{if(s)throw c}}var y=r.length,m=y;for(y&&r.push(w);m<t;){var E=f,S=!0,O=!1,C=void 0;try{for(var A,x=e[Symbol.iterator]();!(S=(A=x.next()).done);S=!0){var $=A.value;$>=n&&$<E&&(E=$)}}catch(e){O=!0,C=e}finally{try{!S&&x.return&&x.return()}finally{if(O)throw C}}var P=m+1;E-n>I((f-o)/P)&&T("overflow"),o+=(E-n)*P,n=E;var F=!0,_=!1,U=void 0;try{for(var k,q=e[Symbol.iterator]();!(F=(k=q.next()).done);F=!0){var z=k.value;if(z<n&&++o>f&&T("overflow"),z==n){for(var L=o,H=d;;H+=d){var V=H<=a?h:H>=a+v?v:H-a;if(L<V)break;var M=L-V,K=d-V;r.push(j(N(V+M%K,0))),L=I(M/K)}r.push(j(N(L,0))),a=R(o,P,m==y),o=0,++m}}}catch(e){_=!0,U=e}finally{try{!F&&q.return&&q.return()}finally{if(_)throw U}}++o,++n}return r.join("")},U=function(e){return $(e,(function(e){return E.test(e)?F(e.slice(4).toLowerCase()):e}))},k=function(e){return $(e,(function(e){return S.test(e)?"xn--"+_(e):e}))},q={version:"2.1.0",ucs2:{decode:D,encode:function(e){return String.fromCodePoint.apply(String,p(e))}},decode:F,encode:_,toASCII:k,toUnicode:U},z={};function L(e){var r=e.charCodeAt(0);return r<16?"%0"+r.toString(16).toUpperCase():r<128?"%"+r.toString(16).toUpperCase():r<2048?"%"+(r>>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function H(e){for(var r="",t=0,n=e.length;t<n;){var o=parseInt(e.substr(t+1,2),16);if(o<128)r+=String.fromCharCode(o),t+=3;else if(o>=194&&o<224){if(n-t>=6){var a=parseInt(e.substr(t+4,2),16);r+=String.fromCharCode((31&o)<<6|63&a)}else r+=e.substr(t,6);t+=6}else if(o>=224){if(n-t>=9){var i=parseInt(e.substr(t+4,2),16),s=parseInt(e.substr(t+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&s)}else r+=e.substr(t,9);t+=9}else r+=e.substr(t,3),t+=3}return r}function V(e,r){function t(e){var t=H(e);return t.match(r.UNRESERVED)?t:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,t).replace(r.NOT_USERINFO,L).replace(r.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_HOST,L).replace(r.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(r.PCT_ENCODED,t).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,L).replace(r.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(r.PCT_ENCODED,t).replace(r.NOT_QUERY,L).replace(r.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,t).replace(r.NOT_FRAGMENT,L).replace(r.PCT_ENCODED,o)),e}function M(e){return e.replace(/^0*(.*)/,"$1")||"0"}function K(e,r){var t=e.match(r.IPV4ADDRESS)||[],n=l(t,2)[1];return n?n.split(".").map(M).join("."):e}function Z(e,r){var t=e.match(r.IPV6ADDRESS)||[],n=l(t,3),o=n[1],a=n[2];if(o){for(var i=o.toLowerCase().split("::").reverse(),s=l(i,2),c=s[0],u=s[1],p=u?u.split(":").map(M):[],f=c.split(":").map(M),d=r.IPV4ADDRESS.test(f[f.length-1]),h=d?7:8,v=f.length-h,y=Array(h),m=0;m<h;++m)y[m]=p[m]||f[v+m]||"";d&&(y[h-1]=K(y[h-1],r));var g=y.reduce((function(e,r,t){if(!r||"0"===r){var n=e[e.length-1];n&&n.index+n.length===t?n.length++:e.push({index:t,length:1})}return e}),[]).sort((function(e,r){return r.length-e.length}))[0],b=void 0;if(g&&g.length>1){var w=y.slice(0,g.index),E=y.slice(g.index+g.length);b=w.join(":")+"::"+E.join(":")}else b=y.join(":");return a&&(b+="%"+a),b}return e}var J=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,B=void 0==="".match(/(){0}/)[1];function W(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t={},n=!1!==r.iri?u:c;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(J);if(o){B?(t.scheme=o[1],t.userinfo=o[3],t.host=o[4],t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=o[7],t.fragment=o[8],isNaN(t.port)&&(t.port=o[5])):(t.scheme=o[1]||void 0,t.userinfo=-1!==e.indexOf("@")?o[3]:void 0,t.host=-1!==e.indexOf("//")?o[4]:void 0,t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=-1!==e.indexOf("?")?o[7]:void 0,t.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(t.port)&&(t.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),t.host&&(t.host=Z(K(t.host,n),n)),void 0!==t.scheme||void 0!==t.userinfo||void 0!==t.host||void 0!==t.port||t.path||void 0!==t.query?void 0===t.scheme?t.reference="relative":void 0===t.fragment?t.reference="absolute":t.reference="uri":t.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==t.reference&&(t.error=t.error||"URI is not a "+r.reference+" reference.");var a=z[(r.scheme||t.scheme||"").toLowerCase()];if(r.unicodeSupport||a&&a.unicodeSupport)V(t,n);else{if(t.host&&(r.domainHost||a&&a.domainHost))try{t.host=q.toASCII(t.host.replace(n.PCT_ENCODED,H).toLowerCase())}catch(e){t.error=t.error||"Host's domain name can not be converted to ASCII via punycode: "+e}V(t,c)}a&&a.parse&&a.parse(t,r)}else t.error=t.error||"URI can not be parsed.";return t}function G(e,r){var t=!1!==r.iri?u:c,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(Z(K(String(e.host),t),t).replace(t.IPV6ADDRESS,(function(e,r,t){return"["+r+(t?"%25"+t:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}var Q=/^\.\.?\//,Y=/^\/\.(\/|$)/,X=/^\/\.\.(\/|$)/,ee=/^\/?(?:.|\n)*?(?=\/|$)/;function re(e){for(var r=[];e.length;)if(e.match(Q))e=e.replace(Q,"");else if(e.match(Y))e=e.replace(Y,"/");else if(e.match(X))e=e.replace(X,"/"),r.pop();else if("."===e||".."===e)e="";else{var t=e.match(ee);if(!t)throw new Error("Unexpected dot segment condition");var n=t[0];e=e.slice(n.length),r.push(n)}return r.join("")}function te(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.iri?u:c,n=[],o=z[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(t.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?q.toUnicode(e.host):q.toASCII(e.host.replace(t.PCT_ENCODED,H).toLowerCase())}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+t}V(e,t),"suffix"!==r.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var a=G(e,r);if(void 0!==a&&("suffix"!==r.reference&&n.push("//"),n.push(a),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var i=e.path;r.absolutePath||o&&o.absolutePath||(i=re(i)),void 0===a&&(i=i.replace(/^\/\//,"/%2F")),n.push(i)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function ne(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=W(te(e,t),t),r=W(te(r,t),t)),!(t=t||{}).tolerant&&r.scheme?(n.scheme=r.scheme,n.userinfo=r.userinfo,n.host=r.host,n.port=r.port,n.path=re(r.path||""),n.query=r.query):(void 0!==r.userinfo||void 0!==r.host||void 0!==r.port?(n.userinfo=r.userinfo,n.host=r.host,n.port=r.port,n.path=re(r.path||""),n.query=r.query):(r.path?("/"===r.path.charAt(0)?n.path=re(r.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:n.path=r.path:n.path="/"+r.path,n.path=re(n.path)),n.query=r.query):(n.path=e.path,void 0!==r.query?n.query=r.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=r.fragment,n}function oe(e,r,t){var n=i({scheme:"null"},t);return te(ne(W(e,n),W(r,n),n,!0),n)}function ae(e,r){return"string"==typeof e?e=te(W(e,r),r):"object"===n(e)&&(e=W(te(e,r),r)),e}function ie(e,r,t){return"string"==typeof e?e=te(W(e,t),t):"object"===n(e)&&(e=te(e,t)),"string"==typeof r?r=te(W(r,t),t):"object"===n(r)&&(r=te(r,t)),e===r}function se(e,r){return e&&e.toString().replace(r&&r.iri?u.ESCAPE:c.ESCAPE,L)}function ce(e,r){return e&&e.toString().replace(r&&r.iri?u.PCT_ENCODED:c.PCT_ENCODED,H)}var ue={scheme:"http",domainHost:!0,parse:function(e,r){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,r){var t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},le={scheme:"https",domainHost:ue.domainHost,parse:ue.parse,serialize:ue.serialize};function pe(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var fe={scheme:"ws",domainHost:!0,parse:function(e,r){var t=e;return t.secure=pe(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t},serialize:function(e,r){if(e.port!==(pe(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var t=e.resourceName.split("?"),n=l(t,2),o=n[0],a=n[1];e.path=o&&"/"!==o?o:void 0,e.query=a,e.resourceName=void 0}return e.fragment=void 0,e}},de={scheme:"wss",domainHost:fe.domainHost,parse:fe.parse,serialize:fe.serialize},he={},ve="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ye="[0-9A-Fa-f]",me=t(t("%[EFef]"+ye+"%"+ye+ye+"%"+ye+ye)+"|"+t("%[89A-Fa-f]"+ye+"%"+ye+ye)+"|"+t("%"+ye+ye)),ge="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",be=r("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),we="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Ee=new RegExp(ve,"g"),Se=new RegExp(me,"g"),Oe=new RegExp(r("[^]",ge,"[\\.]",'[\\"]',be),"g"),Ce=new RegExp(r("[^]",ve,we),"g"),Ae=Ce;function Ie(e){var r=H(e);return r.match(Ee)?r:e}var je={scheme:"mailto",parse:function(e,r){var t=e,n=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var o=!1,a={},i=t.query.split("&"),s=0,c=i.length;s<c;++s){var u=i[s].split("=");switch(u[0]){case"to":for(var l=u[1].split(","),p=0,f=l.length;p<f;++p)n.push(l[p]);break;case"subject":t.subject=ce(u[1],r);break;case"body":t.body=ce(u[1],r);break;default:o=!0,a[ce(u[0],r)]=ce(u[1],r)}}o&&(t.headers=a)}t.query=void 0;for(var d=0,h=n.length;d<h;++d){var v=n[d].split("@");if(v[0]=ce(v[0]),r.unicodeSupport)v[1]=ce(v[1],r).toLowerCase();else try{v[1]=q.toASCII(ce(v[1],r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[d]=v.join("@")}return t},serialize:function(e,r){var t=e,n=a(e.to);if(n){for(var i=0,s=n.length;i<s;++i){var c=String(n[i]),u=c.lastIndexOf("@"),l=c.slice(0,u).replace(Se,Ie).replace(Se,o).replace(Oe,L),p=c.slice(u+1);try{p=r.iri?q.toUnicode(p):q.toASCII(ce(p,r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+e}n[i]=l+"@"+p}t.path=n.join(",")}var f=e.headers=e.headers||{};e.subject&&(f.subject=e.subject),e.body&&(f.body=e.body);var d=[];for(var h in f)f[h]!==he[h]&&d.push(h.replace(Se,Ie).replace(Se,o).replace(Ce,L)+"="+f[h].replace(Se,Ie).replace(Se,o).replace(Ae,L));return d.length&&(t.query=d.join("&")),t}},Te=/^([^\:]+)\:(.*)/,xe={scheme:"urn",parse:function(e,r){var t=e.path&&e.path.match(Te),n=e;if(t){var o=r.scheme||n.scheme||"urn",a=t[1].toLowerCase(),i=t[2],s=o+":"+(r.nid||a),c=z[s];n.nid=a,n.nss=i,n.path=void 0,c&&(n=c.parse(n,r))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,r){var t=r.scheme||e.scheme||"urn",n=e.nid,o=t+":"+(r.nid||n),a=z[o];a&&(e=a.serialize(e,r));var i=e,s=e.nss;return i.path=(n||r.nid)+":"+s,i}},$e=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,De={scheme:"urn:uuid",parse:function(e,r){var t=e;return t.uuid=t.nss,t.nss=void 0,r.tolerant||t.uuid&&t.uuid.match($e)||(t.error=t.error||"UUID is not valid."),t},serialize:function(e,r){var t=e;return t.nss=(e.uuid||"").toLowerCase(),t}};z[ue.scheme]=ue,z[le.scheme]=le,z[fe.scheme]=fe,z[de.scheme]=de,z[je.scheme]=je,z[xe.scheme]=xe,z[De.scheme]=De,e.SCHEMES=z,e.pctEncChar=L,e.pctDecChars=H,e.parse=W,e.removeDotSegments=re,e.serialize=te,e.resolveComponents=ne,e.resolve=oe,e.normalize=ae,e.equal=ie,e.escapeComponent=se,e.unescapeComponent=ce,Object.defineProperty(e,"__esModule",{value:!0})}(n.exports);const o=n.exports,a={null:e=>null===e,boolean:e=>"boolean"==typeof e,object:e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,array:e=>Array.isArray(e),number:e=>"number"==typeof e,integer:e=>Number.isInteger(e),string:e=>"string"==typeof e};var i={jsonTypeOf:(e,r)=>a[r](e),resolveUrl:(e,r)=>{const t=o.resolve(e,r,{iri:!0});if(o.resolve(e,"",{iri:!0})&&"file"===o.parse(t).scheme&&"file"!==o.parse(e).scheme)throw Error(`Can't access file '${t}' resource from network context '${e}'`);return t},urlFragment:e=>o.unescapeComponent(o.parse(e).fragment)||"",pathRelative:(e,r)=>{if(e===r)return"";let t=1;const n=e.length-1,o=r.length-t,a=n<o?n:o;let i=-1,s=0;for(;s<a;s++){const n=e.charCodeAt(s+1);if(n!==r.charCodeAt(t+s))break;47===n&&(i=s)}if(o>a){if(47===r.charCodeAt(t+s))return r.slice(t+s+1);if(0===s)return r.slice(t+s)}n>a&&(47===e.charCodeAt(s+1)?i=s:0===a&&(i=0));let c="";for(s=i+2;s<=e.length;++s)s!==e.length&&47!==e.charCodeAt(s)||(c+=0===c.length?"..":"/..");return t+=i,c.length>0?`${c}${r.slice(t,r.length)}`:(47===r.charCodeAt(t)&&++t,r.slice(t,r.length))}};const s=r,c=e=>{if(e.length>0&&"/"!==e[0])throw Error("Invalid JSON Pointer");return e.split("/").slice(1).map(v)},u=(e,r,t,n)=>{if(0===e.length)return t;if(e.length>1){const o=e.shift();return{...r,[o]:u(e,m(r,o,n),t,d(o,n))}}if(Array.isArray(r)){const n=[...r];return n[y(r,e[0])]=t,n}return"object"==typeof r&&null!==r?{...r,[e[0]]:t}:m(r,e[0],n)},l=(e,r,t,n)=>{if(0!==e.length)if(1!==e.length||g(r)){const o=e.shift();l(e,m(r,o,n),t,d(o,n))}else{r[y(r,e[0])]=t}},p=(e,r,t)=>{if(0!=e.length){if(e.length>1){const n=e.shift(),o=m(r,n,t);return{...r,[n]:p(e,o,d(n,t))}}if(Array.isArray(r))return r.filter(((r,t)=>t!=e[0]));if("object"==typeof r&&null!==r){const{[e[0]]:t,...n}=r;return n}return m(r,e[0],t)}},f=(e,r,t)=>{if(0!==e.length)if(e.length>1){const n=e.shift(),o=m(r,n,t);f(e,o,d(n,t))}else Array.isArray(r)?r.splice(e[0],1):"object"==typeof r&&null!==r?delete r[e[0]]:m(r,e[0],t)},d=s(((e,r)=>r+"/"+h(e))),h=e=>e.toString().replace(/~/g,"~0").replace(/\//g,"~1"),v=e=>e.toString().replace(/~1/g,"/").replace(/~0/g,"~"),y=(e,r)=>Array.isArray(e)&&"-"===r?e.length:r,m=(e,r,t="")=>{if(void 0===e)throw TypeError(`Value at '${t}' is undefined and does not have property '${r}'`);if(null===e)throw TypeError(`Value at '${t}' is null and does not have property '${r}'`);if(g(e))throw TypeError(`Value at '${t}' is a ${typeof e} and does not have property '${r}'`);return e[y(e,r)]},g=e=>null===e||"object"!=typeof e;var b={nil:"",append:d,get:(e,r)=>{const t=c(e),n=e=>t.reduce((([e,r],t)=>[m(e,t,r),d(t,r)]),[e,""])[0];return void 0===r?n:n(r)},set:(e,r,t)=>{const n=c(e),o=s(((e,r)=>u(n,e,r,"")));return void 0===r?o:o(r,t)},assign:(e,r,t)=>{const n=c(e),o=s(((e,r)=>l(n,e,r,"")));return void 0===r?o:o(r,t)},unset:(e,r)=>{const t=c(e),n=e=>p(t,e,"");return void 0===r?n:n(r)},remove:(e,r)=>{const t=c(e),n=e=>f(t,e,"");return void 0===r?n:n(r)}};const w=Symbol("$__value"),E=Symbol("$__href");var S={cons:(e,r)=>Object.freeze({[E]:e,[w]:r}),isReference:e=>e&&void 0!==e[E],href:e=>e[E],value:e=>e[w]};const O=b,C=r,{resolveUrl:A,jsonTypeOf:I}=i,j=S,T=Object.freeze({id:"",pointer:"",instance:void 0,value:void 0}),x=e=>j.isReference(e.value)?j.value(e.value):e.value,$=C(((e,r)=>I(x(e),r))),D=(e,r)=>Object.freeze({...r,pointer:O.append(e,r.pointer),value:x(r)[e]}),P=C(((e,r)=>x(r).map(((t,n,o,a)=>e(D(n,r),n,o,a))))),N=C(((e,r)=>x(r).forEach(((t,n,o,a)=>e(D(n,r),n,o,a))))),R=C(((e,r)=>x(r).map(((e,t,n,o)=>D(t,r))).filter(((r,t,n,o)=>e(r,t,n,o))))),F=C(((e,r,t)=>x(t).reduce(((r,n,o)=>e(r,D(o,t),o)),r))),_=C(((e,r)=>x(r).every(((t,n,o,a)=>e(D(n,r),n,o,a))))),U=C(((e,r)=>x(r).some(((t,n,o,a)=>e(D(n,r),n,o,a)))));var k={nil:T,cons:(e,r="")=>Object.freeze({...T,id:A(r,""),instance:e,value:e}),get:(e,r=T)=>{if(!e.startsWith("#"))throw Error(`No JSON document found at '${e.split("#")[0]}'`);return Object.freeze({...r,pointer:e.substr(1)})},uri:e=>`${e.id}#${encodeURI(e.pointer)}`,value:x,has:(e,r)=>e in x(r),typeOf:$,length:e=>x(e).length,step:D,entries:e=>Object.keys(x(e)).map((r=>[r,D(r,e)])),keys:e=>Object.keys(x(e)),map:P,forEach:N,filter:R,reduce:F,every:_,some:U},q=async e=>Object.entries(await e);var z=r((async(e,r)=>(await r).map(e)));var L=r((async(e,r,t)=>(await t).reduce((async(r,t)=>e(await r,t)),r)));const H=L;var V=r((async(e,r,t={})=>H((async(r,t)=>await e(t)?r.concat([t]):r),[],r,t)));const M=z;var K=r((async(e,r)=>{const t=await M(e,r);return(await Promise.all(t)).some((e=>e))}));const Z=z;var J=r((async(e,r)=>{const t=await Z(e,r);return(await Promise.all(t)).every((e=>e))}));var B=r(((e,r)=>e.reduce((async(e,r)=>r(await e)),r)));const W=B,G=q,Q=L;var Y={entries:q,map:z,filter:V,reduce:L,some:K,every:J,pipeline:B,all:e=>Promise.all(e),allValues:e=>W([G,Q((async(e,[r,t])=>(e[r]=await t,e)),{})],e)},X=fetch,ee={},re=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,te=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,ne=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,oe=/\\([\u000b\u0020-\u00ff])/g,ae=/([\\"])/g,ie=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;function se(e){var r=String(e);if(ne.test(r))return r;if(r.length>0&&!te.test(r))throw new TypeError("invalid parameter value");return'"'+r.replace(ae,"\\$1")+'"'}function ce(e){this.parameters=Object.create(null),this.type=e}ee.format=function(e){if(!e||"object"!=typeof e)throw new TypeError("argument obj is required");var r=e.parameters,t=e.type;if(!t||!ie.test(t))throw new TypeError("invalid type");var n=t;if(r&&"object"==typeof r)for(var o,a=Object.keys(r).sort(),i=0;i<a.length;i++){if(o=a[i],!ne.test(o))throw new TypeError("invalid parameter name");n+="; "+o+"="+se(r[o])}return n},ee.parse=function(e){if(!e)throw new TypeError("argument string is required");var r="object"==typeof e?function(e){var r;"function"==typeof e.getHeader?r=e.getHeader("content-type"):"object"==typeof e.headers&&(r=e.headers&&e.headers["content-type"]);if("string"!=typeof r)throw new TypeError("content-type header is missing from object");return r}(e):e;if("string"!=typeof r)throw new TypeError("argument string is required to be a string");var t=r.indexOf(";"),n=-1!==t?r.substr(0,t).trim():r.trim();if(!ie.test(n))throw new TypeError("invalid media type");var o=new ce(n.toLowerCase());if(-1!==t){var a,i,s;for(re.lastIndex=t;i=re.exec(r);){if(i.index!==t)throw new TypeError("invalid parameter format");t+=i[0].length,a=i[1].toLowerCase(),'"'===(s=i[2])[0]&&(s=s.substr(1,s.length-2).replace(oe,"$1")),o.parameters[a]=s}if(t!==r.length)throw new TypeError("invalid parameter format")}return o};const ue=ee,le={};var pe={addPlugin:(e,r)=>{le[e]=r},parse:e=>{const r=ue.parse(e.headers.get("content-type"));if(!(r.type in le))throw Error(`${e.url} is not a schema. Found a document with media type: ${r.type}`);return le[r.type].parse(e,r.parameters)},getContentType:e=>{for(const r in le)if(le[r].matcher(e))return r;return"application/octet-stream"}};const fe=r,de=Y,he=b,{jsonTypeOf:ve,resolveUrl:ye,urlFragment:me,pathRelative:ge}=i,be=X,we=S,Ee=pe,Se="https://json-schema.org/draft/2019-09/vocab/core",Oe="https://json-schema.org/draft/2020-12/vocab/core",Ce={},Ae={},Ie=(e,r)=>{const t=Ae[e];return Ce[t]?.[r]},je={},Te={},xe=(e,r="",t="")=>{e=JSON.parse(JSON.stringify(e));const n=ye(r,""),o=ye(e.$schema||t,"");if(!o)throw Error("Couldn't determine schema dialect");if(delete e.$schema,!(o in Ae))if(!0===e?.$vocabulary?.[Se]&&o===$e(e,n,Se)[0])Ae[o]=Se;else if(!0===e?.$vocabulary?.[Oe]&&o===$e(e,n,Oe)[0])Ae[o]=Oe;else{const e=je[o];if(!e)throw Error(`Couldn't determine JSON Schema version for dialect: '${o}'`);!0===e.vocabulary[Se]?Ae[o]=Se:!0===e.vocabulary[Oe]?Ae[o]=Oe:Ae[o]=Ae[e.dialectId]}const[a,i]=$e(e,n,Ae[o]);if(!a)throw Error("Couldn't determine an identifier for the schema");const s=Ie(o,"baseToken");delete e[s],n&&(Te[n]=a);const c=Ie(o,"anchorToken");i&&s===c&&(e[c]=c!==s?encodeURI(i):`#${encodeURI(i)}`);const u={},l=Ie(o,"recursiveAnchorToken");let p;!0===e[l]&&(u[""]=`${a}#`,e[c]="",delete e[l]);const f=Ie(o,"vocabularyToken");ve(e[f],"object")?(p=e[f],delete e[f]):p={[Ae[o]]:!0};const d={"":""};return je[a]={id:a,dialectId:o,schema:De(e,a,o,he.nil,d,u),anchors:d,dynamicAnchors:u,vocabulary:p,validated:!1},a},$e=(e,r,t)=>{const n=Ce[t]?.baseToken,o=ye(r,e[n]||"");return[ye(o,""),me(o)]},De=(e,r,t,n,o,a)=>{if(ve(e,"object")){const i="string"==typeof e.$schema?ye(e.$schema,""):t,s=Ie(i,"embeddedToken"),c=Ie(i,"anchorToken");if("string"==typeof e[s]&&(s!==c||"#"!==e[s][0])){const n=ye(r,e[s]);return e[Ie(i,"baseToken")]=n,xe(e,n,t),we.cons(e[s],e)}const u=Ie(t,"anchorToken"),l=Ie(t,"dynamicAnchorToken");"string"==typeof e[l]&&(a[e[l]]=`${r}#${encodeURI(n)}`,o[e[l]]=n,delete e[l]);const p=Ie(t,"embeddedToken");if("string"==typeof e[u]){const r=u!==p?e[u]:e[u].slice(1);o[r]=n,delete e[u]}const f=Ie(t,"jrefToken");if("string"==typeof e[f])return we.cons(e[f],e);for(const i in e)e[i]=De(e[i],r,t,he.append(i,n),o,a);return e}return Array.isArray(e)?e.map(((e,i)=>De(e,r,t,he.append(i,n),o,a))):e},Pe=e=>je[Te[e]]||je[e],Ne=Object.freeze({id:"",dialectId:void 0,vocabulary:{},pointer:he.nil,schema:void 0,value:void 0,anchors:{},dynamicAnchors:{},validated:!0}),Re=async(e,r=Ne)=>{const t=ye(Ue(r),e),n=ye(t,""),o=me(t);if(!(e=>e in je||e in Te)(n)){const e=await be(n,{headers:{Accept:"application/schema+json"}});if(e.status>=400)throw await e.text(),Error(`Failed to retrieve schema with id: ${n}`);const[r,t]=await Ee.parse(e);let o;o=r.$schema?ye(r.$schema,""):t?ye(n,t):"",o&&n!==o&&!(o in Ae)&&await Re(o),xe(r,n,o)}const a=Pe(n),i="/"!==o[0]?_e(a,o):o,s=Object.freeze({...a,pointer:i,value:he.get(i,a.schema)});return Fe(s)},Fe=e=>we.isReference(e.value)?Re(we.href(e.value),e):e,_e=(e,r)=>{if(!(r in e.anchors))throw Error(`No such anchor '${encodeURI(e.id)}#${encodeURI(r)}'`);return e.anchors[r]},Ue=e=>`${e.id}#${encodeURI(e.pointer)}`,ke=e=>we.isReference(e.value)?we.value(e.value):e.value,qe=(e,r)=>{const t=Pe(r.id),n=Object.freeze({...r,pointer:he.append(e,r.pointer),value:ke(r)[e],validated:t.validated});return Fe(n)},ze=fe(((e,r)=>de.pipeline([ke,de.map((async(t,n)=>e(await qe(n,r),n))),de.all],r))),Le={parentId:"",parentDialect:"",includeEmbedded:!0},He=(e,r)=>{if(r.startsWith("file://")){const t=e.slice(7,e.lastIndexOf("/"));return""===e?"":ge(t,r.slice(7))}return r};var Ve={setConfig:(e,r,t)=>{Ae[e]=e,Ce[e]||(Ce[e]={}),Ce[e][r]=t},getConfig:Ie,add:xe,get:Re,markValidated:e=>{je[e].validated=!0},uri:Ue,value:ke,getAnchorPointer:_e,typeOf:(e,r)=>ve(ke(e),r),has:(e,r)=>e in ke(r),step:qe,keys:e=>Object.keys(ke(e)),entries:e=>de.pipeline([ke,Object.keys,de.map((async r=>[r,await qe(r,e)])),de.all],e),map:ze,length:e=>ke(e).length,toSchema:(e,r={})=>{const t={...Le,...r},n=JSON.parse(JSON.stringify(e.schema,((r,n)=>{if(!we.isReference(n))return n;const o=we.value(n),a="string"==typeof o.$schema?ye(o.$schema,""):e.dialectId,i=Ie(a,"embeddedToken");return!t.includeEmbedded&&i in o?void 0:we.value(n)}))),o=Ie(e.dialectId,"dynamicAnchorToken");Object.entries(e.dynamicAnchors).forEach((([e,r])=>{const t=he.append(o,me(r));he.assign(t,n,e)}));const a=Ie(e.dialectId,"anchorToken");Object.entries(e.anchors).filter((([r])=>""!==r&&!(r in e.dynamicAnchors))).forEach((([e,r])=>{const t=he.append(a,r);he.assign(t,n,e)}));const i=Ie(e.dialectId,"baseToken"),s=He(t.parentId,e.id),c=t.parentDialect===e.dialectId?"":e.dialectId;return{...s&&{[i]:s},...c&&{$schema:c},...n}}};class Me extends Error{constructor(e){super("Invalid Schema"),this.name=this.constructor.name,this.output=e}}var Ke=Me;const Ze=Ve;var Je={compile:e=>Ze.value(e),interpret:()=>!0};const Be=r,We=t.exports,{resolveUrl:Ge}=i,Qe=k,Ye=Ve,Xe=Ke,er=pe,rr=Je,tr="FLAG",nr="BASIC",or="DETAILED",ar="VERBOSE";let ir=or,sr=!0;er.addPlugin("application/schema+json",{parse:async(e,r)=>[await e.json(),r.schema||r.profile],matcher:e=>e.endsWith(".schema.json")});const cr=async e=>{const r={metaData:{}};return{ast:r,schemaUri:await yr(e,r)}},ur=Be((({ast:e,schemaUri:r},t,n=tr)=>{if(![tr,nr,or,ar].includes(n))throw Error(`The '${n}' error format is not supported`);const o=[],a=We.subscribe("result",lr(n,o));return gr(r,t,e,{}),We.unsubscribe(a),o[0]})),lr=(e,r)=>{const t=[];return(n,o)=>{if("result"===n){const{keyword:e,absoluteKeywordLocation:r,instanceLocation:n,valid:a}=o,i={keyword:e,absoluteKeywordLocation:r,instanceLocation:n,valid:a,errors:[]};t.push(i)}else if("result.start"===n)t.push(n);else if("result.end"===n){const n=t.pop();for(;"result.start"!==t[t.length-1];){const r=t.pop(),o=[r];e===nr&&(o.push(...r.errors),delete r.errors),(e===ar||e!==tr&&!r.valid)&&n.errors.unshift(...o)}t[t.length-1]=n,r[0]=n}}},pr={},fr=e=>pr[e]||rr,dr=e=>e in pr,hr={},vr={},yr=async(e,r)=>{if(e=await mr(e),!dr(`${e.dialectId}#validate`)){const r=await Ye.get(e.dialectId);(Ye.getConfig(r.id,"mandatoryVocabularies")||[]).forEach((e=>{if(!r.vocabulary[e])throw Error(`Vocabulary '${e}' must be explicitly declared and required`)})),Object.entries(r.vocabulary).forEach((([e,t])=>{if(e in hr)Object.entries(hr[e]).forEach((([e,t])=>{((e,r)=>{pr[e]={collectEvaluatedItems:(e,t,n,o,a)=>r.interpret(e,t,n,o,a)&&new Set,collectEvaluatedProperties:(e,t,n,o,a)=>r.interpret(e,t,n,o,a)&&[],...r}})(`${r.id}#${e}`,t)}));else if(t)throw Error(`Missing required vocabulary: ${e}`)}))}if(sr&&!e.validated){if(Ye.markValidated(e.id),!(e.dialectId in vr)){const r=await Ye.get(e.dialectId),t=await cr(r);vr[r.id]=ur(t)}const r=Qe.cons(e.schema,e.id),t=vr[e.dialectId](r,ir);if(!t.valid)throw new Xe(t)}return e.id in r.metaData||(r.metaData[e.id]={id:e.id,dynamicAnchors:e.dynamicAnchors,anchors:e.anchors}),fr(`${e.dialectId}#validate`).compile(e,r)},mr=async e=>Ye.typeOf(e,"string")?mr(await Ye.get(Ye.value(e),e)):e,gr=(e,r,t,n)=>{const o=br(e,t),a=Ge(e,"");return fr(o).interpret(e,r,t,{...t.metaData[a].dynamicAnchors,...n})},br=(e,r)=>{if(!(e in r))throw Error(`No schema found at ${e}`);return r[e][0]};var wr={validate:async(e,r,t)=>{const n=await cr(e),o=(e,r)=>ur(n,Qe.cons(e),r);return void 0===r?o:o(r,t)},compile:cr,interpret:ur,setMetaOutputFormat:e=>{ir=e},setShouldMetaValidate:e=>{sr=e},FLAG:tr,BASIC:nr,DETAILED:or,VERBOSE:ar,add:(e,r="",t="")=>{const n=Ye.add(e,r,t);delete vr[n]},getKeyword:fr,hasKeyword:dr,defineVocabulary:(e,r)=>{hr[e]=r},compileSchema:yr,interpretSchema:gr,collectEvaluatedProperties:(e,r,t,n,o)=>{const a=br(e,t);return fr(a).collectEvaluatedProperties(e,r,t,n,o)},collectEvaluatedItems:(e,r,t,n,o)=>{const a=br(e,t);return fr(a).collectEvaluatedItems(e,r,t,n,o)},addMediaTypePlugin:er.addPlugin};const Er=Y,Sr=t.exports,Or=wr,Cr=k,Ar=Ve;var Ir={compile:async(e,r)=>{const t=Ar.uri(e);if(!(t in r)){r[t]=!1;const n=Ar.value(e);if(!["object","boolean"].includes(typeof n))throw Error(`No schema found at '${Ar.uri(e)}'`);r[t]=[`${e.dialectId}#validate`,Ar.uri(e),"boolean"==typeof n?n:await Er.pipeline([Ar.entries,Er.map((([r,t])=>[`${e.dialectId}#${r}`,t])),Er.filter((([r])=>r!==`${e.dialectId}#validate`)),Er.map((async([t,n])=>{const o=await Or.getKeyword(t).compile(n,r,e);return[t,Ar.uri(n),o]})),Er.all],e)]}return t},interpret:(e,r,t,n)=>{const[o,a,i]=t[e];Sr.publishSync("result.start");const s="boolean"==typeof i?i:i.every((([e,o,a])=>{Sr.publishSync("result.start");const i=Or.getKeyword(e).interpret(a,r,t,n);return Sr.publishSync("result",{keyword:e,absoluteKeywordLocation:o,instanceLocation:Cr.uri(r),valid:i,ast:a}),Sr.publishSync("result.end"),i}));return Sr.publishSync("result",{keyword:o,absoluteKeywordLocation:a,instanceLocation:Cr.uri(r),valid:s,ast:e}),Sr.publishSync("result.end"),s},collectEvaluatedProperties:(e,r,t,n,o=!1)=>{const a=t[e][2];return"boolean"==typeof a?!!a&&[]:a.filter((([e])=>!o||!e.endsWith("#unevaluatedProperties"))).reduce(((e,[o,,a])=>{const i=e&&Or.getKeyword(o).collectEvaluatedProperties(a,r,t,n);return!1!==i&&[...e,...i]}),[])},collectEvaluatedItems:(e,r,t,n,o=!1)=>{const a=t[e][2];return"boolean"==typeof a?!!a&&new Set:a.filter((([e])=>!o||!e.endsWith("#unevaluatedItems"))).reduce(((e,[o,,a])=>{const i=!1!==e&&Or.getKeyword(o).collectEvaluatedItems(a,r,t,n);return!1!==i&&new Set([...e,...i])}),new Set)}};var jr={Core:wr,Schema:Ve,Instance:k,Reference:S,Keywords:{metaData:Je,validate:Ir},InvalidSchemaError:Ke};exports.default=jr;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=function(e,t){return function r(){null==t&&(t=e.length);var n=[].slice.call(arguments);return n.length>=t?e.apply(this,n):function(){return r.apply(this,n.concat([].slice.call(arguments)))}}};var r={exports:{}};!function(t,r){!function(e,n){var o={};e.PubSub?(o=e.PubSub,console.warn("PubSub already loaded, using existing version")):(e.PubSub=o,function(e){var t={},r=-1,n="*";function o(e){var t;for(t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!0;return!1}function a(e){return function(){throw e}}function i(e,t,r){try{e(t,r)}catch(e){setTimeout(a(e),0)}}function s(e,t,r){e(t,r)}function c(e,r,n,o){var a,c=t[r],u=o?s:i;if(Object.prototype.hasOwnProperty.call(t,r))for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&u(c[a],e,n)}function u(e,t,r){return function(){var o=String(e),a=o.lastIndexOf(".");for(c(e,e,t,r);-1!==a;)a=(o=o.substr(0,a)).lastIndexOf("."),c(e,o,t,r);c(e,n,t,r)}}function l(e){var r=String(e);return Boolean(Object.prototype.hasOwnProperty.call(t,r)&&o(t[r]))}function p(e){for(var t=String(e),r=l(t)||l(n),o=t.lastIndexOf(".");!r&&-1!==o;)o=(t=t.substr(0,o)).lastIndexOf("."),r=l(t);return r}function f(e,t,r,n){var o=u(e="symbol"==typeof e?e.toString():e,t,n);return!!p(e)&&(!0===r?o():setTimeout(o,0),!0)}e.publish=function(t,r){return f(t,r,!1,e.immediateExceptions)},e.publishSync=function(t,r){return f(t,r,!0,e.immediateExceptions)},e.subscribe=function(e,n){if("function"!=typeof n)return!1;e="symbol"==typeof e?e.toString():e,Object.prototype.hasOwnProperty.call(t,e)||(t[e]={});var o="uid_"+String(++r);return t[e][o]=n,o},e.subscribeAll=function(t){return e.subscribe(n,t)},e.subscribeOnce=function(t,r){var n=e.subscribe(t,(function(){e.unsubscribe(n),r.apply(this,arguments)}));return e},e.clearAllSubscriptions=function(){t={}},e.clearSubscriptions=function(e){var r;for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&0===r.indexOf(e)&&delete t[r]},e.countSubscriptions=function(e){var r,n,o=0;for(r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&0===r.indexOf(e)){for(n in t[r])o++;break}return o},e.getSubscriptions=function(e){var r,n=[];for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&0===r.indexOf(e)&&n.push(r);return n},e.unsubscribe=function(r){var n,o,a,i=function(e){var r;for(r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&0===r.indexOf(e))return!0;return!1},s="string"==typeof r&&(Object.prototype.hasOwnProperty.call(t,r)||i(r)),c=!s&&"string"==typeof r,u="function"==typeof r,l=!1;if(!s){for(n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(o=t[n],c&&o[r]){delete o[r],l=r;break}if(u)for(a in o)Object.prototype.hasOwnProperty.call(o,a)&&o[a]===r&&(delete o[a],l=!0)}return l}e.clearSubscriptions(r)}}(o)),void 0!==t&&t.exports&&(r=t.exports=o),r.PubSub=o,t.exports=r=o}("object"==typeof window&&window||e)}(r,r.exports);var n={exports:{}};
/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */!function(e){function t(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(t.length>1){t[0]=t[0].slice(0,-1);for(var n=t.length-1,o=1;o<n;++o)t[o]=t[o].slice(1,-1);return t[n]=t[n].slice(1),t.join("")}return t[0]}function r(e){return"(?:"+e+")"}function n(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function a(e){return null!=e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function i(e,t){var r=e;if(t)for(var n in t)r[n]=t[n];return r}function s(e){var n="[A-Za-z]",o="[0-9]",a=t(o,"[A-Fa-f]"),i=r(r("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+r("%[89A-Fa-f]"+a+"%"+a+a)+"|"+r("%"+a+a)),s="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",c=t("[\\:\\/\\?\\#\\[\\]\\@]",s),u=e?"[\\uE000-\\uF8FF]":"[]",l=t(n,o,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");r(n+t(n,o,"[\\+\\-\\.]")+"*"),r(r(i+"|"+t(l,s,"[\\:]"))+"*");var p=r(r("25[0-5]")+"|"+r("2[0-4]"+o)+"|"+r("1"+o+o)+"|"+r("0?[1-9]"+o)+"|0?0?"+o),f=r(p+"\\."+p+"\\."+p+"\\."+p),h=r(a+"{1,4}"),d=r(r(h+"\\:"+h)+"|"+f),v=r(r(h+"\\:")+"{6}"+d),y=r("\\:\\:"+r(h+"\\:")+"{5}"+d),g=r(r(h)+"?\\:\\:"+r(h+"\\:")+"{4}"+d),m=r(r(r(h+"\\:")+"{0,1}"+h)+"?\\:\\:"+r(h+"\\:")+"{3}"+d),b=r(r(r(h+"\\:")+"{0,2}"+h)+"?\\:\\:"+r(h+"\\:")+"{2}"+d),w=r(r(r(h+"\\:")+"{0,3}"+h)+"?\\:\\:"+h+"\\:"+d),E=r(r(r(h+"\\:")+"{0,4}"+h)+"?\\:\\:"+d),x=r(r(r(h+"\\:")+"{0,5}"+h)+"?\\:\\:"+h),S=r(r(r(h+"\\:")+"{0,6}"+h)+"?\\:\\:"),O=r([v,y,g,m,b,w,E,x,S].join("|")),C=r(r(l+"|"+i)+"+");r("[vV]"+a+"+\\."+t(l,s,"[\\:]")+"+"),r(r(i+"|"+t(l,s))+"*");var A=r(i+"|"+t(l,s,"[\\:\\@]"));return r(r(i+"|"+t(l,s,"[\\@]"))+"+"),r(r(A+"|"+t("[\\/\\?]",u))+"*"),{NOT_SCHEME:new RegExp(t("[^]",n,o,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(t("[^\\%\\:]",l,s),"g"),NOT_HOST:new RegExp(t("[^\\%\\[\\]\\:]",l,s),"g"),NOT_PATH:new RegExp(t("[^\\%\\/\\:\\@]",l,s),"g"),NOT_PATH_NOSCHEME:new RegExp(t("[^\\%\\/\\@]",l,s),"g"),NOT_QUERY:new RegExp(t("[^\\%]",l,s,"[\\:\\@\\/\\?]",u),"g"),NOT_FRAGMENT:new RegExp(t("[^\\%]",l,s,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(t("[^]",l,s),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(t("[^\\%]",l,c),"g"),PCT_ENCODED:new RegExp(i,"g"),IPV4ADDRESS:new RegExp("^("+f+")$"),IPV6ADDRESS:new RegExp("^\\[?("+O+")"+r(r("\\%25|\\%(?!"+a+"{2})")+"("+C+")")+"?\\]?$")}}var c=s(!1),u=s(!0),l=function(){function e(e,t){var r=[],n=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(n=(i=s.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(o)throw a}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),p=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)},f=2147483647,h=36,d=1,v=26,y=38,g=700,m=72,b=128,w="-",E=/^xn--/,x=/[^\0-\x7E]/,S=/[\x2E\u3002\uFF0E\uFF61]/g,O={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},C=h-d,A=Math.floor,k=String.fromCharCode;function T(e){throw new RangeError(O[e])}function j(e,t){for(var r=[],n=e.length;n--;)r[n]=t(e[n]);return r}function I(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+j((e=e.replace(S,".")).split("."),t).join(".")}function $(e){for(var t=[],r=0,n=e.length;r<n;){var o=e.charCodeAt(r++);if(o>=55296&&o<=56319&&r<n){var a=e.charCodeAt(r++);56320==(64512&a)?t.push(((1023&o)<<10)+(1023&a)+65536):(t.push(o),r--)}else t.push(o)}return t}var P=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:h},R=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},N=function(e,t,r){var n=0;for(e=r?A(e/g):e>>1,e+=A(e/t);e>C*v>>1;n+=h)e=A(e/C);return A(n+(C+1)*e/(e+y))},D=function(e){var t=[],r=e.length,n=0,o=b,a=m,i=e.lastIndexOf(w);i<0&&(i=0);for(var s=0;s<i;++s)e.charCodeAt(s)>=128&&T("not-basic"),t.push(e.charCodeAt(s));for(var c=i>0?i+1:0;c<r;){for(var u=n,l=1,p=h;;p+=h){c>=r&&T("invalid-input");var y=P(e.charCodeAt(c++));(y>=h||y>A((f-n)/l))&&T("overflow"),n+=y*l;var g=p<=a?d:p>=a+v?v:p-a;if(y<g)break;var E=h-g;l>A(f/E)&&T("overflow"),l*=E}var x=t.length+1;a=N(n-u,x,0==u),A(n/x)>f-o&&T("overflow"),o+=A(n/x),n%=x,t.splice(n++,0,o)}return String.fromCodePoint.apply(String,t)},_=function(e){var t=[],r=(e=$(e)).length,n=b,o=0,a=m,i=!0,s=!1,c=void 0;try{for(var u,l=e[Symbol.iterator]();!(i=(u=l.next()).done);i=!0){var p=u.value;p<128&&t.push(k(p))}}catch(e){s=!0,c=e}finally{try{!i&&l.return&&l.return()}finally{if(s)throw c}}var y=t.length,g=y;for(y&&t.push(w);g<r;){var E=f,x=!0,S=!1,O=void 0;try{for(var C,j=e[Symbol.iterator]();!(x=(C=j.next()).done);x=!0){var I=C.value;I>=n&&I<E&&(E=I)}}catch(e){S=!0,O=e}finally{try{!x&&j.return&&j.return()}finally{if(S)throw O}}var P=g+1;E-n>A((f-o)/P)&&T("overflow"),o+=(E-n)*P,n=E;var D=!0,_=!1,F=void 0;try{for(var q,U=e[Symbol.iterator]();!(D=(q=U.next()).done);D=!0){var z=q.value;if(z<n&&++o>f&&T("overflow"),z==n){for(var L=o,H=h;;H+=h){var V=H<=a?d:H>=a+v?v:H-a;if(L<V)break;var M=L-V,B=h-V;t.push(k(R(V+M%B,0))),L=A(M/B)}t.push(k(R(L,0))),a=N(o,P,g==y),o=0,++g}}}catch(e){_=!0,F=e}finally{try{!D&&U.return&&U.return()}finally{if(_)throw F}}++o,++n}return t.join("")},F=function(e){return I(e,(function(e){return E.test(e)?D(e.slice(4).toLowerCase()):e}))},q=function(e){return I(e,(function(e){return x.test(e)?"xn--"+_(e):e}))},U={version:"2.1.0",ucs2:{decode:$,encode:function(e){return String.fromCodePoint.apply(String,p(e))}},decode:D,encode:_,toASCII:q,toUnicode:F},z={};function L(e){var t=e.charCodeAt(0);return t<16?"%0"+t.toString(16).toUpperCase():t<128?"%"+t.toString(16).toUpperCase():t<2048?"%"+(t>>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function H(e){for(var t="",r=0,n=e.length;r<n;){var o=parseInt(e.substr(r+1,2),16);if(o<128)t+=String.fromCharCode(o),r+=3;else if(o>=194&&o<224){if(n-r>=6){var a=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((31&o)<<6|63&a)}else t+=e.substr(r,6);r+=6}else if(o>=224){if(n-r>=9){var i=parseInt(e.substr(r+4,2),16),s=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&s)}else t+=e.substr(r,9);r+=9}else t+=e.substr(r,3),r+=3}return t}function V(e,t){function r(e){var r=H(e);return r.match(t.UNRESERVED)?r:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,r).replace(t.NOT_USERINFO,L).replace(t.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_HOST,L).replace(t.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,r).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,L).replace(t.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,r).replace(t.NOT_QUERY,L).replace(t.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,r).replace(t.NOT_FRAGMENT,L).replace(t.PCT_ENCODED,o)),e}function M(e){return e.replace(/^0*(.*)/,"$1")||"0"}function B(e,t){var r=e.match(t.IPV4ADDRESS)||[],n=l(r,2)[1];return n?n.split(".").map(M).join("."):e}function J(e,t){var r=e.match(t.IPV6ADDRESS)||[],n=l(r,3),o=n[1],a=n[2];if(o){for(var i=o.toLowerCase().split("::").reverse(),s=l(i,2),c=s[0],u=s[1],p=u?u.split(":").map(M):[],f=c.split(":").map(M),h=t.IPV4ADDRESS.test(f[f.length-1]),d=h?7:8,v=f.length-d,y=Array(d),g=0;g<d;++g)y[g]=p[g]||f[v+g]||"";h&&(y[d-1]=B(y[d-1],t));var m=y.reduce((function(e,t,r){if(!t||"0"===t){var n=e[e.length-1];n&&n.index+n.length===r?n.length++:e.push({index:r,length:1})}return e}),[]).sort((function(e,t){return t.length-e.length}))[0],b=void 0;if(m&&m.length>1){var w=y.slice(0,m.index),E=y.slice(m.index+m.length);b=w.join(":")+"::"+E.join(":")}else b=y.join(":");return a&&(b+="%"+a),b}return e}var K=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,G=void 0==="".match(/(){0}/)[1];function Z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={},n=!1!==t.iri?u:c;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var o=e.match(K);if(o){G?(r.scheme=o[1],r.userinfo=o[3],r.host=o[4],r.port=parseInt(o[5],10),r.path=o[6]||"",r.query=o[7],r.fragment=o[8],isNaN(r.port)&&(r.port=o[5])):(r.scheme=o[1]||void 0,r.userinfo=-1!==e.indexOf("@")?o[3]:void 0,r.host=-1!==e.indexOf("//")?o[4]:void 0,r.port=parseInt(o[5],10),r.path=o[6]||"",r.query=-1!==e.indexOf("?")?o[7]:void 0,r.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(r.port)&&(r.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),r.host&&(r.host=J(B(r.host,n),n)),void 0!==r.scheme||void 0!==r.userinfo||void 0!==r.host||void 0!==r.port||r.path||void 0!==r.query?void 0===r.scheme?r.reference="relative":void 0===r.fragment?r.reference="absolute":r.reference="uri":r.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==r.reference&&(r.error=r.error||"URI is not a "+t.reference+" reference.");var a=z[(t.scheme||r.scheme||"").toLowerCase()];if(t.unicodeSupport||a&&a.unicodeSupport)V(r,n);else{if(r.host&&(t.domainHost||a&&a.domainHost))try{r.host=U.toASCII(r.host.replace(n.PCT_ENCODED,H).toLowerCase())}catch(e){r.error=r.error||"Host's domain name can not be converted to ASCII via punycode: "+e}V(r,c)}a&&a.parse&&a.parse(r,t)}else r.error=r.error||"URI can not be parsed.";return r}function W(e,t){var r=!1!==t.iri?u:c,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(J(B(String(e.host),r),r).replace(r.IPV6ADDRESS,(function(e,t,r){return"["+t+(r?"%25"+r:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}var Q=/^\.\.?\//,Y=/^\/\.(\/|$)/,X=/^\/\.\.(\/|$)/,ee=/^\/?(?:.|\n)*?(?=\/|$)/;function te(e){for(var t=[];e.length;)if(e.match(Q))e=e.replace(Q,"");else if(e.match(Y))e=e.replace(Y,"/");else if(e.match(X))e=e.replace(X,"/"),t.pop();else if("."===e||".."===e)e="";else{var r=e.match(ee);if(!r)throw new Error("Unexpected dot segment condition");var n=r[0];e=e.slice(n.length),t.push(n)}return t.join("")}function re(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.iri?u:c,n=[],o=z[(t.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,t),e.host)if(r.IPV6ADDRESS.test(e.host));else if(t.domainHost||o&&o.domainHost)try{e.host=t.iri?U.toUnicode(e.host):U.toASCII(e.host.replace(r.PCT_ENCODED,H).toLowerCase())}catch(r){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+r}V(e,r),"suffix"!==t.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var a=W(e,t);if(void 0!==a&&("suffix"!==t.reference&&n.push("//"),n.push(a),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var i=e.path;t.absolutePath||o&&o.absolutePath||(i=te(i)),void 0===a&&(i=i.replace(/^\/\//,"/%2F")),n.push(i)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function ne(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=Z(re(e,r),r),t=Z(re(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=te(t.path||""),n.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=te(t.path||""),n.query=t.query):(t.path?("/"===t.path.charAt(0)?n.path=te(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path:n.path="/"+t.path,n.path=te(n.path)),n.query=t.query):(n.path=e.path,void 0!==t.query?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function oe(e,t,r){var n=i({scheme:"null"},r);return re(ne(Z(e,n),Z(t,n),n,!0),n)}function ae(e,t){return"string"==typeof e?e=re(Z(e,t),t):"object"===n(e)&&(e=Z(re(e,t),t)),e}function ie(e,t,r){return"string"==typeof e?e=re(Z(e,r),r):"object"===n(e)&&(e=re(e,r)),"string"==typeof t?t=re(Z(t,r),r):"object"===n(t)&&(t=re(t,r)),e===t}function se(e,t){return e&&e.toString().replace(t&&t.iri?u.ESCAPE:c.ESCAPE,L)}function ce(e,t){return e&&e.toString().replace(t&&t.iri?u.PCT_ENCODED:c.PCT_ENCODED,H)}var ue={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){var r="https"===String(e.scheme).toLowerCase();return e.port!==(r?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},le={scheme:"https",domainHost:ue.domainHost,parse:ue.parse,serialize:ue.serialize};function pe(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var fe={scheme:"ws",domainHost:!0,parse:function(e,t){var r=e;return r.secure=pe(r),r.resourceName=(r.path||"/")+(r.query?"?"+r.query:""),r.path=void 0,r.query=void 0,r},serialize:function(e,t){if(e.port!==(pe(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var r=e.resourceName.split("?"),n=l(r,2),o=n[0],a=n[1];e.path=o&&"/"!==o?o:void 0,e.query=a,e.resourceName=void 0}return e.fragment=void 0,e}},he={scheme:"wss",domainHost:fe.domainHost,parse:fe.parse,serialize:fe.serialize},de={},ve="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ye="[0-9A-Fa-f]",ge=r(r("%[EFef]"+ye+"%"+ye+ye+"%"+ye+ye)+"|"+r("%[89A-Fa-f]"+ye+"%"+ye+ye)+"|"+r("%"+ye+ye)),me="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",be=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),we="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Ee=new RegExp(ve,"g"),xe=new RegExp(ge,"g"),Se=new RegExp(t("[^]",me,"[\\.]",'[\\"]',be),"g"),Oe=new RegExp(t("[^]",ve,we),"g"),Ce=Oe;function Ae(e){var t=H(e);return t.match(Ee)?t:e}var ke={scheme:"mailto",parse:function(e,t){var r=e,n=r.to=r.path?r.path.split(","):[];if(r.path=void 0,r.query){for(var o=!1,a={},i=r.query.split("&"),s=0,c=i.length;s<c;++s){var u=i[s].split("=");switch(u[0]){case"to":for(var l=u[1].split(","),p=0,f=l.length;p<f;++p)n.push(l[p]);break;case"subject":r.subject=ce(u[1],t);break;case"body":r.body=ce(u[1],t);break;default:o=!0,a[ce(u[0],t)]=ce(u[1],t)}}o&&(r.headers=a)}r.query=void 0;for(var h=0,d=n.length;h<d;++h){var v=n[h].split("@");if(v[0]=ce(v[0]),t.unicodeSupport)v[1]=ce(v[1],t).toLowerCase();else try{v[1]=U.toASCII(ce(v[1],t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[h]=v.join("@")}return r},serialize:function(e,t){var r=e,n=a(e.to);if(n){for(var i=0,s=n.length;i<s;++i){var c=String(n[i]),u=c.lastIndexOf("@"),l=c.slice(0,u).replace(xe,Ae).replace(xe,o).replace(Se,L),p=c.slice(u+1);try{p=t.iri?U.toUnicode(p):U.toASCII(ce(p,t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+e}n[i]=l+"@"+p}r.path=n.join(",")}var f=e.headers=e.headers||{};e.subject&&(f.subject=e.subject),e.body&&(f.body=e.body);var h=[];for(var d in f)f[d]!==de[d]&&h.push(d.replace(xe,Ae).replace(xe,o).replace(Oe,L)+"="+f[d].replace(xe,Ae).replace(xe,o).replace(Ce,L));return h.length&&(r.query=h.join("&")),r}},Te=/^([^\:]+)\:(.*)/,je={scheme:"urn",parse:function(e,t){var r=e.path&&e.path.match(Te),n=e;if(r){var o=t.scheme||n.scheme||"urn",a=r[1].toLowerCase(),i=r[2],s=o+":"+(t.nid||a),c=z[s];n.nid=a,n.nss=i,n.path=void 0,c&&(n=c.parse(n,t))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,t){var r=t.scheme||e.scheme||"urn",n=e.nid,o=r+":"+(t.nid||n),a=z[o];a&&(e=a.serialize(e,t));var i=e,s=e.nss;return i.path=(n||t.nid)+":"+s,i}},Ie=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,$e={scheme:"urn:uuid",parse:function(e,t){var r=e;return r.uuid=r.nss,r.nss=void 0,t.tolerant||r.uuid&&r.uuid.match(Ie)||(r.error=r.error||"UUID is not valid."),r},serialize:function(e,t){var r=e;return r.nss=(e.uuid||"").toLowerCase(),r}};z[ue.scheme]=ue,z[le.scheme]=le,z[fe.scheme]=fe,z[he.scheme]=he,z[ke.scheme]=ke,z[je.scheme]=je,z[$e.scheme]=$e,e.SCHEMES=z,e.pctEncChar=L,e.pctDecChars=H,e.parse=Z,e.removeDotSegments=te,e.serialize=re,e.resolveComponents=ne,e.resolve=oe,e.normalize=ae,e.equal=ie,e.escapeComponent=se,e.unescapeComponent=ce,Object.defineProperty(e,"__esModule",{value:!0})}(n.exports);const o=n.exports,a={null:e=>null===e,boolean:e=>"boolean"==typeof e,object:e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,array:e=>Array.isArray(e),number:e=>"number"==typeof e,integer:e=>Number.isInteger(e),string:e=>"string"==typeof e};var i={jsonTypeOf:(e,t)=>a[t](e),resolveUrl:(e,t)=>{const r=o.resolve(e,t,{iri:!0});if(o.resolve(e,"",{iri:!0})&&"file"===o.parse(r).scheme&&"file"!==o.parse(e).scheme)throw Error(`Can't access file '${r}' resource from network context '${e}'`);return r},urlFragment:e=>o.unescapeComponent(o.parse(e).fragment)||"",pathRelative:(e,t)=>{if(e===t)return"";let r=1;const n=e.length-1,o=t.length-r,a=n<o?n:o;let i=-1,s=0;for(;s<a;s++){const n=e.charCodeAt(s+1);if(n!==t.charCodeAt(r+s))break;47===n&&(i=s)}if(o>a){if(47===t.charCodeAt(r+s))return t.slice(r+s+1);if(0===s)return t.slice(r+s)}n>a&&(47===e.charCodeAt(s+1)?i=s:0===a&&(i=0));let c="";for(s=i+2;s<=e.length;++s)s!==e.length&&47!==e.charCodeAt(s)||(c+=0===c.length?"..":"/..");return r+=i,c.length>0?`${c}${t.slice(r,t.length)}`:(47===t.charCodeAt(r)&&++r,t.slice(r,t.length))}};const s=t,c=e=>{if(e.length>0&&"/"!==e[0])throw Error("Invalid JSON Pointer");return e.split("/").slice(1).map(v)},u=(e,t,r,n)=>{if(0===e.length)return r;if(e.length>1){if(Array.isArray(t)){const o=e.shift(),a=[...t];return a[o]=u(e,g(t,o,n),r,h(o,n)),a}{const o=e.shift();return{...t,[o]:u(e,g(t,o,n),r,h(o,n))}}}if(Array.isArray(t)){const n=[...t];return n[y(t,e[0])]=r,n}return"object"==typeof t&&null!==t?{...t,[e[0]]:r}:g(t,e[0],n)},l=(e,t,r,n)=>{if(0!==e.length)if(1!==e.length||m(t)){const o=e.shift();l(e,g(t,o,n),r,h(o,n))}else{t[y(t,e[0])]=r}},p=(e,t,r)=>{if(0!=e.length){if(e.length>1){const n=e.shift(),o=g(t,n,r);return{...t,[n]:p(e,o,h(n,r))}}if(Array.isArray(t))return t.filter(((t,r)=>r!=e[0]));if("object"==typeof t&&null!==t){const{[e[0]]:r,...n}=t;return n}return g(t,e[0],r)}},f=(e,t,r)=>{if(0!==e.length)if(e.length>1){const n=e.shift(),o=g(t,n,r);f(e,o,h(n,r))}else Array.isArray(t)?t.splice(e[0],1):"object"==typeof t&&null!==t?delete t[e[0]]:g(t,e[0],r)},h=s(((e,t)=>t+"/"+d(e))),d=e=>e.toString().replace(/~/g,"~0").replace(/\//g,"~1"),v=e=>e.toString().replace(/~1/g,"/").replace(/~0/g,"~"),y=(e,t)=>Array.isArray(e)&&"-"===t?e.length:t,g=(e,t,r="")=>{if(void 0===e)throw TypeError(`Value at '${r}' is undefined and does not have property '${t}'`);if(null===e)throw TypeError(`Value at '${r}' is null and does not have property '${t}'`);if(m(e))throw TypeError(`Value at '${r}' is a ${typeof e} and does not have property '${t}'`);return e[y(e,t)]},m=e=>null===e||"object"!=typeof e;var b={nil:"",append:h,get:(e,t)=>{const r=c(e),n=e=>r.reduce((([e,t],r)=>[g(e,r,t),h(r,t)]),[e,""])[0];return void 0===t?n:n(t)},set:(e,t,r)=>{const n=c(e),o=s(((e,t)=>u(n,e,t,"")));return void 0===t?o:o(t,r)},assign:(e,t,r)=>{const n=c(e),o=s(((e,t)=>l(n,e,t,"")));return void 0===t?o:o(t,r)},unset:(e,t)=>{const r=c(e),n=e=>p(r,e,"");return void 0===t?n:n(t)},remove:(e,t)=>{const r=c(e),n=e=>f(r,e,"");return void 0===t?n:n(t)}};const w=Symbol("$__value"),E=Symbol("$__href");var x={cons:(e,t)=>Object.freeze({[E]:e,[w]:t}),isReference:e=>e&&void 0!==e[E],href:e=>e[E],value:e=>e[w]};const S=b,O=t,{resolveUrl:C,jsonTypeOf:A}=i,k=x,T=Object.freeze({id:"",pointer:"",instance:void 0,value:void 0}),j=e=>k.isReference(e.value)?k.value(e.value):e.value,I=O(((e,t)=>A(j(e),t))),$=(e,t)=>Object.freeze({...t,pointer:S.append(e,t.pointer),value:j(t)[e]}),P=O(((e,t)=>j(t).map(((r,n,o,a)=>e($(n,t),n,o,a))))),R=O(((e,t)=>j(t).forEach(((r,n,o,a)=>e($(n,t),n,o,a))))),N=O(((e,t)=>j(t).map(((e,r,n,o)=>$(r,t))).filter(((t,r,n,o)=>e(t,r,n,o))))),D=O(((e,t,r)=>j(r).reduce(((t,n,o)=>e(t,$(o,r),o)),t))),_=O(((e,t)=>j(t).every(((r,n,o,a)=>e($(n,t),n,o,a))))),F=O(((e,t)=>j(t).some(((r,n,o,a)=>e($(n,t),n,o,a)))));var q={nil:T,cons:(e,t="")=>Object.freeze({...T,id:C(t,""),instance:e,value:e}),get:(e,t=T)=>{if(!e.startsWith("#"))throw Error(`No JSON document found at '${e.split("#")[0]}'`);return Object.freeze({...t,pointer:e.substr(1)})},uri:e=>`${e.id}#${encodeURI(e.pointer)}`,value:j,has:(e,t)=>e in j(t),typeOf:I,length:e=>j(e).length,step:$,entries:e=>Object.keys(j(e)).map((t=>[t,$(t,e)])),keys:e=>Object.keys(j(e)),map:P,forEach:R,filter:N,reduce:D,every:_,some:F},U=async e=>Object.entries(await e),z=function(e,t){return function r(){null==t&&(t=e.length);var n=[].slice.call(arguments);return n.length>=t?e.apply(this,n):function(){return r.apply(this,n.concat([].slice.call(arguments)))}}};var L=z((async(e,t)=>(await t).map(e)));var H=z((async(e,t,r)=>(await r).reduce((async(t,r)=>e(await t,r)),t)));const V=H;var M=z((async(e,t,r={})=>V((async(t,r)=>await e(r)?t.concat([r]):t),[],t,r)));const B=L;var J=z((async(e,t)=>{const r=await B(e,t);return(await Promise.all(r)).some((e=>e))}));const K=L;var G=z((async(e,t)=>{const r=await K(e,t);return(await Promise.all(r)).every((e=>e))}));var Z=z(((e,t)=>e.reduce((async(e,t)=>t(await e)),t)));const W=Z,Q=U,Y=H;var X,ee,te,re={entries:U,map:L,filter:M,reduce:H,some:J,every:G,pipeline:Z,all:e=>Promise.all(e),allValues:e=>W([Q,Y((async(e,[t,r])=>(e[t]=await r,e)),{})],e)},ne={exports:{}};ee=e,te=function(){var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r="boolean"==typeof(new RegExp).sticky;function n(e){return e&&"[object RegExp]"===t.call(e)}function o(e){return e&&"object"==typeof e&&!n(e)&&!Array.isArray(e)}function a(e){return"("+e+")"}function i(e){return e.length?"(?:"+e.map((function(e){return"(?:"+e+")"})).join("|")+")":"(?!)"}function s(e){if("string"==typeof e)return"(?:"+e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+")";if(n(e)){if(e.ignoreCase)throw new Error("RegExp /i flag not allowed");if(e.global)throw new Error("RegExp /g flag is implied");if(e.sticky)throw new Error("RegExp /y flag is implied");if(e.multiline)throw new Error("RegExp /m flag is implied");return e.source}throw new Error("Not a pattern: "+e)}function c(t,r){if(o(r)||(r={match:r}),r.include)throw new Error("Matching rules cannot also include states");var a={defaultType:t,lineBreaks:!!r.error||!!r.fallback,pop:!1,next:null,push:null,error:!1,fallback:!1,value:null,type:null,shouldThrow:!1};for(var i in r)e.call(r,i)&&(a[i]=r[i]);if("string"==typeof a.type&&t!==a.type)throw new Error("Type transform cannot be a string (type '"+a.type+"' for token '"+t+"')");var s=a.match;return a.match=Array.isArray(s)?s:s?[s]:[],a.match.sort((function(e,t){return n(e)&&n(t)?0:n(t)?-1:n(e)?1:t.length-e.length})),a}function u(e){return Array.isArray(e)?function(e){for(var t=[],r=0;r<e.length;r++){var n=e[r];if(n.include)for(var o=[].concat(n.include),a=0;a<o.length;a++)t.push({include:o[a]});else{if(!n.type)throw new Error("Rule has no type: "+JSON.stringify(n));t.push(c(n.type,n))}}return t}(e):function(e){for(var t=Object.getOwnPropertyNames(e),r=[],n=0;n<t.length;n++){var a=t[n],i=e[a],s=[].concat(i);if("include"!==a){var u=[];s.forEach((function(e){o(e)?(u.length&&r.push(c(a,u)),r.push(c(a,e)),u=[]):u.push(e)})),u.length&&r.push(c(a,u))}else for(var l=0;l<s.length;l++)r.push({include:s[l]})}return r}(e)}var l=c("error",{lineBreaks:!0,shouldThrow:!0});function p(e,t){for(var o=null,c=Object.create(null),u=!0,p=null,f=[],h=[],d=0;d<e.length;d++)e[d].fallback&&(u=!1);for(d=0;d<e.length;d++){var v=e[d];if(v.include)throw new Error("Inheritance is not allowed in stateless lexers");if(v.error||v.fallback){if(o)throw!v.fallback==!o.fallback?new Error("Multiple "+(v.fallback?"fallback":"error")+" rules not allowed (for token '"+v.defaultType+"')"):new Error("fallback and error are mutually exclusive (for token '"+v.defaultType+"')");o=v}var y=v.match.slice();if(u)for(;y.length&&"string"==typeof y[0]&&1===y[0].length;)c[y.shift().charCodeAt(0)]=v;if(v.pop||v.push||v.next){if(!t)throw new Error("State-switching options are not allowed in stateless lexers (for token '"+v.defaultType+"')");if(v.fallback)throw new Error("State-switching options are not allowed on fallback tokens (for token '"+v.defaultType+"')")}if(0!==y.length){u=!1,f.push(v);for(var g=0;g<y.length;g++){var m=y[g];if(n(m))if(null===p)p=m.unicode;else if(p!==m.unicode&&!1===v.fallback)throw new Error("If one rule is /u then all must be")}var b=i(y.map(s)),w=new RegExp(b);if(w.test(""))throw new Error("RegExp matches empty string: "+w);if(new RegExp("|"+b).exec("").length-1>0)throw new Error("RegExp has capture groups: "+w+"\nUse (?: … ) instead");if(!v.lineBreaks&&w.test("\n"))throw new Error("Rule should declare lineBreaks: "+w);h.push(a(b))}}var E=o&&o.fallback,x=r&&!E?"ym":"gm",S=r||E?"":"|";return!0===p&&(x+="u"),{regexp:new RegExp(i(h)+S,x),groups:f,fast:c,error:o||l}}function f(e,t,r){var n=e&&(e.push||e.next);if(n&&!r[n])throw new Error("Missing state '"+n+"' (in token '"+e.defaultType+"' of state '"+t+"')");if(e&&e.pop&&1!=+e.pop)throw new Error("pop must be 1 (in token '"+e.defaultType+"' of state '"+t+"')")}var h=function(e,t){this.startState=t,this.states=e,this.buffer="",this.stack=[],this.reset()};h.prototype.reset=function(e,t){return this.buffer=e||"",this.index=0,this.line=t?t.line:1,this.col=t?t.col:1,this.queuedToken=t?t.queuedToken:null,this.queuedThrow=t?t.queuedThrow:null,this.setState(t?t.state:this.startState),this.stack=t&&t.stack?t.stack.slice():[],this},h.prototype.save=function(){return{line:this.line,col:this.col,state:this.state,stack:this.stack.slice(),queuedToken:this.queuedToken,queuedThrow:this.queuedThrow}},h.prototype.setState=function(e){if(e&&this.state!==e){this.state=e;var t=this.states[e];this.groups=t.groups,this.error=t.error,this.re=t.regexp,this.fast=t.fast}},h.prototype.popState=function(){this.setState(this.stack.pop())},h.prototype.pushState=function(e){this.stack.push(this.state),this.setState(e)};var d=r?function(e,t){return e.exec(t)}:function(e,t){var r=e.exec(t);return 0===r[0].length?null:r};function v(){return this.value}if(h.prototype._getGroup=function(e){for(var t=this.groups.length,r=0;r<t;r++)if(void 0!==e[r+1])return this.groups[r];throw new Error("Cannot find token type for matched text")},h.prototype.next=function(){var e=this.index;if(this.queuedGroup){var t=this._token(this.queuedGroup,this.queuedText,e);return this.queuedGroup=null,this.queuedText="",t}var r=this.buffer;if(e!==r.length){if(i=this.fast[r.charCodeAt(e)])return this._token(i,r.charAt(e),e);var n=this.re;n.lastIndex=e;var o=d(n,r),a=this.error;if(null==o)return this._token(a,r.slice(e,r.length),e);var i=this._getGroup(o),s=o[0];return a.fallback&&o.index!==e?(this.queuedGroup=i,this.queuedText=s,this._token(a,r.slice(e,o.index),e)):this._token(i,s,e)}},h.prototype._token=function(e,t,r){var n=0;if(e.lineBreaks){var o=/\n/g,a=1;if("\n"===t)n=1;else for(;o.exec(t);)n++,a=o.lastIndex}var i={type:"function"==typeof e.type&&e.type(t)||e.defaultType,value:"function"==typeof e.value?e.value(t):t,text:t,toString:v,offset:r,lineBreaks:n,line:this.line,col:this.col},s=t.length;if(this.index+=s,this.line+=n,0!==n?this.col=s-a+1:this.col+=s,e.shouldThrow)throw new Error(this.formatError(i,"invalid syntax"));return e.pop?this.popState():e.push?this.pushState(e.push):e.next&&this.setState(e.next),i},"undefined"!=typeof Symbol&&Symbol.iterator){var y=function(e){this.lexer=e};y.prototype.next=function(){var e=this.lexer.next();return{value:e,done:!e}},y.prototype[Symbol.iterator]=function(){return this},h.prototype[Symbol.iterator]=function(){return new y(this)}}return h.prototype.formatError=function(e,t){if(null==e){var r=this.buffer.slice(this.index);e={text:r,offset:this.index,lineBreaks:-1===r.indexOf("\n")?0:1,line:this.line,col:this.col}}var n=Math.max(0,e.offset-e.col+1),o=e.lineBreaks?e.text.indexOf("\n"):e.text.length,a=this.buffer.substring(n,e.offset+o);return t+=" at line "+e.line+" col "+e.col+":\n\n",t+=" "+a+"\n",t+=" "+Array(e.col).join(" ")+"^"},h.prototype.clone=function(){return new h(this.states,this.state)},h.prototype.has=function(e){return!0},{compile:function(e){var t=p(u(e));return new h({start:t},"start")},states:function(e,t){var r=e.$all?u(e.$all):[];delete e.$all;var n=Object.getOwnPropertyNames(e);t||(t=n[0]);for(var o=Object.create(null),a=0;a<n.length;a++)o[b=n[a]]=u(e[b]).concat(r);for(a=0;a<n.length;a++)for(var i=o[b=n[a]],s=Object.create(null),c=0;c<i.length;c++){var l=i[c];if(l.include){var d=[c,1];if(l.include!==b&&!s[l.include]){s[l.include]=!0;var v=o[l.include];if(!v)throw new Error("Cannot include nonexistent state '"+l.include+"' (in state '"+b+"')");for(var y=0;y<v.length;y++){var g=v[y];-1===i.indexOf(g)&&d.push(g)}}i.splice.apply(i,d),c--}}var m=Object.create(null);for(a=0;a<n.length;a++){var b;m[b=n[a]]=p(o[b],!0)}for(a=0;a<n.length;a++){var w=n[a],E=m[w],x=E.groups;for(c=0;c<x.length;c++)f(x[c],w,m);var S=Object.getOwnPropertyNames(E.fast);for(c=0;c<S.length;c++)f(E.fast[S[c]],w,m)}return new h(m,t)},error:Object.freeze({error:!0}),fallback:Object.freeze({fallback:!0}),keywords:function(e){for(var t=Object.create(null),r=Object.create(null),n=Object.getOwnPropertyNames(e),o=0;o<n.length;o++){var a=n[o],i=e[a];(Array.isArray(i)?i:[i]).forEach((function(e){if((r[e.length]=r[e.length]||[]).push(e),"string"!=typeof e)throw new Error("keyword must be string (in keyword '"+a+"')");t[e]=a}))}function s(e){return JSON.stringify(e)}var c="";for(var u in c+="switch (value.length) {\n",r){var l=r[u];c+="case "+u+":\n",c+="switch (value) {\n",l.forEach((function(e){var r=t[e];c+="case "+s(e)+": return "+s(r)+"\n"})),c+="}\n"}return c+="}\n",Function("value",c)}}},(X=ne).exports?X.exports=te():ee.moo=te();const oe=ne.exports;const ae=b,ie=e=>{const t=oe.states({main:{WS:{match:new RegExp("(?:(?:\\r?\\n)|[ \\t])+","u"),lineBreaks:!0},true:{match:"true",value:()=>!0},false:{match:"false",value:()=>!1},null:{match:"null",value:()=>null},number:{match:new RegExp("-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?:[eE][-+]?[0-9]+)?","u"),value:parseFloat},string:{match:new RegExp('"(?:[\\x20-\\x21\\x23-\\x5b\\x5d-\\u{10ffff}]|\\\\(?:["\\/\\\\brfnt]|u[0-9a-fA-F]{4}))*"',"u"),value:JSON.parse},"{":"{","}":"}","[":"[","]":"]",":":":",",":",",error:oe.error}});t.reset(e);const r=()=>{let e;do{if(e=t.next(),"error"===e?.type)throw SyntaxError(t.formatError(e,"Unrecognized token"))}while("WS"===e?.type);return e};let n,o=r();const a={offset:0,line:1,col:0,text:""};return{next:e=>{if(n=o,o=r(),e&&n?.type!==e)throw SyntaxError(t.formatError(n,`Expected a '${e}'`));return n},peek:()=>o,syntaxError:e=>{const r=n||a,o={...r,offset:r.offset+r.text.length,col:r.col+r.text.length};throw new SyntaxError(t.formatError(o,e))}}},se=(e,t)=>t,ce=(e,t,r,n)=>{let o;const a=e.next();switch(a?.type){case"true":case"false":case"null":case"number":case"string":o=a.value;break;case"{":o=ue(e,t,r,n);break;case"[":o=pe(e,t,r,n);break;default:e.syntaxError("Expected a JSON value")}return n(t,o,r)},ue=(e,t,r,n)=>{const o={};return"}"!==e.peek()?.type&&le(e,t,r,n,o),e.next("}"),o},le=(e,t,r,n,o)=>{const a=e.next("string").value;e.next(":"),de(e.peek())||e.syntaxError("Expected a JSON value"),o[a]=ce(e,a,ae.append(a,r),n),","===e.peek()?.type?(e.next(),le(e,a,r,n,o)):de(e.peek())&&e.next(",")},pe=(e,t,r,n)=>{const o=[];return"]"!==e.peek()?.type&&fe(e,0,r,n,o),e.next("]"),o},fe=(e,t,r,n,o)=>{de(e.peek())||e.syntaxError("Expected a JSON value"),o[t]=ce(e,t,ae.append(t,r),n),","===e.peek()?.type?(e.next(),fe(e,t+1,r,n,o)):de(e.peek())&&e.next(",")},he=new Set(["string","number","true","false","null","[","{"]),de=e=>he.has(e?.type);var ve=(e,t=se)=>{const r=ie(e),n=ce(r,"",ae.nil,t);return r.peek()&&r.syntaxError("A value has been parsed, but more tokens were found"),n};const ye=b,ge=(e,t)=>t,me=(e,t,r,n,o,a)=>{let i;return e=t(n,e,o),i=Array.isArray(e)?be(e,t,r,o,a):"object"==typeof e&&null!==e?we(e,t,r,o,a):JSON.stringify(e),i},be=(e,t,r,n,o)=>{0===e.length&&(r="");const a=r?`\n${r.repeat(o-1)}`:"";return"["+a+r+e.map(((e,a)=>{const i=ye.append(a,n);return me(e,t,r,a,i,o+1)})).join(`,${a}${r}`)+a+"]"},we=(e,t,r,n,o)=>{0===Object.keys(e).length&&(r="");const a=r?`\n${r.repeat(o-1)}`:"",i=r?" ":"";return"{"+a+r+Object.entries(e).map((([e,a])=>{const s=ye.append(e,n);return JSON.stringify(e)+":"+i+me(a,t,r,e,s,o+1)})).join(`,${a}${r}`)+a+"}"};var Ee=(e,t=ge,r="")=>me(e,t,r,"",ye.nil,1);var xe={parse:ve,stringify:Ee},Se=fetch,Oe={},Ce=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,Ae=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,ke=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,Te=/\\([\u000b\u0020-\u00ff])/g,je=/([\\"])/g,Ie=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;function $e(e){var t=String(e);if(ke.test(t))return t;if(t.length>0&&!Ae.test(t))throw new TypeError("invalid parameter value");return'"'+t.replace(je,"\\$1")+'"'}function Pe(e){this.parameters=Object.create(null),this.type=e}Oe.format=function(e){if(!e||"object"!=typeof e)throw new TypeError("argument obj is required");var t=e.parameters,r=e.type;if(!r||!Ie.test(r))throw new TypeError("invalid type");var n=r;if(t&&"object"==typeof t)for(var o,a=Object.keys(t).sort(),i=0;i<a.length;i++){if(o=a[i],!ke.test(o))throw new TypeError("invalid parameter name");n+="; "+o+"="+$e(t[o])}return n},Oe.parse=function(e){if(!e)throw new TypeError("argument string is required");var t="object"==typeof e?function(e){var t;"function"==typeof e.getHeader?t=e.getHeader("content-type"):"object"==typeof e.headers&&(t=e.headers&&e.headers["content-type"]);if("string"!=typeof t)throw new TypeError("content-type header is missing from object");return t}(e):e;if("string"!=typeof t)throw new TypeError("argument string is required to be a string");var r=t.indexOf(";"),n=-1!==r?t.substr(0,r).trim():t.trim();if(!Ie.test(n))throw new TypeError("invalid media type");var o=new Pe(n.toLowerCase());if(-1!==r){var a,i,s;for(Ce.lastIndex=r;i=Ce.exec(t);){if(i.index!==r)throw new TypeError("invalid parameter format");r+=i[0].length,a=i[1].toLowerCase(),'"'===(s=i[2])[0]&&(s=s.substr(1,s.length-2).replace(Te,"$1")),o.parameters[a]=s}if(r!==t.length)throw new TypeError("invalid parameter format")}return o};const Re=Oe,Ne={};var De={addPlugin:(e,t)=>{Ne[e]=t},parse:e=>{const t=Re.parse(e.headers.get("content-type"));if(!(t.type in Ne))throw Error(`${e.url} is not a schema. Found a document with media type: ${t.type}`);return Ne[t.type].parse(e,t.parameters)},getContentType:e=>{for(const t in Ne)if(Ne[t].matcher(e))return t;return"application/octet-stream"}};const _e=t,Fe=re,qe=xe,Ue=b,{jsonTypeOf:ze,resolveUrl:Le,urlFragment:He,pathRelative:Ve}=i,Me=Se,Be=x,Je=De,Ke="https://json-schema.org/draft/2019-09/vocab/core",Ge="https://json-schema.org/draft/2020-12/vocab/core",Ze={},We={},Qe=(e,t)=>{const r=We[e];return Ze[r]?.[t]},Ye={},Xe={},et=(e,t="",r="")=>{e=JSON.parse(JSON.stringify(e));const n=Le(t,""),o=Le(e.$schema||r,"");if(!o)throw Error("Couldn't determine schema dialect");if(delete e.$schema,!(o in We))if(!0===e?.$vocabulary?.[Ke]&&o===tt(e,n,Ke)[0])We[o]=Ke;else if(!0===e?.$vocabulary?.[Ge]&&o===tt(e,n,Ge)[0])We[o]=Ge;else{const e=Ye[o];if(!e)throw Error(`Couldn't determine JSON Schema version for dialect: '${o}'`);!0===e.vocabulary[Ke]?We[o]=Ke:!0===e.vocabulary[Ge]?We[o]=Ge:We[o]=We[e.dialectId]}const[a,i]=tt(e,n,We[o]);if(!a)throw Error("Couldn't determine an identifier for the schema");const s=Qe(o,"baseToken");delete e[s],n&&(Xe[n]=a);const c=Qe(o,"anchorToken");i&&s===c&&(e[c]=c!==s?encodeURI(i):`#${encodeURI(i)}`);const u={},l=Qe(o,"recursiveAnchorToken");let p;!0===e[l]&&(u[""]=`${a}#`,e[c]="",delete e[l]);const f=Qe(o,"vocabularyToken");ze(e[f],"object")?(p=e[f],delete e[f]):p={[We[o]]:!0};const h={"":""};return Ye[a]={id:a,dialectId:o,schema:rt(e,a,o,Ue.nil,h,u),anchors:h,dynamicAnchors:u,vocabulary:p,validated:!1},a},tt=(e,t,r)=>{const n=Ze[r]?.baseToken,o=Le(t,e[n]||"");return[Le(o,""),He(o)]},rt=(e,t,r,n,o,a)=>{if(ze(e,"object")){const i="string"==typeof e.$schema?Le(e.$schema,""):r,s=Qe(i,"embeddedToken"),c=Qe(i,"anchorToken");if("string"==typeof e[s]&&(s!==c||"#"!==e[s][0])){const n=Le(t,e[s]);return e[Qe(i,"baseToken")]=n,et(e,n,r),Be.cons(e[s],e)}const u=Qe(r,"anchorToken"),l=Qe(r,"dynamicAnchorToken");"string"==typeof e[l]&&(a[e[l]]=`${t}#${encodeURI(n)}`,o[e[l]]=n,delete e[l]);const p=Qe(r,"embeddedToken");if("string"==typeof e[u]){const t=u!==p?e[u]:e[u].slice(1);o[t]=n,delete e[u]}const f=Qe(r,"jrefToken");if("string"==typeof e[f])return Be.cons(e[f],e);for(const i in e)e[i]=rt(e[i],t,r,Ue.append(i,n),o,a);return e}return Array.isArray(e)?e.map(((e,i)=>rt(e,t,r,Ue.append(i,n),o,a))):e},nt=e=>Ye[Xe[e]]||Ye[e],ot=Object.freeze({id:"",dialectId:void 0,vocabulary:{},pointer:Ue.nil,schema:void 0,value:void 0,anchors:{},dynamicAnchors:{},validated:!0}),at=async(e,t=ot)=>{const r=Le(ct(t),e),n=Le(r,""),o=He(r);if(!(e=>e in Ye||e in Xe)(n)){const e=await Me(n,{headers:{Accept:"application/schema+json"}});if(e.status>=400)throw await e.text(),Error(`Failed to retrieve schema with id: ${n}`);const[t,r]=await Je.parse(e);let o;o=t.$schema?Le(t.$schema,""):r?Le(n,r):"",o&&n!==o&&!(o in We)&&await at(o),et(t,n,o)}const a=nt(n),i="/"!==o[0]?st(a,o):o,s=Object.freeze({...a,pointer:i,value:Ue.get(i,a.schema)});return it(s)},it=e=>Be.isReference(e.value)?at(Be.href(e.value),e):e,st=(e,t)=>{if(!(t in e.anchors))throw Error(`No such anchor '${encodeURI(e.id)}#${encodeURI(t)}'`);return e.anchors[t]},ct=e=>`${e.id}#${encodeURI(e.pointer)}`,ut=e=>Be.isReference(e.value)?Be.value(e.value):e.value,lt=(e,t)=>{const r=nt(t.id),n=Object.freeze({...t,pointer:Ue.append(e,t.pointer),value:ut(t)[e],validated:r.validated});return it(n)},pt=_e(((e,t)=>Fe.pipeline([ut,Fe.map((async(r,n)=>e(await lt(n,t),n))),Fe.all],t))),ft={parentId:"",parentDialect:"",includeEmbedded:!0},ht=(e,t)=>{if(t.startsWith("file://")){const r=e.slice(7,e.lastIndexOf("/"));return""===e?"":Ve(r,t.slice(7))}return t};var dt={setConfig:(e,t,r)=>{We[e]=e,Ze[e]||(Ze[e]={}),Ze[e][t]=r},getConfig:Qe,add:et,get:at,markValidated:e=>{Ye[e].validated=!0},uri:ct,value:ut,getAnchorPointer:st,typeOf:(e,t)=>ze(ut(e),t),has:(e,t)=>e in ut(t),step:lt,keys:e=>Object.keys(ut(e)),entries:e=>Fe.pipeline([ut,Object.keys,Fe.map((async t=>[t,await lt(t,e)])),Fe.all],e),map:pt,length:e=>ut(e).length,toSchema:(e,t={})=>{const r={...ft,...t},n=Qe(e.dialectId,"anchorToken"),o=Qe(e.dialectId,"dynamicAnchorToken"),a={};for(const t in e.anchors)""===t||e.dynamicAnchors[t]||(a[e.anchors[t]]=t);const i={};for(const t in e.dynamicAnchors){const r=He(e.dynamicAnchors[t]);i[r]=t}const s=JSON.parse(qe.stringify(e.schema,((t,s,c)=>{if(Be.isReference(s)){const t=Be.value(s),n="string"==typeof t.$schema?Le(t.$schema,""):e.dialectId,o=Qe(n,"embeddedToken");return!r.includeEmbedded&&o in t?void 0:Be.value(s)}return c in a&&(s={[n]:a[c],...s}),c in i&&(s={[o]:i[c],...s}),s}))),c=Qe(e.dialectId,"baseToken"),u=ht(r.parentId,e.id),l=r.parentDialect===e.dialectId?"":e.dialectId;return{...u&&{[c]:u},...l&&{$schema:l},...s}}};class vt extends Error{constructor(e){super("Invalid Schema"),this.name=this.constructor.name,this.output=e}}var yt=vt;const gt=dt;var mt={compile:e=>gt.value(e),interpret:()=>!0};const bt=t,wt=r.exports,{resolveUrl:Et}=i,xt=q,St=dt,Ot=yt,Ct=De,At=mt,kt="FLAG",Tt="BASIC",jt="DETAILED",It="VERBOSE";let $t=jt,Pt=!0;Ct.addPlugin("application/schema+json",{parse:async(e,t)=>[await e.json(),t.schema||t.profile],matcher:e=>e.endsWith(".schema.json")});const Rt=async e=>{const t={metaData:{}};return{ast:t,schemaUri:await Lt(e,t)}},Nt=bt((({ast:e,schemaUri:t},r,n=kt)=>{if(![kt,Tt,jt,It].includes(n))throw Error(`The '${n}' error format is not supported`);const o=[],a=wt.subscribe("result",Dt(n,o));return Vt(t,r,e,{}),wt.unsubscribe(a),o[0]})),Dt=(e,t)=>{const r=[];return(n,o)=>{if("result"===n){const{keyword:e,absoluteKeywordLocation:t,instanceLocation:n,valid:a}=o,i={keyword:e,absoluteKeywordLocation:t,instanceLocation:n,valid:a,errors:[]};r.push(i)}else if("result.start"===n)r.push(n);else if("result.end"===n){const n=r.pop();for(;"result.start"!==r[r.length-1];){const t=r.pop(),o=[t];e===Tt&&(o.push(...t.errors),delete t.errors),(e===It||e!==kt&&!t.valid)&&n.errors.unshift(...o)}r[r.length-1]=n,t[0]=n}}},_t={},Ft=e=>_t[e]||At,qt=e=>e in _t,Ut={},zt={},Lt=async(e,t)=>{if(e=await Ht(e),!qt(`${e.dialectId}#validate`)){const t=await St.get(e.dialectId);(St.getConfig(t.id,"mandatoryVocabularies")||[]).forEach((e=>{if(!t.vocabulary[e])throw Error(`Vocabulary '${e}' must be explicitly declared and required`)})),Object.entries(t.vocabulary).forEach((([e,r])=>{if(e in Ut)Object.entries(Ut[e]).forEach((([e,r])=>{((e,t)=>{_t[e]={collectEvaluatedItems:(e,r,n,o,a)=>t.interpret(e,r,n,o,a)&&new Set,collectEvaluatedProperties:(e,r,n,o,a)=>t.interpret(e,r,n,o,a)&&[],...t}})(`${t.id}#${e}`,r)}));else if(r)throw Error(`Missing required vocabulary: ${e}`)}))}if(Pt&&!e.validated){if(St.markValidated(e.id),!(e.dialectId in zt)){const t=await St.get(e.dialectId),r=await Rt(t);zt[t.id]=Nt(r)}const t=xt.cons(e.schema,e.id),r=zt[e.dialectId](t,$t);if(!r.valid)throw new Ot(r)}return e.id in t.metaData||(t.metaData[e.id]={id:e.id,dynamicAnchors:e.dynamicAnchors,anchors:e.anchors}),Ft(`${e.dialectId}#validate`).compile(e,t)},Ht=async e=>St.typeOf(e,"string")?Ht(await St.get(St.value(e),e)):e,Vt=(e,t,r,n)=>{const o=Mt(e,r),a=Et(e,"");return Ft(o).interpret(e,t,r,{...r.metaData[a].dynamicAnchors,...n})},Mt=(e,t)=>{if(!(e in t))throw Error(`No schema found at ${e}`);return t[e][0]};var Bt={validate:async(e,t,r)=>{const n=await Rt(e),o=(e,t)=>Nt(n,xt.cons(e),t);return void 0===t?o:o(t,r)},compile:Rt,interpret:Nt,setMetaOutputFormat:e=>{$t=e},setShouldMetaValidate:e=>{Pt=e},FLAG:kt,BASIC:Tt,DETAILED:jt,VERBOSE:It,add:(e,t="",r="")=>{const n=St.add(e,t,r);delete zt[n]},getKeyword:Ft,hasKeyword:qt,defineVocabulary:(e,t)=>{Ut[e]=t},compileSchema:Lt,interpretSchema:Vt,collectEvaluatedProperties:(e,t,r,n,o)=>{const a=Mt(e,r);return Ft(a).collectEvaluatedProperties(e,t,r,n,o)},collectEvaluatedItems:(e,t,r,n,o)=>{const a=Mt(e,r);return Ft(a).collectEvaluatedItems(e,t,r,n,o)},addMediaTypePlugin:Ct.addPlugin};const Jt=re,Kt=r.exports,Gt=Bt,Zt=q,Wt=dt;var Qt={compile:async(e,t)=>{const r=Wt.uri(e);if(!(r in t)){t[r]=!1;const n=Wt.value(e);if(!["object","boolean"].includes(typeof n))throw Error(`No schema found at '${Wt.uri(e)}'`);t[r]=[`${e.dialectId}#validate`,Wt.uri(e),"boolean"==typeof n?n:await Jt.pipeline([Wt.entries,Jt.map((([t,r])=>[`${e.dialectId}#${t}`,r])),Jt.filter((([t])=>t!==`${e.dialectId}#validate`)),Jt.map((async([r,n])=>{const o=await Gt.getKeyword(r).compile(n,t,e);return[r,Wt.uri(n),o]})),Jt.all],e)]}return r},interpret:(e,t,r,n)=>{const[o,a,i]=r[e];Kt.publishSync("result.start");const s="boolean"==typeof i?i:i.every((([e,o,a])=>{Kt.publishSync("result.start");const i=Gt.getKeyword(e).interpret(a,t,r,n);return Kt.publishSync("result",{keyword:e,absoluteKeywordLocation:o,instanceLocation:Zt.uri(t),valid:i,ast:a}),Kt.publishSync("result.end"),i}));return Kt.publishSync("result",{keyword:o,absoluteKeywordLocation:a,instanceLocation:Zt.uri(t),valid:s,ast:e}),Kt.publishSync("result.end"),s},collectEvaluatedProperties:(e,t,r,n,o=!1)=>{const a=r[e][2];return"boolean"==typeof a?!!a&&[]:a.filter((([e])=>!o||!e.endsWith("#unevaluatedProperties"))).reduce(((e,[o,,a])=>{const i=e&&Gt.getKeyword(o).collectEvaluatedProperties(a,t,r,n);return!1!==i&&[...e,...i]}),[])},collectEvaluatedItems:(e,t,r,n,o=!1)=>{const a=r[e][2];return"boolean"==typeof a?!!a&&new Set:a.filter((([e])=>!o||!e.endsWith("#unevaluatedItems"))).reduce(((e,[o,,a])=>{const i=!1!==e&&Gt.getKeyword(o).collectEvaluatedItems(a,t,r,n);return!1!==i&&new Set([...e,...i])}),new Set)}};var Yt={Core:Bt,Schema:dt,Instance:q,Reference:x,Keywords:{metaData:mt,validate:Qt},InvalidSchemaError:yt};exports.default=Yt;
//# sourceMappingURL=json-schema-core-cjs.min.js.map

@@ -1,3 +0,3 @@

var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},r=function(e,r){return function t(){null==r&&(r=e.length);var n=[].slice.call(arguments);return n.length>=r?e.apply(this,n):function(){return t.apply(this,n.concat([].slice.call(arguments)))}}};var t,n,o={exports:{}};t=o,n=o.exports,function(e,r){var o={};e.PubSub?(o=e.PubSub,console.warn("PubSub already loaded, using existing version")):(e.PubSub=o,function(e){var r={},t=-1,n="*";function o(e){var r;for(r in e)if(Object.prototype.hasOwnProperty.call(e,r))return!0;return!1}function a(e){return function(){throw e}}function i(e,r,t){try{e(r,t)}catch(e){setTimeout(a(e),0)}}function s(e,r,t){e(r,t)}function c(e,t,n,o){var a,c=r[t],u=o?s:i;if(Object.prototype.hasOwnProperty.call(r,t))for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&u(c[a],e,n)}function u(e,r,t){return function(){var o=String(e),a=o.lastIndexOf(".");for(c(e,e,r,t);-1!==a;)a=(o=o.substr(0,a)).lastIndexOf("."),c(e,o,r,t);c(e,n,r,t)}}function l(e){var t=String(e);return Boolean(Object.prototype.hasOwnProperty.call(r,t)&&o(r[t]))}function p(e){for(var r=String(e),t=l(r)||l(n),o=r.lastIndexOf(".");!t&&-1!==o;)o=(r=r.substr(0,o)).lastIndexOf("."),t=l(r);return t}function f(e,r,t,n){var o=u(e="symbol"==typeof e?e.toString():e,r,n);return!!p(e)&&(!0===t?o():setTimeout(o,0),!0)}e.publish=function(r,t){return f(r,t,!1,e.immediateExceptions)},e.publishSync=function(r,t){return f(r,t,!0,e.immediateExceptions)},e.subscribe=function(e,n){if("function"!=typeof n)return!1;e="symbol"==typeof e?e.toString():e,Object.prototype.hasOwnProperty.call(r,e)||(r[e]={});var o="uid_"+String(++t);return r[e][o]=n,o},e.subscribeAll=function(r){return e.subscribe(n,r)},e.subscribeOnce=function(r,t){var n=e.subscribe(r,(function(){e.unsubscribe(n),t.apply(this,arguments)}));return e},e.clearAllSubscriptions=function(){r={}},e.clearSubscriptions=function(e){var t;for(t in r)Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)&&delete r[t]},e.countSubscriptions=function(e){var t,n,o=0;for(t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)){for(n in r[t])o++;break}return o},e.getSubscriptions=function(e){var t,n=[];for(t in r)Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)&&n.push(t);return n},e.unsubscribe=function(t){var n,o,a,i=function(e){var t;for(t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e))return!0;return!1},s="string"==typeof t&&(Object.prototype.hasOwnProperty.call(r,t)||i(t)),c=!s&&"string"==typeof t,u="function"==typeof t,l=!1;if(!s){for(n in r)if(Object.prototype.hasOwnProperty.call(r,n)){if(o=r[n],c&&o[t]){delete o[t],l=t;break}if(u)for(a in o)Object.prototype.hasOwnProperty.call(o,a)&&o[a]===t&&(delete o[a],l=!0)}return l}e.clearSubscriptions(t)}}(o)),void 0!==t&&t.exports&&(n=t.exports=o),n.PubSub=o,t.exports=n=o}("object"==typeof window&&window||e);var a={exports:{}};
/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */!function(e){function r(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length>1){r[0]=r[0].slice(0,-1);for(var n=r.length-1,o=1;o<n;++o)r[o]=r[o].slice(1,-1);return r[n]=r[n].slice(1),r.join("")}return r[0]}function t(e){return"(?:"+e+")"}function n(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function a(e){return null!=e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function i(e,r){var t=e;if(r)for(var n in r)t[n]=r[n];return t}function s(e){var n="[A-Za-z]",o="[0-9]",a=r(o,"[A-Fa-f]"),i=t(t("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+t("%[89A-Fa-f]"+a+"%"+a+a)+"|"+t("%"+a+a)),s="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",c=r("[\\:\\/\\?\\#\\[\\]\\@]",s),u=e?"[\\uE000-\\uF8FF]":"[]",l=r(n,o,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");t(n+r(n,o,"[\\+\\-\\.]")+"*"),t(t(i+"|"+r(l,s,"[\\:]"))+"*");var p=t(t("25[0-5]")+"|"+t("2[0-4]"+o)+"|"+t("1"+o+o)+"|"+t("0?[1-9]"+o)+"|0?0?"+o),f=t(p+"\\."+p+"\\."+p+"\\."+p),d=t(a+"{1,4}"),h=t(t(d+"\\:"+d)+"|"+f),v=t(t(d+"\\:")+"{6}"+h),y=t("\\:\\:"+t(d+"\\:")+"{5}"+h),m=t(t(d)+"?\\:\\:"+t(d+"\\:")+"{4}"+h),g=t(t(t(d+"\\:")+"{0,1}"+d)+"?\\:\\:"+t(d+"\\:")+"{3}"+h),b=t(t(t(d+"\\:")+"{0,2}"+d)+"?\\:\\:"+t(d+"\\:")+"{2}"+h),w=t(t(t(d+"\\:")+"{0,3}"+d)+"?\\:\\:"+d+"\\:"+h),E=t(t(t(d+"\\:")+"{0,4}"+d)+"?\\:\\:"+h),S=t(t(t(d+"\\:")+"{0,5}"+d)+"?\\:\\:"+d),O=t(t(t(d+"\\:")+"{0,6}"+d)+"?\\:\\:"),C=t([v,y,m,g,b,w,E,S,O].join("|")),A=t(t(l+"|"+i)+"+");t("[vV]"+a+"+\\."+r(l,s,"[\\:]")+"+"),t(t(i+"|"+r(l,s))+"*");var I=t(i+"|"+r(l,s,"[\\:\\@]"));return t(t(i+"|"+r(l,s,"[\\@]"))+"+"),t(t(I+"|"+r("[\\/\\?]",u))+"*"),{NOT_SCHEME:new RegExp(r("[^]",n,o,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(r("[^\\%\\:]",l,s),"g"),NOT_HOST:new RegExp(r("[^\\%\\[\\]\\:]",l,s),"g"),NOT_PATH:new RegExp(r("[^\\%\\/\\:\\@]",l,s),"g"),NOT_PATH_NOSCHEME:new RegExp(r("[^\\%\\/\\@]",l,s),"g"),NOT_QUERY:new RegExp(r("[^\\%]",l,s,"[\\:\\@\\/\\?]",u),"g"),NOT_FRAGMENT:new RegExp(r("[^\\%]",l,s,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(r("[^]",l,s),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(r("[^\\%]",l,c),"g"),PCT_ENCODED:new RegExp(i,"g"),IPV4ADDRESS:new RegExp("^("+f+")$"),IPV6ADDRESS:new RegExp("^\\[?("+C+")"+t(t("\\%25|\\%(?!"+a+"{2})")+"("+A+")")+"?\\]?$")}}var c=s(!1),u=s(!0),l=function(){function e(e,r){var t=[],n=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(n=(i=s.next()).done)&&(t.push(i.value),!r||t.length!==r);n=!0);}catch(e){o=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(o)throw a}}return t}return function(r,t){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return e(r,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),p=function(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);r<e.length;r++)t[r]=e[r];return t}return Array.from(e)},f=2147483647,d=36,h=1,v=26,y=38,m=700,g=72,b=128,w="-",E=/^xn--/,S=/[^\0-\x7E]/,O=/[\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"},A=d-h,I=Math.floor,T=String.fromCharCode;function j(e){throw new RangeError(C[e])}function x(e,r){for(var t=[],n=e.length;n--;)t[n]=r(e[n]);return t}function $(e,r){var t=e.split("@"),n="";return t.length>1&&(n=t[0]+"@",e=t[1]),n+x((e=e.replace(O,".")).split("."),r).join(".")}function D(e){for(var r=[],t=0,n=e.length;t<n;){var o=e.charCodeAt(t++);if(o>=55296&&o<=56319&&t<n){var a=e.charCodeAt(t++);56320==(64512&a)?r.push(((1023&o)<<10)+(1023&a)+65536):(r.push(o),t--)}else r.push(o)}return r}var P=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:d},N=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},R=function(e,r,t){var n=0;for(e=t?I(e/m):e>>1,e+=I(e/r);e>A*v>>1;n+=d)e=I(e/A);return I(n+(A+1)*e/(e+y))},F=function(e){var r=[],t=e.length,n=0,o=b,a=g,i=e.lastIndexOf(w);i<0&&(i=0);for(var s=0;s<i;++s)e.charCodeAt(s)>=128&&j("not-basic"),r.push(e.charCodeAt(s));for(var c=i>0?i+1:0;c<t;){for(var u=n,l=1,p=d;;p+=d){c>=t&&j("invalid-input");var y=P(e.charCodeAt(c++));(y>=d||y>I((f-n)/l))&&j("overflow"),n+=y*l;var m=p<=a?h:p>=a+v?v:p-a;if(y<m)break;var E=d-m;l>I(f/E)&&j("overflow"),l*=E}var S=r.length+1;a=R(n-u,S,0==u),I(n/S)>f-o&&j("overflow"),o+=I(n/S),n%=S,r.splice(n++,0,o)}return String.fromCodePoint.apply(String,r)},_=function(e){var r=[],t=(e=D(e)).length,n=b,o=0,a=g,i=!0,s=!1,c=void 0;try{for(var u,l=e[Symbol.iterator]();!(i=(u=l.next()).done);i=!0){var p=u.value;p<128&&r.push(T(p))}}catch(e){s=!0,c=e}finally{try{!i&&l.return&&l.return()}finally{if(s)throw c}}var y=r.length,m=y;for(y&&r.push(w);m<t;){var E=f,S=!0,O=!1,C=void 0;try{for(var A,x=e[Symbol.iterator]();!(S=(A=x.next()).done);S=!0){var $=A.value;$>=n&&$<E&&(E=$)}}catch(e){O=!0,C=e}finally{try{!S&&x.return&&x.return()}finally{if(O)throw C}}var P=m+1;E-n>I((f-o)/P)&&j("overflow"),o+=(E-n)*P,n=E;var F=!0,_=!1,U=void 0;try{for(var k,q=e[Symbol.iterator]();!(F=(k=q.next()).done);F=!0){var z=k.value;if(z<n&&++o>f&&j("overflow"),z==n){for(var L=o,H=d;;H+=d){var V=H<=a?h:H>=a+v?v:H-a;if(L<V)break;var M=L-V,K=d-V;r.push(T(N(V+M%K,0))),L=I(M/K)}r.push(T(N(L,0))),a=R(o,P,m==y),o=0,++m}}}catch(e){_=!0,U=e}finally{try{!F&&q.return&&q.return()}finally{if(_)throw U}}++o,++n}return r.join("")},U=function(e){return $(e,(function(e){return E.test(e)?F(e.slice(4).toLowerCase()):e}))},k=function(e){return $(e,(function(e){return S.test(e)?"xn--"+_(e):e}))},q={version:"2.1.0",ucs2:{decode:D,encode:function(e){return String.fromCodePoint.apply(String,p(e))}},decode:F,encode:_,toASCII:k,toUnicode:U},z={};function L(e){var r=e.charCodeAt(0);return r<16?"%0"+r.toString(16).toUpperCase():r<128?"%"+r.toString(16).toUpperCase():r<2048?"%"+(r>>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function H(e){for(var r="",t=0,n=e.length;t<n;){var o=parseInt(e.substr(t+1,2),16);if(o<128)r+=String.fromCharCode(o),t+=3;else if(o>=194&&o<224){if(n-t>=6){var a=parseInt(e.substr(t+4,2),16);r+=String.fromCharCode((31&o)<<6|63&a)}else r+=e.substr(t,6);t+=6}else if(o>=224){if(n-t>=9){var i=parseInt(e.substr(t+4,2),16),s=parseInt(e.substr(t+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&s)}else r+=e.substr(t,9);t+=9}else r+=e.substr(t,3),t+=3}return r}function V(e,r){function t(e){var t=H(e);return t.match(r.UNRESERVED)?t:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,t).replace(r.NOT_USERINFO,L).replace(r.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_HOST,L).replace(r.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(r.PCT_ENCODED,t).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,L).replace(r.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(r.PCT_ENCODED,t).replace(r.NOT_QUERY,L).replace(r.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,t).replace(r.NOT_FRAGMENT,L).replace(r.PCT_ENCODED,o)),e}function M(e){return e.replace(/^0*(.*)/,"$1")||"0"}function K(e,r){var t=e.match(r.IPV4ADDRESS)||[],n=l(t,2)[1];return n?n.split(".").map(M).join("."):e}function Z(e,r){var t=e.match(r.IPV6ADDRESS)||[],n=l(t,3),o=n[1],a=n[2];if(o){for(var i=o.toLowerCase().split("::").reverse(),s=l(i,2),c=s[0],u=s[1],p=u?u.split(":").map(M):[],f=c.split(":").map(M),d=r.IPV4ADDRESS.test(f[f.length-1]),h=d?7:8,v=f.length-h,y=Array(h),m=0;m<h;++m)y[m]=p[m]||f[v+m]||"";d&&(y[h-1]=K(y[h-1],r));var g=y.reduce((function(e,r,t){if(!r||"0"===r){var n=e[e.length-1];n&&n.index+n.length===t?n.length++:e.push({index:t,length:1})}return e}),[]).sort((function(e,r){return r.length-e.length}))[0],b=void 0;if(g&&g.length>1){var w=y.slice(0,g.index),E=y.slice(g.index+g.length);b=w.join(":")+"::"+E.join(":")}else b=y.join(":");return a&&(b+="%"+a),b}return e}var J=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,B=void 0==="".match(/(){0}/)[1];function W(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t={},n=!1!==r.iri?u:c;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(J);if(o){B?(t.scheme=o[1],t.userinfo=o[3],t.host=o[4],t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=o[7],t.fragment=o[8],isNaN(t.port)&&(t.port=o[5])):(t.scheme=o[1]||void 0,t.userinfo=-1!==e.indexOf("@")?o[3]:void 0,t.host=-1!==e.indexOf("//")?o[4]:void 0,t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=-1!==e.indexOf("?")?o[7]:void 0,t.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(t.port)&&(t.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),t.host&&(t.host=Z(K(t.host,n),n)),void 0!==t.scheme||void 0!==t.userinfo||void 0!==t.host||void 0!==t.port||t.path||void 0!==t.query?void 0===t.scheme?t.reference="relative":void 0===t.fragment?t.reference="absolute":t.reference="uri":t.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==t.reference&&(t.error=t.error||"URI is not a "+r.reference+" reference.");var a=z[(r.scheme||t.scheme||"").toLowerCase()];if(r.unicodeSupport||a&&a.unicodeSupport)V(t,n);else{if(t.host&&(r.domainHost||a&&a.domainHost))try{t.host=q.toASCII(t.host.replace(n.PCT_ENCODED,H).toLowerCase())}catch(e){t.error=t.error||"Host's domain name can not be converted to ASCII via punycode: "+e}V(t,c)}a&&a.parse&&a.parse(t,r)}else t.error=t.error||"URI can not be parsed.";return t}function G(e,r){var t=!1!==r.iri?u:c,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(Z(K(String(e.host),t),t).replace(t.IPV6ADDRESS,(function(e,r,t){return"["+r+(t?"%25"+t:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}var Q=/^\.\.?\//,Y=/^\/\.(\/|$)/,X=/^\/\.\.(\/|$)/,ee=/^\/?(?:.|\n)*?(?=\/|$)/;function re(e){for(var r=[];e.length;)if(e.match(Q))e=e.replace(Q,"");else if(e.match(Y))e=e.replace(Y,"/");else if(e.match(X))e=e.replace(X,"/"),r.pop();else if("."===e||".."===e)e="";else{var t=e.match(ee);if(!t)throw new Error("Unexpected dot segment condition");var n=t[0];e=e.slice(n.length),r.push(n)}return r.join("")}function te(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.iri?u:c,n=[],o=z[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(t.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?q.toUnicode(e.host):q.toASCII(e.host.replace(t.PCT_ENCODED,H).toLowerCase())}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+t}V(e,t),"suffix"!==r.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var a=G(e,r);if(void 0!==a&&("suffix"!==r.reference&&n.push("//"),n.push(a),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var i=e.path;r.absolutePath||o&&o.absolutePath||(i=re(i)),void 0===a&&(i=i.replace(/^\/\//,"/%2F")),n.push(i)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function ne(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=W(te(e,t),t),r=W(te(r,t),t)),!(t=t||{}).tolerant&&r.scheme?(n.scheme=r.scheme,n.userinfo=r.userinfo,n.host=r.host,n.port=r.port,n.path=re(r.path||""),n.query=r.query):(void 0!==r.userinfo||void 0!==r.host||void 0!==r.port?(n.userinfo=r.userinfo,n.host=r.host,n.port=r.port,n.path=re(r.path||""),n.query=r.query):(r.path?("/"===r.path.charAt(0)?n.path=re(r.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:n.path=r.path:n.path="/"+r.path,n.path=re(n.path)),n.query=r.query):(n.path=e.path,void 0!==r.query?n.query=r.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=r.fragment,n}function oe(e,r,t){var n=i({scheme:"null"},t);return te(ne(W(e,n),W(r,n),n,!0),n)}function ae(e,r){return"string"==typeof e?e=te(W(e,r),r):"object"===n(e)&&(e=W(te(e,r),r)),e}function ie(e,r,t){return"string"==typeof e?e=te(W(e,t),t):"object"===n(e)&&(e=te(e,t)),"string"==typeof r?r=te(W(r,t),t):"object"===n(r)&&(r=te(r,t)),e===r}function se(e,r){return e&&e.toString().replace(r&&r.iri?u.ESCAPE:c.ESCAPE,L)}function ce(e,r){return e&&e.toString().replace(r&&r.iri?u.PCT_ENCODED:c.PCT_ENCODED,H)}var ue={scheme:"http",domainHost:!0,parse:function(e,r){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,r){var t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},le={scheme:"https",domainHost:ue.domainHost,parse:ue.parse,serialize:ue.serialize};function pe(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var fe={scheme:"ws",domainHost:!0,parse:function(e,r){var t=e;return t.secure=pe(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t},serialize:function(e,r){if(e.port!==(pe(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var t=e.resourceName.split("?"),n=l(t,2),o=n[0],a=n[1];e.path=o&&"/"!==o?o:void 0,e.query=a,e.resourceName=void 0}return e.fragment=void 0,e}},de={scheme:"wss",domainHost:fe.domainHost,parse:fe.parse,serialize:fe.serialize},he={},ve="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ye="[0-9A-Fa-f]",me=t(t("%[EFef]"+ye+"%"+ye+ye+"%"+ye+ye)+"|"+t("%[89A-Fa-f]"+ye+"%"+ye+ye)+"|"+t("%"+ye+ye)),ge="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",be=r("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),we="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Ee=new RegExp(ve,"g"),Se=new RegExp(me,"g"),Oe=new RegExp(r("[^]",ge,"[\\.]",'[\\"]',be),"g"),Ce=new RegExp(r("[^]",ve,we),"g"),Ae=Ce;function Ie(e){var r=H(e);return r.match(Ee)?r:e}var Te={scheme:"mailto",parse:function(e,r){var t=e,n=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var o=!1,a={},i=t.query.split("&"),s=0,c=i.length;s<c;++s){var u=i[s].split("=");switch(u[0]){case"to":for(var l=u[1].split(","),p=0,f=l.length;p<f;++p)n.push(l[p]);break;case"subject":t.subject=ce(u[1],r);break;case"body":t.body=ce(u[1],r);break;default:o=!0,a[ce(u[0],r)]=ce(u[1],r)}}o&&(t.headers=a)}t.query=void 0;for(var d=0,h=n.length;d<h;++d){var v=n[d].split("@");if(v[0]=ce(v[0]),r.unicodeSupport)v[1]=ce(v[1],r).toLowerCase();else try{v[1]=q.toASCII(ce(v[1],r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[d]=v.join("@")}return t},serialize:function(e,r){var t=e,n=a(e.to);if(n){for(var i=0,s=n.length;i<s;++i){var c=String(n[i]),u=c.lastIndexOf("@"),l=c.slice(0,u).replace(Se,Ie).replace(Se,o).replace(Oe,L),p=c.slice(u+1);try{p=r.iri?q.toUnicode(p):q.toASCII(ce(p,r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+e}n[i]=l+"@"+p}t.path=n.join(",")}var f=e.headers=e.headers||{};e.subject&&(f.subject=e.subject),e.body&&(f.body=e.body);var d=[];for(var h in f)f[h]!==he[h]&&d.push(h.replace(Se,Ie).replace(Se,o).replace(Ce,L)+"="+f[h].replace(Se,Ie).replace(Se,o).replace(Ae,L));return d.length&&(t.query=d.join("&")),t}},je=/^([^\:]+)\:(.*)/,xe={scheme:"urn",parse:function(e,r){var t=e.path&&e.path.match(je),n=e;if(t){var o=r.scheme||n.scheme||"urn",a=t[1].toLowerCase(),i=t[2],s=o+":"+(r.nid||a),c=z[s];n.nid=a,n.nss=i,n.path=void 0,c&&(n=c.parse(n,r))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,r){var t=r.scheme||e.scheme||"urn",n=e.nid,o=t+":"+(r.nid||n),a=z[o];a&&(e=a.serialize(e,r));var i=e,s=e.nss;return i.path=(n||r.nid)+":"+s,i}},$e=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,De={scheme:"urn:uuid",parse:function(e,r){var t=e;return t.uuid=t.nss,t.nss=void 0,r.tolerant||t.uuid&&t.uuid.match($e)||(t.error=t.error||"UUID is not valid."),t},serialize:function(e,r){var t=e;return t.nss=(e.uuid||"").toLowerCase(),t}};z[ue.scheme]=ue,z[le.scheme]=le,z[fe.scheme]=fe,z[de.scheme]=de,z[Te.scheme]=Te,z[xe.scheme]=xe,z[De.scheme]=De,e.SCHEMES=z,e.pctEncChar=L,e.pctDecChars=H,e.parse=W,e.removeDotSegments=re,e.serialize=te,e.resolveComponents=ne,e.resolve=oe,e.normalize=ae,e.equal=ie,e.escapeComponent=se,e.unescapeComponent=ce,Object.defineProperty(e,"__esModule",{value:!0})}(a.exports);const i=a.exports,s={null:e=>null===e,boolean:e=>"boolean"==typeof e,object:e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,array:e=>Array.isArray(e),number:e=>"number"==typeof e,integer:e=>Number.isInteger(e),string:e=>"string"==typeof e};var c={jsonTypeOf:(e,r)=>s[r](e),resolveUrl:(e,r)=>{const t=i.resolve(e,r,{iri:!0});if(i.resolve(e,"",{iri:!0})&&"file"===i.parse(t).scheme&&"file"!==i.parse(e).scheme)throw Error(`Can't access file '${t}' resource from network context '${e}'`);return t},urlFragment:e=>i.unescapeComponent(i.parse(e).fragment)||"",pathRelative:(e,r)=>{if(e===r)return"";let t=1;const n=e.length-1,o=r.length-t,a=n<o?n:o;let i=-1,s=0;for(;s<a;s++){const n=e.charCodeAt(s+1);if(n!==r.charCodeAt(t+s))break;47===n&&(i=s)}if(o>a){if(47===r.charCodeAt(t+s))return r.slice(t+s+1);if(0===s)return r.slice(t+s)}n>a&&(47===e.charCodeAt(s+1)?i=s:0===a&&(i=0));let c="";for(s=i+2;s<=e.length;++s)s!==e.length&&47!==e.charCodeAt(s)||(c+=0===c.length?"..":"/..");return t+=i,c.length>0?`${c}${r.slice(t,r.length)}`:(47===r.charCodeAt(t)&&++t,r.slice(t,r.length))}};const u=r,l=e=>{if(e.length>0&&"/"!==e[0])throw Error("Invalid JSON Pointer");return e.split("/").slice(1).map(m)},p=(e,r,t,n)=>{if(0===e.length)return t;if(e.length>1){const o=e.shift();return{...r,[o]:p(e,b(r,o,n),t,v(o,n))}}if(Array.isArray(r)){const n=[...r];return n[g(r,e[0])]=t,n}return"object"==typeof r&&null!==r?{...r,[e[0]]:t}:b(r,e[0],n)},f=(e,r,t,n)=>{if(0!==e.length)if(1!==e.length||w(r)){const o=e.shift();f(e,b(r,o,n),t,v(o,n))}else{r[g(r,e[0])]=t}},d=(e,r,t)=>{if(0!=e.length){if(e.length>1){const n=e.shift(),o=b(r,n,t);return{...r,[n]:d(e,o,v(n,t))}}if(Array.isArray(r))return r.filter(((r,t)=>t!=e[0]));if("object"==typeof r&&null!==r){const{[e[0]]:t,...n}=r;return n}return b(r,e[0],t)}},h=(e,r,t)=>{if(0!==e.length)if(e.length>1){const n=e.shift(),o=b(r,n,t);h(e,o,v(n,t))}else Array.isArray(r)?r.splice(e[0],1):"object"==typeof r&&null!==r?delete r[e[0]]:b(r,e[0],t)},v=u(((e,r)=>r+"/"+y(e))),y=e=>e.toString().replace(/~/g,"~0").replace(/\//g,"~1"),m=e=>e.toString().replace(/~1/g,"/").replace(/~0/g,"~"),g=(e,r)=>Array.isArray(e)&&"-"===r?e.length:r,b=(e,r,t="")=>{if(void 0===e)throw TypeError(`Value at '${t}' is undefined and does not have property '${r}'`);if(null===e)throw TypeError(`Value at '${t}' is null and does not have property '${r}'`);if(w(e))throw TypeError(`Value at '${t}' is a ${typeof e} and does not have property '${r}'`);return e[g(e,r)]},w=e=>null===e||"object"!=typeof e;var E={nil:"",append:v,get:(e,r)=>{const t=l(e),n=e=>t.reduce((([e,r],t)=>[b(e,t,r),v(t,r)]),[e,""])[0];return void 0===r?n:n(r)},set:(e,r,t)=>{const n=l(e),o=u(((e,r)=>p(n,e,r,"")));return void 0===r?o:o(r,t)},assign:(e,r,t)=>{const n=l(e),o=u(((e,r)=>f(n,e,r,"")));return void 0===r?o:o(r,t)},unset:(e,r)=>{const t=l(e),n=e=>d(t,e,"");return void 0===r?n:n(r)},remove:(e,r)=>{const t=l(e),n=e=>h(t,e,"");return void 0===r?n:n(r)}};const S=Symbol("$__value"),O=Symbol("$__href");var C={cons:(e,r)=>Object.freeze({[O]:e,[S]:r}),isReference:e=>e&&void 0!==e[O],href:e=>e[O],value:e=>e[S]};const A=E,I=r,{resolveUrl:T,jsonTypeOf:j}=c,x=C,$=Object.freeze({id:"",pointer:"",instance:void 0,value:void 0}),D=e=>x.isReference(e.value)?x.value(e.value):e.value,P=I(((e,r)=>j(D(e),r))),N=(e,r)=>Object.freeze({...r,pointer:A.append(e,r.pointer),value:D(r)[e]}),R=I(((e,r)=>D(r).map(((t,n,o,a)=>e(N(n,r),n,o,a))))),F=I(((e,r)=>D(r).forEach(((t,n,o,a)=>e(N(n,r),n,o,a))))),_=I(((e,r)=>D(r).map(((e,t,n,o)=>N(t,r))).filter(((r,t,n,o)=>e(r,t,n,o))))),U=I(((e,r,t)=>D(t).reduce(((r,n,o)=>e(r,N(o,t),o)),r))),k=I(((e,r)=>D(r).every(((t,n,o,a)=>e(N(n,r),n,o,a))))),q=I(((e,r)=>D(r).some(((t,n,o,a)=>e(N(n,r),n,o,a)))));var z={nil:$,cons:(e,r="")=>Object.freeze({...$,id:T(r,""),instance:e,value:e}),get:(e,r=$)=>{if(!e.startsWith("#"))throw Error(`No JSON document found at '${e.split("#")[0]}'`);return Object.freeze({...r,pointer:e.substr(1)})},uri:e=>`${e.id}#${encodeURI(e.pointer)}`,value:D,has:(e,r)=>e in D(r),typeOf:P,length:e=>D(e).length,step:N,entries:e=>Object.keys(D(e)).map((r=>[r,N(r,e)])),keys:e=>Object.keys(D(e)),map:R,forEach:F,filter:_,reduce:U,every:k,some:q},L=async e=>Object.entries(await e);var H=r((async(e,r)=>(await r).map(e)));var V=r((async(e,r,t)=>(await t).reduce((async(r,t)=>e(await r,t)),r)));const M=V;var K=r((async(e,r,t={})=>M((async(r,t)=>await e(t)?r.concat([t]):r),[],r,t)));const Z=H;var J=r((async(e,r)=>{const t=await Z(e,r);return(await Promise.all(t)).some((e=>e))}));const B=H;var W=r((async(e,r)=>{const t=await B(e,r);return(await Promise.all(t)).every((e=>e))}));var G=r(((e,r)=>e.reduce((async(e,r)=>r(await e)),r)));const Q=G,Y=L,X=V;var ee={entries:L,map:H,filter:K,reduce:V,some:J,every:W,pipeline:G,all:e=>Promise.all(e),allValues:e=>Q([Y,X((async(e,[r,t])=>(e[r]=await t,e)),{})],e)},re=fetch,te={},ne=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,oe=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,ae=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,ie=/\\([\u000b\u0020-\u00ff])/g,se=/([\\"])/g,ce=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;function ue(e){var r=String(e);if(ae.test(r))return r;if(r.length>0&&!oe.test(r))throw new TypeError("invalid parameter value");return'"'+r.replace(se,"\\$1")+'"'}function le(e){this.parameters=Object.create(null),this.type=e}te.format=function(e){if(!e||"object"!=typeof e)throw new TypeError("argument obj is required");var r=e.parameters,t=e.type;if(!t||!ce.test(t))throw new TypeError("invalid type");var n=t;if(r&&"object"==typeof r)for(var o,a=Object.keys(r).sort(),i=0;i<a.length;i++){if(o=a[i],!ae.test(o))throw new TypeError("invalid parameter name");n+="; "+o+"="+ue(r[o])}return n},te.parse=function(e){if(!e)throw new TypeError("argument string is required");var r="object"==typeof e?function(e){var r;"function"==typeof e.getHeader?r=e.getHeader("content-type"):"object"==typeof e.headers&&(r=e.headers&&e.headers["content-type"]);if("string"!=typeof r)throw new TypeError("content-type header is missing from object");return r}(e):e;if("string"!=typeof r)throw new TypeError("argument string is required to be a string");var t=r.indexOf(";"),n=-1!==t?r.substr(0,t).trim():r.trim();if(!ce.test(n))throw new TypeError("invalid media type");var o=new le(n.toLowerCase());if(-1!==t){var a,i,s;for(ne.lastIndex=t;i=ne.exec(r);){if(i.index!==t)throw new TypeError("invalid parameter format");t+=i[0].length,a=i[1].toLowerCase(),'"'===(s=i[2])[0]&&(s=s.substr(1,s.length-2).replace(ie,"$1")),o.parameters[a]=s}if(t!==r.length)throw new TypeError("invalid parameter format")}return o};const pe=te,fe={};var de={addPlugin:(e,r)=>{fe[e]=r},parse:e=>{const r=pe.parse(e.headers.get("content-type"));if(!(r.type in fe))throw Error(`${e.url} is not a schema. Found a document with media type: ${r.type}`);return fe[r.type].parse(e,r.parameters)},getContentType:e=>{for(const r in fe)if(fe[r].matcher(e))return r;return"application/octet-stream"}};const he=r,ve=ee,ye=E,{jsonTypeOf:me,resolveUrl:ge,urlFragment:be,pathRelative:we}=c,Ee=re,Se=C,Oe=de,Ce="https://json-schema.org/draft/2019-09/vocab/core",Ae="https://json-schema.org/draft/2020-12/vocab/core",Ie={},Te={},je=(e,r)=>{const t=Te[e];return Ie[t]?.[r]},xe={},$e={},De=(e,r="",t="")=>{e=JSON.parse(JSON.stringify(e));const n=ge(r,""),o=ge(e.$schema||t,"");if(!o)throw Error("Couldn't determine schema dialect");if(delete e.$schema,!(o in Te))if(!0===e?.$vocabulary?.[Ce]&&o===Pe(e,n,Ce)[0])Te[o]=Ce;else if(!0===e?.$vocabulary?.[Ae]&&o===Pe(e,n,Ae)[0])Te[o]=Ae;else{const e=xe[o];if(!e)throw Error(`Couldn't determine JSON Schema version for dialect: '${o}'`);!0===e.vocabulary[Ce]?Te[o]=Ce:!0===e.vocabulary[Ae]?Te[o]=Ae:Te[o]=Te[e.dialectId]}const[a,i]=Pe(e,n,Te[o]);if(!a)throw Error("Couldn't determine an identifier for the schema");const s=je(o,"baseToken");delete e[s],n&&($e[n]=a);const c=je(o,"anchorToken");i&&s===c&&(e[c]=c!==s?encodeURI(i):`#${encodeURI(i)}`);const u={},l=je(o,"recursiveAnchorToken");let p;!0===e[l]&&(u[""]=`${a}#`,e[c]="",delete e[l]);const f=je(o,"vocabularyToken");me(e[f],"object")?(p=e[f],delete e[f]):p={[Te[o]]:!0};const d={"":""};return xe[a]={id:a,dialectId:o,schema:Ne(e,a,o,ye.nil,d,u),anchors:d,dynamicAnchors:u,vocabulary:p,validated:!1},a},Pe=(e,r,t)=>{const n=Ie[t]?.baseToken,o=ge(r,e[n]||"");return[ge(o,""),be(o)]},Ne=(e,r,t,n,o,a)=>{if(me(e,"object")){const i="string"==typeof e.$schema?ge(e.$schema,""):t,s=je(i,"embeddedToken"),c=je(i,"anchorToken");if("string"==typeof e[s]&&(s!==c||"#"!==e[s][0])){const n=ge(r,e[s]);return e[je(i,"baseToken")]=n,De(e,n,t),Se.cons(e[s],e)}const u=je(t,"anchorToken"),l=je(t,"dynamicAnchorToken");"string"==typeof e[l]&&(a[e[l]]=`${r}#${encodeURI(n)}`,o[e[l]]=n,delete e[l]);const p=je(t,"embeddedToken");if("string"==typeof e[u]){const r=u!==p?e[u]:e[u].slice(1);o[r]=n,delete e[u]}const f=je(t,"jrefToken");if("string"==typeof e[f])return Se.cons(e[f],e);for(const i in e)e[i]=Ne(e[i],r,t,ye.append(i,n),o,a);return e}return Array.isArray(e)?e.map(((e,i)=>Ne(e,r,t,ye.append(i,n),o,a))):e},Re=e=>xe[$e[e]]||xe[e],Fe=Object.freeze({id:"",dialectId:void 0,vocabulary:{},pointer:ye.nil,schema:void 0,value:void 0,anchors:{},dynamicAnchors:{},validated:!0}),_e=async(e,r=Fe)=>{const t=ge(qe(r),e),n=ge(t,""),o=be(t);if(!(e=>e in xe||e in $e)(n)){const e=await Ee(n,{headers:{Accept:"application/schema+json"}});if(e.status>=400)throw await e.text(),Error(`Failed to retrieve schema with id: ${n}`);const[r,t]=await Oe.parse(e);let o;o=r.$schema?ge(r.$schema,""):t?ge(n,t):"",o&&n!==o&&!(o in Te)&&await _e(o),De(r,n,o)}const a=Re(n),i="/"!==o[0]?ke(a,o):o,s=Object.freeze({...a,pointer:i,value:ye.get(i,a.schema)});return Ue(s)},Ue=e=>Se.isReference(e.value)?_e(Se.href(e.value),e):e,ke=(e,r)=>{if(!(r in e.anchors))throw Error(`No such anchor '${encodeURI(e.id)}#${encodeURI(r)}'`);return e.anchors[r]},qe=e=>`${e.id}#${encodeURI(e.pointer)}`,ze=e=>Se.isReference(e.value)?Se.value(e.value):e.value,Le=(e,r)=>{const t=Re(r.id),n=Object.freeze({...r,pointer:ye.append(e,r.pointer),value:ze(r)[e],validated:t.validated});return Ue(n)},He=he(((e,r)=>ve.pipeline([ze,ve.map((async(t,n)=>e(await Le(n,r),n))),ve.all],r))),Ve={parentId:"",parentDialect:"",includeEmbedded:!0},Me=(e,r)=>{if(r.startsWith("file://")){const t=e.slice(7,e.lastIndexOf("/"));return""===e?"":we(t,r.slice(7))}return r};var Ke={setConfig:(e,r,t)=>{Te[e]=e,Ie[e]||(Ie[e]={}),Ie[e][r]=t},getConfig:je,add:De,get:_e,markValidated:e=>{xe[e].validated=!0},uri:qe,value:ze,getAnchorPointer:ke,typeOf:(e,r)=>me(ze(e),r),has:(e,r)=>e in ze(r),step:Le,keys:e=>Object.keys(ze(e)),entries:e=>ve.pipeline([ze,Object.keys,ve.map((async r=>[r,await Le(r,e)])),ve.all],e),map:He,length:e=>ze(e).length,toSchema:(e,r={})=>{const t={...Ve,...r},n=JSON.parse(JSON.stringify(e.schema,((r,n)=>{if(!Se.isReference(n))return n;const o=Se.value(n),a="string"==typeof o.$schema?ge(o.$schema,""):e.dialectId,i=je(a,"embeddedToken");return!t.includeEmbedded&&i in o?void 0:Se.value(n)}))),o=je(e.dialectId,"dynamicAnchorToken");Object.entries(e.dynamicAnchors).forEach((([e,r])=>{const t=ye.append(o,be(r));ye.assign(t,n,e)}));const a=je(e.dialectId,"anchorToken");Object.entries(e.anchors).filter((([r])=>""!==r&&!(r in e.dynamicAnchors))).forEach((([e,r])=>{const t=ye.append(a,r);ye.assign(t,n,e)}));const i=je(e.dialectId,"baseToken"),s=Me(t.parentId,e.id),c=t.parentDialect===e.dialectId?"":e.dialectId;return{...s&&{[i]:s},...c&&{$schema:c},...n}}};class Ze extends Error{constructor(e){super("Invalid Schema"),this.name=this.constructor.name,this.output=e}}var Je=Ze;const Be=Ke;var We={compile:e=>Be.value(e),interpret:()=>!0};const Ge=r,Qe=o.exports,{resolveUrl:Ye}=c,Xe=z,er=Ke,rr=Je,tr=de,nr=We,or="FLAG",ar="BASIC",ir="DETAILED",sr="VERBOSE";let cr=ir,ur=!0;tr.addPlugin("application/schema+json",{parse:async(e,r)=>[await e.json(),r.schema||r.profile],matcher:e=>e.endsWith(".schema.json")});const lr=async e=>{const r={metaData:{}};return{ast:r,schemaUri:await gr(e,r)}},pr=Ge((({ast:e,schemaUri:r},t,n=or)=>{if(![or,ar,ir,sr].includes(n))throw Error(`The '${n}' error format is not supported`);const o=[],a=Qe.subscribe("result",fr(n,o));return wr(r,t,e,{}),Qe.unsubscribe(a),o[0]})),fr=(e,r)=>{const t=[];return(n,o)=>{if("result"===n){const{keyword:e,absoluteKeywordLocation:r,instanceLocation:n,valid:a}=o,i={keyword:e,absoluteKeywordLocation:r,instanceLocation:n,valid:a,errors:[]};t.push(i)}else if("result.start"===n)t.push(n);else if("result.end"===n){const n=t.pop();for(;"result.start"!==t[t.length-1];){const r=t.pop(),o=[r];e===ar&&(o.push(...r.errors),delete r.errors),(e===sr||e!==or&&!r.valid)&&n.errors.unshift(...o)}t[t.length-1]=n,r[0]=n}}},dr={},hr=e=>dr[e]||nr,vr=e=>e in dr,yr={},mr={},gr=async(e,r)=>{if(e=await br(e),!vr(`${e.dialectId}#validate`)){const r=await er.get(e.dialectId);(er.getConfig(r.id,"mandatoryVocabularies")||[]).forEach((e=>{if(!r.vocabulary[e])throw Error(`Vocabulary '${e}' must be explicitly declared and required`)})),Object.entries(r.vocabulary).forEach((([e,t])=>{if(e in yr)Object.entries(yr[e]).forEach((([e,t])=>{((e,r)=>{dr[e]={collectEvaluatedItems:(e,t,n,o,a)=>r.interpret(e,t,n,o,a)&&new Set,collectEvaluatedProperties:(e,t,n,o,a)=>r.interpret(e,t,n,o,a)&&[],...r}})(`${r.id}#${e}`,t)}));else if(t)throw Error(`Missing required vocabulary: ${e}`)}))}if(ur&&!e.validated){if(er.markValidated(e.id),!(e.dialectId in mr)){const r=await er.get(e.dialectId),t=await lr(r);mr[r.id]=pr(t)}const r=Xe.cons(e.schema,e.id),t=mr[e.dialectId](r,cr);if(!t.valid)throw new rr(t)}return e.id in r.metaData||(r.metaData[e.id]={id:e.id,dynamicAnchors:e.dynamicAnchors,anchors:e.anchors}),hr(`${e.dialectId}#validate`).compile(e,r)},br=async e=>er.typeOf(e,"string")?br(await er.get(er.value(e),e)):e,wr=(e,r,t,n)=>{const o=Er(e,t),a=Ye(e,"");return hr(o).interpret(e,r,t,{...t.metaData[a].dynamicAnchors,...n})},Er=(e,r)=>{if(!(e in r))throw Error(`No schema found at ${e}`);return r[e][0]};var Sr={validate:async(e,r,t)=>{const n=await lr(e),o=(e,r)=>pr(n,Xe.cons(e),r);return void 0===r?o:o(r,t)},compile:lr,interpret:pr,setMetaOutputFormat:e=>{cr=e},setShouldMetaValidate:e=>{ur=e},FLAG:or,BASIC:ar,DETAILED:ir,VERBOSE:sr,add:(e,r="",t="")=>{const n=er.add(e,r,t);delete mr[n]},getKeyword:hr,hasKeyword:vr,defineVocabulary:(e,r)=>{yr[e]=r},compileSchema:gr,interpretSchema:wr,collectEvaluatedProperties:(e,r,t,n,o)=>{const a=Er(e,t);return hr(a).collectEvaluatedProperties(e,r,t,n,o)},collectEvaluatedItems:(e,r,t,n,o)=>{const a=Er(e,t);return hr(a).collectEvaluatedItems(e,r,t,n,o)},addMediaTypePlugin:tr.addPlugin};const Or=ee,Cr=o.exports,Ar=Sr,Ir=z,Tr=Ke;var jr={compile:async(e,r)=>{const t=Tr.uri(e);if(!(t in r)){r[t]=!1;const n=Tr.value(e);if(!["object","boolean"].includes(typeof n))throw Error(`No schema found at '${Tr.uri(e)}'`);r[t]=[`${e.dialectId}#validate`,Tr.uri(e),"boolean"==typeof n?n:await Or.pipeline([Tr.entries,Or.map((([r,t])=>[`${e.dialectId}#${r}`,t])),Or.filter((([r])=>r!==`${e.dialectId}#validate`)),Or.map((async([t,n])=>{const o=await Ar.getKeyword(t).compile(n,r,e);return[t,Tr.uri(n),o]})),Or.all],e)]}return t},interpret:(e,r,t,n)=>{const[o,a,i]=t[e];Cr.publishSync("result.start");const s="boolean"==typeof i?i:i.every((([e,o,a])=>{Cr.publishSync("result.start");const i=Ar.getKeyword(e).interpret(a,r,t,n);return Cr.publishSync("result",{keyword:e,absoluteKeywordLocation:o,instanceLocation:Ir.uri(r),valid:i,ast:a}),Cr.publishSync("result.end"),i}));return Cr.publishSync("result",{keyword:o,absoluteKeywordLocation:a,instanceLocation:Ir.uri(r),valid:s,ast:e}),Cr.publishSync("result.end"),s},collectEvaluatedProperties:(e,r,t,n,o=!1)=>{const a=t[e][2];return"boolean"==typeof a?!!a&&[]:a.filter((([e])=>!o||!e.endsWith("#unevaluatedProperties"))).reduce(((e,[o,,a])=>{const i=e&&Ar.getKeyword(o).collectEvaluatedProperties(a,r,t,n);return!1!==i&&[...e,...i]}),[])},collectEvaluatedItems:(e,r,t,n,o=!1)=>{const a=t[e][2];return"boolean"==typeof a?!!a&&new Set:a.filter((([e])=>!o||!e.endsWith("#unevaluatedItems"))).reduce(((e,[o,,a])=>{const i=!1!==e&&Ar.getKeyword(o).collectEvaluatedItems(a,r,t,n);return!1!==i&&new Set([...e,...i])}),new Set)}};var xr={Core:Sr,Schema:Ke,Instance:z,Reference:C,Keywords:{metaData:We,validate:jr},InvalidSchemaError:Je};export{xr as default};
var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=function(e,t){return function r(){null==t&&(t=e.length);var n=[].slice.call(arguments);return n.length>=t?e.apply(this,n):function(){return r.apply(this,n.concat([].slice.call(arguments)))}}};var r,n,o={exports:{}};r=o,n=o.exports,function(e,t){var o={};e.PubSub?(o=e.PubSub,console.warn("PubSub already loaded, using existing version")):(e.PubSub=o,function(e){var t={},r=-1,n="*";function o(e){var t;for(t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!0;return!1}function a(e){return function(){throw e}}function i(e,t,r){try{e(t,r)}catch(e){setTimeout(a(e),0)}}function s(e,t,r){e(t,r)}function c(e,r,n,o){var a,c=t[r],u=o?s:i;if(Object.prototype.hasOwnProperty.call(t,r))for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&u(c[a],e,n)}function u(e,t,r){return function(){var o=String(e),a=o.lastIndexOf(".");for(c(e,e,t,r);-1!==a;)a=(o=o.substr(0,a)).lastIndexOf("."),c(e,o,t,r);c(e,n,t,r)}}function l(e){var r=String(e);return Boolean(Object.prototype.hasOwnProperty.call(t,r)&&o(t[r]))}function p(e){for(var t=String(e),r=l(t)||l(n),o=t.lastIndexOf(".");!r&&-1!==o;)o=(t=t.substr(0,o)).lastIndexOf("."),r=l(t);return r}function f(e,t,r,n){var o=u(e="symbol"==typeof e?e.toString():e,t,n);return!!p(e)&&(!0===r?o():setTimeout(o,0),!0)}e.publish=function(t,r){return f(t,r,!1,e.immediateExceptions)},e.publishSync=function(t,r){return f(t,r,!0,e.immediateExceptions)},e.subscribe=function(e,n){if("function"!=typeof n)return!1;e="symbol"==typeof e?e.toString():e,Object.prototype.hasOwnProperty.call(t,e)||(t[e]={});var o="uid_"+String(++r);return t[e][o]=n,o},e.subscribeAll=function(t){return e.subscribe(n,t)},e.subscribeOnce=function(t,r){var n=e.subscribe(t,(function(){e.unsubscribe(n),r.apply(this,arguments)}));return e},e.clearAllSubscriptions=function(){t={}},e.clearSubscriptions=function(e){var r;for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&0===r.indexOf(e)&&delete t[r]},e.countSubscriptions=function(e){var r,n,o=0;for(r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&0===r.indexOf(e)){for(n in t[r])o++;break}return o},e.getSubscriptions=function(e){var r,n=[];for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&0===r.indexOf(e)&&n.push(r);return n},e.unsubscribe=function(r){var n,o,a,i=function(e){var r;for(r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&0===r.indexOf(e))return!0;return!1},s="string"==typeof r&&(Object.prototype.hasOwnProperty.call(t,r)||i(r)),c=!s&&"string"==typeof r,u="function"==typeof r,l=!1;if(!s){for(n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(o=t[n],c&&o[r]){delete o[r],l=r;break}if(u)for(a in o)Object.prototype.hasOwnProperty.call(o,a)&&o[a]===r&&(delete o[a],l=!0)}return l}e.clearSubscriptions(r)}}(o)),void 0!==r&&r.exports&&(n=r.exports=o),n.PubSub=o,r.exports=n=o}("object"==typeof window&&window||e);var a={exports:{}};
/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */!function(e){function t(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(t.length>1){t[0]=t[0].slice(0,-1);for(var n=t.length-1,o=1;o<n;++o)t[o]=t[o].slice(1,-1);return t[n]=t[n].slice(1),t.join("")}return t[0]}function r(e){return"(?:"+e+")"}function n(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function a(e){return null!=e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function i(e,t){var r=e;if(t)for(var n in t)r[n]=t[n];return r}function s(e){var n="[A-Za-z]",o="[0-9]",a=t(o,"[A-Fa-f]"),i=r(r("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+r("%[89A-Fa-f]"+a+"%"+a+a)+"|"+r("%"+a+a)),s="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",c=t("[\\:\\/\\?\\#\\[\\]\\@]",s),u=e?"[\\uE000-\\uF8FF]":"[]",l=t(n,o,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");r(n+t(n,o,"[\\+\\-\\.]")+"*"),r(r(i+"|"+t(l,s,"[\\:]"))+"*");var p=r(r("25[0-5]")+"|"+r("2[0-4]"+o)+"|"+r("1"+o+o)+"|"+r("0?[1-9]"+o)+"|0?0?"+o),f=r(p+"\\."+p+"\\."+p+"\\."+p),h=r(a+"{1,4}"),d=r(r(h+"\\:"+h)+"|"+f),v=r(r(h+"\\:")+"{6}"+d),y=r("\\:\\:"+r(h+"\\:")+"{5}"+d),g=r(r(h)+"?\\:\\:"+r(h+"\\:")+"{4}"+d),m=r(r(r(h+"\\:")+"{0,1}"+h)+"?\\:\\:"+r(h+"\\:")+"{3}"+d),b=r(r(r(h+"\\:")+"{0,2}"+h)+"?\\:\\:"+r(h+"\\:")+"{2}"+d),w=r(r(r(h+"\\:")+"{0,3}"+h)+"?\\:\\:"+h+"\\:"+d),E=r(r(r(h+"\\:")+"{0,4}"+h)+"?\\:\\:"+d),x=r(r(r(h+"\\:")+"{0,5}"+h)+"?\\:\\:"+h),S=r(r(r(h+"\\:")+"{0,6}"+h)+"?\\:\\:"),O=r([v,y,g,m,b,w,E,x,S].join("|")),C=r(r(l+"|"+i)+"+");r("[vV]"+a+"+\\."+t(l,s,"[\\:]")+"+"),r(r(i+"|"+t(l,s))+"*");var A=r(i+"|"+t(l,s,"[\\:\\@]"));return r(r(i+"|"+t(l,s,"[\\@]"))+"+"),r(r(A+"|"+t("[\\/\\?]",u))+"*"),{NOT_SCHEME:new RegExp(t("[^]",n,o,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(t("[^\\%\\:]",l,s),"g"),NOT_HOST:new RegExp(t("[^\\%\\[\\]\\:]",l,s),"g"),NOT_PATH:new RegExp(t("[^\\%\\/\\:\\@]",l,s),"g"),NOT_PATH_NOSCHEME:new RegExp(t("[^\\%\\/\\@]",l,s),"g"),NOT_QUERY:new RegExp(t("[^\\%]",l,s,"[\\:\\@\\/\\?]",u),"g"),NOT_FRAGMENT:new RegExp(t("[^\\%]",l,s,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(t("[^]",l,s),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(t("[^\\%]",l,c),"g"),PCT_ENCODED:new RegExp(i,"g"),IPV4ADDRESS:new RegExp("^("+f+")$"),IPV6ADDRESS:new RegExp("^\\[?("+O+")"+r(r("\\%25|\\%(?!"+a+"{2})")+"("+C+")")+"?\\]?$")}}var c=s(!1),u=s(!0),l=function(){function e(e,t){var r=[],n=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(n=(i=s.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(o)throw a}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),p=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)},f=2147483647,h=36,d=1,v=26,y=38,g=700,m=72,b=128,w="-",E=/^xn--/,x=/[^\0-\x7E]/,S=/[\x2E\u3002\uFF0E\uFF61]/g,O={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},C=h-d,A=Math.floor,k=String.fromCharCode;function T(e){throw new RangeError(O[e])}function j(e,t){for(var r=[],n=e.length;n--;)r[n]=t(e[n]);return r}function I(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+j((e=e.replace(S,".")).split("."),t).join(".")}function $(e){for(var t=[],r=0,n=e.length;r<n;){var o=e.charCodeAt(r++);if(o>=55296&&o<=56319&&r<n){var a=e.charCodeAt(r++);56320==(64512&a)?t.push(((1023&o)<<10)+(1023&a)+65536):(t.push(o),r--)}else t.push(o)}return t}var R=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:h},P=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},N=function(e,t,r){var n=0;for(e=r?A(e/g):e>>1,e+=A(e/t);e>C*v>>1;n+=h)e=A(e/C);return A(n+(C+1)*e/(e+y))},D=function(e){var t=[],r=e.length,n=0,o=b,a=m,i=e.lastIndexOf(w);i<0&&(i=0);for(var s=0;s<i;++s)e.charCodeAt(s)>=128&&T("not-basic"),t.push(e.charCodeAt(s));for(var c=i>0?i+1:0;c<r;){for(var u=n,l=1,p=h;;p+=h){c>=r&&T("invalid-input");var y=R(e.charCodeAt(c++));(y>=h||y>A((f-n)/l))&&T("overflow"),n+=y*l;var g=p<=a?d:p>=a+v?v:p-a;if(y<g)break;var E=h-g;l>A(f/E)&&T("overflow"),l*=E}var x=t.length+1;a=N(n-u,x,0==u),A(n/x)>f-o&&T("overflow"),o+=A(n/x),n%=x,t.splice(n++,0,o)}return String.fromCodePoint.apply(String,t)},_=function(e){var t=[],r=(e=$(e)).length,n=b,o=0,a=m,i=!0,s=!1,c=void 0;try{for(var u,l=e[Symbol.iterator]();!(i=(u=l.next()).done);i=!0){var p=u.value;p<128&&t.push(k(p))}}catch(e){s=!0,c=e}finally{try{!i&&l.return&&l.return()}finally{if(s)throw c}}var y=t.length,g=y;for(y&&t.push(w);g<r;){var E=f,x=!0,S=!1,O=void 0;try{for(var C,j=e[Symbol.iterator]();!(x=(C=j.next()).done);x=!0){var I=C.value;I>=n&&I<E&&(E=I)}}catch(e){S=!0,O=e}finally{try{!x&&j.return&&j.return()}finally{if(S)throw O}}var R=g+1;E-n>A((f-o)/R)&&T("overflow"),o+=(E-n)*R,n=E;var D=!0,_=!1,F=void 0;try{for(var q,U=e[Symbol.iterator]();!(D=(q=U.next()).done);D=!0){var z=q.value;if(z<n&&++o>f&&T("overflow"),z==n){for(var L=o,H=h;;H+=h){var V=H<=a?d:H>=a+v?v:H-a;if(L<V)break;var M=L-V,B=h-V;t.push(k(P(V+M%B,0))),L=A(M/B)}t.push(k(P(L,0))),a=N(o,R,g==y),o=0,++g}}}catch(e){_=!0,F=e}finally{try{!D&&U.return&&U.return()}finally{if(_)throw F}}++o,++n}return t.join("")},F=function(e){return I(e,(function(e){return E.test(e)?D(e.slice(4).toLowerCase()):e}))},q=function(e){return I(e,(function(e){return x.test(e)?"xn--"+_(e):e}))},U={version:"2.1.0",ucs2:{decode:$,encode:function(e){return String.fromCodePoint.apply(String,p(e))}},decode:D,encode:_,toASCII:q,toUnicode:F},z={};function L(e){var t=e.charCodeAt(0);return t<16?"%0"+t.toString(16).toUpperCase():t<128?"%"+t.toString(16).toUpperCase():t<2048?"%"+(t>>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function H(e){for(var t="",r=0,n=e.length;r<n;){var o=parseInt(e.substr(r+1,2),16);if(o<128)t+=String.fromCharCode(o),r+=3;else if(o>=194&&o<224){if(n-r>=6){var a=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((31&o)<<6|63&a)}else t+=e.substr(r,6);r+=6}else if(o>=224){if(n-r>=9){var i=parseInt(e.substr(r+4,2),16),s=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&s)}else t+=e.substr(r,9);r+=9}else t+=e.substr(r,3),r+=3}return t}function V(e,t){function r(e){var r=H(e);return r.match(t.UNRESERVED)?r:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,r).replace(t.NOT_USERINFO,L).replace(t.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_HOST,L).replace(t.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,r).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,L).replace(t.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,r).replace(t.NOT_QUERY,L).replace(t.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,r).replace(t.NOT_FRAGMENT,L).replace(t.PCT_ENCODED,o)),e}function M(e){return e.replace(/^0*(.*)/,"$1")||"0"}function B(e,t){var r=e.match(t.IPV4ADDRESS)||[],n=l(r,2)[1];return n?n.split(".").map(M).join("."):e}function J(e,t){var r=e.match(t.IPV6ADDRESS)||[],n=l(r,3),o=n[1],a=n[2];if(o){for(var i=o.toLowerCase().split("::").reverse(),s=l(i,2),c=s[0],u=s[1],p=u?u.split(":").map(M):[],f=c.split(":").map(M),h=t.IPV4ADDRESS.test(f[f.length-1]),d=h?7:8,v=f.length-d,y=Array(d),g=0;g<d;++g)y[g]=p[g]||f[v+g]||"";h&&(y[d-1]=B(y[d-1],t));var m=y.reduce((function(e,t,r){if(!t||"0"===t){var n=e[e.length-1];n&&n.index+n.length===r?n.length++:e.push({index:r,length:1})}return e}),[]).sort((function(e,t){return t.length-e.length}))[0],b=void 0;if(m&&m.length>1){var w=y.slice(0,m.index),E=y.slice(m.index+m.length);b=w.join(":")+"::"+E.join(":")}else b=y.join(":");return a&&(b+="%"+a),b}return e}var K=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,G=void 0==="".match(/(){0}/)[1];function Z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={},n=!1!==t.iri?u:c;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var o=e.match(K);if(o){G?(r.scheme=o[1],r.userinfo=o[3],r.host=o[4],r.port=parseInt(o[5],10),r.path=o[6]||"",r.query=o[7],r.fragment=o[8],isNaN(r.port)&&(r.port=o[5])):(r.scheme=o[1]||void 0,r.userinfo=-1!==e.indexOf("@")?o[3]:void 0,r.host=-1!==e.indexOf("//")?o[4]:void 0,r.port=parseInt(o[5],10),r.path=o[6]||"",r.query=-1!==e.indexOf("?")?o[7]:void 0,r.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(r.port)&&(r.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),r.host&&(r.host=J(B(r.host,n),n)),void 0!==r.scheme||void 0!==r.userinfo||void 0!==r.host||void 0!==r.port||r.path||void 0!==r.query?void 0===r.scheme?r.reference="relative":void 0===r.fragment?r.reference="absolute":r.reference="uri":r.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==r.reference&&(r.error=r.error||"URI is not a "+t.reference+" reference.");var a=z[(t.scheme||r.scheme||"").toLowerCase()];if(t.unicodeSupport||a&&a.unicodeSupport)V(r,n);else{if(r.host&&(t.domainHost||a&&a.domainHost))try{r.host=U.toASCII(r.host.replace(n.PCT_ENCODED,H).toLowerCase())}catch(e){r.error=r.error||"Host's domain name can not be converted to ASCII via punycode: "+e}V(r,c)}a&&a.parse&&a.parse(r,t)}else r.error=r.error||"URI can not be parsed.";return r}function W(e,t){var r=!1!==t.iri?u:c,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(J(B(String(e.host),r),r).replace(r.IPV6ADDRESS,(function(e,t,r){return"["+t+(r?"%25"+r:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}var Q=/^\.\.?\//,Y=/^\/\.(\/|$)/,X=/^\/\.\.(\/|$)/,ee=/^\/?(?:.|\n)*?(?=\/|$)/;function te(e){for(var t=[];e.length;)if(e.match(Q))e=e.replace(Q,"");else if(e.match(Y))e=e.replace(Y,"/");else if(e.match(X))e=e.replace(X,"/"),t.pop();else if("."===e||".."===e)e="";else{var r=e.match(ee);if(!r)throw new Error("Unexpected dot segment condition");var n=r[0];e=e.slice(n.length),t.push(n)}return t.join("")}function re(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.iri?u:c,n=[],o=z[(t.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,t),e.host)if(r.IPV6ADDRESS.test(e.host));else if(t.domainHost||o&&o.domainHost)try{e.host=t.iri?U.toUnicode(e.host):U.toASCII(e.host.replace(r.PCT_ENCODED,H).toLowerCase())}catch(r){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+r}V(e,r),"suffix"!==t.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var a=W(e,t);if(void 0!==a&&("suffix"!==t.reference&&n.push("//"),n.push(a),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var i=e.path;t.absolutePath||o&&o.absolutePath||(i=te(i)),void 0===a&&(i=i.replace(/^\/\//,"/%2F")),n.push(i)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function ne(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=Z(re(e,r),r),t=Z(re(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=te(t.path||""),n.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=te(t.path||""),n.query=t.query):(t.path?("/"===t.path.charAt(0)?n.path=te(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path:n.path="/"+t.path,n.path=te(n.path)),n.query=t.query):(n.path=e.path,void 0!==t.query?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function oe(e,t,r){var n=i({scheme:"null"},r);return re(ne(Z(e,n),Z(t,n),n,!0),n)}function ae(e,t){return"string"==typeof e?e=re(Z(e,t),t):"object"===n(e)&&(e=Z(re(e,t),t)),e}function ie(e,t,r){return"string"==typeof e?e=re(Z(e,r),r):"object"===n(e)&&(e=re(e,r)),"string"==typeof t?t=re(Z(t,r),r):"object"===n(t)&&(t=re(t,r)),e===t}function se(e,t){return e&&e.toString().replace(t&&t.iri?u.ESCAPE:c.ESCAPE,L)}function ce(e,t){return e&&e.toString().replace(t&&t.iri?u.PCT_ENCODED:c.PCT_ENCODED,H)}var ue={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){var r="https"===String(e.scheme).toLowerCase();return e.port!==(r?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},le={scheme:"https",domainHost:ue.domainHost,parse:ue.parse,serialize:ue.serialize};function pe(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var fe={scheme:"ws",domainHost:!0,parse:function(e,t){var r=e;return r.secure=pe(r),r.resourceName=(r.path||"/")+(r.query?"?"+r.query:""),r.path=void 0,r.query=void 0,r},serialize:function(e,t){if(e.port!==(pe(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var r=e.resourceName.split("?"),n=l(r,2),o=n[0],a=n[1];e.path=o&&"/"!==o?o:void 0,e.query=a,e.resourceName=void 0}return e.fragment=void 0,e}},he={scheme:"wss",domainHost:fe.domainHost,parse:fe.parse,serialize:fe.serialize},de={},ve="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ye="[0-9A-Fa-f]",ge=r(r("%[EFef]"+ye+"%"+ye+ye+"%"+ye+ye)+"|"+r("%[89A-Fa-f]"+ye+"%"+ye+ye)+"|"+r("%"+ye+ye)),me="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",be=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),we="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Ee=new RegExp(ve,"g"),xe=new RegExp(ge,"g"),Se=new RegExp(t("[^]",me,"[\\.]",'[\\"]',be),"g"),Oe=new RegExp(t("[^]",ve,we),"g"),Ce=Oe;function Ae(e){var t=H(e);return t.match(Ee)?t:e}var ke={scheme:"mailto",parse:function(e,t){var r=e,n=r.to=r.path?r.path.split(","):[];if(r.path=void 0,r.query){for(var o=!1,a={},i=r.query.split("&"),s=0,c=i.length;s<c;++s){var u=i[s].split("=");switch(u[0]){case"to":for(var l=u[1].split(","),p=0,f=l.length;p<f;++p)n.push(l[p]);break;case"subject":r.subject=ce(u[1],t);break;case"body":r.body=ce(u[1],t);break;default:o=!0,a[ce(u[0],t)]=ce(u[1],t)}}o&&(r.headers=a)}r.query=void 0;for(var h=0,d=n.length;h<d;++h){var v=n[h].split("@");if(v[0]=ce(v[0]),t.unicodeSupport)v[1]=ce(v[1],t).toLowerCase();else try{v[1]=U.toASCII(ce(v[1],t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[h]=v.join("@")}return r},serialize:function(e,t){var r=e,n=a(e.to);if(n){for(var i=0,s=n.length;i<s;++i){var c=String(n[i]),u=c.lastIndexOf("@"),l=c.slice(0,u).replace(xe,Ae).replace(xe,o).replace(Se,L),p=c.slice(u+1);try{p=t.iri?U.toUnicode(p):U.toASCII(ce(p,t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+e}n[i]=l+"@"+p}r.path=n.join(",")}var f=e.headers=e.headers||{};e.subject&&(f.subject=e.subject),e.body&&(f.body=e.body);var h=[];for(var d in f)f[d]!==de[d]&&h.push(d.replace(xe,Ae).replace(xe,o).replace(Oe,L)+"="+f[d].replace(xe,Ae).replace(xe,o).replace(Ce,L));return h.length&&(r.query=h.join("&")),r}},Te=/^([^\:]+)\:(.*)/,je={scheme:"urn",parse:function(e,t){var r=e.path&&e.path.match(Te),n=e;if(r){var o=t.scheme||n.scheme||"urn",a=r[1].toLowerCase(),i=r[2],s=o+":"+(t.nid||a),c=z[s];n.nid=a,n.nss=i,n.path=void 0,c&&(n=c.parse(n,t))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,t){var r=t.scheme||e.scheme||"urn",n=e.nid,o=r+":"+(t.nid||n),a=z[o];a&&(e=a.serialize(e,t));var i=e,s=e.nss;return i.path=(n||t.nid)+":"+s,i}},Ie=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,$e={scheme:"urn:uuid",parse:function(e,t){var r=e;return r.uuid=r.nss,r.nss=void 0,t.tolerant||r.uuid&&r.uuid.match(Ie)||(r.error=r.error||"UUID is not valid."),r},serialize:function(e,t){var r=e;return r.nss=(e.uuid||"").toLowerCase(),r}};z[ue.scheme]=ue,z[le.scheme]=le,z[fe.scheme]=fe,z[he.scheme]=he,z[ke.scheme]=ke,z[je.scheme]=je,z[$e.scheme]=$e,e.SCHEMES=z,e.pctEncChar=L,e.pctDecChars=H,e.parse=Z,e.removeDotSegments=te,e.serialize=re,e.resolveComponents=ne,e.resolve=oe,e.normalize=ae,e.equal=ie,e.escapeComponent=se,e.unescapeComponent=ce,Object.defineProperty(e,"__esModule",{value:!0})}(a.exports);const i=a.exports,s={null:e=>null===e,boolean:e=>"boolean"==typeof e,object:e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,array:e=>Array.isArray(e),number:e=>"number"==typeof e,integer:e=>Number.isInteger(e),string:e=>"string"==typeof e};var c={jsonTypeOf:(e,t)=>s[t](e),resolveUrl:(e,t)=>{const r=i.resolve(e,t,{iri:!0});if(i.resolve(e,"",{iri:!0})&&"file"===i.parse(r).scheme&&"file"!==i.parse(e).scheme)throw Error(`Can't access file '${r}' resource from network context '${e}'`);return r},urlFragment:e=>i.unescapeComponent(i.parse(e).fragment)||"",pathRelative:(e,t)=>{if(e===t)return"";let r=1;const n=e.length-1,o=t.length-r,a=n<o?n:o;let i=-1,s=0;for(;s<a;s++){const n=e.charCodeAt(s+1);if(n!==t.charCodeAt(r+s))break;47===n&&(i=s)}if(o>a){if(47===t.charCodeAt(r+s))return t.slice(r+s+1);if(0===s)return t.slice(r+s)}n>a&&(47===e.charCodeAt(s+1)?i=s:0===a&&(i=0));let c="";for(s=i+2;s<=e.length;++s)s!==e.length&&47!==e.charCodeAt(s)||(c+=0===c.length?"..":"/..");return r+=i,c.length>0?`${c}${t.slice(r,t.length)}`:(47===t.charCodeAt(r)&&++r,t.slice(r,t.length))}};const u=t,l=e=>{if(e.length>0&&"/"!==e[0])throw Error("Invalid JSON Pointer");return e.split("/").slice(1).map(g)},p=(e,t,r,n)=>{if(0===e.length)return r;if(e.length>1){if(Array.isArray(t)){const o=e.shift(),a=[...t];return a[o]=p(e,b(t,o,n),r,v(o,n)),a}{const o=e.shift();return{...t,[o]:p(e,b(t,o,n),r,v(o,n))}}}if(Array.isArray(t)){const n=[...t];return n[m(t,e[0])]=r,n}return"object"==typeof t&&null!==t?{...t,[e[0]]:r}:b(t,e[0],n)},f=(e,t,r,n)=>{if(0!==e.length)if(1!==e.length||w(t)){const o=e.shift();f(e,b(t,o,n),r,v(o,n))}else{t[m(t,e[0])]=r}},h=(e,t,r)=>{if(0!=e.length){if(e.length>1){const n=e.shift(),o=b(t,n,r);return{...t,[n]:h(e,o,v(n,r))}}if(Array.isArray(t))return t.filter(((t,r)=>r!=e[0]));if("object"==typeof t&&null!==t){const{[e[0]]:r,...n}=t;return n}return b(t,e[0],r)}},d=(e,t,r)=>{if(0!==e.length)if(e.length>1){const n=e.shift(),o=b(t,n,r);d(e,o,v(n,r))}else Array.isArray(t)?t.splice(e[0],1):"object"==typeof t&&null!==t?delete t[e[0]]:b(t,e[0],r)},v=u(((e,t)=>t+"/"+y(e))),y=e=>e.toString().replace(/~/g,"~0").replace(/\//g,"~1"),g=e=>e.toString().replace(/~1/g,"/").replace(/~0/g,"~"),m=(e,t)=>Array.isArray(e)&&"-"===t?e.length:t,b=(e,t,r="")=>{if(void 0===e)throw TypeError(`Value at '${r}' is undefined and does not have property '${t}'`);if(null===e)throw TypeError(`Value at '${r}' is null and does not have property '${t}'`);if(w(e))throw TypeError(`Value at '${r}' is a ${typeof e} and does not have property '${t}'`);return e[m(e,t)]},w=e=>null===e||"object"!=typeof e;var E={nil:"",append:v,get:(e,t)=>{const r=l(e),n=e=>r.reduce((([e,t],r)=>[b(e,r,t),v(r,t)]),[e,""])[0];return void 0===t?n:n(t)},set:(e,t,r)=>{const n=l(e),o=u(((e,t)=>p(n,e,t,"")));return void 0===t?o:o(t,r)},assign:(e,t,r)=>{const n=l(e),o=u(((e,t)=>f(n,e,t,"")));return void 0===t?o:o(t,r)},unset:(e,t)=>{const r=l(e),n=e=>h(r,e,"");return void 0===t?n:n(t)},remove:(e,t)=>{const r=l(e),n=e=>d(r,e,"");return void 0===t?n:n(t)}};const x=Symbol("$__value"),S=Symbol("$__href");var O={cons:(e,t)=>Object.freeze({[S]:e,[x]:t}),isReference:e=>e&&void 0!==e[S],href:e=>e[S],value:e=>e[x]};const C=E,A=t,{resolveUrl:k,jsonTypeOf:T}=c,j=O,I=Object.freeze({id:"",pointer:"",instance:void 0,value:void 0}),$=e=>j.isReference(e.value)?j.value(e.value):e.value,R=A(((e,t)=>T($(e),t))),P=(e,t)=>Object.freeze({...t,pointer:C.append(e,t.pointer),value:$(t)[e]}),N=A(((e,t)=>$(t).map(((r,n,o,a)=>e(P(n,t),n,o,a))))),D=A(((e,t)=>$(t).forEach(((r,n,o,a)=>e(P(n,t),n,o,a))))),_=A(((e,t)=>$(t).map(((e,r,n,o)=>P(r,t))).filter(((t,r,n,o)=>e(t,r,n,o))))),F=A(((e,t,r)=>$(r).reduce(((t,n,o)=>e(t,P(o,r),o)),t))),q=A(((e,t)=>$(t).every(((r,n,o,a)=>e(P(n,t),n,o,a))))),U=A(((e,t)=>$(t).some(((r,n,o,a)=>e(P(n,t),n,o,a)))));var z={nil:I,cons:(e,t="")=>Object.freeze({...I,id:k(t,""),instance:e,value:e}),get:(e,t=I)=>{if(!e.startsWith("#"))throw Error(`No JSON document found at '${e.split("#")[0]}'`);return Object.freeze({...t,pointer:e.substr(1)})},uri:e=>`${e.id}#${encodeURI(e.pointer)}`,value:$,has:(e,t)=>e in $(t),typeOf:R,length:e=>$(e).length,step:P,entries:e=>Object.keys($(e)).map((t=>[t,P(t,e)])),keys:e=>Object.keys($(e)),map:N,forEach:D,filter:_,reduce:F,every:q,some:U},L=async e=>Object.entries(await e),H=function(e,t){return function r(){null==t&&(t=e.length);var n=[].slice.call(arguments);return n.length>=t?e.apply(this,n):function(){return r.apply(this,n.concat([].slice.call(arguments)))}}};var V=H((async(e,t)=>(await t).map(e)));var M=H((async(e,t,r)=>(await r).reduce((async(t,r)=>e(await t,r)),t)));const B=M;var J=H((async(e,t,r={})=>B((async(t,r)=>await e(r)?t.concat([r]):t),[],t,r)));const K=V;var G=H((async(e,t)=>{const r=await K(e,t);return(await Promise.all(r)).some((e=>e))}));const Z=V;var W=H((async(e,t)=>{const r=await Z(e,t);return(await Promise.all(r)).every((e=>e))}));var Q=H(((e,t)=>e.reduce((async(e,t)=>t(await e)),t)));const Y=Q,X=L,ee=M;var te={entries:L,map:V,filter:J,reduce:M,some:G,every:W,pipeline:Q,all:e=>Promise.all(e),allValues:e=>Y([X,ee((async(e,[t,r])=>(e[t]=await r,e)),{})],e)},re={exports:{}};!function(t){var r,n;r=e,n=function(){var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r="boolean"==typeof(new RegExp).sticky;function n(e){return e&&"[object RegExp]"===t.call(e)}function o(e){return e&&"object"==typeof e&&!n(e)&&!Array.isArray(e)}function a(e){return"("+e+")"}function i(e){return e.length?"(?:"+e.map((function(e){return"(?:"+e+")"})).join("|")+")":"(?!)"}function s(e){if("string"==typeof e)return"(?:"+e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+")";if(n(e)){if(e.ignoreCase)throw new Error("RegExp /i flag not allowed");if(e.global)throw new Error("RegExp /g flag is implied");if(e.sticky)throw new Error("RegExp /y flag is implied");if(e.multiline)throw new Error("RegExp /m flag is implied");return e.source}throw new Error("Not a pattern: "+e)}function c(t,r){if(o(r)||(r={match:r}),r.include)throw new Error("Matching rules cannot also include states");var a={defaultType:t,lineBreaks:!!r.error||!!r.fallback,pop:!1,next:null,push:null,error:!1,fallback:!1,value:null,type:null,shouldThrow:!1};for(var i in r)e.call(r,i)&&(a[i]=r[i]);if("string"==typeof a.type&&t!==a.type)throw new Error("Type transform cannot be a string (type '"+a.type+"' for token '"+t+"')");var s=a.match;return a.match=Array.isArray(s)?s:s?[s]:[],a.match.sort((function(e,t){return n(e)&&n(t)?0:n(t)?-1:n(e)?1:t.length-e.length})),a}function u(e){return Array.isArray(e)?function(e){for(var t=[],r=0;r<e.length;r++){var n=e[r];if(n.include)for(var o=[].concat(n.include),a=0;a<o.length;a++)t.push({include:o[a]});else{if(!n.type)throw new Error("Rule has no type: "+JSON.stringify(n));t.push(c(n.type,n))}}return t}(e):function(e){for(var t=Object.getOwnPropertyNames(e),r=[],n=0;n<t.length;n++){var a=t[n],i=e[a],s=[].concat(i);if("include"!==a){var u=[];s.forEach((function(e){o(e)?(u.length&&r.push(c(a,u)),r.push(c(a,e)),u=[]):u.push(e)})),u.length&&r.push(c(a,u))}else for(var l=0;l<s.length;l++)r.push({include:s[l]})}return r}(e)}var l=c("error",{lineBreaks:!0,shouldThrow:!0});function p(e,t){for(var o=null,c=Object.create(null),u=!0,p=null,f=[],h=[],d=0;d<e.length;d++)e[d].fallback&&(u=!1);for(d=0;d<e.length;d++){var v=e[d];if(v.include)throw new Error("Inheritance is not allowed in stateless lexers");if(v.error||v.fallback){if(o)throw!v.fallback==!o.fallback?new Error("Multiple "+(v.fallback?"fallback":"error")+" rules not allowed (for token '"+v.defaultType+"')"):new Error("fallback and error are mutually exclusive (for token '"+v.defaultType+"')");o=v}var y=v.match.slice();if(u)for(;y.length&&"string"==typeof y[0]&&1===y[0].length;)c[y.shift().charCodeAt(0)]=v;if(v.pop||v.push||v.next){if(!t)throw new Error("State-switching options are not allowed in stateless lexers (for token '"+v.defaultType+"')");if(v.fallback)throw new Error("State-switching options are not allowed on fallback tokens (for token '"+v.defaultType+"')")}if(0!==y.length){u=!1,f.push(v);for(var g=0;g<y.length;g++){var m=y[g];if(n(m))if(null===p)p=m.unicode;else if(p!==m.unicode&&!1===v.fallback)throw new Error("If one rule is /u then all must be")}var b=i(y.map(s)),w=new RegExp(b);if(w.test(""))throw new Error("RegExp matches empty string: "+w);if(new RegExp("|"+b).exec("").length-1>0)throw new Error("RegExp has capture groups: "+w+"\nUse (?: … ) instead");if(!v.lineBreaks&&w.test("\n"))throw new Error("Rule should declare lineBreaks: "+w);h.push(a(b))}}var E=o&&o.fallback,x=r&&!E?"ym":"gm",S=r||E?"":"|";return!0===p&&(x+="u"),{regexp:new RegExp(i(h)+S,x),groups:f,fast:c,error:o||l}}function f(e,t,r){var n=e&&(e.push||e.next);if(n&&!r[n])throw new Error("Missing state '"+n+"' (in token '"+e.defaultType+"' of state '"+t+"')");if(e&&e.pop&&1!=+e.pop)throw new Error("pop must be 1 (in token '"+e.defaultType+"' of state '"+t+"')")}var h=function(e,t){this.startState=t,this.states=e,this.buffer="",this.stack=[],this.reset()};h.prototype.reset=function(e,t){return this.buffer=e||"",this.index=0,this.line=t?t.line:1,this.col=t?t.col:1,this.queuedToken=t?t.queuedToken:null,this.queuedThrow=t?t.queuedThrow:null,this.setState(t?t.state:this.startState),this.stack=t&&t.stack?t.stack.slice():[],this},h.prototype.save=function(){return{line:this.line,col:this.col,state:this.state,stack:this.stack.slice(),queuedToken:this.queuedToken,queuedThrow:this.queuedThrow}},h.prototype.setState=function(e){if(e&&this.state!==e){this.state=e;var t=this.states[e];this.groups=t.groups,this.error=t.error,this.re=t.regexp,this.fast=t.fast}},h.prototype.popState=function(){this.setState(this.stack.pop())},h.prototype.pushState=function(e){this.stack.push(this.state),this.setState(e)};var d=r?function(e,t){return e.exec(t)}:function(e,t){var r=e.exec(t);return 0===r[0].length?null:r};function v(){return this.value}if(h.prototype._getGroup=function(e){for(var t=this.groups.length,r=0;r<t;r++)if(void 0!==e[r+1])return this.groups[r];throw new Error("Cannot find token type for matched text")},h.prototype.next=function(){var e=this.index;if(this.queuedGroup){var t=this._token(this.queuedGroup,this.queuedText,e);return this.queuedGroup=null,this.queuedText="",t}var r=this.buffer;if(e!==r.length){if(i=this.fast[r.charCodeAt(e)])return this._token(i,r.charAt(e),e);var n=this.re;n.lastIndex=e;var o=d(n,r),a=this.error;if(null==o)return this._token(a,r.slice(e,r.length),e);var i=this._getGroup(o),s=o[0];return a.fallback&&o.index!==e?(this.queuedGroup=i,this.queuedText=s,this._token(a,r.slice(e,o.index),e)):this._token(i,s,e)}},h.prototype._token=function(e,t,r){var n=0;if(e.lineBreaks){var o=/\n/g,a=1;if("\n"===t)n=1;else for(;o.exec(t);)n++,a=o.lastIndex}var i={type:"function"==typeof e.type&&e.type(t)||e.defaultType,value:"function"==typeof e.value?e.value(t):t,text:t,toString:v,offset:r,lineBreaks:n,line:this.line,col:this.col},s=t.length;if(this.index+=s,this.line+=n,0!==n?this.col=s-a+1:this.col+=s,e.shouldThrow)throw new Error(this.formatError(i,"invalid syntax"));return e.pop?this.popState():e.push?this.pushState(e.push):e.next&&this.setState(e.next),i},"undefined"!=typeof Symbol&&Symbol.iterator){var y=function(e){this.lexer=e};y.prototype.next=function(){var e=this.lexer.next();return{value:e,done:!e}},y.prototype[Symbol.iterator]=function(){return this},h.prototype[Symbol.iterator]=function(){return new y(this)}}return h.prototype.formatError=function(e,t){if(null==e){var r=this.buffer.slice(this.index);e={text:r,offset:this.index,lineBreaks:-1===r.indexOf("\n")?0:1,line:this.line,col:this.col}}var n=Math.max(0,e.offset-e.col+1),o=e.lineBreaks?e.text.indexOf("\n"):e.text.length,a=this.buffer.substring(n,e.offset+o);return t+=" at line "+e.line+" col "+e.col+":\n\n",t+=" "+a+"\n",t+=" "+Array(e.col).join(" ")+"^"},h.prototype.clone=function(){return new h(this.states,this.state)},h.prototype.has=function(e){return!0},{compile:function(e){var t=p(u(e));return new h({start:t},"start")},states:function(e,t){var r=e.$all?u(e.$all):[];delete e.$all;var n=Object.getOwnPropertyNames(e);t||(t=n[0]);for(var o=Object.create(null),a=0;a<n.length;a++)o[b=n[a]]=u(e[b]).concat(r);for(a=0;a<n.length;a++)for(var i=o[b=n[a]],s=Object.create(null),c=0;c<i.length;c++){var l=i[c];if(l.include){var d=[c,1];if(l.include!==b&&!s[l.include]){s[l.include]=!0;var v=o[l.include];if(!v)throw new Error("Cannot include nonexistent state '"+l.include+"' (in state '"+b+"')");for(var y=0;y<v.length;y++){var g=v[y];-1===i.indexOf(g)&&d.push(g)}}i.splice.apply(i,d),c--}}var m=Object.create(null);for(a=0;a<n.length;a++){var b;m[b=n[a]]=p(o[b],!0)}for(a=0;a<n.length;a++){var w=n[a],E=m[w],x=E.groups;for(c=0;c<x.length;c++)f(x[c],w,m);var S=Object.getOwnPropertyNames(E.fast);for(c=0;c<S.length;c++)f(E.fast[S[c]],w,m)}return new h(m,t)},error:Object.freeze({error:!0}),fallback:Object.freeze({fallback:!0}),keywords:function(e){for(var t=Object.create(null),r=Object.create(null),n=Object.getOwnPropertyNames(e),o=0;o<n.length;o++){var a=n[o],i=e[a];(Array.isArray(i)?i:[i]).forEach((function(e){if((r[e.length]=r[e.length]||[]).push(e),"string"!=typeof e)throw new Error("keyword must be string (in keyword '"+a+"')");t[e]=a}))}function s(e){return JSON.stringify(e)}var c="";for(var u in c+="switch (value.length) {\n",r){var l=r[u];c+="case "+u+":\n",c+="switch (value) {\n",l.forEach((function(e){var r=t[e];c+="case "+s(e)+": return "+s(r)+"\n"})),c+="}\n"}return c+="}\n",Function("value",c)}}},t.exports?t.exports=n():r.moo=n()}(re);const ne=re.exports;const oe=E,ae=e=>{const t=ne.states({main:{WS:{match:new RegExp("(?:(?:\\r?\\n)|[ \\t])+","u"),lineBreaks:!0},true:{match:"true",value:()=>!0},false:{match:"false",value:()=>!1},null:{match:"null",value:()=>null},number:{match:new RegExp("-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?:[eE][-+]?[0-9]+)?","u"),value:parseFloat},string:{match:new RegExp('"(?:[\\x20-\\x21\\x23-\\x5b\\x5d-\\u{10ffff}]|\\\\(?:["\\/\\\\brfnt]|u[0-9a-fA-F]{4}))*"',"u"),value:JSON.parse},"{":"{","}":"}","[":"[","]":"]",":":":",",":",",error:ne.error}});t.reset(e);const r=()=>{let e;do{if(e=t.next(),"error"===e?.type)throw SyntaxError(t.formatError(e,"Unrecognized token"))}while("WS"===e?.type);return e};let n,o=r();const a={offset:0,line:1,col:0,text:""};return{next:e=>{if(n=o,o=r(),e&&n?.type!==e)throw SyntaxError(t.formatError(n,`Expected a '${e}'`));return n},peek:()=>o,syntaxError:e=>{const r=n||a,o={...r,offset:r.offset+r.text.length,col:r.col+r.text.length};throw new SyntaxError(t.formatError(o,e))}}},ie=(e,t)=>t,se=(e,t,r,n)=>{let o;const a=e.next();switch(a?.type){case"true":case"false":case"null":case"number":case"string":o=a.value;break;case"{":o=ce(e,t,r,n);break;case"[":o=le(e,t,r,n);break;default:e.syntaxError("Expected a JSON value")}return n(t,o,r)},ce=(e,t,r,n)=>{const o={};return"}"!==e.peek()?.type&&ue(e,t,r,n,o),e.next("}"),o},ue=(e,t,r,n,o)=>{const a=e.next("string").value;e.next(":"),he(e.peek())||e.syntaxError("Expected a JSON value"),o[a]=se(e,a,oe.append(a,r),n),","===e.peek()?.type?(e.next(),ue(e,a,r,n,o)):he(e.peek())&&e.next(",")},le=(e,t,r,n)=>{const o=[];return"]"!==e.peek()?.type&&pe(e,0,r,n,o),e.next("]"),o},pe=(e,t,r,n,o)=>{he(e.peek())||e.syntaxError("Expected a JSON value"),o[t]=se(e,t,oe.append(t,r),n),","===e.peek()?.type?(e.next(),pe(e,t+1,r,n,o)):he(e.peek())&&e.next(",")},fe=new Set(["string","number","true","false","null","[","{"]),he=e=>fe.has(e?.type);var de=(e,t=ie)=>{const r=ae(e),n=se(r,"",oe.nil,t);return r.peek()&&r.syntaxError("A value has been parsed, but more tokens were found"),n};const ve=E,ye=(e,t)=>t,ge=(e,t,r,n,o,a)=>{let i;return e=t(n,e,o),i=Array.isArray(e)?me(e,t,r,o,a):"object"==typeof e&&null!==e?be(e,t,r,o,a):JSON.stringify(e),i},me=(e,t,r,n,o)=>{0===e.length&&(r="");const a=r?`\n${r.repeat(o-1)}`:"";return"["+a+r+e.map(((e,a)=>{const i=ve.append(a,n);return ge(e,t,r,a,i,o+1)})).join(`,${a}${r}`)+a+"]"},be=(e,t,r,n,o)=>{0===Object.keys(e).length&&(r="");const a=r?`\n${r.repeat(o-1)}`:"",i=r?" ":"";return"{"+a+r+Object.entries(e).map((([e,a])=>{const s=ve.append(e,n);return JSON.stringify(e)+":"+i+ge(a,t,r,e,s,o+1)})).join(`,${a}${r}`)+a+"}"};var we=(e,t=ye,r="")=>ge(e,t,r,"",ve.nil,1);var Ee={parse:de,stringify:we},xe=fetch,Se={},Oe=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,Ce=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,Ae=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,ke=/\\([\u000b\u0020-\u00ff])/g,Te=/([\\"])/g,je=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;function Ie(e){var t=String(e);if(Ae.test(t))return t;if(t.length>0&&!Ce.test(t))throw new TypeError("invalid parameter value");return'"'+t.replace(Te,"\\$1")+'"'}function $e(e){this.parameters=Object.create(null),this.type=e}Se.format=function(e){if(!e||"object"!=typeof e)throw new TypeError("argument obj is required");var t=e.parameters,r=e.type;if(!r||!je.test(r))throw new TypeError("invalid type");var n=r;if(t&&"object"==typeof t)for(var o,a=Object.keys(t).sort(),i=0;i<a.length;i++){if(o=a[i],!Ae.test(o))throw new TypeError("invalid parameter name");n+="; "+o+"="+Ie(t[o])}return n},Se.parse=function(e){if(!e)throw new TypeError("argument string is required");var t="object"==typeof e?function(e){var t;"function"==typeof e.getHeader?t=e.getHeader("content-type"):"object"==typeof e.headers&&(t=e.headers&&e.headers["content-type"]);if("string"!=typeof t)throw new TypeError("content-type header is missing from object");return t}(e):e;if("string"!=typeof t)throw new TypeError("argument string is required to be a string");var r=t.indexOf(";"),n=-1!==r?t.substr(0,r).trim():t.trim();if(!je.test(n))throw new TypeError("invalid media type");var o=new $e(n.toLowerCase());if(-1!==r){var a,i,s;for(Oe.lastIndex=r;i=Oe.exec(t);){if(i.index!==r)throw new TypeError("invalid parameter format");r+=i[0].length,a=i[1].toLowerCase(),'"'===(s=i[2])[0]&&(s=s.substr(1,s.length-2).replace(ke,"$1")),o.parameters[a]=s}if(r!==t.length)throw new TypeError("invalid parameter format")}return o};const Re=Se,Pe={};var Ne={addPlugin:(e,t)=>{Pe[e]=t},parse:e=>{const t=Re.parse(e.headers.get("content-type"));if(!(t.type in Pe))throw Error(`${e.url} is not a schema. Found a document with media type: ${t.type}`);return Pe[t.type].parse(e,t.parameters)},getContentType:e=>{for(const t in Pe)if(Pe[t].matcher(e))return t;return"application/octet-stream"}};const De=t,_e=te,Fe=Ee,qe=E,{jsonTypeOf:Ue,resolveUrl:ze,urlFragment:Le,pathRelative:He}=c,Ve=xe,Me=O,Be=Ne,Je="https://json-schema.org/draft/2019-09/vocab/core",Ke="https://json-schema.org/draft/2020-12/vocab/core",Ge={},Ze={},We=(e,t)=>{const r=Ze[e];return Ge[r]?.[t]},Qe={},Ye={},Xe=(e,t="",r="")=>{e=JSON.parse(JSON.stringify(e));const n=ze(t,""),o=ze(e.$schema||r,"");if(!o)throw Error("Couldn't determine schema dialect");if(delete e.$schema,!(o in Ze))if(!0===e?.$vocabulary?.[Je]&&o===et(e,n,Je)[0])Ze[o]=Je;else if(!0===e?.$vocabulary?.[Ke]&&o===et(e,n,Ke)[0])Ze[o]=Ke;else{const e=Qe[o];if(!e)throw Error(`Couldn't determine JSON Schema version for dialect: '${o}'`);!0===e.vocabulary[Je]?Ze[o]=Je:!0===e.vocabulary[Ke]?Ze[o]=Ke:Ze[o]=Ze[e.dialectId]}const[a,i]=et(e,n,Ze[o]);if(!a)throw Error("Couldn't determine an identifier for the schema");const s=We(o,"baseToken");delete e[s],n&&(Ye[n]=a);const c=We(o,"anchorToken");i&&s===c&&(e[c]=c!==s?encodeURI(i):`#${encodeURI(i)}`);const u={},l=We(o,"recursiveAnchorToken");let p;!0===e[l]&&(u[""]=`${a}#`,e[c]="",delete e[l]);const f=We(o,"vocabularyToken");Ue(e[f],"object")?(p=e[f],delete e[f]):p={[Ze[o]]:!0};const h={"":""};return Qe[a]={id:a,dialectId:o,schema:tt(e,a,o,qe.nil,h,u),anchors:h,dynamicAnchors:u,vocabulary:p,validated:!1},a},et=(e,t,r)=>{const n=Ge[r]?.baseToken,o=ze(t,e[n]||"");return[ze(o,""),Le(o)]},tt=(e,t,r,n,o,a)=>{if(Ue(e,"object")){const i="string"==typeof e.$schema?ze(e.$schema,""):r,s=We(i,"embeddedToken"),c=We(i,"anchorToken");if("string"==typeof e[s]&&(s!==c||"#"!==e[s][0])){const n=ze(t,e[s]);return e[We(i,"baseToken")]=n,Xe(e,n,r),Me.cons(e[s],e)}const u=We(r,"anchorToken"),l=We(r,"dynamicAnchorToken");"string"==typeof e[l]&&(a[e[l]]=`${t}#${encodeURI(n)}`,o[e[l]]=n,delete e[l]);const p=We(r,"embeddedToken");if("string"==typeof e[u]){const t=u!==p?e[u]:e[u].slice(1);o[t]=n,delete e[u]}const f=We(r,"jrefToken");if("string"==typeof e[f])return Me.cons(e[f],e);for(const i in e)e[i]=tt(e[i],t,r,qe.append(i,n),o,a);return e}return Array.isArray(e)?e.map(((e,i)=>tt(e,t,r,qe.append(i,n),o,a))):e},rt=e=>Qe[Ye[e]]||Qe[e],nt=Object.freeze({id:"",dialectId:void 0,vocabulary:{},pointer:qe.nil,schema:void 0,value:void 0,anchors:{},dynamicAnchors:{},validated:!0}),ot=async(e,t=nt)=>{const r=ze(st(t),e),n=ze(r,""),o=Le(r);if(!(e=>e in Qe||e in Ye)(n)){const e=await Ve(n,{headers:{Accept:"application/schema+json"}});if(e.status>=400)throw await e.text(),Error(`Failed to retrieve schema with id: ${n}`);const[t,r]=await Be.parse(e);let o;o=t.$schema?ze(t.$schema,""):r?ze(n,r):"",o&&n!==o&&!(o in Ze)&&await ot(o),Xe(t,n,o)}const a=rt(n),i="/"!==o[0]?it(a,o):o,s=Object.freeze({...a,pointer:i,value:qe.get(i,a.schema)});return at(s)},at=e=>Me.isReference(e.value)?ot(Me.href(e.value),e):e,it=(e,t)=>{if(!(t in e.anchors))throw Error(`No such anchor '${encodeURI(e.id)}#${encodeURI(t)}'`);return e.anchors[t]},st=e=>`${e.id}#${encodeURI(e.pointer)}`,ct=e=>Me.isReference(e.value)?Me.value(e.value):e.value,ut=(e,t)=>{const r=rt(t.id),n=Object.freeze({...t,pointer:qe.append(e,t.pointer),value:ct(t)[e],validated:r.validated});return at(n)},lt=De(((e,t)=>_e.pipeline([ct,_e.map((async(r,n)=>e(await ut(n,t),n))),_e.all],t))),pt={parentId:"",parentDialect:"",includeEmbedded:!0},ft=(e,t)=>{if(t.startsWith("file://")){const r=e.slice(7,e.lastIndexOf("/"));return""===e?"":He(r,t.slice(7))}return t};var ht={setConfig:(e,t,r)=>{Ze[e]=e,Ge[e]||(Ge[e]={}),Ge[e][t]=r},getConfig:We,add:Xe,get:ot,markValidated:e=>{Qe[e].validated=!0},uri:st,value:ct,getAnchorPointer:it,typeOf:(e,t)=>Ue(ct(e),t),has:(e,t)=>e in ct(t),step:ut,keys:e=>Object.keys(ct(e)),entries:e=>_e.pipeline([ct,Object.keys,_e.map((async t=>[t,await ut(t,e)])),_e.all],e),map:lt,length:e=>ct(e).length,toSchema:(e,t={})=>{const r={...pt,...t},n=We(e.dialectId,"anchorToken"),o=We(e.dialectId,"dynamicAnchorToken"),a={};for(const t in e.anchors)""===t||e.dynamicAnchors[t]||(a[e.anchors[t]]=t);const i={};for(const t in e.dynamicAnchors){const r=Le(e.dynamicAnchors[t]);i[r]=t}const s=JSON.parse(Fe.stringify(e.schema,((t,s,c)=>{if(Me.isReference(s)){const t=Me.value(s),n="string"==typeof t.$schema?ze(t.$schema,""):e.dialectId,o=We(n,"embeddedToken");return!r.includeEmbedded&&o in t?void 0:Me.value(s)}return c in a&&(s={[n]:a[c],...s}),c in i&&(s={[o]:i[c],...s}),s}))),c=We(e.dialectId,"baseToken"),u=ft(r.parentId,e.id),l=r.parentDialect===e.dialectId?"":e.dialectId;return{...u&&{[c]:u},...l&&{$schema:l},...s}}};class dt extends Error{constructor(e){super("Invalid Schema"),this.name=this.constructor.name,this.output=e}}var vt=dt;const yt=ht;var gt={compile:e=>yt.value(e),interpret:()=>!0};const mt=t,bt=o.exports,{resolveUrl:wt}=c,Et=z,xt=ht,St=vt,Ot=Ne,Ct=gt,At="FLAG",kt="BASIC",Tt="DETAILED",jt="VERBOSE";let It=Tt,$t=!0;Ot.addPlugin("application/schema+json",{parse:async(e,t)=>[await e.json(),t.schema||t.profile],matcher:e=>e.endsWith(".schema.json")});const Rt=async e=>{const t={metaData:{}};return{ast:t,schemaUri:await zt(e,t)}},Pt=mt((({ast:e,schemaUri:t},r,n=At)=>{if(![At,kt,Tt,jt].includes(n))throw Error(`The '${n}' error format is not supported`);const o=[],a=bt.subscribe("result",Nt(n,o));return Ht(t,r,e,{}),bt.unsubscribe(a),o[0]})),Nt=(e,t)=>{const r=[];return(n,o)=>{if("result"===n){const{keyword:e,absoluteKeywordLocation:t,instanceLocation:n,valid:a}=o,i={keyword:e,absoluteKeywordLocation:t,instanceLocation:n,valid:a,errors:[]};r.push(i)}else if("result.start"===n)r.push(n);else if("result.end"===n){const n=r.pop();for(;"result.start"!==r[r.length-1];){const t=r.pop(),o=[t];e===kt&&(o.push(...t.errors),delete t.errors),(e===jt||e!==At&&!t.valid)&&n.errors.unshift(...o)}r[r.length-1]=n,t[0]=n}}},Dt={},_t=e=>Dt[e]||Ct,Ft=e=>e in Dt,qt={},Ut={},zt=async(e,t)=>{if(e=await Lt(e),!Ft(`${e.dialectId}#validate`)){const t=await xt.get(e.dialectId);(xt.getConfig(t.id,"mandatoryVocabularies")||[]).forEach((e=>{if(!t.vocabulary[e])throw Error(`Vocabulary '${e}' must be explicitly declared and required`)})),Object.entries(t.vocabulary).forEach((([e,r])=>{if(e in qt)Object.entries(qt[e]).forEach((([e,r])=>{((e,t)=>{Dt[e]={collectEvaluatedItems:(e,r,n,o,a)=>t.interpret(e,r,n,o,a)&&new Set,collectEvaluatedProperties:(e,r,n,o,a)=>t.interpret(e,r,n,o,a)&&[],...t}})(`${t.id}#${e}`,r)}));else if(r)throw Error(`Missing required vocabulary: ${e}`)}))}if($t&&!e.validated){if(xt.markValidated(e.id),!(e.dialectId in Ut)){const t=await xt.get(e.dialectId),r=await Rt(t);Ut[t.id]=Pt(r)}const t=Et.cons(e.schema,e.id),r=Ut[e.dialectId](t,It);if(!r.valid)throw new St(r)}return e.id in t.metaData||(t.metaData[e.id]={id:e.id,dynamicAnchors:e.dynamicAnchors,anchors:e.anchors}),_t(`${e.dialectId}#validate`).compile(e,t)},Lt=async e=>xt.typeOf(e,"string")?Lt(await xt.get(xt.value(e),e)):e,Ht=(e,t,r,n)=>{const o=Vt(e,r),a=wt(e,"");return _t(o).interpret(e,t,r,{...r.metaData[a].dynamicAnchors,...n})},Vt=(e,t)=>{if(!(e in t))throw Error(`No schema found at ${e}`);return t[e][0]};var Mt={validate:async(e,t,r)=>{const n=await Rt(e),o=(e,t)=>Pt(n,Et.cons(e),t);return void 0===t?o:o(t,r)},compile:Rt,interpret:Pt,setMetaOutputFormat:e=>{It=e},setShouldMetaValidate:e=>{$t=e},FLAG:At,BASIC:kt,DETAILED:Tt,VERBOSE:jt,add:(e,t="",r="")=>{const n=xt.add(e,t,r);delete Ut[n]},getKeyword:_t,hasKeyword:Ft,defineVocabulary:(e,t)=>{qt[e]=t},compileSchema:zt,interpretSchema:Ht,collectEvaluatedProperties:(e,t,r,n,o)=>{const a=Vt(e,r);return _t(a).collectEvaluatedProperties(e,t,r,n,o)},collectEvaluatedItems:(e,t,r,n,o)=>{const a=Vt(e,r);return _t(a).collectEvaluatedItems(e,t,r,n,o)},addMediaTypePlugin:Ot.addPlugin};const Bt=te,Jt=o.exports,Kt=Mt,Gt=z,Zt=ht;var Wt={compile:async(e,t)=>{const r=Zt.uri(e);if(!(r in t)){t[r]=!1;const n=Zt.value(e);if(!["object","boolean"].includes(typeof n))throw Error(`No schema found at '${Zt.uri(e)}'`);t[r]=[`${e.dialectId}#validate`,Zt.uri(e),"boolean"==typeof n?n:await Bt.pipeline([Zt.entries,Bt.map((([t,r])=>[`${e.dialectId}#${t}`,r])),Bt.filter((([t])=>t!==`${e.dialectId}#validate`)),Bt.map((async([r,n])=>{const o=await Kt.getKeyword(r).compile(n,t,e);return[r,Zt.uri(n),o]})),Bt.all],e)]}return r},interpret:(e,t,r,n)=>{const[o,a,i]=r[e];Jt.publishSync("result.start");const s="boolean"==typeof i?i:i.every((([e,o,a])=>{Jt.publishSync("result.start");const i=Kt.getKeyword(e).interpret(a,t,r,n);return Jt.publishSync("result",{keyword:e,absoluteKeywordLocation:o,instanceLocation:Gt.uri(t),valid:i,ast:a}),Jt.publishSync("result.end"),i}));return Jt.publishSync("result",{keyword:o,absoluteKeywordLocation:a,instanceLocation:Gt.uri(t),valid:s,ast:e}),Jt.publishSync("result.end"),s},collectEvaluatedProperties:(e,t,r,n,o=!1)=>{const a=r[e][2];return"boolean"==typeof a?!!a&&[]:a.filter((([e])=>!o||!e.endsWith("#unevaluatedProperties"))).reduce(((e,[o,,a])=>{const i=e&&Kt.getKeyword(o).collectEvaluatedProperties(a,t,r,n);return!1!==i&&[...e,...i]}),[])},collectEvaluatedItems:(e,t,r,n,o=!1)=>{const a=r[e][2];return"boolean"==typeof a?!!a&&new Set:a.filter((([e])=>!o||!e.endsWith("#unevaluatedItems"))).reduce(((e,[o,,a])=>{const i=!1!==e&&Kt.getKeyword(o).collectEvaluatedItems(a,t,r,n);return!1!==i&&new Set([...e,...i])}),new Set)}};var Qt={Core:Mt,Schema:ht,Instance:z,Reference:O,Keywords:{metaData:gt,validate:Wt},InvalidSchemaError:vt};export{Qt as default};
//# sourceMappingURL=json-schema-core-esm.min.js.map

@@ -1,3 +0,3 @@

var JSC=function(e){"use strict";var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=function(e,r){return function t(){null==r&&(r=e.length);var n=[].slice.call(arguments);return n.length>=r?e.apply(this,n):function(){return t.apply(this,n.concat([].slice.call(arguments)))}}};var n={exports:{}};!function(e,t){!function(r,n){var o={};r.PubSub?(o=r.PubSub,console.warn("PubSub already loaded, using existing version")):(r.PubSub=o,function(e){var r={},t=-1,n="*";function o(e){var r;for(r in e)if(Object.prototype.hasOwnProperty.call(e,r))return!0;return!1}function a(e){return function(){throw e}}function i(e,r,t){try{e(r,t)}catch(e){setTimeout(a(e),0)}}function s(e,r,t){e(r,t)}function c(e,t,n,o){var a,c=r[t],u=o?s:i;if(Object.prototype.hasOwnProperty.call(r,t))for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&u(c[a],e,n)}function u(e,r,t){return function(){var o=String(e),a=o.lastIndexOf(".");for(c(e,e,r,t);-1!==a;)a=(o=o.substr(0,a)).lastIndexOf("."),c(e,o,r,t);c(e,n,r,t)}}function l(e){var t=String(e);return Boolean(Object.prototype.hasOwnProperty.call(r,t)&&o(r[t]))}function p(e){for(var r=String(e),t=l(r)||l(n),o=r.lastIndexOf(".");!t&&-1!==o;)o=(r=r.substr(0,o)).lastIndexOf("."),t=l(r);return t}function f(e,r,t,n){var o=u(e="symbol"==typeof e?e.toString():e,r,n);return!!p(e)&&(!0===t?o():setTimeout(o,0),!0)}e.publish=function(r,t){return f(r,t,!1,e.immediateExceptions)},e.publishSync=function(r,t){return f(r,t,!0,e.immediateExceptions)},e.subscribe=function(e,n){if("function"!=typeof n)return!1;e="symbol"==typeof e?e.toString():e,Object.prototype.hasOwnProperty.call(r,e)||(r[e]={});var o="uid_"+String(++t);return r[e][o]=n,o},e.subscribeAll=function(r){return e.subscribe(n,r)},e.subscribeOnce=function(r,t){var n=e.subscribe(r,(function(){e.unsubscribe(n),t.apply(this,arguments)}));return e},e.clearAllSubscriptions=function(){r={}},e.clearSubscriptions=function(e){var t;for(t in r)Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)&&delete r[t]},e.countSubscriptions=function(e){var t,n,o=0;for(t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)){for(n in r[t])o++;break}return o},e.getSubscriptions=function(e){var t,n=[];for(t in r)Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)&&n.push(t);return n},e.unsubscribe=function(t){var n,o,a,i=function(e){var t;for(t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e))return!0;return!1},s="string"==typeof t&&(Object.prototype.hasOwnProperty.call(r,t)||i(t)),c=!s&&"string"==typeof t,u="function"==typeof t,l=!1;if(!s){for(n in r)if(Object.prototype.hasOwnProperty.call(r,n)){if(o=r[n],c&&o[t]){delete o[t],l=t;break}if(u)for(a in o)Object.prototype.hasOwnProperty.call(o,a)&&o[a]===t&&(delete o[a],l=!0)}return l}e.clearSubscriptions(t)}}(o)),void 0!==e&&e.exports&&(t=e.exports=o),t.PubSub=o,e.exports=t=o}("object"==typeof window&&window||r)}(n,n.exports);var o={exports:{}};
/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */!function(e,r){!function(e){function r(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length>1){r[0]=r[0].slice(0,-1);for(var n=r.length-1,o=1;o<n;++o)r[o]=r[o].slice(1,-1);return r[n]=r[n].slice(1),r.join("")}return r[0]}function t(e){return"(?:"+e+")"}function n(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function a(e){return null!=e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function i(e,r){var t=e;if(r)for(var n in r)t[n]=r[n];return t}function s(e){var n="[A-Za-z]",o="[0-9]",a=r(o,"[A-Fa-f]"),i=t(t("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+t("%[89A-Fa-f]"+a+"%"+a+a)+"|"+t("%"+a+a)),s="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",c=r("[\\:\\/\\?\\#\\[\\]\\@]",s),u=e?"[\\uE000-\\uF8FF]":"[]",l=r(n,o,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");t(n+r(n,o,"[\\+\\-\\.]")+"*"),t(t(i+"|"+r(l,s,"[\\:]"))+"*");var p=t(t("25[0-5]")+"|"+t("2[0-4]"+o)+"|"+t("1"+o+o)+"|"+t("0?[1-9]"+o)+"|0?0?"+o),f=t(p+"\\."+p+"\\."+p+"\\."+p),d=t(a+"{1,4}"),h=t(t(d+"\\:"+d)+"|"+f),v=t(t(d+"\\:")+"{6}"+h),y=t("\\:\\:"+t(d+"\\:")+"{5}"+h),m=t(t(d)+"?\\:\\:"+t(d+"\\:")+"{4}"+h),g=t(t(t(d+"\\:")+"{0,1}"+d)+"?\\:\\:"+t(d+"\\:")+"{3}"+h),b=t(t(t(d+"\\:")+"{0,2}"+d)+"?\\:\\:"+t(d+"\\:")+"{2}"+h),w=t(t(t(d+"\\:")+"{0,3}"+d)+"?\\:\\:"+d+"\\:"+h),E=t(t(t(d+"\\:")+"{0,4}"+d)+"?\\:\\:"+h),S=t(t(t(d+"\\:")+"{0,5}"+d)+"?\\:\\:"+d),O=t(t(t(d+"\\:")+"{0,6}"+d)+"?\\:\\:"),C=t([v,y,m,g,b,w,E,S,O].join("|")),A=t(t(l+"|"+i)+"+");t("[vV]"+a+"+\\."+r(l,s,"[\\:]")+"+"),t(t(i+"|"+r(l,s))+"*");var I=t(i+"|"+r(l,s,"[\\:\\@]"));return t(t(i+"|"+r(l,s,"[\\@]"))+"+"),t(t(I+"|"+r("[\\/\\?]",u))+"*"),{NOT_SCHEME:new RegExp(r("[^]",n,o,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(r("[^\\%\\:]",l,s),"g"),NOT_HOST:new RegExp(r("[^\\%\\[\\]\\:]",l,s),"g"),NOT_PATH:new RegExp(r("[^\\%\\/\\:\\@]",l,s),"g"),NOT_PATH_NOSCHEME:new RegExp(r("[^\\%\\/\\@]",l,s),"g"),NOT_QUERY:new RegExp(r("[^\\%]",l,s,"[\\:\\@\\/\\?]",u),"g"),NOT_FRAGMENT:new RegExp(r("[^\\%]",l,s,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(r("[^]",l,s),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(r("[^\\%]",l,c),"g"),PCT_ENCODED:new RegExp(i,"g"),IPV4ADDRESS:new RegExp("^("+f+")$"),IPV6ADDRESS:new RegExp("^\\[?("+C+")"+t(t("\\%25|\\%(?!"+a+"{2})")+"("+A+")")+"?\\]?$")}}var c=s(!1),u=s(!0),l=function(){function e(e,r){var t=[],n=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(n=(i=s.next()).done)&&(t.push(i.value),!r||t.length!==r);n=!0);}catch(e){o=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(o)throw a}}return t}return function(r,t){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return e(r,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),p=function(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);r<e.length;r++)t[r]=e[r];return t}return Array.from(e)},f=2147483647,d=36,h=1,v=26,y=38,m=700,g=72,b=128,w="-",E=/^xn--/,S=/[^\0-\x7E]/,O=/[\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"},A=d-h,I=Math.floor,j=String.fromCharCode;function T(e){throw new RangeError(C[e])}function x(e,r){for(var t=[],n=e.length;n--;)t[n]=r(e[n]);return t}function $(e,r){var t=e.split("@"),n="";return t.length>1&&(n=t[0]+"@",e=t[1]),n+x((e=e.replace(O,".")).split("."),r).join(".")}function D(e){for(var r=[],t=0,n=e.length;t<n;){var o=e.charCodeAt(t++);if(o>=55296&&o<=56319&&t<n){var a=e.charCodeAt(t++);56320==(64512&a)?r.push(((1023&o)<<10)+(1023&a)+65536):(r.push(o),t--)}else r.push(o)}return r}var P=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:d},N=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},R=function(e,r,t){var n=0;for(e=t?I(e/m):e>>1,e+=I(e/r);e>A*v>>1;n+=d)e=I(e/A);return I(n+(A+1)*e/(e+y))},F=function(e){var r=[],t=e.length,n=0,o=b,a=g,i=e.lastIndexOf(w);i<0&&(i=0);for(var s=0;s<i;++s)e.charCodeAt(s)>=128&&T("not-basic"),r.push(e.charCodeAt(s));for(var c=i>0?i+1:0;c<t;){for(var u=n,l=1,p=d;;p+=d){c>=t&&T("invalid-input");var y=P(e.charCodeAt(c++));(y>=d||y>I((f-n)/l))&&T("overflow"),n+=y*l;var m=p<=a?h:p>=a+v?v:p-a;if(y<m)break;var E=d-m;l>I(f/E)&&T("overflow"),l*=E}var S=r.length+1;a=R(n-u,S,0==u),I(n/S)>f-o&&T("overflow"),o+=I(n/S),n%=S,r.splice(n++,0,o)}return String.fromCodePoint.apply(String,r)},_=function(e){var r=[],t=(e=D(e)).length,n=b,o=0,a=g,i=!0,s=!1,c=void 0;try{for(var u,l=e[Symbol.iterator]();!(i=(u=l.next()).done);i=!0){var p=u.value;p<128&&r.push(j(p))}}catch(e){s=!0,c=e}finally{try{!i&&l.return&&l.return()}finally{if(s)throw c}}var y=r.length,m=y;for(y&&r.push(w);m<t;){var E=f,S=!0,O=!1,C=void 0;try{for(var A,x=e[Symbol.iterator]();!(S=(A=x.next()).done);S=!0){var $=A.value;$>=n&&$<E&&(E=$)}}catch(e){O=!0,C=e}finally{try{!S&&x.return&&x.return()}finally{if(O)throw C}}var P=m+1;E-n>I((f-o)/P)&&T("overflow"),o+=(E-n)*P,n=E;var F=!0,_=!1,U=void 0;try{for(var k,q=e[Symbol.iterator]();!(F=(k=q.next()).done);F=!0){var z=k.value;if(z<n&&++o>f&&T("overflow"),z==n){for(var L=o,H=d;;H+=d){var V=H<=a?h:H>=a+v?v:H-a;if(L<V)break;var M=L-V,K=d-V;r.push(j(N(V+M%K,0))),L=I(M/K)}r.push(j(N(L,0))),a=R(o,P,m==y),o=0,++m}}}catch(e){_=!0,U=e}finally{try{!F&&q.return&&q.return()}finally{if(_)throw U}}++o,++n}return r.join("")},U=function(e){return $(e,(function(e){return E.test(e)?F(e.slice(4).toLowerCase()):e}))},k=function(e){return $(e,(function(e){return S.test(e)?"xn--"+_(e):e}))},q={version:"2.1.0",ucs2:{decode:D,encode:function(e){return String.fromCodePoint.apply(String,p(e))}},decode:F,encode:_,toASCII:k,toUnicode:U},z={};function L(e){var r=e.charCodeAt(0);return r<16?"%0"+r.toString(16).toUpperCase():r<128?"%"+r.toString(16).toUpperCase():r<2048?"%"+(r>>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function H(e){for(var r="",t=0,n=e.length;t<n;){var o=parseInt(e.substr(t+1,2),16);if(o<128)r+=String.fromCharCode(o),t+=3;else if(o>=194&&o<224){if(n-t>=6){var a=parseInt(e.substr(t+4,2),16);r+=String.fromCharCode((31&o)<<6|63&a)}else r+=e.substr(t,6);t+=6}else if(o>=224){if(n-t>=9){var i=parseInt(e.substr(t+4,2),16),s=parseInt(e.substr(t+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&s)}else r+=e.substr(t,9);t+=9}else r+=e.substr(t,3),t+=3}return r}function V(e,r){function t(e){var t=H(e);return t.match(r.UNRESERVED)?t:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,t).replace(r.NOT_USERINFO,L).replace(r.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_HOST,L).replace(r.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(r.PCT_ENCODED,t).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,L).replace(r.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(r.PCT_ENCODED,t).replace(r.NOT_QUERY,L).replace(r.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,t).replace(r.NOT_FRAGMENT,L).replace(r.PCT_ENCODED,o)),e}function M(e){return e.replace(/^0*(.*)/,"$1")||"0"}function K(e,r){var t=e.match(r.IPV4ADDRESS)||[],n=l(t,2)[1];return n?n.split(".").map(M).join("."):e}function Z(e,r){var t=e.match(r.IPV6ADDRESS)||[],n=l(t,3),o=n[1],a=n[2];if(o){for(var i=o.toLowerCase().split("::").reverse(),s=l(i,2),c=s[0],u=s[1],p=u?u.split(":").map(M):[],f=c.split(":").map(M),d=r.IPV4ADDRESS.test(f[f.length-1]),h=d?7:8,v=f.length-h,y=Array(h),m=0;m<h;++m)y[m]=p[m]||f[v+m]||"";d&&(y[h-1]=K(y[h-1],r));var g=y.reduce((function(e,r,t){if(!r||"0"===r){var n=e[e.length-1];n&&n.index+n.length===t?n.length++:e.push({index:t,length:1})}return e}),[]).sort((function(e,r){return r.length-e.length}))[0],b=void 0;if(g&&g.length>1){var w=y.slice(0,g.index),E=y.slice(g.index+g.length);b=w.join(":")+"::"+E.join(":")}else b=y.join(":");return a&&(b+="%"+a),b}return e}var J=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,B=void 0==="".match(/(){0}/)[1];function W(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t={},n=!1!==r.iri?u:c;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(J);if(o){B?(t.scheme=o[1],t.userinfo=o[3],t.host=o[4],t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=o[7],t.fragment=o[8],isNaN(t.port)&&(t.port=o[5])):(t.scheme=o[1]||void 0,t.userinfo=-1!==e.indexOf("@")?o[3]:void 0,t.host=-1!==e.indexOf("//")?o[4]:void 0,t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=-1!==e.indexOf("?")?o[7]:void 0,t.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(t.port)&&(t.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),t.host&&(t.host=Z(K(t.host,n),n)),void 0!==t.scheme||void 0!==t.userinfo||void 0!==t.host||void 0!==t.port||t.path||void 0!==t.query?void 0===t.scheme?t.reference="relative":void 0===t.fragment?t.reference="absolute":t.reference="uri":t.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==t.reference&&(t.error=t.error||"URI is not a "+r.reference+" reference.");var a=z[(r.scheme||t.scheme||"").toLowerCase()];if(r.unicodeSupport||a&&a.unicodeSupport)V(t,n);else{if(t.host&&(r.domainHost||a&&a.domainHost))try{t.host=q.toASCII(t.host.replace(n.PCT_ENCODED,H).toLowerCase())}catch(e){t.error=t.error||"Host's domain name can not be converted to ASCII via punycode: "+e}V(t,c)}a&&a.parse&&a.parse(t,r)}else t.error=t.error||"URI can not be parsed.";return t}function G(e,r){var t=!1!==r.iri?u:c,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(Z(K(String(e.host),t),t).replace(t.IPV6ADDRESS,(function(e,r,t){return"["+r+(t?"%25"+t:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}var Q=/^\.\.?\//,Y=/^\/\.(\/|$)/,X=/^\/\.\.(\/|$)/,ee=/^\/?(?:.|\n)*?(?=\/|$)/;function re(e){for(var r=[];e.length;)if(e.match(Q))e=e.replace(Q,"");else if(e.match(Y))e=e.replace(Y,"/");else if(e.match(X))e=e.replace(X,"/"),r.pop();else if("."===e||".."===e)e="";else{var t=e.match(ee);if(!t)throw new Error("Unexpected dot segment condition");var n=t[0];e=e.slice(n.length),r.push(n)}return r.join("")}function te(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.iri?u:c,n=[],o=z[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(t.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?q.toUnicode(e.host):q.toASCII(e.host.replace(t.PCT_ENCODED,H).toLowerCase())}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+t}V(e,t),"suffix"!==r.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var a=G(e,r);if(void 0!==a&&("suffix"!==r.reference&&n.push("//"),n.push(a),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var i=e.path;r.absolutePath||o&&o.absolutePath||(i=re(i)),void 0===a&&(i=i.replace(/^\/\//,"/%2F")),n.push(i)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function ne(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=W(te(e,t),t),r=W(te(r,t),t)),!(t=t||{}).tolerant&&r.scheme?(n.scheme=r.scheme,n.userinfo=r.userinfo,n.host=r.host,n.port=r.port,n.path=re(r.path||""),n.query=r.query):(void 0!==r.userinfo||void 0!==r.host||void 0!==r.port?(n.userinfo=r.userinfo,n.host=r.host,n.port=r.port,n.path=re(r.path||""),n.query=r.query):(r.path?("/"===r.path.charAt(0)?n.path=re(r.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:n.path=r.path:n.path="/"+r.path,n.path=re(n.path)),n.query=r.query):(n.path=e.path,void 0!==r.query?n.query=r.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=r.fragment,n}function oe(e,r,t){var n=i({scheme:"null"},t);return te(ne(W(e,n),W(r,n),n,!0),n)}function ae(e,r){return"string"==typeof e?e=te(W(e,r),r):"object"===n(e)&&(e=W(te(e,r),r)),e}function ie(e,r,t){return"string"==typeof e?e=te(W(e,t),t):"object"===n(e)&&(e=te(e,t)),"string"==typeof r?r=te(W(r,t),t):"object"===n(r)&&(r=te(r,t)),e===r}function se(e,r){return e&&e.toString().replace(r&&r.iri?u.ESCAPE:c.ESCAPE,L)}function ce(e,r){return e&&e.toString().replace(r&&r.iri?u.PCT_ENCODED:c.PCT_ENCODED,H)}var ue={scheme:"http",domainHost:!0,parse:function(e,r){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,r){var t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},le={scheme:"https",domainHost:ue.domainHost,parse:ue.parse,serialize:ue.serialize};function pe(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var fe={scheme:"ws",domainHost:!0,parse:function(e,r){var t=e;return t.secure=pe(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t},serialize:function(e,r){if(e.port!==(pe(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var t=e.resourceName.split("?"),n=l(t,2),o=n[0],a=n[1];e.path=o&&"/"!==o?o:void 0,e.query=a,e.resourceName=void 0}return e.fragment=void 0,e}},de={scheme:"wss",domainHost:fe.domainHost,parse:fe.parse,serialize:fe.serialize},he={},ve="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ye="[0-9A-Fa-f]",me=t(t("%[EFef]"+ye+"%"+ye+ye+"%"+ye+ye)+"|"+t("%[89A-Fa-f]"+ye+"%"+ye+ye)+"|"+t("%"+ye+ye)),ge="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",be=r("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),we="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Ee=new RegExp(ve,"g"),Se=new RegExp(me,"g"),Oe=new RegExp(r("[^]",ge,"[\\.]",'[\\"]',be),"g"),Ce=new RegExp(r("[^]",ve,we),"g"),Ae=Ce;function Ie(e){var r=H(e);return r.match(Ee)?r:e}var je={scheme:"mailto",parse:function(e,r){var t=e,n=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var o=!1,a={},i=t.query.split("&"),s=0,c=i.length;s<c;++s){var u=i[s].split("=");switch(u[0]){case"to":for(var l=u[1].split(","),p=0,f=l.length;p<f;++p)n.push(l[p]);break;case"subject":t.subject=ce(u[1],r);break;case"body":t.body=ce(u[1],r);break;default:o=!0,a[ce(u[0],r)]=ce(u[1],r)}}o&&(t.headers=a)}t.query=void 0;for(var d=0,h=n.length;d<h;++d){var v=n[d].split("@");if(v[0]=ce(v[0]),r.unicodeSupport)v[1]=ce(v[1],r).toLowerCase();else try{v[1]=q.toASCII(ce(v[1],r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[d]=v.join("@")}return t},serialize:function(e,r){var t=e,n=a(e.to);if(n){for(var i=0,s=n.length;i<s;++i){var c=String(n[i]),u=c.lastIndexOf("@"),l=c.slice(0,u).replace(Se,Ie).replace(Se,o).replace(Oe,L),p=c.slice(u+1);try{p=r.iri?q.toUnicode(p):q.toASCII(ce(p,r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+e}n[i]=l+"@"+p}t.path=n.join(",")}var f=e.headers=e.headers||{};e.subject&&(f.subject=e.subject),e.body&&(f.body=e.body);var d=[];for(var h in f)f[h]!==he[h]&&d.push(h.replace(Se,Ie).replace(Se,o).replace(Ce,L)+"="+f[h].replace(Se,Ie).replace(Se,o).replace(Ae,L));return d.length&&(t.query=d.join("&")),t}},Te=/^([^\:]+)\:(.*)/,xe={scheme:"urn",parse:function(e,r){var t=e.path&&e.path.match(Te),n=e;if(t){var o=r.scheme||n.scheme||"urn",a=t[1].toLowerCase(),i=t[2],s=o+":"+(r.nid||a),c=z[s];n.nid=a,n.nss=i,n.path=void 0,c&&(n=c.parse(n,r))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,r){var t=r.scheme||e.scheme||"urn",n=e.nid,o=t+":"+(r.nid||n),a=z[o];a&&(e=a.serialize(e,r));var i=e,s=e.nss;return i.path=(n||r.nid)+":"+s,i}},$e=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,De={scheme:"urn:uuid",parse:function(e,r){var t=e;return t.uuid=t.nss,t.nss=void 0,r.tolerant||t.uuid&&t.uuid.match($e)||(t.error=t.error||"UUID is not valid."),t},serialize:function(e,r){var t=e;return t.nss=(e.uuid||"").toLowerCase(),t}};z[ue.scheme]=ue,z[le.scheme]=le,z[fe.scheme]=fe,z[de.scheme]=de,z[je.scheme]=je,z[xe.scheme]=xe,z[De.scheme]=De,e.SCHEMES=z,e.pctEncChar=L,e.pctDecChars=H,e.parse=W,e.removeDotSegments=re,e.serialize=te,e.resolveComponents=ne,e.resolve=oe,e.normalize=ae,e.equal=ie,e.escapeComponent=se,e.unescapeComponent=ce,Object.defineProperty(e,"__esModule",{value:!0})}(r)}(0,o.exports);const a=o.exports,i={null:e=>null===e,boolean:e=>"boolean"==typeof e,object:e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,array:e=>Array.isArray(e),number:e=>"number"==typeof e,integer:e=>Number.isInteger(e),string:e=>"string"==typeof e};var s={jsonTypeOf:(e,r)=>i[r](e),resolveUrl:(e,r)=>{const t=a.resolve(e,r,{iri:!0});if(a.resolve(e,"",{iri:!0})&&"file"===a.parse(t).scheme&&"file"!==a.parse(e).scheme)throw Error(`Can't access file '${t}' resource from network context '${e}'`);return t},urlFragment:e=>a.unescapeComponent(a.parse(e).fragment)||"",pathRelative:(e,r)=>{if(e===r)return"";let t=1;const n=e.length-1,o=r.length-t,a=n<o?n:o;let i=-1,s=0;for(;s<a;s++){const n=e.charCodeAt(s+1);if(n!==r.charCodeAt(t+s))break;47===n&&(i=s)}if(o>a){if(47===r.charCodeAt(t+s))return r.slice(t+s+1);if(0===s)return r.slice(t+s)}n>a&&(47===e.charCodeAt(s+1)?i=s:0===a&&(i=0));let c="";for(s=i+2;s<=e.length;++s)s!==e.length&&47!==e.charCodeAt(s)||(c+=0===c.length?"..":"/..");return t+=i,c.length>0?`${c}${r.slice(t,r.length)}`:(47===r.charCodeAt(t)&&++t,r.slice(t,r.length))}};const c=t,u=e=>{if(e.length>0&&"/"!==e[0])throw Error("Invalid JSON Pointer");return e.split("/").slice(1).map(y)},l=(e,r,t,n)=>{if(0===e.length)return t;if(e.length>1){const o=e.shift();return{...r,[o]:l(e,g(r,o,n),t,h(o,n))}}if(Array.isArray(r)){const n=[...r];return n[m(r,e[0])]=t,n}return"object"==typeof r&&null!==r?{...r,[e[0]]:t}:g(r,e[0],n)},p=(e,r,t,n)=>{if(0!==e.length)if(1!==e.length||b(r)){const o=e.shift();p(e,g(r,o,n),t,h(o,n))}else{r[m(r,e[0])]=t}},f=(e,r,t)=>{if(0!=e.length){if(e.length>1){const n=e.shift(),o=g(r,n,t);return{...r,[n]:f(e,o,h(n,t))}}if(Array.isArray(r))return r.filter(((r,t)=>t!=e[0]));if("object"==typeof r&&null!==r){const{[e[0]]:t,...n}=r;return n}return g(r,e[0],t)}},d=(e,r,t)=>{if(0!==e.length)if(e.length>1){const n=e.shift(),o=g(r,n,t);d(e,o,h(n,t))}else Array.isArray(r)?r.splice(e[0],1):"object"==typeof r&&null!==r?delete r[e[0]]:g(r,e[0],t)},h=c(((e,r)=>r+"/"+v(e))),v=e=>e.toString().replace(/~/g,"~0").replace(/\//g,"~1"),y=e=>e.toString().replace(/~1/g,"/").replace(/~0/g,"~"),m=(e,r)=>Array.isArray(e)&&"-"===r?e.length:r,g=(e,r,t="")=>{if(void 0===e)throw TypeError(`Value at '${t}' is undefined and does not have property '${r}'`);if(null===e)throw TypeError(`Value at '${t}' is null and does not have property '${r}'`);if(b(e))throw TypeError(`Value at '${t}' is a ${typeof e} and does not have property '${r}'`);return e[m(e,r)]},b=e=>null===e||"object"!=typeof e;var w={nil:"",append:h,get:(e,r)=>{const t=u(e),n=e=>t.reduce((([e,r],t)=>[g(e,t,r),h(t,r)]),[e,""])[0];return void 0===r?n:n(r)},set:(e,r,t)=>{const n=u(e),o=c(((e,r)=>l(n,e,r,"")));return void 0===r?o:o(r,t)},assign:(e,r,t)=>{const n=u(e),o=c(((e,r)=>p(n,e,r,"")));return void 0===r?o:o(r,t)},unset:(e,r)=>{const t=u(e),n=e=>f(t,e,"");return void 0===r?n:n(r)},remove:(e,r)=>{const t=u(e),n=e=>d(t,e,"");return void 0===r?n:n(r)}};const E=Symbol("$__value"),S=Symbol("$__href");var O={cons:(e,r)=>Object.freeze({[S]:e,[E]:r}),isReference:e=>e&&void 0!==e[S],href:e=>e[S],value:e=>e[E]};const C=w,A=t,{resolveUrl:I,jsonTypeOf:j}=s,T=O,x=Object.freeze({id:"",pointer:"",instance:void 0,value:void 0}),$=e=>T.isReference(e.value)?T.value(e.value):e.value,D=A(((e,r)=>j($(e),r))),P=(e,r)=>Object.freeze({...r,pointer:C.append(e,r.pointer),value:$(r)[e]}),N=A(((e,r)=>$(r).map(((t,n,o,a)=>e(P(n,r),n,o,a))))),R=A(((e,r)=>$(r).forEach(((t,n,o,a)=>e(P(n,r),n,o,a))))),F=A(((e,r)=>$(r).map(((e,t,n,o)=>P(t,r))).filter(((r,t,n,o)=>e(r,t,n,o))))),_=A(((e,r,t)=>$(t).reduce(((r,n,o)=>e(r,P(o,t),o)),r))),U=A(((e,r)=>$(r).every(((t,n,o,a)=>e(P(n,r),n,o,a))))),k=A(((e,r)=>$(r).some(((t,n,o,a)=>e(P(n,r),n,o,a)))));var q={nil:x,cons:(e,r="")=>Object.freeze({...x,id:I(r,""),instance:e,value:e}),get:(e,r=x)=>{if(!e.startsWith("#"))throw Error(`No JSON document found at '${e.split("#")[0]}'`);return Object.freeze({...r,pointer:e.substr(1)})},uri:e=>`${e.id}#${encodeURI(e.pointer)}`,value:$,has:(e,r)=>e in $(r),typeOf:D,length:e=>$(e).length,step:P,entries:e=>Object.keys($(e)).map((r=>[r,P(r,e)])),keys:e=>Object.keys($(e)),map:N,forEach:R,filter:F,reduce:_,every:U,some:k},z=async e=>Object.entries(await e);var L=t((async(e,r)=>(await r).map(e)));var H=t((async(e,r,t)=>(await t).reduce((async(r,t)=>e(await r,t)),r)));const V=H;var M=t((async(e,r,t={})=>V((async(r,t)=>await e(t)?r.concat([t]):r),[],r,t)));const K=L;var Z=t((async(e,r)=>{const t=await K(e,r);return(await Promise.all(t)).some((e=>e))}));const J=L;var B=t((async(e,r)=>{const t=await J(e,r);return(await Promise.all(t)).every((e=>e))}));var W=t(((e,r)=>e.reduce((async(e,r)=>r(await e)),r)));const G=W,Q=z,Y=H;var X={entries:z,map:L,filter:M,reduce:H,some:Z,every:B,pipeline:W,all:e=>Promise.all(e),allValues:e=>G([Q,Y((async(e,[r,t])=>(e[r]=await t,e)),{})],e)},ee=fetch,re={},te=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,ne=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,oe=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,ae=/\\([\u000b\u0020-\u00ff])/g,ie=/([\\"])/g,se=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;function ce(e){var r=String(e);if(oe.test(r))return r;if(r.length>0&&!ne.test(r))throw new TypeError("invalid parameter value");return'"'+r.replace(ie,"\\$1")+'"'}function ue(e){this.parameters=Object.create(null),this.type=e}re.format=function(e){if(!e||"object"!=typeof e)throw new TypeError("argument obj is required");var r=e.parameters,t=e.type;if(!t||!se.test(t))throw new TypeError("invalid type");var n=t;if(r&&"object"==typeof r)for(var o,a=Object.keys(r).sort(),i=0;i<a.length;i++){if(o=a[i],!oe.test(o))throw new TypeError("invalid parameter name");n+="; "+o+"="+ce(r[o])}return n},re.parse=function(e){if(!e)throw new TypeError("argument string is required");var r="object"==typeof e?function(e){var r;"function"==typeof e.getHeader?r=e.getHeader("content-type"):"object"==typeof e.headers&&(r=e.headers&&e.headers["content-type"]);if("string"!=typeof r)throw new TypeError("content-type header is missing from object");return r}(e):e;if("string"!=typeof r)throw new TypeError("argument string is required to be a string");var t=r.indexOf(";"),n=-1!==t?r.substr(0,t).trim():r.trim();if(!se.test(n))throw new TypeError("invalid media type");var o=new ue(n.toLowerCase());if(-1!==t){var a,i,s;for(te.lastIndex=t;i=te.exec(r);){if(i.index!==t)throw new TypeError("invalid parameter format");t+=i[0].length,a=i[1].toLowerCase(),'"'===(s=i[2])[0]&&(s=s.substr(1,s.length-2).replace(ae,"$1")),o.parameters[a]=s}if(t!==r.length)throw new TypeError("invalid parameter format")}return o};const le=re,pe={};var fe={addPlugin:(e,r)=>{pe[e]=r},parse:e=>{const r=le.parse(e.headers.get("content-type"));if(!(r.type in pe))throw Error(`${e.url} is not a schema. Found a document with media type: ${r.type}`);return pe[r.type].parse(e,r.parameters)},getContentType:e=>{for(const r in pe)if(pe[r].matcher(e))return r;return"application/octet-stream"}};const de=t,he=X,ve=w,{jsonTypeOf:ye,resolveUrl:me,urlFragment:ge,pathRelative:be}=s,we=ee,Ee=O,Se=fe,Oe="https://json-schema.org/draft/2019-09/vocab/core",Ce="https://json-schema.org/draft/2020-12/vocab/core",Ae={},Ie={},je=(e,r)=>{const t=Ie[e];return Ae[t]?.[r]},Te={},xe={},$e=(e,r="",t="")=>{e=JSON.parse(JSON.stringify(e));const n=me(r,""),o=me(e.$schema||t,"");if(!o)throw Error("Couldn't determine schema dialect");if(delete e.$schema,!(o in Ie))if(!0===e?.$vocabulary?.[Oe]&&o===De(e,n,Oe)[0])Ie[o]=Oe;else if(!0===e?.$vocabulary?.[Ce]&&o===De(e,n,Ce)[0])Ie[o]=Ce;else{const e=Te[o];if(!e)throw Error(`Couldn't determine JSON Schema version for dialect: '${o}'`);!0===e.vocabulary[Oe]?Ie[o]=Oe:!0===e.vocabulary[Ce]?Ie[o]=Ce:Ie[o]=Ie[e.dialectId]}const[a,i]=De(e,n,Ie[o]);if(!a)throw Error("Couldn't determine an identifier for the schema");const s=je(o,"baseToken");delete e[s],n&&(xe[n]=a);const c=je(o,"anchorToken");i&&s===c&&(e[c]=c!==s?encodeURI(i):`#${encodeURI(i)}`);const u={},l=je(o,"recursiveAnchorToken");let p;!0===e[l]&&(u[""]=`${a}#`,e[c]="",delete e[l]);const f=je(o,"vocabularyToken");ye(e[f],"object")?(p=e[f],delete e[f]):p={[Ie[o]]:!0};const d={"":""};return Te[a]={id:a,dialectId:o,schema:Pe(e,a,o,ve.nil,d,u),anchors:d,dynamicAnchors:u,vocabulary:p,validated:!1},a},De=(e,r,t)=>{const n=Ae[t]?.baseToken,o=me(r,e[n]||"");return[me(o,""),ge(o)]},Pe=(e,r,t,n,o,a)=>{if(ye(e,"object")){const i="string"==typeof e.$schema?me(e.$schema,""):t,s=je(i,"embeddedToken"),c=je(i,"anchorToken");if("string"==typeof e[s]&&(s!==c||"#"!==e[s][0])){const n=me(r,e[s]);return e[je(i,"baseToken")]=n,$e(e,n,t),Ee.cons(e[s],e)}const u=je(t,"anchorToken"),l=je(t,"dynamicAnchorToken");"string"==typeof e[l]&&(a[e[l]]=`${r}#${encodeURI(n)}`,o[e[l]]=n,delete e[l]);const p=je(t,"embeddedToken");if("string"==typeof e[u]){const r=u!==p?e[u]:e[u].slice(1);o[r]=n,delete e[u]}const f=je(t,"jrefToken");if("string"==typeof e[f])return Ee.cons(e[f],e);for(const i in e)e[i]=Pe(e[i],r,t,ve.append(i,n),o,a);return e}return Array.isArray(e)?e.map(((e,i)=>Pe(e,r,t,ve.append(i,n),o,a))):e},Ne=e=>Te[xe[e]]||Te[e],Re=Object.freeze({id:"",dialectId:void 0,vocabulary:{},pointer:ve.nil,schema:void 0,value:void 0,anchors:{},dynamicAnchors:{},validated:!0}),Fe=async(e,r=Re)=>{const t=me(ke(r),e),n=me(t,""),o=ge(t);if(!(e=>e in Te||e in xe)(n)){const e=await we(n,{headers:{Accept:"application/schema+json"}});if(e.status>=400)throw await e.text(),Error(`Failed to retrieve schema with id: ${n}`);const[r,t]=await Se.parse(e);let o;o=r.$schema?me(r.$schema,""):t?me(n,t):"",o&&n!==o&&!(o in Ie)&&await Fe(o),$e(r,n,o)}const a=Ne(n),i="/"!==o[0]?Ue(a,o):o,s=Object.freeze({...a,pointer:i,value:ve.get(i,a.schema)});return _e(s)},_e=e=>Ee.isReference(e.value)?Fe(Ee.href(e.value),e):e,Ue=(e,r)=>{if(!(r in e.anchors))throw Error(`No such anchor '${encodeURI(e.id)}#${encodeURI(r)}'`);return e.anchors[r]},ke=e=>`${e.id}#${encodeURI(e.pointer)}`,qe=e=>Ee.isReference(e.value)?Ee.value(e.value):e.value,ze=(e,r)=>{const t=Ne(r.id),n=Object.freeze({...r,pointer:ve.append(e,r.pointer),value:qe(r)[e],validated:t.validated});return _e(n)},Le=de(((e,r)=>he.pipeline([qe,he.map((async(t,n)=>e(await ze(n,r),n))),he.all],r))),He={parentId:"",parentDialect:"",includeEmbedded:!0},Ve=(e,r)=>{if(r.startsWith("file://")){const t=e.slice(7,e.lastIndexOf("/"));return""===e?"":be(t,r.slice(7))}return r};var Me={setConfig:(e,r,t)=>{Ie[e]=e,Ae[e]||(Ae[e]={}),Ae[e][r]=t},getConfig:je,add:$e,get:Fe,markValidated:e=>{Te[e].validated=!0},uri:ke,value:qe,getAnchorPointer:Ue,typeOf:(e,r)=>ye(qe(e),r),has:(e,r)=>e in qe(r),step:ze,keys:e=>Object.keys(qe(e)),entries:e=>he.pipeline([qe,Object.keys,he.map((async r=>[r,await ze(r,e)])),he.all],e),map:Le,length:e=>qe(e).length,toSchema:(e,r={})=>{const t={...He,...r},n=JSON.parse(JSON.stringify(e.schema,((r,n)=>{if(!Ee.isReference(n))return n;const o=Ee.value(n),a="string"==typeof o.$schema?me(o.$schema,""):e.dialectId,i=je(a,"embeddedToken");return!t.includeEmbedded&&i in o?void 0:Ee.value(n)}))),o=je(e.dialectId,"dynamicAnchorToken");Object.entries(e.dynamicAnchors).forEach((([e,r])=>{const t=ve.append(o,ge(r));ve.assign(t,n,e)}));const a=je(e.dialectId,"anchorToken");Object.entries(e.anchors).filter((([r])=>""!==r&&!(r in e.dynamicAnchors))).forEach((([e,r])=>{const t=ve.append(a,r);ve.assign(t,n,e)}));const i=je(e.dialectId,"baseToken"),s=Ve(t.parentId,e.id),c=t.parentDialect===e.dialectId?"":e.dialectId;return{...s&&{[i]:s},...c&&{$schema:c},...n}}};class Ke extends Error{constructor(e){super("Invalid Schema"),this.name=this.constructor.name,this.output=e}}var Ze=Ke;const Je=Me;var Be={compile:e=>Je.value(e),interpret:()=>!0};const We=t,Ge=n.exports,{resolveUrl:Qe}=s,Ye=q,Xe=Me,er=Ze,rr=fe,tr=Be,nr="FLAG",or="BASIC",ar="DETAILED",ir="VERBOSE";let sr=ar,cr=!0;rr.addPlugin("application/schema+json",{parse:async(e,r)=>[await e.json(),r.schema||r.profile],matcher:e=>e.endsWith(".schema.json")});const ur=async e=>{const r={metaData:{}};return{ast:r,schemaUri:await mr(e,r)}},lr=We((({ast:e,schemaUri:r},t,n=nr)=>{if(![nr,or,ar,ir].includes(n))throw Error(`The '${n}' error format is not supported`);const o=[],a=Ge.subscribe("result",pr(n,o));return br(r,t,e,{}),Ge.unsubscribe(a),o[0]})),pr=(e,r)=>{const t=[];return(n,o)=>{if("result"===n){const{keyword:e,absoluteKeywordLocation:r,instanceLocation:n,valid:a}=o,i={keyword:e,absoluteKeywordLocation:r,instanceLocation:n,valid:a,errors:[]};t.push(i)}else if("result.start"===n)t.push(n);else if("result.end"===n){const n=t.pop();for(;"result.start"!==t[t.length-1];){const r=t.pop(),o=[r];e===or&&(o.push(...r.errors),delete r.errors),(e===ir||e!==nr&&!r.valid)&&n.errors.unshift(...o)}t[t.length-1]=n,r[0]=n}}},fr={},dr=e=>fr[e]||tr,hr=e=>e in fr,vr={},yr={},mr=async(e,r)=>{if(e=await gr(e),!hr(`${e.dialectId}#validate`)){const r=await Xe.get(e.dialectId);(Xe.getConfig(r.id,"mandatoryVocabularies")||[]).forEach((e=>{if(!r.vocabulary[e])throw Error(`Vocabulary '${e}' must be explicitly declared and required`)})),Object.entries(r.vocabulary).forEach((([e,t])=>{if(e in vr)Object.entries(vr[e]).forEach((([e,t])=>{((e,r)=>{fr[e]={collectEvaluatedItems:(e,t,n,o,a)=>r.interpret(e,t,n,o,a)&&new Set,collectEvaluatedProperties:(e,t,n,o,a)=>r.interpret(e,t,n,o,a)&&[],...r}})(`${r.id}#${e}`,t)}));else if(t)throw Error(`Missing required vocabulary: ${e}`)}))}if(cr&&!e.validated){if(Xe.markValidated(e.id),!(e.dialectId in yr)){const r=await Xe.get(e.dialectId),t=await ur(r);yr[r.id]=lr(t)}const r=Ye.cons(e.schema,e.id),t=yr[e.dialectId](r,sr);if(!t.valid)throw new er(t)}return e.id in r.metaData||(r.metaData[e.id]={id:e.id,dynamicAnchors:e.dynamicAnchors,anchors:e.anchors}),dr(`${e.dialectId}#validate`).compile(e,r)},gr=async e=>Xe.typeOf(e,"string")?gr(await Xe.get(Xe.value(e),e)):e,br=(e,r,t,n)=>{const o=wr(e,t),a=Qe(e,"");return dr(o).interpret(e,r,t,{...t.metaData[a].dynamicAnchors,...n})},wr=(e,r)=>{if(!(e in r))throw Error(`No schema found at ${e}`);return r[e][0]};var Er={validate:async(e,r,t)=>{const n=await ur(e),o=(e,r)=>lr(n,Ye.cons(e),r);return void 0===r?o:o(r,t)},compile:ur,interpret:lr,setMetaOutputFormat:e=>{sr=e},setShouldMetaValidate:e=>{cr=e},FLAG:nr,BASIC:or,DETAILED:ar,VERBOSE:ir,add:(e,r="",t="")=>{const n=Xe.add(e,r,t);delete yr[n]},getKeyword:dr,hasKeyword:hr,defineVocabulary:(e,r)=>{vr[e]=r},compileSchema:mr,interpretSchema:br,collectEvaluatedProperties:(e,r,t,n,o)=>{const a=wr(e,t);return dr(a).collectEvaluatedProperties(e,r,t,n,o)},collectEvaluatedItems:(e,r,t,n,o)=>{const a=wr(e,t);return dr(a).collectEvaluatedItems(e,r,t,n,o)},addMediaTypePlugin:rr.addPlugin};const Sr=X,Or=n.exports,Cr=Er,Ar=q,Ir=Me;var jr={compile:async(e,r)=>{const t=Ir.uri(e);if(!(t in r)){r[t]=!1;const n=Ir.value(e);if(!["object","boolean"].includes(typeof n))throw Error(`No schema found at '${Ir.uri(e)}'`);r[t]=[`${e.dialectId}#validate`,Ir.uri(e),"boolean"==typeof n?n:await Sr.pipeline([Ir.entries,Sr.map((([r,t])=>[`${e.dialectId}#${r}`,t])),Sr.filter((([r])=>r!==`${e.dialectId}#validate`)),Sr.map((async([t,n])=>{const o=await Cr.getKeyword(t).compile(n,r,e);return[t,Ir.uri(n),o]})),Sr.all],e)]}return t},interpret:(e,r,t,n)=>{const[o,a,i]=t[e];Or.publishSync("result.start");const s="boolean"==typeof i?i:i.every((([e,o,a])=>{Or.publishSync("result.start");const i=Cr.getKeyword(e).interpret(a,r,t,n);return Or.publishSync("result",{keyword:e,absoluteKeywordLocation:o,instanceLocation:Ar.uri(r),valid:i,ast:a}),Or.publishSync("result.end"),i}));return Or.publishSync("result",{keyword:o,absoluteKeywordLocation:a,instanceLocation:Ar.uri(r),valid:s,ast:e}),Or.publishSync("result.end"),s},collectEvaluatedProperties:(e,r,t,n,o=!1)=>{const a=t[e][2];return"boolean"==typeof a?!!a&&[]:a.filter((([e])=>!o||!e.endsWith("#unevaluatedProperties"))).reduce(((e,[o,,a])=>{const i=e&&Cr.getKeyword(o).collectEvaluatedProperties(a,r,t,n);return!1!==i&&[...e,...i]}),[])},collectEvaluatedItems:(e,r,t,n,o=!1)=>{const a=t[e][2];return"boolean"==typeof a?!!a&&new Set:a.filter((([e])=>!o||!e.endsWith("#unevaluatedItems"))).reduce(((e,[o,,a])=>{const i=!1!==e&&Cr.getKeyword(o).collectEvaluatedItems(a,r,t,n);return!1!==i&&new Set([...e,...i])}),new Set)}};var Tr={Core:Er,Schema:Me,Instance:q,Reference:O,Keywords:{metaData:Be,validate:jr},InvalidSchemaError:Ze};return e.default=Tr,Object.defineProperty(e,"__esModule",{value:!0}),e}({});
var JSC=function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},r=function(e,t){return function r(){null==t&&(t=e.length);var n=[].slice.call(arguments);return n.length>=t?e.apply(this,n):function(){return r.apply(this,n.concat([].slice.call(arguments)))}}};var n={exports:{}};!function(e,r){!function(t,n){var o={};t.PubSub?(o=t.PubSub,console.warn("PubSub already loaded, using existing version")):(t.PubSub=o,function(e){var t={},r=-1,n="*";function o(e){var t;for(t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!0;return!1}function a(e){return function(){throw e}}function i(e,t,r){try{e(t,r)}catch(e){setTimeout(a(e),0)}}function s(e,t,r){e(t,r)}function c(e,r,n,o){var a,c=t[r],u=o?s:i;if(Object.prototype.hasOwnProperty.call(t,r))for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&u(c[a],e,n)}function u(e,t,r){return function(){var o=String(e),a=o.lastIndexOf(".");for(c(e,e,t,r);-1!==a;)a=(o=o.substr(0,a)).lastIndexOf("."),c(e,o,t,r);c(e,n,t,r)}}function l(e){var r=String(e);return Boolean(Object.prototype.hasOwnProperty.call(t,r)&&o(t[r]))}function p(e){for(var t=String(e),r=l(t)||l(n),o=t.lastIndexOf(".");!r&&-1!==o;)o=(t=t.substr(0,o)).lastIndexOf("."),r=l(t);return r}function f(e,t,r,n){var o=u(e="symbol"==typeof e?e.toString():e,t,n);return!!p(e)&&(!0===r?o():setTimeout(o,0),!0)}e.publish=function(t,r){return f(t,r,!1,e.immediateExceptions)},e.publishSync=function(t,r){return f(t,r,!0,e.immediateExceptions)},e.subscribe=function(e,n){if("function"!=typeof n)return!1;e="symbol"==typeof e?e.toString():e,Object.prototype.hasOwnProperty.call(t,e)||(t[e]={});var o="uid_"+String(++r);return t[e][o]=n,o},e.subscribeAll=function(t){return e.subscribe(n,t)},e.subscribeOnce=function(t,r){var n=e.subscribe(t,(function(){e.unsubscribe(n),r.apply(this,arguments)}));return e},e.clearAllSubscriptions=function(){t={}},e.clearSubscriptions=function(e){var r;for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&0===r.indexOf(e)&&delete t[r]},e.countSubscriptions=function(e){var r,n,o=0;for(r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&0===r.indexOf(e)){for(n in t[r])o++;break}return o},e.getSubscriptions=function(e){var r,n=[];for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&0===r.indexOf(e)&&n.push(r);return n},e.unsubscribe=function(r){var n,o,a,i=function(e){var r;for(r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&0===r.indexOf(e))return!0;return!1},s="string"==typeof r&&(Object.prototype.hasOwnProperty.call(t,r)||i(r)),c=!s&&"string"==typeof r,u="function"==typeof r,l=!1;if(!s){for(n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(o=t[n],c&&o[r]){delete o[r],l=r;break}if(u)for(a in o)Object.prototype.hasOwnProperty.call(o,a)&&o[a]===r&&(delete o[a],l=!0)}return l}e.clearSubscriptions(r)}}(o)),void 0!==e&&e.exports&&(r=e.exports=o),r.PubSub=o,e.exports=r=o}("object"==typeof window&&window||t)}(n,n.exports);var o={exports:{}};
/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */!function(e,t){!function(e){function t(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(t.length>1){t[0]=t[0].slice(0,-1);for(var n=t.length-1,o=1;o<n;++o)t[o]=t[o].slice(1,-1);return t[n]=t[n].slice(1),t.join("")}return t[0]}function r(e){return"(?:"+e+")"}function n(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function a(e){return null!=e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function i(e,t){var r=e;if(t)for(var n in t)r[n]=t[n];return r}function s(e){var n="[A-Za-z]",o="[0-9]",a=t(o,"[A-Fa-f]"),i=r(r("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+r("%[89A-Fa-f]"+a+"%"+a+a)+"|"+r("%"+a+a)),s="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",c=t("[\\:\\/\\?\\#\\[\\]\\@]",s),u=e?"[\\uE000-\\uF8FF]":"[]",l=t(n,o,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");r(n+t(n,o,"[\\+\\-\\.]")+"*"),r(r(i+"|"+t(l,s,"[\\:]"))+"*");var p=r(r("25[0-5]")+"|"+r("2[0-4]"+o)+"|"+r("1"+o+o)+"|"+r("0?[1-9]"+o)+"|0?0?"+o),f=r(p+"\\."+p+"\\."+p+"\\."+p),h=r(a+"{1,4}"),d=r(r(h+"\\:"+h)+"|"+f),v=r(r(h+"\\:")+"{6}"+d),y=r("\\:\\:"+r(h+"\\:")+"{5}"+d),g=r(r(h)+"?\\:\\:"+r(h+"\\:")+"{4}"+d),m=r(r(r(h+"\\:")+"{0,1}"+h)+"?\\:\\:"+r(h+"\\:")+"{3}"+d),b=r(r(r(h+"\\:")+"{0,2}"+h)+"?\\:\\:"+r(h+"\\:")+"{2}"+d),w=r(r(r(h+"\\:")+"{0,3}"+h)+"?\\:\\:"+h+"\\:"+d),E=r(r(r(h+"\\:")+"{0,4}"+h)+"?\\:\\:"+d),x=r(r(r(h+"\\:")+"{0,5}"+h)+"?\\:\\:"+h),S=r(r(r(h+"\\:")+"{0,6}"+h)+"?\\:\\:"),O=r([v,y,g,m,b,w,E,x,S].join("|")),C=r(r(l+"|"+i)+"+");r("[vV]"+a+"+\\."+t(l,s,"[\\:]")+"+"),r(r(i+"|"+t(l,s))+"*");var A=r(i+"|"+t(l,s,"[\\:\\@]"));return r(r(i+"|"+t(l,s,"[\\@]"))+"+"),r(r(A+"|"+t("[\\/\\?]",u))+"*"),{NOT_SCHEME:new RegExp(t("[^]",n,o,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(t("[^\\%\\:]",l,s),"g"),NOT_HOST:new RegExp(t("[^\\%\\[\\]\\:]",l,s),"g"),NOT_PATH:new RegExp(t("[^\\%\\/\\:\\@]",l,s),"g"),NOT_PATH_NOSCHEME:new RegExp(t("[^\\%\\/\\@]",l,s),"g"),NOT_QUERY:new RegExp(t("[^\\%]",l,s,"[\\:\\@\\/\\?]",u),"g"),NOT_FRAGMENT:new RegExp(t("[^\\%]",l,s,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(t("[^]",l,s),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(t("[^\\%]",l,c),"g"),PCT_ENCODED:new RegExp(i,"g"),IPV4ADDRESS:new RegExp("^("+f+")$"),IPV6ADDRESS:new RegExp("^\\[?("+O+")"+r(r("\\%25|\\%(?!"+a+"{2})")+"("+C+")")+"?\\]?$")}}var c=s(!1),u=s(!0),l=function(){function e(e,t){var r=[],n=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(n=(i=s.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(o)throw a}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),p=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)},f=2147483647,h=36,d=1,v=26,y=38,g=700,m=72,b=128,w="-",E=/^xn--/,x=/[^\0-\x7E]/,S=/[\x2E\u3002\uFF0E\uFF61]/g,O={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},C=h-d,A=Math.floor,k=String.fromCharCode;function T(e){throw new RangeError(O[e])}function j(e,t){for(var r=[],n=e.length;n--;)r[n]=t(e[n]);return r}function I(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+j((e=e.replace(S,".")).split("."),t).join(".")}function $(e){for(var t=[],r=0,n=e.length;r<n;){var o=e.charCodeAt(r++);if(o>=55296&&o<=56319&&r<n){var a=e.charCodeAt(r++);56320==(64512&a)?t.push(((1023&o)<<10)+(1023&a)+65536):(t.push(o),r--)}else t.push(o)}return t}var P=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:h},R=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},N=function(e,t,r){var n=0;for(e=r?A(e/g):e>>1,e+=A(e/t);e>C*v>>1;n+=h)e=A(e/C);return A(n+(C+1)*e/(e+y))},D=function(e){var t=[],r=e.length,n=0,o=b,a=m,i=e.lastIndexOf(w);i<0&&(i=0);for(var s=0;s<i;++s)e.charCodeAt(s)>=128&&T("not-basic"),t.push(e.charCodeAt(s));for(var c=i>0?i+1:0;c<r;){for(var u=n,l=1,p=h;;p+=h){c>=r&&T("invalid-input");var y=P(e.charCodeAt(c++));(y>=h||y>A((f-n)/l))&&T("overflow"),n+=y*l;var g=p<=a?d:p>=a+v?v:p-a;if(y<g)break;var E=h-g;l>A(f/E)&&T("overflow"),l*=E}var x=t.length+1;a=N(n-u,x,0==u),A(n/x)>f-o&&T("overflow"),o+=A(n/x),n%=x,t.splice(n++,0,o)}return String.fromCodePoint.apply(String,t)},_=function(e){var t=[],r=(e=$(e)).length,n=b,o=0,a=m,i=!0,s=!1,c=void 0;try{for(var u,l=e[Symbol.iterator]();!(i=(u=l.next()).done);i=!0){var p=u.value;p<128&&t.push(k(p))}}catch(e){s=!0,c=e}finally{try{!i&&l.return&&l.return()}finally{if(s)throw c}}var y=t.length,g=y;for(y&&t.push(w);g<r;){var E=f,x=!0,S=!1,O=void 0;try{for(var C,j=e[Symbol.iterator]();!(x=(C=j.next()).done);x=!0){var I=C.value;I>=n&&I<E&&(E=I)}}catch(e){S=!0,O=e}finally{try{!x&&j.return&&j.return()}finally{if(S)throw O}}var P=g+1;E-n>A((f-o)/P)&&T("overflow"),o+=(E-n)*P,n=E;var D=!0,_=!1,F=void 0;try{for(var q,U=e[Symbol.iterator]();!(D=(q=U.next()).done);D=!0){var z=q.value;if(z<n&&++o>f&&T("overflow"),z==n){for(var L=o,H=h;;H+=h){var V=H<=a?d:H>=a+v?v:H-a;if(L<V)break;var M=L-V,J=h-V;t.push(k(R(V+M%J,0))),L=A(M/J)}t.push(k(R(L,0))),a=N(o,P,g==y),o=0,++g}}}catch(e){_=!0,F=e}finally{try{!D&&U.return&&U.return()}finally{if(_)throw F}}++o,++n}return t.join("")},F=function(e){return I(e,(function(e){return E.test(e)?D(e.slice(4).toLowerCase()):e}))},q=function(e){return I(e,(function(e){return x.test(e)?"xn--"+_(e):e}))},U={version:"2.1.0",ucs2:{decode:$,encode:function(e){return String.fromCodePoint.apply(String,p(e))}},decode:D,encode:_,toASCII:q,toUnicode:F},z={};function L(e){var t=e.charCodeAt(0);return t<16?"%0"+t.toString(16).toUpperCase():t<128?"%"+t.toString(16).toUpperCase():t<2048?"%"+(t>>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function H(e){for(var t="",r=0,n=e.length;r<n;){var o=parseInt(e.substr(r+1,2),16);if(o<128)t+=String.fromCharCode(o),r+=3;else if(o>=194&&o<224){if(n-r>=6){var a=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((31&o)<<6|63&a)}else t+=e.substr(r,6);r+=6}else if(o>=224){if(n-r>=9){var i=parseInt(e.substr(r+4,2),16),s=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&s)}else t+=e.substr(r,9);r+=9}else t+=e.substr(r,3),r+=3}return t}function V(e,t){function r(e){var r=H(e);return r.match(t.UNRESERVED)?r:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,r).replace(t.NOT_USERINFO,L).replace(t.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_HOST,L).replace(t.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,r).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,L).replace(t.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,r).replace(t.NOT_QUERY,L).replace(t.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,r).replace(t.NOT_FRAGMENT,L).replace(t.PCT_ENCODED,o)),e}function M(e){return e.replace(/^0*(.*)/,"$1")||"0"}function J(e,t){var r=e.match(t.IPV4ADDRESS)||[],n=l(r,2)[1];return n?n.split(".").map(M).join("."):e}function B(e,t){var r=e.match(t.IPV6ADDRESS)||[],n=l(r,3),o=n[1],a=n[2];if(o){for(var i=o.toLowerCase().split("::").reverse(),s=l(i,2),c=s[0],u=s[1],p=u?u.split(":").map(M):[],f=c.split(":").map(M),h=t.IPV4ADDRESS.test(f[f.length-1]),d=h?7:8,v=f.length-d,y=Array(d),g=0;g<d;++g)y[g]=p[g]||f[v+g]||"";h&&(y[d-1]=J(y[d-1],t));var m=y.reduce((function(e,t,r){if(!t||"0"===t){var n=e[e.length-1];n&&n.index+n.length===r?n.length++:e.push({index:r,length:1})}return e}),[]).sort((function(e,t){return t.length-e.length}))[0],b=void 0;if(m&&m.length>1){var w=y.slice(0,m.index),E=y.slice(m.index+m.length);b=w.join(":")+"::"+E.join(":")}else b=y.join(":");return a&&(b+="%"+a),b}return e}var K=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,G=void 0==="".match(/(){0}/)[1];function Z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={},n=!1!==t.iri?u:c;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var o=e.match(K);if(o){G?(r.scheme=o[1],r.userinfo=o[3],r.host=o[4],r.port=parseInt(o[5],10),r.path=o[6]||"",r.query=o[7],r.fragment=o[8],isNaN(r.port)&&(r.port=o[5])):(r.scheme=o[1]||void 0,r.userinfo=-1!==e.indexOf("@")?o[3]:void 0,r.host=-1!==e.indexOf("//")?o[4]:void 0,r.port=parseInt(o[5],10),r.path=o[6]||"",r.query=-1!==e.indexOf("?")?o[7]:void 0,r.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(r.port)&&(r.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),r.host&&(r.host=B(J(r.host,n),n)),void 0!==r.scheme||void 0!==r.userinfo||void 0!==r.host||void 0!==r.port||r.path||void 0!==r.query?void 0===r.scheme?r.reference="relative":void 0===r.fragment?r.reference="absolute":r.reference="uri":r.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==r.reference&&(r.error=r.error||"URI is not a "+t.reference+" reference.");var a=z[(t.scheme||r.scheme||"").toLowerCase()];if(t.unicodeSupport||a&&a.unicodeSupport)V(r,n);else{if(r.host&&(t.domainHost||a&&a.domainHost))try{r.host=U.toASCII(r.host.replace(n.PCT_ENCODED,H).toLowerCase())}catch(e){r.error=r.error||"Host's domain name can not be converted to ASCII via punycode: "+e}V(r,c)}a&&a.parse&&a.parse(r,t)}else r.error=r.error||"URI can not be parsed.";return r}function W(e,t){var r=!1!==t.iri?u:c,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(B(J(String(e.host),r),r).replace(r.IPV6ADDRESS,(function(e,t,r){return"["+t+(r?"%25"+r:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}var Q=/^\.\.?\//,Y=/^\/\.(\/|$)/,X=/^\/\.\.(\/|$)/,ee=/^\/?(?:.|\n)*?(?=\/|$)/;function te(e){for(var t=[];e.length;)if(e.match(Q))e=e.replace(Q,"");else if(e.match(Y))e=e.replace(Y,"/");else if(e.match(X))e=e.replace(X,"/"),t.pop();else if("."===e||".."===e)e="";else{var r=e.match(ee);if(!r)throw new Error("Unexpected dot segment condition");var n=r[0];e=e.slice(n.length),t.push(n)}return t.join("")}function re(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.iri?u:c,n=[],o=z[(t.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,t),e.host)if(r.IPV6ADDRESS.test(e.host));else if(t.domainHost||o&&o.domainHost)try{e.host=t.iri?U.toUnicode(e.host):U.toASCII(e.host.replace(r.PCT_ENCODED,H).toLowerCase())}catch(r){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+r}V(e,r),"suffix"!==t.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var a=W(e,t);if(void 0!==a&&("suffix"!==t.reference&&n.push("//"),n.push(a),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var i=e.path;t.absolutePath||o&&o.absolutePath||(i=te(i)),void 0===a&&(i=i.replace(/^\/\//,"/%2F")),n.push(i)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function ne(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=Z(re(e,r),r),t=Z(re(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=te(t.path||""),n.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=te(t.path||""),n.query=t.query):(t.path?("/"===t.path.charAt(0)?n.path=te(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path:n.path="/"+t.path,n.path=te(n.path)),n.query=t.query):(n.path=e.path,void 0!==t.query?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function oe(e,t,r){var n=i({scheme:"null"},r);return re(ne(Z(e,n),Z(t,n),n,!0),n)}function ae(e,t){return"string"==typeof e?e=re(Z(e,t),t):"object"===n(e)&&(e=Z(re(e,t),t)),e}function ie(e,t,r){return"string"==typeof e?e=re(Z(e,r),r):"object"===n(e)&&(e=re(e,r)),"string"==typeof t?t=re(Z(t,r),r):"object"===n(t)&&(t=re(t,r)),e===t}function se(e,t){return e&&e.toString().replace(t&&t.iri?u.ESCAPE:c.ESCAPE,L)}function ce(e,t){return e&&e.toString().replace(t&&t.iri?u.PCT_ENCODED:c.PCT_ENCODED,H)}var ue={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){var r="https"===String(e.scheme).toLowerCase();return e.port!==(r?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},le={scheme:"https",domainHost:ue.domainHost,parse:ue.parse,serialize:ue.serialize};function pe(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var fe={scheme:"ws",domainHost:!0,parse:function(e,t){var r=e;return r.secure=pe(r),r.resourceName=(r.path||"/")+(r.query?"?"+r.query:""),r.path=void 0,r.query=void 0,r},serialize:function(e,t){if(e.port!==(pe(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var r=e.resourceName.split("?"),n=l(r,2),o=n[0],a=n[1];e.path=o&&"/"!==o?o:void 0,e.query=a,e.resourceName=void 0}return e.fragment=void 0,e}},he={scheme:"wss",domainHost:fe.domainHost,parse:fe.parse,serialize:fe.serialize},de={},ve="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ye="[0-9A-Fa-f]",ge=r(r("%[EFef]"+ye+"%"+ye+ye+"%"+ye+ye)+"|"+r("%[89A-Fa-f]"+ye+"%"+ye+ye)+"|"+r("%"+ye+ye)),me="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",be=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),we="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Ee=new RegExp(ve,"g"),xe=new RegExp(ge,"g"),Se=new RegExp(t("[^]",me,"[\\.]",'[\\"]',be),"g"),Oe=new RegExp(t("[^]",ve,we),"g"),Ce=Oe;function Ae(e){var t=H(e);return t.match(Ee)?t:e}var ke={scheme:"mailto",parse:function(e,t){var r=e,n=r.to=r.path?r.path.split(","):[];if(r.path=void 0,r.query){for(var o=!1,a={},i=r.query.split("&"),s=0,c=i.length;s<c;++s){var u=i[s].split("=");switch(u[0]){case"to":for(var l=u[1].split(","),p=0,f=l.length;p<f;++p)n.push(l[p]);break;case"subject":r.subject=ce(u[1],t);break;case"body":r.body=ce(u[1],t);break;default:o=!0,a[ce(u[0],t)]=ce(u[1],t)}}o&&(r.headers=a)}r.query=void 0;for(var h=0,d=n.length;h<d;++h){var v=n[h].split("@");if(v[0]=ce(v[0]),t.unicodeSupport)v[1]=ce(v[1],t).toLowerCase();else try{v[1]=U.toASCII(ce(v[1],t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[h]=v.join("@")}return r},serialize:function(e,t){var r=e,n=a(e.to);if(n){for(var i=0,s=n.length;i<s;++i){var c=String(n[i]),u=c.lastIndexOf("@"),l=c.slice(0,u).replace(xe,Ae).replace(xe,o).replace(Se,L),p=c.slice(u+1);try{p=t.iri?U.toUnicode(p):U.toASCII(ce(p,t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+e}n[i]=l+"@"+p}r.path=n.join(",")}var f=e.headers=e.headers||{};e.subject&&(f.subject=e.subject),e.body&&(f.body=e.body);var h=[];for(var d in f)f[d]!==de[d]&&h.push(d.replace(xe,Ae).replace(xe,o).replace(Oe,L)+"="+f[d].replace(xe,Ae).replace(xe,o).replace(Ce,L));return h.length&&(r.query=h.join("&")),r}},Te=/^([^\:]+)\:(.*)/,je={scheme:"urn",parse:function(e,t){var r=e.path&&e.path.match(Te),n=e;if(r){var o=t.scheme||n.scheme||"urn",a=r[1].toLowerCase(),i=r[2],s=o+":"+(t.nid||a),c=z[s];n.nid=a,n.nss=i,n.path=void 0,c&&(n=c.parse(n,t))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,t){var r=t.scheme||e.scheme||"urn",n=e.nid,o=r+":"+(t.nid||n),a=z[o];a&&(e=a.serialize(e,t));var i=e,s=e.nss;return i.path=(n||t.nid)+":"+s,i}},Ie=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,$e={scheme:"urn:uuid",parse:function(e,t){var r=e;return r.uuid=r.nss,r.nss=void 0,t.tolerant||r.uuid&&r.uuid.match(Ie)||(r.error=r.error||"UUID is not valid."),r},serialize:function(e,t){var r=e;return r.nss=(e.uuid||"").toLowerCase(),r}};z[ue.scheme]=ue,z[le.scheme]=le,z[fe.scheme]=fe,z[he.scheme]=he,z[ke.scheme]=ke,z[je.scheme]=je,z[$e.scheme]=$e,e.SCHEMES=z,e.pctEncChar=L,e.pctDecChars=H,e.parse=Z,e.removeDotSegments=te,e.serialize=re,e.resolveComponents=ne,e.resolve=oe,e.normalize=ae,e.equal=ie,e.escapeComponent=se,e.unescapeComponent=ce,Object.defineProperty(e,"__esModule",{value:!0})}(t)}(0,o.exports);const a=o.exports,i={null:e=>null===e,boolean:e=>"boolean"==typeof e,object:e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,array:e=>Array.isArray(e),number:e=>"number"==typeof e,integer:e=>Number.isInteger(e),string:e=>"string"==typeof e};var s={jsonTypeOf:(e,t)=>i[t](e),resolveUrl:(e,t)=>{const r=a.resolve(e,t,{iri:!0});if(a.resolve(e,"",{iri:!0})&&"file"===a.parse(r).scheme&&"file"!==a.parse(e).scheme)throw Error(`Can't access file '${r}' resource from network context '${e}'`);return r},urlFragment:e=>a.unescapeComponent(a.parse(e).fragment)||"",pathRelative:(e,t)=>{if(e===t)return"";let r=1;const n=e.length-1,o=t.length-r,a=n<o?n:o;let i=-1,s=0;for(;s<a;s++){const n=e.charCodeAt(s+1);if(n!==t.charCodeAt(r+s))break;47===n&&(i=s)}if(o>a){if(47===t.charCodeAt(r+s))return t.slice(r+s+1);if(0===s)return t.slice(r+s)}n>a&&(47===e.charCodeAt(s+1)?i=s:0===a&&(i=0));let c="";for(s=i+2;s<=e.length;++s)s!==e.length&&47!==e.charCodeAt(s)||(c+=0===c.length?"..":"/..");return r+=i,c.length>0?`${c}${t.slice(r,t.length)}`:(47===t.charCodeAt(r)&&++r,t.slice(r,t.length))}};const c=r,u=e=>{if(e.length>0&&"/"!==e[0])throw Error("Invalid JSON Pointer");return e.split("/").slice(1).map(y)},l=(e,t,r,n)=>{if(0===e.length)return r;if(e.length>1){if(Array.isArray(t)){const o=e.shift(),a=[...t];return a[o]=l(e,m(t,o,n),r,d(o,n)),a}{const o=e.shift();return{...t,[o]:l(e,m(t,o,n),r,d(o,n))}}}if(Array.isArray(t)){const n=[...t];return n[g(t,e[0])]=r,n}return"object"==typeof t&&null!==t?{...t,[e[0]]:r}:m(t,e[0],n)},p=(e,t,r,n)=>{if(0!==e.length)if(1!==e.length||b(t)){const o=e.shift();p(e,m(t,o,n),r,d(o,n))}else{t[g(t,e[0])]=r}},f=(e,t,r)=>{if(0!=e.length){if(e.length>1){const n=e.shift(),o=m(t,n,r);return{...t,[n]:f(e,o,d(n,r))}}if(Array.isArray(t))return t.filter(((t,r)=>r!=e[0]));if("object"==typeof t&&null!==t){const{[e[0]]:r,...n}=t;return n}return m(t,e[0],r)}},h=(e,t,r)=>{if(0!==e.length)if(e.length>1){const n=e.shift(),o=m(t,n,r);h(e,o,d(n,r))}else Array.isArray(t)?t.splice(e[0],1):"object"==typeof t&&null!==t?delete t[e[0]]:m(t,e[0],r)},d=c(((e,t)=>t+"/"+v(e))),v=e=>e.toString().replace(/~/g,"~0").replace(/\//g,"~1"),y=e=>e.toString().replace(/~1/g,"/").replace(/~0/g,"~"),g=(e,t)=>Array.isArray(e)&&"-"===t?e.length:t,m=(e,t,r="")=>{if(void 0===e)throw TypeError(`Value at '${r}' is undefined and does not have property '${t}'`);if(null===e)throw TypeError(`Value at '${r}' is null and does not have property '${t}'`);if(b(e))throw TypeError(`Value at '${r}' is a ${typeof e} and does not have property '${t}'`);return e[g(e,t)]},b=e=>null===e||"object"!=typeof e;var w={nil:"",append:d,get:(e,t)=>{const r=u(e),n=e=>r.reduce((([e,t],r)=>[m(e,r,t),d(r,t)]),[e,""])[0];return void 0===t?n:n(t)},set:(e,t,r)=>{const n=u(e),o=c(((e,t)=>l(n,e,t,"")));return void 0===t?o:o(t,r)},assign:(e,t,r)=>{const n=u(e),o=c(((e,t)=>p(n,e,t,"")));return void 0===t?o:o(t,r)},unset:(e,t)=>{const r=u(e),n=e=>f(r,e,"");return void 0===t?n:n(t)},remove:(e,t)=>{const r=u(e),n=e=>h(r,e,"");return void 0===t?n:n(t)}};const E=Symbol("$__value"),x=Symbol("$__href");var S={cons:(e,t)=>Object.freeze({[x]:e,[E]:t}),isReference:e=>e&&void 0!==e[x],href:e=>e[x],value:e=>e[E]};const O=w,C=r,{resolveUrl:A,jsonTypeOf:k}=s,T=S,j=Object.freeze({id:"",pointer:"",instance:void 0,value:void 0}),I=e=>T.isReference(e.value)?T.value(e.value):e.value,$=C(((e,t)=>k(I(e),t))),P=(e,t)=>Object.freeze({...t,pointer:O.append(e,t.pointer),value:I(t)[e]}),R=C(((e,t)=>I(t).map(((r,n,o,a)=>e(P(n,t),n,o,a))))),N=C(((e,t)=>I(t).forEach(((r,n,o,a)=>e(P(n,t),n,o,a))))),D=C(((e,t)=>I(t).map(((e,r,n,o)=>P(r,t))).filter(((t,r,n,o)=>e(t,r,n,o))))),_=C(((e,t,r)=>I(r).reduce(((t,n,o)=>e(t,P(o,r),o)),t))),F=C(((e,t)=>I(t).every(((r,n,o,a)=>e(P(n,t),n,o,a))))),q=C(((e,t)=>I(t).some(((r,n,o,a)=>e(P(n,t),n,o,a)))));var U={nil:j,cons:(e,t="")=>Object.freeze({...j,id:A(t,""),instance:e,value:e}),get:(e,t=j)=>{if(!e.startsWith("#"))throw Error(`No JSON document found at '${e.split("#")[0]}'`);return Object.freeze({...t,pointer:e.substr(1)})},uri:e=>`${e.id}#${encodeURI(e.pointer)}`,value:I,has:(e,t)=>e in I(t),typeOf:$,length:e=>I(e).length,step:P,entries:e=>Object.keys(I(e)).map((t=>[t,P(t,e)])),keys:e=>Object.keys(I(e)),map:R,forEach:N,filter:D,reduce:_,every:F,some:q},z=async e=>Object.entries(await e),L=function(e,t){return function r(){null==t&&(t=e.length);var n=[].slice.call(arguments);return n.length>=t?e.apply(this,n):function(){return r.apply(this,n.concat([].slice.call(arguments)))}}};var H=L((async(e,t)=>(await t).map(e)));var V=L((async(e,t,r)=>(await r).reduce((async(t,r)=>e(await t,r)),t)));const M=V;var J=L((async(e,t,r={})=>M((async(t,r)=>await e(r)?t.concat([r]):t),[],t,r)));const B=H;var K=L((async(e,t)=>{const r=await B(e,t);return(await Promise.all(r)).some((e=>e))}));const G=H;var Z=L((async(e,t)=>{const r=await G(e,t);return(await Promise.all(r)).every((e=>e))}));var W=L(((e,t)=>e.reduce((async(e,t)=>t(await e)),t)));const Q=W,Y=z,X=V;var ee,te,re,ne={entries:z,map:H,filter:J,reduce:V,some:K,every:Z,pipeline:W,all:e=>Promise.all(e),allValues:e=>Q([Y,X((async(e,[t,r])=>(e[t]=await r,e)),{})],e)},oe={exports:{}};te=t,re=function(){var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r="boolean"==typeof(new RegExp).sticky;function n(e){return e&&"[object RegExp]"===t.call(e)}function o(e){return e&&"object"==typeof e&&!n(e)&&!Array.isArray(e)}function a(e){return"("+e+")"}function i(e){return e.length?"(?:"+e.map((function(e){return"(?:"+e+")"})).join("|")+")":"(?!)"}function s(e){if("string"==typeof e)return"(?:"+e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+")";if(n(e)){if(e.ignoreCase)throw new Error("RegExp /i flag not allowed");if(e.global)throw new Error("RegExp /g flag is implied");if(e.sticky)throw new Error("RegExp /y flag is implied");if(e.multiline)throw new Error("RegExp /m flag is implied");return e.source}throw new Error("Not a pattern: "+e)}function c(t,r){if(o(r)||(r={match:r}),r.include)throw new Error("Matching rules cannot also include states");var a={defaultType:t,lineBreaks:!!r.error||!!r.fallback,pop:!1,next:null,push:null,error:!1,fallback:!1,value:null,type:null,shouldThrow:!1};for(var i in r)e.call(r,i)&&(a[i]=r[i]);if("string"==typeof a.type&&t!==a.type)throw new Error("Type transform cannot be a string (type '"+a.type+"' for token '"+t+"')");var s=a.match;return a.match=Array.isArray(s)?s:s?[s]:[],a.match.sort((function(e,t){return n(e)&&n(t)?0:n(t)?-1:n(e)?1:t.length-e.length})),a}function u(e){return Array.isArray(e)?function(e){for(var t=[],r=0;r<e.length;r++){var n=e[r];if(n.include)for(var o=[].concat(n.include),a=0;a<o.length;a++)t.push({include:o[a]});else{if(!n.type)throw new Error("Rule has no type: "+JSON.stringify(n));t.push(c(n.type,n))}}return t}(e):function(e){for(var t=Object.getOwnPropertyNames(e),r=[],n=0;n<t.length;n++){var a=t[n],i=e[a],s=[].concat(i);if("include"!==a){var u=[];s.forEach((function(e){o(e)?(u.length&&r.push(c(a,u)),r.push(c(a,e)),u=[]):u.push(e)})),u.length&&r.push(c(a,u))}else for(var l=0;l<s.length;l++)r.push({include:s[l]})}return r}(e)}var l=c("error",{lineBreaks:!0,shouldThrow:!0});function p(e,t){for(var o=null,c=Object.create(null),u=!0,p=null,f=[],h=[],d=0;d<e.length;d++)e[d].fallback&&(u=!1);for(d=0;d<e.length;d++){var v=e[d];if(v.include)throw new Error("Inheritance is not allowed in stateless lexers");if(v.error||v.fallback){if(o)throw!v.fallback==!o.fallback?new Error("Multiple "+(v.fallback?"fallback":"error")+" rules not allowed (for token '"+v.defaultType+"')"):new Error("fallback and error are mutually exclusive (for token '"+v.defaultType+"')");o=v}var y=v.match.slice();if(u)for(;y.length&&"string"==typeof y[0]&&1===y[0].length;)c[y.shift().charCodeAt(0)]=v;if(v.pop||v.push||v.next){if(!t)throw new Error("State-switching options are not allowed in stateless lexers (for token '"+v.defaultType+"')");if(v.fallback)throw new Error("State-switching options are not allowed on fallback tokens (for token '"+v.defaultType+"')")}if(0!==y.length){u=!1,f.push(v);for(var g=0;g<y.length;g++){var m=y[g];if(n(m))if(null===p)p=m.unicode;else if(p!==m.unicode&&!1===v.fallback)throw new Error("If one rule is /u then all must be")}var b=i(y.map(s)),w=new RegExp(b);if(w.test(""))throw new Error("RegExp matches empty string: "+w);if(new RegExp("|"+b).exec("").length-1>0)throw new Error("RegExp has capture groups: "+w+"\nUse (?: … ) instead");if(!v.lineBreaks&&w.test("\n"))throw new Error("Rule should declare lineBreaks: "+w);h.push(a(b))}}var E=o&&o.fallback,x=r&&!E?"ym":"gm",S=r||E?"":"|";return!0===p&&(x+="u"),{regexp:new RegExp(i(h)+S,x),groups:f,fast:c,error:o||l}}function f(e,t,r){var n=e&&(e.push||e.next);if(n&&!r[n])throw new Error("Missing state '"+n+"' (in token '"+e.defaultType+"' of state '"+t+"')");if(e&&e.pop&&1!=+e.pop)throw new Error("pop must be 1 (in token '"+e.defaultType+"' of state '"+t+"')")}var h=function(e,t){this.startState=t,this.states=e,this.buffer="",this.stack=[],this.reset()};h.prototype.reset=function(e,t){return this.buffer=e||"",this.index=0,this.line=t?t.line:1,this.col=t?t.col:1,this.queuedToken=t?t.queuedToken:null,this.queuedThrow=t?t.queuedThrow:null,this.setState(t?t.state:this.startState),this.stack=t&&t.stack?t.stack.slice():[],this},h.prototype.save=function(){return{line:this.line,col:this.col,state:this.state,stack:this.stack.slice(),queuedToken:this.queuedToken,queuedThrow:this.queuedThrow}},h.prototype.setState=function(e){if(e&&this.state!==e){this.state=e;var t=this.states[e];this.groups=t.groups,this.error=t.error,this.re=t.regexp,this.fast=t.fast}},h.prototype.popState=function(){this.setState(this.stack.pop())},h.prototype.pushState=function(e){this.stack.push(this.state),this.setState(e)};var d=r?function(e,t){return e.exec(t)}:function(e,t){var r=e.exec(t);return 0===r[0].length?null:r};function v(){return this.value}if(h.prototype._getGroup=function(e){for(var t=this.groups.length,r=0;r<t;r++)if(void 0!==e[r+1])return this.groups[r];throw new Error("Cannot find token type for matched text")},h.prototype.next=function(){var e=this.index;if(this.queuedGroup){var t=this._token(this.queuedGroup,this.queuedText,e);return this.queuedGroup=null,this.queuedText="",t}var r=this.buffer;if(e!==r.length){if(i=this.fast[r.charCodeAt(e)])return this._token(i,r.charAt(e),e);var n=this.re;n.lastIndex=e;var o=d(n,r),a=this.error;if(null==o)return this._token(a,r.slice(e,r.length),e);var i=this._getGroup(o),s=o[0];return a.fallback&&o.index!==e?(this.queuedGroup=i,this.queuedText=s,this._token(a,r.slice(e,o.index),e)):this._token(i,s,e)}},h.prototype._token=function(e,t,r){var n=0;if(e.lineBreaks){var o=/\n/g,a=1;if("\n"===t)n=1;else for(;o.exec(t);)n++,a=o.lastIndex}var i={type:"function"==typeof e.type&&e.type(t)||e.defaultType,value:"function"==typeof e.value?e.value(t):t,text:t,toString:v,offset:r,lineBreaks:n,line:this.line,col:this.col},s=t.length;if(this.index+=s,this.line+=n,0!==n?this.col=s-a+1:this.col+=s,e.shouldThrow)throw new Error(this.formatError(i,"invalid syntax"));return e.pop?this.popState():e.push?this.pushState(e.push):e.next&&this.setState(e.next),i},"undefined"!=typeof Symbol&&Symbol.iterator){var y=function(e){this.lexer=e};y.prototype.next=function(){var e=this.lexer.next();return{value:e,done:!e}},y.prototype[Symbol.iterator]=function(){return this},h.prototype[Symbol.iterator]=function(){return new y(this)}}return h.prototype.formatError=function(e,t){if(null==e){var r=this.buffer.slice(this.index);e={text:r,offset:this.index,lineBreaks:-1===r.indexOf("\n")?0:1,line:this.line,col:this.col}}var n=Math.max(0,e.offset-e.col+1),o=e.lineBreaks?e.text.indexOf("\n"):e.text.length,a=this.buffer.substring(n,e.offset+o);return t+=" at line "+e.line+" col "+e.col+":\n\n",t+=" "+a+"\n",t+=" "+Array(e.col).join(" ")+"^"},h.prototype.clone=function(){return new h(this.states,this.state)},h.prototype.has=function(e){return!0},{compile:function(e){var t=p(u(e));return new h({start:t},"start")},states:function(e,t){var r=e.$all?u(e.$all):[];delete e.$all;var n=Object.getOwnPropertyNames(e);t||(t=n[0]);for(var o=Object.create(null),a=0;a<n.length;a++)o[b=n[a]]=u(e[b]).concat(r);for(a=0;a<n.length;a++)for(var i=o[b=n[a]],s=Object.create(null),c=0;c<i.length;c++){var l=i[c];if(l.include){var d=[c,1];if(l.include!==b&&!s[l.include]){s[l.include]=!0;var v=o[l.include];if(!v)throw new Error("Cannot include nonexistent state '"+l.include+"' (in state '"+b+"')");for(var y=0;y<v.length;y++){var g=v[y];-1===i.indexOf(g)&&d.push(g)}}i.splice.apply(i,d),c--}}var m=Object.create(null);for(a=0;a<n.length;a++){var b;m[b=n[a]]=p(o[b],!0)}for(a=0;a<n.length;a++){var w=n[a],E=m[w],x=E.groups;for(c=0;c<x.length;c++)f(x[c],w,m);var S=Object.getOwnPropertyNames(E.fast);for(c=0;c<S.length;c++)f(E.fast[S[c]],w,m)}return new h(m,t)},error:Object.freeze({error:!0}),fallback:Object.freeze({fallback:!0}),keywords:function(e){for(var t=Object.create(null),r=Object.create(null),n=Object.getOwnPropertyNames(e),o=0;o<n.length;o++){var a=n[o],i=e[a];(Array.isArray(i)?i:[i]).forEach((function(e){if((r[e.length]=r[e.length]||[]).push(e),"string"!=typeof e)throw new Error("keyword must be string (in keyword '"+a+"')");t[e]=a}))}function s(e){return JSON.stringify(e)}var c="";for(var u in c+="switch (value.length) {\n",r){var l=r[u];c+="case "+u+":\n",c+="switch (value) {\n",l.forEach((function(e){var r=t[e];c+="case "+s(e)+": return "+s(r)+"\n"})),c+="}\n"}return c+="}\n",Function("value",c)}}},(ee=oe).exports?ee.exports=re():te.moo=re();const ae=oe.exports;const ie=w,se=e=>{const t=ae.states({main:{WS:{match:new RegExp("(?:(?:\\r?\\n)|[ \\t])+","u"),lineBreaks:!0},true:{match:"true",value:()=>!0},false:{match:"false",value:()=>!1},null:{match:"null",value:()=>null},number:{match:new RegExp("-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?:[eE][-+]?[0-9]+)?","u"),value:parseFloat},string:{match:new RegExp('"(?:[\\x20-\\x21\\x23-\\x5b\\x5d-\\u{10ffff}]|\\\\(?:["\\/\\\\brfnt]|u[0-9a-fA-F]{4}))*"',"u"),value:JSON.parse},"{":"{","}":"}","[":"[","]":"]",":":":",",":",",error:ae.error}});t.reset(e);const r=()=>{let e;do{if(e=t.next(),"error"===e?.type)throw SyntaxError(t.formatError(e,"Unrecognized token"))}while("WS"===e?.type);return e};let n,o=r();const a={offset:0,line:1,col:0,text:""};return{next:e=>{if(n=o,o=r(),e&&n?.type!==e)throw SyntaxError(t.formatError(n,`Expected a '${e}'`));return n},peek:()=>o,syntaxError:e=>{const r=n||a,o={...r,offset:r.offset+r.text.length,col:r.col+r.text.length};throw new SyntaxError(t.formatError(o,e))}}},ce=(e,t)=>t,ue=(e,t,r,n)=>{let o;const a=e.next();switch(a?.type){case"true":case"false":case"null":case"number":case"string":o=a.value;break;case"{":o=le(e,t,r,n);break;case"[":o=fe(e,t,r,n);break;default:e.syntaxError("Expected a JSON value")}return n(t,o,r)},le=(e,t,r,n)=>{const o={};return"}"!==e.peek()?.type&&pe(e,t,r,n,o),e.next("}"),o},pe=(e,t,r,n,o)=>{const a=e.next("string").value;e.next(":"),ve(e.peek())||e.syntaxError("Expected a JSON value"),o[a]=ue(e,a,ie.append(a,r),n),","===e.peek()?.type?(e.next(),pe(e,a,r,n,o)):ve(e.peek())&&e.next(",")},fe=(e,t,r,n)=>{const o=[];return"]"!==e.peek()?.type&&he(e,0,r,n,o),e.next("]"),o},he=(e,t,r,n,o)=>{ve(e.peek())||e.syntaxError("Expected a JSON value"),o[t]=ue(e,t,ie.append(t,r),n),","===e.peek()?.type?(e.next(),he(e,t+1,r,n,o)):ve(e.peek())&&e.next(",")},de=new Set(["string","number","true","false","null","[","{"]),ve=e=>de.has(e?.type);var ye=(e,t=ce)=>{const r=se(e),n=ue(r,"",ie.nil,t);return r.peek()&&r.syntaxError("A value has been parsed, but more tokens were found"),n};const ge=w,me=(e,t)=>t,be=(e,t,r,n,o,a)=>{let i;return e=t(n,e,o),i=Array.isArray(e)?we(e,t,r,o,a):"object"==typeof e&&null!==e?Ee(e,t,r,o,a):JSON.stringify(e),i},we=(e,t,r,n,o)=>{0===e.length&&(r="");const a=r?`\n${r.repeat(o-1)}`:"";return"["+a+r+e.map(((e,a)=>{const i=ge.append(a,n);return be(e,t,r,a,i,o+1)})).join(`,${a}${r}`)+a+"]"},Ee=(e,t,r,n,o)=>{0===Object.keys(e).length&&(r="");const a=r?`\n${r.repeat(o-1)}`:"",i=r?" ":"";return"{"+a+r+Object.entries(e).map((([e,a])=>{const s=ge.append(e,n);return JSON.stringify(e)+":"+i+be(a,t,r,e,s,o+1)})).join(`,${a}${r}`)+a+"}"};var xe=(e,t=me,r="")=>be(e,t,r,"",ge.nil,1);var Se={parse:ye,stringify:xe},Oe=fetch,Ce={},Ae=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,ke=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,Te=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,je=/\\([\u000b\u0020-\u00ff])/g,Ie=/([\\"])/g,$e=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;function Pe(e){var t=String(e);if(Te.test(t))return t;if(t.length>0&&!ke.test(t))throw new TypeError("invalid parameter value");return'"'+t.replace(Ie,"\\$1")+'"'}function Re(e){this.parameters=Object.create(null),this.type=e}Ce.format=function(e){if(!e||"object"!=typeof e)throw new TypeError("argument obj is required");var t=e.parameters,r=e.type;if(!r||!$e.test(r))throw new TypeError("invalid type");var n=r;if(t&&"object"==typeof t)for(var o,a=Object.keys(t).sort(),i=0;i<a.length;i++){if(o=a[i],!Te.test(o))throw new TypeError("invalid parameter name");n+="; "+o+"="+Pe(t[o])}return n},Ce.parse=function(e){if(!e)throw new TypeError("argument string is required");var t="object"==typeof e?function(e){var t;"function"==typeof e.getHeader?t=e.getHeader("content-type"):"object"==typeof e.headers&&(t=e.headers&&e.headers["content-type"]);if("string"!=typeof t)throw new TypeError("content-type header is missing from object");return t}(e):e;if("string"!=typeof t)throw new TypeError("argument string is required to be a string");var r=t.indexOf(";"),n=-1!==r?t.substr(0,r).trim():t.trim();if(!$e.test(n))throw new TypeError("invalid media type");var o=new Re(n.toLowerCase());if(-1!==r){var a,i,s;for(Ae.lastIndex=r;i=Ae.exec(t);){if(i.index!==r)throw new TypeError("invalid parameter format");r+=i[0].length,a=i[1].toLowerCase(),'"'===(s=i[2])[0]&&(s=s.substr(1,s.length-2).replace(je,"$1")),o.parameters[a]=s}if(r!==t.length)throw new TypeError("invalid parameter format")}return o};const Ne=Ce,De={};var _e={addPlugin:(e,t)=>{De[e]=t},parse:e=>{const t=Ne.parse(e.headers.get("content-type"));if(!(t.type in De))throw Error(`${e.url} is not a schema. Found a document with media type: ${t.type}`);return De[t.type].parse(e,t.parameters)},getContentType:e=>{for(const t in De)if(De[t].matcher(e))return t;return"application/octet-stream"}};const Fe=r,qe=ne,Ue=Se,ze=w,{jsonTypeOf:Le,resolveUrl:He,urlFragment:Ve,pathRelative:Me}=s,Je=Oe,Be=S,Ke=_e,Ge="https://json-schema.org/draft/2019-09/vocab/core",Ze="https://json-schema.org/draft/2020-12/vocab/core",We={},Qe={},Ye=(e,t)=>{const r=Qe[e];return We[r]?.[t]},Xe={},et={},tt=(e,t="",r="")=>{e=JSON.parse(JSON.stringify(e));const n=He(t,""),o=He(e.$schema||r,"");if(!o)throw Error("Couldn't determine schema dialect");if(delete e.$schema,!(o in Qe))if(!0===e?.$vocabulary?.[Ge]&&o===rt(e,n,Ge)[0])Qe[o]=Ge;else if(!0===e?.$vocabulary?.[Ze]&&o===rt(e,n,Ze)[0])Qe[o]=Ze;else{const e=Xe[o];if(!e)throw Error(`Couldn't determine JSON Schema version for dialect: '${o}'`);!0===e.vocabulary[Ge]?Qe[o]=Ge:!0===e.vocabulary[Ze]?Qe[o]=Ze:Qe[o]=Qe[e.dialectId]}const[a,i]=rt(e,n,Qe[o]);if(!a)throw Error("Couldn't determine an identifier for the schema");const s=Ye(o,"baseToken");delete e[s],n&&(et[n]=a);const c=Ye(o,"anchorToken");i&&s===c&&(e[c]=c!==s?encodeURI(i):`#${encodeURI(i)}`);const u={},l=Ye(o,"recursiveAnchorToken");let p;!0===e[l]&&(u[""]=`${a}#`,e[c]="",delete e[l]);const f=Ye(o,"vocabularyToken");Le(e[f],"object")?(p=e[f],delete e[f]):p={[Qe[o]]:!0};const h={"":""};return Xe[a]={id:a,dialectId:o,schema:nt(e,a,o,ze.nil,h,u),anchors:h,dynamicAnchors:u,vocabulary:p,validated:!1},a},rt=(e,t,r)=>{const n=We[r]?.baseToken,o=He(t,e[n]||"");return[He(o,""),Ve(o)]},nt=(e,t,r,n,o,a)=>{if(Le(e,"object")){const i="string"==typeof e.$schema?He(e.$schema,""):r,s=Ye(i,"embeddedToken"),c=Ye(i,"anchorToken");if("string"==typeof e[s]&&(s!==c||"#"!==e[s][0])){const n=He(t,e[s]);return e[Ye(i,"baseToken")]=n,tt(e,n,r),Be.cons(e[s],e)}const u=Ye(r,"anchorToken"),l=Ye(r,"dynamicAnchorToken");"string"==typeof e[l]&&(a[e[l]]=`${t}#${encodeURI(n)}`,o[e[l]]=n,delete e[l]);const p=Ye(r,"embeddedToken");if("string"==typeof e[u]){const t=u!==p?e[u]:e[u].slice(1);o[t]=n,delete e[u]}const f=Ye(r,"jrefToken");if("string"==typeof e[f])return Be.cons(e[f],e);for(const i in e)e[i]=nt(e[i],t,r,ze.append(i,n),o,a);return e}return Array.isArray(e)?e.map(((e,i)=>nt(e,t,r,ze.append(i,n),o,a))):e},ot=e=>Xe[et[e]]||Xe[e],at=Object.freeze({id:"",dialectId:void 0,vocabulary:{},pointer:ze.nil,schema:void 0,value:void 0,anchors:{},dynamicAnchors:{},validated:!0}),it=async(e,t=at)=>{const r=He(ut(t),e),n=He(r,""),o=Ve(r);if(!(e=>e in Xe||e in et)(n)){const e=await Je(n,{headers:{Accept:"application/schema+json"}});if(e.status>=400)throw await e.text(),Error(`Failed to retrieve schema with id: ${n}`);const[t,r]=await Ke.parse(e);let o;o=t.$schema?He(t.$schema,""):r?He(n,r):"",o&&n!==o&&!(o in Qe)&&await it(o),tt(t,n,o)}const a=ot(n),i="/"!==o[0]?ct(a,o):o,s=Object.freeze({...a,pointer:i,value:ze.get(i,a.schema)});return st(s)},st=e=>Be.isReference(e.value)?it(Be.href(e.value),e):e,ct=(e,t)=>{if(!(t in e.anchors))throw Error(`No such anchor '${encodeURI(e.id)}#${encodeURI(t)}'`);return e.anchors[t]},ut=e=>`${e.id}#${encodeURI(e.pointer)}`,lt=e=>Be.isReference(e.value)?Be.value(e.value):e.value,pt=(e,t)=>{const r=ot(t.id),n=Object.freeze({...t,pointer:ze.append(e,t.pointer),value:lt(t)[e],validated:r.validated});return st(n)},ft=Fe(((e,t)=>qe.pipeline([lt,qe.map((async(r,n)=>e(await pt(n,t),n))),qe.all],t))),ht={parentId:"",parentDialect:"",includeEmbedded:!0},dt=(e,t)=>{if(t.startsWith("file://")){const r=e.slice(7,e.lastIndexOf("/"));return""===e?"":Me(r,t.slice(7))}return t};var vt={setConfig:(e,t,r)=>{Qe[e]=e,We[e]||(We[e]={}),We[e][t]=r},getConfig:Ye,add:tt,get:it,markValidated:e=>{Xe[e].validated=!0},uri:ut,value:lt,getAnchorPointer:ct,typeOf:(e,t)=>Le(lt(e),t),has:(e,t)=>e in lt(t),step:pt,keys:e=>Object.keys(lt(e)),entries:e=>qe.pipeline([lt,Object.keys,qe.map((async t=>[t,await pt(t,e)])),qe.all],e),map:ft,length:e=>lt(e).length,toSchema:(e,t={})=>{const r={...ht,...t},n=Ye(e.dialectId,"anchorToken"),o=Ye(e.dialectId,"dynamicAnchorToken"),a={};for(const t in e.anchors)""===t||e.dynamicAnchors[t]||(a[e.anchors[t]]=t);const i={};for(const t in e.dynamicAnchors){const r=Ve(e.dynamicAnchors[t]);i[r]=t}const s=JSON.parse(Ue.stringify(e.schema,((t,s,c)=>{if(Be.isReference(s)){const t=Be.value(s),n="string"==typeof t.$schema?He(t.$schema,""):e.dialectId,o=Ye(n,"embeddedToken");return!r.includeEmbedded&&o in t?void 0:Be.value(s)}return c in a&&(s={[n]:a[c],...s}),c in i&&(s={[o]:i[c],...s}),s}))),c=Ye(e.dialectId,"baseToken"),u=dt(r.parentId,e.id),l=r.parentDialect===e.dialectId?"":e.dialectId;return{...u&&{[c]:u},...l&&{$schema:l},...s}}};class yt extends Error{constructor(e){super("Invalid Schema"),this.name=this.constructor.name,this.output=e}}var gt=yt;const mt=vt;var bt={compile:e=>mt.value(e),interpret:()=>!0};const wt=r,Et=n.exports,{resolveUrl:xt}=s,St=U,Ot=vt,Ct=gt,At=_e,kt=bt,Tt="FLAG",jt="BASIC",It="DETAILED",$t="VERBOSE";let Pt=It,Rt=!0;At.addPlugin("application/schema+json",{parse:async(e,t)=>[await e.json(),t.schema||t.profile],matcher:e=>e.endsWith(".schema.json")});const Nt=async e=>{const t={metaData:{}};return{ast:t,schemaUri:await Ht(e,t)}},Dt=wt((({ast:e,schemaUri:t},r,n=Tt)=>{if(![Tt,jt,It,$t].includes(n))throw Error(`The '${n}' error format is not supported`);const o=[],a=Et.subscribe("result",_t(n,o));return Mt(t,r,e,{}),Et.unsubscribe(a),o[0]})),_t=(e,t)=>{const r=[];return(n,o)=>{if("result"===n){const{keyword:e,absoluteKeywordLocation:t,instanceLocation:n,valid:a}=o,i={keyword:e,absoluteKeywordLocation:t,instanceLocation:n,valid:a,errors:[]};r.push(i)}else if("result.start"===n)r.push(n);else if("result.end"===n){const n=r.pop();for(;"result.start"!==r[r.length-1];){const t=r.pop(),o=[t];e===jt&&(o.push(...t.errors),delete t.errors),(e===$t||e!==Tt&&!t.valid)&&n.errors.unshift(...o)}r[r.length-1]=n,t[0]=n}}},Ft={},qt=e=>Ft[e]||kt,Ut=e=>e in Ft,zt={},Lt={},Ht=async(e,t)=>{if(e=await Vt(e),!Ut(`${e.dialectId}#validate`)){const t=await Ot.get(e.dialectId);(Ot.getConfig(t.id,"mandatoryVocabularies")||[]).forEach((e=>{if(!t.vocabulary[e])throw Error(`Vocabulary '${e}' must be explicitly declared and required`)})),Object.entries(t.vocabulary).forEach((([e,r])=>{if(e in zt)Object.entries(zt[e]).forEach((([e,r])=>{((e,t)=>{Ft[e]={collectEvaluatedItems:(e,r,n,o,a)=>t.interpret(e,r,n,o,a)&&new Set,collectEvaluatedProperties:(e,r,n,o,a)=>t.interpret(e,r,n,o,a)&&[],...t}})(`${t.id}#${e}`,r)}));else if(r)throw Error(`Missing required vocabulary: ${e}`)}))}if(Rt&&!e.validated){if(Ot.markValidated(e.id),!(e.dialectId in Lt)){const t=await Ot.get(e.dialectId),r=await Nt(t);Lt[t.id]=Dt(r)}const t=St.cons(e.schema,e.id),r=Lt[e.dialectId](t,Pt);if(!r.valid)throw new Ct(r)}return e.id in t.metaData||(t.metaData[e.id]={id:e.id,dynamicAnchors:e.dynamicAnchors,anchors:e.anchors}),qt(`${e.dialectId}#validate`).compile(e,t)},Vt=async e=>Ot.typeOf(e,"string")?Vt(await Ot.get(Ot.value(e),e)):e,Mt=(e,t,r,n)=>{const o=Jt(e,r),a=xt(e,"");return qt(o).interpret(e,t,r,{...r.metaData[a].dynamicAnchors,...n})},Jt=(e,t)=>{if(!(e in t))throw Error(`No schema found at ${e}`);return t[e][0]};var Bt={validate:async(e,t,r)=>{const n=await Nt(e),o=(e,t)=>Dt(n,St.cons(e),t);return void 0===t?o:o(t,r)},compile:Nt,interpret:Dt,setMetaOutputFormat:e=>{Pt=e},setShouldMetaValidate:e=>{Rt=e},FLAG:Tt,BASIC:jt,DETAILED:It,VERBOSE:$t,add:(e,t="",r="")=>{const n=Ot.add(e,t,r);delete Lt[n]},getKeyword:qt,hasKeyword:Ut,defineVocabulary:(e,t)=>{zt[e]=t},compileSchema:Ht,interpretSchema:Mt,collectEvaluatedProperties:(e,t,r,n,o)=>{const a=Jt(e,r);return qt(a).collectEvaluatedProperties(e,t,r,n,o)},collectEvaluatedItems:(e,t,r,n,o)=>{const a=Jt(e,r);return qt(a).collectEvaluatedItems(e,t,r,n,o)},addMediaTypePlugin:At.addPlugin};const Kt=ne,Gt=n.exports,Zt=Bt,Wt=U,Qt=vt;var Yt={compile:async(e,t)=>{const r=Qt.uri(e);if(!(r in t)){t[r]=!1;const n=Qt.value(e);if(!["object","boolean"].includes(typeof n))throw Error(`No schema found at '${Qt.uri(e)}'`);t[r]=[`${e.dialectId}#validate`,Qt.uri(e),"boolean"==typeof n?n:await Kt.pipeline([Qt.entries,Kt.map((([t,r])=>[`${e.dialectId}#${t}`,r])),Kt.filter((([t])=>t!==`${e.dialectId}#validate`)),Kt.map((async([r,n])=>{const o=await Zt.getKeyword(r).compile(n,t,e);return[r,Qt.uri(n),o]})),Kt.all],e)]}return r},interpret:(e,t,r,n)=>{const[o,a,i]=r[e];Gt.publishSync("result.start");const s="boolean"==typeof i?i:i.every((([e,o,a])=>{Gt.publishSync("result.start");const i=Zt.getKeyword(e).interpret(a,t,r,n);return Gt.publishSync("result",{keyword:e,absoluteKeywordLocation:o,instanceLocation:Wt.uri(t),valid:i,ast:a}),Gt.publishSync("result.end"),i}));return Gt.publishSync("result",{keyword:o,absoluteKeywordLocation:a,instanceLocation:Wt.uri(t),valid:s,ast:e}),Gt.publishSync("result.end"),s},collectEvaluatedProperties:(e,t,r,n,o=!1)=>{const a=r[e][2];return"boolean"==typeof a?!!a&&[]:a.filter((([e])=>!o||!e.endsWith("#unevaluatedProperties"))).reduce(((e,[o,,a])=>{const i=e&&Zt.getKeyword(o).collectEvaluatedProperties(a,t,r,n);return!1!==i&&[...e,...i]}),[])},collectEvaluatedItems:(e,t,r,n,o=!1)=>{const a=r[e][2];return"boolean"==typeof a?!!a&&new Set:a.filter((([e])=>!o||!e.endsWith("#unevaluatedItems"))).reduce(((e,[o,,a])=>{const i=!1!==e&&Zt.getKeyword(o).collectEvaluatedItems(a,t,r,n);return!1!==i&&new Set([...e,...i])}),new Set)}};var Xt={Core:Bt,Schema:vt,Instance:U,Reference:S,Keywords:{metaData:bt,validate:Yt},InvalidSchemaError:gt};return e.default=Xt,Object.defineProperty(e,"__esModule",{value:!0}),e}({});
//# sourceMappingURL=json-schema-core-iife.min.js.map

@@ -1,3 +0,3 @@

System.register("JSC",[],(function(e){"use strict";return{execute:function(){var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=function(e,r){return function t(){null==r&&(r=e.length);var n=[].slice.call(arguments);return n.length>=r?e.apply(this,n):function(){return t.apply(this,n.concat([].slice.call(arguments)))}}};var n={exports:{}};!function(e,t){!function(r,n){var o={};r.PubSub?(o=r.PubSub,console.warn("PubSub already loaded, using existing version")):(r.PubSub=o,function(e){var r={},t=-1,n="*";function o(e){var r;for(r in e)if(Object.prototype.hasOwnProperty.call(e,r))return!0;return!1}function a(e){return function(){throw e}}function i(e,r,t){try{e(r,t)}catch(e){setTimeout(a(e),0)}}function s(e,r,t){e(r,t)}function c(e,t,n,o){var a,c=r[t],u=o?s:i;if(Object.prototype.hasOwnProperty.call(r,t))for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&u(c[a],e,n)}function u(e,r,t){return function(){var o=String(e),a=o.lastIndexOf(".");for(c(e,e,r,t);-1!==a;)a=(o=o.substr(0,a)).lastIndexOf("."),c(e,o,r,t);c(e,n,r,t)}}function l(e){var t=String(e);return Boolean(Object.prototype.hasOwnProperty.call(r,t)&&o(r[t]))}function p(e){for(var r=String(e),t=l(r)||l(n),o=r.lastIndexOf(".");!t&&-1!==o;)o=(r=r.substr(0,o)).lastIndexOf("."),t=l(r);return t}function f(e,r,t,n){var o=u(e="symbol"==typeof e?e.toString():e,r,n);return!!p(e)&&(!0===t?o():setTimeout(o,0),!0)}e.publish=function(r,t){return f(r,t,!1,e.immediateExceptions)},e.publishSync=function(r,t){return f(r,t,!0,e.immediateExceptions)},e.subscribe=function(e,n){if("function"!=typeof n)return!1;e="symbol"==typeof e?e.toString():e,Object.prototype.hasOwnProperty.call(r,e)||(r[e]={});var o="uid_"+String(++t);return r[e][o]=n,o},e.subscribeAll=function(r){return e.subscribe(n,r)},e.subscribeOnce=function(r,t){var n=e.subscribe(r,(function(){e.unsubscribe(n),t.apply(this,arguments)}));return e},e.clearAllSubscriptions=function(){r={}},e.clearSubscriptions=function(e){var t;for(t in r)Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)&&delete r[t]},e.countSubscriptions=function(e){var t,n,o=0;for(t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)){for(n in r[t])o++;break}return o},e.getSubscriptions=function(e){var t,n=[];for(t in r)Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)&&n.push(t);return n},e.unsubscribe=function(t){var n,o,a,i=function(e){var t;for(t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e))return!0;return!1},s="string"==typeof t&&(Object.prototype.hasOwnProperty.call(r,t)||i(t)),c=!s&&"string"==typeof t,u="function"==typeof t,l=!1;if(!s){for(n in r)if(Object.prototype.hasOwnProperty.call(r,n)){if(o=r[n],c&&o[t]){delete o[t],l=t;break}if(u)for(a in o)Object.prototype.hasOwnProperty.call(o,a)&&o[a]===t&&(delete o[a],l=!0)}return l}e.clearSubscriptions(t)}}(o)),void 0!==e&&e.exports&&(t=e.exports=o),t.PubSub=o,e.exports=t=o}("object"==typeof window&&window||r)}(n,n.exports);var o={exports:{}};
/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */!function(e,r){!function(e){function r(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length>1){r[0]=r[0].slice(0,-1);for(var n=r.length-1,o=1;o<n;++o)r[o]=r[o].slice(1,-1);return r[n]=r[n].slice(1),r.join("")}return r[0]}function t(e){return"(?:"+e+")"}function n(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function a(e){return null!=e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function i(e,r){var t=e;if(r)for(var n in r)t[n]=r[n];return t}function s(e){var n="[A-Za-z]",o="[0-9]",a=r(o,"[A-Fa-f]"),i=t(t("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+t("%[89A-Fa-f]"+a+"%"+a+a)+"|"+t("%"+a+a)),s="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",c=r("[\\:\\/\\?\\#\\[\\]\\@]",s),u=e?"[\\uE000-\\uF8FF]":"[]",l=r(n,o,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");t(n+r(n,o,"[\\+\\-\\.]")+"*"),t(t(i+"|"+r(l,s,"[\\:]"))+"*");var p=t(t("25[0-5]")+"|"+t("2[0-4]"+o)+"|"+t("1"+o+o)+"|"+t("0?[1-9]"+o)+"|0?0?"+o),f=t(p+"\\."+p+"\\."+p+"\\."+p),d=t(a+"{1,4}"),h=t(t(d+"\\:"+d)+"|"+f),v=t(t(d+"\\:")+"{6}"+h),y=t("\\:\\:"+t(d+"\\:")+"{5}"+h),m=t(t(d)+"?\\:\\:"+t(d+"\\:")+"{4}"+h),g=t(t(t(d+"\\:")+"{0,1}"+d)+"?\\:\\:"+t(d+"\\:")+"{3}"+h),b=t(t(t(d+"\\:")+"{0,2}"+d)+"?\\:\\:"+t(d+"\\:")+"{2}"+h),w=t(t(t(d+"\\:")+"{0,3}"+d)+"?\\:\\:"+d+"\\:"+h),E=t(t(t(d+"\\:")+"{0,4}"+d)+"?\\:\\:"+h),S=t(t(t(d+"\\:")+"{0,5}"+d)+"?\\:\\:"+d),C=t(t(t(d+"\\:")+"{0,6}"+d)+"?\\:\\:"),O=t([v,y,m,g,b,w,E,S,C].join("|")),A=t(t(l+"|"+i)+"+");t("[vV]"+a+"+\\."+r(l,s,"[\\:]")+"+"),t(t(i+"|"+r(l,s))+"*");var I=t(i+"|"+r(l,s,"[\\:\\@]"));return t(t(i+"|"+r(l,s,"[\\@]"))+"+"),t(t(I+"|"+r("[\\/\\?]",u))+"*"),{NOT_SCHEME:new RegExp(r("[^]",n,o,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(r("[^\\%\\:]",l,s),"g"),NOT_HOST:new RegExp(r("[^\\%\\[\\]\\:]",l,s),"g"),NOT_PATH:new RegExp(r("[^\\%\\/\\:\\@]",l,s),"g"),NOT_PATH_NOSCHEME:new RegExp(r("[^\\%\\/\\@]",l,s),"g"),NOT_QUERY:new RegExp(r("[^\\%]",l,s,"[\\:\\@\\/\\?]",u),"g"),NOT_FRAGMENT:new RegExp(r("[^\\%]",l,s,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(r("[^]",l,s),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(r("[^\\%]",l,c),"g"),PCT_ENCODED:new RegExp(i,"g"),IPV4ADDRESS:new RegExp("^("+f+")$"),IPV6ADDRESS:new RegExp("^\\[?("+O+")"+t(t("\\%25|\\%(?!"+a+"{2})")+"("+A+")")+"?\\]?$")}}var c=s(!1),u=s(!0),l=function(){function e(e,r){var t=[],n=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(n=(i=s.next()).done)&&(t.push(i.value),!r||t.length!==r);n=!0);}catch(e){o=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(o)throw a}}return t}return function(r,t){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return e(r,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),p=function(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);r<e.length;r++)t[r]=e[r];return t}return Array.from(e)},f=2147483647,d=36,h=1,v=26,y=38,m=700,g=72,b=128,w="-",E=/^xn--/,S=/[^\0-\x7E]/,C=/[\x2E\u3002\uFF0E\uFF61]/g,O={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},A=d-h,I=Math.floor,T=String.fromCharCode;function j(e){throw new RangeError(O[e])}function x(e,r){for(var t=[],n=e.length;n--;)t[n]=r(e[n]);return t}function $(e,r){var t=e.split("@"),n="";return t.length>1&&(n=t[0]+"@",e=t[1]),n+x((e=e.replace(C,".")).split("."),r).join(".")}function D(e){for(var r=[],t=0,n=e.length;t<n;){var o=e.charCodeAt(t++);if(o>=55296&&o<=56319&&t<n){var a=e.charCodeAt(t++);56320==(64512&a)?r.push(((1023&o)<<10)+(1023&a)+65536):(r.push(o),t--)}else r.push(o)}return r}var P=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:d},N=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},R=function(e,r,t){var n=0;for(e=t?I(e/m):e>>1,e+=I(e/r);e>A*v>>1;n+=d)e=I(e/A);return I(n+(A+1)*e/(e+y))},F=function(e){var r=[],t=e.length,n=0,o=b,a=g,i=e.lastIndexOf(w);i<0&&(i=0);for(var s=0;s<i;++s)e.charCodeAt(s)>=128&&j("not-basic"),r.push(e.charCodeAt(s));for(var c=i>0?i+1:0;c<t;){for(var u=n,l=1,p=d;;p+=d){c>=t&&j("invalid-input");var y=P(e.charCodeAt(c++));(y>=d||y>I((f-n)/l))&&j("overflow"),n+=y*l;var m=p<=a?h:p>=a+v?v:p-a;if(y<m)break;var E=d-m;l>I(f/E)&&j("overflow"),l*=E}var S=r.length+1;a=R(n-u,S,0==u),I(n/S)>f-o&&j("overflow"),o+=I(n/S),n%=S,r.splice(n++,0,o)}return String.fromCodePoint.apply(String,r)},_=function(e){var r=[],t=(e=D(e)).length,n=b,o=0,a=g,i=!0,s=!1,c=void 0;try{for(var u,l=e[Symbol.iterator]();!(i=(u=l.next()).done);i=!0){var p=u.value;p<128&&r.push(T(p))}}catch(e){s=!0,c=e}finally{try{!i&&l.return&&l.return()}finally{if(s)throw c}}var y=r.length,m=y;for(y&&r.push(w);m<t;){var E=f,S=!0,C=!1,O=void 0;try{for(var A,x=e[Symbol.iterator]();!(S=(A=x.next()).done);S=!0){var $=A.value;$>=n&&$<E&&(E=$)}}catch(e){C=!0,O=e}finally{try{!S&&x.return&&x.return()}finally{if(C)throw O}}var P=m+1;E-n>I((f-o)/P)&&j("overflow"),o+=(E-n)*P,n=E;var F=!0,_=!1,U=void 0;try{for(var k,q=e[Symbol.iterator]();!(F=(k=q.next()).done);F=!0){var z=k.value;if(z<n&&++o>f&&j("overflow"),z==n){for(var L=o,H=d;;H+=d){var V=H<=a?h:H>=a+v?v:H-a;if(L<V)break;var M=L-V,K=d-V;r.push(T(N(V+M%K,0))),L=I(M/K)}r.push(T(N(L,0))),a=R(o,P,m==y),o=0,++m}}}catch(e){_=!0,U=e}finally{try{!F&&q.return&&q.return()}finally{if(_)throw U}}++o,++n}return r.join("")},U=function(e){return $(e,(function(e){return E.test(e)?F(e.slice(4).toLowerCase()):e}))},k=function(e){return $(e,(function(e){return S.test(e)?"xn--"+_(e):e}))},q={version:"2.1.0",ucs2:{decode:D,encode:function(e){return String.fromCodePoint.apply(String,p(e))}},decode:F,encode:_,toASCII:k,toUnicode:U},z={};function L(e){var r=e.charCodeAt(0);return r<16?"%0"+r.toString(16).toUpperCase():r<128?"%"+r.toString(16).toUpperCase():r<2048?"%"+(r>>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function H(e){for(var r="",t=0,n=e.length;t<n;){var o=parseInt(e.substr(t+1,2),16);if(o<128)r+=String.fromCharCode(o),t+=3;else if(o>=194&&o<224){if(n-t>=6){var a=parseInt(e.substr(t+4,2),16);r+=String.fromCharCode((31&o)<<6|63&a)}else r+=e.substr(t,6);t+=6}else if(o>=224){if(n-t>=9){var i=parseInt(e.substr(t+4,2),16),s=parseInt(e.substr(t+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&s)}else r+=e.substr(t,9);t+=9}else r+=e.substr(t,3),t+=3}return r}function V(e,r){function t(e){var t=H(e);return t.match(r.UNRESERVED)?t:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,t).replace(r.NOT_USERINFO,L).replace(r.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_HOST,L).replace(r.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(r.PCT_ENCODED,t).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,L).replace(r.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(r.PCT_ENCODED,t).replace(r.NOT_QUERY,L).replace(r.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,t).replace(r.NOT_FRAGMENT,L).replace(r.PCT_ENCODED,o)),e}function M(e){return e.replace(/^0*(.*)/,"$1")||"0"}function K(e,r){var t=e.match(r.IPV4ADDRESS)||[],n=l(t,2)[1];return n?n.split(".").map(M).join("."):e}function Z(e,r){var t=e.match(r.IPV6ADDRESS)||[],n=l(t,3),o=n[1],a=n[2];if(o){for(var i=o.toLowerCase().split("::").reverse(),s=l(i,2),c=s[0],u=s[1],p=u?u.split(":").map(M):[],f=c.split(":").map(M),d=r.IPV4ADDRESS.test(f[f.length-1]),h=d?7:8,v=f.length-h,y=Array(h),m=0;m<h;++m)y[m]=p[m]||f[v+m]||"";d&&(y[h-1]=K(y[h-1],r));var g=y.reduce((function(e,r,t){if(!r||"0"===r){var n=e[e.length-1];n&&n.index+n.length===t?n.length++:e.push({index:t,length:1})}return e}),[]).sort((function(e,r){return r.length-e.length}))[0],b=void 0;if(g&&g.length>1){var w=y.slice(0,g.index),E=y.slice(g.index+g.length);b=w.join(":")+"::"+E.join(":")}else b=y.join(":");return a&&(b+="%"+a),b}return e}var J=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,B=void 0==="".match(/(){0}/)[1];function W(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t={},n=!1!==r.iri?u:c;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(J);if(o){B?(t.scheme=o[1],t.userinfo=o[3],t.host=o[4],t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=o[7],t.fragment=o[8],isNaN(t.port)&&(t.port=o[5])):(t.scheme=o[1]||void 0,t.userinfo=-1!==e.indexOf("@")?o[3]:void 0,t.host=-1!==e.indexOf("//")?o[4]:void 0,t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=-1!==e.indexOf("?")?o[7]:void 0,t.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(t.port)&&(t.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),t.host&&(t.host=Z(K(t.host,n),n)),void 0!==t.scheme||void 0!==t.userinfo||void 0!==t.host||void 0!==t.port||t.path||void 0!==t.query?void 0===t.scheme?t.reference="relative":void 0===t.fragment?t.reference="absolute":t.reference="uri":t.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==t.reference&&(t.error=t.error||"URI is not a "+r.reference+" reference.");var a=z[(r.scheme||t.scheme||"").toLowerCase()];if(r.unicodeSupport||a&&a.unicodeSupport)V(t,n);else{if(t.host&&(r.domainHost||a&&a.domainHost))try{t.host=q.toASCII(t.host.replace(n.PCT_ENCODED,H).toLowerCase())}catch(e){t.error=t.error||"Host's domain name can not be converted to ASCII via punycode: "+e}V(t,c)}a&&a.parse&&a.parse(t,r)}else t.error=t.error||"URI can not be parsed.";return t}function G(e,r){var t=!1!==r.iri?u:c,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(Z(K(String(e.host),t),t).replace(t.IPV6ADDRESS,(function(e,r,t){return"["+r+(t?"%25"+t:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}var Q=/^\.\.?\//,Y=/^\/\.(\/|$)/,X=/^\/\.\.(\/|$)/,ee=/^\/?(?:.|\n)*?(?=\/|$)/;function re(e){for(var r=[];e.length;)if(e.match(Q))e=e.replace(Q,"");else if(e.match(Y))e=e.replace(Y,"/");else if(e.match(X))e=e.replace(X,"/"),r.pop();else if("."===e||".."===e)e="";else{var t=e.match(ee);if(!t)throw new Error("Unexpected dot segment condition");var n=t[0];e=e.slice(n.length),r.push(n)}return r.join("")}function te(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.iri?u:c,n=[],o=z[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(t.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?q.toUnicode(e.host):q.toASCII(e.host.replace(t.PCT_ENCODED,H).toLowerCase())}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+t}V(e,t),"suffix"!==r.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var a=G(e,r);if(void 0!==a&&("suffix"!==r.reference&&n.push("//"),n.push(a),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var i=e.path;r.absolutePath||o&&o.absolutePath||(i=re(i)),void 0===a&&(i=i.replace(/^\/\//,"/%2F")),n.push(i)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function ne(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=W(te(e,t),t),r=W(te(r,t),t)),!(t=t||{}).tolerant&&r.scheme?(n.scheme=r.scheme,n.userinfo=r.userinfo,n.host=r.host,n.port=r.port,n.path=re(r.path||""),n.query=r.query):(void 0!==r.userinfo||void 0!==r.host||void 0!==r.port?(n.userinfo=r.userinfo,n.host=r.host,n.port=r.port,n.path=re(r.path||""),n.query=r.query):(r.path?("/"===r.path.charAt(0)?n.path=re(r.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:n.path=r.path:n.path="/"+r.path,n.path=re(n.path)),n.query=r.query):(n.path=e.path,void 0!==r.query?n.query=r.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=r.fragment,n}function oe(e,r,t){var n=i({scheme:"null"},t);return te(ne(W(e,n),W(r,n),n,!0),n)}function ae(e,r){return"string"==typeof e?e=te(W(e,r),r):"object"===n(e)&&(e=W(te(e,r),r)),e}function ie(e,r,t){return"string"==typeof e?e=te(W(e,t),t):"object"===n(e)&&(e=te(e,t)),"string"==typeof r?r=te(W(r,t),t):"object"===n(r)&&(r=te(r,t)),e===r}function se(e,r){return e&&e.toString().replace(r&&r.iri?u.ESCAPE:c.ESCAPE,L)}function ce(e,r){return e&&e.toString().replace(r&&r.iri?u.PCT_ENCODED:c.PCT_ENCODED,H)}var ue={scheme:"http",domainHost:!0,parse:function(e,r){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,r){var t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},le={scheme:"https",domainHost:ue.domainHost,parse:ue.parse,serialize:ue.serialize};function pe(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var fe={scheme:"ws",domainHost:!0,parse:function(e,r){var t=e;return t.secure=pe(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t},serialize:function(e,r){if(e.port!==(pe(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var t=e.resourceName.split("?"),n=l(t,2),o=n[0],a=n[1];e.path=o&&"/"!==o?o:void 0,e.query=a,e.resourceName=void 0}return e.fragment=void 0,e}},de={scheme:"wss",domainHost:fe.domainHost,parse:fe.parse,serialize:fe.serialize},he={},ve="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ye="[0-9A-Fa-f]",me=t(t("%[EFef]"+ye+"%"+ye+ye+"%"+ye+ye)+"|"+t("%[89A-Fa-f]"+ye+"%"+ye+ye)+"|"+t("%"+ye+ye)),ge="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",be=r("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),we="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Ee=new RegExp(ve,"g"),Se=new RegExp(me,"g"),Ce=new RegExp(r("[^]",ge,"[\\.]",'[\\"]',be),"g"),Oe=new RegExp(r("[^]",ve,we),"g"),Ae=Oe;function Ie(e){var r=H(e);return r.match(Ee)?r:e}var Te={scheme:"mailto",parse:function(e,r){var t=e,n=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var o=!1,a={},i=t.query.split("&"),s=0,c=i.length;s<c;++s){var u=i[s].split("=");switch(u[0]){case"to":for(var l=u[1].split(","),p=0,f=l.length;p<f;++p)n.push(l[p]);break;case"subject":t.subject=ce(u[1],r);break;case"body":t.body=ce(u[1],r);break;default:o=!0,a[ce(u[0],r)]=ce(u[1],r)}}o&&(t.headers=a)}t.query=void 0;for(var d=0,h=n.length;d<h;++d){var v=n[d].split("@");if(v[0]=ce(v[0]),r.unicodeSupport)v[1]=ce(v[1],r).toLowerCase();else try{v[1]=q.toASCII(ce(v[1],r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[d]=v.join("@")}return t},serialize:function(e,r){var t=e,n=a(e.to);if(n){for(var i=0,s=n.length;i<s;++i){var c=String(n[i]),u=c.lastIndexOf("@"),l=c.slice(0,u).replace(Se,Ie).replace(Se,o).replace(Ce,L),p=c.slice(u+1);try{p=r.iri?q.toUnicode(p):q.toASCII(ce(p,r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+e}n[i]=l+"@"+p}t.path=n.join(",")}var f=e.headers=e.headers||{};e.subject&&(f.subject=e.subject),e.body&&(f.body=e.body);var d=[];for(var h in f)f[h]!==he[h]&&d.push(h.replace(Se,Ie).replace(Se,o).replace(Oe,L)+"="+f[h].replace(Se,Ie).replace(Se,o).replace(Ae,L));return d.length&&(t.query=d.join("&")),t}},je=/^([^\:]+)\:(.*)/,xe={scheme:"urn",parse:function(e,r){var t=e.path&&e.path.match(je),n=e;if(t){var o=r.scheme||n.scheme||"urn",a=t[1].toLowerCase(),i=t[2],s=o+":"+(r.nid||a),c=z[s];n.nid=a,n.nss=i,n.path=void 0,c&&(n=c.parse(n,r))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,r){var t=r.scheme||e.scheme||"urn",n=e.nid,o=t+":"+(r.nid||n),a=z[o];a&&(e=a.serialize(e,r));var i=e,s=e.nss;return i.path=(n||r.nid)+":"+s,i}},$e=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,De={scheme:"urn:uuid",parse:function(e,r){var t=e;return t.uuid=t.nss,t.nss=void 0,r.tolerant||t.uuid&&t.uuid.match($e)||(t.error=t.error||"UUID is not valid."),t},serialize:function(e,r){var t=e;return t.nss=(e.uuid||"").toLowerCase(),t}};z[ue.scheme]=ue,z[le.scheme]=le,z[fe.scheme]=fe,z[de.scheme]=de,z[Te.scheme]=Te,z[xe.scheme]=xe,z[De.scheme]=De,e.SCHEMES=z,e.pctEncChar=L,e.pctDecChars=H,e.parse=W,e.removeDotSegments=re,e.serialize=te,e.resolveComponents=ne,e.resolve=oe,e.normalize=ae,e.equal=ie,e.escapeComponent=se,e.unescapeComponent=ce,Object.defineProperty(e,"__esModule",{value:!0})}(r)}(0,o.exports);const a=o.exports,i={null:e=>null===e,boolean:e=>"boolean"==typeof e,object:e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,array:e=>Array.isArray(e),number:e=>"number"==typeof e,integer:e=>Number.isInteger(e),string:e=>"string"==typeof e};var s={jsonTypeOf:(e,r)=>i[r](e),resolveUrl:(e,r)=>{const t=a.resolve(e,r,{iri:!0});if(a.resolve(e,"",{iri:!0})&&"file"===a.parse(t).scheme&&"file"!==a.parse(e).scheme)throw Error(`Can't access file '${t}' resource from network context '${e}'`);return t},urlFragment:e=>a.unescapeComponent(a.parse(e).fragment)||"",pathRelative:(e,r)=>{if(e===r)return"";let t=1;const n=e.length-1,o=r.length-t,a=n<o?n:o;let i=-1,s=0;for(;s<a;s++){const n=e.charCodeAt(s+1);if(n!==r.charCodeAt(t+s))break;47===n&&(i=s)}if(o>a){if(47===r.charCodeAt(t+s))return r.slice(t+s+1);if(0===s)return r.slice(t+s)}n>a&&(47===e.charCodeAt(s+1)?i=s:0===a&&(i=0));let c="";for(s=i+2;s<=e.length;++s)s!==e.length&&47!==e.charCodeAt(s)||(c+=0===c.length?"..":"/..");return t+=i,c.length>0?`${c}${r.slice(t,r.length)}`:(47===r.charCodeAt(t)&&++t,r.slice(t,r.length))}};const c=t,u=e=>{if(e.length>0&&"/"!==e[0])throw Error("Invalid JSON Pointer");return e.split("/").slice(1).map(y)},l=(e,r,t,n)=>{if(0===e.length)return t;if(e.length>1){const o=e.shift();return{...r,[o]:l(e,g(r,o,n),t,h(o,n))}}if(Array.isArray(r)){const n=[...r];return n[m(r,e[0])]=t,n}return"object"==typeof r&&null!==r?{...r,[e[0]]:t}:g(r,e[0],n)},p=(e,r,t,n)=>{if(0!==e.length)if(1!==e.length||b(r)){const o=e.shift();p(e,g(r,o,n),t,h(o,n))}else{r[m(r,e[0])]=t}},f=(e,r,t)=>{if(0!=e.length){if(e.length>1){const n=e.shift(),o=g(r,n,t);return{...r,[n]:f(e,o,h(n,t))}}if(Array.isArray(r))return r.filter(((r,t)=>t!=e[0]));if("object"==typeof r&&null!==r){const{[e[0]]:t,...n}=r;return n}return g(r,e[0],t)}},d=(e,r,t)=>{if(0!==e.length)if(e.length>1){const n=e.shift(),o=g(r,n,t);d(e,o,h(n,t))}else Array.isArray(r)?r.splice(e[0],1):"object"==typeof r&&null!==r?delete r[e[0]]:g(r,e[0],t)},h=c(((e,r)=>r+"/"+v(e))),v=e=>e.toString().replace(/~/g,"~0").replace(/\//g,"~1"),y=e=>e.toString().replace(/~1/g,"/").replace(/~0/g,"~"),m=(e,r)=>Array.isArray(e)&&"-"===r?e.length:r,g=(e,r,t="")=>{if(void 0===e)throw TypeError(`Value at '${t}' is undefined and does not have property '${r}'`);if(null===e)throw TypeError(`Value at '${t}' is null and does not have property '${r}'`);if(b(e))throw TypeError(`Value at '${t}' is a ${typeof e} and does not have property '${r}'`);return e[m(e,r)]},b=e=>null===e||"object"!=typeof e;var w={nil:"",append:h,get:(e,r)=>{const t=u(e),n=e=>t.reduce((([e,r],t)=>[g(e,t,r),h(t,r)]),[e,""])[0];return void 0===r?n:n(r)},set:(e,r,t)=>{const n=u(e),o=c(((e,r)=>l(n,e,r,"")));return void 0===r?o:o(r,t)},assign:(e,r,t)=>{const n=u(e),o=c(((e,r)=>p(n,e,r,"")));return void 0===r?o:o(r,t)},unset:(e,r)=>{const t=u(e),n=e=>f(t,e,"");return void 0===r?n:n(r)},remove:(e,r)=>{const t=u(e),n=e=>d(t,e,"");return void 0===r?n:n(r)}};const E=Symbol("$__value"),S=Symbol("$__href");var C={cons:(e,r)=>Object.freeze({[S]:e,[E]:r}),isReference:e=>e&&void 0!==e[S],href:e=>e[S],value:e=>e[E]};const O=w,A=t,{resolveUrl:I,jsonTypeOf:T}=s,j=C,x=Object.freeze({id:"",pointer:"",instance:void 0,value:void 0}),$=e=>j.isReference(e.value)?j.value(e.value):e.value,D=A(((e,r)=>T($(e),r))),P=(e,r)=>Object.freeze({...r,pointer:O.append(e,r.pointer),value:$(r)[e]}),N=A(((e,r)=>$(r).map(((t,n,o,a)=>e(P(n,r),n,o,a))))),R=A(((e,r)=>$(r).forEach(((t,n,o,a)=>e(P(n,r),n,o,a))))),F=A(((e,r)=>$(r).map(((e,t,n,o)=>P(t,r))).filter(((r,t,n,o)=>e(r,t,n,o))))),_=A(((e,r,t)=>$(t).reduce(((r,n,o)=>e(r,P(o,t),o)),r))),U=A(((e,r)=>$(r).every(((t,n,o,a)=>e(P(n,r),n,o,a))))),k=A(((e,r)=>$(r).some(((t,n,o,a)=>e(P(n,r),n,o,a)))));var q={nil:x,cons:(e,r="")=>Object.freeze({...x,id:I(r,""),instance:e,value:e}),get:(e,r=x)=>{if(!e.startsWith("#"))throw Error(`No JSON document found at '${e.split("#")[0]}'`);return Object.freeze({...r,pointer:e.substr(1)})},uri:e=>`${e.id}#${encodeURI(e.pointer)}`,value:$,has:(e,r)=>e in $(r),typeOf:D,length:e=>$(e).length,step:P,entries:e=>Object.keys($(e)).map((r=>[r,P(r,e)])),keys:e=>Object.keys($(e)),map:N,forEach:R,filter:F,reduce:_,every:U,some:k},z=async e=>Object.entries(await e);var L=t((async(e,r)=>(await r).map(e)));var H=t((async(e,r,t)=>(await t).reduce((async(r,t)=>e(await r,t)),r)));const V=H;var M=t((async(e,r,t={})=>V((async(r,t)=>await e(t)?r.concat([t]):r),[],r,t)));const K=L;var Z=t((async(e,r)=>{const t=await K(e,r);return(await Promise.all(t)).some((e=>e))}));const J=L;var B=t((async(e,r)=>{const t=await J(e,r);return(await Promise.all(t)).every((e=>e))}));var W=t(((e,r)=>e.reduce((async(e,r)=>r(await e)),r)));const G=W,Q=z,Y=H;var X={entries:z,map:L,filter:M,reduce:H,some:Z,every:B,pipeline:W,all:e=>Promise.all(e),allValues:e=>G([Q,Y((async(e,[r,t])=>(e[r]=await t,e)),{})],e)},ee=fetch,re={},te=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,ne=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,oe=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,ae=/\\([\u000b\u0020-\u00ff])/g,ie=/([\\"])/g,se=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;function ce(e){var r=String(e);if(oe.test(r))return r;if(r.length>0&&!ne.test(r))throw new TypeError("invalid parameter value");return'"'+r.replace(ie,"\\$1")+'"'}function ue(e){this.parameters=Object.create(null),this.type=e}re.format=function(e){if(!e||"object"!=typeof e)throw new TypeError("argument obj is required");var r=e.parameters,t=e.type;if(!t||!se.test(t))throw new TypeError("invalid type");var n=t;if(r&&"object"==typeof r)for(var o,a=Object.keys(r).sort(),i=0;i<a.length;i++){if(o=a[i],!oe.test(o))throw new TypeError("invalid parameter name");n+="; "+o+"="+ce(r[o])}return n},re.parse=function(e){if(!e)throw new TypeError("argument string is required");var r="object"==typeof e?function(e){var r;"function"==typeof e.getHeader?r=e.getHeader("content-type"):"object"==typeof e.headers&&(r=e.headers&&e.headers["content-type"]);if("string"!=typeof r)throw new TypeError("content-type header is missing from object");return r}(e):e;if("string"!=typeof r)throw new TypeError("argument string is required to be a string");var t=r.indexOf(";"),n=-1!==t?r.substr(0,t).trim():r.trim();if(!se.test(n))throw new TypeError("invalid media type");var o=new ue(n.toLowerCase());if(-1!==t){var a,i,s;for(te.lastIndex=t;i=te.exec(r);){if(i.index!==t)throw new TypeError("invalid parameter format");t+=i[0].length,a=i[1].toLowerCase(),'"'===(s=i[2])[0]&&(s=s.substr(1,s.length-2).replace(ae,"$1")),o.parameters[a]=s}if(t!==r.length)throw new TypeError("invalid parameter format")}return o};const le=re,pe={};var fe={addPlugin:(e,r)=>{pe[e]=r},parse:e=>{const r=le.parse(e.headers.get("content-type"));if(!(r.type in pe))throw Error(`${e.url} is not a schema. Found a document with media type: ${r.type}`);return pe[r.type].parse(e,r.parameters)},getContentType:e=>{for(const r in pe)if(pe[r].matcher(e))return r;return"application/octet-stream"}};const de=t,he=X,ve=w,{jsonTypeOf:ye,resolveUrl:me,urlFragment:ge,pathRelative:be}=s,we=ee,Ee=C,Se=fe,Ce="https://json-schema.org/draft/2019-09/vocab/core",Oe="https://json-schema.org/draft/2020-12/vocab/core",Ae={},Ie={},Te=(e,r)=>{const t=Ie[e];return Ae[t]?.[r]},je={},xe={},$e=(e,r="",t="")=>{e=JSON.parse(JSON.stringify(e));const n=me(r,""),o=me(e.$schema||t,"");if(!o)throw Error("Couldn't determine schema dialect");if(delete e.$schema,!(o in Ie))if(!0===e?.$vocabulary?.[Ce]&&o===De(e,n,Ce)[0])Ie[o]=Ce;else if(!0===e?.$vocabulary?.[Oe]&&o===De(e,n,Oe)[0])Ie[o]=Oe;else{const e=je[o];if(!e)throw Error(`Couldn't determine JSON Schema version for dialect: '${o}'`);!0===e.vocabulary[Ce]?Ie[o]=Ce:!0===e.vocabulary[Oe]?Ie[o]=Oe:Ie[o]=Ie[e.dialectId]}const[a,i]=De(e,n,Ie[o]);if(!a)throw Error("Couldn't determine an identifier for the schema");const s=Te(o,"baseToken");delete e[s],n&&(xe[n]=a);const c=Te(o,"anchorToken");i&&s===c&&(e[c]=c!==s?encodeURI(i):`#${encodeURI(i)}`);const u={},l=Te(o,"recursiveAnchorToken");let p;!0===e[l]&&(u[""]=`${a}#`,e[c]="",delete e[l]);const f=Te(o,"vocabularyToken");ye(e[f],"object")?(p=e[f],delete e[f]):p={[Ie[o]]:!0};const d={"":""};return je[a]={id:a,dialectId:o,schema:Pe(e,a,o,ve.nil,d,u),anchors:d,dynamicAnchors:u,vocabulary:p,validated:!1},a},De=(e,r,t)=>{const n=Ae[t]?.baseToken,o=me(r,e[n]||"");return[me(o,""),ge(o)]},Pe=(e,r,t,n,o,a)=>{if(ye(e,"object")){const i="string"==typeof e.$schema?me(e.$schema,""):t,s=Te(i,"embeddedToken"),c=Te(i,"anchorToken");if("string"==typeof e[s]&&(s!==c||"#"!==e[s][0])){const n=me(r,e[s]);return e[Te(i,"baseToken")]=n,$e(e,n,t),Ee.cons(e[s],e)}const u=Te(t,"anchorToken"),l=Te(t,"dynamicAnchorToken");"string"==typeof e[l]&&(a[e[l]]=`${r}#${encodeURI(n)}`,o[e[l]]=n,delete e[l]);const p=Te(t,"embeddedToken");if("string"==typeof e[u]){const r=u!==p?e[u]:e[u].slice(1);o[r]=n,delete e[u]}const f=Te(t,"jrefToken");if("string"==typeof e[f])return Ee.cons(e[f],e);for(const i in e)e[i]=Pe(e[i],r,t,ve.append(i,n),o,a);return e}return Array.isArray(e)?e.map(((e,i)=>Pe(e,r,t,ve.append(i,n),o,a))):e},Ne=e=>je[xe[e]]||je[e],Re=Object.freeze({id:"",dialectId:void 0,vocabulary:{},pointer:ve.nil,schema:void 0,value:void 0,anchors:{},dynamicAnchors:{},validated:!0}),Fe=async(e,r=Re)=>{const t=me(ke(r),e),n=me(t,""),o=ge(t);if(!(e=>e in je||e in xe)(n)){const e=await we(n,{headers:{Accept:"application/schema+json"}});if(e.status>=400)throw await e.text(),Error(`Failed to retrieve schema with id: ${n}`);const[r,t]=await Se.parse(e);let o;o=r.$schema?me(r.$schema,""):t?me(n,t):"",o&&n!==o&&!(o in Ie)&&await Fe(o),$e(r,n,o)}const a=Ne(n),i="/"!==o[0]?Ue(a,o):o,s=Object.freeze({...a,pointer:i,value:ve.get(i,a.schema)});return _e(s)},_e=e=>Ee.isReference(e.value)?Fe(Ee.href(e.value),e):e,Ue=(e,r)=>{if(!(r in e.anchors))throw Error(`No such anchor '${encodeURI(e.id)}#${encodeURI(r)}'`);return e.anchors[r]},ke=e=>`${e.id}#${encodeURI(e.pointer)}`,qe=e=>Ee.isReference(e.value)?Ee.value(e.value):e.value,ze=(e,r)=>{const t=Ne(r.id),n=Object.freeze({...r,pointer:ve.append(e,r.pointer),value:qe(r)[e],validated:t.validated});return _e(n)},Le=de(((e,r)=>he.pipeline([qe,he.map((async(t,n)=>e(await ze(n,r),n))),he.all],r))),He={parentId:"",parentDialect:"",includeEmbedded:!0},Ve=(e,r)=>{if(r.startsWith("file://")){const t=e.slice(7,e.lastIndexOf("/"));return""===e?"":be(t,r.slice(7))}return r};var Me={setConfig:(e,r,t)=>{Ie[e]=e,Ae[e]||(Ae[e]={}),Ae[e][r]=t},getConfig:Te,add:$e,get:Fe,markValidated:e=>{je[e].validated=!0},uri:ke,value:qe,getAnchorPointer:Ue,typeOf:(e,r)=>ye(qe(e),r),has:(e,r)=>e in qe(r),step:ze,keys:e=>Object.keys(qe(e)),entries:e=>he.pipeline([qe,Object.keys,he.map((async r=>[r,await ze(r,e)])),he.all],e),map:Le,length:e=>qe(e).length,toSchema:(e,r={})=>{const t={...He,...r},n=JSON.parse(JSON.stringify(e.schema,((r,n)=>{if(!Ee.isReference(n))return n;const o=Ee.value(n),a="string"==typeof o.$schema?me(o.$schema,""):e.dialectId,i=Te(a,"embeddedToken");return!t.includeEmbedded&&i in o?void 0:Ee.value(n)}))),o=Te(e.dialectId,"dynamicAnchorToken");Object.entries(e.dynamicAnchors).forEach((([e,r])=>{const t=ve.append(o,ge(r));ve.assign(t,n,e)}));const a=Te(e.dialectId,"anchorToken");Object.entries(e.anchors).filter((([r])=>""!==r&&!(r in e.dynamicAnchors))).forEach((([e,r])=>{const t=ve.append(a,r);ve.assign(t,n,e)}));const i=Te(e.dialectId,"baseToken"),s=Ve(t.parentId,e.id),c=t.parentDialect===e.dialectId?"":e.dialectId;return{...s&&{[i]:s},...c&&{$schema:c},...n}}};class Ke extends Error{constructor(e){super("Invalid Schema"),this.name=this.constructor.name,this.output=e}}var Ze=Ke;const Je=Me;var Be={compile:e=>Je.value(e),interpret:()=>!0};const We=t,Ge=n.exports,{resolveUrl:Qe}=s,Ye=q,Xe=Me,er=Ze,rr=fe,tr=Be,nr="FLAG",or="BASIC",ar="DETAILED",ir="VERBOSE";let sr=ar,cr=!0;rr.addPlugin("application/schema+json",{parse:async(e,r)=>[await e.json(),r.schema||r.profile],matcher:e=>e.endsWith(".schema.json")});const ur=async e=>{const r={metaData:{}};return{ast:r,schemaUri:await mr(e,r)}},lr=We((({ast:e,schemaUri:r},t,n=nr)=>{if(![nr,or,ar,ir].includes(n))throw Error(`The '${n}' error format is not supported`);const o=[],a=Ge.subscribe("result",pr(n,o));return br(r,t,e,{}),Ge.unsubscribe(a),o[0]})),pr=(e,r)=>{const t=[];return(n,o)=>{if("result"===n){const{keyword:e,absoluteKeywordLocation:r,instanceLocation:n,valid:a}=o,i={keyword:e,absoluteKeywordLocation:r,instanceLocation:n,valid:a,errors:[]};t.push(i)}else if("result.start"===n)t.push(n);else if("result.end"===n){const n=t.pop();for(;"result.start"!==t[t.length-1];){const r=t.pop(),o=[r];e===or&&(o.push(...r.errors),delete r.errors),(e===ir||e!==nr&&!r.valid)&&n.errors.unshift(...o)}t[t.length-1]=n,r[0]=n}}},fr={},dr=e=>fr[e]||tr,hr=e=>e in fr,vr={},yr={},mr=async(e,r)=>{if(e=await gr(e),!hr(`${e.dialectId}#validate`)){const r=await Xe.get(e.dialectId);(Xe.getConfig(r.id,"mandatoryVocabularies")||[]).forEach((e=>{if(!r.vocabulary[e])throw Error(`Vocabulary '${e}' must be explicitly declared and required`)})),Object.entries(r.vocabulary).forEach((([e,t])=>{if(e in vr)Object.entries(vr[e]).forEach((([e,t])=>{((e,r)=>{fr[e]={collectEvaluatedItems:(e,t,n,o,a)=>r.interpret(e,t,n,o,a)&&new Set,collectEvaluatedProperties:(e,t,n,o,a)=>r.interpret(e,t,n,o,a)&&[],...r}})(`${r.id}#${e}`,t)}));else if(t)throw Error(`Missing required vocabulary: ${e}`)}))}if(cr&&!e.validated){if(Xe.markValidated(e.id),!(e.dialectId in yr)){const r=await Xe.get(e.dialectId),t=await ur(r);yr[r.id]=lr(t)}const r=Ye.cons(e.schema,e.id),t=yr[e.dialectId](r,sr);if(!t.valid)throw new er(t)}return e.id in r.metaData||(r.metaData[e.id]={id:e.id,dynamicAnchors:e.dynamicAnchors,anchors:e.anchors}),dr(`${e.dialectId}#validate`).compile(e,r)},gr=async e=>Xe.typeOf(e,"string")?gr(await Xe.get(Xe.value(e),e)):e,br=(e,r,t,n)=>{const o=wr(e,t),a=Qe(e,"");return dr(o).interpret(e,r,t,{...t.metaData[a].dynamicAnchors,...n})},wr=(e,r)=>{if(!(e in r))throw Error(`No schema found at ${e}`);return r[e][0]};var Er={validate:async(e,r,t)=>{const n=await ur(e),o=(e,r)=>lr(n,Ye.cons(e),r);return void 0===r?o:o(r,t)},compile:ur,interpret:lr,setMetaOutputFormat:e=>{sr=e},setShouldMetaValidate:e=>{cr=e},FLAG:nr,BASIC:or,DETAILED:ar,VERBOSE:ir,add:(e,r="",t="")=>{const n=Xe.add(e,r,t);delete yr[n]},getKeyword:dr,hasKeyword:hr,defineVocabulary:(e,r)=>{vr[e]=r},compileSchema:mr,interpretSchema:br,collectEvaluatedProperties:(e,r,t,n,o)=>{const a=wr(e,t);return dr(a).collectEvaluatedProperties(e,r,t,n,o)},collectEvaluatedItems:(e,r,t,n,o)=>{const a=wr(e,t);return dr(a).collectEvaluatedItems(e,r,t,n,o)},addMediaTypePlugin:rr.addPlugin};const Sr=X,Cr=n.exports,Or=Er,Ar=q,Ir=Me;var Tr={compile:async(e,r)=>{const t=Ir.uri(e);if(!(t in r)){r[t]=!1;const n=Ir.value(e);if(!["object","boolean"].includes(typeof n))throw Error(`No schema found at '${Ir.uri(e)}'`);r[t]=[`${e.dialectId}#validate`,Ir.uri(e),"boolean"==typeof n?n:await Sr.pipeline([Ir.entries,Sr.map((([r,t])=>[`${e.dialectId}#${r}`,t])),Sr.filter((([r])=>r!==`${e.dialectId}#validate`)),Sr.map((async([t,n])=>{const o=await Or.getKeyword(t).compile(n,r,e);return[t,Ir.uri(n),o]})),Sr.all],e)]}return t},interpret:(e,r,t,n)=>{const[o,a,i]=t[e];Cr.publishSync("result.start");const s="boolean"==typeof i?i:i.every((([e,o,a])=>{Cr.publishSync("result.start");const i=Or.getKeyword(e).interpret(a,r,t,n);return Cr.publishSync("result",{keyword:e,absoluteKeywordLocation:o,instanceLocation:Ar.uri(r),valid:i,ast:a}),Cr.publishSync("result.end"),i}));return Cr.publishSync("result",{keyword:o,absoluteKeywordLocation:a,instanceLocation:Ar.uri(r),valid:s,ast:e}),Cr.publishSync("result.end"),s},collectEvaluatedProperties:(e,r,t,n,o=!1)=>{const a=t[e][2];return"boolean"==typeof a?!!a&&[]:a.filter((([e])=>!o||!e.endsWith("#unevaluatedProperties"))).reduce(((e,[o,,a])=>{const i=e&&Or.getKeyword(o).collectEvaluatedProperties(a,r,t,n);return!1!==i&&[...e,...i]}),[])},collectEvaluatedItems:(e,r,t,n,o=!1)=>{const a=t[e][2];return"boolean"==typeof a?!!a&&new Set:a.filter((([e])=>!o||!e.endsWith("#unevaluatedItems"))).reduce(((e,[o,,a])=>{const i=!1!==e&&Or.getKeyword(o).collectEvaluatedItems(a,r,t,n);return!1!==i&&new Set([...e,...i])}),new Set)}};e("default",{Core:Er,Schema:Me,Instance:q,Reference:C,Keywords:{metaData:Be,validate:Tr},InvalidSchemaError:Ze})}}}));
System.register("JSC",[],(function(e){"use strict";return{execute:function(){var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},r=function(e,t){return function r(){null==t&&(t=e.length);var n=[].slice.call(arguments);return n.length>=t?e.apply(this,n):function(){return r.apply(this,n.concat([].slice.call(arguments)))}}};var n={exports:{}};!function(e,r){!function(t,n){var o={};t.PubSub?(o=t.PubSub,console.warn("PubSub already loaded, using existing version")):(t.PubSub=o,function(e){var t={},r=-1,n="*";function o(e){var t;for(t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!0;return!1}function a(e){return function(){throw e}}function i(e,t,r){try{e(t,r)}catch(e){setTimeout(a(e),0)}}function s(e,t,r){e(t,r)}function c(e,r,n,o){var a,c=t[r],u=o?s:i;if(Object.prototype.hasOwnProperty.call(t,r))for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&u(c[a],e,n)}function u(e,t,r){return function(){var o=String(e),a=o.lastIndexOf(".");for(c(e,e,t,r);-1!==a;)a=(o=o.substr(0,a)).lastIndexOf("."),c(e,o,t,r);c(e,n,t,r)}}function l(e){var r=String(e);return Boolean(Object.prototype.hasOwnProperty.call(t,r)&&o(t[r]))}function p(e){for(var t=String(e),r=l(t)||l(n),o=t.lastIndexOf(".");!r&&-1!==o;)o=(t=t.substr(0,o)).lastIndexOf("."),r=l(t);return r}function f(e,t,r,n){var o=u(e="symbol"==typeof e?e.toString():e,t,n);return!!p(e)&&(!0===r?o():setTimeout(o,0),!0)}e.publish=function(t,r){return f(t,r,!1,e.immediateExceptions)},e.publishSync=function(t,r){return f(t,r,!0,e.immediateExceptions)},e.subscribe=function(e,n){if("function"!=typeof n)return!1;e="symbol"==typeof e?e.toString():e,Object.prototype.hasOwnProperty.call(t,e)||(t[e]={});var o="uid_"+String(++r);return t[e][o]=n,o},e.subscribeAll=function(t){return e.subscribe(n,t)},e.subscribeOnce=function(t,r){var n=e.subscribe(t,(function(){e.unsubscribe(n),r.apply(this,arguments)}));return e},e.clearAllSubscriptions=function(){t={}},e.clearSubscriptions=function(e){var r;for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&0===r.indexOf(e)&&delete t[r]},e.countSubscriptions=function(e){var r,n,o=0;for(r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&0===r.indexOf(e)){for(n in t[r])o++;break}return o},e.getSubscriptions=function(e){var r,n=[];for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&0===r.indexOf(e)&&n.push(r);return n},e.unsubscribe=function(r){var n,o,a,i=function(e){var r;for(r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&0===r.indexOf(e))return!0;return!1},s="string"==typeof r&&(Object.prototype.hasOwnProperty.call(t,r)||i(r)),c=!s&&"string"==typeof r,u="function"==typeof r,l=!1;if(!s){for(n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(o=t[n],c&&o[r]){delete o[r],l=r;break}if(u)for(a in o)Object.prototype.hasOwnProperty.call(o,a)&&o[a]===r&&(delete o[a],l=!0)}return l}e.clearSubscriptions(r)}}(o)),void 0!==e&&e.exports&&(r=e.exports=o),r.PubSub=o,e.exports=r=o}("object"==typeof window&&window||t)}(n,n.exports);var o={exports:{}};
/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */!function(e,t){!function(e){function t(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(t.length>1){t[0]=t[0].slice(0,-1);for(var n=t.length-1,o=1;o<n;++o)t[o]=t[o].slice(1,-1);return t[n]=t[n].slice(1),t.join("")}return t[0]}function r(e){return"(?:"+e+")"}function n(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function a(e){return null!=e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function i(e,t){var r=e;if(t)for(var n in t)r[n]=t[n];return r}function s(e){var n="[A-Za-z]",o="[0-9]",a=t(o,"[A-Fa-f]"),i=r(r("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+r("%[89A-Fa-f]"+a+"%"+a+a)+"|"+r("%"+a+a)),s="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",c=t("[\\:\\/\\?\\#\\[\\]\\@]",s),u=e?"[\\uE000-\\uF8FF]":"[]",l=t(n,o,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");r(n+t(n,o,"[\\+\\-\\.]")+"*"),r(r(i+"|"+t(l,s,"[\\:]"))+"*");var p=r(r("25[0-5]")+"|"+r("2[0-4]"+o)+"|"+r("1"+o+o)+"|"+r("0?[1-9]"+o)+"|0?0?"+o),f=r(p+"\\."+p+"\\."+p+"\\."+p),h=r(a+"{1,4}"),d=r(r(h+"\\:"+h)+"|"+f),v=r(r(h+"\\:")+"{6}"+d),y=r("\\:\\:"+r(h+"\\:")+"{5}"+d),g=r(r(h)+"?\\:\\:"+r(h+"\\:")+"{4}"+d),m=r(r(r(h+"\\:")+"{0,1}"+h)+"?\\:\\:"+r(h+"\\:")+"{3}"+d),b=r(r(r(h+"\\:")+"{0,2}"+h)+"?\\:\\:"+r(h+"\\:")+"{2}"+d),w=r(r(r(h+"\\:")+"{0,3}"+h)+"?\\:\\:"+h+"\\:"+d),E=r(r(r(h+"\\:")+"{0,4}"+h)+"?\\:\\:"+d),x=r(r(r(h+"\\:")+"{0,5}"+h)+"?\\:\\:"+h),S=r(r(r(h+"\\:")+"{0,6}"+h)+"?\\:\\:"),O=r([v,y,g,m,b,w,E,x,S].join("|")),C=r(r(l+"|"+i)+"+");r("[vV]"+a+"+\\."+t(l,s,"[\\:]")+"+"),r(r(i+"|"+t(l,s))+"*");var A=r(i+"|"+t(l,s,"[\\:\\@]"));return r(r(i+"|"+t(l,s,"[\\@]"))+"+"),r(r(A+"|"+t("[\\/\\?]",u))+"*"),{NOT_SCHEME:new RegExp(t("[^]",n,o,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(t("[^\\%\\:]",l,s),"g"),NOT_HOST:new RegExp(t("[^\\%\\[\\]\\:]",l,s),"g"),NOT_PATH:new RegExp(t("[^\\%\\/\\:\\@]",l,s),"g"),NOT_PATH_NOSCHEME:new RegExp(t("[^\\%\\/\\@]",l,s),"g"),NOT_QUERY:new RegExp(t("[^\\%]",l,s,"[\\:\\@\\/\\?]",u),"g"),NOT_FRAGMENT:new RegExp(t("[^\\%]",l,s,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(t("[^]",l,s),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(t("[^\\%]",l,c),"g"),PCT_ENCODED:new RegExp(i,"g"),IPV4ADDRESS:new RegExp("^("+f+")$"),IPV6ADDRESS:new RegExp("^\\[?("+O+")"+r(r("\\%25|\\%(?!"+a+"{2})")+"("+C+")")+"?\\]?$")}}var c=s(!1),u=s(!0),l=function(){function e(e,t){var r=[],n=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(n=(i=s.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(o)throw a}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),p=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)},f=2147483647,h=36,d=1,v=26,y=38,g=700,m=72,b=128,w="-",E=/^xn--/,x=/[^\0-\x7E]/,S=/[\x2E\u3002\uFF0E\uFF61]/g,O={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},C=h-d,A=Math.floor,k=String.fromCharCode;function T(e){throw new RangeError(O[e])}function j(e,t){for(var r=[],n=e.length;n--;)r[n]=t(e[n]);return r}function I(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+j((e=e.replace(S,".")).split("."),t).join(".")}function $(e){for(var t=[],r=0,n=e.length;r<n;){var o=e.charCodeAt(r++);if(o>=55296&&o<=56319&&r<n){var a=e.charCodeAt(r++);56320==(64512&a)?t.push(((1023&o)<<10)+(1023&a)+65536):(t.push(o),r--)}else t.push(o)}return t}var R=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:h},P=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},N=function(e,t,r){var n=0;for(e=r?A(e/g):e>>1,e+=A(e/t);e>C*v>>1;n+=h)e=A(e/C);return A(n+(C+1)*e/(e+y))},D=function(e){var t=[],r=e.length,n=0,o=b,a=m,i=e.lastIndexOf(w);i<0&&(i=0);for(var s=0;s<i;++s)e.charCodeAt(s)>=128&&T("not-basic"),t.push(e.charCodeAt(s));for(var c=i>0?i+1:0;c<r;){for(var u=n,l=1,p=h;;p+=h){c>=r&&T("invalid-input");var y=R(e.charCodeAt(c++));(y>=h||y>A((f-n)/l))&&T("overflow"),n+=y*l;var g=p<=a?d:p>=a+v?v:p-a;if(y<g)break;var E=h-g;l>A(f/E)&&T("overflow"),l*=E}var x=t.length+1;a=N(n-u,x,0==u),A(n/x)>f-o&&T("overflow"),o+=A(n/x),n%=x,t.splice(n++,0,o)}return String.fromCodePoint.apply(String,t)},_=function(e){var t=[],r=(e=$(e)).length,n=b,o=0,a=m,i=!0,s=!1,c=void 0;try{for(var u,l=e[Symbol.iterator]();!(i=(u=l.next()).done);i=!0){var p=u.value;p<128&&t.push(k(p))}}catch(e){s=!0,c=e}finally{try{!i&&l.return&&l.return()}finally{if(s)throw c}}var y=t.length,g=y;for(y&&t.push(w);g<r;){var E=f,x=!0,S=!1,O=void 0;try{for(var C,j=e[Symbol.iterator]();!(x=(C=j.next()).done);x=!0){var I=C.value;I>=n&&I<E&&(E=I)}}catch(e){S=!0,O=e}finally{try{!x&&j.return&&j.return()}finally{if(S)throw O}}var R=g+1;E-n>A((f-o)/R)&&T("overflow"),o+=(E-n)*R,n=E;var D=!0,_=!1,F=void 0;try{for(var q,U=e[Symbol.iterator]();!(D=(q=U.next()).done);D=!0){var z=q.value;if(z<n&&++o>f&&T("overflow"),z==n){for(var L=o,H=h;;H+=h){var V=H<=a?d:H>=a+v?v:H-a;if(L<V)break;var M=L-V,J=h-V;t.push(k(P(V+M%J,0))),L=A(M/J)}t.push(k(P(L,0))),a=N(o,R,g==y),o=0,++g}}}catch(e){_=!0,F=e}finally{try{!D&&U.return&&U.return()}finally{if(_)throw F}}++o,++n}return t.join("")},F=function(e){return I(e,(function(e){return E.test(e)?D(e.slice(4).toLowerCase()):e}))},q=function(e){return I(e,(function(e){return x.test(e)?"xn--"+_(e):e}))},U={version:"2.1.0",ucs2:{decode:$,encode:function(e){return String.fromCodePoint.apply(String,p(e))}},decode:D,encode:_,toASCII:q,toUnicode:F},z={};function L(e){var t=e.charCodeAt(0);return t<16?"%0"+t.toString(16).toUpperCase():t<128?"%"+t.toString(16).toUpperCase():t<2048?"%"+(t>>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function H(e){for(var t="",r=0,n=e.length;r<n;){var o=parseInt(e.substr(r+1,2),16);if(o<128)t+=String.fromCharCode(o),r+=3;else if(o>=194&&o<224){if(n-r>=6){var a=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((31&o)<<6|63&a)}else t+=e.substr(r,6);r+=6}else if(o>=224){if(n-r>=9){var i=parseInt(e.substr(r+4,2),16),s=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&s)}else t+=e.substr(r,9);r+=9}else t+=e.substr(r,3),r+=3}return t}function V(e,t){function r(e){var r=H(e);return r.match(t.UNRESERVED)?r:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,r).replace(t.NOT_USERINFO,L).replace(t.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_HOST,L).replace(t.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,r).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,L).replace(t.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,r).replace(t.NOT_QUERY,L).replace(t.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,r).replace(t.NOT_FRAGMENT,L).replace(t.PCT_ENCODED,o)),e}function M(e){return e.replace(/^0*(.*)/,"$1")||"0"}function J(e,t){var r=e.match(t.IPV4ADDRESS)||[],n=l(r,2)[1];return n?n.split(".").map(M).join("."):e}function B(e,t){var r=e.match(t.IPV6ADDRESS)||[],n=l(r,3),o=n[1],a=n[2];if(o){for(var i=o.toLowerCase().split("::").reverse(),s=l(i,2),c=s[0],u=s[1],p=u?u.split(":").map(M):[],f=c.split(":").map(M),h=t.IPV4ADDRESS.test(f[f.length-1]),d=h?7:8,v=f.length-d,y=Array(d),g=0;g<d;++g)y[g]=p[g]||f[v+g]||"";h&&(y[d-1]=J(y[d-1],t));var m=y.reduce((function(e,t,r){if(!t||"0"===t){var n=e[e.length-1];n&&n.index+n.length===r?n.length++:e.push({index:r,length:1})}return e}),[]).sort((function(e,t){return t.length-e.length}))[0],b=void 0;if(m&&m.length>1){var w=y.slice(0,m.index),E=y.slice(m.index+m.length);b=w.join(":")+"::"+E.join(":")}else b=y.join(":");return a&&(b+="%"+a),b}return e}var K=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,G=void 0==="".match(/(){0}/)[1];function Z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={},n=!1!==t.iri?u:c;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var o=e.match(K);if(o){G?(r.scheme=o[1],r.userinfo=o[3],r.host=o[4],r.port=parseInt(o[5],10),r.path=o[6]||"",r.query=o[7],r.fragment=o[8],isNaN(r.port)&&(r.port=o[5])):(r.scheme=o[1]||void 0,r.userinfo=-1!==e.indexOf("@")?o[3]:void 0,r.host=-1!==e.indexOf("//")?o[4]:void 0,r.port=parseInt(o[5],10),r.path=o[6]||"",r.query=-1!==e.indexOf("?")?o[7]:void 0,r.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(r.port)&&(r.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),r.host&&(r.host=B(J(r.host,n),n)),void 0!==r.scheme||void 0!==r.userinfo||void 0!==r.host||void 0!==r.port||r.path||void 0!==r.query?void 0===r.scheme?r.reference="relative":void 0===r.fragment?r.reference="absolute":r.reference="uri":r.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==r.reference&&(r.error=r.error||"URI is not a "+t.reference+" reference.");var a=z[(t.scheme||r.scheme||"").toLowerCase()];if(t.unicodeSupport||a&&a.unicodeSupport)V(r,n);else{if(r.host&&(t.domainHost||a&&a.domainHost))try{r.host=U.toASCII(r.host.replace(n.PCT_ENCODED,H).toLowerCase())}catch(e){r.error=r.error||"Host's domain name can not be converted to ASCII via punycode: "+e}V(r,c)}a&&a.parse&&a.parse(r,t)}else r.error=r.error||"URI can not be parsed.";return r}function W(e,t){var r=!1!==t.iri?u:c,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(B(J(String(e.host),r),r).replace(r.IPV6ADDRESS,(function(e,t,r){return"["+t+(r?"%25"+r:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}var Q=/^\.\.?\//,Y=/^\/\.(\/|$)/,X=/^\/\.\.(\/|$)/,ee=/^\/?(?:.|\n)*?(?=\/|$)/;function te(e){for(var t=[];e.length;)if(e.match(Q))e=e.replace(Q,"");else if(e.match(Y))e=e.replace(Y,"/");else if(e.match(X))e=e.replace(X,"/"),t.pop();else if("."===e||".."===e)e="";else{var r=e.match(ee);if(!r)throw new Error("Unexpected dot segment condition");var n=r[0];e=e.slice(n.length),t.push(n)}return t.join("")}function re(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.iri?u:c,n=[],o=z[(t.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,t),e.host)if(r.IPV6ADDRESS.test(e.host));else if(t.domainHost||o&&o.domainHost)try{e.host=t.iri?U.toUnicode(e.host):U.toASCII(e.host.replace(r.PCT_ENCODED,H).toLowerCase())}catch(r){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+r}V(e,r),"suffix"!==t.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var a=W(e,t);if(void 0!==a&&("suffix"!==t.reference&&n.push("//"),n.push(a),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var i=e.path;t.absolutePath||o&&o.absolutePath||(i=te(i)),void 0===a&&(i=i.replace(/^\/\//,"/%2F")),n.push(i)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function ne(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=Z(re(e,r),r),t=Z(re(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=te(t.path||""),n.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=te(t.path||""),n.query=t.query):(t.path?("/"===t.path.charAt(0)?n.path=te(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path:n.path="/"+t.path,n.path=te(n.path)),n.query=t.query):(n.path=e.path,void 0!==t.query?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function oe(e,t,r){var n=i({scheme:"null"},r);return re(ne(Z(e,n),Z(t,n),n,!0),n)}function ae(e,t){return"string"==typeof e?e=re(Z(e,t),t):"object"===n(e)&&(e=Z(re(e,t),t)),e}function ie(e,t,r){return"string"==typeof e?e=re(Z(e,r),r):"object"===n(e)&&(e=re(e,r)),"string"==typeof t?t=re(Z(t,r),r):"object"===n(t)&&(t=re(t,r)),e===t}function se(e,t){return e&&e.toString().replace(t&&t.iri?u.ESCAPE:c.ESCAPE,L)}function ce(e,t){return e&&e.toString().replace(t&&t.iri?u.PCT_ENCODED:c.PCT_ENCODED,H)}var ue={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){var r="https"===String(e.scheme).toLowerCase();return e.port!==(r?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},le={scheme:"https",domainHost:ue.domainHost,parse:ue.parse,serialize:ue.serialize};function pe(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var fe={scheme:"ws",domainHost:!0,parse:function(e,t){var r=e;return r.secure=pe(r),r.resourceName=(r.path||"/")+(r.query?"?"+r.query:""),r.path=void 0,r.query=void 0,r},serialize:function(e,t){if(e.port!==(pe(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var r=e.resourceName.split("?"),n=l(r,2),o=n[0],a=n[1];e.path=o&&"/"!==o?o:void 0,e.query=a,e.resourceName=void 0}return e.fragment=void 0,e}},he={scheme:"wss",domainHost:fe.domainHost,parse:fe.parse,serialize:fe.serialize},de={},ve="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ye="[0-9A-Fa-f]",ge=r(r("%[EFef]"+ye+"%"+ye+ye+"%"+ye+ye)+"|"+r("%[89A-Fa-f]"+ye+"%"+ye+ye)+"|"+r("%"+ye+ye)),me="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",be=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),we="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Ee=new RegExp(ve,"g"),xe=new RegExp(ge,"g"),Se=new RegExp(t("[^]",me,"[\\.]",'[\\"]',be),"g"),Oe=new RegExp(t("[^]",ve,we),"g"),Ce=Oe;function Ae(e){var t=H(e);return t.match(Ee)?t:e}var ke={scheme:"mailto",parse:function(e,t){var r=e,n=r.to=r.path?r.path.split(","):[];if(r.path=void 0,r.query){for(var o=!1,a={},i=r.query.split("&"),s=0,c=i.length;s<c;++s){var u=i[s].split("=");switch(u[0]){case"to":for(var l=u[1].split(","),p=0,f=l.length;p<f;++p)n.push(l[p]);break;case"subject":r.subject=ce(u[1],t);break;case"body":r.body=ce(u[1],t);break;default:o=!0,a[ce(u[0],t)]=ce(u[1],t)}}o&&(r.headers=a)}r.query=void 0;for(var h=0,d=n.length;h<d;++h){var v=n[h].split("@");if(v[0]=ce(v[0]),t.unicodeSupport)v[1]=ce(v[1],t).toLowerCase();else try{v[1]=U.toASCII(ce(v[1],t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[h]=v.join("@")}return r},serialize:function(e,t){var r=e,n=a(e.to);if(n){for(var i=0,s=n.length;i<s;++i){var c=String(n[i]),u=c.lastIndexOf("@"),l=c.slice(0,u).replace(xe,Ae).replace(xe,o).replace(Se,L),p=c.slice(u+1);try{p=t.iri?U.toUnicode(p):U.toASCII(ce(p,t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+e}n[i]=l+"@"+p}r.path=n.join(",")}var f=e.headers=e.headers||{};e.subject&&(f.subject=e.subject),e.body&&(f.body=e.body);var h=[];for(var d in f)f[d]!==de[d]&&h.push(d.replace(xe,Ae).replace(xe,o).replace(Oe,L)+"="+f[d].replace(xe,Ae).replace(xe,o).replace(Ce,L));return h.length&&(r.query=h.join("&")),r}},Te=/^([^\:]+)\:(.*)/,je={scheme:"urn",parse:function(e,t){var r=e.path&&e.path.match(Te),n=e;if(r){var o=t.scheme||n.scheme||"urn",a=r[1].toLowerCase(),i=r[2],s=o+":"+(t.nid||a),c=z[s];n.nid=a,n.nss=i,n.path=void 0,c&&(n=c.parse(n,t))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,t){var r=t.scheme||e.scheme||"urn",n=e.nid,o=r+":"+(t.nid||n),a=z[o];a&&(e=a.serialize(e,t));var i=e,s=e.nss;return i.path=(n||t.nid)+":"+s,i}},Ie=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,$e={scheme:"urn:uuid",parse:function(e,t){var r=e;return r.uuid=r.nss,r.nss=void 0,t.tolerant||r.uuid&&r.uuid.match(Ie)||(r.error=r.error||"UUID is not valid."),r},serialize:function(e,t){var r=e;return r.nss=(e.uuid||"").toLowerCase(),r}};z[ue.scheme]=ue,z[le.scheme]=le,z[fe.scheme]=fe,z[he.scheme]=he,z[ke.scheme]=ke,z[je.scheme]=je,z[$e.scheme]=$e,e.SCHEMES=z,e.pctEncChar=L,e.pctDecChars=H,e.parse=Z,e.removeDotSegments=te,e.serialize=re,e.resolveComponents=ne,e.resolve=oe,e.normalize=ae,e.equal=ie,e.escapeComponent=se,e.unescapeComponent=ce,Object.defineProperty(e,"__esModule",{value:!0})}(t)}(0,o.exports);const a=o.exports,i={null:e=>null===e,boolean:e=>"boolean"==typeof e,object:e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,array:e=>Array.isArray(e),number:e=>"number"==typeof e,integer:e=>Number.isInteger(e),string:e=>"string"==typeof e};var s={jsonTypeOf:(e,t)=>i[t](e),resolveUrl:(e,t)=>{const r=a.resolve(e,t,{iri:!0});if(a.resolve(e,"",{iri:!0})&&"file"===a.parse(r).scheme&&"file"!==a.parse(e).scheme)throw Error(`Can't access file '${r}' resource from network context '${e}'`);return r},urlFragment:e=>a.unescapeComponent(a.parse(e).fragment)||"",pathRelative:(e,t)=>{if(e===t)return"";let r=1;const n=e.length-1,o=t.length-r,a=n<o?n:o;let i=-1,s=0;for(;s<a;s++){const n=e.charCodeAt(s+1);if(n!==t.charCodeAt(r+s))break;47===n&&(i=s)}if(o>a){if(47===t.charCodeAt(r+s))return t.slice(r+s+1);if(0===s)return t.slice(r+s)}n>a&&(47===e.charCodeAt(s+1)?i=s:0===a&&(i=0));let c="";for(s=i+2;s<=e.length;++s)s!==e.length&&47!==e.charCodeAt(s)||(c+=0===c.length?"..":"/..");return r+=i,c.length>0?`${c}${t.slice(r,t.length)}`:(47===t.charCodeAt(r)&&++r,t.slice(r,t.length))}};const c=r,u=e=>{if(e.length>0&&"/"!==e[0])throw Error("Invalid JSON Pointer");return e.split("/").slice(1).map(y)},l=(e,t,r,n)=>{if(0===e.length)return r;if(e.length>1){if(Array.isArray(t)){const o=e.shift(),a=[...t];return a[o]=l(e,m(t,o,n),r,d(o,n)),a}{const o=e.shift();return{...t,[o]:l(e,m(t,o,n),r,d(o,n))}}}if(Array.isArray(t)){const n=[...t];return n[g(t,e[0])]=r,n}return"object"==typeof t&&null!==t?{...t,[e[0]]:r}:m(t,e[0],n)},p=(e,t,r,n)=>{if(0!==e.length)if(1!==e.length||b(t)){const o=e.shift();p(e,m(t,o,n),r,d(o,n))}else{t[g(t,e[0])]=r}},f=(e,t,r)=>{if(0!=e.length){if(e.length>1){const n=e.shift(),o=m(t,n,r);return{...t,[n]:f(e,o,d(n,r))}}if(Array.isArray(t))return t.filter(((t,r)=>r!=e[0]));if("object"==typeof t&&null!==t){const{[e[0]]:r,...n}=t;return n}return m(t,e[0],r)}},h=(e,t,r)=>{if(0!==e.length)if(e.length>1){const n=e.shift(),o=m(t,n,r);h(e,o,d(n,r))}else Array.isArray(t)?t.splice(e[0],1):"object"==typeof t&&null!==t?delete t[e[0]]:m(t,e[0],r)},d=c(((e,t)=>t+"/"+v(e))),v=e=>e.toString().replace(/~/g,"~0").replace(/\//g,"~1"),y=e=>e.toString().replace(/~1/g,"/").replace(/~0/g,"~"),g=(e,t)=>Array.isArray(e)&&"-"===t?e.length:t,m=(e,t,r="")=>{if(void 0===e)throw TypeError(`Value at '${r}' is undefined and does not have property '${t}'`);if(null===e)throw TypeError(`Value at '${r}' is null and does not have property '${t}'`);if(b(e))throw TypeError(`Value at '${r}' is a ${typeof e} and does not have property '${t}'`);return e[g(e,t)]},b=e=>null===e||"object"!=typeof e;var w={nil:"",append:d,get:(e,t)=>{const r=u(e),n=e=>r.reduce((([e,t],r)=>[m(e,r,t),d(r,t)]),[e,""])[0];return void 0===t?n:n(t)},set:(e,t,r)=>{const n=u(e),o=c(((e,t)=>l(n,e,t,"")));return void 0===t?o:o(t,r)},assign:(e,t,r)=>{const n=u(e),o=c(((e,t)=>p(n,e,t,"")));return void 0===t?o:o(t,r)},unset:(e,t)=>{const r=u(e),n=e=>f(r,e,"");return void 0===t?n:n(t)},remove:(e,t)=>{const r=u(e),n=e=>h(r,e,"");return void 0===t?n:n(t)}};const E=Symbol("$__value"),x=Symbol("$__href");var S={cons:(e,t)=>Object.freeze({[x]:e,[E]:t}),isReference:e=>e&&void 0!==e[x],href:e=>e[x],value:e=>e[E]};const O=w,C=r,{resolveUrl:A,jsonTypeOf:k}=s,T=S,j=Object.freeze({id:"",pointer:"",instance:void 0,value:void 0}),I=e=>T.isReference(e.value)?T.value(e.value):e.value,$=C(((e,t)=>k(I(e),t))),R=(e,t)=>Object.freeze({...t,pointer:O.append(e,t.pointer),value:I(t)[e]}),P=C(((e,t)=>I(t).map(((r,n,o,a)=>e(R(n,t),n,o,a))))),N=C(((e,t)=>I(t).forEach(((r,n,o,a)=>e(R(n,t),n,o,a))))),D=C(((e,t)=>I(t).map(((e,r,n,o)=>R(r,t))).filter(((t,r,n,o)=>e(t,r,n,o))))),_=C(((e,t,r)=>I(r).reduce(((t,n,o)=>e(t,R(o,r),o)),t))),F=C(((e,t)=>I(t).every(((r,n,o,a)=>e(R(n,t),n,o,a))))),q=C(((e,t)=>I(t).some(((r,n,o,a)=>e(R(n,t),n,o,a)))));var U={nil:j,cons:(e,t="")=>Object.freeze({...j,id:A(t,""),instance:e,value:e}),get:(e,t=j)=>{if(!e.startsWith("#"))throw Error(`No JSON document found at '${e.split("#")[0]}'`);return Object.freeze({...t,pointer:e.substr(1)})},uri:e=>`${e.id}#${encodeURI(e.pointer)}`,value:I,has:(e,t)=>e in I(t),typeOf:$,length:e=>I(e).length,step:R,entries:e=>Object.keys(I(e)).map((t=>[t,R(t,e)])),keys:e=>Object.keys(I(e)),map:P,forEach:N,filter:D,reduce:_,every:F,some:q},z=async e=>Object.entries(await e),L=function(e,t){return function r(){null==t&&(t=e.length);var n=[].slice.call(arguments);return n.length>=t?e.apply(this,n):function(){return r.apply(this,n.concat([].slice.call(arguments)))}}};var H=L((async(e,t)=>(await t).map(e)));var V=L((async(e,t,r)=>(await r).reduce((async(t,r)=>e(await t,r)),t)));const M=V;var J=L((async(e,t,r={})=>M((async(t,r)=>await e(r)?t.concat([r]):t),[],t,r)));const B=H;var K=L((async(e,t)=>{const r=await B(e,t);return(await Promise.all(r)).some((e=>e))}));const G=H;var Z=L((async(e,t)=>{const r=await G(e,t);return(await Promise.all(r)).every((e=>e))}));var W=L(((e,t)=>e.reduce((async(e,t)=>t(await e)),t)));const Q=W,Y=z,X=V;var ee,te,re,ne={entries:z,map:H,filter:J,reduce:V,some:K,every:Z,pipeline:W,all:e=>Promise.all(e),allValues:e=>Q([Y,X((async(e,[t,r])=>(e[t]=await r,e)),{})],e)},oe={exports:{}};te=t,re=function(){var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r="boolean"==typeof(new RegExp).sticky;function n(e){return e&&"[object RegExp]"===t.call(e)}function o(e){return e&&"object"==typeof e&&!n(e)&&!Array.isArray(e)}function a(e){return"("+e+")"}function i(e){return e.length?"(?:"+e.map((function(e){return"(?:"+e+")"})).join("|")+")":"(?!)"}function s(e){if("string"==typeof e)return"(?:"+e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+")";if(n(e)){if(e.ignoreCase)throw new Error("RegExp /i flag not allowed");if(e.global)throw new Error("RegExp /g flag is implied");if(e.sticky)throw new Error("RegExp /y flag is implied");if(e.multiline)throw new Error("RegExp /m flag is implied");return e.source}throw new Error("Not a pattern: "+e)}function c(t,r){if(o(r)||(r={match:r}),r.include)throw new Error("Matching rules cannot also include states");var a={defaultType:t,lineBreaks:!!r.error||!!r.fallback,pop:!1,next:null,push:null,error:!1,fallback:!1,value:null,type:null,shouldThrow:!1};for(var i in r)e.call(r,i)&&(a[i]=r[i]);if("string"==typeof a.type&&t!==a.type)throw new Error("Type transform cannot be a string (type '"+a.type+"' for token '"+t+"')");var s=a.match;return a.match=Array.isArray(s)?s:s?[s]:[],a.match.sort((function(e,t){return n(e)&&n(t)?0:n(t)?-1:n(e)?1:t.length-e.length})),a}function u(e){return Array.isArray(e)?function(e){for(var t=[],r=0;r<e.length;r++){var n=e[r];if(n.include)for(var o=[].concat(n.include),a=0;a<o.length;a++)t.push({include:o[a]});else{if(!n.type)throw new Error("Rule has no type: "+JSON.stringify(n));t.push(c(n.type,n))}}return t}(e):function(e){for(var t=Object.getOwnPropertyNames(e),r=[],n=0;n<t.length;n++){var a=t[n],i=e[a],s=[].concat(i);if("include"!==a){var u=[];s.forEach((function(e){o(e)?(u.length&&r.push(c(a,u)),r.push(c(a,e)),u=[]):u.push(e)})),u.length&&r.push(c(a,u))}else for(var l=0;l<s.length;l++)r.push({include:s[l]})}return r}(e)}var l=c("error",{lineBreaks:!0,shouldThrow:!0});function p(e,t){for(var o=null,c=Object.create(null),u=!0,p=null,f=[],h=[],d=0;d<e.length;d++)e[d].fallback&&(u=!1);for(d=0;d<e.length;d++){var v=e[d];if(v.include)throw new Error("Inheritance is not allowed in stateless lexers");if(v.error||v.fallback){if(o)throw!v.fallback==!o.fallback?new Error("Multiple "+(v.fallback?"fallback":"error")+" rules not allowed (for token '"+v.defaultType+"')"):new Error("fallback and error are mutually exclusive (for token '"+v.defaultType+"')");o=v}var y=v.match.slice();if(u)for(;y.length&&"string"==typeof y[0]&&1===y[0].length;)c[y.shift().charCodeAt(0)]=v;if(v.pop||v.push||v.next){if(!t)throw new Error("State-switching options are not allowed in stateless lexers (for token '"+v.defaultType+"')");if(v.fallback)throw new Error("State-switching options are not allowed on fallback tokens (for token '"+v.defaultType+"')")}if(0!==y.length){u=!1,f.push(v);for(var g=0;g<y.length;g++){var m=y[g];if(n(m))if(null===p)p=m.unicode;else if(p!==m.unicode&&!1===v.fallback)throw new Error("If one rule is /u then all must be")}var b=i(y.map(s)),w=new RegExp(b);if(w.test(""))throw new Error("RegExp matches empty string: "+w);if(new RegExp("|"+b).exec("").length-1>0)throw new Error("RegExp has capture groups: "+w+"\nUse (?: … ) instead");if(!v.lineBreaks&&w.test("\n"))throw new Error("Rule should declare lineBreaks: "+w);h.push(a(b))}}var E=o&&o.fallback,x=r&&!E?"ym":"gm",S=r||E?"":"|";return!0===p&&(x+="u"),{regexp:new RegExp(i(h)+S,x),groups:f,fast:c,error:o||l}}function f(e,t,r){var n=e&&(e.push||e.next);if(n&&!r[n])throw new Error("Missing state '"+n+"' (in token '"+e.defaultType+"' of state '"+t+"')");if(e&&e.pop&&1!=+e.pop)throw new Error("pop must be 1 (in token '"+e.defaultType+"' of state '"+t+"')")}var h=function(e,t){this.startState=t,this.states=e,this.buffer="",this.stack=[],this.reset()};h.prototype.reset=function(e,t){return this.buffer=e||"",this.index=0,this.line=t?t.line:1,this.col=t?t.col:1,this.queuedToken=t?t.queuedToken:null,this.queuedThrow=t?t.queuedThrow:null,this.setState(t?t.state:this.startState),this.stack=t&&t.stack?t.stack.slice():[],this},h.prototype.save=function(){return{line:this.line,col:this.col,state:this.state,stack:this.stack.slice(),queuedToken:this.queuedToken,queuedThrow:this.queuedThrow}},h.prototype.setState=function(e){if(e&&this.state!==e){this.state=e;var t=this.states[e];this.groups=t.groups,this.error=t.error,this.re=t.regexp,this.fast=t.fast}},h.prototype.popState=function(){this.setState(this.stack.pop())},h.prototype.pushState=function(e){this.stack.push(this.state),this.setState(e)};var d=r?function(e,t){return e.exec(t)}:function(e,t){var r=e.exec(t);return 0===r[0].length?null:r};function v(){return this.value}if(h.prototype._getGroup=function(e){for(var t=this.groups.length,r=0;r<t;r++)if(void 0!==e[r+1])return this.groups[r];throw new Error("Cannot find token type for matched text")},h.prototype.next=function(){var e=this.index;if(this.queuedGroup){var t=this._token(this.queuedGroup,this.queuedText,e);return this.queuedGroup=null,this.queuedText="",t}var r=this.buffer;if(e!==r.length){if(i=this.fast[r.charCodeAt(e)])return this._token(i,r.charAt(e),e);var n=this.re;n.lastIndex=e;var o=d(n,r),a=this.error;if(null==o)return this._token(a,r.slice(e,r.length),e);var i=this._getGroup(o),s=o[0];return a.fallback&&o.index!==e?(this.queuedGroup=i,this.queuedText=s,this._token(a,r.slice(e,o.index),e)):this._token(i,s,e)}},h.prototype._token=function(e,t,r){var n=0;if(e.lineBreaks){var o=/\n/g,a=1;if("\n"===t)n=1;else for(;o.exec(t);)n++,a=o.lastIndex}var i={type:"function"==typeof e.type&&e.type(t)||e.defaultType,value:"function"==typeof e.value?e.value(t):t,text:t,toString:v,offset:r,lineBreaks:n,line:this.line,col:this.col},s=t.length;if(this.index+=s,this.line+=n,0!==n?this.col=s-a+1:this.col+=s,e.shouldThrow)throw new Error(this.formatError(i,"invalid syntax"));return e.pop?this.popState():e.push?this.pushState(e.push):e.next&&this.setState(e.next),i},"undefined"!=typeof Symbol&&Symbol.iterator){var y=function(e){this.lexer=e};y.prototype.next=function(){var e=this.lexer.next();return{value:e,done:!e}},y.prototype[Symbol.iterator]=function(){return this},h.prototype[Symbol.iterator]=function(){return new y(this)}}return h.prototype.formatError=function(e,t){if(null==e){var r=this.buffer.slice(this.index);e={text:r,offset:this.index,lineBreaks:-1===r.indexOf("\n")?0:1,line:this.line,col:this.col}}var n=Math.max(0,e.offset-e.col+1),o=e.lineBreaks?e.text.indexOf("\n"):e.text.length,a=this.buffer.substring(n,e.offset+o);return t+=" at line "+e.line+" col "+e.col+":\n\n",t+=" "+a+"\n",t+=" "+Array(e.col).join(" ")+"^"},h.prototype.clone=function(){return new h(this.states,this.state)},h.prototype.has=function(e){return!0},{compile:function(e){var t=p(u(e));return new h({start:t},"start")},states:function(e,t){var r=e.$all?u(e.$all):[];delete e.$all;var n=Object.getOwnPropertyNames(e);t||(t=n[0]);for(var o=Object.create(null),a=0;a<n.length;a++)o[b=n[a]]=u(e[b]).concat(r);for(a=0;a<n.length;a++)for(var i=o[b=n[a]],s=Object.create(null),c=0;c<i.length;c++){var l=i[c];if(l.include){var d=[c,1];if(l.include!==b&&!s[l.include]){s[l.include]=!0;var v=o[l.include];if(!v)throw new Error("Cannot include nonexistent state '"+l.include+"' (in state '"+b+"')");for(var y=0;y<v.length;y++){var g=v[y];-1===i.indexOf(g)&&d.push(g)}}i.splice.apply(i,d),c--}}var m=Object.create(null);for(a=0;a<n.length;a++){var b;m[b=n[a]]=p(o[b],!0)}for(a=0;a<n.length;a++){var w=n[a],E=m[w],x=E.groups;for(c=0;c<x.length;c++)f(x[c],w,m);var S=Object.getOwnPropertyNames(E.fast);for(c=0;c<S.length;c++)f(E.fast[S[c]],w,m)}return new h(m,t)},error:Object.freeze({error:!0}),fallback:Object.freeze({fallback:!0}),keywords:function(e){for(var t=Object.create(null),r=Object.create(null),n=Object.getOwnPropertyNames(e),o=0;o<n.length;o++){var a=n[o],i=e[a];(Array.isArray(i)?i:[i]).forEach((function(e){if((r[e.length]=r[e.length]||[]).push(e),"string"!=typeof e)throw new Error("keyword must be string (in keyword '"+a+"')");t[e]=a}))}function s(e){return JSON.stringify(e)}var c="";for(var u in c+="switch (value.length) {\n",r){var l=r[u];c+="case "+u+":\n",c+="switch (value) {\n",l.forEach((function(e){var r=t[e];c+="case "+s(e)+": return "+s(r)+"\n"})),c+="}\n"}return c+="}\n",Function("value",c)}}},(ee=oe).exports?ee.exports=re():te.moo=re();const ae=oe.exports;const ie=w,se=e=>{const t=ae.states({main:{WS:{match:new RegExp("(?:(?:\\r?\\n)|[ \\t])+","u"),lineBreaks:!0},true:{match:"true",value:()=>!0},false:{match:"false",value:()=>!1},null:{match:"null",value:()=>null},number:{match:new RegExp("-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?:[eE][-+]?[0-9]+)?","u"),value:parseFloat},string:{match:new RegExp('"(?:[\\x20-\\x21\\x23-\\x5b\\x5d-\\u{10ffff}]|\\\\(?:["\\/\\\\brfnt]|u[0-9a-fA-F]{4}))*"',"u"),value:JSON.parse},"{":"{","}":"}","[":"[","]":"]",":":":",",":",",error:ae.error}});t.reset(e);const r=()=>{let e;do{if(e=t.next(),"error"===e?.type)throw SyntaxError(t.formatError(e,"Unrecognized token"))}while("WS"===e?.type);return e};let n,o=r();const a={offset:0,line:1,col:0,text:""};return{next:e=>{if(n=o,o=r(),e&&n?.type!==e)throw SyntaxError(t.formatError(n,`Expected a '${e}'`));return n},peek:()=>o,syntaxError:e=>{const r=n||a,o={...r,offset:r.offset+r.text.length,col:r.col+r.text.length};throw new SyntaxError(t.formatError(o,e))}}},ce=(e,t)=>t,ue=(e,t,r,n)=>{let o;const a=e.next();switch(a?.type){case"true":case"false":case"null":case"number":case"string":o=a.value;break;case"{":o=le(e,t,r,n);break;case"[":o=fe(e,t,r,n);break;default:e.syntaxError("Expected a JSON value")}return n(t,o,r)},le=(e,t,r,n)=>{const o={};return"}"!==e.peek()?.type&&pe(e,t,r,n,o),e.next("}"),o},pe=(e,t,r,n,o)=>{const a=e.next("string").value;e.next(":"),ve(e.peek())||e.syntaxError("Expected a JSON value"),o[a]=ue(e,a,ie.append(a,r),n),","===e.peek()?.type?(e.next(),pe(e,a,r,n,o)):ve(e.peek())&&e.next(",")},fe=(e,t,r,n)=>{const o=[];return"]"!==e.peek()?.type&&he(e,0,r,n,o),e.next("]"),o},he=(e,t,r,n,o)=>{ve(e.peek())||e.syntaxError("Expected a JSON value"),o[t]=ue(e,t,ie.append(t,r),n),","===e.peek()?.type?(e.next(),he(e,t+1,r,n,o)):ve(e.peek())&&e.next(",")},de=new Set(["string","number","true","false","null","[","{"]),ve=e=>de.has(e?.type);var ye=(e,t=ce)=>{const r=se(e),n=ue(r,"",ie.nil,t);return r.peek()&&r.syntaxError("A value has been parsed, but more tokens were found"),n};const ge=w,me=(e,t)=>t,be=(e,t,r,n,o,a)=>{let i;return e=t(n,e,o),i=Array.isArray(e)?we(e,t,r,o,a):"object"==typeof e&&null!==e?Ee(e,t,r,o,a):JSON.stringify(e),i},we=(e,t,r,n,o)=>{0===e.length&&(r="");const a=r?`\n${r.repeat(o-1)}`:"";return"["+a+r+e.map(((e,a)=>{const i=ge.append(a,n);return be(e,t,r,a,i,o+1)})).join(`,${a}${r}`)+a+"]"},Ee=(e,t,r,n,o)=>{0===Object.keys(e).length&&(r="");const a=r?`\n${r.repeat(o-1)}`:"",i=r?" ":"";return"{"+a+r+Object.entries(e).map((([e,a])=>{const s=ge.append(e,n);return JSON.stringify(e)+":"+i+be(a,t,r,e,s,o+1)})).join(`,${a}${r}`)+a+"}"};var xe=(e,t=me,r="")=>be(e,t,r,"",ge.nil,1);var Se={parse:ye,stringify:xe},Oe=fetch,Ce={},Ae=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,ke=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,Te=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,je=/\\([\u000b\u0020-\u00ff])/g,Ie=/([\\"])/g,$e=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;function Re(e){var t=String(e);if(Te.test(t))return t;if(t.length>0&&!ke.test(t))throw new TypeError("invalid parameter value");return'"'+t.replace(Ie,"\\$1")+'"'}function Pe(e){this.parameters=Object.create(null),this.type=e}Ce.format=function(e){if(!e||"object"!=typeof e)throw new TypeError("argument obj is required");var t=e.parameters,r=e.type;if(!r||!$e.test(r))throw new TypeError("invalid type");var n=r;if(t&&"object"==typeof t)for(var o,a=Object.keys(t).sort(),i=0;i<a.length;i++){if(o=a[i],!Te.test(o))throw new TypeError("invalid parameter name");n+="; "+o+"="+Re(t[o])}return n},Ce.parse=function(e){if(!e)throw new TypeError("argument string is required");var t="object"==typeof e?function(e){var t;"function"==typeof e.getHeader?t=e.getHeader("content-type"):"object"==typeof e.headers&&(t=e.headers&&e.headers["content-type"]);if("string"!=typeof t)throw new TypeError("content-type header is missing from object");return t}(e):e;if("string"!=typeof t)throw new TypeError("argument string is required to be a string");var r=t.indexOf(";"),n=-1!==r?t.substr(0,r).trim():t.trim();if(!$e.test(n))throw new TypeError("invalid media type");var o=new Pe(n.toLowerCase());if(-1!==r){var a,i,s;for(Ae.lastIndex=r;i=Ae.exec(t);){if(i.index!==r)throw new TypeError("invalid parameter format");r+=i[0].length,a=i[1].toLowerCase(),'"'===(s=i[2])[0]&&(s=s.substr(1,s.length-2).replace(je,"$1")),o.parameters[a]=s}if(r!==t.length)throw new TypeError("invalid parameter format")}return o};const Ne=Ce,De={};var _e={addPlugin:(e,t)=>{De[e]=t},parse:e=>{const t=Ne.parse(e.headers.get("content-type"));if(!(t.type in De))throw Error(`${e.url} is not a schema. Found a document with media type: ${t.type}`);return De[t.type].parse(e,t.parameters)},getContentType:e=>{for(const t in De)if(De[t].matcher(e))return t;return"application/octet-stream"}};const Fe=r,qe=ne,Ue=Se,ze=w,{jsonTypeOf:Le,resolveUrl:He,urlFragment:Ve,pathRelative:Me}=s,Je=Oe,Be=S,Ke=_e,Ge="https://json-schema.org/draft/2019-09/vocab/core",Ze="https://json-schema.org/draft/2020-12/vocab/core",We={},Qe={},Ye=(e,t)=>{const r=Qe[e];return We[r]?.[t]},Xe={},et={},tt=(e,t="",r="")=>{e=JSON.parse(JSON.stringify(e));const n=He(t,""),o=He(e.$schema||r,"");if(!o)throw Error("Couldn't determine schema dialect");if(delete e.$schema,!(o in Qe))if(!0===e?.$vocabulary?.[Ge]&&o===rt(e,n,Ge)[0])Qe[o]=Ge;else if(!0===e?.$vocabulary?.[Ze]&&o===rt(e,n,Ze)[0])Qe[o]=Ze;else{const e=Xe[o];if(!e)throw Error(`Couldn't determine JSON Schema version for dialect: '${o}'`);!0===e.vocabulary[Ge]?Qe[o]=Ge:!0===e.vocabulary[Ze]?Qe[o]=Ze:Qe[o]=Qe[e.dialectId]}const[a,i]=rt(e,n,Qe[o]);if(!a)throw Error("Couldn't determine an identifier for the schema");const s=Ye(o,"baseToken");delete e[s],n&&(et[n]=a);const c=Ye(o,"anchorToken");i&&s===c&&(e[c]=c!==s?encodeURI(i):`#${encodeURI(i)}`);const u={},l=Ye(o,"recursiveAnchorToken");let p;!0===e[l]&&(u[""]=`${a}#`,e[c]="",delete e[l]);const f=Ye(o,"vocabularyToken");Le(e[f],"object")?(p=e[f],delete e[f]):p={[Qe[o]]:!0};const h={"":""};return Xe[a]={id:a,dialectId:o,schema:nt(e,a,o,ze.nil,h,u),anchors:h,dynamicAnchors:u,vocabulary:p,validated:!1},a},rt=(e,t,r)=>{const n=We[r]?.baseToken,o=He(t,e[n]||"");return[He(o,""),Ve(o)]},nt=(e,t,r,n,o,a)=>{if(Le(e,"object")){const i="string"==typeof e.$schema?He(e.$schema,""):r,s=Ye(i,"embeddedToken"),c=Ye(i,"anchorToken");if("string"==typeof e[s]&&(s!==c||"#"!==e[s][0])){const n=He(t,e[s]);return e[Ye(i,"baseToken")]=n,tt(e,n,r),Be.cons(e[s],e)}const u=Ye(r,"anchorToken"),l=Ye(r,"dynamicAnchorToken");"string"==typeof e[l]&&(a[e[l]]=`${t}#${encodeURI(n)}`,o[e[l]]=n,delete e[l]);const p=Ye(r,"embeddedToken");if("string"==typeof e[u]){const t=u!==p?e[u]:e[u].slice(1);o[t]=n,delete e[u]}const f=Ye(r,"jrefToken");if("string"==typeof e[f])return Be.cons(e[f],e);for(const i in e)e[i]=nt(e[i],t,r,ze.append(i,n),o,a);return e}return Array.isArray(e)?e.map(((e,i)=>nt(e,t,r,ze.append(i,n),o,a))):e},ot=e=>Xe[et[e]]||Xe[e],at=Object.freeze({id:"",dialectId:void 0,vocabulary:{},pointer:ze.nil,schema:void 0,value:void 0,anchors:{},dynamicAnchors:{},validated:!0}),it=async(e,t=at)=>{const r=He(ut(t),e),n=He(r,""),o=Ve(r);if(!(e=>e in Xe||e in et)(n)){const e=await Je(n,{headers:{Accept:"application/schema+json"}});if(e.status>=400)throw await e.text(),Error(`Failed to retrieve schema with id: ${n}`);const[t,r]=await Ke.parse(e);let o;o=t.$schema?He(t.$schema,""):r?He(n,r):"",o&&n!==o&&!(o in Qe)&&await it(o),tt(t,n,o)}const a=ot(n),i="/"!==o[0]?ct(a,o):o,s=Object.freeze({...a,pointer:i,value:ze.get(i,a.schema)});return st(s)},st=e=>Be.isReference(e.value)?it(Be.href(e.value),e):e,ct=(e,t)=>{if(!(t in e.anchors))throw Error(`No such anchor '${encodeURI(e.id)}#${encodeURI(t)}'`);return e.anchors[t]},ut=e=>`${e.id}#${encodeURI(e.pointer)}`,lt=e=>Be.isReference(e.value)?Be.value(e.value):e.value,pt=(e,t)=>{const r=ot(t.id),n=Object.freeze({...t,pointer:ze.append(e,t.pointer),value:lt(t)[e],validated:r.validated});return st(n)},ft=Fe(((e,t)=>qe.pipeline([lt,qe.map((async(r,n)=>e(await pt(n,t),n))),qe.all],t))),ht={parentId:"",parentDialect:"",includeEmbedded:!0},dt=(e,t)=>{if(t.startsWith("file://")){const r=e.slice(7,e.lastIndexOf("/"));return""===e?"":Me(r,t.slice(7))}return t};var vt={setConfig:(e,t,r)=>{Qe[e]=e,We[e]||(We[e]={}),We[e][t]=r},getConfig:Ye,add:tt,get:it,markValidated:e=>{Xe[e].validated=!0},uri:ut,value:lt,getAnchorPointer:ct,typeOf:(e,t)=>Le(lt(e),t),has:(e,t)=>e in lt(t),step:pt,keys:e=>Object.keys(lt(e)),entries:e=>qe.pipeline([lt,Object.keys,qe.map((async t=>[t,await pt(t,e)])),qe.all],e),map:ft,length:e=>lt(e).length,toSchema:(e,t={})=>{const r={...ht,...t},n=Ye(e.dialectId,"anchorToken"),o=Ye(e.dialectId,"dynamicAnchorToken"),a={};for(const t in e.anchors)""===t||e.dynamicAnchors[t]||(a[e.anchors[t]]=t);const i={};for(const t in e.dynamicAnchors){const r=Ve(e.dynamicAnchors[t]);i[r]=t}const s=JSON.parse(Ue.stringify(e.schema,((t,s,c)=>{if(Be.isReference(s)){const t=Be.value(s),n="string"==typeof t.$schema?He(t.$schema,""):e.dialectId,o=Ye(n,"embeddedToken");return!r.includeEmbedded&&o in t?void 0:Be.value(s)}return c in a&&(s={[n]:a[c],...s}),c in i&&(s={[o]:i[c],...s}),s}))),c=Ye(e.dialectId,"baseToken"),u=dt(r.parentId,e.id),l=r.parentDialect===e.dialectId?"":e.dialectId;return{...u&&{[c]:u},...l&&{$schema:l},...s}}};class yt extends Error{constructor(e){super("Invalid Schema"),this.name=this.constructor.name,this.output=e}}var gt=yt;const mt=vt;var bt={compile:e=>mt.value(e),interpret:()=>!0};const wt=r,Et=n.exports,{resolveUrl:xt}=s,St=U,Ot=vt,Ct=gt,At=_e,kt=bt,Tt="FLAG",jt="BASIC",It="DETAILED",$t="VERBOSE";let Rt=It,Pt=!0;At.addPlugin("application/schema+json",{parse:async(e,t)=>[await e.json(),t.schema||t.profile],matcher:e=>e.endsWith(".schema.json")});const Nt=async e=>{const t={metaData:{}};return{ast:t,schemaUri:await Ht(e,t)}},Dt=wt((({ast:e,schemaUri:t},r,n=Tt)=>{if(![Tt,jt,It,$t].includes(n))throw Error(`The '${n}' error format is not supported`);const o=[],a=Et.subscribe("result",_t(n,o));return Mt(t,r,e,{}),Et.unsubscribe(a),o[0]})),_t=(e,t)=>{const r=[];return(n,o)=>{if("result"===n){const{keyword:e,absoluteKeywordLocation:t,instanceLocation:n,valid:a}=o,i={keyword:e,absoluteKeywordLocation:t,instanceLocation:n,valid:a,errors:[]};r.push(i)}else if("result.start"===n)r.push(n);else if("result.end"===n){const n=r.pop();for(;"result.start"!==r[r.length-1];){const t=r.pop(),o=[t];e===jt&&(o.push(...t.errors),delete t.errors),(e===$t||e!==Tt&&!t.valid)&&n.errors.unshift(...o)}r[r.length-1]=n,t[0]=n}}},Ft={},qt=e=>Ft[e]||kt,Ut=e=>e in Ft,zt={},Lt={},Ht=async(e,t)=>{if(e=await Vt(e),!Ut(`${e.dialectId}#validate`)){const t=await Ot.get(e.dialectId);(Ot.getConfig(t.id,"mandatoryVocabularies")||[]).forEach((e=>{if(!t.vocabulary[e])throw Error(`Vocabulary '${e}' must be explicitly declared and required`)})),Object.entries(t.vocabulary).forEach((([e,r])=>{if(e in zt)Object.entries(zt[e]).forEach((([e,r])=>{((e,t)=>{Ft[e]={collectEvaluatedItems:(e,r,n,o,a)=>t.interpret(e,r,n,o,a)&&new Set,collectEvaluatedProperties:(e,r,n,o,a)=>t.interpret(e,r,n,o,a)&&[],...t}})(`${t.id}#${e}`,r)}));else if(r)throw Error(`Missing required vocabulary: ${e}`)}))}if(Pt&&!e.validated){if(Ot.markValidated(e.id),!(e.dialectId in Lt)){const t=await Ot.get(e.dialectId),r=await Nt(t);Lt[t.id]=Dt(r)}const t=St.cons(e.schema,e.id),r=Lt[e.dialectId](t,Rt);if(!r.valid)throw new Ct(r)}return e.id in t.metaData||(t.metaData[e.id]={id:e.id,dynamicAnchors:e.dynamicAnchors,anchors:e.anchors}),qt(`${e.dialectId}#validate`).compile(e,t)},Vt=async e=>Ot.typeOf(e,"string")?Vt(await Ot.get(Ot.value(e),e)):e,Mt=(e,t,r,n)=>{const o=Jt(e,r),a=xt(e,"");return qt(o).interpret(e,t,r,{...r.metaData[a].dynamicAnchors,...n})},Jt=(e,t)=>{if(!(e in t))throw Error(`No schema found at ${e}`);return t[e][0]};var Bt={validate:async(e,t,r)=>{const n=await Nt(e),o=(e,t)=>Dt(n,St.cons(e),t);return void 0===t?o:o(t,r)},compile:Nt,interpret:Dt,setMetaOutputFormat:e=>{Rt=e},setShouldMetaValidate:e=>{Pt=e},FLAG:Tt,BASIC:jt,DETAILED:It,VERBOSE:$t,add:(e,t="",r="")=>{const n=Ot.add(e,t,r);delete Lt[n]},getKeyword:qt,hasKeyword:Ut,defineVocabulary:(e,t)=>{zt[e]=t},compileSchema:Ht,interpretSchema:Mt,collectEvaluatedProperties:(e,t,r,n,o)=>{const a=Jt(e,r);return qt(a).collectEvaluatedProperties(e,t,r,n,o)},collectEvaluatedItems:(e,t,r,n,o)=>{const a=Jt(e,r);return qt(a).collectEvaluatedItems(e,t,r,n,o)},addMediaTypePlugin:At.addPlugin};const Kt=ne,Gt=n.exports,Zt=Bt,Wt=U,Qt=vt;var Yt={compile:async(e,t)=>{const r=Qt.uri(e);if(!(r in t)){t[r]=!1;const n=Qt.value(e);if(!["object","boolean"].includes(typeof n))throw Error(`No schema found at '${Qt.uri(e)}'`);t[r]=[`${e.dialectId}#validate`,Qt.uri(e),"boolean"==typeof n?n:await Kt.pipeline([Qt.entries,Kt.map((([t,r])=>[`${e.dialectId}#${t}`,r])),Kt.filter((([t])=>t!==`${e.dialectId}#validate`)),Kt.map((async([r,n])=>{const o=await Zt.getKeyword(r).compile(n,t,e);return[r,Qt.uri(n),o]})),Kt.all],e)]}return r},interpret:(e,t,r,n)=>{const[o,a,i]=r[e];Gt.publishSync("result.start");const s="boolean"==typeof i?i:i.every((([e,o,a])=>{Gt.publishSync("result.start");const i=Zt.getKeyword(e).interpret(a,t,r,n);return Gt.publishSync("result",{keyword:e,absoluteKeywordLocation:o,instanceLocation:Wt.uri(t),valid:i,ast:a}),Gt.publishSync("result.end"),i}));return Gt.publishSync("result",{keyword:o,absoluteKeywordLocation:a,instanceLocation:Wt.uri(t),valid:s,ast:e}),Gt.publishSync("result.end"),s},collectEvaluatedProperties:(e,t,r,n,o=!1)=>{const a=r[e][2];return"boolean"==typeof a?!!a&&[]:a.filter((([e])=>!o||!e.endsWith("#unevaluatedProperties"))).reduce(((e,[o,,a])=>{const i=e&&Zt.getKeyword(o).collectEvaluatedProperties(a,t,r,n);return!1!==i&&[...e,...i]}),[])},collectEvaluatedItems:(e,t,r,n,o=!1)=>{const a=r[e][2];return"boolean"==typeof a?!!a&&new Set:a.filter((([e])=>!o||!e.endsWith("#unevaluatedItems"))).reduce(((e,[o,,a])=>{const i=!1!==e&&Zt.getKeyword(o).collectEvaluatedItems(a,t,r,n);return!1!==i&&new Set([...e,...i])}),new Set)}};e("default",{Core:Bt,Schema:vt,Instance:U,Reference:S,Keywords:{metaData:bt,validate:Yt},InvalidSchemaError:gt})}}}));
//# sourceMappingURL=json-schema-core-system.min.js.map

@@ -1,3 +0,3 @@

!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).JSC={})}(this,(function(e){"use strict";var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=function(e,r){return function t(){null==r&&(r=e.length);var n=[].slice.call(arguments);return n.length>=r?e.apply(this,n):function(){return t.apply(this,n.concat([].slice.call(arguments)))}}};var n={exports:{}};!function(e,t){!function(r,n){var o={};r.PubSub?(o=r.PubSub,console.warn("PubSub already loaded, using existing version")):(r.PubSub=o,function(e){var r={},t=-1,n="*";function o(e){var r;for(r in e)if(Object.prototype.hasOwnProperty.call(e,r))return!0;return!1}function a(e){return function(){throw e}}function i(e,r,t){try{e(r,t)}catch(e){setTimeout(a(e),0)}}function s(e,r,t){e(r,t)}function c(e,t,n,o){var a,c=r[t],u=o?s:i;if(Object.prototype.hasOwnProperty.call(r,t))for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&u(c[a],e,n)}function u(e,r,t){return function(){var o=String(e),a=o.lastIndexOf(".");for(c(e,e,r,t);-1!==a;)a=(o=o.substr(0,a)).lastIndexOf("."),c(e,o,r,t);c(e,n,r,t)}}function l(e){var t=String(e);return Boolean(Object.prototype.hasOwnProperty.call(r,t)&&o(r[t]))}function p(e){for(var r=String(e),t=l(r)||l(n),o=r.lastIndexOf(".");!t&&-1!==o;)o=(r=r.substr(0,o)).lastIndexOf("."),t=l(r);return t}function f(e,r,t,n){var o=u(e="symbol"==typeof e?e.toString():e,r,n);return!!p(e)&&(!0===t?o():setTimeout(o,0),!0)}e.publish=function(r,t){return f(r,t,!1,e.immediateExceptions)},e.publishSync=function(r,t){return f(r,t,!0,e.immediateExceptions)},e.subscribe=function(e,n){if("function"!=typeof n)return!1;e="symbol"==typeof e?e.toString():e,Object.prototype.hasOwnProperty.call(r,e)||(r[e]={});var o="uid_"+String(++t);return r[e][o]=n,o},e.subscribeAll=function(r){return e.subscribe(n,r)},e.subscribeOnce=function(r,t){var n=e.subscribe(r,(function(){e.unsubscribe(n),t.apply(this,arguments)}));return e},e.clearAllSubscriptions=function(){r={}},e.clearSubscriptions=function(e){var t;for(t in r)Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)&&delete r[t]},e.countSubscriptions=function(e){var t,n,o=0;for(t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)){for(n in r[t])o++;break}return o},e.getSubscriptions=function(e){var t,n=[];for(t in r)Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)&&n.push(t);return n},e.unsubscribe=function(t){var n,o,a,i=function(e){var t;for(t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e))return!0;return!1},s="string"==typeof t&&(Object.prototype.hasOwnProperty.call(r,t)||i(t)),c=!s&&"string"==typeof t,u="function"==typeof t,l=!1;if(!s){for(n in r)if(Object.prototype.hasOwnProperty.call(r,n)){if(o=r[n],c&&o[t]){delete o[t],l=t;break}if(u)for(a in o)Object.prototype.hasOwnProperty.call(o,a)&&o[a]===t&&(delete o[a],l=!0)}return l}e.clearSubscriptions(t)}}(o)),void 0!==e&&e.exports&&(t=e.exports=o),t.PubSub=o,e.exports=t=o}("object"==typeof window&&window||r)}(n,n.exports);var o={exports:{}};
/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */!function(e,r){!function(e){function r(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length>1){r[0]=r[0].slice(0,-1);for(var n=r.length-1,o=1;o<n;++o)r[o]=r[o].slice(1,-1);return r[n]=r[n].slice(1),r.join("")}return r[0]}function t(e){return"(?:"+e+")"}function n(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function a(e){return null!=e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function i(e,r){var t=e;if(r)for(var n in r)t[n]=r[n];return t}function s(e){var n="[A-Za-z]",o="[0-9]",a=r(o,"[A-Fa-f]"),i=t(t("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+t("%[89A-Fa-f]"+a+"%"+a+a)+"|"+t("%"+a+a)),s="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",c=r("[\\:\\/\\?\\#\\[\\]\\@]",s),u=e?"[\\uE000-\\uF8FF]":"[]",l=r(n,o,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");t(n+r(n,o,"[\\+\\-\\.]")+"*"),t(t(i+"|"+r(l,s,"[\\:]"))+"*");var p=t(t("25[0-5]")+"|"+t("2[0-4]"+o)+"|"+t("1"+o+o)+"|"+t("0?[1-9]"+o)+"|0?0?"+o),f=t(p+"\\."+p+"\\."+p+"\\."+p),d=t(a+"{1,4}"),h=t(t(d+"\\:"+d)+"|"+f),v=t(t(d+"\\:")+"{6}"+h),y=t("\\:\\:"+t(d+"\\:")+"{5}"+h),m=t(t(d)+"?\\:\\:"+t(d+"\\:")+"{4}"+h),g=t(t(t(d+"\\:")+"{0,1}"+d)+"?\\:\\:"+t(d+"\\:")+"{3}"+h),b=t(t(t(d+"\\:")+"{0,2}"+d)+"?\\:\\:"+t(d+"\\:")+"{2}"+h),w=t(t(t(d+"\\:")+"{0,3}"+d)+"?\\:\\:"+d+"\\:"+h),E=t(t(t(d+"\\:")+"{0,4}"+d)+"?\\:\\:"+h),S=t(t(t(d+"\\:")+"{0,5}"+d)+"?\\:\\:"+d),O=t(t(t(d+"\\:")+"{0,6}"+d)+"?\\:\\:"),C=t([v,y,m,g,b,w,E,S,O].join("|")),A=t(t(l+"|"+i)+"+");t("[vV]"+a+"+\\."+r(l,s,"[\\:]")+"+"),t(t(i+"|"+r(l,s))+"*");var I=t(i+"|"+r(l,s,"[\\:\\@]"));return t(t(i+"|"+r(l,s,"[\\@]"))+"+"),t(t(I+"|"+r("[\\/\\?]",u))+"*"),{NOT_SCHEME:new RegExp(r("[^]",n,o,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(r("[^\\%\\:]",l,s),"g"),NOT_HOST:new RegExp(r("[^\\%\\[\\]\\:]",l,s),"g"),NOT_PATH:new RegExp(r("[^\\%\\/\\:\\@]",l,s),"g"),NOT_PATH_NOSCHEME:new RegExp(r("[^\\%\\/\\@]",l,s),"g"),NOT_QUERY:new RegExp(r("[^\\%]",l,s,"[\\:\\@\\/\\?]",u),"g"),NOT_FRAGMENT:new RegExp(r("[^\\%]",l,s,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(r("[^]",l,s),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(r("[^\\%]",l,c),"g"),PCT_ENCODED:new RegExp(i,"g"),IPV4ADDRESS:new RegExp("^("+f+")$"),IPV6ADDRESS:new RegExp("^\\[?("+C+")"+t(t("\\%25|\\%(?!"+a+"{2})")+"("+A+")")+"?\\]?$")}}var c=s(!1),u=s(!0),l=function(){function e(e,r){var t=[],n=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(n=(i=s.next()).done)&&(t.push(i.value),!r||t.length!==r);n=!0);}catch(e){o=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(o)throw a}}return t}return function(r,t){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return e(r,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),p=function(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);r<e.length;r++)t[r]=e[r];return t}return Array.from(e)},f=2147483647,d=36,h=1,v=26,y=38,m=700,g=72,b=128,w="-",E=/^xn--/,S=/[^\0-\x7E]/,O=/[\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"},A=d-h,I=Math.floor,T=String.fromCharCode;function j(e){throw new RangeError(C[e])}function x(e,r){for(var t=[],n=e.length;n--;)t[n]=r(e[n]);return t}function $(e,r){var t=e.split("@"),n="";return t.length>1&&(n=t[0]+"@",e=t[1]),n+x((e=e.replace(O,".")).split("."),r).join(".")}function D(e){for(var r=[],t=0,n=e.length;t<n;){var o=e.charCodeAt(t++);if(o>=55296&&o<=56319&&t<n){var a=e.charCodeAt(t++);56320==(64512&a)?r.push(((1023&o)<<10)+(1023&a)+65536):(r.push(o),t--)}else r.push(o)}return r}var P=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:d},N=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},R=function(e,r,t){var n=0;for(e=t?I(e/m):e>>1,e+=I(e/r);e>A*v>>1;n+=d)e=I(e/A);return I(n+(A+1)*e/(e+y))},F=function(e){var r=[],t=e.length,n=0,o=b,a=g,i=e.lastIndexOf(w);i<0&&(i=0);for(var s=0;s<i;++s)e.charCodeAt(s)>=128&&j("not-basic"),r.push(e.charCodeAt(s));for(var c=i>0?i+1:0;c<t;){for(var u=n,l=1,p=d;;p+=d){c>=t&&j("invalid-input");var y=P(e.charCodeAt(c++));(y>=d||y>I((f-n)/l))&&j("overflow"),n+=y*l;var m=p<=a?h:p>=a+v?v:p-a;if(y<m)break;var E=d-m;l>I(f/E)&&j("overflow"),l*=E}var S=r.length+1;a=R(n-u,S,0==u),I(n/S)>f-o&&j("overflow"),o+=I(n/S),n%=S,r.splice(n++,0,o)}return String.fromCodePoint.apply(String,r)},_=function(e){var r=[],t=(e=D(e)).length,n=b,o=0,a=g,i=!0,s=!1,c=void 0;try{for(var u,l=e[Symbol.iterator]();!(i=(u=l.next()).done);i=!0){var p=u.value;p<128&&r.push(T(p))}}catch(e){s=!0,c=e}finally{try{!i&&l.return&&l.return()}finally{if(s)throw c}}var y=r.length,m=y;for(y&&r.push(w);m<t;){var E=f,S=!0,O=!1,C=void 0;try{for(var A,x=e[Symbol.iterator]();!(S=(A=x.next()).done);S=!0){var $=A.value;$>=n&&$<E&&(E=$)}}catch(e){O=!0,C=e}finally{try{!S&&x.return&&x.return()}finally{if(O)throw C}}var P=m+1;E-n>I((f-o)/P)&&j("overflow"),o+=(E-n)*P,n=E;var F=!0,_=!1,U=void 0;try{for(var k,q=e[Symbol.iterator]();!(F=(k=q.next()).done);F=!0){var z=k.value;if(z<n&&++o>f&&j("overflow"),z==n){for(var L=o,H=d;;H+=d){var V=H<=a?h:H>=a+v?v:H-a;if(L<V)break;var M=L-V,K=d-V;r.push(T(N(V+M%K,0))),L=I(M/K)}r.push(T(N(L,0))),a=R(o,P,m==y),o=0,++m}}}catch(e){_=!0,U=e}finally{try{!F&&q.return&&q.return()}finally{if(_)throw U}}++o,++n}return r.join("")},U=function(e){return $(e,(function(e){return E.test(e)?F(e.slice(4).toLowerCase()):e}))},k=function(e){return $(e,(function(e){return S.test(e)?"xn--"+_(e):e}))},q={version:"2.1.0",ucs2:{decode:D,encode:function(e){return String.fromCodePoint.apply(String,p(e))}},decode:F,encode:_,toASCII:k,toUnicode:U},z={};function L(e){var r=e.charCodeAt(0);return r<16?"%0"+r.toString(16).toUpperCase():r<128?"%"+r.toString(16).toUpperCase():r<2048?"%"+(r>>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function H(e){for(var r="",t=0,n=e.length;t<n;){var o=parseInt(e.substr(t+1,2),16);if(o<128)r+=String.fromCharCode(o),t+=3;else if(o>=194&&o<224){if(n-t>=6){var a=parseInt(e.substr(t+4,2),16);r+=String.fromCharCode((31&o)<<6|63&a)}else r+=e.substr(t,6);t+=6}else if(o>=224){if(n-t>=9){var i=parseInt(e.substr(t+4,2),16),s=parseInt(e.substr(t+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&s)}else r+=e.substr(t,9);t+=9}else r+=e.substr(t,3),t+=3}return r}function V(e,r){function t(e){var t=H(e);return t.match(r.UNRESERVED)?t:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,t).replace(r.NOT_USERINFO,L).replace(r.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_HOST,L).replace(r.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(r.PCT_ENCODED,t).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,L).replace(r.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(r.PCT_ENCODED,t).replace(r.NOT_QUERY,L).replace(r.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,t).replace(r.NOT_FRAGMENT,L).replace(r.PCT_ENCODED,o)),e}function M(e){return e.replace(/^0*(.*)/,"$1")||"0"}function K(e,r){var t=e.match(r.IPV4ADDRESS)||[],n=l(t,2)[1];return n?n.split(".").map(M).join("."):e}function Z(e,r){var t=e.match(r.IPV6ADDRESS)||[],n=l(t,3),o=n[1],a=n[2];if(o){for(var i=o.toLowerCase().split("::").reverse(),s=l(i,2),c=s[0],u=s[1],p=u?u.split(":").map(M):[],f=c.split(":").map(M),d=r.IPV4ADDRESS.test(f[f.length-1]),h=d?7:8,v=f.length-h,y=Array(h),m=0;m<h;++m)y[m]=p[m]||f[v+m]||"";d&&(y[h-1]=K(y[h-1],r));var g=y.reduce((function(e,r,t){if(!r||"0"===r){var n=e[e.length-1];n&&n.index+n.length===t?n.length++:e.push({index:t,length:1})}return e}),[]).sort((function(e,r){return r.length-e.length}))[0],b=void 0;if(g&&g.length>1){var w=y.slice(0,g.index),E=y.slice(g.index+g.length);b=w.join(":")+"::"+E.join(":")}else b=y.join(":");return a&&(b+="%"+a),b}return e}var J=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,B=void 0==="".match(/(){0}/)[1];function W(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t={},n=!1!==r.iri?u:c;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(J);if(o){B?(t.scheme=o[1],t.userinfo=o[3],t.host=o[4],t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=o[7],t.fragment=o[8],isNaN(t.port)&&(t.port=o[5])):(t.scheme=o[1]||void 0,t.userinfo=-1!==e.indexOf("@")?o[3]:void 0,t.host=-1!==e.indexOf("//")?o[4]:void 0,t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=-1!==e.indexOf("?")?o[7]:void 0,t.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(t.port)&&(t.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),t.host&&(t.host=Z(K(t.host,n),n)),void 0!==t.scheme||void 0!==t.userinfo||void 0!==t.host||void 0!==t.port||t.path||void 0!==t.query?void 0===t.scheme?t.reference="relative":void 0===t.fragment?t.reference="absolute":t.reference="uri":t.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==t.reference&&(t.error=t.error||"URI is not a "+r.reference+" reference.");var a=z[(r.scheme||t.scheme||"").toLowerCase()];if(r.unicodeSupport||a&&a.unicodeSupport)V(t,n);else{if(t.host&&(r.domainHost||a&&a.domainHost))try{t.host=q.toASCII(t.host.replace(n.PCT_ENCODED,H).toLowerCase())}catch(e){t.error=t.error||"Host's domain name can not be converted to ASCII via punycode: "+e}V(t,c)}a&&a.parse&&a.parse(t,r)}else t.error=t.error||"URI can not be parsed.";return t}function G(e,r){var t=!1!==r.iri?u:c,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(Z(K(String(e.host),t),t).replace(t.IPV6ADDRESS,(function(e,r,t){return"["+r+(t?"%25"+t:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}var Q=/^\.\.?\//,Y=/^\/\.(\/|$)/,X=/^\/\.\.(\/|$)/,ee=/^\/?(?:.|\n)*?(?=\/|$)/;function re(e){for(var r=[];e.length;)if(e.match(Q))e=e.replace(Q,"");else if(e.match(Y))e=e.replace(Y,"/");else if(e.match(X))e=e.replace(X,"/"),r.pop();else if("."===e||".."===e)e="";else{var t=e.match(ee);if(!t)throw new Error("Unexpected dot segment condition");var n=t[0];e=e.slice(n.length),r.push(n)}return r.join("")}function te(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.iri?u:c,n=[],o=z[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(t.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?q.toUnicode(e.host):q.toASCII(e.host.replace(t.PCT_ENCODED,H).toLowerCase())}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+t}V(e,t),"suffix"!==r.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var a=G(e,r);if(void 0!==a&&("suffix"!==r.reference&&n.push("//"),n.push(a),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var i=e.path;r.absolutePath||o&&o.absolutePath||(i=re(i)),void 0===a&&(i=i.replace(/^\/\//,"/%2F")),n.push(i)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function ne(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=W(te(e,t),t),r=W(te(r,t),t)),!(t=t||{}).tolerant&&r.scheme?(n.scheme=r.scheme,n.userinfo=r.userinfo,n.host=r.host,n.port=r.port,n.path=re(r.path||""),n.query=r.query):(void 0!==r.userinfo||void 0!==r.host||void 0!==r.port?(n.userinfo=r.userinfo,n.host=r.host,n.port=r.port,n.path=re(r.path||""),n.query=r.query):(r.path?("/"===r.path.charAt(0)?n.path=re(r.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:n.path=r.path:n.path="/"+r.path,n.path=re(n.path)),n.query=r.query):(n.path=e.path,void 0!==r.query?n.query=r.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=r.fragment,n}function oe(e,r,t){var n=i({scheme:"null"},t);return te(ne(W(e,n),W(r,n),n,!0),n)}function ae(e,r){return"string"==typeof e?e=te(W(e,r),r):"object"===n(e)&&(e=W(te(e,r),r)),e}function ie(e,r,t){return"string"==typeof e?e=te(W(e,t),t):"object"===n(e)&&(e=te(e,t)),"string"==typeof r?r=te(W(r,t),t):"object"===n(r)&&(r=te(r,t)),e===r}function se(e,r){return e&&e.toString().replace(r&&r.iri?u.ESCAPE:c.ESCAPE,L)}function ce(e,r){return e&&e.toString().replace(r&&r.iri?u.PCT_ENCODED:c.PCT_ENCODED,H)}var ue={scheme:"http",domainHost:!0,parse:function(e,r){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,r){var t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},le={scheme:"https",domainHost:ue.domainHost,parse:ue.parse,serialize:ue.serialize};function pe(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var fe={scheme:"ws",domainHost:!0,parse:function(e,r){var t=e;return t.secure=pe(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t},serialize:function(e,r){if(e.port!==(pe(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var t=e.resourceName.split("?"),n=l(t,2),o=n[0],a=n[1];e.path=o&&"/"!==o?o:void 0,e.query=a,e.resourceName=void 0}return e.fragment=void 0,e}},de={scheme:"wss",domainHost:fe.domainHost,parse:fe.parse,serialize:fe.serialize},he={},ve="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ye="[0-9A-Fa-f]",me=t(t("%[EFef]"+ye+"%"+ye+ye+"%"+ye+ye)+"|"+t("%[89A-Fa-f]"+ye+"%"+ye+ye)+"|"+t("%"+ye+ye)),ge="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",be=r("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),we="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Ee=new RegExp(ve,"g"),Se=new RegExp(me,"g"),Oe=new RegExp(r("[^]",ge,"[\\.]",'[\\"]',be),"g"),Ce=new RegExp(r("[^]",ve,we),"g"),Ae=Ce;function Ie(e){var r=H(e);return r.match(Ee)?r:e}var Te={scheme:"mailto",parse:function(e,r){var t=e,n=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var o=!1,a={},i=t.query.split("&"),s=0,c=i.length;s<c;++s){var u=i[s].split("=");switch(u[0]){case"to":for(var l=u[1].split(","),p=0,f=l.length;p<f;++p)n.push(l[p]);break;case"subject":t.subject=ce(u[1],r);break;case"body":t.body=ce(u[1],r);break;default:o=!0,a[ce(u[0],r)]=ce(u[1],r)}}o&&(t.headers=a)}t.query=void 0;for(var d=0,h=n.length;d<h;++d){var v=n[d].split("@");if(v[0]=ce(v[0]),r.unicodeSupport)v[1]=ce(v[1],r).toLowerCase();else try{v[1]=q.toASCII(ce(v[1],r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[d]=v.join("@")}return t},serialize:function(e,r){var t=e,n=a(e.to);if(n){for(var i=0,s=n.length;i<s;++i){var c=String(n[i]),u=c.lastIndexOf("@"),l=c.slice(0,u).replace(Se,Ie).replace(Se,o).replace(Oe,L),p=c.slice(u+1);try{p=r.iri?q.toUnicode(p):q.toASCII(ce(p,r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+e}n[i]=l+"@"+p}t.path=n.join(",")}var f=e.headers=e.headers||{};e.subject&&(f.subject=e.subject),e.body&&(f.body=e.body);var d=[];for(var h in f)f[h]!==he[h]&&d.push(h.replace(Se,Ie).replace(Se,o).replace(Ce,L)+"="+f[h].replace(Se,Ie).replace(Se,o).replace(Ae,L));return d.length&&(t.query=d.join("&")),t}},je=/^([^\:]+)\:(.*)/,xe={scheme:"urn",parse:function(e,r){var t=e.path&&e.path.match(je),n=e;if(t){var o=r.scheme||n.scheme||"urn",a=t[1].toLowerCase(),i=t[2],s=o+":"+(r.nid||a),c=z[s];n.nid=a,n.nss=i,n.path=void 0,c&&(n=c.parse(n,r))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,r){var t=r.scheme||e.scheme||"urn",n=e.nid,o=t+":"+(r.nid||n),a=z[o];a&&(e=a.serialize(e,r));var i=e,s=e.nss;return i.path=(n||r.nid)+":"+s,i}},$e=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,De={scheme:"urn:uuid",parse:function(e,r){var t=e;return t.uuid=t.nss,t.nss=void 0,r.tolerant||t.uuid&&t.uuid.match($e)||(t.error=t.error||"UUID is not valid."),t},serialize:function(e,r){var t=e;return t.nss=(e.uuid||"").toLowerCase(),t}};z[ue.scheme]=ue,z[le.scheme]=le,z[fe.scheme]=fe,z[de.scheme]=de,z[Te.scheme]=Te,z[xe.scheme]=xe,z[De.scheme]=De,e.SCHEMES=z,e.pctEncChar=L,e.pctDecChars=H,e.parse=W,e.removeDotSegments=re,e.serialize=te,e.resolveComponents=ne,e.resolve=oe,e.normalize=ae,e.equal=ie,e.escapeComponent=se,e.unescapeComponent=ce,Object.defineProperty(e,"__esModule",{value:!0})}(r)}(0,o.exports);const a=o.exports,i={null:e=>null===e,boolean:e=>"boolean"==typeof e,object:e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,array:e=>Array.isArray(e),number:e=>"number"==typeof e,integer:e=>Number.isInteger(e),string:e=>"string"==typeof e};var s={jsonTypeOf:(e,r)=>i[r](e),resolveUrl:(e,r)=>{const t=a.resolve(e,r,{iri:!0});if(a.resolve(e,"",{iri:!0})&&"file"===a.parse(t).scheme&&"file"!==a.parse(e).scheme)throw Error(`Can't access file '${t}' resource from network context '${e}'`);return t},urlFragment:e=>a.unescapeComponent(a.parse(e).fragment)||"",pathRelative:(e,r)=>{if(e===r)return"";let t=1;const n=e.length-1,o=r.length-t,a=n<o?n:o;let i=-1,s=0;for(;s<a;s++){const n=e.charCodeAt(s+1);if(n!==r.charCodeAt(t+s))break;47===n&&(i=s)}if(o>a){if(47===r.charCodeAt(t+s))return r.slice(t+s+1);if(0===s)return r.slice(t+s)}n>a&&(47===e.charCodeAt(s+1)?i=s:0===a&&(i=0));let c="";for(s=i+2;s<=e.length;++s)s!==e.length&&47!==e.charCodeAt(s)||(c+=0===c.length?"..":"/..");return t+=i,c.length>0?`${c}${r.slice(t,r.length)}`:(47===r.charCodeAt(t)&&++t,r.slice(t,r.length))}};const c=t,u=e=>{if(e.length>0&&"/"!==e[0])throw Error("Invalid JSON Pointer");return e.split("/").slice(1).map(y)},l=(e,r,t,n)=>{if(0===e.length)return t;if(e.length>1){const o=e.shift();return{...r,[o]:l(e,g(r,o,n),t,h(o,n))}}if(Array.isArray(r)){const n=[...r];return n[m(r,e[0])]=t,n}return"object"==typeof r&&null!==r?{...r,[e[0]]:t}:g(r,e[0],n)},p=(e,r,t,n)=>{if(0!==e.length)if(1!==e.length||b(r)){const o=e.shift();p(e,g(r,o,n),t,h(o,n))}else{r[m(r,e[0])]=t}},f=(e,r,t)=>{if(0!=e.length){if(e.length>1){const n=e.shift(),o=g(r,n,t);return{...r,[n]:f(e,o,h(n,t))}}if(Array.isArray(r))return r.filter(((r,t)=>t!=e[0]));if("object"==typeof r&&null!==r){const{[e[0]]:t,...n}=r;return n}return g(r,e[0],t)}},d=(e,r,t)=>{if(0!==e.length)if(e.length>1){const n=e.shift(),o=g(r,n,t);d(e,o,h(n,t))}else Array.isArray(r)?r.splice(e[0],1):"object"==typeof r&&null!==r?delete r[e[0]]:g(r,e[0],t)},h=c(((e,r)=>r+"/"+v(e))),v=e=>e.toString().replace(/~/g,"~0").replace(/\//g,"~1"),y=e=>e.toString().replace(/~1/g,"/").replace(/~0/g,"~"),m=(e,r)=>Array.isArray(e)&&"-"===r?e.length:r,g=(e,r,t="")=>{if(void 0===e)throw TypeError(`Value at '${t}' is undefined and does not have property '${r}'`);if(null===e)throw TypeError(`Value at '${t}' is null and does not have property '${r}'`);if(b(e))throw TypeError(`Value at '${t}' is a ${typeof e} and does not have property '${r}'`);return e[m(e,r)]},b=e=>null===e||"object"!=typeof e;var w={nil:"",append:h,get:(e,r)=>{const t=u(e),n=e=>t.reduce((([e,r],t)=>[g(e,t,r),h(t,r)]),[e,""])[0];return void 0===r?n:n(r)},set:(e,r,t)=>{const n=u(e),o=c(((e,r)=>l(n,e,r,"")));return void 0===r?o:o(r,t)},assign:(e,r,t)=>{const n=u(e),o=c(((e,r)=>p(n,e,r,"")));return void 0===r?o:o(r,t)},unset:(e,r)=>{const t=u(e),n=e=>f(t,e,"");return void 0===r?n:n(r)},remove:(e,r)=>{const t=u(e),n=e=>d(t,e,"");return void 0===r?n:n(r)}};const E=Symbol("$__value"),S=Symbol("$__href");var O={cons:(e,r)=>Object.freeze({[S]:e,[E]:r}),isReference:e=>e&&void 0!==e[S],href:e=>e[S],value:e=>e[E]};const C=w,A=t,{resolveUrl:I,jsonTypeOf:T}=s,j=O,x=Object.freeze({id:"",pointer:"",instance:void 0,value:void 0}),$=e=>j.isReference(e.value)?j.value(e.value):e.value,D=A(((e,r)=>T($(e),r))),P=(e,r)=>Object.freeze({...r,pointer:C.append(e,r.pointer),value:$(r)[e]}),N=A(((e,r)=>$(r).map(((t,n,o,a)=>e(P(n,r),n,o,a))))),R=A(((e,r)=>$(r).forEach(((t,n,o,a)=>e(P(n,r),n,o,a))))),F=A(((e,r)=>$(r).map(((e,t,n,o)=>P(t,r))).filter(((r,t,n,o)=>e(r,t,n,o))))),_=A(((e,r,t)=>$(t).reduce(((r,n,o)=>e(r,P(o,t),o)),r))),U=A(((e,r)=>$(r).every(((t,n,o,a)=>e(P(n,r),n,o,a))))),k=A(((e,r)=>$(r).some(((t,n,o,a)=>e(P(n,r),n,o,a)))));var q={nil:x,cons:(e,r="")=>Object.freeze({...x,id:I(r,""),instance:e,value:e}),get:(e,r=x)=>{if(!e.startsWith("#"))throw Error(`No JSON document found at '${e.split("#")[0]}'`);return Object.freeze({...r,pointer:e.substr(1)})},uri:e=>`${e.id}#${encodeURI(e.pointer)}`,value:$,has:(e,r)=>e in $(r),typeOf:D,length:e=>$(e).length,step:P,entries:e=>Object.keys($(e)).map((r=>[r,P(r,e)])),keys:e=>Object.keys($(e)),map:N,forEach:R,filter:F,reduce:_,every:U,some:k},z=async e=>Object.entries(await e);var L=t((async(e,r)=>(await r).map(e)));var H=t((async(e,r,t)=>(await t).reduce((async(r,t)=>e(await r,t)),r)));const V=H;var M=t((async(e,r,t={})=>V((async(r,t)=>await e(t)?r.concat([t]):r),[],r,t)));const K=L;var Z=t((async(e,r)=>{const t=await K(e,r);return(await Promise.all(t)).some((e=>e))}));const J=L;var B=t((async(e,r)=>{const t=await J(e,r);return(await Promise.all(t)).every((e=>e))}));var W=t(((e,r)=>e.reduce((async(e,r)=>r(await e)),r)));const G=W,Q=z,Y=H;var X={entries:z,map:L,filter:M,reduce:H,some:Z,every:B,pipeline:W,all:e=>Promise.all(e),allValues:e=>G([Q,Y((async(e,[r,t])=>(e[r]=await t,e)),{})],e)},ee=fetch,re={},te=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,ne=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,oe=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,ae=/\\([\u000b\u0020-\u00ff])/g,ie=/([\\"])/g,se=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;function ce(e){var r=String(e);if(oe.test(r))return r;if(r.length>0&&!ne.test(r))throw new TypeError("invalid parameter value");return'"'+r.replace(ie,"\\$1")+'"'}function ue(e){this.parameters=Object.create(null),this.type=e}re.format=function(e){if(!e||"object"!=typeof e)throw new TypeError("argument obj is required");var r=e.parameters,t=e.type;if(!t||!se.test(t))throw new TypeError("invalid type");var n=t;if(r&&"object"==typeof r)for(var o,a=Object.keys(r).sort(),i=0;i<a.length;i++){if(o=a[i],!oe.test(o))throw new TypeError("invalid parameter name");n+="; "+o+"="+ce(r[o])}return n},re.parse=function(e){if(!e)throw new TypeError("argument string is required");var r="object"==typeof e?function(e){var r;"function"==typeof e.getHeader?r=e.getHeader("content-type"):"object"==typeof e.headers&&(r=e.headers&&e.headers["content-type"]);if("string"!=typeof r)throw new TypeError("content-type header is missing from object");return r}(e):e;if("string"!=typeof r)throw new TypeError("argument string is required to be a string");var t=r.indexOf(";"),n=-1!==t?r.substr(0,t).trim():r.trim();if(!se.test(n))throw new TypeError("invalid media type");var o=new ue(n.toLowerCase());if(-1!==t){var a,i,s;for(te.lastIndex=t;i=te.exec(r);){if(i.index!==t)throw new TypeError("invalid parameter format");t+=i[0].length,a=i[1].toLowerCase(),'"'===(s=i[2])[0]&&(s=s.substr(1,s.length-2).replace(ae,"$1")),o.parameters[a]=s}if(t!==r.length)throw new TypeError("invalid parameter format")}return o};const le=re,pe={};var fe={addPlugin:(e,r)=>{pe[e]=r},parse:e=>{const r=le.parse(e.headers.get("content-type"));if(!(r.type in pe))throw Error(`${e.url} is not a schema. Found a document with media type: ${r.type}`);return pe[r.type].parse(e,r.parameters)},getContentType:e=>{for(const r in pe)if(pe[r].matcher(e))return r;return"application/octet-stream"}};const de=t,he=X,ve=w,{jsonTypeOf:ye,resolveUrl:me,urlFragment:ge,pathRelative:be}=s,we=ee,Ee=O,Se=fe,Oe="https://json-schema.org/draft/2019-09/vocab/core",Ce="https://json-schema.org/draft/2020-12/vocab/core",Ae={},Ie={},Te=(e,r)=>{const t=Ie[e];return Ae[t]?.[r]},je={},xe={},$e=(e,r="",t="")=>{e=JSON.parse(JSON.stringify(e));const n=me(r,""),o=me(e.$schema||t,"");if(!o)throw Error("Couldn't determine schema dialect");if(delete e.$schema,!(o in Ie))if(!0===e?.$vocabulary?.[Oe]&&o===De(e,n,Oe)[0])Ie[o]=Oe;else if(!0===e?.$vocabulary?.[Ce]&&o===De(e,n,Ce)[0])Ie[o]=Ce;else{const e=je[o];if(!e)throw Error(`Couldn't determine JSON Schema version for dialect: '${o}'`);!0===e.vocabulary[Oe]?Ie[o]=Oe:!0===e.vocabulary[Ce]?Ie[o]=Ce:Ie[o]=Ie[e.dialectId]}const[a,i]=De(e,n,Ie[o]);if(!a)throw Error("Couldn't determine an identifier for the schema");const s=Te(o,"baseToken");delete e[s],n&&(xe[n]=a);const c=Te(o,"anchorToken");i&&s===c&&(e[c]=c!==s?encodeURI(i):`#${encodeURI(i)}`);const u={},l=Te(o,"recursiveAnchorToken");let p;!0===e[l]&&(u[""]=`${a}#`,e[c]="",delete e[l]);const f=Te(o,"vocabularyToken");ye(e[f],"object")?(p=e[f],delete e[f]):p={[Ie[o]]:!0};const d={"":""};return je[a]={id:a,dialectId:o,schema:Pe(e,a,o,ve.nil,d,u),anchors:d,dynamicAnchors:u,vocabulary:p,validated:!1},a},De=(e,r,t)=>{const n=Ae[t]?.baseToken,o=me(r,e[n]||"");return[me(o,""),ge(o)]},Pe=(e,r,t,n,o,a)=>{if(ye(e,"object")){const i="string"==typeof e.$schema?me(e.$schema,""):t,s=Te(i,"embeddedToken"),c=Te(i,"anchorToken");if("string"==typeof e[s]&&(s!==c||"#"!==e[s][0])){const n=me(r,e[s]);return e[Te(i,"baseToken")]=n,$e(e,n,t),Ee.cons(e[s],e)}const u=Te(t,"anchorToken"),l=Te(t,"dynamicAnchorToken");"string"==typeof e[l]&&(a[e[l]]=`${r}#${encodeURI(n)}`,o[e[l]]=n,delete e[l]);const p=Te(t,"embeddedToken");if("string"==typeof e[u]){const r=u!==p?e[u]:e[u].slice(1);o[r]=n,delete e[u]}const f=Te(t,"jrefToken");if("string"==typeof e[f])return Ee.cons(e[f],e);for(const i in e)e[i]=Pe(e[i],r,t,ve.append(i,n),o,a);return e}return Array.isArray(e)?e.map(((e,i)=>Pe(e,r,t,ve.append(i,n),o,a))):e},Ne=e=>je[xe[e]]||je[e],Re=Object.freeze({id:"",dialectId:void 0,vocabulary:{},pointer:ve.nil,schema:void 0,value:void 0,anchors:{},dynamicAnchors:{},validated:!0}),Fe=async(e,r=Re)=>{const t=me(ke(r),e),n=me(t,""),o=ge(t);if(!(e=>e in je||e in xe)(n)){const e=await we(n,{headers:{Accept:"application/schema+json"}});if(e.status>=400)throw await e.text(),Error(`Failed to retrieve schema with id: ${n}`);const[r,t]=await Se.parse(e);let o;o=r.$schema?me(r.$schema,""):t?me(n,t):"",o&&n!==o&&!(o in Ie)&&await Fe(o),$e(r,n,o)}const a=Ne(n),i="/"!==o[0]?Ue(a,o):o,s=Object.freeze({...a,pointer:i,value:ve.get(i,a.schema)});return _e(s)},_e=e=>Ee.isReference(e.value)?Fe(Ee.href(e.value),e):e,Ue=(e,r)=>{if(!(r in e.anchors))throw Error(`No such anchor '${encodeURI(e.id)}#${encodeURI(r)}'`);return e.anchors[r]},ke=e=>`${e.id}#${encodeURI(e.pointer)}`,qe=e=>Ee.isReference(e.value)?Ee.value(e.value):e.value,ze=(e,r)=>{const t=Ne(r.id),n=Object.freeze({...r,pointer:ve.append(e,r.pointer),value:qe(r)[e],validated:t.validated});return _e(n)},Le=de(((e,r)=>he.pipeline([qe,he.map((async(t,n)=>e(await ze(n,r),n))),he.all],r))),He={parentId:"",parentDialect:"",includeEmbedded:!0},Ve=(e,r)=>{if(r.startsWith("file://")){const t=e.slice(7,e.lastIndexOf("/"));return""===e?"":be(t,r.slice(7))}return r};var Me={setConfig:(e,r,t)=>{Ie[e]=e,Ae[e]||(Ae[e]={}),Ae[e][r]=t},getConfig:Te,add:$e,get:Fe,markValidated:e=>{je[e].validated=!0},uri:ke,value:qe,getAnchorPointer:Ue,typeOf:(e,r)=>ye(qe(e),r),has:(e,r)=>e in qe(r),step:ze,keys:e=>Object.keys(qe(e)),entries:e=>he.pipeline([qe,Object.keys,he.map((async r=>[r,await ze(r,e)])),he.all],e),map:Le,length:e=>qe(e).length,toSchema:(e,r={})=>{const t={...He,...r},n=JSON.parse(JSON.stringify(e.schema,((r,n)=>{if(!Ee.isReference(n))return n;const o=Ee.value(n),a="string"==typeof o.$schema?me(o.$schema,""):e.dialectId,i=Te(a,"embeddedToken");return!t.includeEmbedded&&i in o?void 0:Ee.value(n)}))),o=Te(e.dialectId,"dynamicAnchorToken");Object.entries(e.dynamicAnchors).forEach((([e,r])=>{const t=ve.append(o,ge(r));ve.assign(t,n,e)}));const a=Te(e.dialectId,"anchorToken");Object.entries(e.anchors).filter((([r])=>""!==r&&!(r in e.dynamicAnchors))).forEach((([e,r])=>{const t=ve.append(a,r);ve.assign(t,n,e)}));const i=Te(e.dialectId,"baseToken"),s=Ve(t.parentId,e.id),c=t.parentDialect===e.dialectId?"":e.dialectId;return{...s&&{[i]:s},...c&&{$schema:c},...n}}};class Ke extends Error{constructor(e){super("Invalid Schema"),this.name=this.constructor.name,this.output=e}}var Ze=Ke;const Je=Me;var Be={compile:e=>Je.value(e),interpret:()=>!0};const We=t,Ge=n.exports,{resolveUrl:Qe}=s,Ye=q,Xe=Me,er=Ze,rr=fe,tr=Be,nr="FLAG",or="BASIC",ar="DETAILED",ir="VERBOSE";let sr=ar,cr=!0;rr.addPlugin("application/schema+json",{parse:async(e,r)=>[await e.json(),r.schema||r.profile],matcher:e=>e.endsWith(".schema.json")});const ur=async e=>{const r={metaData:{}};return{ast:r,schemaUri:await mr(e,r)}},lr=We((({ast:e,schemaUri:r},t,n=nr)=>{if(![nr,or,ar,ir].includes(n))throw Error(`The '${n}' error format is not supported`);const o=[],a=Ge.subscribe("result",pr(n,o));return br(r,t,e,{}),Ge.unsubscribe(a),o[0]})),pr=(e,r)=>{const t=[];return(n,o)=>{if("result"===n){const{keyword:e,absoluteKeywordLocation:r,instanceLocation:n,valid:a}=o,i={keyword:e,absoluteKeywordLocation:r,instanceLocation:n,valid:a,errors:[]};t.push(i)}else if("result.start"===n)t.push(n);else if("result.end"===n){const n=t.pop();for(;"result.start"!==t[t.length-1];){const r=t.pop(),o=[r];e===or&&(o.push(...r.errors),delete r.errors),(e===ir||e!==nr&&!r.valid)&&n.errors.unshift(...o)}t[t.length-1]=n,r[0]=n}}},fr={},dr=e=>fr[e]||tr,hr=e=>e in fr,vr={},yr={},mr=async(e,r)=>{if(e=await gr(e),!hr(`${e.dialectId}#validate`)){const r=await Xe.get(e.dialectId);(Xe.getConfig(r.id,"mandatoryVocabularies")||[]).forEach((e=>{if(!r.vocabulary[e])throw Error(`Vocabulary '${e}' must be explicitly declared and required`)})),Object.entries(r.vocabulary).forEach((([e,t])=>{if(e in vr)Object.entries(vr[e]).forEach((([e,t])=>{((e,r)=>{fr[e]={collectEvaluatedItems:(e,t,n,o,a)=>r.interpret(e,t,n,o,a)&&new Set,collectEvaluatedProperties:(e,t,n,o,a)=>r.interpret(e,t,n,o,a)&&[],...r}})(`${r.id}#${e}`,t)}));else if(t)throw Error(`Missing required vocabulary: ${e}`)}))}if(cr&&!e.validated){if(Xe.markValidated(e.id),!(e.dialectId in yr)){const r=await Xe.get(e.dialectId),t=await ur(r);yr[r.id]=lr(t)}const r=Ye.cons(e.schema,e.id),t=yr[e.dialectId](r,sr);if(!t.valid)throw new er(t)}return e.id in r.metaData||(r.metaData[e.id]={id:e.id,dynamicAnchors:e.dynamicAnchors,anchors:e.anchors}),dr(`${e.dialectId}#validate`).compile(e,r)},gr=async e=>Xe.typeOf(e,"string")?gr(await Xe.get(Xe.value(e),e)):e,br=(e,r,t,n)=>{const o=wr(e,t),a=Qe(e,"");return dr(o).interpret(e,r,t,{...t.metaData[a].dynamicAnchors,...n})},wr=(e,r)=>{if(!(e in r))throw Error(`No schema found at ${e}`);return r[e][0]};var Er={validate:async(e,r,t)=>{const n=await ur(e),o=(e,r)=>lr(n,Ye.cons(e),r);return void 0===r?o:o(r,t)},compile:ur,interpret:lr,setMetaOutputFormat:e=>{sr=e},setShouldMetaValidate:e=>{cr=e},FLAG:nr,BASIC:or,DETAILED:ar,VERBOSE:ir,add:(e,r="",t="")=>{const n=Xe.add(e,r,t);delete yr[n]},getKeyword:dr,hasKeyword:hr,defineVocabulary:(e,r)=>{vr[e]=r},compileSchema:mr,interpretSchema:br,collectEvaluatedProperties:(e,r,t,n,o)=>{const a=wr(e,t);return dr(a).collectEvaluatedProperties(e,r,t,n,o)},collectEvaluatedItems:(e,r,t,n,o)=>{const a=wr(e,t);return dr(a).collectEvaluatedItems(e,r,t,n,o)},addMediaTypePlugin:rr.addPlugin};const Sr=X,Or=n.exports,Cr=Er,Ar=q,Ir=Me;var Tr={compile:async(e,r)=>{const t=Ir.uri(e);if(!(t in r)){r[t]=!1;const n=Ir.value(e);if(!["object","boolean"].includes(typeof n))throw Error(`No schema found at '${Ir.uri(e)}'`);r[t]=[`${e.dialectId}#validate`,Ir.uri(e),"boolean"==typeof n?n:await Sr.pipeline([Ir.entries,Sr.map((([r,t])=>[`${e.dialectId}#${r}`,t])),Sr.filter((([r])=>r!==`${e.dialectId}#validate`)),Sr.map((async([t,n])=>{const o=await Cr.getKeyword(t).compile(n,r,e);return[t,Ir.uri(n),o]})),Sr.all],e)]}return t},interpret:(e,r,t,n)=>{const[o,a,i]=t[e];Or.publishSync("result.start");const s="boolean"==typeof i?i:i.every((([e,o,a])=>{Or.publishSync("result.start");const i=Cr.getKeyword(e).interpret(a,r,t,n);return Or.publishSync("result",{keyword:e,absoluteKeywordLocation:o,instanceLocation:Ar.uri(r),valid:i,ast:a}),Or.publishSync("result.end"),i}));return Or.publishSync("result",{keyword:o,absoluteKeywordLocation:a,instanceLocation:Ar.uri(r),valid:s,ast:e}),Or.publishSync("result.end"),s},collectEvaluatedProperties:(e,r,t,n,o=!1)=>{const a=t[e][2];return"boolean"==typeof a?!!a&&[]:a.filter((([e])=>!o||!e.endsWith("#unevaluatedProperties"))).reduce(((e,[o,,a])=>{const i=e&&Cr.getKeyword(o).collectEvaluatedProperties(a,r,t,n);return!1!==i&&[...e,...i]}),[])},collectEvaluatedItems:(e,r,t,n,o=!1)=>{const a=t[e][2];return"boolean"==typeof a?!!a&&new Set:a.filter((([e])=>!o||!e.endsWith("#unevaluatedItems"))).reduce(((e,[o,,a])=>{const i=!1!==e&&Cr.getKeyword(o).collectEvaluatedItems(a,r,t,n);return!1!==i&&new Set([...e,...i])}),new Set)}};var jr={Core:Er,Schema:Me,Instance:q,Reference:O,Keywords:{metaData:Be,validate:Tr},InvalidSchemaError:Ze};e.default=jr,Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).JSC={})}(this,(function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},r=function(e,t){return function r(){null==t&&(t=e.length);var n=[].slice.call(arguments);return n.length>=t?e.apply(this,n):function(){return r.apply(this,n.concat([].slice.call(arguments)))}}};var n={exports:{}};!function(e,r){!function(t,n){var o={};t.PubSub?(o=t.PubSub,console.warn("PubSub already loaded, using existing version")):(t.PubSub=o,function(e){var t={},r=-1,n="*";function o(e){var t;for(t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!0;return!1}function a(e){return function(){throw e}}function i(e,t,r){try{e(t,r)}catch(e){setTimeout(a(e),0)}}function s(e,t,r){e(t,r)}function c(e,r,n,o){var a,c=t[r],u=o?s:i;if(Object.prototype.hasOwnProperty.call(t,r))for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&u(c[a],e,n)}function u(e,t,r){return function(){var o=String(e),a=o.lastIndexOf(".");for(c(e,e,t,r);-1!==a;)a=(o=o.substr(0,a)).lastIndexOf("."),c(e,o,t,r);c(e,n,t,r)}}function l(e){var r=String(e);return Boolean(Object.prototype.hasOwnProperty.call(t,r)&&o(t[r]))}function p(e){for(var t=String(e),r=l(t)||l(n),o=t.lastIndexOf(".");!r&&-1!==o;)o=(t=t.substr(0,o)).lastIndexOf("."),r=l(t);return r}function f(e,t,r,n){var o=u(e="symbol"==typeof e?e.toString():e,t,n);return!!p(e)&&(!0===r?o():setTimeout(o,0),!0)}e.publish=function(t,r){return f(t,r,!1,e.immediateExceptions)},e.publishSync=function(t,r){return f(t,r,!0,e.immediateExceptions)},e.subscribe=function(e,n){if("function"!=typeof n)return!1;e="symbol"==typeof e?e.toString():e,Object.prototype.hasOwnProperty.call(t,e)||(t[e]={});var o="uid_"+String(++r);return t[e][o]=n,o},e.subscribeAll=function(t){return e.subscribe(n,t)},e.subscribeOnce=function(t,r){var n=e.subscribe(t,(function(){e.unsubscribe(n),r.apply(this,arguments)}));return e},e.clearAllSubscriptions=function(){t={}},e.clearSubscriptions=function(e){var r;for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&0===r.indexOf(e)&&delete t[r]},e.countSubscriptions=function(e){var r,n,o=0;for(r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&0===r.indexOf(e)){for(n in t[r])o++;break}return o},e.getSubscriptions=function(e){var r,n=[];for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&0===r.indexOf(e)&&n.push(r);return n},e.unsubscribe=function(r){var n,o,a,i=function(e){var r;for(r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&0===r.indexOf(e))return!0;return!1},s="string"==typeof r&&(Object.prototype.hasOwnProperty.call(t,r)||i(r)),c=!s&&"string"==typeof r,u="function"==typeof r,l=!1;if(!s){for(n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(o=t[n],c&&o[r]){delete o[r],l=r;break}if(u)for(a in o)Object.prototype.hasOwnProperty.call(o,a)&&o[a]===r&&(delete o[a],l=!0)}return l}e.clearSubscriptions(r)}}(o)),void 0!==e&&e.exports&&(r=e.exports=o),r.PubSub=o,e.exports=r=o}("object"==typeof window&&window||t)}(n,n.exports);var o={exports:{}};
/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */!function(e,t){!function(e){function t(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(t.length>1){t[0]=t[0].slice(0,-1);for(var n=t.length-1,o=1;o<n;++o)t[o]=t[o].slice(1,-1);return t[n]=t[n].slice(1),t.join("")}return t[0]}function r(e){return"(?:"+e+")"}function n(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function a(e){return null!=e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function i(e,t){var r=e;if(t)for(var n in t)r[n]=t[n];return r}function s(e){var n="[A-Za-z]",o="[0-9]",a=t(o,"[A-Fa-f]"),i=r(r("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+r("%[89A-Fa-f]"+a+"%"+a+a)+"|"+r("%"+a+a)),s="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",c=t("[\\:\\/\\?\\#\\[\\]\\@]",s),u=e?"[\\uE000-\\uF8FF]":"[]",l=t(n,o,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");r(n+t(n,o,"[\\+\\-\\.]")+"*"),r(r(i+"|"+t(l,s,"[\\:]"))+"*");var p=r(r("25[0-5]")+"|"+r("2[0-4]"+o)+"|"+r("1"+o+o)+"|"+r("0?[1-9]"+o)+"|0?0?"+o),f=r(p+"\\."+p+"\\."+p+"\\."+p),h=r(a+"{1,4}"),d=r(r(h+"\\:"+h)+"|"+f),v=r(r(h+"\\:")+"{6}"+d),y=r("\\:\\:"+r(h+"\\:")+"{5}"+d),g=r(r(h)+"?\\:\\:"+r(h+"\\:")+"{4}"+d),m=r(r(r(h+"\\:")+"{0,1}"+h)+"?\\:\\:"+r(h+"\\:")+"{3}"+d),b=r(r(r(h+"\\:")+"{0,2}"+h)+"?\\:\\:"+r(h+"\\:")+"{2}"+d),w=r(r(r(h+"\\:")+"{0,3}"+h)+"?\\:\\:"+h+"\\:"+d),E=r(r(r(h+"\\:")+"{0,4}"+h)+"?\\:\\:"+d),x=r(r(r(h+"\\:")+"{0,5}"+h)+"?\\:\\:"+h),S=r(r(r(h+"\\:")+"{0,6}"+h)+"?\\:\\:"),O=r([v,y,g,m,b,w,E,x,S].join("|")),C=r(r(l+"|"+i)+"+");r("[vV]"+a+"+\\."+t(l,s,"[\\:]")+"+"),r(r(i+"|"+t(l,s))+"*");var A=r(i+"|"+t(l,s,"[\\:\\@]"));return r(r(i+"|"+t(l,s,"[\\@]"))+"+"),r(r(A+"|"+t("[\\/\\?]",u))+"*"),{NOT_SCHEME:new RegExp(t("[^]",n,o,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(t("[^\\%\\:]",l,s),"g"),NOT_HOST:new RegExp(t("[^\\%\\[\\]\\:]",l,s),"g"),NOT_PATH:new RegExp(t("[^\\%\\/\\:\\@]",l,s),"g"),NOT_PATH_NOSCHEME:new RegExp(t("[^\\%\\/\\@]",l,s),"g"),NOT_QUERY:new RegExp(t("[^\\%]",l,s,"[\\:\\@\\/\\?]",u),"g"),NOT_FRAGMENT:new RegExp(t("[^\\%]",l,s,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(t("[^]",l,s),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(t("[^\\%]",l,c),"g"),PCT_ENCODED:new RegExp(i,"g"),IPV4ADDRESS:new RegExp("^("+f+")$"),IPV6ADDRESS:new RegExp("^\\[?("+O+")"+r(r("\\%25|\\%(?!"+a+"{2})")+"("+C+")")+"?\\]?$")}}var c=s(!1),u=s(!0),l=function(){function e(e,t){var r=[],n=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(n=(i=s.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(o)throw a}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),p=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)},f=2147483647,h=36,d=1,v=26,y=38,g=700,m=72,b=128,w="-",E=/^xn--/,x=/[^\0-\x7E]/,S=/[\x2E\u3002\uFF0E\uFF61]/g,O={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},C=h-d,A=Math.floor,k=String.fromCharCode;function T(e){throw new RangeError(O[e])}function j(e,t){for(var r=[],n=e.length;n--;)r[n]=t(e[n]);return r}function I(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+j((e=e.replace(S,".")).split("."),t).join(".")}function $(e){for(var t=[],r=0,n=e.length;r<n;){var o=e.charCodeAt(r++);if(o>=55296&&o<=56319&&r<n){var a=e.charCodeAt(r++);56320==(64512&a)?t.push(((1023&o)<<10)+(1023&a)+65536):(t.push(o),r--)}else t.push(o)}return t}var P=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:h},R=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},N=function(e,t,r){var n=0;for(e=r?A(e/g):e>>1,e+=A(e/t);e>C*v>>1;n+=h)e=A(e/C);return A(n+(C+1)*e/(e+y))},D=function(e){var t=[],r=e.length,n=0,o=b,a=m,i=e.lastIndexOf(w);i<0&&(i=0);for(var s=0;s<i;++s)e.charCodeAt(s)>=128&&T("not-basic"),t.push(e.charCodeAt(s));for(var c=i>0?i+1:0;c<r;){for(var u=n,l=1,p=h;;p+=h){c>=r&&T("invalid-input");var y=P(e.charCodeAt(c++));(y>=h||y>A((f-n)/l))&&T("overflow"),n+=y*l;var g=p<=a?d:p>=a+v?v:p-a;if(y<g)break;var E=h-g;l>A(f/E)&&T("overflow"),l*=E}var x=t.length+1;a=N(n-u,x,0==u),A(n/x)>f-o&&T("overflow"),o+=A(n/x),n%=x,t.splice(n++,0,o)}return String.fromCodePoint.apply(String,t)},_=function(e){var t=[],r=(e=$(e)).length,n=b,o=0,a=m,i=!0,s=!1,c=void 0;try{for(var u,l=e[Symbol.iterator]();!(i=(u=l.next()).done);i=!0){var p=u.value;p<128&&t.push(k(p))}}catch(e){s=!0,c=e}finally{try{!i&&l.return&&l.return()}finally{if(s)throw c}}var y=t.length,g=y;for(y&&t.push(w);g<r;){var E=f,x=!0,S=!1,O=void 0;try{for(var C,j=e[Symbol.iterator]();!(x=(C=j.next()).done);x=!0){var I=C.value;I>=n&&I<E&&(E=I)}}catch(e){S=!0,O=e}finally{try{!x&&j.return&&j.return()}finally{if(S)throw O}}var P=g+1;E-n>A((f-o)/P)&&T("overflow"),o+=(E-n)*P,n=E;var D=!0,_=!1,F=void 0;try{for(var q,U=e[Symbol.iterator]();!(D=(q=U.next()).done);D=!0){var z=q.value;if(z<n&&++o>f&&T("overflow"),z==n){for(var L=o,H=h;;H+=h){var V=H<=a?d:H>=a+v?v:H-a;if(L<V)break;var M=L-V,J=h-V;t.push(k(R(V+M%J,0))),L=A(M/J)}t.push(k(R(L,0))),a=N(o,P,g==y),o=0,++g}}}catch(e){_=!0,F=e}finally{try{!D&&U.return&&U.return()}finally{if(_)throw F}}++o,++n}return t.join("")},F=function(e){return I(e,(function(e){return E.test(e)?D(e.slice(4).toLowerCase()):e}))},q=function(e){return I(e,(function(e){return x.test(e)?"xn--"+_(e):e}))},U={version:"2.1.0",ucs2:{decode:$,encode:function(e){return String.fromCodePoint.apply(String,p(e))}},decode:D,encode:_,toASCII:q,toUnicode:F},z={};function L(e){var t=e.charCodeAt(0);return t<16?"%0"+t.toString(16).toUpperCase():t<128?"%"+t.toString(16).toUpperCase():t<2048?"%"+(t>>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function H(e){for(var t="",r=0,n=e.length;r<n;){var o=parseInt(e.substr(r+1,2),16);if(o<128)t+=String.fromCharCode(o),r+=3;else if(o>=194&&o<224){if(n-r>=6){var a=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((31&o)<<6|63&a)}else t+=e.substr(r,6);r+=6}else if(o>=224){if(n-r>=9){var i=parseInt(e.substr(r+4,2),16),s=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&s)}else t+=e.substr(r,9);r+=9}else t+=e.substr(r,3),r+=3}return t}function V(e,t){function r(e){var r=H(e);return r.match(t.UNRESERVED)?r:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,r).replace(t.NOT_USERINFO,L).replace(t.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_HOST,L).replace(t.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,r).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,L).replace(t.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,r).replace(t.NOT_QUERY,L).replace(t.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,r).replace(t.NOT_FRAGMENT,L).replace(t.PCT_ENCODED,o)),e}function M(e){return e.replace(/^0*(.*)/,"$1")||"0"}function J(e,t){var r=e.match(t.IPV4ADDRESS)||[],n=l(r,2)[1];return n?n.split(".").map(M).join("."):e}function B(e,t){var r=e.match(t.IPV6ADDRESS)||[],n=l(r,3),o=n[1],a=n[2];if(o){for(var i=o.toLowerCase().split("::").reverse(),s=l(i,2),c=s[0],u=s[1],p=u?u.split(":").map(M):[],f=c.split(":").map(M),h=t.IPV4ADDRESS.test(f[f.length-1]),d=h?7:8,v=f.length-d,y=Array(d),g=0;g<d;++g)y[g]=p[g]||f[v+g]||"";h&&(y[d-1]=J(y[d-1],t));var m=y.reduce((function(e,t,r){if(!t||"0"===t){var n=e[e.length-1];n&&n.index+n.length===r?n.length++:e.push({index:r,length:1})}return e}),[]).sort((function(e,t){return t.length-e.length}))[0],b=void 0;if(m&&m.length>1){var w=y.slice(0,m.index),E=y.slice(m.index+m.length);b=w.join(":")+"::"+E.join(":")}else b=y.join(":");return a&&(b+="%"+a),b}return e}var K=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,G=void 0==="".match(/(){0}/)[1];function Z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={},n=!1!==t.iri?u:c;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var o=e.match(K);if(o){G?(r.scheme=o[1],r.userinfo=o[3],r.host=o[4],r.port=parseInt(o[5],10),r.path=o[6]||"",r.query=o[7],r.fragment=o[8],isNaN(r.port)&&(r.port=o[5])):(r.scheme=o[1]||void 0,r.userinfo=-1!==e.indexOf("@")?o[3]:void 0,r.host=-1!==e.indexOf("//")?o[4]:void 0,r.port=parseInt(o[5],10),r.path=o[6]||"",r.query=-1!==e.indexOf("?")?o[7]:void 0,r.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(r.port)&&(r.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),r.host&&(r.host=B(J(r.host,n),n)),void 0!==r.scheme||void 0!==r.userinfo||void 0!==r.host||void 0!==r.port||r.path||void 0!==r.query?void 0===r.scheme?r.reference="relative":void 0===r.fragment?r.reference="absolute":r.reference="uri":r.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==r.reference&&(r.error=r.error||"URI is not a "+t.reference+" reference.");var a=z[(t.scheme||r.scheme||"").toLowerCase()];if(t.unicodeSupport||a&&a.unicodeSupport)V(r,n);else{if(r.host&&(t.domainHost||a&&a.domainHost))try{r.host=U.toASCII(r.host.replace(n.PCT_ENCODED,H).toLowerCase())}catch(e){r.error=r.error||"Host's domain name can not be converted to ASCII via punycode: "+e}V(r,c)}a&&a.parse&&a.parse(r,t)}else r.error=r.error||"URI can not be parsed.";return r}function W(e,t){var r=!1!==t.iri?u:c,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(B(J(String(e.host),r),r).replace(r.IPV6ADDRESS,(function(e,t,r){return"["+t+(r?"%25"+r:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}var Q=/^\.\.?\//,Y=/^\/\.(\/|$)/,X=/^\/\.\.(\/|$)/,ee=/^\/?(?:.|\n)*?(?=\/|$)/;function te(e){for(var t=[];e.length;)if(e.match(Q))e=e.replace(Q,"");else if(e.match(Y))e=e.replace(Y,"/");else if(e.match(X))e=e.replace(X,"/"),t.pop();else if("."===e||".."===e)e="";else{var r=e.match(ee);if(!r)throw new Error("Unexpected dot segment condition");var n=r[0];e=e.slice(n.length),t.push(n)}return t.join("")}function re(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.iri?u:c,n=[],o=z[(t.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,t),e.host)if(r.IPV6ADDRESS.test(e.host));else if(t.domainHost||o&&o.domainHost)try{e.host=t.iri?U.toUnicode(e.host):U.toASCII(e.host.replace(r.PCT_ENCODED,H).toLowerCase())}catch(r){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+r}V(e,r),"suffix"!==t.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var a=W(e,t);if(void 0!==a&&("suffix"!==t.reference&&n.push("//"),n.push(a),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var i=e.path;t.absolutePath||o&&o.absolutePath||(i=te(i)),void 0===a&&(i=i.replace(/^\/\//,"/%2F")),n.push(i)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function ne(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=Z(re(e,r),r),t=Z(re(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=te(t.path||""),n.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=te(t.path||""),n.query=t.query):(t.path?("/"===t.path.charAt(0)?n.path=te(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path:n.path="/"+t.path,n.path=te(n.path)),n.query=t.query):(n.path=e.path,void 0!==t.query?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function oe(e,t,r){var n=i({scheme:"null"},r);return re(ne(Z(e,n),Z(t,n),n,!0),n)}function ae(e,t){return"string"==typeof e?e=re(Z(e,t),t):"object"===n(e)&&(e=Z(re(e,t),t)),e}function ie(e,t,r){return"string"==typeof e?e=re(Z(e,r),r):"object"===n(e)&&(e=re(e,r)),"string"==typeof t?t=re(Z(t,r),r):"object"===n(t)&&(t=re(t,r)),e===t}function se(e,t){return e&&e.toString().replace(t&&t.iri?u.ESCAPE:c.ESCAPE,L)}function ce(e,t){return e&&e.toString().replace(t&&t.iri?u.PCT_ENCODED:c.PCT_ENCODED,H)}var ue={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){var r="https"===String(e.scheme).toLowerCase();return e.port!==(r?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},le={scheme:"https",domainHost:ue.domainHost,parse:ue.parse,serialize:ue.serialize};function pe(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var fe={scheme:"ws",domainHost:!0,parse:function(e,t){var r=e;return r.secure=pe(r),r.resourceName=(r.path||"/")+(r.query?"?"+r.query:""),r.path=void 0,r.query=void 0,r},serialize:function(e,t){if(e.port!==(pe(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var r=e.resourceName.split("?"),n=l(r,2),o=n[0],a=n[1];e.path=o&&"/"!==o?o:void 0,e.query=a,e.resourceName=void 0}return e.fragment=void 0,e}},he={scheme:"wss",domainHost:fe.domainHost,parse:fe.parse,serialize:fe.serialize},de={},ve="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ye="[0-9A-Fa-f]",ge=r(r("%[EFef]"+ye+"%"+ye+ye+"%"+ye+ye)+"|"+r("%[89A-Fa-f]"+ye+"%"+ye+ye)+"|"+r("%"+ye+ye)),me="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",be=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),we="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Ee=new RegExp(ve,"g"),xe=new RegExp(ge,"g"),Se=new RegExp(t("[^]",me,"[\\.]",'[\\"]',be),"g"),Oe=new RegExp(t("[^]",ve,we),"g"),Ce=Oe;function Ae(e){var t=H(e);return t.match(Ee)?t:e}var ke={scheme:"mailto",parse:function(e,t){var r=e,n=r.to=r.path?r.path.split(","):[];if(r.path=void 0,r.query){for(var o=!1,a={},i=r.query.split("&"),s=0,c=i.length;s<c;++s){var u=i[s].split("=");switch(u[0]){case"to":for(var l=u[1].split(","),p=0,f=l.length;p<f;++p)n.push(l[p]);break;case"subject":r.subject=ce(u[1],t);break;case"body":r.body=ce(u[1],t);break;default:o=!0,a[ce(u[0],t)]=ce(u[1],t)}}o&&(r.headers=a)}r.query=void 0;for(var h=0,d=n.length;h<d;++h){var v=n[h].split("@");if(v[0]=ce(v[0]),t.unicodeSupport)v[1]=ce(v[1],t).toLowerCase();else try{v[1]=U.toASCII(ce(v[1],t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[h]=v.join("@")}return r},serialize:function(e,t){var r=e,n=a(e.to);if(n){for(var i=0,s=n.length;i<s;++i){var c=String(n[i]),u=c.lastIndexOf("@"),l=c.slice(0,u).replace(xe,Ae).replace(xe,o).replace(Se,L),p=c.slice(u+1);try{p=t.iri?U.toUnicode(p):U.toASCII(ce(p,t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+e}n[i]=l+"@"+p}r.path=n.join(",")}var f=e.headers=e.headers||{};e.subject&&(f.subject=e.subject),e.body&&(f.body=e.body);var h=[];for(var d in f)f[d]!==de[d]&&h.push(d.replace(xe,Ae).replace(xe,o).replace(Oe,L)+"="+f[d].replace(xe,Ae).replace(xe,o).replace(Ce,L));return h.length&&(r.query=h.join("&")),r}},Te=/^([^\:]+)\:(.*)/,je={scheme:"urn",parse:function(e,t){var r=e.path&&e.path.match(Te),n=e;if(r){var o=t.scheme||n.scheme||"urn",a=r[1].toLowerCase(),i=r[2],s=o+":"+(t.nid||a),c=z[s];n.nid=a,n.nss=i,n.path=void 0,c&&(n=c.parse(n,t))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,t){var r=t.scheme||e.scheme||"urn",n=e.nid,o=r+":"+(t.nid||n),a=z[o];a&&(e=a.serialize(e,t));var i=e,s=e.nss;return i.path=(n||t.nid)+":"+s,i}},Ie=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,$e={scheme:"urn:uuid",parse:function(e,t){var r=e;return r.uuid=r.nss,r.nss=void 0,t.tolerant||r.uuid&&r.uuid.match(Ie)||(r.error=r.error||"UUID is not valid."),r},serialize:function(e,t){var r=e;return r.nss=(e.uuid||"").toLowerCase(),r}};z[ue.scheme]=ue,z[le.scheme]=le,z[fe.scheme]=fe,z[he.scheme]=he,z[ke.scheme]=ke,z[je.scheme]=je,z[$e.scheme]=$e,e.SCHEMES=z,e.pctEncChar=L,e.pctDecChars=H,e.parse=Z,e.removeDotSegments=te,e.serialize=re,e.resolveComponents=ne,e.resolve=oe,e.normalize=ae,e.equal=ie,e.escapeComponent=se,e.unescapeComponent=ce,Object.defineProperty(e,"__esModule",{value:!0})}(t)}(0,o.exports);const a=o.exports,i={null:e=>null===e,boolean:e=>"boolean"==typeof e,object:e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,array:e=>Array.isArray(e),number:e=>"number"==typeof e,integer:e=>Number.isInteger(e),string:e=>"string"==typeof e};var s={jsonTypeOf:(e,t)=>i[t](e),resolveUrl:(e,t)=>{const r=a.resolve(e,t,{iri:!0});if(a.resolve(e,"",{iri:!0})&&"file"===a.parse(r).scheme&&"file"!==a.parse(e).scheme)throw Error(`Can't access file '${r}' resource from network context '${e}'`);return r},urlFragment:e=>a.unescapeComponent(a.parse(e).fragment)||"",pathRelative:(e,t)=>{if(e===t)return"";let r=1;const n=e.length-1,o=t.length-r,a=n<o?n:o;let i=-1,s=0;for(;s<a;s++){const n=e.charCodeAt(s+1);if(n!==t.charCodeAt(r+s))break;47===n&&(i=s)}if(o>a){if(47===t.charCodeAt(r+s))return t.slice(r+s+1);if(0===s)return t.slice(r+s)}n>a&&(47===e.charCodeAt(s+1)?i=s:0===a&&(i=0));let c="";for(s=i+2;s<=e.length;++s)s!==e.length&&47!==e.charCodeAt(s)||(c+=0===c.length?"..":"/..");return r+=i,c.length>0?`${c}${t.slice(r,t.length)}`:(47===t.charCodeAt(r)&&++r,t.slice(r,t.length))}};const c=r,u=e=>{if(e.length>0&&"/"!==e[0])throw Error("Invalid JSON Pointer");return e.split("/").slice(1).map(y)},l=(e,t,r,n)=>{if(0===e.length)return r;if(e.length>1){if(Array.isArray(t)){const o=e.shift(),a=[...t];return a[o]=l(e,m(t,o,n),r,d(o,n)),a}{const o=e.shift();return{...t,[o]:l(e,m(t,o,n),r,d(o,n))}}}if(Array.isArray(t)){const n=[...t];return n[g(t,e[0])]=r,n}return"object"==typeof t&&null!==t?{...t,[e[0]]:r}:m(t,e[0],n)},p=(e,t,r,n)=>{if(0!==e.length)if(1!==e.length||b(t)){const o=e.shift();p(e,m(t,o,n),r,d(o,n))}else{t[g(t,e[0])]=r}},f=(e,t,r)=>{if(0!=e.length){if(e.length>1){const n=e.shift(),o=m(t,n,r);return{...t,[n]:f(e,o,d(n,r))}}if(Array.isArray(t))return t.filter(((t,r)=>r!=e[0]));if("object"==typeof t&&null!==t){const{[e[0]]:r,...n}=t;return n}return m(t,e[0],r)}},h=(e,t,r)=>{if(0!==e.length)if(e.length>1){const n=e.shift(),o=m(t,n,r);h(e,o,d(n,r))}else Array.isArray(t)?t.splice(e[0],1):"object"==typeof t&&null!==t?delete t[e[0]]:m(t,e[0],r)},d=c(((e,t)=>t+"/"+v(e))),v=e=>e.toString().replace(/~/g,"~0").replace(/\//g,"~1"),y=e=>e.toString().replace(/~1/g,"/").replace(/~0/g,"~"),g=(e,t)=>Array.isArray(e)&&"-"===t?e.length:t,m=(e,t,r="")=>{if(void 0===e)throw TypeError(`Value at '${r}' is undefined and does not have property '${t}'`);if(null===e)throw TypeError(`Value at '${r}' is null and does not have property '${t}'`);if(b(e))throw TypeError(`Value at '${r}' is a ${typeof e} and does not have property '${t}'`);return e[g(e,t)]},b=e=>null===e||"object"!=typeof e;var w={nil:"",append:d,get:(e,t)=>{const r=u(e),n=e=>r.reduce((([e,t],r)=>[m(e,r,t),d(r,t)]),[e,""])[0];return void 0===t?n:n(t)},set:(e,t,r)=>{const n=u(e),o=c(((e,t)=>l(n,e,t,"")));return void 0===t?o:o(t,r)},assign:(e,t,r)=>{const n=u(e),o=c(((e,t)=>p(n,e,t,"")));return void 0===t?o:o(t,r)},unset:(e,t)=>{const r=u(e),n=e=>f(r,e,"");return void 0===t?n:n(t)},remove:(e,t)=>{const r=u(e),n=e=>h(r,e,"");return void 0===t?n:n(t)}};const E=Symbol("$__value"),x=Symbol("$__href");var S={cons:(e,t)=>Object.freeze({[x]:e,[E]:t}),isReference:e=>e&&void 0!==e[x],href:e=>e[x],value:e=>e[E]};const O=w,C=r,{resolveUrl:A,jsonTypeOf:k}=s,T=S,j=Object.freeze({id:"",pointer:"",instance:void 0,value:void 0}),I=e=>T.isReference(e.value)?T.value(e.value):e.value,$=C(((e,t)=>k(I(e),t))),P=(e,t)=>Object.freeze({...t,pointer:O.append(e,t.pointer),value:I(t)[e]}),R=C(((e,t)=>I(t).map(((r,n,o,a)=>e(P(n,t),n,o,a))))),N=C(((e,t)=>I(t).forEach(((r,n,o,a)=>e(P(n,t),n,o,a))))),D=C(((e,t)=>I(t).map(((e,r,n,o)=>P(r,t))).filter(((t,r,n,o)=>e(t,r,n,o))))),_=C(((e,t,r)=>I(r).reduce(((t,n,o)=>e(t,P(o,r),o)),t))),F=C(((e,t)=>I(t).every(((r,n,o,a)=>e(P(n,t),n,o,a))))),q=C(((e,t)=>I(t).some(((r,n,o,a)=>e(P(n,t),n,o,a)))));var U={nil:j,cons:(e,t="")=>Object.freeze({...j,id:A(t,""),instance:e,value:e}),get:(e,t=j)=>{if(!e.startsWith("#"))throw Error(`No JSON document found at '${e.split("#")[0]}'`);return Object.freeze({...t,pointer:e.substr(1)})},uri:e=>`${e.id}#${encodeURI(e.pointer)}`,value:I,has:(e,t)=>e in I(t),typeOf:$,length:e=>I(e).length,step:P,entries:e=>Object.keys(I(e)).map((t=>[t,P(t,e)])),keys:e=>Object.keys(I(e)),map:R,forEach:N,filter:D,reduce:_,every:F,some:q},z=async e=>Object.entries(await e),L=function(e,t){return function r(){null==t&&(t=e.length);var n=[].slice.call(arguments);return n.length>=t?e.apply(this,n):function(){return r.apply(this,n.concat([].slice.call(arguments)))}}};var H=L((async(e,t)=>(await t).map(e)));var V=L((async(e,t,r)=>(await r).reduce((async(t,r)=>e(await t,r)),t)));const M=V;var J=L((async(e,t,r={})=>M((async(t,r)=>await e(r)?t.concat([r]):t),[],t,r)));const B=H;var K=L((async(e,t)=>{const r=await B(e,t);return(await Promise.all(r)).some((e=>e))}));const G=H;var Z=L((async(e,t)=>{const r=await G(e,t);return(await Promise.all(r)).every((e=>e))}));var W=L(((e,t)=>e.reduce((async(e,t)=>t(await e)),t)));const Q=W,Y=z,X=V;var ee={entries:z,map:H,filter:J,reduce:V,some:K,every:Z,pipeline:W,all:e=>Promise.all(e),allValues:e=>Q([Y,X((async(e,[t,r])=>(e[t]=await r,e)),{})],e)},te={exports:{}};!function(e){var r,n;r=t,n=function(){var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r="boolean"==typeof(new RegExp).sticky;function n(e){return e&&"[object RegExp]"===t.call(e)}function o(e){return e&&"object"==typeof e&&!n(e)&&!Array.isArray(e)}function a(e){return"("+e+")"}function i(e){return e.length?"(?:"+e.map((function(e){return"(?:"+e+")"})).join("|")+")":"(?!)"}function s(e){if("string"==typeof e)return"(?:"+e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+")";if(n(e)){if(e.ignoreCase)throw new Error("RegExp /i flag not allowed");if(e.global)throw new Error("RegExp /g flag is implied");if(e.sticky)throw new Error("RegExp /y flag is implied");if(e.multiline)throw new Error("RegExp /m flag is implied");return e.source}throw new Error("Not a pattern: "+e)}function c(t,r){if(o(r)||(r={match:r}),r.include)throw new Error("Matching rules cannot also include states");var a={defaultType:t,lineBreaks:!!r.error||!!r.fallback,pop:!1,next:null,push:null,error:!1,fallback:!1,value:null,type:null,shouldThrow:!1};for(var i in r)e.call(r,i)&&(a[i]=r[i]);if("string"==typeof a.type&&t!==a.type)throw new Error("Type transform cannot be a string (type '"+a.type+"' for token '"+t+"')");var s=a.match;return a.match=Array.isArray(s)?s:s?[s]:[],a.match.sort((function(e,t){return n(e)&&n(t)?0:n(t)?-1:n(e)?1:t.length-e.length})),a}function u(e){return Array.isArray(e)?function(e){for(var t=[],r=0;r<e.length;r++){var n=e[r];if(n.include)for(var o=[].concat(n.include),a=0;a<o.length;a++)t.push({include:o[a]});else{if(!n.type)throw new Error("Rule has no type: "+JSON.stringify(n));t.push(c(n.type,n))}}return t}(e):function(e){for(var t=Object.getOwnPropertyNames(e),r=[],n=0;n<t.length;n++){var a=t[n],i=e[a],s=[].concat(i);if("include"!==a){var u=[];s.forEach((function(e){o(e)?(u.length&&r.push(c(a,u)),r.push(c(a,e)),u=[]):u.push(e)})),u.length&&r.push(c(a,u))}else for(var l=0;l<s.length;l++)r.push({include:s[l]})}return r}(e)}var l=c("error",{lineBreaks:!0,shouldThrow:!0});function p(e,t){for(var o=null,c=Object.create(null),u=!0,p=null,f=[],h=[],d=0;d<e.length;d++)e[d].fallback&&(u=!1);for(d=0;d<e.length;d++){var v=e[d];if(v.include)throw new Error("Inheritance is not allowed in stateless lexers");if(v.error||v.fallback){if(o)throw!v.fallback==!o.fallback?new Error("Multiple "+(v.fallback?"fallback":"error")+" rules not allowed (for token '"+v.defaultType+"')"):new Error("fallback and error are mutually exclusive (for token '"+v.defaultType+"')");o=v}var y=v.match.slice();if(u)for(;y.length&&"string"==typeof y[0]&&1===y[0].length;)c[y.shift().charCodeAt(0)]=v;if(v.pop||v.push||v.next){if(!t)throw new Error("State-switching options are not allowed in stateless lexers (for token '"+v.defaultType+"')");if(v.fallback)throw new Error("State-switching options are not allowed on fallback tokens (for token '"+v.defaultType+"')")}if(0!==y.length){u=!1,f.push(v);for(var g=0;g<y.length;g++){var m=y[g];if(n(m))if(null===p)p=m.unicode;else if(p!==m.unicode&&!1===v.fallback)throw new Error("If one rule is /u then all must be")}var b=i(y.map(s)),w=new RegExp(b);if(w.test(""))throw new Error("RegExp matches empty string: "+w);if(new RegExp("|"+b).exec("").length-1>0)throw new Error("RegExp has capture groups: "+w+"\nUse (?: … ) instead");if(!v.lineBreaks&&w.test("\n"))throw new Error("Rule should declare lineBreaks: "+w);h.push(a(b))}}var E=o&&o.fallback,x=r&&!E?"ym":"gm",S=r||E?"":"|";return!0===p&&(x+="u"),{regexp:new RegExp(i(h)+S,x),groups:f,fast:c,error:o||l}}function f(e,t,r){var n=e&&(e.push||e.next);if(n&&!r[n])throw new Error("Missing state '"+n+"' (in token '"+e.defaultType+"' of state '"+t+"')");if(e&&e.pop&&1!=+e.pop)throw new Error("pop must be 1 (in token '"+e.defaultType+"' of state '"+t+"')")}var h=function(e,t){this.startState=t,this.states=e,this.buffer="",this.stack=[],this.reset()};h.prototype.reset=function(e,t){return this.buffer=e||"",this.index=0,this.line=t?t.line:1,this.col=t?t.col:1,this.queuedToken=t?t.queuedToken:null,this.queuedThrow=t?t.queuedThrow:null,this.setState(t?t.state:this.startState),this.stack=t&&t.stack?t.stack.slice():[],this},h.prototype.save=function(){return{line:this.line,col:this.col,state:this.state,stack:this.stack.slice(),queuedToken:this.queuedToken,queuedThrow:this.queuedThrow}},h.prototype.setState=function(e){if(e&&this.state!==e){this.state=e;var t=this.states[e];this.groups=t.groups,this.error=t.error,this.re=t.regexp,this.fast=t.fast}},h.prototype.popState=function(){this.setState(this.stack.pop())},h.prototype.pushState=function(e){this.stack.push(this.state),this.setState(e)};var d=r?function(e,t){return e.exec(t)}:function(e,t){var r=e.exec(t);return 0===r[0].length?null:r};function v(){return this.value}if(h.prototype._getGroup=function(e){for(var t=this.groups.length,r=0;r<t;r++)if(void 0!==e[r+1])return this.groups[r];throw new Error("Cannot find token type for matched text")},h.prototype.next=function(){var e=this.index;if(this.queuedGroup){var t=this._token(this.queuedGroup,this.queuedText,e);return this.queuedGroup=null,this.queuedText="",t}var r=this.buffer;if(e!==r.length){if(i=this.fast[r.charCodeAt(e)])return this._token(i,r.charAt(e),e);var n=this.re;n.lastIndex=e;var o=d(n,r),a=this.error;if(null==o)return this._token(a,r.slice(e,r.length),e);var i=this._getGroup(o),s=o[0];return a.fallback&&o.index!==e?(this.queuedGroup=i,this.queuedText=s,this._token(a,r.slice(e,o.index),e)):this._token(i,s,e)}},h.prototype._token=function(e,t,r){var n=0;if(e.lineBreaks){var o=/\n/g,a=1;if("\n"===t)n=1;else for(;o.exec(t);)n++,a=o.lastIndex}var i={type:"function"==typeof e.type&&e.type(t)||e.defaultType,value:"function"==typeof e.value?e.value(t):t,text:t,toString:v,offset:r,lineBreaks:n,line:this.line,col:this.col},s=t.length;if(this.index+=s,this.line+=n,0!==n?this.col=s-a+1:this.col+=s,e.shouldThrow)throw new Error(this.formatError(i,"invalid syntax"));return e.pop?this.popState():e.push?this.pushState(e.push):e.next&&this.setState(e.next),i},"undefined"!=typeof Symbol&&Symbol.iterator){var y=function(e){this.lexer=e};y.prototype.next=function(){var e=this.lexer.next();return{value:e,done:!e}},y.prototype[Symbol.iterator]=function(){return this},h.prototype[Symbol.iterator]=function(){return new y(this)}}return h.prototype.formatError=function(e,t){if(null==e){var r=this.buffer.slice(this.index);e={text:r,offset:this.index,lineBreaks:-1===r.indexOf("\n")?0:1,line:this.line,col:this.col}}var n=Math.max(0,e.offset-e.col+1),o=e.lineBreaks?e.text.indexOf("\n"):e.text.length,a=this.buffer.substring(n,e.offset+o);return t+=" at line "+e.line+" col "+e.col+":\n\n",t+=" "+a+"\n",t+=" "+Array(e.col).join(" ")+"^"},h.prototype.clone=function(){return new h(this.states,this.state)},h.prototype.has=function(e){return!0},{compile:function(e){var t=p(u(e));return new h({start:t},"start")},states:function(e,t){var r=e.$all?u(e.$all):[];delete e.$all;var n=Object.getOwnPropertyNames(e);t||(t=n[0]);for(var o=Object.create(null),a=0;a<n.length;a++)o[b=n[a]]=u(e[b]).concat(r);for(a=0;a<n.length;a++)for(var i=o[b=n[a]],s=Object.create(null),c=0;c<i.length;c++){var l=i[c];if(l.include){var d=[c,1];if(l.include!==b&&!s[l.include]){s[l.include]=!0;var v=o[l.include];if(!v)throw new Error("Cannot include nonexistent state '"+l.include+"' (in state '"+b+"')");for(var y=0;y<v.length;y++){var g=v[y];-1===i.indexOf(g)&&d.push(g)}}i.splice.apply(i,d),c--}}var m=Object.create(null);for(a=0;a<n.length;a++){var b;m[b=n[a]]=p(o[b],!0)}for(a=0;a<n.length;a++){var w=n[a],E=m[w],x=E.groups;for(c=0;c<x.length;c++)f(x[c],w,m);var S=Object.getOwnPropertyNames(E.fast);for(c=0;c<S.length;c++)f(E.fast[S[c]],w,m)}return new h(m,t)},error:Object.freeze({error:!0}),fallback:Object.freeze({fallback:!0}),keywords:function(e){for(var t=Object.create(null),r=Object.create(null),n=Object.getOwnPropertyNames(e),o=0;o<n.length;o++){var a=n[o],i=e[a];(Array.isArray(i)?i:[i]).forEach((function(e){if((r[e.length]=r[e.length]||[]).push(e),"string"!=typeof e)throw new Error("keyword must be string (in keyword '"+a+"')");t[e]=a}))}function s(e){return JSON.stringify(e)}var c="";for(var u in c+="switch (value.length) {\n",r){var l=r[u];c+="case "+u+":\n",c+="switch (value) {\n",l.forEach((function(e){var r=t[e];c+="case "+s(e)+": return "+s(r)+"\n"})),c+="}\n"}return c+="}\n",Function("value",c)}}},e.exports?e.exports=n():r.moo=n()}(te);const re=te.exports;const ne=w,oe=e=>{const t=re.states({main:{WS:{match:new RegExp("(?:(?:\\r?\\n)|[ \\t])+","u"),lineBreaks:!0},true:{match:"true",value:()=>!0},false:{match:"false",value:()=>!1},null:{match:"null",value:()=>null},number:{match:new RegExp("-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?:[eE][-+]?[0-9]+)?","u"),value:parseFloat},string:{match:new RegExp('"(?:[\\x20-\\x21\\x23-\\x5b\\x5d-\\u{10ffff}]|\\\\(?:["\\/\\\\brfnt]|u[0-9a-fA-F]{4}))*"',"u"),value:JSON.parse},"{":"{","}":"}","[":"[","]":"]",":":":",",":",",error:re.error}});t.reset(e);const r=()=>{let e;do{if(e=t.next(),"error"===e?.type)throw SyntaxError(t.formatError(e,"Unrecognized token"))}while("WS"===e?.type);return e};let n,o=r();const a={offset:0,line:1,col:0,text:""};return{next:e=>{if(n=o,o=r(),e&&n?.type!==e)throw SyntaxError(t.formatError(n,`Expected a '${e}'`));return n},peek:()=>o,syntaxError:e=>{const r=n||a,o={...r,offset:r.offset+r.text.length,col:r.col+r.text.length};throw new SyntaxError(t.formatError(o,e))}}},ae=(e,t)=>t,ie=(e,t,r,n)=>{let o;const a=e.next();switch(a?.type){case"true":case"false":case"null":case"number":case"string":o=a.value;break;case"{":o=se(e,t,r,n);break;case"[":o=ue(e,t,r,n);break;default:e.syntaxError("Expected a JSON value")}return n(t,o,r)},se=(e,t,r,n)=>{const o={};return"}"!==e.peek()?.type&&ce(e,t,r,n,o),e.next("}"),o},ce=(e,t,r,n,o)=>{const a=e.next("string").value;e.next(":"),fe(e.peek())||e.syntaxError("Expected a JSON value"),o[a]=ie(e,a,ne.append(a,r),n),","===e.peek()?.type?(e.next(),ce(e,a,r,n,o)):fe(e.peek())&&e.next(",")},ue=(e,t,r,n)=>{const o=[];return"]"!==e.peek()?.type&&le(e,0,r,n,o),e.next("]"),o},le=(e,t,r,n,o)=>{fe(e.peek())||e.syntaxError("Expected a JSON value"),o[t]=ie(e,t,ne.append(t,r),n),","===e.peek()?.type?(e.next(),le(e,t+1,r,n,o)):fe(e.peek())&&e.next(",")},pe=new Set(["string","number","true","false","null","[","{"]),fe=e=>pe.has(e?.type);var he=(e,t=ae)=>{const r=oe(e),n=ie(r,"",ne.nil,t);return r.peek()&&r.syntaxError("A value has been parsed, but more tokens were found"),n};const de=w,ve=(e,t)=>t,ye=(e,t,r,n,o,a)=>{let i;return e=t(n,e,o),i=Array.isArray(e)?ge(e,t,r,o,a):"object"==typeof e&&null!==e?me(e,t,r,o,a):JSON.stringify(e),i},ge=(e,t,r,n,o)=>{0===e.length&&(r="");const a=r?`\n${r.repeat(o-1)}`:"";return"["+a+r+e.map(((e,a)=>{const i=de.append(a,n);return ye(e,t,r,a,i,o+1)})).join(`,${a}${r}`)+a+"]"},me=(e,t,r,n,o)=>{0===Object.keys(e).length&&(r="");const a=r?`\n${r.repeat(o-1)}`:"",i=r?" ":"";return"{"+a+r+Object.entries(e).map((([e,a])=>{const s=de.append(e,n);return JSON.stringify(e)+":"+i+ye(a,t,r,e,s,o+1)})).join(`,${a}${r}`)+a+"}"};var be=(e,t=ve,r="")=>ye(e,t,r,"",de.nil,1);var we={parse:he,stringify:be},Ee=fetch,xe={},Se=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,Oe=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,Ce=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,Ae=/\\([\u000b\u0020-\u00ff])/g,ke=/([\\"])/g,Te=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;function je(e){var t=String(e);if(Ce.test(t))return t;if(t.length>0&&!Oe.test(t))throw new TypeError("invalid parameter value");return'"'+t.replace(ke,"\\$1")+'"'}function Ie(e){this.parameters=Object.create(null),this.type=e}xe.format=function(e){if(!e||"object"!=typeof e)throw new TypeError("argument obj is required");var t=e.parameters,r=e.type;if(!r||!Te.test(r))throw new TypeError("invalid type");var n=r;if(t&&"object"==typeof t)for(var o,a=Object.keys(t).sort(),i=0;i<a.length;i++){if(o=a[i],!Ce.test(o))throw new TypeError("invalid parameter name");n+="; "+o+"="+je(t[o])}return n},xe.parse=function(e){if(!e)throw new TypeError("argument string is required");var t="object"==typeof e?function(e){var t;"function"==typeof e.getHeader?t=e.getHeader("content-type"):"object"==typeof e.headers&&(t=e.headers&&e.headers["content-type"]);if("string"!=typeof t)throw new TypeError("content-type header is missing from object");return t}(e):e;if("string"!=typeof t)throw new TypeError("argument string is required to be a string");var r=t.indexOf(";"),n=-1!==r?t.substr(0,r).trim():t.trim();if(!Te.test(n))throw new TypeError("invalid media type");var o=new Ie(n.toLowerCase());if(-1!==r){var a,i,s;for(Se.lastIndex=r;i=Se.exec(t);){if(i.index!==r)throw new TypeError("invalid parameter format");r+=i[0].length,a=i[1].toLowerCase(),'"'===(s=i[2])[0]&&(s=s.substr(1,s.length-2).replace(Ae,"$1")),o.parameters[a]=s}if(r!==t.length)throw new TypeError("invalid parameter format")}return o};const $e=xe,Pe={};var Re={addPlugin:(e,t)=>{Pe[e]=t},parse:e=>{const t=$e.parse(e.headers.get("content-type"));if(!(t.type in Pe))throw Error(`${e.url} is not a schema. Found a document with media type: ${t.type}`);return Pe[t.type].parse(e,t.parameters)},getContentType:e=>{for(const t in Pe)if(Pe[t].matcher(e))return t;return"application/octet-stream"}};const Ne=r,De=ee,_e=we,Fe=w,{jsonTypeOf:qe,resolveUrl:Ue,urlFragment:ze,pathRelative:Le}=s,He=Ee,Ve=S,Me=Re,Je="https://json-schema.org/draft/2019-09/vocab/core",Be="https://json-schema.org/draft/2020-12/vocab/core",Ke={},Ge={},Ze=(e,t)=>{const r=Ge[e];return Ke[r]?.[t]},We={},Qe={},Ye=(e,t="",r="")=>{e=JSON.parse(JSON.stringify(e));const n=Ue(t,""),o=Ue(e.$schema||r,"");if(!o)throw Error("Couldn't determine schema dialect");if(delete e.$schema,!(o in Ge))if(!0===e?.$vocabulary?.[Je]&&o===Xe(e,n,Je)[0])Ge[o]=Je;else if(!0===e?.$vocabulary?.[Be]&&o===Xe(e,n,Be)[0])Ge[o]=Be;else{const e=We[o];if(!e)throw Error(`Couldn't determine JSON Schema version for dialect: '${o}'`);!0===e.vocabulary[Je]?Ge[o]=Je:!0===e.vocabulary[Be]?Ge[o]=Be:Ge[o]=Ge[e.dialectId]}const[a,i]=Xe(e,n,Ge[o]);if(!a)throw Error("Couldn't determine an identifier for the schema");const s=Ze(o,"baseToken");delete e[s],n&&(Qe[n]=a);const c=Ze(o,"anchorToken");i&&s===c&&(e[c]=c!==s?encodeURI(i):`#${encodeURI(i)}`);const u={},l=Ze(o,"recursiveAnchorToken");let p;!0===e[l]&&(u[""]=`${a}#`,e[c]="",delete e[l]);const f=Ze(o,"vocabularyToken");qe(e[f],"object")?(p=e[f],delete e[f]):p={[Ge[o]]:!0};const h={"":""};return We[a]={id:a,dialectId:o,schema:et(e,a,o,Fe.nil,h,u),anchors:h,dynamicAnchors:u,vocabulary:p,validated:!1},a},Xe=(e,t,r)=>{const n=Ke[r]?.baseToken,o=Ue(t,e[n]||"");return[Ue(o,""),ze(o)]},et=(e,t,r,n,o,a)=>{if(qe(e,"object")){const i="string"==typeof e.$schema?Ue(e.$schema,""):r,s=Ze(i,"embeddedToken"),c=Ze(i,"anchorToken");if("string"==typeof e[s]&&(s!==c||"#"!==e[s][0])){const n=Ue(t,e[s]);return e[Ze(i,"baseToken")]=n,Ye(e,n,r),Ve.cons(e[s],e)}const u=Ze(r,"anchorToken"),l=Ze(r,"dynamicAnchorToken");"string"==typeof e[l]&&(a[e[l]]=`${t}#${encodeURI(n)}`,o[e[l]]=n,delete e[l]);const p=Ze(r,"embeddedToken");if("string"==typeof e[u]){const t=u!==p?e[u]:e[u].slice(1);o[t]=n,delete e[u]}const f=Ze(r,"jrefToken");if("string"==typeof e[f])return Ve.cons(e[f],e);for(const i in e)e[i]=et(e[i],t,r,Fe.append(i,n),o,a);return e}return Array.isArray(e)?e.map(((e,i)=>et(e,t,r,Fe.append(i,n),o,a))):e},tt=e=>We[Qe[e]]||We[e],rt=Object.freeze({id:"",dialectId:void 0,vocabulary:{},pointer:Fe.nil,schema:void 0,value:void 0,anchors:{},dynamicAnchors:{},validated:!0}),nt=async(e,t=rt)=>{const r=Ue(it(t),e),n=Ue(r,""),o=ze(r);if(!(e=>e in We||e in Qe)(n)){const e=await He(n,{headers:{Accept:"application/schema+json"}});if(e.status>=400)throw await e.text(),Error(`Failed to retrieve schema with id: ${n}`);const[t,r]=await Me.parse(e);let o;o=t.$schema?Ue(t.$schema,""):r?Ue(n,r):"",o&&n!==o&&!(o in Ge)&&await nt(o),Ye(t,n,o)}const a=tt(n),i="/"!==o[0]?at(a,o):o,s=Object.freeze({...a,pointer:i,value:Fe.get(i,a.schema)});return ot(s)},ot=e=>Ve.isReference(e.value)?nt(Ve.href(e.value),e):e,at=(e,t)=>{if(!(t in e.anchors))throw Error(`No such anchor '${encodeURI(e.id)}#${encodeURI(t)}'`);return e.anchors[t]},it=e=>`${e.id}#${encodeURI(e.pointer)}`,st=e=>Ve.isReference(e.value)?Ve.value(e.value):e.value,ct=(e,t)=>{const r=tt(t.id),n=Object.freeze({...t,pointer:Fe.append(e,t.pointer),value:st(t)[e],validated:r.validated});return ot(n)},ut=Ne(((e,t)=>De.pipeline([st,De.map((async(r,n)=>e(await ct(n,t),n))),De.all],t))),lt={parentId:"",parentDialect:"",includeEmbedded:!0},pt=(e,t)=>{if(t.startsWith("file://")){const r=e.slice(7,e.lastIndexOf("/"));return""===e?"":Le(r,t.slice(7))}return t};var ft={setConfig:(e,t,r)=>{Ge[e]=e,Ke[e]||(Ke[e]={}),Ke[e][t]=r},getConfig:Ze,add:Ye,get:nt,markValidated:e=>{We[e].validated=!0},uri:it,value:st,getAnchorPointer:at,typeOf:(e,t)=>qe(st(e),t),has:(e,t)=>e in st(t),step:ct,keys:e=>Object.keys(st(e)),entries:e=>De.pipeline([st,Object.keys,De.map((async t=>[t,await ct(t,e)])),De.all],e),map:ut,length:e=>st(e).length,toSchema:(e,t={})=>{const r={...lt,...t},n=Ze(e.dialectId,"anchorToken"),o=Ze(e.dialectId,"dynamicAnchorToken"),a={};for(const t in e.anchors)""===t||e.dynamicAnchors[t]||(a[e.anchors[t]]=t);const i={};for(const t in e.dynamicAnchors){const r=ze(e.dynamicAnchors[t]);i[r]=t}const s=JSON.parse(_e.stringify(e.schema,((t,s,c)=>{if(Ve.isReference(s)){const t=Ve.value(s),n="string"==typeof t.$schema?Ue(t.$schema,""):e.dialectId,o=Ze(n,"embeddedToken");return!r.includeEmbedded&&o in t?void 0:Ve.value(s)}return c in a&&(s={[n]:a[c],...s}),c in i&&(s={[o]:i[c],...s}),s}))),c=Ze(e.dialectId,"baseToken"),u=pt(r.parentId,e.id),l=r.parentDialect===e.dialectId?"":e.dialectId;return{...u&&{[c]:u},...l&&{$schema:l},...s}}};class ht extends Error{constructor(e){super("Invalid Schema"),this.name=this.constructor.name,this.output=e}}var dt=ht;const vt=ft;var yt={compile:e=>vt.value(e),interpret:()=>!0};const gt=r,mt=n.exports,{resolveUrl:bt}=s,wt=U,Et=ft,xt=dt,St=Re,Ot=yt,Ct="FLAG",At="BASIC",kt="DETAILED",Tt="VERBOSE";let jt=kt,It=!0;St.addPlugin("application/schema+json",{parse:async(e,t)=>[await e.json(),t.schema||t.profile],matcher:e=>e.endsWith(".schema.json")});const $t=async e=>{const t={metaData:{}};return{ast:t,schemaUri:await Ut(e,t)}},Pt=gt((({ast:e,schemaUri:t},r,n=Ct)=>{if(![Ct,At,kt,Tt].includes(n))throw Error(`The '${n}' error format is not supported`);const o=[],a=mt.subscribe("result",Rt(n,o));return Lt(t,r,e,{}),mt.unsubscribe(a),o[0]})),Rt=(e,t)=>{const r=[];return(n,o)=>{if("result"===n){const{keyword:e,absoluteKeywordLocation:t,instanceLocation:n,valid:a}=o,i={keyword:e,absoluteKeywordLocation:t,instanceLocation:n,valid:a,errors:[]};r.push(i)}else if("result.start"===n)r.push(n);else if("result.end"===n){const n=r.pop();for(;"result.start"!==r[r.length-1];){const t=r.pop(),o=[t];e===At&&(o.push(...t.errors),delete t.errors),(e===Tt||e!==Ct&&!t.valid)&&n.errors.unshift(...o)}r[r.length-1]=n,t[0]=n}}},Nt={},Dt=e=>Nt[e]||Ot,_t=e=>e in Nt,Ft={},qt={},Ut=async(e,t)=>{if(e=await zt(e),!_t(`${e.dialectId}#validate`)){const t=await Et.get(e.dialectId);(Et.getConfig(t.id,"mandatoryVocabularies")||[]).forEach((e=>{if(!t.vocabulary[e])throw Error(`Vocabulary '${e}' must be explicitly declared and required`)})),Object.entries(t.vocabulary).forEach((([e,r])=>{if(e in Ft)Object.entries(Ft[e]).forEach((([e,r])=>{((e,t)=>{Nt[e]={collectEvaluatedItems:(e,r,n,o,a)=>t.interpret(e,r,n,o,a)&&new Set,collectEvaluatedProperties:(e,r,n,o,a)=>t.interpret(e,r,n,o,a)&&[],...t}})(`${t.id}#${e}`,r)}));else if(r)throw Error(`Missing required vocabulary: ${e}`)}))}if(It&&!e.validated){if(Et.markValidated(e.id),!(e.dialectId in qt)){const t=await Et.get(e.dialectId),r=await $t(t);qt[t.id]=Pt(r)}const t=wt.cons(e.schema,e.id),r=qt[e.dialectId](t,jt);if(!r.valid)throw new xt(r)}return e.id in t.metaData||(t.metaData[e.id]={id:e.id,dynamicAnchors:e.dynamicAnchors,anchors:e.anchors}),Dt(`${e.dialectId}#validate`).compile(e,t)},zt=async e=>Et.typeOf(e,"string")?zt(await Et.get(Et.value(e),e)):e,Lt=(e,t,r,n)=>{const o=Ht(e,r),a=bt(e,"");return Dt(o).interpret(e,t,r,{...r.metaData[a].dynamicAnchors,...n})},Ht=(e,t)=>{if(!(e in t))throw Error(`No schema found at ${e}`);return t[e][0]};var Vt={validate:async(e,t,r)=>{const n=await $t(e),o=(e,t)=>Pt(n,wt.cons(e),t);return void 0===t?o:o(t,r)},compile:$t,interpret:Pt,setMetaOutputFormat:e=>{jt=e},setShouldMetaValidate:e=>{It=e},FLAG:Ct,BASIC:At,DETAILED:kt,VERBOSE:Tt,add:(e,t="",r="")=>{const n=Et.add(e,t,r);delete qt[n]},getKeyword:Dt,hasKeyword:_t,defineVocabulary:(e,t)=>{Ft[e]=t},compileSchema:Ut,interpretSchema:Lt,collectEvaluatedProperties:(e,t,r,n,o)=>{const a=Ht(e,r);return Dt(a).collectEvaluatedProperties(e,t,r,n,o)},collectEvaluatedItems:(e,t,r,n,o)=>{const a=Ht(e,r);return Dt(a).collectEvaluatedItems(e,t,r,n,o)},addMediaTypePlugin:St.addPlugin};const Mt=ee,Jt=n.exports,Bt=Vt,Kt=U,Gt=ft;var Zt={compile:async(e,t)=>{const r=Gt.uri(e);if(!(r in t)){t[r]=!1;const n=Gt.value(e);if(!["object","boolean"].includes(typeof n))throw Error(`No schema found at '${Gt.uri(e)}'`);t[r]=[`${e.dialectId}#validate`,Gt.uri(e),"boolean"==typeof n?n:await Mt.pipeline([Gt.entries,Mt.map((([t,r])=>[`${e.dialectId}#${t}`,r])),Mt.filter((([t])=>t!==`${e.dialectId}#validate`)),Mt.map((async([r,n])=>{const o=await Bt.getKeyword(r).compile(n,t,e);return[r,Gt.uri(n),o]})),Mt.all],e)]}return r},interpret:(e,t,r,n)=>{const[o,a,i]=r[e];Jt.publishSync("result.start");const s="boolean"==typeof i?i:i.every((([e,o,a])=>{Jt.publishSync("result.start");const i=Bt.getKeyword(e).interpret(a,t,r,n);return Jt.publishSync("result",{keyword:e,absoluteKeywordLocation:o,instanceLocation:Kt.uri(t),valid:i,ast:a}),Jt.publishSync("result.end"),i}));return Jt.publishSync("result",{keyword:o,absoluteKeywordLocation:a,instanceLocation:Kt.uri(t),valid:s,ast:e}),Jt.publishSync("result.end"),s},collectEvaluatedProperties:(e,t,r,n,o=!1)=>{const a=r[e][2];return"boolean"==typeof a?!!a&&[]:a.filter((([e])=>!o||!e.endsWith("#unevaluatedProperties"))).reduce(((e,[o,,a])=>{const i=e&&Bt.getKeyword(o).collectEvaluatedProperties(a,t,r,n);return!1!==i&&[...e,...i]}),[])},collectEvaluatedItems:(e,t,r,n,o=!1)=>{const a=r[e][2];return"boolean"==typeof a?!!a&&new Set:a.filter((([e])=>!o||!e.endsWith("#unevaluatedItems"))).reduce(((e,[o,,a])=>{const i=!1!==e&&Bt.getKeyword(o).collectEvaluatedItems(a,t,r,n);return!1!==i&&new Set([...e,...i])}),new Set)}};var Wt={Core:Vt,Schema:ft,Instance:U,Reference:S,Keywords:{metaData:yt,validate:Zt},InvalidSchemaError:dt};e.default=Wt,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=json-schema-core-umd.min.js.map
const curry = require("just-curry-it");
const Pact = require("@hyperjump/pact");
const Json = require("@hyperjump/json");
const JsonPointer = require("@hyperjump/json-pointer");

@@ -285,32 +286,39 @@ const { jsonTypeOf, resolveUrl, urlFragment, pathRelative } = require("./common");

const schema = JSON.parse(JSON.stringify(schemaDoc.schema, (key, value) => {
if (!Reference.isReference(value)) {
return value;
const anchorToken = getConfig(schemaDoc.dialectId, "anchorToken");
const dynamicAnchorToken = getConfig(schemaDoc.dialectId, "dynamicAnchorToken");
const anchors = {};
for (const anchor in schemaDoc.anchors) {
if (anchor !== "" && !schemaDoc.dynamicAnchors[anchor]) {
anchors[schemaDoc.anchors[anchor]] = anchor;
}
}
const refValue = Reference.value(value);
const embeddedDialect = typeof refValue.$schema === "string" ? resolveUrl(refValue.$schema, "") : schemaDoc.dialectId;
const embeddedToken = getConfig(embeddedDialect, "embeddedToken");
if (!fullOptions.includeEmbedded && embeddedToken in refValue) {
return;
const dynamicAnchors = {};
for (const anchor in schemaDoc.dynamicAnchors) {
const pointer = urlFragment(schemaDoc.dynamicAnchors[anchor]);
dynamicAnchors[pointer] = anchor;
}
const schema = JSON.parse(Json.stringify(schemaDoc.schema, (key, value, pointer) => {
if (Reference.isReference(value)) {
const refValue = Reference.value(value);
const embeddedDialect = typeof refValue.$schema === "string" ? resolveUrl(refValue.$schema, "") : schemaDoc.dialectId;
const embeddedToken = getConfig(embeddedDialect, "embeddedToken");
if (!fullOptions.includeEmbedded && embeddedToken in refValue) {
return;
} else {
return Reference.value(value);
}
} else {
return Reference.value(value);
if (pointer in anchors) {
value = { [anchorToken]: anchors[pointer], ...value };
}
if (pointer in dynamicAnchors) {
value = { [dynamicAnchorToken]: dynamicAnchors[pointer], ...value };
}
return value;
}
}));
const dynamicAnchorToken = getConfig(schemaDoc.dialectId, "dynamicAnchorToken");
Object.entries(schemaDoc.dynamicAnchors)
.forEach(([anchor, uri]) => {
const pointer = JsonPointer.append(dynamicAnchorToken, urlFragment(uri));
JsonPointer.assign(pointer, schema, anchor);
});
const anchorToken = getConfig(schemaDoc.dialectId, "anchorToken");
Object.entries(schemaDoc.anchors)
.filter(([anchor]) => anchor !== "" && !(anchor in schemaDoc.dynamicAnchors))
.forEach(([anchor, pointer]) => {
const anchorPointer = JsonPointer.append(anchorToken, pointer);
JsonPointer.assign(anchorPointer, schema, anchor);
});
const baseToken = getConfig(schemaDoc.dialectId, "baseToken");

@@ -317,0 +325,0 @@ const id = relativeUri(fullOptions.parentId, schemaDoc.id);

{
"name": "@hyperjump/json-schema-core",
"version": "0.28.4",
"version": "0.28.5",
"description": "A framework for building JSON Schema tools",

@@ -61,2 +61,3 @@ "main": "lib/index.js",

"@hyperjump/pact": "^0.2.3",
"@hyperjump/json": "^0.1.0",
"content-type": "^1.0.4",

@@ -63,0 +64,0 @@ "node-fetch": "^2.6.5",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc