Experimental Flight Interface

Improve your plane with the interface that offers experimental features.

As of 2024-03-03. See the latest version.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Experimental Flight Interface
// @namespace    https://github.com/Ferhatduran55/geofs-experimental-fi
// @version      0.7.8
// @description  Improve your plane with the interface that offers experimental features.
// @author       Ferhatduran55
// @match        https://www.geo-fs.com/geofs.php?v=3.7
// @grant        GM_addStyle
// @grant        GM_setValue
// @grant        GM_getValue
// @grant        GM_deleteValue
// @grant        GM_listValues
// @grant        GM_info
// @grant        unsafeWindow
// @license      MIT
// @homepage     https://greasyfork.org/scripts/488227
// @supportURL   https://greasyfork.org/scripts/488227/feedback
// @run-at       document-end
// ==/UserScript==

(function(){"use strict";try{typeof document<"u"&&GM.addStyle('*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.static{position:static}.m-2{margin:.5rem}.mt-4{margin-top:1rem}.flex{display:flex}.h-5{height:1.25rem}.w-11\\/12{width:91.666667%}.w-5{width:1.25rem}.w-fit{width:-moz-fit-content;width:fit-content}.w-max{width:-moz-max-content;width:max-content}.flex-auto{flex:1 1 auto}.flex-none{flex:none}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-4{gap:1rem}.rounded-md{border-radius:.375rem}.border-0{border-width:0px}.bg-sky-600{--tw-bg-opacity: 1;background-color:rgb(2 132 199 / var(--tw-bg-opacity))}.p-2{padding:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.pb-4{padding-bottom:1rem}.pl-2{padding-left:.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-medium{font-weight:500}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.marker\\:content-none *::marker{--tw-content: none;content:var(--tw-content)}.marker\\:content-none::marker{--tw-content: none;content:var(--tw-content)}.hover\\:cursor-pointer:hover{cursor:pointer}.hover\\:bg-sky-700:hover{--tw-bg-opacity: 1;background-color:rgb(3 105 161 / var(--tw-bg-opacity))}')}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
const p={context:void 0,registry:void 0};function ve(e){p.context=e}const Rt=(e,t)=>e===t,W=Symbol("solid-proxy"),Ye=Symbol("solid-track"),Ne={equals:Rt};let wt=St;const te=1,je=2,bt={owned:null,cleanups:null,context:null,owner:null},Ge={};var _=null;let fe=null,Ft=null,C=null,L=null,H=null,qe=0;function ie(e,t){const n=C,s=_,i=e.length===0,r=t===void 0?s:t,o=i?bt:{owned:null,cleanups:null,context:r?r.context:null,owner:r},l=i?e:()=>e(()=>F(()=>We(o)));_=o,C=null;try{return ee(l,!0)}finally{C=n,_=s}}function V(e,t){t=t?Object.assign({},Ne,t):Ne;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},s=i=>(typeof i=="function"&&(i=i(n.value)),xt(n,i));return[At.bind(n),s]}function lt(e,t,n){const s=Ke(e,t,!0,te);be(s)}function k(e,t,n){const s=Ke(e,t,!1,te);be(s)}function he(e,t,n){wt=Wt;const s=Ke(e,t,!1,te),i=ge&&nt(ge);i&&(s.suspense=i),(!n||!n.render)&&(s.user=!0),H?H.push(s):be(s)}function I(e,t,n){n=n?Object.assign({},Ne,n):Ne;const s=Ke(e,t,!0,0);return s.observers=null,s.observerSlots=null,s.comparator=n.equals||void 0,be(s),At.bind(s)}function Bt(e){return e&&typeof e=="object"&&"then"in e}function at(e,t,n){let s,i,r;arguments.length===2&&typeof t=="object"||arguments.length===1?(s=!0,i=e,r=t||{}):(s=e,i=t,r=n||{});let o=null,l=Ge,a=null,f=!1,c=!1,u="initialValue"in r,d=typeof s=="function"&&I(s);const h=new Set,[$,y]=(r.storage||V)(r.initialValue),[x,T]=V(void 0),[m,b]=V(void 0,{equals:!1}),[w,R]=V(u?"ready":"unresolved");if(p.context){a=`${p.context.id}${p.context.count++}`;let S;r.ssrLoadFrom==="initial"?l=r.initialValue:p.load&&(S=p.load(a))&&(l=S)}function P(S,v,E,D){return o===S&&(o=null,D!==void 0&&(u=!0),(S===l||v===l)&&r.onHydrated&&queueMicrotask(()=>r.onHydrated(D,{value:v})),l=Ge,B(v,E)),v}function B(S,v){ee(()=>{v===void 0&&y(()=>S),R(v!==void 0?"errored":u?"ready":"unresolved"),T(v);for(const E of h.keys())E.decrement();h.clear()},!1)}function U(){const S=ge&&nt(ge),v=$(),E=x();if(E!==void 0&&!o)throw E;return C&&!C.user&&S&&lt(()=>{m(),o&&(S.resolved&&fe&&f?fe.promises.add(o):h.has(S)||(S.increment(),h.add(S)))}),v}function X(S=!0){if(S!==!1&&c)return;c=!1;const v=d?d():s;if(f=fe,v==null||v===!1){P(o,F($));return}const E=l!==Ge?l:F(()=>i(v,{value:$(),refetching:S}));return Bt(E)?(o=E,"value"in E?(E.status==="success"?P(o,E.value,void 0,v):P(o,void 0,void 0,v),E):(c=!0,queueMicrotask(()=>c=!1),ee(()=>{R(u?"refreshing":"pending"),b()},!1),E.then(D=>P(E,D,void 0,v),D=>P(E,void 0,Tt(D),v)))):(P(o,E,void 0,v),E)}return Object.defineProperties(U,{state:{get:()=>w()},error:{get:()=>x()},loading:{get(){const S=w();return S==="pending"||S==="refreshing"}},latest:{get(){if(!u)return U();const S=x();if(S&&!o)throw S;return $()}}}),d?lt(()=>X(!1)):X(!1),[U,{refetch:X,mutate:y}]}function Ut(e){return ee(e,!1)}function F(e){if(C===null)return e();const t=C;C=null;try{return e()}finally{C=t}}function He(e){he(()=>F(e))}function oe(e){return _===null||(_.cleanups===null?_.cleanups=[e]:_.cleanups.push(e)),e}function Qe(){return C}function Je(){return _}function Vt(e,t){const n=_,s=C;_=e,C=null;try{return ee(t,!0)}catch(i){it(i)}finally{_=n,C=s}}function zt(e){H.push.apply(H,e),e.length=0}function $t(e,t){const n=Symbol("context");return{id:n,Provider:Gt(n),defaultValue:e}}function nt(e){return _&&_.context&&_.context[e.id]!==void 0?_.context[e.id]:e.defaultValue}function vt(e){const t=I(e),n=I(()=>Ze(t()));return n.toArray=()=>{const s=n();return Array.isArray(s)?s:s!=null?[s]:[]},n}let ge;function qt(){return ge||(ge=$t())}function At(){if(this.sources&&this.state)if(this.state===te)be(this);else{const e=L;L=null,ee(()=>Me(this),!1),L=e}if(C){const e=this.observers?this.observers.length:0;C.sources?(C.sources.push(this),C.sourceSlots.push(e)):(C.sources=[this],C.sourceSlots=[e]),this.observers?(this.observers.push(C),this.observerSlots.push(C.sources.length-1)):(this.observers=[C],this.observerSlots=[C.sources.length-1])}return this.value}function xt(e,t,n){let s=e.value;return(!e.comparator||!e.comparator(s,t))&&(e.value=t,e.observers&&e.observers.length&&ee(()=>{for(let i=0;i<e.observers.length;i+=1){const r=e.observers[i],o=fe&&fe.running;o&&fe.disposed.has(r),(o?!r.tState:!r.state)&&(r.pure?L.push(r):H.push(r),r.observers&&_t(r)),o||(r.state=te)}if(L.length>1e6)throw L=[],new Error},!1)),t}function be(e){if(!e.fn)return;We(e);const t=qe;Ht(e,e.value,t)}function Ht(e,t,n){let s;const i=_,r=C;C=_=e;try{s=e.fn(t)}catch(o){return e.pure&&(e.state=te,e.owned&&e.owned.forEach(We),e.owned=null),e.updatedAt=n+1,it(o)}finally{C=r,_=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?xt(e,s):e.value=s,e.updatedAt=n)}function Ke(e,t,n,s=te,i){const r={fn:e,state:s,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:_,context:_?_.context:null,pure:n};return _===null||_!==bt&&(_.owned?_.owned.push(r):_.owned=[r]),r}function Ie(e){if(e.state===0)return;if(e.state===je)return Me(e);if(e.suspense&&F(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<qe);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if(e=t[n],e.state===te)be(e);else if(e.state===je){const s=L;L=null,ee(()=>Me(e,t[0]),!1),L=s}}function ee(e,t){if(L)return e();let n=!1;t||(L=[]),H?n=!0:H=[],qe++;try{const s=e();return Kt(n),s}catch(s){n||(H=null),L=null,it(s)}}function Kt(e){if(L&&(St(L),L=null),e)return;const t=H;H=null,t.length&&ee(()=>wt(t),!1)}function St(e){for(let t=0;t<e.length;t++)Ie(e[t])}function Wt(e){let t,n=0;for(t=0;t<e.length;t++){const s=e[t];s.user?e[n++]=s:Ie(s)}if(p.context){if(p.count){p.effects||(p.effects=[]),p.effects.push(...e.slice(0,n));return}else p.effects&&(e=[...p.effects,...e],n+=p.effects.length,delete p.effects);ve()}for(t=0;t<n;t++)Ie(e[t])}function Me(e,t){e.state=0;for(let n=0;n<e.sources.length;n+=1){const s=e.sources[n];if(s.sources){const i=s.state;i===te?s!==t&&(!s.updatedAt||s.updatedAt<qe)&&Ie(s):i===je&&Me(s,t)}}}function _t(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=je,n.pure?L.push(n):H.push(n),n.observers&&_t(n))}}function We(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),s=e.sourceSlots.pop(),i=n.observers;if(i&&i.length){const r=i.pop(),o=n.observerSlots.pop();s<i.length&&(r.sourceSlots[o]=s,i[s]=r,n.observerSlots[s]=o)}}if(e.owned){for(t=e.owned.length-1;t>=0;t--)We(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0}function Tt(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function it(e,t=_){throw Tt(e)}function Ze(e){if(typeof e=="function"&&!e.length)return Ze(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const s=Ze(e[n]);Array.isArray(s)?t.push.apply(t,s):t.push(s)}return t}return e}function Gt(e,t){return function(s){let i;return k(()=>i=F(()=>(_.context={..._.context,[e]:s.value},vt(()=>s.children))),void 0),i}}const Xt=Symbol("fallback");function ct(e){for(let t=0;t<e.length;t++)e[t]()}function Yt(e,t,n={}){let s=[],i=[],r=[],o=0,l=t.length>1?[]:null;return oe(()=>ct(r)),()=>{let a=e()||[],f,c;return a[Ye],F(()=>{let d=a.length,h,$,y,x,T,m,b,w,R;if(d===0)o!==0&&(ct(r),r=[],s=[],i=[],o=0,l&&(l=[])),n.fallback&&(s=[Xt],i[0]=ie(P=>(r[0]=P,n.fallback())),o=1);else if(o===0){for(i=new Array(d),c=0;c<d;c++)s[c]=a[c],i[c]=ie(u);o=d}else{for(y=new Array(d),x=new Array(d),l&&(T=new Array(d)),m=0,b=Math.min(o,d);m<b&&s[m]===a[m];m++);for(b=o-1,w=d-1;b>=m&&w>=m&&s[b]===a[w];b--,w--)y[w]=i[b],x[w]=r[b],l&&(T[w]=l[b]);for(h=new Map,$=new Array(w+1),c=w;c>=m;c--)R=a[c],f=h.get(R),$[c]=f===void 0?-1:f,h.set(R,c);for(f=m;f<=b;f++)R=s[f],c=h.get(R),c!==void 0&&c!==-1?(y[c]=i[f],x[c]=r[f],l&&(T[c]=l[f]),c=$[c],h.set(R,c)):r[f]();for(c=m;c<d;c++)c in y?(i[c]=y[c],r[c]=x[c],l&&(l[c]=T[c],l[c](c))):i[c]=ie(u);i=i.slice(0,o=d),s=a.slice(0)}return i});function u(d){if(r[c]=d,l){const[h,$]=V(c);return l[c]=$,t(a[c],h)}return t(a[c])}}}function g(e,t){return F(()=>e(t||{}))}function Ce(){return!0}const Qt={get(e,t,n){return t===W?n:e.get(t)},has(e,t){return t===W?!0:e.has(t)},set:Ce,deleteProperty:Ce,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:Ce,deleteProperty:Ce}},ownKeys(e){return e.keys()}};function Xe(e){return(e=typeof e=="function"?e():e)?e:{}}function Jt(){for(let e=0,t=this.length;e<t;++e){const n=this[e]();if(n!==void 0)return n}}function Z(...e){let t=!1;for(let o=0;o<e.length;o++){const l=e[o];t=t||!!l&&W in l,e[o]=typeof l=="function"?(t=!0,I(l)):l}if(t)return new Proxy({get(o){for(let l=e.length-1;l>=0;l--){const a=Xe(e[l])[o];if(a!==void 0)return a}},has(o){for(let l=e.length-1;l>=0;l--)if(o in Xe(e[l]))return!0;return!1},keys(){const o=[];for(let l=0;l<e.length;l++)o.push(...Object.keys(Xe(e[l])));return[...new Set(o)]}},Qt);const n={},s=Object.create(null);for(let o=e.length-1;o>=0;o--){const l=e[o];if(!l)continue;const a=Object.getOwnPropertyNames(l);for(let f=a.length-1;f>=0;f--){const c=a[f];if(c==="__proto__"||c==="constructor")continue;const u=Object.getOwnPropertyDescriptor(l,c);if(!s[c])s[c]=u.get?{enumerable:!0,configurable:!0,get:Jt.bind(n[c]=[u.get.bind(l)])}:u.value!==void 0?u:void 0;else{const d=n[c];d&&(u.get?d.push(u.get.bind(l)):u.value!==void 0&&d.push(()=>u.value))}}}const i={},r=Object.keys(s);for(let o=r.length-1;o>=0;o--){const l=r[o],a=s[l];a&&a.get?Object.defineProperty(i,l,a):i[l]=a?a.value:void 0}return i}const Et=e=>`Stale read from <${e}>.`;function xe(e){const t="fallback"in e&&{fallback:()=>e.fallback};return I(Yt(()=>e.each,e.children,t||void 0))}function Zt(e){const t=e.keyed,n=I(()=>e.when,void 0,{equals:(s,i)=>t?s===i:!s==!i});return I(()=>{const s=n();if(s){const i=e.children;return typeof i=="function"&&i.length>0?F(()=>i(t?s:()=>{if(!F(n))throw Et("Show");return e.when})):i}return e.fallback},void 0,void 0)}function Le(e){let t=!1;const n=(r,o)=>(t?r[1]===o[1]:!r[1]==!o[1])&&r[2]===o[2],s=vt(()=>e.children),i=I(()=>{let r=s();Array.isArray(r)||(r=[r]);for(let o=0;o<r.length;o++){const l=r[o].when;if(l)return t=!!r[o].keyed,[o,l,r[o]]}return[-1]},void 0,{equals:n});return I(()=>{const[r,o,l]=i();if(r<0)return e.fallback;const a=l.children;return typeof a=="function"&&a.length>0?F(()=>a(t?o:()=>{if(F(i)[0]!==r)throw Et("Match");return l.when})):a},void 0,void 0)}function z(e){return e}const en=$t();function ft(e){let t=0,n,s,i,r,o;const[l,a]=V(!1),f=qt(),c={increment:()=>{++t===1&&a(!0)},decrement:()=>{--t===0&&a(!1)},inFallback:l,effects:[],resolved:!1},u=Je();if(p.context&&p.load){const $=p.context.id+p.context.count;let y=p.load($);if(y&&(typeof y!="object"||y.status!=="success")&&(i=y),i&&i!=="$$f"){const[x,T]=V(void 0,{equals:!1});r=x,i.then(()=>{p.gather($),ve(s),T(),ve()}).catch(m=>{if(m||p.done)return m&&(o=m),T()})}}const d=nt(en);d&&(n=d.register(c.inFallback));let h;return oe(()=>h&&h()),g(f.Provider,{value:c,get children(){return I(()=>{if(o)throw o;if(s=p.context,r)return r(),r=void 0;s&&i==="$$f"&&ve();const $=I(()=>e.children);return I(y=>{const x=c.inFallback(),{showContent:T=!0,showFallback:m=!0}=n?n():{};if((!x||i&&i!=="$$f")&&T)return c.resolved=!0,h&&h(),h=s=i=void 0,zt(c.effects),$();if(m)return h?y:ie(b=>(h=b,s&&(ve({id:s.id+"f",count:0}),s=void 0),e.fallback),u)})})}})}const tn=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],nn=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...tn]),sn=new Set(["innerHTML","textContent","innerText","children"]),rn=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),on=Object.assign(Object.create(null),{class:"className",formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1}});function ln(e,t){const n=on[e];return typeof n=="object"?n[t]?n.$:void 0:n}const an=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),cn={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function fn(e,t,n){let s=n.length,i=t.length,r=s,o=0,l=0,a=t[i-1].nextSibling,f=null;for(;o<i||l<r;){if(t[o]===n[l]){o++,l++;continue}for(;t[i-1]===n[r-1];)i--,r--;if(i===o){const c=r<s?l?n[l-1].nextSibling:n[r-l]:a;for(;l<r;)e.insertBefore(n[l++],c)}else if(r===l)for(;o<i;)(!f||!f.has(t[o]))&&t[o].remove(),o++;else if(t[o]===n[r-1]&&n[l]===t[i-1]){const c=t[--i].nextSibling;e.insertBefore(n[l++],t[o++].nextSibling),e.insertBefore(n[--r],c),t[i]=n[r]}else{if(!f){f=new Map;let u=l;for(;u<r;)f.set(n[u],u++)}const c=f.get(t[o]);if(c!=null)if(l<c&&c<r){let u=o,d=1,h;for(;++u<i&&u<r&&!((h=f.get(t[u]))==null||h!==c+d);)d++;if(d>c-l){const $=t[o];for(;l<c;)e.insertBefore(n[l++],$)}else e.replaceChild(n[l++],t[o++])}else o++;else t[o++].remove()}}}const ut="_$DX_DELEGATE";function st(e,t,n,s={}){let i;return ie(r=>{i=r,t===document?e():A(t,e(),t.firstChild?null:void 0,n)},s.owner),()=>{i(),t.textContent=""}}function O(e,t,n){let s;const i=()=>{const o=document.createElement("template");return o.innerHTML=e,n?o.content.firstChild.firstChild:o.content.firstChild},r=t?()=>F(()=>document.importNode(s||(s=i()),!0)):()=>(s||(s=i())).cloneNode(!0);return r.cloneNode=r,r}function Ct(e,t=window.document){const n=t[ut]||(t[ut]=new Set);for(let s=0,i=e.length;s<i;s++){const r=e[s];n.has(r)||(n.add(r),t.addEventListener(r,yn))}}function M(e,t,n){p.context||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function un(e,t,n,s){p.context||(s==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,s))}function Te(e,t){p.context||(t==null?e.removeAttribute("class"):e.className=t)}function dn(e,t,n,s){if(s)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){const i=n[0];e.addEventListener(t,n[0]=r=>i.call(e,n[1],r))}else e.addEventListener(t,n)}function hn(e,t,n={}){const s=Object.keys(t||{}),i=Object.keys(n);let r,o;for(r=0,o=i.length;r<o;r++){const l=i[r];!l||l==="undefined"||t[l]||(dt(e,l,!1),delete n[l])}for(r=0,o=s.length;r<o;r++){const l=s[r],a=!!t[l];!l||l==="undefined"||n[l]===a||!a||(dt(e,l,!0),n[l]=a)}return n}function Q(e,t,n){if(!t)return n?M(e,"style"):t;const s=e.style;if(typeof t=="string")return s.cssText=t;typeof n=="string"&&(s.cssText=n=void 0),n||(n={}),t||(t={});let i,r;for(r in n)t[r]==null&&s.removeProperty(r),delete n[r];for(r in t)i=t[r],i!==n[r]&&(s.setProperty(r,i),n[r]=i);return n}function G(e,t={},n,s){const i={};return s||k(()=>i.children=me(e,t.children,i.children)),k(()=>t.ref&&t.ref(e)),k(()=>gn(e,t,n,!0,i,!0)),i}function se(e,t,n){return F(()=>e(t,n))}function A(e,t,n,s){if(n!==void 0&&!s&&(s=[]),typeof t!="function")return me(e,t,s,n);k(i=>me(e,t(),i,n),s)}function gn(e,t,n,s,i={},r=!1){t||(t={});for(const o in i)if(!(o in t)){if(o==="children")continue;i[o]=ht(e,o,null,i[o],n,r)}for(const o in t){if(o==="children"){s||me(e,t.children);continue}const l=t[o];i[o]=ht(e,o,l,i[o],n,r)}}function mn(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function dt(e,t,n){const s=t.trim().split(/\s+/);for(let i=0,r=s.length;i<r;i++)e.classList.toggle(s[i],n)}function ht(e,t,n,s,i,r){let o,l,a,f,c;if(t==="style")return Q(e,n,s);if(t==="classList")return hn(e,n,s);if(n===s)return s;if(t==="ref")r||n(e);else if(t.slice(0,3)==="on:"){const u=t.slice(3);s&&e.removeEventListener(u,s),n&&e.addEventListener(u,n)}else if(t.slice(0,10)==="oncapture:"){const u=t.slice(10);s&&e.removeEventListener(u,s,!0),n&&e.addEventListener(u,n,!0)}else if(t.slice(0,2)==="on"){const u=t.slice(2).toLowerCase(),d=an.has(u);if(!d&&s){const h=Array.isArray(s)?s[0]:s;e.removeEventListener(u,h)}(d||n)&&(dn(e,u,n,d),d&&Ct([u]))}else if(t.slice(0,5)==="attr:")M(e,t.slice(5),n);else if((c=t.slice(0,5)==="prop:")||(a=sn.has(t))||!i&&((f=ln(t,e.tagName))||(l=nn.has(t)))||(o=e.nodeName.includes("-"))){if(c)t=t.slice(5),l=!0;else if(p.context)return n;t==="class"||t==="className"?Te(e,n):o&&!l&&!a?e[mn(t)]=n:e[f||t]=n}else{const u=i&&t.indexOf(":")>-1&&cn[t.split(":")[0]];u?un(e,u,t,n):M(e,rn[t]||t,n)}return n}function yn(e){const t=`$$${e.type}`;let n=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==n&&Object.defineProperty(e,"target",{configurable:!0,value:n}),Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return n||document}}),p.registry&&!p.done&&(p.done=_$HY.done=!0);n;){const s=n[t];if(s&&!n.disabled){const i=n[`${t}Data`];if(i!==void 0?s.call(n,i,e):s.call(n,e),e.cancelBubble)return}n=n._$host||n.parentNode||n.host}}function me(e,t,n,s,i){if(p.context){!n&&(n=[...e.childNodes]);let l=[];for(let a=0;a<n.length;a++){const f=n[a];f.nodeType===8&&f.data.slice(0,2)==="!$"?f.remove():l.push(f)}n=l}for(;typeof n=="function";)n=n();if(t===n)return n;const r=typeof t,o=s!==void 0;if(e=o&&n[0]&&n[0].parentNode||e,r==="string"||r==="number"){if(p.context)return n;if(r==="number"&&(t=t.toString()),o){let l=n[0];l&&l.nodeType===3?l.data!==t&&(l.data=t):l=document.createTextNode(t),n=le(e,n,s,l)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||r==="boolean"){if(p.context)return n;n=le(e,n,s)}else{if(r==="function")return k(()=>{let l=t();for(;typeof l=="function";)l=l();n=me(e,l,n,s)}),()=>n;if(Array.isArray(t)){const l=[],a=n&&Array.isArray(n);if(et(l,t,n,i))return k(()=>n=me(e,l,n,s,!0)),()=>n;if(p.context){if(!l.length)return n;if(s===void 0)return[...e.childNodes];let f=l[0],c=[f];for(;(f=f.nextSibling)!==s;)c.push(f);return n=c}if(l.length===0){if(n=le(e,n,s),o)return n}else a?n.length===0?gt(e,l,s):fn(e,n,l):(n&&le(e),gt(e,l));n=l}else if(t.nodeType){if(p.context&&t.parentNode)return n=o?[t]:t;if(Array.isArray(n)){if(o)return n=le(e,n,s,t);le(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function et(e,t,n,s){let i=!1;for(let r=0,o=t.length;r<o;r++){let l=t[r],a=n&&n[r],f;if(!(l==null||l===!0||l===!1))if((f=typeof l)=="object"&&l.nodeType)e.push(l);else if(Array.isArray(l))i=et(e,l,a)||i;else if(f==="function")if(s){for(;typeof l=="function";)l=l();i=et(e,Array.isArray(l)?l:[l],Array.isArray(a)?a:[a])||i}else e.push(l),i=!0;else{const c=String(l);a&&a.nodeType===3&&a.data===c?e.push(a):e.push(document.createTextNode(c))}}return i}function gt(e,t,n=null){for(let s=0,i=t.length;s<i;s++)e.insertBefore(t[s],n)}function le(e,t,n,s){if(n===void 0)return e.textContent="";const i=s||document.createTextNode("");if(t.length){let r=!1;for(let o=t.length-1;o>=0;o--){const l=t[o];if(i!==l){const a=l.parentNode===e;!r&&!o?a?e.replaceChild(i,l):e.insertBefore(i,n):a&&l.remove()}else r=!0}}else e.insertBefore(i,n);return[i]}const pn="http://www.w3.org/2000/svg";function wn(e,t=!1){return t?document.createElementNS(pn,e):document.createElement(e)}function bn(e){const{useShadow:t}=e,n=document.createTextNode(""),s=()=>e.mount||document.body,i=Je();let r,o=!!p.context;return he(()=>{o&&(Je().user=o=!1),r||(r=Vt(i,()=>I(()=>e.children)));const l=s();if(l instanceof HTMLHeadElement){const[a,f]=V(!1),c=()=>f(!0);ie(u=>A(l,()=>a()?u():r(),null)),oe(c)}else{const a=wn(e.isSVG?"g":"div",e.isSVG),f=t&&a.attachShadow?a.attachShadow({mode:"open"}):a;Object.defineProperty(a,"_$host",{get(){return n.parentNode},configurable:!0}),A(f,r),l.appendChild(a),e.ref&&e.ref(a),oe(()=>l.removeChild(a))}},void 0,{render:!o}),n}const $n=e=>typeof e=="function",Re=(e,t)=>$n(e)?e(t):e;var N;(function(e){e[e.ADD_TOAST=0]="ADD_TOAST",e[e.UPDATE_TOAST=1]="UPDATE_TOAST",e[e.UPSERT_TOAST=2]="UPSERT_TOAST",e[e.DISMISS_TOAST=3]="DISMISS_TOAST",e[e.REMOVE_TOAST=4]="REMOVE_TOAST",e[e.START_PAUSE=5]="START_PAUSE",e[e.END_PAUSE=6]="END_PAUSE"})(N||(N={}));const Fe=Symbol("store-raw"),ue=Symbol("store-node"),J=Symbol("store-has"),Ot=Symbol("store-self");function Pt(e){let t=e[W];if(!t&&(Object.defineProperty(e,W,{value:t=new Proxy(e,xn)}),!Array.isArray(e))){const n=Object.keys(e),s=Object.getOwnPropertyDescriptors(e);for(let i=0,r=n.length;i<r;i++){const o=n[i];s[o].get&&Object.defineProperty(e,o,{enumerable:s[o].enumerable,get:s[o].get.bind(t)})}}return t}function ye(e){let t;return e!=null&&typeof e=="object"&&(e[W]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function pe(e,t=new Set){let n,s,i,r;if(n=e!=null&&e[Fe])return n;if(!ye(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let o=0,l=e.length;o<l;o++)i=e[o],(s=pe(i,t))!==i&&(e[o]=s)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);const o=Object.keys(e),l=Object.getOwnPropertyDescriptors(e);for(let a=0,f=o.length;a<f;a++)r=o[a],!l[r].get&&(i=e[r],(s=pe(i,t))!==i&&(e[r]=s))}return e}function Be(e,t){let n=e[t];return n||Object.defineProperty(e,t,{value:n=Object.create(null)}),n}function _e(e,t,n){if(e[t])return e[t];const[s,i]=V(n,{equals:!1,internal:!0});return s.$=i,e[t]=s}function vn(e,t){const n=Reflect.getOwnPropertyDescriptor(e,t);return!n||n.get||!n.configurable||t===W||t===ue||(delete n.value,delete n.writable,n.get=()=>e[W][t]),n}function kt(e){Qe()&&_e(Be(e,ue),Ot)()}function An(e){return kt(e),Reflect.ownKeys(e)}const xn={get(e,t,n){if(t===Fe)return e;if(t===W)return n;if(t===Ye)return kt(e),n;const s=Be(e,ue),i=s[t];let r=i?i():e[t];if(t===ue||t===J||t==="__proto__")return r;if(!i){const o=Object.getOwnPropertyDescriptor(e,t);Qe()&&(typeof r!="function"||e.hasOwnProperty(t))&&!(o&&o.get)&&(r=_e(s,t,r)())}return ye(r)?Pt(r):r},has(e,t){return t===Fe||t===W||t===Ye||t===ue||t===J||t==="__proto__"?!0:(Qe()&&_e(Be(e,J),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:An,getOwnPropertyDescriptor:vn};function we(e,t,n,s=!1){if(!s&&e[t]===n)return;const i=e[t],r=e.length;n===void 0?(delete e[t],e[J]&&e[J][t]&&i!==void 0&&e[J][t].$()):(e[t]=n,e[J]&&e[J][t]&&i===void 0&&e[J][t].$());let o=Be(e,ue),l;if((l=_e(o,t,i))&&l.$(()=>n),Array.isArray(e)&&e.length!==r){for(let a=e.length;a<r;a++)(l=o[a])&&l.$();(l=_e(o,"length",r))&&l.$(e.length)}(l=o[Ot])&&l.$()}function Dt(e,t){const n=Object.keys(t);for(let s=0;s<n.length;s+=1){const i=n[s];we(e,i,t[i])}}function Sn(e,t){if(typeof t=="function"&&(t=t(e)),t=pe(t),Array.isArray(t)){if(e===t)return;let n=0,s=t.length;for(;n<s;n++){const i=t[n];e[n]!==i&&we(e,n,i)}we(e,"length",s)}else Dt(e,t)}function Ae(e,t,n=[]){let s,i=e;if(t.length>1){s=t.shift();const o=typeof s,l=Array.isArray(e);if(Array.isArray(s)){for(let a=0;a<s.length;a++)Ae(e,[s[a]].concat(t),n);return}else if(l&&o==="function"){for(let a=0;a<e.length;a++)s(e[a],a)&&Ae(e,[a].concat(t),n);return}else if(l&&o==="object"){const{from:a=0,to:f=e.length-1,by:c=1}=s;for(let u=a;u<=f;u+=c)Ae(e,[u].concat(t),n);return}else if(t.length>1){Ae(e[s],t,[s].concat(n));return}i=e[s],n=[s].concat(n)}let r=t[0];typeof r=="function"&&(r=r(i,n),r===i)||s===void 0&&r==null||(r=pe(r),s===void 0||ye(i)&&ye(r)&&!Array.isArray(r)?Dt(i,r):we(e,s,r))}function _n(...[e,t]){const n=pe(e||{}),s=Array.isArray(n),i=Pt(n);function r(...o){Ut(()=>{s&&o.length===1?Sn(n,o[0]):Ae(n,o)})}return[i,r]}const Ue=new WeakMap,Nt={get(e,t){if(t===Fe)return e;const n=e[t];let s;return ye(n)?Ue.get(n)||(Ue.set(n,s=new Proxy(n,Nt)),s):n},set(e,t,n){return we(e,t,pe(n)),!0},deleteProperty(e,t){return we(e,t,void 0,!0),!0}};function Oe(e){return t=>{if(ye(t)){let n;(n=Ue.get(t))||Ue.set(t,n=new Proxy(t,Nt)),e(n)}return t}}const[re,ne]=_n({toasts:[],pausedAt:void 0}),Tn=()=>{const{pausedAt:e,toasts:t}=re;if(e)return;const n=Date.now();return t.map(i=>{if(i.duration===1/0)return;const r=(i.duration||0)+i.pauseDuration-(n-i.createdAt);if(r<=0){i.visible&&K({type:N.DISMISS_TOAST,toastId:i.id});return}return setTimeout(()=>{K({type:N.DISMISS_TOAST,toastId:i.id})},r)})},Se=new Map,mt=(e,t)=>{if(Se.has(e))return;const n=setTimeout(()=>{Se.delete(e),K({type:N.REMOVE_TOAST,toastId:e})},t);Se.set(e,n)},En=e=>{const t=Se.get(e);Se.delete(e),t&&clearTimeout(t)},K=e=>{switch(e.type){case N.ADD_TOAST:ne("toasts",i=>{const r=i;return[e.toast,...r]});break;case N.DISMISS_TOAST:const{toastId:t}=e,n=re.toasts;if(t){const i=n.find(r=>r.id===t);i&&mt(t,i.unmountDelay),ne("toasts",r=>r.id===t,Oe(r=>r.visible=!1))}else n.forEach(i=>{mt(i.id,i.unmountDelay)}),ne("toasts",i=>i.id!==void 0,Oe(i=>i.visible=!1));break;case N.REMOVE_TOAST:if(!e.toastId){ne("toasts",[]);break}ne("toasts",i=>i.filter(o=>o.id!==e.toastId));break;case N.UPDATE_TOAST:e.toast.id&&En(e.toast.id),ne("toasts",i=>i.id===e.toast.id,i=>({...i,...e.toast}));break;case N.UPSERT_TOAST:re.toasts.find(i=>i.id===e.toast.id)?K({type:N.UPDATE_TOAST,toast:e.toast}):K({type:N.ADD_TOAST,toast:e.toast});break;case N.START_PAUSE:ne(Oe(i=>{i.pausedAt=Date.now(),i.toasts.forEach(r=>{r.paused=!0})}));break;case N.END_PAUSE:const s=e.time-(re.pausedAt||0);ne(Oe(i=>{i.pausedAt=void 0,i.toasts.forEach(r=>{r.pauseDuration+=s,r.paused=!1})}));break}},Cn={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},de={id:"",icon:"",unmountDelay:500,duration:3e3,ariaProps:{role:"status","aria-live":"polite"},className:"",style:{},position:"top-right",iconTheme:{}},jt={position:"top-right",toastOptions:de,gutter:8,containerStyle:{},containerClassName:""},Pe="16px",On={position:"fixed","z-index":9999,top:Pe,bottom:Pe,left:Pe,right:Pe,"pointer-events":"none"},Pn=(()=>{let e=0;return()=>String(++e)})(),kn=e=>{Rn(t=>({containerClassName:e.containerClassName??t.containerClassName,containerStyle:e.containerStyle??t.containerStyle,gutter:e.gutter??t.gutter,position:e.position??t.position,toastOptions:{...e.toastOptions}}))},Dn=(e,t)=>{const s=e.includes("top")?{top:0,"margin-top":`${t}px`}:{bottom:0,"margin-bottom":`${t}px`},i=e.includes("center")?{"justify-content":"center"}:e.includes("right")?{"justify-content":"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:"all 230ms cubic-bezier(.21,1.02,.73,1)",...s,...i}},Nn=(e,t)=>{const n=e.getBoundingClientRect();n.height!==t.height&&K({type:N.UPDATE_TOAST,toast:{id:t.id,height:n.height}})},jn=(e,t)=>{const{toasts:n}=re,s=ae().gutter||jt.gutter||8,i=n.filter(a=>(a.position||t)===t&&a.height),r=i.findIndex(a=>a.id===e.id),o=i.filter((a,f)=>f<r&&a.visible).length;return i.slice(0,o).reduce((a,f)=>a+s+(f.height||0),0)},In=(e,t)=>(e.position||t).includes("top")?1:-1,Mn={display:"flex","align-items":"center",color:"#363636",background:"white","box-shadow":"0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05)","max-width":"350px","pointer-events":"auto",padding:"8px 10px","border-radius":"4px","line-height":"1.3","will-change":"transform"},Ln={display:"flex","align-items":"center",flex:"1 1 auto",margin:"4px 10px","white-space":"pre-line"},ke={"flex-shrink":0,"min-width":"20px","min-height":"20px",display:"flex","align-items":"center","justify-content":"center","text-align":"center"},Ve=e=>({calcMode:"spline",keyTimes:"0; 1",keySplines:e}),[ae,Rn]=V(jt),Fn=(e,t="blank",n)=>({...de,...ae().toastOptions,...n,type:t,message:e,pauseDuration:0,createdAt:Date.now(),visible:!0,id:n.id||Pn(),paused:!1,style:{...de.style,...ae().toastOptions?.style,...n.style},duration:n.duration||ae().toastOptions?.duration||Cn[t],position:n.position||ae().toastOptions?.position||ae().position||de.position}),Ee=e=>(t,n={})=>ie(()=>{const s=re.toasts.find(r=>r.id===n.id),i=Fn(t,e,{...s,duration:void 0,...n});return K({type:N.UPSERT_TOAST,toast:i}),i.id}),j=(e,t)=>Ee("blank")(e,t);F(()=>j);j.error=Ee("error");j.success=Ee("success");j.loading=Ee("loading");j.custom=Ee("custom");j.dismiss=e=>{K({type:N.DISMISS_TOAST,toastId:e})};j.promise=(e,t,n)=>{const s=j.loading(t.loading,{...n});return e.then(i=>(j.success(Re(t.success,i),{id:s,...n}),i)).catch(i=>{j.error(Re(t.error,i),{id:s,...n})}),e};j.remove=e=>{K({type:N.REMOVE_TOAST,toastId:e})};var Bn=O("<div><style>.sldt-active{z-index:9999;}.sldt-active>*{pointer-events:auto;}");const Un=e=>(he(()=>{kn(e)}),he(()=>{const t=Tn();oe(()=>{t&&t.forEach(n=>n&&clearTimeout(n))})}),(()=>{var t=Bn();return t.firstChild,A(t,g(xe,{get each(){return re.toasts},children:n=>g(Hn,{toast:n})}),null),k(n=>{var s={...On,...e.containerStyle},i=e.containerClassName;return n.e=Q(t,s,n.e),i!==n.t&&Te(t,n.t=i),n},{e:void 0,t:void 0}),t})());var De=O("<div>"),Vn=O("<div><div>");const zn=e=>{let t;return he(()=>{if(!t)return;const n=In(e.toast,e.position);e.toast.visible?t.animate([{transform:`translate3d(0,${n*-200}%,0) scale(.6)`,opacity:.5},{transform:"translate3d(0,0,0) scale(1)",opacity:1}],{duration:350,fill:"forwards",easing:"cubic-bezier(.21,1.02,.73,1)"}):t.animate([{transform:"translate3d(0,0,-1px) scale(1)",opacity:1},{transform:`translate3d(0,${n*-150}%,-1px) scale(.4)`,opacity:0}],{duration:400,fill:"forwards",easing:"cubic-bezier(.06,.71,.55,1)"})}),(()=>{var n=Vn(),s=n.firstChild,i=t;return typeof i=="function"?se(i,n):t=n,A(n,g(Le,{get children(){return[g(z,{get when(){return e.toast.icon},get children(){var r=De();return A(r,()=>e.toast.icon),k(o=>Q(r,ke,o)),r}}),g(z,{get when(){return e.toast.type==="loading"},get children(){var r=De();return A(r,g(Zn,Z(()=>e.toast.iconTheme))),k(o=>Q(r,ke,o)),r}}),g(z,{get when(){return e.toast.type==="success"},get children(){var r=De();return A(r,g(Xn,Z(()=>e.toast.iconTheme))),k(o=>Q(r,ke,o)),r}}),g(z,{get when(){return e.toast.type==="error"},get children(){var r=De();return A(r,g(Qn,Z(()=>e.toast.iconTheme))),k(o=>Q(r,ke,o)),r}})]}}),s),G(s,Z(()=>e.toast.ariaProps),!1,!0),A(s,()=>Re(e.toast.message,e.toast)),k(r=>{var o=e.toast.className,l={...Mn,...e.toast.style},a=Ln;return o!==r.e&&Te(n,r.e=o),r.t=Q(n,l,r.t),r.a=Q(s,a,r.a),r},{e:void 0,t:void 0,a:void 0}),n})()};var qn=O("<div>");const Hn=e=>{const t=()=>{const i=e.toast.position||de.position,r=jn(e.toast,i);return Dn(i,r)},n=I(()=>t());let s;return He(()=>{s&&Nn(s,e.toast)}),(()=>{var i=qn();i.addEventListener("mouseleave",()=>K({type:N.END_PAUSE,time:Date.now()})),i.addEventListener("mouseenter",()=>K({type:N.START_PAUSE,time:Date.now()}));var r=s;return typeof r=="function"?se(r,i):s=i,A(i,(()=>{var o=I(()=>e.toast.type==="custom");return()=>o()?Re(e.toast.message,e.toast):g(zn,{get toast(){return e.toast},get position(){return e.toast.position||de.position}})})()),k(o=>{var l=n(),a=e.toast.visible?"sldt-active":"";return o.e=Q(i,l,o.e),a!==o.t&&Te(i,o.t=a),o},{e:void 0,t:void 0}),i})()};var Kn=O('<svg><circle cx=16 cy=16 r=0><animate attributeName=opacity values="0; 1; 1"></animate><animate attributeName=r values="0; 17.5; 16"></svg>',!1,!0),Wn=O('<svg><circle cx=16 cy=16 r=12 opacity=0><animate attributeName=opacity values="1; 0"></animate><animate attributeName=r values="12; 26"></svg>',!1,!0);const It=e=>{const t={dur:"0.35s",begin:"100ms",fill:"freeze",calcMode:"spline",keyTimes:"0; 0.6; 1",keySplines:"0.25 0.71 0.4 0.88; .59 .22 .87 .63"};return(()=>{var n=Kn(),s=n.firstChild,i=s.nextSibling;return G(s,t,!0,!1),G(i,t,!0,!1),k(()=>M(n,"fill",e.fill)),n})()},Mt=e=>{const t={dur:"1s",begin:e.begin||"320ms",fill:"freeze",...Ve("0.0 0.0 0.2 1")};return(()=>{var n=Wn(),s=n.firstChild,i=s.nextSibling;return G(s,t,!0,!1),G(i,t,!0,!1),k(()=>M(n,"fill",e.fill)),n})()};var Gn=O('<svg viewBox="0 0 32 32"width=1.25rem height=1.25rem><path fill=none stroke-width=4 stroke-dasharray=22 stroke-dashoffset=22 stroke-linecap=round stroke-miterlimit=10 d=M9.8,17.2l3.8,3.6c0.1,0.1,0.3,0.1,0.4,0l9.6-9.7><animate attributeName=stroke-dashoffset values=22;0 dur=0.25s begin=250ms fill=freeze>');const Xn=e=>{const t=e.primary||"#34C759";return(()=>{var n=Gn(),s=n.firstChild,i=s.firstChild;return n.style.setProperty("overflow","visible"),A(n,g(It,{fill:t}),s),A(n,g(Mt,{fill:t,begin:"350ms"}),s),G(i,Z(()=>Ve("0.0, 0.0, 0.58, 1.0")),!0,!1),k(()=>M(s,"stroke",e.secondary||"#FCFCFC")),n})()};var Yn=O('<svg viewBox="0 0 32 32"width=1.25rem height=1.25rem><path fill=none stroke-width=4 stroke-dasharray=9 stroke-dashoffset=9 stroke-linecap=round d=M16,7l0,9><animate attributeName=stroke-dashoffset values=9;0 dur=0.2s begin=250ms fill=freeze></animate></path><circle cx=16 cy=23 r=2.5 opacity=0><animate attributeName=opacity values=0;1 dur=0.25s begin=350ms fill=freeze>');const Qn=e=>{const t=e.primary||"#FF3B30";return(()=>{var n=Yn(),s=n.firstChild,i=s.firstChild,r=s.nextSibling,o=r.firstChild;return n.style.setProperty("overflow","visible"),A(n,g(It,{fill:t}),s),A(n,g(Mt,{fill:t}),s),G(i,Z(()=>Ve("0.0, 0.0, 0.58, 1.0")),!0,!1),G(o,Z(()=>Ve("0.0, 0.0, 0.58, 1.0")),!0,!1),k(l=>{var a=e.secondary||"#FFFFFF",f=e.secondary||"#FFFFFF";return a!==l.e&&M(s,"stroke",l.e=a),f!==l.t&&M(r,"fill",l.t=f),l},{e:void 0,t:void 0}),n})()};var Jn=O('<svg viewBox="0 0 32 32"width=1.25rem height=1.25rem><path fill=none stroke-width=4 stroke-miterlimit=10 d=M16,6c3,0,5.7,1.3,7.5,3.4c1.5,1.8,2.5,4,2.5,6.6c0,5.5-4.5,10-10,10S6,21.6,6,16S10.5,6,16,6z></path><path fill=none stroke-width=4 stroke-linecap=round stroke-miterlimit=10 d=M16,6c3,0,5.7,1.3,7.5,3.4c0.6,0.7,1.1,1.4,1.5,2.2><animateTransform attributeName=transform type=rotate from="0 16 16"to="360 16 16"dur=0.75s repeatCount=indefinite>');const Zn=e=>(()=>{var t=Jn(),n=t.firstChild,s=n.nextSibling;return t.style.setProperty("overflow","visible"),k(i=>{var r=e.primary||"#E5E7EB",o=e.secondary||"#4b5563";return r!==i.e&&M(n,"stroke",i.e=r),o!==i.t&&M(s,"stroke",i.t=o),i},{e:void 0,t:void 0}),t})(),ei=[{name:"Definition",options:{source:{target:"geofs.aircraft.instance",prop:"definition"},reactive:!0,reset:!0,allowed:[{name:"airbrakesTravelTime",type:"float"},{name:"accessoriesTravelTime",type:"float"},{name:"flapsTravelTime",type:"float"},{name:"flapsSteps",type:"int"},{name:"gearTravelTime",type:"float"},{name:"zeroThrustAltitude",type:"int"},{name:"zeroRPMAltitude",type:"int"},{name:"mass",type:"int"},{name:"minRPM",type:"int",comment:"not recommended"},{name:"maxRPM",type:"int",comment:"not recommended"}],ignored:["object","function","undefined","null","boolean","symbol","array"]}},{name:"Engines",options:{source:{target:"geofs.aircraft.instance",prop:"engines"},reactive:!0,allowed:[{name:"thrust",type:"float"},{name:"afterBurnerThrust",type:"float"},{name:"reverseThrust",type:"float"}],ignored:["object","function","undefined","null","boolean","symbol","array"]}},{name:"id",options:{source:{target:"geofs.aircraft.instance",prop:"id"},reactive:!0}}];function ti(e){const t=e.split(".");let n=unsafeWindow;for(let s of t)if(n=n[s],n===void 0)throw new Error(`Path ${e} does not exist`);return n}class ni{static _options={cloneAfterCreation:!1,temp:null};static _cache={};static set cache(t){this._cache=t}static get cache(){return this._cache}static set options(t){this._options=t}static get options(){return this._options}static parse(t,n,s={}){let i=t;try{if(typeof t=="string")i=ti(t);else if(typeof t=="object")i=t;else throw new Error("The first argument to parse must be an object or string path.",t);if(typeof n!="string")throw new Error("The second argument to parse must be a string.",n);if(i===void 0)throw new Error("Invalid target.",i);if(n===void 0)throw new Error("Invalid property.",n);let r=i[n];if(r===void 0)throw new Error("Invalid value.",r);const[o,l]=V(r),a=s?.cloneAfterCreation!==void 0?s?.cloneAfterCreation:this._options?.cloneAfterCreation;if(o===void 0||l===void 0)throw new Error("Signal not created.");if(Object.defineProperty(i,n,{get:function(){return o()},set:function(f){r=f,l(f)}}),Object.getOwnPropertyDescriptor(i,n)===void 0)throw new Error("Reactive property not created.");if(a){if(this._options.temp===null)throw new Error("Temporary object not defined.");if(this._cache[n]!==void 0)throw new Error("Property already exists in cache.",n);const[f,c]=[o,l];if(f===void 0||c===void 0)throw new Error("Reactive property not cloned.");if(this._cache[n]=!0,Object.defineProperty(this._options.temp,n,{get:function(){return f()},set:function(u){c(u)}}),Object.getOwnPropertyDescriptor(this._options.temp,n)===void 0)throw new Error("Reactive property clone not defined.",n)}return[o,l]}catch(r){console.error(r)}}}class ze{static _reactive=ni;static _data={};static get reactive(){return this._reactive}static set reactive(t){this._reactive=t}static async load(...t){return await new Promise((n,s)=>{try{if(!t.length)throw new Error("No props to load");if(!Array.isArray(t))throw new Error("Props must be an array");for(const i of t[0]){const{name:r,options:o}=i,{source:l}=o;if(o.reactive){if(!o.source)throw new Error("Reactive props require a source");if(!o.source.target||!o.source.prop)throw new Error("Reactive props require a target and prop");this._reactive.parse(l.target,l.prop,o.source?.options)}Object.defineProperty(this,r,{get:function(){return this._data[r]},set:function(a){this._data[r]=a}}),this[r]={allowed:o.allowed||[],ignored:o.ignored||[],reset:o.reset||!1}}n(!0)}catch(i){s(i)}})}}var ii=O('<svg xmlns=http://www.w3.org/2000/svg width=16 height=16 viewBox="0 0 16 16"><path fill-rule=evenodd d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z">');const tt=e=>(()=>{var t=ii();return k(n=>{var s=`w-5 h-5 text-gray-500 transition group-open/${e["group-open"]}:rotate-90`,i=e.fill||"currentColor";return s!==n.e&&M(t,"class",n.e=s),i!==n.t&&M(t,"fill",n.t=i),n},{e:void 0,t:void 0}),t})(),ce={duration:2e3};var si=O('<li class="flex gap-2"><label class="flex-none w-fit">:</label><input>'),ri=O("<br>"),oi=O('<span class="text-sm text-slate-500">'),li=O('<li class="flex gap-2"><button class="w-fit m-2 border-0 rounded-md px-3 bg-sky-600 text-white shadow-md hover:bg-sky-700 hover:cursor-pointer">Reset');const ai=async()=>await new Promise((e,t)=>{try{const{allowed:n,ignored:s,reset:i}=ze.Definition,r=flightAssistant.instance.definition;if(!r)throw new Error("No definition found.");const o=[];for(const l of Object.entries(r)){const[a,f]=l,c=typeof f;if(s.includes(c)||!n.some(b=>b.name===a))continue;const d=n.find(b=>b.name===a).type;if(!d)continue;const h=n.find(b=>b.name===a).comment,$=["int","float","number"].includes(d)||c==="number",y=d==="int",x=d==="float",T=d==="string";let m={};T?m.placeholder="Text":$&&(m.min=y?"0":x?"0.0":null,m.max=y?parseInt(f*2):x?parseFloat(f*2):null,m.step=y?"1":x?"0.2":null,m.placeholder=`Between ${m.min} and ${m.max}`),i&&(m["data-definitions-default"]=f),m["data-definitions-propname"]=a,m["data-definitions-type"]=d,o.push((()=>{var b=si(),w=b.firstChild,R=w.firstChild,P=w.nextSibling;return M(w,"for",`set${a}`),A(w,a,R),A(w,h?[ri(),(()=>{var B=oi();return A(B,h),B})()]:null,null),M(P,"id",`set${a}`),M(P,"type",$?"number":T?"text":null),G(P,Z(m,{class:"flex-auto w-max m-2 border-0 rounded-md p-2 shadow-md",oninput:async B=>{let U=B.target,[X,S,v]=["min","max","value"].map(D=>$?parseFloat(U[D]):U[D]),E=U.type;await new Promise((D,$e)=>{if(E=="number"&&v>X&&v<=S){let q=v*2*100;B.target.max=q<1?10:q,flightAssistant.instance.definition[a]=v,U.placeholder=`Between ${X} and ${S}`,D(`${a} set to ${v}`)}else E=="text"&&!v?(flightAssistant.instance.definition[a]=v,D(`${a} set to ${v}`)):$e($?`Value must be between ${X} and ${S}`:T?"Value must be text":"Invalid value")}).then(D=>j.success(D,ce)).catch(D=>j.error(D,ce))}}),!1,!1),b})())}i&&o.unshift((()=>{var l=li(),a=l.firstChild;return a.$$click=()=>{const f=document.querySelectorAll("input[data-definitions-default]");f.forEach(c=>{let u="data-definitions-",d=c.getAttribute(`${u}default`),h=c.getAttribute(`${u}propname`),$=c.getAttribute(`${u}type`);$==="int"&&(d=parseInt(d)),$==="float"&&(d=parseFloat(d)),c.value=d,flightAssistant.instance.definition[h]=d}),f.length?j.success("Definitions reset",ce):j.error("No definitions to reset",ce)},l})()),e(o)}catch(n){t(n)}});Ct(["click"]);var ci=O('<details><summary class="flex items-center justify-between gap-2 p-2 font-medium marker:content-none hover:cursor-pointer"><span class="flex gap-2"></span></summary><article class="px-4 pb-4"><ul class="flex flex-col gap-4 pl-2 mt-4">'),fi=O('<li class="flex gap-2"><label>:</label><input>');const ui=async()=>await new Promise((e,t)=>{try{const{allowed:n,ignored:s}=ze.Engines,i=flightAssistant.instance.engines;if(!i)throw new Error("No engines found.");const r=[];for(let o=0;o<i.length;o++)r.push((()=>{var l=ci(),a=l.firstChild,f=a.firstChild,c=a.nextSibling,u=c.firstChild;return Te(l,"group/engine"+o),A(f,g(Le,{get children(){return[g(z,{get when(){return i[o].name},get children(){return i[o].name}}),g(z,{get when(){return!i[o].name},get children(){return["Engine ",o+1]}})]}})),A(a,g(tt,{"group-open":`engine${o}`}),null),A(u,g(xe,{get each(){return Object.entries(i[o])},children:d=>{const[h,$]=d,y=typeof $;if(s.includes(y)||!n.some(B=>B.name===h))return null;const T=n.find(B=>B.name===h).type;if(!T)return null;const m=["int","float","number"].includes(T)||y==="number",b=T==="int",w=T==="float",R=T==="string";let P={};return R?P.placeholder="Text":m&&(P.min=b?"0":w?"0.0":null,P.max=b?parseInt($*2):w?parseFloat($*2):null,P.step=b?"1":w?"0.2":null,P.placeholder=`Between ${P.min} and ${P.max}`),(()=>{var B=fi(),U=B.firstChild,X=U.firstChild,S=U.nextSibling;return A(U,h,X),M(S,"type",m?"number":R?"text":null),G(S,Z({get id(){return`set${i[o].name}${h}`}},P,{class:"w-11/12 m-2 border-0 rounded-md p-2 shadow-md",oninput:async v=>{let E=v.target,[D,$e,q]=["min","max","value"].map(Y=>m?parseFloat(E[Y]):E[Y]),rt=E.type;await new Promise((Y,Lt)=>{if(rt=="number"&&q>D&&q<=$e){let ot=q*2*100;v.target.max=ot<1?10:ot,flightAssistant.instance.engines[o][h]=q,E.placeholder=`Between ${D} and ${$e}`,Y(`${i[o].name}${h} set to ${q}`)}else rt=="text"&&!q?(flightAssistant.instance.engines[o][h]=q,Y(`${i[o].name}${h} set to ${q}`)):Lt(m?`Value must be between ${D} and ${$e}`:R?"Value must be text":"Invalid value")}).then(Y=>j.success(Y,ce)).catch(Y=>j.error(Y,ce))}}),!1,!1),k(()=>M(U,"for",`set${i[o].name}${h}`)),B})()}})),l})());e(r)}catch(n){t(n)}});var di=O("<ul class=flight-assistant-item-list>"),yt=O("<span>Loading..."),pt=O("<span>Error: "),hi=O('<details class=group/definition><summary class="flex items-center justify-between gap-2 p-2 font-medium marker:content-none hover:cursor-pointer"><span class="flex gap-2">Definitions</span></summary><article class="px-4 pb-4"><ul class="flex flex-col gap-4 pl-2 mt-4 flight-assistant-definition-list">'),gi=O('<details class=group/engines><summary class="flex items-center justify-between gap-2 p-2 font-medium marker:content-none hover:cursor-pointer"><span class="flex gap-2">Engines</span></summary><article class="px-4 pb-4"><ul class="flex flex-col gap-4 pl-2 mt-4 flight-assistant-engine-list">'),mi=O("<div>Definitions Loading..."),yi=O("<div>Engines Loading..."),pi=O('<ul class="geofs-list geofs-toggle-panel geofs-assistant-list"data-noblur=true data-onshow={geofs.initializePreferencesPanel()} data-onhide={geofs.savePreferencesPanel()}>'),wi=O('<button class="mdl-button mdl-js-button geofs-f-standard-ui"id=assistantbutton tabindex=0 data-upgraded=,MaterialButton data-toggle-panel=.geofs-assistant-list data-tooltip-classname=mdl-tooltip--top title="Flight Assistant">ASSISTANT');const bi=e=>{const[t,n]=V();n(flightAssistant.instance.id);const s=I(()=>flightAssistant.instance.id===t()),[i,r={refetch}]=at(ui),[o,l={refetch}]=at(ai),[a,f]=V([]),c=I(()=>a().length);let u,d,h;const $=(...y)=>{y.length!==0&&f([...a(),...y])};return e.children&&(Array.isArray(e.children)?$(...e.children):$(e.children)),he(()=>{s()||(n(flightAssistant.instance.id),setTimeout(()=>{r.refetch(),l.refetch()},1e3))}),He(()=>{flightAssistant.state.itemList=h,flightAssistant.state.definitionList=u,flightAssistant.state.engineList=d}),[g(Zt,{get when(){return c()===0},get children(){var y=di(),x=h;return typeof x=="function"?se(x,y):h=y,A(y,g(xe,{get each(){return a()},children:T=>T})),y}}),(()=>{var y=hi(),x=y.firstChild;x.firstChild;var T=x.nextSibling,m=T.firstChild;A(x,g(tt,{"group-open":"definition"}),null);var b=u;return typeof b=="function"?se(b,m):u=m,A(m,g(ft,{get fallback(){return mi()},get children(){return g(Le,{get children(){return[g(z,{get when(){return o.loading},get children(){return yt()}}),g(z,{get when(){return o.error},get children(){var w=pt();return w.firstChild,A(w,()=>o.error,null),w}}),g(z,{get when(){return o()},get children(){return g(xe,{get each(){return o()},children:w=>w})}})]}})}})),y})(),(()=>{var y=gi(),x=y.firstChild;x.firstChild;var T=x.nextSibling,m=T.firstChild;A(x,g(tt,{"group-open":"engines"}),null);var b=d;return typeof b=="function"?se(b,m):d=m,A(m,g(ft,{get fallback(){return yi()},get children(){return g(Le,{get children(){return[g(z,{get when(){return i.loading},get children(){return yt()}}),g(z,{get when(){return i.error},get children(){var w=pt();return w.firstChild,A(w,()=>i.error,null),w}}),g(z,{get when(){return i()},get children(){return g(xe,{get each(){return i()},children:w=>w})}})]}})}})),y})()]},$i=e=>{let t;return He(()=>{flightAssistant.state.container=t}),oe(()=>{flightAssistant.state.container=null}),(()=>{var n=pi(),s=t;return typeof s=="function"?se(s,n):t=n,A(n,g(bi,{get children(){return e.children}})),n})()},vi=e=>{const t=document.querySelector(".geofs-ui-left");st(()=>g($i,e),t)},Ai=()=>{let e;return He(()=>{flightAssistant.state.button=e}),oe(()=>{flightAssistant.state.button=null}),(()=>{var t=wi(),n=e;return typeof n=="function"?se(n,t):e=t,t})()},xi=()=>{const e=document.querySelector(".geofs-ui-bottom");st(()=>g(Ai,{}),e)},Si=()=>g(bn,{get mount(){return document.body},get children(){return g(Un,{position:"top-right",gutter:8,containerClassName:"",containerStyle:{},toastOptions:{className:"",style:{background:"#363636",color:"#fff"}}})}}),_i=()=>{const e={version:GM.info.script.version,state:{},instance:{}};return ze.reactive.options={cloneAfterCreation:!0,temp:e.instance},unsafeWindow.executeOnEventDone("geofsStarted",function(){const t=new Promise((n,s)=>{setTimeout(()=>{try{ze.load(ei),vi(),xi(),n("Assistant Started.")}catch(i){s(i)}},5e3)});j.promise(t,{loading:"Assistant is starting..",success:n=>`Success: ${n}`,error:n=>`Error: ${n.message}`})}),unsafeWindow.flightAssistant=e,g(Si,{})},Ti=document.body;st(()=>g(_i,{}),Ti);