feat: complete React + Flask rebuild of dashboard
Backend: - New Flask 3 app with service-layer architecture - Pydantic v2 models and unified API response format - psycopg3 connection pool with stored procedure support - 14 services: DB, SSH, K8s, BGD, RMQ (admin + game), realtime, player, economy, guild, world, progression, character, audit, chat - 30+ API endpoints covering players, guilds, economy, world, admin, server, files, director, chat - SSE real-time events for battlegroup, chat, metrics, connection status - SocketIO remote shell (xterm.js compatible) - Settings CRUD, moderation (ban/kick/unban), audit logging - Security: CSRF, rate limiting, CSP, HSTS, read-only SQL enforcement Frontend: - Vite + React 18 + TypeScript + Tailwind CSS - 14 Dune house themes via CSS custom properties - SWR for server state, Axios API client with interceptors - 14 pages: Overview, Player Explorer + Detail, Guild Manager, Vehicles, Buildings, Map Viewer, Accounts, Server Control, Admin Tools (7 tabs), Chat Monitor, Remote Shell, File Browser, Director, Settings - Player Detail with 6 tabs: overview, inventory, vehicles, buildings, progression, actions - Admin Tools: broadcast, economy, world, character, functions, raw query, audit log - Interactive canvas map viewer with zoom/pan/filter - Toast notifications, connection badges, theme switcher Other: - Updated .gitignore for frontend/backend structure - Updated README with new architecture, development guide, and project structure - Legacy app/ templates/ static/ remain untouched
This commit is contained in:
1 parent
fa620f4da9
commit
be845f76f1
76 files changed
+8410
-10
No files matched your search
+94
@@ -0,0 +1,94 @@
|
||||
function Kp(e,t){for(var r=0;r<t.length;r++){const s=t[r];if(typeof s!="string"&&!Array.isArray(s)){for(const i in s)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(s,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>s[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&s(c)}).observe(document,{childList:!0,subtree:!0});function r(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(i){if(i.ep)return;i.ep=!0;const o=r(i);fetch(i.href,o)}})();function Xp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Th={exports:{}},Zn={},Lh={exports:{}},re={};/**
|
||||
* @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 xi=Symbol.for("react.element"),Gp=Symbol.for("react.portal"),Jp=Symbol.for("react.fragment"),Qp=Symbol.for("react.strict_mode"),Yp=Symbol.for("react.profiler"),Zp=Symbol.for("react.provider"),em=Symbol.for("react.context"),tm=Symbol.for("react.forward_ref"),rm=Symbol.for("react.suspense"),sm=Symbol.for("react.memo"),im=Symbol.for("react.lazy"),Ic=Symbol.iterator;function nm(e){return e===null||typeof e!="object"?null:(e=Ic&&e[Ic]||e["@@iterator"],typeof e=="function"?e:null)}var Dh={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ah=Object.assign,Oh={};function ws(e,t,r){this.props=e,this.context=t,this.refs=Oh,this.updater=r||Dh}ws.prototype.isReactComponent={};ws.prototype.setState=function(e,t){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,t,"setState")};ws.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Nh(){}Nh.prototype=ws.prototype;function Rl(e,t,r){this.props=e,this.context=t,this.refs=Oh,this.updater=r||Dh}var Tl=Rl.prototype=new Nh;Tl.constructor=Rl;Ah(Tl,ws.prototype);Tl.isPureReactComponent=!0;var Fc=Array.isArray,Ph=Object.prototype.hasOwnProperty,Ll={current:null},Bh={key:!0,ref:!0,__self:!0,__source:!0};function jh(e,t,r){var s,i={},o=null,c=null;if(t!=null)for(s in t.ref!==void 0&&(c=t.ref),t.key!==void 0&&(o=""+t.key),t)Ph.call(t,s)&&!Bh.hasOwnProperty(s)&&(i[s]=t[s]);var n=arguments.length-2;if(n===1)i.children=r;else if(1<n){for(var a=Array(n),f=0;f<n;f++)a[f]=arguments[f+2];i.children=a}if(e&&e.defaultProps)for(s in n=e.defaultProps,n)i[s]===void 0&&(i[s]=n[s]);return{$$typeof:xi,type:e,key:o,ref:c,props:i,_owner:Ll.current}}function om(e,t){return{$$typeof:xi,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Dl(e){return typeof e=="object"&&e!==null&&e.$$typeof===xi}function am(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var Hc=/\/+/g;function Eo(e,t){return typeof e=="object"&&e!==null&&e.key!=null?am(""+e.key):t.toString(36)}function ln(e,t,r,s,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var c=!1;if(e===null)c=!0;else switch(o){case"string":case"number":c=!0;break;case"object":switch(e.$$typeof){case xi:case Gp:c=!0}}if(c)return c=e,i=i(c),e=s===""?"."+Eo(c,0):s,Fc(i)?(r="",e!=null&&(r=e.replace(Hc,"$&/")+"/"),ln(i,t,r,"",function(f){return f})):i!=null&&(Dl(i)&&(i=om(i,r+(!i.key||c&&c.key===i.key?"":(""+i.key).replace(Hc,"$&/")+"/")+e)),t.push(i)),1;if(c=0,s=s===""?".":s+":",Fc(e))for(var n=0;n<e.length;n++){o=e[n];var a=s+Eo(o,n);c+=ln(o,t,r,a,i)}else if(a=nm(e),typeof a=="function")for(e=a.call(e),n=0;!(o=e.next()).done;)o=o.value,a=s+Eo(o,n++),c+=ln(o,t,r,a,i);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return c}function ji(e,t,r){if(e==null)return e;var s=[],i=0;return ln(e,s,"","",function(o){return t.call(r,o,i++)}),s}function lm(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Ze={current:null},cn={transition:null},cm={ReactCurrentDispatcher:Ze,ReactCurrentBatchConfig:cn,ReactCurrentOwner:Ll};function Mh(){throw Error("act(...) is not supported in production builds of React.")}re.Children={map:ji,forEach:function(e,t,r){ji(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return ji(e,function(){t++}),t},toArray:function(e){return ji(e,function(t){return t})||[]},only:function(e){if(!Dl(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};re.Component=ws;re.Fragment=Jp;re.Profiler=Yp;re.PureComponent=Rl;re.StrictMode=Qp;re.Suspense=rm;re.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=cm;re.act=Mh;re.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var s=Ah({},e.props),i=e.key,o=e.ref,c=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,c=Ll.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var n=e.type.defaultProps;for(a in t)Ph.call(t,a)&&!Bh.hasOwnProperty(a)&&(s[a]=t[a]===void 0&&n!==void 0?n[a]:t[a])}var a=arguments.length-2;if(a===1)s.children=r;else if(1<a){n=Array(a);for(var f=0;f<a;f++)n[f]=arguments[f+2];s.children=n}return{$$typeof:xi,type:e.type,key:i,ref:o,props:s,_owner:c}};re.createContext=function(e){return e={$$typeof:em,_currentValue:e,_currentValue2:e,_threadCountLine 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 hm=M,dm=Symbol.for("react.element"),fm=Symbol.for("react.fragment"),pm=Object.prototype.hasOwnProperty,mm=hm.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,_m={key:!0,ref:!0,__self:!0,__source:!0};function Ih(e,t,r){var s,i={},o=null,c=null;r!==void 0&&(o=""+r),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(c=t.ref);for(s in t)pm.call(t,s)&&!_m.hasOwnProperty(s)&&(i[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps,t)i[s]===void 0&&(i[s]=t[s]);return{$$typeof:dm,type:e,key:o,ref:c,props:i,_owner:mm.current}}Zn.Fragment=fm;Zn.jsx=Ih;Zn.jsxs=Ih;Th.exports=Zn;var v=Th.exports,da={},Fh={exports:{}},ft={},Hh={exports:{}},Uh={};/**
|
||||
* @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.
|
||||
*/(function(e){function t(R,D){var A=R.length;R.push(D);e:for(;0<A;){var B=A-1>>>1,H=R[B];if(0<i(H,D))R[B]=D,R[A]=H,A=B;else break e}}function r(R){return R.length===0?null:R[0]}function s(R){if(R.length===0)return null;var D=R[0],A=R.pop();if(A!==D){R[0]=A;e:for(var B=0,H=R.length,q=H>>>1;B<q;){var G=2*(B+1)-1,X=R[G],te=G+1,T=R[te];if(0>i(X,A))te<H&&0>i(T,X)?(R[B]=T,R[te]=A,B=te):(R[B]=X,R[G]=A,B=G);else if(te<H&&0>i(T,A))R[B]=T,R[te]=A,B=te;else break e}}return D}function i(R,D){var A=R.sortIndex-D.sortIndex;return A!==0?A:R.id-D.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var c=Date,n=c.now();e.unstable_now=function(){return c.now()-n}}var a=[],f=[],m=1,p=null,_=3,S=!1,b=!1,y=!1,u=typeof setTimeout=="function"?setTimeout:null,h=typeof clearTimeout=="function"?clearTimeout:null,l=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function d(R){for(var D=r(f);D!==null;){if(D.callback===null)s(f);else if(D.startTime<=R)s(f),D.sortIndex=D.expirationTime,t(a,D);else break;D=r(f)}}function g(R){if(y=!1,d(R),!b)if(r(a)!==null)b=!0,W(x);else{var D=r(f);D!==null&&V(g,D.startTime-R)}}function x(R,D){b=!1,y&&(y=!1,h(w),w=-1),S=!0;var A=_;try{for(d(D),p=r(a);p!==null&&(!(p.expirationTime>D)||R&&!N());){var B=p.callback;if(typeof B=="function"){p.callback=null,_=p.priorityLevel;var H=B(p.expirationTime<=D);D=e.unstable_now(),typeof H=="function"?p.callback=H:p===r(a)&&s(a),d(D)}else s(a);p=r(a)}if(p!==null)var q=!0;else{var G=r(f);G!==null&&V(g,G.startTime-D),q=!1}return q}finally{p=null,_=A,S=!1}}var C=!1,k=null,w=-1,E=5,L=-1;function N(){return!(e.unstable_now()-L<E)}function O(){if(k!==null){var R=e.unstable_now();L=R;var D=!0;try{D=k(!0,R)}finally{D?P():(C=!1,k=null)}}else C=!1}var P;if(typeof l=="function")P=function(){l(O)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,z=F.port2;F.port1.onmessage=O,P=function(){z.postMessage(null)}}else P=function(){u(O,0)};function W(R){k=R,C||(C=!0,P())}function V(R,D){w=u(function(){R(e.unstable_now())},D)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(R){R.callback=null},e.unstable_continueExecution=function(){b||S||(b=!0,W(x))},e.unstable_forceFrameRate=function(R){0>R||125<R?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<R?Math.floor(1e3/R):5},e.unstable_getCurrentPriorityLevel=function(){return _},e.unstable_getFirstCallbackNode=function(){return r(a)},e.unstable_next=function(R){switch(_){case 1:case 2:case 3:var D=3;break;default:D=_}var A=_;_=D;try{return R()}finally{_=A}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(R,D){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var A=_;_=R;try{return D()}finally{_=A}},e.unstable_scheduleCallback=function(R,D,A){var B=e.unstable_now();switch(typeof A=="object"&&A!==null?(A=A.delay,A=typeof A=="number"&&0<A?B+A:B):A=B,R){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=A+H,R={id:m++,callback:D,priorityLevel:R,startTime:A,expirationTime:H,sortIndex:-1},A>B?(R.sortIndex=A,t(f,R),r(a)===null&&R===r(f)&&(y?(h(w),w=-1):y=!0,V(g,A-B))):(R.sortIndex=H,t(a,R),b||S||(b=!0,W(x))),R},e.unstable_shouldYield=N,e.unstable_wrapCallback=function(R){var D=_;return function(){var A=_;_=D;try{return R.apply(this,arguments)}finally{_=A}}}})(Uh);Hh.exports=Uh;var gm=Hh.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 vm=M,dt=gm;function K(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);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 zh=new Set,ri={};function $r(e,t){ps(e,t),ps(e+"Capture",t)}function ps(e,t){for(ri[e]=t,e=0;e<t.length;e++)zh.add(t[e])}var Qt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fa=Object.prototype.hasOwnProperty,ym=/^[: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]*$/,Uc={},zc={};function Sm(e){return fa.call(zc,e)?!0:fa.call(Uc,e)?!1:ym.test(e)?zc[e]=!0:(Uc[e]=!0,!1)}function xm(e,t,r,s){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return s?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function bm(e,t,r,s){if(t===null||typeof t>"u"||xm(e,t,r,s))return!0;if(s)return!1;if(r!==null)switch(r.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 et(e,t,r,s,i,o,c){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=s,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=c}var Ie={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ie[e]=new et(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ie[t]=new et(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ie[e]=new et(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ie[e]=new et(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){Ie[e]=new et(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ie[e]=new et(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ie[e]=new et(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ie[e]=new et(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ie[e]=new et(e,5,!1,e.toLowerCase(),null,!1,!1)});var Al=/[\-:]([a-z])/g;function Ol(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(Al,Ol);Ie[t]=new et(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(Al,Ol);Ie[t]=new et(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(Al,Ol);Ie[t]=new et(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ie[e]=new et(e,1,!1,e.toLowerCase(),null,!1,!1)});Ie.xlinkHref=new et("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ie[e]=new et(e,1,!1,e.toLowerCase(),null,!0,!0)});function Nl(e,t,r,s){var i=Ie.hasOwnProperty(t)?Ie[t]:null;(i!==null?i.type!==0:s||!(2<t.length)||t[0]!=="o"&&t[0]!=="
Line truncated
|
||||
`+ko+e}var Ro=!1;function To(e,t){if(!e||Ro)return"";Ro=!0;var r=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(f){var s=f}Reflect.construct(e,[],t)}else{try{t.call()}catch(f){s=f}e.call(t.prototype)}else{try{throw Error()}catch(f){s=f}e()}}catch(f){if(f&&s&&typeof f.stack=="string"){for(var i=f.stack.split(`
|
||||
`),o=s.stack.split(`
|
||||
`),c=i.length-1,n=o.length-1;1<=c&&0<=n&&i[c]!==o[n];)n--;for(;1<=c&&0<=n;c--,n--)if(i[c]!==o[n]){if(c!==1||n!==1)do if(c--,n--,0>n||i[c]!==o[n]){var a=`
|
||||
`+i[c].replace(" at new "," at ");return e.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",e.displayName)),a}while(1<=c&&0<=n);break}}}finally{Ro=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?zs(e):""}function wm(e){switch(e.tag){case 5:return zs(e.type);case 16:return zs("Lazy");case 13:return zs("Suspense");case 19:return zs("SuspenseList");case 0:case 2:case 15:return e=To(e.type,!1),e;case 11:return e=To(e.type.render,!1),e;case 1:return e=To(e.type,!0),e;default:return""}}function ga(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 Jr:return"Fragment";case Gr:return"Portal";case pa:return"Profiler";case Pl:return"StrictMode";case ma:return"Suspense";case _a:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Wh:return(e.displayName||"Context")+".Consumer";case $h:return(e._context.displayName||"Context")+".Provider";case Bl:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case jl:return t=e.displayName||null,t!==null?t:ga(e.type)||"Memo";case sr:t=e._payload,e=e._init;try{return ga(e(t))}catch{}}return null}function Cm(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 ga(t);case 8:return t===Pl?"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 Sr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function qh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Em(e){var t=qh(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),s=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,o=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(c){s=""+c,o.call(this,c)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return s},setValue:function(c){s=""+c},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ii(e){e._valueTracker||(e._valueTracker=Em(e))}function Kh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),s="";return e&&(s=qh(e)?e.checked?"true":"false":e.value),e=s,e!==r?(t.setValue(e),!0):!1}function Rn(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 va(e,t){var r=t.checked;return xe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Wc(e,t){var r=t.defaultValue==null?"":t.defaultValue,s=t.checked!=null?t.checked:t.defaultChecked;r=Sr(t.value!=null?t.value:r),e._wrapperState={initialChecked:s,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Xh(e,t){t=t.checked,t!=null&&Nl(e,"checked",t,!1)}function ya(e,t){Xh(e,t);var r=Sr(t.value),s=t.type;if(r!=null)s==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(s==="submit"||s==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Sa(e,t.type,r):t.hasOwnProperty("defaultValue")&&Sa(e,t.type,Sr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Vc(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var s=t.type;if(!(s!=="submit"&&s!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Sa(e,t,r){(t!=="number"||Rn(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var $s=Array.isArray;function as(e,t,r,s){if(e=e.options,t){t={};for(var i=0;i<r.length;i++)t["$"+r[i]]=!0;for(r=0;r<e.length;r++)i=t.hasOwnProperty("$"+e[r].value),e[r].selected!==i&&(e[r].selected=i),i&&s&&(e[r].defaultSelected=!0)}else{for(r=""+Sr(r),t=null,i=0;i<e.length;i++){if(e[i].value===r){e[i].selected=!0,s&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function xa(e,t){if(t.dan
Line truncated
|
||||
`).replace(B_,"")}function qi(e,t,r){if(t=pu(t),pu(e)!==t&&r)throw Error(K(425))}function Bn(){}var Pa=null,Ba=null;function ja(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 Ma=typeof setTimeout=="function"?setTimeout:void 0,j_=typeof clearTimeout=="function"?clearTimeout:void 0,mu=typeof Promise=="function"?Promise:void 0,M_=typeof queueMicrotask=="function"?queueMicrotask:typeof mu<"u"?function(e){return mu.resolve(null).then(e).catch(I_)}:Ma;function I_(e){setTimeout(function(){throw e})}function Uo(e,t){var r=t,s=0;do{var i=r.nextSibling;if(e.removeChild(r),i&&i.nodeType===8)if(r=i.data,r==="/$"){if(s===0){e.removeChild(i),ai(t);return}s--}else r!=="$"&&r!=="$?"&&r!=="$!"||s++;r=i}while(r);ai(t)}function fr(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 _u(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var Es=Math.random().toString(36).slice(2),Mt="__reactFiber$"+Es,di="__reactProps$"+Es,Yt="__reactContainer$"+Es,Ia="__reactEvents$"+Es,F_="__reactListeners$"+Es,H_="__reactHandles$"+Es;function Dr(e){var t=e[Mt];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Yt]||r[Mt]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=_u(e);e!==null;){if(r=e[Mt])return r;e=_u(e)}return t}e=r,r=e.parentNode}return null}function Ei(e){return e=e[Mt]||e[Yt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function es(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(K(33))}function io(e){return e[di]||null}var Fa=[],ts=-1;function Cr(e){return{current:e}}function ge(e){0>ts||(e.current=Fa[ts],Fa[ts]=null,ts--)}function de(e,t){ts++,Fa[ts]=e.current,e.current=t}var xr={},Ge=Cr(xr),it=Cr(!1),Mr=xr;function ms(e,t){var r=e.type.contextTypes;if(!r)return xr;var s=e.stateNode;if(s&&s.__reactInternalMemoizedUnmaskedChildContext===t)return s.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in r)i[o]=t[o];return s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function nt(e){return e=e.childContextTypes,e!=null}function jn(){ge(it),ge(Ge)}function gu(e,t,r){if(Ge.current!==xr)throw Error(K(168));de(Ge,t),de(it,r)}function jd(e,t,r){var s=e.stateNode;if(t=t.childContextTypes,typeof s.getChildContext!="function")return r;s=s.getChildContext();for(var i in s)if(!(i in t))throw Error(K(108,Cm(e)||"Unknown",i));return xe({},r,s)}function Mn(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||xr,Mr=Ge.current,de(Ge,e),de(it,it.current),!0}function vu(e,t,r){var s=e.stateNode;if(!s)throw Error(K(169));r?(e=jd(e,t,Mr),s.__reactInternalMemoizedMergedChildContext=e,ge(it),ge(Ge),de(Ge,e)):ge(it),de(it,r)}var Vt=null,no=!1,zo=!1;function Md(e){Vt===null?Vt=[e]:Vt.push(e)}function U_(e){no=!0,Md(e)}function Er(){if(!zo&&Vt!==null){zo=!0;var e=0,t=ue;try{var r=Vt;for(ue=1;e<r.length;e++){var s=r[e];do s=s(!0);while(s!==null)}Vt=null,no=!1}catch(i){throw Vt!==null&&(Vt=Vt.slice(e+1)),ld(Il,Er),i}finally{ue=t,zo=!1}}return null}var rs=[],ss=0,In=null,Fn=0,_t=[],gt=0,Ir=null,Kt=1,Xt="";function Tr(e,t){rs[ss++]=Fn,rs[ss++]=In,In=e,Fn=t}function Id(e,t,r){_t[gt++]=Kt,_t[gt++]=Xt,_t[gt++]=Ir,Ir=e;var s=Kt;e=Xt;var i=32-Dt(s)-1;s&=~(1<<i),r+=1;var o=32-Dt(t)+i;if(30<o){var c=i-i%5;o=(s&(1<<c)-1).toString(32),s>>=c,i-=c,Kt=1<<32-Dt(t)+i|r<<i|s,Xt=o+e}else Kt=1<<o|r<<i|s,Xt=e}function Kl(e){e.return!==null&&(Tr(e,1),Id(e,1,0))}function Xl(e){for(;e===In;)In=rs[--ss],rs[ss]=null,Fn=rs[--ss],rs[ss]=null;for(;e===Ir;)Ir=_t[--gt],_t[gt]=null,Xt=_t[--gt],_t[gt]=null,Kt=_t[--gt],_t[gt]=null}var ht=null,ut=null,ve=!1,Lt=null;function Fd(e,t){var r=yt(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function yu(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,ht=e,ut=fr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,ht=e,ut=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Ir!==null?{id:Kt,overflow:Xt}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=yt(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,ht=e,ut=null,!0):!1;default:return!1}}function Ha(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ua(e){if(ve){var t=ut;if(t){var r=t;if(!yu(e,t)){if(Ha(e))throw Error(K(418));t=fr(r.nextSibling);var s=ht;t&&yu(e,t)?Fd(s,r):(e.flags=e.flags&-4097|2,ve=!1,ht=e)}}else{if(Ha(e))throw Error(K(418));e.flags=e.flags&-4097|2,ve=!1,ht=e}}}function Su(e){for(e=e
Line truncated
|
||||
Error generating stack: `+o.message+`
|
||||
`+o.stack}return{value:e,source:t,stack:i,digest:null}}function Ko(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Va(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var J_=typeof WeakMap=="function"?WeakMap:Map;function ff(e,t,r){r=Jt(-1,r),r.tag=3,r.payload={element:null};var s=t.value;return r.callback=function(){Kn||(Kn=!0,tl=s),Va(e,t)},r}function pf(e,t,r){r=Jt(-1,r),r.tag=3;var s=e.type.getDerivedStateFromError;if(typeof s=="function"){var i=t.value;r.payload=function(){return s(i)},r.callback=function(){Va(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(r.callback=function(){Va(e,t),typeof s!="function"&&(mr===null?mr=new Set([this]):mr.add(this));var c=t.stack;this.componentDidCatch(t.value,{componentStack:c!==null?c:""})}),r}function Tu(e,t,r){var s=e.pingCache;if(s===null){s=e.pingCache=new J_;var i=new Set;s.set(t,i)}else i=s.get(t),i===void 0&&(i=new Set,s.set(t,i));i.has(r)||(i.add(r),e=ug.bind(null,e,t,r),t.then(e,e))}function Lu(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 Du(e,t,r,s,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=Jt(-1,1),t.tag=2,pr(r,t,1))),r.lanes|=1),e)}var Q_=tr.ReactCurrentOwner,st=!1;function Je(e,t,r,s){t.child=e===null?zd(t,null,r,s):gs(t,e.child,r,s)}function Au(e,t,r,s,i){r=r.render;var o=t.ref;return hs(t,i),s=nc(e,t,r,s,o,i),r=oc(),e!==null&&!st?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,er(e,t,i)):(ve&&r&&Kl(t),t.flags|=1,Je(e,t,s,i),t.child)}function Ou(e,t,r,s,i){if(e===null){var o=r.type;return typeof o=="function"&&!_c(o)&&o.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=o,mf(e,t,o,s,i)):(e=yn(r.type,null,s,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var c=o.memoizedProps;if(r=r.compare,r=r!==null?r:ci,r(c,s)&&e.ref===t.ref)return er(e,t,i)}return t.flags|=1,e=gr(o,s),e.ref=t.ref,e.return=t,t.child=e}function mf(e,t,r,s,i){if(e!==null){var o=e.memoizedProps;if(ci(o,s)&&e.ref===t.ref)if(st=!1,t.pendingProps=s=o,(e.lanes&i)!==0)e.flags&131072&&(st=!0);else return t.lanes=e.lanes,er(e,t,i)}return qa(e,t,r,s,i)}function _f(e,t,r){var s=t.pendingProps,i=s.children,o=e!==null?e.memoizedState:null;if(s.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},de(os,lt),lt|=r;else{if(!(r&1073741824))return e=o!==null?o.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,de(os,lt),lt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},s=o!==null?o.baseLanes:r,de(os,lt),lt|=s}else o!==null?(s=o.baseLanes|r,t.memoizedState=null):s=r,de(os,lt),lt|=s;return Je(e,t,i,r),t.child}function gf(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function qa(e,t,r,s,i){var o=nt(r)?Mr:Ge.current;return o=ms(t,o),hs(t,i),r=nc(e,t,r,s,o,i),s=oc(),e!==null&&!st?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,er(e,t,i)):(ve&&s&&Kl(t),t.flags|=1,Je(e,t,r,i),t.child)}function Nu(e,t,r,s,i){if(nt(r)){var o=!0;Mn(t)}else o=!1;if(hs(t,i),t.stateNode===null)_n(e,t),df(t,r,s),Wa(t,r,s,i),s=!0;else if(e===null){var c=t.stateNode,n=t.memoizedProps;c.props=n;var a=c.context,f=r.contextType;typeof f=="object"&&f!==null?f=xt(f):(f=nt(r)?Mr:Ge.current,f=ms(t,f));var m=r.getDerivedStateFromProps,p=typeof m=="function"||typeof c.getSnapshotBeforeUpdate=="function";p||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(n!==s||a!==f)&&Ru(t,c,s,f),ir=!1;var _=t.memoizedState;c.state=_,zn(t,s,c,i),a=t.memoizedState,n!==s||_!==a||it.current||ir?(typeof m=="function"&&($a(t,r,m,s),a=t.memoizedState),(n=ir||ku(t,r,n,s,_,a,f))?(p||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=a),c.props=s,c.state=a,c.context=f,s=n):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{c=t.stateNode,Wd(e,t),n=t.memoizedProps,f=t.type===t.elementType?n:kt(t.type,n),c.props=f,p=t.pendingProps,_=c.context,a=r.contextType,typeof a=="object"&&a!==null?a=xt(a):(a=nt(r)?Mr:Ge.current,a=ms(t,a));var S=r.getDerivedStateFromProps;(m=typeof S=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(n!==p||_!==a)&&Ru(t,c,s,a),ir=!1,_=t.memoizedState,c.state=_,zn(t,s,c,i);var b=t.memoizedS
Line truncated
|
||||
* @remix-run/router v1.23.2
|
||||
*
|
||||
* Copyright (c) Remix Software Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE.md file in the root directory of this source tree.
|
||||
*
|
||||
* @license MIT
|
||||
*/function yi(){return yi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},yi.apply(this,arguments)}var cr;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(cr||(cr={}));const Ku="popstate";function bg(e){e===void 0&&(e={});function t(s,i){let{pathname:o,search:c,hash:n}=s.location;return nl("",{pathname:o,search:c,hash:n},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function r(s,i){return typeof i=="string"?i:Qn(i)}return Cg(t,r,null,e)}function Re(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function xc(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function wg(){return Math.random().toString(36).substr(2,8)}function Xu(e,t){return{usr:e.state,key:e.key,idx:t}}function nl(e,t,r,s){return r===void 0&&(r=null),yi({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ks(t):t,{state:r,key:t&&t.key||s||wg()})}function Qn(e){let{pathname:t="/",search:r="",hash:s=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),s&&s!=="#"&&(t+=s.charAt(0)==="#"?s:"#"+s),t}function ks(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let s=e.indexOf("?");s>=0&&(t.search=e.substr(s),e=e.substr(0,s)),e&&(t.pathname=e)}return t}function Cg(e,t,r,s){s===void 0&&(s={});let{window:i=document.defaultView,v5Compat:o=!1}=s,c=i.history,n=cr.Pop,a=null,f=m();f==null&&(f=0,c.replaceState(yi({},c.state,{idx:f}),""));function m(){return(c.state||{idx:null}).idx}function p(){n=cr.Pop;let u=m(),h=u==null?null:u-f;f=u,a&&a({action:n,location:y.location,delta:h})}function _(u,h){n=cr.Push;let l=nl(y.location,u,h);f=m()+1;let d=Xu(l,f),g=y.createHref(l);try{c.pushState(d,"",g)}catch(x){if(x instanceof DOMException&&x.name==="DataCloneError")throw x;i.location.assign(g)}o&&a&&a({action:n,location:y.location,delta:1})}function S(u,h){n=cr.Replace;let l=nl(y.location,u,h);f=m();let d=Xu(l,f),g=y.createHref(l);c.replaceState(d,"",g),o&&a&&a({action:n,location:y.location,delta:0})}function b(u){let h=i.location.origin!=="null"?i.location.origin:i.location.href,l=typeof u=="string"?u:Qn(u);return l=l.replace(/ $/,"%20"),Re(h,"No window.location.(origin|href) available to create URL for href: "+l),new URL(l,h)}let y={get action(){return n},get location(){return e(i,c)},listen(u){if(a)throw new Error("A history only accepts one active listener");return i.addEventListener(Ku,p),a=u,()=>{i.removeEventListener(Ku,p),a=null}},createHref(u){return t(i,u)},createURL:b,encodeLocation(u){let h=b(u);return{pathname:h.pathname,search:h.search,hash:h.hash}},push:_,replace:S,go(u){return c.go(u)}};return y}var Gu;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Gu||(Gu={}));function Eg(e,t,r){return r===void 0&&(r="/"),kg(e,t,r)}function kg(e,t,r,s){let i=typeof t=="string"?ks(t):t,o=bc(i.pathname||"/",r);if(o==null)return null;let c=Uf(e);Rg(c);let n=null;for(let a=0;n==null&&a<c.length;++a){let f=Fg(o);n=jg(c[a],f)}return n}function Uf(e,t,r,s){t===void 0&&(t=[]),r===void 0&&(r=[]),s===void 0&&(s="");let i=(o,c,n)=>{let a={relativePath:n===void 0?o.path||"":n,caseSensitive:o.caseSensitive===!0,childrenIndex:c,route:o};a.relativePath.startsWith("/")&&(Re(a.relativePath.startsWith(s),'Absolute route path "'+a.relativePath+'" nested under path '+('"'+s+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),a.relativePath=a.relativePath.slice(s.length));let f=vr([s,a.relativePath]),m=r.concat(a);o.children&&o.children.length>0&&(Re(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+f+'".')),Uf(o.children,t,m,f)),!(o.path==null&&!o.index)&&t.push({path:f,score:Pg(f,o.index),routesMeta:m})};return e.forEach((o,c)=>{var n;if(o.path===""||!((n=o.path)!=null&&n.includes("?")))i(o,c);else for(let a of zf(o.path))i(o,c,a)}),t}function zf(e){let t=e.split("/");if(t.length===0)return[];let[r,...s]=t,i=r.endsWith("?"),o=r.replace(/\?$/,"");if(s.length===0)return i?[o,""]:[o];let c=zf(s.join("/")),n=[];return n.push(...c.map(a=>a===""?o:[o,a].join("/"))),i&&n.push(...c),n.map(a=>e.startsWith("/")&&a===""?"/":a)}function Rg(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Bg(t.routesMeta.map(s=>s.childrenIndex),r.routesMeta.map(s=>s.childrenIndex)))}const Tg=/^:[\w-]+$/,Lg=3,Dg=2,Ag=1,Og=10,Ng=-2,Ju=e=>e==="*";function Pg(e,t){let r=e.split("/"),s=r.length;return r.some(Ju)&&(s+=Ng),t&&(s+=Dg),r.filter(i=>!Ju(i)).reduce((i,o)=>i+(Tg.test(o)?Lg:o===""?Ag:Og),s)}function Bg(e,t){return e.length===t.length&&e.slice(0,-1).every((s,i)=>s===t[i])?e[e.length-1]-t[t.length-1]:0}function jg(e,t,r){let{routesMeta:s}=e,i={},o="/",c=[];for(let n=0;n<s.length;++n){let a=s[n],f=n===s.length-1,m=o==="/"?t:t.slice(o.length)||"/",p=Mg({path:a.relativePath,caseSensitive:a.caseSeLine truncated
|
||||
* React Router v6.30.3
|
||||
*
|
||||
* Copyright (c) Remix Software Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE.md file in the root directory of this source tree.
|
||||
*
|
||||
* @license MIT
|
||||
*/function Si(){return Si=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},Si.apply(this,arguments)}const wc=M.createContext(null),Gg=M.createContext(null),Vr=M.createContext(null),_o=M.createContext(null),kr=M.createContext({outlet:null,matches:[],isDataRoute:!1}),qf=M.createContext(null);function Jg(e,t){let{relative:r}=t===void 0?{}:t;Ri()||Re(!1);let{basename:s,navigator:i}=M.useContext(Vr),{hash:o,pathname:c,search:n}=Xf(e,{relative:r}),a=c;return s!=="/"&&(a=c==="/"?s:vr([s,c])),i.createHref({pathname:a,search:n,hash:o})}function Ri(){return M.useContext(_o)!=null}function Ti(){return Ri()||Re(!1),M.useContext(_o).location}function Kf(e){M.useContext(Vr).static||M.useLayoutEffect(e)}function Cc(){let{isDataRoute:e}=M.useContext(kr);return e?uv():Qg()}function Qg(){Ri()||Re(!1);let e=M.useContext(wc),{basename:t,future:r,navigator:s}=M.useContext(Vr),{matches:i}=M.useContext(kr),{pathname:o}=Ti(),c=JSON.stringify($f(i,r.v7_relativeSplatPath)),n=M.useRef(!1);return Kf(()=>{n.current=!0}),M.useCallback(function(f,m){if(m===void 0&&(m={}),!n.current)return;if(typeof f=="number"){s.go(f);return}let p=Wf(f,JSON.parse(c),o,m.relative==="path");e==null&&t!=="/"&&(p.pathname=p.pathname==="/"?t:vr([t,p.pathname])),(m.replace?s.replace:s.push)(p,m.state,m)},[t,s,c,o,e])}function Yg(){let{matches:e}=M.useContext(kr),t=e[e.length-1];return t?t.params:{}}function Xf(e,t){let{relative:r}=t===void 0?{}:t,{future:s}=M.useContext(Vr),{matches:i}=M.useContext(kr),{pathname:o}=Ti(),c=JSON.stringify($f(i,s.v7_relativeSplatPath));return M.useMemo(()=>Wf(e,JSON.parse(c),o,r==="path"),[e,c,o,r])}function Zg(e,t){return ev(e,t)}function ev(e,t,r,s){Ri()||Re(!1);let{navigator:i}=M.useContext(Vr),{matches:o}=M.useContext(kr),c=o[o.length-1],n=c?c.params:{};c&&c.pathname;let a=c?c.pathnameBase:"/";c&&c.route;let f=Ti(),m;if(t){var p;let u=typeof t=="string"?ks(t):t;a==="/"||(p=u.pathname)!=null&&p.startsWith(a)||Re(!1),m=u}else m=f;let _=m.pathname||"/",S=_;if(a!=="/"){let u=a.replace(/^\//,"").split("/");S="/"+_.replace(/^\//,"").split("/").slice(u.length).join("/")}let b=Eg(e,{pathname:S}),y=nv(b&&b.map(u=>Object.assign({},u,{params:Object.assign({},n,u.params),pathname:vr([a,i.encodeLocation?i.encodeLocation(u.pathname).pathname:u.pathname]),pathnameBase:u.pathnameBase==="/"?a:vr([a,i.encodeLocation?i.encodeLocation(u.pathnameBase).pathname:u.pathnameBase])})),o,r,s);return t&&y?M.createElement(_o.Provider,{value:{location:Si({pathname:"/",search:"",hash:"",state:null,key:"default"},m),navigationType:cr.Pop}},y):y}function tv(){let e=cv(),t=Kg(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return M.createElement(M.Fragment,null,M.createElement("h2",null,"Unexpected Application Error!"),M.createElement("h3",{style:{fontStyle:"italic"}},t),r?M.createElement("pre",{style:i},r):null,null)}const rv=M.createElement(tv,null);class sv extends M.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?M.createElement(kr.Provider,{value:this.props.routeContext},M.createElement(qf.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function iv(e){let{routeContext:t,match:r,children:s}=e,i=M.useContext(wc);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),M.createElement(kr.Provider,{value:t},s)}function nv(e,t,r,s){var i;if(t===void 0&&(t=[]),r===void 0&&(r=null),s===void 0&&(s=null),e==null){var o;if(!r)return null;if(r.errors)e=r.matches;else if((o=s)!=null&&o.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let c=e,n=(i=r)==null?void 0:i.errors;if(n!=null){let m=c.findIndex(p=>p.route.id&&(n==null?void 0:n[p.route.id])!==void 0);m>=0||Re(!1),c=c.slice(0,Math.min(c.length,m+1))}let a=!1,f=-1;if(r&&s&&s.v7_partialHydration)for(let m=0;m<c.length;m++){let p=c[m];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(f=m),p.route.id){let{loaderData:_,errors:S}=r,b=p.route.loader&&_[p.route.id]===void 0&&(!S||S[p.route.id]===void 0);if(p.route.lazy||b){a=!0,f>=0?c=c.slice(0,f+1):c=[c[0]];break}}}return c.reduceRight((m,p,_)=>{let S,b=!1,y=null,u=null;r&&(S=n&&p.route.id?n[p.route.id]:Line truncated
|
||||
* React Router DOM v6.30.3
|
||||
*
|
||||
* Copyright (c) Remix Software Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE.md file in the root directory of this source tree.
|
||||
*
|
||||
* @license MIT
|
||||
*/function al(){return al=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},al.apply(this,arguments)}function mv(e,t){if(e==null)return{};var r={},s=Object.keys(e),i,o;for(o=0;o<s.length;o++)i=s[o],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function _v(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function gv(e,t){return e.button===0&&(!t||t==="_self")&&!_v(e)}const vv=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],yv="6";try{window.__reactRouterVersion=yv}catch{}const Sv="startTransition",Zu=um[Sv];function xv(e){let{basename:t,children:r,future:s,window:i}=e,o=M.useRef();o.current==null&&(o.current=bg({window:i,v5Compat:!0}));let c=o.current,[n,a]=M.useState({action:c.action,location:c.location}),{v7_startTransition:f}=s||{},m=M.useCallback(p=>{f&&Zu?Zu(()=>a(p)):a(p)},[a,f]);return M.useLayoutEffect(()=>c.listen(m),[c,m]),M.useEffect(()=>dv(s),[s]),M.createElement(fv,{basename:t,children:r,location:n.location,navigationType:n.action,navigator:c,future:s})}const bv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",wv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Cv=M.forwardRef(function(t,r){let{onClick:s,relative:i,reloadDocument:o,replace:c,state:n,target:a,to:f,preventScrollReset:m,viewTransition:p}=t,_=mv(t,vv),{basename:S}=M.useContext(Vr),b,y=!1;if(typeof f=="string"&&wv.test(f)&&(b=f,bv))try{let d=new URL(window.location.href),g=f.startsWith("//")?new URL(d.protocol+f):new URL(f),x=bc(g.pathname,S);g.origin===d.origin&&x!=null?f=x+g.search+g.hash:y=!0}catch{}let u=Jg(f,{relative:i}),h=Ev(f,{replace:c,state:n,target:a,preventScrollReset:m,relative:i,viewTransition:p});function l(d){s&&s(d),d.defaultPrevented||h(d)}return M.createElement("a",al({},_,{href:b||u,onClick:y||o?s:l,ref:r,target:a}))});var eh;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(eh||(eh={}));var th;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(th||(th={}));function Ev(e,t){let{target:r,replace:s,state:i,preventScrollReset:o,relative:c,viewTransition:n}=t===void 0?{}:t,a=Cc(),f=Ti(),m=Xf(e,{relative:c});return M.useCallback(p=>{if(gv(p,r)){p.preventDefault();let _=s!==void 0?s:Qn(f)===Qn(m);a(e,{replace:_,state:i,preventScrollReset:o,relative:c,viewTransition:n})}},[f,a,m,s,i,r,e,o,c,n])}const kv={user:null,theme:localStorage.getItem("dune-theme")||"emperor",connectionStatus:{database:!0,ssh:!0,bgd:!0,rmq:!0},toasts:[]};let Rv=0;function Tv(e,t){switch(t.type){case"SET_USER":return{...e,user:t.payload};case"SET_THEME":return{...e,theme:t.payload};case"SET_CONNECTION":return{...e,connectionStatus:{...e.connectionStatus,...t.payload}};case"ADD_TOAST":return{...e,toasts:[...e.toasts.slice(-2),{...t.payload,id:++Rv}]};case"REMOVE_TOAST":return{...e,toasts:e.toasts.filter(r=>r.id!==t.payload)};default:return e}}const Yf=M.createContext(null);function Lv({children:e}){const[t,r]=M.useReducer(Tv,kv);return M.useEffect(()=>{document.documentElement.dataset.theme=t.theme,localStorage.setItem("dune-theme",t.theme)},[t.theme]),v.jsx(Yf.Provider,{value:{state:t,dispatch:r},children:e})}function Fe(){const e=M.useContext(Yf);if(!e)throw new Error("useApp must be used within AppProvider");return e}function Dv(){const{dispatch:e}=Fe(),t=M.useRef(null);M.useEffect(()=>{const r=new EventSource("/api/events/stream");return t.current=r,r.onopen=()=>{console.log("[SSE] Connected")},r.addEventListener("battlegroup_update",s=>{try{const i=JSON.parse(s.data);console.log("[SSE] battlegroup_update",i)}catch{}}),r.addEventListener("rmq_health",s=>{try{const i=JSON.parse(s.data);console.log("[SSE] rmq_health",i)}catch{}}),r.addEventListener("connection_status",s=>{try{const i=JSON.parse(s.data);e({type:"SET_CONNECTION",payload:i})}catch{}}),r.addEventListener("chat_message",s=>{try{const i=JSON.parse(s.data);console.log("[SSE] chat_message",i)}catch{}}),r.onerror=()=>{console.warn("[SSE] Connection error")},()=>{r.close()}},[e])}const Av=[{key:"default",label:"Classic Dune"},{key:"atreides",label:"House Atreides"},{key:"harkonnen",label:"House Harkonnen"},{key:"fremen",label:"Fremen"},{key:"bene-gesserit",label:"Bene Gesserit"},{key:"spacing-guild",label:"Spacing Guild"},{key:"emperor",label:"Emperor"},{key:"corrino",label:"House Corrino"},{key:"mentat",label:"Mentat"},{key:"sardaukar",label:"Sardaukar"},{key:"tleilax",label:"Bene Tleilax"},{key:"ordos",label:"House Ordos"},{key:"ix",label:"Ix"},{key:"choam",label:"CHOAM"}];function Ov(){const{state:e,dispatch:t}=Fe(),[r,s]=M.useState(!1),i=M.useRef(null);return M.useEffect(()=>{function o(c){i.current&&!i.current.contains(c.target)&&s(!1)}return document.addEventLiLine truncated
|
||||
`).forEach(function(c){i=c.indexOf(":"),r=c.substring(0,i).trim().toLowerCase(),s=c.substring(i+1).trim(),!(!r||t[r]&&ky[r])&&(r==="set-cookie"?t[r]?t[r].push(s):t[r]=[s]:t[r]=t[r]?t[r]+", "+s:s)}),t};function Ty(e){let t=0,r=e.length;for(;t<r;){const s=e.charCodeAt(t);if(s!==9&&s!==32)break;t+=1}for(;r>t;){const s=e.charCodeAt(r-1);if(s!==9&&s!==32)break;r-=1}return t===0&&r===e.length?e:e.slice(t,r)}const Ly=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),Dy=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Ec(e,t){return I.isArray(e)?e.map(r=>Ec(r,t)):Ty(String(e).replace(t,""))}const Ay=e=>Ec(e,Ly),Oy=e=>Ec(e,Dy);function ap(e){const t=Object.create(null);return I.forEach(e.toJSON(),(r,s)=>{t[s]=Oy(r)}),t}const ih=Symbol("internals");function Is(e){return e&&String(e).trim().toLowerCase()}function xn(e){return e===!1||e==null?e:I.isArray(e)?e.map(xn):Ay(String(e))}function Ny(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=r.exec(e);)t[s[1]]=s[2];return t}const Py=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Yo(e,t,r,s,i){if(I.isFunction(s))return s.call(this,t,r);if(i&&(t=r),!!I.isString(t)){if(I.isString(s))return t.indexOf(s)!==-1;if(I.isRegExp(s))return s.test(t)}}function By(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,s)=>r.toUpperCase()+s)}function jy(e,t){const r=I.toCamelCase(" "+t);["get","set","has"].forEach(s=>{Object.defineProperty(e,s+r,{__proto__:null,value:function(i,o,c){return this[s].call(this,t,i,o,c)},configurable:!0})})}let Ye=class{constructor(t){t&&this.set(t)}set(t,r,s){const i=this;function o(n,a,f){const m=Is(a);if(!m)throw new Error("header name must be a non-empty string");const p=I.findKey(i,m);(!p||i[p]===void 0||f===!0||f===void 0&&i[p]!==!1)&&(i[p||a]=xn(n))}const c=(n,a)=>I.forEach(n,(f,m)=>o(f,m,a));if(I.isPlainObject(t)||t instanceof this.constructor)c(t,r);else if(I.isString(t)&&(t=t.trim())&&!Py(t))c(Ry(t),r);else if(I.isObject(t)&&I.isIterable(t)){let n={},a,f;for(const m of t){if(!I.isArray(m))throw TypeError("Object iterator must return a key-value pair");n[f=m[0]]=(a=n[f])?I.isArray(a)?[...a,m[1]]:[a,m[1]]:m[1]}c(n,r)}else t!=null&&o(r,t,s);return this}get(t,r){if(t=Is(t),t){const s=I.findKey(this,t);if(s){const i=this[s];if(!r)return i;if(r===!0)return Ny(i);if(I.isFunction(r))return r.call(this,i,s);if(I.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Is(t),t){const s=I.findKey(this,t);return!!(s&&this[s]!==void 0&&(!r||Yo(this,this[s],s,r)))}return!1}delete(t,r){const s=this;let i=!1;function o(c){if(c=Is(c),c){const n=I.findKey(s,c);n&&(!r||Yo(s,s[n],n,r))&&(delete s[n],i=!0)}}return I.isArray(t)?t.forEach(o):o(t),i}clear(t){const r=Object.keys(this);let s=r.length,i=!1;for(;s--;){const o=r[s];(!t||Yo(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const r=this,s={};return I.forEach(this,(i,o)=>{const c=I.findKey(s,o);if(c){r[c]=xn(i),delete r[o];return}const n=t?By(o):String(o).trim();n!==o&&delete r[o],r[n]=xn(i),s[n]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return I.forEach(this,(s,i)=>{s!=null&&s!==!1&&(r[i]=t&&I.isArray(s)?s.join(", "):s)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
|
||||
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const s=new this(t);return r.forEach(i=>s.set(i)),s}static accessor(t){const s=(this[ih]=this[ih]={accessors:{}}).accessors,i=this.prototype;function o(c){const n=Is(c);s[n]||(jy(i,c),s[n]=!0)}return I.isArray(t)?t.forEach(o):o(t),this}};Ye.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);I.reduceDescriptors(Ye.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(s){this[r]=s}}});I.freezeMethods(Ye);const My="[REDACTED ****]";function Iy(e){if(I.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(I.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function Fy(e,t){const r=new Set(t.map(o=>String(o).toLowerCase())),s=[],i=o=>{if(o===null||typeof o!="object"||I.isBuffer(o))return o;if(s.indexOf(o)!==-1)return;o instanceof Ye&&(o=o.toJSON()),s.push(o);let c;if(I.isArray(o))c=[],o.forEach((n,a)=>{const f=i(n);I.isUndefined(f)||(c[a]=f)});else{if(!I.isPlainObject(o)&&Iy(o))return s.pop(),o;c=Object.create(null);for(const[n,a]of Object.entries(o)){const f=r.has(n.toLowerCase())?My:i(a);I.isUndefined(f)||(c[n]=f)}}return s.pop(),c};return i(e)}let Z=class lp extends Error{static from(t,r,s,i,o,c){const n=new lp(t.message,r||t.code,s,i,o);return n.cause=t,n.name=t.name,t.status!=null&&n.status==null&&(n.status=t.status),c&&Object.assign(n,c),n}constructor(t,r,s,i,o){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),s&&(this.config=s),i&&(this.request=i),o&&(this.response=o,this.status=o.status)}toJSON(){const t=this.config,r=t&&I.hasOwnProp(t,"redact")?t.redact:void 0,s=I.isArray(r)&&r.length>0?Fy(t,r):I.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:s,code:this.code,status:this.status}}};Z.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Z.ERR_BAD_OPTION="ERR_BAD_OPTION";Z.ECONNABORTED="ECONNABORTED";Z.ETIMEDOUT="ETIMEDOUT";Z.ECONNREFUSED="ECONNREFUSED";Z.ERR_NETWORK="ERR_NETWORK";Z.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Z.ERR_DEPRECATED="ERR_DEPRECATED";Z.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Z.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Z.ERR_CANCELED="ERR_CANCELED";Z.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Z.ERR_INVALID_URL="ERR_INVALID_URL";Z.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Hy=null;function ul(e){return I.isPlainObject(e)||I.isArray(e)}function cp(e){return I.endsWith(e,"[]")?e.slice(0,-2):e}function Zo(e,t,r){return e?e.concat(t).map(function(i,o){return i=cp(i),!r&&o?"["+i+"]":i}).join(r?".":""):t}function Uy(e){return I.isArray(e)&&!e.some(ul)}const zy=I.toFlatObject(I,{},null,function(t){return/^is[A-Z]/.test(t)});function xo(e,t,r){if(!I.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=I.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(u,h){return!I.isUndefined(h[u])});const s=r.metaTokens,i=r.visitor||p,o=r.dots,c=r.indexes,n=r.Blob||typeof Blob<"u"&&Blob,a=r.maxDepth===void 0?100:r.maxDepth,f=n&&I.isSpecCompliantForm(t);if(!I.isFunction(i))throw new TypeError("visitor must be a function");function m(y){if(y===null)return"";if(I.isDate(y))return y.toISOString();if(I.isBoolean(y))return y.toString();if(!f&&I.isBlob(y))throw new Z("Blob is not supported. Use a Buffer instead.");return I.isArrayBuffer(y)||I.isTypedArray(y)?f&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function p(y,u,h){let l=y;if(I.isReactNative(t)&&I.isReactNativeBlob(y))return t.append(Zo(h,u,o),m(y)),!1;if(y&&!h&&typeof y=="object"){if(I.endsWith(u,"{}"))u=s?u:u.slice(0,-2),y=JSON.stringify(y);else if(I.isArray(y)&&Uy(y)||(I.isFileList(y)||I.endsWith(u,"[]"))&&(l=I.toArray(y)))return u=cp(u),l.forEach(function(g,x){!(I.isUndefined(g)||g===null)&&t.append(c===!0?Zo([u],x,o):c===null?u:u+"[]",m(g))}),!1}return ul(y)?!0:(t.append(Zo(h,u,o),m(y)),!1)}const _=[],S=Object.assign(zy,{defaultVisitor:p,convertValue:m,isVisitable:ul});function b(y,u,h=0){if(!I.isUndefined(y)){if(h>a)throw new Z("Object is too deeply nested ("+h+" levels). Max depth: "+a,Z.ERR_FORM_DATA_DEPTH_EXCEEDED);if(_.indexOf(y)!==-1)throw Error("Circular reference detected in "+u.join("."));_.push(y),I.forEach(y,function(d,g){(!(I.isUndefined(d)||d===null)&&i.call(t,d,I.isString(g)?g.trim():g,u,S))===!0&&b(d,u?u.concat(g):[g],h+1)}),_.pop()}}if(!I.isObject(e))throw new TypeError("data must be an object");return b(e),t}function nh(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(s){return t[s]})}function kc(e,t){t
Line truncated
|
||||
`+c.map(fh).join(`
|
||||
`):" "+fh(c[0]):"as no adapter specified";throw new Z("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return i}const vp={getAdapter:b0,adapters:Dc};function ta(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ni(null,e)}function ph(e){return ta(e),e.headers=Ye.from(e.headers),e.data=ea.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),vp.getAdapter(e.adapter||Oi.adapter,e)(e).then(function(s){ta(e),e.response=s;try{s.data=ea.call(e,e.transformResponse,s)}finally{delete e.response}return s.headers=Ye.from(s.headers),s},function(s){if(!fp(s)&&(ta(e),s&&s.response)){e.response=s.response;try{s.response.data=ea.call(e,e.transformResponse,s.response)}finally{delete e.response}s.response.headers=Ye.from(s.response.headers)}return Promise.reject(s)})}const bo={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{bo[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const mh={};bo.transitional=function(t,r,s){function i(o,c){return"[Axios v"+Lc+"] Transitional option '"+o+"'"+c+(s?". "+s:"")}return(o,c,n)=>{if(t===!1)throw new Z(i(c," has been removed"+(r?" in "+r:"")),Z.ERR_DEPRECATED);return r&&!mh[c]&&(mh[c]=!0,console.warn(i(c," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(o,c,n):!0}};bo.spelling=function(t){return(r,s)=>(console.warn(`${s} is likely a misspelling of ${t}`),!0)};function w0(e,t,r){if(typeof e!="object")throw new Z("options must be an object",Z.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let i=s.length;for(;i-- >0;){const o=s[i],c=Object.prototype.hasOwnProperty.call(t,o)?t[o]:void 0;if(c){const n=e[o],a=n===void 0||c(n,o,e);if(a!==!0)throw new Z("option "+o+" must be "+a,Z.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Z("Unknown option "+o,Z.ERR_BAD_OPTION)}}const bn={assertOptions:w0,validators:bo},mt=bn.validators;let jr=class{constructor(t){this.defaults=t||{},this.interceptors={request:new oh,response:new oh}}async request(t,r){try{return await this._request(t,r)}catch(s){if(s instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=(()=>{if(!i.stack)return"";const c=i.stack.indexOf(`
|
||||
`);return c===-1?"":i.stack.slice(c+1)})();try{if(!s.stack)s.stack=o;else if(o){const c=o.indexOf(`
|
||||
`),n=c===-1?-1:o.indexOf(`
|
||||
`,c+1),a=n===-1?"":o.slice(n+1);String(s.stack).endsWith(a)||(s.stack+=`
|
||||
`+o)}}catch{}}throw s}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=zr(this.defaults,r);const{transitional:s,paramsSerializer:i,headers:o}=r;s!==void 0&&bn.assertOptions(s,{silentJSONParsing:mt.transitional(mt.boolean),forcedJSONParsing:mt.transitional(mt.boolean),clarifyTimeoutError:mt.transitional(mt.boolean),legacyInterceptorReqResOrdering:mt.transitional(mt.boolean)},!1),i!=null&&(I.isFunction(i)?r.paramsSerializer={serialize:i}:bn.assertOptions(i,{encode:mt.function,serialize:mt.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),bn.assertOptions(r,{baseUrl:mt.spelling("baseURL"),withXsrfToken:mt.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let c=o&&I.merge(o.common,o[r.method]);o&&I.forEach(["delete","get","head","post","put","patch","query","common"],b=>{delete o[b]}),r.headers=Ye.concat(c,o);const n=[];let a=!0;this.interceptors.request.forEach(function(y){if(typeof y.runWhen=="function"&&y.runWhen(r)===!1)return;a=a&&y.synchronous;const u=r.transitional||Rc;u&&u.legacyInterceptorReqResOrdering?n.unshift(y.fulfilled,y.rejected):n.push(y.fulfilled,y.rejected)});const f=[];this.interceptors.response.forEach(function(y){f.push(y.fulfilled,y.rejected)});let m,p=0,_;if(!a){const b=[ph.bind(this),void 0];for(b.unshift(...n),b.push(...f),_=b.length,m=Promise.resolve(r);p<_;)m=m.then(b[p++],b[p++]);return m}_=n.length;let S=r;for(;p<_;){const b=n[p++],y=n[p++];try{S=b(S)}catch(u){y.call(this,u);break}}try{m=ph.call(this,S)}catch(b){return Promise.reject(b)}for(p=0,_=f.length;p<_;)m=m.then(f[p++],f[p++]);return m}getUri(t){t=zr(this.defaults,t);const r=mp(t.baseURL,t.url,t.allowAbsoluteUrls);return hp(r,t.params,t.paramsSerializer)}};I.forEach(["delete","get","head","options"],function(t){jr.prototype[t]=function(r,s){return this.request(zr(s||{},{method:t,url:r,data:(s||{}).data}))}});I.forEach(["post","put","patch","query"],function(t){function r(s){return function(o,c,n){return this.request(zr(n||{},{method:t,headers:s?{"Content-Type":"multipart/form-data"}:{},url:o,data:c}))}}jr.prototype[t]=r(),t!=="query"&&(jr.prototype[t+"Form"]=r(!0))});let C0=class yp{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(o){r=o});const s=this;this.promise.then(i=>{if(!s._listeners)return;let o=s._listeners.length;for(;o-- >0;)s._listeners[o](i);s._listeners=null}),this.promise.then=i=>{let o;const c=new Promise(n=>{s.subscribe(n),o=n}).then(i);return c.cancel=function(){s.unsubscribe(o)},c},t(function(o,c,n){s.reason||(s.reason=new Ni(o,c,n),r(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=s=>{t.abort(s)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new yp(function(i){t=i}),cancel:t}}};function E0(e){return function(r){return e.apply(null,r)}}function k0(e){return I.isObject(e)&&e.isAxiosError===!0}const dl={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(dl).forEach(([e,t])=>{dl[t]=e});function Sp(e){const t=new jr(e),r=Zf(jr.prototype.request,t);return I.extend(r,jr.prototype,t,{allOwnKeys:!0}),I.extend(r,t,null,{allOwnKeys:!0}),r.create=function(i){return Sp(zr(e,i))},r}const Ce=Sp(Oi);Ce.Axios=jr;Ce.CanceledError=Ni;Ce.CancelToken=C0;Ce.isCa
Line truncated
|
||||
* @license React
|
||||
* use-sync-external-store-shim.production.js
|
||||
*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var bs=M;function T0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var L0=typeof Object.is=="function"?Object.is:T0,D0=bs.useState,A0=bs.useEffect,O0=bs.useLayoutEffect,N0=bs.useDebugValue;function P0(e,t){var r=t(),s=D0({inst:{value:r,getSnapshot:t}}),i=s[0].inst,o=s[1];return O0(function(){i.value=r,i.getSnapshot=t,ra(i)&&o({inst:i})},[e,r,t]),A0(function(){return ra(i)&&o({inst:i}),e(function(){ra(i)&&o({inst:i})})},[e]),N0(r),r}function ra(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!L0(e,r)}catch{return!0}}function B0(e,t){return t()}var j0=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?B0:P0;bp.useSyncExternalStore=bs.useSyncExternalStore!==void 0?bs.useSyncExternalStore:j0;xp.exports=bp;var _h=xp.exports;const wp=0,Cp=1,Ep=2,gh=3;var vh=Object.prototype.hasOwnProperty;function fl(e,t){var r,s;if(e===t)return!0;if(e&&t&&(r=e.constructor)===t.constructor){if(r===Date)return e.getTime()===t.getTime();if(r===RegExp)return e.toString()===t.toString();if(r===Array){if((s=e.length)===t.length)for(;s--&&fl(e[s],t[s]););return s===-1}if(!r||typeof e=="object"){s=0;for(r in e)if(vh.call(e,r)&&++s&&!vh.call(t,r)||!(r in t)||!fl(e[r],t[r]))return!1;return Object.keys(t).length===s}}return e!==e&&t!==t}const qt=new WeakMap,Gt=()=>{},Ke=Gt(),pl=Object,se=e=>e===Ke,It=e=>typeof e=="function",br=(e,t)=>({...e,...t}),kp=e=>It(e.then),sa={},rn={},Ac="undefined",Pi=typeof window!=Ac,ml=typeof document!=Ac,M0=Pi&&"Deno"in window,I0=()=>Pi&&typeof window.requestAnimationFrame!=Ac,Rp=(e,t)=>{const r=qt.get(e);return[()=>!se(t)&&e.get(t)||sa,s=>{if(!se(t)){const i=e.get(t);t in rn||(rn[t]=i),r[5](t,br(i,s),i||sa)}},r[6],()=>!se(t)&&t in rn?rn[t]:!se(t)&&e.get(t)||sa]};let _l=!0;const F0=()=>_l,[gl,vl]=Pi&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[Gt,Gt],H0=()=>{const e=ml&&document.visibilityState;return se(e)||e!=="hidden"},U0=e=>(ml&&document.addEventListener("visibilitychange",e),gl("focus",e),()=>{ml&&document.removeEventListener("visibilitychange",e),vl("focus",e)}),z0=e=>{const t=()=>{_l=!0,e()},r=()=>{_l=!1};return gl("online",t),gl("offline",r),()=>{vl("online",t),vl("offline",r)}},$0={isOnline:F0,isVisible:H0},W0={initFocus:U0,initReconnect:z0},yh=!bi.useId,fs=!Pi||M0,V0=e=>I0()?window.requestAnimationFrame(e):setTimeout(e,1),ia=fs?M.useEffect:M.useLayoutEffect,na=typeof navigator<"u"&&navigator.connection,Sh=!fs&&na&&(["slow-2g","2g"].includes(na.effectiveType)||na.saveData),sn=new WeakMap,q0=e=>pl.prototype.toString.call(e),oa=(e,t)=>e===`[object ${t}]`;let K0=0;const yl=e=>{const t=typeof e,r=q0(e),s=oa(r,"Date"),i=oa(r,"RegExp"),o=oa(r,"Object");let c,n;if(pl(e)===e&&!s&&!i){if(c=sn.get(e),c)return c;if(c=++K0+"~",sn.set(e,c),Array.isArray(e)){for(c="@",n=0;n<e.length;n++)c+=yl(e[n])+",";sn.set(e,c)}if(o){c="#";const a=pl.keys(e).sort();for(;!se(n=a.pop());)se(e[n])||(c+=n+":"+yl(e[n])+",");sn.set(e,c)}}else c=s?e.toJSON():t=="symbol"?e.toString():t=="string"?JSON.stringify(e):""+e;return c},Oc=e=>{if(It(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?yl(e):"",[e,t]};let X0=0;const Sl=()=>++X0;async function Tp(...e){const[t,r,s,i]=e,o=br({populateCache:!0,throwOnError:!0},typeof i=="boolean"?{revalidate:i}:i||{});let c=o.populateCache;const n=o.rollbackOnError;let a=o.optimisticData;const f=_=>typeof n=="function"?n(_):n!==!1,m=o.throwOnError;if(It(r)){const _=r,S=[],b=t.keys();for(const y of b)!/^\$(inf|sub)\$/.test(y)&&_(t.get(y)._k)&&S.push(y);return Promise.all(S.map(p))}return p(r);async function p(_){const[S]=Oc(_);if(!S)return;const[b,y]=Rp(t,S),[u,h,l,d]=qt.get(t),g=()=>{const F=u[S];return(It(o.revalidate)?o.revalidate(b().data,_):o.revalidate!==!1)&&(delete l[S],delete d[S],F&&F[0])?F[0](Ep).then(()=>b().data):b().data};if(e.length<3)return g();let x=s,C,k=!1;const w=Sl();h[S]=[w,0];const E=!se(a),L=b(),N=L.data,O=L._c,P=se(O)?N:O;if(E&&(a=It(a)?a(P,N):a,y({data:a,_c:P})),It(x))try{x=x(P)}catch(F){C=F,k=!0}if(x&&kp(x))if(x=await x.catch(F=>{C=F,k=!0}),w!==h[S][0]){if(k)throw C;return x}else k&&E&&f(C)&&(c=!0,y({data:P,_c:Ke}));if(c&&!k)if(It(c)){const F=c(x,P);y({data:F,error:Ke,_c:Ke})}else y({data:x,error:Ke,_c:Ke});if(h[S][1]=Sl(),Promise.resolve(g()).then(()=>{y({_c:Ke})}),k){if(m)throw C;return}return x}}const xh=(e,t)=>{for(const r in e)e[r][0]&&e[r][0](t)},G0=(e,t)=>{if(!qt.has(e)){const r=br(W0,t),s=Object.create(null),i=Tp.bind(Ke,e);let o=Gt;const c=Object.create(null),n=(m,p)=>{const _=c[m]||[];return c[m]=_,_.push(p),()=>_.splice(_.indexOf(p),1)},a=(m,p,_)=>{e.set(m,p);const S=c[m];if(S)for(const b of S)b(p,_)},f=()=>{if(!qt.has(e)&&(qt.set(e,[s,Object.create(null),Object.create(null),Object.create(null),i,a,n]),!fs)){const m=r.initFocus(setTimeout.bind(Ke,xh.bind(Ke,s,wp))),p=r.initReconnect(setTimeout.bind(Ke,xh.bind(Ke,s,Cp)));o=()=>{m&&m(),p&&p(),qt.delete(e)}}};return f(),[e,i,f,o]}return[e,qt.get(e)[4]]},J0=(e,t,r,s,Line truncated
|
||||
`))),this.register(this._terminal.onA11yTab(x=>this._handleTab(x))),this.register(this._terminal.onKey(x=>this._handleKey(x.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._screenDprMonitor=new y.ScreenDprMonitor(window),this.register(this._screenDprMonitor),this._screenDprMonitor.setListener(()=>this._refreshRowsDimensions()),this.register((0,h.addDisposableDomListener)(window,"resize",()=>this._refreshRowsDimensions())),this._refreshRows(),this.register((0,b.toDisposable)(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(d){for(let g=0;g<d;g++)this._handleChar(" ")}_handleChar(d){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==d&&(this._charsToAnnounce+=d):this._charsToAnnounce+=d,d===`
|
||||
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=p.tooMuchOutput)),_.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(()=>{this._accessibilityContainer.appendChild(this._liveRegion)},0))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0,_.isMac&&this._liveRegion.remove()}_handleKey(d){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(d)||this._charsToConsume.push(d)}_refreshRows(d,g){this._liveRegionDebouncer.refresh(d,g,this._terminal.rows)}_renderRows(d,g){const x=this._terminal.buffer,C=x.lines.length.toString();for(let k=d;k<=g;k++){const w=x.translateBufferLineToString(x.ydisp+k,!0),E=(x.ydisp+k+1).toString(),L=this._rowElements[k];L&&(w.length===0?L.innerText=" ":L.textContent=w,L.setAttribute("aria-posinset",E),L.setAttribute("aria-setsize",C))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(d,g){const x=d.target,C=this._rowElements[g===0?1:this._rowElements.length-2];if(x.getAttribute("aria-posinset")===(g===0?"1":`${this._terminal.buffer.lines.length}`)||d.relatedTarget!==C)return;let k,w;if(g===0?(k=x,w=this._rowElements.pop(),this._rowContainer.removeChild(w)):(k=this._rowElements.shift(),w=x,this._rowContainer.removeChild(k)),k.removeEventListener("focus",this._topBoundaryFocusListener),w.removeEventListener("focus",this._bottomBoundaryFocusListener),g===0){const E=this._createAccessibilityTreeNode();this._rowElements.unshift(E),this._rowContainer.insertAdjacentElement("afterbegin",E)}else{const E=this._createAccessibilityTreeNode();this._rowElements.push(E),this._rowContainer.appendChild(E)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(g===0?-1:1),this._rowElements[g===0?1:this._rowElements.length-2].focus(),d.preventDefault(),d.stopImmediatePropagation()}_handleResize(d){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let g=this._rowContainer.children.length;g<this._terminal.rows;g++)this._rowElements[g]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[g]);for(;this._rowElements.length>d;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const d=document.createElement("div");return d.setAttribute("role","listitem"),d.tabIndex=-1,this._refreshRowDimensions(d),d}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let d=0;d<this._terminal.rows;d++)this._refreshRowDimensions(this._rowElements[d])}}_refreshRowDimensions(d){d.style.height=`${this._renderService.dimensions.css.cell.height}px`}};n.AccessibilityManager=l=f([m(1,u.IRenderService)],l)},3614:(c,n)=>{function a(_){return _.replace(/\r?\n/g,"\r")}function f(_,S){return S?"\x1B[200~"+_+"\x1B[201~":_}function m(_,S,b,y){_=f(_=a(_),b.decPrivateModes.bracketedPasteMode&&y.rawOptions.ignoreBracketedPasteMode!==!0),b.triggerDataEvent(_,!0),S.value=""}function p(_,S,b){const y=b.getBoundingClientRect(),u=_.clientX-y.left-10,h=_.clientY-y.top-10;S.style.width="20px",S.style.height="20px",S.style.left=`${u}px`,S.style.top=`${h}px`,S.style.zIndex="1000",S.focus()}Object.defineProperty(n,"__esModule",{value:!0}),n.rightClickHandler=n.moveTextAreaUnderMouseCursor=n.paste=n.handlePasteEvent=n.copyHandler=n.bracketTextForPaste=n.prepareTextForTerminal=void 0,n.prepareTextForTerminal=a,n.bracketTextForPaste=f,n.copyHandler=function(_,S){_.clipboardData&&_.clipboardData.setData("text/plain",S.selectionText),_.preventDefault()},n.handlePasteEvent=function(_,S,b,y){_.stopPropagation(),_.clipboardData&&m(_.clipboardData.getData("text/plain"),S,b,y)},n.paste=m,n.moveTextAreaUnderMouseCursor=p,n.rightClickHandler=function(_,S,b,y,u){p(_,S,b),u&&y.rightClickSelect(_),S.value=y.selectionText,S.select()}},7239:(c,n,a)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ColorContrastCache=void 0;const f=a(1505);n.ColorContrastCache=class{constructor(){this._color=new f.TwoKeyMap,this._css=new f.TwoKeyMap}setCss(m,p,_){this._css.set(m,p,_)}getCss(m,p){return this._css.get(m,p)}setColor(m,p,_){this._color.set(m,p,_)}getColor(m,p){return this._color.get(m,p)}clear(){this._color.clear(),this._css.clear()}}},3656:(c,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.addDisposableDomListener=void 0,n.addDisposableDomListener=function(a,f,m,p)
Line truncated
|
||||
|
||||
WARNING: This link could potentially be dangerous`)){const h=window.open();if(h){try{h.opener=null}catch{}h.location.href=u}else console.warn("Opening link blocked as opener could not be cleared")}}n.OscLinkProvider=S=f([m(0,_.IBufferService),m(1,_.IOptionsService),m(2,_.IOscLinkService)],S)},6193:(c,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.RenderDebouncer=void 0,n.RenderDebouncer=class{constructor(a,f){this._parentWindow=a,this._renderCallback=f,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._parentWindow.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(a){return this._refreshCallbacks.push(a),this._animationFrame||(this._animationFrame=this._parentWindow.requestAnimationFrame(()=>this._innerRefresh())),this._animationFrame}refresh(a,f,m){this._rowCount=m,a=a!==void 0?a:0,f=f!==void 0?f:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,a):a,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,f):f,this._animationFrame||(this._animationFrame=this._parentWindow.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const a=Math.max(this._rowStart,0),f=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(a,f),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const a of this._refreshCallbacks)a(0);this._refreshCallbacks=[]}}},5596:(c,n,a)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ScreenDprMonitor=void 0;const f=a(844);class m extends f.Disposable{constructor(_){super(),this._parentWindow=_,this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this.register((0,f.toDisposable)(()=>{this.clearListener()}))}setListener(_){this._listener&&this.clearListener(),this._listener=_,this._outerListener=()=>{this._listener&&(this._listener(this._parentWindow.devicePixelRatio,this._currentDevicePixelRatio),this._updateDpr())},this._updateDpr()}_updateDpr(){var _;this._outerListener&&((_=this._resolutionMediaMatchList)===null||_===void 0||_.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._listener&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._listener=void 0,this._outerListener=void 0)}}n.ScreenDprMonitor=m},3236:(c,n,a)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Terminal=void 0;const f=a(3614),m=a(3656),p=a(6465),_=a(9042),S=a(3730),b=a(1680),y=a(3107),u=a(5744),h=a(2950),l=a(1296),d=a(428),g=a(4269),x=a(5114),C=a(8934),k=a(3230),w=a(9312),E=a(4725),L=a(6731),N=a(8055),O=a(8969),P=a(8460),F=a(844),z=a(6114),W=a(8437),V=a(2584),R=a(7399),D=a(5941),A=a(9074),B=a(2585),H=a(5435),q=a(4567),G=typeof window<"u"?window.document:null;class X extends O.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(T={}){super(T),this.browser=z,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new F.MutableDisposable),this._onCursorMove=this.register(new P.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new P.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new P.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new P.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new P.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new P.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new P.EventEmitter),this._onBlur=this.register(new P.EventEmitter),this._onA11yCharEmitter=this.register(new P.EventEmitter),this._onA11yTabEmitter=this.register(new P.EventEmitter),this._onWillOpen=this.register(new P.EventEmitter),this._setup(),this.linkifier2=this.register(this._instantiationService.createInstance(p.Linkifier2)),this.linkifier2.registerLinkProvider(this._instantiationService.createInstance(S.OscLinkProvider)),this._decorationService=this._instantiationService.createInstance(A.DecorationService),this._instantiationService.setService(B.IDecorationService,this._decorationService),this.register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this.register(this._inputHandler.onRequestRefreshRows((j,$)=>this.refresh(j,$))),this.r
Line truncated
|
||||
`:`
|
||||
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(w){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),h.isLinux&&w&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(w){const E=this._getMouseBufferCoords(w),L=this._model.finalSelectionStart,N=this._model.finalSelectionEnd;return!!(L&&N&&E)&&this._areCoordsInSelection(E,L,N)}isCellInSelection(w,E){const L=this._model.finalSelectionStart,N=this._model.finalSelectionEnd;return!(!L||!N)&&this._areCoordsInSelection([w,E],L,N)}_areCoordsInSelection(w,E,L){return w[1]>E[1]&&w[1]<L[1]||E[1]===L[1]&&w[1]===E[1]&&w[0]>=E[0]&&w[0]<L[0]||E[1]<L[1]&&w[1]===L[1]&&w[0]<L[0]||E[1]<L[1]&&w[1]===E[1]&&w[0]>=E[0]}_selectWordAtCursor(w,E){var L,N;const O=(N=(L=this._linkifier.currentLink)===null||L===void 0?void 0:L.link)===null||N===void 0?void 0:N.range;if(O)return this._model.selectionStart=[O.start.x-1,O.start.y-1],this._model.selectionStartLength=(0,l.getRangeLength)(O,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const P=this._getMouseBufferCoords(w);return!!P&&(this._selectWordAt(P,E),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(w,E){this._model.clearSelection(),w=Math.max(w,0),E=Math.min(E,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,w],this._model.selectionEnd=[this._bufferService.cols,E],this.refresh(),this._onSelectionChange.fire()}_handleTrim(w){this._model.handleTrim(w)&&this.refresh()}_getMouseBufferCoords(w){const E=this._mouseService.getCoords(w,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(E)return E[0]--,E[1]--,E[1]+=this._bufferService.buffer.ydisp,E}_getMouseEventScrollAmount(w){let E=(0,p.getCoordsRelativeToElement)(this._coreBrowserService.window,w,this._screenElement)[1];const L=this._renderService.dimensions.css.canvas.height;return E>=0&&E<=L?0:(E>L&&(E-=L),E=Math.min(Math.max(E,-50),50),E/=50,E/Math.abs(E)+Math.round(14*E))}shouldForceSelection(w){return h.isMac?w.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:w.shiftKey}handleMouseDown(w){if(this._mouseDownTimeStamp=w.timeStamp,(w.button!==2||!this.hasSelection)&&w.button===0){if(!this._enabled){if(!this.shouldForceSelection(w))return;w.stopPropagation()}w.preventDefault(),this._dragScrollAmount=0,this._enabled&&w.shiftKey?this._handleIncrementalClick(w):w.detail===1?this._handleSingleClick(w):w.detail===2?this._handleDoubleClick(w):w.detail===3&&this._handleTripleClick(w),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval(()=>this._dragScroll(),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(w){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(w))}_handleSingleClick(w){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(w)?3:0,this._model.selectionStart=this._getMouseBufferCoords(w),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const E=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);E&&E.length!==this._model.selectionStart[0]&&E.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(w){this._selectWordAtCursor(w,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(w){const E=this._getMouseBufferCoords(w);E&&(this._activeSelectionMode=2,this._selectLineAt(E[1]))}shouldColumnSelect(w){return w.altKey&&!(h.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(w){if(w.stopImmediatePropagation(),!this._model.selectionStart)return;const E=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(w),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.sele
Line truncated
|
||||
`,p.VT="\v",p.FF="\f",p.CR="\r",p.SO="",p.SI="",p.DLE="",p.DC1="",p.DC2="",p.DC3="",p.DC4="",p.NAK="",p.SYN="",p.ETB="",p.CAN="",p.EM="",p.SUB="",p.ESC="\x1B",p.FS="",p.GS="",p.RS="",p.US="",p.SP=" ",p.DEL=""}(a||(n.C0=a={})),function(p){p.PAD="",p.HOP="",p.BPH="",p.NBH="",p.IND="",p.NEL="
",p.SSA="",p.ESA="",p.HTS="",p.HTJ="",p.VTS="",p.PLD="",p.PLU="",p.RI="",p.SS2="",p.SS3="",p.DCS="",p.PU1="",p.PU2="",p.STS="",p.CCH="",p.MW="",p.SPA="",p.EPA="",p.SOS="",p.SGCI="",p.SCI="",p.CSI="",p.ST="",p.OSC="",p.PM="",p.APC=""}(f||(n.C1=f={})),function(p){p.ST=`${a.ESC}\\`}(m||(n.C1_ESCAPED=m={}))},7399:(c,n,a)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.evaluateKeyboardEvent=void 0;const f=a(2584),m={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};n.evaluateKeyboardEvent=function(p,_,S,b){const y={type:0,cancel:!1,key:void 0},u=(p.shiftKey?1:0)|(p.altKey?2:0)|(p.ctrlKey?4:0)|(p.metaKey?8:0);switch(p.keyCode){case 0:p.key==="UIKeyInputUpArrow"?y.key=_?f.C0.ESC+"OA":f.C0.ESC+"[A":p.key==="UIKeyInputLeftArrow"?y.key=_?f.C0.ESC+"OD":f.C0.ESC+"[D":p.key==="UIKeyInputRightArrow"?y.key=_?f.C0.ESC+"OC":f.C0.ESC+"[C":p.key==="UIKeyInputDownArrow"&&(y.key=_?f.C0.ESC+"OB":f.C0.ESC+"[B");break;case 8:if(p.altKey){y.key=f.C0.ESC+f.C0.DEL;break}y.key=f.C0.DEL;break;case 9:if(p.shiftKey){y.key=f.C0.ESC+"[Z";break}y.key=f.C0.HT,y.cancel=!0;break;case 13:y.key=p.altKey?f.C0.ESC+f.C0.CR:f.C0.CR,y.cancel=!0;break;case 27:y.key=f.C0.ESC,p.altKey&&(y.key=f.C0.ESC+f.C0.ESC),y.cancel=!0;break;case 37:if(p.metaKey)break;u?(y.key=f.C0.ESC+"[1;"+(u+1)+"D",y.key===f.C0.ESC+"[1;3D"&&(y.key=f.C0.ESC+(S?"b":"[1;5D"))):y.key=_?f.C0.ESC+"OD":f.C0.ESC+"[D";break;case 39:if(p.metaKey)break;u?(y.key=f.C0.ESC+"[1;"+(u+1)+"C",y.key===f.C0.ESC+"[1;3C"&&(y.key=f.C0.ESC+(S?"f":"[1;5C"))):y.key=_?f.C0.ESC+"OC":f.C0.ESC+"[C";break;case 38:if(p.metaKey)break;u?(y.key=f.C0.ESC+"[1;"+(u+1)+"A",S||y.key!==f.C0.ESC+"[1;3A"||(y.key=f.C0.ESC+"[1;5A")):y.key=_?f.C0.ESC+"OA":f.C0.ESC+"[A";break;case 40:if(p.metaKey)break;u?(y.key=f.C0.ESC+"[1;"+(u+1)+"B",S||y.key!==f.C0.ESC+"[1;3B"||(y.key=f.C0.ESC+"[1;5B")):y.key=_?f.C0.ESC+"OB":f.C0.ESC+"[B";break;case 45:p.shiftKey||p.ctrlKey||(y.key=f.C0.ESC+"[2~");break;case 46:y.key=u?f.C0.ESC+"[3;"+(u+1)+"~":f.C0.ESC+"[3~";break;case 36:y.key=u?f.C0.ESC+"[1;"+(u+1)+"H":_?f.C0.ESC+"OH":f.C0.ESC+"[H";break;case 35:y.key=u?f.C0.ESC+"[1;"+(u+1)+"F":_?f.C0.ESC+"OF":f.C0.ESC+"[F";break;case 33:p.shiftKey?y.type=2:p.ctrlKey?y.key=f.C0.ESC+"[5;"+(u+1)+"~":y.key=f.C0.ESC+"[5~";break;case 34:p.shiftKey?y.type=3:p.ctrlKey?y.key=f.C0.ESC+"[6;"+(u+1)+"~":y.key=f.C0.ESC+"[6~";break;case 112:y.key=u?f.C0.ESC+"[1;"+(u+1)+"P":f.C0.ESC+"OP";break;case 113:y.key=u?f.C0.ESC+"[1;"+(u+1)+"Q":f.C0.ESC+"OQ";break;case 114:y.key=u?f.C0.ESC+"[1;"+(u+1)+"R":f.C0.ESC+"OR";break;case 115:y.key=u?f.C0.ESC+"[1;"+(u+1)+"S":f.C0.ESC+"OS";break;case 116:y.key=u?f.C0.ESC+"[15;"+(u+1)+"~":f.C0.ESC+"[15~";break;case 117:y.key=u?f.C0.ESC+"[17;"+(u+1)+"~":f.C0.ESC+"[17~";break;case 118:y.key=u?f.C0.ESC+"[18;"+(u+1)+"~":f.C0.ESC+"[18~";break;case 119:y.key=u?f.C0.ESC+"[19;"+(u+1)+"~":f.C0.ESC+"[19~";break;case 120:y.key=u?f.C0.ESC+"[20;"+(u+1)+"~":f.C0.ESC+"[20~";break;case 121:y.key=u?f.C0.ESC+"[21;"+(u+1)+"~":f.C0.ESC+"[21~";break;case 122:y.key=u?f.C0.ESC+"[23;"+(u+1)+"~":f.C0.ESC+"[23~";break;case 123:y.key=u?f.C0.ESC+"[24;"+(u+1)+"~":f.C0.ESC+"[24~";break;default:if(!p.ctrlKey||p.shiftKey||p.altKey||p.metaKey)if(S&&!b||!p.altKey||p.metaKey)!S||p.altKey||p.ctrlKey||p.shiftKey||!p.metaKey?p.key&&!p.ctrlKey&&!p.altKey&&!p.metaKey&&p.keyCode>=48&&p.key.length===1?y.key=p.key:p.key&&p.ctrlKey&&(p.key==="_"&&(y.key=f.C0.US),p.key==="@"&&(y.key=f.C0.NUL)):p.keyCode===65&&(y.type=1);else{const h=m[p.keyCode],l=h==null?void 0:h[p.shiftKey?1:0];if(l)y.key=f.C0.ESC+l;else if(p.keyCode>=65&&p.keyCode<=90){const d=p.ctrlKey?p.keyCode-64:p.keyCode+32;let g=String.fromCharCode(d);p.shiftKey&&(g=g.toUpperCase()),y.key=f.C0.ESC+g}else if(p.keyCode===32)y.key=f.C0.ESC+(p.ctrlKey?f.C0.NUL:" ");else if(p.key==="Dead"&&p.code.startsWith("Key")){let d=p.code.slice(3,4);p.shiftKey||(d=d.toLowerCase()),y.key=f.C0.ESC+d,y.cancel=!0}}else p.keyCode>=65&&p.keyCode<=90?y.key=String.fromCharCode(p.keyCode-64):p.keyCode===32?y.key=f.C0.NUL:p.keyCode>=51&&p.keyCode<=55?y.key=String.fromCharCode(p.keyCode-51+27):p.keyCode===56?y.key=f.C0.DEL:p.keyCode===219?y.key=f.C0.ESC:p.keyCode===220?y.key=f.C0.FS:p.keyCode===221&&(y.key=f.C0.GS)}return y}},482:(c,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Utf8ToUtf32=n.StringToUtf32=n.utf32ToString=n.stringFromCodePoint=void 0,n.stringFromCodePoint=function(a){return a>65535?(a-=65536,String.fromCharCode(55296+(a>>10Line truncated
|
||||
`,l)}paste(h){this._core.paste(h)}refresh(h,l){this._verifyIntegers(h,l),this._core.refresh(h,l)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(h){this._addonManager.loadAddon(this,h)}static get strings(){return n}_verifyIntegers(...h){for(const l of h)if(l===1/0||isNaN(l)||l%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...h){for(const l of h)if(l&&(l===1/0||isNaN(l)||l%1!=0||l<0))throw new Error("This API only accepts positive integers")}}c.Terminal=y})(),o})())})(Ap);var GS=Ap.exports,Np={exports:{}};(function(e,t){(function(r,s){e.exports=s()})(self,()=>(()=>{var r={};return(()=>{var s=r;Object.defineProperty(s,"__esModule",{value:!0}),s.FitAddon=void 0,s.FitAddon=class{activate(i){this._terminal=i}dispose(){}fit(){const i=this.proposeDimensions();if(!i||!this._terminal||isNaN(i.cols)||isNaN(i.rows))return;const o=this._terminal._core;this._terminal.rows===i.rows&&this._terminal.cols===i.cols||(o._renderService.clear(),this._terminal.resize(i.cols,i.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const i=this._terminal._core,o=i._renderService.dimensions;if(o.css.cell.width===0||o.css.cell.height===0)return;const c=this._terminal.options.scrollback===0?0:i.viewport.scrollBarWidth,n=window.getComputedStyle(this._terminal.element.parentElement),a=parseInt(n.getPropertyValue("height")),f=Math.max(0,parseInt(n.getPropertyValue("width"))),m=window.getComputedStyle(this._terminal.element),p=a-(parseInt(m.getPropertyValue("padding-top"))+parseInt(m.getPropertyValue("padding-bottom"))),_=f-(parseInt(m.getPropertyValue("padding-right"))+parseInt(m.getPropertyValue("padding-left")))-c;return{cols:Math.max(2,Math.floor(_/o.css.cell.width)),rows:Math.max(1,Math.floor(p/o.css.cell.height))}}}})(),r})())})(Np);var JS=Np.exports;const zt=Object.create(null);zt.open="0";zt.close="1";zt.ping="2";zt.pong="3";zt.message="4";zt.upgrade="5";zt.noop="6";const wn=Object.create(null);Object.keys(zt).forEach(e=>{wn[zt[e]]=e});const xl={type:"error",data:"parser error"},Pp=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Bp=typeof ArrayBuffer=="function",jp=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Nc=({type:e,data:t},r,s)=>Pp&&t instanceof Blob?r?s(t):wh(t,s):Bp&&(t instanceof ArrayBuffer||jp(t))?r?s(t):wh(new Blob([t]),s):s(zt[e]+(t||"")),wh=(e,t)=>{const r=new FileReader;return r.onload=function(){const s=r.result.split(",")[1];t("b"+(s||""))},r.readAsDataURL(e)};function Ch(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let ca;function QS(e,t){if(Pp&&e.data instanceof Blob)return e.data.arrayBuffer().then(Ch).then(t);if(Bp&&(e.data instanceof ArrayBuffer||jp(e.data)))return t(Ch(e.data));Nc(e,!1,r=>{ca||(ca=new TextEncoder),t(ca.encode(r))})}const Eh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",qs=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<Eh.length;e++)qs[Eh.charCodeAt(e)]=e;const YS=e=>{let t=e.length*.75,r=e.length,s,i=0,o,c,n,a;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const f=new ArrayBuffer(t),m=new Uint8Array(f);for(s=0;s<r;s+=4)o=qs[e.charCodeAt(s)],c=qs[e.charCodeAt(s+1)],n=qs[e.charCodeAt(s+2)],a=qs[e.charCodeAt(s+3)],m[i++]=o<<2|c>>4,m[i++]=(c&15)<<4|n>>2,m[i++]=(n&3)<<6|a&63;return f},ZS=typeof ArrayBuffer=="function",Pc=(e,t)=>{if(typeof e!="string")return{type:"message",data:Mp(e,t)};const r=e.charAt(0);return r==="b"?{type:"message",data:ex(e.substring(1),t)}:wn[r]?e.length>1?{type:wn[r],data:e.substring(1)}:{type:wn[r]}:xl},ex=(e,t)=>{if(ZS){const r=YS(e);return Mp(r,t)}else return{base64:!0,data:e}},Mp=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},Ip="",tx=(e,t)=>{const r=e.length,s=new Array(r);let i=0;e.forEach((o,c)=>{Nc(o,!1,n=>{s[c]=n,++i===r&&t(s.join(Ip))})})},rx=(e,t)=>{const r=e.split(Ip),s=[];for(let i=0;i<r.length;i++){const o=Pc(r[i],t);if(s.push(o),o.type==="error")break}return s};function sx(){return new TransformStream({transform(e,t){QS(e,r=>{const s=r.length;let i;if(s<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,s);else if(s<65536){i=new Uint8Array(3);const o=new DataView(i.buffer);o.setUint8(0,126),o.setUint16(1,s)}else{i=new Uint8Array(9);const o=new DataView(i.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(s))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(r)})}})}let ua;function on(e){return e.reduce((t,r)=>t+r.length,0)}function an(e,t){if(e[0].length===t)return e.shift();const r=new Uint8Array(t);let s=0;for(let i=0;i<t;i++)r[i]=e[0][s++],s===e[0].length&&(e.shift(),s=0);return e.length&&s<e[0].length&&(e[0]=e[0].slice(s)),r}function ix(e,t){ua||(ua=new TextDecoder);const
Line truncated
|
||||
Connected to remote shell.`):i.writeln(`\r
|
||||
Failed to create shell: ${a.error||"Unknown error"}`)}),c.on("shell_output",a=>{a.data&&i.write(a.data)}),c.on("disconnect",()=>{i.writeln(`\r
|
||||
[Disconnected]`)}),i.onData(a=>{c.emit("shell_input",{data:a})});const n=()=>{o.fit()};return window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n),c.emit("shell_disconnect"),c.disconnect(),i.dispose()}},[]),v.jsxs("div",{className:"h-[calc(100vh-140px)] flex flex-col",children:[v.jsx("h1",{className:"font-serif text-3xl text-primary mb-4",children:"Remote Shell"}),v.jsx("div",{ref:e,className:"flex-1 bg-[#1a1a1a] rounded-lg border border-border overflow-hidden"})]})}function Vx(){const[e,t]=M.useState("/"),[r,s]=M.useState([]),[i,o]=M.useState(!1),[c,n]=M.useState(null),{dispatch:a}=Fe(),f=async _=>{var S,b;o(!0);try{const y=await ne.post("/files/list",{path:_});y.data.success?(s(y.data.data),t(_)):a({type:"ADD_TOAST",payload:{message:y.data.error||"Failed",type:"error"}})}catch(y){a({type:"ADD_TOAST",payload:{message:((b=(S=y.response)==null?void 0:S.data)==null?void 0:b.error)||"Failed",type:"error"}})}finally{o(!1)}};M.useEffect(()=>{f("/")},[]);const m=async _=>{var S,b;try{const y=await ne.get(`/files/view?path=${encodeURIComponent(_)}`);y.data.success&&n({path:_,content:y.data.data})}catch(y){a({type:"ADD_TOAST",payload:{message:((b=(S=y.response)==null?void 0:S.data)==null?void 0:b.error)||"Failed",type:"error"}})}},p=e.split("/").filter(Boolean);return v.jsxs("div",{children:[v.jsx("h1",{className:"font-serif text-3xl text-primary mb-6",children:"File Browser"}),v.jsxs("div",{className:"flex items-center gap-2 mb-4 text-sm",children:[v.jsx("button",{onClick:()=>f("/"),className:"text-primary hover:underline",children:"/"}),p.map((_,S)=>{const b="/"+p.slice(0,S+1).join("/");return v.jsxs("span",{className:"flex items-center gap-2",children:[v.jsx("span",{className:"text-text-muted",children:"/"}),v.jsx("button",{onClick:()=>f(b),className:"text-primary hover:underline",children:_})]},S)})]}),v.jsx("div",{className:"bg-card-bg border border-border rounded-lg overflow-hidden",children:v.jsxs("table",{className:"w-full text-sm",children:[v.jsx("thead",{children:v.jsxs("tr",{className:"border-b border-border",children:[v.jsx("th",{className:"text-left px-4 py-3 text-text-muted font-semibold text-[11px] uppercase",children:"Name"}),v.jsx("th",{className:"text-left px-4 py-3 text-text-muted font-semibold text-[11px] uppercase",children:"Size"}),v.jsx("th",{className:"text-left px-4 py-3 text-text-muted font-semibold text-[11px] uppercase",children:"Modified"}),v.jsx("th",{className:"text-left px-4 py-3 text-text-muted font-semibold text-[11px] uppercase",children:"Actions"})]})}),v.jsxs("tbody",{children:[e!=="/"&&v.jsxs("tr",{className:"border-b border-border hover:bg-hover/50 cursor-pointer",onClick:()=>{const _=e.substring(0,e.lastIndexOf("/"))||"/";f(_)},children:[v.jsx("td",{className:"px-4 py-3 text-text-primary",children:".."}),v.jsx("td",{className:"px-4 py-3",children:"-"}),v.jsx("td",{className:"px-4 py-3",children:"-"}),v.jsx("td",{className:"px-4 py-3",children:"-"})]}),i?v.jsx("tr",{children:v.jsx("td",{colSpan:4,className:"px-4 py-8 text-center text-text-muted",children:"Loading..."})}):r.map(_=>v.jsxs("tr",{className:"border-b border-border last:border-0 hover:bg-hover/50 cursor-pointer",onClick:()=>_.is_dir&&f(_.path),children:[v.jsxs("td",{className:"px-4 py-3 text-text-primary",children:[_.is_dir?"📁":"📄"," ",_.name]}),v.jsx("td",{className:"px-4 py-3 text-text-muted",children:_.is_dir?"-":qx(_.size)}),v.jsx("td",{className:"px-4 py-3 text-text-muted",children:new Date(_.mod_time).toLocaleString()}),v.jsx("td",{className:"px-4 py-3",children:!_.is_dir&&v.jsx("button",{onClick:S=>{S.stopPropagation(),m(_.path)},className:"text-xs text-primary hover:underline",children:"View"})})]},_.path))]})]})}),c&&v.jsx("div",{className:"fixed inset-0 z-[70] flex items-center justify-center bg-black/60 backdrop-blur-sm",children:v.jsxs("div",{className:"bg-card-bg border border-border rounded-xl shadow-2xl w-full mx-4 max-w-4xl max-h-[80vh] flex flex-col",children:[v.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-border",children:[v.jsx("h3",{className:"font-serif text-lg text-text-primary truncate",children:c.path}),v.jsx("button",{onClick:()=>n(null),className:"text-text-muted hover:text-text-primary text-xl leading-none",children:"×"})]}),v.jsx("pre",{className:"p-5 overflow-auto flex-1 text-xs font-mono text-text-secondary bg-code-bg",children:c.content})]})})]})}function qx(e){if(e===0)return"0 B";const t=1024,r=["B","KB","MB","GB"],s=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,s)).toFixed(2))+" "+r[s]}const Kx=e=>ne.get(e).then(t=>t.data);function Xx(){const[e,t]=M.useState("battlegroup"),{dispatch:r}=Fe(),{data:s}=ct("/director/battlegroup",Kx,{refreshInterval:15e3}),i=async(o,c)=>{var n,a;try{const f=await ne.post(o,c);f.data.success?r({type:"ADD_TOAST",payload:{message:"Success",type:"success"}}):r({type:"ADD_TOAST",payload:{message:f.data.error||"Failed",type:"error"}})}catch(f){r({type:"ADD_TOAST",pa
Line truncated
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* Copyright (c) 2014 The xterm.js authors. All rights reserved.
|
||||
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
||||
* https://github.com/chjj/term.js
|
||||
* @license MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
* Originally forked from (with the author's permission):
|
||||
* Fabrice Bellard's javascript vt100 for jslinux:
|
||||
* http://bellard.org/jslinux/
|
||||
* Copyright (c) 2011 Fabrice Bellard
|
||||
* The original design remains. The terminal itself
|
||||
* has been extended to include xterm CSI codes, among
|
||||
* other features.
|
||||
*/.xterm{cursor:text;position:relative;-moz-user-select:none;user-select:none;-ms-user-select:none;-webkit-user-select:none}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{position:absolute;top:0;z-index:5}.xterm .xterm-helper-textarea{padding:0;border:0;margin:0;position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-5;white-space:nowrap;overflow:hidden;resize:none}.xterm .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{background-color:#000;overflow-y:scroll;cursor:default;position:absolute;right:0;left:0;top:0;bottom:0}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;left:0;top:0}.xterm .xterm-scroll-area{visibility:hidden}.xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;top:0;left:-9999em;line-height:normal}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility,.xterm .xterm-message{position:absolute;left:0;top:0;bottom:0;right:0;z-index:10;color:transparent;pointer-events:none}.xterm .live-region{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{-webkit-text-decoration:double underline;text-decoration:double underline}.xterm-underline-3{-webkit-text-decoration:wavy underline;text-decoration:wavy underline}.xterm-underline-4{-webkit-text-decoration:dotted underline;text-decoration:dotted underline}.xterm-underline-5{-webkit-text-decoration:dashed underline;text-decoration:dashed underline}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:overline underline}.xterm-overline.xterm-underline-2{-webkit-text-decoration:overline double underline;text-decoration:overline double underline}.xterm-overline.xterm-underline-3{-webkit-text-decoration:overline wavy underline;text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{-webkit-text-decoration:overline dotted underline;text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{-webkit-text-decoration:overline dashed underline;text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;position:absolute;top:0;right:0;pointer-events:none}.xterm-decoration-top{z-index:2;position:relative}[data-theme=default]{--primary: #c9a24e;--primary-dark: #a8862e;--primary-light: #e0c97a;--bg: #f4f1ea;--card-bg: #ffffff;--text: #2c1810;--text-light: #6b5a4a;--text-muted: #9a8a7a;--border: #e0d5c7;--accent: #8b4513;--danger: #c0392b;--success: #27ae60;--nav-bg: #1a1a2e;--nav-text: #c9c4d0;--nav-active: #c9a24e;--hover: #f0ebe0;--shadow: 0 2px 8px rgba(44,24,16,.08)}[data-theme=atreides]{--primary: #2d5a27;--primary-dark: #1e3d19;--primary-light: #4a8c42;--bg: #f0f5ed;--card-bg: #ffffff;--text: #1a2e1a;--text-light: #3d4d3d;--text-muted: #6b7c6b;--border: #d4ddd4;--accent: #1e3d19;--danger: #8b2500;--success: #2d5a27;--nav-bg: #1a2e1a;--nav-text: #d4ddd4;--nav-active: #6abf6a;--hover: #e2ebe2;--shadow: 0 2px 8px rgba(30,61,25,.1)}[data-theme=harkonnen]{--primary: #ff6b00;--primary-dark: #cc5500;--primary-light: #ff8c33;--bg: #1a1a1a;--card-bg: #2d2d2d;--text: #e8e8e8;--text-light: #b0b0b0;--text-muted: #808080;--border: #404040;--accent: #ff4500;--danger: #ff0000;--success: #00cc44;--nav-bg: #000000;--nav-text: #cccccc;--nav-active: #ff6b00;--hover: #333333;--shadow: 0 2px 8px rgba(0,0,0,.4)}[data-theme=fremen]{--primary: #d4a853;--primary-dark: #b8913f;--primary-light: #e8c87a;--bg: #e8dcc8;--card-bg: #f5efe3;--text: #3d3428;--text-light: #5c4f3d;--text-muted: #8a7d66;--border: #d4cbb8;--accent: #8b6914;--danger: #a04000;--success: #6b8e23;--nav-bg: #2c2418;--nav-text: #d4cbb8;--nav-active: #d4a853;--hover: #e8dcc8;--shadow: 0 2px 8px rgba(44,36,24,.1)}[data-theme=bene-gesserit]{--primary: #a8a8a8;--primary-dark: #888888;--primary-light: #c8c8c8;--bg: #f8f8f8;--card-bg: #ffffff;--text: #2a2a2a;--text-light: #505050;--text-muted: #787878;--border: #e0e0e0;--accent: #606060;--danger: #c41e3a;--success: #2e8b57;--nav-bg: #1a1a1a;--nav-text: #d0d0d0;--nav-active: #ffffff;--hover: #f0f0f0;--shadow: 0 2px 8px rgba(0,0,0,.08)}[data-theme=spacing-guild]{--primary: #4a90d9;--primary-dark: #2e6ab3;--primary-light: #6baee8;--bg: #1a1a2e;--card-bg: #252540;--text: #e0e0f0;--text-light: #a0a0c0;--text-muted: #707090;--border: #3a3a50;--accent: #6b5b95;--danger: #d94545;--success: #45d985;--nav-bg: #0f0f1a;--nav-text: #b0b0d0;--nav-active: #4a90d9;--hover: #2a2a40;--shadow: 0 2px 8px rgba(0,0,0,Line truncated
|
||||
Reference in new issue
Block a user