914 lines
492 KiB
JavaScript
914 lines
492 KiB
JavaScript
|
|
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const a of s)if(a.type==="childList")for(const u of a.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function r(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerPolicy&&(a.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?a.credentials="include":s.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(s){if(s.ep)return;s.ep=!0;const a=r(s);fetch(s.href,a)}})();function rt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Wf={exports:{}},ns={},qf={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 mm;function KS(){if(mm)return Re;mm=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),m=Symbol.iterator;function y(T){return T===null||typeof T!="object"?null:(T=m&&T[m]||T["@@iterator"],typeof T=="function"?T:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,E={};function k(T,H,Z){this.props=T,this.context=H,this.refs=E,this.updater=Z||v}k.prototype.isReactComponent={},k.prototype.setState=function(T,H){if(typeof T!="object"&&typeof T!="function"&&T!=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,T,H,"setState")},k.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function C(){}C.prototype=k.prototype;function R(T,H,Z){this.props=T,this.context=H,this.refs=E,this.updater=Z||v}var N=R.prototype=new C;N.constructor=R,S(N,k.prototype),N.isPureReactComponent=!0;var b=Array.isArray,M=Object.prototype.hasOwnProperty,L={current:null},j={key:!0,ref:!0,__self:!0,__source:!0};function G(T,H,Z){var te,ie={},le=null,de=null;if(H!=null)for(te in H.ref!==void 0&&(de=H.ref),H.key!==void 0&&(le=""+H.key),H)M.call(H,te)&&!j.hasOwnProperty(te)&&(ie[te]=H[te]);var re=arguments.length-2;if(re===1)ie.children=Z;else if(1<re){for(var he=Array(re),Se=0;Se<re;Se++)he[Se]=arguments[Se+2];ie.children=he}if(T&&T.defaultProps)for(te in re=T.defaultProps,re)ie[te]===void 0&&(ie[te]=re[te]);return{$$typeof:e,type:T,key:le,ref:de,props:ie,_owner:L.current}}function V(T,H){return{$$typeof:e,type:T.type,key:H,ref:T.ref,props:T.props,_owner:T._owner}}function Y(T){return typeof T=="object"&&T!==null&&T.$$typeof===e}function ee(T){var H={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(Z){return H[Z]})}var ne=/\/+/g;function J(T,H){return typeof T=="object"&&T!==null&&T.key!=null?ee(""+T.key):H.toString(36)}function I(T,H,Z,te,ie){var le=typeof T;(le==="undefined"||le==="boolean")&&(T=null);var de=!1;if(T===null)de=!0;else switch(le){case"string":case"number":de=!0;break;case"object":switch(T.$$typeof){case e:case t:de=!0}}if(de)return de=T,ie=ie(de),T=te===""?"."+J(de,0):te,b(ie)?(Z="",T!=null&&(Z=T.replace(ne,"$&/")+"/"),I(ie,H,Z,"",function(Se){return Se})):ie!=null&&(Y(ie)&&(ie=V(ie,Z+(!ie.key||de&&de.key===ie.key?"":(""+ie.key).replace(ne,"$&/")+"/")+T)),H.push(ie)),1;if(de=0,te=te===""?".":te+":",b(T))for(var re=0;re<T.length;re++){le=T[re];var he=te+J(le,re);de+=I(le,H,Z,he,ie)}else if(he=y(T),typeof he=="function")for(T=he.call(T),re=0;!(le=T.next()).done;)le=le.value,he=te+J(le,re++),de+=I(le,H,Z,he,ie);else if(le==="object")throw H=String(T),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.");return de}function U(T,H,Z){if(T==null)return T;var te=[],ie=0;return I(T,te,"","",function(le){return H.call(Z,le,ie++)}),te}function F(T){if(T._status===-1){var H=T._result;H=H(),H.then(function(Z){(T._status===0||T._status===-1)&&(T._status=1,T._result=Z)},function(Z){(T._status===0||T._status===-1)&&(T._status=2,T._result=Z)}),T._status===-1&&(T._status=0,T._result=H)}if(T._status===1)return T._result.default;throw T._result}var q={current:null},A={transition:null},O={ReactCurrentDispatcher:q,ReactCurrentBatchConfig:A,ReactCurrentOwner:L};function z(){throw Error("act(...) is not supported in production builds of React.")}return Re.Children={map:U,forEach:function(T,H,Z){U(T,function(){H.apply(this,arguments)},Z)},count:function(T){var H=0;return U(T,function(){H++}),H},toArray:function(T){return U(T,function(H){return H})||[]},only:
|
|||
|
|
* @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 xm;function QS(){if(xm)return ns;xm=1;var e=As(),t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function u(f,d,h){var g,m={},y=null,v=null;h!==void 0&&(y=""+h),d.key!==void 0&&(y=""+d.key),d.ref!==void 0&&(v=d.ref);for(g in d)i.call(d,g)&&!a.hasOwnProperty(g)&&(m[g]=d[g]);if(f&&f.defaultProps)for(g in d=f.defaultProps,d)m[g]===void 0&&(m[g]=d[g]);return{$$typeof:t,type:f,key:y,ref:v,props:m,_owner:s.current}}return ns.Fragment=r,ns.jsx=u,ns.jsxs=u,ns}var vm;function JS(){return vm||(vm=1,Wf.exports=QS()),Wf.exports}var w=JS(),aa={},Yf={exports:{}},Nt={},Xf={exports:{}},Gf={};/**
|
|||
|
|
* @license React
|
|||
|
|
* scheduler.production.min.js
|
|||
|
|
*
|
|||
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the MIT license found in the
|
|||
|
|
* LICENSE file in the root directory of this source tree.
|
|||
|
|
*/var wm;function ZS(){return wm||(wm=1,function(e){function t(A,O){var z=A.length;A.push(O);e:for(;0<z;){var T=z-1>>>1,H=A[T];if(0<s(H,O))A[T]=O,A[z]=H,z=T;else break e}}function r(A){return A.length===0?null:A[0]}function i(A){if(A.length===0)return null;var O=A[0],z=A.pop();if(z!==O){A[0]=z;e:for(var T=0,H=A.length,Z=H>>>1;T<Z;){var te=2*(T+1)-1,ie=A[te],le=te+1,de=A[le];if(0>s(ie,z))le<H&&0>s(de,ie)?(A[T]=de,A[le]=z,T=le):(A[T]=ie,A[te]=z,T=te);else if(le<H&&0>s(de,z))A[T]=de,A[le]=z,T=le;else break e}}return O}function s(A,O){var z=A.sortIndex-O.sortIndex;return z!==0?z:A.id-O.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,f=u.now();e.unstable_now=function(){return u.now()-f}}var d=[],h=[],g=1,m=null,y=3,v=!1,S=!1,E=!1,k=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function N(A){for(var O=r(h);O!==null;){if(O.callback===null)i(h);else if(O.startTime<=A)i(h),O.sortIndex=O.expirationTime,t(d,O);else break;O=r(h)}}function b(A){if(E=!1,N(A),!S)if(r(d)!==null)S=!0,F(M);else{var O=r(h);O!==null&&q(b,O.startTime-A)}}function M(A,O){S=!1,E&&(E=!1,C(G),G=-1),v=!0;var z=y;try{for(N(O),m=r(d);m!==null&&(!(m.expirationTime>O)||A&&!ee());){var T=m.callback;if(typeof T=="function"){m.callback=null,y=m.priorityLevel;var H=T(m.expirationTime<=O);O=e.unstable_now(),typeof H=="function"?m.callback=H:m===r(d)&&i(d),N(O)}else i(d);m=r(d)}if(m!==null)var Z=!0;else{var te=r(h);te!==null&&q(b,te.startTime-O),Z=!1}return Z}finally{m=null,y=z,v=!1}}var L=!1,j=null,G=-1,V=5,Y=-1;function ee(){return!(e.unstable_now()-Y<V)}function ne(){if(j!==null){var A=e.unstable_now();Y=A;var O=!0;try{O=j(!0,A)}finally{O?J():(L=!1,j=null)}}else L=!1}var J;if(typeof R=="function")J=function(){R(ne)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,U=I.port2;I.port1.onmessage=ne,J=function(){U.postMessage(null)}}else J=function(){k(ne,0)};function F(A){j=A,L||(L=!0,J())}function q(A,O){G=k(function(){A(e.unstable_now())},O)}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(A){A.callback=null},e.unstable_continueExecution=function(){S||v||(S=!0,F(M))},e.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):V=0<A?Math.floor(1e3/A):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_getFirstCallbackNode=function(){return r(d)},e.unstable_next=function(A){switch(y){case 1:case 2:case 3:var O=3;break;default:O=y}var z=y;y=O;try{return A()}finally{y=z}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(A,O){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var z=y;y=A;try{return O()}finally{y=z}},e.unstable_scheduleCallback=function(A,O,z){var T=e.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?T+z:T):z=T,A){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=z+H,A={id:g++,callback:O,priorityLevel:A,startTime:z,expirationTime:H,sortIndex:-1},z>T?(A.sortIndex=z,t(h,A),r(d)===null&&A===r(h)&&(E?(C(G),G=-1):E=!0,q(b,z-T))):(A.sortIndex=H,t(d,A),S||v||(S=!0,F(M))),A},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(A){var O=y;return function(){var z=y;y=O;try{return A.apply(this,arguments)}finally{y=z}}}}(Gf)),Gf}var Sm;function eE(){return Sm||(Sm=1,Xf.exports=ZS()),Xf.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 Em;function tE(){if(Em)return Nt;Em=1;var e=As(),t=eE();function r(n){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+n,l=1;l<arguments.length;l++)o+="&args[]="+encodeURIComponent(arguments[l]);return"Minified React error #"+n+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,s={};function a(n,o){u(n,o),u(n+"Capture",o)}function u(n,o){for(s[n]=o,n=0;n<o.length;n++)i.add(o[n])}var f=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),d=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,g={},m={};function y(n){return d.call(m,n)?!0:d.call(g,n)?!1:h.test(n)?m[n]=!0:(g[n]=!0,!1)}function v(n,o,l,c){if(l!==null&&l.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return c?!1:l!==null?!l.acceptsBooleans:(n=n.toLowerCase().slice(0,5),n!=="data-"&&n!=="aria-");default:return!1}}function S(n,o,l,c){if(o===null||typeof o>"u"||v(n,o,l,c))return!0;if(c)return!1;if(l!==null)switch(l.type){case 3:return!o;case 4:return o===!1;case 5:return isNaN(o);case 6:return isNaN(o)||1>o}return!1}function E(n,o,l,c,p,x,_){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=c,this.attributeNamespace=p,this.mustUseProperty=l,this.propertyName=n,this.type=o,this.sanitizeURL=x,this.removeEmptyString=_}var k={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(n){k[n]=new E(n,0,!1,n,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(n){var o=n[0];k[o]=new E(o,1,!1,n[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(n){k[n]=new E(n,2,!1,n.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(n){k[n]=new E(n,2,!1,n,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(n){k[n]=new E(n,3,!1,n.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(n){k[n]=new E(n,3,!0,n,null,!1,!1)}),["capture","download"].forEach(function(n){k[n]=new E(n,4,!1,n,null,!1,!1)}),["cols","rows","size","span"].forEach(function(n){k[n]=new E(n,6,!1,n,null,!1,!1)}),["rowSpan","start"].forEach(function(n){k[n]=new E(n,5,!1,n.toLowerCase(),null,!1,!1)});var C=/[\-:]([a-z])/g;function R(n){return n[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
|
|||
|
|
`+T+n}var Z=!1;function te(n,o){if(!n||Z)return"";Z=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(o)if(o=function(){throw Error()},Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(K){var c=K}Reflect.construct(n,[],o)}else{try{o.call()}catch(K){c=K}n.call(o.prototype)}else{try{throw Error()}catch(K){c=K}n()}}catch(K){if(K&&c&&typeof K.stack=="string"){for(var p=K.stack.split(`
|
|||
|
|
`),x=c.stack.split(`
|
|||
|
|
`),_=p.length-1,$=x.length-1;1<=_&&0<=$&&p[_]!==x[$];)$--;for(;1<=_&&0<=$;_--,$--)if(p[_]!==x[$]){if(_!==1||$!==1)do if(_--,$--,0>$||p[_]!==x[$]){var D=`
|
|||
|
|
`+p[_].replace(" at new "," at ");return n.displayName&&D.includes("<anonymous>")&&(D=D.replace("<anonymous>",n.displayName)),D}while(1<=_&&0<=$);break}}}finally{Z=!1,Error.prepareStackTrace=l}return(n=n?n.displayName||n.name:"")?H(n):""}function ie(n){switch(n.tag){case 5:return H(n.type);case 16:return H("Lazy");case 13:return H("Suspense");case 19:return H("SuspenseList");case 0:case 2:case 15:return n=te(n.type,!1),n;case 11:return n=te(n.type.render,!1),n;case 1:return n=te(n.type,!0),n;default:return""}}function le(n){if(n==null)return null;if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case j:return"Fragment";case L:return"Portal";case V:return"Profiler";case G:return"StrictMode";case J:return"Suspense";case I:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case ee:return(n.displayName||"Context")+".Consumer";case Y:return(n._context.displayName||"Context")+".Provider";case ne:var o=n.render;return n=n.displayName,n||(n=o.displayName||o.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case U:return o=n.displayName||null,o!==null?o:le(n.type)||"Memo";case F:o=n._payload,n=n._init;try{return le(n(o))}catch{}}return null}function de(n){var o=n.type;switch(n.tag){case 24:return"Cache";case 9:return(o.displayName||"Context")+".Consumer";case 10:return(o._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return n=o.render,n=n.displayName||n.name||"",o.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case 7:return"Fragment";case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return le(o);case 8:return o===G?"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 o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o}return null}function re(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function he(n){var o=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function Se(n){var o=he(n)?"checked":"value",l=Object.getOwnPropertyDescriptor(n.constructor.prototype,o),c=""+n[o];if(!n.hasOwnProperty(o)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var p=l.get,x=l.set;return Object.defineProperty(n,o,{configurable:!0,get:function(){return p.call(this)},set:function(_){c=""+_,x.call(this,_)}}),Object.defineProperty(n,o,{enumerable:l.enumerable}),{getValue:function(){return c},setValue:function(_){c=""+_},stopTracking:function(){n._valueTracker=null,delete n[o]}}}}function we(n){n._valueTracker||(n._valueTracker=Se(n))}function ge(n){if(!n)return!1;var o=n._valueTracker;if(!o)return!0;var l=o.getValue(),c="";return n&&(c=he(n)?n.checked?"true":"false":n.value),n=c,n!==l?(o.setValue(n),!0):!1}function Pe(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}function $e(n,o){var l=o.checked;return z({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l??n._wrapperState.initialChecked})}function Ke(n,o){var l=o.defaultValue==null?"":o.defaultValue,c=o.checked!=null?o.checked:o.defaultChecked;l=re(o.value!=null?o.value:l),n._wrapperState={initialChecked:c,initialValue:l,controlled:o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null}}function Xt(n,o){o=o.checked,o!=null&&N(n,"checked",o,!1)}function Cr(n,o){Xt(n,o);var l=re(o.value),c=o.type;if(l!=null)c==="number"?(l===0&&n.value===""||n.value!=l)&&(n.value=""+l):n.value!==""+l&&(n.value=""+l);else if(c==="submit"||c==="reset"){n.removeAttribute("value");return}o.hasOwnProperty("value")?_r(n,o.type,l):o.hasOwnProperty("defaultValue")&&_r(n,o.type,re(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(n.defaultChecked=!!o.defaultChecked)}function lo(n,o,l){if(o.hasOwnProperty("value")||o.hasOwnProp
|
|||
|
|
`).replace(uS,"")}function Sl(n,o,l){if(o=Mp(o),Mp(n)!==o&&l)throw Error(r(425))}function El(){}var Mc=null,Lc=null;function Dc(n,o){return n==="textarea"||n==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var Oc=typeof setTimeout=="function"?setTimeout:void 0,cS=typeof clearTimeout=="function"?clearTimeout:void 0,Lp=typeof Promise=="function"?Promise:void 0,fS=typeof queueMicrotask=="function"?queueMicrotask:typeof Lp<"u"?function(n){return Lp.resolve(null).then(n).catch(dS)}:Oc;function dS(n){setTimeout(function(){throw n})}function zc(n,o){var l=o,c=0;do{var p=l.nextSibling;if(n.removeChild(l),p&&p.nodeType===8)if(l=p.data,l==="/$"){if(c===0){n.removeChild(p),Ri(o);return}c--}else l!=="$"&&l!=="$?"&&l!=="$!"||c++;l=p}while(l);Ri(o)}function rr(n){for(;n!=null;n=n.nextSibling){var o=n.nodeType;if(o===1||o===3)break;if(o===8){if(o=n.data,o==="$"||o==="$!"||o==="$?")break;if(o==="/$")return null}}return n}function Dp(n){n=n.previousSibling;for(var o=0;n;){if(n.nodeType===8){var l=n.data;if(l==="$"||l==="$!"||l==="$?"){if(o===0)return n;o--}else l==="/$"&&o++}n=n.previousSibling}return null}var _o=Math.random().toString(36).slice(2),hn="__reactFiber$"+_o,Fi="__reactProps$"+_o,Cn="__reactContainer$"+_o,Fc="__reactEvents$"+_o,hS="__reactListeners$"+_o,pS="__reactHandles$"+_o;function Ir(n){var o=n[hn];if(o)return o;for(var l=n.parentNode;l;){if(o=l[Cn]||l[hn]){if(l=o.alternate,o.child!==null||l!==null&&l.child!==null)for(n=Dp(n);n!==null;){if(l=n[hn])return l;n=Dp(n)}return o}n=l,l=n.parentNode}return null}function Bi(n){return n=n[hn]||n[Cn],!n||n.tag!==5&&n.tag!==6&&n.tag!==13&&n.tag!==3?null:n}function No(n){if(n.tag===5||n.tag===6)return n.stateNode;throw Error(r(33))}function kl(n){return n[Fi]||null}var Bc=[],bo=-1;function or(n){return{current:n}}function ze(n){0>bo||(n.current=Bc[bo],Bc[bo]=null,bo--)}function De(n,o){bo++,Bc[bo]=n.current,n.current=o}var ir={},dt=or(ir),St=or(!1),jr=ir;function Po(n,o){var l=n.type.contextTypes;if(!l)return ir;var c=n.stateNode;if(c&&c.__reactInternalMemoizedUnmaskedChildContext===o)return c.__reactInternalMemoizedMaskedChildContext;var p={},x;for(x in l)p[x]=o[x];return c&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=o,n.__reactInternalMemoizedMaskedChildContext=p),p}function Et(n){return n=n.childContextTypes,n!=null}function Cl(){ze(St),ze(dt)}function Op(n,o,l){if(dt.current!==ir)throw Error(r(168));De(dt,o),De(St,l)}function zp(n,o,l){var c=n.stateNode;if(o=o.childContextTypes,typeof c.getChildContext!="function")return l;c=c.getChildContext();for(var p in c)if(!(p in o))throw Error(r(108,de(n)||"Unknown",p));return z({},l,c)}function _l(n){return n=(n=n.stateNode)&&n.__reactInternalMemoizedMergedChildContext||ir,jr=dt.current,De(dt,n),De(St,St.current),!0}function Fp(n,o,l){var c=n.stateNode;if(!c)throw Error(r(169));l?(n=zp(n,o,jr),c.__reactInternalMemoizedMergedChildContext=n,ze(St),ze(dt),De(dt,n)):ze(St),De(St,l)}var _n=null,Nl=!1,Hc=!1;function Bp(n){_n===null?_n=[n]:_n.push(n)}function gS(n){Nl=!0,Bp(n)}function sr(){if(!Hc&&_n!==null){Hc=!0;var n=0,o=Me;try{var l=_n;for(Me=1;n<l.length;n++){var c=l[n];do c=c(!0);while(c!==null)}_n=null,Nl=!1}catch(p){throw _n!==null&&(_n=_n.slice(n+1)),ol(Ei,sr),p}finally{Me=o,Hc=!1}}return null}var Ro=[],To=0,bl=null,Pl=0,Bt=[],Ht=0,$r=null,Nn=1,bn="";function Ar(n,o){Ro[To++]=Pl,Ro[To++]=bl,bl=n,Pl=o}function Hp(n,o,l){Bt[Ht++]=Nn,Bt[Ht++]=bn,Bt[Ht++]=$r,$r=n;var c=Nn;n=bn;var p=32-Tt(c)-1;c&=~(1<<p),l+=1;var x=32-Tt(o)+p;if(30<x){var _=p-p%5;x=(c&(1<<_)-1).toString(32),c>>=_,p-=_,Nn=1<<32-Tt(o)+p|l<<p|c,bn=x+n}else Nn=1<<x|l<<p|c,bn=n}function Vc(n){n.return!==null&&(Ar(n,1),Hp(n,1,0))}function Uc(n){for(;n===bl;)bl=Ro[--To],Ro[To]=null,Pl=Ro[--To],Ro[To]=null;for(;n===$r;)$r=Bt[--Ht],Bt[Ht]=null,bn=Bt[--Ht],Bt[Ht]=null,Nn=Bt[--Ht],Bt[Ht]=null}var jt=null,$t=null,Be=!1,Qt=null;function Vp(n,o){var l=qt(5,null,null,0);l.elementType="DELETED",l.stateNode=o,l.return=n,o=n.deletion
|
|||
|
|
Error generating stack: `+x.message+`
|
|||
|
|
`+x.stack}return{value:n,source:o,stack:p,digest:null}}function gf(n,o,l){return{value:n,source:null,stack:l??null,digest:o??null}}function mf(n,o){try{console.error(o.value)}catch(l){setTimeout(function(){throw l})}}var CS=typeof WeakMap=="function"?WeakMap:Map;function _g(n,o,l){l=Rn(-1,l),l.tag=3,l.payload={element:null};var c=o.value;return l.callback=function(){Xl||(Xl=!0,If=c),mf(n,o)},l}function Ng(n,o,l){l=Rn(-1,l),l.tag=3;var c=n.type.getDerivedStateFromError;if(typeof c=="function"){var p=o.value;l.payload=function(){return c(p)},l.callback=function(){mf(n,o)}}var x=n.stateNode;return x!==null&&typeof x.componentDidCatch=="function"&&(l.callback=function(){mf(n,o),typeof c!="function"&&(cr===null?cr=new Set([this]):cr.add(this));var _=o.stack;this.componentDidCatch(o.value,{componentStack:_!==null?_:""})}),l}function bg(n,o,l){var c=n.pingCache;if(c===null){c=n.pingCache=new CS;var p=new Set;c.set(o,p)}else p=c.get(o),p===void 0&&(p=new Set,c.set(o,p));p.has(l)||(p.add(l),n=OS.bind(null,n,o,l),o.then(n,n))}function Pg(n){do{var o;if((o=n.tag===13)&&(o=n.memoizedState,o=o!==null?o.dehydrated!==null:!0),o)return n;n=n.return}while(n!==null);return null}function Rg(n,o,l,c,p){return(n.mode&1)===0?(n===o?n.flags|=65536:(n.flags|=128,l.flags|=131072,l.flags&=-52805,l.tag===1&&(l.alternate===null?l.tag=17:(o=Rn(-1,1),o.tag=2,ar(l,o,1))),l.lanes|=1),n):(n.flags|=65536,n.lanes=p,n)}var _S=b.ReactCurrentOwner,kt=!1;function xt(n,o,l,c){o.child=n===null?Gp(o,null,l,c):jo(o,n.child,l,c)}function Tg(n,o,l,c,p){l=l.render;var x=o.ref;return Ao(o,p),c=lf(n,o,l,c,x,p),l=af(),n!==null&&!kt?(o.updateQueue=n.updateQueue,o.flags&=-2053,n.lanes&=~p,Tn(n,o,p)):(Be&&l&&Vc(o),o.flags|=1,xt(n,o,c,p),o.child)}function Ig(n,o,l,c,p){if(n===null){var x=l.type;return typeof x=="function"&&!Of(x)&&x.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(o.tag=15,o.type=x,jg(n,o,x,c,p)):(n=ea(l.type,null,c,o,o.mode,p),n.ref=o.ref,n.return=o,o.child=n)}if(x=n.child,(n.lanes&p)===0){var _=x.memoizedProps;if(l=l.compare,l=l!==null?l:Mi,l(_,c)&&n.ref===o.ref)return Tn(n,o,p)}return o.flags|=1,n=pr(x,c),n.ref=o.ref,n.return=o,o.child=n}function jg(n,o,l,c,p){if(n!==null){var x=n.memoizedProps;if(Mi(x,c)&&n.ref===o.ref)if(kt=!1,o.pendingProps=c=x,(n.lanes&p)!==0)(n.flags&131072)!==0&&(kt=!0);else return o.lanes=n.lanes,Tn(n,o,p)}return yf(n,o,l,c,p)}function $g(n,o,l){var c=o.pendingProps,p=c.children,x=n!==null?n.memoizedState:null;if(c.mode==="hidden")if((o.mode&1)===0)o.memoizedState={baseLanes:0,cachePool:null,transitions:null},De(Oo,At),At|=l;else{if((l&1073741824)===0)return n=x!==null?x.baseLanes|l:l,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:n,cachePool:null,transitions:null},o.updateQueue=null,De(Oo,At),At|=n,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},c=x!==null?x.baseLanes:l,De(Oo,At),At|=c}else x!==null?(c=x.baseLanes|l,o.memoizedState=null):c=l,De(Oo,At),At|=c;return xt(n,o,p,l),o.child}function Ag(n,o){var l=o.ref;(n===null&&l!==null||n!==null&&n.ref!==l)&&(o.flags|=512,o.flags|=2097152)}function yf(n,o,l,c,p){var x=Et(l)?jr:dt.current;return x=Po(o,x),Ao(o,p),l=lf(n,o,l,c,x,p),c=af(),n!==null&&!kt?(o.updateQueue=n.updateQueue,o.flags&=-2053,n.lanes&=~p,Tn(n,o,p)):(Be&&c&&Vc(o),o.flags|=1,xt(n,o,l,p),o.child)}function Mg(n,o,l,c,p){if(Et(l)){var x=!0;_l(o)}else x=!1;if(Ao(o,p),o.stateNode===null)Vl(n,o),kg(o,l,c),pf(o,l,c,p),c=!0;else if(n===null){var _=o.stateNode,$=o.memoizedProps;_.props=$;var D=_.context,K=l.contextType;typeof K=="object"&&K!==null?K=Vt(K):(K=Et(l)?jr:dt.current,K=Po(o,K));var ae=l.getDerivedStateFromProps,ue=typeof ae=="function"||typeof _.getSnapshotBeforeUpdate=="function";ue||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||($!==c||D!==K)&&Cg(o,_,c,K),lr=!1;var se=o.memoizedState;_.state=se,Al(o,c,_,p),D=o.memoizedState,$!==c||se!==D||St.current||lr?(typeof ae=="function"&&(hf(o,l,ae,c),D=o.memoizedState),($=lr||Eg(o,l,$,c,se,D,K))?(ue||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWil
|
|||
|
|
|
|||
|
|
Please change the parent <Route path="${N}"> to <Route path="${N==="/"?"*":`${N}/*`}">.`)}let y=oo(),v;if(t){let N=typeof t=="string"?ro(t):t;qe(g==="/"||((R=N.pathname)==null?void 0:R.startsWith(g)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${g}" but pathname "${N.pathname}" was given in the \`location\` prop.`),v=N}else v=y;let S=v.pathname||"/",E=S;if(g!=="/"){let N=g.replace(/^\//,"").split("/");E="/"+S.replace(/^\//,"").split("/").slice(N.length).join("/")}let k=!a&&r&&r.matches&&r.matches.length>0?r.matches:Wy(e,{pathname:E});an(m||k!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),an(k==null||k[k.length-1].route.element!==void 0||k[k.length-1].route.Component!==void 0||k[k.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let C=zE(k&&k.map(N=>Object.assign({},N,{params:Object.assign({},d,N.params),pathname:Mn([g,s.encodeLocation?s.encodeLocation(N.pathname).pathname:N.pathname]),pathnameBase:N.pathnameBase==="/"?g:Mn([g,s.encodeLocation?s.encodeLocation(N.pathnameBase).pathname:N.pathnameBase])})),u,r,i);return t&&C?P.createElement(Ms.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...v},navigationType:"POP"}},C):C}function ME(){let e=UE(),t=bE(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:i},a={padding:"2px 4px",backgroundColor:i},u=null;return console.error("Error handled by React Router default ErrorBoundary:",e),u=P.createElement(P.Fragment,null,P.createElement("p",null,"💿 Hey developer 👋"),P.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",P.createElement("code",{style:a},"ErrorBoundary")," or"," ",P.createElement("code",{style:a},"errorElement")," prop on your route.")),P.createElement(P.Fragment,null,P.createElement("h2",null,"Unexpected Application Error!"),P.createElement("h3",{style:{fontStyle:"italic"}},t),r?P.createElement("pre",{style:s},r):null,u)}var LE=P.createElement(ME,null),DE=class extends P.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?P.createElement(Fn.Provider,{value:this.props.routeContext},P.createElement(ah.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function OE({routeContext:e,match:t,children:r}){let i=P.useContext(ai);return i&&i.static&&i.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=t.route.id),P.createElement(Fn.Provider,{value:e},r)}function zE(e,t=[],r=null,i=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let s=e,a=r==null?void 0:r.errors;if(a!=null){let d=s.findIndex(h=>h.route.id&&(a==null?void 0:a[h.route.id])!==void 0);qe(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`),s=s.slice(0,Math.min(s.length,d+1))}let u=!1,f=-1;if(r)for(let d=0;d<s.length;d++){let h=s[d];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(f=d),h.route.id){let{loaderData:g,errors:m}=r,y
|
|||
|
|
`,ou=typeof window<"u"&&"HTMLElement"in window,Xk=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&Mt!==void 0&&Mt.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&Mt.REACT_APP_SC_DISABLE_SPEEDY!==""?Mt.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&Mt.REACT_APP_SC_DISABLE_SPEEDY:typeof process<"u"&&Mt!==void 0&&Mt.SC_DISABLE_SPEEDY!==void 0&&Mt.SC_DISABLE_SPEEDY!==""&&Mt.SC_DISABLE_SPEEDY!=="false"&&Mt.SC_DISABLE_SPEEDY),Gk={},Ru=Object.freeze([]),Qo=Object.freeze({});function vx(e,t,r){return r===void 0&&(r=Qo),e.theme!==r.theme&&e.theme||t||r.theme}var wx=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),Kk=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Qk=/(^-|-$)/g;function Am(e){return e.replace(Kk,"-").replace(Qk,"")}var Jk=/(a)(d)/gi,ca=52,Mm=function(e){return String.fromCharCode(e+(e>25?39:97))};function bd(e){var t,r="";for(t=Math.abs(e);t>ca;t=t/ca|0)r=Mm(t%ca)+r;return(Mm(t%ca)+r).replace(Jk,"$1-$2")}var Zf,Sx=5381,Ho=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},Ex=function(e){return Ho(Sx,e)};function mh(e){return bd(Ex(e)>>>0)}function Zk(e){return e.displayName||e.name||"Component"}function ed(e){return typeof e=="string"&&!0}var kx=typeof Symbol=="function"&&Symbol.for,Cx=kx?Symbol.for("react.memo"):60115,eC=kx?Symbol.for("react.forward_ref"):60112,tC={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},nC={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},_x={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},rC=((Zf={})[eC]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Zf[Cx]=_x,Zf);function Lm(e){return("type"in(t=e)&&t.type.$$typeof)===Cx?_x:"$$typeof"in e?rC[e.$$typeof]:tC;var t}var oC=Object.defineProperty,iC=Object.getOwnPropertyNames,Dm=Object.getOwnPropertySymbols,sC=Object.getOwnPropertyDescriptor,lC=Object.getPrototypeOf,Om=Object.prototype;function Nx(e,t,r){if(typeof t!="string"){if(Om){var i=lC(t);i&&i!==Om&&Nx(e,i,r)}var s=iC(t);Dm&&(s=s.concat(Dm(t)));for(var a=Lm(e),u=Lm(t),f=0;f<s.length;++f){var d=s[f];if(!(d in nC||r&&r[d]||u&&d in u||a&&d in a)){var h=sC(t,d);try{oC(e,d,h)}catch{}}}}return e}function Jr(e){return typeof e=="function"}function yh(e){return typeof e=="object"&&"styledComponentId"in e}function Ur(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function iu(e,t){if(e.length===0)return"";for(var r=e[0],i=1;i<e.length;i++)r+=e[i];return r}function vs(e){return e!==null&&typeof e=="object"&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function Pd(e,t,r){if(r===void 0&&(r=!1),!r&&!vs(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var i=0;i<t.length;i++)e[i]=Pd(e[i],t[i]);else if(vs(t))for(var i in t)e[i]=Pd(e[i],t[i]);return e}function xh(e,t){Object.defineProperty(e,"toString",{value:t})}function kr(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return new Error("An error occurred. See https://github.com/styled-components/styled-components/b
|
|||
|
|
body {
|
|||
|
|
background-color: ${e=>e.theme.backgroundColor};
|
|||
|
|
color: ${e=>e.theme.textColor};
|
|||
|
|
box-sizing: border-box;
|
|||
|
|
font-family: sans-serif;
|
|||
|
|
box-sizing: border-box;
|
|||
|
|
min-height: 100%;
|
|||
|
|
height: 100%;
|
|||
|
|
margin: 0;
|
|||
|
|
|
|||
|
|
h1, h2, h3, h4, P{
|
|||
|
|
margin: 0;
|
|||
|
|
display: unset;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#root{
|
|||
|
|
width: 100%;
|
|||
|
|
height: 100%;
|
|||
|
|
margin: 0;
|
|||
|
|
padding: 0;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.react-flow__controls{
|
|||
|
|
border-radius: 12px;
|
|||
|
|
background-color: ${e=>e.theme.secondary};
|
|||
|
|
button{
|
|||
|
|
background-color: ${e=>e.theme.secondary};
|
|||
|
|
border: none;
|
|||
|
|
border-radius: 12px;
|
|||
|
|
|
|||
|
|
&:hover{
|
|||
|
|
background-color: ${e=>e.theme.primary};
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.react-flow__controls-button{
|
|||
|
|
border-radius: 12px;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.react-flow__handle{
|
|||
|
|
background-color: ${e=>e.theme.nodeColor};
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.unselectable {
|
|||
|
|
user-select: none;
|
|||
|
|
-webkit-user-select: none;
|
|||
|
|
-moz-user-select: none;
|
|||
|
|
-ms-user-select: none;
|
|||
|
|
}
|
|||
|
|
`,wt={1:"light",2:"dark",3:"system"},$C=P.createContext(void 0),AC=({children:e})=>{const t=()=>window.matchMedia("(prefers-color-scheme: dark)").matches?wt[2]:wt[1],r=()=>{let f=localStorage.getItem("theme");return f||(f=wt[3],localStorage.setItem("theme",f)),f},[i,s]=P.useState(r),a=()=>{s(f=>{let d;return f===wt[3]?d=wt[1]:f===wt[1]?d=wt[2]:d=wt[3],localStorage.setItem("theme",d),d})};P.useEffect(()=>{const f=window.matchMedia("(prefers-color-scheme: dark)");let d=localStorage.getItem("theme");const h=()=>{if(d===wt[3]){const g=t();s(g),localStorage.setItem("theme",wt[3])}};return f.addEventListener("change",h),()=>f.removeEventListener("change",h)},[i]);const u=i===wt[3]?t():i;return w.jsx($C.Provider,{value:{theme:i,toggleTheme:a},children:w.jsxs(NC,{theme:{...u===wt[1]?TC:IC,toggleTheme:a},children:[w.jsx(jC,{}),e]})})},Um=e=>{let t;const r=new Set,i=(h,g)=>{const m=typeof h=="function"?h(t):h;if(!Object.is(m,t)){const y=t;t=g??(typeof m!="object"||m===null)?m:Object.assign({},t,m),r.forEach(v=>v(t,y))}},s=()=>t,f={setState:i,getState:s,getInitialState:()=>d,subscribe:h=>(r.add(h),()=>r.delete(h))},d=t=e(i,s,f);return f},MC=e=>e?Um(e):Um,LC=e=>e;function DC(e,t=LC){const r=yt.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return yt.useDebugValue(r),r}const Wm=e=>{const t=MC(e),r=i=>DC(t,i);return Object.assign(r,t),r},Bn=e=>e?Wm(e):Wm,Lx=Bn(e=>({isPanDisabled:!1,toggleEditingMode:()=>e(t=>({isPanDisabled:!t.isPanDisabled}))})),Dx=Bn(e=>({groups:[],setGroups:t=>e({groups:t})}));function ci(e,t){let r;try{r=e()}catch{return}return{getItem:s=>{var a;const u=d=>d===null?null:JSON.parse(d,void 0),f=(a=r.getItem(s))!=null?a:null;return f instanceof Promise?f.then(u):u(f)},setItem:(s,a)=>r.setItem(s,JSON.stringify(a,void 0)),removeItem:s=>r.removeItem(s)}}const jd=e=>t=>{try{const r=e(t);return r instanceof Promise?r:{then(i){return jd(i)(r)},catch(i){return this}}}catch(r){return{then(i){return this},catch(i){return jd(i)(r)}}}},OC=(e,t)=>(r,i,s)=>{let a={storage:ci(()=>localStorage),partialize:E=>E,version:0,merge:(E,k)=>({...k,...E}),...t},u=!1;const f=new Set,d=new Set;let h=a.storage;if(!h)return e((...E)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),r(...E)},i,s);const g=()=>{const E=a.partialize({...i()});return h.setItem(a.name,{state:E,version:a.version})},m=s.setState;s.setState=(E,k)=>{m(E,k),g()};const y=e((...E)=>{r(...E),g()},i,s);s.getInitialState=()=>y;let v;const S=()=>{var E,k;if(!h)return;u=!1,f.forEach(R=>{var N;return R((N=i())!=null?N:y)});const C=((k=a.onRehydrateStorage)==null?void 0:k.call(a,(E=i())!=null?E:y))||void 0;return jd(h.getItem.bind(h))(a.name).then(R=>{if(R)if(typeof R.version=="number"&&R.version!==a.version){if(a.migrate){const N=a.migrate(R.state,R.version);return N instanceof Promise?N.then(b=>[!0,b]):[!0,N]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,R.state];return[!1,void 0]}).then(R=>{var N;const[b,M]=R;if(v=a.merge(M,(N=i())!=null?N:y),r(v,!0),b)return g()}).then(()=>{C==null||C(v,void 0),v=i(),u=!0,d.forEach(R=>R(v))}).catch(R=>{C==null||C(void 0,R)})};return s.persist={setOptions:E=>{a={...a,...E},E.storage&&(h=E.storage)},clearStorage:()=>{h==null||h.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>S(),hasHydrated:()=>u,onHydrate:E=>(f.add(E),()=>{f.delete(E)}),onFinishHydration:E=>(d.add(E),()=>{d.delete(E)})},a.skipHydration||S(),v||y},Os=OC,Hn=Bn()(Os(e=>({ipAddress:"localhost",setIpAddress:t=>e({ipAddress:t})}),{name:"currentIp-storage",storage:ci(()=>localStorage)})),au={1:"toolSpace-devices"},qm={current:au[1],toolSpace:[{id:au[1],isOpen:!0,isActive:!0}]},Tu=Bn()(Os((e,t)=>({toolBar:qm,toggleMenu:r=>e(i=>{const s=i.toolBar.toolSpace.map(a=>a.id===r?{...a,isOpen:!a.isOpen,isActive:!0}:{...a,isActive:!1,isOpen:!1});return{toolBar:{...i.toolBar,current:r,toolSpace:s}}}),initialize:()=>{e({toolBar:qm})}}),{name:"toolBar-storage",storage:ci(()=>localStorage)})),$d=Bn()(Os(e=>({devices:
|
|||
|
|
`).forEach(function(u){s=u.indexOf(":"),r=u.substring(0,s).trim().toLowerCase(),i=u.substring(s+1).trim(),!(!r||t[r]&&B2[r])&&(r==="set-cookie"?t[r]?t[r].push(i):t[r]=[i]:t[r]=t[r]?t[r]+", "+i:i)}),t},Qm=Symbol("internals");function is(e){return e&&String(e).trim().toLowerCase()}function Ya(e){return e===!1||e==null?e:Q.isArray(e)?e.map(Ya):String(e)}function V2(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=r.exec(e);)t[i[1]]=i[2];return t}const U2=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function nd(e,t,r,i,s){if(Q.isFunction(i))return i.call(this,t,r);if(s&&(t=r),!!Q.isString(t)){if(Q.isString(i))return t.indexOf(i)!==-1;if(Q.isRegExp(i))return i.test(t)}}function W2(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,i)=>r.toUpperCase()+i)}function q2(e,t){const r=Q.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(e,i+r,{value:function(s,a,u){return this[i].call(this,t,s,a,u)},configurable:!0})})}let Rt=class{constructor(t){t&&this.set(t)}set(t,r,i){const s=this;function a(f,d,h){const g=is(d);if(!g)throw new Error("header name must be a non-empty string");const m=Q.findKey(s,g);(!m||s[m]===void 0||h===!0||h===void 0&&s[m]!==!1)&&(s[m||d]=Ya(f))}const u=(f,d)=>Q.forEach(f,(h,g)=>a(h,g,d));if(Q.isPlainObject(t)||t instanceof this.constructor)u(t,r);else if(Q.isString(t)&&(t=t.trim())&&!U2(t))u(H2(t),r);else if(Q.isHeaders(t))for(const[f,d]of t.entries())a(d,f,i);else t!=null&&a(r,t,i);return this}get(t,r){if(t=is(t),t){const i=Q.findKey(this,t);if(i){const s=this[i];if(!r)return s;if(r===!0)return V2(s);if(Q.isFunction(r))return r.call(this,s,i);if(Q.isRegExp(r))return r.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=is(t),t){const i=Q.findKey(this,t);return!!(i&&this[i]!==void 0&&(!r||nd(this,this[i],i,r)))}return!1}delete(t,r){const i=this;let s=!1;function a(u){if(u=is(u),u){const f=Q.findKey(i,u);f&&(!r||nd(i,i[f],f,r))&&(delete i[f],s=!0)}}return Q.isArray(t)?t.forEach(a):a(t),s}clear(t){const r=Object.keys(this);let i=r.length,s=!1;for(;i--;){const a=r[i];(!t||nd(this,this[a],a,t,!0))&&(delete this[a],s=!0)}return s}normalize(t){const r=this,i={};return Q.forEach(this,(s,a)=>{const u=Q.findKey(i,a);if(u){r[u]=Ya(s),delete r[a];return}const f=t?W2(a):String(a).trim();f!==a&&delete r[a],r[f]=Ya(s),i[f]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return Q.forEach(this,(i,s)=>{i!=null&&i!==!1&&(r[s]=t&&Q.isArray(i)?i.join(", "):i)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
|
|||
|
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const i=new this(t);return r.forEach(s=>i.set(s)),i}static accessor(t){const i=(this[Qm]=this[Qm]={accessors:{}}).accessors,s=this.prototype;function a(u){const f=is(u);i[f]||(q2(s,u),i[f]=!0)}return Q.isArray(t)?t.forEach(a):a(t),this}};Rt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Q.reduceDescriptors(Rt.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(i){this[r]=i}}});Q.freezeMethods(Rt);function rd(e,t){const r=this||Fs,i=t||r,s=Rt.from(i.headers);let a=i.data;return Q.forEach(e,function(f){a=f.call(r,a,s.normalize(),t?t.status:void 0)}),s.normalize(),a}function Zx(e){return!!(e&&e.__CANCEL__)}function di(e,t,r){Ne.call(this,e??"canceled",Ne.ERR_CANCELED,t,r),this.name="CanceledError"}Q.inherits(di,Ne,{__CANCEL__:!0});function ev(e,t,r){const i=r.config.validateStatus;!r.status||!i||i(r.status)?e(r):t(new Ne("Request failed with status code "+r.status,[Ne.ERR_BAD_REQUEST,Ne.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Y2(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function X2(e,t){e=e||10;const r=new Array(e),i=new Array(e);let s=0,a=0,u;return t=t!==void 0?t:1e3,function(d){const h=Date.now(),g=i[a];u||(u=h),r[s]=d,i[s]=h;let m=a,y=0;for(;m!==s;)y+=r[m++],m=m%e;if(s=(s+1)%e,s===a&&(a=(a+1)%e),h-u<t)return;const v=g&&h-g;return v?Math.round(y*1e3/v):void 0}}function G2(e,t){let r=0,i=1e3/t,s,a;const u=(h,g=Date.now())=>{r=g,s=null,a&&(clearTimeout(a),a=null),e.apply(null,h)};return[(...h)=>{const g=Date.now(),m=g-r;m>=i?u(h,g):(s=h,a||(a=setTimeout(()=>{a=null,u(s)},i-m)))},()=>s&&u(s)]}const uu=(e,t,r=3)=>{let i=0;const s=X2(50,250);return G2(a=>{const u=a.loaded,f=a.lengthComputable?a.total:void 0,d=u-i,h=s(d),g=u<=f;i=u;const m={loaded:u,total:f,progress:f?u/f:void 0,bytes:d,rate:h||void 0,estimated:h&&f&&g?(f-u)/h:void 0,event:a,lengthComputable:f!=null,[t?"download":"upload"]:!0};e(m)},r)},Jm=(e,t)=>{const r=e!=null;return[i=>t[0]({lengthComputable:r,total:e,loaded:i}),t[1]]},Zm=e=>(...t)=>Q.asap(()=>e(...t)),K2=mt.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,mt.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(mt.origin),mt.navigator&&/(msie|trident)/i.test(mt.navigator.userAgent)):()=>!0,Q2=mt.hasStandardBrowserEnv?{write(e,t,r,i,s,a){const u=[e+"="+encodeURIComponent(t)];Q.isNumber(r)&&u.push("expires="+new Date(r).toGMTString()),Q.isString(i)&&u.push("path="+i),Q.isString(s)&&u.push("domain="+s),a===!0&&u.push("secure"),document.cookie=u.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function J2(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Z2(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function tv(e,t,r){let i=!J2(t);return e&&(i||r==!1)?Z2(e,t):t}const e0=e=>e instanceof Rt?{...e}:e;function eo(e,t){t=t||{};const r={};function i(h,g,m,y){return Q.isPlainObject(h)&&Q.isPlainObject(g)?Q.merge.call({caseless:y},h,g):Q.isPlainObject(g)?Q.merge({},g):Q.isArray(g)?g.slice():g}function s(h,g,m,y){if(Q.isUndefined(g)){if(!Q.isUndefined(h))return i(void 0,h,m,y)}else return i(h,g,m,y)}function a(h,g){if(!Q.isUndefined(g))return i(void 0,g)}function u(h,g){if(Q.isUndefined(g)){if(!Q.isUndefined(h))return i(void 0,h)}else return i(void 0,g)}function f(h,g,m){if(m in t)return i(h,g);if(m in e)return i(void 0,h)}const d={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateSta
|
|||
|
|
`+a.map(r0).join(`
|
|||
|
|
`):" "+r0(a[0]):"as no adapter specified";throw new Ne("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return i},adapters:Od};function od(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new di(null,e)}function o0(e){return od(e),e.headers=Rt.from(e.headers),e.data=rd.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),iv.getAdapter(e.adapter||Fs.adapter)(e).then(function(i){return od(e),i.data=rd.call(e,e.transformResponse,i),i.headers=Rt.from(i.headers),i},function(i){return Zx(i)||(od(e),i&&i.response&&(i.response.data=rd.call(e,e.transformResponse,i.response),i.response.headers=Rt.from(i.response.headers))),Promise.reject(i)})}const sv="1.8.4",Du={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Du[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}});const i0={};Du.transitional=function(t,r,i){function s(a,u){return"[Axios v"+sv+"] Transitional option '"+a+"'"+u+(i?". "+i:"")}return(a,u,f)=>{if(t===!1)throw new Ne(s(u," has been removed"+(r?" in "+r:"")),Ne.ERR_DEPRECATED);return r&&!i0[u]&&(i0[u]=!0,console.warn(s(u," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(a,u,f):!0}};Du.spelling=function(t){return(r,i)=>(console.warn(`${i} is likely a misspelling of ${t}`),!0)};function d_(e,t,r){if(typeof e!="object")throw new Ne("options must be an object",Ne.ERR_BAD_OPTION_VALUE);const i=Object.keys(e);let s=i.length;for(;s-- >0;){const a=i[s],u=t[a];if(u){const f=e[a],d=f===void 0||u(f,a,e);if(d!==!0)throw new Ne("option "+a+" must be "+d,Ne.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Ne("Unknown option "+a,Ne.ERR_BAD_OPTION)}}const Xa={assertOptions:d_,validators:Du},yn=Xa.validators;let Xr=class{constructor(t){this.defaults=t,this.interceptors={request:new Km,response:new Km}}async request(t,r){try{return await this._request(t,r)}catch(i){if(i instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const a=s.stack?s.stack.replace(/^.+\n/,""):"";try{i.stack?a&&!String(i.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(i.stack+=`
|
|||
|
|
`+a):i.stack=a}catch{}}throw i}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=eo(this.defaults,r);const{transitional:i,paramsSerializer:s,headers:a}=r;i!==void 0&&Xa.assertOptions(i,{silentJSONParsing:yn.transitional(yn.boolean),forcedJSONParsing:yn.transitional(yn.boolean),clarifyTimeoutError:yn.transitional(yn.boolean)},!1),s!=null&&(Q.isFunction(s)?r.paramsSerializer={serialize:s}:Xa.assertOptions(s,{encode:yn.function,serialize:yn.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Xa.assertOptions(r,{baseUrl:yn.spelling("baseURL"),withXsrfToken:yn.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let u=a&&Q.merge(a.common,a[r.method]);a&&Q.forEach(["delete","get","head","post","put","patch","common"],S=>{delete a[S]}),r.headers=Rt.concat(u,a);const f=[];let d=!0;this.interceptors.request.forEach(function(E){typeof E.runWhen=="function"&&E.runWhen(r)===!1||(d=d&&E.synchronous,f.unshift(E.fulfilled,E.rejected))});const h=[];this.interceptors.response.forEach(function(E){h.push(E.fulfilled,E.rejected)});let g,m=0,y;if(!d){const S=[o0.bind(this),void 0];for(S.unshift.apply(S,f),S.push.apply(S,h),y=S.length,g=Promise.resolve(r);m<y;)g=g.then(S[m++],S[m++]);return g}y=f.length;let v=r;for(m=0;m<y;){const S=f[m++],E=f[m++];try{v=S(v)}catch(k){E.call(this,k);break}}try{g=o0.call(this,v)}catch(S){return Promise.reject(S)}for(m=0,y=h.length;m<y;)g=g.then(h[m++],h[m++]);return g}getUri(t){t=eo(this.defaults,t);const r=tv(t.baseURL,t.url,t.allowAbsoluteUrls);return Kx(r,t.params,t.paramsSerializer)}};Q.forEach(["delete","get","head","options"],function(t){Xr.prototype[t]=function(r,i){return this.request(eo(i||{},{method:t,url:r,data:(i||{}).data}))}});Q.forEach(["post","put","patch"],function(t){function r(i){return function(a,u,f){return this.request(eo(f||{},{method:t,headers:i?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}Xr.prototype[t]=r(),Xr.prototype[t+"Form"]=r(!0)});let h_=class lv{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(a){r=a});const i=this;this.promise.then(s=>{if(!i._listeners)return;let a=i._listeners.length;for(;a-- >0;)i._listeners[a](s);i._listeners=null}),this.promise.then=s=>{let a;const u=new Promise(f=>{i.subscribe(f),a=f}).then(s);return u.cancel=function(){i.unsubscribe(a)},u},t(function(a,u,f){i.reason||(i.reason=new di(a,u,f),r(i.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=i=>{t.abort(i)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new lv(function(s){t=s}),cancel:t}}};function p_(e){return function(r){return e.apply(null,r)}}function g_(e){return Q.isObject(e)&&e.isAxiosError===!0}const zd={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,RequestHeaderFieldsToo
|
|||
|
|
0%, 100% { opacity: 0.3; }
|
|||
|
|
50% { opacity: 1; }
|
|||
|
|
`,id=oe.span`
|
|||
|
|
animation: ${y_} 1s infinite;
|
|||
|
|
animation-delay: ${({$delay:e})=>e}s;
|
|||
|
|
margin: 0;
|
|||
|
|
`,x_=oe.div`
|
|||
|
|
display: flex;
|
|||
|
|
gap: 4px;
|
|||
|
|
`,Ch=()=>w.jsxs(x_,{children:[w.jsx(id,{$delay:0,children:"."}),w.jsx(id,{$delay:.2,children:"."}),w.jsx(id,{$delay:.4,children:"."})]}),v_=wh`
|
|||
|
|
from {
|
|||
|
|
transform: rotate(0deg);
|
|||
|
|
}
|
|||
|
|
to {
|
|||
|
|
transform: rotate(360deg);
|
|||
|
|
}
|
|||
|
|
`;oe.div`
|
|||
|
|
top: 0px;
|
|||
|
|
z-index:998;
|
|||
|
|
background-color: rgba(0,0,0, 0.7);
|
|||
|
|
position: fixed;
|
|||
|
|
display: flex;
|
|||
|
|
align-items: center;
|
|||
|
|
justify-content: center;
|
|||
|
|
width: 100%;
|
|||
|
|
height: 100%;
|
|||
|
|
overflow-y: hidden;
|
|||
|
|
`;const w_=oe.div`
|
|||
|
|
display: flex;
|
|||
|
|
flex-direction: column;
|
|||
|
|
align-items: center;
|
|||
|
|
gap: 15px;
|
|||
|
|
|
|||
|
|
p{
|
|||
|
|
font-size: 24px;
|
|||
|
|
color: white;
|
|||
|
|
}
|
|||
|
|
`,S_=oe.div`
|
|||
|
|
position: relative;
|
|||
|
|
width: 65px;
|
|||
|
|
height: 65px;
|
|||
|
|
`,E_=oe.div`
|
|||
|
|
position: absolute;
|
|||
|
|
top: 0;
|
|||
|
|
left: 0;
|
|||
|
|
width: 65px;
|
|||
|
|
height: 65px;
|
|||
|
|
border-radius: 50%;
|
|||
|
|
border: 12px solid white;
|
|||
|
|
`,k_=oe.div`
|
|||
|
|
position: absolute;
|
|||
|
|
top: 0;
|
|||
|
|
left: 0;
|
|||
|
|
width: 65px;
|
|||
|
|
height: 65px;
|
|||
|
|
border-radius: 50%;
|
|||
|
|
border: 12px solid transparent;
|
|||
|
|
border-top: 12px solid ${e=>e.theme.accent};
|
|||
|
|
|
|||
|
|
// Добавление аниманции и использование кейфремов
|
|||
|
|
animation: ${v_} 1s linear infinite;
|
|||
|
|
`,C_=oe.div`
|
|||
|
|
display: flex;
|
|||
|
|
gap: 3px;
|
|||
|
|
font-size: 24px;
|
|||
|
|
color: white;
|
|||
|
|
margin-top: 30px;
|
|||
|
|
margin-left: 25px;
|
|||
|
|
`;function cv({loaderText:e}){return w.jsxs(w_,{children:[w.jsxs(S_,{children:[w.jsx(E_,{}),w.jsx(k_,{})]}),w.jsxs(C_,{children:[e,w.jsx(Ch,{})]})]})}const fv=oe.div`
|
|||
|
|
width: 100%;
|
|||
|
|
position: fixed;
|
|||
|
|
top: 0;
|
|||
|
|
left: 0;
|
|||
|
|
z-index: 9999;
|
|||
|
|
background-color: rgba(0, 0, 0, 0.8);
|
|||
|
|
display: flex;
|
|||
|
|
align-items: center;
|
|||
|
|
justify-content: center;
|
|||
|
|
height: 100%;
|
|||
|
|
`,Ss=oe.div`
|
|||
|
|
border-radius: 12px;
|
|||
|
|
background: ${e=>e.theme.secondary};
|
|||
|
|
color: ${e=>e.theme.textColor};
|
|||
|
|
position: relative;
|
|||
|
|
max-height: 100%;
|
|||
|
|
overflow: auto;
|
|||
|
|
display: flex;
|
|||
|
|
flex-direction: column;
|
|||
|
|
justify-content: space-between;
|
|||
|
|
gap: 15px;
|
|||
|
|
height: ${e=>e.height?e.height:"200px"};
|
|||
|
|
width: 520px;
|
|||
|
|
`,Es=oe.div`
|
|||
|
|
padding: 20px;
|
|||
|
|
border-bottom: 1px solid #9D9D9D;
|
|||
|
|
display: flex;
|
|||
|
|
justify-content: space-between;
|
|||
|
|
|
|||
|
|
h3{
|
|||
|
|
font-size: 18px;
|
|||
|
|
}
|
|||
|
|
`,Zo=oe.div`
|
|||
|
|
padding: 0 20px;
|
|||
|
|
|
|||
|
|
h3{
|
|||
|
|
font-size: 14px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
p{
|
|||
|
|
font-size: 12px;
|
|||
|
|
}
|
|||
|
|
`,dv=oe.div`
|
|||
|
|
display: flex;
|
|||
|
|
flex-direction: column;
|
|||
|
|
align-items: flex-start;
|
|||
|
|
gap: 10px;
|
|||
|
|
`,__=oe.p`
|
|||
|
|
color: #d95454;
|
|||
|
|
`,ei=oe.div`
|
|||
|
|
justify-content: flex-end;
|
|||
|
|
display: flex;
|
|||
|
|
gap: 10px;
|
|||
|
|
padding: 20px;
|
|||
|
|
`,Le={1:"powerOff",2:"delete",3:"settings",4:"information",5:"arrow-down",6:"arrow-right",7:"edit",8:"accept",9:"cancel",10:"admin",11:"reset",12:"close",13:"noAdmin"},hv=Object.freeze({left:0,top:0,width:16,height:16}),fu=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),_h=Object.freeze({...hv,...fu}),Fd=Object.freeze({..._h,body:"",hidden:!1});function N_(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}function s0(e,t){const r=N_(e,t);for(const i in Fd)i in fu?i in e&&!(i in r)&&(r[i]=fu[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function b_(e,t){const r=e.icons,i=e.aliases||Object.create(null),s=Object.create(null);function a(u){if(r[u])return s[u]=[];if(!(u in s)){s[u]=null;const f=i[u]&&i[u].parent,d=f&&a(f);d&&(s[u]=[f].concat(d))}return s[u]}return Object.keys(r).concat(Object.keys(i)).forEach(a),s}function P_(e,t,r){const i=e.icons,s=e.aliases||Object.create(null);let a={};function u(f){a=s0(i[f]||s[f],a)}return u(t),r.forEach(u),s0(e,a)}function pv(e,t){const r=[];if(typeof e!="object"||typeof e.icons!="object")return r;e.not_found instanceof Array&&e.not_found.forEach(s=>{t(s,null),r.push(s)});const i=b_(e);for(const s in i){const a=i[s];a&&(t(s,P_(e,s,a)),r.push(s))}return r}const R_={provider:"",aliases:{},not_found:{},...hv};function sd(e,t){for(const r in t)if(r in e&&typeof e[r]!=typeof t[r])return!1;return!0}function gv(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!sd(e,R_))return null;const r=t.icons;for(const s in r){const a=r[s];if(!s||typeof a.body!="string"||!sd(a,Fd))return null}const i=t.aliases||Object.create(null);for(const s in i){const a=i[s],u=a.parent;if(!s||typeof u!="string"||!r[u]&&!i[u]||!sd(a,Fd))return null}return t}const mv=/^[a-z0-9]+(-[a-z0-9]+)*$/,Ou=(e,t,r,i="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;i=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const f=s.pop(),d=s.pop(),h={provider:s.length>0?s[0]:i,prefix:d,name:f};return t&&!Ga(h)?null:h}const a=s[0],u=a.split("-");if(u.length>1){const f={provider:i,prefix:u.shift(),name:u.join("-")};return t&&!Ga(f)?null:f}if(r&&i===""){const f={provider:i,prefix:"",name:a};return t&&!Ga(f,r)?null:f}return null},Ga=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1,l0=Object.create(null);function T_(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function ti(e,t){const r=l0[e]||(l0[e]=Object.create(null));return r[t]||(r[t]=T_(e,t))}function yv(e,t){return gv(t)?pv(t,(r,i)=>{i?e.icons[r]=i:e.missing.add(r)}):[]}function I_(e,t,r){try{if(typeof r.body=="string")return e.icons[t]={...r},!0}catch{}return!1}let ks=!1;function xv(e){return typeof e=="boolean"&&(ks=e),ks}function a0(e){const t=typeof e=="string"?Ou(e,!0,ks):e;if(t){const r=ti(t.provider,t.prefix),i=t.name;return r.icons[i]||(r.missing.has(i)?null:void 0)}}function j_(e,t){const r=Ou(e,!0,ks);if(!r)return!1;const i=ti(r.provider,r.prefix);return t?I_(i,r.name,t):(i.missing.add(r.name),!0)}function $_(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),ks&&!t&&!e.prefix){let s=!1;return gv(e)&&(e.prefix="",pv(e,(a,u)=>{j_(a,u)&&(s=!0)})),s}const r=e.prefix;if(!Ga({prefix:r,name:"a"}))return!1;const i=ti(t,r);return!!yv(i,e)}const vv=Object.freeze({width:null,height:null}),wv=Object.freeze({...vv,...fu}),A_=/(-?[0-9.]*[0-9]+[0-9.]*)/g,M_=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function u0(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(A_);if(i===null||!i.length)return e;const s=[];let a=i.shift(),u=M_.test(a);for(;;){if(u){const f=parseFloat(a);isNaN(f)?s.push(a):s.push(Math.ceil(f*t*r)/r)}else s.push(a);if(a=i.shift(),a===void 0)return s.join("");u=!u}}function L_(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const s=e.indexOf(">",i),a=e.indexOf("</"+t);if(s===-1||a===-1)break;const u=e.indexOf(">",a);if
|
|||
|
|
background-color: ${e=>e.color};
|
|||
|
|
border: none;
|
|||
|
|
padding: ${e=>e.size==="small"?"4px 8px":e.size==="big"?"10px 20px":"6px 10px"}; // По умолчанию
|
|||
|
|
border-radius: 8px;
|
|||
|
|
color: white;
|
|||
|
|
font-size: ${e=>e.size==="small"?"12px":e.size==="big"?"16px":"14px"}; // По умолчанию
|
|||
|
|
cursor: pointer;
|
|||
|
|
display: flex;
|
|||
|
|
justify-content: center;
|
|||
|
|
align-items: center;
|
|||
|
|
flex-direction: ${e=>e.$iconpos==="right"?"row-reverse":"row"};
|
|||
|
|
gap: 10px;
|
|||
|
|
|
|||
|
|
&:hover{
|
|||
|
|
background-color: ${e=>e.$hoverсolor};
|
|||
|
|
}
|
|||
|
|
`,at=({color:e,size:t,title:r,hoverColor:i,type:s,icon:a,iconPosition:u,iconSize:f,onClick:d,style:h})=>{const g=so(),m=g.accent,y=g.accentHover;return w.jsxs(h4,{className:"unselectable",color:e||m,size:t,$hoverсolor:i||y,onClick:d,type:s,$iconpos:u||"left",style:h,children:[a&&w.jsx(Ot,{name:a,width:f==null?void 0:f.width,height:f==null?void 0:f.height,setColor:"white"}),r]})},p4=oe.div`
|
|||
|
|
display: flex;
|
|||
|
|
flex-direction: column;
|
|||
|
|
gap: 15px;
|
|||
|
|
`,g4=oe.div`
|
|||
|
|
display: flex;
|
|||
|
|
gap: 10px;
|
|||
|
|
`,m4=oe.div`
|
|||
|
|
display: flex;
|
|||
|
|
gap: 35px;
|
|||
|
|
`,y4=oe.div`
|
|||
|
|
display: flex;
|
|||
|
|
flex-direction: column;
|
|||
|
|
gap: 10px;
|
|||
|
|
`,x4=oe.div`
|
|||
|
|
display: flex;
|
|||
|
|
flex-direction: column;
|
|||
|
|
gap: 10px;
|
|||
|
|
`,v4=({ipData:e,onClose:t,smoothClose:r})=>{const[i,s]=P.useState(!0),[a,u]=P.useState(null),[f,d]=P.useState({}),[h,g]=P.useState(!1),[m,y]=P.useState(""),{ipAddress:v,setIpAddress:S}=Hn(),{isAdmin:E}=Iu(),{devices:k,addDevice:C,deleteDevice:R}=$d();P.useEffect(()=>{if(e&&E){const L={connection_id:e.connection,ipv4_updates:{"ipv4.method":"manual","ipv4.address-data":[{address:e.newIp,prefix:e.prefix}],"ipv4.gateway":e.newGate,"ipv4.dns-data":e.newDns}},j={connection_id:e.connection,ipv4_updates:{"ipv4.method":"manual","ipv4.address-data":[{address:e.currentIp,prefix:e.prefix}],"ipv4.gateway":e.currentGate,"ipv4.dns-data":e.currentDns}};d(j),N(L)}},[e,E]);const N=async L=>{try{const j=await Ln.checkIp(v,L);g(j.data.available),y(j.data.message),j.data.available&&u(L)}catch(j){console.error("Error:",j)}finally{s(!1)}},b=async L=>{try{if((await Ln.saveIp(v,L)).status===200){if(v!=="localhost"){S(e.newIp);const G=k.map(V=>V.address===e.currentIp?{...V,address:e.newIp}:V);$d.setState({devices:G})}t()}}catch(j){console.error("Error:",j)}finally{s(!1)}},M=async L=>{try{(await Ln.saveIp(v,L)).status===200&&t()}catch(j){console.error("Error:",j)}finally{s(!1)}};return w.jsx(w.Fragment,{children:i&&E?w.jsx(cv,{loaderText:"Идет проверка корректности IP адреса"}):w.jsxs(Ss,{...h?{height:"unset"}:{},children:[w.jsx(Es,{children:w.jsx("h3",{children:"Изменение IP-Адреса"})}),h?w.jsxs(Zo,{children:[w.jsxs(p4,{children:[w.jsx("h3",{children:"Общие сведения"}),w.jsxs(g4,{children:[w.jsxs("p",{children:["Интерфейс: ",e.device]}),w.jsxs("p",{children:["--",">"]}),w.jsx("p",{children:e.connection})]}),w.jsx("h3",{children:"Сведения об IP"}),w.jsxs(m4,{children:[w.jsxs(y4,{children:[w.jsxs("p",{children:["Текущий ip: ",e.currentIp]}),w.jsxs("p",{children:["Текущий шлюз: ",e.currentGate]}),w.jsxs("p",{children:["Текущий DNS: ",e.currentDns]})]}),w.jsxs(x4,{children:[w.jsxs("p",{children:["Новый ip: ",e.newIp]}),w.jsxs("p",{children:["Новый шлюз: ",e.newGate]}),w.jsxs("p",{children:["Новый DNS: ",e.newDns]})]})]})]}),w.jsxs(ei,{children:[w.jsx(at,{title:"Отмена",size:"small",onClick:()=>M(f)}),w.jsx(at,{title:"Сохранить",size:"small",onClick:()=>b(a)})]})]}):w.jsxs(w.Fragment,{children:[w.jsx(Zo,{children:w.jsx(dv,{children:E?w.jsxs(w.Fragment,{children:[w.jsx("h3",{children:"Произошла ошибка проверки корректности"}),w.jsx(__,{children:m})]}):w.jsx("h3",{children:"Для изменения сетевых настроек необходимо авторизироваться под администратором"})})}),w.jsx(ei,{children:w.jsx(at,{title:"Закрыть",size:"small",onClick:r})})]})]})})},w4=({message:e})=>{const{closeModal:t}=io(),{setIpAddress:r}=Hn(),i=()=>{r("localhost"),t()};return w.jsxs(Ss,{children:[w.jsx(Es,{children:w.jsx("h3",{children:"Соединение прервано"})}),w.jsx(Zo,{children:w.jsxs(dv,{children:[w.jsx("h3",{children:"Произошёл разрыв с сервером"}),w.jsx("p",{children:"Пожалуйста, проверьте доступ к адресу и попробуйте снова."})]})}),w.jsxs(ei,{children:[w.jsx(at,{title:"Закрыть",onClick:i,size:"small"}),w.jsx(at,{title:"Повторить",onClick:t,size:"small"})]})]})},S4=oe.div`
|
|||
|
|
width: 100%;
|
|||
|
|
display: flex;
|
|||
|
|
flex: 3;
|
|||
|
|
|
|||
|
|
`,E4=oe.input`
|
|||
|
|
padding: 8px 10px;
|
|||
|
|
color: black;
|
|||
|
|
border-radius: 8px;
|
|||
|
|
border: 1px solid #A1A1A1;
|
|||
|
|
background-color: transparent;
|
|||
|
|
&:focus{
|
|||
|
|
border: 1px solid #adadad;
|
|||
|
|
}
|
|||
|
|
width: 100%;
|
|||
|
|
font-size: 14px;
|
|||
|
|
color: ${e=>e.theme.textColor}
|
|||
|
|
`,Gr=yt.forwardRef(({placeholderText:e,id:t,value:r,onChange:i,onFileChange:s,type:a="text",multiple:u,style:f,onFocus:d,onBlur:h},g)=>{const m=y=>{const{value:v}=y.target;i&&i(t,v)};return w.jsx(S4,{children:w.jsx(E4,{type:a,placeholder:e,value:r,multiple:u,onChange:a==="file"&&s?s:m,ref:g,style:f,onFocus:d,onBlur:h})})}),Qa=e=>{const t=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,r=/^([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}$/;return t.test(e)||r.test(e)},k4=(e,t,r)=>{const i=a=>{if(typeof a!="string")throw new TypeError(`Некорректный формат IP-адреса: ${a}`);return a.split(".").slice(0,3).join(".")},s=(a,u)=>i(a)===u;try{const a=i(e),u=i(t);return a!==u?!1:(Array.isArray(r)?r:[r]).some(d=>s(d,a))}catch(a){return console.error(a),!1}},C4=({onSave:e,onClose:t})=>{const[r,i]=P.useState(""),[s,a]=P.useState(!1),u=()=>{if(!Qa(r)){a(!0);return}e&&r&&(a(!1),e(r),t())};return w.jsxs(Ss,{style:{height:"230px"},children:[w.jsx(Es,{children:w.jsx("h3",{children:"Добавление узла"})}),w.jsxs(Zo,{style:{display:"flex",flexDirection:"column",gap:"5px"},children:[w.jsx(Gr,{type:"text",placeholderText:"Введите адрес узла...",id:"newIp",value:r,onChange:(f,d)=>i(d)}),s&&w.jsx("p",{style:{color:"red",marginTop:"5px"},children:"Некорректный адрес узла"})]}),w.jsxs(ei,{children:[w.jsx(at,{type:"button",size:"small",title:"Отмена",onClick:t}),w.jsx(at,{type:"submit",size:"small",title:"Сохранить",onClick:u})]})]})},_4=({onClose:e})=>{const{ipAddress:t}=Hn(),{isAdmin:r,setAdmin:i}=Iu(),s=uv(),[a,u]=P.useState(!1),[f,d]=P.useState({message:"",status:!1}),[h,g]=P.useState({username:"operator",password:""}),m=(S,E)=>{g(k=>({...k,[S]:E}))},y=async S=>{try{(await Ln.login(t,S)).status===200?(await s(),u(!1),d(k=>({...k,message:"Успешный вход",status:!0})),await new Promise(k=>setTimeout(k,3e3)),e()):u(!0)}catch(E){console.error("Error:",E)}},v=async()=>{await Ln.logout(t),await s(),d(S=>({...S,message:"Успешный выход",status:!0})),await new Promise(S=>setTimeout(S,3e3)),e()};return w.jsx(Ss,{style:r?{height:"unset"}:{height:"250px"},children:f.status?w.jsxs(Ss,{style:{display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column",marginTop:"15px"},children:[w.jsx(Ot,{name:Le[8],width:"50",height:"50"}),w.jsx("h3",{children:f.message}),w.jsx("p",{style:{fontSize:"12px"},children:"Это окно можно закрыть, либо оно пропадёт само"}),w.jsx(at,{size:"small",title:"Закрыть",onClick:e,style:{width:"30%"}})]}):r?w.jsxs(w.Fragment,{children:[w.jsx(Es,{children:w.jsx("h3",{children:"Переключиться на ограниченный доступ"})}),w.jsx(Zo,{children:w.jsx("p",{children:"В данном режиме доступа ограничиваются полномочия администратора."})}),w.jsxs(ei,{children:[w.jsx(at,{size:"small",title:"Отмена",onClick:e}),w.jsx(at,{size:"small",title:"Ограничить доступ",onClick:v})]})]}):w.jsxs(w.Fragment,{children:[w.jsx(Es,{children:w.jsx("h3",{children:"Получение прав доступа"})}),w.jsxs(Zo,{style:{display:"flex",flexDirection:"column",gap:"10px"},children:[w.jsx("h3",{style:{marginLeft:"5px",fontSize:"14px"},children:"Включить административный доступ"}),w.jsx(Gr,{type:"password",placeholderText:"Введите пароль администратора...",id:"password",value:h.password,onChange:(S,E)=>m(S,E)}),a&&w.jsx("p",{style:{color:"red",marginLeft:"10px",fontSize:"14px",textAlign:"right"},children:"Неверный пароль оператора"})]}),w.jsxs(ei,{children:[w.jsx(at,{size:"small",title:"Отмена",onClick:e}),w.jsx(at,{size:"small",title:"Отправить",onClick:()=>y(h)})]})]})})},rn={1:"ipConfirm",2:"loader",3:"connectionError",4:"addDevice",5:"sudo"};function N4({isOpen:e,type:t,data:r}){cons
|
|||
|
|
width: 100%;
|
|||
|
|
height: 100%;
|
|||
|
|
display: flex;
|
|||
|
|
justify-content: center;
|
|||
|
|
align-items: center;
|
|||
|
|
background-color: ${e=>e.theme.background};
|
|||
|
|
background-image: url('./assets/images/back1.svg');
|
|||
|
|
background-size: 100%;
|
|||
|
|
background-repeat: no-repeat;
|
|||
|
|
background-position: bottom;
|
|||
|
|
`,P4=oe.div`
|
|||
|
|
display: flex;
|
|||
|
|
flex-direction: column;
|
|||
|
|
justify-content: center;
|
|||
|
|
align-items: center;
|
|||
|
|
gap: 52px;
|
|||
|
|
margin-bottom: 100px;
|
|||
|
|
`,R4=oe.div`
|
|||
|
|
display: flex;
|
|||
|
|
gap: 75px;
|
|||
|
|
flex-direction: column;
|
|||
|
|
`,T4=oe.div`
|
|||
|
|
display: flex;
|
|||
|
|
gap: 15px;
|
|||
|
|
flex-direction: column;
|
|||
|
|
`,I4=oe.div`
|
|||
|
|
display: flex;
|
|||
|
|
align-items: flex-end;
|
|||
|
|
gap: 10px;
|
|||
|
|
|
|||
|
|
h1{
|
|||
|
|
font-size: 52px;
|
|||
|
|
}
|
|||
|
|
`,j4=()=>{const{setWorkModule:e}=Zr();return w.jsx(b4,{children:w.jsxs(P4,{className:"unselectable",children:[w.jsx(I4,{children:w.jsx("img",{src:"./assets/images/logo.svg",alt:"",style:{width:"152px"}})}),w.jsx(R4,{children:w.jsxs(T4,{children:[w.jsx(at,{title:"Настройки сети",icon:Le[3],iconSize:{width:"32",height:"32"},onClick:()=>e(bt[3])}),w.jsx(at,{title:"О программе",icon:Le[4],iconSize:{width:"32",height:"32"},onClick:()=>e(bt[4])})]})})]})})},Nv=Bn()(e=>({isNullPos:!1,setNullPos:t=>e({isNullPos:t})}));function et(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let r=0,i;r<e.length;r++)(i=et(e[r]))!==""&&(t+=(t&&" ")+i);else for(let r in e)e[r]&&(t+=(t&&" ")+r);return t}var $4={value:()=>{}};function zu(){for(var e=0,t=arguments.length,r={},i;e<t;++e){if(!(i=arguments[e]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new Ja(r)}function Ja(e){this._=e}function A4(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",s=r.indexOf(".");if(s>=0&&(i=r.slice(s+1),r=r.slice(0,s)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}Ja.prototype=zu.prototype={constructor:Ja,on:function(e,t){var r=this._,i=A4(e+"",r),s,a=-1,u=i.length;if(arguments.length<2){for(;++a<u;)if((s=(e=i[a]).type)&&(s=M4(r[s],e.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<u;)if(s=(e=i[a]).type)r[s]=T0(r[s],e.name,t);else if(t==null)for(s in r)r[s]=T0(r[s],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new Ja(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var r=new Array(s),i=0,s,a;i<s;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],i=0,s=a.length;i<s;++i)a[i].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],s=0,a=i.length;s<a;++s)i[s].value.apply(t,r)}};function M4(e,t){for(var r=0,i=e.length,s;r<i;++r)if((s=e[r]).name===t)return s.value}function T0(e,t,r){for(var i=0,s=e.length;i<s;++i)if(e[i].name===t){e[i]=$4,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var Ud="http://www.w3.org/1999/xhtml";const I0={svg:"http://www.w3.org/2000/svg",xhtml:Ud,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Fu(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),I0.hasOwnProperty(t)?{space:I0[t],local:e}:e}function L4(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Ud&&t.documentElement.namespaceURI===Ud?t.createElement(e):t.createElementNS(r,e)}}function D4(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function bv(e){var t=Fu(e);return(t.local?D4:L4)(t)}function O4(){}function Th(e){return e==null?O4:function(){return this.querySelector(e)}}function z4(e){typeof e!="function"&&(e=Th(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],u=a.length,f=i[s]=new Array(u),d,h,g=0;g<u;++g)(d=a[g])&&(h=e.call(d,d.__data__,g,a))&&("__data__"in d&&(h.__data__=d.__data__),f[g]=h);return new zt(i,this._parents)}function F4(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function B4(){return[]}function Pv(e){return e==null?B4:function(){return this.querySelectorAll(e)}}function H4(e){return function(){return F4(e.apply(this,arguments))}}function V4(e){typeof e=="function"?e=H4(e):e=Pv(e);for(var t=this._groups,r=t.length,i=[],s=[],a=0;a<r;++a)for(var u=t[a],f=u.length,d,h=0;h<f;++h)(d=u[h])&&(i.push(e.call(d,d.__data__,h,u)),s.push(d));return new zt(i,s)}function Rv(e){return function(){return this.matches(e)}}function Tv(e){return function(t){return t.matches(e)}}var U4=Array.prototype.find;function W4(e){return function(){return U4.call(this.children,e)}}function q4(){return this.firstElementChild}function Y4(e){return this.select(e==null?q4:
|
|||
|
|
* @license React
|
|||
|
|
* use-sync-external-store-shim.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 sy;function Z5(){if(sy)return xd;sy=1;var e=As();function t(m,y){return m===y&&(m!==0||1/m===1/y)||m!==m&&y!==y}var r=typeof Object.is=="function"?Object.is:t,i=e.useState,s=e.useEffect,a=e.useLayoutEffect,u=e.useDebugValue;function f(m,y){var v=y(),S=i({inst:{value:v,getSnapshot:y}}),E=S[0].inst,k=S[1];return a(function(){E.value=v,E.getSnapshot=y,d(E)&&k({inst:E})},[m,v,y]),s(function(){return d(E)&&k({inst:E}),m(function(){d(E)&&k({inst:E})})},[m]),u(v),v}function d(m){var y=m.getSnapshot;m=m.value;try{var v=y();return!r(m,v)}catch{return!0}}function h(m,y){return y()}var g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:f;return xd.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:g,xd}var ly;function eR(){return ly||(ly=1,yd.exports=Z5()),yd.exports}/**
|
|||
|
|
* @license React
|
|||
|
|
* use-sync-external-store-shim/with-selector.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 ay;function tR(){if(ay)return md;ay=1;var e=As(),t=eR();function r(h,g){return h===g&&(h!==0||1/h===1/g)||h!==h&&g!==g}var i=typeof Object.is=="function"?Object.is:r,s=t.useSyncExternalStore,a=e.useRef,u=e.useEffect,f=e.useMemo,d=e.useDebugValue;return md.useSyncExternalStoreWithSelector=function(h,g,m,y,v){var S=a(null);if(S.current===null){var E={hasValue:!1,value:null};S.current=E}else E=S.current;S=f(function(){function C(L){if(!R){if(R=!0,N=L,L=y(L),v!==void 0&&E.hasValue){var j=E.value;if(v(j,L))return b=j}return b=L}if(j=b,i(N,L))return j;var G=y(L);return v!==void 0&&v(j,G)?j:(N=L,b=G)}var R=!1,N,b,M=m===void 0?null:m;return[function(){return C(g())},M===null?void 0:function(){return C(M())}]},[g,m,y,v]);var k=s(h,S[0],S[1]);return u(function(){E.hasValue=!0,E.value=k},[k]),d(k),k},md}var uy;function nR(){return uy||(uy=1,gd.exports=tR()),gd.exports}var rR=nR();const oR=rt(rR),iR={},cy=e=>{let t;const r=new Set,i=(g,m)=>{const y=typeof g=="function"?g(t):g;if(!Object.is(y,t)){const v=t;t=m??(typeof y!="object"||y===null)?y:Object.assign({},t,y),r.forEach(S=>S(t,v))}},s=()=>t,d={setState:i,getState:s,getInitialState:()=>h,subscribe:g=>(r.add(g),()=>r.delete(g)),destroy:()=>{(iR?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},h=t=e(i,s,d);return d},sR=e=>e?cy(e):cy,{useDebugValue:lR}=yt,{useSyncExternalStoreWithSelector:aR}=oR,uR=e=>e;function j1(e,t=uR,r){const i=aR(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);return lR(i),i}const fy=(e,t)=>{const r=sR(e),i=(s,a=t)=>j1(r,s,a);return Object.assign(i,r),i},cR=(e,t)=>e?fy(e,t):fy;function Ge(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[i,s]of e)if(!Object.is(s,t.get(i)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const i of e)if(!t.has(i))return!1;return!0}const r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(const i of r)if(!Object.prototype.hasOwnProperty.call(t,i)||!Object.is(e[i],t[i]))return!1;return!0}const Gu=P.createContext(null),fR=Gu.Provider,$1=Vn.error001();function Ie(e,t){const r=P.useContext(Gu);if(r===null)throw new Error($1);return j1(r,e,t)}function He(){const e=P.useContext(Gu);if(e===null)throw new Error($1);return P.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const dy={display:"none"},dR={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},A1="react-flow__node-desc",M1="react-flow__edge-desc",hR="react-flow__aria-live",pR=e=>e.ariaLiveMessage;function gR({rfId:e}){const t=Ie(pR);return w.jsx("div",{id:`${hR}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:dR,children:t})}function mR({rfId:e,disableKeyboardA11y:t}){return w.jsxs(w.Fragment,{children:[w.jsxs("div",{id:`${A1}-${e}`,style:dy,children:["Press enter or space to select a node.",!t&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "]}),w.jsx("div",{id:`${M1}-${e}`,style:dy,children:"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."}),!t&&w.jsx(gR,{rfId:e})]})}const yR=e=>e.userSelectionActive?"none":"all";function Hh({position:e="top-left",children:t,className:r,style:i,...s}){const a=Ie(yR),u=`${e}`.split("-");return w.jsx("div",{className:et(["react-flow__panel",r,...u]),style:{...i,pointerEvents:a},...s,children:t})}function xR({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:w.jsx(Hh,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:w.jsx("a",{href:"
|
|||
|
|
`).replace(`
|
|||
|
|
|
|||
|
|
`,`
|
|||
|
|
+`).split(`
|
|||
|
|
`)),g=h.reduce((m,y)=>m.concat(...y),[]);return[h,g]}return[[],[]]},[e]);return P.useEffect(()=>{const d=(t==null?void 0:t.target)||my;if(e!==null){const h=y=>{if(s.current=y.ctrlKey||y.metaKey||y.shiftKey,(!s.current||s.current&&!t.actInsideInputWithModifier)&&th(y))return!1;const S=xy(y.code,f);a.current.add(y[S]),yy(u,a.current,!1)&&(y.preventDefault(),i(!0))},g=y=>{if((!s.current||s.current&&!t.actInsideInputWithModifier)&&th(y))return!1;const S=xy(y.code,f);yy(u,a.current,!0)?(i(!1),a.current.clear()):a.current.delete(y[S]),y.key==="Meta"&&a.current.clear(),s.current=!1},m=()=>{a.current.clear(),i(!1)};return d==null||d.addEventListener("keydown",h),d==null||d.addEventListener("keyup",g),window.addEventListener("blur",m),window.addEventListener("contextmenu",m),()=>{d==null||d.removeEventListener("keydown",h),d==null||d.removeEventListener("keyup",g),window.removeEventListener("blur",m),window.removeEventListener("contextmenu",m)}}},[e,i]),r}function yy(e,t,r){return e.filter(i=>r||i.length===t.size).some(i=>i.every(s=>t.has(s)))}function xy(e,t){return t.includes(e)?"code":"key"}const RR=()=>{const e=He();return P.useMemo(()=>({zoomIn:t=>{const{panZoom:r}=e.getState();return r?r.scaleBy(1.2,{duration:t==null?void 0:t.duration}):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:r}=e.getState();return r?r.scaleBy(1/1.2,{duration:t==null?void 0:t.duration}):Promise.resolve(!1)},zoomTo:(t,r)=>{const{panZoom:i}=e.getState();return i?i.scaleTo(t,{duration:r==null?void 0:r.duration}):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,r)=>{const{transform:[i,s,a],panZoom:u}=e.getState();return u?(await u.setViewport({x:t.x??i,y:t.y??s,zoom:t.zoom??a},{duration:r==null?void 0:r.duration}),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,r,i]=e.getState().transform;return{x:t,y:r,zoom:i}},fitView:t=>{const{nodeLookup:r,minZoom:i,maxZoom:s,panZoom:a,domNode:u}=e.getState();if(!a||!u)return Promise.resolve(!1);const f=Jd(r,t),{width:d,height:h}=Yu(u);return Zd({nodes:f,width:d,height:h,minZoom:i,maxZoom:s,panZoom:a},t)},setCenter:async(t,r,i)=>{const{width:s,height:a,maxZoom:u,panZoom:f}=e.getState(),d=typeof(i==null?void 0:i.zoom)<"u"?i.zoom:u,h=s/2-t*d,g=a/2-r*d;return f?(await f.setViewport({x:h,y:g,zoom:d},{duration:i==null?void 0:i.duration}),Promise.resolve(!0)):Promise.resolve(!1)},fitBounds:async(t,r)=>{const{width:i,height:s,minZoom:a,maxZoom:u,panZoom:f}=e.getState(),d=Dh(t,i,s,a,u,(r==null?void 0:r.padding)??.1);return f?(await f.setViewport(d,{duration:r==null?void 0:r.duration}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,r={snapToGrid:!0})=>{const{transform:i,snapGrid:s,domNode:a}=e.getState();if(!a)return t;const{x:u,y:f}=a.getBoundingClientRect(),d={x:t.x-u,y:t.y-f};return Ws(d,i,r.snapToGrid,s)},flowToScreenPosition:t=>{const{transform:r,domNode:i}=e.getState();if(!i)return t;const{x:s,y:a}=i.getBoundingClientRect(),u=d1(t,r);return{x:u.x+s,y:u.y+a}}}),[])};function D1(e,t){const r=[],i=new Map,s=[];for(const a of e)if(a.type==="add"){s.push(a);continue}else if(a.type==="remove"||a.type==="replace")i.set(a.id,[a]);else{const u=i.get(a.id);u?u.push(a):i.set(a.id,[a])}for(const a of t){const u=i.get(a.id);if(!u){r.push(a);continue}if(u[0].type==="remove")continue;if(u[0].type==="replace"){r.push({...u[0].item});continue}const f={...a};for(const d of u)TR(d,f);r.push(f)}return s.length&&s.forEach(a=>{a.index!==void 0?r.splice(a.index,0,{...a.item}):r.push({...a.item})}),r}function TR(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured??(t.measured={}),t.measured.width=e.dimensions.width,t.measured.height=e.dimensions.height,e.setAttributes&&(t.width=e.dimensions.width,t.height=e.dimensions.height)),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function O1(e,t){return D1(e,t)}function Vh(e,t){return D1(e,t)}function Vr(e,t){return{id:e,type:"select",select
|
|||
|
|
M${G.x},${G.y}h${G.width}v${G.height}h${-G.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}dw.displayName="MiniMap";P.memo(dw);function SI({nodeId:e,position:t,variant:r=ys.Handle,className:i,style:s={},children:a,color:u,minWidth:f=10,minHeight:d=10,maxWidth:h=Number.MAX_VALUE,maxHeight:g=Number.MAX_VALUE,keepAspectRatio:m=!1,shouldResize:y,onResizeStart:v,onResize:S,onResizeEnd:E}){const k=V1(),C=typeof e=="string"?e:k,R=He(),N=P.useRef(null),b=r===ys.Line?"right":"bottom-right",M=t??b,L=P.useRef(null);P.useEffect(()=>{if(!(!N.current||!C))return L.current||(L.current=J5({domNode:N.current,nodeId:C,getStoreItems:()=>{const{nodeLookup:Y,transform:ee,snapGrid:ne,snapToGrid:J,nodeOrigin:I,domNode:U}=R.getState();return{nodeLookup:Y,transform:ee,snapGrid:ne,snapToGrid:J,nodeOrigin:I,paneDomNode:U}},onChange:(Y,ee)=>{const{triggerNodeChanges:ne,nodeLookup:J,parentLookup:I,nodeOrigin:U}=R.getState(),F=[],q={x:Y.x,y:Y.y},A=J.get(C);if(A&&A.expandParent&&A.parentId){const O=A.origin??U,z=Y.width??A.measured.width,T=Y.height??A.measured.height,H={id:A.id,parentId:A.parentId,rect:{width:z,height:T,...p1({x:Y.x??A.position.x,y:Y.y??A.position.y},{width:z,height:T},A.parentId,J,O)}},Z=Bh([H],J,I,U);F.push(...Z),q.x=Y.x?Math.max(O[0]*z,Y.x):void 0,q.y=Y.y?Math.max(O[1]*T,Y.y):void 0}if(q.x!==void 0&&q.y!==void 0){const O={id:C,type:"position",position:{...q}};F.push(O)}if(Y.width!==void 0&&Y.height!==void 0){const O={id:C,type:"dimensions",resizing:!0,setAttributes:!0,dimensions:{width:Y.width,height:Y.height}};F.push(O)}for(const O of ee){const z={...O,type:"position"};F.push(z)}ne(F)},onEnd:()=>{const Y={id:C,type:"dimensions",resizing:!1};R.getState().triggerNodeChanges([Y])}})),L.current.update({controlPosition:M,boundaries:{minWidth:f,minHeight:d,maxWidth:h,maxHeight:g},keepAspectRatio:m,onResizeStart:v,onResize:S,onResizeEnd:E,shouldResize:y}),()=>{var Y;(Y=L.current)==null||Y.destroy()}},[M,f,d,h,g,m,v,S,E,y]);const j=M.split("-"),G=r===ys.Line?"borderColor":"backgroundColor",V=u?{...s,[G]:u}:s;return w.jsx("div",{className:et(["react-flow__resize-control","nodrag",...j,r,i]),ref:N,style:V,children:a})}P.memo(SI);const EI=oe.div`
|
|||
|
|
background-color: white;
|
|||
|
|
border: 2px ${e=>e.bordertype} ${e=>e.bordercolor};
|
|||
|
|
width: ${e=>e.width}px;
|
|||
|
|
height: ${e=>e.height}px;
|
|||
|
|
border-radius: 8px;
|
|||
|
|
display: flex;
|
|||
|
|
align-items: center;
|
|||
|
|
justify-content: center;
|
|||
|
|
visibility: visible;
|
|||
|
|
`,kI=({data:e})=>w.jsxs(EI,{width:e.style.width,height:e.style.height,bordertype:e.style.borderType,bordercolor:e.style.borderColor,children:[e.label,w.jsx(_e,{type:"target",position:ce.Right,id:"target-right",style:{right:0}})]}),CI=oe.div`
|
|||
|
|
background-color: white;
|
|||
|
|
border-radius: 50px;
|
|||
|
|
display: flex;
|
|||
|
|
align-items: center;
|
|||
|
|
justify-content: center;
|
|||
|
|
border: 2px ${e=>e.bordertype} ${e=>e.bordercolor};
|
|||
|
|
width: ${e=>e.width}px;
|
|||
|
|
height: ${e=>e.height}px;
|
|||
|
|
`,_I=({data:e})=>w.jsxs(CI,{width:e.style.width,height:e.style.height,bordertype:e.style.borderType,bordercolor:e.style.borderColor,children:[e.label,w.jsx(_e,{type:"source",position:ce.Top,id:"source-top",style:{top:0}}),w.jsx(_e,{type:"source",position:ce.Right,id:"source-right",style:{right:0}}),w.jsx(_e,{type:"source",position:ce.Bottom,id:"source-bottom",style:{bottom:0}}),w.jsx(_e,{type:"source",position:ce.Left,id:"source-left",style:{left:0}}),w.jsx(_e,{type:"target",position:ce.Top,id:"target-top",style:{top:0}}),w.jsx(_e,{type:"target",position:ce.Right,id:"target-right",style:{right:0}}),w.jsx(_e,{type:"target",position:ce.Bottom,id:"target-bottom",style:{bottom:0}}),w.jsx(_e,{type:"target",position:ce.Left,id:"target-left",style:{left:0}})]}),NI=oe.div`
|
|||
|
|
transform: skewX(-20deg);
|
|||
|
|
background-color: white;
|
|||
|
|
border-radius: 8px;
|
|||
|
|
display: flex;
|
|||
|
|
align-items: center;
|
|||
|
|
justify-content: center;
|
|||
|
|
border: 2px ${e=>e.bordertype} ${e=>e.bordercolor};
|
|||
|
|
width: ${e=>e.width}px;
|
|||
|
|
height: ${e=>e.height}px;
|
|||
|
|
|
|||
|
|
.react-flow__handle-top{
|
|||
|
|
transform: skewX(20deg);
|
|||
|
|
top: -5px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.react-flow__handle-bottom{
|
|||
|
|
transform: skewX(20deg);
|
|||
|
|
bottom: -5px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.react-flow__handle-right{
|
|||
|
|
transform: skewX(20deg);
|
|||
|
|
right: -5px;
|
|||
|
|
top: 25px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.react-flow__handle-left{
|
|||
|
|
transform: skewX(20deg);
|
|||
|
|
left: -5px;
|
|||
|
|
top: 25px;
|
|||
|
|
}
|
|||
|
|
`,bI=({data:e})=>w.jsxs(NI,{width:e.style.width,height:e.style.height,bordertype:e.style.borderType,bordercolor:e.style.borderColor,children:[e.label,w.jsx(_e,{type:"source",position:ce.Top,id:"source-top"}),w.jsx(_e,{type:"source",position:ce.Right,id:"source-right"}),w.jsx(_e,{type:"source",position:ce.Bottom,id:"source-bottom"}),w.jsx(_e,{type:"source",position:ce.Left,id:"source-left"}),w.jsx(_e,{type:"target",position:ce.Top,id:"target-top"}),w.jsx(_e,{type:"target",position:ce.Right,id:"target-right"}),w.jsx(_e,{type:"target",position:ce.Bottom,id:"target-bottom"}),w.jsx(_e,{type:"target",position:ce.Left,id:"target-left"})]}),PI=oe.div`
|
|||
|
|
background-color: white;
|
|||
|
|
border-radius: 100%;
|
|||
|
|
display: flex;
|
|||
|
|
align-items: center;
|
|||
|
|
justify-content: center;
|
|||
|
|
border: 2px ${e=>e.bordertype} ${e=>e.bordercolor};
|
|||
|
|
width: ${e=>e.width}px;
|
|||
|
|
height: ${e=>e.height}px;
|
|||
|
|
`,RI=({data:e})=>w.jsxs(PI,{width:e.style.width,height:e.style.height,bordertype:e.style.borderType,bordercolor:e.style.borderColor,children:[e.label,w.jsx(_e,{type:"source",position:ce.Top,id:"source-top",style:{top:0}}),w.jsx(_e,{type:"source",position:ce.Right,id:"source-right",style:{right:0}}),w.jsx(_e,{type:"source",position:ce.Bottom,id:"source-bottom",style:{bottom:0}}),w.jsx(_e,{type:"source",position:ce.Left,id:"source-left",style:{left:0}}),w.jsx(_e,{type:"target",position:ce.Top,id:"target-top",style:{top:0}}),w.jsx(_e,{type:"target",position:ce.Right,id:"target-right",style:{right:0}}),w.jsx(_e,{type:"target",position:ce.Bottom,id:"target-bottom",style:{bottom:0}}),w.jsx(_e,{type:"target",position:ce.Left,id:"target-left",style:{left:0}})]}),TI=oe.div`
|
|||
|
|
position: relative;
|
|||
|
|
width: ${e=>e.width}px;
|
|||
|
|
height: ${e=>e.height}px;
|
|||
|
|
`,II=oe.div`
|
|||
|
|
clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
|
|||
|
|
width: ${e=>e.width-6}px;
|
|||
|
|
height: ${e=>e.height-4}px;
|
|||
|
|
background-color: white;
|
|||
|
|
display: flex;
|
|||
|
|
align-items: center;
|
|||
|
|
justify-content: center;
|
|||
|
|
`,jI=oe.div`
|
|||
|
|
clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
|
|||
|
|
width: ${e=>e.width}px;
|
|||
|
|
height: ${e=>e.height}px;
|
|||
|
|
background-color: ${e=>e.bordercolor};
|
|||
|
|
display: flex;
|
|||
|
|
align-items: center;
|
|||
|
|
justify-content: center;
|
|||
|
|
`,$I=({data:e})=>(Math.max(e.style.width,e.style.height),w.jsxs(TI,{width:e.style.width,height:e.style.height,children:[w.jsx(jI,{width:e.style.width,height:e.style.height,bordercolor:e.style.borderColor,children:w.jsx(II,{width:e.style.width,height:e.style.height,children:e.label})}),w.jsxs("div",{style:{width:"100%",height:"100%"},children:[w.jsx(_e,{type:"source",position:ce.Top,id:"source-top"}),w.jsx(_e,{type:"source",position:ce.Right,id:"source-right"}),w.jsx(_e,{type:"source",position:ce.Bottom,id:"source-bottom"}),w.jsx(_e,{type:"source",position:ce.Left,id:"source-left"}),w.jsx(_e,{type:"target",position:ce.Top,id:"target-top"}),w.jsx(_e,{type:"target",position:ce.Right,id:"target-right"}),w.jsx(_e,{type:"target",position:ce.Bottom,id:"target-bottom"}),w.jsx(_e,{type:"target",position:ce.Left,id:"target-left"})]})]})),AI=oe.div`
|
|||
|
|
border: 2px ${e=>e.$bordertype} ${e=>e.$bordercolor};
|
|||
|
|
width: ${e=>e.$width}px;
|
|||
|
|
height: ${e=>typeof e.$height=="number"?`${e.$height}px`:e.$height};
|
|||
|
|
border-radius: 12px;
|
|||
|
|
display: flex;
|
|||
|
|
align-items: center;
|
|||
|
|
justify-content: center;
|
|||
|
|
visibility: visible;
|
|||
|
|
`,MI=oe.div`
|
|||
|
|
position: absolute;
|
|||
|
|
top: -25px;
|
|||
|
|
left: 10px;
|
|||
|
|
display: flex;
|
|||
|
|
justify-content: space-between;
|
|||
|
|
align-items: center;
|
|||
|
|
width: ${e=>e.$width}px;
|
|||
|
|
gap: 5px;
|
|||
|
|
padding-right: 10px;
|
|||
|
|
|
|||
|
|
p{
|
|||
|
|
margin: 0;
|
|||
|
|
}
|
|||
|
|
`,LI=oe.p`
|
|||
|
|
padding: unset;
|
|||
|
|
background: none;
|
|||
|
|
color: ${e=>e.theme.textColor};
|
|||
|
|
margin-right: 15px !important;
|
|||
|
|
&:hover{
|
|||
|
|
background: none;
|
|||
|
|
}
|
|||
|
|
`,DI=({data:e})=>{const[t,r]=P.useState(!1),{groups:i,setGroups:s}=Dx(),a=()=>{const u=!t;r(u);const f=i.map(d=>d.id===e.id?{...d,click:u}:d);i.some(d=>d.id===e.id)||f.push({id:e.id,click:u}),s(f)};return w.jsx(AI,{$width:e.style.width,$height:Number(e.style.height),$bordertype:e.style.borderType,$bordercolor:e.style.borderColor,children:w.jsxs(MI,{$bordertype:e.style.borderType,$bordercolor:e.style.borderColor,$width:e.style.width,children:[w.jsx("p",{children:e.label}),w.jsx(LI,{onClick:a,children:t?"Развернуть":"Свернуть"})]})})},OI=oe.div`
|
|||
|
|
background-color: ${e=>e.theme.primary};
|
|||
|
|
border: 2px ${e=>e.$bordertype} ${e=>e.$bordercolor};
|
|||
|
|
min-width: ${e=>e.$width}px;
|
|||
|
|
height: ${e=>typeof e.$height=="number"?`${e.$height}px`:e.$height};
|
|||
|
|
border-radius: 8px;
|
|||
|
|
display: flex;
|
|||
|
|
flex-direction: column;
|
|||
|
|
gap: 10px;
|
|||
|
|
visibility: visible;
|
|||
|
|
|
|||
|
|
p{
|
|||
|
|
margin: 0;
|
|||
|
|
}
|
|||
|
|
`,zI=oe.div`
|
|||
|
|
display: flex;
|
|||
|
|
justify-content: space-between;
|
|||
|
|
align-items: center;
|
|||
|
|
background: ${e=>e.$backgroundcolor};
|
|||
|
|
border-top-left-radius: 8px;
|
|||
|
|
border-top-right-radius: 8px;
|
|||
|
|
color: white;
|
|||
|
|
padding: 15px;
|
|||
|
|
height: ${e=>e.$height?e.$height:"unset"};
|
|||
|
|
|
|||
|
|
img{
|
|||
|
|
width: 20px
|
|||
|
|
}
|
|||
|
|
`,FI=oe.p`
|
|||
|
|
font-size: 18px;
|
|||
|
|
`,BI=oe.p`
|
|||
|
|
font-size: 14px;
|
|||
|
|
|
|||
|
|
|
|||
|
|
img{
|
|||
|
|
width: 20px;
|
|||
|
|
height: 20px;
|
|||
|
|
}
|
|||
|
|
`,HI=oe.div`
|
|||
|
|
display: flex;
|
|||
|
|
flex-direction: column;
|
|||
|
|
gap: 15px;
|
|||
|
|
padding: 15px;
|
|||
|
|
`,Ay=oe.div`
|
|||
|
|
display: flex;
|
|||
|
|
gap: 5px;
|
|||
|
|
`,VI=oe.div`
|
|||
|
|
display: flex;
|
|||
|
|
justify-content: space-between;
|
|||
|
|
background: ${e=>e.theme.secondary};
|
|||
|
|
border-radius: 8px;
|
|||
|
|
// box-shadow: 0px 0px 15px 2px rgba(0, 0, 0, 0.1);
|
|||
|
|
width: 100%;
|
|||
|
|
|
|||
|
|
.networkNode-row{
|
|||
|
|
padding: 10px;
|
|||
|
|
}
|
|||
|
|
`,UI=oe.div`
|
|||
|
|
display: flex;
|
|||
|
|
flex-direction: column;
|
|||
|
|
align-items: center;
|
|||
|
|
gap: 5px;
|
|||
|
|
width: 100%;
|
|||
|
|
|
|||
|
|
.networkNode-label{
|
|||
|
|
font-size: 10px;
|
|||
|
|
width: 100%;
|
|||
|
|
text-align: left;
|
|||
|
|
margin-left: 15px;
|
|||
|
|
}
|
|||
|
|
`,WI=({signal:e})=>{const t=P.useRef(null);return P.useEffect(()=>{const r={"--st1-color":e>=1?"white":"black","--st2-color":e>=2?"white":"black","--st3-color":e>=3?"white":"black","--st4-color":e>=4?"white":"black","--st5-color":e===5?"white":"black"};t.current&&Object.entries(r).forEach(([i,s])=>{var a;(a=t.current)==null||a.style.setProperty(i,s)})},[e]),w.jsxs("svg",{ref:t,version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 296 235",xmlSpace:"preserve",width:"20px",height:"20px",children:[w.jsx("style",{type:"text/css",children:`
|
|||
|
|
.st1 { fill-rule: evenodd; clip-rule: evenodd; fill: var(--st1-color, white); }
|
|||
|
|
.st2 { fill-rule: evenodd; clip-rule: evenodd; fill: var(--st2-color, white); }
|
|||
|
|
.st3 { fill-rule: evenodd; clip-rule: evenodd; fill: var(--st3-color, white); }
|
|||
|
|
.st4 { fill-rule: evenodd; clip-rule: evenodd; fill: var(--st4-color, white); }
|
|||
|
|
.st5 { fill-rule: evenodd; clip-rule: evenodd; fill: var(--st5-color, white); }
|
|||
|
|
`}),w.jsxs("g",{children:[w.jsx("polygon",{className:"st1",points:"47,138 47,188 0,188 0,164"}),w.jsx("polygon",{className:"st2",points:"109,104 109,188 62,188 62,130"}),w.jsx("polygon",{className:"st3",points:"171,69 171,188 124,188 124,95"}),w.jsx("polygon",{className:"st4",points:"234,35 234,188 187,188 187,61"}),w.jsx("polygon",{className:"st5",points:"296,0 296,188 249,188 249,26"})]})]})},qI=({data:e})=>{const[t,r]=P.useState(1);return P.useEffect(()=>{const i=Number(e.networkData.strength);switch(!0){case i<20:r(1);break;case i<40:r(2);break;case i<60:r(3);break;case i<80:r(4);break;default:r(5);break}},[e.networkData.strength]),w.jsxs(OI,{$width:e.style.width,$height:Number(e.style.height),$bordertype:e.style.borderType,$bordercolor:e.style.borderColor,children:[w.jsxs(zI,{$backgroundcolor:e.style.backgroundColor,...e.visible?{}:{$height:"100%"},children:[e.networkData.type=="WIFI"&&w.jsx("img",{src:"./assets/images/wifi.svg",alt:""}),e.networkData.type=="ETHERNET"&&w.jsx("img",{src:"./assets/images/ethernet.svg",alt:""}),e.networkData.type=="TUN"&&w.jsx("img",{src:"./assets/images/vpn.svg",alt:""}),w.jsx(FI,{children:e.networkData.device}),e.networkData.type=="WIFI"&&e.networkData.state==="Подключено"?w.jsx(BI,{children:w.jsx(WI,{signal:t})}):w.jsx("div",{})]}),e.visible&&w.jsx(HI,{children:w.jsxs(UI,{children:[w.jsx("p",{className:"networkNode-label",children:"Конфигурация"}),w.jsxs(VI,{children:[w.jsxs(Ay,{className:"networkNode-row",children:[w.jsx("p",{children:"MAC:"}),w.jsx("p",{children:e.networkData.mac})]}),w.jsxs(Ay,{className:"networkNode-row",children:[w.jsx("p",{children:"MTU:"}),w.jsx("p",{children:e.networkData.mtu})]})]})]})}),e.networkData.connection!=="unknown"&&w.jsx(_e,{type:"source",position:ce.Left,id:`g0_${e.networkData.id}-source-left`,style:{left:0}})]})},YI=oe.div`
|
|||
|
|
width: ${e=>e.$width}px;
|
|||
|
|
height: ${e=>typeof e.$height=="number"?`${e.$height}px`:e.$height};
|
|||
|
|
`,XI=({data:e})=>w.jsx(YI,{$width:e.style.width,$height:Number(e.style.height)}),GI=oe.div`
|
|||
|
|
background-color: ${e=>e.theme.secondary};
|
|||
|
|
display: flex;
|
|||
|
|
flex-direction: column;
|
|||
|
|
width: ${e=>e.$width}px;
|
|||
|
|
height: ${e=>typeof e.$height=="number"?`${e.$height}px`:e.$height};
|
|||
|
|
// box-shadow: 0px 0px 15px 2px rgba(0, 0, 0, 0.1);
|
|||
|
|
border-radius: 8px;
|
|||
|
|
|
|||
|
|
p{
|
|||
|
|
margin: 0;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
img{
|
|||
|
|
width: 15px;
|
|||
|
|
height: 15px;
|
|||
|
|
}
|
|||
|
|
`,KI=oe.div`
|
|||
|
|
background: ${e=>e.theme.accent};
|
|||
|
|
border-top-left-radius: 6px;
|
|||
|
|
border-top-right-radius: 6px;
|
|||
|
|
color: white;
|
|||
|
|
display: flex;
|
|||
|
|
justify-content: space-between;
|
|||
|
|
padding: 10px;
|
|||
|
|
|
|||
|
|
`,QI=oe.div`
|
|||
|
|
display: flex;
|
|||
|
|
flex-direction: column;
|
|||
|
|
justify-content: space-between;
|
|||
|
|
height: 100%;
|
|||
|
|
padding: 10px;
|
|||
|
|
|
|||
|
|
.row{
|
|||
|
|
height: 24px;
|
|||
|
|
|
|||
|
|
.row-label{
|
|||
|
|
flex: 1;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.row-text{
|
|||
|
|
flex: 3;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
p{
|
|||
|
|
|
|||
|
|
text-wrap: nowrap;
|
|||
|
|
text-align: left;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
`,cs=oe.div`
|
|||
|
|
display: flex;
|
|||
|
|
align-items: center;
|
|||
|
|
gap: 5px;
|
|||
|
|
|
|||
|
|
p{
|
|||
|
|
margin: 0;
|
|||
|
|
}
|
|||
|
|
`,JI={auto:"DHCP",manual:"Static"},ZI=({data:e})=>{const{toggleEditingMode:t}=Lx(),[r,i]=P.useState(!1),{openModal:s}=io(),[a,u]=P.useState({currentIp:e.ipData.ipAdress,newIp:e.ipData.ipAdress,currentGate:e.ipData.ipGate,newGate:e.ipData.ipGate,currentDns:e.ipData.ipDns,newDns:e.ipData.ipDns,device:e.interfaceData.device,connection:e.interfaceData.connection,version:e.ipData.ipVersion,prefix:0}),f=()=>{t()},d=()=>{t()},h=()=>{r?(i(!1),u(v=>({...v,newIp:e.ipData.ipAdress,newGate:e.ipData.ipGate,newDns:e.ipData.ipDns}))):i(!0)},g=(v,S)=>{if(v==="newDns"){const E=S.split(",").map(k=>k.trim());u(k=>({...k,[v]:E}))}else u(E=>({...E,[v]:S}))};function m(v,S){if(S==="6")return 64;const E=parseInt(v.split(".")[0],10);return E>=0&&E<=127?8:E>=128&&E<=191?16:(E>=192&&E<=223,24)}const y=()=>{if(!Qa(a.newIp)||!Qa(a.newGate)||!a.newDns.every(S=>Qa(S))){alert("Один или несколько IP-адресов некорректны.");return}if(!k4(a.newIp,a.newGate,a.newDns)){alert("Адрес, шлюз и хотя бы один DNS должны находиться в одной подсети.");return}const v=m(a.newIp,e.ipData.ipVersion);u(S=>({...S,prefix:v})),s(rn[1],{...a,prefix:v}),i(!1)};return w.jsx(w.Fragment,{children:w.jsxs(GI,{$width:e.style.width,$height:Number(e.style.height),$bordertype:e.style.borderType,$bordercolor:e.style.borderColor,children:[w.jsxs(KI,{children:[w.jsxs(cs,{children:[w.jsx("p",{children:"Метод:"}),w.jsx("p",{children:JI[e.ipData.ipType]})]}),r?w.jsxs(cs,{children:[w.jsx(Ot,{name:Le[8],onClick:y,width:"18",height:"18",setColor:"white"}),w.jsx(Ot,{name:Le[9],onClick:h,width:"18",height:"18",setColor:"white"})]}):w.jsx(Ot,{name:Le[7],onClick:h,width:"18",height:"18",setColor:"white"})]}),w.jsxs(QI,{children:[w.jsxs(cs,{className:"row",children:[w.jsxs("p",{className:"row-label",children:["IPv",e.ipData.ipVersion,"-Addr:"]}),r?w.jsx(Gr,{type:"text",placeholderText:e.ipData.ipAdress,id:"newIp",value:a.newIp,onChange:(v,S)=>g(v,S),onBlur:d,onFocus:f,style:{fontSize:"12px",padding:"4px 10px"}}):w.jsx("p",{className:"row-text",children:e.ipData.ipAdress})]}),w.jsxs(cs,{className:"row",children:[w.jsxs("p",{className:"row-label",children:["IPv",e.ipData.ipVersion,"-GW:"]}),r?w.jsx(Gr,{type:"text",placeholderText:e.ipData.ipGate,id:"newGate",value:a.newGate,onChange:(v,S)=>g(v,S),onBlur:d,onFocus:f,style:{fontSize:"12px",padding:"4px 10px"}}):w.jsx("p",{className:"row-text",children:e.ipData.ipGate})]}),w.jsxs(cs,{className:"row",children:[w.jsxs("p",{className:"row-label",children:["IPv",e.ipData.ipVersion,"-DNS:"]}),r?w.jsx(Gr,{type:"text",placeholderText:e.ipData.ipDns.join(", "),id:"newDns",value:a.newDns.join(", "),onChange:(v,S)=>g(v,S),onBlur:d,onFocus:f,style:{fontSize:"12px",padding:"4px 10px"}}):w.jsx("p",{className:"row-text",children:e.ipData.ipDns.join(", ")})]}),e.route&&w.jsxs(w.Fragment,{children:[w.jsx(_e,{type:"source",position:ce.Right,id:"source-right",style:{right:0,top:80}}),w.jsx(_e,{type:"target",position:ce.Right,id:"target-right",style:{right:0,top:80}})]})]})]})})},ej=oe.div`
|
|||
|
|
background-color: ${e=>e.theme.primary};
|
|||
|
|
border: 2px ${e=>e.$bordertype} ${e=>e.$bordercolor};
|
|||
|
|
width: ${e=>e.$width}px;
|
|||
|
|
height: ${e=>typeof e.$height=="number"?`${e.$height}px`:e.$height};
|
|||
|
|
border-radius: 8px;
|
|||
|
|
display: flex;
|
|||
|
|
align-items: center;
|
|||
|
|
justify-content: center;
|
|||
|
|
visibility: visible;
|
|||
|
|
`,tj=oe.div`
|
|||
|
|
display: flex;
|
|||
|
|
flex-direction: column;
|
|||
|
|
gap: 15px;
|
|||
|
|
|
|||
|
|
p{
|
|||
|
|
margin: 0;
|
|||
|
|
}
|
|||
|
|
`,nj=({data:e})=>w.jsxs(ej,{$width:e.style.width,$height:Number(e.style.height),$bordertype:e.style.borderType,$bordercolor:e.style.borderColor,children:[w.jsxs(tj,{children:[w.jsx("p",{children:e.label}),e.port&&w.jsx("p",{children:e.port})]}),e.port?w.jsxs(w.Fragment,{children:[w.jsx(_e,{type:"target",position:ce.Left,id:`${e.id}_target-left`,style:{left:0}}),w.jsx(_e,{type:"source",position:ce.Left,id:`${e.id}_target-left`,style:{left:0}})]}):w.jsxs(w.Fragment,{children:[w.jsx(_e,{type:"target",position:ce.Right,id:`${e.id}_target-right`,style:{right:0}}),w.jsx(_e,{type:"source",position:ce.Right,id:`${e.id}source-right`,style:{right:0}})]})]}),rj={custom:kI,pill:_I,parallelogram:bI,diamond:$I,circle:RI,nodegroup:DI,portNode:nj,network:qI,ipgroup:XI,ip:ZI},oj=(e,t)=>{let r;return e.forEach(i=>{if(i.type==="position"&&i.position){const s=i.id;s==="g0"?r={container_id:t[0].id,container_x:i.position.x,container_y:i.position.y,isOpen:!0}:s==="g1"&&(r={container_id:t[1].id,container_x:i.position.x,container_y:i.position.y,isOpen:!0})}}),r},ij=e=>{const t={};return e.forEach(r=>{t[r.container_id]=r}),Object.values(t)},sj=(e,t)=>{e.length>0&&ij(e).forEach(i=>{t&&t.readyState===WebSocket.OPEN&&i?(t.send(JSON.stringify(i)),console.log("JSON отправлен:",JSON.stringify(i)),console.log("Отправленные данные:",i)):console.log("WebSocket не открыт или нет данных для отправки")})},lj=(e,t,r,i)=>{[{container_id:1,container_x:0,container_y:0,isOpen:!0},{container_id:2,container_x:500,container_y:0,isOpen:!0}].forEach(u=>{e&&e.readyState===WebSocket.OPEN?(e.send(JSON.stringify(u)),console.log("JSON отправлен:",JSON.stringify(u)),console.log("Отправленные данные:",u)):console.log("WebSocket не открыт или нет данных для отправки")});const a=r.map(u=>u.id=="g0"?{...u,position:{x:0,y:0},positionAbsolute:{x:0,y:0}}:u.id=="g1"?{...u,position:{x:500,y:0},positionAbsolute:{x:500,y:0}}:u);i(a),t(!1)},aj=e=>{const t=[{route:!0,ipData:[]},{route:!1,ipData:[]}],r=(s,a)=>{const u=s.routes.length>0,f={ipType:s.method,ipAdress:s.address,ipGate:s.gateway,ipDns:s.dns,ipRoutese:s.routes,ipVersion:a};u?t[0].ipData.push(f):t[1].ipData.push(f)};return e.ipv4.configurations.forEach(s=>{r(s,"4")}),e.ipv6.configurations.forEach(s=>{r(s,"6")}),t.filter(s=>s.ipData.length>0)},uj=e=>{const t=[],r=[];return e&&e.map((i,s)=>{let a=[];i.interfaces.map((f,d)=>{let h=`g${s}_nw${d}`,g=`p-nw${d}`,m=`${g}_target-right`,y=`${h}-source-left`;if(s===0){const k={id:`${h}-${g}`,source:h,target:g,sourceHandle:y,targetHandle:m,type:"default"};t.push(k)}const v={device:f.name,type:f.type,mac:f.mac_address,connection:f.active_connection,mtu:f.device_mtu,state:f.device_state,strength:f.strength},S=aj(f);let E={networkData:v,ipArrays:S};a.push(E)});let u={container_x:i.container_x,container_y:i.container_y,mainData:a};r.push(u)}),{interfaces:r,edgeData:t}},cj=(e,t)=>{const r=new Map(t.map(i=>[i.id,structuredClone(i)]));return Object.entries(e).forEach(([i,s])=>{const a=r.get(i);if(!a)return;const u=s.clicked,f=20,d=s.higherOrder.map(m=>{const y=r.get(m);if(!y)return null;const v=u?60:y.data.height,S={...y,data:{...y.data,visible:!u,style:{...y.data.style,height:v}},measured:{...y.measured,height:v+4,width:y.data.style.width+4}};return r.set(m,S),S}).filter(Boolean);s.lowerOrder.forEach(m=>{const y=r.get(m);y&&(y.hidden=u)});let h=f;d.forEach(m=>{r.set(m.id,{...m,position:{...m.position,y:h}}),h+=m.measured.height+f});const g=u?h:a.data.height;r.set(i,{...a,data:{...a.data,style:{...a.data.style,height:g}},measured:{...a.measured,height:g+4}})}),Array.from(r.values())},fj=(e,t)=>{const r={};return e.forEach(i=>{const s=i.id;r[s]={higherOrder:[],lowerOrder:[],clicked:i.click},t.filter(u=>u.id.startsWith(`${s}_`)).forEach(u=>{const f=u.id;if(f.split("_").length===2){const h=f;r[s].higherOrder.push(h)}else{const h=f;r[s].lowerOrder.push(h)}})}),r},dj=(e,t)=>{const r=e.name;return t.map(s=>s.data.networkData&&s.data.networkData.device===r?{...s,data:{...s.data,networkData
|
|||
|
|
width: 100%;
|
|||
|
|
cursor: pointer;
|
|||
|
|
`,Nj=oe.div`
|
|||
|
|
padding: 10px;
|
|||
|
|
`,bj=({menuId:e})=>{const{isActive:t,collapseMenu:r}=hw(e),i=so(),s=t?i.textColor:i.active;return w.jsx(_j,{onClick:r,children:w.jsx(Nj,{children:w.jsx(Cj,{name:e,width:"30",height:"30",setColor:s})})})};var La={},Ly;function Pj(){if(Ly)return La;Ly=1;const e={width:24,height:24,body:'<path fill="currentColor" d="M20 8.69V4h-4.69L12 .69L8.69 4H4v4.69L.69 12L4 15.31V20h4.69L12 23.31L15.31 20H20v-4.69L23.31 12L20 8.69zM12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6s6 2.69 6 6s-2.69 6-6 6zm0-10c-2.21 0-4 1.79-4 4s1.79 4 4 4s4-1.79 4-4s-1.79-4-4-4z"/>'};return La.__esModule=!0,La.default=e,La}var Rj=Pj();const Tj=rt(Rj);var Da={},Dy;function Ij(){if(Dy)return Da;Dy=1;const e={width:24,height:24,body:'<path fill="currentColor" d="M20 15.31L23.31 12L20 8.69V4h-4.69L12 .69L8.69 4H4v4.69L.69 12L4 15.31V20h4.69L12 23.31L15.31 20H20v-4.69zM12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6s6 2.69 6 6s-2.69 6-6 6z"/>'};return Da.__esModule=!0,Da.default=e,Da}var jj=Ij();const $j=rt(jj);var Oa={},Oy;function Aj(){if(Oy)return Oa;Oy=1;const e={width:24,height:24,body:'<path fill="currentColor" d="M20 15.31L23.31 12L20 8.69V4h-4.69L12 .69L8.69 4H4v4.69L.69 12L4 15.31V20h4.69L12 23.31L15.31 20H20v-4.69zM12 18V6c3.31 0 6 2.69 6 6s-2.69 6-6 6z"/>'};return Oa.__esModule=!0,Oa.default=e,Oa}var Mj=Aj();const Lj=rt(Mj),Dj={[wt[1]]:Tj,[wt[2]]:$j,[wt[3]]:Lj},Oj=({name:e,width:t="24",height:r="24",setColor:i})=>{const s=so();return w.jsx(Rh,{icon:Dj[e],width:t,height:r,color:i||s.textColor})},zj=oe.div`
|
|||
|
|
width: 100%;
|
|||
|
|
cursor: pointer;
|
|||
|
|
`,Fj=oe.div`
|
|||
|
|
padding: 10px;
|
|||
|
|
color: ${e=>e.theme.text};
|
|||
|
|
`;function qh(){const e=so(),t=localStorage.getItem("theme");return w.jsx(zj,{onClick:e.toggleTheme,children:w.jsx(Fj,{children:w.jsx(Oj,{name:t,width:"30",height:"30"})})})}const Bj=oe.div`
|
|||
|
|
display: flex;
|
|||
|
|
flex-direction: column;
|
|||
|
|
align-items: center;
|
|||
|
|
justify-content: space-between;
|
|||
|
|
background-color: ${e=>e.theme.primary};
|
|||
|
|
padding: 5px 0;
|
|||
|
|
`,zy=oe.div`
|
|||
|
|
display: flex;
|
|||
|
|
flex-direction: column;
|
|||
|
|
align-items: center;
|
|||
|
|
`,Fy=oe.div`
|
|||
|
|
width: 100%;
|
|||
|
|
cursor: pointer;
|
|||
|
|
`,By=oe.div`
|
|||
|
|
padding: 10px;
|
|||
|
|
color: ${e=>e.theme.text};
|
|||
|
|
`,Hj=()=>{const{toolBar:e}=Tu(),t=e==null?void 0:e.toolSpace,{openModal:r}=io(),{isAdmin:i}=Iu(),{setWorkModule:s,workModule:a}=Zr();return w.jsxs(Bj,{children:[w.jsx(zy,{children:t&&t.map(u=>w.jsx(bj,{menuId:u.id},u.id))}),w.jsxs(zy,{children:[w.jsx(Fy,{children:w.jsx(By,{children:w.jsx(Ot,{name:i?Le[10]:Le[13],width:"30",height:"30",onClick:()=>r(rn[5])})})}),w.jsx(qh,{}),w.jsx(Fy,{children:w.jsx(By,{children:w.jsx(Ot,{name:Le[4],width:"30",height:"30",onClick:()=>a===bt[3]?s(bt[2]):s(bt[4])})})})]})]})},Vj=e=>{const{menus:t,toggleMenu:r}=FC(),i=t.find(u=>u.id===e);return{isOpen:i?i.isOpen:!1,collapseMenu:()=>{i&&r(e)}}},Uj=oe.div`
|
|||
|
|
display: flex;
|
|||
|
|
flex-direction: column;
|
|||
|
|
align-items: center;
|
|||
|
|
gap: 15px;
|
|||
|
|
padding: 20px;
|
|||
|
|
|
|||
|
|
p{
|
|||
|
|
margin: 0;
|
|||
|
|
}
|
|||
|
|
`,Wj=oe.div`
|
|||
|
|
padding: 5px 0;
|
|||
|
|
width: 100%;
|
|||
|
|
text-align: center;
|
|||
|
|
border-bottom: 1px solid ${e=>e.theme.text};
|
|||
|
|
`,Hy=oe.div`
|
|||
|
|
border-radius: 8px;
|
|||
|
|
border: 2px solid ${e=>e.theme.accent};
|
|||
|
|
display: flex;
|
|||
|
|
flex-direction: column;
|
|||
|
|
width: 100%;
|
|||
|
|
|
|||
|
|
.paddingP{
|
|||
|
|
padding: 7px 5px;
|
|||
|
|
}
|
|||
|
|
`,Vy=oe.div`
|
|||
|
|
padding: 5px 8px;
|
|||
|
|
background: ${e=>e.theme.accent};
|
|||
|
|
display: flex;
|
|||
|
|
justify-content: space-between;
|
|||
|
|
align-items: center;
|
|||
|
|
color: white;
|
|||
|
|
cursor: pointer;
|
|||
|
|
`,qj=oe.div`
|
|||
|
|
font-size: 24px;
|
|||
|
|
cursor: pointer;
|
|||
|
|
border-radius: 8px;
|
|||
|
|
border: 2px dotted ${e=>e.theme.accent};
|
|||
|
|
width: 100%;
|
|||
|
|
text-align: center;
|
|||
|
|
padding: 5px 0;
|
|||
|
|
`,Yj=oe.div`
|
|||
|
|
display: flex;
|
|||
|
|
gap: 3px;
|
|||
|
|
align-items: center;
|
|||
|
|
`,Xj=oe.div`
|
|||
|
|
width: 100%;
|
|||
|
|
display: flex;
|
|||
|
|
flex-direction: column;
|
|||
|
|
gap: 15px;
|
|||
|
|
`,Gj=oe.div`
|
|||
|
|
display: flex;
|
|||
|
|
justify-content: space-between;
|
|||
|
|
align-items: center;
|
|||
|
|
cursor: pointer;
|
|||
|
|
|
|||
|
|
.hControl{
|
|||
|
|
font-size: 20px;
|
|||
|
|
cursor: pointer;
|
|||
|
|
}
|
|||
|
|
`,Kj=oe.div`
|
|||
|
|
${e=>e.$isactive==="true"&&"display: flex;"}
|
|||
|
|
${e=>e.$isactive==="false"&&"display: none;"}
|
|||
|
|
flex-direction: column;
|
|||
|
|
align-items: center;
|
|||
|
|
gap: 15px;
|
|||
|
|
`,Qj=()=>{const{openModal:e}=io(),{setIpAddress:t,ipAddress:r}=Hn(),{devices:i,addDevice:s,deleteDevice:a}=$d(),{isOpen:u,collapseMenu:f}=Vj(Ox[1]),{setWorkModule:d}=Zr(),[h,g]=P.useState({address:"localhost",hostname:""}),m=async k=>new Promise(C=>{const R=new WebSocket(`wss://${k}:8001/api/v1`),N=setTimeout(()=>{R.close(),C(!1)},500);R.onopen=()=>{clearTimeout(N),R.close(),C(!0)},R.onerror=()=>{clearTimeout(N),R.close(),C(!1)}});P.useEffect(()=>{(async()=>{let C=await Ln.getHostname();C.status===200&&g(R=>({...R,hostname:C.data.hostname}))})()},[]);const y=()=>{e(rn[4],{onSave:v})},v=k=>{s(k),E(k)},S=(k,C)=>{a(k),C==r&&t("localhost")},E=async k=>{if(!await m(k)){e(rn[3],{message:`Не удалось подключиться к серверу по адресу ${k}`});return}t(k),d(bt[3])};return P.useEffect(()=>{i.length===0&&t("localhost")},[i]),w.jsxs(Uj,{children:[w.jsx(Wj,{children:w.jsx("p",{className:"unselectable",children:"Доступные узлы"})}),w.jsxs(Hy,{children:[w.jsx(Vy,{className:"unselectable",onClick:()=>E(h.address),children:w.jsx("p",{children:"Корневой адрес"})}),h.hostname==""?w.jsxs(Yj,{className:"paddingP",children:["Название: Загрузка",w.jsx(Ch,{})]}):w.jsxs("p",{className:"paddingP",children:["Название: ",h.hostname]})]}),w.jsxs(Xj,{children:[w.jsxs(Gj,{className:"unselectable",onClick:f,children:[w.jsx("p",{children:"Дополнительные узлы"}),w.jsx(Ot,{name:u?Le[5]:Le[6]})]}),w.jsxs(Kj,{$isactive:u.toString(),children:[i.length>0&&i.map((k,C)=>w.jsxs(Hy,{children:[w.jsxs(Vy,{className:"unselectable",onClick:()=>E(k.address),children:[w.jsxs("p",{children:["Узел ",k.number]}),w.jsx(Ot,{width:"20",height:"20",name:Le[2],setColor:"white",onClick:R=>{R.stopPropagation(),S(k.number,k.address)}})]}),w.jsxs("p",{className:"paddingP",children:["Адрес: ",k.address]})]},C)),w.jsx(qj,{className:"unselectable",onClick:y,children:"+"})]})]})]})},Jj={[au[1]]:w.jsx(Qj,{})},Zj=({name:e})=>{const t=Jj[e];return yt.cloneElement(t)},e$=oe.div`
|
|||
|
|
background-color: ${e=>e.theme.secondary};
|
|||
|
|
width: 250px;
|
|||
|
|
font-size: 14px;
|
|||
|
|
flex: 3;
|
|||
|
|
`,t$=()=>{const{toolBar:e}=Tu(),t=(e==null?void 0:e.current)||"",{isActive:r,isOpen:i}=hw(t);return!r||!i?null:w.jsx(e$,{children:w.jsx(Zj,{name:t})})},n$=oe.div`
|
|||
|
|
height: 100%;
|
|||
|
|
display: flex;
|
|||
|
|
`,r$=()=>w.jsxs(n$,{children:[w.jsx(Hj,{}),w.jsx(t$,{})]}),o$=oe.div`
|
|||
|
|
${e=>e.size==="small"&&"width: 100%;"}
|
|||
|
|
`,i$=oe.div`
|
|||
|
|
width: 100%;
|
|||
|
|
cursor: pointer;
|
|||
|
|
color: ${e=>e.theme.textColor};
|
|||
|
|
`,s$=oe.div`
|
|||
|
|
padding: 10px;
|
|||
|
|
`,l$=({size:e})=>{const{setWorkModule:t}=Zr();return w.jsx(o$,{size:e,onClick:()=>t("helloWindow"),children:e==="big"?w.jsx(at,{title:"Выйти",size:"big"}):w.jsx(i$,{children:w.jsx(s$,{children:w.jsx(Ot,{name:Le[12],width:"30",height:"30"})})})})},a$=oe.div`
|
|||
|
|
display: flex;
|
|||
|
|
align-items: center;
|
|||
|
|
justify-content: flex-end;
|
|||
|
|
background-color: ${e=>e.theme.primary};
|
|||
|
|
padding: 0 5px;
|
|||
|
|
`,u$=oe.div`
|
|||
|
|
display: flex;
|
|||
|
|
align-items: center;
|
|||
|
|
`,c$=oe.div`
|
|||
|
|
padding: 10px;
|
|||
|
|
|
|||
|
|
svg{
|
|||
|
|
cursor: pointer;
|
|||
|
|
}
|
|||
|
|
`,f$=()=>{const{setNullPos:e}=Nv();return w.jsx(a$,{children:w.jsxs(u$,{children:[w.jsx(c$,{children:w.jsx(Ot,{name:Le[11],width:"30",height:"30",onClick:()=>e(!0)})}),w.jsx(l$,{size:"small"})]})})},d$=oe.div`
|
|||
|
|
display: flex;
|
|||
|
|
flex-direction: column;
|
|||
|
|
align-items: center;
|
|||
|
|
justify-content: center;
|
|||
|
|
height: 100%;
|
|||
|
|
width: 100%;
|
|||
|
|
background: ${e=>e.theme.background};
|
|||
|
|
padding: 50px;
|
|||
|
|
box-sizing: border-box;
|
|||
|
|
`,h$=oe.div`
|
|||
|
|
max-width: 1200px;
|
|||
|
|
display: flex;
|
|||
|
|
flex-direction: column;
|
|||
|
|
justify-content: space-between;
|
|||
|
|
height: 100%;
|
|||
|
|
box-sizing: border-box;
|
|||
|
|
padding: 25px 50px;
|
|||
|
|
background: ${e=>e.theme.secondary};
|
|||
|
|
border-radius: 18px;
|
|||
|
|
`,p$=oe.div`
|
|||
|
|
display: flex;
|
|||
|
|
flex-direction: column;
|
|||
|
|
gap: 15px;
|
|||
|
|
|
|||
|
|
`,g$=oe.div`
|
|||
|
|
display: flex;
|
|||
|
|
flex-direction: column;
|
|||
|
|
gap: 15px;
|
|||
|
|
margin-left: 10px;
|
|||
|
|
`,m$=oe.div`
|
|||
|
|
font-size: 20px;
|
|||
|
|
`,y$=oe.div`
|
|||
|
|
display: flex;
|
|||
|
|
flex-direction: column;
|
|||
|
|
gap: 10px;
|
|||
|
|
|
|||
|
|
p{
|
|||
|
|
font-size: 18px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
`,x$=oe.div`
|
|||
|
|
display: flex;
|
|||
|
|
flex-direction: column;
|
|||
|
|
gap: 20px;
|
|||
|
|
`,v$=oe.div`
|
|||
|
|
display: flex;
|
|||
|
|
flex-direction: column;
|
|||
|
|
gap: 10px;
|
|||
|
|
`,Sd=oe.div`
|
|||
|
|
display: flex;
|
|||
|
|
gap: 5px;
|
|||
|
|
`,w$=oe.div`
|
|||
|
|
width: 100%;
|
|||
|
|
text-align: center;
|
|||
|
|
margin-top: 50px;
|
|||
|
|
`,S$=oe.div`
|
|||
|
|
width: 100%;
|
|||
|
|
display: flex;
|
|||
|
|
justifi-content: flex-start;
|
|||
|
|
align-items: center;
|
|||
|
|
`,E$=oe.div`
|
|||
|
|
width: 100%;
|
|||
|
|
display: flex;
|
|||
|
|
gap: 15px;
|
|||
|
|
align-items: center;
|
|||
|
|
justify-content: center;
|
|||
|
|
padding-top: 50px;
|
|||
|
|
box-sizing: border-box;
|
|||
|
|
|
|||
|
|
img{
|
|||
|
|
width: 40px;
|
|||
|
|
height: 40px;
|
|||
|
|
}
|
|||
|
|
`,k$=oe.div`
|
|||
|
|
display: flex;
|
|||
|
|
flex-direction: column;
|
|||
|
|
gap: 30px;
|
|||
|
|
`;function lh({from:e,onBack:t}){const{setWorkModule:r}=Zr(),s=(()=>{switch(e){case"reg":return t;case"helloWindow":return()=>r(bt[1]);case"workSpace":return()=>r(bt[3]);default:return}})(),a=e!=="reg"||e==="reg"&&t;return w.jsx(d$,{children:w.jsxs(h$,{children:[w.jsxs(E$,{children:[w.jsx("img",{src:"./assets/images/gossys.png",alt:""}),w.jsx("div",{style:{width:"100%",display:"flex",justifyContent:"center"},children:w.jsx("h1",{children:"О приложении"})})]}),w.jsxs(k$,{children:[w.jsx(m$,{children:w.jsx("p",{children:"Приложение ГоNets является минимально работоспособным кроссплатформенным продуктом (MVP) для демонстрации нашего подхода к управлению настройками ПК в корпоративной среде."})}),w.jsxs(p$,{children:[w.jsx("p",{children:"Данное приложение умеет:"}),w.jsxs(g$,{children:[w.jsx("p",{children:"- Отображать в графическом виде активные сетевые ресурсы"}),w.jsx("p",{children:"- Настраивать сетевые параметры локального и удаленных сетевых ресурсов"}),w.jsx("p",{children:"- Отображать и изменять взаимодействие сетевых ресурсов с установленным Клиентом ГоNets"})]})]}),w.jsxs(y$,{children:[w.jsx("p",{children:"Программное обеспечение исключительно для ознакомления и домашнего использования."}),w.jsx("p",{children:"Для коммерческого использования приобретите версию ГоNets-PRO (Подробная информация на странице продукта)"})]}),w.jsxs(x$,{children:[w.jsxs(Sd,{children:[w.jsx("p",{children:"Ссылка на домашнюю страницу:"}),w.jsx("a",{href:"https://gossys.dev/pages/projects/gonets",children:"https://gossys.dev/pages/projects/gonets"})]}),w.jsxs(Sd,{children:[w.jsx("p",{children:"Инструкции и информация:"}),w.jsx("a",{href:"https://wiki.gossys.dev/ru/gonets",children:"https://wiki.gossys.dev/ru/gonets"})]}),w.jsxs(v$,{children:[w.jsx("p",{children:"Распространяется под лицензией GosysPUB текущей версии."}),w.jsxs(Sd,{children:[w.jsx("p",{children:"Полный текст актуальной лицензии:"}),w.jsx("a",{href:"https://wiki.gossys.dev/ru/lic/GosysPUB",children:"https://wiki.gossys.dev/ru/lic/GosysPUB"})]})]})]}),w.jsx(w$,{children:w.jsx("p",{children:"Разработано и поддерживается ООО «Гибридные Офисные Системы» 2024-2025 г. Все права защищены."})})]}),w.jsxs(S$,{children:[a&&s&&w.jsx(at,{title:"Назад",onClick:s,style:{marginRight:"10px"}}),e=="reg"&&w.jsx(qh,{})]})]})})}const C$=oe.div`
|
|||
|
|
display: flex;
|
|||
|
|
flex-direction: column;
|
|||
|
|
height: 100%;
|
|||
|
|
`,_$=oe.div`
|
|||
|
|
display: flex;
|
|||
|
|
height: 100%;
|
|||
|
|
`,N$=oe.div`
|
|||
|
|
display: flex;
|
|||
|
|
flex-direction: column;
|
|||
|
|
width: 100%;
|
|||
|
|
position: relative;
|
|||
|
|
`;function b$(){const{ipAddress:e,setIpAddress:t}=Hn(),{workModule:r}=Zr(),[i,s]=P.useState(e),a=Tu(f=>f.initialize),u=Zr(f=>f.initialize);return P.useEffect(()=>{localStorage.getItem("toolBar-storage")||a()},[a]),P.useEffect(()=>{localStorage.getItem("workSpace-storage")||u()},[u]),P.useEffect(()=>{s(e)},[e]),P.useEffect(()=>{t(i)},[i]),localStorage.getItem("workSpace-storage"),w.jsx(C$,{children:w.jsxs(_$,{children:[w.jsx(r$,{}),r===bt[1]&&w.jsx(j4,{}),r===bt[2]&&w.jsx(lh,{from:"workSpace"}),r===bt[4]&&w.jsx(lh,{from:"helloWindow"}),r===bt[3]&&w.jsxs(N$,{children:[w.jsx(f$,{}),w.jsx(uw,{children:w.jsx(vj,{startConnection:!0,ws:i},i)})]})]})})}const P$=oe.div`
|
|||
|
|
display: flex;
|
|||
|
|
flex-direction: column;
|
|||
|
|
align-items: center;
|
|||
|
|
justify-content: center;
|
|||
|
|
height: 100%;
|
|||
|
|
background: ${e=>e.theme.background};
|
|||
|
|
`,R$=oe.form`
|
|||
|
|
display: flex;
|
|||
|
|
flex-direction: column;
|
|||
|
|
gap: 25px;
|
|||
|
|
align-items: center;
|
|||
|
|
background: ${e=>e.theme.primary};
|
|||
|
|
padding: 25px;
|
|||
|
|
border-radius: 18px;
|
|||
|
|
width: 350px;
|
|||
|
|
`,T$=oe.div`
|
|||
|
|
display: flex;
|
|||
|
|
flex-direction: column;
|
|||
|
|
gap: 15px;
|
|||
|
|
align-items: center;
|
|||
|
|
text-align: center;
|
|||
|
|
font-size: 20px;
|
|||
|
|
`,I$=oe.div`
|
|||
|
|
display: flex;
|
|||
|
|
flex-direction: column;
|
|||
|
|
gap: 25px;
|
|||
|
|
text-align: center;
|
|||
|
|
`,j$=oe.div`
|
|||
|
|
width: 100%;
|
|||
|
|
display: flex;
|
|||
|
|
justify-content: center;
|
|||
|
|
`,$$=oe.div`
|
|||
|
|
display: flex;
|
|||
|
|
align-items: center;
|
|||
|
|
`,A$=oe.div`
|
|||
|
|
width: 100%;
|
|||
|
|
cursor: pointer;
|
|||
|
|
`,M$=oe.div`
|
|||
|
|
padding: 10px;
|
|||
|
|
color: ${e=>e.theme.text};
|
|||
|
|
`,L$=()=>{const{ipAddress:e,setIpAddress:t}=Hn(),[r,i]=P.useState(""),[s,a]=P.useState(!0),[u,f]=P.useState(!1),[d,h]=P.useState({username:"operator",password:"",is_admin:!0}),g=(E,k)=>{E==="repeatPassword"?(i(k),a(d.password===k)):(h(C=>({...C,[E]:k})),E==="password"&&a(k===r))},m=async E=>{try{(await Ln.createUser(e,E)).status===200&&window.location.reload()}catch(k){console.error("Error:",k)}finally{}},y=()=>{s&&m(d)},v=()=>{t("localhost")},S=()=>{f(!0)};return w.jsx(w.Fragment,{children:u?w.jsx(lh,{from:"reg",onBack:()=>f(!1)}):w.jsxs(P$,{children:[w.jsxs(R$,{onSubmit:y,children:[w.jsxs(T$,{children:[w.jsx(Ot,{name:Le[3],width:"52",height:"52"}),w.jsx("h3",{children:"Настройка оператора узла"}),e!="localhost"&&w.jsx("p",{children:e})]}),w.jsxs(I$,{children:[w.jsx("div",{children:w.jsx("p",{children:"Перед началом работы необходимо создать пароль оператора приложения"})}),w.jsxs("div",{children:[w.jsx(Gr,{type:"password",placeholderText:"Введите пароль...",id:"password",value:d.password,onChange:(E,k)=>g(E,k)}),w.jsx(Gr,{type:"password",placeholderText:"Повторите пароль...",id:"repeatPassword",value:r,onChange:(E,k)=>g(E,k),style:{marginTop:"10px"}}),!s&&w.jsx("p",{style:{color:"red",marginTop:"5px"},children:"Пароли не совпадают!"})]})]}),w.jsx(j$,{children:w.jsx(at,{style:{width:"100%"},title:"Отправить",type:"submit"})})]}),w.jsxs($$,{children:[e!="localhost"&&w.jsx(at,{title:"Назад",onClick:v,style:{marginRight:"10px"}}),w.jsx(qh,{}),w.jsx(A$,{children:w.jsx(M$,{children:w.jsx(Ot,{name:Le[4],width:"30",height:"30",onClick:S})})})]})]})})},D$=wh`
|
|||
|
|
from {
|
|||
|
|
transform: rotate(0deg);
|
|||
|
|
}
|
|||
|
|
to {
|
|||
|
|
transform: rotate(360deg);
|
|||
|
|
}
|
|||
|
|
`;oe.div`
|
|||
|
|
top: 0px;
|
|||
|
|
z-index:998;
|
|||
|
|
background-color: rgba(0,0,0, 0.7);
|
|||
|
|
position: fixed;
|
|||
|
|
display: flex;
|
|||
|
|
align-items: center;
|
|||
|
|
justify-content: center;
|
|||
|
|
width: 100%;
|
|||
|
|
height: 100%;
|
|||
|
|
overflow-y: hidden;
|
|||
|
|
`;const O$=oe.div`
|
|||
|
|
display: flex;
|
|||
|
|
flex-direction: column;
|
|||
|
|
align-items: center;
|
|||
|
|
gap: 15px;
|
|||
|
|
|
|||
|
|
p{
|
|||
|
|
font-size: 24px;
|
|||
|
|
color: white;
|
|||
|
|
}
|
|||
|
|
`,z$=oe.div`
|
|||
|
|
position: relative;
|
|||
|
|
width: 65px;
|
|||
|
|
height: 65px;
|
|||
|
|
`,F$=oe.div`
|
|||
|
|
position: absolute;
|
|||
|
|
top: 0;
|
|||
|
|
left: 0;
|
|||
|
|
width: 65px;
|
|||
|
|
height: 65px;
|
|||
|
|
border-radius: 50%;
|
|||
|
|
border: 12px solid white;
|
|||
|
|
`,B$=oe.div`
|
|||
|
|
position: absolute;
|
|||
|
|
top: 0;
|
|||
|
|
left: 0;
|
|||
|
|
width: 65px;
|
|||
|
|
height: 65px;
|
|||
|
|
border-radius: 50%;
|
|||
|
|
border: 12px solid transparent;
|
|||
|
|
border-top: 12px solid ${e=>e.theme.accent};
|
|||
|
|
|
|||
|
|
// Добавление аниманции и использование кейфремов
|
|||
|
|
animation: ${D$} 1s linear infinite;
|
|||
|
|
`,H$=oe.div`
|
|||
|
|
display: flex;
|
|||
|
|
gap: 3px;
|
|||
|
|
font-size: 24px;
|
|||
|
|
color: white;
|
|||
|
|
margin-top: 30px;
|
|||
|
|
margin-left: 25px;
|
|||
|
|
`;function V$({loaderText:e}){return w.jsx(fv,{children:w.jsxs(O$,{children:[w.jsxs(z$,{children:[w.jsx(F$,{}),w.jsx(B$,{})]}),w.jsxs(H$,{children:[e,w.jsx(Ch,{})]})]})})}function U$(){const{ipAddress:e}=Hn(),[t,r]=P.useState(null);return P.useEffect(()=>{(async()=>{try{let s=await Ln.checkServerConf(e);s.status===200&&r(s.data.has_users)}catch(s){console.error("Error checking server config:",s),r(!1)}})()},[e]),t===null?w.jsx(V$,{loaderText:"Идёт загрузка данных"}):t===!1?w.jsx(L$,{}):w.jsx(XE,{children:w.jsx(nx,{path:"/",element:w.jsx(b$,{})})})}const W$=()=>{const e=uv(),{ipAddress:t}=Hn();P.useEffect(()=>{(async()=>{await e()})()},[t]);const{isOpen:r,modalType:i,modalData:s}=io();return w.jsxs(w.Fragment,{children:[w.jsx(N4,{isOpen:r,type:i,data:s}),w.jsx(U$,{})]})},pw=document.getElementById("root");if(!pw)throw new Error('Root element with id "root" not found');const q$=rE.createRoot(pw);q$.render(w.jsx(AC,{children:w.jsx(xk,{children:w.jsx(Pk,{children:w.jsx(W$,{})})})}));
|