The OpenSky "Default bounding box" now follows where flying happens. A new "Automatic" picker mode (the default) resolves the live-map area from a location cascade — drone telemetry → phone GPS → browser geolocation → the user's Region country → Europe — instead of a fixed box. Manual presets and Custom coordinates still work. - Web App: new shared countries.js dataset (all countries + bbox, offline point→country); the bbox picker gains all European countries and an Automatic option (client pref prefs.autoBbox); the Region setting expands from 6 locale entries to all countries; the live map resolves the cascade each poll and sends it as ?bbox=. - API Server: the states endpoint accepts and validates a ?bbox= override (validBBox); the Web App BFF forwards the query; the hub relays new phoneLatitude/phoneLongitude telemetry to the Web App. - Fly App: reports the phone's own GPS (geolocator) alongside telemetry, used as the "your location" fallback. - API panel: the OpenSky bbox picker lists all European countries. Builds verified across web, panel, both Go modules and the Fly App APK. Region list, Automatic default and the cascade ?bbox= override verified in the browser. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
21 lines
417 KiB
JavaScript
21 lines
417 KiB
JavaScript
(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))l(u);new MutationObserver(u=>{for(const d of u)if(d.type==="childList")for(const h of d.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&l(h)}).observe(document,{childList:!0,subtree:!0});function s(u){const d={};return u.integrity&&(d.integrity=u.integrity),u.referrerPolicy&&(d.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?d.credentials="include":u.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function l(u){if(u.ep)return;u.ep=!0;const d=s(u);fetch(u.href,d)}})();/**
|
|
* @vue/shared v3.5.39
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
* @license MIT
|
|
**/function Or(t){const i=Object.create(null);for(const s of t.split(","))i[s]=1;return s=>s in i}const vt={},Io=[],Wn=()=>{},yu=()=>!1,Ca=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),La=t=>t.startsWith("onUpdate:"),$t=Object.assign,zr=(t,i)=>{const s=t.indexOf(i);s>-1&&t.splice(s,1)},fd=Object.prototype.hasOwnProperty,ft=(t,i)=>fd.call(t,i),De=Array.isArray,$o=t=>Ds(t)==="[object Map]",Zo=t=>Ds(t)==="[object Set]",_l=t=>Ds(t)==="[object Date]",Ye=t=>typeof t=="function",St=t=>typeof t=="string",Nn=t=>typeof t=="symbol",ht=t=>t!==null&&typeof t=="object",xu=t=>(ht(t)||Ye(t))&&Ye(t.then)&&Ye(t.catch),wu=Object.prototype.toString,Ds=t=>wu.call(t),hd=t=>Ds(t).slice(8,-1),ku=t=>Ds(t)==="[object Object]",Ir=t=>St(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,ws=Or(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ma=t=>{const i=Object.create(null);return(s=>i[s]||(i[s]=t(s)))},pd=/-\w/g,In=Ma(t=>t.replace(pd,i=>i.slice(1).toUpperCase())),md=/\B([A-Z])/g,Ni=Ma(t=>t.replace(md,"-$1").toLowerCase()),Su=Ma(t=>t.charAt(0).toUpperCase()+t.slice(1)),tr=Ma(t=>t?`on${Su(t)}`:""),jn=(t,i)=>!Object.is(t,i),ha=(t,...i)=>{for(let s=0;s<t.length;s++)t[s](...i)},Tu=(t,i,s,l=!1)=>{Object.defineProperty(t,i,{configurable:!0,enumerable:!1,writable:l,value:s})},Aa=t=>{const i=parseFloat(t);return isNaN(i)?t:i},gd=t=>{const i=St(t)?Number(t):NaN;return isNaN(i)?t:i};let bl;const Ea=()=>bl||(bl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Bo(t){if(De(t)){const i={};for(let s=0;s<t.length;s++){const l=t[s],u=St(l)?yd(l):Bo(l);if(u)for(const d in u)i[d]=u[d]}return i}else if(St(t)||ht(t))return t}const vd=/;(?![^(]*\))/g,_d=/:([^]+)/,bd=/\/\*[^]*?\*\//g;function yd(t){const i={};return t.replace(bd,"").split(vd).forEach(s=>{if(s){const l=s.split(_d);l.length>1&&(i[l[0].trim()]=l[1].trim())}}),i}function Ee(t){let i="";if(St(t))i=t;else if(De(t))for(let s=0;s<t.length;s++){const l=Ee(t[s]);l&&(i+=l+" ")}else if(ht(t))for(const s in t)t[s]&&(i+=s+" ");return i.trim()}const xd="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",wd=Or(xd);function Pu(t){return!!t||t===""}function kd(t,i){if(t.length!==i.length)return!1;let s=!0;for(let l=0;s&&l<t.length;l++)s=zi(t[l],i[l]);return s}function zi(t,i){if(t===i)return!0;let s=_l(t),l=_l(i);if(s||l)return s&&l?t.getTime()===i.getTime():!1;if(s=Nn(t),l=Nn(i),s||l)return t===i;if(s=De(t),l=De(i),s||l)return s&&l?kd(t,i):!1;if(s=ht(t),l=ht(i),s||l){if(!s||!l)return!1;const u=Object.keys(t).length,d=Object.keys(i).length;if(u!==d)return!1;for(const h in t){const v=t.hasOwnProperty(h),b=i.hasOwnProperty(h);if(v&&!b||!v&&b||!zi(t[h],i[h]))return!1}}return String(t)===String(i)}function $r(t,i){return t.findIndex(s=>zi(s,i))}const Cu=t=>!!(t&&t.__v_isRef===!0),k=t=>St(t)?t:t==null?"":De(t)||ht(t)&&(t.toString===wu||!Ye(t.toString))?Cu(t)?k(t.value):JSON.stringify(t,Lu,2):String(t),Lu=(t,i)=>Cu(i)?Lu(t,i.value):$o(i)?{[`Map(${i.size})`]:[...i.entries()].reduce((s,[l,u],d)=>(s[nr(l,d)+" =>"]=u,s),{})}:Zo(i)?{[`Set(${i.size})`]:[...i.values()].map(s=>nr(s))}:Nn(i)?nr(i):ht(i)&&!De(i)&&!ku(i)?String(i):i,nr=(t,i="")=>{var s;return Nn(t)?`Symbol(${(s=t.description)!=null?s:i})`:t};/**
|
|
* @vue/reactivity v3.5.39
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
* @license MIT
|
|
**/let Ut;class Sd{constructor(i=!1){this.detached=i,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!i&&Ut&&(Ut.active?(this.parent=Ut,this.index=(Ut.scopes||(Ut.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let i,s;if(this.scopes)for(i=0,s=this.scopes.length;i<s;i++)this.scopes[i].pause();for(i=0,s=this.effects.length;i<s;i++)this.effects[i].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let i,s;if(this.scopes)for(i=0,s=this.scopes.length;i<s;i++)this.scopes[i].resume();for(i=0,s=this.effects.length;i<s;i++)this.effects[i].resume()}}run(i){if(this._active){const s=Ut;try{return Ut=this,i()}finally{Ut=s}}}on(){++this._on===1&&(this.prevScope=Ut,Ut=this)}off(){if(this._on>0&&--this._on===0){if(Ut===this)Ut=this.prevScope;else{let i=Ut;for(;i;){if(i.prevScope===this){i.prevScope=this.prevScope;break}i=i.prevScope}}this.prevScope=void 0}}stop(i){if(this._active){this._active=!1;let s,l;for(s=0,l=this.effects.length;s<l;s++)this.effects[s].stop();for(this.effects.length=0,s=0,l=this.cleanups.length;s<l;s++)this.cleanups[s]();if(this.cleanups.length=0,this.scopes){for(s=0,l=this.scopes.length;s<l;s++)this.scopes[s].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!i){const u=this.parent.scopes.pop();u&&u!==this&&(this.parent.scopes[this.index]=u,u.index=this.index)}this.parent=void 0}}}function Td(){return Ut}let bt;const ir=new WeakSet;class Mu{constructor(i){this.fn=i,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Ut&&(Ut.active?Ut.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,ir.has(this)&&(ir.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Eu(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,yl(this),Ou(this);const i=bt,s=$n;bt=this,$n=!0;try{return this.fn()}finally{zu(this),bt=i,$n=s,this.flags&=-3}}stop(){if(this.flags&1){for(let i=this.deps;i;i=i.nextDep)Fr(i);this.deps=this.depsTail=void 0,yl(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?ir.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){mr(this)&&this.run()}get dirty(){return mr(this)}}let Au=0,ks,Ss;function Eu(t,i=!1){if(t.flags|=8,i){t.next=Ss,Ss=t;return}t.next=ks,ks=t}function Nr(){Au++}function Dr(){if(--Au>0)return;if(Ss){let i=Ss;for(Ss=void 0;i;){const s=i.next;i.next=void 0,i.flags&=-9,i=s}}let t;for(;ks;){let i=ks;for(ks=void 0;i;){const s=i.next;if(i.next=void 0,i.flags&=-9,i.flags&1)try{i.trigger()}catch(l){t||(t=l)}i=s}}if(t)throw t}function Ou(t){for(let i=t.deps;i;i=i.nextDep)i.version=-1,i.prevActiveLink=i.dep.activeLink,i.dep.activeLink=i}function zu(t){let i,s=t.depsTail,l=s;for(;l;){const u=l.prevDep;l.version===-1?(l===s&&(s=u),Fr(l),Pd(l)):i=l,l.dep.activeLink=l.prevActiveLink,l.prevActiveLink=void 0,l=u}t.deps=i,t.depsTail=s}function mr(t){for(let i=t.deps;i;i=i.nextDep)if(i.dep.version!==i.version||i.dep.computed&&(Iu(i.dep.computed)||i.dep.version!==i.version))return!0;return!!t._dirty}function Iu(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===Ms)||(t.globalVersion=Ms,!t.isSSR&&t.flags&128&&(!t.deps&&!t._dirty||!mr(t))))return;t.flags|=2;const i=t.dep,s=bt,l=$n;bt=t,$n=!0;try{Ou(t);const u=t.fn(t._value);(i.version===0||jn(u,t._value))&&(t.flags|=128,t._value=u,i.version++)}catch(u){throw i.version++,u}finally{bt=s,$n=l,zu(t),t.flags&=-3}}function Fr(t,i=!1){const{dep:s,prevSub:l,nextSub:u}=t;if(l&&(l.nextSub=u,t.prevSub=void 0),u&&(u.prevSub=l,t.nextSub=void 0),s.subs===t&&(s.subs=l,!l&&s.computed)){s.computed.flags&=-5;for(let d=s.computed.deps;d;d=d.nextDep)Fr(d,!0)}!i&&!--s.sc&&s.map&&s.map.delete(s.key)}function Pd(t){const{prevDep:i,nextDep:s}=t;i&&(i.nextDep=s,t.prevDep=void 0),s&&(s.prevDep=i,t.nextDep=void 0)}let $n=!0;const $u=[];function Kn(){$u.push($n),$n=!1}function Gn(){const t=$u.pop();$n=t===void 0?!0:t}function yl(t){const{cleanup:i}=t;if(t.cleanup=void 0,i){const s=bt;bt=void 0;try{i()}finally{bt=s}}}let Ms=0;class Cd{constructor(i,s){this.sub=i,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Rr{constructor(i){this.computed=i,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(i){if(!bt||!$n||bt===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==bt)s=this.activeLink=new Cd(bt,this),bt.deps?(s.prevDep=bt.depsTail,bt.depsTail.nextDep=s,bt.depsTail=s):bt.deps=bt.depsTail=s,Nu(s);else if(s.version===-1&&(s.version=this.version,s.nextDep)){const l=s.nextDep;l.prevDep=s.prevDep,s.prevDep&&(s.prevDep.nextDep=l),s.prevDep=bt.depsTail,s.nextDep=void 0,bt.depsTail.nextDep=s,bt.depsTail=s,bt.deps===s&&(bt.deps=l)}return s}trigger(i){this.version++,Ms++,this.notify(i)}notify(i){Nr();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{Dr()}}}function Nu(t){if(t.dep.sc++,t.sub.flags&4){const i=t.dep.computed;if(i&&!t.dep.subs){i.flags|=20;for(let l=i.deps;l;l=l.nextDep)Nu(l)}const s=t.dep.subs;s!==t&&(t.prevSub=s,s&&(s.nextSub=t)),t.dep.subs=t}}const gr=new WeakMap,lo=Symbol(""),vr=Symbol(""),As=Symbol("");function jt(t,i,s){if($n&&bt){let l=gr.get(t);l||gr.set(t,l=new Map);let u=l.get(s);u||(l.set(s,u=new Rr),u.map=l,u.key=s),u.track()}}function ui(t,i,s,l,u,d){const h=gr.get(t);if(!h){Ms++;return}const v=b=>{b&&b.trigger()};if(Nr(),i==="clear")h.forEach(v);else{const b=De(t),C=b&&Ir(s);if(b&&s==="length"){const T=Number(l);h.forEach((M,R)=>{(R==="length"||R===As||!Nn(R)&&R>=T)&&v(M)})}else switch((s!==void 0||h.has(void 0))&&v(h.get(s)),C&&v(h.get(As)),i){case"add":b?C&&v(h.get("length")):(v(h.get(lo)),$o(t)&&v(h.get(vr)));break;case"delete":b||(v(h.get(lo)),$o(t)&&v(h.get(vr)));break;case"set":$o(t)&&v(h.get(lo));break}}Dr()}function Oo(t){const i=ct(t);return i===t?i:(jt(i,"iterate",As),Cn(t)?i:i.map(Dn))}function Oa(t){return jt(t=ct(t),"iterate",As),t}function Zn(t,i){return fi(t)?Uo(uo(t)?Dn(i):i):Dn(i)}const Ld={__proto__:null,[Symbol.iterator](){return or(this,Symbol.iterator,t=>Zn(this,t))},concat(...t){return Oo(this).concat(...t.map(i=>De(i)?Oo(i):i))},entries(){return or(this,"entries",t=>(t[1]=Zn(this,t[1]),t))},every(t,i){return si(this,"every",t,i,void 0,arguments)},filter(t,i){return si(this,"filter",t,i,s=>s.map(l=>Zn(this,l)),arguments)},find(t,i){return si(this,"find",t,i,s=>Zn(this,s),arguments)},findIndex(t,i){return si(this,"findIndex",t,i,void 0,arguments)},findLast(t,i){return si(this,"findLast",t,i,s=>Zn(this,s),arguments)},findLastIndex(t,i){return si(this,"findLastIndex",t,i,void 0,arguments)},forEach(t,i){return si(this,"forEach",t,i,void 0,arguments)},includes(...t){return sr(this,"includes",t)},indexOf(...t){return sr(this,"indexOf",t)},join(t){return Oo(this).join(t)},lastIndexOf(...t){return sr(this,"lastIndexOf",t)},map(t,i){return si(this,"map",t,i,void 0,arguments)},pop(){return ps(this,"pop")},push(...t){return ps(this,"push",t)},reduce(t,...i){return xl(this,"reduce",t,i)},reduceRight(t,...i){return xl(this,"reduceRight",t,i)},shift(){return ps(this,"shift")},some(t,i){return si(this,"some",t,i,void 0,arguments)},splice(...t){return ps(this,"splice",t)},toReversed(){return Oo(this).toReversed()},toSorted(t){return Oo(this).toSorted(t)},toSpliced(...t){return Oo(this).toSpliced(...t)},unshift(...t){return ps(this,"unshift",t)},values(){return or(this,"values",t=>Zn(this,t))}};function or(t,i,s){const l=Oa(t),u=l[i]();return l!==t&&!Cn(t)&&(u._next=u.next,u.next=()=>{const d=u._next();return d.done||(d.value=s(d.value)),d}),u}const Md=Array.prototype;function si(t,i,s,l,u,d){const h=Oa(t),v=h!==t&&!Cn(t),b=h[i];if(b!==Md[i]){const M=b.apply(t,d);return v?Dn(M):M}let C=s;h!==t&&(v?C=function(M,R){return s.call(this,Zn(t,M),R,t)}:s.length>2&&(C=function(M,R){return s.call(this,M,R,t)}));const T=b.call(h,C,l);return v&&u?u(T):T}function xl(t,i,s,l){const u=Oa(t),d=u!==t&&!Cn(t);let h=s,v=!1;u!==t&&(d?(v=l.length===0,h=function(C,T,M){return v&&(v=!1,C=Zn(t,C)),s.call(this,C,Zn(t,T),M,t)}):s.length>3&&(h=function(C,T,M){return s.call(this,C,T,M,t)}));const b=u[i](h,...l);return v?Zn(t,b):b}function sr(t,i,s){const l=ct(t);jt(l,"iterate",As);const u=l[i](...s);return(u===-1||u===!1)&&Vr(s[0])?(s[0]=ct(s[0]),l[i](...s)):u}function ps(t,i,s=[]){Kn(),Nr();const l=ct(t)[i].apply(t,s);return Dr(),Gn(),l}const Ad=Or("__proto__,__v_isRef,__isVue"),Du=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(Nn));function Ed(t){Nn(t)||(t=String(t));const i=ct(this);return jt(i,"has",t),i.hasOwnProperty(t)}class Fu{constructor(i=!1,s=!1){this._isReadonly=i,this._isShallow=s}get(i,s,l){if(s==="__v_skip")return i.__v_skip;const u=this._isReadonly,d=this._isShallow;if(s==="__v_isReactive")return!u;if(s==="__v_isReadonly")return u;if(s==="__v_isShallow")return d;if(s==="__v_raw")return l===(u?d?Ud:Vu:d?Uu:Bu).get(i)||Object.getPrototypeOf(i)===Object.getPrototypeOf(l)?i:void 0;const h=De(i);if(!u){let b;if(h&&(b=Ld[s]))return b;if(s==="hasOwnProperty")return Ed}const v=Reflect.get(i,s,Gt(i)?i:l);if((Nn(s)?Du.has(s):Ad(s))||(u||jt(i,"get",s),d))return v;if(Gt(v)){const b=h&&Ir(s)?v:v.value;return u&&ht(b)?br(b):b}return ht(v)?u?br(v):kt(v):v}}class Ru extends Fu{constructor(i=!1){super(!1,i)}set(i,s,l,u){let d=i[s];const h=De(i)&&Ir(s);if(!this._isShallow){const C=fi(d);if(!Cn(l)&&!fi(l)&&(d=ct(d),l=ct(l)),!h&&Gt(d)&&!Gt(l))return C||(d.value=l),!0}const v=h?Number(s)<i.length:ft(i,s),b=Reflect.set(i,s,l,Gt(i)?i:u);return i===ct(u)&&b&&(v?jn(l,d)&&ui(i,"set",s,l):ui(i,"add",s,l)),b}deleteProperty(i,s){const l=ft(i,s);i[s];const u=Reflect.deleteProperty(i,s);return u&&l&&ui(i,"delete",s,void 0),u}has(i,s){const l=Reflect.has(i,s);return(!Nn(s)||!Du.has(s))&&jt(i,"has",s),l}ownKeys(i){return jt(i,"iterate",De(i)?"length":lo),Reflect.ownKeys(i)}}class Od extends Fu{constructor(i=!1){super(!0,i)}set(i,s){return!0}deleteProperty(i,s){return!0}}const zd=new Ru,Id=new Od,$d=new Ru(!0);const _r=t=>t,ra=t=>Reflect.getPrototypeOf(t);function Nd(t,i,s){return function(...l){const u=this.__v_raw,d=ct(u),h=$o(d),v=t==="entries"||t===Symbol.iterator&&h,b=t==="keys"&&h,C=u[t](...l),T=s?_r:i?Uo:Dn;return!i&&jt(d,"iterate",b?vr:lo),$t(Object.create(C),{next(){const{value:M,done:R}=C.next();return R?{value:M,done:R}:{value:v?[T(M[0]),T(M[1])]:T(M),done:R}}})}}function la(t){return function(...i){return t==="delete"?!1:t==="clear"?void 0:this}}function Dd(t,i){const s={get(u){const d=this.__v_raw,h=ct(d),v=ct(u);t||(jn(u,v)&&jt(h,"get",u),jt(h,"get",v));const{has:b}=ra(h),C=i?_r:t?Uo:Dn;if(b.call(h,u))return C(d.get(u));if(b.call(h,v))return C(d.get(v));d!==h&&d.get(u)},get size(){const u=this.__v_raw;return!t&&jt(ct(u),"iterate",lo),u.size},has(u){const d=this.__v_raw,h=ct(d),v=ct(u);return t||(jn(u,v)&&jt(h,"has",u),jt(h,"has",v)),u===v?d.has(u):d.has(u)||d.has(v)},forEach(u,d){const h=this,v=h.__v_raw,b=ct(v),C=i?_r:t?Uo:Dn;return!t&&jt(b,"iterate",lo),v.forEach((T,M)=>u.call(d,C(T),C(M),h))}};return $t(s,t?{add:la("add"),set:la("set"),delete:la("delete"),clear:la("clear")}:{add(u){const d=ct(this),h=ra(d),v=ct(u),b=!i&&!Cn(u)&&!fi(u)?v:u;return h.has.call(d,b)||jn(u,b)&&h.has.call(d,u)||jn(v,b)&&h.has.call(d,v)||(d.add(b),ui(d,"add",b,b)),this},set(u,d){!i&&!Cn(d)&&!fi(d)&&(d=ct(d));const h=ct(this),{has:v,get:b}=ra(h);let C=v.call(h,u);C||(u=ct(u),C=v.call(h,u));const T=b.call(h,u);return h.set(u,d),C?jn(d,T)&&ui(h,"set",u,d):ui(h,"add",u,d),this},delete(u){const d=ct(this),{has:h,get:v}=ra(d);let b=h.call(d,u);b||(u=ct(u),b=h.call(d,u)),v&&v.call(d,u);const C=d.delete(u);return b&&ui(d,"delete",u,void 0),C},clear(){const u=ct(this),d=u.size!==0,h=u.clear();return d&&ui(u,"clear",void 0,void 0),h}}),["keys","values","entries",Symbol.iterator].forEach(u=>{s[u]=Nd(u,t,i)}),s}function Br(t,i){const s=Dd(t,i);return(l,u,d)=>u==="__v_isReactive"?!t:u==="__v_isReadonly"?t:u==="__v_raw"?l:Reflect.get(ft(s,u)&&u in l?s:l,u,d)}const Fd={get:Br(!1,!1)},Rd={get:Br(!1,!0)},Bd={get:Br(!0,!1)};const Bu=new WeakMap,Uu=new WeakMap,Vu=new WeakMap,Ud=new WeakMap;function Vd(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function kt(t){return fi(t)?t:Ur(t,!1,zd,Fd,Bu)}function Zd(t){return Ur(t,!1,$d,Rd,Uu)}function br(t){return Ur(t,!0,Id,Bd,Vu)}function Ur(t,i,s,l,u){if(!ht(t)||t.__v_raw&&!(i&&t.__v_isReactive)||t.__v_skip||!Object.isExtensible(t))return t;const d=u.get(t);if(d)return d;const h=Vd(hd(t));if(h===0)return t;const v=new Proxy(t,h===2?l:s);return u.set(t,v),v}function uo(t){return fi(t)?uo(t.__v_raw):!!(t&&t.__v_isReactive)}function fi(t){return!!(t&&t.__v_isReadonly)}function Cn(t){return!!(t&&t.__v_isShallow)}function Vr(t){return t?!!t.__v_raw:!1}function ct(t){const i=t&&t.__v_raw;return i?ct(i):t}function Hd(t){return!ft(t,"__v_skip")&&Object.isExtensible(t)&&Tu(t,"__v_skip",!0),t}const Dn=t=>ht(t)?kt(t):t,Uo=t=>ht(t)?br(t):t;function Gt(t){return t?t.__v_isRef===!0:!1}function W(t){return jd(t,!1)}function jd(t,i){return Gt(t)?t:new Wd(t,i)}class Wd{constructor(i,s){this.dep=new Rr,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?i:ct(i),this._value=s?i:Dn(i),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(i){const s=this._rawValue,l=this.__v_isShallow||Cn(i)||fi(i);i=l?i:ct(i),jn(i,s)&&(this._rawValue=i,this._value=l?i:Dn(i),this.dep.trigger())}}function Oe(t){return Gt(t)?t.value:t}const Kd={get:(t,i,s)=>i==="__v_raw"?t:Oe(Reflect.get(t,i,s)),set:(t,i,s,l)=>{const u=t[i];return Gt(u)&&!Gt(s)?(u.value=s,!0):Reflect.set(t,i,s,l)}};function Zu(t){return uo(t)?t:new Proxy(t,Kd)}class Gd{constructor(i,s,l){this.fn=i,this.setter=s,this._value=void 0,this.dep=new Rr(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ms-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=l}notify(){if(this.flags|=16,!(this.flags&8)&&bt!==this)return Eu(this,!0),!0}get value(){const i=this.dep.track();return Iu(this),i&&(i.version=this.dep.version),this._value}set value(i){this.setter&&this.setter(i)}}function qd(t,i,s=!1){let l,u;return Ye(t)?l=t:(l=t.get,u=t.set),new Gd(l,u,s)}const ua={},ma=new WeakMap;let so;function Yd(t,i=!1,s=so){if(s){let l=ma.get(s);l||ma.set(s,l=[]),l.push(t)}}function Jd(t,i,s=vt){const{immediate:l,deep:u,once:d,scheduler:h,augmentJob:v,call:b}=s,C=fe=>u?fe:Cn(fe)||u===!1||u===0?ci(fe,1):ci(fe);let T,M,R,B,Z=!1,F=!1;if(Gt(t)?(M=()=>t.value,Z=Cn(t)):uo(t)?(M=()=>C(t),Z=!0):De(t)?(F=!0,Z=t.some(fe=>uo(fe)||Cn(fe)),M=()=>t.map(fe=>{if(Gt(fe))return fe.value;if(uo(fe))return C(fe);if(Ye(fe))return b?b(fe,2):fe()})):Ye(t)?i?M=b?()=>b(t,2):t:M=()=>{if(R){Kn();try{R()}finally{Gn()}}const fe=so;so=T;try{return b?b(t,3,[B]):t(B)}finally{so=fe}}:M=Wn,i&&u){const fe=M,Ue=u===!0?1/0:u;M=()=>ci(fe(),Ue)}const he=Td(),pe=()=>{T.stop(),he&&he.active&&zr(he.effects,T)};if(d&&i){const fe=i;i=(...Ue)=>{const $e=fe(...Ue);return pe(),$e}}let q=F?new Array(t.length).fill(ua):ua;const Te=fe=>{if(!(!(T.flags&1)||!T.dirty&&!fe))if(i){const Ue=T.run();if(fe||u||Z||(F?Ue.some(($e,Ie)=>jn($e,q[Ie])):jn(Ue,q))){R&&R();const $e=so;so=T;try{const Ie=[Ue,q===ua?void 0:F&&q[0]===ua?[]:q,B];q=Ue,b?b(i,3,Ie):i(...Ie)}finally{so=$e}}}else T.run()};return v&&v(Te),T=new Mu(M),T.scheduler=h?()=>h(Te,!1):Te,B=fe=>Yd(fe,!1,T),R=T.onStop=()=>{const fe=ma.get(T);if(fe){if(b)b(fe,4);else for(const Ue of fe)Ue();ma.delete(T)}},i?l?Te(!0):q=T.run():h?h(Te.bind(null,!0),!0):T.run(),pe.pause=T.pause.bind(T),pe.resume=T.resume.bind(T),pe.stop=pe,pe}function ci(t,i=1/0,s){if(i<=0||!ht(t)||t.__v_skip||(s=s||new Map,(s.get(t)||0)>=i))return t;if(s.set(t,i),i--,Gt(t))ci(t.value,i,s);else if(De(t))for(let l=0;l<t.length;l++)ci(t[l],i,s);else if(Zo(t)||$o(t))t.forEach(l=>{ci(l,i,s)});else if(ku(t)){for(const l in t)ci(t[l],i,s);for(const l of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,l)&&ci(t[l],i,s)}return t}/**
|
|
* @vue/runtime-core v3.5.39
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
* @license MIT
|
|
**/function Fs(t,i,s,l){try{return l?t(...l):t()}catch(u){za(u,i,s)}}function Mn(t,i,s,l){if(Ye(t)){const u=Fs(t,i,s,l);return u&&xu(u)&&u.catch(d=>{za(d,i,s)}),u}if(De(t)){const u=[];for(let d=0;d<t.length;d++)u.push(Mn(t[d],i,s,l));return u}}function za(t,i,s,l=!0){const u=i?i.vnode:null,{errorHandler:d,throwUnhandledErrorInProduction:h}=i&&i.appContext.config||vt;if(i){let v=i.parent;const b=i.proxy,C=`https://vuejs.org/error-reference/#runtime-${s}`;for(;v;){const T=v.ec;if(T){for(let M=0;M<T.length;M++)if(T[M](t,b,C)===!1)return}v=v.parent}if(d){Kn(),Fs(d,null,10,[t,b,C]),Gn();return}}Xd(t,s,u,l,h)}function Xd(t,i,s,l=!0,u=!1){if(u)throw t;console.error(t)}const Xt=[];let Vn=-1;const No=[];let Oi=null,zo=0;const Hu=Promise.resolve();let ga=null;function ju(t){const i=ga||Hu;return t?i.then(this?t.bind(this):t):i}function Qd(t){let i=Vn+1,s=Xt.length;for(;i<s;){const l=i+s>>>1,u=Xt[l],d=Es(u);d<t||d===t&&u.flags&2?i=l+1:s=l}return i}function Zr(t){if(!(t.flags&1)){const i=Es(t),s=Xt[Xt.length-1];!s||!(t.flags&2)&&i>=Es(s)?Xt.push(t):Xt.splice(Qd(i),0,t),t.flags|=1,Wu()}}function Wu(){ga||(ga=Hu.then(Gu))}function ef(t){De(t)?No.push(...t):Oi&&t.id===-1?Oi.splice(zo+1,0,t):t.flags&1||(No.push(t),t.flags|=1),Wu()}function wl(t,i,s=Vn+1){for(;s<Xt.length;s++){const l=Xt[s];if(l&&l.flags&2){if(t&&l.id!==t.uid)continue;Xt.splice(s,1),s--,l.flags&4&&(l.flags&=-2),l(),l.flags&4||(l.flags&=-2)}}}function Ku(t){if(No.length){const i=[...new Set(No)].sort((s,l)=>Es(s)-Es(l));if(No.length=0,Oi){Oi.push(...i);return}for(Oi=i,zo=0;zo<Oi.length;zo++){const s=Oi[zo];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}Oi=null,zo=0}}const Es=t=>t.id==null?t.flags&2?-1:1/0:t.id;function Gu(t){try{for(Vn=0;Vn<Xt.length;Vn++){const i=Xt[Vn];i&&!(i.flags&8)&&(i.flags&4&&(i.flags&=-2),Fs(i,i.i,i.i?15:14),i.flags&4||(i.flags&=-2))}}finally{for(;Vn<Xt.length;Vn++){const i=Xt[Vn];i&&(i.flags&=-2)}Vn=-1,Xt.length=0,Ku(),ga=null,(Xt.length||No.length)&&Gu()}}let Kt=null,qu=null;function va(t){const i=Kt;return Kt=t,qu=t&&t.type.__scopeId||null,i}function Pe(t,i=Kt,s){if(!i||t._n)return t;const l=(...u)=>{l._d&&ya(-1);const d=va(i);let h;try{h=t(...u)}finally{va(d),l._d&&ya(1)}return h};return l._n=!0,l._c=!0,l._d=!0,l}function re(t,i){if(Kt===null)return t;const s=Fa(Kt),l=t.dirs||(t.dirs=[]);for(let u=0;u<i.length;u++){let[d,h,v,b=vt]=i[u];d&&(Ye(d)&&(d={mounted:d,updated:d}),d.deep&&ci(h),l.push({dir:d,instance:s,value:h,oldValue:void 0,arg:v,modifiers:b}))}return t}function to(t,i,s,l){const u=t.dirs,d=i&&i.dirs;for(let h=0;h<u.length;h++){const v=u[h];d&&(v.oldValue=d[h].value);let b=v.dir[l];b&&(Kn(),Mn(b,s,8,[t.el,v,t,i]),Gn())}}function Yu(t,i){if(Qt){let s=Qt.provides;const l=Qt.parent&&Qt.parent.provides;l===s&&(s=Qt.provides=Object.create(l)),s[t]=i}}function Ts(t,i,s=!1){const l=Lc();if(l||Fo){let u=Fo?Fo._context.provides:l?l.parent==null||l.ce?l.vnode.appContext&&l.vnode.appContext.provides:l.parent.provides:void 0;if(u&&t in u)return u[t];if(arguments.length>1)return s&&Ye(i)?i.call(l&&l.proxy):i}}const tf=Symbol.for("v-scx"),nf=()=>Ts(tf);function It(t,i,s){return Ju(t,i,s)}function Ju(t,i,s=vt){const{immediate:l,deep:u,flush:d,once:h}=s,v=$t({},s),b=i&&l||!i&&d!=="post";let C;if($s){if(d==="sync"){const B=nf();C=B.__watcherHandles||(B.__watcherHandles=[])}else if(!b){const B=()=>{};return B.stop=Wn,B.resume=Wn,B.pause=Wn,B}}const T=Qt;v.call=(B,Z,F)=>Mn(B,T,Z,F);let M=!1;d==="post"?v.scheduler=B=>{Jt(B,T&&T.suspense)}:d!=="sync"&&(M=!0,v.scheduler=(B,Z)=>{Z?B():Zr(B)}),v.augmentJob=B=>{i&&(B.flags|=4),M&&(B.flags|=2,T&&(B.id=T.uid,B.i=T))};const R=Jd(t,i,v);return $s&&(C?C.push(R):b&&R()),R}function of(t,i,s){const l=this.proxy,u=St(t)?t.includes(".")?Xu(l,t):()=>l[t]:t.bind(l,l);let d;Ye(i)?d=i:(d=i.handler,s=i);const h=Rs(this),v=Ju(u,d.bind(l),s);return h(),v}function Xu(t,i){const s=i.split(".");return()=>{let l=t;for(let u=0;u<s.length&&l;u++)l=l[s[u]];return l}}const Ei=new WeakMap,Qu=Symbol("_vte"),ec=t=>t.__isTeleport,ao=t=>t&&(t.disabled||t.disabled===""),sf=t=>t&&(t.defer||t.defer===""),kl=t=>typeof SVGElement<"u"&&t instanceof SVGElement,Sl=t=>typeof MathMLElement=="function"&&t instanceof MathMLElement,yr=(t,i)=>{const s=t&&t.to;return St(s)?i?i(s):null:s},af={name:"Teleport",__isTeleport:!0,process(t,i,s,l,u,d,h,v,b,C){const{mc:T,pc:M,pbc:R,o:{insert:B,querySelector:Z,createText:F,createComment:he,parentNode:pe}}=C,q=ao(i.props);let{dynamicChildren:Te}=i;const fe=(Ie,Ge,_e)=>{Ie.shapeFlag&16&&T(Ie.children,Ge,_e,u,d,h,v,b)},Ue=(Ie=i)=>{const Ge=ao(Ie.props),_e=Ie.target=yr(Ie.props,Z),ye=xr(_e,Ie,F,B);_e&&(h!=="svg"&&kl(_e)?h="svg":h!=="mathml"&&Sl(_e)&&(h="mathml"),u&&u.isCE&&(u.ce._teleportTargets||(u.ce._teleportTargets=new Set)).add(_e),Ge||(fe(Ie,_e,ye),_s(Ie,!1)))},$e=Ie=>{const Ge=()=>{if(Ei.get(Ie)===Ge){if(Ei.delete(Ie),ao(Ie.props)){const _e=pe(Ie.el)||s;fe(Ie,_e,Ie.anchor),_s(Ie,!0)}Ue(Ie)}};Ei.set(Ie,Ge),Jt(Ge,d)};if(t==null){const Ie=i.el=F(""),Ge=i.anchor=F("");if(B(Ie,s,l),B(Ge,s,l),sf(i.props)||d&&d.pendingBranch){$e(i);return}q&&(fe(i,s,Ge),_s(i,!0)),Ue()}else{i.el=t.el;const Ie=i.anchor=t.anchor,Ge=Ei.get(t);if(Ge){Ge.flags|=8,Ei.delete(t),$e(i);return}i.targetStart=t.targetStart;const _e=i.target=t.target,ye=i.targetAnchor=t.targetAnchor,ze=ao(t.props),ne=ze?s:_e,je=ze?Ie:ye;if(h==="svg"||kl(_e)?h="svg":(h==="mathml"||Sl(_e))&&(h="mathml"),Te?(R(t.dynamicChildren,Te,ne,u,d,h,v),Wr(t,i,!0)):b||M(t,i,ne,je,u,d,h,v,!1),q)ze?i.props&&t.props&&i.props.to!==t.props.to&&(i.props.to=t.props.to):ca(i,s,Ie,C,1);else if((i.props&&i.props.to)!==(t.props&&t.props.to)){const ie=yr(i.props,Z);ie&&(i.target=ie,ca(i,ie,null,C,0))}else ze&&ca(i,_e,ye,C,1);_s(i,q)}},remove(t,i,s,{um:l,o:{remove:u}},d){const{shapeFlag:h,children:v,anchor:b,targetStart:C,targetAnchor:T,target:M,props:R}=t,B=ao(R),Z=d||!B,F=Ei.get(t);if(F&&(F.flags|=8,Ei.delete(t)),M&&(u(C),u(T)),d&&u(b),!F&&(B||M)&&h&16)for(let he=0;he<v.length;he++){const pe=v[he];l(pe,i,s,Z,!!pe.dynamicChildren)}},move:ca,hydrate:rf};function ca(t,i,s,{o:{insert:l},m:u},d=2){d===0&&l(t.targetAnchor,i,s);const{el:h,anchor:v,shapeFlag:b,children:C,props:T}=t,M=d===2;if(M&&l(h,i,s),!Ei.has(t)&&(!M||ao(T))&&b&16)for(let R=0;R<C.length;R++)u(C[R],i,s,2);M&&l(v,i,s)}function rf(t,i,s,l,u,d,{o:{nextSibling:h,parentNode:v,querySelector:b,insert:C,createText:T}},M){function R(he,pe){let q=pe;for(;q;){if(q&&q.nodeType===8){if(q.data==="teleport start anchor")i.targetStart=q;else if(q.data==="teleport anchor"){i.targetAnchor=q,he._lpa=i.targetAnchor&&h(i.targetAnchor);break}}q=h(q)}}function B(he,pe){pe.anchor=M(h(he),pe,v(he),s,l,u,d)}const Z=i.target=yr(i.props,b),F=ao(i.props);if(Z){const he=Z._lpa||Z.firstChild;i.shapeFlag&16&&(F?(B(t,i),R(Z,he),i.targetAnchor||xr(Z,i,T,C,v(t)===Z?t:null)):(i.anchor=h(t),R(Z,he),i.targetAnchor||xr(Z,i,T,C),M(he&&h(he),i,Z,s,l,u,d))),_s(i,F)}else F&&i.shapeFlag&16&&(B(t,i),i.targetStart=t,i.targetAnchor=h(t));return i.anchor&&h(i.anchor)}const lf=af;function _s(t,i){const s=t.ctx;if(s&&s.ut){let l,u;for(i?(l=t.el,u=t.anchor):(l=t.targetStart,u=t.targetAnchor);l&&l!==u;)l.nodeType===1&&l.setAttribute("data-v-owner",s.uid),l=l.nextSibling;s.ut()}}function xr(t,i,s,l,u=null){const d=i.targetStart=s(""),h=i.targetAnchor=s("");return d[Qu]=h,t&&(l(d,t,u),l(h,t,u)),h}const Pn=Symbol("_leaveCb"),ms=Symbol("_enterCb");function uf(){const t={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return hi(()=>{t.isMounted=!0}),Ho(()=>{t.isUnmounting=!0}),t}const Sn=[Function,Array],tc={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Sn,onEnter:Sn,onAfterEnter:Sn,onEnterCancelled:Sn,onBeforeLeave:Sn,onLeave:Sn,onAfterLeave:Sn,onLeaveCancelled:Sn,onBeforeAppear:Sn,onAppear:Sn,onAfterAppear:Sn,onAppearCancelled:Sn},nc=t=>{const i=t.subTree;return i.component?nc(i.component):i},cf={name:"BaseTransition",props:tc,setup(t,{slots:i}){const s=Lc(),l=uf();return()=>{const u=i.default&&sc(i.default(),!0),d=u&&u.length?ic(u):s.subTree?D():void 0;if(!d)return;const h=ct(t),{mode:v}=h;if(l.isLeaving)return ar(d);const b=Tl(d);if(!b)return ar(d);let C=wr(b,h,l,s,M=>C=M);b.type!==Wt&&Os(b,C);let T=s.subTree&&Tl(s.subTree);if(T&&T.type!==Wt&&!ro(T,b)&&nc(s).type!==Wt){let M=wr(T,h,l,s);if(Os(T,M),v==="out-in"&&b.type!==Wt)return l.isLeaving=!0,M.afterLeave=()=>{l.isLeaving=!1,s.job.flags&8||s.update(),delete M.afterLeave,T=void 0},ar(d);v==="in-out"&&b.type!==Wt?M.delayLeave=(R,B,Z)=>{const F=oc(l,T);F[String(T.key)]=T,R[Pn]=()=>{B(),R[Pn]=void 0,delete C.delayedLeave,T=void 0},C.delayedLeave=()=>{Z(),delete C.delayedLeave,T=void 0}}:T=void 0}else T&&(T=void 0);return d}}};function ic(t){let i=t[0];if(t.length>1){for(const s of t)if(s.type!==Wt){i=s;break}}return i}const df=cf;function oc(t,i){const{leavingVNodes:s}=t;let l=s.get(i.type);return l||(l=Object.create(null),s.set(i.type,l)),l}function wr(t,i,s,l,u){const{appear:d,mode:h,persisted:v=!1,onBeforeEnter:b,onEnter:C,onAfterEnter:T,onEnterCancelled:M,onBeforeLeave:R,onLeave:B,onAfterLeave:Z,onLeaveCancelled:F,onBeforeAppear:he,onAppear:pe,onAfterAppear:q,onAppearCancelled:Te}=i,fe=String(t.key),Ue=oc(s,t),$e=(_e,ye)=>{_e&&Mn(_e,l,9,ye)},Ie=(_e,ye)=>{const ze=ye[1];$e(_e,ye),De(_e)?_e.every(ne=>ne.length<=1)&&ze():_e.length<=1&&ze()},Ge={mode:h,persisted:v,beforeEnter(_e){let ye=b;if(!s.isMounted)if(d)ye=he||b;else return;_e[Pn]&&_e[Pn](!0);const ze=Ue[fe];ze&&ro(t,ze)&&ze.el[Pn]&&ze.el[Pn](),$e(ye,[_e])},enter(_e){if(Ue[fe]===t)return;let ye=C,ze=T,ne=M;if(!s.isMounted)if(d)ye=pe||C,ze=q||T,ne=Te||M;else return;let je=!1;_e[ms]=We=>{je||(je=!0,We?$e(ne,[_e]):$e(ze,[_e]),Ge.delayedLeave&&Ge.delayedLeave(),_e[ms]=void 0)};const ie=_e[ms].bind(null,!1);ye?Ie(ye,[_e,ie]):ie()},leave(_e,ye){const ze=String(t.key);if(_e[ms]&&_e[ms](!0),s.isUnmounting)return ye();$e(R,[_e]);let ne=!1;_e[Pn]=ie=>{ne||(ne=!0,ye(),ie?$e(F,[_e]):$e(Z,[_e]),_e[Pn]=void 0,Ue[ze]===t&&delete Ue[ze])};const je=_e[Pn].bind(null,!1);Ue[ze]=t,B?Ie(B,[_e,je]):je()},clone(_e){const ye=wr(_e,i,s,l,u);return u&&u(ye),ye}};return Ge}function ar(t){if(Ia(t))return t=Ii(t),t.children=null,t}function Tl(t){if(!Ia(t))return ec(t.type)&&t.children?ic(t.children):t;if(t.component)return t.component.subTree;const{shapeFlag:i,children:s}=t;if(s){if(i&16)return s[0];if(i&32&&Ye(s.default))return s.default()}}function Os(t,i){t.shapeFlag&6&&t.component?(t.transition=i,Os(t.component.subTree,i)):t.shapeFlag&128?(t.ssContent.transition=i.clone(t.ssContent),t.ssFallback.transition=i.clone(t.ssFallback)):t.transition=i}function sc(t,i=!1,s){let l=[],u=0;for(let d=0;d<t.length;d++){let h=t[d];const v=s==null?h.key:String(s)+String(h.key!=null?h.key:d);h.type===ue?(h.patchFlag&128&&u++,l=l.concat(sc(h.children,i,v))):(i||h.type!==Wt)&&l.push(v!=null?Ii(h,{key:v}):h)}if(u>1)for(let d=0;d<l.length;d++)l[d].patchFlag=-2;return l}function ac(t){t.ids=[t.ids[0]+t.ids[2]+++"-",0,0]}function Pl(t,i){let s;return!!((s=Object.getOwnPropertyDescriptor(t,i))&&!s.configurable)}const _a=new WeakMap;function Ps(t,i,s,l,u=!1){if(De(t)){t.forEach((F,he)=>Ps(F,i&&(De(i)?i[he]:i),s,l,u));return}if(Do(l)&&!u){l.shapeFlag&512&&l.type.__asyncResolved&&l.component.subTree.component&&Ps(t,i,s,l.component.subTree);return}const d=l.shapeFlag&4?Fa(l.component):l.el,h=u?null:d,{i:v,r:b}=t,C=i&&i.r,T=v.refs===vt?v.refs={}:v.refs,M=v.setupState,R=ct(M),B=M===vt?yu:F=>Pl(T,F)?!1:ft(R,F),Z=(F,he)=>!(he&&Pl(T,he));if(C!=null&&C!==b){if(Cl(i),St(C))T[C]=null,B(C)&&(M[C]=null);else if(Gt(C)){const F=i;Z(C,F.k)&&(C.value=null),F.k&&(T[F.k]=null)}}if(Ye(b)){Kn();try{Fs(b,v,12,[h,T])}finally{Gn()}}else{const F=St(b),he=Gt(b);if(F||he){const pe=()=>{if(t.f){const q=F?B(b)?M[b]:T[b]:Z()||!t.k?b.value:T[t.k];if(u)De(q)&&zr(q,d);else if(De(q))q.includes(d)||q.push(d);else if(F)T[b]=[d],B(b)&&(M[b]=T[b]);else{const Te=[d];Z(b,t.k)&&(b.value=Te),t.k&&(T[t.k]=Te)}}else F?(T[b]=h,B(b)&&(M[b]=h)):he&&(Z(b,t.k)&&(b.value=h),t.k&&(T[t.k]=h))};if(h){const q=()=>{pe(),_a.delete(t)};q.id=-1,_a.set(t,q),Jt(q,s)}else Cl(t),pe()}}}function Cl(t){const i=_a.get(t);i&&(i.flags|=8,_a.delete(t))}Ea().requestIdleCallback;Ea().cancelIdleCallback;const Do=t=>!!t.type.__asyncLoader,Ia=t=>t.type.__isKeepAlive;function ff(t,i){rc(t,"a",i)}function hf(t,i){rc(t,"da",i)}function rc(t,i,s=Qt){const l=t.__wdc||(t.__wdc=()=>{let u=s;for(;u;){if(u.isDeactivated)return;u=u.parent}return t()});if($a(i,l,s),s){let u=s.parent;for(;u&&u.parent;)Ia(u.parent.vnode)&&pf(l,i,s,u),u=u.parent}}function pf(t,i,s,l){const u=$a(i,t,l,!0);lc(()=>{zr(l[i],u)},s)}function $a(t,i,s=Qt,l=!1){if(s){const u=s[t]||(s[t]=[]),d=i.__weh||(i.__weh=(...h)=>{Kn();const v=Rs(s),b=Mn(i,s,t,h);return v(),Gn(),b});return l?u.unshift(d):u.push(d),d}}const pi=t=>(i,s=Qt)=>{(!$s||t==="sp")&&$a(t,(...l)=>i(...l),s)},mf=pi("bm"),hi=pi("m"),gf=pi("bu"),vf=pi("u"),Ho=pi("bum"),lc=pi("um"),_f=pi("sp"),bf=pi("rtg"),yf=pi("rtc");function xf(t,i=Qt){$a("ec",t,i)}const wf=Symbol.for("v-ndc");function Be(t,i,s,l){let u;const d=s,h=De(t);if(h||St(t)){const v=h&&uo(t);let b=!1,C=!1;v&&(b=!Cn(t),C=fi(t),t=Oa(t)),u=new Array(t.length);for(let T=0,M=t.length;T<M;T++)u[T]=i(b?C?Uo(Dn(t[T])):Dn(t[T]):t[T],T,void 0,d)}else if(typeof t=="number"){u=new Array(t);for(let v=0;v<t;v++)u[v]=i(v+1,v,void 0,d)}else if(ht(t))if(t[Symbol.iterator])u=Array.from(t,(v,b)=>i(v,b,void 0,d));else{const v=Object.keys(t);u=new Array(v.length);for(let b=0,C=v.length;b<C;b++){const T=v[b];u[b]=i(t[T],T,b,d)}}else u=[];return u}function kf(t,i,s={},l,u){if(Kt.ce||Kt.parent&&Do(Kt.parent)&&Kt.parent.ce){const C=Object.keys(s).length>0;return p(),lt(ue,null,[E("slot",s,l)],C?-2:64)}let d=t[i];d&&d._c&&(d._d=!1),p();const h=d&&uc(d(s)),v=s.key||h&&h.key,b=lt(ue,{key:(v&&!Nn(v)?v:`_${i}`)+(!h&&l?"_fb":"")},h||[],h&&t._===1?64:-2);return b.scopeId&&(b.slotScopeIds=[b.scopeId+"-s"]),d&&d._c&&(d._d=!0),b}function uc(t){return t.some(i=>Is(i)?!(i.type===Wt||i.type===ue&&!uc(i.children)):!0)?t:null}const kr=t=>t?Mc(t)?Fa(t):kr(t.parent):null,Cs=$t(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>kr(t.parent),$root:t=>kr(t.root),$host:t=>t.ce,$emit:t=>t.emit,$options:t=>dc(t),$forceUpdate:t=>t.f||(t.f=()=>{Zr(t.update)}),$nextTick:t=>t.n||(t.n=ju.bind(t.proxy)),$watch:t=>of.bind(t)}),rr=(t,i)=>t!==vt&&!t.__isScriptSetup&&ft(t,i),Sf={get({_:t},i){if(i==="__v_skip")return!0;const{ctx:s,setupState:l,data:u,props:d,accessCache:h,type:v,appContext:b}=t;if(i[0]!=="$"){const R=h[i];if(R!==void 0)switch(R){case 1:return l[i];case 2:return u[i];case 4:return s[i];case 3:return d[i]}else{if(rr(l,i))return h[i]=1,l[i];if(u!==vt&&ft(u,i))return h[i]=2,u[i];if(ft(d,i))return h[i]=3,d[i];if(s!==vt&&ft(s,i))return h[i]=4,s[i];Sr&&(h[i]=0)}}const C=Cs[i];let T,M;if(C)return i==="$attrs"&&jt(t.attrs,"get",""),C(t);if((T=v.__cssModules)&&(T=T[i]))return T;if(s!==vt&&ft(s,i))return h[i]=4,s[i];if(M=b.config.globalProperties,ft(M,i))return M[i]},set({_:t},i,s){const{data:l,setupState:u,ctx:d}=t;return rr(u,i)?(u[i]=s,!0):l!==vt&&ft(l,i)?(l[i]=s,!0):ft(t.props,i)||i[0]==="$"&&i.slice(1)in t?!1:(d[i]=s,!0)},has({_:{data:t,setupState:i,accessCache:s,ctx:l,appContext:u,props:d,type:h}},v){let b;return!!(s[v]||t!==vt&&v[0]!=="$"&&ft(t,v)||rr(i,v)||ft(d,v)||ft(l,v)||ft(Cs,v)||ft(u.config.globalProperties,v)||(b=h.__cssModules)&&b[v])},defineProperty(t,i,s){return s.get!=null?t._.accessCache[i]=0:ft(s,"value")&&this.set(t,i,s.value,null),Reflect.defineProperty(t,i,s)}};function Ll(t){return De(t)?t.reduce((i,s)=>(i[s]=null,i),{}):t}let Sr=!0;function Tf(t){const i=dc(t),s=t.proxy,l=t.ctx;Sr=!1,i.beforeCreate&&Ml(i.beforeCreate,t,"bc");const{data:u,computed:d,methods:h,watch:v,provide:b,inject:C,created:T,beforeMount:M,mounted:R,beforeUpdate:B,updated:Z,activated:F,deactivated:he,beforeDestroy:pe,beforeUnmount:q,destroyed:Te,unmounted:fe,render:Ue,renderTracked:$e,renderTriggered:Ie,errorCaptured:Ge,serverPrefetch:_e,expose:ye,inheritAttrs:ze,components:ne,directives:je,filters:ie}=i;if(C&&Pf(C,l,null),h)for(const ce in h){const se=h[ce];Ye(se)&&(l[ce]=se.bind(s))}if(u){const ce=u.call(s,s);ht(ce)&&(t.data=kt(ce))}if(Sr=!0,d)for(const ce in d){const se=d[ce],ot=Ye(se)?se.bind(s,s):Ye(se.get)?se.get.bind(s,s):Wn,ee=!Ye(se)&&Ye(se.set)?se.set.bind(s):Wn,be=we({get:ot,set:ee});Object.defineProperty(l,ce,{enumerable:!0,configurable:!0,get:()=>be.value,set:Ne=>be.value=Ne})}if(v)for(const ce in v)cc(v[ce],l,s,ce);if(b){const ce=Ye(b)?b.call(s):b;Reflect.ownKeys(ce).forEach(se=>{Yu(se,ce[se])})}T&&Ml(T,t,"c");function le(ce,se){De(se)?se.forEach(ot=>ce(ot.bind(s))):se&&ce(se.bind(s))}if(le(mf,M),le(hi,R),le(gf,B),le(vf,Z),le(ff,F),le(hf,he),le(xf,Ge),le(yf,$e),le(bf,Ie),le(Ho,q),le(lc,fe),le(_f,_e),De(ye))if(ye.length){const ce=t.exposed||(t.exposed={});ye.forEach(se=>{Object.defineProperty(ce,se,{get:()=>s[se],set:ot=>s[se]=ot,enumerable:!0})})}else t.exposed||(t.exposed={});Ue&&t.render===Wn&&(t.render=Ue),ze!=null&&(t.inheritAttrs=ze),ne&&(t.components=ne),je&&(t.directives=je),_e&&ac(t)}function Pf(t,i,s=Wn){De(t)&&(t=Tr(t));for(const l in t){const u=t[l];let d;ht(u)?"default"in u?d=Ts(u.from||l,u.default,!0):d=Ts(u.from||l):d=Ts(u),Gt(d)?Object.defineProperty(i,l,{enumerable:!0,configurable:!0,get:()=>d.value,set:h=>d.value=h}):i[l]=d}}function Ml(t,i,s){Mn(De(t)?t.map(l=>l.bind(i.proxy)):t.bind(i.proxy),i,s)}function cc(t,i,s,l){let u=l.includes(".")?Xu(s,l):()=>s[l];if(St(t)){const d=i[t];Ye(d)&&It(u,d)}else if(Ye(t))It(u,t.bind(s));else if(ht(t))if(De(t))t.forEach(d=>cc(d,i,s,l));else{const d=Ye(t.handler)?t.handler.bind(s):i[t.handler];Ye(d)&&It(u,d,t)}}function dc(t){const i=t.type,{mixins:s,extends:l}=i,{mixins:u,optionsCache:d,config:{optionMergeStrategies:h}}=t.appContext,v=d.get(i);let b;return v?b=v:!u.length&&!s&&!l?b=i:(b={},u.length&&u.forEach(C=>ba(b,C,h,!0)),ba(b,i,h)),ht(i)&&d.set(i,b),b}function ba(t,i,s,l=!1){const{mixins:u,extends:d}=i;d&&ba(t,d,s,!0),u&&u.forEach(h=>ba(t,h,s,!0));for(const h in i)if(!(l&&h==="expose")){const v=Cf[h]||s&&s[h];t[h]=v?v(t[h],i[h]):i[h]}return t}const Cf={data:Al,props:El,emits:El,methods:bs,computed:bs,beforeCreate:Yt,created:Yt,beforeMount:Yt,mounted:Yt,beforeUpdate:Yt,updated:Yt,beforeDestroy:Yt,beforeUnmount:Yt,destroyed:Yt,unmounted:Yt,activated:Yt,deactivated:Yt,errorCaptured:Yt,serverPrefetch:Yt,components:bs,directives:bs,watch:Mf,provide:Al,inject:Lf};function Al(t,i){return i?t?function(){return $t(Ye(t)?t.call(this,this):t,Ye(i)?i.call(this,this):i)}:i:t}function Lf(t,i){return bs(Tr(t),Tr(i))}function Tr(t){if(De(t)){const i={};for(let s=0;s<t.length;s++)i[t[s]]=t[s];return i}return t}function Yt(t,i){return t?[...new Set([].concat(t,i))]:i}function bs(t,i){return t?$t(Object.create(null),t,i):i}function El(t,i){return t?De(t)&&De(i)?[...new Set([...t,...i])]:$t(Object.create(null),Ll(t),Ll(i??{})):i}function Mf(t,i){if(!t)return i;if(!i)return t;const s=$t(Object.create(null),t);for(const l in i)s[l]=Yt(t[l],i[l]);return s}function fc(){return{app:null,config:{isNativeTag:yu,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Af=0;function Ef(t,i){return function(l,u=null){Ye(l)||(l=$t({},l)),u!=null&&!ht(u)&&(u=null);const d=fc(),h=new WeakSet,v=[];let b=!1;const C=d.app={_uid:Af++,_component:l,_props:u,_container:null,_context:d,_instance:null,version:uh,get config(){return d.config},set config(T){},use(T,...M){return h.has(T)||(T&&Ye(T.install)?(h.add(T),T.install(C,...M)):Ye(T)&&(h.add(T),T(C,...M))),C},mixin(T){return d.mixins.includes(T)||d.mixins.push(T),C},component(T,M){return M?(d.components[T]=M,C):d.components[T]},directive(T,M){return M?(d.directives[T]=M,C):d.directives[T]},mount(T,M,R){if(!b){const B=C._ceVNode||E(l,u);return B.appContext=d,R===!0?R="svg":R===!1&&(R=void 0),t(B,T,R),b=!0,C._container=T,T.__vue_app__=C,Fa(B.component)}},onUnmount(T){v.push(T)},unmount(){b&&(Mn(v,C._instance,16),t(null,C._container),delete C._container.__vue_app__)},provide(T,M){return d.provides[T]=M,C},runWithContext(T){const M=Fo;Fo=C;try{return T()}finally{Fo=M}}};return C}}let Fo=null;const Of=(t,i)=>i==="modelValue"||i==="model-value"?t.modelModifiers:t[`${i}Modifiers`]||t[`${In(i)}Modifiers`]||t[`${Ni(i)}Modifiers`];function zf(t,i,...s){if(t.isUnmounted)return;const l=t.vnode.props||vt;let u=s;const d=i.startsWith("update:"),h=d&&Of(l,i.slice(7));h&&(h.trim&&(u=s.map(T=>St(T)?T.trim():T)),h.number&&(u=s.map(Aa)));let v,b=l[v=tr(i)]||l[v=tr(In(i))];!b&&d&&(b=l[v=tr(Ni(i))]),b&&Mn(b,t,6,u);const C=l[v+"Once"];if(C){if(!t.emitted)t.emitted={};else if(t.emitted[v])return;t.emitted[v]=!0,Mn(C,t,6,u)}}const If=new WeakMap;function hc(t,i,s=!1){const l=s?If:i.emitsCache,u=l.get(t);if(u!==void 0)return u;const d=t.emits;let h={},v=!1;if(!Ye(t)){const b=C=>{const T=hc(C,i,!0);T&&(v=!0,$t(h,T))};!s&&i.mixins.length&&i.mixins.forEach(b),t.extends&&b(t.extends),t.mixins&&t.mixins.forEach(b)}return!d&&!v?(ht(t)&&l.set(t,null),null):(De(d)?d.forEach(b=>h[b]=null):$t(h,d),ht(t)&&l.set(t,h),h)}function Na(t,i){return!t||!Ca(i)?!1:(i=i.slice(2),i=i==="Once"?i:i.replace(/Once$/,""),ft(t,i[0].toLowerCase()+i.slice(1))||ft(t,Ni(i))||ft(t,i))}function Ol(t){const{type:i,vnode:s,proxy:l,withProxy:u,propsOptions:[d],slots:h,attrs:v,emit:b,render:C,renderCache:T,props:M,data:R,setupState:B,ctx:Z,inheritAttrs:F}=t,he=va(t);let pe,q;try{if(s.shapeFlag&4){const fe=u||l,Ue=fe;pe=Hn(C.call(Ue,fe,T,M,B,R,Z)),q=v}else{const fe=i;pe=Hn(fe.length>1?fe(M,{attrs:v,slots:h,emit:b}):fe(M,null)),q=i.props?v:$f(v)}}catch(fe){Ls.length=0,za(fe,t,1),pe=E(Wt)}let Te=pe;if(q&&F!==!1){const fe=Object.keys(q),{shapeFlag:Ue}=Te;fe.length&&Ue&7&&(d&&fe.some(La)&&(q=Nf(q,d)),Te=Ii(Te,q,!1,!0))}return s.dirs&&(Te=Ii(Te,null,!1,!0),Te.dirs=Te.dirs?Te.dirs.concat(s.dirs):s.dirs),s.transition&&Os(Te,s.transition),pe=Te,va(he),pe}const $f=t=>{let i;for(const s in t)(s==="class"||s==="style"||Ca(s))&&((i||(i={}))[s]=t[s]);return i},Nf=(t,i)=>{const s={};for(const l in t)(!La(l)||!(l.slice(9)in i))&&(s[l]=t[l]);return s};function Df(t,i,s){const{props:l,children:u,component:d}=t,{props:h,children:v,patchFlag:b}=i,C=d.emitsOptions;if(i.dirs||i.transition)return!0;if(s&&b>=0){if(b&1024)return!0;if(b&16)return l?zl(l,h,C):!!h;if(b&8){const T=i.dynamicProps;for(let M=0;M<T.length;M++){const R=T[M];if(pc(h,l,R)&&!Na(C,R))return!0}}}else return(u||v)&&(!v||!v.$stable)?!0:l===h?!1:l?h?zl(l,h,C):!0:!!h;return!1}function zl(t,i,s){const l=Object.keys(i);if(l.length!==Object.keys(t).length)return!0;for(let u=0;u<l.length;u++){const d=l[u];if(pc(i,t,d)&&!Na(s,d))return!0}return!1}function pc(t,i,s){const l=t[s],u=i[s];return s==="style"&&ht(l)&&ht(u)?!zi(l,u):l!==u}function Ff({vnode:t,parent:i,suspense:s},l){for(;i;){const u=i.subTree;if(u.suspense&&u.suspense.activeBranch===t&&(u.suspense.vnode.el=u.el=l,t=u),u===t)(t=i.vnode).el=l,i=i.parent;else break}s&&s.activeBranch===t&&(s.vnode.el=l)}const mc={},gc=()=>Object.create(mc),vc=t=>Object.getPrototypeOf(t)===mc;function Rf(t,i,s,l=!1){const u={},d=gc();t.propsDefaults=Object.create(null),_c(t,i,u,d);for(const h in t.propsOptions[0])h in u||(u[h]=void 0);s?t.props=l?u:Zd(u):t.type.props?t.props=u:t.props=d,t.attrs=d}function Bf(t,i,s,l){const{props:u,attrs:d,vnode:{patchFlag:h}}=t,v=ct(u),[b]=t.propsOptions;let C=!1;if((l||h>0)&&!(h&16)){if(h&8){const T=t.vnode.dynamicProps;for(let M=0;M<T.length;M++){let R=T[M];if(Na(t.emitsOptions,R))continue;const B=i[R];if(b)if(ft(d,R))B!==d[R]&&(d[R]=B,C=!0);else{const Z=In(R);u[Z]=Pr(b,v,Z,B,t,!1)}else B!==d[R]&&(d[R]=B,C=!0)}}}else{_c(t,i,u,d)&&(C=!0);let T;for(const M in v)(!i||!ft(i,M)&&((T=Ni(M))===M||!ft(i,T)))&&(b?s&&(s[M]!==void 0||s[T]!==void 0)&&(u[M]=Pr(b,v,M,void 0,t,!0)):delete u[M]);if(d!==v)for(const M in d)(!i||!ft(i,M))&&(delete d[M],C=!0)}C&&ui(t.attrs,"set","")}function _c(t,i,s,l){const[u,d]=t.propsOptions;let h=!1,v;if(i)for(let b in i){if(ws(b))continue;const C=i[b];let T;u&&ft(u,T=In(b))?!d||!d.includes(T)?s[T]=C:(v||(v={}))[T]=C:Na(t.emitsOptions,b)||(!(b in l)||C!==l[b])&&(l[b]=C,h=!0)}if(d){const b=ct(s),C=v||vt;for(let T=0;T<d.length;T++){const M=d[T];s[M]=Pr(u,b,M,C[M],t,!ft(C,M))}}return h}function Pr(t,i,s,l,u,d){const h=t[s];if(h!=null){const v=ft(h,"default");if(v&&l===void 0){const b=h.default;if(h.type!==Function&&!h.skipFactory&&Ye(b)){const{propsDefaults:C}=u;if(s in C)l=C[s];else{const T=Rs(u);l=C[s]=b.call(null,i),T()}}else l=b;u.ce&&u.ce._setProp(s,l)}h[0]&&(d&&!v?l=!1:h[1]&&(l===""||l===Ni(s))&&(l=!0))}return l}const Uf=new WeakMap;function bc(t,i,s=!1){const l=s?Uf:i.propsCache,u=l.get(t);if(u)return u;const d=t.props,h={},v=[];let b=!1;if(!Ye(t)){const T=M=>{b=!0;const[R,B]=bc(M,i,!0);$t(h,R),B&&v.push(...B)};!s&&i.mixins.length&&i.mixins.forEach(T),t.extends&&T(t.extends),t.mixins&&t.mixins.forEach(T)}if(!d&&!b)return ht(t)&&l.set(t,Io),Io;if(De(d))for(let T=0;T<d.length;T++){const M=In(d[T]);Il(M)&&(h[M]=vt)}else if(d)for(const T in d){const M=In(T);if(Il(M)){const R=d[T],B=h[M]=De(R)||Ye(R)?{type:R}:$t({},R),Z=B.type;let F=!1,he=!0;if(De(Z))for(let pe=0;pe<Z.length;++pe){const q=Z[pe],Te=Ye(q)&&q.name;if(Te==="Boolean"){F=!0;break}else Te==="String"&&(he=!1)}else F=Ye(Z)&&Z.name==="Boolean";B[0]=F,B[1]=he,(F||ft(B,"default"))&&v.push(M)}}const C=[h,v];return ht(t)&&l.set(t,C),C}function Il(t){return t[0]!=="$"&&!ws(t)}const Hr=t=>t==="_"||t==="_ctx"||t==="$stable",jr=t=>De(t)?t.map(Hn):[Hn(t)],Vf=(t,i,s)=>{if(i._n)return i;const l=Pe((...u)=>jr(i(...u)),s);return l._c=!1,l},yc=(t,i,s)=>{const l=t._ctx;for(const u in t){if(Hr(u))continue;const d=t[u];if(Ye(d))i[u]=Vf(u,d,l);else if(d!=null){const h=jr(d);i[u]=()=>h}}},xc=(t,i)=>{const s=jr(i);t.slots.default=()=>s},wc=(t,i,s)=>{for(const l in i)(s||!Hr(l))&&(t[l]=i[l])},Zf=(t,i,s)=>{const l=t.slots=gc();if(t.vnode.shapeFlag&32){const u=i._;u?(wc(l,i,s),s&&Tu(l,"_",u,!0)):yc(i,l)}else i&&xc(t,i)},Hf=(t,i,s)=>{const{vnode:l,slots:u}=t;let d=!0,h=vt;if(l.shapeFlag&32){const v=i._;v?s&&v===1?d=!1:wc(u,i,s):(d=!i.$stable,yc(i,u)),h=i}else i&&(xc(t,i),h={default:1});if(d)for(const v in u)!Hr(v)&&h[v]==null&&delete u[v]},Jt=qf;function jf(t){return Wf(t)}function Wf(t,i){const s=Ea();s.__VUE__=!0;const{insert:l,remove:u,patchProp:d,createElement:h,createText:v,createComment:b,setText:C,setElementText:T,parentNode:M,nextSibling:R,setScopeId:B=Wn,insertStaticContent:Z}=t,F=(y,_,w,K=null,H=null,V=null,ae=void 0,te=null,Q=!!_.dynamicChildren)=>{if(y===_)return;y&&!ro(y,_)&&(K=A(y),Ne(y,H,V,!0),y=null),_.patchFlag===-2&&(Q=!1,_.dynamicChildren=null);const{type:G,ref:me,shapeFlag:oe}=_;switch(G){case Da:he(y,_,w,K);break;case Wt:pe(y,_,w,K);break;case ur:y==null&&q(_,w,K,ae);break;case ue:ne(y,_,w,K,H,V,ae,te,Q);break;default:oe&1?Ue(y,_,w,K,H,V,ae,te,Q):oe&6?je(y,_,w,K,H,V,ae,te,Q):(oe&64||oe&128)&&G.process(y,_,w,K,H,V,ae,te,Q,ut)}me!=null&&H?Ps(me,y&&y.ref,V,_||y,!_):me==null&&y&&y.ref!=null&&Ps(y.ref,null,V,y,!0)},he=(y,_,w,K)=>{if(y==null)l(_.el=v(_.children),w,K);else{const H=_.el=y.el;_.children!==y.children&&C(H,_.children)}},pe=(y,_,w,K)=>{y==null?l(_.el=b(_.children||""),w,K):_.el=y.el},q=(y,_,w,K)=>{[y.el,y.anchor]=Z(y.children,_,w,K,y.el,y.anchor)},Te=({el:y,anchor:_},w,K)=>{let H;for(;y&&y!==_;)H=R(y),l(y,w,K),y=H;l(_,w,K)},fe=({el:y,anchor:_})=>{let w;for(;y&&y!==_;)w=R(y),u(y),y=w;u(_)},Ue=(y,_,w,K,H,V,ae,te,Q)=>{if(_.type==="svg"?ae="svg":_.type==="math"&&(ae="mathml"),y==null)$e(_,w,K,H,V,ae,te,Q);else{const G=y.el&&y.el._isVueCE?y.el:null;try{G&&G._beginPatch(),_e(y,_,H,V,ae,te,Q)}finally{G&&G._endPatch()}}},$e=(y,_,w,K,H,V,ae,te)=>{let Q,G;const{props:me,shapeFlag:oe,transition:ke,dirs:Ce}=y;if(Q=y.el=h(y.type,V,me&&me.is,me),oe&8?T(Q,y.children):oe&16&&Ge(y.children,Q,null,K,H,lr(y,V),ae,te),Ce&&to(y,null,K,"created"),Ie(Q,y,y.scopeId,ae,K),me){for(const et in me)et!=="value"&&!ws(et)&&d(Q,et,null,me[et],V,K);"value"in me&&d(Q,"value",null,me.value,V),(G=me.onVnodeBeforeMount)&&Un(G,K,y)}Ce&&to(y,null,K,"beforeMount");const He=Kf(H,ke);He&&ke.beforeEnter(Q),l(Q,_,w),((G=me&&me.onVnodeMounted)||He||Ce)&&Jt(()=>{try{G&&Un(G,K,y),He&&ke.enter(Q),Ce&&to(y,null,K,"mounted")}finally{}},H)},Ie=(y,_,w,K,H)=>{if(w&&B(y,w),K)for(let V=0;V<K.length;V++)B(y,K[V]);if(H){let V=H.subTree;if(_===V||Tc(V.type)&&(V.ssContent===_||V.ssFallback===_)){const ae=H.vnode;Ie(y,ae,ae.scopeId,ae.slotScopeIds,H.parent)}}},Ge=(y,_,w,K,H,V,ae,te,Q=0)=>{for(let G=Q;G<y.length;G++){const me=y[G]=te?li(y[G]):Hn(y[G]);F(null,me,_,w,K,H,V,ae,te)}},_e=(y,_,w,K,H,V,ae)=>{const te=_.el=y.el;let{patchFlag:Q,dynamicChildren:G,dirs:me}=_;Q|=y.patchFlag&16;const oe=y.props||vt,ke=_.props||vt;let Ce;if(w&&no(w,!1),(Ce=ke.onVnodeBeforeUpdate)&&Un(Ce,w,_,y),me&&to(_,y,w,"beforeUpdate"),w&&no(w,!0),G&&(!y.dynamicChildren||y.dynamicChildren.length!==G.length)&&(Q=0,ae=!1,G=null),(oe.innerHTML&&ke.innerHTML==null||oe.textContent&&ke.textContent==null)&&T(te,""),G?ye(y.dynamicChildren,G,te,w,K,lr(_,H),V):ae||se(y,_,te,null,w,K,lr(_,H),V,!1),Q>0){if(Q&16)ze(te,oe,ke,w,H);else if(Q&2&&oe.class!==ke.class&&d(te,"class",null,ke.class,H),Q&4&&d(te,"style",oe.style,ke.style,H),Q&8){const He=_.dynamicProps;for(let et=0;et<He.length;et++){const U=He[et],O=oe[U],xe=ke[U];(xe!==O||U==="value")&&d(te,U,O,xe,H,w)}}Q&1&&y.children!==_.children&&T(te,_.children)}else!ae&&G==null&&ze(te,oe,ke,w,H);((Ce=ke.onVnodeUpdated)||me)&&Jt(()=>{Ce&&Un(Ce,w,_,y),me&&to(_,y,w,"updated")},K)},ye=(y,_,w,K,H,V,ae)=>{for(let te=0;te<_.length;te++){const Q=y[te],G=_[te],me=Q.el&&(Q.type===ue||!ro(Q,G)||Q.shapeFlag&198)?M(Q.el):w;F(Q,G,me,null,K,H,V,ae,!0)}},ze=(y,_,w,K,H)=>{if(_!==w){if(_!==vt)for(const V in _)!ws(V)&&!(V in w)&&d(y,V,_[V],null,H,K);for(const V in w){if(ws(V))continue;const ae=w[V],te=_[V];ae!==te&&V!=="value"&&d(y,V,te,ae,H,K)}"value"in w&&d(y,"value",_.value,w.value,H)}},ne=(y,_,w,K,H,V,ae,te,Q)=>{const G=_.el=y?y.el:v(""),me=_.anchor=y?y.anchor:v("");let{patchFlag:oe,dynamicChildren:ke,slotScopeIds:Ce}=_;Ce&&(te=te?te.concat(Ce):Ce),y==null?(l(G,w,K),l(me,w,K),Ge(_.children||[],w,me,H,V,ae,te,Q)):oe>0&&oe&64&&ke&&y.dynamicChildren&&y.dynamicChildren.length===ke.length?(ye(y.dynamicChildren,ke,w,H,V,ae,te),(_.key!=null||H&&_===H.subTree)&&Wr(y,_,!0)):se(y,_,w,me,H,V,ae,te,Q)},je=(y,_,w,K,H,V,ae,te,Q)=>{_.slotScopeIds=te,y==null?_.shapeFlag&512?H.ctx.activate(_,w,K,ae,Q):ie(_,w,K,H,V,ae,Q):We(y,_,Q)},ie=(y,_,w,K,H,V,ae)=>{const te=y.component=nh(y,K,H);if(Ia(y)&&(te.ctx.renderer=ut),ih(te,!1,ae),te.asyncDep){if(H&&H.registerDep(te,le,ae),!y.el){const Q=te.subTree=E(Wt);pe(null,Q,_,w),y.placeholder=Q.el}}else le(te,y,_,w,H,V,ae)},We=(y,_,w)=>{const K=_.component=y.component;if(Df(y,_,w))if(K.asyncDep&&!K.asyncResolved){ce(K,_,w);return}else K.next=_,K.update();else _.el=y.el,K.vnode=_},le=(y,_,w,K,H,V,ae)=>{const te=()=>{if(y.isMounted){let{next:oe,bu:ke,u:Ce,parent:He,vnode:et}=y;{const pt=kc(y);if(pt){oe&&(oe.el=et.el,ce(y,oe,ae)),pt.asyncDep.then(()=>{Jt(()=>{y.isUnmounted||G()},H)});return}}let U=oe,O;no(y,!1),oe?(oe.el=et.el,ce(y,oe,ae)):oe=et,ke&&ha(ke),(O=oe.props&&oe.props.onVnodeBeforeUpdate)&&Un(O,He,oe,et),no(y,!0);const xe=Ol(y),Je=y.subTree;y.subTree=xe,F(Je,xe,M(Je.el),A(Je),y,H,V),oe.el=xe.el,U===null&&Ff(y,xe.el),Ce&&Jt(Ce,H),(O=oe.props&&oe.props.onVnodeUpdated)&&Jt(()=>Un(O,He,oe,et),H)}else{let oe;const{el:ke,props:Ce}=_,{bm:He,m:et,parent:U,root:O,type:xe}=y,Je=Do(_);no(y,!1),He&&ha(He),!Je&&(oe=Ce&&Ce.onVnodeBeforeMount)&&Un(oe,U,_),no(y,!0);{O.ce&&O.ce._hasShadowRoot()&&O.ce._injectChildStyle(xe,y.parent?y.parent.type:void 0);const pt=y.subTree=Ol(y);F(null,pt,w,K,y,H,V),_.el=pt.el}if(et&&Jt(et,H),!Je&&(oe=Ce&&Ce.onVnodeMounted)){const pt=_;Jt(()=>Un(oe,U,pt),H)}(_.shapeFlag&256||U&&Do(U.vnode)&&U.vnode.shapeFlag&256)&&y.a&&Jt(y.a,H),y.isMounted=!0,_=w=K=null}};y.scope.on();const Q=y.effect=new Mu(te);y.scope.off();const G=y.update=Q.run.bind(Q),me=y.job=Q.runIfDirty.bind(Q);me.i=y,me.id=y.uid,Q.scheduler=()=>Zr(me),no(y,!0),G()},ce=(y,_,w)=>{_.component=y;const K=y.vnode.props;y.vnode=_,y.next=null,Bf(y,_.props,K,w),Hf(y,_.children,w),Kn(),wl(y),Gn()},se=(y,_,w,K,H,V,ae,te,Q=!1)=>{const G=y&&y.children,me=y?y.shapeFlag:0,oe=_.children,{patchFlag:ke,shapeFlag:Ce}=_;if(ke>0){if(ke&128){ee(G,oe,w,K,H,V,ae,te,Q);return}else if(ke&256){ot(G,oe,w,K,H,V,ae,te,Q);return}}Ce&8?(me&16&&Y(G,H,V),oe!==G&&T(w,oe)):me&16?Ce&16?ee(G,oe,w,K,H,V,ae,te,Q):Y(G,H,V,!0):(me&8&&T(w,""),Ce&16&&Ge(oe,w,K,H,V,ae,te,Q))},ot=(y,_,w,K,H,V,ae,te,Q)=>{y=y||Io,_=_||Io;const G=y.length,me=_.length,oe=Math.min(G,me);let ke;for(ke=0;ke<oe;ke++){const Ce=_[ke]=Q?li(_[ke]):Hn(_[ke]);F(y[ke],Ce,w,null,H,V,ae,te,Q)}G>me?Y(y,H,V,!0,!1,oe):Ge(_,w,K,H,V,ae,te,Q,oe)},ee=(y,_,w,K,H,V,ae,te,Q)=>{let G=0;const me=_.length;let oe=y.length-1,ke=me-1;for(;G<=oe&&G<=ke;){const Ce=y[G],He=_[G]=Q?li(_[G]):Hn(_[G]);if(ro(Ce,He))F(Ce,He,w,null,H,V,ae,te,Q);else break;G++}for(;G<=oe&&G<=ke;){const Ce=y[oe],He=_[ke]=Q?li(_[ke]):Hn(_[ke]);if(ro(Ce,He))F(Ce,He,w,null,H,V,ae,te,Q);else break;oe--,ke--}if(G>oe){if(G<=ke){const Ce=ke+1,He=Ce<me?_[Ce].el:K;for(;G<=ke;)F(null,_[G]=Q?li(_[G]):Hn(_[G]),w,He,H,V,ae,te,Q),G++}}else if(G>ke)for(;G<=oe;)Ne(y[G],H,V,!0),G++;else{const Ce=G,He=G,et=new Map;for(G=He;G<=ke;G++){const de=_[G]=Q?li(_[G]):Hn(_[G]);de.key!=null&&et.set(de.key,G)}let U,O=0;const xe=ke-He+1;let Je=!1,pt=0;const Ve=new Array(xe);for(G=0;G<xe;G++)Ve[G]=0;for(G=Ce;G<=oe;G++){const de=y[G];if(O>=xe){Ne(de,H,V,!0);continue}let Fe;if(de.key!=null)Fe=et.get(de.key);else for(U=He;U<=ke;U++)if(Ve[U-He]===0&&ro(de,_[U])){Fe=U;break}Fe===void 0?Ne(de,H,V,!0):(Ve[Fe-He]=G+1,Fe>=pt?pt=Fe:Je=!0,F(de,_[Fe],w,null,H,V,ae,te,Q),O++)}const Vt=Je?Gf(Ve):Io;for(U=Vt.length-1,G=xe-1;G>=0;G--){const de=He+G,Fe=_[de],Nt=_[de+1],qn=de+1<me?Nt.el||Sc(Nt):K;Ve[G]===0?F(null,Fe,w,qn,H,V,ae,te,Q):Je&&(U<0||G!==Vt[U]?be(Fe,w,qn,2):U--)}}},be=(y,_,w,K,H=null)=>{const{el:V,type:ae,transition:te,children:Q,shapeFlag:G}=y;if(G&6){be(y.component.subTree,_,w,K);return}if(G&128){y.suspense.move(_,w,K);return}if(G&64){ae.move(y,_,w,ut);return}if(ae===ue){l(V,_,w);for(let oe=0;oe<Q.length;oe++)be(Q[oe],_,w,K);l(y.anchor,_,w);return}if(ae===ur){Te(y,_,w);return}if(K!==2&&G&1&&te)if(K===0)te.persisted&&!V[Pn]?l(V,_,w):(te.beforeEnter(V),l(V,_,w),Jt(()=>te.enter(V),H));else{const{leave:oe,delayLeave:ke,afterLeave:Ce}=te,He=()=>{y.ctx.isUnmounted?u(V):l(V,_,w)},et=()=>{const U=V._isLeaving||!!V[Pn];V._isLeaving&&V[Pn](!0),te.persisted&&!U?He():oe(V,()=>{He(),Ce&&Ce()})};ke?ke(V,He,et):et()}else l(V,_,w)},Ne=(y,_,w,K=!1,H=!1)=>{const{type:V,props:ae,ref:te,children:Q,dynamicChildren:G,shapeFlag:me,patchFlag:oe,dirs:ke,cacheIndex:Ce,memo:He}=y;if(oe===-2&&(H=!1),te!=null&&(Kn(),Ps(te,null,w,y,!0),Gn()),Ce!=null&&(_.renderCache[Ce]=void 0),me&256){_.ctx.deactivate(y);return}const et=me&1&&ke,U=!Do(y);let O;if(U&&(O=ae&&ae.onVnodeBeforeUnmount)&&Un(O,_,y),me&6)Ze(y.component,w,K);else{if(me&128){y.suspense.unmount(w,K);return}et&&to(y,null,_,"beforeUnmount"),me&64?y.type.remove(y,_,w,ut,K):G&&!G.hasOnce&&(V!==ue||oe>0&&oe&64)?Y(G,_,w,!1,!0):(V===ue&&oe&384||!H&&me&16)&&Y(Q,_,w),K&&dt(y)}const xe=He!=null&&Ce==null;(U&&(O=ae&&ae.onVnodeUnmounted)||et||xe)&&Jt(()=>{O&&Un(O,_,y),et&&to(y,null,_,"unmounted"),xe&&(y.el=null)},w)},dt=y=>{const{type:_,el:w,anchor:K,transition:H}=y;if(_===ue){at(w,K);return}if(_===ur){fe(y);return}const V=()=>{u(w),H&&!H.persisted&&H.afterLeave&&H.afterLeave()};if(y.shapeFlag&1&&H&&!H.persisted){const{leave:ae,delayLeave:te}=H,Q=()=>ae(w,V);te?te(y.el,V,Q):Q()}else V()},at=(y,_)=>{let w;for(;y!==_;)w=R(y),u(y),y=w;u(_)},Ze=(y,_,w)=>{const{bum:K,scope:H,job:V,subTree:ae,um:te,m:Q,a:G}=y;$l(Q),$l(G),K&&ha(K),H.stop(),V&&(V.flags|=8,Ne(ae,y,_,w)),te&&Jt(te,_),Jt(()=>{y.isUnmounted=!0},_)},Y=(y,_,w,K=!1,H=!1,V=0)=>{for(let ae=V;ae<y.length;ae++)Ne(y[ae],_,w,K,H)},A=y=>{if(y.shapeFlag&6)return A(y.component.subTree);if(y.shapeFlag&128)return y.suspense.next();const _=R(y.anchor||y.el),w=_&&_[Qu];return w?R(w):_};let z=!1;const gt=(y,_,w)=>{let K;y==null?_._vnode&&(Ne(_._vnode,null,null,!0),K=_._vnode.component):F(_._vnode||null,y,_,null,null,null,w),_._vnode=y,z||(z=!0,wl(K),Ku(),z=!1)},ut={p:F,um:Ne,m:be,r:dt,mt:ie,mc:Ge,pc:se,pbc:ye,n:A,o:t};return{render:gt,hydrate:void 0,createApp:Ef(gt)}}function lr({type:t,props:i},s){return s==="svg"&&t==="foreignObject"||s==="mathml"&&t==="annotation-xml"&&i&&i.encoding&&i.encoding.includes("html")?void 0:s}function no({effect:t,job:i},s){s?(t.flags|=32,i.flags|=4):(t.flags&=-33,i.flags&=-5)}function Kf(t,i){return(!t||t&&!t.pendingBranch)&&i&&!i.persisted}function Wr(t,i,s=!1){const l=t.children,u=i.children;if(De(l)&&De(u))for(let d=0;d<l.length;d++){const h=l[d];let v=u[d];v.shapeFlag&1&&!v.dynamicChildren&&((v.patchFlag<=0||v.patchFlag===32)&&(v=u[d]=li(u[d]),v.el=h.el),!s&&v.patchFlag!==-2&&Wr(h,v)),v.type===Da&&(v.patchFlag===-1&&(v=u[d]=li(v)),v.el=h.el),v.type===Wt&&!v.el&&(v.el=h.el)}}function Gf(t){const i=t.slice(),s=[0];let l,u,d,h,v;const b=t.length;for(l=0;l<b;l++){const C=t[l];if(C!==0){if(u=s[s.length-1],t[u]<C){i[l]=u,s.push(l);continue}for(d=0,h=s.length-1;d<h;)v=d+h>>1,t[s[v]]<C?d=v+1:h=v;C<t[s[d]]&&(d>0&&(i[l]=s[d-1]),s[d]=l)}}for(d=s.length,h=s[d-1];d-- >0;)s[d]=h,h=i[h];return s}function kc(t){const i=t.subTree.component;if(i)return i.asyncDep&&!i.asyncResolved?i:kc(i)}function $l(t){if(t)for(let i=0;i<t.length;i++)t[i].flags|=8}function Sc(t){if(t.placeholder)return t.placeholder;const i=t.component;return i?Sc(i.subTree):null}const Tc=t=>t.__isSuspense;function qf(t,i){i&&i.pendingBranch?De(t)?i.effects.push(...t):i.effects.push(t):ef(t)}const ue=Symbol.for("v-fgt"),Da=Symbol.for("v-txt"),Wt=Symbol.for("v-cmt"),ur=Symbol.for("v-stc"),Ls=[];let mn=null;function p(t=!1){Ls.push(mn=t?null:[])}function Yf(){Ls.pop(),mn=Ls[Ls.length-1]||null}let zs=1;function ya(t,i=!1){zs+=t,t<0&&mn&&i&&(mn.hasOnce=!0)}function Pc(t){return t.dynamicChildren=zs>0?mn||Io:null,Yf(),zs>0&&mn&&mn.push(t),t}function g(t,i,s,l,u,d){return Pc(r(t,i,s,l,u,d,!0))}function lt(t,i,s,l,u){return Pc(E(t,i,s,l,u,!0))}function Is(t){return t?t.__v_isVNode===!0:!1}function ro(t,i){return t.type===i.type&&t.key===i.key}const Cc=({key:t})=>t??null,pa=({ref:t,ref_key:i,ref_for:s})=>(typeof t=="number"&&(t=""+t),t!=null?St(t)||Gt(t)||Ye(t)?{i:Kt,r:t,k:i,f:!!s}:t:null);function r(t,i=null,s=null,l=0,u=null,d=t===ue?0:1,h=!1,v=!1){const b={__v_isVNode:!0,__v_skip:!0,type:t,props:i,key:i&&Cc(i),ref:i&&pa(i),scopeId:qu,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:d,patchFlag:l,dynamicProps:u,dynamicChildren:null,appContext:null,ctx:Kt};return v?(xa(b,s),d&128&&t.normalize(b)):s&&(b.shapeFlag|=St(s)?8:16),zs>0&&!h&&mn&&(b.patchFlag>0||d&6)&&b.patchFlag!==32&&mn.push(b),b}const E=Jf;function Jf(t,i=null,s=null,l=0,u=null,d=!1){if((!t||t===wf)&&(t=Wt),Is(t)){const v=Ii(t,i,!0);return s&&xa(v,s),zs>0&&!d&&mn&&(v.shapeFlag&6?mn[mn.indexOf(t)]=v:mn.push(v)),v.patchFlag=-2,v}if(rh(t)&&(t=t.__vccOpts),i){i=Xf(i);let{class:v,style:b}=i;v&&!St(v)&&(i.class=Ee(v)),ht(b)&&(Vr(b)&&!De(b)&&(b=$t({},b)),i.style=Bo(b))}const h=St(t)?1:Tc(t)?128:ec(t)?64:ht(t)?4:Ye(t)?2:0;return r(t,i,s,l,u,h,d,!0)}function Xf(t){return t?Vr(t)||vc(t)?$t({},t):t:null}function Ii(t,i,s=!1,l=!1){const{props:u,ref:d,patchFlag:h,children:v,transition:b}=t,C=i?Qf(u||{},i):u,T={__v_isVNode:!0,__v_skip:!0,type:t.type,props:C,key:C&&Cc(C),ref:i&&i.ref?s&&d?De(d)?d.concat(pa(i)):[d,pa(i)]:pa(i):d,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:v,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:i&&t.type!==ue?h===-1?16:h|16:h,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:b,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&Ii(t.ssContent),ssFallback:t.ssFallback&&Ii(t.ssFallback),placeholder:t.placeholder,el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return b&&l&&Os(T,b.clone(T)),T}function $(t=" ",i=0){return E(Da,null,t,i)}function D(t="",i=!1){return i?(p(),lt(Wt,null,t)):E(Wt,null,t)}function Hn(t){return t==null||typeof t=="boolean"?E(Wt):De(t)?E(ue,null,t.slice()):Is(t)?li(t):E(Da,null,String(t))}function li(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:Ii(t)}function xa(t,i){let s=0;const{shapeFlag:l}=t;if(i==null)i=null;else if(De(i))s=16;else if(typeof i=="object")if(l&65){const u=i.default;u&&(u._c&&(u._d=!1),xa(t,u()),u._c&&(u._d=!0));return}else{s=32;const u=i._;!u&&!vc(i)?i._ctx=Kt:u===3&&Kt&&(Kt.slots._===1?i._=1:(i._=2,t.patchFlag|=1024))}else if(Ye(i)){if(l&65){xa(t,{default:i});return}i={default:i,_ctx:Kt},s=32}else i=String(i),l&64?(s=16,i=[$(i)]):s=8;t.children=i,t.shapeFlag|=s}function Qf(...t){const i={};for(let s=0;s<t.length;s++){const l=t[s];for(const u in l)if(u==="class")i.class!==l.class&&(i.class=Ee([i.class,l.class]));else if(u==="style")i.style=Bo([i.style,l.style]);else if(Ca(u)){const d=i[u],h=l[u];h&&d!==h&&!(De(d)&&d.includes(h))?i[u]=d?[].concat(d,h):h:h==null&&d==null&&!La(u)&&(i[u]=h)}else u!==""&&(i[u]=l[u])}return i}function Un(t,i,s,l=null){Mn(t,i,7,[s,l])}const eh=fc();let th=0;function nh(t,i,s){const l=t.type,u=(i?i.appContext:t.appContext)||eh,d={uid:th++,vnode:t,type:l,parent:i,appContext:u,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Sd(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:i?i.provides:Object.create(u.provides),ids:i?i.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:bc(l,u),emitsOptions:hc(l,u),emit:null,emitted:null,propsDefaults:vt,inheritAttrs:l.inheritAttrs,ctx:vt,data:vt,props:vt,attrs:vt,slots:vt,refs:vt,setupState:vt,setupContext:null,suspense:s,suspenseId:s?s.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return d.ctx={_:d},d.root=i?i.root:d,d.emit=zf.bind(null,d),t.ce&&t.ce(d),d}let Qt=null;const Lc=()=>Qt||Kt;let wa,Cr;{const t=Ea(),i=(s,l)=>{let u;return(u=t[s])||(u=t[s]=[]),u.push(l),d=>{u.length>1?u.forEach(h=>h(d)):u[0](d)}};wa=i("__VUE_INSTANCE_SETTERS__",s=>Qt=s),Cr=i("__VUE_SSR_SETTERS__",s=>$s=s)}const Rs=t=>{const i=Qt;return wa(t),t.scope.on(),()=>{t.scope.off(),wa(i)}},Nl=()=>{Qt&&Qt.scope.off(),wa(null)};function Mc(t){return t.vnode.shapeFlag&4}let $s=!1;function ih(t,i=!1,s=!1){i&&Cr(i);const{props:l,children:u}=t.vnode,d=Mc(t);Rf(t,l,d,i),Zf(t,u,s||i);const h=d?oh(t,i):void 0;return i&&Cr(!1),h}function oh(t,i){const s=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,Sf);const{setup:l}=s;if(l){Kn();const u=t.setupContext=l.length>1?ah(t):null,d=Rs(t),h=Fs(l,t,0,[t.props,u]),v=xu(h);if(Gn(),d(),(v||t.sp)&&!Do(t)&&ac(t),v){if(h.then(Nl,Nl),i)return h.then(b=>{Dl(t,b)}).catch(b=>{za(b,t,0)});t.asyncDep=h}else Dl(t,h)}else Ac(t)}function Dl(t,i,s){Ye(i)?t.type.__ssrInlineRender?t.ssrRender=i:t.render=i:ht(i)&&(t.setupState=Zu(i)),Ac(t)}function Ac(t,i,s){const l=t.type;t.render||(t.render=l.render||Wn);{const u=Rs(t);Kn();try{Tf(t)}finally{Gn(),u()}}}const sh={get(t,i){return jt(t,"get",""),t[i]}};function ah(t){const i=s=>{t.exposed=s||{}};return{attrs:new Proxy(t.attrs,sh),slots:t.slots,emit:t.emit,expose:i}}function Fa(t){return t.exposed?t.exposeProxy||(t.exposeProxy=new Proxy(Zu(Hd(t.exposed)),{get(i,s){if(s in i)return i[s];if(s in Cs)return Cs[s](t)},has(i,s){return s in i||s in Cs}})):t.proxy}function rh(t){return Ye(t)&&"__vccOpts"in t}const we=(t,i)=>qd(t,i,$s);function lh(t,i,s){try{ya(-1);const l=arguments.length;return l===2?ht(i)&&!De(i)?Is(i)?E(t,null,[i]):E(t,i):E(t,null,i):(l>3?s=Array.prototype.slice.call(arguments,2):l===3&&Is(s)&&(s=[s]),E(t,i,s))}finally{ya(1)}}const uh="3.5.39";/**
|
|
* @vue/runtime-dom v3.5.39
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
* @license MIT
|
|
**/let Lr;const Fl=typeof window<"u"&&window.trustedTypes;if(Fl)try{Lr=Fl.createPolicy("vue",{createHTML:t=>t})}catch{}const Ec=Lr?t=>Lr.createHTML(t):t=>t,ch="http://www.w3.org/2000/svg",dh="http://www.w3.org/1998/Math/MathML",ri=typeof document<"u"?document:null,Rl=ri&&ri.createElement("template"),fh={insert:(t,i,s)=>{i.insertBefore(t,s||null)},remove:t=>{const i=t.parentNode;i&&i.removeChild(t)},createElement:(t,i,s,l)=>{const u=i==="svg"?ri.createElementNS(ch,t):i==="mathml"?ri.createElementNS(dh,t):s?ri.createElement(t,{is:s}):ri.createElement(t);return t==="select"&&l&&l.multiple!=null&&u.setAttribute("multiple",l.multiple),u},createText:t=>ri.createTextNode(t),createComment:t=>ri.createComment(t),setText:(t,i)=>{t.nodeValue=i},setElementText:(t,i)=>{t.textContent=i},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>ri.querySelector(t),setScopeId(t,i){t.setAttribute(i,"")},insertStaticContent(t,i,s,l,u,d){const h=s?s.previousSibling:i.lastChild;if(u&&(u===d||u.nextSibling))for(;i.insertBefore(u.cloneNode(!0),s),!(u===d||!(u=u.nextSibling)););else{Rl.innerHTML=Ec(l==="svg"?`<svg>${t}</svg>`:l==="mathml"?`<math>${t}</math>`:t);const v=Rl.content;if(l==="svg"||l==="mathml"){const b=v.firstChild;for(;b.firstChild;)v.appendChild(b.firstChild);v.removeChild(b)}i.insertBefore(v,s)}return[h?h.nextSibling:i.firstChild,s?s.previousSibling:i.lastChild]}},Mi="transition",gs="animation",Ns=Symbol("_vtc"),Oc={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},hh=$t({},tc,Oc),ph=t=>(t.displayName="Transition",t.props=hh,t),mh=ph((t,{slots:i})=>lh(df,gh(t),i)),io=(t,i=[])=>{De(t)?t.forEach(s=>s(...i)):t&&t(...i)},Bl=t=>t?De(t)?t.some(i=>i.length>1):t.length>1:!1;function gh(t){const i={};for(const ne in t)ne in Oc||(i[ne]=t[ne]);if(t.css===!1)return i;const{name:s="v",type:l,duration:u,enterFromClass:d=`${s}-enter-from`,enterActiveClass:h=`${s}-enter-active`,enterToClass:v=`${s}-enter-to`,appearFromClass:b=d,appearActiveClass:C=h,appearToClass:T=v,leaveFromClass:M=`${s}-leave-from`,leaveActiveClass:R=`${s}-leave-active`,leaveToClass:B=`${s}-leave-to`}=t,Z=vh(u),F=Z&&Z[0],he=Z&&Z[1],{onBeforeEnter:pe,onEnter:q,onEnterCancelled:Te,onLeave:fe,onLeaveCancelled:Ue,onBeforeAppear:$e=pe,onAppear:Ie=q,onAppearCancelled:Ge=Te}=i,_e=(ne,je,ie,We)=>{ne._enterCancelled=We,oo(ne,je?T:v),oo(ne,je?C:h),ie&&ie()},ye=(ne,je)=>{ne._isLeaving=!1,oo(ne,M),oo(ne,B),oo(ne,R),je&&je()},ze=ne=>(je,ie)=>{const We=ne?Ie:q,le=()=>_e(je,ne,ie);io(We,[je,le]),Ul(()=>{oo(je,ne?b:d),ai(je,ne?T:v),Bl(We)||Vl(je,l,F,le)})};return $t(i,{onBeforeEnter(ne){io(pe,[ne]),ai(ne,d),ai(ne,h)},onBeforeAppear(ne){io($e,[ne]),ai(ne,b),ai(ne,C)},onEnter:ze(!1),onAppear:ze(!0),onLeave(ne,je){ne._isLeaving=!0;const ie=()=>ye(ne,je);ai(ne,M),ne._enterCancelled?(ai(ne,R),jl(ne)):(jl(ne),ai(ne,R)),Ul(()=>{ne._isLeaving&&(oo(ne,M),ai(ne,B),Bl(fe)||Vl(ne,l,he,ie))}),io(fe,[ne,ie])},onEnterCancelled(ne){_e(ne,!1,void 0,!0),io(Te,[ne])},onAppearCancelled(ne){_e(ne,!0,void 0,!0),io(Ge,[ne])},onLeaveCancelled(ne){ye(ne),io(Ue,[ne])}})}function vh(t){if(t==null)return null;if(ht(t))return[cr(t.enter),cr(t.leave)];{const i=cr(t);return[i,i]}}function cr(t){return gd(t)}function ai(t,i){i.split(/\s+/).forEach(s=>s&&t.classList.add(s)),(t[Ns]||(t[Ns]=new Set)).add(i)}function oo(t,i){i.split(/\s+/).forEach(l=>l&&t.classList.remove(l));const s=t[Ns];s&&(s.delete(i),s.size||(t[Ns]=void 0))}function Ul(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let _h=0;function Vl(t,i,s,l){const u=t._endId=++_h,d=()=>{u===t._endId&&l()};if(s!=null)return setTimeout(d,s);const{type:h,timeout:v,propCount:b}=bh(t,i);if(!h)return l();const C=h+"end";let T=0;const M=()=>{t.removeEventListener(C,R),d()},R=B=>{B.target===t&&++T>=b&&M()};setTimeout(()=>{T<b&&M()},v+1),t.addEventListener(C,R)}function bh(t,i){const s=window.getComputedStyle(t),l=Z=>(s[Z]||"").split(", "),u=l(`${Mi}Delay`),d=l(`${Mi}Duration`),h=Zl(u,d),v=l(`${gs}Delay`),b=l(`${gs}Duration`),C=Zl(v,b);let T=null,M=0,R=0;i===Mi?h>0&&(T=Mi,M=h,R=d.length):i===gs?C>0&&(T=gs,M=C,R=b.length):(M=Math.max(h,C),T=M>0?h>C?Mi:gs:null,R=T?T===Mi?d.length:b.length:0);const B=T===Mi&&/\b(?:transform|all)(?:,|$)/.test(l(`${Mi}Property`).toString());return{type:T,timeout:M,propCount:R,hasTransform:B}}function Zl(t,i){for(;t.length<i.length;)t=t.concat(t);return Math.max(...i.map((s,l)=>Hl(s)+Hl(t[l])))}function Hl(t){return t==="auto"?0:Number(t.slice(0,-1).replace(",","."))*1e3}function jl(t){return(t?t.ownerDocument:document).body.offsetHeight}function yh(t,i,s){const l=t[Ns];l&&(i=(i?[i,...l]:[...l]).join(" ")),i==null?t.removeAttribute("class"):s?t.setAttribute("class",i):t.className=i}const ka=Symbol("_vod"),zc=Symbol("_vsh"),xh={name:"show",beforeMount(t,{value:i},{transition:s}){t[ka]=t.style.display==="none"?"":t.style.display,s&&i?s.beforeEnter(t):vs(t,i)},mounted(t,{value:i},{transition:s}){s&&i&&s.enter(t)},updated(t,{value:i,oldValue:s},{transition:l}){!i!=!s&&(l?i?(l.beforeEnter(t),vs(t,!0),l.enter(t)):l.leave(t,()=>{vs(t,!1)}):vs(t,i))},beforeUnmount(t,{value:i}){vs(t,i)}};function vs(t,i){t.style.display=i?t[ka]:"none",t[zc]=!i}const wh=Symbol(""),kh=/(?:^|;)\s*display\s*:/;function Sh(t,i,s){const l=t.style,u=St(s);let d=!1;if(s&&!u){if(i)if(St(i))for(const h of i.split(";")){const v=h.slice(0,h.indexOf(":")).trim();s[v]==null&&ys(l,v,"")}else for(const h in i)s[h]==null&&ys(l,h,"");for(const h in s){h==="display"&&(d=!0);const v=s[h];v!=null?Ph(t,h,!St(i)&&i?i[h]:void 0,v)||ys(l,h,v):ys(l,h,"")}}else if(u){if(i!==s){const h=l[wh];h&&(s+=";"+h),l.cssText=s,d=kh.test(s)}}else i&&t.removeAttribute("style");ka in t&&(t[ka]=d?l.display:"",t[zc]&&(l.display="none"))}const Wl=/\s*!important$/;function ys(t,i,s){if(De(s))s.forEach(l=>ys(t,i,l));else if(s==null&&(s=""),i.startsWith("--"))t.setProperty(i,s);else{const l=Th(t,i);Wl.test(s)?t.setProperty(Ni(l),s.replace(Wl,""),"important"):t[l]=s}}const Kl=["Webkit","Moz","ms"],dr={};function Th(t,i){const s=dr[i];if(s)return s;let l=In(i);if(l!=="filter"&&l in t)return dr[i]=l;l=Su(l);for(let u=0;u<Kl.length;u++){const d=Kl[u]+l;if(d in t)return dr[i]=d}return i}function Ph(t,i,s,l){return t.tagName==="TEXTAREA"&&(i==="width"||i==="height")&&St(l)&&s===l}const Gl="http://www.w3.org/1999/xlink";function ql(t,i,s,l,u,d=wd(i)){l&&i.startsWith("xlink:")?s==null?t.removeAttributeNS(Gl,i.slice(6,i.length)):t.setAttributeNS(Gl,i,s):s==null||d&&!Pu(s)?t.removeAttribute(i):t.setAttribute(i,d?"":Nn(s)?String(s):s)}function Yl(t,i,s,l,u){if(i==="innerHTML"||i==="textContent"){s!=null&&(t[i]=i==="innerHTML"?Ec(s):s);return}const d=t.tagName;if(i==="value"&&d!=="PROGRESS"&&!d.includes("-")){const v=d==="OPTION"?t.getAttribute("value")||"":t.value,b=s==null?t.type==="checkbox"?"on":"":String(s);(v!==b||!("_value"in t))&&(t.value=b),s==null&&t.removeAttribute(i),t._value=s;return}let h=!1;if(s===""||s==null){const v=typeof t[i];v==="boolean"?s=Pu(s):s==null&&v==="string"?(s="",h=!0):v==="number"&&(s=0,h=!0)}try{t[i]=s}catch{}h&&t.removeAttribute(u||i)}function di(t,i,s,l){t.addEventListener(i,s,l)}function Ch(t,i,s,l){t.removeEventListener(i,s,l)}const Jl=Symbol("_vei");function Lh(t,i,s,l,u=null){const d=t[Jl]||(t[Jl]={}),h=d[i];if(l&&h)h.value=l;else{const[v,b]=Eh(i);if(l){const C=d[i]=Ih(l,u);di(t,v,C,b)}else h&&(Ch(t,v,h,b),d[i]=void 0)}}const Mh=/(Once|Passive|Capture)$/,Ah=/^on:?(?:Once|Passive|Capture)$/;function Eh(t){let i,s;for(;(s=t.match(Mh))&&!Ah.test(t);)i||(i={}),t=t.slice(0,t.length-s[1].length),i[s[1].toLowerCase()]=!0;return[t[2]===":"?t.slice(3):Ni(t.slice(2)),i]}let fr=0;const Oh=Promise.resolve(),zh=()=>fr||(Oh.then(()=>fr=0),fr=Date.now());function Ih(t,i){const s=l=>{if(!l._vts)l._vts=Date.now();else if(l._vts<=s.attached)return;const u=s.value;if(De(u)){const d=l.stopImmediatePropagation;l.stopImmediatePropagation=()=>{d.call(l),l._stopped=!0};const h=u.slice(),v=[l];for(let b=0;b<h.length&&!l._stopped;b++){const C=h[b];C&&Mn(C,i,5,v)}}else Mn(u,i,5,[l])};return s.value=t,s.attached=zh(),s}const Xl=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,$h=(t,i,s,l,u,d)=>{const h=u==="svg";i==="class"?yh(t,l,h):i==="style"?Sh(t,s,l):Ca(i)?La(i)||Lh(t,i,s,l,d):(i[0]==="."?(i=i.slice(1),!0):i[0]==="^"?(i=i.slice(1),!1):Nh(t,i,l,h))?(Yl(t,i,l),!t.tagName.includes("-")&&(i==="value"||i==="checked"||i==="selected")&&ql(t,i,l,h,d,i!=="value")):t._isVueCE&&(Dh(t,i)||t._def.__asyncLoader&&(/[A-Z]/.test(i)||!St(l)))?Yl(t,In(i),l,d,i):(i==="true-value"?t._trueValue=l:i==="false-value"&&(t._falseValue=l),ql(t,i,l,h))};function Nh(t,i,s,l){if(l)return!!(i==="innerHTML"||i==="textContent"||i in t&&Xl(i)&&Ye(s));if(i==="spellcheck"||i==="draggable"||i==="translate"||i==="autocorrect"||i==="sandbox"&&t.tagName==="IFRAME"||i==="form"||i==="list"&&t.tagName==="INPUT"||i==="type"&&t.tagName==="TEXTAREA")return!1;if(i==="width"||i==="height"){const u=t.tagName;if(u==="IMG"||u==="VIDEO"||u==="CANVAS"||u==="SOURCE")return!1}return Xl(i)&&St(s)?!1:i in t}function Dh(t,i){const s=t._def.props;if(!s)return!1;const l=In(i);return Array.isArray(s)?s.some(u=>In(u)===l):Object.keys(s).some(u=>In(u)===l)}const $i=t=>{const i=t.props["onUpdate:modelValue"]||!1;return De(i)?s=>ha(i,s):i};function Fh(t){t.target.composing=!0}function Ql(t){const i=t.target;i.composing&&(i.composing=!1,i.dispatchEvent(new Event("input")))}const Ln=Symbol("_assign");function eu(t,i,s){return i&&(t=t.trim()),s&&(t=Aa(t)),t}const Se={created(t,{modifiers:{lazy:i,trim:s,number:l}},u){t[Ln]=$i(u);const d=l||u.props&&u.props.type==="number";di(t,i?"change":"input",h=>{h.target.composing||t[Ln](eu(t.value,s,d))}),(s||d)&&di(t,"change",()=>{t.value=eu(t.value,s,d)}),i||(di(t,"compositionstart",Fh),di(t,"compositionend",Ql),di(t,"change",Ql))},mounted(t,{value:i}){t.value=i??""},beforeUpdate(t,{value:i,oldValue:s,modifiers:{lazy:l,trim:u,number:d}},h){if(t[Ln]=$i(h),t.composing)return;const v=(d||t.type==="number")&&!/^0\d/.test(t.value)?Aa(t.value):t.value,b=i??"";if(v===b)return;const C=t.getRootNode();(C instanceof Document||C instanceof ShadowRoot)&&C.activeElement===t&&t.type!=="range"&&(l&&i===s||u&&t.value.trim()===b)||(t.value=b)}},Sa={deep:!0,created(t,i,s){t[Ln]=$i(s),di(t,"change",()=>{const l=t._modelValue,u=Vo(t),d=t.checked,h=t[Ln];if(De(l)){const v=$r(l,u),b=v!==-1;if(d&&!b)h(l.concat(u));else if(!d&&b){const C=[...l];C.splice(v,1),h(C)}}else if(Zo(l)){const v=new Set(l);d?v.add(u):v.delete(u),h(v)}else h(Ic(t,d))})},mounted:tu,beforeUpdate(t,i,s){t[Ln]=$i(s),tu(t,i,s)}};function tu(t,{value:i,oldValue:s},l){t._modelValue=i;let u;if(De(i))u=$r(i,l.props.value)>-1;else if(Zo(i))u=i.has(l.props.value);else{if(i===s)return;u=zi(i,Ic(t,!0))}t.checked!==u&&(t.checked=u)}const Rh={created(t,{value:i},s){t.checked=zi(i,s.props.value),t[Ln]=$i(s),di(t,"change",()=>{t[Ln](Vo(t))})},beforeUpdate(t,{value:i,oldValue:s},l){t[Ln]=$i(l),i!==s&&(t.checked=zi(i,l.props.value))}},Mt={deep:!0,created(t,{value:i,modifiers:{number:s}},l){const u=Zo(i);di(t,"change",()=>{const d=Array.prototype.filter.call(t.options,h=>h.selected).map(h=>s?Aa(Vo(h)):Vo(h));t[Ln](t.multiple?u?new Set(d):d:d[0]),t._assigning=!0,ju(()=>{t._assigning=!1})}),t[Ln]=$i(l)},mounted(t,{value:i}){nu(t,i)},beforeUpdate(t,i,s){t[Ln]=$i(s)},updated(t,{value:i}){t._assigning||nu(t,i)}};function nu(t,i){const s=t.multiple,l=De(i);if(!(s&&!l&&!Zo(i))){for(let u=0,d=t.options.length;u<d;u++){const h=t.options[u],v=Vo(h);if(s)if(l){const b=typeof v;b==="string"||b==="number"?h.selected=i.some(C=>String(C)===String(v)):h.selected=$r(i,v)>-1}else h.selected=i.has(v);else if(zi(Vo(h),i)){t.selectedIndex!==u&&(t.selectedIndex=u);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}}function Vo(t){return"_value"in t?t._value:t.value}function Ic(t,i){const s=i?"_trueValue":"_falseValue";return s in t?t[s]:i}const Bh={created(t,i,s){da(t,i,s,null,"created")},mounted(t,i,s){da(t,i,s,null,"mounted")},beforeUpdate(t,i,s,l){da(t,i,s,l,"beforeUpdate")},updated(t,i,s,l){da(t,i,s,l,"updated")}};function Uh(t,i){switch(t){case"SELECT":return Mt;case"TEXTAREA":return Se;default:switch(i){case"checkbox":return Sa;case"radio":return Rh;default:return Se}}}function da(t,i,s,l,u){const h=Uh(t.tagName,s.props&&s.props.type)[u];h&&h(t,i,s,l)}const Vh=["ctrl","shift","alt","meta"],Zh={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&t.button!==0,middle:t=>"button"in t&&t.button!==1,right:t=>"button"in t&&t.button!==2,exact:(t,i)=>Vh.some(s=>t[`${s}Key`]&&!i.includes(s))},Kr=(t,i)=>{if(!t)return t;const s=t._withMods||(t._withMods={}),l=i.join(".");return s[l]||(s[l]=((u,...d)=>{for(let h=0;h<i.length;h++){const v=Zh[i[h]];if(v&&v(u,i))return}return t(u,...d)}))},Hh={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},iu=(t,i)=>{const s=t._withKeys||(t._withKeys={}),l=i.join(".");return s[l]||(s[l]=(u=>{if(!("key"in u))return;const d=Ni(u.key);if(i.some(h=>h===d||Hh[h]===d))return t(u)}))},jh=$t({patchProp:$h},fh);let ou;function Wh(){return ou||(ou=jf(jh))}const Kh=((...t)=>{const i=Wh().createApp(...t),{mount:s}=i;return i.mount=l=>{const u=qh(l);if(!u)return;const d=i._component;!Ye(d)&&!d.render&&!d.template&&(d.template=u.innerHTML),u.nodeType===1&&(u.textContent="");const h=s(u,!1,Gh(u));return u instanceof Element&&(u.removeAttribute("v-cloak"),u.setAttribute("data-v-app","")),h},i});function Gh(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function qh(t){return St(t)?document.querySelector(t):t}const $c="pv_theme",su={light:"#EEF0F3",dark:"#0B1730"},Ta=typeof window<"u"&&window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)"):null;function Nc(){return Ta&&Ta.matches?"dark":"light"}function Yh(){try{return localStorage.getItem($c)||"light"}catch{return"light"}}function Dc(t){return t==="system"?Nc():t}function Fc(t){const i=document.documentElement;i.setAttribute("data-theme",t),i.style.backgroundColor=su[t]||su.light}const co=W(Yh()),Ro=W(Dc(co.value));function Pa(t){co.value=t;const i=Dc(t);Ro.value=i,Fc(i);try{localStorage.setItem($c,t)}catch{}}function au(){Pa(Ro.value==="dark"?"light":"dark")}Ta&&Ta.addEventListener("change",()=>{if(co.value==="system"){const t=Nc();Ro.value=t,Fc(t)}});async function Jh(){try{const t=await fetch("/bff/config");return t.ok?await t.json():{apiBase:""}}catch{return{apiBase:""}}}async function ru(){try{const t=await fetch("/bff/me");return t.ok?await t.json():null}catch{return null}}async function Xh(t,i,s){const l=await fetch("/bff/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:t,password:i,apiBase:s})});return{ok:l.ok,status:l.status,body:await l.json().catch(()=>({}))}}async function Qh(){try{await fetch("/bff/logout",{method:"POST"})}catch{}}async function ep(){try{const t=await fetch("/bff/devices");return t.ok?await t.json():[]}catch{return[]}}async function tp(){try{const t=await fetch("/bff/users");return t.ok?{ok:!0,status:200,users:(await t.json()).users||[]}:{ok:!1,status:t.status,users:[]}}catch{return{ok:!1,status:0,users:[]}}}async function np(t,i,s,l){const u=await fetch("/bff/users",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:t,password:i,role:s,organization:l})});return{ok:u.ok,status:u.status,body:await u.json().catch(()=>({}))}}async function ip(t,i){const s=await fetch(`/bff/users/${encodeURIComponent(t)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});return{ok:s.ok,status:s.status,body:await s.json().catch(()=>({}))}}async function op(t){const i=await fetch(`/bff/users/${encodeURIComponent(t)}`,{method:"DELETE"});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function sp(){try{const t=await fetch("/bff/orgs");return t.ok?{ok:!0,status:200,organizations:(await t.json()).organizations||[]}:{ok:!1,status:t.status,organizations:[]}}catch{return{ok:!1,status:0,organizations:[]}}}async function ap(t){const i=await fetch("/bff/orgs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t})});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function rp(t,i){const s=await fetch(`/bff/orgs/${encodeURIComponent(t)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:i})});return{ok:s.ok,status:s.status,body:await s.json().catch(()=>({}))}}async function lp(t){const i=await fetch(`/bff/orgs/${encodeURIComponent(t)}`,{method:"DELETE"});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function up(){try{const t=await fetch("/bff/preferences");if(!t.ok)return null;const i=await t.json();return i&&typeof i.preferences=="object"?i.preferences:null}catch{return null}}async function cp(t){try{return(await fetch("/bff/preferences",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({preferences:t})})).ok}catch{return!1}}async function dp(){try{const t=await fetch("/bff/integrations/opensky");return t.ok?{ok:!0,status:200,body:await t.json()}:{ok:!1,status:t.status,body:await t.json().catch(()=>({}))}}catch{return{ok:!1,status:0,body:{}}}}async function lu(t){const i=await fetch("/bff/integrations/opensky",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function fp(){const t=await fetch("/bff/integrations/opensky/health",{method:"POST"});return{ok:t.ok,status:t.status,body:await t.json().catch(()=>({}))}}async function hp(t){try{const i=t?`?bbox=${encodeURIComponent(t)}`:"",s=await fetch(`/bff/integrations/opensky/states${i}`);if(!s.ok)return{states:[],unavailable:!0,detail:"OpenSky unavailable"};const l=await s.json();return{states:l.states||[],time:l.time,unavailable:!!l.unavailable,detail:l.detail||"",plan:l.plan||"",recommendedInterval:l.recommendedInterval||0}}catch{return{states:[],unavailable:!0,detail:"OpenSky unavailable"}}}async function pp(){try{const t=await fetch("/bff/integrations/filetransfer");return t.ok?{ok:!0,status:200,body:await t.json()}:{ok:!1,status:t.status,body:await t.json().catch(()=>({}))}}catch{return{ok:!1,status:0,body:{}}}}async function uu(t){const i=await fetch("/bff/integrations/filetransfer",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function mp(){const t=await fetch("/bff/integrations/filetransfer/health",{method:"POST"});return{ok:t.ok,status:t.status,body:await t.json().catch(()=>({}))}}async function gp(){try{const t=await fetch("/bff/integrations/localstorage");return t.ok?{ok:!0,status:200,body:await t.json()}:{ok:!1,status:t.status,body:await t.json().catch(()=>({}))}}catch{return{ok:!1,status:0,body:{}}}}async function fa(t){const i=await fetch("/bff/integrations/localstorage",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function vp(){const t=await fetch("/bff/integrations/localstorage/health",{method:"POST"});return{ok:t.ok,status:t.status,body:await t.json().catch(()=>({}))}}async function _p(){try{const t=await fetch("/bff/integrations/webdav");return t.ok?{ok:!0,status:200,body:await t.json()}:{ok:!1,status:t.status,body:await t.json().catch(()=>({}))}}catch{return{ok:!1,status:0,body:{}}}}async function cu(t){const i=await fetch("/bff/integrations/webdav",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function bp(){const t=await fetch("/bff/integrations/webdav/health",{method:"POST"});return{ok:t.ok,status:t.status,body:await t.json().catch(()=>({}))}}async function Rc(){try{const t=await fetch("/bff/drones");return t.ok?{ok:!0,status:200,drones:(await t.json()).drones||[]}:{ok:!1,status:t.status,drones:[]}}catch{return{ok:!1,status:0,drones:[]}}}async function yp(t){const i=await fetch("/bff/drones",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function xp(t,i){const s=await fetch(`/bff/drones/${encodeURIComponent(t)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});return{ok:s.ok,status:s.status,body:await s.json().catch(()=>({}))}}async function wp(t){const i=await fetch(`/bff/drones/${encodeURIComponent(t)}`,{method:"DELETE"});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function kp(){try{const t=await fetch("/bff/flights");return t.ok?{ok:!0,status:200,flights:(await t.json()).flights||[]}:{ok:!1,status:t.status,flights:[]}}catch{return{ok:!1,status:0,flights:[]}}}async function Sp(t){const i=await fetch("/bff/flights",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function Tp(t,i){const s=await fetch(`/bff/flights/${encodeURIComponent(t)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});return{ok:s.ok,status:s.status,body:await s.json().catch(()=>({}))}}async function Pp(t){const i=await fetch(`/bff/flights/${encodeURIComponent(t)}`,{method:"DELETE"});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}function Cp(){return"/bff/logbook/export"}async function Lp(t){try{const i=t!=null&&t!==""?`?expiring=${encodeURIComponent(t)}`:"",s=await fetch(`/bff/documents${i}`);return s.ok?{ok:!0,status:200,documents:(await s.json()).documents||[]}:{ok:!1,status:s.status,documents:[]}}catch{return{ok:!1,status:0,documents:[]}}}async function Mp(t,i){const s=new FormData;Object.entries(t).forEach(([u,d])=>{d!=null&&d!==""&&s.append(u,d)}),i&&s.append("file",i);const l=await fetch("/bff/documents",{method:"POST",body:s});return{ok:l.ok,status:l.status,body:await l.json().catch(()=>({}))}}async function Ap(t,i){const s=await fetch(`/bff/documents/${encodeURIComponent(t)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});return{ok:s.ok,status:s.status,body:await s.json().catch(()=>({}))}}async function Ep(t){const i=await fetch(`/bff/documents/${encodeURIComponent(t)}`,{method:"DELETE"});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}function hr(t){return`/bff/documents/${encodeURIComponent(t)}/file`}function Op(t){return`/bff/documents/${encodeURIComponent(t)}/file?inline=1`}async function zp(t,i,s){const l=await fetch(`/bff/devices/${encodeURIComponent(t)}/command`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:i,payload:s})});return{ok:l.ok,body:await l.json().catch(()=>({}))}}const Bc="pv_prefs",Mr={name:"",username:"",displayName:"",bio:"",avatar:"",showEmail:!1,fontSize:"md",language:"en",region:"US",dateFormat:"MDY",timeFormat:"24",reduceMotion:!1,showAirTraffic:!0,autoBbox:!0,airTrafficInterval:"auto",twoFactor:!1};function Ip(){try{return{...Mr,...JSON.parse(localStorage.getItem(Bc)||"{}")||{}}}catch{return{...Mr}}}const ve=kt(Ip());function Uc(){try{localStorage.setItem(Bc,JSON.stringify(ve))}catch{}}function Vc(t){if(!t||typeof t!="object")return!1;for(const i of Object.keys(Mr))i in t&&(ve[i]=t[i]);return!0}const $p={sm:15,md:16,lg:18};function Gr(t){document.documentElement.style.fontSize=($p[t]||16)+"px"}function qr(t){document.documentElement.classList.toggle("reduce-motion",!!t)}function Zc(t){const i=new Date(t),s=i.getFullYear(),l=String(i.getMonth()+1).padStart(2,"0"),u=String(i.getDate()).padStart(2,"0");let d;switch(ve.dateFormat){case"DMY":d=`${u}/${l}/${s}`;break;case"YMD":d=`${s}/${l}/${u}`;break;case"ISO":d=`${s}-${l}-${u}`;break;default:d=`${l}/${u}/${s}`}let h;return ve.timeFormat==="12"?h=i.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",second:"2-digit",hour12:!0}):h=`${String(i.getHours()).padStart(2,"0")}:${String(i.getMinutes()).padStart(2,"0")}:${String(i.getSeconds()).padStart(2,"0")}`,{date:d,time:h}}function du(t){return Zc(t).time}function fu(t){const i=Zc(t);return`${i.date} ${i.time}`}let Yr=!1,Ar=!1,Er=null;function Np(){return{...JSON.parse(JSON.stringify(ve)),themeMode:co.value}}function Jr(){!Yr||Ar||(clearTimeout(Er),Er=setTimeout(()=>{cp(Np())},600))}function Dp(t){Ar=!0;try{Vc(t),t.themeMode&&Pa(t.themeMode),Gr(ve.fontSize),qr(ve.reduceMotion),Uc()}finally{Ar=!1}}async function hu(){Yr=!0;const t=await up();t&&Object.keys(t).length?Dp(t):Jr()}function Fp(){Yr=!1,clearTimeout(Er)}It(ve,()=>{Uc(),Jr()},{deep:!0});It(co,Jr);It(()=>ve.fontSize,Gr,{immediate:!0});It(()=>ve.reduceMotion,qr,{immediate:!0});const Rp=["width","height"],Hc={__name:"BrandMark",props:{size:{type:[Number,String],default:28}},setup(t){return(i,s)=>(p(),g("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none","aria-hidden":"true"},[...s[0]||(s[0]=[r("g",{"stroke-width":"4","stroke-linecap":"round","stroke-linejoin":"round"},[r("polyline",{points:"8,30 19,17 30,30",stroke:"var(--accent)"}),r("polyline",{points:"18,33 29,20 40,33",stroke:"currentColor"})],-1)])],8,Rp))}},Bp=["title","aria-label"],Up={key:0,width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},Vp={key:1,width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},Zp={__name:"ThemeToggle",setup(t){return(i,s)=>(p(),g("button",{class:"btn-icon",type:"button",title:Oe(Ro)==="dark"?"Switch to light":"Switch to dark","aria-label":Oe(Ro)==="dark"?"Switch to light theme":"Switch to dark theme",onClick:s[0]||(s[0]=(...l)=>Oe(au)&&Oe(au)(...l))},[Oe(Ro)==="dark"?(p(),g("svg",Up,[...s[1]||(s[1]=[r("circle",{cx:"12",cy:"12",r:"4"},null,-1),r("path",{d:"M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41"},null,-1)])])):(p(),g("svg",Vp,[...s[2]||(s[2]=[r("path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9z"},null,-1)])]))],8,Bp))}},Hp={class:"relative grid h-full place-items-center p-5"},jp={class:"absolute right-5 top-5"},Wp={class:"mb-6 flex items-center gap-3 text-ink"},Kp={class:"relative mb-1"},Gp=["type"],qp=["aria-label","title"],Yp={key:0,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"h-[18px] w-[18px]"},Jp={key:1,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"h-[18px] w-[18px]"},Xp={key:0,class:"mt-4"},Qp={key:1,class:"mt-4 rounded border border-line bg-danger-soft px-3 py-2 text-sm text-danger-fg"},em=["disabled"],tm={__name:"LoginView",props:{defaultApiBase:{type:String,default:""}},emits:["signed-in"],setup(t,{emit:i}){const s=t,l=i,u=W(""),d=W(""),h=W(localStorage.getItem("api_url")||s.defaultApiBase||"http://localhost:8080"),v=W(!1),b=W(!1),C=W(!1),T=W("");async function M(){C.value=!0,T.value="",localStorage.setItem("api_url",h.value.trim());const{ok:R,status:B,body:Z}=await Xh(u.value.trim(),d.value,h.value.trim());if(C.value=!1,R){l("signed-in",Z.email);return}T.value=B===400?"Invalid email or password.":B===502?"API server can't reach PocketBase.":Z.message||Z.error||"Cannot reach the API server."}return(R,B)=>(p(),g("div",Hp,[r("div",jp,[E(Zp)]),r("form",{class:"panel w-[380px] p-8 shadow-md",onSubmit:Kr(M,["prevent"])},[r("div",Wp,[E(Hc,{size:34}),B[5]||(B[5]=r("div",{class:"leading-tight"},[r("div",{class:"text-mode"},"PilotVault"),r("div",{class:"eyebrow mt-0.5"},"Control panel")],-1))]),B[9]||(B[9]=r("label",{class:"eyebrow mb-1.5 block"},"Email",-1)),re(r("input",{"onUpdate:modelValue":B[0]||(B[0]=Z=>u.value=Z),type:"email",autocomplete:"username",required:"",class:"field mb-4",placeholder:"you@example.com"},null,512),[[Se,u.value]]),B[10]||(B[10]=r("label",{class:"eyebrow mb-1.5 block"},"Password",-1)),r("div",Kp,[re(r("input",{"onUpdate:modelValue":B[1]||(B[1]=Z=>d.value=Z),type:b.value?"text":"password",autocomplete:"current-password",required:"",class:"field w-full pr-10",placeholder:"••••••••"},null,8,Gp),[[Bh,d.value]]),r("button",{type:"button",class:"absolute inset-y-0 right-0 grid w-10 place-items-center text-ink-muted transition hover:text-ink-secondary","aria-label":b.value?"Hide password":"Show password",title:b.value?"Hide password":"Show password",onClick:B[2]||(B[2]=Z=>b.value=!b.value)},[b.value?(p(),g("svg",Yp,[...B[6]||(B[6]=[r("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"},null,-1),r("line",{x1:"1",y1:"1",x2:"23",y2:"23"},null,-1)])])):(p(),g("svg",Jp,[...B[7]||(B[7]=[r("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"},null,-1),r("circle",{cx:"12",cy:"12",r:"3"},null,-1)])]))],8,qp)]),v.value?(p(),g("div",Xp,[B[8]||(B[8]=r("label",{class:"eyebrow mb-1.5 block"},"API Server",-1)),re(r("input",{"onUpdate:modelValue":B[3]||(B[3]=Z=>h.value=Z),type:"text",class:"field font-mono",placeholder:"10.2.1.101:8080"},null,512),[[Se,h.value]])])):D("",!0),T.value?(p(),g("p",Qp,k(T.value),1)):D("",!0),r("button",{type:"submit",class:"btn-accent mt-6 w-full",disabled:C.value},k(C.value?"Signing in…":"Sign in"),9,em),r("button",{type:"button",class:"mx-auto mt-3 block text-xs text-ink-muted transition hover:text-ink-secondary",onClick:B[4]||(B[4]=Z=>v.value=!v.value)},k(v.value?"Hide server settings":"Server settings"),1)],32)]))}};function nm(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var xs={exports:{}};/* @preserve
|
|
* Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
|
|
* (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
|
|
*/var im=xs.exports,pu;function om(){return pu||(pu=1,(function(t,i){(function(s,l){l(i)})(im,(function(s){var l="1.9.4";function u(e){var n,o,a,c;for(o=1,a=arguments.length;o<a;o++){c=arguments[o];for(n in c)e[n]=c[n]}return e}var d=Object.create||(function(){function e(){}return function(n){return e.prototype=n,new e}})();function h(e,n){var o=Array.prototype.slice;if(e.bind)return e.bind.apply(e,o.call(arguments,1));var a=o.call(arguments,2);return function(){return e.apply(n,a.length?a.concat(o.call(arguments)):arguments)}}var v=0;function b(e){return"_leaflet_id"in e||(e._leaflet_id=++v),e._leaflet_id}function C(e,n,o){var a,c,m,P;return P=function(){a=!1,c&&(m.apply(o,c),c=!1)},m=function(){a?c=arguments:(e.apply(o,arguments),setTimeout(P,n),a=!0)},m}function T(e,n,o){var a=n[1],c=n[0],m=a-c;return e===a&&o?e:((e-c)%m+m)%m+c}function M(){return!1}function R(e,n){if(n===!1)return e;var o=Math.pow(10,n===void 0?6:n);return Math.round(e*o)/o}function B(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function Z(e){return B(e).split(/\s+/)}function F(e,n){Object.prototype.hasOwnProperty.call(e,"options")||(e.options=e.options?d(e.options):{});for(var o in n)e.options[o]=n[o];return e.options}function he(e,n,o){var a=[];for(var c in e)a.push(encodeURIComponent(o?c.toUpperCase():c)+"="+encodeURIComponent(e[c]));return(!n||n.indexOf("?")===-1?"?":"&")+a.join("&")}var pe=/\{ *([\w_ -]+) *\}/g;function q(e,n){return e.replace(pe,function(o,a){var c=n[a];if(c===void 0)throw new Error("No value provided for variable "+o);return typeof c=="function"&&(c=c(n)),c})}var Te=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"};function fe(e,n){for(var o=0;o<e.length;o++)if(e[o]===n)return o;return-1}var Ue="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function $e(e){return window["webkit"+e]||window["moz"+e]||window["ms"+e]}var Ie=0;function Ge(e){var n=+new Date,o=Math.max(0,16-(n-Ie));return Ie=n+o,window.setTimeout(e,o)}var _e=window.requestAnimationFrame||$e("RequestAnimationFrame")||Ge,ye=window.cancelAnimationFrame||$e("CancelAnimationFrame")||$e("CancelRequestAnimationFrame")||function(e){window.clearTimeout(e)};function ze(e,n,o){if(o&&_e===Ge)e.call(n);else return _e.call(window,h(e,n))}function ne(e){e&&ye.call(window,e)}var je={__proto__:null,extend:u,create:d,bind:h,get lastId(){return v},stamp:b,throttle:C,wrapNum:T,falseFn:M,formatNum:R,trim:B,splitWords:Z,setOptions:F,getParamString:he,template:q,isArray:Te,indexOf:fe,emptyImageUrl:Ue,requestFn:_e,cancelFn:ye,requestAnimFrame:ze,cancelAnimFrame:ne};function ie(){}ie.extend=function(e){var n=function(){F(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},o=n.__super__=this.prototype,a=d(o);a.constructor=n,n.prototype=a;for(var c in this)Object.prototype.hasOwnProperty.call(this,c)&&c!=="prototype"&&c!=="__super__"&&(n[c]=this[c]);return e.statics&&u(n,e.statics),e.includes&&(We(e.includes),u.apply(null,[a].concat(e.includes))),u(a,e),delete a.statics,delete a.includes,a.options&&(a.options=o.options?d(o.options):{},u(a.options,e.options)),a._initHooks=[],a.callInitHooks=function(){if(!this._initHooksCalled){o.callInitHooks&&o.callInitHooks.call(this),this._initHooksCalled=!0;for(var m=0,P=a._initHooks.length;m<P;m++)a._initHooks[m].call(this)}},n},ie.include=function(e){var n=this.prototype.options;return u(this.prototype,e),e.options&&(this.prototype.options=n,this.mergeOptions(e.options)),this},ie.mergeOptions=function(e){return u(this.prototype.options,e),this},ie.addInitHook=function(e){var n=Array.prototype.slice.call(arguments,1),o=typeof e=="function"?e:function(){this[e].apply(this,n)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(o),this};function We(e){if(!(typeof L>"u"||!L||!L.Mixin)){e=Te(e)?e:[e];for(var n=0;n<e.length;n++)e[n]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",new Error().stack)}}var le={on:function(e,n,o){if(typeof e=="object")for(var a in e)this._on(a,e[a],n);else{e=Z(e);for(var c=0,m=e.length;c<m;c++)this._on(e[c],n,o)}return this},off:function(e,n,o){if(!arguments.length)delete this._events;else if(typeof e=="object")for(var a in e)this._off(a,e[a],n);else{e=Z(e);for(var c=arguments.length===1,m=0,P=e.length;m<P;m++)c?this._off(e[m]):this._off(e[m],n,o)}return this},_on:function(e,n,o,a){if(typeof n!="function"){console.warn("wrong listener type: "+typeof n);return}if(this._listens(e,n,o)===!1){o===this&&(o=void 0);var c={fn:n,ctx:o};a&&(c.once=!0),this._events=this._events||{},this._events[e]=this._events[e]||[],this._events[e].push(c)}},_off:function(e,n,o){var a,c,m;if(this._events&&(a=this._events[e],!!a)){if(arguments.length===1){if(this._firingCount)for(c=0,m=a.length;c<m;c++)a[c].fn=M;delete this._events[e];return}if(typeof n!="function"){console.warn("wrong listener type: "+typeof n);return}var P=this._listens(e,n,o);if(P!==!1){var I=a[P];this._firingCount&&(I.fn=M,this._events[e]=a=a.slice()),a.splice(P,1)}}},fire:function(e,n,o){if(!this.listens(e,o))return this;var a=u({},n,{type:e,target:this,sourceTarget:n&&n.sourceTarget||this});if(this._events){var c=this._events[e];if(c){this._firingCount=this._firingCount+1||1;for(var m=0,P=c.length;m<P;m++){var I=c[m],N=I.fn;I.once&&this.off(e,N,I.ctx),N.call(I.ctx||this,a)}this._firingCount--}}return o&&this._propagateEvent(a),this},listens:function(e,n,o,a){typeof e!="string"&&console.warn('"string" type argument expected');var c=n;typeof n!="function"&&(a=!!n,c=void 0,o=void 0);var m=this._events&&this._events[e];if(m&&m.length&&this._listens(e,c,o)!==!1)return!0;if(a){for(var P in this._eventParents)if(this._eventParents[P].listens(e,n,o,a))return!0}return!1},_listens:function(e,n,o){if(!this._events)return!1;var a=this._events[e]||[];if(!n)return!!a.length;o===this&&(o=void 0);for(var c=0,m=a.length;c<m;c++)if(a[c].fn===n&&a[c].ctx===o)return c;return!1},once:function(e,n,o){if(typeof e=="object")for(var a in e)this._on(a,e[a],n,!0);else{e=Z(e);for(var c=0,m=e.length;c<m;c++)this._on(e[c],n,o,!0)}return this},addEventParent:function(e){return this._eventParents=this._eventParents||{},this._eventParents[b(e)]=e,this},removeEventParent:function(e){return this._eventParents&&delete this._eventParents[b(e)],this},_propagateEvent:function(e){for(var n in this._eventParents)this._eventParents[n].fire(e.type,u({layer:e.target,propagatedFrom:e.target},e),!0)}};le.addEventListener=le.on,le.removeEventListener=le.clearAllEventListeners=le.off,le.addOneTimeEventListener=le.once,le.fireEvent=le.fire,le.hasEventListeners=le.listens;var ce=ie.extend(le);function se(e,n,o){this.x=o?Math.round(e):e,this.y=o?Math.round(n):n}var ot=Math.trunc||function(e){return e>0?Math.floor(e):Math.ceil(e)};se.prototype={clone:function(){return new se(this.x,this.y)},add:function(e){return this.clone()._add(ee(e))},_add:function(e){return this.x+=e.x,this.y+=e.y,this},subtract:function(e){return this.clone()._subtract(ee(e))},_subtract:function(e){return this.x-=e.x,this.y-=e.y,this},divideBy:function(e){return this.clone()._divideBy(e)},_divideBy:function(e){return this.x/=e,this.y/=e,this},multiplyBy:function(e){return this.clone()._multiplyBy(e)},_multiplyBy:function(e){return this.x*=e,this.y*=e,this},scaleBy:function(e){return new se(this.x*e.x,this.y*e.y)},unscaleBy:function(e){return new se(this.x/e.x,this.y/e.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=ot(this.x),this.y=ot(this.y),this},distanceTo:function(e){e=ee(e);var n=e.x-this.x,o=e.y-this.y;return Math.sqrt(n*n+o*o)},equals:function(e){return e=ee(e),e.x===this.x&&e.y===this.y},contains:function(e){return e=ee(e),Math.abs(e.x)<=Math.abs(this.x)&&Math.abs(e.y)<=Math.abs(this.y)},toString:function(){return"Point("+R(this.x)+", "+R(this.y)+")"}};function ee(e,n,o){return e instanceof se?e:Te(e)?new se(e[0],e[1]):e==null?e:typeof e=="object"&&"x"in e&&"y"in e?new se(e.x,e.y):new se(e,n,o)}function be(e,n){if(e)for(var o=n?[e,n]:e,a=0,c=o.length;a<c;a++)this.extend(o[a])}be.prototype={extend:function(e){var n,o;if(!e)return this;if(e instanceof se||typeof e[0]=="number"||"x"in e)n=o=ee(e);else if(e=Ne(e),n=e.min,o=e.max,!n||!o)return this;return!this.min&&!this.max?(this.min=n.clone(),this.max=o.clone()):(this.min.x=Math.min(n.x,this.min.x),this.max.x=Math.max(o.x,this.max.x),this.min.y=Math.min(n.y,this.min.y),this.max.y=Math.max(o.y,this.max.y)),this},getCenter:function(e){return ee((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,e)},getBottomLeft:function(){return ee(this.min.x,this.max.y)},getTopRight:function(){return ee(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(e){var n,o;return typeof e[0]=="number"||e instanceof se?e=ee(e):e=Ne(e),e instanceof be?(n=e.min,o=e.max):n=o=e,n.x>=this.min.x&&o.x<=this.max.x&&n.y>=this.min.y&&o.y<=this.max.y},intersects:function(e){e=Ne(e);var n=this.min,o=this.max,a=e.min,c=e.max,m=c.x>=n.x&&a.x<=o.x,P=c.y>=n.y&&a.y<=o.y;return m&&P},overlaps:function(e){e=Ne(e);var n=this.min,o=this.max,a=e.min,c=e.max,m=c.x>n.x&&a.x<o.x,P=c.y>n.y&&a.y<o.y;return m&&P},isValid:function(){return!!(this.min&&this.max)},pad:function(e){var n=this.min,o=this.max,a=Math.abs(n.x-o.x)*e,c=Math.abs(n.y-o.y)*e;return Ne(ee(n.x-a,n.y-c),ee(o.x+a,o.y+c))},equals:function(e){return e?(e=Ne(e),this.min.equals(e.getTopLeft())&&this.max.equals(e.getBottomRight())):!1}};function Ne(e,n){return!e||e instanceof be?e:new be(e,n)}function dt(e,n){if(e)for(var o=n?[e,n]:e,a=0,c=o.length;a<c;a++)this.extend(o[a])}dt.prototype={extend:function(e){var n=this._southWest,o=this._northEast,a,c;if(e instanceof Ze)a=e,c=e;else if(e instanceof dt){if(a=e._southWest,c=e._northEast,!a||!c)return this}else return e?this.extend(Y(e)||at(e)):this;return!n&&!o?(this._southWest=new Ze(a.lat,a.lng),this._northEast=new Ze(c.lat,c.lng)):(n.lat=Math.min(a.lat,n.lat),n.lng=Math.min(a.lng,n.lng),o.lat=Math.max(c.lat,o.lat),o.lng=Math.max(c.lng,o.lng)),this},pad:function(e){var n=this._southWest,o=this._northEast,a=Math.abs(n.lat-o.lat)*e,c=Math.abs(n.lng-o.lng)*e;return new dt(new Ze(n.lat-a,n.lng-c),new Ze(o.lat+a,o.lng+c))},getCenter:function(){return new Ze((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new Ze(this.getNorth(),this.getWest())},getSouthEast:function(){return new Ze(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(e){typeof e[0]=="number"||e instanceof Ze||"lat"in e?e=Y(e):e=at(e);var n=this._southWest,o=this._northEast,a,c;return e instanceof dt?(a=e.getSouthWest(),c=e.getNorthEast()):a=c=e,a.lat>=n.lat&&c.lat<=o.lat&&a.lng>=n.lng&&c.lng<=o.lng},intersects:function(e){e=at(e);var n=this._southWest,o=this._northEast,a=e.getSouthWest(),c=e.getNorthEast(),m=c.lat>=n.lat&&a.lat<=o.lat,P=c.lng>=n.lng&&a.lng<=o.lng;return m&&P},overlaps:function(e){e=at(e);var n=this._southWest,o=this._northEast,a=e.getSouthWest(),c=e.getNorthEast(),m=c.lat>n.lat&&a.lat<o.lat,P=c.lng>n.lng&&a.lng<o.lng;return m&&P},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(e,n){return e?(e=at(e),this._southWest.equals(e.getSouthWest(),n)&&this._northEast.equals(e.getNorthEast(),n)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function at(e,n){return e instanceof dt?e:new dt(e,n)}function Ze(e,n,o){if(isNaN(e)||isNaN(n))throw new Error("Invalid LatLng object: ("+e+", "+n+")");this.lat=+e,this.lng=+n,o!==void 0&&(this.alt=+o)}Ze.prototype={equals:function(e,n){if(!e)return!1;e=Y(e);var o=Math.max(Math.abs(this.lat-e.lat),Math.abs(this.lng-e.lng));return o<=(n===void 0?1e-9:n)},toString:function(e){return"LatLng("+R(this.lat,e)+", "+R(this.lng,e)+")"},distanceTo:function(e){return z.distance(this,Y(e))},wrap:function(){return z.wrapLatLng(this)},toBounds:function(e){var n=180*e/40075017,o=n/Math.cos(Math.PI/180*this.lat);return at([this.lat-n,this.lng-o],[this.lat+n,this.lng+o])},clone:function(){return new Ze(this.lat,this.lng,this.alt)}};function Y(e,n,o){return e instanceof Ze?e:Te(e)&&typeof e[0]!="object"?e.length===3?new Ze(e[0],e[1],e[2]):e.length===2?new Ze(e[0],e[1]):null:e==null?e:typeof e=="object"&&"lat"in e?new Ze(e.lat,"lng"in e?e.lng:e.lon,e.alt):n===void 0?null:new Ze(e,n,o)}var A={latLngToPoint:function(e,n){var o=this.projection.project(e),a=this.scale(n);return this.transformation._transform(o,a)},pointToLatLng:function(e,n){var o=this.scale(n),a=this.transformation.untransform(e,o);return this.projection.unproject(a)},project:function(e){return this.projection.project(e)},unproject:function(e){return this.projection.unproject(e)},scale:function(e){return 256*Math.pow(2,e)},zoom:function(e){return Math.log(e/256)/Math.LN2},getProjectedBounds:function(e){if(this.infinite)return null;var n=this.projection.bounds,o=this.scale(e),a=this.transformation.transform(n.min,o),c=this.transformation.transform(n.max,o);return new be(a,c)},infinite:!1,wrapLatLng:function(e){var n=this.wrapLng?T(e.lng,this.wrapLng,!0):e.lng,o=this.wrapLat?T(e.lat,this.wrapLat,!0):e.lat,a=e.alt;return new Ze(o,n,a)},wrapLatLngBounds:function(e){var n=e.getCenter(),o=this.wrapLatLng(n),a=n.lat-o.lat,c=n.lng-o.lng;if(a===0&&c===0)return e;var m=e.getSouthWest(),P=e.getNorthEast(),I=new Ze(m.lat-a,m.lng-c),N=new Ze(P.lat-a,P.lng-c);return new dt(I,N)}},z=u({},A,{wrapLng:[-180,180],R:6371e3,distance:function(e,n){var o=Math.PI/180,a=e.lat*o,c=n.lat*o,m=Math.sin((n.lat-e.lat)*o/2),P=Math.sin((n.lng-e.lng)*o/2),I=m*m+Math.cos(a)*Math.cos(c)*P*P,N=2*Math.atan2(Math.sqrt(I),Math.sqrt(1-I));return this.R*N}}),gt=6378137,ut={R:gt,MAX_LATITUDE:85.0511287798,project:function(e){var n=Math.PI/180,o=this.MAX_LATITUDE,a=Math.max(Math.min(o,e.lat),-o),c=Math.sin(a*n);return new se(this.R*e.lng*n,this.R*Math.log((1+c)/(1-c))/2)},unproject:function(e){var n=180/Math.PI;return new Ze((2*Math.atan(Math.exp(e.y/this.R))-Math.PI/2)*n,e.x*n/this.R)},bounds:(function(){var e=gt*Math.PI;return new be([-e,-e],[e,e])})()};function wt(e,n,o,a){if(Te(e)){this._a=e[0],this._b=e[1],this._c=e[2],this._d=e[3];return}this._a=e,this._b=n,this._c=o,this._d=a}wt.prototype={transform:function(e,n){return this._transform(e.clone(),n)},_transform:function(e,n){return n=n||1,e.x=n*(this._a*e.x+this._b),e.y=n*(this._c*e.y+this._d),e},untransform:function(e,n){return n=n||1,new se((e.x/n-this._b)/this._a,(e.y/n-this._d)/this._c)}};function y(e,n,o,a){return new wt(e,n,o,a)}var _=u({},z,{code:"EPSG:3857",projection:ut,transformation:(function(){var e=.5/(Math.PI*ut.R);return y(e,.5,-e,.5)})()}),w=u({},_,{code:"EPSG:900913"});function K(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function H(e,n){var o="",a,c,m,P,I,N;for(a=0,m=e.length;a<m;a++){for(I=e[a],c=0,P=I.length;c<P;c++)N=I[c],o+=(c?"L":"M")+N.x+" "+N.y;o+=n?Le.svg?"z":"x":""}return o||"M0 0"}var V=document.documentElement.style,ae="ActiveXObject"in window,te=ae&&!document.addEventListener,Q="msLaunchUri"in navigator&&!("documentMode"in document),G=tn("webkit"),me=tn("android"),oe=tn("android 2")||tn("android 3"),ke=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),Ce=me&&tn("Google")&&ke<537&&!("AudioNode"in window),He=!!window.opera,et=!Q&&tn("chrome"),U=tn("gecko")&&!G&&!He&&!ae,O=!et&&tn("safari"),xe=tn("phantom"),Je="OTransition"in V,pt=navigator.platform.indexOf("Win")===0,Ve=ae&&"transition"in V,Vt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!oe,de="MozPerspective"in V,Fe=!window.L_DISABLE_3D&&(Ve||Vt||de)&&!Je&&!xe,Nt=typeof orientation<"u"||tn("mobile"),qn=Nt&&G,fo=Nt&&Vt,gn=!window.PointerEvent&&window.MSPointerEvent,Yn=!!(window.PointerEvent||gn),jo="ontouchstart"in window||!!window.TouchEvent,Ba=!window.L_NO_TOUCH&&(jo||Yn),Wo=Nt&&He,Ko=Nt&&U,Ua=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,vn=(function(){var e=!1;try{var n=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("testPassiveEventSupport",M,n),window.removeEventListener("testPassiveEventSupport",M,n)}catch{}return e})(),ho=(function(){return!!document.createElement("canvas").getContext})(),Ot=!!(document.createElementNS&&K("svg").createSVGRect),en=!!Ot&&(function(){var e=document.createElement("div");return e.innerHTML="<svg/>",(e.firstChild&&e.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"})(),Pt=!Ot&&(function(){try{var e=document.createElement("div");e.innerHTML='<v:shape adj="1"/>';var n=e.firstChild;return n.style.behavior="url(#default#VML)",n&&typeof n.adj=="object"}catch{return!1}})(),Va=navigator.platform.indexOf("Mac")===0,Bs=navigator.platform.indexOf("Linux")===0;function tn(e){return navigator.userAgent.toLowerCase().indexOf(e)>=0}var Le={ie:ae,ielt9:te,edge:Q,webkit:G,android:me,android23:oe,androidStock:Ce,opera:He,chrome:et,gecko:U,safari:O,phantom:xe,opera12:Je,win:pt,ie3d:Ve,webkit3d:Vt,gecko3d:de,any3d:Fe,mobile:Nt,mobileWebkit:qn,mobileWebkit3d:fo,msPointer:gn,pointer:Yn,touch:Ba,touchNative:jo,mobileOpera:Wo,mobileGecko:Ko,retina:Ua,passiveEvents:vn,canvas:ho,svg:Ot,vml:Pt,inlineSvg:en,mac:Va,linux:Bs},Us=Le.msPointer?"MSPointerDown":"pointerdown",Vs=Le.msPointer?"MSPointerMove":"pointermove",Zs=Le.msPointer?"MSPointerUp":"pointerup",Go=Le.msPointer?"MSPointerCancel":"pointercancel",qo={touchstart:Us,touchmove:Vs,touchend:Zs,touchcancel:Go},Hs={touchstart:vi,touchmove:nn,touchend:nn,touchcancel:nn},mi={},rt=!1;function gi(e,n,o){return n==="touchstart"&&po(),Hs[n]?(o=Hs[n].bind(this,o),e.addEventListener(qo[n],o,!1),o):(console.warn("wrong event specified:",n),M)}function Yo(e,n,o){if(!qo[n]){console.warn("wrong event specified:",n);return}e.removeEventListener(qo[n],o,!1)}function Zt(e){mi[e.pointerId]=e}function Di(e){mi[e.pointerId]&&(mi[e.pointerId]=e)}function Fi(e){delete mi[e.pointerId]}function po(){rt||(document.addEventListener(Us,Zt,!0),document.addEventListener(Vs,Di,!0),document.addEventListener(Zs,Fi,!0),document.addEventListener(Go,Fi,!0),rt=!0)}function nn(e,n){if(n.pointerType!==(n.MSPOINTER_TYPE_MOUSE||"mouse")){n.touches=[];for(var o in mi)n.touches.push(mi[o]);n.changedTouches=[n],e(n)}}function vi(e,n){n.MSPOINTER_TYPE_TOUCH&&n.pointerType===n.MSPOINTER_TYPE_TOUCH&&Et(n),nn(e,n)}function Za(e){var n={},o,a;for(a in e)o=e[a],n[a]=o&&o.bind?o.bind(e):o;return e=n,n.type="dblclick",n.detail=2,n.isTrusted=!1,n._simulated=!0,n}var Jo=200;function Xo(e,n){e.addEventListener("dblclick",n);var o=0,a;function c(m){if(m.detail!==1){a=m.detail;return}if(!(m.pointerType==="mouse"||m.sourceCapabilities&&!m.sourceCapabilities.firesTouchEvents)){var P=wo(m);if(!(P.some(function(N){return N instanceof HTMLLabelElement&&N.attributes.for})&&!P.some(function(N){return N instanceof HTMLInputElement||N instanceof HTMLSelectElement}))){var I=Date.now();I-o<=Jo?(a++,a===2&&n(Za(m))):a=1,o=I}}}return e.addEventListener("click",c),{dblclick:n,simDblclick:c}}function Ha(e,n){e.removeEventListener("dblclick",n.dblclick),e.removeEventListener("click",n.simDblclick)}var on=Fn(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),sn=Fn(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Jn=sn==="webkitTransition"||sn==="OTransition"?sn+"End":"transitionend";function cn(e){return typeof e=="string"?document.getElementById(e):e}function _i(e,n){var o=e.style[n]||e.currentStyle&&e.currentStyle[n];if((!o||o==="auto")&&document.defaultView){var a=document.defaultView.getComputedStyle(e,null);o=a?a[n]:null}return o==="auto"?null:o}function tt(e,n,o){var a=document.createElement(e);return a.className=n||"",o&&o.appendChild(a),a}function yt(e){var n=e.parentNode;n&&n.removeChild(e)}function mo(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function bi(e){var n=e.parentNode;n&&n.lastChild!==e&&n.appendChild(e)}function yi(e){var n=e.parentNode;n&&n.firstChild!==e&&n.insertBefore(e,n.firstChild)}function go(e,n){if(e.classList!==void 0)return e.classList.contains(n);var o=Me(e);return o.length>0&&new RegExp("(^|\\s)"+n+"(\\s|$)").test(o)}function qe(e,n){if(e.classList!==void 0)for(var o=Z(n),a=0,c=o.length;a<c;a++)e.classList.add(o[a]);else if(!go(e,n)){var m=Me(e);Qo(e,(m?m+" ":"")+n)}}function Tt(e,n){e.classList!==void 0?e.classList.remove(n):Qo(e,B((" "+Me(e)+" ").replace(" "+n+" "," ")))}function Qo(e,n){e.className.baseVal===void 0?e.className=n:e.className.baseVal=n}function Me(e){return e.correspondingElement&&(e=e.correspondingElement),e.className.baseVal===void 0?e.className:e.className.baseVal}function At(e,n){"opacity"in e.style?e.style.opacity=n:"filter"in e.style&&vo(e,n)}function vo(e,n){var o=!1,a="DXImageTransform.Microsoft.Alpha";try{o=e.filters.item(a)}catch{if(n===1)return}n=Math.round(n*100),o?(o.Enabled=n!==100,o.Opacity=n):e.style.filter+=" progid:"+a+"(opacity="+n+")"}function Fn(e){for(var n=document.documentElement.style,o=0;o<e.length;o++)if(e[o]in n)return e[o];return!1}function _n(e,n,o){var a=n||new se(0,0);e.style[on]=(Le.ie3d?"translate("+a.x+"px,"+a.y+"px)":"translate3d("+a.x+"px,"+a.y+"px,0)")+(o?" scale("+o+")":"")}function xt(e,n){e._leaflet_pos=n,Le.any3d?_n(e,n):(e.style.left=n.x+"px",e.style.top=n.y+"px")}function Dt(e){return e._leaflet_pos||new se(0,0)}var bn,An,_o;if("onselectstart"in document)bn=function(){Ke(window,"selectstart",Et)},An=function(){mt(window,"selectstart",Et)};else{var Xn=Fn(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);bn=function(){if(Xn){var e=document.documentElement.style;_o=e[Xn],e[Xn]="none"}},An=function(){Xn&&(document.documentElement.style[Xn]=_o,_o=void 0)}}function Ri(){Ke(window,"dragstart",Et)}function es(){mt(window,"dragstart",Et)}var Ft,xi;function bo(e){for(;e.tabIndex===-1;)e=e.parentNode;e.style&&(Bi(),Ft=e,xi=e.style.outlineStyle,e.style.outlineStyle="none",Ke(window,"keydown",Bi))}function Bi(){Ft&&(Ft.style.outlineStyle=xi,Ft=void 0,xi=void 0,mt(window,"keydown",Bi))}function js(e){do e=e.parentNode;while((!e.offsetWidth||!e.offsetHeight)&&e!==document.body);return e}function yo(e){var n=e.getBoundingClientRect();return{x:n.width/e.offsetWidth||1,y:n.height/e.offsetHeight||1,boundingClientRect:n}}var Ui={__proto__:null,TRANSFORM:on,TRANSITION:sn,TRANSITION_END:Jn,get:cn,getStyle:_i,create:tt,remove:yt,empty:mo,toFront:bi,toBack:yi,hasClass:go,addClass:qe,removeClass:Tt,setClass:Qo,getClass:Me,setOpacity:At,testProp:Fn,setTransform:_n,setPosition:xt,getPosition:Dt,get disableTextSelection(){return bn},get enableTextSelection(){return An},disableImageDrag:Ri,enableImageDrag:es,preventOutline:bo,restoreOutline:Bi,getSizedParentNode:js,getScale:yo};function Ke(e,n,o,a){if(n&&typeof n=="object")for(var c in n)ts(e,c,n[c],o);else{n=Z(n);for(var m=0,P=n.length;m<P;m++)ts(e,n[m],o,a)}return this}var yn="_leaflet_events";function mt(e,n,o,a){if(arguments.length===1)Ws(e),delete e[yn];else if(n&&typeof n=="object")for(var c in n)ns(e,c,n[c],o);else if(n=Z(n),arguments.length===2)Ws(e,function(I){return fe(n,I)!==-1});else for(var m=0,P=n.length;m<P;m++)ns(e,n[m],o,a);return this}function Ws(e,n){for(var o in e[yn]){var a=o.split(/\d/)[0];(!n||n(a))&&ns(e,a,null,null,o)}}var xo={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function ts(e,n,o,a){var c=n+b(o)+(a?"_"+b(a):"");if(e[yn]&&e[yn][c])return this;var m=function(I){return o.call(a||e,I||window.event)},P=m;!Le.touchNative&&Le.pointer&&n.indexOf("touch")===0?m=gi(e,n,m):Le.touch&&n==="dblclick"?m=Xo(e,m):"addEventListener"in e?n==="touchstart"||n==="touchmove"||n==="wheel"||n==="mousewheel"?e.addEventListener(xo[n]||n,m,Le.passiveEvents?{passive:!1}:!1):n==="mouseenter"||n==="mouseleave"?(m=function(I){I=I||window.event,Rt(e,I)&&P(I)},e.addEventListener(xo[n],m,!1)):e.addEventListener(n,P,!1):e.attachEvent("on"+n,m),e[yn]=e[yn]||{},e[yn][c]=m}function ns(e,n,o,a,c){c=c||n+b(o)+(a?"_"+b(a):"");var m=e[yn]&&e[yn][c];if(!m)return this;!Le.touchNative&&Le.pointer&&n.indexOf("touch")===0?Yo(e,n,m):Le.touch&&n==="dblclick"?Ha(e,m):"removeEventListener"in e?e.removeEventListener(xo[n]||n,m,!1):e.detachEvent("on"+n,m),e[yn][c]=null}function Qn(e){return e.stopPropagation?e.stopPropagation():e.originalEvent?e.originalEvent._stopped=!0:e.cancelBubble=!0,this}function is(e){return ts(e,"wheel",Qn),this}function wi(e){return Ke(e,"mousedown touchstart dblclick contextmenu",Qn),e._leaflet_disable_click=!0,this}function Et(e){return e.preventDefault?e.preventDefault():e.returnValue=!1,this}function En(e){return Et(e),Qn(e),this}function wo(e){if(e.composedPath)return e.composedPath();for(var n=[],o=e.target;o;)n.push(o),o=o.parentNode;return n}function Vi(e,n){if(!n)return new se(e.clientX,e.clientY);var o=yo(n),a=o.boundingClientRect;return new se((e.clientX-a.left)/o.x-n.clientLeft,(e.clientY-a.top)/o.y-n.clientTop)}var os=Le.linux&&Le.chrome?window.devicePixelRatio:Le.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function it(e){return Le.edge?e.wheelDeltaY/2:e.deltaY&&e.deltaMode===0?-e.deltaY/os:e.deltaY&&e.deltaMode===1?-e.deltaY*20:e.deltaY&&e.deltaMode===2?-e.deltaY*60:e.deltaX||e.deltaZ?0:e.wheelDelta?(e.wheelDeltaY||e.wheelDelta)/2:e.detail&&Math.abs(e.detail)<32765?-e.detail*20:e.detail?e.detail/-32765*60:0}function Rt(e,n){var o=n.relatedTarget;if(!o)return!0;try{for(;o&&o!==e;)o=o.parentNode}catch{return!1}return o!==e}var ki={__proto__:null,on:Ke,off:mt,stopPropagation:Qn,disableScrollPropagation:is,disableClickPropagation:wi,preventDefault:Et,stop:En,getPropagationPath:wo,getMousePosition:Vi,getWheelDelta:it,isExternalTarget:Rt,addListener:Ke,removeListener:mt},ss=ce.extend({run:function(e,n,o,a){this.stop(),this._el=e,this._inProgress=!0,this._duration=o||.25,this._easeOutPower=1/Math.max(a||.5,.2),this._startPos=Dt(e),this._offset=n.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=ze(this._animate,this),this._step()},_step:function(e){var n=+new Date-this._startTime,o=this._duration*1e3;n<o?this._runFrame(this._easeOut(n/o),e):(this._runFrame(1),this._complete())},_runFrame:function(e,n){var o=this._startPos.add(this._offset.multiplyBy(e));n&&o._round(),xt(this._el,o),this.fire("step")},_complete:function(){ne(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(e){return 1-Math.pow(1-e,this._easeOutPower)}}),nt=ce.extend({options:{crs:_,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(e,n){n=F(this,n),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(e),this._initLayout(),this._onResize=h(this._onResize,this),this._initEvents(),n.maxBounds&&this.setMaxBounds(n.maxBounds),n.zoom!==void 0&&(this._zoom=this._limitZoom(n.zoom)),n.center&&n.zoom!==void 0&&this.setView(Y(n.center),n.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=sn&&Le.any3d&&!Le.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Ke(this._proxy,Jn,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(e,n,o){if(n=n===void 0?this._zoom:this._limitZoom(n),e=this._limitCenter(Y(e),n,this.options.maxBounds),o=o||{},this._stop(),this._loaded&&!o.reset&&o!==!0){o.animate!==void 0&&(o.zoom=u({animate:o.animate},o.zoom),o.pan=u({animate:o.animate,duration:o.duration},o.pan));var a=this._zoom!==n?this._tryAnimatedZoom&&this._tryAnimatedZoom(e,n,o.zoom):this._tryAnimatedPan(e,o.pan);if(a)return clearTimeout(this._sizeTimer),this}return this._resetView(e,n,o.pan&&o.pan.noMoveStart),this},setZoom:function(e,n){return this._loaded?this.setView(this.getCenter(),e,{zoom:n}):(this._zoom=e,this)},zoomIn:function(e,n){return e=e||(Le.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+e,n)},zoomOut:function(e,n){return e=e||(Le.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-e,n)},setZoomAround:function(e,n,o){var a=this.getZoomScale(n),c=this.getSize().divideBy(2),m=e instanceof se?e:this.latLngToContainerPoint(e),P=m.subtract(c).multiplyBy(1-1/a),I=this.containerPointToLatLng(c.add(P));return this.setView(I,n,{zoom:o})},_getBoundsCenterZoom:function(e,n){n=n||{},e=e.getBounds?e.getBounds():at(e);var o=ee(n.paddingTopLeft||n.padding||[0,0]),a=ee(n.paddingBottomRight||n.padding||[0,0]),c=this.getBoundsZoom(e,!1,o.add(a));if(c=typeof n.maxZoom=="number"?Math.min(n.maxZoom,c):c,c===1/0)return{center:e.getCenter(),zoom:c};var m=a.subtract(o).divideBy(2),P=this.project(e.getSouthWest(),c),I=this.project(e.getNorthEast(),c),N=this.unproject(P.add(I).divideBy(2).add(m),c);return{center:N,zoom:c}},fitBounds:function(e,n){if(e=at(e),!e.isValid())throw new Error("Bounds are not valid.");var o=this._getBoundsCenterZoom(e,n);return this.setView(o.center,o.zoom,n)},fitWorld:function(e){return this.fitBounds([[-90,-180],[90,180]],e)},panTo:function(e,n){return this.setView(e,this._zoom,{pan:n})},panBy:function(e,n){if(e=ee(e).round(),n=n||{},!e.x&&!e.y)return this.fire("moveend");if(n.animate!==!0&&!this.getSize().contains(e))return this._resetView(this.unproject(this.project(this.getCenter()).add(e)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new ss,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),n.noMoveStart||this.fire("movestart"),n.animate!==!1){qe(this._mapPane,"leaflet-pan-anim");var o=this._getMapPanePos().subtract(e).round();this._panAnim.run(this._mapPane,o,n.duration||.25,n.easeLinearity)}else this._rawPanBy(e),this.fire("move").fire("moveend");return this},flyTo:function(e,n,o){if(o=o||{},o.animate===!1||!Le.any3d)return this.setView(e,n,o);this._stop();var a=this.project(this.getCenter()),c=this.project(e),m=this.getSize(),P=this._zoom;e=Y(e),n=n===void 0?P:n;var I=Math.max(m.x,m.y),N=I*this.getZoomScale(P,n),J=c.distanceTo(a)||1,ge=1.42,Re=ge*ge;function Qe(Lt){var aa=Lt?-1:1,ld=Lt?N:I,ud=N*N-I*I+aa*Re*Re*J*J,cd=2*ld*Re*J,er=ud/cd,vl=Math.sqrt(er*er+1)-er,dd=vl<1e-9?-18:Math.log(vl);return dd}function qt(Lt){return(Math.exp(Lt)-Math.exp(-Lt))/2}function zt(Lt){return(Math.exp(Lt)+Math.exp(-Lt))/2}function kn(Lt){return qt(Lt)/zt(Lt)}var ln=Qe(0);function Eo(Lt){return I*(zt(ln)/zt(ln+ge*Lt))}function od(Lt){return I*(zt(ln)*kn(ln+ge*Lt)-qt(ln))/Re}function sd(Lt){return 1-Math.pow(1-Lt,1.5)}var ad=Date.now(),ml=(Qe(1)-ln)/ge,rd=o.duration?1e3*o.duration:1e3*ml*.8;function gl(){var Lt=(Date.now()-ad)/rd,aa=sd(Lt)*ml;Lt<=1?(this._flyToFrame=ze(gl,this),this._move(this.unproject(a.add(c.subtract(a).multiplyBy(od(aa)/J)),P),this.getScaleZoom(I/Eo(aa),P),{flyTo:!0})):this._move(e,n)._moveEnd(!0)}return this._moveStart(!0,o.noMoveStart),gl.call(this),this},flyToBounds:function(e,n){var o=this._getBoundsCenterZoom(e,n);return this.flyTo(o.center,o.zoom,n)},setMaxBounds:function(e){return e=at(e),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),e.isValid()?(this.options.maxBounds=e,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(e){var n=this.options.minZoom;return this.options.minZoom=e,this._loaded&&n!==e&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(e):this},setMaxZoom:function(e){var n=this.options.maxZoom;return this.options.maxZoom=e,this._loaded&&n!==e&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(e):this},panInsideBounds:function(e,n){this._enforcingBounds=!0;var o=this.getCenter(),a=this._limitCenter(o,this._zoom,at(e));return o.equals(a)||this.panTo(a,n),this._enforcingBounds=!1,this},panInside:function(e,n){n=n||{};var o=ee(n.paddingTopLeft||n.padding||[0,0]),a=ee(n.paddingBottomRight||n.padding||[0,0]),c=this.project(this.getCenter()),m=this.project(e),P=this.getPixelBounds(),I=Ne([P.min.add(o),P.max.subtract(a)]),N=I.getSize();if(!I.contains(m)){this._enforcingBounds=!0;var J=m.subtract(I.getCenter()),ge=I.extend(m).getSize().subtract(N);c.x+=J.x<0?-ge.x:ge.x,c.y+=J.y<0?-ge.y:ge.y,this.panTo(this.unproject(c),n),this._enforcingBounds=!1}return this},invalidateSize:function(e){if(!this._loaded)return this;e=u({animate:!1,pan:!0},e===!0?{animate:!0}:e);var n=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var o=this.getSize(),a=n.divideBy(2).round(),c=o.divideBy(2).round(),m=a.subtract(c);return!m.x&&!m.y?this:(e.animate&&e.pan?this.panBy(m):(e.pan&&this._rawPanBy(m),this.fire("move"),e.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(h(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:n,newSize:o}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(e){if(e=this._locateOptions=u({timeout:1e4,watch:!1},e),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var n=h(this._handleGeolocationResponse,this),o=h(this._handleGeolocationError,this);return e.watch?this._locationWatchId=navigator.geolocation.watchPosition(n,o,e):navigator.geolocation.getCurrentPosition(n,o,e),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(e){if(this._container._leaflet_id){var n=e.code,o=e.message||(n===1?"permission denied":n===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:n,message:"Geolocation error: "+o+"."})}},_handleGeolocationResponse:function(e){if(this._container._leaflet_id){var n=e.coords.latitude,o=e.coords.longitude,a=new Ze(n,o),c=a.toBounds(e.coords.accuracy*2),m=this._locateOptions;if(m.setView){var P=this.getBoundsZoom(c);this.setView(a,m.maxZoom?Math.min(P,m.maxZoom):P)}var I={latlng:a,bounds:c,timestamp:e.timestamp};for(var N in e.coords)typeof e.coords[N]=="number"&&(I[N]=e.coords[N]);this.fire("locationfound",I)}},addHandler:function(e,n){if(!n)return this;var o=this[e]=new n(this);return this._handlers.push(o),this.options[e]&&o.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),yt(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(ne(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var e;for(e in this._layers)this._layers[e].remove();for(e in this._panes)yt(this._panes[e]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(e,n){var o="leaflet-pane"+(e?" leaflet-"+e.replace("Pane","")+"-pane":""),a=tt("div",o,n||this._mapPane);return e&&(this._panes[e]=a),a},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var e=this.getPixelBounds(),n=this.unproject(e.getBottomLeft()),o=this.unproject(e.getTopRight());return new dt(n,o)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(e,n,o){e=at(e),o=ee(o||[0,0]);var a=this.getZoom()||0,c=this.getMinZoom(),m=this.getMaxZoom(),P=e.getNorthWest(),I=e.getSouthEast(),N=this.getSize().subtract(o),J=Ne(this.project(I,a),this.project(P,a)).getSize(),ge=Le.any3d?this.options.zoomSnap:1,Re=N.x/J.x,Qe=N.y/J.y,qt=n?Math.max(Re,Qe):Math.min(Re,Qe);return a=this.getScaleZoom(qt,a),ge&&(a=Math.round(a/(ge/100))*(ge/100),a=n?Math.ceil(a/ge)*ge:Math.floor(a/ge)*ge),Math.max(c,Math.min(m,a))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new se(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(e,n){var o=this._getTopLeftPoint(e,n);return new be(o,o.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(e){return this.options.crs.getProjectedBounds(e===void 0?this.getZoom():e)},getPane:function(e){return typeof e=="string"?this._panes[e]:e},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(e,n){var o=this.options.crs;return n=n===void 0?this._zoom:n,o.scale(e)/o.scale(n)},getScaleZoom:function(e,n){var o=this.options.crs;n=n===void 0?this._zoom:n;var a=o.zoom(e*o.scale(n));return isNaN(a)?1/0:a},project:function(e,n){return n=n===void 0?this._zoom:n,this.options.crs.latLngToPoint(Y(e),n)},unproject:function(e,n){return n=n===void 0?this._zoom:n,this.options.crs.pointToLatLng(ee(e),n)},layerPointToLatLng:function(e){var n=ee(e).add(this.getPixelOrigin());return this.unproject(n)},latLngToLayerPoint:function(e){var n=this.project(Y(e))._round();return n._subtract(this.getPixelOrigin())},wrapLatLng:function(e){return this.options.crs.wrapLatLng(Y(e))},wrapLatLngBounds:function(e){return this.options.crs.wrapLatLngBounds(at(e))},distance:function(e,n){return this.options.crs.distance(Y(e),Y(n))},containerPointToLayerPoint:function(e){return ee(e).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(e){return ee(e).add(this._getMapPanePos())},containerPointToLatLng:function(e){var n=this.containerPointToLayerPoint(ee(e));return this.layerPointToLatLng(n)},latLngToContainerPoint:function(e){return this.layerPointToContainerPoint(this.latLngToLayerPoint(Y(e)))},mouseEventToContainerPoint:function(e){return Vi(e,this._container)},mouseEventToLayerPoint:function(e){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(e))},mouseEventToLatLng:function(e){return this.layerPointToLatLng(this.mouseEventToLayerPoint(e))},_initContainer:function(e){var n=this._container=cn(e);if(n){if(n._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Ke(n,"scroll",this._onScroll,this),this._containerId=b(n)},_initLayout:function(){var e=this._container;this._fadeAnimated=this.options.fadeAnimation&&Le.any3d,qe(e,"leaflet-container"+(Le.touch?" leaflet-touch":"")+(Le.retina?" leaflet-retina":"")+(Le.ielt9?" leaflet-oldie":"")+(Le.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var n=_i(e,"position");n!=="absolute"&&n!=="relative"&&n!=="fixed"&&n!=="sticky"&&(e.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var e=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),xt(this._mapPane,new se(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(qe(e.markerPane,"leaflet-zoom-hide"),qe(e.shadowPane,"leaflet-zoom-hide"))},_resetView:function(e,n,o){xt(this._mapPane,new se(0,0));var a=!this._loaded;this._loaded=!0,n=this._limitZoom(n),this.fire("viewprereset");var c=this._zoom!==n;this._moveStart(c,o)._move(e,n)._moveEnd(c),this.fire("viewreset"),a&&this.fire("load")},_moveStart:function(e,n){return e&&this.fire("zoomstart"),n||this.fire("movestart"),this},_move:function(e,n,o,a){n===void 0&&(n=this._zoom);var c=this._zoom!==n;return this._zoom=n,this._lastCenter=e,this._pixelOrigin=this._getNewPixelOrigin(e),a?o&&o.pinch&&this.fire("zoom",o):((c||o&&o.pinch)&&this.fire("zoom",o),this.fire("move",o)),this},_moveEnd:function(e){return e&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return ne(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(e){xt(this._mapPane,this._getMapPanePos().subtract(e))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(e){this._targets={},this._targets[b(this._container)]=this;var n=e?mt:Ke;n(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&n(window,"resize",this._onResize,this),Le.any3d&&this.options.transform3DLimit&&(e?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){ne(this._resizeRequest),this._resizeRequest=ze(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var e=this._getMapPanePos();Math.max(Math.abs(e.x),Math.abs(e.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(e,n){for(var o=[],a,c=n==="mouseout"||n==="mouseover",m=e.target||e.srcElement,P=!1;m;){if(a=this._targets[b(m)],a&&(n==="click"||n==="preclick")&&this._draggableMoved(a)){P=!0;break}if(a&&a.listens(n,!0)&&(c&&!Rt(m,e)||(o.push(a),c))||m===this._container)break;m=m.parentNode}return!o.length&&!P&&!c&&this.listens(n,!0)&&(o=[this]),o},_isClickDisabled:function(e){for(;e&&e!==this._container;){if(e._leaflet_disable_click)return!0;e=e.parentNode}},_handleDOMEvent:function(e){var n=e.target||e.srcElement;if(!(!this._loaded||n._leaflet_disable_events||e.type==="click"&&this._isClickDisabled(n))){var o=e.type;o==="mousedown"&&bo(n),this._fireDOMEvent(e,o)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(e,n,o){if(e.type==="click"){var a=u({},e);a.type="preclick",this._fireDOMEvent(a,a.type,o)}var c=this._findEventTargets(e,n);if(o){for(var m=[],P=0;P<o.length;P++)o[P].listens(n,!0)&&m.push(o[P]);c=m.concat(c)}if(c.length){n==="contextmenu"&&Et(e);var I=c[0],N={originalEvent:e};if(e.type!=="keypress"&&e.type!=="keydown"&&e.type!=="keyup"){var J=I.getLatLng&&(!I._radius||I._radius<=10);N.containerPoint=J?this.latLngToContainerPoint(I.getLatLng()):this.mouseEventToContainerPoint(e),N.layerPoint=this.containerPointToLayerPoint(N.containerPoint),N.latlng=J?I.getLatLng():this.layerPointToLatLng(N.layerPoint)}for(P=0;P<c.length;P++)if(c[P].fire(n,N,!0),N.originalEvent._stopped||c[P].options.bubblingMouseEvents===!1&&fe(this._mouseEvents,n)!==-1)return}},_draggableMoved:function(e){return e=e.dragging&&e.dragging.enabled()?e:this,e.dragging&&e.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var e=0,n=this._handlers.length;e<n;e++)this._handlers[e].disable()},whenReady:function(e,n){return this._loaded?e.call(n||this,{target:this}):this.on("load",e,n),this},_getMapPanePos:function(){return Dt(this._mapPane)||new se(0,0)},_moved:function(){var e=this._getMapPanePos();return e&&!e.equals([0,0])},_getTopLeftPoint:function(e,n){var o=e&&n!==void 0?this._getNewPixelOrigin(e,n):this.getPixelOrigin();return o.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(e,n){var o=this.getSize()._divideBy(2);return this.project(e,n)._subtract(o)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(e,n,o){var a=this._getNewPixelOrigin(o,n);return this.project(e,n)._subtract(a)},_latLngBoundsToNewLayerBounds:function(e,n,o){var a=this._getNewPixelOrigin(o,n);return Ne([this.project(e.getSouthWest(),n)._subtract(a),this.project(e.getNorthWest(),n)._subtract(a),this.project(e.getSouthEast(),n)._subtract(a),this.project(e.getNorthEast(),n)._subtract(a)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(e){return this.latLngToLayerPoint(e).subtract(this._getCenterLayerPoint())},_limitCenter:function(e,n,o){if(!o)return e;var a=this.project(e,n),c=this.getSize().divideBy(2),m=new be(a.subtract(c),a.add(c)),P=this._getBoundsOffset(m,o,n);return Math.abs(P.x)<=1&&Math.abs(P.y)<=1?e:this.unproject(a.add(P),n)},_limitOffset:function(e,n){if(!n)return e;var o=this.getPixelBounds(),a=new be(o.min.add(e),o.max.add(e));return e.add(this._getBoundsOffset(a,n))},_getBoundsOffset:function(e,n,o){var a=Ne(this.project(n.getNorthEast(),o),this.project(n.getSouthWest(),o)),c=a.min.subtract(e.min),m=a.max.subtract(e.max),P=this._rebound(c.x,-m.x),I=this._rebound(c.y,-m.y);return new se(P,I)},_rebound:function(e,n){return e+n>0?Math.round(e-n)/2:Math.max(0,Math.ceil(e))-Math.max(0,Math.floor(n))},_limitZoom:function(e){var n=this.getMinZoom(),o=this.getMaxZoom(),a=Le.any3d?this.options.zoomSnap:1;return a&&(e=Math.round(e/a)*a),Math.max(n,Math.min(o,e))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Tt(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(e,n){var o=this._getCenterOffset(e)._trunc();return(n&&n.animate)!==!0&&!this.getSize().contains(o)?!1:(this.panBy(o,n),!0)},_createAnimProxy:function(){var e=this._proxy=tt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(e),this.on("zoomanim",function(n){var o=on,a=this._proxy.style[o];_n(this._proxy,this.project(n.center,n.zoom),this.getZoomScale(n.zoom,1)),a===this._proxy.style[o]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){yt(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var e=this.getCenter(),n=this.getZoom();_n(this._proxy,this.project(e,n),this.getZoomScale(n,1))},_catchTransitionEnd:function(e){this._animatingZoom&&e.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(e,n,o){if(this._animatingZoom)return!0;if(o=o||{},!this._zoomAnimated||o.animate===!1||this._nothingToAnimate()||Math.abs(n-this._zoom)>this.options.zoomAnimationThreshold)return!1;var a=this.getZoomScale(n),c=this._getCenterOffset(e)._divideBy(1-1/a);return o.animate!==!0&&!this.getSize().contains(c)?!1:(ze(function(){this._moveStart(!0,o.noMoveStart||!1)._animateZoom(e,n,!0)},this),!0)},_animateZoom:function(e,n,o,a){this._mapPane&&(o&&(this._animatingZoom=!0,this._animateToCenter=e,this._animateToZoom=n,qe(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:e,zoom:n,noUpdate:a}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(h(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Tt(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function as(e,n){return new nt(e,n)}var dn=ie.extend({options:{position:"topright"},initialize:function(e){F(this,e)},getPosition:function(){return this.options.position},setPosition:function(e){var n=this._map;return n&&n.removeControl(this),this.options.position=e,n&&n.addControl(this),this},getContainer:function(){return this._container},addTo:function(e){this.remove(),this._map=e;var n=this._container=this.onAdd(e),o=this.getPosition(),a=e._controlCorners[o];return qe(n,"leaflet-control"),o.indexOf("bottom")!==-1?a.insertBefore(n,a.firstChild):a.appendChild(n),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(yt(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(e){this._map&&e&&e.screenX>0&&e.screenY>0&&this._map.getContainer().focus()}}),Zi=function(e){return new dn(e)};nt.include({addControl:function(e){return e.addTo(this),this},removeControl:function(e){return e.remove(),this},_initControlPos:function(){var e=this._controlCorners={},n="leaflet-",o=this._controlContainer=tt("div",n+"control-container",this._container);function a(c,m){var P=n+c+" "+n+m;e[c+m]=tt("div",P,o)}a("top","left"),a("top","right"),a("bottom","left"),a("bottom","right")},_clearControlPos:function(){for(var e in this._controlCorners)yt(this._controlCorners[e]);yt(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Ks=dn.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(e,n,o,a){return o<a?-1:a<o?1:0}},initialize:function(e,n,o){F(this,o),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(var a in e)this._addLayer(e[a],a);for(a in n)this._addLayer(n[a],a,!0)},onAdd:function(e){this._initLayout(),this._update(),this._map=e,e.on("zoomend",this._checkDisabledLayers,this);for(var n=0;n<this._layers.length;n++)this._layers[n].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(e){return dn.prototype.addTo.call(this,e),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(e,n){return this._addLayer(e,n),this._map?this._update():this},addOverlay:function(e,n){return this._addLayer(e,n,!0),this._map?this._update():this},removeLayer:function(e){e.off("add remove",this._onLayerChange,this);var n=this._getLayer(b(e));return n&&this._layers.splice(this._layers.indexOf(n),1),this._map?this._update():this},expand:function(){qe(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var e=this._map.getSize().y-(this._container.offsetTop+50);return e<this._section.clientHeight?(qe(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=e+"px"):Tt(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return Tt(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var e="leaflet-control-layers",n=this._container=tt("div",e),o=this.options.collapsed;n.setAttribute("aria-haspopup",!0),wi(n),is(n);var a=this._section=tt("section",e+"-list");o&&(this._map.on("click",this.collapse,this),Ke(n,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var c=this._layersLink=tt("a",e+"-toggle",n);c.href="#",c.title="Layers",c.setAttribute("role","button"),Ke(c,{keydown:function(m){m.keyCode===13&&this._expandSafely()},click:function(m){Et(m),this._expandSafely()}},this),o||this.expand(),this._baseLayersList=tt("div",e+"-base",a),this._separator=tt("div",e+"-separator",a),this._overlaysList=tt("div",e+"-overlays",a),n.appendChild(a)},_getLayer:function(e){for(var n=0;n<this._layers.length;n++)if(this._layers[n]&&b(this._layers[n].layer)===e)return this._layers[n]},_addLayer:function(e,n,o){this._map&&e.on("add remove",this._onLayerChange,this),this._layers.push({layer:e,name:n,overlay:o}),this.options.sortLayers&&this._layers.sort(h(function(a,c){return this.options.sortFunction(a.layer,c.layer,a.name,c.name)},this)),this.options.autoZIndex&&e.setZIndex&&(this._lastZIndex++,e.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;mo(this._baseLayersList),mo(this._overlaysList),this._layerControlInputs=[];var e,n,o,a,c=0;for(o=0;o<this._layers.length;o++)a=this._layers[o],this._addItem(a),n=n||a.overlay,e=e||!a.overlay,c+=a.overlay?0:1;return this.options.hideSingleBase&&(e=e&&c>1,this._baseLayersList.style.display=e?"":"none"),this._separator.style.display=n&&e?"":"none",this},_onLayerChange:function(e){this._handlingClick||this._update();var n=this._getLayer(b(e.target)),o=n.overlay?e.type==="add"?"overlayadd":"overlayremove":e.type==="add"?"baselayerchange":null;o&&this._map.fire(o,n)},_createRadioElement:function(e,n){var o='<input type="radio" class="leaflet-control-layers-selector" name="'+e+'"'+(n?' checked="checked"':"")+"/>",a=document.createElement("div");return a.innerHTML=o,a.firstChild},_addItem:function(e){var n=document.createElement("label"),o=this._map.hasLayer(e.layer),a;e.overlay?(a=document.createElement("input"),a.type="checkbox",a.className="leaflet-control-layers-selector",a.defaultChecked=o):a=this._createRadioElement("leaflet-base-layers_"+b(this),o),this._layerControlInputs.push(a),a.layerId=b(e.layer),Ke(a,"click",this._onInputClick,this);var c=document.createElement("span");c.innerHTML=" "+e.name;var m=document.createElement("span");n.appendChild(m),m.appendChild(a),m.appendChild(c);var P=e.overlay?this._overlaysList:this._baseLayersList;return P.appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){if(!this._preventClick){var e=this._layerControlInputs,n,o,a=[],c=[];this._handlingClick=!0;for(var m=e.length-1;m>=0;m--)n=e[m],o=this._getLayer(n.layerId).layer,n.checked?a.push(o):n.checked||c.push(o);for(m=0;m<c.length;m++)this._map.hasLayer(c[m])&&this._map.removeLayer(c[m]);for(m=0;m<a.length;m++)this._map.hasLayer(a[m])||this._map.addLayer(a[m]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var e=this._layerControlInputs,n,o,a=this._map.getZoom(),c=e.length-1;c>=0;c--)n=e[c],o=this._getLayer(n.layerId).layer,n.disabled=o.options.minZoom!==void 0&&a<o.options.minZoom||o.options.maxZoom!==void 0&&a>o.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var e=this._section;this._preventClick=!0,Ke(e,"click",Et),this.expand();var n=this;setTimeout(function(){mt(e,"click",Et),n._preventClick=!1})}}),ja=function(e,n,o){return new Ks(e,n,o)},ei=dn.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">−</span>',zoomOutTitle:"Zoom out"},onAdd:function(e){var n="leaflet-control-zoom",o=tt("div",n+" leaflet-bar"),a=this.options;return this._zoomInButton=this._createButton(a.zoomInText,a.zoomInTitle,n+"-in",o,this._zoomIn),this._zoomOutButton=this._createButton(a.zoomOutText,a.zoomOutTitle,n+"-out",o,this._zoomOut),this._updateDisabled(),e.on("zoomend zoomlevelschange",this._updateDisabled,this),o},onRemove:function(e){e.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(e){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(e.shiftKey?3:1))},_zoomOut:function(e){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(e.shiftKey?3:1))},_createButton:function(e,n,o,a,c){var m=tt("a",o,a);return m.innerHTML=e,m.href="#",m.title=n,m.setAttribute("role","button"),m.setAttribute("aria-label",n),wi(m),Ke(m,"click",En),Ke(m,"click",c,this),Ke(m,"click",this._refocusOnMap,this),m},_updateDisabled:function(){var e=this._map,n="leaflet-disabled";Tt(this._zoomInButton,n),Tt(this._zoomOutButton,n),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||e._zoom===e.getMinZoom())&&(qe(this._zoomOutButton,n),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||e._zoom===e.getMaxZoom())&&(qe(this._zoomInButton,n),this._zoomInButton.setAttribute("aria-disabled","true"))}});nt.mergeOptions({zoomControl:!0}),nt.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new ei,this.addControl(this.zoomControl))});var Gs=function(e){return new ei(e)},Hi=dn.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(e){var n="leaflet-control-scale",o=tt("div",n),a=this.options;return this._addScales(a,n+"-line",o),e.on(a.updateWhenIdle?"moveend":"move",this._update,this),e.whenReady(this._update,this),o},onRemove:function(e){e.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(e,n,o){e.metric&&(this._mScale=tt("div",n,o)),e.imperial&&(this._iScale=tt("div",n,o))},_update:function(){var e=this._map,n=e.getSize().y/2,o=e.distance(e.containerPointToLatLng([0,n]),e.containerPointToLatLng([this.options.maxWidth,n]));this._updateScales(o)},_updateScales:function(e){this.options.metric&&e&&this._updateMetric(e),this.options.imperial&&e&&this._updateImperial(e)},_updateMetric:function(e){var n=this._getRoundNum(e),o=n<1e3?n+" m":n/1e3+" km";this._updateScale(this._mScale,o,n/e)},_updateImperial:function(e){var n=e*3.2808399,o,a,c;n>5280?(o=n/5280,a=this._getRoundNum(o),this._updateScale(this._iScale,a+" mi",a/o)):(c=this._getRoundNum(n),this._updateScale(this._iScale,c+" ft",c/n))},_updateScale:function(e,n,o){e.style.width=Math.round(this.options.maxWidth*o)+"px",e.innerHTML=n},_getRoundNum:function(e){var n=Math.pow(10,(Math.floor(e)+"").length-1),o=e/n;return o=o>=10?10:o>=5?5:o>=3?3:o>=2?2:1,n*o}}),ji=function(e){return new Hi(e)},ko='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>',Wi=dn.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Le.inlineSvg?ko+" ":"")+"Leaflet</a>"},initialize:function(e){F(this,e),this._attributions={}},onAdd:function(e){e.attributionControl=this,this._container=tt("div","leaflet-control-attribution"),wi(this._container);for(var n in e._layers)e._layers[n].getAttribution&&this.addAttribution(e._layers[n].getAttribution());return this._update(),e.on("layeradd",this._addAttribution,this),this._container},onRemove:function(e){e.off("layeradd",this._addAttribution,this)},_addAttribution:function(e){e.layer.getAttribution&&(this.addAttribution(e.layer.getAttribution()),e.layer.once("remove",function(){this.removeAttribution(e.layer.getAttribution())},this))},setPrefix:function(e){return this.options.prefix=e,this._update(),this},addAttribution:function(e){return e?(this._attributions[e]||(this._attributions[e]=0),this._attributions[e]++,this._update(),this):this},removeAttribution:function(e){return e?(this._attributions[e]&&(this._attributions[e]--,this._update()),this):this},_update:function(){if(this._map){var e=[];for(var n in this._attributions)this._attributions[n]&&e.push(n);var o=[];this.options.prefix&&o.push(this.options.prefix),e.length&&o.push(e.join(", ")),this._container.innerHTML=o.join(' <span aria-hidden="true">|</span> ')}}});nt.mergeOptions({attributionControl:!0}),nt.addInitHook(function(){this.options.attributionControl&&new Wi().addTo(this)});var Wa=function(e){return new Wi(e)};dn.Layers=Ks,dn.Zoom=ei,dn.Scale=Hi,dn.Attribution=Wi,Zi.layers=ja,Zi.zoom=Gs,Zi.scale=ji,Zi.attribution=Wa;var xn=ie.extend({initialize:function(e){this._map=e},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});xn.addTo=function(e,n){return e.addHandler(n,this),this};var Ka={Events:le},fn=Le.touch?"touchstart mousedown":"mousedown",Rn=ce.extend({options:{clickTolerance:3},initialize:function(e,n,o,a){F(this,a),this._element=e,this._dragStartTarget=n||e,this._preventOutline=o},enable:function(){this._enabled||(Ke(this._dragStartTarget,fn,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Rn._dragging===this&&this.finishDrag(!0),mt(this._dragStartTarget,fn,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(e){if(this._enabled&&(this._moved=!1,!go(this._element,"leaflet-zoom-anim"))){if(e.touches&&e.touches.length!==1){Rn._dragging===this&&this.finishDrag();return}if(!(Rn._dragging||e.shiftKey||e.which!==1&&e.button!==1&&!e.touches)&&(Rn._dragging=this,this._preventOutline&&bo(this._element),Ri(),bn(),!this._moving)){this.fire("down");var n=e.touches?e.touches[0]:e,o=js(this._element);this._startPoint=new se(n.clientX,n.clientY),this._startPos=Dt(this._element),this._parentScale=yo(o);var a=e.type==="mousedown";Ke(document,a?"mousemove":"touchmove",this._onMove,this),Ke(document,a?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(e){if(this._enabled){if(e.touches&&e.touches.length>1){this._moved=!0;return}var n=e.touches&&e.touches.length===1?e.touches[0]:e,o=new se(n.clientX,n.clientY)._subtract(this._startPoint);!o.x&&!o.y||Math.abs(o.x)+Math.abs(o.y)<this.options.clickTolerance||(o.x/=this._parentScale.x,o.y/=this._parentScale.y,Et(e),this._moved||(this.fire("dragstart"),this._moved=!0,qe(document.body,"leaflet-dragging"),this._lastTarget=e.target||e.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),qe(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(o),this._moving=!0,this._lastEvent=e,this._updatePosition())}},_updatePosition:function(){var e={originalEvent:this._lastEvent};this.fire("predrag",e),xt(this._element,this._newPos),this.fire("drag",e)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(e){Tt(document.body,"leaflet-dragging"),this._lastTarget&&(Tt(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),mt(document,"mousemove touchmove",this._onMove,this),mt(document,"mouseup touchend touchcancel",this._onUp,this),es(),An();var n=this._moved&&this._moving;this._moving=!1,Rn._dragging=!1,n&&this.fire("dragend",{noInertia:e,distance:this._newPos.distanceTo(this._startPos)})}});function qs(e,n,o){var a,c=[1,4,2,8],m,P,I,N,J,ge,Re,Qe;for(m=0,ge=e.length;m<ge;m++)e[m]._code=an(e[m],n);for(I=0;I<4;I++){for(Re=c[I],a=[],m=0,ge=e.length,P=ge-1;m<ge;P=m++)N=e[m],J=e[P],N._code&Re?J._code&Re||(Qe=Yi(J,N,Re,n,o),Qe._code=an(Qe,n),a.push(Qe)):(J._code&Re&&(Qe=Yi(J,N,Re,n,o),Qe._code=an(Qe,n),a.push(Qe)),a.push(N));e=a}return e}function Ys(e,n){var o,a,c,m,P,I,N,J,ge;if(!e||e.length===0)throw new Error("latlngs not passed");rn(e)||(console.warn("latlngs are not flat! Only the first ring will be used"),e=e[0]);var Re=Y([0,0]),Qe=at(e),qt=Qe.getNorthWest().distanceTo(Qe.getSouthWest())*Qe.getNorthEast().distanceTo(Qe.getNorthWest());qt<1700&&(Re=Si(e));var zt=e.length,kn=[];for(o=0;o<zt;o++){var ln=Y(e[o]);kn.push(n.project(Y([ln.lat-Re.lat,ln.lng-Re.lng])))}for(I=N=J=0,o=0,a=zt-1;o<zt;a=o++)c=kn[o],m=kn[a],P=c.y*m.x-m.y*c.x,N+=(c.x+m.x)*P,J+=(c.y+m.y)*P,I+=P*3;I===0?ge=kn[0]:ge=[N/I,J/I];var Eo=n.unproject(ee(ge));return Y([Eo.lat+Re.lat,Eo.lng+Re.lng])}function Si(e){for(var n=0,o=0,a=0,c=0;c<e.length;c++){var m=Y(e[c]);n+=m.lat,o+=m.lng,a++}return Y([n/a,o/a])}var Ki={__proto__:null,clipPolygon:qs,polygonCenter:Ys,centroid:Si};function Gi(e,n){if(!n||!e.length)return e.slice();var o=n*n;return e=Js(e,o),e=So(e,o),e}function Ct(e,n,o){return Math.sqrt(Ji(e,n,o,!0))}function Ti(e,n,o){return Ji(e,n,o)}function So(e,n){var o=e.length,a=typeof Uint8Array<"u"?Uint8Array:Array,c=new a(o);c[0]=c[o-1]=1,ti(e,c,n,0,o-1);var m,P=[];for(m=0;m<o;m++)c[m]&&P.push(e[m]);return P}function ti(e,n,o,a,c){var m=0,P,I,N;for(I=a+1;I<=c-1;I++)N=Ji(e[I],e[a],e[c],!0),N>m&&(P=I,m=N);m>o&&(n[P]=1,ti(e,n,o,a,P),ti(e,n,o,P,c))}function Js(e,n){for(var o=[e[0]],a=1,c=0,m=e.length;a<m;a++)To(e[a],e[c])>n&&(o.push(e[a]),c=a);return c<m-1&&o.push(e[m-1]),o}var qi;function Pi(e,n,o,a,c){var m=a?qi:an(e,o),P=an(n,o),I,N,J;for(qi=P;;){if(!(m|P))return[e,n];if(m&P)return!1;I=m||P,N=Yi(e,n,I,o,c),J=an(N,o),I===m?(e=N,m=J):(n=N,P=J)}}function Yi(e,n,o,a,c){var m=n.x-e.x,P=n.y-e.y,I=a.min,N=a.max,J,ge;return o&8?(J=e.x+m*(N.y-e.y)/P,ge=N.y):o&4?(J=e.x+m*(I.y-e.y)/P,ge=I.y):o&2?(J=N.x,ge=e.y+P*(N.x-e.x)/m):o&1&&(J=I.x,ge=e.y+P*(I.x-e.x)/m),new se(J,ge,c)}function an(e,n){var o=0;return e.x<n.min.x?o|=1:e.x>n.max.x&&(o|=2),e.y<n.min.y?o|=4:e.y>n.max.y&&(o|=8),o}function To(e,n){var o=n.x-e.x,a=n.y-e.y;return o*o+a*a}function Ji(e,n,o,a){var c=n.x,m=n.y,P=o.x-c,I=o.y-m,N=P*P+I*I,J;return N>0&&(J=((e.x-c)*P+(e.y-m)*I)/N,J>1?(c=o.x,m=o.y):J>0&&(c+=P*J,m+=I*J)),P=e.x-c,I=e.y-m,a?P*P+I*I:new se(c,m)}function rn(e){return!Te(e[0])||typeof e[0][0]!="object"&&typeof e[0][0]<"u"}function st(e){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),rn(e)}function On(e,n){var o,a,c,m,P,I,N,J;if(!e||e.length===0)throw new Error("latlngs not passed");rn(e)||(console.warn("latlngs are not flat! Only the first ring will be used"),e=e[0]);var ge=Y([0,0]),Re=at(e),Qe=Re.getNorthWest().distanceTo(Re.getSouthWest())*Re.getNorthEast().distanceTo(Re.getNorthWest());Qe<1700&&(ge=Si(e));var qt=e.length,zt=[];for(o=0;o<qt;o++){var kn=Y(e[o]);zt.push(n.project(Y([kn.lat-ge.lat,kn.lng-ge.lng])))}for(o=0,a=0;o<qt-1;o++)a+=zt[o].distanceTo(zt[o+1])/2;if(a===0)J=zt[0];else for(o=0,m=0;o<qt-1;o++)if(P=zt[o],I=zt[o+1],c=P.distanceTo(I),m+=c,m>a){N=(m-a)/c,J=[I.x-N*(I.x-P.x),I.y-N*(I.y-P.y)];break}var ln=n.unproject(ee(J));return Y([ln.lat+ge.lat,ln.lng+ge.lng])}var Po={__proto__:null,simplify:Gi,pointToSegmentDistance:Ct,closestPointOnSegment:Ti,clipSegment:Pi,_getEdgeIntersection:Yi,_getBitCode:an,_sqClosestPointOnSegment:Ji,isFlat:rn,_flat:st,polylineCenter:On},Xi={project:function(e){return new se(e.lng,e.lat)},unproject:function(e){return new Ze(e.y,e.x)},bounds:new be([-180,-90],[180,90])},rs={R:6378137,R_MINOR:6356752314245179e-9,bounds:new be([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(e){var n=Math.PI/180,o=this.R,a=e.lat*n,c=this.R_MINOR/o,m=Math.sqrt(1-c*c),P=m*Math.sin(a),I=Math.tan(Math.PI/4-a/2)/Math.pow((1-P)/(1+P),m/2);return a=-o*Math.log(Math.max(I,1e-10)),new se(e.lng*n*o,a)},unproject:function(e){for(var n=180/Math.PI,o=this.R,a=this.R_MINOR/o,c=Math.sqrt(1-a*a),m=Math.exp(-e.y/o),P=Math.PI/2-2*Math.atan(m),I=0,N=.1,J;I<15&&Math.abs(N)>1e-7;I++)J=c*Math.sin(P),J=Math.pow((1-J)/(1+J),c/2),N=Math.PI/2-2*Math.atan(m*J)-P,P+=N;return new Ze(P*n,e.x*n/o)}},Xs={__proto__:null,LonLat:Xi,Mercator:rs,SphericalMercator:ut},Ga=u({},z,{code:"EPSG:3395",projection:rs,transformation:(function(){var e=.5/(Math.PI*rs.R);return y(e,.5,-e,.5)})()}),Qi=u({},z,{code:"EPSG:4326",projection:Xi,transformation:y(1/180,1,-1/180,.5)}),eo=u({},A,{projection:Xi,transformation:y(1,0,-1,0),scale:function(e){return Math.pow(2,e)},zoom:function(e){return Math.log(e)/Math.LN2},distance:function(e,n){var o=n.lng-e.lng,a=n.lat-e.lat;return Math.sqrt(o*o+a*a)},infinite:!0});A.Earth=z,A.EPSG3395=Ga,A.EPSG3857=_,A.EPSG900913=w,A.EPSG4326=Qi,A.Simple=eo;var Ht=ce.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(e){return e.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(e){return e&&e.removeLayer(this),this},getPane:function(e){return this._map.getPane(e?this.options[e]||e:this.options.pane)},addInteractiveTarget:function(e){return this._map._targets[b(e)]=this,this},removeInteractiveTarget:function(e){return delete this._map._targets[b(e)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(e){var n=e.target;if(n.hasLayer(this)){if(this._map=n,this._zoomAnimated=n._zoomAnimated,this.getEvents){var o=this.getEvents();n.on(o,this),this.once("remove",function(){n.off(o,this)},this)}this.onAdd(n),this.fire("add"),n.fire("layeradd",{layer:this})}}});nt.include({addLayer:function(e){if(!e._layerAdd)throw new Error("The provided object is not a Layer.");var n=b(e);return this._layers[n]?this:(this._layers[n]=e,e._mapToAdd=this,e.beforeAdd&&e.beforeAdd(this),this.whenReady(e._layerAdd,e),this)},removeLayer:function(e){var n=b(e);return this._layers[n]?(this._loaded&&e.onRemove(this),delete this._layers[n],this._loaded&&(this.fire("layerremove",{layer:e}),e.fire("remove")),e._map=e._mapToAdd=null,this):this},hasLayer:function(e){return b(e)in this._layers},eachLayer:function(e,n){for(var o in this._layers)e.call(n,this._layers[o]);return this},_addLayers:function(e){e=e?Te(e)?e:[e]:[];for(var n=0,o=e.length;n<o;n++)this.addLayer(e[n])},_addZoomLimit:function(e){(!isNaN(e.options.maxZoom)||!isNaN(e.options.minZoom))&&(this._zoomBoundLayers[b(e)]=e,this._updateZoomLevels())},_removeZoomLimit:function(e){var n=b(e);this._zoomBoundLayers[n]&&(delete this._zoomBoundLayers[n],this._updateZoomLevels())},_updateZoomLevels:function(){var e=1/0,n=-1/0,o=this._getZoomSpan();for(var a in this._zoomBoundLayers){var c=this._zoomBoundLayers[a].options;e=c.minZoom===void 0?e:Math.min(e,c.minZoom),n=c.maxZoom===void 0?n:Math.max(n,c.maxZoom)}this._layersMaxZoom=n===-1/0?void 0:n,this._layersMinZoom=e===1/0?void 0:e,o!==this._getZoomSpan()&&this.fire("zoomlevelschange"),this.options.maxZoom===void 0&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var wn=Ht.extend({initialize:function(e,n){F(this,n),this._layers={};var o,a;if(e)for(o=0,a=e.length;o<a;o++)this.addLayer(e[o])},addLayer:function(e){var n=this.getLayerId(e);return this._layers[n]=e,this._map&&this._map.addLayer(e),this},removeLayer:function(e){var n=e in this._layers?e:this.getLayerId(e);return this._map&&this._layers[n]&&this._map.removeLayer(this._layers[n]),delete this._layers[n],this},hasLayer:function(e){var n=typeof e=="number"?e:this.getLayerId(e);return n in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(e){var n=Array.prototype.slice.call(arguments,1),o,a;for(o in this._layers)a=this._layers[o],a[e]&&a[e].apply(a,n);return this},onAdd:function(e){this.eachLayer(e.addLayer,e)},onRemove:function(e){this.eachLayer(e.removeLayer,e)},eachLayer:function(e,n){for(var o in this._layers)e.call(n,this._layers[o]);return this},getLayer:function(e){return this._layers[e]},getLayers:function(){var e=[];return this.eachLayer(e.push,e),e},setZIndex:function(e){return this.invoke("setZIndex",e)},getLayerId:function(e){return b(e)}}),zn=function(e,n){return new wn(e,n)},Bt=wn.extend({addLayer:function(e){return this.hasLayer(e)?this:(e.addEventParent(this),wn.prototype.addLayer.call(this,e),this.fire("layeradd",{layer:e}))},removeLayer:function(e){return this.hasLayer(e)?(e in this._layers&&(e=this._layers[e]),e.removeEventParent(this),wn.prototype.removeLayer.call(this,e),this.fire("layerremove",{layer:e})):this},setStyle:function(e){return this.invoke("setStyle",e)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var e=new dt;for(var n in this._layers){var o=this._layers[n];e.extend(o.getBounds?o.getBounds():o.getLatLng())}return e}}),ls=function(e,n){return new Bt(e,n)},ni=ie.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(e){F(this,e)},createIcon:function(e){return this._createIcon("icon",e)},createShadow:function(e){return this._createIcon("shadow",e)},_createIcon:function(e,n){var o=this._getIconUrl(e);if(!o){if(e==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}var a=this._createImg(o,n&&n.tagName==="IMG"?n:null);return this._setIconStyles(a,e),(this.options.crossOrigin||this.options.crossOrigin==="")&&(a.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),a},_setIconStyles:function(e,n){var o=this.options,a=o[n+"Size"];typeof a=="number"&&(a=[a,a]);var c=ee(a),m=ee(n==="shadow"&&o.shadowAnchor||o.iconAnchor||c&&c.divideBy(2,!0));e.className="leaflet-marker-"+n+" "+(o.className||""),m&&(e.style.marginLeft=-m.x+"px",e.style.marginTop=-m.y+"px"),c&&(e.style.width=c.x+"px",e.style.height=c.y+"px")},_createImg:function(e,n){return n=n||document.createElement("img"),n.src=e,n},_getIconUrl:function(e){return Le.retina&&this.options[e+"RetinaUrl"]||this.options[e+"Url"]}});function qa(e){return new ni(e)}var Ci=ni.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(e){return typeof Ci.imagePath!="string"&&(Ci.imagePath=this._detectIconPath()),(this.options.imagePath||Ci.imagePath)+ni.prototype._getIconUrl.call(this,e)},_stripUrl:function(e){var n=function(o,a,c){var m=a.exec(o);return m&&m[c]};return e=n(e,/^url\((['"])?(.+)\1\)$/,2),e&&n(e,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var e=tt("div","leaflet-default-icon-path",document.body),n=_i(e,"background-image")||_i(e,"backgroundImage");if(document.body.removeChild(e),n=this._stripUrl(n),n)return n;var o=document.querySelector('link[href$="leaflet.css"]');return o?o.href.substring(0,o.href.length-11-1):""}}),us=xn.extend({initialize:function(e){this._marker=e},addHooks:function(){var e=this._marker._icon;this._draggable||(this._draggable=new Rn(e,e,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),qe(e,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&Tt(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(e){var n=this._marker,o=n._map,a=this._marker.options.autoPanSpeed,c=this._marker.options.autoPanPadding,m=Dt(n._icon),P=o.getPixelBounds(),I=o.getPixelOrigin(),N=Ne(P.min._subtract(I).add(c),P.max._subtract(I).subtract(c));if(!N.contains(m)){var J=ee((Math.max(N.max.x,m.x)-N.max.x)/(P.max.x-N.max.x)-(Math.min(N.min.x,m.x)-N.min.x)/(P.min.x-N.min.x),(Math.max(N.max.y,m.y)-N.max.y)/(P.max.y-N.max.y)-(Math.min(N.min.y,m.y)-N.min.y)/(P.min.y-N.min.y)).multiplyBy(a);o.panBy(J,{animate:!1}),this._draggable._newPos._add(J),this._draggable._startPos._add(J),xt(n._icon,this._draggable._newPos),this._onDrag(e),this._panRequest=ze(this._adjustPan.bind(this,e))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(e){this._marker.options.autoPan&&(ne(this._panRequest),this._panRequest=ze(this._adjustPan.bind(this,e)))},_onDrag:function(e){var n=this._marker,o=n._shadow,a=Dt(n._icon),c=n._map.layerPointToLatLng(a);o&&xt(o,a),n._latlng=c,e.latlng=c,e.oldLatLng=this._oldLatLng,n.fire("move",e).fire("drag",e)},_onDragEnd:function(e){ne(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",e)}}),Co=Ht.extend({options:{icon:new Ci,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(e,n){F(this,n),this._latlng=Y(e)},onAdd:function(e){this._zoomAnimated=this._zoomAnimated&&e.options.markerZoomAnimation,this._zoomAnimated&&e.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(e){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&e.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(e){var n=this._latlng;return this._latlng=Y(e),this.update(),this.fire("move",{oldLatLng:n,latlng:this._latlng})},setZIndexOffset:function(e){return this.options.zIndexOffset=e,this.update()},getIcon:function(){return this.options.icon},setIcon:function(e){return this.options.icon=e,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var e=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(e)}return this},_initIcon:function(){var e=this.options,n="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),o=e.icon.createIcon(this._icon),a=!1;o!==this._icon&&(this._icon&&this._removeIcon(),a=!0,e.title&&(o.title=e.title),o.tagName==="IMG"&&(o.alt=e.alt||"")),qe(o,n),e.keyboard&&(o.tabIndex="0",o.setAttribute("role","button")),this._icon=o,e.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Ke(o,"focus",this._panOnFocus,this);var c=e.icon.createShadow(this._shadow),m=!1;c!==this._shadow&&(this._removeShadow(),m=!0),c&&(qe(c,n),c.alt=""),this._shadow=c,e.opacity<1&&this._updateOpacity(),a&&this.getPane().appendChild(this._icon),this._initInteraction(),c&&m&&this.getPane(e.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&mt(this._icon,"focus",this._panOnFocus,this),yt(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&yt(this._shadow),this._shadow=null},_setPos:function(e){this._icon&&xt(this._icon,e),this._shadow&&xt(this._shadow,e),this._zIndex=e.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(e){this._icon&&(this._icon.style.zIndex=this._zIndex+e)},_animateZoom:function(e){var n=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center).round();this._setPos(n)},_initInteraction:function(){if(this.options.interactive&&(qe(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),us)){var e=this.options.draggable;this.dragging&&(e=this.dragging.enabled(),this.dragging.disable()),this.dragging=new us(this),e&&this.dragging.enable()}},setOpacity:function(e){return this.options.opacity=e,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var e=this.options.opacity;this._icon&&At(this._icon,e),this._shadow&&At(this._shadow,e)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var e=this._map;if(e){var n=this.options.icon.options,o=n.iconSize?ee(n.iconSize):ee(0,0),a=n.iconAnchor?ee(n.iconAnchor):ee(0,0);e.panInside(this._latlng,{paddingTopLeft:a,paddingBottomRight:o.subtract(a)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function Ya(e,n){return new Co(e,n)}var hn=Ht.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(e){this._renderer=e.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(e){return F(this,e),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&e&&Object.prototype.hasOwnProperty.call(e,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),Lo=hn.extend({options:{fill:!0,radius:10},initialize:function(e,n){F(this,n),this._latlng=Y(e),this._radius=this.options.radius},setLatLng:function(e){var n=this._latlng;return this._latlng=Y(e),this.redraw(),this.fire("move",{oldLatLng:n,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(e){return this.options.radius=this._radius=e,this.redraw()},getRadius:function(){return this._radius},setStyle:function(e){var n=e&&e.radius||this._radius;return hn.prototype.setStyle.call(this,e),this.setRadius(n),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var e=this._radius,n=this._radiusY||e,o=this._clickTolerance(),a=[e+o,n+o];this._pxBounds=new be(this._point.subtract(a),this._point.add(a))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(e){return e.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function _t(e,n){return new Lo(e,n)}var ii=Lo.extend({initialize:function(e,n,o){if(typeof n=="number"&&(n=u({},o,{radius:n})),F(this,n),this._latlng=Y(e),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(e){return this._mRadius=e,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var e=[this._radius,this._radiusY||this._radius];return new dt(this._map.layerPointToLatLng(this._point.subtract(e)),this._map.layerPointToLatLng(this._point.add(e)))},setStyle:hn.prototype.setStyle,_project:function(){var e=this._latlng.lng,n=this._latlng.lat,o=this._map,a=o.options.crs;if(a.distance===z.distance){var c=Math.PI/180,m=this._mRadius/z.R/c,P=o.project([n+m,e]),I=o.project([n-m,e]),N=P.add(I).divideBy(2),J=o.unproject(N).lat,ge=Math.acos((Math.cos(m*c)-Math.sin(n*c)*Math.sin(J*c))/(Math.cos(n*c)*Math.cos(J*c)))/c;(isNaN(ge)||ge===0)&&(ge=m/Math.cos(Math.PI/180*n)),this._point=N.subtract(o.getPixelOrigin()),this._radius=isNaN(ge)?0:N.x-o.project([J,e-ge]).x,this._radiusY=N.y-P.y}else{var Re=a.unproject(a.project(this._latlng).subtract([this._mRadius,0]));this._point=o.latLngToLayerPoint(this._latlng),this._radius=this._point.x-o.latLngToLayerPoint(Re).x}this._updateBounds()}});function cs(e,n,o){return new ii(e,n,o)}var pn=hn.extend({options:{smoothFactor:1,noClip:!1},initialize:function(e,n){F(this,n),this._setLatLngs(e)},getLatLngs:function(){return this._latlngs},setLatLngs:function(e){return this._setLatLngs(e),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(e){for(var n=1/0,o=null,a=Ji,c,m,P=0,I=this._parts.length;P<I;P++)for(var N=this._parts[P],J=1,ge=N.length;J<ge;J++){c=N[J-1],m=N[J];var Re=a(e,c,m,!0);Re<n&&(n=Re,o=a(e,c,m))}return o&&(o.distance=Math.sqrt(n)),o},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return On(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(e,n){return n=n||this._defaultShape(),e=Y(e),n.push(e),this._bounds.extend(e),this.redraw()},_setLatLngs:function(e){this._bounds=new dt,this._latlngs=this._convertLatLngs(e)},_defaultShape:function(){return rn(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(e){for(var n=[],o=rn(e),a=0,c=e.length;a<c;a++)o?(n[a]=Y(e[a]),this._bounds.extend(n[a])):n[a]=this._convertLatLngs(e[a]);return n},_project:function(){var e=new be;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,e),this._bounds.isValid()&&e.isValid()&&(this._rawPxBounds=e,this._updateBounds())},_updateBounds:function(){var e=this._clickTolerance(),n=new se(e,e);this._rawPxBounds&&(this._pxBounds=new be([this._rawPxBounds.min.subtract(n),this._rawPxBounds.max.add(n)]))},_projectLatlngs:function(e,n,o){var a=e[0]instanceof Ze,c=e.length,m,P;if(a){for(P=[],m=0;m<c;m++)P[m]=this._map.latLngToLayerPoint(e[m]),o.extend(P[m]);n.push(P)}else for(m=0;m<c;m++)this._projectLatlngs(e[m],n,o)},_clipPoints:function(){var e=this._renderer._bounds;if(this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(e))){if(this.options.noClip){this._parts=this._rings;return}var n=this._parts,o,a,c,m,P,I,N;for(o=0,c=0,m=this._rings.length;o<m;o++)for(N=this._rings[o],a=0,P=N.length;a<P-1;a++)I=Pi(N[a],N[a+1],e,a,!0),I&&(n[c]=n[c]||[],n[c].push(I[0]),(I[1]!==N[a+1]||a===P-2)&&(n[c].push(I[1]),c++))}},_simplifyPoints:function(){for(var e=this._parts,n=this.options.smoothFactor,o=0,a=e.length;o<a;o++)e[o]=Gi(e[o],n)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(e,n){var o,a,c,m,P,I,N=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(e))return!1;for(o=0,m=this._parts.length;o<m;o++)for(I=this._parts[o],a=0,P=I.length,c=P-1;a<P;c=a++)if(!(!n&&a===0)&&Ct(e,I[c],I[a])<=N)return!0;return!1}});function Ja(e,n){return new pn(e,n)}pn._flat=st;var Li=pn.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return Ys(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(e){var n=pn.prototype._convertLatLngs.call(this,e),o=n.length;return o>=2&&n[0]instanceof Ze&&n[0].equals(n[o-1])&&n.pop(),n},_setLatLngs:function(e){pn.prototype._setLatLngs.call(this,e),rn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return rn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var e=this._renderer._bounds,n=this.options.weight,o=new se(n,n);if(e=new be(e.min.subtract(o),e.max.add(o)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(e))){if(this.options.noClip){this._parts=this._rings;return}for(var a=0,c=this._rings.length,m;a<c;a++)m=qs(this._rings[a],e,!0),m.length&&this._parts.push(m)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(e){var n=!1,o,a,c,m,P,I,N,J;if(!this._pxBounds||!this._pxBounds.contains(e))return!1;for(m=0,N=this._parts.length;m<N;m++)for(o=this._parts[m],P=0,J=o.length,I=J-1;P<J;I=P++)a=o[P],c=o[I],a.y>e.y!=c.y>e.y&&e.x<(c.x-a.x)*(e.y-a.y)/(c.y-a.y)+a.x&&(n=!n);return n||pn.prototype._containsPoint.call(this,e,!0)}});function x(e,n){return new Li(e,n)}var f=Bt.extend({initialize:function(e,n){F(this,n),this._layers={},e&&this.addData(e)},addData:function(e){var n=Te(e)?e:e.features,o,a,c;if(n){for(o=0,a=n.length;o<a;o++)c=n[o],(c.geometries||c.geometry||c.features||c.coordinates)&&this.addData(c);return this}var m=this.options;if(m.filter&&!m.filter(e))return this;var P=j(e,m);return P?(P.feature=ta(e),P.defaultOptions=P.options,this.resetStyle(P),m.onEachFeature&&m.onEachFeature(e,P),this.addLayer(P)):this},resetStyle:function(e){return e===void 0?this.eachLayer(this.resetStyle,this):(e.options=u({},e.defaultOptions),this._setLayerStyle(e,this.options.style),this)},setStyle:function(e){return this.eachLayer(function(n){this._setLayerStyle(n,e)},this)},_setLayerStyle:function(e,n){e.setStyle&&(typeof n=="function"&&(n=n(e.feature)),e.setStyle(n))}});function j(e,n){var o=e.type==="Feature"?e.geometry:e,a=o?o.coordinates:null,c=[],m=n&&n.pointToLayer,P=n&&n.coordsToLatLng||Xe,I,N,J,ge;if(!a&&!o)return null;switch(o.type){case"Point":return I=P(a),S(m,e,I,n);case"MultiPoint":for(J=0,ge=a.length;J<ge;J++)I=P(a[J]),c.push(S(m,e,I,n));return new Bt(c);case"LineString":case"MultiLineString":return N=Qs(a,o.type==="LineString"?0:1,P),new pn(N,n);case"Polygon":case"MultiPolygon":return N=Qs(a,o.type==="Polygon"?1:2,P),new Li(N,n);case"GeometryCollection":for(J=0,ge=o.geometries.length;J<ge;J++){var Re=j({geometry:o.geometries[J],type:"Feature",properties:e.properties},n);Re&&c.push(Re)}return new Bt(c);case"FeatureCollection":for(J=0,ge=o.features.length;J<ge;J++){var Qe=j(o.features[J],n);Qe&&c.push(Qe)}return new Bt(c);default:throw new Error("Invalid GeoJSON object.")}}function S(e,n,o,a){return e?e(n,o):new Co(o,a&&a.markersInheritOptions&&a)}function Xe(e){return new Ze(e[1],e[0],e[2])}function Qs(e,n,o){for(var a=[],c=0,m=e.length,P;c<m;c++)P=n?Qs(e[c],n-1,o):(o||Xe)(e[c]),a.push(P);return a}function Xa(e,n){return e=Y(e),e.alt!==void 0?[R(e.lng,n),R(e.lat,n),R(e.alt,n)]:[R(e.lng,n),R(e.lat,n)]}function ea(e,n,o,a){for(var c=[],m=0,P=e.length;m<P;m++)c.push(n?ea(e[m],rn(e[m])?0:n-1,o,a):Xa(e[m],a));return!n&&o&&c.length>0&&c.push(c[0].slice()),c}function Mo(e,n){return e.feature?u({},e.feature,{geometry:n}):ta(n)}function ta(e){return e.type==="Feature"||e.type==="FeatureCollection"?e:{type:"Feature",properties:{},geometry:e}}var Qa={toGeoJSON:function(e){return Mo(this,{type:"Point",coordinates:Xa(this.getLatLng(),e)})}};Co.include(Qa),ii.include(Qa),Lo.include(Qa),pn.include({toGeoJSON:function(e){var n=!rn(this._latlngs),o=ea(this._latlngs,n?1:0,!1,e);return Mo(this,{type:(n?"Multi":"")+"LineString",coordinates:o})}}),Li.include({toGeoJSON:function(e){var n=!rn(this._latlngs),o=n&&!rn(this._latlngs[0]),a=ea(this._latlngs,o?2:n?1:0,!0,e);return n||(a=[a]),Mo(this,{type:(o?"Multi":"")+"Polygon",coordinates:a})}}),wn.include({toMultiPoint:function(e){var n=[];return this.eachLayer(function(o){n.push(o.toGeoJSON(e).geometry.coordinates)}),Mo(this,{type:"MultiPoint",coordinates:n})},toGeoJSON:function(e){var n=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(n==="MultiPoint")return this.toMultiPoint(e);var o=n==="GeometryCollection",a=[];return this.eachLayer(function(c){if(c.toGeoJSON){var m=c.toGeoJSON(e);if(o)a.push(m.geometry);else{var P=ta(m);P.type==="FeatureCollection"?a.push.apply(a,P.features):a.push(P)}}}),o?Mo(this,{geometries:a,type:"GeometryCollection"}):{type:"FeatureCollection",features:a}}});function Xr(e,n){return new f(e,n)}var jc=Xr,na=Ht.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(e,n,o){this._url=e,this._bounds=at(n),F(this,o)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(qe(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){yt(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(e){return this.options.opacity=e,this._image&&this._updateOpacity(),this},setStyle:function(e){return e.opacity&&this.setOpacity(e.opacity),this},bringToFront:function(){return this._map&&bi(this._image),this},bringToBack:function(){return this._map&&yi(this._image),this},setUrl:function(e){return this._url=e,this._image&&(this._image.src=e),this},setBounds:function(e){return this._bounds=at(e),this._map&&this._reset(),this},getEvents:function(){var e={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},setZIndex:function(e){return this.options.zIndex=e,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var e=this._url.tagName==="IMG",n=this._image=e?this._url:tt("img");if(qe(n,"leaflet-image-layer"),this._zoomAnimated&&qe(n,"leaflet-zoom-animated"),this.options.className&&qe(n,this.options.className),n.onselectstart=M,n.onmousemove=M,n.onload=h(this.fire,this,"load"),n.onerror=h(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(n.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),e){this._url=n.src;return}n.src=this._url,n.alt=this.options.alt},_animateZoom:function(e){var n=this._map.getZoomScale(e.zoom),o=this._map._latLngBoundsToNewLayerBounds(this._bounds,e.zoom,e.center).min;_n(this._image,o,n)},_reset:function(){var e=this._image,n=new be(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),o=n.getSize();xt(e,n.min),e.style.width=o.x+"px",e.style.height=o.y+"px"},_updateOpacity:function(){At(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var e=this.options.errorOverlayUrl;e&&this._url!==e&&(this._url=e,this._image.src=e)},getCenter:function(){return this._bounds.getCenter()}}),Wc=function(e,n,o){return new na(e,n,o)},Qr=na.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var e=this._url.tagName==="VIDEO",n=this._image=e?this._url:tt("video");if(qe(n,"leaflet-image-layer"),this._zoomAnimated&&qe(n,"leaflet-zoom-animated"),this.options.className&&qe(n,this.options.className),n.onselectstart=M,n.onmousemove=M,n.onloadeddata=h(this.fire,this,"load"),e){for(var o=n.getElementsByTagName("source"),a=[],c=0;c<o.length;c++)a.push(o[c].src);this._url=o.length>0?a:[n.src];return}Te(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(n.style,"objectFit")&&(n.style.objectFit="fill"),n.autoplay=!!this.options.autoplay,n.loop=!!this.options.loop,n.muted=!!this.options.muted,n.playsInline=!!this.options.playsInline;for(var m=0;m<this._url.length;m++){var P=tt("source");P.src=this._url[m],n.appendChild(P)}}});function Kc(e,n,o){return new Qr(e,n,o)}var el=na.extend({_initImage:function(){var e=this._image=this._url;qe(e,"leaflet-image-layer"),this._zoomAnimated&&qe(e,"leaflet-zoom-animated"),this.options.className&&qe(e,this.options.className),e.onselectstart=M,e.onmousemove=M}});function Gc(e,n,o){return new el(e,n,o)}var Bn=Ht.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(e,n){e&&(e instanceof Ze||Te(e))?(this._latlng=Y(e),F(this,n)):(F(this,e),this._source=n),this.options.content&&(this._content=this.options.content)},openOn:function(e){return e=arguments.length?e:this._source._map,e.hasLayer(this)||e.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(e){return this._map?this.close():(arguments.length?this._source=e:e=this._source,this._prepareOpen(),this.openOn(e._map)),this},onAdd:function(e){this._zoomAnimated=e._zoomAnimated,this._container||this._initLayout(),e._fadeAnimated&&At(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),e._fadeAnimated&&At(this._container,1),this.bringToFront(),this.options.interactive&&(qe(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(e){e._fadeAnimated?(At(this._container,0),this._removeTimeout=setTimeout(h(yt,void 0,this._container),200)):yt(this._container),this.options.interactive&&(Tt(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(e){return this._latlng=Y(e),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(e){return this._content=e,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var e={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&bi(this._container),this},bringToBack:function(){return this._map&&yi(this._container),this},_prepareOpen:function(e){var n=this._source;if(!n._map)return!1;if(n instanceof Bt){n=null;var o=this._source._layers;for(var a in o)if(o[a]._map){n=o[a];break}if(!n)return!1;this._source=n}if(!e)if(n.getCenter)e=n.getCenter();else if(n.getLatLng)e=n.getLatLng();else if(n.getBounds)e=n.getBounds().getCenter();else throw new Error("Unable to get source layer LatLng.");return this.setLatLng(e),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var e=this._contentNode,n=typeof this._content=="function"?this._content(this._source||this):this._content;if(typeof n=="string")e.innerHTML=n;else{for(;e.hasChildNodes();)e.removeChild(e.firstChild);e.appendChild(n)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var e=this._map.latLngToLayerPoint(this._latlng),n=ee(this.options.offset),o=this._getAnchor();this._zoomAnimated?xt(this._container,e.add(o)):n=n.add(e).add(o);var a=this._containerBottom=-n.y,c=this._containerLeft=-Math.round(this._containerWidth/2)+n.x;this._container.style.bottom=a+"px",this._container.style.left=c+"px"}},_getAnchor:function(){return[0,0]}});nt.include({_initOverlay:function(e,n,o,a){var c=n;return c instanceof e||(c=new e(a).setContent(n)),o&&c.setLatLng(o),c}}),Ht.include({_initOverlay:function(e,n,o,a){var c=o;return c instanceof e?(F(c,a),c._source=this):(c=n&&!a?n:new e(a,this),c.setContent(o)),c}});var ia=Bn.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(e){return e=arguments.length?e:this._source._map,!e.hasLayer(this)&&e._popup&&e._popup.options.autoClose&&e.removeLayer(e._popup),e._popup=this,Bn.prototype.openOn.call(this,e)},onAdd:function(e){Bn.prototype.onAdd.call(this,e),e.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof hn||this._source.on("preclick",Qn))},onRemove:function(e){Bn.prototype.onRemove.call(this,e),e.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof hn||this._source.off("preclick",Qn))},getEvents:function(){var e=Bn.prototype.getEvents.call(this);return(this.options.closeOnClick!==void 0?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(e.preclick=this.close),this.options.keepInView&&(e.moveend=this._adjustPan),e},_initLayout:function(){var e="leaflet-popup",n=this._container=tt("div",e+" "+(this.options.className||"")+" leaflet-zoom-animated"),o=this._wrapper=tt("div",e+"-content-wrapper",n);if(this._contentNode=tt("div",e+"-content",o),wi(n),is(this._contentNode),Ke(n,"contextmenu",Qn),this._tipContainer=tt("div",e+"-tip-container",n),this._tip=tt("div",e+"-tip",this._tipContainer),this.options.closeButton){var a=this._closeButton=tt("a",e+"-close-button",n);a.setAttribute("role","button"),a.setAttribute("aria-label","Close popup"),a.href="#close",a.innerHTML='<span aria-hidden="true">×</span>',Ke(a,"click",function(c){Et(c),this.close()},this)}},_updateLayout:function(){var e=this._contentNode,n=e.style;n.width="",n.whiteSpace="nowrap";var o=e.offsetWidth;o=Math.min(o,this.options.maxWidth),o=Math.max(o,this.options.minWidth),n.width=o+1+"px",n.whiteSpace="",n.height="";var a=e.offsetHeight,c=this.options.maxHeight,m="leaflet-popup-scrolled";c&&a>c?(n.height=c+"px",qe(e,m)):Tt(e,m),this._containerWidth=this._container.offsetWidth},_animateZoom:function(e){var n=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center),o=this._getAnchor();xt(this._container,n.add(o))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var e=this._map,n=parseInt(_i(this._container,"marginBottom"),10)||0,o=this._container.offsetHeight+n,a=this._containerWidth,c=new se(this._containerLeft,-o-this._containerBottom);c._add(Dt(this._container));var m=e.layerPointToContainerPoint(c),P=ee(this.options.autoPanPadding),I=ee(this.options.autoPanPaddingTopLeft||P),N=ee(this.options.autoPanPaddingBottomRight||P),J=e.getSize(),ge=0,Re=0;m.x+a+N.x>J.x&&(ge=m.x+a-J.x+N.x),m.x-ge-I.x<0&&(ge=m.x-I.x),m.y+o+N.y>J.y&&(Re=m.y+o-J.y+N.y),m.y-Re-I.y<0&&(Re=m.y-I.y),(ge||Re)&&(this.options.keepInView&&(this._autopanning=!0),e.fire("autopanstart").panBy([ge,Re]))}},_getAnchor:function(){return ee(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),qc=function(e,n){return new ia(e,n)};nt.mergeOptions({closePopupOnClick:!0}),nt.include({openPopup:function(e,n,o){return this._initOverlay(ia,e,n,o).openOn(this),this},closePopup:function(e){return e=arguments.length?e:this._popup,e&&e.close(),this}}),Ht.include({bindPopup:function(e,n){return this._popup=this._initOverlay(ia,this._popup,e,n),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(e){return this._popup&&(this instanceof Bt||(this._popup._source=this),this._popup._prepareOpen(e||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(e){return this._popup&&this._popup.setContent(e),this},getPopup:function(){return this._popup},_openPopup:function(e){if(!(!this._popup||!this._map)){En(e);var n=e.layer||e.target;if(this._popup._source===n&&!(n instanceof hn)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(e.latlng);return}this._popup._source=n,this.openPopup(e.latlng)}},_movePopup:function(e){this._popup.setLatLng(e.latlng)},_onKeyPress:function(e){e.originalEvent.keyCode===13&&this._openPopup(e)}});var oa=Bn.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(e){Bn.prototype.onAdd.call(this,e),this.setOpacity(this.options.opacity),e.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(e){Bn.prototype.onRemove.call(this,e),e.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var e=Bn.prototype.getEvents.call(this);return this.options.permanent||(e.preclick=this.close),e},_initLayout:function(){var e="leaflet-tooltip",n=e+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=tt("div",n),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+b(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(e){var n,o,a=this._map,c=this._container,m=a.latLngToContainerPoint(a.getCenter()),P=a.layerPointToContainerPoint(e),I=this.options.direction,N=c.offsetWidth,J=c.offsetHeight,ge=ee(this.options.offset),Re=this._getAnchor();I==="top"?(n=N/2,o=J):I==="bottom"?(n=N/2,o=0):I==="center"?(n=N/2,o=J/2):I==="right"?(n=0,o=J/2):I==="left"?(n=N,o=J/2):P.x<m.x?(I="right",n=0,o=J/2):(I="left",n=N+(ge.x+Re.x)*2,o=J/2),e=e.subtract(ee(n,o,!0)).add(ge).add(Re),Tt(c,"leaflet-tooltip-right"),Tt(c,"leaflet-tooltip-left"),Tt(c,"leaflet-tooltip-top"),Tt(c,"leaflet-tooltip-bottom"),qe(c,"leaflet-tooltip-"+I),xt(c,e)},_updatePosition:function(){var e=this._map.latLngToLayerPoint(this._latlng);this._setPosition(e)},setOpacity:function(e){this.options.opacity=e,this._container&&At(this._container,e)},_animateZoom:function(e){var n=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center);this._setPosition(n)},_getAnchor:function(){return ee(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),Yc=function(e,n){return new oa(e,n)};nt.include({openTooltip:function(e,n,o){return this._initOverlay(oa,e,n,o).openOn(this),this},closeTooltip:function(e){return e.close(),this}}),Ht.include({bindTooltip:function(e,n){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(oa,this._tooltip,e,n),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(e){if(!(!e&&this._tooltipHandlersAdded)){var n=e?"off":"on",o={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?o.add=this._openTooltip:(o.mouseover=this._openTooltip,o.mouseout=this.closeTooltip,o.click=this._openTooltip,this._map?this._addFocusListeners():o.add=this._addFocusListeners),this._tooltip.options.sticky&&(o.mousemove=this._moveTooltip),this[n](o),this._tooltipHandlersAdded=!e}},openTooltip:function(e){return this._tooltip&&(this instanceof Bt||(this._tooltip._source=this),this._tooltip._prepareOpen(e)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(e){return this._tooltip&&this._tooltip.setContent(e),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(e){var n=typeof e.getElement=="function"&&e.getElement();n&&(Ke(n,"focus",function(){this._tooltip._source=e,this.openTooltip()},this),Ke(n,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(e){var n=typeof e.getElement=="function"&&e.getElement();n&&n.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(e){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var n=this;this._map.once("moveend",function(){n._openOnceFlag=!1,n._openTooltip(e)});return}this._tooltip._source=e.layer||e.target,this.openTooltip(this._tooltip.options.sticky?e.latlng:void 0)}},_moveTooltip:function(e){var n=e.latlng,o,a;this._tooltip.options.sticky&&e.originalEvent&&(o=this._map.mouseEventToContainerPoint(e.originalEvent),a=this._map.containerPointToLayerPoint(o),n=this._map.layerPointToLatLng(a)),this._tooltip.setLatLng(n)}});var tl=ni.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(e){var n=e&&e.tagName==="DIV"?e:document.createElement("div"),o=this.options;if(o.html instanceof Element?(mo(n),n.appendChild(o.html)):n.innerHTML=o.html!==!1?o.html:"",o.bgPos){var a=ee(o.bgPos);n.style.backgroundPosition=-a.x+"px "+-a.y+"px"}return this._setIconStyles(n,"icon"),n},createShadow:function(){return null}});function Jc(e){return new tl(e)}ni.Default=Ci;var ds=Ht.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Le.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(e){F(this,e)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(e){e._addZoomLimit(this)},onRemove:function(e){this._removeAllTiles(),yt(this._container),e._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(bi(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(yi(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(e){return this.options.opacity=e,this._updateOpacity(),this},setZIndex:function(e){return this.options.zIndex=e,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var e=this._clampZoom(this._map.getZoom());e!==this._tileZoom&&(this._tileZoom=e,this._updateLevels()),this._update()}return this},getEvents:function(){var e={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=C(this._onMoveEnd,this.options.updateInterval,this)),e.move=this._onMove),this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},createTile:function(){return document.createElement("div")},getTileSize:function(){var e=this.options.tileSize;return e instanceof se?e:new se(e,e)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(e){for(var n=this.getPane().children,o=-e(-1/0,1/0),a=0,c=n.length,m;a<c;a++)m=n[a].style.zIndex,n[a]!==this._container&&m&&(o=e(o,+m));isFinite(o)&&(this.options.zIndex=o+e(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Le.ielt9){At(this._container,this.options.opacity);var e=+new Date,n=!1,o=!1;for(var a in this._tiles){var c=this._tiles[a];if(!(!c.current||!c.loaded)){var m=Math.min(1,(e-c.loaded)/200);At(c.el,m),m<1?n=!0:(c.active?o=!0:this._onOpaqueTile(c),c.active=!0)}}o&&!this._noPrune&&this._pruneTiles(),n&&(ne(this._fadeFrame),this._fadeFrame=ze(this._updateOpacity,this))}},_onOpaqueTile:M,_initContainer:function(){this._container||(this._container=tt("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var e=this._tileZoom,n=this.options.maxZoom;if(e!==void 0){for(var o in this._levels)o=Number(o),this._levels[o].el.children.length||o===e?(this._levels[o].el.style.zIndex=n-Math.abs(e-o),this._onUpdateLevel(o)):(yt(this._levels[o].el),this._removeTilesAtZoom(o),this._onRemoveLevel(o),delete this._levels[o]);var a=this._levels[e],c=this._map;return a||(a=this._levels[e]={},a.el=tt("div","leaflet-tile-container leaflet-zoom-animated",this._container),a.el.style.zIndex=n,a.origin=c.project(c.unproject(c.getPixelOrigin()),e).round(),a.zoom=e,this._setZoomTransform(a,c.getCenter(),c.getZoom()),M(a.el.offsetWidth),this._onCreateLevel(a)),this._level=a,a}},_onUpdateLevel:M,_onRemoveLevel:M,_onCreateLevel:M,_pruneTiles:function(){if(this._map){var e,n,o=this._map.getZoom();if(o>this.options.maxZoom||o<this.options.minZoom){this._removeAllTiles();return}for(e in this._tiles)n=this._tiles[e],n.retain=n.current;for(e in this._tiles)if(n=this._tiles[e],n.current&&!n.active){var a=n.coords;this._retainParent(a.x,a.y,a.z,a.z-5)||this._retainChildren(a.x,a.y,a.z,a.z+2)}for(e in this._tiles)this._tiles[e].retain||this._removeTile(e)}},_removeTilesAtZoom:function(e){for(var n in this._tiles)this._tiles[n].coords.z===e&&this._removeTile(n)},_removeAllTiles:function(){for(var e in this._tiles)this._removeTile(e)},_invalidateAll:function(){for(var e in this._levels)yt(this._levels[e].el),this._onRemoveLevel(Number(e)),delete this._levels[e];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(e,n,o,a){var c=Math.floor(e/2),m=Math.floor(n/2),P=o-1,I=new se(+c,+m);I.z=+P;var N=this._tileCoordsToKey(I),J=this._tiles[N];return J&&J.active?(J.retain=!0,!0):(J&&J.loaded&&(J.retain=!0),P>a?this._retainParent(c,m,P,a):!1)},_retainChildren:function(e,n,o,a){for(var c=2*e;c<2*e+2;c++)for(var m=2*n;m<2*n+2;m++){var P=new se(c,m);P.z=o+1;var I=this._tileCoordsToKey(P),N=this._tiles[I];if(N&&N.active){N.retain=!0;continue}else N&&N.loaded&&(N.retain=!0);o+1<a&&this._retainChildren(c,m,o+1,a)}},_resetView:function(e){var n=e&&(e.pinch||e.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),n,n)},_animateZoom:function(e){this._setView(e.center,e.zoom,!0,e.noUpdate)},_clampZoom:function(e){var n=this.options;return n.minNativeZoom!==void 0&&e<n.minNativeZoom?n.minNativeZoom:n.maxNativeZoom!==void 0&&n.maxNativeZoom<e?n.maxNativeZoom:e},_setView:function(e,n,o,a){var c=Math.round(n);this.options.maxZoom!==void 0&&c>this.options.maxZoom||this.options.minZoom!==void 0&&c<this.options.minZoom?c=void 0:c=this._clampZoom(c);var m=this.options.updateWhenZooming&&c!==this._tileZoom;(!a||m)&&(this._tileZoom=c,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),c!==void 0&&this._update(e),o||this._pruneTiles(),this._noPrune=!!o),this._setZoomTransforms(e,n)},_setZoomTransforms:function(e,n){for(var o in this._levels)this._setZoomTransform(this._levels[o],e,n)},_setZoomTransform:function(e,n,o){var a=this._map.getZoomScale(o,e.zoom),c=e.origin.multiplyBy(a).subtract(this._map._getNewPixelOrigin(n,o)).round();Le.any3d?_n(e.el,c,a):xt(e.el,c)},_resetGrid:function(){var e=this._map,n=e.options.crs,o=this._tileSize=this.getTileSize(),a=this._tileZoom,c=this._map.getPixelWorldBounds(this._tileZoom);c&&(this._globalTileRange=this._pxBoundsToTileRange(c)),this._wrapX=n.wrapLng&&!this.options.noWrap&&[Math.floor(e.project([0,n.wrapLng[0]],a).x/o.x),Math.ceil(e.project([0,n.wrapLng[1]],a).x/o.y)],this._wrapY=n.wrapLat&&!this.options.noWrap&&[Math.floor(e.project([n.wrapLat[0],0],a).y/o.x),Math.ceil(e.project([n.wrapLat[1],0],a).y/o.y)]},_onMoveEnd:function(){!this._map||this._map._animatingZoom||this._update()},_getTiledPixelBounds:function(e){var n=this._map,o=n._animatingZoom?Math.max(n._animateToZoom,n.getZoom()):n.getZoom(),a=n.getZoomScale(o,this._tileZoom),c=n.project(e,this._tileZoom).floor(),m=n.getSize().divideBy(a*2);return new be(c.subtract(m),c.add(m))},_update:function(e){var n=this._map;if(n){var o=this._clampZoom(n.getZoom());if(e===void 0&&(e=n.getCenter()),this._tileZoom!==void 0){var a=this._getTiledPixelBounds(e),c=this._pxBoundsToTileRange(a),m=c.getCenter(),P=[],I=this.options.keepBuffer,N=new be(c.getBottomLeft().subtract([I,-I]),c.getTopRight().add([I,-I]));if(!(isFinite(c.min.x)&&isFinite(c.min.y)&&isFinite(c.max.x)&&isFinite(c.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var J in this._tiles){var ge=this._tiles[J].coords;(ge.z!==this._tileZoom||!N.contains(new se(ge.x,ge.y)))&&(this._tiles[J].current=!1)}if(Math.abs(o-this._tileZoom)>1){this._setView(e,o);return}for(var Re=c.min.y;Re<=c.max.y;Re++)for(var Qe=c.min.x;Qe<=c.max.x;Qe++){var qt=new se(Qe,Re);if(qt.z=this._tileZoom,!!this._isValidTile(qt)){var zt=this._tiles[this._tileCoordsToKey(qt)];zt?zt.current=!0:P.push(qt)}}if(P.sort(function(ln,Eo){return ln.distanceTo(m)-Eo.distanceTo(m)}),P.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var kn=document.createDocumentFragment();for(Qe=0;Qe<P.length;Qe++)this._addTile(P[Qe],kn);this._level.el.appendChild(kn)}}}},_isValidTile:function(e){var n=this._map.options.crs;if(!n.infinite){var o=this._globalTileRange;if(!n.wrapLng&&(e.x<o.min.x||e.x>o.max.x)||!n.wrapLat&&(e.y<o.min.y||e.y>o.max.y))return!1}if(!this.options.bounds)return!0;var a=this._tileCoordsToBounds(e);return at(this.options.bounds).overlaps(a)},_keyToBounds:function(e){return this._tileCoordsToBounds(this._keyToTileCoords(e))},_tileCoordsToNwSe:function(e){var n=this._map,o=this.getTileSize(),a=e.scaleBy(o),c=a.add(o),m=n.unproject(a,e.z),P=n.unproject(c,e.z);return[m,P]},_tileCoordsToBounds:function(e){var n=this._tileCoordsToNwSe(e),o=new dt(n[0],n[1]);return this.options.noWrap||(o=this._map.wrapLatLngBounds(o)),o},_tileCoordsToKey:function(e){return e.x+":"+e.y+":"+e.z},_keyToTileCoords:function(e){var n=e.split(":"),o=new se(+n[0],+n[1]);return o.z=+n[2],o},_removeTile:function(e){var n=this._tiles[e];n&&(yt(n.el),delete this._tiles[e],this.fire("tileunload",{tile:n.el,coords:this._keyToTileCoords(e)}))},_initTile:function(e){qe(e,"leaflet-tile");var n=this.getTileSize();e.style.width=n.x+"px",e.style.height=n.y+"px",e.onselectstart=M,e.onmousemove=M,Le.ielt9&&this.options.opacity<1&&At(e,this.options.opacity)},_addTile:function(e,n){var o=this._getTilePos(e),a=this._tileCoordsToKey(e),c=this.createTile(this._wrapCoords(e),h(this._tileReady,this,e));this._initTile(c),this.createTile.length<2&&ze(h(this._tileReady,this,e,null,c)),xt(c,o),this._tiles[a]={el:c,coords:e,current:!0},n.appendChild(c),this.fire("tileloadstart",{tile:c,coords:e})},_tileReady:function(e,n,o){n&&this.fire("tileerror",{error:n,tile:o,coords:e});var a=this._tileCoordsToKey(e);o=this._tiles[a],o&&(o.loaded=+new Date,this._map._fadeAnimated?(At(o.el,0),ne(this._fadeFrame),this._fadeFrame=ze(this._updateOpacity,this)):(o.active=!0,this._pruneTiles()),n||(qe(o.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:o.el,coords:e})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Le.ielt9||!this._map._fadeAnimated?ze(this._pruneTiles,this):setTimeout(h(this._pruneTiles,this),250)))},_getTilePos:function(e){return e.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(e){var n=new se(this._wrapX?T(e.x,this._wrapX):e.x,this._wrapY?T(e.y,this._wrapY):e.y);return n.z=e.z,n},_pxBoundsToTileRange:function(e){var n=this.getTileSize();return new be(e.min.unscaleBy(n).floor(),e.max.unscaleBy(n).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var e in this._tiles)if(!this._tiles[e].loaded)return!1;return!0}});function Xc(e){return new ds(e)}var Ao=ds.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(e,n){this._url=e,n=F(this,n),n.detectRetina&&Le.retina&&n.maxZoom>0?(n.tileSize=Math.floor(n.tileSize/2),n.zoomReverse?(n.zoomOffset--,n.minZoom=Math.min(n.maxZoom,n.minZoom+1)):(n.zoomOffset++,n.maxZoom=Math.max(n.minZoom,n.maxZoom-1)),n.minZoom=Math.max(0,n.minZoom)):n.zoomReverse?n.minZoom=Math.min(n.maxZoom,n.minZoom):n.maxZoom=Math.max(n.minZoom,n.maxZoom),typeof n.subdomains=="string"&&(n.subdomains=n.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(e,n){return this._url===e&&n===void 0&&(n=!0),this._url=e,n||this.redraw(),this},createTile:function(e,n){var o=document.createElement("img");return Ke(o,"load",h(this._tileOnLoad,this,n,o)),Ke(o,"error",h(this._tileOnError,this,n,o)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(o.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(o.referrerPolicy=this.options.referrerPolicy),o.alt="",o.src=this.getTileUrl(e),o},getTileUrl:function(e){var n={r:Le.retina?"@2x":"",s:this._getSubdomain(e),x:e.x,y:e.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var o=this._globalTileRange.max.y-e.y;this.options.tms&&(n.y=o),n["-y"]=o}return q(this._url,u(n,this.options))},_tileOnLoad:function(e,n){Le.ielt9?setTimeout(h(e,this,null,n),0):e(null,n)},_tileOnError:function(e,n,o){var a=this.options.errorTileUrl;a&&n.getAttribute("src")!==a&&(n.src=a),e(o,n)},_onTileRemove:function(e){e.tile.onload=null},_getZoomForUrl:function(){var e=this._tileZoom,n=this.options.maxZoom,o=this.options.zoomReverse,a=this.options.zoomOffset;return o&&(e=n-e),e+a},_getSubdomain:function(e){var n=Math.abs(e.x+e.y)%this.options.subdomains.length;return this.options.subdomains[n]},_abortLoading:function(){var e,n;for(e in this._tiles)if(this._tiles[e].coords.z!==this._tileZoom&&(n=this._tiles[e].el,n.onload=M,n.onerror=M,!n.complete)){n.src=Ue;var o=this._tiles[e].coords;yt(n),delete this._tiles[e],this.fire("tileabort",{tile:n,coords:o})}},_removeTile:function(e){var n=this._tiles[e];if(n)return n.el.setAttribute("src",Ue),ds.prototype._removeTile.call(this,e)},_tileReady:function(e,n,o){if(!(!this._map||o&&o.getAttribute("src")===Ue))return ds.prototype._tileReady.call(this,e,n,o)}});function nl(e,n){return new Ao(e,n)}var il=Ao.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(e,n){this._url=e;var o=u({},this.defaultWmsParams);for(var a in n)a in this.options||(o[a]=n[a]);n=F(this,n);var c=n.detectRetina&&Le.retina?2:1,m=this.getTileSize();o.width=m.x*c,o.height=m.y*c,this.wmsParams=o},onAdd:function(e){this._crs=this.options.crs||e.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var n=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[n]=this._crs.code,Ao.prototype.onAdd.call(this,e)},getTileUrl:function(e){var n=this._tileCoordsToNwSe(e),o=this._crs,a=Ne(o.project(n[0]),o.project(n[1])),c=a.min,m=a.max,P=(this._wmsVersion>=1.3&&this._crs===Qi?[c.y,c.x,m.y,m.x]:[c.x,c.y,m.x,m.y]).join(","),I=Ao.prototype.getTileUrl.call(this,e);return I+he(this.wmsParams,I,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+P},setParams:function(e,n){return u(this.wmsParams,e),n||this.redraw(),this}});function Qc(e,n){return new il(e,n)}Ao.WMS=il,nl.wms=Qc;var oi=Ht.extend({options:{padding:.1},initialize:function(e){F(this,e),b(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),qe(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var e={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(e.zoomanim=this._onAnimZoom),e},_onAnimZoom:function(e){this._updateTransform(e.center,e.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(e,n){var o=this._map.getZoomScale(n,this._zoom),a=this._map.getSize().multiplyBy(.5+this.options.padding),c=this._map.project(this._center,n),m=a.multiplyBy(-o).add(c).subtract(this._map._getNewPixelOrigin(e,n));Le.any3d?_n(this._container,m,o):xt(this._container,m)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var e in this._layers)this._layers[e]._reset()},_onZoomEnd:function(){for(var e in this._layers)this._layers[e]._project()},_updatePaths:function(){for(var e in this._layers)this._layers[e]._update()},_update:function(){var e=this.options.padding,n=this._map.getSize(),o=this._map.containerPointToLayerPoint(n.multiplyBy(-e)).round();this._bounds=new be(o,o.add(n.multiplyBy(1+e*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),ol=oi.extend({options:{tolerance:0},getEvents:function(){var e=oi.prototype.getEvents.call(this);return e.viewprereset=this._onViewPreReset,e},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){oi.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var e=this._container=document.createElement("canvas");Ke(e,"mousemove",this._onMouseMove,this),Ke(e,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ke(e,"mouseout",this._handleMouseOut,this),e._leaflet_disable_events=!0,this._ctx=e.getContext("2d")},_destroyContainer:function(){ne(this._redrawRequest),delete this._ctx,yt(this._container),mt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var e;this._redrawBounds=null;for(var n in this._layers)e=this._layers[n],e._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){oi.prototype._update.call(this);var e=this._bounds,n=this._container,o=e.getSize(),a=Le.retina?2:1;xt(n,e.min),n.width=a*o.x,n.height=a*o.y,n.style.width=o.x+"px",n.style.height=o.y+"px",Le.retina&&this._ctx.scale(2,2),this._ctx.translate(-e.min.x,-e.min.y),this.fire("update")}},_reset:function(){oi.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(e){this._updateDashArray(e),this._layers[b(e)]=e;var n=e._order={layer:e,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=n),this._drawLast=n,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(e){this._requestRedraw(e)},_removePath:function(e){var n=e._order,o=n.next,a=n.prev;o?o.prev=a:this._drawLast=a,a?a.next=o:this._drawFirst=o,delete e._order,delete this._layers[b(e)],this._requestRedraw(e)},_updatePath:function(e){this._extendRedrawBounds(e),e._project(),e._update(),this._requestRedraw(e)},_updateStyle:function(e){this._updateDashArray(e),this._requestRedraw(e)},_updateDashArray:function(e){if(typeof e.options.dashArray=="string"){var n=e.options.dashArray.split(/[, ]+/),o=[],a,c;for(c=0;c<n.length;c++){if(a=Number(n[c]),isNaN(a))return;o.push(a)}e.options._dashArray=o}else e.options._dashArray=e.options.dashArray},_requestRedraw:function(e){this._map&&(this._extendRedrawBounds(e),this._redrawRequest=this._redrawRequest||ze(this._redraw,this))},_extendRedrawBounds:function(e){if(e._pxBounds){var n=(e.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new be,this._redrawBounds.extend(e._pxBounds.min.subtract([n,n])),this._redrawBounds.extend(e._pxBounds.max.add([n,n]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var e=this._redrawBounds;if(e){var n=e.getSize();this._ctx.clearRect(e.min.x,e.min.y,n.x,n.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var e,n=this._redrawBounds;if(this._ctx.save(),n){var o=n.getSize();this._ctx.beginPath(),this._ctx.rect(n.min.x,n.min.y,o.x,o.y),this._ctx.clip()}this._drawing=!0;for(var a=this._drawFirst;a;a=a.next)e=a.layer,(!n||e._pxBounds&&e._pxBounds.intersects(n))&&e._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(e,n){if(this._drawing){var o,a,c,m,P=e._parts,I=P.length,N=this._ctx;if(I){for(N.beginPath(),o=0;o<I;o++){for(a=0,c=P[o].length;a<c;a++)m=P[o][a],N[a?"lineTo":"moveTo"](m.x,m.y);n&&N.closePath()}this._fillStroke(N,e)}}},_updateCircle:function(e){if(!(!this._drawing||e._empty())){var n=e._point,o=this._ctx,a=Math.max(Math.round(e._radius),1),c=(Math.max(Math.round(e._radiusY),1)||a)/a;c!==1&&(o.save(),o.scale(1,c)),o.beginPath(),o.arc(n.x,n.y/c,a,0,Math.PI*2,!1),c!==1&&o.restore(),this._fillStroke(o,e)}},_fillStroke:function(e,n){var o=n.options;o.fill&&(e.globalAlpha=o.fillOpacity,e.fillStyle=o.fillColor||o.color,e.fill(o.fillRule||"evenodd")),o.stroke&&o.weight!==0&&(e.setLineDash&&e.setLineDash(n.options&&n.options._dashArray||[]),e.globalAlpha=o.opacity,e.lineWidth=o.weight,e.strokeStyle=o.color,e.lineCap=o.lineCap,e.lineJoin=o.lineJoin,e.stroke())},_onClick:function(e){for(var n=this._map.mouseEventToLayerPoint(e),o,a,c=this._drawFirst;c;c=c.next)o=c.layer,o.options.interactive&&o._containsPoint(n)&&(!(e.type==="click"||e.type==="preclick")||!this._map._draggableMoved(o))&&(a=o);this._fireEvent(a?[a]:!1,e)},_onMouseMove:function(e){if(!(!this._map||this._map.dragging.moving()||this._map._animatingZoom)){var n=this._map.mouseEventToLayerPoint(e);this._handleMouseHover(e,n)}},_handleMouseOut:function(e){var n=this._hoveredLayer;n&&(Tt(this._container,"leaflet-interactive"),this._fireEvent([n],e,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(e,n){if(!this._mouseHoverThrottled){for(var o,a,c=this._drawFirst;c;c=c.next)o=c.layer,o.options.interactive&&o._containsPoint(n)&&(a=o);a!==this._hoveredLayer&&(this._handleMouseOut(e),a&&(qe(this._container,"leaflet-interactive"),this._fireEvent([a],e,"mouseover"),this._hoveredLayer=a)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,e),this._mouseHoverThrottled=!0,setTimeout(h(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(e,n,o){this._map._fireDOMEvent(n,o||n.type,e)},_bringToFront:function(e){var n=e._order;if(n){var o=n.next,a=n.prev;if(o)o.prev=a;else return;a?a.next=o:o&&(this._drawFirst=o),n.prev=this._drawLast,this._drawLast.next=n,n.next=null,this._drawLast=n,this._requestRedraw(e)}},_bringToBack:function(e){var n=e._order;if(n){var o=n.next,a=n.prev;if(a)a.next=o;else return;o?o.prev=a:a&&(this._drawLast=a),n.prev=null,n.next=this._drawFirst,this._drawFirst.prev=n,this._drawFirst=n,this._requestRedraw(e)}}});function sl(e){return Le.canvas?new ol(e):null}var fs=(function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(e){return document.createElement("<lvml:"+e+' class="lvml">')}}catch{}return function(e){return document.createElement("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}})(),ed={_initContainer:function(){this._container=tt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(oi.prototype._update.call(this),this.fire("update"))},_initPath:function(e){var n=e._container=fs("shape");qe(n,"leaflet-vml-shape "+(this.options.className||"")),n.coordsize="1 1",e._path=fs("path"),n.appendChild(e._path),this._updateStyle(e),this._layers[b(e)]=e},_addPath:function(e){var n=e._container;this._container.appendChild(n),e.options.interactive&&e.addInteractiveTarget(n)},_removePath:function(e){var n=e._container;yt(n),e.removeInteractiveTarget(n),delete this._layers[b(e)]},_updateStyle:function(e){var n=e._stroke,o=e._fill,a=e.options,c=e._container;c.stroked=!!a.stroke,c.filled=!!a.fill,a.stroke?(n||(n=e._stroke=fs("stroke")),c.appendChild(n),n.weight=a.weight+"px",n.color=a.color,n.opacity=a.opacity,a.dashArray?n.dashStyle=Te(a.dashArray)?a.dashArray.join(" "):a.dashArray.replace(/( *, *)/g," "):n.dashStyle="",n.endcap=a.lineCap.replace("butt","flat"),n.joinstyle=a.lineJoin):n&&(c.removeChild(n),e._stroke=null),a.fill?(o||(o=e._fill=fs("fill")),c.appendChild(o),o.color=a.fillColor||a.color,o.opacity=a.fillOpacity):o&&(c.removeChild(o),e._fill=null)},_updateCircle:function(e){var n=e._point.round(),o=Math.round(e._radius),a=Math.round(e._radiusY||o);this._setPath(e,e._empty()?"M0 0":"AL "+n.x+","+n.y+" "+o+","+a+" 0,"+65535*360)},_setPath:function(e,n){e._path.v=n},_bringToFront:function(e){bi(e._container)},_bringToBack:function(e){yi(e._container)}},sa=Le.vml?fs:K,hs=oi.extend({_initContainer:function(){this._container=sa("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=sa("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){yt(this._container),mt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){oi.prototype._update.call(this);var e=this._bounds,n=e.getSize(),o=this._container;(!this._svgSize||!this._svgSize.equals(n))&&(this._svgSize=n,o.setAttribute("width",n.x),o.setAttribute("height",n.y)),xt(o,e.min),o.setAttribute("viewBox",[e.min.x,e.min.y,n.x,n.y].join(" ")),this.fire("update")}},_initPath:function(e){var n=e._path=sa("path");e.options.className&&qe(n,e.options.className),e.options.interactive&&qe(n,"leaflet-interactive"),this._updateStyle(e),this._layers[b(e)]=e},_addPath:function(e){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(e._path),e.addInteractiveTarget(e._path)},_removePath:function(e){yt(e._path),e.removeInteractiveTarget(e._path),delete this._layers[b(e)]},_updatePath:function(e){e._project(),e._update()},_updateStyle:function(e){var n=e._path,o=e.options;n&&(o.stroke?(n.setAttribute("stroke",o.color),n.setAttribute("stroke-opacity",o.opacity),n.setAttribute("stroke-width",o.weight),n.setAttribute("stroke-linecap",o.lineCap),n.setAttribute("stroke-linejoin",o.lineJoin),o.dashArray?n.setAttribute("stroke-dasharray",o.dashArray):n.removeAttribute("stroke-dasharray"),o.dashOffset?n.setAttribute("stroke-dashoffset",o.dashOffset):n.removeAttribute("stroke-dashoffset")):n.setAttribute("stroke","none"),o.fill?(n.setAttribute("fill",o.fillColor||o.color),n.setAttribute("fill-opacity",o.fillOpacity),n.setAttribute("fill-rule",o.fillRule||"evenodd")):n.setAttribute("fill","none"))},_updatePoly:function(e,n){this._setPath(e,H(e._parts,n))},_updateCircle:function(e){var n=e._point,o=Math.max(Math.round(e._radius),1),a=Math.max(Math.round(e._radiusY),1)||o,c="a"+o+","+a+" 0 1,0 ",m=e._empty()?"M0 0":"M"+(n.x-o)+","+n.y+c+o*2+",0 "+c+-o*2+",0 ";this._setPath(e,m)},_setPath:function(e,n){e._path.setAttribute("d",n)},_bringToFront:function(e){bi(e._path)},_bringToBack:function(e){yi(e._path)}});Le.vml&&hs.include(ed);function al(e){return Le.svg||Le.vml?new hs(e):null}nt.include({getRenderer:function(e){var n=e.options.renderer||this._getPaneRenderer(e.options.pane)||this.options.renderer||this._renderer;return n||(n=this._renderer=this._createRenderer()),this.hasLayer(n)||this.addLayer(n),n},_getPaneRenderer:function(e){if(e==="overlayPane"||e===void 0)return!1;var n=this._paneRenderers[e];return n===void 0&&(n=this._createRenderer({pane:e}),this._paneRenderers[e]=n),n},_createRenderer:function(e){return this.options.preferCanvas&&sl(e)||al(e)}});var rl=Li.extend({initialize:function(e,n){Li.prototype.initialize.call(this,this._boundsToLatLngs(e),n)},setBounds:function(e){return this.setLatLngs(this._boundsToLatLngs(e))},_boundsToLatLngs:function(e){return e=at(e),[e.getSouthWest(),e.getNorthWest(),e.getNorthEast(),e.getSouthEast()]}});function td(e,n){return new rl(e,n)}hs.create=sa,hs.pointsToPath=H,f.geometryToLayer=j,f.coordsToLatLng=Xe,f.coordsToLatLngs=Qs,f.latLngToCoords=Xa,f.latLngsToCoords=ea,f.getFeature=Mo,f.asFeature=ta,nt.mergeOptions({boxZoom:!0});var ll=xn.extend({initialize:function(e){this._map=e,this._container=e._container,this._pane=e._panes.overlayPane,this._resetStateTimeout=0,e.on("unload",this._destroy,this)},addHooks:function(){Ke(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){mt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){yt(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(e){if(!e.shiftKey||e.which!==1&&e.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),bn(),Ri(),this._startPoint=this._map.mouseEventToContainerPoint(e),Ke(document,{contextmenu:En,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(e){this._moved||(this._moved=!0,this._box=tt("div","leaflet-zoom-box",this._container),qe(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(e);var n=new be(this._point,this._startPoint),o=n.getSize();xt(this._box,n.min),this._box.style.width=o.x+"px",this._box.style.height=o.y+"px"},_finish:function(){this._moved&&(yt(this._box),Tt(this._container,"leaflet-crosshair")),An(),es(),mt(document,{contextmenu:En,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(e){if(!(e.which!==1&&e.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(h(this._resetState,this),0);var n=new dt(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(n).fire("boxzoomend",{boxZoomBounds:n})}},_onKeyDown:function(e){e.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});nt.addInitHook("addHandler","boxZoom",ll),nt.mergeOptions({doubleClickZoom:!0});var ul=xn.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(e){var n=this._map,o=n.getZoom(),a=n.options.zoomDelta,c=e.originalEvent.shiftKey?o-a:o+a;n.options.doubleClickZoom==="center"?n.setZoom(c):n.setZoomAround(e.containerPoint,c)}});nt.addInitHook("addHandler","doubleClickZoom",ul),nt.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var cl=xn.extend({addHooks:function(){if(!this._draggable){var e=this._map;this._draggable=new Rn(e._mapPane,e._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),e.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),e.on("zoomend",this._onZoomEnd,this),e.whenReady(this._onZoomEnd,this))}qe(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Tt(this._map._container,"leaflet-grab"),Tt(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var e=this._map;if(e._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var n=at(this._map.options.maxBounds);this._offsetLimit=Ne(this._map.latLngToContainerPoint(n.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(n.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;e.fire("movestart").fire("dragstart"),e.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(e){if(this._map.options.inertia){var n=this._lastTime=+new Date,o=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(o),this._times.push(n),this._prunePositions(n)}this._map.fire("move",e).fire("drag",e)},_prunePositions:function(e){for(;this._positions.length>1&&e-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var e=this._map.getSize().divideBy(2),n=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=n.subtract(e).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(e,n){return e-(e-n)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var e=this._draggable._newPos.subtract(this._draggable._startPos),n=this._offsetLimit;e.x<n.min.x&&(e.x=this._viscousLimit(e.x,n.min.x)),e.y<n.min.y&&(e.y=this._viscousLimit(e.y,n.min.y)),e.x>n.max.x&&(e.x=this._viscousLimit(e.x,n.max.x)),e.y>n.max.y&&(e.y=this._viscousLimit(e.y,n.max.y)),this._draggable._newPos=this._draggable._startPos.add(e)}},_onPreDragWrap:function(){var e=this._worldWidth,n=Math.round(e/2),o=this._initialWorldOffset,a=this._draggable._newPos.x,c=(a-n+o)%e+n-o,m=(a+n+o)%e-n-o,P=Math.abs(c+o)<Math.abs(m+o)?c:m;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=P},_onDragEnd:function(e){var n=this._map,o=n.options,a=!o.inertia||e.noInertia||this._times.length<2;if(n.fire("dragend",e),a)n.fire("moveend");else{this._prunePositions(+new Date);var c=this._lastPos.subtract(this._positions[0]),m=(this._lastTime-this._times[0])/1e3,P=o.easeLinearity,I=c.multiplyBy(P/m),N=I.distanceTo([0,0]),J=Math.min(o.inertiaMaxSpeed,N),ge=I.multiplyBy(J/N),Re=J/(o.inertiaDeceleration*P),Qe=ge.multiplyBy(-Re/2).round();!Qe.x&&!Qe.y?n.fire("moveend"):(Qe=n._limitOffset(Qe,n.options.maxBounds),ze(function(){n.panBy(Qe,{duration:Re,easeLinearity:P,noMoveStart:!0,animate:!0})}))}}});nt.addInitHook("addHandler","dragging",cl),nt.mergeOptions({keyboard:!0,keyboardPanDelta:80});var dl=xn.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(e){this._map=e,this._setPanDelta(e.options.keyboardPanDelta),this._setZoomDelta(e.options.zoomDelta)},addHooks:function(){var e=this._map._container;e.tabIndex<=0&&(e.tabIndex="0"),Ke(e,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),mt(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var e=document.body,n=document.documentElement,o=e.scrollTop||n.scrollTop,a=e.scrollLeft||n.scrollLeft;this._map._container.focus(),window.scrollTo(a,o)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(e){var n=this._panKeys={},o=this.keyCodes,a,c;for(a=0,c=o.left.length;a<c;a++)n[o.left[a]]=[-1*e,0];for(a=0,c=o.right.length;a<c;a++)n[o.right[a]]=[e,0];for(a=0,c=o.down.length;a<c;a++)n[o.down[a]]=[0,e];for(a=0,c=o.up.length;a<c;a++)n[o.up[a]]=[0,-1*e]},_setZoomDelta:function(e){var n=this._zoomKeys={},o=this.keyCodes,a,c;for(a=0,c=o.zoomIn.length;a<c;a++)n[o.zoomIn[a]]=e;for(a=0,c=o.zoomOut.length;a<c;a++)n[o.zoomOut[a]]=-e},_addHooks:function(){Ke(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){mt(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(e){if(!(e.altKey||e.ctrlKey||e.metaKey)){var n=e.keyCode,o=this._map,a;if(n in this._panKeys){if(!o._panAnim||!o._panAnim._inProgress)if(a=this._panKeys[n],e.shiftKey&&(a=ee(a).multiplyBy(3)),o.options.maxBounds&&(a=o._limitOffset(ee(a),o.options.maxBounds)),o.options.worldCopyJump){var c=o.wrapLatLng(o.unproject(o.project(o.getCenter()).add(a)));o.panTo(c)}else o.panBy(a)}else if(n in this._zoomKeys)o.setZoom(o.getZoom()+(e.shiftKey?3:1)*this._zoomKeys[n]);else if(n===27&&o._popup&&o._popup.options.closeOnEscapeKey)o.closePopup();else return;En(e)}}});nt.addInitHook("addHandler","keyboard",dl),nt.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var fl=xn.extend({addHooks:function(){Ke(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){mt(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(e){var n=it(e),o=this._map.options.wheelDebounceTime;this._delta+=n,this._lastMousePos=this._map.mouseEventToContainerPoint(e),this._startTime||(this._startTime=+new Date);var a=Math.max(o-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(h(this._performZoom,this),a),En(e)},_performZoom:function(){var e=this._map,n=e.getZoom(),o=this._map.options.zoomSnap||0;e._stop();var a=this._delta/(this._map.options.wheelPxPerZoomLevel*4),c=4*Math.log(2/(1+Math.exp(-Math.abs(a))))/Math.LN2,m=o?Math.ceil(c/o)*o:c,P=e._limitZoom(n+(this._delta>0?m:-m))-n;this._delta=0,this._startTime=null,P&&(e.options.scrollWheelZoom==="center"?e.setZoom(n+P):e.setZoomAround(this._lastMousePos,n+P))}});nt.addInitHook("addHandler","scrollWheelZoom",fl);var nd=600;nt.mergeOptions({tapHold:Le.touchNative&&Le.safari&&Le.mobile,tapTolerance:15});var hl=xn.extend({addHooks:function(){Ke(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){mt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(e){if(clearTimeout(this._holdTimeout),e.touches.length===1){var n=e.touches[0];this._startPos=this._newPos=new se(n.clientX,n.clientY),this._holdTimeout=setTimeout(h(function(){this._cancel(),this._isTapValid()&&(Ke(document,"touchend",Et),Ke(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",n))},this),nd),Ke(document,"touchend touchcancel contextmenu",this._cancel,this),Ke(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function e(){mt(document,"touchend",Et),mt(document,"touchend touchcancel",e)},_cancel:function(){clearTimeout(this._holdTimeout),mt(document,"touchend touchcancel contextmenu",this._cancel,this),mt(document,"touchmove",this._onMove,this)},_onMove:function(e){var n=e.touches[0];this._newPos=new se(n.clientX,n.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(e,n){var o=new MouseEvent(e,{bubbles:!0,cancelable:!0,view:window,screenX:n.screenX,screenY:n.screenY,clientX:n.clientX,clientY:n.clientY});o._simulated=!0,n.target.dispatchEvent(o)}});nt.addInitHook("addHandler","tapHold",hl),nt.mergeOptions({touchZoom:Le.touch,bounceAtZoomLimits:!0});var pl=xn.extend({addHooks:function(){qe(this._map._container,"leaflet-touch-zoom"),Ke(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Tt(this._map._container,"leaflet-touch-zoom"),mt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(e){var n=this._map;if(!(!e.touches||e.touches.length!==2||n._animatingZoom||this._zooming)){var o=n.mouseEventToContainerPoint(e.touches[0]),a=n.mouseEventToContainerPoint(e.touches[1]);this._centerPoint=n.getSize()._divideBy(2),this._startLatLng=n.containerPointToLatLng(this._centerPoint),n.options.touchZoom!=="center"&&(this._pinchStartLatLng=n.containerPointToLatLng(o.add(a)._divideBy(2))),this._startDist=o.distanceTo(a),this._startZoom=n.getZoom(),this._moved=!1,this._zooming=!0,n._stop(),Ke(document,"touchmove",this._onTouchMove,this),Ke(document,"touchend touchcancel",this._onTouchEnd,this),Et(e)}},_onTouchMove:function(e){if(!(!e.touches||e.touches.length!==2||!this._zooming)){var n=this._map,o=n.mouseEventToContainerPoint(e.touches[0]),a=n.mouseEventToContainerPoint(e.touches[1]),c=o.distanceTo(a)/this._startDist;if(this._zoom=n.getScaleZoom(c,this._startZoom),!n.options.bounceAtZoomLimits&&(this._zoom<n.getMinZoom()&&c<1||this._zoom>n.getMaxZoom()&&c>1)&&(this._zoom=n._limitZoom(this._zoom)),n.options.touchZoom==="center"){if(this._center=this._startLatLng,c===1)return}else{var m=o._add(a)._divideBy(2)._subtract(this._centerPoint);if(c===1&&m.x===0&&m.y===0)return;this._center=n.unproject(n.project(this._pinchStartLatLng,this._zoom).subtract(m),this._zoom)}this._moved||(n._moveStart(!0,!1),this._moved=!0),ne(this._animRequest);var P=h(n._move,n,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=ze(P,this,!0),Et(e)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,ne(this._animRequest),mt(document,"touchmove",this._onTouchMove,this),mt(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});nt.addInitHook("addHandler","touchZoom",pl),nt.BoxZoom=ll,nt.DoubleClickZoom=ul,nt.Drag=cl,nt.Keyboard=dl,nt.ScrollWheelZoom=fl,nt.TapHold=hl,nt.TouchZoom=pl,s.Bounds=be,s.Browser=Le,s.CRS=A,s.Canvas=ol,s.Circle=ii,s.CircleMarker=Lo,s.Class=ie,s.Control=dn,s.DivIcon=tl,s.DivOverlay=Bn,s.DomEvent=ki,s.DomUtil=Ui,s.Draggable=Rn,s.Evented=ce,s.FeatureGroup=Bt,s.GeoJSON=f,s.GridLayer=ds,s.Handler=xn,s.Icon=ni,s.ImageOverlay=na,s.LatLng=Ze,s.LatLngBounds=dt,s.Layer=Ht,s.LayerGroup=wn,s.LineUtil=Po,s.Map=nt,s.Marker=Co,s.Mixin=Ka,s.Path=hn,s.Point=se,s.PolyUtil=Ki,s.Polygon=Li,s.Polyline=pn,s.Popup=ia,s.PosAnimation=ss,s.Projection=Xs,s.Rectangle=rl,s.Renderer=oi,s.SVG=hs,s.SVGOverlay=el,s.TileLayer=Ao,s.Tooltip=oa,s.Transformation=wt,s.Util=je,s.VideoOverlay=Qr,s.bind=h,s.bounds=Ne,s.canvas=sl,s.circle=cs,s.circleMarker=_t,s.control=Zi,s.divIcon=Jc,s.extend=u,s.featureGroup=ls,s.geoJSON=Xr,s.geoJson=jc,s.gridLayer=Xc,s.icon=qa,s.imageOverlay=Wc,s.latLng=Y,s.latLngBounds=at,s.layerGroup=zn,s.map=as,s.marker=Ya,s.point=ee,s.polygon=x,s.polyline=Ja,s.popup=qc,s.rectangle=td,s.setOptions=F,s.stamp=b,s.svg=al,s.svgOverlay=Gc,s.tileLayer=nl,s.tooltip=Yc,s.transformation=y,s.version=l,s.videoOverlay=Kc;var id=window.L;s.noConflict=function(){return window.L=id,this},window.L=s}))})(xs,xs.exports)),xs.exports}var sm=om();const Ai=nm(sm),mu={__name:"DeviceMap",props:{position:{type:Object,default:null},trail:{type:Array,default:()=>[]},aircraft:{type:Array,default:()=>[]}},setup(t){const i=t,s=W(null);let l,u,d,h;const v=new Map;function b(Z,F){const he=getComputedStyle(document.documentElement).getPropertyValue("--accent").trim()||"#3D7BF0",pe=F?"#8a94a6":he,q=typeof Z=="number"?Z:0;return Ai.divIcon({className:"plane-marker",iconSize:[22,22],iconAnchor:[11,11],html:`<svg viewBox="0 0 24 24" width="22" height="22" style="transform:rotate(${q}deg)"><path fill="${pe}" stroke="rgba(0,0,0,.35)" stroke-width="0.5" d="M12 2l1.4 6.9 7.6 4.3-.1 1.6-7.2-1.9-.4 4.8 2.1 1.5-.1 1.3L12 21l-3.3-.6-.1-1.3 2.1-1.5-.4-4.8-7.2 1.9-.1-1.6 7.6-4.3z"/></svg>`})}function C(Z){const he=[`<strong>${Z.callsign||Z.icao24||"aircraft"}</strong>`];return Z.country&&he.push(Z.country),typeof Z.altitude=="number"&&he.push(`${Math.round(Z.altitude)} m`),typeof Z.velocity=="number"&&he.push(`${Math.round(Z.velocity*3.6)} km/h`),Z.onGround&&he.push("on ground"),he.join(" · ")}function T(){if(!l)return;h||(h=Ai.layerGroup().addTo(l));const Z=new Set;for(const F of i.aircraft){if(typeof F.lat!="number"||typeof F.lng!="number")continue;Z.add(F.icao24);const he=[F.lat,F.lng];let pe=v.get(F.icao24);pe?(pe.setLatLng(he),pe.setIcon(b(F.heading,F.onGround)),pe.setTooltipContent(C(F))):(pe=Ai.marker(he,{icon:b(F.heading,F.onGround)}).bindTooltip(C(F)),pe.addTo(h),v.set(F.icao24,pe))}for(const[F,he]of v)Z.has(F)||(h.removeLayer(he),v.delete(F))}function M(){if(!l)return;const Z=i.position;if(Z&&(Z.lat||Z.lng)){const F=[Z.lat,Z.lng];u?u.setLatLng(F):(u=Ai.marker(F).addTo(l),l.setView(F,17))}if(d&&d.remove(),i.trail.length){const F=getComputedStyle(document.documentElement).getPropertyValue("--accent").trim()||"#3D7BF0";d=Ai.polyline(i.trail,{color:F,weight:3}).addTo(l)}}hi(()=>{l=Ai.map(s.value,{zoomControl:!0}).setView([20,0],2),Ai.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:"© OpenStreetMap",maxZoom:19}).addTo(l),setTimeout(()=>l.invalidateSize(),60),M(),T(),(!i.position||!i.position.lat&&!i.position.lng)&&i.aircraft.length&&B()});let R=!1;function B(){if(R||!l||!i.aircraft.length)return;const Z=i.aircraft.filter(F=>typeof F.lat=="number"&&typeof F.lng=="number").map(F=>[F.lat,F.lng]);Z.length&&(l.fitBounds(Ai.latLngBounds(Z).pad(.2)),R=!0)}return Ho(()=>{l&&l.remove(),l=null}),It(()=>i.position,M,{deep:!0}),It(()=>i.trail,M,{deep:!0}),It(()=>i.aircraft,()=>{T(),(!i.position||!i.position.lat&&!i.position.lng)&&B()},{deep:!0}),(Z,F)=>(p(),g("div",{ref_key:"el",ref:s,class:"h-[320px] w-full rounded-lg"},null,512))}},am=["width","height","stroke-width"],rm=["d"],X={__name:"Icon",props:{name:{type:String,required:!0},size:{type:[Number,String],default:18},stroke:{type:[Number,String],default:2}},setup(t){const l=({grid:"M3 3h7v7H3zM14 3h7v7h-7zM14 14h7v7h-7zM3 14h7v7H3z",radio:"M4.9 19.1a10 10 0 0 1 0-14.2M7.8 16.2a6 6 0 0 1 0-8.4M16.2 7.8a6 6 0 0 1 0 8.4M19.1 4.9a10 10 0 0 1 0 14.2M12 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2z",route:"M6 19a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM18 11a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM6 13V9a4 4 0 0 1 4-4h4",calendar:"M8 2v4M16 2v4M3 10h18M5 4h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z",book:"M4 19.5A2.5 2.5 0 0 1 6.5 17H20M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z",fileText:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8zM14 2v6h6M16 13H8M16 17H8M10 9H8",settings:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6z M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z",search:"M11 19a8 8 0 1 0 0-16 8 8 0 0 0 0 16zM21 21l-4.3-4.3",plus:"M12 5v14M5 12h14",battery:"M3 8h14a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2H3a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1zM22 11v2",signal:"M2 20h.01M7 20v-4M12 20v-8M17 20V8M22 20V4",clock:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zM12 7v5l3 2",chevronRight:"M9 6l6 6-6 6",play:"M6 3l14 9-14 9V3z",logout:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4M16 17l5-5-5-5M21 12H9",wind:"M12.8 19.6A2 2 0 1 0 14 16H2M17.5 8a2.5 2.5 0 1 1 2 4H2M9.6 4.6A2 2 0 1 1 11 8H2",drone:"M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8zM6 6 4 4M18 6l2-2M6 18l-2 2M18 18l2 2",user:"M20 21a8 8 0 1 0-16 0M12 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8z",users:"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM23 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75",shield:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z",sliders:"M4 21v-7M4 10V3M12 21v-9M12 8V3M20 21v-5M20 12V3M1 14h6M9 8h6M17 16h6",alertTriangle:"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0zM12 9v4M12 17h.01",download:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3",upload:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M17 8l-5-5-5 5M12 3v12",trash:"M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6M10 11v6M14 11v6",check:"M20 6 9 17l-5-5",mail:"M4 4h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2zM22 6l-10 7L2 6",lock:"M5 11h14a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-6a2 2 0 0 1 2-2zM7 11V7a5 5 0 0 1 10 0v4",monitor:"M3 4h18a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zM8 21h8M12 17v4",globe:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zM3 12h18M12 3a15 15 0 0 1 0 18 15 15 0 0 1 0-18z",smartphone:"M7 2h10a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1zM11 18h2",image:"M4 4h16a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zM8.5 11a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3zM21 15l-5-5L5 21",eye:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7z M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6z",type:"M4 7V4h16v3M9 20h6M12 4v16",sun:"M12 17a5 5 0 1 0 0-10 5 5 0 0 0 0 10zM12 1v2M12 21v2M4.2 4.2l1.4 1.4M18.4 18.4l1.4 1.4M1 12h2M21 12h2M4.2 19.8l1.4-1.4M18.4 5.6l1.4-1.4",moon:"M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z",x:"M18 6 6 18M6 6l12 12",server:"M20 4H4a2 2 0 0 0-2 2v3a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zM20 13H4a2 2 0 0 0-2 2v3a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2zM6 7.5h.01M6 16.5h.01",cloud:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9z"}[t.name]||"").split(" M").map((u,d)=>d?"M"+u:u);return(u,d)=>(p(),g("svg",{width:t.size,height:t.size,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":t.stroke,"stroke-linecap":"round","stroke-linejoin":"round",style:{flex:"none"},"aria-hidden":"true"},[(p(!0),g(ue,null,Be(Oe(l),(h,v)=>(p(),g("path",{key:v,d:h},null,8,rm))),128))],8,am))}},lm=["aria-checked","disabled"],un={__name:"Toggle",props:{modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:i}){const s=i;return(l,u)=>(p(),g("button",{type:"button",role:"switch","aria-checked":t.modelValue,disabled:t.disabled,class:Ee(["relative inline-flex h-6 w-11 shrink-0 items-center rounded-full transition disabled:opacity-40",t.modelValue?"bg-accent":"bg-surface-2 border border-line-strong"]),onClick:u[0]||(u[0]=d=>s("update:modelValue",!t.modelValue))},[r("span",{class:Ee(["inline-block h-4 w-4 transform rounded-full bg-white shadow-sm transition",t.modelValue?"translate-x-6":"translate-x-1"])},null,2)],10,lm))}},um={class:"inline-flex rounded-[10px] border border-line bg-surface-2 p-0.5"},cm=["onClick"],Tn={__name:"Segmented",props:{modelValue:{type:[String,Number],default:""},options:{type:Array,default:()=>[]}},emits:["update:modelValue"],setup(t,{emit:i}){const s=i;return(l,u)=>(p(),g("div",um,[(p(!0),g(ue,null,Be(t.options,d=>(p(),g("button",{key:d.value,type:"button",class:Ee(["inline-flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-[13px] font-semibold transition",t.modelValue===d.value?"bg-surface-1 text-ink shadow-xs":"text-ink-secondary hover:text-ink"]),onClick:h=>s("update:modelValue",d.value)},[d.icon?(p(),lt(X,{key:0,name:d.icon,size:15},null,8,["name"])):D("",!0),$(" "+k(d.label),1)],10,cm))),128))]))}},dm={class:"text-sm font-semibold text-ink"},fm={key:0,class:"mt-0.5 text-xs text-ink-muted"},Ae={__name:"Row",props:{title:{type:String,default:""},desc:{type:String,default:""},keywords:{type:String,default:""},block:{type:Boolean,default:!1}},setup(t){const i=t,s=Ts("settingsSearch",{value:""}),l=we(()=>{const u=(s.value||"").trim().toLowerCase();return u?`${i.title} ${i.desc} ${i.keywords}`.toLowerCase().includes(u):!0});return(u,d)=>l.value?(p(),g("div",{key:0,class:Ee(["border-b border-line py-4 last:border-0",t.block?"":"flex items-center justify-between gap-6"])},[r("div",{class:Ee(t.block?"mb-3":"min-w-0")},[r("div",dm,k(t.title),1),t.desc?(p(),g("div",fm,k(t.desc),1)):D("",!0)],2),r("div",{class:Ee(t.block?"":"shrink-0")},[kf(u.$slots,"default")],2)],2)):D("",!0)}},Ra=[{code:"AL",name:"Albania",continent:"EU",bbox:"39.6,19.3,42.7,21.1"},{code:"AD",name:"Andorra",continent:"EU",bbox:"42.4,1.4,42.7,1.8"},{code:"AT",name:"Austria",continent:"EU",bbox:"46.4,9.5,49.0,17.2"},{code:"BY",name:"Belarus",continent:"EU",bbox:"51.2,23.2,56.2,32.8"},{code:"BE",name:"Belgium",continent:"EU",bbox:"49.5,2.5,51.5,6.4"},{code:"BA",name:"Bosnia and Herzegovina",continent:"EU",bbox:"42.6,15.7,45.3,19.6"},{code:"BG",name:"Bulgaria",continent:"EU",bbox:"41.2,22.4,44.2,28.6"},{code:"HR",name:"Croatia",continent:"EU",bbox:"42.4,13.5,46.6,19.4"},{code:"CY",name:"Cyprus",continent:"EU",bbox:"34.6,32.3,35.7,34.6"},{code:"CZ",name:"Czechia",continent:"EU",bbox:"48.6,12.1,51.1,18.9"},{code:"DK",name:"Denmark",continent:"EU",bbox:"54.6,8.1,57.8,12.7"},{code:"EE",name:"Estonia",continent:"EU",bbox:"57.5,21.8,59.7,28.2"},{code:"FI",name:"Finland",continent:"EU",bbox:"59.8,20.6,70.1,31.6"},{code:"FR",name:"France",continent:"EU",bbox:"41.3,-5.2,51.1,9.6"},{code:"DE",name:"Germany",continent:"EU",bbox:"47.2,5.8,55.1,15.1"},{code:"GR",name:"Greece",continent:"EU",bbox:"34.8,19.4,41.8,28.3"},{code:"HU",name:"Hungary",continent:"EU",bbox:"45.7,16.1,48.6,22.9"},{code:"IS",name:"Iceland",continent:"EU",bbox:"63.3,-24.6,66.6,-13.5"},{code:"IE",name:"Ireland",continent:"EU",bbox:"51.4,-10.6,55.4,-6.0"},{code:"IT",name:"Italy",continent:"EU",bbox:"36.6,6.6,47.1,18.6"},{code:"XK",name:"Kosovo",continent:"EU",bbox:"41.8,20.0,43.3,21.8"},{code:"LV",name:"Latvia",continent:"EU",bbox:"55.7,20.9,58.1,28.2"},{code:"LI",name:"Liechtenstein",continent:"EU",bbox:"47.0,9.4,47.3,9.6"},{code:"LT",name:"Lithuania",continent:"EU",bbox:"53.9,20.9,56.5,26.9"},{code:"LU",name:"Luxembourg",continent:"EU",bbox:"49.4,5.7,50.2,6.5"},{code:"MT",name:"Malta",continent:"EU",bbox:"35.8,14.1,36.1,14.6"},{code:"MD",name:"Moldova",continent:"EU",bbox:"45.4,26.6,48.5,30.2"},{code:"MC",name:"Monaco",continent:"EU",bbox:"43.72,7.40,43.75,7.44"},{code:"ME",name:"Montenegro",continent:"EU",bbox:"41.8,18.4,43.6,20.4"},{code:"NL",name:"Netherlands",continent:"EU",bbox:"50.7,3.3,53.7,7.2"},{code:"MK",name:"North Macedonia",continent:"EU",bbox:"40.8,20.4,42.4,23.0"},{code:"NO",name:"Norway",continent:"EU",bbox:"57.9,4.6,71.2,31.1"},{code:"PL",name:"Poland",continent:"EU",bbox:"49.0,14.1,54.9,24.2"},{code:"PT",name:"Portugal",continent:"EU",bbox:"36.9,-9.5,42.2,-6.2"},{code:"RO",name:"Romania",continent:"EU",bbox:"43.6,20.2,48.3,29.7"},{code:"SM",name:"San Marino",continent:"EU",bbox:"43.89,12.40,43.99,12.52"},{code:"RS",name:"Serbia",continent:"EU",bbox:"42.2,18.8,46.2,23.0"},{code:"SK",name:"Slovakia",continent:"EU",bbox:"47.7,16.8,49.6,22.6"},{code:"SI",name:"Slovenia",continent:"EU",bbox:"45.4,13.4,46.9,16.6"},{code:"ES",name:"Spain",continent:"EU",bbox:"35.9,-9.4,43.8,3.4"},{code:"SE",name:"Sweden",continent:"EU",bbox:"55.3,11.1,69.1,24.2"},{code:"CH",name:"Switzerland",continent:"EU",bbox:"45.8,5.9,47.8,10.5"},{code:"UA",name:"Ukraine",continent:"EU",bbox:"44.4,22.1,52.4,40.2"},{code:"GB",name:"United Kingdom",continent:"EU",bbox:"49.9,-8.7,60.9,1.8"},{code:"VA",name:"Vatican City",continent:"EU",bbox:"41.900,12.445,41.908,12.458"},{code:"RU",name:"Russia",continent:"EU",bbox:"41.2,19.6,81.9,180"},{code:"TR",name:"Turkey",continent:"EU",bbox:"35.8,25.7,42.3,44.8"},{code:"AF",name:"Afghanistan",continent:"AS",bbox:"29.4,60.5,38.5,74.9"},{code:"AM",name:"Armenia",continent:"AS",bbox:"38.8,43.4,41.3,46.6"},{code:"AZ",name:"Azerbaijan",continent:"AS",bbox:"38.4,44.8,41.9,50.4"},{code:"BH",name:"Bahrain",continent:"AS",bbox:"25.8,50.4,26.3,50.7"},{code:"BD",name:"Bangladesh",continent:"AS",bbox:"20.7,88.0,26.6,92.7"},{code:"BT",name:"Bhutan",continent:"AS",bbox:"26.7,88.7,28.3,92.1"},{code:"BN",name:"Brunei",continent:"AS",bbox:"4.0,114.0,5.1,115.4"},{code:"KH",name:"Cambodia",continent:"AS",bbox:"10.4,102.3,14.7,107.6"},{code:"CN",name:"China",continent:"AS",bbox:"18.2,73.5,53.6,134.8"},{code:"GE",name:"Georgia",continent:"AS",bbox:"41.0,40.0,43.6,46.7"},{code:"IN",name:"India",continent:"AS",bbox:"6.7,68.1,35.5,97.4"},{code:"ID",name:"Indonesia",continent:"AS",bbox:"-11.0,95.0,6.1,141.0"},{code:"IR",name:"Iran",continent:"AS",bbox:"25.0,44.0,39.8,63.3"},{code:"IQ",name:"Iraq",continent:"AS",bbox:"29.1,38.8,37.4,48.6"},{code:"IL",name:"Israel",continent:"AS",bbox:"29.5,34.2,33.3,35.9"},{code:"JP",name:"Japan",continent:"AS",bbox:"24.0,122.9,45.5,145.8"},{code:"JO",name:"Jordan",continent:"AS",bbox:"29.2,34.9,33.4,39.3"},{code:"KZ",name:"Kazakhstan",continent:"AS",bbox:"40.6,46.5,55.4,87.3"},{code:"KW",name:"Kuwait",continent:"AS",bbox:"28.5,46.5,30.1,48.4"},{code:"KG",name:"Kyrgyzstan",continent:"AS",bbox:"39.2,69.3,43.3,80.3"},{code:"LA",name:"Laos",continent:"AS",bbox:"13.9,100.1,22.5,107.7"},{code:"LB",name:"Lebanon",continent:"AS",bbox:"33.0,35.1,34.7,36.6"},{code:"MY",name:"Malaysia",continent:"AS",bbox:"0.9,99.6,7.4,119.3"},{code:"MV",name:"Maldives",continent:"AS",bbox:"-0.7,72.7,7.1,73.7"},{code:"MN",name:"Mongolia",continent:"AS",bbox:"41.6,87.7,52.1,119.9"},{code:"MM",name:"Myanmar",continent:"AS",bbox:"9.8,92.2,28.5,101.2"},{code:"NP",name:"Nepal",continent:"AS",bbox:"26.3,80.1,30.4,88.2"},{code:"KP",name:"North Korea",continent:"AS",bbox:"37.7,124.2,43.0,130.7"},{code:"OM",name:"Oman",continent:"AS",bbox:"16.6,52.0,26.4,59.8"},{code:"PK",name:"Pakistan",continent:"AS",bbox:"23.7,60.9,37.1,77.8"},{code:"PH",name:"Philippines",continent:"AS",bbox:"4.6,116.9,21.1,126.6"},{code:"QA",name:"Qatar",continent:"AS",bbox:"24.5,50.7,26.2,51.6"},{code:"SA",name:"Saudi Arabia",continent:"AS",bbox:"16.4,34.6,32.2,55.7"},{code:"SG",name:"Singapore",continent:"AS",bbox:"1.2,103.6,1.5,104.1"},{code:"KR",name:"South Korea",continent:"AS",bbox:"33.1,125.9,38.6,129.6"},{code:"LK",name:"Sri Lanka",continent:"AS",bbox:"5.9,79.7,9.8,81.9"},{code:"SY",name:"Syria",continent:"AS",bbox:"32.3,35.7,37.3,42.4"},{code:"TW",name:"Taiwan",continent:"AS",bbox:"21.9,120.0,25.3,122.0"},{code:"TJ",name:"Tajikistan",continent:"AS",bbox:"36.7,67.4,41.0,75.2"},{code:"TH",name:"Thailand",continent:"AS",bbox:"5.6,97.3,20.5,105.6"},{code:"TL",name:"Timor-Leste",continent:"AS",bbox:"-9.5,124.0,-8.1,127.3"},{code:"TM",name:"Turkmenistan",continent:"AS",bbox:"35.1,52.4,42.8,66.7"},{code:"AE",name:"United Arab Emirates",continent:"AS",bbox:"22.6,51.5,26.1,56.4"},{code:"UZ",name:"Uzbekistan",continent:"AS",bbox:"37.2,55.9,45.6,73.1"},{code:"VN",name:"Vietnam",continent:"AS",bbox:"8.2,102.1,23.4,109.5"},{code:"YE",name:"Yemen",continent:"AS",bbox:"12.1,42.5,19.0,54.5"},{code:"DZ",name:"Algeria",continent:"AF",bbox:"18.9,-8.7,37.1,12.0"},{code:"AO",name:"Angola",continent:"AF",bbox:"-18.0,11.6,-4.4,24.1"},{code:"BJ",name:"Benin",continent:"AF",bbox:"6.2,0.8,12.4,3.9"},{code:"BW",name:"Botswana",continent:"AF",bbox:"-26.9,20.0,-17.8,29.4"},{code:"BF",name:"Burkina Faso",continent:"AF",bbox:"9.4,-5.5,15.1,2.4"},{code:"BI",name:"Burundi",continent:"AF",bbox:"-4.5,29.0,-2.3,30.8"},{code:"CV",name:"Cabo Verde",continent:"AF",bbox:"14.8,-25.4,17.2,-22.7"},{code:"CM",name:"Cameroon",continent:"AF",bbox:"1.7,8.5,13.1,16.2"},{code:"CF",name:"Central African Republic",continent:"AF",bbox:"2.2,14.4,11.0,27.5"},{code:"TD",name:"Chad",continent:"AF",bbox:"7.4,13.5,23.4,24.0"},{code:"KM",name:"Comoros",continent:"AF",bbox:"-12.4,43.2,-11.4,44.5"},{code:"CG",name:"Congo",continent:"AF",bbox:"-5.0,11.1,3.7,18.6"},{code:"CD",name:"DR Congo",continent:"AF",bbox:"-13.5,12.2,5.4,31.3"},{code:"DJ",name:"Djibouti",continent:"AF",bbox:"10.9,41.7,12.7,43.4"},{code:"EG",name:"Egypt",continent:"AF",bbox:"22.0,25.0,31.7,36.9"},{code:"GQ",name:"Equatorial Guinea",continent:"AF",bbox:"0.9,9.3,3.8,11.4"},{code:"ER",name:"Eritrea",continent:"AF",bbox:"12.4,36.4,18.0,43.1"},{code:"SZ",name:"Eswatini",continent:"AF",bbox:"-27.3,30.8,-25.7,32.1"},{code:"ET",name:"Ethiopia",continent:"AF",bbox:"3.4,33.0,14.9,48.0"},{code:"GA",name:"Gabon",continent:"AF",bbox:"-4.0,8.7,2.3,14.5"},{code:"GM",name:"Gambia",continent:"AF",bbox:"13.1,-16.8,13.8,-13.8"},{code:"GH",name:"Ghana",continent:"AF",bbox:"4.7,-3.3,11.2,1.2"},{code:"GN",name:"Guinea",continent:"AF",bbox:"7.2,-15.1,12.7,-7.6"},{code:"GW",name:"Guinea-Bissau",continent:"AF",bbox:"10.9,-16.7,12.7,-13.6"},{code:"CI",name:"Ivory Coast",continent:"AF",bbox:"4.4,-8.6,10.7,-2.5"},{code:"KE",name:"Kenya",continent:"AF",bbox:"-4.7,33.9,5.5,41.9"},{code:"LS",name:"Lesotho",continent:"AF",bbox:"-30.7,27.0,-28.6,29.5"},{code:"LR",name:"Liberia",continent:"AF",bbox:"4.3,-11.5,8.6,-7.4"},{code:"LY",name:"Libya",continent:"AF",bbox:"19.5,9.3,33.2,25.2"},{code:"MG",name:"Madagascar",continent:"AF",bbox:"-25.6,43.2,-11.9,50.5"},{code:"MW",name:"Malawi",continent:"AF",bbox:"-17.1,32.7,-9.4,35.9"},{code:"ML",name:"Mali",continent:"AF",bbox:"10.1,-12.3,25.0,4.3"},{code:"MR",name:"Mauritania",continent:"AF",bbox:"14.7,-17.1,27.3,-4.8"},{code:"MU",name:"Mauritius",continent:"AF",bbox:"-20.5,57.3,-19.9,57.8"},{code:"MA",name:"Morocco",continent:"AF",bbox:"27.7,-13.2,35.9,-1.0"},{code:"MZ",name:"Mozambique",continent:"AF",bbox:"-26.9,30.2,-10.5,40.8"},{code:"NA",name:"Namibia",continent:"AF",bbox:"-28.9,11.7,-16.9,25.3"},{code:"NE",name:"Niger",continent:"AF",bbox:"11.7,0.2,23.5,16.0"},{code:"NG",name:"Nigeria",continent:"AF",bbox:"4.3,2.7,13.9,14.7"},{code:"RW",name:"Rwanda",continent:"AF",bbox:"-2.8,28.9,-1.1,30.9"},{code:"SN",name:"Senegal",continent:"AF",bbox:"12.3,-17.5,16.7,-11.4"},{code:"SL",name:"Sierra Leone",continent:"AF",bbox:"6.9,-13.3,10.0,-10.3"},{code:"SO",name:"Somalia",continent:"AF",bbox:"-1.7,40.9,12.0,51.4"},{code:"ZA",name:"South Africa",continent:"AF",bbox:"-34.8,16.5,-22.1,32.9"},{code:"SS",name:"South Sudan",continent:"AF",bbox:"3.5,24.1,12.2,35.9"},{code:"SD",name:"Sudan",continent:"AF",bbox:"8.7,21.8,22.2,38.6"},{code:"TZ",name:"Tanzania",continent:"AF",bbox:"-11.7,29.3,-1.0,40.4"},{code:"TG",name:"Togo",continent:"AF",bbox:"6.1,-0.1,11.1,1.8"},{code:"TN",name:"Tunisia",continent:"AF",bbox:"30.2,7.5,37.5,11.6"},{code:"UG",name:"Uganda",continent:"AF",bbox:"-1.5,29.6,4.2,35.0"},{code:"ZM",name:"Zambia",continent:"AF",bbox:"-18.1,21.9,-8.2,33.7"},{code:"ZW",name:"Zimbabwe",continent:"AF",bbox:"-22.4,25.2,-15.6,33.1"},{code:"CA",name:"Canada",continent:"NA",bbox:"41.7,-141.0,83.1,-52.6"},{code:"US",name:"United States",continent:"NA",bbox:"24.4,-125.0,49.4,-66.9"},{code:"MX",name:"Mexico",continent:"NA",bbox:"14.5,-118.4,32.7,-86.7"},{code:"GT",name:"Guatemala",continent:"NA",bbox:"13.7,-92.2,17.8,-88.2"},{code:"BZ",name:"Belize",continent:"NA",bbox:"15.9,-89.2,18.5,-87.8"},{code:"SV",name:"El Salvador",continent:"NA",bbox:"13.1,-90.1,14.4,-87.7"},{code:"HN",name:"Honduras",continent:"NA",bbox:"12.9,-89.4,16.5,-83.1"},{code:"NI",name:"Nicaragua",continent:"NA",bbox:"10.7,-87.7,15.0,-83.1"},{code:"CR",name:"Costa Rica",continent:"NA",bbox:"8.0,-85.9,11.2,-82.5"},{code:"PA",name:"Panama",continent:"NA",bbox:"7.2,-83.1,9.6,-77.2"},{code:"CU",name:"Cuba",continent:"NA",bbox:"19.8,-85.0,23.3,-74.1"},{code:"DO",name:"Dominican Republic",continent:"NA",bbox:"17.5,-72.0,19.9,-68.3"},{code:"HT",name:"Haiti",continent:"NA",bbox:"18.0,-74.5,20.1,-71.6"},{code:"JM",name:"Jamaica",continent:"NA",bbox:"17.7,-78.4,18.5,-76.2"},{code:"BS",name:"Bahamas",continent:"NA",bbox:"20.9,-79.0,27.3,-72.7"},{code:"TT",name:"Trinidad and Tobago",continent:"NA",bbox:"10.0,-61.9,11.4,-60.5"},{code:"AR",name:"Argentina",continent:"SA",bbox:"-55.1,-73.6,-21.8,-53.6"},{code:"BO",name:"Bolivia",continent:"SA",bbox:"-22.9,-69.6,-9.7,-57.5"},{code:"BR",name:"Brazil",continent:"SA",bbox:"-33.8,-74.0,5.3,-34.8"},{code:"CL",name:"Chile",continent:"SA",bbox:"-55.9,-75.6,-17.5,-66.4"},{code:"CO",name:"Colombia",continent:"SA",bbox:"-4.2,-79.0,12.5,-66.9"},{code:"EC",name:"Ecuador",continent:"SA",bbox:"-5.0,-81.1,1.4,-75.2"},{code:"GY",name:"Guyana",continent:"SA",bbox:"1.2,-61.4,8.6,-56.5"},{code:"PY",name:"Paraguay",continent:"SA",bbox:"-27.6,-62.6,-19.3,-54.3"},{code:"PE",name:"Peru",continent:"SA",bbox:"-18.4,-81.3,0.0,-68.7"},{code:"SR",name:"Suriname",continent:"SA",bbox:"1.8,-58.1,6.0,-54.0"},{code:"UY",name:"Uruguay",continent:"SA",bbox:"-35.0,-58.4,-30.1,-53.1"},{code:"VE",name:"Venezuela",continent:"SA",bbox:"0.6,-73.4,12.2,-59.8"},{code:"AU",name:"Australia",continent:"OC",bbox:"-43.6,113.3,-10.7,153.6"},{code:"NZ",name:"New Zealand",continent:"OC",bbox:"-47.3,166.4,-34.4,178.6"},{code:"PG",name:"Papua New Guinea",continent:"OC",bbox:"-11.7,140.8,-1.3,155.9"},{code:"FJ",name:"Fiji",continent:"OC",bbox:"-19.2,177.0,-16.0,180.0"}],hm=new Map(Ra.map(t=>[t.code,t]));function pm(t){const i=String(t||"").split(",").map(s=>Number(s.trim()));return i.length!==4||i.some(s=>Number.isNaN(s))?null:i}function mm(t){const i=hm.get(t);return i?i.bbox:""}function pr(t,i){if(typeof t!="number"||typeof i!="number"||Number.isNaN(t)||Number.isNaN(i))return null;let s=null,l=1/0;for(const u of Ra){const d=pm(u.bbox);if(!d)continue;const[h,v,b,C]=d;if(t<h||t>b||i<v||i>C)continue;const T=Math.abs(b-h)*Math.abs(C-v);T<l&&(l=T,s=u)}return s}function gm(){return Ra.filter(t=>t.continent==="EU").slice().sort((t,i)=>t.name.localeCompare(i.name)).map(t=>({value:t.bbox,label:t.name}))}function vm(){return Ra.slice().sort((t,i)=>t.name.localeCompare(i.name)).map(t=>[t.code,t.name])}const _m=(t,i)=>{const s=t.__vccOpts||t;for(const[l,u]of i)s[l]=u;return s},bm={class:"mx-auto max-w-[1280px] p-7"},ym={class:"mb-5 flex flex-wrap items-end justify-between gap-4"},xm={class:"flex h-10 w-full max-w-[280px] items-center gap-2 rounded border border-line-strong bg-surface-1 px-3"},wm={class:"grid grid-cols-[210px_1fr] gap-6 max-[760px]:grid-cols-1"},km={class:"flex flex-col gap-0.5 max-[760px]:flex-row max-[760px]:overflow-x-auto"},Sm=["onClick"],Tm={class:"whitespace-nowrap"},Pm={class:"min-w-0"},Cm={key:0,class:"panel p-10 text-center text-sm text-ink-muted"},Lm={key:0,class:"eyebrow mb-2 mt-5 first:mt-0 flex items-center gap-2"},Mm={key:1,class:"panel mb-5 p-5"},Am={class:"flex items-center gap-1"},Em={class:"flex items-center gap-2"},Om={class:"font-mono text-sm text-ink"},zm={class:"inline-flex items-center gap-1 rounded-full bg-amber-soft px-2 py-0.5 text-[11px] font-semibold text-amber-fg"},Im={key:0,class:"mt-2 text-xs text-ink-muted"},$m={class:"grid max-w-[420px] gap-2"},Nm={class:"flex items-center gap-3"},Dm={key:2,class:"panel mb-5 p-5"},Fm=["value"],Rm=["value"],Bm=["value"],Um={class:"font-mono text-sm text-ink"},Vm={key:3},Zm={key:0,class:"mb-5 flex items-center gap-1 overflow-x-auto border-b border-line"},Hm=["onClick"],jm={key:1,class:"panel mb-5 p-5"},Wm={class:"mb-4 flex items-start gap-3 border-b border-line pb-4"},Km={class:"grid h-10 w-10 place-items-center rounded-lg bg-accent-soft text-accent-soft-fg"},Gm={key:0,class:"mb-4 rounded-lg border border-line bg-surface-2 px-4 py-3 text-xs text-ink-secondary"},qm={key:1,class:"mb-4 flex flex-col gap-2 border-b border-line pb-4 sm:flex-row sm:items-center sm:justify-between"},Ym={key:4,class:"border-b border-line py-3 text-xs text-amber-fg"},Jm={key:0},Xm={key:5,class:"border-b border-line py-3 text-xs text-ink-muted"},Qm={class:"font-semibold text-ink-secondary"},eg={key:6,class:"border-b border-line py-3 text-xs text-ink-muted"},tg={key:7,class:"my-4 rounded-lg border border-line bg-surface-2 p-4","data-keywords":"credits usage quota remaining daily allowance rate limit"},ng={class:"flex items-center justify-between gap-3"},ig={class:"flex items-center gap-2 text-sm font-semibold text-ink"},og={key:0,class:"text-[11px] text-ink-muted"},sg={class:"mt-2 flex items-baseline gap-1.5"},ag={class:"font-mono text-2xl font-semibold text-ink"},rg={class:"text-sm text-ink-muted"},lg={class:"mt-2 h-2 w-full overflow-hidden rounded-full bg-line"},ug={class:"mt-2 text-xs text-ink-muted"},cg={class:"mt-2 text-sm text-ink"},dg={class:"font-semibold"},fg={class:"mt-1 text-xs text-ink-muted"},hg={key:1,class:"mt-2 text-xs text-ink-muted"},pg={key:0,class:"inline-flex items-center gap-2 text-sm text-ink"},mg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},gg={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},vg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},_g={key:1,class:"flex flex-col items-end gap-2"},bg={key:0,value:"__auto__"},yg=["label"],xg=["value"],wg={key:0,class:"w-64 text-right text-[11px] leading-snug text-ink-muted"},kg={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},Sg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Tg={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},Pg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Cg={key:8,class:"border-b border-line py-3 text-xs text-amber-fg"},Lg={class:"mt-4 flex flex-wrap items-center gap-3"},Mg=["disabled"],Ag=["disabled"],Eg={key:2,class:"text-xs text-danger-fg"},Og={class:"panel mb-5 p-5"},zg={class:"mb-4 flex items-start gap-3 border-b border-line pb-4"},Ig={class:"grid h-10 w-10 place-items-center rounded-lg bg-accent-soft text-accent-soft-fg"},$g={key:0,class:"mb-4 rounded-lg border border-line bg-surface-2 px-4 py-3 text-xs text-ink-secondary"},Ng={key:1,class:"mb-4 flex flex-col gap-2 border-b border-line pb-4 sm:flex-row sm:items-center sm:justify-between"},Dg={key:4,class:"border-b border-line py-3 text-xs text-amber-fg"},Fg={key:0},Rg={key:5,class:"border-b border-line py-3 text-xs text-ink-muted"},Bg={class:"font-semibold text-ink-secondary"},Ug={key:6,class:"border-b border-line py-3 text-xs text-ink-muted"},Vg={key:0,class:"inline-flex items-center gap-2 text-sm text-ink"},Zg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Hg={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},jg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Wg={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},Kg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Gg={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},qg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Yg={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},Jg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Xg={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},Qg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},ev={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},tv={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},nv={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},iv={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},ov={key:0,class:"inline-flex items-center gap-2 text-sm text-ink"},sv={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},av={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},rv={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},lv={class:"mt-4 flex flex-wrap items-center gap-3"},uv=["disabled"],cv=["disabled"],dv={key:2,class:"text-xs text-danger-fg"},fv={key:3,class:"text-[11px] text-ink-muted"},hv={class:"panel mb-5 p-5"},pv={class:"mb-4 flex items-start gap-3 border-b border-line pb-4"},mv={class:"grid h-10 w-10 place-items-center rounded-lg bg-accent-soft text-accent-soft-fg"},gv={key:0,class:"mb-4 rounded-lg border border-line bg-surface-2 px-4 py-3 text-xs text-ink-secondary"},vv={key:1,class:"mb-4 flex flex-col gap-2 border-b border-line pb-4 sm:flex-row sm:items-center sm:justify-between"},_v={key:4,class:"border-b border-line py-3 text-xs text-amber-fg"},bv={key:0},yv={key:5,class:"border-b border-line py-3 text-xs text-ink-muted"},xv={class:"font-semibold text-ink-secondary"},wv={key:6,class:"border-b border-line py-3 text-xs text-ink-muted"},kv={key:0,class:"inline-flex items-center gap-2 break-all font-mono text-sm text-ink"},Sv={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Tv={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},Pv={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Cv={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},Lv={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Mv={key:0,class:"inline-flex items-center gap-2 text-sm text-ink"},Av={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Ev={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},Ov={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},zv={class:"mt-4 flex flex-wrap items-center gap-3"},Iv=["disabled"],$v=["disabled"],Nv={key:2,class:"text-xs text-danger-fg"},Dv={key:3,class:"text-[11px] text-ink-muted"},Fv={key:3,class:"panel mb-5 p-5"},Rv={class:"mb-4 flex items-start gap-3 border-b border-line pb-4"},Bv={class:"grid h-10 w-10 place-items-center rounded-lg bg-accent-soft text-accent-soft-fg"},Uv={key:0,class:"mb-4 rounded-lg border border-line bg-surface-2 px-4 py-3 text-xs text-ink-secondary"},Vv={key:1,class:"mb-4 rounded-lg border border-line bg-surface-2 px-4 py-3 text-xs text-ink-secondary"},Zv={key:2,class:"mb-4 flex flex-col gap-2 border-b border-line pb-4 sm:flex-row sm:items-center sm:justify-between"},Hv={key:5,class:"border-b border-line py-3 text-xs text-amber-fg"},jv={key:0},Wv={key:6,class:"border-b border-line py-3 text-xs text-ink-muted"},Kv={class:"font-semibold text-ink-secondary"},Gv={key:7,class:"border-b border-line py-3 text-xs text-ink-muted"},qv={class:"flex w-full flex-col gap-2"},Yv={class:"break-all font-mono text-sm text-ink"},Jv={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Xv={key:1,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Qv={key:0,class:"text-xs text-ink-muted"},e_={key:1,class:"border-b border-line py-3 text-xs text-ink-muted"},t_={key:0,class:"inline-flex items-center gap-2 text-sm text-ink"},n_={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},i_={class:"mt-4 flex flex-wrap items-center gap-3"},o_=["disabled"],s_=["disabled"],a_={key:2,class:"text-xs text-danger-fg"},r_={key:3,class:"text-[11px] text-ink-muted"},l_={key:4,class:"panel mb-5 p-5"},u_={class:"flex items-center gap-4"},c_=["src"],d_={key:1,class:"grid h-16 w-16 place-items-center rounded-full bg-[var(--navy-800)] text-lg font-bold text-white"},f_={class:"flex gap-2"},h_={class:"btn-ghost cursor-pointer"},p_={class:"mt-1 text-right text-[11px] text-ink-muted"},m_={key:5,class:"panel mb-5 p-5"},g_={class:"flex items-center gap-3"},v_={key:0,class:"mt-4 rounded-lg border border-line bg-surface-2 p-4"},__={class:"flex flex-wrap items-center gap-4"},b_={class:"min-w-0"},y_={class:"mt-1 select-all font-mono text-sm font-bold text-ink"},x_={class:"mt-3 flex items-center gap-2"},w_={key:0,class:"mt-2 text-xs text-danger-fg"},k_={key:1,class:"mt-4 rounded-lg border border-line bg-surface-2 p-4"},S_={class:"mt-2 grid grid-cols-2 gap-1 font-mono text-xs text-ink-secondary sm:grid-cols-4"},T_={class:"rounded-lg border border-line bg-surface-2 p-3"},P_={class:"flex items-center gap-3"},C_={class:"grid h-9 w-9 place-items-center rounded-full bg-accent-soft text-accent-soft-fg"},L_={class:"min-w-0 flex-1"},M_={class:"text-sm font-semibold text-ink"},A_={class:"font-mono text-[11px] text-ink-muted"},E_={key:6,class:"mb-5"},O_={key:0,class:"panel mb-5 p-5"},z_={class:"grid max-w-[520px] gap-2"},I_={class:"flex flex-wrap gap-2"},$_=["disabled","title"],N_=["value"],D_=["value"],F_={class:"flex items-center gap-2 py-1 text-sm text-ink-secondary"},R_={class:"flex items-center gap-3"},B_=["disabled"],U_={key:0,class:"text-xs text-danger-fg"},V_={key:1,class:"text-xs text-ink-muted"},Z_={key:1,class:"panel mb-5 p-5"},H_={class:"grid max-w-[520px] gap-2"},j_={class:"flex flex-wrap gap-2"},W_=["value"],K_=["value"],G_={key:1,class:"text-xs text-ink-muted"},q_={class:"font-semibold text-ink-secondary"},Y_={class:"flex items-center gap-3"},J_=["disabled"],X_={key:0,class:"text-xs text-danger-fg"},Q_={class:"panel overflow-hidden p-0"},e1={class:"flex items-center justify-between px-5 py-4"},t1=["disabled"],n1={key:0,class:"px-5 pb-5 text-sm text-danger-fg"},i1={key:1,class:"px-5 pb-8 text-sm text-ink-muted"},o1={key:2,class:"overflow-x-auto"},s1={class:"w-full border-collapse text-sm"},a1={class:"text-left"},r1={class:"px-5 py-3"},l1={class:"text-ink"},u1={key:0,class:"ml-1.5 text-[11px] text-ink-muted"},c1={class:"px-5 py-3"},d1={class:"px-5 py-3"},f1={class:"px-5 py-3"},h1={class:"px-5 py-3 text-right"},p1=["onClick"],m1={key:1,class:"inline-flex items-center gap-1.5"},g1=["onClick"],v1=["onClick"],_1={key:7,class:"mb-5"},b1={key:0,class:"panel mb-5 p-5"},y1={class:"grid max-w-[520px] gap-2"},x1={class:"flex items-center gap-3"},w1={key:0,class:"text-xs text-danger-fg"},k1={key:1,class:"panel mb-5 p-5"},S1={class:"grid max-w-[520px] gap-2"},T1={class:"flex items-center gap-3"},P1=["disabled"],C1={key:0,class:"text-xs text-danger-fg"},L1={class:"panel overflow-hidden p-0"},M1={key:0,class:"px-5 pb-8 text-sm text-ink-muted"},A1={key:1,class:"overflow-x-auto"},E1={class:"w-full border-collapse text-sm"},O1={class:"text-left"},z1={class:"px-5 py-3"},I1={class:"inline-flex items-center gap-2 text-ink"},$1={class:"px-5 py-3 text-ink-secondary"},N1={class:"px-5 py-3 text-right"},D1=["onClick"],F1={key:1,class:"inline-flex items-center gap-1.5"},R1=["onClick"],B1=["disabled","title","onClick"],U1={key:8,class:"mb-5"},V1={class:"panel mb-5 p-5"},Z1={class:"btn-ghost cursor-pointer"},H1={key:0,class:"mt-2 text-xs text-ink-muted"},j1={class:"rounded-lg border p-5",style:{"border-color":"color-mix(in srgb, var(--danger) 35%, transparent)",background:"var(--danger-soft)"}},W1={class:"flex items-center gap-2 text-danger-fg"},K1={class:"mt-4 rounded-lg border border-line bg-surface-1 p-4"},G1={class:"mt-3 flex items-start gap-2 text-sm text-ink-secondary"},q1={class:"mt-3"},Y1={class:"eyebrow mb-1 block"},J1={class:"text-ink"},X1=["placeholder"],Q1={class:"mt-4 flex flex-wrap items-center gap-3"},eb=["disabled"],tb=["disabled"],nb={key:2,class:"text-xs text-ink-muted"},ib={key:0,class:"mt-3 rounded border border-line bg-surface-2 px-3 py-2 text-xs text-ink-secondary"},ob={key:0,class:"fixed bottom-5 right-5 z-20 flex items-center gap-2 rounded-lg border border-line bg-surface-1 px-4 py-2.5 text-sm text-ink shadow-md"},gu="pv.opensky.health",vu="pv.filetransfer.health",_u="pv.webdav.health",bu="pv.localstorage.health",sb={__name:"Settings",props:{email:{type:String,default:""},role:{type:String,default:"user"},organization:{type:String,default:""},organizationName:{type:String,default:""}},emits:["logout"],setup(t,{emit:i}){const s=t,l=i,u=we(()=>s.role==="superadmin"),d=we(()=>s.role==="admin"||s.role==="superadmin");function h(x){return x==="superadmin"?"Superadmin":x==="admin"?"Admin":"User"}function v(x){return x==="superadmin"||x==="admin"?"shield":"user"}function b(x){return x==="superadmin"||x==="admin"?C.accent:C.neutral}const C={success:"bg-success-soft text-success-fg",warning:"bg-amber-soft text-amber-fg",danger:"bg-danger-soft text-danger-fg",accent:"bg-accent-soft text-accent-soft-fg",neutral:"bg-surface-2 text-ink-secondary"},T=we(()=>{const x=[{id:"account",label:"Account",icon:"user",kw:"name username email password verification login credentials role"},{id:"appearance",label:"Appearance",icon:"sliders",kw:"theme light dark system language region font size accessibility date time format motion"},{id:"integrations",label:"Integrations",icon:"radio",kw:"opensky flights adsb aircraft plugin oauth credentials bounding box plan connection ftp sftp ftps file transfer server host upload download local storage folder drive isolated private read only webdav nextcloud owncloud dav url https"},{id:"profile",label:"Profile",icon:"image",kw:"avatar photo display name bio public"},{id:"security",label:"Privacy & Security",icon:"shield",kw:"two factor authentication 2fa sessions devices logout security privacy"}];return d.value&&x.push({id:"team",label:"User management",icon:"users",kw:"users team members add remove create delete role admin permissions rights organization"}),u.value&&x.push({id:"organizations",label:"Organizations",icon:"grid",kw:"organization org tenant company create rename delete members"}),x.push({id:"advanced",label:"Advanced",icon:"alertTriangle",kw:"export import data delete account danger zone",danger:!0}),x}),M=W("account"),R=W("");Yu("settingsSearch",R);const B=we(()=>R.value.trim().length>0),Z=we(()=>R.value.trim().toLowerCase());function F(x){return Z.value?(x.label+" "+x.kw).toLowerCase().includes(Z.value)||pe(x.id):!0}const he={account:["full name","username","email address verification verify","password change current new"],appearance:["theme light dark system","language","region","font size accessibility","reduce motion","date format","time format clock"],integrations:["opensky live flights","enable plugin","oauth client id secret","plan credits","bounding box","test connection","file transfer ftp sftp ftps","server host port username password","private key passphrase","base path directory","local storage folder drive","private isolated folder","read only access mode","webdav nextcloud owncloud dav","server url username password tls","base path directory folder"],profile:["profile photo avatar","display name","bio about","show email public"],security:["two factor authentication","active sessions devices","sign out"],team:["add user create account","members list role admin remove delete","organization org assign"],organizations:["add organization create","rename organization","delete organization members"],advanced:["export data download","import data upload","delete account permanent danger"]};function pe(x){return Z.value?(he[x]||[]).some(f=>f.includes(Z.value)):!0}const q=we(()=>B.value?T.value.filter(F):T.value.filter(x=>x.id===M.value)),Te=we({get:()=>co.value,set:x=>Pa(x)}),fe=[{value:"light",label:"Light",icon:"sun"},{value:"dark",label:"Dark",icon:"moon"},{value:"system",label:"System",icon:"monitor"}],Ue=[{value:"sm",label:"Small"},{value:"md",label:"Default"},{value:"lg",label:"Large"}],$e=[{value:"12",label:"12-hour"},{value:"24",label:"24-hour"}],Ie=[["en","English"],["es","Español"],["de","Deutsch"],["fr","Français"],["pl","Polski"],["ja","日本語"]],Ge=vm(),_e=we(()=>(Ge.find(([x])=>x===ve.region)||[null,ve.region])[1]),ye=[["MDY","MM/DD/YYYY"],["DMY","DD/MM/YYYY"],["YMD","YYYY/MM/DD"],["ISO","YYYY-MM-DD"]],ze=W(Date.now());let ne=null;const je=we(()=>fu(ze.value)),ie=kt({loaded:!1,available:!1,orgEnabled:!0,allowAnonymous:!0,enabled:!1,canEditOrg:!1,isSuperadmin:!1,scopes:{}}),We=W("user"),le=kt({clientId:"",clientSecret:"",plan:"",bbox:""}),ce=W(""),se=W(!1),ot=W(!1),ee=W(null),be=W(null),Ne=we(()=>ee.value&&ee.value.credits||null),dt=we(()=>{const x=Ne.value;return!x||!x.daily||x.remaining==null?null:Math.max(0,Math.min(100,Math.round(x.remaining/x.daily*100)))}),at=we(()=>{const x=dt.value;return x==null?"bg-accent":x<=10?"bg-danger":x<=30?"bg-amber":"bg-success"});function Ze(x){return typeof x=="number"?x.toLocaleString():x}function Y(){if(!be.value)return"";const x=Math.max(0,Math.round((Date.now()-be.value)/1e3));if(x<60)return"just now";const f=Math.round(x/60);if(f<60)return`${f} min ago`;const j=Math.round(f/60);return j<24?`${j} h ago`:`${Math.round(j/24)} d ago`}function A(){try{ee.value&&localStorage.setItem(gu,JSON.stringify({health:ee.value,ts:be.value}))}catch{}}function z(){try{const x=localStorage.getItem(gu);if(!x)return;const f=JSON.parse(x);f&&f.health&&(ee.value=f.health,be.value=f.ts||null)}catch{}}const gt=[{value:"",label:"Not set"},{value:"anonymous",label:"Anonymous"},{value:"standard",label:"Standard"},{value:"contributor",label:"Contributor"}],ut=[{value:"user",label:"My settings",icon:"user"},{value:"org",label:"Organization",icon:"users"}],wt=[{label:"World",options:[{value:"-90,-180,90,180",label:"World"}]},{label:"Continents",options:[{value:"34,-25,72,45",label:"Europe"},{value:"-35,-18,38,52",label:"Africa"},{value:"5,25,82,180",label:"Asia"},{value:"7,-168,72,-52",label:"North America"},{value:"-56,-82,13,-34",label:"South America"},{value:"-48,110,-10,180",label:"Oceania"}]},{label:"European countries",options:gm()},{label:"Other countries",options:[{value:"24,-125,49.5,-66.5",label:"United States"},{value:"41.7,-141,83.1,-52.6",label:"Canada"},{value:"-43.6,113.3,-10.7,153.6",label:"Australia"},{value:"24,122.9,45.5,145.8",label:"Japan"}]}],y=wt.flatMap(x=>x.options);function _(x){const f=String(x||"").split(",").map(S=>S.trim());if(f.length!==4)return"";const j=f.map(Number);return j.some(S=>Number.isNaN(S))?"":j.join(",")}function w(x){const f=_(x),j=f&&y.find(S=>_(S.value)===f);return j?j.label:""}const K=W(!1),H=we({get(){if(!me.value&&ve.autoBbox)return"__auto__";if(K.value)return"__custom__";const x=_(le.bbox),f=x&&y.find(j=>_(j.value)===x);return f?f.value:"__custom__"},set(x){if(x==="__auto__"){me.value||(ve.autoBbox=!0),K.value=!1;return}if(me.value||(ve.autoBbox=!1),x==="__custom__"){K.value=!0;return}K.value=!1,le.bbox=x}}),V=we(()=>H.value==="__custom__"),ae=we(()=>H.value==="__auto__"),te=we(()=>ie.isSuperadmin),Q=we(()=>ie.isSuperadmin?"user":We.value),G=we(()=>ie.scopes[Q.value]||{editableLayer:"user",fields:{}}),me=we(()=>Q.value==="org");function oe(x){return G.value.fields[x]||{effective:"",own:"",source:"unset",locked:!1}}function ke(x){return te.value||oe(x).locked}function Ce(x){const f=oe(x).source;return f==="global"?"Set by administrator":f==="org"?"Set by your organization":""}function He(){le.clientId=oe("clientId").own||"",le.clientSecret=oe("clientSecret").own||"",le.plan=oe("plan").own||"",le.bbox=oe("bbox").own||"",K.value=!1}function et(x){ie.available=!!x.available,ie.orgEnabled=x.orgEnabled!==!1,ie.allowAnonymous=!!x.allowAnonymous,ie.enabled=!!x.enabled,ie.canEditOrg=!!x.canEditOrg,ie.isSuperadmin=!!x.isSuperadmin,ie.scopes=x.scopes||{},We.value==="org"&&!ie.canEditOrg&&(We.value="user"),He(),ie.loaded=!0}It(We,()=>{ce.value="",He()});async function U(){z();const{ok:x,body:f}=await dp();x&&et(f)}async function O(x){const f=me.value;f?ie.orgEnabled=x:ie.enabled=x;const{ok:j,body:S}=await lu(f?{scope:"org",enabled:x}:{scope:"user",enabled:x});j?(et(S),it(f?x?"OpenSky enabled for your organization.":"OpenSky disabled for your organization.":x?"OpenSky enabled.":"OpenSky disabled.")):(f?ie.orgEnabled=!x:ie.enabled=!x,it(S.error||"Could not update."))}async function xe(){ce.value="",se.value=!0;const x={};for(const Xe of["clientId","clientSecret","plan","bbox"])ke(Xe)||(x[Xe]=le[Xe]);const f={scope:Q.value,config:x};me.value||(f.enabled=ie.enabled);const{ok:j,body:S}=await lu(f);if(se.value=!1,!j){ce.value=S.error||"Could not save settings.";return}et(S),it(me.value?"Organization OpenSky settings saved.":"OpenSky settings saved.")}async function Je(){ot.value=!0,ee.value=null;const{ok:x,body:f}=await fp();ot.value=!1,ee.value=x&&f.health?f.health:{status:"down",detail:f.error||"Probe failed."},be.value=Date.now(),A()}function pt(x){return x==="ok"?C.success:x==="degraded"?C.warning:C.danger}const Ve=kt({loaded:!1,available:!1,orgEnabled:!0,enabled:!1,canEditOrg:!1,isSuperadmin:!1,scopes:{}}),Vt=W("user"),de=["protocol","host","port","username","password","privateKey","keyPassphrase","hostKeyFingerprint","insecureSkipVerify","basePath"],Fe=kt(Object.fromEntries(de.map(x=>[x,""]))),Nt=W(""),qn=W(!1),fo=W(!1),gn=W(null),Yn=W(null),jo=[{value:"sftp",label:"SFTP"},{value:"ftps",label:"FTPS"},{value:"ftp",label:"FTP"}],Ba=[{value:"false",label:"Verify certificate"},{value:"true",label:"Skip verification"}],Wo=we(()=>Ve.isSuperadmin),Ko=we(()=>Ve.isSuperadmin?"user":Vt.value),Ua=we(()=>Ve.scopes[Ko.value]||{editableLayer:"user",fields:{}}),vn=we(()=>Ko.value==="org"),ho=we(()=>(en("protocol")?Ot("protocol").effective:Fe.protocol)||"sftp");function Ot(x){return Ua.value.fields[x]||{effective:"",own:"",source:"unset",locked:!1}}function en(x){return Wo.value||Ot(x).locked}function Pt(x){const f=Ot(x).source;return f==="global"?"Set by administrator":f==="org"?"Set by your organization":""}function Va(x){return(jo.find(f=>f.value===x)||{}).label||x||"—"}function Bs(){for(const x of de)Fe[x]=Ot(x).own||"";Fe.protocol||(Fe.protocol="sftp"),Fe.insecureSkipVerify||(Fe.insecureSkipVerify="false")}function tn(x){Ve.available=!!x.available,Ve.orgEnabled=x.orgEnabled!==!1,Ve.enabled=!!x.enabled,Ve.canEditOrg=!!x.canEditOrg,Ve.isSuperadmin=!!x.isSuperadmin,Ve.scopes=x.scopes||{},Vt.value==="org"&&!Ve.canEditOrg&&(Vt.value="user"),Bs(),Ve.loaded=!0}It(Vt,()=>{Nt.value="",Bs()});function Le(){if(!Yn.value)return"";const x=Math.max(0,Math.round((Date.now()-Yn.value)/1e3));if(x<60)return"just now";const f=Math.round(x/60);if(f<60)return`${f} min ago`;const j=Math.round(f/60);return j<24?`${j} h ago`:`${Math.round(j/24)} d ago`}function Us(){try{gn.value&&localStorage.setItem(vu,JSON.stringify({health:gn.value,ts:Yn.value}))}catch{}}function Vs(){try{const x=localStorage.getItem(vu);if(!x)return;const f=JSON.parse(x);f&&f.health&&(gn.value=f.health,Yn.value=f.ts||null)}catch{}}async function Zs(){Vs();const{ok:x,body:f}=await pp();x&&tn(f)}async function Go(x){const f=vn.value;f?Ve.orgEnabled=x:Ve.enabled=x;const{ok:j,body:S}=await uu(f?{scope:"org",enabled:x}:{scope:"user",enabled:x});j?(tn(S),it(f?x?"File transfer enabled for your organization.":"File transfer disabled for your organization.":x?"File transfer enabled.":"File transfer disabled.")):(f?Ve.orgEnabled=!x:Ve.enabled=!x,it(S.error||"Could not update."))}async function qo(){Nt.value="",qn.value=!0;const x={};for(const Xe of de)en(Xe)||(x[Xe]=Fe[Xe]);const f={scope:Ko.value,config:x};vn.value||(f.enabled=Ve.enabled);const{ok:j,body:S}=await uu(f);if(qn.value=!1,!j){Nt.value=S.error||"Could not save settings.";return}tn(S),it(vn.value?"Organization file-transfer settings saved.":"File-transfer settings saved.")}async function Hs(){fo.value=!0,gn.value=null;const{ok:x,body:f}=await mp();fo.value=!1,gn.value=x&&f.health?f.health:{status:"down",detail:f.error||"Probe failed."},Yn.value=Date.now(),Us()}function mi(x){return x==="ok"?C.success:x==="degraded"?C.warning:C.danger}const rt=kt({loaded:!1,available:!1,orgEnabled:!0,enabled:!1,canEditOrg:!1,isSuperadmin:!1,scopes:{}}),gi=W("user"),Yo=["baseURL","username","password","insecureSkipVerify","basePath"],Zt=kt(Object.fromEntries(Yo.map(x=>[x,""]))),Di=W(""),Fi=W(!1),po=W(!1),nn=W(null),vi=W(null),Za=[{value:"false",label:"Verify certificate"},{value:"true",label:"Skip verification"}],Jo=we(()=>rt.isSuperadmin),Xo=we(()=>rt.isSuperadmin?"user":gi.value),Ha=we(()=>rt.scopes[Xo.value]||{editableLayer:"user",fields:{}}),on=we(()=>Xo.value==="org");function sn(x){return Ha.value.fields[x]||{effective:"",own:"",source:"unset",locked:!1}}function Jn(x){return Jo.value||sn(x).locked}function cn(x){const f=sn(x).source;return f==="global"?"Set by administrator":f==="org"?"Set by your organization":""}function _i(){for(const x of Yo)Zt[x]=sn(x).own||"";Zt.insecureSkipVerify||(Zt.insecureSkipVerify="false")}function tt(x){rt.available=!!x.available,rt.orgEnabled=x.orgEnabled!==!1,rt.enabled=!!x.enabled,rt.canEditOrg=!!x.canEditOrg,rt.isSuperadmin=!!x.isSuperadmin,rt.scopes=x.scopes||{},gi.value==="org"&&!rt.canEditOrg&&(gi.value="user"),_i(),rt.loaded=!0}It(gi,()=>{Di.value="",_i()});function yt(){if(!vi.value)return"";const x=Math.max(0,Math.round((Date.now()-vi.value)/1e3));if(x<60)return"just now";const f=Math.round(x/60);if(f<60)return`${f} min ago`;const j=Math.round(f/60);return j<24?`${j} h ago`:`${Math.round(j/24)} d ago`}function mo(){try{nn.value&&localStorage.setItem(_u,JSON.stringify({health:nn.value,ts:vi.value}))}catch{}}function bi(){try{const x=localStorage.getItem(_u);if(!x)return;const f=JSON.parse(x);f&&f.health&&(nn.value=f.health,vi.value=f.ts||null)}catch{}}async function yi(){bi();const{ok:x,body:f}=await _p();x&&tt(f)}async function go(x){const f=on.value;f?rt.orgEnabled=x:rt.enabled=x;const{ok:j,body:S}=await cu(f?{scope:"org",enabled:x}:{scope:"user",enabled:x});j?(tt(S),it(f?x?"WebDAV enabled for your organization.":"WebDAV disabled for your organization.":x?"WebDAV enabled.":"WebDAV disabled.")):(f?rt.orgEnabled=!x:rt.enabled=!x,it(S.error||"Could not update."))}async function qe(){Di.value="",Fi.value=!0;const x={};for(const Xe of Yo)Jn(Xe)||(x[Xe]=Zt[Xe]);const f={scope:Xo.value,config:x};on.value||(f.enabled=rt.enabled);const{ok:j,body:S}=await cu(f);if(Fi.value=!1,!j){Di.value=S.error||"Could not save settings.";return}tt(S),it(on.value?"Organization WebDAV settings saved.":"WebDAV settings saved.")}async function Tt(){po.value=!0,nn.value=null;const{ok:x,body:f}=await bp();po.value=!1,nn.value=x&&f.health?f.health:{status:"down",detail:f.error||"Probe failed."},vi.value=Date.now(),mo()}function Qo(x){return x==="ok"?C.success:x==="degraded"?C.warning:C.danger}const Me=kt({loaded:!1,available:!1,orgEnabled:!0,enabled:!1,canEditOrg:!1,isSuperadmin:!1,isOrgUser:!1,mounts:[],privateFolder:!1,privateEnabled:!1,allowPrivate:!0,rootConfigured:!1,scopes:{}}),At=W("user"),vo=W(""),Fn=W(""),_n=W(!1),xt=W(!1),Dt=W(null),bn=W(null),An=W({}),_o=[{value:"",label:"Inherit"},{value:"false",label:"Read-write"},{value:"true",label:"Read-only"}],Xn=we(()=>Me.isSuperadmin),Ri=we(()=>Me.isSuperadmin?"user":At.value),es=we(()=>Me.scopes[Ri.value]||{editableLayer:"user",fields:{}}),Ft=we(()=>Ri.value==="org");function xi(x){return es.value.fields[x]||{effective:"",own:"",source:"unset",locked:!1}}function bo(x){return Xn.value||xi(x).locked}function Bi(x){const f=xi(x).source;return f==="global"?"Set by administrator":f==="org"?"Set by your organization":""}function js(x){return(_o.find(f=>f.value===x)||{}).label||"Inherit"}function yo(){vo.value=xi("readOnly").own||""}function Ui(x){Me.available=!!x.available,Me.orgEnabled=x.orgEnabled!==!1,Me.enabled=!!x.enabled,Me.canEditOrg=!!x.canEditOrg,Me.isSuperadmin=!!x.isSuperadmin,Me.isOrgUser=!!x.isOrgUser,Me.mounts=Array.isArray(x.mounts)?x.mounts:[],Me.privateFolder=!!x.privateFolder,Me.privateEnabled=!!x.privateEnabled,Me.allowPrivate=x.allowPrivate!==!1,Me.rootConfigured=!!x.rootConfigured,Me.scopes=x.scopes||{},At.value==="org"&&!Me.canEditOrg&&(At.value="user"),yo(),Me.loaded=!0}It(At,()=>{Fn.value="",yo()});function Ke(){if(!bn.value)return"";const x=Math.max(0,Math.round((Date.now()-bn.value)/1e3));if(x<60)return"just now";const f=Math.round(x/60);if(f<60)return`${f} min ago`;const j=Math.round(f/60);return j<24?`${j} h ago`:`${Math.round(j/24)} d ago`}function yn(){try{Dt.value&&localStorage.setItem(bu,JSON.stringify({health:Dt.value,ts:bn.value}))}catch{}}function mt(){try{const x=localStorage.getItem(bu);if(!x)return;const f=JSON.parse(x);f&&f.health&&(Dt.value=f.health,bn.value=f.ts||null)}catch{}}async function Ws(){mt();const{ok:x,body:f}=await gp();x&&Ui(f)}async function xo(x){const f=Ft.value;f?Me.orgEnabled=x:Me.enabled=x;const{ok:j,body:S}=await fa(f?{scope:"org",enabled:x}:{scope:"user",enabled:x});j?(Ui(S),it(f?x?"Local storage enabled for your organization.":"Local storage disabled for your organization.":x?"Local storage enabled.":"Local storage disabled.")):(f?Me.orgEnabled=!x:Me.enabled=!x,it(S.error||"Could not update."))}async function ts(x){Me.privateFolder=x;const{ok:f,body:j}=await fa({scope:"user",privateFolder:x});f?(Ui(j),it(x?"Private folder enabled.":"Private folder disabled.")):(Me.privateFolder=!x,it(j.error||"Could not update."))}async function ns(x){Me.allowPrivate=x;const{ok:f,body:j}=await fa({scope:"org",allowPrivate:x});f?(Ui(j),it(x?"Members may now create private folders.":"Private folders disabled for your organization.")):(Me.allowPrivate=!x,it(j.error||"Could not update."))}async function Qn(){Fn.value="",_n.value=!0;const x={};bo("readOnly")||(x.readOnly=vo.value);const f={scope:Ri.value,config:x};Ft.value||(f.enabled=Me.enabled);const{ok:j,body:S}=await fa(f);if(_n.value=!1,!j){Fn.value=S.error||"Could not save settings.";return}Ui(S),it(Ft.value?"Organization local-storage settings saved.":"Local-storage settings saved.")}async function is(){xt.value=!0,Dt.value=null,An.value={};const{ok:x,body:f}=await vp();xt.value=!1,Dt.value=x&&f.health?f.health:{status:"down",detail:f.error||"Probe failed."};const j={};if(Array.isArray(f.mounts))for(const S of f.mounts)j[S.id]={status:S.status,detail:S.detail};An.value=j,bn.value=Date.now(),yn()}function wi(x){return x==="ok"?C.success:x==="degraded"?C.warning:C.danger}const Et=[{id:"apis-external",label:"APIs — External",icon:"globe"},{id:"drives-external",label:"Drives — External",icon:"server"},{id:"drives-local",label:"Drives — Local",icon:"monitor"}],En=W("apis-external");function wo(x){return B.value||En.value===x}const Vi=W("");let os=null;function it(x){Vi.value=x,clearTimeout(os),os=setTimeout(()=>Vi.value="",2200)}const Rt=kt({current:"",next:"",confirm:""}),ki=W(""),ss=W(!1);function nt(){if(ss.value=!1,!Rt.current)return ki.value="Enter your current password.";if(Rt.next.length<8)return ki.value="New password must be at least 8 characters.";if(Rt.next!==Rt.confirm)return ki.value="New passwords do not match.";ki.value="Validated. Connecting to the account service is pending — no password endpoint yet.",Rt.current=Rt.next=Rt.confirm=""}const as=W("");function dn(){as.value="Verification link would be sent once the account service is wired up."}function Zi(x){const f=x.target.files&&x.target.files[0];if(!f)return;if(f.size>1.5*1024*1024){it("Image too large (max ~1.5 MB).");return}const j=new FileReader;j.onload=()=>{ve.avatar=String(j.result),it("Photo updated.")},j.readAsDataURL(f)}function Ks(){ve.avatar="",it("Photo removed.")}const ja=we(()=>{var j,S,Xe;const f=(ve.displayName||ve.name||s.email||"PV").split("@")[0].split(/[.\-_ ]+/).filter(Boolean);return((((j=f[0])==null?void 0:j[0])||"P")+(((S=f[1])==null?void 0:S[0])||((Xe=f[0])==null?void 0:Xe[1])||"V")).toUpperCase()}),ei=W(!1),Gs=W(""),Hi=W(""),ji=W(""),ko=W([]);function Wi(x){const f="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";let j="";for(let S=0;S<x;S++)j+=f[Math.floor(Math.random()*f.length)];return j}function Wa(){Gs.value=Wi(16).replace(/(.{4})/g,"$1 ").trim(),Hi.value="",ji.value="",ei.value=!0}function xn(){if(!/^\d{6}$/.test(Hi.value)){ji.value="Enter the 6-digit code from your authenticator app.";return}ve.twoFactor=!0,ei.value=!1,ko.value=Array.from({length:8},()=>Wi(4).toLowerCase()+"-"+Wi(4).toLowerCase()),ji.value=""}function Ka(){ve.twoFactor=!1,ko.value=[],ei.value=!1}const fn=navigator.userAgent;function Rn(){return/Edg\//.test(fn)?"Edge":/OPR\//.test(fn)?"Opera":/Chrome\//.test(fn)?"Chrome":/Firefox\//.test(fn)?"Firefox":/Safari\//.test(fn)?"Safari":"Browser"}function qs(){return/Windows/.test(fn)?"Windows":/Mac OS X/.test(fn)?"macOS":/Android/.test(fn)?"Android":/iPhone|iPad/.test(fn)?"iOS":/Linux/.test(fn)?"Linux":"Unknown OS"}const Ys=Date.now(),Si=W([]),Ki=W(!1),Gi=W(""),Ct=kt({email:"",password:"",role:"user",organization:""}),Ti=W(""),So=W(!1),ti=W(""),Js=we(()=>{const x=[{value:"user",label:"User"},{value:"admin",label:"Admin"}];return u.value&&x.push({value:"superadmin",label:"Superadmin"}),x}),qi=W([]);async function Pi(){if(!d.value)return;const x=await sp();x.ok&&(qi.value=x.organizations.slice().sort((f,j)=>f.name.localeCompare(j.name)))}const Yi=we(()=>{const x=qi.value.map(f=>({value:f.id,label:f.name}));return u.value&&x.unshift({value:"",label:"No organization"}),x});async function an(){if(!d.value)return;Ki.value=!0,Gi.value="";const x=await tp();if(Ki.value=!1,!x.ok){Gi.value=x.status===403?"Manager role required.":"Could not load users.";return}Si.value=x.users.slice().sort((f,j)=>f.email.localeCompare(j.email))}function To(x){try{const f=x.data||{},j=Object.keys(f)[0];return j&&f[j]&&f[j].message||x.message||x.error||"Invalid input."}catch{return x.error||"Could not create user."}}async function Ji(){Ti.value="";const x=Ct.email.trim().toLowerCase();if(!x.includes("@"))return Ti.value="Enter a valid email.";if(Ct.password.length<8)return Ti.value="Password must be at least 8 characters.";So.value=!0;const f=u.value?Ct.organization:s.organization,{ok:j,body:S}=await np(x,Ct.password,Ct.role,f);if(So.value=!1,!j)return Ti.value=To(S);Ct.email="",Ct.password="",Ct.role="user",Ct.organization="",it("User created."),an()}async function rn(x){const{ok:f,body:j}=await op(x.id);if(ti.value="",!f)return it(j.error||"Could not remove user.");it("User removed."),an()}const st=kt({id:"",email:"",role:"user",verified:!1,password:"",organization:""}),On=W(""),Po=W(!1),Xi=we(()=>!!st.id&&st.email===s.email);function rs(x){ti.value="",st.id=x.id,st.email=x.email,st.role=x.role||"user",st.verified=!!x.verified,st.password="",st.organization=x.organization||"",On.value=""}function Xs(){st.id="",On.value=""}async function Ga(){On.value="";const x=st.email.trim().toLowerCase();if(!x.includes("@"))return On.value="Enter a valid email.";if(st.password&&st.password.length<8)return On.value="New password must be at least 8 characters (or leave blank).";const f={email:x,role:st.role,verified:st.verified};u.value&&(f.organization=st.organization),st.password&&(f.password=st.password),Po.value=!0;const{ok:j,body:S}=await ip(st.id,f);if(Po.value=!1,!j)return On.value=To(S);it("User updated."),Xs(),an()}const Qi=kt({name:""}),eo=W(""),Ht=W(!1),wn=W(""),zn=kt({id:"",name:""}),Bt=W(""),ls=we(()=>{const x={};for(const f of Si.value)f.organization&&(x[f.organization]=(x[f.organization]||0)+1);return x});async function ni(){eo.value="";const x=Qi.name.trim();if(!x)return eo.value="Enter an organization name.";Ht.value=!0;const{ok:f,body:j}=await ap(x);if(Ht.value=!1,!f)return eo.value=To(j);Qi.name="",it("Organization created."),Pi()}function qa(x){wn.value="",zn.id=x.id,zn.name=x.name,Bt.value=""}function Ci(){zn.id="",Bt.value=""}async function us(){Bt.value="";const x=zn.name.trim();if(!x)return Bt.value="Enter an organization name.";const{ok:f,body:j}=await rp(zn.id,x);if(!f)return Bt.value=To(j);it("Organization renamed."),Ci(),Pi(),an()}async function Co(x){const{ok:f,body:j}=await lp(x.id);if(wn.value="",!f)return it(j.error||"Could not delete organization.");it("Organization deleted."),Pi()}function Ya(){const x={_app:"PilotVault",_kind:"settings-export",exportedAt:new Date().toISOString(),email:s.email,prefs:{...ve},themeMode:co.value},f=new Blob([JSON.stringify(x,null,2)],{type:"application/json"}),j=URL.createObjectURL(f),S=document.createElement("a");S.href=j,S.download=`pilotvault-settings-${new Date().toISOString().slice(0,10)}.json`,document.body.appendChild(S),S.click(),S.remove(),URL.revokeObjectURL(j),it("Settings exported.")}const hn=W("");function Lo(x){const f=x.target.files&&x.target.files[0];if(!f)return;const j=new FileReader;j.onload=()=>{try{const S=JSON.parse(String(j.result)),Xe=S.prefs||S;if(!Vc(Xe))throw new Error("bad shape");S.themeMode&&Pa(S.themeMode),Gr(ve.fontSize),qr(ve.reduceMotion),hn.value="Settings imported and applied."}catch{hn.value="That file is not a valid PilotVault settings export."}},j.readAsText(f),x.target.value=""}const _t=kt({understand:!1,typed:"",cooldown:0,armed:!1,msg:""});let ii=null;const cs=we(()=>s.email||"DELETE MY ACCOUNT"),pn=we(()=>_t.understand&&_t.typed===cs.value);function Ja(){pn.value&&(_t.armed=!0,_t.cooldown=5,clearInterval(ii),ii=setInterval(()=>{_t.cooldown--,_t.cooldown<=0&&clearInterval(ii)},1e3))}It(pn,x=>{!x&&_t.armed&&(_t.armed=!1,_t.cooldown=0,clearInterval(ii))});function Li(){if(!(!_t.armed||_t.cooldown>0)){try{localStorage.removeItem("pv_prefs")}catch{}_t.msg="Account deletion requires the account service. Local data was cleared and you were signed out.",setTimeout(()=>l("logout"),900)}}return hi(()=>{ne=setInterval(()=>ze.value=Date.now(),1e3),Pi(),an(),U(),Zs(),yi(),Ws()}),Ho(()=>{clearInterval(ne),clearInterval(ii),clearTimeout(os)}),(x,f)=>(p(),g("div",bm,[r("div",ym,[f[63]||(f[63]=r("div",null,[r("div",{class:"eyebrow"},"Preferences"),r("h2",{class:"mt-0.5 text-[22px] font-bold tracking-tightest text-ink"},"Settings")],-1)),r("div",xm,[E(X,{name:"search",size:16,class:"text-ink-muted"}),re(r("input",{"onUpdate:modelValue":f[0]||(f[0]=j=>R.value=j),placeholder:"Search settings…",class:"w-full border-none bg-transparent text-sm text-ink outline-none placeholder:text-ink-muted"},null,512),[[Se,R.value]]),R.value?(p(),g("button",{key:0,class:"text-ink-muted hover:text-ink","aria-label":"Clear search",onClick:f[1]||(f[1]=j=>R.value="")},[E(X,{name:"x",size:15})])):D("",!0)])]),r("div",wm,[re(r("nav",km,[(p(!0),g(ue,null,Be(T.value,j=>(p(),g("button",{key:j.id,class:Ee(["flex items-center gap-2.5 rounded px-3 py-2.5 text-left text-sm transition",[M.value===j.id?j.danger?"bg-danger-soft font-semibold text-danger-fg":"bg-accent-soft font-semibold text-accent-soft-fg":j.danger?"font-medium text-danger-fg hover:bg-danger-soft":"font-medium text-ink-secondary hover:bg-surface-2"]]),onClick:S=>M.value=j.id},[E(X,{name:j.icon,size:17},null,8,["name"]),r("span",Tm,k(j.label),1)],10,Sm))),128))],512),[[xh,!B.value]]),r("div",Pm,[B.value&&!q.value.length?(p(),g("div",Cm," No settings match “"+k(R.value)+"”. ",1)):D("",!0),(p(!0),g(ue,null,Be(q.value,j=>(p(),g(ue,{key:j.id},[B.value?(p(),g("div",Lm,[E(X,{name:j.icon,size:14},null,8,["name"]),$(" "+k(j.label),1)])):D("",!0),j.id==="account"?(p(),g("div",Mm,[E(Ae,{title:"Full name",desc:"Shown to your team on flights and audit logs.",keywords:"full name account"},{default:Pe(()=>[re(r("input",{"onUpdate:modelValue":f[2]||(f[2]=S=>Oe(ve).name=S),class:"field w-56",placeholder:"Jane Operator",onBlur:f[3]||(f[3]=S=>it("Saved."))},null,544),[[Se,Oe(ve).name]])]),_:1}),E(Ae,{title:"Username",desc:"Your unique handle within PilotVault.",keywords:"username handle"},{default:Pe(()=>[r("div",Am,[f[64]||(f[64]=r("span",{class:"text-sm text-ink-muted"},"@",-1)),re(r("input",{"onUpdate:modelValue":f[4]||(f[4]=S=>Oe(ve).username=S),class:"field w-48",placeholder:"jane",onBlur:f[5]||(f[5]=S=>it("Saved."))},null,544),[[Se,Oe(ve).username]])])]),_:1}),E(Ae,{title:"Email address",desc:"Used for sign-in and notifications.",keywords:"email verification verify"},{default:Pe(()=>[r("div",Em,[r("span",Om,k(t.email||"—"),1),r("span",zm,[E(X,{name:"mail",size:12}),f[65]||(f[65]=$(" Unverified ",-1))])])]),_:1}),E(Ae,{title:"Role",desc:"Your access level in PilotVault.",keywords:"role admin user superadmin access rights permissions"},{default:Pe(()=>[r("span",{class:Ee(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",b(t.role)])},[E(X,{name:v(t.role),size:12},null,8,["name"]),$(k(h(t.role)),1)],2)]),_:1}),E(Ae,{title:"Organization",desc:"The organization your account belongs to.",keywords:"organization org tenant company"},{default:Pe(()=>[r("span",{class:Ee(["text-sm",t.organizationName?"text-ink":"text-ink-muted"])},k(t.organizationName||(u.value?"All organizations":"None")),3)]),_:1}),E(Ae,{block:"",title:"Verify email",desc:"Confirm ownership to enable password resets and alerts.",keywords:"verify email resend"},{default:Pe(()=>[r("button",{class:"btn-ghost",onClick:dn},"Send verification link"),as.value?(p(),g("p",Im,k(as.value),1)):D("",!0)]),_:1}),E(Ae,{block:"",title:"Change password",desc:"Use at least 8 characters.",keywords:"password change current new"},{default:Pe(()=>[r("div",$m,[re(r("input",{"onUpdate:modelValue":f[6]||(f[6]=S=>Rt.current=S),type:"password",class:"field",placeholder:"Current password"},null,512),[[Se,Rt.current]]),re(r("input",{"onUpdate:modelValue":f[7]||(f[7]=S=>Rt.next=S),type:"password",class:"field",placeholder:"New password"},null,512),[[Se,Rt.next]]),re(r("input",{"onUpdate:modelValue":f[8]||(f[8]=S=>Rt.confirm=S),type:"password",class:"field",placeholder:"Confirm new password"},null,512),[[Se,Rt.confirm]]),r("div",Nm,[r("button",{class:"btn-accent",onClick:nt},"Update password"),ki.value?(p(),g("span",{key:0,class:Ee(["text-xs",ss.value?"text-success-fg":"text-ink-muted"])},k(ki.value),3)):D("",!0)])])]),_:1})])):j.id==="appearance"?(p(),g("div",Dm,[E(Ae,{title:"Theme",desc:"Light, dark, or follow your system.",keywords:"theme light dark system appearance"},{default:Pe(()=>[E(Tn,{modelValue:Te.value,"onUpdate:modelValue":f[9]||(f[9]=S=>Te.value=S),options:fe},null,8,["modelValue"])]),_:1}),E(Ae,{title:"Font size",desc:"Scales the entire interface for readability.",keywords:"font size accessibility text"},{default:Pe(()=>[E(Tn,{modelValue:Oe(ve).fontSize,"onUpdate:modelValue":f[10]||(f[10]=S=>Oe(ve).fontSize=S),options:Ue},null,8,["modelValue"])]),_:1}),E(Ae,{title:"Reduce motion",desc:"Minimise animations and transitions.",keywords:"reduce motion accessibility animation"},{default:Pe(()=>[E(un,{modelValue:Oe(ve).reduceMotion,"onUpdate:modelValue":f[11]||(f[11]=S=>Oe(ve).reduceMotion=S)},null,8,["modelValue"])]),_:1}),E(Ae,{title:"Language",desc:"Interface language.",keywords:"language locale"},{default:Pe(()=>[re(r("select",{"onUpdate:modelValue":f[12]||(f[12]=S=>Oe(ve).language=S),class:"field w-48"},[(p(),g(ue,null,Be(Ie,([S,Xe])=>r("option",{key:S,value:S},k(Xe),9,Fm)),64))],512),[[Mt,Oe(ve).language]])]),_:1}),E(Ae,{title:"Region",desc:"Affects number, unit and date defaults.",keywords:"region country locale"},{default:Pe(()=>[re(r("select",{"onUpdate:modelValue":f[13]||(f[13]=S=>Oe(ve).region=S),class:"field w-48"},[(p(!0),g(ue,null,Be(Oe(Ge),([S,Xe])=>(p(),g("option",{key:S,value:S},k(Xe),9,Rm))),128))],512),[[Mt,Oe(ve).region]])]),_:1}),E(Ae,{title:"Date format",desc:"How calendar dates are displayed.",keywords:"date format"},{default:Pe(()=>[re(r("select",{"onUpdate:modelValue":f[14]||(f[14]=S=>Oe(ve).dateFormat=S),class:"field w-48"},[(p(),g(ue,null,Be(ye,([S,Xe])=>r("option",{key:S,value:S},k(Xe),9,Bm)),64))],512),[[Mt,Oe(ve).dateFormat]])]),_:1}),E(Ae,{title:"Time format",desc:"12- or 24-hour clock.",keywords:"time format clock 12 24 hour"},{default:Pe(()=>[E(Tn,{modelValue:Oe(ve).timeFormat,"onUpdate:modelValue":f[15]||(f[15]=S=>Oe(ve).timeFormat=S),options:$e},null,8,["modelValue"])]),_:1}),E(Ae,{title:"Preview",desc:"How timestamps appear across the app.",keywords:"preview date time"},{default:Pe(()=>[r("span",Um,k(je.value),1)]),_:1}),f[66]||(f[66]=r("p",{class:"mt-3 text-xs text-ink-muted"}," Language & region are stored now; full localisation ships with the account service. ",-1))])):j.id==="integrations"?(p(),g("div",Vm,[B.value?D("",!0):(p(),g("div",Zm,[(p(),g(ue,null,Be(Et,S=>r("button",{key:S.id,type:"button",class:Ee(["-mb-px inline-flex items-center gap-1.5 whitespace-nowrap border-b-2 px-3 py-2 text-sm font-semibold transition",En.value===S.id?"border-accent text-ink":"border-transparent text-ink-secondary hover:text-ink"]),onClick:Xe=>En.value=S.id},[E(X,{name:S.icon,size:16},null,8,["name"]),$(k(S.label),1)],10,Hm)),64))])),wo("apis-external")?(p(),g("div",jm,[r("div",Wm,[r("div",Km,[E(X,{name:"radio",size:20})]),f[67]||(f[67]=r("div",{class:"min-w-0"},[r("div",{class:"text-sm font-semibold text-ink"},"OpenSky Network"),r("div",{class:"mt-0.5 text-xs text-ink-muted"}," Live ADS-B aircraft data. Configure your own OAuth2 credentials, plan and default bounding box. ")],-1))]),ie.loaded&&!ie.available?(p(),g("div",Gm,[E(X,{name:"lock",size:14,class:"mr-1 inline"}),f[68]||(f[68]=$(" OpenSky is currently disabled by your administrator. Contact them to enable it. ",-1))])):D("",!0),ie.canEditOrg?(p(),g("div",qm,[f[69]||(f[69]=r("div",{class:"text-xs text-ink-muted"},"Manage your own settings, or organization-wide settings that apply to every user.",-1)),E(Tn,{modelValue:We.value,"onUpdate:modelValue":f[16]||(f[16]=S=>We.value=S),options:ut},null,8,["modelValue"])])):D("",!0),me.value?(p(),lt(Ae,{key:2,title:"Enable OpenSky (organization-wide)",desc:"Turn OpenSky on or off for everyone in your organization.",keywords:"enable disable plugin opensky organization"},{default:Pe(()=>[E(un,{"model-value":ie.orgEnabled,disabled:!ie.available,"onUpdate:modelValue":O},null,8,["model-value","disabled"])]),_:1})):(p(),lt(Ae,{key:3,title:"Enable OpenSky",desc:"Turn the plugin on for your account in the Web App.",keywords:"enable disable plugin opensky"},{default:Pe(()=>[E(un,{"model-value":ie.enabled,disabled:!ie.available||!ie.orgEnabled,"onUpdate:modelValue":O},null,8,["model-value","disabled"])]),_:1})),!me.value&&ie.available&&!ie.orgEnabled?(p(),g("div",Ym,[E(X,{name:"lock",size:13,class:"mr-1 inline"}),f[71]||(f[71]=$("OpenSky is turned off for your organization",-1)),ie.canEditOrg?(p(),g("span",Jm,[...f[70]||(f[70]=[$(" — switch to ",-1),r("span",{class:"font-semibold"},"Organization",-1),$(" to turn it back on",-1)])])):D("",!0),f[72]||(f[72]=$(". ",-1))])):D("",!0),me.value?(p(),g("div",Xm,[E(X,{name:"users",size:13,class:"mr-1 inline"}),f[73]||(f[73]=$("These are organization-wide settings — they apply to everyone in ",-1)),r("span",Qm,k(t.organizationName||"your organization"),1),f[74]||(f[74]=$(". Leave a field blank to let each user choose their own; a value set here overrides the user's. ",-1))])):te.value?(p(),g("div",eg," As a superadmin you manage the global OpenSky configuration in the API Server panel. The effective configuration is shown below. ")):D("",!0),ie.available&&!me.value?(p(),g("div",tg,[r("div",ng,[r("div",ig,[E(X,{name:"signal",size:15}),f[75]||(f[75]=$("Credit usage ",-1))]),be.value?(p(),g("span",og,"Checked "+k(Y()),1)):D("",!0)]),Ne.value?(p(),g(ue,{key:0},[Ne.value.remaining!=null?(p(),g(ue,{key:0},[r("div",sg,[r("span",ag,k(Ze(Ne.value.remaining)),1),r("span",rg,"/ "+k(Ze(Ne.value.daily))+" credits left today",1)]),r("div",lg,[r("div",{class:Ee(["h-full rounded-full transition-all",at.value]),style:Bo({width:dt.value+"%"})},null,6)]),r("div",ug," Used "+k(Ze(Ne.value.daily-Ne.value.remaining))+" today · "+k(Ne.value.probeCost)+" credit"+k(Ne.value.probeCost===1?"":"s")+" per query · "+k(Ne.value.mode),1)],64)):(p(),g(ue,{key:1},[r("div",cg,[f[76]||(f[76]=$("Daily allowance: ",-1)),r("span",dg,k(Ze(Ne.value.daily)),1),f[77]||(f[77]=$(" credits",-1))]),r("div",fg,k(Ne.value.probeCost)+" credit"+k(Ne.value.probeCost===1?"":"s")+" per query · "+k(Ne.value.mode)+". OpenSky only reports live remaining credits for authenticated requests — add OAuth2 credentials below to track usage. ",1)],64))],64)):(p(),g("div",hg,[...f[78]||(f[78]=[$(" Run ",-1),r("span",{class:"font-semibold text-ink-secondary"},"Test connection",-1),$(" below to fetch your live OpenSky credit balance. ",-1)])]))])):D("",!0),E(Ae,{title:"OpenSky plan",desc:"Your account tier — sets the daily credit allowance.",keywords:"plan tier credits"},{default:Pe(()=>[ke("plan")?(p(),g("span",pg,[$(k((gt.find(S=>S.value===oe("plan").effective)||{}).label||oe("plan").effective||"—")+" ",1),Ce("plan")?(p(),g("span",mg,[E(X,{name:"lock",size:10}),$(k(Ce("plan")),1)])):D("",!0)])):(p(),lt(Tn,{key:1,modelValue:le.plan,"onUpdate:modelValue":f[17]||(f[17]=S=>le.plan=S),options:gt},null,8,["modelValue"]))]),_:1}),E(Ae,{title:"Default bounding box",desc:"Automatic follows your location; or pick a region, or enter lamin,lomin,lamax,lomax by hand.",keywords:"bounding box bbox area region country continent world europe custom coordinates automatic location drone"},{default:Pe(()=>[ke("bbox")?(p(),g("span",gg,[$(k(w(oe("bbox").effective)||oe("bbox").effective||"—")+" ",1),Ce("bbox")?(p(),g("span",vg,[E(X,{name:"lock",size:10}),$(k(Ce("bbox")),1)])):D("",!0)])):(p(),g("div",_g,[re(r("select",{"onUpdate:modelValue":f[18]||(f[18]=S=>H.value=S),class:"field w-64"},[me.value?D("",!0):(p(),g("option",bg,"Automatic (by location)")),(p(),g(ue,null,Be(wt,S=>r("optgroup",{key:S.label,label:S.label},[(p(!0),g(ue,null,Be(S.options,Xe=>(p(),g("option",{key:Xe.value,value:Xe.value},k(Xe.label),9,xg))),128))],8,yg)),64)),f[79]||(f[79]=r("option",{value:"__custom__"},"Custom…",-1))],512),[[Mt,H.value]]),ae.value?(p(),g("p",wg," Live map follows drone location → your device location → your Region ("+k(_e.value)+"). ",1)):D("",!0),V.value?re((p(),g("input",{key:1,"onUpdate:modelValue":f[19]||(f[19]=S=>le.bbox=S),class:"field w-64 font-mono",placeholder:"50.5,3.2,53.7,7.3"},null,512)),[[Se,le.bbox]]):D("",!0)]))]),_:1}),E(Ae,{title:"OAuth2 client ID",desc:"Optional — leave blank for anonymous access (lower limits).",keywords:"oauth client id credentials"},{default:Pe(()=>[ke("clientId")?(p(),g("span",kg,[$(k(oe("clientId").effective||"—")+" ",1),Ce("clientId")?(p(),g("span",Sg,[E(X,{name:"lock",size:10}),$(k(Ce("clientId")),1)])):D("",!0)])):re((p(),g("input",{key:1,"onUpdate:modelValue":f[20]||(f[20]=S=>le.clientId=S),class:"field w-64",placeholder:"your-api-client"},null,512)),[[Se,le.clientId]])]),_:1}),E(Ae,{title:"OAuth2 client secret",desc:"Paired with the client ID for authenticated access.",keywords:"oauth client secret credentials password"},{default:Pe(()=>[ke("clientSecret")?(p(),g("span",Tg,[$(k(oe("clientSecret").effective||"—")+" ",1),Ce("clientSecret")?(p(),g("span",Pg,[E(X,{name:"lock",size:10}),$(k(Ce("clientSecret")),1)])):D("",!0)])):re((p(),g("input",{key:1,"onUpdate:modelValue":f[21]||(f[21]=S=>le.clientSecret=S),type:"password",class:"field w-64",placeholder:"••••••••"},null,512)),[[Se,le.clientSecret]])]),_:1}),ie.available&&!ie.allowAnonymous?(p(),g("div",Cg," Anonymous access is disabled by the administrator — OpenSky needs OAuth2 credentials from some layer to work. ")):D("",!0),r("div",Lg,[te.value?D("",!0):(p(),g("button",{key:0,class:"btn-accent",disabled:se.value||!ie.available,onClick:xe},k(se.value?"Saving…":me.value?"Save organization settings":"Save settings"),9,Mg)),me.value?D("",!0):(p(),g("button",{key:1,class:"btn-ghost",disabled:ot.value||!ie.available,onClick:Je},k(ot.value?"Testing…":"Test connection"),9,Ag)),ce.value?(p(),g("span",Eg,k(ce.value),1)):D("",!0),ee.value&&!me.value?(p(),g("span",{key:3,class:Ee(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",pt(ee.value.status)])},[f[80]||(f[80]=r("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),$(k(ee.value.detail||ee.value.status),1)],2)):D("",!0)])])):D("",!0),wo("drives-external")?(p(),g(ue,{key:2},[r("div",Og,[r("div",zg,[r("div",Ig,[E(X,{name:"server",size:20})]),f[81]||(f[81]=r("div",{class:"min-w-0"},[r("div",{class:"text-sm font-semibold text-ink"},"File Transfer (FTP / SFTP)"),r("div",{class:"mt-0.5 text-xs text-ink-muted"}," Connect to an FTP, FTPS or SFTP server. Configure the connection your account uses for file transfers. ")],-1))]),Ve.loaded&&!Ve.available?(p(),g("div",$g,[E(X,{name:"lock",size:14,class:"mr-1 inline"}),f[82]||(f[82]=$(" File transfer is currently disabled by your administrator. Contact them to enable it. ",-1))])):D("",!0),Ve.canEditOrg?(p(),g("div",Ng,[f[83]||(f[83]=r("div",{class:"text-xs text-ink-muted"},"Manage your own settings, or organization-wide settings that apply to every user.",-1)),E(Tn,{modelValue:Vt.value,"onUpdate:modelValue":f[22]||(f[22]=S=>Vt.value=S),options:ut},null,8,["modelValue"])])):D("",!0),vn.value?(p(),lt(Ae,{key:2,title:"Enable file transfer (organization-wide)",desc:"Turn it on or off for everyone in your organization.",keywords:"enable disable plugin ftp sftp organization"},{default:Pe(()=>[E(un,{"model-value":Ve.orgEnabled,disabled:!Ve.available,"onUpdate:modelValue":Go},null,8,["model-value","disabled"])]),_:1})):(p(),lt(Ae,{key:3,title:"Enable file transfer",desc:"Turn the plugin on for your account in the Web App.",keywords:"enable disable plugin ftp sftp"},{default:Pe(()=>[E(un,{"model-value":Ve.enabled,disabled:!Ve.available||!Ve.orgEnabled,"onUpdate:modelValue":Go},null,8,["model-value","disabled"])]),_:1})),!vn.value&&Ve.available&&!Ve.orgEnabled?(p(),g("div",Dg,[E(X,{name:"lock",size:13,class:"mr-1 inline"}),f[85]||(f[85]=$("File transfer is turned off for your organization",-1)),Ve.canEditOrg?(p(),g("span",Fg,[...f[84]||(f[84]=[$(" — switch to ",-1),r("span",{class:"font-semibold"},"Organization",-1),$(" to turn it back on",-1)])])):D("",!0),f[86]||(f[86]=$(". ",-1))])):D("",!0),vn.value?(p(),g("div",Rg,[E(X,{name:"users",size:13,class:"mr-1 inline"}),f[87]||(f[87]=$("These are organization-wide settings — they apply to everyone in ",-1)),r("span",Bg,k(t.organizationName||"your organization"),1),f[88]||(f[88]=$(". Leave the connection blank to let each user configure their own; a connection set here overrides the user's. ",-1))])):Wo.value?(p(),g("div",Ug," As a superadmin you manage the global file-transfer configuration in the API Server panel. The effective configuration is shown below. ")):D("",!0),E(Ae,{title:"Protocol",desc:"SFTP (over SSH), FTPS (FTP over TLS), or plain FTP.",keywords:"protocol sftp ftps ftp"},{default:Pe(()=>[en("protocol")?(p(),g("span",Vg,[$(k(Va(Ot("protocol").effective))+" ",1),Pt("protocol")?(p(),g("span",Zg,[E(X,{name:"lock",size:10}),$(k(Pt("protocol")),1)])):D("",!0)])):(p(),lt(Tn,{key:1,modelValue:Fe.protocol,"onUpdate:modelValue":f[23]||(f[23]=S=>Fe.protocol=S),options:jo},null,8,["modelValue"]))]),_:1}),E(Ae,{title:"Host",desc:"Server hostname or IP address.",keywords:"host server address"},{default:Pe(()=>[en("host")?(p(),g("span",Hg,[$(k(Ot("host").effective||"—")+" ",1),Pt("host")?(p(),g("span",jg,[E(X,{name:"lock",size:10}),$(k(Pt("host")),1)])):D("",!0)])):re((p(),g("input",{key:1,"onUpdate:modelValue":f[24]||(f[24]=S=>Fe.host=S),class:"field w-64",placeholder:"files.example.com"},null,512)),[[Se,Fe.host]])]),_:1}),E(Ae,{title:"Port",desc:"Leave blank for the protocol default (22 for SFTP, 21 for FTP/FTPS).",keywords:"port"},{default:Pe(()=>[en("port")?(p(),g("span",Wg,[$(k(Ot("port").effective||"default")+" ",1),Pt("port")?(p(),g("span",Kg,[E(X,{name:"lock",size:10}),$(k(Pt("port")),1)])):D("",!0)])):re((p(),g("input",{key:1,"onUpdate:modelValue":f[25]||(f[25]=S=>Fe.port=S),inputmode:"numeric",class:"field w-24 font-mono",placeholder:"22"},null,512)),[[Se,Fe.port]])]),_:1}),E(Ae,{title:"Username",desc:"Account used to authenticate.",keywords:"username login account"},{default:Pe(()=>[en("username")?(p(),g("span",Gg,[$(k(Ot("username").effective||"—")+" ",1),Pt("username")?(p(),g("span",qg,[E(X,{name:"lock",size:10}),$(k(Pt("username")),1)])):D("",!0)])):re((p(),g("input",{key:1,"onUpdate:modelValue":f[26]||(f[26]=S=>Fe.username=S),class:"field w-64",placeholder:"user"},null,512)),[[Se,Fe.username]])]),_:1}),E(Ae,{title:"Password",desc:"Password auth for FTP/FTPS, or SFTP password login. Leave blank to use a key.",keywords:"password secret credentials"},{default:Pe(()=>[en("password")?(p(),g("span",Yg,[$(k(Ot("password").effective||"—")+" ",1),Pt("password")?(p(),g("span",Jg,[E(X,{name:"lock",size:10}),$(k(Pt("password")),1)])):D("",!0)])):re((p(),g("input",{key:1,"onUpdate:modelValue":f[27]||(f[27]=S=>Fe.password=S),type:"password",class:"field w-64",placeholder:"••••••••"},null,512)),[[Se,Fe.password]])]),_:1}),ho.value==="sftp"?(p(),lt(Ae,{key:7,block:"",title:"SSH private key",desc:"PEM key for SFTP key auth — used instead of, or alongside, a password.",keywords:"private key ssh pem identity"},{default:Pe(()=>[en("privateKey")?(p(),g("span",Xg,[$(k(Ot("privateKey").effective||"—")+" ",1),Pt("privateKey")?(p(),g("span",Qg,[E(X,{name:"lock",size:10}),$(k(Pt("privateKey")),1)])):D("",!0)])):re((p(),g("textarea",{key:1,"onUpdate:modelValue":f[28]||(f[28]=S=>Fe.privateKey=S),rows:"3",class:"field w-full font-mono text-xs",placeholder:"-----BEGIN OPENSSH PRIVATE KEY-----"},null,512)),[[Se,Fe.privateKey]])]),_:1})):D("",!0),ho.value==="sftp"?(p(),lt(Ae,{key:8,title:"Private key passphrase",desc:"Passphrase protecting the SSH private key, if any.",keywords:"passphrase key secret"},{default:Pe(()=>[en("keyPassphrase")?(p(),g("span",ev,[$(k(Ot("keyPassphrase").effective||"—")+" ",1),Pt("keyPassphrase")?(p(),g("span",tv,[E(X,{name:"lock",size:10}),$(k(Pt("keyPassphrase")),1)])):D("",!0)])):re((p(),g("input",{key:1,"onUpdate:modelValue":f[29]||(f[29]=S=>Fe.keyPassphrase=S),type:"password",class:"field w-64",placeholder:"••••••••"},null,512)),[[Se,Fe.keyPassphrase]])]),_:1})):D("",!0),ho.value==="sftp"?(p(),lt(Ae,{key:9,title:"Host key fingerprint",desc:"Optional SHA256:… fingerprint to pin the server's host key. Blank accepts any key.",keywords:"host key fingerprint verify trust"},{default:Pe(()=>[en("hostKeyFingerprint")?(p(),g("span",nv,[$(k(Ot("hostKeyFingerprint").effective||"—")+" ",1),Pt("hostKeyFingerprint")?(p(),g("span",iv,[E(X,{name:"lock",size:10}),$(k(Pt("hostKeyFingerprint")),1)])):D("",!0)])):re((p(),g("input",{key:1,"onUpdate:modelValue":f[30]||(f[30]=S=>Fe.hostKeyFingerprint=S),class:"field w-full font-mono text-xs",placeholder:"SHA256:…"},null,512)),[[Se,Fe.hostKeyFingerprint]])]),_:1})):D("",!0),ho.value==="ftps"?(p(),lt(Ae,{key:10,title:"TLS verification",desc:"Skip only for self-signed test servers.",keywords:"tls certificate verify insecure ftps"},{default:Pe(()=>[en("insecureSkipVerify")?(p(),g("span",ov,[$(k(Ot("insecureSkipVerify").effective==="true"?"Skip verification":"Verify certificate")+" ",1),Pt("insecureSkipVerify")?(p(),g("span",sv,[E(X,{name:"lock",size:10}),$(k(Pt("insecureSkipVerify")),1)])):D("",!0)])):(p(),lt(Tn,{key:1,modelValue:Fe.insecureSkipVerify,"onUpdate:modelValue":f[31]||(f[31]=S=>Fe.insecureSkipVerify=S),options:Ba},null,8,["modelValue"]))]),_:1})):D("",!0),E(Ae,{title:"Base path",desc:"Working directory and health-check target, e.g. /uploads.",keywords:"base path directory folder root"},{default:Pe(()=>[en("basePath")?(p(),g("span",av,[$(k(Ot("basePath").effective||"—")+" ",1),Pt("basePath")?(p(),g("span",rv,[E(X,{name:"lock",size:10}),$(k(Pt("basePath")),1)])):D("",!0)])):re((p(),g("input",{key:1,"onUpdate:modelValue":f[32]||(f[32]=S=>Fe.basePath=S),class:"field w-64 font-mono",placeholder:"/uploads"},null,512)),[[Se,Fe.basePath]])]),_:1}),r("div",lv,[Wo.value?D("",!0):(p(),g("button",{key:0,class:"btn-accent",disabled:qn.value||!Ve.available,onClick:qo},k(qn.value?"Saving…":vn.value?"Save organization settings":"Save settings"),9,uv)),vn.value?D("",!0):(p(),g("button",{key:1,class:"btn-ghost",disabled:fo.value||!Ve.available,onClick:Hs},k(fo.value?"Testing…":"Test connection"),9,cv)),Nt.value?(p(),g("span",dv,k(Nt.value),1)):D("",!0),Yn.value&&!vn.value?(p(),g("span",fv,"Checked "+k(Le()),1)):D("",!0),gn.value&&!vn.value?(p(),g("span",{key:4,class:Ee(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",mi(gn.value.status)])},[f[89]||(f[89]=r("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),$(k(gn.value.detail||gn.value.status),1)],2)):D("",!0)])]),r("div",hv,[r("div",pv,[r("div",mv,[E(X,{name:"cloud",size:20})]),f[90]||(f[90]=r("div",{class:"min-w-0"},[r("div",{class:"text-sm font-semibold text-ink"},"WebDAV"),r("div",{class:"mt-0.5 text-xs text-ink-muted"}," Connect to a WebDAV server (Nextcloud, ownCloud, IIS, …). Configure the connection your account uses. ")],-1))]),rt.loaded&&!rt.available?(p(),g("div",gv,[E(X,{name:"lock",size:14,class:"mr-1 inline"}),f[91]||(f[91]=$(" WebDAV is currently disabled by your administrator. Contact them to enable it. ",-1))])):D("",!0),rt.canEditOrg?(p(),g("div",vv,[f[92]||(f[92]=r("div",{class:"text-xs text-ink-muted"},"Manage your own settings, or organization-wide settings that apply to every user.",-1)),E(Tn,{modelValue:gi.value,"onUpdate:modelValue":f[33]||(f[33]=S=>gi.value=S),options:ut},null,8,["modelValue"])])):D("",!0),on.value?(p(),lt(Ae,{key:2,title:"Enable WebDAV (organization-wide)",desc:"Turn it on or off for everyone in your organization.",keywords:"enable disable plugin webdav organization"},{default:Pe(()=>[E(un,{"model-value":rt.orgEnabled,disabled:!rt.available,"onUpdate:modelValue":go},null,8,["model-value","disabled"])]),_:1})):(p(),lt(Ae,{key:3,title:"Enable WebDAV",desc:"Turn the plugin on for your account in the Web App.",keywords:"enable disable plugin webdav"},{default:Pe(()=>[E(un,{"model-value":rt.enabled,disabled:!rt.available||!rt.orgEnabled,"onUpdate:modelValue":go},null,8,["model-value","disabled"])]),_:1})),!on.value&&rt.available&&!rt.orgEnabled?(p(),g("div",_v,[E(X,{name:"lock",size:13,class:"mr-1 inline"}),f[94]||(f[94]=$("WebDAV is turned off for your organization",-1)),rt.canEditOrg?(p(),g("span",bv,[...f[93]||(f[93]=[$(" — switch to ",-1),r("span",{class:"font-semibold"},"Organization",-1),$(" to turn it back on",-1)])])):D("",!0),f[95]||(f[95]=$(". ",-1))])):D("",!0),on.value?(p(),g("div",yv,[E(X,{name:"users",size:13,class:"mr-1 inline"}),f[96]||(f[96]=$("These are organization-wide settings — they apply to everyone in ",-1)),r("span",xv,k(t.organizationName||"your organization"),1),f[97]||(f[97]=$(". Leave the connection blank to let each user configure their own; a connection set here overrides the user's. ",-1))])):Jo.value?(p(),g("div",wv," As a superadmin you manage the global WebDAV configuration in the API Server panel. The effective configuration is shown below. ")):D("",!0),E(Ae,{block:"",title:"Server URL",desc:"WebDAV endpoint including scheme, e.g. https://cloud.example.com/remote.php/dav/files/alice/.",keywords:"url server address endpoint webdav host"},{default:Pe(()=>[Jn("baseURL")?(p(),g("span",kv,[$(k(sn("baseURL").effective||"—")+" ",1),cn("baseURL")?(p(),g("span",Sv,[E(X,{name:"lock",size:10}),$(k(cn("baseURL")),1)])):D("",!0)])):re((p(),g("input",{key:1,"onUpdate:modelValue":f[34]||(f[34]=S=>Zt.baseURL=S),class:"field w-full font-mono text-xs",placeholder:"https://cloud.example.com/remote.php/dav/files/alice/"},null,512)),[[Se,Zt.baseURL]])]),_:1}),E(Ae,{title:"Username",desc:"Account used to authenticate (leave blank for a public share).",keywords:"username login account"},{default:Pe(()=>[Jn("username")?(p(),g("span",Tv,[$(k(sn("username").effective||"—")+" ",1),cn("username")?(p(),g("span",Pv,[E(X,{name:"lock",size:10}),$(k(cn("username")),1)])):D("",!0)])):re((p(),g("input",{key:1,"onUpdate:modelValue":f[35]||(f[35]=S=>Zt.username=S),class:"field w-64",placeholder:"user"},null,512)),[[Se,Zt.username]])]),_:1}),E(Ae,{title:"Password",desc:"Password or app-specific token for HTTP Basic auth.",keywords:"password secret credentials token"},{default:Pe(()=>[Jn("password")?(p(),g("span",Cv,[$(k(sn("password").effective||"—")+" ",1),cn("password")?(p(),g("span",Lv,[E(X,{name:"lock",size:10}),$(k(cn("password")),1)])):D("",!0)])):re((p(),g("input",{key:1,"onUpdate:modelValue":f[36]||(f[36]=S=>Zt.password=S),type:"password",class:"field w-64",placeholder:"••••••••"},null,512)),[[Se,Zt.password]])]),_:1}),E(Ae,{title:"TLS verification",desc:"Only affects HTTPS. Skip only for self-signed test servers.",keywords:"tls certificate verify insecure https"},{default:Pe(()=>[Jn("insecureSkipVerify")?(p(),g("span",Mv,[$(k(sn("insecureSkipVerify").effective==="true"?"Skip verification":"Verify certificate")+" ",1),cn("insecureSkipVerify")?(p(),g("span",Av,[E(X,{name:"lock",size:10}),$(k(cn("insecureSkipVerify")),1)])):D("",!0)])):(p(),lt(Tn,{key:1,modelValue:Zt.insecureSkipVerify,"onUpdate:modelValue":f[37]||(f[37]=S=>Zt.insecureSkipVerify=S),options:Za},null,8,["modelValue"]))]),_:1}),E(Ae,{title:"Base path",desc:"Working directory under the server URL and health-check target, e.g. /Documents.",keywords:"base path directory folder root"},{default:Pe(()=>[Jn("basePath")?(p(),g("span",Ev,[$(k(sn("basePath").effective||"—")+" ",1),cn("basePath")?(p(),g("span",Ov,[E(X,{name:"lock",size:10}),$(k(cn("basePath")),1)])):D("",!0)])):re((p(),g("input",{key:1,"onUpdate:modelValue":f[38]||(f[38]=S=>Zt.basePath=S),class:"field w-64 font-mono",placeholder:"/Documents"},null,512)),[[Se,Zt.basePath]])]),_:1}),r("div",zv,[Jo.value?D("",!0):(p(),g("button",{key:0,class:"btn-accent",disabled:Fi.value||!rt.available,onClick:qe},k(Fi.value?"Saving…":on.value?"Save organization settings":"Save settings"),9,Iv)),on.value?D("",!0):(p(),g("button",{key:1,class:"btn-ghost",disabled:po.value||!rt.available,onClick:Tt},k(po.value?"Testing…":"Test connection"),9,$v)),Di.value?(p(),g("span",Nv,k(Di.value),1)):D("",!0),vi.value&&!on.value?(p(),g("span",Dv,"Checked "+k(yt()),1)):D("",!0),nn.value&&!on.value?(p(),g("span",{key:4,class:Ee(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",Qo(nn.value.status)])},[f[98]||(f[98]=r("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),$(k(nn.value.detail||nn.value.status),1)],2)):D("",!0)])])],64)):D("",!0),wo("drives-local")?(p(),g("div",Fv,[r("div",Rv,[r("div",Bv,[E(X,{name:"monitor",size:20})]),f[99]||(f[99]=r("div",{class:"min-w-0"},[r("div",{class:"text-sm font-semibold text-ink"},"Local Storage"),r("div",{class:"mt-0.5 text-xs text-ink-muted"}," A private folder on the server for your files. Each user has their own; members of an organization share one. ")],-1))]),Me.loaded&&!Me.available?(p(),g("div",Uv,[E(X,{name:"lock",size:14,class:"mr-1 inline"}),f[100]||(f[100]=$(" Local storage is currently disabled by your administrator. Contact them to enable it. ",-1))])):Me.loaded&&!Me.rootConfigured?(p(),g("div",Vv,[E(X,{name:"alertTriangle",size:14,class:"mr-1 inline"}),f[101]||(f[101]=$(" No storage root has been configured by your administrator yet. ",-1))])):D("",!0),Me.canEditOrg?(p(),g("div",Zv,[f[102]||(f[102]=r("div",{class:"text-xs text-ink-muted"},"Manage your own settings, or organization-wide settings that apply to every user.",-1)),E(Tn,{modelValue:At.value,"onUpdate:modelValue":f[39]||(f[39]=S=>At.value=S),options:ut},null,8,["modelValue"])])):D("",!0),Ft.value?(p(),lt(Ae,{key:3,title:"Enable local storage (organization-wide)",desc:"Turn it on or off for everyone in your organization.",keywords:"enable disable plugin local storage folder organization"},{default:Pe(()=>[E(un,{"model-value":Me.orgEnabled,disabled:!Me.available,"onUpdate:modelValue":xo},null,8,["model-value","disabled"])]),_:1})):(p(),lt(Ae,{key:4,title:"Enable local storage",desc:"Turn the plugin on for your account in the Web App.",keywords:"enable disable plugin local storage folder"},{default:Pe(()=>[E(un,{"model-value":Me.enabled,disabled:!Me.available||!Me.orgEnabled,"onUpdate:modelValue":xo},null,8,["model-value","disabled"])]),_:1})),!Ft.value&&Me.available&&!Me.orgEnabled?(p(),g("div",Hv,[E(X,{name:"lock",size:13,class:"mr-1 inline"}),f[104]||(f[104]=$("Local storage is turned off for your organization",-1)),Me.canEditOrg?(p(),g("span",jv,[...f[103]||(f[103]=[$(" — switch to ",-1),r("span",{class:"font-semibold"},"Organization",-1),$(" to turn it back on",-1)])])):D("",!0),f[105]||(f[105]=$(". ",-1))])):D("",!0),Ft.value?(p(),g("div",Wv,[E(X,{name:"users",size:13,class:"mr-1 inline"}),f[106]||(f[106]=$("These are organization-wide settings — they apply to everyone in ",-1)),r("span",Kv,k(t.organizationName||"your organization"),1),f[107]||(f[107]=$(", who all share the organization folder. Members can additionally enable a private folder inside it. ",-1))])):Xn.value?(p(),g("div",Gv," As a superadmin you manage the global storage root in the API Server panel. The effective configuration is shown below. ")):D("",!0),Ft.value?(p(),lt(Ae,{key:8,title:"Private folders",desc:"Let members create a private folder inside the organization folder, reachable only by them.",keywords:"private folder members allow policy organization"},{default:Pe(()=>[E(un,{"model-value":Me.allowPrivate,disabled:!Me.available,"onUpdate:modelValue":ns},null,8,["model-value","disabled"])]),_:1})):D("",!0),Ft.value?D("",!0):(p(),g(ue,{key:9},[E(Ae,{block:"",title:"Your folders",desc:"Assigned automatically and isolated — no one else can reach your private folder.",keywords:"folder directory path storage location isolated private shared"},{default:Pe(()=>[r("div",qv,[(p(!0),g(ue,null,Be(Me.mounts,S=>(p(),g("div",{key:S.id,class:"flex flex-wrap items-center gap-2"},[r("span",Yv,k(S.path),1),S.kind==="shared"?(p(),g("span",Jv,[E(X,{name:"users",size:10}),f[108]||(f[108]=$("Shared with your organization",-1))])):(p(),g("span",Xv,[E(X,{name:"lock",size:10}),f[109]||(f[109]=$("Private to you",-1))])),An.value[S.id]?(p(),g("span",{key:2,class:Ee(["inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-[10px] font-semibold",wi(An.value[S.id].status)])},[f[110]||(f[110]=r("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),$(k(An.value[S.id].status),1)],2)):D("",!0)]))),128)),Me.mounts.length?D("",!0):(p(),g("div",Qv,k(Me.rootConfigured?"No folder assigned yet.":"Waiting for the administrator to configure a storage root."),1))])]),_:1}),Me.isOrgUser&&Me.allowPrivate?(p(),lt(Ae,{key:0,title:"My private folder",desc:"Add a private folder inside the organization folder, reachable only by you — you keep the shared folder too.",keywords:"private folder personal isolated organization inside"},{default:Pe(()=>[E(un,{"model-value":Me.privateFolder,disabled:!Me.available||!Me.orgEnabled,"onUpdate:modelValue":ts},null,8,["model-value","disabled"])]),_:1})):Me.isOrgUser&&!Me.allowPrivate?(p(),g("div",e_,[E(X,{name:"lock",size:13,class:"mr-1 inline"}),f[111]||(f[111]=$("Private folders are turned off by your organization. ",-1))])):D("",!0)],64)),E(Ae,{title:"Access mode",desc:"Read-only prevents uploads, deletes and folder creation.",keywords:"read only write access mode permission"},{default:Pe(()=>[bo("readOnly")?(p(),g("span",t_,[$(k(js(xi("readOnly").effective))+" ",1),Bi("readOnly")?(p(),g("span",n_,[E(X,{name:"lock",size:10}),$(k(Bi("readOnly")),1)])):D("",!0)])):(p(),lt(Tn,{key:1,modelValue:vo.value,"onUpdate:modelValue":f[40]||(f[40]=S=>vo.value=S),options:_o},null,8,["modelValue"]))]),_:1}),r("div",i_,[Xn.value?D("",!0):(p(),g("button",{key:0,class:"btn-accent",disabled:_n.value||!Me.available,onClick:Qn},k(_n.value?"Saving…":Ft.value?"Save organization settings":"Save settings"),9,o_)),Ft.value?D("",!0):(p(),g("button",{key:1,class:"btn-ghost",disabled:xt.value||!Me.available,onClick:is},k(xt.value?"Testing…":"Test folder"),9,s_)),Fn.value?(p(),g("span",a_,k(Fn.value),1)):D("",!0),bn.value&&!Ft.value?(p(),g("span",r_,"Checked "+k(Ke()),1)):D("",!0),Dt.value&&!Ft.value?(p(),g("span",{key:4,class:Ee(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",wi(Dt.value.status)])},[f[112]||(f[112]=r("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),$(k(Dt.value.detail||Dt.value.status),1)],2)):D("",!0)])])):D("",!0)])):j.id==="profile"?(p(),g("div",l_,[E(Ae,{block:"",title:"Profile photo",desc:"PNG or JPG, up to ~1.5 MB. Stored on this device.",keywords:"avatar photo picture"},{default:Pe(()=>[r("div",u_,[Oe(ve).avatar?(p(),g("img",{key:0,src:Oe(ve).avatar,alt:"Avatar",class:"h-16 w-16 rounded-full object-cover"},null,8,c_)):(p(),g("div",d_,k(ja.value),1)),r("div",f_,[r("label",h_,[E(X,{name:"upload",size:15,class:"mr-1.5 inline"}),f[113]||(f[113]=$("Upload ",-1)),r("input",{type:"file",accept:"image/*",class:"hidden",onChange:Zi},null,32)]),Oe(ve).avatar?(p(),g("button",{key:0,class:"btn-ghost",onClick:Ks},"Remove")):D("",!0)])])]),_:1}),E(Ae,{title:"Display name",desc:"The name shown on your public profile.",keywords:"display name profile"},{default:Pe(()=>[re(r("input",{"onUpdate:modelValue":f[41]||(f[41]=S=>Oe(ve).displayName=S),class:"field w-56",placeholder:"Jane O.",onBlur:f[42]||(f[42]=S=>it("Saved."))},null,544),[[Se,Oe(ve).displayName]])]),_:1}),E(Ae,{block:"",title:"Bio",desc:"A short description others can see.",keywords:"bio about description"},{default:Pe(()=>[re(r("textarea",{"onUpdate:modelValue":f[43]||(f[43]=S=>Oe(ve).bio=S),rows:"3",maxlength:"240",class:"field w-full resize-none",placeholder:"Flight director, North yard operations…",onBlur:f[44]||(f[44]=S=>it("Saved."))},null,544),[[Se,Oe(ve).bio]]),r("div",p_,k((Oe(ve).bio||"").length)+"/240",1)]),_:1}),E(Ae,{title:"Show email on profile",desc:"Let teammates see your email address.",keywords:"show email public visibility"},{default:Pe(()=>[E(un,{modelValue:Oe(ve).showEmail,"onUpdate:modelValue":f[45]||(f[45]=S=>Oe(ve).showEmail=S)},null,8,["modelValue"])]),_:1})])):j.id==="security"?(p(),g("div",m_,[E(Ae,{block:"",title:"Two-factor authentication",desc:"Require a one-time code at sign-in.",keywords:"two factor 2fa authentication security"},{default:Pe(()=>[r("div",g_,[r("span",{class:Ee(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",Oe(ve).twoFactor?"bg-success-soft text-success-fg":"bg-surface-2 text-ink-secondary"])},[f[114]||(f[114]=r("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),$(k(Oe(ve).twoFactor?"Enabled":"Disabled"),1)],2),!Oe(ve).twoFactor&&!ei.value?(p(),g("button",{key:0,class:"btn-accent",onClick:Wa},"Enable 2FA")):Oe(ve).twoFactor?(p(),g("button",{key:1,class:"btn-ghost",onClick:Ka},"Disable")):D("",!0)]),ei.value?(p(),g("div",v_,[r("div",__,[f[116]||(f[116]=r("div",{class:"grid h-28 w-28 place-items-center rounded bg-white p-2"},[r("svg",{viewBox:"0 0 100 100",class:"h-full w-full"},[r("rect",{width:"100",height:"100",fill:"#fff"}),r("g",{fill:"#0F1E3D"},[r("rect",{x:"6",y:"6",width:"24",height:"24"}),r("rect",{x:"70",y:"6",width:"24",height:"24"}),r("rect",{x:"6",y:"70",width:"24",height:"24"}),r("rect",{x:"12",y:"12",width:"12",height:"12",fill:"#fff"}),r("rect",{x:"76",y:"12",width:"12",height:"12",fill:"#fff"}),r("rect",{x:"12",y:"76",width:"12",height:"12",fill:"#fff"}),r("rect",{x:"40",y:"10",width:"8",height:"8"}),r("rect",{x:"52",y:"20",width:"8",height:"8"}),r("rect",{x:"40",y:"40",width:"8",height:"8"}),r("rect",{x:"60",y:"44",width:"8",height:"8"}),r("rect",{x:"44",y:"60",width:"8",height:"8"}),r("rect",{x:"70",y:"60",width:"8",height:"8"}),r("rect",{x:"80",y:"72",width:"8",height:"8"}),r("rect",{x:"60",y:"80",width:"8",height:"8"})])])],-1)),r("div",b_,[f[115]||(f[115]=r("div",{class:"text-xs text-ink-secondary"},"Scan with an authenticator app, or enter this secret:",-1)),r("div",y_,k(Gs.value),1),r("div",x_,[re(r("input",{"onUpdate:modelValue":f[46]||(f[46]=S=>Hi.value=S),inputmode:"numeric",maxlength:"6",class:"field w-28 font-mono tracking-[0.3em]",placeholder:"000000"},null,512),[[Se,Hi.value]]),r("button",{class:"btn-accent",onClick:xn},"Verify & enable")]),ji.value?(p(),g("p",w_,k(ji.value),1)):D("",!0)])])])):D("",!0),Oe(ve).twoFactor&&ko.value.length?(p(),g("div",k_,[f[117]||(f[117]=r("div",{class:"text-xs font-semibold text-ink"},"Recovery codes",-1)),f[118]||(f[118]=r("div",{class:"mt-0.5 text-xs text-ink-muted"},"Store these somewhere safe — each works once.",-1)),r("div",S_,[(p(!0),g(ue,null,Be(ko.value,S=>(p(),g("span",{key:S,class:"select-all"},k(S),1))),128))])])):D("",!0),f[119]||(f[119]=r("p",{class:"mt-2 text-xs text-ink-muted"},"Prototype — codes are generated locally until the account service verifies them.",-1))]),_:1}),E(Ae,{block:"",title:"Active sessions",desc:"Devices currently signed in to your account.",keywords:"sessions devices logout sign out remote"},{default:Pe(()=>[r("div",T_,[r("div",P_,[r("div",C_,[E(X,{name:"monitor",size:18})]),r("div",L_,[r("div",M_,[$(k(Rn())+" on "+k(qs())+" ",1),f[120]||(f[120]=r("span",{class:"ml-1 rounded-full bg-success-soft px-2 py-0.5 text-[10px] font-semibold text-success-fg"},"This device",-1))]),r("div",A_,"Signed in "+k(Oe(fu)(Oe(Ys))),1)]),r("button",{class:"btn-ghost",onClick:f[47]||(f[47]=S=>l("logout"))},"Log out")])]),f[121]||(f[121]=r("button",{class:"btn-ghost mt-2 opacity-60",disabled:"",title:"Requires the account service"}," Log out all other devices ",-1)),f[122]||(f[122]=r("p",{class:"mt-2 text-xs text-ink-muted"}," Only this session is visible from the browser; enumerating and revoking remote sessions needs the account service. ",-1))]),_:1})])):j.id==="team"?(p(),g("div",E_,[st.id?(p(),g("div",O_,[E(Ae,{block:"",title:`Edit user — ${st.email}`,desc:"Update details, change role, reset password, or set verified.",keywords:"edit user update role password verified organization"},{default:Pe(()=>[r("div",z_,[r("div",I_,[re(r("input",{"onUpdate:modelValue":f[48]||(f[48]=S=>st.email=S),type:"email",class:"field flex-1",placeholder:"name@pilotvault.local"},null,512),[[Se,st.email]]),re(r("select",{"onUpdate:modelValue":f[49]||(f[49]=S=>st.role=S),class:"field w-32",disabled:Xi.value,title:Xi.value?"You cannot change your own role":""},[(p(!0),g(ue,null,Be(Js.value,S=>(p(),g("option",{key:S.value,value:S.value},k(S.label),9,N_))),128))],8,$_),[[Mt,st.role]])]),u.value?re((p(),g("select",{key:0,"onUpdate:modelValue":f[50]||(f[50]=S=>st.organization=S),class:"field",title:"Organization"},[(p(!0),g(ue,null,Be(Yi.value,S=>(p(),g("option",{key:S.value,value:S.value},k(S.label),9,D_))),128))],512)),[[Mt,st.organization]]):D("",!0),re(r("input",{"onUpdate:modelValue":f[51]||(f[51]=S=>st.password=S),type:"password",class:"field",placeholder:"New password (leave blank to keep current)"},null,512),[[Se,st.password]]),r("label",F_,[E(un,{modelValue:st.verified,"onUpdate:modelValue":f[52]||(f[52]=S=>st.verified=S)},null,8,["modelValue"]),f[123]||(f[123]=$(" Email verified ",-1))]),r("div",R_,[r("button",{class:"btn-accent",disabled:Po.value,onClick:Ga},k(Po.value?"Saving…":"Save changes"),9,B_),r("button",{class:"btn-ghost",onClick:Xs},"Cancel"),On.value?(p(),g("span",U_,k(On.value),1)):D("",!0),Xi.value?(p(),g("span",V_,"Editing your own account — role locked.")):D("",!0)])])]),_:1},8,["title"])])):(p(),g("div",Z_,[E(Ae,{block:"",title:"Add user",desc:"Create a new account. Admins add users within their organization; superadmins can target any.",keywords:"add user create account role admin organization"},{default:Pe(()=>[r("div",H_,[r("div",j_,[re(r("input",{"onUpdate:modelValue":f[53]||(f[53]=S=>Ct.email=S),type:"email",class:"field flex-1",placeholder:"name@pilotvault.local"},null,512),[[Se,Ct.email]]),re(r("select",{"onUpdate:modelValue":f[54]||(f[54]=S=>Ct.role=S),class:"field w-32"},[(p(!0),g(ue,null,Be(Js.value,S=>(p(),g("option",{key:S.value,value:S.value},k(S.label),9,W_))),128))],512),[[Mt,Ct.role]])]),u.value?re((p(),g("select",{key:0,"onUpdate:modelValue":f[55]||(f[55]=S=>Ct.organization=S),class:"field",title:"Organization"},[(p(!0),g(ue,null,Be(Yi.value,S=>(p(),g("option",{key:S.value,value:S.value},k(S.label),9,K_))),128))],512)),[[Mt,Ct.organization]]):(p(),g("div",G_,[f[124]||(f[124]=$(" New users join your organization: ",-1)),r("span",q_,k(t.organizationName||"—"),1)])),re(r("input",{"onUpdate:modelValue":f[56]||(f[56]=S=>Ct.password=S),type:"password",class:"field",placeholder:"Temporary password (min 8 chars)"},null,512),[[Se,Ct.password]]),r("div",Y_,[r("button",{class:"btn-accent",disabled:So.value,onClick:Ji},k(So.value?"Creating…":"Create user"),9,J_),Ti.value?(p(),g("span",X_,k(Ti.value),1)):D("",!0)])])]),_:1})])),r("div",Q_,[r("div",e1,[f[125]||(f[125]=r("div",null,[r("div",{class:"eyebrow"},"Team"),r("div",{class:"mt-0.5 text-base font-semibold text-ink"},"All users")],-1)),r("button",{class:"btn-ghost",disabled:Ki.value,onClick:an},k(Ki.value?"Loading…":"Refresh"),9,t1)]),Gi.value?(p(),g("div",n1,k(Gi.value),1)):!Si.value.length&&!Ki.value?(p(),g("div",i1,"No users yet.")):(p(),g("div",o1,[r("table",s1,[r("thead",null,[r("tr",a1,[(p(),g(ue,null,Be(["User","Role","Organization","Status",""],S=>r("th",{key:S,class:"border-y border-line bg-surface-2 px-5 py-2.5 font-mono text-[10.5px] font-normal uppercase tracking-caps text-ink-muted"},k(S),1)),64))])]),r("tbody",null,[(p(!0),g(ue,null,Be(Si.value,S=>(p(),g("tr",{key:S.id,class:Ee(["border-b border-line last:border-0",st.id===S.id?"bg-accent-soft":""])},[r("td",r1,[r("span",l1,k(S.email),1),S.email===t.email?(p(),g("span",u1,"(you)")):D("",!0)]),r("td",c1,[r("span",{class:Ee(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",b(S.role||"user")])},[E(X,{name:v(S.role||"user"),size:12},null,8,["name"]),$(k(h(S.role||"user")),1)],2)]),r("td",d1,[r("span",{class:Ee(["text-sm",S.organizationName?"text-ink-secondary":"text-ink-muted"])},k(S.organizationName||"—"),3)]),r("td",f1,[r("span",{class:Ee(["text-xs",S.verified?"text-success-fg":"text-ink-muted"])},k(S.verified?"Verified":"Unverified"),3)]),r("td",h1,[ti.value===S.id?(p(),g(ue,{key:0},[f[126]||(f[126]=r("span",{class:"mr-2 text-xs text-ink-muted"},"Remove?",-1)),r("button",{class:"btn-ghost mr-1",onClick:f[57]||(f[57]=Xe=>ti.value="")},"Cancel"),r("button",{class:"rounded bg-danger px-3 py-1.5 text-sm font-semibold text-white transition hover:brightness-110",onClick:Xe=>rn(S)}," Remove ",8,p1)],64)):(p(),g("div",m1,[r("button",{class:"btn-ghost inline-flex items-center gap-1.5",onClick:Xe=>rs(S)},[E(X,{name:"settings",size:14}),f[127]||(f[127]=$(" Edit ",-1))],8,g1),S.email!==t.email?(p(),g("button",{key:0,class:"btn-ghost inline-flex items-center gap-1.5",onClick:Xe=>ti.value=S.id},[E(X,{name:"trash",size:14}),f[128]||(f[128]=$(" Remove ",-1))],8,v1)):D("",!0)]))])],2))),128))])])]))])])):j.id==="organizations"?(p(),g("div",_1,[zn.id?(p(),g("div",b1,[E(Ae,{block:"",title:"Rename organization",desc:"Update the organization's display name.",keywords:"rename organization edit"},{default:Pe(()=>[r("div",y1,[re(r("input",{"onUpdate:modelValue":f[58]||(f[58]=S=>zn.name=S),class:"field",placeholder:"Organization name",onKeyup:iu(us,["enter"])},null,544),[[Se,zn.name]]),r("div",x1,[r("button",{class:"btn-accent",onClick:us},"Save changes"),r("button",{class:"btn-ghost",onClick:Ci},"Cancel"),Bt.value?(p(),g("span",w1,k(Bt.value),1)):D("",!0)])])]),_:1})])):(p(),g("div",k1,[E(Ae,{block:"",title:"Add organization",desc:"Create a new organization. Assign admins and users to it from User management.",keywords:"add organization create tenant company"},{default:Pe(()=>[r("div",S1,[re(r("input",{"onUpdate:modelValue":f[59]||(f[59]=S=>Qi.name=S),class:"field",placeholder:"e.g. Northwind Aerial",onKeyup:iu(ni,["enter"])},null,544),[[Se,Qi.name]]),r("div",T1,[r("button",{class:"btn-accent",disabled:Ht.value,onClick:ni},k(Ht.value?"Creating…":"Create organization"),9,P1),eo.value?(p(),g("span",C1,k(eo.value),1)):D("",!0)])])]),_:1})])),r("div",L1,[r("div",{class:"flex items-center justify-between px-5 py-4"},[f[129]||(f[129]=r("div",null,[r("div",{class:"eyebrow"},"Tenancy"),r("div",{class:"mt-0.5 text-base font-semibold text-ink"},"All organizations")],-1)),r("button",{class:"btn-ghost",onClick:Pi},"Refresh")]),qi.value.length?(p(),g("div",A1,[r("table",E1,[r("thead",null,[r("tr",O1,[(p(),g(ue,null,Be(["Organization","Members",""],S=>r("th",{key:S,class:"border-y border-line bg-surface-2 px-5 py-2.5 font-mono text-[10.5px] font-normal uppercase tracking-caps text-ink-muted"},k(S),1)),64))])]),r("tbody",null,[(p(!0),g(ue,null,Be(qi.value,S=>(p(),g("tr",{key:S.id,class:Ee(["border-b border-line last:border-0",zn.id===S.id?"bg-accent-soft":""])},[r("td",z1,[r("span",I1,[E(X,{name:"grid",size:14,class:"text-ink-muted"}),$(k(S.name),1)])]),r("td",$1,k(ls.value[S.id]||0),1),r("td",N1,[wn.value===S.id?(p(),g(ue,{key:0},[f[130]||(f[130]=r("span",{class:"mr-2 text-xs text-ink-muted"},"Delete?",-1)),r("button",{class:"btn-ghost mr-1",onClick:f[60]||(f[60]=Xe=>wn.value="")},"Cancel"),r("button",{class:"rounded bg-danger px-3 py-1.5 text-sm font-semibold text-white transition hover:brightness-110",onClick:Xe=>Co(S)}," Delete ",8,D1)],64)):(p(),g("div",F1,[r("button",{class:"btn-ghost inline-flex items-center gap-1.5",onClick:Xe=>qa(S)},[E(X,{name:"settings",size:14}),f[131]||(f[131]=$(" Rename ",-1))],8,R1),r("button",{class:"btn-ghost inline-flex items-center gap-1.5",disabled:(ls.value[S.id]||0)>0,title:(ls.value[S.id]||0)>0?"Reassign or remove members first":"",onClick:Xe=>wn.value=S.id},[E(X,{name:"trash",size:14}),f[132]||(f[132]=$(" Delete ",-1))],8,B1)]))])],2))),128))])])])):(p(),g("div",M1,"No organizations yet."))])])):j.id==="advanced"?(p(),g("div",U1,[r("div",V1,[E(Ae,{title:"Export data",desc:"Download your settings and profile as JSON.",keywords:"export data download backup"},{default:Pe(()=>[r("button",{class:"btn-ghost",onClick:Ya},[E(X,{name:"download",size:15,class:"mr-1.5 inline"}),f[133]||(f[133]=$("Export",-1))])]),_:1}),E(Ae,{block:"",title:"Import data",desc:"Restore settings from a previous export.",keywords:"import data upload restore"},{default:Pe(()=>[r("label",Z1,[E(X,{name:"upload",size:15,class:"mr-1.5 inline"}),f[134]||(f[134]=$("Choose file… ",-1)),r("input",{type:"file",accept:"application/json,.json",class:"hidden",onChange:Lo},null,32)]),hn.value?(p(),g("p",H1,k(hn.value),1)):D("",!0)]),_:1})]),r("div",j1,[r("div",W1,[E(X,{name:"alertTriangle",size:18}),f[135]||(f[135]=r("h3",{class:"text-sm font-bold uppercase tracking-caps"},"Danger zone",-1))]),f[140]||(f[140]=r("p",{class:"mt-1 text-xs text-ink-secondary"},"Deleting your account is permanent and cannot be undone.",-1)),r("div",K1,[f[139]||(f[139]=r("div",{class:"text-sm font-semibold text-ink"},"Delete account",-1)),r("label",G1,[re(r("input",{"onUpdate:modelValue":f[61]||(f[61]=S=>_t.understand=S),type:"checkbox",class:"mt-0.5 h-4 w-4 accent-[var(--danger)]"},null,512),[[Sa,_t.understand]]),f[136]||(f[136]=$(" I understand this permanently deletes my account and all associated data. ",-1))]),r("div",q1,[r("label",Y1,[f[137]||(f[137]=$("Type ",-1)),r("span",J1,k(cs.value),1),f[138]||(f[138]=$(" to confirm",-1))]),re(r("input",{"onUpdate:modelValue":f[62]||(f[62]=S=>_t.typed=S),class:"field w-full max-w-[360px] font-mono",placeholder:cs.value},null,8,X1),[[Se,_t.typed]])]),r("div",Q1,[_t.armed?(p(),g("button",{key:1,class:"rounded bg-danger px-4 py-2.5 text-sm font-semibold text-white transition enabled:hover:brightness-110 disabled:cursor-not-allowed disabled:opacity-50",disabled:_t.cooldown>0,onClick:Li},k(_t.cooldown>0?`Confirm in ${_t.cooldown}s…`:"Permanently delete account"),9,tb)):(p(),g("button",{key:0,class:"rounded bg-danger px-4 py-2.5 text-sm font-semibold text-white transition enabled:hover:brightness-110 disabled:cursor-not-allowed disabled:opacity-40",disabled:!pn.value,onClick:Ja}," Delete account… ",8,eb)),_t.armed&&_t.cooldown>0?(p(),g("span",nb,"Cooling-off period — read once more.")):D("",!0)]),_t.msg?(p(),g("p",ib,k(_t.msg),1)):D("",!0)])])])):D("",!0)],64))),128))])]),E(mh,{name:"fade"},{default:Pe(()=>[Vi.value?(p(),g("div",ob,[E(X,{name:"check",size:16,class:"text-success-fg"}),$(k(Vi.value),1)])):D("",!0)]),_:1})]))}},ab=_m(sb,[["__scopeId","data-v-977256e5"]]),rb={class:"mx-auto flex max-w-[1240px] flex-col gap-5 p-7"},lb={class:"flex flex-wrap items-center gap-3"},ub={class:"inline-flex rounded-lg border border-line bg-surface-1 p-0.5"},cb=["onClick"],db={class:"ml-auto flex items-center gap-2"},fb=["href"],hb={class:"grid grid-cols-4 gap-4 max-[900px]:grid-cols-2"},pb={class:"eyebrow"},mb={key:0,class:"panel border-danger/40 p-4 text-sm text-danger-fg"},gb={key:0,class:"panel p-5"},vb={class:"mb-4 flex items-center justify-between"},_b={class:"eyebrow"},bb={class:"grid grid-cols-3 gap-3 max-[760px]:grid-cols-1"},yb={class:"block"},xb={class:"block"},wb={class:"block"},kb={class:"block"},Sb={key:0,value:""},Tb=["value"],Pb={class:"block"},Cb={class:"block"},Lb={class:"block"},Mb={class:"block"},Ab={class:"block"},Eb=["value"],Ob={class:"block"},zb=["value"],Ib={class:"block"},$b=["value"],Nb={class:"block"},Db={class:"mt-3 block"},Fb={key:0,class:"mt-3 grid grid-cols-2 gap-3 max-[760px]:grid-cols-1"},Rb={class:"block"},Bb={class:"block"},Ub={class:"block"},Vb={class:"block"},Zb={class:"col-span-2 block max-[760px]:col-span-1"},Hb={class:"mt-4 flex items-center gap-3"},jb=["disabled"],Wb={key:0,class:"text-sm text-danger-fg"},Kb={class:"panel overflow-hidden p-0"},Gb={key:0,class:"px-5 py-12 text-center text-sm text-ink-muted"},qb={key:1,class:"grid place-items-center px-5 py-16 text-center"},Yb={key:2,class:"overflow-x-auto"},Jb={class:"w-full border-collapse text-sm"},Xb={class:"text-left"},Qb={class:"whitespace-nowrap px-5 py-3 font-mono text-ink"},ey={key:0,class:"text-ink-muted"},ty={class:"px-5 py-3 text-ink-secondary"},ny=["title"],iy={class:"px-5 py-3 font-mono text-ink-secondary"},oy={class:"px-5 py-3 text-ink-secondary"},sy={class:"px-5 py-3"},ay=["onClick"],ry={class:"whitespace-nowrap px-5 py-3 text-right"},ly=["onClick"],uy=["onClick"],cy=["onClick"],dy={key:0,class:"border-b border-line bg-surface-2"},fy={colspan:"7",class:"px-5 py-3"},hy={class:"flex flex-wrap gap-x-8 gap-y-1.5 text-xs"},py={class:"text-ink-secondary"},my={class:"text-ink"},gy={class:"text-ink-secondary"},vy={class:"text-ink"},_y={class:"text-ink-secondary"},by={class:"font-mono text-ink"},yy={key:0,class:"text-ink-secondary"},xy={class:"text-ink"},wy={key:0,class:"mt-2 space-y-1"},ky={key:1,class:"mt-2 text-xs text-success-fg"},Sy={key:0,class:"panel p-5"},Ty={class:"mb-4 flex items-center justify-between"},Py={class:"eyebrow"},Cy={class:"grid grid-cols-3 gap-3 max-[760px]:grid-cols-1"},Ly={class:"block"},My={class:"block"},Ay={class:"block"},Ey={class:"block"},Oy={class:"block"},zy={class:"block"},Iy=["value"],$y={class:"mt-3 flex flex-wrap gap-6"},Ny={class:"flex items-center gap-2 text-sm text-ink-secondary"},Dy={class:"flex items-center gap-2 text-sm text-ink-secondary"},Fy={class:"mt-4 flex items-center gap-3"},Ry=["disabled"],By={key:0,class:"text-sm text-danger-fg"},Uy={class:"panel overflow-hidden p-0"},Vy={key:0,class:"px-5 py-12 text-center text-sm text-ink-muted"},Zy={key:1,class:"grid place-items-center px-5 py-16 text-center"},Hy={key:2,class:"overflow-x-auto"},jy={class:"w-full border-collapse text-sm"},Wy={class:"text-left"},Ky={class:"px-5 py-3 font-semibold text-ink"},Gy={class:"px-5 py-3 text-ink-secondary"},qy={class:"px-5 py-3 font-mono text-ink-secondary"},Yy={class:"px-5 py-3"},Jy={key:1,class:"text-ink-muted"},Xy={class:"px-5 py-3"},Qy={class:"whitespace-nowrap px-5 py-3 text-right"},ex=["onClick"],tx=["onClick"],nx=["onClick"],ix={__name:"Logbook",props:{email:{type:String,default:""},role:{type:String,default:"user"},organization:{type:String,default:""},organizationName:{type:String,default:""}},setup(t){const i=t,s={success:"bg-success-soft text-success-fg",warning:"bg-amber-soft text-amber-fg",danger:"bg-danger-soft text-danger-fg",accent:"bg-accent-soft text-accent-soft-fg",neutral:"bg-surface-2 text-ink-secondary"},l=W("flights"),u=W([]),d=W([]),h=W(!1),v=W("");async function b(){h.value=!0,v.value="";const[Y,A]=await Promise.all([Rc(),kp()]);(!Y.ok||!A.ok)&&(v.value=Y.status===503||A.status===503?"Logbook storage is not configured on the API Server (service account missing).":"Could not load the logbook."),u.value=Y.drones,d.value=A.flights,h.value=!1}hi(b);function C(Y){const A=Y.compliance||{};return A.exempt?{tone:"neutral",label:"Exempt"}:(A.redFlags||[]).length?{tone:"danger",label:`${A.redFlags.length} issue${A.redFlags.length>1?"s":""}`}:{tone:"success",label:"Compliant"}}const T=W("");function M(Y){T.value=T.value===Y?"":Y}const R=[{value:"open",label:"Open"},{value:"specific",label:"Specific"},{value:"certified",label:"Certified"}],B=[{value:"commercial",label:"Commercial"},{value:"research",label:"Research"},{value:"public",label:"Public-benefit"},{value:"hobby",label:"Private hobby"},{value:"club_area",label:"Model-club area"}],Z=[{value:"",label:"Auto (from drone)"},{value:"manual",label:"Manual"},{value:"automatic",label:"Automatic (FDR)"}];function F(){var Y;return{operationDate:new Date().toISOString().slice(0,10),startTime:"",endTime:"",drone:((Y=u.value[0])==null?void 0:Y.id)||"",areaRoute:"",maxAltitudeAgl:"",pilotName:i.email,certificateRef:"",category:"open",purpose:"commercial",loggingPath:"",rawFdrLogUrl:"",authorisationRef:"",weather:"",airspaceRef:"",observer:"",incidents:"",notes:""}}const he=W(!1),pe=W(""),q=kt(F()),Te=W(""),fe=W(!1),Ue=W(!1);function $e(){Object.assign(q,F()),pe.value="",Te.value="",Ue.value=!1,he.value=!0}function Ie(Y){Object.assign(q,{operationDate:(Y.operationDate||"").slice(0,10),startTime:Y.startTime||"",endTime:Y.endTime||"",drone:Y.drone||"",areaRoute:Y.areaRoute||"",maxAltitudeAgl:Y.maxAltitudeAgl||"",pilotName:Y.pilotName||"",certificateRef:Y.certificateRef||"",category:Y.category||"open",purpose:Y.purpose||"commercial",loggingPath:Y.loggingPath||"",rawFdrLogUrl:Y.rawFdrLogUrl||"",authorisationRef:Y.authorisationRef||"",weather:Y.weather||"",airspaceRef:Y.airspaceRef||"",observer:Y.observer||"",incidents:Y.incidents||"",notes:Y.notes||""}),pe.value=Y.id,Te.value="",Ue.value=!!(Y.weather||Y.airspaceRef||Y.observer||Y.incidents||Y.notes),he.value=!0}function Ge(){he.value=!1,pe.value=""}async function _e(){var z;if(Te.value="",!q.drone){Te.value="Select a drone first (add one on the Drones tab).";return}fe.value=!0;const Y={...q,maxAltitudeAgl:Number(q.maxAltitudeAgl)||0},A=pe.value?await Tp(pe.value,Y):await Sp(Y);if(fe.value=!1,!A.ok){Te.value=((z=A.body)==null?void 0:z.error)||"Could not save the flight.";return}he.value=!1,await b()}const ye=W("");async function ze(Y){const A=await Pp(Y.id);ye.value="",A.ok&&await b()}const ne=["","C0","C1","C2","C3","C4","C5","C6"];function je(){return{name:"",model:"",serial:"",operatorNumber:"",mtomGrams:"",isToy:!1,autologsFlights:!1,cClass:""}}const ie=W(!1),We=W(""),le=kt(je()),ce=W(""),se=W(!1);function ot(){Object.assign(le,je()),We.value="",ce.value="",ie.value=!0}function ee(Y){Object.assign(le,{name:Y.name||"",model:Y.model||"",serial:Y.serial||"",operatorNumber:Y.operatorNumber||"",mtomGrams:Y.mtomGrams||"",isToy:!!Y.isToy,autologsFlights:!!Y.autologsFlights,cClass:Y.cClass||""}),We.value=Y.id,ce.value="",ie.value=!0}function be(){ie.value=!1,We.value=""}async function Ne(){var z;if(ce.value="",!le.name.trim()){ce.value="Give the drone a name.";return}se.value=!0;const Y={...le,mtomGrams:Number(le.mtomGrams)||0},A=We.value?await xp(We.value,Y):await yp(Y);if(se.value=!1,!A.ok){ce.value=((z=A.body)==null?void 0:z.error)||"Could not save the drone.";return}ie.value=!1,await b()}const dt=W("");async function at(Y){var z;const A=await wp(Y.id);dt.value="",A.ok?await b():ce.value=((z=A.body)==null?void 0:z.error)||"Could not delete the drone."}const Ze=we(()=>{const Y=d.value.length,A=d.value.filter(gt=>{var ut;return(((ut=gt.compliance)==null?void 0:ut.redFlags)||[]).length}).length,z=d.value.filter(gt=>{var ut;return(ut=gt.compliance)==null?void 0:ut.required}).length;return{total:Y,flagged:A,required:z,fleet:u.value.length}});return(Y,A)=>(p(),g("div",rb,[r("div",lb,[r("div",ub,[(p(),g(ue,null,Be([["flights","Flights"],["drones","Drones"]],z=>r("button",{key:z[0],class:Ee(["rounded-md px-3.5 py-1.5 text-sm font-semibold transition",l.value===z[0]?"bg-accent-soft text-accent-soft-fg":"text-ink-secondary hover:text-ink"]),onClick:gt=>l.value=z[0]},k(z[1]),11,cb)),64))]),r("div",db,[r("a",{href:Oe(Cp)(),class:"btn-ghost inline-flex items-center gap-2",title:"Download a compliance CSV (Trafikstyrelsen / police disclosure)"},[E(X,{name:"download",size:15}),A[29]||(A[29]=$(" Export CSV ",-1))],8,fb),l.value==="flights"?(p(),g("button",{key:0,class:"btn-accent inline-flex items-center gap-2",onClick:$e},[E(X,{name:"plus",size:15}),A[30]||(A[30]=$(" Log flight ",-1))])):(p(),g("button",{key:1,class:"btn-accent inline-flex items-center gap-2",onClick:ot},[E(X,{name:"plus",size:15}),A[31]||(A[31]=$(" Add drone ",-1))]))])]),r("div",hb,[(p(!0),g(ue,null,Be([{label:"Flights logged",value:Ze.value.total,tone:"neutral"},{label:"Require logbook",value:Ze.value.required,tone:"neutral"},{label:"Compliance flags",value:Ze.value.flagged,tone:Ze.value.flagged?"danger":"success"},{label:"Registered drones",value:Ze.value.fleet,tone:"neutral"}],z=>(p(),g("div",{key:z.label,class:"panel p-5"},[r("div",pb,k(z.label),1),r("div",{class:Ee(["mt-2 text-[30px] font-bold leading-none tracking-tightest",z.tone==="danger"?"text-danger-fg":z.tone==="success"?"text-success-fg":"text-ink"])},k(z.value),3)]))),128))]),v.value?(p(),g("div",mb,k(v.value),1)):D("",!0),l.value==="flights"?(p(),g(ue,{key:1},[he.value?(p(),g("div",gb,[r("div",vb,[r("div",null,[r("div",_b,k(pe.value?"Edit entry":"New entry"),1),A[32]||(A[32]=r("div",{class:"mt-0.5 text-base font-semibold text-ink"},"Logbook flight (BEK 1649 §5)",-1))]),r("button",{class:"btn-icon",onClick:Ge},[E(X,{name:"x",size:16})])]),r("div",bb,[r("label",yb,[A[33]||(A[33]=r("span",{class:"eyebrow mb-1 block"},"Date",-1)),re(r("input",{"onUpdate:modelValue":A[0]||(A[0]=z=>q.operationDate=z),type:"date",class:"field"},null,512),[[Se,q.operationDate]])]),r("label",xb,[A[34]||(A[34]=r("span",{class:"eyebrow mb-1 block"},"Start",-1)),re(r("input",{"onUpdate:modelValue":A[1]||(A[1]=z=>q.startTime=z),type:"time",class:"field"},null,512),[[Se,q.startTime]])]),r("label",wb,[A[35]||(A[35]=r("span",{class:"eyebrow mb-1 block"},"End",-1)),re(r("input",{"onUpdate:modelValue":A[2]||(A[2]=z=>q.endTime=z),type:"time",class:"field"},null,512),[[Se,q.endTime]])]),r("label",kb,[A[36]||(A[36]=r("span",{class:"eyebrow mb-1 block"},"Drone",-1)),re(r("select",{"onUpdate:modelValue":A[3]||(A[3]=z=>q.drone=z),class:"field"},[u.value.length?D("",!0):(p(),g("option",Sb,"— add a drone first —")),(p(!0),g(ue,null,Be(u.value,z=>(p(),g("option",{key:z.id,value:z.id},k(z.name)+k(z.model?` · ${z.model}`:""),9,Tb))),128))],512),[[Mt,q.drone]])]),r("label",Pb,[A[37]||(A[37]=r("span",{class:"eyebrow mb-1 block"},"Max altitude (m AGL)",-1)),re(r("input",{"onUpdate:modelValue":A[4]||(A[4]=z=>q.maxAltitudeAgl=z),type:"number",min:"0",class:"field",placeholder:"120"},null,512),[[Se,q.maxAltitudeAgl]])]),r("label",Cb,[A[38]||(A[38]=r("span",{class:"eyebrow mb-1 block"},"Area / route",-1)),re(r("input",{"onUpdate:modelValue":A[5]||(A[5]=z=>q.areaRoute=z),class:"field",placeholder:"Field N of Roskilde, grid survey"},null,512),[[Se,q.areaRoute]])]),r("label",Lb,[A[39]||(A[39]=r("span",{class:"eyebrow mb-1 block"},"Remote pilot name",-1)),re(r("input",{"onUpdate:modelValue":A[6]||(A[6]=z=>q.pilotName=z),class:"field",placeholder:"Full name"},null,512),[[Se,q.pilotName]])]),r("label",Mb,[A[40]||(A[40]=r("span",{class:"eyebrow mb-1 block"},"Certificate ref",-1)),re(r("input",{"onUpdate:modelValue":A[7]||(A[7]=z=>q.certificateRef=z),class:"field",placeholder:"A2 / STS cert no."},null,512),[[Se,q.certificateRef]])]),r("label",Ab,[A[41]||(A[41]=r("span",{class:"eyebrow mb-1 block"},"Logging path",-1)),re(r("select",{"onUpdate:modelValue":A[8]||(A[8]=z=>q.loggingPath=z),class:"field"},[(p(),g(ue,null,Be(Z,z=>r("option",{key:z.value,value:z.value},k(z.label),9,Eb)),64))],512),[[Mt,q.loggingPath]])]),r("label",Ob,[A[42]||(A[42]=r("span",{class:"eyebrow mb-1 block"},"Category",-1)),re(r("select",{"onUpdate:modelValue":A[9]||(A[9]=z=>q.category=z),class:"field"},[(p(),g(ue,null,Be(R,z=>r("option",{key:z.value,value:z.value},k(z.label),9,zb)),64))],512),[[Mt,q.category]])]),r("label",Ib,[A[43]||(A[43]=r("span",{class:"eyebrow mb-1 block"},"Purpose",-1)),re(r("select",{"onUpdate:modelValue":A[10]||(A[10]=z=>q.purpose=z),class:"field"},[(p(),g(ue,null,Be(B,z=>r("option",{key:z.value,value:z.value},k(z.label),9,$b)),64))],512),[[Mt,q.purpose]])]),r("label",Nb,[A[44]||(A[44]=r("span",{class:"eyebrow mb-1 block"},"Authorisation ref",-1)),re(r("input",{"onUpdate:modelValue":A[11]||(A[11]=z=>q.authorisationRef=z),class:"field",placeholder:"Specific-category ref"},null,512),[[Se,q.authorisationRef]])])]),r("label",Db,[A[45]||(A[45]=r("span",{class:"eyebrow mb-1 block"},"FDR log URL (automatic path)",-1)),re(r("input",{"onUpdate:modelValue":A[12]||(A[12]=z=>q.rawFdrLogUrl=z),class:"field",placeholder:"Link to the stored flight-data-recorder export"},null,512),[[Se,q.rawFdrLogUrl]])]),r("button",{class:"mt-4 flex items-center gap-1.5 text-sm font-semibold text-accent",onClick:A[13]||(A[13]=z=>Ue.value=!Ue.value)},[E(X,{name:Ue.value?"x":"plus",size:14},null,8,["name"]),A[46]||(A[46]=$(" Operational details (weather, airspace, incidents) ",-1))]),Ue.value?(p(),g("div",Fb,[r("label",Rb,[A[47]||(A[47]=r("span",{class:"eyebrow mb-1 block"},"Weather / wind",-1)),re(r("input",{"onUpdate:modelValue":A[14]||(A[14]=z=>q.weather=z),class:"field",placeholder:"6 m/s NW, CAVOK"},null,512),[[Se,q.weather]])]),r("label",Bb,[A[48]||(A[48]=r("span",{class:"eyebrow mb-1 block"},"Airspace / NOTAM ref",-1)),re(r("input",{"onUpdate:modelValue":A[15]||(A[15]=z=>q.airspaceRef=z),class:"field"},null,512),[[Se,q.airspaceRef]])]),r("label",Ub,[A[49]||(A[49]=r("span",{class:"eyebrow mb-1 block"},"Observer",-1)),re(r("input",{"onUpdate:modelValue":A[16]||(A[16]=z=>q.observer=z),class:"field"},null,512),[[Se,q.observer]])]),r("label",Vb,[A[50]||(A[50]=r("span",{class:"eyebrow mb-1 block"},"Incidents / anomalies",-1)),re(r("input",{"onUpdate:modelValue":A[17]||(A[17]=z=>q.incidents=z),class:"field",placeholder:"RTH trigger, GPS dropout…"},null,512),[[Se,q.incidents]])]),r("label",Zb,[A[51]||(A[51]=r("span",{class:"eyebrow mb-1 block"},"Notes",-1)),re(r("textarea",{"onUpdate:modelValue":A[18]||(A[18]=z=>q.notes=z),rows:"2",class:"field"},null,512),[[Se,q.notes]])])])):D("",!0),r("div",Hb,[r("button",{class:"btn-accent",disabled:fe.value,onClick:_e},k(fe.value?"Saving…":pe.value?"Save changes":"Log flight"),9,jb),r("button",{class:"btn-ghost",onClick:Ge},"Cancel"),Te.value?(p(),g("span",Wb,k(Te.value),1)):D("",!0)])])):D("",!0),r("div",Kb,[h.value?(p(),g("div",Gb,"Loading…")):d.value.length?(p(),g("div",Yb,[r("table",Jb,[r("thead",null,[r("tr",Xb,[(p(),g(ue,null,Be(["Date","Drone","Area / route","Alt","Pilot","Compliance",""],z=>r("th",{key:z,class:"border-y border-line bg-surface-2 px-5 py-2.5 font-mono text-[10.5px] font-normal uppercase tracking-caps text-ink-muted"},k(z),1)),64))])]),r("tbody",null,[(p(!0),g(ue,null,Be(d.value,z=>{var gt,ut,wt,y;return p(),g(ue,{key:z.id},[r("tr",{class:Ee(["border-b border-line last:border-0",pe.value===z.id?"bg-accent-soft":""])},[r("td",Qb,[$(k((z.operationDate||"").slice(0,10))+" ",1),z.startTime?(p(),g("span",ey,k(z.startTime),1)):D("",!0)]),r("td",ty,k(z.droneName||"—"),1),r("td",{class:"max-w-[220px] truncate px-5 py-3 text-ink-secondary",title:z.areaRoute},k(z.areaRoute||"—"),9,ny),r("td",iy,k(z.maxAltitudeAgl?z.maxAltitudeAgl+" m":"—"),1),r("td",oy,k(z.pilotName||"—"),1),r("td",sy,[r("button",{class:Ee(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",s[C(z).tone]]),onClick:_=>M(z.id)},[C(z).tone==="danger"?(p(),lt(X,{key:0,name:"alertTriangle",size:12})):C(z).tone==="success"?(p(),lt(X,{key:1,name:"check",size:12})):D("",!0),$(" "+k(C(z).label),1)],10,ay)]),r("td",ry,[ye.value===z.id?(p(),g(ue,{key:0},[A[54]||(A[54]=r("span",{class:"mr-2 text-xs text-ink-muted"},"Delete?",-1)),r("button",{class:"btn-ghost mr-1",onClick:A[19]||(A[19]=_=>ye.value="")},"Cancel"),r("button",{class:"rounded bg-danger px-3 py-1.5 text-sm font-semibold text-white transition hover:brightness-110",onClick:_=>ze(z)},"Delete",8,ly)],64)):(p(),g(ue,{key:1},[r("button",{class:"btn-ghost mr-1 inline-flex items-center gap-1",onClick:_=>Ie(z)},[E(X,{name:"sliders",size:13}),A[55]||(A[55]=$(" Edit",-1))],8,uy),r("button",{class:"btn-ghost inline-flex items-center gap-1",onClick:_=>ye.value=z.id},[E(X,{name:"trash",size:13})],8,cy)],64))])],2),T.value===z.id?(p(),g("tr",dy,[r("td",fy,[r("div",hy,[r("span",py,[A[56]||(A[56]=$("Logging path: ",-1)),r("b",my,k(((gt=z.compliance)==null?void 0:gt.loggingPath)||"—"),1)]),r("span",gy,[A[57]||(A[57]=$("Category: ",-1)),r("b",vy,k(z.category||"—"),1)]),r("span",_y,[A[58]||(A[58]=$("Retain until: ",-1)),r("b",by,k((z.retentionUntil||"").slice(0,10)||"—"),1)]),(ut=z.compliance)!=null&&ut.exempt?(p(),g("span",yy,[A[59]||(A[59]=$("Exempt: ",-1)),r("b",xy,k(z.compliance.exemptReason),1)])):D("",!0)]),(((wt=z.compliance)==null?void 0:wt.redFlags)||[]).length?(p(),g("ul",wy,[(p(!0),g(ue,null,Be(z.compliance.redFlags,(_,w)=>(p(),g("li",{key:w,class:"flex items-start gap-2 text-xs text-danger-fg"},[E(X,{name:"alertTriangle",size:13,class:"mt-px shrink-0"}),$(" "+k(_),1)]))),128))])):(y=z.compliance)!=null&&y.exempt?D("",!0):(p(),g("div",ky,"No compliance gaps detected."))])])):D("",!0)],64)}),128))])])])):(p(),g("div",qb,[E(X,{name:"book",size:26,class:"text-ink-muted"}),A[52]||(A[52]=r("div",{class:"mt-3 text-sm font-medium text-ink-secondary"},"No flights logged yet",-1)),A[53]||(A[53]=r("div",{class:"mt-1 text-xs text-ink-muted"},"Log your first operation to start the 5-year retention record.",-1))]))])],64)):(p(),g(ue,{key:2},[ie.value?(p(),g("div",Sy,[r("div",Ty,[r("div",null,[r("div",Py,k(We.value?"Edit drone":"New drone"),1),A[60]||(A[60]=r("div",{class:"mt-0.5 text-base font-semibold text-ink"},"Aircraft registry",-1))]),r("button",{class:"btn-icon",onClick:be},[E(X,{name:"x",size:16})])]),r("div",Cy,[r("label",Ly,[A[61]||(A[61]=r("span",{class:"eyebrow mb-1 block"},"Name",-1)),re(r("input",{"onUpdate:modelValue":A[20]||(A[20]=z=>le.name=z),class:"field",placeholder:"Mavic-01"},null,512),[[Se,le.name]])]),r("label",My,[A[62]||(A[62]=r("span",{class:"eyebrow mb-1 block"},"Model",-1)),re(r("input",{"onUpdate:modelValue":A[21]||(A[21]=z=>le.model=z),class:"field",placeholder:"DJI Mavic 3 Enterprise"},null,512),[[Se,le.model]])]),r("label",Ay,[A[63]||(A[63]=r("span",{class:"eyebrow mb-1 block"},"Serial",-1)),re(r("input",{"onUpdate:modelValue":A[22]||(A[22]=z=>le.serial=z),class:"field"},null,512),[[Se,le.serial]])]),r("label",Ey,[A[64]||(A[64]=r("span",{class:"eyebrow mb-1 block"},"Operator no.",-1)),re(r("input",{"onUpdate:modelValue":A[23]||(A[23]=z=>le.operatorNumber=z),class:"field",placeholder:"DNK…"},null,512),[[Se,le.operatorNumber]])]),r("label",Oy,[A[65]||(A[65]=r("span",{class:"eyebrow mb-1 block"},"MTOM (grams)",-1)),re(r("input",{"onUpdate:modelValue":A[24]||(A[24]=z=>le.mtomGrams=z),type:"number",min:"0",class:"field",placeholder:"920"},null,512),[[Se,le.mtomGrams]])]),r("label",zy,[A[66]||(A[66]=r("span",{class:"eyebrow mb-1 block"},"C-class",-1)),re(r("select",{"onUpdate:modelValue":A[25]||(A[25]=z=>le.cClass=z),class:"field"},[(p(),g(ue,null,Be(ne,z=>r("option",{key:z,value:z},k(z||"— none —"),9,Iy)),64))],512),[[Mt,le.cClass]])])]),r("div",$y,[r("label",Ny,[re(r("input",{"onUpdate:modelValue":A[26]||(A[26]=z=>le.autologsFlights=z),type:"checkbox",class:"h-4 w-4 accent-[var(--accent)]"},null,512),[[Sa,le.autologsFlights]]),A[67]||(A[67]=$(" Auto-logs flights (onboard FDR) ",-1))]),r("label",Dy,[re(r("input",{"onUpdate:modelValue":A[27]||(A[27]=z=>le.isToy=z),type:"checkbox",class:"h-4 w-4 accent-[var(--accent)]"},null,512),[[Sa,le.isToy]]),A[68]||(A[68]=$(" Toy drone (logbook-exempt) ",-1))])]),r("div",Fy,[r("button",{class:"btn-accent",disabled:se.value,onClick:Ne},k(se.value?"Saving…":We.value?"Save changes":"Add drone"),9,Ry),r("button",{class:"btn-ghost",onClick:be},"Cancel"),ce.value?(p(),g("span",By,k(ce.value),1)):D("",!0)])])):D("",!0),r("div",Uy,[h.value?(p(),g("div",Vy,"Loading…")):u.value.length?(p(),g("div",Hy,[r("table",jy,[r("thead",null,[r("tr",Wy,[(p(),g(ue,null,Be(["Name","Model","MTOM","Class","FDR",""],z=>r("th",{key:z,class:"border-y border-line bg-surface-2 px-5 py-2.5 font-mono text-[10.5px] font-normal uppercase tracking-caps text-ink-muted"},k(z),1)),64))])]),r("tbody",null,[(p(!0),g(ue,null,Be(u.value,z=>(p(),g("tr",{key:z.id,class:Ee(["border-b border-line last:border-0",We.value===z.id?"bg-accent-soft":""])},[r("td",Ky,k(z.name),1),r("td",Gy,k(z.model||"—"),1),r("td",qy,k(z.mtomGrams?z.mtomGrams+" g":"—"),1),r("td",Yy,[z.cClass?(p(),g("span",{key:0,class:Ee(["inline-flex rounded-full px-2 py-0.5 text-[11px] font-semibold",s.accent])},k(z.cClass),3)):(p(),g("span",Jy,"—")),z.isToy?(p(),g("span",{key:2,class:Ee(["ml-1 inline-flex rounded-full px-2 py-0.5 text-[11px] font-semibold",s.neutral])},"toy",2)):D("",!0)]),r("td",Xy,[r("span",{class:Ee(["text-xs",z.autologsFlights?"text-success-fg":"text-ink-muted"])},k(z.autologsFlights?"yes":"no"),3)]),r("td",Qy,[dt.value===z.id?(p(),g(ue,{key:0},[A[71]||(A[71]=r("span",{class:"mr-2 text-xs text-ink-muted"},"Delete?",-1)),r("button",{class:"btn-ghost mr-1",onClick:A[28]||(A[28]=gt=>dt.value="")},"Cancel"),r("button",{class:"rounded bg-danger px-3 py-1.5 text-sm font-semibold text-white transition hover:brightness-110",onClick:gt=>at(z)},"Delete",8,ex)],64)):(p(),g(ue,{key:1},[r("button",{class:"btn-ghost mr-1 inline-flex items-center gap-1",onClick:gt=>ee(z)},[E(X,{name:"sliders",size:13}),A[72]||(A[72]=$(" Edit",-1))],8,tx),r("button",{class:"btn-ghost inline-flex items-center gap-1",onClick:gt=>dt.value=z.id},[E(X,{name:"trash",size:13})],8,nx)],64))])],2))),128))])])])):(p(),g("div",Zy,[E(X,{name:"drone",size:26,class:"text-ink-muted"}),A[69]||(A[69]=r("div",{class:"mt-3 text-sm font-medium text-ink-secondary"},"No drones registered",-1)),A[70]||(A[70]=r("div",{class:"mt-1 text-xs text-ink-muted"},"Register the airframes you fly to log flights against them.",-1))]))])],64))]))}},ox={class:"mx-auto flex max-w-[1240px] flex-col gap-5 p-7"},sx={class:"flex flex-wrap items-center gap-3"},ax={class:"inline-flex flex-wrap rounded-lg border border-line bg-surface-1 p-0.5"},rx=["onClick"],lx={class:"ml-auto"},ux={class:"grid grid-cols-4 gap-4 max-[900px]:grid-cols-2"},cx={class:"eyebrow"},dx={key:0,class:"panel border-danger/40 p-4 text-sm text-danger-fg"},fx={key:1,class:"panel p-5"},hx={class:"mb-4 flex items-center justify-between"},px={class:"eyebrow"},mx={class:"mt-0.5 text-base font-semibold text-ink"},gx={class:"grid grid-cols-3 gap-3 max-[760px]:grid-cols-1"},vx={class:"col-span-2 block max-[760px]:col-span-1"},_x={class:"block"},bx=["value"],yx={class:"block"},xx=["value"],wx={class:"block"},kx=["value"],Sx={class:"block"},Tx={class:"block"},Px={class:"block"},Cx={class:"block"},Lx=["value"],Mx={class:"block"},Ax={class:"block"},Ex={class:"block"},Ox=["value"],zx={class:"mt-3 block"},Ix={key:0,class:"mt-3"},$x={class:"eyebrow mb-1 block"},Nx={key:1,class:"mt-3 text-xs text-ink-muted"},Dx={class:"mt-4 flex items-center gap-3"},Fx=["disabled"],Rx={key:0,class:"text-sm text-danger-fg"},Bx={class:"panel overflow-hidden p-0"},Ux={key:0,class:"px-5 py-12 text-center text-sm text-ink-muted"},Vx={key:1,class:"grid place-items-center px-5 py-16 text-center"},Zx={class:"mt-3 text-sm font-medium text-ink-secondary"},Hx={class:"mt-1 text-xs text-ink-muted"},jx={key:2,class:"overflow-x-auto"},Wx={class:"w-full border-collapse text-sm"},Kx={class:"text-left"},Gx={class:"px-5 py-3"},qx={class:"font-semibold text-ink"},Yx={key:0,class:"font-mono text-[11px] text-ink-muted"},Jx={class:"px-5 py-3 text-ink-secondary"},Xx={class:"px-5 py-3 text-ink-secondary"},Qx={class:"px-5 py-3"},e0=["onClick"],t0={key:0,class:"mt-0.5 font-mono text-[10.5px] text-ink-muted"},n0={class:"px-5 py-3 font-mono text-ink-secondary"},i0={class:"whitespace-nowrap px-5 py-3 text-right"},o0=["onClick"],s0=["onClick"],a0=["href"],r0=["onClick"],l0=["onClick"],u0=["onClick"],c0={key:0,class:"border-b border-line bg-surface-2"},d0={colspan:"6",class:"px-5 py-3"},f0={class:"flex flex-wrap gap-x-8 gap-y-1.5 text-xs"},h0={class:"text-ink-secondary"},p0={class:"text-ink"},m0={class:"text-ink-secondary"},g0={class:"text-ink"},v0={key:0,class:"text-ink-secondary"},_0={class:"text-ink"},b0={key:1,class:"text-ink-secondary"},y0={class:"font-mono text-ink"},x0={key:2,class:"text-ink-secondary"},w0={class:"font-mono text-ink"},k0={class:"text-ink-secondary"},S0={class:"text-ink"},T0={key:0,class:"mt-2 space-y-1"},P0={key:1,class:"mt-2 text-xs text-success-fg"},C0={key:2,class:"mt-2 text-xs text-ink-secondary"},L0={class:"flex max-h-[90vh] w-full max-w-[920px] flex-col overflow-hidden rounded-lg border border-line bg-surface-1 shadow-2xl"},M0={class:"flex items-center gap-3 border-b border-line px-5 py-3"},A0={class:"min-w-0"},E0={class:"truncate text-sm font-semibold text-ink"},O0={class:"truncate font-mono text-[11px] text-ink-muted"},z0={class:"ml-auto flex items-center gap-2"},I0=["href"],$0=["href"],N0={class:"flex-1 overflow-auto bg-surface-2"},D0=["src","alt"],F0=["src","title"],R0={key:2,class:"grid place-items-center px-6 py-16 text-center"},B0={class:"mt-1 text-xs text-ink-muted"},U0=["href"],V0={__name:"Documents",props:{email:{type:String,default:""},role:{type:String,default:"user"},organization:{type:String,default:""},organizationName:{type:String,default:""}},setup(t){const i={success:"bg-success-soft text-success-fg",warning:"bg-amber-soft text-amber-fg",danger:"bg-danger-soft text-danger-fg",accent:"bg-accent-soft text-accent-soft-fg",neutral:"bg-surface-2 text-ink-secondary"},s=[{value:"certificate",label:"Pilot certificate"},{value:"medical",label:"Medical / training"},{value:"insurance",label:"Insurance / liability"},{value:"background_check",label:"Background check / waiver"},{value:"registration",label:"Aircraft registration"},{value:"maintenance",label:"Maintenance log"},{value:"conformity",label:"Conformity / compliance"},{value:"firmware",label:"Firmware / software"},{value:"incident",label:"Incident / repair report"},{value:"flight_log",label:"Flight log"},{value:"checklist",label:"Pre-flight checklist"},{value:"airspace_auth",label:"Airspace authorisation"},{value:"mission_plan",label:"Mission plan / flight path"},{value:"risk_assessment",label:"Risk assessment / survey"},{value:"contract",label:"Contract / SOW"},{value:"client_insurance",label:"Client insurance cert"},{value:"delivery_report",label:"Delivery / media handoff"},{value:"other",label:"Other"}],l=Object.fromEntries(s.map(y=>[y.value,y.label])),u=[{value:"pilot",label:"Pilot"},{value:"aircraft",label:"Aircraft"},{value:"organization",label:"Organization"},{value:"client",label:"Client"},{value:"other",label:"Other"}],d=[{value:"active",label:"Active"},{value:"pending_review",label:"Pending review"},{value:"archived",label:"Archived"}],h=[{value:"pilot",label:"Pilot"},{value:"ops",label:"Ops manager"},{value:"admin",label:"Admin"},{value:"client",label:"Client-facing"}],v=W([]),b=W([]),C=W(!1),T=W("");async function M(){C.value=!0,T.value="";const[y,_]=await Promise.all([Lp(),Rc()]);y.ok||(T.value=y.status===503?"Document storage is not configured on the API Server (service account missing).":"Could not load documents."),v.value=y.documents,b.value=_.drones||[],C.value=!1}hi(M);const R=W("all"),B=[["all","All"],["expiring","Expiring soon"],["expired","Expired"],["pending","Pending review"],["archived","Archived"]],Z=we(()=>{const y=v.value;switch(R.value){case"expiring":return y.filter(_=>{var w;return((w=_.expiry)==null?void 0:w.state)==="expiring_soon"&&_.status!=="archived"});case"expired":return y.filter(_=>{var w;return((w=_.expiry)==null?void 0:w.state)==="expired"&&_.status!=="archived"});case"pending":return y.filter(_=>_.status==="pending_review");case"archived":return y.filter(_=>_.status==="archived");default:return y.filter(_=>_.status!=="archived")}});function F(y){if(y.status==="archived")return{tone:"neutral",label:"Superseded",icon:""};const _=y.expiry||{};return _.state==="expired"?{tone:"danger",label:"Expired",icon:"alertTriangle"}:_.state==="expiring_soon"?{tone:"warning",label:`Expires in ${_.daysUntilExpiry}d`,icon:"clock"}:_.state==="valid"?{tone:"success",label:"Valid",icon:"check"}:{tone:"neutral",label:"No expiry",icon:""}}const he=W("");function pe(y){he.value=he.value===y?"":y}function q(y){return y.ownerDrone?y.ownerDroneName||"Aircraft":y.ownerRef?y.ownerRef:y.ownerType==="pilot"?"Pilot":y.ownerType?y.ownerType.charAt(0).toUpperCase()+y.ownerType.slice(1):"—"}const Te=["png","jpg","jpeg","gif","webp","svg","bmp","avif"],fe=["pdf","txt","csv","log","json","md","html","htm","xml"];function Ue(y){const _=(y||"").split(".").pop().toLowerCase();return Te.includes(_)?"image":fe.includes(_)?"frame":"none"}const $e=W(null),Ie=we(()=>$e.value?Ue($e.value.fileName):"none"),Ge=we(()=>$e.value?Op($e.value.id):"");function _e(y){$e.value=y}function ye(){$e.value=null}function ze(y){y.key==="Escape"&&$e.value&&ye()}hi(()=>window.addEventListener("keydown",ze)),Ho(()=>window.removeEventListener("keydown",ze));function ne(){return{title:"",docType:"certificate",ownerType:"pilot",ownerDrone:"",ownerRef:"",reference:"",jurisdiction:"",issueDate:"",expiryDate:"",status:"active",accessTier:"ops",notes:""}}const je=W(!1),ie=W(""),We=W(""),le=W(""),ce=kt(ne()),se=W(null),ot=W(null),ee=W(""),be=W(!1);function Ne(){se.value=null,ot.value&&(ot.value.value="")}function dt(){Object.assign(ce,ne()),ie.value="",We.value="",le.value="",Ne(),ee.value="",je.value=!0}function at(y){Object.assign(ce,{title:y.title||"",docType:y.docType||"certificate",ownerType:y.ownerType||"pilot",ownerDrone:y.ownerDrone||"",ownerRef:y.ownerRef||"",reference:y.reference||"",jurisdiction:y.jurisdiction||"",issueDate:y.issueDate||"",expiryDate:y.expiryDate||"",status:y.status||"active",accessTier:y.accessTier||"ops",notes:y.notes||""}),ie.value=y.id,We.value="",le.value="",Ne(),ee.value="",je.value=!0}function Ze(y){at(y),ie.value="",We.value=y.id,le.value=y.title,ce.status="active"}function Y(){je.value=!1,ie.value="",We.value=""}function A(y){var _;se.value=((_=y.target.files)==null?void 0:_[0])||null}async function z(){var _;if(ee.value="",!ce.title.trim()){ee.value="Give the document a title.";return}be.value=!0;let y;if(ie.value)y=await Ap(ie.value,{...ce});else{const w={...ce};We.value&&(w.replaces=We.value),y=await Mp(w,se.value)}if(be.value=!1,!y.ok){ee.value=((_=y.body)==null?void 0:_.error)||"Could not save the document.";return}je.value=!1,ie.value="",We.value="",await M()}const gt=W("");async function ut(y){var w;const _=await Ep(y.id);gt.value="",_.ok?await M():ee.value=((w=_.body)==null?void 0:w.error)||"Could not delete the document."}const wt=we(()=>{const y=v.value.filter(_=>_.status!=="archived");return{total:y.length,expiring:y.filter(_=>{var w;return((w=_.expiry)==null?void 0:w.state)==="expiring_soon"}).length,expired:y.filter(_=>{var w;return((w=_.expiry)==null?void 0:w.state)==="expired"}).length,pending:v.value.filter(_=>_.status==="pending_review").length}});return(y,_)=>(p(),g("div",ox,[r("div",sx,[r("div",ax,[(p(),g(ue,null,Be(B,w=>r("button",{key:w[0],class:Ee(["rounded-md px-3.5 py-1.5 text-sm font-semibold transition",R.value===w[0]?"bg-accent-soft text-accent-soft-fg":"text-ink-secondary hover:text-ink"]),onClick:K=>R.value=w[0]},k(w[1]),11,rx)),64))]),r("div",lx,[r("button",{class:"btn-accent inline-flex items-center gap-2",onClick:dt},[E(X,{name:"upload",size:15}),_[13]||(_[13]=$(" Add document ",-1))])])]),r("div",ux,[(p(!0),g(ue,null,Be([{label:"Documents on file",value:wt.value.total,tone:"neutral"},{label:"Expiring soon",value:wt.value.expiring,tone:wt.value.expiring?"warning":"neutral"},{label:"Expired",value:wt.value.expired,tone:wt.value.expired?"danger":"success"},{label:"Pending review",value:wt.value.pending,tone:wt.value.pending?"accent":"neutral"}],w=>(p(),g("div",{key:w.label,class:"panel p-5"},[r("div",cx,k(w.label),1),r("div",{class:Ee(["mt-2 text-[30px] font-bold leading-none tracking-tightest",w.tone==="danger"?"text-danger-fg":w.tone==="warning"?"text-amber-fg":w.tone==="success"?"text-success-fg":w.tone==="accent"?"text-accent-soft-fg":"text-ink"])},k(w.value),3)]))),128))]),T.value?(p(),g("div",dx,k(T.value),1)):D("",!0),je.value?(p(),g("div",fx,[r("div",hx,[r("div",null,[r("div",px,k(ie.value?"Edit document":We.value?"New version":"New document"),1),r("div",mx,k(We.value?`Supersedes “${le.value}”`:"Compliance & operational document"),1)]),r("button",{class:"btn-icon",onClick:Y},[E(X,{name:"x",size:16})])]),r("div",gx,[r("label",vx,[_[14]||(_[14]=r("span",{class:"eyebrow mb-1 block"},"Title",-1)),re(r("input",{"onUpdate:modelValue":_[0]||(_[0]=w=>ce.title=w),class:"field",placeholder:"A2 Remote Pilot Certificate — J. Dariusz"},null,512),[[Se,ce.title]])]),r("label",_x,[_[15]||(_[15]=r("span",{class:"eyebrow mb-1 block"},"Type",-1)),re(r("select",{"onUpdate:modelValue":_[1]||(_[1]=w=>ce.docType=w),class:"field"},[(p(),g(ue,null,Be(s,w=>r("option",{key:w.value,value:w.value},k(w.label),9,bx)),64))],512),[[Mt,ce.docType]])]),r("label",yx,[_[16]||(_[16]=r("span",{class:"eyebrow mb-1 block"},"Owner type",-1)),re(r("select",{"onUpdate:modelValue":_[2]||(_[2]=w=>ce.ownerType=w),class:"field"},[(p(),g(ue,null,Be(u,w=>r("option",{key:w.value,value:w.value},k(w.label),9,xx)),64))],512),[[Mt,ce.ownerType]])]),r("label",wx,[_[18]||(_[18]=r("span",{class:"eyebrow mb-1 block"},"Aircraft (if any)",-1)),re(r("select",{"onUpdate:modelValue":_[3]||(_[3]=w=>ce.ownerDrone=w),class:"field"},[_[17]||(_[17]=r("option",{value:""},"— none —",-1)),(p(!0),g(ue,null,Be(b.value,w=>(p(),g("option",{key:w.id,value:w.id},k(w.name)+k(w.model?` · ${w.model}`:""),9,kx))),128))],512),[[Mt,ce.ownerDrone]])]),r("label",Sx,[_[19]||(_[19]=r("span",{class:"eyebrow mb-1 block"},"Owner reference",-1)),re(r("input",{"onUpdate:modelValue":_[4]||(_[4]=w=>ce.ownerRef=w),class:"field",placeholder:"Client name / serial / site"},null,512),[[Se,ce.ownerRef]])]),r("label",Tx,[_[20]||(_[20]=r("span",{class:"eyebrow mb-1 block"},"Reference / number",-1)),re(r("input",{"onUpdate:modelValue":_[5]||(_[5]=w=>ce.reference=w),class:"field",placeholder:"Cert / registration / policy no."},null,512),[[Se,ce.reference]])]),r("label",Px,[_[21]||(_[21]=r("span",{class:"eyebrow mb-1 block"},"Jurisdiction",-1)),re(r("input",{"onUpdate:modelValue":_[6]||(_[6]=w=>ce.jurisdiction=w),class:"field",placeholder:"DK / EASA / FAA"},null,512),[[Se,ce.jurisdiction]])]),r("label",Cx,[_[22]||(_[22]=r("span",{class:"eyebrow mb-1 block"},"Access tier",-1)),re(r("select",{"onUpdate:modelValue":_[7]||(_[7]=w=>ce.accessTier=w),class:"field"},[(p(),g(ue,null,Be(h,w=>r("option",{key:w.value,value:w.value},k(w.label),9,Lx)),64))],512),[[Mt,ce.accessTier]])]),r("label",Mx,[_[23]||(_[23]=r("span",{class:"eyebrow mb-1 block"},"Issue date",-1)),re(r("input",{"onUpdate:modelValue":_[8]||(_[8]=w=>ce.issueDate=w),type:"date",class:"field"},null,512),[[Se,ce.issueDate]])]),r("label",Ax,[_[24]||(_[24]=r("span",{class:"eyebrow mb-1 block"},"Expiry date",-1)),re(r("input",{"onUpdate:modelValue":_[9]||(_[9]=w=>ce.expiryDate=w),type:"date",class:"field"},null,512),[[Se,ce.expiryDate]])]),r("label",Ex,[_[25]||(_[25]=r("span",{class:"eyebrow mb-1 block"},"Status",-1)),re(r("select",{"onUpdate:modelValue":_[10]||(_[10]=w=>ce.status=w),class:"field"},[(p(),g(ue,null,Be(d,w=>r("option",{key:w.value,value:w.value},k(w.label),9,Ox)),64))],512),[[Mt,ce.status]])])]),r("label",zx,[_[26]||(_[26]=r("span",{class:"eyebrow mb-1 block"},"Notes",-1)),re(r("textarea",{"onUpdate:modelValue":_[11]||(_[11]=w=>ce.notes=w),rows:"2",class:"field",placeholder:"Conditions, renewal contacts, anything worth recording"},null,512),[[Se,ce.notes]])]),ie.value?(p(),g("div",Nx,[..._[28]||(_[28]=[$(" Editing updates metadata only. To replace the file, close this and use ",-1),r("b",{class:"text-ink-secondary"},"New version",-1),$(" on the document — the old version is kept for audit. ",-1)])])):(p(),g("div",Ix,[r("span",$x,"File "+k(We.value?"(new version)":"(optional)"),1),r("input",{ref_key:"fileInput",ref:ot,type:"file",class:"field",onChange:A},null,544),_[27]||(_[27]=r("p",{class:"mt-1 text-xs text-ink-muted"}," Stored in PocketBase for now (object storage later). Max 50 MB. ",-1))])),r("div",Dx,[r("button",{class:"btn-accent",disabled:be.value,onClick:z},k(be.value?"Saving…":ie.value?"Save changes":We.value?"Upload new version":"Add document"),9,Fx),r("button",{class:"btn-ghost",onClick:Y},"Cancel"),ee.value?(p(),g("span",Rx,k(ee.value),1)):D("",!0)])])):D("",!0),r("div",Bx,[C.value?(p(),g("div",Ux,"Loading…")):Z.value.length?(p(),g("div",jx,[r("table",Wx,[r("thead",null,[r("tr",Kx,[(p(),g(ue,null,Be(["Title","Type","Owner","Expiry","Ver",""],w=>r("th",{key:w,class:"border-y border-line bg-surface-2 px-5 py-2.5 font-mono text-[10.5px] font-normal uppercase tracking-caps text-ink-muted"},k(w),1)),64))])]),r("tbody",null,[(p(!0),g(ue,null,Be(Z.value,w=>{var K,H;return p(),g(ue,{key:w.id},[r("tr",{class:Ee(["border-b border-line last:border-0",ie.value===w.id?"bg-accent-soft":""])},[r("td",Gx,[r("div",qx,k(w.title),1),w.reference?(p(),g("div",Yx,k(w.reference),1)):D("",!0)]),r("td",Jx,k(Oe(l)[w.docType]||w.docType||"—"),1),r("td",Xx,k(q(w)),1),r("td",Qx,[r("button",{class:Ee(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",i[F(w).tone]]),onClick:V=>pe(w.id)},[F(w).icon?(p(),lt(X,{key:0,name:F(w).icon,size:12},null,8,["name"])):D("",!0),$(" "+k(F(w).label),1)],10,e0),w.expiryDate?(p(),g("div",t0,k(w.expiryDate),1)):D("",!0)]),r("td",n0,"v"+k(w.version||1),1),r("td",i0,[gt.value===w.id?(p(),g(ue,{key:0},[_[29]||(_[29]=r("span",{class:"mr-2 text-xs text-ink-muted"},"Delete?",-1)),r("button",{class:"btn-ghost mr-1",onClick:_[12]||(_[12]=V=>gt.value="")},"Cancel"),r("button",{class:"rounded bg-danger px-3 py-1.5 text-sm font-semibold text-white transition hover:brightness-110",onClick:V=>ut(w)},"Delete",8,o0)],64)):(p(),g(ue,{key:1},[w.hasFile?(p(),g("button",{key:0,class:"btn-ghost mr-1 inline-flex items-center gap-1",title:"Preview",onClick:V=>_e(w)},[E(X,{name:"eye",size:13})],8,s0)):D("",!0),w.hasFile?(p(),g("a",{key:1,href:Oe(hr)(w.id),class:"btn-ghost mr-1 inline-flex items-center gap-1",title:"Download file"},[E(X,{name:"download",size:13})],8,a0)):D("",!0),r("button",{class:"btn-ghost mr-1 inline-flex items-center gap-1",title:"Upload new version",onClick:V=>Ze(w)},[E(X,{name:"upload",size:13})],8,r0),r("button",{class:"btn-ghost mr-1 inline-flex items-center gap-1",onClick:V=>at(w)},[E(X,{name:"sliders",size:13}),_[30]||(_[30]=$(" Edit",-1))],8,l0),r("button",{class:"btn-ghost inline-flex items-center gap-1",onClick:V=>gt.value=w.id},[E(X,{name:"trash",size:13})],8,u0)],64))])],2),he.value===w.id?(p(),g("tr",c0,[r("td",d0,[r("div",f0,[r("span",h0,[_[31]||(_[31]=$("Status: ",-1)),r("b",p0,k(w.status||"—"),1)]),r("span",m0,[_[32]||(_[32]=$("Access: ",-1)),r("b",g0,k(w.accessTier||"—"),1)]),w.jurisdiction?(p(),g("span",v0,[_[33]||(_[33]=$("Jurisdiction: ",-1)),r("b",_0,k(w.jurisdiction),1)])):D("",!0),w.issueDate?(p(),g("span",b0,[_[34]||(_[34]=$("Issued: ",-1)),r("b",y0,k(w.issueDate),1)])):D("",!0),w.expiryDate?(p(),g("span",x0,[_[35]||(_[35]=$("Expires: ",-1)),r("b",w0,k(w.expiryDate),1)])):D("",!0),r("span",k0,[_[36]||(_[36]=$("File: ",-1)),r("b",S0,k(w.hasFile?w.fileName:"none"),1)])]),(((K=w.expiry)==null?void 0:K.flags)||[]).length?(p(),g("ul",T0,[(p(!0),g(ue,null,Be(w.expiry.flags,(V,ae)=>(p(),g("li",{key:ae,class:Ee(["flex items-start gap-2 text-xs",w.expiry.state==="expired"?"text-danger-fg":w.expiry.state==="expiring_soon"?"text-amber-fg":"text-ink-secondary"])},[E(X,{name:"alertTriangle",size:13,class:"mt-px shrink-0"}),$(" "+k(V),1)],2))),128))])):((H=w.expiry)==null?void 0:H.state)==="valid"?(p(),g("div",P0,"In force — no action needed.")):D("",!0),w.notes?(p(),g("div",C0,[_[37]||(_[37]=r("span",{class:"text-ink-muted"},"Notes:",-1)),$(" "+k(w.notes),1)])):D("",!0)])])):D("",!0)],64)}),128))])])])):(p(),g("div",Vx,[E(X,{name:"fileText",size:26,class:"text-ink-muted"}),r("div",Zx,k(R.value==="all"?"No documents on file yet":"Nothing in this view"),1),r("div",Hx,k(R.value==="all"?"Add certificates, registrations, insurance and authorisations to track their expiry.":"Try a different filter."),1)]))]),(p(),lt(lf,{to:"body"},[$e.value?(p(),g("div",{key:0,class:"fixed inset-0 z-50 grid place-items-center p-4",style:{background:"color-mix(in srgb, black 60%, transparent)"},onClick:Kr(ye,["self"])},[r("div",L0,[r("div",M0,[r("div",A0,[r("div",E0,k($e.value.title),1),r("div",O0,k($e.value.fileName),1)]),r("div",z0,[r("a",{href:Ge.value,target:"_blank",rel:"noopener",class:"btn-ghost inline-flex items-center gap-1.5",title:"Open in new tab"},[E(X,{name:"globe",size:14}),_[38]||(_[38]=$(" New tab ",-1))],8,I0),r("a",{href:Oe(hr)($e.value.id),class:"btn-ghost inline-flex items-center gap-1.5",title:"Download"},[E(X,{name:"download",size:14}),_[39]||(_[39]=$(" Download ",-1))],8,$0),r("button",{class:"btn-icon",title:"Close",onClick:ye},[E(X,{name:"x",size:16})])])]),r("div",N0,[Ie.value==="image"?(p(),g("img",{key:0,src:Ge.value,alt:$e.value.title,class:"mx-auto block max-w-full"},null,8,D0)):Ie.value==="frame"?(p(),g("iframe",{key:1,src:Ge.value,class:"h-[74vh] w-full border-0 bg-white",title:$e.value.title},null,8,F0)):(p(),g("div",R0,[E(X,{name:"fileText",size:28,class:"text-ink-muted"}),_[41]||(_[41]=r("div",{class:"mt-3 text-sm font-medium text-ink-secondary"},"Preview isn't available for this file type",-1)),r("div",B0,k($e.value.fileName),1),r("a",{href:Oe(hr)($e.value.id),class:"btn-accent mt-4 inline-flex items-center gap-2"},[E(X,{name:"download",size:15}),_[40]||(_[40]=$(" Download instead ",-1))],8,U0)]))])])])):D("",!0)]))]))}},Z0={class:"grid h-full grid-cols-[248px_1fr] max-[900px]:grid-cols-1"},H0={class:"flex flex-col border-r border-line bg-surface-1 px-4 py-5 max-[900px]:hidden"},j0={class:"flex items-center gap-2.5 px-2 pb-5"},W0={class:"flex flex-col gap-0.5"},K0=["onClick"],G0={class:"mt-auto flex flex-col gap-2.5"},q0={class:"rounded-lg bg-surface-2 p-3"},Y0={class:"flex items-center gap-2"},J0={class:"text-xs font-semibold text-ink"},X0={class:"mt-1.5 block font-mono text-[10.5px] text-ink-muted"},Q0={class:"flex items-center gap-2.5 px-2 py-1"},ew={class:"grid h-8 w-8 place-items-center rounded-full bg-[var(--navy-800)] text-xs font-bold text-white"},tw={class:"min-w-0 flex-1"},nw={class:"truncate text-[13px] font-semibold text-ink"},iw={class:"flex items-center gap-1.5 text-[11px] text-ink-muted"},ow=["title"],sw={class:"overflow-y-auto"},aw={class:"sticky top-0 z-10 flex items-center gap-4 border-b border-line px-7 py-3.5",style:{background:"color-mix(in srgb, var(--bg-app) 82%, transparent)","backdrop-filter":"blur(10px)"}},rw={class:"mt-0.5 text-[22px] font-bold tracking-tightest text-ink"},lw={class:"ml-auto flex items-center gap-3"},uw={class:"flex h-10 w-60 items-center gap-2 rounded border border-line-strong bg-surface-1 px-3 max-[1100px]:hidden"},cw={key:0,class:"mx-auto flex max-w-[1240px] flex-col gap-5 p-7"},dw={class:"grid grid-cols-4 gap-4 max-[1100px]:grid-cols-2 max-[560px]:grid-cols-1"},fw={class:"flex items-center justify-between"},hw={class:"eyebrow"},pw={class:"mt-2.5 text-[34px] font-bold leading-none tracking-tightest text-ink"},mw={class:"grid grid-cols-[1.6fr_1fr] gap-5 max-[1100px]:grid-cols-1"},gw={class:"panel p-5"},vw={class:"mb-3.5 flex items-center justify-between"},_w={class:"flex items-center gap-2"},bw={class:"relative z-[1200]"},yw={class:"panel absolute right-0 z-[1200] mt-1.5 w-72 p-3.5 shadow-lg"},xw={class:"flex items-center justify-between gap-3"},ww={class:"mb-1.5 flex items-center justify-between"},kw={class:"font-mono text-[11px] text-ink-muted"},Sw=["value"],Tw={key:0,class:"mt-1.5 text-[11px] text-ink-muted"},Pw={key:0,class:"mt-2.5 text-xs text-ink-muted"},Cw={key:1,class:"mt-2.5 text-xs text-ink-muted"},Lw={key:2,class:"mt-2.5 text-xs text-ink-muted"},Mw={class:"panel p-5"},Aw={class:"mb-3.5 flex items-center justify-between"},Ew={class:"grid place-items-center py-10 text-center"},Ow={class:"panel overflow-hidden p-0"},zw={class:"flex items-center justify-between px-5 py-4"},Iw={class:"flex gap-2"},$w={key:0,class:"px-5 py-12 text-center text-sm text-ink-muted"},Nw={key:1,class:"overflow-x-auto"},Dw={class:"w-full border-collapse text-sm"},Fw={class:"text-left"},Rw=["onClick"],Bw={class:"px-5 py-3 font-mono font-bold text-ink"},Uw={class:"px-5 py-3 text-ink-secondary"},Vw={class:"px-5 py-3"},Zw={class:"px-5 py-3 font-mono text-ink-secondary"},Hw={class:"px-5 py-3"},jw={key:0,class:"flex items-center gap-2"},Ww={class:"h-1.5 w-12 overflow-hidden rounded bg-surface-2"},Kw={class:"font-mono text-xs text-ink-secondary"},Gw={key:1,class:"font-mono text-xs text-ink-muted"},qw={class:"px-5 py-3 font-mono text-ink-secondary"},Yw={class:"px-5 py-3 text-right"},Jw=["onClick"],Xw={key:1,class:"p-7"},Qw={class:"mb-4 flex flex-wrap items-center gap-3"},e2={class:"font-mono text-mode font-bold text-ink"},t2={key:0,class:"rounded-full bg-danger-soft px-2.5 py-0.5 font-mono text-[10px] font-bold uppercase tracking-caps text-danger-fg"},n2={key:1,class:"ml-auto flex flex-wrap gap-1.5"},i2=["onClick"],o2={key:0,class:"panel grid place-items-center p-16 text-center"},s2={class:"pill"},a2={class:"pill"},r2={class:"pill"},l2={class:"mt-1 text-sm font-semibold text-ink"},u2={class:"pill"},c2={class:"mt-1 font-mono text-sm font-bold tabular text-ink"},d2={class:"grid grid-cols-2 gap-4 max-[820px]:grid-cols-1"},f2={class:"panel p-4"},h2={class:"flex items-center gap-4"},p2={class:"h-9 flex-1 overflow-hidden rounded border border-line bg-surface-2"},m2={class:"readout"},g2={class:"panel p-4"},v2={class:"readout"},_2={class:"panel p-4"},b2={class:"space-y-1.5 text-sm"},y2={class:"flex justify-between"},x2={class:"text-ink"},w2={class:"flex justify-between"},k2={class:"text-ink"},S2={class:"flex justify-between"},T2={class:"font-mono tabular text-ink"},P2={class:"flex justify-between"},C2={class:"font-mono tabular text-ink"},L2={class:"panel p-4"},M2={class:"space-y-1.5 text-sm"},A2={class:"flex justify-between"},E2={class:"font-mono tabular text-ink"},O2={class:"flex justify-between"},z2={class:"font-mono tabular text-ink"},I2={class:"flex justify-between"},$2={class:"font-mono tabular text-ink"},N2={class:"panel col-span-2 p-4 max-[820px]:col-span-1"},D2={class:"panel p-4"},F2={class:"flex flex-wrap gap-2"},R2={class:"mt-2 min-h-[16px] text-xs text-ink-muted"},B2={class:"panel p-4"},U2={class:"h-[180px] overflow-y-auto font-mono text-xs"},V2={class:"text-ink-muted"},Z2={class:"font-semibold text-accent"},H2={class:"break-all text-ink"},j2={key:5,class:"p-7"},W2={class:"panel grid place-items-center p-16 text-center"},K2={class:"mt-3 text-sm font-medium text-ink-secondary"},G2={key:0,class:"mt-1 text-xs text-ink-muted"},q2={key:1,class:"mt-1 text-xs text-ink-muted"},Y2="34,-25,72,45",J2={__name:"Dashboard",props:{email:{type:String,default:""},role:{type:String,default:"user"},organization:{type:String,default:""},organizationName:{type:String,default:""}},emits:["logout"],setup(t,{emit:i}){const s=t,l=i,u=kt({}),d=kt({}),h=W(null),v=W(!1),b=kt([]),C=W(""),T=W([]),M=kt({unavailable:!1,detail:"",loaded:!1,plan:"",recommendedInterval:30}),R=we(()=>T.value.filter(U=>!U.onGround).length),B=W(!1);let Z=null;const F=[{value:"auto",label:"Auto"},{value:15,label:"15s"},{value:30,label:"30s"},{value:60,label:"60s"},{value:120,label:"120s"}],he=we(()=>{if(ve.airTrafficInterval==="auto")return M.recommendedInterval||30;const U=Number(ve.airTrafficInterval);return Number.isFinite(U)&&U>0?U:30}),pe=W(null);let q=!1;function Te(){if(!(q||pe.value!==null)){if(typeof navigator>"u"||!navigator.geolocation){pe.value=!1;return}q=!0,navigator.geolocation.getCurrentPosition(U=>{pe.value={lat:U.coords.latitude,lng:U.coords.longitude},q=!1},()=>{pe.value=!1,q=!1},{timeout:8e3,maximumAge:6e5})}}function fe(U,O,xe){const Je=U&&U.telemetry||{},pt=Je[O],Ve=Je[xe];return typeof pt=="number"&&typeof Ve=="number"&&(pt||Ve)?{lat:pt,lng:Ve}:null}function Ue(){const U=fe(ee.value,"latitude","longitude")||ot.value.map(Je=>fe(u[Je],"latitude","longitude")).find(Boolean);if(U){const Je=pr(U.lat,U.lng);if(Je)return Je.bbox}const O=fe(ee.value,"phoneLatitude","phoneLongitude")||ot.value.map(Je=>fe(u[Je],"phoneLatitude","phoneLongitude")).find(Boolean);if(O){const Je=pr(O.lat,O.lng);if(Je)return Je.bbox}if(Te(),pe.value){const Je=pr(pe.value.lat,pe.value.lng);if(Je)return Je.bbox}const xe=mm(ve.region);return xe||Y2}async function $e(){if(!ve.showAirTraffic)return;const U=ve.autoBbox?Ue():void 0,{states:O,unavailable:xe,detail:Je,plan:pt,recommendedInterval:Ve}=await hp(U);T.value=O,M.unavailable=xe,M.detail=Je,M.plan=pt||"",Ve&&(M.recommendedInterval=Ve),M.loaded=!0}function Ie(){Z&&clearInterval(Z),Z=setInterval(()=>{ye.value==="Overview"&&ve.showAirTraffic&&$e()},he.value*1e3)}function Ge(){$e(),Ie()}function _e(){Z&&clearInterval(Z),Z=null}const ye=W("Overview"),ze=[["grid","Overview"],["radio","Live flights"],["route","Routes"],["calendar","Schedule"],["book","Logbook"],["fileText","Documents"],["server","Drives"],["settings","Settings"]],ne=we(()=>(ze.find(([,U])=>U===ye.value)||["grid"])[0]),je=W(""),ie=W(""),We=W("");let le=null,ce=null,se=!1;const ot=we(()=>Object.keys(u).sort((U,O)=>(u[O].online?1:0)-(u[U].online?1:0)||U.localeCompare(O))),ee=we(()=>h.value?u[h.value]:null),be=we(()=>ee.value&&ee.value.telemetry||{}),Ne=we(()=>!!(ee.value&&ee.value.online)),dt=we(()=>{const U=be.value;return typeof U.latitude=="number"&&typeof U.longitude=="number"&&(U.latitude||U.longitude)?{lat:U.latitude,lng:U.longitude}:null}),at=we(()=>h.value&&d[h.value]||[]),Ze=we(()=>{const U=be.value;return typeof U.velocityX=="number"&&typeof U.velocityY=="number"?Math.hypot(U.velocityX,U.velocityY):null});function Y(U){return U.online?U.connected?["In flight","success"]:["Standby","accent"]:["Offline","neutral"]}function A(U){const O=U&&U.telemetry||{};return typeof O.velocityX=="number"&&typeof O.velocityY=="number"?Math.hypot(O.velocityX,O.velocityY):null}const z=we(()=>ot.value.map(U=>{const O=u[U],xe=O.telemetry||{},[Je,pt]=Y(O);return{id:U,mission:O.model||(O.connected?"Drone linked":O.online?"App online":"No signal"),status:Je,tone:pt,alt:typeof xe.altitude=="number"?xe.altitude.toFixed(0)+" m":"—",battery:typeof xe.batteryPercent=="number"?xe.batteryPercent:null,speed:A(O)}})),gt=we(()=>ot.value.filter(U=>u[U].online).length),ut=we(()=>ot.value.filter(U=>u[U].online&&u[U].connected).length),wt=we(()=>ot.value.filter(U=>!u[U].online).length),y=we(()=>{const U=ot.value.map(O=>{var xe;return(xe=u[O].telemetry)==null?void 0:xe.batteryPercent}).filter(O=>typeof O=="number");return U.length?Math.round(U.reduce((O,xe)=>O+xe,0)/U.length):null}),_=we(()=>[{label:"Active flights",value:String(ut.value),delta:`${gt.value} online`,tone:"success",icon:"radio"},{label:"Avg battery",value:y.value==null?"—":y.value+"%",delta:y.value==null?"no telemetry":y.value<40?"low — watch":"nominal",tone:y.value!=null&&y.value<40?"danger":"neutral",icon:"battery"},{label:"Fleet size",value:String(ot.value.length),delta:`${ut.value} in flight`,tone:"neutral",icon:"grid"},{label:"Offline",value:String(wt.value),delta:wt.value?"needs attention":"all reachable",tone:wt.value?"warning":"success",icon:"signal"}]),w={success:"bg-success-soft text-success-fg",warning:"bg-amber-soft text-amber-fg",danger:"bg-danger-soft text-danger-fg",accent:"bg-accent-soft text-accent-soft-fg",neutral:"bg-surface-2 text-ink-secondary"},K={success:"text-success-fg",danger:"text-danger-fg",warning:"text-amber-fg",neutral:"text-ink-muted",accent:"text-accent-soft-fg"},H=we(()=>{var xe,Je,pt;const O=(s.email||"PV").split("@")[0].split(/[.\-_ ]+/).filter(Boolean);return((((xe=O[0])==null?void 0:xe[0])||"P")+(((Je=O[1])==null?void 0:Je[0])||((pt=O[0])==null?void 0:pt[1])||"V")).toUpperCase()}),V={superadmin:"Superadmin",admin:"Admin",user:"Operator"},ae=we(()=>V[s.role]||"Operator"),te=we(()=>s.organizationName||(s.role==="superadmin"?"All organizations":"No organization"));function Q(U){var xe;u[U.deviceId]=U;const O=U.telemetry||{};typeof O.latitude=="number"&&typeof O.longitude=="number"&&(O.latitude||O.longitude)&&(d[U.deviceId]||(d[U.deviceId]=[]),d[U.deviceId].push([O.latitude,O.longitude]),d[U.deviceId].length>1e3&&d[U.deviceId].shift()),(!h.value||U.online&&!((xe=u[h.value])!=null&&xe.online))&&(h.value=U.deviceId)}function G(U){delete u[U],delete d[U],h.value===U&&(h.value=ot.value[0]||null)}function me(U){b.unshift({t:du(Date.now()),tag:U.type||"?",text:JSON.stringify(oe(U))}),b.length>200&&b.pop()}function oe(U){const O={...U};return delete O.type,O}function ke(){const U=location.protocol==="https:"?"wss":"ws";le=new WebSocket(`${U}://${location.host}/bff/ws`),le.onopen=()=>v.value=!0,le.onclose=()=>{v.value=!1,se||(ce=setTimeout(ke,1500))},le.onerror=()=>le&&le.close(),le.onmessage=O=>{let xe;try{xe=JSON.parse(O.data)}catch{return}xe.type==="snapshot"?(xe.devices||[]).forEach(Q):xe.type==="update"&&xe.device?(Q(xe.device),xe.event&&xe.device.deviceId===h.value&&me(xe.event)):xe.type==="removed"&&xe.deviceId&&G(xe.deviceId)}}async function Ce(){if(!h.value)return We.value="No device selected.";if(!je.value.trim())return We.value="Enter a command name.";let U;if(ie.value.trim())try{U=JSON.parse(ie.value)}catch{return We.value="Payload is not valid JSON."}const{ok:O,body:xe}=await zp(h.value,je.value.trim(),U);We.value=O?`Sent "${je.value.trim()}".`:`Error: ${xe.error||"failed"}`}function He(U,O,xe=""){return typeof U=="number"?U.toFixed(O)+xe:"—"}function et(U){h.value=U,ye.value="Live flights"}return It(ye,U=>{U==="Overview"&&$e()}),It(()=>ve.showAirTraffic,U=>{U?$e():T.value=[]}),It(he,Ie),hi(async()=>{(await ep()).forEach(Q),ke(),Ge()}),Ho(()=>{se=!0,ce&&clearTimeout(ce),le&&le.close(),_e()}),(U,O)=>{var xe,Je,pt,Ve,Vt;return p(),g("div",Z0,[r("aside",H0,[r("div",j0,[E(Hc,{size:26}),O[11]||(O[11]=r("span",{class:"text-[19px] tracking-tightest"},[r("span",{class:"font-medium text-ink-secondary"},"Pilot"),r("span",{class:"font-bold text-ink"},"Vault")],-1))]),r("nav",W0,[(p(),g(ue,null,Be(ze,([de,Fe])=>r("button",{key:Fe,class:Ee(["flex items-center gap-3 rounded px-3 py-2.5 text-left text-sm transition",ye.value===Fe?"bg-accent-soft font-semibold text-accent-soft-fg":"font-medium text-ink-secondary hover:bg-surface-2"]),onClick:Nt=>ye.value=Fe},[E(X,{name:de,size:18,stroke:ye.value===Fe?2.2:1.8},null,8,["name","stroke"]),$(" "+k(Fe),1)],10,K0)),64))]),r("div",G0,[r("div",q0,[r("div",Y0,[r("span",{class:Ee(["h-2 w-2 rounded-full",v.value?"bg-ready":"bg-caution"])},null,2),r("span",J0,k(v.value?"Link healthy":"Reconnecting…"),1)]),r("span",X0,"API gateway · "+k(v.value?"streaming":"retrying"),1)]),r("div",Q0,[r("div",ew,k(H.value),1),r("div",tw,[r("div",nw,k(t.email||"Operator"),1),r("div",iw,[E(X,{name:"grid",size:11,class:"shrink-0"}),r("span",{class:"truncate",title:`${ae.value} · ${te.value}`},k(ae.value)+" · "+k(te.value),9,ow)])]),r("button",{class:"text-ink-muted transition hover:text-ink",title:"Log out","aria-label":"Log out",onClick:O[0]||(O[0]=de=>l("logout"))},[E(X,{name:"logout",size:16})])])])]),r("main",sw,[r("header",aw,[r("div",null,[O[12]||(O[12]=r("div",{class:"eyebrow"},"Live operations",-1)),r("h1",rw,k(ye.value),1)]),r("div",lw,[r("div",uw,[E(X,{name:"search",size:16,class:"text-ink-muted"}),re(r("input",{"onUpdate:modelValue":O[1]||(O[1]=de=>C.value=de),placeholder:"Search drones, routes…",class:"w-full border-none bg-transparent text-sm text-ink outline-none placeholder:text-ink-muted"},null,512),[[Se,C.value]])]),r("button",{class:"btn-accent flex items-center gap-2",onClick:O[2]||(O[2]=de=>ye.value="Live flights")},[E(X,{name:"radio",size:16}),O[13]||(O[13]=$(" Live flights ",-1))])])]),ye.value==="Overview"?(p(),g("div",cw,[r("div",dw,[(p(!0),g(ue,null,Be(_.value,de=>(p(),g("div",{key:de.label,class:"panel p-5"},[r("div",fw,[r("span",hw,k(de.label),1),E(X,{name:de.icon,size:16,class:"text-ink-muted"},null,8,["name"])]),r("div",pw,k(de.value),1),r("span",{class:Ee(["mt-2 block font-mono text-[11px]",K[de.tone]])},k(de.delta),3)]))),128))]),r("div",mw,[r("div",gw,[r("div",vw,[O[18]||(O[18]=r("div",null,[r("div",{class:"eyebrow"},"Airspace"),r("div",{class:"mt-0.5 text-base font-semibold text-ink"},"Live map")],-1)),r("div",_w,[Oe(ve).showAirTraffic&&R.value?(p(),g("span",{key:0,class:Ee(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",w.accent]),title:"Live aircraft from OpenSky Network"},[E(X,{name:"radio",size:12}),$(k(R.value)+" aircraft ",1)],2)):D("",!0),ut.value?(p(),g("span",{key:1,class:Ee(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",w.success])},[O[14]||(O[14]=r("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),$(k(ut.value)+" drones ",1)],2)):D("",!0),r("div",bw,[r("button",{type:"button",class:Ee(["grid h-7 w-7 place-items-center rounded-md text-ink-muted transition hover:bg-surface-2 hover:text-ink",B.value?"bg-surface-2 text-ink":""]),title:"Map settings","aria-label":"Map settings",onClick:O[3]||(O[3]=de=>B.value=!B.value)},[E(X,{name:"settings",size:16})],2),B.value?(p(),g(ue,{key:0},[r("div",{class:"fixed inset-0 z-[1190]",onClick:O[4]||(O[4]=de=>B.value=!1)}),r("div",yw,[O[17]||(O[17]=r("div",{class:"eyebrow mb-2.5"},"Map settings",-1)),r("label",xw,[O[15]||(O[15]=r("span",{class:"text-sm text-ink-secondary"},"Show live air traffic",-1)),E(un,{modelValue:Oe(ve).showAirTraffic,"onUpdate:modelValue":O[5]||(O[5]=de=>Oe(ve).showAirTraffic=de)},null,8,["modelValue"])]),r("div",{class:Ee(["mt-3.5",Oe(ve).showAirTraffic?"":"pointer-events-none opacity-40"])},[r("div",ww,[O[16]||(O[16]=r("span",{class:"text-sm text-ink-secondary"},"Refresh interval",-1)),r("span",kw,"every "+k(he.value)+"s",1)]),re(r("select",{"onUpdate:modelValue":O[6]||(O[6]=de=>Oe(ve).airTrafficInterval=de),class:"field"},[(p(),g(ue,null,Be(F,de=>r("option",{key:de.value,value:de.value},k(de.label)+k(de.value==="auto"?` (plan: ${M.recommendedInterval}s)`:""),9,Sw)),64))],512),[[Mt,Oe(ve).airTrafficInterval]]),M.plan?(p(),g("p",Tw," OpenSky plan: "+k(M.plan),1)):D("",!0)],2)])],64)):D("",!0)])])]),E(mu,{position:dt.value,trail:at.value,aircraft:Oe(ve).showAirTraffic?T.value:[]},null,8,["position","trail","aircraft"]),Oe(ve).showAirTraffic?M.loaded&&M.unavailable?(p(),g("p",Cw,k(M.detail||"Live air traffic is unavailable."),1)):(p(),g("p",Lw," Live air traffic from OpenSky Network · updates every "+k(he.value)+"s ",1)):(p(),g("p",Pw," Live air traffic hidden · enable it in Map settings "))]),r("div",Mw,[r("div",Aw,[O[19]||(O[19]=r("div",null,[r("div",{class:"eyebrow"},"Today"),r("div",{class:"mt-0.5 text-base font-semibold text-ink"},"Schedule")],-1)),E(X,{name:"clock",size:16,class:"text-ink-muted"})]),r("div",Ew,[E(X,{name:"calendar",size:24,class:"text-ink-muted"}),O[20]||(O[20]=r("div",{class:"mt-2 text-sm font-medium text-ink-secondary"},"No missions scheduled",-1)),O[21]||(O[21]=r("div",{class:"mt-0.5 text-xs text-ink-muted"},"Scheduling is not wired to a backend yet.",-1))])])]),r("div",Ow,[r("div",zw,[O[24]||(O[24]=r("div",null,[r("div",{class:"eyebrow"},"Fleet"),r("div",{class:"mt-0.5 text-base font-semibold text-ink"},"Aircraft status")],-1)),r("div",Iw,[r("span",{class:Ee(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",w.success])},[O[22]||(O[22]=r("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),$(k(ut.value)+" in flight ",1)],2),wt.value?(p(),g("span",{key:0,class:Ee(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",w.warning])},[O[23]||(O[23]=r("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),$(k(wt.value)+" offline ",1)],2)):D("",!0)])]),z.value.length?(p(),g("div",Nw,[r("table",Dw,[r("thead",null,[r("tr",Fw,[(p(),g(ue,null,Be(["Aircraft","Mission","Status","Alt","Battery","Speed",""],de=>r("th",{key:de,class:"border-y border-line bg-surface-2 px-5 py-2.5 font-mono text-[10.5px] font-normal uppercase tracking-caps text-ink-muted"},k(de),1)),64))])]),r("tbody",null,[(p(!0),g(ue,null,Be(z.value,(de,Fe)=>(p(),g("tr",{key:de.id,class:Ee(["cursor-pointer transition hover:bg-surface-2",Fe<z.value.length-1?"border-b border-line":""]),onClick:Nt=>et(de.id)},[r("td",Bw,k(de.id),1),r("td",Uw,k(de.mission),1),r("td",Vw,[r("span",{class:Ee(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",w[de.tone]])},[O[25]||(O[25]=r("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),$(k(de.status),1)],2)]),r("td",Zw,k(de.alt),1),r("td",Hw,[de.battery!=null?(p(),g("div",jw,[r("div",Ww,[r("div",{class:Ee(["h-full",de.battery<40?"bg-caution":"bg-ready"]),style:Bo({width:de.battery+"%"})},null,6)]),r("span",Kw,k(de.battery)+"%",1)])):(p(),g("span",Gw,"—"))]),r("td",qw,[$(k(de.speed==null?"—":de.speed.toFixed(1))+" ",1),O[26]||(O[26]=r("span",{class:"text-ink-muted"},"m/s",-1))]),r("td",Yw,[r("button",{class:"btn-ghost inline-flex items-center gap-1.5 whitespace-nowrap",onClick:Kr(Nt=>et(de.id),["stop"])},[E(X,{name:"play",size:14}),O[27]||(O[27]=$(" Track ",-1))],8,Jw)])],10,Rw))),128))])])])):(p(),g("div",$w," No aircraft connected yet. Devices appear here as they come online. "))])])):ye.value==="Live flights"?(p(),g("div",Xw,[r("div",Qw,[r("span",e2,k(h.value||"No device selected"),1),ee.value&&!Ne.value?(p(),g("span",t2,"Offline")):D("",!0),ot.value.length?(p(),g("div",n2,[(p(!0),g(ue,null,Be(ot.value,de=>(p(),g("button",{key:de,class:Ee(["flex items-center gap-2 rounded border px-3 py-1.5 font-mono text-xs font-bold transition",de===h.value?"border-accent bg-accent-soft text-accent-soft-fg":"border-line bg-surface-1 text-ink-secondary hover:border-line-strong"]),onClick:Fe=>h.value=de},[r("span",{class:Ee(["h-2 w-2 rounded-full",u[de].online?"bg-ready":"bg-ink-muted"])},null,2),$(" "+k(de),1)],10,i2))),128))])):D("",!0)]),ot.value.length?(p(),g(ue,{key:1},[r("div",{class:Ee(["mb-4 grid gap-3",!Ne.value&&ee.value?"opacity-60":""]),style:{"grid-template-columns":"repeat(auto-fit, minmax(150px, 1fr))"}},[r("div",s2,[O[30]||(O[30]=r("div",{class:"eyebrow"},"Registration",-1)),r("div",{class:Ee(["mt-1 text-sm font-semibold",Ne.value?((xe=ee.value)==null?void 0:xe.registration)==="success"?"text-success-fg":"text-danger-fg":"text-ink"])},k(Ne.value&&((Je=ee.value)!=null&&Je.registration)?ee.value.registration:"—"),3)]),r("div",a2,[O[31]||(O[31]=r("div",{class:"eyebrow"},"Drone link",-1)),r("div",{class:Ee(["mt-1 text-sm font-semibold",Ne.value?(pt=ee.value)!=null&&pt.connected?"text-success-fg":"text-danger-fg":"text-ink"])},k(ee.value?Ne.value?ee.value.connected?"connected":"no drone":"app offline":"—"),3)]),r("div",r2,[O[32]||(O[32]=r("div",{class:"eyebrow"},"Model",-1)),r("div",l2,k(((Ve=ee.value)==null?void 0:Ve.model)||"—"),1)]),r("div",u2,[O[33]||(O[33]=r("div",{class:"eyebrow"},"Last update",-1)),r("div",c2,k((Vt=ee.value)!=null&&Vt.lastSeenMs?Oe(du)(ee.value.lastSeenMs):"—"),1)])],2),r("div",d2,[r("div",f2,[O[35]||(O[35]=r("div",{class:"mb-3 eyebrow"},"Battery",-1)),r("div",h2,[r("div",p2,[r("div",{class:Ee(["h-full transition-all",typeof be.value.batteryPercent=="number"?be.value.batteryPercent<20?"bg-warning":be.value.batteryPercent<40?"bg-caution":"bg-ready":""]),style:Bo({width:(typeof be.value.batteryPercent=="number"?be.value.batteryPercent:0)+"%"})},null,6)]),r("div",m2,[$(k(typeof be.value.batteryPercent=="number"?be.value.batteryPercent:"—"),1),O[34]||(O[34]=r("span",{class:"text-sm text-ink-secondary"},"%",-1))])])]),r("div",g2,[O[37]||(O[37]=r("div",{class:"mb-3 eyebrow"},"Altitude",-1)),r("div",v2,[$(k(He(be.value.altitude,1)),1),O[36]||(O[36]=r("span",{class:"text-sm text-ink-secondary"}," m",-1))])]),r("div",_2,[O[42]||(O[42]=r("div",{class:"mb-3 eyebrow"},"Flight",-1)),r("div",b2,[r("div",y2,[O[38]||(O[38]=r("span",{class:"text-ink-secondary"},"Mode",-1)),r("b",x2,k(be.value.flightMode||"—"),1)]),r("div",w2,[O[39]||(O[39]=r("span",{class:"text-ink-secondary"},"Flying",-1)),r("b",k2,k(be.value.isFlying==null?"—":be.value.isFlying?"yes":"no"),1)]),r("div",S2,[O[40]||(O[40]=r("span",{class:"text-ink-secondary"},"GPS sats",-1)),r("b",T2,k(be.value.satelliteCount==null?"—":be.value.satelliteCount),1)]),r("div",P2,[O[41]||(O[41]=r("span",{class:"text-ink-secondary"},"Speed (H)",-1)),r("b",C2,k(Ze.value==null?"—":He(Ze.value,2," m/s")),1)])])]),r("div",L2,[O[46]||(O[46]=r("div",{class:"mb-3 eyebrow"},"Position",-1)),r("div",M2,[r("div",A2,[O[43]||(O[43]=r("span",{class:"text-ink-secondary"},"Latitude",-1)),r("b",E2,k(He(be.value.latitude,6)),1)]),r("div",O2,[O[44]||(O[44]=r("span",{class:"text-ink-secondary"},"Longitude",-1)),r("b",z2,k(He(be.value.longitude,6)),1)]),r("div",I2,[O[45]||(O[45]=r("span",{class:"text-ink-secondary"},"Vert. speed",-1)),r("b",$2,k(He(typeof be.value.velocityZ=="number"?-be.value.velocityZ:void 0,2," m/s")),1)])])]),r("div",N2,[O[47]||(O[47]=r("div",{class:"mb-3 eyebrow"},"Track",-1)),E(mu,{position:dt.value,trail:at.value},null,8,["position","trail"])]),r("div",D2,[O[48]||(O[48]=r("div",{class:"mb-3 eyebrow"},"Send command",-1)),r("div",F2,[re(r("input",{"onUpdate:modelValue":O[7]||(O[7]=de=>je.value=de),class:"field flex-1",placeholder:"command (e.g. startConnection)"},null,512),[[Se,je.value]]),re(r("input",{"onUpdate:modelValue":O[8]||(O[8]=de=>ie.value=de),class:"field flex-1",placeholder:"payload JSON (optional)"},null,512),[[Se,ie.value]]),r("button",{class:"btn-accent",onClick:Ce},"Send")]),r("div",R2,k(We.value),1)]),r("div",B2,[O[49]||(O[49]=r("div",{class:"mb-3 eyebrow"},"Event log",-1)),r("div",U2,[(p(!0),g(ue,null,Be(b,(de,Fe)=>(p(),g("div",{key:Fe,class:"border-b border-line py-1"},[r("span",V2,k(de.t),1),r("span",Z2,k(de.tag),1),r("span",H2,k(de.text),1)]))),128))])])])],64)):(p(),g("div",o2,[E(X,{name:"radio",size:28,class:"text-ink-muted"}),O[28]||(O[28]=r("div",{class:"mt-3 text-sm font-medium text-ink-secondary"},"No aircraft online",-1)),O[29]||(O[29]=r("div",{class:"mt-1 text-xs text-ink-muted"},"Live telemetry appears here once a drone connects.",-1))]))])):ye.value==="Logbook"?(p(),lt(ix,{key:2,email:t.email,role:t.role,organization:t.organization,"organization-name":t.organizationName},null,8,["email","role","organization","organization-name"])):ye.value==="Documents"?(p(),lt(V0,{key:3,email:t.email,role:t.role,organization:t.organization,"organization-name":t.organizationName},null,8,["email","role","organization","organization-name"])):ye.value==="Settings"?(p(),lt(ab,{key:4,email:t.email,role:t.role,organization:t.organization,"organization-name":t.organizationName,onLogout:O[9]||(O[9]=de=>l("logout"))},null,8,["email","role","organization","organization-name"])):(p(),g("div",j2,[r("div",W2,[E(X,{name:ne.value,size:28,class:"text-ink-muted"},null,8,["name"]),r("div",K2,k(ye.value),1),ye.value==="Drives"?(p(),g("div",G2,[O[50]||(O[50]=$(" Browse and transfer files here once a drive is connected. Configure drives in ",-1)),r("button",{class:"font-semibold text-accent hover:underline",onClick:O[10]||(O[10]=de=>ye.value="Settings")},"Settings → Integrations"),O[51]||(O[51]=$(". ",-1))])):(p(),g("div",q2,"This section is part of the console shell and has no backend yet."))])]))])])}}},X2={key:0,class:"h-full"},Q2={key:1,class:"grid h-full place-items-center text-ink-muted text-sm"},ek={__name:"App",setup(t){const i=W(!1),s=W(null),l=W("user"),u=W(""),d=W(""),h=W("");function v(T){l.value=T&&T.role||"user",u.value=T&&T.organization||"",d.value=T&&T.organizationName||""}hi(async()=>{h.value=(await Jh()).apiBase||"";const T=await ru();T&&(s.value=T.email,v(T),await hu()),i.value=!0});async function b(T){s.value=T,v(await ru()),await hu()}async function C(){Fp(),await Qh(),s.value=null,l.value="user",u.value="",d.value=""}return(T,M)=>i.value?(p(),g("div",X2,[s.value?(p(),lt(J2,{key:0,email:s.value,role:l.value,organization:u.value,"organization-name":d.value,onLogout:C},null,8,["email","role","organization","organization-name"])):(p(),lt(tm,{key:1,"default-api-base":h.value,onSignedIn:b},null,8,["default-api-base"]))])):(p(),g("div",Q2,"Loading…"))}};Kh(ek).mount("#app");
|