diff --git a/pkg/arvo/app/dbug.hoon b/pkg/arvo/app/dbug.hoon index 5f76684b27..af2f90ee74 100644 --- a/pkg/arvo/app/dbug.hoon +++ b/pkg/arvo/app/dbug.hoon @@ -586,7 +586,6 @@ %- pairs :~ 'messages'^(numb (lent messages)) 'packets'^(numb ~(wyt in packets)) - 'heeds'^(set-array heeds from-duct) 'keens'^(set-array ~(key by keens) path) == :: @@ -650,7 +649,6 @@ :: }, ...], :: closing: [bone, ..., bone], :: corked: [bone, ..., bone], - :: heeds: [['/paths', ...] ...] :: scries: :: -> { =path :: keen-state: { @@ -777,8 +775,6 @@ 'closing'^(set-array closing numb) :: 'corked'^(set-array corked numb) - :: - 'heeds'^(set-array heeds from-duct) :: 'scries'^(scries ~(tap by keens)) == diff --git a/pkg/arvo/app/debug/index.js b/pkg/arvo/app/debug/index.js index d82c144d66..e7ae07abbb 100644 --- a/pkg/arvo/app/debug/index.js +++ b/pkg/arvo/app/debug/index.js @@ -22,7 +22,7 @@ var QT=Object.defineProperty;var KT=(e,t,n)=>t in e?QT(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */(function(e){function t(R,_){var h=R.length;R.push(_);e:for(;0>>1,G=R[M];if(0>>1;Ms(re,h))yes(Me,re)?(R[M]=Me,R[ye]=h,M=ye):(R[M]=re,R[ae]=h,M=ae);else if(yes(Me,h))R[M]=Me,R[ye]=h,M=ye;else break e}}return _}function s(R,_){var h=R.sortIndex-_.sortIndex;return h!==0?h:R.id-_.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,c=u.now();e.unstable_now=function(){return u.now()-c}}var p=[],v=[],m=1,O=null,E=3,F=!1,B=!1,K=!1,me=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function I(R){for(var _=n(v);_!==null;){if(_.callback===null)r(v);else if(_.startTime<=R)r(v),_.sortIndex=_.expirationTime,t(p,_);else break;_=n(v)}}function H(R){if(K=!1,I(R),!B)if(n(p)!==null)B=!0,b(X);else{var _=n(v);_!==null&&L(H,_.startTime-R)}}function X(R,_){B=!1,K&&(K=!1,N(J),J=-1),F=!0;var h=E;try{for(I(_),O=n(p);O!==null&&(!(O.expirationTime>_)||R&&!P());){var M=O.callback;if(typeof M=="function"){O.callback=null,E=O.priorityLevel;var G=M(O.expirationTime<=_);_=e.unstable_now(),typeof G=="function"?O.callback=G:O===n(p)&&r(p),I(_)}else r(p);O=n(p)}if(O!==null)var se=!0;else{var ae=n(v);ae!==null&&L(H,ae.startTime-_),se=!1}return se}finally{O=null,E=h,F=!1}}var te=!1,V=null,J=-1,le=5,fe=-1;function P(){return!(e.unstable_now()-feR||125M?(R.sortIndex=h,t(v,R),n(p)===null&&R===n(v)&&(K?(N(J),J=-1):K=!0,L(H,h-M))):(R.sortIndex=G,t(p,R),B||F||(B=!0,b(X))),R},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(R){var _=E;return function(){var h=E;E=_;try{return R.apply(this,arguments)}finally{E=h}}}})(jw);Lw.exports=jw;var wb=Lw.exports;/** + */(function(e){function t(R,_){var h=R.length;R.push(_);e:for(;0>>1,G=R[M];if(0>>1;Ms(re,h))yes(Me,re)?(R[M]=Me,R[ye]=h,M=ye):(R[M]=re,R[ae]=h,M=ae);else if(yes(Me,h))R[M]=Me,R[ye]=h,M=ye;else break e}}return _}function s(R,_){var h=R.sortIndex-_.sortIndex;return h!==0?h:R.id-_.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,c=u.now();e.unstable_now=function(){return u.now()-c}}var p=[],v=[],m=1,O=null,E=3,F=!1,B=!1,Q=!1,me=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function I(R){for(var _=n(v);_!==null;){if(_.callback===null)r(v);else if(_.startTime<=R)r(v),_.sortIndex=_.expirationTime,t(p,_);else break;_=n(v)}}function H(R){if(Q=!1,I(R),!B)if(n(p)!==null)B=!0,b(X);else{var _=n(v);_!==null&&L(H,_.startTime-R)}}function X(R,_){B=!1,Q&&(Q=!1,N(J),J=-1),F=!0;var h=E;try{for(I(_),O=n(p);O!==null&&(!(O.expirationTime>_)||R&&!P());){var M=O.callback;if(typeof M=="function"){O.callback=null,E=O.priorityLevel;var G=M(O.expirationTime<=_);_=e.unstable_now(),typeof G=="function"?O.callback=G:O===n(p)&&r(p),I(_)}else r(p);O=n(p)}if(O!==null)var se=!0;else{var ae=n(v);ae!==null&&L(H,ae.startTime-_),se=!1}return se}finally{O=null,E=h,F=!1}}var te=!1,K=null,J=-1,le=5,fe=-1;function P(){return!(e.unstable_now()-feR||125M?(R.sortIndex=h,t(v,R),n(p)===null&&R===n(v)&&(Q?(N(J),J=-1):Q=!0,L(H,h-M))):(R.sortIndex=G,t(p,R),B||F||(B=!0,b(X))),R},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(R){var _=E;return function(){var h=E;E=_;try{return R.apply(this,arguments)}finally{E=h}}}})(jw);Lw.exports=jw;var wb=Lw.exports;/** * @license React * react-dom.production.min.js * @@ -30,21 +30,21 @@ var QT=Object.defineProperty;var KT=(e,t,n)=>t in e?QT(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Nw=oe,wr=wb;function ne(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Zp=Object.prototype.hasOwnProperty,_b=/^[: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]*$/,zy={},Hy={};function xb(e){return Zp.call(Hy,e)?!0:Zp.call(zy,e)?!1:_b.test(e)?Hy[e]=!0:(zy[e]=!0,!1)}function Sb(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Mb(e,t,n,r){if(t===null||typeof t>"u"||Sb(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Hn(e,t,n,r,s,a,u){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=u}var kn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){kn[e]=new Hn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];kn[t]=new Hn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){kn[e]=new Hn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){kn[e]=new Hn(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){kn[e]=new Hn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){kn[e]=new Hn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){kn[e]=new Hn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){kn[e]=new Hn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){kn[e]=new Hn(e,5,!1,e.toLowerCase(),null,!1,!1)});var u0=/[\-:]([a-z])/g;function f0(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(u0,f0);kn[t]=new Hn(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(u0,f0);kn[t]=new Hn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(u0,f0);kn[t]=new Hn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){kn[e]=new Hn(e,1,!1,e.toLowerCase(),null,!1,!1)});kn.xlinkHref=new Hn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){kn[e]=new Hn(e,1,!1,e.toLowerCase(),null,!0,!0)});function c0(e,t,n,r){var s=kn.hasOwnProperty(t)?kn[t]:null;(s!==null?s.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Zp=Object.prototype.hasOwnProperty,_b=/^[: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]*$/,zy={},Hy={};function xb(e){return Zp.call(Hy,e)?!0:Zp.call(zy,e)?!1:_b.test(e)?Hy[e]=!0:(zy[e]=!0,!1)}function Sb(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Mb(e,t,n,r){if(t===null||typeof t>"u"||Sb(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Hn(e,t,n,r,s,a,u){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=u}var kn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){kn[e]=new Hn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];kn[t]=new Hn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){kn[e]=new Hn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){kn[e]=new Hn(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){kn[e]=new Hn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){kn[e]=new Hn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){kn[e]=new Hn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){kn[e]=new Hn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){kn[e]=new Hn(e,5,!1,e.toLowerCase(),null,!1,!1)});var u0=/[\-:]([a-z])/g;function f0(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(u0,f0);kn[t]=new Hn(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(u0,f0);kn[t]=new Hn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(u0,f0);kn[t]=new Hn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){kn[e]=new Hn(e,1,!1,e.toLowerCase(),null,!1,!1)});kn.xlinkHref=new Hn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){kn[e]=new Hn(e,1,!1,e.toLowerCase(),null,!0,!0)});function c0(e,t,n,r){var s=kn.hasOwnProperty(t)?kn[t]:null;(s!==null?s.type!==0:r||!(2c||s[u]!==a[c]){var p=` -`+s[u].replace(" at new "," at ");return e.displayName&&p.includes("")&&(p=p.replace("",e.displayName)),p}while(1<=u&&0<=c);break}}}finally{pp=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Nl(e):""}function kb(e){switch(e.tag){case 5:return Nl(e.type);case 16:return Nl("Lazy");case 13:return Nl("Suspense");case 19:return Nl("SuspenseList");case 0:case 2:case 15:return e=mp(e.type,!1),e;case 11:return e=mp(e.type.render,!1),e;case 1:return e=mp(e.type,!0),e;default:return""}}function tm(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case wa:return"Fragment";case ya:return"Portal";case Xp:return"Profiler";case h0:return"StrictMode";case Jp:return"Suspense";case em:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Uw:return(e.displayName||"Context")+".Consumer";case Fw:return(e._context.displayName||"Context")+".Provider";case d0:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case p0:return t=e.displayName||null,t!==null?t:tm(e.type)||"Memo";case Ts:t=e._payload,e=e._init;try{return tm(e(t))}catch{}}return null}function Cb(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return tm(t);case 8:return t===h0?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Ys(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ww(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ob(e){var t=Ww(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(u){r=""+u,a.call(this,u)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(u){r=""+u},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function $f(e){e._valueTracker||(e._valueTracker=Ob(e))}function Bw(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Ww(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Mc(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}}function nm(e,t){var n=t.checked;return Zt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Gy(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ys(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function zw(e,t){t=t.checked,t!=null&&c0(e,"checked",t,!1)}function rm(e,t){zw(e,t);var n=Ys(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?im(e,t.type,n):t.hasOwnProperty("defaultValue")&&im(e,t.type,Ys(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Vy(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function im(e,t,n){(t!=="number"||Mc(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Il=Array.isArray;function Da(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s"+t.valueOf().toString()+"",t=Wf.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function tu(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var $l={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Eb=["Webkit","ms","Moz","O"];Object.keys($l).forEach(function(e){Eb.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),$l[t]=$l[e]})});function Vw(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||$l.hasOwnProperty(e)&&$l[e]?(""+t).trim():t+"px"}function qw(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=Vw(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var Tb=Zt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function am(e,t){if(t){if(Tb[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ne(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ne(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ne(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ne(62))}}function lm(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var um=null;function m0(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var fm=null,Aa=null,La=null;function Ky(e){if(e=ku(e)){if(typeof fm!="function")throw Error(ne(280));var t=e.stateNode;t&&(t=hh(t),fm(e.stateNode,e.type,t))}}function Qw(e){Aa?La?La.push(e):La=[e]:Aa=e}function Kw(){if(Aa){var e=Aa,t=La;if(La=Aa=null,Ky(e),t)for(e=0;e>>=0,e===0?32:31-(Ub(e)/$b|0)|0}var Bf=64,zf=4194304;function Fl(e){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: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&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Ec(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,a=e.pingedLanes,u=n&268435455;if(u!==0){var c=u&~s;c!==0?r=Fl(c):(a&=u,a!==0&&(r=Fl(a)))}else u=n&~s,u!==0?r=Fl(u):a!==0&&(r=Fl(a));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,a=t&-t,s>=a||s===16&&(a&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Su(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ni(t),e[t]=n}function Hb(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Bl),s1=" ",o1=!1;function g_(e,t){switch(e){case"keyup":return yP.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function v_(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var _a=!1;function _P(e,t){switch(e){case"compositionend":return v_(t);case"keypress":return t.which!==32?null:(o1=!0,s1);case"textInput":return e=t.data,e===s1&&o1?null:e;default:return null}}function xP(e,t){if(_a)return e==="compositionend"||!M0&&g_(e,t)?(e=p_(),uc=_0=Ds=null,_a=!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=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=f1(n)}}function x_(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?x_(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function S_(){for(var e=window,t=Mc();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Mc(e.document)}return t}function k0(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 PP(e){var t=S_(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&x_(n.ownerDocument.documentElement,n)){if(r!==null&&k0(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,a=Math.min(r.start,s);r=r.end===void 0?a:Math.min(r.end,s),!e.extend&&a>r&&(s=r,r=a,a=s),s=c1(n,a);var u=c1(n,r);s&&u&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==u.node||e.focusOffset!==u.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(u.node,u.offset)):(t.setEnd(u.node,u.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,xa=null,gm=null,Hl=null,vm=!1;function h1(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;vm||xa==null||xa!==Mc(r)||(r=xa,"selectionStart"in r&&k0(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Hl&&au(Hl,r)||(Hl=r,r=Pc(gm,"onSelect"),0ka||(e.current=Mm[ka],Mm[ka]=null,ka--)}function kt(e,t){ka++,Mm[ka]=e.current,e.current=t}var Gs={},Dn=qs(Gs),nr=qs(!1),jo=Gs;function Ha(e,t){var n=e.type.contextTypes;if(!n)return Gs;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},a;for(a in n)s[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function rr(e){return e=e.childContextTypes,e!=null}function Dc(){Dt(nr),Dt(Dn)}function w1(e,t,n){if(Dn.current!==Gs)throw Error(ne(168));kt(Dn,t),kt(nr,n)}function R_(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(ne(108,Cb(e)||"Unknown",s));return Zt({},n,r)}function Ac(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Gs,jo=Dn.current,kt(Dn,e),kt(nr,nr.current),!0}function _1(e,t,n){var r=e.stateNode;if(!r)throw Error(ne(169));n?(e=R_(e,t,jo),r.__reactInternalMemoizedMergedChildContext=e,Dt(nr),Dt(Dn),kt(Dn,e)):Dt(nr),kt(nr,n)}var Ki=null,dh=!1,bp=!1;function D_(e){Ki===null?Ki=[e]:Ki.push(e)}function BP(e){dh=!0,D_(e)}function Qs(){if(!bp&&Ki!==null){bp=!0;var e=0,t=tt;try{var n=Ki;for(tt=1;e>=u,s-=u,Zi=1<<32-ni(t)+s|n<J?(le=V,V=null):le=V.sibling;var fe=E(N,V,I[J],H);if(fe===null){V===null&&(V=le);break}e&&V&&fe.alternate===null&&t(N,V),A=a(fe,A,J),te===null?X=fe:te.sibling=fe,te=fe,V=le}if(J===I.length)return n(N,V),Vt&&ko(N,J),X;if(V===null){for(;JJ?(le=V,V=null):le=V.sibling;var P=E(N,V,fe.value,H);if(P===null){V===null&&(V=le);break}e&&V&&P.alternate===null&&t(N,V),A=a(P,A,J),te===null?X=P:te.sibling=P,te=P,V=le}if(fe.done)return n(N,V),Vt&&ko(N,J),X;if(V===null){for(;!fe.done;J++,fe=I.next())fe=O(N,fe.value,H),fe!==null&&(A=a(fe,A,J),te===null?X=fe:te.sibling=fe,te=fe);return Vt&&ko(N,J),X}for(V=r(N,V);!fe.done;J++,fe=I.next())fe=F(V,N,J,fe.value,H),fe!==null&&(e&&fe.alternate!==null&&V.delete(fe.key===null?J:fe.key),A=a(fe,A,J),te===null?X=fe:te.sibling=fe,te=fe);return e&&V.forEach(function(f){return t(N,f)}),Vt&&ko(N,J),X}function me(N,A,I,H){if(typeof I=="object"&&I!==null&&I.type===wa&&I.key===null&&(I=I.props.children),typeof I=="object"&&I!==null){switch(I.$$typeof){case Uf:e:{for(var X=I.key,te=A;te!==null;){if(te.key===X){if(X=I.type,X===wa){if(te.tag===7){n(N,te.sibling),A=s(te,I.props.children),A.return=N,N=A;break e}}else if(te.elementType===X||typeof X=="object"&&X!==null&&X.$$typeof===Ts&&E1(X)===te.type){n(N,te.sibling),A=s(te,I.props),A.ref=Pl(N,te,I),A.return=N,N=A;break e}n(N,te);break}else t(N,te);te=te.sibling}I.type===wa?(A=Do(I.props.children,N.mode,H,I.key),A.return=N,N=A):(H=vc(I.type,I.key,I.props,null,N.mode,H),H.ref=Pl(N,A,I),H.return=N,N=H)}return u(N);case ya:e:{for(te=I.key;A!==null;){if(A.key===te)if(A.tag===4&&A.stateNode.containerInfo===I.containerInfo&&A.stateNode.implementation===I.implementation){n(N,A.sibling),A=s(A,I.children||[]),A.return=N,N=A;break e}else{n(N,A);break}else t(N,A);A=A.sibling}A=Ip(I,N.mode,H),A.return=N,N=A}return u(N);case Ts:return te=I._init,me(N,A,te(I._payload),H)}if(Il(I))return B(N,A,I,H);if(Cl(I))return K(N,A,I,H);Kf(N,I)}return typeof I=="string"&&I!==""||typeof I=="number"?(I=""+I,A!==null&&A.tag===6?(n(N,A.sibling),A=s(A,I),A.return=N,N=A):(n(N,A),A=Np(I,N.mode,H),A.return=N,N=A),u(N)):n(N,A)}return me}var Ga=$_(!0),W_=$_(!1),Cu={},Oi=qs(Cu),cu=qs(Cu),hu=qs(Cu);function bo(e){if(e===Cu)throw Error(ne(174));return e}function A0(e,t){switch(kt(hu,t),kt(cu,e),kt(Oi,Cu),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:om(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=om(t,e)}Dt(Oi),kt(Oi,t)}function Va(){Dt(Oi),Dt(cu),Dt(hu)}function B_(e){bo(hu.current);var t=bo(Oi.current),n=om(t,e.type);t!==n&&(kt(cu,e),kt(Oi,n))}function L0(e){cu.current===e&&(Dt(Oi),Dt(cu))}var Qt=qs(0);function Uc(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 Pp=[];function j0(){for(var e=0;en?n:4,e(!0);var r=Rp.transition;Rp.transition={};try{e(!1),t()}finally{tt=n,Rp.transition=r}}function ix(){return Br().memoizedState}function GP(e,t,n){var r=Bs(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},sx(e))ox(t,n);else if(n=N_(e,t,n,r),n!==null){var s=Wn();ri(n,e,r,s),ax(n,t,r)}}function VP(e,t,n){var r=Bs(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(sx(e))ox(t,s);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var u=t.lastRenderedState,c=a(u,n);if(s.hasEagerState=!0,s.eagerState=c,ii(c,u)){var p=t.interleaved;p===null?(s.next=s,R0(t)):(s.next=p.next,p.next=s),t.interleaved=s;return}}catch{}finally{}n=N_(e,t,s,r),n!==null&&(s=Wn(),ri(n,e,r,s),ax(n,t,r))}}function sx(e){var t=e.alternate;return e===Kt||t!==null&&t===Kt}function ox(e,t){Yl=$c=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ax(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,v0(e,n)}}var Wc={readContext:Wr,useCallback:Tn,useContext:Tn,useEffect:Tn,useImperativeHandle:Tn,useInsertionEffect:Tn,useLayoutEffect:Tn,useMemo:Tn,useReducer:Tn,useRef:Tn,useState:Tn,useDebugValue:Tn,useDeferredValue:Tn,useTransition:Tn,useMutableSource:Tn,useSyncExternalStore:Tn,useId:Tn,unstable_isNewReconciler:!1},qP={readContext:Wr,useCallback:function(e,t){return xi().memoizedState=[e,t===void 0?null:t],e},useContext:Wr,useEffect:b1,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,dc(4194308,4,J_.bind(null,t,e),n)},useLayoutEffect:function(e,t){return dc(4194308,4,e,t)},useInsertionEffect:function(e,t){return dc(4,2,e,t)},useMemo:function(e,t){var n=xi();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=xi();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=GP.bind(null,Kt,e),[r.memoizedState,e]},useRef:function(e){var t=xi();return e={current:e},t.memoizedState=e},useState:T1,useDebugValue:$0,useDeferredValue:function(e){return xi().memoizedState=e},useTransition:function(){var e=T1(!1),t=e[0];return e=YP.bind(null,e[1]),xi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Kt,s=xi();if(Vt){if(n===void 0)throw Error(ne(407));n=n()}else{if(n=t(),yn===null)throw Error(ne(349));Io&30||Y_(r,t,n)}s.memoizedState=n;var a={value:n,getSnapshot:t};return s.queue=a,b1(V_.bind(null,r,a,e),[e]),r.flags|=2048,mu(9,G_.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=xi(),t=yn.identifierPrefix;if(Vt){var n=Xi,r=Zi;n=(r&~(1<<32-ni(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=du++,0")&&(p=p.replace("",e.displayName)),p}while(1<=u&&0<=c);break}}}finally{pp=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Nl(e):""}function kb(e){switch(e.tag){case 5:return Nl(e.type);case 16:return Nl("Lazy");case 13:return Nl("Suspense");case 19:return Nl("SuspenseList");case 0:case 2:case 15:return e=mp(e.type,!1),e;case 11:return e=mp(e.type.render,!1),e;case 1:return e=mp(e.type,!0),e;default:return""}}function tm(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case wa:return"Fragment";case ya:return"Portal";case Xp:return"Profiler";case h0:return"StrictMode";case Jp:return"Suspense";case em:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Uw:return(e.displayName||"Context")+".Consumer";case Fw:return(e._context.displayName||"Context")+".Provider";case d0:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case p0:return t=e.displayName||null,t!==null?t:tm(e.type)||"Memo";case Es:t=e._payload,e=e._init;try{return tm(e(t))}catch{}}return null}function Cb(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return tm(t);case 8:return t===h0?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Ys(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ww(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ob(e){var t=Ww(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(u){r=""+u,a.call(this,u)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(u){r=""+u},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function $f(e){e._valueTracker||(e._valueTracker=Ob(e))}function Bw(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Ww(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Mc(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}}function nm(e,t){var n=t.checked;return Zt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Gy(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ys(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function zw(e,t){t=t.checked,t!=null&&c0(e,"checked",t,!1)}function rm(e,t){zw(e,t);var n=Ys(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?im(e,t.type,n):t.hasOwnProperty("defaultValue")&&im(e,t.type,Ys(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Vy(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function im(e,t,n){(t!=="number"||Mc(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Il=Array.isArray;function Da(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s"+t.valueOf().toString()+"",t=Wf.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function tu(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var $l={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Eb=["Webkit","ms","Moz","O"];Object.keys($l).forEach(function(e){Eb.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),$l[t]=$l[e]})});function Vw(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||$l.hasOwnProperty(e)&&$l[e]?(""+t).trim():t+"px"}function qw(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=Vw(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var Tb=Zt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function am(e,t){if(t){if(Tb[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ne(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ne(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ne(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ne(62))}}function lm(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var um=null;function m0(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var fm=null,Aa=null,La=null;function Ky(e){if(e=ku(e)){if(typeof fm!="function")throw Error(ne(280));var t=e.stateNode;t&&(t=hh(t),fm(e.stateNode,e.type,t))}}function Qw(e){Aa?La?La.push(e):La=[e]:Aa=e}function Kw(){if(Aa){var e=Aa,t=La;if(La=Aa=null,Ky(e),t)for(e=0;e>>=0,e===0?32:31-(Ub(e)/$b|0)|0}var Bf=64,zf=4194304;function Fl(e){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: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&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Ec(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,a=e.pingedLanes,u=n&268435455;if(u!==0){var c=u&~s;c!==0?r=Fl(c):(a&=u,a!==0&&(r=Fl(a)))}else u=n&~s,u!==0?r=Fl(u):a!==0&&(r=Fl(a));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,a=t&-t,s>=a||s===16&&(a&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Su(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ni(t),e[t]=n}function Hb(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Bl),s1=" ",o1=!1;function g_(e,t){switch(e){case"keyup":return yP.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function v_(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var _a=!1;function _P(e,t){switch(e){case"compositionend":return v_(t);case"keypress":return t.which!==32?null:(o1=!0,s1);case"textInput":return e=t.data,e===s1&&o1?null:e;default:return null}}function xP(e,t){if(_a)return e==="compositionend"||!M0&&g_(e,t)?(e=p_(),uc=_0=Ds=null,_a=!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=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=f1(n)}}function x_(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?x_(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function S_(){for(var e=window,t=Mc();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Mc(e.document)}return t}function k0(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 PP(e){var t=S_(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&x_(n.ownerDocument.documentElement,n)){if(r!==null&&k0(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,a=Math.min(r.start,s);r=r.end===void 0?a:Math.min(r.end,s),!e.extend&&a>r&&(s=r,r=a,a=s),s=c1(n,a);var u=c1(n,r);s&&u&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==u.node||e.focusOffset!==u.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(u.node,u.offset)):(t.setEnd(u.node,u.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,xa=null,gm=null,Hl=null,vm=!1;function h1(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;vm||xa==null||xa!==Mc(r)||(r=xa,"selectionStart"in r&&k0(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Hl&&au(Hl,r)||(Hl=r,r=Pc(gm,"onSelect"),0ka||(e.current=Mm[ka],Mm[ka]=null,ka--)}function kt(e,t){ka++,Mm[ka]=e.current,e.current=t}var Gs={},Dn=qs(Gs),nr=qs(!1),jo=Gs;function Ha(e,t){var n=e.type.contextTypes;if(!n)return Gs;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},a;for(a in n)s[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function rr(e){return e=e.childContextTypes,e!=null}function Dc(){Dt(nr),Dt(Dn)}function w1(e,t,n){if(Dn.current!==Gs)throw Error(ne(168));kt(Dn,t),kt(nr,n)}function R_(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(ne(108,Cb(e)||"Unknown",s));return Zt({},n,r)}function Ac(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Gs,jo=Dn.current,kt(Dn,e),kt(nr,nr.current),!0}function _1(e,t,n){var r=e.stateNode;if(!r)throw Error(ne(169));n?(e=R_(e,t,jo),r.__reactInternalMemoizedMergedChildContext=e,Dt(nr),Dt(Dn),kt(Dn,e)):Dt(nr),kt(nr,n)}var Qi=null,dh=!1,bp=!1;function D_(e){Qi===null?Qi=[e]:Qi.push(e)}function BP(e){dh=!0,D_(e)}function Qs(){if(!bp&&Qi!==null){bp=!0;var e=0,t=tt;try{var n=Qi;for(tt=1;e>=u,s-=u,Ki=1<<32-ni(t)+s|n<J?(le=K,K=null):le=K.sibling;var fe=E(N,K,I[J],H);if(fe===null){K===null&&(K=le);break}e&&K&&fe.alternate===null&&t(N,K),A=a(fe,A,J),te===null?X=fe:te.sibling=fe,te=fe,K=le}if(J===I.length)return n(N,K),Gt&&ko(N,J),X;if(K===null){for(;JJ?(le=K,K=null):le=K.sibling;var P=E(N,K,fe.value,H);if(P===null){K===null&&(K=le);break}e&&K&&P.alternate===null&&t(N,K),A=a(P,A,J),te===null?X=P:te.sibling=P,te=P,K=le}if(fe.done)return n(N,K),Gt&&ko(N,J),X;if(K===null){for(;!fe.done;J++,fe=I.next())fe=O(N,fe.value,H),fe!==null&&(A=a(fe,A,J),te===null?X=fe:te.sibling=fe,te=fe);return Gt&&ko(N,J),X}for(K=r(N,K);!fe.done;J++,fe=I.next())fe=F(K,N,J,fe.value,H),fe!==null&&(e&&fe.alternate!==null&&K.delete(fe.key===null?J:fe.key),A=a(fe,A,J),te===null?X=fe:te.sibling=fe,te=fe);return e&&K.forEach(function(f){return t(N,f)}),Gt&&ko(N,J),X}function me(N,A,I,H){if(typeof I=="object"&&I!==null&&I.type===wa&&I.key===null&&(I=I.props.children),typeof I=="object"&&I!==null){switch(I.$$typeof){case Uf:e:{for(var X=I.key,te=A;te!==null;){if(te.key===X){if(X=I.type,X===wa){if(te.tag===7){n(N,te.sibling),A=s(te,I.props.children),A.return=N,N=A;break e}}else if(te.elementType===X||typeof X=="object"&&X!==null&&X.$$typeof===Es&&E1(X)===te.type){n(N,te.sibling),A=s(te,I.props),A.ref=Pl(N,te,I),A.return=N,N=A;break e}n(N,te);break}else t(N,te);te=te.sibling}I.type===wa?(A=Do(I.props.children,N.mode,H,I.key),A.return=N,N=A):(H=vc(I.type,I.key,I.props,null,N.mode,H),H.ref=Pl(N,A,I),H.return=N,N=H)}return u(N);case ya:e:{for(te=I.key;A!==null;){if(A.key===te)if(A.tag===4&&A.stateNode.containerInfo===I.containerInfo&&A.stateNode.implementation===I.implementation){n(N,A.sibling),A=s(A,I.children||[]),A.return=N,N=A;break e}else{n(N,A);break}else t(N,A);A=A.sibling}A=Ip(I,N.mode,H),A.return=N,N=A}return u(N);case Es:return te=I._init,me(N,A,te(I._payload),H)}if(Il(I))return B(N,A,I,H);if(Cl(I))return Q(N,A,I,H);Kf(N,I)}return typeof I=="string"&&I!==""||typeof I=="number"?(I=""+I,A!==null&&A.tag===6?(n(N,A.sibling),A=s(A,I),A.return=N,N=A):(n(N,A),A=Np(I,N.mode,H),A.return=N,N=A),u(N)):n(N,A)}return me}var Ga=$_(!0),W_=$_(!1),Cu={},Oi=qs(Cu),cu=qs(Cu),hu=qs(Cu);function bo(e){if(e===Cu)throw Error(ne(174));return e}function A0(e,t){switch(kt(hu,t),kt(cu,e),kt(Oi,Cu),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:om(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=om(t,e)}Dt(Oi),kt(Oi,t)}function Va(){Dt(Oi),Dt(cu),Dt(hu)}function B_(e){bo(hu.current);var t=bo(Oi.current),n=om(t,e.type);t!==n&&(kt(cu,e),kt(Oi,n))}function L0(e){cu.current===e&&(Dt(Oi),Dt(cu))}var Qt=qs(0);function Uc(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 Pp=[];function j0(){for(var e=0;en?n:4,e(!0);var r=Rp.transition;Rp.transition={};try{e(!1),t()}finally{tt=n,Rp.transition=r}}function ix(){return Br().memoizedState}function GP(e,t,n){var r=Bs(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},sx(e))ox(t,n);else if(n=N_(e,t,n,r),n!==null){var s=Wn();ri(n,e,r,s),ax(n,t,r)}}function VP(e,t,n){var r=Bs(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(sx(e))ox(t,s);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var u=t.lastRenderedState,c=a(u,n);if(s.hasEagerState=!0,s.eagerState=c,ii(c,u)){var p=t.interleaved;p===null?(s.next=s,R0(t)):(s.next=p.next,p.next=s),t.interleaved=s;return}}catch{}finally{}n=N_(e,t,s,r),n!==null&&(s=Wn(),ri(n,e,r,s),ax(n,t,r))}}function sx(e){var t=e.alternate;return e===Kt||t!==null&&t===Kt}function ox(e,t){Yl=$c=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ax(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,v0(e,n)}}var Wc={readContext:Wr,useCallback:Tn,useContext:Tn,useEffect:Tn,useImperativeHandle:Tn,useInsertionEffect:Tn,useLayoutEffect:Tn,useMemo:Tn,useReducer:Tn,useRef:Tn,useState:Tn,useDebugValue:Tn,useDeferredValue:Tn,useTransition:Tn,useMutableSource:Tn,useSyncExternalStore:Tn,useId:Tn,unstable_isNewReconciler:!1},qP={readContext:Wr,useCallback:function(e,t){return xi().memoizedState=[e,t===void 0?null:t],e},useContext:Wr,useEffect:b1,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,dc(4194308,4,J_.bind(null,t,e),n)},useLayoutEffect:function(e,t){return dc(4194308,4,e,t)},useInsertionEffect:function(e,t){return dc(4,2,e,t)},useMemo:function(e,t){var n=xi();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=xi();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=GP.bind(null,Kt,e),[r.memoizedState,e]},useRef:function(e){var t=xi();return e={current:e},t.memoizedState=e},useState:T1,useDebugValue:$0,useDeferredValue:function(e){return xi().memoizedState=e},useTransition:function(){var e=T1(!1),t=e[0];return e=YP.bind(null,e[1]),xi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Kt,s=xi();if(Gt){if(n===void 0)throw Error(ne(407));n=n()}else{if(n=t(),yn===null)throw Error(ne(349));Io&30||Y_(r,t,n)}s.memoizedState=n;var a={value:n,getSnapshot:t};return s.queue=a,b1(V_.bind(null,r,a,e),[e]),r.flags|=2048,mu(9,G_.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=xi(),t=yn.identifierPrefix;if(Gt){var n=Zi,r=Ki;n=(r&~(1<<32-ni(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=du++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=u.createElement(n,{is:r.is}):(e=u.createElement(n),n==="select"&&(u=e,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):e=u.createElementNS(e,n),e[Si]=t,e[fu]=r,gx(e,t,!1,!1),t.stateNode=e;e:{switch(u=lm(n,r),n){case"dialog":Rt("cancel",e),Rt("close",e),s=r;break;case"iframe":case"object":case"embed":Rt("load",e),s=r;break;case"video":case"audio":for(s=0;sQa&&(t.flags|=128,r=!0,Rl(a,!1),t.lanes=4194304)}else{if(!r)if(e=Uc(u),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Rl(a,!0),a.tail===null&&a.tailMode==="hidden"&&!u.alternate&&!Vt)return bn(t),null}else 2*sn()-a.renderingStartTime>Qa&&n!==1073741824&&(t.flags|=128,r=!0,Rl(a,!1),t.lanes=4194304);a.isBackwards?(u.sibling=t.child,t.child=u):(n=a.last,n!==null?n.sibling=u:t.child=u,a.last=u)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=sn(),t.sibling=null,n=Qt.current,kt(Qt,r?n&1|2:n&1),t):(bn(t),null);case 22:case 23:return G0(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?dr&1073741824&&(bn(t),t.subtreeFlags&6&&(t.flags|=8192)):bn(t),null;case 24:return null;case 25:return null}throw Error(ne(156,t.tag))}function nR(e,t){switch(O0(t),t.tag){case 1:return rr(t.type)&&Dc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Va(),Dt(nr),Dt(Dn),j0(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return L0(t),null;case 13:if(Dt(Qt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ne(340));Ya()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Dt(Qt),null;case 4:return Va(),null;case 10:return P0(t.type._context),null;case 22:case 23:return G0(),null;case 24:return null;default:return null}}var Xf=!1,Pn=!1,rR=typeof WeakSet=="function"?WeakSet:Set,ge=null;function Ta(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Jt(e,t,r)}else n.current=null}function jm(e,t,n){try{n()}catch(r){Jt(e,t,r)}}var F1=!1;function iR(e,t){if(ym=Tc,e=S_(),k0(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var u=0,c=-1,p=-1,v=0,m=0,O=e,E=null;t:for(;;){for(var F;O!==n||s!==0&&O.nodeType!==3||(c=u+s),O!==a||r!==0&&O.nodeType!==3||(p=u+r),O.nodeType===3&&(u+=O.nodeValue.length),(F=O.firstChild)!==null;)E=O,O=F;for(;;){if(O===e)break t;if(E===n&&++v===s&&(c=u),E===a&&++m===r&&(p=u),(F=O.nextSibling)!==null)break;O=E,E=O.parentNode}O=F}n=c===-1||p===-1?null:{start:c,end:p}}else n=null}n=n||{start:0,end:0}}else n=null;for(wm={focusedElem:e,selectionRange:n},Tc=!1,ge=t;ge!==null;)if(t=ge,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ge=e;else for(;ge!==null;){t=ge;try{var B=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(B!==null){var K=B.memoizedProps,me=B.memoizedState,N=t.stateNode,A=N.getSnapshotBeforeUpdate(t.elementType===t.type?K:Xr(t.type,K),me);N.__reactInternalSnapshotBeforeUpdate=A}break;case 3:var I=t.stateNode.containerInfo;I.nodeType===1?I.textContent="":I.nodeType===9&&I.documentElement&&I.removeChild(I.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ne(163))}}catch(H){Jt(t,t.return,H)}if(e=t.sibling,e!==null){e.return=t.return,ge=e;break}ge=t.return}return B=F1,F1=!1,B}function Gl(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var a=s.destroy;s.destroy=void 0,a!==void 0&&jm(t,n,a)}s=s.next}while(s!==r)}}function gh(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Nm(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function wx(e){var t=e.alternate;t!==null&&(e.alternate=null,wx(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Si],delete t[fu],delete t[Sm],delete t[$P],delete t[WP])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function _x(e){return e.tag===5||e.tag===3||e.tag===4}function U1(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||_x(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Im(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Rc));else if(r!==4&&(e=e.child,e!==null))for(Im(e,t,n),e=e.sibling;e!==null;)Im(e,t,n),e=e.sibling}function Fm(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Fm(e,t,n),e=e.sibling;e!==null;)Fm(e,t,n),e=e.sibling}var Sn=null,Jr=!1;function ks(e,t,n){for(n=n.child;n!==null;)xx(e,t,n),n=n.sibling}function xx(e,t,n){if(Ci&&typeof Ci.onCommitFiberUnmount=="function")try{Ci.onCommitFiberUnmount(lh,n)}catch{}switch(n.tag){case 5:Pn||Ta(n,t);case 6:var r=Sn,s=Jr;Sn=null,ks(e,t,n),Sn=r,Jr=s,Sn!==null&&(Jr?(e=Sn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Sn.removeChild(n.stateNode));break;case 18:Sn!==null&&(Jr?(e=Sn,n=n.stateNode,e.nodeType===8?Tp(e.parentNode,n):e.nodeType===1&&Tp(e,n),su(e)):Tp(Sn,n.stateNode));break;case 4:r=Sn,s=Jr,Sn=n.stateNode.containerInfo,Jr=!0,ks(e,t,n),Sn=r,Jr=s;break;case 0:case 11:case 14:case 15:if(!Pn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var a=s,u=a.destroy;a=a.tag,u!==void 0&&(a&2||a&4)&&jm(n,t,u),s=s.next}while(s!==r)}ks(e,t,n);break;case 1:if(!Pn&&(Ta(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(c){Jt(n,t,c)}ks(e,t,n);break;case 21:ks(e,t,n);break;case 22:n.mode&1?(Pn=(r=Pn)||n.memoizedState!==null,ks(e,t,n),Pn=r):ks(e,t,n);break;default:ks(e,t,n)}}function $1(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new rR),t.forEach(function(r){var s=dR.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Zr(e,t){var n=t.deletions;if(n!==null)for(var r=0;rs&&(s=u),r&=~a}if(r=s,r=sn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*oR(r/1960))-r,10e?16:e,As===null)var r=!1;else{if(e=As,As=null,Hc=0,We&6)throw Error(ne(331));var s=We;for(We|=4,ge=e.current;ge!==null;){var a=ge,u=a.child;if(ge.flags&16){var c=a.deletions;if(c!==null){for(var p=0;psn()-H0?Ro(e,0):z0|=n),ir(e,t)}function bx(e,t){t===0&&(e.mode&1?(t=zf,zf<<=1,!(zf&130023424)&&(zf=4194304)):t=1);var n=Wn();e=ss(e,t),e!==null&&(Su(e,t,n),ir(e,n))}function hR(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),bx(e,n)}function dR(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ne(314))}r!==null&&r.delete(t),bx(e,n)}var Px;Px=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||nr.current)tr=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return tr=!1,eR(e,t,n);tr=!!(e.flags&131072)}else tr=!1,Vt&&t.flags&1048576&&A_(t,jc,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;pc(e,t),e=t.pendingProps;var s=Ha(t,Dn.current);Na(t,n),s=I0(null,t,r,e,s,n);var a=F0();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,rr(r)?(a=!0,Ac(t)):a=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,D0(t),s.updater=ph,t.stateNode=s,s._reactInternals=t,Tm(t,r,e,n),t=Rm(null,t,r,!0,a,n)):(t.tag=0,Vt&&a&&C0(t),$n(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(pc(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=mR(r),e=Xr(r,e),s){case 0:t=Pm(null,t,r,e,n);break e;case 1:t=j1(null,t,r,e,n);break e;case 11:t=A1(null,t,r,e,n);break e;case 14:t=L1(null,t,r,Xr(r.type,e),n);break e}throw Error(ne(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Xr(r,s),Pm(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Xr(r,s),j1(e,t,r,s,n);case 3:e:{if(dx(t),e===null)throw Error(ne(387));r=t.pendingProps,a=t.memoizedState,s=a.element,I_(e,t),Fc(t,r,null,n);var u=t.memoizedState;if(r=u.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:u.cache,pendingSuspenseBoundaries:u.pendingSuspenseBoundaries,transitions:u.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){s=qa(Error(ne(423)),t),t=N1(e,t,r,n,s);break e}else if(r!==s){s=qa(Error(ne(424)),t),t=N1(e,t,r,n,s);break e}else for(gr=Us(t.stateNode.containerInfo.firstChild),yr=t,Vt=!0,ei=null,n=W_(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ya(),r===s){t=os(e,t,n);break e}$n(e,t,r,n)}t=t.child}return t;case 5:return B_(t),e===null&&Cm(t),r=t.type,s=t.pendingProps,a=e!==null?e.memoizedProps:null,u=s.children,_m(r,s)?u=null:a!==null&&_m(r,a)&&(t.flags|=32),hx(e,t),$n(e,t,u,n),t.child;case 6:return e===null&&Cm(t),null;case 13:return px(e,t,n);case 4:return A0(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ga(t,null,r,n):$n(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Xr(r,s),A1(e,t,r,s,n);case 7:return $n(e,t,t.pendingProps,n),t.child;case 8:return $n(e,t,t.pendingProps.children,n),t.child;case 12:return $n(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,a=t.memoizedProps,u=s.value,kt(Nc,r._currentValue),r._currentValue=u,a!==null)if(ii(a.value,u)){if(a.children===s.children&&!nr.current){t=os(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var c=a.dependencies;if(c!==null){u=a.child;for(var p=c.firstContext;p!==null;){if(p.context===r){if(a.tag===1){p=ts(-1,n&-n),p.tag=2;var v=a.updateQueue;if(v!==null){v=v.shared;var m=v.pending;m===null?p.next=p:(p.next=m.next,m.next=p),v.pending=p}}a.lanes|=n,p=a.alternate,p!==null&&(p.lanes|=n),Om(a.return,n,t),c.lanes|=n;break}p=p.next}}else if(a.tag===10)u=a.type===t.type?null:a.child;else if(a.tag===18){if(u=a.return,u===null)throw Error(ne(341));u.lanes|=n,c=u.alternate,c!==null&&(c.lanes|=n),Om(u,n,t),u=a.sibling}else u=a.child;if(u!==null)u.return=a;else for(u=a;u!==null;){if(u===t){u=null;break}if(a=u.sibling,a!==null){a.return=u.return,u=a;break}u=u.return}a=u}$n(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Na(t,n),s=Wr(s),r=r(s),t.flags|=1,$n(e,t,r,n),t.child;case 14:return r=t.type,s=Xr(r,t.pendingProps),s=Xr(r.type,s),L1(e,t,r,s,n);case 15:return fx(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Xr(r,s),pc(e,t),t.tag=1,rr(r)?(e=!0,Ac(t)):e=!1,Na(t,n),U_(t,r,s),Tm(t,r,s,n),Rm(null,t,r,!0,e,n);case 19:return mx(e,t,n);case 22:return cx(e,t,n)}throw Error(ne(156,t.tag))};function Rx(e,t){return r_(e,t)}function pR(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ur(e,t,n,r){return new pR(e,t,n,r)}function q0(e){return e=e.prototype,!(!e||!e.isReactComponent)}function mR(e){if(typeof e=="function")return q0(e)?1:0;if(e!=null){if(e=e.$$typeof,e===d0)return 11;if(e===p0)return 14}return 2}function zs(e,t){var n=e.alternate;return n===null?(n=Ur(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function vc(e,t,n,r,s,a){var u=2;if(r=e,typeof e=="function")q0(e)&&(u=1);else if(typeof e=="string")u=5;else e:switch(e){case wa:return Do(n.children,s,a,t);case h0:u=8,s|=8;break;case Xp:return e=Ur(12,n,t,s|2),e.elementType=Xp,e.lanes=a,e;case Jp:return e=Ur(13,n,t,s),e.elementType=Jp,e.lanes=a,e;case em:return e=Ur(19,n,t,s),e.elementType=em,e.lanes=a,e;case $w:return yh(n,s,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Fw:u=10;break e;case Uw:u=9;break e;case d0:u=11;break e;case p0:u=14;break e;case Ts:u=16,r=null;break e}throw Error(ne(130,e==null?e:typeof e,""))}return t=Ur(u,n,t,s),t.elementType=e,t.type=r,t.lanes=a,t}function Do(e,t,n,r){return e=Ur(7,e,r,t),e.lanes=n,e}function yh(e,t,n,r){return e=Ur(22,e,r,t),e.elementType=$w,e.lanes=n,e.stateNode={isHidden:!1},e}function Np(e,t,n){return e=Ur(6,e,null,t),e.lanes=n,e}function Ip(e,t,n){return t=Ur(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function gR(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=vp(0),this.expirationTimes=vp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vp(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Q0(e,t,n,r,s,a,u,c,p){return e=new gR(e,t,n,c,p),t===1?(t=1,a===!0&&(t|=8)):t=0,a=Ur(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},D0(a),e}function vR(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(jx)}catch(e){console.error(e)}}jx(),Aw.exports=_r;var SR=Aw.exports;const MR=_u(SR);function zm(e,t){return zm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,s){return r.__proto__=s,r},zm(e,t)}function Ti(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,zm(e,t)}var Nx={exports:{}},kR="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",CR=kR,OR=CR;function Ix(){}function Fx(){}Fx.resetWarningCache=Ix;var ER=function(){function e(r,s,a,u,c,p){if(p!==OR){var v=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw v.name="Invariant Violation",v}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Fx,resetWarningCache:Ix};return n.PropTypes=n,n};Nx.exports=ER();var TR=Nx.exports;const q1=_u(TR);function Bn(){return Bn=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0;m--){var O=r[m];O==="."?Fp(r,m):O===".."?(Fp(r,m),v++):v&&(Fp(r,m),v--)}if(!u)for(;v--;v)r.unshift("..");u&&r[0]!==""&&(!r[0]||!tc(r[0]))&&r.unshift("");var E=r.join("/");return c&&E.substr(-1)!=="/"&&(E+="/"),E}var PR="Invariant failed";function zo(e,t){if(!e)throw new Error(PR)}function Ql(e){return e.charAt(0)==="/"?e:"/"+e}function Q1(e){return e.charAt(0)==="/"?e.substr(1):e}function RR(e,t){return e.toLowerCase().indexOf(t.toLowerCase())===0&&"/?#".indexOf(e.charAt(t.length))!==-1}function Ux(e,t){return RR(e,t)?e.substr(t.length):e}function $x(e){return e.charAt(e.length-1)==="/"?e.slice(0,-1):e}function DR(e){var t=e||"/",n="",r="",s=t.indexOf("#");s!==-1&&(r=t.substr(s),t=t.substr(0,s));var a=t.indexOf("?");return a!==-1&&(n=t.substr(a),t=t.substr(0,a)),{pathname:t,search:n==="?"?"":n,hash:r==="#"?"":r}}function Jn(e){var t=e.pathname,n=e.search,r=e.hash,s=t||"/";return n&&n!=="?"&&(s+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(s+=r.charAt(0)==="#"?r:"#"+r),s}function vr(e,t,n,r){var s;typeof e=="string"?(s=DR(e),s.state=t):(s=Bn({},e),s.pathname===void 0&&(s.pathname=""),s.search?s.search.charAt(0)!=="?"&&(s.search="?"+s.search):s.search="",s.hash?s.hash.charAt(0)!=="#"&&(s.hash="#"+s.hash):s.hash="",t!==void 0&&s.state===void 0&&(s.state=t));try{s.pathname=decodeURI(s.pathname)}catch(a){throw a instanceof URIError?new URIError('Pathname "'+s.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):a}return n&&(s.key=n),r?s.pathname?s.pathname.charAt(0)!=="/"&&(s.pathname=bR(s.pathname,r.pathname)):s.pathname=r.pathname:s.pathname||(s.pathname="/"),s}function J0(){var e=null;function t(u){return e=u,function(){e===u&&(e=null)}}function n(u,c,p,v){if(e!=null){var m=typeof e=="function"?e(u,c):e;typeof m=="string"?typeof p=="function"?p(m,v):v(!0):v(m!==!1)}else v(!0)}var r=[];function s(u){var c=!0;function p(){c&&u.apply(void 0,arguments)}return r.push(p),function(){c=!1,r=r.filter(function(v){return v!==p})}}function a(){for(var u=arguments.length,c=new Array(u),p=0;pS?C.splice(S,C.length-S,P):C.push(P),m({action:fe,location:P,index:S,entries:C})}})}function me(J,le){var fe="REPLACE",P=vr(J,le,O(),V.location);v.confirmTransitionTo(P,fe,n,function(f){f&&(V.entries[V.index]=P,m({action:fe,location:P}))})}function N(J){var le=ew(V.index+J,0,V.entries.length-1),fe="POP",P=V.entries[le];v.confirmTransitionTo(P,fe,n,function(f){f?m({action:fe,location:P,index:le}):m()})}function A(){N(-1)}function I(){N(1)}function H(J){var le=V.index+J;return le>=0&&le<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=u.createElement(n,{is:r.is}):(e=u.createElement(n),n==="select"&&(u=e,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):e=u.createElementNS(e,n),e[Si]=t,e[fu]=r,gx(e,t,!1,!1),t.stateNode=e;e:{switch(u=lm(n,r),n){case"dialog":Rt("cancel",e),Rt("close",e),s=r;break;case"iframe":case"object":case"embed":Rt("load",e),s=r;break;case"video":case"audio":for(s=0;sQa&&(t.flags|=128,r=!0,Rl(a,!1),t.lanes=4194304)}else{if(!r)if(e=Uc(u),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Rl(a,!0),a.tail===null&&a.tailMode==="hidden"&&!u.alternate&&!Gt)return bn(t),null}else 2*sn()-a.renderingStartTime>Qa&&n!==1073741824&&(t.flags|=128,r=!0,Rl(a,!1),t.lanes=4194304);a.isBackwards?(u.sibling=t.child,t.child=u):(n=a.last,n!==null?n.sibling=u:t.child=u,a.last=u)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=sn(),t.sibling=null,n=Qt.current,kt(Qt,r?n&1|2:n&1),t):(bn(t),null);case 22:case 23:return G0(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?dr&1073741824&&(bn(t),t.subtreeFlags&6&&(t.flags|=8192)):bn(t),null;case 24:return null;case 25:return null}throw Error(ne(156,t.tag))}function nR(e,t){switch(O0(t),t.tag){case 1:return rr(t.type)&&Dc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Va(),Dt(nr),Dt(Dn),j0(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return L0(t),null;case 13:if(Dt(Qt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ne(340));Ya()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Dt(Qt),null;case 4:return Va(),null;case 10:return P0(t.type._context),null;case 22:case 23:return G0(),null;case 24:return null;default:return null}}var Xf=!1,Pn=!1,rR=typeof WeakSet=="function"?WeakSet:Set,ge=null;function Ta(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Jt(e,t,r)}else n.current=null}function jm(e,t,n){try{n()}catch(r){Jt(e,t,r)}}var F1=!1;function iR(e,t){if(ym=Tc,e=S_(),k0(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var u=0,c=-1,p=-1,v=0,m=0,O=e,E=null;t:for(;;){for(var F;O!==n||s!==0&&O.nodeType!==3||(c=u+s),O!==a||r!==0&&O.nodeType!==3||(p=u+r),O.nodeType===3&&(u+=O.nodeValue.length),(F=O.firstChild)!==null;)E=O,O=F;for(;;){if(O===e)break t;if(E===n&&++v===s&&(c=u),E===a&&++m===r&&(p=u),(F=O.nextSibling)!==null)break;O=E,E=O.parentNode}O=F}n=c===-1||p===-1?null:{start:c,end:p}}else n=null}n=n||{start:0,end:0}}else n=null;for(wm={focusedElem:e,selectionRange:n},Tc=!1,ge=t;ge!==null;)if(t=ge,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ge=e;else for(;ge!==null;){t=ge;try{var B=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(B!==null){var Q=B.memoizedProps,me=B.memoizedState,N=t.stateNode,A=N.getSnapshotBeforeUpdate(t.elementType===t.type?Q:Xr(t.type,Q),me);N.__reactInternalSnapshotBeforeUpdate=A}break;case 3:var I=t.stateNode.containerInfo;I.nodeType===1?I.textContent="":I.nodeType===9&&I.documentElement&&I.removeChild(I.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ne(163))}}catch(H){Jt(t,t.return,H)}if(e=t.sibling,e!==null){e.return=t.return,ge=e;break}ge=t.return}return B=F1,F1=!1,B}function Gl(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var a=s.destroy;s.destroy=void 0,a!==void 0&&jm(t,n,a)}s=s.next}while(s!==r)}}function gh(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Nm(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function wx(e){var t=e.alternate;t!==null&&(e.alternate=null,wx(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Si],delete t[fu],delete t[Sm],delete t[$P],delete t[WP])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function _x(e){return e.tag===5||e.tag===3||e.tag===4}function U1(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||_x(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Im(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Rc));else if(r!==4&&(e=e.child,e!==null))for(Im(e,t,n),e=e.sibling;e!==null;)Im(e,t,n),e=e.sibling}function Fm(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Fm(e,t,n),e=e.sibling;e!==null;)Fm(e,t,n),e=e.sibling}var Sn=null,Jr=!1;function Ms(e,t,n){for(n=n.child;n!==null;)xx(e,t,n),n=n.sibling}function xx(e,t,n){if(Ci&&typeof Ci.onCommitFiberUnmount=="function")try{Ci.onCommitFiberUnmount(lh,n)}catch{}switch(n.tag){case 5:Pn||Ta(n,t);case 6:var r=Sn,s=Jr;Sn=null,Ms(e,t,n),Sn=r,Jr=s,Sn!==null&&(Jr?(e=Sn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Sn.removeChild(n.stateNode));break;case 18:Sn!==null&&(Jr?(e=Sn,n=n.stateNode,e.nodeType===8?Tp(e.parentNode,n):e.nodeType===1&&Tp(e,n),su(e)):Tp(Sn,n.stateNode));break;case 4:r=Sn,s=Jr,Sn=n.stateNode.containerInfo,Jr=!0,Ms(e,t,n),Sn=r,Jr=s;break;case 0:case 11:case 14:case 15:if(!Pn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var a=s,u=a.destroy;a=a.tag,u!==void 0&&(a&2||a&4)&&jm(n,t,u),s=s.next}while(s!==r)}Ms(e,t,n);break;case 1:if(!Pn&&(Ta(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(c){Jt(n,t,c)}Ms(e,t,n);break;case 21:Ms(e,t,n);break;case 22:n.mode&1?(Pn=(r=Pn)||n.memoizedState!==null,Ms(e,t,n),Pn=r):Ms(e,t,n);break;default:Ms(e,t,n)}}function $1(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new rR),t.forEach(function(r){var s=dR.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Zr(e,t){var n=t.deletions;if(n!==null)for(var r=0;rs&&(s=u),r&=~a}if(r=s,r=sn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*oR(r/1960))-r,10e?16:e,As===null)var r=!1;else{if(e=As,As=null,Hc=0,We&6)throw Error(ne(331));var s=We;for(We|=4,ge=e.current;ge!==null;){var a=ge,u=a.child;if(ge.flags&16){var c=a.deletions;if(c!==null){for(var p=0;psn()-H0?Ro(e,0):z0|=n),ir(e,t)}function bx(e,t){t===0&&(e.mode&1?(t=zf,zf<<=1,!(zf&130023424)&&(zf=4194304)):t=1);var n=Wn();e=is(e,t),e!==null&&(Su(e,t,n),ir(e,n))}function hR(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),bx(e,n)}function dR(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ne(314))}r!==null&&r.delete(t),bx(e,n)}var Px;Px=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||nr.current)tr=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return tr=!1,eR(e,t,n);tr=!!(e.flags&131072)}else tr=!1,Gt&&t.flags&1048576&&A_(t,jc,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;pc(e,t),e=t.pendingProps;var s=Ha(t,Dn.current);Na(t,n),s=I0(null,t,r,e,s,n);var a=F0();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,rr(r)?(a=!0,Ac(t)):a=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,D0(t),s.updater=ph,t.stateNode=s,s._reactInternals=t,Tm(t,r,e,n),t=Rm(null,t,r,!0,a,n)):(t.tag=0,Gt&&a&&C0(t),$n(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(pc(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=mR(r),e=Xr(r,e),s){case 0:t=Pm(null,t,r,e,n);break e;case 1:t=j1(null,t,r,e,n);break e;case 11:t=A1(null,t,r,e,n);break e;case 14:t=L1(null,t,r,Xr(r.type,e),n);break e}throw Error(ne(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Xr(r,s),Pm(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Xr(r,s),j1(e,t,r,s,n);case 3:e:{if(dx(t),e===null)throw Error(ne(387));r=t.pendingProps,a=t.memoizedState,s=a.element,I_(e,t),Fc(t,r,null,n);var u=t.memoizedState;if(r=u.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:u.cache,pendingSuspenseBoundaries:u.pendingSuspenseBoundaries,transitions:u.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){s=qa(Error(ne(423)),t),t=N1(e,t,r,n,s);break e}else if(r!==s){s=qa(Error(ne(424)),t),t=N1(e,t,r,n,s);break e}else for(gr=Us(t.stateNode.containerInfo.firstChild),yr=t,Gt=!0,ei=null,n=W_(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ya(),r===s){t=ss(e,t,n);break e}$n(e,t,r,n)}t=t.child}return t;case 5:return B_(t),e===null&&Cm(t),r=t.type,s=t.pendingProps,a=e!==null?e.memoizedProps:null,u=s.children,_m(r,s)?u=null:a!==null&&_m(r,a)&&(t.flags|=32),hx(e,t),$n(e,t,u,n),t.child;case 6:return e===null&&Cm(t),null;case 13:return px(e,t,n);case 4:return A0(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ga(t,null,r,n):$n(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Xr(r,s),A1(e,t,r,s,n);case 7:return $n(e,t,t.pendingProps,n),t.child;case 8:return $n(e,t,t.pendingProps.children,n),t.child;case 12:return $n(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,a=t.memoizedProps,u=s.value,kt(Nc,r._currentValue),r._currentValue=u,a!==null)if(ii(a.value,u)){if(a.children===s.children&&!nr.current){t=ss(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var c=a.dependencies;if(c!==null){u=a.child;for(var p=c.firstContext;p!==null;){if(p.context===r){if(a.tag===1){p=es(-1,n&-n),p.tag=2;var v=a.updateQueue;if(v!==null){v=v.shared;var m=v.pending;m===null?p.next=p:(p.next=m.next,m.next=p),v.pending=p}}a.lanes|=n,p=a.alternate,p!==null&&(p.lanes|=n),Om(a.return,n,t),c.lanes|=n;break}p=p.next}}else if(a.tag===10)u=a.type===t.type?null:a.child;else if(a.tag===18){if(u=a.return,u===null)throw Error(ne(341));u.lanes|=n,c=u.alternate,c!==null&&(c.lanes|=n),Om(u,n,t),u=a.sibling}else u=a.child;if(u!==null)u.return=a;else for(u=a;u!==null;){if(u===t){u=null;break}if(a=u.sibling,a!==null){a.return=u.return,u=a;break}u=u.return}a=u}$n(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Na(t,n),s=Wr(s),r=r(s),t.flags|=1,$n(e,t,r,n),t.child;case 14:return r=t.type,s=Xr(r,t.pendingProps),s=Xr(r.type,s),L1(e,t,r,s,n);case 15:return fx(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Xr(r,s),pc(e,t),t.tag=1,rr(r)?(e=!0,Ac(t)):e=!1,Na(t,n),U_(t,r,s),Tm(t,r,s,n),Rm(null,t,r,!0,e,n);case 19:return mx(e,t,n);case 22:return cx(e,t,n)}throw Error(ne(156,t.tag))};function Rx(e,t){return r_(e,t)}function pR(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ur(e,t,n,r){return new pR(e,t,n,r)}function q0(e){return e=e.prototype,!(!e||!e.isReactComponent)}function mR(e){if(typeof e=="function")return q0(e)?1:0;if(e!=null){if(e=e.$$typeof,e===d0)return 11;if(e===p0)return 14}return 2}function zs(e,t){var n=e.alternate;return n===null?(n=Ur(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function vc(e,t,n,r,s,a){var u=2;if(r=e,typeof e=="function")q0(e)&&(u=1);else if(typeof e=="string")u=5;else e:switch(e){case wa:return Do(n.children,s,a,t);case h0:u=8,s|=8;break;case Xp:return e=Ur(12,n,t,s|2),e.elementType=Xp,e.lanes=a,e;case Jp:return e=Ur(13,n,t,s),e.elementType=Jp,e.lanes=a,e;case em:return e=Ur(19,n,t,s),e.elementType=em,e.lanes=a,e;case $w:return yh(n,s,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Fw:u=10;break e;case Uw:u=9;break e;case d0:u=11;break e;case p0:u=14;break e;case Es:u=16,r=null;break e}throw Error(ne(130,e==null?e:typeof e,""))}return t=Ur(u,n,t,s),t.elementType=e,t.type=r,t.lanes=a,t}function Do(e,t,n,r){return e=Ur(7,e,r,t),e.lanes=n,e}function yh(e,t,n,r){return e=Ur(22,e,r,t),e.elementType=$w,e.lanes=n,e.stateNode={isHidden:!1},e}function Np(e,t,n){return e=Ur(6,e,null,t),e.lanes=n,e}function Ip(e,t,n){return t=Ur(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function gR(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=vp(0),this.expirationTimes=vp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vp(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Q0(e,t,n,r,s,a,u,c,p){return e=new gR(e,t,n,c,p),t===1?(t=1,a===!0&&(t|=8)):t=0,a=Ur(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},D0(a),e}function vR(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(jx)}catch(e){console.error(e)}}jx(),Aw.exports=_r;var SR=Aw.exports;const MR=_u(SR);function zm(e,t){return zm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,s){return r.__proto__=s,r},zm(e,t)}function Ti(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,zm(e,t)}var Nx={exports:{}},kR="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",CR=kR,OR=CR;function Ix(){}function Fx(){}Fx.resetWarningCache=Ix;var ER=function(){function e(r,s,a,u,c,p){if(p!==OR){var v=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw v.name="Invariant Violation",v}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Fx,resetWarningCache:Ix};return n.PropTypes=n,n};Nx.exports=ER();var TR=Nx.exports;const q1=_u(TR);function Bn(){return Bn=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0;m--){var O=r[m];O==="."?Fp(r,m):O===".."?(Fp(r,m),v++):v&&(Fp(r,m),v--)}if(!u)for(;v--;v)r.unshift("..");u&&r[0]!==""&&(!r[0]||!tc(r[0]))&&r.unshift("");var E=r.join("/");return c&&E.substr(-1)!=="/"&&(E+="/"),E}var PR="Invariant failed";function zo(e,t){if(!e)throw new Error(PR)}function Ql(e){return e.charAt(0)==="/"?e:"/"+e}function Q1(e){return e.charAt(0)==="/"?e.substr(1):e}function RR(e,t){return e.toLowerCase().indexOf(t.toLowerCase())===0&&"/?#".indexOf(e.charAt(t.length))!==-1}function Ux(e,t){return RR(e,t)?e.substr(t.length):e}function $x(e){return e.charAt(e.length-1)==="/"?e.slice(0,-1):e}function DR(e){var t=e||"/",n="",r="",s=t.indexOf("#");s!==-1&&(r=t.substr(s),t=t.substr(0,s));var a=t.indexOf("?");return a!==-1&&(n=t.substr(a),t=t.substr(0,a)),{pathname:t,search:n==="?"?"":n,hash:r==="#"?"":r}}function Jn(e){var t=e.pathname,n=e.search,r=e.hash,s=t||"/";return n&&n!=="?"&&(s+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(s+=r.charAt(0)==="#"?r:"#"+r),s}function vr(e,t,n,r){var s;typeof e=="string"?(s=DR(e),s.state=t):(s=Bn({},e),s.pathname===void 0&&(s.pathname=""),s.search?s.search.charAt(0)!=="?"&&(s.search="?"+s.search):s.search="",s.hash?s.hash.charAt(0)!=="#"&&(s.hash="#"+s.hash):s.hash="",t!==void 0&&s.state===void 0&&(s.state=t));try{s.pathname=decodeURI(s.pathname)}catch(a){throw a instanceof URIError?new URIError('Pathname "'+s.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):a}return n&&(s.key=n),r?s.pathname?s.pathname.charAt(0)!=="/"&&(s.pathname=bR(s.pathname,r.pathname)):s.pathname=r.pathname:s.pathname||(s.pathname="/"),s}function J0(){var e=null;function t(u){return e=u,function(){e===u&&(e=null)}}function n(u,c,p,v){if(e!=null){var m=typeof e=="function"?e(u,c):e;typeof m=="string"?typeof p=="function"?p(m,v):v(!0):v(m!==!1)}else v(!0)}var r=[];function s(u){var c=!0;function p(){c&&u.apply(void 0,arguments)}return r.push(p),function(){c=!1,r=r.filter(function(v){return v!==p})}}function a(){for(var u=arguments.length,c=new Array(u),p=0;pS?C.splice(S,C.length-S,P):C.push(P),m({action:fe,location:P,index:S,entries:C})}})}function me(J,le){var fe="REPLACE",P=vr(J,le,O(),K.location);v.confirmTransitionTo(P,fe,n,function(f){f&&(K.entries[K.index]=P,m({action:fe,location:P}))})}function N(J){var le=ew(K.index+J,0,K.entries.length-1),fe="POP",P=K.entries[le];v.confirmTransitionTo(P,fe,n,function(f){f?m({action:fe,location:P,index:le}):m()})}function A(){N(-1)}function I(){N(1)}function H(J){var le=K.index+J;return le>=0&&le=0)&&(n[s]=e[s]);return n}var Qx=f3,c3={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},h3={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Kx={};Kx[Qx.ForwardRef]=c3;Kx[Qx.Memo]=h3;var Zx=function(t){var n=VR();return n.displayName=t,n},d3=Zx("Router-History"),Ka=Zx("Router"),Lh=function(e){Ti(t,e),t.computeRootMatch=function(s){return{path:"/",url:"/",params:{},isExact:s==="/"}};function t(r){var s;return s=e.call(this,r)||this,s.state={location:r.history.location},s._isMounted=!1,s._pendingLocation=null,r.staticContext||(s.unlisten=r.history.listen(function(a){s._pendingLocation=a})),s}var n=t.prototype;return n.componentDidMount=function(){var s=this;this._isMounted=!0,this.unlisten&&this.unlisten(),this.props.staticContext||(this.unlisten=this.props.history.listen(function(a){s._isMounted&&s.setState({location:a})})),this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&(this.unlisten(),this._isMounted=!1,this._pendingLocation=null)},n.render=function(){return Qe.createElement(Ka.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},Qe.createElement(d3.Provider,{children:this.props.children||null,value:this.props.history}))},t}(Qe.Component);Qe.Component;Qe.Component;var nw={},p3=1e4,rw=0;function m3(e,t){var n=""+t.end+t.strict+t.sensitive,r=nw[n]||(nw[n]={});if(r[e])return r[e];var s=[],a=i3(e,s,t),u={regexp:a,keys:s};return rw"u"&&(Za=lg);function x3(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var S3=Za(function(e,t){var n=e.innerRef,r=e.navigate,s=e.onClick,a=Ah(e,["innerRef","navigate","onClick"]),u=a.target,c=Bn({},a,{onClick:function(v){try{s&&s(v)}catch(m){throw v.preventDefault(),m}!v.defaultPrevented&&v.button===0&&(!u||u==="_self")&&!x3(v)&&(v.preventDefault(),r())}});return lg!==Za?c.ref=t||n:c.ref=n,Qe.createElement("a",c)}),ug=Za(function(e,t){var n=e.component,r=n===void 0?S3:n,s=e.replace,a=e.to,u=e.innerRef,c=Ah(e,["component","replace","to","innerRef"]);return Qe.createElement(Ka.Consumer,null,function(p){p||zo(!1);var v=p.history,m=Ym(Hm(a,p.location),p.location),O=m?v.createHref(m):"",E=Bn({},c,{href:O,navigate:function(){var B=Hm(a,p.location),K=Jn(p.location)===Jn(Ym(B)),me=s||K?v.replace:v.push;me(B)}});return lg!==Za?E.ref=t||u:E.innerRef=u,Qe.createElement(r,E)})}),Xx=function(t){return t},qc=Qe.forwardRef;typeof qc>"u"&&(qc=Xx);function M3(){for(var e=arguments.length,t=new Array(e),n=0;n=0)&&(n[s]=e[s]);return n}var Qx=f3,c3={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},h3={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Kx={};Kx[Qx.ForwardRef]=c3;Kx[Qx.Memo]=h3;var Zx=function(t){var n=VR();return n.displayName=t,n},d3=Zx("Router-History"),Ka=Zx("Router"),Lh=function(e){Ti(t,e),t.computeRootMatch=function(s){return{path:"/",url:"/",params:{},isExact:s==="/"}};function t(r){var s;return s=e.call(this,r)||this,s.state={location:r.history.location},s._isMounted=!1,s._pendingLocation=null,r.staticContext||(s.unlisten=r.history.listen(function(a){s._pendingLocation=a})),s}var n=t.prototype;return n.componentDidMount=function(){var s=this;this._isMounted=!0,this.unlisten&&this.unlisten(),this.props.staticContext||(this.unlisten=this.props.history.listen(function(a){s._isMounted&&s.setState({location:a})})),this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&(this.unlisten(),this._isMounted=!1,this._pendingLocation=null)},n.render=function(){return Qe.createElement(Ka.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},Qe.createElement(d3.Provider,{children:this.props.children||null,value:this.props.history}))},t}(Qe.Component);Qe.Component;Qe.Component;var nw={},p3=1e4,rw=0;function m3(e,t){var n=""+t.end+t.strict+t.sensitive,r=nw[n]||(nw[n]={});if(r[e])return r[e];var s=[],a=i3(e,s,t),u={regexp:a,keys:s};return rw"u"&&(Za=lg);function x3(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var S3=Za(function(e,t){var n=e.innerRef,r=e.navigate,s=e.onClick,a=Ah(e,["innerRef","navigate","onClick"]),u=a.target,c=Bn({},a,{onClick:function(v){try{s&&s(v)}catch(m){throw v.preventDefault(),m}!v.defaultPrevented&&v.button===0&&(!u||u==="_self")&&!x3(v)&&(v.preventDefault(),r())}});return lg!==Za?c.ref=t||n:c.ref=n,Qe.createElement("a",c)}),ug=Za(function(e,t){var n=e.component,r=n===void 0?S3:n,s=e.replace,a=e.to,u=e.innerRef,c=Ah(e,["component","replace","to","innerRef"]);return Qe.createElement(Ka.Consumer,null,function(p){p||zo(!1);var v=p.history,m=Ym(Hm(a,p.location),p.location),O=m?v.createHref(m):"",E=Bn({},c,{href:O,navigate:function(){var B=Hm(a,p.location),Q=Jn(p.location)===Jn(Ym(B)),me=s||Q?v.replace:v.push;me(B)}});return lg!==Za?E.ref=t||u:E.innerRef=u,Qe.createElement(r,E)})}),Xx=function(t){return t},qc=Qe.forwardRef;typeof qc>"u"&&(qc=Xx);function M3(){for(var e=arguments.length,t=new Array(e),n=0;n * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */Qc.exports;(function(e,t){(function(){var n,r="4.17.21",s=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",c="Invalid `variable` option passed into `_.template`",p="__lodash_hash_undefined__",v=500,m="__lodash_placeholder__",O=1,E=2,F=4,B=1,K=2,me=1,N=2,A=4,I=8,H=16,X=32,te=64,V=128,J=256,le=512,fe=30,P="...",f=800,g=16,S=1,C=2,b=3,L=1/0,R=9007199254740991,_=17976931348623157e292,h=NaN,M=4294967295,G=M-1,se=M>>>1,ae=[["ary",V],["bind",me],["bindKey",N],["curry",I],["curryRight",H],["flip",le],["partial",X],["partialRight",te],["rearg",J]],re="[object Arguments]",ye="[object Array]",Me="[object AsyncFunction]",Be="[object Boolean]",Re="[object Date]",Xe="[object DOMException]",ui="[object Error]",Je="[object Function]",vt="[object GeneratorFunction]",_n="[object Map]",rt="[object Number]",jt="[object Null]",Gn="[object Object]",Ct="[object Promise]",Nt="[object Proxy]",fi="[object RegExp]",Ue="[object Set]",it="[object String]",Di="[object Symbol]",It="[object Undefined]",st="[object WeakMap]",Yo="[object WeakSet]",Ye="[object ArrayBuffer]",Ge="[object DataView]",Ai="[object Float32Array]",Ne="[object Float64Array]",ut="[object Int8Array]",Li="[object Int16Array]",yt="[object Int32Array]",ft="[object Uint8Array]",Yr="[object Uint8ClampedArray]",ct="[object Uint16Array]",ht="[object Uint32Array]",Go=/\b__p \+= '';/g,Ke=/\b(__p \+=) '' \+/g,Ot=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ks=/&(?:amp|lt|gt|quot|#39);/g,Et=/[&<>"']/g,wt=RegExp(Ks.source),ci=RegExp(Et.source),_t=/<%-([\s\S]+?)%>/g,xt=/<%([\s\S]+?)%>/g,ji=/<%=([\s\S]+?)%>/g,ot=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ft=/^\w*$/,Vo=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,St=/[\\^$.*+?()[\]{}|]/g,Ut=RegExp(St.source),cs=/^\s+/,Tt=/\s/,Mt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Cr=/\{\n\/\* \[wrapped with (.+)\] \*/,$t=/,? & /,Wt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,qo=/[()=,{}\[\]\/\s]/,Bt=/\\(\\)?/g,zt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Cn=/\w*$/,Zs=/^[-+]0x[0-9a-f]+$/i,Xs=/^0b[01]+$/i,Js=/^\[object .+?Constructor\]$/,eo=/^0o[0-7]+$/i,to=/^(?:0|[1-9]\d*)$/,or=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,hi=/($^)/,no=/['\n\r\u2028\u2029\\]/g,di="\\ud800-\\udfff",ro="\\u0300-\\u036f",io="\\ufe20-\\ufe2f",pi="\\u20d0-\\u20ff",hs=ro+io+pi,ds="\\u2700-\\u27bf",jn="a-z\\xdf-\\xf6\\xf8-\\xff",so="\\xac\\xb1\\xd7\\xf7",oo="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ao="\\u2000-\\u206f",nd=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ju="A-Z\\xc0-\\xd6\\xd8-\\xde",Nu="\\ufe0e\\ufe0f",lo=so+oo+ao+nd,ol="['’]",uo="["+di+"]",al="["+lo+"]",fo="["+hs+"]",Iu="\\d+",rd="["+ds+"]",Fu="["+jn+"]",Uu="[^"+di+lo+Iu+ds+jn+ju+"]",Qo="\\ud83c[\\udffb-\\udfff]",id="(?:"+fo+"|"+Qo+")",$u="[^"+di+"]",Ko="(?:\\ud83c[\\udde6-\\uddff]){2}",ps="[\\ud800-\\udbff][\\udc00-\\udfff]",ar="["+ju+"]",Wu="\\u200d",Bu="(?:"+Fu+"|"+Uu+")",mi="(?:"+ar+"|"+Uu+")",zu="(?:"+ol+"(?:d|ll|m|re|s|t|ve))?",Hu="(?:"+ol+"(?:D|LL|M|RE|S|T|VE))?",Yu=id+"?",Gu="["+Nu+"]?",sd="(?:"+Wu+"(?:"+[$u,Ko,ps].join("|")+")"+Gu+Yu+")*",Ni="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Vu="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",qu=Gu+Yu+sd,Zo="(?:"+[rd,Ko,ps].join("|")+")"+qu,od="(?:"+[$u+fo+"?",fo,Ko,ps,uo].join("|")+")",ll=RegExp(ol,"g"),ad=RegExp(fo,"g"),Xo=RegExp(Qo+"(?="+Qo+")|"+od+qu,"g"),Qu=RegExp([ar+"?"+Fu+"+"+zu+"(?="+[al,ar,"$"].join("|")+")",mi+"+"+Hu+"(?="+[al,ar+Bu,"$"].join("|")+")",ar+"?"+Bu+"+"+zu,ar+"+"+Hu,Vu,Ni,Iu,Zo].join("|"),"g"),Ku=RegExp("["+Wu+di+hs+Nu+"]"),co=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Zu=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ld=-1,dt={};dt[Ai]=dt[Ne]=dt[ut]=dt[Li]=dt[yt]=dt[ft]=dt[Yr]=dt[ct]=dt[ht]=!0,dt[re]=dt[ye]=dt[Ye]=dt[Be]=dt[Ge]=dt[Re]=dt[ui]=dt[Je]=dt[_n]=dt[rt]=dt[Gn]=dt[fi]=dt[Ue]=dt[it]=dt[st]=!1;var at={};at[re]=at[ye]=at[Ye]=at[Ge]=at[Be]=at[Re]=at[Ai]=at[Ne]=at[ut]=at[Li]=at[yt]=at[_n]=at[rt]=at[Gn]=at[fi]=at[Ue]=at[it]=at[Di]=at[ft]=at[Yr]=at[ct]=at[ht]=!0,at[ui]=at[Je]=at[st]=!1;var T={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},$={"&":"&","<":"<",">":">",'"':""","'":"'"},Z={"&":"&","<":"<",">":">",""":'"',"'":"'"},he={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},pt=parseFloat,Ce=parseInt,bt=typeof Fr=="object"&&Fr&&Fr.Object===Object&&Fr,on=typeof self=="object"&&self&&self.Object===Object&&self,Ie=bt||on||Function("return this")(),mt=t&&!t.nodeType&&t,en=mt&&!0&&e&&!e.nodeType&&e,Vn=en&&en.exports===mt,an=Vn&&bt.process,Pt=function(){try{var U=en&&en.require&&en.require("util").types;return U||an&&an.binding&&an.binding("util")}catch{}}(),Nn=Pt&&Pt.isArrayBuffer,Gr=Pt&&Pt.isDate,Or=Pt&&Pt.isMap,gi=Pt&&Pt.isRegExp,ul=Pt&&Pt.isSet,ho=Pt&&Pt.isTypedArray;function mn(U,Y,z){switch(z.length){case 0:return U.call(Y);case 1:return U.call(Y,z[0]);case 2:return U.call(Y,z[0],z[1]);case 3:return U.call(Y,z[0],z[1],z[2])}return U.apply(Y,z)}function yM(U,Y,z,de){for(var ke=-1,Ve=U==null?0:U.length;++ke-1}function ud(U,Y,z){for(var de=-1,ke=U==null?0:U.length;++de-1;);return z}function Vg(U,Y){for(var z=U.length;z--&&Jo(Y,U[z],0)>-1;);return z}function EM(U,Y){for(var z=U.length,de=0;z--;)U[z]===Y&&++de;return de}var TM=dd(T),bM=dd($);function PM(U){return"\\"+he[U]}function RM(U,Y){return U==null?n:U[Y]}function ea(U){return Ku.test(U)}function DM(U){return co.test(U)}function AM(U){for(var Y,z=[];!(Y=U.next()).done;)z.push(Y.value);return z}function vd(U){var Y=-1,z=Array(U.size);return U.forEach(function(de,ke){z[++Y]=[ke,de]}),z}function qg(U,Y){return function(z){return U(Y(z))}}function vs(U,Y){for(var z=-1,de=U.length,ke=0,Ve=[];++z-1}function _2(i,o){var l=this.__data__,d=gf(l,i);return d<0?(++this.size,l.push([i,o])):l[d][1]=o,this}Ii.prototype.clear=g2,Ii.prototype.delete=v2,Ii.prototype.get=y2,Ii.prototype.has=w2,Ii.prototype.set=_2;function Fi(i){var o=-1,l=i==null?0:i.length;for(this.clear();++o=o?i:o)),i}function Pr(i,o,l,d,w,k){var D,j=o&O,W=o&E,q=o&F;if(l&&(D=w?l(i,d,w,k):l(i)),D!==n)return D;if(!qt(i))return i;var Q=Oe(i);if(Q){if(D=kk(i),!j)return qn(i,D)}else{var ee=En(i),ue=ee==Je||ee==vt;if(Ms(i))return Pv(i,j);if(ee==Gn||ee==re||ue&&!w){if(D=W||ue?{}:Qv(i),!j)return W?dk(i,N2(D,i)):hk(i,ov(D,i))}else{if(!at[ee])return w?i:{};D=Ck(i,ee,j)}}k||(k=new qr);var ve=k.get(i);if(ve)return ve;k.set(i,D),ky(i)?i.forEach(function(Se){D.add(Pr(Se,o,l,Se,i,k))}):Sy(i)&&i.forEach(function(Se,Ae){D.set(Ae,Pr(Se,o,l,Ae,i,k))});var xe=q?W?zd:Bd:W?Kn:gn,be=Q?n:xe(i);return Er(be||i,function(Se,Ae){be&&(Ae=Se,Se=i[Ae]),gl(D,Ae,Pr(Se,o,l,Ae,i,k))}),D}function I2(i){var o=gn(i);return function(l){return av(l,i,o)}}function av(i,o,l){var d=l.length;if(i==null)return!d;for(i=gt(i);d--;){var w=l[d],k=o[w],D=i[w];if(D===n&&!(w in i)||!k(D))return!1}return!0}function lv(i,o,l){if(typeof i!="function")throw new Tr(u);return Ml(function(){i.apply(n,l)},o)}function vl(i,o,l,d){var w=-1,k=Xu,D=!0,j=i.length,W=[],q=o.length;if(!j)return W;l&&(o=Ht(o,lr(l))),d?(k=ud,D=!1):o.length>=s&&(k=fl,D=!1,o=new go(o));e:for(;++ww?0:w+l),d=d===n||d>w?w:Ee(d),d<0&&(d+=w),d=l>d?0:Oy(d);l0&&l(j)?o>1?xn(j,o-1,l,d,w):gs(w,j):d||(w[w.length]=j)}return w}var kd=Nv(),cv=Nv(!0);function vi(i,o){return i&&kd(i,o,gn)}function Cd(i,o){return i&&cv(i,o,gn)}function yf(i,o){return ms(o,function(l){return zi(i[l])})}function yo(i,o){o=xs(o,i);for(var l=0,d=o.length;i!=null&&lo}function $2(i,o){return i!=null&&et.call(i,o)}function W2(i,o){return i!=null&&o in gt(i)}function B2(i,o,l){return i>=On(o,l)&&i=120&&Q.length>=120)?new go(D&&Q):n}Q=i[0];var ee=-1,ue=j[0];e:for(;++ee-1;)j!==i&&uf.call(j,W,1),uf.call(i,W,1);return i}function Sv(i,o){for(var l=i?o.length:0,d=l-1;l--;){var w=o[l];if(l==d||w!==k){var k=w;Bi(w)?uf.call(i,w,1):jd(i,w)}}return i}function Dd(i,o){return i+hf(nv()*(o-i+1))}function tk(i,o,l,d){for(var w=-1,k=cn(cf((o-i)/(l||1)),0),D=z(k);k--;)D[d?k:++w]=i,i+=l;return D}function Ad(i,o){var l="";if(!i||o<1||o>R)return l;do o%2&&(l+=i),o=hf(o/2),o&&(i+=i);while(o);return l}function Pe(i,o){return Kd(Xv(i,o,Zn),i+"")}function nk(i){return sv(ca(i))}function rk(i,o){var l=ca(i);return bf(l,vo(o,0,l.length))}function _l(i,o,l,d){if(!qt(i))return i;o=xs(o,i);for(var w=-1,k=o.length,D=k-1,j=i;j!=null&&++ww?0:w+o),l=l>w?w:l,l<0&&(l+=w),w=o>l?0:l-o>>>0,o>>>=0;for(var k=z(w);++d>>1,D=i[k];D!==null&&!fr(D)&&(l?D<=o:D=s){var q=o?null:vk(i);if(q)return ef(q);D=!1,w=fl,W=new go}else W=o?[]:j;e:for(;++d=d?i:Rr(i,o,l)}var bv=qM||function(i){return Ie.clearTimeout(i)};function Pv(i,o){if(o)return i.slice();var l=i.length,d=Zg?Zg(l):new i.constructor(l);return i.copy(d),d}function Ud(i){var o=new i.constructor(i.byteLength);return new af(o).set(new af(i)),o}function lk(i,o){var l=o?Ud(i.buffer):i.buffer;return new i.constructor(l,i.byteOffset,i.byteLength)}function uk(i){var o=new i.constructor(i.source,Cn.exec(i));return o.lastIndex=i.lastIndex,o}function fk(i){return ml?gt(ml.call(i)):{}}function Rv(i,o){var l=o?Ud(i.buffer):i.buffer;return new i.constructor(l,i.byteOffset,i.length)}function Dv(i,o){if(i!==o){var l=i!==n,d=i===null,w=i===i,k=fr(i),D=o!==n,j=o===null,W=o===o,q=fr(o);if(!j&&!q&&!k&&i>o||k&&D&&W&&!j&&!q||d&&D&&W||!l&&W||!w)return 1;if(!d&&!k&&!q&&i=j)return W;var q=l[d];return W*(q=="desc"?-1:1)}}return i.index-o.index}function Av(i,o,l,d){for(var w=-1,k=i.length,D=l.length,j=-1,W=o.length,q=cn(k-D,0),Q=z(W+q),ee=!d;++j1?l[w-1]:n,D=w>2?l[2]:n;for(k=i.length>3&&typeof k=="function"?(w--,k):n,D&&Fn(l[0],l[1],D)&&(k=w<3?n:k,w=1),o=gt(o);++d-1?w[k?o[D]:D]:n}}function Uv(i){return Wi(function(o){var l=o.length,d=l,w=br.prototype.thru;for(i&&o.reverse();d--;){var k=o[d];if(typeof k!="function")throw new Tr(u);if(w&&!D&&Ef(k)=="wrapper")var D=new br([],!0)}for(d=D?d:l;++d1&&Fe.reverse(),Q&&Wj))return!1;var q=k.get(i),Q=k.get(o);if(q&&Q)return q==o&&Q==i;var ee=-1,ue=!0,ve=l&K?new go:n;for(k.set(i,o),k.set(o,i);++ee1?"& ":"")+o[d],o=o.join(l>2?", ":" "),i.replace(Mt,`{ + */Qc.exports;(function(e,t){(function(){var n,r="4.17.21",s=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",c="Invalid `variable` option passed into `_.template`",p="__lodash_hash_undefined__",v=500,m="__lodash_placeholder__",O=1,E=2,F=4,B=1,Q=2,me=1,N=2,A=4,I=8,H=16,X=32,te=64,K=128,J=256,le=512,fe=30,P="...",f=800,g=16,S=1,C=2,b=3,L=1/0,R=9007199254740991,_=17976931348623157e292,h=NaN,M=4294967295,G=M-1,se=M>>>1,ae=[["ary",K],["bind",me],["bindKey",N],["curry",I],["curryRight",H],["flip",le],["partial",X],["partialRight",te],["rearg",J]],re="[object Arguments]",ye="[object Array]",Me="[object AsyncFunction]",Be="[object Boolean]",Re="[object Date]",Xe="[object DOMException]",ui="[object Error]",Je="[object Function]",vt="[object GeneratorFunction]",_n="[object Map]",rt="[object Number]",jt="[object Null]",Gn="[object Object]",Ct="[object Promise]",Nt="[object Proxy]",fi="[object RegExp]",Ue="[object Set]",it="[object String]",Di="[object Symbol]",It="[object Undefined]",st="[object WeakMap]",Yo="[object WeakSet]",Ye="[object ArrayBuffer]",Ge="[object DataView]",Ai="[object Float32Array]",Ne="[object Float64Array]",ut="[object Int8Array]",Li="[object Int16Array]",yt="[object Int32Array]",ft="[object Uint8Array]",Yr="[object Uint8ClampedArray]",ct="[object Uint16Array]",ht="[object Uint32Array]",Go=/\b__p \+= '';/g,Ke=/\b(__p \+=) '' \+/g,Ot=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ks=/&(?:amp|lt|gt|quot|#39);/g,Et=/[&<>"']/g,wt=RegExp(Ks.source),ci=RegExp(Et.source),_t=/<%-([\s\S]+?)%>/g,xt=/<%([\s\S]+?)%>/g,ji=/<%=([\s\S]+?)%>/g,ot=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ft=/^\w*$/,Vo=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,St=/[\\^$.*+?()[\]{}|]/g,Ut=RegExp(St.source),fs=/^\s+/,Tt=/\s/,Mt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Cr=/\{\n\/\* \[wrapped with (.+)\] \*/,$t=/,? & /,Wt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,qo=/[()=,{}\[\]\/\s]/,Bt=/\\(\\)?/g,zt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Cn=/\w*$/,Zs=/^[-+]0x[0-9a-f]+$/i,Xs=/^0b[01]+$/i,Js=/^\[object .+?Constructor\]$/,eo=/^0o[0-7]+$/i,to=/^(?:0|[1-9]\d*)$/,or=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,hi=/($^)/,no=/['\n\r\u2028\u2029\\]/g,di="\\ud800-\\udfff",ro="\\u0300-\\u036f",io="\\ufe20-\\ufe2f",pi="\\u20d0-\\u20ff",cs=ro+io+pi,hs="\\u2700-\\u27bf",jn="a-z\\xdf-\\xf6\\xf8-\\xff",so="\\xac\\xb1\\xd7\\xf7",oo="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ao="\\u2000-\\u206f",nd=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ju="A-Z\\xc0-\\xd6\\xd8-\\xde",Nu="\\ufe0e\\ufe0f",lo=so+oo+ao+nd,ol="['’]",uo="["+di+"]",al="["+lo+"]",fo="["+cs+"]",Iu="\\d+",rd="["+hs+"]",Fu="["+jn+"]",Uu="[^"+di+lo+Iu+hs+jn+ju+"]",Qo="\\ud83c[\\udffb-\\udfff]",id="(?:"+fo+"|"+Qo+")",$u="[^"+di+"]",Ko="(?:\\ud83c[\\udde6-\\uddff]){2}",ds="[\\ud800-\\udbff][\\udc00-\\udfff]",ar="["+ju+"]",Wu="\\u200d",Bu="(?:"+Fu+"|"+Uu+")",mi="(?:"+ar+"|"+Uu+")",zu="(?:"+ol+"(?:d|ll|m|re|s|t|ve))?",Hu="(?:"+ol+"(?:D|LL|M|RE|S|T|VE))?",Yu=id+"?",Gu="["+Nu+"]?",sd="(?:"+Wu+"(?:"+[$u,Ko,ds].join("|")+")"+Gu+Yu+")*",Ni="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Vu="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",qu=Gu+Yu+sd,Zo="(?:"+[rd,Ko,ds].join("|")+")"+qu,od="(?:"+[$u+fo+"?",fo,Ko,ds,uo].join("|")+")",ll=RegExp(ol,"g"),ad=RegExp(fo,"g"),Xo=RegExp(Qo+"(?="+Qo+")|"+od+qu,"g"),Qu=RegExp([ar+"?"+Fu+"+"+zu+"(?="+[al,ar,"$"].join("|")+")",mi+"+"+Hu+"(?="+[al,ar+Bu,"$"].join("|")+")",ar+"?"+Bu+"+"+zu,ar+"+"+Hu,Vu,Ni,Iu,Zo].join("|"),"g"),Ku=RegExp("["+Wu+di+cs+Nu+"]"),co=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Zu=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ld=-1,dt={};dt[Ai]=dt[Ne]=dt[ut]=dt[Li]=dt[yt]=dt[ft]=dt[Yr]=dt[ct]=dt[ht]=!0,dt[re]=dt[ye]=dt[Ye]=dt[Be]=dt[Ge]=dt[Re]=dt[ui]=dt[Je]=dt[_n]=dt[rt]=dt[Gn]=dt[fi]=dt[Ue]=dt[it]=dt[st]=!1;var at={};at[re]=at[ye]=at[Ye]=at[Ge]=at[Be]=at[Re]=at[Ai]=at[Ne]=at[ut]=at[Li]=at[yt]=at[_n]=at[rt]=at[Gn]=at[fi]=at[Ue]=at[it]=at[Di]=at[ft]=at[Yr]=at[ct]=at[ht]=!0,at[ui]=at[Je]=at[st]=!1;var T={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},$={"&":"&","<":"<",">":">",'"':""","'":"'"},Z={"&":"&","<":"<",">":">",""":'"',"'":"'"},he={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},pt=parseFloat,Ce=parseInt,bt=typeof Fr=="object"&&Fr&&Fr.Object===Object&&Fr,on=typeof self=="object"&&self&&self.Object===Object&&self,Ie=bt||on||Function("return this")(),mt=t&&!t.nodeType&&t,en=mt&&!0&&e&&!e.nodeType&&e,Vn=en&&en.exports===mt,an=Vn&&bt.process,Pt=function(){try{var U=en&&en.require&&en.require("util").types;return U||an&&an.binding&&an.binding("util")}catch{}}(),Nn=Pt&&Pt.isArrayBuffer,Gr=Pt&&Pt.isDate,Or=Pt&&Pt.isMap,gi=Pt&&Pt.isRegExp,ul=Pt&&Pt.isSet,ho=Pt&&Pt.isTypedArray;function mn(U,Y,z){switch(z.length){case 0:return U.call(Y);case 1:return U.call(Y,z[0]);case 2:return U.call(Y,z[0],z[1]);case 3:return U.call(Y,z[0],z[1],z[2])}return U.apply(Y,z)}function yM(U,Y,z,de){for(var ke=-1,Ve=U==null?0:U.length;++ke-1}function ud(U,Y,z){for(var de=-1,ke=U==null?0:U.length;++de-1;);return z}function Vg(U,Y){for(var z=U.length;z--&&Jo(Y,U[z],0)>-1;);return z}function EM(U,Y){for(var z=U.length,de=0;z--;)U[z]===Y&&++de;return de}var TM=dd(T),bM=dd($);function PM(U){return"\\"+he[U]}function RM(U,Y){return U==null?n:U[Y]}function ea(U){return Ku.test(U)}function DM(U){return co.test(U)}function AM(U){for(var Y,z=[];!(Y=U.next()).done;)z.push(Y.value);return z}function vd(U){var Y=-1,z=Array(U.size);return U.forEach(function(de,ke){z[++Y]=[ke,de]}),z}function qg(U,Y){return function(z){return U(Y(z))}}function gs(U,Y){for(var z=-1,de=U.length,ke=0,Ve=[];++z-1}function _2(i,o){var l=this.__data__,d=gf(l,i);return d<0?(++this.size,l.push([i,o])):l[d][1]=o,this}Ii.prototype.clear=g2,Ii.prototype.delete=v2,Ii.prototype.get=y2,Ii.prototype.has=w2,Ii.prototype.set=_2;function Fi(i){var o=-1,l=i==null?0:i.length;for(this.clear();++o=o?i:o)),i}function Pr(i,o,l,d,w,k){var D,j=o&O,W=o&E,V=o&F;if(l&&(D=w?l(i,d,w,k):l(i)),D!==n)return D;if(!Vt(i))return i;var q=Oe(i);if(q){if(D=kk(i),!j)return qn(i,D)}else{var ee=En(i),ue=ee==Je||ee==vt;if(Ss(i))return Pv(i,j);if(ee==Gn||ee==re||ue&&!w){if(D=W||ue?{}:Qv(i),!j)return W?dk(i,N2(D,i)):hk(i,ov(D,i))}else{if(!at[ee])return w?i:{};D=Ck(i,ee,j)}}k||(k=new qr);var ve=k.get(i);if(ve)return ve;k.set(i,D),ky(i)?i.forEach(function(Se){D.add(Pr(Se,o,l,Se,i,k))}):Sy(i)&&i.forEach(function(Se,Ae){D.set(Ae,Pr(Se,o,l,Ae,i,k))});var xe=V?W?zd:Bd:W?Kn:gn,be=q?n:xe(i);return Er(be||i,function(Se,Ae){be&&(Ae=Se,Se=i[Ae]),gl(D,Ae,Pr(Se,o,l,Ae,i,k))}),D}function I2(i){var o=gn(i);return function(l){return av(l,i,o)}}function av(i,o,l){var d=l.length;if(i==null)return!d;for(i=gt(i);d--;){var w=l[d],k=o[w],D=i[w];if(D===n&&!(w in i)||!k(D))return!1}return!0}function lv(i,o,l){if(typeof i!="function")throw new Tr(u);return Ml(function(){i.apply(n,l)},o)}function vl(i,o,l,d){var w=-1,k=Xu,D=!0,j=i.length,W=[],V=o.length;if(!j)return W;l&&(o=Ht(o,lr(l))),d?(k=ud,D=!1):o.length>=s&&(k=fl,D=!1,o=new go(o));e:for(;++ww?0:w+l),d=d===n||d>w?w:Ee(d),d<0&&(d+=w),d=l>d?0:Oy(d);l0&&l(j)?o>1?xn(j,o-1,l,d,w):ms(w,j):d||(w[w.length]=j)}return w}var kd=Nv(),cv=Nv(!0);function vi(i,o){return i&&kd(i,o,gn)}function Cd(i,o){return i&&cv(i,o,gn)}function yf(i,o){return ps(o,function(l){return zi(i[l])})}function yo(i,o){o=_s(o,i);for(var l=0,d=o.length;i!=null&&lo}function $2(i,o){return i!=null&&et.call(i,o)}function W2(i,o){return i!=null&&o in gt(i)}function B2(i,o,l){return i>=On(o,l)&&i=120&&q.length>=120)?new go(D&&q):n}q=i[0];var ee=-1,ue=j[0];e:for(;++ee-1;)j!==i&&uf.call(j,W,1),uf.call(i,W,1);return i}function Sv(i,o){for(var l=i?o.length:0,d=l-1;l--;){var w=o[l];if(l==d||w!==k){var k=w;Bi(w)?uf.call(i,w,1):jd(i,w)}}return i}function Dd(i,o){return i+hf(nv()*(o-i+1))}function tk(i,o,l,d){for(var w=-1,k=cn(cf((o-i)/(l||1)),0),D=z(k);k--;)D[d?k:++w]=i,i+=l;return D}function Ad(i,o){var l="";if(!i||o<1||o>R)return l;do o%2&&(l+=i),o=hf(o/2),o&&(i+=i);while(o);return l}function Pe(i,o){return Kd(Xv(i,o,Zn),i+"")}function nk(i){return sv(ca(i))}function rk(i,o){var l=ca(i);return bf(l,vo(o,0,l.length))}function _l(i,o,l,d){if(!Vt(i))return i;o=_s(o,i);for(var w=-1,k=o.length,D=k-1,j=i;j!=null&&++ww?0:w+o),l=l>w?w:l,l<0&&(l+=w),w=o>l?0:l-o>>>0,o>>>=0;for(var k=z(w);++d>>1,D=i[k];D!==null&&!fr(D)&&(l?D<=o:D=s){var V=o?null:vk(i);if(V)return ef(V);D=!1,w=fl,W=new go}else W=o?[]:j;e:for(;++d=d?i:Rr(i,o,l)}var bv=qM||function(i){return Ie.clearTimeout(i)};function Pv(i,o){if(o)return i.slice();var l=i.length,d=Zg?Zg(l):new i.constructor(l);return i.copy(d),d}function Ud(i){var o=new i.constructor(i.byteLength);return new af(o).set(new af(i)),o}function lk(i,o){var l=o?Ud(i.buffer):i.buffer;return new i.constructor(l,i.byteOffset,i.byteLength)}function uk(i){var o=new i.constructor(i.source,Cn.exec(i));return o.lastIndex=i.lastIndex,o}function fk(i){return ml?gt(ml.call(i)):{}}function Rv(i,o){var l=o?Ud(i.buffer):i.buffer;return new i.constructor(l,i.byteOffset,i.length)}function Dv(i,o){if(i!==o){var l=i!==n,d=i===null,w=i===i,k=fr(i),D=o!==n,j=o===null,W=o===o,V=fr(o);if(!j&&!V&&!k&&i>o||k&&D&&W&&!j&&!V||d&&D&&W||!l&&W||!w)return 1;if(!d&&!k&&!V&&i=j)return W;var V=l[d];return W*(V=="desc"?-1:1)}}return i.index-o.index}function Av(i,o,l,d){for(var w=-1,k=i.length,D=l.length,j=-1,W=o.length,V=cn(k-D,0),q=z(W+V),ee=!d;++j1?l[w-1]:n,D=w>2?l[2]:n;for(k=i.length>3&&typeof k=="function"?(w--,k):n,D&&Fn(l[0],l[1],D)&&(k=w<3?n:k,w=1),o=gt(o);++d-1?w[k?o[D]:D]:n}}function Uv(i){return Wi(function(o){var l=o.length,d=l,w=br.prototype.thru;for(i&&o.reverse();d--;){var k=o[d];if(typeof k!="function")throw new Tr(u);if(w&&!D&&Ef(k)=="wrapper")var D=new br([],!0)}for(d=D?d:l;++d1&&Fe.reverse(),q&&Wj))return!1;var V=k.get(i),q=k.get(o);if(V&&q)return V==o&&q==i;var ee=-1,ue=!0,ve=l&Q?new go:n;for(k.set(i,o),k.set(o,i);++ee1?"& ":"")+o[d],o=o.join(l>2?", ":" "),i.replace(Mt,`{ /* [wrapped with `+o+`] */ -`)}function Ek(i){return Oe(i)||xo(i)||!!(ev&&i&&i[ev])}function Bi(i,o){var l=typeof i;return o=o??R,!!o&&(l=="number"||l!="symbol"&&to.test(i))&&i>-1&&i%1==0&&i0){if(++o>=f)return arguments[0]}else o=0;return i.apply(n,arguments)}}function bf(i,o){var l=-1,d=i.length,w=d-1;for(o=o===n?d:o;++l1?i[o-1]:n;return l=typeof l=="function"?(i.pop(),l):n,fy(i,l)});function cy(i){var o=x(i);return o.__chain__=!0,o}function FC(i,o){return o(i),i}function Pf(i,o){return o(i)}var UC=Wi(function(i){var o=i.length,l=o?i[0]:0,d=this.__wrapped__,w=function(k){return Md(k,i)};return o>1||this.__actions__.length||!(d instanceof Le)||!Bi(l)?this.thru(w):(d=d.slice(l,+l+(o?1:0)),d.__actions__.push({func:Pf,args:[w],thisArg:n}),new br(d,this.__chain__).thru(function(k){return o&&!k.length&&k.push(n),k}))});function $C(){return cy(this)}function WC(){return new br(this.value(),this.__chain__)}function BC(){this.__values__===n&&(this.__values__=Cy(this.value()));var i=this.__index__>=this.__values__.length,o=i?n:this.__values__[this.__index__++];return{done:i,value:o}}function zC(){return this}function HC(i){for(var o,l=this;l instanceof mf;){var d=iy(l);d.__index__=0,d.__values__=n,o?w.__wrapped__=d:o=d;var w=d;l=l.__wrapped__}return w.__wrapped__=i,o}function YC(){var i=this.__wrapped__;if(i instanceof Le){var o=i;return this.__actions__.length&&(o=new Le(this)),o=o.reverse(),o.__actions__.push({func:Pf,args:[Zd],thisArg:n}),new br(o,this.__chain__)}return this.thru(Zd)}function GC(){return Ev(this.__wrapped__,this.__actions__)}var VC=Sf(function(i,o,l){et.call(i,l)?++i[l]:Ui(i,l,1)});function qC(i,o,l){var d=Oe(i)?$g:F2;return l&&Fn(i,o,l)&&(o=n),d(i,_e(o,3))}function QC(i,o){var l=Oe(i)?ms:fv;return l(i,_e(o,3))}var KC=Fv(sy),ZC=Fv(oy);function XC(i,o){return xn(Rf(i,o),1)}function JC(i,o){return xn(Rf(i,o),L)}function eO(i,o,l){return l=l===n?1:Ee(l),xn(Rf(i,o),l)}function hy(i,o){var l=Oe(i)?Er:ws;return l(i,_e(o,3))}function dy(i,o){var l=Oe(i)?wM:uv;return l(i,_e(o,3))}var tO=Sf(function(i,o,l){et.call(i,l)?i[l].push(o):Ui(i,l,[o])});function nO(i,o,l,d){i=Qn(i)?i:ca(i),l=l&&!d?Ee(l):0;var w=i.length;return l<0&&(l=cn(w+l,0)),Nf(i)?l<=w&&i.indexOf(o,l)>-1:!!w&&Jo(i,o,l)>-1}var rO=Pe(function(i,o,l){var d=-1,w=typeof o=="function",k=Qn(i)?z(i.length):[];return ws(i,function(D){k[++d]=w?mn(o,D,l):yl(D,o,l)}),k}),iO=Sf(function(i,o,l){Ui(i,l,o)});function Rf(i,o){var l=Oe(i)?Ht:gv;return l(i,_e(o,3))}function sO(i,o,l,d){return i==null?[]:(Oe(o)||(o=o==null?[]:[o]),l=d?n:l,Oe(l)||(l=l==null?[]:[l]),_v(i,o,l))}var oO=Sf(function(i,o,l){i[l?0:1].push(o)},function(){return[[],[]]});function aO(i,o,l){var d=Oe(i)?fd:Hg,w=arguments.length<3;return d(i,_e(o,4),l,w,ws)}function lO(i,o,l){var d=Oe(i)?_M:Hg,w=arguments.length<3;return d(i,_e(o,4),l,w,uv)}function uO(i,o){var l=Oe(i)?ms:fv;return l(i,Lf(_e(o,3)))}function fO(i){var o=Oe(i)?sv:nk;return o(i)}function cO(i,o,l){(l?Fn(i,o,l):o===n)?o=1:o=Ee(o);var d=Oe(i)?A2:rk;return d(i,o)}function hO(i){var o=Oe(i)?L2:sk;return o(i)}function dO(i){if(i==null)return 0;if(Qn(i))return Nf(i)?ta(i):i.length;var o=En(i);return o==_n||o==Ue?i.size:bd(i).length}function pO(i,o,l){var d=Oe(i)?cd:ok;return l&&Fn(i,o,l)&&(o=n),d(i,_e(o,3))}var mO=Pe(function(i,o){if(i==null)return[];var l=o.length;return l>1&&Fn(i,o[0],o[1])?o=[]:l>2&&Fn(o[0],o[1],o[2])&&(o=[o[0]]),_v(i,xn(o,1),[])}),Df=QM||function(){return Ie.Date.now()};function gO(i,o){if(typeof o!="function")throw new Tr(u);return i=Ee(i),function(){if(--i<1)return o.apply(this,arguments)}}function py(i,o,l){return o=l?n:o,o=i&&o==null?i.length:o,$i(i,V,n,n,n,n,o)}function my(i,o){var l;if(typeof o!="function")throw new Tr(u);return i=Ee(i),function(){return--i>0&&(l=o.apply(this,arguments)),i<=1&&(o=n),l}}var Jd=Pe(function(i,o,l){var d=me;if(l.length){var w=vs(l,ua(Jd));d|=X}return $i(i,d,o,l,w)}),gy=Pe(function(i,o,l){var d=me|N;if(l.length){var w=vs(l,ua(gy));d|=X}return $i(o,d,i,l,w)});function vy(i,o,l){o=l?n:o;var d=$i(i,I,n,n,n,n,n,o);return d.placeholder=vy.placeholder,d}function yy(i,o,l){o=l?n:o;var d=$i(i,H,n,n,n,n,n,o);return d.placeholder=yy.placeholder,d}function wy(i,o,l){var d,w,k,D,j,W,q=0,Q=!1,ee=!1,ue=!0;if(typeof i!="function")throw new Tr(u);o=Ar(o)||0,qt(l)&&(Q=!!l.leading,ee="maxWait"in l,k=ee?cn(Ar(l.maxWait)||0,o):k,ue="trailing"in l?!!l.trailing:ue);function ve(nn){var Kr=d,Yi=w;return d=w=n,q=nn,D=i.apply(Yi,Kr),D}function xe(nn){return q=nn,j=Ml(Ae,o),Q?ve(nn):D}function be(nn){var Kr=nn-W,Yi=nn-q,Fy=o-Kr;return ee?On(Fy,k-Yi):Fy}function Se(nn){var Kr=nn-W,Yi=nn-q;return W===n||Kr>=o||Kr<0||ee&&Yi>=k}function Ae(){var nn=Df();if(Se(nn))return Fe(nn);j=Ml(Ae,be(nn))}function Fe(nn){return j=n,ue&&d?ve(nn):(d=w=n,D)}function cr(){j!==n&&bv(j),q=0,d=W=w=j=n}function Un(){return j===n?D:Fe(Df())}function hr(){var nn=Df(),Kr=Se(nn);if(d=arguments,w=this,W=nn,Kr){if(j===n)return xe(W);if(ee)return bv(j),j=Ml(Ae,o),ve(W)}return j===n&&(j=Ml(Ae,o)),D}return hr.cancel=cr,hr.flush=Un,hr}var vO=Pe(function(i,o){return lv(i,1,o)}),yO=Pe(function(i,o,l){return lv(i,Ar(o)||0,l)});function wO(i){return $i(i,le)}function Af(i,o){if(typeof i!="function"||o!=null&&typeof o!="function")throw new Tr(u);var l=function(){var d=arguments,w=o?o.apply(this,d):d[0],k=l.cache;if(k.has(w))return k.get(w);var D=i.apply(this,d);return l.cache=k.set(w,D)||k,D};return l.cache=new(Af.Cache||Fi),l}Af.Cache=Fi;function Lf(i){if(typeof i!="function")throw new Tr(u);return function(){var o=arguments;switch(o.length){case 0:return!i.call(this);case 1:return!i.call(this,o[0]);case 2:return!i.call(this,o[0],o[1]);case 3:return!i.call(this,o[0],o[1],o[2])}return!i.apply(this,o)}}function _O(i){return my(2,i)}var xO=ak(function(i,o){o=o.length==1&&Oe(o[0])?Ht(o[0],lr(_e())):Ht(xn(o,1),lr(_e()));var l=o.length;return Pe(function(d){for(var w=-1,k=On(d.length,l);++w=o}),xo=dv(function(){return arguments}())?dv:function(i){return Xt(i)&&et.call(i,"callee")&&!Jg.call(i,"callee")},Oe=z.isArray,NO=Nn?lr(Nn):H2;function Qn(i){return i!=null&&jf(i.length)&&!zi(i)}function tn(i){return Xt(i)&&Qn(i)}function IO(i){return i===!0||i===!1||Xt(i)&&In(i)==Be}var Ms=ZM||cp,FO=Gr?lr(Gr):Y2;function UO(i){return Xt(i)&&i.nodeType===1&&!kl(i)}function $O(i){if(i==null)return!0;if(Qn(i)&&(Oe(i)||typeof i=="string"||typeof i.splice=="function"||Ms(i)||fa(i)||xo(i)))return!i.length;var o=En(i);if(o==_n||o==Ue)return!i.size;if(Sl(i))return!bd(i).length;for(var l in i)if(et.call(i,l))return!1;return!0}function WO(i,o){return wl(i,o)}function BO(i,o,l){l=typeof l=="function"?l:n;var d=l?l(i,o):n;return d===n?wl(i,o,n,l):!!d}function tp(i){if(!Xt(i))return!1;var o=In(i);return o==ui||o==Xe||typeof i.message=="string"&&typeof i.name=="string"&&!kl(i)}function zO(i){return typeof i=="number"&&tv(i)}function zi(i){if(!qt(i))return!1;var o=In(i);return o==Je||o==vt||o==Me||o==Nt}function xy(i){return typeof i=="number"&&i==Ee(i)}function jf(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=R}function qt(i){var o=typeof i;return i!=null&&(o=="object"||o=="function")}function Xt(i){return i!=null&&typeof i=="object"}var Sy=Or?lr(Or):V2;function HO(i,o){return i===o||Td(i,o,Yd(o))}function YO(i,o,l){return l=typeof l=="function"?l:n,Td(i,o,Yd(o),l)}function GO(i){return My(i)&&i!=+i}function VO(i){if(Pk(i))throw new ke(a);return pv(i)}function qO(i){return i===null}function QO(i){return i==null}function My(i){return typeof i=="number"||Xt(i)&&In(i)==rt}function kl(i){if(!Xt(i)||In(i)!=Gn)return!1;var o=lf(i);if(o===null)return!0;var l=et.call(o,"constructor")&&o.constructor;return typeof l=="function"&&l instanceof l&&rf.call(l)==YM}var np=gi?lr(gi):q2;function KO(i){return xy(i)&&i>=-R&&i<=R}var ky=ul?lr(ul):Q2;function Nf(i){return typeof i=="string"||!Oe(i)&&Xt(i)&&In(i)==it}function fr(i){return typeof i=="symbol"||Xt(i)&&In(i)==Di}var fa=ho?lr(ho):K2;function ZO(i){return i===n}function XO(i){return Xt(i)&&En(i)==st}function JO(i){return Xt(i)&&In(i)==Yo}var eE=Of(Pd),tE=Of(function(i,o){return i<=o});function Cy(i){if(!i)return[];if(Qn(i))return Nf(i)?Vr(i):qn(i);if(cl&&i[cl])return AM(i[cl]());var o=En(i),l=o==_n?vd:o==Ue?ef:ca;return l(i)}function Hi(i){if(!i)return i===0?i:0;if(i=Ar(i),i===L||i===-L){var o=i<0?-1:1;return o*_}return i===i?i:0}function Ee(i){var o=Hi(i),l=o%1;return o===o?l?o-l:o:0}function Oy(i){return i?vo(Ee(i),0,M):0}function Ar(i){if(typeof i=="number")return i;if(fr(i))return h;if(qt(i)){var o=typeof i.valueOf=="function"?i.valueOf():i;i=qt(o)?o+"":o}if(typeof i!="string")return i===0?i:+i;i=Yg(i);var l=Xs.test(i);return l||eo.test(i)?Ce(i.slice(2),l?2:8):Zs.test(i)?h:+i}function Ey(i){return yi(i,Kn(i))}function nE(i){return i?vo(Ee(i),-R,R):i===0?i:0}function Ze(i){return i==null?"":ur(i)}var rE=aa(function(i,o){if(Sl(o)||Qn(o)){yi(o,gn(o),i);return}for(var l in o)et.call(o,l)&&gl(i,l,o[l])}),Ty=aa(function(i,o){yi(o,Kn(o),i)}),If=aa(function(i,o,l,d){yi(o,Kn(o),i,d)}),iE=aa(function(i,o,l,d){yi(o,gn(o),i,d)}),sE=Wi(Md);function oE(i,o){var l=oa(i);return o==null?l:ov(l,o)}var aE=Pe(function(i,o){i=gt(i);var l=-1,d=o.length,w=d>2?o[2]:n;for(w&&Fn(o[0],o[1],w)&&(d=1);++l1),k}),yi(i,zd(i),l),d&&(l=Pr(l,O|E|F,yk));for(var w=o.length;w--;)jd(l,o[w]);return l});function CE(i,o){return Py(i,Lf(_e(o)))}var OE=Wi(function(i,o){return i==null?{}:J2(i,o)});function Py(i,o){if(i==null)return{};var l=Ht(zd(i),function(d){return[d]});return o=_e(o),xv(i,l,function(d,w){return o(d,w[0])})}function EE(i,o,l){o=xs(o,i);var d=-1,w=o.length;for(w||(w=1,i=n);++do){var d=i;i=o,o=d}if(l||i%1||o%1){var w=nv();return On(i+w*(o-i+pt("1e-"+((w+"").length-1))),o)}return Dd(i,o)}var FE=la(function(i,o,l){return o=o.toLowerCase(),i+(l?Ay(o):o)});function Ay(i){return sp(Ze(i).toLowerCase())}function Ly(i){return i=Ze(i),i&&i.replace(or,TM).replace(ad,"")}function UE(i,o,l){i=Ze(i),o=ur(o);var d=i.length;l=l===n?d:vo(Ee(l),0,d);var w=l;return l-=o.length,l>=0&&i.slice(l,w)==o}function $E(i){return i=Ze(i),i&&ci.test(i)?i.replace(Et,bM):i}function WE(i){return i=Ze(i),i&&Ut.test(i)?i.replace(St,"\\$&"):i}var BE=la(function(i,o,l){return i+(l?"-":"")+o.toLowerCase()}),zE=la(function(i,o,l){return i+(l?" ":"")+o.toLowerCase()}),HE=Iv("toLowerCase");function YE(i,o,l){i=Ze(i),o=Ee(o);var d=o?ta(i):0;if(!o||d>=o)return i;var w=(o-d)/2;return Cf(hf(w),l)+i+Cf(cf(w),l)}function GE(i,o,l){i=Ze(i),o=Ee(o);var d=o?ta(i):0;return o&&d>>0,l?(i=Ze(i),i&&(typeof o=="string"||o!=null&&!np(o))&&(o=ur(o),!o&&ea(i))?Ss(Vr(i),0,l):i.split(o,l)):[]}var JE=la(function(i,o,l){return i+(l?" ":"")+sp(o)});function eT(i,o,l){return i=Ze(i),l=l==null?0:vo(Ee(l),0,i.length),o=ur(o),i.slice(l,l+o.length)==o}function tT(i,o,l){var d=x.templateSettings;l&&Fn(i,o,l)&&(o=n),i=Ze(i),o=If({},o,d,Hv);var w=If({},o.imports,d.imports,Hv),k=gn(w),D=gd(w,k),j,W,q=0,Q=o.interpolate||hi,ee="__p += '",ue=yd((o.escape||hi).source+"|"+Q.source+"|"+(Q===ji?zt:hi).source+"|"+(o.evaluate||hi).source+"|$","g"),ve="//# sourceURL="+(et.call(o,"sourceURL")?(o.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ld+"]")+` -`;i.replace(ue,function(Se,Ae,Fe,cr,Un,hr){return Fe||(Fe=cr),ee+=i.slice(q,hr).replace(no,PM),Ae&&(j=!0,ee+=`' + +`)}function Ek(i){return Oe(i)||xo(i)||!!(ev&&i&&i[ev])}function Bi(i,o){var l=typeof i;return o=o??R,!!o&&(l=="number"||l!="symbol"&&to.test(i))&&i>-1&&i%1==0&&i0){if(++o>=f)return arguments[0]}else o=0;return i.apply(n,arguments)}}function bf(i,o){var l=-1,d=i.length,w=d-1;for(o=o===n?d:o;++l1?i[o-1]:n;return l=typeof l=="function"?(i.pop(),l):n,fy(i,l)});function cy(i){var o=x(i);return o.__chain__=!0,o}function FC(i,o){return o(i),i}function Pf(i,o){return o(i)}var UC=Wi(function(i){var o=i.length,l=o?i[0]:0,d=this.__wrapped__,w=function(k){return Md(k,i)};return o>1||this.__actions__.length||!(d instanceof Le)||!Bi(l)?this.thru(w):(d=d.slice(l,+l+(o?1:0)),d.__actions__.push({func:Pf,args:[w],thisArg:n}),new br(d,this.__chain__).thru(function(k){return o&&!k.length&&k.push(n),k}))});function $C(){return cy(this)}function WC(){return new br(this.value(),this.__chain__)}function BC(){this.__values__===n&&(this.__values__=Cy(this.value()));var i=this.__index__>=this.__values__.length,o=i?n:this.__values__[this.__index__++];return{done:i,value:o}}function zC(){return this}function HC(i){for(var o,l=this;l instanceof mf;){var d=iy(l);d.__index__=0,d.__values__=n,o?w.__wrapped__=d:o=d;var w=d;l=l.__wrapped__}return w.__wrapped__=i,o}function YC(){var i=this.__wrapped__;if(i instanceof Le){var o=i;return this.__actions__.length&&(o=new Le(this)),o=o.reverse(),o.__actions__.push({func:Pf,args:[Zd],thisArg:n}),new br(o,this.__chain__)}return this.thru(Zd)}function GC(){return Ev(this.__wrapped__,this.__actions__)}var VC=Sf(function(i,o,l){et.call(i,l)?++i[l]:Ui(i,l,1)});function qC(i,o,l){var d=Oe(i)?$g:F2;return l&&Fn(i,o,l)&&(o=n),d(i,_e(o,3))}function QC(i,o){var l=Oe(i)?ps:fv;return l(i,_e(o,3))}var KC=Fv(sy),ZC=Fv(oy);function XC(i,o){return xn(Rf(i,o),1)}function JC(i,o){return xn(Rf(i,o),L)}function eO(i,o,l){return l=l===n?1:Ee(l),xn(Rf(i,o),l)}function hy(i,o){var l=Oe(i)?Er:ys;return l(i,_e(o,3))}function dy(i,o){var l=Oe(i)?wM:uv;return l(i,_e(o,3))}var tO=Sf(function(i,o,l){et.call(i,l)?i[l].push(o):Ui(i,l,[o])});function nO(i,o,l,d){i=Qn(i)?i:ca(i),l=l&&!d?Ee(l):0;var w=i.length;return l<0&&(l=cn(w+l,0)),Nf(i)?l<=w&&i.indexOf(o,l)>-1:!!w&&Jo(i,o,l)>-1}var rO=Pe(function(i,o,l){var d=-1,w=typeof o=="function",k=Qn(i)?z(i.length):[];return ys(i,function(D){k[++d]=w?mn(o,D,l):yl(D,o,l)}),k}),iO=Sf(function(i,o,l){Ui(i,l,o)});function Rf(i,o){var l=Oe(i)?Ht:gv;return l(i,_e(o,3))}function sO(i,o,l,d){return i==null?[]:(Oe(o)||(o=o==null?[]:[o]),l=d?n:l,Oe(l)||(l=l==null?[]:[l]),_v(i,o,l))}var oO=Sf(function(i,o,l){i[l?0:1].push(o)},function(){return[[],[]]});function aO(i,o,l){var d=Oe(i)?fd:Hg,w=arguments.length<3;return d(i,_e(o,4),l,w,ys)}function lO(i,o,l){var d=Oe(i)?_M:Hg,w=arguments.length<3;return d(i,_e(o,4),l,w,uv)}function uO(i,o){var l=Oe(i)?ps:fv;return l(i,Lf(_e(o,3)))}function fO(i){var o=Oe(i)?sv:nk;return o(i)}function cO(i,o,l){(l?Fn(i,o,l):o===n)?o=1:o=Ee(o);var d=Oe(i)?A2:rk;return d(i,o)}function hO(i){var o=Oe(i)?L2:sk;return o(i)}function dO(i){if(i==null)return 0;if(Qn(i))return Nf(i)?ta(i):i.length;var o=En(i);return o==_n||o==Ue?i.size:bd(i).length}function pO(i,o,l){var d=Oe(i)?cd:ok;return l&&Fn(i,o,l)&&(o=n),d(i,_e(o,3))}var mO=Pe(function(i,o){if(i==null)return[];var l=o.length;return l>1&&Fn(i,o[0],o[1])?o=[]:l>2&&Fn(o[0],o[1],o[2])&&(o=[o[0]]),_v(i,xn(o,1),[])}),Df=QM||function(){return Ie.Date.now()};function gO(i,o){if(typeof o!="function")throw new Tr(u);return i=Ee(i),function(){if(--i<1)return o.apply(this,arguments)}}function py(i,o,l){return o=l?n:o,o=i&&o==null?i.length:o,$i(i,K,n,n,n,n,o)}function my(i,o){var l;if(typeof o!="function")throw new Tr(u);return i=Ee(i),function(){return--i>0&&(l=o.apply(this,arguments)),i<=1&&(o=n),l}}var Jd=Pe(function(i,o,l){var d=me;if(l.length){var w=gs(l,ua(Jd));d|=X}return $i(i,d,o,l,w)}),gy=Pe(function(i,o,l){var d=me|N;if(l.length){var w=gs(l,ua(gy));d|=X}return $i(o,d,i,l,w)});function vy(i,o,l){o=l?n:o;var d=$i(i,I,n,n,n,n,n,o);return d.placeholder=vy.placeholder,d}function yy(i,o,l){o=l?n:o;var d=$i(i,H,n,n,n,n,n,o);return d.placeholder=yy.placeholder,d}function wy(i,o,l){var d,w,k,D,j,W,V=0,q=!1,ee=!1,ue=!0;if(typeof i!="function")throw new Tr(u);o=Ar(o)||0,Vt(l)&&(q=!!l.leading,ee="maxWait"in l,k=ee?cn(Ar(l.maxWait)||0,o):k,ue="trailing"in l?!!l.trailing:ue);function ve(nn){var Kr=d,Yi=w;return d=w=n,V=nn,D=i.apply(Yi,Kr),D}function xe(nn){return V=nn,j=Ml(Ae,o),q?ve(nn):D}function be(nn){var Kr=nn-W,Yi=nn-V,Fy=o-Kr;return ee?On(Fy,k-Yi):Fy}function Se(nn){var Kr=nn-W,Yi=nn-V;return W===n||Kr>=o||Kr<0||ee&&Yi>=k}function Ae(){var nn=Df();if(Se(nn))return Fe(nn);j=Ml(Ae,be(nn))}function Fe(nn){return j=n,ue&&d?ve(nn):(d=w=n,D)}function cr(){j!==n&&bv(j),V=0,d=W=w=j=n}function Un(){return j===n?D:Fe(Df())}function hr(){var nn=Df(),Kr=Se(nn);if(d=arguments,w=this,W=nn,Kr){if(j===n)return xe(W);if(ee)return bv(j),j=Ml(Ae,o),ve(W)}return j===n&&(j=Ml(Ae,o)),D}return hr.cancel=cr,hr.flush=Un,hr}var vO=Pe(function(i,o){return lv(i,1,o)}),yO=Pe(function(i,o,l){return lv(i,Ar(o)||0,l)});function wO(i){return $i(i,le)}function Af(i,o){if(typeof i!="function"||o!=null&&typeof o!="function")throw new Tr(u);var l=function(){var d=arguments,w=o?o.apply(this,d):d[0],k=l.cache;if(k.has(w))return k.get(w);var D=i.apply(this,d);return l.cache=k.set(w,D)||k,D};return l.cache=new(Af.Cache||Fi),l}Af.Cache=Fi;function Lf(i){if(typeof i!="function")throw new Tr(u);return function(){var o=arguments;switch(o.length){case 0:return!i.call(this);case 1:return!i.call(this,o[0]);case 2:return!i.call(this,o[0],o[1]);case 3:return!i.call(this,o[0],o[1],o[2])}return!i.apply(this,o)}}function _O(i){return my(2,i)}var xO=ak(function(i,o){o=o.length==1&&Oe(o[0])?Ht(o[0],lr(_e())):Ht(xn(o,1),lr(_e()));var l=o.length;return Pe(function(d){for(var w=-1,k=On(d.length,l);++w=o}),xo=dv(function(){return arguments}())?dv:function(i){return Xt(i)&&et.call(i,"callee")&&!Jg.call(i,"callee")},Oe=z.isArray,NO=Nn?lr(Nn):H2;function Qn(i){return i!=null&&jf(i.length)&&!zi(i)}function tn(i){return Xt(i)&&Qn(i)}function IO(i){return i===!0||i===!1||Xt(i)&&In(i)==Be}var Ss=ZM||cp,FO=Gr?lr(Gr):Y2;function UO(i){return Xt(i)&&i.nodeType===1&&!kl(i)}function $O(i){if(i==null)return!0;if(Qn(i)&&(Oe(i)||typeof i=="string"||typeof i.splice=="function"||Ss(i)||fa(i)||xo(i)))return!i.length;var o=En(i);if(o==_n||o==Ue)return!i.size;if(Sl(i))return!bd(i).length;for(var l in i)if(et.call(i,l))return!1;return!0}function WO(i,o){return wl(i,o)}function BO(i,o,l){l=typeof l=="function"?l:n;var d=l?l(i,o):n;return d===n?wl(i,o,n,l):!!d}function tp(i){if(!Xt(i))return!1;var o=In(i);return o==ui||o==Xe||typeof i.message=="string"&&typeof i.name=="string"&&!kl(i)}function zO(i){return typeof i=="number"&&tv(i)}function zi(i){if(!Vt(i))return!1;var o=In(i);return o==Je||o==vt||o==Me||o==Nt}function xy(i){return typeof i=="number"&&i==Ee(i)}function jf(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=R}function Vt(i){var o=typeof i;return i!=null&&(o=="object"||o=="function")}function Xt(i){return i!=null&&typeof i=="object"}var Sy=Or?lr(Or):V2;function HO(i,o){return i===o||Td(i,o,Yd(o))}function YO(i,o,l){return l=typeof l=="function"?l:n,Td(i,o,Yd(o),l)}function GO(i){return My(i)&&i!=+i}function VO(i){if(Pk(i))throw new ke(a);return pv(i)}function qO(i){return i===null}function QO(i){return i==null}function My(i){return typeof i=="number"||Xt(i)&&In(i)==rt}function kl(i){if(!Xt(i)||In(i)!=Gn)return!1;var o=lf(i);if(o===null)return!0;var l=et.call(o,"constructor")&&o.constructor;return typeof l=="function"&&l instanceof l&&rf.call(l)==YM}var np=gi?lr(gi):q2;function KO(i){return xy(i)&&i>=-R&&i<=R}var ky=ul?lr(ul):Q2;function Nf(i){return typeof i=="string"||!Oe(i)&&Xt(i)&&In(i)==it}function fr(i){return typeof i=="symbol"||Xt(i)&&In(i)==Di}var fa=ho?lr(ho):K2;function ZO(i){return i===n}function XO(i){return Xt(i)&&En(i)==st}function JO(i){return Xt(i)&&In(i)==Yo}var eE=Of(Pd),tE=Of(function(i,o){return i<=o});function Cy(i){if(!i)return[];if(Qn(i))return Nf(i)?Vr(i):qn(i);if(cl&&i[cl])return AM(i[cl]());var o=En(i),l=o==_n?vd:o==Ue?ef:ca;return l(i)}function Hi(i){if(!i)return i===0?i:0;if(i=Ar(i),i===L||i===-L){var o=i<0?-1:1;return o*_}return i===i?i:0}function Ee(i){var o=Hi(i),l=o%1;return o===o?l?o-l:o:0}function Oy(i){return i?vo(Ee(i),0,M):0}function Ar(i){if(typeof i=="number")return i;if(fr(i))return h;if(Vt(i)){var o=typeof i.valueOf=="function"?i.valueOf():i;i=Vt(o)?o+"":o}if(typeof i!="string")return i===0?i:+i;i=Yg(i);var l=Xs.test(i);return l||eo.test(i)?Ce(i.slice(2),l?2:8):Zs.test(i)?h:+i}function Ey(i){return yi(i,Kn(i))}function nE(i){return i?vo(Ee(i),-R,R):i===0?i:0}function Ze(i){return i==null?"":ur(i)}var rE=aa(function(i,o){if(Sl(o)||Qn(o)){yi(o,gn(o),i);return}for(var l in o)et.call(o,l)&&gl(i,l,o[l])}),Ty=aa(function(i,o){yi(o,Kn(o),i)}),If=aa(function(i,o,l,d){yi(o,Kn(o),i,d)}),iE=aa(function(i,o,l,d){yi(o,gn(o),i,d)}),sE=Wi(Md);function oE(i,o){var l=oa(i);return o==null?l:ov(l,o)}var aE=Pe(function(i,o){i=gt(i);var l=-1,d=o.length,w=d>2?o[2]:n;for(w&&Fn(o[0],o[1],w)&&(d=1);++l1),k}),yi(i,zd(i),l),d&&(l=Pr(l,O|E|F,yk));for(var w=o.length;w--;)jd(l,o[w]);return l});function CE(i,o){return Py(i,Lf(_e(o)))}var OE=Wi(function(i,o){return i==null?{}:J2(i,o)});function Py(i,o){if(i==null)return{};var l=Ht(zd(i),function(d){return[d]});return o=_e(o),xv(i,l,function(d,w){return o(d,w[0])})}function EE(i,o,l){o=_s(o,i);var d=-1,w=o.length;for(w||(w=1,i=n);++do){var d=i;i=o,o=d}if(l||i%1||o%1){var w=nv();return On(i+w*(o-i+pt("1e-"+((w+"").length-1))),o)}return Dd(i,o)}var FE=la(function(i,o,l){return o=o.toLowerCase(),i+(l?Ay(o):o)});function Ay(i){return sp(Ze(i).toLowerCase())}function Ly(i){return i=Ze(i),i&&i.replace(or,TM).replace(ad,"")}function UE(i,o,l){i=Ze(i),o=ur(o);var d=i.length;l=l===n?d:vo(Ee(l),0,d);var w=l;return l-=o.length,l>=0&&i.slice(l,w)==o}function $E(i){return i=Ze(i),i&&ci.test(i)?i.replace(Et,bM):i}function WE(i){return i=Ze(i),i&&Ut.test(i)?i.replace(St,"\\$&"):i}var BE=la(function(i,o,l){return i+(l?"-":"")+o.toLowerCase()}),zE=la(function(i,o,l){return i+(l?" ":"")+o.toLowerCase()}),HE=Iv("toLowerCase");function YE(i,o,l){i=Ze(i),o=Ee(o);var d=o?ta(i):0;if(!o||d>=o)return i;var w=(o-d)/2;return Cf(hf(w),l)+i+Cf(cf(w),l)}function GE(i,o,l){i=Ze(i),o=Ee(o);var d=o?ta(i):0;return o&&d>>0,l?(i=Ze(i),i&&(typeof o=="string"||o!=null&&!np(o))&&(o=ur(o),!o&&ea(i))?xs(Vr(i),0,l):i.split(o,l)):[]}var JE=la(function(i,o,l){return i+(l?" ":"")+sp(o)});function eT(i,o,l){return i=Ze(i),l=l==null?0:vo(Ee(l),0,i.length),o=ur(o),i.slice(l,l+o.length)==o}function tT(i,o,l){var d=x.templateSettings;l&&Fn(i,o,l)&&(o=n),i=Ze(i),o=If({},o,d,Hv);var w=If({},o.imports,d.imports,Hv),k=gn(w),D=gd(w,k),j,W,V=0,q=o.interpolate||hi,ee="__p += '",ue=yd((o.escape||hi).source+"|"+q.source+"|"+(q===ji?zt:hi).source+"|"+(o.evaluate||hi).source+"|$","g"),ve="//# sourceURL="+(et.call(o,"sourceURL")?(o.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ld+"]")+` +`;i.replace(ue,function(Se,Ae,Fe,cr,Un,hr){return Fe||(Fe=cr),ee+=i.slice(V,hr).replace(no,PM),Ae&&(j=!0,ee+=`' + __e(`+Ae+`) + '`),Un&&(W=!0,ee+=`'; `+Un+`; __p += '`),Fe&&(ee+=`' + ((__t = (`+Fe+`)) == null ? '' : __t) + -'`),q=hr+Se.length,Se}),ee+=`'; +'`),V=hr+Se.length,Se}),ee+=`'; `;var xe=et.call(o,"variable")&&o.variable;if(!xe)ee=`with (obj) { `+ee+` } @@ -74,19 +74,19 @@ __p += '`),Fe&&(ee+=`' + function print() { __p += __j.call(arguments, '') } `:`; `)+ee+`return __p -}`;var be=Ny(function(){return Ve(k,ve+"return "+ee).apply(n,D)});if(be.source=ee,tp(be))throw be;return be}function nT(i){return Ze(i).toLowerCase()}function rT(i){return Ze(i).toUpperCase()}function iT(i,o,l){if(i=Ze(i),i&&(l||o===n))return Yg(i);if(!i||!(o=ur(o)))return i;var d=Vr(i),w=Vr(o),k=Gg(d,w),D=Vg(d,w)+1;return Ss(d,k,D).join("")}function sT(i,o,l){if(i=Ze(i),i&&(l||o===n))return i.slice(0,Qg(i)+1);if(!i||!(o=ur(o)))return i;var d=Vr(i),w=Vg(d,Vr(o))+1;return Ss(d,0,w).join("")}function oT(i,o,l){if(i=Ze(i),i&&(l||o===n))return i.replace(cs,"");if(!i||!(o=ur(o)))return i;var d=Vr(i),w=Gg(d,Vr(o));return Ss(d,w).join("")}function aT(i,o){var l=fe,d=P;if(qt(o)){var w="separator"in o?o.separator:w;l="length"in o?Ee(o.length):l,d="omission"in o?ur(o.omission):d}i=Ze(i);var k=i.length;if(ea(i)){var D=Vr(i);k=D.length}if(l>=k)return i;var j=l-ta(d);if(j<1)return d;var W=D?Ss(D,0,j).join(""):i.slice(0,j);if(w===n)return W+d;if(D&&(j+=W.length-j),np(w)){if(i.slice(j).search(w)){var q,Q=W;for(w.global||(w=yd(w.source,Ze(Cn.exec(w))+"g")),w.lastIndex=0;q=w.exec(Q);)var ee=q.index;W=W.slice(0,ee===n?j:ee)}}else if(i.indexOf(ur(w),j)!=j){var ue=W.lastIndexOf(w);ue>-1&&(W=W.slice(0,ue))}return W+d}function lT(i){return i=Ze(i),i&&wt.test(i)?i.replace(Ks,IM):i}var uT=la(function(i,o,l){return i+(l?" ":"")+o.toUpperCase()}),sp=Iv("toUpperCase");function jy(i,o,l){return i=Ze(i),o=l?n:o,o===n?DM(i)?$M(i):MM(i):i.match(o)||[]}var Ny=Pe(function(i,o){try{return mn(i,n,o)}catch(l){return tp(l)?l:new ke(l)}}),fT=Wi(function(i,o){return Er(o,function(l){l=wi(l),Ui(i,l,Jd(i[l],i))}),i});function cT(i){var o=i==null?0:i.length,l=_e();return i=o?Ht(i,function(d){if(typeof d[1]!="function")throw new Tr(u);return[l(d[0]),d[1]]}):[],Pe(function(d){for(var w=-1;++wR)return[];var l=M,d=On(i,M);o=_e(o),i-=M;for(var w=md(d,o);++l0||o<0)?new Le(l):(i<0?l=l.takeRight(-i):i&&(l=l.drop(i)),o!==n&&(o=Ee(o),l=o<0?l.dropRight(-o):l.take(o-i)),l)},Le.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},Le.prototype.toArray=function(){return this.take(M)},vi(Le.prototype,function(i,o){var l=/^(?:filter|find|map|reject)|While$/.test(o),d=/^(?:head|last)$/.test(o),w=x[d?"take"+(o=="last"?"Right":""):o],k=d||/^find/.test(o);w&&(x.prototype[o]=function(){var D=this.__wrapped__,j=d?[1]:arguments,W=D instanceof Le,q=j[0],Q=W||Oe(D),ee=function(Ae){var Fe=w.apply(x,gs([Ae],j));return d&&ue?Fe[0]:Fe};Q&&l&&typeof q=="function"&&q.length!=1&&(W=Q=!1);var ue=this.__chain__,ve=!!this.__actions__.length,xe=k&&!ue,be=W&&!ve;if(!k&&Q){D=be?D:new Le(this);var Se=i.apply(D,j);return Se.__actions__.push({func:Pf,args:[ee],thisArg:n}),new br(Se,ue)}return xe&&be?i.apply(this,j):(Se=this.thru(ee),xe?d?Se.value()[0]:Se.value():Se)})}),Er(["pop","push","shift","sort","splice","unshift"],function(i){var o=tf[i],l=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",d=/^(?:pop|shift)$/.test(i);x.prototype[i]=function(){var w=arguments;if(d&&!this.__chain__){var k=this.value();return o.apply(Oe(k)?k:[],w)}return this[l](function(D){return o.apply(Oe(D)?D:[],w)})}}),vi(Le.prototype,function(i,o){var l=x[o];if(l){var d=l.name+"";et.call(sa,d)||(sa[d]=[]),sa[d].push({name:o,func:l})}}),sa[Mf(n,N).name]=[{name:"wrapper",func:n}],Le.prototype.clone=l2,Le.prototype.reverse=u2,Le.prototype.value=f2,x.prototype.at=UC,x.prototype.chain=$C,x.prototype.commit=WC,x.prototype.next=BC,x.prototype.plant=HC,x.prototype.reverse=YC,x.prototype.toJSON=x.prototype.valueOf=x.prototype.value=GC,x.prototype.first=x.prototype.head,cl&&(x.prototype[cl]=zC),x},na=WM();en?((en.exports=na)._=na,mt._=na):Ie._=na}).call(Fr)})(Qc,Qc.exports);var C3=Qc.exports;const ln=_u(C3);class O3{reduce(t,n){const r=ln.get(t,"local",!1);r&&(this.status(r,n),this.apps(r,n),this.app(r,n),this.appState(r,n),this.appFailed(r,n),this.verbResult(r,n),this.verbStatus(r,n),this.verbEventPlus(r,n),this.threads(r,n),this.amesPeers(r,n),this.amesPeer(r,n),this.behnTimers(r,n),this.clayCommits(r,n),this.eyreBindings(r,n),this.eyreCache(r,n),this.eyreConnections(r,n),this.eyreAuthentication(r,n),this.eyreChannels(r,n))}status(t,n){const r=ln.get(t,"status",!1);r&&(n.status=r)}apps(t,n){const r=ln.get(t,"apps",!1);r&&Object.keys(r).map(s=>{n.apps[s]||(n.apps[s]=r[s])})}app(t,n){const r=ln.get(t,"app",!1);r&&(n.apps[r.app]&&(r.state=n.apps[r.app].state),n.apps[r.app]=r)}appState(t,n){const r=ln.get(t,"appState",!1);r&&(n.apps[r.app].state=r.state)}appFailed(t,n){const r=ln.get(t,"appFailed",!1);r&&(console.log("loading app deets failed",r),n.apps[r]={noDebug:!0})}verbResult(t,n){const r=ln.get(t,"verbResult",!1);if(r){n.apps[r.app]||(n.apps[r.app]={}),n.apps[r.app].events||(n.apps[r.app].events=[]);let s="some event";r["on-init"]&&(s="+on-init"),r["on-load"]&&(s="+on-load"),r["on-poke"]&&(s="+on-poke with mark "+r["on-poke"]),r["on-watch"]&&(s="+on-watch at path "+r["on-watch"]),r["on-leave"]&&(s="+on-leave on path "+r["on-leave"]),r["on-agent"]&&(s="+on-agent at wire "+r["on-agent"].wire+" with sign "+r["on-agent"].sign),r["on-arvo"]&&(s="+on-arvo at wire "+r["on-arvo"].wire+" from vane "+r["on-arvo"].vane+" with sign "+r["on-arvo"].sign),r["on-fail"]&&(s="+on-fail on "+r["on-fail"]),n.apps[r.app].events.push(s)}}verbStatus(t,n){const r=ln.get(t,"verbStatus",!1);r&&(n.apps[r.app]||(n.apps[r.app]={}),n.apps[r.app].events||(n.apps[r.app].events=[]),n.apps[r.app].events.push(r.msg))}verbEventPlus(t,n){const r=ln.get(t,"verbEventPlus",!1);r&&(n.logs[r.gill]?(n.logs[r.gill].logs.push(r.log),n.logs[r.gill].newest=r.log.now,n.logsRange.newest=r.log.now):(n.logs[r.gill]={logs:[r.log],oldest:r.log.now,newest:r.log.now},n.logsRange.oldest=Math.min(n.logsRange.oldest||r.log.now,r.log.now),n.logsRange.newest=r.log.now))}threads(t,n){const r=ln.get(t,"threads",!1);r&&(n.threads=r)}amesPeers(t,n){const r=ln.get(t,"amesPeers",!1);r&&(n.peers.known=r.known,n.peers.alien=r.alien)}amesPeer(t,n){const r=ln.get(t,"amesPeer",!1);r&&(n.peers.deets[r.who]=r)}behnTimers(t,n){const r=ln.get(t,"behnTimers",!1);r&&(n.timers=r)}clayCommits(t,n){const r=ln.get(t,"clayCommits",!1);r&&(console.log("clay comms",r),n.commits=r)}eyreBindings(t,n){const r=ln.get(t,"eyreBindings",!1);r&&(n.bindings=r)}eyreCache(t,n){const r=ln.get(t,"eyreCache",!1);r&&(n.cache=r)}eyreConnections(t,n){const r=ln.get(t,"eyreConnections",!1);r&&(n.connections=r)}eyreAuthentication(t,n){const r=ln.get(t,"eyreAuthentication",!1);r&&(n.authentication=r)}eyreChannels(t,n){const r=ln.get(t,"eyreChannels",!1);r&&(n.channels=r)}}class E3{constructor(){this.state={status:null,apps:{},logs:{},logsRange:{oldest:null,newest:null},threads:{},peers:{known:[],alien:[],deets:{}},timers:[],commits:[],bindings:[],cache:[],connections:[],authentication:{sessions:[],visitors:[],visiting:[]},channels:[],sidebarShown:!0},this.localReducer=new O3,this.setState=()=>{}}setStateHandler(t){this.setState=t}handleEvent(t){let n;t.data?n=t.data:n=t,console.log("event",n),this.localReducer.reduce(n,this.state),this.setState(this.state)}addLogs(t,n,r){let s=this.state.logs[t],a=this.state.logsRange;s?n<(s.oldest||n+1)?(s.logs=[...r,...s.logs],s.oldest=r[0].now,a.oldest=Math.min(a.oldest||s.oldest,s.oldest)):n>s.newest?(s.logs=[...s.logs,...r],s.newest=r[r.length-1].now,a.newest=Math.max(a.newest||s.newest,s.newest)):console.log(`assuming duplicate load for ${t}, ignoring logs at ${n}`):(s={logs:r,oldest:r[0].now,newest:r[r.length-1].now},a.oldest=Math.min(a.oldest||s.oldest,s.oldest),a.newest=Math.max(a.newest||s.newest,s.newest)),this.state.logs[t]=s,this.state.logsRange=a,this.setState(this.state)}clearLogs(){this.state.logs={},this.state.logsRange={oldest:null,newest:null},this.setState(this.state)}}let qe=new E3;window.store=qe;//! moment.js +}`;var be=Ny(function(){return Ve(k,ve+"return "+ee).apply(n,D)});if(be.source=ee,tp(be))throw be;return be}function nT(i){return Ze(i).toLowerCase()}function rT(i){return Ze(i).toUpperCase()}function iT(i,o,l){if(i=Ze(i),i&&(l||o===n))return Yg(i);if(!i||!(o=ur(o)))return i;var d=Vr(i),w=Vr(o),k=Gg(d,w),D=Vg(d,w)+1;return xs(d,k,D).join("")}function sT(i,o,l){if(i=Ze(i),i&&(l||o===n))return i.slice(0,Qg(i)+1);if(!i||!(o=ur(o)))return i;var d=Vr(i),w=Vg(d,Vr(o))+1;return xs(d,0,w).join("")}function oT(i,o,l){if(i=Ze(i),i&&(l||o===n))return i.replace(fs,"");if(!i||!(o=ur(o)))return i;var d=Vr(i),w=Gg(d,Vr(o));return xs(d,w).join("")}function aT(i,o){var l=fe,d=P;if(Vt(o)){var w="separator"in o?o.separator:w;l="length"in o?Ee(o.length):l,d="omission"in o?ur(o.omission):d}i=Ze(i);var k=i.length;if(ea(i)){var D=Vr(i);k=D.length}if(l>=k)return i;var j=l-ta(d);if(j<1)return d;var W=D?xs(D,0,j).join(""):i.slice(0,j);if(w===n)return W+d;if(D&&(j+=W.length-j),np(w)){if(i.slice(j).search(w)){var V,q=W;for(w.global||(w=yd(w.source,Ze(Cn.exec(w))+"g")),w.lastIndex=0;V=w.exec(q);)var ee=V.index;W=W.slice(0,ee===n?j:ee)}}else if(i.indexOf(ur(w),j)!=j){var ue=W.lastIndexOf(w);ue>-1&&(W=W.slice(0,ue))}return W+d}function lT(i){return i=Ze(i),i&&wt.test(i)?i.replace(Ks,IM):i}var uT=la(function(i,o,l){return i+(l?" ":"")+o.toUpperCase()}),sp=Iv("toUpperCase");function jy(i,o,l){return i=Ze(i),o=l?n:o,o===n?DM(i)?$M(i):MM(i):i.match(o)||[]}var Ny=Pe(function(i,o){try{return mn(i,n,o)}catch(l){return tp(l)?l:new ke(l)}}),fT=Wi(function(i,o){return Er(o,function(l){l=wi(l),Ui(i,l,Jd(i[l],i))}),i});function cT(i){var o=i==null?0:i.length,l=_e();return i=o?Ht(i,function(d){if(typeof d[1]!="function")throw new Tr(u);return[l(d[0]),d[1]]}):[],Pe(function(d){for(var w=-1;++wR)return[];var l=M,d=On(i,M);o=_e(o),i-=M;for(var w=md(d,o);++l0||o<0)?new Le(l):(i<0?l=l.takeRight(-i):i&&(l=l.drop(i)),o!==n&&(o=Ee(o),l=o<0?l.dropRight(-o):l.take(o-i)),l)},Le.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},Le.prototype.toArray=function(){return this.take(M)},vi(Le.prototype,function(i,o){var l=/^(?:filter|find|map|reject)|While$/.test(o),d=/^(?:head|last)$/.test(o),w=x[d?"take"+(o=="last"?"Right":""):o],k=d||/^find/.test(o);w&&(x.prototype[o]=function(){var D=this.__wrapped__,j=d?[1]:arguments,W=D instanceof Le,V=j[0],q=W||Oe(D),ee=function(Ae){var Fe=w.apply(x,ms([Ae],j));return d&&ue?Fe[0]:Fe};q&&l&&typeof V=="function"&&V.length!=1&&(W=q=!1);var ue=this.__chain__,ve=!!this.__actions__.length,xe=k&&!ue,be=W&&!ve;if(!k&&q){D=be?D:new Le(this);var Se=i.apply(D,j);return Se.__actions__.push({func:Pf,args:[ee],thisArg:n}),new br(Se,ue)}return xe&&be?i.apply(this,j):(Se=this.thru(ee),xe?d?Se.value()[0]:Se.value():Se)})}),Er(["pop","push","shift","sort","splice","unshift"],function(i){var o=tf[i],l=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",d=/^(?:pop|shift)$/.test(i);x.prototype[i]=function(){var w=arguments;if(d&&!this.__chain__){var k=this.value();return o.apply(Oe(k)?k:[],w)}return this[l](function(D){return o.apply(Oe(D)?D:[],w)})}}),vi(Le.prototype,function(i,o){var l=x[o];if(l){var d=l.name+"";et.call(sa,d)||(sa[d]=[]),sa[d].push({name:o,func:l})}}),sa[Mf(n,N).name]=[{name:"wrapper",func:n}],Le.prototype.clone=l2,Le.prototype.reverse=u2,Le.prototype.value=f2,x.prototype.at=UC,x.prototype.chain=$C,x.prototype.commit=WC,x.prototype.next=BC,x.prototype.plant=HC,x.prototype.reverse=YC,x.prototype.toJSON=x.prototype.valueOf=x.prototype.value=GC,x.prototype.first=x.prototype.head,cl&&(x.prototype[cl]=zC),x},na=WM();en?((en.exports=na)._=na,mt._=na):Ie._=na}).call(Fr)})(Qc,Qc.exports);var C3=Qc.exports;const ln=_u(C3);class O3{reduce(t,n){const r=ln.get(t,"local",!1);r&&(this.status(r,n),this.apps(r,n),this.app(r,n),this.appState(r,n),this.appFailed(r,n),this.verbResult(r,n),this.verbStatus(r,n),this.verbEventPlus(r,n),this.threads(r,n),this.amesPeers(r,n),this.amesPeer(r,n),this.behnTimers(r,n),this.clayCommits(r,n),this.eyreBindings(r,n),this.eyreCache(r,n),this.eyreConnections(r,n),this.eyreAuthentication(r,n),this.eyreChannels(r,n))}status(t,n){const r=ln.get(t,"status",!1);r&&(n.status=r)}apps(t,n){const r=ln.get(t,"apps",!1);r&&Object.keys(r).map(s=>{n.apps[s]||(n.apps[s]=r[s])})}app(t,n){const r=ln.get(t,"app",!1);r&&(n.apps[r.app]&&(r.state=n.apps[r.app].state),n.apps[r.app]=r)}appState(t,n){const r=ln.get(t,"appState",!1);r&&(n.apps[r.app].state=r.state)}appFailed(t,n){const r=ln.get(t,"appFailed",!1);r&&(console.log("loading app deets failed",r),n.apps[r]={noDebug:!0})}verbResult(t,n){const r=ln.get(t,"verbResult",!1);if(r){n.apps[r.app]||(n.apps[r.app]={}),n.apps[r.app].events||(n.apps[r.app].events=[]);let s="some event";r["on-init"]&&(s="+on-init"),r["on-load"]&&(s="+on-load"),r["on-poke"]&&(s="+on-poke with mark "+r["on-poke"]),r["on-watch"]&&(s="+on-watch at path "+r["on-watch"]),r["on-leave"]&&(s="+on-leave on path "+r["on-leave"]),r["on-agent"]&&(s="+on-agent at wire "+r["on-agent"].wire+" with sign "+r["on-agent"].sign),r["on-arvo"]&&(s="+on-arvo at wire "+r["on-arvo"].wire+" from vane "+r["on-arvo"].vane+" with sign "+r["on-arvo"].sign),r["on-fail"]&&(s="+on-fail on "+r["on-fail"]),n.apps[r.app].events.push(s)}}verbStatus(t,n){const r=ln.get(t,"verbStatus",!1);r&&(n.apps[r.app]||(n.apps[r.app]={}),n.apps[r.app].events||(n.apps[r.app].events=[]),n.apps[r.app].events.push(r.msg))}verbEventPlus(t,n){const r=ln.get(t,"verbEventPlus",!1);r&&(n.logs[r.gill]?(n.logs[r.gill].logs.push(r.log),n.logs[r.gill].newest=r.log.now,n.logsRange.newest=r.log.now):(n.logs[r.gill]={logs:[r.log],oldest:r.log.now,newest:r.log.now},n.logsRange.oldest=Math.min(n.logsRange.oldest||r.log.now,r.log.now),n.logsRange.newest=r.log.now))}threads(t,n){const r=ln.get(t,"threads",!1);r&&(n.threads=r)}amesPeers(t,n){const r=ln.get(t,"amesPeers",!1);r&&(n.peers.known=r.known,n.peers.alien=r.alien)}amesPeer(t,n){const r=ln.get(t,"amesPeer",!1);r&&(n.peers.deets[r.who]=r)}behnTimers(t,n){const r=ln.get(t,"behnTimers",!1);r&&(n.timers=r)}clayCommits(t,n){const r=ln.get(t,"clayCommits",!1);r&&(console.log("clay comms",r),n.commits=r)}eyreBindings(t,n){const r=ln.get(t,"eyreBindings",!1);r&&(n.bindings=r)}eyreCache(t,n){const r=ln.get(t,"eyreCache",!1);r&&(n.cache=r)}eyreConnections(t,n){const r=ln.get(t,"eyreConnections",!1);r&&(n.connections=r)}eyreAuthentication(t,n){const r=ln.get(t,"eyreAuthentication",!1);r&&(n.authentication=r)}eyreChannels(t,n){const r=ln.get(t,"eyreChannels",!1);r&&(n.channels=r)}}class E3{constructor(){this.state={status:null,apps:{},logs:{},logsRange:{oldest:null,newest:null},threads:{},peers:{known:[],alien:[],deets:{}},timers:[],commits:[],bindings:[],cache:[],connections:[],authentication:{sessions:[],visitors:[],visiting:[]},channels:[],sidebarShown:!0},this.localReducer=new O3,this.setState=()=>{}}setStateHandler(t){this.setState=t}handleEvent(t){let n;t.data?n=t.data:n=t,console.log("event",n),this.localReducer.reduce(n,this.state),this.setState(this.state)}addLogs(t,n,r){let s=this.state.logs[t],a=this.state.logsRange;s?n<(s.oldest||n+1)?(s.logs=[...r,...s.logs],s.oldest=r[0].now,a.oldest=Math.min(a.oldest||s.oldest,s.oldest)):n>s.newest?(s.logs=[...s.logs,...r],s.newest=r[r.length-1].now,a.newest=Math.max(a.newest||s.newest,s.newest)):console.log(`assuming duplicate load for ${t}, ignoring logs at ${n}`):(s={logs:r,oldest:r[0].now,newest:r[r.length-1].now},a.oldest=Math.min(a.oldest||s.oldest,s.oldest),a.newest=Math.max(a.newest||s.newest,s.newest)),this.state.logs[t]=s,this.state.logsRange=a,this.setState(this.state)}clearLogs(){this.state.logs={},this.state.logsRange={oldest:null,newest:null},this.setState(this.state)}}let qe=new E3;window.store=qe;//! moment.js //! version : 2.29.3 //! authors : Tim Wood, Iskren Chernev, Moment.js contributors //! license : MIT //! momentjs.com -var Jx;function ce(){return Jx.apply(null,arguments)}function T3(e){Jx=e}function si(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function Ao(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function ze(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function fg(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(ze(e,t))return!1;return!0}function Xn(e){return e===void 0}function as(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function Ou(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function eS(e,t){var n=[],r,s=e.length;for(r=0;r>>0,r;for(r=0;r0)for(n=0;n>>0,r;for(r=0;r0)for(n=0;n=0;return(a?n?"+":"":"-")+Math.pow(10,Math.max(0,s)).toString().substr(1)+r}var pg=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,nc=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,zp={},Fa={};function we(e,t,n,r){var s=r;typeof r=="string"&&(s=function(){return this[r]()}),e&&(Fa[e]=s),t&&(Fa[t[0]]=function(){return bi(s.apply(this,arguments),t[1],t[2])}),n&&(Fa[n]=function(){return this.localeData().ordinal(s.apply(this,arguments),e)})}function A3(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function L3(e){var t=e.match(pg),n,r;for(n=0,r=t.length;n=0&&nc.test(e);)e=e.replace(nc,r),nc.lastIndex=0,n-=1;return e}var j3={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function N3(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(pg).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var I3="Invalid date";function F3(){return this._invalidDate}var U3="%d",$3=/\d{1,2}/;function W3(e){return this._ordinal.replace("%d",e)}var B3={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function z3(e,t,n,r){var s=this._relativeTime[n];return Ri(s)?s(e,t,n,r):s.replace(/%d/i,e)}function H3(e,t){var n=this._relativeTime[e>0?"future":"past"];return Ri(n)?n(t):n.replace(/%s/i,t)}var Kl={};function An(e,t){var n=e.toLowerCase();Kl[n]=Kl[n+"s"]=Kl[t]=e}function Hr(e){return typeof e=="string"?Kl[e]||Kl[e.toLowerCase()]:void 0}function mg(e){var t={},n,r;for(r in e)ze(e,r)&&(n=Hr(r),n&&(t[n]=e[r]));return t}var iS={};function Ln(e,t){iS[e]=t}function Y3(e){var t=[],n;for(n in e)ze(e,n)&&t.push({unit:n,priority:iS[n]});return t.sort(function(r,s){return r.priority-s.priority}),t}function Nh(e){return e%4===0&&e%100!==0||e%400===0}function Nr(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function De(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=Nr(t)),n}function il(e,t){return function(n){return n!=null?(sS(this,e,n),ce.updateOffset(this,t),this):Kc(this,e)}}function Kc(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function sS(e,t,n){e.isValid()&&!isNaN(n)&&(t==="FullYear"&&Nh(e.year())&&e.month()===1&&e.date()===29?(n=De(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Bh(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function G3(e){return e=Hr(e),Ri(this[e])?this[e]():this}function V3(e,t){if(typeof e=="object"){e=mg(e);var n=Y3(e),r,s=n.length;for(r=0;r68?1900:2e3)};var mS=il("FullYear",!0);function hD(){return Nh(this.year())}function dD(e,t,n,r,s,a,u){var c;return e<100&&e>=0?(c=new Date(e+400,t,n,r,s,a,u),isFinite(c.getFullYear())&&c.setFullYear(e)):c=new Date(e,t,n,r,s,a,u),c}function vu(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Xc(e,t,n){var r=7+t-n,s=(7+vu(e,0,r).getUTCDay()-t)%7;return-s+r-1}function gS(e,t,n,r,s){var a=(7+n-r)%7,u=Xc(e,r,s),c=1+7*(t-1)+a+u,p,v;return c<=0?(p=e-1,v=Zl(p)+c):c>Zl(e)?(p=e+1,v=c-Zl(e)):(p=e,v=c),{year:p,dayOfYear:v}}function yu(e,t,n){var r=Xc(e.year(),t,n),s=Math.floor((e.dayOfYear()-r-1)/7)+1,a,u;return s<1?(u=e.year()-1,a=s+ns(u,t,n)):s>ns(e.year(),t,n)?(a=s-ns(e.year(),t,n),u=e.year()+1):(u=e.year(),a=s),{week:a,year:u}}function ns(e,t,n){var r=Xc(e,t,n),s=Xc(e+1,t,n);return(Zl(e)-r+s)/7}we("w",["ww",2],"wo","week");we("W",["WW",2],"Wo","isoWeek");An("week","w");An("isoWeek","W");Ln("week",5);Ln("isoWeek",5);pe("w",Lt);pe("ww",Lt,Mr);pe("W",Lt);pe("WW",Lt,Mr);bu(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=De(e)});function pD(e){return yu(e,this._week.dow,this._week.doy).week}var mD={dow:0,doy:6};function gD(){return this._week.dow}function vD(){return this._week.doy}function yD(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function wD(e){var t=yu(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}we("d",0,"do","day");we("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});we("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});we("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});we("e",0,0,"weekday");we("E",0,0,"isoWeekday");An("day","d");An("weekday","e");An("isoWeekday","E");Ln("day",11);Ln("weekday",11);Ln("isoWeekday",11);pe("d",Lt);pe("e",Lt);pe("E",Lt);pe("dd",function(e,t){return t.weekdaysMinRegex(e)});pe("ddd",function(e,t){return t.weekdaysShortRegex(e)});pe("dddd",function(e,t){return t.weekdaysRegex(e)});bu(["dd","ddd","dddd"],function(e,t,n,r){var s=n._locale.weekdaysParse(e,r,n._strict);s!=null?t.d=s:Te(n).invalidWeekday=e});bu(["d","e","E"],function(e,t,n,r){t[r]=De(e)});function _D(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function xD(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function yg(e,t){return e.slice(t,7).concat(e.slice(0,t))}var SD="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),vS="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),MD="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),kD=Tu,CD=Tu,OD=Tu;function ED(e,t){var n=si(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?yg(n,this._week.dow):e?n[e.day()]:n}function TD(e){return e===!0?yg(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function bD(e){return e===!0?yg(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function PD(e,t,n){var r,s,a,u=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=Pi([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?t==="dddd"?(s=rn.call(this._weekdaysParse,u),s!==-1?s:null):t==="ddd"?(s=rn.call(this._shortWeekdaysParse,u),s!==-1?s:null):(s=rn.call(this._minWeekdaysParse,u),s!==-1?s:null):t==="dddd"?(s=rn.call(this._weekdaysParse,u),s!==-1||(s=rn.call(this._shortWeekdaysParse,u),s!==-1)?s:(s=rn.call(this._minWeekdaysParse,u),s!==-1?s:null)):t==="ddd"?(s=rn.call(this._shortWeekdaysParse,u),s!==-1||(s=rn.call(this._weekdaysParse,u),s!==-1)?s:(s=rn.call(this._minWeekdaysParse,u),s!==-1?s:null)):(s=rn.call(this._minWeekdaysParse,u),s!==-1||(s=rn.call(this._weekdaysParse,u),s!==-1)?s:(s=rn.call(this._shortWeekdaysParse,u),s!==-1?s:null))}function RD(e,t,n){var r,s,a;if(this._weekdaysParseExact)return PD.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(s=Pi([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(s,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(s,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(s,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(s,"")+"|^"+this.weekdaysShort(s,"")+"|^"+this.weekdaysMin(s,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function DD(e){if(!this.isValid())return e!=null?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return e!=null?(e=_D(e,this.localeData()),this.add(e-t,"d")):t}function AD(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function LD(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=xD(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function jD(e){return this._weekdaysParseExact?(ze(this,"_weekdaysRegex")||wg.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(ze(this,"_weekdaysRegex")||(this._weekdaysRegex=kD),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function ND(e){return this._weekdaysParseExact?(ze(this,"_weekdaysRegex")||wg.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(ze(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=CD),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function ID(e){return this._weekdaysParseExact?(ze(this,"_weekdaysRegex")||wg.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(ze(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=OD),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function wg(){function e(m,O){return O.length-m.length}var t=[],n=[],r=[],s=[],a,u,c,p,v;for(a=0;a<7;a++)u=Pi([2e3,1]).day(a),c=pr(this.weekdaysMin(u,"")),p=pr(this.weekdaysShort(u,"")),v=pr(this.weekdays(u,"")),t.push(c),n.push(p),r.push(v),s.push(c),s.push(p),s.push(v);t.sort(e),n.sort(e),r.sort(e),s.sort(e),this._weekdaysRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function _g(){return this.hours()%12||12}function FD(){return this.hours()||24}we("H",["HH",2],0,"hour");we("h",["hh",2],0,_g);we("k",["kk",2],0,FD);we("hmm",0,0,function(){return""+_g.apply(this)+bi(this.minutes(),2)});we("hmmss",0,0,function(){return""+_g.apply(this)+bi(this.minutes(),2)+bi(this.seconds(),2)});we("Hmm",0,0,function(){return""+this.hours()+bi(this.minutes(),2)});we("Hmmss",0,0,function(){return""+this.hours()+bi(this.minutes(),2)+bi(this.seconds(),2)});function yS(e,t){we(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}yS("a",!0);yS("A",!1);An("hour","h");Ln("hour",13);function wS(e,t){return t._meridiemParse}pe("a",wS);pe("A",wS);pe("H",Lt);pe("h",Lt);pe("k",Lt);pe("HH",Lt,Mr);pe("hh",Lt,Mr);pe("kk",Lt,Mr);pe("hmm",lS);pe("hmmss",uS);pe("Hmm",lS);pe("Hmmss",uS);lt(["H","HH"],pn);lt(["k","kk"],function(e,t,n){var r=De(e);t[pn]=r===24?0:r});lt(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});lt(["h","hh"],function(e,t,n){t[pn]=De(e),Te(n).bigHour=!0});lt("hmm",function(e,t,n){var r=e.length-2;t[pn]=De(e.substr(0,r)),t[ti]=De(e.substr(r)),Te(n).bigHour=!0});lt("hmmss",function(e,t,n){var r=e.length-4,s=e.length-2;t[pn]=De(e.substr(0,r)),t[ti]=De(e.substr(r,2)),t[es]=De(e.substr(s)),Te(n).bigHour=!0});lt("Hmm",function(e,t,n){var r=e.length-2;t[pn]=De(e.substr(0,r)),t[ti]=De(e.substr(r))});lt("Hmmss",function(e,t,n){var r=e.length-4,s=e.length-2;t[pn]=De(e.substr(0,r)),t[ti]=De(e.substr(r,2)),t[es]=De(e.substr(s))});function UD(e){return(e+"").toLowerCase().charAt(0)==="p"}var $D=/[ap]\.?m?\.?/i,WD=il("Hours",!0);function BD(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var _S={calendar:R3,longDateFormat:j3,invalidDate:I3,ordinal:U3,dayOfMonthOrdinalParse:$3,relativeTime:B3,months:nD,monthsShort:fS,week:mD,weekdays:SD,weekdaysMin:MD,weekdaysShort:vS,meridiemParse:$D},Yt={},Ll={},wu;function zD(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(s=zh(a.slice(0,n).join("-")),s)return s;if(r&&r.length>=n&&zD(a,r)>=n-1)break;n--}t++}return wu}function YD(e){return e.match("^[^/\\\\]*$")!=null}function zh(e){var t=null,n;if(Yt[e]===void 0&&typeof module<"u"&&module&&module.exports&&YD(e))try{t=wu._abbr,n=require,n("./locale/"+e),Hs(t)}catch{Yt[e]=null}return Yt[e]}function Hs(e,t){var n;return e&&(Xn(t)?n=us(e):n=xg(e,t),n?wu=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),wu._abbr}function xg(e,t){if(t!==null){var n,r=_S;if(t.abbr=e,Yt[e]!=null)nS("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=Yt[e]._config;else if(t.parentLocale!=null)if(Yt[t.parentLocale]!=null)r=Yt[t.parentLocale]._config;else if(n=zh(t.parentLocale),n!=null)r=n._config;else return Ll[t.parentLocale]||(Ll[t.parentLocale]=[]),Ll[t.parentLocale].push({name:e,config:t}),null;return Yt[e]=new dg(Vm(r,t)),Ll[e]&&Ll[e].forEach(function(s){xg(s.name,s.config)}),Hs(e),Yt[e]}else return delete Yt[e],null}function GD(e,t){if(t!=null){var n,r,s=_S;Yt[e]!=null&&Yt[e].parentLocale!=null?Yt[e].set(Vm(Yt[e]._config,t)):(r=zh(e),r!=null&&(s=r._config),t=Vm(s,t),r==null&&(t.abbr=e),n=new dg(t),n.parentLocale=Yt[e],Yt[e]=n),Hs(e)}else Yt[e]!=null&&(Yt[e].parentLocale!=null?(Yt[e]=Yt[e].parentLocale,e===Hs()&&Hs(e)):Yt[e]!=null&&delete Yt[e]);return Yt[e]}function us(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return wu;if(!si(e)){if(t=zh(e),t)return t;e=[e]}return HD(e)}function VD(){return qm(Yt)}function Sg(e){var t,n=e._a;return n&&Te(e).overflow===-2&&(t=n[Ji]<0||n[Ji]>11?Ji:n[Mi]<1||n[Mi]>Bh(n[Rn],n[Ji])?Mi:n[pn]<0||n[pn]>24||n[pn]===24&&(n[ti]!==0||n[es]!==0||n[Po]!==0)?pn:n[ti]<0||n[ti]>59?ti:n[es]<0||n[es]>59?es:n[Po]<0||n[Po]>999?Po:-1,Te(e)._overflowDayOfYear&&(tMi)&&(t=Mi),Te(e)._overflowWeeks&&t===-1&&(t=J3),Te(e)._overflowWeekday&&t===-1&&(t=eD),Te(e).overflow=t),e}var qD=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,QD=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,KD=/Z|[+-]\d\d(?::?\d\d)?/,rc=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Hp=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],ZD=/^\/?Date\((-?\d+)/i,XD=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,JD={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function xS(e){var t,n,r=e._i,s=qD.exec(r)||QD.exec(r),a,u,c,p,v=rc.length,m=Hp.length;if(s){for(Te(e).iso=!0,t=0,n=v;tZl(u)||e._dayOfYear===0)&&(Te(e)._overflowDayOfYear=!0),n=vu(u,0,e._dayOfYear),e._a[Ji]=n.getUTCMonth(),e._a[Mi]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=s[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[pn]===24&&e._a[ti]===0&&e._a[es]===0&&e._a[Po]===0&&(e._nextDay=!0,e._a[pn]=0),e._d=(e._useUTC?vu:dD).apply(null,r),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[pn]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==a&&(Te(e).weekdayMismatch=!0)}}function aA(e){var t,n,r,s,a,u,c,p,v;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(a=1,u=4,n=va(t.GG,e._a[Rn],yu(At(),1,4).year),r=va(t.W,1),s=va(t.E,1),(s<1||s>7)&&(p=!0)):(a=e._locale._week.dow,u=e._locale._week.doy,v=yu(At(),a,u),n=va(t.gg,e._a[Rn],v.year),r=va(t.w,v.week),t.d!=null?(s=t.d,(s<0||s>6)&&(p=!0)):t.e!=null?(s=t.e+a,(t.e<0||t.e>6)&&(p=!0)):s=a),r<1||r>ns(n,a,u)?Te(e)._overflowWeeks=!0:p!=null?Te(e)._overflowWeekday=!0:(c=gS(n,r,s,a,u),e._a[Rn]=c.year,e._dayOfYear=c.dayOfYear)}ce.ISO_8601=function(){};ce.RFC_2822=function(){};function kg(e){if(e._f===ce.ISO_8601){xS(e);return}if(e._f===ce.RFC_2822){SS(e);return}e._a=[],Te(e).empty=!0;var t=""+e._i,n,r,s,a,u,c=t.length,p=0,v,m;for(s=rS(e._f,e._locale).match(pg)||[],m=s.length,n=0;n0&&Te(e).unusedInput.push(u),t=t.slice(t.indexOf(r)+r.length),p+=r.length),Fa[a]?(r?Te(e).empty=!1:Te(e).unusedTokens.push(a),X3(a,r,e)):e._strict&&!r&&Te(e).unusedTokens.push(a);Te(e).charsLeftOver=c-p,t.length>0&&Te(e).unusedInput.push(t),e._a[pn]<=12&&Te(e).bigHour===!0&&e._a[pn]>0&&(Te(e).bigHour=void 0),Te(e).parsedDateParts=e._a.slice(0),Te(e).meridiem=e._meridiem,e._a[pn]=lA(e._locale,e._a[pn],e._meridiem),v=Te(e).era,v!==null&&(e._a[Rn]=e._locale.erasConvertYear(v,e._a[Rn])),Mg(e),Sg(e)}function lA(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function uA(e){var t,n,r,s,a,u,c=!1,p=e._f.length;if(p===0){Te(e).invalidFormat=!0,e._d=new Date(NaN);return}for(s=0;sthis?this:e:jh()});function CS(e,t){var n,r;if(t.length===1&&si(t[0])&&(t=t[0]),!t.length)return At();for(n=t[0],r=1;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function PA(){if(!Xn(this._isDSTShifted))return this._isDSTShifted;var e={},t;return hg(e,this),e=MS(e),e._a?(t=e._isUTC?Pi(e._a):At(e._a),this._isDSTShifted=this.isValid()&&xA(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function RA(){return this.isValid()?!this._isUTC:!1}function DA(){return this.isValid()?this._isUTC:!1}function ES(){return this.isValid()?this._isUTC&&this._offset===0:!1}var AA=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,LA=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function ai(e,t){var n=e,r=null,s,a,u;return _c(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:as(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=AA.exec(e))?(s=r[1]==="-"?-1:1,n={y:0,d:De(r[Mi])*s,h:De(r[pn])*s,m:De(r[ti])*s,s:De(r[es])*s,ms:De(Km(r[Po]*1e3))*s}):(r=LA.exec(e))?(s=r[1]==="-"?-1:1,n={y:So(r[2],s),M:So(r[3],s),w:So(r[4],s),d:So(r[5],s),h:So(r[6],s),m:So(r[7],s),s:So(r[8],s)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(u=jA(At(n.from),At(n.to)),n={},n.ms=u.milliseconds,n.M=u.months),a=new Hh(n),_c(e)&&ze(e,"_locale")&&(a._locale=e._locale),_c(e)&&ze(e,"_isValid")&&(a._isValid=e._isValid),a}ai.fn=Hh.prototype;ai.invalid=_A;function So(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function uw(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function jA(e,t){var n;return e.isValid()&&t.isValid()?(t=Og(t,e),e.isBefore(t)?n=uw(e,t):(n=uw(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function TS(e,t){return function(n,r){var s,a;return r!==null&&!isNaN(+r)&&(nS(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=n,n=r,r=a),s=ai(n,r),bS(this,s,e),this}}function bS(e,t,n,r){var s=t._milliseconds,a=Km(t._days),u=Km(t._months);e.isValid()&&(r=r??!0,u&&hS(e,Kc(e,"Month")+u*n),a&&sS(e,"Date",Kc(e,"Date")+a*n),s&&e._d.setTime(e._d.valueOf()+s*n),r&&ce.updateOffset(e,a||u))}var NA=TS(1,"add"),IA=TS(-1,"subtract");function PS(e){return typeof e=="string"||e instanceof String}function FA(e){return oi(e)||Ou(e)||PS(e)||as(e)||$A(e)||UA(e)||e===null||e===void 0}function UA(e){var t=Ao(e)&&!fg(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],s,a,u=r.length;for(s=0;sn.valueOf():n.valueOf()9999?wc(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Ri(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",wc(n,"Z")):wc(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function eL(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,s,a;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",s="-MM-DD[T]HH:mm:ss.SSS",a=t+'[")]',this.format(n+r+s+a)}function tL(e){e||(e=this.isUtc()?ce.defaultFormatUtc:ce.defaultFormat);var t=wc(this,e);return this.localeData().postformat(t)}function nL(e,t){return this.isValid()&&(oi(e)&&e.isValid()||At(e).isValid())?ai({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function rL(e){return this.from(At(),e)}function iL(e,t){return this.isValid()&&(oi(e)&&e.isValid()||At(e).isValid())?ai({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function sL(e){return this.to(At(),e)}function RS(e){var t;return e===void 0?this._locale._abbr:(t=us(e),t!=null&&(this._locale=t),this)}var DS=zr("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function AS(){return this._locale}var Jc=1e3,Ua=60*Jc,eh=60*Ua,LS=(365*400+97)*24*eh;function $a(e,t){return(e%t+t)%t}function jS(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-LS:new Date(e,t,n).valueOf()}function NS(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-LS:Date.UTC(e,t,n)}function oL(e){var t,n;if(e=Hr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?NS:jS,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=$a(t+(this._isUTC?0:this.utcOffset()*Ua),eh);break;case"minute":t=this._d.valueOf(),t-=$a(t,Ua);break;case"second":t=this._d.valueOf(),t-=$a(t,Jc);break}return this._d.setTime(t),ce.updateOffset(this,!0),this}function aL(e){var t,n;if(e=Hr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?NS:jS,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=eh-$a(t+(this._isUTC?0:this.utcOffset()*Ua),eh)-1;break;case"minute":t=this._d.valueOf(),t+=Ua-$a(t,Ua)-1;break;case"second":t=this._d.valueOf(),t+=Jc-$a(t,Jc)-1;break}return this._d.setTime(t),ce.updateOffset(this,!0),this}function lL(){return this._d.valueOf()-(this._offset||0)*6e4}function uL(){return Math.floor(this.valueOf()/1e3)}function fL(){return new Date(this.valueOf())}function cL(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function hL(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function dL(){return this.isValid()?this.toISOString():null}function pL(){return cg(this)}function mL(){return Ls({},Te(this))}function gL(){return Te(this).overflow}function vL(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}we("N",0,0,"eraAbbr");we("NN",0,0,"eraAbbr");we("NNN",0,0,"eraAbbr");we("NNNN",0,0,"eraName");we("NNNNN",0,0,"eraNarrow");we("y",["y",1],"yo","eraYear");we("y",["yy",2],0,"eraYear");we("y",["yyy",3],0,"eraYear");we("y",["yyyy",4],0,"eraYear");pe("N",Eg);pe("NN",Eg);pe("NNN",Eg);pe("NNNN",TL);pe("NNNNN",bL);lt(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var s=n._locale.erasParse(e,r,n._strict);s?Te(n).era=s:Te(n).invalidEra=e});pe("y",sl);pe("yy",sl);pe("yyy",sl);pe("yyyy",sl);pe("yo",PL);lt(["y","yy","yyy","yyyy"],Rn);lt(["yo"],function(e,t,n,r){var s;n._locale._eraYearOrdinalRegex&&(s=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Rn]=n._locale.eraYearOrdinalParse(e,s):t[Rn]=parseInt(e,10)});function yL(e,t){var n,r,s,a=this._eras||us("en")._eras;for(n=0,r=a.length;n=0)return a[r]}function _L(e,t){var n=e.since<=e.until?1:-1;return t===void 0?ce(e.since).year():ce(e.since).year()+(t-e.offset)*n}function xL(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;ea&&(t=a),IL.call(this,e,t,n,r,s))}function IL(e,t,n,r,s){var a=gS(e,t,n,r,s),u=vu(a.year,0,a.dayOfYear);return this.year(u.getUTCFullYear()),this.month(u.getUTCMonth()),this.date(u.getUTCDate()),this}we("Q",0,"Qo","quarter");An("quarter","Q");Ln("quarter",7);pe("Q",oS);lt("Q",function(e,t){t[Ji]=(De(e)-1)*3});function FL(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}we("D",["DD",2],"Do","date");An("date","D");Ln("date",9);pe("D",Lt);pe("DD",Lt,Mr);pe("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});lt(["D","DD"],Mi);lt("Do",function(e,t){t[Mi]=De(e.match(Lt)[0])});var FS=il("Date",!0);we("DDD",["DDDD",3],"DDDo","dayOfYear");An("dayOfYear","DDD");Ln("dayOfYear",4);pe("DDD",Fh);pe("DDDD",aS);lt(["DDD","DDDD"],function(e,t,n){n._dayOfYear=De(e)});function UL(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}we("m",["mm",2],0,"minute");An("minute","m");Ln("minute",14);pe("m",Lt);pe("mm",Lt,Mr);lt(["m","mm"],ti);var $L=il("Minutes",!1);we("s",["ss",2],0,"second");An("second","s");Ln("second",15);pe("s",Lt);pe("ss",Lt,Mr);lt(["s","ss"],es);var WL=il("Seconds",!1);we("S",0,0,function(){return~~(this.millisecond()/100)});we(0,["SS",2],0,function(){return~~(this.millisecond()/10)});we(0,["SSS",3],0,"millisecond");we(0,["SSSS",4],0,function(){return this.millisecond()*10});we(0,["SSSSS",5],0,function(){return this.millisecond()*100});we(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});we(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});we(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});we(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});An("millisecond","ms");Ln("millisecond",16);pe("S",Fh,oS);pe("SS",Fh,Mr);pe("SSS",Fh,aS);var js,US;for(js="SSSS";js.length<=9;js+="S")pe(js,sl);function BL(e,t){t[Po]=De(("0."+e)*1e3)}for(js="S";js.length<=9;js+="S")lt(js,BL);US=il("Milliseconds",!1);we("z",0,0,"zoneAbbr");we("zz",0,0,"zoneName");function zL(){return this._isUTC?"UTC":""}function HL(){return this._isUTC?"Coordinated Universal Time":""}var ie=Eu.prototype;ie.add=NA;ie.calendar=zA;ie.clone=HA;ie.diff=ZA;ie.endOf=aL;ie.format=tL;ie.from=nL;ie.fromNow=rL;ie.to=iL;ie.toNow=sL;ie.get=G3;ie.invalidAt=gL;ie.isAfter=YA;ie.isBefore=GA;ie.isBetween=VA;ie.isSame=qA;ie.isSameOrAfter=QA;ie.isSameOrBefore=KA;ie.isValid=pL;ie.lang=DS;ie.locale=RS;ie.localeData=AS;ie.max=pA;ie.min=dA;ie.parsingFlags=mL;ie.set=V3;ie.startOf=oL;ie.subtract=IA;ie.toArray=cL;ie.toObject=hL;ie.toDate=fL;ie.toISOString=JA;ie.inspect=eL;typeof Symbol<"u"&&Symbol.for!=null&&(ie[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});ie.toJSON=dL;ie.toString=XA;ie.unix=uL;ie.valueOf=lL;ie.creationData=vL;ie.eraName=xL;ie.eraNarrow=SL;ie.eraAbbr=ML;ie.eraYear=kL;ie.year=mS;ie.isLeapYear=hD;ie.weekYear=RL;ie.isoWeekYear=DL;ie.quarter=ie.quarters=FL;ie.month=dS;ie.daysInMonth=uD;ie.week=ie.weeks=yD;ie.isoWeek=ie.isoWeeks=wD;ie.weeksInYear=jL;ie.weeksInWeekYear=NL;ie.isoWeeksInYear=AL;ie.isoWeeksInISOWeekYear=LL;ie.date=FS;ie.day=ie.days=DD;ie.weekday=AD;ie.isoWeekday=LD;ie.dayOfYear=UL;ie.hour=ie.hours=WD;ie.minute=ie.minutes=$L;ie.second=ie.seconds=WL;ie.millisecond=ie.milliseconds=US;ie.utcOffset=MA;ie.utc=CA;ie.local=OA;ie.parseZone=EA;ie.hasAlignedHourOffset=TA;ie.isDST=bA;ie.isLocal=RA;ie.isUtcOffset=DA;ie.isUtc=ES;ie.isUTC=ES;ie.zoneAbbr=zL;ie.zoneName=HL;ie.dates=zr("dates accessor is deprecated. Use date instead.",FS);ie.months=zr("months accessor is deprecated. Use month instead",dS);ie.years=zr("years accessor is deprecated. Use year instead",mS);ie.zone=zr("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",kA);ie.isDSTShifted=zr("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",PA);function YL(e){return At(e*1e3)}function GL(){return At.apply(null,arguments).parseZone()}function $S(e){return e}var He=dg.prototype;He.calendar=D3;He.longDateFormat=N3;He.invalidDate=F3;He.ordinal=W3;He.preparse=$S;He.postformat=$S;He.relativeTime=z3;He.pastFuture=H3;He.set=P3;He.eras=yL;He.erasParse=wL;He.erasConvertYear=_L;He.erasAbbrRegex=OL;He.erasNameRegex=CL;He.erasNarrowRegex=EL;He.months=sD;He.monthsShort=oD;He.monthsParse=lD;He.monthsRegex=cD;He.monthsShortRegex=fD;He.week=pD;He.firstDayOfYear=vD;He.firstDayOfWeek=gD;He.weekdays=ED;He.weekdaysMin=bD;He.weekdaysShort=TD;He.weekdaysParse=RD;He.weekdaysRegex=jD;He.weekdaysShortRegex=ND;He.weekdaysMinRegex=ID;He.isPM=UD;He.meridiem=BD;function th(e,t,n,r){var s=us(),a=Pi().set(r,t);return s[n](a,e)}function WS(e,t,n){if(as(e)&&(t=e,e=void 0),e=e||"",t!=null)return th(e,t,n,"month");var r,s=[];for(r=0;r<12;r++)s[r]=th(e,r,n,"month");return s}function bg(e,t,n,r){typeof e=="boolean"?(as(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,as(t)&&(n=t,t=void 0),t=t||"");var s=us(),a=e?s._week.dow:0,u,c=[];if(n!=null)return th(t,(n+a)%7,r,"day");for(u=0;u<7;u++)c[u]=th(t,(u+a)%7,r,"day");return c}function VL(e,t){return WS(e,t,"months")}function qL(e,t){return WS(e,t,"monthsShort")}function QL(e,t,n){return bg(e,t,n,"weekdays")}function KL(e,t,n){return bg(e,t,n,"weekdaysShort")}function ZL(e,t,n){return bg(e,t,n,"weekdaysMin")}Hs("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=De(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});ce.lang=zr("moment.lang is deprecated. Use moment.locale instead.",Hs);ce.langData=zr("moment.langData is deprecated. Use moment.localeData instead.",us);var Gi=Math.abs;function XL(){var e=this._data;return this._milliseconds=Gi(this._milliseconds),this._days=Gi(this._days),this._months=Gi(this._months),e.milliseconds=Gi(e.milliseconds),e.seconds=Gi(e.seconds),e.minutes=Gi(e.minutes),e.hours=Gi(e.hours),e.months=Gi(e.months),e.years=Gi(e.years),this}function BS(e,t,n,r){var s=ai(t,n);return e._milliseconds+=r*s._milliseconds,e._days+=r*s._days,e._months+=r*s._months,e._bubble()}function JL(e,t){return BS(this,e,t,1)}function ej(e,t){return BS(this,e,t,-1)}function fw(e){return e<0?Math.floor(e):Math.ceil(e)}function tj(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,s,a,u,c,p;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=fw(Xm(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,s=Nr(e/1e3),r.seconds=s%60,a=Nr(s/60),r.minutes=a%60,u=Nr(a/60),r.hours=u%24,t+=Nr(u/24),p=Nr(zS(t)),n+=p,t-=fw(Xm(p)),c=Nr(n/12),n%=12,r.days=t,r.months=n,r.years=c,this}function zS(e){return e*4800/146097}function Xm(e){return e*146097/4800}function nj(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=Hr(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+zS(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Xm(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function rj(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+De(this._months/12)*31536e6:NaN}function fs(e){return function(){return this.as(e)}}var ij=fs("ms"),sj=fs("s"),oj=fs("m"),aj=fs("h"),lj=fs("d"),uj=fs("w"),fj=fs("M"),cj=fs("Q"),hj=fs("y");function dj(){return ai(this)}function pj(e){return e=Hr(e),this.isValid()?this[e+"s"]():NaN}function Ho(e){return function(){return this.isValid()?this._data[e]:NaN}}var mj=Ho("milliseconds"),gj=Ho("seconds"),vj=Ho("minutes"),yj=Ho("hours"),wj=Ho("days"),_j=Ho("months"),xj=Ho("years");function Sj(){return Nr(this.days()/7)}var qi=Math.round,Pa={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Mj(e,t,n,r,s){return s.relativeTime(t||1,!!n,e,r)}function kj(e,t,n,r){var s=ai(e).abs(),a=qi(s.as("s")),u=qi(s.as("m")),c=qi(s.as("h")),p=qi(s.as("d")),v=qi(s.as("M")),m=qi(s.as("w")),O=qi(s.as("y")),E=a<=n.ss&&["s",a]||a0,E[4]=r,Mj.apply(null,E)}function Cj(e){return e===void 0?qi:typeof e=="function"?(qi=e,!0):!1}function Oj(e,t){return Pa[e]===void 0?!1:t===void 0?Pa[e]:(Pa[e]=t,e==="s"&&(Pa.ss=t-1),!0)}function Ej(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=Pa,s,a;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},Pa,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),s=this.localeData(),a=kj(this,!n,r,s),n&&(a=s.pastFuture(+this,a)),s.postformat(a)}var Yp=Math.abs;function da(e){return(e>0)-(e<0)||+e}function Gh(){if(!this.isValid())return this.localeData().invalidDate();var e=Yp(this._milliseconds)/1e3,t=Yp(this._days),n=Yp(this._months),r,s,a,u,c=this.asSeconds(),p,v,m,O;return c?(r=Nr(e/60),s=Nr(r/60),e%=60,r%=60,a=Nr(n/12),n%=12,u=e?e.toFixed(3).replace(/\.?0+$/,""):"",p=c<0?"-":"",v=da(this._months)!==da(c)?"-":"",m=da(this._days)!==da(c)?"-":"",O=da(this._milliseconds)!==da(c)?"-":"",p+"P"+(a?v+a+"Y":"")+(n?v+n+"M":"")+(t?m+t+"D":"")+(s||r||e?"T":"")+(s?O+s+"H":"")+(r?O+r+"M":"")+(e?O+u+"S":"")):"P0D"}var $e=Hh.prototype;$e.isValid=wA;$e.abs=XL;$e.add=JL;$e.subtract=ej;$e.as=nj;$e.asMilliseconds=ij;$e.asSeconds=sj;$e.asMinutes=oj;$e.asHours=aj;$e.asDays=lj;$e.asWeeks=uj;$e.asMonths=fj;$e.asQuarters=cj;$e.asYears=hj;$e.valueOf=rj;$e._bubble=tj;$e.clone=dj;$e.get=pj;$e.milliseconds=mj;$e.seconds=gj;$e.minutes=vj;$e.hours=yj;$e.days=wj;$e.weeks=Sj;$e.months=_j;$e.years=xj;$e.humanize=Ej;$e.toISOString=Gh;$e.toString=Gh;$e.toJSON=Gh;$e.locale=RS;$e.localeData=AS;$e.toIsoString=zr("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Gh);$e.lang=DS;we("X",0,0,"unix");we("x",0,0,"valueOf");pe("x",$h);pe("X",Q3);lt("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});lt("x",function(e,t,n){n._d=new Date(De(e))});//! moment.js -ce.version="2.29.3";T3(At);ce.fn=ie;ce.min=mA;ce.max=gA;ce.now=vA;ce.utc=Pi;ce.unix=YL;ce.months=VL;ce.isDate=Ou;ce.locale=Hs;ce.invalid=jh;ce.duration=ai;ce.isMoment=oi;ce.weekdays=QL;ce.parseZone=GL;ce.localeData=us;ce.isDuration=_c;ce.monthsShort=qL;ce.weekdaysMin=ZL;ce.defineLocale=xg;ce.updateLocale=GD;ce.locales=VD;ce.weekdaysShort=KL;ce.normalizeUnits=Hr;ce.relativeTimeRounding=Cj;ce.relativeTimeThreshold=Oj;ce.calendarFormat=BA;ce.prototype=ie;ce.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};function Es(e,t=!1){let n=window.location.href.split("?")[1];return t&&n?n="?"+n:n="","/~debug/"+e+n}function mr(e,t){const n=new Date(e),r=function(s){return s>=10?s:"0"+s};return`~${n.getUTCFullYear()}.${n.getUTCMonth()+1}.${r(n.getUTCDate())}..${r(n.getUTCHours())}.${r(n.getUTCMinutes())}.${r(n.getUTCSeconds())}${t?".."+Math.floor(n.getUTCMilliseconds()/1e3*65536).toString(16).padStart(4,"0"):""}`}function Qi(e){return e.reduce((t,n)=>t+n+" ","")}function Tj(e){let t="";for(let n=0;n=97&&a<=122||a>=48&&a<=57||r==="-"?s=r:s="~"+a.toString(16)+"."}t=t+s}return"~~"+t}class bj{setAuthTokens(t){this.authTokens=t,this.bindPaths=[],this.bind=this.bind.bind(this)}bind(t,n,r=this.authTokens.ship,s,a,u,c){this.bindPaths=ln.uniq([...this.bindPaths,t]),window.subscriptionId=window.urb.subscribe(r,s,t,p=>{u(p)},p=>{a({data:p,from:{ship:r,path:t}})},p=>{c(p)})}action(t,n,r){return new Promise((s,a)=>{window.urb.poke(ship,t,n,r,u=>{s(u)},u=>{a(u)})})}dbugAction(t){return this.action("dbug","dbug-action",t)}bindToVerb(t){return this.bind("/verb/events","PUT",this.authTokens.ship,t,n=>{n.data.app=t,qe.handleEvent({data:{local:{verbResult:n.data}}})},()=>{qe.handleEvent({data:{local:{verbStatus:{app:t,msg:"failed to establish verb connection to "+t}}}})},()=>{qe.handleEvent({data:{local:{verbStatus:{app:t,msg:"verb connection to "+t+" was dropped"}}}})})}bindToVerbPlus(t){return this.bind("/verb/events-plus","PUT",this.authTokens.ship,t,n=>{n.data.app=t,qe.handleEvent({data:{local:{verbEventPlus:{gill:`~${this.authTokens.ship}/${t}`,log:n.data}}}})},()=>{qe.handleEvent({data:{local:{verbStatus:{app:t,msg:"failed to establish verb+ connection to "+t}}}})},()=>{qe.handleEvent({data:{local:{verbStatus:{app:t,msg:"verb+ connection to "+t+" was dropped"}}}})})}getJson(t,n,r){let s="/~debug"+t+".json";const a=window.location.href.split("?")[1];a&&(s=s+"?"+a),fetch(s).then(u=>{if(!u.ok)console.error("Network response not ok"),r();else return u.json()}).then(u=>{qe.handleEvent({data:{local:n(u)}})}).catch(u=>{console.error(`JSON fetch on ${s} failed:`,u),r()})}wrapLocal(t){return n=>{let r={};return r[t]=n,r.status=null,r}}showStatus(t){return()=>{qe.handleEvent({data:{local:{status:t}}})}}getApps(){this.getJson("/apps",this.wrapLocal("apps"),this.showStatus("error fetching apps"))}getAppDetails(t){this.getJson("/app/"+t,n=>(n.app=t,this.wrapLocal("app")(n)),()=>{qe.handleEvent({data:{local:{appFailed:t}}})})}getAppState(t,n=""){n!==""&&(n="/"+Tj(n)),this.getJson("/app/"+t+"/state"+n,r=>(r.app=t,this.wrapLocal("appState")(r)),()=>{qe.handleEvent({data:{local:{appFailed:t}}})})}getThreads(){this.getJson("/spider/threads",this.wrapLocal("threads"),this.showStatus("error fetching threads"))}killThread(t){return this.action("spider","spider-stop",{tid:t,nice:!1}).then(this.getThreads.bind(this))}getPeers(){this.getJson("/ames/peer",this.wrapLocal("amesPeers"),this.showStatus("error fetching ames peers"))}getPeer(t){this.getJson(`/ames/peer/${t}`,n=>(n.who=t,this.wrapLocal("amesPeer")(n)),this.showStatus("error fetching ames details for "+t))}getTimers(){this.getJson("/behn/timers",this.wrapLocal("behnTimers"),this.showStatus("error fetching behn timers"))}getCommits(){this.getJson("/clay/commits",this.wrapLocal("clayCommits"),this.showStatus("error fetching clay commits"))}getBindings(){this.getJson("/eyre/bindings",this.wrapLocal("eyreBindings"),this.showStatus("error fetching eyre bindings"))}getCache(){this.getJson("/eyre/cache",this.wrapLocal("eyreCache"),this.showStatus("error fetching eyre cache"))}getConnections(){this.getJson("/eyre/connections",this.wrapLocal("eyreConnections"),this.showStatus("error fetching eyre connections"))}getAuthenticationState(){this.getJson("/eyre/authentication",this.wrapLocal("eyreAuthentication"),this.showStatus("error fetching eyre authentication state"))}getChannels(){this.getJson("/eyre/channels",this.wrapLocal("eyreChannels"),this.showStatus("error fetching eyre channels"))}clearCache(t){return this.action("dbug","json",{"clear-eyre-cache":{url:t}}).then(this.getCache.bind(this))}sidebarToggle(){let t=!0;qe.state.sidebarShown===!0&&(t=!1),qe.handleEvent({data:{local:{sidebarToggle:t}}})}}let Pg=new bj;window.api=Pg;class Pj{start(){Pg.authTokens||console.error("~~~ ERROR: Must set api.authTokens before operation ~~~")}handleEvent(t){qe.handleEvent(t)}handleError(t){console.error(t)}handleQuitSilently(t){}handleQuitAndResubscribe(t){}}let Rj=new Pj;class Dj extends oe.Component{render(){const{props:t}=this;let n=t.selected?"bg-gray5 bg-gray1-d":"pointer hover-bg-gray5 hover-bg-gray1-d";return y.jsx(ug,{to:Es(t.what,!0),children:y.jsx("div",{className:"w-100 v-mid f9 ph4 z1 pv1 "+n,children:y.jsx("p",{className:"f9 dib",children:t.what})})},"what")}}class Os extends oe.Component{render(){const{props:t}=this;let n=["apps","logs","spider","ames","behn","eyre"];n=n.map(a=>y.jsx(Dj,{what:a,selected:t.selected===a}));let r=this.props.rightPanelHide?"dn-s":"";const s=t.status?y.jsx("div",{style:{position:"absolute",right:"16px",bottom:"16px",padding:"8px",border:"1px solid #e22"},children:t.status}):null;return y.jsx("div",{className:"absolute h-100 w-100 mono",children:y.jsxs("div",{className:"cf w-100 h-100 flex",children:[y.jsxs("div",{className:"bn br-m br-l br-xl b--gray4 b--gray1-d lh-copy h-100 flex-shrink-0 mw5-m mw5-l mw5-xl pt3 pt0-m pt0-l pt0-xl relative",children:[y.jsx("a",{className:"db dn-m dn-l dn-xl f8 pb3 pl3",href:"/",children:"⟵ Landscape"}),y.jsxs("div",{className:"overflow-y-scroll h-100",children:[y.jsx("div",{className:"w-100 bg-transparent",children:y.jsx(ug,{className:"dib f9 pointer green2 gray4-d pa4",to:"/~chat/join/~/~dopzod/urbit-help",children:"Get help"})}),n]})]}),s,y.jsx("div",{className:"h-100 w-100 flex-auto overflow-scroll relative "+r,style:{flexGrow:1,padding:"8px"},children:this.props.children})]})})}}class Aj extends oe.Component{render(){return y.jsx("div",{className:"h-100 w-100 overflow-x-hidden flex flex-column bg-white bg-gray0-d dn db-ns",children:y.jsx("div",{className:"pl3 pr3 pt2 dt pb3 w-100 h-100",children:y.jsx("p",{className:"f8 pt3 gray2 w-100 h-100 dtc v-mid tc",children:this.props.text})})})}}var Rg={exports:{}};const Lj={},jj=Object.freeze(Object.defineProperty({__proto__:null,default:Lj},Symbol.toStringTag,{value:"Module"})),Nj=ZT(jj);Rg.exports;(function(e){(function(t,n){function r(P,f){if(!P)throw new Error(f||"Assertion failed")}function s(P,f){P.super_=f;var g=function(){};g.prototype=f.prototype,P.prototype=new g,P.prototype.constructor=P}function a(P,f,g){if(a.isBN(P))return P;this.negative=0,this.words=null,this.length=0,this.red=null,P!==null&&((f==="le"||f==="be")&&(g=f,f=10),this._init(P||0,f||10,g||"be"))}typeof t=="object"?t.exports=a:n.BN=a,a.BN=a,a.wordSize=26;var u;try{typeof window<"u"&&typeof window.Buffer<"u"?u=window.Buffer:u=Nj.Buffer}catch{}a.isBN=function(f){return f instanceof a?!0:f!==null&&typeof f=="object"&&f.constructor.wordSize===a.wordSize&&Array.isArray(f.words)},a.max=function(f,g){return f.cmp(g)>0?f:g},a.min=function(f,g){return f.cmp(g)<0?f:g},a.prototype._init=function(f,g,S){if(typeof f=="number")return this._initNumber(f,g,S);if(typeof f=="object")return this._initArray(f,g,S);g==="hex"&&(g=16),r(g===(g|0)&&g>=2&&g<=36),f=f.toString().replace(/\s+/g,"");var C=0;f[0]==="-"&&(C++,this.negative=1),C=0;C-=3)L=f[C]|f[C-1]<<8|f[C-2]<<16,this.words[b]|=L<>>26-R&67108863,R+=24,R>=26&&(R-=26,b++);else if(S==="le")for(C=0,b=0;C>>26-R&67108863,R+=24,R>=26&&(R-=26,b++);return this.strip()};function c(P,f){var g=P.charCodeAt(f);return g>=65&&g<=70?g-55:g>=97&&g<=102?g-87:g-48&15}function p(P,f,g){var S=c(P,g);return g-1>=f&&(S|=c(P,g-1)<<4),S}a.prototype._parseHex=function(f,g,S){this.length=Math.ceil((f.length-g)/6),this.words=new Array(this.length);for(var C=0;C=g;C-=2)R=p(f,g,C)<=18?(b-=18,L+=1,this.words[L]|=R>>>26):b+=8;else{var _=f.length-g;for(C=_%2===0?g+1:g;C=18?(b-=18,L+=1,this.words[L]|=R>>>26):b+=8}this.strip()};function v(P,f,g,S){for(var C=0,b=Math.min(P.length,g),L=f;L=49?C+=R-49+10:R>=17?C+=R-17+10:C+=R}return C}a.prototype._parseBase=function(f,g,S){this.words=[0],this.length=1;for(var C=0,b=1;b<=67108863;b*=g)C++;C--,b=b/g|0;for(var L=f.length-S,R=L%C,_=Math.min(L,L-R)+S,h=0,M=S;M<_;M+=C)h=v(f,M,M+C,g),this.imuln(b),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h);if(R!==0){var G=1;for(h=v(f,M,f.length,g),M=0;M1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},a.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var m=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],O=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],E=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];a.prototype.toString=function(f,g){f=f||10,g=g|0||1;var S;if(f===16||f==="hex"){S="";for(var C=0,b=0,L=0;L>>24-C&16777215,b!==0||L!==this.length-1?S=m[6-_.length]+_+S:S=_+S,C+=2,C>=26&&(C-=26,L--)}for(b!==0&&(S=b.toString(16)+S);S.length%g!==0;)S="0"+S;return this.negative!==0&&(S="-"+S),S}if(f===(f|0)&&f>=2&&f<=36){var h=O[f],M=E[f];S="";var G=this.clone();for(G.negative=0;!G.isZero();){var se=G.modn(M).toString(f);G=G.idivn(M),G.isZero()?S=se+S:S=m[h-se.length]+se+S}for(this.isZero()&&(S="0"+S);S.length%g!==0;)S="0"+S;return this.negative!==0&&(S="-"+S),S}r(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var f=this.words[0];return this.length===2?f+=this.words[1]*67108864:this.length===3&&this.words[2]===1?f+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-f:f},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(f,g){return r(typeof u<"u"),this.toArrayLike(u,f,g)},a.prototype.toArray=function(f,g){return this.toArrayLike(Array,f,g)},a.prototype.toArrayLike=function(f,g,S){var C=this.byteLength(),b=S||Math.max(1,C);r(C<=b,"byte array longer than desired length"),r(b>0,"Requested array length <= 0"),this.strip();var L=g==="le",R=new f(b),_,h,M=this.clone();if(L){for(h=0;!M.isZero();h++)_=M.andln(255),M.iushrn(8),R[h]=_;for(;h=4096&&(S+=13,g>>>=13),g>=64&&(S+=7,g>>>=7),g>=8&&(S+=4,g>>>=4),g>=2&&(S+=2,g>>>=2),S+g},a.prototype._zeroBits=function(f){if(f===0)return 26;var g=f,S=0;return g&8191||(S+=13,g>>>=13),g&127||(S+=7,g>>>=7),g&15||(S+=4,g>>>=4),g&3||(S+=2,g>>>=2),g&1||S++,S},a.prototype.bitLength=function(){var f=this.words[this.length-1],g=this._countBits(f);return(this.length-1)*26+g};function F(P){for(var f=new Array(P.bitLength()),g=0;g>>C}return f}a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var f=0,g=0;gf.length?this.clone().ior(f):f.clone().ior(this)},a.prototype.uor=function(f){return this.length>f.length?this.clone().iuor(f):f.clone().iuor(this)},a.prototype.iuand=function(f){var g;this.length>f.length?g=f:g=this;for(var S=0;Sf.length?this.clone().iand(f):f.clone().iand(this)},a.prototype.uand=function(f){return this.length>f.length?this.clone().iuand(f):f.clone().iuand(this)},a.prototype.iuxor=function(f){var g,S;this.length>f.length?(g=this,S=f):(g=f,S=this);for(var C=0;Cf.length?this.clone().ixor(f):f.clone().ixor(this)},a.prototype.uxor=function(f){return this.length>f.length?this.clone().iuxor(f):f.clone().iuxor(this)},a.prototype.inotn=function(f){r(typeof f=="number"&&f>=0);var g=Math.ceil(f/26)|0,S=f%26;this._expand(g),S>0&&g--;for(var C=0;C0&&(this.words[C]=~this.words[C]&67108863>>26-S),this.strip()},a.prototype.notn=function(f){return this.clone().inotn(f)},a.prototype.setn=function(f,g){r(typeof f=="number"&&f>=0);var S=f/26|0,C=f%26;return this._expand(S+1),g?this.words[S]=this.words[S]|1<f.length?(S=this,C=f):(S=f,C=this);for(var b=0,L=0;L>>26;for(;b!==0&&L>>26;if(this.length=S.length,b!==0)this.words[this.length]=b,this.length++;else if(S!==this)for(;Lf.length?this.clone().iadd(f):f.clone().iadd(this)},a.prototype.isub=function(f){if(f.negative!==0){f.negative=0;var g=this.iadd(f);return f.negative=1,g._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(f),this.negative=1,this._normSign();var S=this.cmp(f);if(S===0)return this.negative=0,this.length=1,this.words[0]=0,this;var C,b;S>0?(C=this,b=f):(C=f,b=this);for(var L=0,R=0;R>26,this.words[R]=g&67108863;for(;L!==0&&R>26,this.words[R]=g&67108863;if(L===0&&R>>26,G=_&67108863,se=Math.min(h,f.length-1),ae=Math.max(0,h-P.length+1);ae<=se;ae++){var re=h-ae|0;C=P.words[re]|0,b=f.words[ae]|0,L=C*b+G,M+=L/67108864|0,G=L&67108863}g.words[h]=G|0,_=M|0}return _!==0?g.words[h]=_|0:g.length--,g.strip()}var K=function(f,g,S){var C=f.words,b=g.words,L=S.words,R=0,_,h,M,G=C[0]|0,se=G&8191,ae=G>>>13,re=C[1]|0,ye=re&8191,Me=re>>>13,Be=C[2]|0,Re=Be&8191,Xe=Be>>>13,ui=C[3]|0,Je=ui&8191,vt=ui>>>13,_n=C[4]|0,rt=_n&8191,jt=_n>>>13,Gn=C[5]|0,Ct=Gn&8191,Nt=Gn>>>13,fi=C[6]|0,Ue=fi&8191,it=fi>>>13,Di=C[7]|0,It=Di&8191,st=Di>>>13,Yo=C[8]|0,Ye=Yo&8191,Ge=Yo>>>13,Ai=C[9]|0,Ne=Ai&8191,ut=Ai>>>13,Li=b[0]|0,yt=Li&8191,ft=Li>>>13,Yr=b[1]|0,ct=Yr&8191,ht=Yr>>>13,Go=b[2]|0,Ke=Go&8191,Ot=Go>>>13,Ks=b[3]|0,Et=Ks&8191,wt=Ks>>>13,ci=b[4]|0,_t=ci&8191,xt=ci>>>13,ji=b[5]|0,ot=ji&8191,Ft=ji>>>13,Vo=b[6]|0,St=Vo&8191,Ut=Vo>>>13,cs=b[7]|0,Tt=cs&8191,Mt=cs>>>13,Cr=b[8]|0,$t=Cr&8191,Wt=Cr>>>13,qo=b[9]|0,Bt=qo&8191,zt=qo>>>13;S.negative=f.negative^g.negative,S.length=19,_=Math.imul(se,yt),h=Math.imul(se,ft),h=h+Math.imul(ae,yt)|0,M=Math.imul(ae,ft);var Cn=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(Cn>>>26)|0,Cn&=67108863,_=Math.imul(ye,yt),h=Math.imul(ye,ft),h=h+Math.imul(Me,yt)|0,M=Math.imul(Me,ft),_=_+Math.imul(se,ct)|0,h=h+Math.imul(se,ht)|0,h=h+Math.imul(ae,ct)|0,M=M+Math.imul(ae,ht)|0;var Zs=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(Zs>>>26)|0,Zs&=67108863,_=Math.imul(Re,yt),h=Math.imul(Re,ft),h=h+Math.imul(Xe,yt)|0,M=Math.imul(Xe,ft),_=_+Math.imul(ye,ct)|0,h=h+Math.imul(ye,ht)|0,h=h+Math.imul(Me,ct)|0,M=M+Math.imul(Me,ht)|0,_=_+Math.imul(se,Ke)|0,h=h+Math.imul(se,Ot)|0,h=h+Math.imul(ae,Ke)|0,M=M+Math.imul(ae,Ot)|0;var Xs=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(Xs>>>26)|0,Xs&=67108863,_=Math.imul(Je,yt),h=Math.imul(Je,ft),h=h+Math.imul(vt,yt)|0,M=Math.imul(vt,ft),_=_+Math.imul(Re,ct)|0,h=h+Math.imul(Re,ht)|0,h=h+Math.imul(Xe,ct)|0,M=M+Math.imul(Xe,ht)|0,_=_+Math.imul(ye,Ke)|0,h=h+Math.imul(ye,Ot)|0,h=h+Math.imul(Me,Ke)|0,M=M+Math.imul(Me,Ot)|0,_=_+Math.imul(se,Et)|0,h=h+Math.imul(se,wt)|0,h=h+Math.imul(ae,Et)|0,M=M+Math.imul(ae,wt)|0;var Js=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(Js>>>26)|0,Js&=67108863,_=Math.imul(rt,yt),h=Math.imul(rt,ft),h=h+Math.imul(jt,yt)|0,M=Math.imul(jt,ft),_=_+Math.imul(Je,ct)|0,h=h+Math.imul(Je,ht)|0,h=h+Math.imul(vt,ct)|0,M=M+Math.imul(vt,ht)|0,_=_+Math.imul(Re,Ke)|0,h=h+Math.imul(Re,Ot)|0,h=h+Math.imul(Xe,Ke)|0,M=M+Math.imul(Xe,Ot)|0,_=_+Math.imul(ye,Et)|0,h=h+Math.imul(ye,wt)|0,h=h+Math.imul(Me,Et)|0,M=M+Math.imul(Me,wt)|0,_=_+Math.imul(se,_t)|0,h=h+Math.imul(se,xt)|0,h=h+Math.imul(ae,_t)|0,M=M+Math.imul(ae,xt)|0;var eo=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(eo>>>26)|0,eo&=67108863,_=Math.imul(Ct,yt),h=Math.imul(Ct,ft),h=h+Math.imul(Nt,yt)|0,M=Math.imul(Nt,ft),_=_+Math.imul(rt,ct)|0,h=h+Math.imul(rt,ht)|0,h=h+Math.imul(jt,ct)|0,M=M+Math.imul(jt,ht)|0,_=_+Math.imul(Je,Ke)|0,h=h+Math.imul(Je,Ot)|0,h=h+Math.imul(vt,Ke)|0,M=M+Math.imul(vt,Ot)|0,_=_+Math.imul(Re,Et)|0,h=h+Math.imul(Re,wt)|0,h=h+Math.imul(Xe,Et)|0,M=M+Math.imul(Xe,wt)|0,_=_+Math.imul(ye,_t)|0,h=h+Math.imul(ye,xt)|0,h=h+Math.imul(Me,_t)|0,M=M+Math.imul(Me,xt)|0,_=_+Math.imul(se,ot)|0,h=h+Math.imul(se,Ft)|0,h=h+Math.imul(ae,ot)|0,M=M+Math.imul(ae,Ft)|0;var to=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(to>>>26)|0,to&=67108863,_=Math.imul(Ue,yt),h=Math.imul(Ue,ft),h=h+Math.imul(it,yt)|0,M=Math.imul(it,ft),_=_+Math.imul(Ct,ct)|0,h=h+Math.imul(Ct,ht)|0,h=h+Math.imul(Nt,ct)|0,M=M+Math.imul(Nt,ht)|0,_=_+Math.imul(rt,Ke)|0,h=h+Math.imul(rt,Ot)|0,h=h+Math.imul(jt,Ke)|0,M=M+Math.imul(jt,Ot)|0,_=_+Math.imul(Je,Et)|0,h=h+Math.imul(Je,wt)|0,h=h+Math.imul(vt,Et)|0,M=M+Math.imul(vt,wt)|0,_=_+Math.imul(Re,_t)|0,h=h+Math.imul(Re,xt)|0,h=h+Math.imul(Xe,_t)|0,M=M+Math.imul(Xe,xt)|0,_=_+Math.imul(ye,ot)|0,h=h+Math.imul(ye,Ft)|0,h=h+Math.imul(Me,ot)|0,M=M+Math.imul(Me,Ft)|0,_=_+Math.imul(se,St)|0,h=h+Math.imul(se,Ut)|0,h=h+Math.imul(ae,St)|0,M=M+Math.imul(ae,Ut)|0;var or=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(or>>>26)|0,or&=67108863,_=Math.imul(It,yt),h=Math.imul(It,ft),h=h+Math.imul(st,yt)|0,M=Math.imul(st,ft),_=_+Math.imul(Ue,ct)|0,h=h+Math.imul(Ue,ht)|0,h=h+Math.imul(it,ct)|0,M=M+Math.imul(it,ht)|0,_=_+Math.imul(Ct,Ke)|0,h=h+Math.imul(Ct,Ot)|0,h=h+Math.imul(Nt,Ke)|0,M=M+Math.imul(Nt,Ot)|0,_=_+Math.imul(rt,Et)|0,h=h+Math.imul(rt,wt)|0,h=h+Math.imul(jt,Et)|0,M=M+Math.imul(jt,wt)|0,_=_+Math.imul(Je,_t)|0,h=h+Math.imul(Je,xt)|0,h=h+Math.imul(vt,_t)|0,M=M+Math.imul(vt,xt)|0,_=_+Math.imul(Re,ot)|0,h=h+Math.imul(Re,Ft)|0,h=h+Math.imul(Xe,ot)|0,M=M+Math.imul(Xe,Ft)|0,_=_+Math.imul(ye,St)|0,h=h+Math.imul(ye,Ut)|0,h=h+Math.imul(Me,St)|0,M=M+Math.imul(Me,Ut)|0,_=_+Math.imul(se,Tt)|0,h=h+Math.imul(se,Mt)|0,h=h+Math.imul(ae,Tt)|0,M=M+Math.imul(ae,Mt)|0;var hi=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(hi>>>26)|0,hi&=67108863,_=Math.imul(Ye,yt),h=Math.imul(Ye,ft),h=h+Math.imul(Ge,yt)|0,M=Math.imul(Ge,ft),_=_+Math.imul(It,ct)|0,h=h+Math.imul(It,ht)|0,h=h+Math.imul(st,ct)|0,M=M+Math.imul(st,ht)|0,_=_+Math.imul(Ue,Ke)|0,h=h+Math.imul(Ue,Ot)|0,h=h+Math.imul(it,Ke)|0,M=M+Math.imul(it,Ot)|0,_=_+Math.imul(Ct,Et)|0,h=h+Math.imul(Ct,wt)|0,h=h+Math.imul(Nt,Et)|0,M=M+Math.imul(Nt,wt)|0,_=_+Math.imul(rt,_t)|0,h=h+Math.imul(rt,xt)|0,h=h+Math.imul(jt,_t)|0,M=M+Math.imul(jt,xt)|0,_=_+Math.imul(Je,ot)|0,h=h+Math.imul(Je,Ft)|0,h=h+Math.imul(vt,ot)|0,M=M+Math.imul(vt,Ft)|0,_=_+Math.imul(Re,St)|0,h=h+Math.imul(Re,Ut)|0,h=h+Math.imul(Xe,St)|0,M=M+Math.imul(Xe,Ut)|0,_=_+Math.imul(ye,Tt)|0,h=h+Math.imul(ye,Mt)|0,h=h+Math.imul(Me,Tt)|0,M=M+Math.imul(Me,Mt)|0,_=_+Math.imul(se,$t)|0,h=h+Math.imul(se,Wt)|0,h=h+Math.imul(ae,$t)|0,M=M+Math.imul(ae,Wt)|0;var no=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(no>>>26)|0,no&=67108863,_=Math.imul(Ne,yt),h=Math.imul(Ne,ft),h=h+Math.imul(ut,yt)|0,M=Math.imul(ut,ft),_=_+Math.imul(Ye,ct)|0,h=h+Math.imul(Ye,ht)|0,h=h+Math.imul(Ge,ct)|0,M=M+Math.imul(Ge,ht)|0,_=_+Math.imul(It,Ke)|0,h=h+Math.imul(It,Ot)|0,h=h+Math.imul(st,Ke)|0,M=M+Math.imul(st,Ot)|0,_=_+Math.imul(Ue,Et)|0,h=h+Math.imul(Ue,wt)|0,h=h+Math.imul(it,Et)|0,M=M+Math.imul(it,wt)|0,_=_+Math.imul(Ct,_t)|0,h=h+Math.imul(Ct,xt)|0,h=h+Math.imul(Nt,_t)|0,M=M+Math.imul(Nt,xt)|0,_=_+Math.imul(rt,ot)|0,h=h+Math.imul(rt,Ft)|0,h=h+Math.imul(jt,ot)|0,M=M+Math.imul(jt,Ft)|0,_=_+Math.imul(Je,St)|0,h=h+Math.imul(Je,Ut)|0,h=h+Math.imul(vt,St)|0,M=M+Math.imul(vt,Ut)|0,_=_+Math.imul(Re,Tt)|0,h=h+Math.imul(Re,Mt)|0,h=h+Math.imul(Xe,Tt)|0,M=M+Math.imul(Xe,Mt)|0,_=_+Math.imul(ye,$t)|0,h=h+Math.imul(ye,Wt)|0,h=h+Math.imul(Me,$t)|0,M=M+Math.imul(Me,Wt)|0,_=_+Math.imul(se,Bt)|0,h=h+Math.imul(se,zt)|0,h=h+Math.imul(ae,Bt)|0,M=M+Math.imul(ae,zt)|0;var di=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(di>>>26)|0,di&=67108863,_=Math.imul(Ne,ct),h=Math.imul(Ne,ht),h=h+Math.imul(ut,ct)|0,M=Math.imul(ut,ht),_=_+Math.imul(Ye,Ke)|0,h=h+Math.imul(Ye,Ot)|0,h=h+Math.imul(Ge,Ke)|0,M=M+Math.imul(Ge,Ot)|0,_=_+Math.imul(It,Et)|0,h=h+Math.imul(It,wt)|0,h=h+Math.imul(st,Et)|0,M=M+Math.imul(st,wt)|0,_=_+Math.imul(Ue,_t)|0,h=h+Math.imul(Ue,xt)|0,h=h+Math.imul(it,_t)|0,M=M+Math.imul(it,xt)|0,_=_+Math.imul(Ct,ot)|0,h=h+Math.imul(Ct,Ft)|0,h=h+Math.imul(Nt,ot)|0,M=M+Math.imul(Nt,Ft)|0,_=_+Math.imul(rt,St)|0,h=h+Math.imul(rt,Ut)|0,h=h+Math.imul(jt,St)|0,M=M+Math.imul(jt,Ut)|0,_=_+Math.imul(Je,Tt)|0,h=h+Math.imul(Je,Mt)|0,h=h+Math.imul(vt,Tt)|0,M=M+Math.imul(vt,Mt)|0,_=_+Math.imul(Re,$t)|0,h=h+Math.imul(Re,Wt)|0,h=h+Math.imul(Xe,$t)|0,M=M+Math.imul(Xe,Wt)|0,_=_+Math.imul(ye,Bt)|0,h=h+Math.imul(ye,zt)|0,h=h+Math.imul(Me,Bt)|0,M=M+Math.imul(Me,zt)|0;var ro=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(ro>>>26)|0,ro&=67108863,_=Math.imul(Ne,Ke),h=Math.imul(Ne,Ot),h=h+Math.imul(ut,Ke)|0,M=Math.imul(ut,Ot),_=_+Math.imul(Ye,Et)|0,h=h+Math.imul(Ye,wt)|0,h=h+Math.imul(Ge,Et)|0,M=M+Math.imul(Ge,wt)|0,_=_+Math.imul(It,_t)|0,h=h+Math.imul(It,xt)|0,h=h+Math.imul(st,_t)|0,M=M+Math.imul(st,xt)|0,_=_+Math.imul(Ue,ot)|0,h=h+Math.imul(Ue,Ft)|0,h=h+Math.imul(it,ot)|0,M=M+Math.imul(it,Ft)|0,_=_+Math.imul(Ct,St)|0,h=h+Math.imul(Ct,Ut)|0,h=h+Math.imul(Nt,St)|0,M=M+Math.imul(Nt,Ut)|0,_=_+Math.imul(rt,Tt)|0,h=h+Math.imul(rt,Mt)|0,h=h+Math.imul(jt,Tt)|0,M=M+Math.imul(jt,Mt)|0,_=_+Math.imul(Je,$t)|0,h=h+Math.imul(Je,Wt)|0,h=h+Math.imul(vt,$t)|0,M=M+Math.imul(vt,Wt)|0,_=_+Math.imul(Re,Bt)|0,h=h+Math.imul(Re,zt)|0,h=h+Math.imul(Xe,Bt)|0,M=M+Math.imul(Xe,zt)|0;var io=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(io>>>26)|0,io&=67108863,_=Math.imul(Ne,Et),h=Math.imul(Ne,wt),h=h+Math.imul(ut,Et)|0,M=Math.imul(ut,wt),_=_+Math.imul(Ye,_t)|0,h=h+Math.imul(Ye,xt)|0,h=h+Math.imul(Ge,_t)|0,M=M+Math.imul(Ge,xt)|0,_=_+Math.imul(It,ot)|0,h=h+Math.imul(It,Ft)|0,h=h+Math.imul(st,ot)|0,M=M+Math.imul(st,Ft)|0,_=_+Math.imul(Ue,St)|0,h=h+Math.imul(Ue,Ut)|0,h=h+Math.imul(it,St)|0,M=M+Math.imul(it,Ut)|0,_=_+Math.imul(Ct,Tt)|0,h=h+Math.imul(Ct,Mt)|0,h=h+Math.imul(Nt,Tt)|0,M=M+Math.imul(Nt,Mt)|0,_=_+Math.imul(rt,$t)|0,h=h+Math.imul(rt,Wt)|0,h=h+Math.imul(jt,$t)|0,M=M+Math.imul(jt,Wt)|0,_=_+Math.imul(Je,Bt)|0,h=h+Math.imul(Je,zt)|0,h=h+Math.imul(vt,Bt)|0,M=M+Math.imul(vt,zt)|0;var pi=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(pi>>>26)|0,pi&=67108863,_=Math.imul(Ne,_t),h=Math.imul(Ne,xt),h=h+Math.imul(ut,_t)|0,M=Math.imul(ut,xt),_=_+Math.imul(Ye,ot)|0,h=h+Math.imul(Ye,Ft)|0,h=h+Math.imul(Ge,ot)|0,M=M+Math.imul(Ge,Ft)|0,_=_+Math.imul(It,St)|0,h=h+Math.imul(It,Ut)|0,h=h+Math.imul(st,St)|0,M=M+Math.imul(st,Ut)|0,_=_+Math.imul(Ue,Tt)|0,h=h+Math.imul(Ue,Mt)|0,h=h+Math.imul(it,Tt)|0,M=M+Math.imul(it,Mt)|0,_=_+Math.imul(Ct,$t)|0,h=h+Math.imul(Ct,Wt)|0,h=h+Math.imul(Nt,$t)|0,M=M+Math.imul(Nt,Wt)|0,_=_+Math.imul(rt,Bt)|0,h=h+Math.imul(rt,zt)|0,h=h+Math.imul(jt,Bt)|0,M=M+Math.imul(jt,zt)|0;var hs=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(hs>>>26)|0,hs&=67108863,_=Math.imul(Ne,ot),h=Math.imul(Ne,Ft),h=h+Math.imul(ut,ot)|0,M=Math.imul(ut,Ft),_=_+Math.imul(Ye,St)|0,h=h+Math.imul(Ye,Ut)|0,h=h+Math.imul(Ge,St)|0,M=M+Math.imul(Ge,Ut)|0,_=_+Math.imul(It,Tt)|0,h=h+Math.imul(It,Mt)|0,h=h+Math.imul(st,Tt)|0,M=M+Math.imul(st,Mt)|0,_=_+Math.imul(Ue,$t)|0,h=h+Math.imul(Ue,Wt)|0,h=h+Math.imul(it,$t)|0,M=M+Math.imul(it,Wt)|0,_=_+Math.imul(Ct,Bt)|0,h=h+Math.imul(Ct,zt)|0,h=h+Math.imul(Nt,Bt)|0,M=M+Math.imul(Nt,zt)|0;var ds=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(ds>>>26)|0,ds&=67108863,_=Math.imul(Ne,St),h=Math.imul(Ne,Ut),h=h+Math.imul(ut,St)|0,M=Math.imul(ut,Ut),_=_+Math.imul(Ye,Tt)|0,h=h+Math.imul(Ye,Mt)|0,h=h+Math.imul(Ge,Tt)|0,M=M+Math.imul(Ge,Mt)|0,_=_+Math.imul(It,$t)|0,h=h+Math.imul(It,Wt)|0,h=h+Math.imul(st,$t)|0,M=M+Math.imul(st,Wt)|0,_=_+Math.imul(Ue,Bt)|0,h=h+Math.imul(Ue,zt)|0,h=h+Math.imul(it,Bt)|0,M=M+Math.imul(it,zt)|0;var jn=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(jn>>>26)|0,jn&=67108863,_=Math.imul(Ne,Tt),h=Math.imul(Ne,Mt),h=h+Math.imul(ut,Tt)|0,M=Math.imul(ut,Mt),_=_+Math.imul(Ye,$t)|0,h=h+Math.imul(Ye,Wt)|0,h=h+Math.imul(Ge,$t)|0,M=M+Math.imul(Ge,Wt)|0,_=_+Math.imul(It,Bt)|0,h=h+Math.imul(It,zt)|0,h=h+Math.imul(st,Bt)|0,M=M+Math.imul(st,zt)|0;var so=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(so>>>26)|0,so&=67108863,_=Math.imul(Ne,$t),h=Math.imul(Ne,Wt),h=h+Math.imul(ut,$t)|0,M=Math.imul(ut,Wt),_=_+Math.imul(Ye,Bt)|0,h=h+Math.imul(Ye,zt)|0,h=h+Math.imul(Ge,Bt)|0,M=M+Math.imul(Ge,zt)|0;var oo=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(oo>>>26)|0,oo&=67108863,_=Math.imul(Ne,Bt),h=Math.imul(Ne,zt),h=h+Math.imul(ut,Bt)|0,M=Math.imul(ut,zt);var ao=(R+_|0)+((h&8191)<<13)|0;return R=(M+(h>>>13)|0)+(ao>>>26)|0,ao&=67108863,L[0]=Cn,L[1]=Zs,L[2]=Xs,L[3]=Js,L[4]=eo,L[5]=to,L[6]=or,L[7]=hi,L[8]=no,L[9]=di,L[10]=ro,L[11]=io,L[12]=pi,L[13]=hs,L[14]=ds,L[15]=jn,L[16]=so,L[17]=oo,L[18]=ao,R!==0&&(L[19]=R,S.length++),S};Math.imul||(K=B);function me(P,f,g){g.negative=f.negative^P.negative,g.length=P.length+f.length;for(var S=0,C=0,b=0;b>>26)|0,C+=L>>>26,L&=67108863}g.words[b]=R,S=L,L=C}return S!==0?g.words[b]=S:g.length--,g.strip()}function N(P,f,g){var S=new A;return S.mulp(P,f,g)}a.prototype.mulTo=function(f,g){var S,C=this.length+f.length;return this.length===10&&f.length===10?S=K(this,f,g):C<63?S=B(this,f,g):C<1024?S=me(this,f,g):S=N(this,f,g),S};function A(P,f){this.x=P,this.y=f}A.prototype.makeRBT=function(f){for(var g=new Array(f),S=a.prototype._countBits(f)-1,C=0;C>=1;return C},A.prototype.permute=function(f,g,S,C,b,L){for(var R=0;R>>1)b++;return 1<>>13,S[2*L+1]=b&8191,b=b>>>13;for(L=2*g;L>=26,g+=C/67108864|0,g+=b>>>26,this.words[S]=b&67108863}return g!==0&&(this.words[S]=g,this.length++),this},a.prototype.muln=function(f){return this.clone().imuln(f)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(f){var g=F(f);if(g.length===0)return new a(1);for(var S=this,C=0;C=0);var g=f%26,S=(f-g)/26,C=67108863>>>26-g<<26-g,b;if(g!==0){var L=0;for(b=0;b>>26-g}L&&(this.words[b]=L,this.length++)}if(S!==0){for(b=this.length-1;b>=0;b--)this.words[b+S]=this.words[b];for(b=0;b=0);var C;g?C=(g-g%26)/26:C=0;var b=f%26,L=Math.min((f-b)/26,this.length),R=67108863^67108863>>>b<L)for(this.length-=L,h=0;h=0&&(M!==0||h>=C);h--){var G=this.words[h]|0;this.words[h]=M<<26-b|G>>>b,M=G&R}return _&&M!==0&&(_.words[_.length++]=M),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(f,g,S){return r(this.negative===0),this.iushrn(f,g,S)},a.prototype.shln=function(f){return this.clone().ishln(f)},a.prototype.ushln=function(f){return this.clone().iushln(f)},a.prototype.shrn=function(f){return this.clone().ishrn(f)},a.prototype.ushrn=function(f){return this.clone().iushrn(f)},a.prototype.testn=function(f){r(typeof f=="number"&&f>=0);var g=f%26,S=(f-g)/26,C=1<=0);var g=f%26,S=(f-g)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=S)return this;if(g!==0&&S++,this.length=Math.min(S,this.length),g!==0){var C=67108863^67108863>>>g<=67108864;g++)this.words[g]-=67108864,g===this.length-1?this.words[g+1]=1:this.words[g+1]++;return this.length=Math.max(this.length,g+1),this},a.prototype.isubn=function(f){if(r(typeof f=="number"),r(f<67108864),f<0)return this.iaddn(-f);if(this.negative!==0)return this.negative=0,this.iaddn(f),this.negative=1,this;if(this.words[0]-=f,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var g=0;g>26)-(_/67108864|0),this.words[b+S]=L&67108863}for(;b>26,this.words[b+S]=L&67108863;if(R===0)return this.strip();for(r(R===-1),R=0,b=0;b>26,this.words[b]=L&67108863;return this.negative=1,this.strip()},a.prototype._wordDiv=function(f,g){var S=this.length-f.length,C=this.clone(),b=f,L=b.words[b.length-1]|0,R=this._countBits(L);S=26-R,S!==0&&(b=b.ushln(S),C.iushln(S),L=b.words[b.length-1]|0);var _=C.length-b.length,h;if(g!=="mod"){h=new a(null),h.length=_+1,h.words=new Array(h.length);for(var M=0;M=0;se--){var ae=(C.words[b.length+se]|0)*67108864+(C.words[b.length+se-1]|0);for(ae=Math.min(ae/L|0,67108863),C._ishlnsubmul(b,ae,se);C.negative!==0;)ae--,C.negative=0,C._ishlnsubmul(b,1,se),C.isZero()||(C.negative^=1);h&&(h.words[se]=ae)}return h&&h.strip(),C.strip(),g!=="div"&&S!==0&&C.iushrn(S),{div:h||null,mod:C}},a.prototype.divmod=function(f,g,S){if(r(!f.isZero()),this.isZero())return{div:new a(0),mod:new a(0)};var C,b,L;return this.negative!==0&&f.negative===0?(L=this.neg().divmod(f,g),g!=="mod"&&(C=L.div.neg()),g!=="div"&&(b=L.mod.neg(),S&&b.negative!==0&&b.iadd(f)),{div:C,mod:b}):this.negative===0&&f.negative!==0?(L=this.divmod(f.neg(),g),g!=="mod"&&(C=L.div.neg()),{div:C,mod:L.mod}):this.negative&f.negative?(L=this.neg().divmod(f.neg(),g),g!=="div"&&(b=L.mod.neg(),S&&b.negative!==0&&b.isub(f)),{div:L.div,mod:b}):f.length>this.length||this.cmp(f)<0?{div:new a(0),mod:this}:f.length===1?g==="div"?{div:this.divn(f.words[0]),mod:null}:g==="mod"?{div:null,mod:new a(this.modn(f.words[0]))}:{div:this.divn(f.words[0]),mod:new a(this.modn(f.words[0]))}:this._wordDiv(f,g)},a.prototype.div=function(f){return this.divmod(f,"div",!1).div},a.prototype.mod=function(f){return this.divmod(f,"mod",!1).mod},a.prototype.umod=function(f){return this.divmod(f,"mod",!0).mod},a.prototype.divRound=function(f){var g=this.divmod(f);if(g.mod.isZero())return g.div;var S=g.div.negative!==0?g.mod.isub(f):g.mod,C=f.ushrn(1),b=f.andln(1),L=S.cmp(C);return L<0||b===1&&L===0?g.div:g.div.negative!==0?g.div.isubn(1):g.div.iaddn(1)},a.prototype.modn=function(f){r(f<=67108863);for(var g=(1<<26)%f,S=0,C=this.length-1;C>=0;C--)S=(g*S+(this.words[C]|0))%f;return S},a.prototype.idivn=function(f){r(f<=67108863);for(var g=0,S=this.length-1;S>=0;S--){var C=(this.words[S]|0)+g*67108864;this.words[S]=C/f|0,g=C%f}return this.strip()},a.prototype.divn=function(f){return this.clone().idivn(f)},a.prototype.egcd=function(f){r(f.negative===0),r(!f.isZero());var g=this,S=f.clone();g.negative!==0?g=g.umod(f):g=g.clone();for(var C=new a(1),b=new a(0),L=new a(0),R=new a(1),_=0;g.isEven()&&S.isEven();)g.iushrn(1),S.iushrn(1),++_;for(var h=S.clone(),M=g.clone();!g.isZero();){for(var G=0,se=1;!(g.words[0]&se)&&G<26;++G,se<<=1);if(G>0)for(g.iushrn(G);G-- >0;)(C.isOdd()||b.isOdd())&&(C.iadd(h),b.isub(M)),C.iushrn(1),b.iushrn(1);for(var ae=0,re=1;!(S.words[0]&re)&&ae<26;++ae,re<<=1);if(ae>0)for(S.iushrn(ae);ae-- >0;)(L.isOdd()||R.isOdd())&&(L.iadd(h),R.isub(M)),L.iushrn(1),R.iushrn(1);g.cmp(S)>=0?(g.isub(S),C.isub(L),b.isub(R)):(S.isub(g),L.isub(C),R.isub(b))}return{a:L,b:R,gcd:S.iushln(_)}},a.prototype._invmp=function(f){r(f.negative===0),r(!f.isZero());var g=this,S=f.clone();g.negative!==0?g=g.umod(f):g=g.clone();for(var C=new a(1),b=new a(0),L=S.clone();g.cmpn(1)>0&&S.cmpn(1)>0;){for(var R=0,_=1;!(g.words[0]&_)&&R<26;++R,_<<=1);if(R>0)for(g.iushrn(R);R-- >0;)C.isOdd()&&C.iadd(L),C.iushrn(1);for(var h=0,M=1;!(S.words[0]&M)&&h<26;++h,M<<=1);if(h>0)for(S.iushrn(h);h-- >0;)b.isOdd()&&b.iadd(L),b.iushrn(1);g.cmp(S)>=0?(g.isub(S),C.isub(b)):(S.isub(g),b.isub(C))}var G;return g.cmpn(1)===0?G=C:G=b,G.cmpn(0)<0&&G.iadd(f),G},a.prototype.gcd=function(f){if(this.isZero())return f.abs();if(f.isZero())return this.abs();var g=this.clone(),S=f.clone();g.negative=0,S.negative=0;for(var C=0;g.isEven()&&S.isEven();C++)g.iushrn(1),S.iushrn(1);do{for(;g.isEven();)g.iushrn(1);for(;S.isEven();)S.iushrn(1);var b=g.cmp(S);if(b<0){var L=g;g=S,S=L}else if(b===0||S.cmpn(1)===0)break;g.isub(S)}while(!0);return S.iushln(C)},a.prototype.invm=function(f){return this.egcd(f).a.umod(f)},a.prototype.isEven=function(){return(this.words[0]&1)===0},a.prototype.isOdd=function(){return(this.words[0]&1)===1},a.prototype.andln=function(f){return this.words[0]&f},a.prototype.bincn=function(f){r(typeof f=="number");var g=f%26,S=(f-g)/26,C=1<>>26,R&=67108863,this.words[L]=R}return b!==0&&(this.words[L]=b,this.length++),this},a.prototype.isZero=function(){return this.length===1&&this.words[0]===0},a.prototype.cmpn=function(f){var g=f<0;if(this.negative!==0&&!g)return-1;if(this.negative===0&&g)return 1;this.strip();var S;if(this.length>1)S=1;else{g&&(f=-f),r(f<=67108863,"Number is too big");var C=this.words[0]|0;S=C===f?0:Cf.length)return 1;if(this.length=0;S--){var C=this.words[S]|0,b=f.words[S]|0;if(C!==b){Cb&&(g=1);break}}return g},a.prototype.gtn=function(f){return this.cmpn(f)===1},a.prototype.gt=function(f){return this.cmp(f)===1},a.prototype.gten=function(f){return this.cmpn(f)>=0},a.prototype.gte=function(f){return this.cmp(f)>=0},a.prototype.ltn=function(f){return this.cmpn(f)===-1},a.prototype.lt=function(f){return this.cmp(f)===-1},a.prototype.lten=function(f){return this.cmpn(f)<=0},a.prototype.lte=function(f){return this.cmp(f)<=0},a.prototype.eqn=function(f){return this.cmpn(f)===0},a.prototype.eq=function(f){return this.cmp(f)===0},a.red=function(f){return new le(f)},a.prototype.toRed=function(f){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),f.convertTo(this)._forceRed(f)},a.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(f){return this.red=f,this},a.prototype.forceRed=function(f){return r(!this.red,"Already a number in reduction context"),this._forceRed(f)},a.prototype.redAdd=function(f){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,f)},a.prototype.redIAdd=function(f){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,f)},a.prototype.redSub=function(f){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,f)},a.prototype.redISub=function(f){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,f)},a.prototype.redShl=function(f){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,f)},a.prototype.redMul=function(f){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.mul(this,f)},a.prototype.redIMul=function(f){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.imul(this,f)},a.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(f){return r(this.red&&!f.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,f)};var I={k256:null,p224:null,p192:null,p25519:null};function H(P,f){this.name=P,this.p=new a(f,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}H.prototype._tmp=function(){var f=new a(null);return f.words=new Array(Math.ceil(this.n/13)),f},H.prototype.ireduce=function(f){var g=f,S;do this.split(g,this.tmp),g=this.imulK(g),g=g.iadd(this.tmp),S=g.bitLength();while(S>this.n);var C=S0?g.isub(this.p):g.strip!==void 0?g.strip():g._strip(),g},H.prototype.split=function(f,g){f.iushrn(this.n,0,g)},H.prototype.imulK=function(f){return f.imul(this.k)};function X(){H.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}s(X,H),X.prototype.split=function(f,g){for(var S=4194303,C=Math.min(f.length,9),b=0;b>>22,L=R}L>>>=22,f.words[b-10]=L,L===0&&f.length>10?f.length-=10:f.length-=9},X.prototype.imulK=function(f){f.words[f.length]=0,f.words[f.length+1]=0,f.length+=2;for(var g=0,S=0;S>>=26,f.words[S]=b,g=C}return g!==0&&(f.words[f.length++]=g),f},a._prime=function(f){if(I[f])return I[f];var g;if(f==="k256")g=new X;else if(f==="p224")g=new te;else if(f==="p192")g=new V;else if(f==="p25519")g=new J;else throw new Error("Unknown prime "+f);return I[f]=g,g};function le(P){if(typeof P=="string"){var f=a._prime(P);this.m=f.p,this.prime=f}else r(P.gtn(1),"modulus must be greater than 1"),this.m=P,this.prime=null}le.prototype._verify1=function(f){r(f.negative===0,"red works only with positives"),r(f.red,"red works only with red numbers")},le.prototype._verify2=function(f,g){r((f.negative|g.negative)===0,"red works only with positives"),r(f.red&&f.red===g.red,"red works only with red numbers")},le.prototype.imod=function(f){return this.prime?this.prime.ireduce(f)._forceRed(this):f.umod(this.m)._forceRed(this)},le.prototype.neg=function(f){return f.isZero()?f.clone():this.m.sub(f)._forceRed(this)},le.prototype.add=function(f,g){this._verify2(f,g);var S=f.add(g);return S.cmp(this.m)>=0&&S.isub(this.m),S._forceRed(this)},le.prototype.iadd=function(f,g){this._verify2(f,g);var S=f.iadd(g);return S.cmp(this.m)>=0&&S.isub(this.m),S},le.prototype.sub=function(f,g){this._verify2(f,g);var S=f.sub(g);return S.cmpn(0)<0&&S.iadd(this.m),S._forceRed(this)},le.prototype.isub=function(f,g){this._verify2(f,g);var S=f.isub(g);return S.cmpn(0)<0&&S.iadd(this.m),S},le.prototype.shl=function(f,g){return this._verify1(f),this.imod(f.ushln(g))},le.prototype.imul=function(f,g){return this._verify2(f,g),this.imod(f.imul(g))},le.prototype.mul=function(f,g){return this._verify2(f,g),this.imod(f.mul(g))},le.prototype.isqr=function(f){return this.imul(f,f.clone())},le.prototype.sqr=function(f){return this.mul(f,f)},le.prototype.sqrt=function(f){if(f.isZero())return f.clone();var g=this.m.andln(3);if(r(g%2===1),g===3){var S=this.m.add(new a(1)).iushrn(2);return this.pow(f,S)}for(var C=this.m.subn(1),b=0;!C.isZero()&&C.andln(1)===0;)b++,C.iushrn(1);r(!C.isZero());var L=new a(1).toRed(this),R=L.redNeg(),_=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new a(2*h*h).toRed(this);this.pow(h,_).cmp(R)!==0;)h.redIAdd(R);for(var M=this.pow(h,C),G=this.pow(f,C.addn(1).iushrn(1)),se=this.pow(f,C),ae=b;se.cmp(L)!==0;){for(var re=se,ye=0;re.cmp(L)!==0;ye++)re=re.redSqr();r(ye=0;b--){for(var M=g.words[b],G=h-1;G>=0;G--){var se=M>>G&1;if(L!==C[0]&&(L=this.sqr(L)),se===0&&R===0){_=0;continue}R<<=1,R|=se,_++,!(_!==S&&(b!==0||G!==0))&&(L=this.mul(L,C[R]),_=0,R=0)}h=26}return L},le.prototype.convertTo=function(f){var g=f.umod(this.m);return g===f?g.clone():g},le.prototype.convertFrom=function(f){var g=f.clone();return g.red=null,g},a.mont=function(f){return new fe(f)};function fe(P){le.call(this,P),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}s(fe,le),fe.prototype.convertTo=function(f){return this.imod(f.ushln(this.shift))},fe.prototype.convertFrom=function(f){var g=this.imod(f.mul(this.rinv));return g.red=null,g},fe.prototype.imul=function(f,g){if(f.isZero()||g.isZero())return f.words[0]=0,f.length=1,f;var S=f.imul(g),C=S.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),b=S.isub(C).iushrn(this.shift),L=b;return b.cmp(this.m)>=0?L=b.isub(this.m):b.cmpn(0)<0&&(L=b.iadd(this.m)),L._forceRed(this)},fe.prototype.mul=function(f,g){if(f.isZero()||g.isZero())return new a(0)._forceRed(this);var S=f.mul(g),C=S.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),b=S.isub(C).iushrn(this.shift),L=b;return b.cmp(this.m)>=0?L=b.isub(this.m):b.cmpn(0)<0&&(L=b.iadd(this.m)),L._forceRed(this)},fe.prototype.invm=function(f){var g=this.imod(f._invmp(this.m).mul(this.r2));return g._forceRed(this)}})(e,Fr)})(Rg);var Dg=Rg.exports,cw=1/0,HS=9007199254740991,Ij=17976931348623157e292,hw=NaN,Fj="[object Function]",Uj="[object GeneratorFunction]",$j="[object Symbol]",Wj=/^\s+|\s+$/g,Bj=/^[-+]0x[0-9a-f]+$/i,zj=/^0b[01]+$/i,Hj=/^0o[0-7]+$/i,Yj=/^(?:0|[1-9]\d*)$/,Gj=parseInt,Vj=Object.prototype,YS=Vj.toString,qj=Math.ceil,Qj=Math.max;function Kj(e,t,n){var r=-1,s=e.length;t<0&&(t=-t>s?0:s+t),n=n>s?s:n,n<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(s);++r-1&&e%1==0&&e-1&&e%1==0&&e<=HS}function nh(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function i6(e){return!!e&&typeof e=="object"}function s6(e){return typeof e=="symbol"||i6(e)&&YS.call(e)==$j}function o6(e){if(!e)return e===0?e:0;if(e=l6(e),e===cw||e===-cw){var t=e<0?-1:1;return t*Ij}return e===e?e:0}function a6(e){var t=o6(e),n=t%1;return t===t?n?t-n:t:0}function l6(e){if(typeof e=="number")return e;if(s6(e))return hw;if(nh(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=nh(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(Wj,"");var n=zj.test(e);return n||Hj.test(e)?Gj(e.slice(2),n?2:8):Bj.test(e)?hw:+e}var u6=Jj,rh={exports:{}};rh.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",s=1,a=2,u=9007199254740991,c="[object Arguments]",p="[object Array]",v="[object AsyncFunction]",m="[object Boolean]",O="[object Date]",E="[object Error]",F="[object Function]",B="[object GeneratorFunction]",K="[object Map]",me="[object Number]",N="[object Null]",A="[object Object]",I="[object Promise]",H="[object Proxy]",X="[object RegExp]",te="[object Set]",V="[object String]",J="[object Symbol]",le="[object Undefined]",fe="[object WeakMap]",P="[object ArrayBuffer]",f="[object DataView]",g="[object Float32Array]",S="[object Float64Array]",C="[object Int8Array]",b="[object Int16Array]",L="[object Int32Array]",R="[object Uint8Array]",_="[object Uint8ClampedArray]",h="[object Uint16Array]",M="[object Uint32Array]",G=/[\\^$.*+?()[\]{}|]/g,se=/^\[object .+?Constructor\]$/,ae=/^(?:0|[1-9]\d*)$/,re={};re[g]=re[S]=re[C]=re[b]=re[L]=re[R]=re[_]=re[h]=re[M]=!0,re[c]=re[p]=re[P]=re[m]=re[f]=re[O]=re[E]=re[F]=re[K]=re[me]=re[A]=re[X]=re[te]=re[V]=re[fe]=!1;var ye=typeof Fr=="object"&&Fr&&Fr.Object===Object&&Fr,Me=typeof self=="object"&&self&&self.Object===Object&&self,Be=ye||Me||Function("return this")(),Re=t&&!t.nodeType&&t,Xe=Re&&!0&&e&&!e.nodeType&&e,ui=Xe&&Xe.exports===Re,Je=ui&&ye.process,vt=function(){try{return Je&&Je.binding&&Je.binding("util")}catch{}}(),_n=vt&&vt.isTypedArray;function rt(T,$){for(var Z=-1,he=T==null?0:T.length,pt=0,Ce=[];++Z-1}function to(T,$){var Z=this.__data__,he=lo(Z,T);return he<0?(++this.size,Z.push([T,$])):Z[he][1]=$,this}Cn.prototype.clear=Zs,Cn.prototype.delete=Xs,Cn.prototype.get=Js,Cn.prototype.has=eo,Cn.prototype.set=to;function or(T){var $=-1,Z=T==null?0:T.length;for(this.clear();++$on))return!1;var mt=Ce.get(T);if(mt&&Ce.get($))return mt==$;var en=-1,Vn=!0,an=Z&a?new pi:void 0;for(Ce.set(T,$),Ce.set($,T);++en-1&&T%1==0&&T<$}function Hu(T){var $=typeof T;return $=="string"||$=="number"||$=="symbol"||$=="boolean"?T!=="__proto__":T===null}function Yu(T){return!!ut&&ut in T}function Gu(T){var $=T&&T.constructor,Z=typeof $=="function"&&$.prototype||Ye;return T===Z}function sd(T){return Li.call(T)}function Ni(T){if(T!=null){try{return Ai.call(T)}catch{}try{return T+""}catch{}}return""}function Vu(T,$){return T===$||T!==T&&$!==$}var qu=al(function(){return arguments}())?al:function(T){return co(T)&&Ne.call(T,"callee")&&!ht.call(T,"callee")},Zo=Array.isArray;function od(T){return T!=null&&Qu(T.length)&&!Xo(T)}var ll=Ks||at;function ad(T,$){return fo(T,$)}function Xo(T){if(!Ku(T))return!1;var $=uo(T);return $==F||$==B||$==v||$==H}function Qu(T){return typeof T=="number"&&T>-1&&T%1==0&&T<=u}function Ku(T){var $=typeof T;return T!=null&&($=="object"||$=="function")}function co(T){return T!=null&&typeof T=="object"}var Zu=_n?Nt(_n):Fu;function ld(T){return od(T)?Nu(T):Uu(T)}function dt(){return[]}function at(){return!1}e.exports=ad})(rh,rh.exports);var f6=rh.exports;const Vh=Dg,c6=new Vh(255),h6=new Vh(65280),d6=new Vh(256),p6=(e,t,n)=>{const r=n.and(c6).toNumber(),s=n.and(h6).div(d6).toNumber(),a=String.fromCharCode(r)+String.fromCharCode(s);return new Vh(m6(a,e))},m6=(e,t)=>{let n,r,s,a,u,c,p,v;for(n=e.length&3,r=e.length-n,s=t,u=3432918353,c=461845907,v=0;v>>16)*u&65535)<<16)&4294967295,p=p<<15|p>>>17,p=(p&65535)*c+(((p>>>16)*c&65535)<<16)&4294967295,s^=p,s=s<<13|s>>>19,a=(s&65535)*5+(((s>>>16)*5&65535)<<16)&4294967295,s=(a&65535)+27492+(((a>>>16)+58964&65535)<<16);switch(p=0,n){case 3:p^=(e.charCodeAt(v+2)&255)<<16;case 2:p^=(e.charCodeAt(v+1)&255)<<8;case 1:p^=e.charCodeAt(v)&255,p=(p&65535)*u+(((p>>>16)*u&65535)<<16)&4294967295,p=p<<15|p>>>17,p=(p&65535)*c+(((p>>>16)*c&65535)<<16)&4294967295,s^=p}return s^=e.length,s^=s>>>16,s=(s&65535)*2246822507+(((s>>>16)*2246822507&65535)<<16)&4294967295,s^=s>>>13,s=(s&65535)*3266489909+(((s>>>16)*3266489909&65535)<<16)&4294967295,s^=s>>>16,s>>>0};var g6={muk:p6};const li=Dg,{muk:v6}=g6,Wa=new li("10000","hex"),Xa=new li("ffffffff","hex"),GS=new li("100000000","hex"),VS=new li("ffffffffffffffff","hex"),qS=new li("ffffffff00000000","hex"),QS=new li("65535"),KS=new li("65536"),Ag=(e,t)=>v6([3077398253,3995603712,2243735041,1261992695][e],2,t),y6=e=>{const t=n=>{const r=n.and(Xa),s=n.and(qS);return n.gte(Wa)&&n.lte(Xa)?Wa.add(ZS(n.sub(Wa))):n.gte(GS)&&n.lte(VS)?s.or(t(r)):n};return t(new li(e))},w6=e=>{const t=n=>{const r=n.and(Xa),s=n.and(qS);return n.gte(Wa)&&n.lte(Xa)?Wa.add(JS(n.sub(Wa))):n.gte(GS)&&n.lte(VS)?s.or(t(r)):n};return t(new li(e))},ZS=e=>XS(4,QS,KS,Xa,Ag,new li(e)),XS=(e,t,n,r,s,a)=>{const u=Jm(e,t,n,s,a);return u.lt(r)?u:Jm(e,t,n,s,u)},Jm=(e,t,n,r,s)=>{const a=(p,v,m)=>{if(p>e)return e%2!==0||m.eq(t)?t.mul(m).add(v):t.mul(v).add(m);{const O=r(p-1,m),E=p%2!==0?v.add(O).mod(t):v.add(O).mod(n);return a(p+1,m,E)}},u=s.mod(t),c=s.div(t);return a(1,u,c)},JS=e=>eM(4,QS,KS,Xa,Ag,new li(e)),eM=(e,t,n,r,s,a)=>{const u=e0(e,t,n,s,a);return u.lt(r)?u:e0(e,t,n,s,u)},e0=(e,t,n,r,s)=>{const a=(m,O,E)=>{if(m<1)return t.mul(E).add(O);{const F=r(m-1,O),B=m%2!==0?E.add(t).sub(F.mod(t)).mod(t):E.add(n).sub(F.mod(n)).mod(n);return a(m-1,B,O)}},u=e%2!==0?s.div(t):s.mod(t),c=e%2!==0?s.mod(t):s.div(t),p=c.eq(t)?u:c,v=c.eq(t)?c:u;return a(e,p,v)};var tM={F:Ag,fe:Jm,Fe:XS,feis:ZS,fein:y6,fen:e0,Fen:eM,tail:JS,fynd:w6};const kr=Dg,dw=u6,_6=f6,nM=tM,Ba=new kr(0),Ir=new kr(1),rM=new kr(2),Xl=new kr(3),Ra=new kr(4),x6=new kr(5),S6=` +`+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var aw={};function nS(e,t){ce.deprecationHandler!=null&&ce.deprecationHandler(e,t),aw[e]||(tS(t),aw[e]=!0)}ce.suppressDeprecationWarnings=!1;ce.deprecationHandler=null;function Ri(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function P3(e){var t,n;for(n in e)ze(e,n)&&(t=e[n],Ri(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Vm(e,t){var n=Ls({},e),r;for(r in t)ze(t,r)&&(Ao(e[r])&&Ao(t[r])?(n[r]={},Ls(n[r],e[r]),Ls(n[r],t[r])):t[r]!=null?n[r]=t[r]:delete n[r]);for(r in e)ze(e,r)&&!ze(t,r)&&Ao(e[r])&&(n[r]=Ls({},n[r]));return n}function dg(e){e!=null&&this.set(e)}var qm;Object.keys?qm=Object.keys:qm=function(e){var t,n=[];for(t in e)ze(e,t)&&n.push(t);return n};var R3={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function D3(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return Ri(r)?r.call(t,n):r}function bi(e,t,n){var r=""+Math.abs(e),s=t-r.length,a=e>=0;return(a?n?"+":"":"-")+Math.pow(10,Math.max(0,s)).toString().substr(1)+r}var pg=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,nc=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,zp={},Fa={};function we(e,t,n,r){var s=r;typeof r=="string"&&(s=function(){return this[r]()}),e&&(Fa[e]=s),t&&(Fa[t[0]]=function(){return bi(s.apply(this,arguments),t[1],t[2])}),n&&(Fa[n]=function(){return this.localeData().ordinal(s.apply(this,arguments),e)})}function A3(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function L3(e){var t=e.match(pg),n,r;for(n=0,r=t.length;n=0&&nc.test(e);)e=e.replace(nc,r),nc.lastIndex=0,n-=1;return e}var j3={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function N3(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(pg).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var I3="Invalid date";function F3(){return this._invalidDate}var U3="%d",$3=/\d{1,2}/;function W3(e){return this._ordinal.replace("%d",e)}var B3={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function z3(e,t,n,r){var s=this._relativeTime[n];return Ri(s)?s(e,t,n,r):s.replace(/%d/i,e)}function H3(e,t){var n=this._relativeTime[e>0?"future":"past"];return Ri(n)?n(t):n.replace(/%s/i,t)}var Kl={};function An(e,t){var n=e.toLowerCase();Kl[n]=Kl[n+"s"]=Kl[t]=e}function Hr(e){return typeof e=="string"?Kl[e]||Kl[e.toLowerCase()]:void 0}function mg(e){var t={},n,r;for(r in e)ze(e,r)&&(n=Hr(r),n&&(t[n]=e[r]));return t}var iS={};function Ln(e,t){iS[e]=t}function Y3(e){var t=[],n;for(n in e)ze(e,n)&&t.push({unit:n,priority:iS[n]});return t.sort(function(r,s){return r.priority-s.priority}),t}function Nh(e){return e%4===0&&e%100!==0||e%400===0}function Nr(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function De(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=Nr(t)),n}function il(e,t){return function(n){return n!=null?(sS(this,e,n),ce.updateOffset(this,t),this):Kc(this,e)}}function Kc(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function sS(e,t,n){e.isValid()&&!isNaN(n)&&(t==="FullYear"&&Nh(e.year())&&e.month()===1&&e.date()===29?(n=De(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Bh(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function G3(e){return e=Hr(e),Ri(this[e])?this[e]():this}function V3(e,t){if(typeof e=="object"){e=mg(e);var n=Y3(e),r,s=n.length;for(r=0;r68?1900:2e3)};var mS=il("FullYear",!0);function hD(){return Nh(this.year())}function dD(e,t,n,r,s,a,u){var c;return e<100&&e>=0?(c=new Date(e+400,t,n,r,s,a,u),isFinite(c.getFullYear())&&c.setFullYear(e)):c=new Date(e,t,n,r,s,a,u),c}function vu(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Xc(e,t,n){var r=7+t-n,s=(7+vu(e,0,r).getUTCDay()-t)%7;return-s+r-1}function gS(e,t,n,r,s){var a=(7+n-r)%7,u=Xc(e,r,s),c=1+7*(t-1)+a+u,p,v;return c<=0?(p=e-1,v=Zl(p)+c):c>Zl(e)?(p=e+1,v=c-Zl(e)):(p=e,v=c),{year:p,dayOfYear:v}}function yu(e,t,n){var r=Xc(e.year(),t,n),s=Math.floor((e.dayOfYear()-r-1)/7)+1,a,u;return s<1?(u=e.year()-1,a=s+ts(u,t,n)):s>ts(e.year(),t,n)?(a=s-ts(e.year(),t,n),u=e.year()+1):(u=e.year(),a=s),{week:a,year:u}}function ts(e,t,n){var r=Xc(e,t,n),s=Xc(e+1,t,n);return(Zl(e)-r+s)/7}we("w",["ww",2],"wo","week");we("W",["WW",2],"Wo","isoWeek");An("week","w");An("isoWeek","W");Ln("week",5);Ln("isoWeek",5);pe("w",Lt);pe("ww",Lt,Mr);pe("W",Lt);pe("WW",Lt,Mr);bu(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=De(e)});function pD(e){return yu(e,this._week.dow,this._week.doy).week}var mD={dow:0,doy:6};function gD(){return this._week.dow}function vD(){return this._week.doy}function yD(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function wD(e){var t=yu(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}we("d",0,"do","day");we("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});we("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});we("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});we("e",0,0,"weekday");we("E",0,0,"isoWeekday");An("day","d");An("weekday","e");An("isoWeekday","E");Ln("day",11);Ln("weekday",11);Ln("isoWeekday",11);pe("d",Lt);pe("e",Lt);pe("E",Lt);pe("dd",function(e,t){return t.weekdaysMinRegex(e)});pe("ddd",function(e,t){return t.weekdaysShortRegex(e)});pe("dddd",function(e,t){return t.weekdaysRegex(e)});bu(["dd","ddd","dddd"],function(e,t,n,r){var s=n._locale.weekdaysParse(e,r,n._strict);s!=null?t.d=s:Te(n).invalidWeekday=e});bu(["d","e","E"],function(e,t,n,r){t[r]=De(e)});function _D(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function xD(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function yg(e,t){return e.slice(t,7).concat(e.slice(0,t))}var SD="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),vS="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),MD="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),kD=Tu,CD=Tu,OD=Tu;function ED(e,t){var n=si(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?yg(n,this._week.dow):e?n[e.day()]:n}function TD(e){return e===!0?yg(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function bD(e){return e===!0?yg(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function PD(e,t,n){var r,s,a,u=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=Pi([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?t==="dddd"?(s=rn.call(this._weekdaysParse,u),s!==-1?s:null):t==="ddd"?(s=rn.call(this._shortWeekdaysParse,u),s!==-1?s:null):(s=rn.call(this._minWeekdaysParse,u),s!==-1?s:null):t==="dddd"?(s=rn.call(this._weekdaysParse,u),s!==-1||(s=rn.call(this._shortWeekdaysParse,u),s!==-1)?s:(s=rn.call(this._minWeekdaysParse,u),s!==-1?s:null)):t==="ddd"?(s=rn.call(this._shortWeekdaysParse,u),s!==-1||(s=rn.call(this._weekdaysParse,u),s!==-1)?s:(s=rn.call(this._minWeekdaysParse,u),s!==-1?s:null)):(s=rn.call(this._minWeekdaysParse,u),s!==-1||(s=rn.call(this._weekdaysParse,u),s!==-1)?s:(s=rn.call(this._shortWeekdaysParse,u),s!==-1?s:null))}function RD(e,t,n){var r,s,a;if(this._weekdaysParseExact)return PD.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(s=Pi([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(s,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(s,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(s,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(s,"")+"|^"+this.weekdaysShort(s,"")+"|^"+this.weekdaysMin(s,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function DD(e){if(!this.isValid())return e!=null?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return e!=null?(e=_D(e,this.localeData()),this.add(e-t,"d")):t}function AD(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function LD(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=xD(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function jD(e){return this._weekdaysParseExact?(ze(this,"_weekdaysRegex")||wg.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(ze(this,"_weekdaysRegex")||(this._weekdaysRegex=kD),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function ND(e){return this._weekdaysParseExact?(ze(this,"_weekdaysRegex")||wg.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(ze(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=CD),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function ID(e){return this._weekdaysParseExact?(ze(this,"_weekdaysRegex")||wg.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(ze(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=OD),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function wg(){function e(m,O){return O.length-m.length}var t=[],n=[],r=[],s=[],a,u,c,p,v;for(a=0;a<7;a++)u=Pi([2e3,1]).day(a),c=pr(this.weekdaysMin(u,"")),p=pr(this.weekdaysShort(u,"")),v=pr(this.weekdays(u,"")),t.push(c),n.push(p),r.push(v),s.push(c),s.push(p),s.push(v);t.sort(e),n.sort(e),r.sort(e),s.sort(e),this._weekdaysRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function _g(){return this.hours()%12||12}function FD(){return this.hours()||24}we("H",["HH",2],0,"hour");we("h",["hh",2],0,_g);we("k",["kk",2],0,FD);we("hmm",0,0,function(){return""+_g.apply(this)+bi(this.minutes(),2)});we("hmmss",0,0,function(){return""+_g.apply(this)+bi(this.minutes(),2)+bi(this.seconds(),2)});we("Hmm",0,0,function(){return""+this.hours()+bi(this.minutes(),2)});we("Hmmss",0,0,function(){return""+this.hours()+bi(this.minutes(),2)+bi(this.seconds(),2)});function yS(e,t){we(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}yS("a",!0);yS("A",!1);An("hour","h");Ln("hour",13);function wS(e,t){return t._meridiemParse}pe("a",wS);pe("A",wS);pe("H",Lt);pe("h",Lt);pe("k",Lt);pe("HH",Lt,Mr);pe("hh",Lt,Mr);pe("kk",Lt,Mr);pe("hmm",lS);pe("hmmss",uS);pe("Hmm",lS);pe("Hmmss",uS);lt(["H","HH"],pn);lt(["k","kk"],function(e,t,n){var r=De(e);t[pn]=r===24?0:r});lt(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});lt(["h","hh"],function(e,t,n){t[pn]=De(e),Te(n).bigHour=!0});lt("hmm",function(e,t,n){var r=e.length-2;t[pn]=De(e.substr(0,r)),t[ti]=De(e.substr(r)),Te(n).bigHour=!0});lt("hmmss",function(e,t,n){var r=e.length-4,s=e.length-2;t[pn]=De(e.substr(0,r)),t[ti]=De(e.substr(r,2)),t[Ji]=De(e.substr(s)),Te(n).bigHour=!0});lt("Hmm",function(e,t,n){var r=e.length-2;t[pn]=De(e.substr(0,r)),t[ti]=De(e.substr(r))});lt("Hmmss",function(e,t,n){var r=e.length-4,s=e.length-2;t[pn]=De(e.substr(0,r)),t[ti]=De(e.substr(r,2)),t[Ji]=De(e.substr(s))});function UD(e){return(e+"").toLowerCase().charAt(0)==="p"}var $D=/[ap]\.?m?\.?/i,WD=il("Hours",!0);function BD(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var _S={calendar:R3,longDateFormat:j3,invalidDate:I3,ordinal:U3,dayOfMonthOrdinalParse:$3,relativeTime:B3,months:nD,monthsShort:fS,week:mD,weekdays:SD,weekdaysMin:MD,weekdaysShort:vS,meridiemParse:$D},Yt={},Ll={},wu;function zD(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(s=zh(a.slice(0,n).join("-")),s)return s;if(r&&r.length>=n&&zD(a,r)>=n-1)break;n--}t++}return wu}function YD(e){return e.match("^[^/\\\\]*$")!=null}function zh(e){var t=null,n;if(Yt[e]===void 0&&typeof module<"u"&&module&&module.exports&&YD(e))try{t=wu._abbr,n=require,n("./locale/"+e),Hs(t)}catch{Yt[e]=null}return Yt[e]}function Hs(e,t){var n;return e&&(Xn(t)?n=ls(e):n=xg(e,t),n?wu=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),wu._abbr}function xg(e,t){if(t!==null){var n,r=_S;if(t.abbr=e,Yt[e]!=null)nS("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=Yt[e]._config;else if(t.parentLocale!=null)if(Yt[t.parentLocale]!=null)r=Yt[t.parentLocale]._config;else if(n=zh(t.parentLocale),n!=null)r=n._config;else return Ll[t.parentLocale]||(Ll[t.parentLocale]=[]),Ll[t.parentLocale].push({name:e,config:t}),null;return Yt[e]=new dg(Vm(r,t)),Ll[e]&&Ll[e].forEach(function(s){xg(s.name,s.config)}),Hs(e),Yt[e]}else return delete Yt[e],null}function GD(e,t){if(t!=null){var n,r,s=_S;Yt[e]!=null&&Yt[e].parentLocale!=null?Yt[e].set(Vm(Yt[e]._config,t)):(r=zh(e),r!=null&&(s=r._config),t=Vm(s,t),r==null&&(t.abbr=e),n=new dg(t),n.parentLocale=Yt[e],Yt[e]=n),Hs(e)}else Yt[e]!=null&&(Yt[e].parentLocale!=null?(Yt[e]=Yt[e].parentLocale,e===Hs()&&Hs(e)):Yt[e]!=null&&delete Yt[e]);return Yt[e]}function ls(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return wu;if(!si(e)){if(t=zh(e),t)return t;e=[e]}return HD(e)}function VD(){return qm(Yt)}function Sg(e){var t,n=e._a;return n&&Te(e).overflow===-2&&(t=n[Xi]<0||n[Xi]>11?Xi:n[Mi]<1||n[Mi]>Bh(n[Rn],n[Xi])?Mi:n[pn]<0||n[pn]>24||n[pn]===24&&(n[ti]!==0||n[Ji]!==0||n[Po]!==0)?pn:n[ti]<0||n[ti]>59?ti:n[Ji]<0||n[Ji]>59?Ji:n[Po]<0||n[Po]>999?Po:-1,Te(e)._overflowDayOfYear&&(tMi)&&(t=Mi),Te(e)._overflowWeeks&&t===-1&&(t=J3),Te(e)._overflowWeekday&&t===-1&&(t=eD),Te(e).overflow=t),e}var qD=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,QD=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,KD=/Z|[+-]\d\d(?::?\d\d)?/,rc=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Hp=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],ZD=/^\/?Date\((-?\d+)/i,XD=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,JD={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function xS(e){var t,n,r=e._i,s=qD.exec(r)||QD.exec(r),a,u,c,p,v=rc.length,m=Hp.length;if(s){for(Te(e).iso=!0,t=0,n=v;tZl(u)||e._dayOfYear===0)&&(Te(e)._overflowDayOfYear=!0),n=vu(u,0,e._dayOfYear),e._a[Xi]=n.getUTCMonth(),e._a[Mi]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=s[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[pn]===24&&e._a[ti]===0&&e._a[Ji]===0&&e._a[Po]===0&&(e._nextDay=!0,e._a[pn]=0),e._d=(e._useUTC?vu:dD).apply(null,r),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[pn]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==a&&(Te(e).weekdayMismatch=!0)}}function aA(e){var t,n,r,s,a,u,c,p,v;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(a=1,u=4,n=va(t.GG,e._a[Rn],yu(At(),1,4).year),r=va(t.W,1),s=va(t.E,1),(s<1||s>7)&&(p=!0)):(a=e._locale._week.dow,u=e._locale._week.doy,v=yu(At(),a,u),n=va(t.gg,e._a[Rn],v.year),r=va(t.w,v.week),t.d!=null?(s=t.d,(s<0||s>6)&&(p=!0)):t.e!=null?(s=t.e+a,(t.e<0||t.e>6)&&(p=!0)):s=a),r<1||r>ts(n,a,u)?Te(e)._overflowWeeks=!0:p!=null?Te(e)._overflowWeekday=!0:(c=gS(n,r,s,a,u),e._a[Rn]=c.year,e._dayOfYear=c.dayOfYear)}ce.ISO_8601=function(){};ce.RFC_2822=function(){};function kg(e){if(e._f===ce.ISO_8601){xS(e);return}if(e._f===ce.RFC_2822){SS(e);return}e._a=[],Te(e).empty=!0;var t=""+e._i,n,r,s,a,u,c=t.length,p=0,v,m;for(s=rS(e._f,e._locale).match(pg)||[],m=s.length,n=0;n0&&Te(e).unusedInput.push(u),t=t.slice(t.indexOf(r)+r.length),p+=r.length),Fa[a]?(r?Te(e).empty=!1:Te(e).unusedTokens.push(a),X3(a,r,e)):e._strict&&!r&&Te(e).unusedTokens.push(a);Te(e).charsLeftOver=c-p,t.length>0&&Te(e).unusedInput.push(t),e._a[pn]<=12&&Te(e).bigHour===!0&&e._a[pn]>0&&(Te(e).bigHour=void 0),Te(e).parsedDateParts=e._a.slice(0),Te(e).meridiem=e._meridiem,e._a[pn]=lA(e._locale,e._a[pn],e._meridiem),v=Te(e).era,v!==null&&(e._a[Rn]=e._locale.erasConvertYear(v,e._a[Rn])),Mg(e),Sg(e)}function lA(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function uA(e){var t,n,r,s,a,u,c=!1,p=e._f.length;if(p===0){Te(e).invalidFormat=!0,e._d=new Date(NaN);return}for(s=0;sthis?this:e:jh()});function CS(e,t){var n,r;if(t.length===1&&si(t[0])&&(t=t[0]),!t.length)return At();for(n=t[0],r=1;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function PA(){if(!Xn(this._isDSTShifted))return this._isDSTShifted;var e={},t;return hg(e,this),e=MS(e),e._a?(t=e._isUTC?Pi(e._a):At(e._a),this._isDSTShifted=this.isValid()&&xA(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function RA(){return this.isValid()?!this._isUTC:!1}function DA(){return this.isValid()?this._isUTC:!1}function ES(){return this.isValid()?this._isUTC&&this._offset===0:!1}var AA=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,LA=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function ai(e,t){var n=e,r=null,s,a,u;return _c(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:os(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=AA.exec(e))?(s=r[1]==="-"?-1:1,n={y:0,d:De(r[Mi])*s,h:De(r[pn])*s,m:De(r[ti])*s,s:De(r[Ji])*s,ms:De(Km(r[Po]*1e3))*s}):(r=LA.exec(e))?(s=r[1]==="-"?-1:1,n={y:So(r[2],s),M:So(r[3],s),w:So(r[4],s),d:So(r[5],s),h:So(r[6],s),m:So(r[7],s),s:So(r[8],s)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(u=jA(At(n.from),At(n.to)),n={},n.ms=u.milliseconds,n.M=u.months),a=new Hh(n),_c(e)&&ze(e,"_locale")&&(a._locale=e._locale),_c(e)&&ze(e,"_isValid")&&(a._isValid=e._isValid),a}ai.fn=Hh.prototype;ai.invalid=_A;function So(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function uw(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function jA(e,t){var n;return e.isValid()&&t.isValid()?(t=Og(t,e),e.isBefore(t)?n=uw(e,t):(n=uw(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function TS(e,t){return function(n,r){var s,a;return r!==null&&!isNaN(+r)&&(nS(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=n,n=r,r=a),s=ai(n,r),bS(this,s,e),this}}function bS(e,t,n,r){var s=t._milliseconds,a=Km(t._days),u=Km(t._months);e.isValid()&&(r=r??!0,u&&hS(e,Kc(e,"Month")+u*n),a&&sS(e,"Date",Kc(e,"Date")+a*n),s&&e._d.setTime(e._d.valueOf()+s*n),r&&ce.updateOffset(e,a||u))}var NA=TS(1,"add"),IA=TS(-1,"subtract");function PS(e){return typeof e=="string"||e instanceof String}function FA(e){return oi(e)||Ou(e)||PS(e)||os(e)||$A(e)||UA(e)||e===null||e===void 0}function UA(e){var t=Ao(e)&&!fg(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],s,a,u=r.length;for(s=0;sn.valueOf():n.valueOf()9999?wc(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Ri(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",wc(n,"Z")):wc(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function eL(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,s,a;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",s="-MM-DD[T]HH:mm:ss.SSS",a=t+'[")]',this.format(n+r+s+a)}function tL(e){e||(e=this.isUtc()?ce.defaultFormatUtc:ce.defaultFormat);var t=wc(this,e);return this.localeData().postformat(t)}function nL(e,t){return this.isValid()&&(oi(e)&&e.isValid()||At(e).isValid())?ai({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function rL(e){return this.from(At(),e)}function iL(e,t){return this.isValid()&&(oi(e)&&e.isValid()||At(e).isValid())?ai({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function sL(e){return this.to(At(),e)}function RS(e){var t;return e===void 0?this._locale._abbr:(t=ls(e),t!=null&&(this._locale=t),this)}var DS=zr("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function AS(){return this._locale}var Jc=1e3,Ua=60*Jc,eh=60*Ua,LS=(365*400+97)*24*eh;function $a(e,t){return(e%t+t)%t}function jS(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-LS:new Date(e,t,n).valueOf()}function NS(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-LS:Date.UTC(e,t,n)}function oL(e){var t,n;if(e=Hr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?NS:jS,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=$a(t+(this._isUTC?0:this.utcOffset()*Ua),eh);break;case"minute":t=this._d.valueOf(),t-=$a(t,Ua);break;case"second":t=this._d.valueOf(),t-=$a(t,Jc);break}return this._d.setTime(t),ce.updateOffset(this,!0),this}function aL(e){var t,n;if(e=Hr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?NS:jS,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=eh-$a(t+(this._isUTC?0:this.utcOffset()*Ua),eh)-1;break;case"minute":t=this._d.valueOf(),t+=Ua-$a(t,Ua)-1;break;case"second":t=this._d.valueOf(),t+=Jc-$a(t,Jc)-1;break}return this._d.setTime(t),ce.updateOffset(this,!0),this}function lL(){return this._d.valueOf()-(this._offset||0)*6e4}function uL(){return Math.floor(this.valueOf()/1e3)}function fL(){return new Date(this.valueOf())}function cL(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function hL(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function dL(){return this.isValid()?this.toISOString():null}function pL(){return cg(this)}function mL(){return Ls({},Te(this))}function gL(){return Te(this).overflow}function vL(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}we("N",0,0,"eraAbbr");we("NN",0,0,"eraAbbr");we("NNN",0,0,"eraAbbr");we("NNNN",0,0,"eraName");we("NNNNN",0,0,"eraNarrow");we("y",["y",1],"yo","eraYear");we("y",["yy",2],0,"eraYear");we("y",["yyy",3],0,"eraYear");we("y",["yyyy",4],0,"eraYear");pe("N",Eg);pe("NN",Eg);pe("NNN",Eg);pe("NNNN",TL);pe("NNNNN",bL);lt(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var s=n._locale.erasParse(e,r,n._strict);s?Te(n).era=s:Te(n).invalidEra=e});pe("y",sl);pe("yy",sl);pe("yyy",sl);pe("yyyy",sl);pe("yo",PL);lt(["y","yy","yyy","yyyy"],Rn);lt(["yo"],function(e,t,n,r){var s;n._locale._eraYearOrdinalRegex&&(s=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Rn]=n._locale.eraYearOrdinalParse(e,s):t[Rn]=parseInt(e,10)});function yL(e,t){var n,r,s,a=this._eras||ls("en")._eras;for(n=0,r=a.length;n=0)return a[r]}function _L(e,t){var n=e.since<=e.until?1:-1;return t===void 0?ce(e.since).year():ce(e.since).year()+(t-e.offset)*n}function xL(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;ea&&(t=a),IL.call(this,e,t,n,r,s))}function IL(e,t,n,r,s){var a=gS(e,t,n,r,s),u=vu(a.year,0,a.dayOfYear);return this.year(u.getUTCFullYear()),this.month(u.getUTCMonth()),this.date(u.getUTCDate()),this}we("Q",0,"Qo","quarter");An("quarter","Q");Ln("quarter",7);pe("Q",oS);lt("Q",function(e,t){t[Xi]=(De(e)-1)*3});function FL(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}we("D",["DD",2],"Do","date");An("date","D");Ln("date",9);pe("D",Lt);pe("DD",Lt,Mr);pe("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});lt(["D","DD"],Mi);lt("Do",function(e,t){t[Mi]=De(e.match(Lt)[0])});var FS=il("Date",!0);we("DDD",["DDDD",3],"DDDo","dayOfYear");An("dayOfYear","DDD");Ln("dayOfYear",4);pe("DDD",Fh);pe("DDDD",aS);lt(["DDD","DDDD"],function(e,t,n){n._dayOfYear=De(e)});function UL(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}we("m",["mm",2],0,"minute");An("minute","m");Ln("minute",14);pe("m",Lt);pe("mm",Lt,Mr);lt(["m","mm"],ti);var $L=il("Minutes",!1);we("s",["ss",2],0,"second");An("second","s");Ln("second",15);pe("s",Lt);pe("ss",Lt,Mr);lt(["s","ss"],Ji);var WL=il("Seconds",!1);we("S",0,0,function(){return~~(this.millisecond()/100)});we(0,["SS",2],0,function(){return~~(this.millisecond()/10)});we(0,["SSS",3],0,"millisecond");we(0,["SSSS",4],0,function(){return this.millisecond()*10});we(0,["SSSSS",5],0,function(){return this.millisecond()*100});we(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});we(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});we(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});we(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});An("millisecond","ms");Ln("millisecond",16);pe("S",Fh,oS);pe("SS",Fh,Mr);pe("SSS",Fh,aS);var js,US;for(js="SSSS";js.length<=9;js+="S")pe(js,sl);function BL(e,t){t[Po]=De(("0."+e)*1e3)}for(js="S";js.length<=9;js+="S")lt(js,BL);US=il("Milliseconds",!1);we("z",0,0,"zoneAbbr");we("zz",0,0,"zoneName");function zL(){return this._isUTC?"UTC":""}function HL(){return this._isUTC?"Coordinated Universal Time":""}var ie=Eu.prototype;ie.add=NA;ie.calendar=zA;ie.clone=HA;ie.diff=ZA;ie.endOf=aL;ie.format=tL;ie.from=nL;ie.fromNow=rL;ie.to=iL;ie.toNow=sL;ie.get=G3;ie.invalidAt=gL;ie.isAfter=YA;ie.isBefore=GA;ie.isBetween=VA;ie.isSame=qA;ie.isSameOrAfter=QA;ie.isSameOrBefore=KA;ie.isValid=pL;ie.lang=DS;ie.locale=RS;ie.localeData=AS;ie.max=pA;ie.min=dA;ie.parsingFlags=mL;ie.set=V3;ie.startOf=oL;ie.subtract=IA;ie.toArray=cL;ie.toObject=hL;ie.toDate=fL;ie.toISOString=JA;ie.inspect=eL;typeof Symbol<"u"&&Symbol.for!=null&&(ie[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});ie.toJSON=dL;ie.toString=XA;ie.unix=uL;ie.valueOf=lL;ie.creationData=vL;ie.eraName=xL;ie.eraNarrow=SL;ie.eraAbbr=ML;ie.eraYear=kL;ie.year=mS;ie.isLeapYear=hD;ie.weekYear=RL;ie.isoWeekYear=DL;ie.quarter=ie.quarters=FL;ie.month=dS;ie.daysInMonth=uD;ie.week=ie.weeks=yD;ie.isoWeek=ie.isoWeeks=wD;ie.weeksInYear=jL;ie.weeksInWeekYear=NL;ie.isoWeeksInYear=AL;ie.isoWeeksInISOWeekYear=LL;ie.date=FS;ie.day=ie.days=DD;ie.weekday=AD;ie.isoWeekday=LD;ie.dayOfYear=UL;ie.hour=ie.hours=WD;ie.minute=ie.minutes=$L;ie.second=ie.seconds=WL;ie.millisecond=ie.milliseconds=US;ie.utcOffset=MA;ie.utc=CA;ie.local=OA;ie.parseZone=EA;ie.hasAlignedHourOffset=TA;ie.isDST=bA;ie.isLocal=RA;ie.isUtcOffset=DA;ie.isUtc=ES;ie.isUTC=ES;ie.zoneAbbr=zL;ie.zoneName=HL;ie.dates=zr("dates accessor is deprecated. Use date instead.",FS);ie.months=zr("months accessor is deprecated. Use month instead",dS);ie.years=zr("years accessor is deprecated. Use year instead",mS);ie.zone=zr("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",kA);ie.isDSTShifted=zr("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",PA);function YL(e){return At(e*1e3)}function GL(){return At.apply(null,arguments).parseZone()}function $S(e){return e}var He=dg.prototype;He.calendar=D3;He.longDateFormat=N3;He.invalidDate=F3;He.ordinal=W3;He.preparse=$S;He.postformat=$S;He.relativeTime=z3;He.pastFuture=H3;He.set=P3;He.eras=yL;He.erasParse=wL;He.erasConvertYear=_L;He.erasAbbrRegex=OL;He.erasNameRegex=CL;He.erasNarrowRegex=EL;He.months=sD;He.monthsShort=oD;He.monthsParse=lD;He.monthsRegex=cD;He.monthsShortRegex=fD;He.week=pD;He.firstDayOfYear=vD;He.firstDayOfWeek=gD;He.weekdays=ED;He.weekdaysMin=bD;He.weekdaysShort=TD;He.weekdaysParse=RD;He.weekdaysRegex=jD;He.weekdaysShortRegex=ND;He.weekdaysMinRegex=ID;He.isPM=UD;He.meridiem=BD;function th(e,t,n,r){var s=ls(),a=Pi().set(r,t);return s[n](a,e)}function WS(e,t,n){if(os(e)&&(t=e,e=void 0),e=e||"",t!=null)return th(e,t,n,"month");var r,s=[];for(r=0;r<12;r++)s[r]=th(e,r,n,"month");return s}function bg(e,t,n,r){typeof e=="boolean"?(os(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,os(t)&&(n=t,t=void 0),t=t||"");var s=ls(),a=e?s._week.dow:0,u,c=[];if(n!=null)return th(t,(n+a)%7,r,"day");for(u=0;u<7;u++)c[u]=th(t,(u+a)%7,r,"day");return c}function VL(e,t){return WS(e,t,"months")}function qL(e,t){return WS(e,t,"monthsShort")}function QL(e,t,n){return bg(e,t,n,"weekdays")}function KL(e,t,n){return bg(e,t,n,"weekdaysShort")}function ZL(e,t,n){return bg(e,t,n,"weekdaysMin")}Hs("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=De(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});ce.lang=zr("moment.lang is deprecated. Use moment.locale instead.",Hs);ce.langData=zr("moment.langData is deprecated. Use moment.localeData instead.",ls);var Gi=Math.abs;function XL(){var e=this._data;return this._milliseconds=Gi(this._milliseconds),this._days=Gi(this._days),this._months=Gi(this._months),e.milliseconds=Gi(e.milliseconds),e.seconds=Gi(e.seconds),e.minutes=Gi(e.minutes),e.hours=Gi(e.hours),e.months=Gi(e.months),e.years=Gi(e.years),this}function BS(e,t,n,r){var s=ai(t,n);return e._milliseconds+=r*s._milliseconds,e._days+=r*s._days,e._months+=r*s._months,e._bubble()}function JL(e,t){return BS(this,e,t,1)}function ej(e,t){return BS(this,e,t,-1)}function fw(e){return e<0?Math.floor(e):Math.ceil(e)}function tj(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,s,a,u,c,p;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=fw(Xm(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,s=Nr(e/1e3),r.seconds=s%60,a=Nr(s/60),r.minutes=a%60,u=Nr(a/60),r.hours=u%24,t+=Nr(u/24),p=Nr(zS(t)),n+=p,t-=fw(Xm(p)),c=Nr(n/12),n%=12,r.days=t,r.months=n,r.years=c,this}function zS(e){return e*4800/146097}function Xm(e){return e*146097/4800}function nj(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=Hr(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+zS(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Xm(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function rj(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+De(this._months/12)*31536e6:NaN}function us(e){return function(){return this.as(e)}}var ij=us("ms"),sj=us("s"),oj=us("m"),aj=us("h"),lj=us("d"),uj=us("w"),fj=us("M"),cj=us("Q"),hj=us("y");function dj(){return ai(this)}function pj(e){return e=Hr(e),this.isValid()?this[e+"s"]():NaN}function Ho(e){return function(){return this.isValid()?this._data[e]:NaN}}var mj=Ho("milliseconds"),gj=Ho("seconds"),vj=Ho("minutes"),yj=Ho("hours"),wj=Ho("days"),_j=Ho("months"),xj=Ho("years");function Sj(){return Nr(this.days()/7)}var qi=Math.round,Pa={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Mj(e,t,n,r,s){return s.relativeTime(t||1,!!n,e,r)}function kj(e,t,n,r){var s=ai(e).abs(),a=qi(s.as("s")),u=qi(s.as("m")),c=qi(s.as("h")),p=qi(s.as("d")),v=qi(s.as("M")),m=qi(s.as("w")),O=qi(s.as("y")),E=a<=n.ss&&["s",a]||a0,E[4]=r,Mj.apply(null,E)}function Cj(e){return e===void 0?qi:typeof e=="function"?(qi=e,!0):!1}function Oj(e,t){return Pa[e]===void 0?!1:t===void 0?Pa[e]:(Pa[e]=t,e==="s"&&(Pa.ss=t-1),!0)}function Ej(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=Pa,s,a;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},Pa,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),s=this.localeData(),a=kj(this,!n,r,s),n&&(a=s.pastFuture(+this,a)),s.postformat(a)}var Yp=Math.abs;function da(e){return(e>0)-(e<0)||+e}function Gh(){if(!this.isValid())return this.localeData().invalidDate();var e=Yp(this._milliseconds)/1e3,t=Yp(this._days),n=Yp(this._months),r,s,a,u,c=this.asSeconds(),p,v,m,O;return c?(r=Nr(e/60),s=Nr(r/60),e%=60,r%=60,a=Nr(n/12),n%=12,u=e?e.toFixed(3).replace(/\.?0+$/,""):"",p=c<0?"-":"",v=da(this._months)!==da(c)?"-":"",m=da(this._days)!==da(c)?"-":"",O=da(this._milliseconds)!==da(c)?"-":"",p+"P"+(a?v+a+"Y":"")+(n?v+n+"M":"")+(t?m+t+"D":"")+(s||r||e?"T":"")+(s?O+s+"H":"")+(r?O+r+"M":"")+(e?O+u+"S":"")):"P0D"}var $e=Hh.prototype;$e.isValid=wA;$e.abs=XL;$e.add=JL;$e.subtract=ej;$e.as=nj;$e.asMilliseconds=ij;$e.asSeconds=sj;$e.asMinutes=oj;$e.asHours=aj;$e.asDays=lj;$e.asWeeks=uj;$e.asMonths=fj;$e.asQuarters=cj;$e.asYears=hj;$e.valueOf=rj;$e._bubble=tj;$e.clone=dj;$e.get=pj;$e.milliseconds=mj;$e.seconds=gj;$e.minutes=vj;$e.hours=yj;$e.days=wj;$e.weeks=Sj;$e.months=_j;$e.years=xj;$e.humanize=Ej;$e.toISOString=Gh;$e.toString=Gh;$e.toJSON=Gh;$e.locale=RS;$e.localeData=AS;$e.toIsoString=zr("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Gh);$e.lang=DS;we("X",0,0,"unix");we("x",0,0,"valueOf");pe("x",$h);pe("X",Q3);lt("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});lt("x",function(e,t,n){n._d=new Date(De(e))});//! moment.js +ce.version="2.29.3";T3(At);ce.fn=ie;ce.min=mA;ce.max=gA;ce.now=vA;ce.utc=Pi;ce.unix=YL;ce.months=VL;ce.isDate=Ou;ce.locale=Hs;ce.invalid=jh;ce.duration=ai;ce.isMoment=oi;ce.weekdays=QL;ce.parseZone=GL;ce.localeData=ls;ce.isDuration=_c;ce.monthsShort=qL;ce.weekdaysMin=ZL;ce.defineLocale=xg;ce.updateLocale=GD;ce.locales=VD;ce.weekdaysShort=KL;ce.normalizeUnits=Hr;ce.relativeTimeRounding=Cj;ce.relativeTimeThreshold=Oj;ce.calendarFormat=BA;ce.prototype=ie;ce.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};function Os(e,t=!1){let n=window.location.href.split("?")[1];return t&&n?n="?"+n:n="","/~debug/"+e+n}function mr(e,t){const n=new Date(e),r=function(s){return s>=10?s:"0"+s};return`~${n.getUTCFullYear()}.${n.getUTCMonth()+1}.${r(n.getUTCDate())}..${r(n.getUTCHours())}.${r(n.getUTCMinutes())}.${r(n.getUTCSeconds())}${t?".."+Math.floor(n.getUTCMilliseconds()/1e3*65536).toString(16).padStart(4,"0"):""}`}function bs(e){return e.reduce((t,n)=>t+n+" ","")}function Tj(e){let t="";for(let n=0;n=97&&a<=122||a>=48&&a<=57||r==="-"?s=r:s="~"+a.toString(16)+"."}t=t+s}return"~~"+t}class bj{setAuthTokens(t){this.authTokens=t,this.bindPaths=[],this.bind=this.bind.bind(this)}bind(t,n,r=this.authTokens.ship,s,a,u,c){this.bindPaths=ln.uniq([...this.bindPaths,t]),window.subscriptionId=window.urb.subscribe(r,s,t,p=>{u(p)},p=>{a({data:p,from:{ship:r,path:t}})},p=>{c(p)})}action(t,n,r){return new Promise((s,a)=>{window.urb.poke(ship,t,n,r,u=>{s(u)},u=>{a(u)})})}dbugAction(t){return this.action("dbug","dbug-action",t)}bindToVerb(t){return this.bind("/verb/events","PUT",this.authTokens.ship,t,n=>{n.data.app=t,qe.handleEvent({data:{local:{verbResult:n.data}}})},()=>{qe.handleEvent({data:{local:{verbStatus:{app:t,msg:"failed to establish verb connection to "+t}}}})},()=>{qe.handleEvent({data:{local:{verbStatus:{app:t,msg:"verb connection to "+t+" was dropped"}}}})})}bindToVerbPlus(t){return this.bind("/verb/events-plus","PUT",this.authTokens.ship,t,n=>{n.data.app=t,qe.handleEvent({data:{local:{verbEventPlus:{gill:`~${this.authTokens.ship}/${t}`,log:n.data}}}})},()=>{qe.handleEvent({data:{local:{verbStatus:{app:t,msg:"failed to establish verb+ connection to "+t}}}})},()=>{qe.handleEvent({data:{local:{verbStatus:{app:t,msg:"verb+ connection to "+t+" was dropped"}}}})})}getJson(t,n,r){let s="/~debug"+t+".json";const a=window.location.href.split("?")[1];a&&(s=s+"?"+a),fetch(s).then(u=>{if(!u.ok)console.error("Network response not ok"),r();else return u.json()}).then(u=>{qe.handleEvent({data:{local:n(u)}})}).catch(u=>{console.error(`JSON fetch on ${s} failed:`,u),r()})}wrapLocal(t){return n=>{let r={};return r[t]=n,r.status=null,r}}showStatus(t){return()=>{qe.handleEvent({data:{local:{status:t}}})}}getApps(){this.getJson("/apps",this.wrapLocal("apps"),this.showStatus("error fetching apps"))}getAppDetails(t){this.getJson("/app/"+t,n=>(n.app=t,this.wrapLocal("app")(n)),()=>{qe.handleEvent({data:{local:{appFailed:t}}})})}getAppState(t,n=""){n!==""&&(n="/"+Tj(n)),this.getJson("/app/"+t+"/state"+n,r=>(r.app=t,this.wrapLocal("appState")(r)),()=>{qe.handleEvent({data:{local:{appFailed:t}}})})}getThreads(){this.getJson("/spider/threads",this.wrapLocal("threads"),this.showStatus("error fetching threads"))}killThread(t){return this.action("spider","spider-stop",{tid:t,nice:!1}).then(this.getThreads.bind(this))}getPeers(){this.getJson("/ames/peer",this.wrapLocal("amesPeers"),this.showStatus("error fetching ames peers"))}getPeer(t){this.getJson(`/ames/peer/${t}`,n=>(n.who=t,this.wrapLocal("amesPeer")(n)),this.showStatus("error fetching ames details for "+t))}getTimers(){this.getJson("/behn/timers",this.wrapLocal("behnTimers"),this.showStatus("error fetching behn timers"))}getCommits(){this.getJson("/clay/commits",this.wrapLocal("clayCommits"),this.showStatus("error fetching clay commits"))}getBindings(){this.getJson("/eyre/bindings",this.wrapLocal("eyreBindings"),this.showStatus("error fetching eyre bindings"))}getCache(){this.getJson("/eyre/cache",this.wrapLocal("eyreCache"),this.showStatus("error fetching eyre cache"))}getConnections(){this.getJson("/eyre/connections",this.wrapLocal("eyreConnections"),this.showStatus("error fetching eyre connections"))}getAuthenticationState(){this.getJson("/eyre/authentication",this.wrapLocal("eyreAuthentication"),this.showStatus("error fetching eyre authentication state"))}getChannels(){this.getJson("/eyre/channels",this.wrapLocal("eyreChannels"),this.showStatus("error fetching eyre channels"))}clearCache(t){return this.action("dbug","json",{"clear-eyre-cache":{url:t}}).then(this.getCache.bind(this))}sidebarToggle(){let t=!0;qe.state.sidebarShown===!0&&(t=!1),qe.handleEvent({data:{local:{sidebarToggle:t}}})}}let Pg=new bj;window.api=Pg;class Pj{start(){Pg.authTokens||console.error("~~~ ERROR: Must set api.authTokens before operation ~~~")}handleEvent(t){qe.handleEvent(t)}handleError(t){console.error(t)}handleQuitSilently(t){}handleQuitAndResubscribe(t){}}let Rj=new Pj;class Dj extends oe.Component{render(){const{props:t}=this;let n=t.selected?"bg-gray5 bg-gray1-d":"pointer hover-bg-gray5 hover-bg-gray1-d";return y.jsx(ug,{to:Os(t.what,!0),children:y.jsx("div",{className:"w-100 v-mid f9 ph4 z1 pv1 "+n,children:y.jsx("p",{className:"f9 dib",children:t.what})})},"what")}}class Cs extends oe.Component{render(){const{props:t}=this;let n=["apps","logs","spider","ames","behn","eyre"];n=n.map(a=>y.jsx(Dj,{what:a,selected:t.selected===a}));let r=this.props.rightPanelHide?"dn-s":"";const s=t.status?y.jsx("div",{style:{position:"absolute",right:"16px",bottom:"16px",padding:"8px",border:"1px solid #e22"},children:t.status}):null;return y.jsx("div",{className:"absolute h-100 w-100 mono",children:y.jsxs("div",{className:"cf w-100 h-100 flex",children:[y.jsxs("div",{className:"bn br-m br-l br-xl b--gray4 b--gray1-d lh-copy h-100 flex-shrink-0 mw5-m mw5-l mw5-xl pt3 pt0-m pt0-l pt0-xl relative",children:[y.jsx("a",{className:"db dn-m dn-l dn-xl f8 pb3 pl3",href:"/",children:"⟵ Landscape"}),y.jsxs("div",{className:"overflow-y-scroll h-100",children:[y.jsx("div",{className:"w-100 bg-transparent",children:y.jsx(ug,{className:"dib f9 pointer green2 gray4-d pa4",to:"/~chat/join/~/~dopzod/urbit-help",children:"Get help"})}),n]})]}),s,y.jsx("div",{className:"h-100 w-100 flex-auto overflow-scroll relative "+r,style:{flexGrow:1,padding:"8px"},children:this.props.children})]})})}}class Aj extends oe.Component{render(){return y.jsx("div",{className:"h-100 w-100 overflow-x-hidden flex flex-column bg-white bg-gray0-d dn db-ns",children:y.jsx("div",{className:"pl3 pr3 pt2 dt pb3 w-100 h-100",children:y.jsx("p",{className:"f8 pt3 gray2 w-100 h-100 dtc v-mid tc",children:this.props.text})})})}}var Rg={exports:{}};const Lj={},jj=Object.freeze(Object.defineProperty({__proto__:null,default:Lj},Symbol.toStringTag,{value:"Module"})),Nj=ZT(jj);Rg.exports;(function(e){(function(t,n){function r(P,f){if(!P)throw new Error(f||"Assertion failed")}function s(P,f){P.super_=f;var g=function(){};g.prototype=f.prototype,P.prototype=new g,P.prototype.constructor=P}function a(P,f,g){if(a.isBN(P))return P;this.negative=0,this.words=null,this.length=0,this.red=null,P!==null&&((f==="le"||f==="be")&&(g=f,f=10),this._init(P||0,f||10,g||"be"))}typeof t=="object"?t.exports=a:n.BN=a,a.BN=a,a.wordSize=26;var u;try{typeof window<"u"&&typeof window.Buffer<"u"?u=window.Buffer:u=Nj.Buffer}catch{}a.isBN=function(f){return f instanceof a?!0:f!==null&&typeof f=="object"&&f.constructor.wordSize===a.wordSize&&Array.isArray(f.words)},a.max=function(f,g){return f.cmp(g)>0?f:g},a.min=function(f,g){return f.cmp(g)<0?f:g},a.prototype._init=function(f,g,S){if(typeof f=="number")return this._initNumber(f,g,S);if(typeof f=="object")return this._initArray(f,g,S);g==="hex"&&(g=16),r(g===(g|0)&&g>=2&&g<=36),f=f.toString().replace(/\s+/g,"");var C=0;f[0]==="-"&&(C++,this.negative=1),C=0;C-=3)L=f[C]|f[C-1]<<8|f[C-2]<<16,this.words[b]|=L<>>26-R&67108863,R+=24,R>=26&&(R-=26,b++);else if(S==="le")for(C=0,b=0;C>>26-R&67108863,R+=24,R>=26&&(R-=26,b++);return this.strip()};function c(P,f){var g=P.charCodeAt(f);return g>=65&&g<=70?g-55:g>=97&&g<=102?g-87:g-48&15}function p(P,f,g){var S=c(P,g);return g-1>=f&&(S|=c(P,g-1)<<4),S}a.prototype._parseHex=function(f,g,S){this.length=Math.ceil((f.length-g)/6),this.words=new Array(this.length);for(var C=0;C=g;C-=2)R=p(f,g,C)<=18?(b-=18,L+=1,this.words[L]|=R>>>26):b+=8;else{var _=f.length-g;for(C=_%2===0?g+1:g;C=18?(b-=18,L+=1,this.words[L]|=R>>>26):b+=8}this.strip()};function v(P,f,g,S){for(var C=0,b=Math.min(P.length,g),L=f;L=49?C+=R-49+10:R>=17?C+=R-17+10:C+=R}return C}a.prototype._parseBase=function(f,g,S){this.words=[0],this.length=1;for(var C=0,b=1;b<=67108863;b*=g)C++;C--,b=b/g|0;for(var L=f.length-S,R=L%C,_=Math.min(L,L-R)+S,h=0,M=S;M<_;M+=C)h=v(f,M,M+C,g),this.imuln(b),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h);if(R!==0){var G=1;for(h=v(f,M,f.length,g),M=0;M1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},a.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var m=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],O=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],E=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];a.prototype.toString=function(f,g){f=f||10,g=g|0||1;var S;if(f===16||f==="hex"){S="";for(var C=0,b=0,L=0;L>>24-C&16777215,b!==0||L!==this.length-1?S=m[6-_.length]+_+S:S=_+S,C+=2,C>=26&&(C-=26,L--)}for(b!==0&&(S=b.toString(16)+S);S.length%g!==0;)S="0"+S;return this.negative!==0&&(S="-"+S),S}if(f===(f|0)&&f>=2&&f<=36){var h=O[f],M=E[f];S="";var G=this.clone();for(G.negative=0;!G.isZero();){var se=G.modn(M).toString(f);G=G.idivn(M),G.isZero()?S=se+S:S=m[h-se.length]+se+S}for(this.isZero()&&(S="0"+S);S.length%g!==0;)S="0"+S;return this.negative!==0&&(S="-"+S),S}r(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var f=this.words[0];return this.length===2?f+=this.words[1]*67108864:this.length===3&&this.words[2]===1?f+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-f:f},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(f,g){return r(typeof u<"u"),this.toArrayLike(u,f,g)},a.prototype.toArray=function(f,g){return this.toArrayLike(Array,f,g)},a.prototype.toArrayLike=function(f,g,S){var C=this.byteLength(),b=S||Math.max(1,C);r(C<=b,"byte array longer than desired length"),r(b>0,"Requested array length <= 0"),this.strip();var L=g==="le",R=new f(b),_,h,M=this.clone();if(L){for(h=0;!M.isZero();h++)_=M.andln(255),M.iushrn(8),R[h]=_;for(;h=4096&&(S+=13,g>>>=13),g>=64&&(S+=7,g>>>=7),g>=8&&(S+=4,g>>>=4),g>=2&&(S+=2,g>>>=2),S+g},a.prototype._zeroBits=function(f){if(f===0)return 26;var g=f,S=0;return g&8191||(S+=13,g>>>=13),g&127||(S+=7,g>>>=7),g&15||(S+=4,g>>>=4),g&3||(S+=2,g>>>=2),g&1||S++,S},a.prototype.bitLength=function(){var f=this.words[this.length-1],g=this._countBits(f);return(this.length-1)*26+g};function F(P){for(var f=new Array(P.bitLength()),g=0;g>>C}return f}a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var f=0,g=0;gf.length?this.clone().ior(f):f.clone().ior(this)},a.prototype.uor=function(f){return this.length>f.length?this.clone().iuor(f):f.clone().iuor(this)},a.prototype.iuand=function(f){var g;this.length>f.length?g=f:g=this;for(var S=0;Sf.length?this.clone().iand(f):f.clone().iand(this)},a.prototype.uand=function(f){return this.length>f.length?this.clone().iuand(f):f.clone().iuand(this)},a.prototype.iuxor=function(f){var g,S;this.length>f.length?(g=this,S=f):(g=f,S=this);for(var C=0;Cf.length?this.clone().ixor(f):f.clone().ixor(this)},a.prototype.uxor=function(f){return this.length>f.length?this.clone().iuxor(f):f.clone().iuxor(this)},a.prototype.inotn=function(f){r(typeof f=="number"&&f>=0);var g=Math.ceil(f/26)|0,S=f%26;this._expand(g),S>0&&g--;for(var C=0;C0&&(this.words[C]=~this.words[C]&67108863>>26-S),this.strip()},a.prototype.notn=function(f){return this.clone().inotn(f)},a.prototype.setn=function(f,g){r(typeof f=="number"&&f>=0);var S=f/26|0,C=f%26;return this._expand(S+1),g?this.words[S]=this.words[S]|1<f.length?(S=this,C=f):(S=f,C=this);for(var b=0,L=0;L>>26;for(;b!==0&&L>>26;if(this.length=S.length,b!==0)this.words[this.length]=b,this.length++;else if(S!==this)for(;Lf.length?this.clone().iadd(f):f.clone().iadd(this)},a.prototype.isub=function(f){if(f.negative!==0){f.negative=0;var g=this.iadd(f);return f.negative=1,g._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(f),this.negative=1,this._normSign();var S=this.cmp(f);if(S===0)return this.negative=0,this.length=1,this.words[0]=0,this;var C,b;S>0?(C=this,b=f):(C=f,b=this);for(var L=0,R=0;R>26,this.words[R]=g&67108863;for(;L!==0&&R>26,this.words[R]=g&67108863;if(L===0&&R>>26,G=_&67108863,se=Math.min(h,f.length-1),ae=Math.max(0,h-P.length+1);ae<=se;ae++){var re=h-ae|0;C=P.words[re]|0,b=f.words[ae]|0,L=C*b+G,M+=L/67108864|0,G=L&67108863}g.words[h]=G|0,_=M|0}return _!==0?g.words[h]=_|0:g.length--,g.strip()}var Q=function(f,g,S){var C=f.words,b=g.words,L=S.words,R=0,_,h,M,G=C[0]|0,se=G&8191,ae=G>>>13,re=C[1]|0,ye=re&8191,Me=re>>>13,Be=C[2]|0,Re=Be&8191,Xe=Be>>>13,ui=C[3]|0,Je=ui&8191,vt=ui>>>13,_n=C[4]|0,rt=_n&8191,jt=_n>>>13,Gn=C[5]|0,Ct=Gn&8191,Nt=Gn>>>13,fi=C[6]|0,Ue=fi&8191,it=fi>>>13,Di=C[7]|0,It=Di&8191,st=Di>>>13,Yo=C[8]|0,Ye=Yo&8191,Ge=Yo>>>13,Ai=C[9]|0,Ne=Ai&8191,ut=Ai>>>13,Li=b[0]|0,yt=Li&8191,ft=Li>>>13,Yr=b[1]|0,ct=Yr&8191,ht=Yr>>>13,Go=b[2]|0,Ke=Go&8191,Ot=Go>>>13,Ks=b[3]|0,Et=Ks&8191,wt=Ks>>>13,ci=b[4]|0,_t=ci&8191,xt=ci>>>13,ji=b[5]|0,ot=ji&8191,Ft=ji>>>13,Vo=b[6]|0,St=Vo&8191,Ut=Vo>>>13,fs=b[7]|0,Tt=fs&8191,Mt=fs>>>13,Cr=b[8]|0,$t=Cr&8191,Wt=Cr>>>13,qo=b[9]|0,Bt=qo&8191,zt=qo>>>13;S.negative=f.negative^g.negative,S.length=19,_=Math.imul(se,yt),h=Math.imul(se,ft),h=h+Math.imul(ae,yt)|0,M=Math.imul(ae,ft);var Cn=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(Cn>>>26)|0,Cn&=67108863,_=Math.imul(ye,yt),h=Math.imul(ye,ft),h=h+Math.imul(Me,yt)|0,M=Math.imul(Me,ft),_=_+Math.imul(se,ct)|0,h=h+Math.imul(se,ht)|0,h=h+Math.imul(ae,ct)|0,M=M+Math.imul(ae,ht)|0;var Zs=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(Zs>>>26)|0,Zs&=67108863,_=Math.imul(Re,yt),h=Math.imul(Re,ft),h=h+Math.imul(Xe,yt)|0,M=Math.imul(Xe,ft),_=_+Math.imul(ye,ct)|0,h=h+Math.imul(ye,ht)|0,h=h+Math.imul(Me,ct)|0,M=M+Math.imul(Me,ht)|0,_=_+Math.imul(se,Ke)|0,h=h+Math.imul(se,Ot)|0,h=h+Math.imul(ae,Ke)|0,M=M+Math.imul(ae,Ot)|0;var Xs=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(Xs>>>26)|0,Xs&=67108863,_=Math.imul(Je,yt),h=Math.imul(Je,ft),h=h+Math.imul(vt,yt)|0,M=Math.imul(vt,ft),_=_+Math.imul(Re,ct)|0,h=h+Math.imul(Re,ht)|0,h=h+Math.imul(Xe,ct)|0,M=M+Math.imul(Xe,ht)|0,_=_+Math.imul(ye,Ke)|0,h=h+Math.imul(ye,Ot)|0,h=h+Math.imul(Me,Ke)|0,M=M+Math.imul(Me,Ot)|0,_=_+Math.imul(se,Et)|0,h=h+Math.imul(se,wt)|0,h=h+Math.imul(ae,Et)|0,M=M+Math.imul(ae,wt)|0;var Js=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(Js>>>26)|0,Js&=67108863,_=Math.imul(rt,yt),h=Math.imul(rt,ft),h=h+Math.imul(jt,yt)|0,M=Math.imul(jt,ft),_=_+Math.imul(Je,ct)|0,h=h+Math.imul(Je,ht)|0,h=h+Math.imul(vt,ct)|0,M=M+Math.imul(vt,ht)|0,_=_+Math.imul(Re,Ke)|0,h=h+Math.imul(Re,Ot)|0,h=h+Math.imul(Xe,Ke)|0,M=M+Math.imul(Xe,Ot)|0,_=_+Math.imul(ye,Et)|0,h=h+Math.imul(ye,wt)|0,h=h+Math.imul(Me,Et)|0,M=M+Math.imul(Me,wt)|0,_=_+Math.imul(se,_t)|0,h=h+Math.imul(se,xt)|0,h=h+Math.imul(ae,_t)|0,M=M+Math.imul(ae,xt)|0;var eo=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(eo>>>26)|0,eo&=67108863,_=Math.imul(Ct,yt),h=Math.imul(Ct,ft),h=h+Math.imul(Nt,yt)|0,M=Math.imul(Nt,ft),_=_+Math.imul(rt,ct)|0,h=h+Math.imul(rt,ht)|0,h=h+Math.imul(jt,ct)|0,M=M+Math.imul(jt,ht)|0,_=_+Math.imul(Je,Ke)|0,h=h+Math.imul(Je,Ot)|0,h=h+Math.imul(vt,Ke)|0,M=M+Math.imul(vt,Ot)|0,_=_+Math.imul(Re,Et)|0,h=h+Math.imul(Re,wt)|0,h=h+Math.imul(Xe,Et)|0,M=M+Math.imul(Xe,wt)|0,_=_+Math.imul(ye,_t)|0,h=h+Math.imul(ye,xt)|0,h=h+Math.imul(Me,_t)|0,M=M+Math.imul(Me,xt)|0,_=_+Math.imul(se,ot)|0,h=h+Math.imul(se,Ft)|0,h=h+Math.imul(ae,ot)|0,M=M+Math.imul(ae,Ft)|0;var to=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(to>>>26)|0,to&=67108863,_=Math.imul(Ue,yt),h=Math.imul(Ue,ft),h=h+Math.imul(it,yt)|0,M=Math.imul(it,ft),_=_+Math.imul(Ct,ct)|0,h=h+Math.imul(Ct,ht)|0,h=h+Math.imul(Nt,ct)|0,M=M+Math.imul(Nt,ht)|0,_=_+Math.imul(rt,Ke)|0,h=h+Math.imul(rt,Ot)|0,h=h+Math.imul(jt,Ke)|0,M=M+Math.imul(jt,Ot)|0,_=_+Math.imul(Je,Et)|0,h=h+Math.imul(Je,wt)|0,h=h+Math.imul(vt,Et)|0,M=M+Math.imul(vt,wt)|0,_=_+Math.imul(Re,_t)|0,h=h+Math.imul(Re,xt)|0,h=h+Math.imul(Xe,_t)|0,M=M+Math.imul(Xe,xt)|0,_=_+Math.imul(ye,ot)|0,h=h+Math.imul(ye,Ft)|0,h=h+Math.imul(Me,ot)|0,M=M+Math.imul(Me,Ft)|0,_=_+Math.imul(se,St)|0,h=h+Math.imul(se,Ut)|0,h=h+Math.imul(ae,St)|0,M=M+Math.imul(ae,Ut)|0;var or=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(or>>>26)|0,or&=67108863,_=Math.imul(It,yt),h=Math.imul(It,ft),h=h+Math.imul(st,yt)|0,M=Math.imul(st,ft),_=_+Math.imul(Ue,ct)|0,h=h+Math.imul(Ue,ht)|0,h=h+Math.imul(it,ct)|0,M=M+Math.imul(it,ht)|0,_=_+Math.imul(Ct,Ke)|0,h=h+Math.imul(Ct,Ot)|0,h=h+Math.imul(Nt,Ke)|0,M=M+Math.imul(Nt,Ot)|0,_=_+Math.imul(rt,Et)|0,h=h+Math.imul(rt,wt)|0,h=h+Math.imul(jt,Et)|0,M=M+Math.imul(jt,wt)|0,_=_+Math.imul(Je,_t)|0,h=h+Math.imul(Je,xt)|0,h=h+Math.imul(vt,_t)|0,M=M+Math.imul(vt,xt)|0,_=_+Math.imul(Re,ot)|0,h=h+Math.imul(Re,Ft)|0,h=h+Math.imul(Xe,ot)|0,M=M+Math.imul(Xe,Ft)|0,_=_+Math.imul(ye,St)|0,h=h+Math.imul(ye,Ut)|0,h=h+Math.imul(Me,St)|0,M=M+Math.imul(Me,Ut)|0,_=_+Math.imul(se,Tt)|0,h=h+Math.imul(se,Mt)|0,h=h+Math.imul(ae,Tt)|0,M=M+Math.imul(ae,Mt)|0;var hi=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(hi>>>26)|0,hi&=67108863,_=Math.imul(Ye,yt),h=Math.imul(Ye,ft),h=h+Math.imul(Ge,yt)|0,M=Math.imul(Ge,ft),_=_+Math.imul(It,ct)|0,h=h+Math.imul(It,ht)|0,h=h+Math.imul(st,ct)|0,M=M+Math.imul(st,ht)|0,_=_+Math.imul(Ue,Ke)|0,h=h+Math.imul(Ue,Ot)|0,h=h+Math.imul(it,Ke)|0,M=M+Math.imul(it,Ot)|0,_=_+Math.imul(Ct,Et)|0,h=h+Math.imul(Ct,wt)|0,h=h+Math.imul(Nt,Et)|0,M=M+Math.imul(Nt,wt)|0,_=_+Math.imul(rt,_t)|0,h=h+Math.imul(rt,xt)|0,h=h+Math.imul(jt,_t)|0,M=M+Math.imul(jt,xt)|0,_=_+Math.imul(Je,ot)|0,h=h+Math.imul(Je,Ft)|0,h=h+Math.imul(vt,ot)|0,M=M+Math.imul(vt,Ft)|0,_=_+Math.imul(Re,St)|0,h=h+Math.imul(Re,Ut)|0,h=h+Math.imul(Xe,St)|0,M=M+Math.imul(Xe,Ut)|0,_=_+Math.imul(ye,Tt)|0,h=h+Math.imul(ye,Mt)|0,h=h+Math.imul(Me,Tt)|0,M=M+Math.imul(Me,Mt)|0,_=_+Math.imul(se,$t)|0,h=h+Math.imul(se,Wt)|0,h=h+Math.imul(ae,$t)|0,M=M+Math.imul(ae,Wt)|0;var no=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(no>>>26)|0,no&=67108863,_=Math.imul(Ne,yt),h=Math.imul(Ne,ft),h=h+Math.imul(ut,yt)|0,M=Math.imul(ut,ft),_=_+Math.imul(Ye,ct)|0,h=h+Math.imul(Ye,ht)|0,h=h+Math.imul(Ge,ct)|0,M=M+Math.imul(Ge,ht)|0,_=_+Math.imul(It,Ke)|0,h=h+Math.imul(It,Ot)|0,h=h+Math.imul(st,Ke)|0,M=M+Math.imul(st,Ot)|0,_=_+Math.imul(Ue,Et)|0,h=h+Math.imul(Ue,wt)|0,h=h+Math.imul(it,Et)|0,M=M+Math.imul(it,wt)|0,_=_+Math.imul(Ct,_t)|0,h=h+Math.imul(Ct,xt)|0,h=h+Math.imul(Nt,_t)|0,M=M+Math.imul(Nt,xt)|0,_=_+Math.imul(rt,ot)|0,h=h+Math.imul(rt,Ft)|0,h=h+Math.imul(jt,ot)|0,M=M+Math.imul(jt,Ft)|0,_=_+Math.imul(Je,St)|0,h=h+Math.imul(Je,Ut)|0,h=h+Math.imul(vt,St)|0,M=M+Math.imul(vt,Ut)|0,_=_+Math.imul(Re,Tt)|0,h=h+Math.imul(Re,Mt)|0,h=h+Math.imul(Xe,Tt)|0,M=M+Math.imul(Xe,Mt)|0,_=_+Math.imul(ye,$t)|0,h=h+Math.imul(ye,Wt)|0,h=h+Math.imul(Me,$t)|0,M=M+Math.imul(Me,Wt)|0,_=_+Math.imul(se,Bt)|0,h=h+Math.imul(se,zt)|0,h=h+Math.imul(ae,Bt)|0,M=M+Math.imul(ae,zt)|0;var di=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(di>>>26)|0,di&=67108863,_=Math.imul(Ne,ct),h=Math.imul(Ne,ht),h=h+Math.imul(ut,ct)|0,M=Math.imul(ut,ht),_=_+Math.imul(Ye,Ke)|0,h=h+Math.imul(Ye,Ot)|0,h=h+Math.imul(Ge,Ke)|0,M=M+Math.imul(Ge,Ot)|0,_=_+Math.imul(It,Et)|0,h=h+Math.imul(It,wt)|0,h=h+Math.imul(st,Et)|0,M=M+Math.imul(st,wt)|0,_=_+Math.imul(Ue,_t)|0,h=h+Math.imul(Ue,xt)|0,h=h+Math.imul(it,_t)|0,M=M+Math.imul(it,xt)|0,_=_+Math.imul(Ct,ot)|0,h=h+Math.imul(Ct,Ft)|0,h=h+Math.imul(Nt,ot)|0,M=M+Math.imul(Nt,Ft)|0,_=_+Math.imul(rt,St)|0,h=h+Math.imul(rt,Ut)|0,h=h+Math.imul(jt,St)|0,M=M+Math.imul(jt,Ut)|0,_=_+Math.imul(Je,Tt)|0,h=h+Math.imul(Je,Mt)|0,h=h+Math.imul(vt,Tt)|0,M=M+Math.imul(vt,Mt)|0,_=_+Math.imul(Re,$t)|0,h=h+Math.imul(Re,Wt)|0,h=h+Math.imul(Xe,$t)|0,M=M+Math.imul(Xe,Wt)|0,_=_+Math.imul(ye,Bt)|0,h=h+Math.imul(ye,zt)|0,h=h+Math.imul(Me,Bt)|0,M=M+Math.imul(Me,zt)|0;var ro=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(ro>>>26)|0,ro&=67108863,_=Math.imul(Ne,Ke),h=Math.imul(Ne,Ot),h=h+Math.imul(ut,Ke)|0,M=Math.imul(ut,Ot),_=_+Math.imul(Ye,Et)|0,h=h+Math.imul(Ye,wt)|0,h=h+Math.imul(Ge,Et)|0,M=M+Math.imul(Ge,wt)|0,_=_+Math.imul(It,_t)|0,h=h+Math.imul(It,xt)|0,h=h+Math.imul(st,_t)|0,M=M+Math.imul(st,xt)|0,_=_+Math.imul(Ue,ot)|0,h=h+Math.imul(Ue,Ft)|0,h=h+Math.imul(it,ot)|0,M=M+Math.imul(it,Ft)|0,_=_+Math.imul(Ct,St)|0,h=h+Math.imul(Ct,Ut)|0,h=h+Math.imul(Nt,St)|0,M=M+Math.imul(Nt,Ut)|0,_=_+Math.imul(rt,Tt)|0,h=h+Math.imul(rt,Mt)|0,h=h+Math.imul(jt,Tt)|0,M=M+Math.imul(jt,Mt)|0,_=_+Math.imul(Je,$t)|0,h=h+Math.imul(Je,Wt)|0,h=h+Math.imul(vt,$t)|0,M=M+Math.imul(vt,Wt)|0,_=_+Math.imul(Re,Bt)|0,h=h+Math.imul(Re,zt)|0,h=h+Math.imul(Xe,Bt)|0,M=M+Math.imul(Xe,zt)|0;var io=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(io>>>26)|0,io&=67108863,_=Math.imul(Ne,Et),h=Math.imul(Ne,wt),h=h+Math.imul(ut,Et)|0,M=Math.imul(ut,wt),_=_+Math.imul(Ye,_t)|0,h=h+Math.imul(Ye,xt)|0,h=h+Math.imul(Ge,_t)|0,M=M+Math.imul(Ge,xt)|0,_=_+Math.imul(It,ot)|0,h=h+Math.imul(It,Ft)|0,h=h+Math.imul(st,ot)|0,M=M+Math.imul(st,Ft)|0,_=_+Math.imul(Ue,St)|0,h=h+Math.imul(Ue,Ut)|0,h=h+Math.imul(it,St)|0,M=M+Math.imul(it,Ut)|0,_=_+Math.imul(Ct,Tt)|0,h=h+Math.imul(Ct,Mt)|0,h=h+Math.imul(Nt,Tt)|0,M=M+Math.imul(Nt,Mt)|0,_=_+Math.imul(rt,$t)|0,h=h+Math.imul(rt,Wt)|0,h=h+Math.imul(jt,$t)|0,M=M+Math.imul(jt,Wt)|0,_=_+Math.imul(Je,Bt)|0,h=h+Math.imul(Je,zt)|0,h=h+Math.imul(vt,Bt)|0,M=M+Math.imul(vt,zt)|0;var pi=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(pi>>>26)|0,pi&=67108863,_=Math.imul(Ne,_t),h=Math.imul(Ne,xt),h=h+Math.imul(ut,_t)|0,M=Math.imul(ut,xt),_=_+Math.imul(Ye,ot)|0,h=h+Math.imul(Ye,Ft)|0,h=h+Math.imul(Ge,ot)|0,M=M+Math.imul(Ge,Ft)|0,_=_+Math.imul(It,St)|0,h=h+Math.imul(It,Ut)|0,h=h+Math.imul(st,St)|0,M=M+Math.imul(st,Ut)|0,_=_+Math.imul(Ue,Tt)|0,h=h+Math.imul(Ue,Mt)|0,h=h+Math.imul(it,Tt)|0,M=M+Math.imul(it,Mt)|0,_=_+Math.imul(Ct,$t)|0,h=h+Math.imul(Ct,Wt)|0,h=h+Math.imul(Nt,$t)|0,M=M+Math.imul(Nt,Wt)|0,_=_+Math.imul(rt,Bt)|0,h=h+Math.imul(rt,zt)|0,h=h+Math.imul(jt,Bt)|0,M=M+Math.imul(jt,zt)|0;var cs=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(cs>>>26)|0,cs&=67108863,_=Math.imul(Ne,ot),h=Math.imul(Ne,Ft),h=h+Math.imul(ut,ot)|0,M=Math.imul(ut,Ft),_=_+Math.imul(Ye,St)|0,h=h+Math.imul(Ye,Ut)|0,h=h+Math.imul(Ge,St)|0,M=M+Math.imul(Ge,Ut)|0,_=_+Math.imul(It,Tt)|0,h=h+Math.imul(It,Mt)|0,h=h+Math.imul(st,Tt)|0,M=M+Math.imul(st,Mt)|0,_=_+Math.imul(Ue,$t)|0,h=h+Math.imul(Ue,Wt)|0,h=h+Math.imul(it,$t)|0,M=M+Math.imul(it,Wt)|0,_=_+Math.imul(Ct,Bt)|0,h=h+Math.imul(Ct,zt)|0,h=h+Math.imul(Nt,Bt)|0,M=M+Math.imul(Nt,zt)|0;var hs=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(hs>>>26)|0,hs&=67108863,_=Math.imul(Ne,St),h=Math.imul(Ne,Ut),h=h+Math.imul(ut,St)|0,M=Math.imul(ut,Ut),_=_+Math.imul(Ye,Tt)|0,h=h+Math.imul(Ye,Mt)|0,h=h+Math.imul(Ge,Tt)|0,M=M+Math.imul(Ge,Mt)|0,_=_+Math.imul(It,$t)|0,h=h+Math.imul(It,Wt)|0,h=h+Math.imul(st,$t)|0,M=M+Math.imul(st,Wt)|0,_=_+Math.imul(Ue,Bt)|0,h=h+Math.imul(Ue,zt)|0,h=h+Math.imul(it,Bt)|0,M=M+Math.imul(it,zt)|0;var jn=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(jn>>>26)|0,jn&=67108863,_=Math.imul(Ne,Tt),h=Math.imul(Ne,Mt),h=h+Math.imul(ut,Tt)|0,M=Math.imul(ut,Mt),_=_+Math.imul(Ye,$t)|0,h=h+Math.imul(Ye,Wt)|0,h=h+Math.imul(Ge,$t)|0,M=M+Math.imul(Ge,Wt)|0,_=_+Math.imul(It,Bt)|0,h=h+Math.imul(It,zt)|0,h=h+Math.imul(st,Bt)|0,M=M+Math.imul(st,zt)|0;var so=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(so>>>26)|0,so&=67108863,_=Math.imul(Ne,$t),h=Math.imul(Ne,Wt),h=h+Math.imul(ut,$t)|0,M=Math.imul(ut,Wt),_=_+Math.imul(Ye,Bt)|0,h=h+Math.imul(Ye,zt)|0,h=h+Math.imul(Ge,Bt)|0,M=M+Math.imul(Ge,zt)|0;var oo=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(oo>>>26)|0,oo&=67108863,_=Math.imul(Ne,Bt),h=Math.imul(Ne,zt),h=h+Math.imul(ut,Bt)|0,M=Math.imul(ut,zt);var ao=(R+_|0)+((h&8191)<<13)|0;return R=(M+(h>>>13)|0)+(ao>>>26)|0,ao&=67108863,L[0]=Cn,L[1]=Zs,L[2]=Xs,L[3]=Js,L[4]=eo,L[5]=to,L[6]=or,L[7]=hi,L[8]=no,L[9]=di,L[10]=ro,L[11]=io,L[12]=pi,L[13]=cs,L[14]=hs,L[15]=jn,L[16]=so,L[17]=oo,L[18]=ao,R!==0&&(L[19]=R,S.length++),S};Math.imul||(Q=B);function me(P,f,g){g.negative=f.negative^P.negative,g.length=P.length+f.length;for(var S=0,C=0,b=0;b>>26)|0,C+=L>>>26,L&=67108863}g.words[b]=R,S=L,L=C}return S!==0?g.words[b]=S:g.length--,g.strip()}function N(P,f,g){var S=new A;return S.mulp(P,f,g)}a.prototype.mulTo=function(f,g){var S,C=this.length+f.length;return this.length===10&&f.length===10?S=Q(this,f,g):C<63?S=B(this,f,g):C<1024?S=me(this,f,g):S=N(this,f,g),S};function A(P,f){this.x=P,this.y=f}A.prototype.makeRBT=function(f){for(var g=new Array(f),S=a.prototype._countBits(f)-1,C=0;C>=1;return C},A.prototype.permute=function(f,g,S,C,b,L){for(var R=0;R>>1)b++;return 1<>>13,S[2*L+1]=b&8191,b=b>>>13;for(L=2*g;L>=26,g+=C/67108864|0,g+=b>>>26,this.words[S]=b&67108863}return g!==0&&(this.words[S]=g,this.length++),this},a.prototype.muln=function(f){return this.clone().imuln(f)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(f){var g=F(f);if(g.length===0)return new a(1);for(var S=this,C=0;C=0);var g=f%26,S=(f-g)/26,C=67108863>>>26-g<<26-g,b;if(g!==0){var L=0;for(b=0;b>>26-g}L&&(this.words[b]=L,this.length++)}if(S!==0){for(b=this.length-1;b>=0;b--)this.words[b+S]=this.words[b];for(b=0;b=0);var C;g?C=(g-g%26)/26:C=0;var b=f%26,L=Math.min((f-b)/26,this.length),R=67108863^67108863>>>b<L)for(this.length-=L,h=0;h=0&&(M!==0||h>=C);h--){var G=this.words[h]|0;this.words[h]=M<<26-b|G>>>b,M=G&R}return _&&M!==0&&(_.words[_.length++]=M),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(f,g,S){return r(this.negative===0),this.iushrn(f,g,S)},a.prototype.shln=function(f){return this.clone().ishln(f)},a.prototype.ushln=function(f){return this.clone().iushln(f)},a.prototype.shrn=function(f){return this.clone().ishrn(f)},a.prototype.ushrn=function(f){return this.clone().iushrn(f)},a.prototype.testn=function(f){r(typeof f=="number"&&f>=0);var g=f%26,S=(f-g)/26,C=1<=0);var g=f%26,S=(f-g)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=S)return this;if(g!==0&&S++,this.length=Math.min(S,this.length),g!==0){var C=67108863^67108863>>>g<=67108864;g++)this.words[g]-=67108864,g===this.length-1?this.words[g+1]=1:this.words[g+1]++;return this.length=Math.max(this.length,g+1),this},a.prototype.isubn=function(f){if(r(typeof f=="number"),r(f<67108864),f<0)return this.iaddn(-f);if(this.negative!==0)return this.negative=0,this.iaddn(f),this.negative=1,this;if(this.words[0]-=f,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var g=0;g>26)-(_/67108864|0),this.words[b+S]=L&67108863}for(;b>26,this.words[b+S]=L&67108863;if(R===0)return this.strip();for(r(R===-1),R=0,b=0;b>26,this.words[b]=L&67108863;return this.negative=1,this.strip()},a.prototype._wordDiv=function(f,g){var S=this.length-f.length,C=this.clone(),b=f,L=b.words[b.length-1]|0,R=this._countBits(L);S=26-R,S!==0&&(b=b.ushln(S),C.iushln(S),L=b.words[b.length-1]|0);var _=C.length-b.length,h;if(g!=="mod"){h=new a(null),h.length=_+1,h.words=new Array(h.length);for(var M=0;M=0;se--){var ae=(C.words[b.length+se]|0)*67108864+(C.words[b.length+se-1]|0);for(ae=Math.min(ae/L|0,67108863),C._ishlnsubmul(b,ae,se);C.negative!==0;)ae--,C.negative=0,C._ishlnsubmul(b,1,se),C.isZero()||(C.negative^=1);h&&(h.words[se]=ae)}return h&&h.strip(),C.strip(),g!=="div"&&S!==0&&C.iushrn(S),{div:h||null,mod:C}},a.prototype.divmod=function(f,g,S){if(r(!f.isZero()),this.isZero())return{div:new a(0),mod:new a(0)};var C,b,L;return this.negative!==0&&f.negative===0?(L=this.neg().divmod(f,g),g!=="mod"&&(C=L.div.neg()),g!=="div"&&(b=L.mod.neg(),S&&b.negative!==0&&b.iadd(f)),{div:C,mod:b}):this.negative===0&&f.negative!==0?(L=this.divmod(f.neg(),g),g!=="mod"&&(C=L.div.neg()),{div:C,mod:L.mod}):this.negative&f.negative?(L=this.neg().divmod(f.neg(),g),g!=="div"&&(b=L.mod.neg(),S&&b.negative!==0&&b.isub(f)),{div:L.div,mod:b}):f.length>this.length||this.cmp(f)<0?{div:new a(0),mod:this}:f.length===1?g==="div"?{div:this.divn(f.words[0]),mod:null}:g==="mod"?{div:null,mod:new a(this.modn(f.words[0]))}:{div:this.divn(f.words[0]),mod:new a(this.modn(f.words[0]))}:this._wordDiv(f,g)},a.prototype.div=function(f){return this.divmod(f,"div",!1).div},a.prototype.mod=function(f){return this.divmod(f,"mod",!1).mod},a.prototype.umod=function(f){return this.divmod(f,"mod",!0).mod},a.prototype.divRound=function(f){var g=this.divmod(f);if(g.mod.isZero())return g.div;var S=g.div.negative!==0?g.mod.isub(f):g.mod,C=f.ushrn(1),b=f.andln(1),L=S.cmp(C);return L<0||b===1&&L===0?g.div:g.div.negative!==0?g.div.isubn(1):g.div.iaddn(1)},a.prototype.modn=function(f){r(f<=67108863);for(var g=(1<<26)%f,S=0,C=this.length-1;C>=0;C--)S=(g*S+(this.words[C]|0))%f;return S},a.prototype.idivn=function(f){r(f<=67108863);for(var g=0,S=this.length-1;S>=0;S--){var C=(this.words[S]|0)+g*67108864;this.words[S]=C/f|0,g=C%f}return this.strip()},a.prototype.divn=function(f){return this.clone().idivn(f)},a.prototype.egcd=function(f){r(f.negative===0),r(!f.isZero());var g=this,S=f.clone();g.negative!==0?g=g.umod(f):g=g.clone();for(var C=new a(1),b=new a(0),L=new a(0),R=new a(1),_=0;g.isEven()&&S.isEven();)g.iushrn(1),S.iushrn(1),++_;for(var h=S.clone(),M=g.clone();!g.isZero();){for(var G=0,se=1;!(g.words[0]&se)&&G<26;++G,se<<=1);if(G>0)for(g.iushrn(G);G-- >0;)(C.isOdd()||b.isOdd())&&(C.iadd(h),b.isub(M)),C.iushrn(1),b.iushrn(1);for(var ae=0,re=1;!(S.words[0]&re)&&ae<26;++ae,re<<=1);if(ae>0)for(S.iushrn(ae);ae-- >0;)(L.isOdd()||R.isOdd())&&(L.iadd(h),R.isub(M)),L.iushrn(1),R.iushrn(1);g.cmp(S)>=0?(g.isub(S),C.isub(L),b.isub(R)):(S.isub(g),L.isub(C),R.isub(b))}return{a:L,b:R,gcd:S.iushln(_)}},a.prototype._invmp=function(f){r(f.negative===0),r(!f.isZero());var g=this,S=f.clone();g.negative!==0?g=g.umod(f):g=g.clone();for(var C=new a(1),b=new a(0),L=S.clone();g.cmpn(1)>0&&S.cmpn(1)>0;){for(var R=0,_=1;!(g.words[0]&_)&&R<26;++R,_<<=1);if(R>0)for(g.iushrn(R);R-- >0;)C.isOdd()&&C.iadd(L),C.iushrn(1);for(var h=0,M=1;!(S.words[0]&M)&&h<26;++h,M<<=1);if(h>0)for(S.iushrn(h);h-- >0;)b.isOdd()&&b.iadd(L),b.iushrn(1);g.cmp(S)>=0?(g.isub(S),C.isub(b)):(S.isub(g),b.isub(C))}var G;return g.cmpn(1)===0?G=C:G=b,G.cmpn(0)<0&&G.iadd(f),G},a.prototype.gcd=function(f){if(this.isZero())return f.abs();if(f.isZero())return this.abs();var g=this.clone(),S=f.clone();g.negative=0,S.negative=0;for(var C=0;g.isEven()&&S.isEven();C++)g.iushrn(1),S.iushrn(1);do{for(;g.isEven();)g.iushrn(1);for(;S.isEven();)S.iushrn(1);var b=g.cmp(S);if(b<0){var L=g;g=S,S=L}else if(b===0||S.cmpn(1)===0)break;g.isub(S)}while(!0);return S.iushln(C)},a.prototype.invm=function(f){return this.egcd(f).a.umod(f)},a.prototype.isEven=function(){return(this.words[0]&1)===0},a.prototype.isOdd=function(){return(this.words[0]&1)===1},a.prototype.andln=function(f){return this.words[0]&f},a.prototype.bincn=function(f){r(typeof f=="number");var g=f%26,S=(f-g)/26,C=1<>>26,R&=67108863,this.words[L]=R}return b!==0&&(this.words[L]=b,this.length++),this},a.prototype.isZero=function(){return this.length===1&&this.words[0]===0},a.prototype.cmpn=function(f){var g=f<0;if(this.negative!==0&&!g)return-1;if(this.negative===0&&g)return 1;this.strip();var S;if(this.length>1)S=1;else{g&&(f=-f),r(f<=67108863,"Number is too big");var C=this.words[0]|0;S=C===f?0:Cf.length)return 1;if(this.length=0;S--){var C=this.words[S]|0,b=f.words[S]|0;if(C!==b){Cb&&(g=1);break}}return g},a.prototype.gtn=function(f){return this.cmpn(f)===1},a.prototype.gt=function(f){return this.cmp(f)===1},a.prototype.gten=function(f){return this.cmpn(f)>=0},a.prototype.gte=function(f){return this.cmp(f)>=0},a.prototype.ltn=function(f){return this.cmpn(f)===-1},a.prototype.lt=function(f){return this.cmp(f)===-1},a.prototype.lten=function(f){return this.cmpn(f)<=0},a.prototype.lte=function(f){return this.cmp(f)<=0},a.prototype.eqn=function(f){return this.cmpn(f)===0},a.prototype.eq=function(f){return this.cmp(f)===0},a.red=function(f){return new le(f)},a.prototype.toRed=function(f){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),f.convertTo(this)._forceRed(f)},a.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(f){return this.red=f,this},a.prototype.forceRed=function(f){return r(!this.red,"Already a number in reduction context"),this._forceRed(f)},a.prototype.redAdd=function(f){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,f)},a.prototype.redIAdd=function(f){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,f)},a.prototype.redSub=function(f){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,f)},a.prototype.redISub=function(f){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,f)},a.prototype.redShl=function(f){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,f)},a.prototype.redMul=function(f){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.mul(this,f)},a.prototype.redIMul=function(f){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.imul(this,f)},a.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(f){return r(this.red&&!f.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,f)};var I={k256:null,p224:null,p192:null,p25519:null};function H(P,f){this.name=P,this.p=new a(f,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}H.prototype._tmp=function(){var f=new a(null);return f.words=new Array(Math.ceil(this.n/13)),f},H.prototype.ireduce=function(f){var g=f,S;do this.split(g,this.tmp),g=this.imulK(g),g=g.iadd(this.tmp),S=g.bitLength();while(S>this.n);var C=S0?g.isub(this.p):g.strip!==void 0?g.strip():g._strip(),g},H.prototype.split=function(f,g){f.iushrn(this.n,0,g)},H.prototype.imulK=function(f){return f.imul(this.k)};function X(){H.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}s(X,H),X.prototype.split=function(f,g){for(var S=4194303,C=Math.min(f.length,9),b=0;b>>22,L=R}L>>>=22,f.words[b-10]=L,L===0&&f.length>10?f.length-=10:f.length-=9},X.prototype.imulK=function(f){f.words[f.length]=0,f.words[f.length+1]=0,f.length+=2;for(var g=0,S=0;S>>=26,f.words[S]=b,g=C}return g!==0&&(f.words[f.length++]=g),f},a._prime=function(f){if(I[f])return I[f];var g;if(f==="k256")g=new X;else if(f==="p224")g=new te;else if(f==="p192")g=new K;else if(f==="p25519")g=new J;else throw new Error("Unknown prime "+f);return I[f]=g,g};function le(P){if(typeof P=="string"){var f=a._prime(P);this.m=f.p,this.prime=f}else r(P.gtn(1),"modulus must be greater than 1"),this.m=P,this.prime=null}le.prototype._verify1=function(f){r(f.negative===0,"red works only with positives"),r(f.red,"red works only with red numbers")},le.prototype._verify2=function(f,g){r((f.negative|g.negative)===0,"red works only with positives"),r(f.red&&f.red===g.red,"red works only with red numbers")},le.prototype.imod=function(f){return this.prime?this.prime.ireduce(f)._forceRed(this):f.umod(this.m)._forceRed(this)},le.prototype.neg=function(f){return f.isZero()?f.clone():this.m.sub(f)._forceRed(this)},le.prototype.add=function(f,g){this._verify2(f,g);var S=f.add(g);return S.cmp(this.m)>=0&&S.isub(this.m),S._forceRed(this)},le.prototype.iadd=function(f,g){this._verify2(f,g);var S=f.iadd(g);return S.cmp(this.m)>=0&&S.isub(this.m),S},le.prototype.sub=function(f,g){this._verify2(f,g);var S=f.sub(g);return S.cmpn(0)<0&&S.iadd(this.m),S._forceRed(this)},le.prototype.isub=function(f,g){this._verify2(f,g);var S=f.isub(g);return S.cmpn(0)<0&&S.iadd(this.m),S},le.prototype.shl=function(f,g){return this._verify1(f),this.imod(f.ushln(g))},le.prototype.imul=function(f,g){return this._verify2(f,g),this.imod(f.imul(g))},le.prototype.mul=function(f,g){return this._verify2(f,g),this.imod(f.mul(g))},le.prototype.isqr=function(f){return this.imul(f,f.clone())},le.prototype.sqr=function(f){return this.mul(f,f)},le.prototype.sqrt=function(f){if(f.isZero())return f.clone();var g=this.m.andln(3);if(r(g%2===1),g===3){var S=this.m.add(new a(1)).iushrn(2);return this.pow(f,S)}for(var C=this.m.subn(1),b=0;!C.isZero()&&C.andln(1)===0;)b++,C.iushrn(1);r(!C.isZero());var L=new a(1).toRed(this),R=L.redNeg(),_=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new a(2*h*h).toRed(this);this.pow(h,_).cmp(R)!==0;)h.redIAdd(R);for(var M=this.pow(h,C),G=this.pow(f,C.addn(1).iushrn(1)),se=this.pow(f,C),ae=b;se.cmp(L)!==0;){for(var re=se,ye=0;re.cmp(L)!==0;ye++)re=re.redSqr();r(ye=0;b--){for(var M=g.words[b],G=h-1;G>=0;G--){var se=M>>G&1;if(L!==C[0]&&(L=this.sqr(L)),se===0&&R===0){_=0;continue}R<<=1,R|=se,_++,!(_!==S&&(b!==0||G!==0))&&(L=this.mul(L,C[R]),_=0,R=0)}h=26}return L},le.prototype.convertTo=function(f){var g=f.umod(this.m);return g===f?g.clone():g},le.prototype.convertFrom=function(f){var g=f.clone();return g.red=null,g},a.mont=function(f){return new fe(f)};function fe(P){le.call(this,P),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}s(fe,le),fe.prototype.convertTo=function(f){return this.imod(f.ushln(this.shift))},fe.prototype.convertFrom=function(f){var g=this.imod(f.mul(this.rinv));return g.red=null,g},fe.prototype.imul=function(f,g){if(f.isZero()||g.isZero())return f.words[0]=0,f.length=1,f;var S=f.imul(g),C=S.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),b=S.isub(C).iushrn(this.shift),L=b;return b.cmp(this.m)>=0?L=b.isub(this.m):b.cmpn(0)<0&&(L=b.iadd(this.m)),L._forceRed(this)},fe.prototype.mul=function(f,g){if(f.isZero()||g.isZero())return new a(0)._forceRed(this);var S=f.mul(g),C=S.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),b=S.isub(C).iushrn(this.shift),L=b;return b.cmp(this.m)>=0?L=b.isub(this.m):b.cmpn(0)<0&&(L=b.iadd(this.m)),L._forceRed(this)},fe.prototype.invm=function(f){var g=this.imod(f._invmp(this.m).mul(this.r2));return g._forceRed(this)}})(e,Fr)})(Rg);var Dg=Rg.exports,cw=1/0,HS=9007199254740991,Ij=17976931348623157e292,hw=NaN,Fj="[object Function]",Uj="[object GeneratorFunction]",$j="[object Symbol]",Wj=/^\s+|\s+$/g,Bj=/^[-+]0x[0-9a-f]+$/i,zj=/^0b[01]+$/i,Hj=/^0o[0-7]+$/i,Yj=/^(?:0|[1-9]\d*)$/,Gj=parseInt,Vj=Object.prototype,YS=Vj.toString,qj=Math.ceil,Qj=Math.max;function Kj(e,t,n){var r=-1,s=e.length;t<0&&(t=-t>s?0:s+t),n=n>s?s:n,n<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(s);++r-1&&e%1==0&&e-1&&e%1==0&&e<=HS}function nh(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function i6(e){return!!e&&typeof e=="object"}function s6(e){return typeof e=="symbol"||i6(e)&&YS.call(e)==$j}function o6(e){if(!e)return e===0?e:0;if(e=l6(e),e===cw||e===-cw){var t=e<0?-1:1;return t*Ij}return e===e?e:0}function a6(e){var t=o6(e),n=t%1;return t===t?n?t-n:t:0}function l6(e){if(typeof e=="number")return e;if(s6(e))return hw;if(nh(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=nh(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(Wj,"");var n=zj.test(e);return n||Hj.test(e)?Gj(e.slice(2),n?2:8):Bj.test(e)?hw:+e}var u6=Jj,rh={exports:{}};rh.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",s=1,a=2,u=9007199254740991,c="[object Arguments]",p="[object Array]",v="[object AsyncFunction]",m="[object Boolean]",O="[object Date]",E="[object Error]",F="[object Function]",B="[object GeneratorFunction]",Q="[object Map]",me="[object Number]",N="[object Null]",A="[object Object]",I="[object Promise]",H="[object Proxy]",X="[object RegExp]",te="[object Set]",K="[object String]",J="[object Symbol]",le="[object Undefined]",fe="[object WeakMap]",P="[object ArrayBuffer]",f="[object DataView]",g="[object Float32Array]",S="[object Float64Array]",C="[object Int8Array]",b="[object Int16Array]",L="[object Int32Array]",R="[object Uint8Array]",_="[object Uint8ClampedArray]",h="[object Uint16Array]",M="[object Uint32Array]",G=/[\\^$.*+?()[\]{}|]/g,se=/^\[object .+?Constructor\]$/,ae=/^(?:0|[1-9]\d*)$/,re={};re[g]=re[S]=re[C]=re[b]=re[L]=re[R]=re[_]=re[h]=re[M]=!0,re[c]=re[p]=re[P]=re[m]=re[f]=re[O]=re[E]=re[F]=re[Q]=re[me]=re[A]=re[X]=re[te]=re[K]=re[fe]=!1;var ye=typeof Fr=="object"&&Fr&&Fr.Object===Object&&Fr,Me=typeof self=="object"&&self&&self.Object===Object&&self,Be=ye||Me||Function("return this")(),Re=t&&!t.nodeType&&t,Xe=Re&&!0&&e&&!e.nodeType&&e,ui=Xe&&Xe.exports===Re,Je=ui&&ye.process,vt=function(){try{return Je&&Je.binding&&Je.binding("util")}catch{}}(),_n=vt&&vt.isTypedArray;function rt(T,$){for(var Z=-1,he=T==null?0:T.length,pt=0,Ce=[];++Z-1}function to(T,$){var Z=this.__data__,he=lo(Z,T);return he<0?(++this.size,Z.push([T,$])):Z[he][1]=$,this}Cn.prototype.clear=Zs,Cn.prototype.delete=Xs,Cn.prototype.get=Js,Cn.prototype.has=eo,Cn.prototype.set=to;function or(T){var $=-1,Z=T==null?0:T.length;for(this.clear();++$on))return!1;var mt=Ce.get(T);if(mt&&Ce.get($))return mt==$;var en=-1,Vn=!0,an=Z&a?new pi:void 0;for(Ce.set(T,$),Ce.set($,T);++en-1&&T%1==0&&T<$}function Hu(T){var $=typeof T;return $=="string"||$=="number"||$=="symbol"||$=="boolean"?T!=="__proto__":T===null}function Yu(T){return!!ut&&ut in T}function Gu(T){var $=T&&T.constructor,Z=typeof $=="function"&&$.prototype||Ye;return T===Z}function sd(T){return Li.call(T)}function Ni(T){if(T!=null){try{return Ai.call(T)}catch{}try{return T+""}catch{}}return""}function Vu(T,$){return T===$||T!==T&&$!==$}var qu=al(function(){return arguments}())?al:function(T){return co(T)&&Ne.call(T,"callee")&&!ht.call(T,"callee")},Zo=Array.isArray;function od(T){return T!=null&&Qu(T.length)&&!Xo(T)}var ll=Ks||at;function ad(T,$){return fo(T,$)}function Xo(T){if(!Ku(T))return!1;var $=uo(T);return $==F||$==B||$==v||$==H}function Qu(T){return typeof T=="number"&&T>-1&&T%1==0&&T<=u}function Ku(T){var $=typeof T;return T!=null&&($=="object"||$=="function")}function co(T){return T!=null&&typeof T=="object"}var Zu=_n?Nt(_n):Fu;function ld(T){return od(T)?Nu(T):Uu(T)}function dt(){return[]}function at(){return!1}e.exports=ad})(rh,rh.exports);var f6=rh.exports;const Vh=Dg,c6=new Vh(255),h6=new Vh(65280),d6=new Vh(256),p6=(e,t,n)=>{const r=n.and(c6).toNumber(),s=n.and(h6).div(d6).toNumber(),a=String.fromCharCode(r)+String.fromCharCode(s);return new Vh(m6(a,e))},m6=(e,t)=>{let n,r,s,a,u,c,p,v;for(n=e.length&3,r=e.length-n,s=t,u=3432918353,c=461845907,v=0;v>>16)*u&65535)<<16)&4294967295,p=p<<15|p>>>17,p=(p&65535)*c+(((p>>>16)*c&65535)<<16)&4294967295,s^=p,s=s<<13|s>>>19,a=(s&65535)*5+(((s>>>16)*5&65535)<<16)&4294967295,s=(a&65535)+27492+(((a>>>16)+58964&65535)<<16);switch(p=0,n){case 3:p^=(e.charCodeAt(v+2)&255)<<16;case 2:p^=(e.charCodeAt(v+1)&255)<<8;case 1:p^=e.charCodeAt(v)&255,p=(p&65535)*u+(((p>>>16)*u&65535)<<16)&4294967295,p=p<<15|p>>>17,p=(p&65535)*c+(((p>>>16)*c&65535)<<16)&4294967295,s^=p}return s^=e.length,s^=s>>>16,s=(s&65535)*2246822507+(((s>>>16)*2246822507&65535)<<16)&4294967295,s^=s>>>13,s=(s&65535)*3266489909+(((s>>>16)*3266489909&65535)<<16)&4294967295,s^=s>>>16,s>>>0};var g6={muk:p6};const li=Dg,{muk:v6}=g6,Wa=new li("10000","hex"),Xa=new li("ffffffff","hex"),GS=new li("100000000","hex"),VS=new li("ffffffffffffffff","hex"),qS=new li("ffffffff00000000","hex"),QS=new li("65535"),KS=new li("65536"),Ag=(e,t)=>v6([3077398253,3995603712,2243735041,1261992695][e],2,t),y6=e=>{const t=n=>{const r=n.and(Xa),s=n.and(qS);return n.gte(Wa)&&n.lte(Xa)?Wa.add(ZS(n.sub(Wa))):n.gte(GS)&&n.lte(VS)?s.or(t(r)):n};return t(new li(e))},w6=e=>{const t=n=>{const r=n.and(Xa),s=n.and(qS);return n.gte(Wa)&&n.lte(Xa)?Wa.add(JS(n.sub(Wa))):n.gte(GS)&&n.lte(VS)?s.or(t(r)):n};return t(new li(e))},ZS=e=>XS(4,QS,KS,Xa,Ag,new li(e)),XS=(e,t,n,r,s,a)=>{const u=Jm(e,t,n,s,a);return u.lt(r)?u:Jm(e,t,n,s,u)},Jm=(e,t,n,r,s)=>{const a=(p,v,m)=>{if(p>e)return e%2!==0||m.eq(t)?t.mul(m).add(v):t.mul(v).add(m);{const O=r(p-1,m),E=p%2!==0?v.add(O).mod(t):v.add(O).mod(n);return a(p+1,m,E)}},u=s.mod(t),c=s.div(t);return a(1,u,c)},JS=e=>eM(4,QS,KS,Xa,Ag,new li(e)),eM=(e,t,n,r,s,a)=>{const u=e0(e,t,n,s,a);return u.lt(r)?u:e0(e,t,n,s,u)},e0=(e,t,n,r,s)=>{const a=(m,O,E)=>{if(m<1)return t.mul(E).add(O);{const F=r(m-1,O),B=m%2!==0?E.add(t).sub(F.mod(t)).mod(t):E.add(n).sub(F.mod(n)).mod(n);return a(m-1,B,O)}},u=e%2!==0?s.div(t):s.mod(t),c=e%2!==0?s.mod(t):s.div(t),p=c.eq(t)?u:c,v=c.eq(t)?c:u;return a(e,p,v)};var tM={F:Ag,fe:Jm,Fe:XS,feis:ZS,fein:y6,fen:e0,Fen:eM,tail:JS,fynd:w6};const kr=Dg,dw=u6,_6=f6,nM=tM,Ba=new kr(0),Ir=new kr(1),rM=new kr(2),Xl=new kr(3),Ra=new kr(4),x6=new kr(5),S6=` dozmarbinwansamlitsighidfidlissogdirwacsabwissibrigsoldopmodfoglidhopdardorlorhodfolrintogsilmirholpaslacrovlivdalsatlibtabhanticpidtorbolfosdotlosdilforpilramtirwintadbicdifrocwidbisdasmidloprilnardapmolsanlocnovsitnidtipsicropwitnatpanminritpodmottamtolsavposnapnopsomfinfonbanmorworsipronnorbotwicsocwatdolmagpicdavbidbaltimtasmalligsivtagpadsaldivdactansidfabtarmonranniswolmispallasdismaprabtobrollatlonnodnavfignomnibpagsopralbilhaddocridmocpacravripfaltodtiltinhapmicfanpattaclabmogsimsonpinlomrictapfirhasbosbatpochactidhavsaplindibhosdabbitbarracparloddosbortochilmactomdigfilfasmithobharmighinradmashalraglagfadtopmophabnilnosmilfopfamdatnoldinhatnacrisfotribhocnimlarfitwalrapsarnalmoslandondanladdovrivbacpollaptalpitnambonrostonfodponsovnocsorlavmatmipfip`,M6=` -zodnecbudwessevpersutletfulpensytdurwepserwylsunrypsyxdyrnuphebpeglupdepdysputlughecryttyvsydnexlunmeplutseppesdelsulpedtemledtulmetwenbynhexfebpyldulhetmevruttylwydtepbesdexsefwycburderneppurrysrebdennutsubpetrulsynregtydsupsemwynrecmegnetsecmulnymtevwebsummutnyxrextebfushepbenmuswyxsymselrucdecwexsyrwetdylmynmesdetbetbeltuxtugmyrpelsyptermebsetdutdegtexsurfeltudnuxruxrenwytnubmedlytdusnebrumtynseglyxpunresredfunrevrefmectedrusbexlebduxrynnumpyxrygryxfeptyrtustyclegnemfermertenlusnussyltecmexpubrymtucfyllepdebbermughuttunbylsudpemdevlurdefbusbeprunmelpexdytbyttyplevmylwedducfurfexnulluclennerlexrupnedlecrydlydfenwelnydhusrelrudneshesfetdesretdunlernyrsebhulrylludremlysfynwerrycsugnysnyllyndyndemluxfedsedbecmunlyrtesmudnytbyrsenwegfyrmurtelreptegpecnelnevfes`,iM=e=>e.replace(/[\^~-]/g,"").match(/.{1,3}/g)||[],k6=(e,t)=>[t.slice(0,e),t.slice(e)],Lo=S6.match(/.{1,3}/g),ki=M6.match(/.{1,3}/g),ih=e=>rM.pow(e),t0=(e,t,n)=>n.div(ih(ih(e).mul(t))),sh=(e,t,n=Ba)=>t.eq(Ba)?n:sh(e,t0(e,Ir,t),n.add(Ir)),Jl=(e,t,n)=>n.mod(ih(ih(e).mul(t))),C6=e=>{if(e===null)throw new Error("hex2patp: null input");return qh(new kr(e,"hex"))},sM=e=>{if(Pu(e)===!1)throw new Error("patp2hex: not a valid @p");const t=iM(e),n=u=>u.toString(2).padStart(8,"0"),r=t.reduce((u,c,p)=>p%2!==0||t.length===1?u+n(ki.indexOf(c)):u+n(Lo.indexOf(c)),""),s=new kr(r,2),a=nM.fynd(s).toString("hex");return a.length%2!==0?a.padStart(a.length+1,"0"):a},Lg=e=>new kr(sM(e),"hex"),oM=e=>{let t;try{t=Lg(e)}catch{throw new Error("patp2dec: not a valid @p")}return t.toString()},aM=e=>{const n=new kr(e).toArrayLike(Buffer);return lM(n)},lM=e=>{const t=e.length%2!==0&&e.length>1?[[e[0]]].concat(dw(e.slice(1),2)):dw(e,2),n=a=>a[1]===void 0?Lo[0]+ki[a[0]]:Lo[a[0]]+ki[a[1]],r=a=>a[1]===void 0?ki[a[0]]:Lo[a[0]]+ki[a[1]],s=a=>a.length%2!==0&&t.length>1?n(a):r(a);return t.reduce((a,u)=>a+(a==="~"?"":"-")+s(u),"~")},O6=e=>{const t=e.length%2!==0?e.padStart(e.length+1,"0"):e,n=Buffer.from(t,"hex");return lM(n)},oh=e=>{if(Pu(e)===!1)throw new Error("patq2hex: not a valid @q");const t=e.slice(1).split("-"),n=s=>s.toString(16).padStart(2,"0"),r=t.map(s=>{let a=k6(3,s);return a[1]===""?n(ki.indexOf(a[0])):n(Lo.indexOf(a[0]))+n(ki.indexOf(a[1]))});return e.length===0?"00":r.join("")},E6=e=>new kr(oh(e),"hex"),uM=e=>{let t;try{t=E6(e)}catch{throw new Error("patq2dec: not a valid @q")}return t.toString()},fM=e=>{let t;try{t=Lg(e)}catch{throw new Error("clan: not a valid @p")}const n=sh(Xl,t);return n.lte(Ir)?"galaxy":n.eq(rM)?"star":n.lte(Ra)?"planet":n.lte(new kr(8))?"moon":"comet"},T6=e=>{let t;try{t=Lg(e)}catch{throw new Error("sein: not a valid @p")}let n;try{n=fM(e)}catch{throw new Error("sein: not a valid @p")}const r=n==="galaxy"?t:n==="star"?Jl(Xl,Ir,t):n==="planet"?Jl(Ra,Ir,t):n==="moon"?Jl(x6,Ir,t):Ba;return qh(r)},Pu=e=>{if(typeof e!="string")throw new Error("isValidPat: non-string input");if(e.slice(0,1)==="~"===!1||e.length<4)return!1;{const n=iM(e),r=n.length%2!==0&&n.length!==1,s=n.reduce((a,u,c)=>a&&(c%2!==0||n.length===1?ki.includes(u):Lo.includes(u)),!0);return!r&&s}},b6=e=>Pu(e)&&e===qh(oM(e)),P6=e=>Pu(e)&&cM(e,aM(uM(e))),n0=e=>e.slice(0,2)==="00"?n0(e.slice(2)):e,R6=(e,t)=>_6(n0(e),n0(t)),cM=(e,t)=>{let n;try{n=oh(e)}catch{throw new Error("eqPatq: not a valid @q")}let r;try{r=oh(t)}catch{throw new Error("eqPatq: not a valid @q")}return R6(n,r)},qh=e=>{if(e===null)throw new Error("patp: null input");const t=new kr(e),n=nM.fein(t),r=sh(Ra,n),s=(u,c,p)=>{const v=Jl(Ra,Ir,u),m=Lo[t0(Xl,Ir,v)],O=ki[Jl(Xl,Ir,v)],E=c.mod(Ra).eq(Ba)?c.eq(Ba)?"":"--":"-",F=m+O+E+p;return c.eq(r)?p:s(t0(Ra,Ir,u),c.add(Ir),F)};return"~"+(sh(Xl,n).lte(Ir)?ki[n]:s(n,Ba,""))};var D6={patp:qh,patp2hex:sM,hex2patp:C6,patp2dec:oM,sein:T6,clan:fM,patq:aM,patq2hex:oh,hex2patq:O6,patq2dec:uM,eqPatq:cM,isValidPat:Pu,isValidPatp:b6,isValidPatq:P6};const A6=D6,L6=tM;Object.assign(A6,L6);class Gt extends oe.Component{constructor(t){super(t),this.state={query:""},this.updateQuery=this.updateQuery.bind(this)}updateQuery(t){this.setState({query:t.target.value})}render(){const{state:t,props:n}=this,r=y.jsx("input",{type:"text",placeholder:n.placeholder,onChange:this.updateQuery,value:t.query,style:{border:"1px solid black"}});let s=n.items.filter(a=>t.query.split(" ").reduce((u,c)=>u&&(""+a.key).includes(c),!0));return s=s.map(a=>y.jsx("div",{style:{marginTop:"4px"},children:a.jsx},a.key)),y.jsxs("div",{style:{position:"relative",border:"1px solid grey",padding:"4px"},children:[n.children,y.jsxs("div",{children:[r," (",s.length,")"]}),y.jsxs("details",{open:n.open===void 0?!0:n.open,children:[y.jsxs("summary",{children:[s.length," items"]}),y.jsx("div",{children:s.length===0?"none":s})]})]})}}class j6 extends oe.Component{constructor(t){super(t)}componentDidMount(){this.componentDidUpdate()}componentDidUpdate(t){}render(){const t=this.props,n=t.in.map(s=>({key:"~"+s.ship+" "+s.path,jsx:y.jsxs("div",{class:"flex",children:[y.jsxs("div",{class:"flex-auto",style:{maxWidth:"10%"},children:["~",s.ship]}),y.jsx("div",{class:"flex-auto",style:{maxWidth:"30%"},children:s.path}),y.jsx("div",{class:"flex-auto",style:{maxWidth:"60%"},children:Qi(s.duct)})]})})),r=t.out.map(s=>({key:`~${s.ship} ${s.app} ${s.wire} ${s.path}`,jsx:y.jsxs("div",{class:"flex",children:[y.jsx("div",{class:"flex-auto",style:{maxWidth:"35%"},children:s.wire}),y.jsxs("div",{class:"flex-auto",style:{maxWidth:"10%"},children:["~",s.ship]}),y.jsx("div",{class:"flex-auto",style:{maxWidth:"10%"},children:s.app}),y.jsx("div",{class:"flex-auto",style:{maxWidth:"35%"},children:s.path}),y.jsx("div",{class:"flex-auto",style:{maxWidth:"10%"},children:s.acked?"acked":"not acked"})]})}));return y.jsxs("div",{children:[y.jsx("h4",{children:"Incoming"}),y.jsx(Gt,{placeholder:"ship / path",items:n}),y.jsx("h4",{children:"Outgoing"}),y.jsx(Gt,{placeholder:"ship / app / wire / path",items:r})]})}}class Oo extends oe.Component{constructor(t){super(t),this.onToggle=this.onToggle.bind(this)}onToggle(t){t.target.open?this.props.onOpen&&this.props.onOpen(this.props.id):this.props.onClose&&this.props.onClose(this.props.id)}render(){const{props:t}=this;return y.jsxs("details",{onToggle:this.onToggle,...t,style:{border:"1px solid black",padding:"4px",position:"relative",...t.style},children:[y.jsx("summary",{children:t.summary}),y.jsx("div",{style:{borderTop:"1px solid black"},children:t.details})]})}}class N6 extends oe.Component{constructor(t){super(t),this.state={stateQuery:{}},this.changeStateQuery=this.changeStateQuery.bind(this),this.loadApps=this.loadApps.bind(this),this.loadAppDetails=this.loadAppDetails.bind(this)}componentDidMount(){Object.keys(this.props.apps).length===0&&this.loadApps()}componentDidUpdate(t,n){}changeStateQuery(t,n){this.state.stateQuery[t]=n.target.value,this.setState({stateQuery:this.state.stateQuery})}loadApps(){api.getApps()}loadAppDetails(t){api.getAppDetails(t)}loadAppState(t){api.getAppState(t,this.state.stateQuery[t])}render(){const{props:t,state:n}=this,r=Object.keys(t.apps).sort().map(s=>{const a=t.apps[s],u=typeof a=="object",c=u?!0:a,p=c?{borderLeft:"3px solid green"}:{borderLeft:"3px solid grey"};let v=null;if(!u)v=c?"Loading...":"App not running.";else if(a.noDebug)v="App doesn't use /lib/dbug";else{const O=a,E=(O.events||[]).map(F=>({key:F,jsx:y.jsxs(y.Fragment,{children:[F,y.jsx("br",{})]})}));v=y.jsxs(y.Fragment,{children:[y.jsx("button",{style:{position:"absolute",top:0,right:0},onClick:()=>{this.loadAppDetails(s)},children:"refresh"}),y.jsx("button",{onClick:()=>{this.loadAppState(s)},children:"query state"}),y.jsx("textarea",{class:"mono",onChange:F=>this.changeStateQuery(s,F),value:n.stateQuery[s],placeholder:"-.-",spellCheck:"false"}),y.jsx("div",{style:{maxHeight:"500px",overflow:"scroll"},children:y.jsx("pre",{children:(O.state||O.simpleState).join(` -`)})}),y.jsxs("div",{children:[y.jsx("button",{onClick:()=>{api.bindToVerb(s)},children:"listen to simple verb (here)"})," ",y.jsx("button",{onClick:()=>{api.bindToVerbPlus(s)},children:"listen to verb+ (logs viewer)"}),y.jsx(Gt,{placeholder:"event description",items:E})]}),y.jsx("div",{children:y.jsx(j6,{...O.subscriptions})})]})}const m=c?this.loadAppDetails:null;return{key:s,jsx:y.jsx(Oo,{id:s,summary:"%"+s,details:v,onOpen:m,style:p})}});return y.jsx("div",{className:"h-100 w-100 pa3 pt4 overflow-x-hidden bg-gray0-d white-d flex flex-column",children:y.jsx(Gt,{placeholder:"app name",items:r,children:y.jsx("button",{onClick:this.loadApps,children:"refresh"})})})}}const I6="modulepreload",F6=function(e){return"/~debug/"+e},pw={},hM=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){const a=document.getElementsByTagName("link"),u=document.querySelector("meta[property=csp-nonce]"),c=(u==null?void 0:u.nonce)||(u==null?void 0:u.getAttribute("nonce"));s=Promise.all(n.map(p=>{if(p=F6(p),p in pw)return;pw[p]=!0;const v=p.endsWith(".css"),m=v?'[rel="stylesheet"]':"";if(!!r)for(let F=a.length-1;F>=0;F--){const B=a[F];if(B.href===p&&(!v||B.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${p}"]${m}`))return;const E=document.createElement("link");if(E.rel=v?"stylesheet":I6,v||(E.as="script",E.crossOrigin=""),E.href=p,c&&E.setAttribute("nonce",c),document.head.appendChild(E),v)return new Promise((F,B)=>{E.addEventListener("load",F),E.addEventListener("error",()=>B(new Error(`Unable to preload CSS for ${p}`)))})}))}return s.then(()=>t()).catch(a=>{const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=a,window.dispatchEvent(u),!u.defaultPrevented)throw a})},mw=globalThis.showDirectoryPicker;async function U6(e={}){if(mw&&!e._preferPolyfill)return mw(e);const t=document.createElement("input");t.type="file",t.webkitdirectory=!0,t.multiple=!0,t.style.position="fixed",t.style.top="-100000px",t.style.left="-100000px",document.body.appendChild(t);const{makeDirHandleFromFileList:n}=await hM(()=>import("./util.js"),[]);return new Promise((r,s)=>{t.addEventListener("change",()=>{n(t.files).then(r).catch(s),document.body.removeChild(t)}),t.click()})}const pa=Symbol("adapter");class jg{constructor(t){this.kind=t.kind,this.name=t.name,this[pa]=t}get isFile(){return this.kind==="file"}get isDirectory(){return this.kind==="directory"}async queryPermission(t={mode:"read"}){const n=this[pa];if(n.queryPermission)return n.queryPermission(t);if(t.mode==="read")return"granted";if(t.mode==="readwrite")return n.writable?"granted":"denied";throw new TypeError(`Mode ${t.mode} must be 'read' or 'readwrite'`)}async requestPermission(t={mode:"read"}){const n=this[pa];if(n.requestPermission)return n.requestPermission(t);if(t.mode==="read")return"granted";if(t.mode==="readwrite")return n.writable?"granted":"denied";throw new TypeError(`Mode ${t.mode} must be 'read' or 'readwrite'`)}async isSameEntry(t){return this===t?!0:this.kind!==t.kind||!t[pa]?!1:await this[pa].isSameEntry(t[pa])}}Object.defineProperty(jg.prototype,Symbol.toStringTag,{value:"FileSystemHandle",writable:!1,enumerable:!1,configurable:!0});const Gp=Symbol("adapter");class Ja extends jg{constructor(t){super(t),this.kind="file",this[Gp]=t}async createWritable(t={}){const{FileSystemWritableFileStream:n}=await hM(()=>import("./FileSystemWritableFileStream.js"),[]);return new n(await this[Gp].createWritable(t))}async getFile(){return this[Gp].getFile()}}Object.defineProperty(Ja.prototype,Symbol.toStringTag,{value:"FileSystemFileHandle",writable:!1,enumerable:!1,configurable:!0});Object.defineProperties(Ja.prototype,{createWritable:{enumerable:!0},getFile:{enumerable:!0}});const s4=Object.freeze(Object.defineProperty({__proto__:null,FileSystemFileHandle:Ja,default:Ja},Symbol.toStringTag,{value:"Module"})),ma=Symbol("adapter");class $o extends jg{constructor(t){super(t),this.kind="directory",this[ma]=t}async getDirectoryHandle(t,n={}){if(t==="")throw new TypeError("Name can't be an empty string.");if(t==="."||t===".."||t.includes("/"))throw new TypeError("Name contains invalid characters.");return new $o(await this[ma].getDirectoryHandle(t,n))}getDirectory(t,n={}){return this.getDirectoryHandle(t,n)}async*entries(){for await(const[t,n]of this[ma].entries())yield[n.name,n.kind==="file"?new Ja(n):new $o(n)]}async*getEntries(){return this.entries()}async*keys(){for await(const[t]of this[ma].entries())yield t}async*values(){for await(const[t,n]of this.entries())yield n}async getFileHandle(t,n={}){if(t==="")throw new TypeError("Name can't be an empty string.");if(t==="."||t===".."||t.includes("/"))throw new TypeError("Name contains invalid characters.");return n.create=!!n.create,new Ja(await this[ma].getFileHandle(t,n))}getFile(t,n={}){return this.getFileHandle(t,n)}async removeEntry(t,n={}){if(t==="")throw new TypeError("Name can't be an empty string.");if(t==="."||t===".."||t.includes("/"))throw new TypeError("Name contains invalid characters.");return n.recursive=!!n.recursive,this[ma].removeEntry(t,n)}async resolve(t){if(await t.isSameEntry(this))return[];const n=[{handle:this,path:[]}];for(;n.length;){let{handle:r,path:s}=n.pop();for await(const a of r.values()){if(await a.isSameEntry(t))return[...s,a.name];a.kind==="directory"&&n.push({handle:a,path:[...s,a.name]})}}return null}[Symbol.asyncIterator](){return this.entries()}}Object.defineProperty($o.prototype,Symbol.toStringTag,{value:"FileSystemDirectoryHandle",writable:!1,enumerable:!1,configurable:!0});Object.defineProperties($o.prototype,{getDirectoryHandle:{enumerable:!0},entries:{enumerable:!0},getFileHandle:{enumerable:!0},removeEntry:{enumerable:!0}});const o4=Object.freeze(Object.defineProperty({__proto__:null,FileSystemDirectoryHandle:$o,default:$o},Symbol.toStringTag,{value:"Module"}));var Vp,qp;globalThis.CacheStorage&&globalThis.caches instanceof CacheStorage,(qp=(Vp=globalThis.navigator)===null||Vp===void 0?void 0:Vp.storage)===null||qp===void 0||qp.getDirectory,typeof window<"u"&&window.webkitRequestFileSystem;class $6 extends oe.Component{constructor(n){super(n);Uy(this,"view");this.state={},this.loadLogs=this.loadLogs.bind(this),this.clearLogs=this.clearLogs.bind(this),this.clickEvent=this.clickEvent.bind(this),this.view={oldest:null,newest:null,clicked:null}}componentDidMount(){}componentDidUpdate(n,r){console.log("updated component")}async loadLogs(){const n=await U6();if(n.kind!=="directory"||n.name!=="verb-logger")return alert("Not a real verb-logger put directory!");for await(const[r,s]of n.entries()){if(s.kind!=="directory"||r===".DS_Store")continue;let a=[];for await(const[u,c]of s.entries())c.kind==="file"&&u.slice(-5)===".json"&&a.push({key:u,log:c});a=a.sort((u,c)=>u.key{this.view.oldest=Number.parseInt(s.target.value),this.setState({view:this.view})},step:"1",min:qe.state.logsRange.oldest,max:qe.state.logsRange.newest,value:n}),y.jsx("br",{}),y.jsx("input",{type:"range",onChange:s=>{const a=Number.parseInt(s.target.value);a===qe.state.logsRange.newest?this.view.newest=null:this.view.newest=a,this.setState({view:this.view})},step:"1",min:qe.state.logsRange.oldest,max:qe.state.logsRange.newest,value:r}),y.jsx("br",{}),"thru ",mr(r,!0)+(this.view.newest?"":" (live)")]})}renderEvent(n,r,s){const a=this.view.oldest||qe.state.logsRange.oldest,c=(this.view.newest||qe.state.logsRange.newest)-a,p=`${n}#${r.act}`,v=this.view.clicked===p;let m=` +zodnecbudwessevpersutletfulpensytdurwepserwylsunrypsyxdyrnuphebpeglupdepdysputlughecryttyvsydnexlunmeplutseppesdelsulpedtemledtulmetwenbynhexfebpyldulhetmevruttylwydtepbesdexsefwycburderneppurrysrebdennutsubpetrulsynregtydsupsemwynrecmegnetsecmulnymtevwebsummutnyxrextebfushepbenmuswyxsymselrucdecwexsyrwetdylmynmesdetbetbeltuxtugmyrpelsyptermebsetdutdegtexsurfeltudnuxruxrenwytnubmedlytdusnebrumtynseglyxpunresredfunrevrefmectedrusbexlebduxrynnumpyxrygryxfeptyrtustyclegnemfermertenlusnussyltecmexpubrymtucfyllepdebbermughuttunbylsudpemdevlurdefbusbeprunmelpexdytbyttyplevmylwedducfurfexnulluclennerlexrupnedlecrydlydfenwelnydhusrelrudneshesfetdesretdunlernyrsebhulrylludremlysfynwerrycsugnysnyllyndyndemluxfedsedbecmunlyrtesmudnytbyrsenwegfyrmurtelreptegpecnelnevfes`,iM=e=>e.replace(/[\^~-]/g,"").match(/.{1,3}/g)||[],k6=(e,t)=>[t.slice(0,e),t.slice(e)],Lo=S6.match(/.{1,3}/g),ki=M6.match(/.{1,3}/g),ih=e=>rM.pow(e),t0=(e,t,n)=>n.div(ih(ih(e).mul(t))),sh=(e,t,n=Ba)=>t.eq(Ba)?n:sh(e,t0(e,Ir,t),n.add(Ir)),Jl=(e,t,n)=>n.mod(ih(ih(e).mul(t))),C6=e=>{if(e===null)throw new Error("hex2patp: null input");return qh(new kr(e,"hex"))},sM=e=>{if(Pu(e)===!1)throw new Error("patp2hex: not a valid @p");const t=iM(e),n=u=>u.toString(2).padStart(8,"0"),r=t.reduce((u,c,p)=>p%2!==0||t.length===1?u+n(ki.indexOf(c)):u+n(Lo.indexOf(c)),""),s=new kr(r,2),a=nM.fynd(s).toString("hex");return a.length%2!==0?a.padStart(a.length+1,"0"):a},Lg=e=>new kr(sM(e),"hex"),oM=e=>{let t;try{t=Lg(e)}catch{throw new Error("patp2dec: not a valid @p")}return t.toString()},aM=e=>{const n=new kr(e).toArrayLike(Buffer);return lM(n)},lM=e=>{const t=e.length%2!==0&&e.length>1?[[e[0]]].concat(dw(e.slice(1),2)):dw(e,2),n=a=>a[1]===void 0?Lo[0]+ki[a[0]]:Lo[a[0]]+ki[a[1]],r=a=>a[1]===void 0?ki[a[0]]:Lo[a[0]]+ki[a[1]],s=a=>a.length%2!==0&&t.length>1?n(a):r(a);return t.reduce((a,u)=>a+(a==="~"?"":"-")+s(u),"~")},O6=e=>{const t=e.length%2!==0?e.padStart(e.length+1,"0"):e,n=Buffer.from(t,"hex");return lM(n)},oh=e=>{if(Pu(e)===!1)throw new Error("patq2hex: not a valid @q");const t=e.slice(1).split("-"),n=s=>s.toString(16).padStart(2,"0"),r=t.map(s=>{let a=k6(3,s);return a[1]===""?n(ki.indexOf(a[0])):n(Lo.indexOf(a[0]))+n(ki.indexOf(a[1]))});return e.length===0?"00":r.join("")},E6=e=>new kr(oh(e),"hex"),uM=e=>{let t;try{t=E6(e)}catch{throw new Error("patq2dec: not a valid @q")}return t.toString()},fM=e=>{let t;try{t=Lg(e)}catch{throw new Error("clan: not a valid @p")}const n=sh(Xl,t);return n.lte(Ir)?"galaxy":n.eq(rM)?"star":n.lte(Ra)?"planet":n.lte(new kr(8))?"moon":"comet"},T6=e=>{let t;try{t=Lg(e)}catch{throw new Error("sein: not a valid @p")}let n;try{n=fM(e)}catch{throw new Error("sein: not a valid @p")}const r=n==="galaxy"?t:n==="star"?Jl(Xl,Ir,t):n==="planet"?Jl(Ra,Ir,t):n==="moon"?Jl(x6,Ir,t):Ba;return qh(r)},Pu=e=>{if(typeof e!="string")throw new Error("isValidPat: non-string input");if(e.slice(0,1)==="~"===!1||e.length<4)return!1;{const n=iM(e),r=n.length%2!==0&&n.length!==1,s=n.reduce((a,u,c)=>a&&(c%2!==0||n.length===1?ki.includes(u):Lo.includes(u)),!0);return!r&&s}},b6=e=>Pu(e)&&e===qh(oM(e)),P6=e=>Pu(e)&&cM(e,aM(uM(e))),n0=e=>e.slice(0,2)==="00"?n0(e.slice(2)):e,R6=(e,t)=>_6(n0(e),n0(t)),cM=(e,t)=>{let n;try{n=oh(e)}catch{throw new Error("eqPatq: not a valid @q")}let r;try{r=oh(t)}catch{throw new Error("eqPatq: not a valid @q")}return R6(n,r)},qh=e=>{if(e===null)throw new Error("patp: null input");const t=new kr(e),n=nM.fein(t),r=sh(Ra,n),s=(u,c,p)=>{const v=Jl(Ra,Ir,u),m=Lo[t0(Xl,Ir,v)],O=ki[Jl(Xl,Ir,v)],E=c.mod(Ra).eq(Ba)?c.eq(Ba)?"":"--":"-",F=m+O+E+p;return c.eq(r)?p:s(t0(Ra,Ir,u),c.add(Ir),F)};return"~"+(sh(Xl,n).lte(Ir)?ki[n]:s(n,Ba,""))};var D6={patp:qh,patp2hex:sM,hex2patp:C6,patp2dec:oM,sein:T6,clan:fM,patq:aM,patq2hex:oh,hex2patq:O6,patq2dec:uM,eqPatq:cM,isValidPat:Pu,isValidPatp:b6,isValidPatq:P6};const A6=D6,L6=tM;Object.assign(A6,L6);class qt extends oe.Component{constructor(t){super(t),this.state={query:""},this.updateQuery=this.updateQuery.bind(this)}updateQuery(t){this.setState({query:t.target.value})}render(){const{state:t,props:n}=this,r=y.jsx("input",{type:"text",placeholder:n.placeholder,onChange:this.updateQuery,value:t.query,style:{border:"1px solid black"}});let s=n.items.filter(a=>t.query.split(" ").reduce((u,c)=>u&&(""+a.key).includes(c),!0));return s=s.map(a=>y.jsx("div",{style:{marginTop:"4px"},children:a.jsx},a.key)),y.jsxs("div",{style:{position:"relative",border:"1px solid grey",padding:"4px"},children:[n.children,y.jsxs("div",{children:[r," (",s.length,")"]}),y.jsxs("details",{open:n.open===void 0?!0:n.open,children:[y.jsxs("summary",{children:[s.length," items"]}),y.jsx("div",{children:s.length===0?"none":s})]})]})}}class j6 extends oe.Component{constructor(t){super(t)}componentDidMount(){this.componentDidUpdate()}componentDidUpdate(t){}render(){const t=this.props,n=t.in.map(s=>({key:"~"+s.ship+" "+s.path,jsx:y.jsxs("div",{class:"flex",children:[y.jsxs("div",{class:"flex-auto",style:{maxWidth:"10%"},children:["~",s.ship]}),y.jsx("div",{class:"flex-auto",style:{maxWidth:"30%"},children:s.path}),y.jsx("div",{class:"flex-auto",style:{maxWidth:"60%"},children:bs(s.duct)})]})})),r=t.out.map(s=>({key:`~${s.ship} ${s.app} ${s.wire} ${s.path}`,jsx:y.jsxs("div",{class:"flex",children:[y.jsx("div",{class:"flex-auto",style:{maxWidth:"35%"},children:s.wire}),y.jsxs("div",{class:"flex-auto",style:{maxWidth:"10%"},children:["~",s.ship]}),y.jsx("div",{class:"flex-auto",style:{maxWidth:"10%"},children:s.app}),y.jsx("div",{class:"flex-auto",style:{maxWidth:"35%"},children:s.path}),y.jsx("div",{class:"flex-auto",style:{maxWidth:"10%"},children:s.acked?"acked":"not acked"})]})}));return y.jsxs("div",{children:[y.jsx("h4",{children:"Incoming"}),y.jsx(qt,{placeholder:"ship / path",items:n}),y.jsx("h4",{children:"Outgoing"}),y.jsx(qt,{placeholder:"ship / app / wire / path",items:r})]})}}class Oo extends oe.Component{constructor(t){super(t),this.onToggle=this.onToggle.bind(this)}onToggle(t){t.target.open?this.props.onOpen&&this.props.onOpen(this.props.id):this.props.onClose&&this.props.onClose(this.props.id)}render(){const{props:t}=this;return y.jsxs("details",{onToggle:this.onToggle,...t,style:{border:"1px solid black",padding:"4px",position:"relative",...t.style},children:[y.jsx("summary",{children:t.summary}),y.jsx("div",{style:{borderTop:"1px solid black"},children:t.details})]})}}class N6 extends oe.Component{constructor(t){super(t),this.state={stateQuery:{}},this.changeStateQuery=this.changeStateQuery.bind(this),this.loadApps=this.loadApps.bind(this),this.loadAppDetails=this.loadAppDetails.bind(this)}componentDidMount(){Object.keys(this.props.apps).length===0&&this.loadApps()}componentDidUpdate(t,n){}changeStateQuery(t,n){this.state.stateQuery[t]=n.target.value,this.setState({stateQuery:this.state.stateQuery})}loadApps(){api.getApps()}loadAppDetails(t){api.getAppDetails(t)}loadAppState(t){api.getAppState(t,this.state.stateQuery[t])}render(){const{props:t,state:n}=this,r=Object.keys(t.apps).sort().map(s=>{const a=t.apps[s],u=typeof a=="object",c=u?!0:a,p=c?{borderLeft:"3px solid green"}:{borderLeft:"3px solid grey"};let v=null;if(!u)v=c?"Loading...":"App not running.";else if(a.noDebug)v="App doesn't use /lib/dbug";else{const O=a,E=(O.events||[]).map(F=>({key:F,jsx:y.jsxs(y.Fragment,{children:[F,y.jsx("br",{})]})}));v=y.jsxs(y.Fragment,{children:[y.jsx("button",{style:{position:"absolute",top:0,right:0},onClick:()=>{this.loadAppDetails(s)},children:"refresh"}),y.jsx("button",{onClick:()=>{this.loadAppState(s)},children:"query state"}),y.jsx("textarea",{class:"mono",onChange:F=>this.changeStateQuery(s,F),value:n.stateQuery[s],placeholder:"-.-",spellCheck:"false"}),y.jsx("div",{style:{maxHeight:"500px",overflow:"scroll"},children:y.jsx("pre",{children:(O.state||O.simpleState).join(` +`)})}),y.jsxs("div",{children:[y.jsx("button",{onClick:()=>{api.bindToVerb(s)},children:"listen to simple verb (here)"})," ",y.jsx("button",{onClick:()=>{api.bindToVerbPlus(s)},children:"listen to verb+ (logs viewer)"}),y.jsx(qt,{placeholder:"event description",items:E})]}),y.jsx("div",{children:y.jsx(j6,{...O.subscriptions})})]})}const m=c?this.loadAppDetails:null;return{key:s,jsx:y.jsx(Oo,{id:s,summary:"%"+s,details:v,onOpen:m,style:p})}});return y.jsx("div",{className:"h-100 w-100 pa3 pt4 overflow-x-hidden bg-gray0-d white-d flex flex-column",children:y.jsx(qt,{placeholder:"app name",items:r,children:y.jsx("button",{onClick:this.loadApps,children:"refresh"})})})}}const I6="modulepreload",F6=function(e){return"/~debug/"+e},pw={},hM=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){const a=document.getElementsByTagName("link"),u=document.querySelector("meta[property=csp-nonce]"),c=(u==null?void 0:u.nonce)||(u==null?void 0:u.getAttribute("nonce"));s=Promise.all(n.map(p=>{if(p=F6(p),p in pw)return;pw[p]=!0;const v=p.endsWith(".css"),m=v?'[rel="stylesheet"]':"";if(!!r)for(let F=a.length-1;F>=0;F--){const B=a[F];if(B.href===p&&(!v||B.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${p}"]${m}`))return;const E=document.createElement("link");if(E.rel=v?"stylesheet":I6,v||(E.as="script",E.crossOrigin=""),E.href=p,c&&E.setAttribute("nonce",c),document.head.appendChild(E),v)return new Promise((F,B)=>{E.addEventListener("load",F),E.addEventListener("error",()=>B(new Error(`Unable to preload CSS for ${p}`)))})}))}return s.then(()=>t()).catch(a=>{const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=a,window.dispatchEvent(u),!u.defaultPrevented)throw a})},mw=globalThis.showDirectoryPicker;async function U6(e={}){if(mw&&!e._preferPolyfill)return mw(e);const t=document.createElement("input");t.type="file",t.webkitdirectory=!0,t.multiple=!0,t.style.position="fixed",t.style.top="-100000px",t.style.left="-100000px",document.body.appendChild(t);const{makeDirHandleFromFileList:n}=await hM(()=>import("./util.js"),[]);return new Promise((r,s)=>{t.addEventListener("change",()=>{n(t.files).then(r).catch(s),document.body.removeChild(t)}),t.click()})}const pa=Symbol("adapter");class jg{constructor(t){this.kind=t.kind,this.name=t.name,this[pa]=t}get isFile(){return this.kind==="file"}get isDirectory(){return this.kind==="directory"}async queryPermission(t={mode:"read"}){const n=this[pa];if(n.queryPermission)return n.queryPermission(t);if(t.mode==="read")return"granted";if(t.mode==="readwrite")return n.writable?"granted":"denied";throw new TypeError(`Mode ${t.mode} must be 'read' or 'readwrite'`)}async requestPermission(t={mode:"read"}){const n=this[pa];if(n.requestPermission)return n.requestPermission(t);if(t.mode==="read")return"granted";if(t.mode==="readwrite")return n.writable?"granted":"denied";throw new TypeError(`Mode ${t.mode} must be 'read' or 'readwrite'`)}async isSameEntry(t){return this===t?!0:this.kind!==t.kind||!t[pa]?!1:await this[pa].isSameEntry(t[pa])}}Object.defineProperty(jg.prototype,Symbol.toStringTag,{value:"FileSystemHandle",writable:!1,enumerable:!1,configurable:!0});const Gp=Symbol("adapter");class Ja extends jg{constructor(t){super(t),this.kind="file",this[Gp]=t}async createWritable(t={}){const{FileSystemWritableFileStream:n}=await hM(()=>import("./FileSystemWritableFileStream.js"),[]);return new n(await this[Gp].createWritable(t))}async getFile(){return this[Gp].getFile()}}Object.defineProperty(Ja.prototype,Symbol.toStringTag,{value:"FileSystemFileHandle",writable:!1,enumerable:!1,configurable:!0});Object.defineProperties(Ja.prototype,{createWritable:{enumerable:!0},getFile:{enumerable:!0}});const s4=Object.freeze(Object.defineProperty({__proto__:null,FileSystemFileHandle:Ja,default:Ja},Symbol.toStringTag,{value:"Module"})),ma=Symbol("adapter");class $o extends jg{constructor(t){super(t),this.kind="directory",this[ma]=t}async getDirectoryHandle(t,n={}){if(t==="")throw new TypeError("Name can't be an empty string.");if(t==="."||t===".."||t.includes("/"))throw new TypeError("Name contains invalid characters.");return new $o(await this[ma].getDirectoryHandle(t,n))}getDirectory(t,n={}){return this.getDirectoryHandle(t,n)}async*entries(){for await(const[t,n]of this[ma].entries())yield[n.name,n.kind==="file"?new Ja(n):new $o(n)]}async*getEntries(){return this.entries()}async*keys(){for await(const[t]of this[ma].entries())yield t}async*values(){for await(const[t,n]of this.entries())yield n}async getFileHandle(t,n={}){if(t==="")throw new TypeError("Name can't be an empty string.");if(t==="."||t===".."||t.includes("/"))throw new TypeError("Name contains invalid characters.");return n.create=!!n.create,new Ja(await this[ma].getFileHandle(t,n))}getFile(t,n={}){return this.getFileHandle(t,n)}async removeEntry(t,n={}){if(t==="")throw new TypeError("Name can't be an empty string.");if(t==="."||t===".."||t.includes("/"))throw new TypeError("Name contains invalid characters.");return n.recursive=!!n.recursive,this[ma].removeEntry(t,n)}async resolve(t){if(await t.isSameEntry(this))return[];const n=[{handle:this,path:[]}];for(;n.length;){let{handle:r,path:s}=n.pop();for await(const a of r.values()){if(await a.isSameEntry(t))return[...s,a.name];a.kind==="directory"&&n.push({handle:a,path:[...s,a.name]})}}return null}[Symbol.asyncIterator](){return this.entries()}}Object.defineProperty($o.prototype,Symbol.toStringTag,{value:"FileSystemDirectoryHandle",writable:!1,enumerable:!1,configurable:!0});Object.defineProperties($o.prototype,{getDirectoryHandle:{enumerable:!0},entries:{enumerable:!0},getFileHandle:{enumerable:!0},removeEntry:{enumerable:!0}});const o4=Object.freeze(Object.defineProperty({__proto__:null,FileSystemDirectoryHandle:$o,default:$o},Symbol.toStringTag,{value:"Module"}));var Vp,qp;globalThis.CacheStorage&&globalThis.caches instanceof CacheStorage,(qp=(Vp=globalThis.navigator)===null||Vp===void 0?void 0:Vp.storage)===null||qp===void 0||qp.getDirectory,typeof window<"u"&&window.webkitRequestFileSystem;class $6 extends oe.Component{constructor(n){super(n);Uy(this,"view");this.state={},this.loadLogs=this.loadLogs.bind(this),this.clearLogs=this.clearLogs.bind(this),this.clickEvent=this.clickEvent.bind(this),this.view={oldest:null,newest:null,clicked:null}}componentDidMount(){}componentDidUpdate(n,r){console.log("updated component")}async loadLogs(){const n=await U6();if(n.kind!=="directory"||n.name!=="verb-logger")return alert("Not a real verb-logger put directory!");for await(const[r,s]of n.entries()){if(s.kind!=="directory"||r===".DS_Store")continue;let a=[];for await(const[u,c]of s.entries())c.kind==="file"&&u.slice(-5)===".json"&&a.push({key:u,log:c});a=a.sort((u,c)=>u.key{this.view.oldest=Number.parseInt(s.target.value),this.setState({view:this.view})},step:"1",min:qe.state.logsRange.oldest,max:qe.state.logsRange.newest,value:n}),y.jsx("br",{}),y.jsx("input",{type:"range",onChange:s=>{const a=Number.parseInt(s.target.value);a===qe.state.logsRange.newest?this.view.newest=null:this.view.newest=a,this.setState({view:this.view})},step:"1",min:qe.state.logsRange.oldest,max:qe.state.logsRange.newest,value:r}),y.jsx("br",{}),"thru ",mr(r,!0)+(this.view.newest?"":" (live)")]})}renderEvent(n,r,s){const a=this.view.oldest||qe.state.logsRange.oldest,c=(this.view.newest||qe.state.logsRange.newest)-a,p=`${n}#${r.act}`,v=this.view.clicked===p;let m=` act: ${r.act}
now: ${mr(r.now,!0)}
src: ${r.src}${r.sap}
@@ -122,4 +122,4 @@ zodnecbudwessevpersutletfulpensytdurwepserwylsunrypsyxdyrnuphebpeglupdepdysputlu `;break;case"kick":m=m+`paths: ${E.deets.paths.join(", ")}`;break;case"arvo":m=m+` wire: ${E.deets.wire}
task: %${E.deets.vane} %${E.deets.task} - `;break}m=m+""}}const O=(r.now-a)/c*98;return y.jsx("div",{className:"event"+(v?" focus":"")+(O>50?" right":""),onClick:()=>this.clickEvent(p),style:{left:O+"%",top:s%18*5+"%"},children:y.jsx("div",{className:"details"+(r.effects.length>0?" effects":""),onClick:E=>E.stopPropagation(),dangerouslySetInnerHTML:{__html:m}})})}renderCauseRow(n){return y.jsxs("div",{className:"cause",children:[y.jsx("div",{className:"legend",children:n.kind}),...n.events]})}renderCauses(n,r){const s=this.view.oldest||qe.state.logsRange.oldest,a=this.view.newest||qe.state.logsRange.newest;console.log("oldest, newest",s,a);let u={};for(const c of r){if(c.nowa)continue;const p=c.kind;console.log("vent kind",p);const v=u[p]||{kind:p,events:[]},m=this.renderEvent(n,c,v.events.length);v.events.push(m),u[p]=v}return Object.values(u).map(this.renderCauseRow)}renderLogs(n){const r=[];for(const[s,a]of Object.entries(n))r.push(y.jsxs("div",{className:"agent",children:[y.jsx("h3",{children:s}),this.renderCauses(s,a.logs)]}));return r}render(){return y.jsxs(y.Fragment,{children:[y.jsx("button",{onClick:this.loadLogs,children:"load logs"})," ",y.jsx("button",{onClick:this.clearLogs,children:"clear logs"}),y.jsx("br",{}),y.jsx("br",{}),Object.keys(qe.state.logs).length===0?"no logs yet. turn on verb+ for an app in the apps tab, or import log-viewer files.":[this.renderViewControls(),this.renderLogs(qe.state.logs)]]})}}class W6 extends oe.Component{constructor(t){super(t),this.state={},this.loadThreads=this.loadThreads.bind(this),this.renderThreads=this.renderThreads.bind(this),this.killThread=this.killThread.bind(this)}componentDidMount(){const{threads:t}=this.props;Object.keys(t).length===0&&this.loadThreads()}componentDidUpdate(t,n){}loadThreads(){api.getThreads()}killThread(t){api.killThread(t)}renderThreads(t){return Object.keys(t).map(n=>{const r=this.renderThreads(t[n]);return y.jsxs(y.Fragment,{children:[y.jsxs("div",{children:[y.jsx("button",{style:{margin:"4px"},onClick:()=>{this.killThread(n)},children:"kill"}),n]}),y.jsx("div",{style:{paddingLeft:"16px"},children:r})]})})}render(){return y.jsxs(y.Fragment,{children:[y.jsx("button",{onClick:this.loadThreads,children:"refresh"}),y.jsx("br",{}),Object.keys(this.props.threads).length===0?"no running threads":this.renderThreads(this.props.threads)]})}}class B6 extends oe.Component{constructor(t){super(t),this.loadPeers=this.loadPeers.bind(this),this.loadPeerDetails=this.loadPeerDetails.bind(this),this.renderFlow=this.renderFlow.bind(this),this.renderScry=this.renderScry.bind(this)}componentDidMount(){const{known:t,alien:n}=this.props.peers;t.length===0&&n.length===0&&this.loadPeers()}componentDidUpdate(t,n){}loadPeers(){api.getPeers()}loadPeerDetails(t){api.getPeer(t)}renderPaths(t){const n=t.map(r=>({key:r,jsx:r}));return y.jsx(Gt,{placeholder:"path",items:n})}renderDucts(t){const n=t.map(r=>({key:r.join(" "),jsx:y.jsx("div",{children:Qi(r)})}));return y.jsx(Gt,{placeholder:"duct",items:n})}renderSnd(t){const n=t["unsent-messages"].reduce((F,B)=>F+B+" bytes, ","unsent msg sizes: "),r=t["queued-message-acks"].map(F=>({key:F["message-num"],jsx:F["message-num"]+": "+F.ack})),s=y.jsx(Gt,{placeholder:"msg num",items:r}),a=t["packet-pump-state"].metrics,u=y.jsx(y.Fragment,{children:y.jsx("table",{children:y.jsxs("tbody",{children:[y.jsxs("tr",{class:"inter",children:[y.jsx("td",{children:"rto"}),y.jsx("td",{children:"rtt"}),y.jsx("td",{children:"rttvar"}),y.jsx("td",{children:"ssthresh"}),y.jsx("td",{children:"num-live"}),y.jsx("td",{children:"cwnd"}),y.jsx("td",{children:"counter"})]}),y.jsxs("tr",{children:[y.jsx("td",{children:a.rto}),y.jsx("td",{children:a.rtt}),y.jsx("td",{children:a.rttvar}),y.jsx("td",{children:a.ssthresh}),y.jsx("td",{children:a["num-live"]}),y.jsx("td",{children:a.cwnd}),y.jsx("td",{children:a.counter})]})]})})}),c=t["packet-pump-state"].live.map(F=>({key:F["message-num"]+","+F["fragment-num"],jsx:y.jsx("table",{children:y.jsxs("tbody",{children:[y.jsxs("tr",{children:[y.jsx("td",{children:"message-num"}),y.jsx("td",{children:"fragment-num"}),y.jsx("td",{children:"num-fragments"}),y.jsx("td",{children:"last-sent"}),y.jsx("td",{children:"tries"}),y.jsx("td",{children:"skips"})]}),y.jsxs("tr",{children:[y.jsx("td",{children:F["message-num"]}),y.jsx("td",{children:F["fragment-num"]}),y.jsx("td",{children:F["num-fragments"]}),y.jsx("td",{children:mr(F["last-sent"])}),y.jsx("td",{children:F.tries}),y.jsx("td",{children:F.skips})]})]})})})),p=y.jsx(Gt,{placeholder:"msg-num,frag-num",items:c}),v=y.jsxs(y.Fragment,{children:[y.jsx("b",{children:"snd"}),y.jsx("br",{}),Qi(t.duct),y.jsx("table",{children:y.jsxs("tbody",{children:[y.jsxs("tr",{class:"inter",children:[y.jsx("td",{children:"bone"}),y.jsx("td",{children:"current"}),y.jsx("td",{children:"next"}),y.jsx("td",{children:"next wake"}),y.jsx("td",{children:"total unsent"})]}),y.jsxs("tr",{children:[y.jsx("td",{children:t.bone}),y.jsx("td",{children:t.current}),y.jsx("td",{children:t.next}),y.jsx("td",{children:mr(t["packet-pump-state"]["next-wake"])}),y.jsxs("td",{children:[t["unsent-messages"].reduce((F,B)=>F+B,0)," bytes (",t["unsent-messages"].length," messages)"]})]})]})})]}),m=y.jsxs(y.Fragment,{children:[u,n,s,p]}),O=t["unsent-messages"].length>0||t["packet-pump-state"].live.length>0?"active, ":"",E=t.closing?"lightyellow":t.corked?"lightred":"transparent";return{key:"snd "+O+t.bone+", "+Qi(t.duct),jsx:y.jsx("div",{style:{backgroundColor:E},children:y.jsx(Oo,{summary:v,details:m})})}}renderRcv(t){const n=t["pending-vane-ack"].reduce((v,m)=>v+m+", ","pending vane acks: "),r=t.nax.reduce((v,m)=>v+m+", ","nacks: "),s=t["live-messages"].map(v=>({key:v["message-num"],jsx:y.jsxs(y.Fragment,{children:["Message #",v["message-num"],y.jsx("br",{}),v["num-received"]," out of ",v["num-fragments"]," fragments received:",y.jsx("br",{}),v.fragments.reduce((m,O)=>m+O+", ","")]})})),a=y.jsxs(y.Fragment,{children:["Live messages:",y.jsx("br",{}),y.jsx(Gt,{placeholder:"message num",items:s})]}),u=y.jsxs(y.Fragment,{children:[y.jsx("b",{children:"rcv"}),y.jsx("br",{}),Qi(t.duct),y.jsx("table",{children:y.jsxs("tbody",{children:[y.jsxs("tr",{children:[y.jsx("td",{children:"bone"}),y.jsx("td",{children:"last-acked"}),y.jsx("td",{children:"last-heard"})]}),y.jsxs("tr",{children:[y.jsx("td",{children:t.bone}),y.jsx("td",{children:t["last-acked"]}),y.jsx("td",{children:t["last-heard"]})]})]})})]}),c=y.jsxs(y.Fragment,{children:[n,y.jsx("br",{}),r,y.jsx("br",{}),a]}),p=t.closing?"ligthyellow":t.corked?"lightred":"transparent";return{key:"rcv "+t.bone+", "+Qi(t.duct),jsx:y.jsx("div",{style:{backgroundColor:p},children:y.jsx(Oo,{summary:u,details:c})})}}renderFlow(t){return t.snd?this.renderSnd(t.snd):t.rcv?this.renderRcv(t.rcv):(console.log("weird flow",t),"weird flow")}renderScry(t){const n=t["keen-state"].metrics,r=y.jsx(y.Fragment,{children:y.jsx("table",{children:y.jsxs("tbody",{children:[y.jsxs("tr",{class:"inter",children:[y.jsx("td",{children:"rto"}),y.jsx("td",{children:"rtt"}),y.jsx("td",{children:"rttvar"}),y.jsx("td",{children:"ssthresh"}),y.jsx("td",{children:"cwnd"}),y.jsx("td",{children:"counter"})]}),y.jsxs("tr",{children:[y.jsx("td",{children:n.rto}),y.jsx("td",{children:n.rtt}),y.jsx("td",{children:n.rttvar}),y.jsx("td",{children:n.ssthresh}),y.jsx("td",{children:n.cwnd}),y.jsx("td",{children:n.counter})]})]})})}),s=t["keen-state"].wan.map(p=>({key:p.frag,jsx:y.jsx("table",{children:y.jsxs("tbody",{children:[y.jsxs("tr",{children:[y.jsx("td",{children:"fragment"}),y.jsx("td",{children:"size"}),y.jsx("td",{children:"last-sent"}),y.jsx("td",{children:"tries"}),y.jsx("td",{children:"skips"})]}),y.jsxs("tr",{children:[y.jsx("td",{children:p.frag}),y.jsx("td",{children:p.size}),y.jsx("td",{children:mr(p["last-sent"])}),y.jsx("td",{children:p.tries}),y.jsx("td",{children:p.skips})]})]})})})),a=y.jsx(Gt,{placeholder:"fragment",items:s}),u=y.jsxs(y.Fragment,{children:[y.jsx("b",{children:t["scry-path"]}),y.jsx("br",{}),y.jsx("h5",{style:{marginTop:"1em"},children:"listeners:"}),Qi(t["keen-state"].listeners),y.jsx("h5",{style:{marginTop:"1em"},children:"scry state:"}),y.jsx("table",{children:y.jsxs("tbody",{children:[y.jsxs("tr",{class:"inter",children:[y.jsx("td",{children:"num-fragments"}),y.jsx("td",{children:"num-received"}),y.jsx("td",{children:"next-wake"})]}),y.jsxs("tr",{children:[y.jsx("td",{children:t["keen-state"]["num-fragments"]}),y.jsx("td",{children:t["keen-state"]["num-received"]}),y.jsx("td",{children:mr(t["keen-state"]["next-wake"])})]})]})})]}),c=y.jsxs(y.Fragment,{children:[r,a]});return{key:t["scry-path"],jsx:y.jsx(Oo,{summary:u,details:c})}}render(){const{props:t,state:n}=this,{known:r,alien:s,deets:a}=t.peers,u=m=>{const O=a[m];if(O){if(O.alien)return y.jsxs(y.Fragment,{children:["Pending messages: ",O.alien.messages,"Pending packets: ",O.alien.packets,"Heeds: ",this.renderDucts(O.alien.heeds),"Keens: ",this.renderPaths(O.alien.keens)]});if(O.known){const E=O.known,F=y.jsxs(y.Fragment,{children:[y.jsx("h4",{style:{marginTop:"1em"},children:"status"}),y.jsx("table",{children:y.jsxs("tbody",{children:[y.jsxs("tr",{children:[y.jsx("td",{class:"inter",children:"Life"}),y.jsx("td",{children:E.life})]}),y.jsxs("tr",{children:[y.jsx("td",{class:"inter",children:"Route"}),y.jsx("td",{children:E.route?`${E.route.direct?"":"in"}direct, on lane ${E.route.lane}`:"none"})]}),y.jsxs("tr",{children:[y.jsx("td",{class:"inter",children:"QoS"}),y.jsxs("td",{children:[E.qos.kind,", last contact ",mr(E.qos["last-contact"])]})]}),y.jsxs("tr",{children:[y.jsx("td",{class:"inter",children:"Bones "}),y.jsxs("td",{children:["closing: ",E.closing.length,", corked: ",E.corked.length]})]})]})})]}),B=E.flows.forward.map(this.renderFlow),K=y.jsxs(y.Fragment,{children:[y.jsx("h4",{style:{marginTop:"1em"},children:"forward"}),y.jsx(Gt,{placeholder:"bone, duct",items:B})]}),me=E.flows.backward.map(this.renderFlow),N=y.jsxs(y.Fragment,{children:[y.jsx("h4",{style:{marginTop:"1em"},children:"backward"}),y.jsx(Gt,{placeholder:"bone, duct",items:me})]}),A=E.nax.map(V=>({key:V.bone,jsx:y.jsxs("div",{children:["bone ",V.bone,", message #",V["message-num"],", duct:",y.jsx("br",{}),Qi(V.duct)]})})),I=y.jsxs(y.Fragment,{children:[y.jsx("h4",{style:{marginTop:"1em"},children:"nax"}),y.jsx(Gt,{placeholder:"bone",items:A})]}),H=y.jsxs(y.Fragment,{children:[y.jsx("h4",{style:{marginTop:"1em"},children:"heeds"}),this.renderDucts(E.heeds)]}),X=E.scries.map(this.renderScry),te=y.jsxs(y.Fragment,{children:[y.jsx("h4",{style:{marginTop:"1em"},children:"scries"}),y.jsx(Gt,{placeholder:"path",items:X})]});return y.jsxs(y.Fragment,{children:[y.jsx("button",{style:{position:"absolute",top:0,right:0},onClick:()=>{this.loadPeerDetails(m)},children:"refresh"}),F,K,N,I,H,te]})}else return console.log("weird peer",O),"???"}else return"Loading..."},c=r.map(m=>({key:"~"+m,jsx:y.jsx(Oo,{id:m,summary:"~"+m+" (known)",details:u(m),onOpen:this.loadPeerDetails})})),p=s.map(m=>({key:"~"+m,jsx:y.jsx(Oo,{id:m,summary:"~"+m+" (alien)",details:u(m),onOpen:this.loadPeerDetails})})),v=[...c,...p];return y.jsx(Gt,{placeholder:"ship name",items:v,children:y.jsx("button",{onClick:this.loadPeers,children:"refresh"})})}}class z6 extends oe.Component{constructor(t){super(t),this.state={},this.loadTimers=this.loadTimers.bind(this)}componentDidMount(){const{timers:t}=this.props;t.length===0&&this.loadTimers()}componentDidUpdate(t,n){}loadTimers(){api.getTimers()}render(){const{props:t,state:n}=this,r=t.timers.map(s=>{const a=Qi(s.duct);return{key:a,jsx:y.jsxs("div",{class:"flex",children:[y.jsx("div",{class:"flex-auto",style:{maxWidth:"50%"},children:mr(s.date)}),y.jsx("div",{class:"flex-auto",style:{maxWidth:"50%"},children:a})]})}});return y.jsx("table",{children:y.jsx("tbody",{children:y.jsx(Gt,{placeholder:"duct",items:r,children:y.jsx("button",{onClick:this.loadTimers,children:"refresh"})})})})}}var Yn={},Ng={},ga={},ic={},Ru={},Qh={},Kh={},sr={},Zh={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.VerticalReverse="vertical-reverse",t.Horizontal="horizontal",t.HorizontalReverse="horizontal-reverse"}(e.Orientation||(e.Orientation={}))})(Zh);Object.defineProperty(sr,"__esModule",{value:!0});const Qp=Zh;function H6(e,t){return typeof e=="boolean"?e:t}sr.booleanOptionOr=H6;function Y6(e,t){return typeof e=="number"?e:t}sr.numberOptionOr=Y6;function dM(e,t){return Object.assign({},t.reduce((n,r)=>Object.assign({},n,{[r]:e[r]}),{}))}sr.pick=dM;function G6(e,t){console.log(JSON.stringify(e.map(n=>dM(n,t)),null,2))}sr.debug=G6;function pM(e){return e===void 0}sr.isUndefined=pM;function V6(e={}){return Object.keys(e).reduce((t,n)=>pM(e[n])?t:Object.assign({},t,{[n]:e[n]}),{})}sr.withoutUndefinedKeys=V6;function q6(e,t,n){const r=n.style.dot.size,s=e.template.arrow.size,a=r+e.template.arrow.offset,u=Math.PI/7,c=Q6(e,t,n),p=a*Math.cos(c),v=a*Math.sin(c),m=(a+s)*Math.cos(c-u),O=(a+s)*Math.sin(c-u),E=(a+s/2)*Math.cos(c),F=(a+s/2)*Math.sin(c),B=(a+s)*Math.cos(c+u),K=(a+s)*Math.sin(c+u);return`M${p},${v} L${m},${O} Q${E},${F} ${B},${K} L${B},${K}`}sr.arrowSvgPath=q6;function Q6(e,t,n){const r=t.x-n.x,s=t.y-n.y,a=e.template.commit.spacing;let u,c;switch(e.orientation){case Qp.Orientation.Horizontal:u=s,c=-a;break;case Qp.Orientation.HorizontalReverse:u=s,c=a;break;case Qp.Orientation.VerticalReverse:u=-a,c=r;break;default:u=a,c=r;break}return e.isVertical?Math.abs(s)>a&&(c=0):Math.abs(r)>a&&(u=0),e.reverseArrow&&(u*=-1,c*=-1),Math.atan2(u,c)}(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=sr;var n;(function(v){v.Bezier="bezier",v.Straight="straight"})(n||(n={})),e.MergeStyle=n,e.DEFAULT_FONT="normal 12pt Calibri";class r{constructor(m){m.branch=m.branch||{},m.branch.label=m.branch.label||{},m.arrow=m.arrow||{},m.commit=m.commit||{},m.commit.dot=m.commit.dot||{},m.commit.message=m.commit.message||{},this.colors=m.colors||["#000000"],this.branch={color:m.branch.color,lineWidth:m.branch.lineWidth||2,mergeStyle:m.branch.mergeStyle||n.Bezier,spacing:t.numberOptionOr(m.branch.spacing,20),label:{display:t.booleanOptionOr(m.branch.label.display,!0),color:m.branch.label.color||m.commit.color,strokeColor:m.branch.label.strokeColor||m.commit.color,bgColor:m.branch.label.bgColor||"white",font:m.branch.label.font||m.commit.message.font||e.DEFAULT_FONT,borderRadius:t.numberOptionOr(m.branch.label.borderRadius,10)}},this.arrow={size:m.arrow.size||null,color:m.arrow.color||null,offset:m.arrow.offset||2},this.commit={color:m.commit.color,spacing:t.numberOptionOr(m.commit.spacing,25),hasTooltipInCompactMode:t.booleanOptionOr(m.commit.hasTooltipInCompactMode,!0),dot:{color:m.commit.dot.color||m.commit.color,size:m.commit.dot.size||3,strokeWidth:t.numberOptionOr(m.commit.dot.strokeWidth,0),strokeColor:m.commit.dot.strokeColor,font:m.commit.dot.font||m.commit.message.font||"normal 10pt Calibri"},message:{display:t.booleanOptionOr(m.commit.message.display,!0),displayAuthor:t.booleanOptionOr(m.commit.message.displayAuthor,!0),displayHash:t.booleanOptionOr(m.commit.message.displayHash,!0),color:m.commit.message.color||m.commit.color,font:m.commit.message.font||e.DEFAULT_FONT}},this.tag=m.tag||{}}}e.Template=r;const s=new r({colors:["#6963FF","#47E8D4","#6BDB52","#E84BA5","#FFA657"],branch:{color:"#000000",lineWidth:4,spacing:50,mergeStyle:n.Straight},commit:{spacing:60,dot:{size:16,strokeColor:"#000000",strokeWidth:4},message:{color:"black"}},arrow:{size:16,offset:-1.5}});e.blackArrowTemplate=s;const a=new r({colors:["#979797","#008fb5","#f1c109"],branch:{lineWidth:10,spacing:50},commit:{spacing:80,dot:{size:14},message:{font:"normal 14pt Arial"}}});e.metroTemplate=a;var u;(function(v){v.Metro="metro",v.BlackArrow="blackarrow"})(u||(u={})),e.TemplateName=u;function c(v,m){const O=p(v);return m.branch||(m.branch={}),m.commit||(m.commit={}),{colors:m.colors||O.colors,arrow:Object.assign({},O.arrow,m.arrow),branch:Object.assign({},O.branch,m.branch,{label:Object.assign({},O.branch.label,m.branch.label)}),commit:Object.assign({},O.commit,m.commit,{dot:Object.assign({},O.commit.dot,m.commit.dot),message:Object.assign({},O.commit.message,m.commit.message)}),tag:Object.assign({},O.tag,m.tag)}}e.templateExtend=c;function p(v){return v?typeof v=="string"?{[u.BlackArrow]:s,[u.Metro]:a}[v]:v:a}e.getTemplate=p})(Kh);Object.defineProperty(Qh,"__esModule",{value:!0});const K6=Kh,gw=sr;let Z6=class{constructor(t,n,r,s){this.name=t,this.tagStyle=n,this.commitStyle=s,this.render=r}get style(){return{strokeColor:this.tagStyle.strokeColor||this.commitStyle.color,bgColor:this.tagStyle.bgColor||this.commitStyle.color,color:this.tagStyle.color||"white",font:this.tagStyle.font||this.commitStyle.message.font||K6.DEFAULT_FONT,borderRadius:gw.numberOptionOr(this.tagStyle.borderRadius,10),pointerWidth:gw.numberOptionOr(this.tagStyle.pointerWidth,12)}}};Qh.Tag=Z6;Object.defineProperty(Ru,"__esModule",{value:!0});const X6=Qh,J6=()=>(Math.random().toString(16).substring(3)+Math.random().toString(16).substring(3)+Math.random().toString(16).substring(3)+Math.random().toString(16).substring(3)).substring(0,40);let eN=class mM{constructor(t){this.refs=[],this.x=0,this.y=0;let n,r;try{[,n,r]=t.author.match(/(.*) <(.*)>/)}catch{[n,r]=[t.author,""]}this.author={name:n,email:r,timestamp:Date.now()},this.committer={name:n,email:r,timestamp:Date.now()},this.subject=t.subject,this.body=t.body||"",this.hash=t.hash||J6(),this.hashAbbrev=this.hash.substring(0,7),this.parents=t.parents?t.parents:[],this.parentsAbbrev=this.parents.map(s=>s.substring(0,7)),this.style=Object.assign({},t.style,{message:Object.assign({},t.style.message),dot:Object.assign({},t.style.dot)}),this.dotText=t.dotText,this.onClick=()=>t.onClick?t.onClick(this):void 0,this.onMessageClick=()=>t.onMessageClick?t.onMessageClick(this):void 0,this.onMouseOver=()=>t.onMouseOver?t.onMouseOver(this):void 0,this.onMouseOut=()=>t.onMouseOut?t.onMouseOut(this):void 0,this.renderDot=t.renderDot,this.renderMessage=t.renderMessage,this.renderTooltip=t.renderTooltip}get message(){let t="";return this.style.message.displayHash&&(t+=`${this.hashAbbrev} `),t+=this.subject,this.style.message.displayAuthor&&(t+=` - ${this.author.name} <${this.author.email}>`),t}get branchToDisplay(){return this.branches?this.branches[0]:""}setRefs(t){return this.refs=t.getNames(this.hash),this}setTags(t,n,r){return this.tags=t.getNames(this.hash).map(s=>new X6.Tag(s,n(s),r(s),this.style)),this}setBranches(t){return this.branches=t,this}setPosition({x:t,y:n}){return this.x=t,this.y=n,this}withDefaultColor(t){const n=Object.assign({},this.style,{dot:Object.assign({},this.style.dot),message:Object.assign({},this.style.message)});n.color||(n.color=t),n.dot.color||(n.dot.color=t),n.message.color||(n.message.color=t);const r=this.cloneCommit();return r.style=n,r}cloneCommit(){const t=new mM({author:`${this.author.name} <${this.author.email}>`,subject:this.subject,style:this.style,body:this.body,hash:this.hash,parents:this.parents,dotText:this.dotText,onClick:this.onClick,onMessageClick:this.onMessageClick,onMouseOver:this.onMouseOver,onMouseOut:this.onMouseOut,renderDot:this.renderDot,renderMessage:this.renderMessage,renderTooltip:this.renderTooltip});return t.refs=this.refs,t.branches=this.branches,t.tags=this.tags,t.x=this.x,t.y=this.y,t}};Ru.Commit=eN;var vw;function gM(){if(vw)return ic;vw=1;var e=Fr&&Fr.__rest||function(u,c){var p={};for(var v in u)Object.prototype.hasOwnProperty.call(u,v)&&c.indexOf(v)<0&&(p[v]=u[v]);if(u!=null&&typeof Object.getOwnPropertySymbols=="function")for(var m=0,v=Object.getOwnPropertySymbols(u);mE.commits.find(({hash:B})=>B===F);let O=m(p,p.refs.getCommit(v.name));for(;O&&O.hash!==v.parentCommitHash;)yield O,O=m(p,O.parents[0])}(this._graph,this._branch)].forEach(p=>{p.refs=p.refs.filter(v=>v!==this.name)}),this._graph.refs.delete(this.name),this._graph.branches.delete(this.name),this._branch=n.createDeletedBranch(this._graph,this._branch.style,()=>{}),this._onGraphUpdate(),this}merge(...c){if(this._branch.isDeleted()&&!this._isReferenced())throw new Error(`Cannot merge to the deleted branch "${this.name}"`);let p=c[0];a(p)||(p={branch:c[0],fastForward:!1,commitOptions:{subject:c[1]}});const{branch:v,fastForward:m,commitOptions:O}=p,E=typeof v=="string"?v:v.name,F=this._graph.refs.getCommit(E);if(!F)throw new Error(`The branch called "${E}" is unknown`);let B=!1;if(m){const K=this._graph.refs.getCommit(this._branch.name);K&&(B=this._areCommitsConnected(K,F))}return m&&B?this._fastForwardTo(F):this._commitWithParents(Object.assign({},O,{subject:O&&O.subject||`Merge branch ${E}`}),[F]),this._onGraphUpdate(),this}tag(c){if(this._branch.isDeleted()&&!this._isReferenced())throw new Error(`Cannot tag on the deleted branch "${this.name}"`);return typeof c=="string"?this._graph.getUserApi().tag({name:c,ref:this._branch.name}):this._graph.getUserApi().tag(Object.assign({},c,{ref:this._branch.name})),this}checkout(){if(this._branch.isDeleted()&&!this._isReferenced())throw new Error(`Cannot checkout the deleted branch "${this.name}"`);const c=this._branch,p=this._graph.refs.getCommit(c.name);return this._graph.currentBranch=c,p&&this._graph.refs.set("HEAD",p),this}_commitWithParents(c,p){const v=this._graph.refs.getCommit(this._branch.name);v?p.unshift(v):this._branch.parentCommitHash&&p.unshift(this._branch.parentCommitHash);const{tag:m}=c,O=e(c,["tag"]),E=new t.Commit(Object.assign({hash:this._graph.generateCommitHash(),author:this._branch.commitDefaultOptions.author||this._graph.author,subject:this._branch.commitDefaultOptions.subject||this._graph.commitMessage},O,{parents:p,style:this._getCommitStyle(c.style)}));v?this._graph.refs.getNames(v).forEach(B=>this._graph.refs.set(B,E.hash)):this._graph.refs.set(this._branch.name,E.hash),this._graph.commits.push(E),this.checkout(),m&&this.tag(m)}_areCommitsConnected(c,p){const v=this._graph.commits.find(({hash:O})=>p===O);return!v||v.parents.length===0?!1:v.parents.includes(c)?!0:v.parents.some(O=>this._areCommitsConnected(c,O))}_fastForwardTo(c){this._graph.refs.set(this._branch.name,c)}_getCommitStyle(c={}){return Object.assign({},r.withoutUndefinedKeys(this._graph.template.commit),r.withoutUndefinedKeys(this._branch.commitDefaultOptions.style),c,{message:Object.assign({},r.withoutUndefinedKeys(this._graph.template.commit.message),r.withoutUndefinedKeys(this._branch.commitDefaultOptions.style.message),c.message,r.withoutUndefinedKeys({display:this._graph.shouldDisplayCommitMessage&&void 0})),dot:Object.assign({},r.withoutUndefinedKeys(this._graph.template.commit.dot),r.withoutUndefinedKeys(this._branch.commitDefaultOptions.style.dot),c.dot)})}_isReferenced(){return this._graph.branches.has(this.name)||this._graph.refs.hasName(this.name)||this._graph.commits.reduce((c,{refs:p})=>[...c,...p],[]).includes(this.name)}}ic.BranchUserApi=s;function a(u){return typeof u=="object"&&!(u instanceof s)}return ic}var yw;function Xh(){if(yw)return ga;yw=1,Object.defineProperty(ga,"__esModule",{value:!0});const e=gM(),t="";ga.DELETED_BRANCH_NAME=t;class n{constructor(a){this.gitgraph=a.gitgraph,this.name=a.name,this.style=a.style,this.parentCommitHash=a.parentCommitHash,this.commitDefaultOptions=a.commitDefaultOptions||{style:{}},this.onGraphUpdate=a.onGraphUpdate,this.renderLabel=a.renderLabel}getUserApi(){return new e.BranchUserApi(this,this.gitgraph,this.onGraphUpdate)}isDeleted(){return this.name===t}}ga.Branch=n;function r(s,a,u){return new n({name:t,gitgraph:s,style:a,onGraphUpdate:u})}return ga.createDeletedBranch=r,ga}var Jh={},Du={};Object.defineProperty(Du,"__esModule",{value:!0});var r0;(function(e){e.Compact="compact"})(r0||(r0={}));Du.Mode=r0;var Ig={},ed={};Object.defineProperty(ed,"__esModule",{value:!0});class tN{constructor(t){this.rows=new Map,this.maxRowCache=void 0,this.computeRowsFromCommits(t)}getRowOf(t){return this.rows.get(t)||0}getMaxRow(){return this.maxRowCache===void 0&&(this.maxRowCache=nN(Array.from(this.rows.values())).length-1),this.maxRowCache}computeRowsFromCommits(t){t.forEach((n,r)=>{this.rows.set(n.hash,r)}),this.maxRowCache=void 0}}ed.RegularGraphRows=tN;function nN(e){const t=new Set;return e.forEach(n=>t.add(n)),Array.from(t)}Object.defineProperty(Ig,"__esModule",{value:!0});const rN=ed;class iN extends rN.RegularGraphRows{computeRowsFromCommits(t){t.forEach((n,r)=>{let s=r;if(!(r===0)){const u=this.getRowOf(n.parents[0]),c=t[r-1];if(s=Math.max(u+1,this.getRowOf(c.hash)),n.parents.length>1){const v=this.getRowOf(n.parents[1]);uthis.branches.add(s.branchToDisplay)),r&&(this.branches=new Set(Array.from(this.branches).sort(r)))}get(t){return Array.from(this.branches).findIndex(n=>n===t)}getColorOf(t){return this.colors[this.get(t)%this.colors.length]}}Fg.BranchesOrder=lN;var Au={};Object.defineProperty(Au,"__esModule",{value:!0});class uN{constructor(){this.commitPerName=new Map,this.namesPerCommit=new Map}set(t,n){const r=this.commitPerName.get(t);return r&&this.removeNameFrom(r,t),this.addNameTo(n,t),this.addCommitTo(t,n),this}delete(t){return this.hasName(t)&&(this.removeNameFrom(this.getCommit(t),t),this.commitPerName.delete(t)),this}getCommit(t){return this.commitPerName.get(t)}getNames(t){return this.namesPerCommit.get(t)||[]}getAllNames(){return Array.from(this.commitPerName.keys())}hasCommit(t){return this.namesPerCommit.has(t)}hasName(t){return this.commitPerName.has(t)}removeNameFrom(t,n){const r=this.namesPerCommit.get(t)||[];this.namesPerCommit.set(t,r.filter(s=>s!==n))}addNameTo(t,n){const r=this.namesPerCommit.get(t)||[];this.namesPerCommit.set(t,[...r,n])}addCommitTo(t,n){this.commitPerName.set(t,n)}}Au.Refs=uN;var Lu={};Object.defineProperty(Lu,"__esModule",{value:!0});const fN=sr;class cN{constructor(t,n,r,s,a,u){this.branchesPaths=new Map,this.commits=t,this.branches=n,this.commitSpacing=r,this.isGraphVertical=s,this.isGraphReverse=a,this.createDeletedBranch=u}execute(){return this.fromCommits(),this.withMergeCommits(),this.smoothBranchesPaths()}fromCommits(){this.commits.forEach(t=>{let n=this.branches.get(t.branchToDisplay);n||(n=this.getDeletedBranchInPath()||this.createDeletedBranch());const r=[],s=this.branchesPaths.get(n),a=this.commits.find(({hash:u})=>u===t.parents[0]);s?r.push(...s):a&&r.push({x:a.x,y:a.y}),r.push({x:t.x,y:t.y}),this.branchesPaths.set(n,r)})}withMergeCommits(){this.commits.filter(({parents:n})=>n.length>1).forEach(n=>{const r=this.commits.find(({hash:c})=>c===n.parents[1]);if(!r)return;const s=r.branches?r.branches[0]:"";let a=this.branches.get(s);if(!a&&(a=this.getDeletedBranchInPath(),!a))return;const u=[...this.branchesPaths.get(a)||[]];this.branchesPaths.set(a,[...u,{x:n.x,y:n.y,mergeCommit:!0}])})}getDeletedBranchInPath(){return Array.from(this.branchesPaths.keys()).find(t=>t.isDeleted())}smoothBranchesPaths(){const t=new Map;return this.branchesPaths.forEach((n,r)=>{if(n.length<=1){t.set(r,[n]);return}this.isGraphVertical?n=n.sort((a,u)=>a.y>u.y?-1:1):n=n.sort((a,u)=>a.x>u.x?1:-1),this.isGraphReverse&&(n=n.reverse());const s=n.reduce((a,u,c)=>{if(u.mergeCommit){a[a.length-1].push(fN.pick(u,["x","y"]));let p=c-1,v=n[p];for(;p>=0&&v.mergeCommit;)p--,v=n[p];p>=0&&a.push([v])}else a[a.length-1].push(u);return a},[[]]);this.isGraphReverse&&s.forEach(a=>a.reverse()),this.isGraphVertical?s.forEach(a=>{if(a.length<=1)return;const u=a[0],c=a[a.length-1],p=a[1].x,v=Math.round(Math.abs(u.y-c.y)/this.commitSpacing)-1,m=v>0?new Array(v).fill(0).map((E,F)=>({x:p,y:a[0].y-this.commitSpacing*(F+1)})):[],O=t.get(r)||[];t.set(r,[...O,[u,...m,c]])}):s.forEach(a=>{if(a.length<=1)return;const u=a[0],c=a[a.length-1],p=a[1].y,v=Math.round(Math.abs(u.x-c.x)/this.commitSpacing)-1,m=v>0?new Array(v).fill(0).map((E,F)=>({y:p,x:a[0].x+this.commitSpacing*(F+1)})):[],O=t.get(r)||[];t.set(r,[...O,[u,...m,c]])})}),t}}Lu.BranchesPathsCalculator=cN;function hN(e,t,n){return e.map(r=>"M"+r.map(({x:s,y:a},u,c)=>{if(t&&c.length>1&&(u===1||u===c.length-1)){const p=c[u-1];if(n){const v=(p.y+a)/2;return`C ${p.x} ${v} ${s} ${v} ${s} ${a}`}else{const v=(p.x+s)/2;return`C ${v} ${p.y} ${v} ${a} ${s} ${a}`}}return`L ${s} ${a}`}).join(" ").slice(1)).join(" ")}Lu.toSvgPath=hN;var td={};Object.defineProperty(td,"__esModule",{value:!0});const dN=Ru,pN=Xh(),ww=Au;class mN{constructor(t,n){this._graph=t,this._onGraphUpdate=n}clear(){return this._graph.refs=new ww.Refs,this._graph.tags=new ww.Refs,this._graph.commits=[],this._graph.branches=new Map,this._graph.currentBranch=this._graph.createBranch("master"),this._onGraphUpdate(),this}commit(t){return this._graph.currentBranch.getUserApi().commit(t),this}branch(t){return this._graph.createBranch(t).getUserApi()}tag(...t){let n,r,s,a;if(typeof t[0]=="string"?(n=t[0],r=t[1]):(n=t[0].name,r=t[0].ref,s=t[0].style,a=t[0].render),!r){const c=this._graph.refs.getCommit("HEAD");if(!c)return this;r=c}let u;if(this._graph.refs.hasCommit(r)&&(u=r),this._graph.refs.hasName(r)&&(u=this._graph.refs.getCommit(r)),!u)throw new Error(`The ref "${r}" does not exist`);return this._graph.tags.set(n,u),this._graph.tagStyles[n]=s,this._graph.tagRenders[n]=a,this._onGraphUpdate(),this}import(t){const n=new Error("Only `git2json` format is supported for imported data.");if(!Array.isArray(t)||!t.every(u=>typeof u=="object"&&typeof u.author=="object"&&Array.isArray(u.refs)))throw n;const s=t.map(u=>Object.assign({},u,{style:Object.assign({},this._graph.template.commit,{message:Object.assign({},this._graph.template.commit.message,{display:this._graph.shouldDisplayCommitMessage})}),author:`${u.author.name} <${u.author.email}>`})).reverse();this.clear(),this._graph.commits=s.map(u=>new dN.Commit(u)),s.forEach(({refs:u,hash:c})=>{if(!u||!c)return;const p="tag: ";u.map(m=>m.split(p)).map(([m,O])=>O).filter(m=>typeof m=="string").forEach(m=>this._graph.tags.set(m,c)),u.filter(m=>!m.startsWith(p)).forEach(m=>this._graph.refs.set(m,c))});const a=this._getBranches();return this._graph.commits.map(u=>this._withBranches(a,u)).reduce((u,c)=>(c.branches&&c.branches.forEach(p=>u.add(p)),u),new Set).forEach(u=>this.branch(u)),this._onGraphUpdate(),this}_withBranches(t,n){let r=Array.from((t.get(n.hash)||new Set).values());return r.length===0&&(r=[pN.DELETED_BRANCH_NAME]),n.setBranches(r)}_getBranches(){const t=new Map,n=[];return this._graph.refs.getAllNames().filter(s=>s!=="HEAD").forEach(s=>{const a=this._graph.refs.getCommit(s);for(a&&n.push(a);n.length>0;){const u=n.pop(),c=this._graph.commits.find(({hash:v})=>v===u),p=t.get(u)||new Set;p.add(s),t.set(u,p),c&&c.parents&&c.parents.length>0&&n.push(c.parents[0])}}),t}}td.GitgraphUserApi=mN;Object.defineProperty(Ng,"__esModule",{value:!0});const Kp=Xh(),gN=Jh,vN=Du,_w=Fg,yN=Kh,xw=Au,wN=Lu,sc=sr,Mo=Zh,_N=td;let xN=class{constructor(t={}){this.refs=new xw.Refs,this.tags=new xw.Refs,this.tagStyles={},this.tagRenders={},this.commits=[],this.branches=new Map,this.listeners=[],this.nextTimeoutId=null,this.template=yN.getTemplate(t.template),this.currentBranch=this.createBranch("master"),this.orientation=t.orientation,this.reverseArrow=sc.booleanOptionOr(t.reverseArrow,!1),this.initCommitOffsetX=sc.numberOptionOr(t.initCommitOffsetX,0),this.initCommitOffsetY=sc.numberOptionOr(t.initCommitOffsetY,0),this.mode=t.mode,this.author=t.author||"Sergio Flores ",this.commitMessage=t.commitMessage||"He doesn't like George Michael! Boooo!",this.generateCommitHash=typeof t.generateCommitHash=="function"?t.generateCommitHash:()=>{},this.branchesOrderFunction=typeof t.compareBranchesOrder=="function"?t.compareBranchesOrder:void 0,this.branchLabelOnEveryCommit=sc.booleanOptionOr(t.branchLabelOnEveryCommit,!1)}get isHorizontal(){return this.orientation===Mo.Orientation.Horizontal||this.orientation===Mo.Orientation.HorizontalReverse}get isVertical(){return!this.isHorizontal}get isReverse(){return this.orientation===Mo.Orientation.HorizontalReverse||this.orientation===Mo.Orientation.VerticalReverse}get shouldDisplayCommitMessage(){return!this.isHorizontal&&this.mode!==vN.Mode.Compact}getUserApi(){return new _N.GitgraphUserApi(this,()=>this.next())}subscribe(t){this.listeners.push(t);let n=!0;return()=>{if(!n)return;n=!1;const r=this.listeners.indexOf(t);this.listeners.splice(r,1)}}getRenderedData(){const t=this.computeRenderedCommits(),n=this.computeRenderedBranchesPaths(t),r=this.computeCommitMessagesX(n);return this.computeBranchesColor(t,n),{commits:t,branchesPaths:n,commitMessagesX:r}}createBranch(t){const n="HEAD";let r={gitgraph:this,name:"",parentCommitHash:this.refs.getCommit(n),style:this.template.branch,onGraphUpdate:()=>this.next()};if(typeof t=="string")r.name=t,r.parentCommitHash=this.refs.getCommit(n);else{const a=t.from?t.from.name:n,u=this.refs.getCommit(a)||(this.refs.hasCommit(t.from)?t.from:void 0);t.style=t.style||{},r=Object.assign({},r,t,{parentCommitHash:u,style:Object.assign({},r.style,t.style,{label:Object.assign({},r.style.label,t.style.label)})})}const s=new Kp.Branch(r);return this.branches.set(s.name,s),s}computeRenderedCommits(){const t=this.getBranches(),n=(()=>{const c=new Set(this.commits.reduce((m,{hash:O})=>t.has(O)?m:[...m,O],[])),p=this.commits.reduce((m,O)=>O.parents.length>1?[...m,...O.parents.slice(1).map(E=>this.commits.find(({hash:F})=>E===F))]:m,[]),v=new Set;return p.forEach(m=>{let O=m;for(;O&&c.has(O.hash);)v.add(O.hash),O=O.parents.length>0?this.commits.find(({hash:E})=>O.parents[0]===E):void 0}),v})(),r=this.commits.filter(({hash:c})=>t.has(c)||n.has(c)),s=r.map(c=>this.withBranches(t,c)),a=gN.createGraphRows(this.mode,r),u=new _w.BranchesOrder(s,this.template.colors,this.branchesOrderFunction);return s.map(c=>c.setRefs(this.refs)).map(c=>this.withPosition(a,u,c)).map(c=>c.withDefaultColor(this.getBranchDefaultColor(u,c.branchToDisplay))).map(c=>c.setTags(this.tags,p=>Object.assign({},this.tagStyles[p],this.template.tag),p=>this.tagRenders[p]))}computeRenderedBranchesPaths(t){return new wN.BranchesPathsCalculator(t,this.branches,this.template.commit.spacing,this.isVertical,this.isReverse,()=>Kp.createDeletedBranch(this,this.template.branch,()=>this.next())).execute()}computeBranchesColor(t,n){const r=new _w.BranchesOrder(t,this.template.colors,this.branchesOrderFunction);Array.from(n).forEach(([s])=>{s.computedColor=s.style.color||this.getBranchDefaultColor(r,s.name)})}computeCommitMessagesX(t){return Array.from(t).length*this.template.branch.spacing}withBranches(t,n){let r=Array.from((t.get(n.hash)||new Set).values());return r.length===0&&(r=[Kp.DELETED_BRANCH_NAME]),n.setBranches(r)}getBranches(){const t=new Map,n=[];return this.refs.getAllNames().filter(s=>s!=="HEAD").forEach(s=>{const a=this.refs.getCommit(s);for(a&&n.push(a);n.length>0;){const u=n.pop(),c=this.commits.find(({hash:v})=>v===u),p=t.get(u)||new Set;p.add(s),t.set(u,p),c&&c.parents&&c.parents.length>0&&n.push(c.parents[0])}}),t}withPosition(t,n,r){const s=t.getRowOf(r.hash),a=t.getMaxRow(),u=n.get(r.branchToDisplay);switch(this.orientation){default:return r.setPosition({x:this.initCommitOffsetX+this.template.branch.spacing*u,y:this.initCommitOffsetY+this.template.commit.spacing*(a-s)});case Mo.Orientation.VerticalReverse:return r.setPosition({x:this.initCommitOffsetX+this.template.branch.spacing*u,y:this.initCommitOffsetY+this.template.commit.spacing*s});case Mo.Orientation.Horizontal:return r.setPosition({x:this.initCommitOffsetX+this.template.commit.spacing*s,y:this.initCommitOffsetY+this.template.branch.spacing*u});case Mo.Orientation.HorizontalReverse:return r.setPosition({x:this.initCommitOffsetX+this.template.commit.spacing*(a-s),y:this.initCommitOffsetY+this.template.branch.spacing*u})}}getBranchDefaultColor(t,n){return t.getColorOf(n)}next(){this.nextTimeoutId&&window.clearTimeout(this.nextTimeoutId),this.nextTimeoutId=window.setTimeout(()=>{this.listeners.forEach(t=>t(this.getRenderedData()))},0)}};Ng.GitgraphCore=xN;Object.defineProperty(Yn,"__esModule",{value:!0});var SN=Ng,MN=Yn.GitgraphCore=SN.GitgraphCore,kN=Du,CN=Yn.Mode=kN.Mode,ON=td;Yn.GitgraphUserApi=ON.GitgraphUserApi;var EN=gM();Yn.BranchUserApi=EN.BranchUserApi;var TN=Xh();Yn.Branch=TN.Branch;var bN=Ru;Yn.Commit=bN.Commit;var PN=Qh;Yn.Tag=PN.Tag;var RN=Au;Yn.Refs=RN.Refs;var Ug=Kh,DN=Yn.MergeStyle=Ug.MergeStyle,AN=Yn.TemplateName=Ug.TemplateName,LN=Yn.templateExtend=Ug.templateExtend,jN=Zh,NN=Yn.Orientation=jN.Orientation,IN=Lu,FN=Yn.toSvgPath=IN.toSvgPath,UN=sr,$N=Yn.arrowSvgPath=UN.arrowSvgPath;function WN(e){var t=e.branch,n=e.commit,r=oe.useState({textWidth:0,textHeight:0}),s=r[0],a=r[1],u=oe.useCallback(function(v){if(v){var m=v.getBBox();a({textWidth:m.width,textHeight:m.height})}},[]),c=s.textWidth+2*Ei.paddingX,p=s.textHeight+2*Ei.paddingY;return oe.createElement("g",null,oe.createElement("rect",{stroke:t.style.label.strokeColor||n.style.color,fill:t.style.label.bgColor,rx:t.style.label.borderRadius,width:c,height:p}),oe.createElement("text",{ref:u,fill:t.style.label.color||n.style.color,style:{font:t.style.label.font},alignmentBaseline:"middle",dominantBaseline:"middle",x:Ei.paddingX,y:p/2},t.name))}var Ei=oe.forwardRef(function(e,t){var n=e.branch,r=e.commit,s=e.branchLabelX;if(!n.style.label.display)return null;if(!e.gitgraph.branchLabelOnEveryCommit){var a=e.gitgraph.refs.getCommit(n.name);if(r.hash!==a)return null}if(r.branchToDisplay!==n.name)return null;var u=n.renderLabel?n.renderLabel(n):oe.createElement(WN,{branch:n,commit:r});if(e.gitgraph.isVertical)return oe.createElement("g",{ref:t,transform:"translate("+(s||0)+", 0)"},u);var c=r.style.dot.size*2,p=10,v=c+p;return oe.createElement("g",{ref:t,transform:"translate("+r.x+", "+v+")"},u)});Ei.paddingX=10;Ei.paddingY=5;var BN=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var a in s)s.hasOwnProperty(a)&&(r[a]=s[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Sc=function(e){BN(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.state={textWidth:0},n.$text=oe.createRef(),n}return t.prototype.componentDidMount=function(){this.setState({textWidth:this.$text.current.getBBox().width})},t.prototype.render=function(){if(this.props.commit.renderTooltip)return this.props.commit.renderTooltip(this.props.commit);var n=this.props.commit.style.dot.size*2,r=10,s=t.padding,a=5,u=50,c=r+this.state.textWidth+2*s,p=["M 0,0","L "+r+","+r,"V "+(u/2-a),"Q "+r+","+u/2+" "+(r+a)+","+u/2,"H "+(c-a),"Q "+c+","+u/2+" "+c+","+(u/2-a),"V -"+(u/2-a),"Q "+c+",-"+u/2+" "+(c-a)+",-"+u/2,"H "+(r+a),"Q "+r+",-"+u/2+" "+r+",-"+(u/2-a),"V -"+r,"z"].join(" ");return oe.createElement("g",{transform:"translate("+n+", "+n/2+")"},oe.createElement("path",{d:p,fill:"#EEE"}),oe.createElement("text",{ref:this.$text,x:r+s,y:0,alignmentBaseline:"central",fill:"#333"},this.props.children))},t.padding=10,t}(oe.Component),zN=function(e){var t=e.commit,n=e.onMouseOver,r=e.onMouseOut;return t.renderDot?t.renderDot(t):oe.createElement(oe.Fragment,null,oe.createElement("defs",null,oe.createElement("circle",{id:t.hash,cx:t.style.dot.size,cy:t.style.dot.size,r:t.style.dot.size,fill:t.style.dot.color}),oe.createElement("clipPath",{id:"clip-"+t.hash},oe.createElement("use",{xlinkHref:"#"+t.hash}))),oe.createElement("g",{onClick:t.onClick,onMouseOver:n,onMouseOut:r},oe.createElement("use",{xlinkHref:"#"+t.hash,clipPath:"url(#clip-"+t.hash+")",stroke:t.style.dot.strokeColor,strokeWidth:t.style.dot.strokeWidth&&t.style.dot.strokeWidth*2}),t.dotText&&oe.createElement("text",{alignmentBaseline:"central",textAnchor:"middle",x:t.style.dot.size,y:t.style.dot.size,style:{font:t.style.dot.font}},t.dotText)))},HN=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var a in s)s.hasOwnProperty(a)&&(r[a]=s[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),YN=function(e){HN(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(){var n=this,r=this.props.commits.find(function(a){var u=a.hash;return u===n.props.parentHash});if(!r)return null;var s=this.props.gitgraph.reverseArrow?{x:this.props.commitRadius+(r.x-this.props.commit.x),y:this.props.commitRadius+(r.y-this.props.commit.y)}:{x:this.props.commitRadius,y:this.props.commitRadius};return oe.createElement("g",{transform:"translate("+s.x+", "+s.y+")"},oe.createElement("path",{d:$N(this.props.gitgraph,r,this.props.commit),fill:this.props.gitgraph.template.arrow.color}))},t}(oe.Component),GN=oe.forwardRef(function(e,t){var n=e.commit,r=e.messageX;if(n.renderMessage)return oe.createElement("g",{ref:t,transform:"translate("+r+", 0)"},n.renderMessage(n));var s=null;n.body&&(s=oe.createElement("foreignObject",{width:"600",x:"10"},oe.createElement("p",null,n.body)));var a=n.style.dot.size;return oe.createElement("g",{ref:t,transform:"translate("+r+", "+a+")"},oe.createElement("text",{alignmentBaseline:"central",fill:n.style.message.color,style:{font:n.style.message.font},onClick:n.onMessageClick},n.message),s)}),i0=10,VN=5;function qN(e){var t=oe.useState({textWidth:0,textHeight:0}),n=t[0],r=t[1],s=oe.useRef(null);oe.useEffect(function(){var O=s.current.getBBox();r({textWidth:O.width,textHeight:O.height})},[]);var a=e.tag,u=a.style.pointerWidth,c=a.style.borderRadius,p=u+n.textWidth+2*i0,v=n.textHeight+2*VN,m=["M 0,0","L "+u+","+v/2,"V "+v/2,"Q "+u+","+v/2+" "+(u+c)+","+v/2,"H "+(p-c),"Q "+p+","+v/2+" "+p+","+(v/2-c),"V "+-(v/2-c),"Q "+p+",-"+v/2+" "+(p-c)+",-"+v/2,"H "+(u+c),"Q "+u+",-"+v/2+" "+u+",-"+v/2,"V -"+v/2,"z"].join(" ");return oe.createElement("g",null,oe.createElement("path",{d:m,fill:a.style.bgColor,stroke:a.style.strokeColor}),oe.createElement("text",{ref:s,fill:a.style.color,style:{font:a.style.font},alignmentBaseline:"middle",dominantBaseline:"middle",x:u+i0,y:0},a.name))}var QN=oe.forwardRef(function(e,t){var n=e.tag,r=e.commit,s=e.tagX;return oe.createElement("g",{ref:t,transform:"translate("+(s||0)+", "+r.style.dot.size+")"},n.render?n.render(n.name,n.style):oe.createElement(qN,{tag:n}))}),KN=function(e){var t=e.commit,n=e.commits,r=e.gitgraph,s=e.commitMessagesX,a=oe.useRef(),u=oe.useRef([]),c=oe.useRef(),p=oe.useState(0),v=p[0],m=p[1],O=oe.useState([]),E=O[0],F=O[1],B=oe.useState(0),K=B[0],me=B[1],N=oe.useMemo(function(){if(!r.template.arrow.size)return null;var J=t.style.dot.size;return t.parents.map(function(le){return oe.createElement(YN,{key:le,commits:n,commit:t,gitgraph:r,parentHash:le,commitRadius:J})})},[n,t,r]),A=oe.useMemo(function(){var J=Array.from(r.branches.values());return J.map(function(le){return oe.createElement(Ei,{key:le.name,gitgraph:r,branch:le,commit:t,ref:a,branchLabelX:v})})},[r,t,v]),I=oe.useMemo(function(){return u.current=[],!t.tags||r.isHorizontal?null:t.tags.map(function(J,le){return oe.createElement(QN,{key:t.hashAbbrev+"-"+J.name,commit:t,tag:J,ref:function(fe){return u.current[le]=fe},tagX:E[le]||0})})},[t,r,E]),H=e.getWithCommitOffset(t),X=H.x,te=H.y;oe.useLayoutEffect(function(){if(!r.isHorizontal){var J=10,le=s;if(a.current){m(le);var fe=a.current.getBBox().width+Ei.paddingX;le+=fe+J}var P=u.current.map(function(f){if(!f)return 0;var g=le,S=f.getBBox().width+i0;return le+=S+J,g});F(P),c.current&&me(le)}},[u,r,s]);var V=e.currentCommitOver===t&&(e.gitgraph.isHorizontal||e.gitgraph.mode===CN.Compact&&t.style.hasTooltipInCompactMode);return V&&e.setTooltip(oe.createElement("g",{transform:"translate("+X+", "+te+")"},oe.createElement(Sc,{commit:t},t.hashAbbrev," - ",t.subject))),oe.createElement("g",{transform:"translate("+X+", "+te+")"},oe.createElement(zN,{commit:t,onMouseOver:function(){e.setCurrentCommitOver(t),t.onMouseOver()},onMouseOut:function(){e.setCurrentCommitOver(null),e.setTooltip(null),t.onMouseOut()}}),N,oe.createElement("g",{transform:"translate("+-X+", 0)"},t.style.message.display&&oe.createElement(GN,{commit:t,ref:c,messageX:K}),A,I))},ZN=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var a in s)s.hasOwnProperty(a)&&(r[a]=s[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),XN=function(e){ZN(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(){var n=this;return oe.createElement("path",{d:FN(this.props.coordinates.map(function(r){return r.map(function(s){return n.props.getWithCommitOffset(s)})}),this.props.isBezier,this.props.gitgraph.isVertical),fill:"none",stroke:this.props.branch.computedColor,strokeWidth:this.props.branch.style.lineWidth,transform:"translate("+this.props.offset+", "+this.props.offset+")"})},t}(oe.Component),JN=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var a in s)s.hasOwnProperty(a)&&(r[a]=s[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();function Sw(e){return"graph"in e}var e4=function(e){JN(t,e);function t(n){var r=e.call(this,n)||this;return r.$graph=oe.createRef(),r.$commits=oe.createRef(),r.$tooltip=null,r.state={commits:[],branchesPaths:new Map,commitMessagesX:0,commitYWithOffsets:{},shouldRecomputeOffsets:!0,currentCommitOver:null},r.gitgraph=Sw(n)?n.graph:new MN(n.options),r.gitgraph.subscribe(function(s){var a=s.commits,u=s.branchesPaths,c=s.commitMessagesX;r.setState({commits:a,branchesPaths:u,commitMessagesX:c,shouldRecomputeOffsets:!0})}),r}return t.prototype.render=function(){var n=this;return oe.createElement("svg",{ref:this.$graph},oe.createElement("g",{transform:"translate("+Ei.paddingX+", "+Sc.padding+")"},this.renderBranchesPaths(),oe.createElement("g",{ref:this.$commits},this.state.commits.map(function(r){return oe.createElement(KN,{key:r.hash,commits:n.state.commits,commit:r,currentCommitOver:n.state.currentCommitOver,setCurrentCommitOver:n.setCurrentCommitOver.bind(n),gitgraph:n.gitgraph,getWithCommitOffset:n.getWithCommitOffset.bind(n),setTooltip:n.setTooltip.bind(n),commitMessagesX:n.state.commitMessagesX})})),this.$tooltip))},t.prototype.componentDidMount=function(){Sw(this.props)||this.props.children(this.gitgraph.getUserApi())},t.prototype.componentDidUpdate=function(){if(this.$graph.current){var n=this.$graph.current.getBBox(),r=n.height,s=n.width;this.$graph.current.setAttribute("width",(s+Sc.padding+Ei.paddingX).toString()),this.$graph.current.setAttribute("height",(r+Sc.padding+Ei.paddingY).toString())}if(this.state.shouldRecomputeOffsets&&this.$commits.current){var a=Array.from(this.$commits.current.children);this.setState({commitYWithOffsets:this.computeOffsets(a),shouldRecomputeOffsets:!1})}},t.prototype.setCurrentCommitOver=function(n){this.setState({currentCommitOver:n})},t.prototype.setTooltip=function(n){this.$tooltip=n},t.prototype.renderBranchesPaths=function(){var n=this,r=this.gitgraph.template.commit.dot.size,s=this.gitgraph.template.branch.mergeStyle===DN.Bezier;return Array.from(this.state.branchesPaths).map(function(a){var u=a[0],c=a[1];return oe.createElement(XN,{key:u.name,gitgraph:n.gitgraph,branch:u,coordinates:c,getWithCommitOffset:n.getWithCommitOffset.bind(n),isBezier:s,offset:r})})},t.prototype.computeOffsets=function(n){var r=0,s=this.gitgraph.orientation===NN.VerticalReverse?n:n.reverse();return s.reduce(function(a,u){var c=parseInt(u.getAttribute("transform").split(",")[1].slice(0,-1),10),p=u.getElementsByTagName("foreignObject")[0],v=p&&p.firstElementChild,m=0;if(v){var O=v.getBoundingClientRect().height,E=window.getComputedStyle(v).marginTop||"0px",F=parseInt(E.replace("px",""),10);m=O+F}return p&&p.setAttribute("height",m+"px"),a[c]=c+r,r+=m,a},{})},t.prototype.getWithCommitOffset=function(n){var r=n.x,s=n.y;return{x:r,y:this.state.commitYWithOffsets[s]||s}},t.defaultProps={options:{}},t}(oe.Component);class t4 extends oe.Component{constructor(t){super(t),this.clickety=this.clickety.bind(this),this.clickCommit=this.clickCommit.bind(this),this.submit=this.submit.bind(this),this.graph=this.graph.bind(this),this.template=LN(AN.Metro,{branch:{lineWidth:6},commit:{spacing:40,dot:{size:10},message:{displayHash:!1,displayAuthor:!1,font:"normal 16pt monospace"}}})}componentDidMount(){api.getCommits()}clickety(){let{commits:t,gitgraph:n}=this.props;if(!t.commits)return;let r={};t.commits.forEach(a=>{r[a.commitHash]=a});let s=t.commits.map(a=>{console.log(a.commitHash,t.head);let u=[];return a.commitHash in t.head&&(u=["HEAD",t.head[a.commitHash]]),{refs:u,hash:a.commitHash.slice(2),parents:a.parents.map(c=>c.slice(2)),onMessageClick:this.clickCommit,subject:"commit: "+a.commitHash.slice(-5)+", content: "+a.contentHash.slice(-5)+", parents: "+a.parents.map(c=>c.slice(-5)),author:{name:"me",email:"me",timestamp:15e11}}});n.import(s)}clickCommit(t,n){console.log("click",t);let r=t.refs.slice(-1)[0];if(r)this.bobDesk.value==""?this.bobDesk.value=r:this.aliDesk.value=r;else return}submit(){api.pottery({ali:this.aliDesk.value,bob:this.bobDesk.value,germ:this.germ.value})}graph(t){this.setState({gitgraph:t})}render(){let t="f7 mono ba bg-gray0-d white-d pa3 mb2 db focus-b--black focus-b--white-d b--gray3 b--gray2-d nowrap ";return y.Fragment,this.submit,this.clickety(),y.jsx("div",{className:"cf w-100 flex flex-column pa4 ba-m ba-l ba-xl b--gray2 br1 h-100 h-100-minus-40-m h-100-minus-40-l h-100-minus-40-xl f9 white-d",children:y.jsx(e4,{options:{template:this.template},children:this.graph})})}}class n4 extends oe.Component{constructor(t){super(t),this.state={},this.loadBindings=this.loadBindings.bind(this),this.loadCache=this.loadCache.bind(this),this.loadConnections=this.loadConnections.bind(this),this.loadAuthenticationState=this.loadAuthenticationState.bind(this),this.loadChannels=this.loadChannels.bind(this)}componentDidMount(){const{props:t}=this;t.bindings.length===0&&this.loadBindings(),t.cache.length===0&&this.loadCache(),t.connections.length==0&&this.loadConnections(),t.authentication.sessions.length==0&&this.loadAuthenticationState(),t.channels.length==0&&this.loadChannels()}componentDidUpdate(t,n){}loadBindings(){api.getBindings()}loadCache(){api.getCache()}clearCache(t){api.clearCache(t)}loadConnections(){api.getConnections()}loadAuthenticationState(){api.getAuthenticationState()}loadChannels(){api.getChannels()}render(){const{props:t,state:n}=this,r=t.bindings.map(m=>({key:m.location+" "+m.action,jsx:y.jsxs("div",{class:"flex",children:[y.jsx("div",{class:"flex-auto",style:{maxWidth:"50%"},children:m.location}),y.jsx("div",{class:"flex-auto",style:{maxWidth:"50%"},children:m.action})]})})),s=t.cache.map(m=>({key:m.url+" "+(m.val?"LIVE":"CLEARED"),jsx:y.jsxs("div",{class:"flex",style:{marginBottom:"3px"},children:[y.jsx("div",{style:{width:"45%"},children:m.url}),y.jsxs("div",{style:{width:"5%"},children:["(v",m.aeon,")"]}),m.val?y.jsxs("div",{style:{width:"50%",position:"relative"},children:[y.jsx("div",{style:{display:"inline-block",width:"10%"},children:m.val.auth?"auth":"free"}),y.jsx("div",{style:{display:"inline-block",width:"10%"},children:m.val.payload.status}),y.jsx("div",{style:{display:"inline-block",width:"50%"},children:m.val.payload.headers.reduce((O,E)=>(O?O+"; ":"")+E.key+"="+E.value,"")}),y.jsx("div",{style:{display:"inline-block",width:"25%"},children:m.val.payload.data?m.val.payload.data.toLocaleString("de-DE")+" bytes":"no data"}),y.jsx("div",{style:{display:"inline-block",width:"5%"},children:y.jsx("button",{onClick:()=>{this.clearCache(m.url)},children:"clear"})})]}):"cleared"]})})),a=t.connections.map(m=>({key:m.duct+" "+m.action,jsx:y.jsx("table",{style:{borderBottom:"1px solid black"},children:y.jsxs("tbody",{children:[y.jsxs("tr",{children:[y.jsx("td",{class:"inter",children:"duct"}),y.jsx("td",{children:m.duct})]}),y.jsxs("tr",{children:[y.jsx("td",{class:"inter",children:"binding"}),y.jsx("td",{children:m.action})]}),y.jsxs("tr",{children:[y.jsx("td",{class:"inter",children:"request"}),y.jsxs("td",{children:["from ",m.request.source,",",m.request.authenticated?" ":" un","authenticated and",m.request.secure?" ":" in","secure"]})]}),y.jsxs("tr",{children:[y.jsx("td",{class:"inter",children:"response"}),y.jsxs("td",{children:["sent ",m.response.sent," bytes.",y.jsx("br",{}),m.response.header?y.jsxs(y.Fragment,{children:["status ",m.response.header["status-code"],y.jsx("br",{}),m.response.header.headers.reduce((O,E)=>O+E+", ","")]}):null]})]})]})})})),u=t.channels.map(m=>{const O=y.jsxs(y.Fragment,{children:[m.session,y.jsx("table",{style:{borderBottom:"1px solid black"},children:y.jsxs("tbody",{children:[y.jsxs("tr",{children:[y.jsx("td",{class:"inter",children:"identity"}),y.jsx("td",{children:m.identity})]}),y.jsxs("tr",{children:[y.jsx("td",{class:"inter",children:"connected?"}),y.jsx("td",{children:m.connected?"connected":"disconnected, expires "+mr(m.expiry)})]}),y.jsxs("tr",{children:[y.jsx("td",{class:"inter",children:"next-id"}),y.jsx("td",{children:m["next-id"]})]}),y.jsxs("tr",{children:[y.jsx("td",{class:"inter",children:"last-ack"}),y.jsx("td",{children:mr(m["last-ack"])})]}),y.jsxs("tr",{children:[y.jsx("td",{class:"inter",children:"unacked"}),y.jsx("td",{children:m.unacked.reduce((F,B)=>F+B+", ","")})]})]})})]}),E=m.subscriptions.map(F=>({key:`${F.id} ${F.ship} ${F.app} ${F.path}`,jsx:y.jsxs("div",{class:"flex",children:[y.jsx("div",{class:"flex-auto",style:{maxWidth:"15%"},children:F.id}),y.jsxs("div",{class:"flex-auto",style:{maxWidth:"15%"},children:["~",F.ship]}),y.jsx("div",{class:"flex-auto",style:{maxWidth:"20%"},children:F.app}),y.jsx("div",{class:"flex-auto",style:{maxWidth:"35%"},children:F.path}),y.jsx("div",{class:"flex-auto",style:{maxWidth:"15%"},children:F.unacked})]})}));return{key:m.session,jsx:y.jsx(Oo,{summary:O,details:y.jsx(Gt,{placeholder:"id, ship, app, path",items:E})})}}),c=t.authentication.sessions.map(m=>({key:m.identity,jsx:y.jsxs("div",{class:"flex",children:[y.jsxs("div",{class:"flex-auto",style:{maxWidth:"5em"},children:[m.cookie.slice(0,6),"…"]}),y.jsxs("div",{class:"flex-auto",style:{width:"40%"},children:["~",m.identity]}),y.jsx("div",{class:"flex-auto",children:mr(m.expiry)}),y.jsxs("div",{class:"flex-auto",children:[m.channels," channel(s)"]}),y.jsx("div",{class:"flex-auto",children:y.jsxs("form",{method:"post",action:"/~/logout?redirect=/~debug/eyre",children:[y.jsx("input",{type:"hidden",name:"sid",value:m.cookie}),y.jsx("button",{type:"submit",name:"all",children:"kick"})]})})]})})),p=t.authentication.visiting.map(m=>({key:"~"+m.who+":"+m.nonce,jsx:y.jsxs("div",{class:"flex",children:[y.jsxs("div",{class:"flex-auto",children:["~",m.who]}),y.jsx("div",{class:"flex-auto",children:m.nonce}),y.jsx("div",{class:"flex-auto",children:m.goal?"pending, will return to "+m.goal:y.jsxs("form",{method:"post",action:"/~/logout?redirect=/~debug/eyre",children:["logged in since ",mr(m.made),y.jsx("input",{type:"hidden",name:"host",value:"~"+m.who}),y.jsx("input",{type:"hidden",name:"sid",value:m.nonce}),y.jsx("button",{type:"submit",name:"eauth",children:"log out"})]})})]})})),v=t.authentication.visitors.map(m=>({key:m.nonce+":~"+m.ship,jsx:y.jsxs("div",{class:"flex",children:[y.jsx("div",{class:"flex-auto",children:m.nonce}),y.jsx("div",{class:"flex-auto",children:m.duct}),m.sesh?y.jsxs("div",{class:"flex-auto",children:["session: ",m.sesh.slice(0,6),"…"]}):y.jsxs(y.Fragment,{children:[y.jsx("div",{class:"flex-auto",children:m.pend?"request pending":"no pending request"}),y.jsx("div",{class:"flex-auto",children:m.ship}),y.jsxs("div",{class:"flex-auto",children:["redirect: ",m.last]}),y.jsx("div",{class:"flex-auto",children:m.toke?"token received":"no token yet"})]})]})}));return y.jsxs(y.Fragment,{children:[y.jsx("h4",{children:"Bindings"}),y.jsx(Gt,{placeholder:"binding",items:r,children:y.jsx("button",{onClick:this.loadBindings,children:"refresh"})}),y.jsx("h4",{children:"Cache"}),t.cache.reduce((m,O)=>m+(O.val&&O.val.payload.data||0),0).toLocaleString("de-DE")," bytes in cache",y.jsx(Gt,{placeholder:"cache url, LIVE vs CLEARED",items:s,open:!1,children:y.jsx("button",{onClick:this.loadCache,children:"refresh"})}),y.jsx("h4",{children:"Connections"}),y.jsx(Gt,{placeholder:"duct, binding",items:a,children:y.jsx("button",{onClick:this.loadConnections,children:"refresh"})}),y.jsx("h4",{children:"Channels"}),y.jsx(Gt,{placeholder:"session id",items:u,children:y.jsx("button",{onClick:this.loadChannels,children:"refresh"})}),y.jsx("h4",{children:"Authentication"}),y.jsx("form",{method:"post",action:"/~/logout",children:y.jsx("button",{type:"submit",children:"logout self"})}),y.jsx("form",{method:"post",action:"/~/logout",children:y.jsx("button",{type:"submit",name:"all",children:"logout all selves"})}),y.jsx("br",{}),y.jsx("button",{onClick:this.loadAuthenticationState,children:"refresh"}),y.jsx("h3",{children:"Sessions"}),y.jsx(Gt,{placeholder:"identity",items:c,open:!1}),y.jsx("h3",{children:"Outgoing eauth"}),y.jsx(Gt,{placeholder:"host",items:p}),y.jsx("h3",{children:"Incoming eauth"}),y.jsx(Gt,{placeholder:"visitor",items:v})]})}}class r4 extends oe.Component{constructor(t){super(t),this.state=qe.state,qe.setStateHandler(this.setState.bind(this))}componentDidMount(){new Image().src="/~debug/img/Spinner.png"}render(){const{state:t}=this;return y.jsx(_3,{children:y.jsxs(w3,{children:[y.jsx(Cs,{exact:!0,path:"/~debug",render:n=>y.jsx(Os,{status:t.status,selected:"",children:y.jsx(Aj,{text:"select a component on the left"})})}),y.jsx(Cs,{exact:!0,path:Es("apps"),render:n=>y.jsx(Os,{status:t.status,selected:"apps",children:y.jsx(N6,{apps:t.apps,...n})})}),y.jsx(Cs,{exact:!0,path:Es("logs"),render:n=>y.jsx(Os,{status:t.status,selected:"logs",children:y.jsx($6,{logs:t.logs,...n})})}),y.jsx(Cs,{exact:!0,path:Es("spider"),render:n=>y.jsx(Os,{status:t.status,selected:"spider",children:y.jsx(W6,{threads:t.threads,...n})})}),y.jsx(Cs,{exact:!0,path:Es("ames"),render:n=>y.jsx(Os,{status:t.status,selected:"ames",children:y.jsx(B6,{peers:t.peers,...n})})}),y.jsx(Cs,{exact:!0,path:Es("behn"),render:n=>y.jsx(Os,{status:t.status,selected:"behn",children:y.jsx(z6,{timers:t.timers,...n})})}),y.jsx(Cs,{exact:!0,path:Es("clay"),render:n=>y.jsx(Os,{status:t.status,selected:"clay",children:y.jsx(t4,{commits:t.commits,...n})})}),y.jsx(Cs,{exact:!0,path:Es("eyre"),render:n=>y.jsx(Os,{status:t.status,selected:"eyre",children:y.jsx(n4,{bindings:t.bindings,cache:t.cache,connections:t.connections,authentication:t.authentication,channels:t.channels,...n})})})]})})}}Pg.setAuthTokens({ship:window.ship});console.log("new world!");window.urb=new window.channel;Rj.start();MR.render(y.jsx(r4,{}),document.querySelectorAll("#root")[0]);export{s4 as F,hM as _,o4 as a}; + `;break}m=m+""}}const O=(r.now-a)/c*98;return y.jsx("div",{className:"event"+(v?" focus":"")+(O>50?" right":""),onClick:()=>this.clickEvent(p),style:{left:O+"%",top:s%18*5+"%"},children:y.jsx("div",{className:"details"+(r.effects.length>0?" effects":""),onClick:E=>E.stopPropagation(),dangerouslySetInnerHTML:{__html:m}})})}renderCauseRow(n){return y.jsxs("div",{className:"cause",children:[y.jsx("div",{className:"legend",children:n.kind}),...n.events]})}renderCauses(n,r){const s=this.view.oldest||qe.state.logsRange.oldest,a=this.view.newest||qe.state.logsRange.newest;console.log("oldest, newest",s,a);let u={};for(const c of r){if(c.nowa)continue;const p=c.kind;console.log("vent kind",p);const v=u[p]||{kind:p,events:[]},m=this.renderEvent(n,c,v.events.length);v.events.push(m),u[p]=v}return Object.values(u).map(this.renderCauseRow)}renderLogs(n){const r=[];for(const[s,a]of Object.entries(n))r.push(y.jsxs("div",{className:"agent",children:[y.jsx("h3",{children:s}),this.renderCauses(s,a.logs)]}));return r}render(){return y.jsxs(y.Fragment,{children:[y.jsx("button",{onClick:this.loadLogs,children:"load logs"})," ",y.jsx("button",{onClick:this.clearLogs,children:"clear logs"}),y.jsx("br",{}),y.jsx("br",{}),Object.keys(qe.state.logs).length===0?"no logs yet. turn on verb+ for an app in the apps tab, or import log-viewer files.":[this.renderViewControls(),this.renderLogs(qe.state.logs)]]})}}class W6 extends oe.Component{constructor(t){super(t),this.state={},this.loadThreads=this.loadThreads.bind(this),this.renderThreads=this.renderThreads.bind(this),this.killThread=this.killThread.bind(this)}componentDidMount(){const{threads:t}=this.props;Object.keys(t).length===0&&this.loadThreads()}componentDidUpdate(t,n){}loadThreads(){api.getThreads()}killThread(t){api.killThread(t)}renderThreads(t){return Object.keys(t).map(n=>{const r=this.renderThreads(t[n]);return y.jsxs(y.Fragment,{children:[y.jsxs("div",{children:[y.jsx("button",{style:{margin:"4px"},onClick:()=>{this.killThread(n)},children:"kill"}),n]}),y.jsx("div",{style:{paddingLeft:"16px"},children:r})]})})}render(){return y.jsxs(y.Fragment,{children:[y.jsx("button",{onClick:this.loadThreads,children:"refresh"}),y.jsx("br",{}),Object.keys(this.props.threads).length===0?"no running threads":this.renderThreads(this.props.threads)]})}}class B6 extends oe.Component{constructor(t){super(t),this.loadPeers=this.loadPeers.bind(this),this.loadPeerDetails=this.loadPeerDetails.bind(this),this.renderFlow=this.renderFlow.bind(this),this.renderScry=this.renderScry.bind(this)}componentDidMount(){const{known:t,alien:n}=this.props.peers;t.length===0&&n.length===0&&this.loadPeers()}componentDidUpdate(t,n){}loadPeers(){api.getPeers()}loadPeerDetails(t){api.getPeer(t)}renderPaths(t){const n=t.map(r=>({key:r,jsx:r}));return y.jsx(qt,{placeholder:"path",items:n})}renderSnd(t){const n=t["unsent-messages"].reduce((F,B)=>F+B+" bytes, ","unsent msg sizes: "),r=t["queued-message-acks"].map(F=>({key:F["message-num"],jsx:F["message-num"]+": "+F.ack})),s=y.jsx(qt,{placeholder:"msg num",items:r}),a=t["packet-pump-state"].metrics,u=y.jsx(y.Fragment,{children:y.jsx("table",{children:y.jsxs("tbody",{children:[y.jsxs("tr",{class:"inter",children:[y.jsx("td",{children:"rto"}),y.jsx("td",{children:"rtt"}),y.jsx("td",{children:"rttvar"}),y.jsx("td",{children:"ssthresh"}),y.jsx("td",{children:"num-live"}),y.jsx("td",{children:"cwnd"}),y.jsx("td",{children:"counter"})]}),y.jsxs("tr",{children:[y.jsx("td",{children:a.rto}),y.jsx("td",{children:a.rtt}),y.jsx("td",{children:a.rttvar}),y.jsx("td",{children:a.ssthresh}),y.jsx("td",{children:a["num-live"]}),y.jsx("td",{children:a.cwnd}),y.jsx("td",{children:a.counter})]})]})})}),c=t["packet-pump-state"].live.map(F=>({key:F["message-num"]+","+F["fragment-num"],jsx:y.jsx("table",{children:y.jsxs("tbody",{children:[y.jsxs("tr",{children:[y.jsx("td",{children:"message-num"}),y.jsx("td",{children:"fragment-num"}),y.jsx("td",{children:"num-fragments"}),y.jsx("td",{children:"last-sent"}),y.jsx("td",{children:"tries"}),y.jsx("td",{children:"skips"})]}),y.jsxs("tr",{children:[y.jsx("td",{children:F["message-num"]}),y.jsx("td",{children:F["fragment-num"]}),y.jsx("td",{children:F["num-fragments"]}),y.jsx("td",{children:mr(F["last-sent"])}),y.jsx("td",{children:F.tries}),y.jsx("td",{children:F.skips})]})]})})})),p=y.jsx(qt,{placeholder:"msg-num,frag-num",items:c}),v=y.jsxs(y.Fragment,{children:[y.jsx("b",{children:"snd"}),y.jsx("br",{}),bs(t.duct),y.jsx("table",{children:y.jsxs("tbody",{children:[y.jsxs("tr",{class:"inter",children:[y.jsx("td",{children:"bone"}),y.jsx("td",{children:"current"}),y.jsx("td",{children:"next"}),y.jsx("td",{children:"next wake"}),y.jsx("td",{children:"total unsent"})]}),y.jsxs("tr",{children:[y.jsx("td",{children:t.bone}),y.jsx("td",{children:t.current}),y.jsx("td",{children:t.next}),y.jsx("td",{children:mr(t["packet-pump-state"]["next-wake"])}),y.jsxs("td",{children:[t["unsent-messages"].reduce((F,B)=>F+B,0)," bytes (",t["unsent-messages"].length," messages)"]})]})]})})]}),m=y.jsxs(y.Fragment,{children:[u,n,s,p]}),O=t["unsent-messages"].length>0||t["packet-pump-state"].live.length>0?"active, ":"",E=t.closing?"lightyellow":t.corked?"lightred":"transparent";return{key:"snd "+O+t.bone+", "+bs(t.duct),jsx:y.jsx("div",{style:{backgroundColor:E},children:y.jsx(Oo,{summary:v,details:m})})}}renderRcv(t){const n=t["pending-vane-ack"].reduce((v,m)=>v+m+", ","pending vane acks: "),r=t.nax.reduce((v,m)=>v+m+", ","nacks: "),s=t["live-messages"].map(v=>({key:v["message-num"],jsx:y.jsxs(y.Fragment,{children:["Message #",v["message-num"],y.jsx("br",{}),v["num-received"]," out of ",v["num-fragments"]," fragments received:",y.jsx("br",{}),v.fragments.reduce((m,O)=>m+O+", ","")]})})),a=y.jsxs(y.Fragment,{children:["Live messages:",y.jsx("br",{}),y.jsx(qt,{placeholder:"message num",items:s})]}),u=y.jsxs(y.Fragment,{children:[y.jsx("b",{children:"rcv"}),y.jsx("br",{}),bs(t.duct),y.jsx("table",{children:y.jsxs("tbody",{children:[y.jsxs("tr",{children:[y.jsx("td",{children:"bone"}),y.jsx("td",{children:"last-acked"}),y.jsx("td",{children:"last-heard"})]}),y.jsxs("tr",{children:[y.jsx("td",{children:t.bone}),y.jsx("td",{children:t["last-acked"]}),y.jsx("td",{children:t["last-heard"]})]})]})})]}),c=y.jsxs(y.Fragment,{children:[n,y.jsx("br",{}),r,y.jsx("br",{}),a]}),p=t.closing?"ligthyellow":t.corked?"lightred":"transparent";return{key:"rcv "+t.bone+", "+bs(t.duct),jsx:y.jsx("div",{style:{backgroundColor:p},children:y.jsx(Oo,{summary:u,details:c})})}}renderFlow(t){return t.snd?this.renderSnd(t.snd):t.rcv?this.renderRcv(t.rcv):(console.log("weird flow",t),"weird flow")}renderScry(t){const n=t["keen-state"].metrics,r=y.jsx(y.Fragment,{children:y.jsx("table",{children:y.jsxs("tbody",{children:[y.jsxs("tr",{class:"inter",children:[y.jsx("td",{children:"rto"}),y.jsx("td",{children:"rtt"}),y.jsx("td",{children:"rttvar"}),y.jsx("td",{children:"ssthresh"}),y.jsx("td",{children:"cwnd"}),y.jsx("td",{children:"counter"})]}),y.jsxs("tr",{children:[y.jsx("td",{children:n.rto}),y.jsx("td",{children:n.rtt}),y.jsx("td",{children:n.rttvar}),y.jsx("td",{children:n.ssthresh}),y.jsx("td",{children:n.cwnd}),y.jsx("td",{children:n.counter})]})]})})}),s=t["keen-state"].wan.map(p=>({key:p.frag,jsx:y.jsx("table",{children:y.jsxs("tbody",{children:[y.jsxs("tr",{children:[y.jsx("td",{children:"fragment"}),y.jsx("td",{children:"size"}),y.jsx("td",{children:"last-sent"}),y.jsx("td",{children:"tries"}),y.jsx("td",{children:"skips"})]}),y.jsxs("tr",{children:[y.jsx("td",{children:p.frag}),y.jsx("td",{children:p.size}),y.jsx("td",{children:mr(p["last-sent"])}),y.jsx("td",{children:p.tries}),y.jsx("td",{children:p.skips})]})]})})})),a=y.jsx(qt,{placeholder:"fragment",items:s}),u=y.jsxs(y.Fragment,{children:[y.jsx("b",{children:t["scry-path"]}),y.jsx("br",{}),y.jsx("h5",{style:{marginTop:"1em"},children:"listeners:"}),bs(t["keen-state"].listeners),y.jsx("h5",{style:{marginTop:"1em"},children:"scry state:"}),y.jsx("table",{children:y.jsxs("tbody",{children:[y.jsxs("tr",{class:"inter",children:[y.jsx("td",{children:"num-fragments"}),y.jsx("td",{children:"num-received"}),y.jsx("td",{children:"next-wake"})]}),y.jsxs("tr",{children:[y.jsx("td",{children:t["keen-state"]["num-fragments"]}),y.jsx("td",{children:t["keen-state"]["num-received"]}),y.jsx("td",{children:mr(t["keen-state"]["next-wake"])})]})]})})]}),c=y.jsxs(y.Fragment,{children:[r,a]});return{key:t["scry-path"],jsx:y.jsx(Oo,{summary:u,details:c})}}render(){const{props:t,state:n}=this,{known:r,alien:s,deets:a}=t.peers,u=m=>{const O=a[m];if(O){if(O.alien)return y.jsxs(y.Fragment,{children:["Pending messages: ",O.alien.messages,"Pending packets: ",O.alien.packets,"Keens: ",this.renderPaths(O.alien.keens)]});if(O.known){const E=O.known,F=y.jsxs(y.Fragment,{children:[y.jsx("h4",{style:{marginTop:"1em"},children:"status"}),y.jsx("table",{children:y.jsxs("tbody",{children:[y.jsxs("tr",{children:[y.jsx("td",{class:"inter",children:"Life"}),y.jsx("td",{children:E.life})]}),y.jsxs("tr",{children:[y.jsx("td",{class:"inter",children:"Route"}),y.jsx("td",{children:E.route?`${E.route.direct?"":"in"}direct, on lane ${E.route.lane}`:"none"})]}),y.jsxs("tr",{children:[y.jsx("td",{class:"inter",children:"QoS"}),y.jsxs("td",{children:[E.qos.kind,", last contact ",mr(E.qos["last-contact"])]})]}),y.jsxs("tr",{children:[y.jsx("td",{class:"inter",children:"Bones "}),y.jsxs("td",{children:["closing: ",E.closing.length,", corked: ",E.corked.length]})]})]})})]}),B=E.flows.forward.map(this.renderFlow),Q=y.jsxs(y.Fragment,{children:[y.jsx("h4",{style:{marginTop:"1em"},children:"forward"}),y.jsx(qt,{placeholder:"bone, duct",items:B})]}),me=E.flows.backward.map(this.renderFlow),N=y.jsxs(y.Fragment,{children:[y.jsx("h4",{style:{marginTop:"1em"},children:"backward"}),y.jsx(qt,{placeholder:"bone, duct",items:me})]}),A=E.nax.map(te=>({key:te.bone,jsx:y.jsxs("div",{children:["bone ",te.bone,", message #",te["message-num"],", duct:",y.jsx("br",{}),bs(te.duct)]})})),I=y.jsxs(y.Fragment,{children:[y.jsx("h4",{style:{marginTop:"1em"},children:"nax"}),y.jsx(qt,{placeholder:"bone",items:A})]}),H=E.scries.map(this.renderScry),X=y.jsxs(y.Fragment,{children:[y.jsx("h4",{style:{marginTop:"1em"},children:"scries"}),y.jsx(qt,{placeholder:"path",items:H})]});return y.jsxs(y.Fragment,{children:[y.jsx("button",{style:{position:"absolute",top:0,right:0},onClick:()=>{this.loadPeerDetails(m)},children:"refresh"}),F,Q,N,I,X]})}else return console.log("weird peer",O),"???"}else return"Loading..."},c=r.map(m=>({key:"~"+m,jsx:y.jsx(Oo,{id:m,summary:"~"+m+" (known)",details:u(m),onOpen:this.loadPeerDetails})})),p=s.map(m=>({key:"~"+m,jsx:y.jsx(Oo,{id:m,summary:"~"+m+" (alien)",details:u(m),onOpen:this.loadPeerDetails})})),v=[...c,...p];return y.jsx(qt,{placeholder:"ship name",items:v,children:y.jsx("button",{onClick:this.loadPeers,children:"refresh"})})}}class z6 extends oe.Component{constructor(t){super(t),this.state={},this.loadTimers=this.loadTimers.bind(this)}componentDidMount(){const{timers:t}=this.props;t.length===0&&this.loadTimers()}componentDidUpdate(t,n){}loadTimers(){api.getTimers()}render(){const{props:t,state:n}=this,r=t.timers.map(s=>{const a=bs(s.duct);return{key:a,jsx:y.jsxs("div",{class:"flex",children:[y.jsx("div",{class:"flex-auto",style:{maxWidth:"50%"},children:mr(s.date)}),y.jsx("div",{class:"flex-auto",style:{maxWidth:"50%"},children:a})]})}});return y.jsx("table",{children:y.jsx("tbody",{children:y.jsx(qt,{placeholder:"duct",items:r,children:y.jsx("button",{onClick:this.loadTimers,children:"refresh"})})})})}}var Yn={},Ng={},ga={},ic={},Ru={},Qh={},Kh={},sr={},Zh={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.VerticalReverse="vertical-reverse",t.Horizontal="horizontal",t.HorizontalReverse="horizontal-reverse"}(e.Orientation||(e.Orientation={}))})(Zh);Object.defineProperty(sr,"__esModule",{value:!0});const Qp=Zh;function H6(e,t){return typeof e=="boolean"?e:t}sr.booleanOptionOr=H6;function Y6(e,t){return typeof e=="number"?e:t}sr.numberOptionOr=Y6;function dM(e,t){return Object.assign({},t.reduce((n,r)=>Object.assign({},n,{[r]:e[r]}),{}))}sr.pick=dM;function G6(e,t){console.log(JSON.stringify(e.map(n=>dM(n,t)),null,2))}sr.debug=G6;function pM(e){return e===void 0}sr.isUndefined=pM;function V6(e={}){return Object.keys(e).reduce((t,n)=>pM(e[n])?t:Object.assign({},t,{[n]:e[n]}),{})}sr.withoutUndefinedKeys=V6;function q6(e,t,n){const r=n.style.dot.size,s=e.template.arrow.size,a=r+e.template.arrow.offset,u=Math.PI/7,c=Q6(e,t,n),p=a*Math.cos(c),v=a*Math.sin(c),m=(a+s)*Math.cos(c-u),O=(a+s)*Math.sin(c-u),E=(a+s/2)*Math.cos(c),F=(a+s/2)*Math.sin(c),B=(a+s)*Math.cos(c+u),Q=(a+s)*Math.sin(c+u);return`M${p},${v} L${m},${O} Q${E},${F} ${B},${Q} L${B},${Q}`}sr.arrowSvgPath=q6;function Q6(e,t,n){const r=t.x-n.x,s=t.y-n.y,a=e.template.commit.spacing;let u,c;switch(e.orientation){case Qp.Orientation.Horizontal:u=s,c=-a;break;case Qp.Orientation.HorizontalReverse:u=s,c=a;break;case Qp.Orientation.VerticalReverse:u=-a,c=r;break;default:u=a,c=r;break}return e.isVertical?Math.abs(s)>a&&(c=0):Math.abs(r)>a&&(u=0),e.reverseArrow&&(u*=-1,c*=-1),Math.atan2(u,c)}(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=sr;var n;(function(v){v.Bezier="bezier",v.Straight="straight"})(n||(n={})),e.MergeStyle=n,e.DEFAULT_FONT="normal 12pt Calibri";class r{constructor(m){m.branch=m.branch||{},m.branch.label=m.branch.label||{},m.arrow=m.arrow||{},m.commit=m.commit||{},m.commit.dot=m.commit.dot||{},m.commit.message=m.commit.message||{},this.colors=m.colors||["#000000"],this.branch={color:m.branch.color,lineWidth:m.branch.lineWidth||2,mergeStyle:m.branch.mergeStyle||n.Bezier,spacing:t.numberOptionOr(m.branch.spacing,20),label:{display:t.booleanOptionOr(m.branch.label.display,!0),color:m.branch.label.color||m.commit.color,strokeColor:m.branch.label.strokeColor||m.commit.color,bgColor:m.branch.label.bgColor||"white",font:m.branch.label.font||m.commit.message.font||e.DEFAULT_FONT,borderRadius:t.numberOptionOr(m.branch.label.borderRadius,10)}},this.arrow={size:m.arrow.size||null,color:m.arrow.color||null,offset:m.arrow.offset||2},this.commit={color:m.commit.color,spacing:t.numberOptionOr(m.commit.spacing,25),hasTooltipInCompactMode:t.booleanOptionOr(m.commit.hasTooltipInCompactMode,!0),dot:{color:m.commit.dot.color||m.commit.color,size:m.commit.dot.size||3,strokeWidth:t.numberOptionOr(m.commit.dot.strokeWidth,0),strokeColor:m.commit.dot.strokeColor,font:m.commit.dot.font||m.commit.message.font||"normal 10pt Calibri"},message:{display:t.booleanOptionOr(m.commit.message.display,!0),displayAuthor:t.booleanOptionOr(m.commit.message.displayAuthor,!0),displayHash:t.booleanOptionOr(m.commit.message.displayHash,!0),color:m.commit.message.color||m.commit.color,font:m.commit.message.font||e.DEFAULT_FONT}},this.tag=m.tag||{}}}e.Template=r;const s=new r({colors:["#6963FF","#47E8D4","#6BDB52","#E84BA5","#FFA657"],branch:{color:"#000000",lineWidth:4,spacing:50,mergeStyle:n.Straight},commit:{spacing:60,dot:{size:16,strokeColor:"#000000",strokeWidth:4},message:{color:"black"}},arrow:{size:16,offset:-1.5}});e.blackArrowTemplate=s;const a=new r({colors:["#979797","#008fb5","#f1c109"],branch:{lineWidth:10,spacing:50},commit:{spacing:80,dot:{size:14},message:{font:"normal 14pt Arial"}}});e.metroTemplate=a;var u;(function(v){v.Metro="metro",v.BlackArrow="blackarrow"})(u||(u={})),e.TemplateName=u;function c(v,m){const O=p(v);return m.branch||(m.branch={}),m.commit||(m.commit={}),{colors:m.colors||O.colors,arrow:Object.assign({},O.arrow,m.arrow),branch:Object.assign({},O.branch,m.branch,{label:Object.assign({},O.branch.label,m.branch.label)}),commit:Object.assign({},O.commit,m.commit,{dot:Object.assign({},O.commit.dot,m.commit.dot),message:Object.assign({},O.commit.message,m.commit.message)}),tag:Object.assign({},O.tag,m.tag)}}e.templateExtend=c;function p(v){return v?typeof v=="string"?{[u.BlackArrow]:s,[u.Metro]:a}[v]:v:a}e.getTemplate=p})(Kh);Object.defineProperty(Qh,"__esModule",{value:!0});const K6=Kh,gw=sr;let Z6=class{constructor(t,n,r,s){this.name=t,this.tagStyle=n,this.commitStyle=s,this.render=r}get style(){return{strokeColor:this.tagStyle.strokeColor||this.commitStyle.color,bgColor:this.tagStyle.bgColor||this.commitStyle.color,color:this.tagStyle.color||"white",font:this.tagStyle.font||this.commitStyle.message.font||K6.DEFAULT_FONT,borderRadius:gw.numberOptionOr(this.tagStyle.borderRadius,10),pointerWidth:gw.numberOptionOr(this.tagStyle.pointerWidth,12)}}};Qh.Tag=Z6;Object.defineProperty(Ru,"__esModule",{value:!0});const X6=Qh,J6=()=>(Math.random().toString(16).substring(3)+Math.random().toString(16).substring(3)+Math.random().toString(16).substring(3)+Math.random().toString(16).substring(3)).substring(0,40);let eN=class mM{constructor(t){this.refs=[],this.x=0,this.y=0;let n,r;try{[,n,r]=t.author.match(/(.*) <(.*)>/)}catch{[n,r]=[t.author,""]}this.author={name:n,email:r,timestamp:Date.now()},this.committer={name:n,email:r,timestamp:Date.now()},this.subject=t.subject,this.body=t.body||"",this.hash=t.hash||J6(),this.hashAbbrev=this.hash.substring(0,7),this.parents=t.parents?t.parents:[],this.parentsAbbrev=this.parents.map(s=>s.substring(0,7)),this.style=Object.assign({},t.style,{message:Object.assign({},t.style.message),dot:Object.assign({},t.style.dot)}),this.dotText=t.dotText,this.onClick=()=>t.onClick?t.onClick(this):void 0,this.onMessageClick=()=>t.onMessageClick?t.onMessageClick(this):void 0,this.onMouseOver=()=>t.onMouseOver?t.onMouseOver(this):void 0,this.onMouseOut=()=>t.onMouseOut?t.onMouseOut(this):void 0,this.renderDot=t.renderDot,this.renderMessage=t.renderMessage,this.renderTooltip=t.renderTooltip}get message(){let t="";return this.style.message.displayHash&&(t+=`${this.hashAbbrev} `),t+=this.subject,this.style.message.displayAuthor&&(t+=` - ${this.author.name} <${this.author.email}>`),t}get branchToDisplay(){return this.branches?this.branches[0]:""}setRefs(t){return this.refs=t.getNames(this.hash),this}setTags(t,n,r){return this.tags=t.getNames(this.hash).map(s=>new X6.Tag(s,n(s),r(s),this.style)),this}setBranches(t){return this.branches=t,this}setPosition({x:t,y:n}){return this.x=t,this.y=n,this}withDefaultColor(t){const n=Object.assign({},this.style,{dot:Object.assign({},this.style.dot),message:Object.assign({},this.style.message)});n.color||(n.color=t),n.dot.color||(n.dot.color=t),n.message.color||(n.message.color=t);const r=this.cloneCommit();return r.style=n,r}cloneCommit(){const t=new mM({author:`${this.author.name} <${this.author.email}>`,subject:this.subject,style:this.style,body:this.body,hash:this.hash,parents:this.parents,dotText:this.dotText,onClick:this.onClick,onMessageClick:this.onMessageClick,onMouseOver:this.onMouseOver,onMouseOut:this.onMouseOut,renderDot:this.renderDot,renderMessage:this.renderMessage,renderTooltip:this.renderTooltip});return t.refs=this.refs,t.branches=this.branches,t.tags=this.tags,t.x=this.x,t.y=this.y,t}};Ru.Commit=eN;var vw;function gM(){if(vw)return ic;vw=1;var e=Fr&&Fr.__rest||function(u,c){var p={};for(var v in u)Object.prototype.hasOwnProperty.call(u,v)&&c.indexOf(v)<0&&(p[v]=u[v]);if(u!=null&&typeof Object.getOwnPropertySymbols=="function")for(var m=0,v=Object.getOwnPropertySymbols(u);mE.commits.find(({hash:B})=>B===F);let O=m(p,p.refs.getCommit(v.name));for(;O&&O.hash!==v.parentCommitHash;)yield O,O=m(p,O.parents[0])}(this._graph,this._branch)].forEach(p=>{p.refs=p.refs.filter(v=>v!==this.name)}),this._graph.refs.delete(this.name),this._graph.branches.delete(this.name),this._branch=n.createDeletedBranch(this._graph,this._branch.style,()=>{}),this._onGraphUpdate(),this}merge(...c){if(this._branch.isDeleted()&&!this._isReferenced())throw new Error(`Cannot merge to the deleted branch "${this.name}"`);let p=c[0];a(p)||(p={branch:c[0],fastForward:!1,commitOptions:{subject:c[1]}});const{branch:v,fastForward:m,commitOptions:O}=p,E=typeof v=="string"?v:v.name,F=this._graph.refs.getCommit(E);if(!F)throw new Error(`The branch called "${E}" is unknown`);let B=!1;if(m){const Q=this._graph.refs.getCommit(this._branch.name);Q&&(B=this._areCommitsConnected(Q,F))}return m&&B?this._fastForwardTo(F):this._commitWithParents(Object.assign({},O,{subject:O&&O.subject||`Merge branch ${E}`}),[F]),this._onGraphUpdate(),this}tag(c){if(this._branch.isDeleted()&&!this._isReferenced())throw new Error(`Cannot tag on the deleted branch "${this.name}"`);return typeof c=="string"?this._graph.getUserApi().tag({name:c,ref:this._branch.name}):this._graph.getUserApi().tag(Object.assign({},c,{ref:this._branch.name})),this}checkout(){if(this._branch.isDeleted()&&!this._isReferenced())throw new Error(`Cannot checkout the deleted branch "${this.name}"`);const c=this._branch,p=this._graph.refs.getCommit(c.name);return this._graph.currentBranch=c,p&&this._graph.refs.set("HEAD",p),this}_commitWithParents(c,p){const v=this._graph.refs.getCommit(this._branch.name);v?p.unshift(v):this._branch.parentCommitHash&&p.unshift(this._branch.parentCommitHash);const{tag:m}=c,O=e(c,["tag"]),E=new t.Commit(Object.assign({hash:this._graph.generateCommitHash(),author:this._branch.commitDefaultOptions.author||this._graph.author,subject:this._branch.commitDefaultOptions.subject||this._graph.commitMessage},O,{parents:p,style:this._getCommitStyle(c.style)}));v?this._graph.refs.getNames(v).forEach(B=>this._graph.refs.set(B,E.hash)):this._graph.refs.set(this._branch.name,E.hash),this._graph.commits.push(E),this.checkout(),m&&this.tag(m)}_areCommitsConnected(c,p){const v=this._graph.commits.find(({hash:O})=>p===O);return!v||v.parents.length===0?!1:v.parents.includes(c)?!0:v.parents.some(O=>this._areCommitsConnected(c,O))}_fastForwardTo(c){this._graph.refs.set(this._branch.name,c)}_getCommitStyle(c={}){return Object.assign({},r.withoutUndefinedKeys(this._graph.template.commit),r.withoutUndefinedKeys(this._branch.commitDefaultOptions.style),c,{message:Object.assign({},r.withoutUndefinedKeys(this._graph.template.commit.message),r.withoutUndefinedKeys(this._branch.commitDefaultOptions.style.message),c.message,r.withoutUndefinedKeys({display:this._graph.shouldDisplayCommitMessage&&void 0})),dot:Object.assign({},r.withoutUndefinedKeys(this._graph.template.commit.dot),r.withoutUndefinedKeys(this._branch.commitDefaultOptions.style.dot),c.dot)})}_isReferenced(){return this._graph.branches.has(this.name)||this._graph.refs.hasName(this.name)||this._graph.commits.reduce((c,{refs:p})=>[...c,...p],[]).includes(this.name)}}ic.BranchUserApi=s;function a(u){return typeof u=="object"&&!(u instanceof s)}return ic}var yw;function Xh(){if(yw)return ga;yw=1,Object.defineProperty(ga,"__esModule",{value:!0});const e=gM(),t="";ga.DELETED_BRANCH_NAME=t;class n{constructor(a){this.gitgraph=a.gitgraph,this.name=a.name,this.style=a.style,this.parentCommitHash=a.parentCommitHash,this.commitDefaultOptions=a.commitDefaultOptions||{style:{}},this.onGraphUpdate=a.onGraphUpdate,this.renderLabel=a.renderLabel}getUserApi(){return new e.BranchUserApi(this,this.gitgraph,this.onGraphUpdate)}isDeleted(){return this.name===t}}ga.Branch=n;function r(s,a,u){return new n({name:t,gitgraph:s,style:a,onGraphUpdate:u})}return ga.createDeletedBranch=r,ga}var Jh={},Du={};Object.defineProperty(Du,"__esModule",{value:!0});var r0;(function(e){e.Compact="compact"})(r0||(r0={}));Du.Mode=r0;var Ig={},ed={};Object.defineProperty(ed,"__esModule",{value:!0});class tN{constructor(t){this.rows=new Map,this.maxRowCache=void 0,this.computeRowsFromCommits(t)}getRowOf(t){return this.rows.get(t)||0}getMaxRow(){return this.maxRowCache===void 0&&(this.maxRowCache=nN(Array.from(this.rows.values())).length-1),this.maxRowCache}computeRowsFromCommits(t){t.forEach((n,r)=>{this.rows.set(n.hash,r)}),this.maxRowCache=void 0}}ed.RegularGraphRows=tN;function nN(e){const t=new Set;return e.forEach(n=>t.add(n)),Array.from(t)}Object.defineProperty(Ig,"__esModule",{value:!0});const rN=ed;class iN extends rN.RegularGraphRows{computeRowsFromCommits(t){t.forEach((n,r)=>{let s=r;if(!(r===0)){const u=this.getRowOf(n.parents[0]),c=t[r-1];if(s=Math.max(u+1,this.getRowOf(c.hash)),n.parents.length>1){const v=this.getRowOf(n.parents[1]);uthis.branches.add(s.branchToDisplay)),r&&(this.branches=new Set(Array.from(this.branches).sort(r)))}get(t){return Array.from(this.branches).findIndex(n=>n===t)}getColorOf(t){return this.colors[this.get(t)%this.colors.length]}}Fg.BranchesOrder=lN;var Au={};Object.defineProperty(Au,"__esModule",{value:!0});class uN{constructor(){this.commitPerName=new Map,this.namesPerCommit=new Map}set(t,n){const r=this.commitPerName.get(t);return r&&this.removeNameFrom(r,t),this.addNameTo(n,t),this.addCommitTo(t,n),this}delete(t){return this.hasName(t)&&(this.removeNameFrom(this.getCommit(t),t),this.commitPerName.delete(t)),this}getCommit(t){return this.commitPerName.get(t)}getNames(t){return this.namesPerCommit.get(t)||[]}getAllNames(){return Array.from(this.commitPerName.keys())}hasCommit(t){return this.namesPerCommit.has(t)}hasName(t){return this.commitPerName.has(t)}removeNameFrom(t,n){const r=this.namesPerCommit.get(t)||[];this.namesPerCommit.set(t,r.filter(s=>s!==n))}addNameTo(t,n){const r=this.namesPerCommit.get(t)||[];this.namesPerCommit.set(t,[...r,n])}addCommitTo(t,n){this.commitPerName.set(t,n)}}Au.Refs=uN;var Lu={};Object.defineProperty(Lu,"__esModule",{value:!0});const fN=sr;class cN{constructor(t,n,r,s,a,u){this.branchesPaths=new Map,this.commits=t,this.branches=n,this.commitSpacing=r,this.isGraphVertical=s,this.isGraphReverse=a,this.createDeletedBranch=u}execute(){return this.fromCommits(),this.withMergeCommits(),this.smoothBranchesPaths()}fromCommits(){this.commits.forEach(t=>{let n=this.branches.get(t.branchToDisplay);n||(n=this.getDeletedBranchInPath()||this.createDeletedBranch());const r=[],s=this.branchesPaths.get(n),a=this.commits.find(({hash:u})=>u===t.parents[0]);s?r.push(...s):a&&r.push({x:a.x,y:a.y}),r.push({x:t.x,y:t.y}),this.branchesPaths.set(n,r)})}withMergeCommits(){this.commits.filter(({parents:n})=>n.length>1).forEach(n=>{const r=this.commits.find(({hash:c})=>c===n.parents[1]);if(!r)return;const s=r.branches?r.branches[0]:"";let a=this.branches.get(s);if(!a&&(a=this.getDeletedBranchInPath(),!a))return;const u=[...this.branchesPaths.get(a)||[]];this.branchesPaths.set(a,[...u,{x:n.x,y:n.y,mergeCommit:!0}])})}getDeletedBranchInPath(){return Array.from(this.branchesPaths.keys()).find(t=>t.isDeleted())}smoothBranchesPaths(){const t=new Map;return this.branchesPaths.forEach((n,r)=>{if(n.length<=1){t.set(r,[n]);return}this.isGraphVertical?n=n.sort((a,u)=>a.y>u.y?-1:1):n=n.sort((a,u)=>a.x>u.x?1:-1),this.isGraphReverse&&(n=n.reverse());const s=n.reduce((a,u,c)=>{if(u.mergeCommit){a[a.length-1].push(fN.pick(u,["x","y"]));let p=c-1,v=n[p];for(;p>=0&&v.mergeCommit;)p--,v=n[p];p>=0&&a.push([v])}else a[a.length-1].push(u);return a},[[]]);this.isGraphReverse&&s.forEach(a=>a.reverse()),this.isGraphVertical?s.forEach(a=>{if(a.length<=1)return;const u=a[0],c=a[a.length-1],p=a[1].x,v=Math.round(Math.abs(u.y-c.y)/this.commitSpacing)-1,m=v>0?new Array(v).fill(0).map((E,F)=>({x:p,y:a[0].y-this.commitSpacing*(F+1)})):[],O=t.get(r)||[];t.set(r,[...O,[u,...m,c]])}):s.forEach(a=>{if(a.length<=1)return;const u=a[0],c=a[a.length-1],p=a[1].y,v=Math.round(Math.abs(u.x-c.x)/this.commitSpacing)-1,m=v>0?new Array(v).fill(0).map((E,F)=>({y:p,x:a[0].x+this.commitSpacing*(F+1)})):[],O=t.get(r)||[];t.set(r,[...O,[u,...m,c]])})}),t}}Lu.BranchesPathsCalculator=cN;function hN(e,t,n){return e.map(r=>"M"+r.map(({x:s,y:a},u,c)=>{if(t&&c.length>1&&(u===1||u===c.length-1)){const p=c[u-1];if(n){const v=(p.y+a)/2;return`C ${p.x} ${v} ${s} ${v} ${s} ${a}`}else{const v=(p.x+s)/2;return`C ${v} ${p.y} ${v} ${a} ${s} ${a}`}}return`L ${s} ${a}`}).join(" ").slice(1)).join(" ")}Lu.toSvgPath=hN;var td={};Object.defineProperty(td,"__esModule",{value:!0});const dN=Ru,pN=Xh(),ww=Au;class mN{constructor(t,n){this._graph=t,this._onGraphUpdate=n}clear(){return this._graph.refs=new ww.Refs,this._graph.tags=new ww.Refs,this._graph.commits=[],this._graph.branches=new Map,this._graph.currentBranch=this._graph.createBranch("master"),this._onGraphUpdate(),this}commit(t){return this._graph.currentBranch.getUserApi().commit(t),this}branch(t){return this._graph.createBranch(t).getUserApi()}tag(...t){let n,r,s,a;if(typeof t[0]=="string"?(n=t[0],r=t[1]):(n=t[0].name,r=t[0].ref,s=t[0].style,a=t[0].render),!r){const c=this._graph.refs.getCommit("HEAD");if(!c)return this;r=c}let u;if(this._graph.refs.hasCommit(r)&&(u=r),this._graph.refs.hasName(r)&&(u=this._graph.refs.getCommit(r)),!u)throw new Error(`The ref "${r}" does not exist`);return this._graph.tags.set(n,u),this._graph.tagStyles[n]=s,this._graph.tagRenders[n]=a,this._onGraphUpdate(),this}import(t){const n=new Error("Only `git2json` format is supported for imported data.");if(!Array.isArray(t)||!t.every(u=>typeof u=="object"&&typeof u.author=="object"&&Array.isArray(u.refs)))throw n;const s=t.map(u=>Object.assign({},u,{style:Object.assign({},this._graph.template.commit,{message:Object.assign({},this._graph.template.commit.message,{display:this._graph.shouldDisplayCommitMessage})}),author:`${u.author.name} <${u.author.email}>`})).reverse();this.clear(),this._graph.commits=s.map(u=>new dN.Commit(u)),s.forEach(({refs:u,hash:c})=>{if(!u||!c)return;const p="tag: ";u.map(m=>m.split(p)).map(([m,O])=>O).filter(m=>typeof m=="string").forEach(m=>this._graph.tags.set(m,c)),u.filter(m=>!m.startsWith(p)).forEach(m=>this._graph.refs.set(m,c))});const a=this._getBranches();return this._graph.commits.map(u=>this._withBranches(a,u)).reduce((u,c)=>(c.branches&&c.branches.forEach(p=>u.add(p)),u),new Set).forEach(u=>this.branch(u)),this._onGraphUpdate(),this}_withBranches(t,n){let r=Array.from((t.get(n.hash)||new Set).values());return r.length===0&&(r=[pN.DELETED_BRANCH_NAME]),n.setBranches(r)}_getBranches(){const t=new Map,n=[];return this._graph.refs.getAllNames().filter(s=>s!=="HEAD").forEach(s=>{const a=this._graph.refs.getCommit(s);for(a&&n.push(a);n.length>0;){const u=n.pop(),c=this._graph.commits.find(({hash:v})=>v===u),p=t.get(u)||new Set;p.add(s),t.set(u,p),c&&c.parents&&c.parents.length>0&&n.push(c.parents[0])}}),t}}td.GitgraphUserApi=mN;Object.defineProperty(Ng,"__esModule",{value:!0});const Kp=Xh(),gN=Jh,vN=Du,_w=Fg,yN=Kh,xw=Au,wN=Lu,sc=sr,Mo=Zh,_N=td;let xN=class{constructor(t={}){this.refs=new xw.Refs,this.tags=new xw.Refs,this.tagStyles={},this.tagRenders={},this.commits=[],this.branches=new Map,this.listeners=[],this.nextTimeoutId=null,this.template=yN.getTemplate(t.template),this.currentBranch=this.createBranch("master"),this.orientation=t.orientation,this.reverseArrow=sc.booleanOptionOr(t.reverseArrow,!1),this.initCommitOffsetX=sc.numberOptionOr(t.initCommitOffsetX,0),this.initCommitOffsetY=sc.numberOptionOr(t.initCommitOffsetY,0),this.mode=t.mode,this.author=t.author||"Sergio Flores ",this.commitMessage=t.commitMessage||"He doesn't like George Michael! Boooo!",this.generateCommitHash=typeof t.generateCommitHash=="function"?t.generateCommitHash:()=>{},this.branchesOrderFunction=typeof t.compareBranchesOrder=="function"?t.compareBranchesOrder:void 0,this.branchLabelOnEveryCommit=sc.booleanOptionOr(t.branchLabelOnEveryCommit,!1)}get isHorizontal(){return this.orientation===Mo.Orientation.Horizontal||this.orientation===Mo.Orientation.HorizontalReverse}get isVertical(){return!this.isHorizontal}get isReverse(){return this.orientation===Mo.Orientation.HorizontalReverse||this.orientation===Mo.Orientation.VerticalReverse}get shouldDisplayCommitMessage(){return!this.isHorizontal&&this.mode!==vN.Mode.Compact}getUserApi(){return new _N.GitgraphUserApi(this,()=>this.next())}subscribe(t){this.listeners.push(t);let n=!0;return()=>{if(!n)return;n=!1;const r=this.listeners.indexOf(t);this.listeners.splice(r,1)}}getRenderedData(){const t=this.computeRenderedCommits(),n=this.computeRenderedBranchesPaths(t),r=this.computeCommitMessagesX(n);return this.computeBranchesColor(t,n),{commits:t,branchesPaths:n,commitMessagesX:r}}createBranch(t){const n="HEAD";let r={gitgraph:this,name:"",parentCommitHash:this.refs.getCommit(n),style:this.template.branch,onGraphUpdate:()=>this.next()};if(typeof t=="string")r.name=t,r.parentCommitHash=this.refs.getCommit(n);else{const a=t.from?t.from.name:n,u=this.refs.getCommit(a)||(this.refs.hasCommit(t.from)?t.from:void 0);t.style=t.style||{},r=Object.assign({},r,t,{parentCommitHash:u,style:Object.assign({},r.style,t.style,{label:Object.assign({},r.style.label,t.style.label)})})}const s=new Kp.Branch(r);return this.branches.set(s.name,s),s}computeRenderedCommits(){const t=this.getBranches(),n=(()=>{const c=new Set(this.commits.reduce((m,{hash:O})=>t.has(O)?m:[...m,O],[])),p=this.commits.reduce((m,O)=>O.parents.length>1?[...m,...O.parents.slice(1).map(E=>this.commits.find(({hash:F})=>E===F))]:m,[]),v=new Set;return p.forEach(m=>{let O=m;for(;O&&c.has(O.hash);)v.add(O.hash),O=O.parents.length>0?this.commits.find(({hash:E})=>O.parents[0]===E):void 0}),v})(),r=this.commits.filter(({hash:c})=>t.has(c)||n.has(c)),s=r.map(c=>this.withBranches(t,c)),a=gN.createGraphRows(this.mode,r),u=new _w.BranchesOrder(s,this.template.colors,this.branchesOrderFunction);return s.map(c=>c.setRefs(this.refs)).map(c=>this.withPosition(a,u,c)).map(c=>c.withDefaultColor(this.getBranchDefaultColor(u,c.branchToDisplay))).map(c=>c.setTags(this.tags,p=>Object.assign({},this.tagStyles[p],this.template.tag),p=>this.tagRenders[p]))}computeRenderedBranchesPaths(t){return new wN.BranchesPathsCalculator(t,this.branches,this.template.commit.spacing,this.isVertical,this.isReverse,()=>Kp.createDeletedBranch(this,this.template.branch,()=>this.next())).execute()}computeBranchesColor(t,n){const r=new _w.BranchesOrder(t,this.template.colors,this.branchesOrderFunction);Array.from(n).forEach(([s])=>{s.computedColor=s.style.color||this.getBranchDefaultColor(r,s.name)})}computeCommitMessagesX(t){return Array.from(t).length*this.template.branch.spacing}withBranches(t,n){let r=Array.from((t.get(n.hash)||new Set).values());return r.length===0&&(r=[Kp.DELETED_BRANCH_NAME]),n.setBranches(r)}getBranches(){const t=new Map,n=[];return this.refs.getAllNames().filter(s=>s!=="HEAD").forEach(s=>{const a=this.refs.getCommit(s);for(a&&n.push(a);n.length>0;){const u=n.pop(),c=this.commits.find(({hash:v})=>v===u),p=t.get(u)||new Set;p.add(s),t.set(u,p),c&&c.parents&&c.parents.length>0&&n.push(c.parents[0])}}),t}withPosition(t,n,r){const s=t.getRowOf(r.hash),a=t.getMaxRow(),u=n.get(r.branchToDisplay);switch(this.orientation){default:return r.setPosition({x:this.initCommitOffsetX+this.template.branch.spacing*u,y:this.initCommitOffsetY+this.template.commit.spacing*(a-s)});case Mo.Orientation.VerticalReverse:return r.setPosition({x:this.initCommitOffsetX+this.template.branch.spacing*u,y:this.initCommitOffsetY+this.template.commit.spacing*s});case Mo.Orientation.Horizontal:return r.setPosition({x:this.initCommitOffsetX+this.template.commit.spacing*s,y:this.initCommitOffsetY+this.template.branch.spacing*u});case Mo.Orientation.HorizontalReverse:return r.setPosition({x:this.initCommitOffsetX+this.template.commit.spacing*(a-s),y:this.initCommitOffsetY+this.template.branch.spacing*u})}}getBranchDefaultColor(t,n){return t.getColorOf(n)}next(){this.nextTimeoutId&&window.clearTimeout(this.nextTimeoutId),this.nextTimeoutId=window.setTimeout(()=>{this.listeners.forEach(t=>t(this.getRenderedData()))},0)}};Ng.GitgraphCore=xN;Object.defineProperty(Yn,"__esModule",{value:!0});var SN=Ng,MN=Yn.GitgraphCore=SN.GitgraphCore,kN=Du,CN=Yn.Mode=kN.Mode,ON=td;Yn.GitgraphUserApi=ON.GitgraphUserApi;var EN=gM();Yn.BranchUserApi=EN.BranchUserApi;var TN=Xh();Yn.Branch=TN.Branch;var bN=Ru;Yn.Commit=bN.Commit;var PN=Qh;Yn.Tag=PN.Tag;var RN=Au;Yn.Refs=RN.Refs;var Ug=Kh,DN=Yn.MergeStyle=Ug.MergeStyle,AN=Yn.TemplateName=Ug.TemplateName,LN=Yn.templateExtend=Ug.templateExtend,jN=Zh,NN=Yn.Orientation=jN.Orientation,IN=Lu,FN=Yn.toSvgPath=IN.toSvgPath,UN=sr,$N=Yn.arrowSvgPath=UN.arrowSvgPath;function WN(e){var t=e.branch,n=e.commit,r=oe.useState({textWidth:0,textHeight:0}),s=r[0],a=r[1],u=oe.useCallback(function(v){if(v){var m=v.getBBox();a({textWidth:m.width,textHeight:m.height})}},[]),c=s.textWidth+2*Ei.paddingX,p=s.textHeight+2*Ei.paddingY;return oe.createElement("g",null,oe.createElement("rect",{stroke:t.style.label.strokeColor||n.style.color,fill:t.style.label.bgColor,rx:t.style.label.borderRadius,width:c,height:p}),oe.createElement("text",{ref:u,fill:t.style.label.color||n.style.color,style:{font:t.style.label.font},alignmentBaseline:"middle",dominantBaseline:"middle",x:Ei.paddingX,y:p/2},t.name))}var Ei=oe.forwardRef(function(e,t){var n=e.branch,r=e.commit,s=e.branchLabelX;if(!n.style.label.display)return null;if(!e.gitgraph.branchLabelOnEveryCommit){var a=e.gitgraph.refs.getCommit(n.name);if(r.hash!==a)return null}if(r.branchToDisplay!==n.name)return null;var u=n.renderLabel?n.renderLabel(n):oe.createElement(WN,{branch:n,commit:r});if(e.gitgraph.isVertical)return oe.createElement("g",{ref:t,transform:"translate("+(s||0)+", 0)"},u);var c=r.style.dot.size*2,p=10,v=c+p;return oe.createElement("g",{ref:t,transform:"translate("+r.x+", "+v+")"},u)});Ei.paddingX=10;Ei.paddingY=5;var BN=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var a in s)s.hasOwnProperty(a)&&(r[a]=s[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Sc=function(e){BN(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.state={textWidth:0},n.$text=oe.createRef(),n}return t.prototype.componentDidMount=function(){this.setState({textWidth:this.$text.current.getBBox().width})},t.prototype.render=function(){if(this.props.commit.renderTooltip)return this.props.commit.renderTooltip(this.props.commit);var n=this.props.commit.style.dot.size*2,r=10,s=t.padding,a=5,u=50,c=r+this.state.textWidth+2*s,p=["M 0,0","L "+r+","+r,"V "+(u/2-a),"Q "+r+","+u/2+" "+(r+a)+","+u/2,"H "+(c-a),"Q "+c+","+u/2+" "+c+","+(u/2-a),"V -"+(u/2-a),"Q "+c+",-"+u/2+" "+(c-a)+",-"+u/2,"H "+(r+a),"Q "+r+",-"+u/2+" "+r+",-"+(u/2-a),"V -"+r,"z"].join(" ");return oe.createElement("g",{transform:"translate("+n+", "+n/2+")"},oe.createElement("path",{d:p,fill:"#EEE"}),oe.createElement("text",{ref:this.$text,x:r+s,y:0,alignmentBaseline:"central",fill:"#333"},this.props.children))},t.padding=10,t}(oe.Component),zN=function(e){var t=e.commit,n=e.onMouseOver,r=e.onMouseOut;return t.renderDot?t.renderDot(t):oe.createElement(oe.Fragment,null,oe.createElement("defs",null,oe.createElement("circle",{id:t.hash,cx:t.style.dot.size,cy:t.style.dot.size,r:t.style.dot.size,fill:t.style.dot.color}),oe.createElement("clipPath",{id:"clip-"+t.hash},oe.createElement("use",{xlinkHref:"#"+t.hash}))),oe.createElement("g",{onClick:t.onClick,onMouseOver:n,onMouseOut:r},oe.createElement("use",{xlinkHref:"#"+t.hash,clipPath:"url(#clip-"+t.hash+")",stroke:t.style.dot.strokeColor,strokeWidth:t.style.dot.strokeWidth&&t.style.dot.strokeWidth*2}),t.dotText&&oe.createElement("text",{alignmentBaseline:"central",textAnchor:"middle",x:t.style.dot.size,y:t.style.dot.size,style:{font:t.style.dot.font}},t.dotText)))},HN=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var a in s)s.hasOwnProperty(a)&&(r[a]=s[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),YN=function(e){HN(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(){var n=this,r=this.props.commits.find(function(a){var u=a.hash;return u===n.props.parentHash});if(!r)return null;var s=this.props.gitgraph.reverseArrow?{x:this.props.commitRadius+(r.x-this.props.commit.x),y:this.props.commitRadius+(r.y-this.props.commit.y)}:{x:this.props.commitRadius,y:this.props.commitRadius};return oe.createElement("g",{transform:"translate("+s.x+", "+s.y+")"},oe.createElement("path",{d:$N(this.props.gitgraph,r,this.props.commit),fill:this.props.gitgraph.template.arrow.color}))},t}(oe.Component),GN=oe.forwardRef(function(e,t){var n=e.commit,r=e.messageX;if(n.renderMessage)return oe.createElement("g",{ref:t,transform:"translate("+r+", 0)"},n.renderMessage(n));var s=null;n.body&&(s=oe.createElement("foreignObject",{width:"600",x:"10"},oe.createElement("p",null,n.body)));var a=n.style.dot.size;return oe.createElement("g",{ref:t,transform:"translate("+r+", "+a+")"},oe.createElement("text",{alignmentBaseline:"central",fill:n.style.message.color,style:{font:n.style.message.font},onClick:n.onMessageClick},n.message),s)}),i0=10,VN=5;function qN(e){var t=oe.useState({textWidth:0,textHeight:0}),n=t[0],r=t[1],s=oe.useRef(null);oe.useEffect(function(){var O=s.current.getBBox();r({textWidth:O.width,textHeight:O.height})},[]);var a=e.tag,u=a.style.pointerWidth,c=a.style.borderRadius,p=u+n.textWidth+2*i0,v=n.textHeight+2*VN,m=["M 0,0","L "+u+","+v/2,"V "+v/2,"Q "+u+","+v/2+" "+(u+c)+","+v/2,"H "+(p-c),"Q "+p+","+v/2+" "+p+","+(v/2-c),"V "+-(v/2-c),"Q "+p+",-"+v/2+" "+(p-c)+",-"+v/2,"H "+(u+c),"Q "+u+",-"+v/2+" "+u+",-"+v/2,"V -"+v/2,"z"].join(" ");return oe.createElement("g",null,oe.createElement("path",{d:m,fill:a.style.bgColor,stroke:a.style.strokeColor}),oe.createElement("text",{ref:s,fill:a.style.color,style:{font:a.style.font},alignmentBaseline:"middle",dominantBaseline:"middle",x:u+i0,y:0},a.name))}var QN=oe.forwardRef(function(e,t){var n=e.tag,r=e.commit,s=e.tagX;return oe.createElement("g",{ref:t,transform:"translate("+(s||0)+", "+r.style.dot.size+")"},n.render?n.render(n.name,n.style):oe.createElement(qN,{tag:n}))}),KN=function(e){var t=e.commit,n=e.commits,r=e.gitgraph,s=e.commitMessagesX,a=oe.useRef(),u=oe.useRef([]),c=oe.useRef(),p=oe.useState(0),v=p[0],m=p[1],O=oe.useState([]),E=O[0],F=O[1],B=oe.useState(0),Q=B[0],me=B[1],N=oe.useMemo(function(){if(!r.template.arrow.size)return null;var J=t.style.dot.size;return t.parents.map(function(le){return oe.createElement(YN,{key:le,commits:n,commit:t,gitgraph:r,parentHash:le,commitRadius:J})})},[n,t,r]),A=oe.useMemo(function(){var J=Array.from(r.branches.values());return J.map(function(le){return oe.createElement(Ei,{key:le.name,gitgraph:r,branch:le,commit:t,ref:a,branchLabelX:v})})},[r,t,v]),I=oe.useMemo(function(){return u.current=[],!t.tags||r.isHorizontal?null:t.tags.map(function(J,le){return oe.createElement(QN,{key:t.hashAbbrev+"-"+J.name,commit:t,tag:J,ref:function(fe){return u.current[le]=fe},tagX:E[le]||0})})},[t,r,E]),H=e.getWithCommitOffset(t),X=H.x,te=H.y;oe.useLayoutEffect(function(){if(!r.isHorizontal){var J=10,le=s;if(a.current){m(le);var fe=a.current.getBBox().width+Ei.paddingX;le+=fe+J}var P=u.current.map(function(f){if(!f)return 0;var g=le,S=f.getBBox().width+i0;return le+=S+J,g});F(P),c.current&&me(le)}},[u,r,s]);var K=e.currentCommitOver===t&&(e.gitgraph.isHorizontal||e.gitgraph.mode===CN.Compact&&t.style.hasTooltipInCompactMode);return K&&e.setTooltip(oe.createElement("g",{transform:"translate("+X+", "+te+")"},oe.createElement(Sc,{commit:t},t.hashAbbrev," - ",t.subject))),oe.createElement("g",{transform:"translate("+X+", "+te+")"},oe.createElement(zN,{commit:t,onMouseOver:function(){e.setCurrentCommitOver(t),t.onMouseOver()},onMouseOut:function(){e.setCurrentCommitOver(null),e.setTooltip(null),t.onMouseOut()}}),N,oe.createElement("g",{transform:"translate("+-X+", 0)"},t.style.message.display&&oe.createElement(GN,{commit:t,ref:c,messageX:Q}),A,I))},ZN=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var a in s)s.hasOwnProperty(a)&&(r[a]=s[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),XN=function(e){ZN(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(){var n=this;return oe.createElement("path",{d:FN(this.props.coordinates.map(function(r){return r.map(function(s){return n.props.getWithCommitOffset(s)})}),this.props.isBezier,this.props.gitgraph.isVertical),fill:"none",stroke:this.props.branch.computedColor,strokeWidth:this.props.branch.style.lineWidth,transform:"translate("+this.props.offset+", "+this.props.offset+")"})},t}(oe.Component),JN=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var a in s)s.hasOwnProperty(a)&&(r[a]=s[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();function Sw(e){return"graph"in e}var e4=function(e){JN(t,e);function t(n){var r=e.call(this,n)||this;return r.$graph=oe.createRef(),r.$commits=oe.createRef(),r.$tooltip=null,r.state={commits:[],branchesPaths:new Map,commitMessagesX:0,commitYWithOffsets:{},shouldRecomputeOffsets:!0,currentCommitOver:null},r.gitgraph=Sw(n)?n.graph:new MN(n.options),r.gitgraph.subscribe(function(s){var a=s.commits,u=s.branchesPaths,c=s.commitMessagesX;r.setState({commits:a,branchesPaths:u,commitMessagesX:c,shouldRecomputeOffsets:!0})}),r}return t.prototype.render=function(){var n=this;return oe.createElement("svg",{ref:this.$graph},oe.createElement("g",{transform:"translate("+Ei.paddingX+", "+Sc.padding+")"},this.renderBranchesPaths(),oe.createElement("g",{ref:this.$commits},this.state.commits.map(function(r){return oe.createElement(KN,{key:r.hash,commits:n.state.commits,commit:r,currentCommitOver:n.state.currentCommitOver,setCurrentCommitOver:n.setCurrentCommitOver.bind(n),gitgraph:n.gitgraph,getWithCommitOffset:n.getWithCommitOffset.bind(n),setTooltip:n.setTooltip.bind(n),commitMessagesX:n.state.commitMessagesX})})),this.$tooltip))},t.prototype.componentDidMount=function(){Sw(this.props)||this.props.children(this.gitgraph.getUserApi())},t.prototype.componentDidUpdate=function(){if(this.$graph.current){var n=this.$graph.current.getBBox(),r=n.height,s=n.width;this.$graph.current.setAttribute("width",(s+Sc.padding+Ei.paddingX).toString()),this.$graph.current.setAttribute("height",(r+Sc.padding+Ei.paddingY).toString())}if(this.state.shouldRecomputeOffsets&&this.$commits.current){var a=Array.from(this.$commits.current.children);this.setState({commitYWithOffsets:this.computeOffsets(a),shouldRecomputeOffsets:!1})}},t.prototype.setCurrentCommitOver=function(n){this.setState({currentCommitOver:n})},t.prototype.setTooltip=function(n){this.$tooltip=n},t.prototype.renderBranchesPaths=function(){var n=this,r=this.gitgraph.template.commit.dot.size,s=this.gitgraph.template.branch.mergeStyle===DN.Bezier;return Array.from(this.state.branchesPaths).map(function(a){var u=a[0],c=a[1];return oe.createElement(XN,{key:u.name,gitgraph:n.gitgraph,branch:u,coordinates:c,getWithCommitOffset:n.getWithCommitOffset.bind(n),isBezier:s,offset:r})})},t.prototype.computeOffsets=function(n){var r=0,s=this.gitgraph.orientation===NN.VerticalReverse?n:n.reverse();return s.reduce(function(a,u){var c=parseInt(u.getAttribute("transform").split(",")[1].slice(0,-1),10),p=u.getElementsByTagName("foreignObject")[0],v=p&&p.firstElementChild,m=0;if(v){var O=v.getBoundingClientRect().height,E=window.getComputedStyle(v).marginTop||"0px",F=parseInt(E.replace("px",""),10);m=O+F}return p&&p.setAttribute("height",m+"px"),a[c]=c+r,r+=m,a},{})},t.prototype.getWithCommitOffset=function(n){var r=n.x,s=n.y;return{x:r,y:this.state.commitYWithOffsets[s]||s}},t.defaultProps={options:{}},t}(oe.Component);class t4 extends oe.Component{constructor(t){super(t),this.clickety=this.clickety.bind(this),this.clickCommit=this.clickCommit.bind(this),this.submit=this.submit.bind(this),this.graph=this.graph.bind(this),this.template=LN(AN.Metro,{branch:{lineWidth:6},commit:{spacing:40,dot:{size:10},message:{displayHash:!1,displayAuthor:!1,font:"normal 16pt monospace"}}})}componentDidMount(){api.getCommits()}clickety(){let{commits:t,gitgraph:n}=this.props;if(!t.commits)return;let r={};t.commits.forEach(a=>{r[a.commitHash]=a});let s=t.commits.map(a=>{console.log(a.commitHash,t.head);let u=[];return a.commitHash in t.head&&(u=["HEAD",t.head[a.commitHash]]),{refs:u,hash:a.commitHash.slice(2),parents:a.parents.map(c=>c.slice(2)),onMessageClick:this.clickCommit,subject:"commit: "+a.commitHash.slice(-5)+", content: "+a.contentHash.slice(-5)+", parents: "+a.parents.map(c=>c.slice(-5)),author:{name:"me",email:"me",timestamp:15e11}}});n.import(s)}clickCommit(t,n){console.log("click",t);let r=t.refs.slice(-1)[0];if(r)this.bobDesk.value==""?this.bobDesk.value=r:this.aliDesk.value=r;else return}submit(){api.pottery({ali:this.aliDesk.value,bob:this.bobDesk.value,germ:this.germ.value})}graph(t){this.setState({gitgraph:t})}render(){let t="f7 mono ba bg-gray0-d white-d pa3 mb2 db focus-b--black focus-b--white-d b--gray3 b--gray2-d nowrap ";return y.Fragment,this.submit,this.clickety(),y.jsx("div",{className:"cf w-100 flex flex-column pa4 ba-m ba-l ba-xl b--gray2 br1 h-100 h-100-minus-40-m h-100-minus-40-l h-100-minus-40-xl f9 white-d",children:y.jsx(e4,{options:{template:this.template},children:this.graph})})}}class n4 extends oe.Component{constructor(t){super(t),this.state={},this.loadBindings=this.loadBindings.bind(this),this.loadCache=this.loadCache.bind(this),this.loadConnections=this.loadConnections.bind(this),this.loadAuthenticationState=this.loadAuthenticationState.bind(this),this.loadChannels=this.loadChannels.bind(this)}componentDidMount(){const{props:t}=this;t.bindings.length===0&&this.loadBindings(),t.cache.length===0&&this.loadCache(),t.connections.length==0&&this.loadConnections(),t.authentication.sessions.length==0&&this.loadAuthenticationState(),t.channels.length==0&&this.loadChannels()}componentDidUpdate(t,n){}loadBindings(){api.getBindings()}loadCache(){api.getCache()}clearCache(t){api.clearCache(t)}loadConnections(){api.getConnections()}loadAuthenticationState(){api.getAuthenticationState()}loadChannels(){api.getChannels()}render(){const{props:t,state:n}=this,r=t.bindings.map(m=>({key:m.location+" "+m.action,jsx:y.jsxs("div",{class:"flex",children:[y.jsx("div",{class:"flex-auto",style:{maxWidth:"50%"},children:m.location}),y.jsx("div",{class:"flex-auto",style:{maxWidth:"50%"},children:m.action})]})})),s=t.cache.map(m=>({key:m.url+" "+(m.val?"LIVE":"CLEARED"),jsx:y.jsxs("div",{class:"flex",style:{marginBottom:"3px"},children:[y.jsx("div",{style:{width:"45%"},children:m.url}),y.jsxs("div",{style:{width:"5%"},children:["(v",m.aeon,")"]}),m.val?y.jsxs("div",{style:{width:"50%",position:"relative"},children:[y.jsx("div",{style:{display:"inline-block",width:"10%"},children:m.val.auth?"auth":"free"}),y.jsx("div",{style:{display:"inline-block",width:"10%"},children:m.val.payload.status}),y.jsx("div",{style:{display:"inline-block",width:"50%"},children:m.val.payload.headers.reduce((O,E)=>(O?O+"; ":"")+E.key+"="+E.value,"")}),y.jsx("div",{style:{display:"inline-block",width:"25%"},children:m.val.payload.data?m.val.payload.data.toLocaleString("de-DE")+" bytes":"no data"}),y.jsx("div",{style:{display:"inline-block",width:"5%"},children:y.jsx("button",{onClick:()=>{this.clearCache(m.url)},children:"clear"})})]}):"cleared"]})})),a=t.connections.map(m=>({key:m.duct+" "+m.action,jsx:y.jsx("table",{style:{borderBottom:"1px solid black"},children:y.jsxs("tbody",{children:[y.jsxs("tr",{children:[y.jsx("td",{class:"inter",children:"duct"}),y.jsx("td",{children:m.duct})]}),y.jsxs("tr",{children:[y.jsx("td",{class:"inter",children:"binding"}),y.jsx("td",{children:m.action})]}),y.jsxs("tr",{children:[y.jsx("td",{class:"inter",children:"request"}),y.jsxs("td",{children:["from ",m.request.source,",",m.request.authenticated?" ":" un","authenticated and",m.request.secure?" ":" in","secure"]})]}),y.jsxs("tr",{children:[y.jsx("td",{class:"inter",children:"response"}),y.jsxs("td",{children:["sent ",m.response.sent," bytes.",y.jsx("br",{}),m.response.header?y.jsxs(y.Fragment,{children:["status ",m.response.header["status-code"],y.jsx("br",{}),m.response.header.headers.reduce((O,E)=>O+E+", ","")]}):null]})]})]})})})),u=t.channels.map(m=>{const O=y.jsxs(y.Fragment,{children:[m.session,y.jsx("table",{style:{borderBottom:"1px solid black"},children:y.jsxs("tbody",{children:[y.jsxs("tr",{children:[y.jsx("td",{class:"inter",children:"identity"}),y.jsx("td",{children:m.identity})]}),y.jsxs("tr",{children:[y.jsx("td",{class:"inter",children:"connected?"}),y.jsx("td",{children:m.connected?"connected":"disconnected, expires "+mr(m.expiry)})]}),y.jsxs("tr",{children:[y.jsx("td",{class:"inter",children:"next-id"}),y.jsx("td",{children:m["next-id"]})]}),y.jsxs("tr",{children:[y.jsx("td",{class:"inter",children:"last-ack"}),y.jsx("td",{children:mr(m["last-ack"])})]}),y.jsxs("tr",{children:[y.jsx("td",{class:"inter",children:"unacked"}),y.jsx("td",{children:m.unacked.reduce((F,B)=>F+B+", ","")})]})]})})]}),E=m.subscriptions.map(F=>({key:`${F.id} ${F.ship} ${F.app} ${F.path}`,jsx:y.jsxs("div",{class:"flex",children:[y.jsx("div",{class:"flex-auto",style:{maxWidth:"15%"},children:F.id}),y.jsxs("div",{class:"flex-auto",style:{maxWidth:"15%"},children:["~",F.ship]}),y.jsx("div",{class:"flex-auto",style:{maxWidth:"20%"},children:F.app}),y.jsx("div",{class:"flex-auto",style:{maxWidth:"35%"},children:F.path}),y.jsx("div",{class:"flex-auto",style:{maxWidth:"15%"},children:F.unacked})]})}));return{key:m.session,jsx:y.jsx(Oo,{summary:O,details:y.jsx(qt,{placeholder:"id, ship, app, path",items:E})})}}),c=t.authentication.sessions.map(m=>({key:m.identity,jsx:y.jsxs("div",{class:"flex",children:[y.jsxs("div",{class:"flex-auto",style:{maxWidth:"5em"},children:[m.cookie.slice(0,6),"…"]}),y.jsxs("div",{class:"flex-auto",style:{width:"40%"},children:["~",m.identity]}),y.jsx("div",{class:"flex-auto",children:mr(m.expiry)}),y.jsxs("div",{class:"flex-auto",children:[m.channels," channel(s)"]}),y.jsx("div",{class:"flex-auto",children:y.jsxs("form",{method:"post",action:"/~/logout?redirect=/~debug/eyre",children:[y.jsx("input",{type:"hidden",name:"sid",value:m.cookie}),y.jsx("button",{type:"submit",name:"all",children:"kick"})]})})]})})),p=t.authentication.visiting.map(m=>({key:"~"+m.who+":"+m.nonce,jsx:y.jsxs("div",{class:"flex",children:[y.jsxs("div",{class:"flex-auto",children:["~",m.who]}),y.jsx("div",{class:"flex-auto",children:m.nonce}),y.jsx("div",{class:"flex-auto",children:m.goal?"pending, will return to "+m.goal:y.jsxs("form",{method:"post",action:"/~/logout?redirect=/~debug/eyre",children:["logged in since ",mr(m.made),y.jsx("input",{type:"hidden",name:"host",value:"~"+m.who}),y.jsx("input",{type:"hidden",name:"sid",value:m.nonce}),y.jsx("button",{type:"submit",name:"eauth",children:"log out"})]})})]})})),v=t.authentication.visitors.map(m=>({key:m.nonce+":~"+m.ship,jsx:y.jsxs("div",{class:"flex",children:[y.jsx("div",{class:"flex-auto",children:m.nonce}),y.jsx("div",{class:"flex-auto",children:m.duct}),m.sesh?y.jsxs("div",{class:"flex-auto",children:["session: ",m.sesh.slice(0,6),"…"]}):y.jsxs(y.Fragment,{children:[y.jsx("div",{class:"flex-auto",children:m.pend?"request pending":"no pending request"}),y.jsx("div",{class:"flex-auto",children:m.ship}),y.jsxs("div",{class:"flex-auto",children:["redirect: ",m.last]}),y.jsx("div",{class:"flex-auto",children:m.toke?"token received":"no token yet"})]})]})}));return y.jsxs(y.Fragment,{children:[y.jsx("h4",{children:"Bindings"}),y.jsx(qt,{placeholder:"binding",items:r,children:y.jsx("button",{onClick:this.loadBindings,children:"refresh"})}),y.jsx("h4",{children:"Cache"}),t.cache.reduce((m,O)=>m+(O.val&&O.val.payload.data||0),0).toLocaleString("de-DE")," bytes in cache",y.jsx(qt,{placeholder:"cache url, LIVE vs CLEARED",items:s,open:!1,children:y.jsx("button",{onClick:this.loadCache,children:"refresh"})}),y.jsx("h4",{children:"Connections"}),y.jsx(qt,{placeholder:"duct, binding",items:a,children:y.jsx("button",{onClick:this.loadConnections,children:"refresh"})}),y.jsx("h4",{children:"Channels"}),y.jsx(qt,{placeholder:"session id",items:u,children:y.jsx("button",{onClick:this.loadChannels,children:"refresh"})}),y.jsx("h4",{children:"Authentication"}),y.jsx("form",{method:"post",action:"/~/logout",children:y.jsx("button",{type:"submit",children:"logout self"})}),y.jsx("form",{method:"post",action:"/~/logout",children:y.jsx("button",{type:"submit",name:"all",children:"logout all selves"})}),y.jsx("br",{}),y.jsx("button",{onClick:this.loadAuthenticationState,children:"refresh"}),y.jsx("h3",{children:"Sessions"}),y.jsx(qt,{placeholder:"identity",items:c,open:!1}),y.jsx("h3",{children:"Outgoing eauth"}),y.jsx(qt,{placeholder:"host",items:p}),y.jsx("h3",{children:"Incoming eauth"}),y.jsx(qt,{placeholder:"visitor",items:v})]})}}class r4 extends oe.Component{constructor(t){super(t),this.state=qe.state,qe.setStateHandler(this.setState.bind(this))}componentDidMount(){new Image().src="/~debug/img/Spinner.png"}render(){const{state:t}=this;return y.jsx(_3,{children:y.jsxs(w3,{children:[y.jsx(ks,{exact:!0,path:"/~debug",render:n=>y.jsx(Cs,{status:t.status,selected:"",children:y.jsx(Aj,{text:"select a component on the left"})})}),y.jsx(ks,{exact:!0,path:Os("apps"),render:n=>y.jsx(Cs,{status:t.status,selected:"apps",children:y.jsx(N6,{apps:t.apps,...n})})}),y.jsx(ks,{exact:!0,path:Os("logs"),render:n=>y.jsx(Cs,{status:t.status,selected:"logs",children:y.jsx($6,{logs:t.logs,...n})})}),y.jsx(ks,{exact:!0,path:Os("spider"),render:n=>y.jsx(Cs,{status:t.status,selected:"spider",children:y.jsx(W6,{threads:t.threads,...n})})}),y.jsx(ks,{exact:!0,path:Os("ames"),render:n=>y.jsx(Cs,{status:t.status,selected:"ames",children:y.jsx(B6,{peers:t.peers,...n})})}),y.jsx(ks,{exact:!0,path:Os("behn"),render:n=>y.jsx(Cs,{status:t.status,selected:"behn",children:y.jsx(z6,{timers:t.timers,...n})})}),y.jsx(ks,{exact:!0,path:Os("clay"),render:n=>y.jsx(Cs,{status:t.status,selected:"clay",children:y.jsx(t4,{commits:t.commits,...n})})}),y.jsx(ks,{exact:!0,path:Os("eyre"),render:n=>y.jsx(Cs,{status:t.status,selected:"eyre",children:y.jsx(n4,{bindings:t.bindings,cache:t.cache,connections:t.connections,authentication:t.authentication,channels:t.channels,...n})})})]})})}}Pg.setAuthTokens({ship:window.ship});console.log("new world!");window.urb=new window.channel;Rj.start();MR.render(y.jsx(r4,{}),document.querySelectorAll("#root")[0]);export{s4 as F,hM as _,o4 as a}; diff --git a/pkg/arvo/sys/lull.hoon b/pkg/arvo/sys/lull.hoon index 7b8aeba89a..9b21160cde 100644 --- a/pkg/arvo/sys/lull.hoon +++ b/pkg/arvo/sys/lull.hoon @@ -765,8 +765,6 @@ :: :: %hear: packet from unix :: %dear: lane from unix - :: %heed: track peer's responsiveness; gives %clog if slow - :: %jilt: stop tracking peer's responsiveness :: %cork: request to delete message flow :: %tame: request to delete route for ship :: %kroc: request to delete specific message flows, from their bones @@ -797,8 +795,6 @@ $+ ames-task $% [%hear =lane =blob] [%dear =ship =lane] - [%heed =ship] - [%jilt =ship] [%cork =ship] [%tame =ship] [%kroc bones=(list [ship bone])] @@ -828,6 +824,7 @@ :: Messaging Gifts :: :: %boon: response message from remote ship + :: %noon: boon with duct for clog tracking :: %clog: notify vane that %boon's to peer are backing up locally :: %done: notify vane that peer (n)acked our message :: %lost: notify vane that we crashed on %boon @@ -845,7 +842,7 @@ :: +$ gift $% [%boon payload=*] - [%clog =ship] + [%noon id=* payload=*] [%done error=(unit error)] [%lost ~] [%send =lane =blob] @@ -1012,13 +1009,11 @@ :: :: messages: pleas local vanes have asked us to send :: packets: packets we've tried to send - :: heeds: local tracking requests; passed through into $peer-state :: +$ alien-agenda $+ alien-agenda $: messages=(list [=duct =plea]) packets=(set =blob) - heeds=(set duct) keens=(jug path duct) chums=(jug path duct) == @@ -1040,7 +1035,6 @@ :: information completes the packet+nack-trace, we remove the :: entry and emit a nack to the local vane that asked us to send :: the message. - :: heeds: listeners for %clog notifications :: closing: bones closed on the sender side :: corked: bones closed on both sender and receiver :: @@ -1058,7 +1052,6 @@ snd=(map bone message-pump-state) rcv=(map bone message-sink-state) nax=(set [=bone =message-num]) - heeds=(set duct) closing=(set bone) corked=(set bone) keens=(map path keen-state) @@ -2733,13 +2726,15 @@ |% +$ gift :: outgoing result $% [%boon payload=*] :: ames response + [%noon id=* payload=*] [%done error=(unit error:ames)] :: ames message (n)ack [%flub ~] :: not ready to handle plea [%unto p=unto] :: == :: +$ task :: incoming request $~ [%vega ~] :: - $% [%deal p=sack q=term r=deal] :: full transmission + $% [%clog id=*] :: clog notification + [%deal p=sack q=term r=deal] :: full transmission [%sear =ship] :: clear pending queues [%jolt =desk =dude] :: (re)start agent [%idle =dude] :: suspend agent diff --git a/pkg/arvo/sys/vane/ames.hoon b/pkg/arvo/sys/vane/ames.hoon index ed9740bdc8..f42f80f04f 100644 --- a/pkg/arvo/sys/vane/ames.hoon +++ b/pkg/arvo/sys/vane/ames.hoon @@ -76,13 +76,6 @@ :: Ames's perspective, the newly restarted peer is a new ship. :: Ames's guarantees are not maintained across a breach. :: -:: A vane can pass Ames a %heed $task to request Ames track a peer's -:: responsiveness. If our %boon's to it start backing up locally, -:: Ames will give a %clog back to the requesting vane containing the -:: unresponsive peer's urbit address. This interaction does not use -:: ducts as unique keys. Stop tracking a peer by sending Ames a -:: %jilt $task. -:: :: Debug output can be adjusted using %sift and %spew $task's. :: !: @@ -218,10 +211,7 @@ :: ++ parse-bone-wire |= =wire - ^- %- unit - $% [%old her=ship =bone] - [%new her=ship =rift =bone] - == + ^- (unit parsed-bone-wire) ?. ?| ?=([%bone @ @ @ ~] wire) ?=([%bone @ @ ~] wire) == @@ -239,6 +229,11 @@ `@ud`(slav %ud i.t.t.wire) `@ud`(slav %ud i.t.t.t.wire) == +:: ++$ parsed-bone-wire + $% [%old her=ship =bone] + [%new her=ship =rift =bone] + == :: +make-pump-timer-wire: construct wire for |packet-pump timer :: ++ make-pump-timer-wire @@ -620,7 +615,7 @@ :: dead: dead flow consolidation timer and recork timer, if set :: +$ ames-state - $+ ames-state-20 + $+ ames-state-21 $: peers=(map ship ship-state) =unix=duct =life @@ -1336,7 +1331,7 @@ :: +$ ames-state-19 $+ ames-state-19 - $: peers=(map ship ship-state) + $: peers=(map ship ship-state-20) =unix=duct =life =rift @@ -1351,6 +1346,74 @@ :: =chain == +:: ++$ task-20 + $+ task-20 + $% task + [%heed =ship] + [%jilt =ship] + == +:: ++$ queued-event-20 + $+ queued-event-20 + $% [%call =duct wrapped-task=(hobo task-20)] + [%take =wire =duct =sign] + == +:: ++$ peer-state-20 + $+ peer-state-20 + $: $: =symmetric-key + =life + =rift + =public-key + sponsor=ship + == + route=(unit [direct=? =lane]) + =qos + =ossuary + snd=(map bone message-pump-state) + rcv=(map bone message-sink-state) + nax=(set [=bone =message-num]) + heeds=(set duct) + closing=(set bone) + corked=(set bone) + keens=(map path keen-state) + =chain + == +:: ++$ alien-agenda-20 + $+ alien-agenda-20 + $: messages=(list [=duct =plea]) + packets=(set =blob) + heeds=(set duct) + keens=(jug path duct) + chums=(jug path duct) + == +:: ++$ ship-state-20 + $+ ship-state-20 + $% [%alien alien-agenda-20] + [%known peer-state-20] + == +:: ++$ ames-state-20 + $+ ames-state-20 + $: peers=(map ship ship-state-20) + =unix=duct + =life + =rift + crypto-core=acru:ames + =bug + snub=[form=?(%allow %deny) ships=(set ship)] + cong=[msg=_5 mem=_100.000] + :: + $= dead + $: flow=[%flow (unit dead-timer)] + cork=[%cork (unit dead-timer)] + == + :: + =chain + == :: $bug: debug printing configuration :: :: veb: verbosity toggles @@ -1399,7 +1462,7 @@ $>(%flog task:dill) == $: %g - $>(%deal task:gall) + $>(?(%clog %deal) task:gall) == $: %j $> $? %private-keys @@ -1433,7 +1496,7 @@ gift:jael == $: @tas - $>(?(%boon %done) gift:ames) + $>(?(%noon %boon %done) gift:ames) == == :: :: $message-pump-task: job for |message-pump @@ -1504,7 +1567,8 @@ [%17 ames-state-17] [%18 ames-state-17] [%19 ames-state-19] - [%20 ^ames-state] + [%20 ames-state-20] + [%21 ^ames-state] == :: |= [now=@da eny=@ rof=roof] @@ -1627,7 +1691,7 @@ :: lifecycle arms; mostly pass-throughs to the contained adult ames :: ++ scry scry:adult-core - ++ stay [%20 %larva queued-events ames-state.adult-gate] + ++ stay [%10 %larva queued-events ames-state.adult-gate] ++ load |= $= old $% $: %4 @@ -1737,12 +1801,19 @@ == == $: %19 :: %keen & %deep modified $% $: %larva - events=(qeu queued-event) + events=(qeu queued-event-20) state=ames-state-19 == [%adult state=ames-state-19] == == $: %20 :: start informal %ping + $% $: %larva + events=(qeu queued-event-20) + state=ames-state-20 + == + [%adult state=ames-state-20] + == == + $: %21 :: remove %heed and %jilt $% $: %larva events=(qeu queued-event) state=_ames-state.adult-gate @@ -1810,7 +1881,8 @@ [%9 %larva *] ~> %slog.0^leaf/"ames: larva %9 load" =. cached-state `[%9 state.old] - =. queued-events %- event-17-and-18-to-last + =. queued-events %- event-20-to-21 + %- event-17-and-18-to-last %- event-12-til-16-to-17 %- event-9-til-11-to-12 events.old @@ -1824,7 +1896,8 @@ [%10 %larva *] ~> %slog.1^leaf/"ames: larva %10 load" =. cached-state `[%10 state.old] - =. queued-events %- event-17-and-18-to-last + =. queued-events %- event-20-to-21 + %- event-17-and-18-to-last %- event-12-til-16-to-17 %- event-9-til-11-to-12 events.old @@ -1838,7 +1911,8 @@ [%11 %larva *] ~> %slog.1^leaf/"ames: larva %11 load" =. cached-state `[%11 state.old] - =. queued-events %- event-17-and-18-to-last + =. queued-events %- event-20-to-21 + %- event-17-and-18-to-last %- event-12-til-16-to-17 %- event-9-til-11-to-12 events.old @@ -1852,7 +1926,8 @@ [%12 %larva *] ~> %slog.1^leaf/"ames: larva %12 load" =. cached-state `[%12 state.old] - =. queued-events %- event-17-and-18-to-last + =. queued-events %- event-20-to-21 + %- event-17-and-18-to-last %- event-12-til-16-to-17 events.old larval-gate @@ -1865,7 +1940,8 @@ [%13 %larva *] ~> %slog.1^leaf/"ames: larva %13 load" =. cached-state `[%13 state.old] - =. queued-events %- event-17-and-18-to-last + =. queued-events %- event-20-to-21 + %- event-17-and-18-to-last %- event-12-til-16-to-17 events.old larval-gate @@ -1878,7 +1954,8 @@ [%14 %larva *] ~> %slog.1^leaf/"ames: larva %14 load" =. cached-state `[%14 state.old] - =. queued-events %- event-17-and-18-to-last + =. queued-events %- event-20-to-21 + %- event-17-and-18-to-last %- event-12-til-16-to-17 events.old larval-gate @@ -1891,7 +1968,8 @@ [%15 %larva *] ~> %slog.1^leaf/"ames: larva %15 load" =. cached-state `[%15 state.old] - =. queued-events %- event-17-and-18-to-last + =. queued-events %- event-20-to-21 + %- event-17-and-18-to-last %- event-12-til-16-to-17 events.old larval-gate @@ -1904,7 +1982,8 @@ [%16 %larva *] ~> %slog.1^leaf/"ames: larva %16 load" =. cached-state `[%16 state.old] - =. queued-events %- event-17-and-18-to-last + =. queued-events %- event-20-to-21 + %- event-17-and-18-to-last %- event-12-til-16-to-17 events.old larval-gate @@ -1917,7 +1996,7 @@ [%17 %larva *] ~> %slog.1^leaf/"ames: larva %17 load" =. cached-state `[%17 state.old] - =. queued-events (event-17-and-18-to-last events.old) + =. queued-events (event-20-to-21 (event-17-and-18-to-last events.old)) larval-gate :: [%18 %adult *] @@ -1928,7 +2007,7 @@ [%18 %larva *] ~> %slog.1^leaf/"ames: larva %18 load" =. cached-state `[%18 state.old] - =. queued-events (event-17-and-18-to-last events.old) + =. queued-events (event-20-to-21 (event-17-and-18-to-last events.old)) larval-gate :: [%19 %adult *] @@ -1939,15 +2018,26 @@ [%19 %larva *] ~> %slog.1^leaf/"ames: larva %19 load" =. cached-state `[%19 state.old] - =. queued-events events.old + =. queued-events (event-20-to-21 events.old) larval-gate :: - [%20 %adult *] (load:adult-core %20 state.old) + [%20 %adult *] + =. cached-state `[%20 state.old] + ~> %slog.0^leaf/"ames: larva %20 reload" + larval-gate :: [%20 %larva *] ~> %slog.1^leaf/"ames: larva %20 load" + =. cached-state `[%20 state.old] + =. queued-events (event-20-to-21 events.old) + larval-gate + :: + [%21 %adult *] (load:adult-core %21 state.old) + :: + [%21 %larva *] + ~> %slog.1^leaf/"ames: larva %21 load" =. queued-events events.old - =. adult-gate (load:adult-core %20 state.old) + =. adult-gate (load:adult-core %21 state.old) larval-gate == :: @@ -2005,6 +2095,15 @@ %naxplanation [%deep %nack ship.task nack-bone.task ;;(message [hed msg])] == + ++ event-20-to-21 + |= events=(qeu queued-event-20) + ^- (qeu queued-event) + %- ~(rep in events) + |= [e=queued-event-20 q=(qeu queued-event)] + ?. ?=(%call -.e) (~(put to q) e) + =/ task=task-20 ((harden task-20) wrapped-task.e) + ?: ?=(?(%heed %jilt) -.task) q + (~(put to q) e(wrapped-task task)) -- :: +molt: re-evolve to adult-ames :: @@ -2075,7 +2174,9 @@ =+ ev-core=(ev [now eny rof] [/saxo]~ ames-state.adult-gate) [unix-duct.+.u.cached-state %give %saxo get-sponsors:ev-core] :: - ?> ?=(%20 -.u.cached-state) + =? u.cached-state ?=(%20 -.u.cached-state) + 21+(state-20-to-21:load:adult-core +.u.cached-state) + ?> ?=(%21 -.u.cached-state) =. ames-state.adult-gate +.u.cached-state [moz larval-core(cached-state ~)] -- @@ -2174,27 +2275,14 @@ ~> %slog.0^leaf/"ames: dropping malformed wire: {(spud wire)}" event-core ?> ?=([@ her=ship *] u.parsed) - =* her her.u.parsed - =/ peer-core (abed-got:pe her) - |^ - ?: ?& ?=([%new *] u.parsed) - (lth rift.u.parsed rift.peer-state.peer-core) - == - :: ignore events from an old rift - :: - %- %^ ev-trace odd.veb her - |.("dropping old rift wire: {(spud wire)}") + =/ peer-core (abed-got:pe her.u.parsed) + ?~ bon=(bone-ok u.parsed wire rift.peer-state.peer-core) event-core - =/ =bone - ?-(u.parsed [%new *] bone.u.parsed, [%old *] bone.u.parsed) - =? peer-core ?=([%old *] u.parsed) - %- %^ ev-trace odd.veb her - |.("parsing old wire: {(spud wire)}") - peer-core + |^ :: relay the vane ack to the foreign peer :: =< abet - ?~(error (send-ack bone) (send-nack bone u.error)) + ?~(error (send-ack u.bon) (send-nack u.bon u.error)) :: :: if processing succeded, send positive ack packet and exit :: @@ -2381,28 +2469,6 @@ |= =error ^+ event-core (emit duct %pass /crud %d %flog %crud error) - :: +on-heed: handle request to track .ship's responsiveness - :: - ++ on-heed - |= =ship - ^+ event-core - =/ ship-state (~(get by peers.ames-state) ship) - ?: ?=([~ %known *] ship-state) - abet:on-heed:(abed-peer:pe ship +.u.ship-state) - %^ enqueue-alien-todo ship ship-state - |= todos=alien-agenda - todos(heeds (~(put in heeds.todos) duct)) - :: +on-jilt: handle request to stop tracking .ship's responsiveness - :: - ++ on-jilt - |= =ship - ^+ event-core - =/ ship-state (~(get by peers.ames-state) ship) - ?: ?=([~ %known *] ship-state) - abet:on-jilt:(abed-peer:pe ship +.u.ship-state) - %^ enqueue-alien-todo ship ship-state - |= todos=alien-agenda - todos(heeds (~(del in heeds.todos) duct)) :: +on-dear: handle lane from unix :: ++ on-dear @@ -2634,6 +2700,40 @@ :: =< abet (~(on-hear-shut-packet pe peer-state channel) [lane u.shut-packet dud]) + :: + ++ bone-ok + |= [parsed=parsed-bone-wire =wire =rift] + ^- (unit bone) + =* her her.parsed + :: + ?: ?& ?=([%new *] parsed) + (lth rift.parsed rift) + == + :: ignore events from an old rift + :: + %- %^ ev-trace odd.veb her + |.("dropping old rift wire: {(spud wire)}") + ~ + =/ =bone + ?-(parsed [%new *] bone.parsed, [%old *] bone.parsed) + =+ ?. ?=([%old *] parsed) ~ + %- %^ ev-trace odd.veb her + |.("parsing old wire: {(spud wire)}") + ~ + `bone + :: + ++ on-take-noon + |= [=wire payload=* id=*] + ^+ event-core + ?~ parsed=(parse-bone-wire wire) + ~> %slog.0^leaf/"ames: dropping malformed wire: {(spud wire)}" + event-core + ?> ?=([@ her=ship *] u.parsed) + =/ peer-core (abed-got:pe her.u.parsed) + ?~ bone=(bone-ok u.parsed wire rift.peer-state.peer-core) + event-core + :: + abet:(check-clog:(on-memo:peer-core u.bone [%boon payload]) u.bone id) :: +on-take-boon: receive request to give message to peer :: ++ on-take-boon @@ -2644,24 +2744,10 @@ event-core :: ?> ?=([@ her=ship *] u.parsed) - =* her her.u.parsed - =/ peer-core (abed-got:pe her) - :: - ?: ?& ?=([%new *] u.parsed) - (lth rift.u.parsed rift.peer-state.peer-core) - == - :: ignore events from an old rift - :: - %- %^ ev-trace odd.veb her - |.("dropping old rift wire: {(spud wire)}") + =/ peer-core (abed-got:pe her.u.parsed) + ?~ bone=(bone-ok u.parsed wire rift.peer-state.peer-core) event-core - =/ =bone - ?-(u.parsed [%new *] bone.u.parsed, [%old *] bone.u.parsed) - =? peer-core ?=([%old *] u.parsed) - %- %^ ev-trace odd.veb her - |.("parsing old wire: {(spud wire)}") - peer-core - abet:(on-memo:peer-core bone [%boon payload]) + abet:(on-memo:peer-core u.bone [%boon payload]) :: +on-plea: handle request to send message :: ++ on-plea @@ -3172,12 +3258,6 @@ :: save current duct :: =/ original-duct duct - :: apply heeds - :: - =. event-core - %+ roll ~(tap in heeds.todos) - |= [=^duct core=_event-core] - (on-heed:core(duct duct) ship) :: apply outgoing messages, reversing for FIFO order :: =. event-core @@ -3590,11 +3670,7 @@ :: +| %tasks :: - ++ on-heed - peer-core(heeds.peer-state (~(put in heeds.peer-state) duct)) :: - ++ on-jilt - peer-core(heeds.peer-state (~(del in heeds.peer-state) duct)) :: +update-qos: update and maybe print connection status :: ++ update-qos @@ -3611,12 +3687,7 @@ peer-core :: print message :: - =. peer-core (pe-emit duct %pass /qos %d %flog %text u.text) - :: if peer has stopped responding, check if %boon's are backing up - :: - ?. ?=(?(%dead %unborn) -.qos.peer-state) - peer-core - check-clog + (pe-emit duct %pass /qos %d %flog %text u.text) :: +on-hear-shut-packet: handle receipt of ack or message fragment :: ++ on-hear-shut-packet @@ -3655,6 +3726,15 @@ |= =bone ^+ peer-core abet:(call:(abed:mi:peer-core bone) %flub ~) + :: + ++ check-clog + |= [=bone id=*] + ^+ peer-core + =/ =message-pump-state (~(got by snd.peer-state) bone) + ~& [%check-clog unsent-messages.message-pump-state] + ?: (gth ~(wyt in unsent-messages.message-pump-state) msg.cong.ames-state) + (pe-emit [/ames]~ %pass /clog %g %clog id) + peer-core :: +on-memo: handle request to send message :: ++ on-memo @@ -3669,13 +3749,7 @@ ~> %slog.0^leaf/"ames: ignoring message on corked bone {}" peer-core :: - =. peer-core abet:(call:(abed:mu bone) %memo message) - :: - ?: ?& ?=(%boon -.message) - (gte now (add ~s30 last-contact.qos.peer-state)) - == - check-clog - peer-core + abet:(call:(abed:mu bone) %memo message) :: +on-wake: handle timer expiration :: ++ on-wake @@ -3803,55 +3877,6 @@ recork-one :: +| %implementation - :: +check-clog: notify clients if peer has stopped responding - :: - ++ check-clog - ^+ peer-core - :: - :: Only look at response bones. Request bones are unregulated, - :: since requests tend to be much smaller than responses. - :: - =/ pumps=(list message-pump-state) - %+ murn ~(tap by snd.peer-state) - |= [=bone =message-pump-state] - ?: =(0 (end 0 bone)) - ~ - `u=message-pump-state - :: if clogged, notify client vane - :: - |^ ?. &(nuf-messages nuf-memory) peer-core - %+ roll ~(tap in heeds.peer-state) - |=([d=^duct core=_peer-core] (pe-emit:core d %give %clog her)) - :: +nuf-messages: are there enough messages to mark as clogged? - :: - ++ nuf-messages - =| num=@ud - |- ^- ? - ?~ pumps | - =. num - ;: add num - (sub [next current]:i.pumps) - ~(wyt in unsent-messages.i.pumps) - == - ?: (gte num msg.cong.ames-state) - & - $(pumps t.pumps) - :: +nuf-memory: is enough memory used to mark as clogged? - :: - ++ nuf-memory - =| mem=@ud - |- ^- ? - ?~ pumps | - =. mem - %+ add - %- ~(rep in unsent-messages.i.pumps) - |=([m=message b=_mem] (add b (met 3 (jim m)))) - ?~ unsent-fragments.i.pumps 0 - (met 3 fragment.i.unsent-fragments.i.pumps) - ?: (gte mem mem.cong.ames-state) - & - $(pumps t.pumps) - -- :: +send-shut-packet: fire encrypted packet at rcvr and maybe sponsors :: ++ send-shut-packet @@ -5406,9 +5431,7 @@ %born on-born:event-core %hear (on-hear:event-core [lane blob ~]:task) %dear (on-dear:event-core +.task) - %heed (on-heed:event-core ship.task) %init on-init:event-core - %jilt (on-jilt:event-core ship.task) %prod (on-prod:event-core ships.task) %sift (on-sift:event-core ships.task) %snub (on-snub:event-core [form ships]:task) @@ -5438,7 +5461,7 @@ |= [=wire =duct dud=(unit goof) =sign] ^- [(list move) _ames-gate] ?^ dud - ~|(%ames-take-dud (mean tang.u.dud)) + ~&(%ames-take-dud (mean tang.u.dud)) :: =/ event-core (ev [now eny rof] duct ames-state) :: @@ -5450,6 +5473,7 @@ ?- sign [@ %done *] (on-take-done:event-core wire error.sign) [@ %boon *] (on-take-boon:event-core wire payload.sign) + [@ %noon *] (on-take-noon:event-core wire payload.sign id.sign) :: [%ames %tune *] (on-tune:event-core wire [[ship path] roar]:sign) :: @@ -5465,15 +5489,15 @@ [moves ames-gate] :: +stay: extract state before reload :: -++ stay [%20 %adult ames-state] +++ stay [%21 %adult ames-state] :: +load: load in old state after reload :: ++ load =< |= $= old-state - $% [%20 ^ames-state] + $% [%21 ^ames-state] == ^+ ames-gate - ?> ?=(%20 -.old-state) + ?> ?=(%21 -.old-state) ames-gate(ames-state +.old-state) :: all state transitions are called from larval ames :: @@ -5715,7 +5739,7 @@ peers %- ~(run by peers.old) |= s=ship-state-17 - ^- ship-state + ^- ship-state-20 ?: ?=(%alien -.s) %= s keens [keens.s ~] @@ -5748,10 +5772,25 @@ :: ++ state-19-to-20 |= old=ames-state-19 - ^- ^ames-state + ^- ames-state-20 %= old veb.bug [&1 &2 &3 &4 &5 &6 &7 &8 |8 %.n]:veb.bug.old == + :: + ++ state-20-to-21 + |= old=ames-state-20 + ^- ^ames-state + %= old + peers + %- ~(run by peers.old) + |= s=ship-state-20 + ^- ship-state + ?: ?=(%alien -.s) + [%alien messages.s packets.s keens.s chums.s] + :* -.s -.+.s route.s qos.s ossuary.s snd.s rcv.s + nax.s closing.s corked.s keens.s chain.s + == + == -- :: +scry: dereference namespace :: diff --git a/pkg/arvo/sys/vane/gall.hoon b/pkg/arvo/sys/vane/gall.hoon index fd4eb5bce9..f722b18c1e 100644 --- a/pkg/arvo/sys/vane/gall.hoon +++ b/pkg/arvo/sys/vane/gall.hoon @@ -594,9 +594,6 @@ :: first contact; update state and subscribe to notifications :: =. contacts.state (~(put in contacts.state) ship) - :: ask ames to track .ship's connectivity - :: - =. moves [[system-duct.state %pass /sys/lag %a %heed ship] moves] :: ask jael to track .ship's breaches :: =/ =note-arvo [%j %public-keys (silt ship ~)] @@ -616,8 +613,6 @@ :: =. contacts.state (~(del in contacts.state) ship) :: - =. moves [[system-duct.state %pass /sys/lag %a %jilt ship] moves] - :: =/ =note-arvo [%j %nuke (silt ship ~)] =. moves [[system-duct.state %pass /sys/era note-arvo] moves] @@ -657,7 +652,6 @@ %lyv ..mo-core :: vestigial %cor ..mo-core :: vestigial %era (mo-handle-sys-era wire sign-arvo) - %lag (mo-handle-sys-lag wire sign-arvo) %req (mo-handle-sys-req wire sign-arvo) %way (mo-handle-sys-way wire sign-arvo) == @@ -671,24 +665,20 @@ ?. ?=(%breach -.public-keys-result.sign-arvo) mo-core (mo-breach /jael who.public-keys-result.sign-arvo) - :: +mo-handle-sys-lag: handle an ames %clog notification + :: +mo-handle-sys-clog: handle an ames %clog notification :: - ++ mo-handle-sys-lag - |= [=wire =sign-arvo] + ++ mo-handle-sys-clog + |= [=duct agent-name=term] ^+ mo-core + =/ yoke (~(get by yokes.state) agent-name) + ?~ yoke + mo-core + =? mo-core ?=(%live -.u.yoke) + =/ app (ap-abed:ap agent-name [~ our /ames]) + ap-abet:(ap-clog:app duct) :: - ?> ?=([%lag ~] wire) - ?> ?=([%ames %clog *] sign-arvo) - :: - =/ agents=(list [=dude =yoke]) ~(tap by yokes.state) - |- ^+ mo-core - ?~ agents mo-core - :: - =? mo-core ?=(%live -.yoke.i.agents) - =/ app (ap-abed:ap dude.i.agents [~ our /ames]) - ap-abet:(ap-clog:app ship.sign-arvo) - :: - $(agents t.agents) + mo-core + :: :: +mo-handle-sys-req: TODO description :: :: TODO: what should we do if the remote nacks our %pull? @@ -699,7 +689,6 @@ ?> ?=([%req @ @ ~] wire) =/ him (slav %p i.t.wire) =/ dap i.t.t.wire - :: ?> ?=([?(%gall %behn) %unto *] sign-arvo) =/ =unto +>.sign-arvo :: @@ -713,7 +702,7 @@ :: %fact =+ [mark noun]=[p q.q]:cage.unto - (mo-give %boon %d mark noun) + (mo-give %noon [dap [/gall/sys/req/[i.t.wire]/[dap] hen]] %d mark noun) :: %kick (mo-give %boon %x ~) @@ -734,6 +723,7 @@ =/ foreign-agent i.t.t.wire :: ?+ sign-arvo !! + :: [%ames %done *] =/ err=(unit tang) ?~ error=error.sign-arvo @@ -1653,17 +1643,11 @@ :: TODO: %drip local app notification for error isolation :: ++ ap-clog - |= =ship + |= =duct ^+ ap-core :: - =/ in=(list [=duct =^ship =path]) ~(tap by bitt.yoke) - |- ^+ ap-core - ?~ in ap-core - :: - =? ap-core =(ship ship.i.in) - =/ core ap-kill-up(agent-duct duct.i.in) - core(agent-duct agent-duct) - $(in t.in) + =/ core ap-kill-up(agent-duct duct) + core(agent-duct agent-duct) :: +ap-agent-core: agent core with current bowl and state :: ++ ap-agent-core @@ -2369,6 +2353,10 @@ :: =/ mo-core (mo-abed:mo duct) ?- -.task + %clog + =+ ;;([dap=@tas =^duct] id.task) + mo-abet:(mo-handle-sys-clog:mo-core duct dap) + :: %deal =/ [=sack =term =deal] [p q r]:task ?. =(q.sack our) @@ -2462,6 +2450,7 @@ blocked=(map term (qeu blocked-move-13)) =bug == + :: +$ blocked-move-13 [=duct routes=routes-13 move=(each deal unto)] +$ routes-13 $: disclosing=(unit (set ship)) diff --git a/pkg/interface/dbug/src/js/views/ames.jsx b/pkg/interface/dbug/src/js/views/ames.jsx index f6eadc7660..cd4fc5aa4e 100644 --- a/pkg/interface/dbug/src/js/views/ames.jsx +++ b/pkg/interface/dbug/src/js/views/ames.jsx @@ -46,16 +46,6 @@ export class Ames extends Component { return ; } - renderDucts(ducts) { - const items = ducts.map(duct => { - return { - key: duct.join(' '), - jsx: (
{renderDuct(duct)}
) - } - }); - return - } - renderSnd(snd) { const unsent = snd['unsent-messages'].reduce((a, b) => { return a + b + ' bytes, '; @@ -309,7 +299,6 @@ export class Ames extends Component { return (<> Pending messages: {peer.alien.messages} Pending packets: {peer.alien.packets} - Heeds: {this.renderDucts(peer.alien.heeds)} Keens: {this.renderPaths(peer.alien.keens)} ); } else if (peer.known) { @@ -373,11 +362,6 @@ export class Ames extends Component { ); - const heeds = (<> -

heeds

- {this.renderDucts(p.heeds)} - ); - const scryItems = p.scries.map(this.renderScry); const scry = (<>

scries

@@ -395,7 +379,6 @@ export class Ames extends Component { {forward} {backward} {nax} - {heeds} {scry} ); } else { diff --git a/tests/sys/grq.hoon b/tests/sys/grq.hoon index 6829d38fbf..8e73a679dc 100644 --- a/tests/sys/grq.hoon +++ b/tests/sys/grq.hoon @@ -33,8 +33,7 @@ [~1111.1.1 0xdead.beef *roof] :- ~[/use/sub/0w1.d6Isf/out/~bud/pub/1/sub-foo/~bud /init] [%deal [~nec ~bud /] %pub %watch /foo] - :~ :- ~[/init] [%pass /sys/lag %a %heed ~bud] - :- ~[/init] [%pass /sys/era %j %public-keys (sy ~bud ~)] + :~ :- ~[/init] [%pass /sys/era %j %public-keys (sy ~bud ~)] :- ~[/use/sub/0w1.d6Isf/out/~bud/pub/1/sub-foo/~bud /init] [%pass /sys/way/~bud/pub %a %plea ~bud %g /ge/pub [%0 %s /foo]] == @@ -84,8 +83,7 @@ [~1111.1.2 0xbeef.dead *roof] :- ~[/bone/~nec/0/1 //unix] [%plea ~nec %g /ge/pub [%0 %s /foo]] - :~ :- ~[/init] [%pass /sys/lag %a %heed ~nec] - :- ~[/init] [%pass /sys/era %j %public-keys (sy ~nec ~)] + :~ :- ~[/init] [%pass /sys/era %j %public-keys (sy ~nec ~)] :- ~[/bone/~nec/0/1 //unix] [%pass /sys/req/~nec/pub %g %deal [~nec ~bud /] %pub %watch /foo] == @@ -172,18 +170,6 @@ ~ == :- t11 |. :- %| - :: start the clog and kick process; give clog to publisher gall - ~? > dbug 'start the clog and kick process; give clog to publisher gall' - =^ t12 gall.bud - %: gall-check-take:v gall.bud - [~1111.1.4 0xbeef.dead *roof] - :+ /sys/lag ~[/init] - [%ames %clog ~nec] - :~ :- ~[/sys/req/~nec/pub /bone/~nec/0/1 //unix] - [%give %unto %kick ~] - == - == - :- t12 |. :- %| :: gall gives %kick %boon to ames ~? > dbug 'gall gives %kick %boon to ames' =^ t13 gall.bud