diff --git a/ptcs/ptcs_bridge/train_base.py b/ptcs/ptcs_bridge/train_base.py index 95d0e71..3188540 100644 --- a/ptcs/ptcs_bridge/train_base.py +++ b/ptcs/ptcs_bridge/train_base.py @@ -2,6 +2,7 @@ NotifyPositionIdCallback = Callable[["TrainBase", int], None] NotifyRotationCallback = Callable[["TrainBase", int], None] +NotifyVoltageCallback = Callable[["TrainBase", int], None] class TrainBase: @@ -24,3 +25,6 @@ async def start_notify_position_id(self, callback: NotifyPositionIdCallback) -> async def start_notify_rotation(self, callback: NotifyRotationCallback) -> None: raise NotImplementedError() + + async def start_notify_voltage(self, callback: NotifyVoltageCallback) -> None: + raise NotImplementedError() diff --git a/ptcs/ptcs_bridge/train_client.py b/ptcs/ptcs_bridge/train_client.py index e852a5e..cb6604d 100644 --- a/ptcs/ptcs_bridge/train_client.py +++ b/ptcs/ptcs_bridge/train_client.py @@ -5,12 +5,18 @@ from bleak.backends.characteristic import BleakGATTCharacteristic from bleak.backends.service import BleakGATTService -from .train_base import NotifyPositionIdCallback, NotifyRotationCallback, TrainBase +from .train_base import ( + NotifyPositionIdCallback, + NotifyRotationCallback, + NotifyVoltageCallback, + TrainBase, +) SERVICE_TRAIN_UUID = UUID("63cb613b-6562-4aa5-b602-030f103834a4") CHARACTERISTIC_MOTOR_INPUT_UUID = UUID("88c9d9ae-bd53-4ab3-9f42-b3547575a743") CHARACTERISTIC_POSITION_ID_UUID = UUID("8bcd68d5-78ca-c1c3-d1ba-96d527ce8968") CHARACTERISTIC_ROTATION_UUID = UUID("aab17457-2755-8b50-caa1-432ff553d533") +CHARACTERISTIC_VOLTAGE_UUID = UUID("7ecc0ed2-5ef9-c9e6-5d16-582f86035ecf") logger = logging.getLogger(__name__) @@ -55,6 +61,9 @@ def _get_characteristic_position_id(self) -> BleakGATTCharacteristic: def _get_characteristic_rotation(self) -> BleakGATTCharacteristic: return self._get_characteristic(CHARACTERISTIC_ROTATION_UUID) + def _get_characteristic_voltage(self) -> BleakGATTCharacteristic: + return self._get_characteristic(CHARACTERISTIC_VOLTAGE_UUID) + async def send_motor_input(self, motor_input: int) -> None: assert isinstance(motor_input, int) assert 0 <= motor_input <= 255 @@ -81,3 +90,13 @@ def wrapped_callback(_characteristic: BleakGATTCharacteristic, data: bytearray): characteristic = self._get_characteristic_rotation() await self._client.start_notify(characteristic, wrapped_callback) + + async def start_notify_voltage(self, callback: NotifyVoltageCallback) -> None: + def wrapped_callback(_characteristic: BleakGATTCharacteristic, data: bytearray): + assert len(data) == 4 + voltage = int.from_bytes(data, byteorder="little") + logger.info("%s notify voltage %s mV", self, voltage) + callback(self, voltage) + + characteristic_voltage = self._get_characteristic_voltage() + await self._client.start_notify(characteristic_voltage, wrapped_callback) diff --git a/ptcs/ptcs_bridge/train_simulator.py b/ptcs/ptcs_bridge/train_simulator.py index 28fed8d..113105e 100644 --- a/ptcs/ptcs_bridge/train_simulator.py +++ b/ptcs/ptcs_bridge/train_simulator.py @@ -2,7 +2,12 @@ import logging import math -from .train_base import NotifyPositionIdCallback, NotifyRotationCallback, TrainBase +from .train_base import ( + NotifyPositionIdCallback, + NotifyRotationCallback, + NotifyVoltageCallback, + TrainBase, +) logger = logging.getLogger(__name__) @@ -81,6 +86,9 @@ async def start_notify_position_id(self, callback: NotifyPositionIdCallback) -> async def start_notify_rotation(self, callback: NotifyRotationCallback) -> None: self._notify_rotation_callback = callback + async def start_notify_voltage(self, callback: NotifyVoltageCallback) -> None: + raise NotImplementedError() + async def main(): t0 = TrainSimulator("t0") diff --git a/ptcs/ptcs_client/dist/models/TrainState.ts b/ptcs/ptcs_client/dist/models/TrainState.ts index 77b1789..fb463ee 100644 --- a/ptcs/ptcs_client/dist/models/TrainState.ts +++ b/ptcs/ptcs_client/dist/models/TrainState.ts @@ -18,4 +18,5 @@ export type TrainState = { stop_distance: number; departure_time: (number | null); speed_command: number; + voltage_mV: number; }; diff --git a/ptcs/ptcs_control/components/train.py b/ptcs/ptcs_control/components/train.py index b426c92..ae52fc4 100644 --- a/ptcs/ptcs_control/components/train.py +++ b/ptcs/ptcs_control/components/train.py @@ -37,6 +37,7 @@ class Train(BaseComponent): stop: Stop | None = field(default=None) # 列車の停止目標 stop_distance: float = field(default=0.0) # 停止目標までの距離[cm] departure_time: int | None = field(default=None) # 発車予定時刻 + voltage_mV: int = field(default=0) # 電池電圧[mV] # commands speed_command: float = field(default=0.0) # 速度指令値 diff --git a/ptcs/ptcs_server/server.py b/ptcs/ptcs_server/server.py index 75e0312..d3dc4aa 100644 --- a/ptcs/ptcs_server/server.py +++ b/ptcs/ptcs_server/server.py @@ -107,11 +107,18 @@ def handle_notify_rotation(train_client: TrainBase, _rotation: int): return train_control.move_forward_mr(1) + def handle_notify_voltage(train_client: TrainBase, _voltage_mV: int): + train_control = control.trains.get(train_client.id) + if train_control is None: + return + train_control.voltage_mV = _voltage_mV + for train in bridge.trains.values(): match train: case TrainClient(): await train.start_notify_position_id(handle_notify_position_id) await train.start_notify_rotation(handle_notify_rotation) + # await train.start_notify_voltage(handle_notify_voltage) def handle_notify_collapse(obstacle_client: WirePoleClient, is_collapsed: bool): obstacle_control = control.obstacles.get(obstacle_client.id) diff --git a/ptcs/ptcs_server/types/state.py b/ptcs/ptcs_server/types/state.py index d6d5484..f3e73cb 100644 --- a/ptcs/ptcs_server/types/state.py +++ b/ptcs/ptcs_server/types/state.py @@ -54,6 +54,7 @@ class TrainState(BaseModel): stop_distance: float departure_time: int | None speed_command: float + voltage_mV: int @staticmethod def from_control(train: Train) -> TrainState: @@ -80,6 +81,7 @@ def from_control(train: Train) -> TrainState: stop_distance=train.stop_distance, departure_time=train.departure_time, speed_command=train.speed_command, + voltage_mV=train.voltage_mV, ) diff --git a/ptcs/ptcs_ui/dist/assets/index-5699ed18.js b/ptcs/ptcs_ui/dist/assets/index-5699ed18.js new file mode 100644 index 0000000..0e31e2a --- /dev/null +++ b/ptcs/ptcs_ui/dist/assets/index-5699ed18.js @@ -0,0 +1,78 @@ +var dg=Object.defineProperty;var pg=(e,t,n)=>t in e?dg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ae=(e,t,n)=>(pg(e,typeof t!="symbol"?t+"":t,n),n);function hg(e,t){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerpolicy&&(i.referrerPolicy=o.referrerpolicy),o.crossorigin==="use-credentials"?i.credentials="include":o.crossorigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();function mg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var R={},yg={get exports(){return R},set exports(e){R=e}},xl={},x={},gg={get exports(){return x},set exports(e){x=e}},H={};/** + * @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 No=Symbol.for("react.element"),vg=Symbol.for("react.portal"),wg=Symbol.for("react.fragment"),_g=Symbol.for("react.strict_mode"),Sg=Symbol.for("react.profiler"),xg=Symbol.for("react.provider"),Eg=Symbol.for("react.context"),Pg=Symbol.for("react.forward_ref"),kg=Symbol.for("react.suspense"),Og=Symbol.for("react.memo"),Cg=Symbol.for("react.lazy"),sc=Symbol.iterator;function $g(e){return e===null||typeof e!="object"?null:(e=sc&&e[sc]||e["@@iterator"],typeof e=="function"?e:null)}var sp={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},up=Object.assign,cp={};function Or(e,t,n){this.props=e,this.context=t,this.refs=cp,this.updater=n||sp}Or.prototype.isReactComponent={};Or.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Or.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function fp(){}fp.prototype=Or.prototype;function Ws(e,t,n){this.props=e,this.context=t,this.refs=cp,this.updater=n||sp}var Gs=Ws.prototype=new fp;Gs.constructor=Ws;up(Gs,Or.prototype);Gs.isPureReactComponent=!0;var uc=Array.isArray,dp=Object.prototype.hasOwnProperty,Qs={current:null},pp={key:!0,ref:!0,__self:!0,__source:!0};function hp(e,t,n){var r,o={},i=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(i=""+t.key),t)dp.call(t,r)&&!pp.hasOwnProperty(r)&&(o[r]=t[r]);var a=arguments.length-2;if(a===1)o.children=n;else if(1>>1,ue=N[K];if(0>>1;Ko(xn,U))pto(Yt,xn)?(N[K]=Yt,N[pt]=U,K=pt):(N[K]=xn,N[it]=U,K=it);else if(pto(Yt,U))N[K]=Yt,N[pt]=U,K=pt;else break e}}return D}function o(N,D){var U=N.sortIndex-D.sortIndex;return U!==0?U:N.id-D.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,a=l.now();e.unstable_now=function(){return l.now()-a}}var s=[],u=[],d=1,m=null,c=3,y=!1,g=!1,v=!1,E=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,f=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function h(N){for(var D=n(u);D!==null;){if(D.callback===null)r(u);else if(D.startTime<=N)r(u),D.sortIndex=D.expirationTime,t(s,D);else break;D=n(u)}}function w(N){if(v=!1,h(N),!g)if(n(s)!==null)g=!0,Sn(P);else{var D=n(u);D!==null&&se(w,D.startTime-N)}}function P(N,D){g=!1,v&&(v=!1,p(b),b=-1),y=!0;var U=c;try{for(h(D),m=n(s);m!==null&&(!(m.expirationTime>D)||N&&!Z());){var K=m.callback;if(typeof K=="function"){m.callback=null,c=m.priorityLevel;var ue=K(m.expirationTime<=D);D=e.unstable_now(),typeof ue=="function"?m.callback=ue:m===n(s)&&r(s),h(D)}else r(s);m=n(s)}if(m!==null)var Xt=!0;else{var it=n(u);it!==null&&se(w,it.startTime-D),Xt=!1}return Xt}finally{m=null,c=U,y=!1}}var $=!1,k=null,b=-1,V=5,I=-1;function Z(){return!(e.unstable_now()-IN||125K?(N.sortIndex=U,t(u,N),n(s)===null&&N===n(u)&&(v?(p(b),b=-1):v=!0,se(w,U-K))):(N.sortIndex=ue,t(s,N),g||y||(g=!0,Sn(P))),N},e.unstable_shouldYield=Z,e.unstable_wrapCallback=function(N){var D=c;return function(){var U=c;c=D;try{return N.apply(this,arguments)}finally{c=U}}}})(yp);(function(e){e.exports=yp})(Fg);/** + * @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 gp=x,et=Va;function C(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ha=Object.prototype.hasOwnProperty,Ug=/^[: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]*$/,fc={},dc={};function Bg(e){return Ha.call(dc,e)?!0:Ha.call(fc,e)?!1:Ug.test(e)?dc[e]=!0:(fc[e]=!0,!1)}function Vg(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Hg(e,t,n,r){if(t===null||typeof t>"u"||Vg(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function De(e,t,n,r,o,i,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}var Ce={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ce[e]=new De(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ce[t]=new De(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ce[e]=new De(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ce[e]=new De(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ce[e]=new De(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ce[e]=new De(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ce[e]=new De(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ce[e]=new De(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ce[e]=new De(e,5,!1,e.toLowerCase(),null,!1,!1)});var Xs=/[\-:]([a-z])/g;function Ys(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Xs,Ys);Ce[t]=new De(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Xs,Ys);Ce[t]=new De(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Xs,Ys);Ce[t]=new De(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ce[e]=new De(e,1,!1,e.toLowerCase(),null,!1,!1)});Ce.xlinkHref=new De("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ce[e]=new De(e,1,!1,e.toLowerCase(),null,!0,!0)});function Zs(e,t,n,r){var o=Ce.hasOwnProperty(t)?Ce[t]:null;(o!==null?o.type!==0:r||!(2a||o[l]!==i[a]){var s=` +`+o[l].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=l&&0<=a);break}}}finally{sa=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Wr(e):""}function Wg(e){switch(e.tag){case 5:return Wr(e.type);case 16:return Wr("Lazy");case 13:return Wr("Suspense");case 19:return Wr("SuspenseList");case 0:case 2:case 15:return e=ua(e.type,!1),e;case 11:return e=ua(e.type.render,!1),e;case 1:return e=ua(e.type,!0),e;default:return""}}function Ka(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Zn:return"Fragment";case Yn:return"Portal";case Wa:return"Profiler";case Js:return"StrictMode";case Ga:return"Suspense";case Qa:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case _p:return(e.displayName||"Context")+".Consumer";case wp:return(e._context.displayName||"Context")+".Provider";case qs:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case eu:return t=e.displayName||null,t!==null?t:Ka(e.type)||"Memo";case en:t=e._payload,e=e._init;try{return Ka(e(t))}catch{}}return null}function Gg(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ka(t);case 8:return t===Js?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function yn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function xp(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Qg(e){var t=xp(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(l){r=""+l,i.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Yo(e){e._valueTracker||(e._valueTracker=Qg(e))}function Ep(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=xp(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ji(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Xa(e,t){var n=t.checked;return ae({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function hc(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=yn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Pp(e,t){t=t.checked,t!=null&&Zs(e,"checked",t,!1)}function Ya(e,t){Pp(e,t);var n=yn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Za(e,t.type,n):t.hasOwnProperty("defaultValue")&&Za(e,t.type,yn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function mc(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Za(e,t,n){(t!=="number"||ji(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Gr=Array.isArray;function ur(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=Zo.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function co(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Yr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Kg=["Webkit","ms","Moz","O"];Object.keys(Yr).forEach(function(e){Kg.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Yr[t]=Yr[e]})});function $p(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Yr.hasOwnProperty(e)&&Yr[e]?(""+t).trim():t+"px"}function Rp(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=$p(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var Xg=ae({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function es(e,t){if(t){if(Xg[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(C(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(C(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(C(61))}if(t.style!=null&&typeof t.style!="object")throw Error(C(62))}}function ts(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ns=null;function tu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var rs=null,cr=null,fr=null;function vc(e){if(e=Io(e)){if(typeof rs!="function")throw Error(C(280));var t=e.stateNode;t&&(t=Cl(t),rs(e.stateNode,e.type,t))}}function jp(e){cr?fr?fr.push(e):fr=[e]:cr=e}function bp(){if(cr){var e=cr,t=fr;if(fr=cr=null,vc(e),t)for(e=0;e>>=0,e===0?32:31-(l0(e)/a0|0)|0}var Jo=64,qo=4194304;function Qr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Ti(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,l=n&268435455;if(l!==0){var a=l&~o;a!==0?r=Qr(a):(i&=l,i!==0&&(r=Qr(i)))}else l=n&~o,l!==0?r=Qr(l):i!==0&&(r=Qr(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function zo(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-_t(t),e[t]=n}function f0(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Jr),Cc=String.fromCharCode(32),$c=!1;function Zp(e,t){switch(e){case"keyup":return A0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Jp(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Jn=!1;function U0(e,t){switch(e){case"compositionend":return Jp(t);case"keypress":return t.which!==32?null:($c=!0,Cc);case"textInput":return e=t.data,e===Cc&&$c?null:e;default:return null}}function B0(e,t){if(Jn)return e==="compositionend"||!uu&&Zp(e,t)?(e=Xp(),vi=lu=on=null,Jn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Nc(n)}}function nh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?nh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function rh(){for(var e=window,t=ji();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ji(e.document)}return t}function cu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Z0(e){var t=rh(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&nh(n.ownerDocument.documentElement,n)){if(r!==null&&cu(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=zc(n,i);var l=zc(n,r);o&&l&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,qn=null,us=null,eo=null,cs=!1;function Tc(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;cs||qn==null||qn!==ji(r)||(r=qn,"selectionStart"in r&&cu(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),eo&&go(eo,r)||(eo=r,r=Li(us,"onSelect"),0nr||(e.current=ys[nr],ys[nr]=null,nr--)}function te(e,t){nr++,ys[nr]=e.current,e.current=t}var gn={},ze=wn(gn),Be=wn(!1),Ln=gn;function wr(e,t){var n=e.type.contextTypes;if(!n)return gn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ve(e){return e=e.childContextTypes,e!=null}function Ai(){re(Be),re(ze)}function Uc(e,t,n){if(ze.current!==gn)throw Error(C(168));te(ze,t),te(Be,n)}function dh(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(C(108,Gg(e)||"Unknown",o));return ae({},n,r)}function Fi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||gn,Ln=ze.current,te(ze,e),te(Be,Be.current),!0}function Bc(e,t,n){var r=e.stateNode;if(!r)throw Error(C(169));n?(e=dh(e,t,Ln),r.__reactInternalMemoizedMergedChildContext=e,re(Be),re(ze),te(ze,e)):re(Be),te(Be,n)}var At=null,$l=!1,Ea=!1;function ph(e){At===null?At=[e]:At.push(e)}function uv(e){$l=!0,ph(e)}function _n(){if(!Ea&&At!==null){Ea=!0;var e=0,t=q;try{var n=At;for(q=1;e>=l,o-=l,Ft=1<<32-_t(t)+o|n<b?(V=k,k=null):V=k.sibling;var I=c(p,k,h[b],w);if(I===null){k===null&&(k=V);break}e&&k&&I.alternate===null&&t(p,k),f=i(I,f,b),$===null?P=I:$.sibling=I,$=I,k=V}if(b===h.length)return n(p,k),oe&&On(p,b),P;if(k===null){for(;bb?(V=k,k=null):V=k.sibling;var Z=c(p,k,I.value,w);if(Z===null){k===null&&(k=V);break}e&&k&&Z.alternate===null&&t(p,k),f=i(Z,f,b),$===null?P=Z:$.sibling=Z,$=Z,k=V}if(I.done)return n(p,k),oe&&On(p,b),P;if(k===null){for(;!I.done;b++,I=h.next())I=m(p,I.value,w),I!==null&&(f=i(I,f,b),$===null?P=I:$.sibling=I,$=I);return oe&&On(p,b),P}for(k=r(p,k);!I.done;b++,I=h.next())I=y(k,p,b,I.value,w),I!==null&&(e&&I.alternate!==null&&k.delete(I.key===null?b:I.key),f=i(I,f,b),$===null?P=I:$.sibling=I,$=I);return e&&k.forEach(function(ye){return t(p,ye)}),oe&&On(p,b),P}function E(p,f,h,w){if(typeof h=="object"&&h!==null&&h.type===Zn&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case Xo:e:{for(var P=h.key,$=f;$!==null;){if($.key===P){if(P=h.type,P===Zn){if($.tag===7){n(p,$.sibling),f=o($,h.props.children),f.return=p,p=f;break e}}else if($.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===en&&Xc(P)===$.type){n(p,$.sibling),f=o($,h.props),f.ref=Dr(p,$,h),f.return=p,p=f;break e}n(p,$);break}else t(p,$);$=$.sibling}h.type===Zn?(f=In(h.props.children,p.mode,w,h.key),f.return=p,p=f):(w=Oi(h.type,h.key,h.props,null,p.mode,w),w.ref=Dr(p,f,h),w.return=p,p=w)}return l(p);case Yn:e:{for($=h.key;f!==null;){if(f.key===$)if(f.tag===4&&f.stateNode.containerInfo===h.containerInfo&&f.stateNode.implementation===h.implementation){n(p,f.sibling),f=o(f,h.children||[]),f.return=p,p=f;break e}else{n(p,f);break}else t(p,f);f=f.sibling}f=ba(h,p.mode,w),f.return=p,p=f}return l(p);case en:return $=h._init,E(p,f,$(h._payload),w)}if(Gr(h))return g(p,f,h,w);if(zr(h))return v(p,f,h,w);li(p,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,f!==null&&f.tag===6?(n(p,f.sibling),f=o(f,h),f.return=p,p=f):(n(p,f),f=ja(h,p.mode,w),f.return=p,p=f),l(p)):n(p,f)}return E}var Sr=Sh(!0),xh=Sh(!1),Mo={},bt=wn(Mo),So=wn(Mo),xo=wn(Mo);function bn(e){if(e===Mo)throw Error(C(174));return e}function wu(e,t){switch(te(xo,t),te(So,e),te(bt,Mo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:qa(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=qa(t,e)}re(bt),te(bt,t)}function xr(){re(bt),re(So),re(xo)}function Eh(e){bn(xo.current);var t=bn(bt.current),n=qa(t,e.type);t!==n&&(te(So,e),te(bt,n))}function _u(e){So.current===e&&(re(bt),re(So))}var ie=wn(0);function Gi(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Pa=[];function Su(){for(var e=0;en?n:4,e(!0);var r=ka.transition;ka.transition={};try{e(!1),t()}finally{q=n,ka.transition=r}}function Ah(){return ft().memoizedState}function pv(e,t,n){var r=hn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Fh(e))Uh(t,n);else if(n=gh(e,t,n,r),n!==null){var o=Me();St(n,e,r,o),Bh(n,t,r)}}function hv(e,t,n){var r=hn(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Fh(e))Uh(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var l=t.lastRenderedState,a=i(l,n);if(o.hasEagerState=!0,o.eagerState=a,xt(a,l)){var s=t.interleaved;s===null?(o.next=o,gu(t)):(o.next=s.next,s.next=o),t.interleaved=o;return}}catch{}finally{}n=gh(e,t,o,r),n!==null&&(o=Me(),St(n,e,r,o),Bh(n,t,r))}}function Fh(e){var t=e.alternate;return e===le||t!==null&&t===le}function Uh(e,t){to=Qi=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Bh(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ru(e,n)}}var Ki={readContext:ct,useCallback:Re,useContext:Re,useEffect:Re,useImperativeHandle:Re,useInsertionEffect:Re,useLayoutEffect:Re,useMemo:Re,useReducer:Re,useRef:Re,useState:Re,useDebugValue:Re,useDeferredValue:Re,useTransition:Re,useMutableSource:Re,useSyncExternalStore:Re,useId:Re,unstable_isNewReconciler:!1},mv={readContext:ct,useCallback:function(e,t){return Ot().memoizedState=[e,t===void 0?null:t],e},useContext:ct,useEffect:Zc,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,xi(4194308,4,Th.bind(null,t,e),n)},useLayoutEffect:function(e,t){return xi(4194308,4,e,t)},useInsertionEffect:function(e,t){return xi(4,2,e,t)},useMemo:function(e,t){var n=Ot();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ot();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=pv.bind(null,le,e),[r.memoizedState,e]},useRef:function(e){var t=Ot();return e={current:e},t.memoizedState=e},useState:Yc,useDebugValue:Ou,useDeferredValue:function(e){return Ot().memoizedState=e},useTransition:function(){var e=Yc(!1),t=e[0];return e=dv.bind(null,e[1]),Ot().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=le,o=Ot();if(oe){if(n===void 0)throw Error(C(407));n=n()}else{if(n=t(),Se===null)throw Error(C(349));An&30||Oh(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Zc($h.bind(null,r,i,e),[e]),r.flags|=2048,ko(9,Ch.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Ot(),t=Se.identifierPrefix;if(oe){var n=Ut,r=Ft;n=(r&~(1<<32-_t(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Eo++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[Rt]=t,e[_o]=r,Zh(e,t,!1,!1),t.stateNode=e;e:{switch(l=ts(n,r),n){case"dialog":ne("cancel",e),ne("close",e),o=r;break;case"iframe":case"object":case"embed":ne("load",e),o=r;break;case"video":case"audio":for(o=0;oPr&&(t.flags|=128,r=!0,Ar(i,!1),t.lanes=4194304)}else{if(!r)if(e=Gi(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ar(i,!0),i.tail===null&&i.tailMode==="hidden"&&!l.alternate&&!oe)return je(t),null}else 2*de()-i.renderingStartTime>Pr&&n!==1073741824&&(t.flags|=128,r=!0,Ar(i,!1),t.lanes=4194304);i.isBackwards?(l.sibling=t.child,t.child=l):(n=i.last,n!==null?n.sibling=l:t.child=l,i.last=l)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=de(),t.sibling=null,n=ie.current,te(ie,r?n&1|2:n&1),t):(je(t),null);case 22:case 23:return Nu(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ye&1073741824&&(je(t),t.subtreeFlags&6&&(t.flags|=8192)):je(t),null;case 24:return null;case 25:return null}throw Error(C(156,t.tag))}function Ev(e,t){switch(du(t),t.tag){case 1:return Ve(t.type)&&Ai(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xr(),re(Be),re(ze),Su(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return _u(t),null;case 13:if(re(ie),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(C(340));_r()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return re(ie),null;case 4:return xr(),null;case 10:return yu(t.type._context),null;case 22:case 23:return Nu(),null;case 24:return null;default:return null}}var si=!1,Ne=!1,Pv=typeof WeakSet=="function"?WeakSet:Set,z=null;function lr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){fe(e,t,r)}else n.current=null}function $s(e,t,n){try{n()}catch(r){fe(e,t,r)}}var af=!1;function kv(e,t){if(fs=Ii,e=rh(),cu(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var l=0,a=-1,s=-1,u=0,d=0,m=e,c=null;t:for(;;){for(var y;m!==n||o!==0&&m.nodeType!==3||(a=l+o),m!==i||r!==0&&m.nodeType!==3||(s=l+r),m.nodeType===3&&(l+=m.nodeValue.length),(y=m.firstChild)!==null;)c=m,m=y;for(;;){if(m===e)break t;if(c===n&&++u===o&&(a=l),c===i&&++d===r&&(s=l),(y=m.nextSibling)!==null)break;m=c,c=m.parentNode}m=y}n=a===-1||s===-1?null:{start:a,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(ds={focusedElem:e,selectionRange:n},Ii=!1,z=t;z!==null;)if(t=z,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,z=e;else for(;z!==null;){t=z;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var v=g.memoizedProps,E=g.memoizedState,p=t.stateNode,f=p.getSnapshotBeforeUpdate(t.elementType===t.type?v:gt(t.type,v),E);p.__reactInternalSnapshotBeforeUpdate=f}break;case 3:var h=t.stateNode.containerInfo;h.nodeType===1?h.textContent="":h.nodeType===9&&h.documentElement&&h.removeChild(h.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(C(163))}}catch(w){fe(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,z=e;break}z=t.return}return g=af,af=!1,g}function no(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&$s(t,n,i)}o=o.next}while(o!==r)}}function bl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Rs(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function em(e){var t=e.alternate;t!==null&&(e.alternate=null,em(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Rt],delete t[_o],delete t[ms],delete t[av],delete t[sv])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function tm(e){return e.tag===5||e.tag===3||e.tag===4}function sf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||tm(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function js(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Di));else if(r!==4&&(e=e.child,e!==null))for(js(e,t,n),e=e.sibling;e!==null;)js(e,t,n),e=e.sibling}function bs(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(bs(e,t,n),e=e.sibling;e!==null;)bs(e,t,n),e=e.sibling}var Ee=null,vt=!1;function Zt(e,t,n){for(n=n.child;n!==null;)nm(e,t,n),n=n.sibling}function nm(e,t,n){if(jt&&typeof jt.onCommitFiberUnmount=="function")try{jt.onCommitFiberUnmount(El,n)}catch{}switch(n.tag){case 5:Ne||lr(n,t);case 6:var r=Ee,o=vt;Ee=null,Zt(e,t,n),Ee=r,vt=o,Ee!==null&&(vt?(e=Ee,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ee.removeChild(n.stateNode));break;case 18:Ee!==null&&(vt?(e=Ee,n=n.stateNode,e.nodeType===8?xa(e.parentNode,n):e.nodeType===1&&xa(e,n),mo(e)):xa(Ee,n.stateNode));break;case 4:r=Ee,o=vt,Ee=n.stateNode.containerInfo,vt=!0,Zt(e,t,n),Ee=r,vt=o;break;case 0:case 11:case 14:case 15:if(!Ne&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,l=i.destroy;i=i.tag,l!==void 0&&(i&2||i&4)&&$s(n,t,l),o=o.next}while(o!==r)}Zt(e,t,n);break;case 1:if(!Ne&&(lr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){fe(n,t,a)}Zt(e,t,n);break;case 21:Zt(e,t,n);break;case 22:n.mode&1?(Ne=(r=Ne)||n.memoizedState!==null,Zt(e,t,n),Ne=r):Zt(e,t,n);break;default:Zt(e,t,n)}}function uf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Pv),t.forEach(function(r){var o=Tv.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function yt(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=l),r&=~i}if(r=o,r=de()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Cv(r/1960))-r,10e?16:e,ln===null)var r=!1;else{if(e=ln,ln=null,Zi=0,Q&6)throw Error(C(331));var o=Q;for(Q|=4,z=e.current;z!==null;){var i=z,l=i.child;if(z.flags&16){var a=i.deletions;if(a!==null){for(var s=0;sde()-ju?Tn(e,0):Ru|=n),He(e,t)}function cm(e,t){t===0&&(e.mode&1?(t=qo,qo<<=1,!(qo&130023424)&&(qo=4194304)):t=1);var n=Me();e=Wt(e,t),e!==null&&(zo(e,t,n),He(e,n))}function zv(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),cm(e,n)}function Tv(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(C(314))}r!==null&&r.delete(t),cm(e,n)}var fm;fm=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Be.current)Ue=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ue=!1,Sv(e,t,n);Ue=!!(e.flags&131072)}else Ue=!1,oe&&t.flags&1048576&&hh(t,Bi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ei(e,t),e=t.pendingProps;var o=wr(t,ze.current);pr(t,n),o=Eu(null,t,r,e,o,n);var i=Pu();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ve(r)?(i=!0,Fi(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,vu(t),o.updater=Rl,t.stateNode=o,o._reactInternals=t,Ss(t,r,e,n),t=Ps(null,t,r,!0,i,n)):(t.tag=0,oe&&i&&fu(t),Ie(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ei(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=Mv(r),e=gt(r,e),o){case 0:t=Es(null,t,r,e,n);break e;case 1:t=rf(null,t,r,e,n);break e;case 11:t=tf(null,t,r,e,n);break e;case 14:t=nf(null,t,r,gt(r.type,e),n);break e}throw Error(C(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:gt(r,o),Es(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:gt(r,o),rf(e,t,r,o,n);case 3:e:{if(Kh(t),e===null)throw Error(C(387));r=t.pendingProps,i=t.memoizedState,o=i.element,vh(e,t),Wi(t,r,null,n);var l=t.memoizedState;if(r=l.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Er(Error(C(423)),t),t=of(e,t,r,n,o);break e}else if(r!==o){o=Er(Error(C(424)),t),t=of(e,t,r,n,o);break e}else for(Ze=fn(t.stateNode.containerInfo.firstChild),Je=t,oe=!0,wt=null,n=xh(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(_r(),r===o){t=Gt(e,t,n);break e}Ie(e,t,r,n)}t=t.child}return t;case 5:return Eh(t),e===null&&vs(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,l=o.children,ps(r,o)?l=null:i!==null&&ps(r,i)&&(t.flags|=32),Qh(e,t),Ie(e,t,l,n),t.child;case 6:return e===null&&vs(t),null;case 13:return Xh(e,t,n);case 4:return wu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Sr(t,null,r,n):Ie(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:gt(r,o),tf(e,t,r,o,n);case 7:return Ie(e,t,t.pendingProps,n),t.child;case 8:return Ie(e,t,t.pendingProps.children,n),t.child;case 12:return Ie(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,l=o.value,te(Vi,r._currentValue),r._currentValue=l,i!==null)if(xt(i.value,l)){if(i.children===o.children&&!Be.current){t=Gt(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){l=i.child;for(var s=a.firstContext;s!==null;){if(s.context===r){if(i.tag===1){s=Bt(-1,n&-n),s.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?s.next=s:(s.next=d.next,d.next=s),u.pending=s}}i.lanes|=n,s=i.alternate,s!==null&&(s.lanes|=n),ws(i.return,n,t),a.lanes|=n;break}s=s.next}}else if(i.tag===10)l=i.type===t.type?null:i.child;else if(i.tag===18){if(l=i.return,l===null)throw Error(C(341));l.lanes|=n,a=l.alternate,a!==null&&(a.lanes|=n),ws(l,n,t),l=i.sibling}else l=i.child;if(l!==null)l.return=i;else for(l=i;l!==null;){if(l===t){l=null;break}if(i=l.sibling,i!==null){i.return=l.return,l=i;break}l=l.return}i=l}Ie(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,pr(t,n),o=ct(o),r=r(o),t.flags|=1,Ie(e,t,r,n),t.child;case 14:return r=t.type,o=gt(r,t.pendingProps),o=gt(r.type,o),nf(e,t,r,o,n);case 15:return Wh(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:gt(r,o),Ei(e,t),t.tag=1,Ve(r)?(e=!0,Fi(t)):e=!1,pr(t,n),_h(t,r,o),Ss(t,r,o,n),Ps(null,t,r,!0,e,n);case 19:return Yh(e,t,n);case 22:return Gh(e,t,n)}throw Error(C(156,t.tag))};function dm(e,t){return Dp(e,t)}function Iv(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function st(e,t,n,r){return new Iv(e,t,n,r)}function Tu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Mv(e){if(typeof e=="function")return Tu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===qs)return 11;if(e===eu)return 14}return 2}function mn(e,t){var n=e.alternate;return n===null?(n=st(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Oi(e,t,n,r,o,i){var l=2;if(r=e,typeof e=="function")Tu(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case Zn:return In(n.children,o,i,t);case Js:l=8,o|=8;break;case Wa:return e=st(12,n,t,o|2),e.elementType=Wa,e.lanes=i,e;case Ga:return e=st(13,n,t,o),e.elementType=Ga,e.lanes=i,e;case Qa:return e=st(19,n,t,o),e.elementType=Qa,e.lanes=i,e;case Sp:return zl(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case wp:l=10;break e;case _p:l=9;break e;case qs:l=11;break e;case eu:l=14;break e;case en:l=16,r=null;break e}throw Error(C(130,e==null?e:typeof e,""))}return t=st(l,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function In(e,t,n,r){return e=st(7,e,r,t),e.lanes=n,e}function zl(e,t,n,r){return e=st(22,e,r,t),e.elementType=Sp,e.lanes=n,e.stateNode={isHidden:!1},e}function ja(e,t,n){return e=st(6,e,null,t),e.lanes=n,e}function ba(e,t,n){return t=st(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Lv(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=fa(0),this.expirationTimes=fa(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fa(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Iu(e,t,n,r,o,i,l,a,s){return e=new Lv(e,t,n,a,s),t===1?(t=1,i===!0&&(t|=8)):t=0,i=st(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},vu(i),e}function Dv(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=tt})(Ag);var gf=Ba;Ua.createRoot=gf.createRoot,Ua.hydrateRoot=gf.hydrateRoot;/** + * @remix-run/router v1.3.1 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Y(){return Y=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Hv(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Wv(){return Math.random().toString(36).substr(2,8)}function wf(e,t){return{usr:e.state,key:e.key,idx:t}}function Co(e,t,n,r){return n===void 0&&(n=null),Y({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?zt(t):t,{state:n,key:t&&t.key||r||Wv()})}function Bn(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function zt(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Gv(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,l=o.history,a=pe.Pop,s=null,u=d();u==null&&(u=0,l.replaceState(Y({},l.state,{idx:u}),""));function d(){return(l.state||{idx:null}).idx}function m(){a=pe.Pop;let E=d(),p=E==null?null:E-u;u=E,s&&s({action:a,location:v.location,delta:p})}function c(E,p){a=pe.Push;let f=Co(v.location,E,p);n&&n(f,E),u=d()+1;let h=wf(f,u),w=v.createHref(f);try{l.pushState(h,"",w)}catch{o.location.assign(w)}i&&s&&s({action:a,location:v.location,delta:1})}function y(E,p){a=pe.Replace;let f=Co(v.location,E,p);n&&n(f,E),u=d();let h=wf(f,u),w=v.createHref(f);l.replaceState(h,"",w),i&&s&&s({action:a,location:v.location,delta:0})}function g(E){let p=o.location.origin!=="null"?o.location.origin:o.location.href,f=typeof E=="string"?E:Bn(E);return B(p,"No window.location.(origin|href) available to create URL for href: "+f),new URL(f,p)}let v={get action(){return a},get location(){return e(o,l)},listen(E){if(s)throw new Error("A history only accepts one active listener");return o.addEventListener(vf,m),s=E,()=>{o.removeEventListener(vf,m),s=null}},createHref(E){return t(o,E)},createURL:g,encodeLocation(E){let p=g(E);return{pathname:p.pathname,search:p.search,hash:p.hash}},push:c,replace:y,go(E){return l.go(E)}};return v}var Pe;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Pe||(Pe={}));function Qv(e){return e.index===!0}function ym(e,t,n){return t===void 0&&(t=[]),n===void 0&&(n=new Set),e.map((r,o)=>{let i=[...t,o],l=typeof r.id=="string"?r.id:i.join("-");return B(r.index!==!0||!r.children,"Cannot specify children on an index route"),B(!n.has(l),'Found a route id collision on id "'+l+`". Route id's must be globally unique within Data Router usages`),n.add(l),Qv(r)?Y({},r,{id:l}):Y({},r,{id:l,children:r.children?ym(r.children,i,n):void 0})})}function Xr(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?zt(t):t,o=wm(r.pathname||"/",n);if(o==null)return null;let i=gm(e);Kv(i);let l=null;for(let a=0;l==null&&a{let s={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:l,route:i};s.relativePath.startsWith("/")&&(B(s.relativePath.startsWith(r),'Absolute route path "'+s.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),s.relativePath=s.relativePath.slice(r.length));let u=Mn([r,s.relativePath]),d=n.concat(s);i.children&&i.children.length>0&&(B(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),gm(i.children,t,d,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:t1(u,i.index),routesMeta:d})};return e.forEach((i,l)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))o(i,l);else for(let s of vm(i.path))o(i,l,s)}),t}function vm(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let l=vm(r.join("/")),a=[];return a.push(...l.map(s=>s===""?i:[i,s].join("/"))),o&&a.push(...l),a.map(s=>e.startsWith("/")&&s===""?"/":s)}function Kv(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:n1(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Xv=/^:\w+$/,Yv=3,Zv=2,Jv=1,qv=10,e1=-2,_f=e=>e==="*";function t1(e,t){let n=e.split("/"),r=n.length;return n.some(_f)&&(r+=e1),t&&(r+=Zv),n.filter(o=>!_f(o)).reduce((o,i)=>o+(Xv.test(i)?Yv:i===""?Jv:qv),r)}function n1(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function r1(e,t){let{routesMeta:n}=e,r={},o="/",i=[];for(let l=0;l{if(d==="*"){let c=a[m]||"";l=i.slice(0,i.length-c.length).replace(/(.)\/+$/,"$1")}return u[d]=a1(a[m]||"",d),u},{}),pathname:i,pathnameBase:l,pattern:e}}function i1(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),$o(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(l,a)=>(r.push(a),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function l1(e){try{return decodeURI(e)}catch(t){return $o(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function a1(e,t){try{return decodeURIComponent(e)}catch(n){return $o(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function wm(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function $o(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function s1(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?zt(e):e;return{pathname:n?n.startsWith("/")?n:u1(n,t):t,search:d1(r),hash:p1(o)}}function u1(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Na(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function _m(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function c1(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=zt(e):(o=Y({},e),B(!o.pathname||!o.pathname.includes("?"),Na("?","pathname","search",o)),B(!o.pathname||!o.pathname.includes("#"),Na("#","pathname","hash",o)),B(!o.search||!o.search.includes("#"),Na("#","search","hash",o)));let i=e===""||o.pathname==="",l=i?"/":o.pathname,a;if(r||l==null)a=n;else{let m=t.length-1;if(l.startsWith("..")){let c=l.split("/");for(;c[0]==="..";)c.shift(),m-=1;o.pathname=c.join("/")}a=m>=0?t[m]:"/"}let s=s1(o,a),u=l&&l!=="/"&&l.endsWith("/"),d=(i||l===".")&&n.endsWith("/");return!s.pathname.endsWith("/")&&(u||d)&&(s.pathname+="/"),s}const Mn=e=>e.join("/").replace(/\/\/+/g,"/"),f1=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),d1=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,p1=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Sf extends Error{}class h1{constructor(t,n){this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],B(t&&typeof t=="object"&&!Array.isArray(t),"defer() only accepts plain objects");let r;this.abortPromise=new Promise((i,l)=>r=l),this.controller=new AbortController;let o=()=>r(new Sf("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",o),this.controller.signal.addEventListener("abort",o),this.data=Object.entries(t).reduce((i,l)=>{let[a,s]=l;return Object.assign(i,{[a]:this.trackPromise(a,s)})},{}),this.done&&this.unlistenAbortSignal(),this.init=n}trackPromise(t,n){if(!(n instanceof Promise))return n;this.deferredKeys.push(t),this.pendingKeysSet.add(t);let r=Promise.race([n,this.abortPromise]).then(o=>this.onSettle(r,t,null,o),o=>this.onSettle(r,t,o));return r.catch(()=>{}),Object.defineProperty(r,"_tracked",{get:()=>!0}),r}onSettle(t,n,r,o){return this.controller.signal.aborted&&r instanceof Sf?(this.unlistenAbortSignal(),Object.defineProperty(t,"_error",{get:()=>r}),Promise.reject(r)):(this.pendingKeysSet.delete(n),this.done&&this.unlistenAbortSignal(),r?(Object.defineProperty(t,"_error",{get:()=>r}),this.emit(!1,n),Promise.reject(r)):(Object.defineProperty(t,"_data",{get:()=>o}),this.emit(!1,n),o))}emit(t,n){this.subscribers.forEach(r=>r(t,n))}subscribe(t){return this.subscribers.add(t),()=>this.subscribers.delete(t)}cancel(){this.controller.abort(),this.pendingKeysSet.forEach((t,n)=>this.pendingKeysSet.delete(n)),this.emit(!0)}async resolveData(t){let n=!1;if(!this.done){let r=()=>this.cancel();t.addEventListener("abort",r),n=await new Promise(o=>{this.subscribe(i=>{t.removeEventListener("abort",r),(i||this.done)&&o(i)})})}return n}get done(){return this.pendingKeysSet.size===0}get unwrappedData(){return B(this.data!==null&&this.done,"Can only unwrap data on initialized and settled deferreds"),Object.entries(this.data).reduce((t,n)=>{let[r,o]=n;return Object.assign(t,{[r]:y1(o)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}function m1(e){return e instanceof Promise&&e._tracked===!0}function y1(e){if(!m1(e))return e;if(e._error)throw e._error;return e._data}class Au{constructor(t,n,r,o){o===void 0&&(o=!1),this.status=t,this.statusText=n||"",this.internal=o,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Sm(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const xm=["post","put","patch","delete"],g1=new Set(xm),v1=["get",...xm],w1=new Set(v1),_1=new Set([301,302,303,307,308]),S1=new Set([307,308]),za={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},x1={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},xf={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Em=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",E1=!Em;function P1(e){B(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let t=ym(e.routes),n=null,r=new Set,o=null,i=null,l=null,a=e.hydrationData!=null,s=Xr(t,e.history.location,e.basename),u=null;if(s==null){let _=Jt(404,{pathname:e.history.location.pathname}),{matches:S,route:O}=$f(t);s=S,u={[O.id]:_}}let d=!s.some(_=>_.route.loader)||e.hydrationData!=null,m,c={historyAction:e.history.action,location:e.history.location,matches:s,initialized:d,navigation:za,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||u,fetchers:new Map,blockers:new Map},y=pe.Pop,g=!1,v,E=!1,p=!1,f=[],h=[],w=new Map,P=0,$=-1,k=new Map,b=new Set,V=new Map,I=new Map,Z=null,ye=new Map,Ke=!1;function Gn(){return n=e.history.listen(_=>{let{action:S,location:O,delta:M}=_;if(Ke){Ke=!1;return}$o(Z!=null&&M===null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let T=ic({currentLocation:c.location,nextLocation:O,historyAction:S});if(T&&M!=null){Ke=!0,e.history.go(M*-1),Ho(T,{state:"blocked",location:O,proceed(){Ho(T,{state:"proceeding",proceed:void 0,reset:void 0,location:O}),e.history.go(M)},reset(){br(T),se({blockers:new Map(m.state.blockers)})}});return}return K(S,O)}),c.initialized||K(pe.Pop,c.location),m}function jr(){n&&n(),r.clear(),v&&v.abort(),c.fetchers.forEach((_,S)=>ta(S)),c.blockers.forEach((_,S)=>br(S))}function Sn(_){return r.add(_),()=>r.delete(_)}function se(_){c=Y({},c,_),r.forEach(S=>S(c))}function N(_,S){var O,M;let T=c.actionData!=null&&c.navigation.formMethod!=null&&Dt(c.navigation.formMethod)&&c.navigation.state==="loading"&&((O=_.state)==null?void 0:O._isRedirect)!==!0,F;S.actionData?Object.keys(S.actionData).length>0?F=S.actionData:F=null:T?F=c.actionData:F=null;let A=S.loaderData?Cf(c.loaderData,S.loaderData,S.matches||[],S.errors):c.loaderData;for(let[L]of ye)br(L);let G=g===!0||c.navigation.formMethod!=null&&Dt(c.navigation.formMethod)&&((M=_.state)==null?void 0:M._isRedirect)!==!0;se(Y({},S,{actionData:F,loaderData:A,historyAction:y,location:_,initialized:!0,navigation:za,revalidation:"idle",restoreScrollPosition:lc(_,S.matches||c.matches),preventScrollReset:G,blockers:new Map(c.blockers)})),E||y===pe.Pop||(y===pe.Push?e.history.push(_,_.state):y===pe.Replace&&e.history.replace(_,_.state)),y=pe.Pop,g=!1,E=!1,p=!1,f=[],h=[]}async function D(_,S){if(typeof _=="number"){e.history.go(_);return}let{path:O,submission:M,error:T}=Ef(_,S),F=c.location,A=Co(c.location,O,S&&S.state);A=Y({},A,e.history.encodeLocation(A));let G=S&&S.replace!=null?S.replace:void 0,L=pe.Push;G===!0?L=pe.Replace:G===!1||M!=null&&Dt(M.formMethod)&&M.formAction===c.location.pathname+c.location.search&&(L=pe.Replace);let Te=S&&"preventScrollReset"in S?S.preventScrollReset===!0:void 0,W=ic({currentLocation:F,nextLocation:A,historyAction:L});if(W){Ho(W,{state:"blocked",location:A,proceed(){Ho(W,{state:"proceeding",proceed:void 0,reset:void 0,location:A}),D(_,S)},reset(){br(W),se({blockers:new Map(c.blockers)})}});return}return await K(L,A,{submission:M,pendingError:T,preventScrollReset:Te,replace:S&&S.replace})}function U(){if(Bo(),se({revalidation:"loading"}),c.navigation.state!=="submitting"){if(c.navigation.state==="idle"){K(c.historyAction,c.location,{startUninterruptedRevalidation:!0});return}K(y||c.historyAction,c.navigation.location,{overrideNavigation:c.navigation})}}async function K(_,S,O){v&&v.abort(),v=null,y=_,E=(O&&O.startUninterruptedRevalidation)===!0,sg(c.location,c.matches),g=(O&&O.preventScrollReset)===!0;let M=O&&O.overrideNavigation,T=Xr(t,S,e.basename);if(!T){let ce=Jt(404,{pathname:S.pathname}),{matches:ht,route:mt}=$f(t);na(),N(S,{matches:ht,loaderData:{},errors:{[mt.id]:ce}});return}if(R1(c.location,S)&&!(O&&O.submission&&Dt(O.submission.formMethod))){N(S,{matches:T});return}v=new AbortController;let F=Br(e.history,S,v.signal,O&&O.submission),A,G;if(O&&O.pendingError)G={[sr(T).route.id]:O.pendingError};else if(O&&O.submission&&Dt(O.submission.formMethod)){let ce=await ue(F,S,O.submission,T,{replace:O.replace});if(ce.shortCircuited)return;A=ce.pendingActionData,G=ce.pendingActionError,M=Y({state:"loading",location:S},O.submission),F=new Request(F.url,{signal:F.signal})}let{shortCircuited:L,loaderData:Te,errors:W}=await Xt(F,S,T,M,O&&O.submission,O&&O.replace,A,G);L||(v=null,N(S,Y({matches:T},A?{actionData:A}:{},{loaderData:Te,errors:W})))}async function ue(_,S,O,M,T){Bo();let F=Y({state:"submitting",location:S},O);se({navigation:F});let A,G=Nf(M,S);if(!G.route.action)A={type:Pe.error,error:Jt(405,{method:_.method,pathname:S.pathname,routeId:G.route.id})};else if(A=await Ur("action",_,G,M,m.basename),_.signal.aborted)return{shortCircuited:!0};if(mr(A)){let L;return T&&T.replace!=null?L=T.replace:L=A.location===c.location.pathname+c.location.search,await En(c,A,{submission:O,replace:L}),{shortCircuited:!0}}if(io(A)){let L=sr(M,G.route.id);return(T&&T.replace)!==!0&&(y=pe.Push),{pendingActionData:{},pendingActionError:{[L.route.id]:A.error}}}if(Nn(A))throw Jt(400,{type:"defer-action"});return{pendingActionData:{[G.route.id]:A.data}}}async function Xt(_,S,O,M,T,F,A,G){let L=M;L||(L=Y({state:"loading",location:S,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},T));let Te=T||(L.formMethod&&L.formAction&&L.formData&&L.formEncType?{formMethod:L.formMethod,formAction:L.formAction,formData:L.formData,formEncType:L.formEncType}:void 0),[W,ce]=Pf(e.history,c,O,Te,S,p,f,h,A,G,V);if(na($e=>!(O&&O.some(Pt=>Pt.route.id===$e))||W&&W.some(Pt=>Pt.route.id===$e)),W.length===0&&ce.length===0)return N(S,Y({matches:O,loaderData:{},errors:G||null},A?{actionData:A}:{})),{shortCircuited:!0};if(!E){ce.forEach(Pt=>{let Pn=c.fetchers.get(Pt.key),Qo={state:"loading",data:Pn&&Pn.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};c.fetchers.set(Pt.key,Qo)});let $e=A||c.actionData;se(Y({navigation:L},$e?Object.keys($e).length===0?{actionData:null}:{actionData:$e}:{},ce.length>0?{fetchers:new Map(c.fetchers)}:{}))}$=++P,ce.forEach($e=>w.set($e.key,v));let{results:ht,loaderResults:mt,fetcherResults:Nr}=await Uo(c.matches,O,W,ce,_);if(_.signal.aborted)return{shortCircuited:!0};ce.forEach($e=>w.delete($e.key));let Wo=Rf(ht);if(Wo)return await En(c,Wo,{replace:F}),{shortCircuited:!0};let{loaderData:Go,errors:Qn}=Of(c,O,W,mt,G,ce,Nr,I);I.forEach(($e,Pt)=>{$e.subscribe(Pn=>{(Pn||$e.done)&&I.delete(Pt)})}),ig();let ra=oc($);return Y({loaderData:Go,errors:Qn},ra||ce.length>0?{fetchers:new Map(c.fetchers)}:{})}function it(_){return c.fetchers.get(_)||x1}function xn(_,S,O,M){if(E1)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");w.has(_)&&Vo(_);let T=Xr(t,O,e.basename);if(!T){ea(_,S,Jt(404,{pathname:O}));return}let{path:F,submission:A}=Ef(O,M,!0),G=Nf(T,F);if(g=(M&&M.preventScrollReset)===!0,A&&Dt(A.formMethod)){pt(_,S,F,G,T,A);return}V.set(_,{routeId:S,path:F,match:G,matches:T}),Yt(_,S,F,G,T,A)}async function pt(_,S,O,M,T,F){if(Bo(),V.delete(_),!M.route.action){let Tt=Jt(405,{method:F.formMethod,pathname:O,routeId:S});ea(_,S,Tt);return}let A=c.fetchers.get(_),G=Y({state:"submitting"},F,{data:A&&A.data," _hasFetcherDoneAnything ":!0});c.fetchers.set(_,G),se({fetchers:new Map(c.fetchers)});let L=new AbortController,Te=Br(e.history,O,L.signal,F);w.set(_,L);let W=await Ur("action",Te,M,T,m.basename);if(Te.signal.aborted){w.get(_)===L&&w.delete(_);return}if(mr(W)){w.delete(_),b.add(_);let Tt=Y({state:"loading"},F,{data:void 0," _hasFetcherDoneAnything ":!0});return c.fetchers.set(_,Tt),se({fetchers:new Map(c.fetchers)}),En(c,W,{isFetchActionRedirect:!0})}if(io(W)){ea(_,S,W.error);return}if(Nn(W))throw Jt(400,{type:"defer-action"});let ce=c.navigation.location||c.location,ht=Br(e.history,ce,L.signal),mt=c.navigation.state!=="idle"?Xr(t,c.navigation.location,e.basename):c.matches;B(mt,"Didn't find any matches after fetcher action");let Nr=++P;k.set(_,Nr);let Wo=Y({state:"loading",data:W.data},F,{" _hasFetcherDoneAnything ":!0});c.fetchers.set(_,Wo);let[Go,Qn]=Pf(e.history,c,mt,F,ce,p,f,h,{[M.route.id]:W.data},void 0,V);Qn.filter(Tt=>Tt.key!==_).forEach(Tt=>{let ia=Tt.key,ac=c.fetchers.get(ia),fg={state:"loading",data:ac&&ac.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};c.fetchers.set(ia,fg),w.set(ia,L)}),se({fetchers:new Map(c.fetchers)});let{results:ra,loaderResults:$e,fetcherResults:Pt}=await Uo(c.matches,mt,Go,Qn,ht);if(L.signal.aborted)return;k.delete(_),w.delete(_),Qn.forEach(Tt=>w.delete(Tt.key));let Pn=Rf(ra);if(Pn)return En(c,Pn);let{loaderData:Qo,errors:oa}=Of(c,c.matches,Go,$e,void 0,Qn,Pt,I),ug={state:"idle",data:W.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};c.fetchers.set(_,ug);let cg=oc(Nr);c.navigation.state==="loading"&&Nr>$?(B(y,"Expected pending action"),v&&v.abort(),N(c.navigation.location,{matches:mt,loaderData:Qo,errors:oa,fetchers:new Map(c.fetchers)})):(se(Y({errors:oa,loaderData:Cf(c.loaderData,Qo,mt,oa)},cg?{fetchers:new Map(c.fetchers)}:{})),p=!1)}async function Yt(_,S,O,M,T,F){let A=c.fetchers.get(_),G=Y({state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},F,{data:A&&A.data," _hasFetcherDoneAnything ":!0});c.fetchers.set(_,G),se({fetchers:new Map(c.fetchers)});let L=new AbortController,Te=Br(e.history,O,L.signal);w.set(_,L);let W=await Ur("loader",Te,M,T,m.basename);if(Nn(W)&&(W=await Cm(W,Te.signal,!0)||W),w.get(_)===L&&w.delete(_),Te.signal.aborted)return;if(mr(W)){await En(c,W);return}if(io(W)){let ht=sr(c.matches,S);c.fetchers.delete(_),se({fetchers:new Map(c.fetchers),errors:{[ht.route.id]:W.error}});return}B(!Nn(W),"Unhandled fetcher deferred data");let ce={state:"idle",data:W.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};c.fetchers.set(_,ce),se({fetchers:new Map(c.fetchers)})}async function En(_,S,O){var M;let{submission:T,replace:F,isFetchActionRedirect:A}=O===void 0?{}:O;S.revalidate&&(p=!0);let G=Co(_.location,S.location,Y({_isRedirect:!0},A?{_isFetchActionRedirect:!0}:{}));if(B(G,"Expected a location on the redirect navigation"),Em&&typeof((M=window)==null?void 0:M.location)<"u"){let mt=e.history.createURL(S.location).origin;if(window.location.origin!==mt){F?window.location.replace(S.location):window.location.assign(S.location);return}}v=null;let L=F===!0?pe.Replace:pe.Push,{formMethod:Te,formAction:W,formEncType:ce,formData:ht}=_.navigation;!T&&Te&&W&&ht&&ce&&(T={formMethod:Te,formAction:W,formEncType:ce,formData:ht}),S1.has(S.status)&&T&&Dt(T.formMethod)?await K(L,G,{submission:Y({},T,{formAction:S.location}),preventScrollReset:g}):await K(L,G,{overrideNavigation:{state:"loading",location:G,formMethod:T?T.formMethod:void 0,formAction:T?T.formAction:void 0,formEncType:T?T.formEncType:void 0,formData:T?T.formData:void 0},preventScrollReset:g})}async function Uo(_,S,O,M,T){let F=await Promise.all([...O.map(L=>Ur("loader",T,L,S,m.basename)),...M.map(L=>Ur("loader",Br(e.history,L.path,T.signal),L.match,L.matches,m.basename))]),A=F.slice(0,O.length),G=F.slice(O.length);return await Promise.all([jf(_,O,A,T.signal,!1,c.loaderData),jf(_,M.map(L=>L.match),G,T.signal,!0)]),{results:F,loaderResults:A,fetcherResults:G}}function Bo(){p=!0,f.push(...na()),V.forEach((_,S)=>{w.has(S)&&(h.push(S),Vo(S))})}function ea(_,S,O){let M=sr(c.matches,S);ta(_),se({errors:{[M.route.id]:O},fetchers:new Map(c.fetchers)})}function ta(_){w.has(_)&&Vo(_),V.delete(_),k.delete(_),b.delete(_),c.fetchers.delete(_)}function Vo(_){let S=w.get(_);B(S,"Expected fetch controller: "+_),S.abort(),w.delete(_)}function rc(_){for(let S of _){let M={state:"idle",data:it(S).data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};c.fetchers.set(S,M)}}function ig(){let _=[];for(let S of b){let O=c.fetchers.get(S);B(O,"Expected fetcher: "+S),O.state==="loading"&&(b.delete(S),_.push(S))}rc(_)}function oc(_){let S=[];for(let[O,M]of k)if(M<_){let T=c.fetchers.get(O);B(T,"Expected fetcher: "+O),T.state==="loading"&&(Vo(O),k.delete(O),S.push(O))}return rc(S),S.length>0}function lg(_,S){let O=c.blockers.get(_)||xf;return ye.get(_)!==S&&(ye.set(_,S),Z==null?Z=_:_!==Z&&$o(!1,"A router only supports one blocker at a time")),O}function br(_){c.blockers.delete(_),ye.delete(_),Z===_&&(Z=null)}function Ho(_,S){let O=c.blockers.get(_)||xf;B(O.state==="unblocked"&&S.state==="blocked"||O.state==="blocked"&&S.state==="blocked"||O.state==="blocked"&&S.state==="proceeding"||O.state==="blocked"&&S.state==="unblocked"||O.state==="proceeding"&&S.state==="unblocked","Invalid blocker state transition: "+O.state+" -> "+S.state),c.blockers.set(_,S),se({blockers:new Map(c.blockers)})}function ic(_){let{currentLocation:S,nextLocation:O,historyAction:M}=_;if(Z==null)return;let T=ye.get(Z);B(T,"Could not find a function for the active blocker");let F=c.blockers.get(Z);if(!(F&&F.state==="proceeding")&&T({currentLocation:S,nextLocation:O,historyAction:M}))return Z}function na(_){let S=[];return I.forEach((O,M)=>{(!_||_(M))&&(O.cancel(),S.push(M),I.delete(M))}),S}function ag(_,S,O){if(o=_,l=S,i=O||(M=>M.key),!a&&c.navigation===za){a=!0;let M=lc(c.location,c.matches);M!=null&&se({restoreScrollPosition:M})}return()=>{o=null,l=null,i=null}}function sg(_,S){if(o&&i&&l){let O=S.map(T=>bf(T,c.loaderData)),M=i(_,O)||_.key;o[M]=l()}}function lc(_,S){if(o&&i&&l){let O=S.map(F=>bf(F,c.loaderData)),M=i(_,O)||_.key,T=o[M];if(typeof T=="number")return T}return null}return m={get basename(){return e.basename},get state(){return c},get routes(){return t},initialize:Gn,subscribe:Sn,enableScrollRestoration:ag,navigate:D,fetch:xn,revalidate:U,createHref:_=>e.history.createHref(_),encodeLocation:_=>e.history.encodeLocation(_),getFetcher:it,deleteFetcher:ta,dispose:jr,getBlocker:lg,deleteBlocker:br,_internalFetchControllers:w,_internalActiveDeferreds:I},m}function k1(e){return e!=null&&"formData"in e}function Ef(e,t,n){n===void 0&&(n=!1);let r=typeof e=="string"?e:Bn(e);if(!t||!k1(t))return{path:r};if(t.formMethod&&!b1(t.formMethod))return{path:r,error:Jt(405,{method:t.formMethod})};let o;if(t.formData&&(o={formMethod:t.formMethod||"get",formAction:Om(r),formEncType:t&&t.formEncType||"application/x-www-form-urlencoded",formData:t.formData},Dt(o.formMethod)))return{path:r,submission:o};let i=zt(r),l=km(t.formData);return n&&i.search&&$m(i.search)&&l.append("index",""),i.search="?"+l,{path:Bn(i),submission:o}}function O1(e,t){let n=e;if(t){let r=e.findIndex(o=>o.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function Pf(e,t,n,r,o,i,l,a,s,u,d){let m=u?Object.values(u)[0]:s?Object.values(s)[0]:void 0,c=e.createURL(t.location),y=e.createURL(o),g=i||c.toString()===y.toString()||c.search!==y.search,v=u?Object.keys(u)[0]:void 0,p=O1(n,v).filter((h,w)=>{if(h.route.loader==null)return!1;if(C1(t.loaderData,t.matches[w],h)||l.some(k=>k===h.route.id))return!0;let P=t.matches[w],$=h;return kf(h,Y({currentUrl:c,currentParams:P.params,nextUrl:y,nextParams:$.params},r,{actionResult:m,defaultShouldRevalidate:g||Pm(P,$)}))}),f=[];return d&&d.forEach((h,w)=>{if(n.some(P=>P.route.id===h.routeId))a.includes(w)?f.push(Y({key:w},h)):kf(h.match,Y({currentUrl:c,currentParams:t.matches[t.matches.length-1].params,nextUrl:y,nextParams:n[n.length-1].params},r,{actionResult:m,defaultShouldRevalidate:g}))&&f.push(Y({key:w},h));else return}),[p,f]}function C1(e,t,n){let r=!t||n.route.id!==t.route.id,o=e[n.route.id]===void 0;return r||o}function Pm(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function kf(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function Ur(e,t,n,r,o,i,l,a){o===void 0&&(o="/"),i===void 0&&(i=!1),l===void 0&&(l=!1);let s,u,d,m=new Promise((y,g)=>d=g),c=()=>d();t.signal.addEventListener("abort",c);try{let y=n.route[e];B(y,"Could not find the "+e+' to run on the "'+n.route.id+'" route'),u=await Promise.race([y({request:t,params:n.params,context:a}),m]),B(u!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(y){s=Pe.error,u=y}finally{t.signal.removeEventListener("abort",c)}if(j1(u)){let y=u.status;if(_1.has(y)){let E=u.headers.get("Location");if(B(E,"Redirects returned/thrown from loaders/actions must have a Location header"),/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i.test(E)){if(!i){let f=new URL(t.url),h=E.startsWith("//")?new URL(f.protocol+E):new URL(E);h.origin===f.origin&&(E=h.pathname+h.search+h.hash)}}else{let f=r.slice(0,r.indexOf(n)+1),h=_m(f).map(P=>P.pathnameBase),w=c1(E,h,new URL(t.url).pathname);if(B(Bn(w),"Unable to resolve redirect location: "+E),o){let P=w.pathname;w.pathname=P==="/"?o:Mn([o,P])}E=Bn(w)}if(i)throw u.headers.set("Location",E),u;return{type:Pe.redirect,status:y,location:E,revalidate:u.headers.get("X-Remix-Revalidate")!==null}}if(l)throw{type:s||Pe.data,response:u};let g,v=u.headers.get("Content-Type");return v&&/\bapplication\/json\b/.test(v)?g=await u.json():g=await u.text(),s===Pe.error?{type:s,error:new Au(y,u.statusText,g),headers:u.headers}:{type:Pe.data,data:g,statusCode:u.status,headers:u.headers}}return s===Pe.error?{type:s,error:u}:u instanceof h1?{type:Pe.deferred,deferredData:u}:{type:Pe.data,data:u}}function Br(e,t,n,r){let o=e.createURL(Om(t)).toString(),i={signal:n};if(r&&Dt(r.formMethod)){let{formMethod:l,formEncType:a,formData:s}=r;i.method=l.toUpperCase(),i.body=a==="application/x-www-form-urlencoded"?km(s):s}return new Request(o,i)}function km(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,r instanceof File?r.name:r);return t}function $1(e,t,n,r,o){let i={},l=null,a,s=!1,u={};return n.forEach((d,m)=>{let c=t[m].route.id;if(B(!mr(d),"Cannot handle redirect results in processLoaderData"),io(d)){let y=sr(e,c),g=d.error;r&&(g=Object.values(r)[0],r=void 0),l=l||{},l[y.route.id]==null&&(l[y.route.id]=g),i[c]=void 0,s||(s=!0,a=Sm(d.error)?d.error.status:500),d.headers&&(u[c]=d.headers)}else Nn(d)?(o.set(c,d.deferredData),i[c]=d.deferredData.data):i[c]=d.data,d.statusCode!=null&&d.statusCode!==200&&!s&&(a=d.statusCode),d.headers&&(u[c]=d.headers)}),r&&(l=r,i[Object.keys(r)[0]]=void 0),{loaderData:i,errors:l,statusCode:a||200,loaderHeaders:u}}function Of(e,t,n,r,o,i,l,a){let{loaderData:s,errors:u}=$1(t,n,r,o,a);for(let d=0;dr.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function $f(e){let t=e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Jt(e,t){let{pathname:n,routeId:r,method:o,type:i}=t===void 0?{}:t,l="Unknown Server Error",a="Unknown @remix-run/router error";return e===400?(l="Bad Request",o&&n&&r?a="You made a "+o+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":i==="defer-action"&&(a="defer() is not supported in actions")):e===403?(l="Forbidden",a='Route "'+r+'" does not match URL "'+n+'"'):e===404?(l="Not Found",a='No route matches URL "'+n+'"'):e===405&&(l="Method Not Allowed",o&&n&&r?a="You made a "+o.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":o&&(a='Invalid request method "'+o.toUpperCase()+'"')),new Au(e||500,l,new Error(a),!0)}function Rf(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(mr(n))return n}}function Om(e){let t=typeof e=="string"?zt(e):e;return Bn(Y({},t,{hash:""}))}function R1(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash!==t.hash}function Nn(e){return e.type===Pe.deferred}function io(e){return e.type===Pe.error}function mr(e){return(e&&e.type)===Pe.redirect}function j1(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function b1(e){return w1.has(e)}function Dt(e){return g1.has(e)}async function jf(e,t,n,r,o,i){for(let l=0;lm.route.id===s.route.id),d=u!=null&&!Pm(u,s)&&(i&&i[s.route.id])!==void 0;Nn(a)&&(o||d)&&await Cm(a,r,o).then(m=>{m&&(n[l]=m||n[l])})}}async function Cm(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:Pe.data,data:e.deferredData.unwrappedData}}catch(o){return{type:Pe.error,error:o}}return{type:Pe.data,data:e.deferredData.data}}}function $m(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function bf(e,t){let{route:n,pathname:r,params:o}=e;return{id:n.id,pathname:r,params:o,data:t[n.id],handle:n.handle}}function Nf(e,t){let n=typeof t=="string"?zt(t).search:t.search;if(e[e.length-1].route.index&&$m(n||""))return e[e.length-1];let r=_m(e);return r[r.length-1]}/** + * React Router v6.8.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function el(){return el=Object.assign?Object.assign.bind():function(e){for(var t=1;t{o.value=r,o.getSnapshot=t,Ta(o)&&i({inst:o})},[e,r,t]),I1(()=>(Ta(o)&&i({inst:o}),e(()=>{Ta(o)&&i({inst:o})})),[e]),L1(r),r}function Ta(e){const t=e.getSnapshot,n=e.value;try{const r=t();return!z1(n,r)}catch{return!0}}function A1(e,t,n){return t()}const F1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",U1=!F1,B1=U1?A1:D1,V1="useSyncExternalStore"in so?(e=>e.useSyncExternalStore)(so):B1,Fu=x.createContext(null),Uu=x.createContext(null),Rm=x.createContext(null),Dl=x.createContext(null),Al=x.createContext({outlet:null,matches:[]}),jm=x.createContext(null);function Bu(){return x.useContext(Dl)!=null}function H1(){return Bu()||B(!1),x.useContext(Dl).location}function W1(e,t){Bu()||B(!1);let{navigator:n}=x.useContext(Rm),r=x.useContext(Uu),{matches:o}=x.useContext(Al),i=o[o.length-1],l=i?i.params:{};i&&i.pathname;let a=i?i.pathnameBase:"/";i&&i.route;let s=H1(),u;if(t){var d;let v=typeof t=="string"?zt(t):t;a==="/"||(d=v.pathname)!=null&&d.startsWith(a)||B(!1),u=v}else u=s;let m=u.pathname||"/",c=a==="/"?m:m.slice(a.length)||"/",y=Xr(e,{pathname:c}),g=X1(y&&y.map(v=>Object.assign({},v,{params:Object.assign({},l,v.params),pathname:Mn([a,n.encodeLocation?n.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?a:Mn([a,n.encodeLocation?n.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),o,r||void 0);return t&&g?x.createElement(Dl.Provider,{value:{location:el({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:pe.Pop}},g):g}function G1(){let e=q1(),t=Sm(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},i=null;return x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},t),n?x.createElement("pre",{style:o},n):null,i)}class Q1 extends x.Component{constructor(t){super(t),this.state={location:t.location,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location?{error:t.error,location:t.location}:{error:t.error||n.error,location:n.location}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?x.createElement(Al.Provider,{value:this.props.routeContext},x.createElement(jm.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function K1(e){let{routeContext:t,match:n,children:r}=e,o=x.useContext(Fu);return o&&o.static&&o.staticContext&&n.route.errorElement&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),x.createElement(Al.Provider,{value:t},r)}function X1(e,t,n){if(t===void 0&&(t=[]),e==null)if(n!=null&&n.errors)e=n.matches;else return null;let r=e,o=n==null?void 0:n.errors;if(o!=null){let i=r.findIndex(l=>l.route.id&&(o==null?void 0:o[l.route.id]));i>=0||B(!1),r=r.slice(0,Math.min(r.length,i+1))}return r.reduceRight((i,l,a)=>{let s=l.route.id?o==null?void 0:o[l.route.id]:null,u=n?l.route.errorElement||x.createElement(G1,null):null,d=t.concat(r.slice(0,a+1)),m=()=>x.createElement(K1,{match:l,routeContext:{outlet:i,matches:d}},s?u:l.route.element!==void 0?l.route.element:i);return n&&(l.route.errorElement||a===0)?x.createElement(Q1,{location:n.location,component:u,error:s,children:m(),routeContext:{outlet:null,matches:d}}):m()},null)}var zf;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator"})(zf||(zf={}));var tl;(function(e){e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"})(tl||(tl={}));function Y1(e){let t=x.useContext(Uu);return t||B(!1),t}function Z1(e){let t=x.useContext(Al);return t||B(!1),t}function J1(e){let t=Z1(),n=t.matches[t.matches.length-1];return n.route.id||B(!1),n.route.id}function q1(){var e;let t=x.useContext(jm),n=Y1(tl.UseRouteError),r=J1(tl.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function ew(e){let{fallbackElement:t,router:n}=e,r=V1(n.subscribe,()=>n.state,()=>n.state),o=x.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:l=>n.navigate(l),push:(l,a,s)=>n.navigate(l,{state:a,preventScrollReset:s==null?void 0:s.preventScrollReset}),replace:(l,a,s)=>n.navigate(l,{replace:!0,state:a,preventScrollReset:s==null?void 0:s.preventScrollReset})}),[n]),i=n.basename||"/";return x.createElement(x.Fragment,null,x.createElement(Fu.Provider,{value:{router:n,navigator:o,static:!1,basename:i}},x.createElement(Uu.Provider,{value:r},x.createElement(nw,{basename:n.basename,location:n.state.location,navigationType:n.state.historyAction,navigator:o},n.state.initialized?x.createElement(rw,null):t))),null)}function tw(e){B(!1)}function nw(e){let{basename:t="/",children:n=null,location:r,navigationType:o=pe.Pop,navigator:i,static:l=!1}=e;Bu()&&B(!1);let a=t.replace(/^\/*/,"/"),s=x.useMemo(()=>({basename:a,navigator:i,static:l}),[a,i,l]);typeof r=="string"&&(r=zt(r));let{pathname:u="/",search:d="",hash:m="",state:c=null,key:y="default"}=r,g=x.useMemo(()=>{let v=wm(u,a);return v==null?null:{pathname:v,search:d,hash:m,state:c,key:y}},[a,u,d,m,c,y]);return g==null?null:x.createElement(Rm.Provider,{value:s},x.createElement(Dl.Provider,{children:n,value:{location:g,navigationType:o}}))}function rw(e){let{children:t,location:n}=e,r=x.useContext(Fu),o=r&&!t?r.router.routes:Ms(t);return W1(o,n)}var Tf;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(Tf||(Tf={}));new Promise(()=>{});function Ms(e,t){t===void 0&&(t=[]);let n=[];return x.Children.forEach(e,(r,o)=>{if(!x.isValidElement(r))return;if(r.type===x.Fragment){n.push.apply(n,Ms(r.props.children,t));return}r.type!==tw&&B(!1),!r.props.index||!r.props.children||B(!1);let i=[...t,o],l={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,hasErrorBoundary:r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle};r.props.children&&(l.children=Ms(r.props.children,i)),n.push(l)}),n}function bm(e){return e.map(t=>{let n=el({},t);return n.hasErrorBoundary==null&&(n.hasErrorBoundary=n.errorElement!=null),n.children&&(n.children=bm(n.children)),n})}/** + * React Router DOM v6.8.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Ls(){return Ls=Object.assign?Object.assign.bind():function(e){for(var t=1;tj.createElement(t.Provider,{value:i},o),()=>{const o=x.useContext(t);if(o===null)throw new Error(e);return o}]}function Nm(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t({fontFamily:e.fontFamily||"sans-serif"})}var cw=Object.defineProperty,Lf=Object.getOwnPropertySymbols,fw=Object.prototype.hasOwnProperty,dw=Object.prototype.propertyIsEnumerable,Df=(e,t,n)=>t in e?cw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Af=(e,t)=>{for(var n in t||(t={}))fw.call(t,n)&&Df(e,n,t[n]);if(Lf)for(var n of Lf(t))dw.call(t,n)&&Df(e,n,t[n]);return e};function pw(e){return t=>({WebkitTapHighlightColor:"transparent",[t||"&:focus"]:Af({},e.focusRing==="always"||e.focusRing==="auto"?e.focusRingStyles.styles(e):e.focusRingStyles.resetStyles(e)),[t?t.replace(":focus",":focus:not(:focus-visible)"):"&:focus:not(:focus-visible)"]:Af({},e.focusRing==="auto"||e.focusRing==="never"?e.focusRingStyles.resetStyles(e):null)})}function Lo(e){return t=>typeof e.primaryShade=="number"?e.primaryShade:e.primaryShade[t||e.colorScheme]}function Vu(e){const t=Lo(e);return(n,r,o=!0,i=!0)=>{if(typeof n=="string"&&n.includes(".")){const[a,s]=n.split("."),u=parseInt(s,10);if(a in e.colors&&u>=0&&u<10)return e.colors[a][typeof r=="number"&&!i?r:u]}const l=typeof r=="number"?r:t();return n in e.colors?e.colors[n][l]:o?e.colors[e.primaryColor][l]:n}}function Tm(e){let t="";for(let n=1;n{const o={from:(r==null?void 0:r.from)||e.defaultGradient.from,to:(r==null?void 0:r.to)||e.defaultGradient.to,deg:(r==null?void 0:r.deg)||e.defaultGradient.deg};return`linear-gradient(${o.deg}deg, ${t(o.from,n(),!1)} 0%, ${t(o.to,n(),!1)} 100%)`}}function Hu(e){if(typeof e.size=="number")return e.size;const t=e.sizes[e.size];return t!==void 0?t:e.size||e.sizes.md}function yw(e){return t=>`@media (min-width: ${Hu({size:t,sizes:e.breakpoints})}px)`}function gw(e){return t=>`@media (max-width: ${Hu({size:t,sizes:e.breakpoints})-1}px)`}function vw(e){return/^#?([0-9A-F]{3}){1,2}$/i.test(e)}function ww(e){let t=e.replace("#","");if(t.length===3){const l=t.split("");t=[l[0],l[0],l[1],l[1],l[2],l[2]].join("")}const n=parseInt(t,16),r=n>>16&255,o=n>>8&255,i=n&255;return{r,g:o,b:i,a:1}}function _w(e){const[t,n,r,o]=e.replace(/[^0-9,.]/g,"").split(",").map(Number);return{r:t,g:n,b:r,a:o||1}}function Wu(e){return vw(e)?ww(e):e.startsWith("rgb")?_w(e):{r:0,g:0,b:0,a:1}}function Xn(e,t){if(typeof e!="string"||t>1||t<0)return"rgba(0, 0, 0, 1)";const{r:n,g:r,b:o}=Wu(e);return`rgba(${n}, ${r}, ${o}, ${t})`}function Sw(e=0){return{position:"absolute",top:e,right:e,left:e,bottom:e}}function xw(e,t){const{r:n,g:r,b:o,a:i}=Wu(e),l=1-t,a=s=>Math.round(s*l);return`rgba(${a(n)}, ${a(r)}, ${a(o)}, ${i})`}function Ew(e,t){const{r:n,g:r,b:o,a:i}=Wu(e),l=a=>Math.round(a+(255-a)*t);return`rgba(${l(n)}, ${l(r)}, ${l(o)}, ${i})`}function Pw(e){return t=>{if(typeof t=="number")return t;const n=typeof e.defaultRadius=="number"?e.defaultRadius:e.radius[e.defaultRadius]||e.defaultRadius;return e.radius[t]||t||n}}function kw(e,t){if(typeof e=="string"&&e.includes(".")){const[n,r]=e.split("."),o=parseInt(r,10);if(n in t.colors&&o>=0&&o<10)return{isSplittedColor:!0,key:n,shade:o}}return{isSplittedColor:!1}}function Ow(e){const t=Vu(e),n=Lo(e),r=Im(e);return({variant:o,color:i,gradient:l,primaryFallback:a})=>{const s=kw(i,e);switch(o){case"light":return{border:"transparent",background:Xn(t(i,e.colorScheme==="dark"?8:0,a,!1),e.colorScheme==="dark"?.2:1),color:i==="dark"?e.colorScheme==="dark"?e.colors.dark[0]:e.colors.dark[9]:t(i,e.colorScheme==="dark"?2:n("light")),hover:Xn(t(i,e.colorScheme==="dark"?7:1,a,!1),e.colorScheme==="dark"?.25:.65)};case"subtle":return{border:"transparent",background:"transparent",color:i==="dark"?e.colorScheme==="dark"?e.colors.dark[0]:e.colors.dark[9]:t(i,e.colorScheme==="dark"?2:n("light")),hover:Xn(t(i,e.colorScheme==="dark"?8:0,a,!1),e.colorScheme==="dark"?.2:1)};case"outline":return{border:t(i,e.colorScheme==="dark"?5:n("light")),background:"transparent",color:t(i,e.colorScheme==="dark"?5:n("light")),hover:e.colorScheme==="dark"?Xn(t(i,5,a,!1),.05):Xn(t(i,0,a,!1),.35)};case"default":return{border:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4],background:e.colorScheme==="dark"?e.colors.dark[6]:e.white,color:e.colorScheme==="dark"?e.white:e.black,hover:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]};case"white":return{border:"transparent",background:e.white,color:t(i,n()),hover:null};case"transparent":return{border:"transparent",color:i==="dark"?e.colorScheme==="dark"?e.colors.dark[0]:e.colors.dark[9]:t(i,e.colorScheme==="dark"?2:n("light")),background:"transparent",hover:null};case"gradient":return{background:r(l),color:e.white,border:"transparent",hover:null};default:{const u=n(),d=s.isSplittedColor?s.shade:u,m=s.isSplittedColor?s.key:i;return{border:"transparent",background:t(m,d,a),color:e.white,hover:t(m,d===9?8:d+1)}}}}}function Cw(e){return t=>{const n=Lo(e)(t);return e.colors[e.primaryColor][n]}}function $w(e){return{"@media (hover: hover)":{"&:hover":e},"@media (hover: none)":{"&:active":e}}}function Rw(e){return()=>({userSelect:"none",color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]})}const ge={fontStyles:uw,themeColor:Vu,focusStyles:pw,linearGradient:hw,radialGradient:mw,smallerThan:gw,largerThan:yw,rgba:Xn,size:Hu,cover:Sw,darken:xw,lighten:Ew,radius:Pw,variant:Ow,primaryShade:Lo,hover:$w,gradient:Im,primaryColor:Cw,placeholderStyles:Rw};var jw=Object.defineProperty,bw=Object.defineProperties,Nw=Object.getOwnPropertyDescriptors,Ff=Object.getOwnPropertySymbols,zw=Object.prototype.hasOwnProperty,Tw=Object.prototype.propertyIsEnumerable,Uf=(e,t,n)=>t in e?jw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Iw=(e,t)=>{for(var n in t||(t={}))zw.call(t,n)&&Uf(e,n,t[n]);if(Ff)for(var n of Ff(t))Tw.call(t,n)&&Uf(e,n,t[n]);return e},Mw=(e,t)=>bw(e,Nw(t));function Mm(e){return Mw(Iw({},e),{fn:{fontStyles:ge.fontStyles(e),themeColor:ge.themeColor(e),focusStyles:ge.focusStyles(e),largerThan:ge.largerThan(e),smallerThan:ge.smallerThan(e),radialGradient:ge.radialGradient,linearGradient:ge.linearGradient,gradient:ge.gradient(e),rgba:ge.rgba,size:ge.size,cover:ge.cover,lighten:ge.lighten,darken:ge.darken,primaryShade:ge.primaryShade(e),radius:ge.radius(e),variant:ge.variant(e),hover:ge.hover,primaryColor:ge.primaryColor(e),placeholderStyles:ge.placeholderStyles(e)}})}Object.keys(zm);const Lm=["xs","sm","md","lg","xl"],Lw={dir:"ltr",primaryShade:{light:6,dark:8},focusRing:"auto",loader:"oval",dateFormat:"MMMM D, YYYY",colorScheme:"light",white:"#fff",black:"#000",defaultRadius:"sm",transitionTimingFunction:"ease",colors:zm,lineHeight:1.55,fontFamily:"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",primaryColor:"blue",respectReducedMotion:!0,cursorType:"default",defaultGradient:{from:"indigo",to:"cyan",deg:45},shadows:{xs:"0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.1)",sm:"0 1px 3px rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0px 10px 15px -5px, rgba(0, 0, 0, 0.04) 0px 7px 7px -5px",md:"0 1px 3px rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0px 20px 25px -5px, rgba(0, 0, 0, 0.04) 0px 10px 10px -5px",lg:"0 1px 3px rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0px 28px 23px -7px, rgba(0, 0, 0, 0.04) 0px 12px 12px -7px",xl:"0 1px 3px rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0px 36px 28px -7px, rgba(0, 0, 0, 0.04) 0px 17px 17px -7px"},fontSizes:{xs:12,sm:14,md:16,lg:18,xl:20},radius:{xs:2,sm:4,md:8,lg:16,xl:32},spacing:{xs:10,sm:12,md:16,lg:20,xl:24},breakpoints:{xs:576,sm:768,md:992,lg:1200,xl:1400},headings:{fontFamily:"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",fontWeight:700,sizes:{h1:{fontSize:34,lineHeight:1.3,fontWeight:void 0},h2:{fontSize:26,lineHeight:1.35,fontWeight:void 0},h3:{fontSize:22,lineHeight:1.4,fontWeight:void 0},h4:{fontSize:18,lineHeight:1.45,fontWeight:void 0},h5:{fontSize:16,lineHeight:1.5,fontWeight:void 0},h6:{fontSize:14,lineHeight:1.5,fontWeight:void 0}}},other:{},components:{},activeStyles:{transform:"translateY(1px)"},datesLocale:"en",globalStyles:void 0,focusRingStyles:{styles:e=>({outlineOffset:2,outline:`2px solid ${e.colors[e.primaryColor][e.colorScheme==="dark"?7:5]}`}),resetStyles:()=>({outline:"none"}),inputStyles:e=>({outline:"none",borderColor:e.colors[e.primaryColor][typeof e.primaryShade=="object"?e.primaryShade[e.colorScheme]:e.primaryShade]})}},Xe=Mm(Lw);function Dw(e){if(e.sheet)return e.sheet;for(var t=0;t0?ke(Rr,--We):0,kr--,he===10&&(kr=1,Ul--),he}function qe(){return he=We2||jo(he)>3?"":" "}function Yw(e,t){for(;--t&&qe()&&!(he<48||he>102||he>57&&he<65||he>70&&he<97););return Do(e,Ci()+(t<6&&Nt()==32&&qe()==32))}function As(e){for(;qe();)switch(he){case e:return We;case 34:case 39:e!==34&&e!==39&&As(he);break;case 40:e===41&&As(e);break;case 92:qe();break}return We}function Zw(e,t){for(;qe()&&e+he!==47+10;)if(e+he===42+42&&Nt()===47)break;return"/*"+Do(t,We-1)+"*"+Fl(e===47?e:qe())}function Jw(e){for(;!jo(Nt());)qe();return Do(e,We)}function qw(e){return Vm(Ri("",null,null,null,[""],e=Bm(e),0,[0],e))}function Ri(e,t,n,r,o,i,l,a,s){for(var u=0,d=0,m=l,c=0,y=0,g=0,v=1,E=1,p=1,f=0,h="",w=o,P=i,$=r,k=h;E;)switch(g=f,f=qe()){case 40:if(g!=108&&ke(k,m-1)==58){Ds(k+=J($i(f),"&","&\f"),"&\f")!=-1&&(p=-1);break}case 34:case 39:case 91:k+=$i(f);break;case 9:case 10:case 13:case 32:k+=Xw(g);break;case 92:k+=Yw(Ci()-1,7);continue;case 47:switch(Nt()){case 42:case 47:fi(e_(Zw(qe(),Ci()),t,n),s);break;default:k+="/"}break;case 123*v:a[u++]=Ct(k)*p;case 125*v:case 59:case 0:switch(f){case 0:case 125:E=0;case 59+d:y>0&&Ct(k)-m&&fi(y>32?Vf(k+";",r,n,m-1):Vf(J(k," ","")+";",r,n,m-2),s);break;case 59:k+=";";default:if(fi($=Bf(k,t,n,u,d,o,a,h,w=[],P=[],m),i),f===123)if(d===0)Ri(k,t,$,$,w,i,m,a,P);else switch(c===99&&ke(k,3)===110?100:c){case 100:case 109:case 115:Ri(e,$,$,r&&fi(Bf(e,$,$,0,0,o,a,h,o,w=[],m),P),o,P,m,a,r?w:P);break;default:Ri(k,$,$,$,[""],P,0,a,P)}}u=d=y=0,v=p=1,h=k="",m=l;break;case 58:m=1+Ct(k),y=g;default:if(v<1){if(f==123)--v;else if(f==125&&v++==0&&Kw()==125)continue}switch(k+=Fl(f),f*v){case 38:p=d>0?1:(k+="\f",-1);break;case 44:a[u++]=(Ct(k)-1)*p,p=1;break;case 64:Nt()===45&&(k+=$i(qe())),c=Nt(),d=m=Ct(h=k+=Jw(Ci())),f++;break;case 45:g===45&&Ct(k)==2&&(v=0)}}return i}function Bf(e,t,n,r,o,i,l,a,s,u,d){for(var m=o-1,c=o===0?i:[""],y=Ku(c),g=0,v=0,E=0;g0?c[p]+" "+f:J(f,/&\f/g,c[p])))&&(s[E++]=h);return Bl(e,t,n,o===0?Gu:a,s,u,d)}function e_(e,t,n){return Bl(e,t,n,Dm,Fl(Qw()),Ro(e,2,-2),0)}function Vf(e,t,n,r){return Bl(e,t,n,Qu,Ro(e,0,r),Ro(e,r+1,-1),r)}function yr(e,t){for(var n="",r=Ku(e),o=0;o6)switch(ke(e,t+1)){case 109:if(ke(e,t+4)!==45)break;case 102:return J(e,/(.+:)(.+)-([^]+)/,"$1"+X+"$2-$3$1"+nl+(ke(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Ds(e,"stretch")?Hm(J(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(ke(e,t+1)!==115)break;case 6444:switch(ke(e,Ct(e)-3-(~Ds(e,"!important")&&10))){case 107:return J(e,":",":"+X)+e;case 101:return J(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+X+(ke(e,14)===45?"inline-":"")+"box$3$1"+X+"$2$3$1"+be+"$2box$3")+e}break;case 5936:switch(ke(e,t+11)){case 114:return X+e+be+J(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return X+e+be+J(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return X+e+be+J(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return X+e+be+e+e}return e}var c_=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case Qu:t.return=Hm(t.value,t.length);break;case Am:return yr([Vr(t,{value:J(t.value,"@","@"+X)})],o);case Gu:if(t.length)return Gw(t.props,function(i){switch(Ww(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return yr([Vr(t,{props:[J(i,/:(read-\w+)/,":"+nl+"$1")]})],o);case"::placeholder":return yr([Vr(t,{props:[J(i,/:(plac\w+)/,":"+X+"input-$1")]}),Vr(t,{props:[J(i,/:(plac\w+)/,":"+nl+"$1")]}),Vr(t,{props:[J(i,/:(plac\w+)/,be+"input-$1")]})],o)}return""})}},f_=[c_],Wm=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(v){var E=v.getAttribute("data-emotion");E.indexOf(" ")!==-1&&(document.head.appendChild(v),v.setAttribute("data-s",""))})}var o=t.stylisPlugins||f_,i={},l,a=[];l=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(v){for(var E=v.getAttribute("data-emotion").split(" "),p=1;p=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var P_={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},k_=/[A-Z]|^ms/g,O_=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ym=function(t){return t.charCodeAt(1)===45},Gf=function(t){return t!=null&&typeof t!="boolean"},Ia=o_(function(e){return Ym(e)?e:e.replace(k_,"-$&").toLowerCase()}),Qf=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(O_,function(r,o,i){return $t={name:o,styles:i,next:$t},o})}return P_[t]!==1&&!Ym(t)&&typeof n=="number"&&n!==0?n+"px":n};function bo(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return $t={name:n.name,styles:n.styles,next:$t},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)$t={name:r.name,styles:r.styles,next:$t},r=r.next;var o=n.styles+";";return o}return C_(e,t,n)}case"function":{if(e!==void 0){var i=$t,l=n(e);return $t=i,bo(e,t,l)}break}}if(t==null)return n;var a=t[n];return a!==void 0?a:n}function C_(e,t,n){var r="";if(Array.isArray(n))for(var o=0;ot in e?T_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,A_=(e,t)=>{for(var n in t||(t={}))L_.call(t,n)&&Zf(e,n,t[n]);if(Yf)for(var n of Yf(t))D_.call(t,n)&&Zf(e,n,t[n]);return e},F_=(e,t)=>I_(e,M_(t));function U_({theme:e}){return j.createElement(Ao,{styles:{"*, *::before, *::after":{boxSizing:"border-box"},html:{colorScheme:e.colorScheme==="dark"?"dark":"light"},body:F_(A_({},e.fn.fontStyles()),{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,lineHeight:e.lineHeight,fontSize:e.fontSizes.md,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"})}})}function di(e,t,n){Object.keys(t).forEach(r=>{e[`--mantine-${n}-${r}`]=typeof t[r]=="number"?`${t[r]}px`:t[r]})}function B_({theme:e}){const t={"--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-transition-timing-function":e.transitionTimingFunction,"--mantine-line-height":`${e.lineHeight}`,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":`${e.headings.fontWeight}`};di(t,e.shadows,"shadow"),di(t,e.fontSizes,"font-size"),di(t,e.radius,"radius"),di(t,e.spacing,"spacing"),Object.keys(e.colors).forEach(r=>{e.colors[r].forEach((o,i)=>{t[`--mantine-color-${r}-${i}`]=o})});const n=e.headings.sizes;return Object.keys(n).forEach(r=>{t[`--mantine-${r}-font-size`]=`${n[r].fontSize}px`,t[`--mantine-${r}-line-height`]=`${n[r].lineHeight}`}),j.createElement(Ao,{styles:{":root":t}})}var V_=Object.defineProperty,H_=Object.defineProperties,W_=Object.getOwnPropertyDescriptors,Jf=Object.getOwnPropertySymbols,G_=Object.prototype.hasOwnProperty,Q_=Object.prototype.propertyIsEnumerable,qf=(e,t,n)=>t in e?V_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kn=(e,t)=>{for(var n in t||(t={}))G_.call(t,n)&&qf(e,n,t[n]);if(Jf)for(var n of Jf(t))Q_.call(t,n)&&qf(e,n,t[n]);return e},ed=(e,t)=>H_(e,W_(t));function K_(e,t){if(!t)return e;const n=Object.keys(e).reduce((r,o)=>{if(o==="headings"&&t.headings){const i=t.headings.sizes?Object.keys(e.headings.sizes).reduce((l,a)=>(l[a]=kn(kn({},e.headings.sizes[a]),t.headings.sizes[a]),l),{}):e.headings.sizes;return ed(kn({},r),{headings:ed(kn(kn({},e.headings),t.headings),{sizes:i})})}return r[o]=typeof t[o]=="object"?kn(kn({},e[o]),t[o]):typeof t[o]=="number"||typeof t[o]=="boolean"||typeof t[o]=="function"?t[o]:t[o]||e[o],r},{});if(!(n.primaryColor in n.colors))throw new Error("MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color");return n}function X_(e,t){return Mm(K_(e,t))}function Jm(e){return Object.keys(e).reduce((t,n)=>(e[n]!==void 0&&(t[n]=e[n]),t),{})}const Y_={html:{fontFamily:"sans-serif",lineHeight:"1.15",textSizeAdjust:"100%"},body:{margin:0},"article, aside, footer, header, nav, section, figcaption, figure, main":{display:"block"},h1:{fontSize:"2em"},hr:{boxSizing:"content-box",height:0,overflow:"visible"},pre:{fontFamily:"monospace, monospace",fontSize:"1em"},a:{background:"transparent",textDecorationSkip:"objects"},"a:active, a:hover":{outlineWidth:0},"abbr[title]":{borderBottom:"none",textDecoration:"underline"},"b, strong":{fontWeight:"bolder"},"code, kbp, samp":{fontFamily:"monospace, monospace",fontSize:"1em"},dfn:{fontStyle:"italic"},mark:{backgroundColor:"#ff0",color:"#000"},small:{fontSize:"80%"},"sub, sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sup:{top:"-0.5em"},sub:{bottom:"-0.25em"},"audio, video":{display:"inline-block"},"audio:not([controls])":{display:"none",height:0},img:{borderStyle:"none",verticalAlign:"middle"},"svg:not(:root)":{overflow:"hidden"},"button, input, optgroup, select, textarea":{fontFamily:"sans-serif",fontSize:"100%",lineHeight:"1.15",margin:0},"button, input":{overflow:"visible"},"button, select":{textTransform:"none"},"button, [type=reset], [type=submit]":{WebkitAppearance:"button"},"button::-moz-focus-inner, [type=button]::-moz-focus-inner, [type=reset]::-moz-focus-inner, [type=submit]::-moz-focus-inner":{borderStyle:"none",padding:0},"button:-moz-focusring, [type=button]:-moz-focusring, [type=reset]:-moz-focusring, [type=submit]:-moz-focusring":{outline:"1px dotted ButtonText"},legend:{boxSizing:"border-box",color:"inherit",display:"table",maxWidth:"100%",padding:0,whiteSpace:"normal"},progress:{display:"inline-block",verticalAlign:"baseline"},textarea:{overflow:"auto"},"[type=checkbox], [type=radio]":{boxSizing:"border-box",padding:0},"[type=number]::-webkit-inner-spin-button, [type=number]::-webkit-outer-spin-button":{height:"auto"},"[type=search]":{appearance:"none"},"[type=search]::-webkit-search-cancel-button, [type=search]::-webkit-search-decoration":{appearance:"none"},"::-webkit-file-upload-button":{appearance:"button",font:"inherit"},"details, menu":{display:"block"},summary:{display:"list-item"},canvas:{display:"inline-block"},template:{display:"none"},"[hidden]":{display:"none"}};function Z_(){return j.createElement(Ao,{styles:Y_})}var J_=Object.defineProperty,td=Object.getOwnPropertySymbols,q_=Object.prototype.hasOwnProperty,eS=Object.prototype.propertyIsEnumerable,nd=(e,t,n)=>t in e?J_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lo=(e,t)=>{for(var n in t||(t={}))q_.call(t,n)&&nd(e,n,t[n]);if(td)for(var n of td(t))eS.call(t,n)&&nd(e,n,t[n]);return e};const rl=x.createContext({theme:Xe});function dt(){var e;return((e=x.useContext(rl))==null?void 0:e.theme)||Xe}function tS(e){const t=dt(),n=r=>{var o,i;return{styles:((o=t.components[r])==null?void 0:o.styles)||{},classNames:((i=t.components[r])==null?void 0:i.classNames)||{}}};return Array.isArray(e)?e.map(n):[n(e)]}function qm(){var e;return(e=x.useContext(rl))==null?void 0:e.emotionCache}function Qe(e,t,n){var r;const o=dt(),i=(r=o.components[e])==null?void 0:r.defaultProps,l=typeof i=="function"?i(o):i;return lo(lo(lo({},t),l),Jm(n))}function ey({theme:e,emotionCache:t,withNormalizeCSS:n=!1,withGlobalStyles:r=!1,withCSSVariables:o=!1,inherit:i=!1,children:l}){const a=x.useContext(rl),s=X_(Xe,i?lo(lo({},a.theme),e):e);return j.createElement(N_,{theme:s},j.createElement(rl.Provider,{value:{theme:s,emotionCache:t}},n&&j.createElement(Z_,null),r&&j.createElement(U_,{theme:s}),o&&j.createElement(B_,{theme:s}),typeof s.globalStyles=="function"&&j.createElement(Ao,{styles:s.globalStyles(s)}),l))}ey.displayName="@mantine/core/MantineProvider";const nS={app:100,modal:200,popover:300,overlay:400,max:9999};function rS(e){return nS[e]}function oS(e,t){const n=x.useRef();return(!n.current||t.length!==n.current.prevDeps.length||n.current.prevDeps.map((r,o)=>r===t[o]).indexOf(!1)>=0)&&(n.current={v:e(),prevDeps:[...t]}),n.current.v}const iS=Wm({key:"mantine",prepend:!0});function lS(){return qm()||iS}var aS=Object.defineProperty,rd=Object.getOwnPropertySymbols,sS=Object.prototype.hasOwnProperty,uS=Object.prototype.propertyIsEnumerable,od=(e,t,n)=>t in e?aS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cS=(e,t)=>{for(var n in t||(t={}))sS.call(t,n)&&od(e,n,t[n]);if(rd)for(var n of rd(t))uS.call(t,n)&&od(e,n,t[n]);return e};const Ma="ref";function fS(e){let t;if(e.length!==1)return{args:e,ref:t};const[n]=e;if(!(n instanceof Object))return{args:e,ref:t};if(!(Ma in n))return{args:e,ref:t};t=n[Ma];const r=cS({},n);return delete r[Ma],{args:[r],ref:t}}const{cssFactory:dS}=(()=>{function e(n,r,o){const i=[],l=S_(n,i,o);return i.length<2?o:l+r(i)}function t(n){const{cache:r}=n,o=(...l)=>{const{ref:a,args:s}=fS(l),u=Ju(s,r.registered);return Xm(r,u,!1),`${r.key}-${u.name}${a===void 0?"":` ${a}`}`};return{css:o,cx:(...l)=>e(r.registered,o,sw(l))}}return{cssFactory:t}})();function ty(){const e=lS();return oS(()=>dS({cache:e}),[e])}function pS({cx:e,classes:t,context:n,classNames:r,name:o,cache:i}){const l=n.reduce((a,s)=>(Object.keys(s.classNames).forEach(u=>{typeof a[u]!="string"?a[u]=`${s.classNames[u]}`:a[u]=`${a[u]} ${s.classNames[u]}`}),a),{});return Object.keys(t).reduce((a,s)=>(a[s]=e(t[s],l[s],r!=null&&r[s],Array.isArray(o)?o.filter(Boolean).map(u=>`${(i==null?void 0:i.key)||"mantine"}-${u}-${s}`).join(" "):o?`${(i==null?void 0:i.key)||"mantine"}-${o}-${s}`:null),a),{})}var hS=Object.defineProperty,id=Object.getOwnPropertySymbols,mS=Object.prototype.hasOwnProperty,yS=Object.prototype.propertyIsEnumerable,ld=(e,t,n)=>t in e?hS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,La=(e,t)=>{for(var n in t||(t={}))mS.call(t,n)&&ld(e,n,t[n]);if(id)for(var n of id(t))yS.call(t,n)&&ld(e,n,t[n]);return e};function gS(e){return`__mantine-ref-${e||""}`}function ad(e,t,n){const r=o=>typeof o=="function"?o(t,n||{}):o||{};return Array.isArray(e)?e.map(o=>r(o.styles)).reduce((o,i)=>(Object.keys(i).forEach(l=>{o[l]?o[l]=La(La({},o[l]),i[l]):o[l]=La({},i[l])}),o),{}):r(e)}function ot(e){const t=typeof e=="function"?e:()=>e;function n(r,o){const i=dt(),l=tS(o==null?void 0:o.name),a=qm(),{css:s,cx:u}=ty(),d=t(i,r,gS),m=ad(o==null?void 0:o.styles,i,r),c=ad(l,i,r),y=Object.fromEntries(Object.keys(d).map(g=>{const v=u({[s(d[g])]:!(o!=null&&o.unstyled)},s(c[g]),s(m[g]));return[g,v]}));return{classes:pS({cx:u,classes:y,context:l,classNames:o==null?void 0:o.classNames,name:o==null?void 0:o.name,cache:a}),cx:u,theme:i}}return n}function vS({styles:e}){const t=dt();return j.createElement(Ao,{styles:z_(typeof e=="function"?e(t):e)})}var sd=Object.getOwnPropertySymbols,wS=Object.prototype.hasOwnProperty,_S=Object.prototype.propertyIsEnumerable,SS=(e,t)=>{var n={};for(var r in e)wS.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&sd)for(var r of sd(e))t.indexOf(r)<0&&_S.call(e,r)&&(n[r]=e[r]);return n};function xS(e){const t=e,{m:n,mx:r,my:o,mt:i,mb:l,ml:a,mr:s,p:u,px:d,py:m,pt:c,pb:y,pl:g,pr:v,bg:E,c:p,opacity:f,ff:h,fz:w,fw:P,lts:$,ta:k,lh:b,fs:V,tt:I,td:Z,w:ye,miw:Ke,maw:Gn,h:jr,mih:Sn,mah:se,bgsz:N,bgp:D,bgr:U,bga:K,pos:ue,top:Xt,left:it,bottom:xn,right:pt,inset:Yt,display:En}=t,Uo=SS(t,["m","mx","my","mt","mb","ml","mr","p","px","py","pt","pb","pl","pr","bg","c","opacity","ff","fz","fw","lts","ta","lh","fs","tt","td","w","miw","maw","h","mih","mah","bgsz","bgp","bgr","bga","pos","top","left","bottom","right","inset","display"]);return{systemStyles:Jm({m:n,mx:r,my:o,mt:i,mb:l,ml:a,mr:s,p:u,px:d,py:m,pt:c,pb:y,pl:g,pr:v,bg:E,c:p,opacity:f,ff:h,fz:w,fw:P,lts:$,ta:k,lh:b,fs:V,tt:I,td:Z,w:ye,miw:Ke,maw:Gn,h:jr,mih:Sn,mah:se,bgsz:N,bgp:D,bgr:U,bga:K,pos:ue,top:Xt,left:it,bottom:xn,right:pt,inset:Yt,display:En}),rest:Uo}}function ES(e,t){const n=Object.keys(e).filter(r=>r!=="base").sort((r,o)=>t.fn.size({size:r,sizes:t.breakpoints})-t.fn.size({size:o,sizes:t.breakpoints}));return"base"in e?["base",...n]:n}function PS({value:e,theme:t,getValue:n,property:r}){if(e==null)return;if(typeof e=="object")return ES(e,t).reduce((l,a)=>{if(a==="base"&&e.base!==void 0){const u=n(e.base,t);return Array.isArray(r)?(r.forEach(d=>{l[d]=u}),l):(l[r]=u,l)}const s=n(e[a],t);return Array.isArray(r)?(l[t.fn.largerThan(a)]={},r.forEach(u=>{l[t.fn.largerThan(a)][u]=s}),l):(l[t.fn.largerThan(a)]={[r]:s},l)},{});const o=n(e,t);return Array.isArray(r)?r.reduce((i,l)=>(i[l]=o,i),{}):{[r]:o}}function kS(e,t){return e==="dimmed"?t.colorScheme==="dark"?t.colors.dark[2]:t.colors.gray[6]:t.fn.variant({variant:"filled",color:e,primaryFallback:!1}).background}function OS(e){return e}function CS(e,t){return t.fn.size({size:e,sizes:t.fontSizes})}const $S=["-xs","-sm","-md","-lg","-xl"];function RS(e,t){return $S.includes(e)?t.fn.size({size:e.replace("-",""),sizes:t.spacing})*-1:t.fn.size({size:e,sizes:t.spacing})}const jS={color:kS,default:OS,fontSize:CS,spacing:RS},bS={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},mx:{type:"spacing",property:["marginRight","marginLeft"]},my:{type:"spacing",property:["marginTop","marginBottom"]},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},px:{type:"spacing",property:["paddingRight","paddingLeft"]},py:{type:"spacing",property:["paddingTop","paddingBottom"]},bg:{type:"color",property:"background"},c:{type:"color",property:"color"},opacity:{type:"default",property:"opacity"},ff:{type:"default",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"default",property:"fontWeight"},lts:{type:"default",property:"letterSpacing"},ta:{type:"default",property:"textAlign"},lh:{type:"default",property:"lineHeight"},fs:{type:"default",property:"fontStyle"},tt:{type:"default",property:"textTransform"},td:{type:"default",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"default",property:"background-size"},bgp:{type:"default",property:"background-position"},bgr:{type:"default",property:"background-repeat"},bga:{type:"default",property:"background-attachment"},pos:{type:"default",property:"position"},top:{type:"default",property:"top"},left:{type:"default",property:"left"},bottom:{type:"default",property:"bottom"},right:{type:"default",property:"right"},inset:{type:"default",property:"inset"},display:{type:"default",property:"display"}};var NS=Object.defineProperty,ud=Object.getOwnPropertySymbols,zS=Object.prototype.hasOwnProperty,TS=Object.prototype.propertyIsEnumerable,cd=(e,t,n)=>t in e?NS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fd=(e,t)=>{for(var n in t||(t={}))zS.call(t,n)&&cd(e,n,t[n]);if(ud)for(var n of ud(t))TS.call(t,n)&&cd(e,n,t[n]);return e};function dd(e,t,n=bS){return Object.keys(n).reduce((o,i)=>(i in e&&e[i]!==void 0&&o.push(PS({value:e[i],getValue:jS[n[i].type],property:n[i].property,theme:t})),o),[]).reduce((o,i)=>(Object.keys(i).forEach(l=>{typeof i[l]=="object"&&i[l]!==null&&l in o?o[l]=fd(fd({},o[l]),i[l]):o[l]=i[l]}),o),{})}function pd(e,t){return typeof e=="function"?e(t):e}function IS(e,t,n){const r=dt(),{css:o,cx:i}=ty();return Array.isArray(e)?i(n,o(dd(t,r)),e.map(l=>o(pd(l,r)))):i(n,o(pd(e,r)),o(dd(t,r)))}var MS=Object.defineProperty,ol=Object.getOwnPropertySymbols,ny=Object.prototype.hasOwnProperty,ry=Object.prototype.propertyIsEnumerable,hd=(e,t,n)=>t in e?MS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,LS=(e,t)=>{for(var n in t||(t={}))ny.call(t,n)&&hd(e,n,t[n]);if(ol)for(var n of ol(t))ry.call(t,n)&&hd(e,n,t[n]);return e},DS=(e,t)=>{var n={};for(var r in e)ny.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ol)for(var r of ol(e))t.indexOf(r)<0&&ry.call(e,r)&&(n[r]=e[r]);return n};const oy=x.forwardRef((e,t)=>{var n=e,{className:r,component:o,style:i,sx:l}=n,a=DS(n,["className","component","style","sx"]);const{systemStyles:s,rest:u}=xS(a),d=o||"div";return j.createElement(d,LS({ref:t,className:IS(l,s,r),style:i},u))});oy.displayName="@mantine/core/Box";const Ge=oy;var AS=Object.defineProperty,FS=Object.defineProperties,US=Object.getOwnPropertyDescriptors,md=Object.getOwnPropertySymbols,BS=Object.prototype.hasOwnProperty,VS=Object.prototype.propertyIsEnumerable,yd=(e,t,n)=>t in e?AS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gd=(e,t)=>{for(var n in t||(t={}))BS.call(t,n)&&yd(e,n,t[n]);if(md)for(var n of md(t))VS.call(t,n)&&yd(e,n,t[n]);return e},HS=(e,t)=>FS(e,US(t)),WS=ot(e=>({root:HS(gd(gd({},e.fn.focusStyles()),e.fn.fontStyles()),{cursor:"pointer",border:0,padding:0,appearance:"none",fontSize:e.fontSizes.md,backgroundColor:"transparent",textAlign:"left",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,textDecoration:"none",boxSizing:"border-box"})}));const GS=WS;var QS=Object.defineProperty,il=Object.getOwnPropertySymbols,iy=Object.prototype.hasOwnProperty,ly=Object.prototype.propertyIsEnumerable,vd=(e,t,n)=>t in e?QS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,KS=(e,t)=>{for(var n in t||(t={}))iy.call(t,n)&&vd(e,n,t[n]);if(il)for(var n of il(t))ly.call(t,n)&&vd(e,n,t[n]);return e},XS=(e,t)=>{var n={};for(var r in e)iy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&il)for(var r of il(e))t.indexOf(r)<0&&ly.call(e,r)&&(n[r]=e[r]);return n};const ay=x.forwardRef((e,t)=>{const n=Qe("UnstyledButton",{},e),{className:r,component:o="button",unstyled:i}=n,l=XS(n,["className","component","unstyled"]),{classes:a,cx:s}=GS(null,{name:"UnstyledButton",unstyled:i});return j.createElement(Ge,KS({component:o,ref:t,className:s(a.root,r),type:o==="button"?"button":void 0},l))});ay.displayName="@mantine/core/UnstyledButton";const YS=ay;var ZS=Object.defineProperty,ll=Object.getOwnPropertySymbols,sy=Object.prototype.hasOwnProperty,uy=Object.prototype.propertyIsEnumerable,wd=(e,t,n)=>t in e?ZS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,JS=(e,t)=>{for(var n in t||(t={}))sy.call(t,n)&&wd(e,n,t[n]);if(ll)for(var n of ll(t))uy.call(t,n)&&wd(e,n,t[n]);return e},qS=(e,t)=>{var n={};for(var r in e)sy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ll)for(var r of ll(e))t.indexOf(r)<0&&uy.call(e,r)&&(n[r]=e[r]);return n};function ex(e){var t=e,{size:n,color:r}=t,o=qS(t,["size","color"]);return j.createElement("svg",JS({viewBox:"0 0 135 140",xmlns:"http://www.w3.org/2000/svg",fill:r,width:`${n}px`},o),j.createElement("rect",{y:"10",width:"15",height:"120",rx:"6"},j.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),j.createElement("rect",{x:"30",y:"10",width:"15",height:"120",rx:"6"},j.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),j.createElement("rect",{x:"60",width:"15",height:"140",rx:"6"},j.createElement("animate",{attributeName:"height",begin:"0s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"y",begin:"0s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),j.createElement("rect",{x:"90",y:"10",width:"15",height:"120",rx:"6"},j.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),j.createElement("rect",{x:"120",y:"10",width:"15",height:"120",rx:"6"},j.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})))}var tx=Object.defineProperty,al=Object.getOwnPropertySymbols,cy=Object.prototype.hasOwnProperty,fy=Object.prototype.propertyIsEnumerable,_d=(e,t,n)=>t in e?tx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nx=(e,t)=>{for(var n in t||(t={}))cy.call(t,n)&&_d(e,n,t[n]);if(al)for(var n of al(t))fy.call(t,n)&&_d(e,n,t[n]);return e},rx=(e,t)=>{var n={};for(var r in e)cy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&al)for(var r of al(e))t.indexOf(r)<0&&fy.call(e,r)&&(n[r]=e[r]);return n};function ox(e){var t=e,{size:n,color:r}=t,o=rx(t,["size","color"]);return j.createElement("svg",nx({width:`${n}px`,height:`${n}px`,viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg",stroke:r},o),j.createElement("g",{fill:"none",fillRule:"evenodd"},j.createElement("g",{transform:"translate(2.5 2.5)",strokeWidth:"5"},j.createElement("circle",{strokeOpacity:".5",cx:"16",cy:"16",r:"16"}),j.createElement("path",{d:"M32 16c0-9.94-8.06-16-16-16"},j.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 16 16",to:"360 16 16",dur:"1s",repeatCount:"indefinite"})))))}var ix=Object.defineProperty,sl=Object.getOwnPropertySymbols,dy=Object.prototype.hasOwnProperty,py=Object.prototype.propertyIsEnumerable,Sd=(e,t,n)=>t in e?ix(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lx=(e,t)=>{for(var n in t||(t={}))dy.call(t,n)&&Sd(e,n,t[n]);if(sl)for(var n of sl(t))py.call(t,n)&&Sd(e,n,t[n]);return e},ax=(e,t)=>{var n={};for(var r in e)dy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&sl)for(var r of sl(e))t.indexOf(r)<0&&py.call(e,r)&&(n[r]=e[r]);return n};function sx(e){var t=e,{size:n,color:r}=t,o=ax(t,["size","color"]);return j.createElement("svg",lx({width:`${n}px`,height:`${n/4}px`,viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg",fill:r},o),j.createElement("circle",{cx:"15",cy:"15",r:"15"},j.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})),j.createElement("circle",{cx:"60",cy:"15",r:"9",fillOpacity:"0.3"},j.createElement("animate",{attributeName:"r",from:"9",to:"9",begin:"0s",dur:"0.8s",values:"9;15;9",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"fill-opacity",from:"0.5",to:"0.5",begin:"0s",dur:"0.8s",values:".5;1;.5",calcMode:"linear",repeatCount:"indefinite"})),j.createElement("circle",{cx:"105",cy:"15",r:"15"},j.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})))}var ux=Object.defineProperty,ul=Object.getOwnPropertySymbols,hy=Object.prototype.hasOwnProperty,my=Object.prototype.propertyIsEnumerable,xd=(e,t,n)=>t in e?ux(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cx=(e,t)=>{for(var n in t||(t={}))hy.call(t,n)&&xd(e,n,t[n]);if(ul)for(var n of ul(t))my.call(t,n)&&xd(e,n,t[n]);return e},fx=(e,t)=>{var n={};for(var r in e)hy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ul)for(var r of ul(e))t.indexOf(r)<0&&my.call(e,r)&&(n[r]=e[r]);return n};const Da={bars:ex,oval:ox,dots:sx},dx={xs:18,sm:22,md:36,lg:44,xl:58},px={size:"md"};function yy(e){const t=Qe("Loader",px,e),{size:n,color:r,variant:o}=t,i=fx(t,["size","color","variant"]),l=dt(),a=o in Da?o:l.loader;return j.createElement(Ge,cx({role:"presentation",component:Da[a]||Da.bars,size:l.fn.size({size:n,sizes:dx}),color:l.fn.variant({variant:"filled",primaryFallback:!1,color:r||l.primaryColor}).background},i))}yy.displayName="@mantine/core/Loader";const gy=x.createContext({zIndex:1e3,fixed:!1,layout:"default"}),hx=gy.Provider;function mx(){return x.useContext(gy)}function vy(e,t){if(!e)return[];const n=Object.keys(e).filter(r=>r!=="base").map(r=>[t.fn.size({size:r,sizes:t.breakpoints}),e[r]]);return n.sort((r,o)=>r[0]-o[0]),n}var yx=Object.defineProperty,gx=Object.defineProperties,vx=Object.getOwnPropertyDescriptors,Ed=Object.getOwnPropertySymbols,wx=Object.prototype.hasOwnProperty,_x=Object.prototype.propertyIsEnumerable,Pd=(e,t,n)=>t in e?yx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Aa=(e,t)=>{for(var n in t||(t={}))wx.call(t,n)&&Pd(e,n,t[n]);if(Ed)for(var n of Ed(t))_x.call(t,n)&&Pd(e,n,t[n]);return e},kd=(e,t)=>gx(e,vx(t)),Sx=ot((e,{height:t,fixed:n,position:r,zIndex:o,borderPosition:i,layout:l})=>{const a=typeof t=="object"&&t!==null?vy(t,e).reduce((s,[u,d])=>(s[`@media (min-width: ${u}px)`]={height:d,minHeight:d},s),{}):null;return{root:kd(Aa(kd(Aa(Aa({},e.fn.fontStyles()),r),{zIndex:o,left:l==="alt"?"var(--mantine-navbar-width, 0)":0,right:l==="alt"?"var(--mantine-aside-width, 0)":0,height:typeof t=="object"?(t==null?void 0:t.base)||"100%":t,maxHeight:typeof t=="object"?(t==null?void 0:t.base)||"100%":t,position:n?"fixed":"static",boxSizing:"border-box",backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white}),a),{borderBottom:i==="bottom"?`1px solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[2]}`:void 0,borderTop:i==="top"?`1px solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[2]}`:void 0})}});const xx=Sx;var Ex=Object.defineProperty,cl=Object.getOwnPropertySymbols,wy=Object.prototype.hasOwnProperty,_y=Object.prototype.propertyIsEnumerable,Od=(e,t,n)=>t in e?Ex(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Cd=(e,t)=>{for(var n in t||(t={}))wy.call(t,n)&&Od(e,n,t[n]);if(cl)for(var n of cl(t))_y.call(t,n)&&Od(e,n,t[n]);return e},Px=(e,t)=>{var n={};for(var r in e)wy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&cl)for(var r of cl(e))t.indexOf(r)<0&&_y.call(e,r)&&(n[r]=e[r]);return n};const Sy=x.forwardRef((e,t)=>{var n=e,{children:r,className:o,classNames:i,styles:l,height:a,fixed:s=!1,withBorder:u=!0,position:d,zIndex:m,section:c,unstyled:y,__staticSelector:g}=n,v=Px(n,["children","className","classNames","styles","height","fixed","withBorder","position","zIndex","section","unstyled","__staticSelector"]);const E=mx(),p=m||E.zIndex||rS("app"),{classes:f,cx:h,theme:w}=xx({height:a,fixed:E.fixed||s,position:d,zIndex:typeof p=="number"&&E.layout==="default"?p+1:p,layout:E.layout,borderPosition:u?c==="header"?"bottom":"top":"none"},{name:g,classNames:i,styles:l,unstyled:y}),P=typeof a=="object"&&a!==null?vy(a,w).reduce(($,[k,b])=>($[`@media (min-width: ${k}px)`]={[`--mantine-${c}-height`]:`${b}px`},$),{}):null;return j.createElement(Ge,Cd({component:c==="header"?"header":"footer",className:h(f.root,o),ref:t},v),r,j.createElement(vS,{styles:()=>({":root":Cd({[`--mantine-${c}-height`]:typeof a=="object"?`${a==null?void 0:a.base}px`||"100%":`${a}px`},P)})}))});Sy.displayName="@mantine/core/VerticalSection";var kx=Object.defineProperty,Ox=Object.defineProperties,Cx=Object.getOwnPropertyDescriptors,$d=Object.getOwnPropertySymbols,$x=Object.prototype.hasOwnProperty,Rx=Object.prototype.propertyIsEnumerable,Rd=(e,t,n)=>t in e?kx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jx=(e,t)=>{for(var n in t||(t={}))$x.call(t,n)&&Rd(e,n,t[n]);if($d)for(var n of $d(t))Rx.call(t,n)&&Rd(e,n,t[n]);return e},bx=(e,t)=>Ox(e,Cx(t));const Nx={fixed:!1,position:{top:0,left:0,right:0}},xy=x.forwardRef((e,t)=>{const n=Qe("Header",Nx,e);return j.createElement(Sy,bx(jx({section:"header",__staticSelector:"Header"},n),{ref:t}))});xy.displayName="@mantine/core/Header";var zx=Object.defineProperty,jd=Object.getOwnPropertySymbols,Tx=Object.prototype.hasOwnProperty,Ix=Object.prototype.propertyIsEnumerable,bd=(e,t,n)=>t in e?zx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mx=(e,t)=>{for(var n in t||(t={}))Tx.call(t,n)&&bd(e,n,t[n]);if(jd)for(var n of jd(t))Ix.call(t,n)&&bd(e,n,t[n]);return e};function Lx(e,t){const n=t.fn.size({size:e.padding,sizes:t.spacing}),r=e.navbarOffsetBreakpoint?t.fn.size({size:e.navbarOffsetBreakpoint,sizes:t.breakpoints}):null,o=e.asideOffsetBreakpoint?t.fn.size({size:e.asideOffsetBreakpoint,sizes:t.breakpoints}):null;return e.fixed?{minHeight:"100vh",paddingTop:`calc(var(--mantine-header-height, 0px) + ${n}px)`,paddingBottom:`calc(var(--mantine-footer-height, 0px) + ${n}px)`,paddingLeft:`calc(var(--mantine-navbar-width, 0px) + ${n}px)`,paddingRight:`calc(var(--mantine-aside-width, 0px) + ${n}px)`,[`@media (max-width: ${r-1}px)`]:{paddingLeft:n},[`@media (max-width: ${o-1}px)`]:{paddingRight:n}}:{padding:n}}var Dx=ot((e,t)=>({root:{boxSizing:"border-box"},body:{display:"flex",boxSizing:"border-box"},main:Mx({flex:1,width:"100vw",boxSizing:"border-box"},Lx(t,e))}));const Ax=Dx;var Fx=Object.defineProperty,fl=Object.getOwnPropertySymbols,Ey=Object.prototype.hasOwnProperty,Py=Object.prototype.propertyIsEnumerable,Nd=(e,t,n)=>t in e?Fx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ux=(e,t)=>{for(var n in t||(t={}))Ey.call(t,n)&&Nd(e,n,t[n]);if(fl)for(var n of fl(t))Py.call(t,n)&&Nd(e,n,t[n]);return e},Bx=(e,t)=>{var n={};for(var r in e)Ey.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&fl)for(var r of fl(e))t.indexOf(r)<0&&Py.call(e,r)&&(n[r]=e[r]);return n};const Vx={fixed:!0,padding:"md"},ky=x.forwardRef((e,t)=>{const n=Qe("AppShell",Vx,e),{children:r,navbar:o,header:i,footer:l,aside:a,fixed:s,zIndex:u,padding:d,navbarOffsetBreakpoint:m,asideOffsetBreakpoint:c,className:y,styles:g,classNames:v,unstyled:E,hidden:p,layout:f}=n,h=Bx(n,["children","navbar","header","footer","aside","fixed","zIndex","padding","navbarOffsetBreakpoint","asideOffsetBreakpoint","className","styles","classNames","unstyled","hidden","layout"]),{classes:w,cx:P}=Ax({padding:d,fixed:s,navbarOffsetBreakpoint:m,asideOffsetBreakpoint:c},{styles:g,classNames:v,unstyled:E,name:"AppShell"});return p?j.createElement(j.Fragment,null,r):j.createElement(hx,{value:{fixed:s,zIndex:u,layout:f}},j.createElement(Ge,Ux({className:P(w.root,y),ref:t},h),i,j.createElement("div",{className:w.body},o,j.createElement("main",{className:w.main},r),a),l))});ky.displayName="@mantine/core/AppShell";const Hr={xs:30,sm:36,md:42,lg:50,xl:60};var Hx=ot((e,{orientation:t,buttonBorderWidth:n})=>({root:{display:"flex",flexDirection:t==="vertical"?"column":"row","& [data-button]":{"&:first-of-type":{borderBottomRightRadius:0,[t==="vertical"?"borderBottomLeftRadius":"borderTopRightRadius"]:0,[t==="vertical"?"borderBottomWidth":"borderRightWidth"]:n/2},"&:last-of-type":{borderTopLeftRadius:0,[t==="vertical"?"borderTopRightRadius":"borderBottomLeftRadius"]:0,[t==="vertical"?"borderTopWidth":"borderLeftWidth"]:n/2},"&:not(:first-of-type):not(:last-of-type)":{borderRadius:0,[t==="vertical"?"borderTopWidth":"borderLeftWidth"]:n/2,[t==="vertical"?"borderBottomWidth":"borderRightWidth"]:n/2},"& + [data-button]":{[t==="vertical"?"marginTop":"marginLeft"]:-n,"@media (min-resolution: 192dpi)":{[t==="vertical"?"marginTop":"marginLeft"]:0}}}}}));const Wx=Hx;var Gx=Object.defineProperty,dl=Object.getOwnPropertySymbols,Oy=Object.prototype.hasOwnProperty,Cy=Object.prototype.propertyIsEnumerable,zd=(e,t,n)=>t in e?Gx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qx=(e,t)=>{for(var n in t||(t={}))Oy.call(t,n)&&zd(e,n,t[n]);if(dl)for(var n of dl(t))Cy.call(t,n)&&zd(e,n,t[n]);return e},Kx=(e,t)=>{var n={};for(var r in e)Oy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&dl)for(var r of dl(e))t.indexOf(r)<0&&Cy.call(e,r)&&(n[r]=e[r]);return n};const Xx={orientation:"horizontal",buttonBorderWidth:1},$y=x.forwardRef((e,t)=>{const n=Qe("ButtonGroup",Xx,e),{className:r,orientation:o,buttonBorderWidth:i,unstyled:l}=n,a=Kx(n,["className","orientation","buttonBorderWidth","unstyled"]),{classes:s,cx:u}=Wx({orientation:o,buttonBorderWidth:i},{name:"ButtonGroup",unstyled:l});return j.createElement(Ge,Qx({className:u(s.root,r),ref:t},a))});$y.displayName="@mantine/core/ButtonGroup";var Yx=Object.defineProperty,Zx=Object.defineProperties,Jx=Object.getOwnPropertyDescriptors,Td=Object.getOwnPropertySymbols,qx=Object.prototype.hasOwnProperty,eE=Object.prototype.propertyIsEnumerable,Id=(e,t,n)=>t in e?Yx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$n=(e,t)=>{for(var n in t||(t={}))qx.call(t,n)&&Id(e,n,t[n]);if(Td)for(var n of Td(t))eE.call(t,n)&&Id(e,n,t[n]);return e},Vs=(e,t)=>Zx(e,Jx(t));const Hs={xs:{height:Hr.xs,paddingLeft:14,paddingRight:14},sm:{height:Hr.sm,paddingLeft:18,paddingRight:18},md:{height:Hr.md,paddingLeft:22,paddingRight:22},lg:{height:Hr.lg,paddingLeft:26,paddingRight:26},xl:{height:Hr.xl,paddingLeft:32,paddingRight:32},"compact-xs":{height:22,paddingLeft:7,paddingRight:7},"compact-sm":{height:26,paddingLeft:8,paddingRight:8},"compact-md":{height:30,paddingLeft:10,paddingRight:10},"compact-lg":{height:34,paddingLeft:12,paddingRight:12},"compact-xl":{height:40,paddingLeft:14,paddingRight:14}};function tE({compact:e,size:t,withLeftIcon:n,withRightIcon:r}){if(e)return Hs[`compact-${t}`];const o=Hs[t];return Vs($n({},o),{paddingLeft:n?o.paddingLeft/1.5:o.paddingLeft,paddingRight:r?o.paddingRight/1.5:o.paddingRight})}const nE=e=>({display:e?"block":"inline-block",width:e?"100%":"auto"});function rE({variant:e,theme:t,color:n,gradient:r}){const o=t.fn.variant({color:n,variant:e,gradient:r});return e==="gradient"?{border:0,backgroundImage:o.background,color:o.color,"&:hover":t.fn.hover({backgroundSize:"200%"})}:$n({border:`1px solid ${o.border}`,backgroundColor:o.background,color:o.color},t.fn.hover({backgroundColor:o.hover}))}var oE=ot((e,{color:t,size:n,radius:r,fullWidth:o,compact:i,gradient:l,variant:a,withLeftIcon:s,withRightIcon:u})=>({root:Vs($n(Vs($n($n($n($n({},tE({compact:i,size:n,withLeftIcon:s,withRightIcon:u})),e.fn.fontStyles()),e.fn.focusStyles()),nE(o)),{borderRadius:e.fn.radius(r),fontWeight:600,position:"relative",lineHeight:1,fontSize:e.fn.size({size:n,sizes:e.fontSizes}),userSelect:"none",cursor:"pointer"}),rE({variant:a,theme:e,color:t,gradient:l})),{"&:active":e.activeStyles,"&:disabled, &[data-disabled]":{borderColor:"transparent",backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],color:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[5],cursor:"not-allowed",backgroundImage:"none",pointerEvents:"none","&:active":{transform:"none"}},"&[data-loading]":{pointerEvents:"none","&::before":{content:'""',position:"absolute",top:-1,left:-1,right:-1,bottom:-1,backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.colors.dark[7],.5):"rgba(255, 255, 255, .5)",borderRadius:e.fn.radius(r),cursor:"not-allowed"}}}),icon:{display:"flex",alignItems:"center"},leftIcon:{marginRight:10},rightIcon:{marginLeft:10},centerLoader:{position:"absolute",left:"50%",transform:"translateX(-50%)",opacity:.5},inner:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",overflow:"visible"},label:{whiteSpace:"nowrap",height:"100%",overflow:"hidden",display:"flex",alignItems:"center"}}));const iE=oE;var lE=Object.defineProperty,pl=Object.getOwnPropertySymbols,Ry=Object.prototype.hasOwnProperty,jy=Object.prototype.propertyIsEnumerable,Md=(e,t,n)=>t in e?lE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ld=(e,t)=>{for(var n in t||(t={}))Ry.call(t,n)&&Md(e,n,t[n]);if(pl)for(var n of pl(t))jy.call(t,n)&&Md(e,n,t[n]);return e},aE=(e,t)=>{var n={};for(var r in e)Ry.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&pl)for(var r of pl(e))t.indexOf(r)<0&&jy.call(e,r)&&(n[r]=e[r]);return n};const sE={size:"sm",type:"button",variant:"filled",loaderPosition:"left"},qu=x.forwardRef((e,t)=>{const n=Qe("Button",sE,e),{className:r,size:o,color:i,type:l,disabled:a,children:s,leftIcon:u,rightIcon:d,fullWidth:m,variant:c,radius:y,uppercase:g,compact:v,loading:E,loaderPosition:p,loaderProps:f,gradient:h,classNames:w,styles:P,unstyled:$}=n,k=aE(n,["className","size","color","type","disabled","children","leftIcon","rightIcon","fullWidth","variant","radius","uppercase","compact","loading","loaderPosition","loaderProps","gradient","classNames","styles","unstyled"]),{classes:b,cx:V,theme:I}=iE({radius:y,color:i,size:o,fullWidth:m,compact:v,gradient:h,variant:c,withLeftIcon:!!u,withRightIcon:!!d},{name:"Button",unstyled:$,classNames:w,styles:P}),Z=I.fn.variant({color:i,variant:c}),ye=j.createElement(yy,Ld({color:Z.color,size:I.fn.size({size:o,sizes:Hs}).height/2},f));return j.createElement(YS,Ld({className:V(b.root,r),type:l,disabled:a,"data-button":!0,"data-disabled":a||void 0,"data-loading":E||void 0,ref:t,unstyled:$},k),j.createElement("div",{className:b.inner},(u||E&&p==="left")&&j.createElement("span",{className:V(b.icon,b.leftIcon)},E&&p==="left"?ye:u),E&&p==="center"&&j.createElement("span",{className:b.centerLoader},ye),j.createElement("span",{className:b.label,style:{textTransform:g?"uppercase":void 0}},s),(d||E&&p==="right")&&j.createElement("span",{className:V(b.icon,b.rightIcon)},E&&p==="right"?ye:d)))});qu.displayName="@mantine/core/Button";qu.Group=$y;const ql=qu;function uE(e){return x.Children.toArray(e).filter(Boolean)}const cE={left:"flex-start",center:"center",right:"flex-end",apart:"space-between"};var fE=ot((e,{spacing:t,position:n,noWrap:r,grow:o,align:i,count:l})=>({root:{boxSizing:"border-box",display:"flex",flexDirection:"row",alignItems:i||"center",flexWrap:r?"nowrap":"wrap",justifyContent:cE[n],gap:e.fn.size({size:t,sizes:e.spacing}),"& > *":{boxSizing:"border-box",maxWidth:o?`calc(${100/l}% - ${e.fn.size({size:t,sizes:e.spacing})-e.fn.size({size:t,sizes:e.spacing})/l}px)`:void 0,flexGrow:o?1:0}}}));const dE=fE;var pE=Object.defineProperty,hl=Object.getOwnPropertySymbols,by=Object.prototype.hasOwnProperty,Ny=Object.prototype.propertyIsEnumerable,Dd=(e,t,n)=>t in e?pE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,hE=(e,t)=>{for(var n in t||(t={}))by.call(t,n)&&Dd(e,n,t[n]);if(hl)for(var n of hl(t))Ny.call(t,n)&&Dd(e,n,t[n]);return e},mE=(e,t)=>{var n={};for(var r in e)by.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&hl)for(var r of hl(e))t.indexOf(r)<0&&Ny.call(e,r)&&(n[r]=e[r]);return n};const yE={position:"left",spacing:"md"},zy=x.forwardRef((e,t)=>{const n=Qe("Group",yE,e),{className:r,position:o,align:i,children:l,noWrap:a,grow:s,spacing:u,unstyled:d}=n,m=mE(n,["className","position","align","children","noWrap","grow","spacing","unstyled"]),c=uE(l),{classes:y,cx:g}=dE({align:i,grow:s,noWrap:a,spacing:u,position:o,count:c.length},{unstyled:d,name:"Group"});return j.createElement(Ge,hE({className:g(y.root,r),ref:t},m),c)});zy.displayName="@mantine/core/Group";var gE=ot((e,{spacing:t,align:n,justify:r})=>({root:{display:"flex",flexDirection:"column",alignItems:n,justifyContent:r,gap:e.fn.size({size:t,sizes:e.spacing})}}));const vE=gE;var wE=Object.defineProperty,ml=Object.getOwnPropertySymbols,Ty=Object.prototype.hasOwnProperty,Iy=Object.prototype.propertyIsEnumerable,Ad=(e,t,n)=>t in e?wE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_E=(e,t)=>{for(var n in t||(t={}))Ty.call(t,n)&&Ad(e,n,t[n]);if(ml)for(var n of ml(t))Iy.call(t,n)&&Ad(e,n,t[n]);return e},SE=(e,t)=>{var n={};for(var r in e)Ty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ml)for(var r of ml(e))t.indexOf(r)<0&&Iy.call(e,r)&&(n[r]=e[r]);return n};const xE={spacing:"md",align:"stretch",justify:"flex-start"},My=x.forwardRef((e,t)=>{const n=Qe("Stack",xE,e),{spacing:r,className:o,align:i,justify:l,unstyled:a}=n,s=SE(n,["spacing","className","align","justify","unstyled"]),{classes:u,cx:d}=vE({spacing:r,align:i,justify:l},{name:"Stack",unstyled:a});return j.createElement(Ge,_E({className:d(u.root,o),ref:t},s))});My.displayName="@mantine/core/Stack";var EE=Object.defineProperty,PE=Object.defineProperties,kE=Object.getOwnPropertyDescriptors,Fd=Object.getOwnPropertySymbols,OE=Object.prototype.hasOwnProperty,CE=Object.prototype.propertyIsEnumerable,Ud=(e,t,n)=>t in e?EE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$E=(e,t)=>{for(var n in t||(t={}))OE.call(t,n)&&Ud(e,n,t[n]);if(Fd)for(var n of Fd(t))CE.call(t,n)&&Ud(e,n,t[n]);return e},RE=(e,t)=>PE(e,kE(t)),jE=ot((e,{color:t})=>{const n=t||(e.colorScheme==="dark"?"dark":"gray"),r=e.fn.variant({color:n,variant:"light"});return{root:RE($E({},e.fn.fontStyles()),{lineHeight:e.lineHeight,padding:`2px calc(${e.spacing.xs}px / 2)`,borderRadius:e.radius.sm,color:e.colorScheme==="dark"?n==="dark"?e.colors.dark[0]:e.white:e.colors.dark[7],backgroundColor:e.colorScheme==="dark"&&n==="dark"?e.colors.dark[5]:r.background,fontFamily:e.fontFamilyMonospace,fontSize:e.fontSizes.xs}),block:{padding:e.spacing.xs,margin:0,overflowX:"auto"}}});const bE=jE;var NE=Object.defineProperty,yl=Object.getOwnPropertySymbols,Ly=Object.prototype.hasOwnProperty,Dy=Object.prototype.propertyIsEnumerable,Bd=(e,t,n)=>t in e?NE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Vd=(e,t)=>{for(var n in t||(t={}))Ly.call(t,n)&&Bd(e,n,t[n]);if(yl)for(var n of yl(t))Dy.call(t,n)&&Bd(e,n,t[n]);return e},zE=(e,t)=>{var n={};for(var r in e)Ly.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&yl)for(var r of yl(e))t.indexOf(r)<0&&Dy.call(e,r)&&(n[r]=e[r]);return n};const Ay=x.forwardRef((e,t)=>{const n=Qe("Code",{},e),{className:r,children:o,block:i,color:l,unstyled:a}=n,s=zE(n,["className","children","block","color","unstyled"]),{classes:u,cx:d}=bE({color:l},{name:"Code",unstyled:a});return i?j.createElement(Ge,Vd({component:"pre",dir:"ltr",className:d(u.root,u.block,r),ref:t},s),o):j.createElement(Ge,Vd({component:"code",className:d(u.root,r),ref:t,dir:"ltr"},s),o)});Ay.displayName="@mantine/core/Code";var TE=Object.defineProperty,IE=Object.defineProperties,ME=Object.getOwnPropertyDescriptors,Hd=Object.getOwnPropertySymbols,LE=Object.prototype.hasOwnProperty,DE=Object.prototype.propertyIsEnumerable,Wd=(e,t,n)=>t in e?TE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,AE=(e,t)=>{for(var n in t||(t={}))LE.call(t,n)&&Wd(e,n,t[n]);if(Hd)for(var n of Hd(t))DE.call(t,n)&&Wd(e,n,t[n]);return e},FE=(e,t)=>IE(e,ME(t)),UE=ot((e,{size:t,radius:n})=>{const r=e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3];return{root:FE(AE({},e.fn.focusStyles()),{width:t,height:t,WebkitTapHighlightColor:"transparent",border:0,borderRadius:e.fn.size({size:n,sizes:e.radius}),appearance:"none",WebkitAppearance:"none",padding:0,position:"relative",overflow:"hidden"}),overlay:{position:"absolute",borderRadius:e.fn.size({size:n,sizes:e.radius}),top:0,left:0,right:0,bottom:0},children:{display:"inline-flex",justifyContent:"center",alignItems:"center"},shadowOverlay:{boxShadow:"rgba(0, 0, 0, .1) 0px 0px 0px 1px inset, rgb(0, 0, 0, .15) 0px 0px 4px inset",zIndex:1},alphaOverlay:{backgroundImage:`linear-gradient(45deg, ${r} 25%, transparent 25%), linear-gradient(-45deg, ${r} 25%, transparent 25%), linear-gradient(45deg, transparent 75%, ${r} 75%), linear-gradient(-45deg, ${e.colorScheme==="dark"?e.colors.dark[7]:e.white} 75%, ${r} 75%)`,backgroundSize:"8px 8px",backgroundPosition:"0 0, 0 4px, 4px -4px, -4px 0px"}}});const BE=UE;var VE=Object.defineProperty,gl=Object.getOwnPropertySymbols,Fy=Object.prototype.hasOwnProperty,Uy=Object.prototype.propertyIsEnumerable,Gd=(e,t,n)=>t in e?VE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,HE=(e,t)=>{for(var n in t||(t={}))Fy.call(t,n)&&Gd(e,n,t[n]);if(gl)for(var n of gl(t))Uy.call(t,n)&&Gd(e,n,t[n]);return e},WE=(e,t)=>{var n={};for(var r in e)Fy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&gl)for(var r of gl(e))t.indexOf(r)<0&&Uy.call(e,r)&&(n[r]=e[r]);return n};const GE={size:25,radius:25,withShadow:!0},By=x.forwardRef((e,t)=>{const n=Qe("ColorSwatch",GE,e),{color:r,size:o,radius:i,className:l,children:a,classNames:s,styles:u,unstyled:d,withShadow:m}=n,c=WE(n,["color","size","radius","className","children","classNames","styles","unstyled","withShadow"]),{classes:y,cx:g}=BE({radius:i,size:o},{classNames:s,styles:u,unstyled:d,name:"ColorSwatch"});return j.createElement(Ge,HE({className:g(y.root,l),ref:t},c),j.createElement("div",{className:g(y.alphaOverlay,y.overlay)}),m&&j.createElement("div",{className:g(y.shadowOverlay,y.overlay)}),j.createElement("div",{className:y.overlay,style:{backgroundColor:r}}),j.createElement("div",{className:g(y.children,y.overlay)},a))});By.displayName="@mantine/core/ColorSwatch";const QE=By;var KE=ot((e,{fluid:t,size:n,sizes:r})=>({root:{paddingLeft:e.spacing.md,paddingRight:e.spacing.md,maxWidth:t?"100%":e.fn.size({size:n,sizes:r}),marginLeft:"auto",marginRight:"auto"}}));const XE=KE;var YE=Object.defineProperty,vl=Object.getOwnPropertySymbols,Vy=Object.prototype.hasOwnProperty,Hy=Object.prototype.propertyIsEnumerable,Qd=(e,t,n)=>t in e?YE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ZE=(e,t)=>{for(var n in t||(t={}))Vy.call(t,n)&&Qd(e,n,t[n]);if(vl)for(var n of vl(t))Hy.call(t,n)&&Qd(e,n,t[n]);return e},JE=(e,t)=>{var n={};for(var r in e)Vy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&vl)for(var r of vl(e))t.indexOf(r)<0&&Hy.call(e,r)&&(n[r]=e[r]);return n};const qE={sizes:{xs:540,sm:720,md:960,lg:1140,xl:1320}},Wy=x.forwardRef((e,t)=>{const n=Qe("Container",qE,e),{className:r,fluid:o,size:i,unstyled:l,sizes:a}=n,s=JE(n,["className","fluid","size","unstyled","sizes"]),{classes:u,cx:d}=XE({fluid:o,size:i,sizes:a},{unstyled:l,name:"Container"});return j.createElement(Ge,ZE({className:d(u.root,r),ref:t},s))});Wy.displayName="@mantine/core/Container";const[eP,tP]=aw("Grid component was not found in tree");var nP=Object.defineProperty,Kd=Object.getOwnPropertySymbols,rP=Object.prototype.hasOwnProperty,oP=Object.prototype.propertyIsEnumerable,Xd=(e,t,n)=>t in e?nP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,iP=(e,t)=>{for(var n in t||(t={}))rP.call(t,n)&&Xd(e,n,t[n]);if(Kd)for(var n of Kd(t))oP.call(t,n)&&Xd(e,n,t[n]);return e};const ec=(e,t)=>e==="content"?"auto":e==="auto"?"0px":e?`${100/(t/e)}%`:void 0,Gy=(e,t,n)=>n||e==="auto"||e==="content"?"unset":ec(e,t),Qy=(e,t)=>{if(e)return e==="auto"||t?1:0},Ky=(e,t)=>e===0?0:e?`${100/(t/e)}%`:void 0,Xy=(e,t)=>typeof e<"u"?t.fn.size({size:e,sizes:t.spacing})/2:void 0;function lP({sizes:e,offsets:t,orders:n,theme:r,columns:o,gutters:i,grow:l}){return Lm.reduce((a,s)=>(a[`@media (min-width: ${r.breakpoints[s]}px)`]={order:n[s],flexBasis:ec(e[s],o),padding:Xy(i[s],r),flexShrink:0,width:e[s]==="content"?"auto":void 0,maxWidth:Gy(e[s],o,l),marginLeft:Ky(t[s],o),flexGrow:Qy(e[s],l)},a),{})}var aP=ot((e,{gutter:t,gutterXs:n,gutterSm:r,gutterMd:o,gutterLg:i,gutterXl:l,grow:a,offset:s,offsetXs:u,offsetSm:d,offsetMd:m,offsetLg:c,offsetXl:y,columns:g,span:v,xs:E,sm:p,md:f,lg:h,xl:w,order:P,orderXs:$,orderSm:k,orderMd:b,orderLg:V,orderXl:I})=>({col:iP({boxSizing:"border-box",flexGrow:Qy(v,a),order:P,padding:Xy(t,e),marginLeft:Ky(s,g),flexBasis:ec(v,g),flexShrink:0,width:v==="content"?"auto":void 0,maxWidth:Gy(v,g,a)},lP({sizes:{xs:E,sm:p,md:f,lg:h,xl:w},offsets:{xs:u,sm:d,md:m,lg:c,xl:y},orders:{xs:$,sm:k,md:b,lg:V,xl:I},gutters:{xs:n,sm:r,md:o,lg:i,xl:l},theme:e,columns:g,grow:a}))}));const sP=aP;var uP=Object.defineProperty,wl=Object.getOwnPropertySymbols,Yy=Object.prototype.hasOwnProperty,Zy=Object.prototype.propertyIsEnumerable,Yd=(e,t,n)=>t in e?uP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cP=(e,t)=>{for(var n in t||(t={}))Yy.call(t,n)&&Yd(e,n,t[n]);if(wl)for(var n of wl(t))Zy.call(t,n)&&Yd(e,n,t[n]);return e},fP=(e,t)=>{var n={};for(var r in e)Yy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&wl)for(var r of wl(e))t.indexOf(r)<0&&Zy.call(e,r)&&(n[r]=e[r]);return n};const dP={};function pP(e){return e==="auto"||e==="content"?!0:typeof e=="number"&&e>0&&e%1===0}const Jy=x.forwardRef((e,t)=>{const n=Qe("GridCol",dP,e),{children:r,span:o,offset:i,offsetXs:l,offsetSm:a,offsetMd:s,offsetLg:u,offsetXl:d,xs:m,sm:c,md:y,lg:g,xl:v,order:E,orderXs:p,orderSm:f,orderMd:h,orderLg:w,orderXl:P,className:$,id:k,unstyled:b}=n,V=fP(n,["children","span","offset","offsetXs","offsetSm","offsetMd","offsetLg","offsetXl","xs","sm","md","lg","xl","order","orderXs","orderSm","orderMd","orderLg","orderXl","className","id","unstyled"]),I=tP(),Z=o||I.columns,{classes:ye,cx:Ke}=sP({gutter:I.gutter,gutterXs:I.gutterXs,gutterSm:I.gutterSm,gutterMd:I.gutterMd,gutterLg:I.gutterLg,gutterXl:I.gutterXl,offset:i,offsetXs:l,offsetSm:a,offsetMd:s,offsetLg:u,offsetXl:d,xs:m,sm:c,md:y,lg:g,xl:v,order:E,orderXs:p,orderSm:f,orderMd:h,orderLg:w,orderXl:P,grow:I.grow,columns:I.columns,span:Z},{unstyled:b,name:"Grid"});return!pP(Z)||Z>I.columns?null:j.createElement(Ge,cP({className:Ke(ye.col,$),ref:t},V),r)});Jy.displayName="@mantine/core/Col";var hP=Object.defineProperty,Zd=Object.getOwnPropertySymbols,mP=Object.prototype.hasOwnProperty,yP=Object.prototype.propertyIsEnumerable,Jd=(e,t,n)=>t in e?hP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gP=(e,t)=>{for(var n in t||(t={}))mP.call(t,n)&&Jd(e,n,t[n]);if(Zd)for(var n of Zd(t))yP.call(t,n)&&Jd(e,n,t[n]);return e};function vP(e,t){return Lm.reduce((n,r)=>(typeof e[r]<"u"&&(n[`@media (min-width: ${t.breakpoints[r]}px)`]={margin:-t.fn.size({size:e[r],sizes:t.spacing})/2}),n),{})}var wP=ot((e,{justify:t,align:n,gutter:r,gutterXs:o,gutterSm:i,gutterMd:l,gutterLg:a,gutterXl:s})=>({root:gP({margin:-e.fn.size({size:r,sizes:e.spacing})/2,display:"flex",flexWrap:"wrap",justifyContent:t,alignItems:n},vP({xs:o,sm:i,md:l,lg:a,xl:s},e))}));const _P=wP;var SP=Object.defineProperty,_l=Object.getOwnPropertySymbols,qy=Object.prototype.hasOwnProperty,eg=Object.prototype.propertyIsEnumerable,qd=(e,t,n)=>t in e?SP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xP=(e,t)=>{for(var n in t||(t={}))qy.call(t,n)&&qd(e,n,t[n]);if(_l)for(var n of _l(t))eg.call(t,n)&&qd(e,n,t[n]);return e},EP=(e,t)=>{var n={};for(var r in e)qy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&_l)for(var r of _l(e))t.indexOf(r)<0&&eg.call(e,r)&&(n[r]=e[r]);return n};const PP={gutter:"md",justify:"flex-start",align:"stretch",columns:12},ao=x.forwardRef((e,t)=>{const n=Qe("Grid",PP,e),{gutter:r,gutterXs:o,gutterSm:i,gutterMd:l,gutterLg:a,gutterXl:s,children:u,grow:d,justify:m,align:c,columns:y,className:g,id:v,unstyled:E}=n,p=EP(n,["gutter","gutterXs","gutterSm","gutterMd","gutterLg","gutterXl","children","grow","justify","align","columns","className","id","unstyled"]),{classes:f,cx:h}=_P({gutter:r,justify:m,align:c,gutterXs:o,gutterSm:i,gutterMd:l,gutterLg:a,gutterXl:s},{unstyled:E,name:"Grid"});return j.createElement(eP,{value:{gutter:r,gutterXs:o,gutterSm:i,gutterMd:l,gutterLg:a,gutterXl:s,grow:d,columns:y}},j.createElement(Ge,xP({className:h(f.root,g),ref:t},p),u))});ao.Col=Jy;ao.displayName="@mantine/core/Grid";var kP=Object.defineProperty,OP=Object.defineProperties,CP=Object.getOwnPropertyDescriptors,ep=Object.getOwnPropertySymbols,$P=Object.prototype.hasOwnProperty,RP=Object.prototype.propertyIsEnumerable,tp=(e,t,n)=>t in e?kP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jP=(e,t)=>{for(var n in t||(t={}))$P.call(t,n)&&tp(e,n,t[n]);if(ep)for(var n of ep(t))RP.call(t,n)&&tp(e,n,t[n]);return e},bP=(e,t)=>OP(e,CP(t)),NP=ot((e,{captionSide:t,horizontalSpacing:n,verticalSpacing:r,fontSize:o,withBorder:i,withColumnBorders:l})=>{const a=`1px solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`;return{root:bP(jP({},e.fn.fontStyles()),{width:"100%",borderCollapse:"collapse",captionSide:t,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,lineHeight:e.lineHeight,border:i?a:"","& caption":{marginTop:t==="top"?0:e.spacing.xs,marginBottom:t==="bottom"?0:e.spacing.xs,fontSize:e.fontSizes.sm,color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]},"& thead tr th, & tfoot tr th":{textAlign:"left",fontWeight:"bold",color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],fontSize:e.fn.size({size:o,sizes:e.fontSizes}),padding:`${e.fn.size({size:r,sizes:e.spacing})}px ${e.fn.size({size:n,sizes:e.spacing})}px`},"& thead tr th":{borderBottom:a},"& tfoot tr th":{borderTop:a},"& tbody tr td":{padding:`${e.fn.size({size:r,sizes:e.spacing})}px ${e.fn.size({size:n,sizes:e.spacing})}px`,borderTop:a,fontSize:e.fn.size({size:o,sizes:e.fontSizes})},"& tbody tr:first-of-type td":{borderTop:"none"},"& thead th, & tbody td":{borderRight:l?a:"none","&:last-of-type":{borderRight:"none",borderLeft:l?a:"none"}},"&[data-striped] tbody tr:nth-of-type(odd)":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0]},"&[data-hover] tbody tr":e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]})})}});const zP=NP;var TP=Object.defineProperty,IP=Object.defineProperties,MP=Object.getOwnPropertyDescriptors,Sl=Object.getOwnPropertySymbols,tg=Object.prototype.hasOwnProperty,ng=Object.prototype.propertyIsEnumerable,np=(e,t,n)=>t in e?TP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,LP=(e,t)=>{for(var n in t||(t={}))tg.call(t,n)&&np(e,n,t[n]);if(Sl)for(var n of Sl(t))ng.call(t,n)&&np(e,n,t[n]);return e},DP=(e,t)=>IP(e,MP(t)),AP=(e,t)=>{var n={};for(var r in e)tg.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Sl)for(var r of Sl(e))t.indexOf(r)<0&&ng.call(e,r)&&(n[r]=e[r]);return n};const FP={striped:!1,highlightOnHover:!1,captionSide:"top",horizontalSpacing:"xs",fontSize:"sm",verticalSpacing:7,withBorder:!1,withColumnBorders:!1},rg=x.forwardRef((e,t)=>{const n=Qe("Table",FP,e),{className:r,children:o,striped:i,highlightOnHover:l,captionSide:a,horizontalSpacing:s,verticalSpacing:u,fontSize:d,unstyled:m,withBorder:c,withColumnBorders:y}=n,g=AP(n,["className","children","striped","highlightOnHover","captionSide","horizontalSpacing","verticalSpacing","fontSize","unstyled","withBorder","withColumnBorders"]),{classes:v,cx:E}=zP({captionSide:a,verticalSpacing:u,horizontalSpacing:s,fontSize:d,withBorder:c,withColumnBorders:y},{unstyled:m,name:"Table"});return j.createElement(Ge,DP(LP({},g),{component:"table",ref:t,className:E(v.root,r),"data-striped":i||void 0,"data-hover":l||void 0}),o)});rg.displayName="@mantine/core/Table";class rp extends Error{constructor(n,r,o){super(o);Ae(this,"url");Ae(this,"status");Ae(this,"statusText");Ae(this,"body");Ae(this,"request");this.name="ApiError",this.url=r.url,this.status=r.status,this.statusText=r.statusText,this.body=r.body,this.request=n}}class UP extends Error{constructor(t){super(t),this.name="CancelError"}get isCancelled(){return!0}}var m2;class BP{constructor(t){Ae(this,m2);Ae(this,"_isResolved");Ae(this,"_isRejected");Ae(this,"_isCancelled");Ae(this,"_cancelHandlers");Ae(this,"_promise");Ae(this,"_resolve");Ae(this,"_reject");this._isResolved=!1,this._isRejected=!1,this._isCancelled=!1,this._cancelHandlers=[],this._promise=new Promise((n,r)=>{this._resolve=n,this._reject=r;const o=a=>{var s;this._isResolved||this._isRejected||this._isCancelled||(this._isResolved=!0,(s=this._resolve)==null||s.call(this,a))},i=a=>{var s;this._isResolved||this._isRejected||this._isCancelled||(this._isRejected=!0,(s=this._reject)==null||s.call(this,a))},l=a=>{this._isResolved||this._isRejected||this._isCancelled||this._cancelHandlers.push(a)};return Object.defineProperty(l,"isResolved",{get:()=>this._isResolved}),Object.defineProperty(l,"isRejected",{get:()=>this._isRejected}),Object.defineProperty(l,"isCancelled",{get:()=>this._isCancelled}),t(o,i,l)})}then(t,n){return this._promise.then(t,n)}catch(t){return this._promise.catch(t)}finally(t){return this._promise.finally(t)}cancel(){var t;if(!(this._isResolved||this._isRejected||this._isCancelled)){if(this._isCancelled=!0,this._cancelHandlers.length)try{for(const n of this._cancelHandlers)n()}catch(n){console.warn("Cancellation threw an error",n);return}this._cancelHandlers.length=0,(t=this._reject)==null||t.call(this,new UP("Request aborted"))}}get isCancelled(){return this._isCancelled}}m2=Symbol.toStringTag;const It={BASE:"",VERSION:"0.1.0",WITH_CREDENTIALS:!1,CREDENTIALS:"include",TOKEN:void 0,USERNAME:void 0,PASSWORD:void 0,HEADERS:void 0,ENCODE_PATH:void 0};var qt=(e=>(e.THROUGH="through",e.DIVERGING="diverging",e.CONVERGING="converging",e))(qt||{}),gr=(e=>(e.STRAIGHT="straight",e.CURVE="curve",e))(gr||{}),an=(e=>(e.A="A",e.B="B",e))(an||{});const tc=e=>e!=null,Fo=e=>typeof e=="string",Fa=e=>Fo(e)&&e!=="",nc=e=>typeof e=="object"&&typeof e.type=="string"&&typeof e.stream=="function"&&typeof e.arrayBuffer=="function"&&typeof e.constructor=="function"&&typeof e.constructor.name=="string"&&/^(Blob|File)$/.test(e.constructor.name)&&/^(Blob|File)$/.test(e[Symbol.toStringTag]),og=e=>e instanceof FormData,VP=e=>{try{return btoa(e)}catch{return Buffer.from(e).toString("base64")}},HP=e=>{const t=[],n=(o,i)=>{t.push(`${encodeURIComponent(o)}=${encodeURIComponent(String(i))}`)},r=(o,i)=>{tc(i)&&(Array.isArray(i)?i.forEach(l=>{r(o,l)}):typeof i=="object"?Object.entries(i).forEach(([l,a])=>{r(`${o}[${l}]`,a)}):n(o,i))};return Object.entries(e).forEach(([o,i])=>{r(o,i)}),t.length>0?`?${t.join("&")}`:""},WP=(e,t)=>{const n=e.ENCODE_PATH||encodeURI,r=t.url.replace("{api-version}",e.VERSION).replace(/{(.*?)}/g,(i,l)=>{var a;return(a=t.path)!=null&&a.hasOwnProperty(l)?n(String(t.path[l])):i}),o=`${e.BASE}${r}`;return t.query?`${o}${HP(t.query)}`:o},GP=e=>{if(e.formData){const t=new FormData,n=(r,o)=>{Fo(o)||nc(o)?t.append(r,o):t.append(r,JSON.stringify(o))};return Object.entries(e.formData).filter(([r,o])=>tc(o)).forEach(([r,o])=>{Array.isArray(o)?o.forEach(i=>n(r,i)):n(r,o)}),t}},pi=async(e,t)=>typeof t=="function"?t(e):t,QP=async(e,t)=>{const n=await pi(t,e.TOKEN),r=await pi(t,e.USERNAME),o=await pi(t,e.PASSWORD),i=await pi(t,e.HEADERS),l=Object.entries({Accept:"application/json",...i,...t.headers}).filter(([a,s])=>tc(s)).reduce((a,[s,u])=>({...a,[s]:String(u)}),{});if(Fa(n)&&(l.Authorization=`Bearer ${n}`),Fa(r)&&Fa(o)){const a=VP(`${r}:${o}`);l.Authorization=`Basic ${a}`}return t.body&&(t.mediaType?l["Content-Type"]=t.mediaType:nc(t.body)?l["Content-Type"]=t.body.type||"application/octet-stream":Fo(t.body)?l["Content-Type"]="text/plain":og(t.body)||(l["Content-Type"]="application/json")),new Headers(l)},KP=e=>{var t;if(e.body)return(t=e.mediaType)!=null&&t.includes("/json")?JSON.stringify(e.body):Fo(e.body)||nc(e.body)||og(e.body)?e.body:JSON.stringify(e.body)},XP=async(e,t,n,r,o,i,l)=>{const a=new AbortController,s={headers:i,body:r??o,method:t.method,signal:a.signal};return e.WITH_CREDENTIALS&&(s.credentials=e.CREDENTIALS),l(()=>a.abort()),await fetch(n,s)},YP=(e,t)=>{if(t){const n=e.headers.get(t);if(Fo(n))return n}},ZP=async e=>{if(e.status!==204)try{const t=e.headers.get("Content-Type");if(t)return t.toLowerCase().startsWith("application/json")?await e.json():await e.text()}catch(t){console.error(t)}},JP=(e,t)=>{const r={400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable",...e.errors}[t.status];if(r)throw new rp(e,t,r);if(!t.ok)throw new rp(e,t,"Generic Error")},Mt=(e,t)=>new BP(async(n,r,o)=>{try{const i=WP(e,t),l=GP(t),a=KP(t),s=await QP(e,t);if(!o.isCancelled){const u=await XP(e,t,i,a,l,s,o),d=await ZP(u),m=YP(u,t.responseHeader),c={url:i,ok:u.ok,status:u.status,statusText:u.statusText,body:m??d};JP(t,c),n(c.body)}}catch(i){r(i)}});class Qt{static hello(){return Mt(It,{method:"GET",url:"/api/hello"})}static getState(){return Mt(It,{method:"GET",url:"/api/state"})}static moveTrain(t,n){return Mt(It,{method:"POST",url:"/api/state/trains/{train_id}/move",path:{train_id:t},body:n,mediaType:"application/json",errors:{422:"Validation Error"}})}static putTrain(t,n){return Mt(It,{method:"POST",url:"/api/state/trains/{train_id}/put",path:{train_id:t},body:n,mediaType:"application/json",errors:{422:"Validation Error"}})}static updateJunction(t,n){return Mt(It,{method:"POST",url:"/api/state/junctions/{junction_id}/update",path:{junction_id:t},body:n,mediaType:"application/json",errors:{422:"Validation Error"}})}static detectObstacle(t){return Mt(It,{method:"POST",url:"/api/state/obstacles/{obstacle_id}/detect",path:{obstacle_id:t},errors:{422:"Validation Error"}})}static clearObstacle(t){return Mt(It,{method:"POST",url:"/api/state/obstacles/{obstacle_id}/clear",path:{obstacle_id:t},errors:{422:"Validation Error"}})}static blockSection(t){return Mt(It,{method:"POST",url:"/api/state/sections/{section_id}/block",path:{section_id:t},errors:{422:"Validation Error"}})}static unblockSection(t){return Mt(It,{method:"POST",url:"/api/state/sections/{section_id}/unblock",path:{section_id:t},errors:{422:"Validation Error"}})}}const qP=({children:e})=>R.jsx(ky,{padding:"md",header:R.jsx(xy,{height:60,p:"md",sx:t=>({display:"flex",alignItems:"center",backgroundColor:t.colors.blue[5],fontSize:18,color:t.white,fontWeight:700}),children:"Plarailers Train Control System"}),children:e}),Et=x.createContext(null),Wn=x.createContext(null),e2=({position:e})=>R.jsx("rect",{x:e.x-60/2,y:e.y-20/2,width:60,height:20,fill:"white"}),t2=({id:e,points:t})=>{const n=x.useContext(Et);if(!n)return null;const r=n.sections[e],o=op(t[0],t[1],4),i=t.length,l=op(t[i-1],t[i-2],4),a=[o,...t.slice(1,-1),l];return R.jsx("polyline",{points:a.map(s=>`${s.x},${s.y}`).join(" "),fill:"none",stroke:r.is_blocked?"red":"white",strokeWidth:r.is_blocked?4:2,strokeLinecap:"square"})},op=(e,t,n)=>({x:e.x+(t.x-e.x)/Math.hypot(t.x-e.x,t.y-e.y)*n,y:e.y+(t.y-e.y)/Math.hypot(t.x-e.x,t.y-e.y)*n}),ip=e=>{const t=Math.hypot(e.x,e.y);return{x:e.x/t,y:e.y/t}},zn=(e,t)=>{let n=0;for(let o=0;o=a)r-=a;else return{position:{x:i.x+(l.x-i.x)*(r/a),y:i.y+(l.y-i.y)*(r/a)},direction:{x:l.x-i.x,y:l.y-i.y},partitionIndex:o+1}}{const o=t[t.length-2],i=t[t.length-1];return{position:i,direction:{x:i.x-o.x,y:i.y-o.y},partitionIndex:t.length}}},n2=({id:e})=>{const t=dt(),n=x.useContext(Et),r=x.useContext(Wn);if(!(n&&r))return null;const o=n.trains[e],{position:i,angle:l}=lp(o.head_position,n,r),{position:a,angle:s}=lp(o.tail_position,n,r),u=r2(o,n,r),d=r.trains[e];return R.jsxs(R.Fragment,{children:[R.jsx("polyline",{points:u.map(m=>`${m.x},${m.y}`).join(" "),fill:"none",stroke:d.fill,strokeWidth:4,strokeLinecap:"round",strokeLinejoin:"miter"}),R.jsxs("g",{transform:`translate(${i.x}, ${i.y})`,children:[R.jsx("g",{transform:`rotate(${l})`,children:R.jsx("polyline",{points:"-5,5 0,5 5,0 0,-5 -5,-5",fill:d.fill,stroke:d.stroke})}),o.departure_time!=null&&R.jsx("g",{transform:`translate(${0}, ${-10})`,children:R.jsx("text",{textAnchor:"middle",fill:t.colors.gray[5],children:o.departure_time-n.current_time})})]}),R.jsx("g",{transform:`translate(${a.x}, ${a.y})`,children:R.jsx("g",{transform:`rotate(${s})`,children:R.jsx("polyline",{points:"0,-5 -5,-5 -5,5 0,5",fill:d.fill,stroke:d.stroke})})})]})},lp=(e,t,n)=>{const r=t.sections[e.section_id],o=n.sections[e.section_id],{position:i,direction:l}=zn(e.mileage/r.length,o.points);e.target_junction_id===r.connected_junction_ids[an.A]&&(l.x*=-1,l.y*=-1);const a=Math.atan2(l.y,l.x)/Math.PI*180;return{position:i,angle:a}},r2=(e,t,n)=>{const r=[];if(e.head_position.section_id===e.tail_position.section_id){const o=t.sections[e.tail_position.section_id],i=n.sections[e.tail_position.section_id],{position:l,direction:a,partitionIndex:s}=zn(e.tail_position.mileage/o.length,i.points);e.tail_position.target_junction_id===o.connected_junction_ids[an.A]&&(a.x*=-1,a.y*=-1);const u=t.sections[e.head_position.section_id],d=n.sections[e.head_position.section_id],{position:m,direction:c,partitionIndex:y}=zn(e.head_position.mileage/u.length,d.points);e.head_position.target_junction_id===u.connected_junction_ids[an.A]&&(c.x*=-1,c.y*=-1),y<=s?r.push(m,...d.points.slice(y,s),l):r.push(l,...d.points.slice(s,y),m)}else{const o=t.sections[e.tail_position.section_id],i=n.sections[e.tail_position.section_id],{position:l,direction:a,partitionIndex:s}=zn(e.tail_position.mileage/o.length,i.points);e.tail_position.target_junction_id===o.connected_junction_ids[an.B]?r.push(l,...i.points.slice(s)):(a.x*=-1,a.y*=-1,r.push(l,...i.points.slice(0,s).reverse()));for(const g of e.covered_section_ids){const v=n.sections[g];v.points[0].x===r[r.length-1].x&&v.points[0].y===r[r.length-1].y?r.push(...v.points):r.push(...v.points.slice().reverse())}const u=t.sections[e.head_position.section_id],d=n.sections[e.head_position.section_id],{position:m,direction:c,partitionIndex:y}=zn(e.head_position.mileage/u.length,d.points);e.head_position.target_junction_id===u.connected_junction_ids[an.B]?r.push(...d.points.slice(0,y),m):(c.x*=-1,c.y*=-1,r.push(...d.points.slice(y).reverse(),m))}return r},o2=({id:e,position:t})=>{const n=dt(),r=x.useContext(Et),o=x.useContext(Wn);if(!(r&&o))return null;const i=r.junctions[e],l={};for(const u of[qt.CONVERGING,qt.THROUGH,qt.DIVERGING]){const d=i.connected_section_ids[u],m=r.sections[d];if(e===m.connected_junction_ids[an.A]){const c=o.sections[d].points,y=c[0],g=c[1];l[u]=ip({x:g.x-y.x,y:g.y-y.y})}else if(e===m.connected_junction_ids[an.B]){const c=o.sections[d].points,y=c[c.length-1],g=c[c.length-2];l[u]=ip({x:g.x-y.x,y:g.y-y.y})}}let a;switch(i.current_direction){case gr.STRAIGHT:{a=qt.THROUGH;break}case gr.CURVE:{a=qt.DIVERGING;break}}const s=6;return R.jsxs("g",{transform:`translate(${t.x}, ${t.y})`,children:[R.jsx("circle",{cx:0,cy:0,r:s,fill:n.white,stroke:n.colors.gray[6]}),R.jsx("polyline",{points:[{x:l[qt.CONVERGING].x*s,y:l[qt.CONVERGING].y*s},{x:0,y:0},{x:l[a].x*s,y:l[a].y*s}].map(u=>`${u.x},${u.y}`).join(" "),fill:"none",stroke:n.colors.blue[7],strokeWidth:4})]})},i2=({id:e})=>{const t=dt(),n=x.useContext(Et),r=x.useContext(Wn);if(!(n&&r))return null;const o=n.stops[e],i=n.sections[o.position.section_id],l=r.sections[o.position.section_id],{position:a,direction:s}=zn(o.position.mileage/i.length,l.points),u=Math.atan2(s.y,s.x)/Math.PI*180;return R.jsx("g",{transform:`translate(${a.x}, ${a.y})`,children:R.jsx("g",{transform:`rotate(${u+180})`,children:R.jsxs("g",{transform:"translate(0, -10)",children:[R.jsx("polyline",{points:"0,0 0,10",stroke:t.colors.dark[2],strokeWidth:2}),R.jsx("polygon",{points:"-5,0 0,5 5,0 0,-5",fill:t.white,stroke:t.colors.red[7],strokeWidth:2})]})})})},l2=({id:e})=>{const t=dt(),n=x.useContext(Et),r=x.useContext(Wn);if(!(n&&r))return null;const o=n.obstacles[e];if(!o.is_detected)return null;const i=n.sections[o.position.section_id],l=r.sections[o.position.section_id],{position:a,direction:s}=zn(o.position.mileage/i.length,l.points),u=Math.atan2(s.y,s.x)/Math.PI*180;return R.jsx("g",{transform:`translate(${a.x}, ${a.y})`,children:R.jsx("g",{transform:`rotate(${u})`,children:R.jsxs("g",{children:[R.jsx("polyline",{points:"-10,-10 10,10",stroke:t.colors.red[8],strokeWidth:6}),R.jsx("polyline",{points:"-10,10 10,-10",stroke:t.colors.red[8],strokeWidth:6}),R.jsx("animate",{attributeName:"opacity",values:"1;0;1;1;1;1",dur:"2s",repeatCount:"indefinite"})]})})})},a2=({children:e})=>{const t=dt(),n=x.useContext(Et),r=x.useContext(Wn);return n&&r?R.jsxs("svg",{width:"100%",viewBox:`0 0 ${r.width} ${r.height}`,children:[R.jsx("rect",{width:r.width,height:r.height,fill:t.colors.dark[7]}),Object.entries(r.platforms).map(([o,i])=>R.jsx(e2,{position:i.position},o)),Object.entries(r.stops).filter(([o,i])=>n.stops[o]).map(([o,i])=>R.jsx(i2,{id:o},o)),Object.entries(r.sections).filter(([o,i])=>n.sections[o]).map(([o,i])=>R.jsx(t2,{id:o,points:i.points},o)),Object.entries(r.junctions).filter(([o,i])=>n.junctions[o]).map(([o,i])=>R.jsx(o2,{id:o,position:i.position},o)),Object.entries(r.obstacles).filter(([o,i])=>n.obstacles[o]).map(([o,i])=>R.jsx(l2,{id:o},o)),Object.entries(r.trains).filter(([o,i])=>n.trains[o]).map(([o,i])=>R.jsx(n2,{id:o},o)),e]}):null},s2=()=>R.jsx("div",{children:R.jsxs(zy,{children:[R.jsx(ap,{id:"t0",delta:10}),R.jsx(ap,{id:"t1",delta:10}),R.jsx(hi,{id:"j0"}),R.jsx(hi,{id:"j1"}),R.jsx(hi,{id:"j2"}),R.jsx(hi,{id:"j3"}),R.jsx(u2,{id:"obstacle_0"}),R.jsx(c2,{id:"s3"})]})}),ap=({id:e,delta:t})=>R.jsxs(ql,{styles:n=>({label:{fontFamily:n.fontFamilyMonospace}}),onClick:()=>{Qt.moveTrain(e,{delta:t})},children:["MoveTrain(",e,", ",t,")"]},e),hi=({id:e})=>{const t=x.useContext(Et);if(!t)return null;const n=t.junctions[e];return R.jsxs(ql,{styles:r=>({label:{fontFamily:r.fontFamilyMonospace}}),onClick:()=>{n.current_direction==gr.STRAIGHT?Qt.updateJunction(e,{direction:gr.CURVE}):Qt.updateJunction(e,{direction:gr.STRAIGHT})},children:["ToggleJunction(",e,")"]},e)},u2=({id:e})=>{const t=x.useContext(Et);if(!t)return null;const n=t.obstacles[e];return R.jsx(ql,{variant:n.is_detected?"filled":"light",color:"red",styles:r=>({label:{fontFamily:r.fontFamilyMonospace}}),onClick:()=>{n.is_detected?Qt.clearObstacle(e):Qt.detectObstacle(e)},children:n.is_detected?`ClearObstacle(${e})`:`DetectObstacle(${e})`})},c2=({id:e})=>{const t=x.useContext(Et);if(!t)return null;const n=t.sections[e];return R.jsx(ql,{variant:n.is_blocked?"filled":"light",color:"red",styles:r=>({label:{fontFamily:r.fontFamilyMonospace}}),onClick:()=>{n.is_blocked?Qt.unblockSection(e):Qt.blockSection(e)},children:n.is_blocked?`UnblockSection(${e})`:`BlockSection(${e})`})},f2=()=>{const e=x.useContext(Et),t=x.useContext(Wn);return e&&t?R.jsxs(rg,{sx:n=>({fontFamily:n.fontFamilyMonospace}),children:[R.jsx("thead",{children:R.jsxs("tr",{children:[R.jsx("th",{}),R.jsx("th",{children:"train"}),R.jsx("th",{children:"speed"})]})}),R.jsx("tbody",{children:e&&Object.entries(e.trains).filter(([n,r])=>t.trains[n]).map(([n,r])=>R.jsxs("tr",{children:[R.jsx("td",{children:R.jsx(QE,{color:t.trains[n].fill})}),R.jsx("td",{children:n}),R.jsx("td",{children:r.speed_command.toFixed(2)})]},n))})]}):null},d2={width:440,height:340,platforms:{},junctions:{j0:{position:{x:400,y:160}},j1:{position:{x:360,y:200}},j2:{position:{x:280,y:280}},j3:{position:{x:260,y:300}}},sections:{s0:{from:"j0",to:"j3",points:[{x:400,y:160},{x:400,y:280},{x:380,y:300},{x:260,y:300}]},s1:{from:"j3",to:"j0",points:[{x:260,y:300},{x:60,y:300},{x:40,y:280},{x:40,y:220},{x:220,y:40},{x:380,y:40},{x:400,y:60},{x:400,y:160}]},s2:{from:"j1",to:"j2",points:[{x:360,y:200},{x:360,y:250},{x:330,y:280},{x:280,y:280}]},s3:{from:"j2",to:"j1",points:[{x:280,y:280},{x:110,y:280},{x:80,y:250},{x:80,y:110},{x:110,y:80},{x:330,y:80},{x:360,y:110},{x:360,y:200}]},s4:{from:"j0",to:"j1",points:[{x:400,y:160},{x:360,y:200}]},s5:{from:"j2",to:"j3",points:[{x:280,y:280},{x:260,y:300}]}},trains:{t0:{fill:Xe.colors.yellow[4],stroke:Xe.colors.yellow[9]},t1:{fill:Xe.colors.green[5],stroke:Xe.colors.green[9]},t2:{fill:Xe.colors.cyan[4],stroke:Xe.colors.cyan[9]},t3:{fill:Xe.colors.indigo[5],stroke:Xe.colors.indigo[9]},t4:{fill:Xe.colors.red[5],stroke:Xe.colors.red[9]}},stops:{stop_0:{},stop_1:{}},obstacles:{obstacle_0:{}}},p2=()=>{const e=dt(),[t,n]=x.useState(null),[r,o]=x.useState(()=>new Date);return x.useEffect(()=>{Qt.getState().then(i=>{o(new Date),n(i)})},[]),x.useEffect(()=>{const i=setInterval(()=>{Qt.getState().then(l=>{o(new Date),n(l)})},500);return()=>{clearInterval(i)}},[]),R.jsx(Et.Provider,{value:t,children:R.jsx(Wn.Provider,{value:d2,children:R.jsx(qP,{children:R.jsx(Wy,{children:R.jsxs(My,{children:[R.jsxs(ao,{children:[R.jsx(ao.Col,{span:8,children:R.jsx(a2,{children:R.jsx("text",{x:10,y:20,fontSize:12,fontFamily:e.fontFamilyMonospace,fill:e.white,children:r.toLocaleString()})})}),R.jsx(ao.Col,{span:4,children:R.jsx(f2,{})})]}),R.jsx(s2,{}),R.jsx(Ay,{block:!0,children:JSON.stringify(t,null,4)})]})})})})})},h2=ow([{path:"/",element:R.jsx(p2,{})}]);Ua.createRoot(document.getElementById("root")).render(R.jsx(j.StrictMode,{children:R.jsx(ey,{withGlobalStyles:!0,withNormalizeCSS:!0,theme:{colorScheme:"dark"},children:R.jsx(ew,{router:h2})})})); +======== + */var xe=typeof Symbol=="function"&&Symbol.for,Xu=xe?Symbol.for("react.element"):60103,Yu=xe?Symbol.for("react.portal"):60106,Vl=xe?Symbol.for("react.fragment"):60107,Hl=xe?Symbol.for("react.strict_mode"):60108,Wl=xe?Symbol.for("react.profiler"):60114,Gl=xe?Symbol.for("react.provider"):60109,Ql=xe?Symbol.for("react.context"):60110,Zu=xe?Symbol.for("react.async_mode"):60111,Kl=xe?Symbol.for("react.concurrent_mode"):60111,Xl=xe?Symbol.for("react.forward_ref"):60112,Yl=xe?Symbol.for("react.suspense"):60113,p_=xe?Symbol.for("react.suspense_list"):60120,Zl=xe?Symbol.for("react.memo"):60115,Jl=xe?Symbol.for("react.lazy"):60116,h_=xe?Symbol.for("react.block"):60121,m_=xe?Symbol.for("react.fundamental"):60117,y_=xe?Symbol.for("react.responder"):60118,g_=xe?Symbol.for("react.scope"):60119;function rt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Xu:switch(e=e.type,e){case Zu:case Kl:case Vl:case Wl:case Hl:case Yl:return e;default:switch(e=e&&e.$$typeof,e){case Ql:case Xl:case Jl:case Zl:case Gl:return e;default:return t}}case Yu:return t}}}function Gm(e){return rt(e)===Kl}ee.AsyncMode=Zu;ee.ConcurrentMode=Kl;ee.ContextConsumer=Ql;ee.ContextProvider=Gl;ee.Element=Xu;ee.ForwardRef=Xl;ee.Fragment=Vl;ee.Lazy=Jl;ee.Memo=Zl;ee.Portal=Yu;ee.Profiler=Wl;ee.StrictMode=Hl;ee.Suspense=Yl;ee.isAsyncMode=function(e){return Gm(e)||rt(e)===Zu};ee.isConcurrentMode=Gm;ee.isContextConsumer=function(e){return rt(e)===Ql};ee.isContextProvider=function(e){return rt(e)===Gl};ee.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Xu};ee.isForwardRef=function(e){return rt(e)===Xl};ee.isFragment=function(e){return rt(e)===Vl};ee.isLazy=function(e){return rt(e)===Jl};ee.isMemo=function(e){return rt(e)===Zl};ee.isPortal=function(e){return rt(e)===Yu};ee.isProfiler=function(e){return rt(e)===Wl};ee.isStrictMode=function(e){return rt(e)===Hl};ee.isSuspense=function(e){return rt(e)===Yl};ee.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Vl||e===Kl||e===Wl||e===Hl||e===Yl||e===p_||typeof e=="object"&&e!==null&&(e.$$typeof===Jl||e.$$typeof===Zl||e.$$typeof===Gl||e.$$typeof===Ql||e.$$typeof===Xl||e.$$typeof===m_||e.$$typeof===y_||e.$$typeof===g_||e.$$typeof===h_)};ee.typeOf=rt;(function(e){e.exports=ee})(d_);var Qm=Us,v_={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},w_={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Km={};Km[Qm.ForwardRef]=v_;Km[Qm.Memo]=w_;var __=!0;function S_(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):r+=o+" "}),r}var x_=function(t,n,r){var o=t.key+"-"+n.name;(r===!1||__===!1)&&t.registered[o]===void 0&&(t.registered[o]=n.styles)},Xm=function(t,n,r){x_(t,n,r);var o=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var i=n;do t.insert(n===i?"."+o:"",i,t.sheet,!0),i=i.next;while(i!==void 0)}};function E_(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var P_={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},k_=/[A-Z]|^ms/g,O_=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ym=function(t){return t.charCodeAt(1)===45},Gf=function(t){return t!=null&&typeof t!="boolean"},Ia=o_(function(e){return Ym(e)?e:e.replace(k_,"-$&").toLowerCase()}),Qf=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(O_,function(r,o,i){return $t={name:o,styles:i,next:$t},o})}return P_[t]!==1&&!Ym(t)&&typeof n=="number"&&n!==0?n+"px":n};function bo(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return $t={name:n.name,styles:n.styles,next:$t},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)$t={name:r.name,styles:r.styles,next:$t},r=r.next;var o=n.styles+";";return o}return C_(e,t,n)}case"function":{if(e!==void 0){var i=$t,l=n(e);return $t=i,bo(e,t,l)}break}}if(t==null)return n;var a=t[n];return a!==void 0?a:n}function C_(e,t,n){var r="";if(Array.isArray(n))for(var o=0;ot in e?T_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,A_=(e,t)=>{for(var n in t||(t={}))L_.call(t,n)&&Zf(e,n,t[n]);if(Yf)for(var n of Yf(t))D_.call(t,n)&&Zf(e,n,t[n]);return e},F_=(e,t)=>I_(e,M_(t));function U_({theme:e}){return j.createElement(Ao,{styles:{"*, *::before, *::after":{boxSizing:"border-box"},html:{colorScheme:e.colorScheme==="dark"?"dark":"light"},body:F_(A_({},e.fn.fontStyles()),{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,lineHeight:e.lineHeight,fontSize:e.fontSizes.md,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"})}})}function di(e,t,n){Object.keys(t).forEach(r=>{e[`--mantine-${n}-${r}`]=typeof t[r]=="number"?`${t[r]}px`:t[r]})}function B_({theme:e}){const t={"--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-transition-timing-function":e.transitionTimingFunction,"--mantine-line-height":`${e.lineHeight}`,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":`${e.headings.fontWeight}`};di(t,e.shadows,"shadow"),di(t,e.fontSizes,"font-size"),di(t,e.radius,"radius"),di(t,e.spacing,"spacing"),Object.keys(e.colors).forEach(r=>{e.colors[r].forEach((o,i)=>{t[`--mantine-color-${r}-${i}`]=o})});const n=e.headings.sizes;return Object.keys(n).forEach(r=>{t[`--mantine-${r}-font-size`]=`${n[r].fontSize}px`,t[`--mantine-${r}-line-height`]=`${n[r].lineHeight}`}),j.createElement(Ao,{styles:{":root":t}})}var V_=Object.defineProperty,H_=Object.defineProperties,W_=Object.getOwnPropertyDescriptors,Jf=Object.getOwnPropertySymbols,G_=Object.prototype.hasOwnProperty,Q_=Object.prototype.propertyIsEnumerable,qf=(e,t,n)=>t in e?V_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kn=(e,t)=>{for(var n in t||(t={}))G_.call(t,n)&&qf(e,n,t[n]);if(Jf)for(var n of Jf(t))Q_.call(t,n)&&qf(e,n,t[n]);return e},ed=(e,t)=>H_(e,W_(t));function K_(e,t){if(!t)return e;const n=Object.keys(e).reduce((r,o)=>{if(o==="headings"&&t.headings){const i=t.headings.sizes?Object.keys(e.headings.sizes).reduce((l,a)=>(l[a]=kn(kn({},e.headings.sizes[a]),t.headings.sizes[a]),l),{}):e.headings.sizes;return ed(kn({},r),{headings:ed(kn(kn({},e.headings),t.headings),{sizes:i})})}return r[o]=typeof t[o]=="object"?kn(kn({},e[o]),t[o]):typeof t[o]=="number"||typeof t[o]=="boolean"||typeof t[o]=="function"?t[o]:t[o]||e[o],r},{});if(!(n.primaryColor in n.colors))throw new Error("MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color");return n}function X_(e,t){return Mm(K_(e,t))}function Jm(e){return Object.keys(e).reduce((t,n)=>(e[n]!==void 0&&(t[n]=e[n]),t),{})}const Y_={html:{fontFamily:"sans-serif",lineHeight:"1.15",textSizeAdjust:"100%"},body:{margin:0},"article, aside, footer, header, nav, section, figcaption, figure, main":{display:"block"},h1:{fontSize:"2em"},hr:{boxSizing:"content-box",height:0,overflow:"visible"},pre:{fontFamily:"monospace, monospace",fontSize:"1em"},a:{background:"transparent",textDecorationSkip:"objects"},"a:active, a:hover":{outlineWidth:0},"abbr[title]":{borderBottom:"none",textDecoration:"underline"},"b, strong":{fontWeight:"bolder"},"code, kbp, samp":{fontFamily:"monospace, monospace",fontSize:"1em"},dfn:{fontStyle:"italic"},mark:{backgroundColor:"#ff0",color:"#000"},small:{fontSize:"80%"},"sub, sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sup:{top:"-0.5em"},sub:{bottom:"-0.25em"},"audio, video":{display:"inline-block"},"audio:not([controls])":{display:"none",height:0},img:{borderStyle:"none",verticalAlign:"middle"},"svg:not(:root)":{overflow:"hidden"},"button, input, optgroup, select, textarea":{fontFamily:"sans-serif",fontSize:"100%",lineHeight:"1.15",margin:0},"button, input":{overflow:"visible"},"button, select":{textTransform:"none"},"button, [type=reset], [type=submit]":{WebkitAppearance:"button"},"button::-moz-focus-inner, [type=button]::-moz-focus-inner, [type=reset]::-moz-focus-inner, [type=submit]::-moz-focus-inner":{borderStyle:"none",padding:0},"button:-moz-focusring, [type=button]:-moz-focusring, [type=reset]:-moz-focusring, [type=submit]:-moz-focusring":{outline:"1px dotted ButtonText"},legend:{boxSizing:"border-box",color:"inherit",display:"table",maxWidth:"100%",padding:0,whiteSpace:"normal"},progress:{display:"inline-block",verticalAlign:"baseline"},textarea:{overflow:"auto"},"[type=checkbox], [type=radio]":{boxSizing:"border-box",padding:0},"[type=number]::-webkit-inner-spin-button, [type=number]::-webkit-outer-spin-button":{height:"auto"},"[type=search]":{appearance:"none"},"[type=search]::-webkit-search-cancel-button, [type=search]::-webkit-search-decoration":{appearance:"none"},"::-webkit-file-upload-button":{appearance:"button",font:"inherit"},"details, menu":{display:"block"},summary:{display:"list-item"},canvas:{display:"inline-block"},template:{display:"none"},"[hidden]":{display:"none"}};function Z_(){return j.createElement(Ao,{styles:Y_})}var J_=Object.defineProperty,td=Object.getOwnPropertySymbols,q_=Object.prototype.hasOwnProperty,eS=Object.prototype.propertyIsEnumerable,nd=(e,t,n)=>t in e?J_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lo=(e,t)=>{for(var n in t||(t={}))q_.call(t,n)&&nd(e,n,t[n]);if(td)for(var n of td(t))eS.call(t,n)&&nd(e,n,t[n]);return e};const rl=x.createContext({theme:Xe});function dt(){var e;return((e=x.useContext(rl))==null?void 0:e.theme)||Xe}function tS(e){const t=dt(),n=r=>{var o,i;return{styles:((o=t.components[r])==null?void 0:o.styles)||{},classNames:((i=t.components[r])==null?void 0:i.classNames)||{}}};return Array.isArray(e)?e.map(n):[n(e)]}function qm(){var e;return(e=x.useContext(rl))==null?void 0:e.emotionCache}function Qe(e,t,n){var r;const o=dt(),i=(r=o.components[e])==null?void 0:r.defaultProps,l=typeof i=="function"?i(o):i;return lo(lo(lo({},t),l),Jm(n))}function ey({theme:e,emotionCache:t,withNormalizeCSS:n=!1,withGlobalStyles:r=!1,withCSSVariables:o=!1,inherit:i=!1,children:l}){const a=x.useContext(rl),s=X_(Xe,i?lo(lo({},a.theme),e):e);return j.createElement(N_,{theme:s},j.createElement(rl.Provider,{value:{theme:s,emotionCache:t}},n&&j.createElement(Z_,null),r&&j.createElement(U_,{theme:s}),o&&j.createElement(B_,{theme:s}),typeof s.globalStyles=="function"&&j.createElement(Ao,{styles:s.globalStyles(s)}),l))}ey.displayName="@mantine/core/MantineProvider";const nS={app:100,modal:200,popover:300,overlay:400,max:9999};function rS(e){return nS[e]}function oS(e,t){const n=x.useRef();return(!n.current||t.length!==n.current.prevDeps.length||n.current.prevDeps.map((r,o)=>r===t[o]).indexOf(!1)>=0)&&(n.current={v:e(),prevDeps:[...t]}),n.current.v}const iS=Wm({key:"mantine",prepend:!0});function lS(){return qm()||iS}var aS=Object.defineProperty,rd=Object.getOwnPropertySymbols,sS=Object.prototype.hasOwnProperty,uS=Object.prototype.propertyIsEnumerable,od=(e,t,n)=>t in e?aS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cS=(e,t)=>{for(var n in t||(t={}))sS.call(t,n)&&od(e,n,t[n]);if(rd)for(var n of rd(t))uS.call(t,n)&&od(e,n,t[n]);return e};const Ma="ref";function fS(e){let t;if(e.length!==1)return{args:e,ref:t};const[n]=e;if(!(n instanceof Object))return{args:e,ref:t};if(!(Ma in n))return{args:e,ref:t};t=n[Ma];const r=cS({},n);return delete r[Ma],{args:[r],ref:t}}const{cssFactory:dS}=(()=>{function e(n,r,o){const i=[],l=S_(n,i,o);return i.length<2?o:l+r(i)}function t(n){const{cache:r}=n,o=(...l)=>{const{ref:a,args:s}=fS(l),u=Ju(s,r.registered);return Xm(r,u,!1),`${r.key}-${u.name}${a===void 0?"":` ${a}`}`};return{css:o,cx:(...l)=>e(r.registered,o,sw(l))}}return{cssFactory:t}})();function ty(){const e=lS();return oS(()=>dS({cache:e}),[e])}function pS({cx:e,classes:t,context:n,classNames:r,name:o,cache:i}){const l=n.reduce((a,s)=>(Object.keys(s.classNames).forEach(u=>{typeof a[u]!="string"?a[u]=`${s.classNames[u]}`:a[u]=`${a[u]} ${s.classNames[u]}`}),a),{});return Object.keys(t).reduce((a,s)=>(a[s]=e(t[s],l[s],r!=null&&r[s],Array.isArray(o)?o.filter(Boolean).map(u=>`${(i==null?void 0:i.key)||"mantine"}-${u}-${s}`).join(" "):o?`${(i==null?void 0:i.key)||"mantine"}-${o}-${s}`:null),a),{})}var hS=Object.defineProperty,id=Object.getOwnPropertySymbols,mS=Object.prototype.hasOwnProperty,yS=Object.prototype.propertyIsEnumerable,ld=(e,t,n)=>t in e?hS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,La=(e,t)=>{for(var n in t||(t={}))mS.call(t,n)&&ld(e,n,t[n]);if(id)for(var n of id(t))yS.call(t,n)&&ld(e,n,t[n]);return e};function gS(e){return`__mantine-ref-${e||""}`}function ad(e,t,n){const r=o=>typeof o=="function"?o(t,n||{}):o||{};return Array.isArray(e)?e.map(o=>r(o.styles)).reduce((o,i)=>(Object.keys(i).forEach(l=>{o[l]?o[l]=La(La({},o[l]),i[l]):o[l]=La({},i[l])}),o),{}):r(e)}function ot(e){const t=typeof e=="function"?e:()=>e;function n(r,o){const i=dt(),l=tS(o==null?void 0:o.name),a=qm(),{css:s,cx:u}=ty(),d=t(i,r,gS),m=ad(o==null?void 0:o.styles,i,r),c=ad(l,i,r),y=Object.fromEntries(Object.keys(d).map(g=>{const v=u({[s(d[g])]:!(o!=null&&o.unstyled)},s(c[g]),s(m[g]));return[g,v]}));return{classes:pS({cx:u,classes:y,context:l,classNames:o==null?void 0:o.classNames,name:o==null?void 0:o.name,cache:a}),cx:u,theme:i}}return n}function vS({styles:e}){const t=dt();return j.createElement(Ao,{styles:z_(typeof e=="function"?e(t):e)})}var sd=Object.getOwnPropertySymbols,wS=Object.prototype.hasOwnProperty,_S=Object.prototype.propertyIsEnumerable,SS=(e,t)=>{var n={};for(var r in e)wS.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&sd)for(var r of sd(e))t.indexOf(r)<0&&_S.call(e,r)&&(n[r]=e[r]);return n};function xS(e){const t=e,{m:n,mx:r,my:o,mt:i,mb:l,ml:a,mr:s,p:u,px:d,py:m,pt:c,pb:y,pl:g,pr:v,bg:E,c:p,opacity:f,ff:h,fz:w,fw:P,lts:$,ta:k,lh:b,fs:V,tt:I,td:Z,w:ye,miw:Ke,maw:Gn,h:jr,mih:Sn,mah:se,bgsz:N,bgp:D,bgr:U,bga:K,pos:ue,top:Xt,left:it,bottom:xn,right:pt,inset:Yt,display:En}=t,Uo=SS(t,["m","mx","my","mt","mb","ml","mr","p","px","py","pt","pb","pl","pr","bg","c","opacity","ff","fz","fw","lts","ta","lh","fs","tt","td","w","miw","maw","h","mih","mah","bgsz","bgp","bgr","bga","pos","top","left","bottom","right","inset","display"]);return{systemStyles:Jm({m:n,mx:r,my:o,mt:i,mb:l,ml:a,mr:s,p:u,px:d,py:m,pt:c,pb:y,pl:g,pr:v,bg:E,c:p,opacity:f,ff:h,fz:w,fw:P,lts:$,ta:k,lh:b,fs:V,tt:I,td:Z,w:ye,miw:Ke,maw:Gn,h:jr,mih:Sn,mah:se,bgsz:N,bgp:D,bgr:U,bga:K,pos:ue,top:Xt,left:it,bottom:xn,right:pt,inset:Yt,display:En}),rest:Uo}}function ES(e,t){const n=Object.keys(e).filter(r=>r!=="base").sort((r,o)=>t.fn.size({size:r,sizes:t.breakpoints})-t.fn.size({size:o,sizes:t.breakpoints}));return"base"in e?["base",...n]:n}function PS({value:e,theme:t,getValue:n,property:r}){if(e==null)return;if(typeof e=="object")return ES(e,t).reduce((l,a)=>{if(a==="base"&&e.base!==void 0){const u=n(e.base,t);return Array.isArray(r)?(r.forEach(d=>{l[d]=u}),l):(l[r]=u,l)}const s=n(e[a],t);return Array.isArray(r)?(l[t.fn.largerThan(a)]={},r.forEach(u=>{l[t.fn.largerThan(a)][u]=s}),l):(l[t.fn.largerThan(a)]={[r]:s},l)},{});const o=n(e,t);return Array.isArray(r)?r.reduce((i,l)=>(i[l]=o,i),{}):{[r]:o}}function kS(e,t){return e==="dimmed"?t.colorScheme==="dark"?t.colors.dark[2]:t.colors.gray[6]:t.fn.variant({variant:"filled",color:e,primaryFallback:!1}).background}function OS(e){return e}function CS(e,t){return t.fn.size({size:e,sizes:t.fontSizes})}const $S=["-xs","-sm","-md","-lg","-xl"];function RS(e,t){return $S.includes(e)?t.fn.size({size:e.replace("-",""),sizes:t.spacing})*-1:t.fn.size({size:e,sizes:t.spacing})}const jS={color:kS,default:OS,fontSize:CS,spacing:RS},bS={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},mx:{type:"spacing",property:["marginRight","marginLeft"]},my:{type:"spacing",property:["marginTop","marginBottom"]},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},px:{type:"spacing",property:["paddingRight","paddingLeft"]},py:{type:"spacing",property:["paddingTop","paddingBottom"]},bg:{type:"color",property:"background"},c:{type:"color",property:"color"},opacity:{type:"default",property:"opacity"},ff:{type:"default",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"default",property:"fontWeight"},lts:{type:"default",property:"letterSpacing"},ta:{type:"default",property:"textAlign"},lh:{type:"default",property:"lineHeight"},fs:{type:"default",property:"fontStyle"},tt:{type:"default",property:"textTransform"},td:{type:"default",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"default",property:"background-size"},bgp:{type:"default",property:"background-position"},bgr:{type:"default",property:"background-repeat"},bga:{type:"default",property:"background-attachment"},pos:{type:"default",property:"position"},top:{type:"default",property:"top"},left:{type:"default",property:"left"},bottom:{type:"default",property:"bottom"},right:{type:"default",property:"right"},inset:{type:"default",property:"inset"},display:{type:"default",property:"display"}};var NS=Object.defineProperty,ud=Object.getOwnPropertySymbols,zS=Object.prototype.hasOwnProperty,TS=Object.prototype.propertyIsEnumerable,cd=(e,t,n)=>t in e?NS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fd=(e,t)=>{for(var n in t||(t={}))zS.call(t,n)&&cd(e,n,t[n]);if(ud)for(var n of ud(t))TS.call(t,n)&&cd(e,n,t[n]);return e};function dd(e,t,n=bS){return Object.keys(n).reduce((o,i)=>(i in e&&e[i]!==void 0&&o.push(PS({value:e[i],getValue:jS[n[i].type],property:n[i].property,theme:t})),o),[]).reduce((o,i)=>(Object.keys(i).forEach(l=>{typeof i[l]=="object"&&i[l]!==null&&l in o?o[l]=fd(fd({},o[l]),i[l]):o[l]=i[l]}),o),{})}function pd(e,t){return typeof e=="function"?e(t):e}function IS(e,t,n){const r=dt(),{css:o,cx:i}=ty();return Array.isArray(e)?i(n,o(dd(t,r)),e.map(l=>o(pd(l,r)))):i(n,o(pd(e,r)),o(dd(t,r)))}var MS=Object.defineProperty,ol=Object.getOwnPropertySymbols,ny=Object.prototype.hasOwnProperty,ry=Object.prototype.propertyIsEnumerable,hd=(e,t,n)=>t in e?MS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,LS=(e,t)=>{for(var n in t||(t={}))ny.call(t,n)&&hd(e,n,t[n]);if(ol)for(var n of ol(t))ry.call(t,n)&&hd(e,n,t[n]);return e},DS=(e,t)=>{var n={};for(var r in e)ny.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ol)for(var r of ol(e))t.indexOf(r)<0&&ry.call(e,r)&&(n[r]=e[r]);return n};const oy=x.forwardRef((e,t)=>{var n=e,{className:r,component:o,style:i,sx:l}=n,a=DS(n,["className","component","style","sx"]);const{systemStyles:s,rest:u}=xS(a),d=o||"div";return j.createElement(d,LS({ref:t,className:IS(l,s,r),style:i},u))});oy.displayName="@mantine/core/Box";const Ge=oy;var AS=Object.defineProperty,FS=Object.defineProperties,US=Object.getOwnPropertyDescriptors,md=Object.getOwnPropertySymbols,BS=Object.prototype.hasOwnProperty,VS=Object.prototype.propertyIsEnumerable,yd=(e,t,n)=>t in e?AS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gd=(e,t)=>{for(var n in t||(t={}))BS.call(t,n)&&yd(e,n,t[n]);if(md)for(var n of md(t))VS.call(t,n)&&yd(e,n,t[n]);return e},HS=(e,t)=>FS(e,US(t)),WS=ot(e=>({root:HS(gd(gd({},e.fn.focusStyles()),e.fn.fontStyles()),{cursor:"pointer",border:0,padding:0,appearance:"none",fontSize:e.fontSizes.md,backgroundColor:"transparent",textAlign:"left",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,textDecoration:"none",boxSizing:"border-box"})}));const GS=WS;var QS=Object.defineProperty,il=Object.getOwnPropertySymbols,iy=Object.prototype.hasOwnProperty,ly=Object.prototype.propertyIsEnumerable,vd=(e,t,n)=>t in e?QS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,KS=(e,t)=>{for(var n in t||(t={}))iy.call(t,n)&&vd(e,n,t[n]);if(il)for(var n of il(t))ly.call(t,n)&&vd(e,n,t[n]);return e},XS=(e,t)=>{var n={};for(var r in e)iy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&il)for(var r of il(e))t.indexOf(r)<0&&ly.call(e,r)&&(n[r]=e[r]);return n};const ay=x.forwardRef((e,t)=>{const n=Qe("UnstyledButton",{},e),{className:r,component:o="button",unstyled:i}=n,l=XS(n,["className","component","unstyled"]),{classes:a,cx:s}=GS(null,{name:"UnstyledButton",unstyled:i});return j.createElement(Ge,KS({component:o,ref:t,className:s(a.root,r),type:o==="button"?"button":void 0},l))});ay.displayName="@mantine/core/UnstyledButton";const YS=ay;var ZS=Object.defineProperty,ll=Object.getOwnPropertySymbols,sy=Object.prototype.hasOwnProperty,uy=Object.prototype.propertyIsEnumerable,wd=(e,t,n)=>t in e?ZS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,JS=(e,t)=>{for(var n in t||(t={}))sy.call(t,n)&&wd(e,n,t[n]);if(ll)for(var n of ll(t))uy.call(t,n)&&wd(e,n,t[n]);return e},qS=(e,t)=>{var n={};for(var r in e)sy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ll)for(var r of ll(e))t.indexOf(r)<0&&uy.call(e,r)&&(n[r]=e[r]);return n};function ex(e){var t=e,{size:n,color:r}=t,o=qS(t,["size","color"]);return j.createElement("svg",JS({viewBox:"0 0 135 140",xmlns:"http://www.w3.org/2000/svg",fill:r,width:`${n}px`},o),j.createElement("rect",{y:"10",width:"15",height:"120",rx:"6"},j.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),j.createElement("rect",{x:"30",y:"10",width:"15",height:"120",rx:"6"},j.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),j.createElement("rect",{x:"60",width:"15",height:"140",rx:"6"},j.createElement("animate",{attributeName:"height",begin:"0s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"y",begin:"0s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),j.createElement("rect",{x:"90",y:"10",width:"15",height:"120",rx:"6"},j.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),j.createElement("rect",{x:"120",y:"10",width:"15",height:"120",rx:"6"},j.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})))}var tx=Object.defineProperty,al=Object.getOwnPropertySymbols,cy=Object.prototype.hasOwnProperty,fy=Object.prototype.propertyIsEnumerable,_d=(e,t,n)=>t in e?tx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nx=(e,t)=>{for(var n in t||(t={}))cy.call(t,n)&&_d(e,n,t[n]);if(al)for(var n of al(t))fy.call(t,n)&&_d(e,n,t[n]);return e},rx=(e,t)=>{var n={};for(var r in e)cy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&al)for(var r of al(e))t.indexOf(r)<0&&fy.call(e,r)&&(n[r]=e[r]);return n};function ox(e){var t=e,{size:n,color:r}=t,o=rx(t,["size","color"]);return j.createElement("svg",nx({width:`${n}px`,height:`${n}px`,viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg",stroke:r},o),j.createElement("g",{fill:"none",fillRule:"evenodd"},j.createElement("g",{transform:"translate(2.5 2.5)",strokeWidth:"5"},j.createElement("circle",{strokeOpacity:".5",cx:"16",cy:"16",r:"16"}),j.createElement("path",{d:"M32 16c0-9.94-8.06-16-16-16"},j.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 16 16",to:"360 16 16",dur:"1s",repeatCount:"indefinite"})))))}var ix=Object.defineProperty,sl=Object.getOwnPropertySymbols,dy=Object.prototype.hasOwnProperty,py=Object.prototype.propertyIsEnumerable,Sd=(e,t,n)=>t in e?ix(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lx=(e,t)=>{for(var n in t||(t={}))dy.call(t,n)&&Sd(e,n,t[n]);if(sl)for(var n of sl(t))py.call(t,n)&&Sd(e,n,t[n]);return e},ax=(e,t)=>{var n={};for(var r in e)dy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&sl)for(var r of sl(e))t.indexOf(r)<0&&py.call(e,r)&&(n[r]=e[r]);return n};function sx(e){var t=e,{size:n,color:r}=t,o=ax(t,["size","color"]);return j.createElement("svg",lx({width:`${n}px`,height:`${n/4}px`,viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg",fill:r},o),j.createElement("circle",{cx:"15",cy:"15",r:"15"},j.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})),j.createElement("circle",{cx:"60",cy:"15",r:"9",fillOpacity:"0.3"},j.createElement("animate",{attributeName:"r",from:"9",to:"9",begin:"0s",dur:"0.8s",values:"9;15;9",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"fill-opacity",from:"0.5",to:"0.5",begin:"0s",dur:"0.8s",values:".5;1;.5",calcMode:"linear",repeatCount:"indefinite"})),j.createElement("circle",{cx:"105",cy:"15",r:"15"},j.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})))}var ux=Object.defineProperty,ul=Object.getOwnPropertySymbols,hy=Object.prototype.hasOwnProperty,my=Object.prototype.propertyIsEnumerable,xd=(e,t,n)=>t in e?ux(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cx=(e,t)=>{for(var n in t||(t={}))hy.call(t,n)&&xd(e,n,t[n]);if(ul)for(var n of ul(t))my.call(t,n)&&xd(e,n,t[n]);return e},fx=(e,t)=>{var n={};for(var r in e)hy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ul)for(var r of ul(e))t.indexOf(r)<0&&my.call(e,r)&&(n[r]=e[r]);return n};const Da={bars:ex,oval:ox,dots:sx},dx={xs:18,sm:22,md:36,lg:44,xl:58},px={size:"md"};function yy(e){const t=Qe("Loader",px,e),{size:n,color:r,variant:o}=t,i=fx(t,["size","color","variant"]),l=dt(),a=o in Da?o:l.loader;return j.createElement(Ge,cx({role:"presentation",component:Da[a]||Da.bars,size:l.fn.size({size:n,sizes:dx}),color:l.fn.variant({variant:"filled",primaryFallback:!1,color:r||l.primaryColor}).background},i))}yy.displayName="@mantine/core/Loader";const gy=x.createContext({zIndex:1e3,fixed:!1,layout:"default"}),hx=gy.Provider;function mx(){return x.useContext(gy)}function vy(e,t){if(!e)return[];const n=Object.keys(e).filter(r=>r!=="base").map(r=>[t.fn.size({size:r,sizes:t.breakpoints}),e[r]]);return n.sort((r,o)=>r[0]-o[0]),n}var yx=Object.defineProperty,gx=Object.defineProperties,vx=Object.getOwnPropertyDescriptors,Ed=Object.getOwnPropertySymbols,wx=Object.prototype.hasOwnProperty,_x=Object.prototype.propertyIsEnumerable,Pd=(e,t,n)=>t in e?yx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Aa=(e,t)=>{for(var n in t||(t={}))wx.call(t,n)&&Pd(e,n,t[n]);if(Ed)for(var n of Ed(t))_x.call(t,n)&&Pd(e,n,t[n]);return e},kd=(e,t)=>gx(e,vx(t)),Sx=ot((e,{height:t,fixed:n,position:r,zIndex:o,borderPosition:i,layout:l})=>{const a=typeof t=="object"&&t!==null?vy(t,e).reduce((s,[u,d])=>(s[`@media (min-width: ${u}px)`]={height:d,minHeight:d},s),{}):null;return{root:kd(Aa(kd(Aa(Aa({},e.fn.fontStyles()),r),{zIndex:o,left:l==="alt"?"var(--mantine-navbar-width, 0)":0,right:l==="alt"?"var(--mantine-aside-width, 0)":0,height:typeof t=="object"?(t==null?void 0:t.base)||"100%":t,maxHeight:typeof t=="object"?(t==null?void 0:t.base)||"100%":t,position:n?"fixed":"static",boxSizing:"border-box",backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white}),a),{borderBottom:i==="bottom"?`1px solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[2]}`:void 0,borderTop:i==="top"?`1px solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[2]}`:void 0})}});const xx=Sx;var Ex=Object.defineProperty,cl=Object.getOwnPropertySymbols,wy=Object.prototype.hasOwnProperty,_y=Object.prototype.propertyIsEnumerable,Od=(e,t,n)=>t in e?Ex(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Cd=(e,t)=>{for(var n in t||(t={}))wy.call(t,n)&&Od(e,n,t[n]);if(cl)for(var n of cl(t))_y.call(t,n)&&Od(e,n,t[n]);return e},Px=(e,t)=>{var n={};for(var r in e)wy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&cl)for(var r of cl(e))t.indexOf(r)<0&&_y.call(e,r)&&(n[r]=e[r]);return n};const Sy=x.forwardRef((e,t)=>{var n=e,{children:r,className:o,classNames:i,styles:l,height:a,fixed:s=!1,withBorder:u=!0,position:d,zIndex:m,section:c,unstyled:y,__staticSelector:g}=n,v=Px(n,["children","className","classNames","styles","height","fixed","withBorder","position","zIndex","section","unstyled","__staticSelector"]);const E=mx(),p=m||E.zIndex||rS("app"),{classes:f,cx:h,theme:w}=xx({height:a,fixed:E.fixed||s,position:d,zIndex:typeof p=="number"&&E.layout==="default"?p+1:p,layout:E.layout,borderPosition:u?c==="header"?"bottom":"top":"none"},{name:g,classNames:i,styles:l,unstyled:y}),P=typeof a=="object"&&a!==null?vy(a,w).reduce(($,[k,b])=>($[`@media (min-width: ${k}px)`]={[`--mantine-${c}-height`]:`${b}px`},$),{}):null;return j.createElement(Ge,Cd({component:c==="header"?"header":"footer",className:h(f.root,o),ref:t},v),r,j.createElement(vS,{styles:()=>({":root":Cd({[`--mantine-${c}-height`]:typeof a=="object"?`${a==null?void 0:a.base}px`||"100%":`${a}px`},P)})}))});Sy.displayName="@mantine/core/VerticalSection";var kx=Object.defineProperty,Ox=Object.defineProperties,Cx=Object.getOwnPropertyDescriptors,$d=Object.getOwnPropertySymbols,$x=Object.prototype.hasOwnProperty,Rx=Object.prototype.propertyIsEnumerable,Rd=(e,t,n)=>t in e?kx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jx=(e,t)=>{for(var n in t||(t={}))$x.call(t,n)&&Rd(e,n,t[n]);if($d)for(var n of $d(t))Rx.call(t,n)&&Rd(e,n,t[n]);return e},bx=(e,t)=>Ox(e,Cx(t));const Nx={fixed:!1,position:{top:0,left:0,right:0}},xy=x.forwardRef((e,t)=>{const n=Qe("Header",Nx,e);return j.createElement(Sy,bx(jx({section:"header",__staticSelector:"Header"},n),{ref:t}))});xy.displayName="@mantine/core/Header";var zx=Object.defineProperty,jd=Object.getOwnPropertySymbols,Tx=Object.prototype.hasOwnProperty,Ix=Object.prototype.propertyIsEnumerable,bd=(e,t,n)=>t in e?zx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mx=(e,t)=>{for(var n in t||(t={}))Tx.call(t,n)&&bd(e,n,t[n]);if(jd)for(var n of jd(t))Ix.call(t,n)&&bd(e,n,t[n]);return e};function Lx(e,t){const n=t.fn.size({size:e.padding,sizes:t.spacing}),r=e.navbarOffsetBreakpoint?t.fn.size({size:e.navbarOffsetBreakpoint,sizes:t.breakpoints}):null,o=e.asideOffsetBreakpoint?t.fn.size({size:e.asideOffsetBreakpoint,sizes:t.breakpoints}):null;return e.fixed?{minHeight:"100vh",paddingTop:`calc(var(--mantine-header-height, 0px) + ${n}px)`,paddingBottom:`calc(var(--mantine-footer-height, 0px) + ${n}px)`,paddingLeft:`calc(var(--mantine-navbar-width, 0px) + ${n}px)`,paddingRight:`calc(var(--mantine-aside-width, 0px) + ${n}px)`,[`@media (max-width: ${r-1}px)`]:{paddingLeft:n},[`@media (max-width: ${o-1}px)`]:{paddingRight:n}}:{padding:n}}var Dx=ot((e,t)=>({root:{boxSizing:"border-box"},body:{display:"flex",boxSizing:"border-box"},main:Mx({flex:1,width:"100vw",boxSizing:"border-box"},Lx(t,e))}));const Ax=Dx;var Fx=Object.defineProperty,fl=Object.getOwnPropertySymbols,Ey=Object.prototype.hasOwnProperty,Py=Object.prototype.propertyIsEnumerable,Nd=(e,t,n)=>t in e?Fx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ux=(e,t)=>{for(var n in t||(t={}))Ey.call(t,n)&&Nd(e,n,t[n]);if(fl)for(var n of fl(t))Py.call(t,n)&&Nd(e,n,t[n]);return e},Bx=(e,t)=>{var n={};for(var r in e)Ey.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&fl)for(var r of fl(e))t.indexOf(r)<0&&Py.call(e,r)&&(n[r]=e[r]);return n};const Vx={fixed:!0,padding:"md"},ky=x.forwardRef((e,t)=>{const n=Qe("AppShell",Vx,e),{children:r,navbar:o,header:i,footer:l,aside:a,fixed:s,zIndex:u,padding:d,navbarOffsetBreakpoint:m,asideOffsetBreakpoint:c,className:y,styles:g,classNames:v,unstyled:E,hidden:p,layout:f}=n,h=Bx(n,["children","navbar","header","footer","aside","fixed","zIndex","padding","navbarOffsetBreakpoint","asideOffsetBreakpoint","className","styles","classNames","unstyled","hidden","layout"]),{classes:w,cx:P}=Ax({padding:d,fixed:s,navbarOffsetBreakpoint:m,asideOffsetBreakpoint:c},{styles:g,classNames:v,unstyled:E,name:"AppShell"});return p?j.createElement(j.Fragment,null,r):j.createElement(hx,{value:{fixed:s,zIndex:u,layout:f}},j.createElement(Ge,Ux({className:P(w.root,y),ref:t},h),i,j.createElement("div",{className:w.body},o,j.createElement("main",{className:w.main},r),a),l))});ky.displayName="@mantine/core/AppShell";const Hr={xs:30,sm:36,md:42,lg:50,xl:60};var Hx=ot((e,{orientation:t,buttonBorderWidth:n})=>({root:{display:"flex",flexDirection:t==="vertical"?"column":"row","& [data-button]":{"&:first-of-type":{borderBottomRightRadius:0,[t==="vertical"?"borderBottomLeftRadius":"borderTopRightRadius"]:0,[t==="vertical"?"borderBottomWidth":"borderRightWidth"]:n/2},"&:last-of-type":{borderTopLeftRadius:0,[t==="vertical"?"borderTopRightRadius":"borderBottomLeftRadius"]:0,[t==="vertical"?"borderTopWidth":"borderLeftWidth"]:n/2},"&:not(:first-of-type):not(:last-of-type)":{borderRadius:0,[t==="vertical"?"borderTopWidth":"borderLeftWidth"]:n/2,[t==="vertical"?"borderBottomWidth":"borderRightWidth"]:n/2},"& + [data-button]":{[t==="vertical"?"marginTop":"marginLeft"]:-n,"@media (min-resolution: 192dpi)":{[t==="vertical"?"marginTop":"marginLeft"]:0}}}}}));const Wx=Hx;var Gx=Object.defineProperty,dl=Object.getOwnPropertySymbols,Oy=Object.prototype.hasOwnProperty,Cy=Object.prototype.propertyIsEnumerable,zd=(e,t,n)=>t in e?Gx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qx=(e,t)=>{for(var n in t||(t={}))Oy.call(t,n)&&zd(e,n,t[n]);if(dl)for(var n of dl(t))Cy.call(t,n)&&zd(e,n,t[n]);return e},Kx=(e,t)=>{var n={};for(var r in e)Oy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&dl)for(var r of dl(e))t.indexOf(r)<0&&Cy.call(e,r)&&(n[r]=e[r]);return n};const Xx={orientation:"horizontal",buttonBorderWidth:1},$y=x.forwardRef((e,t)=>{const n=Qe("ButtonGroup",Xx,e),{className:r,orientation:o,buttonBorderWidth:i,unstyled:l}=n,a=Kx(n,["className","orientation","buttonBorderWidth","unstyled"]),{classes:s,cx:u}=Wx({orientation:o,buttonBorderWidth:i},{name:"ButtonGroup",unstyled:l});return j.createElement(Ge,Qx({className:u(s.root,r),ref:t},a))});$y.displayName="@mantine/core/ButtonGroup";var Yx=Object.defineProperty,Zx=Object.defineProperties,Jx=Object.getOwnPropertyDescriptors,Td=Object.getOwnPropertySymbols,qx=Object.prototype.hasOwnProperty,eE=Object.prototype.propertyIsEnumerable,Id=(e,t,n)=>t in e?Yx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$n=(e,t)=>{for(var n in t||(t={}))qx.call(t,n)&&Id(e,n,t[n]);if(Td)for(var n of Td(t))eE.call(t,n)&&Id(e,n,t[n]);return e},Vs=(e,t)=>Zx(e,Jx(t));const Hs={xs:{height:Hr.xs,paddingLeft:14,paddingRight:14},sm:{height:Hr.sm,paddingLeft:18,paddingRight:18},md:{height:Hr.md,paddingLeft:22,paddingRight:22},lg:{height:Hr.lg,paddingLeft:26,paddingRight:26},xl:{height:Hr.xl,paddingLeft:32,paddingRight:32},"compact-xs":{height:22,paddingLeft:7,paddingRight:7},"compact-sm":{height:26,paddingLeft:8,paddingRight:8},"compact-md":{height:30,paddingLeft:10,paddingRight:10},"compact-lg":{height:34,paddingLeft:12,paddingRight:12},"compact-xl":{height:40,paddingLeft:14,paddingRight:14}};function tE({compact:e,size:t,withLeftIcon:n,withRightIcon:r}){if(e)return Hs[`compact-${t}`];const o=Hs[t];return Vs($n({},o),{paddingLeft:n?o.paddingLeft/1.5:o.paddingLeft,paddingRight:r?o.paddingRight/1.5:o.paddingRight})}const nE=e=>({display:e?"block":"inline-block",width:e?"100%":"auto"});function rE({variant:e,theme:t,color:n,gradient:r}){const o=t.fn.variant({color:n,variant:e,gradient:r});return e==="gradient"?{border:0,backgroundImage:o.background,color:o.color,"&:hover":t.fn.hover({backgroundSize:"200%"})}:$n({border:`1px solid ${o.border}`,backgroundColor:o.background,color:o.color},t.fn.hover({backgroundColor:o.hover}))}var oE=ot((e,{color:t,size:n,radius:r,fullWidth:o,compact:i,gradient:l,variant:a,withLeftIcon:s,withRightIcon:u})=>({root:Vs($n(Vs($n($n($n($n({},tE({compact:i,size:n,withLeftIcon:s,withRightIcon:u})),e.fn.fontStyles()),e.fn.focusStyles()),nE(o)),{borderRadius:e.fn.radius(r),fontWeight:600,position:"relative",lineHeight:1,fontSize:e.fn.size({size:n,sizes:e.fontSizes}),userSelect:"none",cursor:"pointer"}),rE({variant:a,theme:e,color:t,gradient:l})),{"&:active":e.activeStyles,"&:disabled, &[data-disabled]":{borderColor:"transparent",backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],color:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[5],cursor:"not-allowed",backgroundImage:"none",pointerEvents:"none","&:active":{transform:"none"}},"&[data-loading]":{pointerEvents:"none","&::before":{content:'""',position:"absolute",top:-1,left:-1,right:-1,bottom:-1,backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.colors.dark[7],.5):"rgba(255, 255, 255, .5)",borderRadius:e.fn.radius(r),cursor:"not-allowed"}}}),icon:{display:"flex",alignItems:"center"},leftIcon:{marginRight:10},rightIcon:{marginLeft:10},centerLoader:{position:"absolute",left:"50%",transform:"translateX(-50%)",opacity:.5},inner:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",overflow:"visible"},label:{whiteSpace:"nowrap",height:"100%",overflow:"hidden",display:"flex",alignItems:"center"}}));const iE=oE;var lE=Object.defineProperty,pl=Object.getOwnPropertySymbols,Ry=Object.prototype.hasOwnProperty,jy=Object.prototype.propertyIsEnumerable,Md=(e,t,n)=>t in e?lE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ld=(e,t)=>{for(var n in t||(t={}))Ry.call(t,n)&&Md(e,n,t[n]);if(pl)for(var n of pl(t))jy.call(t,n)&&Md(e,n,t[n]);return e},aE=(e,t)=>{var n={};for(var r in e)Ry.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&pl)for(var r of pl(e))t.indexOf(r)<0&&jy.call(e,r)&&(n[r]=e[r]);return n};const sE={size:"sm",type:"button",variant:"filled",loaderPosition:"left"},qu=x.forwardRef((e,t)=>{const n=Qe("Button",sE,e),{className:r,size:o,color:i,type:l,disabled:a,children:s,leftIcon:u,rightIcon:d,fullWidth:m,variant:c,radius:y,uppercase:g,compact:v,loading:E,loaderPosition:p,loaderProps:f,gradient:h,classNames:w,styles:P,unstyled:$}=n,k=aE(n,["className","size","color","type","disabled","children","leftIcon","rightIcon","fullWidth","variant","radius","uppercase","compact","loading","loaderPosition","loaderProps","gradient","classNames","styles","unstyled"]),{classes:b,cx:V,theme:I}=iE({radius:y,color:i,size:o,fullWidth:m,compact:v,gradient:h,variant:c,withLeftIcon:!!u,withRightIcon:!!d},{name:"Button",unstyled:$,classNames:w,styles:P}),Z=I.fn.variant({color:i,variant:c}),ye=j.createElement(yy,Ld({color:Z.color,size:I.fn.size({size:o,sizes:Hs}).height/2},f));return j.createElement(YS,Ld({className:V(b.root,r),type:l,disabled:a,"data-button":!0,"data-disabled":a||void 0,"data-loading":E||void 0,ref:t,unstyled:$},k),j.createElement("div",{className:b.inner},(u||E&&p==="left")&&j.createElement("span",{className:V(b.icon,b.leftIcon)},E&&p==="left"?ye:u),E&&p==="center"&&j.createElement("span",{className:b.centerLoader},ye),j.createElement("span",{className:b.label,style:{textTransform:g?"uppercase":void 0}},s),(d||E&&p==="right")&&j.createElement("span",{className:V(b.icon,b.rightIcon)},E&&p==="right"?ye:d)))});qu.displayName="@mantine/core/Button";qu.Group=$y;const ql=qu;function uE(e){return x.Children.toArray(e).filter(Boolean)}const cE={left:"flex-start",center:"center",right:"flex-end",apart:"space-between"};var fE=ot((e,{spacing:t,position:n,noWrap:r,grow:o,align:i,count:l})=>({root:{boxSizing:"border-box",display:"flex",flexDirection:"row",alignItems:i||"center",flexWrap:r?"nowrap":"wrap",justifyContent:cE[n],gap:e.fn.size({size:t,sizes:e.spacing}),"& > *":{boxSizing:"border-box",maxWidth:o?`calc(${100/l}% - ${e.fn.size({size:t,sizes:e.spacing})-e.fn.size({size:t,sizes:e.spacing})/l}px)`:void 0,flexGrow:o?1:0}}}));const dE=fE;var pE=Object.defineProperty,hl=Object.getOwnPropertySymbols,by=Object.prototype.hasOwnProperty,Ny=Object.prototype.propertyIsEnumerable,Dd=(e,t,n)=>t in e?pE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,hE=(e,t)=>{for(var n in t||(t={}))by.call(t,n)&&Dd(e,n,t[n]);if(hl)for(var n of hl(t))Ny.call(t,n)&&Dd(e,n,t[n]);return e},mE=(e,t)=>{var n={};for(var r in e)by.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&hl)for(var r of hl(e))t.indexOf(r)<0&&Ny.call(e,r)&&(n[r]=e[r]);return n};const yE={position:"left",spacing:"md"},zy=x.forwardRef((e,t)=>{const n=Qe("Group",yE,e),{className:r,position:o,align:i,children:l,noWrap:a,grow:s,spacing:u,unstyled:d}=n,m=mE(n,["className","position","align","children","noWrap","grow","spacing","unstyled"]),c=uE(l),{classes:y,cx:g}=dE({align:i,grow:s,noWrap:a,spacing:u,position:o,count:c.length},{unstyled:d,name:"Group"});return j.createElement(Ge,hE({className:g(y.root,r),ref:t},m),c)});zy.displayName="@mantine/core/Group";var gE=ot((e,{spacing:t,align:n,justify:r})=>({root:{display:"flex",flexDirection:"column",alignItems:n,justifyContent:r,gap:e.fn.size({size:t,sizes:e.spacing})}}));const vE=gE;var wE=Object.defineProperty,ml=Object.getOwnPropertySymbols,Ty=Object.prototype.hasOwnProperty,Iy=Object.prototype.propertyIsEnumerable,Ad=(e,t,n)=>t in e?wE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_E=(e,t)=>{for(var n in t||(t={}))Ty.call(t,n)&&Ad(e,n,t[n]);if(ml)for(var n of ml(t))Iy.call(t,n)&&Ad(e,n,t[n]);return e},SE=(e,t)=>{var n={};for(var r in e)Ty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ml)for(var r of ml(e))t.indexOf(r)<0&&Iy.call(e,r)&&(n[r]=e[r]);return n};const xE={spacing:"md",align:"stretch",justify:"flex-start"},My=x.forwardRef((e,t)=>{const n=Qe("Stack",xE,e),{spacing:r,className:o,align:i,justify:l,unstyled:a}=n,s=SE(n,["spacing","className","align","justify","unstyled"]),{classes:u,cx:d}=vE({spacing:r,align:i,justify:l},{name:"Stack",unstyled:a});return j.createElement(Ge,_E({className:d(u.root,o),ref:t},s))});My.displayName="@mantine/core/Stack";var EE=Object.defineProperty,PE=Object.defineProperties,kE=Object.getOwnPropertyDescriptors,Fd=Object.getOwnPropertySymbols,OE=Object.prototype.hasOwnProperty,CE=Object.prototype.propertyIsEnumerable,Ud=(e,t,n)=>t in e?EE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$E=(e,t)=>{for(var n in t||(t={}))OE.call(t,n)&&Ud(e,n,t[n]);if(Fd)for(var n of Fd(t))CE.call(t,n)&&Ud(e,n,t[n]);return e},RE=(e,t)=>PE(e,kE(t)),jE=ot((e,{color:t})=>{const n=t||(e.colorScheme==="dark"?"dark":"gray"),r=e.fn.variant({color:n,variant:"light"});return{root:RE($E({},e.fn.fontStyles()),{lineHeight:e.lineHeight,padding:`2px calc(${e.spacing.xs}px / 2)`,borderRadius:e.radius.sm,color:e.colorScheme==="dark"?n==="dark"?e.colors.dark[0]:e.white:e.colors.dark[7],backgroundColor:e.colorScheme==="dark"&&n==="dark"?e.colors.dark[5]:r.background,fontFamily:e.fontFamilyMonospace,fontSize:e.fontSizes.xs}),block:{padding:e.spacing.xs,margin:0,overflowX:"auto"}}});const bE=jE;var NE=Object.defineProperty,yl=Object.getOwnPropertySymbols,Ly=Object.prototype.hasOwnProperty,Dy=Object.prototype.propertyIsEnumerable,Bd=(e,t,n)=>t in e?NE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Vd=(e,t)=>{for(var n in t||(t={}))Ly.call(t,n)&&Bd(e,n,t[n]);if(yl)for(var n of yl(t))Dy.call(t,n)&&Bd(e,n,t[n]);return e},zE=(e,t)=>{var n={};for(var r in e)Ly.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&yl)for(var r of yl(e))t.indexOf(r)<0&&Dy.call(e,r)&&(n[r]=e[r]);return n};const Ay=x.forwardRef((e,t)=>{const n=Qe("Code",{},e),{className:r,children:o,block:i,color:l,unstyled:a}=n,s=zE(n,["className","children","block","color","unstyled"]),{classes:u,cx:d}=bE({color:l},{name:"Code",unstyled:a});return i?j.createElement(Ge,Vd({component:"pre",dir:"ltr",className:d(u.root,u.block,r),ref:t},s),o):j.createElement(Ge,Vd({component:"code",className:d(u.root,r),ref:t,dir:"ltr"},s),o)});Ay.displayName="@mantine/core/Code";var TE=Object.defineProperty,IE=Object.defineProperties,ME=Object.getOwnPropertyDescriptors,Hd=Object.getOwnPropertySymbols,LE=Object.prototype.hasOwnProperty,DE=Object.prototype.propertyIsEnumerable,Wd=(e,t,n)=>t in e?TE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,AE=(e,t)=>{for(var n in t||(t={}))LE.call(t,n)&&Wd(e,n,t[n]);if(Hd)for(var n of Hd(t))DE.call(t,n)&&Wd(e,n,t[n]);return e},FE=(e,t)=>IE(e,ME(t)),UE=ot((e,{size:t,radius:n})=>{const r=e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3];return{root:FE(AE({},e.fn.focusStyles()),{width:t,height:t,WebkitTapHighlightColor:"transparent",border:0,borderRadius:e.fn.size({size:n,sizes:e.radius}),appearance:"none",WebkitAppearance:"none",padding:0,position:"relative",overflow:"hidden"}),overlay:{position:"absolute",borderRadius:e.fn.size({size:n,sizes:e.radius}),top:0,left:0,right:0,bottom:0},children:{display:"inline-flex",justifyContent:"center",alignItems:"center"},shadowOverlay:{boxShadow:"rgba(0, 0, 0, .1) 0px 0px 0px 1px inset, rgb(0, 0, 0, .15) 0px 0px 4px inset",zIndex:1},alphaOverlay:{backgroundImage:`linear-gradient(45deg, ${r} 25%, transparent 25%), linear-gradient(-45deg, ${r} 25%, transparent 25%), linear-gradient(45deg, transparent 75%, ${r} 75%), linear-gradient(-45deg, ${e.colorScheme==="dark"?e.colors.dark[7]:e.white} 75%, ${r} 75%)`,backgroundSize:"8px 8px",backgroundPosition:"0 0, 0 4px, 4px -4px, -4px 0px"}}});const BE=UE;var VE=Object.defineProperty,gl=Object.getOwnPropertySymbols,Fy=Object.prototype.hasOwnProperty,Uy=Object.prototype.propertyIsEnumerable,Gd=(e,t,n)=>t in e?VE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,HE=(e,t)=>{for(var n in t||(t={}))Fy.call(t,n)&&Gd(e,n,t[n]);if(gl)for(var n of gl(t))Uy.call(t,n)&&Gd(e,n,t[n]);return e},WE=(e,t)=>{var n={};for(var r in e)Fy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&gl)for(var r of gl(e))t.indexOf(r)<0&&Uy.call(e,r)&&(n[r]=e[r]);return n};const GE={size:25,radius:25,withShadow:!0},By=x.forwardRef((e,t)=>{const n=Qe("ColorSwatch",GE,e),{color:r,size:o,radius:i,className:l,children:a,classNames:s,styles:u,unstyled:d,withShadow:m}=n,c=WE(n,["color","size","radius","className","children","classNames","styles","unstyled","withShadow"]),{classes:y,cx:g}=BE({radius:i,size:o},{classNames:s,styles:u,unstyled:d,name:"ColorSwatch"});return j.createElement(Ge,HE({className:g(y.root,l),ref:t},c),j.createElement("div",{className:g(y.alphaOverlay,y.overlay)}),m&&j.createElement("div",{className:g(y.shadowOverlay,y.overlay)}),j.createElement("div",{className:y.overlay,style:{backgroundColor:r}}),j.createElement("div",{className:g(y.children,y.overlay)},a))});By.displayName="@mantine/core/ColorSwatch";const QE=By;var KE=ot((e,{fluid:t,size:n,sizes:r})=>({root:{paddingLeft:e.spacing.md,paddingRight:e.spacing.md,maxWidth:t?"100%":e.fn.size({size:n,sizes:r}),marginLeft:"auto",marginRight:"auto"}}));const XE=KE;var YE=Object.defineProperty,vl=Object.getOwnPropertySymbols,Vy=Object.prototype.hasOwnProperty,Hy=Object.prototype.propertyIsEnumerable,Qd=(e,t,n)=>t in e?YE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ZE=(e,t)=>{for(var n in t||(t={}))Vy.call(t,n)&&Qd(e,n,t[n]);if(vl)for(var n of vl(t))Hy.call(t,n)&&Qd(e,n,t[n]);return e},JE=(e,t)=>{var n={};for(var r in e)Vy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&vl)for(var r of vl(e))t.indexOf(r)<0&&Hy.call(e,r)&&(n[r]=e[r]);return n};const qE={sizes:{xs:540,sm:720,md:960,lg:1140,xl:1320}},Wy=x.forwardRef((e,t)=>{const n=Qe("Container",qE,e),{className:r,fluid:o,size:i,unstyled:l,sizes:a}=n,s=JE(n,["className","fluid","size","unstyled","sizes"]),{classes:u,cx:d}=XE({fluid:o,size:i,sizes:a},{unstyled:l,name:"Container"});return j.createElement(Ge,ZE({className:d(u.root,r),ref:t},s))});Wy.displayName="@mantine/core/Container";const[eP,tP]=aw("Grid component was not found in tree");var nP=Object.defineProperty,Kd=Object.getOwnPropertySymbols,rP=Object.prototype.hasOwnProperty,oP=Object.prototype.propertyIsEnumerable,Xd=(e,t,n)=>t in e?nP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,iP=(e,t)=>{for(var n in t||(t={}))rP.call(t,n)&&Xd(e,n,t[n]);if(Kd)for(var n of Kd(t))oP.call(t,n)&&Xd(e,n,t[n]);return e};const ec=(e,t)=>e==="content"?"auto":e==="auto"?"0px":e?`${100/(t/e)}%`:void 0,Gy=(e,t,n)=>n||e==="auto"||e==="content"?"unset":ec(e,t),Qy=(e,t)=>{if(e)return e==="auto"||t?1:0},Ky=(e,t)=>e===0?0:e?`${100/(t/e)}%`:void 0,Xy=(e,t)=>typeof e<"u"?t.fn.size({size:e,sizes:t.spacing})/2:void 0;function lP({sizes:e,offsets:t,orders:n,theme:r,columns:o,gutters:i,grow:l}){return Lm.reduce((a,s)=>(a[`@media (min-width: ${r.breakpoints[s]}px)`]={order:n[s],flexBasis:ec(e[s],o),padding:Xy(i[s],r),flexShrink:0,width:e[s]==="content"?"auto":void 0,maxWidth:Gy(e[s],o,l),marginLeft:Ky(t[s],o),flexGrow:Qy(e[s],l)},a),{})}var aP=ot((e,{gutter:t,gutterXs:n,gutterSm:r,gutterMd:o,gutterLg:i,gutterXl:l,grow:a,offset:s,offsetXs:u,offsetSm:d,offsetMd:m,offsetLg:c,offsetXl:y,columns:g,span:v,xs:E,sm:p,md:f,lg:h,xl:w,order:P,orderXs:$,orderSm:k,orderMd:b,orderLg:V,orderXl:I})=>({col:iP({boxSizing:"border-box",flexGrow:Qy(v,a),order:P,padding:Xy(t,e),marginLeft:Ky(s,g),flexBasis:ec(v,g),flexShrink:0,width:v==="content"?"auto":void 0,maxWidth:Gy(v,g,a)},lP({sizes:{xs:E,sm:p,md:f,lg:h,xl:w},offsets:{xs:u,sm:d,md:m,lg:c,xl:y},orders:{xs:$,sm:k,md:b,lg:V,xl:I},gutters:{xs:n,sm:r,md:o,lg:i,xl:l},theme:e,columns:g,grow:a}))}));const sP=aP;var uP=Object.defineProperty,wl=Object.getOwnPropertySymbols,Yy=Object.prototype.hasOwnProperty,Zy=Object.prototype.propertyIsEnumerable,Yd=(e,t,n)=>t in e?uP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cP=(e,t)=>{for(var n in t||(t={}))Yy.call(t,n)&&Yd(e,n,t[n]);if(wl)for(var n of wl(t))Zy.call(t,n)&&Yd(e,n,t[n]);return e},fP=(e,t)=>{var n={};for(var r in e)Yy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&wl)for(var r of wl(e))t.indexOf(r)<0&&Zy.call(e,r)&&(n[r]=e[r]);return n};const dP={};function pP(e){return e==="auto"||e==="content"?!0:typeof e=="number"&&e>0&&e%1===0}const Jy=x.forwardRef((e,t)=>{const n=Qe("GridCol",dP,e),{children:r,span:o,offset:i,offsetXs:l,offsetSm:a,offsetMd:s,offsetLg:u,offsetXl:d,xs:m,sm:c,md:y,lg:g,xl:v,order:E,orderXs:p,orderSm:f,orderMd:h,orderLg:w,orderXl:P,className:$,id:k,unstyled:b}=n,V=fP(n,["children","span","offset","offsetXs","offsetSm","offsetMd","offsetLg","offsetXl","xs","sm","md","lg","xl","order","orderXs","orderSm","orderMd","orderLg","orderXl","className","id","unstyled"]),I=tP(),Z=o||I.columns,{classes:ye,cx:Ke}=sP({gutter:I.gutter,gutterXs:I.gutterXs,gutterSm:I.gutterSm,gutterMd:I.gutterMd,gutterLg:I.gutterLg,gutterXl:I.gutterXl,offset:i,offsetXs:l,offsetSm:a,offsetMd:s,offsetLg:u,offsetXl:d,xs:m,sm:c,md:y,lg:g,xl:v,order:E,orderXs:p,orderSm:f,orderMd:h,orderLg:w,orderXl:P,grow:I.grow,columns:I.columns,span:Z},{unstyled:b,name:"Grid"});return!pP(Z)||Z>I.columns?null:j.createElement(Ge,cP({className:Ke(ye.col,$),ref:t},V),r)});Jy.displayName="@mantine/core/Col";var hP=Object.defineProperty,Zd=Object.getOwnPropertySymbols,mP=Object.prototype.hasOwnProperty,yP=Object.prototype.propertyIsEnumerable,Jd=(e,t,n)=>t in e?hP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gP=(e,t)=>{for(var n in t||(t={}))mP.call(t,n)&&Jd(e,n,t[n]);if(Zd)for(var n of Zd(t))yP.call(t,n)&&Jd(e,n,t[n]);return e};function vP(e,t){return Lm.reduce((n,r)=>(typeof e[r]<"u"&&(n[`@media (min-width: ${t.breakpoints[r]}px)`]={margin:-t.fn.size({size:e[r],sizes:t.spacing})/2}),n),{})}var wP=ot((e,{justify:t,align:n,gutter:r,gutterXs:o,gutterSm:i,gutterMd:l,gutterLg:a,gutterXl:s})=>({root:gP({margin:-e.fn.size({size:r,sizes:e.spacing})/2,display:"flex",flexWrap:"wrap",justifyContent:t,alignItems:n},vP({xs:o,sm:i,md:l,lg:a,xl:s},e))}));const _P=wP;var SP=Object.defineProperty,_l=Object.getOwnPropertySymbols,qy=Object.prototype.hasOwnProperty,eg=Object.prototype.propertyIsEnumerable,qd=(e,t,n)=>t in e?SP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xP=(e,t)=>{for(var n in t||(t={}))qy.call(t,n)&&qd(e,n,t[n]);if(_l)for(var n of _l(t))eg.call(t,n)&&qd(e,n,t[n]);return e},EP=(e,t)=>{var n={};for(var r in e)qy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&_l)for(var r of _l(e))t.indexOf(r)<0&&eg.call(e,r)&&(n[r]=e[r]);return n};const PP={gutter:"md",justify:"flex-start",align:"stretch",columns:12},ao=x.forwardRef((e,t)=>{const n=Qe("Grid",PP,e),{gutter:r,gutterXs:o,gutterSm:i,gutterMd:l,gutterLg:a,gutterXl:s,children:u,grow:d,justify:m,align:c,columns:y,className:g,id:v,unstyled:E}=n,p=EP(n,["gutter","gutterXs","gutterSm","gutterMd","gutterLg","gutterXl","children","grow","justify","align","columns","className","id","unstyled"]),{classes:f,cx:h}=_P({gutter:r,justify:m,align:c,gutterXs:o,gutterSm:i,gutterMd:l,gutterLg:a,gutterXl:s},{unstyled:E,name:"Grid"});return j.createElement(eP,{value:{gutter:r,gutterXs:o,gutterSm:i,gutterMd:l,gutterLg:a,gutterXl:s,grow:d,columns:y}},j.createElement(Ge,xP({className:h(f.root,g),ref:t},p),u))});ao.Col=Jy;ao.displayName="@mantine/core/Grid";var kP=Object.defineProperty,OP=Object.defineProperties,CP=Object.getOwnPropertyDescriptors,ep=Object.getOwnPropertySymbols,$P=Object.prototype.hasOwnProperty,RP=Object.prototype.propertyIsEnumerable,tp=(e,t,n)=>t in e?kP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jP=(e,t)=>{for(var n in t||(t={}))$P.call(t,n)&&tp(e,n,t[n]);if(ep)for(var n of ep(t))RP.call(t,n)&&tp(e,n,t[n]);return e},bP=(e,t)=>OP(e,CP(t)),NP=ot((e,{captionSide:t,horizontalSpacing:n,verticalSpacing:r,fontSize:o,withBorder:i,withColumnBorders:l})=>{const a=`1px solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`;return{root:bP(jP({},e.fn.fontStyles()),{width:"100%",borderCollapse:"collapse",captionSide:t,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,lineHeight:e.lineHeight,border:i?a:"","& caption":{marginTop:t==="top"?0:e.spacing.xs,marginBottom:t==="bottom"?0:e.spacing.xs,fontSize:e.fontSizes.sm,color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]},"& thead tr th, & tfoot tr th":{textAlign:"left",fontWeight:"bold",color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],fontSize:e.fn.size({size:o,sizes:e.fontSizes}),padding:`${e.fn.size({size:r,sizes:e.spacing})}px ${e.fn.size({size:n,sizes:e.spacing})}px`},"& thead tr th":{borderBottom:a},"& tfoot tr th":{borderTop:a},"& tbody tr td":{padding:`${e.fn.size({size:r,sizes:e.spacing})}px ${e.fn.size({size:n,sizes:e.spacing})}px`,borderTop:a,fontSize:e.fn.size({size:o,sizes:e.fontSizes})},"& tbody tr:first-of-type td":{borderTop:"none"},"& thead th, & tbody td":{borderRight:l?a:"none","&:last-of-type":{borderRight:"none",borderLeft:l?a:"none"}},"&[data-striped] tbody tr:nth-of-type(odd)":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0]},"&[data-hover] tbody tr":e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]})})}});const zP=NP;var TP=Object.defineProperty,IP=Object.defineProperties,MP=Object.getOwnPropertyDescriptors,Sl=Object.getOwnPropertySymbols,tg=Object.prototype.hasOwnProperty,ng=Object.prototype.propertyIsEnumerable,np=(e,t,n)=>t in e?TP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,LP=(e,t)=>{for(var n in t||(t={}))tg.call(t,n)&&np(e,n,t[n]);if(Sl)for(var n of Sl(t))ng.call(t,n)&&np(e,n,t[n]);return e},DP=(e,t)=>IP(e,MP(t)),AP=(e,t)=>{var n={};for(var r in e)tg.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Sl)for(var r of Sl(e))t.indexOf(r)<0&&ng.call(e,r)&&(n[r]=e[r]);return n};const FP={striped:!1,highlightOnHover:!1,captionSide:"top",horizontalSpacing:"xs",fontSize:"sm",verticalSpacing:7,withBorder:!1,withColumnBorders:!1},rg=x.forwardRef((e,t)=>{const n=Qe("Table",FP,e),{className:r,children:o,striped:i,highlightOnHover:l,captionSide:a,horizontalSpacing:s,verticalSpacing:u,fontSize:d,unstyled:m,withBorder:c,withColumnBorders:y}=n,g=AP(n,["className","children","striped","highlightOnHover","captionSide","horizontalSpacing","verticalSpacing","fontSize","unstyled","withBorder","withColumnBorders"]),{classes:v,cx:E}=zP({captionSide:a,verticalSpacing:u,horizontalSpacing:s,fontSize:d,withBorder:c,withColumnBorders:y},{unstyled:m,name:"Table"});return j.createElement(Ge,DP(LP({},g),{component:"table",ref:t,className:E(v.root,r),"data-striped":i||void 0,"data-hover":l||void 0}),o)});rg.displayName="@mantine/core/Table";class rp extends Error{constructor(n,r,o){super(o);Ae(this,"url");Ae(this,"status");Ae(this,"statusText");Ae(this,"body");Ae(this,"request");this.name="ApiError",this.url=r.url,this.status=r.status,this.statusText=r.statusText,this.body=r.body,this.request=n}}class UP extends Error{constructor(t){super(t),this.name="CancelError"}get isCancelled(){return!0}}var m2;class BP{constructor(t){Ae(this,m2);Ae(this,"_isResolved");Ae(this,"_isRejected");Ae(this,"_isCancelled");Ae(this,"_cancelHandlers");Ae(this,"_promise");Ae(this,"_resolve");Ae(this,"_reject");this._isResolved=!1,this._isRejected=!1,this._isCancelled=!1,this._cancelHandlers=[],this._promise=new Promise((n,r)=>{this._resolve=n,this._reject=r;const o=a=>{var s;this._isResolved||this._isRejected||this._isCancelled||(this._isResolved=!0,(s=this._resolve)==null||s.call(this,a))},i=a=>{var s;this._isResolved||this._isRejected||this._isCancelled||(this._isRejected=!0,(s=this._reject)==null||s.call(this,a))},l=a=>{this._isResolved||this._isRejected||this._isCancelled||this._cancelHandlers.push(a)};return Object.defineProperty(l,"isResolved",{get:()=>this._isResolved}),Object.defineProperty(l,"isRejected",{get:()=>this._isRejected}),Object.defineProperty(l,"isCancelled",{get:()=>this._isCancelled}),t(o,i,l)})}then(t,n){return this._promise.then(t,n)}catch(t){return this._promise.catch(t)}finally(t){return this._promise.finally(t)}cancel(){var t;if(!(this._isResolved||this._isRejected||this._isCancelled)){if(this._isCancelled=!0,this._cancelHandlers.length)try{for(const n of this._cancelHandlers)n()}catch(n){console.warn("Cancellation threw an error",n);return}this._cancelHandlers.length=0,(t=this._reject)==null||t.call(this,new UP("Request aborted"))}}get isCancelled(){return this._isCancelled}}m2=Symbol.toStringTag;const It={BASE:"",VERSION:"0.1.0",WITH_CREDENTIALS:!1,CREDENTIALS:"include",TOKEN:void 0,USERNAME:void 0,PASSWORD:void 0,HEADERS:void 0,ENCODE_PATH:void 0};var qt=(e=>(e.THROUGH="through",e.DIVERGING="diverging",e.CONVERGING="converging",e))(qt||{}),gr=(e=>(e.STRAIGHT="straight",e.CURVE="curve",e))(gr||{}),an=(e=>(e.A="A",e.B="B",e))(an||{});const tc=e=>e!=null,Fo=e=>typeof e=="string",Fa=e=>Fo(e)&&e!=="",nc=e=>typeof e=="object"&&typeof e.type=="string"&&typeof e.stream=="function"&&typeof e.arrayBuffer=="function"&&typeof e.constructor=="function"&&typeof e.constructor.name=="string"&&/^(Blob|File)$/.test(e.constructor.name)&&/^(Blob|File)$/.test(e[Symbol.toStringTag]),og=e=>e instanceof FormData,VP=e=>{try{return btoa(e)}catch{return Buffer.from(e).toString("base64")}},HP=e=>{const t=[],n=(o,i)=>{t.push(`${encodeURIComponent(o)}=${encodeURIComponent(String(i))}`)},r=(o,i)=>{tc(i)&&(Array.isArray(i)?i.forEach(l=>{r(o,l)}):typeof i=="object"?Object.entries(i).forEach(([l,a])=>{r(`${o}[${l}]`,a)}):n(o,i))};return Object.entries(e).forEach(([o,i])=>{r(o,i)}),t.length>0?`?${t.join("&")}`:""},WP=(e,t)=>{const n=e.ENCODE_PATH||encodeURI,r=t.url.replace("{api-version}",e.VERSION).replace(/{(.*?)}/g,(i,l)=>{var a;return(a=t.path)!=null&&a.hasOwnProperty(l)?n(String(t.path[l])):i}),o=`${e.BASE}${r}`;return t.query?`${o}${HP(t.query)}`:o},GP=e=>{if(e.formData){const t=new FormData,n=(r,o)=>{Fo(o)||nc(o)?t.append(r,o):t.append(r,JSON.stringify(o))};return Object.entries(e.formData).filter(([r,o])=>tc(o)).forEach(([r,o])=>{Array.isArray(o)?o.forEach(i=>n(r,i)):n(r,o)}),t}},pi=async(e,t)=>typeof t=="function"?t(e):t,QP=async(e,t)=>{const n=await pi(t,e.TOKEN),r=await pi(t,e.USERNAME),o=await pi(t,e.PASSWORD),i=await pi(t,e.HEADERS),l=Object.entries({Accept:"application/json",...i,...t.headers}).filter(([a,s])=>tc(s)).reduce((a,[s,u])=>({...a,[s]:String(u)}),{});if(Fa(n)&&(l.Authorization=`Bearer ${n}`),Fa(r)&&Fa(o)){const a=VP(`${r}:${o}`);l.Authorization=`Basic ${a}`}return t.body&&(t.mediaType?l["Content-Type"]=t.mediaType:nc(t.body)?l["Content-Type"]=t.body.type||"application/octet-stream":Fo(t.body)?l["Content-Type"]="text/plain":og(t.body)||(l["Content-Type"]="application/json")),new Headers(l)},KP=e=>{var t;if(e.body)return(t=e.mediaType)!=null&&t.includes("/json")?JSON.stringify(e.body):Fo(e.body)||nc(e.body)||og(e.body)?e.body:JSON.stringify(e.body)},XP=async(e,t,n,r,o,i,l)=>{const a=new AbortController,s={headers:i,body:r??o,method:t.method,signal:a.signal};return e.WITH_CREDENTIALS&&(s.credentials=e.CREDENTIALS),l(()=>a.abort()),await fetch(n,s)},YP=(e,t)=>{if(t){const n=e.headers.get(t);if(Fo(n))return n}},ZP=async e=>{if(e.status!==204)try{const t=e.headers.get("Content-Type");if(t)return t.toLowerCase().startsWith("application/json")?await e.json():await e.text()}catch(t){console.error(t)}},JP=(e,t)=>{const r={400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable",...e.errors}[t.status];if(r)throw new rp(e,t,r);if(!t.ok)throw new rp(e,t,"Generic Error")},Mt=(e,t)=>new BP(async(n,r,o)=>{try{const i=WP(e,t),l=GP(t),a=KP(t),s=await QP(e,t);if(!o.isCancelled){const u=await XP(e,t,i,a,l,s,o),d=await ZP(u),m=YP(u,t.responseHeader),c={url:i,ok:u.ok,status:u.status,statusText:u.statusText,body:m??d};JP(t,c),n(c.body)}}catch(i){r(i)}});class Qt{static hello(){return Mt(It,{method:"GET",url:"/api/hello"})}static getState(){return Mt(It,{method:"GET",url:"/api/state"})}static moveTrain(t,n){return Mt(It,{method:"POST",url:"/api/state/trains/{train_id}/move",path:{train_id:t},body:n,mediaType:"application/json",errors:{422:"Validation Error"}})}static putTrain(t,n){return Mt(It,{method:"POST",url:"/api/state/trains/{train_id}/put",path:{train_id:t},body:n,mediaType:"application/json",errors:{422:"Validation Error"}})}static updateJunction(t,n){return Mt(It,{method:"POST",url:"/api/state/junctions/{junction_id}/update",path:{junction_id:t},body:n,mediaType:"application/json",errors:{422:"Validation Error"}})}static detectObstacle(t){return Mt(It,{method:"POST",url:"/api/state/obstacles/{obstacle_id}/detect",path:{obstacle_id:t},errors:{422:"Validation Error"}})}static clearObstacle(t){return Mt(It,{method:"POST",url:"/api/state/obstacles/{obstacle_id}/clear",path:{obstacle_id:t},errors:{422:"Validation Error"}})}static blockSection(t){return Mt(It,{method:"POST",url:"/api/state/sections/{section_id}/block",path:{section_id:t},errors:{422:"Validation Error"}})}static unblockSection(t){return Mt(It,{method:"POST",url:"/api/state/sections/{section_id}/unblock",path:{section_id:t},errors:{422:"Validation Error"}})}}const qP=({children:e})=>R.jsx(ky,{padding:"md",header:R.jsx(xy,{height:60,p:"md",sx:t=>({display:"flex",alignItems:"center",backgroundColor:t.colors.blue[5],fontSize:18,color:t.white,fontWeight:700}),children:"Plarailers Train Control System"}),children:e}),Et=x.createContext(null),Wn=x.createContext(null),e2=({position:e})=>R.jsx("rect",{x:e.x-60/2,y:e.y-20/2,width:60,height:20,fill:"white"}),t2=({id:e,points:t})=>{const n=x.useContext(Et);if(!n)return null;const r=n.sections[e],o=op(t[0],t[1],4),i=t.length,l=op(t[i-1],t[i-2],4),a=[o,...t.slice(1,-1),l];return R.jsx("polyline",{points:a.map(s=>`${s.x},${s.y}`).join(" "),fill:"none",stroke:r.is_blocked?"red":"white",strokeWidth:r.is_blocked?4:2,strokeLinecap:"square"})},op=(e,t,n)=>({x:e.x+(t.x-e.x)/Math.hypot(t.x-e.x,t.y-e.y)*n,y:e.y+(t.y-e.y)/Math.hypot(t.x-e.x,t.y-e.y)*n}),ip=e=>{const t=Math.hypot(e.x,e.y);return{x:e.x/t,y:e.y/t}},zn=(e,t)=>{let n=0;for(let o=0;o=a)r-=a;else return{position:{x:i.x+(l.x-i.x)*(r/a),y:i.y+(l.y-i.y)*(r/a)},direction:{x:l.x-i.x,y:l.y-i.y},partitionIndex:o+1}}{const o=t[t.length-2],i=t[t.length-1];return{position:i,direction:{x:i.x-o.x,y:i.y-o.y},partitionIndex:t.length}}},n2=({id:e})=>{const t=dt(),n=x.useContext(Et),r=x.useContext(Wn);if(!(n&&r))return null;const o=n.trains[e],{position:i,angle:l}=lp(o.head_position,n,r),{position:a,angle:s}=lp(o.tail_position,n,r),u=r2(o,n,r),d=r.trains[e];return R.jsxs(R.Fragment,{children:[R.jsx("polyline",{points:u.map(m=>`${m.x},${m.y}`).join(" "),fill:"none",stroke:d.fill,strokeWidth:4,strokeLinecap:"round",strokeLinejoin:"miter"}),R.jsxs("g",{transform:`translate(${i.x}, ${i.y})`,children:[R.jsx("g",{transform:`rotate(${l})`,children:R.jsx("polyline",{points:"-5,5 0,5 5,0 0,-5 -5,-5",fill:d.fill,stroke:d.stroke})}),o.departure_time!=null&&R.jsx("g",{transform:`translate(${0}, ${-10})`,children:R.jsx("text",{textAnchor:"middle",fill:t.colors.gray[5],children:o.departure_time-n.current_time})})]}),R.jsx("g",{transform:`translate(${a.x}, ${a.y})`,children:R.jsx("g",{transform:`rotate(${s})`,children:R.jsx("polyline",{points:"0,-5 -5,-5 -5,5 0,5",fill:d.fill,stroke:d.stroke})})})]})},lp=(e,t,n)=>{const r=t.sections[e.section_id],o=n.sections[e.section_id],{position:i,direction:l}=zn(e.mileage/r.length,o.points);e.target_junction_id===r.connected_junction_ids[an.A]&&(l.x*=-1,l.y*=-1);const a=Math.atan2(l.y,l.x)/Math.PI*180;return{position:i,angle:a}},r2=(e,t,n)=>{const r=[];if(e.head_position.section_id===e.tail_position.section_id){const o=t.sections[e.tail_position.section_id],i=n.sections[e.tail_position.section_id],{position:l,direction:a,partitionIndex:s}=zn(e.tail_position.mileage/o.length,i.points);e.tail_position.target_junction_id===o.connected_junction_ids[an.A]&&(a.x*=-1,a.y*=-1);const u=t.sections[e.head_position.section_id],d=n.sections[e.head_position.section_id],{position:m,direction:c,partitionIndex:y}=zn(e.head_position.mileage/u.length,d.points);e.head_position.target_junction_id===u.connected_junction_ids[an.A]&&(c.x*=-1,c.y*=-1),y<=s?r.push(m,...d.points.slice(y,s),l):r.push(l,...d.points.slice(s,y),m)}else{const o=t.sections[e.tail_position.section_id],i=n.sections[e.tail_position.section_id],{position:l,direction:a,partitionIndex:s}=zn(e.tail_position.mileage/o.length,i.points);e.tail_position.target_junction_id===o.connected_junction_ids[an.B]?r.push(l,...i.points.slice(s)):(a.x*=-1,a.y*=-1,r.push(l,...i.points.slice(0,s).reverse()));for(const g of e.covered_section_ids){const v=n.sections[g];v.points[0].x===r[r.length-1].x&&v.points[0].y===r[r.length-1].y?r.push(...v.points):r.push(...v.points.slice().reverse())}const u=t.sections[e.head_position.section_id],d=n.sections[e.head_position.section_id],{position:m,direction:c,partitionIndex:y}=zn(e.head_position.mileage/u.length,d.points);e.head_position.target_junction_id===u.connected_junction_ids[an.B]?r.push(...d.points.slice(0,y),m):(c.x*=-1,c.y*=-1,r.push(...d.points.slice(y).reverse(),m))}return r},o2=({id:e,position:t})=>{const n=dt(),r=x.useContext(Et),o=x.useContext(Wn);if(!(r&&o))return null;const i=r.junctions[e],l={};for(const u of[qt.CONVERGING,qt.THROUGH,qt.DIVERGING]){const d=i.connected_section_ids[u],m=r.sections[d];if(e===m.connected_junction_ids[an.A]){const c=o.sections[d].points,y=c[0],g=c[1];l[u]=ip({x:g.x-y.x,y:g.y-y.y})}else if(e===m.connected_junction_ids[an.B]){const c=o.sections[d].points,y=c[c.length-1],g=c[c.length-2];l[u]=ip({x:g.x-y.x,y:g.y-y.y})}}let a;switch(i.current_direction){case gr.STRAIGHT:{a=qt.THROUGH;break}case gr.CURVE:{a=qt.DIVERGING;break}}const s=6;return R.jsxs("g",{transform:`translate(${t.x}, ${t.y})`,children:[R.jsx("circle",{cx:0,cy:0,r:s,fill:n.white,stroke:n.colors.gray[6]}),R.jsx("polyline",{points:[{x:l[qt.CONVERGING].x*s,y:l[qt.CONVERGING].y*s},{x:0,y:0},{x:l[a].x*s,y:l[a].y*s}].map(u=>`${u.x},${u.y}`).join(" "),fill:"none",stroke:n.colors.blue[7],strokeWidth:4})]})},i2=({id:e})=>{const t=dt(),n=x.useContext(Et),r=x.useContext(Wn);if(!(n&&r))return null;const o=n.stops[e],i=n.sections[o.position.section_id],l=r.sections[o.position.section_id],{position:a,direction:s}=zn(o.position.mileage/i.length,l.points),u=Math.atan2(s.y,s.x)/Math.PI*180;return R.jsx("g",{transform:`translate(${a.x}, ${a.y})`,children:R.jsx("g",{transform:`rotate(${u+180})`,children:R.jsxs("g",{transform:"translate(0, -10)",children:[R.jsx("polyline",{points:"0,0 0,10",stroke:t.colors.dark[2],strokeWidth:2}),R.jsx("polygon",{points:"-5,0 0,5 5,0 0,-5",fill:t.white,stroke:t.colors.red[7],strokeWidth:2})]})})})},l2=({id:e})=>{const t=dt(),n=x.useContext(Et),r=x.useContext(Wn);if(!(n&&r))return null;const o=n.obstacles[e];if(!o.is_detected)return null;const i=n.sections[o.position.section_id],l=r.sections[o.position.section_id],{position:a,direction:s}=zn(o.position.mileage/i.length,l.points),u=Math.atan2(s.y,s.x)/Math.PI*180;return R.jsx("g",{transform:`translate(${a.x}, ${a.y})`,children:R.jsx("g",{transform:`rotate(${u})`,children:R.jsxs("g",{children:[R.jsx("polyline",{points:"-10,-10 10,10",stroke:t.colors.red[8],strokeWidth:6}),R.jsx("polyline",{points:"-10,10 10,-10",stroke:t.colors.red[8],strokeWidth:6}),R.jsx("animate",{attributeName:"opacity",values:"1;0;1;1;1;1",dur:"2s",repeatCount:"indefinite"})]})})})},a2=({children:e})=>{const t=dt(),n=x.useContext(Et),r=x.useContext(Wn);return n&&r?R.jsxs("svg",{width:"100%",viewBox:`0 0 ${r.width} ${r.height}`,children:[R.jsx("rect",{width:r.width,height:r.height,fill:t.colors.dark[7]}),Object.entries(r.platforms).map(([o,i])=>R.jsx(e2,{position:i.position},o)),Object.entries(r.stops).filter(([o,i])=>n.stops[o]).map(([o,i])=>R.jsx(i2,{id:o},o)),Object.entries(r.sections).filter(([o,i])=>n.sections[o]).map(([o,i])=>R.jsx(t2,{id:o,points:i.points},o)),Object.entries(r.junctions).filter(([o,i])=>n.junctions[o]).map(([o,i])=>R.jsx(o2,{id:o,position:i.position},o)),Object.entries(r.obstacles).filter(([o,i])=>n.obstacles[o]).map(([o,i])=>R.jsx(l2,{id:o},o)),Object.entries(r.trains).filter(([o,i])=>n.trains[o]).map(([o,i])=>R.jsx(n2,{id:o},o)),e]}):null},s2=()=>R.jsx("div",{children:R.jsxs(zy,{children:[R.jsx(ap,{id:"t0",delta:10}),R.jsx(ap,{id:"t1",delta:10}),R.jsx(hi,{id:"j0"}),R.jsx(hi,{id:"j1"}),R.jsx(hi,{id:"j2"}),R.jsx(hi,{id:"j3"}),R.jsx(u2,{id:"obstacle_0"}),R.jsx(c2,{id:"s3"})]})}),ap=({id:e,delta:t})=>R.jsxs(ql,{styles:n=>({label:{fontFamily:n.fontFamilyMonospace}}),onClick:()=>{Qt.moveTrain(e,{delta:t})},children:["MoveTrain(",e,", ",t,")"]},e),hi=({id:e})=>{const t=x.useContext(Et);if(!t)return null;const n=t.junctions[e];return R.jsxs(ql,{styles:r=>({label:{fontFamily:r.fontFamilyMonospace}}),onClick:()=>{n.current_direction==gr.STRAIGHT?Qt.updateJunction(e,{direction:gr.CURVE}):Qt.updateJunction(e,{direction:gr.STRAIGHT})},children:["ToggleJunction(",e,")"]},e)},u2=({id:e})=>{const t=x.useContext(Et);if(!t)return null;const n=t.obstacles[e];return R.jsx(ql,{variant:n.is_detected?"filled":"light",color:"red",styles:r=>({label:{fontFamily:r.fontFamilyMonospace}}),onClick:()=>{n.is_detected?Qt.clearObstacle(e):Qt.detectObstacle(e)},children:n.is_detected?`ClearObstacle(${e})`:`DetectObstacle(${e})`})},c2=({id:e})=>{const t=x.useContext(Et);if(!t)return null;const n=t.sections[e];return R.jsx(ql,{variant:n.is_blocked?"filled":"light",color:"red",styles:r=>({label:{fontFamily:r.fontFamilyMonospace}}),onClick:()=>{n.is_blocked?Qt.unblockSection(e):Qt.blockSection(e)},children:n.is_blocked?`UnblockSection(${e})`:`BlockSection(${e})`})},f2=()=>{const e=x.useContext(Et),t=x.useContext(Wn);return e&&t?R.jsxs(rg,{sx:n=>({fontFamily:n.fontFamilyMonospace}),children:[R.jsx("thead",{children:R.jsxs("tr",{children:[R.jsx("th",{}),R.jsx("th",{children:"train"}),R.jsx("th",{children:"speed"}),R.jsx("th",{children:"voltage"})]})}),R.jsx("tbody",{children:e&&Object.entries(e.trains).filter(([n,r])=>t.trains[n]).map(([n,r])=>R.jsxs("tr",{children:[R.jsx("td",{children:R.jsx(QE,{color:t.trains[n].fill})}),R.jsx("td",{children:n}),R.jsx("td",{children:r.speed_command.toFixed(2)}),R.jsx("td",{children:r.voltage_mV})]},n))})]}):null},d2={width:440,height:340,platforms:{},junctions:{j0:{position:{x:400,y:160}},j1:{position:{x:360,y:200}},j2:{position:{x:280,y:280}},j3:{position:{x:260,y:300}}},sections:{s0:{from:"j0",to:"j3",points:[{x:400,y:160},{x:400,y:280},{x:380,y:300},{x:260,y:300}]},s1:{from:"j3",to:"j0",points:[{x:260,y:300},{x:60,y:300},{x:40,y:280},{x:40,y:220},{x:220,y:40},{x:380,y:40},{x:400,y:60},{x:400,y:160}]},s2:{from:"j1",to:"j2",points:[{x:360,y:200},{x:360,y:250},{x:330,y:280},{x:280,y:280}]},s3:{from:"j2",to:"j1",points:[{x:280,y:280},{x:110,y:280},{x:80,y:250},{x:80,y:110},{x:110,y:80},{x:330,y:80},{x:360,y:110},{x:360,y:200}]},s4:{from:"j0",to:"j1",points:[{x:400,y:160},{x:360,y:200}]},s5:{from:"j2",to:"j3",points:[{x:280,y:280},{x:260,y:300}]}},trains:{t0:{fill:Xe.colors.yellow[4],stroke:Xe.colors.yellow[9]},t1:{fill:Xe.colors.green[5],stroke:Xe.colors.green[9]},t2:{fill:Xe.colors.cyan[4],stroke:Xe.colors.cyan[9]},t3:{fill:Xe.colors.indigo[5],stroke:Xe.colors.indigo[9]},t4:{fill:Xe.colors.red[5],stroke:Xe.colors.red[9]}},stops:{},obstacles:{obstacle_0:{}}},p2=()=>{const e=dt(),[t,n]=x.useState(null),[r,o]=x.useState(()=>new Date);return x.useEffect(()=>{Qt.getState().then(i=>{o(new Date),n(i)})},[]),x.useEffect(()=>{const i=setInterval(()=>{Qt.getState().then(l=>{o(new Date),n(l)})},500);return()=>{clearInterval(i)}},[]),R.jsx(Et.Provider,{value:t,children:R.jsx(Wn.Provider,{value:d2,children:R.jsx(qP,{children:R.jsx(Wy,{children:R.jsxs(My,{children:[R.jsxs(ao,{children:[R.jsx(ao.Col,{span:8,children:R.jsx(a2,{children:R.jsx("text",{x:10,y:20,fontSize:12,fontFamily:e.fontFamilyMonospace,fill:e.white,children:r.toLocaleString()})})}),R.jsx(ao.Col,{span:4,children:R.jsx(f2,{})})]}),R.jsx(s2,{}),R.jsx(Ay,{block:!0,children:JSON.stringify(t,null,4)})]})})})})})},h2=ow([{path:"/",element:R.jsx(p2,{})}]);Ua.createRoot(document.getElementById("root")).render(R.jsx(j.StrictMode,{children:R.jsx(ey,{withGlobalStyles:!0,withNormalizeCSS:!0,theme:{colorScheme:"dark"},children:R.jsx(ew,{router:h2})})})); +>>>>>>>> main:ptcs/ptcs_ui/dist/assets/index-5699ed18.js diff --git a/ptcs/ptcs_ui/dist/assets/index-a74e297b.js b/ptcs/ptcs_ui/dist/assets/index-a74e297b.js index 84d794b..0e31e2a 100644 --- a/ptcs/ptcs_ui/dist/assets/index-a74e297b.js +++ b/ptcs/ptcs_ui/dist/assets/index-a74e297b.js @@ -71,4 +71,8 @@ Error generating stack: `+i.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. +<<<<<<<< HEAD:ptcs/ptcs_ui/dist/assets/index-a74e297b.js */var xe=typeof Symbol=="function"&&Symbol.for,Xu=xe?Symbol.for("react.element"):60103,Yu=xe?Symbol.for("react.portal"):60106,Vl=xe?Symbol.for("react.fragment"):60107,Hl=xe?Symbol.for("react.strict_mode"):60108,Wl=xe?Symbol.for("react.profiler"):60114,Gl=xe?Symbol.for("react.provider"):60109,Ql=xe?Symbol.for("react.context"):60110,Zu=xe?Symbol.for("react.async_mode"):60111,Kl=xe?Symbol.for("react.concurrent_mode"):60111,Xl=xe?Symbol.for("react.forward_ref"):60112,Yl=xe?Symbol.for("react.suspense"):60113,p_=xe?Symbol.for("react.suspense_list"):60120,Zl=xe?Symbol.for("react.memo"):60115,Jl=xe?Symbol.for("react.lazy"):60116,h_=xe?Symbol.for("react.block"):60121,m_=xe?Symbol.for("react.fundamental"):60117,y_=xe?Symbol.for("react.responder"):60118,g_=xe?Symbol.for("react.scope"):60119;function rt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Xu:switch(e=e.type,e){case Zu:case Kl:case Vl:case Wl:case Hl:case Yl:return e;default:switch(e=e&&e.$$typeof,e){case Ql:case Xl:case Jl:case Zl:case Gl:return e;default:return t}}case Yu:return t}}}function Gm(e){return rt(e)===Kl}ee.AsyncMode=Zu;ee.ConcurrentMode=Kl;ee.ContextConsumer=Ql;ee.ContextProvider=Gl;ee.Element=Xu;ee.ForwardRef=Xl;ee.Fragment=Vl;ee.Lazy=Jl;ee.Memo=Zl;ee.Portal=Yu;ee.Profiler=Wl;ee.StrictMode=Hl;ee.Suspense=Yl;ee.isAsyncMode=function(e){return Gm(e)||rt(e)===Zu};ee.isConcurrentMode=Gm;ee.isContextConsumer=function(e){return rt(e)===Ql};ee.isContextProvider=function(e){return rt(e)===Gl};ee.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Xu};ee.isForwardRef=function(e){return rt(e)===Xl};ee.isFragment=function(e){return rt(e)===Vl};ee.isLazy=function(e){return rt(e)===Jl};ee.isMemo=function(e){return rt(e)===Zl};ee.isPortal=function(e){return rt(e)===Yu};ee.isProfiler=function(e){return rt(e)===Wl};ee.isStrictMode=function(e){return rt(e)===Hl};ee.isSuspense=function(e){return rt(e)===Yl};ee.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Vl||e===Kl||e===Wl||e===Hl||e===Yl||e===p_||typeof e=="object"&&e!==null&&(e.$$typeof===Jl||e.$$typeof===Zl||e.$$typeof===Gl||e.$$typeof===Ql||e.$$typeof===Xl||e.$$typeof===m_||e.$$typeof===y_||e.$$typeof===g_||e.$$typeof===h_)};ee.typeOf=rt;(function(e){e.exports=ee})(d_);var Qm=Us,v_={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},w_={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Km={};Km[Qm.ForwardRef]=v_;Km[Qm.Memo]=w_;var __=!0;function S_(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):r+=o+" "}),r}var x_=function(t,n,r){var o=t.key+"-"+n.name;(r===!1||__===!1)&&t.registered[o]===void 0&&(t.registered[o]=n.styles)},Xm=function(t,n,r){x_(t,n,r);var o=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var i=n;do t.insert(n===i?"."+o:"",i,t.sheet,!0),i=i.next;while(i!==void 0)}};function E_(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var P_={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},k_=/[A-Z]|^ms/g,O_=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ym=function(t){return t.charCodeAt(1)===45},Gf=function(t){return t!=null&&typeof t!="boolean"},Ia=o_(function(e){return Ym(e)?e:e.replace(k_,"-$&").toLowerCase()}),Qf=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(O_,function(r,o,i){return $t={name:o,styles:i,next:$t},o})}return P_[t]!==1&&!Ym(t)&&typeof n=="number"&&n!==0?n+"px":n};function bo(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return $t={name:n.name,styles:n.styles,next:$t},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)$t={name:r.name,styles:r.styles,next:$t},r=r.next;var o=n.styles+";";return o}return C_(e,t,n)}case"function":{if(e!==void 0){var i=$t,l=n(e);return $t=i,bo(e,t,l)}break}}if(t==null)return n;var a=t[n];return a!==void 0?a:n}function C_(e,t,n){var r="";if(Array.isArray(n))for(var o=0;ot in e?T_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,A_=(e,t)=>{for(var n in t||(t={}))L_.call(t,n)&&Zf(e,n,t[n]);if(Yf)for(var n of Yf(t))D_.call(t,n)&&Zf(e,n,t[n]);return e},F_=(e,t)=>I_(e,M_(t));function U_({theme:e}){return j.createElement(Ao,{styles:{"*, *::before, *::after":{boxSizing:"border-box"},html:{colorScheme:e.colorScheme==="dark"?"dark":"light"},body:F_(A_({},e.fn.fontStyles()),{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,lineHeight:e.lineHeight,fontSize:e.fontSizes.md,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"})}})}function di(e,t,n){Object.keys(t).forEach(r=>{e[`--mantine-${n}-${r}`]=typeof t[r]=="number"?`${t[r]}px`:t[r]})}function B_({theme:e}){const t={"--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-transition-timing-function":e.transitionTimingFunction,"--mantine-line-height":`${e.lineHeight}`,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":`${e.headings.fontWeight}`};di(t,e.shadows,"shadow"),di(t,e.fontSizes,"font-size"),di(t,e.radius,"radius"),di(t,e.spacing,"spacing"),Object.keys(e.colors).forEach(r=>{e.colors[r].forEach((o,i)=>{t[`--mantine-color-${r}-${i}`]=o})});const n=e.headings.sizes;return Object.keys(n).forEach(r=>{t[`--mantine-${r}-font-size`]=`${n[r].fontSize}px`,t[`--mantine-${r}-line-height`]=`${n[r].lineHeight}`}),j.createElement(Ao,{styles:{":root":t}})}var V_=Object.defineProperty,H_=Object.defineProperties,W_=Object.getOwnPropertyDescriptors,Jf=Object.getOwnPropertySymbols,G_=Object.prototype.hasOwnProperty,Q_=Object.prototype.propertyIsEnumerable,qf=(e,t,n)=>t in e?V_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kn=(e,t)=>{for(var n in t||(t={}))G_.call(t,n)&&qf(e,n,t[n]);if(Jf)for(var n of Jf(t))Q_.call(t,n)&&qf(e,n,t[n]);return e},ed=(e,t)=>H_(e,W_(t));function K_(e,t){if(!t)return e;const n=Object.keys(e).reduce((r,o)=>{if(o==="headings"&&t.headings){const i=t.headings.sizes?Object.keys(e.headings.sizes).reduce((l,a)=>(l[a]=kn(kn({},e.headings.sizes[a]),t.headings.sizes[a]),l),{}):e.headings.sizes;return ed(kn({},r),{headings:ed(kn(kn({},e.headings),t.headings),{sizes:i})})}return r[o]=typeof t[o]=="object"?kn(kn({},e[o]),t[o]):typeof t[o]=="number"||typeof t[o]=="boolean"||typeof t[o]=="function"?t[o]:t[o]||e[o],r},{});if(!(n.primaryColor in n.colors))throw new Error("MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color");return n}function X_(e,t){return Mm(K_(e,t))}function Jm(e){return Object.keys(e).reduce((t,n)=>(e[n]!==void 0&&(t[n]=e[n]),t),{})}const Y_={html:{fontFamily:"sans-serif",lineHeight:"1.15",textSizeAdjust:"100%"},body:{margin:0},"article, aside, footer, header, nav, section, figcaption, figure, main":{display:"block"},h1:{fontSize:"2em"},hr:{boxSizing:"content-box",height:0,overflow:"visible"},pre:{fontFamily:"monospace, monospace",fontSize:"1em"},a:{background:"transparent",textDecorationSkip:"objects"},"a:active, a:hover":{outlineWidth:0},"abbr[title]":{borderBottom:"none",textDecoration:"underline"},"b, strong":{fontWeight:"bolder"},"code, kbp, samp":{fontFamily:"monospace, monospace",fontSize:"1em"},dfn:{fontStyle:"italic"},mark:{backgroundColor:"#ff0",color:"#000"},small:{fontSize:"80%"},"sub, sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sup:{top:"-0.5em"},sub:{bottom:"-0.25em"},"audio, video":{display:"inline-block"},"audio:not([controls])":{display:"none",height:0},img:{borderStyle:"none",verticalAlign:"middle"},"svg:not(:root)":{overflow:"hidden"},"button, input, optgroup, select, textarea":{fontFamily:"sans-serif",fontSize:"100%",lineHeight:"1.15",margin:0},"button, input":{overflow:"visible"},"button, select":{textTransform:"none"},"button, [type=reset], [type=submit]":{WebkitAppearance:"button"},"button::-moz-focus-inner, [type=button]::-moz-focus-inner, [type=reset]::-moz-focus-inner, [type=submit]::-moz-focus-inner":{borderStyle:"none",padding:0},"button:-moz-focusring, [type=button]:-moz-focusring, [type=reset]:-moz-focusring, [type=submit]:-moz-focusring":{outline:"1px dotted ButtonText"},legend:{boxSizing:"border-box",color:"inherit",display:"table",maxWidth:"100%",padding:0,whiteSpace:"normal"},progress:{display:"inline-block",verticalAlign:"baseline"},textarea:{overflow:"auto"},"[type=checkbox], [type=radio]":{boxSizing:"border-box",padding:0},"[type=number]::-webkit-inner-spin-button, [type=number]::-webkit-outer-spin-button":{height:"auto"},"[type=search]":{appearance:"none"},"[type=search]::-webkit-search-cancel-button, [type=search]::-webkit-search-decoration":{appearance:"none"},"::-webkit-file-upload-button":{appearance:"button",font:"inherit"},"details, menu":{display:"block"},summary:{display:"list-item"},canvas:{display:"inline-block"},template:{display:"none"},"[hidden]":{display:"none"}};function Z_(){return j.createElement(Ao,{styles:Y_})}var J_=Object.defineProperty,td=Object.getOwnPropertySymbols,q_=Object.prototype.hasOwnProperty,eS=Object.prototype.propertyIsEnumerable,nd=(e,t,n)=>t in e?J_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lo=(e,t)=>{for(var n in t||(t={}))q_.call(t,n)&&nd(e,n,t[n]);if(td)for(var n of td(t))eS.call(t,n)&&nd(e,n,t[n]);return e};const rl=x.createContext({theme:Xe});function dt(){var e;return((e=x.useContext(rl))==null?void 0:e.theme)||Xe}function tS(e){const t=dt(),n=r=>{var o,i;return{styles:((o=t.components[r])==null?void 0:o.styles)||{},classNames:((i=t.components[r])==null?void 0:i.classNames)||{}}};return Array.isArray(e)?e.map(n):[n(e)]}function qm(){var e;return(e=x.useContext(rl))==null?void 0:e.emotionCache}function Qe(e,t,n){var r;const o=dt(),i=(r=o.components[e])==null?void 0:r.defaultProps,l=typeof i=="function"?i(o):i;return lo(lo(lo({},t),l),Jm(n))}function ey({theme:e,emotionCache:t,withNormalizeCSS:n=!1,withGlobalStyles:r=!1,withCSSVariables:o=!1,inherit:i=!1,children:l}){const a=x.useContext(rl),s=X_(Xe,i?lo(lo({},a.theme),e):e);return j.createElement(N_,{theme:s},j.createElement(rl.Provider,{value:{theme:s,emotionCache:t}},n&&j.createElement(Z_,null),r&&j.createElement(U_,{theme:s}),o&&j.createElement(B_,{theme:s}),typeof s.globalStyles=="function"&&j.createElement(Ao,{styles:s.globalStyles(s)}),l))}ey.displayName="@mantine/core/MantineProvider";const nS={app:100,modal:200,popover:300,overlay:400,max:9999};function rS(e){return nS[e]}function oS(e,t){const n=x.useRef();return(!n.current||t.length!==n.current.prevDeps.length||n.current.prevDeps.map((r,o)=>r===t[o]).indexOf(!1)>=0)&&(n.current={v:e(),prevDeps:[...t]}),n.current.v}const iS=Wm({key:"mantine",prepend:!0});function lS(){return qm()||iS}var aS=Object.defineProperty,rd=Object.getOwnPropertySymbols,sS=Object.prototype.hasOwnProperty,uS=Object.prototype.propertyIsEnumerable,od=(e,t,n)=>t in e?aS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cS=(e,t)=>{for(var n in t||(t={}))sS.call(t,n)&&od(e,n,t[n]);if(rd)for(var n of rd(t))uS.call(t,n)&&od(e,n,t[n]);return e};const Ma="ref";function fS(e){let t;if(e.length!==1)return{args:e,ref:t};const[n]=e;if(!(n instanceof Object))return{args:e,ref:t};if(!(Ma in n))return{args:e,ref:t};t=n[Ma];const r=cS({},n);return delete r[Ma],{args:[r],ref:t}}const{cssFactory:dS}=(()=>{function e(n,r,o){const i=[],l=S_(n,i,o);return i.length<2?o:l+r(i)}function t(n){const{cache:r}=n,o=(...l)=>{const{ref:a,args:s}=fS(l),u=Ju(s,r.registered);return Xm(r,u,!1),`${r.key}-${u.name}${a===void 0?"":` ${a}`}`};return{css:o,cx:(...l)=>e(r.registered,o,sw(l))}}return{cssFactory:t}})();function ty(){const e=lS();return oS(()=>dS({cache:e}),[e])}function pS({cx:e,classes:t,context:n,classNames:r,name:o,cache:i}){const l=n.reduce((a,s)=>(Object.keys(s.classNames).forEach(u=>{typeof a[u]!="string"?a[u]=`${s.classNames[u]}`:a[u]=`${a[u]} ${s.classNames[u]}`}),a),{});return Object.keys(t).reduce((a,s)=>(a[s]=e(t[s],l[s],r!=null&&r[s],Array.isArray(o)?o.filter(Boolean).map(u=>`${(i==null?void 0:i.key)||"mantine"}-${u}-${s}`).join(" "):o?`${(i==null?void 0:i.key)||"mantine"}-${o}-${s}`:null),a),{})}var hS=Object.defineProperty,id=Object.getOwnPropertySymbols,mS=Object.prototype.hasOwnProperty,yS=Object.prototype.propertyIsEnumerable,ld=(e,t,n)=>t in e?hS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,La=(e,t)=>{for(var n in t||(t={}))mS.call(t,n)&&ld(e,n,t[n]);if(id)for(var n of id(t))yS.call(t,n)&&ld(e,n,t[n]);return e};function gS(e){return`__mantine-ref-${e||""}`}function ad(e,t,n){const r=o=>typeof o=="function"?o(t,n||{}):o||{};return Array.isArray(e)?e.map(o=>r(o.styles)).reduce((o,i)=>(Object.keys(i).forEach(l=>{o[l]?o[l]=La(La({},o[l]),i[l]):o[l]=La({},i[l])}),o),{}):r(e)}function ot(e){const t=typeof e=="function"?e:()=>e;function n(r,o){const i=dt(),l=tS(o==null?void 0:o.name),a=qm(),{css:s,cx:u}=ty(),d=t(i,r,gS),m=ad(o==null?void 0:o.styles,i,r),c=ad(l,i,r),y=Object.fromEntries(Object.keys(d).map(g=>{const v=u({[s(d[g])]:!(o!=null&&o.unstyled)},s(c[g]),s(m[g]));return[g,v]}));return{classes:pS({cx:u,classes:y,context:l,classNames:o==null?void 0:o.classNames,name:o==null?void 0:o.name,cache:a}),cx:u,theme:i}}return n}function vS({styles:e}){const t=dt();return j.createElement(Ao,{styles:z_(typeof e=="function"?e(t):e)})}var sd=Object.getOwnPropertySymbols,wS=Object.prototype.hasOwnProperty,_S=Object.prototype.propertyIsEnumerable,SS=(e,t)=>{var n={};for(var r in e)wS.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&sd)for(var r of sd(e))t.indexOf(r)<0&&_S.call(e,r)&&(n[r]=e[r]);return n};function xS(e){const t=e,{m:n,mx:r,my:o,mt:i,mb:l,ml:a,mr:s,p:u,px:d,py:m,pt:c,pb:y,pl:g,pr:v,bg:E,c:p,opacity:f,ff:h,fz:w,fw:P,lts:$,ta:k,lh:b,fs:V,tt:I,td:Z,w:ye,miw:Ke,maw:Gn,h:jr,mih:Sn,mah:se,bgsz:N,bgp:D,bgr:U,bga:K,pos:ue,top:Xt,left:it,bottom:xn,right:pt,inset:Yt,display:En}=t,Uo=SS(t,["m","mx","my","mt","mb","ml","mr","p","px","py","pt","pb","pl","pr","bg","c","opacity","ff","fz","fw","lts","ta","lh","fs","tt","td","w","miw","maw","h","mih","mah","bgsz","bgp","bgr","bga","pos","top","left","bottom","right","inset","display"]);return{systemStyles:Jm({m:n,mx:r,my:o,mt:i,mb:l,ml:a,mr:s,p:u,px:d,py:m,pt:c,pb:y,pl:g,pr:v,bg:E,c:p,opacity:f,ff:h,fz:w,fw:P,lts:$,ta:k,lh:b,fs:V,tt:I,td:Z,w:ye,miw:Ke,maw:Gn,h:jr,mih:Sn,mah:se,bgsz:N,bgp:D,bgr:U,bga:K,pos:ue,top:Xt,left:it,bottom:xn,right:pt,inset:Yt,display:En}),rest:Uo}}function ES(e,t){const n=Object.keys(e).filter(r=>r!=="base").sort((r,o)=>t.fn.size({size:r,sizes:t.breakpoints})-t.fn.size({size:o,sizes:t.breakpoints}));return"base"in e?["base",...n]:n}function PS({value:e,theme:t,getValue:n,property:r}){if(e==null)return;if(typeof e=="object")return ES(e,t).reduce((l,a)=>{if(a==="base"&&e.base!==void 0){const u=n(e.base,t);return Array.isArray(r)?(r.forEach(d=>{l[d]=u}),l):(l[r]=u,l)}const s=n(e[a],t);return Array.isArray(r)?(l[t.fn.largerThan(a)]={},r.forEach(u=>{l[t.fn.largerThan(a)][u]=s}),l):(l[t.fn.largerThan(a)]={[r]:s},l)},{});const o=n(e,t);return Array.isArray(r)?r.reduce((i,l)=>(i[l]=o,i),{}):{[r]:o}}function kS(e,t){return e==="dimmed"?t.colorScheme==="dark"?t.colors.dark[2]:t.colors.gray[6]:t.fn.variant({variant:"filled",color:e,primaryFallback:!1}).background}function OS(e){return e}function CS(e,t){return t.fn.size({size:e,sizes:t.fontSizes})}const $S=["-xs","-sm","-md","-lg","-xl"];function RS(e,t){return $S.includes(e)?t.fn.size({size:e.replace("-",""),sizes:t.spacing})*-1:t.fn.size({size:e,sizes:t.spacing})}const jS={color:kS,default:OS,fontSize:CS,spacing:RS},bS={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},mx:{type:"spacing",property:["marginRight","marginLeft"]},my:{type:"spacing",property:["marginTop","marginBottom"]},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},px:{type:"spacing",property:["paddingRight","paddingLeft"]},py:{type:"spacing",property:["paddingTop","paddingBottom"]},bg:{type:"color",property:"background"},c:{type:"color",property:"color"},opacity:{type:"default",property:"opacity"},ff:{type:"default",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"default",property:"fontWeight"},lts:{type:"default",property:"letterSpacing"},ta:{type:"default",property:"textAlign"},lh:{type:"default",property:"lineHeight"},fs:{type:"default",property:"fontStyle"},tt:{type:"default",property:"textTransform"},td:{type:"default",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"default",property:"background-size"},bgp:{type:"default",property:"background-position"},bgr:{type:"default",property:"background-repeat"},bga:{type:"default",property:"background-attachment"},pos:{type:"default",property:"position"},top:{type:"default",property:"top"},left:{type:"default",property:"left"},bottom:{type:"default",property:"bottom"},right:{type:"default",property:"right"},inset:{type:"default",property:"inset"},display:{type:"default",property:"display"}};var NS=Object.defineProperty,ud=Object.getOwnPropertySymbols,zS=Object.prototype.hasOwnProperty,TS=Object.prototype.propertyIsEnumerable,cd=(e,t,n)=>t in e?NS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fd=(e,t)=>{for(var n in t||(t={}))zS.call(t,n)&&cd(e,n,t[n]);if(ud)for(var n of ud(t))TS.call(t,n)&&cd(e,n,t[n]);return e};function dd(e,t,n=bS){return Object.keys(n).reduce((o,i)=>(i in e&&e[i]!==void 0&&o.push(PS({value:e[i],getValue:jS[n[i].type],property:n[i].property,theme:t})),o),[]).reduce((o,i)=>(Object.keys(i).forEach(l=>{typeof i[l]=="object"&&i[l]!==null&&l in o?o[l]=fd(fd({},o[l]),i[l]):o[l]=i[l]}),o),{})}function pd(e,t){return typeof e=="function"?e(t):e}function IS(e,t,n){const r=dt(),{css:o,cx:i}=ty();return Array.isArray(e)?i(n,o(dd(t,r)),e.map(l=>o(pd(l,r)))):i(n,o(pd(e,r)),o(dd(t,r)))}var MS=Object.defineProperty,ol=Object.getOwnPropertySymbols,ny=Object.prototype.hasOwnProperty,ry=Object.prototype.propertyIsEnumerable,hd=(e,t,n)=>t in e?MS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,LS=(e,t)=>{for(var n in t||(t={}))ny.call(t,n)&&hd(e,n,t[n]);if(ol)for(var n of ol(t))ry.call(t,n)&&hd(e,n,t[n]);return e},DS=(e,t)=>{var n={};for(var r in e)ny.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ol)for(var r of ol(e))t.indexOf(r)<0&&ry.call(e,r)&&(n[r]=e[r]);return n};const oy=x.forwardRef((e,t)=>{var n=e,{className:r,component:o,style:i,sx:l}=n,a=DS(n,["className","component","style","sx"]);const{systemStyles:s,rest:u}=xS(a),d=o||"div";return j.createElement(d,LS({ref:t,className:IS(l,s,r),style:i},u))});oy.displayName="@mantine/core/Box";const Ge=oy;var AS=Object.defineProperty,FS=Object.defineProperties,US=Object.getOwnPropertyDescriptors,md=Object.getOwnPropertySymbols,BS=Object.prototype.hasOwnProperty,VS=Object.prototype.propertyIsEnumerable,yd=(e,t,n)=>t in e?AS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gd=(e,t)=>{for(var n in t||(t={}))BS.call(t,n)&&yd(e,n,t[n]);if(md)for(var n of md(t))VS.call(t,n)&&yd(e,n,t[n]);return e},HS=(e,t)=>FS(e,US(t)),WS=ot(e=>({root:HS(gd(gd({},e.fn.focusStyles()),e.fn.fontStyles()),{cursor:"pointer",border:0,padding:0,appearance:"none",fontSize:e.fontSizes.md,backgroundColor:"transparent",textAlign:"left",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,textDecoration:"none",boxSizing:"border-box"})}));const GS=WS;var QS=Object.defineProperty,il=Object.getOwnPropertySymbols,iy=Object.prototype.hasOwnProperty,ly=Object.prototype.propertyIsEnumerable,vd=(e,t,n)=>t in e?QS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,KS=(e,t)=>{for(var n in t||(t={}))iy.call(t,n)&&vd(e,n,t[n]);if(il)for(var n of il(t))ly.call(t,n)&&vd(e,n,t[n]);return e},XS=(e,t)=>{var n={};for(var r in e)iy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&il)for(var r of il(e))t.indexOf(r)<0&&ly.call(e,r)&&(n[r]=e[r]);return n};const ay=x.forwardRef((e,t)=>{const n=Qe("UnstyledButton",{},e),{className:r,component:o="button",unstyled:i}=n,l=XS(n,["className","component","unstyled"]),{classes:a,cx:s}=GS(null,{name:"UnstyledButton",unstyled:i});return j.createElement(Ge,KS({component:o,ref:t,className:s(a.root,r),type:o==="button"?"button":void 0},l))});ay.displayName="@mantine/core/UnstyledButton";const YS=ay;var ZS=Object.defineProperty,ll=Object.getOwnPropertySymbols,sy=Object.prototype.hasOwnProperty,uy=Object.prototype.propertyIsEnumerable,wd=(e,t,n)=>t in e?ZS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,JS=(e,t)=>{for(var n in t||(t={}))sy.call(t,n)&&wd(e,n,t[n]);if(ll)for(var n of ll(t))uy.call(t,n)&&wd(e,n,t[n]);return e},qS=(e,t)=>{var n={};for(var r in e)sy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ll)for(var r of ll(e))t.indexOf(r)<0&&uy.call(e,r)&&(n[r]=e[r]);return n};function ex(e){var t=e,{size:n,color:r}=t,o=qS(t,["size","color"]);return j.createElement("svg",JS({viewBox:"0 0 135 140",xmlns:"http://www.w3.org/2000/svg",fill:r,width:`${n}px`},o),j.createElement("rect",{y:"10",width:"15",height:"120",rx:"6"},j.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),j.createElement("rect",{x:"30",y:"10",width:"15",height:"120",rx:"6"},j.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),j.createElement("rect",{x:"60",width:"15",height:"140",rx:"6"},j.createElement("animate",{attributeName:"height",begin:"0s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"y",begin:"0s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),j.createElement("rect",{x:"90",y:"10",width:"15",height:"120",rx:"6"},j.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),j.createElement("rect",{x:"120",y:"10",width:"15",height:"120",rx:"6"},j.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})))}var tx=Object.defineProperty,al=Object.getOwnPropertySymbols,cy=Object.prototype.hasOwnProperty,fy=Object.prototype.propertyIsEnumerable,_d=(e,t,n)=>t in e?tx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nx=(e,t)=>{for(var n in t||(t={}))cy.call(t,n)&&_d(e,n,t[n]);if(al)for(var n of al(t))fy.call(t,n)&&_d(e,n,t[n]);return e},rx=(e,t)=>{var n={};for(var r in e)cy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&al)for(var r of al(e))t.indexOf(r)<0&&fy.call(e,r)&&(n[r]=e[r]);return n};function ox(e){var t=e,{size:n,color:r}=t,o=rx(t,["size","color"]);return j.createElement("svg",nx({width:`${n}px`,height:`${n}px`,viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg",stroke:r},o),j.createElement("g",{fill:"none",fillRule:"evenodd"},j.createElement("g",{transform:"translate(2.5 2.5)",strokeWidth:"5"},j.createElement("circle",{strokeOpacity:".5",cx:"16",cy:"16",r:"16"}),j.createElement("path",{d:"M32 16c0-9.94-8.06-16-16-16"},j.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 16 16",to:"360 16 16",dur:"1s",repeatCount:"indefinite"})))))}var ix=Object.defineProperty,sl=Object.getOwnPropertySymbols,dy=Object.prototype.hasOwnProperty,py=Object.prototype.propertyIsEnumerable,Sd=(e,t,n)=>t in e?ix(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lx=(e,t)=>{for(var n in t||(t={}))dy.call(t,n)&&Sd(e,n,t[n]);if(sl)for(var n of sl(t))py.call(t,n)&&Sd(e,n,t[n]);return e},ax=(e,t)=>{var n={};for(var r in e)dy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&sl)for(var r of sl(e))t.indexOf(r)<0&&py.call(e,r)&&(n[r]=e[r]);return n};function sx(e){var t=e,{size:n,color:r}=t,o=ax(t,["size","color"]);return j.createElement("svg",lx({width:`${n}px`,height:`${n/4}px`,viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg",fill:r},o),j.createElement("circle",{cx:"15",cy:"15",r:"15"},j.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})),j.createElement("circle",{cx:"60",cy:"15",r:"9",fillOpacity:"0.3"},j.createElement("animate",{attributeName:"r",from:"9",to:"9",begin:"0s",dur:"0.8s",values:"9;15;9",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"fill-opacity",from:"0.5",to:"0.5",begin:"0s",dur:"0.8s",values:".5;1;.5",calcMode:"linear",repeatCount:"indefinite"})),j.createElement("circle",{cx:"105",cy:"15",r:"15"},j.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})))}var ux=Object.defineProperty,ul=Object.getOwnPropertySymbols,hy=Object.prototype.hasOwnProperty,my=Object.prototype.propertyIsEnumerable,xd=(e,t,n)=>t in e?ux(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cx=(e,t)=>{for(var n in t||(t={}))hy.call(t,n)&&xd(e,n,t[n]);if(ul)for(var n of ul(t))my.call(t,n)&&xd(e,n,t[n]);return e},fx=(e,t)=>{var n={};for(var r in e)hy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ul)for(var r of ul(e))t.indexOf(r)<0&&my.call(e,r)&&(n[r]=e[r]);return n};const Da={bars:ex,oval:ox,dots:sx},dx={xs:18,sm:22,md:36,lg:44,xl:58},px={size:"md"};function yy(e){const t=Qe("Loader",px,e),{size:n,color:r,variant:o}=t,i=fx(t,["size","color","variant"]),l=dt(),a=o in Da?o:l.loader;return j.createElement(Ge,cx({role:"presentation",component:Da[a]||Da.bars,size:l.fn.size({size:n,sizes:dx}),color:l.fn.variant({variant:"filled",primaryFallback:!1,color:r||l.primaryColor}).background},i))}yy.displayName="@mantine/core/Loader";const gy=x.createContext({zIndex:1e3,fixed:!1,layout:"default"}),hx=gy.Provider;function mx(){return x.useContext(gy)}function vy(e,t){if(!e)return[];const n=Object.keys(e).filter(r=>r!=="base").map(r=>[t.fn.size({size:r,sizes:t.breakpoints}),e[r]]);return n.sort((r,o)=>r[0]-o[0]),n}var yx=Object.defineProperty,gx=Object.defineProperties,vx=Object.getOwnPropertyDescriptors,Ed=Object.getOwnPropertySymbols,wx=Object.prototype.hasOwnProperty,_x=Object.prototype.propertyIsEnumerable,Pd=(e,t,n)=>t in e?yx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Aa=(e,t)=>{for(var n in t||(t={}))wx.call(t,n)&&Pd(e,n,t[n]);if(Ed)for(var n of Ed(t))_x.call(t,n)&&Pd(e,n,t[n]);return e},kd=(e,t)=>gx(e,vx(t)),Sx=ot((e,{height:t,fixed:n,position:r,zIndex:o,borderPosition:i,layout:l})=>{const a=typeof t=="object"&&t!==null?vy(t,e).reduce((s,[u,d])=>(s[`@media (min-width: ${u}px)`]={height:d,minHeight:d},s),{}):null;return{root:kd(Aa(kd(Aa(Aa({},e.fn.fontStyles()),r),{zIndex:o,left:l==="alt"?"var(--mantine-navbar-width, 0)":0,right:l==="alt"?"var(--mantine-aside-width, 0)":0,height:typeof t=="object"?(t==null?void 0:t.base)||"100%":t,maxHeight:typeof t=="object"?(t==null?void 0:t.base)||"100%":t,position:n?"fixed":"static",boxSizing:"border-box",backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white}),a),{borderBottom:i==="bottom"?`1px solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[2]}`:void 0,borderTop:i==="top"?`1px solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[2]}`:void 0})}});const xx=Sx;var Ex=Object.defineProperty,cl=Object.getOwnPropertySymbols,wy=Object.prototype.hasOwnProperty,_y=Object.prototype.propertyIsEnumerable,Od=(e,t,n)=>t in e?Ex(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Cd=(e,t)=>{for(var n in t||(t={}))wy.call(t,n)&&Od(e,n,t[n]);if(cl)for(var n of cl(t))_y.call(t,n)&&Od(e,n,t[n]);return e},Px=(e,t)=>{var n={};for(var r in e)wy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&cl)for(var r of cl(e))t.indexOf(r)<0&&_y.call(e,r)&&(n[r]=e[r]);return n};const Sy=x.forwardRef((e,t)=>{var n=e,{children:r,className:o,classNames:i,styles:l,height:a,fixed:s=!1,withBorder:u=!0,position:d,zIndex:m,section:c,unstyled:y,__staticSelector:g}=n,v=Px(n,["children","className","classNames","styles","height","fixed","withBorder","position","zIndex","section","unstyled","__staticSelector"]);const E=mx(),p=m||E.zIndex||rS("app"),{classes:f,cx:h,theme:w}=xx({height:a,fixed:E.fixed||s,position:d,zIndex:typeof p=="number"&&E.layout==="default"?p+1:p,layout:E.layout,borderPosition:u?c==="header"?"bottom":"top":"none"},{name:g,classNames:i,styles:l,unstyled:y}),P=typeof a=="object"&&a!==null?vy(a,w).reduce(($,[k,b])=>($[`@media (min-width: ${k}px)`]={[`--mantine-${c}-height`]:`${b}px`},$),{}):null;return j.createElement(Ge,Cd({component:c==="header"?"header":"footer",className:h(f.root,o),ref:t},v),r,j.createElement(vS,{styles:()=>({":root":Cd({[`--mantine-${c}-height`]:typeof a=="object"?`${a==null?void 0:a.base}px`||"100%":`${a}px`},P)})}))});Sy.displayName="@mantine/core/VerticalSection";var kx=Object.defineProperty,Ox=Object.defineProperties,Cx=Object.getOwnPropertyDescriptors,$d=Object.getOwnPropertySymbols,$x=Object.prototype.hasOwnProperty,Rx=Object.prototype.propertyIsEnumerable,Rd=(e,t,n)=>t in e?kx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jx=(e,t)=>{for(var n in t||(t={}))$x.call(t,n)&&Rd(e,n,t[n]);if($d)for(var n of $d(t))Rx.call(t,n)&&Rd(e,n,t[n]);return e},bx=(e,t)=>Ox(e,Cx(t));const Nx={fixed:!1,position:{top:0,left:0,right:0}},xy=x.forwardRef((e,t)=>{const n=Qe("Header",Nx,e);return j.createElement(Sy,bx(jx({section:"header",__staticSelector:"Header"},n),{ref:t}))});xy.displayName="@mantine/core/Header";var zx=Object.defineProperty,jd=Object.getOwnPropertySymbols,Tx=Object.prototype.hasOwnProperty,Ix=Object.prototype.propertyIsEnumerable,bd=(e,t,n)=>t in e?zx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mx=(e,t)=>{for(var n in t||(t={}))Tx.call(t,n)&&bd(e,n,t[n]);if(jd)for(var n of jd(t))Ix.call(t,n)&&bd(e,n,t[n]);return e};function Lx(e,t){const n=t.fn.size({size:e.padding,sizes:t.spacing}),r=e.navbarOffsetBreakpoint?t.fn.size({size:e.navbarOffsetBreakpoint,sizes:t.breakpoints}):null,o=e.asideOffsetBreakpoint?t.fn.size({size:e.asideOffsetBreakpoint,sizes:t.breakpoints}):null;return e.fixed?{minHeight:"100vh",paddingTop:`calc(var(--mantine-header-height, 0px) + ${n}px)`,paddingBottom:`calc(var(--mantine-footer-height, 0px) + ${n}px)`,paddingLeft:`calc(var(--mantine-navbar-width, 0px) + ${n}px)`,paddingRight:`calc(var(--mantine-aside-width, 0px) + ${n}px)`,[`@media (max-width: ${r-1}px)`]:{paddingLeft:n},[`@media (max-width: ${o-1}px)`]:{paddingRight:n}}:{padding:n}}var Dx=ot((e,t)=>({root:{boxSizing:"border-box"},body:{display:"flex",boxSizing:"border-box"},main:Mx({flex:1,width:"100vw",boxSizing:"border-box"},Lx(t,e))}));const Ax=Dx;var Fx=Object.defineProperty,fl=Object.getOwnPropertySymbols,Ey=Object.prototype.hasOwnProperty,Py=Object.prototype.propertyIsEnumerable,Nd=(e,t,n)=>t in e?Fx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ux=(e,t)=>{for(var n in t||(t={}))Ey.call(t,n)&&Nd(e,n,t[n]);if(fl)for(var n of fl(t))Py.call(t,n)&&Nd(e,n,t[n]);return e},Bx=(e,t)=>{var n={};for(var r in e)Ey.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&fl)for(var r of fl(e))t.indexOf(r)<0&&Py.call(e,r)&&(n[r]=e[r]);return n};const Vx={fixed:!0,padding:"md"},ky=x.forwardRef((e,t)=>{const n=Qe("AppShell",Vx,e),{children:r,navbar:o,header:i,footer:l,aside:a,fixed:s,zIndex:u,padding:d,navbarOffsetBreakpoint:m,asideOffsetBreakpoint:c,className:y,styles:g,classNames:v,unstyled:E,hidden:p,layout:f}=n,h=Bx(n,["children","navbar","header","footer","aside","fixed","zIndex","padding","navbarOffsetBreakpoint","asideOffsetBreakpoint","className","styles","classNames","unstyled","hidden","layout"]),{classes:w,cx:P}=Ax({padding:d,fixed:s,navbarOffsetBreakpoint:m,asideOffsetBreakpoint:c},{styles:g,classNames:v,unstyled:E,name:"AppShell"});return p?j.createElement(j.Fragment,null,r):j.createElement(hx,{value:{fixed:s,zIndex:u,layout:f}},j.createElement(Ge,Ux({className:P(w.root,y),ref:t},h),i,j.createElement("div",{className:w.body},o,j.createElement("main",{className:w.main},r),a),l))});ky.displayName="@mantine/core/AppShell";const Hr={xs:30,sm:36,md:42,lg:50,xl:60};var Hx=ot((e,{orientation:t,buttonBorderWidth:n})=>({root:{display:"flex",flexDirection:t==="vertical"?"column":"row","& [data-button]":{"&:first-of-type":{borderBottomRightRadius:0,[t==="vertical"?"borderBottomLeftRadius":"borderTopRightRadius"]:0,[t==="vertical"?"borderBottomWidth":"borderRightWidth"]:n/2},"&:last-of-type":{borderTopLeftRadius:0,[t==="vertical"?"borderTopRightRadius":"borderBottomLeftRadius"]:0,[t==="vertical"?"borderTopWidth":"borderLeftWidth"]:n/2},"&:not(:first-of-type):not(:last-of-type)":{borderRadius:0,[t==="vertical"?"borderTopWidth":"borderLeftWidth"]:n/2,[t==="vertical"?"borderBottomWidth":"borderRightWidth"]:n/2},"& + [data-button]":{[t==="vertical"?"marginTop":"marginLeft"]:-n,"@media (min-resolution: 192dpi)":{[t==="vertical"?"marginTop":"marginLeft"]:0}}}}}));const Wx=Hx;var Gx=Object.defineProperty,dl=Object.getOwnPropertySymbols,Oy=Object.prototype.hasOwnProperty,Cy=Object.prototype.propertyIsEnumerable,zd=(e,t,n)=>t in e?Gx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qx=(e,t)=>{for(var n in t||(t={}))Oy.call(t,n)&&zd(e,n,t[n]);if(dl)for(var n of dl(t))Cy.call(t,n)&&zd(e,n,t[n]);return e},Kx=(e,t)=>{var n={};for(var r in e)Oy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&dl)for(var r of dl(e))t.indexOf(r)<0&&Cy.call(e,r)&&(n[r]=e[r]);return n};const Xx={orientation:"horizontal",buttonBorderWidth:1},$y=x.forwardRef((e,t)=>{const n=Qe("ButtonGroup",Xx,e),{className:r,orientation:o,buttonBorderWidth:i,unstyled:l}=n,a=Kx(n,["className","orientation","buttonBorderWidth","unstyled"]),{classes:s,cx:u}=Wx({orientation:o,buttonBorderWidth:i},{name:"ButtonGroup",unstyled:l});return j.createElement(Ge,Qx({className:u(s.root,r),ref:t},a))});$y.displayName="@mantine/core/ButtonGroup";var Yx=Object.defineProperty,Zx=Object.defineProperties,Jx=Object.getOwnPropertyDescriptors,Td=Object.getOwnPropertySymbols,qx=Object.prototype.hasOwnProperty,eE=Object.prototype.propertyIsEnumerable,Id=(e,t,n)=>t in e?Yx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$n=(e,t)=>{for(var n in t||(t={}))qx.call(t,n)&&Id(e,n,t[n]);if(Td)for(var n of Td(t))eE.call(t,n)&&Id(e,n,t[n]);return e},Vs=(e,t)=>Zx(e,Jx(t));const Hs={xs:{height:Hr.xs,paddingLeft:14,paddingRight:14},sm:{height:Hr.sm,paddingLeft:18,paddingRight:18},md:{height:Hr.md,paddingLeft:22,paddingRight:22},lg:{height:Hr.lg,paddingLeft:26,paddingRight:26},xl:{height:Hr.xl,paddingLeft:32,paddingRight:32},"compact-xs":{height:22,paddingLeft:7,paddingRight:7},"compact-sm":{height:26,paddingLeft:8,paddingRight:8},"compact-md":{height:30,paddingLeft:10,paddingRight:10},"compact-lg":{height:34,paddingLeft:12,paddingRight:12},"compact-xl":{height:40,paddingLeft:14,paddingRight:14}};function tE({compact:e,size:t,withLeftIcon:n,withRightIcon:r}){if(e)return Hs[`compact-${t}`];const o=Hs[t];return Vs($n({},o),{paddingLeft:n?o.paddingLeft/1.5:o.paddingLeft,paddingRight:r?o.paddingRight/1.5:o.paddingRight})}const nE=e=>({display:e?"block":"inline-block",width:e?"100%":"auto"});function rE({variant:e,theme:t,color:n,gradient:r}){const o=t.fn.variant({color:n,variant:e,gradient:r});return e==="gradient"?{border:0,backgroundImage:o.background,color:o.color,"&:hover":t.fn.hover({backgroundSize:"200%"})}:$n({border:`1px solid ${o.border}`,backgroundColor:o.background,color:o.color},t.fn.hover({backgroundColor:o.hover}))}var oE=ot((e,{color:t,size:n,radius:r,fullWidth:o,compact:i,gradient:l,variant:a,withLeftIcon:s,withRightIcon:u})=>({root:Vs($n(Vs($n($n($n($n({},tE({compact:i,size:n,withLeftIcon:s,withRightIcon:u})),e.fn.fontStyles()),e.fn.focusStyles()),nE(o)),{borderRadius:e.fn.radius(r),fontWeight:600,position:"relative",lineHeight:1,fontSize:e.fn.size({size:n,sizes:e.fontSizes}),userSelect:"none",cursor:"pointer"}),rE({variant:a,theme:e,color:t,gradient:l})),{"&:active":e.activeStyles,"&:disabled, &[data-disabled]":{borderColor:"transparent",backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],color:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[5],cursor:"not-allowed",backgroundImage:"none",pointerEvents:"none","&:active":{transform:"none"}},"&[data-loading]":{pointerEvents:"none","&::before":{content:'""',position:"absolute",top:-1,left:-1,right:-1,bottom:-1,backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.colors.dark[7],.5):"rgba(255, 255, 255, .5)",borderRadius:e.fn.radius(r),cursor:"not-allowed"}}}),icon:{display:"flex",alignItems:"center"},leftIcon:{marginRight:10},rightIcon:{marginLeft:10},centerLoader:{position:"absolute",left:"50%",transform:"translateX(-50%)",opacity:.5},inner:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",overflow:"visible"},label:{whiteSpace:"nowrap",height:"100%",overflow:"hidden",display:"flex",alignItems:"center"}}));const iE=oE;var lE=Object.defineProperty,pl=Object.getOwnPropertySymbols,Ry=Object.prototype.hasOwnProperty,jy=Object.prototype.propertyIsEnumerable,Md=(e,t,n)=>t in e?lE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ld=(e,t)=>{for(var n in t||(t={}))Ry.call(t,n)&&Md(e,n,t[n]);if(pl)for(var n of pl(t))jy.call(t,n)&&Md(e,n,t[n]);return e},aE=(e,t)=>{var n={};for(var r in e)Ry.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&pl)for(var r of pl(e))t.indexOf(r)<0&&jy.call(e,r)&&(n[r]=e[r]);return n};const sE={size:"sm",type:"button",variant:"filled",loaderPosition:"left"},qu=x.forwardRef((e,t)=>{const n=Qe("Button",sE,e),{className:r,size:o,color:i,type:l,disabled:a,children:s,leftIcon:u,rightIcon:d,fullWidth:m,variant:c,radius:y,uppercase:g,compact:v,loading:E,loaderPosition:p,loaderProps:f,gradient:h,classNames:w,styles:P,unstyled:$}=n,k=aE(n,["className","size","color","type","disabled","children","leftIcon","rightIcon","fullWidth","variant","radius","uppercase","compact","loading","loaderPosition","loaderProps","gradient","classNames","styles","unstyled"]),{classes:b,cx:V,theme:I}=iE({radius:y,color:i,size:o,fullWidth:m,compact:v,gradient:h,variant:c,withLeftIcon:!!u,withRightIcon:!!d},{name:"Button",unstyled:$,classNames:w,styles:P}),Z=I.fn.variant({color:i,variant:c}),ye=j.createElement(yy,Ld({color:Z.color,size:I.fn.size({size:o,sizes:Hs}).height/2},f));return j.createElement(YS,Ld({className:V(b.root,r),type:l,disabled:a,"data-button":!0,"data-disabled":a||void 0,"data-loading":E||void 0,ref:t,unstyled:$},k),j.createElement("div",{className:b.inner},(u||E&&p==="left")&&j.createElement("span",{className:V(b.icon,b.leftIcon)},E&&p==="left"?ye:u),E&&p==="center"&&j.createElement("span",{className:b.centerLoader},ye),j.createElement("span",{className:b.label,style:{textTransform:g?"uppercase":void 0}},s),(d||E&&p==="right")&&j.createElement("span",{className:V(b.icon,b.rightIcon)},E&&p==="right"?ye:d)))});qu.displayName="@mantine/core/Button";qu.Group=$y;const ql=qu;function uE(e){return x.Children.toArray(e).filter(Boolean)}const cE={left:"flex-start",center:"center",right:"flex-end",apart:"space-between"};var fE=ot((e,{spacing:t,position:n,noWrap:r,grow:o,align:i,count:l})=>({root:{boxSizing:"border-box",display:"flex",flexDirection:"row",alignItems:i||"center",flexWrap:r?"nowrap":"wrap",justifyContent:cE[n],gap:e.fn.size({size:t,sizes:e.spacing}),"& > *":{boxSizing:"border-box",maxWidth:o?`calc(${100/l}% - ${e.fn.size({size:t,sizes:e.spacing})-e.fn.size({size:t,sizes:e.spacing})/l}px)`:void 0,flexGrow:o?1:0}}}));const dE=fE;var pE=Object.defineProperty,hl=Object.getOwnPropertySymbols,by=Object.prototype.hasOwnProperty,Ny=Object.prototype.propertyIsEnumerable,Dd=(e,t,n)=>t in e?pE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,hE=(e,t)=>{for(var n in t||(t={}))by.call(t,n)&&Dd(e,n,t[n]);if(hl)for(var n of hl(t))Ny.call(t,n)&&Dd(e,n,t[n]);return e},mE=(e,t)=>{var n={};for(var r in e)by.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&hl)for(var r of hl(e))t.indexOf(r)<0&&Ny.call(e,r)&&(n[r]=e[r]);return n};const yE={position:"left",spacing:"md"},zy=x.forwardRef((e,t)=>{const n=Qe("Group",yE,e),{className:r,position:o,align:i,children:l,noWrap:a,grow:s,spacing:u,unstyled:d}=n,m=mE(n,["className","position","align","children","noWrap","grow","spacing","unstyled"]),c=uE(l),{classes:y,cx:g}=dE({align:i,grow:s,noWrap:a,spacing:u,position:o,count:c.length},{unstyled:d,name:"Group"});return j.createElement(Ge,hE({className:g(y.root,r),ref:t},m),c)});zy.displayName="@mantine/core/Group";var gE=ot((e,{spacing:t,align:n,justify:r})=>({root:{display:"flex",flexDirection:"column",alignItems:n,justifyContent:r,gap:e.fn.size({size:t,sizes:e.spacing})}}));const vE=gE;var wE=Object.defineProperty,ml=Object.getOwnPropertySymbols,Ty=Object.prototype.hasOwnProperty,Iy=Object.prototype.propertyIsEnumerable,Ad=(e,t,n)=>t in e?wE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_E=(e,t)=>{for(var n in t||(t={}))Ty.call(t,n)&&Ad(e,n,t[n]);if(ml)for(var n of ml(t))Iy.call(t,n)&&Ad(e,n,t[n]);return e},SE=(e,t)=>{var n={};for(var r in e)Ty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ml)for(var r of ml(e))t.indexOf(r)<0&&Iy.call(e,r)&&(n[r]=e[r]);return n};const xE={spacing:"md",align:"stretch",justify:"flex-start"},My=x.forwardRef((e,t)=>{const n=Qe("Stack",xE,e),{spacing:r,className:o,align:i,justify:l,unstyled:a}=n,s=SE(n,["spacing","className","align","justify","unstyled"]),{classes:u,cx:d}=vE({spacing:r,align:i,justify:l},{name:"Stack",unstyled:a});return j.createElement(Ge,_E({className:d(u.root,o),ref:t},s))});My.displayName="@mantine/core/Stack";var EE=Object.defineProperty,PE=Object.defineProperties,kE=Object.getOwnPropertyDescriptors,Fd=Object.getOwnPropertySymbols,OE=Object.prototype.hasOwnProperty,CE=Object.prototype.propertyIsEnumerable,Ud=(e,t,n)=>t in e?EE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$E=(e,t)=>{for(var n in t||(t={}))OE.call(t,n)&&Ud(e,n,t[n]);if(Fd)for(var n of Fd(t))CE.call(t,n)&&Ud(e,n,t[n]);return e},RE=(e,t)=>PE(e,kE(t)),jE=ot((e,{color:t})=>{const n=t||(e.colorScheme==="dark"?"dark":"gray"),r=e.fn.variant({color:n,variant:"light"});return{root:RE($E({},e.fn.fontStyles()),{lineHeight:e.lineHeight,padding:`2px calc(${e.spacing.xs}px / 2)`,borderRadius:e.radius.sm,color:e.colorScheme==="dark"?n==="dark"?e.colors.dark[0]:e.white:e.colors.dark[7],backgroundColor:e.colorScheme==="dark"&&n==="dark"?e.colors.dark[5]:r.background,fontFamily:e.fontFamilyMonospace,fontSize:e.fontSizes.xs}),block:{padding:e.spacing.xs,margin:0,overflowX:"auto"}}});const bE=jE;var NE=Object.defineProperty,yl=Object.getOwnPropertySymbols,Ly=Object.prototype.hasOwnProperty,Dy=Object.prototype.propertyIsEnumerable,Bd=(e,t,n)=>t in e?NE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Vd=(e,t)=>{for(var n in t||(t={}))Ly.call(t,n)&&Bd(e,n,t[n]);if(yl)for(var n of yl(t))Dy.call(t,n)&&Bd(e,n,t[n]);return e},zE=(e,t)=>{var n={};for(var r in e)Ly.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&yl)for(var r of yl(e))t.indexOf(r)<0&&Dy.call(e,r)&&(n[r]=e[r]);return n};const Ay=x.forwardRef((e,t)=>{const n=Qe("Code",{},e),{className:r,children:o,block:i,color:l,unstyled:a}=n,s=zE(n,["className","children","block","color","unstyled"]),{classes:u,cx:d}=bE({color:l},{name:"Code",unstyled:a});return i?j.createElement(Ge,Vd({component:"pre",dir:"ltr",className:d(u.root,u.block,r),ref:t},s),o):j.createElement(Ge,Vd({component:"code",className:d(u.root,r),ref:t,dir:"ltr"},s),o)});Ay.displayName="@mantine/core/Code";var TE=Object.defineProperty,IE=Object.defineProperties,ME=Object.getOwnPropertyDescriptors,Hd=Object.getOwnPropertySymbols,LE=Object.prototype.hasOwnProperty,DE=Object.prototype.propertyIsEnumerable,Wd=(e,t,n)=>t in e?TE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,AE=(e,t)=>{for(var n in t||(t={}))LE.call(t,n)&&Wd(e,n,t[n]);if(Hd)for(var n of Hd(t))DE.call(t,n)&&Wd(e,n,t[n]);return e},FE=(e,t)=>IE(e,ME(t)),UE=ot((e,{size:t,radius:n})=>{const r=e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3];return{root:FE(AE({},e.fn.focusStyles()),{width:t,height:t,WebkitTapHighlightColor:"transparent",border:0,borderRadius:e.fn.size({size:n,sizes:e.radius}),appearance:"none",WebkitAppearance:"none",padding:0,position:"relative",overflow:"hidden"}),overlay:{position:"absolute",borderRadius:e.fn.size({size:n,sizes:e.radius}),top:0,left:0,right:0,bottom:0},children:{display:"inline-flex",justifyContent:"center",alignItems:"center"},shadowOverlay:{boxShadow:"rgba(0, 0, 0, .1) 0px 0px 0px 1px inset, rgb(0, 0, 0, .15) 0px 0px 4px inset",zIndex:1},alphaOverlay:{backgroundImage:`linear-gradient(45deg, ${r} 25%, transparent 25%), linear-gradient(-45deg, ${r} 25%, transparent 25%), linear-gradient(45deg, transparent 75%, ${r} 75%), linear-gradient(-45deg, ${e.colorScheme==="dark"?e.colors.dark[7]:e.white} 75%, ${r} 75%)`,backgroundSize:"8px 8px",backgroundPosition:"0 0, 0 4px, 4px -4px, -4px 0px"}}});const BE=UE;var VE=Object.defineProperty,gl=Object.getOwnPropertySymbols,Fy=Object.prototype.hasOwnProperty,Uy=Object.prototype.propertyIsEnumerable,Gd=(e,t,n)=>t in e?VE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,HE=(e,t)=>{for(var n in t||(t={}))Fy.call(t,n)&&Gd(e,n,t[n]);if(gl)for(var n of gl(t))Uy.call(t,n)&&Gd(e,n,t[n]);return e},WE=(e,t)=>{var n={};for(var r in e)Fy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&gl)for(var r of gl(e))t.indexOf(r)<0&&Uy.call(e,r)&&(n[r]=e[r]);return n};const GE={size:25,radius:25,withShadow:!0},By=x.forwardRef((e,t)=>{const n=Qe("ColorSwatch",GE,e),{color:r,size:o,radius:i,className:l,children:a,classNames:s,styles:u,unstyled:d,withShadow:m}=n,c=WE(n,["color","size","radius","className","children","classNames","styles","unstyled","withShadow"]),{classes:y,cx:g}=BE({radius:i,size:o},{classNames:s,styles:u,unstyled:d,name:"ColorSwatch"});return j.createElement(Ge,HE({className:g(y.root,l),ref:t},c),j.createElement("div",{className:g(y.alphaOverlay,y.overlay)}),m&&j.createElement("div",{className:g(y.shadowOverlay,y.overlay)}),j.createElement("div",{className:y.overlay,style:{backgroundColor:r}}),j.createElement("div",{className:g(y.children,y.overlay)},a))});By.displayName="@mantine/core/ColorSwatch";const QE=By;var KE=ot((e,{fluid:t,size:n,sizes:r})=>({root:{paddingLeft:e.spacing.md,paddingRight:e.spacing.md,maxWidth:t?"100%":e.fn.size({size:n,sizes:r}),marginLeft:"auto",marginRight:"auto"}}));const XE=KE;var YE=Object.defineProperty,vl=Object.getOwnPropertySymbols,Vy=Object.prototype.hasOwnProperty,Hy=Object.prototype.propertyIsEnumerable,Qd=(e,t,n)=>t in e?YE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ZE=(e,t)=>{for(var n in t||(t={}))Vy.call(t,n)&&Qd(e,n,t[n]);if(vl)for(var n of vl(t))Hy.call(t,n)&&Qd(e,n,t[n]);return e},JE=(e,t)=>{var n={};for(var r in e)Vy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&vl)for(var r of vl(e))t.indexOf(r)<0&&Hy.call(e,r)&&(n[r]=e[r]);return n};const qE={sizes:{xs:540,sm:720,md:960,lg:1140,xl:1320}},Wy=x.forwardRef((e,t)=>{const n=Qe("Container",qE,e),{className:r,fluid:o,size:i,unstyled:l,sizes:a}=n,s=JE(n,["className","fluid","size","unstyled","sizes"]),{classes:u,cx:d}=XE({fluid:o,size:i,sizes:a},{unstyled:l,name:"Container"});return j.createElement(Ge,ZE({className:d(u.root,r),ref:t},s))});Wy.displayName="@mantine/core/Container";const[eP,tP]=aw("Grid component was not found in tree");var nP=Object.defineProperty,Kd=Object.getOwnPropertySymbols,rP=Object.prototype.hasOwnProperty,oP=Object.prototype.propertyIsEnumerable,Xd=(e,t,n)=>t in e?nP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,iP=(e,t)=>{for(var n in t||(t={}))rP.call(t,n)&&Xd(e,n,t[n]);if(Kd)for(var n of Kd(t))oP.call(t,n)&&Xd(e,n,t[n]);return e};const ec=(e,t)=>e==="content"?"auto":e==="auto"?"0px":e?`${100/(t/e)}%`:void 0,Gy=(e,t,n)=>n||e==="auto"||e==="content"?"unset":ec(e,t),Qy=(e,t)=>{if(e)return e==="auto"||t?1:0},Ky=(e,t)=>e===0?0:e?`${100/(t/e)}%`:void 0,Xy=(e,t)=>typeof e<"u"?t.fn.size({size:e,sizes:t.spacing})/2:void 0;function lP({sizes:e,offsets:t,orders:n,theme:r,columns:o,gutters:i,grow:l}){return Lm.reduce((a,s)=>(a[`@media (min-width: ${r.breakpoints[s]}px)`]={order:n[s],flexBasis:ec(e[s],o),padding:Xy(i[s],r),flexShrink:0,width:e[s]==="content"?"auto":void 0,maxWidth:Gy(e[s],o,l),marginLeft:Ky(t[s],o),flexGrow:Qy(e[s],l)},a),{})}var aP=ot((e,{gutter:t,gutterXs:n,gutterSm:r,gutterMd:o,gutterLg:i,gutterXl:l,grow:a,offset:s,offsetXs:u,offsetSm:d,offsetMd:m,offsetLg:c,offsetXl:y,columns:g,span:v,xs:E,sm:p,md:f,lg:h,xl:w,order:P,orderXs:$,orderSm:k,orderMd:b,orderLg:V,orderXl:I})=>({col:iP({boxSizing:"border-box",flexGrow:Qy(v,a),order:P,padding:Xy(t,e),marginLeft:Ky(s,g),flexBasis:ec(v,g),flexShrink:0,width:v==="content"?"auto":void 0,maxWidth:Gy(v,g,a)},lP({sizes:{xs:E,sm:p,md:f,lg:h,xl:w},offsets:{xs:u,sm:d,md:m,lg:c,xl:y},orders:{xs:$,sm:k,md:b,lg:V,xl:I},gutters:{xs:n,sm:r,md:o,lg:i,xl:l},theme:e,columns:g,grow:a}))}));const sP=aP;var uP=Object.defineProperty,wl=Object.getOwnPropertySymbols,Yy=Object.prototype.hasOwnProperty,Zy=Object.prototype.propertyIsEnumerable,Yd=(e,t,n)=>t in e?uP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cP=(e,t)=>{for(var n in t||(t={}))Yy.call(t,n)&&Yd(e,n,t[n]);if(wl)for(var n of wl(t))Zy.call(t,n)&&Yd(e,n,t[n]);return e},fP=(e,t)=>{var n={};for(var r in e)Yy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&wl)for(var r of wl(e))t.indexOf(r)<0&&Zy.call(e,r)&&(n[r]=e[r]);return n};const dP={};function pP(e){return e==="auto"||e==="content"?!0:typeof e=="number"&&e>0&&e%1===0}const Jy=x.forwardRef((e,t)=>{const n=Qe("GridCol",dP,e),{children:r,span:o,offset:i,offsetXs:l,offsetSm:a,offsetMd:s,offsetLg:u,offsetXl:d,xs:m,sm:c,md:y,lg:g,xl:v,order:E,orderXs:p,orderSm:f,orderMd:h,orderLg:w,orderXl:P,className:$,id:k,unstyled:b}=n,V=fP(n,["children","span","offset","offsetXs","offsetSm","offsetMd","offsetLg","offsetXl","xs","sm","md","lg","xl","order","orderXs","orderSm","orderMd","orderLg","orderXl","className","id","unstyled"]),I=tP(),Z=o||I.columns,{classes:ye,cx:Ke}=sP({gutter:I.gutter,gutterXs:I.gutterXs,gutterSm:I.gutterSm,gutterMd:I.gutterMd,gutterLg:I.gutterLg,gutterXl:I.gutterXl,offset:i,offsetXs:l,offsetSm:a,offsetMd:s,offsetLg:u,offsetXl:d,xs:m,sm:c,md:y,lg:g,xl:v,order:E,orderXs:p,orderSm:f,orderMd:h,orderLg:w,orderXl:P,grow:I.grow,columns:I.columns,span:Z},{unstyled:b,name:"Grid"});return!pP(Z)||Z>I.columns?null:j.createElement(Ge,cP({className:Ke(ye.col,$),ref:t},V),r)});Jy.displayName="@mantine/core/Col";var hP=Object.defineProperty,Zd=Object.getOwnPropertySymbols,mP=Object.prototype.hasOwnProperty,yP=Object.prototype.propertyIsEnumerable,Jd=(e,t,n)=>t in e?hP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gP=(e,t)=>{for(var n in t||(t={}))mP.call(t,n)&&Jd(e,n,t[n]);if(Zd)for(var n of Zd(t))yP.call(t,n)&&Jd(e,n,t[n]);return e};function vP(e,t){return Lm.reduce((n,r)=>(typeof e[r]<"u"&&(n[`@media (min-width: ${t.breakpoints[r]}px)`]={margin:-t.fn.size({size:e[r],sizes:t.spacing})/2}),n),{})}var wP=ot((e,{justify:t,align:n,gutter:r,gutterXs:o,gutterSm:i,gutterMd:l,gutterLg:a,gutterXl:s})=>({root:gP({margin:-e.fn.size({size:r,sizes:e.spacing})/2,display:"flex",flexWrap:"wrap",justifyContent:t,alignItems:n},vP({xs:o,sm:i,md:l,lg:a,xl:s},e))}));const _P=wP;var SP=Object.defineProperty,_l=Object.getOwnPropertySymbols,qy=Object.prototype.hasOwnProperty,eg=Object.prototype.propertyIsEnumerable,qd=(e,t,n)=>t in e?SP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xP=(e,t)=>{for(var n in t||(t={}))qy.call(t,n)&&qd(e,n,t[n]);if(_l)for(var n of _l(t))eg.call(t,n)&&qd(e,n,t[n]);return e},EP=(e,t)=>{var n={};for(var r in e)qy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&_l)for(var r of _l(e))t.indexOf(r)<0&&eg.call(e,r)&&(n[r]=e[r]);return n};const PP={gutter:"md",justify:"flex-start",align:"stretch",columns:12},ao=x.forwardRef((e,t)=>{const n=Qe("Grid",PP,e),{gutter:r,gutterXs:o,gutterSm:i,gutterMd:l,gutterLg:a,gutterXl:s,children:u,grow:d,justify:m,align:c,columns:y,className:g,id:v,unstyled:E}=n,p=EP(n,["gutter","gutterXs","gutterSm","gutterMd","gutterLg","gutterXl","children","grow","justify","align","columns","className","id","unstyled"]),{classes:f,cx:h}=_P({gutter:r,justify:m,align:c,gutterXs:o,gutterSm:i,gutterMd:l,gutterLg:a,gutterXl:s},{unstyled:E,name:"Grid"});return j.createElement(eP,{value:{gutter:r,gutterXs:o,gutterSm:i,gutterMd:l,gutterLg:a,gutterXl:s,grow:d,columns:y}},j.createElement(Ge,xP({className:h(f.root,g),ref:t},p),u))});ao.Col=Jy;ao.displayName="@mantine/core/Grid";var kP=Object.defineProperty,OP=Object.defineProperties,CP=Object.getOwnPropertyDescriptors,ep=Object.getOwnPropertySymbols,$P=Object.prototype.hasOwnProperty,RP=Object.prototype.propertyIsEnumerable,tp=(e,t,n)=>t in e?kP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jP=(e,t)=>{for(var n in t||(t={}))$P.call(t,n)&&tp(e,n,t[n]);if(ep)for(var n of ep(t))RP.call(t,n)&&tp(e,n,t[n]);return e},bP=(e,t)=>OP(e,CP(t)),NP=ot((e,{captionSide:t,horizontalSpacing:n,verticalSpacing:r,fontSize:o,withBorder:i,withColumnBorders:l})=>{const a=`1px solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`;return{root:bP(jP({},e.fn.fontStyles()),{width:"100%",borderCollapse:"collapse",captionSide:t,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,lineHeight:e.lineHeight,border:i?a:"","& caption":{marginTop:t==="top"?0:e.spacing.xs,marginBottom:t==="bottom"?0:e.spacing.xs,fontSize:e.fontSizes.sm,color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]},"& thead tr th, & tfoot tr th":{textAlign:"left",fontWeight:"bold",color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],fontSize:e.fn.size({size:o,sizes:e.fontSizes}),padding:`${e.fn.size({size:r,sizes:e.spacing})}px ${e.fn.size({size:n,sizes:e.spacing})}px`},"& thead tr th":{borderBottom:a},"& tfoot tr th":{borderTop:a},"& tbody tr td":{padding:`${e.fn.size({size:r,sizes:e.spacing})}px ${e.fn.size({size:n,sizes:e.spacing})}px`,borderTop:a,fontSize:e.fn.size({size:o,sizes:e.fontSizes})},"& tbody tr:first-of-type td":{borderTop:"none"},"& thead th, & tbody td":{borderRight:l?a:"none","&:last-of-type":{borderRight:"none",borderLeft:l?a:"none"}},"&[data-striped] tbody tr:nth-of-type(odd)":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0]},"&[data-hover] tbody tr":e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]})})}});const zP=NP;var TP=Object.defineProperty,IP=Object.defineProperties,MP=Object.getOwnPropertyDescriptors,Sl=Object.getOwnPropertySymbols,tg=Object.prototype.hasOwnProperty,ng=Object.prototype.propertyIsEnumerable,np=(e,t,n)=>t in e?TP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,LP=(e,t)=>{for(var n in t||(t={}))tg.call(t,n)&&np(e,n,t[n]);if(Sl)for(var n of Sl(t))ng.call(t,n)&&np(e,n,t[n]);return e},DP=(e,t)=>IP(e,MP(t)),AP=(e,t)=>{var n={};for(var r in e)tg.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Sl)for(var r of Sl(e))t.indexOf(r)<0&&ng.call(e,r)&&(n[r]=e[r]);return n};const FP={striped:!1,highlightOnHover:!1,captionSide:"top",horizontalSpacing:"xs",fontSize:"sm",verticalSpacing:7,withBorder:!1,withColumnBorders:!1},rg=x.forwardRef((e,t)=>{const n=Qe("Table",FP,e),{className:r,children:o,striped:i,highlightOnHover:l,captionSide:a,horizontalSpacing:s,verticalSpacing:u,fontSize:d,unstyled:m,withBorder:c,withColumnBorders:y}=n,g=AP(n,["className","children","striped","highlightOnHover","captionSide","horizontalSpacing","verticalSpacing","fontSize","unstyled","withBorder","withColumnBorders"]),{classes:v,cx:E}=zP({captionSide:a,verticalSpacing:u,horizontalSpacing:s,fontSize:d,withBorder:c,withColumnBorders:y},{unstyled:m,name:"Table"});return j.createElement(Ge,DP(LP({},g),{component:"table",ref:t,className:E(v.root,r),"data-striped":i||void 0,"data-hover":l||void 0}),o)});rg.displayName="@mantine/core/Table";class rp extends Error{constructor(n,r,o){super(o);Ae(this,"url");Ae(this,"status");Ae(this,"statusText");Ae(this,"body");Ae(this,"request");this.name="ApiError",this.url=r.url,this.status=r.status,this.statusText=r.statusText,this.body=r.body,this.request=n}}class UP extends Error{constructor(t){super(t),this.name="CancelError"}get isCancelled(){return!0}}var m2;class BP{constructor(t){Ae(this,m2);Ae(this,"_isResolved");Ae(this,"_isRejected");Ae(this,"_isCancelled");Ae(this,"_cancelHandlers");Ae(this,"_promise");Ae(this,"_resolve");Ae(this,"_reject");this._isResolved=!1,this._isRejected=!1,this._isCancelled=!1,this._cancelHandlers=[],this._promise=new Promise((n,r)=>{this._resolve=n,this._reject=r;const o=a=>{var s;this._isResolved||this._isRejected||this._isCancelled||(this._isResolved=!0,(s=this._resolve)==null||s.call(this,a))},i=a=>{var s;this._isResolved||this._isRejected||this._isCancelled||(this._isRejected=!0,(s=this._reject)==null||s.call(this,a))},l=a=>{this._isResolved||this._isRejected||this._isCancelled||this._cancelHandlers.push(a)};return Object.defineProperty(l,"isResolved",{get:()=>this._isResolved}),Object.defineProperty(l,"isRejected",{get:()=>this._isRejected}),Object.defineProperty(l,"isCancelled",{get:()=>this._isCancelled}),t(o,i,l)})}then(t,n){return this._promise.then(t,n)}catch(t){return this._promise.catch(t)}finally(t){return this._promise.finally(t)}cancel(){var t;if(!(this._isResolved||this._isRejected||this._isCancelled)){if(this._isCancelled=!0,this._cancelHandlers.length)try{for(const n of this._cancelHandlers)n()}catch(n){console.warn("Cancellation threw an error",n);return}this._cancelHandlers.length=0,(t=this._reject)==null||t.call(this,new UP("Request aborted"))}}get isCancelled(){return this._isCancelled}}m2=Symbol.toStringTag;const It={BASE:"",VERSION:"0.1.0",WITH_CREDENTIALS:!1,CREDENTIALS:"include",TOKEN:void 0,USERNAME:void 0,PASSWORD:void 0,HEADERS:void 0,ENCODE_PATH:void 0};var qt=(e=>(e.THROUGH="through",e.DIVERGING="diverging",e.CONVERGING="converging",e))(qt||{}),gr=(e=>(e.STRAIGHT="straight",e.CURVE="curve",e))(gr||{}),an=(e=>(e.A="A",e.B="B",e))(an||{});const tc=e=>e!=null,Fo=e=>typeof e=="string",Fa=e=>Fo(e)&&e!=="",nc=e=>typeof e=="object"&&typeof e.type=="string"&&typeof e.stream=="function"&&typeof e.arrayBuffer=="function"&&typeof e.constructor=="function"&&typeof e.constructor.name=="string"&&/^(Blob|File)$/.test(e.constructor.name)&&/^(Blob|File)$/.test(e[Symbol.toStringTag]),og=e=>e instanceof FormData,VP=e=>{try{return btoa(e)}catch{return Buffer.from(e).toString("base64")}},HP=e=>{const t=[],n=(o,i)=>{t.push(`${encodeURIComponent(o)}=${encodeURIComponent(String(i))}`)},r=(o,i)=>{tc(i)&&(Array.isArray(i)?i.forEach(l=>{r(o,l)}):typeof i=="object"?Object.entries(i).forEach(([l,a])=>{r(`${o}[${l}]`,a)}):n(o,i))};return Object.entries(e).forEach(([o,i])=>{r(o,i)}),t.length>0?`?${t.join("&")}`:""},WP=(e,t)=>{const n=e.ENCODE_PATH||encodeURI,r=t.url.replace("{api-version}",e.VERSION).replace(/{(.*?)}/g,(i,l)=>{var a;return(a=t.path)!=null&&a.hasOwnProperty(l)?n(String(t.path[l])):i}),o=`${e.BASE}${r}`;return t.query?`${o}${HP(t.query)}`:o},GP=e=>{if(e.formData){const t=new FormData,n=(r,o)=>{Fo(o)||nc(o)?t.append(r,o):t.append(r,JSON.stringify(o))};return Object.entries(e.formData).filter(([r,o])=>tc(o)).forEach(([r,o])=>{Array.isArray(o)?o.forEach(i=>n(r,i)):n(r,o)}),t}},pi=async(e,t)=>typeof t=="function"?t(e):t,QP=async(e,t)=>{const n=await pi(t,e.TOKEN),r=await pi(t,e.USERNAME),o=await pi(t,e.PASSWORD),i=await pi(t,e.HEADERS),l=Object.entries({Accept:"application/json",...i,...t.headers}).filter(([a,s])=>tc(s)).reduce((a,[s,u])=>({...a,[s]:String(u)}),{});if(Fa(n)&&(l.Authorization=`Bearer ${n}`),Fa(r)&&Fa(o)){const a=VP(`${r}:${o}`);l.Authorization=`Basic ${a}`}return t.body&&(t.mediaType?l["Content-Type"]=t.mediaType:nc(t.body)?l["Content-Type"]=t.body.type||"application/octet-stream":Fo(t.body)?l["Content-Type"]="text/plain":og(t.body)||(l["Content-Type"]="application/json")),new Headers(l)},KP=e=>{var t;if(e.body)return(t=e.mediaType)!=null&&t.includes("/json")?JSON.stringify(e.body):Fo(e.body)||nc(e.body)||og(e.body)?e.body:JSON.stringify(e.body)},XP=async(e,t,n,r,o,i,l)=>{const a=new AbortController,s={headers:i,body:r??o,method:t.method,signal:a.signal};return e.WITH_CREDENTIALS&&(s.credentials=e.CREDENTIALS),l(()=>a.abort()),await fetch(n,s)},YP=(e,t)=>{if(t){const n=e.headers.get(t);if(Fo(n))return n}},ZP=async e=>{if(e.status!==204)try{const t=e.headers.get("Content-Type");if(t)return t.toLowerCase().startsWith("application/json")?await e.json():await e.text()}catch(t){console.error(t)}},JP=(e,t)=>{const r={400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable",...e.errors}[t.status];if(r)throw new rp(e,t,r);if(!t.ok)throw new rp(e,t,"Generic Error")},Mt=(e,t)=>new BP(async(n,r,o)=>{try{const i=WP(e,t),l=GP(t),a=KP(t),s=await QP(e,t);if(!o.isCancelled){const u=await XP(e,t,i,a,l,s,o),d=await ZP(u),m=YP(u,t.responseHeader),c={url:i,ok:u.ok,status:u.status,statusText:u.statusText,body:m??d};JP(t,c),n(c.body)}}catch(i){r(i)}});class Qt{static hello(){return Mt(It,{method:"GET",url:"/api/hello"})}static getState(){return Mt(It,{method:"GET",url:"/api/state"})}static moveTrain(t,n){return Mt(It,{method:"POST",url:"/api/state/trains/{train_id}/move",path:{train_id:t},body:n,mediaType:"application/json",errors:{422:"Validation Error"}})}static putTrain(t,n){return Mt(It,{method:"POST",url:"/api/state/trains/{train_id}/put",path:{train_id:t},body:n,mediaType:"application/json",errors:{422:"Validation Error"}})}static updateJunction(t,n){return Mt(It,{method:"POST",url:"/api/state/junctions/{junction_id}/update",path:{junction_id:t},body:n,mediaType:"application/json",errors:{422:"Validation Error"}})}static detectObstacle(t){return Mt(It,{method:"POST",url:"/api/state/obstacles/{obstacle_id}/detect",path:{obstacle_id:t},errors:{422:"Validation Error"}})}static clearObstacle(t){return Mt(It,{method:"POST",url:"/api/state/obstacles/{obstacle_id}/clear",path:{obstacle_id:t},errors:{422:"Validation Error"}})}static blockSection(t){return Mt(It,{method:"POST",url:"/api/state/sections/{section_id}/block",path:{section_id:t},errors:{422:"Validation Error"}})}static unblockSection(t){return Mt(It,{method:"POST",url:"/api/state/sections/{section_id}/unblock",path:{section_id:t},errors:{422:"Validation Error"}})}}const qP=({children:e})=>R.jsx(ky,{padding:"md",header:R.jsx(xy,{height:60,p:"md",sx:t=>({display:"flex",alignItems:"center",backgroundColor:t.colors.blue[5],fontSize:18,color:t.white,fontWeight:700}),children:"Plarailers Train Control System"}),children:e}),Et=x.createContext(null),Wn=x.createContext(null),e2=({position:e})=>R.jsx("rect",{x:e.x-60/2,y:e.y-20/2,width:60,height:20,fill:"white"}),t2=({id:e,points:t})=>{const n=x.useContext(Et);if(!n)return null;const r=n.sections[e],o=op(t[0],t[1],4),i=t.length,l=op(t[i-1],t[i-2],4),a=[o,...t.slice(1,-1),l];return R.jsx("polyline",{points:a.map(s=>`${s.x},${s.y}`).join(" "),fill:"none",stroke:r.is_blocked?"red":"white",strokeWidth:r.is_blocked?4:2,strokeLinecap:"square"})},op=(e,t,n)=>({x:e.x+(t.x-e.x)/Math.hypot(t.x-e.x,t.y-e.y)*n,y:e.y+(t.y-e.y)/Math.hypot(t.x-e.x,t.y-e.y)*n}),ip=e=>{const t=Math.hypot(e.x,e.y);return{x:e.x/t,y:e.y/t}},zn=(e,t)=>{let n=0;for(let o=0;o=a)r-=a;else return{position:{x:i.x+(l.x-i.x)*(r/a),y:i.y+(l.y-i.y)*(r/a)},direction:{x:l.x-i.x,y:l.y-i.y},partitionIndex:o+1}}{const o=t[t.length-2],i=t[t.length-1];return{position:i,direction:{x:i.x-o.x,y:i.y-o.y},partitionIndex:t.length}}},n2=({id:e})=>{const t=dt(),n=x.useContext(Et),r=x.useContext(Wn);if(!(n&&r))return null;const o=n.trains[e],{position:i,angle:l}=lp(o.head_position,n,r),{position:a,angle:s}=lp(o.tail_position,n,r),u=r2(o,n,r),d=r.trains[e];return R.jsxs(R.Fragment,{children:[R.jsx("polyline",{points:u.map(m=>`${m.x},${m.y}`).join(" "),fill:"none",stroke:d.fill,strokeWidth:4,strokeLinecap:"round",strokeLinejoin:"miter"}),R.jsxs("g",{transform:`translate(${i.x}, ${i.y})`,children:[R.jsx("g",{transform:`rotate(${l})`,children:R.jsx("polyline",{points:"-5,5 0,5 5,0 0,-5 -5,-5",fill:d.fill,stroke:d.stroke})}),o.departure_time!=null&&R.jsx("g",{transform:`translate(${0}, ${-10})`,children:R.jsx("text",{textAnchor:"middle",fill:t.colors.gray[5],children:o.departure_time-n.current_time})})]}),R.jsx("g",{transform:`translate(${a.x}, ${a.y})`,children:R.jsx("g",{transform:`rotate(${s})`,children:R.jsx("polyline",{points:"0,-5 -5,-5 -5,5 0,5",fill:d.fill,stroke:d.stroke})})})]})},lp=(e,t,n)=>{const r=t.sections[e.section_id],o=n.sections[e.section_id],{position:i,direction:l}=zn(e.mileage/r.length,o.points);e.target_junction_id===r.connected_junction_ids[an.A]&&(l.x*=-1,l.y*=-1);const a=Math.atan2(l.y,l.x)/Math.PI*180;return{position:i,angle:a}},r2=(e,t,n)=>{const r=[];if(e.head_position.section_id===e.tail_position.section_id){const o=t.sections[e.tail_position.section_id],i=n.sections[e.tail_position.section_id],{position:l,direction:a,partitionIndex:s}=zn(e.tail_position.mileage/o.length,i.points);e.tail_position.target_junction_id===o.connected_junction_ids[an.A]&&(a.x*=-1,a.y*=-1);const u=t.sections[e.head_position.section_id],d=n.sections[e.head_position.section_id],{position:m,direction:c,partitionIndex:y}=zn(e.head_position.mileage/u.length,d.points);e.head_position.target_junction_id===u.connected_junction_ids[an.A]&&(c.x*=-1,c.y*=-1),y<=s?r.push(m,...d.points.slice(y,s),l):r.push(l,...d.points.slice(s,y),m)}else{const o=t.sections[e.tail_position.section_id],i=n.sections[e.tail_position.section_id],{position:l,direction:a,partitionIndex:s}=zn(e.tail_position.mileage/o.length,i.points);e.tail_position.target_junction_id===o.connected_junction_ids[an.B]?r.push(l,...i.points.slice(s)):(a.x*=-1,a.y*=-1,r.push(l,...i.points.slice(0,s).reverse()));for(const g of e.covered_section_ids){const v=n.sections[g];v.points[0].x===r[r.length-1].x&&v.points[0].y===r[r.length-1].y?r.push(...v.points):r.push(...v.points.slice().reverse())}const u=t.sections[e.head_position.section_id],d=n.sections[e.head_position.section_id],{position:m,direction:c,partitionIndex:y}=zn(e.head_position.mileage/u.length,d.points);e.head_position.target_junction_id===u.connected_junction_ids[an.B]?r.push(...d.points.slice(0,y),m):(c.x*=-1,c.y*=-1,r.push(...d.points.slice(y).reverse(),m))}return r},o2=({id:e,position:t})=>{const n=dt(),r=x.useContext(Et),o=x.useContext(Wn);if(!(r&&o))return null;const i=r.junctions[e],l={};for(const u of[qt.CONVERGING,qt.THROUGH,qt.DIVERGING]){const d=i.connected_section_ids[u],m=r.sections[d];if(e===m.connected_junction_ids[an.A]){const c=o.sections[d].points,y=c[0],g=c[1];l[u]=ip({x:g.x-y.x,y:g.y-y.y})}else if(e===m.connected_junction_ids[an.B]){const c=o.sections[d].points,y=c[c.length-1],g=c[c.length-2];l[u]=ip({x:g.x-y.x,y:g.y-y.y})}}let a;switch(i.current_direction){case gr.STRAIGHT:{a=qt.THROUGH;break}case gr.CURVE:{a=qt.DIVERGING;break}}const s=6;return R.jsxs("g",{transform:`translate(${t.x}, ${t.y})`,children:[R.jsx("circle",{cx:0,cy:0,r:s,fill:n.white,stroke:n.colors.gray[6]}),R.jsx("polyline",{points:[{x:l[qt.CONVERGING].x*s,y:l[qt.CONVERGING].y*s},{x:0,y:0},{x:l[a].x*s,y:l[a].y*s}].map(u=>`${u.x},${u.y}`).join(" "),fill:"none",stroke:n.colors.blue[7],strokeWidth:4})]})},i2=({id:e})=>{const t=dt(),n=x.useContext(Et),r=x.useContext(Wn);if(!(n&&r))return null;const o=n.stops[e],i=n.sections[o.position.section_id],l=r.sections[o.position.section_id],{position:a,direction:s}=zn(o.position.mileage/i.length,l.points),u=Math.atan2(s.y,s.x)/Math.PI*180;return R.jsx("g",{transform:`translate(${a.x}, ${a.y})`,children:R.jsx("g",{transform:`rotate(${u+180})`,children:R.jsxs("g",{transform:"translate(0, -10)",children:[R.jsx("polyline",{points:"0,0 0,10",stroke:t.colors.dark[2],strokeWidth:2}),R.jsx("polygon",{points:"-5,0 0,5 5,0 0,-5",fill:t.white,stroke:t.colors.red[7],strokeWidth:2})]})})})},l2=({id:e})=>{const t=dt(),n=x.useContext(Et),r=x.useContext(Wn);if(!(n&&r))return null;const o=n.obstacles[e];if(!o.is_detected)return null;const i=n.sections[o.position.section_id],l=r.sections[o.position.section_id],{position:a,direction:s}=zn(o.position.mileage/i.length,l.points),u=Math.atan2(s.y,s.x)/Math.PI*180;return R.jsx("g",{transform:`translate(${a.x}, ${a.y})`,children:R.jsx("g",{transform:`rotate(${u})`,children:R.jsxs("g",{children:[R.jsx("polyline",{points:"-10,-10 10,10",stroke:t.colors.red[8],strokeWidth:6}),R.jsx("polyline",{points:"-10,10 10,-10",stroke:t.colors.red[8],strokeWidth:6}),R.jsx("animate",{attributeName:"opacity",values:"1;0;1;1;1;1",dur:"2s",repeatCount:"indefinite"})]})})})},a2=({children:e})=>{const t=dt(),n=x.useContext(Et),r=x.useContext(Wn);return n&&r?R.jsxs("svg",{width:"100%",viewBox:`0 0 ${r.width} ${r.height}`,children:[R.jsx("rect",{width:r.width,height:r.height,fill:t.colors.dark[7]}),Object.entries(r.platforms).map(([o,i])=>R.jsx(e2,{position:i.position},o)),Object.entries(r.stops).filter(([o,i])=>n.stops[o]).map(([o,i])=>R.jsx(i2,{id:o},o)),Object.entries(r.sections).filter(([o,i])=>n.sections[o]).map(([o,i])=>R.jsx(t2,{id:o,points:i.points},o)),Object.entries(r.junctions).filter(([o,i])=>n.junctions[o]).map(([o,i])=>R.jsx(o2,{id:o,position:i.position},o)),Object.entries(r.obstacles).filter(([o,i])=>n.obstacles[o]).map(([o,i])=>R.jsx(l2,{id:o},o)),Object.entries(r.trains).filter(([o,i])=>n.trains[o]).map(([o,i])=>R.jsx(n2,{id:o},o)),e]}):null},s2=()=>R.jsx("div",{children:R.jsxs(zy,{children:[R.jsx(ap,{id:"t0",delta:10}),R.jsx(ap,{id:"t1",delta:10}),R.jsx(hi,{id:"j0"}),R.jsx(hi,{id:"j1"}),R.jsx(hi,{id:"j2"}),R.jsx(hi,{id:"j3"}),R.jsx(u2,{id:"obstacle_0"}),R.jsx(c2,{id:"s3"})]})}),ap=({id:e,delta:t})=>R.jsxs(ql,{styles:n=>({label:{fontFamily:n.fontFamilyMonospace}}),onClick:()=>{Qt.moveTrain(e,{delta:t})},children:["MoveTrain(",e,", ",t,")"]},e),hi=({id:e})=>{const t=x.useContext(Et);if(!t)return null;const n=t.junctions[e];return R.jsxs(ql,{styles:r=>({label:{fontFamily:r.fontFamilyMonospace}}),onClick:()=>{n.current_direction==gr.STRAIGHT?Qt.updateJunction(e,{direction:gr.CURVE}):Qt.updateJunction(e,{direction:gr.STRAIGHT})},children:["ToggleJunction(",e,")"]},e)},u2=({id:e})=>{const t=x.useContext(Et);if(!t)return null;const n=t.obstacles[e];return R.jsx(ql,{variant:n.is_detected?"filled":"light",color:"red",styles:r=>({label:{fontFamily:r.fontFamilyMonospace}}),onClick:()=>{n.is_detected?Qt.clearObstacle(e):Qt.detectObstacle(e)},children:n.is_detected?`ClearObstacle(${e})`:`DetectObstacle(${e})`})},c2=({id:e})=>{const t=x.useContext(Et);if(!t)return null;const n=t.sections[e];return R.jsx(ql,{variant:n.is_blocked?"filled":"light",color:"red",styles:r=>({label:{fontFamily:r.fontFamilyMonospace}}),onClick:()=>{n.is_blocked?Qt.unblockSection(e):Qt.blockSection(e)},children:n.is_blocked?`UnblockSection(${e})`:`BlockSection(${e})`})},f2=()=>{const e=x.useContext(Et),t=x.useContext(Wn);return e&&t?R.jsxs(rg,{sx:n=>({fontFamily:n.fontFamilyMonospace}),children:[R.jsx("thead",{children:R.jsxs("tr",{children:[R.jsx("th",{}),R.jsx("th",{children:"train"}),R.jsx("th",{children:"speed"})]})}),R.jsx("tbody",{children:e&&Object.entries(e.trains).filter(([n,r])=>t.trains[n]).map(([n,r])=>R.jsxs("tr",{children:[R.jsx("td",{children:R.jsx(QE,{color:t.trains[n].fill})}),R.jsx("td",{children:n}),R.jsx("td",{children:r.speed_command.toFixed(2)})]},n))})]}):null},d2={width:440,height:340,platforms:{},junctions:{j0:{position:{x:400,y:160}},j1:{position:{x:360,y:200}},j2:{position:{x:280,y:280}},j3:{position:{x:260,y:300}}},sections:{s0:{from:"j0",to:"j3",points:[{x:400,y:160},{x:400,y:280},{x:380,y:300},{x:260,y:300}]},s1:{from:"j3",to:"j0",points:[{x:260,y:300},{x:60,y:300},{x:40,y:280},{x:40,y:220},{x:220,y:40},{x:380,y:40},{x:400,y:60},{x:400,y:160}]},s2:{from:"j1",to:"j2",points:[{x:360,y:200},{x:360,y:250},{x:330,y:280},{x:280,y:280}]},s3:{from:"j2",to:"j1",points:[{x:280,y:280},{x:110,y:280},{x:80,y:250},{x:80,y:110},{x:110,y:80},{x:330,y:80},{x:360,y:110},{x:360,y:200}]},s4:{from:"j0",to:"j1",points:[{x:400,y:160},{x:360,y:200}]},s5:{from:"j2",to:"j3",points:[{x:280,y:280},{x:260,y:300}]}},trains:{t0:{fill:Xe.colors.yellow[4],stroke:Xe.colors.yellow[9]},t1:{fill:Xe.colors.green[5],stroke:Xe.colors.green[9]},t2:{fill:Xe.colors.cyan[4],stroke:Xe.colors.cyan[9]},t3:{fill:Xe.colors.indigo[5],stroke:Xe.colors.indigo[9]},t4:{fill:Xe.colors.red[5],stroke:Xe.colors.red[9]}},stops:{stop_0:{},stop_1:{}},obstacles:{obstacle_0:{}}},p2=()=>{const e=dt(),[t,n]=x.useState(null),[r,o]=x.useState(()=>new Date);return x.useEffect(()=>{Qt.getState().then(i=>{o(new Date),n(i)})},[]),x.useEffect(()=>{const i=setInterval(()=>{Qt.getState().then(l=>{o(new Date),n(l)})},500);return()=>{clearInterval(i)}},[]),R.jsx(Et.Provider,{value:t,children:R.jsx(Wn.Provider,{value:d2,children:R.jsx(qP,{children:R.jsx(Wy,{children:R.jsxs(My,{children:[R.jsxs(ao,{children:[R.jsx(ao.Col,{span:8,children:R.jsx(a2,{children:R.jsx("text",{x:10,y:20,fontSize:12,fontFamily:e.fontFamilyMonospace,fill:e.white,children:r.toLocaleString()})})}),R.jsx(ao.Col,{span:4,children:R.jsx(f2,{})})]}),R.jsx(s2,{}),R.jsx(Ay,{block:!0,children:JSON.stringify(t,null,4)})]})})})})})},h2=ow([{path:"/",element:R.jsx(p2,{})}]);Ua.createRoot(document.getElementById("root")).render(R.jsx(j.StrictMode,{children:R.jsx(ey,{withGlobalStyles:!0,withNormalizeCSS:!0,theme:{colorScheme:"dark"},children:R.jsx(ew,{router:h2})})})); +======== + */var xe=typeof Symbol=="function"&&Symbol.for,Xu=xe?Symbol.for("react.element"):60103,Yu=xe?Symbol.for("react.portal"):60106,Vl=xe?Symbol.for("react.fragment"):60107,Hl=xe?Symbol.for("react.strict_mode"):60108,Wl=xe?Symbol.for("react.profiler"):60114,Gl=xe?Symbol.for("react.provider"):60109,Ql=xe?Symbol.for("react.context"):60110,Zu=xe?Symbol.for("react.async_mode"):60111,Kl=xe?Symbol.for("react.concurrent_mode"):60111,Xl=xe?Symbol.for("react.forward_ref"):60112,Yl=xe?Symbol.for("react.suspense"):60113,p_=xe?Symbol.for("react.suspense_list"):60120,Zl=xe?Symbol.for("react.memo"):60115,Jl=xe?Symbol.for("react.lazy"):60116,h_=xe?Symbol.for("react.block"):60121,m_=xe?Symbol.for("react.fundamental"):60117,y_=xe?Symbol.for("react.responder"):60118,g_=xe?Symbol.for("react.scope"):60119;function rt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Xu:switch(e=e.type,e){case Zu:case Kl:case Vl:case Wl:case Hl:case Yl:return e;default:switch(e=e&&e.$$typeof,e){case Ql:case Xl:case Jl:case Zl:case Gl:return e;default:return t}}case Yu:return t}}}function Gm(e){return rt(e)===Kl}ee.AsyncMode=Zu;ee.ConcurrentMode=Kl;ee.ContextConsumer=Ql;ee.ContextProvider=Gl;ee.Element=Xu;ee.ForwardRef=Xl;ee.Fragment=Vl;ee.Lazy=Jl;ee.Memo=Zl;ee.Portal=Yu;ee.Profiler=Wl;ee.StrictMode=Hl;ee.Suspense=Yl;ee.isAsyncMode=function(e){return Gm(e)||rt(e)===Zu};ee.isConcurrentMode=Gm;ee.isContextConsumer=function(e){return rt(e)===Ql};ee.isContextProvider=function(e){return rt(e)===Gl};ee.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Xu};ee.isForwardRef=function(e){return rt(e)===Xl};ee.isFragment=function(e){return rt(e)===Vl};ee.isLazy=function(e){return rt(e)===Jl};ee.isMemo=function(e){return rt(e)===Zl};ee.isPortal=function(e){return rt(e)===Yu};ee.isProfiler=function(e){return rt(e)===Wl};ee.isStrictMode=function(e){return rt(e)===Hl};ee.isSuspense=function(e){return rt(e)===Yl};ee.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Vl||e===Kl||e===Wl||e===Hl||e===Yl||e===p_||typeof e=="object"&&e!==null&&(e.$$typeof===Jl||e.$$typeof===Zl||e.$$typeof===Gl||e.$$typeof===Ql||e.$$typeof===Xl||e.$$typeof===m_||e.$$typeof===y_||e.$$typeof===g_||e.$$typeof===h_)};ee.typeOf=rt;(function(e){e.exports=ee})(d_);var Qm=Us,v_={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},w_={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Km={};Km[Qm.ForwardRef]=v_;Km[Qm.Memo]=w_;var __=!0;function S_(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):r+=o+" "}),r}var x_=function(t,n,r){var o=t.key+"-"+n.name;(r===!1||__===!1)&&t.registered[o]===void 0&&(t.registered[o]=n.styles)},Xm=function(t,n,r){x_(t,n,r);var o=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var i=n;do t.insert(n===i?"."+o:"",i,t.sheet,!0),i=i.next;while(i!==void 0)}};function E_(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var P_={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},k_=/[A-Z]|^ms/g,O_=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ym=function(t){return t.charCodeAt(1)===45},Gf=function(t){return t!=null&&typeof t!="boolean"},Ia=o_(function(e){return Ym(e)?e:e.replace(k_,"-$&").toLowerCase()}),Qf=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(O_,function(r,o,i){return $t={name:o,styles:i,next:$t},o})}return P_[t]!==1&&!Ym(t)&&typeof n=="number"&&n!==0?n+"px":n};function bo(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return $t={name:n.name,styles:n.styles,next:$t},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)$t={name:r.name,styles:r.styles,next:$t},r=r.next;var o=n.styles+";";return o}return C_(e,t,n)}case"function":{if(e!==void 0){var i=$t,l=n(e);return $t=i,bo(e,t,l)}break}}if(t==null)return n;var a=t[n];return a!==void 0?a:n}function C_(e,t,n){var r="";if(Array.isArray(n))for(var o=0;ot in e?T_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,A_=(e,t)=>{for(var n in t||(t={}))L_.call(t,n)&&Zf(e,n,t[n]);if(Yf)for(var n of Yf(t))D_.call(t,n)&&Zf(e,n,t[n]);return e},F_=(e,t)=>I_(e,M_(t));function U_({theme:e}){return j.createElement(Ao,{styles:{"*, *::before, *::after":{boxSizing:"border-box"},html:{colorScheme:e.colorScheme==="dark"?"dark":"light"},body:F_(A_({},e.fn.fontStyles()),{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,lineHeight:e.lineHeight,fontSize:e.fontSizes.md,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"})}})}function di(e,t,n){Object.keys(t).forEach(r=>{e[`--mantine-${n}-${r}`]=typeof t[r]=="number"?`${t[r]}px`:t[r]})}function B_({theme:e}){const t={"--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-transition-timing-function":e.transitionTimingFunction,"--mantine-line-height":`${e.lineHeight}`,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":`${e.headings.fontWeight}`};di(t,e.shadows,"shadow"),di(t,e.fontSizes,"font-size"),di(t,e.radius,"radius"),di(t,e.spacing,"spacing"),Object.keys(e.colors).forEach(r=>{e.colors[r].forEach((o,i)=>{t[`--mantine-color-${r}-${i}`]=o})});const n=e.headings.sizes;return Object.keys(n).forEach(r=>{t[`--mantine-${r}-font-size`]=`${n[r].fontSize}px`,t[`--mantine-${r}-line-height`]=`${n[r].lineHeight}`}),j.createElement(Ao,{styles:{":root":t}})}var V_=Object.defineProperty,H_=Object.defineProperties,W_=Object.getOwnPropertyDescriptors,Jf=Object.getOwnPropertySymbols,G_=Object.prototype.hasOwnProperty,Q_=Object.prototype.propertyIsEnumerable,qf=(e,t,n)=>t in e?V_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kn=(e,t)=>{for(var n in t||(t={}))G_.call(t,n)&&qf(e,n,t[n]);if(Jf)for(var n of Jf(t))Q_.call(t,n)&&qf(e,n,t[n]);return e},ed=(e,t)=>H_(e,W_(t));function K_(e,t){if(!t)return e;const n=Object.keys(e).reduce((r,o)=>{if(o==="headings"&&t.headings){const i=t.headings.sizes?Object.keys(e.headings.sizes).reduce((l,a)=>(l[a]=kn(kn({},e.headings.sizes[a]),t.headings.sizes[a]),l),{}):e.headings.sizes;return ed(kn({},r),{headings:ed(kn(kn({},e.headings),t.headings),{sizes:i})})}return r[o]=typeof t[o]=="object"?kn(kn({},e[o]),t[o]):typeof t[o]=="number"||typeof t[o]=="boolean"||typeof t[o]=="function"?t[o]:t[o]||e[o],r},{});if(!(n.primaryColor in n.colors))throw new Error("MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color");return n}function X_(e,t){return Mm(K_(e,t))}function Jm(e){return Object.keys(e).reduce((t,n)=>(e[n]!==void 0&&(t[n]=e[n]),t),{})}const Y_={html:{fontFamily:"sans-serif",lineHeight:"1.15",textSizeAdjust:"100%"},body:{margin:0},"article, aside, footer, header, nav, section, figcaption, figure, main":{display:"block"},h1:{fontSize:"2em"},hr:{boxSizing:"content-box",height:0,overflow:"visible"},pre:{fontFamily:"monospace, monospace",fontSize:"1em"},a:{background:"transparent",textDecorationSkip:"objects"},"a:active, a:hover":{outlineWidth:0},"abbr[title]":{borderBottom:"none",textDecoration:"underline"},"b, strong":{fontWeight:"bolder"},"code, kbp, samp":{fontFamily:"monospace, monospace",fontSize:"1em"},dfn:{fontStyle:"italic"},mark:{backgroundColor:"#ff0",color:"#000"},small:{fontSize:"80%"},"sub, sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sup:{top:"-0.5em"},sub:{bottom:"-0.25em"},"audio, video":{display:"inline-block"},"audio:not([controls])":{display:"none",height:0},img:{borderStyle:"none",verticalAlign:"middle"},"svg:not(:root)":{overflow:"hidden"},"button, input, optgroup, select, textarea":{fontFamily:"sans-serif",fontSize:"100%",lineHeight:"1.15",margin:0},"button, input":{overflow:"visible"},"button, select":{textTransform:"none"},"button, [type=reset], [type=submit]":{WebkitAppearance:"button"},"button::-moz-focus-inner, [type=button]::-moz-focus-inner, [type=reset]::-moz-focus-inner, [type=submit]::-moz-focus-inner":{borderStyle:"none",padding:0},"button:-moz-focusring, [type=button]:-moz-focusring, [type=reset]:-moz-focusring, [type=submit]:-moz-focusring":{outline:"1px dotted ButtonText"},legend:{boxSizing:"border-box",color:"inherit",display:"table",maxWidth:"100%",padding:0,whiteSpace:"normal"},progress:{display:"inline-block",verticalAlign:"baseline"},textarea:{overflow:"auto"},"[type=checkbox], [type=radio]":{boxSizing:"border-box",padding:0},"[type=number]::-webkit-inner-spin-button, [type=number]::-webkit-outer-spin-button":{height:"auto"},"[type=search]":{appearance:"none"},"[type=search]::-webkit-search-cancel-button, [type=search]::-webkit-search-decoration":{appearance:"none"},"::-webkit-file-upload-button":{appearance:"button",font:"inherit"},"details, menu":{display:"block"},summary:{display:"list-item"},canvas:{display:"inline-block"},template:{display:"none"},"[hidden]":{display:"none"}};function Z_(){return j.createElement(Ao,{styles:Y_})}var J_=Object.defineProperty,td=Object.getOwnPropertySymbols,q_=Object.prototype.hasOwnProperty,eS=Object.prototype.propertyIsEnumerable,nd=(e,t,n)=>t in e?J_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lo=(e,t)=>{for(var n in t||(t={}))q_.call(t,n)&&nd(e,n,t[n]);if(td)for(var n of td(t))eS.call(t,n)&&nd(e,n,t[n]);return e};const rl=x.createContext({theme:Xe});function dt(){var e;return((e=x.useContext(rl))==null?void 0:e.theme)||Xe}function tS(e){const t=dt(),n=r=>{var o,i;return{styles:((o=t.components[r])==null?void 0:o.styles)||{},classNames:((i=t.components[r])==null?void 0:i.classNames)||{}}};return Array.isArray(e)?e.map(n):[n(e)]}function qm(){var e;return(e=x.useContext(rl))==null?void 0:e.emotionCache}function Qe(e,t,n){var r;const o=dt(),i=(r=o.components[e])==null?void 0:r.defaultProps,l=typeof i=="function"?i(o):i;return lo(lo(lo({},t),l),Jm(n))}function ey({theme:e,emotionCache:t,withNormalizeCSS:n=!1,withGlobalStyles:r=!1,withCSSVariables:o=!1,inherit:i=!1,children:l}){const a=x.useContext(rl),s=X_(Xe,i?lo(lo({},a.theme),e):e);return j.createElement(N_,{theme:s},j.createElement(rl.Provider,{value:{theme:s,emotionCache:t}},n&&j.createElement(Z_,null),r&&j.createElement(U_,{theme:s}),o&&j.createElement(B_,{theme:s}),typeof s.globalStyles=="function"&&j.createElement(Ao,{styles:s.globalStyles(s)}),l))}ey.displayName="@mantine/core/MantineProvider";const nS={app:100,modal:200,popover:300,overlay:400,max:9999};function rS(e){return nS[e]}function oS(e,t){const n=x.useRef();return(!n.current||t.length!==n.current.prevDeps.length||n.current.prevDeps.map((r,o)=>r===t[o]).indexOf(!1)>=0)&&(n.current={v:e(),prevDeps:[...t]}),n.current.v}const iS=Wm({key:"mantine",prepend:!0});function lS(){return qm()||iS}var aS=Object.defineProperty,rd=Object.getOwnPropertySymbols,sS=Object.prototype.hasOwnProperty,uS=Object.prototype.propertyIsEnumerable,od=(e,t,n)=>t in e?aS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cS=(e,t)=>{for(var n in t||(t={}))sS.call(t,n)&&od(e,n,t[n]);if(rd)for(var n of rd(t))uS.call(t,n)&&od(e,n,t[n]);return e};const Ma="ref";function fS(e){let t;if(e.length!==1)return{args:e,ref:t};const[n]=e;if(!(n instanceof Object))return{args:e,ref:t};if(!(Ma in n))return{args:e,ref:t};t=n[Ma];const r=cS({},n);return delete r[Ma],{args:[r],ref:t}}const{cssFactory:dS}=(()=>{function e(n,r,o){const i=[],l=S_(n,i,o);return i.length<2?o:l+r(i)}function t(n){const{cache:r}=n,o=(...l)=>{const{ref:a,args:s}=fS(l),u=Ju(s,r.registered);return Xm(r,u,!1),`${r.key}-${u.name}${a===void 0?"":` ${a}`}`};return{css:o,cx:(...l)=>e(r.registered,o,sw(l))}}return{cssFactory:t}})();function ty(){const e=lS();return oS(()=>dS({cache:e}),[e])}function pS({cx:e,classes:t,context:n,classNames:r,name:o,cache:i}){const l=n.reduce((a,s)=>(Object.keys(s.classNames).forEach(u=>{typeof a[u]!="string"?a[u]=`${s.classNames[u]}`:a[u]=`${a[u]} ${s.classNames[u]}`}),a),{});return Object.keys(t).reduce((a,s)=>(a[s]=e(t[s],l[s],r!=null&&r[s],Array.isArray(o)?o.filter(Boolean).map(u=>`${(i==null?void 0:i.key)||"mantine"}-${u}-${s}`).join(" "):o?`${(i==null?void 0:i.key)||"mantine"}-${o}-${s}`:null),a),{})}var hS=Object.defineProperty,id=Object.getOwnPropertySymbols,mS=Object.prototype.hasOwnProperty,yS=Object.prototype.propertyIsEnumerable,ld=(e,t,n)=>t in e?hS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,La=(e,t)=>{for(var n in t||(t={}))mS.call(t,n)&&ld(e,n,t[n]);if(id)for(var n of id(t))yS.call(t,n)&&ld(e,n,t[n]);return e};function gS(e){return`__mantine-ref-${e||""}`}function ad(e,t,n){const r=o=>typeof o=="function"?o(t,n||{}):o||{};return Array.isArray(e)?e.map(o=>r(o.styles)).reduce((o,i)=>(Object.keys(i).forEach(l=>{o[l]?o[l]=La(La({},o[l]),i[l]):o[l]=La({},i[l])}),o),{}):r(e)}function ot(e){const t=typeof e=="function"?e:()=>e;function n(r,o){const i=dt(),l=tS(o==null?void 0:o.name),a=qm(),{css:s,cx:u}=ty(),d=t(i,r,gS),m=ad(o==null?void 0:o.styles,i,r),c=ad(l,i,r),y=Object.fromEntries(Object.keys(d).map(g=>{const v=u({[s(d[g])]:!(o!=null&&o.unstyled)},s(c[g]),s(m[g]));return[g,v]}));return{classes:pS({cx:u,classes:y,context:l,classNames:o==null?void 0:o.classNames,name:o==null?void 0:o.name,cache:a}),cx:u,theme:i}}return n}function vS({styles:e}){const t=dt();return j.createElement(Ao,{styles:z_(typeof e=="function"?e(t):e)})}var sd=Object.getOwnPropertySymbols,wS=Object.prototype.hasOwnProperty,_S=Object.prototype.propertyIsEnumerable,SS=(e,t)=>{var n={};for(var r in e)wS.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&sd)for(var r of sd(e))t.indexOf(r)<0&&_S.call(e,r)&&(n[r]=e[r]);return n};function xS(e){const t=e,{m:n,mx:r,my:o,mt:i,mb:l,ml:a,mr:s,p:u,px:d,py:m,pt:c,pb:y,pl:g,pr:v,bg:E,c:p,opacity:f,ff:h,fz:w,fw:P,lts:$,ta:k,lh:b,fs:V,tt:I,td:Z,w:ye,miw:Ke,maw:Gn,h:jr,mih:Sn,mah:se,bgsz:N,bgp:D,bgr:U,bga:K,pos:ue,top:Xt,left:it,bottom:xn,right:pt,inset:Yt,display:En}=t,Uo=SS(t,["m","mx","my","mt","mb","ml","mr","p","px","py","pt","pb","pl","pr","bg","c","opacity","ff","fz","fw","lts","ta","lh","fs","tt","td","w","miw","maw","h","mih","mah","bgsz","bgp","bgr","bga","pos","top","left","bottom","right","inset","display"]);return{systemStyles:Jm({m:n,mx:r,my:o,mt:i,mb:l,ml:a,mr:s,p:u,px:d,py:m,pt:c,pb:y,pl:g,pr:v,bg:E,c:p,opacity:f,ff:h,fz:w,fw:P,lts:$,ta:k,lh:b,fs:V,tt:I,td:Z,w:ye,miw:Ke,maw:Gn,h:jr,mih:Sn,mah:se,bgsz:N,bgp:D,bgr:U,bga:K,pos:ue,top:Xt,left:it,bottom:xn,right:pt,inset:Yt,display:En}),rest:Uo}}function ES(e,t){const n=Object.keys(e).filter(r=>r!=="base").sort((r,o)=>t.fn.size({size:r,sizes:t.breakpoints})-t.fn.size({size:o,sizes:t.breakpoints}));return"base"in e?["base",...n]:n}function PS({value:e,theme:t,getValue:n,property:r}){if(e==null)return;if(typeof e=="object")return ES(e,t).reduce((l,a)=>{if(a==="base"&&e.base!==void 0){const u=n(e.base,t);return Array.isArray(r)?(r.forEach(d=>{l[d]=u}),l):(l[r]=u,l)}const s=n(e[a],t);return Array.isArray(r)?(l[t.fn.largerThan(a)]={},r.forEach(u=>{l[t.fn.largerThan(a)][u]=s}),l):(l[t.fn.largerThan(a)]={[r]:s},l)},{});const o=n(e,t);return Array.isArray(r)?r.reduce((i,l)=>(i[l]=o,i),{}):{[r]:o}}function kS(e,t){return e==="dimmed"?t.colorScheme==="dark"?t.colors.dark[2]:t.colors.gray[6]:t.fn.variant({variant:"filled",color:e,primaryFallback:!1}).background}function OS(e){return e}function CS(e,t){return t.fn.size({size:e,sizes:t.fontSizes})}const $S=["-xs","-sm","-md","-lg","-xl"];function RS(e,t){return $S.includes(e)?t.fn.size({size:e.replace("-",""),sizes:t.spacing})*-1:t.fn.size({size:e,sizes:t.spacing})}const jS={color:kS,default:OS,fontSize:CS,spacing:RS},bS={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},mx:{type:"spacing",property:["marginRight","marginLeft"]},my:{type:"spacing",property:["marginTop","marginBottom"]},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},px:{type:"spacing",property:["paddingRight","paddingLeft"]},py:{type:"spacing",property:["paddingTop","paddingBottom"]},bg:{type:"color",property:"background"},c:{type:"color",property:"color"},opacity:{type:"default",property:"opacity"},ff:{type:"default",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"default",property:"fontWeight"},lts:{type:"default",property:"letterSpacing"},ta:{type:"default",property:"textAlign"},lh:{type:"default",property:"lineHeight"},fs:{type:"default",property:"fontStyle"},tt:{type:"default",property:"textTransform"},td:{type:"default",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"default",property:"background-size"},bgp:{type:"default",property:"background-position"},bgr:{type:"default",property:"background-repeat"},bga:{type:"default",property:"background-attachment"},pos:{type:"default",property:"position"},top:{type:"default",property:"top"},left:{type:"default",property:"left"},bottom:{type:"default",property:"bottom"},right:{type:"default",property:"right"},inset:{type:"default",property:"inset"},display:{type:"default",property:"display"}};var NS=Object.defineProperty,ud=Object.getOwnPropertySymbols,zS=Object.prototype.hasOwnProperty,TS=Object.prototype.propertyIsEnumerable,cd=(e,t,n)=>t in e?NS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fd=(e,t)=>{for(var n in t||(t={}))zS.call(t,n)&&cd(e,n,t[n]);if(ud)for(var n of ud(t))TS.call(t,n)&&cd(e,n,t[n]);return e};function dd(e,t,n=bS){return Object.keys(n).reduce((o,i)=>(i in e&&e[i]!==void 0&&o.push(PS({value:e[i],getValue:jS[n[i].type],property:n[i].property,theme:t})),o),[]).reduce((o,i)=>(Object.keys(i).forEach(l=>{typeof i[l]=="object"&&i[l]!==null&&l in o?o[l]=fd(fd({},o[l]),i[l]):o[l]=i[l]}),o),{})}function pd(e,t){return typeof e=="function"?e(t):e}function IS(e,t,n){const r=dt(),{css:o,cx:i}=ty();return Array.isArray(e)?i(n,o(dd(t,r)),e.map(l=>o(pd(l,r)))):i(n,o(pd(e,r)),o(dd(t,r)))}var MS=Object.defineProperty,ol=Object.getOwnPropertySymbols,ny=Object.prototype.hasOwnProperty,ry=Object.prototype.propertyIsEnumerable,hd=(e,t,n)=>t in e?MS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,LS=(e,t)=>{for(var n in t||(t={}))ny.call(t,n)&&hd(e,n,t[n]);if(ol)for(var n of ol(t))ry.call(t,n)&&hd(e,n,t[n]);return e},DS=(e,t)=>{var n={};for(var r in e)ny.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ol)for(var r of ol(e))t.indexOf(r)<0&&ry.call(e,r)&&(n[r]=e[r]);return n};const oy=x.forwardRef((e,t)=>{var n=e,{className:r,component:o,style:i,sx:l}=n,a=DS(n,["className","component","style","sx"]);const{systemStyles:s,rest:u}=xS(a),d=o||"div";return j.createElement(d,LS({ref:t,className:IS(l,s,r),style:i},u))});oy.displayName="@mantine/core/Box";const Ge=oy;var AS=Object.defineProperty,FS=Object.defineProperties,US=Object.getOwnPropertyDescriptors,md=Object.getOwnPropertySymbols,BS=Object.prototype.hasOwnProperty,VS=Object.prototype.propertyIsEnumerable,yd=(e,t,n)=>t in e?AS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gd=(e,t)=>{for(var n in t||(t={}))BS.call(t,n)&&yd(e,n,t[n]);if(md)for(var n of md(t))VS.call(t,n)&&yd(e,n,t[n]);return e},HS=(e,t)=>FS(e,US(t)),WS=ot(e=>({root:HS(gd(gd({},e.fn.focusStyles()),e.fn.fontStyles()),{cursor:"pointer",border:0,padding:0,appearance:"none",fontSize:e.fontSizes.md,backgroundColor:"transparent",textAlign:"left",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,textDecoration:"none",boxSizing:"border-box"})}));const GS=WS;var QS=Object.defineProperty,il=Object.getOwnPropertySymbols,iy=Object.prototype.hasOwnProperty,ly=Object.prototype.propertyIsEnumerable,vd=(e,t,n)=>t in e?QS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,KS=(e,t)=>{for(var n in t||(t={}))iy.call(t,n)&&vd(e,n,t[n]);if(il)for(var n of il(t))ly.call(t,n)&&vd(e,n,t[n]);return e},XS=(e,t)=>{var n={};for(var r in e)iy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&il)for(var r of il(e))t.indexOf(r)<0&&ly.call(e,r)&&(n[r]=e[r]);return n};const ay=x.forwardRef((e,t)=>{const n=Qe("UnstyledButton",{},e),{className:r,component:o="button",unstyled:i}=n,l=XS(n,["className","component","unstyled"]),{classes:a,cx:s}=GS(null,{name:"UnstyledButton",unstyled:i});return j.createElement(Ge,KS({component:o,ref:t,className:s(a.root,r),type:o==="button"?"button":void 0},l))});ay.displayName="@mantine/core/UnstyledButton";const YS=ay;var ZS=Object.defineProperty,ll=Object.getOwnPropertySymbols,sy=Object.prototype.hasOwnProperty,uy=Object.prototype.propertyIsEnumerable,wd=(e,t,n)=>t in e?ZS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,JS=(e,t)=>{for(var n in t||(t={}))sy.call(t,n)&&wd(e,n,t[n]);if(ll)for(var n of ll(t))uy.call(t,n)&&wd(e,n,t[n]);return e},qS=(e,t)=>{var n={};for(var r in e)sy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ll)for(var r of ll(e))t.indexOf(r)<0&&uy.call(e,r)&&(n[r]=e[r]);return n};function ex(e){var t=e,{size:n,color:r}=t,o=qS(t,["size","color"]);return j.createElement("svg",JS({viewBox:"0 0 135 140",xmlns:"http://www.w3.org/2000/svg",fill:r,width:`${n}px`},o),j.createElement("rect",{y:"10",width:"15",height:"120",rx:"6"},j.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),j.createElement("rect",{x:"30",y:"10",width:"15",height:"120",rx:"6"},j.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),j.createElement("rect",{x:"60",width:"15",height:"140",rx:"6"},j.createElement("animate",{attributeName:"height",begin:"0s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"y",begin:"0s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),j.createElement("rect",{x:"90",y:"10",width:"15",height:"120",rx:"6"},j.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),j.createElement("rect",{x:"120",y:"10",width:"15",height:"120",rx:"6"},j.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})))}var tx=Object.defineProperty,al=Object.getOwnPropertySymbols,cy=Object.prototype.hasOwnProperty,fy=Object.prototype.propertyIsEnumerable,_d=(e,t,n)=>t in e?tx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nx=(e,t)=>{for(var n in t||(t={}))cy.call(t,n)&&_d(e,n,t[n]);if(al)for(var n of al(t))fy.call(t,n)&&_d(e,n,t[n]);return e},rx=(e,t)=>{var n={};for(var r in e)cy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&al)for(var r of al(e))t.indexOf(r)<0&&fy.call(e,r)&&(n[r]=e[r]);return n};function ox(e){var t=e,{size:n,color:r}=t,o=rx(t,["size","color"]);return j.createElement("svg",nx({width:`${n}px`,height:`${n}px`,viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg",stroke:r},o),j.createElement("g",{fill:"none",fillRule:"evenodd"},j.createElement("g",{transform:"translate(2.5 2.5)",strokeWidth:"5"},j.createElement("circle",{strokeOpacity:".5",cx:"16",cy:"16",r:"16"}),j.createElement("path",{d:"M32 16c0-9.94-8.06-16-16-16"},j.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 16 16",to:"360 16 16",dur:"1s",repeatCount:"indefinite"})))))}var ix=Object.defineProperty,sl=Object.getOwnPropertySymbols,dy=Object.prototype.hasOwnProperty,py=Object.prototype.propertyIsEnumerable,Sd=(e,t,n)=>t in e?ix(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lx=(e,t)=>{for(var n in t||(t={}))dy.call(t,n)&&Sd(e,n,t[n]);if(sl)for(var n of sl(t))py.call(t,n)&&Sd(e,n,t[n]);return e},ax=(e,t)=>{var n={};for(var r in e)dy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&sl)for(var r of sl(e))t.indexOf(r)<0&&py.call(e,r)&&(n[r]=e[r]);return n};function sx(e){var t=e,{size:n,color:r}=t,o=ax(t,["size","color"]);return j.createElement("svg",lx({width:`${n}px`,height:`${n/4}px`,viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg",fill:r},o),j.createElement("circle",{cx:"15",cy:"15",r:"15"},j.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})),j.createElement("circle",{cx:"60",cy:"15",r:"9",fillOpacity:"0.3"},j.createElement("animate",{attributeName:"r",from:"9",to:"9",begin:"0s",dur:"0.8s",values:"9;15;9",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"fill-opacity",from:"0.5",to:"0.5",begin:"0s",dur:"0.8s",values:".5;1;.5",calcMode:"linear",repeatCount:"indefinite"})),j.createElement("circle",{cx:"105",cy:"15",r:"15"},j.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),j.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})))}var ux=Object.defineProperty,ul=Object.getOwnPropertySymbols,hy=Object.prototype.hasOwnProperty,my=Object.prototype.propertyIsEnumerable,xd=(e,t,n)=>t in e?ux(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cx=(e,t)=>{for(var n in t||(t={}))hy.call(t,n)&&xd(e,n,t[n]);if(ul)for(var n of ul(t))my.call(t,n)&&xd(e,n,t[n]);return e},fx=(e,t)=>{var n={};for(var r in e)hy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ul)for(var r of ul(e))t.indexOf(r)<0&&my.call(e,r)&&(n[r]=e[r]);return n};const Da={bars:ex,oval:ox,dots:sx},dx={xs:18,sm:22,md:36,lg:44,xl:58},px={size:"md"};function yy(e){const t=Qe("Loader",px,e),{size:n,color:r,variant:o}=t,i=fx(t,["size","color","variant"]),l=dt(),a=o in Da?o:l.loader;return j.createElement(Ge,cx({role:"presentation",component:Da[a]||Da.bars,size:l.fn.size({size:n,sizes:dx}),color:l.fn.variant({variant:"filled",primaryFallback:!1,color:r||l.primaryColor}).background},i))}yy.displayName="@mantine/core/Loader";const gy=x.createContext({zIndex:1e3,fixed:!1,layout:"default"}),hx=gy.Provider;function mx(){return x.useContext(gy)}function vy(e,t){if(!e)return[];const n=Object.keys(e).filter(r=>r!=="base").map(r=>[t.fn.size({size:r,sizes:t.breakpoints}),e[r]]);return n.sort((r,o)=>r[0]-o[0]),n}var yx=Object.defineProperty,gx=Object.defineProperties,vx=Object.getOwnPropertyDescriptors,Ed=Object.getOwnPropertySymbols,wx=Object.prototype.hasOwnProperty,_x=Object.prototype.propertyIsEnumerable,Pd=(e,t,n)=>t in e?yx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Aa=(e,t)=>{for(var n in t||(t={}))wx.call(t,n)&&Pd(e,n,t[n]);if(Ed)for(var n of Ed(t))_x.call(t,n)&&Pd(e,n,t[n]);return e},kd=(e,t)=>gx(e,vx(t)),Sx=ot((e,{height:t,fixed:n,position:r,zIndex:o,borderPosition:i,layout:l})=>{const a=typeof t=="object"&&t!==null?vy(t,e).reduce((s,[u,d])=>(s[`@media (min-width: ${u}px)`]={height:d,minHeight:d},s),{}):null;return{root:kd(Aa(kd(Aa(Aa({},e.fn.fontStyles()),r),{zIndex:o,left:l==="alt"?"var(--mantine-navbar-width, 0)":0,right:l==="alt"?"var(--mantine-aside-width, 0)":0,height:typeof t=="object"?(t==null?void 0:t.base)||"100%":t,maxHeight:typeof t=="object"?(t==null?void 0:t.base)||"100%":t,position:n?"fixed":"static",boxSizing:"border-box",backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white}),a),{borderBottom:i==="bottom"?`1px solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[2]}`:void 0,borderTop:i==="top"?`1px solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[2]}`:void 0})}});const xx=Sx;var Ex=Object.defineProperty,cl=Object.getOwnPropertySymbols,wy=Object.prototype.hasOwnProperty,_y=Object.prototype.propertyIsEnumerable,Od=(e,t,n)=>t in e?Ex(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Cd=(e,t)=>{for(var n in t||(t={}))wy.call(t,n)&&Od(e,n,t[n]);if(cl)for(var n of cl(t))_y.call(t,n)&&Od(e,n,t[n]);return e},Px=(e,t)=>{var n={};for(var r in e)wy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&cl)for(var r of cl(e))t.indexOf(r)<0&&_y.call(e,r)&&(n[r]=e[r]);return n};const Sy=x.forwardRef((e,t)=>{var n=e,{children:r,className:o,classNames:i,styles:l,height:a,fixed:s=!1,withBorder:u=!0,position:d,zIndex:m,section:c,unstyled:y,__staticSelector:g}=n,v=Px(n,["children","className","classNames","styles","height","fixed","withBorder","position","zIndex","section","unstyled","__staticSelector"]);const E=mx(),p=m||E.zIndex||rS("app"),{classes:f,cx:h,theme:w}=xx({height:a,fixed:E.fixed||s,position:d,zIndex:typeof p=="number"&&E.layout==="default"?p+1:p,layout:E.layout,borderPosition:u?c==="header"?"bottom":"top":"none"},{name:g,classNames:i,styles:l,unstyled:y}),P=typeof a=="object"&&a!==null?vy(a,w).reduce(($,[k,b])=>($[`@media (min-width: ${k}px)`]={[`--mantine-${c}-height`]:`${b}px`},$),{}):null;return j.createElement(Ge,Cd({component:c==="header"?"header":"footer",className:h(f.root,o),ref:t},v),r,j.createElement(vS,{styles:()=>({":root":Cd({[`--mantine-${c}-height`]:typeof a=="object"?`${a==null?void 0:a.base}px`||"100%":`${a}px`},P)})}))});Sy.displayName="@mantine/core/VerticalSection";var kx=Object.defineProperty,Ox=Object.defineProperties,Cx=Object.getOwnPropertyDescriptors,$d=Object.getOwnPropertySymbols,$x=Object.prototype.hasOwnProperty,Rx=Object.prototype.propertyIsEnumerable,Rd=(e,t,n)=>t in e?kx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jx=(e,t)=>{for(var n in t||(t={}))$x.call(t,n)&&Rd(e,n,t[n]);if($d)for(var n of $d(t))Rx.call(t,n)&&Rd(e,n,t[n]);return e},bx=(e,t)=>Ox(e,Cx(t));const Nx={fixed:!1,position:{top:0,left:0,right:0}},xy=x.forwardRef((e,t)=>{const n=Qe("Header",Nx,e);return j.createElement(Sy,bx(jx({section:"header",__staticSelector:"Header"},n),{ref:t}))});xy.displayName="@mantine/core/Header";var zx=Object.defineProperty,jd=Object.getOwnPropertySymbols,Tx=Object.prototype.hasOwnProperty,Ix=Object.prototype.propertyIsEnumerable,bd=(e,t,n)=>t in e?zx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mx=(e,t)=>{for(var n in t||(t={}))Tx.call(t,n)&&bd(e,n,t[n]);if(jd)for(var n of jd(t))Ix.call(t,n)&&bd(e,n,t[n]);return e};function Lx(e,t){const n=t.fn.size({size:e.padding,sizes:t.spacing}),r=e.navbarOffsetBreakpoint?t.fn.size({size:e.navbarOffsetBreakpoint,sizes:t.breakpoints}):null,o=e.asideOffsetBreakpoint?t.fn.size({size:e.asideOffsetBreakpoint,sizes:t.breakpoints}):null;return e.fixed?{minHeight:"100vh",paddingTop:`calc(var(--mantine-header-height, 0px) + ${n}px)`,paddingBottom:`calc(var(--mantine-footer-height, 0px) + ${n}px)`,paddingLeft:`calc(var(--mantine-navbar-width, 0px) + ${n}px)`,paddingRight:`calc(var(--mantine-aside-width, 0px) + ${n}px)`,[`@media (max-width: ${r-1}px)`]:{paddingLeft:n},[`@media (max-width: ${o-1}px)`]:{paddingRight:n}}:{padding:n}}var Dx=ot((e,t)=>({root:{boxSizing:"border-box"},body:{display:"flex",boxSizing:"border-box"},main:Mx({flex:1,width:"100vw",boxSizing:"border-box"},Lx(t,e))}));const Ax=Dx;var Fx=Object.defineProperty,fl=Object.getOwnPropertySymbols,Ey=Object.prototype.hasOwnProperty,Py=Object.prototype.propertyIsEnumerable,Nd=(e,t,n)=>t in e?Fx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ux=(e,t)=>{for(var n in t||(t={}))Ey.call(t,n)&&Nd(e,n,t[n]);if(fl)for(var n of fl(t))Py.call(t,n)&&Nd(e,n,t[n]);return e},Bx=(e,t)=>{var n={};for(var r in e)Ey.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&fl)for(var r of fl(e))t.indexOf(r)<0&&Py.call(e,r)&&(n[r]=e[r]);return n};const Vx={fixed:!0,padding:"md"},ky=x.forwardRef((e,t)=>{const n=Qe("AppShell",Vx,e),{children:r,navbar:o,header:i,footer:l,aside:a,fixed:s,zIndex:u,padding:d,navbarOffsetBreakpoint:m,asideOffsetBreakpoint:c,className:y,styles:g,classNames:v,unstyled:E,hidden:p,layout:f}=n,h=Bx(n,["children","navbar","header","footer","aside","fixed","zIndex","padding","navbarOffsetBreakpoint","asideOffsetBreakpoint","className","styles","classNames","unstyled","hidden","layout"]),{classes:w,cx:P}=Ax({padding:d,fixed:s,navbarOffsetBreakpoint:m,asideOffsetBreakpoint:c},{styles:g,classNames:v,unstyled:E,name:"AppShell"});return p?j.createElement(j.Fragment,null,r):j.createElement(hx,{value:{fixed:s,zIndex:u,layout:f}},j.createElement(Ge,Ux({className:P(w.root,y),ref:t},h),i,j.createElement("div",{className:w.body},o,j.createElement("main",{className:w.main},r),a),l))});ky.displayName="@mantine/core/AppShell";const Hr={xs:30,sm:36,md:42,lg:50,xl:60};var Hx=ot((e,{orientation:t,buttonBorderWidth:n})=>({root:{display:"flex",flexDirection:t==="vertical"?"column":"row","& [data-button]":{"&:first-of-type":{borderBottomRightRadius:0,[t==="vertical"?"borderBottomLeftRadius":"borderTopRightRadius"]:0,[t==="vertical"?"borderBottomWidth":"borderRightWidth"]:n/2},"&:last-of-type":{borderTopLeftRadius:0,[t==="vertical"?"borderTopRightRadius":"borderBottomLeftRadius"]:0,[t==="vertical"?"borderTopWidth":"borderLeftWidth"]:n/2},"&:not(:first-of-type):not(:last-of-type)":{borderRadius:0,[t==="vertical"?"borderTopWidth":"borderLeftWidth"]:n/2,[t==="vertical"?"borderBottomWidth":"borderRightWidth"]:n/2},"& + [data-button]":{[t==="vertical"?"marginTop":"marginLeft"]:-n,"@media (min-resolution: 192dpi)":{[t==="vertical"?"marginTop":"marginLeft"]:0}}}}}));const Wx=Hx;var Gx=Object.defineProperty,dl=Object.getOwnPropertySymbols,Oy=Object.prototype.hasOwnProperty,Cy=Object.prototype.propertyIsEnumerable,zd=(e,t,n)=>t in e?Gx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qx=(e,t)=>{for(var n in t||(t={}))Oy.call(t,n)&&zd(e,n,t[n]);if(dl)for(var n of dl(t))Cy.call(t,n)&&zd(e,n,t[n]);return e},Kx=(e,t)=>{var n={};for(var r in e)Oy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&dl)for(var r of dl(e))t.indexOf(r)<0&&Cy.call(e,r)&&(n[r]=e[r]);return n};const Xx={orientation:"horizontal",buttonBorderWidth:1},$y=x.forwardRef((e,t)=>{const n=Qe("ButtonGroup",Xx,e),{className:r,orientation:o,buttonBorderWidth:i,unstyled:l}=n,a=Kx(n,["className","orientation","buttonBorderWidth","unstyled"]),{classes:s,cx:u}=Wx({orientation:o,buttonBorderWidth:i},{name:"ButtonGroup",unstyled:l});return j.createElement(Ge,Qx({className:u(s.root,r),ref:t},a))});$y.displayName="@mantine/core/ButtonGroup";var Yx=Object.defineProperty,Zx=Object.defineProperties,Jx=Object.getOwnPropertyDescriptors,Td=Object.getOwnPropertySymbols,qx=Object.prototype.hasOwnProperty,eE=Object.prototype.propertyIsEnumerable,Id=(e,t,n)=>t in e?Yx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$n=(e,t)=>{for(var n in t||(t={}))qx.call(t,n)&&Id(e,n,t[n]);if(Td)for(var n of Td(t))eE.call(t,n)&&Id(e,n,t[n]);return e},Vs=(e,t)=>Zx(e,Jx(t));const Hs={xs:{height:Hr.xs,paddingLeft:14,paddingRight:14},sm:{height:Hr.sm,paddingLeft:18,paddingRight:18},md:{height:Hr.md,paddingLeft:22,paddingRight:22},lg:{height:Hr.lg,paddingLeft:26,paddingRight:26},xl:{height:Hr.xl,paddingLeft:32,paddingRight:32},"compact-xs":{height:22,paddingLeft:7,paddingRight:7},"compact-sm":{height:26,paddingLeft:8,paddingRight:8},"compact-md":{height:30,paddingLeft:10,paddingRight:10},"compact-lg":{height:34,paddingLeft:12,paddingRight:12},"compact-xl":{height:40,paddingLeft:14,paddingRight:14}};function tE({compact:e,size:t,withLeftIcon:n,withRightIcon:r}){if(e)return Hs[`compact-${t}`];const o=Hs[t];return Vs($n({},o),{paddingLeft:n?o.paddingLeft/1.5:o.paddingLeft,paddingRight:r?o.paddingRight/1.5:o.paddingRight})}const nE=e=>({display:e?"block":"inline-block",width:e?"100%":"auto"});function rE({variant:e,theme:t,color:n,gradient:r}){const o=t.fn.variant({color:n,variant:e,gradient:r});return e==="gradient"?{border:0,backgroundImage:o.background,color:o.color,"&:hover":t.fn.hover({backgroundSize:"200%"})}:$n({border:`1px solid ${o.border}`,backgroundColor:o.background,color:o.color},t.fn.hover({backgroundColor:o.hover}))}var oE=ot((e,{color:t,size:n,radius:r,fullWidth:o,compact:i,gradient:l,variant:a,withLeftIcon:s,withRightIcon:u})=>({root:Vs($n(Vs($n($n($n($n({},tE({compact:i,size:n,withLeftIcon:s,withRightIcon:u})),e.fn.fontStyles()),e.fn.focusStyles()),nE(o)),{borderRadius:e.fn.radius(r),fontWeight:600,position:"relative",lineHeight:1,fontSize:e.fn.size({size:n,sizes:e.fontSizes}),userSelect:"none",cursor:"pointer"}),rE({variant:a,theme:e,color:t,gradient:l})),{"&:active":e.activeStyles,"&:disabled, &[data-disabled]":{borderColor:"transparent",backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],color:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[5],cursor:"not-allowed",backgroundImage:"none",pointerEvents:"none","&:active":{transform:"none"}},"&[data-loading]":{pointerEvents:"none","&::before":{content:'""',position:"absolute",top:-1,left:-1,right:-1,bottom:-1,backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.colors.dark[7],.5):"rgba(255, 255, 255, .5)",borderRadius:e.fn.radius(r),cursor:"not-allowed"}}}),icon:{display:"flex",alignItems:"center"},leftIcon:{marginRight:10},rightIcon:{marginLeft:10},centerLoader:{position:"absolute",left:"50%",transform:"translateX(-50%)",opacity:.5},inner:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",overflow:"visible"},label:{whiteSpace:"nowrap",height:"100%",overflow:"hidden",display:"flex",alignItems:"center"}}));const iE=oE;var lE=Object.defineProperty,pl=Object.getOwnPropertySymbols,Ry=Object.prototype.hasOwnProperty,jy=Object.prototype.propertyIsEnumerable,Md=(e,t,n)=>t in e?lE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ld=(e,t)=>{for(var n in t||(t={}))Ry.call(t,n)&&Md(e,n,t[n]);if(pl)for(var n of pl(t))jy.call(t,n)&&Md(e,n,t[n]);return e},aE=(e,t)=>{var n={};for(var r in e)Ry.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&pl)for(var r of pl(e))t.indexOf(r)<0&&jy.call(e,r)&&(n[r]=e[r]);return n};const sE={size:"sm",type:"button",variant:"filled",loaderPosition:"left"},qu=x.forwardRef((e,t)=>{const n=Qe("Button",sE,e),{className:r,size:o,color:i,type:l,disabled:a,children:s,leftIcon:u,rightIcon:d,fullWidth:m,variant:c,radius:y,uppercase:g,compact:v,loading:E,loaderPosition:p,loaderProps:f,gradient:h,classNames:w,styles:P,unstyled:$}=n,k=aE(n,["className","size","color","type","disabled","children","leftIcon","rightIcon","fullWidth","variant","radius","uppercase","compact","loading","loaderPosition","loaderProps","gradient","classNames","styles","unstyled"]),{classes:b,cx:V,theme:I}=iE({radius:y,color:i,size:o,fullWidth:m,compact:v,gradient:h,variant:c,withLeftIcon:!!u,withRightIcon:!!d},{name:"Button",unstyled:$,classNames:w,styles:P}),Z=I.fn.variant({color:i,variant:c}),ye=j.createElement(yy,Ld({color:Z.color,size:I.fn.size({size:o,sizes:Hs}).height/2},f));return j.createElement(YS,Ld({className:V(b.root,r),type:l,disabled:a,"data-button":!0,"data-disabled":a||void 0,"data-loading":E||void 0,ref:t,unstyled:$},k),j.createElement("div",{className:b.inner},(u||E&&p==="left")&&j.createElement("span",{className:V(b.icon,b.leftIcon)},E&&p==="left"?ye:u),E&&p==="center"&&j.createElement("span",{className:b.centerLoader},ye),j.createElement("span",{className:b.label,style:{textTransform:g?"uppercase":void 0}},s),(d||E&&p==="right")&&j.createElement("span",{className:V(b.icon,b.rightIcon)},E&&p==="right"?ye:d)))});qu.displayName="@mantine/core/Button";qu.Group=$y;const ql=qu;function uE(e){return x.Children.toArray(e).filter(Boolean)}const cE={left:"flex-start",center:"center",right:"flex-end",apart:"space-between"};var fE=ot((e,{spacing:t,position:n,noWrap:r,grow:o,align:i,count:l})=>({root:{boxSizing:"border-box",display:"flex",flexDirection:"row",alignItems:i||"center",flexWrap:r?"nowrap":"wrap",justifyContent:cE[n],gap:e.fn.size({size:t,sizes:e.spacing}),"& > *":{boxSizing:"border-box",maxWidth:o?`calc(${100/l}% - ${e.fn.size({size:t,sizes:e.spacing})-e.fn.size({size:t,sizes:e.spacing})/l}px)`:void 0,flexGrow:o?1:0}}}));const dE=fE;var pE=Object.defineProperty,hl=Object.getOwnPropertySymbols,by=Object.prototype.hasOwnProperty,Ny=Object.prototype.propertyIsEnumerable,Dd=(e,t,n)=>t in e?pE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,hE=(e,t)=>{for(var n in t||(t={}))by.call(t,n)&&Dd(e,n,t[n]);if(hl)for(var n of hl(t))Ny.call(t,n)&&Dd(e,n,t[n]);return e},mE=(e,t)=>{var n={};for(var r in e)by.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&hl)for(var r of hl(e))t.indexOf(r)<0&&Ny.call(e,r)&&(n[r]=e[r]);return n};const yE={position:"left",spacing:"md"},zy=x.forwardRef((e,t)=>{const n=Qe("Group",yE,e),{className:r,position:o,align:i,children:l,noWrap:a,grow:s,spacing:u,unstyled:d}=n,m=mE(n,["className","position","align","children","noWrap","grow","spacing","unstyled"]),c=uE(l),{classes:y,cx:g}=dE({align:i,grow:s,noWrap:a,spacing:u,position:o,count:c.length},{unstyled:d,name:"Group"});return j.createElement(Ge,hE({className:g(y.root,r),ref:t},m),c)});zy.displayName="@mantine/core/Group";var gE=ot((e,{spacing:t,align:n,justify:r})=>({root:{display:"flex",flexDirection:"column",alignItems:n,justifyContent:r,gap:e.fn.size({size:t,sizes:e.spacing})}}));const vE=gE;var wE=Object.defineProperty,ml=Object.getOwnPropertySymbols,Ty=Object.prototype.hasOwnProperty,Iy=Object.prototype.propertyIsEnumerable,Ad=(e,t,n)=>t in e?wE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_E=(e,t)=>{for(var n in t||(t={}))Ty.call(t,n)&&Ad(e,n,t[n]);if(ml)for(var n of ml(t))Iy.call(t,n)&&Ad(e,n,t[n]);return e},SE=(e,t)=>{var n={};for(var r in e)Ty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ml)for(var r of ml(e))t.indexOf(r)<0&&Iy.call(e,r)&&(n[r]=e[r]);return n};const xE={spacing:"md",align:"stretch",justify:"flex-start"},My=x.forwardRef((e,t)=>{const n=Qe("Stack",xE,e),{spacing:r,className:o,align:i,justify:l,unstyled:a}=n,s=SE(n,["spacing","className","align","justify","unstyled"]),{classes:u,cx:d}=vE({spacing:r,align:i,justify:l},{name:"Stack",unstyled:a});return j.createElement(Ge,_E({className:d(u.root,o),ref:t},s))});My.displayName="@mantine/core/Stack";var EE=Object.defineProperty,PE=Object.defineProperties,kE=Object.getOwnPropertyDescriptors,Fd=Object.getOwnPropertySymbols,OE=Object.prototype.hasOwnProperty,CE=Object.prototype.propertyIsEnumerable,Ud=(e,t,n)=>t in e?EE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$E=(e,t)=>{for(var n in t||(t={}))OE.call(t,n)&&Ud(e,n,t[n]);if(Fd)for(var n of Fd(t))CE.call(t,n)&&Ud(e,n,t[n]);return e},RE=(e,t)=>PE(e,kE(t)),jE=ot((e,{color:t})=>{const n=t||(e.colorScheme==="dark"?"dark":"gray"),r=e.fn.variant({color:n,variant:"light"});return{root:RE($E({},e.fn.fontStyles()),{lineHeight:e.lineHeight,padding:`2px calc(${e.spacing.xs}px / 2)`,borderRadius:e.radius.sm,color:e.colorScheme==="dark"?n==="dark"?e.colors.dark[0]:e.white:e.colors.dark[7],backgroundColor:e.colorScheme==="dark"&&n==="dark"?e.colors.dark[5]:r.background,fontFamily:e.fontFamilyMonospace,fontSize:e.fontSizes.xs}),block:{padding:e.spacing.xs,margin:0,overflowX:"auto"}}});const bE=jE;var NE=Object.defineProperty,yl=Object.getOwnPropertySymbols,Ly=Object.prototype.hasOwnProperty,Dy=Object.prototype.propertyIsEnumerable,Bd=(e,t,n)=>t in e?NE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Vd=(e,t)=>{for(var n in t||(t={}))Ly.call(t,n)&&Bd(e,n,t[n]);if(yl)for(var n of yl(t))Dy.call(t,n)&&Bd(e,n,t[n]);return e},zE=(e,t)=>{var n={};for(var r in e)Ly.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&yl)for(var r of yl(e))t.indexOf(r)<0&&Dy.call(e,r)&&(n[r]=e[r]);return n};const Ay=x.forwardRef((e,t)=>{const n=Qe("Code",{},e),{className:r,children:o,block:i,color:l,unstyled:a}=n,s=zE(n,["className","children","block","color","unstyled"]),{classes:u,cx:d}=bE({color:l},{name:"Code",unstyled:a});return i?j.createElement(Ge,Vd({component:"pre",dir:"ltr",className:d(u.root,u.block,r),ref:t},s),o):j.createElement(Ge,Vd({component:"code",className:d(u.root,r),ref:t,dir:"ltr"},s),o)});Ay.displayName="@mantine/core/Code";var TE=Object.defineProperty,IE=Object.defineProperties,ME=Object.getOwnPropertyDescriptors,Hd=Object.getOwnPropertySymbols,LE=Object.prototype.hasOwnProperty,DE=Object.prototype.propertyIsEnumerable,Wd=(e,t,n)=>t in e?TE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,AE=(e,t)=>{for(var n in t||(t={}))LE.call(t,n)&&Wd(e,n,t[n]);if(Hd)for(var n of Hd(t))DE.call(t,n)&&Wd(e,n,t[n]);return e},FE=(e,t)=>IE(e,ME(t)),UE=ot((e,{size:t,radius:n})=>{const r=e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3];return{root:FE(AE({},e.fn.focusStyles()),{width:t,height:t,WebkitTapHighlightColor:"transparent",border:0,borderRadius:e.fn.size({size:n,sizes:e.radius}),appearance:"none",WebkitAppearance:"none",padding:0,position:"relative",overflow:"hidden"}),overlay:{position:"absolute",borderRadius:e.fn.size({size:n,sizes:e.radius}),top:0,left:0,right:0,bottom:0},children:{display:"inline-flex",justifyContent:"center",alignItems:"center"},shadowOverlay:{boxShadow:"rgba(0, 0, 0, .1) 0px 0px 0px 1px inset, rgb(0, 0, 0, .15) 0px 0px 4px inset",zIndex:1},alphaOverlay:{backgroundImage:`linear-gradient(45deg, ${r} 25%, transparent 25%), linear-gradient(-45deg, ${r} 25%, transparent 25%), linear-gradient(45deg, transparent 75%, ${r} 75%), linear-gradient(-45deg, ${e.colorScheme==="dark"?e.colors.dark[7]:e.white} 75%, ${r} 75%)`,backgroundSize:"8px 8px",backgroundPosition:"0 0, 0 4px, 4px -4px, -4px 0px"}}});const BE=UE;var VE=Object.defineProperty,gl=Object.getOwnPropertySymbols,Fy=Object.prototype.hasOwnProperty,Uy=Object.prototype.propertyIsEnumerable,Gd=(e,t,n)=>t in e?VE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,HE=(e,t)=>{for(var n in t||(t={}))Fy.call(t,n)&&Gd(e,n,t[n]);if(gl)for(var n of gl(t))Uy.call(t,n)&&Gd(e,n,t[n]);return e},WE=(e,t)=>{var n={};for(var r in e)Fy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&gl)for(var r of gl(e))t.indexOf(r)<0&&Uy.call(e,r)&&(n[r]=e[r]);return n};const GE={size:25,radius:25,withShadow:!0},By=x.forwardRef((e,t)=>{const n=Qe("ColorSwatch",GE,e),{color:r,size:o,radius:i,className:l,children:a,classNames:s,styles:u,unstyled:d,withShadow:m}=n,c=WE(n,["color","size","radius","className","children","classNames","styles","unstyled","withShadow"]),{classes:y,cx:g}=BE({radius:i,size:o},{classNames:s,styles:u,unstyled:d,name:"ColorSwatch"});return j.createElement(Ge,HE({className:g(y.root,l),ref:t},c),j.createElement("div",{className:g(y.alphaOverlay,y.overlay)}),m&&j.createElement("div",{className:g(y.shadowOverlay,y.overlay)}),j.createElement("div",{className:y.overlay,style:{backgroundColor:r}}),j.createElement("div",{className:g(y.children,y.overlay)},a))});By.displayName="@mantine/core/ColorSwatch";const QE=By;var KE=ot((e,{fluid:t,size:n,sizes:r})=>({root:{paddingLeft:e.spacing.md,paddingRight:e.spacing.md,maxWidth:t?"100%":e.fn.size({size:n,sizes:r}),marginLeft:"auto",marginRight:"auto"}}));const XE=KE;var YE=Object.defineProperty,vl=Object.getOwnPropertySymbols,Vy=Object.prototype.hasOwnProperty,Hy=Object.prototype.propertyIsEnumerable,Qd=(e,t,n)=>t in e?YE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ZE=(e,t)=>{for(var n in t||(t={}))Vy.call(t,n)&&Qd(e,n,t[n]);if(vl)for(var n of vl(t))Hy.call(t,n)&&Qd(e,n,t[n]);return e},JE=(e,t)=>{var n={};for(var r in e)Vy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&vl)for(var r of vl(e))t.indexOf(r)<0&&Hy.call(e,r)&&(n[r]=e[r]);return n};const qE={sizes:{xs:540,sm:720,md:960,lg:1140,xl:1320}},Wy=x.forwardRef((e,t)=>{const n=Qe("Container",qE,e),{className:r,fluid:o,size:i,unstyled:l,sizes:a}=n,s=JE(n,["className","fluid","size","unstyled","sizes"]),{classes:u,cx:d}=XE({fluid:o,size:i,sizes:a},{unstyled:l,name:"Container"});return j.createElement(Ge,ZE({className:d(u.root,r),ref:t},s))});Wy.displayName="@mantine/core/Container";const[eP,tP]=aw("Grid component was not found in tree");var nP=Object.defineProperty,Kd=Object.getOwnPropertySymbols,rP=Object.prototype.hasOwnProperty,oP=Object.prototype.propertyIsEnumerable,Xd=(e,t,n)=>t in e?nP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,iP=(e,t)=>{for(var n in t||(t={}))rP.call(t,n)&&Xd(e,n,t[n]);if(Kd)for(var n of Kd(t))oP.call(t,n)&&Xd(e,n,t[n]);return e};const ec=(e,t)=>e==="content"?"auto":e==="auto"?"0px":e?`${100/(t/e)}%`:void 0,Gy=(e,t,n)=>n||e==="auto"||e==="content"?"unset":ec(e,t),Qy=(e,t)=>{if(e)return e==="auto"||t?1:0},Ky=(e,t)=>e===0?0:e?`${100/(t/e)}%`:void 0,Xy=(e,t)=>typeof e<"u"?t.fn.size({size:e,sizes:t.spacing})/2:void 0;function lP({sizes:e,offsets:t,orders:n,theme:r,columns:o,gutters:i,grow:l}){return Lm.reduce((a,s)=>(a[`@media (min-width: ${r.breakpoints[s]}px)`]={order:n[s],flexBasis:ec(e[s],o),padding:Xy(i[s],r),flexShrink:0,width:e[s]==="content"?"auto":void 0,maxWidth:Gy(e[s],o,l),marginLeft:Ky(t[s],o),flexGrow:Qy(e[s],l)},a),{})}var aP=ot((e,{gutter:t,gutterXs:n,gutterSm:r,gutterMd:o,gutterLg:i,gutterXl:l,grow:a,offset:s,offsetXs:u,offsetSm:d,offsetMd:m,offsetLg:c,offsetXl:y,columns:g,span:v,xs:E,sm:p,md:f,lg:h,xl:w,order:P,orderXs:$,orderSm:k,orderMd:b,orderLg:V,orderXl:I})=>({col:iP({boxSizing:"border-box",flexGrow:Qy(v,a),order:P,padding:Xy(t,e),marginLeft:Ky(s,g),flexBasis:ec(v,g),flexShrink:0,width:v==="content"?"auto":void 0,maxWidth:Gy(v,g,a)},lP({sizes:{xs:E,sm:p,md:f,lg:h,xl:w},offsets:{xs:u,sm:d,md:m,lg:c,xl:y},orders:{xs:$,sm:k,md:b,lg:V,xl:I},gutters:{xs:n,sm:r,md:o,lg:i,xl:l},theme:e,columns:g,grow:a}))}));const sP=aP;var uP=Object.defineProperty,wl=Object.getOwnPropertySymbols,Yy=Object.prototype.hasOwnProperty,Zy=Object.prototype.propertyIsEnumerable,Yd=(e,t,n)=>t in e?uP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cP=(e,t)=>{for(var n in t||(t={}))Yy.call(t,n)&&Yd(e,n,t[n]);if(wl)for(var n of wl(t))Zy.call(t,n)&&Yd(e,n,t[n]);return e},fP=(e,t)=>{var n={};for(var r in e)Yy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&wl)for(var r of wl(e))t.indexOf(r)<0&&Zy.call(e,r)&&(n[r]=e[r]);return n};const dP={};function pP(e){return e==="auto"||e==="content"?!0:typeof e=="number"&&e>0&&e%1===0}const Jy=x.forwardRef((e,t)=>{const n=Qe("GridCol",dP,e),{children:r,span:o,offset:i,offsetXs:l,offsetSm:a,offsetMd:s,offsetLg:u,offsetXl:d,xs:m,sm:c,md:y,lg:g,xl:v,order:E,orderXs:p,orderSm:f,orderMd:h,orderLg:w,orderXl:P,className:$,id:k,unstyled:b}=n,V=fP(n,["children","span","offset","offsetXs","offsetSm","offsetMd","offsetLg","offsetXl","xs","sm","md","lg","xl","order","orderXs","orderSm","orderMd","orderLg","orderXl","className","id","unstyled"]),I=tP(),Z=o||I.columns,{classes:ye,cx:Ke}=sP({gutter:I.gutter,gutterXs:I.gutterXs,gutterSm:I.gutterSm,gutterMd:I.gutterMd,gutterLg:I.gutterLg,gutterXl:I.gutterXl,offset:i,offsetXs:l,offsetSm:a,offsetMd:s,offsetLg:u,offsetXl:d,xs:m,sm:c,md:y,lg:g,xl:v,order:E,orderXs:p,orderSm:f,orderMd:h,orderLg:w,orderXl:P,grow:I.grow,columns:I.columns,span:Z},{unstyled:b,name:"Grid"});return!pP(Z)||Z>I.columns?null:j.createElement(Ge,cP({className:Ke(ye.col,$),ref:t},V),r)});Jy.displayName="@mantine/core/Col";var hP=Object.defineProperty,Zd=Object.getOwnPropertySymbols,mP=Object.prototype.hasOwnProperty,yP=Object.prototype.propertyIsEnumerable,Jd=(e,t,n)=>t in e?hP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gP=(e,t)=>{for(var n in t||(t={}))mP.call(t,n)&&Jd(e,n,t[n]);if(Zd)for(var n of Zd(t))yP.call(t,n)&&Jd(e,n,t[n]);return e};function vP(e,t){return Lm.reduce((n,r)=>(typeof e[r]<"u"&&(n[`@media (min-width: ${t.breakpoints[r]}px)`]={margin:-t.fn.size({size:e[r],sizes:t.spacing})/2}),n),{})}var wP=ot((e,{justify:t,align:n,gutter:r,gutterXs:o,gutterSm:i,gutterMd:l,gutterLg:a,gutterXl:s})=>({root:gP({margin:-e.fn.size({size:r,sizes:e.spacing})/2,display:"flex",flexWrap:"wrap",justifyContent:t,alignItems:n},vP({xs:o,sm:i,md:l,lg:a,xl:s},e))}));const _P=wP;var SP=Object.defineProperty,_l=Object.getOwnPropertySymbols,qy=Object.prototype.hasOwnProperty,eg=Object.prototype.propertyIsEnumerable,qd=(e,t,n)=>t in e?SP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xP=(e,t)=>{for(var n in t||(t={}))qy.call(t,n)&&qd(e,n,t[n]);if(_l)for(var n of _l(t))eg.call(t,n)&&qd(e,n,t[n]);return e},EP=(e,t)=>{var n={};for(var r in e)qy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&_l)for(var r of _l(e))t.indexOf(r)<0&&eg.call(e,r)&&(n[r]=e[r]);return n};const PP={gutter:"md",justify:"flex-start",align:"stretch",columns:12},ao=x.forwardRef((e,t)=>{const n=Qe("Grid",PP,e),{gutter:r,gutterXs:o,gutterSm:i,gutterMd:l,gutterLg:a,gutterXl:s,children:u,grow:d,justify:m,align:c,columns:y,className:g,id:v,unstyled:E}=n,p=EP(n,["gutter","gutterXs","gutterSm","gutterMd","gutterLg","gutterXl","children","grow","justify","align","columns","className","id","unstyled"]),{classes:f,cx:h}=_P({gutter:r,justify:m,align:c,gutterXs:o,gutterSm:i,gutterMd:l,gutterLg:a,gutterXl:s},{unstyled:E,name:"Grid"});return j.createElement(eP,{value:{gutter:r,gutterXs:o,gutterSm:i,gutterMd:l,gutterLg:a,gutterXl:s,grow:d,columns:y}},j.createElement(Ge,xP({className:h(f.root,g),ref:t},p),u))});ao.Col=Jy;ao.displayName="@mantine/core/Grid";var kP=Object.defineProperty,OP=Object.defineProperties,CP=Object.getOwnPropertyDescriptors,ep=Object.getOwnPropertySymbols,$P=Object.prototype.hasOwnProperty,RP=Object.prototype.propertyIsEnumerable,tp=(e,t,n)=>t in e?kP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jP=(e,t)=>{for(var n in t||(t={}))$P.call(t,n)&&tp(e,n,t[n]);if(ep)for(var n of ep(t))RP.call(t,n)&&tp(e,n,t[n]);return e},bP=(e,t)=>OP(e,CP(t)),NP=ot((e,{captionSide:t,horizontalSpacing:n,verticalSpacing:r,fontSize:o,withBorder:i,withColumnBorders:l})=>{const a=`1px solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`;return{root:bP(jP({},e.fn.fontStyles()),{width:"100%",borderCollapse:"collapse",captionSide:t,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,lineHeight:e.lineHeight,border:i?a:"","& caption":{marginTop:t==="top"?0:e.spacing.xs,marginBottom:t==="bottom"?0:e.spacing.xs,fontSize:e.fontSizes.sm,color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]},"& thead tr th, & tfoot tr th":{textAlign:"left",fontWeight:"bold",color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],fontSize:e.fn.size({size:o,sizes:e.fontSizes}),padding:`${e.fn.size({size:r,sizes:e.spacing})}px ${e.fn.size({size:n,sizes:e.spacing})}px`},"& thead tr th":{borderBottom:a},"& tfoot tr th":{borderTop:a},"& tbody tr td":{padding:`${e.fn.size({size:r,sizes:e.spacing})}px ${e.fn.size({size:n,sizes:e.spacing})}px`,borderTop:a,fontSize:e.fn.size({size:o,sizes:e.fontSizes})},"& tbody tr:first-of-type td":{borderTop:"none"},"& thead th, & tbody td":{borderRight:l?a:"none","&:last-of-type":{borderRight:"none",borderLeft:l?a:"none"}},"&[data-striped] tbody tr:nth-of-type(odd)":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0]},"&[data-hover] tbody tr":e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]})})}});const zP=NP;var TP=Object.defineProperty,IP=Object.defineProperties,MP=Object.getOwnPropertyDescriptors,Sl=Object.getOwnPropertySymbols,tg=Object.prototype.hasOwnProperty,ng=Object.prototype.propertyIsEnumerable,np=(e,t,n)=>t in e?TP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,LP=(e,t)=>{for(var n in t||(t={}))tg.call(t,n)&&np(e,n,t[n]);if(Sl)for(var n of Sl(t))ng.call(t,n)&&np(e,n,t[n]);return e},DP=(e,t)=>IP(e,MP(t)),AP=(e,t)=>{var n={};for(var r in e)tg.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Sl)for(var r of Sl(e))t.indexOf(r)<0&&ng.call(e,r)&&(n[r]=e[r]);return n};const FP={striped:!1,highlightOnHover:!1,captionSide:"top",horizontalSpacing:"xs",fontSize:"sm",verticalSpacing:7,withBorder:!1,withColumnBorders:!1},rg=x.forwardRef((e,t)=>{const n=Qe("Table",FP,e),{className:r,children:o,striped:i,highlightOnHover:l,captionSide:a,horizontalSpacing:s,verticalSpacing:u,fontSize:d,unstyled:m,withBorder:c,withColumnBorders:y}=n,g=AP(n,["className","children","striped","highlightOnHover","captionSide","horizontalSpacing","verticalSpacing","fontSize","unstyled","withBorder","withColumnBorders"]),{classes:v,cx:E}=zP({captionSide:a,verticalSpacing:u,horizontalSpacing:s,fontSize:d,withBorder:c,withColumnBorders:y},{unstyled:m,name:"Table"});return j.createElement(Ge,DP(LP({},g),{component:"table",ref:t,className:E(v.root,r),"data-striped":i||void 0,"data-hover":l||void 0}),o)});rg.displayName="@mantine/core/Table";class rp extends Error{constructor(n,r,o){super(o);Ae(this,"url");Ae(this,"status");Ae(this,"statusText");Ae(this,"body");Ae(this,"request");this.name="ApiError",this.url=r.url,this.status=r.status,this.statusText=r.statusText,this.body=r.body,this.request=n}}class UP extends Error{constructor(t){super(t),this.name="CancelError"}get isCancelled(){return!0}}var m2;class BP{constructor(t){Ae(this,m2);Ae(this,"_isResolved");Ae(this,"_isRejected");Ae(this,"_isCancelled");Ae(this,"_cancelHandlers");Ae(this,"_promise");Ae(this,"_resolve");Ae(this,"_reject");this._isResolved=!1,this._isRejected=!1,this._isCancelled=!1,this._cancelHandlers=[],this._promise=new Promise((n,r)=>{this._resolve=n,this._reject=r;const o=a=>{var s;this._isResolved||this._isRejected||this._isCancelled||(this._isResolved=!0,(s=this._resolve)==null||s.call(this,a))},i=a=>{var s;this._isResolved||this._isRejected||this._isCancelled||(this._isRejected=!0,(s=this._reject)==null||s.call(this,a))},l=a=>{this._isResolved||this._isRejected||this._isCancelled||this._cancelHandlers.push(a)};return Object.defineProperty(l,"isResolved",{get:()=>this._isResolved}),Object.defineProperty(l,"isRejected",{get:()=>this._isRejected}),Object.defineProperty(l,"isCancelled",{get:()=>this._isCancelled}),t(o,i,l)})}then(t,n){return this._promise.then(t,n)}catch(t){return this._promise.catch(t)}finally(t){return this._promise.finally(t)}cancel(){var t;if(!(this._isResolved||this._isRejected||this._isCancelled)){if(this._isCancelled=!0,this._cancelHandlers.length)try{for(const n of this._cancelHandlers)n()}catch(n){console.warn("Cancellation threw an error",n);return}this._cancelHandlers.length=0,(t=this._reject)==null||t.call(this,new UP("Request aborted"))}}get isCancelled(){return this._isCancelled}}m2=Symbol.toStringTag;const It={BASE:"",VERSION:"0.1.0",WITH_CREDENTIALS:!1,CREDENTIALS:"include",TOKEN:void 0,USERNAME:void 0,PASSWORD:void 0,HEADERS:void 0,ENCODE_PATH:void 0};var qt=(e=>(e.THROUGH="through",e.DIVERGING="diverging",e.CONVERGING="converging",e))(qt||{}),gr=(e=>(e.STRAIGHT="straight",e.CURVE="curve",e))(gr||{}),an=(e=>(e.A="A",e.B="B",e))(an||{});const tc=e=>e!=null,Fo=e=>typeof e=="string",Fa=e=>Fo(e)&&e!=="",nc=e=>typeof e=="object"&&typeof e.type=="string"&&typeof e.stream=="function"&&typeof e.arrayBuffer=="function"&&typeof e.constructor=="function"&&typeof e.constructor.name=="string"&&/^(Blob|File)$/.test(e.constructor.name)&&/^(Blob|File)$/.test(e[Symbol.toStringTag]),og=e=>e instanceof FormData,VP=e=>{try{return btoa(e)}catch{return Buffer.from(e).toString("base64")}},HP=e=>{const t=[],n=(o,i)=>{t.push(`${encodeURIComponent(o)}=${encodeURIComponent(String(i))}`)},r=(o,i)=>{tc(i)&&(Array.isArray(i)?i.forEach(l=>{r(o,l)}):typeof i=="object"?Object.entries(i).forEach(([l,a])=>{r(`${o}[${l}]`,a)}):n(o,i))};return Object.entries(e).forEach(([o,i])=>{r(o,i)}),t.length>0?`?${t.join("&")}`:""},WP=(e,t)=>{const n=e.ENCODE_PATH||encodeURI,r=t.url.replace("{api-version}",e.VERSION).replace(/{(.*?)}/g,(i,l)=>{var a;return(a=t.path)!=null&&a.hasOwnProperty(l)?n(String(t.path[l])):i}),o=`${e.BASE}${r}`;return t.query?`${o}${HP(t.query)}`:o},GP=e=>{if(e.formData){const t=new FormData,n=(r,o)=>{Fo(o)||nc(o)?t.append(r,o):t.append(r,JSON.stringify(o))};return Object.entries(e.formData).filter(([r,o])=>tc(o)).forEach(([r,o])=>{Array.isArray(o)?o.forEach(i=>n(r,i)):n(r,o)}),t}},pi=async(e,t)=>typeof t=="function"?t(e):t,QP=async(e,t)=>{const n=await pi(t,e.TOKEN),r=await pi(t,e.USERNAME),o=await pi(t,e.PASSWORD),i=await pi(t,e.HEADERS),l=Object.entries({Accept:"application/json",...i,...t.headers}).filter(([a,s])=>tc(s)).reduce((a,[s,u])=>({...a,[s]:String(u)}),{});if(Fa(n)&&(l.Authorization=`Bearer ${n}`),Fa(r)&&Fa(o)){const a=VP(`${r}:${o}`);l.Authorization=`Basic ${a}`}return t.body&&(t.mediaType?l["Content-Type"]=t.mediaType:nc(t.body)?l["Content-Type"]=t.body.type||"application/octet-stream":Fo(t.body)?l["Content-Type"]="text/plain":og(t.body)||(l["Content-Type"]="application/json")),new Headers(l)},KP=e=>{var t;if(e.body)return(t=e.mediaType)!=null&&t.includes("/json")?JSON.stringify(e.body):Fo(e.body)||nc(e.body)||og(e.body)?e.body:JSON.stringify(e.body)},XP=async(e,t,n,r,o,i,l)=>{const a=new AbortController,s={headers:i,body:r??o,method:t.method,signal:a.signal};return e.WITH_CREDENTIALS&&(s.credentials=e.CREDENTIALS),l(()=>a.abort()),await fetch(n,s)},YP=(e,t)=>{if(t){const n=e.headers.get(t);if(Fo(n))return n}},ZP=async e=>{if(e.status!==204)try{const t=e.headers.get("Content-Type");if(t)return t.toLowerCase().startsWith("application/json")?await e.json():await e.text()}catch(t){console.error(t)}},JP=(e,t)=>{const r={400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable",...e.errors}[t.status];if(r)throw new rp(e,t,r);if(!t.ok)throw new rp(e,t,"Generic Error")},Mt=(e,t)=>new BP(async(n,r,o)=>{try{const i=WP(e,t),l=GP(t),a=KP(t),s=await QP(e,t);if(!o.isCancelled){const u=await XP(e,t,i,a,l,s,o),d=await ZP(u),m=YP(u,t.responseHeader),c={url:i,ok:u.ok,status:u.status,statusText:u.statusText,body:m??d};JP(t,c),n(c.body)}}catch(i){r(i)}});class Qt{static hello(){return Mt(It,{method:"GET",url:"/api/hello"})}static getState(){return Mt(It,{method:"GET",url:"/api/state"})}static moveTrain(t,n){return Mt(It,{method:"POST",url:"/api/state/trains/{train_id}/move",path:{train_id:t},body:n,mediaType:"application/json",errors:{422:"Validation Error"}})}static putTrain(t,n){return Mt(It,{method:"POST",url:"/api/state/trains/{train_id}/put",path:{train_id:t},body:n,mediaType:"application/json",errors:{422:"Validation Error"}})}static updateJunction(t,n){return Mt(It,{method:"POST",url:"/api/state/junctions/{junction_id}/update",path:{junction_id:t},body:n,mediaType:"application/json",errors:{422:"Validation Error"}})}static detectObstacle(t){return Mt(It,{method:"POST",url:"/api/state/obstacles/{obstacle_id}/detect",path:{obstacle_id:t},errors:{422:"Validation Error"}})}static clearObstacle(t){return Mt(It,{method:"POST",url:"/api/state/obstacles/{obstacle_id}/clear",path:{obstacle_id:t},errors:{422:"Validation Error"}})}static blockSection(t){return Mt(It,{method:"POST",url:"/api/state/sections/{section_id}/block",path:{section_id:t},errors:{422:"Validation Error"}})}static unblockSection(t){return Mt(It,{method:"POST",url:"/api/state/sections/{section_id}/unblock",path:{section_id:t},errors:{422:"Validation Error"}})}}const qP=({children:e})=>R.jsx(ky,{padding:"md",header:R.jsx(xy,{height:60,p:"md",sx:t=>({display:"flex",alignItems:"center",backgroundColor:t.colors.blue[5],fontSize:18,color:t.white,fontWeight:700}),children:"Plarailers Train Control System"}),children:e}),Et=x.createContext(null),Wn=x.createContext(null),e2=({position:e})=>R.jsx("rect",{x:e.x-60/2,y:e.y-20/2,width:60,height:20,fill:"white"}),t2=({id:e,points:t})=>{const n=x.useContext(Et);if(!n)return null;const r=n.sections[e],o=op(t[0],t[1],4),i=t.length,l=op(t[i-1],t[i-2],4),a=[o,...t.slice(1,-1),l];return R.jsx("polyline",{points:a.map(s=>`${s.x},${s.y}`).join(" "),fill:"none",stroke:r.is_blocked?"red":"white",strokeWidth:r.is_blocked?4:2,strokeLinecap:"square"})},op=(e,t,n)=>({x:e.x+(t.x-e.x)/Math.hypot(t.x-e.x,t.y-e.y)*n,y:e.y+(t.y-e.y)/Math.hypot(t.x-e.x,t.y-e.y)*n}),ip=e=>{const t=Math.hypot(e.x,e.y);return{x:e.x/t,y:e.y/t}},zn=(e,t)=>{let n=0;for(let o=0;o=a)r-=a;else return{position:{x:i.x+(l.x-i.x)*(r/a),y:i.y+(l.y-i.y)*(r/a)},direction:{x:l.x-i.x,y:l.y-i.y},partitionIndex:o+1}}{const o=t[t.length-2],i=t[t.length-1];return{position:i,direction:{x:i.x-o.x,y:i.y-o.y},partitionIndex:t.length}}},n2=({id:e})=>{const t=dt(),n=x.useContext(Et),r=x.useContext(Wn);if(!(n&&r))return null;const o=n.trains[e],{position:i,angle:l}=lp(o.head_position,n,r),{position:a,angle:s}=lp(o.tail_position,n,r),u=r2(o,n,r),d=r.trains[e];return R.jsxs(R.Fragment,{children:[R.jsx("polyline",{points:u.map(m=>`${m.x},${m.y}`).join(" "),fill:"none",stroke:d.fill,strokeWidth:4,strokeLinecap:"round",strokeLinejoin:"miter"}),R.jsxs("g",{transform:`translate(${i.x}, ${i.y})`,children:[R.jsx("g",{transform:`rotate(${l})`,children:R.jsx("polyline",{points:"-5,5 0,5 5,0 0,-5 -5,-5",fill:d.fill,stroke:d.stroke})}),o.departure_time!=null&&R.jsx("g",{transform:`translate(${0}, ${-10})`,children:R.jsx("text",{textAnchor:"middle",fill:t.colors.gray[5],children:o.departure_time-n.current_time})})]}),R.jsx("g",{transform:`translate(${a.x}, ${a.y})`,children:R.jsx("g",{transform:`rotate(${s})`,children:R.jsx("polyline",{points:"0,-5 -5,-5 -5,5 0,5",fill:d.fill,stroke:d.stroke})})})]})},lp=(e,t,n)=>{const r=t.sections[e.section_id],o=n.sections[e.section_id],{position:i,direction:l}=zn(e.mileage/r.length,o.points);e.target_junction_id===r.connected_junction_ids[an.A]&&(l.x*=-1,l.y*=-1);const a=Math.atan2(l.y,l.x)/Math.PI*180;return{position:i,angle:a}},r2=(e,t,n)=>{const r=[];if(e.head_position.section_id===e.tail_position.section_id){const o=t.sections[e.tail_position.section_id],i=n.sections[e.tail_position.section_id],{position:l,direction:a,partitionIndex:s}=zn(e.tail_position.mileage/o.length,i.points);e.tail_position.target_junction_id===o.connected_junction_ids[an.A]&&(a.x*=-1,a.y*=-1);const u=t.sections[e.head_position.section_id],d=n.sections[e.head_position.section_id],{position:m,direction:c,partitionIndex:y}=zn(e.head_position.mileage/u.length,d.points);e.head_position.target_junction_id===u.connected_junction_ids[an.A]&&(c.x*=-1,c.y*=-1),y<=s?r.push(m,...d.points.slice(y,s),l):r.push(l,...d.points.slice(s,y),m)}else{const o=t.sections[e.tail_position.section_id],i=n.sections[e.tail_position.section_id],{position:l,direction:a,partitionIndex:s}=zn(e.tail_position.mileage/o.length,i.points);e.tail_position.target_junction_id===o.connected_junction_ids[an.B]?r.push(l,...i.points.slice(s)):(a.x*=-1,a.y*=-1,r.push(l,...i.points.slice(0,s).reverse()));for(const g of e.covered_section_ids){const v=n.sections[g];v.points[0].x===r[r.length-1].x&&v.points[0].y===r[r.length-1].y?r.push(...v.points):r.push(...v.points.slice().reverse())}const u=t.sections[e.head_position.section_id],d=n.sections[e.head_position.section_id],{position:m,direction:c,partitionIndex:y}=zn(e.head_position.mileage/u.length,d.points);e.head_position.target_junction_id===u.connected_junction_ids[an.B]?r.push(...d.points.slice(0,y),m):(c.x*=-1,c.y*=-1,r.push(...d.points.slice(y).reverse(),m))}return r},o2=({id:e,position:t})=>{const n=dt(),r=x.useContext(Et),o=x.useContext(Wn);if(!(r&&o))return null;const i=r.junctions[e],l={};for(const u of[qt.CONVERGING,qt.THROUGH,qt.DIVERGING]){const d=i.connected_section_ids[u],m=r.sections[d];if(e===m.connected_junction_ids[an.A]){const c=o.sections[d].points,y=c[0],g=c[1];l[u]=ip({x:g.x-y.x,y:g.y-y.y})}else if(e===m.connected_junction_ids[an.B]){const c=o.sections[d].points,y=c[c.length-1],g=c[c.length-2];l[u]=ip({x:g.x-y.x,y:g.y-y.y})}}let a;switch(i.current_direction){case gr.STRAIGHT:{a=qt.THROUGH;break}case gr.CURVE:{a=qt.DIVERGING;break}}const s=6;return R.jsxs("g",{transform:`translate(${t.x}, ${t.y})`,children:[R.jsx("circle",{cx:0,cy:0,r:s,fill:n.white,stroke:n.colors.gray[6]}),R.jsx("polyline",{points:[{x:l[qt.CONVERGING].x*s,y:l[qt.CONVERGING].y*s},{x:0,y:0},{x:l[a].x*s,y:l[a].y*s}].map(u=>`${u.x},${u.y}`).join(" "),fill:"none",stroke:n.colors.blue[7],strokeWidth:4})]})},i2=({id:e})=>{const t=dt(),n=x.useContext(Et),r=x.useContext(Wn);if(!(n&&r))return null;const o=n.stops[e],i=n.sections[o.position.section_id],l=r.sections[o.position.section_id],{position:a,direction:s}=zn(o.position.mileage/i.length,l.points),u=Math.atan2(s.y,s.x)/Math.PI*180;return R.jsx("g",{transform:`translate(${a.x}, ${a.y})`,children:R.jsx("g",{transform:`rotate(${u+180})`,children:R.jsxs("g",{transform:"translate(0, -10)",children:[R.jsx("polyline",{points:"0,0 0,10",stroke:t.colors.dark[2],strokeWidth:2}),R.jsx("polygon",{points:"-5,0 0,5 5,0 0,-5",fill:t.white,stroke:t.colors.red[7],strokeWidth:2})]})})})},l2=({id:e})=>{const t=dt(),n=x.useContext(Et),r=x.useContext(Wn);if(!(n&&r))return null;const o=n.obstacles[e];if(!o.is_detected)return null;const i=n.sections[o.position.section_id],l=r.sections[o.position.section_id],{position:a,direction:s}=zn(o.position.mileage/i.length,l.points),u=Math.atan2(s.y,s.x)/Math.PI*180;return R.jsx("g",{transform:`translate(${a.x}, ${a.y})`,children:R.jsx("g",{transform:`rotate(${u})`,children:R.jsxs("g",{children:[R.jsx("polyline",{points:"-10,-10 10,10",stroke:t.colors.red[8],strokeWidth:6}),R.jsx("polyline",{points:"-10,10 10,-10",stroke:t.colors.red[8],strokeWidth:6}),R.jsx("animate",{attributeName:"opacity",values:"1;0;1;1;1;1",dur:"2s",repeatCount:"indefinite"})]})})})},a2=({children:e})=>{const t=dt(),n=x.useContext(Et),r=x.useContext(Wn);return n&&r?R.jsxs("svg",{width:"100%",viewBox:`0 0 ${r.width} ${r.height}`,children:[R.jsx("rect",{width:r.width,height:r.height,fill:t.colors.dark[7]}),Object.entries(r.platforms).map(([o,i])=>R.jsx(e2,{position:i.position},o)),Object.entries(r.stops).filter(([o,i])=>n.stops[o]).map(([o,i])=>R.jsx(i2,{id:o},o)),Object.entries(r.sections).filter(([o,i])=>n.sections[o]).map(([o,i])=>R.jsx(t2,{id:o,points:i.points},o)),Object.entries(r.junctions).filter(([o,i])=>n.junctions[o]).map(([o,i])=>R.jsx(o2,{id:o,position:i.position},o)),Object.entries(r.obstacles).filter(([o,i])=>n.obstacles[o]).map(([o,i])=>R.jsx(l2,{id:o},o)),Object.entries(r.trains).filter(([o,i])=>n.trains[o]).map(([o,i])=>R.jsx(n2,{id:o},o)),e]}):null},s2=()=>R.jsx("div",{children:R.jsxs(zy,{children:[R.jsx(ap,{id:"t0",delta:10}),R.jsx(ap,{id:"t1",delta:10}),R.jsx(hi,{id:"j0"}),R.jsx(hi,{id:"j1"}),R.jsx(hi,{id:"j2"}),R.jsx(hi,{id:"j3"}),R.jsx(u2,{id:"obstacle_0"}),R.jsx(c2,{id:"s3"})]})}),ap=({id:e,delta:t})=>R.jsxs(ql,{styles:n=>({label:{fontFamily:n.fontFamilyMonospace}}),onClick:()=>{Qt.moveTrain(e,{delta:t})},children:["MoveTrain(",e,", ",t,")"]},e),hi=({id:e})=>{const t=x.useContext(Et);if(!t)return null;const n=t.junctions[e];return R.jsxs(ql,{styles:r=>({label:{fontFamily:r.fontFamilyMonospace}}),onClick:()=>{n.current_direction==gr.STRAIGHT?Qt.updateJunction(e,{direction:gr.CURVE}):Qt.updateJunction(e,{direction:gr.STRAIGHT})},children:["ToggleJunction(",e,")"]},e)},u2=({id:e})=>{const t=x.useContext(Et);if(!t)return null;const n=t.obstacles[e];return R.jsx(ql,{variant:n.is_detected?"filled":"light",color:"red",styles:r=>({label:{fontFamily:r.fontFamilyMonospace}}),onClick:()=>{n.is_detected?Qt.clearObstacle(e):Qt.detectObstacle(e)},children:n.is_detected?`ClearObstacle(${e})`:`DetectObstacle(${e})`})},c2=({id:e})=>{const t=x.useContext(Et);if(!t)return null;const n=t.sections[e];return R.jsx(ql,{variant:n.is_blocked?"filled":"light",color:"red",styles:r=>({label:{fontFamily:r.fontFamilyMonospace}}),onClick:()=>{n.is_blocked?Qt.unblockSection(e):Qt.blockSection(e)},children:n.is_blocked?`UnblockSection(${e})`:`BlockSection(${e})`})},f2=()=>{const e=x.useContext(Et),t=x.useContext(Wn);return e&&t?R.jsxs(rg,{sx:n=>({fontFamily:n.fontFamilyMonospace}),children:[R.jsx("thead",{children:R.jsxs("tr",{children:[R.jsx("th",{}),R.jsx("th",{children:"train"}),R.jsx("th",{children:"speed"}),R.jsx("th",{children:"voltage"})]})}),R.jsx("tbody",{children:e&&Object.entries(e.trains).filter(([n,r])=>t.trains[n]).map(([n,r])=>R.jsxs("tr",{children:[R.jsx("td",{children:R.jsx(QE,{color:t.trains[n].fill})}),R.jsx("td",{children:n}),R.jsx("td",{children:r.speed_command.toFixed(2)}),R.jsx("td",{children:r.voltage_mV})]},n))})]}):null},d2={width:440,height:340,platforms:{},junctions:{j0:{position:{x:400,y:160}},j1:{position:{x:360,y:200}},j2:{position:{x:280,y:280}},j3:{position:{x:260,y:300}}},sections:{s0:{from:"j0",to:"j3",points:[{x:400,y:160},{x:400,y:280},{x:380,y:300},{x:260,y:300}]},s1:{from:"j3",to:"j0",points:[{x:260,y:300},{x:60,y:300},{x:40,y:280},{x:40,y:220},{x:220,y:40},{x:380,y:40},{x:400,y:60},{x:400,y:160}]},s2:{from:"j1",to:"j2",points:[{x:360,y:200},{x:360,y:250},{x:330,y:280},{x:280,y:280}]},s3:{from:"j2",to:"j1",points:[{x:280,y:280},{x:110,y:280},{x:80,y:250},{x:80,y:110},{x:110,y:80},{x:330,y:80},{x:360,y:110},{x:360,y:200}]},s4:{from:"j0",to:"j1",points:[{x:400,y:160},{x:360,y:200}]},s5:{from:"j2",to:"j3",points:[{x:280,y:280},{x:260,y:300}]}},trains:{t0:{fill:Xe.colors.yellow[4],stroke:Xe.colors.yellow[9]},t1:{fill:Xe.colors.green[5],stroke:Xe.colors.green[9]},t2:{fill:Xe.colors.cyan[4],stroke:Xe.colors.cyan[9]},t3:{fill:Xe.colors.indigo[5],stroke:Xe.colors.indigo[9]},t4:{fill:Xe.colors.red[5],stroke:Xe.colors.red[9]}},stops:{},obstacles:{obstacle_0:{}}},p2=()=>{const e=dt(),[t,n]=x.useState(null),[r,o]=x.useState(()=>new Date);return x.useEffect(()=>{Qt.getState().then(i=>{o(new Date),n(i)})},[]),x.useEffect(()=>{const i=setInterval(()=>{Qt.getState().then(l=>{o(new Date),n(l)})},500);return()=>{clearInterval(i)}},[]),R.jsx(Et.Provider,{value:t,children:R.jsx(Wn.Provider,{value:d2,children:R.jsx(qP,{children:R.jsx(Wy,{children:R.jsxs(My,{children:[R.jsxs(ao,{children:[R.jsx(ao.Col,{span:8,children:R.jsx(a2,{children:R.jsx("text",{x:10,y:20,fontSize:12,fontFamily:e.fontFamilyMonospace,fill:e.white,children:r.toLocaleString()})})}),R.jsx(ao.Col,{span:4,children:R.jsx(f2,{})})]}),R.jsx(s2,{}),R.jsx(Ay,{block:!0,children:JSON.stringify(t,null,4)})]})})})})})},h2=ow([{path:"/",element:R.jsx(p2,{})}]);Ua.createRoot(document.getElementById("root")).render(R.jsx(j.StrictMode,{children:R.jsx(ey,{withGlobalStyles:!0,withNormalizeCSS:!0,theme:{colorScheme:"dark"},children:R.jsx(ew,{router:h2})})})); +>>>>>>>> main:ptcs/ptcs_ui/dist/assets/index-5699ed18.js diff --git a/ptcs/ptcs_ui/src/components/Information.tsx b/ptcs/ptcs_ui/src/components/Information.tsx index 5e34413..24899c5 100644 --- a/ptcs/ptcs_ui/src/components/Information.tsx +++ b/ptcs/ptcs_ui/src/components/Information.tsx @@ -17,6 +17,7 @@ export const Information: React.FC = () => { train speed + voltage @@ -30,6 +31,7 @@ export const Information: React.FC = () => { {id} {train.speed_command.toFixed(2)} + {train.voltage_mV} ))} diff --git a/train/train_controller.py b/train/train_controller.py index ea66f90..8fa4681 100644 --- a/train/train_controller.py +++ b/train/train_controller.py @@ -8,13 +8,25 @@ if platform.system() == "Windows": ADDRESS_T0 = 'e0:5a:1b:e2:7a:f2' ADDRESS_T1 = '94:b5:55:84:15:42' + ADDRESS_T2 = 'e0:5a:1b:e2:7b:1e' + ADDRESS_T3 = '1c:9d:c2:66:84:32' + ADDRESS_T4 = '24:4c:ab:f5:c6:3e' + elif platform.system() == "Darwin": ADDRESS_T0 = "00B55AE6-34AA-23C2-8C7B-8C11E6998E12" ADDRESS_T1 = "F2158243-18BB-D34C-88BC-F8F193CAD15E" + ADDRESS_T2 = 'EB57E065-90A0-B6D0-98BA-81096FA5765E' + ADDRESS_T3 = '4AA3AAE5-A039-8484-013C-32AD94F50BE0' + ADDRESS_T4 = 'FC44FB3F-CF7D-084C-EA29-7AFD10C47A57' + else: raise Exception(f"{platform.system()} not supported") +####### TODO: 車両のアドレスを指定してください ####### +address = ADDRESS_T2 +################################################# + SERVICE_UUID = "63cb613b-6562-4aa5-b602-030f103834a4" CHARACTERISTIC_SPEED_UUID = "88c9d9ae-bd53-4ab3-9f42-b3547575a743" CHARACTERISTIC_POSITIONID_UUID = "8bcd68d5-78ca-c1c3-d1ba-96d527ce8968" @@ -32,8 +44,7 @@ async def main(): for d in devices: print(" - ", d) - ####### TODO: クライアントのアドレスを選択してください ####### - async with BleakClient(ADDRESS_T0) as client: + async with BleakClient(address) as client: print("Connected to", client) print("Services:") for service in client.services: @@ -52,12 +63,22 @@ async def main(): await client.start_notify(characteristicRotation, rotationNotification_callback) await client.start_notify(characteristicVoltage, voltageNotification_callback) - i=150 #3V時171で回り始める - while(i<=255): - i = i+1 + if address == ADDRESS_T0: + i = 220 + elif address == ADDRESS_T1: + i = 200 + elif address == ADDRESS_T2: + i = 210 + elif address == ADDRESS_T3: + i = 220 + elif address == ADDRESS_T4: + i = 210 + + while(i<256): await client.write_gatt_char(characteristicSpeed, f"{i}".encode()) print("motorInput:", i) await asyncio.sleep(0.3) + async def positionIdNotification_callback(sender, data):