<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="./favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>fsv</title>
<script type="module" crossorigin>var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l,u,d,f,p,m,h,g,_,v,y,b,x,S,C={},w=[],T=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,E=Array.isArray;function D(e,t){for(var n in t)e[n]=t[n];return e}function O(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function k(e,t,n){var r,i,a,o={};for(a in t)a==`key`?r=t[a]:a==`ref`?i=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?l.call(arguments,2):n),typeof e==`function`&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return A(e,o,r,i,null)}function A(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++d,__i:-1,__u:0};return i==null&&u.vnode!=null&&u.vnode(a),a}function j(e){return e.children}function M(e,t){this.props=e,this.context=t}function N(e,t){if(t==null)return e.__?N(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type==`function`?N(e):null}function ee(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,r=[],i=[],a=D({},t);a.__v=t.__v+1,u.vnode&&u.vnode(a),le(e.__P,a,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,r,n??N(t),!!(32&t.__u),i),a.__v=t.__v,a.__.__k[a.__i]=a,ue(r,a,i),t.__e=t.__=null,a.__e!=n&&te(a)}}function te(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),te(e)}function ne(e){(!e.__d&&(e.__d=!0)&&f.push(e)&&!P.__r++||p!=u.debounceRendering)&&((p=u.debounceRendering)||m)(P)}function P(){try{for(var e,t=1;f.length;)f.length>t&&f.sort(h),e=f.shift(),t=f.length,ee(e)}finally{f.length=P.__r=0}}function re(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,g,_,v=r&&r.__k||w,y=t.length;for(c=ie(n,t,v,c,y),d=0;d<y;d++)(p=n.__k[d])!=null&&(f=p.__i!=-1&&v[p.__i]||C,p.__i=d,g=le(e,p,f,i,a,o,s,c,l,u),m=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&L(f.ref,null,p),u.push(p.ref,p.__c||m,p)),h==null&&m!=null&&(h=m),(_=!!(4&p.__u))||f.__k===p.__k?(c=ae(p,c,e,_),_&&f.__e&&(f.__e=null)):typeof p.type==`function`&&g!==void 0?c=g:m&&(c=m.nextSibling),p.__u&=-7);return n.__e=h,c}function ie(e,t,n,r,i){var a,o,s,c,l,u=n.length,d=u,f=0;for(e.__k=Array(i),a=0;a<i;a++)(o=t[a])!=null&&typeof o!=`boolean`&&typeof o!=`function`?(typeof o==`string`||typeof o==`number`||typeof o==`bigint`||o.constructor==String?o=e.__k[a]=A(null,o,null,null,null):E(o)?o=e.__k[a]=A(j,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?o=e.__k[a]=A(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):e.__k[a]=o,c=a+f,o.__=e,o.__b=e.__b+1,s=null,(l=o.__i=oe(o,n,c,d))!=-1&&(d--,(s=n[l])&&(s.__u|=2)),s==null||s.__v==null?(l==-1&&(i>u?f--:i<u&&f++),typeof o.type!=`function`&&(o.__u|=4)):l!=c&&(l==c-1?f--:l==c+1?f++:(l>c?f--:f++,o.__u|=4))):e.__k[a]=null;if(d)for(a=0;a<u;a++)(s=n[a])!=null&&!(2&s.__u)&&(s.__e==r&&(r=N(s)),pe(s,s));return r}function ae(e,t,n,r){var i,a;if(typeof e.type==`function`){for(i=e.__k,a=0;i&&a<i.length;a++)i[a]&&(i[a].__=e,t=ae(i[a],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=N(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t&&=t.nextSibling;while(t!=null&&t.nodeType==8);return t}function oe(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],u=l!=null&&(2&l.__u)==0;if(l===null&&s==null||u&&s==l.key&&c==l.type)return n;if(r>+!!u){for(i=n-1,a=n+1;i>=0||a<t.length;)if((l=t[o=i>=0?i--:a++])!=null&&!(2&l.__u)&&s==l.key&&c==l.type)return o}return-1}function se(e,t,n){t[0]==`-`?e.setProperty(t,n??``):e[t]=n==null?``:typeof n!=`number`||T.test(t)?n:n+`px`}function F(e,t,n,r,i){var a,o;n:if(t==`style`)if(typeof n==`string`)e.style.cssText=n;else{if(typeof r==`string`&&(e.style.cssText=r=``),r)for(t in r)n&&t in n||se(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||se(e.style,t,n[t])}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(y,`$1`)),o=t.toLowerCase(),t=o in e||t==`onFocusOut`||t==`onFocusIn`?o.slice(2):t.slice(2),e.l||={},e.l[t+a]=n,n?r?n[v]=r[v]:(n[v]=b,e.addEventListener(t,a?S:x,a)):e.removeEventListener(t,a?S:x,a);else{if(i==`http://www.w3.org/2000/svg`)t=t.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(t!=`width`&&t!=`height`&&t!=`href`&&t!=`list`&&t!=`form`&&t!=`tabIndex`&&t!=`download`&&t!=`rowSpan`&&t!=`colSpan`&&t!=`role`&&t!=`popover`&&t in e)try{e[t]=n??``;break n}catch{}typeof n==`function`||(n==null||!1===n&&t[4]!=`-`?e.removeAttribute(t):e.setAttribute(t,t==`popover`&&n==1?``:n))}}function ce(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t[_]==null)t[_]=b++;else if(t[_]<n[v])return;return n(u.event?u.event(t):t)}}}function le(e,t,n,r,i,a,o,s,c,l){var d,f,p,m,h,g,_,v,y,b,x,S,C,T,k,A=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),a=[s=t.__e=n.__e]),(d=u.__b)&&d(t);n:if(typeof A==`function`)try{if(v=t.props,y=A.prototype&&A.prototype.render,b=(d=A.contextType)&&r[d.__c],x=d?b?b.props.value:d.__:r,n.__c?_=(f=t.__c=n.__c).__=f.__E:(y?t.__c=f=new A(v,x):(t.__c=f=new M(v,x),f.constructor=A,f.render=me),b&&b.sub(f),f.state||={},f.__n=r,p=f.__d=!0,f.__h=[],f._sb=[]),y&&f.__s==null&&(f.__s=f.state),y&&A.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=D({},f.__s)),D(f.__s,A.getDerivedStateFromProps(v,f.__s))),m=f.props,h=f.state,f.__v=t,p)y&&A.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),y&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(y&&A.getDerivedStateFromProps==null&&v!==m&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(v,x),t.__v==n.__v||!f.__e&&f.shouldComponentUpdate!=null&&!1===f.shouldComponentUpdate(v,f.__s,x)){t.__v!=n.__v&&(f.props=v,f.state=f.__s,f.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),w.push.apply(f.__h,f._sb),f._sb=[],f.__h.length&&o.push(f);break n}f.componentWillUpdate!=null&&f.componentWillUpdate(v,f.__s,x),y&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(m,h,g)})}if(f.context=x,f.props=v,f.__P=e,f.__e=!1,S=u.__r,C=0,y)f.state=f.__s,f.__d=!1,S&&S(t),d=f.render(f.props,f.state,f.context),w.push.apply(f.__h,f._sb),f._sb=[];else do f.__d=!1,S&&S(t),d=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++C<25);f.state=f.__s,f.getChildContext!=null&&(r=D(D({},r),f.getChildContext())),y&&!p&&f.getSnapshotBeforeUpdate!=null&&(g=f.getSnapshotBeforeUpdate(m,h)),T=d!=null&&d.type===j&&d.key==null?de(d.props.children):d,s=re(e,E(T)?T:[T],t,n,r,i,a,o,s,c,l),f.base=t.__e,t.__u&=-161,f.__h.length&&o.push(f),_&&(f.__E=f.__=null)}catch(e){if(t.__v=null,c||a!=null)if(e.then){for(t.__u|=c?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;a[a.indexOf(s)]=null,t.__e=s}else{for(k=a.length;k--;)O(a[k]);I(t)}else t.__e=n.__e,t.__k=n.__k,e.then||I(t);u.__e(e,t,n)}else a==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):s=t.__e=fe(n.__e,t,n,r,i,a,o,c,l);return(d=u.diffed)&&d(t),128&t.__u?void 0:s}function I(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(I))}function ue(e,t,n){for(var r=0;r<n.length;r++)L(n[r],n[++r],n[++r]);u.__c&&u.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){u.__e(e,t.__v)}})}function de(e){return typeof e!=`object`||!e||e.__b>0?e:E(e)?e.map(de):e.constructor===void 0?D({},e):null}function fe(e,t,n,r,i,a,o,s,c){var d,f,p,m,h,g,_,v=n.props||C,y=t.props,b=t.type;if(b==`svg`?i=`http://www.w3.org/2000/svg`:b==`math`?i=`http://www.w3.org/1998/Math/MathML`:i||=`http://www.w3.org/1999/xhtml`,a!=null){for(d=0;d<a.length;d++)if((h=a[d])&&`setAttribute`in h==!!b&&(b?h.localName==b:h.nodeType==3)){e=h,a[d]=null;break}}if(e==null){if(b==null)return document.createTextNode(y);e=document.createElementNS(i,b,y.is&&y),s&&=(u.__m&&u.__m(t,a),!1),a=null}if(b==null)v===y||s&&e.data==y||(e.data=y);else{if(a=b==`textarea`&&y.defaultValue!=null?null:a&&l.call(e.childNodes),!s&&a!=null)for(v={},d=0;d<e.attributes.length;d++)v[(h=e.attributes[d]).name]=h.value;for(d in v)h=v[d],d==`dangerouslySetInnerHTML`?p=h:d==`children`||d in y||d==`value`&&`defaultValue`in y||d==`checked`&&`defaultChecked`in y||F(e,d,null,h,i);for(d in y)h=y[d],d==`children`?m=h:d==`dangerouslySetInnerHTML`?f=h:d==`value`?g=h:d==`checked`?_=h:s&&typeof h!=`function`||v[d]===h||F(e,d,h,v[d],i);if(f)s||p&&(f.__html==p.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(p&&(e.innerHTML=``),re(t.type==`template`?e.content:e,E(m)?m:[m],t,n,r,b==`foreignObject`?`http://www.w3.org/1999/xhtml`:i,a,o,a?a[0]:n.__k&&N(n,0),s,c),a!=null)for(d=a.length;d--;)O(a[d]);s&&b!=`textarea`||(d=`value`,b==`progress`&&g==null?e.removeAttribute(`value`):g!=null&&(g!==e[d]||b==`progress`&&!g||b==`option`&&g!=v[d])&&F(e,d,g,v[d],i),d=`checked`,_!=null&&_!=e[d]&&F(e,d,_,v[d],i))}return e}function L(e,t,n){try{if(typeof e==`function`){var r=typeof e.__u==`function`;r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(e){u.__e(e,n)}}function pe(e,t,n){var r,i;if(u.unmount&&u.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||L(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){u.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&pe(r[i],t,n||typeof e.type!=`function`);n||O(e.__e),e.__c=e.__=e.__e=void 0}function me(e,t,n){return this.constructor(e,n)}function he(e,t,n){var r,i,a,o;t==document&&(t=document.documentElement),u.__&&u.__(e,t),i=(r=typeof n==`function`)?null:n&&n.__k||t.__k,a=[],o=[],le(t,e=(!r&&n||t).__k=k(j,null,[e]),i||C,C,t.namespaceURI,!r&&n?[n]:i?null:t.firstChild?l.call(t.childNodes):null,a,!r&&n?n:i?i.__e:t.firstChild,r,o),ue(a,e,o)}l=w.slice,u={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(t){e=t}throw e}},d=0,M.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=D({},this.state);typeof e==`function`&&(e=e(D({},n),this.props)),e&&D(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),ne(this))},M.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),ne(this))},M.prototype.render=j,f=[],m=typeof Promise==`function`?Promise.prototype.then.bind(Promise.resolve()):setTimeout,h=function(e,t){return e.__v.__b-t.__v.__b},P.__r=0,g=Math.random().toString(8),_=`__d`+g,v=`__a`+g,y=/(PointerCapture)$|Capture$/i,b=0,x=ce(!1),S=ce(!0);var R,z,B,ge,V=0,_e=[],H=u,ve=H.__b,ye=H.__r,be=H.diffed,xe=H.__c,Se=H.unmount,Ce=H.__;function U(e,t){H.__h&&H.__h(z,e,V||t),V=0;var n=z.__H||={__:[],__h:[]};return e>=n.__.length&&n.__.push({}),n.__[e]}function W(e){return V=1,we(je,e)}function we(e,t,n){var r=U(R++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):je(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=z,!z.__f)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter(function(e){return e.__c});if(i.every(function(e){return!e.__N}))return!a||a.call(this,e,t,n);var o=r.__c.props!==e;return i.some(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}}),a&&a.call(this,e,t,n)||o};z.__f=!0;var a=z.shouldComponentUpdate,o=z.componentWillUpdate;z.componentWillUpdate=function(e,t,n){if(this.__e){var r=a;a=void 0,i(e,t,n),a=r}o&&o.call(this,e,t,n)},z.shouldComponentUpdate=i}return r.__N||r.__}function G(e,t){var n=U(R++,3);!H.__s&&Ae(n.__H,t)&&(n.__=e,n.u=t,z.__H.__h.push(n))}function Te(e){return V=5,Ee(function(){return{current:e}},[])}function Ee(e,t){var n=U(R++,7);return Ae(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function De(){for(var e;e=_e.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(K),t.__h.some(q),t.__h=[]}catch(n){t.__h=[],H.__e(n,e.__v)}}}H.__b=function(e){z=null,ve&&ve(e)},H.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Ce&&Ce(e,t)},H.__r=function(e){ye&&ye(e),R=0;var t=(z=e.__c).__H;t&&(B===z?(t.__h=[],z.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.some(K),t.__h.some(q),t.__h=[],R=0)),B=z},H.diffed=function(e){be&&be(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(_e.push(t)!==1&&ge===H.requestAnimationFrame||((ge=H.requestAnimationFrame)||ke)(De)),t.__H.__.some(function(e){e.u&&(e.__H=e.u),e.u=void 0})),B=z=null},H.__c=function(e,t){t.some(function(e){try{e.__h.some(K),e.__h=e.__h.filter(function(e){return!e.__||q(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],H.__e(n,e.__v)}}),xe&&xe(e,t)},H.unmount=function(e){Se&&Se(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(e){try{K(e)}catch(e){t=e}}),n.__H=void 0,t&&H.__e(t,n.__v))};var Oe=typeof requestAnimationFrame==`function`;function ke(e){var t,n=function(){clearTimeout(r),Oe&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Oe&&(t=requestAnimationFrame(n))}function K(e){var t=z,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),z=t}function q(e){var t=z;e.__c=e.__(),z=t}function Ae(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function je(e,t){return typeof t==`function`?t(e):t}function Me(e){return e.endsWith(`/`)?e.slice(0,-1):e}async function Ne(e,t){let n=`${Me(e)}/list?path=${encodeURIComponent(t)}`,r=await fetch(n,{method:`POST`});if(!r.ok){let e=await r.json().catch(()=>({}));throw Error(e.error||`HTTP ${r.status}`)}return r.json()}function J(e,t){return`${Me(e)}/${t}`}function Pe(e){if(navigator.clipboard&&window.isSecureContext)return navigator.clipboard.writeText(e).catch(()=>{}),!0;try{let t=document.createElement(`textarea`);t.value=e,t.style.position=`fixed`,t.style.left=`-9999px`,t.style.top=`-9999px`,document.body.appendChild(t),t.select();let n=document.execCommand(`copy`);return document.body.removeChild(t),n}catch{return!1}}function Fe(e,t){let[n,r]=W([]),[i,a]=W(!0),[o,s]=W(null),c=async(e,t)=>{a(!0),s(null);try{r(await Ne(t,e))}catch(e){s(e.message||`Failed to load files`),r([])}finally{a(!1)}};return G(()=>{c(e,t)},[e,t]),{files:n,loading:i,error:o,refresh:()=>c(e,t)}}function Ie(e){return e===`/`?`${window.location.protocol===`https:`?`wss:`:`ws:`}//${window.location.host}/ws`:e.replace(/^http/,`ws`).replace(/\/$/,``)+`/ws`}function Le(e,t){let[n,r]=W(`disconnected`),i=Te(null);return G(()=>{i.current?.close(),r(`connecting`);let n;try{n=new WebSocket(Ie(e)),i.current=n}catch{r(`disconnected`);return}return n.onopen=()=>r(`connected`),n.onmessage=e=>t(e.data),n.onclose=()=>r(`disconnected`),n.onerror=()=>r(`disconnected`),()=>n.close()},[e]),n}var Re=0;Array.isArray;function Y(e,t,n,r,i,a){t||={};var o,s,c=t;if(`ref`in c)for(s in c={},t)s==`ref`?o=t[s]:c[s]=t[s];var l={type:e,props:c,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Re,__i:-1,__u:0,__source:i,__self:a};if(typeof e==`function`&&(o=e.defaultProps))for(s in o)c[s]===void 0&&(c[s]=o[s]);return u.vnode&&u.vnode(l),l}var X=(e,t=`0 0 24 24`,n=``)=>(({class:n=``,size:r=20})=>Y(`svg`,{class:n,width:r,height:r,viewBox:t,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`,children:e})),ze=X(Y(`path`,{d:`M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z`})),Be=X(Y(j,{children:[Y(`path`,{d:`M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z`}),Y(`polyline`,{points:`14 2 14 8 20 8`})]})),Ve=X(Y(j,{children:[Y(`polyline`,{points:`16 18 22 12 16 6`}),Y(`polyline`,{points:`8 6 2 12 8 18`})]})),He=X(Y(j,{children:[Y(`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,ry:`2`}),Y(`circle`,{cx:`8.5`,cy:`8.5`,r:`1.5`}),Y(`polyline`,{points:`21 15 16 10 5 21`})]})),Ue=X(Y(j,{children:[Y(`polygon`,{points:`23 7 16 12 23 17 23 7`}),Y(`rect`,{x:`1`,y:`5`,width:`15`,height:`14`,rx:`2`,ry:`2`})]})),We=X(Y(j,{children:[Y(`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}),Y(`polyline`,{points:`7 10 12 15 17 10`}),Y(`line`,{x1:`12`,y1:`15`,x2:`12`,y2:`3`})]})),Ge=X(Y(j,{children:[Y(`path`,{d:`M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z`}),Y(`circle`,{cx:`12`,cy:`12`,r:`3`})]})),Ke=X(Y(j,{children:[Y(`rect`,{x:`3`,y:`3`,width:`7`,height:`7`}),Y(`rect`,{x:`14`,y:`3`,width:`7`,height:`7`}),Y(`rect`,{x:`3`,y:`14`,width:`7`,height:`7`}),Y(`rect`,{x:`14`,y:`14`,width:`3`,height:`3`}),Y(`line`,{x1:`14`,y1:`20`,x2:`20`,y2:`20`}),Y(`line`,{x1:`20`,y1:`14`,x2:`20`,y2:`17`})]})),Z=X(Y(j,{children:[Y(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),Y(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})]})),qe=X(Y(j,{children:[Y(`polyline`,{points:`23 4 23 10 17 10`}),Y(`polyline`,{points:`1 20 1 14 7 14`}),Y(`path`,{d:`M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15`})]})),Je=X(Y(j,{children:[Y(`circle`,{cx:`11`,cy:`11`,r:`8`}),Y(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]})),Ye=X(Y(j,{children:[Y(`circle`,{cx:`12`,cy:`12`,r:`3`}),Y(`path`,{d:`M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 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 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.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 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.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 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.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`})]})),Xe=X(Y(j,{children:[Y(`rect`,{x:`9`,y:`9`,width:`13`,height:`13`,rx:`2`,ry:`2`}),Y(`path`,{d:`M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1`})]})),Ze=new Set(`rs.toml.json.md.txt.js.ts.tsx.jsx.css.html.htm.yaml.yml.sh.py.go.c.cpp.h.java.rb.php.xml.svg.lock.gitignore.env`.split(`.`)),Qe=new Set([`png`,`jpg`,`jpeg`,`gif`,`webp`,`ico`,`bmp`,`avif`]),$e=new Set([`mp4`,`webm`,`ogg`,`mov`]),et=new Set([`mp3`,`wav`,`ogg`,`flac`,`aac`,`m4a`]);function tt(e){let t=e.split(`.`).pop()?.toLowerCase()??``;return Ze.has(t)?`text`:Qe.has(t)?`image`:$e.has(t)?`video`:et.has(t)?`audio`:`unsupported`}function nt(e){return tt(e)!==`unsupported`}function rt({file:e,apiBase:t,onClose:n}){let[r,i]=W(null),[a,o]=W(!1),s=J(t,e.path),c=tt(e.name);return G(()=>{c===`text`&&(o(!0),fetch(s).then(e=>e.text()).then(e=>i(e)).catch(e=>i(`Error: ${e.message}`)).finally(()=>o(!1)))},[s]),Y(`div`,{class:`modal-overlay`,onClick:n,children:Y(`div`,{class:`modal-card preview-modal`,onClick:e=>e.stopPropagation(),children:[Y(`div`,{class:`modal-header`,children:[Y(`span`,{class:`modal-title-text`,title:e.name,children:e.name}),Y(`div`,{class:`modal-header-actions`,children:[Y(`a`,{class:`modal-action-btn`,href:s,download:e.name,title:`Download`,children:Y(We,{size:16})}),Y(`button`,{class:`modal-close`,onClick:n,"aria-label":`Close`,children:Y(Z,{size:18})})]})]}),Y(`div`,{class:`modal-body preview-body`,children:[c===`text`&&(a?Y(`div`,{class:`preview-loading`,children:[Y(`div`,{class:`spinner`}),Y(`p`,{children:`Loading…`})]}):Y(`pre`,{class:`code-block`,children:Y(`code`,{children:r})})),c===`image`&&Y(`div`,{class:`preview-media-wrap`,children:Y(`img`,{src:s,alt:e.name,class:`preview-image`})}),c===`video`&&Y(`div`,{class:`preview-media-wrap`,children:Y(`video`,{src:s,controls:!0,class:`preview-video`})}),c===`audio`&&Y(`div`,{class:`preview-media-wrap preview-audio-wrap`,children:Y(`audio`,{src:s,controls:!0,class:`preview-audio`})}),c===`unsupported`&&Y(`div`,{class:`preview-unsupported`,children:[Y(`p`,{children:`Preview not available for this file type.`}),Y(`a`,{class:`btn btn-primary`,href:s,download:e.name,children:`Download instead`})]})]})]})})}var it=new Set([`rs`,`js`,`ts`,`tsx`,`jsx`,`html`,`htm`,`css`,`json`,`toml`,`yaml`,`yml`,`md`,`sh`,`py`,`go`,`c`,`cpp`,`h`,`java`,`rb`,`php`,`xml`,`lock`]),at=new Set([`png`,`jpg`,`jpeg`,`gif`,`svg`,`webp`,`ico`,`bmp`,`avif`]),ot=new Set([`mp4`,`webm`,`ogg`,`mov`]);function st(e){if(e.is_dir)return Y(ze,{class:`file-type-icon folder`,size:22});let t=e.name.split(`.`).pop()?.toLowerCase()??``;return at.has(t)?Y(He,{class:`file-type-icon image`,size:22}):ot.has(t)?Y(Ue,{class:`file-type-icon video`,size:22}):it.has(t)?Y(Ve,{class:`file-type-icon code`,size:22}):Y(Be,{class:`file-type-icon`,size:22})}function ct(e){if(e===0)return`0 B`;let t=1024,n=[`B`,`KB`,`MB`,`GB`,`TB`],r=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/t**+r).toFixed(1))+` `+n[r]}function lt(e){return e?new Date(e*1e3).toLocaleDateString(void 0,{year:`numeric`,month:`short`,day:`numeric`}):``}function ut(e){if(navigator.clipboard&&window.isSecureContext)return navigator.clipboard.writeText(e).catch(()=>{}),!0;try{let t=document.createElement(`textarea`);t.value=e,t.style.position=`fixed`,t.style.left=`-9999px`,t.style.top=`-9999px`,document.body.appendChild(t),t.select();let n=document.execCommand(`copy`);return document.body.removeChild(t),n}catch{return!1}}function dt({file:e,apiBase:t,onNavigate:n,onPreview:r,onQr:i}){let a=J(t,e.path),o=()=>{e.is_dir&&n(e)},s=()=>{let e=a;a.startsWith(`/`)&&(e=`${window.location.origin}${a}`),ut(e)},c=e.is_dir?`Folder`:[ct(e.size),lt(e.modified)].filter(Boolean).join(` · `);return Y(`div`,{class:`file-card ${e.is_dir?`dir-card`:``}`,onClick:o,role:e.is_dir?`button`:void 0,tabIndex:e.is_dir?0:void 0,onKeyDown:e=>e.key===`Enter`&&o(),children:[Y(`div`,{class:`file-icon-wrap`,children:st(e)}),Y(`div`,{class:`file-info`,children:[Y(`span`,{class:`file-name`,title:e.name,children:e.name}),Y(`span`,{class:`file-meta`,children:c})]}),!e.is_dir&&Y(`div`,{class:`file-actions`,onClick:e=>e.stopPropagation(),children:[nt(e.name)&&Y(`button`,{class:`action-btn`,title:`Preview`,onClick:()=>r(e),children:Y(Ge,{size:16})}),Y(`a`,{class:`action-btn`,href:a,download:e.name,title:`Download`,onClick:e=>e.stopPropagation(),children:Y(We,{size:16})}),Y(`button`,{class:`action-btn`,title:`Copy link`,onClick:s,children:Y(Xe,{size:16})}),Y(`button`,{class:`action-btn`,title:`QR code link`,onClick:()=>i(e),children:Y(Ke,{size:16})})]})]})}var ft=o(((e,t)=>{t.exports=function(){return typeof Promise==`function`&&Promise.prototype&&Promise.prototype.then}})),Q=o((e=>{var t,n=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];e.getSymbolSize=function(e){if(!e)throw Error(`"version" cannot be null or undefined`);if(e<1||e>40)throw Error(`"version" should be in range from 1 to 40`);return e*4+17},e.getSymbolTotalCodewords=function(e){return n[e]},e.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t},e.setToSJISFunction=function(e){if(typeof e!=`function`)throw Error(`"toSJISFunc" is not a valid function.`);t=e},e.isKanjiModeEnabled=function(){return t!==void 0},e.toSJIS=function(e){return t(e)}})),pt=o((e=>{e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(t){if(typeof t!=`string`)throw Error(`Param is not a string`);switch(t.toLowerCase()){case`l`:case`low`:return e.L;case`m`:case`medium`:return e.M;case`q`:case`quartile`:return e.Q;case`h`:case`high`:return e.H;default:throw Error(`Unknown EC Level: `+t)}}e.isValid=function(e){return e&&e.bit!==void 0&&e.bit>=0&&e.bit<4},e.from=function(n,r){if(e.isValid(n))return n;try{return t(n)}catch{return r}}})),mt=o(((e,t)=>{function n(){this.buffer=[],this.length=0}n.prototype={get:function(e){let t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1},put:function(e,t){for(let n=0;n<t;n++)this.putBit((e>>>t-n-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){let t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},t.exports=n})),ht=o(((e,t)=>{function n(e){if(!e||e<1)throw Error(`BitMatrix size must be defined and greater than 0`);this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}n.prototype.set=function(e,t,n,r){let i=e*this.size+t;this.data[i]=n,r&&(this.reservedBit[i]=!0)},n.prototype.get=function(e,t){return this.data[e*this.size+t]},n.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},n.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},t.exports=n})),gt=o((e=>{var t=Q().getSymbolSize;e.getRowColCoords=function(e){if(e===1)return[];let n=Math.floor(e/7)+2,r=t(e),i=r===145?26:Math.ceil((r-13)/(2*n-2))*2,a=[r-7];for(let e=1;e<n-1;e++)a[e]=a[e-1]-i;return a.push(6),a.reverse()},e.getPositions=function(t){let n=[],r=e.getRowColCoords(t),i=r.length;for(let e=0;e<i;e++)for(let t=0;t<i;t++)e===0&&t===0||e===0&&t===i-1||e===i-1&&t===0||n.push([r[e],r[t]]);return n}})),_t=o((e=>{var t=Q().getSymbolSize,n=7;e.getPositions=function(e){let r=t(e);return[[0,0],[r-n,0],[0,r-n]]}})),vt=o((e=>{e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(e){return e!=null&&e!==``&&!isNaN(e)&&e>=0&&e<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(e){let n=e.size,r=0,i=0,a=0,o=null,s=null;for(let c=0;c<n;c++){i=a=0,o=s=null;for(let l=0;l<n;l++){let n=e.get(c,l);n===o?i++:(i>=5&&(r+=t.N1+(i-5)),o=n,i=1),n=e.get(l,c),n===s?a++:(a>=5&&(r+=t.N1+(a-5)),s=n,a=1)}i>=5&&(r+=t.N1+(i-5)),a>=5&&(r+=t.N1+(a-5))}return r},e.getPenaltyN2=function(e){let n=e.size,r=0;for(let t=0;t<n-1;t++)for(let i=0;i<n-1;i++){let n=e.get(t,i)+e.get(t,i+1)+e.get(t+1,i)+e.get(t+1,i+1);(n===4||n===0)&&r++}return r*t.N2},e.getPenaltyN3=function(e){let n=e.size,r=0,i=0,a=0;for(let t=0;t<n;t++){i=a=0;for(let o=0;o<n;o++)i=i<<1&2047|e.get(t,o),o>=10&&(i===1488||i===93)&&r++,a=a<<1&2047|e.get(o,t),o>=10&&(a===1488||a===93)&&r++}return r*t.N3},e.getPenaltyN4=function(e){let n=0,r=e.data.length;for(let t=0;t<r;t++)n+=e.data[t];return Math.abs(Math.ceil(n*100/r/5)-10)*t.N4};function n(t,n,r){switch(t){case e.Patterns.PATTERN000:return(n+r)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return r%3==0;case e.Patterns.PATTERN011:return(n+r)%3==0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case e.Patterns.PATTERN101:return n*r%2+n*r%3==0;case e.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case e.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw Error(`bad maskPattern:`+t)}}e.applyMask=function(e,t){let r=t.size;for(let i=0;i<r;i++)for(let a=0;a<r;a++)t.isReserved(a,i)||t.xor(a,i,n(e,a,i))},e.getBestMask=function(t,n){let r=Object.keys(e.Patterns).length,i=0,a=1/0;for(let o=0;o<r;o++){n(o),e.applyMask(o,t);let r=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(o,t),r<a&&(a=r,i=o)}return i}})),yt=o((e=>{var t=pt(),n=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],r=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];e.getBlocksCount=function(e,r){switch(r){case t.L:return n[(e-1)*4+0];case t.M:return n[(e-1)*4+1];case t.Q:return n[(e-1)*4+2];case t.H:return n[(e-1)*4+3];default:return}},e.getTotalCodewordsCount=function(e,n){switch(n){case t.L:return r[(e-1)*4+0];case t.M:return r[(e-1)*4+1];case t.Q:return r[(e-1)*4+2];case t.H:return r[(e-1)*4+3];default:return}}})),bt=o((e=>{var t=new Uint8Array(512),n=new Uint8Array(256);(function(){let e=1;for(let r=0;r<255;r++)t[r]=e,n[e]=r,e<<=1,e&256&&(e^=285);for(let e=255;e<512;e++)t[e]=t[e-255]})(),e.log=function(e){if(e<1)throw Error(`log(`+e+`)`);return n[e]},e.exp=function(e){return t[e]},e.mul=function(e,r){return e===0||r===0?0:t[n[e]+n[r]]}})),xt=o((e=>{var t=bt();e.mul=function(e,n){let r=new Uint8Array(e.length+n.length-1);for(let i=0;i<e.length;i++)for(let a=0;a<n.length;a++)r[i+a]^=t.mul(e[i],n[a]);return r},e.mod=function(e,n){let r=new Uint8Array(e);for(;r.length-n.length>=0;){let e=r[0];for(let i=0;i<n.length;i++)r[i]^=t.mul(n[i],e);let i=0;for(;i<r.length&&r[i]===0;)i++;r=r.slice(i)}return r},e.generateECPolynomial=function(n){let r=new Uint8Array([1]);for(let i=0;i<n;i++)r=e.mul(r,new Uint8Array([1,t.exp(i)]));return r}})),St=o(((e,t)=>{var n=xt();function r(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}r.prototype.initialize=function(e){this.degree=e,this.genPoly=n.generateECPolynomial(this.degree)},r.prototype.encode=function(e){if(!this.genPoly)throw Error(`Encoder not initialized`);let t=new Uint8Array(e.length+this.degree);t.set(e);let r=n.mod(t,this.genPoly),i=this.degree-r.length;if(i>0){let e=new Uint8Array(this.degree);return e.set(r,i),e}return r},t.exports=r})),Ct=o((e=>{e.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}})),wt=o((e=>{var t=`[0-9]+`,n=`[A-Z $%*+\\-./:]+`,r=`(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+`;r=r.replace(/u/g,`\\u`);var i=`(?:(?![A-Z0-9 $%*+\\-./:]|`+r+`)(?:.|[\r
]))+`;e.KANJI=new RegExp(r,`g`),e.BYTE_KANJI=RegExp(`[^A-Z0-9 $%*+\\-./:]+`,`g`),e.BYTE=new RegExp(i,`g`),e.NUMERIC=new RegExp(t,`g`),e.ALPHANUMERIC=new RegExp(n,`g`);var a=RegExp(`^`+r+`$`),o=RegExp(`^`+t+`$`),s=RegExp(`^[A-Z0-9 $%*+\\-./:]+$`);e.testKanji=function(e){return a.test(e)},e.testNumeric=function(e){return o.test(e)},e.testAlphanumeric=function(e){return s.test(e)}})),$=o((e=>{var t=Ct(),n=wt();e.NUMERIC={id:`Numeric`,bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:`Alphanumeric`,bit:2,ccBits:[9,11,13]},e.BYTE={id:`Byte`,bit:4,ccBits:[8,16,16]},e.KANJI={id:`Kanji`,bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(e,n){if(!e.ccBits)throw Error(`Invalid mode: `+e);if(!t.isValid(n))throw Error(`Invalid version: `+n);return n>=1&&n<10?e.ccBits[0]:n<27?e.ccBits[1]:e.ccBits[2]},e.getBestModeForData=function(t){return n.testNumeric(t)?e.NUMERIC:n.testAlphanumeric(t)?e.ALPHANUMERIC:n.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(e){if(e&&e.id)return e.id;throw Error(`Invalid mode`)},e.isValid=function(e){return e&&e.bit&&e.ccBits};function r(t){if(typeof t!=`string`)throw Error(`Param is not a string`);switch(t.toLowerCase()){case`numeric`:return e.NUMERIC;case`alphanumeric`:return e.ALPHANUMERIC;case`kanji`:return e.KANJI;case`byte`:return e.BYTE;default:throw Error(`Unknown mode: `+t)}}e.from=function(t,n){if(e.isValid(t))return t;try{return r(t)}catch{return n}}})),Tt=o((e=>{var t=Q(),n=yt(),r=pt(),i=$(),a=Ct(),o=7973,s=t.getBCHDigit(o);function c(t,n,r){for(let i=1;i<=40;i++)if(n<=e.getCapacity(i,r,t))return i}function l(e,t){return i.getCharCountIndicator(e,t)+4}function u(e,t){let n=0;return e.forEach(function(e){let r=l(e.mode,t);n+=r+e.getBitsLength()}),n}function d(t,n){for(let r=1;r<=40;r++)if(u(t,r)<=e.getCapacity(r,n,i.MIXED))return r}e.from=function(e,t){return a.isValid(e)?parseInt(e,10):t},e.getCapacity=function(e,r,o){if(!a.isValid(e))throw Error(`Invalid QR Code version`);o===void 0&&(o=i.BYTE);let s=(t.getSymbolTotalCodewords(e)-n.getTotalCodewordsCount(e,r))*8;if(o===i.MIXED)return s;let c=s-l(o,e);switch(o){case i.NUMERIC:return Math.floor(c/10*3);case i.ALPHANUMERIC:return Math.floor(c/11*2);case i.KANJI:return Math.floor(c/13);case i.BYTE:default:return Math.floor(c/8)}},e.getBestVersionForData=function(e,t){let n,i=r.from(t,r.M);if(Array.isArray(e)){if(e.length>1)return d(e,i);if(e.length===0)return 1;n=e[0]}else n=e;return c(n.mode,n.getLength(),i)},e.getEncodedBits=function(e){if(!a.isValid(e)||e<7)throw Error(`Invalid QR Code version`);let n=e<<12;for(;t.getBCHDigit(n)-s>=0;)n^=o<<t.getBCHDigit(n)-s;return e<<12|n}})),Et=o((e=>{var t=Q(),n=1335,r=21522,i=t.getBCHDigit(n);e.getEncodedBits=function(e,a){let o=e.bit<<3|a,s=o<<10;for(;t.getBCHDigit(s)-i>=0;)s^=n<<t.getBCHDigit(s)-i;return(o<<10|s)^r}})),Dt=o(((e,t)=>{var n=$();function r(e){this.mode=n.NUMERIC,this.data=e.toString()}r.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(e){let t,n,r;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),r=parseInt(n,10),e.put(r,10);let i=this.data.length-t;i>0&&(n=this.data.substr(t),r=parseInt(n,10),e.put(r,i*3+1))},t.exports=r})),Ot=o(((e,t)=>{var n=$(),r=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:`.split(``);function i(e){this.mode=n.ALPHANUMERIC,this.data=e}i.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let n=r.indexOf(this.data[t])*45;n+=r.indexOf(this.data[t+1]),e.put(n,11)}this.data.length%2&&e.put(r.indexOf(this.data[t]),6)},t.exports=i})),kt=o(((e,t)=>{var n=$();function r(e){this.mode=n.BYTE,typeof e==`string`?this.data=new TextEncoder().encode(e):this.data=new Uint8Array(e)}r.getBitsLength=function(e){return e*8},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)},t.exports=r})),At=o(((e,t)=>{var n=$(),r=Q();function i(e){this.mode=n.KANJI,this.data=e}i.getBitsLength=function(e){return e*13},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let n=r.toSJIS(this.data[t]);if(n>=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw Error(`Invalid SJIS character: `+this.data[t]+`
Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),e.put(n,13)}},t.exports=i})),jt=o(((e,t)=>{var n={single_source_shortest_paths:function(e,t,r){var i={},a={};a[t]=0;var o=n.PriorityQueue.make();o.push(t,0);for(var s,c,l,u,d,f,p,m,h;!o.empty();)for(l in s=o.pop(),c=s.value,u=s.cost,d=e[c]||{},d)d.hasOwnProperty(l)&&(f=d[l],p=u+f,m=a[l],h=a[l]===void 0,(h||m>p)&&(a[l]=p,o.push(l,p),i[l]=c));if(r!==void 0&&a[r]===void 0){var g=[`Could not find a path from `,t,` to `,r,`.`].join(``);throw Error(g)}return i},extract_shortest_path_from_predecessor_list:function(e,t){for(var n=[],r=t;r;)n.push(r),e[r],r=e[r];return n.reverse(),n},find_path:function(e,t,r){var i=n.single_source_shortest_paths(e,t,r);return n.extract_shortest_path_from_predecessor_list(i,r)},PriorityQueue:{make:function(e){var t=n.PriorityQueue,r={},i;for(i in e||={},t)t.hasOwnProperty(i)&&(r[i]=t[i]);return r.queue=[],r.sorter=e.sorter||t.default_sorter,r},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var n={value:e,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};t!==void 0&&(t.exports=n)})),Mt=o((e=>{var t=$(),n=Dt(),r=Ot(),i=kt(),a=At(),o=wt(),s=Q(),c=jt();function l(e){return unescape(encodeURIComponent(e)).length}function u(e,t,n){let r=[],i;for(;(i=e.exec(n))!==null;)r.push({data:i[0],index:i.index,mode:t,length:i[0].length});return r}function d(e){let n=u(o.NUMERIC,t.NUMERIC,e),r=u(o.ALPHANUMERIC,t.ALPHANUMERIC,e),i,a;return s.isKanjiModeEnabled()?(i=u(o.BYTE,t.BYTE,e),a=u(o.KANJI,t.KANJI,e)):(i=u(o.BYTE_KANJI,t.BYTE,e),a=[]),n.concat(r,i,a).sort(function(e,t){return e.index-t.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function f(e,o){switch(o){case t.NUMERIC:return n.getBitsLength(e);case t.ALPHANUMERIC:return r.getBitsLength(e);case t.KANJI:return a.getBitsLength(e);case t.BYTE:return i.getBitsLength(e)}}function p(e){return e.reduce(function(e,t){let n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)},[])}function m(e){let n=[];for(let r=0;r<e.length;r++){let i=e[r];switch(i.mode){case t.NUMERIC:n.push([i,{data:i.data,mode:t.ALPHANUMERIC,length:i.length},{data:i.data,mode:t.BYTE,length:i.length}]);break;case t.ALPHANUMERIC:n.push([i,{data:i.data,mode:t.BYTE,length:i.length}]);break;case t.KANJI:n.push([i,{data:i.data,mode:t.BYTE,length:l(i.data)}]);break;case t.BYTE:n.push([{data:i.data,mode:t.BYTE,length:l(i.data)}])}}return n}function h(e,n){let r={},i={start:{}},a=[`start`];for(let o=0;o<e.length;o++){let s=e[o],c=[];for(let e=0;e<s.length;e++){let l=s[e],u=``+o+e;c.push(u),r[u]={node:l,lastCount:0},i[u]={};for(let e=0;e<a.length;e++){let o=a[e];r[o]&&r[o].node.mode===l.mode?(i[o][u]=f(r[o].lastCount+l.length,l.mode)-f(r[o].lastCount,l.mode),r[o].lastCount+=l.length):(r[o]&&(r[o].lastCount=l.length),i[o][u]=f(l.length,l.mode)+4+t.getCharCountIndicator(l.mode,n))}}a=c}for(let e=0;e<a.length;e++)i[a[e]].end=0;return{map:i,table:r}}function g(e,o){let c,l=t.getBestModeForData(e);if(c=t.from(o,l),c!==t.BYTE&&c.bit<l.bit)throw Error(`"`+e+`" cannot be encoded with mode `+t.toString(c)+`.
Suggested mode is: `+t.toString(l));switch(c===t.KANJI&&!s.isKanjiModeEnabled()&&(c=t.BYTE),c){case t.NUMERIC:return new n(e);case t.ALPHANUMERIC:return new r(e);case t.KANJI:return new a(e);case t.BYTE:return new i(e)}}e.fromArray=function(e){return e.reduce(function(e,t){return typeof t==`string`?e.push(g(t,null)):t.data&&e.push(g(t.data,t.mode)),e},[])},e.fromString=function(t,n){let r=h(m(d(t,s.isKanjiModeEnabled())),n),i=c.find_path(r.map,`start`,`end`),a=[];for(let e=1;e<i.length-1;e++)a.push(r.table[i[e]].node);return e.fromArray(p(a))},e.rawSplit=function(t){return e.fromArray(d(t,s.isKanjiModeEnabled()))}})),Nt=o((e=>{var t=Q(),n=pt(),r=mt(),i=ht(),a=gt(),o=_t(),s=vt(),c=yt(),l=St(),u=Tt(),d=Et(),f=$(),p=Mt();function m(e,t){let n=e.size,r=o.getPositions(t);for(let t=0;t<r.length;t++){let i=r[t][0],a=r[t][1];for(let t=-1;t<=7;t++)if(!(i+t<=-1||n<=i+t))for(let r=-1;r<=7;r++)a+r<=-1||n<=a+r||(t>=0&&t<=6&&(r===0||r===6)||r>=0&&r<=6&&(t===0||t===6)||t>=2&&t<=4&&r>=2&&r<=4?e.set(i+t,a+r,!0,!0):e.set(i+t,a+r,!1,!0))}}function h(e){let t=e.size;for(let n=8;n<t-8;n++){let t=n%2==0;e.set(n,6,t,!0),e.set(6,n,t,!0)}}function g(e,t){let n=a.getPositions(t);for(let t=0;t<n.length;t++){let r=n[t][0],i=n[t][1];for(let t=-2;t<=2;t++)for(let n=-2;n<=2;n++)t===-2||t===2||n===-2||n===2||t===0&&n===0?e.set(r+t,i+n,!0,!0):e.set(r+t,i+n,!1,!0)}}function _(e,t){let n=e.size,r=u.getEncodedBits(t),i,a,o;for(let t=0;t<18;t++)i=Math.floor(t/3),a=t%3+n-8-3,o=(r>>t&1)==1,e.set(i,a,o,!0),e.set(a,i,o,!0)}function v(e,t,n){let r=e.size,i=d.getEncodedBits(t,n),a,o;for(a=0;a<15;a++)o=(i>>a&1)==1,a<6?e.set(a,8,o,!0):a<8?e.set(a+1,8,o,!0):e.set(r-15+a,8,o,!0),a<8?e.set(8,r-a-1,o,!0):a<9?e.set(8,15-a-1+1,o,!0):e.set(8,15-a-1,o,!0);e.set(r-8,8,1,!0)}function y(e,t){let n=e.size,r=-1,i=n-1,a=7,o=0;for(let s=n-1;s>0;s-=2)for(s===6&&s--;;){for(let n=0;n<2;n++)if(!e.isReserved(i,s-n)){let r=!1;o<t.length&&(r=(t[o]>>>a&1)==1),e.set(i,s-n,r),a--,a===-1&&(o++,a=7)}if(i+=r,i<0||n<=i){i-=r,r=-r;break}}}function b(e,n,i){let a=new r;i.forEach(function(t){a.put(t.mode.bit,4),a.put(t.getLength(),f.getCharCountIndicator(t.mode,e)),t.write(a)});let o=(t.getSymbolTotalCodewords(e)-c.getTotalCodewordsCount(e,n))*8;for(a.getLengthInBits()+4<=o&&a.put(0,4);a.getLengthInBits()%8!=0;)a.putBit(0);let s=(o-a.getLengthInBits())/8;for(let e=0;e<s;e++)a.put(e%2?17:236,8);return x(a,e,n)}function x(e,n,r){let i=t.getSymbolTotalCodewords(n),a=i-c.getTotalCodewordsCount(n,r),o=c.getBlocksCount(n,r),s=o-i%o,u=Math.floor(i/o),d=Math.floor(a/o),f=d+1,p=u-d,m=new l(p),h=0,g=Array(o),_=Array(o),v=0,y=new Uint8Array(e.buffer);for(let e=0;e<o;e++){let t=e<s?d:f;g[e]=y.slice(h,h+t),_[e]=m.encode(g[e]),h+=t,v=Math.max(v,t)}let b=new Uint8Array(i),x=0,S,C;for(S=0;S<v;S++)for(C=0;C<o;C++)S<g[C].length&&(b[x++]=g[C][S]);for(S=0;S<p;S++)for(C=0;C<o;C++)b[x++]=_[C][S];return b}function S(e,n,r,a){let o;if(Array.isArray(e))o=p.fromArray(e);else if(typeof e==`string`){let t=n;if(!t){let n=p.rawSplit(e);t=u.getBestVersionForData(n,r)}o=p.fromString(e,t||40)}else throw Error(`Invalid data`);let c=u.getBestVersionForData(o,r);if(!c)throw Error(`The amount of data is too big to be stored in a QR Code`);if(!n)n=c;else if(n<c)throw Error(`
The chosen QR Code version cannot contain this amount of data.
Minimum version required to store current data is: `+c+`.
`);let l=b(n,r,o),d=new i(t.getSymbolSize(n));return m(d,n),h(d),g(d,n),v(d,r,0),n>=7&&_(d,n),y(d,l),isNaN(a)&&(a=s.getBestMask(d,v.bind(null,d,r))),s.applyMask(a,d),v(d,r,a),{modules:d,version:n,errorCorrectionLevel:r,maskPattern:a,segments:o}}e.create=function(e,r){if(e===void 0||e===``)throw Error(`No input text`);let i=n.M,a,o;return r!==void 0&&(i=n.from(r.errorCorrectionLevel,n.M),a=u.from(r.version),o=s.from(r.maskPattern),r.toSJISFunc&&t.setToSJISFunction(r.toSJISFunc)),S(e,a,i,o)}})),Pt=o((e=>{function t(e){if(typeof e==`number`&&(e=e.toString()),typeof e!=`string`)throw Error(`Color should be defined as hex string`);let t=e.slice().replace(`#`,``).split(``);if(t.length<3||t.length===5||t.length>8)throw Error(`Invalid hex color: `+e);(t.length===3||t.length===4)&&(t=Array.prototype.concat.apply([],t.map(function(e){return[e,e]}))),t.length===6&&t.push(`F`,`F`);let n=parseInt(t.join(``),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:`#`+t.slice(0,6).join(``)}}e.getOptions=function(e){e||={},e.color||={};let n=e.margin===void 0||e.margin===null||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,i=e.scale||4;return{width:r,scale:r?4:i,margin:n,color:{dark:t(e.color.dark||`#000000ff`),light:t(e.color.light||`#ffffffff`)},type:e.type,rendererOpts:e.rendererOpts||{}}},e.getScale=function(e,t){return t.width&&t.width>=e+t.margin*2?t.width/(e+t.margin*2):t.scale},e.getImageWidth=function(t,n){let r=e.getScale(t,n);return Math.floor((t+n.margin*2)*r)},e.qrToImageData=function(t,n,r){let i=n.modules.size,a=n.modules.data,o=e.getScale(i,r),s=Math.floor((i+r.margin*2)*o),c=r.margin*o,l=[r.color.light,r.color.dark];for(let e=0;e<s;e++)for(let n=0;n<s;n++){let u=(e*s+n)*4,d=r.color.light;if(e>=c&&n>=c&&e<s-c&&n<s-c){let t=Math.floor((e-c)/o),r=Math.floor((n-c)/o);d=l[+!!a[t*i+r]]}t[u++]=d.r,t[u++]=d.g,t[u++]=d.b,t[u]=d.a}}})),Ft=o((e=>{var t=Pt();function n(e,t,n){e.clearRect(0,0,t.width,t.height),t.style||={},t.height=n,t.width=n,t.style.height=n+`px`,t.style.width=n+`px`}function r(){try{return document.createElement(`canvas`)}catch{throw Error(`You need to specify a canvas element`)}}e.render=function(e,i,a){let o=a,s=i;o===void 0&&(!i||!i.getContext)&&(o=i,i=void 0),i||(s=r()),o=t.getOptions(o);let c=t.getImageWidth(e.modules.size,o),l=s.getContext(`2d`),u=l.createImageData(c,c);return t.qrToImageData(u.data,e,o),n(l,s,c),l.putImageData(u,0,0),s},e.renderToDataURL=function(t,n,r){let i=r;i===void 0&&(!n||!n.getContext)&&(i=n,n=void 0),i||={};let a=e.render(t,n,i),o=i.type||`image/png`,s=i.rendererOpts||{};return a.toDataURL(o,s.quality)}})),It=o((e=>{var t=Pt();function n(e,t){let n=e.a/255,r=t+`="`+e.hex+`"`;return n<1?r+` `+t+`-opacity="`+n.toFixed(2).slice(1)+`"`:r}function r(e,t,n){let r=e+t;return n!==void 0&&(r+=` `+n),r}function i(e,t,n){let i=``,a=0,o=!1,s=0;for(let c=0;c<e.length;c++){let l=Math.floor(c%t),u=Math.floor(c/t);!l&&!o&&(o=!0),e[c]?(s++,c>0&&l>0&&e[c-1]||(i+=o?r(`M`,l+n,.5+u+n):r(`m`,a,0),a=0,o=!1),l+1<t&&e[c+1]||(i+=r(`h`,s),s=0)):a++}return i}e.render=function(e,r,a){let o=t.getOptions(r),s=e.modules.size,c=e.modules.data,l=s+o.margin*2,u=o.color.light.a?`<path `+n(o.color.light,`fill`)+` d="M0 0h`+l+`v`+l+`H0z"/>`:``,d=`<path `+n(o.color.dark,`stroke`)+` d="`+i(c,s,o.margin)+`"/>`,f=`viewBox="0 0 `+l+` `+l+`"`,p=`<svg xmlns="http://www.w3.org/2000/svg" `+(o.width?`width="`+o.width+`" height="`+o.width+`" `:``)+f+` shape-rendering="crispEdges">`+u+d+`</svg>
`;return typeof a==`function`&&a(null,p),p}})),Lt=c(o((e=>{var t=ft(),n=Nt(),r=Ft(),i=It();function a(e,r,i,a,o){let s=[].slice.call(arguments,1),c=s.length,l=typeof s[c-1]==`function`;if(!l&&!t())throw Error(`Callback required as last argument`);if(l){if(c<2)throw Error(`Too few arguments provided`);c===2?(o=i,i=r,r=a=void 0):c===3&&(r.getContext&&o===void 0?(o=a,a=void 0):(o=a,a=i,i=r,r=void 0))}else{if(c<1)throw Error(`Too few arguments provided`);return c===1?(i=r,r=a=void 0):c===2&&!r.getContext&&(a=i,i=r,r=void 0),new Promise(function(t,o){try{t(e(n.create(i,a),r,a))}catch(e){o(e)}})}try{let t=n.create(i,a);o(null,e(t,r,a))}catch(e){o(e)}}e.create=n.create,e.toCanvas=a.bind(null,r.render),e.toDataURL=a.bind(null,r.renderToDataURL),e.toString=a.bind(null,function(e,t,n){return i.render(e,n)})}))(),1);async function Rt(e){return Lt.toDataURL(e,{width:512})}function zt({url:e,fileName:t,onClose:n}){let[r,i]=W(null),[a,o]=W(null);return G(()=>{i(null),o(null),Rt(e).then(i).catch(e=>o(e.message??`Failed to generate QR code`))},[e]),Y(`div`,{class:`modal-overlay`,onClick:n,children:Y(`div`,{class:`modal-card qr-modal`,onClick:e=>e.stopPropagation(),children:[Y(`div`,{class:`modal-header`,children:[Y(`span`,{class:`modal-title-text`,children:`Scan to download`}),Y(`button`,{class:`modal-close`,onClick:n,"aria-label":`Close`,children:Y(Z,{size:18})})]}),Y(`div`,{class:`modal-body qr-body`,children:[a?Y(`p`,{class:`qr-error`,children:a}):r?Y(`img`,{src:r,alt:`QR code`,class:`qr-img`,width:256,height:256}):Y(`div`,{class:`spinner`,style:`width:40px;height:40px`}),Y(`p`,{class:`qr-filename`,children:t}),Y(`p`,{class:`qr-url`,children:e})]})]})})}function Bt({message:e,onClose:t}){return G(()=>{let e=setTimeout(t,8e3);return()=>clearTimeout(e)},[e]),Y(`div`,{class:`ws-toast`,role:`alert`,children:[Y(`div`,{class:`ws-toast-body`,children:[Y(`span`,{class:`ws-toast-label`,children:`Server message`}),Y(`p`,{class:`ws-toast-text`,children:e})]}),Y(`div`,{class:`ws-toast-actions`,children:[Y(`button`,{class:`ws-toast-btn`,onClick:()=>Pe(e),title:`Copy to clipboard`,children:Y(Xe,{size:15})}),Y(`button`,{class:`ws-toast-btn`,onClick:t,title:`Dismiss`,children:Y(Z,{size:15})})]})]})}function Vt({current:e,onSave:t,onClose:n}){let[r,i]=W(e);return Y(`div`,{class:`modal-overlay`,onClick:n,children:Y(`div`,{class:`modal-card settings-modal`,onClick:e=>e.stopPropagation(),children:[Y(`div`,{class:`modal-header`,children:[Y(`span`,{class:`modal-title-text`,children:`Backend Settings`}),Y(`button`,{class:`modal-close`,onClick:n,"aria-label":`Close`,children:Y(Z,{size:18})})]}),Y(`div`,{class:`modal-body`,children:[Y(`div`,{class:`form-group`,children:[Y(`label`,{for:`api-url`,children:`Server URL`}),Y(`input`,{id:`api-url`,type:`text`,placeholder:`http://127.0.0.1:8888`,value:r,onInput:e=>i(e.target.value)}),Y(`p`,{class:`form-help`,children:[`Use `,Y(`code`,{children:`/`}),` to proxy via Vite in dev mode, or enter the full URL of your fsv instance.`]})]}),Y(`div`,{class:`modal-actions`,children:[Y(`button`,{class:`btn btn-secondary`,onClick:n,children:`Cancel`}),Y(`button`,{class:`btn btn-primary`,onClick:()=>{localStorage.setItem(`fsv_api_base`,r),t(r),n()},children:`Save`})]})]})]})})}function Ht(e){let t=e.split(`/`).filter(Boolean),n=[{name:`Root`,path:``}],r=``;for(let e of t)r=r?`${r}/${e}`:e,n.push({name:e,path:r});return n}function Ut(){let[e,t]=W(``),[n,r]=W(``),[i,a]=W(()=>localStorage.getItem(`fsv_api_base`)??`/`),[o,s]=W(null),[c,l]=W(null),[u,d]=W(!1),[f,p]=W(null),{files:m,loading:h,error:g,refresh:_}=Fe(e,i),v=Le(i,e=>{p(e),Pe(e)}),y=m.filter(e=>e.name.toLowerCase().includes(n.toLowerCase()));return Y(`div`,{class:`fsv-app`,children:[Y(`header`,{class:`app-header`,children:[Y(`div`,{class:`header-top`,children:[Y(`div`,{class:`brand`,children:[Y(`span`,{class:`brand-badge`,children:`FSV`}),Y(`span`,{class:`brand-name`,children:`File Share Viewer`})]}),Y(`div`,{class:`header-controls`,children:[Y(`div`,{class:`ws-dot ${v}`,title:`WebSocket: ${v}`}),Y(`button`,{class:`icon-btn`,title:`Settings`,onClick:()=>d(!0),children:Y(Ye,{size:18})})]})]}),Y(`nav`,{class:`breadcrumb`,"aria-label":`Path navigation`,children:Ht(e).map((e,n,i)=>Y(`span`,{class:`crumb-item`,children:[Y(`button`,{class:`crumb-btn`,onClick:()=>{t(e.path),r(``)},children:e.name}),n<i.length-1&&Y(`span`,{class:`crumb-sep`,"aria-hidden":`true`,children:`/`})]},e.path))}),Y(`div`,{class:`search-row`,children:[Y(`div`,{class:`search-box`,children:[Y(Je,{size:15}),Y(`input`,{type:`search`,placeholder:`Filter files…`,value:n,onInput:e=>r(e.target.value),"aria-label":`Filter files`})]}),Y(`button`,{class:`icon-btn`,title:`Refresh`,onClick:_,children:Y(qe,{size:16})})]})]}),Y(`main`,{class:`file-list`,children:[h&&Y(`div`,{class:`state-view`,children:[Y(`div`,{class:`spinner`}),Y(`p`,{children:`Loading…`})]}),!h&&g&&Y(`div`,{class:`state-view error-view`,children:[Y(`span`,{class:`state-icon`,children:`⚠️`}),Y(`p`,{children:g}),Y(`button`,{class:`btn btn-primary`,onClick:_,children:`Retry`})]}),!h&&!g&&y.length===0&&Y(`div`,{class:`state-view`,children:[Y(`span`,{class:`state-icon`,children:`📁`}),Y(`p`,{children:n?`No files match your search.`:`This folder is empty.`})]}),!h&&!g&&y.map(e=>Y(dt,{file:e,apiBase:i,onNavigate:e=>{t(e.path),r(``)},onPreview:s,onQr:l},e.path))]}),o&&Y(rt,{file:o,apiBase:i,onClose:()=>s(null)}),c&&Y(zt,{url:(e=>J(i,e.path))(c),fileName:c.name,onClose:()=>l(null)}),u&&Y(Vt,{current:i,onSave:a,onClose:()=>d(!1)}),f&&Y(Bt,{message:f,onClose:()=>p(null)})]})}he(Y(Ut,{}),document.getElementById(`app`));</script>
<style rel="stylesheet" crossorigin>:root{--text:#6b6375;--text-h:#08060d;--bg:#fff;--border:#e5e4e7;--code-bg:#f4f3ec;--accent:#aa3bff;--accent-bg:#aa3bff1a;--accent-border:#aa3bff80;--social-bg:#f4f3ec80;--shadow:#0000001a 0 10px 15px -3px, #0000000d 0 4px 6px -2px;--sans:system-ui, "Segoe UI", Roboto, sans-serif;--heading:system-ui, "Segoe UI", Roboto, sans-serif;--mono:ui-monospace, Consolas, monospace;font:18px/145% var(--sans);letter-spacing:.18px;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark;color:var(--text);background:var(--bg);font-synthesis:none;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media (prefers-color-scheme:dark){:root{--lightningcss-light: ;--lightningcss-dark:initial}}@media (width<=1024px){:root{font-size:16px}}@media (prefers-color-scheme:dark){:root{--text:#9ca3af;--text-h:#f3f4f6;--bg:#16171d;--border:#2e303a;--code-bg:#1f2028;--accent:#c084fc;--accent-bg:#c084fc26;--accent-border:#c084fc80;--social-bg:#2f303a80;--shadow:#0006 0 10px 15px -3px, #00000040 0 4px 6px -2px}#social .button-icon{filter:invert()brightness(2)}}body{margin:0}#app{box-sizing:border-box;border-inline:1px solid var(--border);flex-direction:column;width:100%;max-width:680px;min-height:100svh;margin:0 auto;display:flex}h1,h2{font-family:var(--heading);color:var(--text-h);font-weight:500}h1{letter-spacing:-1.68px;margin:32px 0;font-size:56px}@media (width<=1024px){h1{margin:20px 0;font-size:36px}}h2{letter-spacing:-.24px;margin:0 0 8px;font-size:24px;line-height:118%}@media (width<=1024px){h2{font-size:20px}}p{margin:0}code,.counter{font-family:var(--mono);color:var(--text-h);border-radius:4px;display:inline-flex}code{background:var(--code-bg);padding:4px 8px;font-size:15px;line-height:135%}.fsv-app{background:var(--bg);min-height:100svh;color:var(--text);font-family:var(--sans);flex-direction:column;display:flex}.app-header{z-index:20;background:var(--bg);border-bottom:1px solid var(--border);flex-direction:column;gap:8px;padding:12px 16px 8px;display:flex;position:sticky;top:0}.header-top{justify-content:space-between;align-items:center;display:flex}.brand{align-items:center;gap:8px;display:flex}.brand-badge{color:#fff;letter-spacing:.5px;background:linear-gradient(135deg,#a855f7,#7c3aed);border-radius:6px;padding:3px 8px;font-size:12px;font-weight:800}.brand-name{color:var(--text-h);font-size:15px;font-weight:600}.header-controls{align-items:center;gap:10px;display:flex}.ws-dot{border-radius:50%;flex-shrink:0;width:8px;height:8px}.ws-dot.connected{background:#22c55e;box-shadow:0 0 6px #22c55e}.ws-dot.connecting{background:#eab308;animation:1.4s infinite pulse;box-shadow:0 0 6px #eab308}.ws-dot.disconnected{background:#6b7280}.breadcrumb{flex-wrap:wrap;align-items:center;gap:2px;font-size:13px;display:flex}.crumb-item{align-items:center;gap:2px;display:flex}.crumb-btn{cursor:pointer;font-family:var(--sans);color:var(--text);background:0 0;border:none;border-radius:4px;padding:2px 6px;font-size:13px;transition:background .15s,color .15s}.crumb-btn:hover{background:var(--code-bg);color:var(--accent)}.crumb-sep{color:var(--border);padding:0 2px}.search-row{align-items:center;gap:8px;display:flex}.search-box{background:var(--code-bg);border:1px solid var(--border);border-radius:8px;flex:1;align-items:center;gap:8px;padding:6px 10px;transition:border-color .15s,box-shadow .15s;display:flex}.search-box:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-bg)}.search-box input{font-family:var(--sans);color:var(--text-h);background:0 0;border:none;outline:none;flex:1;font-size:14px}.search-box input::placeholder{color:var(--text);opacity:.6}.icon-btn{background:var(--code-bg);border:1px solid var(--border);color:var(--text);cursor:pointer;border-radius:8px;flex-shrink:0;justify-content:center;align-items:center;width:34px;height:34px;transition:background .15s,border-color .15s,color .15s;display:flex}.icon-btn:hover{background:var(--accent-bg);border-color:var(--accent-border);color:var(--accent)}.file-list{flex-direction:column;flex:1;padding:8px 0;display:flex}.file-card{border-bottom:1px solid var(--border);background:var(--bg);cursor:default;box-sizing:border-box;align-items:center;gap:12px;min-height:56px;padding:10px 16px;transition:background .12s;display:flex}.file-card:last-child{border-bottom:none}.dir-card{cursor:pointer}.dir-card:hover{background:var(--code-bg)}.file-icon-wrap{background:var(--code-bg);border-radius:10px;flex-shrink:0;justify-content:center;align-items:center;width:38px;height:38px;transition:background .15s;display:flex}.dir-card:hover .file-icon-wrap{background:var(--accent-bg)}.file-type-icon{color:var(--text)}.file-type-icon.folder{color:#a855f7}.file-type-icon.image{color:#10b981}.file-type-icon.video{color:#f59e0b}.file-type-icon.code{color:#3b82f6}.file-info{flex-direction:column;flex:1;gap:2px;min-width:0;display:flex}.file-name{color:var(--text-h);white-space:nowrap;text-overflow:ellipsis;font-size:14px;font-weight:500;overflow:hidden}.file-meta{color:var(--text);white-space:nowrap;text-overflow:ellipsis;font-size:11px;overflow:hidden}.file-actions{flex-shrink:0;align-items:center;gap:4px;display:flex}.action-btn{color:var(--text);cursor:pointer;background:0 0;border:1px solid #0000;border-radius:7px;justify-content:center;align-items:center;width:30px;height:30px;padding:0;text-decoration:none;transition:background .12s,border-color .12s,color .12s;display:flex}.action-btn:hover{background:var(--accent-bg);border-color:var(--accent-border);color:var(--accent)}.state-view{text-align:center;color:var(--text);flex-direction:column;flex:1;justify-content:center;align-items:center;gap:12px;padding:48px 24px;display:flex}.state-icon{opacity:.5;font-size:40px}.state-view p{margin:0;font-size:14px}.error-view{color:#ef4444}.spinner{border:3px solid var(--border);border-top-color:var(--accent);border-radius:50%;width:32px;height:32px;animation:.8s linear infinite spin}.modal-overlay{-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);z-index:100;background:#00000073;justify-content:center;align-items:flex-end;padding:0;animation:.15s ease-out fadeIn;display:flex;position:fixed;inset:0}.modal-card{background:var(--bg);border:1px solid var(--border);box-shadow:var(--shadow);box-sizing:border-box;border-radius:20px 20px 0 0;flex-direction:column;width:100%;max-height:92svh;animation:.25s cubic-bezier(.16,1,.3,1) slideUp;display:flex;overflow:hidden}@media (width>=600px){.modal-overlay{align-items:center;padding:20px}.modal-card{border-radius:16px;width:auto;min-width:360px;max-width:92vw}.preview-modal{width:860px;height:80vh}.qr-modal{width:320px}.settings-modal{width:400px}}.modal-header{border-bottom:1px solid var(--border);flex-shrink:0;justify-content:space-between;align-items:center;padding:14px 16px;display:flex}.modal-title-text{color:var(--text-h);text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;font-size:15px;font-weight:600;overflow:hidden}.modal-header-actions{flex-shrink:0;align-items:center;gap:6px;display:flex}.modal-action-btn{border:1px solid var(--border);color:var(--text);cursor:pointer;background:0 0;border-radius:7px;justify-content:center;align-items:center;width:30px;height:30px;text-decoration:none;transition:background .12s,color .12s;display:flex}.modal-action-btn:hover{background:var(--accent-bg);color:var(--accent)}.modal-close{cursor:pointer;color:var(--text);background:0 0;border:none;border-radius:6px;flex-shrink:0;justify-content:center;align-items:center;padding:4px;display:flex}.modal-close:hover{background:var(--code-bg);color:var(--text-h)}.modal-body{padding:16px;overflow-y:auto}.preview-body{background:var(--code-bg);flex-direction:column;flex:1;padding:0;display:flex;overflow:hidden}.preview-loading{flex-direction:column;flex:1;justify-content:center;align-items:center;gap:12px;display:flex}.code-block{box-sizing:border-box;flex:1;margin:0;padding:16px;overflow:auto}.code-block code{color:var(--text-h);white-space:pre;font-size:12px;line-height:1.6;font-family:var(--mono);background:0 0;padding:0}.preview-media-wrap{flex:1;justify-content:center;align-items:center;padding:16px;display:flex;overflow:auto}.preview-image{object-fit:contain;border-radius:8px;max-width:100%;max-height:100%}.preview-video{border-radius:8px;max-width:100%;max-height:100%}.preview-audio-wrap{flex-direction:column}.preview-audio{width:100%}.preview-unsupported{text-align:center;flex-direction:column;flex:1;justify-content:center;align-items:center;gap:16px;padding:32px;display:flex}.qr-body{flex-direction:column;align-items:center;gap:12px;padding:20px 16px;display:flex}.qr-img{border-radius:8px;display:block}.qr-filename{color:var(--text-h);text-align:center;margin:0;font-size:14px;font-weight:500}.qr-url{color:var(--text);word-break:break-all;text-align:center;font-size:11px;font-family:var(--mono);margin:0}.qr-error{color:#ef4444;font-size:13px}.form-group{flex-direction:column;gap:6px;margin-bottom:16px;display:flex}.form-group label{color:var(--text-h);font-size:13px;font-weight:600}.form-group input{border:1px solid var(--border);background:var(--bg);color:var(--text-h);font-family:var(--sans);border-radius:8px;outline:none;padding:8px 12px;font-size:14px}.form-group input:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-bg)}.form-help{color:var(--text);margin:0;font-size:11px;line-height:1.5}.modal-actions{justify-content:flex-end;gap:8px;display:flex}.btn{font-family:var(--sans);cursor:pointer;border:1px solid #0000;border-radius:8px;padding:8px 16px;font-size:13px;font-weight:500;transition:background .15s}.btn-primary{background:var(--accent);color:#fff}.btn-primary:hover{background:#9333ea}.btn-secondary{background:var(--code-bg);border-color:var(--border);color:var(--text-h)}.btn-secondary:hover{background:var(--border)}.ws-toast{z-index:200;background:var(--bg);border:1px solid var(--border);border-left:3px solid var(--accent);box-shadow:var(--shadow);box-sizing:border-box;border-radius:12px;align-items:flex-start;gap:12px;width:calc(100vw - 32px);max-width:420px;padding:12px 14px;animation:.25s cubic-bezier(.16,1,.3,1) slideUp;display:flex;position:fixed;bottom:20px;left:50%;transform:translate(-50%)}.ws-toast-body{flex:1;min-width:0}.ws-toast-label{text-transform:uppercase;letter-spacing:.5px;color:var(--accent);margin-bottom:3px;font-size:10px;font-weight:700;display:block}.ws-toast-text{color:var(--text-h);word-break:break-word;margin:0;font-size:13px;line-height:1.4}.ws-toast-actions{flex-direction:column;flex-shrink:0;gap:4px;display:flex}.ws-toast-btn{cursor:pointer;color:var(--text);background:0 0;border:none;border-radius:4px;justify-content:center;align-items:center;padding:3px;transition:color .12s;display:flex}.ws-toast-btn:hover{color:var(--accent)}@keyframes spin{to{transform:rotate(360deg)}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes slideUp{0%{opacity:0;transform:translateY(16px)}to{opacity:1;transform:translateY(0)}}@keyframes pulse{0%,to{opacity:1}50%{opacity:.4}}
/*$vite$:1*/</style>
</head>
<body>
<div id="app"></div>
</body>
</html>