Add favorites

This commit is contained in:
Jack Kingsman committed 2026-01-16 16:35:43 -08:00
1 parent 156b129af4
commit cfa7f53836
14 files changed
+844 -586

No files matched your search

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 16 KiB

@@ -1 +1 @@
.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::-moz-selection{background:transparent}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{border:2px dotted #38f;background:#ffffff80}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px #000000a6;border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottLine truncated
.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::-moz-selection{background:transparent}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{border:2px dotted #38f;background:#ffffff80}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px #000000a6;border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottLine truncated
-541
View File
@@ -1,541 +0,0 @@
var Av=Object.defineProperty;var gv=(r,a,s)=>a in r?Av(r,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[a]=s;var Fo=(r,a,s)=>gv(r,typeof a!="symbol"?a+"":a,s);function xv(r,a){for(var s=0;s<a.length;s++){const l=a[s];if(typeof l!="string"&&!Array.isArray(l)){for(const f in l)if(f!=="default"&&!(f in r)){const d=Object.getOwnPropertyDescriptor(l,f);d&&Object.defineProperty(r,f,d.get?d:{enumerable:!0,get:()=>l[f]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))l(f);new MutationObserver(f=>{for(const d of f)if(d.type==="childList")for(const m of d.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&l(m)}).observe(document,{childList:!0,subtree:!0});function s(f){const d={};return f.integrity&&(d.integrity=f.integrity),f.referrerPolicy&&(d.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?d.credentials="include":f.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function l(f){if(f.ep)return;f.ep=!0;const d=s(f);fetch(f.href,d)}})();var yf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Us(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function yA(r){if(Object.prototype.hasOwnProperty.call(r,"__esModule"))return r;var a=r.default;if(typeof a=="function"){var s=function l(){return this instanceof l?Reflect.construct(a,arguments,this.constructor):a.apply(this,arguments)};s.prototype=a.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(r).forEach(function(l){var f=Object.getOwnPropertyDescriptor(r,l);Object.defineProperty(s,l,f.get?f:{enumerable:!0,get:function(){return r[l]}})}),s}var _f={exports:{}},Ma={},wf={exports:{}},st={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var fp;function vv(){if(fp)return st;fp=1;var r=Symbol.for("react.element"),a=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),d=Symbol.for("react.provider"),m=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),v=Symbol.iterator;function w(D){return D===null||typeof D!="object"?null:(D=v&&D[v]||D["@@iterator"],typeof D=="function"?D:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,b={};function E(D,Z,K){this.props=D,this.context=Z,this.refs=b,this.updater=K||S}E.prototype.isReactComponent={},E.prototype.setState=function(D,Z){if(typeof D!="object"&&typeof D!="function"&&D!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,D,Z,"setState")},E.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function P(){}P.prototype=E.prototype;function B(D,Z,K){this.props=D,this.context=Z,this.refs=b,this.updater=K||S}var k=B.prototype=new P;k.constructor=B,T(k,E.prototype),k.isPureReactComponent=!0;var N=Array.isArray,I=Object.prototype.hasOwnProperty,z={current:null},j={key:!0,ref:!0,__self:!0,__source:!0};function H(D,Z,K){var X,fe={},he=null,ke=null;if(Z!=null)for(X in Z.ref!==void 0&&(ke=Z.ref),Z.key!==void 0&&(he=""+Z.key),Z)I.call(Z,X)&&!j.hasOwnProperty(X)&&(fe[X]=Z[X]);var Ae=arguments.length-2;if(Ae===1)fe.children=K;else if(1<Ae){for(var qe=Array(Ae),Ye=0;Ye<Ae;Ye++)qe[Ye]=arguments[Ye+2];fe.children=qe}if(D&&D.defaultProps)for(X in Ae=D.defaultProps,Ae)fe[X]===void 0&&(fe[X]=Ae[X]);return{$$typeof:r,type:D,key:he,ref:ke,props:fe,_owner:z.current}}function $(D,Z){return{$$typeof:r,type:D.type,key:Z,ref:D.ref,props:D.props,_owner:D._owner}}function U(D){return typeof D=="object"&&D!==null&&D.$$typeof===r}function G(D){var Z={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(K){return Z[K]})}var re=/\/+/g;function V(D,Z){return typeof D=="object"&&D!==null&&D.key!=null?G(""+D.key):Z.toString(36)}function J(D,Z,K,X,fe){var he=typeof D;(he==="undefined"||he==="boolean")&&(D=null);var ke=!1;if(D===null)ke=!0;else switch(he){case"string":case"number":ke=!0;break;case"object":switch(D.$$typeof){case r:case a:ke=!0}}if(ke)return ke=D,fe=fe(ke),D=X===""?"."+V(ke,0):X,N(fe)?(K="",D!=null&&(K=D.replace(re,"$&/")+"/"),J(fe,Z,K,"",function(Ye){return Ye})):fe!=null&&(U(fe)&&(fe=$(fe,K+(!fe.key||ke&&ke.key===fe.key?"":(""+fe.key).replace(re,"$&/")+"/")+D)),Z.push(fe)),1;if(ke=0,X=X===""?".":X+":",N(D))for(var Ae=0;Ae<D.length;Ae++){he=D[Ae];var qe=X+V(he,Ae);ke+=J(he,Z,K,qe,fe)}else if(qe=w(D),typeof qe=="function")for(D=qe.call(D),Ae=0;!(he=D.next()).done;)he=he.value,qe=X+V(he,Ae++),ke+=J(he,Z,K,qe,fe);else if(he==="object")throw Z=String(D),Error("Objects are not valid as a React child (found: "+(Z==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":Z)+"). If you meant to render a collection of children, use an array instead.");return ke}function le(D,Z,K){if(D==null)return D;var X=[],fe=0;return J(D,X,"","",function(he){return Z.call(K,he,fe++)}),X}function se(D){if(D._status===-1){var Z=D._result;Z=Z(),Z.then(function(K){(D._status===0||D._status===-1)&&(D._status=1,D._result=K)},function(K){(D._status===0||D._status===-1)&&(D._status=2,D._result=K)}),D._status===-1&&(D._status=0,D._result=Z)}if(D._status===1)return D._result.default;throw D._result}var de={current:null},q={transition:null},ge={ReactCurrentDispatcher:de,ReactCurrentBatchConfig:q,ReactCurrentOwner:z};function ne(){throw Error("act(...) is not supported in production builds of React.")}return st.Children={map:le,forEach:function(D,Z,K){le(D,function(){Z.apply(this,arguments)},K)},count:function(D){var Z=0;return le(D,function(){Z++}),Z},toArray:function(D){return le(D,function(Z){return Z})||[]},only:function(D){if(!U(D))throw Error("React.Children.only expected to receive a single React element child.");return D}},st.Component=E,st.Fragment=s,st.Profiler=f,st.PureComponent=B,st.StrictMode=l,st.Suspense=x,st.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ge,st.act=ne,st.cloneElement=function(D,Z,K){if(D==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+D+".");var X=T({},D.props),fe=D.key,he=D.ref,ke=D._owner;if(Z!=null){if(Z.ref!==void 0&&(he=Z.ref,ke=z.current),Z.key!==void 0&&(fe=""+Z.key),D.type&&D.type.defaultProps)var Ae=D.type.defaultProps;for(qe in Z)I.call(Z,qe)&&!j.hasOwnProperty(qe)&&(X[qe]=Z[qe]===void 0&&Ae!==void 0?Ae[qe]:Z[qe])}var qe=arguments.length-2;if(qe===1)X.children=K;else if(1<qe){Ae=Array(qe);for(var Ye=0;Ye<qe;Ye++)Ae[Ye]=arguments[Ye+2];X.children=Ae}return{$$typeof:r,type:D.type,key:fe,ref:he,props:X,_owner:ke}},st.createLine truncated
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var pp;function yv(){if(pp)return Ma;pp=1;var r=r0(),a=Symbol.for("react.element"),s=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,f=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d={key:!0,ref:!0,__self:!0,__source:!0};function m(h,x,p){var y,v={},w=null,S=null;p!==void 0&&(w=""+p),x.key!==void 0&&(w=""+x.key),x.ref!==void 0&&(S=x.ref);for(y in x)l.call(x,y)&&!d.hasOwnProperty(y)&&(v[y]=x[y]);if(h&&h.defaultProps)for(y in x=h.defaultProps,x)v[y]===void 0&&(v[y]=x[y]);return{$$typeof:a,type:h,key:w,ref:S,props:v,_owner:f.current}}return Ma.Fragment=s,Ma.jsx=m,Ma.jsxs=m,Ma}var mp;function _v(){return mp||(mp=1,_f.exports=yv()),_f.exports}var F=_v(),R=r0();const Ce=Us(R),i0=xv({__proto__:null,default:Ce},[R]);var wu={},Cf={exports:{}},Hn={},bf={exports:{}},Ef={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Ap;function wv(){return Ap||(Ap=1,(function(r){function a(q,ge){var ne=q.length;q.push(ge);e:for(;0<ne;){var D=ne-1>>>1,Z=q[D];if(0<f(Z,ge))q[D]=ge,q[ne]=Z,ne=D;else break e}}function s(q){return q.length===0?null:q[0]}function l(q){if(q.length===0)return null;var ge=q[0],ne=q.pop();if(ne!==ge){q[0]=ne;e:for(var D=0,Z=q.length,K=Z>>>1;D<K;){var X=2*(D+1)-1,fe=q[X],he=X+1,ke=q[he];if(0>f(fe,ne))he<Z&&0>f(ke,fe)?(q[D]=ke,q[he]=ne,D=he):(q[D]=fe,q[X]=ne,D=X);else if(he<Z&&0>f(ke,ne))q[D]=ke,q[he]=ne,D=he;else break e}}return ge}function f(q,ge){var ne=q.sortIndex-ge.sortIndex;return ne!==0?ne:q.id-ge.id}if(typeof performance=="object"&&typeof performance.now=="function"){var d=performance;r.unstable_now=function(){return d.now()}}else{var m=Date,h=m.now();r.unstable_now=function(){return m.now()-h}}var x=[],p=[],y=1,v=null,w=3,S=!1,T=!1,b=!1,E=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,B=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function k(q){for(var ge=s(p);ge!==null;){if(ge.callback===null)l(p);else if(ge.startTime<=q)l(p),ge.sortIndex=ge.expirationTime,a(x,ge);else break;ge=s(p)}}function N(q){if(b=!1,k(q),!T)if(s(x)!==null)T=!0,se(I);else{var ge=s(p);ge!==null&&de(N,ge.startTime-q)}}function I(q,ge){T=!1,b&&(b=!1,P(H),H=-1),S=!0;var ne=w;try{for(k(ge),v=s(x);v!==null&&(!(v.expirationTime>ge)||q&&!G());){var D=v.callback;if(typeof D=="function"){v.callback=null,w=v.priorityLevel;var Z=D(v.expirationTime<=ge);ge=r.unstable_now(),typeof Z=="function"?v.callback=Z:v===s(x)&&l(x),k(ge)}else l(x);v=s(x)}if(v!==null)var K=!0;else{var X=s(p);X!==null&&de(N,X.startTime-ge),K=!1}return K}finally{v=null,w=ne,S=!1}}var z=!1,j=null,H=-1,$=5,U=-1;function G(){return!(r.unstable_now()-U<$)}function re(){if(j!==null){var q=r.unstable_now();U=q;var ge=!0;try{ge=j(!0,q)}finally{ge?V():(z=!1,j=null)}}else z=!1}var V;if(typeof B=="function")V=function(){B(re)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,le=J.port2;J.port1.onmessage=re,V=function(){le.postMessage(null)}}else V=function(){E(re,0)};function se(q){j=q,z||(z=!0,V())}function de(q,ge){H=E(function(){q(r.unstable_now())},ge)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(q){q.callback=null},r.unstable_continueExecution=function(){T||S||(T=!0,se(I))},r.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<q?Math.floor(1e3/q):5},r.unstable_getCurrentPriorityLevel=function(){return w},r.unstable_getFirstCallbackNode=function(){return s(x)},r.unstable_next=function(q){switch(w){case 1:case 2:case 3:var ge=3;break;default:ge=w}var ne=w;w=ge;try{return q()}finally{w=ne}},r.unstable_pauseExecution=function(){},r.unstable_requestPaint=function(){},r.unstable_runWithPriority=function(q,ge){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var ne=w;w=q;try{return ge()}finally{w=ne}},r.unstable_scheduleCallback=function(q,ge,ne){var D=r.unstable_now();switch(typeof ne=="object"&&ne!==null?(ne=ne.delay,ne=typeof ne=="number"&&0<ne?D+ne:D):ne=D,q){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=ne+Z,q={id:y++,callback:ge,priorityLevel:q,startTime:ne,expirationTime:Z,sortIndex:-1},ne>D?(q.sortIndex=ne,a(p,q),s(x)===null&&q===s(p)&&(b?(P(H),H=-1):b=!0,de(N,ne-D))):(q.sortIndex=Z,a(x,q),T||S||(T=!0,se(I))),q},r.unstable_shouldYield=G,r.unstable_wrapCallback=function(q){var ge=w;return function(){var ne=w;w=ge;try{return q.apply(this,arguments)}finally{w=ne}}}})(Ef)),Ef}var gp;function Cv(){return gp||(gp=1,bf.exports=wv()),bf.exports}/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var xp;function bv(){if(xp)return Hn;xp=1;var r=r0(),a=Cv();function s(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,o=1;o<arguments.length;o++)n+="&args[]="+encodeURIComponent(arguments[o]);return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var l=new Set,f={};function d(e,n){m(e,n),m(e+"Capture",n)}function m(e,n){for(f[e]=n,e=0;e<n.length;e++)l.add(n[e])}var h=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),x=Object.prototype.hasOwnProperty,p=/^[: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]*$/,y={},v={};function w(e){return x.call(v,e)?!0:x.call(y,e)?!1:p.test(e)?v[e]=!0:(y[e]=!0,!1)}function S(e,n,o,c){if(o!==null&&o.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return c?!1:o!==null?!o.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function T(e,n,o,c){if(n===null||typeof n>"u"||S(e,n,o,c))return!0;if(c)return!1;if(o!==null)switch(o.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function b(e,n,o,c,g,_,M){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=c,this.attributeNamespace=g,this.mustUseProperty=o,this.propertyName=e,this.type=n,this.sanitizeURL=_,this.removeEmptyString=M}var E={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){E[e]=new b(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];E[n]=new b(n,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){E[e]=new b(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){E[e]=new b(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){E[e]=new b(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){E[e]=new b(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){E[e]=new b(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){E[e]=new b(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){E[e]=new b(e,5,!1,e.toLowerCase(),null,!1,!1)});var P=/[\-:]([a-z])/g;function B(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 n=e.replace(P,B);E[n]=new b(n,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(P,B);E[n]=new b(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(P,B);E[n]=new b(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){E[e]=new b(e,1,!1,e.toLowerCase(),null,!1,!1)}),E.xlinkHref=new b("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){E[e]=new b(e,1,!1,e.toLowerCase(),null,!0,!0)});function k(e,n,o,c){var g=E.hasOwnProperty(n)?E[n]:null;(g!==null?g.type!==0:c||!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!= Line truncated
`+D+e}var K=!1;function X(e,n){if(!e||K)return"";K=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(n)if(n=function(){throw Error()},Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(n,[])}catch(ce){var c=ce}Reflect.construct(e,[],n)}else{try{n.call()}catch(ce){c=ce}e.call(n.prototype)}else{try{throw Error()}catch(ce){c=ce}e()}}catch(ce){if(ce&&c&&typeof ce.stack=="string"){for(var g=ce.stack.split(`
`),_=c.stack.split(`
`),M=g.length-1,W=_.length-1;1<=M&&0<=W&&g[M]!==_[W];)W--;for(;1<=M&&0<=W;M--,W--)if(g[M]!==_[W]){if(M!==1||W!==1)do if(M--,W--,0>W||g[M]!==_[W]){var Y=`
`+g[M].replace(" at new "," at ");return e.displayName&&Y.includes("<anonymous>")&&(Y=Y.replace("<anonymous>",e.displayName)),Y}while(1<=M&&0<=W);break}}}finally{K=!1,Error.prepareStackTrace=o}return(e=e?e.displayName||e.name:"")?Z(e):""}function fe(e){switch(e.tag){case 5:return Z(e.type);case 16:return Z("Lazy");case 13:return Z("Suspense");case 19:return Z("SuspenseList");case 0:case 2:case 15:return e=X(e.type,!1),e;case 11:return e=X(e.type.render,!1),e;case 1:return e=X(e.type,!0),e;default:return""}}function he(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 j:return"Fragment";case z:return"Portal";case $:return"Profiler";case H:return"StrictMode";case V:return"Suspense";case J:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case G:return(e.displayName||"Context")+".Consumer";case U:return(e._context.displayName||"Context")+".Provider";case re:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case le:return n=e.displayName||null,n!==null?n:he(e.type)||"Memo";case se:n=e._payload,e=e._init;try{return he(e(n))}catch{}}return null}function ke(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return he(n);case 8:return n===H?"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 n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function Ae(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function qe(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Ye(e){var n=qe(e)?"checked":"value",o=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),c=""+e[n];if(!e.hasOwnProperty(n)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var g=o.get,_=o.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return g.call(this)},set:function(M){c=""+M,_.call(this,M)}}),Object.defineProperty(e,n,{enumerable:o.enumerable}),{getValue:function(){return c},setValue:function(M){c=""+M},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Et(e){e._valueTracker||(e._valueTracker=Ye(e))}function ht(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var o=n.getValue(),c="";return e&&(c=qe(e)?e.checked?"true":"false":e.value),e=c,e!==o?(n.setValue(e),!0):!1}function Se(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 Ve(e,n){var o=n.checked;return ne({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o??e._wrapperState.initialChecked})}function dt(e,n){var o=n.defaultValue==null?"":n.defaultValue,c=n.checked!=null?n.checked:n.defaultChecked;o=Ae(n.value!=null?n.value:o),e._wrapperState={initialChecked:c,initialValue:o,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function Mt(e,n){n=n.checked,n!=null&&k(e,"checked",n,!1)}function vt(e,n){Mt(e,n);var o=Ae(n.value),c=n.type;if(o!=null)c==="number"?(o===0&&e.value===""||e.value!=o)&&(e.value=""+o):e.value!==""+o&&(e.value=""+o);else if(c==="submit"||c==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?Qe(e,n.type,o):n.hasOwnProperty("defaultValue")&&Qe(e,n.type,Ae(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function ot(e,n,o){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var c=n.type;if(!(c!=="submit"&&c!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,o||n===e.value||(e.value=n),e.defaultValue=n}o=e.name,o!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,o!==""&&(e.name=o)}function Qe(e,n,o){(n!=="number"||Se(e.ownerDocument)!==e)&&(o==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+o&&(e.defaultValue=""+o))}var Xe=Array.isArray;function et(e,n,o,c){if(e=e.options,n){n={};for(var g=0;g<o.length;g++)n["$"+o[g]]=!0;for(o=0;o<e.length;o++)g=n.hasOwnProperty("$"+e[o].value),e[o].selected!==g&&(e[o].selected=g),g&&c&&(e[o].defaultSelected=!0)}else{for(o=""+Ae(o),n=null,g=0;g<e.length;g++){if(e[g].value===o){e[g].selected=!0,c&&(e[g].defaultSelected=!0);return}n!==null||e[g].disabled||(n=e[g])}n!==null&&(n.selected=!0)}}function Oe(e,n){if(n.dangerouslySetInnerHTM Line truncated
`).replace(Q,"")}function ue(e,n,o){if(n=ie(n),ie(e)!==n&&o)throw Error(s(425))}function xe(){}var Be=null,Ue=null;function tt(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var tn=typeof setTimeout=="function"?setTimeout:void 0,Yt=typeof clearTimeout=="function"?clearTimeout:void 0,Tn=typeof Promise=="function"?Promise:void 0,_n=typeof queueMicrotask=="function"?queueMicrotask:typeof Tn<"u"?function(e){return Tn.resolve(null).then(e).catch(Hi)}:tn;function Hi(e){setTimeout(function(){throw e})}function _a(e,n){var o=n,c=0;do{var g=o.nextSibling;if(e.removeChild(o),g&&g.nodeType===8)if(o=g.data,o==="/$"){if(c===0){e.removeChild(g),Kn(n);return}c--}else o!=="$"&&o!=="$?"&&o!=="$!"||c++;o=g}while(o);Kn(n)}function Vr(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?")break;if(n==="/$")return null}}return e}function Il(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var o=e.data;if(o==="$"||o==="$!"||o==="$?"){if(n===0)return e;n--}else o==="/$"&&n++}e=e.previousSibling}return null}var si=Math.random().toString(36).slice(2),cr="__reactFiber$"+si,Vi="__reactProps$"+si,yt="__reactContainer$"+si,Ui="__reactEvents$"+si,pd="__reactListeners$"+si,md="__reactHandles$"+si;function ai(e){var n=e[cr];if(n)return n;for(var o=e.parentNode;o;){if(n=o[yt]||o[cr]){if(o=n.alternate,n.child!==null||o!==null&&o.child!==null)for(e=Il(e);e!==null;){if(o=e[cr])return o;e=Il(e)}return n}e=o,o=e.parentNode}return null}function li(e){return e=e[cr]||e[yt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ui(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(s(33))}function xs(e){return e[Vi]||null}var Ad=[],vs=-1;function Zi(e){return{current:e}}function Dt(e){0>vs||(e.current=Ad[vs],Ad[vs]=null,vs--)}function Pt(e,n){vs++,Ad[vs]=e.current,e.current=n}var Wi={},wn=Zi(Wi),Mn=Zi(!1),wo=Wi;function ys(e,n){var o=e.type.contextTypes;if(!o)return Wi;var c=e.stateNode;if(c&&c.__reactInternalMemoizedUnmaskedChildContext===n)return c.__reactInternalMemoizedMaskedChildContext;var g={},_;for(_ in o)g[_]=n[_];return c&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=g),g}function In(e){return e=e.childContextTypes,e!=null}function Ol(){Dt(Mn),Dt(wn)}function N0(e,n,o){if(wn.current!==Wi)throw Error(s(168));Pt(wn,n),Pt(Mn,o)}function L0(e,n,o){var c=e.stateNode;if(n=n.childContextTypes,typeof c.getChildContext!="function")return o;c=c.getChildContext();for(var g in c)if(!(g in n))throw Error(s(108,ke(e)||"Unknown",g));return ne({},o,c)}function zl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Wi,wo=wn.current,Pt(wn,e),Pt(Mn,Mn.current),!0}function M0(e,n,o){var c=e.stateNode;if(!c)throw Error(s(169));o?(e=L0(e,n,wo),c.__reactInternalMemoizedMergedChildContext=e,Dt(Mn),Dt(wn),Pt(wn,e)):Dt(Mn),Pt(Mn,o)}var ci=null,jl=!1,gd=!1;function I0(e){ci===null?ci=[e]:ci.push(e)}function Lx(e){jl=!0,I0(e)}function qi(){if(!gd&&ci!==null){gd=!0;var e=0,n=ft;try{var o=ci;for(ft=1;e<o.length;e++){var c=o[e];do c=c(!0);while(c!==null)}ci=null,jl=!1}catch(g){throw ci!==null&&(ci=ci.slice(e+1)),hl($s,qi),g}finally{ft=n,gd=!1}}return null}var _s=[],ws=0,Hl=null,Vl=0,dr=[],fr=0,Co=null,di=1,fi="";function bo(e,n){_s[ws++]=Vl,_s[ws++]=Hl,Hl=e,Vl=n}function O0(e,n,o){dr[fr++]=di,dr[fr++]=fi,dr[fr++]=Co,Co=e;var c=di;e=fi;var g=32-Je(c)-1;c&=~(1<<g),o+=1;var _=32-Je(n)+g;if(30<_){var M=g-g%5;_=(c&(1<<M)-1).toString(32),c>>=M,g-=M,di=1<<32-Je(n)+g|o<<g|c,fi=_+e}else di=1<<_|o<<g|c,fi=e}function xd(e){e.return!==null&&(bo(e,1),O0(e,1,0))}function vd(e){for(;e===Hl;)Hl=_s[--ws],_s[ws]=null,Vl=_s[--ws],_s[ws]=null;for(;e===Co;)Co=dr[--fr],dr[fr]=null,fi=dr[--fr],dr[fr]=null,di=dr[--fr],dr[fr]=null}var er=null,tr=null,Nt=!1,Er=null;function z0(e,n){var o=Ar(5,null,null,0);o.elementType="DELETED",o.stateNode=n,o.return=e,n=e.deletions,n===null?(e.deletions=[o],e.flags|=16):n.push(o)}function j0(e,n){switch(e.tag){case 5:var o=e.type;return n=n.nodeType!==1||o.toLowerCase()!==n.nodeName.toLowerCase()?null:n,n!==null?(e.stateNode=n,er=e,tr=Vr(n.firstChild),!0):!1;case 6:return n=e.pendingProps===""||n.nodeType!==3?null:n,n!==null?(e.stateNode=n,er=e,tr=null,!0):!1;case 13:return n=n.nodeType!==8?null:n,n!==null?(o=Co!==null?{id:di,overflow:fi}:null,e.memoizedState={dehydrated:n,treeContext:o,retryLane:1073741824},o=Ar(18,null,null,0),o.stateNode=n,o.return=e,e.child=o,er=e,tr=null,!0):!1;default:return!1}}function yd(e){return(e.mode&1)!==0&&(e.flags&128)===0}function _d(e){if(Nt){var n=tr;if(n){var o=n;if(!j0(e,n)){if(yd(e))throw Error(s(418));n=Vr(o.nextSibling);var c=er;n&&j0(e,n)?z0(c,o):(e.flags=e.flags&-4097|2,Nt=!1,er=e)}}else{if(yd(e))throw Error(s(418));e.flags=e.flags&-4097|2,Nt=!1,er=e}}}function H0(e){for(e=e. Line truncated
Error generating stack: `+_.message+`
`+_.stack}return{value:e,source:n,stack:g,digest:null}}function Ud(e,n,o){return{value:e,source:null,stack:o??null,digest:n??null}}function Zd(e,n){try{console.error(n.value)}catch(o){setTimeout(function(){throw o})}}var Zx=typeof WeakMap=="function"?WeakMap:Map;function _h(e,n,o){o=pi(-1,o),o.tag=3,o.payload={element:null};var c=n.value;return o.callback=function(){lu||(lu=!0,sf=c),Zd(e,n)},o}function wh(e,n,o){o=pi(-1,o),o.tag=3;var c=e.type.getDerivedStateFromError;if(typeof c=="function"){var g=n.value;o.payload=function(){return c(g)},o.callback=function(){Zd(e,n)}}var _=e.stateNode;return _!==null&&typeof _.componentDidCatch=="function"&&(o.callback=function(){Zd(e,n),typeof c!="function"&&($i===null?$i=new Set([this]):$i.add(this));var M=n.stack;this.componentDidCatch(n.value,{componentStack:M!==null?M:""})}),o}function Ch(e,n,o){var c=e.pingCache;if(c===null){c=e.pingCache=new Zx;var g=new Set;c.set(n,g)}else g=c.get(n),g===void 0&&(g=new Set,c.set(n,g));g.has(o)||(g.add(o),e=iv.bind(null,e,n,o),n.then(e,e))}function bh(e){do{var n;if((n=e.tag===13)&&(n=e.memoizedState,n=n!==null?n.dehydrated!==null:!0),n)return e;e=e.return}while(e!==null);return null}function Eh(e,n,o,c,g){return(e.mode&1)===0?(e===n?e.flags|=65536:(e.flags|=128,o.flags|=131072,o.flags&=-52805,o.tag===1&&(o.alternate===null?o.tag=17:(n=pi(-1,1),n.tag=2,Qi(o,n,1))),o.lanes|=1),e):(e.flags|=65536,e.lanes=g,e)}var Wx=N.ReactCurrentOwner,On=!1;function Dn(e,n,o,c){n.child=e===null?W0(n,null,o,c):bs(n,e.child,o,c)}function kh(e,n,o,c,g){o=o.render;var _=n.ref;return ks(n,g),c=Ld(e,n,o,c,_,g),o=Md(),e!==null&&!On?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~g,mi(e,n,g)):(Nt&&o&&xd(n),n.flags|=1,Dn(e,n,c,g),n.child)}function Sh(e,n,o,c,g){if(e===null){var _=o.type;return typeof _=="function"&&!hf(_)&&_.defaultProps===void 0&&o.compare===null&&o.defaultProps===void 0?(n.tag=15,n.type=_,Bh(e,n,_,c,g)):(e=pu(o.type,null,c,n,n.mode,g),e.ref=n.ref,e.return=n,n.child=e)}if(_=e.child,(e.lanes&g)===0){var M=_.memoizedProps;if(o=o.compare,o=o!==null?o:zr,o(M,c)&&e.ref===n.ref)return mi(e,n,g)}return n.flags|=1,e=eo(_,c),e.ref=n.ref,e.return=n,n.child=e}function Bh(e,n,o,c,g){if(e!==null){var _=e.memoizedProps;if(zr(_,c)&&e.ref===n.ref)if(On=!1,n.pendingProps=c=_,(e.lanes&g)!==0)(e.flags&131072)!==0&&(On=!0);else return n.lanes=e.lanes,mi(e,n,g)}return Wd(e,n,o,c,g)}function Ph(e,n,o){var c=n.pendingProps,g=c.children,_=e!==null?e.memoizedState:null;if(c.mode==="hidden")if((n.mode&1)===0)n.memoizedState={baseLanes:0,cachePool:null,transitions:null},Pt(Ts,nr),nr|=o;else{if((o&1073741824)===0)return e=_!==null?_.baseLanes|o:o,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:e,cachePool:null,transitions:null},n.updateQueue=null,Pt(Ts,nr),nr|=e,null;n.memoizedState={baseLanes:0,cachePool:null,transitions:null},c=_!==null?_.baseLanes:o,Pt(Ts,nr),nr|=c}else _!==null?(c=_.baseLanes|o,n.memoizedState=null):c=o,Pt(Ts,nr),nr|=c;return Dn(e,n,g,o),n.child}function Th(e,n){var o=n.ref;(e===null&&o!==null||e!==null&&e.ref!==o)&&(n.flags|=512,n.flags|=2097152)}function Wd(e,n,o,c,g){var _=In(o)?wo:wn.current;return _=ys(n,_),ks(n,g),o=Ld(e,n,o,c,_,g),c=Md(),e!==null&&!On?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~g,mi(e,n,g)):(Nt&&c&&xd(n),n.flags|=1,Dn(e,n,o,g),n.child)}function Dh(e,n,o,c,g){if(In(o)){var _=!0;zl(n)}else _=!1;if(ks(n,g),n.stateNode===null)ru(e,n),vh(n,o,c),Vd(n,o,c,g),c=!0;else if(e===null){var M=n.stateNode,W=n.memoizedProps;M.props=W;var Y=M.context,ce=o.contextType;typeof ce=="object"&&ce!==null?ce=hr(ce):(ce=In(o)?wo:wn.current,ce=ys(n,ce));var ye=o.getDerivedStateFromProps,_e=typeof ye=="function"||typeof M.getSnapshotBeforeUpdate=="function";_e||typeof M.UNSAFE_componentWillReceiveProps!="function"&&typeof M.componentWillReceiveProps!="function"||(W!==c||Y!==ce)&&yh(n,M,c,ce),Gi=!1;var ve=n.memoizedState;M.state=ve,Ql(n,c,M,g),Y=n.memoizedState,W!==c||ve!==Y||Mn.current||Gi?(typeof ye=="function"&&(Hd(n,o,ye,c),Y=n.memoizedState),(W=Gi||xh(n,o,W,c,ve,Y,ce))?(_e||typeof M.UNSAFE_componentWillMount!="function"&&typeof M.componentWillMount!="function"||(typeof M.componentWillMount=="function"&&M.componentWillMount(),typeof M.UNSAFE_componentWillMount=="function"&&M.UNSAFE_componentWillMount()),typeof M.componentDidMount=="function"&&(n.flags|=4194308)):(typeof M.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=c,n.memoizedState=Y),M.props=c,M.state=Y,M.context=ce,c=W):(typeof M.componentDidMount=="function"&&(n.flags|=4194308),c=!1)}else{M=n.stateNode,G0(e,n),W=n.memoizedProps,ce=n.type===n.elementType?W:kr(n.type,W),M.props=ce,_e=n.pendingProps,ve=M.context,Y=o.contextType,typeof Y=="object"&&Y!==null?Y=hr(Y):(Y=In(o)?wo:wn.current,Y=ys(n,Y));var Te=o.getDerivedStateFromProps;(ye=typeof Te=="function"||typeof M.getSnapshotBeforeUpdate=="function")||typeof M.UNSAFE_componentWillReceiveProps!="function"&&typeof M.componentWillReceiveProps!="function"||(W!==_e||ve!==Y)&&yh(n,M,c,Y),Gi=!1,ve=n.m Line truncated
`)}function Tv(r){if(r.length===0)return`Neighbors
No neighbors reported`;const a=[...r].sort((l,f)=>f.snr-l.snr),s=[`Neighbors (${a.length})`];for(const l of a){const f=l.name||l.pubkey_prefix,d=l.snr>=0?`+${l.snr.toFixed(1)}`:l.snr.toFixed(1);s.push(`${f}, ${d} dB [${Ru(l.last_heard_seconds)} ago]`)}return s.join(`
`)}function Dv(r){if(r.length===0)return`ACL
No ACL entries`;const a=[`ACL (${r.length})`];for(const s of r){const l=s.name||s.pubkey_prefix;a.push(`${l}: ${s.permission_name}`)}return a.join(`
`)}function No(r,a,s,l=0){const f=Math.floor(Date.now()/1e3);return{id:-Date.now()-l,type:"PRIV",conversation_key:r,text:a,sender_timestamp:f,received_at:f,path_len:null,txt_type:0,signature:null,outgoing:s,acked:1}}function Rv(r,a,s){const[l,f]=R.useState(!1);R.useEffect(()=>{f(!1)},[r==null?void 0:r.id]);const d=R.useMemo(()=>{if(!r||r.type!=="contact")return!1;const x=a.find(p=>p.public_key===r.id);return(x==null?void 0:x.type)===s0},[r,a]),m=R.useCallback(async x=>{if(!(!r||r.type!=="contact")&&d)try{const p=await at.requestTelemetry(r.id,x),y=No(r.id,Pv(p),!1,0),v=No(r.id,Tv(p.neighbors),!1,1),w=No(r.id,Dv(p.acl),!1,2);s(S=>[...S,y,v,w]),f(!0)}catch(p){const y=No(r.id,`Telemetry request failed: ${p instanceof Error?p.message:"Unknown error"}`,!1,0);s(v=>[...v,y])}},[r,d,s]),h=R.useCallback(async x=>{if(!r||r.type!=="contact"||!d||!l)return;const p=No(r.id,`> ${x}`,!0,0);s(y=>[...y,p]);try{const y=await at.sendRepeaterCommand(r.id,x),v=No(r.id,y.response,!1,1);y.sender_timestamp&&(v.sender_timestamp=y.sender_timestamp),s(w=>[...w,v])}catch(y){const v=No(r.id,`Command failed: ${y instanceof Error?y.message:"Unknown error"}`,!1,1);s(w=>[...w,v])}},[r,d,l,s]);return{repeaterLoggedIn:l,activeContactIsRepeater:d,handleTelemetryRequest:m,handleRepeaterCommand:h}}const Fv=12;function js(r){return r.slice(0,Fv)}function wA(r,a){return!r||!a?!1:js(r)===js(a)}function Vo(r,a){return r||js(a)}const Vf="remoteterm-lastMessageTime";function CA(r){try{const a=localStorage.getItem(r);return a?JSON.parse(a):{}}catch{return{}}}function Nv(r,a){try{localStorage.setItem(r,JSON.stringify(a))}catch{}}function _p(){return CA(Vf)}function kf(r,a){const s=CA(Vf);return(!s[r]||a>s[r])&&(s[r]=a,Nv(Vf,s)),s}function Dr(r,a){return r==="channel"?`channel-${a}`:`contact-${js(a)}`}function wp(r,a){if(!a)return!1;const s=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`@\\[${s}\\]`,"i").test(r)}function Lv(r,a,s,l=null){const[f,d]=R.useState({}),[m,h]=R.useState({}),[x,p]=R.useState(_p),y=R.useRef(l);R.useEffect(()=>{y.current=l},[l]);const v=R.useRef(new Set),w=R.useRef(new Set);R.useEffect(()=>{const P=r.filter(N=>!v.current.has(N.key)),B=a.filter(N=>N.public_key&&!w.current.has(N.public_key));if(P.length===0&&B.length===0)return;P.forEach(N=>v.current.add(N.key)),B.forEach(N=>w.current.add(N.public_key)),(async()=>{const N=[...P.map(I=>({type:"CHAN",conversation_key:I.key})),...B.map(I=>({type:"PRIV",conversation_key:I.public_key}))];if(N.length!==0)try{const I=await at.getMessagesBulk(N,o0),z={},j={},H={};for(const $ of P){const U=I[`CHAN:${$.key}`]||[];if(U.length>0){const G=Dr("channel",$.key),re=$.last_read_at||0,V=U.filter(le=>!le.outgoing&&le.received_at>re);V.length>0&&(z[G]=V.length,V.some(le=>wp(le.text,y.current))&&(j[G]=!0));const J=Math.max(...U.map(le=>le.received_at));H[G]=J,kf(G,J)}}for(const $ of B){const U=I[`PRIV:${$.public_key}`]||[];if(U.length>0){const G=Dr("contact",$.public_key),re=$.last_read_at||0,V=U.filter(le=>!le.outgoing&&le.received_at>re);V.length>0&&(z[G]=V.length,V.some(le=>wp(le.text,y.current))&&(j[G]=!0));const J=Math.max(...U.map(le=>le.received_at));H[G]=J,kf(G,J)}}Object.keys(z).length>0&&d($=>({...$,...z})),Object.keys(j).length>0&&h($=>({...$,...j})),p(_p())}catch(I){console.error("Failed to fetch messages bulk:",I)}})()},[r,a]),R.useEffect(()=>{if(s&&s.type!=="raw"&&s.type!=="map"){const P=Dr(s.type,s.id);d(B=>{if(B[P]){const k={...B};return delete k[P],k}return B}),h(B=>{if(B[P]){const k={...B};return delete k[P],k}return B}),s.type==="channel"?at.markChannelRead(s.id).catch(B=>{console.error("Failed to mark channel as read on server:",B)}):s.type==="contact"&&at.markContactRead(s.id).catch(B=>{console.error("Failed to mark contact as read on server:",B)})}},[s]);const S=R.useCallback((P,B)=>{d(k=>({...k,[P]:(k[P]||0)+1})),B&&h(k=>({...k,[P]:!0}))},[]),T=R.useCallback(()=>{d({}),h({}),at.markAllRead().catch(P=>{console.error("Failed to mark all as read on server:",P)})},[]),b=R.useCallback(P=>{if(P.type==="raw"||P.type==="map")return;const B=Dr(P.type,P.id);d(k=>{if(k[B]){const N={...k};return delete N[B],N}return k}),h(k=>{if(k[B]){const N={...k};return delete N[B],N}return k}),P.type==="channel"?at.markChannelRead(P.id).catch(k=>{console.error("Failed to mark channel as read on server:",k)}):P.type==="contact"&&at.markContactRead(P.id).catch(k=>{console.error("Failed to mark contact as read on server:",k)})},[]),E=R.useCallback(P=>{let B=null;if(P.type==="CHAN"&&P.conversation_key?B=Dr("channel",P.conversation_key):P.type==="PRIV"&&P.conversation_key&&(B=Dr("contact",P.conversation_key)),B){const k=P.received_at||Math.floor(Date.now()/1e3),N=kf(B,k);p(N)}},[]);return{unreadCounts:f,mentions:m,lastMessageTimes:x,incrementUnread:S,markAllRead:T,markConversationRead:b,trackNewMessage:E}}var a0=_A();const bA=Us(a0);function Mv(r){if(typeof document>"u")return;let a=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css",a.append Line truncated
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const dy=r=>r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),fy=r=>r.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,s,l)=>l?l.toUpperCase():s.toLowerCase()),Ep=r=>{const a=fy(r);return a.charAt(0).toUpperCase()+a.slice(1)},EA=(...r)=>r.filter((a,s,l)=>!!a&&a.trim()!==""&&l.indexOf(a)===s).join(" ").trim(),hy=r=>{for(const a in r)if(a.startsWith("aria-")||a==="role"||a==="title")return!0};/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var py={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const my=R.forwardRef(({color:r="currentColor",size:a=24,strokeWidth:s=2,absoluteStrokeWidth:l,className:f="",children:d,iconNode:m,...h},x)=>R.createElement("svg",{ref:x,...py,width:a,height:a,stroke:r,strokeWidth:l?Number(s)*24/Number(a):s,className:EA("lucide",f),...!d&&!hy(h)&&{"aria-hidden":"true"},...h},[...m.map(([p,y])=>R.createElement(p,y)),...Array.isArray(d)?d:[d]]));/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const l0=(r,a)=>{const s=R.forwardRef(({className:l,...f},d)=>R.createElement(my,{ref:d,iconNode:a,className:EA(`lucide-${dy(Ep(r))}`,`lucide-${r}`,l),...f}));return s.displayName=Ep(r),s};/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ay=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],gy=l0("check",Ay);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const xy=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],vy=l0("menu",xy);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const yy=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],kA=l0("x",yy);function _y({health:r,config:a,onConfigClick:s,onMaintenanceClick:l,onAdvertise:f,onMenuClick:d}){const m=(r==null?void 0:r.radio_connected)??!1,[h,x]=R.useState(!1),p=async()=>{x(!0);try{const y=await at.reconnectRadio();y.connected&&Lt.success("Reconnected",{description:y.message})}catch(y){Lt.error("Reconnection failed",{description:y instanceof Error?y.message:"Check radio connection and power"})}finally{x(!1)}};return F.jsxs("div",{className:"flex items-center gap-4 px-4 py-2 bg-[#252525] border-b border-[#333] text-xs",children:[d&&F.jsx("button",{onClick:d,className:"md:hidden p-1 bg-transparent border-none text-[#e0e0e0] cursor-pointer","aria-label":"Open menu",children:F.jsx(vy,{className:"h-5 w-5"})}),F.jsx("h1",{className:"hidden lg:block text-base font-semibold mr-auto",children:"RemoteTerm"}),F.jsxs("div",{className:"flex items-center gap-1 text-[#888]",children:[F.jsx("div",{className:`w-2 h-2 rounded-full ${m?"bg-[#4caf50]":"bg-[#666]"}`}),F.jsx("span",{className:"hidden lg:inline text-[#e0e0e0]",children:m?"Connected":"Disconnected"})]}),(r==null?void 0:r.serial_port)&&F.jsxs("div",{className:"hidden xl:flex items-center gap-1 text-[#888]",children:["Port: ",F.jsx("span",{className:"text-[#e0e0e0]",children:r.serial_port})]}),a&&F.jsxs(F.Fragment,{children:[F.jsx("div",{className:"hidden lg:flex items-center gap-1 text-[#888]",children:F.jsx("span",{className:"text-[#e0e0e0]",children:a.name||"Unnamed"})}),F.jsxs("div",{className:"hidden xl:flex items-center gap-1 text-[#888]",children:[a.radio.freq," MHz/SF",a.radio.sf,"/CR",a.radio.cr,"/",a.tx_power,"dBm"]})]}),F.jsx("div",{className:"flex-1 lg:hidden"}),!m&&F.jsx("button",{onClick:p,disabled:h,className:"px-3 py-1 bg-[#4a3000] border border-[#6b4500] text-[#ffa500] rounded text-xs cursor-pointer hover:bg-[#5a3a00] disabled:opacity-50 disabled:cursor-not-allowed",children:h?"Reconnecting...":"Reconnect"}),F.jsx("button",{onClick:f,disabled:!m,className:"px-3 py-1 bg-[#333] border border-[#444] text-[#e0e0e0] rounded text-xs cursor-pointer hover:bg-[#444] disabled:bg-[#333] disabled:text-[#666] disabled:cursor-not-allowed",children:"Advertise"}),F.jsx("button",{onClick:l,className:"px-2 py-1 bg-[#333] border border-[#444] text-[#e0e0e0] rounded text-xs cursor-pointer hover:bg-[#444]",title:"Database Maintenance",children:F.jsx("span",{role:"img","aria-label":"Settings",children:"⚙️"})}),F.jsxs("button",{onClick:s,className:"px-3 py-1 bg-[#333] border border-[#444] text-[#e0e0e0] rounded text-xs cursor-pointer hover:bg-[#444]",children:[F.jsx("span",{role:"img","aria-label":"Radio",children:"📻"})," ","Config"]})]})}const Zf=2,wy={text:"🛜",background:"#444444",textColor:"#ffffff"};function Cy(r){let a=0;for(let s=0;s<r.length;s++){const l=r.charCodeAt(s);a=(a<<5)-a+l,a=a&a}return Math.abs(a)}const by=/[\u{1F300}-\u{1F9FF}]|[\u{2600}-\u{26FF}]|[\u{2700}-\u{27BF}]|[\u{1F600}-\u{1F64F}]|[\u{1F680}-\u{1F6FF}]|[\u{1F1E0}-\u{1F1FF}]/u;function Ey(r,a){if(!r)return a.slice(0,2).toUpperCase();const s=r.match(by);if(s)return s[0];const l=r.match(/[a-zA-Z]/g);if(!l||l.length===0)return a.slice(0,2).toUpperCase();const f=r.indexOf(" ");if(f!==-1){const d=l[0],m=r.slice(f+1).match(/[a-zA-Z]/);if(m)return(d+m[0]).toUpperCase()}return l[0].toUpperCase()}function ky(r){const a=Cy(r),s=a%360,l=50+(a>>8)%30,f=35+(a>>16)%20,d=`hsl(${s}, ${l}%, ${f}%)`,m=f<45?"#ffffff":"#000000";return{background:d,text:m}}function Sy(r,a,s){if(s===Zf)return wy;const l=Ey(r,a),f=ky(a);return{text:l,background:f.background,textColor:f.text}}function SA({name:r,publicKey:a,size:s=28,contactType:l}){const f=Sy(r,a,l);return F.jsx("div",{className:"flex items-center justify-center rounded-full font-semibold flex-shrink-0 select-none",style:{backgroundColor:f.background,color:f.textColor,width:s,height:s,fontSize:s*.45},children:f.text})}function BA(r){var a,s,l="";if(typeof r=="string"||typeof r=="number")l+=r;else if(typeof r=="object")if(Array.isArray(r)){var f=r.length;for(a=0;a<f;a++)r[a]&&(s=BA(r[a]))&&(l&&(l+=" "),l+=s)}else for(s in r)r[s]&&(l&&(l+=" "),l+=s);return l}function PA(){for(var r,a,s=0,l="",f=arguments.length;s<f;s++)(r=arguments[s])&&(a=BA(r))&&(l&&(l+=" "),l+=a);return l}const By=(r,a)=>{const s=new Array(r.length+a.length);for(let l=0;l<r.length;l++)s[l]=r[l];for(let l=0;l<a.length;l++)s[r.length+l]=a[l];return s},Py=(r,a)=>({classGroupId:r,validator:a}),TA=(r=new Map,a=null,s)=>({nextPart:r,validators:a,classGroupId:s}),Cc="-",kp=[],Ty="arbitrary..",Dy=r=>{const a=Fy(r),{conflictingClassGroups:s,conflictingClassGroupModifiers:l}=r;return{getClassGroupId:m=>{if(m.startsWith("[")&&m.endsWith("]"))return Ry(m);const h=m.split(Cc),x=h[0]===""&&h.length>1?1:0;return DA(h,x,a)},getConflictingClassGroupIds:(m,h)=>{if(h){const x=l[m],p=s[m];return x?p?By(p,x):x:p||kp}return s[m]||kp}}},DA=(r,a,s)=>{if(r.length-a===0)return s.classGroupId;const f=r[a],dLine truncated
`).map((ne,D,Z)=>F.jsxs("span",{children:[B_(ne,h),D<Z.length-1&&F.jsx("br",{})]},D)),!le&&F.jsx("span",{className:"text-[10px] text-muted-foreground/50 ml-2",children:Ec(N.sender_timestamp||N.received_at)}),N.outgoing&&(N.acked>0?` ✓${N.acked>1?N.acked:""}`:" ?")]})]})]},N.id)})]}),v&&F.jsx("button",{onClick:b,className:"absolute bottom-4 right-4 w-10 h-10 rounded-full bg-muted hover:bg-accent border border-border flex items-center justify-center shadow-lg transition-opacity",title:"Scroll to bottom",children:F.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-muted-foreground",children:F.jsx("polyline",{points:"6 9 12 15 18 9"})})})]})}const Mp=156,T_=140,D_=156,R_=120,F_=8,N_=R.forwardRef(function({onSend:a,disabled:s,placeholder:l,isRepeaterMode:f,conversationType:d,senderName:m},h){const[x,p]=R.useState(""),[y,v]=R.useState(!1),w=R.useRef(null);R.useImperativeHandle(h,()=>({appendText:I=>{var z;p(j=>j+I),(z=w.current)==null||z.focus()}}));const S=R.useMemo(()=>{if(d==="contact")return{warningAt:T_,dangerAt:Mp,hardLimit:Mp};if(d==="channel"){const I=(m==null?void 0:m.length)??10,z=Math.max(1,D_-I-2);return{warningAt:R_,dangerAt:Math.max(1,z-F_),hardLimit:z}}return null},[d,m]),{limitState:T,warningMessage:b}=R.useMemo(()=>{if(!S)return{limitState:"normal",warningMessage:null};const I=x.length;return I>=S.hardLimit?{limitState:"error",warningMessage:"likely truncated by radio"}:I>=S.dangerAt?{limitState:"danger",warningMessage:"may impact multi-repeater hop delivery"}:I>=S.warningAt?{limitState:"warning",warningMessage:"may impact multi-repeater hop delivery"}:{limitState:"normal",warningMessage:null}},[x.length,S]),E=S?S.hardLimit-x.length:0,P=R.useCallback(async I=>{I.preventDefault();const z=x.trim();if(f){if(y||s)return;v(!0);try{await a(z),p("")}catch(j){console.error("Failed to request telemetry:",j),Lt.error("Failed to request telemetry",{description:j instanceof Error?j.message:"Check radio connection"});return}finally{v(!1)}setTimeout(()=>{var j;return(j=w.current)==null?void 0:j.focus()},0)}else{if(!z||y||s)return;v(!0);try{await a(z),p("")}catch(j){console.error("Failed to send message:",j),Lt.error("Failed to send message",{description:j instanceof Error?j.message:"Check radio connection"});return}finally{v(!1)}setTimeout(()=>{var j;return(j=w.current)==null?void 0:j.focus()},0)}},[x,y,s,a,f]),B=R.useCallback(I=>{I.key==="Enter"&&!I.shiftKey&&(I.preventDefault(),P(I))},[P]),k=f?!0:x.trim().length>0,N=!f&&S!==null;return F.jsxs("form",{className:"px-4 py-3 border-t border-border flex flex-col gap-1",onSubmit:P,children:[F.jsxs("div",{className:"flex gap-2",children:[F.jsx(Kt,{ref:w,type:f?"password":"text",autoComplete:f?"off":void 0,value:x,onChange:I=>p(I.target.value),onKeyDown:B,placeholder:l||(f?"Enter password for admin login...":"Type a message..."),disabled:s||y,className:"flex-1 min-w-0"}),F.jsx(gr,{type:"submit",disabled:s||y||!k,className:"flex-shrink-0",children:y?f?"Logging in...":"Sending...":f?x.trim()?"Log in with password":"Log in as guest/use repeater ACLs":"Send"})]}),N&&F.jsxs("div",{className:"flex items-center justify-end gap-2 text-xs",children:[F.jsxs("span",{className:lt("tabular-nums",T==="error"||T==="danger"?"text-red-500 font-medium":T==="warning"?"text-yellow-500":"text-muted-foreground"),children:[x.length,"/",S.hardLimit,E<0&&` (${E})`]}),b&&F.jsxs("span",{className:lt(T==="error"?"text-red-500":"text-yellow-500"),children:["— ",b]})]})]})});function sn(r,a,{checkForDefaultPrevented:s=!0}={}){return function(f){if(r==null||r(f),s===!1||!f.defaultPrevented)return a==null?void 0:a(f)}}function L_(r,a){const s=R.createContext(a),l=d=>{const{children:m,...h}=d,x=R.useMemo(()=>h,Object.values(h));return F.jsx(s.Provider,{value:x,children:m})};l.displayName=r+"Provider";function f(d){const m=R.useContext(s);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${r}\``)}return[l,f]}function sl(r,a=[]){let s=[];function l(d,m){const h=R.createContext(m),x=s.length;s=[...s,m];const p=v=>{var P;const{scope:w,children:S,...T}=v,b=((P=w==null?void 0:w[r])==null?void 0:P[x])||h,E=R.useMemo(()=>T,Object.values(T));return F.jsx(b.Provider,{value:E,children:S})};p.displayName=d+"Provider";function y(v,w){var b;const S=((b=w==null?void 0:w[r])==null?void 0:b[x])||h,T=R.useContext(S);if(T)return T;if(m!==void 0)return m;throw new Error(`\`${v}\` must be used within \`${d}\``)}return[p,y]}const f=()=>{const d=s.map(m=>R.createContext(m));return function(h){const x=(h==null?void 0:h[r])||d;return R.useMemo(()=>({[`__scope${r}`]:{...h,[r]:x}}),[h,x])}};return f.scopeName=r,[l,M_(f,...a)]}function M_(...r){const a=r[0];if(r.length===1)return a;const s=()=>{const l=r.map(f=>({useScope:f(),scopeName:f.scopeName}));return function(d){const m=l.reduce((h,{useScope:x,scopeName:p})=>{const v=x(d)[`__scope${Line truncated
.`.concat(g1,` {
overflow: hidden `).concat(l,`;
padding-right: `).concat(h,"px ").concat(l,`;
}
body[`).concat(Os,`] {
overflow: hidden `).concat(l,`;
overscroll-behavior: contain;
`).concat([a&&"position: relative ".concat(l,";"),s==="margin"&&`
padding-left: `.concat(f,`px;
padding-top: `).concat(d,`px;
padding-right: `).concat(m,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(h,"px ").concat(l,`;
`),s==="padding"&&"padding-right: ".concat(h,"px ").concat(l,";")].filter(Boolean).join(""),`
}
.`).concat(Nu,` {
right: `).concat(h,"px ").concat(l,`;
}
.`).concat(Lu,` {
margin-right: `).concat(h,"px ").concat(l,`;
}
.`).concat(Nu," .").concat(Nu,` {
right: 0 `).concat(l,`;
}
.`).concat(Lu," .").concat(Lu,` {
margin-right: 0 `).concat(l,`;
}
body[`).concat(Os,`] {
`).concat(x1,": ").concat(h,`px;
}
`)},Wp=function(){var r=parseInt(document.body.getAttribute(Os)||"0",10);return isFinite(r)?r:0},I1=function(){R.useEffect(function(){return document.body.setAttribute(Os,(Wp()+1).toString()),function(){var r=Wp()-1;r<=0?document.body.removeAttribute(Os):document.body.setAttribute(Os,r.toString())}},[])},O1=function(r){var a=r.noRelative,s=r.noImportant,l=r.gapMode,f=l===void 0?"margin":l;I1();var d=R.useMemo(function(){return N1(f)},[f]);return R.createElement(L1,{styles:M1(d,!a,f,s?"":"!important")})},Gf=!1;if(typeof window<"u")try{var Bu=Object.defineProperty({},"passive",{get:function(){return Gf=!0,!0}});window.addEventListener("test",Bu,Bu),window.removeEventListener("test",Bu,Bu)}catch{Gf=!1}var Ns=Gf?{passive:!1}:!1,z1=function(r){return r.tagName==="TEXTAREA"},JA=function(r,a){if(!(r instanceof Element))return!1;var s=window.getComputedStyle(r);return s[a]!=="hidden"&&!(s.overflowY===s.overflowX&&!z1(r)&&s[a]==="visible")},j1=function(r){return JA(r,"overflowY")},H1=function(r){return JA(r,"overflowX")},qp=function(r,a){var s=a.ownerDocument,l=a;do{typeof ShadowRoot<"u"&&l instanceof ShadowRoot&&(l=l.host);var f=eg(r,l);if(f){var d=tg(r,l),m=d[1],h=d[2];if(m>h)return!0}l=l.parentNode}while(l&&l!==s.body);return!1},V1=function(r){var a=r.scrollTop,s=r.scrollHeight,l=r.clientHeight;return[a,s,l]},U1=function(r){var a=r.scrollLeft,s=r.scrollWidth,l=r.clientWidth;return[a,s,l]},eg=function(r,a){return r==="v"?j1(a):H1(a)},tg=function(r,a){return r==="v"?V1(a):U1(a)},Z1=function(r,a){return r==="h"&&a==="rtl"?-1:1},W1=function(r,a,s,l,f){var d=Z1(r,window.getComputedStyle(a).direction),m=d*l,h=s.target,x=a.contains(h),p=!1,y=m>0,v=0,w=0;do{if(!h)break;var S=tg(r,h),T=S[0],b=S[1],E=S[2],P=b-E-d*T;(T||P)&&eg(r,h)&&(v+=P,w+=T);var B=h.parentNode;h=B&&B.nodeType===Node.DOCUMENT_FRAGMENT_NODE?B.host:B}while(!x&&h!==document.body||x&&(a.contains(h)||a===h));return(y&&Math.abs(v)<1||!y&&Math.abs(w)<1)&&(p=!0),p},Pu=function(r){return"changedTouches"in r?[r.changedTouches[0].clientX,r.changedTouches[0].clientY]:[0,0]},Gp=function(r){return[r.deltaX,r.deltaY]},Qp=function(r){return r&&"current"in r?r.current:r},q1=function(r,a){return r[0]===a[0]&&r[1]===a[1]},G1=function(r){return`
.block-interactivity-`.concat(r,` {pointer-events: none;}
.allow-interactivity-`).concat(r,` {pointer-events: all;}
`)},Q1=0,Ls=[];function K1(r){var a=R.useRef([]),s=R.useRef([0,0]),l=R.useRef(),f=R.useState(Q1++)[0],d=R.useState(XA)[0],m=R.useRef(r);R.useEffect(function(){m.current=r},[r]),R.useEffect(function(){if(r.inert){document.body.classList.add("block-interactivity-".concat(f));var b=A1([r.lockRef.current],(r.shards||[]).map(Qp),!0).filter(Boolean);return b.forEach(function(E){return E.classList.add("allow-interactivity-".concat(f))}),function(){document.body.classList.remove("block-interactivity-".concat(f)),b.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(f))})}}},[r.inert,r.lockRef.current,r.shards]);var h=R.useCallback(function(b,E){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!m.current.allowPinchZoom;var P=Pu(b),B=s.current,k="deltaX"in b?b.deltaX:B[0]-P[0],N="deltaY"in b?b.deltaY:B[1]-P[1],I,z=b.target,j=Math.abs(k)>Math.abs(N)?"h":"v";if("touches"in b&&j==="h"&&z.type==="range")return!1;var H=window.getSelection(),$=H&&H.anchorNode,U=$?$===z||$.contains(z):!1;if(U)return!1;var G=qp(j,z);if(!G)return!0;if(G?I=j:(I=j==="v"?"h":"v",G=qp(j,z)),!G)return!1;if(!l.current&&"changedTouches"in b&&(k||N)&&(l.current=I),!I)return!0;var re=l.current||I;return W1(re,E,b,re==="h"?k:N)},[]),x=R.useCallback(function(b){var E=b;if(!(!Ls.length||Ls[Ls.length-1]!==d)){var P="deltaY"in E?Gp(E):Pu(E),B=a.current.filter(function(I){return I.name===E.type&&(I.target===E.target||E.target===I.shadowParent)&&q1(I.delta,P)})[0];if(B&&B.should){E.cancelable&&E.preventDefault();return}if(!B){var k=(m.current.shards||[]).map(Qp).filter(Boolean).filter(function(I){return I.contains(E.target)}),N=k.length>0?h(E,k[0]):!m.current.noIsolation;N&&E.cancelable&&E.preventDefault()}}},[]),p=R.useCallback(function(b,E,P,B){var k={name:b,delta:E,target:P,should:B,shadowParent:$1(P)};a.current.push(k),setTimeout(function(){a.current=a.current.filter(function(N){return N!==k})},1)},[]),y=R.useCallback(function(b){s.current=Pu(b),l.current=void 0},[]),v=R.useCallback(function(b){p(b.type,Gp(b),b.target,h(b,r.lockRef.current))},[]),w=R.useCallback(function(b){p(b.type,Pu(b),b.target,h(b,r.lockRef.current))},[]);R.useEffect(function(){return Ls.push(d),r.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:w}),document.addEventListener("wheel",x,Ns),document.addEventListener("touchmove",x,Ns),document.addEventListener("touchstart",y,Ns),function(){Ls=Ls.filter(function(b){return b!==d}),document.removeEventListener("wheel",x,Ns),document.removeEventListener("touchmove",x,Ns),document.removeEventListener("touchstart",y,Ns)}},[]);var S=r.removeScrollBar,T=r.inert;return R.createElement(R.Fragment,null,T?R.createElement(d,{styles:G1(f)}):null,S?R.createElement(O1,{noRelative:r.noRelative,gapMode:r.gapMode}):null)}function $1(r){for(var a=null;r!==null;)r instanceof ShadowRoot&&(a=r.host,r=r.host),r=r.parentNode;return a}const Y1=E1(YA,K1);var ng=R.forwardRef(function(r,a){return R.createElement(Fc,Kr({},r,{ref:a,sideCar:Y1}))});ng.classNames=Fc.classNames;var X1=function(r){if(typeof document>"u")return null;var a=Array.isArray(r)?r[0]:r;return a.ownerDocument.body},Ms=new WeakMap,Tu=new WeakMap,Du={},Lf=0,rg=function(r){return r&&(r.host||rg(r.parentNode))},J1=function(r,a){return a.map(function(s){if(r.contains(s))return s;var l=rg(s);return l&&r.contains(l)?l:(console.error("aria-hidden",s,"in not contained inside",r,". Doing nothing"),null)}).filter(function(s){return!!s})},ew=function(r,a,s,l){var f=J1(a,Array.isArray(r)?r:[r]);Du[s]||(Du[s]=new WeakMap);var d=Du[s],m=[],h=new Set,x=new Set(f),p=function(v){!v||h.has(v)||(h.add(v),p(v.parentNode))};f.forEach(p);var y=function(v){!v||x.has(v)||Array.prototype.forEach.call(v.children,function(w){if(h.has(w))y(w);else try{var S=w.getAttribute(l),T=S!==null&&S!=="false",b=(Ms.get(w)||0)+1,E=(d.get(w)||0)+1;Ms.set(w,b),d.set(w,E),m.push(w),b===1&&T&&Tu.set(w,!0),E===1&&w.setAttribute(s,"true"),T||w.setAttribute(l,"true")}catch(P){console.error("aria-hidden: cannot operate on ",w,P)}})};return y(a),h.clear(),Lf++,function(){m.forEach(function(v){var w=Ms.get(v)-1,S=d.get(v)-1;Ms.set(v,w),d.set(v,S),w||(Tu.has(v)||v.removeAttribute(l),Tu.delete(v)),S||v.removeAttribute(s)}),Lf--,Lf||(Ms=new WeakMap,Ms=new WeakMap,Tu=new WeakMap,Du={})}},tw=function(r,a,s){s===void 0&&(s="data-aria-hidden");var l=Array.from(Array.isArray(r)?r:[r]),f=X1(r);return f?(l.push.apply(l,Array.from(f.querySelectorAll("[aria-live], script"))),ew(l,f,s,"aria-hidden")):function(){return null}};function nw(r){const a=rw(r),s=R.forwardRef((l,f)=>{const{children:d,...m}=l,h=R.Children.toArray(d),x=h.find(ow);if(x){const p=x.props.children,y=h.map(v=>v===x?R.Children.count(p)>1?R.Children.only(null):R.isValidElement(p)?p.props.children:null:v);return F.jsx(a,{...m,ref:f,children:R.isValidElement(p)?R.cloneElement(p,void 0,y):null})}return F.jsx(a,{...m,ref:f,children:d})});return s.displayName=`${r}.Slot`,s}function rw(r){const a=R.forwardRef((s,l)=>{const{childre Line truncated
If you want to hide the \`${a.titleName}\`, you can wrap it with our VisuallyHidden component.
For more information, see https://radix-ui.com/primitives/docs/components/${a.docsSlug}`;return R.useEffect(()=>{r&&(document.getElementById(r)||console.error(s))},[s,r]),null},Aw="DialogDescriptionWarning",gw=({contentRef:r,descriptionId:a})=>{const l=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${xg(Aw).contentName}}.`;return R.useEffect(()=>{var d;const f=(d=r.current)==null?void 0:d.getAttribute("aria-describedby");a&&f&&(document.getElementById(a)||console.warn(l))},[l,r,a]),null},vg=og,yg=lg,Lc=ug,Mc=cg,Ic=fg,Oc=pg,_g=Ag;const p0=vg,xw=yg,wg=R.forwardRef(({className:r,...a},s)=>F.jsx(Lc,{ref:s,className:lt("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",r),...a}));wg.displayName=Lc.displayName;const zc=R.forwardRef(({className:r,children:a,...s},l)=>F.jsxs(xw,{children:[F.jsx(wg,{}),F.jsxs(Mc,{ref:l,className:lt("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",r),...s,children:[a,F.jsxs(_g,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[F.jsx(kA,{className:"h-4 w-4"}),F.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));zc.displayName=Mc.displayName;const jc=({className:r,...a})=>F.jsx("div",{className:lt("flex flex-col space-y-1.5 text-center sm:text-left",r),...a});jc.displayName="DialogHeader";const m0=({className:r,...a})=>F.jsx("div",{className:lt("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",r),...a});m0.displayName="DialogFooter";const Hc=R.forwardRef(({className:r,...a},s)=>F.jsx(Ic,{ref:s,className:lt("text-lg font-semibold leading-none tracking-tight",r),...a}));Hc.displayName=Ic.displayName;const vw=R.forwardRef(({className:r,...a},s)=>F.jsx(Oc,{ref:s,className:lt("text-sm text-muted-foreground",r),...a}));vw.displayName=Oc.displayName;function Kp(r){const a=yw(r),s=R.forwardRef((l,f)=>{const{children:d,...m}=l,h=R.Children.toArray(d),x=h.find(ww);if(x){const p=x.props.children,y=h.map(v=>v===x?R.Children.count(p)>1?R.Children.only(null):R.isValidElement(p)?p.props.children:null:v);return F.jsx(a,{...m,ref:f,children:R.isValidElement(p)?R.cloneElement(p,void 0,y):null})}return F.jsx(a,{...m,ref:f,children:d})});return s.displayName=`${r}.Slot`,s}function yw(r){const a=R.forwardRef((s,l)=>{const{children:f,...d}=s;if(R.isValidElement(f)){const m=bw(f),h=Cw(d,f.props);return f.type!==R.Fragment&&(h.ref=l?ol(l,m):m),R.cloneElement(f,h)}return R.Children.count(f)>1?R.Children.only(null):null});return a.displayName=`${r}.SlotClone`,a}var _w=Symbol("radix.slottable");function ww(r){return R.isValidElement(r)&&typeof r.type=="function"&&"__radixId"in r.type&&r.type.__radixId===_w}function Cw(r,a){const s={...a};for(const l in a){const f=r[l],d=a[l];/^on[A-Z]/.test(l)?f&&d?s[l]=(...h)=>{const x=d(...h);return f(...h),x}:f&&(s[l]=f):l==="style"?s[l]={...f,...d}:l==="className"&&(s[l]=[f,d].filter(Boolean).join(" "))}return{...r,...s}}function bw(r){var l,f;let a=(l=Object.getOwnPropertyDescriptor(r.props,"ref"))==null?void 0:l.get,s=a&&"isReactWarning"in a&&a.isReactWarning;return s?r.ref:(a=(f=Object.getOwnPropertyDescriptor(r,"ref"))==null?void 0:f.get,s=a&&"isReactWarning"in a&&a.isReactWarning,s?r.props.ref:r.props.ref||r.ref)}function Ew(r){const a=r+"CollectionProvider",[s,l]=sl(a),[f,d]=s(a,{collectionRef:{current:null},itemMap:new Map}),m=b=>{const{scope:E,children:P}=b,B=Ce.useRef(null),k=Ce.useRef(new Map).current;return F.jsx(f,{scope:E,itemMap:k,collectionRef:B,children:P})};m.displayName=a;const h=r+"CollectionSlot",x=Kp(h),p=Ce.forwardRef((b,E)=>{const{scope:P,children:B}=b,k=d(h,P),N=xr(E,k.collectionRef);return F.jsx(x,{ref:N,children:B})});p.displayName=h;const y=r+"CollectionItemSlot",v="data-radix-collection-item",w=Kp(y),S=Ce.forwardRef((b,E)=>{const{scope:P,children:B,...k}=b,N=Ce.useRef(null),I=xr(E,N),z=d(y,P);return Ce.useEffect(()=>(z.itemMap.set(N,{ref:N,...k}),()=>void z.itemMap.delete(N))),F.jsx(w,{[v]:"",ref:I,children:B})});S.displayName=y;function T(b){const E=d(r+"CollectionConsumer",b);return Ce.useCallback(()=>{const B=E.collectionRef.current;if(!B)return[];const k=Array.from(B.querySelectorAll(`[${v}]`));return Array.from(E.itemMap.values()).sort((z,j)=>k.indexOf(z.ref.current)-k.indexOf(j.ref.current))},[E.coll Line truncated
* Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
* (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
*/var _2=Ja.exports,Xp;function w2(){return Xp||(Xp=1,(function(r,a){(function(s,l){l(a)})(_2,(function(s){var l="1.9.4";function f(t){var i,u,A,C;for(u=1,A=arguments.length;u<A;u++){C=arguments[u];for(i in C)t[i]=C[i]}return t}var d=Object.create||(function(){function t(){}return function(i){return t.prototype=i,new t}})();function m(t,i){var u=Array.prototype.slice;if(t.bind)return t.bind.apply(t,u.call(arguments,1));var A=u.call(arguments,2);return function(){return t.apply(i,A.length?A.concat(u.call(arguments)):arguments)}}var h=0;function x(t){return"_leaflet_id"in t||(t._leaflet_id=++h),t._leaflet_id}function p(t,i,u){var A,C,O,Q;return Q=function(){A=!1,C&&(O.apply(u,C),C=!1)},O=function(){A?C=arguments:(t.apply(u,arguments),setTimeout(Q,i),A=!0)},O}function y(t,i,u){var A=i[1],C=i[0],O=A-C;return t===A&&u?t:((t-C)%O+O)%O+C}function v(){return!1}function w(t,i){if(i===!1)return t;var u=Math.pow(10,i===void 0?6:i);return Math.round(t*u)/u}function S(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function T(t){return S(t).split(/\s+/)}function b(t,i){Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?d(t.options):{});for(var u in i)t.options[u]=i[u];return t.options}function E(t,i,u){var A=[];for(var C in t)A.push(encodeURIComponent(u?C.toUpperCase():C)+"="+encodeURIComponent(t[C]));return(!i||i.indexOf("?")===-1?"?":"&")+A.join("&")}var P=/\{ *([\w_ -]+) *\}/g;function B(t,i){return t.replace(P,function(u,A){var C=i[A];if(C===void 0)throw new Error("No value provided for variable "+u);return typeof C=="function"&&(C=C(i)),C})}var k=Array.isArray||function(t){return Object.prototype.toString.call(t)==="[object Array]"};function N(t,i){for(var u=0;u<t.length;u++)if(t[u]===i)return u;return-1}var I="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function z(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var j=0;function H(t){var i=+new Date,u=Math.max(0,16-(i-j));return j=i+u,window.setTimeout(t,u)}var $=window.requestAnimationFrame||z("RequestAnimationFrame")||H,U=window.cancelAnimationFrame||z("CancelAnimationFrame")||z("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function G(t,i,u){if(u&&$===H)t.call(i);else return $.call(window,m(t,i))}function re(t){t&&U.call(window,t)}var V={__proto__:null,extend:f,create:d,bind:m,get lastId(){return h},stamp:x,throttle:p,wrapNum:y,falseFn:v,formatNum:w,trim:S,splitWords:T,setOptions:b,getParamString:E,template:B,isArray:k,indexOf:N,emptyImageUrl:I,requestFn:$,cancelFn:U,requestAnimFrame:G,cancelAnimFrame:re};function J(){}J.extend=function(t){var i=function(){b(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},u=i.__super__=this.prototype,A=d(u);A.constructor=i,i.prototype=A;for(var C in this)Object.prototype.hasOwnProperty.call(this,C)&&C!=="prototype"&&C!=="__super__"&&(i[C]=this[C]);return t.statics&&f(i,t.statics),t.includes&&(le(t.includes),f.apply(null,[A].concat(t.includes))),f(A,t),delete A.statics,delete A.includes,A.options&&(A.options=u.options?d(u.options):{},f(A.options,t.options)),A._initHooks=[],A.callInitHooks=function(){if(!this._initHooksCalled){u.callInitHooks&&u.callInitHooks.call(this),this._initHooksCalled=!0;for(var O=0,Q=A._initHooks.length;O<Q;O++)A._initHooks[O].call(this)}},i},J.include=function(t){var i=this.prototype.options;return f(this.prototype,t),t.options&&(this.prototype.options=i,this.mergeOptions(t.options)),this},J.mergeOptions=function(t){return f(this.prototype.options,t),this},J.addInitHook=function(t){var i=Array.prototype.slice.call(arguments,1),u=typeof t=="function"?t:function(){this[t].apply(this,i)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(u),this};function le(t){if(!(typeof L>"u"||!L||!L.Mixin)){t=k(t)?t:[t];for(var i=0;i<t.length;i++)t[i]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",new Error().stack)}}var se={on:function(t,i,u){if(typeof t=="object")for(var A in t)this._on(A,t[A],i);else{t=T(t);for(var C=0,O=t.length;C<O;C++)this._on(t[C],i,u)}return this},off:function(t,i,u){if(!arguments.length)delete this._events;else if(typeof t=="object")for(var A in t)this._off(A,t[A],i);else{t=T(t);for(var C=arguments.length===1,O=0,Q=t.length;O<Q;O++)C?this._off(t[O]):this._off(t[O],i,u)}return this},_on:function(t,i,u,A){if(typeof i!="function"){console.warn("wrong listener type: "+typeof i);return}if(this._listens(t,i,u)===!1){u===this&&(u=void 0);var C={fn:i,ctx:u};A&&(C.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(C)}},_off:function(t,i,u){var A,C,O;if(this._events&&(A=this._events[t],!!A)){if(arguments.length===1){if(this._firingCount)for(C=0,O=A.length;C<O;C++)A[C].fn=v;delete this._events[t];return}if(typeof i!="function"){console.warn("wrong listener type: "+typeof i);return}var Q=this._listLine truncated
(c) 2012 by Cédric Mesnil. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/return(function(l){var f=s,d=f.lib,m=d.WordArray,h=d.Hasher,x=f.algo,p=m.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),y=m.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),v=m.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),w=m.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),S=m.create([0,1518500249,1859775393,2400959708,2840853838]),T=m.create([1352829926,1548603684,1836072691,2053994217,0]),b=x.RIPEMD160=h.extend({_doReset:function(){this._hash=m.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(z,j){for(var H=0;H<16;H++){var $=j+H,U=z[$];z[$]=(U<<8|U>>>24)&16711935|(U<<24|U>>>8)&4278255360}var G=this._hash.words,re=S.words,V=T.words,J=p.words,le=y.words,se=v.words,de=w.words,q,ge,ne,D,Z,K,X,fe,he,ke;K=q=G[0],X=ge=G[1],fe=ne=G[2],he=D=G[3],ke=Z=G[4];for(var Ae,H=0;H<80;H+=1)Ae=q+z[j+J[H]]|0,H<16?Ae+=E(ge,ne,D)+re[0]:H<32?Ae+=P(ge,ne,D)+re[1]:H<48?Ae+=B(ge,ne,D)+re[2]:H<64?Ae+=k(ge,ne,D)+re[3]:Ae+=N(ge,ne,D)+re[4],Ae=Ae|0,Ae=I(Ae,se[H]),Ae=Ae+Z|0,q=Z,Z=D,D=I(ne,10),ne=ge,ge=Ae,Ae=K+z[j+le[H]]|0,H<16?Ae+=N(X,fe,he)+V[0]:H<32?Ae+=k(X,fe,he)+V[1]:H<48?Ae+=B(X,fe,he)+V[2]:H<64?Ae+=P(X,fe,he)+V[3]:Ae+=E(X,fe,he)+V[4],Ae=Ae|0,Ae=I(Ae,de[H]),Ae=Ae+ke|0,K=ke,ke=he,he=I(fe,10),fe=X,X=Ae;Ae=G[1]+ne+he|0,G[1]=G[2]+D+ke|0,G[2]=G[3]+Z+K|0,G[3]=G[4]+q+X|0,G[4]=G[0]+ge+fe|0,G[0]=Ae},_doFinalize:function(){var z=this._data,j=z.words,H=this._nDataBytes*8,$=z.sigBytes*8;j[$>>>5]|=128<<24-$%32,j[($+64>>>9<<4)+14]=(H<<8|H>>>24)&16711935|(H<<24|H>>>8)&4278255360,z.sigBytes=(j.length+1)*4,this._process();for(var U=this._hash,G=U.words,re=0;re<5;re++){var V=G[re];G[re]=(V<<8|V>>>24)&16711935|(V<<24|V>>>8)&4278255360}return U},clone:function(){var z=h.clone.call(this);return z._hash=this._hash.clone(),z}});function E(z,j,H){return z^j^H}function P(z,j,H){return z&j|~z&H}function B(z,j,H){return(z|~j)^H}function k(z,j,H){return z&H|j&~H}function N(z,j,H){return z^(j|~H)}function I(z,j){return z<<j|z>>>32-j}f.RIPEMD160=h._createHelper(b),f.HmacRIPEMD160=h._createHmacHelper(b)})(),s.RIPEMD160})})(Yu)),Yu.exports}var Xu={exports:{}},dC=Xu.exports,gm;function Qc(){return gm||(gm=1,(function(r,a){(function(s,l){r.exports=l(ct())})(dC,function(s){(function(){var l=s,f=l.lib,d=f.Base,m=l.enc,h=m.Utf8,x=l.algo;x.HMAC=d.extend({init:function(p,y){p=this._hasher=new p.init,typeof y=="string"&&(y=h.parse(y));var v=p.blockSize,w=v*4;y.sigBytes>w&&(y=p.finalize(y)),y.clamp();for(var S=this._oKey=y.clone(),T=this._iKey=y.clone(),b=S.words,E=T.words,P=0;P<v;P++)b[P]^=1549556828,E[P]^=909522486;S.sigBytes=T.sigBytes=w,this.reset()},reset:function(){var p=this._hasher;p.reset(),p.update(this._iKey)},update:function(p){return this._hasher.update(p),this},finalize:function(p){var y=this._hasher,v=y.finalize(p);y.reset();var w=y.finalize(this._oKey.clone().concat(v));return w}})})()})})(Xu)),Xu.exports}var Ju={exports:{}},fC=Ju.exports,xm;function hC(){return xm||(xm=1,(function(r,a){(function(s,l,f){r.exports=l(ct(),ll(),Qc())})(fC,function(s){return(function(){var l=s,f=l.lib,d=f.Base,m=f.WordArray,h=l.algo,x=h.SHA256,p=h.HMAC,y=h.PBKDF2=d.extend({cfg:d.extend({keySize:128/32,hasher:x,iterations:25e4}),init:function(v){this.cfg=this.cfg.extend(v)},compute:function(v,w){for(var S=this.cfg,T=p.create(S.hasher,v),b=m.create(),E=m.create([1]),P=b.words,B=E.words,k=S.keySize,N=S.iterations;P.length<k;){var I=T.update(w).finalize(E);T.reset();for(var z=I.words,j=z.length,H=I,$=1;$<N;$++){H=T.finalize(H),T.reset();for(var U=H.words,G=0;G<j;G++)z[G]^=U[G]}b.concat(I),B[0]++}return b.sigBytes=k*4,b}});l.PBKDF2=function(v,w,S){return y.create(S).compute(v,w)}})(),s.PBKDF2})})(Ju)),Ju.exports}var ec={exports:{}},pC=ec.exports,vm;function so(){return vm||(vm=1,(function(r,a){(function(s,l,f){r.exports=l(ct(),lx(),Qc())})(pC,function(s){return(function(){var l=s,f=l.lib,d=f.Base,m=f.WordArray,h=l.algo,x=h.MD5,p=h.EvpKDF=d.extend({cfg:d.extend({keySize:128/32,hasher:x,iterations:1}),init:function(y){this.cfg=this.cfg.extend(y)},compute:function(y,v){for(var w,S=this.cfg,T=S.hasher.create(),b=m.create(),E=b.words,P=S.keySize,B=S.iterations;E.length<P;){w&&T.update(w),w=T.update(y).finalize(v),T.reset();for(var k=1;k<B;k++)w=T.finalize(w),T.reset();b.concat(w)}return b.sigBytes=P*4,b}});l.EvpKDF=function(y,v,w){return p.create(w).compute(y,v)}})(),s.EvpKDF})})(ec)),ec.exports}var tc={exports:{}},mC=tc.Line truncated
* Counter block mode compatible with Dr Brian Gladman fileenc.c
* derived from CryptoJS.mode.CTR
* Jan Hruby jhruby.web@gmail.com
*/return s.mode.CTRGladman=(function(){var l=s.lib.BlockCipherMode.extend();function f(h){if((h>>24&255)===255){var x=h>>16&255,p=h>>8&255,y=h&255;x===255?(x=0,p===255?(p=0,y===255?y=0:++y):++p):++x,h=0,h+=x<<16,h+=p<<8,h+=y}else h+=1<<24;return h}function d(h){return(h[0]=f(h[0]))===0&&(h[1]=f(h[1])),h}var m=l.Encryptor=l.extend({processBlock:function(h,x){var p=this._cipher,y=p.blockSize,v=this._iv,w=this._counter;v&&(w=this._counter=v.slice(0),this._iv=void 0),d(w);var S=w.slice(0);p.encryptBlock(S,0);for(var T=0;T<y;T++)h[x+T]^=S[T]}});return l.Decryptor=m,l})(),s.mode.CTRGladman})})(ic)),ic.exports}var oc={exports:{}},wC=oc.exports,bm;function CC(){return bm||(bm=1,(function(r,a){(function(s,l,f){r.exports=l(ct(),dn())})(wC,function(s){return s.mode.OFB=(function(){var l=s.lib.BlockCipherMode.extend(),f=l.Encryptor=l.extend({processBlock:function(d,m){var h=this._cipher,x=h.blockSize,p=this._iv,y=this._keystream;p&&(y=this._keystream=p.slice(0),this._iv=void 0),h.encryptBlock(y,0);for(var v=0;v<x;v++)d[m+v]^=y[v]}});return l.Decryptor=f,l})(),s.mode.OFB})})(oc)),oc.exports}var sc={exports:{}},bC=sc.exports,Em;function EC(){return Em||(Em=1,(function(r,a){(function(s,l,f){r.exports=l(ct(),dn())})(bC,function(s){return s.mode.ECB=(function(){var l=s.lib.BlockCipherMode.extend();return l.Encryptor=l.extend({processBlock:function(f,d){this._cipher.encryptBlock(f,d)}}),l.Decryptor=l.extend({processBlock:function(f,d){this._cipher.decryptBlock(f,d)}}),l})(),s.mode.ECB})})(sc)),sc.exports}var ac={exports:{}},kC=ac.exports,km;function SC(){return km||(km=1,(function(r,a){(function(s,l,f){r.exports=l(ct(),dn())})(kC,function(s){return s.pad.AnsiX923={pad:function(l,f){var d=l.sigBytes,m=f*4,h=m-d%m,x=d+h-1;l.clamp(),l.words[x>>>2]|=h<<24-x%4*8,l.sigBytes+=h},unpad:function(l){var f=l.words[l.sigBytes-1>>>2]&255;l.sigBytes-=f}},s.pad.Ansix923})})(ac)),ac.exports}var lc={exports:{}},BC=lc.exports,Sm;function PC(){return Sm||(Sm=1,(function(r,a){(function(s,l,f){r.exports=l(ct(),dn())})(BC,function(s){return s.pad.Iso10126={pad:function(l,f){var d=f*4,m=d-l.sigBytes%d;l.concat(s.lib.WordArray.random(m-1)).concat(s.lib.WordArray.create([m<<24],1))},unpad:function(l){var f=l.words[l.sigBytes-1>>>2]&255;l.sigBytes-=f}},s.pad.Iso10126})})(lc)),lc.exports}var uc={exports:{}},TC=uc.exports,Bm;function DC(){return Bm||(Bm=1,(function(r,a){(function(s,l,f){r.exports=l(ct(),dn())})(TC,function(s){return s.pad.Iso97971={pad:function(l,f){l.concat(s.lib.WordArray.create([2147483648],1)),s.pad.ZeroPadding.pad(l,f)},unpad:function(l){s.pad.ZeroPadding.unpad(l),l.sigBytes--}},s.pad.Iso97971})})(uc)),uc.exports}var cc={exports:{}},RC=cc.exports,Pm;function FC(){return Pm||(Pm=1,(function(r,a){(function(s,l,f){r.exports=l(ct(),dn())})(RC,function(s){return s.pad.ZeroPadding={pad:function(l,f){var d=f*4;l.clamp(),l.sigBytes+=d-(l.sigBytes%d||d)},unpad:function(l){for(var f=l.words,d=l.sigBytes-1,d=l.sigBytes-1;d>=0;d--)if(f[d>>>2]>>>24-d%4*8&255){l.sigBytes=d+1;break}}},s.pad.ZeroPadding})})(cc)),cc.exports}var dc={exports:{}},NC=dc.exports,Tm;function LC(){return Tm||(Tm=1,(function(r,a){(function(s,l,f){r.exports=l(ct(),dn())})(NC,function(s){return s.pad.NoPadding={pad:function(){},unpad:function(){}},s.pad.NoPadding})})(dc)),dc.exports}var fc={exports:{}},MC=fc.exports,Dm;function IC(){return Dm||(Dm=1,(function(r,a){(function(s,l,f){r.exports=l(ct(),dn())})(MC,function(s){return(function(l){var f=s,d=f.lib,m=d.CipherParams,h=f.enc,x=h.Hex,p=f.format;p.Hex={stringify:function(y){return y.ciphertext.toString(x)},parse:function(y){var v=x.parse(y);return m.create({ciphertext:v})}}})(),s.format.Hex})})(fc)),fc.exports}var hc={exports:{}},OC=hc.exports,Rm;function zC(){return Rm||(Rm=1,(function(r,a){(function(s,l,f){r.exports=l(ct(),Wo(),qo(),so(),dn())})(OC,function(s){return(function(){var l=s,f=l.lib,d=f.BlockCipher,m=l.algo,h=[],x=[],p=[],y=[],v=[],w=[],S=[],T=[],b=[],E=[];(function(){for(var k=[],N=0;N<256;N++)N<128?k[N]=N<<1:k[N]=N<<1^283;for(var I=0,z=0,N=0;N<256;N++){var j=z^z<<1^z<<2^z<<3^z<<4;j=j>>>8^j&255^99,h[I]=j,x[j]=I;var H=k[I],$=k[H],U=k[$],G=k[j]*257^j*16843008;p[I]=G<<24|G>>>8,y[I]=G<<16|G>>>16,v[I]=G<<8|G>>>24,w[I]=G;var G=U*16843009^$*65537^H*257^I*16843008;S[j]=G<<24|G>>>8,T[j]=G<<16|G>>>16,b[j]=G<<8|G>>>24,E[j]=G,I?(I=H^k[k[k[U^H]]],z^=k[k[z]]):I=z=1}})();var P=[0,1,2,4,8,16,32,64,128,27,54],B=m.AES=d.extend({_doReset:function(){var k;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var N=this._keyPriorReset=this._key,I=N.words,z=N.sigBytes/4,j=this._nRounds=z+6,H=(j+1)*4,$=this._keySchedule=[],U=0;U<H;U++)U<z?$[U]=I[U]:(k=$[U-1],U%z?z>6&&U%z==4&&(k=h[k>>>24]<<24|h[k>>>16&255]<<16|h[k>>>8&255]<<8|h[k&255]):(k=k<<8|k>>>24,k=h[k>>>24]<<24|h[k>>>16&255]<<16|h[k>>>8&255]<<8|h[k&255],k^=P[U/z|0]<<24),$[U]=$[U-z]^k);for(var G=this._invKeySchedule=[],re=0;re<H;re++){var U=H-re;if(re%4)var k=$[U];else var k=$[U-4];re<4||U<=4?G[re]=k:G[re]=S[h[k>>>24]]^T[h[k>>>16&255]]^b[h[k>>>8&255]]^E[h[k&255]]}}},encryLine truncated
• Timestamp (4 bytes) - send time as unix timestamp
• Request Type (1 byte) - type of request (GetStats, GetTelemetryData, etc.)
• Request Data (remaining bytes) - additional request-specific data`,startByte:h+x,endByte:h+f.length-1,value:w});const S={type:r.PayloadType.Request,version:r.PayloadVersion.Version1,isValid:!0,timestamp:0,requestType:r.RequestType.GetStats,requestData:"",destinationHash:p,sourceHash:y,cipherMac:v,ciphertext:w};return d!=null&&d.includeSegments&&(S.segments=m),S}catch(m){return{type:r.PayloadType.Request,version:r.PayloadVersion.Version1,isValid:!1,errors:[m instanceof Error?m.message:"Failed to decode request payload"],timestamp:0,requestType:r.RequestType.GetStats,requestData:"",destinationHash:"",sourceHash:"",cipherMac:"",ciphertext:""}}}}return Za.RequestPayloadDecoder=s,Za}var Wa={},tA;function _b(){if(tA)return Wa;tA=1,Object.defineProperty(Wa,"__esModule",{value:!0}),Wa.ResponsePayloadDecoder=void 0;const r=ir(),a=gn();class s{static decode(f,d){try{if(f.length<4){const T={type:r.PayloadType.Response,version:r.PayloadVersion.Version1,isValid:!1,errors:["Response payload too short (minimum 4 bytes: dest + source + MAC)"],destinationHash:"",sourceHash:"",cipherMac:"",ciphertext:"",ciphertextLength:0};return d!=null&&d.includeSegments&&(T.segments=[{name:"Invalid Response Data",description:"Response payload too short (minimum 4 bytes required)",startByte:d.segmentOffset||0,endByte:(d.segmentOffset||0)+f.length-1,value:(0,a.bytesToHex)(f)}]),T}const m=[],h=(d==null?void 0:d.segmentOffset)||0;let x=0;const p=(0,a.byteToHex)(f[x]);d!=null&&d.includeSegments&&m.push({name:"Destination Hash",description:"First byte of destination node public key",startByte:h+x,endByte:h+x,value:p}),x+=1;const y=(0,a.byteToHex)(f[x]);d!=null&&d.includeSegments&&m.push({name:"Source Hash",description:"First byte of source node public key",startByte:h+x,endByte:h+x,value:y}),x+=1;const v=(0,a.bytesToHex)(f.subarray(x,x+2));d!=null&&d.includeSegments&&m.push({name:"Cipher MAC",description:"MAC for encrypted data in next field",startByte:h+x,endByte:h+x+1,value:v}),x+=2;const w=(0,a.bytesToHex)(f.subarray(x));d!=null&&d.includeSegments&&f.length>x&&m.push({name:"Ciphertext",description:"Encrypted response data (tag + content)",startByte:h+x,endByte:h+f.length-1,value:w});const S={type:r.PayloadType.Response,version:r.PayloadVersion.Version1,isValid:!0,destinationHash:p,sourceHash:y,cipherMac:v,ciphertext:w,ciphertextLength:f.length-4};return d!=null&&d.includeSegments&&(S.segments=m),S}catch(m){return{type:r.PayloadType.Response,version:r.PayloadVersion.Version1,isValid:!1,errors:[m instanceof Error?m.message:"Failed to decode response payload"],destinationHash:"",sourceHash:"",cipherMac:"",ciphertext:"",ciphertextLength:0}}}}return Wa.ResponsePayloadDecoder=s,Wa}var qa={},nA;function wb(){if(nA)return qa;nA=1,Object.defineProperty(qa,"__esModule",{value:!0}),qa.AnonRequestPayloadDecoder=void 0;const r=ir(),a=gn();class s{static decode(f,d){try{if(f.length<35){const T={type:r.PayloadType.AnonRequest,version:r.PayloadVersion.Version1,isValid:!1,errors:["AnonRequest payload too short (minimum 35 bytes: dest + public key + MAC)"],destinationHash:"",senderPublicKey:"",cipherMac:"",ciphertext:"",ciphertextLength:0};return d!=null&&d.includeSegments&&(T.segments=[{name:"Invalid AnonRequest Data",description:"AnonRequest payload too short (minimum 35 bytes required: 1 for dest hash + 32 for public key + 2 for MAC)",startByte:d.segmentOffset||0,endByte:(d.segmentOffset||0)+f.length-1,value:(0,a.bytesToHex)(f)}]),T}const m=[],h=(d==null?void 0:d.segmentOffset)||0;let x=0;const p=(0,a.byteToHex)(f[0]);d!=null&&d.includeSegments&&m.push({name:"Destination Hash",description:`First byte of destination node public key: 0x${p}`,startByte:h+x,endByte:h+x,value:p}),x+=1;const y=(0,a.bytesToHex)(f.subarray(1,33));d!=null&&d.includeSegments&&m.push({name:"Sender Public Key",description:"Ed25519 public key of the sender (32 bytes)",startByte:h+x,endByte:h+x+31,value:y}),x+=32;const v=(0,a.bytesToHex)(f.subarray(33,35));d!=null&&d.includeSegments&&m.push({name:"Cipher MAC",description:"MAC for encrypted data verification (2 bytes)",startByte:h+x,endByte:h+x+1,value:v}),x+=2;const w=(0,a.bytesToHex)(f.subarray(35));d!=null&&d.includeSegments&&f.length>35&&m.push({name:"Ciphertext",description:`Encrypted message data (${f.length-35} bytes). Contains encrypted plaintext with this structure:
• Timestamp (4 bytes) - send time as unix timestamp
• Sync Timestamp (4 bytes) - room server only, sender's "sync messages SINCE x" timestamp
• Password (remaining bytes) - password for repeater/room`,startByte:h+x,endByte:h+f.length-1,value:w});const S={type:r.PayloadType.AnonRequest,version:r.PayloadVersion.Version1,isValid:!0,destinationHash:p,senderPublicKey:y,cipherMac:v,ciphertext:w,ciphertextLength:f.length-35};return d!=null&&d.includeSegments&&(S.segments=m),S}catch(m){return{type:r.PayloadType.AnonRequest,version:r.PayloadVersion.Version1,isValid:!1,errors:[m instanceof Error?m.message:"Failed to decode AnonRequest payload"],destinationHash:"",senderPublicKey:"",cipherMac:"",ciphertext:"",ciphertextLength:0}}}}return qa.AnonRequestPayloadDecoder=s,qa}var Ga={},rA;function Cb(){if(rA)return Ga;rA=1,Object.defineProperty(Ga,"__esModule",{value:!0}),Ga.AckPayloadDecoder=void 0;const r=ir(),a=gn();class s{static decode(f,d){try{if(f.length<4){const y={type:r.PayloadType.Ack,version:r.PayloadVersion.Version1,isValid:!1,errors:["Ack payload too short (minimum 4 bytes for checksum)"],checksum:""};return d!=null&&d.includeSegments&&(y.segments=[{name:"Invalid Ack Data",description:"Ack payload too short (minimum 4 bytes required for checksum)",startByte:d.segmentOffset||0,endByte:(d.segmentOffset||0)+f.length-1,value:(0,a.bytesToHex)(f)}]),y}const m=[],h=(d==null?void 0:d.segmentOffset)||0,x=(0,a.bytesToHex)(f.subarray(0,4));d!=null&&d.includeSegments&&m.push({name:"Checksum",description:`CRC checksum of message timestamp, text, and sender pubkey: 0x${x}`,startByte:h,endByte:h+3,value:x}),d!=null&&d.includeSegments&&f.length>4&&m.push({name:"Additional Data",description:"Extra data in Ack payload",startByte:h+4,endByte:h+f.length-1,value:(0,a.bytesToHex)(f.subarray(4))});const p={type:r.PayloadType.Ack,version:r.PayloadVersion.Version1,isValid:!0,checksum:x};return d!=null&&d.includeSegments&&(p.segments=m),p}catch(m){return{type:r.PayloadType.Ack,version:r.PayloadVersion.Version1,isValid:!1,errors:[m instanceof Error?m.message:"Failed to decode Ack payload"],checksum:""}}}}return Ga.AckPayloadDecoder=s,Ga}var Qa={},iA;function bb(){if(iA)return Qa;iA=1,Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.PathPayloadDecoder=void 0;const r=ir(),a=gn();class s{static decode(f){try{if(f.length<2)return{type:r.PayloadType.Path,version:r.PayloadVersion.Version1,isValid:!1,errors:["Path payload too short (minimum 2 bytes: path length + extra type)"],pathLength:0,pathHashes:[],extraType:0,extraData:""};const d=f[0];if(f.length<1+d+1)return{type:r.PayloadType.Path,version:r.PayloadVersion.Version1,isValid:!1,errors:[`Path payload too short (need ${1+d+1} bytes for path length + path + extra type)`],pathLength:d,pathHashes:[],extraType:0,extraData:""};const m=[];for(let p=0;p<d;p++)m.push((0,a.byteToHex)(f[1+p]));const h=f[1+d];let x="";return f.length>1+d+1&&(x=(0,a.bytesToHex)(f.subarray(1+d+1))),{type:r.PayloadType.Path,version:r.PayloadVersion.Version1,isValid:!0,pathLength:d,pathHashes:m,extraType:h,extraData:x}}catch(d){return{type:r.PayloadType.Path,version:r.PayloadVersion.Version1,isValid:!1,errors:[d instanceof Error?d.message:"Failed to decode Path payload"],pathLength:0,pathHashes:[],extraType:0,extraData:""}}}}return Qa.PathPayloadDecoder=s,Qa}var Ka={},oA;function Eb(){if(oA)return Ka;oA=1,Object.defineProperty(Ka,"__esModule",{value:!0}),Ka.TextMessagePayloadDecoder=void 0;const r=ir(),a=gn();class s{static decode(f,d){try{if(f.length<4){const T={type:r.PayloadType.TextMessage,version:r.PayloadVersion.Version1,isValid:!1,errors:["TextMessage payload too short (minimum 4 bytes: dest + source + MAC)"],destinationHash:"",sourceHash:"",cipherMac:"",ciphertext:"",ciphertextLength:0};return d!=null&&d.includeSegments&&(T.segments=[{name:"Invalid TextMessage Data",description:"TextMessage payload too short (minimum 4 bytes required)",startByte:d.segmentOffset||0,endByte:(d.segmentOffset||0)+f.length-1,value:(0,a.bytesToHex)(f)}]),T}const m=[],h=(d==null?void 0:d.segmentOffset)||0;let x=0;const p=(0,a.byteToHex)(f[x]);d!=null&&d.includeSegments&&m.push({name:"Destination Hash",description:"First byte of destination node public key",startByte:h+x,endByte:h+x,value:p}),x+=1;const y=(0,a.byteToHex)(f[x]);d!=null&&d.includeSegments&&m.push({name:"Source Hash",description:"First byte of source node public key",startByte:h+x,endByte:h+x,value:y}),x+=1;const v=(0,a.bytesToHex)(f.subarray(x,x+2));d!=null&&d.includeSegments&&m.push({name:"Cipher MAC",description:"MAC for encrypted data in next field",startByte:h+x,endByte:h+x+1,value:v}),x+=2;const w=(0,a.bytesToHex)(f.subarray(x));d!=null&&d.includeSegments&&f.length>x&&m.push({name:"Ciphertext",description:"Encrypted message data (timestamp + message text)",startByte:h+x,endByte:h+f.length-1,value:w});const S={type:r.PayloadType.TextMessage,version:r.PayloadVersion.Version1,isValid:!0,destinationHash:p,sourceHash:y,cipherMac:v,ciphertext:w,ciphertextLength:f.length-4};return d!=null&&d.includeSegments&&(S.segments=m),S}catch(m){return{type:r.PayloadType.TextMessage,version:r.PayloadVersion.Version1,i Line truncated
// SHA256 round constants
const K: array<u32, 64> = array<u32, 64>(
0x428a2f98u, 0x71374491u, 0xb5c0fbcfu, 0xe9b5dba5u, 0x3956c25bu, 0x59f111f1u, 0x923f82a4u, 0xab1c5ed5u,
0xd807aa98u, 0x12835b01u, 0x243185beu, 0x550c7dc3u, 0x72be5d74u, 0x80deb1feu, 0x9bdc06a7u, 0xc19bf174u,
0xe49b69c1u, 0xefbe4786u, 0x0fc19dc6u, 0x240ca1ccu, 0x2de92c6fu, 0x4a7484aau, 0x5cb0a9dcu, 0x76f988dau,
0x983e5152u, 0xa831c66du, 0xb00327c8u, 0xbf597fc7u, 0xc6e00bf3u, 0xd5a79147u, 0x06ca6351u, 0x14292967u,
0x27b70a85u, 0x2e1b2138u, 0x4d2c6dfcu, 0x53380d13u, 0x650a7354u, 0x766a0abbu, 0x81c2c92eu, 0x92722c85u,
0xa2bfe8a1u, 0xa81a664bu, 0xc24b8b70u, 0xc76c51a3u, 0xd192e819u, 0xd6990624u, 0xf40e3585u, 0x106aa070u,
0x19a4c116u, 0x1e376c08u, 0x2748774cu, 0x34b0bcb5u, 0x391c0cb3u, 0x4ed8aa4au, 0x5b9cca4fu, 0x682e6ff3u,
0x748f82eeu, 0x78a5636fu, 0x84c87814u, 0x8cc70208u, 0x90befffau, 0xa4506cebu, 0xbef9a3f7u, 0xc67178f2u
);
// Character lookup table (a-z = 0-25, 0-9 = 26-35, dash = 36)
const CHARS: array<u32, 37> = array<u32, 37>(
0x61u, 0x62u, 0x63u, 0x64u, 0x65u, 0x66u, 0x67u, 0x68u, 0x69u, 0x6au, // a-j
0x6bu, 0x6cu, 0x6du, 0x6eu, 0x6fu, 0x70u, 0x71u, 0x72u, 0x73u, 0x74u, // k-t
0x75u, 0x76u, 0x77u, 0x78u, 0x79u, 0x7au, // u-z
0x30u, 0x31u, 0x32u, 0x33u, 0x34u, 0x35u, 0x36u, 0x37u, 0x38u, 0x39u, // 0-9
0x2du // dash
);
struct Params {
target_channel_hash: u32,
batch_offset: u32,
name_length: u32,
batch_size: u32,
target_mac: u32, // First 2 bytes of target MAC (in high 16 bits)
ciphertext_words: u32, // Number of 32-bit words in ciphertext
ciphertext_len_bits: u32, // Length of ciphertext in bits
verify_mac: u32, // 1 to verify MAC, 0 to skip
}
@group(0) @binding(0) var<uniform> params: Params;
@group(0) @binding(1) var<storage, read_write> match_count: atomic<u32>;
@group(0) @binding(2) var<storage, read_write> match_indices: array<u32>;
@group(0) @binding(3) var<storage, read> ciphertext: array<u32>; // Ciphertext data
fn rotr(x: u32, n: u32) -> u32 {
return (x >> n) | (x << (32u - n));
}
fn ch(x: u32, y: u32, z: u32) -> u32 {
return (x & y) ^ (~x & z);
}
fn maj(x: u32, y: u32, z: u32) -> u32 {
return (x & y) ^ (x & z) ^ (y & z);
}
fn sigma0(x: u32) -> u32 {
return rotr(x, 2u) ^ rotr(x, 13u) ^ rotr(x, 22u);
}
fn sigma1(x: u32) -> u32 {
return rotr(x, 6u) ^ rotr(x, 11u) ^ rotr(x, 25u);
}
fn gamma0(x: u32) -> u32 {
return rotr(x, 7u) ^ rotr(x, 18u) ^ (x >> 3u);
}
fn gamma1(x: u32) -> u32 {
return rotr(x, 17u) ^ rotr(x, 19u) ^ (x >> 10u);
}
// Convert index to room name bytes, returns the hash as a u32 for the first byte check
fn index_to_room_name(idx: u32, length: u32, msg: ptr<function, array<u32, 16>>) -> bool {
// Message starts with '#' (0x23)
var byte_pos = 0u;
var word_idx = 0u;
var current_word = 0x23000000u; // '#' in big-endian position 0
byte_pos = 1u;
var remaining = idx;
var prev_was_dash = false;
// Generate room name from index
for (var i = 0u; i < length; i++) {
let char_count = select(37u, 36u, i == 0u || i == length - 1u); // no dash at start/end
var char_idx = remaining % char_count;
remaining = remaining / char_count;
// Check for consecutive dashes (invalid)
let is_dash = char_idx == 36u && i > 0u && i < length - 1u;
if (is_dash && prev_was_dash) {
return false; // Invalid: consecutive dashes
}
prev_was_dash = is_dash;
// Map char index to actual character
let c = CHARS[char_idx];
// Pack byte into current word (big-endian)
let shift = (3u - byte_pos % 4u) * 8u;
if (byte_pos % 4u == 0u && byte_pos > 0u) {
(*msg)[word_idx] = current_word;
word_idx = word_idx + 1u;
current_word = 0u;
}
current_word = current_word | (c << shift);
byte_pos = byte_pos + 1u;
}
// Add padding: 0x80 followed by zeros, then length in bits
let msg_len_bits = (length + 1u) * 8u; // +1 for '#'
// Add 0x80 padding byte
let shift = (3u - byte_pos % 4u) * 8u;
if (byte_pos % 4u == 0u) {
(*msg)[word_idx] = current_word;
word_idx = word_idx + 1u;
current_word = 0x80000000u;
} else {
current_word = current_word | (0x80u << shift);
}
byte_pos = byte_pos + 1u;
// Store current word
if (byte_pos % 4u == 0u || word_idx < 14u) {
(*msg)[word_idx] = current_word;
word_idx = word_idx + 1u;
}
// Zero-fill until word 14
for (var i = word_idx; i < 14u; i++) {
(*msg)[i] = 0u;
}
// Length in bits (64-bit, but we only use lower 32 bits for short messages)
(*msg)[14u] = 0u;
(*msg)[15u] = msg_len_bits;
return true;
}
fn sha256_block(msg: ptr<function, array<u32, 16>>) -> array<u32, 8> {
// Initialize hash values
var h: array<u32, 8> = array<u32, 8>(
0x6a09e667u, 0xbb67ae85u, 0x3c6ef372u, 0xa54ff53au,
0x510e527fu, 0x9b05688cu, 0x1f83d9abu, 0x5be0cd19u
);
// Message schedule
var w: array<u32, 64>;
for (var i = 0u; i < 16u; i++) {
w[i] = (*msg)[i];
}
for (var i = 16u; i < 64u; i++) {
w[i] = gamma1(w[i-2u]) + w[i-7u] + gamma0(w[i-15u]) + w[i-16u];
}
// Compression
var a = h[0]; var b = h[1]; var c = h[2]; var d = h[3];
var e = h[4]; var f = h[5]; var g = h[6]; var hh = h[7];
for (var i = 0u; i < 64u; i++) {
let t1 = hh + sigma1(e) + ch(e, f, g) + K[i] + w[i];
let t2 = sigma0(a) + maj(a, b, c);
hh = g; g = f; f = e; e = d + t1;
d = c; c = b; b = a; a = t1 + t2;
}
h[0] = h[0] + a; h[1] = h[1] + b; h[2] = h[2] + c; h[3] = h[3] + d;
h[4] = h[4] + e; h[5] = h[5] + f; h[6] = h[6] + g; h[7] = h[7] + hh;
return h;
}
// Compute SHA256 of the key (16 bytes) to get channel hash
fn sha256_key(key: array<u32, 4>) -> u32 {
var msg: array<u32, 16>;
// Key bytes (16 bytes = 4 words)
msg[0] = key[0];
msg[1] = key[1];
msg[2] = key[2];
msg[3] = key[3];
// Padding: 0x80 followed by zeros
msg[4] = 0x80000000u;
for (var i = 5u; i < 14u; i++) {
msg[i] = 0u;
}
// Length: 128 bits
msg[14] = 0u;
msg[15] = 128u;
let hash = sha256_block(&msg);
// Return first byte of hash (big-endian)
return hash[0] >> 24u;
}
// HMAC-SHA256 for MAC verification
// Key is 16 bytes (4 words), padded to 32 bytes with zeros for MeshCore
// Returns first 2 bytes of HMAC (as u32 in high 16 bits)
fn hmac_sha256_mac(key: array<u32, 4>, ciphertext_len: u32) -> u32 {
// HMAC: H((K' ^ opad) || H((K' ^ ipad) || message))
// K' is 64 bytes (32 bytes key + 32 bytes zero padding for MeshCore, then padded to 64)
// ipad = 0x36 repeated, opad = 0x5c repeated
// Build padded key (64 bytes = 16 words)
// MeshCore uses 32-byte secret: 16-byte key + 16 zero bytes
var k_pad: array<u32, 16>;
k_pad[0] = key[0];
k_pad[1] = key[1];
k_pad[2] = key[2];
k_pad[3] = key[3];
for (var i = 4u; i < 16u; i++) {
k_pad[i] = 0u;
}
// Inner hash: SHA256((K' ^ ipad) || message)
// First block: K' ^ ipad (64 bytes)
var inner_block: array<u32, 16>;
for (var i = 0u; i < 16u; i++) {
inner_block[i] = k_pad[i] ^ 0x36363636u;
}
// Initialize hash state with first block
var h: array<u32, 8> = sha256_block(&inner_block);
// Process ciphertext blocks (continuing from h state)
let ciphertext_words = params.ciphertext_words;
var word_idx = 0u;
// Process full 64-byte blocks of ciphertext
while (word_idx + 16u <= ciphertext_words) {
var block: array<u32, 16>;
for (var i = 0u; i < 16u; i++) {
block[i] = ciphertext[word_idx + i];
}
h = sha256_block_continue(&block, h);
word_idx = word_idx + 16u;
}
// Final block with remaining ciphertext + padding
var final_block: array<u32, 16>;
var remaining = ciphertext_words - word_idx;
for (var i = 0u; i < 16u; i++) {
if (i < remaining) {
final_block[i] = ciphertext[word_idx + i];
} else if (i == remaining) {
// Add 0x80 padding
final_block[i] = 0x80000000u;
} else {
final_block[i] = 0u;
}
}
// Add length (64 bytes of ipad + ciphertext length)
let total_bits = 512u + params.ciphertext_len_bits;
if (remaining < 14u) {
final_block[14] = 0u;
final_block[15] = total_bits;
h = sha256_block_continue(&final_block, h);
} else {
// Need extra block for length
h = sha256_block_continue(&final_block, h);
var len_block: array<u32, 16>;
for (var i = 0u; i < 14u; i++) {
len_block[i] = 0u;
}
len_block[14] = 0u;
len_block[15] = total_bits;
h = sha256_block_continue(&len_block, h);
}
let inner_hash = h;
// Outer hash: SHA256((K' ^ opad) || inner_hash)
var outer_block: array<u32, 16>;
for (var i = 0u; i < 16u; i++) {
outer_block[i] = k_pad[i] ^ 0x5c5c5c5cu;
}
h = sha256_block(&outer_block);
// Second block: inner_hash (32 bytes) + padding
var hash_block: array<u32, 16>;
for (var i = 0u; i < 8u; i++) {
hash_block[i] = inner_hash[i];
}
hash_block[8] = 0x80000000u;
for (var i = 9u; i < 14u; i++) {
hash_block[i] = 0u;
}
hash_block[14] = 0u;
hash_block[15] = 512u + 256u; // 64 bytes opad + 32 bytes inner hash
h = sha256_block_continue(&hash_block, h);
// Return first 2 bytes (high 16 bits of first word)
return h[0] & 0xFFFF0000u;
}
// SHA256 block computation continuing from existing state
fn sha256_block_continue(msg: ptr<function, array<u32, 16>>, h_in: array<u32, 8>) -> array<u32, 8> {
var h = h_in;
// Message schedule
var w: array<u32, 64>;
for (var i = 0u; i < 16u; i++) {
w[i] = (*msg)[i];
}
for (var i = 16u; i < 64u; i++) {
w[i] = gamma1(w[i-2u]) + w[i-7u] + gamma0(w[i-15u]) + w[i-16u];
}
// Compression
var a = h[0]; var b = h[1]; var c = h[2]; var d = h[3];
var e = h[4]; var f = h[5]; var g = h[6]; var hh = h[7];
for (var i = 0u; i < 64u; i++) {
let t1 = hh + sigma1(e) + ch(e, f, g) + K[i] + w[i];
let t2 = sigma0(a) + maj(a, b, c);
hh = g; g = f; f = e; e = d + t1;
d = c; c = b; b = a; a = t1 + t2;
}
h[0] = h[0] + a; h[1] = h[1] + b; h[2] = h[2] + c; h[3] = h[3] + d;
h[4] = h[4] + e; h[5] = h[5] + f; h[6] = h[6] + g; h[7] = h[7] + hh;
return h;
}
// Process a single candidate and record match if found
fn process_candidate(name_idx: u32) {
// Generate message for this room name
var msg: array<u32, 16>;
let valid = index_to_room_name(name_idx, params.name_length, &msg);
if (!valid) {
return;
}
// Compute SHA256("#roomname") - this gives us the key
let key_hash = sha256_block(&msg);
// Take first 16 bytes (4 words) as the key
var key: array<u32, 4>;
key[0] = key_hash[0];
key[1] = key_hash[1];
key[2] = key_hash[2];
key[3] = key_hash[3];
// Compute SHA256(key) to get channel hash
let channel_hash = sha256_key(key);
// Check if channel hash matches target
if (channel_hash != params.target_channel_hash) {
return;
}
// Channel hash matches - verify MAC if enabled
if (params.verify_mac == 1u) {
let computed_mac = hmac_sha256_mac(key, params.ciphertext_len_bits);
if (computed_mac != params.target_mac) {
return;
}
}
// Found a match - record the index
let match_idx = atomicAdd(&match_count, 1u);
if (match_idx < 1024u) { // Limit stored matches
match_indices[match_idx] = name_idx;
}
}
// Each thread processes 16 candidates to amortize thread overhead
const CANDIDATES_PER_THREAD: u32 = 16u;
@compute @workgroup_size(256)
fn main(@builtin(global_invocation_id) global_id: vec3<u32>) {
let base_idx = global_id.x * CANDIDATES_PER_THREAD;
for (var i = 0u; i < CANDIDATES_PER_THREAD; i++) {
let idx = base_idx + i;
if (idx >= params.batch_size) {
return;
}
let name_idx = params.batch_offset + idx;
process_candidate(name_idx);
}
}
`}async init(){if(!navigator.gpu)return console.warn("WebGPU not supported"),!1;try{const a=await navigator.gpu.requestAdapter();if(!a)return console.warn("No GPU adapter found"),!1;this.device=await a.requestDevice(),this.bindGroupLayout=this.device.createBindGroupLayout({entries:[{binding:0,visibility:GPUShaderStage.COMPUTE,buffer:{type:"uniform"}},{binding:1,visibility:GPUShaderStage.COMPUTE,buffer:{type:"storage"}},{binding:2,visibility:GPUShaderStage.COMPUTE,buffer:{type:"storage"}},{binding:3,visibility:GPUShaderStage.COMPUTE,buffer:{type:"read-only-storage"}}]}),this.paramsBuffer=this.device.createBuffer({size:32,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST}),this.matchCountBuffer=this.device.createBuffer({size:4,usage:GPUBufferUsage.STORAGE|GPUBufferUsage.COPY_SRC|GPUBufferUsage.COPY_DST}),this.matchIndicesBuffer=this.device.createBuffer({size:1024*4,usage:GPUBufferUsage.STORAGE|GPUBufferUsage.COPY_SRC});for(let f=0;f<2;f++)this.matchCountReadBuffers[f]=this.device.createBuffer({size:4,usage:GPUBufferUsage.MAP_READ|GPUBufferUsage.COPY_DST}),this.matchIndicesReadBuffers[f]=this.device.createBuffer({size:1024*4,usage:GPUBufferUsage.MAP_READ|GPUBufferUsage.COPY_DST});const s=this.device.createShaderModule({code:this.shaderCode}),l=this.device.createPipelineLayout({bindGroupLayouts:[this.bindGroupLayout]});return this.pipeline=this.device.createComputePipeline({layout:l,compute:{module:s,entryPoint:"main"}}),!0}catch(a){return console.error("WebGPU initialization failed:",a),!1}}isAvailable(){return this.device!==null&&this.pipeline!==null}indexToRoomName(a,s){return Ho(s,a)}countNamesForLength(a){return el(a)}async runBatch(a,s,l,f,d,m){if(!this.device||!this.pipeline||!this.bindGroupLayout||!this.paramsBuffer||!this.matchCountBuffer||!this.matchIndicesBuffer||!this.matchCountReadBuffers[0]||!this.matchCountReadBuffers[1]||!this.matchIndicesReadBuffers[0]||!this.matchIndicesReadBuffers[1])throw new Error("GPU not initialized");const h=this.currentReadBufferIndex;this.currentReadBufferIndex=1-this.currentReadBufferIndex;const x=this.matchCountReadBuffers[h],p=this.matchIndicesReadBuffers[h],y=d&&m?1:0;let v,w=0,S=0;if(y){const I=new Uint8Array(d.length/2);for(let U=0;U<I.length;U++)I[U]=parseInt(d.substr(U*2,2),16);w=I.length*8;const z=Math.ceil(I.length/4)*4,j=new Uint8Array(z);j.set(I),v=new Uint32Array(z/4);for(let U=0;U<v.length;U++)v[U]=j[U*4]<<24|j[U*4+1]<<16|j[U*4+2]<<8|j[U*4+3];const H=parseInt(m.substr(0,2),16),$=parseInt(m.substr(2,2),16);S=H<<24|$<<16}else v=new Uint32Array([0]);const T=Math.max(v.length*4,4);(!this.ciphertextBuffer||this.ciphertextBufferSize<T)&&(this.ciphertextBuffer&&this.ciphertextBuffer.destroy(),this.ciphertextBuffer=this.device.createBuffer({size:T,usage:GPUBufferUsage.STORAGE|GPUBufferUsage.COPY_DST}),this.ciphertextBufferSize=T,this.bindGroupDirty=!0);const b=new Uint32Array([a,l,s,f,S,v.length,w,y]);this.device.queue.writeBuffer(this.paramsBuffer,0,b),this.device.queue.writeBuffer(this.ciphertextBuffer,0,v),this.device.queue.writeBuffer(this.matchCountBuffer,0,$c.ZERO_DATA),(this.bindGroupDirty||!this.bindGroup)&&(this.bindGroup=this.device.createBindGroup({layout:this.bindGroupLayout,entries:[{binding:0,resource:{buffer:this.paramsBuffer}},{binding:1,resource:{buffer:this.matchCountBuffer}},{binding:2,resource:{buffer:this.matchIndicesBuffer}},{binding:3,resource:{buffer:this.ciphertextBuffer}}]}),this.bindGroupDirty=!1);const E=this.device.createCommandEncoder(),P=E.beginComputePass();P.setPipeline(this.pipeline),P.setBindGroup(0,this.bindGroup),P.dispatchWorkgroups(Math.ceil(f/(256*16))),P.end(),E.copyBufferToBuffer(this.matchCountBuffer,0,x,0,4),E.copyBufferToBuffer(this.matchIndicesBuffer,0,p,0,1024*4),this.device.queue.submit([E.finish()]),await x.mapAsync(GPUMapMode.READ);const k=new Uint32Array(x.getMappedRange())[0];x.unmap();const N=[];if(k>0){await p.mapAsync(GPUMapMode.READ);const I=new Uint32Array(p.getMappedRange());for(let z=0;z<Math.min(k,1024);z++)N.push(I[z]);p.unmap()}return N}destroy(){var a,s,l,f,d,m,h,x;(a=this.paramsBuffer)==null||a.destroy(),(s=this.matchCountBuffer)==null||s.destroy(),(l=this.matchIndicesBuffer)==null||l.destroy(),(f=this.ciphertextBuffer)==null||f.destroy(),(d=this.matchCountReadBuffers[0])==null||d.destroy(),(m=this.matchCountReadBuffers[1])==null||m.destroy(),(h=this.matchIndicesReadBuffers[0])==null||h.destroy(),(x=this.matchIndicesReadBuffers[1])==null||x.destroy(),this.paramsBuffer=null,this.matchCountBuffer=null,this.matchIndicesBuffer=null,this.ciphertextBuffer=null,this.ciphertextBufferSize=0,this.matchCountReadBuffers=[null,null],this.matchIndicesReadBuffers=[null,null],this.currentReadBufferIndex=0,this.bindGroup=null,this.bindGroupDirty=!0,this.device&&(this.device.destroy(),this.device=null),this.pipeline=null,this.bindGroupLayout=null}}$c.ZERO_DATA=new Uint32Array([0]);function zb(){return typeof navigator<"u"&&"gpu"in navigator}class mA{runBatch(a,s,l,f,d,m){const h=[],x=a.toString(16).padStart(2,"0") Line truncated
`).map(d=>d.trim().toLowerCase()).filter(d=>d.length>0);this.wordlist=f.filter(AA)}setWordlist(a){this.wordlist=a.map(s=>s.trim().toLowerCase()).filter(AA)}abort(){this.abortFlag=!0}isGpuAvailable(){return zb()}async decodePacket(a){var l;const s=a.trim().replace(/\s+/g,"").replace(/^0x/i,"");if(!s||!/^[0-9a-fA-F]+$/.test(s))return null;try{const d=(l=(await fA.MeshCorePacketDecoder.decodeWithVerification(s,{})).payload)==null?void 0:l.decoded;return!(d!=null&&d.channelHash)||!(d!=null&&d.ciphertext)||!(d!=null&&d.cipherMac)?null:{channelHash:d.channelHash,ciphertext:d.ciphertext,cipherMac:d.cipherMac,isGroupText:!0}}catch{return null}}async crack(a,s,l){this.abortFlag=!1,this.useTimestampFilter=(s==null?void 0:s.useTimestampFilter)??!0,this.useUtf8Filter=(s==null?void 0:s.useUtf8Filter)??!0,this.validSeconds=(s==null?void 0:s.validSeconds)??e0,this.useCpu=(s==null?void 0:s.forceCpu)??!1;const f=(s==null?void 0:s.maxLength)??8,d=(s==null?void 0:s.startingLength)??1,m=(s==null?void 0:s.useDictionary)??!0,h=(s==null?void 0:s.startFromType)??"bruteforce",x=a.toLowerCase(),p=await this.decodePacket(x);if(!p)return{found:!1,error:"Invalid packet or not a GroupText packet"};const{channelHash:y,ciphertext:v,cipherMac:w}=p,S=parseInt(y,16);this.useCpu?this.cpuInstance||(this.cpuInstance=new mA):this.gpuInstance||(this.gpuInstance=new $c,await this.gpuInstance.init()||(this.useCpu=!0,this.cpuInstance=new mA));const T=performance.now();let b=0,E=performance.now(),P=d,B=0,k=0,N=!1;if(s!=null&&s.startFrom){const V=s.startFrom.toLowerCase();if(h==="dictionary"){const J=this.wordlist.indexOf(V);J>=0&&(k=J+1)}else{N=!0;const J=Mb(V);J&&(P=Math.max(d,J.length),B=J.index+1,B>=el(P)&&(P++,B=0))}}let I=0;m&&!N&&this.wordlist.length>0&&(I+=this.wordlist.length-k);for(let V=P;V<=f;V++)I+=el(V);I-=B;const z=(V,J,le)=>{if(!l)return;const de=(performance.now()-T)/1e3,q=de>0?Math.round(b/de):0,ge=I-b,ne=q>0?ge/q:0;l({checked:b,total:I,percent:I>0?Math.min(100,b/I*100):0,rateKeysPerSec:q,etaSeconds:ne,elapsedSeconds:de,currentLength:J,currentPosition:le,phase:V})},j=V=>{if(!Tx(v,w,V))return{valid:!1};const J=fA.ChannelCrypto.decryptGroupTextMessage(v,w,V);return!J.success||!J.data?{valid:!1}:this.useTimestampFilter&&!Ib(J.data.timestamp,this.validSeconds)?{valid:!1}:this.useUtf8Filter&&!Ob(J.data.message)?{valid:!1}:{valid:!0,message:J.data.message}};if(!N&&k===0&&P===d&&B===0){z("public-key",0,Jf);const V=n0(wc);if(y===V){const J=j(wc);if(J.valid)return{found:!0,roomName:Jf,key:wc,decryptedMessage:J.message}}}if(m&&!N&&this.wordlist.length>0)for(let V=k;V<this.wordlist.length;V++){if(this.abortFlag)return{found:!1,aborted:!0,resumeFrom:this.wordlist[V],resumeType:"dictionary"};const J=this.wordlist[V],le=t0("#"+J),se=n0(le);if(parseInt(se,16)===S){const q=j(le);if(q.valid)return{found:!0,roomName:J,key:le,decryptedMessage:q.message,resumeFrom:J,resumeType:"dictionary"}}b++;const de=performance.now();de-E>=200&&(z("wordlist",J.length,J),E=de,await new Promise(q=>setTimeout(q,0)))}const H=this.useCpu?1024:32768,$=(s==null?void 0:s.gpuDispatchMs)??1e3;let U=H,G=!1;for(let V=P;V<=f;V++){if(this.abortFlag)return{found:!1,aborted:!0,resumeFrom:Ho(V,0)||void 0,resumeType:"bruteforce"};const J=el(V);let le=V===P?B:0;for(;le<J;){if(this.abortFlag)return{found:!1,aborted:!0,resumeFrom:Ho(V,le)||void 0,resumeType:"bruteforce"};const se=Math.min(U,J-le),de=performance.now();let q;this.useCpu?q=this.cpuInstance.runBatch(S,V,le,se,v,w):q=await this.gpuInstance.runBatch(S,V,le,se,v,w);const ge=performance.now()-de;if(b+=se,!this.useCpu&&!G&&se>=H&&ge>0){const D=$/ge,Z=Math.round(se*D),K=Math.pow(2,Math.round(Math.log2(Math.max(H,Z))));U=Math.max(H,K),G=!0}for(const D of q){const Z=Ho(V,D);if(!Z)continue;const K=t0("#"+Z),X=j(K);if(X.valid)return{found:!0,roomName:Z,key:K,decryptedMessage:X.message,resumeFrom:Z,resumeType:"bruteforce"}}le+=se;const ne=performance.now();if(ne-E>=200){const D=Ho(V,Math.min(le,J-1))||"";z("bruteforce",V,D),E=ne,await new Promise(Z=>setTimeout(Z,0))}}}return{found:!1,resumeFrom:Ho(f,el(f)-1)||void 0,resumeType:"bruteforce"}}destroy(){this.gpuInstance&&(this.gpuInstance.destroy(),this.gpuInstance=null),this.cpuInstance&&(this.cpuInstance.destroy(),this.cpuInstance=null)}}var jf,gA;function Zb(){return gA||(gA=1,jf={webm:"data:video/webm;base64,GkXfowEAAAAAAAAfQoaBAUL3gQFC8oEEQvOBCEKChHdlYm1Ch4EEQoWBAhhTgGcBAAAAAAAVkhFNm3RALE27i1OrhBVJqWZTrIHfTbuMU6uEFlSua1OsggEwTbuMU6uEHFO7a1OsghV17AEAAAAAAACkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmAQAAAAAAAEUq17GDD0JATYCNTGF2ZjU1LjMzLjEwMFdBjUxhdmY1NS4zMy4xMDBzpJBlrrXf3DCDVB8KcgbMpcr+RImIQJBgAAAAAAAWVK5rAQAAAAAAD++uAQAAAAAAADLXgQFzxYEBnIEAIrWcg3VuZIaFVl9WUDiDgQEj44OEAmJaAOABAAAAAAAABrCBsLqBkK4BAAAAAAAPq9eBAnPFgQKcgQAitZyDdW5khohBX1ZPUkJJU4OBAuEBAAAAAAAAEZ+BArWIQOdwAAAAAABiZIEgY6JPbwIeVgF2b3JiaXMAAAAAAoC Line truncated
NoSleep enabled for older iOS devices. This can interrupt
active or long-running network requests from completing successfully.
See https://github.com/richtr/NoSleep.js/issues/15 for more details.
`),this.noSleepTimer=window.setInterval(()=>{document.hidden||(window.location.href=window.location.href.split("#")[0],window.setTimeout(window.stop,0))},15e3),this.enabled=!0,Promise.resolve()):this.noSleepVideo.play().then(h=>(this.enabled=!0,h)).catch(h=>{throw this.enabled=!1,h})}disable(){l()?(this._wakeLock&&this._wakeLock.release(),this._wakeLock=null):s()?this.noSleepTimer&&(console.warn(`
NoSleep now disabled for older iOS devices.
`),window.clearInterval(this.noSleepTimer),this.noSleepTimer=null):this.noSleepVideo.pause(),this.enabled=!1}}return Hf=f,Hf}var qb=Wb();const Gb=Us(qb);function Qb(r){if(r.length<4)return null;try{const s=parseInt(r.slice(0,2),16)&3;let l=2;if(s===0||s===3){if(r.length<l+8)return null;l+=8}if(r.length<l+2)return null;const f=parseInt(r.slice(l,l+2),16);l+=2;const d=f*2;return r.length<l+d?null:(l+=d,r.slice(l))}catch{return null}}function Kb({packets:r,channels:a,onChannelCreate:s,onRunningChange:l,visible:f=!1}){const[d,m]=R.useState(!1),[h,x]=R.useState(6),[p,y]=R.useState(!1),[v,w]=R.useState(!0),[S,T]=R.useState(!1),[b,E]=R.useState(null),[P,B]=R.useState(new Map),[k,N]=R.useState([]),[I,z]=R.useState(!1),[j,H]=R.useState(null),[$,U]=R.useState(null),[G,re]=R.useState(0),V=R.useRef(null),J=R.useRef(null),le=R.useRef(!1),se=R.useRef(!1),de=R.useRef(!1),q=R.useRef(new Map),ge=R.useRef(!1),ne=R.useRef(6),D=R.useRef(!0),Z=R.useRef(!1),K=R.useRef(new Set),X=R.useRef(new Set);R.useEffect(()=>{const Se=new Ub;V.current=Se,H(Se.isGpuAvailable());const Ve=new Gb;return J.current=Ve,()=>{Se.destroy(),V.current=null,Ve.disable(),J.current=null}},[]),R.useEffect(()=>{!f||I||H2(async()=>{const{ENGLISH_WORDLIST:Se}=await import("./wordlist-BV_32SRm.js");return{ENGLISH_WORDLIST:Se}},[]).then(({ENGLISH_WORDLIST:Se})=>{V.current&&(V.current.setWordlist(Se),z(!0))}).catch(Se=>{console.error("Failed to load wordlist:",Se),Lt.error("Failed to load wordlist",{description:"Cracking will not be available"})})},[f,I]),R.useEffect(()=>{const Se=()=>{at.getUndecryptedPacketCount().then(({count:dt})=>U(dt)).catch(()=>U(null))};Se();const Ve=setInterval(Se,3e4);return()=>clearInterval(Ve)},[]);const fe=R.useMemo(()=>new Set(a.map(Se=>Se.key.toUpperCase())),[a]),he=r.filter(Se=>Se.payload_type==="GROUP_TEXT"&&!Se.decrypted);R.useEffect(()=>{let Se=0;B(Ve=>{const dt=new Map(Ve);let Mt=!1;for(const vt of he)if(!dt.has(vt.id)){const ot=Qb(vt.data);if(ot&&X.current.has(ot)){Se++;continue}ot&&X.current.add(ot),dt.set(vt.id,{packet:vt,attempts:0,lastAttemptLength:0,status:"pending"}),Mt=!0}return Mt?(q.current=dt,dt):Ve}),Se>0&&re(Ve=>Ve+Se)},[he.length]),R.useEffect(()=>{q.current=P},[P]),R.useEffect(()=>{ge.current=p},[p]),R.useEffect(()=>{ne.current=h},[h]),R.useEffect(()=>{D.current=v},[v]),R.useEffect(()=>{Z.current=S},[S]),R.useEffect(()=>{K.current=new Set(he.map(Se=>Se.id))},[he]),R.useEffect(()=>{l==null||l(d)},[d,l]);const ke=Array.from(P.values()).filter(Se=>Se.status==="pending").length,Ae=Array.from(P.values()).filter(Se=>Se.status==="cracked").length,qe=Array.from(P.values()).filter(Se=>Se.status==="failed").length,Ye=R.useCallback(async()=>{if(de.current||!V.current||!le.current)return;const Se=q.current;let Ve=null,dt=null;for(const[Qe,Xe]of Se.entries())if(Xe.status==="pending"){Ve=Xe,dt=Qe;break}if(!Ve&&ge.current){const Qe=Array.from(Se.entries()).filter(([,Xe])=>Xe.status==="failed"&&Xe.lastAttemptLength<10);Qe.length>0&&(Qe.sort((Xe,et)=>Xe[1].lastAttemptLength-et[1].lastAttemptLength),[dt,Ve]=Qe[0])}if(!Ve||dt===null){le.current&&setTimeout(()=>Ye(),1e3);return}if(!K.current.has(dt)){B(Qe=>{const Xe=new Map(Qe);return Xe.delete(dt),Xe}),le.current&&setTimeout(()=>Ye(),10);return}de.current=!0;const Mt=ne.current,vt=Ve.lastAttemptLength>0,ot=vt?Ve.lastAttemptLength+1:Mt;try{const Qe=await V.current.crack(Ve.packet.data,{maxLength:ot,useTimestampFilter:!0,useUtf8Filter:!0,...Z.current&&{gpuDispatchMs:1e4},...vt&&{useDictionary:!1,startingLength:ot}},Xe=>{E(Xe)});if(se.current){se.current=!1,de.current=!1,E(null);return}if(Qe.found&&Qe.roomName&&Qe.key){B(Oe=>{const _t=new Map(Oe),$t=_t.get(dt);return $t&&_t.set(dt,{...$t,status:"cracked",attempts:$t.attempts+1,lastAttemptLength:ot}),_t});const Xe={roomName:Qe.roomName,key:Qe.key,packetId:dt,message:Qe.decryptedMessage||"",crackedAt:Date.now()};N(Oe=>[...Oe,Xe]);const et=Qe.key.toUpperCase();if(!fe.has(et))try{const Oe="#"+Qe.roomName;await s(Oe,Qe.key),D.current&&await at.decryptHistoricalPackets({key_type:"channel",channel_name:Oe})}catch(Oe){console.error("Failed to create channel or decrypt historical:",Oe),Lt.error("Failed to save cracked channel",{description:Oe instanceof Error?Oe.message:"Channel discovered but could not be saved"})}}else B(Xe=>{const et=new Map(Xe),Oe=et.get(dt);return Oe&&et.set(dt,{...Oe,status:"failed",attempts:Oe.attempts+1,lastAttemptLength:ot}),et})}catch(Qe){console.error("Cracking error:",Qe),B(Xe=>{const et=new Map(Xe),Oe=et.get(dt);return Oe&&et.set(dt,{...Oe,status:"failed",attempts:Oe.attempts+1,lastAttemptLength:ot}),et})}de.current=!1,E(null),le.current&&setTimeout(()=>Ye(),100)},[fe,s]),Et=()=>{var Se;if(!j){Lt.error("WebGPU not available",{description:"Cracking requires Chrome 113+ or Edge 113+ with WebGPU support."});return}m(!0),le.current=!0,se.current=!1,(Se=J.current)==null||Se.enable(),Ye()},ht=()=>{var Se,Ve;m(!1),le.current=!1,se.current=!0,(Se=V.current)==null||Se.abort(),(Ve=J.current)==null||Ve.disable()};r Line truncated
//# sourceMappingURL=index-CG0iOYhX.js.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"mappings":";;;;;;;;6CASa,IAAIA,EAAE,OAAO,IAAI,eAAe,EAAEC,EAAE,OAAO,IAAI,cAAc,EAAEC,EAAE,OAAO,IAAI,gBAAgB,EAAEC,EAAE,OAAO,IAAI,mBAAmB,EAAEC,EAAE,OAAO,IAAI,gBAAgB,EAAEC,EAAE,OAAO,IAAI,gBAAgB,EAAEC,EAAE,OAAO,IAAI,eAAe,EAAEC,EAAE,OAAO,IAAI,mBAAmB,EAAEC,EAAE,OAAO,IAAI,gBAAgB,EAAEC,EAAE,OAAO,IAAI,YAAY,EAAE,EAAE,OAAO,IAAI,YAAY,EAAEC,EAAE,OAAO,SAAS,SAASC,EAAEC,EAAE,CAAC,OAAUA,IAAP,MAAqB,OAAOA,GAAlB,SAA2B,MAAKA,EAAEF,GAAGE,EAAEF,CAAC,GAAGE,EAAE,YAAY,EAAqB,OAAOA,GAApB,WAAsBA,EAAE,KAAI,CAC1e,IAAIC,EAAE,CAAC,UAAU,UAAU,CAAC,MAAM,EAAE,EAAE,mBAAmB,UAAU,GAAG,oBAAoB,UAAU,GAAG,gBAAgB,UAAU,EAAE,EAAEC,EAAE,OAAO,OAAOC,EAAE,GAAG,SAAS,EAAEH,EAAEI,EAAEC,EAAE,CAAC,KAAK,MAAML,EAAE,KAAK,QAAQI,EAAE,KAAK,KAAKD,EAAE,KAAK,QAAQE,GAAGJ,CAAC,CAAC,EAAE,UAAU,iBAAiB,GACnQ,EAAE,UAAU,SAAS,SAASD,EAAEI,EAAE,CAAC,GAAc,OAAOJ,GAAlB,UAAkC,OAAOA,GAApB,YAA6BA,GAAN,KAAQ,MAAM,MAAM,uHAAuH,EAAE,KAAK,QAAQ,gBAAgB,KAAKA,EAAEI,EAAE,UAAU,CAAC,EAAE,EAAE,UAAU,YAAY,SAASJ,EAAE,CAAC,KAAK,QAAQ,mBAAmB,KAAKA,EAAE,aAAa,CAAC,EAAE,SAASM,GAAG,EAAEA,EAAE,UAAU,EAAE,UAAU,SAASC,EAAEP,EAAEI,EAAEC,EAAE,CAAC,KAAK,MAAML,EAAE,KAAK,QAAQI,EAAE,KAAK,KAAKD,EAAE,KAAK,QAAQE,GAAGJ,CAAC,CAAC,IAAIO,EAAED,EAAE,UAAU,IAAID,EACrfE,EAAE,YAAYD,EAAEL,EAAEM,EAAE,EAAE,SAAS,EAAEA,EAAE,qBAAqB,GAAG,IAAIC,EAAE,MAAM,QAAQC,EAAE,OAAO,UAAU,eAAeC,EAAE,CAAC,QAAQ,IAAI,EAAEC,EAAE,CAAC,IAAI,GAAG,IAAI,GAAG,OAAO,GAAG,SAAS,EAAE,EACxK,SAASC,EAAEb,EAAEI,EAAEC,EAAE,CAAC,IAAIS,EAAEC,GAAE,GAAGC,GAAE,KAAKC,GAAE,KAAK,GAASb,GAAN,KAAQ,IAAIU,KAAcV,EAAE,MAAX,SAAiBa,GAAEb,EAAE,KAAcA,EAAE,MAAX,SAAiBY,GAAE,GAAGZ,EAAE,KAAKA,EAAEM,EAAE,KAAKN,EAAEU,CAAC,GAAG,CAACF,EAAE,eAAeE,CAAC,IAAIC,GAAED,CAAC,EAAEV,EAAEU,CAAC,GAAG,IAAII,GAAE,UAAU,OAAO,EAAE,GAAOA,KAAJ,EAAMH,GAAE,SAASV,UAAU,EAAEa,GAAE,CAAC,QAAQC,GAAE,MAAMD,EAAC,EAAEE,GAAE,EAAEA,GAAEF,GAAEE,KAAID,GAAEC,EAAC,EAAE,UAAUA,GAAE,CAAC,EAAEL,GAAE,SAASI,EAAC,CAAC,GAAGnB,GAAGA,EAAE,aAAa,IAAIc,KAAKI,GAAElB,EAAE,aAAakB,GAAWH,GAAED,CAAC,IAAZ,SAAgBC,GAAED,CAAC,EAAEI,GAAEJ,CAAC,GAAG,MAAM,CAAC,SAAS1B,EAAE,KAAKY,EAAE,IAAIgB,GAAE,IAAIC,GAAE,MAAMF,GAAE,OAAOJ,EAAE,OAAO,CAAC,CAC7a,SAASU,EAAErB,EAAEI,EAAE,CAAC,MAAM,CAAC,SAAShB,EAAE,KAAKY,EAAE,KAAK,IAAII,EAAE,IAAIJ,EAAE,IAAI,MAAMA,EAAE,MAAM,OAAOA,EAAE,MAAM,CAAC,CAAC,SAASsB,EAAEtB,EAAE,CAAC,OAAiB,OAAOA,GAAlB,UAA4BA,IAAP,MAAUA,EAAE,WAAWZ,CAAC,CAAC,SAASmC,EAAOvB,EAAE,CAAC,IAAII,EAAE,CAAC,IAAI,KAAK,IAAI,IAAI,EAAE,MAAM,IAAIJ,EAAE,QAAQ,QAAQ,SAASA,EAAE,CAAC,OAAOI,EAAEJ,CAAC,CAAC,CAAC,CAAC,CAAC,IAAIwB,GAAE,OAAO,SAASC,EAAEzB,EAAEI,EAAE,CAAC,OAAiB,OAAOJ,GAAlB,UAA4BA,IAAP,MAAgBA,EAAE,KAAR,KAAYuB,EAAO,GAAGvB,EAAE,GAAG,EAAEI,EAAE,SAAS,EAAE,CAAC,CAC/W,SAASsB,EAAE1B,EAAEI,EAAEC,EAAES,EAAEC,GAAE,CAAC,IAAIC,GAAE,OAAOhB,GAAmBgB,KAAd,aAA6BA,KAAZ,aAAchB,EAAE,MAAK,IAAIiB,GAAE,GAAG,GAAUjB,IAAP,KAASiB,GAAE,OAAQ,QAAOD,GAAC,CAAE,IAAK,SAAS,IAAK,SAASC,GAAE,GAAG,MAAM,IAAK,SAAS,OAAOjB,EAAE,SAAQ,CAAE,KAAKZ,EAAE,KAAKC,EAAE4B,GAAE,EAAE,CAAC,CAAC,GAAGA,GAAE,OAAOA,GAAEjB,EAAEe,GAAEA,GAAEE,EAAC,EAAEjB,EAAOc,IAAL,GAAO,IAAIW,EAAER,GAAE,CAAC,EAAEH,EAAEL,EAAEM,EAAC,GAAGV,EAAE,GAASL,GAAN,OAAUK,EAAEL,EAAE,QAAQwB,GAAE,KAAK,EAAE,KAAKE,EAAEX,GAAEX,EAAEC,EAAE,GAAG,SAASL,GAAE,CAAC,OAAOA,EAAC,CAAC,GAASe,IAAN,OAAUO,EAAEP,EAAC,IAAIA,GAAEM,EAAEN,GAAEV,GAAG,CAACU,GAAE,KAAKE,IAAGA,GAAE,MAAMF,GAAE,IAAI,IAAI,GAAGA,GAAE,KAAK,QAAQS,GAAE,KAAK,EAAE,KAAKxB,CAAC,GAAGI,EAAE,KAAKW,EAAC,GAAG,EAAyB,GAAvBE,GAAE,EAAEH,EAAOA,IAAL,GAAO,IAAIA,EAAE,IAAOL,EAAET,CAAC,EAAE,QAAQkB,GAAE,EAAEA,GAAElB,EAAE,OAAOkB,KAAI,CAACF,GACrfhB,EAAEkB,EAAC,EAAE,IAAIC,GAAEL,EAAEW,EAAET,GAAEE,EAAC,EAAED,IAAGS,EAAEV,GAAEZ,EAAEC,EAAEc,GAAEJ,EAAC,CAAC,SAASI,GAAEpB,EAAEC,CAAC,EAAe,OAAOmB,IAApB,WAAsB,IAAInB,EAAEmB,GAAE,KAAKnB,CAAC,EAAEkB,GAAE,EAAE,EAAEF,GAAEhB,EAAE,KAAI,GAAI,MAAMgB,GAAEA,GAAE,MAAMG,GAAEL,EAAEW,EAAET,GAAEE,IAAG,EAAED,IAAGS,EAAEV,GAAEZ,EAAEC,EAAEc,GAAEJ,EAAC,UAAqBC,KAAX,SAAa,MAAMZ,EAAE,OAAOJ,CAAC,EAAE,MAAM,mDAAuEI,IAApB,kBAAsB,qBAAqB,OAAO,KAAKJ,CAAC,EAAE,KAAK,IAAI,EAAE,IAAII,GAAG,2EAA2E,EAAE,OAAOa,EAAC,CACzZ,SAASU,GAAE3B,EAAEI,EAAEC,EAAE,CAAC,GAASL,GAAN,KAAQ,OAAOA,EAAE,IAAIc,EAAE,GAAGC,GAAE,EAAE,OAAAW,EAAE1B,EAAEc,EAAE,GAAG,GAAG,SAASd,GAAE,CAAC,OAAOI,EAAE,KAAKC,EAAEL,GAAEe,IAAG,CAAC,CAAC,EAASD,CAAC,CAAC,SAASc,GAAE5B,EAAE,CAAC,GAAQA,EAAE,UAAP,GAAe,CAAC,IAAII,EAAEJ,EAAE,QAAQI,EAAEA,EAAC,EAAGA,EAAE,KAAK,SAASA,EAAE,EAAQJ,EAAE,UAAN,GAAoBA,EAAE,UAAP,MAAeA,EAAE,QAAQ,EAAEA,EAAE,QAAQI,EAAC,EAAE,SAASA,EAAE,EAAQJ,EAAE,UAAN,GAAoBA,EAAE,UAAP,MAAeA,EAAE,QAAQ,EAAEA,EAAE,QAAQI,EAAC,CAAC,EAAOJ,EAAE,UAAP,KAAiBA,EAAE,QAAQ,EAAEA,EAAE,QAAQI,EAAE,CAAC,GAAOJ,EAAE,UAAN,EAAc,OAAOA,EAAE,QAAQ,QAAQ,MAAMA,EAAE,OAAQ,CAC5Z,IAAI6B,GAAE,CAAC,QAAQ,IAAI,EAAEC,EAAE,CAAC,WAAW,IAAI,EAAEC,GAAE,CAAC,uBAAuBF,GAAE,wBAAwBC,EAAE,kBAAkBnB,CAAC,EAAE,SAASqB,IAAG,CAAC,MAAM,MAAM,0DAA0D,CAAE,CACzM,OAAAC,GAAA,SAAiB,CAAC,IAAIN,GAAE,QAAQ,SAAS3B,EAAEI,EAAEC,EAAE,CAACsB,GAAE3B,EAAE,UAAU,CAACI,EAAE,MAAM,KAAK,SAAS,CAAC,EAAEC,CAAC,CAAC,EAAE,MAAM,SAASL,EAAE,CAAC,IAAII,EAAE,EAAE,OAAAuB,GAAE3B,EAAE,UAAU,CAACI,GAAG,CAAC,EAASA,CAAC,EAAE,QAAQ,SAASJ,EAAE,CAAC,OAAO2B,GAAE3B,EAAE,SAASA,EAAE,CAAC,OAAOA,CAAC,CAAC,GAAG,EAAE,EAAE,KAAK,SAASA,EAAE,CAAC,GAAG,CAACsB,EAAEtB,CAAC,EAAE,MAAM,MAAM,Line truncated
+541
View File
@@ -0,0 +1,541 @@
var yv=Object.defineProperty;var _v=(r,a,s)=>a in r?yv(r,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[a]=s;var No=(r,a,s)=>_v(r,typeof a!="symbol"?a+"":a,s);function wv(r,a){for(var s=0;s<a.length;s++){const l=a[s];if(typeof l!="string"&&!Array.isArray(l)){for(const f in l)if(f!=="default"&&!(f in r)){const d=Object.getOwnPropertyDescriptor(l,f);d&&Object.defineProperty(r,f,d.get?d:{enumerable:!0,get:()=>l[f]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))l(f);new MutationObserver(f=>{for(const d of f)if(d.type==="childList")for(const m of d.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&l(m)}).observe(document,{childList:!0,subtree:!0});function s(f){const d={};return f.integrity&&(d.integrity=f.integrity),f.referrerPolicy&&(d.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?d.credentials="include":f.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function l(f){if(f.ep)return;f.ep=!0;const d=s(f);fetch(f.href,d)}})();var bf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Zs(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function bA(r){if(Object.prototype.hasOwnProperty.call(r,"__esModule"))return r;var a=r.default;if(typeof a=="function"){var s=function l(){return this instanceof l?Reflect.construct(a,arguments,this.constructor):a.apply(this,arguments)};s.prototype=a.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(r).forEach(function(l){var f=Object.getOwnPropertyDescriptor(r,l);Object.defineProperty(s,l,f.get?f:{enumerable:!0,get:function(){return r[l]}})}),s}var Cf={exports:{}},Ia={},Ef={exports:{}},at={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Ap;function bv(){if(Ap)return at;Ap=1;var r=Symbol.for("react.element"),a=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),d=Symbol.for("react.provider"),m=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),v=Symbol.iterator;function w(S){return S===null||typeof S!="object"?null:(S=v&&S[v]||S["@@iterator"],typeof S=="function"?S:null)}var B={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},R=Object.assign,C={};function E(S,V,K){this.props=S,this.context=V,this.refs=C,this.updater=K||B}E.prototype.isReactComponent={},E.prototype.setState=function(S,V){if(typeof S!="object"&&typeof S!="function"&&S!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,S,V,"setState")},E.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function T(){}T.prototype=E.prototype;function P(S,V,K){this.props=S,this.context=V,this.refs=C,this.updater=K||B}var k=P.prototype=new T;k.constructor=P,R(k,E.prototype),k.isPureReactComponent=!0;var N=Array.isArray,I=Object.prototype.hasOwnProperty,z={current:null},j={key:!0,ref:!0,__self:!0,__source:!0};function H(S,V,K){var Y,he={},pe=null,Ee=null;if(V!=null)for(Y in V.ref!==void 0&&(Ee=V.ref),V.key!==void 0&&(pe=""+V.key),V)I.call(V,Y)&&!j.hasOwnProperty(Y)&&(he[Y]=V[Y]);var ge=arguments.length-2;if(ge===1)he.children=K;else if(1<ge){for(var We=Array(ge),Ye=0;Ye<ge;Ye++)We[Ye]=arguments[Ye+2];he.children=We}if(S&&S.defaultProps)for(Y in ge=S.defaultProps,ge)he[Y]===void 0&&(he[Y]=ge[Y]);return{$$typeof:r,type:S,key:pe,ref:Ee,props:he,_owner:z.current}}function $(S,V){return{$$typeof:r,type:S.type,key:V,ref:S.ref,props:S.props,_owner:S._owner}}function U(S){return typeof S=="object"&&S!==null&&S.$$typeof===r}function G(S){var V={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function(K){return V[K]})}var ne=/\/+/g;function ee(S,V){return typeof S=="object"&&S!==null&&S.key!=null?G(""+S.key):V.toString(36)}function oe(S,V,K,Y,he){var pe=typeof S;(pe==="undefined"||pe==="boolean")&&(S=null);var Ee=!1;if(S===null)Ee=!0;else switch(pe){case"string":case"number":Ee=!0;break;case"object":switch(S.$$typeof){case r:case a:Ee=!0}}if(Ee)return Ee=S,he=he(Ee),S=Y===""?"."+ee(Ee,0):Y,N(he)?(K="",S!=null&&(K=S.replace(ne,"$&/")+"/"),oe(he,V,K,"",function(Ye){return Ye})):he!=null&&(U(he)&&(he=$(he,K+(!he.key||Ee&&Ee.key===he.key?"":(""+he.key).replace(ne,"$&/")+"/")+S)),V.push(he)),1;if(Ee=0,Y=Y===""?".":Y+":",N(S))for(var ge=0;ge<S.length;ge++){pe=S[ge];var We=Y+ee(pe,ge);Ee+=oe(pe,V,K,We,he)}else if(We=w(S),typeof We=="function")for(S=We.call(S),ge=0;!(pe=S.next()).done;)pe=pe.value,We=Y+ee(pe,ge++),Ee+=oe(pe,V,K,We,he);else if(pe==="object")throw V=String(S),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(S).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.");return Ee}function de(S,V,K){if(S==null)return S;var Y=[],he=0;return oe(S,Y,"","",function(pe){return V.call(K,pe,he++)}),Y}function le(S){if(S._status===-1){var V=S._result;V=V(),V.then(function(K){(S._status===0||S._status===-1)&&(S._status=1,S._result=K)},function(K){(S._status===0||S._status===-1)&&(S._status=2,S._result=K)}),S._status===-1&&(S._status=0,S._result=V)}if(S._status===1)return S._result.default;throw S._result}var fe={current:null},q={transition:null},J={ReactCurrentDispatcher:fe,ReactCurrentBatchConfig:q,ReactCurrentOwner:z};function W(){throw Error("act(...) is not supported in production builds of React.")}return at.Children={map:de,forEach:function(S,V,K){de(S,function(){V.apply(this,arguments)},K)},count:function(S){var V=0;return de(S,function(){V++}),V},toArray:function(S){return de(S,function(V){return V})||[]},only:function(S){if(!U(S))throw Error("React.Children.only expected to receive a single React element child.");return S}},at.Component=E,at.Fragment=s,at.Profiler=f,at.PureComponent=P,at.StrictMode=l,at.Suspense=x,at.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=J,at.act=W,at.cloneElement=function(S,V,K){if(S==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+S+".");var Y=R({},S.props),he=S.key,pe=S.ref,Ee=S._owner;if(V!=null){if(V.ref!==void 0&&(pe=V.ref,Ee=z.current),V.key!==void 0&&(he=""+V.key),S.type&&S.type.defaultProps)var ge=S.type.defaultProps;for(We in V)I.call(V,We)&&!j.hasOwnProperty(We)&&(Y[We]=V[We]===void 0&&ge!==void 0?ge[We]:V[We])}var We=arguments.length-2;if(We===1)Y.children=K;else if(1<We){ge=Array(We);for(var Ye=0;Ye<We;Ye++)ge[Ye]=arguments[Ye+2];Y.children=ge}return{$$typeof:r,type:S.type,key:he,ref:pe,props:Y,_owner:Ee}},at.cLine truncated
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var xp;function Cv(){if(xp)return Ia;xp=1;var r=a0(),a=Symbol.for("react.element"),s=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,f=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d={key:!0,ref:!0,__self:!0,__source:!0};function m(h,x,p){var y,v={},w=null,B=null;p!==void 0&&(w=""+p),x.key!==void 0&&(w=""+x.key),x.ref!==void 0&&(B=x.ref);for(y in x)l.call(x,y)&&!d.hasOwnProperty(y)&&(v[y]=x[y]);if(h&&h.defaultProps)for(y in x=h.defaultProps,x)v[y]===void 0&&(v[y]=x[y]);return{$$typeof:a,type:h,key:w,ref:B,props:v,_owner:f.current}}return Ia.Fragment=s,Ia.jsx=m,Ia.jsxs=m,Ia}var vp;function Ev(){return vp||(vp=1,Cf.exports=Cv()),Cf.exports}var D=Ev(),F=a0();const be=Zs(F),l0=wv({__proto__:null,default:be},[F]);var bu={},kf={exports:{}},Hn={},Sf={exports:{}},Bf={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var yp;function kv(){return yp||(yp=1,(function(r){function a(q,J){var W=q.length;q.push(J);e:for(;0<W;){var S=W-1>>>1,V=q[S];if(0<f(V,J))q[S]=J,q[W]=V,W=S;else break e}}function s(q){return q.length===0?null:q[0]}function l(q){if(q.length===0)return null;var J=q[0],W=q.pop();if(W!==J){q[0]=W;e:for(var S=0,V=q.length,K=V>>>1;S<K;){var Y=2*(S+1)-1,he=q[Y],pe=Y+1,Ee=q[pe];if(0>f(he,W))pe<V&&0>f(Ee,he)?(q[S]=Ee,q[pe]=W,S=pe):(q[S]=he,q[Y]=W,S=Y);else if(pe<V&&0>f(Ee,W))q[S]=Ee,q[pe]=W,S=pe;else break e}}return J}function f(q,J){var W=q.sortIndex-J.sortIndex;return W!==0?W:q.id-J.id}if(typeof performance=="object"&&typeof performance.now=="function"){var d=performance;r.unstable_now=function(){return d.now()}}else{var m=Date,h=m.now();r.unstable_now=function(){return m.now()-h}}var x=[],p=[],y=1,v=null,w=3,B=!1,R=!1,C=!1,E=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function k(q){for(var J=s(p);J!==null;){if(J.callback===null)l(p);else if(J.startTime<=q)l(p),J.sortIndex=J.expirationTime,a(x,J);else break;J=s(p)}}function N(q){if(C=!1,k(q),!R)if(s(x)!==null)R=!0,le(I);else{var J=s(p);J!==null&&fe(N,J.startTime-q)}}function I(q,J){R=!1,C&&(C=!1,T(H),H=-1),B=!0;var W=w;try{for(k(J),v=s(x);v!==null&&(!(v.expirationTime>J)||q&&!G());){var S=v.callback;if(typeof S=="function"){v.callback=null,w=v.priorityLevel;var V=S(v.expirationTime<=J);J=r.unstable_now(),typeof V=="function"?v.callback=V:v===s(x)&&l(x),k(J)}else l(x);v=s(x)}if(v!==null)var K=!0;else{var Y=s(p);Y!==null&&fe(N,Y.startTime-J),K=!1}return K}finally{v=null,w=W,B=!1}}var z=!1,j=null,H=-1,$=5,U=-1;function G(){return!(r.unstable_now()-U<$)}function ne(){if(j!==null){var q=r.unstable_now();U=q;var J=!0;try{J=j(!0,q)}finally{J?ee():(z=!1,j=null)}}else z=!1}var ee;if(typeof P=="function")ee=function(){P(ne)};else if(typeof MessageChannel<"u"){var oe=new MessageChannel,de=oe.port2;oe.port1.onmessage=ne,ee=function(){de.postMessage(null)}}else ee=function(){E(ne,0)};function le(q){j=q,z||(z=!0,ee())}function fe(q,J){H=E(function(){q(r.unstable_now())},J)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(q){q.callback=null},r.unstable_continueExecution=function(){R||B||(R=!0,le(I))},r.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<q?Math.floor(1e3/q):5},r.unstable_getCurrentPriorityLevel=function(){return w},r.unstable_getFirstCallbackNode=function(){return s(x)},r.unstable_next=function(q){switch(w){case 1:case 2:case 3:var J=3;break;default:J=w}var W=w;w=J;try{return q()}finally{w=W}},r.unstable_pauseExecution=function(){},r.unstable_requestPaint=function(){},r.unstable_runWithPriority=function(q,J){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var W=w;w=q;try{return J()}finally{w=W}},r.unstable_scheduleCallback=function(q,J,W){var S=r.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?S+W:S):W=S,q){case 1:var V=-1;break;case 2:V=250;break;case 5:V=1073741823;break;case 4:V=1e4;break;default:V=5e3}return V=W+V,q={id:y++,callback:J,priorityLevel:q,startTime:W,expirationTime:V,sortIndex:-1},W>S?(q.sortIndex=W,a(p,q),s(x)===null&&q===s(p)&&(C?(T(H),H=-1):C=!0,fe(N,W-S))):(q.sortIndex=V,a(x,q),R||B||(R=!0,le(I))),q},r.unstable_shouldYield=G,r.unstable_wrapCallback=function(q){var J=w;return function(){var W=w;w=J;try{return q.apply(this,arguments)}finally{w=W}}}})(Bf)),Bf}var _p;function Sv(){return _p||(_p=1,Sf.exports=kv()),Sf.exports}/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var wp;function Bv(){if(wp)return Hn;wp=1;var r=a0(),a=Sv();function s(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,o=1;o<arguments.length;o++)n+="&args[]="+encodeURIComponent(arguments[o]);return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var l=new Set,f={};function d(e,n){m(e,n),m(e+"Capture",n)}function m(e,n){for(f[e]=n,e=0;e<n.length;e++)l.add(n[e])}var h=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),x=Object.prototype.hasOwnProperty,p=/^[: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]*$/,y={},v={};function w(e){return x.call(v,e)?!0:x.call(y,e)?!1:p.test(e)?v[e]=!0:(y[e]=!0,!1)}function B(e,n,o,c){if(o!==null&&o.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return c?!1:o!==null?!o.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function R(e,n,o,c){if(n===null||typeof n>"u"||B(e,n,o,c))return!0;if(c)return!1;if(o!==null)switch(o.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function C(e,n,o,c,g,_,M){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=c,this.attributeNamespace=g,this.mustUseProperty=o,this.propertyName=e,this.type=n,this.sanitizeURL=_,this.removeEmptyString=M}var E={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){E[e]=new C(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];E[n]=new C(n,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){E[e]=new C(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){E[e]=new C(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){E[e]=new C(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){E[e]=new C(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){E[e]=new C(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){E[e]=new C(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){E[e]=new C(e,5,!1,e.toLowerCase(),null,!1,!1)});var T=/[\-:]([a-z])/g;function P(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 n=e.replace(T,P);E[n]=new C(n,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(T,P);E[n]=new C(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(T,P);E[n]=new C(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){E[e]=new C(e,1,!1,e.toLowerCase(),null,!1,!1)}),E.xlinkHref=new C("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){E[e]=new C(e,1,!1,e.toLowerCase(),null,!0,!0)});function k(e,n,o,c){var g=E.hasOwnProperty(n)?E[n]:null;(g!==null?g.type!==0:c||!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!= Line truncated
`+S+e}var K=!1;function Y(e,n){if(!e||K)return"";K=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(n)if(n=function(){throw Error()},Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(n,[])}catch(ce){var c=ce}Reflect.construct(e,[],n)}else{try{n.call()}catch(ce){c=ce}e.call(n.prototype)}else{try{throw Error()}catch(ce){c=ce}e()}}catch(ce){if(ce&&c&&typeof ce.stack=="string"){for(var g=ce.stack.split(`
`),_=c.stack.split(`
`),M=g.length-1,Z=_.length-1;1<=M&&0<=Z&&g[M]!==_[Z];)Z--;for(;1<=M&&0<=Z;M--,Z--)if(g[M]!==_[Z]){if(M!==1||Z!==1)do if(M--,Z--,0>Z||g[M]!==_[Z]){var X=`
`+g[M].replace(" at new "," at ");return e.displayName&&X.includes("<anonymous>")&&(X=X.replace("<anonymous>",e.displayName)),X}while(1<=M&&0<=Z);break}}}finally{K=!1,Error.prepareStackTrace=o}return(e=e?e.displayName||e.name:"")?V(e):""}function he(e){switch(e.tag){case 5:return V(e.type);case 16:return V("Lazy");case 13:return V("Suspense");case 19:return V("SuspenseList");case 0:case 2:case 15:return e=Y(e.type,!1),e;case 11:return e=Y(e.type.render,!1),e;case 1:return e=Y(e.type,!0),e;default:return""}}function pe(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 j:return"Fragment";case z:return"Portal";case $:return"Profiler";case H:return"StrictMode";case ee:return"Suspense";case oe:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case G:return(e.displayName||"Context")+".Consumer";case U:return(e._context.displayName||"Context")+".Provider";case ne:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case de:return n=e.displayName||null,n!==null?n:pe(e.type)||"Memo";case le:n=e._payload,e=e._init;try{return pe(e(n))}catch{}}return null}function Ee(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return pe(n);case 8:return n===H?"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 n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function ge(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function We(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Ye(e){var n=We(e)?"checked":"value",o=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),c=""+e[n];if(!e.hasOwnProperty(n)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var g=o.get,_=o.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return g.call(this)},set:function(M){c=""+M,_.call(this,M)}}),Object.defineProperty(e,n,{enumerable:o.enumerable}),{getValue:function(){return c},setValue:function(M){c=""+M},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function kt(e){e._valueTracker||(e._valueTracker=Ye(e))}function pt(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var o=n.getValue(),c="";return e&&(c=We(e)?e.checked?"true":"false":e.value),e=c,e!==o?(n.setValue(e),!0):!1}function Se(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 Ve(e,n){var o=n.checked;return W({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o??e._wrapperState.initialChecked})}function st(e,n){var o=n.defaultValue==null?"":n.defaultValue,c=n.checked!=null?n.checked:n.defaultChecked;o=ge(n.value!=null?n.value:o),e._wrapperState={initialChecked:c,initialValue:o,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function Dt(e,n){n=n.checked,n!=null&&k(e,"checked",n,!1)}function yt(e,n){Dt(e,n);var o=ge(n.value),c=n.type;if(o!=null)c==="number"?(o===0&&e.value===""||e.value!=o)&&(e.value=""+o):e.value!==""+o&&(e.value=""+o);else if(c==="submit"||c==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?Xe(e,n.type,o):n.hasOwnProperty("defaultValue")&&Xe(e,n.type,ge(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function vt(e,n,o){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var c=n.type;if(!(c!=="submit"&&c!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,o||n===e.value||(e.value=n),e.defaultValue=n}o=e.name,o!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,o!==""&&(e.name=o)}function Xe(e,n,o){(n!=="number"||Se(e.ownerDocument)!==e)&&(o==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+o&&(e.defaultValue=""+o))}var Ke=Array.isArray;function Je(e,n,o,c){if(e=e.options,n){n={};for(var g=0;g<o.length;g++)n["$"+o[g]]=!0;for(o=0;o<e.length;o++)g=n.hasOwnProperty("$"+e[o].value),e[o].selected!==g&&(e[o].selected=g),g&&c&&(e[o].defaultSelected=!0)}else{for(o=""+ge(o),n=null,g=0;g<e.length;g++){if(e[g].value===o){e[g].selected=!0,c&&(e[g].defaultSelected=!0);return}n!==null||e[g].disabled||(n=e[g])}n!==null&&(n.selected=!0)}}function Oe(e,n){if(n.dangerouslySetInnerHT Line truncated
`).replace(Q,"")}function ue(e,n,o){if(n=re(n),re(e)!==n&&o)throw Error(s(425))}function xe(){}var Be=null,He=null;function tt(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var nn=typeof setTimeout=="function"?setTimeout:void 0,Xt=typeof clearTimeout=="function"?clearTimeout:void 0,Tn=typeof Promise=="function"?Promise:void 0,_n=typeof queueMicrotask=="function"?queueMicrotask:typeof Tn<"u"?function(e){return Tn.resolve(null).then(e).catch(Vi)}:nn;function Vi(e){setTimeout(function(){throw e})}function wa(e,n){var o=n,c=0;do{var g=o.nextSibling;if(e.removeChild(o),g&&g.nodeType===8)if(o=g.data,o==="/$"){if(c===0){e.removeChild(g),Kn(n);return}c--}else o!=="$"&&o!=="$?"&&o!=="$!"||c++;o=g}while(o);Kn(n)}function Vr(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?")break;if(n==="/$")return null}}return e}function Ol(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var o=e.data;if(o==="$"||o==="$!"||o==="$?"){if(n===0)return e;n--}else o==="/$"&&n++}e=e.previousSibling}return null}var si=Math.random().toString(36).slice(2),cr="__reactFiber$"+si,Ui="__reactProps$"+si,wt="__reactContainer$"+si,Zi="__reactEvents$"+si,gd="__reactListeners$"+si,xd="__reactHandles$"+si;function ai(e){var n=e[cr];if(n)return n;for(var o=e.parentNode;o;){if(n=o[wt]||o[cr]){if(o=n.alternate,n.child!==null||o!==null&&o.child!==null)for(e=Ol(e);e!==null;){if(o=e[cr])return o;e=Ol(e)}return n}e=o,o=e.parentNode}return null}function li(e){return e=e[cr]||e[wt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ui(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(s(33))}function xs(e){return e[Ui]||null}var vd=[],vs=-1;function Wi(e){return{current:e}}function Ft(e){0>vs||(e.current=vd[vs],vd[vs]=null,vs--)}function Tt(e,n){vs++,vd[vs]=e.current,e.current=n}var qi={},wn=Wi(qi),Mn=Wi(!1),bo=qi;function ys(e,n){var o=e.type.contextTypes;if(!o)return qi;var c=e.stateNode;if(c&&c.__reactInternalMemoizedUnmaskedChildContext===n)return c.__reactInternalMemoizedMaskedChildContext;var g={},_;for(_ in o)g[_]=n[_];return c&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=g),g}function In(e){return e=e.childContextTypes,e!=null}function zl(){Ft(Mn),Ft(wn)}function O0(e,n,o){if(wn.current!==qi)throw Error(s(168));Tt(wn,n),Tt(Mn,o)}function z0(e,n,o){var c=e.stateNode;if(n=n.childContextTypes,typeof c.getChildContext!="function")return o;c=c.getChildContext();for(var g in c)if(!(g in n))throw Error(s(108,Ee(e)||"Unknown",g));return W({},o,c)}function jl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||qi,bo=wn.current,Tt(wn,e),Tt(Mn,Mn.current),!0}function j0(e,n,o){var c=e.stateNode;if(!c)throw Error(s(169));o?(e=z0(e,n,bo),c.__reactInternalMemoizedMergedChildContext=e,Ft(Mn),Ft(wn),Tt(wn,e)):Ft(Mn),Tt(Mn,o)}var ci=null,Hl=!1,yd=!1;function H0(e){ci===null?ci=[e]:ci.push(e)}function zx(e){Hl=!0,H0(e)}function Gi(){if(!yd&&ci!==null){yd=!0;var e=0,n=ht;try{var o=ci;for(ht=1;e<o.length;e++){var c=o[e];do c=c(!0);while(c!==null)}ci=null,Hl=!1}catch(g){throw ci!==null&&(ci=ci.slice(e+1)),pl(Ys,Gi),g}finally{ht=n,yd=!1}}return null}var _s=[],ws=0,Vl=null,Ul=0,dr=[],fr=0,Co=null,di=1,fi="";function Eo(e,n){_s[ws++]=Ul,_s[ws++]=Vl,Vl=e,Ul=n}function V0(e,n,o){dr[fr++]=di,dr[fr++]=fi,dr[fr++]=Co,Co=e;var c=di;e=fi;var g=32-et(c)-1;c&=~(1<<g),o+=1;var _=32-et(n)+g;if(30<_){var M=g-g%5;_=(c&(1<<M)-1).toString(32),c>>=M,g-=M,di=1<<32-et(n)+g|o<<g|c,fi=_+e}else di=1<<_|o<<g|c,fi=e}function _d(e){e.return!==null&&(Eo(e,1),V0(e,1,0))}function wd(e){for(;e===Vl;)Vl=_s[--ws],_s[ws]=null,Ul=_s[--ws],_s[ws]=null;for(;e===Co;)Co=dr[--fr],dr[fr]=null,fi=dr[--fr],dr[fr]=null,di=dr[--fr],dr[fr]=null}var er=null,tr=null,Mt=!1,Er=null;function U0(e,n){var o=Ar(5,null,null,0);o.elementType="DELETED",o.stateNode=n,o.return=e,n=e.deletions,n===null?(e.deletions=[o],e.flags|=16):n.push(o)}function Z0(e,n){switch(e.tag){case 5:var o=e.type;return n=n.nodeType!==1||o.toLowerCase()!==n.nodeName.toLowerCase()?null:n,n!==null?(e.stateNode=n,er=e,tr=Vr(n.firstChild),!0):!1;case 6:return n=e.pendingProps===""||n.nodeType!==3?null:n,n!==null?(e.stateNode=n,er=e,tr=null,!0):!1;case 13:return n=n.nodeType!==8?null:n,n!==null?(o=Co!==null?{id:di,overflow:fi}:null,e.memoizedState={dehydrated:n,treeContext:o,retryLane:1073741824},o=Ar(18,null,null,0),o.stateNode=n,o.return=e,e.child=o,er=e,tr=null,!0):!1;default:return!1}}function bd(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Cd(e){if(Mt){var n=tr;if(n){var o=n;if(!Z0(e,n)){if(bd(e))throw Error(s(418));n=Vr(o.nextSibling);var c=er;n&&Z0(e,n)?U0(c,o):(e.flags=e.flags&-4097|2,Mt=!1,er=e)}}else{if(bd(e))throw Error(s(418));e.flags=e.flags&-4097|2,Mt=!1,er=e}}}function W0(e){for(e=e.r Line truncated
Error generating stack: `+_.message+`
`+_.stack}return{value:e,source:n,stack:g,digest:null}}function qd(e,n,o){return{value:e,source:null,stack:o??null,digest:n??null}}function Gd(e,n){try{console.error(n.value)}catch(o){setTimeout(function(){throw o})}}var Qx=typeof WeakMap=="function"?WeakMap:Map;function Eh(e,n,o){o=pi(-1,o),o.tag=3,o.payload={element:null};var c=n.value;return o.callback=function(){uu||(uu=!0,uf=c),Gd(e,n)},o}function kh(e,n,o){o=pi(-1,o),o.tag=3;var c=e.type.getDerivedStateFromError;if(typeof c=="function"){var g=n.value;o.payload=function(){return c(g)},o.callback=function(){Gd(e,n)}}var _=e.stateNode;return _!==null&&typeof _.componentDidCatch=="function"&&(o.callback=function(){Gd(e,n),typeof c!="function"&&(Yi===null?Yi=new Set([this]):Yi.add(this));var M=n.stack;this.componentDidCatch(n.value,{componentStack:M!==null?M:""})}),o}function Sh(e,n,o){var c=e.pingCache;if(c===null){c=e.pingCache=new Qx;var g=new Set;c.set(n,g)}else g=c.get(n),g===void 0&&(g=new Set,c.set(n,g));g.has(o)||(g.add(o),e=lv.bind(null,e,n,o),n.then(e,e))}function Bh(e){do{var n;if((n=e.tag===13)&&(n=e.memoizedState,n=n!==null?n.dehydrated!==null:!0),n)return e;e=e.return}while(e!==null);return null}function Ph(e,n,o,c,g){return(e.mode&1)===0?(e===n?e.flags|=65536:(e.flags|=128,o.flags|=131072,o.flags&=-52805,o.tag===1&&(o.alternate===null?o.tag=17:(n=pi(-1,1),n.tag=2,Ki(o,n,1))),o.lanes|=1),e):(e.flags|=65536,e.lanes=g,e)}var Kx=N.ReactCurrentOwner,On=!1;function Dn(e,n,o,c){n.child=e===null?K0(n,null,o,c):Cs(n,e.child,o,c)}function Th(e,n,o,c,g){o=o.render;var _=n.ref;return ks(n,g),c=Od(e,n,o,c,_,g),o=zd(),e!==null&&!On?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~g,mi(e,n,g)):(Mt&&o&&_d(n),n.flags|=1,Dn(e,n,c,g),n.child)}function Dh(e,n,o,c,g){if(e===null){var _=o.type;return typeof _=="function"&&!Af(_)&&_.defaultProps===void 0&&o.compare===null&&o.defaultProps===void 0?(n.tag=15,n.type=_,Rh(e,n,_,c,g)):(e=mu(o.type,null,c,n,n.mode,g),e.ref=n.ref,e.return=n,n.child=e)}if(_=e.child,(e.lanes&g)===0){var M=_.memoizedProps;if(o=o.compare,o=o!==null?o:zr,o(M,c)&&e.ref===n.ref)return mi(e,n,g)}return n.flags|=1,e=to(_,c),e.ref=n.ref,e.return=n,n.child=e}function Rh(e,n,o,c,g){if(e!==null){var _=e.memoizedProps;if(zr(_,c)&&e.ref===n.ref)if(On=!1,n.pendingProps=c=_,(e.lanes&g)!==0)(e.flags&131072)!==0&&(On=!0);else return n.lanes=e.lanes,mi(e,n,g)}return Qd(e,n,o,c,g)}function Fh(e,n,o){var c=n.pendingProps,g=c.children,_=e!==null?e.memoizedState:null;if(c.mode==="hidden")if((n.mode&1)===0)n.memoizedState={baseLanes:0,cachePool:null,transitions:null},Tt(Ts,nr),nr|=o;else{if((o&1073741824)===0)return e=_!==null?_.baseLanes|o:o,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:e,cachePool:null,transitions:null},n.updateQueue=null,Tt(Ts,nr),nr|=e,null;n.memoizedState={baseLanes:0,cachePool:null,transitions:null},c=_!==null?_.baseLanes:o,Tt(Ts,nr),nr|=c}else _!==null?(c=_.baseLanes|o,n.memoizedState=null):c=o,Tt(Ts,nr),nr|=c;return Dn(e,n,g,o),n.child}function Nh(e,n){var o=n.ref;(e===null&&o!==null||e!==null&&e.ref!==o)&&(n.flags|=512,n.flags|=2097152)}function Qd(e,n,o,c,g){var _=In(o)?bo:wn.current;return _=ys(n,_),ks(n,g),o=Od(e,n,o,c,_,g),c=zd(),e!==null&&!On?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~g,mi(e,n,g)):(Mt&&c&&_d(n),n.flags|=1,Dn(e,n,o,g),n.child)}function Lh(e,n,o,c,g){if(In(o)){var _=!0;jl(n)}else _=!1;if(ks(n,g),n.stateNode===null)iu(e,n),bh(n,o,c),Wd(n,o,c,g),c=!0;else if(e===null){var M=n.stateNode,Z=n.memoizedProps;M.props=Z;var X=M.context,ce=o.contextType;typeof ce=="object"&&ce!==null?ce=hr(ce):(ce=In(o)?bo:wn.current,ce=ys(n,ce));var ye=o.getDerivedStateFromProps,_e=typeof ye=="function"||typeof M.getSnapshotBeforeUpdate=="function";_e||typeof M.UNSAFE_componentWillReceiveProps!="function"&&typeof M.componentWillReceiveProps!="function"||(Z!==c||X!==ce)&&Ch(n,M,c,ce),Qi=!1;var ve=n.memoizedState;M.state=ve,Kl(n,c,M,g),X=n.memoizedState,Z!==c||ve!==X||Mn.current||Qi?(typeof ye=="function"&&(Zd(n,o,ye,c),X=n.memoizedState),(Z=Qi||wh(n,o,Z,c,ve,X,ce))?(_e||typeof M.UNSAFE_componentWillMount!="function"&&typeof M.componentWillMount!="function"||(typeof M.componentWillMount=="function"&&M.componentWillMount(),typeof M.UNSAFE_componentWillMount=="function"&&M.UNSAFE_componentWillMount()),typeof M.componentDidMount=="function"&&(n.flags|=4194308)):(typeof M.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=c,n.memoizedState=X),M.props=c,M.state=X,M.context=ce,c=Z):(typeof M.componentDidMount=="function"&&(n.flags|=4194308),c=!1)}else{M=n.stateNode,Y0(e,n),Z=n.memoizedProps,ce=n.type===n.elementType?Z:kr(n.type,Z),M.props=ce,_e=n.pendingProps,ve=M.context,X=o.contextType,typeof X=="object"&&X!==null?X=hr(X):(X=In(o)?bo:wn.current,X=ys(n,X));var Re=o.getDerivedStateFromProps;(ye=typeof Re=="function"||typeof M.getSnapshotBeforeUpdate=="function")||typeof M.UNSAFE_componentWillReceiveProps!="function"&&typeof M.componentWillReceiveProps!="function"||(Z!==_e||ve!==X)&&Ch(n,M,c,X),Qi=!1,ve=n.m Line truncated
`)}function Nv(r){if(r.length===0)return`Neighbors
No neighbors reported`;const a=[...r].sort((l,f)=>f.snr-l.snr),s=[`Neighbors (${a.length})`];for(const l of a){const f=l.name||l.pubkey_prefix,d=l.snr>=0?`+${l.snr.toFixed(1)}`:l.snr.toFixed(1);s.push(`${f}, ${d} dB [${Nu(l.last_heard_seconds)} ago]`)}return s.join(`
`)}function Lv(r){if(r.length===0)return`ACL
No ACL entries`;const a=[`ACL (${r.length})`];for(const s of r){const l=s.name||s.pubkey_prefix;a.push(`${l}: ${s.permission_name}`)}return a.join(`
`)}function Lo(r,a,s,l=0){const f=Math.floor(Date.now()/1e3);return{id:-Date.now()-l,type:"PRIV",conversation_key:r,text:a,sender_timestamp:f,received_at:f,path_len:null,txt_type:0,signature:null,outgoing:s,acked:1}}function Mv(r,a,s){const[l,f]=F.useState(!1);F.useEffect(()=>{f(!1)},[r==null?void 0:r.id]);const d=F.useMemo(()=>{if(!r||r.type!=="contact")return!1;const x=a.find(p=>p.public_key===r.id);return(x==null?void 0:x.type)===c0},[r,a]),m=F.useCallback(async x=>{if(!(!r||r.type!=="contact")&&d)try{const p=await lt.requestTelemetry(r.id,x),y=Lo(r.id,Fv(p),!1,0),v=Lo(r.id,Nv(p.neighbors),!1,1),w=Lo(r.id,Lv(p.acl),!1,2);s(B=>[...B,y,v,w]),f(!0)}catch(p){const y=Lo(r.id,`Telemetry request failed: ${p instanceof Error?p.message:"Unknown error"}`,!1,0);s(v=>[...v,y])}},[r,d,s]),h=F.useCallback(async x=>{if(!r||r.type!=="contact"||!d||!l)return;const p=Lo(r.id,`> ${x}`,!0,0);s(y=>[...y,p]);try{const y=await lt.sendRepeaterCommand(r.id,x),v=Lo(r.id,y.response,!1,1);y.sender_timestamp&&(v.sender_timestamp=y.sender_timestamp),s(w=>[...w,v])}catch(y){const v=Lo(r.id,`Command failed: ${y instanceof Error?y.message:"Unknown error"}`,!1,1);s(w=>[...w,v])}},[r,d,l,s]);return{repeaterLoggedIn:l,activeContactIsRepeater:d,handleTelemetryRequest:m,handleRepeaterCommand:h}}const Iv=12;function Hs(r){return r.slice(0,Iv)}function EA(r,a){return!r||!a?!1:Hs(r)===Hs(a)}function _i(r,a){return r||Hs(a)}const Wf="remoteterm-lastMessageTime";function kA(r){try{const a=localStorage.getItem(r);return a?JSON.parse(a):{}}catch{return{}}}function Ov(r,a){try{localStorage.setItem(r,JSON.stringify(a))}catch{}}function Ep(){return kA(Wf)}function Pf(r,a){const s=kA(Wf);return(!s[r]||a>s[r])&&(s[r]=a,Ov(Wf,s)),s}function Dr(r,a){return r==="channel"?`channel-${a}`:`contact-${Hs(a)}`}function kp(r,a){if(!a)return!1;const s=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`@\\[${s}\\]`,"i").test(r)}function zv(r,a,s,l=null){const[f,d]=F.useState({}),[m,h]=F.useState({}),[x,p]=F.useState(Ep),y=F.useRef(l);F.useEffect(()=>{y.current=l},[l]);const v=F.useRef(new Set),w=F.useRef(new Set);F.useEffect(()=>{const T=r.filter(N=>!v.current.has(N.key)),P=a.filter(N=>N.public_key&&!w.current.has(N.public_key));if(T.length===0&&P.length===0)return;T.forEach(N=>v.current.add(N.key)),P.forEach(N=>w.current.add(N.public_key)),(async()=>{const N=[...T.map(I=>({type:"CHAN",conversation_key:I.key})),...P.map(I=>({type:"PRIV",conversation_key:I.public_key}))];if(N.length!==0)try{const I=await lt.getMessagesBulk(N,u0),z={},j={},H={};for(const $ of T){const U=I[`CHAN:${$.key}`]||[];if(U.length>0){const G=Dr("channel",$.key),ne=$.last_read_at||0,ee=U.filter(de=>!de.outgoing&&de.received_at>ne);ee.length>0&&(z[G]=ee.length,ee.some(de=>kp(de.text,y.current))&&(j[G]=!0));const oe=Math.max(...U.map(de=>de.received_at));H[G]=oe,Pf(G,oe)}}for(const $ of P){const U=I[`PRIV:${$.public_key}`]||[];if(U.length>0){const G=Dr("contact",$.public_key),ne=$.last_read_at||0,ee=U.filter(de=>!de.outgoing&&de.received_at>ne);ee.length>0&&(z[G]=ee.length,ee.some(de=>kp(de.text,y.current))&&(j[G]=!0));const oe=Math.max(...U.map(de=>de.received_at));H[G]=oe,Pf(G,oe)}}Object.keys(z).length>0&&d($=>({...$,...z})),Object.keys(j).length>0&&h($=>({...$,...j})),p(Ep())}catch(I){console.error("Failed to fetch messages bulk:",I)}})()},[r,a]),F.useEffect(()=>{if(s&&s.type!=="raw"&&s.type!=="map"){const T=Dr(s.type,s.id);d(P=>{if(P[T]){const k={...P};return delete k[T],k}return P}),h(P=>{if(P[T]){const k={...P};return delete k[T],k}return P}),s.type==="channel"?lt.markChannelRead(s.id).catch(P=>{console.error("Failed to mark channel as read on server:",P)}):s.type==="contact"&&lt.markContactRead(s.id).catch(P=>{console.error("Failed to mark contact as read on server:",P)})}},[s]);const B=F.useCallback((T,P)=>{d(k=>({...k,[T]:(k[T]||0)+1})),P&&h(k=>({...k,[T]:!0}))},[]),R=F.useCallback(()=>{d({}),h({}),lt.markAllRead().catch(T=>{console.error("Failed to mark all as read on server:",T)})},[]),C=F.useCallback(T=>{if(T.type==="raw"||T.type==="map")return;const P=Dr(T.type,T.id);d(k=>{if(k[P]){const N={...k};return delete N[P],N}return k}),h(k=>{if(k[P]){const N={...k};return delete N[P],N}return k}),T.type==="channel"?lt.markChannelRead(T.id).catch(k=>{console.error("Failed to mark channel as read on server:",k)}):T.type==="contact"&&lt.markContactRead(T.id).catch(k=>{console.error("Failed to mark contact as read on server:",k)})},[]),E=F.useCallback(T=>{let P=null;if(T.type==="CHAN"&&T.conversation_key?P=Dr("channel",T.conversation_key):T.type==="PRIV"&&T.conversation_key&&(P=Dr("contact",T.conversation_key)),P){const k=T.received_at||Math.floor(Date.now()/1e3),N=Pf(P,k);p(N)}},[]);return{unreadCounts:f,mentions:m,lastMessageTimes:x,incrementUnread:B,markAllRead:R,markConversationRead:C,trackNewMessage:E}}var d0=CA();const SA=Zs(d0);function jv(r){if(typeof document>"u")return;let a=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text Line truncated
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const my=r=>r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ay=r=>r.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,s,l)=>l?l.toUpperCase():s.toLowerCase()),Pp=r=>{const a=Ay(r);return a.charAt(0).toUpperCase()+a.slice(1)},BA=(...r)=>r.filter((a,s,l)=>!!a&&a.trim()!==""&&l.indexOf(a)===s).join(" ").trim(),gy=r=>{for(const a in r)if(a.startsWith("aria-")||a==="role"||a==="title")return!0};/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var xy={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const vy=F.forwardRef(({color:r="currentColor",size:a=24,strokeWidth:s=2,absoluteStrokeWidth:l,className:f="",children:d,iconNode:m,...h},x)=>F.createElement("svg",{ref:x,...xy,width:a,height:a,stroke:r,strokeWidth:l?Number(s)*24/Number(a):s,className:BA("lucide",f),...!d&&!gy(h)&&{"aria-hidden":"true"},...h},[...m.map(([p,y])=>F.createElement(p,y)),...Array.isArray(d)?d:[d]]));/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const f0=(r,a)=>{const s=F.forwardRef(({className:l,...f},d)=>F.createElement(vy,{ref:d,iconNode:a,className:BA(`lucide-${my(Pp(r))}`,`lucide-${r}`,l),...f}));return s.displayName=Pp(r),s};/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const yy=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],_y=f0("check",yy);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const wy=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],by=f0("menu",wy);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Cy=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],PA=f0("x",Cy);function Ey({health:r,config:a,onConfigClick:s,onMaintenanceClick:l,onAdvertise:f,onMenuClick:d}){const m=(r==null?void 0:r.radio_connected)??!1,[h,x]=F.useState(!1),p=async()=>{x(!0);try{const y=await lt.reconnectRadio();y.connected&&It.success("Reconnected",{description:y.message})}catch(y){It.error("Reconnection failed",{description:y instanceof Error?y.message:"Check radio connection and power"})}finally{x(!1)}};return D.jsxs("div",{className:"flex items-center gap-4 px-4 py-2 bg-[#252525] border-b border-[#333] text-xs",children:[d&&D.jsx("button",{onClick:d,className:"md:hidden p-1 bg-transparent border-none text-[#e0e0e0] cursor-pointer","aria-label":"Open menu",children:D.jsx(by,{className:"h-5 w-5"})}),D.jsx("h1",{className:"hidden lg:block text-base font-semibold mr-auto",children:"RemoteTerm"}),D.jsxs("div",{className:"flex items-center gap-1 text-[#888]",children:[D.jsx("div",{className:`w-2 h-2 rounded-full ${m?"bg-[#4caf50]":"bg-[#666]"}`}),D.jsx("span",{className:"hidden lg:inline text-[#e0e0e0]",children:m?"Connected":"Disconnected"})]}),(r==null?void 0:r.serial_port)&&D.jsxs("div",{className:"hidden xl:flex items-center gap-1 text-[#888]",children:["Port: ",D.jsx("span",{className:"text-[#e0e0e0]",children:r.serial_port})]}),a&&D.jsxs(D.Fragment,{children:[D.jsx("div",{className:"hidden lg:flex items-center gap-1 text-[#888]",children:D.jsx("span",{className:"text-[#e0e0e0]",children:a.name||"Unnamed"})}),D.jsxs("div",{className:"hidden xl:flex items-center gap-1 text-[#888]",children:[a.radio.freq," MHz/SF",a.radio.sf,"/CR",a.radio.cr,"/",a.tx_power,"dBm"]})]}),D.jsx("div",{className:"flex-1 lg:hidden"}),!m&&D.jsx("button",{onClick:p,disabled:h,className:"px-3 py-1 bg-[#4a3000] border border-[#6b4500] text-[#ffa500] rounded text-xs cursor-pointer hover:bg-[#5a3a00] disabled:opacity-50 disabled:cursor-not-allowed",children:h?"Reconnecting...":"Reconnect"}),D.jsx("button",{onClick:f,disabled:!m,className:"px-3 py-1 bg-[#333] border border-[#444] text-[#e0e0e0] rounded text-xs cursor-pointer hover:bg-[#444] disabled:bg-[#333] disabled:text-[#666] disabled:cursor-not-allowed",children:"Advertise"}),D.jsx("button",{onClick:l,className:"px-2 py-1 bg-[#333] border border-[#444] text-[#e0e0e0] rounded text-xs cursor-pointer hover:bg-[#444]",title:"Database Maintenance",children:D.jsx("span",{role:"img","aria-label":"Settings",children:"⚙️"})}),D.jsxs("button",{onClick:s,className:"px-3 py-1 bg-[#333] border border-[#444] text-[#e0e0e0] rounded text-xs cursor-pointer hover:bg-[#444]",children:[D.jsx("span",{role:"img","aria-label":"Radio",children:"📻"})," ","Config"]})]})}const Gf=2,ky={text:"🛜",background:"#444444",textColor:"#ffffff"};function Sy(r){let a=0;for(let s=0;s<r.length;s++){const l=r.charCodeAt(s);a=(a<<5)-a+l,a=a&a}return Math.abs(a)}const By=/[\u{1F300}-\u{1F9FF}]|[\u{2600}-\u{26FF}]|[\u{2700}-\u{27BF}]|[\u{1F600}-\u{1F64F}]|[\u{1F680}-\u{1F6FF}]|[\u{1F1E0}-\u{1F1FF}]/u;function Py(r,a){if(!r)return a.slice(0,2).toUpperCase();const s=r.match(By);if(s)return s[0];const l=r.match(/[a-zA-Z]/g);if(!l||l.length===0)return a.slice(0,2).toUpperCase();const f=r.indexOf(" ");if(f!==-1){const d=l[0],m=r.slice(f+1).match(/[a-zA-Z]/);if(m)return(d+m[0]).toUpperCase()}return l[0].toUpperCase()}function Ty(r){const a=Sy(r),s=a%360,l=50+(a>>8)%30,f=35+(a>>16)%20,d=`hsl(${s}, ${l}%, ${f}%)`,m=f<45?"#ffffff":"#000000";return{background:d,text:m}}function Dy(r,a,s){if(s===Gf)return ky;const l=Py(r,a),f=Ty(a);return{text:l,background:f.background,textColor:f.text}}function Qf({name:r,publicKey:a,size:s=28,contactType:l}){const f=Dy(r,a,l);return D.jsx("div",{className:"flex items-center justify-center rounded-full font-semibold flex-shrink-0 select-none",style:{backgroundColor:f.background,color:f.textColor,width:s,height:s,fontSize:s*.45},children:f.text})}const TA="remoteterm-favorites";function Fc(){try{const r=localStorage.getItem(TA);return r?JSON.parse(r):[]}catch{return[]}}function DA(r){try{localStorage.setItem(TA,JSON.stringify(r))}catch{}}function Ry(r,a){const s=Fc();if(s.some(f=>f.type===r&&f.id===a))return s;const l=[...s,{type:r,id:a}];return DA(l),l}function Fy(r,a){const l=Fc().filter(f=>!(f.type===r&&f.id===a));return DA(l),l}function Is(r,a,s){return r.some(l=>l.type===a&&l.id===s)}function Ny(r,a){return Fc().some(l=>l.type===r&&l.id===a)?Fy(r,a):Ry(r,a)}function RA(r){var a,s,l="";if(typeof r=="string"||typeof r=="number")l+=r;else if(typeof r=="object")if(Array.isArray(r)){var f=r.length;for(a=0;a<f;a++)r[a]&&(s=RA(r[a]))&&(l&&(l+=" "),l+=s)}else for(s in r)r[s]&&(l&&(l+=" "),l+=s);return l}function FA(){for(var r,a,s=0,l="",f=arguments.length;s<f;s++)(r=arguments[s])&&(a=RA(r))&&(l&&(l+=" "),l+=a);return l}const Ly=(r,a)=>{const s=new Array(r.length+a.length);for(let l=0;l<r.length;l++)s[l]=r[l];for(let l=0;l<a.length;l++)s[r.length+l]=a[l];return s},My=(r,a)=>({claLine truncated
`).map((W,S,V)=>D.jsxs("span",{children:[L_(W,h),S<V.length-1&&D.jsx("br",{})]},S)),!de&&D.jsx("span",{className:"text-[10px] text-muted-foreground/50 ml-2",children:Sc(N.sender_timestamp||N.received_at)}),N.outgoing&&(N.acked>0?` ✓${N.acked>1?N.acked:""}`:" ?")]})]})]},N.id)})]}),v&&D.jsx("button",{onClick:C,className:"absolute bottom-4 right-4 w-10 h-10 rounded-full bg-muted hover:bg-accent border border-border flex items-center justify-center shadow-lg transition-opacity",title:"Scroll to bottom",children:D.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-muted-foreground",children:D.jsx("polyline",{points:"6 9 12 15 18 9"})})})]})}const zp=156,I_=140,O_=156,z_=120,j_=8,H_=F.forwardRef(function({onSend:a,disabled:s,placeholder:l,isRepeaterMode:f,conversationType:d,senderName:m},h){const[x,p]=F.useState(""),[y,v]=F.useState(!1),w=F.useRef(null);F.useImperativeHandle(h,()=>({appendText:I=>{var z;p(j=>j+I),(z=w.current)==null||z.focus()}}));const B=F.useMemo(()=>{if(d==="contact")return{warningAt:I_,dangerAt:zp,hardLimit:zp};if(d==="channel"){const I=(m==null?void 0:m.length)??10,z=Math.max(1,O_-I-2);return{warningAt:z_,dangerAt:Math.max(1,z-j_),hardLimit:z}}return null},[d,m]),{limitState:R,warningMessage:C}=F.useMemo(()=>{if(!B)return{limitState:"normal",warningMessage:null};const I=x.length;return I>=B.hardLimit?{limitState:"error",warningMessage:"likely truncated by radio"}:I>=B.dangerAt?{limitState:"danger",warningMessage:"may impact multi-repeater hop delivery"}:I>=B.warningAt?{limitState:"warning",warningMessage:"may impact multi-repeater hop delivery"}:{limitState:"normal",warningMessage:null}},[x.length,B]),E=B?B.hardLimit-x.length:0,T=F.useCallback(async I=>{I.preventDefault();const z=x.trim();if(f){if(y||s)return;v(!0);try{await a(z),p("")}catch(j){console.error("Failed to request telemetry:",j),It.error("Failed to request telemetry",{description:j instanceof Error?j.message:"Check radio connection"});return}finally{v(!1)}setTimeout(()=>{var j;return(j=w.current)==null?void 0:j.focus()},0)}else{if(!z||y||s)return;v(!0);try{await a(z),p("")}catch(j){console.error("Failed to send message:",j),It.error("Failed to send message",{description:j instanceof Error?j.message:"Check radio connection"});return}finally{v(!1)}setTimeout(()=>{var j;return(j=w.current)==null?void 0:j.focus()},0)}},[x,y,s,a,f]),P=F.useCallback(I=>{I.key==="Enter"&&!I.shiftKey&&(I.preventDefault(),T(I))},[T]),k=f?!0:x.trim().length>0,N=!f&&B!==null;return D.jsxs("form",{className:"px-4 py-3 border-t border-border flex flex-col gap-1",onSubmit:T,children:[D.jsxs("div",{className:"flex gap-2",children:[D.jsx(Yt,{ref:w,type:f?"password":"text",autoComplete:f?"off":void 0,value:x,onChange:I=>p(I.target.value),onKeyDown:P,placeholder:l||(f?"Enter password for admin login...":"Type a message..."),disabled:s||y,className:"flex-1 min-w-0"}),D.jsx(gr,{type:"submit",disabled:s||y||!k,className:"flex-shrink-0",children:y?f?"Logging in...":"Sending...":f?x.trim()?"Log in with password":"Log in as guest/use repeater ACLs":"Send"})]}),N&&D.jsxs("div",{className:"flex items-center justify-end gap-2 text-xs",children:[D.jsxs("span",{className:nt("tabular-nums",R==="error"||R==="danger"?"text-red-500 font-medium":R==="warning"?"text-yellow-500":"text-muted-foreground"),children:[x.length,"/",B.hardLimit,E<0&&` (${E})`]}),C&&D.jsxs("span",{className:nt(R==="error"?"text-red-500":"text-yellow-500"),children:["— ",C]})]})]})});function an(r,a,{checkForDefaultPrevented:s=!0}={}){return function(f){if(r==null||r(f),s===!1||!f.defaultPrevented)return a==null?void 0:a(f)}}function V_(r,a){const s=F.createContext(a),l=d=>{const{children:m,...h}=d,x=F.useMemo(()=>h,Object.values(h));return D.jsx(s.Provider,{value:x,children:m})};l.displayName=r+"Provider";function f(d){const m=F.useContext(s);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${r}\``)}return[l,f]}function al(r,a=[]){let s=[];function l(d,m){const h=F.createContext(m),x=s.length;s=[...s,m];const p=v=>{var T;const{scope:w,children:B,...R}=v,C=((T=w==null?void 0:w[r])==null?void 0:T[x])||h,E=F.useMemo(()=>R,Object.values(R));return D.jsx(C.Provider,{value:E,children:B})};p.displayName=d+"Provider";function y(v,w){var C;const B=((C=w==null?void 0:w[r])==null?void 0:C[x])||h,R=F.useContext(B);if(R)return R;if(m!==void 0)return m;throw new Error(`\`${v}\` must be used within \`${d}\``)}return[p,y]}const f=()=>{const d=s.map(m=>F.createContext(m));return function(h){const x=(h==null?void 0:h[r])||d;return F.useMemo(()=>({[`__scope${r}`]:{...h,[r]:x}}),[h,x])}};return f.scopeName=r,[l,U_(f,...a)]}function U_(...r){const a=r[0];if(r.length===1)return a;const s=()=>{const l=r.map(f=>({useScope:f(),scopeName:f.scopeName}));return function(d){const m=l.reduce((h,{useScope:x,scopeName:p})=>{const v=x(d)[`__scope${p}Line truncated
.`.concat(C1,` {
overflow: hidden `).concat(l,`;
padding-right: `).concat(h,"px ").concat(l,`;
}
body[`).concat(zs,`] {
overflow: hidden `).concat(l,`;
overscroll-behavior: contain;
`).concat([a&&"position: relative ".concat(l,";"),s==="margin"&&`
padding-left: `.concat(f,`px;
padding-top: `).concat(d,`px;
padding-right: `).concat(m,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(h,"px ").concat(l,`;
`),s==="padding"&&"padding-right: ".concat(h,"px ").concat(l,";")].filter(Boolean).join(""),`
}
.`).concat(Mu,` {
right: `).concat(h,"px ").concat(l,`;
}
.`).concat(Iu,` {
margin-right: `).concat(h,"px ").concat(l,`;
}
.`).concat(Mu," .").concat(Mu,` {
right: 0 `).concat(l,`;
}
.`).concat(Iu," .").concat(Iu,` {
margin-right: 0 `).concat(l,`;
}
body[`).concat(zs,`] {
`).concat(E1,": ").concat(h,`px;
}
`)},Qp=function(){var r=parseInt(document.body.getAttribute(zs)||"0",10);return isFinite(r)?r:0},Z1=function(){F.useEffect(function(){return document.body.setAttribute(zs,(Qp()+1).toString()),function(){var r=Qp()-1;r<=0?document.body.removeAttribute(zs):document.body.setAttribute(zs,r.toString())}},[])},W1=function(r){var a=r.noRelative,s=r.noImportant,l=r.gapMode,f=l===void 0?"margin":l;Z1();var d=F.useMemo(function(){return H1(f)},[f]);return F.createElement(V1,{styles:U1(d,!a,f,s?"":"!important")})},Yf=!1;if(typeof window<"u")try{var Tu=Object.defineProperty({},"passive",{get:function(){return Yf=!0,!0}});window.addEventListener("test",Tu,Tu),window.removeEventListener("test",Tu,Tu)}catch{Yf=!1}var Ns=Yf?{passive:!1}:!1,q1=function(r){return r.tagName==="TEXTAREA"},rg=function(r,a){if(!(r instanceof Element))return!1;var s=window.getComputedStyle(r);return s[a]!=="hidden"&&!(s.overflowY===s.overflowX&&!q1(r)&&s[a]==="visible")},G1=function(r){return rg(r,"overflowY")},Q1=function(r){return rg(r,"overflowX")},Kp=function(r,a){var s=a.ownerDocument,l=a;do{typeof ShadowRoot<"u"&&l instanceof ShadowRoot&&(l=l.host);var f=ig(r,l);if(f){var d=og(r,l),m=d[1],h=d[2];if(m>h)return!0}l=l.parentNode}while(l&&l!==s.body);return!1},K1=function(r){var a=r.scrollTop,s=r.scrollHeight,l=r.clientHeight;return[a,s,l]},$1=function(r){var a=r.scrollLeft,s=r.scrollWidth,l=r.clientWidth;return[a,s,l]},ig=function(r,a){return r==="v"?G1(a):Q1(a)},og=function(r,a){return r==="v"?K1(a):$1(a)},Y1=function(r,a){return r==="h"&&a==="rtl"?-1:1},X1=function(r,a,s,l,f){var d=Y1(r,window.getComputedStyle(a).direction),m=d*l,h=s.target,x=a.contains(h),p=!1,y=m>0,v=0,w=0;do{if(!h)break;var B=og(r,h),R=B[0],C=B[1],E=B[2],T=C-E-d*R;(R||T)&&ig(r,h)&&(v+=T,w+=R);var P=h.parentNode;h=P&&P.nodeType===Node.DOCUMENT_FRAGMENT_NODE?P.host:P}while(!x&&h!==document.body||x&&(a.contains(h)||a===h));return(y&&Math.abs(v)<1||!y&&Math.abs(w)<1)&&(p=!0),p},Du=function(r){return"changedTouches"in r?[r.changedTouches[0].clientX,r.changedTouches[0].clientY]:[0,0]},$p=function(r){return[r.deltaX,r.deltaY]},Yp=function(r){return r&&"current"in r?r.current:r},J1=function(r,a){return r[0]===a[0]&&r[1]===a[1]},ew=function(r){return`
.block-interactivity-`.concat(r,` {pointer-events: none;}
.allow-interactivity-`).concat(r,` {pointer-events: all;}
`)},tw=0,Ls=[];function nw(r){var a=F.useRef([]),s=F.useRef([0,0]),l=F.useRef(),f=F.useState(tw++)[0],d=F.useState(ng)[0],m=F.useRef(r);F.useEffect(function(){m.current=r},[r]),F.useEffect(function(){if(r.inert){document.body.classList.add("block-interactivity-".concat(f));var C=b1([r.lockRef.current],(r.shards||[]).map(Yp),!0).filter(Boolean);return C.forEach(function(E){return E.classList.add("allow-interactivity-".concat(f))}),function(){document.body.classList.remove("block-interactivity-".concat(f)),C.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(f))})}}},[r.inert,r.lockRef.current,r.shards]);var h=F.useCallback(function(C,E){if("touches"in C&&C.touches.length===2||C.type==="wheel"&&C.ctrlKey)return!m.current.allowPinchZoom;var T=Du(C),P=s.current,k="deltaX"in C?C.deltaX:P[0]-T[0],N="deltaY"in C?C.deltaY:P[1]-T[1],I,z=C.target,j=Math.abs(k)>Math.abs(N)?"h":"v";if("touches"in C&&j==="h"&&z.type==="range")return!1;var H=window.getSelection(),$=H&&H.anchorNode,U=$?$===z||$.contains(z):!1;if(U)return!1;var G=Kp(j,z);if(!G)return!0;if(G?I=j:(I=j==="v"?"h":"v",G=Kp(j,z)),!G)return!1;if(!l.current&&"changedTouches"in C&&(k||N)&&(l.current=I),!I)return!0;var ne=l.current||I;return X1(ne,E,C,ne==="h"?k:N)},[]),x=F.useCallback(function(C){var E=C;if(!(!Ls.length||Ls[Ls.length-1]!==d)){var T="deltaY"in E?$p(E):Du(E),P=a.current.filter(function(I){return I.name===E.type&&(I.target===E.target||E.target===I.shadowParent)&&J1(I.delta,T)})[0];if(P&&P.should){E.cancelable&&E.preventDefault();return}if(!P){var k=(m.current.shards||[]).map(Yp).filter(Boolean).filter(function(I){return I.contains(E.target)}),N=k.length>0?h(E,k[0]):!m.current.noIsolation;N&&E.cancelable&&E.preventDefault()}}},[]),p=F.useCallback(function(C,E,T,P){var k={name:C,delta:E,target:T,should:P,shadowParent:rw(T)};a.current.push(k),setTimeout(function(){a.current=a.current.filter(function(N){return N!==k})},1)},[]),y=F.useCallback(function(C){s.current=Du(C),l.current=void 0},[]),v=F.useCallback(function(C){p(C.type,$p(C),C.target,h(C,r.lockRef.current))},[]),w=F.useCallback(function(C){p(C.type,Du(C),C.target,h(C,r.lockRef.current))},[]);F.useEffect(function(){return Ls.push(d),r.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:w}),document.addEventListener("wheel",x,Ns),document.addEventListener("touchmove",x,Ns),document.addEventListener("touchstart",y,Ns),function(){Ls=Ls.filter(function(C){return C!==d}),document.removeEventListener("wheel",x,Ns),document.removeEventListener("touchmove",x,Ns),document.removeEventListener("touchstart",y,Ns)}},[]);var B=r.removeScrollBar,R=r.inert;return F.createElement(F.Fragment,null,R?F.createElement(d,{styles:ew(f)}):null,B?F.createElement(W1,{noRelative:r.noRelative,gapMode:r.gapMode}):null)}function rw(r){for(var a=null;r!==null;)r instanceof ShadowRoot&&(a=r.host,r=r.host),r=r.parentNode;return a}const iw=R1(tg,nw);var sg=F.forwardRef(function(r,a){return F.createElement(Mc,Kr({},r,{ref:a,sideCar:iw}))});sg.classNames=Mc.classNames;var ow=function(r){if(typeof document>"u")return null;var a=Array.isArray(r)?r[0]:r;return a.ownerDocument.body},Ms=new WeakMap,Ru=new WeakMap,Fu={},Of=0,ag=function(r){return r&&(r.host||ag(r.parentNode))},sw=function(r,a){return a.map(function(s){if(r.contains(s))return s;var l=ag(s);return l&&r.contains(l)?l:(console.error("aria-hidden",s,"in not contained inside",r,". Doing nothing"),null)}).filter(function(s){return!!s})},aw=function(r,a,s,l){var f=sw(a,Array.isArray(r)?r:[r]);Fu[s]||(Fu[s]=new WeakMap);var d=Fu[s],m=[],h=new Set,x=new Set(f),p=function(v){!v||h.has(v)||(h.add(v),p(v.parentNode))};f.forEach(p);var y=function(v){!v||x.has(v)||Array.prototype.forEach.call(v.children,function(w){if(h.has(w))y(w);else try{var B=w.getAttribute(l),R=B!==null&&B!=="false",C=(Ms.get(w)||0)+1,E=(d.get(w)||0)+1;Ms.set(w,C),d.set(w,E),m.push(w),C===1&&R&&Ru.set(w,!0),E===1&&w.setAttribute(s,"true"),R||w.setAttribute(l,"true")}catch(T){console.error("aria-hidden: cannot operate on ",w,T)}})};return y(a),h.clear(),Of++,function(){m.forEach(function(v){var w=Ms.get(v)-1,B=d.get(v)-1;Ms.set(v,w),d.set(v,B),w||(Ru.has(v)||v.removeAttribute(l),Ru.delete(v)),B||v.removeAttribute(s)}),Of--,Of||(Ms=new WeakMap,Ms=new WeakMap,Ru=new WeakMap,Fu={})}},lw=function(r,a,s){s===void 0&&(s="data-aria-hidden");var l=Array.from(Array.isArray(r)?r:[r]),f=ow(r);return f?(l.push.apply(l,Array.from(f.querySelectorAll("[aria-live], script"))),aw(l,f,s,"aria-hidden")):function(){return null}};function uw(r){const a=cw(r),s=F.forwardRef((l,f)=>{const{children:d,...m}=l,h=F.Children.toArray(d),x=h.find(fw);if(x){const p=x.props.children,y=h.map(v=>v===x?F.Children.count(p)>1?F.Children.only(null):F.isValidElement(p)?p.props.children:null:v);return D.jsx(a,{...m,ref:f,children:F.isValidElement(p)?F.cloneElement(p,void 0,y):null})}return D.jsx(a,{...m,ref:f,children:d})});return s.displayName=`${r}.Slot`,s}function cw(r){const a=F.forwardRef((s,l)=>{const{childre Line truncated
If you want to hide the \`${a.titleName}\`, you can wrap it with our VisuallyHidden component.
For more information, see https://radix-ui.com/primitives/docs/components/${a.docsSlug}`;return F.useEffect(()=>{r&&(document.getElementById(r)||console.error(s))},[s,r]),null},bw="DialogDescriptionWarning",Cw=({contentRef:r,descriptionId:a})=>{const l=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${wg(bw).contentName}}.`;return F.useEffect(()=>{var d;const f=(d=r.current)==null?void 0:d.getAttribute("aria-describedby");a&&f&&(document.getElementById(a)||console.warn(l))},[l,r,a]),null},bg=ug,Cg=fg,Oc=hg,zc=pg,jc=Ag,Hc=xg,Eg=yg;const x0=bg,Ew=Cg,kg=F.forwardRef(({className:r,...a},s)=>D.jsx(Oc,{ref:s,className:nt("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",r),...a}));kg.displayName=Oc.displayName;const Vc=F.forwardRef(({className:r,children:a,...s},l)=>D.jsxs(Ew,{children:[D.jsx(kg,{}),D.jsxs(zc,{ref:l,className:nt("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",r),...s,children:[a,D.jsxs(Eg,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[D.jsx(PA,{className:"h-4 w-4"}),D.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Vc.displayName=zc.displayName;const Uc=({className:r,...a})=>D.jsx("div",{className:nt("flex flex-col space-y-1.5 text-center sm:text-left",r),...a});Uc.displayName="DialogHeader";const v0=({className:r,...a})=>D.jsx("div",{className:nt("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",r),...a});v0.displayName="DialogFooter";const Zc=F.forwardRef(({className:r,...a},s)=>D.jsx(jc,{ref:s,className:nt("text-lg font-semibold leading-none tracking-tight",r),...a}));Zc.displayName=jc.displayName;const kw=F.forwardRef(({className:r,...a},s)=>D.jsx(Hc,{ref:s,className:nt("text-sm text-muted-foreground",r),...a}));kw.displayName=Hc.displayName;function Xp(r){const a=Sw(r),s=F.forwardRef((l,f)=>{const{children:d,...m}=l,h=F.Children.toArray(d),x=h.find(Pw);if(x){const p=x.props.children,y=h.map(v=>v===x?F.Children.count(p)>1?F.Children.only(null):F.isValidElement(p)?p.props.children:null:v);return D.jsx(a,{...m,ref:f,children:F.isValidElement(p)?F.cloneElement(p,void 0,y):null})}return D.jsx(a,{...m,ref:f,children:d})});return s.displayName=`${r}.Slot`,s}function Sw(r){const a=F.forwardRef((s,l)=>{const{children:f,...d}=s;if(F.isValidElement(f)){const m=Dw(f),h=Tw(d,f.props);return f.type!==F.Fragment&&(h.ref=l?sl(l,m):m),F.cloneElement(f,h)}return F.Children.count(f)>1?F.Children.only(null):null});return a.displayName=`${r}.SlotClone`,a}var Bw=Symbol("radix.slottable");function Pw(r){return F.isValidElement(r)&&typeof r.type=="function"&&"__radixId"in r.type&&r.type.__radixId===Bw}function Tw(r,a){const s={...a};for(const l in a){const f=r[l],d=a[l];/^on[A-Z]/.test(l)?f&&d?s[l]=(...h)=>{const x=d(...h);return f(...h),x}:f&&(s[l]=f):l==="style"?s[l]={...f,...d}:l==="className"&&(s[l]=[f,d].filter(Boolean).join(" "))}return{...r,...s}}function Dw(r){var l,f;let a=(l=Object.getOwnPropertyDescriptor(r.props,"ref"))==null?void 0:l.get,s=a&&"isReactWarning"in a&&a.isReactWarning;return s?r.ref:(a=(f=Object.getOwnPropertyDescriptor(r,"ref"))==null?void 0:f.get,s=a&&"isReactWarning"in a&&a.isReactWarning,s?r.props.ref:r.props.ref||r.ref)}function Rw(r){const a=r+"CollectionProvider",[s,l]=al(a),[f,d]=s(a,{collectionRef:{current:null},itemMap:new Map}),m=C=>{const{scope:E,children:T}=C,P=be.useRef(null),k=be.useRef(new Map).current;return D.jsx(f,{scope:E,itemMap:k,collectionRef:P,children:T})};m.displayName=a;const h=r+"CollectionSlot",x=Xp(h),p=be.forwardRef((C,E)=>{const{scope:T,children:P}=C,k=d(h,T),N=xr(E,k.collectionRef);return D.jsx(x,{ref:N,children:P})});p.displayName=h;const y=r+"CollectionItemSlot",v="data-radix-collection-item",w=Xp(y),B=be.forwardRef((C,E)=>{const{scope:T,children:P,...k}=C,N=be.useRef(null),I=xr(E,N),z=d(y,T);return be.useEffect(()=>(z.itemMap.set(N,{ref:N,...k}),()=>void z.itemMap.delete(N))),D.jsx(w,{[v]:"",ref:I,children:P})});B.displayName=y;function R(C){const E=d(r+"CollectionConsumer",C);return be.useCallback(()=>{const P=E.collectionRef.current;if(!P)return[];const k=Array.from(P.querySelectorAll(`[${v}]`));return Array.from(E.itemMap.values()).sort((z,j)=>k.indexOf(z.ref.current)-k.indexOf(j.ref.current))},[E.coll Line truncated
* Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
* (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
*/var B2=el.exports,tm;function P2(){return tm||(tm=1,(function(r,a){(function(s,l){l(a)})(B2,(function(s){var l="1.9.4";function f(t){var i,u,A,b;for(u=1,A=arguments.length;u<A;u++){b=arguments[u];for(i in b)t[i]=b[i]}return t}var d=Object.create||(function(){function t(){}return function(i){return t.prototype=i,new t}})();function m(t,i){var u=Array.prototype.slice;if(t.bind)return t.bind.apply(t,u.call(arguments,1));var A=u.call(arguments,2);return function(){return t.apply(i,A.length?A.concat(u.call(arguments)):arguments)}}var h=0;function x(t){return"_leaflet_id"in t||(t._leaflet_id=++h),t._leaflet_id}function p(t,i,u){var A,b,O,Q;return Q=function(){A=!1,b&&(O.apply(u,b),b=!1)},O=function(){A?b=arguments:(t.apply(u,arguments),setTimeout(Q,i),A=!0)},O}function y(t,i,u){var A=i[1],b=i[0],O=A-b;return t===A&&u?t:((t-b)%O+O)%O+b}function v(){return!1}function w(t,i){if(i===!1)return t;var u=Math.pow(10,i===void 0?6:i);return Math.round(t*u)/u}function B(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function R(t){return B(t).split(/\s+/)}function C(t,i){Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?d(t.options):{});for(var u in i)t.options[u]=i[u];return t.options}function E(t,i,u){var A=[];for(var b in t)A.push(encodeURIComponent(u?b.toUpperCase():b)+"="+encodeURIComponent(t[b]));return(!i||i.indexOf("?")===-1?"?":"&")+A.join("&")}var T=/\{ *([\w_ -]+) *\}/g;function P(t,i){return t.replace(T,function(u,A){var b=i[A];if(b===void 0)throw new Error("No value provided for variable "+u);return typeof b=="function"&&(b=b(i)),b})}var k=Array.isArray||function(t){return Object.prototype.toString.call(t)==="[object Array]"};function N(t,i){for(var u=0;u<t.length;u++)if(t[u]===i)return u;return-1}var I="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function z(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var j=0;function H(t){var i=+new Date,u=Math.max(0,16-(i-j));return j=i+u,window.setTimeout(t,u)}var $=window.requestAnimationFrame||z("RequestAnimationFrame")||H,U=window.cancelAnimationFrame||z("CancelAnimationFrame")||z("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function G(t,i,u){if(u&&$===H)t.call(i);else return $.call(window,m(t,i))}function ne(t){t&&U.call(window,t)}var ee={__proto__:null,extend:f,create:d,bind:m,get lastId(){return h},stamp:x,throttle:p,wrapNum:y,falseFn:v,formatNum:w,trim:B,splitWords:R,setOptions:C,getParamString:E,template:P,isArray:k,indexOf:N,emptyImageUrl:I,requestFn:$,cancelFn:U,requestAnimFrame:G,cancelAnimFrame:ne};function oe(){}oe.extend=function(t){var i=function(){C(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},u=i.__super__=this.prototype,A=d(u);A.constructor=i,i.prototype=A;for(var b in this)Object.prototype.hasOwnProperty.call(this,b)&&b!=="prototype"&&b!=="__super__"&&(i[b]=this[b]);return t.statics&&f(i,t.statics),t.includes&&(de(t.includes),f.apply(null,[A].concat(t.includes))),f(A,t),delete A.statics,delete A.includes,A.options&&(A.options=u.options?d(u.options):{},f(A.options,t.options)),A._initHooks=[],A.callInitHooks=function(){if(!this._initHooksCalled){u.callInitHooks&&u.callInitHooks.call(this),this._initHooksCalled=!0;for(var O=0,Q=A._initHooks.length;O<Q;O++)A._initHooks[O].call(this)}},i},oe.include=function(t){var i=this.prototype.options;return f(this.prototype,t),t.options&&(this.prototype.options=i,this.mergeOptions(t.options)),this},oe.mergeOptions=function(t){return f(this.prototype.options,t),this},oe.addInitHook=function(t){var i=Array.prototype.slice.call(arguments,1),u=typeof t=="function"?t:function(){this[t].apply(this,i)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(u),this};function de(t){if(!(typeof L>"u"||!L||!L.Mixin)){t=k(t)?t:[t];for(var i=0;i<t.length;i++)t[i]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",new Error().stack)}}var le={on:function(t,i,u){if(typeof t=="object")for(var A in t)this._on(A,t[A],i);else{t=R(t);for(var b=0,O=t.length;b<O;b++)this._on(t[b],i,u)}return this},off:function(t,i,u){if(!arguments.length)delete this._events;else if(typeof t=="object")for(var A in t)this._off(A,t[A],i);else{t=R(t);for(var b=arguments.length===1,O=0,Q=t.length;O<Q;O++)b?this._off(t[O]):this._off(t[O],i,u)}return this},_on:function(t,i,u,A){if(typeof i!="function"){console.warn("wrong listener type: "+typeof i);return}if(this._listens(t,i,u)===!1){u===this&&(u=void 0);var b={fn:i,ctx:u};A&&(b.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(b)}},_off:function(t,i,u){var A,b,O;if(this._events&&(A=this._events[t],!!A)){if(arguments.length===1){if(this._firingCount)for(b=0,O=A.length;b<O;b++)A[b].fn=v;delete this._events[t];return}if(typeof i!="function"){console.warn("wrong listener type: "+typeof i);return}var Q=thisLine truncated
(c) 2012 by Cédric Mesnil. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/return(function(l){var f=s,d=f.lib,m=d.WordArray,h=d.Hasher,x=f.algo,p=m.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),y=m.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),v=m.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),w=m.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),B=m.create([0,1518500249,1859775393,2400959708,2840853838]),R=m.create([1352829926,1548603684,1836072691,2053994217,0]),C=x.RIPEMD160=h.extend({_doReset:function(){this._hash=m.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(z,j){for(var H=0;H<16;H++){var $=j+H,U=z[$];z[$]=(U<<8|U>>>24)&16711935|(U<<24|U>>>8)&4278255360}var G=this._hash.words,ne=B.words,ee=R.words,oe=p.words,de=y.words,le=v.words,fe=w.words,q,J,W,S,V,K,Y,he,pe,Ee;K=q=G[0],Y=J=G[1],he=W=G[2],pe=S=G[3],Ee=V=G[4];for(var ge,H=0;H<80;H+=1)ge=q+z[j+oe[H]]|0,H<16?ge+=E(J,W,S)+ne[0]:H<32?ge+=T(J,W,S)+ne[1]:H<48?ge+=P(J,W,S)+ne[2]:H<64?ge+=k(J,W,S)+ne[3]:ge+=N(J,W,S)+ne[4],ge=ge|0,ge=I(ge,le[H]),ge=ge+V|0,q=V,V=S,S=I(W,10),W=J,J=ge,ge=K+z[j+de[H]]|0,H<16?ge+=N(Y,he,pe)+ee[0]:H<32?ge+=k(Y,he,pe)+ee[1]:H<48?ge+=P(Y,he,pe)+ee[2]:H<64?ge+=T(Y,he,pe)+ee[3]:ge+=E(Y,he,pe)+ee[4],ge=ge|0,ge=I(ge,fe[H]),ge=ge+Ee|0,K=Ee,Ee=pe,pe=I(he,10),he=Y,Y=ge;ge=G[1]+W+pe|0,G[1]=G[2]+S+Ee|0,G[2]=G[3]+V+K|0,G[3]=G[4]+q+Y|0,G[4]=G[0]+J+he|0,G[0]=ge},_doFinalize:function(){var z=this._data,j=z.words,H=this._nDataBytes*8,$=z.sigBytes*8;j[$>>>5]|=128<<24-$%32,j[($+64>>>9<<4)+14]=(H<<8|H>>>24)&16711935|(H<<24|H>>>8)&4278255360,z.sigBytes=(j.length+1)*4,this._process();for(var U=this._hash,G=U.words,ne=0;ne<5;ne++){var ee=G[ne];G[ne]=(ee<<8|ee>>>24)&16711935|(ee<<24|ee>>>8)&4278255360}return U},clone:function(){var z=h.clone.call(this);return z._hash=this._hash.clone(),z}});function E(z,j,H){return z^j^H}function T(z,j,H){return z&j|~z&H}function P(z,j,H){return(z|~j)^H}function k(z,j,H){return z&H|j&~H}function N(z,j,H){return z^(j|~H)}function I(z,j){return z<<j|z>>>32-j}f.RIPEMD160=h._createHelper(C),f.HmacRIPEMD160=h._createHmacHelper(C)})(),s.RIPEMD160})})(Ju)),Ju.exports}var ec={exports:{}},xb=ec.exports,ym;function Yc(){return ym||(ym=1,(function(r,a){(function(s,l){r.exports=l(ft())})(xb,function(s){(function(){var l=s,f=l.lib,d=f.Base,m=l.enc,h=m.Utf8,x=l.algo;x.HMAC=d.extend({init:function(p,y){p=this._hasher=new p.init,typeof y=="string"&&(y=h.parse(y));var v=p.blockSize,w=v*4;y.sigBytes>w&&(y=p.finalize(y)),y.clamp();for(var B=this._oKey=y.clone(),R=this._iKey=y.clone(),C=B.words,E=R.words,T=0;T<v;T++)C[T]^=1549556828,E[T]^=909522486;B.sigBytes=R.sigBytes=w,this.reset()},reset:function(){var p=this._hasher;p.reset(),p.update(this._iKey)},update:function(p){return this._hasher.update(p),this},finalize:function(p){var y=this._hasher,v=y.finalize(p);y.reset();var w=y.finalize(this._oKey.clone().concat(v));return w}})})()})})(ec)),ec.exports}var tc={exports:{}},vb=tc.exports,_m;function yb(){return _m||(_m=1,(function(r,a){(function(s,l,f){r.exports=l(ft(),ul(),Yc())})(vb,function(s){return(function(){var l=s,f=l.lib,d=f.Base,m=f.WordArray,h=l.algo,x=h.SHA256,p=h.HMAC,y=h.PBKDF2=d.extend({cfg:d.extend({keySize:128/32,hasher:x,iterations:25e4}),init:function(v){this.cfg=this.cfg.extend(v)},compute:function(v,w){for(var B=this.cfg,R=p.create(B.hasher,v),C=m.create(),E=m.create([1]),T=C.words,P=E.words,k=B.keySize,N=B.iterations;T.length<k;){var I=R.update(w).finalize(E);R.reset();for(var z=I.words,j=z.length,H=I,$=1;$<N;$++){H=R.finalize(H),R.reset();for(var U=H.words,G=0;G<j;G++)z[G]^=U[G]}C.concat(I),P[0]++}return C.sigBytes=k*4,C}});l.PBKDF2=function(v,w,B){return y.create(B).compute(v,w)}})(),s.PBKDF2})})(tc)),tc.exports}var nc={exports:{}},_b=nc.exports,wm;function ao(){return wm||(wm=1,(function(r,a){(function(s,l,f){r.exports=l(ft(),fx(),Yc())})(_b,function(s){return(function(){var l=s,f=l.lib,d=f.Base,m=f.WordArray,h=l.algo,x=h.MD5,p=h.EvpKDF=d.extend({cfg:d.extend({keySize:128/32,hasher:x,iterations:1}),init:function(y){this.cfg=this.cfg.extend(y)},compute:function(y,v){for(var w,B=this.cfg,R=B.hasher.create(),C=m.create(),E=C.words,T=B.keySize,P=B.iterations;E.length<T;){w&&R.update(w),w=R.update(y).finalize(v),R.reset();for(var k=1;k<P;k++)w=R.finalize(w),R.reset();C.concat(w)}return C.sigBytes=T*4,C}});l.EvpKDF=function(y,v,w){return p.create(w).compute(y,v)}})(),s.EvpKDF})})(nc)),nc.exports}var rc={exports:{}},wb=rc.exportsLine truncated
* Counter block mode compatible with Dr Brian Gladman fileenc.c
* derived from CryptoJS.mode.CTR
* Jan Hruby jhruby.web@gmail.com
*/return s.mode.CTRGladman=(function(){var l=s.lib.BlockCipherMode.extend();function f(h){if((h>>24&255)===255){var x=h>>16&255,p=h>>8&255,y=h&255;x===255?(x=0,p===255?(p=0,y===255?y=0:++y):++p):++x,h=0,h+=x<<16,h+=p<<8,h+=y}else h+=1<<24;return h}function d(h){return(h[0]=f(h[0]))===0&&(h[1]=f(h[1])),h}var m=l.Encryptor=l.extend({processBlock:function(h,x){var p=this._cipher,y=p.blockSize,v=this._iv,w=this._counter;v&&(w=this._counter=v.slice(0),this._iv=void 0),d(w);var B=w.slice(0);p.encryptBlock(B,0);for(var R=0;R<y;R++)h[x+R]^=B[R]}});return l.Decryptor=m,l})(),s.mode.CTRGladman})})(sc)),sc.exports}var ac={exports:{}},Pb=ac.exports,Sm;function Tb(){return Sm||(Sm=1,(function(r,a){(function(s,l,f){r.exports=l(ft(),fn())})(Pb,function(s){return s.mode.OFB=(function(){var l=s.lib.BlockCipherMode.extend(),f=l.Encryptor=l.extend({processBlock:function(d,m){var h=this._cipher,x=h.blockSize,p=this._iv,y=this._keystream;p&&(y=this._keystream=p.slice(0),this._iv=void 0),h.encryptBlock(y,0);for(var v=0;v<x;v++)d[m+v]^=y[v]}});return l.Decryptor=f,l})(),s.mode.OFB})})(ac)),ac.exports}var lc={exports:{}},Db=lc.exports,Bm;function Rb(){return Bm||(Bm=1,(function(r,a){(function(s,l,f){r.exports=l(ft(),fn())})(Db,function(s){return s.mode.ECB=(function(){var l=s.lib.BlockCipherMode.extend();return l.Encryptor=l.extend({processBlock:function(f,d){this._cipher.encryptBlock(f,d)}}),l.Decryptor=l.extend({processBlock:function(f,d){this._cipher.decryptBlock(f,d)}}),l})(),s.mode.ECB})})(lc)),lc.exports}var uc={exports:{}},Fb=uc.exports,Pm;function Nb(){return Pm||(Pm=1,(function(r,a){(function(s,l,f){r.exports=l(ft(),fn())})(Fb,function(s){return s.pad.AnsiX923={pad:function(l,f){var d=l.sigBytes,m=f*4,h=m-d%m,x=d+h-1;l.clamp(),l.words[x>>>2]|=h<<24-x%4*8,l.sigBytes+=h},unpad:function(l){var f=l.words[l.sigBytes-1>>>2]&255;l.sigBytes-=f}},s.pad.Ansix923})})(uc)),uc.exports}var cc={exports:{}},Lb=cc.exports,Tm;function Mb(){return Tm||(Tm=1,(function(r,a){(function(s,l,f){r.exports=l(ft(),fn())})(Lb,function(s){return s.pad.Iso10126={pad:function(l,f){var d=f*4,m=d-l.sigBytes%d;l.concat(s.lib.WordArray.random(m-1)).concat(s.lib.WordArray.create([m<<24],1))},unpad:function(l){var f=l.words[l.sigBytes-1>>>2]&255;l.sigBytes-=f}},s.pad.Iso10126})})(cc)),cc.exports}var dc={exports:{}},Ib=dc.exports,Dm;function Ob(){return Dm||(Dm=1,(function(r,a){(function(s,l,f){r.exports=l(ft(),fn())})(Ib,function(s){return s.pad.Iso97971={pad:function(l,f){l.concat(s.lib.WordArray.create([2147483648],1)),s.pad.ZeroPadding.pad(l,f)},unpad:function(l){s.pad.ZeroPadding.unpad(l),l.sigBytes--}},s.pad.Iso97971})})(dc)),dc.exports}var fc={exports:{}},zb=fc.exports,Rm;function jb(){return Rm||(Rm=1,(function(r,a){(function(s,l,f){r.exports=l(ft(),fn())})(zb,function(s){return s.pad.ZeroPadding={pad:function(l,f){var d=f*4;l.clamp(),l.sigBytes+=d-(l.sigBytes%d||d)},unpad:function(l){for(var f=l.words,d=l.sigBytes-1,d=l.sigBytes-1;d>=0;d--)if(f[d>>>2]>>>24-d%4*8&255){l.sigBytes=d+1;break}}},s.pad.ZeroPadding})})(fc)),fc.exports}var hc={exports:{}},Hb=hc.exports,Fm;function Vb(){return Fm||(Fm=1,(function(r,a){(function(s,l,f){r.exports=l(ft(),fn())})(Hb,function(s){return s.pad.NoPadding={pad:function(){},unpad:function(){}},s.pad.NoPadding})})(hc)),hc.exports}var pc={exports:{}},Ub=pc.exports,Nm;function Zb(){return Nm||(Nm=1,(function(r,a){(function(s,l,f){r.exports=l(ft(),fn())})(Ub,function(s){return(function(l){var f=s,d=f.lib,m=d.CipherParams,h=f.enc,x=h.Hex,p=f.format;p.Hex={stringify:function(y){return y.ciphertext.toString(x)},parse:function(y){var v=x.parse(y);return m.create({ciphertext:v})}}})(),s.format.Hex})})(pc)),pc.exports}var mc={exports:{}},Wb=mc.exports,Lm;function qb(){return Lm||(Lm=1,(function(r,a){(function(s,l,f){r.exports=l(ft(),Wo(),qo(),ao(),fn())})(Wb,function(s){return(function(){var l=s,f=l.lib,d=f.BlockCipher,m=l.algo,h=[],x=[],p=[],y=[],v=[],w=[],B=[],R=[],C=[],E=[];(function(){for(var k=[],N=0;N<256;N++)N<128?k[N]=N<<1:k[N]=N<<1^283;for(var I=0,z=0,N=0;N<256;N++){var j=z^z<<1^z<<2^z<<3^z<<4;j=j>>>8^j&255^99,h[I]=j,x[j]=I;var H=k[I],$=k[H],U=k[$],G=k[j]*257^j*16843008;p[I]=G<<24|G>>>8,y[I]=G<<16|G>>>16,v[I]=G<<8|G>>>24,w[I]=G;var G=U*16843009^$*65537^H*257^I*16843008;B[j]=G<<24|G>>>8,R[j]=G<<16|G>>>16,C[j]=G<<8|G>>>24,E[j]=G,I?(I=H^k[k[k[U^H]]],z^=k[k[z]]):I=z=1}})();var T=[0,1,2,4,8,16,32,64,128,27,54],P=m.AES=d.extend({_doReset:function(){var k;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var N=this._keyPriorReset=this._key,I=N.words,z=N.sigBytes/4,j=this._nRounds=z+6,H=(j+1)*4,$=this._keySchedule=[],U=0;U<H;U++)U<z?$[U]=I[U]:(k=$[U-1],U%z?z>6&&U%z==4&&(k=h[k>>>24]<<24|h[k>>>16&255]<<16|h[k>>>8&255]<<8|h[k&255]):(k=k<<8|k>>>24,k=h[k>>>24]<<24|h[k>>>16&255]<<16|h[k>>>8&255]<<8|h[k&255],k^=T[U/z|0]<<24),$[U]=$[U-z]^k);for(var G=this._invKeySchedule=[],ne=0;ne<H;ne++){var U=H-ne;if(ne%4)var k=$[U];else var k=$[U-4];ne<4||U<=4?G[ne]=k:G[ne]=B[h[k>>>24]]^R[h[k>>>16&255]]^C[h[k>>>8&255]]^E[h[k&255]]}}},encryLine truncated
• Timestamp (4 bytes) - send time as unix timestamp
• Request Type (1 byte) - type of request (GetStats, GetTelemetryData, etc.)
• Request Data (remaining bytes) - additional request-specific data`,startByte:h+x,endByte:h+f.length-1,value:w});const B={type:r.PayloadType.Request,version:r.PayloadVersion.Version1,isValid:!0,timestamp:0,requestType:r.RequestType.GetStats,requestData:"",destinationHash:p,sourceHash:y,cipherMac:v,ciphertext:w};return d!=null&&d.includeSegments&&(B.segments=m),B}catch(m){return{type:r.PayloadType.Request,version:r.PayloadVersion.Version1,isValid:!1,errors:[m instanceof Error?m.message:"Failed to decode request payload"],timestamp:0,requestType:r.RequestType.GetStats,requestData:"",destinationHash:"",sourceHash:"",cipherMac:"",ciphertext:""}}}}return Wa.RequestPayloadDecoder=s,Wa}var qa={},iA;function BC(){if(iA)return qa;iA=1,Object.defineProperty(qa,"__esModule",{value:!0}),qa.ResponsePayloadDecoder=void 0;const r=ir(),a=gn();class s{static decode(f,d){try{if(f.length<4){const R={type:r.PayloadType.Response,version:r.PayloadVersion.Version1,isValid:!1,errors:["Response payload too short (minimum 4 bytes: dest + source + MAC)"],destinationHash:"",sourceHash:"",cipherMac:"",ciphertext:"",ciphertextLength:0};return d!=null&&d.includeSegments&&(R.segments=[{name:"Invalid Response Data",description:"Response payload too short (minimum 4 bytes required)",startByte:d.segmentOffset||0,endByte:(d.segmentOffset||0)+f.length-1,value:(0,a.bytesToHex)(f)}]),R}const m=[],h=(d==null?void 0:d.segmentOffset)||0;let x=0;const p=(0,a.byteToHex)(f[x]);d!=null&&d.includeSegments&&m.push({name:"Destination Hash",description:"First byte of destination node public key",startByte:h+x,endByte:h+x,value:p}),x+=1;const y=(0,a.byteToHex)(f[x]);d!=null&&d.includeSegments&&m.push({name:"Source Hash",description:"First byte of source node public key",startByte:h+x,endByte:h+x,value:y}),x+=1;const v=(0,a.bytesToHex)(f.subarray(x,x+2));d!=null&&d.includeSegments&&m.push({name:"Cipher MAC",description:"MAC for encrypted data in next field",startByte:h+x,endByte:h+x+1,value:v}),x+=2;const w=(0,a.bytesToHex)(f.subarray(x));d!=null&&d.includeSegments&&f.length>x&&m.push({name:"Ciphertext",description:"Encrypted response data (tag + content)",startByte:h+x,endByte:h+f.length-1,value:w});const B={type:r.PayloadType.Response,version:r.PayloadVersion.Version1,isValid:!0,destinationHash:p,sourceHash:y,cipherMac:v,ciphertext:w,ciphertextLength:f.length-4};return d!=null&&d.includeSegments&&(B.segments=m),B}catch(m){return{type:r.PayloadType.Response,version:r.PayloadVersion.Version1,isValid:!1,errors:[m instanceof Error?m.message:"Failed to decode response payload"],destinationHash:"",sourceHash:"",cipherMac:"",ciphertext:"",ciphertextLength:0}}}}return qa.ResponsePayloadDecoder=s,qa}var Ga={},oA;function PC(){if(oA)return Ga;oA=1,Object.defineProperty(Ga,"__esModule",{value:!0}),Ga.AnonRequestPayloadDecoder=void 0;const r=ir(),a=gn();class s{static decode(f,d){try{if(f.length<35){const R={type:r.PayloadType.AnonRequest,version:r.PayloadVersion.Version1,isValid:!1,errors:["AnonRequest payload too short (minimum 35 bytes: dest + public key + MAC)"],destinationHash:"",senderPublicKey:"",cipherMac:"",ciphertext:"",ciphertextLength:0};return d!=null&&d.includeSegments&&(R.segments=[{name:"Invalid AnonRequest Data",description:"AnonRequest payload too short (minimum 35 bytes required: 1 for dest hash + 32 for public key + 2 for MAC)",startByte:d.segmentOffset||0,endByte:(d.segmentOffset||0)+f.length-1,value:(0,a.bytesToHex)(f)}]),R}const m=[],h=(d==null?void 0:d.segmentOffset)||0;let x=0;const p=(0,a.byteToHex)(f[0]);d!=null&&d.includeSegments&&m.push({name:"Destination Hash",description:`First byte of destination node public key: 0x${p}`,startByte:h+x,endByte:h+x,value:p}),x+=1;const y=(0,a.bytesToHex)(f.subarray(1,33));d!=null&&d.includeSegments&&m.push({name:"Sender Public Key",description:"Ed25519 public key of the sender (32 bytes)",startByte:h+x,endByte:h+x+31,value:y}),x+=32;const v=(0,a.bytesToHex)(f.subarray(33,35));d!=null&&d.includeSegments&&m.push({name:"Cipher MAC",description:"MAC for encrypted data verification (2 bytes)",startByte:h+x,endByte:h+x+1,value:v}),x+=2;const w=(0,a.bytesToHex)(f.subarray(35));d!=null&&d.includeSegments&&f.length>35&&m.push({name:"Ciphertext",description:`Encrypted message data (${f.length-35} bytes). Contains encrypted plaintext with this structure:
• Timestamp (4 bytes) - send time as unix timestamp
• Sync Timestamp (4 bytes) - room server only, sender's "sync messages SINCE x" timestamp
• Password (remaining bytes) - password for repeater/room`,startByte:h+x,endByte:h+f.length-1,value:w});const B={type:r.PayloadType.AnonRequest,version:r.PayloadVersion.Version1,isValid:!0,destinationHash:p,senderPublicKey:y,cipherMac:v,ciphertext:w,ciphertextLength:f.length-35};return d!=null&&d.includeSegments&&(B.segments=m),B}catch(m){return{type:r.PayloadType.AnonRequest,version:r.PayloadVersion.Version1,isValid:!1,errors:[m instanceof Error?m.message:"Failed to decode AnonRequest payload"],destinationHash:"",senderPublicKey:"",cipherMac:"",ciphertext:"",ciphertextLength:0}}}}return Ga.AnonRequestPayloadDecoder=s,Ga}var Qa={},sA;function TC(){if(sA)return Qa;sA=1,Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.AckPayloadDecoder=void 0;const r=ir(),a=gn();class s{static decode(f,d){try{if(f.length<4){const y={type:r.PayloadType.Ack,version:r.PayloadVersion.Version1,isValid:!1,errors:["Ack payload too short (minimum 4 bytes for checksum)"],checksum:""};return d!=null&&d.includeSegments&&(y.segments=[{name:"Invalid Ack Data",description:"Ack payload too short (minimum 4 bytes required for checksum)",startByte:d.segmentOffset||0,endByte:(d.segmentOffset||0)+f.length-1,value:(0,a.bytesToHex)(f)}]),y}const m=[],h=(d==null?void 0:d.segmentOffset)||0,x=(0,a.bytesToHex)(f.subarray(0,4));d!=null&&d.includeSegments&&m.push({name:"Checksum",description:`CRC checksum of message timestamp, text, and sender pubkey: 0x${x}`,startByte:h,endByte:h+3,value:x}),d!=null&&d.includeSegments&&f.length>4&&m.push({name:"Additional Data",description:"Extra data in Ack payload",startByte:h+4,endByte:h+f.length-1,value:(0,a.bytesToHex)(f.subarray(4))});const p={type:r.PayloadType.Ack,version:r.PayloadVersion.Version1,isValid:!0,checksum:x};return d!=null&&d.includeSegments&&(p.segments=m),p}catch(m){return{type:r.PayloadType.Ack,version:r.PayloadVersion.Version1,isValid:!1,errors:[m instanceof Error?m.message:"Failed to decode Ack payload"],checksum:""}}}}return Qa.AckPayloadDecoder=s,Qa}var Ka={},aA;function DC(){if(aA)return Ka;aA=1,Object.defineProperty(Ka,"__esModule",{value:!0}),Ka.PathPayloadDecoder=void 0;const r=ir(),a=gn();class s{static decode(f){try{if(f.length<2)return{type:r.PayloadType.Path,version:r.PayloadVersion.Version1,isValid:!1,errors:["Path payload too short (minimum 2 bytes: path length + extra type)"],pathLength:0,pathHashes:[],extraType:0,extraData:""};const d=f[0];if(f.length<1+d+1)return{type:r.PayloadType.Path,version:r.PayloadVersion.Version1,isValid:!1,errors:[`Path payload too short (need ${1+d+1} bytes for path length + path + extra type)`],pathLength:d,pathHashes:[],extraType:0,extraData:""};const m=[];for(let p=0;p<d;p++)m.push((0,a.byteToHex)(f[1+p]));const h=f[1+d];let x="";return f.length>1+d+1&&(x=(0,a.bytesToHex)(f.subarray(1+d+1))),{type:r.PayloadType.Path,version:r.PayloadVersion.Version1,isValid:!0,pathLength:d,pathHashes:m,extraType:h,extraData:x}}catch(d){return{type:r.PayloadType.Path,version:r.PayloadVersion.Version1,isValid:!1,errors:[d instanceof Error?d.message:"Failed to decode Path payload"],pathLength:0,pathHashes:[],extraType:0,extraData:""}}}}return Ka.PathPayloadDecoder=s,Ka}var $a={},lA;function RC(){if(lA)return $a;lA=1,Object.defineProperty($a,"__esModule",{value:!0}),$a.TextMessagePayloadDecoder=void 0;const r=ir(),a=gn();class s{static decode(f,d){try{if(f.length<4){const R={type:r.PayloadType.TextMessage,version:r.PayloadVersion.Version1,isValid:!1,errors:["TextMessage payload too short (minimum 4 bytes: dest + source + MAC)"],destinationHash:"",sourceHash:"",cipherMac:"",ciphertext:"",ciphertextLength:0};return d!=null&&d.includeSegments&&(R.segments=[{name:"Invalid TextMessage Data",description:"TextMessage payload too short (minimum 4 bytes required)",startByte:d.segmentOffset||0,endByte:(d.segmentOffset||0)+f.length-1,value:(0,a.bytesToHex)(f)}]),R}const m=[],h=(d==null?void 0:d.segmentOffset)||0;let x=0;const p=(0,a.byteToHex)(f[x]);d!=null&&d.includeSegments&&m.push({name:"Destination Hash",description:"First byte of destination node public key",startByte:h+x,endByte:h+x,value:p}),x+=1;const y=(0,a.byteToHex)(f[x]);d!=null&&d.includeSegments&&m.push({name:"Source Hash",description:"First byte of source node public key",startByte:h+x,endByte:h+x,value:y}),x+=1;const v=(0,a.bytesToHex)(f.subarray(x,x+2));d!=null&&d.includeSegments&&m.push({name:"Cipher MAC",description:"MAC for encrypted data in next field",startByte:h+x,endByte:h+x+1,value:v}),x+=2;const w=(0,a.bytesToHex)(f.subarray(x));d!=null&&d.includeSegments&&f.length>x&&m.push({name:"Ciphertext",description:"Encrypted message data (timestamp + message text)",startByte:h+x,endByte:h+f.length-1,value:w});const B={type:r.PayloadType.TextMessage,version:r.PayloadVersion.Version1,isValid:!0,destinationHash:p,sourceHash:y,cipherMac:v,ciphertext:w,ciphertextLength:f.length-4};return d!=null&&d.includeSegments&&(B.segments=m),B}catch(m){return{type:r.PayloadType.TextMessage,version:r.PayloadVersion.Version1,i Line truncated
// SHA256 round constants
const K: array<u32, 64> = array<u32, 64>(
0x428a2f98u, 0x71374491u, 0xb5c0fbcfu, 0xe9b5dba5u, 0x3956c25bu, 0x59f111f1u, 0x923f82a4u, 0xab1c5ed5u,
0xd807aa98u, 0x12835b01u, 0x243185beu, 0x550c7dc3u, 0x72be5d74u, 0x80deb1feu, 0x9bdc06a7u, 0xc19bf174u,
0xe49b69c1u, 0xefbe4786u, 0x0fc19dc6u, 0x240ca1ccu, 0x2de92c6fu, 0x4a7484aau, 0x5cb0a9dcu, 0x76f988dau,
0x983e5152u, 0xa831c66du, 0xb00327c8u, 0xbf597fc7u, 0xc6e00bf3u, 0xd5a79147u, 0x06ca6351u, 0x14292967u,
0x27b70a85u, 0x2e1b2138u, 0x4d2c6dfcu, 0x53380d13u, 0x650a7354u, 0x766a0abbu, 0x81c2c92eu, 0x92722c85u,
0xa2bfe8a1u, 0xa81a664bu, 0xc24b8b70u, 0xc76c51a3u, 0xd192e819u, 0xd6990624u, 0xf40e3585u, 0x106aa070u,
0x19a4c116u, 0x1e376c08u, 0x2748774cu, 0x34b0bcb5u, 0x391c0cb3u, 0x4ed8aa4au, 0x5b9cca4fu, 0x682e6ff3u,
0x748f82eeu, 0x78a5636fu, 0x84c87814u, 0x8cc70208u, 0x90befffau, 0xa4506cebu, 0xbef9a3f7u, 0xc67178f2u
);
// Character lookup table (a-z = 0-25, 0-9 = 26-35, dash = 36)
const CHARS: array<u32, 37> = array<u32, 37>(
0x61u, 0x62u, 0x63u, 0x64u, 0x65u, 0x66u, 0x67u, 0x68u, 0x69u, 0x6au, // a-j
0x6bu, 0x6cu, 0x6du, 0x6eu, 0x6fu, 0x70u, 0x71u, 0x72u, 0x73u, 0x74u, // k-t
0x75u, 0x76u, 0x77u, 0x78u, 0x79u, 0x7au, // u-z
0x30u, 0x31u, 0x32u, 0x33u, 0x34u, 0x35u, 0x36u, 0x37u, 0x38u, 0x39u, // 0-9
0x2du // dash
);
struct Params {
target_channel_hash: u32,
batch_offset: u32,
name_length: u32,
batch_size: u32,
target_mac: u32, // First 2 bytes of target MAC (in high 16 bits)
ciphertext_words: u32, // Number of 32-bit words in ciphertext
ciphertext_len_bits: u32, // Length of ciphertext in bits
verify_mac: u32, // 1 to verify MAC, 0 to skip
}
@group(0) @binding(0) var<uniform> params: Params;
@group(0) @binding(1) var<storage, read_write> match_count: atomic<u32>;
@group(0) @binding(2) var<storage, read_write> match_indices: array<u32>;
@group(0) @binding(3) var<storage, read> ciphertext: array<u32>; // Ciphertext data
fn rotr(x: u32, n: u32) -> u32 {
return (x >> n) | (x << (32u - n));
}
fn ch(x: u32, y: u32, z: u32) -> u32 {
return (x & y) ^ (~x & z);
}
fn maj(x: u32, y: u32, z: u32) -> u32 {
return (x & y) ^ (x & z) ^ (y & z);
}
fn sigma0(x: u32) -> u32 {
return rotr(x, 2u) ^ rotr(x, 13u) ^ rotr(x, 22u);
}
fn sigma1(x: u32) -> u32 {
return rotr(x, 6u) ^ rotr(x, 11u) ^ rotr(x, 25u);
}
fn gamma0(x: u32) -> u32 {
return rotr(x, 7u) ^ rotr(x, 18u) ^ (x >> 3u);
}
fn gamma1(x: u32) -> u32 {
return rotr(x, 17u) ^ rotr(x, 19u) ^ (x >> 10u);
}
// Convert index to room name bytes, returns the hash as a u32 for the first byte check
fn index_to_room_name(idx: u32, length: u32, msg: ptr<function, array<u32, 16>>) -> bool {
// Message starts with '#' (0x23)
var byte_pos = 0u;
var word_idx = 0u;
var current_word = 0x23000000u; // '#' in big-endian position 0
byte_pos = 1u;
var remaining = idx;
var prev_was_dash = false;
// Generate room name from index
for (var i = 0u; i < length; i++) {
let char_count = select(37u, 36u, i == 0u || i == length - 1u); // no dash at start/end
var char_idx = remaining % char_count;
remaining = remaining / char_count;
// Check for consecutive dashes (invalid)
let is_dash = char_idx == 36u && i > 0u && i < length - 1u;
if (is_dash && prev_was_dash) {
return false; // Invalid: consecutive dashes
}
prev_was_dash = is_dash;
// Map char index to actual character
let c = CHARS[char_idx];
// Pack byte into current word (big-endian)
let shift = (3u - byte_pos % 4u) * 8u;
if (byte_pos % 4u == 0u && byte_pos > 0u) {
(*msg)[word_idx] = current_word;
word_idx = word_idx + 1u;
current_word = 0u;
}
current_word = current_word | (c << shift);
byte_pos = byte_pos + 1u;
}
// Add padding: 0x80 followed by zeros, then length in bits
let msg_len_bits = (length + 1u) * 8u; // +1 for '#'
// Add 0x80 padding byte
let shift = (3u - byte_pos % 4u) * 8u;
if (byte_pos % 4u == 0u) {
(*msg)[word_idx] = current_word;
word_idx = word_idx + 1u;
current_word = 0x80000000u;
} else {
current_word = current_word | (0x80u << shift);
}
byte_pos = byte_pos + 1u;
// Store current word
if (byte_pos % 4u == 0u || word_idx < 14u) {
(*msg)[word_idx] = current_word;
word_idx = word_idx + 1u;
}
// Zero-fill until word 14
for (var i = word_idx; i < 14u; i++) {
(*msg)[i] = 0u;
}
// Length in bits (64-bit, but we only use lower 32 bits for short messages)
(*msg)[14u] = 0u;
(*msg)[15u] = msg_len_bits;
return true;
}
fn sha256_block(msg: ptr<function, array<u32, 16>>) -> array<u32, 8> {
// Initialize hash values
var h: array<u32, 8> = array<u32, 8>(
0x6a09e667u, 0xbb67ae85u, 0x3c6ef372u, 0xa54ff53au,
0x510e527fu, 0x9b05688cu, 0x1f83d9abu, 0x5be0cd19u
);
// Message schedule
var w: array<u32, 64>;
for (var i = 0u; i < 16u; i++) {
w[i] = (*msg)[i];
}
for (var i = 16u; i < 64u; i++) {
w[i] = gamma1(w[i-2u]) + w[i-7u] + gamma0(w[i-15u]) + w[i-16u];
}
// Compression
var a = h[0]; var b = h[1]; var c = h[2]; var d = h[3];
var e = h[4]; var f = h[5]; var g = h[6]; var hh = h[7];
for (var i = 0u; i < 64u; i++) {
let t1 = hh + sigma1(e) + ch(e, f, g) + K[i] + w[i];
let t2 = sigma0(a) + maj(a, b, c);
hh = g; g = f; f = e; e = d + t1;
d = c; c = b; b = a; a = t1 + t2;
}
h[0] = h[0] + a; h[1] = h[1] + b; h[2] = h[2] + c; h[3] = h[3] + d;
h[4] = h[4] + e; h[5] = h[5] + f; h[6] = h[6] + g; h[7] = h[7] + hh;
return h;
}
// Compute SHA256 of the key (16 bytes) to get channel hash
fn sha256_key(key: array<u32, 4>) -> u32 {
var msg: array<u32, 16>;
// Key bytes (16 bytes = 4 words)
msg[0] = key[0];
msg[1] = key[1];
msg[2] = key[2];
msg[3] = key[3];
// Padding: 0x80 followed by zeros
msg[4] = 0x80000000u;
for (var i = 5u; i < 14u; i++) {
msg[i] = 0u;
}
// Length: 128 bits
msg[14] = 0u;
msg[15] = 128u;
let hash = sha256_block(&msg);
// Return first byte of hash (big-endian)
return hash[0] >> 24u;
}
// HMAC-SHA256 for MAC verification
// Key is 16 bytes (4 words), padded to 32 bytes with zeros for MeshCore
// Returns first 2 bytes of HMAC (as u32 in high 16 bits)
fn hmac_sha256_mac(key: array<u32, 4>, ciphertext_len: u32) -> u32 {
// HMAC: H((K' ^ opad) || H((K' ^ ipad) || message))
// K' is 64 bytes (32 bytes key + 32 bytes zero padding for MeshCore, then padded to 64)
// ipad = 0x36 repeated, opad = 0x5c repeated
// Build padded key (64 bytes = 16 words)
// MeshCore uses 32-byte secret: 16-byte key + 16 zero bytes
var k_pad: array<u32, 16>;
k_pad[0] = key[0];
k_pad[1] = key[1];
k_pad[2] = key[2];
k_pad[3] = key[3];
for (var i = 4u; i < 16u; i++) {
k_pad[i] = 0u;
}
// Inner hash: SHA256((K' ^ ipad) || message)
// First block: K' ^ ipad (64 bytes)
var inner_block: array<u32, 16>;
for (var i = 0u; i < 16u; i++) {
inner_block[i] = k_pad[i] ^ 0x36363636u;
}
// Initialize hash state with first block
var h: array<u32, 8> = sha256_block(&inner_block);
// Process ciphertext blocks (continuing from h state)
let ciphertext_words = params.ciphertext_words;
var word_idx = 0u;
// Process full 64-byte blocks of ciphertext
while (word_idx + 16u <= ciphertext_words) {
var block: array<u32, 16>;
for (var i = 0u; i < 16u; i++) {
block[i] = ciphertext[word_idx + i];
}
h = sha256_block_continue(&block, h);
word_idx = word_idx + 16u;
}
// Final block with remaining ciphertext + padding
var final_block: array<u32, 16>;
var remaining = ciphertext_words - word_idx;
for (var i = 0u; i < 16u; i++) {
if (i < remaining) {
final_block[i] = ciphertext[word_idx + i];
} else if (i == remaining) {
// Add 0x80 padding
final_block[i] = 0x80000000u;
} else {
final_block[i] = 0u;
}
}
// Add length (64 bytes of ipad + ciphertext length)
let total_bits = 512u + params.ciphertext_len_bits;
if (remaining < 14u) {
final_block[14] = 0u;
final_block[15] = total_bits;
h = sha256_block_continue(&final_block, h);
} else {
// Need extra block for length
h = sha256_block_continue(&final_block, h);
var len_block: array<u32, 16>;
for (var i = 0u; i < 14u; i++) {
len_block[i] = 0u;
}
len_block[14] = 0u;
len_block[15] = total_bits;
h = sha256_block_continue(&len_block, h);
}
let inner_hash = h;
// Outer hash: SHA256((K' ^ opad) || inner_hash)
var outer_block: array<u32, 16>;
for (var i = 0u; i < 16u; i++) {
outer_block[i] = k_pad[i] ^ 0x5c5c5c5cu;
}
h = sha256_block(&outer_block);
// Second block: inner_hash (32 bytes) + padding
var hash_block: array<u32, 16>;
for (var i = 0u; i < 8u; i++) {
hash_block[i] = inner_hash[i];
}
hash_block[8] = 0x80000000u;
for (var i = 9u; i < 14u; i++) {
hash_block[i] = 0u;
}
hash_block[14] = 0u;
hash_block[15] = 512u + 256u; // 64 bytes opad + 32 bytes inner hash
h = sha256_block_continue(&hash_block, h);
// Return first 2 bytes (high 16 bits of first word)
return h[0] & 0xFFFF0000u;
}
// SHA256 block computation continuing from existing state
fn sha256_block_continue(msg: ptr<function, array<u32, 16>>, h_in: array<u32, 8>) -> array<u32, 8> {
var h = h_in;
// Message schedule
var w: array<u32, 64>;
for (var i = 0u; i < 16u; i++) {
w[i] = (*msg)[i];
}
for (var i = 16u; i < 64u; i++) {
w[i] = gamma1(w[i-2u]) + w[i-7u] + gamma0(w[i-15u]) + w[i-16u];
}
// Compression
var a = h[0]; var b = h[1]; var c = h[2]; var d = h[3];
var e = h[4]; var f = h[5]; var g = h[6]; var hh = h[7];
for (var i = 0u; i < 64u; i++) {
let t1 = hh + sigma1(e) + ch(e, f, g) + K[i] + w[i];
let t2 = sigma0(a) + maj(a, b, c);
hh = g; g = f; f = e; e = d + t1;
d = c; c = b; b = a; a = t1 + t2;
}
h[0] = h[0] + a; h[1] = h[1] + b; h[2] = h[2] + c; h[3] = h[3] + d;
h[4] = h[4] + e; h[5] = h[5] + f; h[6] = h[6] + g; h[7] = h[7] + hh;
return h;
}
// Process a single candidate and record match if found
fn process_candidate(name_idx: u32) {
// Generate message for this room name
var msg: array<u32, 16>;
let valid = index_to_room_name(name_idx, params.name_length, &msg);
if (!valid) {
return;
}
// Compute SHA256("#roomname") - this gives us the key
let key_hash = sha256_block(&msg);
// Take first 16 bytes (4 words) as the key
var key: array<u32, 4>;
key[0] = key_hash[0];
key[1] = key_hash[1];
key[2] = key_hash[2];
key[3] = key_hash[3];
// Compute SHA256(key) to get channel hash
let channel_hash = sha256_key(key);
// Check if channel hash matches target
if (channel_hash != params.target_channel_hash) {
return;
}
// Channel hash matches - verify MAC if enabled
if (params.verify_mac == 1u) {
let computed_mac = hmac_sha256_mac(key, params.ciphertext_len_bits);
if (computed_mac != params.target_mac) {
return;
}
}
// Found a match - record the index
let match_idx = atomicAdd(&match_count, 1u);
if (match_idx < 1024u) { // Limit stored matches
match_indices[match_idx] = name_idx;
}
}
// Each thread processes 16 candidates to amortize thread overhead
const CANDIDATES_PER_THREAD: u32 = 16u;
@compute @workgroup_size(256)
fn main(@builtin(global_invocation_id) global_id: vec3<u32>) {
let base_idx = global_id.x * CANDIDATES_PER_THREAD;
for (var i = 0u; i < CANDIDATES_PER_THREAD; i++) {
let idx = base_idx + i;
if (idx >= params.batch_size) {
return;
}
let name_idx = params.batch_offset + idx;
process_candidate(name_idx);
}
}
`}async init(){if(!navigator.gpu)return console.warn("WebGPU not supported"),!1;try{const a=await navigator.gpu.requestAdapter();if(!a)return console.warn("No GPU adapter found"),!1;this.device=await a.requestDevice(),this.bindGroupLayout=this.device.createBindGroupLayout({entries:[{binding:0,visibility:GPUShaderStage.COMPUTE,buffer:{type:"uniform"}},{binding:1,visibility:GPUShaderStage.COMPUTE,buffer:{type:"storage"}},{binding:2,visibility:GPUShaderStage.COMPUTE,buffer:{type:"storage"}},{binding:3,visibility:GPUShaderStage.COMPUTE,buffer:{type:"read-only-storage"}}]}),this.paramsBuffer=this.device.createBuffer({size:32,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST}),this.matchCountBuffer=this.device.createBuffer({size:4,usage:GPUBufferUsage.STORAGE|GPUBufferUsage.COPY_SRC|GPUBufferUsage.COPY_DST}),this.matchIndicesBuffer=this.device.createBuffer({size:1024*4,usage:GPUBufferUsage.STORAGE|GPUBufferUsage.COPY_SRC});for(let f=0;f<2;f++)this.matchCountReadBuffers[f]=this.device.createBuffer({size:4,usage:GPUBufferUsage.MAP_READ|GPUBufferUsage.COPY_DST}),this.matchIndicesReadBuffers[f]=this.device.createBuffer({size:1024*4,usage:GPUBufferUsage.MAP_READ|GPUBufferUsage.COPY_DST});const s=this.device.createShaderModule({code:this.shaderCode}),l=this.device.createPipelineLayout({bindGroupLayouts:[this.bindGroupLayout]});return this.pipeline=this.device.createComputePipeline({layout:l,compute:{module:s,entryPoint:"main"}}),!0}catch(a){return console.error("WebGPU initialization failed:",a),!1}}isAvailable(){return this.device!==null&&this.pipeline!==null}indexToRoomName(a,s){return Vo(s,a)}countNamesForLength(a){return tl(a)}async runBatch(a,s,l,f,d,m){if(!this.device||!this.pipeline||!this.bindGroupLayout||!this.paramsBuffer||!this.matchCountBuffer||!this.matchIndicesBuffer||!this.matchCountReadBuffers[0]||!this.matchCountReadBuffers[1]||!this.matchIndicesReadBuffers[0]||!this.matchIndicesReadBuffers[1])throw new Error("GPU not initialized");const h=this.currentReadBufferIndex;this.currentReadBufferIndex=1-this.currentReadBufferIndex;const x=this.matchCountReadBuffers[h],p=this.matchIndicesReadBuffers[h],y=d&&m?1:0;let v,w=0,B=0;if(y){const I=new Uint8Array(d.length/2);for(let U=0;U<I.length;U++)I[U]=parseInt(d.substr(U*2,2),16);w=I.length*8;const z=Math.ceil(I.length/4)*4,j=new Uint8Array(z);j.set(I),v=new Uint32Array(z/4);for(let U=0;U<v.length;U++)v[U]=j[U*4]<<24|j[U*4+1]<<16|j[U*4+2]<<8|j[U*4+3];const H=parseInt(m.substr(0,2),16),$=parseInt(m.substr(2,2),16);B=H<<24|$<<16}else v=new Uint32Array([0]);const R=Math.max(v.length*4,4);(!this.ciphertextBuffer||this.ciphertextBufferSize<R)&&(this.ciphertextBuffer&&this.ciphertextBuffer.destroy(),this.ciphertextBuffer=this.device.createBuffer({size:R,usage:GPUBufferUsage.STORAGE|GPUBufferUsage.COPY_DST}),this.ciphertextBufferSize=R,this.bindGroupDirty=!0);const C=new Uint32Array([a,l,s,f,B,v.length,w,y]);this.device.queue.writeBuffer(this.paramsBuffer,0,C),this.device.queue.writeBuffer(this.ciphertextBuffer,0,v),this.device.queue.writeBuffer(this.matchCountBuffer,0,Jc.ZERO_DATA),(this.bindGroupDirty||!this.bindGroup)&&(this.bindGroup=this.device.createBindGroup({layout:this.bindGroupLayout,entries:[{binding:0,resource:{buffer:this.paramsBuffer}},{binding:1,resource:{buffer:this.matchCountBuffer}},{binding:2,resource:{buffer:this.matchIndicesBuffer}},{binding:3,resource:{buffer:this.ciphertextBuffer}}]}),this.bindGroupDirty=!1);const E=this.device.createCommandEncoder(),T=E.beginComputePass();T.setPipeline(this.pipeline),T.setBindGroup(0,this.bindGroup),T.dispatchWorkgroups(Math.ceil(f/(256*16))),T.end(),E.copyBufferToBuffer(this.matchCountBuffer,0,x,0,4),E.copyBufferToBuffer(this.matchIndicesBuffer,0,p,0,1024*4),this.device.queue.submit([E.finish()]),await x.mapAsync(GPUMapMode.READ);const k=new Uint32Array(x.getMappedRange())[0];x.unmap();const N=[];if(k>0){await p.mapAsync(GPUMapMode.READ);const I=new Uint32Array(p.getMappedRange());for(let z=0;z<Math.min(k,1024);z++)N.push(I[z]);p.unmap()}return N}destroy(){var a,s,l,f,d,m,h,x;(a=this.paramsBuffer)==null||a.destroy(),(s=this.matchCountBuffer)==null||s.destroy(),(l=this.matchIndicesBuffer)==null||l.destroy(),(f=this.ciphertextBuffer)==null||f.destroy(),(d=this.matchCountReadBuffers[0])==null||d.destroy(),(m=this.matchCountReadBuffers[1])==null||m.destroy(),(h=this.matchIndicesReadBuffers[0])==null||h.destroy(),(x=this.matchIndicesReadBuffers[1])==null||x.destroy(),this.paramsBuffer=null,this.matchCountBuffer=null,this.matchIndicesBuffer=null,this.ciphertextBuffer=null,this.ciphertextBufferSize=0,this.matchCountReadBuffers=[null,null],this.matchIndicesReadBuffers=[null,null],this.currentReadBufferIndex=0,this.bindGroup=null,this.bindGroupDirty=!0,this.device&&(this.device.destroy(),this.device=null),this.pipeline=null,this.bindGroupLayout=null}}Jc.ZERO_DATA=new Uint32Array([0]);function qC(){return typeof navigator<"u"&&"gpu"in navigator}class xA{runBatch(a,s,l,f,d,m){const h=[],x=a.toString(16).padStart(2,"0") Line truncated
`).map(d=>d.trim().toLowerCase()).filter(d=>d.length>0);this.wordlist=f.filter(vA)}setWordlist(a){this.wordlist=a.map(s=>s.trim().toLowerCase()).filter(vA)}abort(){this.abortFlag=!0}isGpuAvailable(){return qC()}async decodePacket(a){var l;const s=a.trim().replace(/\s+/g,"").replace(/^0x/i,"");if(!s||!/^[0-9a-fA-F]+$/.test(s))return null;try{const d=(l=(await mA.MeshCorePacketDecoder.decodeWithVerification(s,{})).payload)==null?void 0:l.decoded;return!(d!=null&&d.channelHash)||!(d!=null&&d.ciphertext)||!(d!=null&&d.cipherMac)?null:{channelHash:d.channelHash,ciphertext:d.ciphertext,cipherMac:d.cipherMac,isGroupText:!0}}catch{return null}}async crack(a,s,l){this.abortFlag=!1,this.useTimestampFilter=(s==null?void 0:s.useTimestampFilter)??!0,this.useUtf8Filter=(s==null?void 0:s.useUtf8Filter)??!0,this.validSeconds=(s==null?void 0:s.validSeconds)??i0,this.useCpu=(s==null?void 0:s.forceCpu)??!1;const f=(s==null?void 0:s.maxLength)??8,d=(s==null?void 0:s.startingLength)??1,m=(s==null?void 0:s.useDictionary)??!0,h=(s==null?void 0:s.startFromType)??"bruteforce",x=a.toLowerCase(),p=await this.decodePacket(x);if(!p)return{found:!1,error:"Invalid packet or not a GroupText packet"};const{channelHash:y,ciphertext:v,cipherMac:w}=p,B=parseInt(y,16);this.useCpu?this.cpuInstance||(this.cpuInstance=new xA):this.gpuInstance||(this.gpuInstance=new Jc,await this.gpuInstance.init()||(this.useCpu=!0,this.cpuInstance=new xA));const R=performance.now();let C=0,E=performance.now(),T=d,P=0,k=0,N=!1;if(s!=null&&s.startFrom){const ee=s.startFrom.toLowerCase();if(h==="dictionary"){const oe=this.wordlist.indexOf(ee);oe>=0&&(k=oe+1)}else{N=!0;const oe=UC(ee);oe&&(T=Math.max(d,oe.length),P=oe.index+1,P>=tl(T)&&(T++,P=0))}}let I=0;m&&!N&&this.wordlist.length>0&&(I+=this.wordlist.length-k);for(let ee=T;ee<=f;ee++)I+=tl(ee);I-=P;const z=(ee,oe,de)=>{if(!l)return;const fe=(performance.now()-R)/1e3,q=fe>0?Math.round(C/fe):0,J=I-C,W=q>0?J/q:0;l({checked:C,total:I,percent:I>0?Math.min(100,C/I*100):0,rateKeysPerSec:q,etaSeconds:W,elapsedSeconds:fe,currentLength:oe,currentPosition:de,phase:ee})},j=ee=>{if(!Nx(v,w,ee))return{valid:!1};const oe=mA.ChannelCrypto.decryptGroupTextMessage(v,w,ee);return!oe.success||!oe.data?{valid:!1}:this.useTimestampFilter&&!ZC(oe.data.timestamp,this.validSeconds)?{valid:!1}:this.useUtf8Filter&&!WC(oe.data.message)?{valid:!1}:{valid:!0,message:oe.data.message}};if(!N&&k===0&&T===d&&P===0){z("public-key",0,r0);const ee=s0(Cc);if(y===ee){const oe=j(Cc);if(oe.valid)return{found:!0,roomName:r0,key:Cc,decryptedMessage:oe.message}}}if(m&&!N&&this.wordlist.length>0)for(let ee=k;ee<this.wordlist.length;ee++){if(this.abortFlag)return{found:!1,aborted:!0,resumeFrom:this.wordlist[ee],resumeType:"dictionary"};const oe=this.wordlist[ee],de=o0("#"+oe),le=s0(de);if(parseInt(le,16)===B){const q=j(de);if(q.valid)return{found:!0,roomName:oe,key:de,decryptedMessage:q.message,resumeFrom:oe,resumeType:"dictionary"}}C++;const fe=performance.now();fe-E>=200&&(z("wordlist",oe.length,oe),E=fe,await new Promise(q=>setTimeout(q,0)))}const H=this.useCpu?1024:32768,$=(s==null?void 0:s.gpuDispatchMs)??1e3;let U=H,G=!1;for(let ee=T;ee<=f;ee++){if(this.abortFlag)return{found:!1,aborted:!0,resumeFrom:Vo(ee,0)||void 0,resumeType:"bruteforce"};const oe=tl(ee);let de=ee===T?P:0;for(;de<oe;){if(this.abortFlag)return{found:!1,aborted:!0,resumeFrom:Vo(ee,de)||void 0,resumeType:"bruteforce"};const le=Math.min(U,oe-de),fe=performance.now();let q;this.useCpu?q=this.cpuInstance.runBatch(B,ee,de,le,v,w):q=await this.gpuInstance.runBatch(B,ee,de,le,v,w);const J=performance.now()-fe;if(C+=le,!this.useCpu&&!G&&le>=H&&J>0){const S=$/J,V=Math.round(le*S),K=Math.pow(2,Math.round(Math.log2(Math.max(H,V))));U=Math.max(H,K),G=!0}for(const S of q){const V=Vo(ee,S);if(!V)continue;const K=o0("#"+V),Y=j(K);if(Y.valid)return{found:!0,roomName:V,key:K,decryptedMessage:Y.message,resumeFrom:V,resumeType:"bruteforce"}}de+=le;const W=performance.now();if(W-E>=200){const S=Vo(ee,Math.min(de,oe-1))||"";z("bruteforce",ee,S),E=W,await new Promise(V=>setTimeout(V,0))}}}return{found:!1,resumeFrom:Vo(f,tl(f)-1)||void 0,resumeType:"bruteforce"}}destroy(){this.gpuInstance&&(this.gpuInstance.destroy(),this.gpuInstance=null),this.cpuInstance&&(this.cpuInstance.destroy(),this.cpuInstance=null)}}var Uf,yA;function YC(){return yA||(yA=1,Uf={webm:"data:video/webm;base64,GkXfowEAAAAAAAAfQoaBAUL3gQFC8oEEQvOBCEKChHdlYm1Ch4EEQoWBAhhTgGcBAAAAAAAVkhFNm3RALE27i1OrhBVJqWZTrIHfTbuMU6uEFlSua1OsggEwTbuMU6uEHFO7a1OsghV17AEAAAAAAACkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmAQAAAAAAAEUq17GDD0JATYCNTGF2ZjU1LjMzLjEwMFdBjUxhdmY1NS4zMy4xMDBzpJBlrrXf3DCDVB8KcgbMpcr+RImIQJBgAAAAAAAWVK5rAQAAAAAAD++uAQAAAAAAADLXgQFzxYEBnIEAIrWcg3VuZIaFVl9WUDiDgQEj44OEAmJaAOABAAAAAAAABrCBsLqBkK4BAAAAAAAPq9eBAnPFgQKcgQAitZyDdW5khohBX1ZPUkJJU4OBAuEBAAAAAAAAEZ Line truncated
NoSleep enabled for older iOS devices. This can interrupt
active or long-running network requests from completing successfully.
See https://github.com/richtr/NoSleep.js/issues/15 for more details.
`),this.noSleepTimer=window.setInterval(()=>{document.hidden||(window.location.href=window.location.href.split("#")[0],window.setTimeout(window.stop,0))},15e3),this.enabled=!0,Promise.resolve()):this.noSleepVideo.play().then(h=>(this.enabled=!0,h)).catch(h=>{throw this.enabled=!1,h})}disable(){l()?(this._wakeLock&&this._wakeLock.release(),this._wakeLock=null):s()?this.noSleepTimer&&(console.warn(`
NoSleep now disabled for older iOS devices.
`),window.clearInterval(this.noSleepTimer),this.noSleepTimer=null):this.noSleepVideo.pause(),this.enabled=!1}}return Zf=f,Zf}var JC=XC();const eE=Zs(JC);function tE(r){if(r.length<4)return null;try{const s=parseInt(r.slice(0,2),16)&3;let l=2;if(s===0||s===3){if(r.length<l+8)return null;l+=8}if(r.length<l+2)return null;const f=parseInt(r.slice(l,l+2),16);l+=2;const d=f*2;return r.length<l+d?null:(l+=d,r.slice(l))}catch{return null}}function nE({packets:r,channels:a,onChannelCreate:s,onRunningChange:l,visible:f=!1}){const[d,m]=F.useState(!1),[h,x]=F.useState(6),[p,y]=F.useState(!1),[v,w]=F.useState(!0),[B,R]=F.useState(!1),[C,E]=F.useState(null),[T,P]=F.useState(new Map),[k,N]=F.useState([]),[I,z]=F.useState(!1),[j,H]=F.useState(null),[$,U]=F.useState(null),[G,ne]=F.useState(0),ee=F.useRef(null),oe=F.useRef(null),de=F.useRef(!1),le=F.useRef(!1),fe=F.useRef(!1),q=F.useRef(new Map),J=F.useRef(!1),W=F.useRef(6),S=F.useRef(!0),V=F.useRef(!1),K=F.useRef(new Set),Y=F.useRef(new Set);F.useEffect(()=>{const Se=new $C;ee.current=Se,H(Se.isGpuAvailable());const Ve=new eE;return oe.current=Ve,()=>{Se.destroy(),ee.current=null,Ve.disable(),oe.current=null}},[]),F.useEffect(()=>{!f||I||Q2(async()=>{const{ENGLISH_WORDLIST:Se}=await import("./wordlist-BV_32SRm.js");return{ENGLISH_WORDLIST:Se}},[]).then(({ENGLISH_WORDLIST:Se})=>{ee.current&&(ee.current.setWordlist(Se),z(!0))}).catch(Se=>{console.error("Failed to load wordlist:",Se),It.error("Failed to load wordlist",{description:"Cracking will not be available"})})},[f,I]),F.useEffect(()=>{const Se=()=>{lt.getUndecryptedPacketCount().then(({count:st})=>U(st)).catch(()=>U(null))};Se();const Ve=setInterval(Se,3e4);return()=>clearInterval(Ve)},[]);const he=F.useMemo(()=>new Set(a.map(Se=>Se.key.toUpperCase())),[a]),pe=r.filter(Se=>Se.payload_type==="GROUP_TEXT"&&!Se.decrypted);F.useEffect(()=>{let Se=0;P(Ve=>{const st=new Map(Ve);let Dt=!1;for(const yt of pe)if(!st.has(yt.id)){const vt=tE(yt.data);if(vt&&Y.current.has(vt)){Se++;continue}vt&&Y.current.add(vt),st.set(yt.id,{packet:yt,attempts:0,lastAttemptLength:0,status:"pending"}),Dt=!0}return Dt?(q.current=st,st):Ve}),Se>0&&ne(Ve=>Ve+Se)},[pe.length]),F.useEffect(()=>{q.current=T},[T]),F.useEffect(()=>{J.current=p},[p]),F.useEffect(()=>{W.current=h},[h]),F.useEffect(()=>{S.current=v},[v]),F.useEffect(()=>{V.current=B},[B]),F.useEffect(()=>{K.current=new Set(pe.map(Se=>Se.id))},[pe]),F.useEffect(()=>{l==null||l(d)},[d,l]);const Ee=Array.from(T.values()).filter(Se=>Se.status==="pending").length,ge=Array.from(T.values()).filter(Se=>Se.status==="cracked").length,We=Array.from(T.values()).filter(Se=>Se.status==="failed").length,Ye=F.useCallback(async()=>{if(fe.current||!ee.current||!de.current)return;const Se=q.current;let Ve=null,st=null;for(const[Xe,Ke]of Se.entries())if(Ke.status==="pending"){Ve=Ke,st=Xe;break}if(!Ve&&J.current){const Xe=Array.from(Se.entries()).filter(([,Ke])=>Ke.status==="failed"&&Ke.lastAttemptLength<10);Xe.length>0&&(Xe.sort((Ke,Je)=>Ke[1].lastAttemptLength-Je[1].lastAttemptLength),[st,Ve]=Xe[0])}if(!Ve||st===null){de.current&&setTimeout(()=>Ye(),1e3);return}if(!K.current.has(st)){P(Xe=>{const Ke=new Map(Xe);return Ke.delete(st),Ke}),de.current&&setTimeout(()=>Ye(),10);return}fe.current=!0;const Dt=W.current,yt=Ve.lastAttemptLength>0,vt=yt?Ve.lastAttemptLength+1:Dt;try{const Xe=await ee.current.crack(Ve.packet.data,{maxLength:vt,useTimestampFilter:!0,useUtf8Filter:!0,...V.current&&{gpuDispatchMs:1e4},...yt&&{useDictionary:!1,startingLength:vt}},Ke=>{E(Ke)});if(le.current){le.current=!1,fe.current=!1,E(null);return}if(Xe.found&&Xe.roomName&&Xe.key){P(Oe=>{const _t=new Map(Oe),Zt=_t.get(st);return Zt&&_t.set(st,{...Zt,status:"cracked",attempts:Zt.attempts+1,lastAttemptLength:vt}),_t});const Ke={roomName:Xe.roomName,key:Xe.key,packetId:st,message:Xe.decryptedMessage||"",crackedAt:Date.now()};N(Oe=>[...Oe,Ke]);const Je=Xe.key.toUpperCase();if(!he.has(Je))try{const Oe="#"+Xe.roomName;await s(Oe,Xe.key),S.current&&await lt.decryptHistoricalPackets({key_type:"channel",channel_name:Oe})}catch(Oe){console.error("Failed to create channel or decrypt historical:",Oe),It.error("Failed to save cracked channel",{description:Oe instanceof Error?Oe.message:"Channel discovered but could not be saved"})}}else P(Ke=>{const Je=new Map(Ke),Oe=Je.get(st);return Oe&&Je.set(st,{...Oe,status:"failed",attempts:Oe.attempts+1,lastAttemptLength:vt}),Je})}catch(Xe){console.error("Cracking error:",Xe),P(Ke=>{const Je=new Map(Ke),Oe=Je.get(st);return Oe&&Je.set(st,{...Oe,status:"failed",attempts:Oe.attempts+1,lastAttemptLength:vt}),Je})}fe.current=!1,E(null),de.current&&setTimeout(()=>Ye(),100)},[he,s]),kt=()=>{var Se;if(!j){It.error("WebGPU not available",{description:"Cracking requires Chrome 113+ or Edge 113+ with WebGPU support."});return}m(!0),de.current=!0,le.current=!1,(Se=oe.current)==null||Se.enable(),Ye()},pt=()=>{var Se,Ve;m(!1),de.current=!1,le.current=!0,(Se=ee.current)==null||Se.abort(),(Ve=oe.current)==null||Ve.disab Line truncated
//# sourceMappingURL=index-pfr560TU.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"mappings":"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 truncated
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.3 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

+3 -1
View File
@@ -1 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="1000" height="1000"><g clip-path="url(#SvgjsClipPath1056)"><rect width="1000" height="1000" fill="#ffffff"></rect><g transform="matrix(1.465201465201465,0,0,1.465201465201465,100,103.66300366300368)"><svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="546" height="541" viewBox="0 0 546 541"><image width="546" height="541" xlink:href="data:image/png;base64,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 truncated
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="546" height="541"><svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="546" height="541" viewBox="0 0 546 541"><image width="546" height="541" xlink:href="data:image/png;base64,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 truncated
@media (prefers-color-scheme: dark) { :root { filter: none; } }
</style></svg>

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB

+2 -2
View File
@@ -13,8 +13,8 @@
<link rel="shortcut icon" href="/favicon.ico" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="manifest" href="/site.webmanifest" />
<script type="module" crossorigin src="/assets/index-CG0iOYhX.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-DZ67iE5i.css">
<script type="module" crossorigin src="/assets/index-pfr560TU.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-C5j7uJOC.css">
</head>
<body>
<div id="root"></div>
+6 -9
View File
@@ -1,7 +1,6 @@
{
"name": "remoteterm-meshcore",
"short_name": "remoteterm-meshcore",
"description": "Web interface for serial MeshCore radios",
"name": "Remote Terminal for MeshCore",
"short_name": "RemoteTerm",
"icons": [
{
"src": "/web-app-manifest-192x192.png",
@@ -16,9 +15,7 @@
"purpose": "maskable"
}
],
"theme_color": "#0a0a0a",
"background_color": "#0a0a0a",
"display": "standalone",
"start_url": "/",
"scope": "/"
}
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}
+65 -21
View File
@@ -23,6 +23,7 @@ import { getStateKey } from './utils/conversationState';
import { formatTime } from './utils/messageParser';
import { pubkeysMatch, getContactDisplayName } from './utils/pubkey';
import { parseHashConversation, updateUrlHash } from './utils/urlHash';
import { loadFavorites, toggleFavorite, isFavorite, type Favorite } from './utils/favorites';
import { cn } from '@/lib/utils';
import type {
AppSettings,
@@ -59,6 +60,7 @@ export function App() {
const [undecryptedCount, setUndecryptedCount] = useState(0);
const [showCracker, setShowCracker] = useState(false);
const [crackerRunning, setCrackerRunning] = useState(false);
const [favorites, setFavorites] = useState<Favorite[]>(loadFavorites);
// Track previous health status to detect changes
const prevHealthRef = useRef<HealthStatus | null>(null);
@@ -415,6 +417,11 @@ export function App() {
setSidebarOpen(false);
}, []);
// Toggle favorite status for a conversation
const handleToggleFavorite = useCallback((type: 'channel' | 'contact', id: string) => {
setFavorites(toggleFavorite(type, id));
}, []);
// Delete channel handler
const handleDeleteChannel = useCallback(async (key: string) => {
if (!confirm('Delete this channel? Message history will be preserved.')) return;
@@ -548,6 +555,7 @@ export function App() {
crackerRunning={crackerRunning}
onToggleCracker={() => setShowCracker((prev) => !prev)}
onMarkAllRead={markAllRead}
favorites={favorites}
/>
);
@@ -580,7 +588,7 @@ export function App() {
{activeConversation ? (
activeConversation.type === 'map' ? (
<>
<div className="flex justify-between items-center px-4 py-3 border-b border-border font-medium">
<div className="flex justify-between items-center px-4 py-3 border-b border-border font-medium text-lg">
Node Map
</div>
<div className="flex-1 overflow-hidden">
@@ -589,7 +597,7 @@ export function App() {
</>
) : activeConversation.type === 'raw' ? (
<>
<div className="flex justify-between items-center px-4 py-3 border-b border-border font-medium">
<div className="flex justify-between items-center px-4 py-3 border-b border-border font-medium text-lg">
Raw Packet Feed
</div>
<div className="flex-1 overflow-hidden">
@@ -598,16 +606,16 @@ export function App() {
</>
) : (
<>
<div className="flex justify-between items-center px-4 py-3 border-b border-border font-medium gap-2">
<span className="flex flex-col sm:flex-row sm:items-center sm:gap-2 min-w-0 flex-1">
<span className="truncate">
<div className="flex justify-between items-center px-4 py-3 border-b border-border font-medium text-lg gap-2">
<span className="flex flex-wrap items-baseline gap-x-2 min-w-0 flex-1">
<span className="flex-shrink-0">
{activeConversation.type === 'channel' &&
!activeConversation.name.startsWith('#')
? '#'
: ''}
{activeConversation.name}
</span>
<span className="font-normal text-xs text-muted-foreground font-mono truncate">
<span className="font-normal text-sm text-muted-foreground font-mono truncate">
{activeConversation.id}
{activeConversation.type === 'contact' &&
(() => {
@@ -634,22 +642,58 @@ export function App() {
})()}
</span>
</span>
{!(
activeConversation.type === 'channel' && activeConversation.name === 'Public'
) && (
<button
className="py-1 px-3 bg-destructive/20 border border-destructive/30 text-destructive rounded text-xs cursor-pointer hover:bg-destructive/30 flex-shrink-0"
onClick={() => {
if (activeConversation.type === 'channel') {
handleDeleteChannel(activeConversation.id);
} else {
handleDeleteContact(activeConversation.id);
<div className="flex items-center gap-1 flex-shrink-0">
{/* Favorite button */}
{(activeConversation.type === 'channel' ||
activeConversation.type === 'contact') && (
<button
className="p-1.5 rounded hover:bg-accent text-xl leading-none"
onClick={() =>
handleToggleFavorite(
activeConversation.type as 'channel' | 'contact',
activeConversation.id
)
}
}}
>
Delete
</button>
)}
title={
isFavorite(
favorites,
activeConversation.type as 'channel' | 'contact',
activeConversation.id
)
? 'Remove from favorites'
: 'Add to favorites'
}
>
{isFavorite(
favorites,
activeConversation.type as 'channel' | 'contact',
activeConversation.id
) ? (
<span className="text-yellow-500">&#9733;</span>
) : (
<span className="text-muted-foreground">&#9734;</span>
)}
</button>
)}
{/* Delete button */}
{!(
activeConversation.type === 'channel' && activeConversation.name === 'Public'
) && (
<button
className="p-1.5 rounded hover:bg-destructive/20 text-destructive text-xl leading-none"
onClick={() => {
if (activeConversation.type === 'channel') {
handleDeleteChannel(activeConversation.id);
} else {
handleDeleteContact(activeConversation.id);
}
}}
title="Delete"
>
&#128465;
</button>
)}
</div>
</div>
<MessageList
messages={messages}
+143 -10
View File
@@ -4,6 +4,7 @@ import { getStateKey, type ConversationTimes } from '../utils/conversationState'
import { getPubkeyPrefix, getContactDisplayName } from '../utils/pubkey';
import { ContactAvatar } from './ContactAvatar';
import { CONTACT_TYPE_REPEATER } from '../utils/contactAvatar';
import { isFavorite, type Favorite } from '../utils/favorites';
import { UNREAD_FETCH_LIMIT } from '../api';
import { Input } from './ui/input';
import { Button } from './ui/button';
@@ -25,6 +26,7 @@ interface SidebarProps {
crackerRunning: boolean;
onToggleCracker: () => void;
onMarkAllRead: () => void;
favorites: Favorite[];
}
/** Format unread count, showing "X+" if at the fetch limit (indicating there may be more) */
@@ -64,6 +66,7 @@ export function Sidebar({
crackerRunning,
onToggleCracker,
onMarkAllRead,
favorites,
}: SidebarProps) {
const [sortOrder, setSortOrder] = useState<SortOrder>(loadSortOrder);
const [searchQuery, setSearchQuery] = useState('');
@@ -183,6 +186,43 @@ export function Sidebar({
)
: sortedContacts;
// Separate favorites from regular items
const favoriteChannels = filteredChannels.filter((c) => isFavorite(favorites, 'channel', c.key));
const favoriteContacts = filteredContacts.filter((c) =>
isFavorite(favorites, 'contact', c.public_key)
);
const nonFavoriteChannels = filteredChannels.filter(
(c) => !isFavorite(favorites, 'channel', c.key)
);
const nonFavoriteContacts = filteredContacts.filter(
(c) => !isFavorite(favorites, 'contact', c.public_key)
);
// Combine and sort favorites by most recent message (always recent order)
type FavoriteItem = { type: 'channel'; channel: Channel } | { type: 'contact'; contact: Contact };
const favoriteItems: FavoriteItem[] = [
...favoriteChannels.map((channel) => ({ type: 'channel' as const, channel })),
...favoriteContacts.map((contact) => ({ type: 'contact' as const, contact })),
].sort((a, b) => {
const timeA =
a.type === 'channel'
? getLastMessageTime('channel', a.channel.key)
: getLastMessageTime('contact', a.contact.public_key);
const timeB =
b.type === 'channel'
? getLastMessageTime('channel', b.channel.key)
: getLastMessageTime('contact', b.contact.public_key);
// Sort by most recent first
if (timeA && timeB) return timeB - timeA;
if (timeA && !timeB) return -1;
if (!timeA && timeB) return 1;
// Fall back to name comparison
const nameA = a.type === 'channel' ? a.channel.name : a.contact.name || a.contact.public_key;
const nameB = b.type === 'channel' ? b.channel.name : b.contact.name || b.contact.public_key;
return nameA.localeCompare(nameB);
});
return (
<div className="sidebar w-60 h-full min-h-0 bg-card border-r border-border flex flex-col">
{/* Header */}
@@ -296,8 +336,99 @@ export function Sidebar({
</div>
)}
{/* Favorites */}
{favoriteItems.length > 0 && (
<>
<div className="flex justify-between items-center px-3 py-2 pt-3">
<span className="text-[11px] uppercase text-muted-foreground">Favorites</span>
</div>
{favoriteItems.map((item) => {
if (item.type === 'channel') {
const channel = item.channel;
const unreadCount = getUnreadCount('channel', channel.key);
const isMention = hasMention('channel', channel.key);
return (
<div
key={`fav-chan-${channel.key}`}
className={cn(
'px-3 py-2.5 cursor-pointer flex items-center gap-2 border-l-2 border-transparent hover:bg-accent',
isActive('channel', channel.key) && 'bg-accent border-l-primary',
unreadCount > 0 && '[&_.name]:font-bold [&_.name]:text-foreground'
)}
onClick={() =>
handleSelectConversation({
type: 'channel',
id: channel.key,
name: channel.name,
})
}
>
<span className="text-muted-foreground text-xs">#</span>
<span className="name flex-1 truncate">{channel.name}</span>
{unreadCount > 0 && (
<span
className={cn(
'text-[10px] font-semibold px-1.5 py-0.5 rounded-full min-w-[18px] text-center',
isMention
? 'bg-destructive text-destructive-foreground'
: 'bg-primary text-primary-foreground'
)}
>
{formatUnreadCount(unreadCount)}
</span>
)}
</div>
);
} else {
const contact = item.contact;
const unreadCount = getUnreadCount('contact', contact.public_key);
const isMention = hasMention('contact', contact.public_key);
return (
<div
key={`fav-contact-${contact.public_key}`}
className={cn(
'px-3 py-2.5 cursor-pointer flex items-center gap-2 border-l-2 border-transparent hover:bg-accent',
isActive('contact', contact.public_key) && 'bg-accent border-l-primary',
unreadCount > 0 && '[&_.name]:font-bold [&_.name]:text-foreground'
)}
onClick={() =>
handleSelectConversation({
type: 'contact',
id: contact.public_key,
name: getContactDisplayName(contact.name, contact.public_key),
})
}
>
<ContactAvatar
name={contact.name}
publicKey={contact.public_key}
size={24}
contactType={contact.type}
/>
<span className="name flex-1 truncate">
{getContactDisplayName(contact.name, contact.public_key)}
</span>
{unreadCount > 0 && (
<span
className={cn(
'text-[10px] font-semibold px-1.5 py-0.5 rounded-full min-w-[18px] text-center',
isMention
? 'bg-destructive text-destructive-foreground'
: 'bg-primary text-primary-foreground'
)}
>
{formatUnreadCount(unreadCount)}
</span>
)}
</div>
);
}
})}
</>
)}
{/* Channels */}
{filteredChannels.length > 0 && (
{nonFavoriteChannels.length > 0 && (
<>
<div className="flex justify-between items-center px-3 py-2 pt-3">
<span className="text-[11px] uppercase text-muted-foreground">Channels</span>
@@ -309,7 +440,7 @@ export function Sidebar({
{sortOrder === 'alpha' ? 'A-Z' : '⏱'}
</button>
</div>
{filteredChannels.map((channel) => {
{nonFavoriteChannels.map((channel) => {
const unreadCount = getUnreadCount('channel', channel.key);
const isMention = hasMention('channel', channel.key);
return (
@@ -349,11 +480,11 @@ export function Sidebar({
)}
{/* Contacts */}
{filteredContacts.length > 0 && (
{nonFavoriteContacts.length > 0 && (
<>
<div className="flex justify-between items-center px-3 py-2 pt-3">
<span className="text-[11px] uppercase text-muted-foreground">Contacts</span>
{filteredChannels.length === 0 && (
{nonFavoriteChannels.length === 0 && (
<button
className="bg-transparent border border-border text-muted-foreground px-1.5 py-0.5 text-[10px] rounded hover:bg-accent hover:text-foreground"
onClick={handleSortToggle}
@@ -363,7 +494,7 @@ export function Sidebar({
</button>
)}
</div>
{filteredContacts.map((contact) => {
{nonFavoriteContacts.map((contact) => {
const unreadCount = getUnreadCount('contact', contact.public_key);
const isMention = hasMention('contact', contact.public_key);
return (
@@ -410,11 +541,13 @@ export function Sidebar({
)}
{/* Empty state */}
{filteredContacts.length === 0 && filteredChannels.length === 0 && (
<div className="p-5 text-center text-muted-foreground">
{query ? 'No matches found' : 'No conversations yet'}
</div>
)}
{nonFavoriteContacts.length === 0 &&
nonFavoriteChannels.length === 0 &&
favoriteItems.length === 0 && (
<div className="p-5 text-center text-muted-foreground">
{query ? 'No matches found' : 'No conversations yet'}
</div>
)}
</div>
</div>
);
+82
View File
@@ -0,0 +1,82 @@
/**
* localStorage utilities for managing favorite conversations.
*
* Favorites are stored client-side and displayed in a dedicated section
* above channels in the sidebar, always sorted by most recent message.
*/
const FAVORITES_KEY = 'remoteterm-favorites';
export interface Favorite {
type: 'channel' | 'contact';
id: string; // channel key or contact public key
}
/**
* Load favorites from localStorage
*/
export function loadFavorites(): Favorite[] {
try {
const stored = localStorage.getItem(FAVORITES_KEY);
return stored ? JSON.parse(stored) : [];
} catch {
return [];
}
}
/**
* Save favorites to localStorage
*/
function saveFavorites(favorites: Favorite[]): void {
try {
localStorage.setItem(FAVORITES_KEY, JSON.stringify(favorites));
} catch {
// localStorage might be full or disabled
}
}
/**
* Add a conversation to favorites
*/
export function addFavorite(type: 'channel' | 'contact', id: string): Favorite[] {
const favorites = loadFavorites();
// Check if already favorited
if (favorites.some((f) => f.type === type && f.id === id)) {
return favorites;
}
const updated = [...favorites, { type, id }];
saveFavorites(updated);
return updated;
}
/**
* Remove a conversation from favorites
*/
export function removeFavorite(type: 'channel' | 'contact', id: string): Favorite[] {
const favorites = loadFavorites();
const updated = favorites.filter((f) => !(f.type === type && f.id === id));
saveFavorites(updated);
return updated;
}
/**
* Check if a conversation is favorited
*/
export function isFavorite(
favorites: Favorite[],
type: 'channel' | 'contact',
id: string
): boolean {
return favorites.some((f) => f.type === type && f.id === id);
}
/**
* Toggle a conversation's favorite status
*/
export function toggleFavorite(type: 'channel' | 'contact', id: string): Favorite[] {
const favorites = loadFavorites();
if (favorites.some((f) => f.type === type && f.id === id)) {
return removeFavorite(type, id);
}
return addFavorite(type, id);
}