mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-11-08 02:22:22 +01:00
Add forgotten dist folder
This commit is contained in:
1 parent
557cb12879
commit
5357055ce8
5 files changed
+370655
-1
No files matched your search
@@ -2,7 +2,6 @@
|
||||
__pycache__/
|
||||
*.py[oc]
|
||||
build/
|
||||
dist/
|
||||
wheels/
|
||||
*.egg-info
|
||||
|
||||
|
||||
+536
@@ -0,0 +1,536 @@
|
||||
function ev(r,o){for(var a=0;a<o.length;a++){const s=o[a];if(typeof s!="string"&&!Array.isArray(s)){for(const c in s)if(c!=="default"&&!(c in r)){const l=Object.getOwnPropertyDescriptor(s,c);l&&Object.defineProperty(r,c,l.get?l:{enumerable:!0,get:()=>s[c]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))s(c);new MutationObserver(c=>{for(const l of c)if(l.type==="childList")for(const p of l.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&s(p)}).observe(document,{childList:!0,subtree:!0});function a(c){const l={};return c.integrity&&(l.integrity=c.integrity),c.referrerPolicy&&(l.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?l.credentials="include":c.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function s(c){if(c.ep)return;c.ep=!0;const l=a(c);fetch(c.href,l)}})();function Zh(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var ic={exports:{}},da={},lc={exports:{}},Ie={};/**
|
||||
* @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 Qf;function tv(){if(Qf)return Ie;Qf=1;var r=Symbol.for("react.element"),o=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),p=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),m=Symbol.iterator;function g(E){return E===null||typeof E!="object"?null:(E=m&&E[m]||E["@@iterator"],typeof E=="function"?E:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,C={};function x(E,I,H){this.props=E,this.context=I,this.refs=C,this.updater=H||S}x.prototype.isReactComponent={},x.prototype.setState=function(E,I){if(typeof E!="object"&&typeof E!="function"&&E!=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,E,I,"setState")},x.prototype.forceUpdate=function(E){this.updater.enqueueForceUpdate(this,E,"forceUpdate")};function w(){}w.prototype=x.prototype;function k(E,I,H){this.props=E,this.context=I,this.refs=C,this.updater=H||S}var b=k.prototype=new w;b.constructor=k,_(b,x.prototype),b.isPureReactComponent=!0;var R=Array.isArray,P=Object.prototype.hasOwnProperty,j={current:null},B={key:!0,ref:!0,__self:!0,__source:!0};function D(E,I,H){var V,re={},ce=null,pe=null;if(I!=null)for(V in I.ref!==void 0&&(pe=I.ref),I.key!==void 0&&(ce=""+I.key),I)P.call(I,V)&&!B.hasOwnProperty(V)&&(re[V]=I[V]);var oe=arguments.length-2;if(oe===1)re.children=H;else if(1<oe){for(var Ae=Array(oe),ze=0;ze<oe;ze++)Ae[ze]=arguments[ze+2];re.children=Ae}if(E&&E.defaultProps)for(V in oe=E.defaultProps,oe)re[V]===void 0&&(re[V]=oe[V]);return{$$typeof:r,type:E,key:ce,ref:pe,props:re,_owner:j.current}}function F(E,I){return{$$typeof:r,type:E.type,key:I,ref:E.ref,props:E.props,_owner:E._owner}}function O(E){return typeof E=="object"&&E!==null&&E.$$typeof===r}function L(E){var I={"=":"=0",":":"=2"};return"$"+E.replace(/[=:]/g,function(H){return I[H]})}var G=/\/+/g;function $(E,I){return typeof E=="object"&&E!==null&&E.key!=null?L(""+E.key):I.toString(36)}function J(E,I,H,V,re){var ce=typeof E;(ce==="undefined"||ce==="boolean")&&(E=null);var pe=!1;if(E===null)pe=!0;else switch(ce){case"string":case"number":pe=!0;break;case"object":switch(E.$$typeof){case r:case o:pe=!0}}if(pe)return pe=E,re=re(pe),E=V===""?"."+$(pe,0):V,R(re)?(H="",E!=null&&(H=E.replace(G,"$&/")+"/"),J(re,I,H,"",function(ze){return ze})):re!=null&&(O(re)&&(re=F(re,H+(!re.key||pe&&pe.key===re.key?"":(""+re.key).replace(G,"$&/")+"/")+E)),I.push(re)),1;if(pe=0,V=V===""?".":V+":",R(E))for(var oe=0;oe<E.length;oe++){ce=E[oe];var Ae=V+$(ce,oe);pe+=J(ce,I,H,Ae,re)}else if(Ae=g(E),typeof Ae=="function")for(E=Ae.call(E),oe=0;!(ce=E.next()).done;)ce=ce.value,Ae=V+$(ce,oe++),pe+=J(ce,I,H,Ae,re);else if(ce==="object")throw I=String(E),Error("Objects are not valid as a React child (found: "+(I==="[object Object]"?"object with keys {"+Object.keys(E).join(", ")+"}":I)+"). If you meant to render a collection of children, use an array instead.");return pe}function ae(E,I,H){if(E==null)return E;var V=[],re=0;return J(E,V,"","",function(ce){return I.call(H,ce,re++)}),V}function Q(E){if(E._status===-1){var I=E._result;I=I(),I.then(function(H){(E._status===0||E._status===-1)&&(E._status=1,E._result=H)},function(H){(E._status===0||E._status===-1)&&(E._status=2,E._result=H)}),E._status===-1&&(E._status=0,E._result=I)}if(E._status===1)return E._result.default;throw E._result}var ne={current:null},U={transition:null},te={ReactCurrentDispatcher:ne,ReactCurrentBatchConfig:U,ReactCurrentOwner:j};function X(){throw Error("act(...) is not supported in production builds of React.")}return Ie.Children={map:ae,forEach:function(E,I,H){ae(E,function(){I.apply(this,arguments)},H)},count:function(E){var I=0;return ae(E,function(){I++}),I},toArray:function(E){return ae(E,function(I){return I})||[]},only:function(E){if(!O(E))throw Error("React.Children.only expected to receive a single React element child.");return E}},Ie.Component=x,Ie.Fragment=a,Ie.Profiler=c,Ie.PureComponent=k,Ie.StrictMode=s,Ie.Suspense=f,Ie.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=te,Ie.act=X,Ie.cloneElement=function(E,I,H){if(E==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+E+".");var V=_({},E.props),re=E.key,ce=E.ref,pe=E._owner;if(I!=null){if(I.ref!==void 0&&(ce=I.ref,pe=j.current),I.key!==void 0&&(re=""+I.key),E.type&&E.type.defaultProps)var oe=E.type.defaultProps;for(Ae in I)P.call(I,Ae)&&!B.hasOwnProperty(Ae)&&(V[Ae]=I[Ae]===void 0&&oe!==void 0?oe[Ae]:I[Ae])}var Ae=arguments.length-2;if(Ae===1)V.children=H;else if(1<Ae){oe=Array(Ae);for(var ze=0;ze<Ae;ze++)oe[ze]=arguments[ze+2];V.children=oe}return{$$typeof:r,type:E.type,key:re,ref:ce,props:V,_owner:pe}},Ie.createContexLine 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 Jf;function rv(){if(Jf)return da;Jf=1;var r=tu(),o=Symbol.for("react.element"),a=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,c=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function p(u,f,h){var v,m={},g=null,S=null;h!==void 0&&(g=""+h),f.key!==void 0&&(g=""+f.key),f.ref!==void 0&&(S=f.ref);for(v in f)s.call(f,v)&&!l.hasOwnProperty(v)&&(m[v]=f[v]);if(u&&u.defaultProps)for(v in f=u.defaultProps,f)m[v]===void 0&&(m[v]=f[v]);return{$$typeof:o,type:u,key:g,ref:S,props:m,_owner:c.current}}return da.Fragment=a,da.jsx=p,da.jsxs=p,da}var eh;function nv(){return eh||(eh=1,ic.exports=rv()),ic.exports}var A=nv(),N=tu();const fe=Zh(N),ru=ev({__proto__:null,default:fe},[N]);var Os={},cc={exports:{}},rr={},uc={exports:{}},dc={};/**
|
||||
* @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 th;function ov(){return th||(th=1,(function(r){function o(U,te){var X=U.length;U.push(te);e:for(;0<X;){var E=X-1>>>1,I=U[E];if(0<c(I,te))U[E]=te,U[X]=I,X=E;else break e}}function a(U){return U.length===0?null:U[0]}function s(U){if(U.length===0)return null;var te=U[0],X=U.pop();if(X!==te){U[0]=X;e:for(var E=0,I=U.length,H=I>>>1;E<H;){var V=2*(E+1)-1,re=U[V],ce=V+1,pe=U[ce];if(0>c(re,X))ce<I&&0>c(pe,re)?(U[E]=pe,U[ce]=X,E=ce):(U[E]=re,U[V]=X,E=V);else if(ce<I&&0>c(pe,X))U[E]=pe,U[ce]=X,E=ce;else break e}}return te}function c(U,te){var X=U.sortIndex-te.sortIndex;return X!==0?X:U.id-te.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;r.unstable_now=function(){return l.now()}}else{var p=Date,u=p.now();r.unstable_now=function(){return p.now()-u}}var f=[],h=[],v=1,m=null,g=3,S=!1,_=!1,C=!1,x=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(U){for(var te=a(h);te!==null;){if(te.callback===null)s(h);else if(te.startTime<=U)s(h),te.sortIndex=te.expirationTime,o(f,te);else break;te=a(h)}}function R(U){if(C=!1,b(U),!_)if(a(f)!==null)_=!0,Q(P);else{var te=a(h);te!==null&&ne(R,te.startTime-U)}}function P(U,te){_=!1,C&&(C=!1,w(D),D=-1),S=!0;var X=g;try{for(b(te),m=a(f);m!==null&&(!(m.expirationTime>te)||U&&!L());){var E=m.callback;if(typeof E=="function"){m.callback=null,g=m.priorityLevel;var I=E(m.expirationTime<=te);te=r.unstable_now(),typeof I=="function"?m.callback=I:m===a(f)&&s(f),b(te)}else s(f);m=a(f)}if(m!==null)var H=!0;else{var V=a(h);V!==null&&ne(R,V.startTime-te),H=!1}return H}finally{m=null,g=X,S=!1}}var j=!1,B=null,D=-1,F=5,O=-1;function L(){return!(r.unstable_now()-O<F)}function G(){if(B!==null){var U=r.unstable_now();O=U;var te=!0;try{te=B(!0,U)}finally{te?$():(j=!1,B=null)}}else j=!1}var $;if(typeof k=="function")$=function(){k(G)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,ae=J.port2;J.port1.onmessage=G,$=function(){ae.postMessage(null)}}else $=function(){x(G,0)};function Q(U){B=U,j||(j=!0,$())}function ne(U,te){D=x(function(){U(r.unstable_now())},te)}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(U){U.callback=null},r.unstable_continueExecution=function(){_||S||(_=!0,Q(P))},r.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<U?Math.floor(1e3/U):5},r.unstable_getCurrentPriorityLevel=function(){return g},r.unstable_getFirstCallbackNode=function(){return a(f)},r.unstable_next=function(U){switch(g){case 1:case 2:case 3:var te=3;break;default:te=g}var X=g;g=te;try{return U()}finally{g=X}},r.unstable_pauseExecution=function(){},r.unstable_requestPaint=function(){},r.unstable_runWithPriority=function(U,te){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var X=g;g=U;try{return te()}finally{g=X}},r.unstable_scheduleCallback=function(U,te,X){var E=r.unstable_now();switch(typeof X=="object"&&X!==null?(X=X.delay,X=typeof X=="number"&&0<X?E+X:E):X=E,U){case 1:var I=-1;break;case 2:I=250;break;case 5:I=1073741823;break;case 4:I=1e4;break;default:I=5e3}return I=X+I,U={id:v++,callback:te,priorityLevel:U,startTime:X,expirationTime:I,sortIndex:-1},X>E?(U.sortIndex=X,o(h,U),a(f)===null&&U===a(h)&&(C?(w(D),D=-1):C=!0,ne(R,X-E))):(U.sortIndex=I,o(f,U),_||S||(_=!0,Q(P))),U},r.unstable_shouldYield=L,r.unstable_wrapCallback=function(U){var te=g;return function(){var X=g;g=te;try{return U.apply(this,arguments)}finally{g=X}}}})(dc)),dc}var rh;function av(){return rh||(rh=1,uc.exports=ov()),uc.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 nh;function sv(){if(nh)return rr;nh=1;var r=tu(),o=av();function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=new Set,c={};function l(e,t){p(e,t),p(e+"Capture",t)}function p(e,t){for(c[e]=t,e=0;e<t.length;e++)s.add(t[e])}var u=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,h=/^[: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]*$/,v={},m={};function g(e){return f.call(m,e)?!0:f.call(v,e)?!1:h.test(e)?m[e]=!0:(v[e]=!0,!1)}function S(e,t,n,i){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return i?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function _(e,t,n,i){if(t===null||typeof t>"u"||S(e,t,n,i))return!0;if(i)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function C(e,t,n,i,d,y,T){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=i,this.attributeNamespace=d,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=y,this.removeEmptyString=T}var x={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){x[e]=new C(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];x[t]=new C(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){x[e]=new C(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){x[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){x[e]=new C(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){x[e]=new C(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){x[e]=new C(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){x[e]=new C(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){x[e]=new C(e,5,!1,e.toLowerCase(),null,!1,!1)});var w=/[\-:]([a-z])/g;function k(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(w,k);x[t]=new C(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(w,k);x[t]=new C(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(w,k);x[t]=new C(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){x[e]=new C(e,1,!1,e.toLowerCase(),null,!1,!1)}),x.xlinkHref=new C("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){x[e]=new C(e,1,!1,e.toLowerCase(),null,!0,!0)});function b(e,t,n,i){var d=x.hasOwnProperty(t)?x[t]:null;(d!==null?d.type!==0:i||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=
Line truncated
|
||||
`+E+e}var H=!1;function V(e,t){if(!e||H)return"";H=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(Y){var i=Y}Reflect.construct(e,[],t)}else{try{t.call()}catch(Y){i=Y}e.call(t.prototype)}else{try{throw Error()}catch(Y){i=Y}e()}}catch(Y){if(Y&&i&&typeof Y.stack=="string"){for(var d=Y.stack.split(`
|
||||
`),y=i.stack.split(`
|
||||
`),T=d.length-1,M=y.length-1;1<=T&&0<=M&&d[T]!==y[M];)M--;for(;1<=T&&0<=M;T--,M--)if(d[T]!==y[M]){if(T!==1||M!==1)do if(T--,M--,0>M||d[T]!==y[M]){var z=`
|
||||
`+d[T].replace(" at new "," at ");return e.displayName&&z.includes("<anonymous>")&&(z=z.replace("<anonymous>",e.displayName)),z}while(1<=T&&0<=M);break}}}finally{H=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?I(e):""}function re(e){switch(e.tag){case 5:return I(e.type);case 16:return I("Lazy");case 13:return I("Suspense");case 19:return I("SuspenseList");case 0:case 2:case 15:return e=V(e.type,!1),e;case 11:return e=V(e.type.render,!1),e;case 1:return e=V(e.type,!0),e;default:return""}}function ce(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 B:return"Fragment";case j:return"Portal";case F:return"Profiler";case D:return"StrictMode";case $:return"Suspense";case J:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case L:return(e.displayName||"Context")+".Consumer";case O:return(e._context.displayName||"Context")+".Provider";case G:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ae:return t=e.displayName||null,t!==null?t:ce(e.type)||"Memo";case Q:t=e._payload,e=e._init;try{return ce(e(t))}catch{}}return null}function pe(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ce(t);case 8:return t===D?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function oe(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ae(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ze(e){var t=Ae(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var d=n.get,y=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return d.call(this)},set:function(T){i=""+T,y.call(this,T)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(T){i=""+T},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function dt(e){e._valueTracker||(e._valueTracker=ze(e))}function it(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),i="";return e&&(i=Ae(e)?e.checked?"true":"false":e.value),e=i,e!==n?(t.setValue(e),!0):!1}function ft(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 Ze(e,t){var n=t.checked;return X({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function ar(e,t){var n=t.defaultValue==null?"":t.defaultValue,i=t.checked!=null?t.checked:t.defaultChecked;n=oe(t.value!=null?t.value:n),e._wrapperState={initialChecked:i,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Vt(e,t){t=t.checked,t!=null&&b(e,"checked",t,!1)}function Tt(e,t){Vt(e,t);var n=oe(t.value),i=t.type;if(n!=null)i==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(i==="submit"||i==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ht(e,t.type,n):t.hasOwnProperty("defaultValue")&&ht(e,t.type,oe(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Wt(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type;if(!(i!=="submit"&&i!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ht(e,t,n){(t!=="number"||ft(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Dt=Array.isArray;function nt(e,t,n,i){if(e=e.options,t){t={};for(var d=0;d<n.length;d++)t["$"+n[d]]=!0;for(n=0;n<e.length;n++)d=t.hasOwnProperty("$"+e[n].value),e[n].selected!==d&&(e[n].selected=d),d&&i&&(e[n].defaultSelected=!0)}else{for(n=""+oe(n),t=null,d=0;d<e.length;d++){if(e[d].value===n){e[d].selected=!0,i&&(e[d].defaultSelected=!0);return}t!==null||e[d].disabled||(t=e[d])}t!==null&&(t.selected=!0)}}function Ue(e,t){if(t.dangerouslySetInnerHTML!=
Line truncated
|
||||
`).replace(hm,"")}function $a(e,t,n){if(t=md(t),md(e)!==t&&n)throw Error(a(425))}function Ya(){}var Zi=null,Ji=null;function el(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var tl=typeof setTimeout=="function"?setTimeout:void 0,pm=typeof clearTimeout=="function"?clearTimeout:void 0,vd=typeof Promise=="function"?Promise:void 0,mm=typeof queueMicrotask=="function"?queueMicrotask:typeof vd<"u"?function(e){return vd.resolve(null).then(e).catch(vm)}:tl;function vm(e){setTimeout(function(){throw e})}function rl(e,t){var n=t,i=0;do{var d=n.nextSibling;if(e.removeChild(n),d&&d.nodeType===8)if(n=d.data,n==="/$"){if(i===0){e.removeChild(d),Fo(t);return}i--}else n!=="$"&&n!=="$?"&&n!=="$!"||i++;n=d}while(n);Fo(t)}function an(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function yd(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Zn=Math.random().toString(36).slice(2),jr="__reactFiber$"+Zn,Yo="__reactProps$"+Zn,Vr="__reactContainer$"+Zn,nl="__reactEvents$"+Zn,ym="__reactListeners$"+Zn,gm="__reactHandles$"+Zn;function En(e){var t=e[jr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Vr]||n[jr]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=yd(e);e!==null;){if(n=e[jr])return n;e=yd(e)}return t}e=n,n=e.parentNode}return null}function Xo(e){return e=e[jr]||e[Vr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Jn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(a(33))}function Xa(e){return e[Yo]||null}var ol=[],eo=-1;function sn(e){return{current:e}}function st(e){0>eo||(e.current=ol[eo],ol[eo]=null,eo--)}function et(e,t){eo++,ol[eo]=e.current,e.current=t}var ln={},Ht=sn(ln),Qt=sn(!1),Tn=ln;function to(e,t){var n=e.type.contextTypes;if(!n)return ln;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var d={},y;for(y in n)d[y]=t[y];return i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=d),d}function Zt(e){return e=e.childContextTypes,e!=null}function Qa(){st(Qt),st(Ht)}function gd(e,t,n){if(Ht.current!==ln)throw Error(a(168));et(Ht,t),et(Qt,n)}function xd(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!="function")return n;i=i.getChildContext();for(var d in i)if(!(d in t))throw Error(a(108,pe(e)||"Unknown",d));return X({},n,i)}function Za(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ln,Tn=Ht.current,et(Ht,e),et(Qt,Qt.current),!0}function wd(e,t,n){var i=e.stateNode;if(!i)throw Error(a(169));n?(e=xd(e,t,Tn),i.__reactInternalMemoizedMergedChildContext=e,st(Qt),st(Ht),et(Ht,e)):st(Qt),et(Qt,n)}var Wr=null,Ja=!1,al=!1;function bd(e){Wr===null?Wr=[e]:Wr.push(e)}function xm(e){Ja=!0,bd(e)}function cn(){if(!al&&Wr!==null){al=!0;var e=0,t=Ye;try{var n=Wr;for(Ye=1;e<n.length;e++){var i=n[e];do i=i(!0);while(i!==null)}Wr=null,Ja=!1}catch(d){throw Wr!==null&&(Wr=Wr.slice(e+1)),Su(Ti,cn),d}finally{Ye=t,al=!1}}return null}var ro=[],no=0,es=null,ts=0,hr=[],pr=0,Pn=null,Kr=1,Gr="";function Rn(e,t){ro[no++]=ts,ro[no++]=es,es=e,ts=t}function _d(e,t,n){hr[pr++]=Kr,hr[pr++]=Gr,hr[pr++]=Pn,Pn=e;var i=Kr;e=Gr;var d=32-_r(i)-1;i&=~(1<<d),n+=1;var y=32-_r(t)+d;if(30<y){var T=d-d%5;y=(i&(1<<T)-1).toString(32),i>>=T,d-=T,Kr=1<<32-_r(t)+d|n<<d|i,Gr=y+e}else Kr=1<<y|n<<d|i,Gr=e}function sl(e){e.return!==null&&(Rn(e,1),_d(e,1,0))}function il(e){for(;e===es;)es=ro[--no],ro[no]=null,ts=ro[--no],ro[no]=null;for(;e===Pn;)Pn=hr[--pr],hr[pr]=null,Gr=hr[--pr],hr[pr]=null,Kr=hr[--pr],hr[pr]=null}var ir=null,lr=null,lt=!1,kr=null;function Sd(e,t){var n=gr(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function kd(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,ir=e,lr=an(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,ir=e,lr=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Pn!==null?{id:Kr,overflow:Gr}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=gr(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,ir=e,lr=null,!0):!1;default:return!1}}function ll(e){return(e.mode&1)!==0&&(e.flags&128)===0}function cl(e){if(lt){var t=lr;if(t){var n=t;if(!kd(e,t)){if(ll(e))throw Error(a(418));t=an(n.nextSibling);var i=ir;t&&kd(e,t)?Sd(i,n):(e.flags=e.flags&-4097|2,lt=!1,ir=e)}}else{if(ll(e))throw Error(a(418));e.flags=e.flags&-4097|2,lt=!1,ir=e}}}function Cd(e){for(e=e.
Line truncated
|
||||
Error generating stack: `+y.message+`
|
||||
`+y.stack}return{value:e,source:t,stack:d,digest:null}}function Al(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Bl(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Pm=typeof WeakMap=="function"?WeakMap:Map;function af(e,t,n){n=$r(-1,n),n.tag=3,n.payload={element:null};var i=t.value;return n.callback=function(){bs||(bs=!0,ql=i),Bl(e,t)},n}function sf(e,t,n){n=$r(-1,n),n.tag=3;var i=e.type.getDerivedStateFromError;if(typeof i=="function"){var d=t.value;n.payload=function(){return i(d)},n.callback=function(){Bl(e,t)}}var y=e.stateNode;return y!==null&&typeof y.componentDidCatch=="function"&&(n.callback=function(){Bl(e,t),typeof i!="function"&&(hn===null?hn=new Set([this]):hn.add(this));var T=t.stack;this.componentDidCatch(t.value,{componentStack:T!==null?T:""})}),n}function lf(e,t,n){var i=e.pingCache;if(i===null){i=e.pingCache=new Pm;var d=new Set;i.set(t,d)}else d=i.get(t),d===void 0&&(d=new Set,i.set(t,d));d.has(n)||(d.add(n),e=Um.bind(null,e,t,n),t.then(e,e))}function cf(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function uf(e,t,n,i,d){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=$r(-1,1),t.tag=2,dn(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=d,e)}var Rm=R.ReactCurrentOwner,Jt=!1;function Gt(e,t,n,i){t.child=e===null?Rd(t,null,n,i):ao(t,e.child,n,i)}function df(e,t,n,i,d){n=n.render;var y=t.ref;return io(t,d),i=Sl(e,t,n,i,y,d),n=kl(),e!==null&&!Jt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~d,Yr(e,t,d)):(lt&&n&&sl(t),t.flags|=1,Gt(e,t,i,d),t.child)}function ff(e,t,n,i,d){if(e===null){var y=n.type;return typeof y=="function"&&!ec(y)&&y.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=y,hf(e,t,y,i,d)):(e=Ts(n.type,null,i,t,t.mode,d),e.ref=t.ref,e.return=t,t.child=e)}if(y=e.child,(e.lanes&d)===0){var T=y.memoizedProps;if(n=n.compare,n=n!==null?n:Wo,n(T,i)&&e.ref===t.ref)return Yr(e,t,d)}return t.flags|=1,e=yn(y,i),e.ref=t.ref,e.return=t,t.child=e}function hf(e,t,n,i,d){if(e!==null){var y=e.memoizedProps;if(Wo(y,i)&&e.ref===t.ref)if(Jt=!1,t.pendingProps=i=y,(e.lanes&d)!==0)(e.flags&131072)!==0&&(Jt=!0);else return t.lanes=e.lanes,Yr(e,t,d)}return jl(e,t,n,i,d)}function pf(e,t,n){var i=t.pendingProps,d=i.children,y=e!==null?e.memoizedState:null;if(i.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},et(fo,cr),cr|=n;else{if((n&1073741824)===0)return e=y!==null?y.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,et(fo,cr),cr|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=y!==null?y.baseLanes:n,et(fo,cr),cr|=i}else y!==null?(i=y.baseLanes|n,t.memoizedState=null):i=n,et(fo,cr),cr|=i;return Gt(e,t,d,n),t.child}function mf(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function jl(e,t,n,i,d){var y=Zt(n)?Tn:Ht.current;return y=to(t,y),io(t,d),n=Sl(e,t,n,i,y,d),i=kl(),e!==null&&!Jt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~d,Yr(e,t,d)):(lt&&i&&sl(t),t.flags|=1,Gt(e,t,n,d),t.child)}function vf(e,t,n,i,d){if(Zt(n)){var y=!0;Za(t)}else y=!1;if(io(t,d),t.stateNode===null)vs(e,t),nf(t,n,i),Nl(t,n,i,d),i=!0;else if(e===null){var T=t.stateNode,M=t.memoizedProps;T.props=M;var z=T.context,Y=n.contextType;typeof Y=="object"&&Y!==null?Y=mr(Y):(Y=Zt(n)?Tn:Ht.current,Y=to(t,Y));var ie=n.getDerivedStateFromProps,ue=typeof ie=="function"||typeof T.getSnapshotBeforeUpdate=="function";ue||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(M!==i||z!==Y)&&of(t,T,i,Y),un=!1;var se=t.memoizedState;T.state=se,is(t,i,T,d),z=t.memoizedState,M!==i||se!==z||Qt.current||un?(typeof ie=="function"&&(Rl(t,n,ie,i),z=t.memoizedState),(M=un||rf(t,n,M,i,se,z,Y))?(ue||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount()),typeof T.componentDidMount=="function"&&(t.flags|=4194308)):(typeof T.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=z),T.props=i,T.state=z,T.context=Y,i=M):(typeof T.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{T=t.stateNode,Ad(e,t),M=t.memoizedProps,Y=t.type===t.elementType?M:Cr(t.type,M),T.props=Y,ue=t.pendingProps,se=T.context,z=n.contextType,typeof z=="object"&&z!==null?z=mr(z):(z=Zt(n)?Tn:Ht.current,z=to(t,z));var me=n.getDerivedStateFromProps;(ie=typeof me=="function"||typeof T.getSnapshotBeforeUpdate=="function")||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(M!==ue||se!==z)&&of(t,T,i,z),un=!1,se=t.memoizedState,T
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 dv=r=>r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),fv=r=>r.replace(/^([A-Z])|[\s-_]+(\w)/g,(o,a,s)=>s?s.toUpperCase():a.toLowerCase()),sh=r=>{const o=fv(r);return o.charAt(0).toUpperCase()+o.slice(1)},e0=(...r)=>r.filter((o,a,s)=>!!o&&o.trim()!==""&&s.indexOf(o)===a).join(" ").trim(),hv=r=>{for(const o in r)if(o.startsWith("aria-")||o==="role"||o==="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 pv={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 mv=N.forwardRef(({color:r="currentColor",size:o=24,strokeWidth:a=2,absoluteStrokeWidth:s,className:c="",children:l,iconNode:p,...u},f)=>N.createElement("svg",{ref:f,...pv,width:o,height:o,stroke:r,strokeWidth:s?Number(a)*24/Number(o):a,className:e0("lucide",c),...!l&&!hv(u)&&{"aria-hidden":"true"},...u},[...p.map(([h,v])=>N.createElement(h,v)),...Array.isArray(l)?l:[l]]));/**
|
||||
* @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 nu=(r,o)=>{const a=N.forwardRef(({className:s,...c},l)=>N.createElement(mv,{ref:l,iconNode:o,className:e0(`lucide-${dv(sh(r))}`,`lucide-${r}`,s),...c}));return a.displayName=sh(r),a};/**
|
||||
* @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 vv=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],yv=nu("check",vv);/**
|
||||
* @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 gv=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],xv=nu("menu",gv);/**
|
||||
* @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 wv=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],t0=nu("x",wv);var r0=Jh();const n0=Zh(r0);function bv(r){if(typeof document>"u")return;let o=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",o.appendChild(a),a.styleSheet?a.styleSheet.cssText=r:a.appendChild(document.createTextNode(r))}const _v=r=>{switch(r){case"success":return Cv;case"info":return Tv;case"warning":return Ev;case"error":return Pv;default:return null}},Sv=Array(12).fill(0),kv=({visible:r,className:o})=>fe.createElement("div",{className:["sonner-loading-wrapper",o].filter(Boolean).join(" "),"data-visible":r},fe.createElement("div",{className:"sonner-spinner"},Sv.map((a,s)=>fe.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${s}`})))),Cv=fe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},fe.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Ev=fe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},fe.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Tv=fe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},fe.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Pv=fe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},fe.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Rv=fe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},fe.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),fe.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Nv=()=>{const[r,o]=fe.useState(document.hidden);return fe.useEffect(()=>{const a=()=>{o(document.hidden)};return document.addEventListener("visibilitychange",a),()=>window.removeEventListener("visibilitychange",a)},[]),r};let Vc=1;class Av{constructor(){this.subscribe=o=>(this.subscribers.push(o),()=>{const a=this.subscribers.indexOf(o);this.subscribers.splice(a,1)}),this.publish=o=>{this.subscribers.forEach(a=>a(o))},this.addToast=o=>{this.publish(o),this.toasts=[...this.toasts,o]},this.create=o=>{var a;const{message:s,...c}=o,l=typeof(o==null?void 0:o.id)=="number"||((a=o.id)==null?void 0:a.length)>0?o.id:Vc++,p=this.toasts.find(f=>f.id===l),u=o.dismissible===void 0?!0:o.dismissible;return this.dismissedToasts.has(l)&&this.dismissedToasts.delete(l),p?this.toasts=this.toasts.map(f=>f.id===l?(this.publish({...f,...o,id:l,title:s}),{...f,...o,id:l,dismissible:u,title:s}):f):this.addToast({title:s,...c,dismissible:u,id:l}),l},this.dismiss=o=>(o?(this.dismissedToasts.add(o),requestAnimationFrame(()=>this.subscribers.forEach(a=>a({id:o,dismiss:!0})))):this.toasts.forEach(a=>{this.subscribers.forEach(s=>s({id:a.id,dismiss:!0}))}),o),this.message=(o,a)=>this.create({...a,message:o}),this.error=(o,a)=>this.create({...a,message:o,type:"error"}),this.success=(o,a)=>this.create({...a,type:"success",message:o}),this.info=(o,a)=>this.create({...a,type:"info",message:o}),this.warning=(o,a)=>this.create({...a,type:"warning",message:o}),this.loading=(o,a)=>this.create({...a,type:"loading",message:o}),this.promise=(o,a)=>{if(!a)return;let s;a.loading!==void 0&&(s=this.create({...a,promise:o,type:"loading",message:a.loading,description:typeof a.description!="function"?a.description:void 0}));const c=Promise.resolve(o instanceof Function?o():o);let l=s!==void 0,p;const u=c.then(async h=>{if(p=["resolve",h],fe.isValidElement(h))l=!1,this.create({id:s,type:"default",message:h});else if(jv(h)&&!h.ok){l=!1;const m=typeof a.error=="function"?await a.error(`HTTP error! status: ${h.status}`):a.error,g=typeof a.description=="function"?await a.description(`HTTP error! status: ${h.status}`):a.description,_=typeof m=="object"&&!fe.isValidElement(m)?m:{message:m};this.create({id:s,type:"error",description:g,..._})}else if(h instanceof Error){l=!1;const m=typeof a.error=="function"?await a.error(h):a.error,Line truncated
|
||||
`).map((Q,ne,U)=>A.jsxs("span",{children:[Q,ne<U.length-1&&A.jsx("br",{})]},ne)),!L&&A.jsx("span",{className:"text-[10px] text-muted-foreground/50 ml-2",children:xh(w.sender_timestamp||w.received_at)}),w.outgoing&&(w.acked?" ✓":" ?")]})]})]},w.id)})]})}const sy=N.forwardRef(function({onSend:o,disabled:a,placeholder:s},c){const[l,p]=N.useState(""),[u,f]=N.useState(!1),h=N.useRef(null);N.useImperativeHandle(c,()=>({appendText:g=>{var S;p(_=>_+g),(S=h.current)==null||S.focus()}}));const v=N.useCallback(async g=>{g.preventDefault();const S=l.trim();if(!(!S||u||a)){f(!0);try{await o(S),p("")}catch(_){console.error("Failed to send message:",_)}finally{f(!1)}}},[l,u,a,o]),m=N.useCallback(g=>{g.key==="Enter"&&!g.shiftKey&&(g.preventDefault(),v(g))},[v]);return A.jsxs("form",{className:"px-4 py-3 border-t border-border flex gap-2",onSubmit:v,children:[A.jsx(_t,{ref:h,type:"text",value:l,onChange:g=>p(g.target.value),onKeyDown:m,placeholder:s||"Type a message...",disabled:a||u,className:"flex-1"}),A.jsx(Ur,{type:"submit",disabled:a||u||!l.trim(),children:u?"Sending...":"Send"})]})});function Et(r,o,{checkForDefaultPrevented:a=!0}={}){return function(c){if(r==null||r(c),a===!1||!c.defaultPrevented)return o==null?void 0:o(c)}}function iy(r,o){const a=N.createContext(o),s=l=>{const{children:p,...u}=l,f=N.useMemo(()=>u,Object.values(u));return A.jsx(a.Provider,{value:f,children:p})};s.displayName=r+"Provider";function c(l){const p=N.useContext(a);if(p)return p;if(o!==void 0)return o;throw new Error(`\`${l}\` must be used within \`${r}\``)}return[s,c]}function Ea(r,o=[]){let a=[];function s(l,p){const u=N.createContext(p),f=a.length;a=[...a,p];const h=m=>{var w;const{scope:g,children:S,..._}=m,C=((w=g==null?void 0:g[r])==null?void 0:w[f])||u,x=N.useMemo(()=>_,Object.values(_));return A.jsx(C.Provider,{value:x,children:S})};h.displayName=l+"Provider";function v(m,g){var C;const S=((C=g==null?void 0:g[r])==null?void 0:C[f])||u,_=N.useContext(S);if(_)return _;if(p!==void 0)return p;throw new Error(`\`${m}\` must be used within \`${l}\``)}return[h,v]}const c=()=>{const l=a.map(p=>N.createContext(p));return function(u){const f=(u==null?void 0:u[r])||l;return N.useMemo(()=>({[`__scope${r}`]:{...u,[r]:f}}),[u,f])}};return c.scopeName=r,[s,ly(c,...o)]}function ly(...r){const o=r[0];if(r.length===1)return o;const a=()=>{const s=r.map(c=>({useScope:c(),scopeName:c.scopeName}));return function(l){const p=s.reduce((u,{useScope:f,scopeName:h})=>{const m=f(l)[`__scope${h}`];return{...u,...m}},{});return N.useMemo(()=>({[`__scope${o.scopeName}`]:p}),[p])}};return a.scopeName=o.scopeName,a}var Eo=globalThis!=null&&globalThis.document?N.useLayoutEffect:()=>{},cy=ru[" useId ".trim().toString()]||(()=>{}),uy=0;function _a(r){const[o,a]=N.useState(cy());return Eo(()=>{a(s=>s??String(uy++))},[r]),o?`radix-${o}`:""}var dy=ru[" useInsertionEffect ".trim().toString()]||Eo;function pi({prop:r,defaultProp:o,onChange:a=()=>{},caller:s}){const[c,l,p]=fy({defaultProp:o,onChange:a}),u=r!==void 0,f=u?r:c;{const v=N.useRef(r!==void 0);N.useEffect(()=>{const m=v.current;m!==u&&console.warn(`${s} is changing from ${m?"controlled":"uncontrolled"} to ${u?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),v.current=u},[u,s])}const h=N.useCallback(v=>{var m;if(u){const g=hy(v)?v(r):v;g!==r&&((m=p.current)==null||m.call(p,g))}else l(v)},[u,r,l,p]);return[f,h]}function fy({defaultProp:r,onChange:o}){const[a,s]=N.useState(r),c=N.useRef(a),l=N.useRef(o);return dy(()=>{l.current=o},[o]),N.useEffect(()=>{var p;c.current!==a&&((p=l.current)==null||p.call(l,a),c.current=a)},[a,c]),[a,s,l]}function hy(r){return typeof r=="function"}function py(r){const o=my(r),a=N.forwardRef((s,c)=>{const{children:l,...p}=s,u=N.Children.toArray(l),f=u.find(yy);if(f){const h=f.props.children,v=u.map(m=>m===f?N.Children.count(h)>1?N.Children.only(null):N.isValidElement(h)?h.props.children:null:m);return A.jsx(o,{...p,ref:c,children:N.isValidElement(h)?N.cloneElement(h,void 0,v):null})}return A.jsx(o,{...p,ref:c,children:l})});return a.displayName=`${r}.Slot`,a}function my(r){const o=N.forwardRef((a,s)=>{const{children:c,...l}=a;if(N.isValidElement(c)){const p=xy(c),u=gy(l,c.props);return c.type!==N.Fragment&&(u.ref=s?Ca(s,p):p),N.cloneElement(c,u)}return N.Children.count(c)>1?N.Children.only(null):null});return o.displayName=`${r}.SlotClone`,o}var vy=Symbol("radix.slottable");function yy(r){return N.isValidElement(r)&&typeof r.type=="function"&&"__radixId"in r.type&&r.type.__radixId===vy}function gy(r,o){const a={...o};for(const s in o){const c=r[s],l=o[s];/^on[A-Z]/.test(s)?c&&l?a[s]=(...u)=>{const f=l(...u);return c(...u),f}:c&&(a[s]=c):s==="style"?a[s]={...c,...l}:s==="className"&&(a[s]=[c,l].filter(Boolean).join(" "))}return{...r,...a}}function xy(r){var s,c;let o=(s=Object.getOwnPropertyDescriptor(r.props,"ref"))==null?void 0:s.getLine truncated
|
||||
.`.concat(Vy,` {
|
||||
overflow: hidden `).concat(s,`;
|
||||
padding-right: `).concat(u,"px ").concat(s,`;
|
||||
}
|
||||
body[`).concat(So,`] {
|
||||
overflow: hidden `).concat(s,`;
|
||||
overscroll-behavior: contain;
|
||||
`).concat([o&&"position: relative ".concat(s,";"),a==="margin"&&`
|
||||
padding-left: `.concat(c,`px;
|
||||
padding-top: `).concat(l,`px;
|
||||
padding-right: `).concat(p,`px;
|
||||
margin-left:0;
|
||||
margin-top:0;
|
||||
margin-right: `).concat(u,"px ").concat(s,`;
|
||||
`),a==="padding"&&"padding-right: ".concat(u,"px ").concat(s,";")].filter(Boolean).join(""),`
|
||||
}
|
||||
|
||||
.`).concat(oi,` {
|
||||
right: `).concat(u,"px ").concat(s,`;
|
||||
}
|
||||
|
||||
.`).concat(ai,` {
|
||||
margin-right: `).concat(u,"px ").concat(s,`;
|
||||
}
|
||||
|
||||
.`).concat(oi," .").concat(oi,` {
|
||||
right: 0 `).concat(s,`;
|
||||
}
|
||||
|
||||
.`).concat(ai," .").concat(ai,` {
|
||||
margin-right: 0 `).concat(s,`;
|
||||
}
|
||||
|
||||
body[`).concat(So,`] {
|
||||
`).concat(Wy,": ").concat(u,`px;
|
||||
}
|
||||
`)},Ph=function(){var r=parseInt(document.body.getAttribute(So)||"0",10);return isFinite(r)?r:0},cg=function(){N.useEffect(function(){return document.body.setAttribute(So,(Ph()+1).toString()),function(){var r=Ph()-1;r<=0?document.body.removeAttribute(So):document.body.setAttribute(So,r.toString())}},[])},ug=function(r){var o=r.noRelative,a=r.noImportant,s=r.gapMode,c=s===void 0?"margin":s;cg();var l=N.useMemo(function(){return sg(c)},[c]);return N.createElement(ig,{styles:lg(l,!o,c,a?"":"!important")})},Yc=!1;if(typeof window<"u")try{var Ls=Object.defineProperty({},"passive",{get:function(){return Yc=!0,!0}});window.addEventListener("test",Ls,Ls),window.removeEventListener("test",Ls,Ls)}catch{Yc=!1}var vo=Yc?{passive:!1}:!1,dg=function(r){return r.tagName==="TEXTAREA"},B0=function(r,o){if(!(r instanceof Element))return!1;var a=window.getComputedStyle(r);return a[o]!=="hidden"&&!(a.overflowY===a.overflowX&&!dg(r)&&a[o]==="visible")},fg=function(r){return B0(r,"overflowY")},hg=function(r){return B0(r,"overflowX")},Rh=function(r,o){var a=o.ownerDocument,s=o;do{typeof ShadowRoot<"u"&&s instanceof ShadowRoot&&(s=s.host);var c=j0(r,s);if(c){var l=D0(r,s),p=l[1],u=l[2];if(p>u)return!0}s=s.parentNode}while(s&&s!==a.body);return!1},pg=function(r){var o=r.scrollTop,a=r.scrollHeight,s=r.clientHeight;return[o,a,s]},mg=function(r){var o=r.scrollLeft,a=r.scrollWidth,s=r.clientWidth;return[o,a,s]},j0=function(r,o){return r==="v"?fg(o):hg(o)},D0=function(r,o){return r==="v"?pg(o):mg(o)},vg=function(r,o){return r==="h"&&o==="rtl"?-1:1},yg=function(r,o,a,s,c){var l=vg(r,window.getComputedStyle(o).direction),p=l*s,u=a.target,f=o.contains(u),h=!1,v=p>0,m=0,g=0;do{if(!u)break;var S=D0(r,u),_=S[0],C=S[1],x=S[2],w=C-x-l*_;(_||w)&&j0(r,u)&&(m+=w,g+=_);var k=u.parentNode;u=k&&k.nodeType===Node.DOCUMENT_FRAGMENT_NODE?k.host:k}while(!f&&u!==document.body||f&&(o.contains(u)||o===u));return(v&&Math.abs(m)<1||!v&&Math.abs(g)<1)&&(h=!0),h},zs=function(r){return"changedTouches"in r?[r.changedTouches[0].clientX,r.changedTouches[0].clientY]:[0,0]},Nh=function(r){return[r.deltaX,r.deltaY]},Ah=function(r){return r&&"current"in r?r.current:r},gg=function(r,o){return r[0]===o[0]&&r[1]===o[1]},xg=function(r){return`
|
||||
.block-interactivity-`.concat(r,` {pointer-events: none;}
|
||||
.allow-interactivity-`).concat(r,` {pointer-events: all;}
|
||||
`)},wg=0,yo=[];function bg(r){var o=N.useRef([]),a=N.useRef([0,0]),s=N.useRef(),c=N.useState(wg++)[0],l=N.useState(A0)[0],p=N.useRef(r);N.useEffect(function(){p.current=r},[r]),N.useEffect(function(){if(r.inert){document.body.classList.add("block-interactivity-".concat(c));var C=Uy([r.lockRef.current],(r.shards||[]).map(Ah),!0).filter(Boolean);return C.forEach(function(x){return x.classList.add("allow-interactivity-".concat(c))}),function(){document.body.classList.remove("block-interactivity-".concat(c)),C.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(c))})}}},[r.inert,r.lockRef.current,r.shards]);var u=N.useCallback(function(C,x){if("touches"in C&&C.touches.length===2||C.type==="wheel"&&C.ctrlKey)return!p.current.allowPinchZoom;var w=zs(C),k=a.current,b="deltaX"in C?C.deltaX:k[0]-w[0],R="deltaY"in C?C.deltaY:k[1]-w[1],P,j=C.target,B=Math.abs(b)>Math.abs(R)?"h":"v";if("touches"in C&&B==="h"&&j.type==="range")return!1;var D=window.getSelection(),F=D&&D.anchorNode,O=F?F===j||F.contains(j):!1;if(O)return!1;var L=Rh(B,j);if(!L)return!0;if(L?P=B:(P=B==="v"?"h":"v",L=Rh(B,j)),!L)return!1;if(!s.current&&"changedTouches"in C&&(b||R)&&(s.current=P),!P)return!0;var G=s.current||P;return yg(G,x,C,G==="h"?b:R)},[]),f=N.useCallback(function(C){var x=C;if(!(!yo.length||yo[yo.length-1]!==l)){var w="deltaY"in x?Nh(x):zs(x),k=o.current.filter(function(P){return P.name===x.type&&(P.target===x.target||x.target===P.shadowParent)&&gg(P.delta,w)})[0];if(k&&k.should){x.cancelable&&x.preventDefault();return}if(!k){var b=(p.current.shards||[]).map(Ah).filter(Boolean).filter(function(P){return P.contains(x.target)}),R=b.length>0?u(x,b[0]):!p.current.noIsolation;R&&x.cancelable&&x.preventDefault()}}},[]),h=N.useCallback(function(C,x,w,k){var b={name:C,delta:x,target:w,should:k,shadowParent:_g(w)};o.current.push(b),setTimeout(function(){o.current=o.current.filter(function(R){return R!==b})},1)},[]),v=N.useCallback(function(C){a.current=zs(C),s.current=void 0},[]),m=N.useCallback(function(C){h(C.type,Nh(C),C.target,u(C,r.lockRef.current))},[]),g=N.useCallback(function(C){h(C.type,zs(C),C.target,u(C,r.lockRef.current))},[]);N.useEffect(function(){return yo.push(l),r.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:g}),document.addEventListener("wheel",f,vo),document.addEventListener("touchmove",f,vo),document.addEventListener("touchstart",v,vo),function(){yo=yo.filter(function(C){return C!==l}),document.removeEventListener("wheel",f,vo),document.removeEventListener("touchmove",f,vo),document.removeEventListener("touchstart",v,vo)}},[]);var S=r.removeScrollBar,_=r.inert;return N.createElement(N.Fragment,null,_?N.createElement(l,{styles:xg(c)}):null,S?N.createElement(ug,{noRelative:r.noRelative,gapMode:r.gapMode}):null)}function _g(r){for(var o=null;r!==null;)r instanceof ShadowRoot&&(o=r.host,r=r.host),r=r.parentNode;return o}const Sg=Qy(N0,bg);var O0=N.forwardRef(function(r,o){return N.createElement(mi,zr({},r,{ref:o,sideCar:Sg}))});O0.classNames=mi.classNames;var kg=function(r){if(typeof document>"u")return null;var o=Array.isArray(r)?r[0]:r;return o.ownerDocument.body},go=new WeakMap,Us=new WeakMap,Vs={},bc=0,M0=function(r){return r&&(r.host||M0(r.parentNode))},Cg=function(r,o){return o.map(function(a){if(r.contains(a))return a;var s=M0(a);return s&&r.contains(s)?s:(console.error("aria-hidden",a,"in not contained inside",r,". Doing nothing"),null)}).filter(function(a){return!!a})},Eg=function(r,o,a,s){var c=Cg(o,Array.isArray(r)?r:[r]);Vs[a]||(Vs[a]=new WeakMap);var l=Vs[a],p=[],u=new Set,f=new Set(c),h=function(m){!m||u.has(m)||(u.add(m),h(m.parentNode))};c.forEach(h);var v=function(m){!m||f.has(m)||Array.prototype.forEach.call(m.children,function(g){if(u.has(g))v(g);else try{var S=g.getAttribute(s),_=S!==null&&S!=="false",C=(go.get(g)||0)+1,x=(l.get(g)||0)+1;go.set(g,C),l.set(g,x),p.push(g),C===1&&_&&Us.set(g,!0),x===1&&g.setAttribute(a,"true"),_||g.setAttribute(s,"true")}catch(w){console.error("aria-hidden: cannot operate on ",g,w)}})};return v(o),u.clear(),bc++,function(){p.forEach(function(m){var g=go.get(m)-1,S=l.get(m)-1;go.set(m,g),l.set(m,S),g||(Us.has(m)||m.removeAttribute(s),Us.delete(m)),S||m.removeAttribute(a)}),bc--,bc||(go=new WeakMap,go=new WeakMap,Us=new WeakMap,Vs={})}},Tg=function(r,o,a){a===void 0&&(a="data-aria-hidden");var s=Array.from(Array.isArray(r)?r:[r]),c=kg(r);return c?(s.push.apply(s,Array.from(c.querySelectorAll("[aria-live], script"))),Eg(s,c,a,"aria-hidden")):function(){return null}};function Pg(r){const o=Rg(r),a=N.forwardRef((s,c)=>{const{children:l,...p}=s,u=N.Children.toArray(l),f=u.find(Ag);if(f){const h=f.props.children,v=u.map(m=>m===f?N.Children.count(h)>1?N.Children.only(null):N.isValidElement(h)?h.props.children:null:m);return A.jsx(o,{...p,ref:c,children:N.isValidElement(h)?N.cloneElement(h,void 0,v):null})}return A.jsx(o,{...p,ref:c,children:l})});return a.displayName=`${r}.Slot`,a}function Rg(r){const o=N.forwardRef((a,s)=>{const{children:c
Line truncated
|
||||
|
||||
If you want to hide the \`${o.titleName}\`, you can wrap it with our VisuallyHidden component.
|
||||
|
||||
For more information, see https://radix-ui.com/primitives/docs/components/${o.docsSlug}`;return N.useEffect(()=>{r&&(document.getElementById(r)||console.error(a))},[a,r]),null},Ug="DialogDescriptionWarning",Vg=({contentRef:r,descriptionId:o})=>{const s=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Q0(Ug).contentName}}.`;return N.useEffect(()=>{var l;const c=(l=r.current)==null?void 0:l.getAttribute("aria-describedby");o&&c&&(document.getElementById(o)||console.warn(s))},[s,r,o]),null},Z0=F0,J0=z0,yi=U0,gi=V0,xi=K0,wi=q0,ep=Y0;const tp=Z0,Wg=J0,rp=N.forwardRef(({className:r,...o},a)=>A.jsx(yi,{ref:a,className:Xe("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),...o}));rp.displayName=yi.displayName;const cu=N.forwardRef(({className:r,children:o,...a},s)=>A.jsxs(Wg,{children:[A.jsx(rp,{}),A.jsxs(gi,{ref:s,className:Xe("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),...a,children:[o,A.jsxs(ep,{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:[A.jsx(t0,{className:"h-4 w-4"}),A.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));cu.displayName=gi.displayName;const uu=({className:r,...o})=>A.jsx("div",{className:Xe("flex flex-col space-y-1.5 text-center sm:text-left",r),...o});uu.displayName="DialogHeader";const du=({className:r,...o})=>A.jsx("div",{className:Xe("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",r),...o});du.displayName="DialogFooter";const fu=N.forwardRef(({className:r,...o},a)=>A.jsx(xi,{ref:a,className:Xe("text-lg font-semibold leading-none tracking-tight",r),...o}));fu.displayName=xi.displayName;const Kg=N.forwardRef(({className:r,...o},a)=>A.jsx(wi,{ref:a,className:Xe("text-sm text-muted-foreground",r),...o}));Kg.displayName=wi.displayName;function Bh(r){const o=Gg(r),a=N.forwardRef((s,c)=>{const{children:l,...p}=s,u=N.Children.toArray(l),f=u.find($g);if(f){const h=f.props.children,v=u.map(m=>m===f?N.Children.count(h)>1?N.Children.only(null):N.isValidElement(h)?h.props.children:null:m);return A.jsx(o,{...p,ref:c,children:N.isValidElement(h)?N.cloneElement(h,void 0,v):null})}return A.jsx(o,{...p,ref:c,children:l})});return a.displayName=`${r}.Slot`,a}function Gg(r){const o=N.forwardRef((a,s)=>{const{children:c,...l}=a;if(N.isValidElement(c)){const p=Xg(c),u=Yg(l,c.props);return c.type!==N.Fragment&&(u.ref=s?Ca(s,p):p),N.cloneElement(c,u)}return N.Children.count(c)>1?N.Children.only(null):null});return o.displayName=`${r}.SlotClone`,o}var qg=Symbol("radix.slottable");function $g(r){return N.isValidElement(r)&&typeof r.type=="function"&&"__radixId"in r.type&&r.type.__radixId===qg}function Yg(r,o){const a={...o};for(const s in o){const c=r[s],l=o[s];/^on[A-Z]/.test(s)?c&&l?a[s]=(...u)=>{const f=l(...u);return c(...u),f}:c&&(a[s]=c):s==="style"?a[s]={...c,...l}:s==="className"&&(a[s]=[c,l].filter(Boolean).join(" "))}return{...r,...a}}function Xg(r){var s,c;let o=(s=Object.getOwnPropertyDescriptor(r.props,"ref"))==null?void 0:s.get,a=o&&"isReactWarning"in o&&o.isReactWarning;return a?r.ref:(o=(c=Object.getOwnPropertyDescriptor(r,"ref"))==null?void 0:c.get,a=o&&"isReactWarning"in o&&o.isReactWarning,a?r.props.ref:r.props.ref||r.ref)}function Qg(r){const o=r+"CollectionProvider",[a,s]=Ea(o),[c,l]=a(o,{collectionRef:{current:null},itemMap:new Map}),p=C=>{const{scope:x,children:w}=C,k=fe.useRef(null),b=fe.useRef(new Map).current;return A.jsx(c,{scope:x,itemMap:b,collectionRef:k,children:w})};p.displayName=o;const u=r+"CollectionSlot",f=Bh(u),h=fe.forwardRef((C,x)=>{const{scope:w,children:k}=C,b=l(u,w),R=xr(x,b.collectionRef);return A.jsx(f,{ref:R,children:k})});h.displayName=u;const v=r+"CollectionItemSlot",m="data-radix-collection-item",g=Bh(v),S=fe.forwardRef((C,x)=>{const{scope:w,children:k,...b}=C,R=fe.useRef(null),P=xr(x,R),j=l(v,w);return fe.useEffect(()=>(j.itemMap.set(R,{ref:R,...b}),()=>void j.itemMap.delete(R))),A.jsx(g,{[m]:"",ref:P,children:k})});S.displayName=v;function _(C){const x=l(r+"CollectionConsumer",C);return fe.useCallback(()=>{const k=x.collectionRef.current;if(!k)return[];const b=Array.from(k.querySelectorAll(`[${m}]`));return Array.from(x.itemMap.values()).sort((j,B)=>b.indexOf(j.ref.current)-b.indexOf(B.ref.current))},[x.coll
Line 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:u+f,endByte:u+c.length-1,value:g});const S={type:o.PayloadType.Request,version:o.PayloadVersion.Version1,isValid:!0,timestamp:0,requestType:o.RequestType.GetStats,requestData:"",destinationHash:h,sourceHash:v,cipherMac:m,ciphertext:g};return l!=null&&l.includeSegments&&(S.segments=p),S}catch(p){return{type:o.PayloadType.Request,version:o.PayloadVersion.Version1,isValid:!1,errors:[p instanceof Error?p.message:"Failed to decode request payload"],timestamp:0,requestType:o.RequestType.GetStats,requestData:"",destinationHash:"",sourceHash:"",cipherMac:"",ciphertext:""}}}};r.RequestPayloadDecoder=s}}),k3=Se({"node_modules/@michaelhart/meshcore-decoder/dist/decoder/payload-decoders/response.js"(r){Object.defineProperty(r,"__esModule",{value:!0}),r.ResponsePayloadDecoder=void 0;var o=ur(),a=Ft(),s=class{static decode(c,l){try{if(c.length<4){const _={type:o.PayloadType.Response,version:o.PayloadVersion.Version1,isValid:!1,errors:["Response payload too short (minimum 4 bytes: dest + source + MAC)"],destinationHash:"",sourceHash:"",cipherMac:"",ciphertext:"",ciphertextLength:0};return l!=null&&l.includeSegments&&(_.segments=[{name:"Invalid Response Data",description:"Response payload too short (minimum 4 bytes required)",startByte:l.segmentOffset||0,endByte:(l.segmentOffset||0)+c.length-1,value:(0,a.bytesToHex)(c)}]),_}const p=[],u=(l==null?void 0:l.segmentOffset)||0;let f=0;const h=(0,a.byteToHex)(c[f]);l!=null&&l.includeSegments&&p.push({name:"Destination Hash",description:"First byte of destination node public key",startByte:u+f,endByte:u+f,value:h}),f+=1;const v=(0,a.byteToHex)(c[f]);l!=null&&l.includeSegments&&p.push({name:"Source Hash",description:"First byte of source node public key",startByte:u+f,endByte:u+f,value:v}),f+=1;const m=(0,a.bytesToHex)(c.subarray(f,f+2));l!=null&&l.includeSegments&&p.push({name:"Cipher MAC",description:"MAC for encrypted data in next field",startByte:u+f,endByte:u+f+1,value:m}),f+=2;const g=(0,a.bytesToHex)(c.subarray(f));l!=null&&l.includeSegments&&c.length>f&&p.push({name:"Ciphertext",description:"Encrypted response data (tag + content)",startByte:u+f,endByte:u+c.length-1,value:g});const S={type:o.PayloadType.Response,version:o.PayloadVersion.Version1,isValid:!0,destinationHash:h,sourceHash:v,cipherMac:m,ciphertext:g,ciphertextLength:c.length-4};return l!=null&&l.includeSegments&&(S.segments=p),S}catch(p){return{type:o.PayloadType.Response,version:o.PayloadVersion.Version1,isValid:!1,errors:[p instanceof Error?p.message:"Failed to decode response payload"],destinationHash:"",sourceHash:"",cipherMac:"",ciphertext:"",ciphertextLength:0}}}};r.ResponsePayloadDecoder=s}}),C3=Se({"node_modules/@michaelhart/meshcore-decoder/dist/decoder/payload-decoders/anon-request.js"(r){Object.defineProperty(r,"__esModule",{value:!0}),r.AnonRequestPayloadDecoder=void 0;var o=ur(),a=Ft(),s=class{static decode(c,l){try{if(c.length<35){const _={type:o.PayloadType.AnonRequest,version:o.PayloadVersion.Version1,isValid:!1,errors:["AnonRequest payload too short (minimum 35 bytes: dest + public key + MAC)"],destinationHash:"",senderPublicKey:"",cipherMac:"",ciphertext:"",ciphertextLength:0};return l!=null&&l.includeSegments&&(_.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:l.segmentOffset||0,endByte:(l.segmentOffset||0)+c.length-1,value:(0,a.bytesToHex)(c)}]),_}const p=[],u=(l==null?void 0:l.segmentOffset)||0;let f=0;const h=(0,a.byteToHex)(c[0]);l!=null&&l.includeSegments&&p.push({name:"Destination Hash",description:`First byte of destination node public key: 0x${h}`,startByte:u+f,endByte:u+f,value:h}),f+=1;const v=(0,a.bytesToHex)(c.subarray(1,33));l!=null&&l.includeSegments&&p.push({name:"Sender Public Key",description:"Ed25519 public key of the sender (32 bytes)",startByte:u+f,endByte:u+f+31,value:v}),f+=32;const m=(0,a.bytesToHex)(c.subarray(33,35));l!=null&&l.includeSegments&&p.push({name:"Cipher MAC",description:"MAC for encrypted data verification (2 bytes)",startByte:u+f,endByte:u+f+1,value:m}),f+=2;const g=(0,a.bytesToHex)(c.subarray(35));l!=null&&l.includeSegments&&c.length>35&&p.push({name:"Ciphertext",description:`Encrypted message data (${c.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:u+f,endByte:u+c.length-1,value:g});const S={type:o.PayloadType.AnonRequest,version:o.PayloadVersion.Version1,isValid:!0,destinationHash:h,senderPublicKey:v,cipherMac:m,ciphertext:g,ciphertextLength:c.length-35};return l!=null&&l.includeSegments&&(S.segments=p),S}catch(p){return{type:o.PayloadType.AnonRequest,version:o.PayloadVersion.Version1,isValid:!1,errors:[p instanceof Error?p.message:"Failed to decode AnonRequest payload"],destinationHash:"",senderPublicKey:"",cipherMac:"",ciphertext:"",ciphertextLength:0}}}};r.AnonRequestPayloadDecoder=s}}),E3=Se({"node_modules/@michaelhart/meshcore-decoder/dist/decoder/payload-decoders/ack.js"(r){Object.defineProperty(r,"__esModule",{value:!0}),r.AckPayloadDecoder=void 0;var o=ur(),a=Ft(),s=class{static decode(c,l){try{if(c.length<4){const v={type:o.PayloadType.Ack,version:o.PayloadVersion.Version1,isValid:!1,errors:["Ack payload too short (minimum 4 bytes for checksum)"],checksum:""};return l!=null&&l.includeSegments&&(v.segments=[{name:"Invalid Ack Data",description:"Ack payload too short (minimum 4 bytes required for checksum)",startByte:l.segmentOffset||0,endByte:(l.segmentOffset||0)+c.length-1,value:(0,a.bytesToHex)(c)}]),v}const p=[],u=(l==null?void 0:l.segmentOffset)||0,f=(0,a.bytesToHex)(c.subarray(0,4));l!=null&&l.includeSegments&&p.push({name:"Checksum",description:`CRC checksum of message timestamp, text, and sender pubkey: 0x${f}`,startByte:u,endByte:u+3,value:f}),l!=null&&l.includeSegments&&c.length>4&&p.push({name:"Additional Data",description:"Extra data in Ack payload",startByte:u+4,endByte:u+c.length-1,value:(0,a.bytesToHex)(c.subarray(4))});const h={type:o.PayloadType.Ack,version:o.PayloadVersion.Version1,isValid:!0,checksum:f};return l!=null&&l.includeSegments&&(h.segments=p),h}catch(p){return{type:o.PayloadType.Ack,version:o.PayloadVersion.Version1,isValid:!1,errors:[p instanceof Error?p.message:"Failed to decode Ack payload"],checksum:""}}}};r.AckPayloadDecoder=s}}),T3=Se({"node_modules/@michaelhart/meshcore-decoder/dist/decoder/payload-decoders/path.js"(r){Object.defineProperty(r,"__esModule",{value:!0}),r.PathPayloadDecoder=void 0;var o=ur(),a=Ft(),s=class{static decode(c){try{if(c.length<2)return{type:o.PayloadType.Path,version:o.PayloadVersion.Version1,isValid:!1,errors:["Path payload too short (minimum 2 bytes: path length + extra type)"],pathLength:0,pathHashes:[],extraType:0,extraData:""};const l=c[0];if(c.length<1+l+1)return{type:o.PayloadType.Path,version:o.PayloadVersion.Version1,isValid:!1,errors:[`Path payload too short (need ${1+l+1} bytes for path length + path + extra type)`],pathLength:l,pathHashes:[],extraType:0,extraData:""};const p=[];for(let h=0;h<l;h++)p.push((0,a.byteToHex)(c[1+h]));const u=c[1+l];let f="";return c.length>1+l+1&&(f=(0,a.bytesToHex)(c.subarray(1+l+1))),{type:o.PayloadType.Path,version:o.PayloadVersion.Version1,isValid:!0,pathLength:l,pathHashes:p,extraType:u,extraData:f}}catch(l){return{type:o.PayloadType.Path,version:o.PayloadVersion.Version1,isValid:!1,errors:[l instanceof Error?l.message:"Failed to decode Path payload"],pathLength:0,pathHashes:[],extraType:0,extraData:""}}}};r.PathPayloadDecoder=s}}),P3=Se({"node_modules/@michaelhart/meshcore-decoder/dist/decoder/payload-decoders/text-message.js"(r){Object.defineProperty(r,"__esModule",{value:!0}),r.TextMessagePayloadDecoder=void 0;var o=ur(),a=Ft(),s=class{static decode(c,l){try{if(c.length<4){const _={type:o.PayloadType.TextMessage,version:o.PayloadVersion.Version1,isValid:!1,errors:["TextMessage payload too short (minimum 4 bytes: dest + source + MAC)"],destinationHash:"",sourceHash:"",cipherMac:"",ciphertext:"",ciphertextLength:0};return l!=null&&l.includeSegments&&(_.segments=[{name:"Invalid TextMessage Data",description:"TextMessage payload too short (minimum 4 bytes required)",startByte:l.segmentOffset||0,endByte:(l.segmentOffset||0)+c.length-1,value:(0,a.bytesToHex)(c)}]),_}const p=[],u=(l==null?void 0:l.segmentOffset)||0;let f=0;const h=(0,a.byteToHex)(c[f]);l!=null&&l.includeSegments&&p.push({name:"Destination Hash",description:"First byte of destination node public key",startByte:u+f,endByte:u+f,value:h}),f+=1;const v=(0,a.byteToHex)(c[f]);l!=null&&l.includeSegments&&p.push({name:"Source Hash",description:"First byte of source node public key",startByte:u+f,endByte:u+f,value:v}),f+=1;const m=(0,a.bytesToHex)(c.subarray(f,f+2));l!=null&&l.includeSegments&&p.push({name:"Cipher MAC",description:"MAC for encrypted data in next field",startByte:u+f,endByte:u+f+1,value:m}),f+=2;const g=(0,a.bytesToHex)(c.subarray(f));l!=null&&l.includeSegments&&c.length>f&&p.push({name:"Ciphertext",description:"Encrypted message data (timestamp + message text)",startByte:u+f,endByte:u+c.length-1,value:g});const S={type:o.PayloadType.TextMessage,version:o.PayloadVersion.Version1,isValid:!0,destinationHash:h,sourceHash:v,cipherMac:m,ciphertext:g,ciphertextLength:c.length-4};return l!=null&&l.include
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 o=await navigator.gpu.requestAdapter();if(!o)return console.warn("No GPU adapter found"),!1;this.device=await o.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 c=0;c<2;c++)this.matchCountReadBuffers[c]=this.device.createBuffer({size:4,usage:GPUBufferUsage.MAP_READ|GPUBufferUsage.COPY_DST}),this.matchIndicesReadBuffers[c]=this.device.createBuffer({size:1024*4,usage:GPUBufferUsage.MAP_READ|GPUBufferUsage.COPY_DST});const a=this.device.createShaderModule({code:this.shaderCode}),s=this.device.createPipelineLayout({bindGroupLayouts:[this.bindGroupLayout]});return this.pipeline=this.device.createComputePipeline({layout:s,compute:{module:a,entryPoint:"main"}}),!0}catch(o){return console.error("WebGPU initialization failed:",o),!1}}isAvailable(){return this.device!==null&&this.pipeline!==null}indexToRoomName(o,a){return _o(a,o)}countNamesForLength(o){return wa(o)}async runBatch(o,a,s,c,l,p){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 u=this.currentReadBufferIndex;this.currentReadBufferIndex=1-this.currentReadBufferIndex;const f=this.matchCountReadBuffers[u],h=this.matchIndicesReadBuffers[u],v=l&&p?1:0;let m,g=0,S=0;if(v){const P=new Uint8Array(l.length/2);for(let O=0;O<P.length;O++)P[O]=parseInt(l.substr(O*2,2),16);g=P.length*8;const j=Math.ceil(P.length/4)*4,B=new Uint8Array(j);B.set(P),m=new Uint32Array(j/4);for(let O=0;O<m.length;O++)m[O]=B[O*4]<<24|B[O*4+1]<<16|B[O*4+2]<<8|B[O*4+3];const D=parseInt(p.substr(0,2),16),F=parseInt(p.substr(2,2),16);S=D<<24|F<<16}else m=new Uint32Array([0]);const _=Math.max(m.length*4,4);(!this.ciphertextBuffer||this.ciphertextBufferSize<_)&&(this.ciphertextBuffer&&this.ciphertextBuffer.destroy(),this.ciphertextBuffer=this.device.createBuffer({size:_,usage:GPUBufferUsage.STORAGE|GPUBufferUsage.COPY_DST}),this.ciphertextBufferSize=_,this.bindGroupDirty=!0);const C=new Uint32Array([o,s,a,c,S,m.length,g,v]);this.device.queue.writeBuffer(this.paramsBuffer,0,C),this.device.queue.writeBuffer(this.ciphertextBuffer,0,m),this.device.queue.writeBuffer(this.matchCountBuffer,0,r1.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 x=this.device.createCommandEncoder(),w=x.beginComputePass();w.setPipeline(this.pipeline),w.setBindGroup(0,this.bindGroup),w.dispatchWorkgroups(Math.ceil(c/(256*16))),w.end(),x.copyBufferToBuffer(this.matchCountBuffer,0,f,0,4),x.copyBufferToBuffer(this.matchIndicesBuffer,0,h,0,1024*4),this.device.queue.submit([x.finish()]),await f.mapAsync(GPUMapMode.READ);const b=new Uint32Array(f.getMappedRange())[0];f.unmap();const R=[];if(b>0){await h.mapAsync(GPUMapMode.READ);const P=new Uint32Array(h.getMappedRange());for(let j=0;j<Math.min(b,1024);j++)R.push(P[j]);h.unmap()}return R}destroy(){var o,a,s,c,l,p,u,f;(o=this.paramsBuffer)==null||o.destroy(),(a=this.matchCountBuffer)==null||a.destroy(),(s=this.matchIndicesBuffer)==null||s.destroy(),(c=this.ciphertextBuffer)==null||c.destroy(),(l=this.matchCountReadBuffers[0])==null||l.destroy(),(p=this.matchCountReadBuffers[1])==null||p.destroy(),(u=this.matchIndicesReadBuffers[0])==null||u.destroy(),(f=this.matchIndicesReadBuffers[1])==null||f.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}};t1.ZERO_DATA=new Uint32Array([0]);var F3=t1;function H3(){return typeof navigator<"u"&&"gpu"in navigator}var L3=/^[a-z0-9-]+$/,z3=/^[a-z0-9].*[a-z0-9]$|^[a-z0-9]$/,U3=/
Line truncated
|
||||
`).map(c=>c.trim().toLowerCase()).filter(c=>c.length>0);this.wordlist=s.filter(Xh)}setWordlist(r){this.wordlist=r.map(o=>o.trim().toLowerCase()).filter(Xh)}abort(){this.abortFlag=!0}isGpuAvailable(){return H3()}async decodePacket(r){var a;const o=r.trim().replace(/\s+/g,"").replace(/^0x/i,"");if(!o||!/^[0-9a-fA-F]+$/.test(o))return null;try{const c=(a=(await qh.MeshCorePacketDecoder.decodeWithVerification(o,{})).payload)==null?void 0:a.decoded;return!(c!=null&&c.channelHash)||!(c!=null&&c.ciphertext)||!(c!=null&&c.cipherMac)?null:{channelHash:c.channelHash,ciphertext:c.ciphertext,cipherMac:c.cipherMac,isGroupText:!0}}catch{return null}}async crack(r,o,a){this.abortFlag=!1,this.useTimestampFilter=(o==null?void 0:o.useTimestampFilter)??!0,this.useUtf8Filter=(o==null?void 0:o.useUtf8Filter)??!0;const s=(o==null?void 0:o.maxLength)??8,c=await this.decodePacket(r);if(!c)return{found:!1,error:"Invalid packet or not a GroupText packet"};const{channelHash:l,ciphertext:p,cipherMac:u}=c,f=parseInt(l,16);if(!this.gpuInstance&&(this.gpuInstance=new F3,!await this.gpuInstance.init()))return{found:!1,error:"WebGPU not available"};const h=performance.now();let v=0,m=performance.now(),g=1,S=0;if(o!=null&&o.startFrom){const j=D3(o.startFrom);j&&(g=j.length,S=j.index+1,S>=wa(g)&&(g++,S=0))}let _=0;for(let j=g;j<=s;j++)_+=wa(j);_-=S;const C=(j,B,D)=>{if(!a)return;const O=(performance.now()-h)/1e3,L=O>0?Math.round(v/O):0,G=_-v,$=L>0?G/L:0;a({checked:v,total:_,percent:_>0?Math.min(100,v/_*100):0,rateKeysPerSec:L,etaSeconds:$,elapsedSeconds:O,currentLength:B,currentPosition:D,phase:j})},x=j=>{if(!O3(p,u,j))return{valid:!1};const B=qh.ChannelCrypto.decryptGroupTextMessage(p,u,j);return!B.success||!B.data?{valid:!1}:this.useTimestampFilter&&!M3(B.data.timestamp)?{valid:!1}:this.useUtf8Filter&&!I3(B.data.message)?{valid:!1}:{valid:!0,message:B.data.message}};if(g===1&&S===0){C("public-key",0,eu);const j=Yh(li);if(l===j){const B=x(li);if(B.valid)return{found:!0,roomName:eu,key:li,decryptedMessage:B.message}}}if(this.wordlist.length>0&&g===1&&S===0)for(let j=0;j<this.wordlist.length;j++){if(this.abortFlag)return{found:!1,aborted:!0,resumeFrom:this.wordlist[j]};const B=this.wordlist[j],D=$h("#"+B),F=Yh(D);if(parseInt(F,16)===f){const L=x(D);if(L.valid)return{found:!0,roomName:B,key:D,decryptedMessage:L.message}}const O=performance.now();O-m>=200&&(C("wordlist",B.length,B),m=O,await new Promise(L=>setTimeout(L,0)))}const w=32768,k=1e3;let b=w,R=!1;for(let j=g;j<=s;j++){if(this.abortFlag)return{found:!1,aborted:!0,resumeFrom:_o(j,0)||void 0};const B=wa(j);let D=j===g?S:0;for(;D<B;){if(this.abortFlag)return{found:!1,aborted:!0,resumeFrom:_o(j,D)||void 0};const F=Math.min(b,B-D),O=performance.now(),L=await this.gpuInstance.runBatch(f,j,D,F,p,u),G=performance.now()-O;if(v+=F,!R&&F>=w&&G>0){const J=k/G,ae=Math.round(F*J),Q=Math.pow(2,Math.round(Math.log2(Math.max(w,ae))));b=Math.max(w,Q),R=!0}for(const J of L){const ae=_o(j,J);if(!ae)continue;const Q=$h("#"+ae),ne=x(Q);if(ne.valid)return{found:!0,roomName:ae,key:Q,decryptedMessage:ne.message}}D+=F;const $=performance.now();if($-m>=200){const J=_o(j,Math.min(D,B-1))||"";C("bruteforce",j,J),m=$,await new Promise(ae=>setTimeout(ae,0))}}}return{found:!1,resumeFrom:_o(s,wa(s)-1)||void 0}}destroy(){this.gpuInstance&&(this.gpuInstance.destroy(),this.gpuInstance=null)}};/*! Bundled license information:
|
||||
|
||||
crypto-js/ripemd160.js:
|
||||
(** @preserve
|
||||
(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.
|
||||
*)
|
||||
|
||||
crypto-js/mode-ctr-gladman.js:
|
||||
(** @preserve
|
||||
* Counter block mode compatible with Dr Brian Gladman fileenc.c
|
||||
* derived from CryptoJS.mode.CTR
|
||||
* Jan Hruby jhruby.web@gmail.com
|
||||
*)
|
||||
|
||||
@noble/ed25519/index.js:
|
||||
(*! noble-ed25519 - MIT License (c) 2019 Paul Miller (paulmillr.com) *)
|
||||
*/function W3({packets:r,channels:o,onChannelCreate:a}){const[s,c]=N.useState(!1),[l,p]=N.useState(6),[u,f]=N.useState(!1),[h,v]=N.useState(null),[m,g]=N.useState(new Map),[S,_]=N.useState([]),[C,x]=N.useState(!1),[w,k]=N.useState(null),b=N.useRef(null),R=N.useRef(!1),P=N.useRef(!1),j=N.useRef(!1),B=N.useRef(new Map),D=N.useRef(!1),F=N.useRef(6);N.useEffect(()=>{const U=new V3;return b.current=U,k(U.isGpuAvailable()),U.loadWordlist("/words_alpha.txt").then(()=>x(!0)).catch(te=>console.error("Failed to load wordlist:",te)),()=>{U.destroy(),b.current=null}},[]);const O=new Set(o.map(U=>U.key.toUpperCase())),L=r.filter(U=>U.payload_type==="GROUP_TEXT"&&!U.decrypted);N.useEffect(()=>{g(U=>{const te=new Map(U);let X=!1;for(const E of L)te.has(E.id)||(te.set(E.id,{packet:E,attempts:0,lastAttemptLength:0,status:"pending"}),X=!0);return X?(B.current=te,te):U})},[L.length]),N.useEffect(()=>{B.current=m},[m]),N.useEffect(()=>{D.current=u},[u]),N.useEffect(()=>{F.current=l},[l]);const G=Array.from(m.values()).filter(U=>U.status==="pending").length,$=Array.from(m.values()).filter(U=>U.status==="cracked").length,J=Array.from(m.values()).filter(U=>U.status==="failed").length,ae=N.useCallback(async()=>{if(j.current||!b.current||!R.current)return;const U=B.current;let te=null,X=null;for(const[H,V]of U.entries())if(V.status==="pending"){te=V,X=H;break}if(!te&&D.current){const H=Array.from(U.entries()).filter(([,V])=>V.status==="failed"&&V.lastAttemptLength<10);H.length>0&&(H.sort((V,re)=>V[1].lastAttemptLength-re[1].lastAttemptLength),[X,te]=H[0])}if(!te||X===null){R.current&&setTimeout(()=>ae(),1e3);return}j.current=!0;const E=F.current,I=te.lastAttemptLength>0?te.lastAttemptLength+1:E;try{const H=await b.current.crack(te.packet.data,{maxLength:I,useTimestampFilter:!0,useUtf8Filter:!0},V=>{v(V)});if(P.current){P.current=!1,j.current=!1,v(null);return}if(H.found&&H.roomName&&H.key){g(ce=>{const pe=new Map(ce),oe=pe.get(X);return oe&&pe.set(X,{...oe,status:"cracked",attempts:oe.attempts+1,lastAttemptLength:I}),pe});const V={roomName:H.roomName,key:H.key,packetId:X,message:H.decryptedMessage||"",crackedAt:Date.now()};_(ce=>[...ce,V]);const re=H.key.toUpperCase();if(!O.has(re))try{await a("#"+H.roomName,H.key)}catch(ce){console.error("Failed to create channel:",ce)}}else g(V=>{const re=new Map(V),ce=re.get(X);return ce&&re.set(X,{...ce,status:"failed",attempts:ce.attempts+1,lastAttemptLength:I}),re})}catch(H){console.error("Cracking error:",H),g(V=>{const re=new Map(V),ce=re.get(X);return ce&&re.set(X,{...ce,status:"failed",attempts:ce.attempts+1,lastAttemptLength:I}),re})}j.current=!1,v(null),R.current&&setTimeout(()=>ae(),100)},[O,a]),Q=()=>{if(!w){alert("WebGPU is not available in your browser. Please use Chrome 113+ or Edge 113+.");return}c(!0),R.current=!0,P.current=!1,ae()},ne=()=>{var U;c(!1),R.current=!1,P.current=!0,(U=b.current)==null||U.abort()};return A.jsxs("div",{className:"flex flex-col h-full p-3 gap-3 bg-background border-t border-border",children:[A.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[A.jsx("button",{onClick:s?ne:Q,disabled:!C||w===!1,className:Xe("px-4 py-1.5 rounded text-sm font-medium",s?"bg-destructive text-destructive-foreground hover:bg-destructive/90":"bg-primary text-primary-foreground hover:bg-primary/90","disabled:opacity-50 disabled:cursor-not-allowed"),children:s?"Stop":"Start Cracking"}),A.jsxs("div",{className:"flex items-center gap-2",children:[A.jsx("label",{className:"text-sm text-muted-foreground",children:"Max Length:"}),A.jsx("input",{type:"number",min:1,max:10,value:l,onChange:U=>p(Math.min(10,Math.max(1,parseInt(U.target.value)||6))),className:"w-14 px-2 py-1 text-sm bg-muted border border-border rounded"})]}),A.jsxs("label",{className:"flex items-center gap-2 text-sm text-muted-foreground cursor-pointer",children:[A.jsx("input",{type:"checkbox",checked:u,onChange:U=>f(U.target.checked),className:"rounded"}),"Retry failed at n+1"]})]}),A.jsxs("div",{className:"flex gap-4 text-sm",children:[A.jsxs("span",{className:"text-muted-foreground",children:["Pending: ",A.jsx("span",{className:"text-foreground font-medium",children:G})]}),A.jsxs("span",{className:"text-muted-foreground",children:["Cracked: ",A.jsx("span",{className:"text-green-500 font-medium",children:$})]}),A.jsxs("span",{className:"text-muted-foreground",children:["Failed: ",A.jsx("span",{className:"text-destructive font-medium",children:J})]})]}),h&&A.jsxs("div",{className:"space-y-1",children:[A.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground",children:[A.jsxs("span",{children:[h.phase==="wordlist"?"Dictionary":h.phase==="bruteforce"?"Bruteforce":"Public Key",h.phase==="bruteforce"&&` - Length ${h.currentLength}`,": ",h.currentPosition]}),A.jsxs("span",{children:[h.rateKeysPerSec>=1e9?`${(h.rateKeysPerSec/1e9).toFixed(2)} Gkeys/s`:`${(h.rateKeysPerSec/1e6).toFixed(1)} Mkeys/s`," ","• ETA: ",h.etaSeconds<60?`${Math.round(h.etaSeconds)}s`:`${Math.round(h.etaSeconds/60)Line truncated
|
||||
+1
@@ -0,0 +1 @@
|
||||
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--background: 0 0% 10%;--foreground: 0 0% 88%;--card: 0 0% 14%;--card-foreground: 0 0% 88%;--popover: 0 0% 14%;--popover-foreground: 0 0% 88%;--primary: 122 39% 49%;--primary-foreground: 0 0% 100%;--secondary: 0 0% 20%;--secondaLine truncated
|
||||
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" class="dark">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>RemoteTerm for MeshCore</title>
|
||||
<script type="module" crossorigin src="/assets/index-DeS_VBWV.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-DlaqriQ9.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
</body>
|
||||
</html>
|
||||
Vendored
+370105
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user