(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))l(c);new MutationObserver(c=>{for(const o of c)if(o.type==="childList")for(const d of o.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&l(d)}).observe(document,{childList:!0,subtree:!0});function u(c){const o={};return c.integrity&&(o.integrity=c.integrity),c.referrerPolicy&&(o.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?o.credentials="include":c.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function l(c){if(c.ep)return;c.ep=!0;const o=u(c);fetch(c.href,o)}})();function Xl(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var df={exports:{}},wi={};/** * @license React * react-jsx-runtime.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Op;function tb(){if(Op)return wi;Op=1;var r=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function u(l,c,o){var d=null;if(o!==void 0&&(d=""+o),c.key!==void 0&&(d=""+c.key),"key"in c){o={};for(var h in c)h!=="key"&&(o[h]=c[h])}else o=c;return c=o.ref,{$$typeof:r,type:l,key:d,ref:c!==void 0?c:null,props:o}}return wi.Fragment=i,wi.jsx=u,wi.jsxs=u,wi}var Ap;function nb(){return Ap||(Ap=1,df.exports=tb()),df.exports}var we=nb(),hf={exports:{}},Oe={};/** * @license React * react.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Rp;function rb(){if(Rp)return Oe;Rp=1;var r=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),d=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),N=Symbol.iterator;function x(R){return R===null||typeof R!="object"?null:(R=N&&R[N]||R["@@iterator"],typeof R=="function"?R:null)}var V={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},L=Object.assign,C={};function g(R,z,K){this.props=R,this.context=z,this.refs=C,this.updater=K||V}g.prototype.isReactComponent={},g.prototype.setState=function(R,z){if(typeof R!="object"&&typeof R!="function"&&R!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,R,z,"setState")},g.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function w(){}w.prototype=g.prototype;function p(R,z,K){this.props=R,this.context=z,this.refs=C,this.updater=K||V}var b=p.prototype=new w;b.constructor=p,L(b,g.prototype),b.isPureReactComponent=!0;var E=Array.isArray,O={H:null,A:null,T:null,S:null},v=Object.prototype.hasOwnProperty;function A(R,z,K,k,T,H){return K=H.ref,{$$typeof:r,type:R,key:z,ref:K!==void 0?K:null,props:H}}function $(R,z){return A(R.type,z,void 0,void 0,void 0,R.props)}function D(R){return typeof R=="object"&&R!==null&&R.$$typeof===r}function j(R){var z={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(K){return z[K]})}var Y=/\/+/g;function Q(R,z){return typeof R=="object"&&R!==null&&R.key!=null?j(""+R.key):z.toString(36)}function W(){}function F(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(W,W):(R.status="pending",R.then(function(z){R.status==="pending"&&(R.status="fulfilled",R.value=z)},function(z){R.status==="pending"&&(R.status="rejected",R.reason=z)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function ne(R,z,K,k,T){var H=typeof R;(H==="undefined"||H==="boolean")&&(R=null);var te=!1;if(R===null)te=!0;else switch(H){case"bigint":case"string":case"number":te=!0;break;case"object":switch(R.$$typeof){case r:case i:te=!0;break;case S:return te=R._init,ne(te(R._payload),z,K,k,T)}}if(te)return T=T(R),te=k===""?"."+Q(R,0):k,E(T)?(K="",te!=null&&(K=te.replace(Y,"$&/")+"/"),ne(T,z,K,"",function(M){return M})):T!=null&&(D(T)&&(T=$(T,K+(T.key==null||R&&R.key===T.key?"":(""+T.key).replace(Y,"$&/")+"/")+te)),z.push(T)),1;te=0;var pe=k===""?".":k+":";if(E(R))for(var ae=0;ae>>1,R=P[de];if(0>>1;dec(k,re))Tc(H,k)?(P[de]=H,P[T]=re,de=T):(P[de]=k,P[K]=re,de=K);else if(Tc(H,re))P[de]=H,P[T]=re,de=T;else break e}}return ue}function c(P,ue){var re=P.sortIndex-ue.sortIndex;return re!==0?re:P.id-ue.id}if(r.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;r.unstable_now=function(){return o.now()}}else{var d=Date,h=d.now();r.unstable_now=function(){return d.now()-h}}var m=[],y=[],S=1,N=null,x=3,V=!1,L=!1,C=!1,g=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;function b(P){for(var ue=u(y);ue!==null;){if(ue.callback===null)l(y);else if(ue.startTime<=P)l(y),ue.sortIndex=ue.expirationTime,i(m,ue);else break;ue=u(y)}}function E(P){if(C=!1,b(P),!L)if(u(m)!==null)L=!0,F();else{var ue=u(y);ue!==null&&ne(E,ue.startTime-P)}}var O=!1,v=-1,A=5,$=-1;function D(){return!(r.unstable_now()-$P&&D());){var de=N.callback;if(typeof de=="function"){N.callback=null,x=N.priorityLevel;var R=de(N.expirationTime<=P);if(P=r.unstable_now(),typeof R=="function"){N.callback=R,b(P),ue=!0;break t}N===u(m)&&l(m),b(P)}else l(m);N=u(m)}if(N!==null)ue=!0;else{var z=u(y);z!==null&&ne(E,z.startTime-P),ue=!1}}break e}finally{N=null,x=re,V=!1}ue=void 0}}finally{ue?Y():O=!1}}}var Y;if(typeof p=="function")Y=function(){p(j)};else if(typeof MessageChannel<"u"){var Q=new MessageChannel,W=Q.port2;Q.port1.onmessage=j,Y=function(){W.postMessage(null)}}else Y=function(){g(j,0)};function F(){O||(O=!0,Y())}function ne(P,ue){v=g(function(){P(r.unstable_now())},ue)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(P){P.callback=null},r.unstable_continueExecution=function(){L||V||(L=!0,F())},r.unstable_forceFrameRate=function(P){0>P||125de?(P.sortIndex=re,i(y,P),u(m)===null&&P===u(y)&&(C?(w(v),v=-1):C=!0,ne(E,re-de))):(P.sortIndex=R,i(m,P),L||V||(L=!0,F())),P},r.unstable_shouldYield=D,r.unstable_wrapCallback=function(P){var ue=x;return function(){var re=x;x=ue;try{return P.apply(this,arguments)}finally{x=re}}}}(yf)),yf}var jp;function ib(){return jp||(jp=1,pf.exports=ab()),pf.exports}var gf={exports:{}},bt={};/** * @license React * react-dom.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Dp;function sb(){if(Dp)return bt;Dp=1;var r=jc();function i(m){var y="https://react.dev/errors/"+m;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(i){console.error(i)}}return r(),gf.exports=sb(),gf.exports}/** * @license React * react-dom-client.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var qp;function ub(){if(qp)return $i;qp=1;var r=ib(),i=jc(),u=lb();function l(e){var t="https://react.dev/errors/"+e;if(1)":-1s||I[a]!==J[s]){var fe=` `+I[a].replace(" at new "," at ");return e.displayName&&fe.includes("")&&(fe=fe.replace("",e.displayName)),fe}while(1<=a&&0<=s);break}}}finally{F=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?W(n):""}function P(e){switch(e.tag){case 26:case 27:case 5:return W(e.type);case 16:return W("Lazy");case 13:return W("Suspense");case 19:return W("SuspenseList");case 0:case 15:return e=ne(e.type,!1),e;case 11:return e=ne(e.type.render,!1),e;case 1:return e=ne(e.type,!0),e;default:return""}}function ue(e){try{var t="";do t+=P(e),e=e.return;while(e);return t}catch(n){return` Error generating stack: `+n.message+` `+n.stack}}function re(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function de(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function R(e){if(re(e)!==e)throw Error(l(188))}function z(e){var t=e.alternate;if(!t){if(t=re(e),t===null)throw Error(l(188));return t!==e?null:e}for(var n=e,a=t;;){var s=n.return;if(s===null)break;var f=s.alternate;if(f===null){if(a=s.return,a!==null){n=a;continue}break}if(s.child===f.child){for(f=s.child;f;){if(f===n)return R(s),e;if(f===a)return R(s),t;f=f.sibling}throw Error(l(188))}if(n.return!==a.return)n=s,a=f;else{for(var _=!1,U=s.child;U;){if(U===n){_=!0,n=s,a=f;break}if(U===a){_=!0,a=s,n=f;break}U=U.sibling}if(!_){for(U=f.child;U;){if(U===n){_=!0,n=f,a=s;break}if(U===a){_=!0,a=f,n=s;break}U=U.sibling}if(!_)throw Error(l(189))}}if(n.alternate!==a)throw Error(l(190))}if(n.tag!==3)throw Error(l(188));return n.stateNode.current===n?e:t}function K(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=K(e),t!==null)return t;e=e.sibling}return null}var k=Array.isArray,T=u.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H={pending:!1,data:null,method:null,action:null},te=[],pe=-1;function ae(e){return{current:e}}function M(e){0>pe||(e.current=te[pe],te[pe]=null,pe--)}function B(e,t){pe++,te[pe]=e.current,e.current=t}var q=ae(null),G=ae(null),X=ae(null),se=ae(null);function me(e,t){switch(B(X,t),B(G,e),B(q,null),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)&&(t=t.namespaceURI)?ep(t):0;break;default:if(e=e===8?t.parentNode:t,t=e.tagName,e=e.namespaceURI)e=ep(e),t=tp(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}M(q),B(q,t)}function ye(){M(q),M(G),M(X)}function Ae(e){e.memoizedState!==null&&B(se,e);var t=q.current,n=tp(t,e.type);t!==n&&(B(G,e),B(q,n))}function Ie(e){G.current===e&&(M(q),M(G)),se.current===e&&(M(se),vi._currentValue=H)}var Ue=Object.prototype.hasOwnProperty,Le=r.unstable_scheduleCallback,Re=r.unstable_cancelCallback,He=r.unstable_shouldYield,tt=r.unstable_requestPaint,dt=r.unstable_now,Aa=r.unstable_getCurrentPriorityLevel,Un=r.unstable_ImmediatePriority,xr=r.unstable_UserBlockingPriority,cr=r.unstable_NormalPriority,Li=r.unstable_LowPriority,Vi=r.unstable_IdlePriority,Lv=r.log,Vv=r.unstable_setDisableYieldValue,Ra=null,Nt=null;function xv(e){if(Nt&&typeof Nt.onCommitFiberRoot=="function")try{Nt.onCommitFiberRoot(Ra,e,void 0,(e.current.flags&128)===128)}catch{}}function Ln(e){if(typeof Lv=="function"&&Vv(e),Nt&&typeof Nt.setStrictMode=="function")try{Nt.setStrictMode(Ra,e)}catch{}}var jt=Math.clz32?Math.clz32:Gv,Bv=Math.log,Hv=Math.LN2;function Gv(e){return e>>>=0,e===0?32:31-(Bv(e)/Hv|0)|0}var xi=128,Bi=4194304;function dr(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194176;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Hi(e,t){var n=e.pendingLanes;if(n===0)return 0;var a=0,s=e.suspendedLanes,f=e.pingedLanes,_=e.warmLanes;e=e.finishedLanes!==0;var U=n&134217727;return U!==0?(n=U&~s,n!==0?a=dr(n):(f&=U,f!==0?a=dr(f):e||(_=U&~_,_!==0&&(a=dr(_))))):(U=n&~s,U!==0?a=dr(U):f!==0?a=dr(f):e||(_=n&~_,_!==0&&(a=dr(_)))),a===0?0:t!==0&&t!==a&&!(t&s)&&(s=a&-a,_=t&-t,s>=_||s===32&&(_&4194176)!==0)?t:a}function Ta(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Iv(e,t){switch(e){case 1:case 2:case 4:case 8:return t+250;case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Pc(){var e=xi;return xi<<=1,!(xi&4194176)&&(xi=128),e}function Kc(){var e=Bi;return Bi<<=1,!(Bi&62914560)&&(Bi=4194304),e}function iu(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Na(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Yv(e,t,n,a,s,f){var _=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var U=e.entanglements,I=e.expirationTimes,J=e.hiddenUpdates;for(n=_&~n;0"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Xv=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),td={},nd={};function Qv(e){return Ue.call(nd,e)?!0:Ue.call(td,e)?!1:Xv.test(e)?nd[e]=!0:(td[e]=!0,!1)}function Gi(e,t,n){if(Qv(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function Ii(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function pn(e,t,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+a)}}function Vt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function rd(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Zv(e){var t=rd(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),a=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,f=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(_){a=""+_,f.call(this,_)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return a},setValue:function(_){a=""+_},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Yi(e){e._valueTracker||(e._valueTracker=Zv(e))}function ad(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=rd(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function ki(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Jv=/[\n"\\]/g;function xt(e){return e.replace(Jv,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function uu(e,t,n,a,s,f,_,U){e.name="",_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?e.type=_:e.removeAttribute("type"),t!=null?_==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Vt(t)):e.value!==""+Vt(t)&&(e.value=""+Vt(t)):_!=="submit"&&_!=="reset"||e.removeAttribute("value"),t!=null?ou(e,_,Vt(t)):n!=null?ou(e,_,Vt(n)):a!=null&&e.removeAttribute("value"),s==null&&f!=null&&(e.defaultChecked=!!f),s!=null&&(e.checked=s&&typeof s!="function"&&typeof s!="symbol"),U!=null&&typeof U!="function"&&typeof U!="symbol"&&typeof U!="boolean"?e.name=""+Vt(U):e.removeAttribute("name")}function id(e,t,n,a,s,f,_,U){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),t!=null||n!=null){if(!(f!=="submit"&&f!=="reset"||t!=null))return;n=n!=null?""+Vt(n):"",t=t!=null?""+Vt(t):n,U||t===e.value||(e.value=t),e.defaultValue=t}a=a??s,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=U?e.checked:!!a,e.defaultChecked=!!a,_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(e.name=_)}function ou(e,t,n){t==="number"&&ki(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Yr(e,t,n,a){if(e=e.options,t){t={};for(var s=0;s=Ua),vd=" ",bd=!1;function Ed(e,t){switch(e){case"keyup":return O0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _d(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xr=!1;function R0(e,t){switch(e){case"compositionend":return _d(t);case"keypress":return t.which!==32?null:(bd=!0,vd);case"textInput":return e=t.data,e===vd&&bd?null:e;default:return null}}function T0(e,t){if(Xr)return e==="compositionend"||!Eu&&Ed(e,t)?(e=dd(),Ki=pu=xn=null,Xr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=a}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Nd(n)}}function Dd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Dd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Md(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ki(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ki(e.document)}return t}function wu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function U0(e,t){var n=Md(t);t=e.focusedElem;var a=e.selectionRange;if(n!==t&&t&&t.ownerDocument&&Dd(t.ownerDocument.documentElement,t)){if(a!==null&&wu(t)){if(e=a.start,n=a.end,n===void 0&&(n=e),"selectionStart"in t)t.selectionStart=e,t.selectionEnd=Math.min(n,t.value.length);else if(n=(e=t.ownerDocument||document)&&e.defaultView||window,n.getSelection){n=n.getSelection();var s=t.textContent.length,f=Math.min(a.start,s);a=a.end===void 0?f:Math.min(a.end,s),!n.extend&&f>a&&(s=a,a=f,f=s),s=jd(t,f);var _=jd(t,a);s&&_&&(n.rangeCount!==1||n.anchorNode!==s.node||n.anchorOffset!==s.offset||n.focusNode!==_.node||n.focusOffset!==_.offset)&&(e=e.createRange(),e.setStart(s.node,s.offset),n.removeAllRanges(),f>a?(n.addRange(e),n.extend(_.node,_.offset)):(e.setEnd(_.node,_.offset),n.addRange(e)))}}for(e=[],n=t;n=n.parentNode;)n.nodeType===1&&e.push({element:n,left:n.scrollLeft,top:n.scrollTop});for(typeof t.focus=="function"&&t.focus(),t=0;t=document.documentMode,Qr=null,$u=null,Ba=null,Ou=!1;function qd(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ou||Qr==null||Qr!==ki(a)||(a=Qr,"selectionStart"in a&&wu(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Ba&&xa(Ba,a)||(Ba=a,a=Cs($u,"onSelect"),0>=_,s-=_,yn=1<<32-jt(t)+s|n<_e?(ct=Ee,Ee=null):ct=Ee.sibling;var xe=le(ee,Ee,ie[_e],ce);if(xe===null){Ee===null&&(Ee=ct);break}e&&Ee&&xe.alternate===null&&t(ee,Ee),Z=f(xe,Z,_e),je===null?ge=xe:je.sibling=xe,je=xe,Ee=ct}if(_e===ie.length)return n(ee,Ee),Ve&&br(ee,_e),ge;if(Ee===null){for(;_e_e?(ct=Ee,Ee=null):ct=Ee.sibling;var ir=le(ee,Ee,xe.value,ce);if(ir===null){Ee===null&&(Ee=ct);break}e&&Ee&&ir.alternate===null&&t(ee,Ee),Z=f(ir,Z,_e),je===null?ge=ir:je.sibling=ir,je=ir,Ee=ct}if(xe.done)return n(ee,Ee),Ve&&br(ee,_e),ge;if(Ee===null){for(;!xe.done;_e++,xe=ie.next())xe=he(ee,xe.value,ce),xe!==null&&(Z=f(xe,Z,_e),je===null?ge=xe:je.sibling=xe,je=xe);return Ve&&br(ee,_e),ge}for(Ee=a(Ee);!xe.done;_e++,xe=ie.next())xe=oe(Ee,ee,_e,xe.value,ce),xe!==null&&(e&&xe.alternate!==null&&Ee.delete(xe.key===null?_e:xe.key),Z=f(xe,Z,_e),je===null?ge=xe:je.sibling=xe,je=xe);return e&&Ee.forEach(function(eb){return t(ee,eb)}),Ve&&br(ee,_e),ge}function We(ee,Z,ie,ce){if(typeof ie=="object"&&ie!==null&&ie.type===m&&ie.key===null&&(ie=ie.props.children),typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case d:e:{for(var ge=ie.key;Z!==null;){if(Z.key===ge){if(ge=ie.type,ge===m){if(Z.tag===7){n(ee,Z.sibling),ce=s(Z,ie.props.children),ce.return=ee,ee=ce;break e}}else if(Z.elementType===ge||typeof ge=="object"&&ge!==null&&ge.$$typeof===p&&Zd(ge)===Z.type){n(ee,Z.sibling),ce=s(Z,ie.props),Ka(ce,ie),ce.return=ee,ee=ce;break e}n(ee,Z);break}else t(ee,Z);Z=Z.sibling}ie.type===m?(ce=jr(ie.props.children,ee.mode,ce,ie.key),ce.return=ee,ee=ce):(ce=$s(ie.type,ie.key,ie.props,null,ee.mode,ce),Ka(ce,ie),ce.return=ee,ee=ce)}return _(ee);case h:e:{for(ge=ie.key;Z!==null;){if(Z.key===ge)if(Z.tag===4&&Z.stateNode.containerInfo===ie.containerInfo&&Z.stateNode.implementation===ie.implementation){n(ee,Z.sibling),ce=s(Z,ie.children||[]),ce.return=ee,ee=ce;break e}else{n(ee,Z);break}else t(ee,Z);Z=Z.sibling}ce=To(ie,ee.mode,ce),ce.return=ee,ee=ce}return _(ee);case p:return ge=ie._init,ie=ge(ie._payload),We(ee,Z,ie,ce)}if(k(ie))return be(ee,Z,ie,ce);if(v(ie)){if(ge=v(ie),typeof ge!="function")throw Error(l(150));return ie=ge.call(ie),$e(ee,Z,ie,ce)}if(typeof ie.then=="function")return We(ee,Z,is(ie),ce);if(ie.$$typeof===V)return We(ee,Z,_s(ee,ie),ce);ss(ee,ie)}return typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint"?(ie=""+ie,Z!==null&&Z.tag===6?(n(ee,Z.sibling),ce=s(Z,ie),ce.return=ee,ee=ce):(n(ee,Z),ce=Ro(ie,ee.mode,ce),ce.return=ee,ee=ce),_(ee)):n(ee,Z)}return function(ee,Z,ie,ce){try{Pa=0;var ge=We(ee,Z,ie,ce);return ta=null,ge}catch(Ee){if(Ee===Ya)throw Ee;var je=Kt(29,Ee,null,ee.mode);return je.lanes=ce,je.return=ee,je}finally{}}}var _r=Jd(!0),Fd=Jd(!1),na=ae(null),ls=ae(0);function Wd(e,t){e=Tn,B(ls,e),B(na,t),Tn=e|t.baseLanes}function qu(){B(ls,Tn),B(na,na.current)}function Cu(){Tn=ls.current,M(na),M(ls)}var Yt=ae(null),on=null;function Hn(e){var t=e.alternate;B(st,st.current&1),B(Yt,e),on===null&&(t===null||na.current!==null||t.memoizedState!==null)&&(on=e)}function eh(e){if(e.tag===22){if(B(st,st.current),B(Yt,e),on===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(on=e)}}else Gn()}function Gn(){B(st,st.current),B(Yt,Yt.current)}function vn(e){M(Yt),on===e&&(on=null),M(st)}var st=ae(0);function us(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var H0=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},G0=r.unstable_scheduleCallback,I0=r.unstable_NormalPriority,lt={$$typeof:V,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function zu(){return{controller:new H0,data:new Map,refCount:0}}function Xa(e){e.refCount--,e.refCount===0&&G0(I0,function(){e.controller.abort()})}var Qa=null,Uu=0,ra=0,aa=null;function Y0(e,t){if(Qa===null){var n=Qa=[];Uu=0,ra=Io(),aa={status:"pending",value:void 0,then:function(a){n.push(a)}}}return Uu++,t.then(th,th),t}function th(){if(--Uu===0&&Qa!==null){aa!==null&&(aa.status="fulfilled");var e=Qa;Qa=null,ra=0,aa=null;for(var t=0;tf?f:8;var _=D.T,U={};D.T=U,Wu(e,!1,t,n);try{var I=s(),J=D.S;if(J!==null&&J(U,I),I!==null&&typeof I=="object"&&typeof I.then=="function"){var fe=k0(I,a);Fa(e,t,fe,zt(e))}else Fa(e,t,a,zt(e))}catch(he){Fa(e,t,{then:function(){},status:"rejected",reason:he},zt())}finally{T.p=f,D.T=_}}function Z0(){}function Ju(e,t,n,a){if(e.tag!==5)throw Error(l(476));var s=Mh(e).queue;Dh(e,s,t,H,n===null?Z0:function(){return qh(e),n(a)})}function Mh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:H,baseState:H,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:bn,lastRenderedState:H},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:bn,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function qh(e){var t=Mh(e).next.queue;Fa(e,t,{},zt())}function Fu(){return vt(vi)}function Ch(){return at().memoizedState}function zh(){return at().memoizedState}function J0(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=zt();e=Kn(n);var a=Xn(t,e,n);a!==null&&(_t(a,t,n),ti(a,t,n)),t={cache:zu()},e.payload=t;return}t=t.return}}function F0(e,t,n){var a=zt();n={lane:a,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null},gs(e)?Lh(t,n):(n=Tu(e,t,n,a),n!==null&&(_t(n,e,a),Vh(n,t,a)))}function Uh(e,t,n){var a=zt();Fa(e,t,n,a)}function Fa(e,t,n,a){var s={lane:a,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null};if(gs(e))Lh(t,s);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var _=t.lastRenderedState,U=f(_,n);if(s.hasEagerState=!0,s.eagerState=U,Dt(U,_))return es(e,t,s,0),Ke===null&&Wi(),!1}catch{}finally{}if(n=Tu(e,t,s,a),n!==null)return _t(n,e,a),Vh(n,t,a),!0}return!1}function Wu(e,t,n,a){if(a={lane:2,revertLane:Io(),action:a,hasEagerState:!1,eagerState:null,next:null},gs(e)){if(t)throw Error(l(479))}else t=Tu(e,n,a,2),t!==null&&_t(t,e,2)}function gs(e){var t=e.alternate;return e===Te||t!==null&&t===Te}function Lh(e,t){ia=fs=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Vh(e,t,n){if(n&4194176){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,Qc(e,n)}}var fn={readContext:vt,use:hs,useCallback:nt,useContext:nt,useEffect:nt,useImperativeHandle:nt,useLayoutEffect:nt,useInsertionEffect:nt,useMemo:nt,useReducer:nt,useRef:nt,useState:nt,useDebugValue:nt,useDeferredValue:nt,useTransition:nt,useSyncExternalStore:nt,useId:nt};fn.useCacheRefresh=nt,fn.useMemoCache=nt,fn.useHostTransitionStatus=nt,fn.useFormState=nt,fn.useActionState=nt,fn.useOptimistic=nt;var $r={readContext:vt,use:hs,useCallback:function(e,t){return Tt().memoizedState=[e,t===void 0?null:t],e},useContext:vt,useEffect:wh,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,ps(4194308,4,Ah.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ps(4194308,4,e,t)},useInsertionEffect:function(e,t){ps(4,2,e,t)},useMemo:function(e,t){var n=Tt();t=t===void 0?null:t;var a=e();if(wr){Ln(!0);try{e()}finally{Ln(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=Tt();if(n!==void 0){var s=n(t);if(wr){Ln(!0);try{n(t)}finally{Ln(!1)}}}else s=t;return a.memoizedState=a.baseState=s,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:s},a.queue=e,e=e.dispatch=F0.bind(null,Te,e),[a.memoizedState,e]},useRef:function(e){var t=Tt();return e={current:e},t.memoizedState=e},useState:function(e){e=Pu(e);var t=e.queue,n=Uh.bind(null,Te,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Qu,useDeferredValue:function(e,t){var n=Tt();return Zu(n,e,t)},useTransition:function(){var e=Pu(!1);return e=Dh.bind(null,Te,e.queue,!0,!1),Tt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=Te,s=Tt();if(Ve){if(n===void 0)throw Error(l(407));n=n()}else{if(n=t(),Ke===null)throw Error(l(349));Ce&60||lh(a,t,n)}s.memoizedState=n;var f={value:n,getSnapshot:t};return s.queue=f,wh(oh.bind(null,a,f,e),[e]),a.flags|=2048,la(9,uh.bind(null,a,f,n,t),{destroy:void 0},null),n},useId:function(){var e=Tt(),t=Ke.identifierPrefix;if(Ve){var n=gn,a=yn;n=(a&~(1<<32-jt(a)-1)).toString(32)+n,t=":"+t+"R"+n,n=cs++,0 title"))),pt(f,a,n),f[gt]=e,ut(f),a=f;break e;case"link":var _=cp("link","href",s).get(a+(n.href||""));if(_){for(var U=0;U<_.length;U++)if(f=_[U],f.getAttribute("href")===(n.href==null?null:n.href)&&f.getAttribute("rel")===(n.rel==null?null:n.rel)&&f.getAttribute("title")===(n.title==null?null:n.title)&&f.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){_.splice(U,1);break t}}f=s.createElement(a),pt(f,a,n),s.head.appendChild(f);break;case"meta":if(_=cp("meta","content",s).get(a+(n.content||""))){for(U=0;U<_.length;U++)if(f=_[U],f.getAttribute("content")===(n.content==null?null:""+n.content)&&f.getAttribute("name")===(n.name==null?null:n.name)&&f.getAttribute("property")===(n.property==null?null:n.property)&&f.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&f.getAttribute("charset")===(n.charSet==null?null:n.charSet)){_.splice(U,1);break t}}f=s.createElement(a),pt(f,a,n),s.head.appendChild(f);break;default:throw Error(l(468,a))}f[gt]=e,ut(f),a=f}e.stateNode=a}else dp(s,e.type,e.stateNode);else e.stateNode=fp(s,a,e.memoizedProps);else f!==a?(f===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):f.count--,a===null?dp(s,e.type,e.stateNode):fp(s,a,e.memoizedProps)):a===null&&e.stateNode!==null&&dm(e,e.memoizedProps,n.memoizedProps)}break;case 27:if(a&4&&e.alternate===null){s=e.stateNode,f=e.memoizedProps;try{for(var I=s.firstChild;I;){var J=I.nextSibling,fe=I.nodeName;I[ja]||fe==="HEAD"||fe==="BODY"||fe==="SCRIPT"||fe==="STYLE"||fe==="LINK"&&I.rel.toLowerCase()==="stylesheet"||s.removeChild(I),I=J}for(var he=e.type,le=s.attributes;le.length;)s.removeAttributeNode(le[0]);pt(s,he,f),s[gt]=e,s[At]=f}catch(be){Pe(e,e.return,be)}}case 5:if(kt(t,e),Pt(e),a&512&&(Je||n===null||Mt(n,n.return)),e.flags&32){s=e.stateNode;try{kr(s,"")}catch(be){Pe(e,e.return,be)}}a&4&&e.stateNode!=null&&(s=e.memoizedProps,dm(e,s,n!==null?n.memoizedProps:s)),a&1024&&(So=!0);break;case 6:if(kt(t,e),Pt(e),a&4){if(e.stateNode===null)throw Error(l(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(be){Pe(e,e.return,be)}}break;case 3:if(xs=null,s=Wt,Wt=Ls(t.containerInfo),kt(t,e),Wt=s,Pt(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{Si(t.containerInfo)}catch(be){Pe(e,e.return,be)}So&&(So=!1,_m(e));break;case 4:a=Wt,Wt=Ls(e.stateNode.containerInfo),kt(t,e),Pt(e),Wt=a;break;case 12:kt(t,e),Pt(e);break;case 13:kt(t,e),Pt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Mo=dt()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,wo(e,a)));break;case 22:if(a&512&&(Je||n===null||Mt(n,n.return)),I=e.memoizedState!==null,J=n!==null&&n.memoizedState!==null,fe=wn,he=Je,wn=fe||I,Je=he||J,kt(t,e),Je=he,wn=fe,Pt(e),t=e.stateNode,t._current=e,t._visibility&=-3,t._visibility|=t._pendingVisibility&2,a&8192&&(t._visibility=I?t._visibility&-2:t._visibility|1,I&&(t=wn||Je,n===null||J||t||ua(e)),e.memoizedProps===null||e.memoizedProps.mode!=="manual"))e:for(n=null,t=e;;){if(t.tag===5||t.tag===26||t.tag===27){if(n===null){J=n=t;try{if(s=J.stateNode,I)f=s.style,typeof f.setProperty=="function"?f.setProperty("display","none","important"):f.display="none";else{_=J.stateNode,U=J.memoizedProps.style;var oe=U!=null&&U.hasOwnProperty("display")?U.display:null;_.style.display=oe==null||typeof oe=="boolean"?"":(""+oe).trim()}}catch(be){Pe(J,J.return,be)}}}else if(t.tag===6){if(n===null){J=t;try{J.stateNode.nodeValue=I?"":J.memoizedProps}catch(be){Pe(J,J.return,be)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(n=a.retryQueue,n!==null&&(a.retryQueue=null,wo(e,n))));break;case 19:kt(t,e),Pt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,wo(e,a)));break;case 21:break;default:kt(t,e),Pt(e)}}function Pt(e){var t=e.flags;if(t&2){try{if(e.tag!==27){e:{for(var n=e.return;n!==null;){if(hm(n)){var a=n;break e}n=n.return}throw Error(l(160))}switch(a.tag){case 27:var s=a.stateNode,f=Eo(e);Ss(e,f,s);break;case 5:var _=a.stateNode;a.flags&32&&(kr(_,""),a.flags&=-33);var U=Eo(e);Ss(e,U,_);break;case 3:case 4:var I=a.stateNode.containerInfo,J=Eo(e);_o(e,J,I);break;default:throw Error(l(161))}}}catch(fe){Pe(e,e.return,fe)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function _m(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;_m(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function On(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ym(e,t.alternate,t),t=t.sibling}function ua(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Qn(4,t,t.return),ua(t);break;case 1:Mt(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&fm(t,t.return,n),ua(t);break;case 26:case 27:case 5:Mt(t,t.return),ua(t);break;case 22:Mt(t,t.return),t.memoizedState===null&&ua(t);break;default:ua(t)}e=e.sibling}}function Zn(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,s=e,f=t,_=f.flags;switch(f.tag){case 0:case 11:case 15:Zn(s,f,n),ai(4,f);break;case 1:if(Zn(s,f,n),a=f,s=a.stateNode,typeof s.componentDidMount=="function")try{s.componentDidMount()}catch(J){Pe(a,a.return,J)}if(a=f,s=a.updateQueue,s!==null){var U=a.stateNode;try{var I=s.shared.hiddenCallbacks;if(I!==null)for(s.shared.hiddenCallbacks=null,s=0;s<\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof a.is=="string"?s.createElement("select",{is:a.is}):s.createElement("select"),a.multiple?e.multiple=!0:a.size&&(e.size=a.size);break;default:e=typeof a.is=="string"?s.createElement(n,{is:a.is}):s.createElement(n)}}e[gt]=t,e[At]=a;e:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)e.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break e;for(;s.sibling===null;){if(s.return===null||s.return===t)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=e;e:switch(pt(e,n,a),n){case"button":case"input":case"select":case"textarea":e=!!a.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&An(t)}}return Qe(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&An(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(l(166));if(e=X.current,Ha(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,s=Et,s!==null)switch(s.tag){case 27:case 5:a=s.memoizedProps}e[gt]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||Wm(e.nodeValue,n)),e||Er(t)}else e=Us(e).createTextNode(a),e[gt]=t,t.stateNode=e}return Qe(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(s=Ha(t),a!==null&&a.dehydrated!==null){if(e===null){if(!s)throw Error(l(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(l(317));s[gt]=t}else Ga(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Qe(t),s=!1}else Ft!==null&&(Uo(Ft),Ft=null),s=!0;if(!s)return t.flags&256?(vn(t),t):(vn(t),null)}if(vn(t),t.flags&128)return t.lanes=n,t;if(n=a!==null,e=e!==null&&e.memoizedState!==null,n){a=t.child,s=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(s=a.alternate.memoizedState.cachePool.pool);var f=null;a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(f=a.memoizedState.cachePool.pool),f!==s&&(a.flags|=2048)}return n!==e&&n&&(t.child.flags|=8192),Os(t,t.updateQueue),Qe(t),null;case 4:return ye(),e===null&&Ko(t.stateNode.containerInfo),Qe(t),null;case 10:return Sn(t.type),Qe(t),null;case 19:if(M(st),s=t.memoizedState,s===null)return Qe(t),null;if(a=(t.flags&128)!==0,f=s.rendering,f===null)if(a)ui(s,!1);else{if(Fe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(f=us(e),f!==null){for(t.flags|=128,ui(s,!1),e=f.updateQueue,t.updateQueue=e,Os(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Rm(n,e),n=n.sibling;return B(st,st.current&1|2),t.child}e=e.sibling}s.tail!==null&&dt()>As&&(t.flags|=128,a=!0,ui(s,!1),t.lanes=4194304)}else{if(!a)if(e=us(f),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Os(t,e),ui(s,!0),s.tail===null&&s.tailMode==="hidden"&&!f.alternate&&!Ve)return Qe(t),null}else 2*dt()-s.renderingStartTime>As&&n!==536870912&&(t.flags|=128,a=!0,ui(s,!1),t.lanes=4194304);s.isBackwards?(f.sibling=t.child,t.child=f):(e=s.last,e!==null?e.sibling=f:t.child=f,s.last=f)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=dt(),t.sibling=null,e=st.current,B(st,a?e&1|2:e&1),t):(Qe(t),null);case 22:case 23:return vn(t),Cu(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?n&536870912&&!(t.flags&128)&&(Qe(t),t.subtreeFlags&6&&(t.flags|=8192)):Qe(t),n=t.updateQueue,n!==null&&Os(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==n&&(t.flags|=2048),e!==null&&M(Sr),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Sn(lt),Qe(t),null;case 25:return null}throw Error(l(156,t.tag))}function i1(e,t){switch(ju(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Sn(lt),ye(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ie(t),null;case 13:if(vn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(l(340));Ga()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return M(st),null;case 4:return ye(),null;case 10:return Sn(t.type),null;case 22:case 23:return vn(t),Cu(),e!==null&&M(Sr),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Sn(lt),null;case 25:return null;default:return null}}function jm(e,t){switch(ju(t),t.tag){case 3:Sn(lt),ye();break;case 26:case 27:case 5:Ie(t);break;case 4:ye();break;case 13:vn(t);break;case 19:M(st);break;case 10:Sn(t.type);break;case 22:case 23:vn(t),Cu(),e!==null&&M(Sr);break;case 24:Sn(lt)}}var s1={getCacheForType:function(e){var t=vt(lt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n}},l1=typeof WeakMap=="function"?WeakMap:Map,Ze=0,Ke=null,De=null,Ce=0,Xe=0,Ct=null,Rn=!1,ca=!1,No=!1,Tn=0,Fe=0,Wn=0,Dr=0,jo=0,Xt=0,da=0,oi=null,cn=null,Do=!1,Mo=0,As=1/0,Rs=null,er=null,Ts=!1,Mr=null,fi=0,qo=0,Co=null,ci=0,zo=null;function zt(){if(Ze&2&&Ce!==0)return Ce&-Ce;if(D.T!==null){var e=ra;return e!==0?e:Io()}return Jc()}function Dm(){Xt===0&&(Xt=!(Ce&536870912)||Ve?Pc():536870912);var e=Yt.current;return e!==null&&(e.flags|=32),Xt}function _t(e,t,n){(e===Ke&&Xe===2||e.cancelPendingCommit!==null)&&(ha(e,0),Nn(e,Ce,Xt,!1)),Na(e,n),(!(Ze&2)||e!==Ke)&&(e===Ke&&(!(Ze&2)&&(Dr|=n),Fe===4&&Nn(e,Ce,Xt,!1)),dn(e))}function Mm(e,t,n){if(Ze&6)throw Error(l(327));var a=!n&&(t&60)===0&&(t&e.expiredLanes)===0||Ta(e,t),s=a?f1(e,t):xo(e,t,!0),f=a;do{if(s===0){ca&&!a&&Nn(e,t,0,!1);break}else if(s===6)Nn(e,t,0,!Rn);else{if(n=e.current.alternate,f&&!u1(n)){s=xo(e,t,!1),f=!1;continue}if(s===2){if(f=t,e.errorRecoveryDisabledLanes&f)var _=0;else _=e.pendingLanes&-536870913,_=_!==0?_:_&536870912?536870912:0;if(_!==0){t=_;e:{var U=e;s=oi;var I=U.current.memoizedState.isDehydrated;if(I&&(ha(U,_).flags|=256),_=xo(U,_,!1),_!==2){if(No&&!I){U.errorRecoveryDisabledLanes|=f,Dr|=f,s=4;break e}f=cn,cn=s,f!==null&&Uo(f)}s=_}if(f=!1,s!==2)continue}}if(s===1){ha(e,0),Nn(e,t,0,!0);break}e:{switch(a=e,s){case 0:case 1:throw Error(l(345));case 4:if((t&4194176)===t){Nn(a,t,Xt,!Rn);break e}break;case 2:cn=null;break;case 3:case 5:break;default:throw Error(l(329))}if(a.finishedWork=n,a.finishedLanes=t,(t&62914560)===t&&(f=Mo+300-dt(),10n?32:n,D.T=null,Mr===null)var f=!1;else{n=Co,Co=null;var _=Mr,U=fi;if(Mr=null,fi=0,Ze&6)throw Error(l(331));var I=Ze;if(Ze|=4,Om(_.current),Sm(_,_.current,U,n),Ze=I,di(0,!1),Nt&&typeof Nt.onPostCommitFiberRoot=="function")try{Nt.onPostCommitFiberRoot(Ra,_)}catch{}f=!0}return f}finally{T.p=s,D.T=a,Hm(e,t)}}return!1}function Gm(e,t,n){t=Ht(n,t),t=no(e.stateNode,t,2),e=Xn(e,t,2),e!==null&&(Na(e,2),dn(e))}function Pe(e,t,n){if(e.tag===3)Gm(e,e,n);else for(;t!==null;){if(t.tag===3){Gm(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(er===null||!er.has(a))){e=Ht(n,e),n=kh(2),a=Xn(t,n,2),a!==null&&(Ph(n,a,t,e),Na(a,2),dn(a));break}}t=t.return}}function Bo(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new l1;var s=new Set;a.set(t,s)}else s=a.get(t),s===void 0&&(s=new Set,a.set(t,s));s.has(n)||(No=!0,s.add(n),e=h1.bind(null,e,t,n),t.then(e,e))}function h1(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ke===e&&(Ce&n)===n&&(Fe===4||Fe===3&&(Ce&62914560)===Ce&&300>dt()-Mo?!(Ze&2)&&ha(e,0):jo|=n,da===Ce&&(da=0)),dn(e)}function Im(e,t){t===0&&(t=Kc()),e=Bn(e,t),e!==null&&(Na(e,t),dn(e))}function m1(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Im(e,n)}function p1(e,t){var n=0;switch(e.tag){case 13:var a=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(l(314))}a!==null&&a.delete(t),Im(e,n)}function y1(e,t){return Le(e,t)}var Ds=null,ya=null,Ho=!1,Ms=!1,Go=!1,qr=0;function dn(e){e!==ya&&e.next===null&&(ya===null?Ds=ya=e:ya=ya.next=e),Ms=!0,Ho||(Ho=!0,v1(g1))}function di(e,t){if(!Go&&Ms){Go=!0;do for(var n=!1,a=Ds;a!==null;){if(e!==0){var s=a.pendingLanes;if(s===0)var f=0;else{var _=a.suspendedLanes,U=a.pingedLanes;f=(1<<31-jt(42|e)+1)-1,f&=s&~(_&~U),f=f&201326677?f&201326677|1:f?f|2:0}f!==0&&(n=!0,Pm(a,f))}else f=Ce,f=Hi(a,a===Ke?f:0),!(f&3)||Ta(a,f)||(n=!0,Pm(a,f));a=a.next}while(n);Go=!1}}function g1(){Ms=Ho=!1;var e=0;qr!==0&&(A1()&&(e=qr),qr=0);for(var t=dt(),n=null,a=Ds;a!==null;){var s=a.next,f=Ym(a,t);f===0?(a.next=null,n===null?Ds=s:n.next=s,s===null&&(ya=n)):(n=a,(e!==0||f&3)&&(Ms=!0)),a=s}di(e)}function Ym(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,s=e.expirationTimes,f=e.pendingLanes&-62914561;0"u"?null:document;function lp(e,t,n){var a=va;if(a&&typeof t=="string"&&t){var s=xt(t);s='link[rel="'+e+'"][href="'+s+'"]',typeof n=="string"&&(s+='[crossorigin="'+n+'"]'),sp.has(s)||(sp.add(s),e={rel:e,crossOrigin:n,href:t},a.querySelector(s)===null&&(t=a.createElement("link"),pt(t,"link",e),ut(t),a.head.appendChild(t)))}}function C1(e){jn.D(e),lp("dns-prefetch",e,null)}function z1(e,t){jn.C(e,t),lp("preconnect",e,t)}function U1(e,t,n){jn.L(e,t,n);var a=va;if(a&&e&&t){var s='link[rel="preload"][as="'+xt(t)+'"]';t==="image"&&n&&n.imageSrcSet?(s+='[imagesrcset="'+xt(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(s+='[imagesizes="'+xt(n.imageSizes)+'"]')):s+='[href="'+xt(e)+'"]';var f=s;switch(t){case"style":f=ba(e);break;case"script":f=Ea(e)}Qt.has(f)||(e=j({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Qt.set(f,e),a.querySelector(s)!==null||t==="style"&&a.querySelector(pi(f))||t==="script"&&a.querySelector(yi(f))||(t=a.createElement("link"),pt(t,"link",e),ut(t),a.head.appendChild(t)))}}function L1(e,t){jn.m(e,t);var n=va;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",s='link[rel="modulepreload"][as="'+xt(a)+'"][href="'+xt(e)+'"]',f=s;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=Ea(e)}if(!Qt.has(f)&&(e=j({rel:"modulepreload",href:e},t),Qt.set(f,e),n.querySelector(s)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(yi(f)))return}a=n.createElement("link"),pt(a,"link",e),ut(a),n.head.appendChild(a)}}}function V1(e,t,n){jn.S(e,t,n);var a=va;if(a&&e){var s=Gr(a).hoistableStyles,f=ba(e);t=t||"default";var _=s.get(f);if(!_){var U={loading:0,preload:null};if(_=a.querySelector(pi(f)))U.loading=5;else{e=j({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Qt.get(f))&&nf(e,n);var I=_=a.createElement("link");ut(I),pt(I,"link",e),I._p=new Promise(function(J,fe){I.onload=J,I.onerror=fe}),I.addEventListener("load",function(){U.loading|=1}),I.addEventListener("error",function(){U.loading|=2}),U.loading|=4,Vs(_,t,a)}_={type:"stylesheet",instance:_,count:1,state:U},s.set(f,_)}}}function x1(e,t){jn.X(e,t);var n=va;if(n&&e){var a=Gr(n).hoistableScripts,s=Ea(e),f=a.get(s);f||(f=n.querySelector(yi(s)),f||(e=j({src:e,async:!0},t),(t=Qt.get(s))&&rf(e,t),f=n.createElement("script"),ut(f),pt(f,"link",e),n.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},a.set(s,f))}}function B1(e,t){jn.M(e,t);var n=va;if(n&&e){var a=Gr(n).hoistableScripts,s=Ea(e),f=a.get(s);f||(f=n.querySelector(yi(s)),f||(e=j({src:e,async:!0,type:"module"},t),(t=Qt.get(s))&&rf(e,t),f=n.createElement("script"),ut(f),pt(f,"link",e),n.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},a.set(s,f))}}function up(e,t,n,a){var s=(s=X.current)?Ls(s):null;if(!s)throw Error(l(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=ba(n.href),n=Gr(s).hoistableStyles,a=n.get(t),a||(a={type:"style",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=ba(n.href);var f=Gr(s).hoistableStyles,_=f.get(e);if(_||(s=s.ownerDocument||s,_={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,_),(f=s.querySelector(pi(e)))&&!f._p&&(_.instance=f,_.state.loading=5),Qt.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Qt.set(e,n),f||H1(s,e,n,_.state))),t&&a===null)throw Error(l(528,""));return _}if(t&&a!==null)throw Error(l(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ea(n),n=Gr(s).hoistableScripts,a=n.get(t),a||(a={type:"script",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,e))}}function ba(e){return'href="'+xt(e)+'"'}function pi(e){return'link[rel="stylesheet"]['+e+"]"}function op(e){return j({},e,{"data-precedence":e.precedence,precedence:null})}function H1(e,t,n,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),pt(t,"link",n),ut(t),e.head.appendChild(t))}function Ea(e){return'[src="'+xt(e)+'"]'}function yi(e){return"script[async]"+e}function fp(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+xt(n.href)+'"]');if(a)return t.instance=a,ut(a),a;var s=j({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),ut(a),pt(a,"style",s),Vs(a,n.precedence,e),t.instance=a;case"stylesheet":s=ba(n.href);var f=e.querySelector(pi(s));if(f)return t.state.loading|=4,t.instance=f,ut(f),f;a=op(n),(s=Qt.get(s))&&nf(a,s),f=(e.ownerDocument||e).createElement("link"),ut(f);var _=f;return _._p=new Promise(function(U,I){_.onload=U,_.onerror=I}),pt(f,"link",a),t.state.loading|=4,Vs(f,n.precedence,e),t.instance=f;case"script":return f=Ea(n.src),(s=e.querySelector(yi(f)))?(t.instance=s,ut(s),s):(a=n,(s=Qt.get(f))&&(a=j({},n),rf(a,s)),e=e.ownerDocument||e,s=e.createElement("script"),ut(s),pt(s,"link",a),e.head.appendChild(s),t.instance=s);case"void":return null;default:throw Error(l(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(a=t.instance,t.state.loading|=4,Vs(a,n.precedence,e));return t.instance}function Vs(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=a.length?a[a.length-1]:null,f=s,_=0;_ title"):null)}function G1(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function hp(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}var gi=null;function I1(){}function Y1(e,t,n){if(gi===null)throw Error(l(475));var a=gi;if(t.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&!(t.state.loading&4)){if(t.instance===null){var s=ba(n.href),f=e.querySelector(pi(s));if(f){e=f._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(a.count++,a=Bs.bind(a),e.then(a,a)),t.state.loading|=4,t.instance=f,ut(f);return}f=e.ownerDocument||e,n=op(n),(s=Qt.get(s))&&nf(n,s),f=f.createElement("link"),ut(f);var _=f;_._p=new Promise(function(U,I){_.onload=U,_.onerror=I}),pt(f,"link",n),t.instance=f}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(t,e),(e=t.state.preload)&&!(t.state.loading&3)&&(a.count++,t=Bs.bind(a),e.addEventListener("load",t),e.addEventListener("error",t))}}function k1(){if(gi===null)throw Error(l(475));var e=gi;return e.stylesheets&&e.count===0&&af(e,e.stylesheets),0"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(i){console.error(i)}}return r(),mf.exports=ub(),mf.exports}var fb=ob();const cb=Xl(fb);var db=typeof window<"u",hb=function(r,i){return db?window.matchMedia(r).matches:!1},mb=function(r,i){var u=ve.useState(hb(r)),l=u[0],c=u[1];return ve.useEffect(function(){var o=!0,d=window.matchMedia(r),h=function(){o&&c(!!d.matches)};return d.addEventListener("change",h),c(d.matches),function(){o=!1,d.removeEventListener("change",h)}},[r]),l},Cn={STATIC:"STATIC",DEFAULT:"DEFAULT",TARGETING_MATCH:"TARGETING_MATCH",SPLIT:"SPLIT",CACHED:"CACHED",DISABLED:"DISABLED",UNKNOWN:"UNKNOWN",STALE:"STALE",ERROR:"ERROR"},Vr=(r=>(r.PROVIDER_NOT_READY="PROVIDER_NOT_READY",r.PROVIDER_FATAL="PROVIDER_FATAL",r.FLAG_NOT_FOUND="FLAG_NOT_FOUND",r.PARSE_ERROR="PARSE_ERROR",r.TYPE_MISMATCH="TYPE_MISMATCH",r.TARGETING_KEY_MISSING="TARGETING_KEY_MISSING",r.INVALID_CONTEXT="INVALID_CONTEXT",r.GENERAL="GENERAL",r))(Vr||{}),pb=class sv extends Error{constructor(i,u){super(i),Object.setPrototypeOf(this,sv.prototype),this.name="OpenFeatureError",this.cause=u==null?void 0:u.cause}},$a=class lv extends pb{constructor(i,u){super(i,u),Object.setPrototypeOf(this,lv.prototype),this.name="ParseError",this.code="PARSE_ERROR"}},uv=class{error(...r){console.error(...r)}warn(...r){console.warn(...r)}info(){}debug(){}},yb=["error","warn","info","debug"],gb=class{constructor(r){this.fallbackLogger=new uv;try{for(const i of yb)if(!r[i]||typeof r[i]!="function")throw new Error(`The provided logger is missing the ${i} method.`);this.logger=r}catch(i){console.error(i),console.error("Falling back to the default logger."),this.logger=this.fallbackLogger}}error(...r){this.log("error",...r)}warn(...r){this.log("warn",...r)}info(...r){this.log("info",...r)}debug(...r){this.log("debug",...r)}log(r,...i){try{this.logger[r](...i)}catch{this.fallbackLogger[r](...i)}}},Qs={exports:{}},vf={},Dn={},Cr={},bf={},Ef={},_f={},zp;function Bl(){return zp||(zp=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.regexpCode=r.getEsmExportName=r.getProperty=r.safeStringify=r.stringify=r.strConcat=r.addCodeArg=r.str=r._=r.nil=r._Code=r.Name=r.IDENTIFIER=r._CodeOrName=void 0;class i{}r._CodeOrName=i,r.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class u extends i{constructor(p){if(super(),!r.IDENTIFIER.test(p))throw new Error("CodeGen: name must be a valid identifier");this.str=p}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}r.Name=u;class l extends i{constructor(p){super(),this._items=typeof p=="string"?[p]:p}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const p=this._items[0];return p===""||p==='""'}get str(){var p;return(p=this._str)!==null&&p!==void 0?p:this._str=this._items.reduce((b,E)=>`${b}${E}`,"")}get names(){var p;return(p=this._names)!==null&&p!==void 0?p:this._names=this._items.reduce((b,E)=>(E instanceof u&&(b[E.str]=(b[E.str]||0)+1),b),{})}}r._Code=l,r.nil=new l("");function c(w,...p){const b=[w[0]];let E=0;for(;E{if(N.scopePath===void 0)throw new Error(`CodeGen: name "${N}" has no value`);return(0,i._)`${y}${N.scopePath}`})}scopeCode(y=this._values,S,N){return this._reduceValues(y,x=>{if(x.value===void 0)throw new Error(`CodeGen: name "${x}" has no value`);return x.value.code},S,N)}_reduceValues(y,S,N={},x){let V=i.nil;for(const L in y){const C=y[L];if(!C)continue;const g=N[L]=N[L]||new Map;C.forEach(w=>{if(g.has(w))return;g.set(w,l.Started);let p=S(w);if(p){const b=this.opts.es5?r.varKinds.var:r.varKinds.const;V=(0,i._)`${V}${b} ${w} = ${p};${this.opts._n}`}else if(p=x==null?void 0:x(w))V=(0,i._)`${V}${p}${this.opts._n}`;else throw new u(w);g.set(w,l.Completed)})}return V}}r.ValueScope=h}(Sf)),Sf}var Vp;function Me(){return Vp||(Vp=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.or=r.and=r.not=r.CodeGen=r.operators=r.varKinds=r.ValueScopeName=r.ValueScope=r.Scope=r.Name=r.regexpCode=r.stringify=r.getProperty=r.nil=r.strConcat=r.str=r._=void 0;const i=Bl(),u=Lp();var l=Bl();Object.defineProperty(r,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(r,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(r,"strConcat",{enumerable:!0,get:function(){return l.strConcat}}),Object.defineProperty(r,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(r,"getProperty",{enumerable:!0,get:function(){return l.getProperty}}),Object.defineProperty(r,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(r,"regexpCode",{enumerable:!0,get:function(){return l.regexpCode}}),Object.defineProperty(r,"Name",{enumerable:!0,get:function(){return l.Name}});var c=Lp();Object.defineProperty(r,"Scope",{enumerable:!0,get:function(){return c.Scope}}),Object.defineProperty(r,"ValueScope",{enumerable:!0,get:function(){return c.ValueScope}}),Object.defineProperty(r,"ValueScopeName",{enumerable:!0,get:function(){return c.ValueScopeName}}),Object.defineProperty(r,"varKinds",{enumerable:!0,get:function(){return c.varKinds}}),r.operators={GT:new i._Code(">"),GTE:new i._Code(">="),LT:new i._Code("<"),LTE:new i._Code("<="),EQ:new i._Code("==="),NEQ:new i._Code("!=="),NOT:new i._Code("!"),OR:new i._Code("||"),AND:new i._Code("&&"),ADD:new i._Code("+")};class o{optimizeNodes(){return this}optimizeNames(T,H){return this}}class d extends o{constructor(T,H,te){super(),this.varKind=T,this.name=H,this.rhs=te}render({es5:T,_n:H}){const te=T?u.varKinds.var:this.varKind,pe=this.rhs===void 0?"":` = ${this.rhs}`;return`${te} ${this.name}${pe};`+H}optimizeNames(T,H){if(T[this.name.str])return this.rhs&&(this.rhs=F(this.rhs,T,H)),this}get names(){return this.rhs instanceof i._CodeOrName?this.rhs.names:{}}}class h extends o{constructor(T,H,te){super(),this.lhs=T,this.rhs=H,this.sideEffects=te}render({_n:T}){return`${this.lhs} = ${this.rhs};`+T}optimizeNames(T,H){if(!(this.lhs instanceof i.Name&&!T[this.lhs.str]&&!this.sideEffects))return this.rhs=F(this.rhs,T,H),this}get names(){const T=this.lhs instanceof i.Name?{}:{...this.lhs.names};return W(T,this.rhs)}}class m extends h{constructor(T,H,te,pe){super(T,te,pe),this.op=H}render({_n:T}){return`${this.lhs} ${this.op}= ${this.rhs};`+T}}class y extends o{constructor(T){super(),this.label=T,this.names={}}render({_n:T}){return`${this.label}:`+T}}class S extends o{constructor(T){super(),this.label=T,this.names={}}render({_n:T}){return`break${this.label?` ${this.label}`:""};`+T}}class N extends o{constructor(T){super(),this.error=T}render({_n:T}){return`throw ${this.error};`+T}get names(){return this.error.names}}class x extends o{constructor(T){super(),this.code=T}render({_n:T}){return`${this.code};`+T}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(T,H){return this.code=F(this.code,T,H),this}get names(){return this.code instanceof i._CodeOrName?this.code.names:{}}}class V extends o{constructor(T=[]){super(),this.nodes=T}render(T){return this.nodes.reduce((H,te)=>H+te.render(T),"")}optimizeNodes(){const{nodes:T}=this;let H=T.length;for(;H--;){const te=T[H].optimizeNodes();Array.isArray(te)?T.splice(H,1,...te):te?T[H]=te:T.splice(H,1)}return T.length>0?this:void 0}optimizeNames(T,H){const{nodes:te}=this;let pe=te.length;for(;pe--;){const ae=te[pe];ae.optimizeNames(T,H)||(ne(T,ae.names),te.splice(pe,1))}return te.length>0?this:void 0}get names(){return this.nodes.reduce((T,H)=>Q(T,H.names),{})}}class L extends V{render(T){return"{"+T._n+super.render(T)+"}"+T._n}}class C extends V{}class g extends L{}g.kind="else";class w extends L{constructor(T,H){super(H),this.condition=T}render(T){let H=`if(${this.condition})`+super.render(T);return this.else&&(H+="else "+this.else.render(T)),H}optimizeNodes(){super.optimizeNodes();const T=this.condition;if(T===!0)return this.nodes;let H=this.else;if(H){const te=H.optimizeNodes();H=this.else=Array.isArray(te)?new g(te):te}if(H)return T===!1?H instanceof w?H:H.nodes:this.nodes.length?this:new w(P(T),H instanceof w?[H]:H.nodes);if(!(T===!1||!this.nodes.length))return this}optimizeNames(T,H){var te;if(this.else=(te=this.else)===null||te===void 0?void 0:te.optimizeNames(T,H),!!(super.optimizeNames(T,H)||this.else))return this.condition=F(this.condition,T,H),this}get names(){const T=super.names;return W(T,this.condition),this.else&&Q(T,this.else.names),T}}w.kind="if";class p extends L{}p.kind="for";class b extends p{constructor(T){super(),this.iteration=T}render(T){return`for(${this.iteration})`+super.render(T)}optimizeNames(T,H){if(super.optimizeNames(T,H))return this.iteration=F(this.iteration,T,H),this}get names(){return Q(super.names,this.iteration.names)}}class E extends p{constructor(T,H,te,pe){super(),this.varKind=T,this.name=H,this.from=te,this.to=pe}render(T){const H=T.es5?u.varKinds.var:this.varKind,{name:te,from:pe,to:ae}=this;return`for(${H} ${te}=${pe}; ${te}<${ae}; ${te}++)`+super.render(T)}get names(){const T=W(super.names,this.from);return W(T,this.to)}}class O extends p{constructor(T,H,te,pe){super(),this.loop=T,this.varKind=H,this.name=te,this.iterable=pe}render(T){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(T)}optimizeNames(T,H){if(super.optimizeNames(T,H))return this.iterable=F(this.iterable,T,H),this}get names(){return Q(super.names,this.iterable.names)}}class v extends L{constructor(T,H,te){super(),this.name=T,this.args=H,this.async=te}render(T){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(T)}}v.kind="func";class A extends V{render(T){return"return "+super.render(T)}}A.kind="return";class $ extends L{render(T){let H="try"+super.render(T);return this.catch&&(H+=this.catch.render(T)),this.finally&&(H+=this.finally.render(T)),H}optimizeNodes(){var T,H;return super.optimizeNodes(),(T=this.catch)===null||T===void 0||T.optimizeNodes(),(H=this.finally)===null||H===void 0||H.optimizeNodes(),this}optimizeNames(T,H){var te,pe;return super.optimizeNames(T,H),(te=this.catch)===null||te===void 0||te.optimizeNames(T,H),(pe=this.finally)===null||pe===void 0||pe.optimizeNames(T,H),this}get names(){const T=super.names;return this.catch&&Q(T,this.catch.names),this.finally&&Q(T,this.finally.names),T}}class D extends L{constructor(T){super(),this.error=T}render(T){return`catch(${this.error})`+super.render(T)}}D.kind="catch";class j extends L{render(T){return"finally"+super.render(T)}}j.kind="finally";class Y{constructor(T,H={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...H,_n:H.lines?` `:""},this._extScope=T,this._scope=new u.Scope({parent:T}),this._nodes=[new C]}toString(){return this._root.render(this.opts)}name(T){return this._scope.name(T)}scopeName(T){return this._extScope.name(T)}scopeValue(T,H){const te=this._extScope.value(T,H);return(this._values[te.prefix]||(this._values[te.prefix]=new Set)).add(te),te}getScopeValue(T,H){return this._extScope.getValue(T,H)}scopeRefs(T){return this._extScope.scopeRefs(T,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(T,H,te,pe){const ae=this._scope.toName(H);return te!==void 0&&pe&&(this._constants[ae.str]=te),this._leafNode(new d(T,ae,te)),ae}const(T,H,te){return this._def(u.varKinds.const,T,H,te)}let(T,H,te){return this._def(u.varKinds.let,T,H,te)}var(T,H,te){return this._def(u.varKinds.var,T,H,te)}assign(T,H,te){return this._leafNode(new h(T,H,te))}add(T,H){return this._leafNode(new m(T,r.operators.ADD,H))}code(T){return typeof T=="function"?T():T!==i.nil&&this._leafNode(new x(T)),this}object(...T){const H=["{"];for(const[te,pe]of T)H.length>1&&H.push(","),H.push(te),(te!==pe||this.opts.es5)&&(H.push(":"),(0,i.addCodeArg)(H,pe));return H.push("}"),new i._Code(H)}if(T,H,te){if(this._blockNode(new w(T)),H&&te)this.code(H).else().code(te).endIf();else if(H)this.code(H).endIf();else if(te)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(T){return this._elseNode(new w(T))}else(){return this._elseNode(new g)}endIf(){return this._endBlockNode(w,g)}_for(T,H){return this._blockNode(T),H&&this.code(H).endFor(),this}for(T,H){return this._for(new b(T),H)}forRange(T,H,te,pe,ae=this.opts.es5?u.varKinds.var:u.varKinds.let){const M=this._scope.toName(T);return this._for(new E(ae,M,H,te),()=>pe(M))}forOf(T,H,te,pe=u.varKinds.const){const ae=this._scope.toName(T);if(this.opts.es5){const M=H instanceof i.Name?H:this.var("_arr",H);return this.forRange("_i",0,(0,i._)`${M}.length`,B=>{this.var(ae,(0,i._)`${M}[${B}]`),te(ae)})}return this._for(new O("of",pe,ae,H),()=>te(ae))}forIn(T,H,te,pe=this.opts.es5?u.varKinds.var:u.varKinds.const){if(this.opts.ownProperties)return this.forOf(T,(0,i._)`Object.keys(${H})`,te);const ae=this._scope.toName(T);return this._for(new O("in",pe,ae,H),()=>te(ae))}endFor(){return this._endBlockNode(p)}label(T){return this._leafNode(new y(T))}break(T){return this._leafNode(new S(T))}return(T){const H=new A;if(this._blockNode(H),this.code(T),H.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(A)}try(T,H,te){if(!H&&!te)throw new Error('CodeGen: "try" without "catch" and "finally"');const pe=new $;if(this._blockNode(pe),this.code(T),H){const ae=this.name("e");this._currNode=pe.catch=new D(ae),H(ae)}return te&&(this._currNode=pe.finally=new j,this.code(te)),this._endBlockNode(D,j)}throw(T){return this._leafNode(new N(T))}block(T,H){return this._blockStarts.push(this._nodes.length),T&&this.code(T).endBlock(H),this}endBlock(T){const H=this._blockStarts.pop();if(H===void 0)throw new Error("CodeGen: not in self-balancing block");const te=this._nodes.length-H;if(te<0||T!==void 0&&te!==T)throw new Error(`CodeGen: wrong number of nodes: ${te} vs ${T} expected`);return this._nodes.length=H,this}func(T,H=i.nil,te,pe){return this._blockNode(new v(T,H,te)),pe&&this.code(pe).endFunc(),this}endFunc(){return this._endBlockNode(v)}optimize(T=1){for(;T-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(T){return this._currNode.nodes.push(T),this}_blockNode(T){this._currNode.nodes.push(T),this._nodes.push(T)}_endBlockNode(T,H){const te=this._currNode;if(te instanceof T||H&&te instanceof H)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${H?`${T.kind}/${H.kind}`:T.kind}"`)}_elseNode(T){const H=this._currNode;if(!(H instanceof w))throw new Error('CodeGen: "else" without "if"');return this._currNode=H.else=T,this}get _root(){return this._nodes[0]}get _currNode(){const T=this._nodes;return T[T.length-1]}set _currNode(T){const H=this._nodes;H[H.length-1]=T}}r.CodeGen=Y;function Q(k,T){for(const H in T)k[H]=(k[H]||0)+(T[H]||0);return k}function W(k,T){return T instanceof i._CodeOrName?Q(k,T.names):k}function F(k,T,H){if(k instanceof i.Name)return te(k);if(!pe(k))return k;return new i._Code(k._items.reduce((ae,M)=>(M instanceof i.Name&&(M=te(M)),M instanceof i._Code?ae.push(...M._items):ae.push(M),ae),[]));function te(ae){const M=H[ae.str];return M===void 0||T[ae.str]!==1?ae:(delete T[ae.str],M)}function pe(ae){return ae instanceof i._Code&&ae._items.some(M=>M instanceof i.Name&&T[M.str]===1&&H[M.str]!==void 0)}}function ne(k,T){for(const H in T)k[H]=(k[H]||0)-(T[H]||0)}function P(k){return typeof k=="boolean"||typeof k=="number"||k===null?!k:(0,i._)`!${K(k)}`}r.not=P;const ue=z(r.operators.AND);function re(...k){return k.reduce(ue)}r.and=re;const de=z(r.operators.OR);function R(...k){return k.reduce(de)}r.or=R;function z(k){return(T,H)=>T===i.nil?H:H===i.nil?T:(0,i._)`${K(T)} ${k} ${K(H)}`}function K(k){return k instanceof i.Name?k:(0,i._)`(${k})`}}(Ef)),Ef}var Ne={},xp;function Be(){if(xp)return Ne;xp=1,Object.defineProperty(Ne,"__esModule",{value:!0}),Ne.checkStrictMode=Ne.getErrorPath=Ne.Type=Ne.useFunc=Ne.setEvaluated=Ne.evaluatedPropsToName=Ne.mergeEvaluated=Ne.eachItem=Ne.unescapeJsonPointer=Ne.escapeJsonPointer=Ne.escapeFragment=Ne.unescapeFragment=Ne.schemaRefOrVal=Ne.schemaHasRulesButRef=Ne.schemaHasRules=Ne.checkUnknownRules=Ne.alwaysValidSchema=Ne.toHash=void 0;const r=Me(),i=Bl();function u(O){const v={};for(const A of O)v[A]=!0;return v}Ne.toHash=u;function l(O,v){return typeof v=="boolean"?v:Object.keys(v).length===0?!0:(c(O,v),!o(v,O.self.RULES.all))}Ne.alwaysValidSchema=l;function c(O,v=O.schema){const{opts:A,self:$}=O;if(!A.strictSchema||typeof v=="boolean")return;const D=$.RULES.keywords;for(const j in v)D[j]||E(O,`unknown keyword: "${j}"`)}Ne.checkUnknownRules=c;function o(O,v){if(typeof O=="boolean")return!O;for(const A in O)if(v[A])return!0;return!1}Ne.schemaHasRules=o;function d(O,v){if(typeof O=="boolean")return!O;for(const A in O)if(A!=="$ref"&&v.all[A])return!0;return!1}Ne.schemaHasRulesButRef=d;function h({topSchemaRef:O,schemaPath:v},A,$,D){if(!D){if(typeof A=="number"||typeof A=="boolean")return A;if(typeof A=="string")return(0,r._)`${A}`}return(0,r._)`${O}${v}${(0,r.getProperty)($)}`}Ne.schemaRefOrVal=h;function m(O){return N(decodeURIComponent(O))}Ne.unescapeFragment=m;function y(O){return encodeURIComponent(S(O))}Ne.escapeFragment=y;function S(O){return typeof O=="number"?`${O}`:O.replace(/~/g,"~0").replace(/\//g,"~1")}Ne.escapeJsonPointer=S;function N(O){return O.replace(/~1/g,"/").replace(/~0/g,"~")}Ne.unescapeJsonPointer=N;function x(O,v){if(Array.isArray(O))for(const A of O)v(A);else v(O)}Ne.eachItem=x;function V({mergeNames:O,mergeToName:v,mergeValues:A,resultToName:$}){return(D,j,Y,Q)=>{const W=Y===void 0?j:Y instanceof r.Name?(j instanceof r.Name?O(D,j,Y):v(D,j,Y),Y):j instanceof r.Name?(v(D,Y,j),j):A(j,Y);return Q===r.Name&&!(W instanceof r.Name)?$(D,W):W}}Ne.mergeEvaluated={props:V({mergeNames:(O,v,A)=>O.if((0,r._)`${A} !== true && ${v} !== undefined`,()=>{O.if((0,r._)`${v} === true`,()=>O.assign(A,!0),()=>O.assign(A,(0,r._)`${A} || {}`).code((0,r._)`Object.assign(${A}, ${v})`))}),mergeToName:(O,v,A)=>O.if((0,r._)`${A} !== true`,()=>{v===!0?O.assign(A,!0):(O.assign(A,(0,r._)`${A} || {}`),C(O,A,v))}),mergeValues:(O,v)=>O===!0?!0:{...O,...v},resultToName:L}),items:V({mergeNames:(O,v,A)=>O.if((0,r._)`${A} !== true && ${v} !== undefined`,()=>O.assign(A,(0,r._)`${v} === true ? true : ${A} > ${v} ? ${A} : ${v}`)),mergeToName:(O,v,A)=>O.if((0,r._)`${A} !== true`,()=>O.assign(A,v===!0?!0:(0,r._)`${A} > ${v} ? ${A} : ${v}`)),mergeValues:(O,v)=>O===!0?!0:Math.max(O,v),resultToName:(O,v)=>O.var("items",v)})};function L(O,v){if(v===!0)return O.var("props",!0);const A=O.var("props",(0,r._)`{}`);return v!==void 0&&C(O,A,v),A}Ne.evaluatedPropsToName=L;function C(O,v,A){Object.keys(A).forEach($=>O.assign((0,r._)`${v}${(0,r.getProperty)($)}`,!0))}Ne.setEvaluated=C;const g={};function w(O,v){return O.scopeValue("func",{ref:v,code:g[v.code]||(g[v.code]=new i._Code(v.code))})}Ne.useFunc=w;var p;(function(O){O[O.Num=0]="Num",O[O.Str=1]="Str"})(p||(Ne.Type=p={}));function b(O,v,A){if(O instanceof r.Name){const $=v===p.Num;return A?$?(0,r._)`"[" + ${O} + "]"`:(0,r._)`"['" + ${O} + "']"`:$?(0,r._)`"/" + ${O}`:(0,r._)`"/" + ${O}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return A?(0,r.getProperty)(O).toString():"/"+S(O)}Ne.getErrorPath=b;function E(O,v,A=O.opts.strictSchema){if(A){if(v=`strict mode: ${v}`,A===!0)throw new Error(v);O.self.logger.warn(v)}}return Ne.checkStrictMode=E,Ne}var Zs={},Bp;function fr(){if(Bp)return Zs;Bp=1,Object.defineProperty(Zs,"__esModule",{value:!0});const r=Me(),i={data:new r.Name("data"),valCxt:new r.Name("valCxt"),instancePath:new r.Name("instancePath"),parentData:new r.Name("parentData"),parentDataProperty:new r.Name("parentDataProperty"),rootData:new r.Name("rootData"),dynamicAnchors:new r.Name("dynamicAnchors"),vErrors:new r.Name("vErrors"),errors:new r.Name("errors"),this:new r.Name("this"),self:new r.Name("self"),scope:new r.Name("scope"),json:new r.Name("json"),jsonPos:new r.Name("jsonPos"),jsonLen:new r.Name("jsonLen"),jsonPart:new r.Name("jsonPart")};return Zs.default=i,Zs}var Hp;function Ql(){return Hp||(Hp=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.extendErrors=r.resetErrorsCount=r.reportExtraError=r.reportError=r.keyword$DataError=r.keywordError=void 0;const i=Me(),u=Be(),l=fr();r.keywordError={message:({keyword:g})=>(0,i.str)`must pass "${g}" keyword validation`},r.keyword$DataError={message:({keyword:g,schemaType:w})=>w?(0,i.str)`"${g}" keyword must be ${w} ($data)`:(0,i.str)`"${g}" keyword is invalid ($data)`};function c(g,w=r.keywordError,p,b){const{it:E}=g,{gen:O,compositeRule:v,allErrors:A}=E,$=N(g,w,p);b??(v||A)?m(O,$):y(E,(0,i._)`[${$}]`)}r.reportError=c;function o(g,w=r.keywordError,p){const{it:b}=g,{gen:E,compositeRule:O,allErrors:v}=b,A=N(g,w,p);m(E,A),O||v||y(b,l.default.vErrors)}r.reportExtraError=o;function d(g,w){g.assign(l.default.errors,w),g.if((0,i._)`${l.default.vErrors} !== null`,()=>g.if(w,()=>g.assign((0,i._)`${l.default.vErrors}.length`,w),()=>g.assign(l.default.vErrors,null)))}r.resetErrorsCount=d;function h({gen:g,keyword:w,schemaValue:p,data:b,errsCount:E,it:O}){if(E===void 0)throw new Error("ajv implementation error");const v=g.name("err");g.forRange("i",E,l.default.errors,A=>{g.const(v,(0,i._)`${l.default.vErrors}[${A}]`),g.if((0,i._)`${v}.instancePath === undefined`,()=>g.assign((0,i._)`${v}.instancePath`,(0,i.strConcat)(l.default.instancePath,O.errorPath))),g.assign((0,i._)`${v}.schemaPath`,(0,i.str)`${O.errSchemaPath}/${w}`),O.opts.verbose&&(g.assign((0,i._)`${v}.schema`,p),g.assign((0,i._)`${v}.data`,b))})}r.extendErrors=h;function m(g,w){const p=g.const("err",w);g.if((0,i._)`${l.default.vErrors} === null`,()=>g.assign(l.default.vErrors,(0,i._)`[${p}]`),(0,i._)`${l.default.vErrors}.push(${p})`),g.code((0,i._)`${l.default.errors}++`)}function y(g,w){const{gen:p,validateName:b,schemaEnv:E}=g;E.$async?p.throw((0,i._)`new ${g.ValidationError}(${w})`):(p.assign((0,i._)`${b}.errors`,w),p.return(!1))}const S={keyword:new i.Name("keyword"),schemaPath:new i.Name("schemaPath"),params:new i.Name("params"),propertyName:new i.Name("propertyName"),message:new i.Name("message"),schema:new i.Name("schema"),parentSchema:new i.Name("parentSchema")};function N(g,w,p){const{createErrors:b}=g.it;return b===!1?(0,i._)`{}`:x(g,w,p)}function x(g,w,p={}){const{gen:b,it:E}=g,O=[V(E,p),L(g,p)];return C(g,w,O),b.object(...O)}function V({errorPath:g},{instancePath:w}){const p=w?(0,i.str)`${g}${(0,u.getErrorPath)(w,u.Type.Str)}`:g;return[l.default.instancePath,(0,i.strConcat)(l.default.instancePath,p)]}function L({keyword:g,it:{errSchemaPath:w}},{schemaPath:p,parentSchema:b}){let E=b?w:(0,i.str)`${w}/${g}`;return p&&(E=(0,i.str)`${E}${(0,u.getErrorPath)(p,u.Type.Str)}`),[S.schemaPath,E]}function C(g,{params:w,message:p},b){const{keyword:E,data:O,schemaValue:v,it:A}=g,{opts:$,propertyName:D,topSchemaRef:j,schemaPath:Y}=A;b.push([S.keyword,E],[S.params,typeof w=="function"?w(g):w||(0,i._)`{}`]),$.messages&&b.push([S.message,typeof p=="function"?p(g):p]),$.verbose&&b.push([S.schema,v],[S.parentSchema,(0,i._)`${j}${Y}`],[l.default.data,O]),D&&b.push([S.propertyName,D])}}(bf)),bf}var Gp;function vb(){if(Gp)return Cr;Gp=1,Object.defineProperty(Cr,"__esModule",{value:!0}),Cr.boolOrEmptySchema=Cr.topBoolOrEmptySchema=void 0;const r=Ql(),i=Me(),u=fr(),l={message:"boolean schema is false"};function c(h){const{gen:m,schema:y,validateName:S}=h;y===!1?d(h,!1):typeof y=="object"&&y.$async===!0?m.return(u.default.data):(m.assign((0,i._)`${S}.errors`,null),m.return(!0))}Cr.topBoolOrEmptySchema=c;function o(h,m){const{gen:y,schema:S}=h;S===!1?(y.var(m,!1),d(h)):y.var(m,!0)}Cr.boolOrEmptySchema=o;function d(h,m){const{gen:y,data:S}=h,N={gen:y,keyword:"false schema",data:S,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:h};(0,r.reportError)(N,l,void 0,m)}return Cr}var yt={},zr={},Ip;function ov(){if(Ip)return zr;Ip=1,Object.defineProperty(zr,"__esModule",{value:!0}),zr.getRules=zr.isJSONType=void 0;const r=["string","number","integer","boolean","null","object","array"],i=new Set(r);function u(c){return typeof c=="string"&&i.has(c)}zr.isJSONType=u;function l(){const c={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...c,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},c.number,c.string,c.array,c.object],post:{rules:[]},all:{},keywords:{}}}return zr.getRules=l,zr}var Mn={},Yp;function fv(){if(Yp)return Mn;Yp=1,Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.shouldUseRule=Mn.shouldUseGroup=Mn.schemaHasRulesForType=void 0;function r({schema:l,self:c},o){const d=c.RULES.types[o];return d&&d!==!0&&i(l,d)}Mn.schemaHasRulesForType=r;function i(l,c){return c.rules.some(o=>u(l,o))}Mn.shouldUseGroup=i;function u(l,c){var o;return l[c.keyword]!==void 0||((o=c.definition.implements)===null||o===void 0?void 0:o.some(d=>l[d]!==void 0))}return Mn.shouldUseRule=u,Mn}var kp;function Hl(){if(kp)return yt;kp=1,Object.defineProperty(yt,"__esModule",{value:!0}),yt.reportTypeError=yt.checkDataTypes=yt.checkDataType=yt.coerceAndCheckDataType=yt.getJSONTypes=yt.getSchemaTypes=yt.DataType=void 0;const r=ov(),i=fv(),u=Ql(),l=Me(),c=Be();var o;(function(p){p[p.Correct=0]="Correct",p[p.Wrong=1]="Wrong"})(o||(yt.DataType=o={}));function d(p){const b=h(p.type);if(b.includes("null")){if(p.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!b.length&&p.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');p.nullable===!0&&b.push("null")}return b}yt.getSchemaTypes=d;function h(p){const b=Array.isArray(p)?p:p?[p]:[];if(b.every(r.isJSONType))return b;throw new Error("type must be JSONType or JSONType[]: "+b.join(","))}yt.getJSONTypes=h;function m(p,b){const{gen:E,data:O,opts:v}=p,A=S(b,v.coerceTypes),$=b.length>0&&!(A.length===0&&b.length===1&&(0,i.schemaHasRulesForType)(p,b[0]));if($){const D=L(b,O,v.strictNumbers,o.Wrong);E.if(D,()=>{A.length?N(p,b,A):g(p)})}return $}yt.coerceAndCheckDataType=m;const y=new Set(["string","number","integer","boolean","null"]);function S(p,b){return b?p.filter(E=>y.has(E)||b==="array"&&E==="array"):[]}function N(p,b,E){const{gen:O,data:v,opts:A}=p,$=O.let("dataType",(0,l._)`typeof ${v}`),D=O.let("coerced",(0,l._)`undefined`);A.coerceTypes==="array"&&O.if((0,l._)`${$} == 'object' && Array.isArray(${v}) && ${v}.length == 1`,()=>O.assign(v,(0,l._)`${v}[0]`).assign($,(0,l._)`typeof ${v}`).if(L(b,v,A.strictNumbers),()=>O.assign(D,v))),O.if((0,l._)`${D} !== undefined`);for(const Y of E)(y.has(Y)||Y==="array"&&A.coerceTypes==="array")&&j(Y);O.else(),g(p),O.endIf(),O.if((0,l._)`${D} !== undefined`,()=>{O.assign(v,D),x(p,D)});function j(Y){switch(Y){case"string":O.elseIf((0,l._)`${$} == "number" || ${$} == "boolean"`).assign(D,(0,l._)`"" + ${v}`).elseIf((0,l._)`${v} === null`).assign(D,(0,l._)`""`);return;case"number":O.elseIf((0,l._)`${$} == "boolean" || ${v} === null || (${$} == "string" && ${v} && ${v} == +${v})`).assign(D,(0,l._)`+${v}`);return;case"integer":O.elseIf((0,l._)`${$} === "boolean" || ${v} === null || (${$} === "string" && ${v} && ${v} == +${v} && !(${v} % 1))`).assign(D,(0,l._)`+${v}`);return;case"boolean":O.elseIf((0,l._)`${v} === "false" || ${v} === 0 || ${v} === null`).assign(D,!1).elseIf((0,l._)`${v} === "true" || ${v} === 1`).assign(D,!0);return;case"null":O.elseIf((0,l._)`${v} === "" || ${v} === 0 || ${v} === false`),O.assign(D,null);return;case"array":O.elseIf((0,l._)`${$} === "string" || ${$} === "number" || ${$} === "boolean" || ${v} === null`).assign(D,(0,l._)`[${v}]`)}}}function x({gen:p,parentData:b,parentDataProperty:E},O){p.if((0,l._)`${b} !== undefined`,()=>p.assign((0,l._)`${b}[${E}]`,O))}function V(p,b,E,O=o.Correct){const v=O===o.Correct?l.operators.EQ:l.operators.NEQ;let A;switch(p){case"null":return(0,l._)`${b} ${v} null`;case"array":A=(0,l._)`Array.isArray(${b})`;break;case"object":A=(0,l._)`${b} && typeof ${b} == "object" && !Array.isArray(${b})`;break;case"integer":A=$((0,l._)`!(${b} % 1) && !isNaN(${b})`);break;case"number":A=$();break;default:return(0,l._)`typeof ${b} ${v} ${p}`}return O===o.Correct?A:(0,l.not)(A);function $(D=l.nil){return(0,l.and)((0,l._)`typeof ${b} == "number"`,D,E?(0,l._)`isFinite(${b})`:l.nil)}}yt.checkDataType=V;function L(p,b,E,O){if(p.length===1)return V(p[0],b,E,O);let v;const A=(0,c.toHash)(p);if(A.array&&A.object){const $=(0,l._)`typeof ${b} != "object"`;v=A.null?$:(0,l._)`!${b} || ${$}`,delete A.null,delete A.array,delete A.object}else v=l.nil;A.number&&delete A.integer;for(const $ in A)v=(0,l.and)(v,V($,b,E,O));return v}yt.checkDataTypes=L;const C={message:({schema:p})=>`must be ${p}`,params:({schema:p,schemaValue:b})=>typeof p=="string"?(0,l._)`{type: ${p}}`:(0,l._)`{type: ${b}}`};function g(p){const b=w(p);(0,u.reportError)(b,C)}yt.reportTypeError=g;function w(p){const{gen:b,data:E,schema:O}=p,v=(0,c.schemaRefOrVal)(p,O,"type");return{gen:b,keyword:"type",data:E,schema:O.type,schemaCode:v,schemaValue:v,parentSchema:O,params:{},it:p}}return yt}var Oi={},Pp;function bb(){if(Pp)return Oi;Pp=1,Object.defineProperty(Oi,"__esModule",{value:!0}),Oi.assignDefaults=void 0;const r=Me(),i=Be();function u(c,o){const{properties:d,items:h}=c.schema;if(o==="object"&&d)for(const m in d)l(c,m,d[m].default);else o==="array"&&Array.isArray(h)&&h.forEach((m,y)=>l(c,y,m.default))}Oi.assignDefaults=u;function l(c,o,d){const{gen:h,compositeRule:m,data:y,opts:S}=c;if(d===void 0)return;const N=(0,r._)`${y}${(0,r.getProperty)(o)}`;if(m){(0,i.checkStrictMode)(c,`default is ignored for: ${N}`);return}let x=(0,r._)`${N} === undefined`;S.useDefaults==="empty"&&(x=(0,r._)`${x} || ${N} === null || ${N} === ""`),h.if(x,(0,r._)`${N} = ${(0,r.stringify)(d)}`)}return Oi}var tn={},Ge={},Kp;function an(){if(Kp)return Ge;Kp=1,Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.validateUnion=Ge.validateArray=Ge.usePattern=Ge.callValidateCode=Ge.schemaProperties=Ge.allSchemaProperties=Ge.noPropertyInData=Ge.propertyInData=Ge.isOwnProperty=Ge.hasPropFunc=Ge.reportMissingProp=Ge.checkMissingProp=Ge.checkReportMissingProp=void 0;const r=Me(),i=Be(),u=fr(),l=Be();function c(p,b){const{gen:E,data:O,it:v}=p;E.if(S(E,O,b,v.opts.ownProperties),()=>{p.setParams({missingProperty:(0,r._)`${b}`},!0),p.error()})}Ge.checkReportMissingProp=c;function o({gen:p,data:b,it:{opts:E}},O,v){return(0,r.or)(...O.map(A=>(0,r.and)(S(p,b,A,E.ownProperties),(0,r._)`${v} = ${A}`)))}Ge.checkMissingProp=o;function d(p,b){p.setParams({missingProperty:b},!0),p.error()}Ge.reportMissingProp=d;function h(p){return p.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,r._)`Object.prototype.hasOwnProperty`})}Ge.hasPropFunc=h;function m(p,b,E){return(0,r._)`${h(p)}.call(${b}, ${E})`}Ge.isOwnProperty=m;function y(p,b,E,O){const v=(0,r._)`${b}${(0,r.getProperty)(E)} !== undefined`;return O?(0,r._)`${v} && ${m(p,b,E)}`:v}Ge.propertyInData=y;function S(p,b,E,O){const v=(0,r._)`${b}${(0,r.getProperty)(E)} === undefined`;return O?(0,r.or)(v,(0,r.not)(m(p,b,E))):v}Ge.noPropertyInData=S;function N(p){return p?Object.keys(p).filter(b=>b!=="__proto__"):[]}Ge.allSchemaProperties=N;function x(p,b){return N(b).filter(E=>!(0,i.alwaysValidSchema)(p,b[E]))}Ge.schemaProperties=x;function V({schemaCode:p,data:b,it:{gen:E,topSchemaRef:O,schemaPath:v,errorPath:A},it:$},D,j,Y){const Q=Y?(0,r._)`${p}, ${b}, ${O}${v}`:b,W=[[u.default.instancePath,(0,r.strConcat)(u.default.instancePath,A)],[u.default.parentData,$.parentData],[u.default.parentDataProperty,$.parentDataProperty],[u.default.rootData,u.default.rootData]];$.opts.dynamicRef&&W.push([u.default.dynamicAnchors,u.default.dynamicAnchors]);const F=(0,r._)`${Q}, ${E.object(...W)}`;return j!==r.nil?(0,r._)`${D}.call(${j}, ${F})`:(0,r._)`${D}(${F})`}Ge.callValidateCode=V;const L=(0,r._)`new RegExp`;function C({gen:p,it:{opts:b}},E){const O=b.unicodeRegExp?"u":"",{regExp:v}=b.code,A=v(E,O);return p.scopeValue("pattern",{key:A.toString(),ref:A,code:(0,r._)`${v.code==="new RegExp"?L:(0,l.useFunc)(p,v)}(${E}, ${O})`})}Ge.usePattern=C;function g(p){const{gen:b,data:E,keyword:O,it:v}=p,A=b.name("valid");if(v.allErrors){const D=b.let("valid",!0);return $(()=>b.assign(D,!1)),D}return b.var(A,!0),$(()=>b.break()),A;function $(D){const j=b.const("len",(0,r._)`${E}.length`);b.forRange("i",0,j,Y=>{p.subschema({keyword:O,dataProp:Y,dataPropType:i.Type.Num},A),b.if((0,r.not)(A),D)})}}Ge.validateArray=g;function w(p){const{gen:b,schema:E,keyword:O,it:v}=p;if(!Array.isArray(E))throw new Error("ajv implementation error");if(E.some(j=>(0,i.alwaysValidSchema)(v,j))&&!v.opts.unevaluated)return;const $=b.let("valid",!1),D=b.name("_valid");b.block(()=>E.forEach((j,Y)=>{const Q=p.subschema({keyword:O,schemaProp:Y,compositeRule:!0},D);b.assign($,(0,r._)`${$} || ${D}`),p.mergeValidEvaluated(Q,D)||b.if((0,r.not)($))})),p.result($,()=>p.reset(),()=>p.error(!0))}return Ge.validateUnion=w,Ge}var Xp;function Eb(){if(Xp)return tn;Xp=1,Object.defineProperty(tn,"__esModule",{value:!0}),tn.validateKeywordUsage=tn.validSchemaType=tn.funcKeywordCode=tn.macroKeywordCode=void 0;const r=Me(),i=fr(),u=an(),l=Ql();function c(x,V){const{gen:L,keyword:C,schema:g,parentSchema:w,it:p}=x,b=V.macro.call(p.self,g,w,p),E=y(L,C,b);p.opts.validateSchema!==!1&&p.self.validateSchema(b,!0);const O=L.name("valid");x.subschema({schema:b,schemaPath:r.nil,errSchemaPath:`${p.errSchemaPath}/${C}`,topSchemaRef:E,compositeRule:!0},O),x.pass(O,()=>x.error(!0))}tn.macroKeywordCode=c;function o(x,V){var L;const{gen:C,keyword:g,schema:w,parentSchema:p,$data:b,it:E}=x;m(E,V);const O=!b&&V.compile?V.compile.call(E.self,w,p,E):V.validate,v=y(C,g,O),A=C.let("valid");x.block$data(A,$),x.ok((L=V.valid)!==null&&L!==void 0?L:A);function $(){if(V.errors===!1)Y(),V.modifying&&d(x),Q(()=>x.error());else{const W=V.async?D():j();V.modifying&&d(x),Q(()=>h(x,W))}}function D(){const W=C.let("ruleErrs",null);return C.try(()=>Y((0,r._)`await `),F=>C.assign(A,!1).if((0,r._)`${F} instanceof ${E.ValidationError}`,()=>C.assign(W,(0,r._)`${F}.errors`),()=>C.throw(F))),W}function j(){const W=(0,r._)`${v}.errors`;return C.assign(W,null),Y(r.nil),W}function Y(W=V.async?(0,r._)`await `:r.nil){const F=E.opts.passContext?i.default.this:i.default.self,ne=!("compile"in V&&!b||V.schema===!1);C.assign(A,(0,r._)`${W}${(0,u.callValidateCode)(x,v,F,ne)}`,V.modifying)}function Q(W){var F;C.if((0,r.not)((F=V.valid)!==null&&F!==void 0?F:A),W)}}tn.funcKeywordCode=o;function d(x){const{gen:V,data:L,it:C}=x;V.if(C.parentData,()=>V.assign(L,(0,r._)`${C.parentData}[${C.parentDataProperty}]`))}function h(x,V){const{gen:L}=x;L.if((0,r._)`Array.isArray(${V})`,()=>{L.assign(i.default.vErrors,(0,r._)`${i.default.vErrors} === null ? ${V} : ${i.default.vErrors}.concat(${V})`).assign(i.default.errors,(0,r._)`${i.default.vErrors}.length`),(0,l.extendErrors)(x)},()=>x.error())}function m({schemaEnv:x},V){if(V.async&&!x.$async)throw new Error("async keyword in sync schema")}function y(x,V,L){if(L===void 0)throw new Error(`keyword "${V}" failed to compile`);return x.scopeValue("keyword",typeof L=="function"?{ref:L}:{ref:L,code:(0,r.stringify)(L)})}function S(x,V,L=!1){return!V.length||V.some(C=>C==="array"?Array.isArray(x):C==="object"?x&&typeof x=="object"&&!Array.isArray(x):typeof x==C||L&&typeof x>"u")}tn.validSchemaType=S;function N({schema:x,opts:V,self:L,errSchemaPath:C},g,w){if(Array.isArray(g.keyword)?!g.keyword.includes(w):g.keyword!==w)throw new Error("ajv implementation error");const p=g.dependencies;if(p!=null&&p.some(b=>!Object.prototype.hasOwnProperty.call(x,b)))throw new Error(`parent schema must have dependencies of ${w}: ${p.join(",")}`);if(g.validateSchema&&!g.validateSchema(x[w])){const E=`keyword "${w}" value is invalid at path "${C}": `+L.errorsText(g.validateSchema.errors);if(V.validateSchema==="log")L.logger.error(E);else throw new Error(E)}}return tn.validateKeywordUsage=N,tn}var qn={},Qp;function _b(){if(Qp)return qn;Qp=1,Object.defineProperty(qn,"__esModule",{value:!0}),qn.extendSubschemaMode=qn.extendSubschemaData=qn.getSubschema=void 0;const r=Me(),i=Be();function u(o,{keyword:d,schemaProp:h,schema:m,schemaPath:y,errSchemaPath:S,topSchemaRef:N}){if(d!==void 0&&m!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(d!==void 0){const x=o.schema[d];return h===void 0?{schema:x,schemaPath:(0,r._)`${o.schemaPath}${(0,r.getProperty)(d)}`,errSchemaPath:`${o.errSchemaPath}/${d}`}:{schema:x[h],schemaPath:(0,r._)`${o.schemaPath}${(0,r.getProperty)(d)}${(0,r.getProperty)(h)}`,errSchemaPath:`${o.errSchemaPath}/${d}/${(0,i.escapeFragment)(h)}`}}if(m!==void 0){if(y===void 0||S===void 0||N===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:m,schemaPath:y,topSchemaRef:N,errSchemaPath:S}}throw new Error('either "keyword" or "schema" must be passed')}qn.getSubschema=u;function l(o,d,{dataProp:h,dataPropType:m,data:y,dataTypes:S,propertyName:N}){if(y!==void 0&&h!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:x}=d;if(h!==void 0){const{errorPath:L,dataPathArr:C,opts:g}=d,w=x.let("data",(0,r._)`${d.data}${(0,r.getProperty)(h)}`,!0);V(w),o.errorPath=(0,r.str)`${L}${(0,i.getErrorPath)(h,m,g.jsPropertySyntax)}`,o.parentDataProperty=(0,r._)`${h}`,o.dataPathArr=[...C,o.parentDataProperty]}if(y!==void 0){const L=y instanceof r.Name?y:x.let("data",y,!0);V(L),N!==void 0&&(o.propertyName=N)}S&&(o.dataTypes=S);function V(L){o.data=L,o.dataLevel=d.dataLevel+1,o.dataTypes=[],d.definedProperties=new Set,o.parentData=d.data,o.dataNames=[...d.dataNames,L]}}qn.extendSubschemaData=l;function c(o,{jtdDiscriminator:d,jtdMetadata:h,compositeRule:m,createErrors:y,allErrors:S}){m!==void 0&&(o.compositeRule=m),y!==void 0&&(o.createErrors=y),S!==void 0&&(o.allErrors=S),o.jtdDiscriminator=d,o.jtdMetadata=h}return qn.extendSubschemaMode=c,qn}var St={},wf,Zp;function cv(){return Zp||(Zp=1,wf=function r(i,u){if(i===u)return!0;if(i&&u&&typeof i=="object"&&typeof u=="object"){if(i.constructor!==u.constructor)return!1;var l,c,o;if(Array.isArray(i)){if(l=i.length,l!=u.length)return!1;for(c=l;c--!==0;)if(!r(i[c],u[c]))return!1;return!0}if(i.constructor===RegExp)return i.source===u.source&&i.flags===u.flags;if(i.valueOf!==Object.prototype.valueOf)return i.valueOf()===u.valueOf();if(i.toString!==Object.prototype.toString)return i.toString()===u.toString();if(o=Object.keys(i),l=o.length,l!==Object.keys(u).length)return!1;for(c=l;c--!==0;)if(!Object.prototype.hasOwnProperty.call(u,o[c]))return!1;for(c=l;c--!==0;){var d=o[c];if(!r(i[d],u[d]))return!1}return!0}return i!==i&&u!==u}),wf}var $f={exports:{}},Jp;function Sb(){if(Jp)return $f.exports;Jp=1;var r=$f.exports=function(l,c,o){typeof c=="function"&&(o=c,c={}),o=c.cb||o;var d=typeof o=="function"?o:o.pre||function(){},h=o.post||function(){};i(c,d,h,l,"",l)};r.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},r.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},r.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},r.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function i(l,c,o,d,h,m,y,S,N,x){if(d&&typeof d=="object"&&!Array.isArray(d)){c(d,h,m,y,S,N,x);for(var V in d){var L=d[V];if(Array.isArray(L)){if(V in r.arrayKeywords)for(var C=0;Cg+=h(p)),g===1/0))return 1/0}return g}function m(C,g="",w){w!==!1&&(g=N(g));const p=C.parse(g);return y(C,p)}St.getFullPath=m;function y(C,g){return C.serialize(g).split("#")[0]+"#"}St._getFullPath=y;const S=/#\/?$/;function N(C){return C?C.replace(S,""):""}St.normalizeId=N;function x(C,g,w){return w=N(w),C.resolve(g,w)}St.resolveUrl=x;const V=/^[a-z_][-a-z0-9._]*$/i;function L(C,g){if(typeof C=="boolean")return{};const{schemaId:w,uriResolver:p}=this.opts,b=N(C[w]||g),E={"":b},O=m(p,b,!1),v={},A=new Set;return u(C,{allKeys:!0},(j,Y,Q,W)=>{if(W===void 0)return;const F=O+Y;let ne=E[W];typeof j[w]=="string"&&(ne=P.call(this,j[w])),ue.call(this,j.$anchor),ue.call(this,j.$dynamicAnchor),E[Y]=ne;function P(re){const de=this.opts.uriResolver.resolve;if(re=N(ne?de(ne,re):re),A.has(re))throw D(re);A.add(re);let R=this.refs[re];return typeof R=="string"&&(R=this.refs[R]),typeof R=="object"?$(j,R.schema,re):re!==N(F)&&(re[0]==="#"?($(j,v[re],re),v[re]=j):this.refs[re]=F),re}function ue(re){if(typeof re=="string"){if(!V.test(re))throw new Error(`invalid anchor "${re}"`);P.call(this,`#${re}`)}}}),v;function $(j,Y,Q){if(Y!==void 0&&!i(j,Y))throw D(Q)}function D(j){return new Error(`reference "${j}" resolves to more than one schema`)}}return St.getSchemaRefs=L,St}var Wp;function Jl(){if(Wp)return Dn;Wp=1,Object.defineProperty(Dn,"__esModule",{value:!0}),Dn.getData=Dn.KeywordCxt=Dn.validateFunctionCode=void 0;const r=vb(),i=Hl(),u=fv(),l=Hl(),c=bb(),o=Eb(),d=_b(),h=Me(),m=fr(),y=Zl(),S=Be(),N=Ql();function x(q){if(O(q)&&(A(q),E(q))){g(q);return}V(q,()=>(0,r.topBoolOrEmptySchema)(q))}Dn.validateFunctionCode=x;function V({gen:q,validateName:G,schema:X,schemaEnv:se,opts:me},ye){me.code.es5?q.func(G,(0,h._)`${m.default.data}, ${m.default.valCxt}`,se.$async,()=>{q.code((0,h._)`"use strict"; ${p(X,me)}`),C(q,me),q.code(ye)}):q.func(G,(0,h._)`${m.default.data}, ${L(me)}`,se.$async,()=>q.code(p(X,me)).code(ye))}function L(q){return(0,h._)`{${m.default.instancePath}="", ${m.default.parentData}, ${m.default.parentDataProperty}, ${m.default.rootData}=${m.default.data}${q.dynamicRef?(0,h._)`, ${m.default.dynamicAnchors}={}`:h.nil}}={}`}function C(q,G){q.if(m.default.valCxt,()=>{q.var(m.default.instancePath,(0,h._)`${m.default.valCxt}.${m.default.instancePath}`),q.var(m.default.parentData,(0,h._)`${m.default.valCxt}.${m.default.parentData}`),q.var(m.default.parentDataProperty,(0,h._)`${m.default.valCxt}.${m.default.parentDataProperty}`),q.var(m.default.rootData,(0,h._)`${m.default.valCxt}.${m.default.rootData}`),G.dynamicRef&&q.var(m.default.dynamicAnchors,(0,h._)`${m.default.valCxt}.${m.default.dynamicAnchors}`)},()=>{q.var(m.default.instancePath,(0,h._)`""`),q.var(m.default.parentData,(0,h._)`undefined`),q.var(m.default.parentDataProperty,(0,h._)`undefined`),q.var(m.default.rootData,m.default.data),G.dynamicRef&&q.var(m.default.dynamicAnchors,(0,h._)`{}`)})}function g(q){const{schema:G,opts:X,gen:se}=q;V(q,()=>{X.$comment&&G.$comment&&W(q),j(q),se.let(m.default.vErrors,null),se.let(m.default.errors,0),X.unevaluated&&w(q),$(q),F(q)})}function w(q){const{gen:G,validateName:X}=q;q.evaluated=G.const("evaluated",(0,h._)`${X}.evaluated`),G.if((0,h._)`${q.evaluated}.dynamicProps`,()=>G.assign((0,h._)`${q.evaluated}.props`,(0,h._)`undefined`)),G.if((0,h._)`${q.evaluated}.dynamicItems`,()=>G.assign((0,h._)`${q.evaluated}.items`,(0,h._)`undefined`))}function p(q,G){const X=typeof q=="object"&&q[G.schemaId];return X&&(G.code.source||G.code.process)?(0,h._)`/*# sourceURL=${X} */`:h.nil}function b(q,G){if(O(q)&&(A(q),E(q))){v(q,G);return}(0,r.boolOrEmptySchema)(q,G)}function E({schema:q,self:G}){if(typeof q=="boolean")return!q;for(const X in q)if(G.RULES.all[X])return!0;return!1}function O(q){return typeof q.schema!="boolean"}function v(q,G){const{schema:X,gen:se,opts:me}=q;me.$comment&&X.$comment&&W(q),Y(q),Q(q);const ye=se.const("_errs",m.default.errors);$(q,ye),se.var(G,(0,h._)`${ye} === ${m.default.errors}`)}function A(q){(0,S.checkUnknownRules)(q),D(q)}function $(q,G){if(q.opts.jtd)return P(q,[],!1,G);const X=(0,i.getSchemaTypes)(q.schema),se=(0,i.coerceAndCheckDataType)(q,X);P(q,X,!se,G)}function D(q){const{schema:G,errSchemaPath:X,opts:se,self:me}=q;G.$ref&&se.ignoreKeywordsWithRef&&(0,S.schemaHasRulesButRef)(G,me.RULES)&&me.logger.warn(`$ref: keywords ignored in schema at path "${X}"`)}function j(q){const{schema:G,opts:X}=q;G.default!==void 0&&X.useDefaults&&X.strictSchema&&(0,S.checkStrictMode)(q,"default is ignored in the schema root")}function Y(q){const G=q.schema[q.opts.schemaId];G&&(q.baseId=(0,y.resolveUrl)(q.opts.uriResolver,q.baseId,G))}function Q(q){if(q.schema.$async&&!q.schemaEnv.$async)throw new Error("async schema in sync schema")}function W({gen:q,schemaEnv:G,schema:X,errSchemaPath:se,opts:me}){const ye=X.$comment;if(me.$comment===!0)q.code((0,h._)`${m.default.self}.logger.log(${ye})`);else if(typeof me.$comment=="function"){const Ae=(0,h.str)`${se}/$comment`,Ie=q.scopeValue("root",{ref:G.root});q.code((0,h._)`${m.default.self}.opts.$comment(${ye}, ${Ae}, ${Ie}.schema)`)}}function F(q){const{gen:G,schemaEnv:X,validateName:se,ValidationError:me,opts:ye}=q;X.$async?G.if((0,h._)`${m.default.errors} === 0`,()=>G.return(m.default.data),()=>G.throw((0,h._)`new ${me}(${m.default.vErrors})`)):(G.assign((0,h._)`${se}.errors`,m.default.vErrors),ye.unevaluated&&ne(q),G.return((0,h._)`${m.default.errors} === 0`))}function ne({gen:q,evaluated:G,props:X,items:se}){X instanceof h.Name&&q.assign((0,h._)`${G}.props`,X),se instanceof h.Name&&q.assign((0,h._)`${G}.items`,se)}function P(q,G,X,se){const{gen:me,schema:ye,data:Ae,allErrors:Ie,opts:Ue,self:Le}=q,{RULES:Re}=Le;if(ye.$ref&&(Ue.ignoreKeywordsWithRef||!(0,S.schemaHasRulesButRef)(ye,Re))){me.block(()=>pe(q,"$ref",Re.all.$ref.definition));return}Ue.jtd||re(q,G),me.block(()=>{for(const tt of Re.rules)He(tt);He(Re.post)});function He(tt){(0,u.shouldUseGroup)(ye,tt)&&(tt.type?(me.if((0,l.checkDataType)(tt.type,Ae,Ue.strictNumbers)),ue(q,tt),G.length===1&&G[0]===tt.type&&X&&(me.else(),(0,l.reportTypeError)(q)),me.endIf()):ue(q,tt),Ie||me.if((0,h._)`${m.default.errors} === ${se||0}`))}}function ue(q,G){const{gen:X,schema:se,opts:{useDefaults:me}}=q;me&&(0,c.assignDefaults)(q,G.type),X.block(()=>{for(const ye of G.rules)(0,u.shouldUseRule)(se,ye)&&pe(q,ye.keyword,ye.definition,G.type)})}function re(q,G){q.schemaEnv.meta||!q.opts.strictTypes||(de(q,G),q.opts.allowUnionTypes||R(q,G),z(q,q.dataTypes))}function de(q,G){if(G.length){if(!q.dataTypes.length){q.dataTypes=G;return}G.forEach(X=>{k(q.dataTypes,X)||H(q,`type "${X}" not allowed by context "${q.dataTypes.join(",")}"`)}),T(q,G)}}function R(q,G){G.length>1&&!(G.length===2&&G.includes("null"))&&H(q,"use allowUnionTypes to allow union type keyword")}function z(q,G){const X=q.self.RULES.all;for(const se in X){const me=X[se];if(typeof me=="object"&&(0,u.shouldUseRule)(q.schema,me)){const{type:ye}=me.definition;ye.length&&!ye.some(Ae=>K(G,Ae))&&H(q,`missing type "${ye.join(",")}" for keyword "${se}"`)}}}function K(q,G){return q.includes(G)||G==="number"&&q.includes("integer")}function k(q,G){return q.includes(G)||G==="integer"&&q.includes("number")}function T(q,G){const X=[];for(const se of q.dataTypes)k(G,se)?X.push(se):G.includes("integer")&&se==="number"&&X.push("integer");q.dataTypes=X}function H(q,G){const X=q.schemaEnv.baseId+q.errSchemaPath;G+=` at "${X}" (strictTypes)`,(0,S.checkStrictMode)(q,G,q.opts.strictTypes)}class te{constructor(G,X,se){if((0,o.validateKeywordUsage)(G,X,se),this.gen=G.gen,this.allErrors=G.allErrors,this.keyword=se,this.data=G.data,this.schema=G.schema[se],this.$data=X.$data&&G.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,S.schemaRefOrVal)(G,this.schema,se,this.$data),this.schemaType=X.schemaType,this.parentSchema=G.schema,this.params={},this.it=G,this.def=X,this.$data)this.schemaCode=G.gen.const("vSchema",B(this.$data,G));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,X.schemaType,X.allowUndefined))throw new Error(`${se} value must be ${JSON.stringify(X.schemaType)}`);("code"in X?X.trackErrors:X.errors!==!1)&&(this.errsCount=G.gen.const("_errs",m.default.errors))}result(G,X,se){this.failResult((0,h.not)(G),X,se)}failResult(G,X,se){this.gen.if(G),se?se():this.error(),X?(this.gen.else(),X(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(G,X){this.failResult((0,h.not)(G),void 0,X)}fail(G){if(G===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(G),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(G){if(!this.$data)return this.fail(G);const{schemaCode:X}=this;this.fail((0,h._)`${X} !== undefined && (${(0,h.or)(this.invalid$data(),G)})`)}error(G,X,se){if(X){this.setParams(X),this._error(G,se),this.setParams({});return}this._error(G,se)}_error(G,X){(G?N.reportExtraError:N.reportError)(this,this.def.error,X)}$dataError(){(0,N.reportError)(this,this.def.$dataError||N.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,N.resetErrorsCount)(this.gen,this.errsCount)}ok(G){this.allErrors||this.gen.if(G)}setParams(G,X){X?Object.assign(this.params,G):this.params=G}block$data(G,X,se=h.nil){this.gen.block(()=>{this.check$data(G,se),X()})}check$data(G=h.nil,X=h.nil){if(!this.$data)return;const{gen:se,schemaCode:me,schemaType:ye,def:Ae}=this;se.if((0,h.or)((0,h._)`${me} === undefined`,X)),G!==h.nil&&se.assign(G,!0),(ye.length||Ae.validateSchema)&&(se.elseIf(this.invalid$data()),this.$dataError(),G!==h.nil&&se.assign(G,!1)),se.else()}invalid$data(){const{gen:G,schemaCode:X,schemaType:se,def:me,it:ye}=this;return(0,h.or)(Ae(),Ie());function Ae(){if(se.length){if(!(X instanceof h.Name))throw new Error("ajv implementation error");const Ue=Array.isArray(se)?se:[se];return(0,h._)`${(0,l.checkDataTypes)(Ue,X,ye.opts.strictNumbers,l.DataType.Wrong)}`}return h.nil}function Ie(){if(me.validateSchema){const Ue=G.scopeValue("validate$data",{ref:me.validateSchema});return(0,h._)`!${Ue}(${X})`}return h.nil}}subschema(G,X){const se=(0,d.getSubschema)(this.it,G);(0,d.extendSubschemaData)(se,this.it,G),(0,d.extendSubschemaMode)(se,G);const me={...this.it,...se,items:void 0,props:void 0};return b(me,X),me}mergeEvaluated(G,X){const{it:se,gen:me}=this;se.opts.unevaluated&&(se.props!==!0&&G.props!==void 0&&(se.props=S.mergeEvaluated.props(me,G.props,se.props,X)),se.items!==!0&&G.items!==void 0&&(se.items=S.mergeEvaluated.items(me,G.items,se.items,X)))}mergeValidEvaluated(G,X){const{it:se,gen:me}=this;if(se.opts.unevaluated&&(se.props!==!0||se.items!==!0))return me.if(X,()=>this.mergeEvaluated(G,h.Name)),!0}}Dn.KeywordCxt=te;function pe(q,G,X,se){const me=new te(q,X,G);"code"in X?X.code(me,se):me.$data&&X.validate?(0,o.funcKeywordCode)(me,X):"macro"in X?(0,o.macroKeywordCode)(me,X):(X.compile||X.validate)&&(0,o.funcKeywordCode)(me,X)}const ae=/^\/(?:[^~]|~0|~1)*$/,M=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function B(q,{dataLevel:G,dataNames:X,dataPathArr:se}){let me,ye;if(q==="")return m.default.rootData;if(q[0]==="/"){if(!ae.test(q))throw new Error(`Invalid JSON-pointer: ${q}`);me=q,ye=m.default.rootData}else{const Le=M.exec(q);if(!Le)throw new Error(`Invalid JSON-pointer: ${q}`);const Re=+Le[1];if(me=Le[2],me==="#"){if(Re>=G)throw new Error(Ue("property/index",Re));return se[G-Re]}if(Re>G)throw new Error(Ue("data",Re));if(ye=X[G-Re],!me)return ye}let Ae=ye;const Ie=me.split("/");for(const Le of Ie)Le&&(ye=(0,h._)`${ye}${(0,h.getProperty)((0,S.unescapeJsonPointer)(Le))}`,Ae=(0,h._)`${Ae} && ${ye}`);return Ae;function Ue(Le,Re){return`Cannot access ${Le} ${Re} levels up, current level is ${G}`}}return Dn.getData=B,Dn}var Js={},ey;function Dc(){if(ey)return Js;ey=1,Object.defineProperty(Js,"__esModule",{value:!0});class r extends Error{constructor(u){super("validation failed"),this.errors=u,this.ajv=this.validation=!0}}return Js.default=r,Js}var Fs={},ty;function Fl(){if(ty)return Fs;ty=1,Object.defineProperty(Fs,"__esModule",{value:!0});const r=Zl();class i extends Error{constructor(l,c,o,d){super(d||`can't resolve reference ${o} from id ${c}`),this.missingRef=(0,r.resolveUrl)(l,c,o),this.missingSchema=(0,r.normalizeId)((0,r.getFullPath)(l,this.missingRef))}}return Fs.default=i,Fs}var Ut={},ny;function Mc(){if(ny)return Ut;ny=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.resolveSchema=Ut.getCompilingSchema=Ut.resolveRef=Ut.compileSchema=Ut.SchemaEnv=void 0;const r=Me(),i=Dc(),u=fr(),l=Zl(),c=Be(),o=Jl();class d{constructor(w){var p;this.refs={},this.dynamicAnchors={};let b;typeof w.schema=="object"&&(b=w.schema),this.schema=w.schema,this.schemaId=w.schemaId,this.root=w.root||this,this.baseId=(p=w.baseId)!==null&&p!==void 0?p:(0,l.normalizeId)(b==null?void 0:b[w.schemaId||"$id"]),this.schemaPath=w.schemaPath,this.localRefs=w.localRefs,this.meta=w.meta,this.$async=b==null?void 0:b.$async,this.refs={}}}Ut.SchemaEnv=d;function h(g){const w=S.call(this,g);if(w)return w;const p=(0,l.getFullPath)(this.opts.uriResolver,g.root.baseId),{es5:b,lines:E}=this.opts.code,{ownProperties:O}=this.opts,v=new r.CodeGen(this.scope,{es5:b,lines:E,ownProperties:O});let A;g.$async&&(A=v.scopeValue("Error",{ref:i.default,code:(0,r._)`require("ajv/dist/runtime/validation_error").default`}));const $=v.scopeName("validate");g.validateName=$;const D={gen:v,allErrors:this.opts.allErrors,data:u.default.data,parentData:u.default.parentData,parentDataProperty:u.default.parentDataProperty,dataNames:[u.default.data],dataPathArr:[r.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:v.scopeValue("schema",this.opts.code.source===!0?{ref:g.schema,code:(0,r.stringify)(g.schema)}:{ref:g.schema}),validateName:$,ValidationError:A,schema:g.schema,schemaEnv:g,rootId:p,baseId:g.baseId||p,schemaPath:r.nil,errSchemaPath:g.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,r._)`""`,opts:this.opts,self:this};let j;try{this._compilations.add(g),(0,o.validateFunctionCode)(D),v.optimize(this.opts.code.optimize);const Y=v.toString();j=`${v.scopeRefs(u.default.scope)}return ${Y}`,this.opts.code.process&&(j=this.opts.code.process(j,g));const W=new Function(`${u.default.self}`,`${u.default.scope}`,j)(this,this.scope.get());if(this.scope.value($,{ref:W}),W.errors=null,W.schema=g.schema,W.schemaEnv=g,g.$async&&(W.$async=!0),this.opts.code.source===!0&&(W.source={validateName:$,validateCode:Y,scopeValues:v._values}),this.opts.unevaluated){const{props:F,items:ne}=D;W.evaluated={props:F instanceof r.Name?void 0:F,items:ne instanceof r.Name?void 0:ne,dynamicProps:F instanceof r.Name,dynamicItems:ne instanceof r.Name},W.source&&(W.source.evaluated=(0,r.stringify)(W.evaluated))}return g.validate=W,g}catch(Y){throw delete g.validate,delete g.validateName,j&&this.logger.error("Error compiling schema, function code:",j),Y}finally{this._compilations.delete(g)}}Ut.compileSchema=h;function m(g,w,p){var b;p=(0,l.resolveUrl)(this.opts.uriResolver,w,p);const E=g.refs[p];if(E)return E;let O=x.call(this,g,p);if(O===void 0){const v=(b=g.localRefs)===null||b===void 0?void 0:b[p],{schemaId:A}=this.opts;v&&(O=new d({schema:v,schemaId:A,root:g,baseId:w}))}if(O!==void 0)return g.refs[p]=y.call(this,O)}Ut.resolveRef=m;function y(g){return(0,l.inlineRef)(g.schema,this.opts.inlineRefs)?g.schema:g.validate?g:h.call(this,g)}function S(g){for(const w of this._compilations)if(N(w,g))return w}Ut.getCompilingSchema=S;function N(g,w){return g.schema===w.schema&&g.root===w.root&&g.baseId===w.baseId}function x(g,w){let p;for(;typeof(p=this.refs[w])=="string";)w=p;return p||this.schemas[w]||V.call(this,g,w)}function V(g,w){const p=this.opts.uriResolver.parse(w),b=(0,l._getFullPath)(this.opts.uriResolver,p);let E=(0,l.getFullPath)(this.opts.uriResolver,g.baseId,void 0);if(Object.keys(g.schema).length>0&&b===E)return C.call(this,p,g);const O=(0,l.normalizeId)(b),v=this.refs[O]||this.schemas[O];if(typeof v=="string"){const A=V.call(this,g,v);return typeof(A==null?void 0:A.schema)!="object"?void 0:C.call(this,p,A)}if(typeof(v==null?void 0:v.schema)=="object"){if(v.validate||h.call(this,v),O===(0,l.normalizeId)(w)){const{schema:A}=v,{schemaId:$}=this.opts,D=A[$];return D&&(E=(0,l.resolveUrl)(this.opts.uriResolver,E,D)),new d({schema:A,schemaId:$,root:g,baseId:E})}return C.call(this,p,v)}}Ut.resolveSchema=V;const L=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function C(g,{baseId:w,schema:p,root:b}){var E;if(((E=g.fragment)===null||E===void 0?void 0:E[0])!=="/")return;for(const A of g.fragment.slice(1).split("/")){if(typeof p=="boolean")return;const $=p[(0,c.unescapeFragment)(A)];if($===void 0)return;p=$;const D=typeof p=="object"&&p[this.opts.schemaId];!L.has(A)&&D&&(w=(0,l.resolveUrl)(this.opts.uriResolver,w,D))}let O;if(typeof p!="boolean"&&p.$ref&&!(0,c.schemaHasRulesButRef)(p,this.RULES)){const A=(0,l.resolveUrl)(this.opts.uriResolver,w,p.$ref);O=V.call(this,b,A)}const{schemaId:v}=this.opts;if(O=O||new d({schema:p,schemaId:v,root:b,baseId:w}),O.schema!==O.root.schema)return O}return Ut}const wb="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",$b="Meta-schema for $data reference (JSON AnySchema extension proposal)",Ob="object",Ab=["$data"],Rb={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},Tb=!1,Nb={$id:wb,description:$b,type:Ob,required:Ab,properties:Rb,additionalProperties:Tb};var Ws={},Ai={exports:{}},Of,ry;function jb(){return ry||(ry=1,Of={HEX:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15}}),Of}var Af,ay;function Db(){if(ay)return Af;ay=1;const{HEX:r}=jb(),i=/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u;function u(C){if(h(C,".")<3)return{host:C,isIPV4:!1};const g=C.match(i)||[],[w]=g;return w?{host:d(w,"."),isIPV4:!0}:{host:C,isIPV4:!1}}function l(C,g=!1){let w="",p=!0;for(const b of C){if(r[b]===void 0)return;b!=="0"&&p===!0&&(p=!1),p||(w+=b)}return g&&w.length===0&&(w="0"),w}function c(C){let g=0;const w={error:!1,address:"",zone:""},p=[],b=[];let E=!1,O=!1,v=!1;function A(){if(b.length){if(E===!1){const $=l(b);if($!==void 0)p.push($);else return w.error=!0,!1}b.length=0}return!0}for(let $=0;$7){w.error=!0;break}$-1>=0&&C[$-1]===":"&&(O=!0);continue}else if(D==="%"){if(!A())break;E=!0}else{b.push(D);continue}}return b.length&&(E?w.zone=b.join(""):v?p.push(b.join("")):p.push(l(b))),w.address=p.join(""),w}function o(C){if(h(C,":")<2)return{host:C,isIPV6:!1};const g=c(C);if(g.error)return{host:C,isIPV6:!1};{let w=g.address,p=g.address;return g.zone&&(w+="%"+g.zone,p+="%25"+g.zone),{host:w,escapedHost:p,isIPV6:!0}}}function d(C,g){let w="",p=!0;const b=C.length;for(let E=0;E/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(w)));function x(g){let w=0;for(let p=0,b=g.length;p126||N[w])return!0;return!1}const V=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function L(g,w){const p=Object.assign({},w),b={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},E=g.indexOf("%")!==-1;let O=!1;p.reference==="suffix"&&(g=(p.scheme?p.scheme+":":"")+"//"+g);const v=g.match(V);if(v){if(b.scheme=v[1],b.userinfo=v[3],b.host=v[4],b.port=parseInt(v[5],10),b.path=v[6]||"",b.query=v[7],b.fragment=v[8],isNaN(b.port)&&(b.port=v[5]),b.host){const $=i(b.host);if($.isIPV4===!1){const D=r($.host);b.host=D.host.toLowerCase(),O=D.isIPV6}else b.host=$.host,O=!0}b.scheme===void 0&&b.userinfo===void 0&&b.host===void 0&&b.port===void 0&&!b.path&&b.query===void 0?b.reference="same-document":b.scheme===void 0?b.reference="relative":b.fragment===void 0?b.reference="absolute":b.reference="uri",p.reference&&p.reference!=="suffix"&&p.reference!==b.reference&&(b.error=b.error||"URI is not a "+p.reference+" reference.");const A=o[(p.scheme||b.scheme||"").toLowerCase()];if(!p.unicodeSupport&&(!A||!A.unicodeSupport)&&b.host&&(p.domainHost||A&&A.domainHost)&&O===!1&&x(b.host))try{b.host=URL.domainToASCII(b.host.toLowerCase())}catch($){b.error=b.error||"Host's domain name can not be converted to ASCII: "+$}(!A||A&&!A.skipNormalize)&&(E&&b.scheme!==void 0&&(b.scheme=unescape(b.scheme)),E&&b.host!==void 0&&(b.host=unescape(b.host)),b.path&&b.path.length&&(b.path=escape(unescape(b.path))),b.fragment&&b.fragment.length&&(b.fragment=encodeURI(decodeURIComponent(b.fragment)))),A&&A.parse&&A.parse(b,p)}else b.error=b.error||"URI can not be parsed.";return b}const C={SCHEMES:o,normalize:d,resolve:h,resolveComponents:m,equal:y,serialize:S,parse:L};return Ai.exports=C,Ai.exports.default=C,Ai.exports.fastUri=C,Ai.exports}var ly;function Cb(){if(ly)return Ws;ly=1,Object.defineProperty(Ws,"__esModule",{value:!0});const r=qb();return r.code='require("ajv/dist/runtime/uri").default',Ws.default=r,Ws}var uy;function zb(){return uy||(uy=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.CodeGen=r.Name=r.nil=r.stringify=r.str=r._=r.KeywordCxt=void 0;var i=Jl();Object.defineProperty(r,"KeywordCxt",{enumerable:!0,get:function(){return i.KeywordCxt}});var u=Me();Object.defineProperty(r,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(r,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(r,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(r,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(r,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(r,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});const l=Dc(),c=Fl(),o=ov(),d=Mc(),h=Me(),m=Zl(),y=Hl(),S=Be(),N=Nb,x=Cb(),V=(R,z)=>new RegExp(R,z);V.code="new RegExp";const L=["removeAdditional","useDefaults","coerceTypes"],C=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),g={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},w={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},p=200;function b(R){var z,K,k,T,H,te,pe,ae,M,B,q,G,X,se,me,ye,Ae,Ie,Ue,Le,Re,He,tt,dt,Aa;const Un=R.strict,xr=(z=R.code)===null||z===void 0?void 0:z.optimize,cr=xr===!0||xr===void 0?1:xr||0,Li=(k=(K=R.code)===null||K===void 0?void 0:K.regExp)!==null&&k!==void 0?k:V,Vi=(T=R.uriResolver)!==null&&T!==void 0?T:x.default;return{strictSchema:(te=(H=R.strictSchema)!==null&&H!==void 0?H:Un)!==null&&te!==void 0?te:!0,strictNumbers:(ae=(pe=R.strictNumbers)!==null&&pe!==void 0?pe:Un)!==null&&ae!==void 0?ae:!0,strictTypes:(B=(M=R.strictTypes)!==null&&M!==void 0?M:Un)!==null&&B!==void 0?B:"log",strictTuples:(G=(q=R.strictTuples)!==null&&q!==void 0?q:Un)!==null&&G!==void 0?G:"log",strictRequired:(se=(X=R.strictRequired)!==null&&X!==void 0?X:Un)!==null&&se!==void 0?se:!1,code:R.code?{...R.code,optimize:cr,regExp:Li}:{optimize:cr,regExp:Li},loopRequired:(me=R.loopRequired)!==null&&me!==void 0?me:p,loopEnum:(ye=R.loopEnum)!==null&&ye!==void 0?ye:p,meta:(Ae=R.meta)!==null&&Ae!==void 0?Ae:!0,messages:(Ie=R.messages)!==null&&Ie!==void 0?Ie:!0,inlineRefs:(Ue=R.inlineRefs)!==null&&Ue!==void 0?Ue:!0,schemaId:(Le=R.schemaId)!==null&&Le!==void 0?Le:"$id",addUsedSchema:(Re=R.addUsedSchema)!==null&&Re!==void 0?Re:!0,validateSchema:(He=R.validateSchema)!==null&&He!==void 0?He:!0,validateFormats:(tt=R.validateFormats)!==null&&tt!==void 0?tt:!0,unicodeRegExp:(dt=R.unicodeRegExp)!==null&&dt!==void 0?dt:!0,int32range:(Aa=R.int32range)!==null&&Aa!==void 0?Aa:!0,uriResolver:Vi}}class E{constructor(z={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,z=this.opts={...z,...b(z)};const{es5:K,lines:k}=this.opts.code;this.scope=new h.ValueScope({scope:{},prefixes:C,es5:K,lines:k}),this.logger=Q(z.logger);const T=z.validateFormats;z.validateFormats=!1,this.RULES=(0,o.getRules)(),O.call(this,g,z,"NOT SUPPORTED"),O.call(this,w,z,"DEPRECATED","warn"),this._metaOpts=j.call(this),z.formats&&$.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),z.keywords&&D.call(this,z.keywords),typeof z.meta=="object"&&this.addMetaSchema(z.meta),A.call(this),z.validateFormats=T}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:z,meta:K,schemaId:k}=this.opts;let T=N;k==="id"&&(T={...N},T.id=T.$id,delete T.$id),K&&z&&this.addMetaSchema(T,T[k],!1)}defaultMeta(){const{meta:z,schemaId:K}=this.opts;return this.opts.defaultMeta=typeof z=="object"?z[K]||z:void 0}validate(z,K){let k;if(typeof z=="string"){if(k=this.getSchema(z),!k)throw new Error(`no schema with key or ref "${z}"`)}else k=this.compile(z);const T=k(K);return"$async"in k||(this.errors=k.errors),T}compile(z,K){const k=this._addSchema(z,K);return k.validate||this._compileSchemaEnv(k)}compileAsync(z,K){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:k}=this.opts;return T.call(this,z,K);async function T(B,q){await H.call(this,B.$schema);const G=this._addSchema(B,q);return G.validate||te.call(this,G)}async function H(B){B&&!this.getSchema(B)&&await T.call(this,{$ref:B},!0)}async function te(B){try{return this._compileSchemaEnv(B)}catch(q){if(!(q instanceof c.default))throw q;return pe.call(this,q),await ae.call(this,q.missingSchema),te.call(this,B)}}function pe({missingSchema:B,missingRef:q}){if(this.refs[B])throw new Error(`AnySchema ${B} is loaded but ${q} cannot be resolved`)}async function ae(B){const q=await M.call(this,B);this.refs[B]||await H.call(this,q.$schema),this.refs[B]||this.addSchema(q,B,K)}async function M(B){const q=this._loading[B];if(q)return q;try{return await(this._loading[B]=k(B))}finally{delete this._loading[B]}}}addSchema(z,K,k,T=this.opts.validateSchema){if(Array.isArray(z)){for(const te of z)this.addSchema(te,void 0,k,T);return this}let H;if(typeof z=="object"){const{schemaId:te}=this.opts;if(H=z[te],H!==void 0&&typeof H!="string")throw new Error(`schema ${te} must be string`)}return K=(0,m.normalizeId)(K||H),this._checkUnique(K),this.schemas[K]=this._addSchema(z,k,K,T,!0),this}addMetaSchema(z,K,k=this.opts.validateSchema){return this.addSchema(z,K,!0,k),this}validateSchema(z,K){if(typeof z=="boolean")return!0;let k;if(k=z.$schema,k!==void 0&&typeof k!="string")throw new Error("$schema must be a string");if(k=k||this.opts.defaultMeta||this.defaultMeta(),!k)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const T=this.validate(k,z);if(!T&&K){const H="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(H);else throw new Error(H)}return T}getSchema(z){let K;for(;typeof(K=v.call(this,z))=="string";)z=K;if(K===void 0){const{schemaId:k}=this.opts,T=new d.SchemaEnv({schema:{},schemaId:k});if(K=d.resolveSchema.call(this,T,z),!K)return;this.refs[z]=K}return K.validate||this._compileSchemaEnv(K)}removeSchema(z){if(z instanceof RegExp)return this._removeAllSchemas(this.schemas,z),this._removeAllSchemas(this.refs,z),this;switch(typeof z){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const K=v.call(this,z);return typeof K=="object"&&this._cache.delete(K.schema),delete this.schemas[z],delete this.refs[z],this}case"object":{const K=z;this._cache.delete(K);let k=z[this.opts.schemaId];return k&&(k=(0,m.normalizeId)(k),delete this.schemas[k],delete this.refs[k]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(z){for(const K of z)this.addKeyword(K);return this}addKeyword(z,K){let k;if(typeof z=="string")k=z,typeof K=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),K.keyword=k);else if(typeof z=="object"&&K===void 0){if(K=z,k=K.keyword,Array.isArray(k)&&!k.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(F.call(this,k,K),!K)return(0,S.eachItem)(k,H=>ne.call(this,H)),this;ue.call(this,K);const T={...K,type:(0,y.getJSONTypes)(K.type),schemaType:(0,y.getJSONTypes)(K.schemaType)};return(0,S.eachItem)(k,T.type.length===0?H=>ne.call(this,H,T):H=>T.type.forEach(te=>ne.call(this,H,T,te))),this}getKeyword(z){const K=this.RULES.all[z];return typeof K=="object"?K.definition:!!K}removeKeyword(z){const{RULES:K}=this;delete K.keywords[z],delete K.all[z];for(const k of K.rules){const T=k.rules.findIndex(H=>H.keyword===z);T>=0&&k.rules.splice(T,1)}return this}addFormat(z,K){return typeof K=="string"&&(K=new RegExp(K)),this.formats[z]=K,this}errorsText(z=this.errors,{separator:K=", ",dataVar:k="data"}={}){return!z||z.length===0?"No errors":z.map(T=>`${k}${T.instancePath} ${T.message}`).reduce((T,H)=>T+K+H)}$dataMetaSchema(z,K){const k=this.RULES.all;z=JSON.parse(JSON.stringify(z));for(const T of K){const H=T.split("/").slice(1);let te=z;for(const pe of H)te=te[pe];for(const pe in k){const ae=k[pe];if(typeof ae!="object")continue;const{$data:M}=ae.definition,B=te[pe];M&&B&&(te[pe]=de(B))}}return z}_removeAllSchemas(z,K){for(const k in z){const T=z[k];(!K||K.test(k))&&(typeof T=="string"?delete z[k]:T&&!T.meta&&(this._cache.delete(T.schema),delete z[k]))}}_addSchema(z,K,k,T=this.opts.validateSchema,H=this.opts.addUsedSchema){let te;const{schemaId:pe}=this.opts;if(typeof z=="object")te=z[pe];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof z!="boolean")throw new Error("schema must be object or boolean")}let ae=this._cache.get(z);if(ae!==void 0)return ae;k=(0,m.normalizeId)(te||k);const M=m.getSchemaRefs.call(this,z,k);return ae=new d.SchemaEnv({schema:z,schemaId:pe,meta:K,baseId:k,localRefs:M}),this._cache.set(ae.schema,ae),H&&!k.startsWith("#")&&(k&&this._checkUnique(k),this.refs[k]=ae),T&&this.validateSchema(z,!0),ae}_checkUnique(z){if(this.schemas[z]||this.refs[z])throw new Error(`schema with key or id "${z}" already exists`)}_compileSchemaEnv(z){if(z.meta?this._compileMetaSchema(z):d.compileSchema.call(this,z),!z.validate)throw new Error("ajv implementation error");return z.validate}_compileMetaSchema(z){const K=this.opts;this.opts=this._metaOpts;try{d.compileSchema.call(this,z)}finally{this.opts=K}}}E.ValidationError=l.default,E.MissingRefError=c.default,r.default=E;function O(R,z,K,k="error"){for(const T in R){const H=T;H in z&&this.logger[k](`${K}: option ${T}. ${R[H]}`)}}function v(R){return R=(0,m.normalizeId)(R),this.schemas[R]||this.refs[R]}function A(){const R=this.opts.schemas;if(R)if(Array.isArray(R))this.addSchema(R);else for(const z in R)this.addSchema(R[z],z)}function $(){for(const R in this.opts.formats){const z=this.opts.formats[R];z&&this.addFormat(R,z)}}function D(R){if(Array.isArray(R)){this.addVocabulary(R);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const z in R){const K=R[z];K.keyword||(K.keyword=z),this.addKeyword(K)}}function j(){const R={...this.opts};for(const z of L)delete R[z];return R}const Y={log(){},warn(){},error(){}};function Q(R){if(R===!1)return Y;if(R===void 0)return console;if(R.log&&R.warn&&R.error)return R;throw new Error("logger must implement log, warn and error methods")}const W=/^[a-z_$][a-z0-9_$:-]*$/i;function F(R,z){const{RULES:K}=this;if((0,S.eachItem)(R,k=>{if(K.keywords[k])throw new Error(`Keyword ${k} is already defined`);if(!W.test(k))throw new Error(`Keyword ${k} has invalid name`)}),!!z&&z.$data&&!("code"in z||"validate"in z))throw new Error('$data keyword must have "code" or "validate" function')}function ne(R,z,K){var k;const T=z==null?void 0:z.post;if(K&&T)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:H}=this;let te=T?H.post:H.rules.find(({type:ae})=>ae===K);if(te||(te={type:K,rules:[]},H.rules.push(te)),H.keywords[R]=!0,!z)return;const pe={keyword:R,definition:{...z,type:(0,y.getJSONTypes)(z.type),schemaType:(0,y.getJSONTypes)(z.schemaType)}};z.before?P.call(this,te,pe,z.before):te.rules.push(pe),H.all[R]=pe,(k=z.implements)===null||k===void 0||k.forEach(ae=>this.addKeyword(ae))}function P(R,z,K){const k=R.rules.findIndex(T=>T.keyword===K);k>=0?R.rules.splice(k,0,z):(R.rules.push(z),this.logger.warn(`rule ${K} is not defined`))}function ue(R){let{metaSchema:z}=R;z!==void 0&&(R.$data&&this.opts.$data&&(z=de(z)),R.validateSchema=this.compile(z,!0))}const re={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function de(R){return{anyOf:[R,re]}}}(vf)),vf}var el={},tl={},nl={},oy;function Ub(){if(oy)return nl;oy=1,Object.defineProperty(nl,"__esModule",{value:!0});const r={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return nl.default=r,nl}var sr={},fy;function Lb(){if(fy)return sr;fy=1,Object.defineProperty(sr,"__esModule",{value:!0}),sr.callRef=sr.getValidate=void 0;const r=Fl(),i=an(),u=Me(),l=fr(),c=Mc(),o=Be(),d={keyword:"$ref",schemaType:"string",code(y){const{gen:S,schema:N,it:x}=y,{baseId:V,schemaEnv:L,validateName:C,opts:g,self:w}=x,{root:p}=L;if((N==="#"||N==="#/")&&V===p.baseId)return E();const b=c.resolveRef.call(w,p,V,N);if(b===void 0)throw new r.default(x.opts.uriResolver,V,N);if(b instanceof c.SchemaEnv)return O(b);return v(b);function E(){if(L===p)return m(y,C,L,L.$async);const A=S.scopeValue("root",{ref:p});return m(y,(0,u._)`${A}.validate`,p,p.$async)}function O(A){const $=h(y,A);m(y,$,A,A.$async)}function v(A){const $=S.scopeValue("schema",g.code.source===!0?{ref:A,code:(0,u.stringify)(A)}:{ref:A}),D=S.name("valid"),j=y.subschema({schema:A,dataTypes:[],schemaPath:u.nil,topSchemaRef:$,errSchemaPath:N},D);y.mergeEvaluated(j),y.ok(D)}}};function h(y,S){const{gen:N}=y;return S.validate?N.scopeValue("validate",{ref:S.validate}):(0,u._)`${N.scopeValue("wrapper",{ref:S})}.validate`}sr.getValidate=h;function m(y,S,N,x){const{gen:V,it:L}=y,{allErrors:C,schemaEnv:g,opts:w}=L,p=w.passContext?l.default.this:u.nil;x?b():E();function b(){if(!g.$async)throw new Error("async schema referenced by sync schema");const A=V.let("valid");V.try(()=>{V.code((0,u._)`await ${(0,i.callValidateCode)(y,S,p)}`),v(S),C||V.assign(A,!0)},$=>{V.if((0,u._)`!(${$} instanceof ${L.ValidationError})`,()=>V.throw($)),O($),C||V.assign(A,!1)}),y.ok(A)}function E(){y.result((0,i.callValidateCode)(y,S,p),()=>v(S),()=>O(S))}function O(A){const $=(0,u._)`${A}.errors`;V.assign(l.default.vErrors,(0,u._)`${l.default.vErrors} === null ? ${$} : ${l.default.vErrors}.concat(${$})`),V.assign(l.default.errors,(0,u._)`${l.default.vErrors}.length`)}function v(A){var $;if(!L.opts.unevaluated)return;const D=($=N==null?void 0:N.validate)===null||$===void 0?void 0:$.evaluated;if(L.props!==!0)if(D&&!D.dynamicProps)D.props!==void 0&&(L.props=o.mergeEvaluated.props(V,D.props,L.props));else{const j=V.var("props",(0,u._)`${A}.evaluated.props`);L.props=o.mergeEvaluated.props(V,j,L.props,u.Name)}if(L.items!==!0)if(D&&!D.dynamicItems)D.items!==void 0&&(L.items=o.mergeEvaluated.items(V,D.items,L.items));else{const j=V.var("items",(0,u._)`${A}.evaluated.items`);L.items=o.mergeEvaluated.items(V,j,L.items,u.Name)}}}return sr.callRef=m,sr.default=d,sr}var cy;function Vb(){if(cy)return tl;cy=1,Object.defineProperty(tl,"__esModule",{value:!0});const r=Ub(),i=Lb(),u=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",r.default,i.default];return tl.default=u,tl}var rl={},al={},dy;function xb(){if(dy)return al;dy=1,Object.defineProperty(al,"__esModule",{value:!0});const r=Me(),i=r.operators,u={maximum:{okStr:"<=",ok:i.LTE,fail:i.GT},minimum:{okStr:">=",ok:i.GTE,fail:i.LT},exclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},exclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}},l={message:({keyword:o,schemaCode:d})=>(0,r.str)`must be ${u[o].okStr} ${d}`,params:({keyword:o,schemaCode:d})=>(0,r._)`{comparison: ${u[o].okStr}, limit: ${d}}`},c={keyword:Object.keys(u),type:"number",schemaType:"number",$data:!0,error:l,code(o){const{keyword:d,data:h,schemaCode:m}=o;o.fail$data((0,r._)`${h} ${u[d].fail} ${m} || isNaN(${h})`)}};return al.default=c,al}var il={},hy;function Bb(){if(hy)return il;hy=1,Object.defineProperty(il,"__esModule",{value:!0});const r=Me(),u={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:l})=>(0,r.str)`must be multiple of ${l}`,params:({schemaCode:l})=>(0,r._)`{multipleOf: ${l}}`},code(l){const{gen:c,data:o,schemaCode:d,it:h}=l,m=h.opts.multipleOfPrecision,y=c.let("res"),S=m?(0,r._)`Math.abs(Math.round(${y}) - ${y}) > 1e-${m}`:(0,r._)`${y} !== parseInt(${y})`;l.fail$data((0,r._)`(${d} === 0 || (${y} = ${o}/${d}, ${S}))`)}};return il.default=u,il}var sl={},ll={},my;function Hb(){if(my)return ll;my=1,Object.defineProperty(ll,"__esModule",{value:!0});function r(i){const u=i.length;let l=0,c=0,o;for(;c=55296&&o<=56319&&c(0,r._)`{limit: ${o}}`},code(o){const{keyword:d,data:h,schemaCode:m,it:y}=o,S=d==="maxLength"?r.operators.GT:r.operators.LT,N=y.opts.unicode===!1?(0,r._)`${h}.length`:(0,r._)`${(0,i.useFunc)(o.gen,u.default)}(${h})`;o.fail$data((0,r._)`${N} ${S} ${m}`)}};return sl.default=c,sl}var ul={},yy;function Ib(){if(yy)return ul;yy=1,Object.defineProperty(ul,"__esModule",{value:!0});const r=an(),i=Me(),l={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:c})=>(0,i.str)`must match pattern "${c}"`,params:({schemaCode:c})=>(0,i._)`{pattern: ${c}}`},code(c){const{data:o,$data:d,schema:h,schemaCode:m,it:y}=c,S=y.opts.unicodeRegExp?"u":"",N=d?(0,i._)`(new RegExp(${m}, ${S}))`:(0,r.usePattern)(c,h);c.fail$data((0,i._)`!${N}.test(${o})`)}};return ul.default=l,ul}var ol={},gy;function Yb(){if(gy)return ol;gy=1,Object.defineProperty(ol,"__esModule",{value:!0});const r=Me(),u={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:l,schemaCode:c}){const o=l==="maxProperties"?"more":"fewer";return(0,r.str)`must NOT have ${o} than ${c} properties`},params:({schemaCode:l})=>(0,r._)`{limit: ${l}}`},code(l){const{keyword:c,data:o,schemaCode:d}=l,h=c==="maxProperties"?r.operators.GT:r.operators.LT;l.fail$data((0,r._)`Object.keys(${o}).length ${h} ${d}`)}};return ol.default=u,ol}var fl={},vy;function kb(){if(vy)return fl;vy=1,Object.defineProperty(fl,"__esModule",{value:!0});const r=an(),i=Me(),u=Be(),c={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:o}})=>(0,i.str)`must have required property '${o}'`,params:({params:{missingProperty:o}})=>(0,i._)`{missingProperty: ${o}}`},code(o){const{gen:d,schema:h,schemaCode:m,data:y,$data:S,it:N}=o,{opts:x}=N;if(!S&&h.length===0)return;const V=h.length>=x.loopRequired;if(N.allErrors?L():C(),x.strictRequired){const p=o.parentSchema.properties,{definedProperties:b}=o.it;for(const E of h)if((p==null?void 0:p[E])===void 0&&!b.has(E)){const O=N.schemaEnv.baseId+N.errSchemaPath,v=`required property "${E}" is not defined at "${O}" (strictRequired)`;(0,u.checkStrictMode)(N,v,N.opts.strictRequired)}}function L(){if(V||S)o.block$data(i.nil,g);else for(const p of h)(0,r.checkReportMissingProp)(o,p)}function C(){const p=d.let("missing");if(V||S){const b=d.let("valid",!0);o.block$data(b,()=>w(p,b)),o.ok(b)}else d.if((0,r.checkMissingProp)(o,h,p)),(0,r.reportMissingProp)(o,p),d.else()}function g(){d.forOf("prop",m,p=>{o.setParams({missingProperty:p}),d.if((0,r.noPropertyInData)(d,y,p,x.ownProperties),()=>o.error())})}function w(p,b){o.setParams({missingProperty:p}),d.forOf(p,m,()=>{d.assign(b,(0,r.propertyInData)(d,y,p,x.ownProperties)),d.if((0,i.not)(b),()=>{o.error(),d.break()})},i.nil)}}};return fl.default=c,fl}var cl={},by;function Pb(){if(by)return cl;by=1,Object.defineProperty(cl,"__esModule",{value:!0});const r=Me(),u={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:l,schemaCode:c}){const o=l==="maxItems"?"more":"fewer";return(0,r.str)`must NOT have ${o} than ${c} items`},params:({schemaCode:l})=>(0,r._)`{limit: ${l}}`},code(l){const{keyword:c,data:o,schemaCode:d}=l,h=c==="maxItems"?r.operators.GT:r.operators.LT;l.fail$data((0,r._)`${o}.length ${h} ${d}`)}};return cl.default=u,cl}var dl={},hl={},Ey;function qc(){if(Ey)return hl;Ey=1,Object.defineProperty(hl,"__esModule",{value:!0});const r=cv();return r.code='require("ajv/dist/runtime/equal").default',hl.default=r,hl}var _y;function Kb(){if(_y)return dl;_y=1,Object.defineProperty(dl,"__esModule",{value:!0});const r=Hl(),i=Me(),u=Be(),l=qc(),o={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:d,j:h}})=>(0,i.str)`must NOT have duplicate items (items ## ${h} and ${d} are identical)`,params:({params:{i:d,j:h}})=>(0,i._)`{i: ${d}, j: ${h}}`},code(d){const{gen:h,data:m,$data:y,schema:S,parentSchema:N,schemaCode:x,it:V}=d;if(!y&&!S)return;const L=h.let("valid"),C=N.items?(0,r.getSchemaTypes)(N.items):[];d.block$data(L,g,(0,i._)`${x} === false`),d.ok(L);function g(){const E=h.let("i",(0,i._)`${m}.length`),O=h.let("j");d.setParams({i:E,j:O}),h.assign(L,!0),h.if((0,i._)`${E} > 1`,()=>(w()?p:b)(E,O))}function w(){return C.length>0&&!C.some(E=>E==="object"||E==="array")}function p(E,O){const v=h.name("item"),A=(0,r.checkDataTypes)(C,v,V.opts.strictNumbers,r.DataType.Wrong),$=h.const("indices",(0,i._)`{}`);h.for((0,i._)`;${E}--;`,()=>{h.let(v,(0,i._)`${m}[${E}]`),h.if(A,(0,i._)`continue`),C.length>1&&h.if((0,i._)`typeof ${v} == "string"`,(0,i._)`${v} += "_"`),h.if((0,i._)`typeof ${$}[${v}] == "number"`,()=>{h.assign(O,(0,i._)`${$}[${v}]`),d.error(),h.assign(L,!1).break()}).code((0,i._)`${$}[${v}] = ${E}`)})}function b(E,O){const v=(0,u.useFunc)(h,l.default),A=h.name("outer");h.label(A).for((0,i._)`;${E}--;`,()=>h.for((0,i._)`${O} = ${E}; ${O}--;`,()=>h.if((0,i._)`${v}(${m}[${E}], ${m}[${O}])`,()=>{d.error(),h.assign(L,!1).break(A)})))}}};return dl.default=o,dl}var ml={},Sy;function Xb(){if(Sy)return ml;Sy=1,Object.defineProperty(ml,"__esModule",{value:!0});const r=Me(),i=Be(),u=qc(),c={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:o})=>(0,r._)`{allowedValue: ${o}}`},code(o){const{gen:d,data:h,$data:m,schemaCode:y,schema:S}=o;m||S&&typeof S=="object"?o.fail$data((0,r._)`!${(0,i.useFunc)(d,u.default)}(${h}, ${y})`):o.fail((0,r._)`${S} !== ${h}`)}};return ml.default=c,ml}var pl={},wy;function Qb(){if(wy)return pl;wy=1,Object.defineProperty(pl,"__esModule",{value:!0});const r=Me(),i=Be(),u=qc(),c={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:o})=>(0,r._)`{allowedValues: ${o}}`},code(o){const{gen:d,data:h,$data:m,schema:y,schemaCode:S,it:N}=o;if(!m&&y.length===0)throw new Error("enum must have non-empty array");const x=y.length>=N.opts.loopEnum;let V;const L=()=>V??(V=(0,i.useFunc)(d,u.default));let C;if(x||m)C=d.let("valid"),o.block$data(C,g);else{if(!Array.isArray(y))throw new Error("ajv implementation error");const p=d.const("vSchema",S);C=(0,r.or)(...y.map((b,E)=>w(p,E)))}o.pass(C);function g(){d.assign(C,!1),d.forOf("v",S,p=>d.if((0,r._)`${L()}(${h}, ${p})`,()=>d.assign(C,!0).break()))}function w(p,b){const E=y[b];return typeof E=="object"&&E!==null?(0,r._)`${L()}(${h}, ${p}[${b}])`:(0,r._)`${h} === ${E}`}}};return pl.default=c,pl}var $y;function Zb(){if($y)return rl;$y=1,Object.defineProperty(rl,"__esModule",{value:!0});const r=xb(),i=Bb(),u=Gb(),l=Ib(),c=Yb(),o=kb(),d=Pb(),h=Kb(),m=Xb(),y=Qb(),S=[r.default,i.default,u.default,l.default,c.default,o.default,d.default,h.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},m.default,y.default];return rl.default=S,rl}var yl={},_a={},Oy;function dv(){if(Oy)return _a;Oy=1,Object.defineProperty(_a,"__esModule",{value:!0}),_a.validateAdditionalItems=void 0;const r=Me(),i=Be(),l={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:o}})=>(0,r.str)`must NOT have more than ${o} items`,params:({params:{len:o}})=>(0,r._)`{limit: ${o}}`},code(o){const{parentSchema:d,it:h}=o,{items:m}=d;if(!Array.isArray(m)){(0,i.checkStrictMode)(h,'"additionalItems" is ignored when "items" is not an array of schemas');return}c(o,m)}};function c(o,d){const{gen:h,schema:m,data:y,keyword:S,it:N}=o;N.items=!0;const x=h.const("len",(0,r._)`${y}.length`);if(m===!1)o.setParams({len:d.length}),o.pass((0,r._)`${x} <= ${d.length}`);else if(typeof m=="object"&&!(0,i.alwaysValidSchema)(N,m)){const L=h.var("valid",(0,r._)`${x} <= ${d.length}`);h.if((0,r.not)(L),()=>V(L)),o.ok(L)}function V(L){h.forRange("i",d.length,x,C=>{o.subschema({keyword:S,dataProp:C,dataPropType:i.Type.Num},L),N.allErrors||h.if((0,r.not)(L),()=>h.break())})}}return _a.validateAdditionalItems=c,_a.default=l,_a}var gl={},Sa={},Ay;function hv(){if(Ay)return Sa;Ay=1,Object.defineProperty(Sa,"__esModule",{value:!0}),Sa.validateTuple=void 0;const r=Me(),i=Be(),u=an(),l={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(o){const{schema:d,it:h}=o;if(Array.isArray(d))return c(o,"additionalItems",d);h.items=!0,!(0,i.alwaysValidSchema)(h,d)&&o.ok((0,u.validateArray)(o))}};function c(o,d,h=o.schema){const{gen:m,parentSchema:y,data:S,keyword:N,it:x}=o;C(y),x.opts.unevaluated&&h.length&&x.items!==!0&&(x.items=i.mergeEvaluated.items(m,h.length,x.items));const V=m.name("valid"),L=m.const("len",(0,r._)`${S}.length`);h.forEach((g,w)=>{(0,i.alwaysValidSchema)(x,g)||(m.if((0,r._)`${L} > ${w}`,()=>o.subschema({keyword:N,schemaProp:w,dataProp:w},V)),o.ok(V))});function C(g){const{opts:w,errSchemaPath:p}=x,b=h.length,E=b===g.minItems&&(b===g.maxItems||g[d]===!1);if(w.strictTuples&&!E){const O=`"${N}" is ${b}-tuple, but minItems or maxItems/${d} are not specified or different at path "${p}"`;(0,i.checkStrictMode)(x,O,w.strictTuples)}}}return Sa.validateTuple=c,Sa.default=l,Sa}var Ry;function Jb(){if(Ry)return gl;Ry=1,Object.defineProperty(gl,"__esModule",{value:!0});const r=hv(),i={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:u=>(0,r.validateTuple)(u,"items")};return gl.default=i,gl}var vl={},Ty;function Fb(){if(Ty)return vl;Ty=1,Object.defineProperty(vl,"__esModule",{value:!0});const r=Me(),i=Be(),u=an(),l=dv(),o={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:d}})=>(0,r.str)`must NOT have more than ${d} items`,params:({params:{len:d}})=>(0,r._)`{limit: ${d}}`},code(d){const{schema:h,parentSchema:m,it:y}=d,{prefixItems:S}=m;y.items=!0,!(0,i.alwaysValidSchema)(y,h)&&(S?(0,l.validateAdditionalItems)(d,S):d.ok((0,u.validateArray)(d)))}};return vl.default=o,vl}var bl={},Ny;function Wb(){if(Ny)return bl;Ny=1,Object.defineProperty(bl,"__esModule",{value:!0});const r=Me(),i=Be(),l={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:c,max:o}})=>o===void 0?(0,r.str)`must contain at least ${c} valid item(s)`:(0,r.str)`must contain at least ${c} and no more than ${o} valid item(s)`,params:({params:{min:c,max:o}})=>o===void 0?(0,r._)`{minContains: ${c}}`:(0,r._)`{minContains: ${c}, maxContains: ${o}}`},code(c){const{gen:o,schema:d,parentSchema:h,data:m,it:y}=c;let S,N;const{minContains:x,maxContains:V}=h;y.opts.next?(S=x===void 0?1:x,N=V):S=1;const L=o.const("len",(0,r._)`${m}.length`);if(c.setParams({min:S,max:N}),N===void 0&&S===0){(0,i.checkStrictMode)(y,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(N!==void 0&&S>N){(0,i.checkStrictMode)(y,'"minContains" > "maxContains" is always invalid'),c.fail();return}if((0,i.alwaysValidSchema)(y,d)){let b=(0,r._)`${L} >= ${S}`;N!==void 0&&(b=(0,r._)`${b} && ${L} <= ${N}`),c.pass(b);return}y.items=!0;const C=o.name("valid");N===void 0&&S===1?w(C,()=>o.if(C,()=>o.break())):S===0?(o.let(C,!0),N!==void 0&&o.if((0,r._)`${m}.length > 0`,g)):(o.let(C,!1),g()),c.result(C,()=>c.reset());function g(){const b=o.name("_valid"),E=o.let("count",0);w(b,()=>o.if(b,()=>p(E)))}function w(b,E){o.forRange("i",0,L,O=>{c.subschema({keyword:"contains",dataProp:O,dataPropType:i.Type.Num,compositeRule:!0},b),E()})}function p(b){o.code((0,r._)`${b}++`),N===void 0?o.if((0,r._)`${b} >= ${S}`,()=>o.assign(C,!0).break()):(o.if((0,r._)`${b} > ${N}`,()=>o.assign(C,!1).break()),S===1?o.assign(C,!0):o.if((0,r._)`${b} >= ${S}`,()=>o.assign(C,!0)))}}};return bl.default=l,bl}var Tf={},jy;function eE(){return jy||(jy=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.validateSchemaDeps=r.validatePropertyDeps=r.error=void 0;const i=Me(),u=Be(),l=an();r.error={message:({params:{property:m,depsCount:y,deps:S}})=>{const N=y===1?"property":"properties";return(0,i.str)`must have ${N} ${S} when property ${m} is present`},params:({params:{property:m,depsCount:y,deps:S,missingProperty:N}})=>(0,i._)`{property: ${m}, missingProperty: ${N}, depsCount: ${y}, deps: ${S}}`};const c={keyword:"dependencies",type:"object",schemaType:"object",error:r.error,code(m){const[y,S]=o(m);d(m,y),h(m,S)}};function o({schema:m}){const y={},S={};for(const N in m){if(N==="__proto__")continue;const x=Array.isArray(m[N])?y:S;x[N]=m[N]}return[y,S]}function d(m,y=m.schema){const{gen:S,data:N,it:x}=m;if(Object.keys(y).length===0)return;const V=S.let("missing");for(const L in y){const C=y[L];if(C.length===0)continue;const g=(0,l.propertyInData)(S,N,L,x.opts.ownProperties);m.setParams({property:L,depsCount:C.length,deps:C.join(", ")}),x.allErrors?S.if(g,()=>{for(const w of C)(0,l.checkReportMissingProp)(m,w)}):(S.if((0,i._)`${g} && (${(0,l.checkMissingProp)(m,C,V)})`),(0,l.reportMissingProp)(m,V),S.else())}}r.validatePropertyDeps=d;function h(m,y=m.schema){const{gen:S,data:N,keyword:x,it:V}=m,L=S.name("valid");for(const C in y)(0,u.alwaysValidSchema)(V,y[C])||(S.if((0,l.propertyInData)(S,N,C,V.opts.ownProperties),()=>{const g=m.subschema({keyword:x,schemaProp:C},L);m.mergeValidEvaluated(g,L)},()=>S.var(L,!0)),m.ok(L))}r.validateSchemaDeps=h,r.default=c}(Tf)),Tf}var El={},Dy;function tE(){if(Dy)return El;Dy=1,Object.defineProperty(El,"__esModule",{value:!0});const r=Me(),i=Be(),l={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:c})=>(0,r._)`{propertyName: ${c.propertyName}}`},code(c){const{gen:o,schema:d,data:h,it:m}=c;if((0,i.alwaysValidSchema)(m,d))return;const y=o.name("valid");o.forIn("key",h,S=>{c.setParams({propertyName:S}),c.subschema({keyword:"propertyNames",data:S,dataTypes:["string"],propertyName:S,compositeRule:!0},y),o.if((0,r.not)(y),()=>{c.error(!0),m.allErrors||o.break()})}),c.ok(y)}};return El.default=l,El}var _l={},My;function mv(){if(My)return _l;My=1,Object.defineProperty(_l,"__esModule",{value:!0});const r=an(),i=Me(),u=fr(),l=Be(),o={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:d})=>(0,i._)`{additionalProperty: ${d.additionalProperty}}`},code(d){const{gen:h,schema:m,parentSchema:y,data:S,errsCount:N,it:x}=d;if(!N)throw new Error("ajv implementation error");const{allErrors:V,opts:L}=x;if(x.props=!0,L.removeAdditional!=="all"&&(0,l.alwaysValidSchema)(x,m))return;const C=(0,r.allSchemaProperties)(y.properties),g=(0,r.allSchemaProperties)(y.patternProperties);w(),d.ok((0,i._)`${N} === ${u.default.errors}`);function w(){h.forIn("key",S,v=>{!C.length&&!g.length?E(v):h.if(p(v),()=>E(v))})}function p(v){let A;if(C.length>8){const $=(0,l.schemaRefOrVal)(x,y.properties,"properties");A=(0,r.isOwnProperty)(h,$,v)}else C.length?A=(0,i.or)(...C.map($=>(0,i._)`${v} === ${$}`)):A=i.nil;return g.length&&(A=(0,i.or)(A,...g.map($=>(0,i._)`${(0,r.usePattern)(d,$)}.test(${v})`))),(0,i.not)(A)}function b(v){h.code((0,i._)`delete ${S}[${v}]`)}function E(v){if(L.removeAdditional==="all"||L.removeAdditional&&m===!1){b(v);return}if(m===!1){d.setParams({additionalProperty:v}),d.error(),V||h.break();return}if(typeof m=="object"&&!(0,l.alwaysValidSchema)(x,m)){const A=h.name("valid");L.removeAdditional==="failing"?(O(v,A,!1),h.if((0,i.not)(A),()=>{d.reset(),b(v)})):(O(v,A),V||h.if((0,i.not)(A),()=>h.break()))}}function O(v,A,$){const D={keyword:"additionalProperties",dataProp:v,dataPropType:l.Type.Str};$===!1&&Object.assign(D,{compositeRule:!0,createErrors:!1,allErrors:!1}),d.subschema(D,A)}}};return _l.default=o,_l}var Sl={},qy;function nE(){if(qy)return Sl;qy=1,Object.defineProperty(Sl,"__esModule",{value:!0});const r=Jl(),i=an(),u=Be(),l=mv(),c={keyword:"properties",type:"object",schemaType:"object",code(o){const{gen:d,schema:h,parentSchema:m,data:y,it:S}=o;S.opts.removeAdditional==="all"&&m.additionalProperties===void 0&&l.default.code(new r.KeywordCxt(S,l.default,"additionalProperties"));const N=(0,i.allSchemaProperties)(h);for(const g of N)S.definedProperties.add(g);S.opts.unevaluated&&N.length&&S.props!==!0&&(S.props=u.mergeEvaluated.props(d,(0,u.toHash)(N),S.props));const x=N.filter(g=>!(0,u.alwaysValidSchema)(S,h[g]));if(x.length===0)return;const V=d.name("valid");for(const g of x)L(g)?C(g):(d.if((0,i.propertyInData)(d,y,g,S.opts.ownProperties)),C(g),S.allErrors||d.else().var(V,!0),d.endIf()),o.it.definedProperties.add(g),o.ok(V);function L(g){return S.opts.useDefaults&&!S.compositeRule&&h[g].default!==void 0}function C(g){o.subschema({keyword:"properties",schemaProp:g,dataProp:g},V)}}};return Sl.default=c,Sl}var wl={},Cy;function rE(){if(Cy)return wl;Cy=1,Object.defineProperty(wl,"__esModule",{value:!0});const r=an(),i=Me(),u=Be(),l=Be(),c={keyword:"patternProperties",type:"object",schemaType:"object",code(o){const{gen:d,schema:h,data:m,parentSchema:y,it:S}=o,{opts:N}=S,x=(0,r.allSchemaProperties)(h),V=x.filter(E=>(0,u.alwaysValidSchema)(S,h[E]));if(x.length===0||V.length===x.length&&(!S.opts.unevaluated||S.props===!0))return;const L=N.strictSchema&&!N.allowMatchingProperties&&y.properties,C=d.name("valid");S.props!==!0&&!(S.props instanceof i.Name)&&(S.props=(0,l.evaluatedPropsToName)(d,S.props));const{props:g}=S;w();function w(){for(const E of x)L&&p(E),S.allErrors?b(E):(d.var(C,!0),b(E),d.if(C))}function p(E){for(const O in L)new RegExp(E).test(O)&&(0,u.checkStrictMode)(S,`property ${O} matches pattern ${E} (use allowMatchingProperties)`)}function b(E){d.forIn("key",m,O=>{d.if((0,i._)`${(0,r.usePattern)(o,E)}.test(${O})`,()=>{const v=V.includes(E);v||o.subschema({keyword:"patternProperties",schemaProp:E,dataProp:O,dataPropType:l.Type.Str},C),S.opts.unevaluated&&g!==!0?d.assign((0,i._)`${g}[${O}]`,!0):!v&&!S.allErrors&&d.if((0,i.not)(C),()=>d.break())})})}}};return wl.default=c,wl}var $l={},zy;function aE(){if(zy)return $l;zy=1,Object.defineProperty($l,"__esModule",{value:!0});const r=Be(),i={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(u){const{gen:l,schema:c,it:o}=u;if((0,r.alwaysValidSchema)(o,c)){u.fail();return}const d=l.name("valid");u.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},d),u.failResult(d,()=>u.reset(),()=>u.error())},error:{message:"must NOT be valid"}};return $l.default=i,$l}var Ol={},Uy;function iE(){if(Uy)return Ol;Uy=1,Object.defineProperty(Ol,"__esModule",{value:!0});const i={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:an().validateUnion,error:{message:"must match a schema in anyOf"}};return Ol.default=i,Ol}var Al={},Ly;function sE(){if(Ly)return Al;Ly=1,Object.defineProperty(Al,"__esModule",{value:!0});const r=Me(),i=Be(),l={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:c})=>(0,r._)`{passingSchemas: ${c.passing}}`},code(c){const{gen:o,schema:d,parentSchema:h,it:m}=c;if(!Array.isArray(d))throw new Error("ajv implementation error");if(m.opts.discriminator&&h.discriminator)return;const y=d,S=o.let("valid",!1),N=o.let("passing",null),x=o.name("_valid");c.setParams({passing:N}),o.block(V),c.result(S,()=>c.reset(),()=>c.error(!0));function V(){y.forEach((L,C)=>{let g;(0,i.alwaysValidSchema)(m,L)?o.var(x,!0):g=c.subschema({keyword:"oneOf",schemaProp:C,compositeRule:!0},x),C>0&&o.if((0,r._)`${x} && ${S}`).assign(S,!1).assign(N,(0,r._)`[${N}, ${C}]`).else(),o.if(x,()=>{o.assign(S,!0),o.assign(N,C),g&&c.mergeEvaluated(g,r.Name)})})}}};return Al.default=l,Al}var Rl={},Vy;function lE(){if(Vy)return Rl;Vy=1,Object.defineProperty(Rl,"__esModule",{value:!0});const r=Be(),i={keyword:"allOf",schemaType:"array",code(u){const{gen:l,schema:c,it:o}=u;if(!Array.isArray(c))throw new Error("ajv implementation error");const d=l.name("valid");c.forEach((h,m)=>{if((0,r.alwaysValidSchema)(o,h))return;const y=u.subschema({keyword:"allOf",schemaProp:m},d);u.ok(d),u.mergeEvaluated(y)})}};return Rl.default=i,Rl}var Tl={},xy;function uE(){if(xy)return Tl;xy=1,Object.defineProperty(Tl,"__esModule",{value:!0});const r=Me(),i=Be(),l={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:o})=>(0,r.str)`must match "${o.ifClause}" schema`,params:({params:o})=>(0,r._)`{failingKeyword: ${o.ifClause}}`},code(o){const{gen:d,parentSchema:h,it:m}=o;h.then===void 0&&h.else===void 0&&(0,i.checkStrictMode)(m,'"if" without "then" and "else" is ignored');const y=c(m,"then"),S=c(m,"else");if(!y&&!S)return;const N=d.let("valid",!0),x=d.name("_valid");if(V(),o.reset(),y&&S){const C=d.let("ifClause");o.setParams({ifClause:C}),d.if(x,L("then",C),L("else",C))}else y?d.if(x,L("then")):d.if((0,r.not)(x),L("else"));o.pass(N,()=>o.error(!0));function V(){const C=o.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},x);o.mergeEvaluated(C)}function L(C,g){return()=>{const w=o.subschema({keyword:C},x);d.assign(N,x),o.mergeValidEvaluated(w,N),g?d.assign(g,(0,r._)`${C}`):o.setParams({ifClause:C})}}}};function c(o,d){const h=o.schema[d];return h!==void 0&&!(0,i.alwaysValidSchema)(o,h)}return Tl.default=l,Tl}var Nl={},By;function oE(){if(By)return Nl;By=1,Object.defineProperty(Nl,"__esModule",{value:!0});const r=Be(),i={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:u,parentSchema:l,it:c}){l.if===void 0&&(0,r.checkStrictMode)(c,`"${u}" without "if" is ignored`)}};return Nl.default=i,Nl}var Hy;function fE(){if(Hy)return yl;Hy=1,Object.defineProperty(yl,"__esModule",{value:!0});const r=dv(),i=Jb(),u=hv(),l=Fb(),c=Wb(),o=eE(),d=tE(),h=mv(),m=nE(),y=rE(),S=aE(),N=iE(),x=sE(),V=lE(),L=uE(),C=oE();function g(w=!1){const p=[S.default,N.default,x.default,V.default,L.default,C.default,d.default,h.default,o.default,m.default,y.default];return w?p.push(i.default,l.default):p.push(r.default,u.default),p.push(c.default),p}return yl.default=g,yl}var jl={},Dl={},Gy;function cE(){if(Gy)return Dl;Gy=1,Object.defineProperty(Dl,"__esModule",{value:!0});const r=Me(),u={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:l})=>(0,r.str)`must match format "${l}"`,params:({schemaCode:l})=>(0,r._)`{format: ${l}}`},code(l,c){const{gen:o,data:d,$data:h,schema:m,schemaCode:y,it:S}=l,{opts:N,errSchemaPath:x,schemaEnv:V,self:L}=S;if(!N.validateFormats)return;h?C():g();function C(){const w=o.scopeValue("formats",{ref:L.formats,code:N.code.formats}),p=o.const("fDef",(0,r._)`${w}[${y}]`),b=o.let("fType"),E=o.let("format");o.if((0,r._)`typeof ${p} == "object" && !(${p} instanceof RegExp)`,()=>o.assign(b,(0,r._)`${p}.type || "string"`).assign(E,(0,r._)`${p}.validate`),()=>o.assign(b,(0,r._)`"string"`).assign(E,p)),l.fail$data((0,r.or)(O(),v()));function O(){return N.strictSchema===!1?r.nil:(0,r._)`${y} && !${E}`}function v(){const A=V.$async?(0,r._)`(${p}.async ? await ${E}(${d}) : ${E}(${d}))`:(0,r._)`${E}(${d})`,$=(0,r._)`(typeof ${E} == "function" ? ${A} : ${E}.test(${d}))`;return(0,r._)`${E} && ${E} !== true && ${b} === ${c} && !${$}`}}function g(){const w=L.formats[m];if(!w){O();return}if(w===!0)return;const[p,b,E]=v(w);p===c&&l.pass(A());function O(){if(N.strictSchema===!1){L.logger.warn($());return}throw new Error($());function $(){return`unknown format "${m}" ignored in schema at path "${x}"`}}function v($){const D=$ instanceof RegExp?(0,r.regexpCode)($):N.code.formats?(0,r._)`${N.code.formats}${(0,r.getProperty)(m)}`:void 0,j=o.scopeValue("formats",{key:m,ref:$,code:D});return typeof $=="object"&&!($ instanceof RegExp)?[$.type||"string",$.validate,(0,r._)`${j}.validate`]:["string",$,j]}function A(){if(typeof w=="object"&&!(w instanceof RegExp)&&w.async){if(!V.$async)throw new Error("async format in sync schema");return(0,r._)`await ${E}(${d})`}return typeof b=="function"?(0,r._)`${E}(${d})`:(0,r._)`${E}.test(${d})`}}}};return Dl.default=u,Dl}var Iy;function dE(){if(Iy)return jl;Iy=1,Object.defineProperty(jl,"__esModule",{value:!0});const i=[cE().default];return jl.default=i,jl}var Ur={},Yy;function hE(){return Yy||(Yy=1,Object.defineProperty(Ur,"__esModule",{value:!0}),Ur.contentVocabulary=Ur.metadataVocabulary=void 0,Ur.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Ur.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Ur}var ky;function mE(){if(ky)return el;ky=1,Object.defineProperty(el,"__esModule",{value:!0});const r=Vb(),i=Zb(),u=fE(),l=dE(),c=hE(),o=[r.default,i.default,(0,u.default)(),l.default,c.metadataVocabulary,c.contentVocabulary];return el.default=o,el}var Ml={},Ri={},Py;function pE(){if(Py)return Ri;Py=1,Object.defineProperty(Ri,"__esModule",{value:!0}),Ri.DiscrError=void 0;var r;return function(i){i.Tag="tag",i.Mapping="mapping"}(r||(Ri.DiscrError=r={})),Ri}var Ky;function yE(){if(Ky)return Ml;Ky=1,Object.defineProperty(Ml,"__esModule",{value:!0});const r=Me(),i=pE(),u=Mc(),l=Fl(),c=Be(),d={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:h,tagName:m}})=>h===i.DiscrError.Tag?`tag "${m}" must be string`:`value of tag "${m}" must be in oneOf`,params:({params:{discrError:h,tag:m,tagName:y}})=>(0,r._)`{error: ${h}, tag: ${y}, tagValue: ${m}}`},code(h){const{gen:m,data:y,schema:S,parentSchema:N,it:x}=h,{oneOf:V}=N;if(!x.opts.discriminator)throw new Error("discriminator: requires discriminator option");const L=S.propertyName;if(typeof L!="string")throw new Error("discriminator: requires propertyName");if(S.mapping)throw new Error("discriminator: mapping is not supported");if(!V)throw new Error("discriminator: requires oneOf keyword");const C=m.let("valid",!1),g=m.const("tag",(0,r._)`${y}${(0,r.getProperty)(L)}`);m.if((0,r._)`typeof ${g} == "string"`,()=>w(),()=>h.error(!1,{discrError:i.DiscrError.Tag,tag:g,tagName:L})),h.ok(C);function w(){const E=b();m.if(!1);for(const O in E)m.elseIf((0,r._)`${g} === ${O}`),m.assign(C,p(E[O]));m.else(),h.error(!1,{discrError:i.DiscrError.Mapping,tag:g,tagName:L}),m.endIf()}function p(E){const O=m.name("valid"),v=h.subschema({keyword:"oneOf",schemaProp:E},O);return h.mergeEvaluated(v,r.Name),O}function b(){var E;const O={},v=$(N);let A=!0;for(let Y=0;Ythis.addVocabulary(L)),this.opts.discriminator&&this.addKeyword(c.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const L=this.opts.$data?this.$dataMetaSchema(o,d):o;this.addMetaSchema(L,h,!1),this.refs["http://json-schema.org/schema"]=h}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(h)?h:void 0)}}i.Ajv=m,r.exports=i=m,r.exports.Ajv=m,Object.defineProperty(i,"__esModule",{value:!0}),i.default=m;var y=Jl();Object.defineProperty(i,"KeywordCxt",{enumerable:!0,get:function(){return y.KeywordCxt}});var S=Me();Object.defineProperty(i,"_",{enumerable:!0,get:function(){return S._}}),Object.defineProperty(i,"str",{enumerable:!0,get:function(){return S.str}}),Object.defineProperty(i,"stringify",{enumerable:!0,get:function(){return S.stringify}}),Object.defineProperty(i,"nil",{enumerable:!0,get:function(){return S.nil}}),Object.defineProperty(i,"Name",{enumerable:!0,get:function(){return S.Name}}),Object.defineProperty(i,"CodeGen",{enumerable:!0,get:function(){return S.CodeGen}});var N=Dc();Object.defineProperty(i,"ValidationError",{enumerable:!0,get:function(){return N.default}});var x=Fl();Object.defineProperty(i,"MissingRefError",{enumerable:!0,get:function(){return x.default}})}(Qs,Qs.exports)),Qs.exports}var OE=$E();const AE=Xl(OE);function ql(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Nf={exports:{}},Qy;function RE(){return Qy||(Qy=1,function(r,i){(function(u){r.exports=u()})(function(){return function u(l,c,o){function d(y,S){if(!c[y]){if(!l[y]){var N=typeof ql=="function"&&ql;if(!S&&N)return N(y,!0);if(h)return h(y,!0);throw new Error("Cannot find module '"+y+"'")}S=c[y]={exports:{}},l[y][0].call(S.exports,function(x){var V=l[y][1][x];return d(V||x)},S,S.exports,u,l,c,o)}return c[y].exports}for(var h=typeof ql=="function"&&ql,m=0;m>16),ne((65280&j)>>8),ne(255&j);return Y==2?ne(255&(j=A($.charAt(D))<<2|A($.charAt(D+1))>>4)):Y==1&&(ne((j=A($.charAt(D))<<10|A($.charAt(D+1))<<4|A($.charAt(D+2))>>2)>>8&255),ne(255&j)),Q},L.fromByteArray=function($){var D,j,Y,Q,W=$.length%3,F="";function ne(P){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P)}for(D=0,Y=$.length-W;D>18&63)+ne(Q>>12&63)+ne(Q>>6&63)+ne(63&Q);switch(W){case 1:F=(F+=ne((j=$[$.length-1])>>2))+ne(j<<4&63)+"==";break;case 2:F=(F=(F+=ne((j=($[$.length-2]<<8)+$[$.length-1])>>10))+ne(j>>4&63))+ne(j<<2&63)+"="}return F}})(c===void 0?this.base64js={}:c)}).call(this,u("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},u("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib")},{buffer:3,lYpoI2:11}],3:[function(u,l,c){(function(o,d,g,m,y,S,N,x,V){var L=u("base64-js"),C=u("ieee754");function g(M,B,q){if(!(this instanceof g))return new g(M,B,q);var G,X,se,me,ye=typeof M;if(B==="base64"&&ye=="string")for(M=(me=M).trim?me.trim():me.replace(/^\s+|\s+$/g,"");M.length%4!=0;)M+="=";if(ye=="number")G=re(M);else if(ye=="string")G=g.byteLength(M,B);else{if(ye!="object")throw new Error("First argument needs to be a number, array or string.");G=re(M.length)}if(g._useTypedArrays?X=g._augment(new Uint8Array(G)):((X=this).length=G,X._isBuffer=!0),g._useTypedArrays&&typeof M.byteLength=="number")X._set(M);else if(de(me=M)||g.isBuffer(me)||me&&typeof me=="object"&&typeof me.length=="number")for(se=0;se>8,me=me%256,ye.push(me),ye.push(se);return ye}(B),M,q,G)}function b(M,B,q){var G="";q=Math.min(M.length,q);for(var X=B;X>>0)):(B+1>>0),X}function v(M,B,q,G){if(G||(ae(typeof q=="boolean","missing or invalid endian"),ae(B!=null,"missing offset"),ae(B+1>>8*(G?se:1-se)}function Y(M,B,q,G,X){if(X||(ae(B!=null,"missing value"),ae(typeof G=="boolean","missing or invalid endian"),ae(q!=null,"missing offset"),ae(q+3>>8*(G?se:3-se)&255}function Q(M,B,q,G,X){X||(ae(B!=null,"missing value"),ae(typeof G=="boolean","missing or invalid endian"),ae(q!=null,"missing offset"),ae(q+1this.length&&(G=this.length);var X=(G=M.length-B=this.length))return this[M]},g.prototype.readUInt16LE=function(M,B){return E(this,M,!0,B)},g.prototype.readUInt16BE=function(M,B){return E(this,M,!1,B)},g.prototype.readUInt32LE=function(M,B){return O(this,M,!0,B)},g.prototype.readUInt32BE=function(M,B){return O(this,M,!1,B)},g.prototype.readInt8=function(M,B){if(B||(ae(M!=null,"missing offset"),ae(M=this.length))return 128&this[M]?-1*(255-this[M]+1):this[M]},g.prototype.readInt16LE=function(M,B){return v(this,M,!0,B)},g.prototype.readInt16BE=function(M,B){return v(this,M,!1,B)},g.prototype.readInt32LE=function(M,B){return A(this,M,!0,B)},g.prototype.readInt32BE=function(M,B){return A(this,M,!1,B)},g.prototype.readFloatLE=function(M,B){return $(this,M,!0,B)},g.prototype.readFloatBE=function(M,B){return $(this,M,!1,B)},g.prototype.readDoubleLE=function(M,B){return D(this,M,!0,B)},g.prototype.readDoubleBE=function(M,B){return D(this,M,!1,B)},g.prototype.writeUInt8=function(M,B,q){q||(ae(M!=null,"missing value"),ae(B!=null,"missing offset"),ae(B=this.length||(this[B]=M)},g.prototype.writeUInt16LE=function(M,B,q){j(this,M,B,!0,q)},g.prototype.writeUInt16BE=function(M,B,q){j(this,M,B,!1,q)},g.prototype.writeUInt32LE=function(M,B,q){Y(this,M,B,!0,q)},g.prototype.writeUInt32BE=function(M,B,q){Y(this,M,B,!1,q)},g.prototype.writeInt8=function(M,B,q){q||(ae(M!=null,"missing value"),ae(B!=null,"missing offset"),ae(B=this.length||(0<=M?this.writeUInt8(M,B,q):this.writeUInt8(255+M+1,B,q))},g.prototype.writeInt16LE=function(M,B,q){Q(this,M,B,!0,q)},g.prototype.writeInt16BE=function(M,B,q){Q(this,M,B,!1,q)},g.prototype.writeInt32LE=function(M,B,q){W(this,M,B,!0,q)},g.prototype.writeInt32BE=function(M,B,q){W(this,M,B,!1,q)},g.prototype.writeFloatLE=function(M,B,q){F(this,M,B,!0,q)},g.prototype.writeFloatBE=function(M,B,q){F(this,M,B,!1,q)},g.prototype.writeDoubleLE=function(M,B,q){ne(this,M,B,!0,q)},g.prototype.writeDoubleBE=function(M,B,q){ne(this,M,B,!1,q)},g.prototype.fill=function(M,B,q){if(B=B||0,q=q||this.length,ae(typeof(M=typeof(M=M||0)=="string"?M.charCodeAt(0):M)=="number"&&!isNaN(M),"value is not a number"),ae(B<=q,"end < start"),q!==B&&this.length!==0){ae(0<=B&&B"},g.prototype.toArrayBuffer=function(){if(typeof Uint8Array>"u")throw new Error("Buffer.toArrayBuffer not supported in this browser");if(g._useTypedArrays)return new g(this).buffer;for(var M=new Uint8Array(this.length),B=0,q=M.length;B=B.length||X>=M.length);X++)B[X+q]=M[X];return X}function T(M){try{return decodeURIComponent(M)}catch{return"�"}}function H(M,B){ae(typeof M=="number","cannot write a non-number as a number"),ae(0<=M,"specified a negative value for writing an unsigned value"),ae(M<=B,"value is larger than maximum value for type"),ae(Math.floor(M)===M,"value has a fractional component")}function te(M,B,q){ae(typeof M=="number","cannot write a non-number as a number"),ae(M<=B,"value larger than maximum allowed value"),ae(q<=M,"value smaller than minimum allowed value"),ae(Math.floor(M)===M,"value has a fractional component")}function pe(M,B,q){ae(typeof M=="number","cannot write a non-number as a number"),ae(M<=B,"value larger than maximum allowed value"),ae(q<=M,"value smaller than minimum allowed value")}function ae(M,B){if(!M)throw new Error(B||"Failed assertion")}g._augment=function(M){return M._isBuffer=!0,M._get=M.get,M._set=M.set,M.get=P.get,M.set=P.set,M.write=P.write,M.toString=P.toString,M.toLocaleString=P.toString,M.toJSON=P.toJSON,M.copy=P.copy,M.slice=P.slice,M.readUInt8=P.readUInt8,M.readUInt16LE=P.readUInt16LE,M.readUInt16BE=P.readUInt16BE,M.readUInt32LE=P.readUInt32LE,M.readUInt32BE=P.readUInt32BE,M.readInt8=P.readInt8,M.readInt16LE=P.readInt16LE,M.readInt16BE=P.readInt16BE,M.readInt32LE=P.readInt32LE,M.readInt32BE=P.readInt32BE,M.readFloatLE=P.readFloatLE,M.readFloatBE=P.readFloatBE,M.readDoubleLE=P.readDoubleLE,M.readDoubleBE=P.readDoubleBE,M.writeUInt8=P.writeUInt8,M.writeUInt16LE=P.writeUInt16LE,M.writeUInt16BE=P.writeUInt16BE,M.writeUInt32LE=P.writeUInt32LE,M.writeUInt32BE=P.writeUInt32BE,M.writeInt8=P.writeInt8,M.writeInt16LE=P.writeInt16LE,M.writeInt16BE=P.writeInt16BE,M.writeInt32LE=P.writeInt32LE,M.writeInt32BE=P.writeInt32BE,M.writeFloatLE=P.writeFloatLE,M.writeFloatBE=P.writeFloatBE,M.writeDoubleLE=P.writeDoubleLE,M.writeDoubleBE=P.writeDoubleBE,M.fill=P.fill,M.inspect=P.inspect,M.toArrayBuffer=P.toArrayBuffer,M}}).call(this,u("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},u("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/buffer/index.js","/node_modules/gulp-browserify/node_modules/buffer")},{"base64-js":2,buffer:3,ieee754:10,lYpoI2:11}],4:[function(u,l,c){(function(o,d,L,m,y,S,N,x,V){var L=u("buffer").Buffer,C=4,g=new L(C);g.fill(0),l.exports={hash:function(w,p,b,E){for(var O=p(function(j,Y){j.length%C!=0&&(Q=j.length+(C-j.length%C),j=L.concat([j,g],Q));for(var Q,W=[],F=Y?j.readInt32BE:j.readInt32LE,ne=0;neb?ue=P(ue):ue.length>5]|=128<>>9<<4)]=A;for(var $=1732584193,D=-271733879,j=-1732584194,Y=271733878,Q=0;Q>>32-j,$)}function w(v,A,$,D,j,Y,Q){return g(A&$|~A&D,v,A,j,Y,Q)}function p(v,A,$,D,j,Y,Q){return g(A&D|$&~D,v,A,j,Y,Q)}function b(v,A,$,D,j,Y,Q){return g(A^$^D,v,A,j,Y,Q)}function E(v,A,$,D,j,Y,Q){return g($^(A|~D),v,A,j,Y,Q)}function O(v,A){var $=(65535&v)+(65535&A);return(v>>16)+(A>>16)+($>>16)<<16|65535&$}l.exports=function(v){return L.hash(v,C,16)}}).call(this,u("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},u("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],7:[function(u,l,c){(function(o,d,h,m,y,S,N,x,V){l.exports=function(L){for(var C,g=new Array(L),w=0;w>>((3&w)<<3)&255;return g}}).call(this,u("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},u("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:11}],8:[function(u,l,c){(function(o,d,h,m,y,S,N,x,V){var L=u("./helpers");function C(p,b){p[b>>5]|=128<<24-b%32,p[15+(b+64>>9<<4)]=b;for(var E,O,v,A=Array(80),$=1732584193,D=-271733879,j=-1732584194,Y=271733878,Q=-1009589776,W=0;W>16)+(b>>16)+(E>>16)<<16|65535&E}function w(p,b){return p<>>32-b}l.exports=function(p){return L.hash(p,C,20,!0)}}).call(this,u("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},u("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],9:[function(u,l,c){(function(o,d,h,m,y,S,N,x,V){function L(b,E){var O=(65535&b)+(65535&E);return(b>>16)+(E>>16)+(O>>16)<<16|65535&O}function C(b,E){var O,v=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),A=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),$=new Array(64);b[E>>5]|=128<<24-E%32,b[15+(E+64>>9<<4)]=E;for(var D,j,Y=0;Y>>E|b<<32-E},p=function(b,E){return b>>>E};l.exports=function(b){return g.hash(b,C,32,!0)}}).call(this,u("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},u("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],10:[function(u,l,c){(function(o,d,h,m,y,S,N,x,V){c.read=function(L,C,g,w,Y){var b,E,O=8*Y-w-1,v=(1<>1,$=-7,D=g?Y-1:0,j=g?-1:1,Y=L[C+D];for(D+=j,b=Y&(1<<-$)-1,Y>>=-$,$+=O;0<$;b=256*b+L[C+D],D+=j,$-=8);for(E=b&(1<<-$)-1,b>>=-$,$+=w;0<$;E=256*E+L[C+D],D+=j,$-=8);if(b===0)b=1-A;else{if(b===v)return E?NaN:1/0*(Y?-1:1);E+=Math.pow(2,w),b-=A}return(Y?-1:1)*E*Math.pow(2,b-w)},c.write=function(L,C,g,w,p,Q){var E,O,v=8*Q-p-1,A=(1<>1,D=p===23?Math.pow(2,-24)-Math.pow(2,-77):0,j=w?0:Q-1,Y=w?1:-1,Q=C<0||C===0&&1/C<0?1:0;for(C=Math.abs(C),isNaN(C)||C===1/0?(O=isNaN(C)?1:0,E=A):(E=Math.floor(Math.log(C)/Math.LN2),C*(w=Math.pow(2,-E))<1&&(E--,w*=2),2<=(C+=1<=E+$?D/w:D*Math.pow(2,1-$))*w&&(E++,w/=2),A<=E+$?(O=0,E=A):1<=E+$?(O=(C*w-1)*Math.pow(2,p),E+=$):(O=C*Math.pow(2,$-1)*Math.pow(2,p),E=0));8<=p;L[g+j]=255&O,j+=Y,O/=256,p-=8);for(E=E<"u"?1:0;let c=l?r[0]:u;for(let o=l;o/g,""),/\.{3}|=/.test(i))?0:r.length}function pv(r,...i){let u="";const l=this;for(let c=0;cqi(l,i,u));if(r&&typeof r=="object"){const l=Object.keys(r)[0],c=r[l];if(i.isData(r,l)||c===void 0)return!0;if(!i.methods[l])throw new Error(`Method '${l}' was not found in the Logic Engine.`);return i.methods[l].traverse===!1?typeof i.methods[l].deterministic=="function"?i.methods[l].deterministic(c,u):i.methods[l].deterministic:typeof i.methods[l].deterministic=="function"?i.methods[l].deterministic(c,u):i.methods[l].deterministic&&qi(c,i,u)}return!0}function Tc(r,i){if(!i.async)return!0;if(Array.isArray(r))return r.every(u=>Tc(u,i));if(typeof r=="object"){const u=Object.keys(r)[0],l=r[u];return rn(i.methods[u])?i.methods[u].traverse===!1?!!(typeof i.methods[u][et]=="function"&&i.methods[u][et](r,{engine:i})):Tc(l,i):!1}return!0}function ze(r,i={}){const{notTraversed:u=[],async:l,processing:c=[],values:o=[],engine:d}=i;function h(N,x=!1){return CE(N,x)?JSON.stringify(N):(o.push(N),`values[${o.length-1}]`)}if(Array.isArray(r)){let N="";for(let x=0;x0&&(N+=","),N+=ze(r[x],i);return"["+N+"]"}let m=!1;function y(N){return i.asyncDetected=i.asyncDetected||m,l&&m?`await ${N}`:N}const S=r&&Object.keys(r)[0];if(r&&typeof r=="object"){if(!S)return h(r);if(!d.methods[S]){if(d.isData(r,S))return h(r,!0);throw new Error(`Method '${S}' was not found in the Logic Engine.`)}if(!i.engine.disableInline&&d.methods[S]&&qi(r,d,i))return Tc(r,d)?h((d.fallback||d).run(r),!0):i.avoidInlineAsync?(i.asyncDetected=!0,`(await ${h(d.run(r))})`):(c.push(d.run(r).then(L=>h(L))),`__%%%${c.length-1}%%%__`);let N=r[S];if((!N||typeof N!="object")&&(N=[N]),d.methods[S]&&d.methods[S].compile){let L=d.methods[S].compile(N,i);if(L[Di]&&(L=L[Di]),(L||"").startsWith("await")&&(i.asyncDetected=!0),L!==!1)return L}let x=d.methods[S].optimizeUnary?"":"coerceArray";!x&&Array.isArray(N)&&N.length===1?N=N[0]:x&&Array.isArray(N)&&(x="");const V=[", context",", context, above",", context, above, engine"];if(typeof d.methods[S]=="function"){m=!rn(d.methods[S]);const L=V[Zy(d.methods[S])-1]||V[2];return y(`engine.methods["${S}"](${x}(`+ze(N,i)+")"+L+")")}else{m=!!(l&&d.methods[S]&&d.methods[S].asyncMethod);const L=Zy(m?d.methods[S].asyncMethod:d.methods[S].method),C=V[L-1]||V[2];return d.methods[S]&&(typeof d.methods[S].traverse>"u"||d.methods[S].traverse)?y(`engine.methods["${S}"]${m?".asyncMethod":".method"}(${x}(`+ze(N,i)+")"+C+")"):(u.push(N),y(`engine.methods["${S}"]${m?".asyncMethod":".method"}(notTraversed[${u.length-1}]`+C+")"))}}return h(r)}function Il(r,i={}){Object.assign(i,Object.assign({notTraversed:[],methods:[],state:{},processing:[],async:i.engine.async,asyncDetected:!1,values:[],compile:pv},i));const u=ze(r,i);return yv(r,u,i)}async function zE(r,i={}){Object.assign(i,Object.assign({notTraversed:[],methods:[],state:{},processing:[],async:i.engine.async,asyncDetected:!1,values:[],compile:pv},i));const u=ze(r,i);return i.processing=await Promise.all(i.processing||[]),yv(r,u,i)}function yv(r,i,u){const{engine:l,methods:c,notTraversed:o,processing:d=[],values:h}=u,m=[];d.forEach((S,N)=>{i=i.replace(`__%%%${N}%%%__`,S)});const y=`(values, methods, notTraversed, asyncIterators, engine, above, coerceArray) => ${u.asyncDetected?"async":""} (context ${u.extraArguments?","+u.extraArguments:""}) => { const result = ${i}; return result }`;return Object.assign((typeof globalThis<"u"?globalThis:global).eval(y)(h,c,o,Gl,l,m,or),{[et]:!u.asyncDetected,aboveDetected:typeof i=="string"&&i.includes(", above")})}const UE=()=>{try{const r={};return(typeof globalThis<"u"?globalThis:global).eval("(test) => test?.foo?.bar")(r)===void 0}catch{return!1}},gv=UE();class hn extends Error{constructor(i){super(),this.message="Built-in control structures are not allowed to receive dynamic inputs, this could allow a lesser version of remote-code execution.",this.input=i}}const Ti=new Map;function Yl(r){if(Ti.has(r))return Ti.get(r);Ti.size>2048&&Ti.clear();const i=LE(r);return Ti.set(r,i),i}function LE(r,i=".",u="\\",l="/"){const c=[];let o="";for(let d=0;dZt(l,i,u));if(r&&typeof r=="object"){const l=Object.keys(r)[0],c=r[l];if(i.isData(r,l))return!0;if(!i.methods[l])throw new Error(`Method '${l}' was not found in the Logic Engine.`);return i.methods[l].traverse===!1?typeof i.methods[l].deterministic=="function"?i.methods[l].deterministic(c,u):i.methods[l].deterministic:typeof i.methods[l].deterministic=="function"?i.methods[l].deterministic(c,u):i.methods[l].deterministic&&Zt(c,i,u)}return!0}function lr(r,i,u){if(Array.isArray(r))return r.every(l=>lr(l,i,u));if(r&&typeof r=="object"){const l=Object.keys(r)[0],c=r[l];if(i.isData(r,l))return!0;if(!i.methods[l])throw new Error(`Method '${l}' was not found in the Logic Engine.`);return i.methods[l].traverse===!1?typeof i.methods[l][et]=="function"?i.methods[l][et](c,u):i.methods[l][et]:typeof i.methods[l][et]=="function"?i.methods[l][et](c,u):i.methods[l][et]&&lr(c,i,u)}return!0}const Se={"+":r=>{if(typeof r=="string"||typeof r=="number")return+r;let i=0;for(let u=0;u{let i=1;for(let u=0;u{let i=r[0];for(let u=1;u{if(typeof r=="string"||typeof r=="number")return-r;if(r.length===1)return-r[0];let i=r[0];for(let u=1;u{let i=r[0];for(let u=1;uMath.max(...r),min:r=>Math.min(...r),in:([r,i])=>(i||[]).includes(r),">":([r,i])=>r>i,"<":([r,i,u])=>u===void 0?rr,!0),[et]:()=>!0},if:{method:(r,i,u,l)=>{if(!Array.isArray(r))throw new hn(r);if(r.length===1)return l.run(r[0],i,{above:u});if(r.length<2)return null;r=[...r],r.length%2!==1&&r.push(null);const c=r.pop();for(;r.length;){const o=r.shift(),d=r.shift(),h=l.run(o,i,{above:u});if(l.truthy(h))return l.run(d,i,{above:u})}return l.run(c,i,{above:u})},[et]:(r,i)=>lr(r,i.engine,i),deterministic:(r,i)=>Zt(r,i.engine,i),asyncMethod:async(r,i,u,l)=>{if(!Array.isArray(r))throw new hn(r);if(r.length===1)return l.run(r[0],i,{above:u});if(r.length<2)return null;r=[...r],r.length%2!==1&&r.push(null);const c=r.pop();for(;r.length;){const o=r.shift(),d=r.shift(),h=await l.run(o,i,{above:u});if(l.truthy(h))return l.run(d,i,{above:u})}return l.run(c,i,{above:u})},traverse:!1},"<=":([r,i,u])=>u===void 0?r<=i:r<=i&&i<=u,">=":([r,i])=>r>=i,"==":([r,i])=>r==i,"===":([r,i])=>r===i,"!=":([r,i])=>r!=i,"!==":([r,i])=>r!==i,xor:([r,i])=>r^i,or:{method:(r,i,u,l)=>{const c=Array.isArray(r);c||(r=l.run(r,i,{above:u}));let o;for(let d=0;d{const c=Array.isArray(r);c||(r=await l.run(r,i,{above:u}));let o;for(let d=0;dZt(r,i.engine,i),compile:(r,i)=>i.engine.truthy.IDENTITY?Array.isArray(r)?`(${r.map(u=>ze(u,i)).join(" || ")})`:`(${ze(r,i)}).reduce((a,b) => a||b, false)`:!1,traverse:!1},and:{method:(r,i,u,l)=>{const c=Array.isArray(r);c||(r=l.run(r,i,{above:u}));let o;for(let d=0;d{const c=Array.isArray(r);c||(r=await l.run(r,i,{above:u}));let o;for(let d=0;dZt(r,i.engine,i),compile:(r,i)=>i.engine.truthy.IDENTITY?Array.isArray(r)?`(${r.map(u=>ze(u,i)).join(" && ")})`:`(${ze(r,i)}).reduce((a,b) => a&&b, true)`:!1},substr:([r,i,u])=>{if(u<0){const l=r.substr(i);return l.substr(0,l.length+u)}return r.substr(i,u)},length:([r])=>typeof r=="string"||Array.isArray(r)?r.length:r&&typeof r=="object"?Object.keys(r).length:0,get:{method:([r,i,u],l,c,o)=>{const d=u===void 0?null:u,h=Yl(String(i));for(let m=0;m{let c;Array.isArray(r)&&(c=r[1],r=r[0]);let o=0;for(;typeof r=="string"&&r.startsWith("../")&&o"u"||r===""||r===null)return l.allowFunctions||typeof i!="function"?i:null;const h=Yl(String(r));for(let m=0;m(Array.isArray(r)?r:[r]).filter(c=>Se.var(c,i,u,l)===null),missing_some:([r,i],u,l,c)=>{const o=Se.missing(i,u,l,c);return i.length-o.length>=r?[]:o},map:Ni("map"),some:Ni("some",!0),all:Ni("every",!0),none:{traverse:!1,method:(r,i,u,l)=>!Se.some.method(r,i,u,l),asyncMethod:async(r,i,u,l)=>!await Se.some.asyncMethod(r,i,u,l),compile:(r,i)=>{const u=Se.some.compile(r,i);return u?i.compile`!(${u})`:!1}},merge:r=>Array.isArray(r)?[].concat(...r):[r],every:Ni("every"),filter:Ni("filter"),reduce:{deterministic:(r,i)=>Zt(r[0],i.engine,i)&&Zt(r[1],i.engine,{...i,insideIterator:!0}),compile:(r,i)=>{if(!Array.isArray(r))throw new hn(r);const{async:u}=i;let[l,c,o]=r;l=ze(l,i),typeof o<"u"&&(o=ze(o,i));const d={...i,extraArguments:"above",avoidInlineAsync:!0};c=Il(c,d);const h=c.aboveDetected?"[null, context, above]":"null";return i.methods.push(c),u&&(!rn(c)||l.includes("await"))?(i.detectAsync=!0,typeof o<"u"?`await asyncIterators.reduce(${l} || [], (a,b) => methods[${i.methods.length-1}]({ accumulator: a, current: b }, ${h}), ${o})`:`await asyncIterators.reduce(${l} || [], (a,b) => methods[${i.methods.length-1}]({ accumulator: a, current: b }, ${h}))`):typeof o<"u"?`(${l} || []).reduce((a,b) => methods[${i.methods.length-1}]({ accumulator: a, current: b }, ${h}), ${o})`:`(${l} || []).reduce((a,b) => methods[${i.methods.length-1}]({ accumulator: a, current: b }, ${h}))`},method:(r,i,u,l)=>{if(!Array.isArray(r))throw new hn(r);let[c,o,d]=r;d=l.run(d,i,{above:u}),c=l.run(c,i,{above:u})||[];const h=(m,y)=>l.run(o,{accumulator:m,current:y},{above:[c,i,u]});return typeof d>"u"?c.reduce(h):c.reduce(h,d)},[et]:(r,i)=>lr(r,i.engine,i),asyncMethod:async(r,i,u,l)=>{if(!Array.isArray(r))throw new hn(r);let[c,o,d]=r;return d=await l.run(d,i,{above:u}),c=await l.run(c,i,{above:u})||[],Gl.reduce(c,(h,m)=>l.run(o,{accumulator:h,current:m},{above:[c,i,u]}),d)},traverse:!1},"!":(r,i,u,l)=>Array.isArray(r)?!l.truthy(r[0]):!l.truthy(r),"!!":(r,i,u,l)=>!!(Array.isArray(r)?l.truthy(r[0]):l.truthy(r)),cat:r=>{if(typeof r=="string")return r;let i="";for(let u=0;utypeof r=="object"?Object.keys(r):[],pipe:{traverse:!1,[et]:(r,i)=>lr(r,i.engine,i),method:(r,i,u,l)=>{if(!Array.isArray(r))throw new Error("Data for pipe must be an array");let c=l.run(r[0],i,{above:[r,i,u]});for(let o=1;o{if(!Array.isArray(r))throw new Error("Data for pipe must be an array");let c=await l.run(r[0],i,{above:[r,i,u]});for(let o=1;o{let u=i.compile`${r[0]}`;for(let l=1;l{if(!Array.isArray(r))return!1;r=[...r];const u=r.shift();return Zt(u,i.engine,i)&&Zt(r,i.engine,{...i,insideIterator:!0})}},eachKey:{traverse:!1,[et]:(r,i)=>lr(Object.values(r[Object.keys(r)[0]]),i.engine,i),method:(r,i,u,l)=>Object.keys(r).reduce((o,d)=>{const h=r[d];return Object.defineProperty(o,d,{enumerable:!0,value:l.run(h,i,{above:u})}),o},{}),deterministic:(r,i)=>{if(r&&typeof r=="object")return Object.values(r).every(u=>Zt(u,i.engine,i));throw new hn(r)},compile:(r,i)=>{if(r&&typeof r=="object")return`({ ${Object.keys(r).reduce((l,c)=>(l.push(`${JSON.stringify(c)}: ${ze(r[c],i)}`),l),[]).join(",")} })`;throw new hn(r)},asyncMethod:async(r,i,u,l)=>await Gl.reduce(Object.keys(r),async(o,d)=>{const h=r[d];return Object.defineProperty(o,d,{enumerable:!0,value:await l.run(h,i,{above:u})}),o},{})}};function Ni(r,i=!1){return{deterministic:(u,l)=>Zt(u[0],l.engine,l)&&Zt(u[1],l.engine,{...l,insideIterator:!0}),[et]:(u,l)=>lr(u,l.engine,l),method:(u,l,c,o)=>{if(!Array.isArray(u))throw new hn(u);let[d,h]=u;return d=o.run(d,l,{above:c})||[],d[r]((m,y)=>{const S=o.run(h,m,{above:[{iterator:d,index:y},l,c]});return i?o.truthy(S):S})},asyncMethod:async(u,l,c,o)=>{if(!Array.isArray(u))throw new hn(u);let[d,h]=u;return d=await o.run(d,l,{above:c})||[],Gl[r](d,(m,y)=>{const S=o.run(h,m,{above:[{iterator:d,index:y},l,c]});return i?o.truthy(S):S})},compile:(u,l)=>{if(!Array.isArray(u))throw new hn(u);const{async:c}=l,[o,d]=u,h={...l,avoidInlineAsync:!0,iteratorCompile:!0,extraArguments:"index, above"},m=Il(d,h),y=m.aboveDetected?l.compile`[{ iterator: z, index: x }, context, above]`:l.compile`null`;return c&&!lr(d,l.engine,l)?(l.detectAsync=!0,l.compile`await asyncIterators[${r}](${o} || [], async (i, x, z) => ${m}(i, x, ${y}))`):l.compile`(${o} || [])[${r}]((i, x, z) => ${m}(i, x, ${y}))`},traverse:!1}}Se["?:"]=Se.if;Object.keys(Se).forEach(r=>{typeof Se[r]=="function"&&(Se[r][et]=!0),Se[r].deterministic=typeof Se[r].deterministic>"u"?!0:Se[r].deterministic});Se.var.deterministic=(r,i)=>i.insideIterator&&!String(r).includes("../../");Object.assign(Se.missing,{deterministic:!1});Object.assign(Se.missing_some,{deterministic:!1});Se["<"].compile=function(r,i){return Array.isArray(r)?r.length===2?i.compile`(${r[0]} < ${r[1]})`:r.length===3?i.compile`(${r[0]} < ${r[1]} && ${r[1]} < ${r[2]})`:!1:!1};Se["<="].compile=function(r,i){return Array.isArray(r)?r.length===2?i.compile`(${r[0]} <= ${r[1]})`:r.length===3?i.compile`(${r[0]} <= ${r[1]} && ${r[1]} <= ${r[2]})`:!1:!1};Se.min.compile=function(r,i){return Array.isArray(r)?`Math.min(${r.map(u=>ze(u,i)).join(", ")})`:!1};Se.max.compile=function(r,i){return Array.isArray(r)?`Math.max(${r.map(u=>ze(u,i)).join(", ")})`:!1};Se[">"].compile=function(r,i){return!Array.isArray(r)||r.length!==2?!1:i.compile`(${r[0]} > ${r[1]})`};Se[">="].compile=function(r,i){return!Array.isArray(r)||r.length!==2?!1:i.compile`(${r[0]} >= ${r[1]})`};Se["=="].compile=function(r,i){return!Array.isArray(r)||r.length!==2?!1:i.compile`(${r[0]} == ${r[1]})`};Se["!="].compile=function(r,i){return!Array.isArray(r)||r.length!==2?!1:i.compile`(${r[0]} != ${r[1]})`};Se.if.compile=function(r,i){if(!Array.isArray(r)||r.length<3)return!1;r=[...r],r.length%2!==1&&r.push(null);const u=r.pop();let l=i.compile``;for(;r.length;){const c=r.shift(),o=r.shift();l=i.compile`${l} engine.truthy(${c}) ? ${o} : `}return i.compile`(${l} ${u})`};Se["==="].compile=function(r,i){return!Array.isArray(r)||r.length!==2?!1:i.compile`(${r[0]} === ${r[1]})`};Se["+"].compile=function(r,i){return Array.isArray(r)?`(${r.map(u=>`(+${ze(u,i)})`).join(" + ")})`:typeof r=="string"||typeof r=="number"?`(+${ze(r,i)})`:`([].concat(${ze(r,i)})).reduce((a,b) => (+a)+(+b), 0)`};Se["%"].compile=function(r,i){return Array.isArray(r)?`(${r.map(u=>`(+${ze(u,i)})`).join(" % ")})`:`(${ze(r,i)}).reduce((a,b) => (+a)%(+b))`};Se.in.compile=function(r,i){return Array.isArray(r)?i.compile`(${r[1]} || []).includes(${r[0]})`:!1};Se["-"].compile=function(r,i){return Array.isArray(r)?`${r.length===1?"-":""}(${r.map(u=>`(+${ze(u,i)})`).join(" - ")})`:typeof r=="string"||typeof r=="number"?`(-${ze(r,i)})`:`((a=>(a.length===1?a[0]=-a[0]:a)&0||a)([].concat(${ze(r,i)}))).reduce((a,b) => (+a)-(+b))`};Se["/"].compile=function(r,i){return Array.isArray(r)?`(${r.map(u=>`(+${ze(u,i)})`).join(" / ")})`:`(${ze(r,i)}).reduce((a,b) => (+a)/(+b))`};Se["*"].compile=function(r,i){return Array.isArray(r)?`(${r.map(u=>`(+${ze(u,i)})`).join(" * ")})`:`(${ze(r,i)}).reduce((a,b) => (+a)*(+b))`};Se.cat.compile=function(r,i){if(typeof r=="string")return JSON.stringify(r);if(!Array.isArray(r))return!1;let u=i.compile`''`;for(let l=0;l"u"?null:r[2],l&&typeof l=="object")return!1;l=l.toString();const o=Yl(l);return gv?`((${ze(c,i)})${o.map(d=>`?.[${ze(d,i)}]`).join("")} ?? ${ze(u,i)})`:`(((a,b) => (typeof a === 'undefined' || a === null) ? b : a)(${o.reduce((d,h)=>`(${d}||0)[${JSON.stringify(h)}]`,`(${ze(c,i)}||0)`)}, ${ze(u,i)}))`}return!1};Se.var.compile=function(r,i){let u=r,l=null;if(i.varTop=i.varTop||new Set,!u||typeof r=="string"||typeof r=="number"||Array.isArray(r)&&r.length<=2){if(Array.isArray(r)&&(u=r[0],l=typeof r[1]>"u"?null:r[1]),u==="../index"&&i.iteratorCompile)return"index";if(typeof u>"u"||u===null||u==="")return"context";if(typeof u!="string"&&typeof u!="number"||(u=u.toString(),u.includes("../")))return!1;const c=Yl(u),[o]=c;return i.varTop.add(o),i.engine.allowFunctions?i.methods.preventFunctions=d=>d:i.methods.preventFunctions=d=>typeof d=="function"?null:d,gv?`(methods.preventFunctions(context${c.map(d=>`?.[${JSON.stringify(d)}]`).join("")} ?? ${ze(l,i)}))`:`(methods.preventFunctions(((a,b) => (typeof a === 'undefined' || a === null) ? b : a)(${c.reduce((d,h)=>`(${d}||0)[${JSON.stringify(h)}]`,"(context||0)")}, ${ze(l,i)})))`}return!1};Se["+"].optimizeUnary=Se["-"].optimizeUnary=Se.var.optimizeUnary=Se["!"].optimizeUnary=Se["!!"].optimizeUnary=Se.cat.optimizeUnary=!0;const zc={...Se},vv=function(i){return Object.keys(i).forEach(u=>{i[u]===void 0&&delete i[u]}),i};function VE(r,i,u,l){const c=i.methods[u],o=c.method?c.method:c;if(c.traverse===!1){const h=r[u];return(m,y)=>o(h,m,y||l,i)}let d=r[u];if((!d||typeof d!="object")&&(d=[d]),Array.isArray(d)){const h=d.map(m=>kl(m,i,l));return(m,y)=>{const S=h.map(N=>typeof N=="function"?N(m,y):N);return o(S,m,y||l,i)}}else{const h=kl(d,i,l);return(m,y)=>o(or(typeof h=="function"?h(m,y):h,c.optimizeUnary),m,y||l,i)}}function kl(r,i,u=[]){if(Array.isArray(r)){const l=r.map(c=>kl(c,i,u));return(c,o)=>l.map(d=>typeof d=="function"?d(c,o):d)}if(r&&typeof r=="object"){const c=Object.keys(r)[0];if(i.isData(r,c))return()=>r;const d=!i.disableInline&&qi(r,i,{engine:i});if(c in i.methods){const h=VE(r,i,c,u);return d?h():h}}return r}const Cl=zc.all,xE={method:(r,i,u,l)=>{if(Array.isArray(r)){const c=l.run(r[0],i,u);if(Array.isArray(c)&&c.length===0)return!1}return Cl.method(r,i,u,l)},asyncMethod:async(r,i,u,l)=>{if(Array.isArray(r)){const c=await l.run(r[0],i,u);if(Array.isArray(c)&&c.length===0)return!1}return Cl.asyncMethod(r,i,u,l)},deterministic:Cl.deterministic,traverse:Cl.traverse};function BE(r){return Array.isArray(r)&&r.length===0?!1:r}function bv(r){r.methods.all=xE,r.truthy=BE}class Uc{constructor(i=zc,u={disableInline:!1,disableInterpretedOptimization:!1,permissive:!1}){this.disableInline=u.disableInline,this.disableInterpretedOptimization=u.disableInterpretedOptimization,this.methods={...i},this.optimizedMap=new WeakMap,this.missesSinceSeen=0,u.compatible&&bv(this),this.options={disableInline:u.disableInline,disableInterpretedOptimization:u.disableInterpretedOptimization},this.isData||(u.permissive?this.isData=(l,c)=>!(c in this.methods):this.isData=()=>!1)}truthy(i){return i}_parse(i,u,l){const[c]=Object.keys(i),o=i[c];if(this.isData(i,c))return i;if(!this.methods[c])throw new Error(`Method '${c}' was not found in the Logic Engine.`);if(typeof this.methods[c]=="function"){const d=!o||typeof o!="object"?[o]:or(this.run(o,u,{above:l}));return this.methods[c](d,u,l,this)}if(typeof this.methods[c]=="object"){const{method:d,traverse:h}=this.methods[c],y=(typeof h>"u"?!0:h)?!o||typeof o!="object"?[o]:or(this.run(o,u,{above:l})):o;return d(y,u,l,this)}throw new Error(`Method '${c}' is not set up properly.`)}addMethod(i,u,{deterministic:l,optimizeUnary:c}={}){typeof u=="function"?u={method:u,traverse:!0}:u={...u},Object.assign(u,vv({deterministic:l,optimizeUnary:c})),this.methods[i]=zn(u)}addModule(i,u,l){Object.getOwnPropertyNames(u).forEach(c=>{(typeof u[c]=="function"||typeof u[c]=="object")&&this.addMethod(`${i}${i?".":""}${c}`,u[c],l)})}run(i,u={},l={}){const{above:c=[]}=l;if(this.missesSinceSeen>500&&(this.disableInterpretedOptimization=!0,this.missesSinceSeen=0),!this.disableInterpretedOptimization&&typeof i=="object"&&i&&!this.optimizedMap.has(i))return this.optimizedMap.set(i,kl(i,this,c)),this.missesSinceSeen++,typeof this.optimizedMap.get(i)=="function"?this.optimizedMap.get(i)(u,c):this.optimizedMap.get(i);if(!this.disableInterpretedOptimization&&i&&typeof i=="object"&&this.optimizedMap.get(i))return this.missesSinceSeen=0,typeof this.optimizedMap.get(i)=="function"?this.optimizedMap.get(i)(u,c):this.optimizedMap.get(i);if(Array.isArray(i)){const o=[];for(let d=0;d0?this._parse(i,u,c):i}build(i,u={}){const{above:l=[],top:c=!0}=u;if(c){const o=Il(i,{state:{},engine:this,above:l});return typeof o=="function"||c===!0?(...d)=>typeof o=="function"?o(...d):o:o}return i}}Object.assign(Uc.prototype.truthy,{IDENTITY:!0});function HE(r,i,u,l){const c=i.methods[u],o=c.asyncMethod?c.asyncMethod:c.method?c.method:c;if(c.traverse===!1){if(typeof c[et]=="function"&&c[et](r,{engine:i})){const m=c.method?c.method:c;return zn((y,S)=>m(r[u],y,S||l,i.fallback),!0)}const h=r[u];return(m,y)=>o(h,m,y||l,i)}let d=r[u];if((!d||typeof d!="object")&&(d=[d]),Array.isArray(d)){const h=d.map(m=>Pl(m,i,l));if(rn(h)&&(c.method||c[et])){const m=c.method?c.method:c;return zn((y,S)=>{const N=h.map(x=>typeof x=="function"?x(y,S):x);return m(N,y,S||l,i.fallback)},!0)}return async(m,y)=>{const S=await Cc(h,N=>typeof N=="function"?N(m,y):N);return o(S,m,y||l,i)}}else{const h=Pl(d,i,l);if(rn(h)&&(c.method||c[et])){const m=c.method?c.method:c;return zn((y,S)=>m(or(typeof h=="function"?h(y,S):h,c.optimizeUnary),y,S||l,i),!0)}return async(m,y)=>o(or(typeof h=="function"?await h(m,y):h,c.optimizeUnary),m,y||l,i)}}function Pl(r,i,u=[]){if(i.fallback.allowFunctions=i.allowFunctions,Array.isArray(r)){const l=r.map(c=>Pl(c,i,u));return rn(l)?zn((c,o)=>l.map(d=>typeof d=="function"?d(c,o):d),!0):async(c,o)=>Cc(l,d=>typeof d=="function"?d(c,o):d)}if(r&&typeof r=="object"){const c=Object.keys(r)[0];if(i.isData(r,c))return()=>r;const d=!i.disableInline&&qi(r,i,{engine:i});if(c in i.methods){const h=HE(r,i,c,u);if(d){let m;return rn(h)?zn(()=>(m||(m=h()),m),!0):async()=>(m||(m=await h()),m)}return h}}return r}class GE{constructor(i=zc,u={disableInline:!1,disableInterpretedOptimization:!1,permissive:!1}){this.methods={...i},this.options={disableInline:u.disableInline,disableInterpretedOptimization:u.disableInterpretedOptimization},this.disableInline=u.disableInline,this.disableInterpretedOptimization=u.disableInterpretedOptimization,this.async=!0,this.fallback=new Uc(i,u),u.compatible&&bv(this),this.optimizedMap=new WeakMap,this.missesSinceSeen=0,this.isData||(u.permissive?this.isData=(l,c)=>!(c in this.methods):this.isData=()=>!1),this.fallback.isData=this.isData}truthy(i){return i}async _parse(i,u,l){const[c]=Object.keys(i),o=i[c];if(this.isData(i,c))return i;if(!this.methods[c])throw new Error(`Method '${c}' was not found in the Logic Engine.`);if(typeof this.methods[c]=="function"){const d=!o||typeof o!="object"?[o]:await this.run(o,u,{above:l}),h=await this.methods[c](or(d),u,l,this);return Array.isArray(h)?Promise.all(h):h}if(typeof this.methods[c]=="object"){const{asyncMethod:d,method:h,traverse:m}=this.methods[c],S=(typeof m>"u"?!0:m)?!o||typeof o!="object"?[o]:or(await this.run(o,u,{above:l})):o,N=await(d||h)(S,u,l,this);return Array.isArray(N)?Promise.all(N):N}throw new Error(`Method '${c}' is not set up properly.`)}addMethod(i,u,{deterministic:l,async:c,sync:o,optimizeUnary:d}={}){typeof c>"u"&&typeof o>"u"&&(o=!1),typeof o<"u"&&(c=!o),typeof c<"u"&&(o=!c),typeof u=="function"?c?u={asyncMethod:u,traverse:!0}:u={method:u,traverse:!0}:u={...u},Object.assign(u,vv({deterministic:l,optimizeUnary:d})),this.fallback.addMethod(i,u,{deterministic:l}),this.methods[i]=zn(u,o)}addModule(i,u,l={}){Object.getOwnPropertyNames(u).forEach(c=>{(typeof u[c]=="function"||typeof u[c]=="object")&&this.addMethod(`${i}${i?".":""}${c}`,u[c],l)})}async run(i,u={},l={}){const{above:c=[]}=l;if(this.missesSinceSeen>500&&(this.disableInterpretedOptimization=!0,this.missesSinceSeen=0),!this.disableInterpretedOptimization&&typeof i=="object"&&i&&!this.optimizedMap.has(i))return this.optimizedMap.set(i,Pl(i,this,c)),this.missesSinceSeen++,typeof this.optimizedMap.get(i)=="function"?this.optimizedMap.get(i)(u,c):this.optimizedMap.get(i);if(!this.disableInterpretedOptimization&&i&&typeof i=="object"&&this.optimizedMap.get(i))return this.missesSinceSeen=0,typeof this.optimizedMap.get(i)=="function"?this.optimizedMap.get(i)(u,c):this.optimizedMap.get(i);if(Array.isArray(i)){const o=[];for(let d=0;d0?this._parse(i,u,c):i}async build(i,u={}){const{above:l=[],top:c=!0}=u;if(this.fallback.truthy=this.truthy,this.fallback.allowFunctions=this.allowFunctions,c){const o=await zE(i,{engine:this,above:l,async:!0,state:{}}),d=zn((...h)=>{if(c===!0)try{const m=typeof o=="function"?o(...h):o;return Promise.resolve(m)}catch(m){return Promise.reject(m)}return typeof o=="function"?o(...h):o},c!==!0&&rn(o));return typeof o=="function"||c===!0?d:o}return i}}Object.assign(GE.prototype.truthy,{IDENTITY:!0});var zl={exports:{}},Df,Jy;function Wl(){if(Jy)return Df;Jy=1;const r="2.0.0",i=256,u=Number.MAX_SAFE_INTEGER||9007199254740991,l=16,c=i-6;return Df={MAX_LENGTH:i,MAX_SAFE_COMPONENT_LENGTH:l,MAX_SAFE_BUILD_LENGTH:c,MAX_SAFE_INTEGER:u,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:r,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Df}var Mf,Fy;function eu(){if(Fy)return Mf;Fy=1;var r={};return Mf=typeof process=="object"&&r&&r.NODE_DEBUG&&/\bsemver\b/i.test(r.NODE_DEBUG)?(...u)=>console.error("SEMVER",...u):()=>{},Mf}var Wy;function zi(){return Wy||(Wy=1,function(r,i){const{MAX_SAFE_COMPONENT_LENGTH:u,MAX_SAFE_BUILD_LENGTH:l}=Wl(),c=eu();i=r.exports={};const o=i.re=[],d=i.safeRe=[],h=i.src=[],m=i.t={};let y=0;const S="[a-zA-Z0-9-]",N=[["\\s",1],["\\d",u],[S,l]],x=L=>{for(const[C,g]of N)L=L.split(`${C}*`).join(`${C}{0,${g}}`).split(`${C}+`).join(`${C}{1,${g}}`);return L},V=(L,C,g)=>{const w=x(C),p=y++;c(L,p,C),m[L]=p,h[p]=C,o[p]=new RegExp(C,g?"g":void 0),d[p]=new RegExp(w,g?"g":void 0)};V("NUMERICIDENTIFIER","0|[1-9]\\d*"),V("NUMERICIDENTIFIERLOOSE","\\d+"),V("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${S}*`),V("MAINVERSION",`(${h[m.NUMERICIDENTIFIER]})\\.(${h[m.NUMERICIDENTIFIER]})\\.(${h[m.NUMERICIDENTIFIER]})`),V("MAINVERSIONLOOSE",`(${h[m.NUMERICIDENTIFIERLOOSE]})\\.(${h[m.NUMERICIDENTIFIERLOOSE]})\\.(${h[m.NUMERICIDENTIFIERLOOSE]})`),V("PRERELEASEIDENTIFIER",`(?:${h[m.NUMERICIDENTIFIER]}|${h[m.NONNUMERICIDENTIFIER]})`),V("PRERELEASEIDENTIFIERLOOSE",`(?:${h[m.NUMERICIDENTIFIERLOOSE]}|${h[m.NONNUMERICIDENTIFIER]})`),V("PRERELEASE",`(?:-(${h[m.PRERELEASEIDENTIFIER]}(?:\\.${h[m.PRERELEASEIDENTIFIER]})*))`),V("PRERELEASELOOSE",`(?:-?(${h[m.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${h[m.PRERELEASEIDENTIFIERLOOSE]})*))`),V("BUILDIDENTIFIER",`${S}+`),V("BUILD",`(?:\\+(${h[m.BUILDIDENTIFIER]}(?:\\.${h[m.BUILDIDENTIFIER]})*))`),V("FULLPLAIN",`v?${h[m.MAINVERSION]}${h[m.PRERELEASE]}?${h[m.BUILD]}?`),V("FULL",`^${h[m.FULLPLAIN]}$`),V("LOOSEPLAIN",`[v=\\s]*${h[m.MAINVERSIONLOOSE]}${h[m.PRERELEASELOOSE]}?${h[m.BUILD]}?`),V("LOOSE",`^${h[m.LOOSEPLAIN]}$`),V("GTLT","((?:<|>)?=?)"),V("XRANGEIDENTIFIERLOOSE",`${h[m.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),V("XRANGEIDENTIFIER",`${h[m.NUMERICIDENTIFIER]}|x|X|\\*`),V("XRANGEPLAIN",`[v=\\s]*(${h[m.XRANGEIDENTIFIER]})(?:\\.(${h[m.XRANGEIDENTIFIER]})(?:\\.(${h[m.XRANGEIDENTIFIER]})(?:${h[m.PRERELEASE]})?${h[m.BUILD]}?)?)?`),V("XRANGEPLAINLOOSE",`[v=\\s]*(${h[m.XRANGEIDENTIFIERLOOSE]})(?:\\.(${h[m.XRANGEIDENTIFIERLOOSE]})(?:\\.(${h[m.XRANGEIDENTIFIERLOOSE]})(?:${h[m.PRERELEASELOOSE]})?${h[m.BUILD]}?)?)?`),V("XRANGE",`^${h[m.GTLT]}\\s*${h[m.XRANGEPLAIN]}$`),V("XRANGELOOSE",`^${h[m.GTLT]}\\s*${h[m.XRANGEPLAINLOOSE]}$`),V("COERCE",`(^|[^\\d])(\\d{1,${u}})(?:\\.(\\d{1,${u}}))?(?:\\.(\\d{1,${u}}))?(?:$|[^\\d])`),V("COERCERTL",h[m.COERCE],!0),V("LONETILDE","(?:~>?)"),V("TILDETRIM",`(\\s*)${h[m.LONETILDE]}\\s+`,!0),i.tildeTrimReplace="$1~",V("TILDE",`^${h[m.LONETILDE]}${h[m.XRANGEPLAIN]}$`),V("TILDELOOSE",`^${h[m.LONETILDE]}${h[m.XRANGEPLAINLOOSE]}$`),V("LONECARET","(?:\\^)"),V("CARETTRIM",`(\\s*)${h[m.LONECARET]}\\s+`,!0),i.caretTrimReplace="$1^",V("CARET",`^${h[m.LONECARET]}${h[m.XRANGEPLAIN]}$`),V("CARETLOOSE",`^${h[m.LONECARET]}${h[m.XRANGEPLAINLOOSE]}$`),V("COMPARATORLOOSE",`^${h[m.GTLT]}\\s*(${h[m.LOOSEPLAIN]})$|^$`),V("COMPARATOR",`^${h[m.GTLT]}\\s*(${h[m.FULLPLAIN]})$|^$`),V("COMPARATORTRIM",`(\\s*)${h[m.GTLT]}\\s*(${h[m.LOOSEPLAIN]}|${h[m.XRANGEPLAIN]})`,!0),i.comparatorTrimReplace="$1$2$3",V("HYPHENRANGE",`^\\s*(${h[m.XRANGEPLAIN]})\\s+-\\s+(${h[m.XRANGEPLAIN]})\\s*$`),V("HYPHENRANGELOOSE",`^\\s*(${h[m.XRANGEPLAINLOOSE]})\\s+-\\s+(${h[m.XRANGEPLAINLOOSE]})\\s*$`),V("STAR","(<|>)?=?\\s*\\*"),V("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),V("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(zl,zl.exports)),zl.exports}var qf,eg;function Lc(){if(eg)return qf;eg=1;const r=Object.freeze({loose:!0}),i=Object.freeze({});return qf=l=>l?typeof l!="object"?r:l:i,qf}var Cf,tg;function Ev(){if(tg)return Cf;tg=1;const r=/^[0-9]+$/,i=(l,c)=>{const o=r.test(l),d=r.test(c);return o&&d&&(l=+l,c=+c),l===c?0:o&&!d?-1:d&&!o?1:li(c,l)},Cf}var zf,ng;function wt(){if(ng)return zf;ng=1;const r=eu(),{MAX_LENGTH:i,MAX_SAFE_INTEGER:u}=Wl(),{safeRe:l,t:c}=zi(),o=Lc(),{compareIdentifiers:d}=Ev();class h{constructor(y,S){if(S=o(S),y instanceof h){if(y.loose===!!S.loose&&y.includePrerelease===!!S.includePrerelease)return y;y=y.version}else if(typeof y!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof y}".`);if(y.length>i)throw new TypeError(`version is longer than ${i} characters`);r("SemVer",y,S),this.options=S,this.loose=!!S.loose,this.includePrerelease=!!S.includePrerelease;const N=y.trim().match(S.loose?l[c.LOOSE]:l[c.FULL]);if(!N)throw new TypeError(`Invalid Version: ${y}`);if(this.raw=y,this.major=+N[1],this.minor=+N[2],this.patch=+N[3],this.major>u||this.major<0)throw new TypeError("Invalid major version");if(this.minor>u||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>u||this.patch<0)throw new TypeError("Invalid patch version");N[4]?this.prerelease=N[4].split(".").map(x=>{if(/^[0-9]+$/.test(x)){const V=+x;if(V>=0&&V=0;)typeof this.prerelease[V]=="number"&&(this.prerelease[V]++,V=-2);if(V===-1){if(S===this.prerelease.join(".")&&N===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(x)}}if(S){let V=[S,x];N===!1&&(V=[S]),d(this.prerelease[0],S)===0?isNaN(this.prerelease[1])&&(this.prerelease=V):this.prerelease=V}break}default:throw new Error(`invalid increment argument: ${y}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return zf=h,zf}var Uf,rg;function Oa(){if(rg)return Uf;rg=1;const r=wt();return Uf=(u,l,c=!1)=>{if(u instanceof r)return u;try{return new r(u,l)}catch(o){if(!c)return null;throw o}},Uf}var Lf,ag;function IE(){if(ag)return Lf;ag=1;const r=Oa();return Lf=(u,l)=>{const c=r(u,l);return c?c.version:null},Lf}var Vf,ig;function YE(){if(ig)return Vf;ig=1;const r=Oa();return Vf=(u,l)=>{const c=r(u.trim().replace(/^[=v]+/,""),l);return c?c.version:null},Vf}var xf,sg;function kE(){if(sg)return xf;sg=1;const r=wt();return xf=(u,l,c,o,d)=>{typeof c=="string"&&(d=o,o=c,c=void 0);try{return new r(u instanceof r?u.version:u,c).inc(l,o,d).version}catch{return null}},xf}var Bf,lg;function PE(){if(lg)return Bf;lg=1;const r=Oa();return Bf=(u,l)=>{const c=r(u,null,!0),o=r(l,null,!0),d=c.compare(o);if(d===0)return null;const h=d>0,m=h?c:o,y=h?o:c,S=!!m.prerelease.length;if(!!y.prerelease.length&&!S)return!y.patch&&!y.minor?"major":m.patch?"patch":m.minor?"minor":"major";const x=S?"pre":"";return c.major!==o.major?x+"major":c.minor!==o.minor?x+"minor":c.patch!==o.patch?x+"patch":"prerelease"},Bf}var Hf,ug;function KE(){if(ug)return Hf;ug=1;const r=wt();return Hf=(u,l)=>new r(u,l).major,Hf}var Gf,og;function XE(){if(og)return Gf;og=1;const r=wt();return Gf=(u,l)=>new r(u,l).minor,Gf}var If,fg;function QE(){if(fg)return If;fg=1;const r=wt();return If=(u,l)=>new r(u,l).patch,If}var Yf,cg;function ZE(){if(cg)return Yf;cg=1;const r=Oa();return Yf=(u,l)=>{const c=r(u,l);return c&&c.prerelease.length?c.prerelease:null},Yf}var kf,dg;function sn(){if(dg)return kf;dg=1;const r=wt();return kf=(u,l,c)=>new r(u,c).compare(new r(l,c)),kf}var Pf,hg;function JE(){if(hg)return Pf;hg=1;const r=sn();return Pf=(u,l,c)=>r(l,u,c),Pf}var Kf,mg;function FE(){if(mg)return Kf;mg=1;const r=sn();return Kf=(u,l)=>r(u,l,!0),Kf}var Xf,pg;function Vc(){if(pg)return Xf;pg=1;const r=wt();return Xf=(u,l,c)=>{const o=new r(u,c),d=new r(l,c);return o.compare(d)||o.compareBuild(d)},Xf}var Qf,yg;function WE(){if(yg)return Qf;yg=1;const r=Vc();return Qf=(u,l)=>u.sort((c,o)=>r(c,o,l)),Qf}var Zf,gg;function e_(){if(gg)return Zf;gg=1;const r=Vc();return Zf=(u,l)=>u.sort((c,o)=>r(o,c,l)),Zf}var Jf,vg;function tu(){if(vg)return Jf;vg=1;const r=sn();return Jf=(u,l,c)=>r(u,l,c)>0,Jf}var Ff,bg;function xc(){if(bg)return Ff;bg=1;const r=sn();return Ff=(u,l,c)=>r(u,l,c)<0,Ff}var Wf,Eg;function _v(){if(Eg)return Wf;Eg=1;const r=sn();return Wf=(u,l,c)=>r(u,l,c)===0,Wf}var ec,_g;function Sv(){if(_g)return ec;_g=1;const r=sn();return ec=(u,l,c)=>r(u,l,c)!==0,ec}var tc,Sg;function Bc(){if(Sg)return tc;Sg=1;const r=sn();return tc=(u,l,c)=>r(u,l,c)>=0,tc}var nc,wg;function Hc(){if(wg)return nc;wg=1;const r=sn();return nc=(u,l,c)=>r(u,l,c)<=0,nc}var rc,$g;function wv(){if($g)return rc;$g=1;const r=_v(),i=Sv(),u=tu(),l=Bc(),c=xc(),o=Hc();return rc=(h,m,y,S)=>{switch(m){case"===":return typeof h=="object"&&(h=h.version),typeof y=="object"&&(y=y.version),h===y;case"!==":return typeof h=="object"&&(h=h.version),typeof y=="object"&&(y=y.version),h!==y;case"":case"=":case"==":return r(h,y,S);case"!=":return i(h,y,S);case">":return u(h,y,S);case">=":return l(h,y,S);case"<":return c(h,y,S);case"<=":return o(h,y,S);default:throw new TypeError(`Invalid operator: ${m}`)}},rc}var ac,Og;function t_(){if(Og)return ac;Og=1;const r=wt(),i=Oa(),{safeRe:u,t:l}=zi();return ac=(o,d)=>{if(o instanceof r)return o;if(typeof o=="number"&&(o=String(o)),typeof o!="string")return null;d=d||{};let h=null;if(!d.rtl)h=o.match(u[l.COERCE]);else{let m;for(;(m=u[l.COERCERTL].exec(o))&&(!h||h.index+h[0].length!==o.length);)(!h||m.index+m[0].length!==h.index+h[0].length)&&(h=m),u[l.COERCERTL].lastIndex=m.index+m[1].length+m[2].length;u[l.COERCERTL].lastIndex=-1}return h===null?null:i(`${h[2]}.${h[3]||"0"}.${h[4]||"0"}`,d)},ac}var ic,Ag;function n_(){return Ag||(Ag=1,ic=function(r){r.prototype[Symbol.iterator]=function*(){for(let i=this.head;i;i=i.next)yield i.value}}),ic}var sc,Rg;function r_(){if(Rg)return sc;Rg=1,sc=r,r.Node=c,r.create=r;function r(o){var d=this;if(d instanceof r||(d=new r),d.tail=null,d.head=null,d.length=0,o&&typeof o.forEach=="function")o.forEach(function(y){d.push(y)});else if(arguments.length>0)for(var h=0,m=arguments.length;h1)h=d;else if(this.head)m=this.head.next,h=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var y=0;m!==null;y++)h=o(h,m.value,y),m=m.next;return h},r.prototype.reduceReverse=function(o,d){var h,m=this.tail;if(arguments.length>1)h=d;else if(this.tail)m=this.tail.prev,h=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var y=this.length-1;m!==null;y--)h=o(h,m.value,y),m=m.prev;return h},r.prototype.toArray=function(){for(var o=new Array(this.length),d=0,h=this.head;h!==null;d++)o[d]=h.value,h=h.next;return o},r.prototype.toArrayReverse=function(){for(var o=new Array(this.length),d=0,h=this.tail;h!==null;d++)o[d]=h.value,h=h.prev;return o},r.prototype.slice=function(o,d){d=d||this.length,d<0&&(d+=this.length),o=o||0,o<0&&(o+=this.length);var h=new r;if(dthis.length&&(d=this.length);for(var m=0,y=this.head;y!==null&&mthis.length&&(d=this.length);for(var m=this.length,y=this.tail;y!==null&&m>d;m--)y=y.prev;for(;y!==null&&m>o;m--,y=y.prev)h.push(y.value);return h},r.prototype.splice=function(o,d,...h){o>this.length&&(o=this.length-1),o<0&&(o=this.length+o);for(var m=0,y=this.head;y!==null&&m1;class x{constructor(E){if(typeof E=="number"&&(E={max:E}),E||(E={}),E.max&&(typeof E.max!="number"||E.max<0))throw new TypeError("max must be a non-negative number");this[i]=E.max||1/0;const O=E.length||N;if(this[l]=typeof O!="function"?N:O,this[c]=E.stale||!1,E.maxAge&&typeof E.maxAge!="number")throw new TypeError("maxAge must be a number");this[o]=E.maxAge||0,this[d]=E.dispose,this[h]=E.noDisposeOnSet||!1,this[S]=E.updateAgeOnGet||!1,this.reset()}set max(E){if(typeof E!="number"||E<0)throw new TypeError("max must be a non-negative number");this[i]=E||1/0,C(this)}get max(){return this[i]}set allowStale(E){this[c]=!!E}get allowStale(){return this[c]}set maxAge(E){if(typeof E!="number")throw new TypeError("maxAge must be a non-negative number");this[o]=E,C(this)}get maxAge(){return this[o]}set lengthCalculator(E){typeof E!="function"&&(E=N),E!==this[l]&&(this[l]=E,this[u]=0,this[m].forEach(O=>{O.length=this[l](O.value,O.key),this[u]+=O.length})),C(this)}get lengthCalculator(){return this[l]}get length(){return this[u]}get itemCount(){return this[m].length}rforEach(E,O){O=O||this;for(let v=this[m].tail;v!==null;){const A=v.prev;p(this,E,v,O),v=A}}forEach(E,O){O=O||this;for(let v=this[m].head;v!==null;){const A=v.next;p(this,E,v,O),v=A}}keys(){return this[m].toArray().map(E=>E.key)}values(){return this[m].toArray().map(E=>E.value)}reset(){this[d]&&this[m]&&this[m].length&&this[m].forEach(E=>this[d](E.key,E.value)),this[y]=new Map,this[m]=new r,this[u]=0}dump(){return this[m].map(E=>L(this,E)?!1:{k:E.key,v:E.value,e:E.now+(E.maxAge||0)}).toArray().filter(E=>E)}dumpLru(){return this[m]}set(E,O,v){if(v=v||this[o],v&&typeof v!="number")throw new TypeError("maxAge must be a number");const A=v?Date.now():0,$=this[l](O,E);if(this[y].has(E)){if($>this[i])return g(this,this[y].get(E)),!1;const Y=this[y].get(E).value;return this[d]&&(this[h]||this[d](E,Y.value)),Y.now=A,Y.maxAge=v,Y.value=O,this[u]+=$-Y.length,Y.length=$,this.get(E),C(this),!0}const D=new w(E,O,$,A,v);return D.length>this[i]?(this[d]&&this[d](E,O),!1):(this[u]+=D.length,this[m].unshift(D),this[y].set(E,this[m].head),C(this),!0)}has(E){if(!this[y].has(E))return!1;const O=this[y].get(E).value;return!L(this,O)}get(E){return V(this,E,!0)}peek(E){return V(this,E,!1)}pop(){const E=this[m].tail;return E?(g(this,E),E.value):null}del(E){g(this,this[y].get(E))}load(E){this.reset();const O=Date.now();for(let v=E.length-1;v>=0;v--){const A=E[v],$=A.e||0;if($===0)this.set(A.k,A.v);else{const D=$-O;D>0&&this.set(A.k,A.v,D)}}}prune(){this[y].forEach((E,O)=>V(this,O,!1))}}const V=(b,E,O)=>{const v=b[y].get(E);if(v){const A=v.value;if(L(b,A)){if(g(b,v),!b[c])return}else O&&(b[S]&&(v.value.now=Date.now()),b[m].unshiftNode(v));return A.value}},L=(b,E)=>{if(!E||!E.maxAge&&!b[o])return!1;const O=Date.now()-E.now;return E.maxAge?O>E.maxAge:b[o]&&O>b[o]},C=b=>{if(b[u]>b[i])for(let E=b[m].tail;b[u]>b[i]&&E!==null;){const O=E.prev;g(b,E),E=O}},g=(b,E)=>{if(E){const O=E.value;b[d]&&b[d](O.key,O.value),b[u]-=O.length,b[y].delete(O.key),b[m].removeNode(E)}};class w{constructor(E,O,v,A,$){this.key=E,this.value=O,this.length=v,this.now=A,this.maxAge=$||0}}const p=(b,E,O,v)=>{let A=O.value;L(b,A)&&(g(b,O),b[c]||(A=void 0)),A&&E.call(v,A.value,A.key,b)};return lc=x,lc}var uc,Ng;function ln(){if(Ng)return uc;Ng=1;class r{constructor(F,ne){if(ne=l(ne),F instanceof r)return F.loose===!!ne.loose&&F.includePrerelease===!!ne.includePrerelease?F:new r(F.raw,ne);if(F instanceof c)return this.raw=F.value,this.set=[[F]],this.format(),this;if(this.options=ne,this.loose=!!ne.loose,this.includePrerelease=!!ne.includePrerelease,this.raw=F.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(P=>this.parseRange(P)).filter(P=>P.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const P=this.set[0];if(this.set=this.set.filter(ue=>!L(ue[0])),this.set.length===0)this.set=[P];else if(this.set.length>1){for(const ue of this.set)if(ue.length===1&&C(ue[0])){this.set=[ue];break}}}this.format()}format(){return this.range=this.set.map(F=>F.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(F){const P=((this.options.includePrerelease&&x)|(this.options.loose&&V))+":"+F,ue=u.get(P);if(ue)return ue;const re=this.options.loose,de=re?h[m.HYPHENRANGELOOSE]:h[m.HYPHENRANGE];F=F.replace(de,Y(this.options.includePrerelease)),o("hyphen replace",F),F=F.replace(h[m.COMPARATORTRIM],y),o("comparator trim",F),F=F.replace(h[m.TILDETRIM],S),o("tilde trim",F),F=F.replace(h[m.CARETTRIM],N),o("caret trim",F);let R=F.split(" ").map(T=>w(T,this.options)).join(" ").split(/\s+/).map(T=>j(T,this.options));re&&(R=R.filter(T=>(o("loose invalid filter",T,this.options),!!T.match(h[m.COMPARATORLOOSE])))),o("range list",R);const z=new Map,K=R.map(T=>new c(T,this.options));for(const T of K){if(L(T))return[T];z.set(T.value,T)}z.size>1&&z.has("")&&z.delete("");const k=[...z.values()];return u.set(P,k),k}intersects(F,ne){if(!(F instanceof r))throw new TypeError("a Range is required");return this.set.some(P=>g(P,ne)&&F.set.some(ue=>g(ue,ne)&&P.every(re=>ue.every(de=>re.intersects(de,ne)))))}test(F){if(!F)return!1;if(typeof F=="string")try{F=new d(F,this.options)}catch{return!1}for(let ne=0;neW.value==="<0.0.0-0",C=W=>W.value==="",g=(W,F)=>{let ne=!0;const P=W.slice();let ue=P.pop();for(;ne&&P.length;)ne=P.every(re=>ue.intersects(re,F)),ue=P.pop();return ne},w=(W,F)=>(o("comp",W,F),W=O(W,F),o("caret",W),W=b(W,F),o("tildes",W),W=A(W,F),o("xrange",W),W=D(W,F),o("stars",W),W),p=W=>!W||W.toLowerCase()==="x"||W==="*",b=(W,F)=>W.trim().split(/\s+/).map(ne=>E(ne,F)).join(" "),E=(W,F)=>{const ne=F.loose?h[m.TILDELOOSE]:h[m.TILDE];return W.replace(ne,(P,ue,re,de,R)=>{o("tilde",W,P,ue,re,de,R);let z;return p(ue)?z="":p(re)?z=`>=${ue}.0.0 <${+ue+1}.0.0-0`:p(de)?z=`>=${ue}.${re}.0 <${ue}.${+re+1}.0-0`:R?(o("replaceTilde pr",R),z=`>=${ue}.${re}.${de}-${R} <${ue}.${+re+1}.0-0`):z=`>=${ue}.${re}.${de} <${ue}.${+re+1}.0-0`,o("tilde return",z),z})},O=(W,F)=>W.trim().split(/\s+/).map(ne=>v(ne,F)).join(" "),v=(W,F)=>{o("caret",W,F);const ne=F.loose?h[m.CARETLOOSE]:h[m.CARET],P=F.includePrerelease?"-0":"";return W.replace(ne,(ue,re,de,R,z)=>{o("caret",W,ue,re,de,R,z);let K;return p(re)?K="":p(de)?K=`>=${re}.0.0${P} <${+re+1}.0.0-0`:p(R)?re==="0"?K=`>=${re}.${de}.0${P} <${re}.${+de+1}.0-0`:K=`>=${re}.${de}.0${P} <${+re+1}.0.0-0`:z?(o("replaceCaret pr",z),re==="0"?de==="0"?K=`>=${re}.${de}.${R}-${z} <${re}.${de}.${+R+1}-0`:K=`>=${re}.${de}.${R}-${z} <${re}.${+de+1}.0-0`:K=`>=${re}.${de}.${R}-${z} <${+re+1}.0.0-0`):(o("no pr"),re==="0"?de==="0"?K=`>=${re}.${de}.${R}${P} <${re}.${de}.${+R+1}-0`:K=`>=${re}.${de}.${R}${P} <${re}.${+de+1}.0-0`:K=`>=${re}.${de}.${R} <${+re+1}.0.0-0`),o("caret return",K),K})},A=(W,F)=>(o("replaceXRanges",W,F),W.split(/\s+/).map(ne=>$(ne,F)).join(" ")),$=(W,F)=>{W=W.trim();const ne=F.loose?h[m.XRANGELOOSE]:h[m.XRANGE];return W.replace(ne,(P,ue,re,de,R,z)=>{o("xRange",W,P,ue,re,de,R,z);const K=p(re),k=K||p(de),T=k||p(R),H=T;return ue==="="&&H&&(ue=""),z=F.includePrerelease?"-0":"",K?ue===">"||ue==="<"?P="<0.0.0-0":P="*":ue&&H?(k&&(de=0),R=0,ue===">"?(ue=">=",k?(re=+re+1,de=0,R=0):(de=+de+1,R=0)):ue==="<="&&(ue="<",k?re=+re+1:de=+de+1),ue==="<"&&(z="-0"),P=`${ue+re}.${de}.${R}${z}`):k?P=`>=${re}.0.0${z} <${+re+1}.0.0-0`:T&&(P=`>=${re}.${de}.0${z} <${re}.${+de+1}.0-0`),o("xRange return",P),P})},D=(W,F)=>(o("replaceStars",W,F),W.trim().replace(h[m.STAR],"")),j=(W,F)=>(o("replaceGTE0",W,F),W.trim().replace(h[F.includePrerelease?m.GTE0PRE:m.GTE0],"")),Y=W=>(F,ne,P,ue,re,de,R,z,K,k,T,H,te)=>(p(P)?ne="":p(ue)?ne=`>=${P}.0.0${W?"-0":""}`:p(re)?ne=`>=${P}.${ue}.0${W?"-0":""}`:de?ne=`>=${ne}`:ne=`>=${ne}${W?"-0":""}`,p(K)?z="":p(k)?z=`<${+K+1}.0.0-0`:p(T)?z=`<${K}.${+k+1}.0-0`:H?z=`<=${K}.${k}.${T}-${H}`:W?z=`<${K}.${k}.${+T+1}-0`:z=`<=${z}`,`${ne} ${z}`.trim()),Q=(W,F,ne)=>{for(let P=0;P0){const ue=W[P].semver;if(ue.major===F.major&&ue.minor===F.minor&&ue.patch===F.patch)return!0}return!1}return!0};return uc}var oc,jg;function nu(){if(jg)return oc;jg=1;const r=Symbol("SemVer ANY");class i{static get ANY(){return r}constructor(S,N){if(N=u(N),S instanceof i){if(S.loose===!!N.loose)return S;S=S.value}S=S.trim().split(/\s+/).join(" "),d("comparator",S,N),this.options=N,this.loose=!!N.loose,this.parse(S),this.semver===r?this.value="":this.value=this.operator+this.semver.version,d("comp",this)}parse(S){const N=this.options.loose?l[c.COMPARATORLOOSE]:l[c.COMPARATOR],x=S.match(N);if(!x)throw new TypeError(`Invalid comparator: ${S}`);this.operator=x[1]!==void 0?x[1]:"",this.operator==="="&&(this.operator=""),x[2]?this.semver=new h(x[2],this.options.loose):this.semver=r}toString(){return this.value}test(S){if(d("Comparator.test",S,this.options.loose),this.semver===r||S===r)return!0;if(typeof S=="string")try{S=new h(S,this.options)}catch{return!1}return o(S,this.operator,this.semver,this.options)}intersects(S,N){if(!(S instanceof i))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new m(S.value,N).test(this.value):S.operator===""?S.value===""?!0:new m(this.value,N).test(S.semver):(N=u(N),N.includePrerelease&&(this.value==="<0.0.0-0"||S.value==="<0.0.0-0")||!N.includePrerelease&&(this.value.startsWith("<0.0.0")||S.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&S.operator.startsWith(">")||this.operator.startsWith("<")&&S.operator.startsWith("<")||this.semver.version===S.semver.version&&this.operator.includes("=")&&S.operator.includes("=")||o(this.semver,"<",S.semver,N)&&this.operator.startsWith(">")&&S.operator.startsWith("<")||o(this.semver,">",S.semver,N)&&this.operator.startsWith("<")&&S.operator.startsWith(">")))}}oc=i;const u=Lc(),{safeRe:l,t:c}=zi(),o=wv(),d=eu(),h=wt(),m=ln();return oc}var fc,Dg;function ru(){if(Dg)return fc;Dg=1;const r=ln();return fc=(u,l,c)=>{try{l=new r(l,c)}catch{return!1}return l.test(u)},fc}var cc,Mg;function i_(){if(Mg)return cc;Mg=1;const r=ln();return cc=(u,l)=>new r(u,l).set.map(c=>c.map(o=>o.value).join(" ").trim().split(" ")),cc}var dc,qg;function s_(){if(qg)return dc;qg=1;const r=wt(),i=ln();return dc=(l,c,o)=>{let d=null,h=null,m=null;try{m=new i(c,o)}catch{return null}return l.forEach(y=>{m.test(y)&&(!d||h.compare(y)===-1)&&(d=y,h=new r(d,o))}),d},dc}var hc,Cg;function l_(){if(Cg)return hc;Cg=1;const r=wt(),i=ln();return hc=(l,c,o)=>{let d=null,h=null,m=null;try{m=new i(c,o)}catch{return null}return l.forEach(y=>{m.test(y)&&(!d||h.compare(y)===1)&&(d=y,h=new r(d,o))}),d},hc}var mc,zg;function u_(){if(zg)return mc;zg=1;const r=wt(),i=ln(),u=tu();return mc=(c,o)=>{c=new i(c,o);let d=new r("0.0.0");if(c.test(d)||(d=new r("0.0.0-0"),c.test(d)))return d;d=null;for(let h=0;h{const N=new r(S.semver.version);switch(S.operator){case">":N.prerelease.length===0?N.patch++:N.prerelease.push(0),N.raw=N.format();case"":case">=":(!y||u(N,y))&&(y=N);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${S.operator}`)}}),y&&(!d||u(d,y))&&(d=y)}return d&&c.test(d)?d:null},mc}var pc,Ug;function o_(){if(Ug)return pc;Ug=1;const r=ln();return pc=(u,l)=>{try{return new r(u,l).range||"*"}catch{return null}},pc}var yc,Lg;function Gc(){if(Lg)return yc;Lg=1;const r=wt(),i=nu(),{ANY:u}=i,l=ln(),c=ru(),o=tu(),d=xc(),h=Hc(),m=Bc();return yc=(S,N,x,V)=>{S=new r(S,V),N=new l(N,V);let L,C,g,w,p;switch(x){case">":L=o,C=h,g=d,w=">",p=">=";break;case"<":L=d,C=m,g=o,w="<",p="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(c(S,N,V))return!1;for(let b=0;b{A.semver===u&&(A=new i(">=0.0.0")),O=O||A,v=v||A,L(A.semver,O.semver,V)?O=A:g(A.semver,v.semver,V)&&(v=A)}),O.operator===w||O.operator===p||(!v.operator||v.operator===w)&&C(S,v.semver))return!1;if(v.operator===p&&g(S,v.semver))return!1}return!0},yc}var gc,Vg;function f_(){if(Vg)return gc;Vg=1;const r=Gc();return gc=(u,l,c)=>r(u,l,">",c),gc}var vc,xg;function c_(){if(xg)return vc;xg=1;const r=Gc();return vc=(u,l,c)=>r(u,l,"<",c),vc}var bc,Bg;function d_(){if(Bg)return bc;Bg=1;const r=ln();return bc=(u,l,c)=>(u=new r(u,c),l=new r(l,c),u.intersects(l,c)),bc}var Ec,Hg;function h_(){if(Hg)return Ec;Hg=1;const r=ru(),i=sn();return Ec=(u,l,c)=>{const o=[];let d=null,h=null;const m=u.sort((x,V)=>i(x,V,c));for(const x of m)r(x,l,c)?(h=x,d||(d=x)):(h&&o.push([d,h]),h=null,d=null);d&&o.push([d,null]);const y=[];for(const[x,V]of o)x===V?y.push(x):!V&&x===m[0]?y.push("*"):V?x===m[0]?y.push(`<=${V}`):y.push(`${x} - ${V}`):y.push(`>=${x}`);const S=y.join(" || "),N=typeof l.raw=="string"?l.raw:String(l);return S.length{if(N===x)return!0;N=new r(N,V),x=new r(x,V);let L=!1;e:for(const C of N.set){for(const g of x.set){const w=m(C,g,V);if(L=L||w!==null,w)continue e}if(L)return!1}return!0},d=[new i(">=0.0.0-0")],h=[new i(">=0.0.0")],m=(N,x,V)=>{if(N===x)return!0;if(N.length===1&&N[0].semver===u){if(x.length===1&&x[0].semver===u)return!0;V.includePrerelease?N=d:N=h}if(x.length===1&&x[0].semver===u){if(V.includePrerelease)return!0;x=h}const L=new Set;let C,g;for(const $ of N)$.operator===">"||$.operator===">="?C=y(C,$,V):$.operator==="<"||$.operator==="<="?g=S(g,$,V):L.add($.semver);if(L.size>1)return null;let w;if(C&&g){if(w=c(C.semver,g.semver,V),w>0)return null;if(w===0&&(C.operator!==">="||g.operator!=="<="))return null}for(const $ of L){if(C&&!l($,String(C),V)||g&&!l($,String(g),V))return null;for(const D of x)if(!l($,String(D),V))return!1;return!0}let p,b,E,O,v=g&&!V.includePrerelease&&g.semver.prerelease.length?g.semver:!1,A=C&&!V.includePrerelease&&C.semver.prerelease.length?C.semver:!1;v&&v.prerelease.length===1&&g.operator==="<"&&v.prerelease[0]===0&&(v=!1);for(const $ of x){if(O=O||$.operator===">"||$.operator===">=",E=E||$.operator==="<"||$.operator==="<=",C){if(A&&$.semver.prerelease&&$.semver.prerelease.length&&$.semver.major===A.major&&$.semver.minor===A.minor&&$.semver.patch===A.patch&&(A=!1),$.operator===">"||$.operator===">="){if(p=y(C,$,V),p===$&&p!==C)return!1}else if(C.operator===">="&&!l(C.semver,String($),V))return!1}if(g){if(v&&$.semver.prerelease&&$.semver.prerelease.length&&$.semver.major===v.major&&$.semver.minor===v.minor&&$.semver.patch===v.patch&&(v=!1),$.operator==="<"||$.operator==="<="){if(b=S(g,$,V),b===$&&b!==g)return!1}else if(g.operator==="<="&&!l(g.semver,String($),V))return!1}if(!$.operator&&(g||C)&&w!==0)return!1}return!(C&&E&&!g&&w!==0||g&&O&&!C&&w!==0||A||v)},y=(N,x,V)=>{if(!N)return x;const L=c(N.semver,x.semver,V);return L>0?N:L<0||x.operator===">"&&N.operator===">="?x:N},S=(N,x,V)=>{if(!N)return x;const L=c(N.semver,x.semver,V);return L<0?N:L>0||x.operator==="<"&&N.operator==="<="?x:N};return _c=o,_c}var Sc,Ig;function p_(){if(Ig)return Sc;Ig=1;const r=zi(),i=Wl(),u=wt(),l=Ev(),c=Oa(),o=IE(),d=YE(),h=kE(),m=PE(),y=KE(),S=XE(),N=QE(),x=ZE(),V=sn(),L=JE(),C=FE(),g=Vc(),w=WE(),p=e_(),b=tu(),E=xc(),O=_v(),v=Sv(),A=Bc(),$=Hc(),D=wv(),j=t_(),Y=nu(),Q=ln(),W=ru(),F=i_(),ne=s_(),P=l_(),ue=u_(),re=o_(),de=Gc(),R=f_(),z=c_(),K=d_(),k=h_(),T=m_();return Sc={parse:c,valid:o,clean:d,inc:h,diff:m,major:y,minor:S,patch:N,prerelease:x,compare:V,rcompare:L,compareLoose:C,compareBuild:g,sort:w,rsort:p,gt:b,lt:E,eq:O,neq:v,gte:A,lte:$,cmp:D,coerce:j,Comparator:Y,Range:Q,satisfies:W,toComparators:F,maxSatisfying:ne,minSatisfying:P,minVersion:ue,validRange:re,outside:de,gtr:R,ltr:z,intersects:K,simplifyRange:k,subset:T,SemVer:u,re:r.re,src:r.src,tokens:r.t,SEMVER_SPEC_VERSION:i.SEMVER_SPEC_VERSION,RELEASE_TYPES:i.RELEASE_TYPES,compareIdentifiers:l.compareIdentifiers,rcompareIdentifiers:l.rcompareIdentifiers},Sc}var wc=p_(),$c={exports:{}};/** * @preserve * JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013) * * @author Jens Taylor * @see http://github.com/homebrewing/brauhaus-diff * @author Gary Court * @see http://github.com/garycourt/murmurhash-js * @author Austin Appleby * @see http://sites.google.com/site/murmurhash/ */var Yg;function y_(){return Yg||(Yg=1,function(r){(function(){var i;function u(l,c){var o=this instanceof u?this:i;if(o.reset(c),typeof l=="string"&&l.length>0&&o.hash(l),o!==this)return o}u.prototype.hash=function(l){var c,o,d,h,m;switch(m=l.length,this.len+=m,o=this.k1,d=0,this.rem){case 0:o^=m>d?l.charCodeAt(d++)&65535:0;case 1:o^=m>d?(l.charCodeAt(d++)&65535)<<8:0;case 2:o^=m>d?(l.charCodeAt(d++)&65535)<<16:0;case 3:o^=m>d?(l.charCodeAt(d)&255)<<24:0,o^=m>d?(l.charCodeAt(d++)&65280)>>8:0}if(this.rem=m+this.rem&3,m-=this.rem,m>0){for(c=this.h1;o=o*11601+(o&65535)*3432906752&4294967295,o=o<<15|o>>>17,o=o*13715+(o&65535)*461832192&4294967295,c^=o,c=c<<13|c>>>19,c=c*5+3864292196&4294967295,!(d>=m);)o=l.charCodeAt(d++)&65535^(l.charCodeAt(d++)&65535)<<8^(l.charCodeAt(d++)&65535)<<16,h=l.charCodeAt(d++),o^=(h&255)<<24^(h&65280)>>8;switch(o=0,this.rem){case 3:o^=(l.charCodeAt(d+2)&65535)<<16;case 2:o^=(l.charCodeAt(d+1)&65535)<<8;case 1:o^=l.charCodeAt(d)&65535}this.h1=c}return this.k1=o,this},u.prototype.result=function(){var l,c;return l=this.k1,c=this.h1,l>0&&(l=l*11601+(l&65535)*3432906752&4294967295,l=l<<15|l>>>17,l=l*13715+(l&65535)*461832192&4294967295,c^=l),c^=this.len,c^=c>>>16,c=c*51819+(c&65535)*2246770688&4294967295,c^=c>>>13,c=c*44597+(c&65535)*3266445312&4294967295,c^=c>>>16,c>>>0},u.prototype.reset=function(l){return this.h1=typeof l=="number"?l:0,this.rem=this.k1=this.len=0,this},i=new u,r.exports=u})()}($c)),$c.exports}var g_=y_();const v_=Xl(g_);var b_="https://flagd.dev/schema/v0/flags.json",E_="http://json-schema.org/draft-07/schema#",__="flagd Flag Configuration",S_="Defines flags for use in flagd, including typed variants and rules.",w_="object",$_={flags:{title:"Flags",description:"Top-level flags object. All flags are defined here.",type:"object",$comment:"flag objects are one of the 4 flag types defined in definitions",additionalProperties:!1,patternProperties:{"^.{1,}$":{oneOf:[{title:"Boolean flag",description:"A flag having boolean values.",$ref:"#/definitions/booleanFlag"},{title:"String flag",description:"A flag having string values.",$ref:"#/definitions/stringFlag"},{title:"Numeric flag",description:"A flag having numeric values.",$ref:"#/definitions/numberFlag"},{title:"Object flag",description:"A flag having arbitrary object values.",$ref:"#/definitions/objectFlag"}]}}},$evaluators:{title:"Evaluators",description:'Reusable targeting rules that can be referenced with "$ref": "myRule" in multiple flags.',type:"object",additionalProperties:!1,patternProperties:{"^.{1,}$":{$comment:"this relative ref means that targeting.json MUST be in the same dir, or available on the same HTTP path",$ref:"./targeting.json"}}},metadata:{title:"Flag Set Metadata",description:"Metadata about the flag set, with keys of type string, and values of type boolean, string, or number.",properties:{flagSetId:{description:"The unique identifier for the flag set.",type:"string"},version:{description:"The version of the flag set.",type:"string"}},$ref:"#/definitions/metadata"}},O_={flag:{$comment:"base flag object; no title/description here, allows for better UX, keep it in the overrides",type:"object",properties:{state:{title:"Flag State",description:"Indicates whether the flag is functional. Disabled flags are treated as if they don't exist.",type:"string",enum:["ENABLED","DISABLED"]},defaultVariant:{title:"Default Variant",description:"The variant to serve if no dynamic targeting applies (including if the targeting returns null).",type:"string"},targeting:{$ref:"./targeting.json"},metadata:{title:"Flag Metadata",description:"Metadata about an individual feature flag, with keys of type string, and values of type boolean, string, or number.",$ref:"#/definitions/metadata"}},required:["state","defaultVariant"]},booleanVariants:{type:"object",properties:{variants:{type:"object",additionalProperties:!1,patternProperties:{"^.{1,}$":{type:"boolean"}},default:{true:!0,false:!1}}}},stringVariants:{type:"object",properties:{variants:{type:"object",additionalProperties:!1,patternProperties:{"^.{1,}$":{type:"string"}}}}},numberVariants:{type:"object",properties:{variants:{type:"object",additionalProperties:!1,patternProperties:{"^.{1,}$":{type:"number"}}}}},objectVariants:{type:"object",properties:{variants:{type:"object",additionalProperties:!1,patternProperties:{"^.{1,}$":{type:"object"}}}}},booleanFlag:{$comment:"merge the variants with the base flag to build our typed flags",allOf:[{$ref:"#/definitions/flag"},{$ref:"#/definitions/booleanVariants"}]},stringFlag:{allOf:[{$ref:"#/definitions/flag"},{$ref:"#/definitions/stringVariants"}]},numberFlag:{allOf:[{$ref:"#/definitions/flag"},{$ref:"#/definitions/numberVariants"}]},objectFlag:{allOf:[{$ref:"#/definitions/flag"},{$ref:"#/definitions/objectVariants"}]},metadata:{type:"object",additionalProperties:{description:"Any additional key/value pair with value of type boolean, string, or number.",type:["string","number","boolean"]},required:[]}},A_={$id:b_,$schema:E_,title:__,description:S_,type:w_,properties:$_,definitions:O_},R_="https://flagd.dev/schema/v0/targeting.json",T_="http://json-schema.org/draft-07/schema#",N_="flagd Targeting",j_='Defines targeting logic for flagd; a extension of JSONLogic, including purpose-built feature-flagging operations. Note that this schema applies to top-level objects; no additional properties are supported, including "$schema", which means built-in JSON-schema support is not possible in editors. Please use flags.json (which imports this schema) for a rich editor experience.',D_="object",M_=[{$comment:"we need this to support empty targeting",type:"object",additionalProperties:!1,properties:{}},{$ref:"#/definitions/anyRule"}],q_={primitive:{oneOf:[{description:'When returned from rules, a null value "exits", the targeting, and the "defaultValue" is returned, with the reason indicating the targeting did not match.',type:"null"},{description:'When returned from rules, booleans are converted to strings ("true"/"false"), and used to as keys to retrieve the associated value from the "variants" object. Be sure that the returned string is present as a key in the variants!',type:"boolean"},{description:"When returned from rules, the behavior of numbers is not defined.",type:"number"},{description:'When returned from rules, strings are used to as keys to retrieve the associated value from the "variants" object. Be sure that the returned string is present as a key in the variants!.',type:"string"},{description:'When returned from rules, strings are used to as keys to retrieve the associated value from the "variants" object. Be sure that the returned string is present as a key in the variants!.',type:"array"}]},varRule:{title:"Var Operation",description:"Retrieve data from the provided data object.",type:"object",additionalProperties:!1,properties:{var:{anyOf:[{type:"string",description:'flagd automatically injects "$flagd.timestamp" (unix epoch) and "$flagd.flagKey" (the key of the flag in evaluation) into the context.',pattern:"^\\$flagd\\.((timestamp)|(flagKey))$"},{not:{$comment:'this is a negated (not) match of "$flagd.{some-key}", which is faster and more compatible that a negative lookahead regex',type:"string",description:'flagd automatically injects "$flagd.timestamp" (unix epoch) and "$flagd.flagKey" (the key of the flag in evaluation) into the context.',pattern:"^\\$flagd\\..*$"}},{type:"array",$comment:"this is to support the form of var with a default... there seems to be a bug here, where ajv gives a warning (not an error) because maxItems doesn't equal the number of entries in items, though this is valid in this case",minItems:1,items:[{type:"string"}],additionalItems:{anyOf:[{type:"null"},{type:"boolean"},{type:"string"},{type:"number"}]}}]}}},missingRule:{title:"Missing Operation",description:"Takes an array of data keys to search for (same format as var). Returns an array of any keys that are missing from the data object, or an empty array.",type:"object",additionalProperties:!1,properties:{missing:{type:"array",items:{type:"string"}}}},missingSomeRule:{title:"Missing-Some Operation",description:"Takes a minimum number of data keys that are required, and an array of keys to search for (same format as var or missing). Returns an empty array if the minimum is met, or an array of the missing keys otherwise.",type:"object",additionalProperties:!1,properties:{missing_some:{minItems:2,maxItems:2,type:"array",items:[{type:"number"},{type:"array",items:{type:"string"}}]}}},binaryOrTernaryOp:{type:"array",minItems:2,maxItems:3,items:{$ref:"#/definitions/args"}},binaryOrTernaryRule:{type:"object",additionalProperties:!1,properties:{substr:{title:"Substring Operation",description:"Get a portion of a string. Give a positive start position to return everything beginning at that index. Give a negative start position to work backwards from the end of the string, then return everything. Give a positive length to express how many characters to return.",$ref:"#/definitions/binaryOrTernaryOp"},"<":{title:"Less-Than/Between Operation. Can be used to test that one value is between two others.",$ref:"#/definitions/binaryOrTernaryOp"},"<=":{title:"Less-Than-Or-Equal-To/Between Operation. Can be used to test that one value is between two others.",$ref:"#/definitions/binaryOrTernaryOp"}}},binaryOp:{type:"array",minItems:2,maxItems:2,items:{$ref:"#/definitions/args"}},binaryRule:{title:"Binary Operation",description:"Any primitive JSONLogic operation with 2 operands.",type:"object",additionalProperties:!1,properties:{if:{title:"If Operator",description:'The if statement takes 1 or more arguments: a condition ("if"), what to do if its true ("then", optional, defaults to returning true), and what to do if its false ("else", optional, defaults to returning false). Note that the else condition can be used as an else-if statement by adding additional arguments.',$ref:"#/definitions/variadicOp"},"==":{title:"Lose Equality Operation",description:"Tests equality, with type coercion. Requires two arguments.",$ref:"#/definitions/binaryOp"},"===":{title:"Strict Equality Operation",description:"Tests strict equality. Requires two arguments.",$ref:"#/definitions/binaryOp"},"!=":{title:"Lose Inequality Operation",description:"Tests not-equal, with type coercion.",$ref:"#/definitions/binaryOp"},"!==":{title:"Strict Inequality Operation",description:"Tests strict not-equal.",$ref:"#/definitions/binaryOp"},">":{title:"Greater-Than Operation",$ref:"#/definitions/binaryOp"},">=":{title:"Greater-Than-Or-Equal-To Operation",$ref:"#/definitions/binaryOp"},"%":{title:"Modulo Operation",description:"Finds the remainder after the first argument is divided by the second argument.",$ref:"#/definitions/binaryOp"},"/":{title:"Division Operation",$ref:"#/definitions/binaryOp"},map:{title:"Map Operation",description:"Perform an action on every member of an array. Note, that inside the logic being used to map, var operations are relative to the array element being worked on.",$ref:"#/definitions/binaryOp"},filter:{title:"Filter Operation",description:"Keep only elements of the array that pass a test. Note, that inside the logic being used to filter, var operations are relative to the array element being worked on.",$ref:"#/definitions/binaryOp"},all:{title:"All Operation",description:"Perform a test on each member of that array, returning true if all pass. Inside the test code, var operations are relative to the array element being tested.",$ref:"#/definitions/binaryOp"},none:{title:"None Operation",description:"Perform a test on each member of that array, returning true if none pass. Inside the test code, var operations are relative to the array element being tested.",$ref:"#/definitions/binaryOp"},some:{title:"Some Operation",description:"Perform a test on each member of that array, returning true if some pass. Inside the test code, var operations are relative to the array element being tested.",$ref:"#/definitions/binaryOp"},in:{title:"In Operation",description:"If the second argument is an array, tests that the first argument is a member of the array.",$ref:"#/definitions/binaryOp"}}},reduceRule:{type:"object",additionalProperties:!1,properties:{reduce:{title:"Reduce Operation",description:'Combine all the elements in an array into a single value, like adding up a list of numbers. Note, that inside the logic being used to reduce, var operations only have access to an object with a "current" and a "accumulator".',type:"array",minItems:3,maxItems:3,items:{$ref:"#/definitions/args"}}}},associativeOp:{type:"array",minItems:2,items:{$ref:"#/definitions/args"}},associativeRule:{title:"Mathematically Associative Operation",description:"Operation applicable to 2 or more parameters.",type:"object",additionalProperties:!1,properties:{"*":{title:"Multiplication Operation",description:"Multiplication; associative, will accept and unlimited amount of arguments.",$ref:"#/definitions/associativeOp"}}},unaryOp:{anyOf:[{type:"array",minItems:1,maxItems:1,items:{$ref:"#/definitions/args"}},{$ref:"#/definitions/args"}]},unaryRule:{title:"Unary Operation",description:"Any primitive JSONLogic operation with 1 operands.",type:"object",additionalProperties:!1,properties:{"!":{title:"Negation Operation",description:"Logical negation (“not”). Takes just one argument.",$ref:"#/definitions/unaryOp"},"!!":{title:"Double Negation Operation",description:"Double negation, or 'cast to a boolean'. Takes a single argument.",$ref:"#/definitions/unaryOp"}}},variadicOp:{type:"array",minItems:1,items:{$ref:"#/definitions/args"}},variadicRule:{$comment:"note < and <= can be used with up to 3 ops (between)",type:"object",additionalProperties:!1,properties:{or:{title:"Or Operation",description:'Simple boolean test, with 1 or more arguments. At a more sophisticated level, "or" returns the first truthy argument, or the last argument.',$ref:"#/definitions/variadicOp"},and:{title:"",description:'Simple boolean test, with 1 or more arguments. At a more sophisticated level, "and" returns the first falsy argument, or the last argument.',$ref:"#/definitions/variadicOp"},"+":{title:"Addition Operation",description:"Addition; associative, will accept and unlimited amount of arguments.",$ref:"#/definitions/variadicOp"},"-":{title:"Subtraction Operation",$ref:"#/definitions/variadicOp"},max:{title:"Maximum Operation",description:"Return the maximum from a list of values.",$ref:"#/definitions/variadicOp"},min:{title:"Minimum Operation",description:"Return the minimum from a list of values.",$ref:"#/definitions/variadicOp"},merge:{title:"Merge Operation",description:"Takes one or more arrays, and merges them into one array. If arguments aren't arrays, they get cast to arrays.",$ref:"#/definitions/variadicOp"},cat:{title:"Concatenate Operation",description:"Concatenate all the supplied arguments. Note that this is not a join or implode operation, there is no “glue” string.",$ref:"#/definitions/variadicOp"}}},stringCompareArg:{oneOf:[{type:"string"},{$ref:"#/definitions/anyRule"}]},stringCompareArgs:{type:"array",minItems:2,maxItems:2,items:{$ref:"#/definitions/stringCompareArg"}},stringCompareRule:{type:"object",additionalProperties:!1,properties:{starts_with:{title:"Starts-With Operation",description:"The string attribute starts with the specified string value.",$ref:"#/definitions/stringCompareArgs"},ends_with:{title:"Ends-With Operation",description:"The string attribute ends with the specified string value.",$ref:"#/definitions/stringCompareArgs"}}},semVerString:{title:"Semantic Version String",description:"A string representing a valid semantic version expression as per https://semver.org/.",type:"string",pattern:"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$"},ruleSemVer:{type:"object",additionalProperties:!1,properties:{sem_ver:{title:"Semantic Version Operation",description:'Attribute matches a semantic version condition. Accepts "npm-style" range specifiers: "=", "!=", ">", "<", ">=", "<=", "~" (match minor version), "^" (match major version).',type:"array",minItems:3,maxItems:3,items:[{oneOf:[{$ref:"#/definitions/semVerString"},{$ref:"#/definitions/varRule"}]},{description:'Range specifiers: "=", "!=", ">", "<", ">=", "<=", "~" (match minor version), "^" (match major version).',enum:["=","!=",">","<",">=","<=","~","^"]},{oneOf:[{$ref:"#/definitions/semVerString"},{$ref:"#/definitions/varRule"}]}]}}},fractionalWeightArg:{description:"Distribution for all possible variants, with their associated weighting.",type:"array",minItems:1,maxItems:2,items:[{description:'If this bucket is randomly selected, this string is used to as a key to retrieve the associated value from the "variants" object.',type:"string"},{description:"Weighted distribution for this variant key.",type:"number"}]},fractionalOp:{type:"array",minItems:3,$comment:"there seems to be a bug here, where ajv gives a warning (not an error) because maxItems doesn't equal the number of entries in items, though this is valid in this case",items:[{description:"Bucketing value used in pseudorandom assignment; should be unique and stable for each subject of flag evaluation. Defaults to a concatenation of the flagKey and targetingKey.",$ref:"#/definitions/anyRule"},{$ref:"#/definitions/fractionalWeightArg"},{$ref:"#/definitions/fractionalWeightArg"}],additionalItems:{$ref:"#/definitions/fractionalWeightArg"}},fractionalShorthandOp:{type:"array",minItems:2,items:{$ref:"#/definitions/fractionalWeightArg"}},fractionalRule:{type:"object",additionalProperties:!1,properties:{fractional:{title:"Fractional Operation",description:"Deterministic, pseudorandom fractional distribution.",oneOf:[{$ref:"#/definitions/fractionalOp"},{$ref:"#/definitions/fractionalShorthandOp"}]}}},reference:{additionalProperties:!1,type:"object",$comment:"patternProperties here is a bit of a hack to prevent this definition from being dereferenced early.",patternProperties:{"^\\$ref$":{title:"Reference",description:"A reference to another entity, used for $evaluators (shared rules).",type:"string"}}},args:{oneOf:[{$ref:"#/definitions/reference"},{$ref:"#/definitions/anyRule"},{$ref:"#/definitions/primitive"}]},anyRule:{anyOf:[{$ref:"#/definitions/varRule"},{$ref:"#/definitions/missingRule"},{$ref:"#/definitions/missingSomeRule"},{$ref:"#/definitions/binaryRule"},{$ref:"#/definitions/binaryOrTernaryRule"},{$ref:"#/definitions/associativeRule"},{$ref:"#/definitions/unaryRule"},{$ref:"#/definitions/variadicRule"},{$ref:"#/definitions/reduceRule"},{$ref:"#/definitions/stringCompareRule"},{$ref:"#/definitions/ruleSemVer"},{$ref:"#/definitions/fractionalRule"}]}},C_={$id:R_,$schema:T_,title:N_,description:j_,type:D_,anyOf:M_,definitions:q_};const Vl="$flagd",$v="flagKey",z_="timestamp",U_="targetingKey",Ov=Symbol.for("flagd.logger");function Ic(r){const i=r[Ov];if(!i)throw new Error("Logger not found in context");return i}const Yc="starts_with",kc="ends_with";function L_(r,i){return Av(Yc,r,i)}function V_(r,i){return Av(kc,r,i)}function Av(r,i,u){const l=Ic(u);if(!Array.isArray(i))return l.debug("Invalid comparison configuration: input is not an array"),!1;if(i.length!=2)return l.debug(`Invalid comparison configuration: invalid array length ${i.length}`),!1;if(typeof i[0]!="string"||typeof i[1]!="string")return l.debug("Invalid comparison configuration: array values are not strings"),!1;switch(r){case Yc:return i[0].startsWith(i[1]);case kc:return i[0].endsWith(i[1]);default:return l.debug(`Invalid comparison configuration: Invalid method '${r}'`),!1}}const xl="sem_ver";function x_(r,i){const u=Ic(i);if(!Array.isArray(r))return u.debug(`Invalid ${xl} configuration: Expected an array`),!1;const l=Array.from(r);if(l.length!=3)return u.debug(`Invalid ${xl} configuration: Expected 3 arguments, got ${l.length}`),!1;const c=wc.parse(l[0]),o=wc.parse(l[2]);if(!c||!o)return u.debug(`Invalid ${xl} configuration: Unable to parse semver`),!1;const d=String(l[1]),h=wc.compare(c,o);switch(d){case"=":return h==0;case"!=":return h!=0;case"<":return h<0;case"<=":return h<=0;case">=":return h>=0;case">":return h>0;case"^":return c.major==o.major;case"~":return c.major==o.major&&c.minor==o.minor}return!1}const Nc="fractional";function B_(r,i){const u=Ic(i);if(!Array.isArray(r))return null;const l=Array.from(r);if(l.length<2)return u.debug(`Invalid ${Nc} configuration: Expected at least 2 buckets, got ${l.length}`),null;const c=i[Vl];if(!c)return u.debug("Missing flagd properties, cannot perform fractional targeting"),null;let o,d;if(typeof l[0]=="string")o=l[0],d=l.slice(1,l.length);else{const N=i[U_];if(!N)return u.debug("Missing targetingKey property, cannot perform fractional targeting"),null;o=`${c[$v]}${N}`,d=l}let h;try{h=G_(d)}catch(N){return u.debug(`Invalid ${Nc} configuration: `,N.message),null}const m=new v_(o).result()|0,y=Math.abs(m)/2147483648*100;let S=0;for(let N=0;N=y)return x.variant}return null}function H_(r,i){return i==0?0:i*100/r}function G_(r){const i=[];let u=0;for(let l=0;l2)throw new Error("Invalid bucketing entry. Requires at least a variant");if(typeof c[0]!="string")throw new Error("Bucketing require variant to be present in string format");let o=1;if(c.length>=2){if(typeof c[1]!="number")throw new Error("Bucketing require bucketing percentage to be present");o=c[1]}i.push({fraction:o,variant:c[0]}),u+=o}return{fractions:i,totalWeight:u}}class I_{constructor(i,u){this.logger=u;const l=new Uc;l.addMethod(Yc,L_),l.addMethod(kc,V_),l.addMethod(xl,x_),l.addMethod(Nc,B_),this._logicEngine=l.build(i)}evaluate(i,u,l=this.logger){return Object.hasOwn(u,Vl)&&this.logger.debug(`overwriting ${Vl} property in the context`),this._logicEngine(Object.assign(Object.assign({},u),{[Vl]:{[$v]:i,[z_]:Math.floor(Date.now()/1e3)},[Ov]:l}))}}class Y_{constructor(i,u,l){var c;if(this.logger=l,this._key=i,this._state=u.state,this._defaultVariant=u.defaultVariant,this._variants=new Map(Object.entries(u.variants)),this._metadata=(c=u.metadata)!==null&&c!==void 0?c:{},u.targeting&&Object.keys(u.targeting).length>0)try{this._targeting=new I_(u.targeting,l)}catch{const d=`Invalid targeting configuration for flag '${i}'`;this.logger.warn(d),this._targetingParseErrorMessage=d}this._hash=TE.sha1(u),this.validateStructure()}get key(){return this._key}get hash(){return this._hash}get state(){return this._state}get defaultVariant(){return this._defaultVariant}get variants(){return this._variants}get metadata(){return this._metadata}evaluate(i,u=this.logger){let l,c;if(this._targetingParseErrorMessage)return{reason:Cn.ERROR,errorCode:Vr.PARSE_ERROR,errorMessage:this._targetingParseErrorMessage,flagMetadata:this.metadata};if(!this._targeting)l=this._defaultVariant,c=Cn.STATIC;else{let d;try{d=this._targeting.evaluate(this._key,i,u)}catch(h){return u.debug(`Error evaluating targeting rule for flag '${this._key}': ${h.message}`),{reason:Cn.ERROR,errorCode:Vr.GENERAL,errorMessage:`Error evaluating targeting rule for flag '${this._key}'`,flagMetadata:this.metadata}}d==null?(l=this._defaultVariant,c=Cn.DEFAULT):(l=d.toString(),c=Cn.TARGETING_MATCH)}const o=this._variants.get(l);return o===void 0?{reason:Cn.ERROR,errorCode:Vr.GENERAL,errorMessage:`Variant '${l}' not found in flag with key '${this._key}'`,flagMetadata:this.metadata}:{value:o,reason:c,variant:l,flagMetadata:this.metadata}}validateStructure(){if(this._state!=="ENABLED"&&this._state!=="DISABLED")throw new $a(`Invalid flag state: ${JSON.stringify(this._state,void 0,2)}`);if(this._defaultVariant===void 0)throw new $a(`Invalid flag defaultVariant: ${JSON.stringify(this._defaultVariant,void 0,2)}`);if(!this._variants.has(this._defaultVariant))throw new $a(`Default variant ${this._defaultVariant} missing from variants ${JSON.stringify(this._variants,void 0,2)}`)}}const k_=new AE({strict:!1}),kg=k_.addSchema(C_).compile(A_),P_="$evaluators",K_=new RegExp("^[^{]*\\{|}[^}]*$","g"),Pg="invalid flagd flag configuration";function X_(r,i,u){var l;try{const c=Q_(r),o=JSON.parse(c);if(!kg(o)){const y=`${Pg}: ${JSON.stringify(kg.errors,void 0,2)}`;if(i)throw new $a(y);u.debug(y)}const h=new Map,m=(l=o.metadata)!==null&&l!==void 0?l:{};for(const y in o.flags){const S=o.flags[y];h.set(y,new Y_(y,Object.assign(Object.assign({},S),{metadata:Object.assign(Object.assign({},o.metadata),S.metadata)}),u))}return{flags:h,metadata:m}}catch(c){throw c instanceof $a?c:new $a(Pg,{cause:c})}}function Q_(r){const i=JSON.parse(r)[P_];if(!i)return r;let u=r;for(const l in i){const c=JSON.stringify(i[l]).replaceAll(K_,""),o=new RegExp('"\\$ref":(\\s)*"'+l+'"',"g");u=u.replaceAll(o,c)}return u}class Rv{constructor(i){this.logger=i,this._flagSetMetadata={},this._flags=new Map}getFlag(i){return this._flags.get(i)}getFlags(){return this._flags}getFlagSetMetadata(){return this._flagSetMetadata}setConfigurations(i,u=!1){const{flags:l,metadata:c}=X_(i,u,this.logger),o=this._flags,d=[],h=[],m=[];return l.forEach((y,S)=>{var N;o.has(S)?((N=o.get(S))===null||N===void 0?void 0:N.hash)!==y.hash&&m.push(S):d.push(S)}),o.forEach((y,S)=>{l.has(S)||h.push(S)}),this._flags=l,this._flagSetMetadata=c,[...d,...h,...m]}}class Z_{constructor(i,u){this._logger=u?new gb(u):new uv,this._storage=i||new Rv(this._logger)}setConfigurations(i){return this._storage.setConfigurations(i)}getFlag(i){return this._storage.getFlag(i)}getFlags(){return this._storage.getFlags()}getFlagSetMetadata(){return this._storage.getFlagSetMetadata()}resolveBooleanEvaluation(i,u,l,c=this._logger){return this.resolve("boolean",i,u,l,c)}resolveStringEvaluation(i,u,l,c=this._logger){return this.resolve("string",i,u,l,c)}resolveNumberEvaluation(i,u,l,c=this._logger){return this.resolve("number",i,u,l,c)}resolveObjectEvaluation(i,u,l,c=this._logger){return this.resolve("object",i,u,l,c)}resolveAll(i={},u=this._logger){const l=[];for(const[c,o]of this.getFlags())try{if(o.state==="DISABLED")continue;const d=o.evaluate(i,u);d.value!==void 0?l.push(Object.assign(Object.assign({},d),{flagKey:c})):u.debug(`Flag ${c} omitted because ${d.errorCode}: ${d.errorMessage}`)}catch(d){u.debug(`Error resolving flag ${c}: ${d.message}`)}return l}resolve(i,u,l,c={},o=this._logger){const d=this._storage.getFlag(u);if(!d)return{value:l,reason:Cn.ERROR,errorCode:Vr.FLAG_NOT_FOUND,errorMessage:`flag '${u}' not found`,flagMetadata:this._storage.getFlagSetMetadata()};if(d.state==="DISABLED")return{value:l,reason:Cn.ERROR,errorCode:Vr.FLAG_NOT_FOUND,errorMessage:`flag '${u}' is disabled`,flagMetadata:d.metadata};const h=d.evaluate(c,o);return h.value===void 0?Object.assign(Object.assign({},h),{value:l}):typeof h.value!==i?{value:l,reason:Cn.ERROR,errorCode:Vr.TYPE_MISMATCH,errorMessage:`Evaluated type of the flag ${u} does not match. Expected ${i}, got ${typeof h.value}`,flagMetadata:d.metadata}:Object.assign(Object.assign({},h),{value:h.value})}}const J_={$schema:"https://flagd.dev/schema/v0/flags.json"};function Tv(r){return JSON.stringify(JSON.parse(r),null,2)}function $t(r){return Tv(JSON.stringify({...J_,...r}))}function Ot(r){return Tv(JSON.stringify(r))}function Kg(r){return typeof r=="function"?r():r}function F_(r){try{return JSON.parse(r),!0}catch{return!1}}const W_={description:["In this scenario, we have a feature flag with the key 'basic-boolean' that is enabled and has two variants: true and false.","The default variant is false. Try changing the 'defaultVariant' to 'true' or add a targeting rule."].join(" "),flagDefinition:$t({flags:{"basic-boolean":{state:"ENABLED",defaultVariant:"false",variants:{true:!0,false:!1},targeting:{}}}}),flagKey:"basic-boolean",returnType:"boolean",context:Ot({})},eS={description:['In this scenario, we have a feature flag with the key "basic-number" that is enabled and has two variants: 1 and 2.','The default variant is 1. Try changing the "defaultVariant" to "2" or add a targeting rule.'].join(" "),flagDefinition:$t({flags:{"basic-number":{state:"ENABLED",defaultVariant:"1",variants:{1:1,2:2},targeting:{}}}}),flagKey:"basic-number",returnType:"number",context:Ot({})},tS={description:['In this scenario, we have a feature flag with the key "basic-object" that is enabled and has two variants: foo and bar.','The default variant is foo. Try changing the "defaultVariant" to "bar" or add a targeting rule.'].join(" "),flagDefinition:$t({flags:{"basic-object":{state:"ENABLED",defaultVariant:"foo",variants:{foo:{foo:"foo"},bar:{bar:"bar"}},targeting:{}}}}),flagKey:"basic-object",returnType:"object",context:Ot({})},nS={description:['In this scenario, we have a feature flag with the key "basic-string" that is enabled and has two variants: foo and bar.','The default variant is foo. Try changing the "defaultVariant" to "bar" or add a targeting rule.'].join(" "),flagDefinition:$t({flags:{"basic-string":{state:"ENABLED",defaultVariant:"foo",variants:{foo:"foo",bar:"bar"},targeting:{}}}}),flagKey:"basic-string",returnType:"string",context:Ot({})},rS={description:["In this scenario, we have a feature flag with a targeting rule that returns true when the age is 18 or greater.","This targeting rule leverages the boolean shorthand syntax, which converts a boolean to its string equivalent.","The converted value is then used as the variant key.","Try changing the value of the context attribute 'age'."].join(" "),flagDefinition:$t({flags:{"feature-1":{state:"ENABLED",defaultVariant:"false",variants:{true:!0,false:!1},targeting:{">=":[{var:"age"},18]}}}}),flagKey:"feature-1",returnType:"boolean",context:Ot({age:20})},aS={description:["In this scenario, we have a feature flag with the key 'acceptable-feature-stability' with three variants: alpha, beta, and ga.","The flag has a targeting rule that enables the flag based on the customer ID.","The flag is enabled for customer-A in the alpha variant, for customer-B1 and customer-B2 in the beta variant, and for all other customers in the ga variant.","Experiment by changing the 'customerId' in the context."].join(" "),flagDefinition:$t({flags:{"acceptable-feature-stability":{state:"ENABLED",defaultVariant:"ga",variants:{alpha:"alpha",beta:"beta",ga:"ga"},targeting:{if:[{"===":[{var:"customerId"},"customer-A"]},"alpha",{in:[{var:"customerId"},["customer-B1","customer-B2"]]},"beta","ga"]}}}}),flagKey:"acceptable-feature-stability",returnType:"string",context:Ot({targetingKey:"sessionId-123",customerId:"customer-A"})},iS={description:['In this scenario, we have a feature flag with the key "enable-mainframe-access" that is enabled and has two variants: true and false.','This flag has a targeting rule defined that enables the flag for users with an email address that ends with "@ingen.com".',"Experiment with changing the email address in the context or in the targeting rule."].join(" "),flagDefinition:$t({flags:{"enable-mainframe-access":{state:"ENABLED",defaultVariant:"false",variants:{true:!0,false:!1},targeting:{if:[{ends_with:[{var:"email"},"@ingen.com"]},"true"]}}}}),flagKey:"enable-mainframe-access",returnType:"boolean",context:Ot({email:"john.arnold@ingen.com"})},sS={description:['In this scenario, we have a feature flag with the key "supports-one-hour-delivery" that is enabled and has two variants: true and false.','This flag has a targeting rule defined that enables the flag for users with a locale of "us" or "ca".',"Experiment with changing the locale in the context or in the locale list in the targeting rule."].join(" "),flagDefinition:$t({flags:{"supports-one-hour-delivery":{state:"ENABLED",defaultVariant:"false",variants:{true:!0,false:!1},targeting:{if:[{in:[{var:"locale"},["us","ca"]]},"true"]}}}}),context:Ot({locale:"us"}),flagKey:"supports-one-hour-delivery",returnType:"boolean"},lS={description:['In this scenario, we have a feature flag with the key "enable-announcement-banner" that is enabled and has two variants: true and false.',"This flag has a targeting rule defined that enables the flag after a specified time.",'The current time (epoch) can be accessed using "$flagd.timestamp" which is automatically provided by flagd.','Five seconds after loading this scenario, the response will change to "true".'].join(" "),flagDefinition:()=>$t({flags:{"enable-announcement-banner":{state:"ENABLED",defaultVariant:"false",variants:{true:!0,false:!1},targeting:{if:[{">":[{var:"$flagd.timestamp"},Math.floor(Date.now()/1e3)+5]},"true"]}}}}),flagKey:"enable-announcement-banner",returnType:"boolean",context:()=>Ot({})},uS={description:['In this scenario, we have a feature flag with the key "enable-performance-mode" that is enabled and has two variants: true and false.','This rule looks for the evaluation context "version". If the version is greater or equal to "1.7.0" the feature is enabled.','Otherwise, the "defaultVariant" is return. Experiment by changing the version in the context.'].join(" "),flagDefinition:$t({flags:{"enable-performance-mode":{state:"ENABLED",defaultVariant:"false",variants:{true:!0,false:!1},targeting:{if:[{sem_ver:[{var:"version"},">=","1.7.0"]},"true"]}}}}),flagKey:"enable-performance-mode",returnType:"boolean",context:Ot({version:"1.6.0"})},oS={description:['In this scenario, we have a feature flag with the key "color-palette-experiment" that is enabled and has four variants: red, blue, green, and grey.','The targeting rule uses the "fractional" operator, which deterministically splits the traffic based on the configuration.','This configuration splits the traffic evenly between the four variants by bucketing evaluations pseudorandomly using the "targetingKey" and feature flag key.','Experiment by changing the "targetingKey" to another value.'].join(" "),flagDefinition:$t({flags:{"color-palette-experiment":{state:"ENABLED",defaultVariant:"grey",variants:{red:"#b91c1c",blue:"#0284c7",green:"#16a34a",grey:"#4b5563"},targeting:{fractional:[["red",25],["blue",25],["green",25],["grey",25]]}}}}),flagKey:"color-palette-experiment",returnType:"string",context:Ot({targetingKey:"sessionId-123"})},fS={description:['In this scenario, we have a feature flag with the key "enable-new-llm-model" with multiple variant for illustrative purposes.',"This flag has a targeting rule defined that enables the flag for a percentage of users based on the release phase.",'The "targetingKey" ensures that the user always sees the same results during a each phase of the rollout process.'].join(" "),flagDefinition:()=>{const r=Math.floor(Date.now()/1e3)+5,i=Math.floor(Date.now()/1e3)+10,u=Math.floor(Date.now()/1e3)+15,l=Math.floor(Date.now()/1e3)+20;return $t({flags:{"enable-new-llm-model":{state:"ENABLED",defaultVariant:"disabled",variants:{disabled:!1,phase1Enabled:!0,phase1Disabled:!1,phase2Enabled:!0,phase2Disabled:!1,phase3Enabled:!0,phase3Disabled:!1,enabled:!0},targeting:{if:[{">=":[r,{var:"$flagd.timestamp"}]},"disabled",{"<=":[r,{var:"$flagd.timestamp"},i]},{fractional:[["phase1Enabled",10],["phase1Disabled",90]]},{"<=":[i,{var:"$flagd.timestamp"},u]},{fractional:[["phase2Enabled",25],["phase2Disabled",75]]},{"<=":[u,{var:"$flagd.timestamp"},l]},{fractional:[["phase3Enabled",50],["phase3Disabled",50]]},"enabled"]}}}})},flagKey:"enable-new-llm-model",returnType:"boolean",context:()=>Ot({targetingKey:"sessionId-12345"})},cS={description:["In this scenario, we have two feature flags that share targeting rule logic.","This is accomplished by defining a $evaluators object in the feature flag definition and referencing it by name in a targeting rule.","Experiment with changing the email domain in the shared evaluator."].join(" "),flagDefinition:$t({flags:{"feature-1":{state:"ENABLED",defaultVariant:"false",variants:{true:!0,false:!1},targeting:{if:[{$ref:"emailWithFaas"},"true"]}},"feature-2":{state:"ENABLED",defaultVariant:"false",variants:{true:!0,false:!1},targeting:{if:[{$ref:"emailWithFaas"},"true"]}}},$evaluators:{emailWithFaas:{ends_with:[{var:"email"},"@faas.com"]}}}),flagKey:"feature-1",returnType:"boolean",context:Ot({email:"example@faas.com"})},dS={description:["In this scenario, we have a feature flag that is evaluated based on its targeting key.","The targeting key is contain a string uniquely identifying the subject of the flag evaluation, such as a user's email, or a session identifier.",`In this case, null is returned from targeting if the targeting key doesn't match; this results in a reason of "DEFAULT", since no variant was matched by the targeting rule.`].join(" "),flagDefinition:$t({flags:{"targeting-key-flag":{state:"ENABLED",variants:{miss:"miss",hit:"hit"},defaultVariant:"miss",targeting:{if:[{"==":[{var:"targetingKey"},"5c3d8535-f81a-4478-a6d3-afaa4d51199e"]},"hit",null]}}}}),flagKey:"targeting-key-flag",returnType:"string",context:Ot({targetingKey:"5c3d8535-f81a-4478-a6d3-afaa4d51199e"})},hS={description:["In this scenario, we have a feature flag with metadata about the flag.","There is top-level metadata for the flag set and metadata specific to the flag.","These values are merged together, with the flag metadata taking precedence."].join(" "),flagDefinition:$t({flags:{"flag-with-metadata":{state:"ENABLED",variants:{on:!0,off:!1},defaultVariant:"on",metadata:{version:"1"}}},metadata:{flagSetId:"playground/dev"}}),flagKey:"flag-with-metadata",returnType:"boolean",context:Ot({})},nn={"Basic boolean flag":W_,"Basic numeric flag":eS,"Basic string flag":nS,"Basic object flag":tS,"Enable for a specific email domain":iS,"Enable based on users locale":sS,"Enable based on release version":uS,"Enable based on the current time":lS,"Chainable if/else/then":aS,"Multi-variant experiment":oS,"Progressive rollout":fS,"Shared evaluators":cS,"Boolean variant shorthand":rS,"Targeting key":dS,"Flag metadata":hS};function mS(r,i,u){return i in r?Object.defineProperty(r,i,{value:u,enumerable:!0,configurable:!0,writable:!0}):r[i]=u,r}function Xg(r,i){var u=Object.keys(r);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(r);i&&(l=l.filter(function(c){return Object.getOwnPropertyDescriptor(r,c).enumerable})),u.push.apply(u,l)}return u}function Qg(r){for(var i=1;i=0)&&(u[c]=r[c]);return u}function yS(r,i){if(r==null)return{};var u=pS(r,i),l,c;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);for(c=0;c=0)&&Object.prototype.propertyIsEnumerable.call(r,l)&&(u[l]=r[l])}return u}function gS(r,i){return vS(r)||bS(r,i)||ES(r,i)||_S()}function vS(r){if(Array.isArray(r))return r}function bS(r,i){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(r)))){var u=[],l=!0,c=!1,o=void 0;try{for(var d=r[Symbol.iterator](),h;!(l=(h=d.next()).done)&&(u.push(h.value),!(i&&u.length===i));l=!0);}catch(m){c=!0,o=m}finally{try{!l&&d.return!=null&&d.return()}finally{if(c)throw o}}return u}}function ES(r,i){if(r){if(typeof r=="string")return Zg(r,i);var u=Object.prototype.toString.call(r).slice(8,-1);if(u==="Object"&&r.constructor&&(u=r.constructor.name),u==="Map"||u==="Set")return Array.from(r);if(u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u))return Zg(r,i)}}function Zg(r,i){(i==null||i>r.length)&&(i=r.length);for(var u=0,l=new Array(i);u=r.length?r.apply(this,c):function(){for(var d=arguments.length,h=new Array(d),m=0;m1&&arguments[1]!==void 0?arguments[1]:{};Ul.initial(r),Ul.handler(i);var u={current:r},l=ji(zS)(u,i),c=ji(CS)(u),o=ji(Ul.changes)(r),d=ji(qS)(u);function h(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(S){return S};return Ul.selector(y),y(u.current)}function m(y){wS(l,c,o,d)(y)}return[h,m]}function qS(r,i){return Ci(i)?i(r.current):i}function CS(r,i){return r.current=Fg(Fg({},r.current),i),i}function zS(r,i,u){return Ci(i)?i(r.current):Object.keys(u).forEach(function(l){var c;return(c=i[l])===null||c===void 0?void 0:c.call(i,r.current[l])}),u}var US={create:MS},LS={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.43.0/min/vs"}};function VS(r){return function i(){for(var u=this,l=arguments.length,c=new Array(l),o=0;o=r.length?r.apply(this,c):function(){for(var d=arguments.length,h=new Array(d),m=0;m{l.current=!1}:r,i)}var Lt=ow;function Mi(){}function wa(r,i,u,l){return fw(r,l)||cw(r,i,u,l)}function fw(r,i){return r.editor.getModel(Uv(r,i))}function cw(r,i,u,l){return r.editor.createModel(i,u,l?Uv(r,l):void 0)}function Uv(r,i){return r.Uri.parse(i)}function dw({original:r,modified:i,language:u,originalLanguage:l,modifiedLanguage:c,originalModelPath:o,modifiedModelPath:d,keepCurrentOriginalModel:h=!1,keepCurrentModifiedModel:m=!1,theme:y="light",loading:S="Loading...",options:N={},height:x="100%",width:V="100%",className:L,wrapperProps:C={},beforeMount:g=Mi,onMount:w=Mi}){let[p,b]=ve.useState(!1),[E,O]=ve.useState(!0),v=ve.useRef(null),A=ve.useRef(null),$=ve.useRef(null),D=ve.useRef(w),j=ve.useRef(g),Y=ve.useRef(!1);zv(()=>{let ne=qv.init();return ne.then(P=>(A.current=P)&&O(!1)).catch(P=>(P==null?void 0:P.type)!=="cancelation"&&console.error("Monaco initialization: error:",P)),()=>v.current?F():ne.cancel()}),Lt(()=>{if(v.current&&A.current){let ne=v.current.getOriginalEditor(),P=wa(A.current,r||"",l||u||"text",o||"");P!==ne.getModel()&&ne.setModel(P)}},[o],p),Lt(()=>{if(v.current&&A.current){let ne=v.current.getModifiedEditor(),P=wa(A.current,i||"",c||u||"text",d||"");P!==ne.getModel()&&ne.setModel(P)}},[d],p),Lt(()=>{let ne=v.current.getModifiedEditor();ne.getOption(A.current.editor.EditorOption.readOnly)?ne.setValue(i||""):i!==ne.getValue()&&(ne.executeEdits("",[{range:ne.getModel().getFullModelRange(),text:i||"",forceMoveMarkers:!0}]),ne.pushUndoStop())},[i],p),Lt(()=>{var ne,P;(P=(ne=v.current)==null?void 0:ne.getModel())==null||P.original.setValue(r||"")},[r],p),Lt(()=>{let{original:ne,modified:P}=v.current.getModel();A.current.editor.setModelLanguage(ne,l||u||"text"),A.current.editor.setModelLanguage(P,c||u||"text")},[u,l,c],p),Lt(()=>{var ne;(ne=A.current)==null||ne.editor.setTheme(y)},[y],p),Lt(()=>{var ne;(ne=v.current)==null||ne.updateOptions(N)},[N],p);let Q=ve.useCallback(()=>{var ue;if(!A.current)return;j.current(A.current);let ne=wa(A.current,r||"",l||u||"text",o||""),P=wa(A.current,i||"",c||u||"text",d||"");(ue=v.current)==null||ue.setModel({original:ne,modified:P})},[u,i,c,r,l,o,d]),W=ve.useCallback(()=>{var ne;!Y.current&&$.current&&(v.current=A.current.editor.createDiffEditor($.current,{automaticLayout:!0,...N}),Q(),(ne=A.current)==null||ne.editor.setTheme(y),b(!0),Y.current=!0)},[N,y,Q]);ve.useEffect(()=>{p&&D.current(v.current,A.current)},[p]),ve.useEffect(()=>{!E&&!p&&W()},[E,p,W]);function F(){var P,ue,re,de;let ne=(P=v.current)==null?void 0:P.getModel();h||((ue=ne==null?void 0:ne.original)==null||ue.dispose()),m||((re=ne==null?void 0:ne.modified)==null||re.dispose()),(de=v.current)==null||de.dispose()}return Lr.createElement(Cv,{width:V,height:x,isEditorReady:p,loading:S,_ref:$,className:L,wrapperProps:C})}var hw=dw;ve.memo(hw);function mw(r){let i=ve.useRef();return ve.useEffect(()=>{i.current=r},[r]),i.current}var pw=mw,Ll=new Map;function yw({defaultValue:r,defaultLanguage:i,defaultPath:u,value:l,language:c,path:o,theme:d="light",line:h,loading:m="Loading...",options:y={},overrideServices:S={},saveViewState:N=!0,keepCurrentModel:x=!1,width:V="100%",height:L="100%",className:C,wrapperProps:g={},beforeMount:w=Mi,onMount:p=Mi,onChange:b,onValidate:E=Mi}){let[O,v]=ve.useState(!1),[A,$]=ve.useState(!0),D=ve.useRef(null),j=ve.useRef(null),Y=ve.useRef(null),Q=ve.useRef(p),W=ve.useRef(w),F=ve.useRef(),ne=ve.useRef(l),P=pw(o),ue=ve.useRef(!1),re=ve.useRef(!1);zv(()=>{let z=qv.init();return z.then(K=>(D.current=K)&&$(!1)).catch(K=>(K==null?void 0:K.type)!=="cancelation"&&console.error("Monaco initialization: error:",K)),()=>j.current?R():z.cancel()}),Lt(()=>{var K,k,T,H;let z=wa(D.current,r||l||"",i||c||"",o||u||"");z!==((K=j.current)==null?void 0:K.getModel())&&(N&&Ll.set(P,(k=j.current)==null?void 0:k.saveViewState()),(T=j.current)==null||T.setModel(z),N&&((H=j.current)==null||H.restoreViewState(Ll.get(o))))},[o],O),Lt(()=>{var z;(z=j.current)==null||z.updateOptions(y)},[y],O),Lt(()=>{!j.current||l===void 0||(j.current.getOption(D.current.editor.EditorOption.readOnly)?j.current.setValue(l):l!==j.current.getValue()&&(re.current=!0,j.current.executeEdits("",[{range:j.current.getModel().getFullModelRange(),text:l,forceMoveMarkers:!0}]),j.current.pushUndoStop(),re.current=!1))},[l],O),Lt(()=>{var K,k;let z=(K=j.current)==null?void 0:K.getModel();z&&c&&((k=D.current)==null||k.editor.setModelLanguage(z,c))},[c],O),Lt(()=>{var z;h!==void 0&&((z=j.current)==null||z.revealLine(h))},[h],O),Lt(()=>{var z;(z=D.current)==null||z.editor.setTheme(d)},[d],O);let de=ve.useCallback(()=>{var z;if(!(!Y.current||!D.current)&&!ue.current){W.current(D.current);let K=o||u,k=wa(D.current,l||r||"",i||c||"",K||"");j.current=(z=D.current)==null?void 0:z.editor.create(Y.current,{model:k,automaticLayout:!0,...y},S),N&&j.current.restoreViewState(Ll.get(K)),D.current.editor.setTheme(d),h!==void 0&&j.current.revealLine(h),v(!0),ue.current=!0}},[r,i,u,l,c,o,y,S,N,d,h]);ve.useEffect(()=>{O&&Q.current(j.current,D.current)},[O]),ve.useEffect(()=>{!A&&!O&&de()},[A,O,de]),ne.current=l,ve.useEffect(()=>{var z,K;O&&b&&((z=F.current)==null||z.dispose(),F.current=(K=j.current)==null?void 0:K.onDidChangeModelContent(k=>{re.current||b(j.current.getValue(),k)}))},[O,b]),ve.useEffect(()=>{if(O){let z=D.current.editor.onDidChangeMarkers(K=>{var T;let k=(T=j.current.getModel())==null?void 0:T.uri;if(k&&K.find(H=>H.path===k.path)){let H=D.current.editor.getModelMarkers({resource:k});E==null||E(H)}});return()=>{z==null||z.dispose()}}return()=>{}},[O,E]);function R(){var z,K;(z=F.current)==null||z.dispose(),x?N&&Ll.set(o,j.current.saveViewState()):(K=j.current.getModel())==null||K.dispose(),j.current.dispose()}return Lr.createElement(Cv,{width:V,height:L,isEditorReady:O,loading:m,_ref:Y,className:C,wrapperProps:g})}var gw=yw,ev=ve.memo(gw);const tv="data-md-color-scheme",vw="[data-md-component=palette]",nv=()=>document.body.getAttribute(tv)&&document.body.getAttribute(tv)!=="default"?"custom-dark":"custom",rv=r=>{r==null||r.editor.defineTheme("custom-dark",{base:"vs-dark",inherit:!0,rules:[],colors:{"editor.background":"#00000000"}}),r==null||r.editor.defineTheme("custom",{base:"vs",inherit:!0,rules:[],colors:{"editor.background":"#00000000"}}),r==null||r.languages.json.jsonDefaults.setDiagnosticsOptions({enableSchemaRequest:!0,allowComments:!1})};function av(r){const i=JSON.parse(r);return JSON.stringify(i)}function iv(r){const i=JSON.parse(r);return JSON.stringify(i,null,2)}function bw(){const[r,i]=ve.useState("Basic boolean flag"),[u,l]=ve.useState(nn[r].flagDefinition),[c,o]=ve.useState(nn[r].flagKey),[d,h]=ve.useState(nn[r].returnType),[m,y]=ve.useState(Kg(nn[r].context)),[S,N]=ve.useState(!1),[x,V]=ve.useState(""),[L,C]=ve.useState([]),[g,w]=ve.useState(nn[r].description),[p,b]=ve.useState(!0),[E,O]=ve.useState(!0),[v,A]=ve.useState(!1),[$,D]=ve.useState("success"),[j,Y]=ve.useState(nv()),Q=ve.useCallback(()=>{V(""),N(!1);const R=nn[r];l(R.flagDefinition),o(R.flagKey),h(R.returnType),y(Kg(R.context)),w(R.description),b(!0),O(!0),A(!1),D("success")},[r]);ve.useEffect(()=>{Q()},[r,Q]);const W=ve.useMemo(()=>new Rv(console),[]),F=ve.useMemo(()=>new Z_(W,console),[W]);ve.useEffect(()=>{if(F_(u))try{F.setConfigurations(u),C(Array.from(F.getFlags().keys())),b(!0)}catch(R){console.error("Invalid flagd configuration",R),b(!1)}else b(!1)},[u,F]),ve.useEffect(()=>{try{JSON.parse(m),O(!0)}catch(R){console.error("Invalid JSON input",R),O(!1)}},[m]),ve.useEffect(()=>{var K;const R=document.querySelector(vw),z=(K=window.component$)==null?void 0:K.subscribe(k=>{(k==null?void 0:k.ref)===R&&Y(nv())});return()=>{z==null||z.unsubscribe()}}),ve.useEffect(()=>{const R=new URLSearchParams(window.location.search),z=R.get("flags"),K=R.get("flag-key"),k=R.get("return-type"),T=R.get("eval-context"),H=R.get("scenario-name");if(z)try{const te=iv(z);if(l(te),K&&o(K),k&&h(k),T){const pe=iv(T);y(pe)}}catch(te){console.error("Error decoding URL parameters: ",te)}else H&&nn[H]&&(i(H),l(nn[H].flagDefinition))},[]);const ne=()=>{N(!0);try{let R;const z=JSON.parse(m);switch(d){case"boolean":R=F.resolveBooleanEvaluation(c,!1,z,console);break;case"string":R=F.resolveStringEvaluation(c,"",z,console);break;case"number":R=F.resolveNumberEvaluation(c,0,z,console);break;case"object":R=F.resolveObjectEvaluation(c,{},z,console);break}D("success"),V(JSON.stringify(R,null,2))}catch(R){console.error("Invalid JSON input",R),D("failure"),V(R.message)}},P=ve.useMemo(()=>{try{return JSON.parse(x)}catch{return x}},[x]),ue=mb("(max-width: 1220px)"),re={border:"none",backgroundColor:"var(--md-code-bg-color)",color:"var(--md-code-fg-color)",fontFeatureSettings:"kern",fontFamily:"var(--md-code-font-family)"},de=()=>{const R=window.location.origin+window.location.pathname,z=new URL(R),K=av(u),k=av(m);Object.keys(nn).includes(r)&&nn[r].flagDefinition===u?z.searchParams.set("scenario-name",r):(z.searchParams.delete("scenario-name"),z.searchParams.set("flags",K),z.searchParams.set("flag-key",c),z.searchParams.set("return-type",d),z.searchParams.set("eval-context",k)),window.history.pushState({},"",z.href),navigator.clipboard.writeText(z.href).then(()=>{console.log("URL copied to clipboard"),A(!0),setTimeout(()=>{A(!1)},5e3)}).catch(T=>{console.error("Failed to copy URL: ",T)})};return we.jsxs("div",{style:{maxWidth:"825px"},children:[we.jsx("div",{children:we.jsxs("p",{style:{margin:"-32px 0 0 0",lineHeight:"1.4",fontSize:"medium"},children:["Explore flagd flag definitions in your browser. Begin by selecting an example below; these are merely starting points, so customize the flag definition as you wish. Find an overview of the flag definition structure ",we.jsx("a",{href:"/reference/flag-definitions/",children:"here"}),"."]})}),we.jsxs("div",{children:[we.jsx("h4",{children:"Select a scenario"}),we.jsxs("div",{style:{display:"flex",flexDirection:ue?"column":"row",textAlign:"left",gap:"16px",height:"100%"},children:[we.jsx("div",{style:{flex:"2"},children:we.jsx("select",{style:{width:"100%",minWidth:"250px",padding:"8px",...re},value:r,onChange:R=>i(R.target.value),children:Object.keys(nn).map(R=>we.jsx("option",{value:R,children:R},R))})}),we.jsx("div",{style:{flex:"3"},children:we.jsx("p",{style:{lineHeight:"1.4",margin:"-4px 0 0 0",fontSize:"small"},children:g})})]}),we.jsxs("div",{style:{display:"flex",flexDirection:ue?"column":"row",textAlign:"left",gap:"16px",height:"100%"},children:[we.jsxs("div",{style:{flex:"3"},children:[we.jsx("h4",{children:"Feature definition"}),we.jsx("div",{style:{backgroundColor:re.backgroundColor},children:we.jsx(ev,{theme:j,width:"100%",height:"500px",language:"json",value:u,options:{minimap:{enabled:!1},lineNumbers:"off"},beforeMount:rv,onChange:R=>{R&&l(R)}})})]}),we.jsxs("div",{style:{flex:"2"},children:[we.jsxs("div",{children:[we.jsx("h4",{children:"Flag key"}),we.jsx("input",{style:{width:"100%",maxWidth:"800px",padding:"8px",boxSizing:"border-box",...re},name:"flag-key",list:"flag-keys",value:c,onChange:R=>o(R.target.value)}),we.jsx("datalist",{id:"flag-keys",children:L.map((R,z)=>we.jsx("option",{value:R},z))})]}),we.jsxs("div",{children:[we.jsx("h4",{children:"Return type"}),we.jsxs("select",{style:{width:"100%",padding:"8px 0 8px 0",...re},value:d,onChange:R=>h(R.target.value),children:[we.jsx("option",{value:"boolean",children:"boolean"}),we.jsx("option",{value:"string",children:"string"}),we.jsx("option",{value:"number",children:"number"}),we.jsx("option",{value:"object",children:"object"})]})]}),we.jsxs("div",{children:[we.jsx("h4",{children:"Evaluation context"}),we.jsx("div",{style:{backgroundColor:re.backgroundColor},children:we.jsx(ev,{theme:j,width:"100%",height:"80px",language:"json",options:{minimap:{enabled:!1},lineNumbers:"off",folding:!1},beforeMount:rv,value:m,onChange:R=>{R&&y(R)}})})]}),we.jsxs("div",{style:{display:"flex",gap:"8px",paddingTop:"8px"},children:[we.jsx("button",{className:"md-button md-button--primary",onClick:ne,disabled:!p||!E,children:"Evaluate"}),we.jsx("button",{className:"md-button",onClick:Q,children:"Reset"}),we.jsx("button",{className:"md-button",onClick:de,disabled:!p||!E,children:"Share"})]}),we.jsxs("div",{className:`output ${S?"visible":""} admonition ${$==="success"?"success":"failure"}`,children:[we.jsx("p",{className:"admonition-title",children:$==="success"?"Success":"Failure"}),typeof P=="object"?we.jsx("div",{style:{margin:"0.6rem 0 0.6rem 0"},children:Object.entries(P).map(([R,z])=>we.jsxs("div",{children:[we.jsxs("strong",{children:[R,":"]})," ",JSON.stringify(z)]},R))}):we.jsx("p",{children:P})]}),v&&we.jsx("h4",{className:"admonition-title",style:{paddingLeft:"45px",borderLeftWidth:"0rem",borderLeftStyle:"solid",left:"15px"},children:"URL copied to clipboard"})]})]})]})]})}cb.createRoot(document.getElementById("playground")).render(we.jsx(Lr.StrictMode,{children:we.jsx(bw,{})}));