diff --git a/webui/SHA256SUMS b/webui/SHA256SUMS index b4c6372..4f971a5 100644 --- a/webui/SHA256SUMS +++ b/webui/SHA256SUMS @@ -1,13 +1,13 @@ 3f3d9e0024b1921b067d6f7f88deb4a60cbe7a78e76c64e3f1d7fc3b779b9d04 gui/syncshell-modern/LICENSE.syncthing -e4a9a4a162c503e8656de4cf776c2ff52c7fe514299b73233d7dddbd70d396b0 gui/syncshell-modern/assets/compiled/index-B3LnjwC-.js -d9f606609b02a1f6a334af2262b4c35631a48c9652aea80e6c256e6e88455644 gui/syncshell-modern/assets/compiled/index-Dm9fw6Co.css -a96e3d8969bcf96f8d83be0151f9a58f385e805fe0ebbbc37cee884d6d659063 gui/syncshell-modern/assets/css/modern.css -01861eeca69a9b896ff0da8749216192e1fb83e79cc3ae2063aca10d0dc45f95 gui/syncshell-modern/assets/css/overrides.css -9e6f448757fe9855e88361b94fcb1cc3dfdd50b8f9cda372f730edfd04b8d42e gui/syncshell-modern/assets/css/syncshell-dark.css -00022051d6d1cd2f4051121c6c123e245fdd589a1c8dfd74eb48c3a2d459144e gui/syncshell-modern/assets/css/syncshell-light.css -aa4a557ddb7ec6764022163308e9e2f0c37fd1253a1ff40e283f192319327414 gui/syncshell-modern/assets/css/theme.css +64e7aedc5dc0b2f3d91866c1eb39023f477be6be0579e3035425de018606ce4f gui/syncshell-modern/assets/compiled/index-D90N4kfH.js +8fb44858250473bf9461a183079b11da3acedbd98ddb831a2404d675c3551e3c gui/syncshell-modern/assets/compiled/index-tmSTW1eB.css +b09731c7da3f3d9b9a9c1790025e1c89b607e6e7ca799c23f40c12032535101f gui/syncshell-modern/assets/css/layers.css +b0b444158655692ec51b7ade49fa0fcea83c508ba6d31e32010e7f670033b469 gui/syncshell-modern/assets/css/overrides.css +7414b44eb0799be10ababc3d549e6c5b9b568756a6acb0d5c0e1a7afc6a5fcf3 gui/syncshell-modern/assets/css/syncshell-dark.css +13d55264f6aad0bcac3fbaa37648daf235932c280a10154770c62e915044a419 gui/syncshell-modern/assets/css/syncshell-light.css +3d9fc3ced168baf4012734e284a52536f06de7296b000154c99192f6e0114c7b gui/syncshell-modern/assets/css/theme.css 96947f0a2cd434e45cf778e7604260a8b2af2a444cd6f32350cad7560bc8c0d8 gui/syncshell-modern/assets/font/raleway-500.woff -08e5e01580ec39dbd779a7d6b04aff936b7086ad9bfb69d06739e11d302fc80b gui/syncshell-modern/assets/font/raleway.css +4a083efa1144e07bec594fc387b569ae1e3c49ec4512dcf3e4be91110fb82652 gui/syncshell-modern/assets/font/raleway.css 71959dc8e30bd9b2b75d34df200afaee9f58446fc5b5b383094df2c3c48e5760 gui/syncshell-modern/assets/img/favicon-default.png 5dada438b79b4020a883c6938edcf20f40a9f8bf0fbea992f4b6031afd270235 gui/syncshell-modern/assets/img/favicon-notify.png 0ad0dee4667c0ecc19fddfbfdfc7c99bf3e28ba90ed8abbff10e801151b586b9 gui/syncshell-modern/assets/img/favicon-pause.png @@ -15,8 +15,8 @@ aa4a557ddb7ec6764022163308e9e2f0c37fd1253a1ff40e283f192319327414 gui/syncshell- 89dd6592c486051f17439e343fa15c3ac2250012f183fc6e0970955f74eb8820 gui/syncshell-modern/assets/img/logo-horizontal.svg 4315325f9c9073d1b71f29e62ae76ef7c92d5eef4df167b19499a8a977955384 gui/syncshell-modern/assets/img/safari-pinned-tab.svg 8655792f4bfef8237ba4ed6dc4f8523f465477586a1155a5e82c277f1ea6587f gui/syncshell-modern/assets/lang/README.txt -92189290e48b86956579c8638abf8a5428dd5098440eb04cb47361f2b3aabf66 gui/syncshell-modern/assets/lang/lang-en.json -72912996e70b857758a9203e426c111f02c63cd98ba503c08cc4cfaa2e2727ad gui/syncshell-modern/index.html +531d09f120e9ef99c2491d15790a8e67a08c53f543030a017ce18a6b308bc2d8 gui/syncshell-modern/assets/lang/lang-en.json +e0e6df6c92b8e9d0289ae8fad5b77199e1647398201f531a68a1e407babd2960 gui/syncshell-modern/index.html f05e84c3000faf09cf8e445d35018b01fc0d6026953840e9398aeab501b86da2 gui/syncshell-modern/licenses/OFL-1.1.txt 96dcdcf4bf781efbb07a1912e9364d144f02ad57d7cb7a07ed351d1f56c402ef gui/syncshell-modern/licenses/angular-utils-pagination.txt 8c8cc1220719b94a053ade7a6d7f227eee97cd0843f1c135f80b57ba0758b722 gui/syncshell-modern/licenses/font-notices.txt @@ -29,8 +29,8 @@ a5d1da13fbd483f0c2daab5070ec40a8fd33bb88b23b08034a5b3e61394b1fac gui/syncshell- 429793ca8577023b9d96585576e3c4fc6666cb872f548bbc57c92f6345e711ca gui/syncshell-modern/vendor/bootstrap/fonts/reception-2.svg d89a04da25833cf11b910e5c3138b03f6ee25d7860333463e31ad5021ff9e344 gui/syncshell-modern/vendor/bootstrap/fonts/reception-3.svg 09a189b0de0f7670ede23b7336929d28bcfd4573d2a0199f4350f50840a63e5f gui/syncshell-modern/vendor/bootstrap/fonts/reception-4.svg -8e6e020da5f9ed752000ee3a5b060ddaf32158e1984240df32c41a721e77af4b install.sh -60fd5dad8890a40a43002738c101bc0b5bc9d9ff00f9b8c2e4c6ca1bbe42f627 integration/omarchy-theme-refresh.js -2f2f17dc508070de2f5f132bc62fd3e0ff448a1a4e7e609eafde38ea467c03c7 integration/omarchy-theme.css.in -14954bfb438f8426ea1785efaf23d265881e3e2ee2c5670acbdcd4211c59ca3b manifest.json -e01cb4c67cb0ff4630a507865b1947f3df6e05bac4cf7239d07535363a5a79ad import.json +0a93e3a18fd2b74ceda7ad4756c790b3ce4bbeefd3fec580b2c27425766a69bc install.sh +ce022e02a9902cc3455b50de10da3ab650ce9b08b93fb39d8bda07e96b425ade integration/omarchy-theme-refresh.js +e2ecf57c7dd8ff1ac4269a419fe3d7d9b0131d3d0180be5eda7e048887431ee3 integration/omarchy-theme.css.in +790362de21b11cf13f2be17f8b1299a23467a0696f1780219e09ec6783f8ee90 manifest.json +2ee8f9fdcd189b7755fdc4b862a926edd69e7d0aee1a7535a628cac81fdbea76 import.json diff --git a/webui/gui/syncshell-modern/assets/compiled/index-B3LnjwC-.js b/webui/gui/syncshell-modern/assets/compiled/index-B3LnjwC-.js deleted file mode 100644 index c815ea2..0000000 --- a/webui/gui/syncshell-modern/assets/compiled/index-B3LnjwC-.js +++ /dev/null @@ -1,12 +0,0 @@ -(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),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=`data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%3e%3cg%20id='syncthing-mark'%3e%3ccircle%20id='ring'%20cx='8.218058'%20cy='8.000000'%20r='5.9557071'%20style='fill:none;stroke:%23fff;stroke-width:1.4'/%3e%3cline%20id='arm-l'%20x1='9.417377'%20y1='8.804085'%20x2='2.480409'%20y2='9.444634'%20style='stroke:%23fff;stroke-width:1.4'/%3e%3cline%20id='arm-tr'%20x1='9.417377'%20y1='8.804085'%20x2='13.519591'%20y2='5.396935'%20style='stroke:%23fff;stroke-width:1.4'/%3e%3cline%20id='arm-br'%20x1='9.417377'%20y1='8.804085'%20x2='12.006814'%20y2='12.538330'%20style='stroke:%23fff;stroke-width:1.4'/%3e%3ccircle%20id='node-c'%20cx='9.417377'%20cy='8.804085'%20r='1.7'%20style='fill:%23fff'/%3e%3ccircle%20id='node-l'%20cx='2.480409'%20cy='9.444634'%20r='1.7'%20style='fill:%23fff'/%3e%3ccircle%20id='node-tr'%20cx='13.519591'%20cy='5.396935'%20r='1.7'%20style='fill:%23fff'/%3e%3ccircle%20id='node-br'%20cx='12.006814'%20cy='12.538330'%20r='1.7'%20style='fill:%23fff'/%3e%3c/g%3e%3c/svg%3e`,t=`syncshell-desktop`,n=`Local file actions are unavailable. Open this UI from Syncshell on the desktop running Syncthing, under the same user.`;function r(e=window){let n;try{let r=e.location.hash.slice(1);r.startsWith(`syncshell-desktop=`)?(n=r.slice(18),e.history.replaceState(null,``,e.location.pathname+e.location.search),e.sessionStorage.setItem(t,n)):n=e.sessionStorage.getItem(t)}catch{return null}let r=/^127\.0\.0\.1:([0-9]{1,5})\/([a-f0-9]{64})$/.exec(n||``);if(!r||Number(r[1])<1||Number(r[1])>65535)return null;async function i(t,n){let i;try{i=await e.fetch(`http://127.0.0.1:${r[1]}/${t}`,{method:`POST`,credentials:`omit`,referrerPolicy:`no-referrer`,headers:{"Content-Type":`application/json`,"X-Syncshell-Token":r[2]},body:JSON.stringify(n),signal:AbortSignal.timeout(3e4)})}catch{throw Error(`Desktop connection is unavailable. Reopen the Web UI from the Syncshell plugin.`)}if(i.status===403)throw Error(`Desktop authorization expired. Reopen the Web UI from the Syncshell plugin.`);let a=await i.json();if(!i.ok)throw Error(a.error||`Desktop action failed`);return a}let a=(e,t,n=t.current||t.copies[0])=>({device:e,folder:t.folder,root:t.root,path:t.path,file:n.path,size:n.bytes,modified:n.modified});return{status:e=>i(`status`,{device:e}),check:(e,t,n)=>i(`check`,a(e,t,n)),open:(e,t,n)=>i(`open`,a(n,e,t)),rename:(e,t,n)=>i(`rename`,a(n,e,t))}}var i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y={},b=[],x=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,S=Array.isArray;function C(e,t){for(var n in t)e[n]=t[n];return e}function w(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function T(e,t,n){var r,a,o,s={};for(o in t)o==`key`?r=t[o]:o==`ref`?a=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?i.call(arguments,2):n),typeof e==`function`&&e.defaultProps!=null)for(o in e.defaultProps)s[o]===void 0&&(s[o]=e.defaultProps[o]);return E(e,s,r,a,null)}function E(e,t,n,r,i){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++o,__i:-1,__u:0};return i==null&&a.vnode!=null&&a.vnode(s),s}function D(e){return e.children}function O(e,t){this.props=e,this.context=t}function k(e,t){if(t==null)return e.__?k(e.__,e.__i+1):null;for(var n;tt&&s.sort(u),e=s.shift(),t=s.length,A(e)}finally{s.length=N.__r=0}}function ee(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,g,_=r&&r.__k||b,v=t.length;for(c=P(n,t,_,c,v),d=0;d0?o=e.__k[a]=E(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=re(o,n,c,d))!=-1&&(d--,(s=n[l])&&(s.__u|=2)),s==null||s.__v==null?(l==-1&&(i>u?f--:ic?f--:f++,o.__u|=4))):e.__k[a]=null;if(d)for(a=0;a+!!u){for(i=n-1,a=n+1;i>=0||a=0?i--:a++])!=null&&!(2&l.__u)&&s==l.key&&c==l.type)return o}return-1}function ie(e,t,n){t[0]==`-`?e.setProperty(t,n??``):e[t]=n==null?``:typeof n!=`number`||x.test(t)?n:n+`px`}function ae(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||ie(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||ie(e.style,t,n[t])}}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(m,`$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[p]=r[p]:(n[p]=h,e.addEventListener(t,a?_:g,a)):e.removeEventListener(t,a?_:g,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 oe(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t[f]==null)t[f]=h++;else if(t[f]0?e:S(e)?e.map(le):e.constructor===void 0?C({},e):null}function ue(e,t,n,r,o,s,c,l,u){var d,f,p,m,h,g,_,v=n.props||y,b=t.props,x=t.type;if(x==`svg`?o=`http://www.w3.org/2000/svg`:x==`math`?o=`http://www.w3.org/1998/Math/MathML`:o||=`http://www.w3.org/1999/xhtml`,s!=null){for(d=0;d=n.__.length&&n.__.push({}),n.__[e]}function R(e){return ye=1,Oe(Ie,e)}function Oe(e,t,n){var r=De(ge++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Ie(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=I,!I.__f)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=!1,o=r.__c.props!==e;if(r.__c.__H.__.some(function(e){if(e.__N){i=!0;var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}}),a){var s=a.call(this,e,t,n);return i?s||o:s}return!i||o};I.__f=!0;var a=I.shouldComponentUpdate,o=I.componentWillUpdate;I.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)},I.shouldComponentUpdate=i}return r.__N||r.__}function z(e,t){var n=De(ge++,3);!L.__s&&Fe(n.__H,t)&&(n.__=e,n.u=t,I.__H.__h.push(n))}function B(e){return ye=5,ke(function(){return{current:e}},[])}function ke(e,t){var n=De(ge++,7);return Fe(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function V(e){var t=I.context[e.__c],n=De(ge++,9);return n.c=e,t?(n.__??(n.__=!0,t.sub(I)),t.props.value):e.__}function Ae(){for(var e;e=be.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(Ne),t.__h.some(Pe),t.__h=[]}catch(n){t.__h=[],L.__e(n,e.__v)}}}L.__b=function(e){I=null,xe&&xe(e)},L.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Ee&&Ee(e,t)},L.__r=function(e){Se&&Se(e),ge=0;var t=(I=e.__c).__H;t&&(_e===I?(t.__h=[],I.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.some(Ne),t.__h.some(Pe),t.__h=[],ge=0)),_e=I},L.diffed=function(e){Ce&&Ce(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(be.push(t)!==1&&ve===L.requestAnimationFrame||((ve=L.requestAnimationFrame)||Me)(Ae)),t.__H.__.some(function(e){e.u&&=(e.__H=e.u,void 0)})),_e=I=null},L.__c=function(e,t){t.some(function(e){try{e.__h.some(Ne),e.__h=e.__h.filter(function(e){return!e.__||Pe(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],L.__e(n,e.__v)}}),we&&we(e,t)},L.unmount=function(e){Te&&Te(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(e){try{Ne(e)}catch(e){t=e}}),n.__H=void 0,t&&L.__e(t,n.__v))};var je=typeof requestAnimationFrame==`function`;function Me(e){var t,n=function(){clearTimeout(r),je&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);je&&(t=requestAnimationFrame(n))}function Ne(e){var t=I,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),I=t}function Pe(e){var t=I;e.__c=e.__(),I=t}function Fe(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function Ie(e,t){return typeof t==`function`?t(e):t}var Le=class extends Error{constructor(e,t){super(typeof t==`string`&&t?t:t?.error||`HTTP ${e.status}`),this.name=`HttpError`,this.status=e.status,this.data=t,this.url=e.url}};function Re({pageUrl:e=location.href,metadata:t=window.metadata,fetch:n=globalThis.fetch,cookie:r=()=>document.cookie}={}){let i=new URL(`rest/`,e),a=t?.deviceIDShort;async function o(e,t,{query:o,body:s,signal:c}={}){let l=new URL(t,i);if(l.origin!==i.origin||!l.pathname.startsWith(i.pathname))throw TypeError(`Syncthing requests must stay within the REST base`);for(let[e,t]of Object.entries(o||{}))t!=null&&l.searchParams.set(e,t);let u=new Headers({Accept:`application/json, text/plain, */*`});if(a){let e=`CSRF-Token-${a}=`,t=r().split(`;`).map(e=>e.trim()).find(t=>t.startsWith(e));t&&u.set(`X-CSRF-Token-${a}`,decodeURIComponent(t.slice(e.length)))}s!==void 0&&u.set(`Content-Type`,`application/json`);let d=await n(l,{method:e,headers:u,signal:c,credentials:`same-origin`,body:s===void 0?void 0:JSON.stringify(s)}),f=await d.text(),p=f;if(f&&(d.headers.get(`Content-Type`)?.includes(`json`)||/^[\s]*[\[{]/.test(f)))try{p=JSON.parse(f)}catch(e){if(d.ok)throw e}if(!d.ok)throw new Le(d,p);return p}return{request:o,get:(e,t,n)=>o(`GET`,e,{query:t,signal:n}),post:(e,t,n,r)=>o(`POST`,e,{body:t,query:n,signal:r}),put:(e,t,n)=>o(`PUT`,e,{body:t,signal:n}),patch:(e,t,n)=>o(`PATCH`,e,{body:t,signal:n}),delete:(e,t,n)=>o(`DELETE`,e,{query:t,signal:n})}}function ze(e,{onEvent:t,onOnline:n=()=>{},onOffline:r=()=>{},onAuthExpired:i=()=>location.reload(),retryMs:a=1e3}={}){let o,s,c,l,u=0;function d(){if(o)return o;s=new AbortController;let e=s.signal;return o=f(e).finally(()=>{o=void 0}),o}async function f(o){let s={limit:1};for(;!o.aborted;)try{let r=await e.get(`events`,s,o);if(o.aborted)return;if(!r)throw Error(`Empty event response`);n(),u>0&&r.forEach(t),r.length&&(u=r[r.length-1].id),s={since:u}}catch(e){if(o.aborted)return;if(e.status===403){i();return}r(e),await new Promise(e=>{l=e,c=setTimeout(e,a)}),c=void 0,l=void 0,s={limit:1}}}function p(){return s?.abort(),clearTimeout(c),l?.(),o}return{start:d,stop:p}}var Be=[[`reused`,`Reused`,`success`],[`copiedFromOrigin`,`Copied from original`,``],[`copiedFromElsewhere`,`Copied from elsewhere`,`info`],[`pulled`,`Downloaded`,`warning`],[`pulling`,`Downloading`,`danger`]];function Ve(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,Object.fromEntries(Object.entries(t).map(([e,t])=>{let n=Object.fromEntries(Be.map(([e])=>[e,100*t[e]/t.total]));return n.pulling<1&&n.pulled+n.copiedFromElsewhere+n.copiedFromOrigin+n.reused<=99&&(n.pulling=1),[e,{...n,bytesTotal:t.bytesTotal,bytesDone:t.bytesDone}]}))]))}function He(e,t){return Object.keys(e).filter(n=>Object.keys(e[n]).some(e=>!t[n]?.[e]))}var Ue={Del:`trash`,"Del (dir)":`trash`,Sync:`circle-arrow-down`,Update:`asterisk`};function We(e){if(!Number.isFinite(e)||e<0)return`-`;for(var t=[[1e9,`B`],[1e6,`M`],[1e3,`k`]],n=0;n=t[n][0])return(Math.floor(e/(t[n][0]/10))/10).toFixed(1)+t[n][1];return e.toLocaleString()}function H(e,t){if(e===void 0||isNaN(e))return`0 `;let n=t?1024:1e3;for(let[r,i]of[[4,`T`],[3,`G`],[2,`M`],[1,t?`K`:`k`]]){if(e<=n**r)continue;let a=e/n**r,o=r===4?a>1e3:t&&a>=1e3;return a.toLocaleString(void 0,o?{maximumFractionDigits:0}:{maximumSignificantDigits:3})+` `+i+(t?`i`:``)}return Math.round(e).toLocaleString()+` `}function Ge(e,t=`s`){let n=[[`d`,86400],[`h`,3600],[`m`,60],[`s`,1]],r=n.findIndex(([e])=>e===t);if(r<0)throw RangeError(`Duration precision must be d, h, m or s`);let i=Math.abs(parseInt(e,10))||0,a=[];for(let[e,o]of n.slice(0,r+1)){let n=Math.floor(i/o);(n||e===t&&i>0)&&a.push(n+e),i%=o}return a.join(` `)||`0`+t}function U(e){let t=new Date(e);if(Number.isNaN(t.getTime()))return``;let n=e=>String(e).padStart(2,`0`);return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())} ${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`}var W=e=>e?.name||e?.deviceID?.slice(0,7)||``,Ke=(e,t)=>e.folders.filter(e=>e.devices.some(e=>e.deviceID===t));function qe(e,t,n){let r={};for(let t of e)(r[t.group||``]||=[]).push(t);return Object.keys(r).sort().map(e=>[e,r[e].sort((e,r)=>(e[t]||e[n]).localeCompare(r[t]||r[n]))])}function Je(e={}){let t=0,n=0,r=0,i=0;for(let[a,o]of Object.entries(e))a.startsWith(`_`)||(t+=o.globalBytes,n+=o.needBytes,r+=o.needItems,i+=o.needDeletes);return{...e,_total:n===0&&r+i>0?95:t===0?100:Math.floor(100*(1-n/t)),_needBytes:t===0?0:n,_needItems:t===0?0:r+i}}function Ye(e,t,n){let r=(e={},t)=>({...e,inbps:Number.isFinite(t?.inBytesTotal)&&n>0?Math.max(0,(e.inBytesTotal-t.inBytesTotal)/n):0,outbps:Number.isFinite(t?.outBytesTotal)&&n>0?Math.max(0,(e.outBytesTotal-t.outBytesTotal)/n):0});return{connectionsTotal:r(e.total,t.connectionsTotal),connections:Object.fromEntries(Object.entries(e.connections||{}).map(([e,n])=>[e,r(n,t.connections?.[e])]))}}function Xe(e,t){let n=Ke(t.config,e.deviceID).length===0?`unused-`:``,r=t.connections[e.deviceID];if(!r)return`unknown`;if(e.paused)return n+`paused`;if(r.connected)return t.completion[e.deviceID]?._total===100?n+`insync`:`syncing`;let i=et(t.deviceStats[e.deviceID]?.lastSeen);return n+(!n&&(!i||i>=7)?`disconnected-inactive`:`disconnected`)}var Ze={unknown:`Unknown`,disconnected:`Disconnected`,"disconnected-inactive":`Disconnected (Inactive)`,insync:`Up to Date`,paused:`Paused`,syncing:`Syncing`,"unused-disconnected":`Disconnected (Unused)`,"unused-insync":`Connected (Unused)`,"unused-paused":`Paused (Unused)`},Qe={disconnected:`power`,"disconnected-inactive":`power`,insync:`check`,paused:`pause`,syncing:`refresh`,unknown:`help`,"unused-disconnected":`unlink`,"unused-insync":`unlink`,"unused-paused":`unlink`};function $e(e,t){let n=t.connections[e.deviceID];return n?e.paused?`default`:n.connected?t.completion[e.deviceID]?._total===100?`success`:`primary`:`info`:`info`}function et(e){let t=new Date(e);return!e||t.getTime()===0?void 0:(Date.now()-t)/864e5}function tt(e){if(!e)return`-1`;for(let t of[`relay`,`quic`,`tcp`])if(e.type?.startsWith(t))return t+(e.isLocal?`lan`:`wan`);return`disconnected`}var nt={relaywan:`Relay WAN`,relaylan:`Relay LAN`,quicwan:`QUIC WAN`,quiclan:`QUIC LAN`,tcpwan:`TCP WAN`,tcplan:`TCP LAN`},rt={tcplan:`reception-4`,quiclan:`reception-4`,tcpwan:`reception-3`,quicwan:`reception-3`,relaylan:`reception-2`,relaywan:`reception-1`,disconnected:`reception-0`};function it(e,t){if(!e.remoteGUIPort||!t?.connected||!t.address||t.type?.includes(`Relay`))return``;let n=t.address.lastIndexOf(`:`);return`http://`+(n<0?t.address:t.address.slice(0,n)+`:`+e.remoteGUIPort).replace(/%.*?\]:/,`]:`).replace(`%`,`%25`)}function at(e){return e?.error?e.error.replace(/.+: /,``)+` (`+U(e.when).slice(-8)+`)`:``}function ot(e={}){let t=Object.entries(e),n=t.filter(([,e])=>e?.error);return{entries:t,failed:n,total:t.length,running:t.length-n.length,color:t.length&&!n.length?`success`:t.length===n.length?`danger`:``}}function st(e=``){let t=e.replace(/[\W_]/g,``),n=[];if(!t)return n;for(let e=0;e<5;e++)for(let r=2;r>=0;r--)t.charCodeAt(e+r*5)%2||(n.push([r,e]),r!==2&&n.push([4-r,e]));return n}function ct(){return{online:!1,ready:!1,error:null,config:{folders:[],devices:[],options:{},gui:{}},system:{},version:{},model:{},scanProgress:{},folderStats:{},deviceStats:{},connections:{},connectionsTotal:{},completion:{},discoveryCache:{},pendingDevices:{},pendingFolders:{},globalChanges:[],errors:[],seenError:``,configInSync:!0,downloadProgress:{},itemsRevision:{},upgradeInfo:null}}function lt(e,t){let n=t.data;switch(t.type){case`FolderSummary`:return{...e,model:{...e.model,[n.folder]:n.summary}};case`StateChanged`:{if(!e.model[n.folder])return e;let t={...e.scanProgress};return n.to===`scanning`&&delete t[n.folder],{...e,scanProgress:t,model:{...e.model,[n.folder]:{...e.model[n.folder],state:n.to,error:n.error}}}}case`FolderErrors`:return e.model[n.folder]?{...e,model:{...e.model,[n.folder]:{...e.model[n.folder],errors:n.errors.length}}}:e;case`FolderScanProgress`:return{...e,scanProgress:{...e.scanProgress,[n.folder]:{current:n.current,total:n.total,rate:n.rate}}};default:return e}}function ut(e,{publish:t,onAuthExpired:n,refreshMs:r=1e4,retryMs:i=1e3}={}){let a=ct(),o,s,c,l=0;function u(e){o?.signal.aborted||(a=e,t(a))}function d(e){o?.signal.aborted||(e.status===403&&n?.(),u({...a,error:e}))}async function f(t,n){return e.get(t,n,o.signal)}async function p(){let e=await f(`stats/folder`);u({...a,folderStats:e})}function m(e){let t=Date.now(),n=Ye(e,a,(t-l)/1e3);return l=t,n}function h(e={}){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,{...t,addresses:(t.addresses||[]).map(e=>e.replace(/\/\?.*/,``))}]))}async function g(){let[e,t]=await Promise.all([f(`cluster/pending/devices`),f(`cluster/pending/folders`)]);u({...a,pendingDevices:e||{},pendingFolders:t||{}})}async function _(){let e=await f(`events/disk`,{limit:25});e&&u({...a,globalChanges:e.slice().reverse()})}async function v(){let[e,t,n,r]=await Promise.all([f(`system/status`),f(`system/connections`),f(`system/error`),f(`system/discovery`)]);u({...a,system:e,...m(t),discoveryCache:h(r),errors:n?.errors||[]})}async function y(e){await Promise.all(e.folders.filter(e=>!e.paused).map(async e=>{let t=await f(`db/status`,{folder:e.id});u({...a,model:{...a.model,[e.id]:t}})})),await Promise.all(e.folders.flatMap(e=>e.devices||[]).filter((e,t,n)=>e.deviceID!==a.system.myID&&n.findIndex(t=>t.deviceID===e.deviceID)===t).flatMap(t=>e.folders.filter(e=>e.devices.some(e=>e.deviceID===t.deviceID)).map(async e=>{try{let n=await f(`db/completion`,{device:t.deviceID,folder:e.id});u({...a,completion:{...a.completion,[t.deviceID]:Je({...a.completion[t.deviceID],[e.id]:n})}})}catch(e){e.status!==404&&d(e)}})))}async function b(){let[e,t,r,i,o,s,c,l,p,g,v]=await Promise.all([`config`,`system/status`,`system/version`,`stats/folder`,`stats/device`,`system/connections`,`config/insync`,`system/discovery`,`cluster/pending/devices`,`cluster/pending/folders`,`system/error`].map(e=>f(e)));if(a.version.version&&a.version.version!==r.version){n?.();return}let b=Object.fromEntries(e.devices.map(e=>[e.deviceID,a.completion[e.deviceID]||{_total:100,_needBytes:0,_needItems:0}]));u({...a,online:!0,error:null,config:e,system:t,version:r,folderStats:i,deviceStats:o,...m(s),completion:b,configInSync:c.configInSync,discoveryCache:h(l),pendingDevices:p||{},pendingFolders:g||{},errors:v?.errors||[]}),await y(e),u({...a,ready:!0}),_().catch(d),f(`system/upgrade`).then(e=>u({...a,upgradeInfo:e||null})).catch(()=>u({...a,upgradeInfo:null}))}let x=ze(e,{retryMs:i,onAuthExpired:n,onOnline(){!a.online&&!c&&(c=b().catch(d).finally(()=>{c=void 0}))},onOffline(e){u({...a,online:!1,error:e})},onEvent(e){u(lt(a,e));let t=e.data;if(e.type===`DownloadProgress`){let e=Ve(t),n={...a.itemsRevision};for(let t of He(a.downloadProgress,e))n[t]=(n[t]||0)+1;u({...a,downloadProgress:e,itemsRevision:n})}[`LocalIndexUpdated`,`RemoteIndexUpdated`,`FolderErrors`].includes(e.type)&&u({...a,itemsRevision:{...a.itemsRevision,[t.folder]:(a.itemsRevision[t.folder]||0)+1}}),e.type===`FolderCompletion`&&u({...a,completion:{...a.completion,[t.device]:Je({...a.completion[t.device],[t.folder]:t})}}),e.type===`DeviceDisconnected`&&(a.connections[t.id]&&u({...a,connections:{...a.connections,[t.id]:{...a.connections[t.id],connected:!1}}}),f(`stats/device`).then(e=>u({...a,deviceStats:e})).catch(d)),e.type===`DeviceConnected`&&v().catch(d),(e.type===`PendingDevicesChanged`||e.type===`PendingFoldersChanged`)&&g().catch(d),e.type===`ConfigSaved`&&(u({...a,config:e.data}),y(e.data).catch(d),f(`config/insync`).then(e=>u({...a,configInSync:e.configInSync})).catch(d)),(e.type===`LocalIndexUpdated`||e.type===`StateChanged`&&e.data.from===`scanning`&&e.data.to===`idle`)&&(p().catch(d),_().catch(d))}});function S(){(!o||o.signal.aborted)&&(o=new AbortController,s=setInterval(()=>v().catch(d),r),x.start())}async function C(){o?.abort(),clearInterval(s),await x.stop()}async function w(t,n){try{await e.post(`db/scan`,void 0,{folder:t,sub:n},o.signal)}catch(e){throw d(e),e}}async function T(t){try{await e.put(`config`,t,o.signal),u({...a,config:t});let n=await f(`config/insync`);u({...a,configInSync:n.configInSync})}catch(e){throw d(e),e}}function E(e){let t=JSON.parse(JSON.stringify(a.config));return e(t),T(t)}function D(e,t,n){return E(r=>{for(let i of r[e])(e!==`devices`||i.deviceID!==a.system.myID)&&(t===void 0||(e===`folders`?i.id:i.deviceID)===t)&&(i.paused=n)})}function O(e){return E(t=>{t.options.unackedNotificationIDs=(t.options.unackedNotificationIDs||[]).filter(t=>t!==e)})}async function k(){let t=a.errors.at(-1)?.when||a.seenError;try{await e.post(`system/error/clear`,void 0,void 0,o.signal),u({...a,errors:[],seenError:t})}catch(e){throw d(e),e}}async function A(t,n){try{await e.delete(n?`cluster/pending/folders`:`cluster/pending/devices`,{device:t,folder:n},o.signal),await g()}catch(e){throw d(e),e}}async function j(e,t,n){await E(r=>{if(t){let i=r.devices.find(t=>t.deviceID===e);i.ignoredFolders=[...(i.ignoredFolders||[]).filter(e=>e.id!==t),{id:t,label:n.label,time:new Date().toISOString()}]}else r.remoteIgnoredDevices=[...(r.remoteIgnoredDevices||[]).filter(t=>t.deviceID!==e),{deviceID:e,name:n.name,address:n.address,time:new Date().toISOString()}]}),await A(e,t)}async function M(t){try{await e.post(`system/`+t,void 0,void 0,o.signal)}catch(e){throw d(e),e}}return{start:S,stop:C,rescan:w,refresh:v,refreshGlobalChanges:_,reportError:d,saveConfig:T,changeConfig:E,setPaused:D,dismissNotification:O,clearErrors:k,dismissPending:A,ignorePending:j,systemAction:M}}function dt(e){return(t,n={})=>{let r;if(Object.hasOwn(e,t)&&typeof e[t]==`string`)r=e[t];else{let n=String(t).split(`.`).reduce((e,t)=>e&&Object.hasOwn(e,t)?e[t]:void 0,e);r=typeof n==`string`?n:t??``}return r.replace(/{{\s*(\w+)\s*}}|{%\s*(\w+)\s*%}/g,(e,t,r)=>n[t||r]??``)}}async function ft({pageUrl:e=location.href,fetch:t=globalThis.fetch}={}){let n=await t(new URL(`assets/lang/lang-en.json`,e));if(!n.ok)throw Error(`Could not load English interface text`);return{t:dt(await n.json())}}var G=he(),pt=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),mt=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function ht(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:mt(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var gt=e=>{let t=``,n=!1;for(let r of e){if(r===`-`||r===`_`||r<=` `){n=t.length>0;continue}t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1}return t},_t=e=>{let t=gt(e);return t.charAt(0).toUpperCase()+t.slice(1)},vt={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function yt(e){return e!=null}function bt(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??vt.width,a=e.size??e.height??vt.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?pt(...c):pt(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??vt[`stroke-width`])*Number(e.size??e.width??vt.width)/Number(t.size??t.width??vt.width):t.strokeWidth??vt[`stroke-width`];return[`svg`,{...Object.entries(vt).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&yt(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&yt(t.width)&&{[r(`width`)]:t.width},...`height`in t&&yt(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}var xt=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},St=he({size:24,color:`currentColor`,strokeWidth:2,absoluteStrokeWidth:!1,nonScalingStroke:!1,class:``}),Ct=()=>V(St),wt=({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,children:s,iconNode:c=[],icon:l={node:c,aliases:[],size:24},class:u=``,...d})=>{let{size:f=24,strokeWidth:p=2,absoluteStrokeWidth:m=!1,nonScalingStroke:h=!1,color:g=`currentColor`,class:_=``}=Ct()??{},[v,y,b=[]]=bt(l,{color:e??g,width:n??t??f,height:r??t??f,strokeWidth:i??p,absoluteStrokeWidth:a??m,nonScalingStroke:o??h,className:pt(_,u),hasA11yProp:!!s||xt(d),attributes:d});return T(v,{...y},[...b.map(([e,t])=>T(e,t)),...ne(s)])};function K(e,t,n=[]){let r=typeof e==`string`?ht(e,t,n):e,i=({class:e=``,className:t=``,children:n,...i})=>T(wt,{...i,icon:r,class:pt(e,t)},n);return r.name&&(i.displayName=_t(r.name)),i}var Tt=K({name:`archive`,size:24,node:[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]}),Et=K({name:`arrow-down-up`,size:24,node:[[`path`,{d:`m3 16 4 4 4-4`,key:`1co6wj`}],[`path`,{d:`M7 20V4`,key:`1yoxec`}],[`path`,{d:`m21 8-4-4-4 4`,key:`1c9v7m`}],[`path`,{d:`M17 4v16`,key:`7dpous`}]]}),Dt=K({name:`arrow-left-right`,size:24,node:[[`path`,{d:`M8 3 4 7l4 4`,key:`9rb6wj`}],[`path`,{d:`M4 7h16`,key:`6tx8e3`}],[`path`,{d:`m16 21 4-4-4-4`,key:`siv7j2`}],[`path`,{d:`M20 17H4`,key:`h6l3hr`}]]}),Ot=K({name:`arrow-up-to-line`,size:24,node:[[`path`,{d:`M5 3h14`,key:`7usisc`}],[`path`,{d:`m18 13-6-6-6 6`,key:`1kf1n9`}],[`path`,{d:`M12 7v14`,key:`1akyts`}]]}),kt=K({name:`asterisk`,size:24,node:[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m18.065 8.496-12.125 7`,key:`1h26g9`}],[`path`,{d:`m5.94 8.504 12.125 7`,key:`k77sdm`}]]}),At=K({name:`book-open`,size:24,node:[[`path`,{d:`M12 5v16`,key:`1f6ucr`}],[`path`,{d:`M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z`,key:`1fyvmf`}]]}),jt=K({name:`calendar-days`,size:24,node:[[`path`,{d:`M8 2v3`,key:`1ioesn`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}],[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`M8 13h.01`,key:`1sbv64`}],[`path`,{d:`M12 13h.01`,key:`y0uutt`}],[`path`,{d:`M16 13h.01`,key:`wip0gl`}],[`path`,{d:`M8 17h.01`,key:`p3bg7i`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}],[`path`,{d:`M16 17h.01`,key:`ql8jdd`}]]}),Mt=K({name:`chart-bar`,size:24,node:[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`M7 16h8`,key:`srdodz`}],[`path`,{d:`M7 11h12`,key:`127s9w`}],[`path`,{d:`M7 6h3`,key:`w9rmul`}]],aliases:[`bar-chart-horizontal`]}),Nt=K({name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]}),Pt=K({name:`circle-alert`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]],aliases:[`alert-circle`]}),Ft=K({name:`circle-arrow-down`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 8v8`,key:`napkw2`}],[`path`,{d:`m8 12 4 4 4-4`,key:`k98ssh`}]],aliases:[`arrow-down-circle`]}),It=K({name:`circle-question-mark`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`help-circle`,`circle-help`]}),Lt=K({name:`circle`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]}),Rt=K({name:`clock`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]}),zt=K({name:`cloud-download`,size:24,node:[[`path`,{d:`M12 13v8l-4-4`,key:`1f5nwf`}],[`path`,{d:`m12 21 4-4`,key:`1lfcce`}],[`path`,{d:`M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284`,key:`ui1hmy`}]],aliases:[`download-cloud`]}),Bt=K({name:`cloud`,size:24,node:[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]}),Vt=K({name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]}),Ht=K({name:`download`,size:24,node:[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]}),Ut=K({name:`eye-off`,size:24,node:[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]}),Wt=K({name:`eye`,size:24,node:[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]}),Gt=K({name:`file`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]]}),Kt=K({name:`files`,size:24,node:[[`path`,{d:`M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8`,key:`14sh0y`}],[`path`,{d:`M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z`,key:`1970lx`}],[`path`,{d:`M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1`,key:`l4dndm`}]]}),qt=K({name:`folder-input`,size:24,node:[[`path`,{d:`M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1`,key:`fm4g5t`}],[`path`,{d:`M2 13h10`,key:`pgb2dq`}],[`path`,{d:`m9 16 3-3-3-3`,key:`6m91ic`}]]}),Jt=K({name:`folder-open`,size:24,node:[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]}),Yt=K({name:`folder`,size:24,node:[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]}),Xt=K({name:`globe`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]}),Zt=K({name:`handshake`,size:24,node:[[`path`,{d:`m11 17 2 2a1 1 0 1 0 3-3`,key:`efffak`}],[`path`,{d:`m14 14 2.5 2.5a1 1 0 1 0 3-3l-3.88-3.88a3 3 0 0 0-4.24 0l-.88.88a1 1 0 1 1-3-3l2.81-2.81a5.79 5.79 0 0 1 7.06-.87l.47.28a2 2 0 0 0 1.42.25L21 4`,key:`9pr0kb`}],[`path`,{d:`m21 3 1 11h-2`,key:`1tisrp`}],[`path`,{d:`M3 3 2 14l6.5 6.5a1 1 0 1 0 3-3`,key:`1uvwmv`}],[`path`,{d:`M3 4h8`,key:`1ep09j`}]]}),Qt=K({name:`hard-drive`,size:24,node:[[`path`,{d:`M10 16h.01`,key:`1bzywj`}],[`path`,{d:`M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`18tbho`}],[`path`,{d:`M21.946 12.013H2.054`,key:`zqlbp7`}],[`path`,{d:`M6 16h.01`,key:`1pmjb7`}]]}),$t=K({name:`heart`,size:24,node:[[`path`,{d:`M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5`,key:`mvr1a0`}]]}),en=K({name:`hourglass`,size:24,node:[[`path`,{d:`M5 22h14`,key:`ehvnwv`}],[`path`,{d:`M5 2h14`,key:`pdyrp9`}],[`path`,{d:`M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22`,key:`1d314k`}],[`path`,{d:`M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2`,key:`1vvvr6`}]]}),tn=K({name:`house`,size:24,node:[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]],aliases:[`home`]}),nn=K({name:`info`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]}),rn=K({name:`link`,size:24,node:[[`path`,{d:`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`,key:`1cjeqo`}],[`path`,{d:`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`,key:`19qd67`}]]}),an=K({name:`list-filter`,size:24,node:[[`path`,{d:`M2 5h20`,key:`1fs1ex`}],[`path`,{d:`M6 12h12`,key:`8npq4p`}],[`path`,{d:`M9 19h6`,key:`456am0`}]]}),on=K({name:`lock-open`,size:24,node:[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 9.9-1`,key:`1mm8w8`}]],aliases:[`unlock`]}),sn=K({name:`lock`,size:24,node:[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]}),cn=K({name:`mail`,size:24,node:[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]}),ln=K({name:`maximize-2`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]}),un=K({name:`message-circle`,size:24,node:[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}]]}),dn=K({name:`minimize-2`,size:24,node:[[`path`,{d:`m14 10 7-7`,key:`oa77jy`}],[`path`,{d:`M20 10h-6V4`,key:`mjg0md`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M4 14h6v6`,key:`rmj7iw`}]]}),fn=K({name:`monitor`,size:24,node:[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]}),pn=K({name:`network`,size:24,node:[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`4q2zg0`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`8cvhb9`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`,key:`1egb70`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`,key:`1jsf9p`}],[`path`,{d:`M12 12V8`,key:`2874zd`}]]}),mn=K({name:`pause`,size:24,node:[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]}),hn=K({name:`pencil`,size:24,node:[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]}),gn=K({name:`play`,size:24,node:[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]}),_n=K({name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]}),vn=K({name:`power`,size:24,node:[[`path`,{d:`M12 2v10`,key:`mnfbl`}],[`path`,{d:`M18.4 6.6a9 9 0 1 1-12.77.04`,key:`obofu9`}]]}),yn=K({name:`qr-code`,size:24,node:[[`rect`,{width:`5`,height:`5`,x:`3`,y:`3`,rx:`1`,key:`1tu5fj`}],[`rect`,{width:`5`,height:`5`,x:`16`,y:`3`,rx:`1`,key:`1v8r4q`}],[`rect`,{width:`5`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`1x03jg`}],[`path`,{d:`M21 16h-3a2 2 0 0 0-2 2v3`,key:`177gqh`}],[`path`,{d:`M21 21v.01`,key:`ents32`}],[`path`,{d:`M12 7v3a2 2 0 0 1-2 2H7`,key:`8crl2c`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M12 3h.01`,key:`n36tog`}],[`path`,{d:`M12 16v.01`,key:`133mhm`}],[`path`,{d:`M16 12h1`,key:`1slzba`}],[`path`,{d:`M21 12v.01`,key:`1lwtk9`}],[`path`,{d:`M12 21v-1`,key:`1880an`}]]}),bn=K({name:`recycle`,size:24,node:[[`path`,{d:`M7 19H4.815a1.83 1.83 0 0 1-1.57-.881 1.785 1.785 0 0 1-.004-1.784L7.196 9.5`,key:`x6z5xu`}],[`path`,{d:`M11 19h8.203a1.83 1.83 0 0 0 1.556-.89 1.784 1.784 0 0 0 0-1.775l-1.226-2.12`,key:`1x4zh5`}],[`path`,{d:`m14 16-3 3 3 3`,key:`f6jyew`}],[`path`,{d:`M8.293 13.596 7.196 9.5 3.1 10.598`,key:`wf1obh`}],[`path`,{d:`m9.344 5.811 1.093-1.892A1.83 1.83 0 0 1 11.985 3a1.784 1.784 0 0 1 1.546.888l3.943 6.843`,key:`9tzpgr`}],[`path`,{d:`m13.378 9.633 4.096 1.098 1.097-4.096`,key:`1oe83g`}]]}),xn=K({name:`refresh-cw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]}),Sn=K({name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]}),Cn=K({name:`settings`,size:24,node:[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]}),wn=K({name:`share-2`,size:24,node:[[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}],[`circle`,{cx:`6`,cy:`12`,r:`3`,key:`w7nqdw`}],[`circle`,{cx:`18`,cy:`19`,r:`3`,key:`1xt0gg`}],[`line`,{x1:`8.59`,x2:`15.42`,y1:`13.51`,y2:`17.49`,key:`47mynk`}],[`line`,{x1:`15.41`,x2:`8.59`,y1:`6.51`,y2:`10.49`,key:`1n3mei`}]]}),Tn=K({name:`shield-user`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M6.376 18.91a6 6 0 0 1 11.249.003`,key:`hnjrf2`}],[`circle`,{cx:`12`,cy:`11`,r:`4`,key:`1gt34v`}]]}),En=K({name:`shuffle`,size:24,node:[[`path`,{d:`m18 14 4 4-4 4`,key:`10pe0f`}],[`path`,{d:`m18 2 4 4-4 4`,key:`pucp1d`}],[`path`,{d:`M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22`,key:`1ailkh`}],[`path`,{d:`M2 6h1.972a4 4 0 0 1 3.6 2.2`,key:`km57vx`}],[`path`,{d:`M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45`,key:`os18l9`}]]}),Dn=K({name:`signal`,size:24,node:[[`path`,{d:`M2 20h.01`,key:`4haj6o`}],[`path`,{d:`M7 20v-4`,key:`j294jx`}],[`path`,{d:`M12 20v-8`,key:`i3yub9`}],[`path`,{d:`M17 20V8`,key:`1tkaf5`}],[`path`,{d:`M22 4v16`,key:`sih9yq`}]]}),On=K({name:`signpost`,size:24,node:[[`path`,{d:`M12 13v8`,key:`1l5pq0`}],[`path`,{d:`M12 3v3`,key:`1n5kay`}],[`path`,{d:`M2.354 10.354a1.207 1.207 0 0 1 0-1.708l2.06-2.06A2 2 0 0 1 5.828 6h12.344a2 2 0 0 1 1.414.586l2.06 2.06a1.207 1.207 0 0 1 0 1.708l-2.06 2.06a2 2 0 0 1-1.414.586H5.828a2 2 0 0 1-1.414-.586z`,key:`1tm261`}]]}),kn=K({name:`square-minus`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M8 12h8`,key:`1wcyev`}]],aliases:[`minus-square`]}),An=K({name:`square`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]}),jn=K({name:`tag`,size:24,node:[[`path`,{d:`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`,key:`vktsd0`}],[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`kqv944`}]]}),Mn=K({name:`thumbs-up`,size:24,node:[[`path`,{d:`M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z`,key:`emmmcr`}],[`path`,{d:`M7 10v12`,key:`1qc93n`}]]}),Nn=K({name:`trash`,size:24,node:[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]],aliases:[`trash-2`]}),Pn=K({name:`triangle-alert`,size:24,node:[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`alert-triangle`]}),Fn=K({name:`undo-2`,size:24,node:[[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}],[`path`,{d:`M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11`,key:`f3b9sd`}]]}),In=K({name:`unlink`,size:24,node:[[`path`,{d:`m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71`,key:`yqzxt4`}],[`path`,{d:`m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71`,key:`4qinb0`}],[`line`,{x1:`8`,x2:`8`,y1:`2`,y2:`5`,key:`1041cp`}],[`line`,{x1:`2`,x2:`5`,y1:`8`,y2:`8`,key:`14m1p5`}],[`line`,{x1:`16`,x2:`16`,y1:`19`,y2:`22`,key:`rzdirn`}],[`line`,{x1:`19`,x2:`22`,y1:`16`,y2:`16`,key:`ox905f`}]]}),Ln=K({name:`upload`,size:24,node:[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]}),Rn=K({name:`wrench`,size:24,node:[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]}),zn=K({name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]}),Bn=K({name:`zap`,size:24,node:[[`path`,{d:`M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z`,key:`1v7up4`}]]}),Vn=0;Array.isArray;function q(e,t,n,r,i,o){t||={};var s,c,l=t;if(`ref`in l)for(c in l={},t)c==`ref`?s=t[c]:l[c]=t[c];var u={type:e,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Vn,__i:-1,__u:0,__source:i,__self:o};if(typeof e==`function`&&(s=e.defaultProps))for(c in s)l[c]===void 0&&(l[c]=s[c]);return a.vnode&&a.vnode(u),u}var Hn={archive:Tt,"arrow-down-up":Et,"arrow-left-right":Dt,"arrow-up-to-line":Ot,asterisk:kt,book:At,calendar:jt,chart:Mt,check:Nt,dot:Lt,"circle-alert":Pt,"circle-arrow-down":Ft,help:It,info:nn,clock:Rt,cloud:Bt,"cloud-download":zt,copy:Vt,download:Ht,eye:Wt,"eye-off":Ut,file:Gt,files:Kt,folder:Yt,"folder-input":qt,"folder-open":Jt,globe:Xt,handshake:Zt,drive:Qt,heart:$t,house:tn,hourglass:en,link:rn,filter:an,lock:sn,mail:cn,maximize:ln,message:un,minimize:dn,monitor:fn,network:pn,pause:mn,pencil:hn,play:gn,plus:_n,power:vn,qrcode:yn,recycle:bn,refresh:xn,search:Sn,settings:Cn,share:wn,"shield-user":Tn,shuffle:En,signal:Dn,signpost:On,stop:An,"square-minus":kn,tag:jn,"triangle-alert":Pn,"thumbs-up":Mn,trash:Nn,undo:Fn,unlink:In,unlock:on,upload:Ln,wrench:Rn,x:zn,zap:Bn};function J({name:e,class:t=``,label:n,...r}){let i=Hn[e];if(!i)throw Error(`Unknown Syncshell icon: ${e}`);let a=n||r[`aria-label`];return q(i,{class:`syncshell-icon ${t}`.trim(),size:`1em`,strokeWidth:2.25,fill:e===`dot`?`currentColor`:`none`,focusable:`false`,"aria-hidden":a?void 0:`true`,"aria-label":n,role:a?`img`:void 0,...r})}function Y({title:e,large:t=!1,expandable:n=!1,status:r=`default`,icon:i=``,children:a,footer:o,onClose:s,onCancel:c}){let{t:l}=V(G),u=B(),[d,f]=R(!1);return z(()=>{let e=u.current;return e.showModal(),()=>e.close()},[]),q(`dialog`,{ref:u,class:`port-dialog ${t?`large`:``} ${n?`expandable`:``} ${d?`full-view`:``}`,"aria-label":l(e),onClose:s,onCancel:e=>{c&&(e.preventDefault(),c())},children:q(`div`,{class:`modal-content`,children:[q(`div`,{class:`modal-header ${r==="default"?``:`alert alert-`+r}`,children:[q(`h4`,{class:`modal-title`,children:[i&&q(`span`,{class:`panel-icon`,children:q(J,{name:i})}),l(e)]}),n&&q(`div`,{class:`modal-header-actions`,children:[q(`button`,{class:`btn btn-default btn-sm`,onClick:()=>f(!d),children:[q(J,{name:d?`minimize`:`maximize`}),`\xA0`,l(d?`Back`:`Full View`)]}),q(`button`,{class:`btn btn-default btn-sm`,onClick:()=>u.current.close(),children:[q(J,{name:`x`}),`\xA0`,l(`Close`)]})]})]}),q(`div`,{class:`modal-body`,children:a}),(!n||o)&&q(`div`,{class:`modal-footer`,children:o||q(`button`,{class:`btn btn-default btn-sm`,onClick:()=>u.current.close(),children:[q(J,{name:`x`}),`\xA0`,l(`Close`)]})})]})})}function Un(e){let t=e.config.options||{},n=e.system.urVersionMax;return e.ready&&t.urAccepted>-1&&t.urSeen!Object.hasOwn(a,e)))}function Gn(e,t,n){return e.changeConfig(e=>{n?e.options.urAccepted=t:e.options.urAccepted===0&&(e.options.urAccepted=-1),e.options.urSeen=t})}function Kn({api:e,session:t,state:n,consent:r=!1,onClose:i}){let{t:a}=V(G),[o]=R(n.system.urVersionMax||2),[s,c]=R(o),[l,u]=R(!1),[d,f]=R(!r),[p,m]=R(null),[h,g]=R(``),[_,v]=R(!1);z(()=>{if(!d)return;let t=new AbortController;return m(null),Wn(e,s,l,t.signal).then(e=>{m(e),g(``)}).catch(e=>{t.signal.aborted||g(e.message)}),()=>t.abort()},[e,s,l,d]);async function y(e){v(!0);try{await Gn(t,o,e),i()}catch(e){g(e.message)}finally{v(!1)}}return q(Y,{title:r?`Allow Anonymous Usage Reporting?`:`Anonymous Usage Reporting`,large:!0,status:`info`,icon:`chart`,onClose:i,onCancel:()=>{!r&&!_&&i()},footer:r?q(D,{children:[q(`button`,{class:`btn btn-success`,disabled:_,onClick:()=>y(!0),children:a(`Yes`)}),q(`button`,{class:`btn btn-danger`,disabled:_,onClick:()=>y(!1),children:a(`No`)})]}):q(`button`,{class:`btn btn-default`,onClick:i,children:a(`Close`)}),children:[r&&n.config.options.urAccepted>0?q(`p`,{children:a(`Anonymous usage report format has changed. Would you like to move to the new format?`)}):q(D,{children:[q(`p`,{children:a(`The encrypted usage report is sent daily. It is used to track common platforms, folder sizes, and app versions. If the reported data set is changed you will be prompted with this dialog again.`)}),q(`p`,{children:[a(`The aggregated statistics are publicly available at the URL below.`),` `,q(`a`,{href:`https://data.syncthing.net/`,target:`_blank`,rel:`noreferrer`,children:`data.syncthing.net`})]})]}),d?q(D,{children:[!r&&q(D,{children:[q(`label`,{for:`report-version`,children:a(`Version`)}),q(`select`,{id:`report-version`,class:`form-control`,value:s,onChange:e=>c(Number(e.currentTarget.value)),children:Array.from({length:o-1},(e,t)=>o-t).map(e=>q(`option`,{value:e,children:[a(`Version`),` `,e]},e))}),s>2&&q(`label`,{children:[q(`input`,{type:`checkbox`,checked:l,onChange:e=>u(e.currentTarget.checked)}),` `,a(`Show diff with previous version`)]})]}),p?q(`pre`,{class:`port-share-text`,children:JSON.stringify(p,null,2)}):!h&&q(`p`,{role:`status`,children:a(`Loading data...`)})]}):q(`button`,{class:`btn btn-default`,onClick:()=>f(!0),children:a(`Preview Usage Report`)}),h&&q(`p`,{class:`text-danger`,role:`alert`,children:h})]})}var X=e=>JSON.parse(JSON.stringify(e)),qn=(e,t)=>t.split(`.`).reduce((e,t)=>e?.[t],e);function Jn(e,t,n){let r=X(e),i=t.split(`.`),a=r;for(let e of i.slice(0,-1))a=a[e]||={};if(a[i.at(-1)]=n,t===`versioning.type`&&n){let e=n===`simple`?{keep:`5`,cleanoutDays:`0`}:n===`trashcan`?{cleanoutDays:`0`}:n===`staggered`?{maxAge:`31536000`}:{command:``};r.versioning.params={...e,...r.versioning.params},r.versioning.cleanupIntervalS??=3600,r.versioning.fsPath??=``}return r}var Z=(e,t,n=`text`,r)=>({path:e,label:t,type:n,options:r});function Yn(e,t,n,r){return e===`device`?t===`General`?[Z(`deviceID`,`Device ID`),Z(`name`,`Device Name`),Z(`group`,`Device Group`)]:[Z(`addresses`,`Addresses`,`list`),Z(`compression`,`Compression`,`select`,[[`metadata`,`Metadata Only`],[`always`,`All Data`],[`never`,`Off`]]),Z(`introducer`,`Introducer`,`checkbox`),Z(`autoAcceptFolders`,`Auto Accept`,`checkbox`),Z(`untrusted`,`Untrusted`,`checkbox`),Z(`maxRecvKbps`,`Incoming Rate Limit (KiB/s)`,`number`),Z(`maxSendKbps`,`Outgoing Rate Limit (KiB/s)`,`number`),Z(`numConnections`,`Number of Connections`,`number`)]:e===`folder`?t===`General`?[Z(`label`,`Folder Label`),Z(`group`,`Folder Group`),Z(`id`,`Folder ID`),Z(`path`,`Folder Path`)]:t===`File Versioning`?[Z(`versioning.type`,`File Versioning`,`select`,[[``,`No File Versioning`],[`trashcan`,`Trash Can`],[`simple`,`Simple`],[`staggered`,`Staggered`],[`external`,`External`]]),Z(`versioning.fsPath`,`Versions Path`),Z(`versioning.cleanupIntervalS`,`Cleanup Interval`,`number`)]:[Z(`type`,`Folder Type`,`select`,[[`sendreceive`,`Send & Receive`],[`sendonly`,`Send Only`],[`receiveonly`,`Receive Only`],[`receiveencrypted`,`Receive Encrypted`]]),Z(`fsWatcherEnabled`,`Watch for Changes`,`checkbox`),Z(`rescanIntervalS`,`Full Rescan Interval (s)`,`number`),Z(`ignorePerms`,`Ignore Permissions`,`checkbox`),Z(`blockIndexing`,`Block Indexing`,`checkbox`),Z(`order`,`File Pull Order`,`select`,[[`random`,`Random`],[`alphabetic`,`Alphabetic`],[`smallestFirst`,`Smallest First`],[`largestFirst`,`Largest First`],[`oldestFirst`,`Oldest First`],[`newestFirst`,`Newest First`]]),Z(`minDiskFree.value`,`Minimum Free Disk Space`,`number`),Z(`minDiskFree.unit`,`Unit`,`select`,[[`%`,`%`],[`kB`,`kB`],[`MB`,`MB`],[`GB`,`GB`],[`TB`,`TB`]]),Z(`syncOwnership`,`Sync Ownership`,`checkbox`),Z(`sendOwnership`,`Send Ownership`,`checkbox`),Z(`syncXattrs`,`Sync Extended Attributes`,`checkbox`),Z(`sendXattrs`,`Send Extended Attributes`,`checkbox`),Z(`xattrFilter.maxSingleEntrySize`,`Maximum Single Entry Size`,`number`),Z(`xattrFilter.maxTotalSize`,`Maximum Total Size`,`number`)]:t===`GUI`?[Z(`gui.user`,`GUI Authentication User`),Z(`gui.password`,`GUI Authentication Password`,`password`),Z(`gui.address`,`GUI Listen Address`),Z(`gui.useTLS`,`Use HTTPS for GUI`,`checkbox`),Z(`gui.unixSocketPermissions`,`Unix Socket Permissions`)]:t===`Connections`?[Z(`options.listenAddresses`,`Sync Protocol Listen Addresses`,`list`),Z(`options.globalAnnounceEnabled`,`Global Discovery`,`checkbox`),Z(`options.globalAnnounceServers`,`Global Discovery Servers`,`list`),Z(`options.localAnnounceEnabled`,`Local Discovery`,`checkbox`),Z(`options.natEnabled`,`Enable NAT traversal`,`checkbox`),Z(`options.relaysEnabled`,`Enable Relaying`,`checkbox`),Z(`options.maxRecvKbps`,`Incoming Rate Limit (KiB/s)`,`number`),Z(`options.maxSendKbps`,`Outgoing Rate Limit (KiB/s)`,`number`),Z(`options.limitBandwidthInLan`,`Limit Bandwidth in LAN`,`checkbox`)]:[Z(`devices.`+n.devices.findIndex(e=>e.deviceID===r)+`.name`,`Device Name`),Z(`options.startBrowser`,`Start Browser`,`checkbox`),Z(`options.minHomeDiskFree.value`,`Minimum Free Disk Space`,`number`),Z(`options.minHomeDiskFree.unit`,`Unit`,`select`,[[`%`,`%`],[`kB`,`kB`],[`MB`,`MB`],[`GB`,`GB`],[`TB`,`TB`]])]}function Xn(e,t){let n=qn(e,t.path);return t.type===`list`?(n||[]).join(`, `):n??``}function Zn(e,t){return e.type===`checkbox`?t.checked:e.type===`number`?t.value===``?0:Number(t.value):e.type===`list`?t.value.split(/[,\s]+/).map(e=>e.trim()).filter(Boolean):t.value}function Qn(e){return e===``?[]:e.split(` -`)}async function $n({session:e,api:t,state:n,kind:r,draft:i,isNew:a,shares:o,defaults:s=!1,ignores:c=[]}){let l=er(i,r);if(s)return e.changeConfig(e=>{e.defaults[r]=l,r===`folder`&&(e.defaults.ignores.lines=c)});if(r===`device`){let e=await t.get(`svc/deviceid`,{id:l.deviceID});if(e.error)throw Error(e.error);if(l.deviceID=e.id||l.deviceID,n.config.folders.some(e=>e.type!==`receiveencrypted`&&(l.untrusted||n.pendingFolders?.[e.id]?.offeredBy?.[l.deviceID]?.remoteEncrypted)&&o[e.id]?.selected&&!o[e.id]?.password))throw Error(`Encryption Password is required for an untrusted device.`);if(a&&n.config.devices.some(e=>e.deviceID===l.deviceID))throw Error(`A device with that ID is already added.`)}else{if(!l.id.trim())throw Error(`The folder ID cannot be blank.`);if(!l.path.trim())throw Error(`The folder path cannot be blank.`);if(a&&n.config.folders.some(e=>e.id===l.id))throw Error(`The folder ID must be unique.`);if(l.devices.some(e=>e.deviceID===n.system.myID)||l.devices.push({deviceID:n.system.myID}),l.versioning?.type||(l.versioning={type:``}),l.versioning.type===`external`&&!l.versioning.params?.command?.trim())throw Error(`External Versioning Command cannot be blank.`);if(l.type!==`receiveencrypted`&&l.devices.some(e=>(n.config.devices.find(t=>t.deviceID===e.deviceID)?.untrusted||n.pendingFolders?.[l.id]?.offeredBy?.[e.deviceID]?.remoteEncrypted)&&!e.encryptionPassword))throw Error(`Encryption Password is required for an untrusted device.`)}return e.changeConfig(e=>{let t=r===`device`?`devices`:`folders`,n=r===`device`?`deviceID`:`id`;if(e[t]=[...e[t].filter(e=>e[n]!==l[n]),l],r===`device`)for(let t of e.folders){let e=t.devices.some(e=>e.deviceID===l.deviceID);o[t.id]?.selected&&!e&&t.devices.push({deviceID:l.deviceID,encryptionPassword:o[t.id].password||``}),o[t.id]?.selected&&e&&(t.devices.find(e=>e.deviceID===l.deviceID).encryptionPassword=o[t.id].password||``),!o[t.id]?.selected&&e&&(t.devices=t.devices.filter(e=>e.deviceID!==l.deviceID))}})}function er(e,t){let n=JSON.parse(JSON.stringify(e));if(t===`folder`){n.xattrFilter&&(n.xattrFilter.entries=(n.xattrFilter.entries||[]).filter(e=>e.match!==``));let e=n.versioning||{};for(let t of e.type===`simple`?[`keep`,`cleanoutDays`]:e.type===`trashcan`?[`cleanoutDays`]:e.type===`staggered`?[`maxAge`]:[]){let n=Number(e.params?.[t]);if(!Number.isFinite(n)||n<+(t===`keep`)||e.params[t]===``)throw Error(t===`keep`?`You must keep at least one version.`:`A negative number of days does not make sense.`)}}return n}function tr(e,t,n=`/`){return e?e.replace(/[\\/]+$/,``)+n+t:``}function nr(e,t,n,{kind:r,isNew:i,defaults:a,autoPath:o,config:s,system:c}){let l=Jn(e,t,n);return r===`device`&&t===`untrusted`&&n&&(l.introducer=!1,l.autoAcceptFolders=!1),r===`folder`&&(t===`type`&&(l.fsWatcherEnabled=n!==`receiveencrypted`,n===`receiveencrypted`&&(l.ignorePerms=!0,l.versioning={type:``}),(i||a)&&(l.blockIndexing=[`sendreceive`,`receiveonly`].includes(n))),[`type`,`fsWatcherEnabled`].includes(t)&&[60,3600,86400].includes(l.rescanIntervalS)&&(l.rescanIntervalS=l.type===`receiveencrypted`?86400:l.fsWatcherEnabled?3600:60),i&&o&&[`label`,`id`].includes(t)&&s.defaults.folder.path&&(l.path=tr(s.defaults.folder.path,l.label||l.id,c.pathSeparator))),l}function rr(e,t,{kind:n,isNew:r,defaults:i,myID:a}){let o={...e};return n===`device`?(o.disabled=[`introducer`,`autoAcceptFolders`].includes(e.path)&&t.untrusted||e.path===`addresses`&&t.deviceID===a,o):(e.path.startsWith(`versioning.`)&&e.path!==`versioning.type`&&![`simple`,`trashcan`,`staggered`].includes(t.versioning?.type)&&(o.hidden=!0),e.path.startsWith(`xattrFilter.`)&&!t.syncXattrs&&!t.sendXattrs&&(o.hidden=!0),e.path===`type`&&!r&&!i&&(o.disabled=t.type===`receiveencrypted`,o.options=e.options.filter(([e])=>e!==`receiveencrypted`||t.type===e)),o.disabled||=[`fsWatcherEnabled`,`ignorePerms`,`versioning.type`].includes(e.path)&&t.type===`receiveencrypted`||e.path===`order`&&t.type===`sendonly`||[`syncOwnership`,`syncXattrs`].includes(e.path)&&[`sendonly`,`receiveencrypted`].includes(t.type)||e.path===`sendOwnership`&&([`receiveonly`,`receiveencrypted`].includes(t.type)||t.syncOwnership)||e.path===`sendXattrs`&&([`receiveonly`,`receiveencrypted`].includes(t.type)||t.syncXattrs),e.path===`sendOwnership`&&(o.checked=t.sendOwnership||t.syncOwnership),e.path===`sendXattrs`&&(o.checked=t.sendXattrs||t.syncXattrs),o)}function ir(e=[]){if(e.some(e=>e.match===``))return e;let t=e.slice();return t.splice(t.at(-1)?.match===`*`?t.length-1:t.length,0,{match:``,permit:!1}),t}function ar(e=[]){return e.length?e.at(-1).match===`*`?``:`deny`:`permit`}function or(e=[]){return e.length&&(e.length!==1||e[0].match!==`*`)&&e.every(e=>!e.permit)?`Hint: only deny-rules detected while the default is deny. Consider adding "permit any" as last rule.`:``}function sr(e,t,n){if(!e.path)return null;let r=e=>e.replace(/^~(?=[\\/])/,n.tilde||`~`).split(n.pathSeparator||`/`).filter((e,t,n)=>e||t!==n.length-1),i=r(e.path);for(let n of t.folders.filter(t=>t.id!==e.id)){let e=r(n.path);if(e.length<=i.length&&e.every((e,t)=>e===i[t]))return{folder:n,type:`subdirectory`};if(i.length<=e.length&&i.every((t,n)=>t===e[n]))return{folder:n,type:`parent directory`}}return null}var cr={channelNotification:{paragraphs:[`Automatic upgrade now offers the choice between stable releases and release candidates.`,`Release candidates contain the latest features and fixes. They are similar to the traditional bi-weekly Syncthing releases.`,`Stable releases are delayed by about two weeks. During this time they go through testing as release candidates.`,`You can read more about the two release channels at the link below.`,`You can change your choice at any time in the Settings dialog.`],severity:`success`,title:`Automatic upgrades`,actions:[`Settings`,`OK`],link:`https://docs.syncthing.net/users/releases.html`},fsWatcherNotification:{paragraphs:[`Continuously watching for changes is now available within Syncthing. This will detect changes on disk and issue a scan on only the modified paths. The benefits are that changes are propagated quicker and that less full scans are required.`,`Do you want to enable watching for changes for all your folders?`,`Additionally the full rescan interval will be increased (times 60, i.e. new default of 1h). You can also configure it manually for every folder later after choosing No.`,`Warning: If you are using an external watcher like {%syncthingInotify%}, you should make sure it is deactivated.`],severity:`success`,title:`Watching for Changes`,actions:[`Yes`,`No`],link:`https://docs.syncthing.net/users/syncing.html#scanning`},crAutoEnabled:{paragraphs:[`Syncthing now supports automatically reporting crashes to the developers. This feature is enabled by default.`],severity:`success`,title:`Automatic Crash Reporting`,actions:[`Disable Crash Reporting`,`OK`],link:`https://docs.syncthing.net/users/crashrep.html`},crAutoDisabled:{paragraphs:[`Syncthing now supports automatically reporting crashes to the developers. This feature is enabled by default.`,`However, your current settings indicate you might not want it enabled. We have disabled automatic crash reporting for you.`],severity:`success`,title:`Automatic Crash Reporting`,actions:[`Enable Crash Reporting`,`OK`],link:`https://docs.syncthing.net/users/crashrep.html`},authenticationUserAndPassword:{paragraphs:[`Username/Password has not been set for the GUI authentication. Please consider setting it up.`,`If you want to prevent other users on this computer from accessing Syncthing and through it your files, consider setting up authentication.`],severity:`success`,title:`GUI Authentication: Set User and Password`,actions:[`Settings`,`OK`]}};function lr(e,t){if(e.paused)return`paused`;if(!t?.state)return`unknown`;let n=String(t.state);return n===`error`?`stopped`:n===`idle`?t.needTotalItems>0?`outofsync`:t.errors===0?[`receiveonly`,`receiveencrypted`].includes(e.type)&&t.receiveOnlyTotalItems>0?e.type===`receiveonly`?`localadditions`:`localunencrypted`:e.devices.length<=1?`unshared`:n:`faileditems`:n}function ur(e){return[`idle`,`localadditions`].includes(e)?`success`:e===`paused`?`default`:[`syncing`,`sync-preparing`,`scanning`,`cleaning`,`starting`].includes(e)?`primary`:[`stopped`,`outofsync`,`error`,`faileditems`,`localunencrypted`].includes(e)?`danger`:[`unshared`,`scan-waiting`,`sync-waiting`,`clean-waiting`].includes(e)?`warning`:`info`}function dr(e){let t=ur(e);return t===`primary`||[`outofsync`,`localadditions`].includes(e)?`warning`:t}function fr(e,t){return!(!t?.state||e.paused||lr(e,t)===`idle`&&t.globalFiles===t.localFiles&&t.globalDirectories===t.localDirectories&&t.globalBytes===t.localBytes)}function pr(e,t){return e===t?99:Math.floor(100*e/t)}function mr(e){return!e||e.needTotalItems===0?100:e.needBytes===0&&e.needTotalItems>0?95:pr(e.inSyncBytes,e.globalBytes)}function hr(e){let t={bytes:0,directories:0,files:0};for(let n of Object.values(e))t.bytes+=n.localBytes,t.directories+=n.localDirectories,t.files+=n.localFiles;return t}function gr(e){let t=[],n=e.config,r=n.gui||{},i=e.system.guiAddressUsed,a=r.authMode===`ldap`||r.user&&r.password;i&&!i.startsWith(`127.`)&&!i.startsWith(`[::1]:`)&&!i.startsWith(`/`)&&!a&&!r.insecureAdminAccess&&t.push({id:`openNoAuth`,severity:`danger`,title:`Danger!`,paragraphs:[`The Syncthing admin interface is configured to allow remote access without a password.`,`This can easily give hackers access to read and change any files on your computer.`,`Please set a GUI Authentication User and Password in the Settings dialog.`],actions:[`Settings`]}),e.configInSync||t.push({id:`restart`,severity:`warning`,title:`Restart Needed`,paragraphs:[`The configuration has been saved but not activated. Syncthing must restart to activate the new configuration.`],actions:[`Restart`]});for(let e of n.options?.unackedNotificationIDs||[])e===`authenticationUserAndPassword`&&a||cr[e]&&t.push({id:e,...cr[e],params:{syncthingInotify:`syncthing-inotify`}});for(let[n,r]of Object.entries(e.pendingDevices))t.push({id:`device-`+n,kind:`device`,device:n,pending:r,severity:`warning`,title:`New Device`,time:r.time,paragraphs:[`Device "{%name%}" ({%device%} at {%address%}) wants to connect. Add new device?`],params:{name:r.name,device:n,address:r.address},actions:[`Add Device`,`Ignore`,`Dismiss`]});for(let[r,i]of Object.entries(e.pendingFolders))for(let[e,a]of Object.entries(i.offeredBy||{})){let i=n.folders.find(e=>e.id===r);t.push({id:`folder-`+r+`-`+e,kind:`folder`,folder:r,device:e,pending:a,folderConfig:i,severity:`warning`,title:i?`Share Folder`:`New Folder`,time:a.time,paragraphs:[a.label?`{%device%} wants to share folder "{%folderlabel%}" ({%folder%}).`:`{%device%} wants to share folder "{%folder%}".`,i?`Share this folder?`:`Add new folder?`],params:{device:W(n.devices.find(t=>t.deviceID===e)),folder:r,folderlabel:a.label},actions:[i?`Share`:`Add`,`Ignore`,`Dismiss`]})}let o=e.errors.filter(t=>!e.seenError||t.when>e.seenError);o.length&&t.push({id:`errors`,severity:`warning`,title:`Notice`,errors:o.map(e=>({...e,message:n.devices.reduce((e,t)=>e.replace(t.deviceID,W(t)),e.message)})),actions:[`OK`]});let s=n.folders.filter(t=>t.fsWatcherEnabled&&!t.paused&&e.model[t.id]?.watchError&&lr(t,e.model[t.id])!==`stopped`).map(t=>({name:t.label||t.id,error:e.model[t.id].watchError}));return s.length&&t.push({id:`watchers`,severity:`warning`,title:`Filesystem Watcher Errors`,watchers:s,paragraphs:[`For the following folders an error occurred while starting to watch for changes. It will be retried every minute, so the errors might go away soon. If they persist, try to fix the underlying issue and ask for help if you can't.`],link:`https://forum.syncthing.net`,actions:[]}),t}async function _r(e,t,n,r){if(n===`Settings`){r({type:`settings`}),t.id===`channelNotification`&&await e.dismissNotification(t.id);return}if(n===`Restart`)return r({type:`restart`});if(n===`Ignore`)return e.ignorePending(t.device,t.folder,t.pending);if(n===`Dismiss`)return e.dismissPending(t.device,t.folder);if(n===`Share`&&t.folderConfig?.type!==`receiveencrypted`&&t.pending.remoteEncrypted){let e=JSON.parse(JSON.stringify(t.folderConfig));return e.devices.some(e=>e.deviceID===t.device)||e.devices.push({deviceID:t.device,encryptionPassword:``}),r({type:`edit-folder`,folder:e,tab:`sharing`})}if(n===`Share`)return e.changeConfig(e=>{let n=e.folders.find(e=>e.id===t.folder);n.devices.some(e=>e.deviceID===t.device)||n.devices.push({deviceID:t.device})});if(n===`Add`||n===`Add Device`){r({type:t.kind===`folder`?`add-folder`:`add-device`,...t});return}return t.id===`errors`?e.clearErrors():(n===`Yes`&&t.id===`fsWatcherNotification`&&await e.changeConfig(e=>{for(let t of e.folders)t.fsWatcherEnabled||(t.fsWatcherEnabled=!0,t.rescanIntervalS&&=Math.min(86400,t.rescanIntervalS*60))}),(n===`Enable Crash Reporting`||n===`Disable Crash Reporting`)&&await e.changeConfig(e=>{e.options.crashReportingEnabled=n.startsWith(`Enable`)}),e.dismissNotification(t.id))}var vr=0;function yr(e,t){let n;t.id=`syncshell-tooltip-`+ ++vr;function r(){if(!t.matches(`:popover-open`))return;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=n.top>r.height+8;t.classList.toggle(`top`,i),t.classList.toggle(`bottom`,!i),t.style.top=(i?n.top-r.height-5:n.bottom+5)+`px`,t.style.left=Math.max(8,Math.min(innerWidth-r.width-8,n.left+n.width/2-r.width/2))+`px`}function i(){clearTimeout(n),n=setTimeout(()=>{t.showPopover(),e.setAttribute(`aria-describedby`,t.id),r()},400)}function a(){clearTimeout(n),t.hidePopover(),e.removeAttribute(`aria-describedby`)}function o(e){e.key===`Escape`&&a()}e.addEventListener(`mouseenter`,i),e.addEventListener(`mouseleave`,a),e.addEventListener(`focus`,i),e.addEventListener(`blur`,a),e.addEventListener(`keydown`,o),window.addEventListener(`resize`,r),window.addEventListener(`scroll`,r,!0);let s=new MutationObserver(r);return s.observe(t,{childList:!0,characterData:!0,subtree:!0}),()=>{clearTimeout(n),s.disconnect(),e.removeEventListener(`mouseenter`,i),e.removeEventListener(`mouseleave`,a),e.removeEventListener(`focus`,i),e.removeEventListener(`blur`,a),e.removeEventListener(`keydown`,o),window.removeEventListener(`resize`,r),window.removeEventListener(`scroll`,r,!0)}}function Q({icon:e=``,iconClass:t=``,label:n,text:r=``,prefix:i=``,kind:a=`help`,triggerText:o,tail:s=!1,children:c}){let{t:l}=V(G),u=B(),d=B();return z(()=>yr(u.current,d.current),[]),q(D,{children:[q(`span`,{ref:u,class:e?`${t} folder-${a===`count`?`count`:`help`}-icon`:s?`folder-tail`:`folder-text`,tabIndex:`0`,role:e?`img`:void 0,"aria-label":o===void 0?l(n):n,children:[e&&q(J,{name:e}),o!==void 0&&q(`bdi`,{dir:`ltr`,children:o})]}),q(`div`,{ref:d,popover:`manual`,role:`tooltip`,class:`tooltip in port-tooltip folder-${a}-tooltip`,children:[q(`div`,{class:`tooltip-arrow`}),q(`div`,{class:`tooltip-inner`,children:c||q(D,{children:[i?l(i)+`. `:``,o===void 0?l(r):r]})})]})]})}function br({encrypted:e=!1,remoteState:t=``}){return q(D,{children:[e&&q(Q,{icon:`lock`,label:`Encrypted`,text:`Encrypted`}),t===`paused`&&q(Q,{icon:`pause`,label:`Paused`,text:`The remote device has paused this folder.`}),t===`notSharing`&&q(Q,{icon:`triangle-alert`,label:`Not shared`,text:`The remote device has not accepted sharing this folder.`})]})}function xr(e,t={},n){let r=[];return e.type===`sendonly`&&n===`outofsync`&&r.push(`override`),[`receiveonly`,`receiveencrypted`].includes(e.type)&&t.receiveOnlyTotalItems>0&&[`outofsync`,`faileditems`,`localadditions`].includes(n)&&r.push(`revert`),r}var Sr={"remove-folder":{title:`Remove Folder`,button:`Yes`,description:`Are you sure you want to remove folder {%label%}?`,detail:`No files will be deleted as a result of this operation.`},"remove-device":{title:`Remove Device`,button:`Yes`,description:`Are you sure you want to remove device {%name%}?`},override:{title:`Override Changes`,button:`Override`,description:`The folder content on other devices will be overwritten to become identical with this device. Files not present here will be deleted on other devices.`,detail:`Are you sure you want to override all remote changes?`},revert:{title:`Revert Local Changes`,button:`Revert`,description:`The folder content on this device will be overwritten to become identical with other devices. Files newly added here will be deleted.`,detail:`Are you sure you want to revert all local changes?`}};async function Cr(e,t,n){if(e.type===`remove-folder`)return t.changeConfig(t=>{t.folders=t.folders.filter(t=>t.id!==e.folder.id)});if(e.type===`remove-device`)return t.changeConfig(t=>{t.devices=t.devices.filter(t=>t.deviceID!==e.device.deviceID);for(let n of t.folders)n.devices=n.devices.filter(t=>t.deviceID!==e.device.deviceID)});if(e.type===`override`||e.type===`revert`)return n.post(`db/`+e.type,void 0,{folder:e.folder.id});throw Error(`Unknown folder action`)}function wr(e){switch(e){case`clean-waiting`:case`scan-waiting`:case`sync-preparing`:case`sync-waiting`:case`starting`:return`hourglass`;case`cleaning`:return`recycle`;case`faileditems`:case`localunencrypted`:case`outofsync`:return`circle-alert`;case`idle`:case`localadditions`:return`check`;case`paused`:return`pause`;case`scanning`:return`search`;case`stopped`:return`stop`;case`syncing`:return`refresh`;case`unknown`:return`help`;case`unshared`:return`unlink`}}function Tr(e){switch(e){case`clean-waiting`:return`Waiting to Clean`;case`cleaning`:return`Cleaning Versions`;case`faileditems`:return`Failed Items`;case`idle`:return`Up to Date`;case`starting`:return`Starting`;case`localadditions`:return`Local Additions`;case`localunencrypted`:return`Unexpected Items`;case`outofsync`:return`Out of Sync`;case`paused`:return`Paused`;case`scan-waiting`:return`Waiting to Scan`;case`scanning`:return`Scanning`;case`stopped`:return`Stopped`;case`sync-preparing`:return`Preparing to Sync`;case`sync-waiting`:return`Waiting to Sync`;case`syncing`:return`Syncing`;case`unknown`:return`Unknown`;case`unshared`:return`Unshared`}}var Er={sendreceive:`Send & Receive`,sendonly:`Send Only`,receiveonly:`Receive Only`,receiveencrypted:`Receive Encrypted`},Dr={random:`Random`,alphabetic:`Alphabetic`,smallestFirst:`Smallest First`,largestFirst:`Largest First`,oldestFirst:`Oldest First`,newestFirst:`Newest First`},Or={trashcan:`Trash Can`,simple:`Simple`,staggered:`Staggered`,external:`External`};function kr(e){if(!e)return``;let t=Math.ceil((e.total-e.current)/e.rate/10)*10,n=0,r=0,i=[];if(t>=86400){if(n=Math.floor(t/86400),n>31)return`> 1 month`;i.push(n+`d`),t%=86400}t>3600&&(r=Math.floor(t/3600),i.push(r+`h`),t%=3600);let a=new Date(new Date(1970,0,1).setSeconds(t));return n===0&&i.push(a.getMinutes()+`m`),n===0&&r===0&&i.push(String(a.getSeconds()).padStart(2,`0`)+`s`),i.join(` `)}function Ar(e){let t;function n(){if(t=void 0,!e.getClientRects().length)return;let n=0;e.querySelectorAll(`details > summary, details > table > tbody > tr, .remote-status tr`).forEach(e=>{let t=e.closest(`details`);(e.tagName===`SUMMARY`||!t||t.open)&&e.getClientRects().length&&getComputedStyle(e).display!==`none`&&e.classList.toggle(`section-stripe`,n++%2==1)})}function r(){t||=requestAnimationFrame(n)}let i=new MutationObserver(r);i.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`open`,`hidden`]});let a=new ResizeObserver(r);return a.observe(e),e.addEventListener(`toggle`,r,!0),r(),()=>{i.disconnect(),a.disconnect(),cancelAnimationFrame(t),e.removeEventListener(`toggle`,r,!0)}}var jr={"Global/local State":{icon:`dot`,help:`Shows the global totals alongside the folder status. Separate rows show global and local contents when details are needed; ignore patterns can make the totals differ even when up to date.`},"Global State":{icon:`globe`,help:`The latest known versions of files across the sharing devices. These totals describe the contents this folder would have when fully synchronized, before local ignore rules.`},"Local State":{icon:`house`,help:`The files and data Syncthing currently tracks in this folder on this device. These totals can differ from the global contents during synchronization or because of ignore patterns.`},"Out of Sync Items":{icon:`arrow-left-right`,help:`Items still needed by this remote device across shared folders, including pending deletions. Click the count to view the remaining work.`},"Altered by ignoring deletes.":{icon:`help`,help:`Deletion requests from other devices are ignored, so files deleted elsewhere can remain in this folder.`},"Last Scan":{icon:`clock`,help:`When Syncthing last scanned this folder for local changes. This is a scan timestamp, not the time of the last file transfer.`},Error:{icon:`triangle-alert`,help:`The problem Syncthing reports for this folder. Hover over the message to read the full details.`},"Failed Items":{icon:`circle-alert`,help:`Items Syncthing could not synchronize. Click the count to see the affected paths and their individual errors.`},"Locally Changed Items":{icon:`circle-alert`,help:`Local changes in a receive-only folder that are not sent to other devices, or unexpected local items in a receive-encrypted folder. Click the value to inspect them.`},"Scan Time Remaining":{icon:`hourglass`,help:`Estimated time left for the current scan, calculated from the remaining data and current scanning rate. This estimates scanning, not synchronization.`},"Latest Change":{icon:`arrow-left-right`,help:`The most recent file synchronized here, as reported by Syncthing. Hover over the filename for its full path, update or deletion, and timestamp.`},Rescans:{icon:`refresh`,help:`Detects local changes through periodic full scans and filesystem watching. The clock shows the scan interval; the eye shows whether watching is enabled.`},"File Versioning":{icon:`files`,help:`Keeps older copies when changes from another device replace or delete files here. It does not archive changes you make locally; retention depends on the selected versioning method.`},"Ignore Permissions":{icon:`square-minus`,help:`File permission changes are not synchronized for this folder. File contents still synchronize normally.`},"Folder Path":{icon:`folder-open`,help:`Full path to your Syncthing folder on the file system of this device. Hover over the value to see the complete path.`},"Folder Type":{icon:`folder`,help:`Controls how changes travel: Send and Receive exchanges changes both ways; Send Only publishes local changes; Receive Only accepts remote changes without publishing local edits; Receive Encrypted stores protected data without decrypting it.`},"Folder ID":{icon:`info`,help:`Identifies this shared folder across devices. Every device sharing it must use exactly the same ID, including letter case.`},"Block Indexing":{icon:`book`,help:`Keeps an index of data blocks so Syncthing can reuse existing content from other files, including other folders. Disabling it saves database space but can increase transfer bandwidth.`},"File Pull Order":{icon:`arrow-down-up`,help:`Sets the download priority for files needed from other devices. Ordering applies only to files already discovered during scanning.`},"Local State (Total)":{icon:`house`,help:`Local files and data indexed across all folders on this device. These totals do not indicate whether every folder is synchronized.`},Listeners:{icon:`network`,help:`Listening services that accept incoming device connections. Shows working services out of the total. Click the count for addresses and errors.`},Discovery:{icon:`signpost`,help:`Services used to find other devices. Shows working discovery methods out of the total. Click the count for details; discovery success does not mean a device is connected.`},Uptime:{icon:`clock`,help:`Time since this Syncthing process started. Reloading the Web UI does not reset it.`},Identification:{icon:`qrcode`,help:`Show the full device ID and QR code for this remote device.`},Version:{icon:`tag`,help:`Syncthing client version reported by this remote device.`},"Device Status":{icon:`help`,help:`Connection and synchronization status of this remote device.`},"Sync Status":{icon:`cloud`,help:`Last known synchronization progress across folders shared with this device. An offline device may have changed since its last connection.`},Address:{icon:`link`,help:`Address used for the current connection, or configured and discovered addresses to try while disconnected. Connection errors appear beside each address.`},"Last seen":{icon:`eye`,help:`When this device was last seen connected. Never means no previous connection is recorded.`},"Number of Connections":{icon:`shuffle`,help:`Current connections to this device: one primary connection plus any additional connections.`},"Introduced By":{icon:`handshake`,help:`The device that introduced this peer to this machine.`},Compression:{icon:`minimize`,help:`Whether messages sent to this device are compressed: metadata only, all data, or off.`},"Allowed Networks":{icon:`filter`,help:`Connections to this device are restricted to these networks.`},Introducer:{icon:`thumbs-up`,help:`Automatically follows the devices this peer shares folders with.`},"Auto Accept":{icon:`folder-input`,help:`Automatically accepts folders offered by this device and adds them locally using the default folder path.`},Untrusted:{icon:`shield-user`,help:`Only encrypted folder data may be shared with this device.`},Folders:{icon:`folder`,help:`Folders this machine shares with this device. Select a folder to edit its sharing settings.`},Encrypted:{icon:`lock`,help:`Folder data is encrypted for this remote device.`},"Not Sharing":{icon:`circle-alert`,help:`The remote device has not accepted sharing this folder.`},Paused:{icon:`pause`,help:`The remote device has paused this folder.`},"Remote GUI":{icon:`monitor`,help:`Remote GUI address is unavailable. A direct connection to this device is required.`},Pause:{icon:`pause`,help:`Temporarily pause synchronization with this remote device.`},Resume:{icon:`play`,help:`Resume synchronization with this remote device.`},Edit:{icon:`pencil`,help:`Edit the configuration for this remote device.`}};function Mr({info:e,prefix:t=`global`}){let{t:n}=V(G),r=e?.[t+`Files`],i=e?.[t+`Directories`],a=e?.[t+`Bytes`],o=q(D,{children:[q(`div`,{children:[q(`span`,{children:[q(J,{name:`copy`,class:`icon-fixed`}),` `,n(`Files`),`:`]}),q(`span`,{children:(r||0).toLocaleString()})]}),q(`div`,{children:[q(`span`,{children:[q(J,{name:`folder`,class:`icon-fixed`}),` `,n(`Folders`),`:`]}),q(`span`,{children:(i||0).toLocaleString()})]}),q(`div`,{children:[q(`span`,{children:[q(J,{name:`drive`,class:`icon-fixed`}),` `,n(`Total`),`:`]}),q(`span`,{children:[`~`,H(a,!0),`B`]})]})]});return q(D,{children:[q(Q,{icon:`copy`,label:`Files`,kind:`count`,children:o}),`\xA0`,We(r),` `,q(Q,{icon:`drive`,label:`Total`,kind:`count`,children:o}),`\xA0~`,H(a,!0),`B`]})}function $({label:e,rowClass:t=``,icon:n=``,help:r=``,totalBytes:i,children:a}){let{t:o}=V(G),s={icon:n||jr[e]?.icon||`info`,help:r||jr[e]?.help||``};return q(`tr`,{class:t,children:[q(`th`,{children:[q(Q,{icon:s.icon,label:e,text:s.help,children:i!==void 0&&q(D,{children:[o(s.help),q(`br`,{}),o(`Total`),`: ~`,H(i,!0),`B`]})}),`\xA0`,q(`span`,{children:o(e)})]}),q(`td`,{class:`text-right`,children:a})]})}function Nr({config:e}){let{t}=V(G),n=e.fsPath||`.stversions`,r=e=>Ge(e,`s`);return q(D,{children:[q(`span`,{title:e.type===`external`?e.params.command:``,children:t(Or[e.type]||``)}),e.type!==`external`&&q(D,{children:[[`trashcan`,`simple`].includes(e.type)&&q(`span`,{title:t(`Clean out after`),children:[` `,q(J,{name:`calendar`}),`\xA0`,Number(e.params.cleanoutDays)===0?t(`Disabled`):Ge(e.params.cleanoutDays*86400,`d`)]}),e.type===`simple`&&q(`span`,{title:t(`Keep Versions`),children:[` `,q(J,{name:`archive`}),`\xA0`,e.params.keep]}),e.type===`staggered`&&q(`span`,{title:t(`Maximum Age`),children:[` `,q(J,{name:`calendar`}),`\xA0`,Number(e.params.maxAge)===0?t(`Forever`):r(e.params.maxAge)]}),q(`span`,{title:t(`Cleanup Interval`),children:[` `,q(J,{name:`recycle`}),`\xA0`,e.cleanupIntervalS===0?t(`Disabled`):r(e.cleanupIntervalS)]}),q(`span`,{class:`folder-change`,children:[q(J,{name:`folder-open`}),q(Q,{label:n,text:n,triggerText:n.split(/[\\/]/).at(-1),tail:!0})]})]})]})}function Pr(e,t,n){let r=Math.ceil(t/n),i=r>9&&e>5?e>r-5?r-9+1:e-5+1:1;return Array.from({length:Math.min(9,r)},(t,n)=>n===0?1:n===8?r:r>9&&(n===1&&e>5||n===7&&e<=r-5)?`...`:i+n)}function Fr({page:e,perpage:t,total:n,onPage:r,onSize:i}){let{t:a}=V(G),o=Pr(e,n,t),s=Math.ceil(n/t);function c(t,n){t.preventDefault(),typeof n==`number`&&n>=1&&n<=s&&n!==e&&r(n)}return q(D,{children:[o.length>1&&q(`ul`,{class:`pagination`,children:[q(`li`,{class:e===1?`disabled`:``,children:q(`a`,{href:`#previous`,"aria-label":a(`Previous`),"aria-disabled":e===1,onClick:t=>c(t,e-1),children:`‹`})}),o.map((t,n)=>q(`li`,{class:t===e?`active`:t===`...`?`disabled`:``,children:q(`a`,{href:`#page-${n}`,"aria-current":t===e?`page`:void 0,"aria-disabled":t===`...`,onClick:e=>c(e,t),children:t})},n)),q(`li`,{class:e===s?`disabled`:``,children:q(`a`,{href:`#next`,"aria-label":a(`Next`),"aria-disabled":e===s,onClick:t=>c(t,e+1),children:`›`})})]}),q(`ul`,{class:`pagination pull-right`,children:[10,25,50].map(a=>q(`li`,{class:a===t?`active`:``,children:q(`a`,{href:`#page-size`,onClick:t=>{t.preventDefault(),r(Math.min(e,Math.max(1,Math.ceil(n/a)))),i(a)},children:a})},a))}),q(`div`,{class:`clearfix`})]})}function Ir({progress:e,legend:t=!1}){let{t:n}=V(G);return q(`div`,{class:`progress`,role:t?void 0:`progressbar`,"aria-label":t?void 0:n(`Downloading`),"aria-valuemin":t?void 0:0,"aria-valuemax":t?void 0:e.bytesTotal,"aria-valuenow":t?void 0:e.bytesDone,children:[Be.map(([r,i,a])=>q(`div`,{class:`progress-bar ${a?`progress-bar-`+a:``}`,style:{width:(t?20:Number.isFinite(e[r])?e[r]:0)+`%`},title:n(i),children:t&&q(`span`,{class:`show`,children:n(i)})},r)),!t&&q(`span`,{class:`show frontal`,children:[H(e.bytesDone,!0),`B / `,H(e.bytesTotal,!0),`B`]})]})}var Lr={need:`db/need`,failed:`folder/errors`,local:`db/localchanged`},Rr={need:`Out of Sync Items`,failed:`Failed Items`,local:`Locally Changed Items`};function zr(e){return[`progress`,`queued`,`rest`].flatMap(t=>(e[t]||[]).map(e=>{let n=e.flags,r=(n&20480)==20480?`Del (dir)`:n&4096?`Del`:n&16384?`Update`:`Sync`;return{...e,type:t,action:r}}))}function Br(e,t){return e===`need`?zr(t):e===`failed`?t.errors||[]:t.files||[]}function Vr({api:e,folder:t,kind:n,total:r,revision:i=0,progress:a={},progressEnabled:o=!1,onClose:s}){let{t:c}=V(G),[l,u]=R(1),[d,f]=R(10),[p,m]=R([]),[h,g]=R(``),[_,v]=R(!1);z(()=>{let r=new AbortController;return v(!0),e.get(Lr[n],{folder:t.id,page:l,perpage:d},r.signal).then(e=>{m(Br(n,e)),g(``)}).catch(e=>{r.signal.aborted||g(e.message)}).finally(()=>{r.signal.aborted||v(!1)}),()=>r.abort()},[e,t.id,n,l,d,i,r]);async function y(n){try{let r=await e.post(`db/prio`,void 0,{folder:t.id,file:n,page:l,perpage:d});m(Br(`need`,r))}catch(e){g(e.message)}}return q(Y,{title:Rr[n],large:!0,status:n===`failed`||n===`local`&&t.type===`receiveencrypted`?`warning`:`info`,icon:n===`need`?`cloud-download`:`circle-alert`,onClose:s,children:[n===`failed`&&q(`p`,{children:[c(`The following items could not be synchronized.`),` `,c(`They are retried automatically and will be synced when the error is resolved.`)]}),n===`local`&&q(`p`,{children:c(t.type===`receiveencrypted`?`The following unexpected items were found.`:`The following items were changed locally.`)}),n===`local`&&t.type===`receiveencrypted`&&q(`p`,{children:c(`You should never add or change anything locally in a "{%receiveEncrypted%}" folder.`,{receiveEncrypted:c(`Receive Encrypted`)})}),h&&q(`p`,{role:`alert`,class:`text-danger`,children:h}),n===`need`&&o&&q(Ir,{legend:!0}),q(`table`,{class:`table table-striped table-condensed port-items`,"aria-busy":_,children:[n===`local`&&q(`thead`,{children:q(`tr`,{children:[q(`th`,{children:c(`Path`)}),q(`th`,{children:c(`Size`)})]})}),q(`tbody`,{children:p.map((e,t)=>q(`tr`,{children:[n===`need`&&q(`td`,{class:`small-data`,children:[q(J,{name:Ue[e.action]}),` `,c(e.action)]}),q(`td`,{class:`word-break-all`,children:n===`need`?q(D,{children:[e.type===`queued`&&q(`button`,{class:`btn btn-link btn-sm`,"aria-label":c(`Move to top of queue`),onClick:()=>y(e.name),children:q(J,{name:`arrow-up-to-line`})}),q(Q,{label:e.name,text:e.name,triggerText:e.name.split(`/`).at(-1)})]}):e.path||e.name}),q(`td`,{children:n===`need`&&e.type===`progress`&&e.action===`Sync`&&a[e.name]?q(Ir,{progress:a[e.name]}):n===`failed`?e.error:n===`local`?[`DIRECTORY`,`FILE_INFO_TYPE_DIRECTORY`].includes(e.type)?``:H(e.size,!0)+`B`:e.size>0?H(e.size,!0)+`B`:``})]},`${e.name||e.path}:${t}`))})]}),q(Fr,{page:l,perpage:d,total:r,onPage:u,onSize:f})]})}function Hr(e,t,n){z(()=>{if(!t)return;function r(t){e.current?.contains(t.target)||n(!1)}function i(t){t.key===`Escape`&&(n(!1),e.current?.querySelector(`.dropdown-toggle`)?.focus())}return document.addEventListener(`pointerdown`,r),document.addEventListener(`keydown`,i),()=>{document.removeEventListener(`pointerdown`,r),document.removeEventListener(`keydown`,i)}},[t,n])}function Ur({folder:e,info:t,stats:n,progress:r,api:i,rescan:a,state:o,session:s,onAction:c}){let{t:l}=V(G),[u,d]=R(!1),[f,p]=R(!1),[m,h]=R(``),[g,_]=R(!1),v=B(),y=B();Hr(y,g,_),z(()=>{if(u)return Ar(v.current)},[u]);let b=lr(e,t),x=Tr(b),S=fr(e,t)?[`global`,`local`]:[],C=b===`syncing`?mr(t):r?pr(r.current,r.total):void 0,w=e.fsWatcherEnabled&&!e.paused&&b!==`stopped`&&t?.watchError,T=[`receiveonly`,`receiveencrypted`].includes(e.type)&&t?.receiveOnlyTotalItems>0,E=e=>(e||``).split(/[\\/]/).at(-1);async function O(){p(!0);try{await a()}catch{}finally{p(!1)}}let k=e=>t=>{t.preventDefault(),h(e)};return q(D,{children:[q(`div`,{class:`panel panel-default`,children:[q(`button`,{class:`btn panel-heading`,"aria-expanded":u,onClick:()=>d(!u),children:[[`scanning`,`syncing`].includes(b)&&C!==void 0&&q(`span`,{class:`panel-progress`,style:{width:C+`%`}}),q(`span`,{class:`panel-title`,children:[q(`span`,{class:`panel-icon hidden-xs`,children:q(J,{name:{sendonly:`upload`,receiveonly:`download`,receiveencrypted:`lock`}[e.type]||`folder`,class:`icon-fixed`})}),q(`span`,{class:`panel-status pull-right text-${ur(b)}`,children:[q(`span`,{class:`hidden-xs`,children:l(x)}),b===`scanning`&&C!==void 0&&` (${C}%)`,b===`syncing`&&` (${C}%, ${H(t.needBytes,!0)}B)`,q(J,{name:wr(b),class:`visible-xs icon-fixed`,label:l(x)})]}),q(`span`,{class:`panel-title-text`,title:e.label||e.id,children:e.label||e.id})]})]}),u&&q(`div`,{class:`panel-collapse`,ref:v,children:[q(`div`,{class:`panel-body less-padding`,children:[q(`details`,{class:`folder-details`,open:!0,children:[q(`summary`,{children:l(`Current activity`)}),q(`table`,{class:`table table-condensed table-auto`,children:q(`tbody`,{children:[!e.paused&&t?.state&&q(`tr`,{class:`folder-state-summary`,children:[q(`th`,{children:[q(Q,{icon:`dot`,iconClass:`text-${dr(b)}`,label:`Global/local State`,prefix:x,text:jr[`Global/local State`].help}),`\xA0`,q(`span`,{children:l(`Global/local State`)}),t.ignorePatterns&&q(`a`,{href:`#ignores`,title:l(`Reduced by ignore patterns`),onClick:t=>{t.preventDefault(),c({type:`edit-folder`,folder:e,tab:`ignores`})},children:q(J,{name:`info`})})]}),q(`td`,{class:`text-right`,children:q(Mr,{info:t})})]}),S.map(e=>q($,{label:e===`global`?`Global State`:`Local State`,rowClass:`folder-state-detail`,children:q(Mr,{info:t,prefix:e})},e)),t?.needTotalItems>0&&q($,{label:`Out of Sync Items`,icon:`cloud-download`,help:`Items this device still needs to synchronize with other devices. The size counts whole files; reusing existing data can reduce the amount actually downloaded. Click the value to see the items.`,children:q(`a`,{href:`#needed`,onClick:k(`need`),children:[We(t.needTotalItems),` `,l(`items`),`, ~`,H(t.needBytes,!0),`B`]})}),!e.paused&&t?.state&&e.ignoreDelete&&q(`tr`,{children:q(`td`,{colSpan:`2`,class:`text-right`,children:q(`i`,{class:`small`,children:[l(`Altered by ignoring deletes.`),` `,q(`a`,{href:`https://docs.syncthing.net/advanced/folder-ignoredelete.html`,target:`_blank`,rel:`noreferrer`,children:l(`Help`)})]})})}),n?.lastScan&&q($,{label:`Last Scan`,children:(Date.now()-new Date(n.lastScan))/864e5>=365?l(`Never`):U(n.lastScan)}),!e.paused&&(t?.invalid||t?.error)&&q($,{label:`Error`,children:q(Q,{label:t.invalid||t.error,text:t.invalid||t.error,triggerText:t.invalid||t.error})}),t&&t.errors!==0&&q($,{label:`Failed Items`,children:q(`a`,{href:`#failed`,onClick:k(`failed`),children:[We(t.pullErrors||0),` `,l(`items`)]})}),T&&q($,{label:`Locally Changed Items`,children:q(`a`,{href:`#local-changed`,onClick:k(`local`),children:[We(t.receiveOnlyTotalItems),` `,l(`items`),`, ~`,H(t.receiveOnlyChangedBytes,!0),`B`]})}),b===`scanning`&&r?.rate>0&&q($,{label:`Scan Time Remaining`,children:q(`span`,{title:H(r.rate,!0)+`B/s`,children:[`~ `,kr(r)]})}),![`sendonly`,`receiveencrypted`].includes(e.type)&&n?.lastFile?.filename&&q($,{label:`Latest Change`,children:q(Q,{label:n.lastFile.filename,triggerText:E(n.lastFile.filename),tail:!0,kind:`change`,children:[e.path,`/`,n.lastFile.filename,q(`br`,{}),q(`span`,{class:`text-nowrap`,children:[q(`span`,{class:n.lastFile.deleted?`text-danger`:`text-success`,children:l(n.lastFile.deleted?`Deleted`:`Updated`)}),` @ `,q(`span`,{class:`text-warning folder-change-time`,children:U(n.lastFile.at)})]})]})})]})})]}),q(`details`,{class:`folder-details`,children:[q(`summary`,{children:l(`Configuration`)}),q(`table`,{class:`table table-condensed table-auto`,children:q(`tbody`,{children:[q($,{label:`Rescans`,children:q(`span`,{title:w||``,children:[q(J,{name:`clock`}),`\xA0`,e.rescanIntervalS>0?Ge(e.rescanIntervalS,`s`):l(`Disabled`),` `,q(J,{name:e.fsWatcherEnabled&&!w?`eye`:`eye-off`}),`\xA0`,l(w?`Failed to set up, retrying`:e.fsWatcherEnabled?`Enabled`:`Disabled`)]})}),e.versioning?.type&&q($,{label:`File Versioning`,children:q(Nr,{config:e.versioning})}),e.ignorePerms&&q($,{label:`Ignore Permissions`,children:l(`Yes`)})]})})]}),q(`details`,{class:`folder-details`,children:[q(`summary`,{children:l(`Folder information`)}),q(`table`,{class:`table table-condensed table-auto`,children:q(`tbody`,{children:[q($,{label:`Folder Path`,children:q(Q,{label:e.path,text:e.path,triggerText:e.path,tail:!0})}),q($,{label:`Folder Type`,children:l(Er[e.type]||``)}),e.label&&q($,{label:`Folder ID`,children:q(Q,{label:e.id,text:e.id,triggerText:e.id})}),q($,{label:`Block Indexing`,children:l(e.blockIndexing?`Yes`:`No`)}),e.type!==`sendonly`&&q($,{label:`File Pull Order`,children:l(Dr[e.order]||``)})]})})]})]}),q(`div`,{class:`panel-footer folder-actions`,children:[xr(e,t,b).map(t=>q(`button`,{class:`btn btn-danger btn-sm`,onClick:()=>c({type:t,folder:e}),children:l(Sr[t].title)},t)),q(`div`,{ref:y,class:`dropdown folder-sharing pull-left ${g?`open`:``}`,children:[q(`button`,{class:`btn btn-sm btn-default dropdown-toggle`,"aria-expanded":g,disabled:!e.devices.some(e=>e.deviceID!==o.system.myID),onClick:()=>_(!g),children:[q(J,{name:`share`}),` `,l(`Shared`),` `,q(`span`,{class:`caret`})]}),q(`ul`,{class:`dropdown-menu`,children:e.devices.filter(e=>e.deviceID!==o.system.myID).map(t=>{let n=o.config.devices.find(e=>e.deviceID===t.deviceID);return q(`li`,{children:q(`a`,{href:`#edit-device`,onClick:e=>{e.preventDefault(),_(!1),n&&c({type:`edit-device`,device:n})},children:[n?.name||t.deviceID.slice(0,7),` `,q(br,{encrypted:e.type===`receiveencrypted`||!!t.encryptionPassword,remoteState:o.completion[t.deviceID]?.[e.id]?.remoteState})]})},t.deviceID)})})]}),q(`button`,{class:`btn btn-sm btn-default`,onClick:()=>s.setPaused(`folders`,e.id,!e.paused).catch(()=>{}),children:[q(J,{name:e.paused?`play`:`pause`}),` `,l(e.paused?`Resume`:`Pause`)]}),q(`button`,{class:`btn btn-sm btn-default`,disabled:f||![`idle`,`stopped`,`unshared`,`outofsync`,`faileditems`,`localadditions`].includes(b),onClick:O,children:[q(J,{name:`refresh`,class:`icon-fixed`}),` `,l(`Rescan`)]}),e.versioning?.type&&e.versioning.type!==`external`&&q(`button`,{class:`btn btn-sm btn-default`,disabled:e.paused,onClick:()=>c({type:`versions`,folder:e}),children:[q(J,{name:`undo`}),` `,l(`Versions`)]}),q(`button`,{class:`btn btn-sm btn-default`,onClick:()=>c({type:`edit-folder`,folder:e}),children:[q(J,{name:`pencil`}),` `,l(`Edit`)]})]})]})]}),m&&q(Vr,{api:i,folder:e,kind:m,revision:o.itemsRevision[e.id]||0,progress:o.downloadProgress[e.id]||{},progressEnabled:o.config.options.progressUpdateIntervalS>0&&e.type!==`receiveencrypted`,total:m===`need`?t.needTotalItems:m===`failed`?t.pullErrors:t.receiveOnlyTotalItems,onClose:()=>h(``)})]})}function Wr({id:e}){return q(`span`,{class:`panel-icon`,children:q(`svg`,{class:`identicon`,viewBox:`0 0 5 5`,"aria-hidden":`true`,children:st(e).map(([e,t],n)=>q(`rect`,{x:e,y:t,width:`1`,height:`1`},n))})})}function Gr({device:e,state:t,session:n,local:r=!1,metric:i,toggleUnits:a,onAction:o}){let{t:s}=V(G),[c,l]=R(r),[u,d]=R(!1),f=B(),p=B();Hr(p,u,d),z(()=>{if(c)return Ar(f.current)},[c]);let m=r?t.connectionsTotal:t.connections[e.deviceID]||{},h=t.completion[e.deviceID]||{},g=r?t.config.folders:Ke(t.config,e.deviceID),_=Xe(e,t),v=tt(m),y=et(t.deviceStats[e.deviceID]?.lastSeen),b=hr(t.model),x=ot(t.system.connectionServiceStatus),S=ot(t.system.discoveryStatus),C=it(e,m),w=[...(e.addresses||[]).map(e=>({address:e,source:`Configured`})),...(t.discoveryCache[e.deviceID]?.addresses||[]).map(e=>({address:e,source:`Discovered`}))],T=e=>e.catch(()=>{}),E=(t,n={})=>o({type:t,device:e,...n}),O=e=>H(i?e*8:e,!i)+(i?`bps`:`B/s`),k=(e,t)=>{e.preventDefault(),E(t)};return q(`div`,{class:`panel panel-default`,children:[q(`button`,{class:`btn panel-heading`,"aria-expanded":c,onClick:()=>l(!c),children:[!r&&_===`syncing`&&q(`span`,{class:`panel-progress`,style:{width:h._total+`%`}}),q(`span`,{class:`panel-title device-title`,children:[q(Wr,{id:e.deviceID}),!r&&q(`span`,{class:`panel-status pull-right text-${$e(e,t)}`,children:[q(`span`,{class:`hidden-xs`,children:s(Ze[_])}),_===`syncing`&&` (${h._total}%, ${H(h._needBytes,!0)}B)`,q(J,{name:Qe[_],class:`visible-xs icon-fixed`,label:s(Ze[_])}),q(`span`,{class:`inline-icon`,children:q(`span`,{class:`reception reception-theme ${rt[v]||``}`})})]}),q(`span`,{class:`panel-title-text`,children:[q(`span`,{class:`device-name`,title:W(e),children:W(e)}),q(`small`,{class:`device-role text-success`,children:[`(`,s(r?`This Device`:`Remote`),`)`]})]})]})]}),c&&q(`div`,{class:`panel-collapse`,ref:f,children:[q(`div`,{class:`panel-body less-padding`,children:[!r&&q(`table`,{class:`table table-condensed visible-xs remote-status`,children:q(`tbody`,{children:q($,{label:`Device Status`,icon:Qe[_],children:s(Ze[_])})})}),(r||m.connected||g.length>0||h._needItems>0)&&q(`details`,{class:`device-details`,open:!0,children:[q(`summary`,{children:s(`Current activity`)}),q(`table`,{class:`table table-condensed table-auto`,children:q(`tbody`,{children:[!r&&!m.connected&&g.length>0&&q($,{label:`Sync Status`,children:h._total===100?s(`Up to Date`):h._total<100?s(`Out of Sync`)+` (`+h._total+`%)`:``}),(r||m.connected)&&[`in`,`out`].map(n=>q($,{label:n===`in`?`Download Rate`:`Upload Rate`,icon:n===`in`?`download`:`upload`,help:n===`in`?r?`Incoming traffic across all connected devices. Click the rate to switch between bytes and bits per second. A configured limit appears below.`:`Data received by this machine from this remote device. Click the rate to switch between bytes and bits per second.`:r?`Outgoing traffic across all connected devices. Click the rate to switch between bytes and bits per second. A configured limit appears below.`:`Data sent by this machine to this remote device. Click the rate to switch between bytes and bits per second.`,totalBytes:m[n+`BytesTotal`],children:q(`a`,{href:`#units`,onClick:e=>{e.preventDefault(),a()},children:[O(m[n+`bps`]||0),(r?t.config.options:e)[n===`in`?`maxRecvKbps`:`maxSendKbps`]>0&&q(`small`,{children:[q(`br`,{}),q(`i`,{class:`text-muted`,children:[s(`Limit`),`: `,O((r?t.config.options:e)[n===`in`?`maxRecvKbps`:`maxSendKbps`]*1024),r&&t.config.options.limitBandwidthInLan&&` (${s(`Applied to LAN`)})`]})]})]})},n)),r&&q($,{label:`Local State (Total)`,children:q(Mr,{prefix:`local`,info:{localFiles:b.files,localDirectories:b.directories,localBytes:b.bytes}})}),!r&&h._needItems>0&&q($,{label:`Out of Sync Items`,children:q(`a`,{href:`#remote-needed`,onClick:e=>k(e,`remote-needed`),children:[q(Q,{icon:`arrow-left-right`,label:`Out of Sync Items`,text:`${h._needItems.toLocaleString()} ${s(`items`)}, ~${H(h._needBytes,!0)}B`}),We(h._needItems),` `,s(`items`),`, ~`,H(h._needBytes,!0),`B`]})})]})})]}),q(`details`,{class:`device-details`,open:!0,children:[q(`summary`,{children:s(`Connectivity`)}),q(`table`,{class:`table table-condensed table-auto`,children:q(`tbody`,{children:r?q(D,{children:[q($,{label:`Listeners`,children:q(`a`,{href:`#listeners`,class:`text-${x.color}`,onClick:e=>k(e,`listeners`),children:[x.running,`/`,x.total]})}),t.system.discoveryEnabled&&q($,{label:`Discovery`,children:q(`a`,{href:`#discovery`,class:`text-${S.color}`,onClick:e=>k(e,`discovery`),children:[S.running,`/`,S.total]})})]}):q(D,{children:[q($,{label:`Address`,children:m.connected?m.address:w.map((n,r)=>q(`span`,{class:`remote-address`,children:[q(`span`,{class:`folder-text`,title:s(n.source)+`: `+n.address,children:n.address}),t.system.lastDialStatus?.[n.address]?.error&&!e.paused&&q(`small`,{class:`text-danger`,title:t.system.lastDialStatus[n.address].error,children:at(t.system.lastDialStatus[n.address])})]},r))}),m.connected?q(D,{children:[q($,{label:`Connection Type`,icon:`signal`,help:`Transport and network used to reach this device. A relay forwards traffic when a direct connection is unavailable.`,children:s(nt[v]||`Disconnected`)}),q($,{label:`Number of Connections`,children:[`1`,m.secondary?.length?` + `+m.secondary.length:``]})]}):q($,{label:`Last seen`,children:y?q(D,{children:[U(t.deviceStats[e.deviceID].lastSeen),y>=7&&q(D,{children:[q(`br`,{}),q(`i`,{class:y>=365?`text-danger`:y>=30?`text-warning`:``,children:s(y>=365?`More than a year ago`:y>=30?`More than a month ago`:`More than a week ago`)})]})]}):s(`Never`)})]})})})]}),q(`details`,{class:`device-details`,children:[q(`summary`,{children:s(`Device information`)}),q(`table`,{class:`table table-condensed table-auto`,children:q(`tbody`,{children:r?q(D,{children:[q($,{label:`Uptime`,children:Ge(t.system.uptime,`m`)}),q($,{label:`Version`,help:`Version and platform of the Syncthing service running on this device.`,children:[t.version.version,` (`,t.version.os,` `,t.version.arch,`)`]})]}):q(D,{children:[m.clientVersion&&q($,{label:`Version`,children:m.clientVersion}),e.introducedBy&&q($,{label:`Introduced By`,children:W(t.config.devices.find(t=>t.deviceID===e.introducedBy))||e.introducedBy.slice(0,7)}),q($,{label:`Compression`,children:s({always:`All Data`,metadata:`Metadata Only`,never:`Off`}[e.compression]||``)}),e.allowedNetworks?.length>0&&q($,{label:`Allowed Networks`,children:e.allowedNetworks.join(`, `)}),[[`introducer`,`Introducer`],[`autoAcceptFolders`,`Auto Accept`],[`untrusted`,`Untrusted`]].map(([t,n])=>e[t]&&q($,{label:n,children:s(`Yes`)},t))]})})})]})]}),q(`div`,{class:`panel-footer folder-actions device-actions`,children:[q(`button`,{class:`btn btn-sm btn-default`,onClick:()=>E(`identification`),children:[q(J,{name:`qrcode`}),`\xA0`,s(`Identification`)]}),g.length>0&&q(`div`,{ref:p,class:`dropup folder-sharing device-folders ${u?`open`:``}`,children:[q(`button`,{class:`btn btn-sm btn-default dropdown-toggle`,"aria-expanded":u,onClick:()=>d(!u),children:[q(J,{name:`folder`}),`\xA0`,s(`Folders`),` `,q(`span`,{class:`caret`})]}),q(`ul`,{class:`dropdown-menu`,children:g.map(n=>q(`li`,{children:q(`a`,{href:r?`#folder`:`#folder-sharing`,onClick:e=>{e.preventDefault(),d(!1),o({type:`edit-folder`,folder:n,...r?{}:{tab:`sharing`}})},children:[n.label||n.id,!r&&q(D,{children:[` `,q(br,{encrypted:n.type===`receiveencrypted`||!!n.devices.find(t=>t.deviceID===e.deviceID)?.encryptionPassword,remoteState:t.completion[e.deviceID]?.[n.id]?.remoteState})]})]})},n.id))})]}),q(`span`,{class:`pull-right`,children:[r?t.config.folders.length>0&&q(`button`,{class:`btn btn-sm btn-default`,onClick:()=>T(n.setPaused(`folders`,void 0,t.config.folders.some(e=>!e.paused))),children:[q(J,{name:t.config.folders.some(e=>!e.paused)?`pause`:`play`}),`\xA0`,s(t.config.folders.some(e=>!e.paused)?`Pause`:`Resume`)]}):q(D,{children:[e.remoteGUIPort>0&&q(`a`,{class:`btn btn-sm btn-default`,href:C||void 0,"aria-disabled":!C,children:[q(J,{name:`monitor`}),`\xA0`,s(`Remote GUI`)]}),q(`button`,{class:`btn btn-sm btn-default`,onClick:()=>T(n.setPaused(`devices`,e.deviceID,!e.paused)),children:[q(J,{name:e.paused?`play`:`pause`}),`\xA0`,s(e.paused?`Resume`:`Pause`)]}),q(`button`,{class:`btn btn-sm btn-default`,onClick:()=>E(`edit-device`),children:[q(J,{name:`pencil`}),`\xA0`,s(`Edit`)]})]}),r&&q(`button`,{class:`btn btn-sm btn-default`,onClick:()=>E(`settings`),children:[q(J,{name:`settings`}),`\xA0`,s(`Settings`)]})]})]})]})]})}function Kr(){let{t:e}=V(G),[t,n]=R(``),[r,i]=R(``),[a,o]=R(!1),[s,c]=R(!1),[l,u]=R(``),d=B();z(()=>{d.current.focus()},[]);async function f(e){e.preventDefault(),c(!0),u(``);try{await Re().post(`noauth/auth/password`,{username:t.trim(),password:r,stayLoggedIn:a}),location.reload()}catch(e){u(e.status===403?`Incorrect user name or password.`:`Login failed, see Syncthing logs for details.`)}finally{c(!1)}}return q(`div`,{class:`center-block`,children:[q(`h3`,{children:e(`Authentication Required`)}),q(`form`,{onSubmit:f,children:[q(`div`,{class:`form-group`,children:[q(`label`,{for:`user`,children:e(`User`)}),q(`input`,{id:`user`,name:`user`,class:`form-control`,autoComplete:`username`,ref:d,value:t,required:!0,onInput:e=>n(e.currentTarget.value)})]}),q(`div`,{class:`form-group`,children:[q(`label`,{for:`password`,children:e(`Password`)}),q(`input`,{id:`password`,name:`password`,class:`form-control`,type:`password`,autoComplete:`current-password`,value:r,onInput:e=>i(e.currentTarget.value)})]}),q(`div`,{class:`form-group`,children:q(`label`,{children:[q(`input`,{id:`stayLoggedIn`,type:`checkbox`,checked:a,onChange:e=>o(e.currentTarget.checked)}),` `,e(`Stay logged in`)]})}),q(`div`,{class:`row`,children:[q(`div`,{class:`col-md-9 login-form-messages`,children:l&&q(`p`,{class:`text-danger`,role:`alert`,children:e(l)})}),q(`div`,{class:`col-md-3 text-right`,children:q(`button`,{id:`submit`,class:`btn btn-default`,type:`submit`,disabled:s,children:e(`Log In`)})})]})]})]})}var qr=e=>[`Ignore`,`Disable Crash Reporting`].includes(e)?`danger`:e===`Yes`?`primary`:[`Add Device`,`Add`,`Share`,`Enable Crash Reporting`].includes(e)?`success`:`default`,Jr=e=>({Settings:`settings`,Restart:`refresh`,"Add Device":`plus`,Ignore:`x`,Dismiss:`clock`,No:`x`,"Disable Crash Reporting":`x`})[e]||`check`;function Yr({cards:e,session:t,onAction:n}){let{t:r}=V(G);return q(D,{children:[q(`h3`,{children:r(`Notifications`)}),!e.length&&q(`p`,{class:`notifications-empty`,children:r(`No pending notifications.`)}),e.map(e=>q(`div`,{class:`row`,children:q(`div`,{class:`col-md-12`,children:q(`div`,{class:`panel panel-${e.severity}`,children:[q(`div`,{class:`panel-heading`,children:q(`h3`,{class:`panel-title`,children:[e.kind===`device`?q(Wr,{id:e.device}):q(`span`,{class:`panel-icon`,children:q(J,{name:e.kind===`folder`?`folder`:e.severity===`success`?`zap`:`circle-alert`})}),r(e.title),e.time&&q(`span`,{class:`pull-right`,children:U(e.time)})]})}),q(`div`,{class:`panel-body`,children:[(e.paragraphs||[]).map((t,n)=>q(`p`,{children:r(t,e.params)},n)),(e.errors||[]).map((e,t)=>q(`p`,{children:[q(`small`,{children:[U(e.when),`:`]}),` `,e.message]},t)),e.watchers&&q(`table`,{children:q(`tbody`,{children:e.watchers.map(e=>q(`tr`,{children:[q(`td`,{children:[e.name,`: `]}),q(`td`,{children:e.error})]},e.name))})}),e.link&&q(`p`,{children:q(`a`,{href:e.link,target:`_blank`,rel:`noreferrer`,children:[q(J,{name:`info`}),`\xA0`,r(e.id===`watchers`?`Support`:`Learn more`)]})})]}),e.actions?.length>0&&q(`div`,{class:`panel-footer clearfix`,children:e.actions.map(i=>q(`button`,{class:`btn btn-sm btn-${qr(i)}`,onClick:()=>_r(t,e,i,n).catch(()=>{}),children:[q(J,{name:Jr(i)}),`\xA0`,r(i)]},i))})]})})},e.id))]})}var Xr={authors:`Jakob Borg, Audrius Butkevicius, Simon Frei, Tomasz Wilczyński, Alexander Graf, Alexandre Viau, Anderson Mesquita, André Colomb, Antony Male, Ben Schulz, bt90, Caleb Callaway, Daniel Harte, Emil Lundberg, Eric P, Evgeny Kuznetsov, greatroar, Lars K.W. Gohlke, Lode Hoste, Marcus B Spencer, Michael Ploujnikov, Ross Smith II, Stefan Tatschner, Tommy van der Vorst, Wulf Weich, Adam Piggott, Adel Qalieh, Aleksey Vasenev, Alessandro G., Alex Ionescu, Alex Lindeman, Alex Xu, Alexander Seiler, Alexandre Alves, Aman Gupta, Andreas Sommer, andresvia, Andrew Gunnerson, Andrew Rabert, Andrey D, andyleap, Anjan Momi, Anthony Goeckner, Antoine Lamielle, Anur, Aranjedeath, ardevd, Arkadiusz Tymiński, Aroun, Arthur Axel fREW Schmidt, Artur Zubilewicz, Ashish Bhate, Aurélien Rainone, BAHADIR YILMAZ, Bart De Vries, Beat Reichenbach, Ben Norcombe, Ben Shepherd, Ben Sidhom, Benedikt Heine, Benno Fünfstück, Benny Ng, boomsquared, Boqin Qin, Boris Rybalkin, Brendan Long, Catfriend1, Cathryne Linenweaver, Cedric Staniewski, Chih-Hsuan Yen, Choongkyu, Chris Howie, Chris Joel, Christian Kujau, Christian Prescott, chucic, cjc7373, Colin Kennedy, Cromefire_, cui, Cyprien Devillez, d-volution, Dan, Daniel Barczyk, Daniel Bergmann, Daniel Martí, Daniel Padrta, Daniil Gentili, Darshil Chanpura, dashangcun, David Rimmer, DeflateAwning, Denis A., Dennis Wilson, derekriemer, DerRockWolf, desbma, Devon G. Redekopp, digital, Dimitri Papadopoulos Orfanos, Dmitry Saveliev, domain, Domenic Horner, Dominik Heidler, Elias, Elias Jarlebring, Elliot Huffman, Emil Hessman, Eng Zer Jun, entity0xfe, Epifeny, epifeny, Eric Lesiuta, Erik Meitner, Evan Spensley, Federico Castagnini, Felix, Felix Ableitner, Felix Lampe, Felix Unterpaintner, Francois-Xavier Gsell, Frank Isemann, Frederic, Gahl Saraf, georgespatton, ghjklw, Gilli Sigurdsson, Gleb Sinyavskiy, Graham Miln, Greg, guangwu, gudvinr, Gusted, Han Boetes, HansK-p, Harrison Jones, Hazem Krimi, Heiko Zuerker, Henrik Bråthen, Hireworks, Hugo Locurcio, Iain Barnett, Ian Johnson, ignacy123, Iskander Sharipov, Jaakko Hannikainen, Jack Croft, Jacob, Jake Peterson, James O'Beirne, James Patterson, Jaroslav Lichtblau, Jaroslav Malec, Jaspitta, Jaya Chithra, Jaya Kumar, Jeffery To, jelle van der Waa, Jens Diemer, Jochen Voss, Johan Vromans, John Rinehart, Jonas Thelemann, Jonathan, Jose Manuel Delicado, JRNitre, jtagcat, Julian Lehrhuber, Jörg Thalheim, Jędrzej Kula, Kapil Sareen, Karol Różycki, Kebin Liu, Keith Harrison, Kelong Cong, Ken'ichi Kamada, Kevin Allen, Kevin Bushiri, Kevin White, Jr., klemens, Kurt Fitzner, kylosus, Lars Lehtonen, Laurent Etiemble, Leo Arias, Liu Siyuan, Lord Landon Agahnim, LSmithx2, Luiz Angelo Daros de Luca, Lukas Lihotzki, Luke Hamburg, luzpaz, Majed Abdulaziz, Marc Laporte, Marcel Meyer, Marcin Dziadus, Marcus Legendre, Mario Majila, Mark Pulford, Martchus, Mateusz Naściszewski, Mateusz Ż, mathias4833, Matic Potočnik, Matt Burke, Matt Robenolt, Matteo Ruina, mattn, Maurizio Tomasi, Max, Max Schulze, MaximAL, Maximilian, Maxwell G, Michael Jephcote, Michael Rienstra, Michael Wang 汪東陽, MichaIng, Migelo, Mike Boone, MikeLund, MikolajTwarog, Mingxuan Lin, mv1005, Nate Morrison, nf, Nicholas Rishel, Nick Busey, Nico Stapelbroek, Nicolas Braud-Santoni, Nicolas Perraut, Niels Peter Roest, Nils Jakobi, NinoM4ster, Nitroretro, NoLooseEnds, Oliver Freyermuth, orangekame3, otbutz, overkill, Oyebanji Jacob Mayowa, Pablo, Pascal Jungblut, Paul Brit, Paul Donald, Pawel Palenica, perewa, Peter Badida, Peter Dave Hello, Peter Hoeg, Peter Marquardt, Phani Rithvij, Phil Davis, Philippe Schommers, Phill Luby, Piotr Bejda, polyfloyd, Prathik P Kulkarni, pullmerge, Quentin Hibon, Rahmi Pruitt, RealCharlesChia, red_led, Robert Carosi, Roberto Santalla, Robin Schoonover, Rohit Tanwar, Roman Zaynetdinov, rubenbe, Ruslan Yevdokymov, Ryan Qian, Ryan Sullivan, Sacheendra Talluri, Scott Klupfel, sec65, Sergey Mishin, Sertonix, Severin von Wnuck-Lipinski, Shaarad Dalvi, Shablone, Shivam Kumar, Simon Mwepu, Simon Pickup, Sly_tom_cat, Sonu Kumar Saw, Stefan Kuntz, Steven Eckhoff, Suhas Gundimeda, Sven Bachmann, Sébastien WENSKE, Tao, Taylor Khan, tbodt, Terrance, TheCreeper, Thomas, Thomas Hipp, Tim Abell, Tim Howes, Tobias Frölich, Tobias Klauser, Tobias Nygren, Tobias Tom, Tom Jakubowski, Tully Robinson, Tyler Brazier, Tyler Kropp, Umer-Azaz, Unrud, Val Markovic, vapatel2, Veeti Paananen, Victor Buinsky, Vik, Vil Brekin, villekalliomaki, Vladimir Rusinov, vvaswani, wangguoliang, WangXi, Will Rouesnel, William A. Kennington III, wouter bolsterlee, xarx00, Xavier O., xjtdy888, Yannic A., yparitcher, 佛跳墙, 落心`,software:[{url:`https://getbootstrap.com/`,name:`Bootstrap`,notice:`Copyright © 2011-2016 Twitter, Inc.`},{url:`https://lucide.dev/`,name:`Lucide`,notice:`Copyright © 2026 Lucide Contributors.`},{url:`https://golang.org/`,name:`The Go Programming Language`,notice:`Copyright © 2009 The Go Authors.`},{url:`https://prometheus.io/`,name:`Prometheus`,notice:`Copyright © 2012-2015 The Prometheus Authors.`},{url:`https://github.com/AudriusButkevicius/recli`,name:`AudriusButkevicius/recli`,notice:`Copyright © 2019 Audrius Butkevicius.`},{url:`https://github.com/Azure/go-ntlmssp`,name:`Azure/go-ntlmssp`,notice:`Copyright © 2016 Microsoft.`},{url:`https://github.com/alecthomas/kong`,name:`alecthomas/kong`,notice:`Copyright © 2018 Alec Thomas.`},{url:`https://github.com/beorn7/perks`,name:`beorn7/perks`,notice:`Copyright © 2013 Blake Mizerany.`},{url:`https://github.com/calmh/incontainer`,name:`calmh/incontainer`,notice:`Copyright © 2022 calmh.`},{url:`https://github.com/calmh/xdr`,name:`calmh/xdr`,notice:`Copyright © 2014 Jakob Borg.`},{url:`https://github.com/ccding/go-stun`,name:`ccding/go-stun`,notice:`Copyright © 2016 Cong Ding.`},{url:`https://github.com/cespare/xxhash/v2`,name:`cespare/xxhash/v2`,notice:`Copyright © 2016 Caleb Spare.`},{url:`https://github.com/cpuguy83/go-md2man/v2`,name:`cpuguy83/go-md2man/v2`,notice:`Copyright © 2014 Brian Goff.`},{url:`https://github.com/davecgh/go-spew`,name:`davecgh/go-spew`,notice:`Copyright © 2012-2016 Dave Collins.`},{url:`https://github.com/go-asn1-ber/asn1-ber`,name:`go-asn1-ber/asn1-ber`,notice:`Copyright © 2011-2015 Michael Mitton (mmitton@gmail.com).`},{url:`https://github.com/go-ldap/ldap`,name:`go-ldap/ldap`,notice:`Copyright © 2011-2015 Michael Mitton (mmitton@gmail.com).`},{url:`https://github.com/gobwas/glob`,name:`gobwas/glob`,notice:`Copyright © 2016 Sergey Kamardin.`},{url:`https://github.com/gofrs/flock`,name:`gofrs/flock`,notice:`Copyright © 2018-2025, The Gofrs.`},{url:`https://github.com/golang/snappy`,name:`golang/snappy`,notice:`Copyright © 2011 The Snappy-Go Authors.`},{url:`https://github.com/protocolbuffers/protobuf-go`,name:`google.golang.org/protobuf`,notice:`Copyright © 2018 The Go Authors.`},{url:`https://github.com/google/uuid`,name:`google/uuid`,notice:`Copyright © 2009,2014 Google Inc.`},{url:`https://gopkg.in/yaml.v3`,name:`gopkg.in/yaml.v3`,notice:`Copyright © 2025, the gopkg.in/yaml.v3 authors.`},{url:`https://github.com/hashicorp/errwrap`,name:`hashicorp/errwrap`,notice:`Copyright © 2014 HashiCorp, Inc.`},{url:`https://github.com/hashicorp/go-multierror`,name:`hashicorp/go-multierror`,notice:`Copyright © 2014 HashiCorp, Inc.`},{url:`https://github.com/hashicorp/golang-lru`,name:`hashicorp/golang-lru`,notice:`Copyright © 2014 HashiCorp, Inc.`},{url:`https://github.com/jackpal/gateway`,name:`jackpal/gateway`,notice:`Copyright © 2010 Jack Palevich.`},{url:`https://github.com/jackpal/go-nat-pmp`,name:`jackpal/go-nat-pmp`,notice:`Copyright 2013 John Howard Palevich.`},{url:`https://github.com/jmoiron/sqlx`,name:`jmoiron/sqlx`,notice:`Copyright © 2013, Jason Moiron.`},{url:`https://github.com/julienschmidt/httprouter`,name:`julienschmidt/httprouter`,notice:`Copyright © 2013, Julien Schmidt.`},{url:`https://github.com/kballard/go-shellquote`,name:`kballard/go-shellquote`,notice:`Copyright © 2014 Kevin Ballard.`},{url:`https://github.com/mattn/go-sqlite3`,name:`mattn/go-sqlite3`,notice:`Copyright © 2014 Yasuhiro Matsumoto.`},{url:`https://github.com/miscreant/miscreant.go`,name:`miscreant/miscreant.go`,notice:`Copyright © 2017-2019 The Miscreant Developers.`},{url:`https://github.com/munnerz/goautoneg`,name:`munnerz/goautoneg`,notice:`Copyright © 2011, Open Knowledge Foundation Ltd.`},{url:`https://github.com/pierrec/lz4`,name:`pierrec/lz4`,notice:`Copyright © 2015 Pierre Curto.`},{url:`https://github.com/pkg/errors`,name:`pkg/errors`,notice:`Copyright © 2015, Dave Cheney.`},{url:`https://github.com/pmezard/go-difflib`,name:`pmezard/go-difflib`,notice:`Copyright © 2013, Patrick Mezard.`},{url:`https://github.com/posener/complete`,name:`posener/complete`,notice:`Copyright © 2017 Eyal Posener.`},{url:`https://github.com/prometheus/client_golang`,name:`prometheus/client_golang`,notice:`Copyright 2012-2015 The Prometheus Authors.`},{url:`https://github.com/prometheus/client_model`,name:`prometheus/client_model`,notice:`Copyright © 2025, the prometheus/client_model authors.`},{url:`https://github.com/prometheus/common`,name:`prometheus/common`,notice:`Copyright © 2025, the prometheus/common authors.`},{url:`https://github.com/prometheus/procfs`,name:`prometheus/procfs`,notice:`Copyright © 2025, the prometheus/procfs authors.`},{url:`https://github.com/quic-go/quic-go`,name:`quic-go/quic-go`,notice:`Copyright © 2016 the quic-go authors & Google, Inc.`},{url:`https://github.com/rcrowley/go-metrics`,name:`rcrowley/go-metrics`,notice:`Copyright © 2012 Richard Crowley.`},{url:`https://github.com/riywo/loginshell`,name:`riywo/loginshell`,notice:`Copyright © 2019 Ryosuke IWANAGA.`},{url:`https://github.com/russross/blackfriday/v2`,name:`russross/blackfriday/v2`,notice:`Copyright © 2011 Russ Ross.`},{url:`https://github.com/shirou/gopsutil`,name:`shirou/gopsutil`,notice:`Copyright © 2014, WAKAYAMA Shirou.`},{url:`https://github.com/stretchr/objx`,name:`stretchr/objx`,notice:`Copyright © 2014 Stretchr, Inc.`},{url:`https://github.com/stretchr/testify`,name:`stretchr/testify`,notice:`Copyright © 2012-2020 Mat Ryer, Tyler Bunnell and contributors.`},{url:`https://github.com/syndtr/goleveldb`,name:`syndtr/goleveldb`,notice:`Copyright © 2012 Suryandaru Triandana.`},{url:`https://github.com/thejerf/suture`,name:`thejerf/suture`,notice:`Copyright © 2014-2015 Barracuda Networks, Inc.`},{url:`https://github.com/tklauser/go-sysconf`,name:`tklauser/go-sysconf`,notice:`Copyright © 2018-2022, Tobias Klauser.`},{url:`https://github.com/tklauser/numcpus`,name:`tklauser/numcpus`,notice:`Copyright © 2018-2024 Tobias Klauser.`},{url:`https://github.com/urfave/cli`,name:`urfave/cli`,notice:`Copyright © 2016 Jeremy Saenz & Contributors.`},{url:`https://github.com/vitrun/qart`,name:`vitrun/qart`,notice:`Copyright © 2010-2011 The Go Authors.`},{url:`https://github.com/willabides/kongplete`,name:`willabides/kongplete`,notice:`Copyright © 2020 WillAbides.`}]},Zr=[[`User Home`,[`baseDir-userHome`]],[`Configuration Directory`,[`baseDir-config`]],[`Configuration File`,[`config`]],[`Device Certificate`,[`certFile`,`keyFile`]],[`GUI / API HTTPS Certificate`,[`httpsCertFile`,`httpsKeyFile`]],[`Database Location`,[`database`]],[`Log File`,[`logFile`]],[`GUI Override Directory`,[`guiAssets`]]];function Qr({api:e,version:t,onClose:n}){let{t:r}=V(G),[i,a]=R(`Authors`),[o,s]=R({}),[c,l]=R(``);return z(()=>{let t=new AbortController;return window.metadata?.authenticated&&e.get(`system/paths`,void 0,t.signal).then(s).catch(e=>{t.signal.aborted||l(e.message)}),()=>t.abort()},[e]),q(Y,{title:`About`,large:!0,status:`info`,icon:`heart`,onClose:n,children:[q(`h2`,{class:`text-center`,children:q(`a`,{href:`https://github.com/syncshell/syncshell-webui`,target:`_blank`,rel:`noreferrer`,children:`Syncshell`})}),q(`p`,{class:`text-center`,children:`Modern / Omarchy Web UI, based on Syncthing.`}),q(`p`,{class:`text-center`,children:[`Syncthing `,t.version||``,` `,t.codename||``]}),t.date&&q(`p`,{class:`text-center`,children:[`Build `,t.date.slice(0,10),` `,Array.isArray(t.tags)?t.tags.join(`, `):``]}),!t.version&&q(`p`,{class:`text-center`,children:r(`Log in to see version information.`)}),q(`p`,{class:`text-center`,children:[r(`Syncthing is Free and Open Source Software licensed as MPL v2.0.`),` `,q(`a`,{href:`LICENSE.syncthing`,children:`MPL 2.0`})]}),q(`ul`,{class:`nav nav-tabs`,children:[`Authors`,`Included Software`,`Paths`].map(e=>q(`li`,{class:i===e?`active`:``,children:q(`a`,{href:`#about-`+e,onClick:t=>{t.preventDefault(),a(e)},children:r(e)})},e))}),c&&q(`p`,{class:`text-danger`,role:`alert`,children:c}),i===`Authors`?q(D,{children:[q(`h4`,{children:r(`The Syncthing Authors`)}),q(`p`,{children:Xr.authors})]}):i===`Included Software`?q(D,{children:[q(`p`,{children:[`Preact · `,q(`a`,{href:`licenses/preact.txt`,children:`MIT license`})]}),q(`p`,{children:r(`Syncthing includes the following software or portions thereof:`)}),q(`ul`,{class:`list-unstyled`,children:Xr.software.map(e=>q(`li`,{children:[q(`a`,{href:e.url,target:`_blank`,rel:`noreferrer`,children:e.name}),` · `,e.notice]},e.url))})]}):q(`table`,{class:`table table-condensed table-striped port-about-paths`,children:[q(`caption`,{children:r(`Internally used paths:`)}),q(`tbody`,{children:Zr.map(([e,t])=>q(`tr`,{children:[q(`th`,{children:r(e)}),q(`td`,{children:t.map(e=>q(`div`,{children:q(`code`,{class:`word-break-all`,children:o[e]||``})},e))})]},e))})]})]})}function $r(e,t,n){let r={devicename:e.name||e.deviceID.slice(0,7)},i=n(`Syncthing device ID for "{%devicename%}"`,r),a=n(`Learn more at {%url%}`,{url:`https://syncthing.net`}),o=t===`email`?[n(`To connect with the Syncthing device named "{%devicename%}", add a new remote device on your end with this ID:`,r),e.deviceID,n(`Syncthing is a continuous file synchronization program. It synchronizes files between two or more computers in real time, safely protected from prying eyes. Your data is your data alone and you deserve to choose where it is stored, whether it is shared with some third party, and how it's transmitted over the internet.`),a].join(`\r -\r -`):[i,e.deviceID.replaceAll(`-`,``),a].join(` -`);return{subject:i,body:o,href:t===`email`?`mailto:?subject=`+encodeURIComponent(i)+`&body=`+encodeURIComponent(o):`sms:?&body=`+encodeURIComponent(o)}}function ei({device:e,api:t}){let{t:n}=V(G),[r,i]=R(``),[a,o]=R(null),[s,c]=R(!1),[l,u]=R(``),d=a?$r(a,r,n):null;async function f(n){u(``);try{let r=await t.get(`svc/deviceid`,{id:e.deviceID});if(r.error)throw Error(r.error);let a={...e,deviceID:r.id};o(a),n===`copy`?(await navigator.clipboard.writeText(a.deviceID),c(!0)):i(n)}catch(e){u(e.message)}}async function p(e){try{await navigator.clipboard.writeText(e)}catch(e){u(e.message)}}return q(D,{children:[q(`div`,{class:`folder-actions`,children:[q(`button`,{type:`button`,class:`btn btn-default`,disabled:!e.deviceID,onClick:()=>f(`copy`),children:[q(J,{name:`copy`}),` `,n(s?`Copied!`:`Copy`)]}),q(`button`,{type:`button`,class:`btn btn-default`,disabled:!e.deviceID,onClick:()=>f(`email`),children:[q(J,{name:`mail`}),` `,n(`Share by Email`)]}),q(`button`,{type:`button`,class:`btn btn-default`,disabled:!e.deviceID,onClick:()=>f(`sms`),children:[q(J,{name:`message`}),` `,n(`Share by SMS`)]})]}),l&&q(`p`,{class:`text-danger`,role:`alert`,children:l}),r&&d&&q(Y,{title:r===`email`?`Share by Email`:`Share by SMS`,large:r===`email`,icon:r===`email`?`mail`:`message`,onClose:()=>i(``),footer:q(D,{children:[q(`a`,{class:`btn btn-primary`,href:d.href,children:n(`Share`)}),q(`button`,{class:`btn btn-default`,onClick:()=>i(``),children:n(`Cancel`)})]}),children:[q(`p`,{children:[n(`The following text will automatically be inserted into a new message.`),` `,n(r===`email`?`Your email app should open to let you choose the recipient and send it from your own address.`:`Your SMS app should open to let you choose the recipient and send it from your own number.`),` `,n(`You can also copy and paste the text into a new message manually.`)]}),r===`email`&&q(D,{children:[q(`h5`,{children:n(`Subject:`)}),q(`pre`,{class:`port-share-text`,children:d.subject}),q(`button`,{class:`btn btn-default btn-sm`,onClick:()=>p(d.subject),children:n(`Copy`)}),q(`h5`,{children:n(`Body:`)})]}),q(`pre`,{class:`port-share-text`,children:d.body}),q(`button`,{class:`btn btn-default btn-sm`,onClick:()=>p(d.body),children:n(`Copy`)})]})]})}function ti({kind:e,state:t,session:n,onClose:r}){let{t:i}=V(G),[a]=R(t.system.startTime),[o,s]=R(`confirm`),[c,l]=R(``),u=t.upgradeInfo?.majorNewer,d=c?`Error`:o===`confirm`?u?`Major Upgrade`:`Upgrade`:e===`shutdown`?`Shutdown Complete`:`Restarting`;z(()=>{e!==`upgrade`&&f()},[]),z(()=>{o!==`confirm`&&a&&t.online&&t.system.startTime!==a&&r()},[o,a,t.online,t.system.startTime]);async function f(){s(`working`),l(``);try{await n.systemAction(e),s(`waiting`),e!==`shutdown`&&t.config.gui.useTLS!==(location.protocol===`https:`)&&(location.protocol=t.config.gui.useTLS?`https:`:`http:`)}catch(e){l(e.message)}}return q(Y,{title:d,status:c?`danger`:o===`confirm`?u?`danger`:`warning`:e===`shutdown`?`success`:`info`,icon:e===`shutdown`&&o===`waiting`?`power`:`hourglass`,onClose:r,onCancel:()=>{(o===`confirm`||c)&&r()},footer:q(D,{children:c?q(`button`,{class:`btn btn-default`,onClick:r,children:i(`Close`)}):o===`confirm`&&q(D,{children:[q(`button`,{class:`btn btn-primary`,onClick:f,children:i(`Upgrade`)}),q(`button`,{class:`btn btn-default`,onClick:r,children:i(`Close`)})]})}),children:c?q(`p`,{role:`alert`,children:c}):o===`confirm`?q(D,{children:[u?q(`p`,{children:[i(`This is a major version upgrade.`),` `,i(`A new major version may not be compatible with previous versions.`),` `,i(`Please consult the release notes before performing a major upgrade.`)]}):q(`p`,{children:i(`Are you sure you want to upgrade?`)}),q(`p`,{children:q(`a`,{href:`https://github.com/syncthing/syncthing/releases/tag/`+encodeURIComponent(t.upgradeInfo?.latest||``),target:`_blank`,rel:`noreferrer`,children:i(`Release Notes`)})})]}):e===`shutdown`?q(`p`,{role:`status`,children:i(o===`working`?`Please wait`:`Syncthing has been shut down.`)}):q(`p`,{role:`status`,children:[i(`Syncthing is restarting.`),` `,i(`Please wait`),`...`]})})}function ni({api:e,onClose:t}){let{t:n}=V(G),r=B(),i=B(!1),[a,o]=R(`Log`),[s,c]=R([]),[l,u]=R({levels:{},packages:{}}),[d,f]=R(``),[p,m]=R(!1),[h,g]=R(!1),_=s.map(e=>e.when.split(`.`)[0].replace(`T`,` `)+` `+(e.level||``)+` `+e.message).join(` -`);z(()=>{let t=new AbortController,n,r;e.get(`system/loglevels`,void 0,t.signal).then(u).catch(e=>{t.signal.aborted||f(e.message)});async function a(){try{if(!i.current){let n=await e.get(`system/log`,{since:r},t.signal);!i.current&&!t.signal.aborted&&(c(e=>[...e,...n.messages||[]]),r=n.messages?.at(-1)?.when||r,f(``))}}catch(e){t.signal.aborted||f(e.message)}finally{t.signal.aborted||(n=setTimeout(a,2e3))}}return a(),()=>{t.abort(),clearTimeout(n)}},[e]),z(()=>{!i.current&&r.current&&(r.current.scrollTop=r.current.scrollHeight)},[s,a]);async function v(t,n){m(!0);try{await e.post(`system/loglevels`,{...l.levels,[t]:n}),u(await e.get(`system/loglevels`)),f(``)}catch(e){f(e.message)}finally{m(!1)}}return q(Y,{title:`Logs`,large:!0,icon:`wrench`,onClose:t,children:[q(`ul`,{class:`nav nav-tabs`,children:[`Log`,`Debugging Facilities`].map(e=>q(`li`,{class:a===e?`active`:``,children:q(`a`,{href:`#logs-`+e,onClick:t=>{t.preventDefault(),o(e)},children:n(e)})},e))}),d&&q(`p`,{class:`text-danger`,role:`alert`,children:d}),a===`Log`?q(D,{children:[q(`textarea`,{ref:r,class:`form-control text-monospace`,"aria-label":n(`Log`),rows:`20`,readOnly:!0,value:_,onScroll:()=>{let e=r.current;i.current=e.scrollHeight>e.scrollTop+e.clientHeight+1,g(i.current)}}),h&&q(`button`,{class:`btn btn-link`,onClick:()=>{i.current=!1,g(!1),r.current.scrollTop=r.current.scrollHeight},children:n(`Log tailing paused. Scroll to the bottom to continue.`)})]}):q(D,{children:[q(`p`,{children:n(`Available debug logging facilities:`)}),q(`table`,{class:`table table-striped`,children:q(`tbody`,{children:Object.entries(l.levels).map(([e,t])=>q(`tr`,{children:[q(`td`,{children:[l.packages[e],` (`,q(`code`,{children:e}),`)`]}),q(`td`,{children:q(`select`,{class:`form-control`,"aria-label":e,disabled:p,value:t,onChange:t=>v(e,t.currentTarget.value),children:[[`DEBUG`,`Debug`],[`INFO`,`Info`],[`WARN`,`Warning`],[`ERROR`,`Error`]].map(([e,t])=>q(`option`,{value:e,children:n(t)},e))})})]},e))})})]})]})}function ri({action:e,api:t,session:n,onClose:r,onDone:i,devices:a=[]}){let{t:o}=V(G),s=Sr[e.type],c=e.folder?.label||e.folder?.id||e.device?.name||e.device?.deviceID,l=a.find(t=>t.deviceID===e.device?.introducedBy&&t.introducer),[u,d]=R(!1),[f,p]=R(``);async function m(){d(!0),p(``);try{await Cr(e,n,t),i()}catch(e){p(e.message)}finally{d(!1)}}return q(Y,{title:s.title,status:`warning`,icon:`help`,onClose:r,onCancel:()=>{u||r()},footer:q(D,{children:[q(`button`,{class:`btn btn-warning`,disabled:u,onClick:m,children:o(s.button)}),q(`button`,{class:`btn btn-default`,disabled:u,onClick:r,children:o(`Cancel`)})]}),children:[q(`p`,{children:o(s.description).replace(`{%label%}`,c).replace(`{%name%}`,c)}),s.detail&&q(`p`,{children:o(s.detail)}),l&&q(`p`,{children:o(`{%reintroducer%} might reintroduce this device.`).replace(`{%reintroducer%}`,l.name||l.deviceID)}),f&&q(`p`,{class:`text-danger`,role:`alert`,children:f})]})}function ii({label:e,id:t,selected:n,password:r=``,encrypted:i=!1,required:a=!1,remoteState:o=``,onSelected:s,onPassword:c}){let{t:l}=V(G),[u,d]=R(!1);return q(`div`,{class:`form-group`,children:[q(`label`,{title:t,children:[q(`input`,{type:`checkbox`,checked:n,onChange:e=>s(e.currentTarget.checked)}),` `,e]}),q(br,{remoteState:o}),q(`div`,{class:`input-group`,children:[q(`span`,{class:`input-group-addon`,children:q(J,{name:i||r?`lock`:`unlock`})}),q(`input`,{class:`form-control`,type:u?`text`:`password`,"aria-label":l(`Encryption Password`)+`: `+e,autoComplete:`off`,value:r,disabled:i||!n,required:n&&!i&&a,placeholder:l(i?`Received data is already encrypted`:n?a?`Device is untrusted, enter encryption password`:`If untrusted, enter encryption password`:`Not shared`),onInput:e=>c(e.currentTarget.value)}),q(`span`,{class:`input-group-btn`,children:q(`button`,{type:`button`,class:`btn btn-default`,disabled:i||!n,"aria-label":l(u?`Hide password`:`Show password`),onClick:()=>d(!u),children:q(J,{name:u?`eye-off`:`eye`})})})]})]})}function ai({action:e,state:t,api:n,session:r,onClose:i,onSaved:a}){let{t:o}=V(G),s=e.type.includes(`device`)?`device`:`folder`,c=!!e.defaults,l=e.type.startsWith(`add`),[u,d]=R(()=>X(e[s])),[f,p]=R(e.tab===`sharing`?`Sharing`:e.tab===`ignores`?`Ignore Patterns`:`General`),[m,h]=R(!1),[g,_]=R(``),[v,y]=R(!1),[b,x]=R(!1),S=B(!0),[C,w]=R([]),[T,E]=R(`edit`),[O,k]=R(``),A=B([]),[j,M]=R(!1),N=B(!1),ee=B(),[P,te]=R(()=>Object.fromEntries((u.devices||[]).map(e=>[e.deviceID,e.encryptionPassword||``]))),[ne,re]=R(()=>Object.fromEntries(t.config.folders.map(e=>{let t=e.devices.find(e=>e.deviceID===u.deviceID);return[e.id,{selected:!!t,password:t?.encryptionPassword||``}]}))),ie=(s===`folder`?[`General`,`Sharing`,`File Versioning`,`Ignore Patterns`,`Advanced`]:[`General`,`Sharing`,`Advanced`]).filter(e=>!c||e!==`Sharing`),ae=Yn(s,f,t.config,t.system.myID).map(e=>rr(e,u,{kind:s,isNew:l,defaults:c,myID:t.system.myID})).filter(e=>!e.hidden&&(!c||![`id`,`deviceID`].includes(e.path))),oe=c?`Edit `+(s===`folder`?`Folder`:`Device`)+` Defaults`:(l?`Add `:`Edit `)+(s===`folder`?`Folder`:`Device`),se=s===`folder`?sr(u,t.config,t.system):null;z(()=>{if(s!==`folder`||!l&&!c||!u.path)return;let e=new AbortController;return n.get(`system/browse`,{current:u.path},e.signal).then(w).catch(t=>{e.signal.aborted||_(t.message)}),()=>e.abort()},[n,s,l,c,u.path]),z(()=>{if(s===`folder`&&l&&t.config.defaults.folder.path&&d(e=>({...e,path:tr(t.config.defaults.folder.path,e.label||e.id,t.system.pathSeparator)})),c&&s===`folder`){A.current=t.config.defaults.ignores.lines,k(A.current.join(` -`)),M(!0);return}s===`folder`&&!l&&u.type!==`receiveencrypted`&&n.get(`db/ignores`,{folder:u.id}).then(e=>{A.current=e.ignore||[],k(A.current.join(` -`)),M(!0),e.error&&_(e.error)}).catch(e=>_(e.message))},[]);function ce(e){return T===`ignores`&&e!==`Ignore Patterns`||s===`folder`&&u.type===`receiveencrypted`&&e===`Ignore Patterns`}function F(e,n){e===`path`&&(S.current=!1),d(r=>nr(r,e,n,{kind:s,isNew:l,defaults:c,autoPath:S.current,config:t.config,system:t.system}))}async function le(){M(!1),y(!0),_(``);try{let e=await n.get(`db/ignores`,{folder:u.id});A.current=e.ignore?.length||e.error?e.ignore||[]:t.config.defaults?.ignores?.lines||[],k(A.current.join(` -`)),M(!0),e.error&&_(e.error)}catch(e){_(e.message)}finally{y(!1)}}function ue(e,t){te(n=>({...n,[e]:t})),d(n=>({...n,devices:n.devices.map(n=>n.deviceID===e?{...n,encryptionPassword:t}:n)}))}function de(e,t){d(n=>({...n,devices:t?[...n.devices,{deviceID:e,encryptionPassword:P[e]||``}]:n.devices.filter(t=>t.deviceID!==e)}))}function fe(e,t,n){re(r=>({...r,[e]:{...r[e],[t]:n}}))}async function pe(){if(ee.current.reportValidity()){y(!0),_(``);try{if(c)await $n({session:r,api:n,state:t,kind:s,draft:u,isNew:l,shares:ne,defaults:c,ignores:Qn(O)});else if(T===`ignores`){if(!j)return;await n.post(`db/ignores`,{ignore:Qn(O)},{folder:u.id}),await r.setPaused(`folders`,u.id,!!u.paused)}else if(s===`folder`&&l&&b&&u.type!==`receiveencrypted`){await $n({session:r,api:n,state:t,kind:s,draft:{...X(u),paused:!0},isNew:l,shares:ne}),E(`ignores`),p(`Ignore Patterns`),await le();return}else s===`folder`&&j&&O!==A.current.join(` -`)&&await n.post(`db/ignores`,{ignore:Qn(O)},{folder:u.id}),await $n({session:r,api:n,state:t,kind:s,draft:u,isNew:l,shares:ne});N.current=!0,a?.(X(u),Qn(O)),i()}catch(e){_(e.message)}finally{y(!1)}}}async function me(){if(!v){if(!N.current&&T===`ignores`&&j){N.current=!0;try{await n.post(`db/ignores`,{ignore:A.current},{folder:u.id}),await r.setPaused(`folders`,u.id,!!u.paused)}catch(e){r.reportError(e)}}i()}}return q(D,{children:[q(Y,{title:oe,large:!0,icon:`settings`,footer:q(D,{children:[!c&&!l&&T===`edit`&&u.deviceID!==t.system.myID&&q(`button`,{class:`btn btn-warning btn-sm pull-left`,disabled:v,onClick:()=>h(!0),children:o(`Remove`)}),q(`button`,{class:`btn btn-primary btn-sm`,disabled:v||T===`ignores`&&!j,onClick:pe,children:[q(J,{name:`check`}),`\xA0`,o(`Save`)]}),q(`button`,{class:`btn btn-default btn-sm`,disabled:v,onClick:me,children:[q(J,{name:`x`}),`\xA0`,o(`Cancel`)]})]}),onClose:me,onCancel:me,children:q(`form`,{ref:ee,onSubmit:e=>{e.preventDefault(),pe()},children:[q(`ul`,{class:`nav nav-tabs`,children:ie.map(e=>q(`li`,{class:f===e?`active`:ce(e)?`disabled`:``,children:q(`a`,{href:`#editor-${e}`,"aria-disabled":ce(e),onClick:t=>{t.preventDefault(),ce(e)||p(e)},children:o(e)})},e))}),g&&q(`p`,{class:`text-danger`,role:`alert`,children:o(g)}),q(`datalist`,{id:`directory-list`,children:C.map(e=>q(`option`,{value:e},e))}),q(`datalist`,{id:`editor-groups`,children:[...new Set(t.config[s===`folder`?`folders`:`devices`].map(e=>e.group).filter(Boolean))].map(e=>q(`option`,{value:e},e))}),q(`div`,{class:`tab-content`,children:f===`Sharing`?q(D,{children:[q(`div`,{class:`folder-actions`,children:[!0,!1].map(e=>q(`button`,{type:`button`,class:`btn btn-link btn-sm`,onClick:()=>{s===`folder`?d(n=>({...n,devices:e?t.config.devices.map(e=>n.devices.find(t=>t.deviceID===e.deviceID)||{deviceID:e.deviceID,encryptionPassword:P[e.deviceID]||``}):n.devices.filter(e=>e.deviceID===t.system.myID)})):re(t=>Object.fromEntries(Object.entries(t).map(([t,n])=>[t,{...n,selected:e}])))},children:o(e?`Select All`:`Deselect All`)},String(e)))}),q(`p`,{class:`help-block`,children:o(s===`folder`?`Select additional devices to share this folder with.`:`Select the folders to share with this device.`)}),s===`folder`?t.config.devices.filter(e=>e.deviceID!==t.system.myID).map(e=>{let n=u.devices.find(t=>t.deviceID===e.deviceID);return q(ii,{label:W(e),id:e.deviceID,selected:!!n,password:P[e.deviceID]||``,encrypted:u.type===`receiveencrypted`,required:e.untrusted||t.pendingFolders[u.id]?.offeredBy?.[e.deviceID]?.remoteEncrypted,remoteState:t.completion[e.deviceID]?.[u.id]?.remoteState,onSelected:t=>de(e.deviceID,t),onPassword:t=>ue(e.deviceID,t)},e.deviceID)}):t.config.folders.map(e=>q(ii,{label:e.label||e.id,id:e.id,selected:ne[e.id].selected,password:ne[e.id].password,encrypted:e.type===`receiveencrypted`,required:u.untrusted||t.pendingFolders[e.id]?.offeredBy?.[u.deviceID]?.remoteEncrypted,remoteState:t.completion[u.deviceID]?.[e.id]?.remoteState,onSelected:t=>fe(e.id,`selected`,t),onPassword:t=>fe(e.id,`password`,t)},e.id))]}):f===`Ignore Patterns`?q(D,{children:[q(`p`,{class:`help-block`,children:[o(`Enter ignore patterns, one per line.`),` `,q(`a`,{href:`https://docs.syncthing.net/users/ignoring.html`,target:`_blank`,rel:`noreferrer`,children:o(`full documentation`)})]}),T===`ignores`&&q(D,{children:[q(`p`,{children:[o(`Set Ignores on Added Folder`),` · `,u.label||u.id]}),!j&&q(`button`,{type:`button`,class:`btn btn-default`,disabled:v,onClick:le,children:o(`Retry`)})]}),l&&T!==`ignores`?q(D,{children:[q(`label`,{children:[q(`input`,{type:`checkbox`,checked:b,onChange:e=>x(e.currentTarget.checked)}),` `,o(`Add Ignore Patterns`)]}),q(`p`,{children:o(`Patterns are applied before the folder starts synchronizing.`)})]}):q(`textarea`,{class:`form-control`,rows:`12`,"aria-label":o(`Ignore Patterns`),value:O,disabled:u.type===`receiveencrypted`||!j,onInput:e=>k(e.currentTarget.value)})]}):q(D,{children:[s===`device`&&f===`General`&&!c&&q(ei,{device:u,api:n}),ae.map(e=>q(`div`,{class:`form-group`,children:[e.type===`checkbox`?q(`label`,{children:[q(`input`,{type:`checkbox`,checked:e.checked??!!qn(u,e.path),disabled:e.disabled,onChange:t=>F(e.path,Zn(e,t.currentTarget))}),` `,o(e.label)]}):q(D,{children:[q(`label`,{for:`editor-`+e.path,children:o(e.label)}),jr[e.label]&&q(Q,{icon:`info`,label:e.label,text:jr[e.label].help}),e.type===`select`?q(`select`,{id:`editor-`+e.path,class:`form-control`,value:Xn(u,e),disabled:e.disabled,onChange:t=>F(e.path,t.currentTarget.value),children:e.options.map(([e,t])=>q(`option`,{value:e,children:o(t)},e))}):q(`input`,{id:`editor-`+e.path,class:`form-control`,type:e.type===`list`?`text`:e.type,value:Xn(u,e),disabled:e.disabled,list:e.path===`path`?`directory-list`:e.path===`group`?`editor-groups`:void 0,readOnly:!l&&!c&&[`id`,`path`,`deviceID`].includes(e.path),required:!c&&[`id`,`path`,`deviceID`].includes(e.path),step:e.path.endsWith(`.value`)?`0.01`:void 0,min:e.type===`number`?0:void 0,onInput:t=>F(e.path,Zn(e,t.currentTarget))})]}),e.type===`checkbox`&&jr[e.label]&&q(Q,{icon:`info`,label:e.label,text:jr[e.label].help}),e.path===`path`&&se&&q(`p`,{class:`text-warning`,children:o(se.type===`subdirectory`?`Warning, this path is a subdirectory of an existing folder "{%otherFolder%}".`:`Warning, this path is a parent directory of an existing folder "{%otherFolder%}".`).replace(`{%otherFolder%}`,se.folder.label||se.folder.id)})]},e.path)),f===`File Versioning`&&u.versioning.type&&(u.versioning.type===`simple`?[[`keep`,`Keep Versions`],[`cleanoutDays`,`Clean out after`]]:u.versioning.type===`trashcan`?[[`cleanoutDays`,`Clean out after`]]:u.versioning.type===`staggered`?[[`maxAge`,`Maximum Age`]]:[[`command`,`External Versioning Command`]]).map(([e,t])=>q(`div`,{class:`form-group`,children:[q(`label`,{for:`version-`+e,children:[o(t),e===`maxAge`?` (`+o(`days`)+`)`:``]}),q(`input`,{id:`version-`+e,class:`form-control`,type:e===`command`?`text`:`number`,min:+(e===`keep`),required:!0,value:e===`maxAge`?Math.floor(Number(u.versioning.params?.[e]||0)/86400):u.versioning.params?.[e]||``,onInput:t=>F(`versioning.params.`+e,e===`maxAge`?String(Number(t.currentTarget.value)*86400):t.currentTarget.value)})]},e)),s===`folder`&&f===`Advanced`&&(u.syncXattrs||u.sendXattrs)&&q(D,{children:[q(`p`,{children:[o(`Extended Attributes Filter`),` · `,q(`a`,{href:`https://docs.syncthing.net/advanced/folder-xattr-filter.html`,target:`_blank`,rel:`noreferrer`,children:o(`Help`)})]}),q(`p`,{children:o(`To permit a rule, have the checkbox checked. To deny a rule, leave it unchecked.`)}),(u.xattrFilter?.entries||[]).map((e,t)=>q(`div`,{class:`port-xattr-rule`,children:[q(`input`,{type:`checkbox`,"aria-label":o(`permit`)+` `+(t+1),checked:e.permit,onChange:e=>F(`xattrFilter.entries.`+t+`.permit`,e.currentTarget.checked)}),q(`input`,{class:`form-control`,"aria-label":o(`Active filter rules`)+` `+(t+1),value:e.match,onInput:e=>F(`xattrFilter.entries.`+t+`.match`,e.currentTarget.value)}),q(`button`,{type:`button`,class:`btn btn-default`,onClick:()=>F(`xattrFilter.entries`,u.xattrFilter.entries.filter((e,n)=>n!==t)),children:o(`Remove`)})]},t)),q(`button`,{type:`button`,class:`btn btn-default`,onClick:()=>F(`xattrFilter.entries`,ir(u.xattrFilter?.entries)),children:o(`Add filter entry`)}),q(`p`,{children:[o(`Default`),`: `,o(ar(u.xattrFilter?.entries))]}),q(`p`,{children:o(or(u.xattrFilter?.entries))})]})]})})]})}),m&&q(ri,{action:{type:`remove-`+s,[s]:u},api:n,session:r,devices:t.config.devices,onClose:()=>h(!1),onDone:i})]})}function oi({draft:e,fields:t,onChange:n}){let{t:r}=V(G);return t.map(t=>q(`div`,{class:`form-group`,children:t.type===`checkbox`?q(`label`,{children:[q(`input`,{type:`checkbox`,checked:!!qn(e,t.path),onChange:e=>n(t.path,e.currentTarget.checked)}),` `,r(t.label)]}):q(D,{children:[q(`label`,{for:`config-`+t.path,children:r(t.label)}),t.type===`select`?q(`select`,{id:`config-`+t.path,class:`form-control`,value:Xn(e,t),onChange:e=>n(t.path,e.currentTarget.value),children:t.options.map(([e,t])=>q(`option`,{value:e,children:r(t)},e))}):t.type===`lines`?q(`textarea`,{id:`config-`+t.path,class:`form-control`,rows:`6`,value:(qn(e,t.path)||[]).join(` -`),onInput:e=>n(t.path,e.currentTarget.value.split(` -`))}):q(`input`,{id:`config-`+t.path,class:`form-control`,type:t.type===`list`?`text`:t.type,step:`any`,min:t.min,required:t.required,value:Xn(e,t),onInput:e=>n(t.path,Zn(t,e.currentTarget))})]})},t.path))}var si=e=>e.startsWith(`/`)||e.startsWith(`unix://`)||e.startsWith(`unixs://`),ci=[`General`,`GUI`,`Connections`,`Ignored Devices`,`Ignored Folders`],li=e=>e.options.upgradeToPreReleases?`candidate`:e.options.autoUpgradeIntervalH>0?`stable`:`none`;function ui(e,t,n,r){let i=Yn(`settings`,e,t,n).map(e=>e.type===`number`?{...e,min:0,required:!0}:e);return e===`General`?i.filter(e=>e.path!==`options.startBrowser`):e===`GUI`?i.filter(e=>e.path!==`gui.unixSocketPermissions`||si(t.gui.address)).concat([{path:`options.startBrowser`,label:`Start Browser`,type:`checkbox`},...r.length>1?[{path:`gui.theme`,label:`GUI Theme`,type:`select`,options:[...new Set([...r,t.gui.theme])].filter(Boolean).map(e=>[e,e])}]:[]]):i}function di(e,t,n,r,i){let a=X(e),o=a.options;i&&(o.autoUpgradeIntervalH=t===`none`?0:o.autoUpgradeIntervalH||12,o.upgradeToPreReleases=t===`candidate`),(t===`candidate`||r.isCandidate)&&(o.urAccepted=n.urVersionMax,o.urSeen=n.urVersionMax);for(let e of[o.minHomeDiskFree.value,o.maxRecvKbps,o.maxSendKbps])if(!Number.isFinite(e)||e<0)throw Error(`Enter a non-negative number.`);let s=a.gui.address;if(!si(s)){let e=Number(s.slice(s.lastIndexOf(`:`)+1));if(!s.includes(`:`)||!Number.isInteger(e)||e<1024||e>65535)throw Error(`Enter a non-privileged port number (1024 - 65535).`)}else if(!/^0?[0-7]{0,3}$/.test(a.gui.unixSocketPermissions||``))throw Error(`Enter up to three octal digits.`);return a}var fi=e=>e.devices.flatMap(e=>(e.ignoredFolders||[]).map(t=>({device:e,folder:t})));function pi(e,t,n){let r=X(e);if(n!==void 0){let e=r.devices.find(e=>e.deviceID===t);e.ignoredFolders=e.ignoredFolders.filter(e=>e.id!==n)}else r.remoteIgnoredDevices=r.remoteIgnoredDevices.filter(e=>e.deviceID!==t);return r}async function mi(e,t){let[n,r]=await Promise.allSettled([e.get(`system/upgrade`,void 0,t),fetch(new URL(`themes.json`,location.href),{signal:t}).then(e=>{if(!e.ok)throw Error(`Could not load GUI themes`);return e.json()})]);return{upgrade:n.status===`fulfilled`?n.value:null,themes:r.status===`fulfilled`?r.value.themes:[]}}function hi(e){return[[`GUI`,`gui`],[`LDAP`,`ldap`],[`Options`,`options`],...e.folders.map((e,t)=>[`Folder: `+(e.label||e.id),`folders.`+t]),...e.devices.map((e,t)=>[`Device: `+(e.name||e.deviceID),`devices.`+t]),[`Default Folder`,`defaults.folder`],[`Default Device`,`defaults.device`],[`Default Ignore Patterns`,`defaults.ignores`]].map(([t,n])=>{let r=n.split(`.`).reduce((e,t)=>e?.[t],e);return{label:t,path:n,fields:Object.entries(r||{}).flatMap(([e,t])=>e.startsWith(`_`)||t&&!Array.isArray(t)&&typeof t==`object`||Array.isArray(t)&&t.some(e=>![`number`,`string`].includes(typeof e))?[]:[{path:n+`.`+e,label:e.replace(/([a-z])([A-Z])/g,`$1 $2`),type:e===`lines`?`lines`:Array.isArray(t)?`list`:typeof t==`boolean`?`checkbox`:typeof t==`number`?`number`:`text`}])}})}function gi({state:e,api:t,session:n,onClose:r,advanced:i=!1}){let{t:a}=V(G),o=B(),[s]=R(()=>X(e.config)),[c,l]=R(()=>X(s)),[u,d]=R(li(s)),[f,p]=R(`General`),[m,h]=R({themes:[],upgrade:null}),[g,_]=R(!1),[v,y]=R(``),[b,x]=R(null),[S,C]=R(null),[w,T]=R(!1),E=ui(f,c,e.system.myID,m.themes),O=fi(c);z(()=>{let e=new AbortController;return mi(t,e.signal).then(t=>{e.signal.aborted||h(t)}),()=>e.abort()},[t]);function k(e,t){l(n=>Jn(n,e,t))}async function A(){if(o.current.reportValidity()){_(!0),y(``);try{let t=i?X(c):di(c,u,e.system,e.version,!!m.upgrade);await n.saveConfig(t),r(),s.gui.theme!==t.gui.theme&&location.reload()}catch(e){y(e.message)}finally{_(!1)}}}function j(){g||(JSON.stringify(c)!==JSON.stringify(s)||u!==li(s)?T(!0):r())}async function M(e){try{x({type:`edit-`+e,defaults:!0,[e]:await t.get(`config/defaults/`+e)})}catch(e){y(e.message)}}async function N(){try{k(`gui.apiKey`,(await t.get(`svc/random/string`,{length:32})).random)}catch(e){y(e.message)}}function ee(){C(!0)}return q(D,{children:[q(Y,{title:i?`Advanced Configuration`:`Settings`,status:i?`danger`:`default`,icon:`settings`,large:!0,onClose:r,onCancel:j,footer:q(D,{children:[q(`button`,{class:`btn btn-primary btn-sm`,disabled:g,onClick:A,children:a(`Save`)}),q(`button`,{class:`btn btn-default btn-sm`,disabled:g,onClick:j,children:a(`Close`)})]}),children:q(`form`,{ref:o,onSubmit:e=>{e.preventDefault(),A()},children:[v&&q(`p`,{class:`text-danger`,role:`alert`,children:a(v)}),q(`fieldset`,{disabled:g,children:i?q(D,{children:[q(`p`,{class:`text-danger`,children:[q(`strong`,{children:a(`Be careful!`)}),` `,a(`Incorrect configuration may damage your folder contents and render Syncthing inoperable.`)]}),hi(c).map(e=>q(`details`,{class:`panel panel-default`,children:[q(`summary`,{class:`panel-heading`,children:a(e.label)}),q(`div`,{class:`panel-body`,children:q(oi,{draft:c,fields:e.fields,onChange:k})})]},e.path))]}):q(D,{children:[q(`ul`,{class:`nav nav-tabs`,children:ci.map(e=>q(`li`,{class:f===e?`active`:``,children:q(`a`,{href:`#settings-`+e,onClick:t=>{t.preventDefault(),p(e)},children:a(e)})},e))}),f===`Ignored Devices`?q(D,{children:[!c.remoteIgnoredDevices?.length&&q(`p`,{children:a(`You have no ignored devices.`)}),q(`div`,{class:`table-responsive`,children:q(`table`,{class:`table table-striped`,children:q(`tbody`,{children:(c.remoteIgnoredDevices||[]).map(e=>q(`tr`,{children:[q(`td`,{children:U(e.time)}),q(`td`,{class:`word-break-all`,title:e.deviceID,children:e.name||e.deviceID}),q(`td`,{class:`word-break-all`,children:e.address}),q(`td`,{children:q(`button`,{type:`button`,class:`btn btn-default btn-sm`,onClick:()=>l(pi(c,e.deviceID)),children:a(`Unignore`)})})]},e.deviceID))})})})]}):f===`Ignored Folders`?q(D,{children:[!O.length&&q(`p`,{children:a(`You have no ignored folders.`)}),q(`div`,{class:`table-responsive`,children:q(`table`,{class:`table table-striped`,children:q(`tbody`,{children:O.map(({device:e,folder:t})=>q(`tr`,{children:[q(`td`,{children:U(t.time)}),q(`td`,{children:t.label||t.id}),q(`td`,{class:`word-break-all`,title:e.deviceID,children:e.name||e.deviceID}),q(`td`,{children:q(`button`,{type:`button`,class:`btn btn-default btn-sm`,onClick:()=>l(pi(c,e.deviceID,t.id)),children:a(`Unignore`)})})]},e.deviceID+t.id))})})})]}):q(D,{children:[q(oi,{draft:c,fields:E,onChange:k}),f===`GUI`&&e.system.guiAddressOverridden&&q(`p`,{class:`text-warning`,children:a(`The GUI address is overridden by startup options. Changes here will not take effect while the override is in place.`)}),f===`General`&&q(D,{children:[q(`label`,{for:`settings-api-key`,children:a(`API Key`)}),q(`div`,{class:`input-group`,children:[q(`input`,{id:`settings-api-key`,class:`form-control`,type:`text`,readOnly:!0,value:c.gui.apiKey}),q(`span`,{class:`input-group-btn`,children:q(`button`,{type:`button`,class:`btn btn-default`,onClick:N,children:a(`Generate`)})})]}),q(`div`,{class:`form-group`,children:[q(`label`,{for:`settings-usage`,children:a(`Anonymous Usage Reporting`)}),` `,q(`button`,{type:`button`,class:`btn btn-link btn-sm`,onClick:ee,children:a(`Preview`)}),u===`candidate`||e.version.isCandidate?q(`p`,{children:a(`Usage reporting is always enabled for candidate releases.`)}):q(`select`,{id:`settings-usage`,class:`form-control`,value:c.options.urAccepted,onChange:e=>k(`options.urAccepted`,Number(e.currentTarget.value)),children:[Array.from({length:Math.max(0,(e.system.urVersionMax||1)-1)},(t,n)=>e.system.urVersionMax-n).map(e=>q(`option`,{value:e,children:[a(`Version`),` `,e]},e)),q(`option`,{value:0,children:a(`Undecided (will prompt)`)}),q(`option`,{value:-1,children:a(`Disabled`)})]})]}),q(`div`,{class:`form-group`,children:[q(`label`,{for:`settings-upgrades`,children:a(`Automatic upgrades`)}),m.upgrade?q(`select`,{id:`settings-upgrades`,class:`form-control`,value:u,onChange:e=>d(e.currentTarget.value),children:[!e.version.isCandidate&&q(`option`,{value:`none`,children:a(`No upgrades`)}),q(`option`,{value:`stable`,children:a(`Stable releases only`)}),q(`option`,{value:`candidate`,children:a(`Stable releases and release candidates`)})]}):q(`p`,{children:a(`Unavailable/Disabled by administrator or maintainer`)})]}),q(`p`,{children:q(`strong`,{children:a(`Default Configuration`)})}),q(`div`,{class:`folder-actions`,children:[q(`button`,{type:`button`,class:`btn btn-default`,onClick:()=>M(`folder`),children:a(`Edit Folder Defaults`)}),q(`button`,{type:`button`,class:`btn btn-default`,onClick:()=>M(`device`),children:a(`Edit Device Defaults`)})]})]})]})]})})]})}),b&&q(ai,{action:b,state:e,api:t,session:n,onSaved:(e,t)=>{l(n=>{let r=Jn(n,`defaults.`+(b.folder?`folder`:`device`),e);return b.folder&&(r.defaults.ignores.lines=t),r})},onClose:()=>x(null)}),S&&q(Kn,{api:t,session:n,state:e,onClose:()=>C(null)}),w&&q(Y,{title:`Discard Changes`,onClose:()=>T(!1),footer:q(D,{children:[q(`button`,{class:`btn btn-warning`,onClick:r,children:a(`Discard Changes`)}),q(`button`,{class:`btn btn-default`,onClick:()=>T(!1),children:a(`Cancel`)})]}),children:q(`p`,{children:a(`Discard unsaved changes?`)})})]})}function _i({api:e,folder:t,device:n,state:r,single:i}){let{t:a}=V(G),[o,s]=R(1),[c,l]=R(10),[u,d]=R([]),[f,p]=R(``),m=r.completion[n.deviceID]?.[t.id]?.needItems+`:`+r.completion[n.deviceID]?.[t.id]?.needBytes;z(()=>{let r=new AbortController;return e.get(`db/remoteneed`,{folder:t.id,device:n.deviceID,page:o,perpage:c},r.signal).then(e=>{d(e.files||[]),p(``)}).catch(e=>{r.signal.aborted||p(e.message)}),()=>r.abort()},[e,t.id,n.deviceID,o,c,m]);let h=e=>W(r.config.devices.find(t=>t.deviceID.startsWith(e||`\0`)))||e||a(`Unknown`);return q(`details`,{class:`panel panel-default`,open:i,children:[q(`summary`,{class:`panel-heading`,children:t.label||t.id}),q(`div`,{class:`panel-body less-padding`,children:[f&&q(`p`,{class:`text-danger`,role:`alert`,children:f}),q(`table`,{class:`table table-striped`,children:[q(`thead`,{children:q(`tr`,{children:[`Path`,`Size`,`Mod. Time`,`Mod. Device`].map(e=>q(`th`,{title:e===`Mod. Time`?a(`Time the item was last modified`):e===`Mod. Device`?a(`Device that last modified the item`):void 0,children:a(e)},e))})}),q(`tbody`,{children:u.map(e=>q(`tr`,{children:[q(`td`,{class:`word-break-all`,children:e.name}),q(`td`,{children:[`DIRECTORY`,`FILE_INFO_TYPE_DIRECTORY`].includes(e.type)?``:H(e.size,!0)+`B`}),q(`td`,{children:U(e.modified)}),q(`td`,{children:h(e.modifiedBy)})]},e.name))})]}),q(Fr,{page:o,perpage:c,total:r.completion[n.deviceID]?.[t.id]?.needItems||u.length,onPage:s,onSize:l})]})]})}function vi(e,t=``,n=``,r=``){let i=new Map,a=t.toLowerCase().replaceAll(`\\`,`/`),o=n?new Date(n).getTime():-1/0,s=r?new Date(r).getTime():1/0;for(let[t,n]of Object.entries(e||{}).sort(([e],[t])=>e.localeCompare(t))){if(!t.toLowerCase().includes(a))continue;let e=n.filter(e=>{let t=new Date(e.versionTime).getTime();return t>=o&&t<=s}).sort((e,t)=>new Date(t.versionTime)-new Date(e.versionTime));if(!e.length)continue;let r=t.includes(`/`)?t.slice(0,t.lastIndexOf(`/`)):``;i.has(r)||i.set(r,[]),i.get(r).push({path:t,versions:e})}return[...i.entries()]}var yi=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>e));function bi(e,t,n){let r={...e};for(let e of t)n===`unset`?delete r[e.path]:r[e.path]=e.versions[n===`oldest`?e.versions.length-1:0].versionTime;return r}var xi=[[`latest`,`Select latest version`],[`oldest`,`Select oldest version`],[`unset`,`Do not restore all`]];function Si({api:e,folder:t,onClose:n}){let{t:r}=V(G),[i,a]=R(null),[o,s]=R({}),[c,l]=R({}),[u,d]=R(``),[f,p]=R(!1),[m,h]=R(!1),[g,_]=R(``),[v,y]=R(``),[b,x]=R(``),S=vi(i,g,v,b),C=yi(o),w=Object.keys(C).length;z(()=>{let n=new AbortController;return e.get(`folder/versions`,{folder:t.id},n.signal).then(a).catch(e=>{n.signal.aborted||d(e.message)}),()=>n.abort()},[e,t.id]);async function T(){p(!0),d(``);try{let r=await e.post(`folder/versions`,C,{folder:t.id});l(r),h(!1),Object.keys(r).length?(s(Object.fromEntries(Object.entries(C).filter(([e])=>r[e]))),a(await e.get(`folder/versions`,{folder:t.id}))):n()}catch(e){d(e.message)}finally{p(!1)}}let E=e=>xi.map(([t,n])=>q(`button`,{class:`btn btn-default btn-sm`,onClick:()=>s(n=>bi(n,e,t)),children:r(n)},t));return q(Y,{title:r(`Restore Versions`)+` - `+(t.label||t.id),icon:`undo`,large:!0,onClose:n,onCancel:()=>{f||n()},footer:m?q(D,{children:[q(`button`,{class:`btn btn-warning btn-sm`,disabled:f,onClick:T,children:r(`Yes`)}),q(`button`,{class:`btn btn-default btn-sm`,disabled:f,onClick:()=>h(!1),children:r(`No`)})]}):q(D,{children:[q(`button`,{class:`btn btn-primary btn-sm`,disabled:f||!w,onClick:()=>h(!0),children:[r(`Restore`),` (`,w,`)`]}),q(`button`,{class:`btn btn-default btn-sm`,disabled:f,onClick:n,children:r(`Close`)})]}),children:[u&&q(`p`,{class:`text-danger`,role:`alert`,children:u}),Object.keys(c).length>0&&q(D,{children:[q(`p`,{children:r(`Some items could not be restored:`)}),q(`table`,{class:`table table-striped`,children:q(`tbody`,{children:Object.entries(c).map(([e,t])=>q(`tr`,{children:[q(`td`,{class:`word-break-all`,children:e}),q(`td`,{class:`word-break-all text-danger`,children:t})]},e))})})]}),i===null&&!u?q(`p`,{role:`status`,children:r(`Loading data...`)}):i&&!Object.keys(i).length?q(`p`,{children:r(`There are no file versions to restore.`)}):i&&q(`fieldset`,{disabled:f||m,children:[q(`div`,{class:`port-version-filters`,children:[q(`label`,{children:[r(`Filter by name`),q(`input`,{class:`form-control`,type:`search`,value:g,onInput:e=>_(e.currentTarget.value)})]}),q(`label`,{children:[r(`Filter by date`),` · `,r(`From`),q(`input`,{class:`form-control`,type:`datetime-local`,step:`1`,value:v,onInput:e=>y(e.currentTarget.value)})]}),q(`label`,{children:[r(`Filter by date`),` · `,r(`To`),q(`input`,{class:`form-control`,type:`datetime-local`,step:`1`,value:b,onInput:e=>x(e.currentTarget.value)})]})]}),q(`div`,{class:`folder-actions`,children:E(S.flatMap(([,e])=>e))}),S.map(([e,n])=>q(`details`,{class:`port-version-group`,open:!0,children:[q(`summary`,{children:[q(J,{name:`folder`}),` `,e||t.label||t.id]}),q(`div`,{class:`folder-actions`,children:E(n)}),n.map((e,t)=>q(`div`,{class:`port-version-row ${t%2==0?`section-stripe`:``}`,children:[q(`span`,{class:`folder-text`,title:e.path,children:e.path.slice(e.path.lastIndexOf(`/`)+1)}),q(`select`,{class:`form-control input-sm`,"aria-label":e.path,value:o[e.path]||``,onChange:t=>s({...o,[e.path]:t.currentTarget.value}),children:[q(`option`,{value:``,children:r(`Do not restore`)}),o[e.path]&&!e.versions.some(t=>t.versionTime===o[e.path])&&q(`option`,{value:o[e.path],children:U(o[e.path])}),e.versions.map(e=>q(`option`,{value:e.versionTime,children:[U(e.versionTime),` · `,H(e.size,!0),`B`]},e.versionTime))]})]},e.path))]},e))]}),m&&q(`div`,{class:`alert alert-warning`,role:`alert`,children:r(`Are you sure you want to restore {%count%} files?`,{count:w}).replace(`{%count%}`,w)})]})}function Ci({action:e,state:t,api:n,session:r,onClose:i}){let{t:a}=V(G),o=e=>W(t.config.devices.find(t=>t.deviceID.startsWith(e||`\0`)))||e||a(`Unknown`);if([`restart`,`shutdown`,`upgrade`].includes(e.type))return q(ti,{kind:e.type,state:t,session:r,onClose:i});if(e.type===`logs`)return q(ni,{api:n,onClose:i});if(e.type===`settings`||e.type===`advanced`)return q(gi,{state:t,api:n,session:r,onClose:i,advanced:e.type===`advanced`});if(e.type.startsWith(`edit-`)||e.type.startsWith(`add-`))return q(ai,{action:e,state:t,api:n,session:r,onClose:i});if([`override`,`revert`].includes(e.type))return q(ri,{action:e,api:n,session:r,onClose:i,onDone:i});if(e.type===`versions`)return q(Si,{api:n,folder:e.folder,onClose:i});if(e.type===`about`)return q(Qr,{api:n,version:t.version,onClose:i});if(e.type===`identification`)return q(Y,{title:a(`Device Identification`)+` - `+W(e.device),large:!0,status:`info`,icon:`qrcode`,onClose:i,children:q(`div`,{class:`text-center`,children:[q(`div`,{class:`well well-sm text-monospace`,children:q(`strong`,{children:e.device.deviceID})}),q(`img`,{class:`img-thumbnail`,src:`qr/?text=`+encodeURIComponent(e.device.deviceID),height:`328`,width:`328`,alt:a(`QR code`)}),q(ei,{device:e.device,api:n})]})});if(e.type===`listeners`||e.type===`discovery`){let n=ot(e.type===`listeners`?t.system.connectionServiceStatus:t.system.discoveryStatus);return q(Y,{title:e.type===`listeners`?n.failed.length?`Listener Failures`:`Listener Status`:n.failed.length?`Discovery Failures`:`Discovery Status`,status:n.failed.length?`danger`:`default`,icon:`network`,onClose:i,children:[e.type===`listeners`?q(`p`,{children:a(n.running?`Syncthing is listening on the following network addresses for connection attempts from other devices:`:`Syncthing is not listening for connection attempts from other devices on any address. Only outgoing connections from this device may work.`)}):q(D,{children:[q(`p`,{children:a(n.running?`The following methods are used to discover other devices on the network and announce this device to be found by others:`:`This device cannot automatically discover other devices or announce its own address to be found by others. Only devices with statically configured addresses can connect.`)}),q(`p`,{children:a(`Failure to connect to IPv6 servers is expected if there is no IPv6 connectivity.`)})]}),n.entries.map(([e,t])=>q(`section`,{children:[q(`h5`,{children:e}),q(`dl`,{children:Object.entries(t||{}).map(([e,t])=>q(`div`,{children:[q(`dt`,{children:e}),q(`dd`,{class:e===`error`?`text-danger`:``,children:Array.isArray(t)?t.join(`, `):typeof t==`object`?JSON.stringify(t):t})]},e))})]},e))]})}if(e.type===`remote-needed`){let r=Ke(t.config,e.device.deviceID).filter(n=>{let r=t.completion[e.device.deviceID]?.[n.id];return!r||r.needItems+r.needDeletes>0});return q(Y,{title:a(`Out of Sync Items`)+` - `+W(e.device),large:!0,status:`info`,icon:`arrow-left-right`,onClose:i,children:r.map(i=>q(_i,{api:n,folder:i,device:e.device,state:t,single:r.length===1},i.id))})}return e.type===`changes`?q(Y,{title:`Recent Changes`,large:!0,expandable:!0,icon:`info`,onClose:i,children:q(`div`,{class:`table-responsive`,children:q(`table`,{class:`table table-condensed table-striped recent-changes-table`,children:[q(`colgroup`,{children:[q(`col`,{class:`recent-device`}),q(`col`,{class:`recent-action`}),q(`col`,{class:`recent-type`}),q(`col`,{class:`recent-folder`}),q(`col`,{class:`recent-path`}),q(`col`,{class:`recent-time`})]}),q(`thead`,{children:q(`tr`,{children:[`Device`,`Action`,`Type`,`Folder`,`Path`,`Time`].map(e=>q(`th`,{children:a(e)},e))})}),q(`tbody`,{children:t.globalChanges.map(e=>{let n=t.config.folders.find(t=>t.id===e.data.folder)?.label||e.data.folder;return q(`tr`,{children:[q(`td`,{title:o(e.data.modifiedBy),children:o(e.data.modifiedBy)}),q(`td`,{children:a(e.data.action)}),q(`td`,{children:a(e.data.type)}),q(`td`,{title:n,children:n}),q(`td`,{children:q(Q,{label:e.data.path,text:e.data.path,triggerText:e.data.path,tail:!0})}),q(`td`,{children:U(e.time)})]},e.id)})})]})})}):null}var wi=/^(.*)\.sync-conflict-\d{8}-\d{6}-[A-Z2-7]{7}(\..*)?$/,Ti=e=>e.includes(`/`)?e.slice(0,e.lastIndexOf(`/`)):``,Ei=e=>e.slice(e.lastIndexOf(`/`)+1);function Di(e){let t=wi.exec(Ei(e));if(!t)return null;let n=t[1]+(t[2]||``);return wi.test(n)?null:(Ti(e)?Ti(e)+`/`:``)+n}var Oi=e=>e?.type===`FILE_INFO_TYPE_FILE`&&![`deleted`,`ignored`,`invalid`,`mustRescan`].some(t=>e[t]);async function ki(e,t,n,r){let i;try{i=await e.get(`db/file`,{folder:t,file:n},r)}catch(e){if(e.status===404)return null;throw e}if(!Oi(i.global))return null;let a=Oi(i.local),o=a?i.local:i.global;return{path:n,name:Ei(n),bytes:o.size,modified:o.modified,available:a,digest:a?o.blocksHash??null:null}}function*Ai(e,t=``){for(let n of e){let e=t?t+`/`+n.name:n.name;n.type===`FILE_INFO_TYPE_DIRECTORY`?yield*Ai(n.children||[],e):n.type===`FILE_INFO_TYPE_FILE`&&(yield e)}}async function ji(e,t,{prefix:n=``,signal:r}={}){let i=await e.get(`db/browse`,{folder:t.id,prefix:n},r),a=new Map;for(let o of Ai(i,n)){let n=Di(o);if(!n)continue;let i=await ki(e,t.id,o,r);i&&(a.has(n)||a.set(n,{id:JSON.stringify([t.id,n]),folder:t.id,folderName:t.label||t.id,root:t.path,path:n,name:Ei(n),copies:[],current:null}),a.get(n).copies.push(i))}for(let n of a.values())n.current=await ki(e,t.id,n.path,r),n.copies.sort((e,t)=>t.name.localeCompare(e.name));return[...a.values()].sort((e,t)=>e.path.localeCompare(t.path))}async function Mi(e,t,n){let r=await Promise.allSettled(t.map(t=>ji(e,t,{signal:n})));if(n?.aborted)throw n.reason;return{groups:r.flatMap(e=>e.status===`fulfilled`?e.value:[]),errors:r.flatMap((e,n)=>e.status===`rejected`?[(t[n].label||t[n].id)+`: `+e.reason.message]:[])}}async function Ni(e,t,n,r){if(await e.post(`db/scan`,void 0,n?{folder:n.folder,sub:Ti(n.path)}:{},r),!n)return Mi(e,t,r);let i=t.find(e=>e.id===n.folder);if(!i)throw Error(`Folder is no longer configured`);return{groups:await ji(e,i,{prefix:Ti(n.path),signal:r}),errors:[]}}function Pi(e,t,n){let r=Ti(t.path);return[...e.filter(e=>e.folder!==t.folder||r&&!e.path.startsWith(r+`/`)),...n]}var Fi=`The latest Syncthing index has no usable file at the original name. Conflict files are ordinary files with a conflict marker in their names. Rename the version you want to keep, or delete unwanted conflict files, then recheck. Rechecking alone does not rename or delete files.`;function Ii({group:e,selected:t,permission:n,showAccessReason:r,loading:i,scanning:a,onSelect:o,onOpen:s,onRename:c,onRecheck:l}){let{t:u}=V(G),d=e.copies.find(e=>e.path===t)||e.copies[0],f=n(e,d),p=n(e,e.current||d);function m(e,t){if(!t)return q(`span`,{class:`text-warning`,children:[q(Q,{icon:`triangle-alert`,label:`Missing current file`,text:u(Fi)}),` `,u(`Missing current file`)]});if(!t.available)return q(`span`,{class:`text-warning`,title:u(`Waiting for Syncthing to download this file`),children:[t.name,` · `,u(`Not available locally`)]});let r=q(D,{children:[q(J,{name:`file`,class:`icon-fixed`}),q(`span`,{class:`review-filename`,children:t.name})]});return n(e,t).open?q(`a`,{class:`review-file`,href:`#open-file`,title:e.root+`/`+t.path,onClick:n=>{n.preventDefault(),s(e,t)},children:r}):q(`span`,{class:`review-file`,title:e.root+`/`+t.path,children:r})}let h=e=>q(D,{children:[H(e.bytes,!0),`B · `,U(e.modified)]});return q(`tr`,{class:`review-row`,children:[q(`td`,{class:`review-context`,children:q(`span`,{class:`review-path`,title:e.root+`/`+Ti(e.path),children:[e.folderName,Ti(e.path)?` / `+Ti(e.path):``]})}),q(`td`,{class:`review-current`,children:[q(`span`,{class:`review-cell-label`,children:u(`Current file`)}),m(e,e.current),e.current?q(`small`,{class:`review-file-meta`,children:h(e.current)}):q(`small`,{class:`review-file-meta review-missing-hint`,children:[u(`To keep a conflict file, rename it to:`),` `,q(`span`,{class:`review-filename`,title:e.root+`/`+e.path,children:e.name})]})]}),q(`td`,{class:`review-copies`,children:[e.copies.length>1?q(`select`,{class:`form-control input-sm review-version`,"aria-label":u(`Conflict files`)+`: `+e.name,value:d.path,title:d.name,onChange:e=>o(e.currentTarget.value),children:e.copies.map((t,n)=>q(`option`,{value:t.path,children:[n+1,`/`,e.copies.length,` · `,t.name]},t.path))}):q(`span`,{class:`review-mobile-label`,children:u(`Conflict files`)}),m(e,d),q(`small`,{class:`review-file-meta review-conflict-meta`,children:[h(d),!e.current&&d.available&&q(`button`,{class:`btn btn-default review-autoresolve`,disabled:!f.rename||i,title:u(f.reason||``),onClick:()=>c(d),children:q(`span`,{class:`text-warning`,children:u(`Autoresolve`)})})]}),r&&f.reason&&q(`small`,{class:`text-warning`,children:u(f.reason)})]}),q(`td`,{class:`review-actions`,children:[q(`button`,{class:`btn btn-default`,disabled:!p.open||i,title:u(p.reason||``),onClick:()=>s(e),children:[q(J,{name:`folder-open`}),` `,u(`Open folder`)]}),q(`button`,{class:`btn btn-default`,disabled:i,"aria-busy":a===e.id,onClick:l,children:q(`span`,{class:a===e.id?`text-warning review-rechecking`:``,children:[q(J,{name:`refresh`,class:a===e.id?`icon-spin`:``}),` `,u(`Recheck files in folder`)]})})]})]},e.id)}function Li({api:e,folders:t,active:r,ready:i,hostActions:a=null,device:o}){let{t:s}=V(G),[c,l]=R([]),[u,d]=R(``),[f,p]=R({}),[m,h]=R(!1),[g,_]=R(null),[v,y]=R([]),[b,x]=R(``),[S,C]=R(null),[w,T]=R({}),[E,O]=R(``),k=B();z(()=>{if(!r||!i)return;let e=new AbortController;return k.current=e,j(!1,null,e),()=>e.abort()},[r,i,t.map(e=>e.id).join(`|`)]);let A=c.filter(e=>[e.folderName,e.path,...e.copies.map(e=>e.path)].some(e=>e.toLocaleLowerCase().includes(u.toLocaleLowerCase())));async function j(n=!1,r=null,i=k.current){h(!0),_(n?r?.id||`all`:null),y([]),x(``);try{let o=n?await Ni(e,t,r,i.signal):await Mi(e,t,i.signal);if(i.signal.aborted)return;l(e=>r?Pi(e,r,o.groups):o.groups),y(o.errors),a?.status&&await N(o.groups,i.signal),n&&!o.errors.length&&x(`Syncthing scan finished; file list updated.`)}catch(e){i.signal.aborted||y([e.message])}finally{i.signal.aborted||(h(!1),_(null))}}async function M(e,t){let n=JSON.stringify([e.id,t.path]);try{return[n,await a.check(o,e,t)]}catch(e){return[n,{reason:e.message}]}}async function N(e,t){try{await a.status(o),O(``);let n=e.flatMap(e=>[e.current,...e.copies].filter(Boolean).map(t=>M(e,t))),r=await Promise.all(n);t.aborted||T(e=>({...e,...Object.fromEntries(r)}))}catch(e){O(e.message),T({})}}async function ee(e,t){try{await a.open(e,t,o)}catch(e){y([e.message])}}async function P(){h(!0),y([]);try{await a.rename(S.group,S.file,o);let e=S.group;C(null),await j(!0,e)}catch(e){y([e.message])}finally{h(!1)}}function te(e,t){return a?E?{reason:E}:a.check?w[JSON.stringify([e.id,t.path])]||{reason:`Checking local file access...`}:{open:!0,rename:!0}:{reason:n}}return q(D,{children:[q(`section`,{class:`conflict-review`,"aria-label":s(`Conflict files`),children:[q(`h3`,{children:s(`Review in your file manager`)}),(!a||E)&&q(`p`,{role:`status`,children:s(E||`Local file actions are unavailable. Open this UI from Syncshell on the desktop running Syncthing, under the same user.`)}),q(`div`,{class:`review-tools`,children:[q(`input`,{type:`search`,class:`form-control input-sm review-search`,placeholder:s(`Search filenames or paths`),"aria-label":s(`Search filenames or paths`),value:u,onInput:e=>d(e.currentTarget.value)}),q(`button`,{class:`btn btn-default review-recheck`,disabled:m,"aria-busy":g===`all`,onClick:()=>j(!0),children:q(`span`,{class:g===`all`?`text-warning review-rechecking`:``,children:[q(J,{name:`refresh`,class:g===`all`?`icon-spin`:``}),` `,s(`Recheck all files`)]})})]}),m&&q(`p`,{role:`status`,children:s(`Loading data...`)}),b&&q(`p`,{class:`review-message`,role:`status`,children:s(b)}),v.map(e=>q(`p`,{class:`review-message text-danger`,role:`alert`,children:e},e)),q(`table`,{class:`table table-striped review-table review-design-03`,"aria-label":s(`Conflict files`),children:[q(`thead`,{children:q(`tr`,{class:`review-column-headings`,children:[`Location`,`Current file`,`Conflict files`,`Actions`].map(e=>q(`th`,{scope:`col`,children:s(e)},e))})}),q(`tbody`,{children:A.map(e=>q(Ii,{group:e,selected:f[e.id],permission:te,showAccessReason:!(!a||E),loading:m,scanning:g,onSelect:t=>p({...f,[e.id]:t}),onOpen:ee,onRename:t=>C({group:e,file:t}),onRecheck:()=>j(!0,e)},e.id))})]}),!m&&!A.length&&!v.length&&q(`p`,{class:`text-success`,children:s(c.length?`No matches`:`No conflict files remain`)})]}),S&&q(Y,{title:s(`Restore original name`),onClose:()=>C(null),onCancel:()=>{m||C(null)},footer:q(D,{children:[q(`button`,{class:`btn btn-default`,disabled:m,onClick:()=>C(null),children:s(`Cancel`)}),q(`button`,{class:`btn btn-default`,disabled:m,onClick:P,children:q(`span`,{class:`text-warning`,children:s(`Rename`)})})]}),children:[q(`p`,{children:s(`The selected file keeps its contents and takes the original name shown below. Its conflict filename disappears; other conflict files remain.`)}),q(`p`,{children:s(`If a file already exists at the destination, nothing is renamed or replaced.`)}),q(`strong`,{children:[s(`From`),`:`]}),q(`p`,{class:`review-confirm-path`,children:[S.group.root,`/`,S.file.path]}),q(`strong`,{children:[s(`To`),`:`]}),q(`p`,{class:`review-confirm-path`,children:[S.group.root,`/`,S.group.path]}),v.map(e=>q(`p`,{class:`text-danger`,role:`alert`,children:e},e))]})]})}var Ri=[[`overview`,`Overview`],[`conflicts`,`Resolve sync conflicts`],[`notifications`,`Notifications`]],zi=[[`Introduction`,`https://github.com/syncshell/syncshell-webui#readme`],[`Home page`,`https://github.com/syncshell/syncshell-webui`],[`Documentation`,`https://docs.syncthing.net/`],[`Support`,`https://github.com/syncshell/syncshell-webui/issues`],[`Changelog`,`https://github.com/syncshell/syncshell-webui/releases`],[`Statistics`,`https://data.syncthing.net/`],[`Bugs`,`https://github.com/syncshell/syncshell-webui/issues`],[`Source Code`,`https://github.com/syncshell/syncshell-webui`]],Bi=r();function Vi(){let[t,n]=R(ct),[r]=R(()=>Re()),[i,a]=R({t:dt({})}),[o]=R(()=>ut(r,{publish:n,onAuthExpired:()=>location.reload()})),[s,c]=R(`overview`),[l,u]=R(``),[d,f]=R(null),[p,m]=R(!1),h=!!window.metadata?.authenticated,g=t.config.devices.find(e=>e.deviceID===t.system.myID),_=t.config.devices.filter(e=>e.deviceID!==t.system.myID),v=qe(t.config.folders,`label`,`id`),y=qe(_,`name`,`deviceID`),b=gr(t),x=W(g)||`Syncthing`,{t:S}=i,C=e=>e.catch(()=>{});function w(){m(e=>{try{localStorage.setItem(`metricRates`,String(!e))}catch{}return!e})}async function T(e){u(``);try{if(e.type===`add-device`){let t=await r.get(`config/defaults/device`);t.deviceID=typeof e.device==`string`?e.device:``,t.name=e.pending?.name||``,e={...e,device:t}}if(e.type===`add-folder`){let n=await r.get(`config/defaults/folder`),i=typeof e.folder==`string`?null:(await r.get(`svc/random/string`,{length:10})).random;n.id=typeof e.folder==`string`?e.folder:(i.slice(0,5)+`-`+i.slice(5)).toLowerCase(),n.label=e.pending?.label||``,n.devices=[{deviceID:t.system.myID},...e.device?[{deviceID:e.device}]:[]],Object.values(t.pendingFolders[n.id]?.offeredBy||{}).some(e=>e.receiveEncrypted)&&Object.assign(n,nr(n,`type`,`receiveencrypted`,{kind:`folder`,isNew:!0,config:t.config,system:t.system})),e={...e,folder:n}}e.type===`changes`&&await o.refreshGlobalChanges(),f(e)}catch(e){o.reportError(e)}}function E(e){let t=Ri.findIndex(([e])=>e===s);if(e.key===`ArrowRight`)t=(t+1)%Ri.length;else if(e.key===`ArrowLeft`)t=(t+Ri.length-1)%Ri.length;else if(e.key===`Home`)t=0;else if(e.key===`End`)t=Ri.length-1;else return;e.preventDefault(),c(Ri[t][0]),e.currentTarget.querySelectorAll(`[role="tab"]`)[t].focus()}return z(()=>{ft().then(a).catch(e=>o.reportError(e));try{m(localStorage.getItem(`metricRates`)===`true`)}catch{}function e(e){e.target.closest(`.action-menu`)||u(``)}return document.addEventListener(`pointerdown`,e),h&&o.start(),()=>{o.stop(),document.removeEventListener(`pointerdown`,e)}},[o,h]),z(()=>{document.title=x+` | Syncshell`},[x]),q(G.Provider,{value:i,children:[q(`nav`,{class:`navbar navbar-top navbar-default`,"aria-label":`Main`,children:q(`div`,{class:`container`,children:[q(`span`,{class:`navbar-brand syncshell-brand`,children:[q(`span`,{class:`syncshell-mark`,"aria-hidden":`true`,style:{"--syncshell-mark":`url("${e}")`}}),q(`span`,{class:`text-success`,children:`Syncshell`})]}),h&&q(`p`,{class:`navbar-text hidden-xs`,children:x}),q(`ul`,{class:`nav navbar-nav navbar-right`,children:[q(`li`,{class:`dropdown action-menu ${l===`help`?`open`:``}`,children:[q(`a`,{href:`#help`,class:`dropdown-toggle`,"aria-expanded":l===`help`,onClick:e=>{e.preventDefault(),u(l===`help`?``:`help`)},children:[q(J,{name:`help`}),` `,S(`Help`),` `,q(`span`,{class:`caret`})]}),q(`ul`,{class:`dropdown-menu`,children:[zi.map(([e,t])=>q(`li`,{children:q(`a`,{href:t,target:`_blank`,rel:`noreferrer`,children:S(e)})},e)),q(`li`,{children:q(`a`,{href:`#about`,onClick:e=>{e.preventDefault(),T({type:`about`})},children:S(`About`)})})]})]}),h&&q(`li`,{class:`dropdown action-menu ${l===`actions`?`open`:``}`,children:[q(`a`,{href:`#actions`,class:`dropdown-toggle`,"aria-expanded":l===`actions`,onClick:e=>{e.preventDefault(),u(l===`actions`?``:`actions`)},children:[q(J,{name:`settings`}),` `,S(`Actions`),` `,q(`span`,{class:`caret`})]}),q(`ul`,{class:`dropdown-menu`,children:[q(`li`,{children:q(`a`,{href:`#settings`,onClick:e=>{e.preventDefault(),T({type:`settings`})},children:S(`Settings`)})}),q(`li`,{children:q(`a`,{href:`#advanced`,onClick:e=>{e.preventDefault(),T({type:`advanced`})},children:S(`Advanced`)})}),q(`li`,{children:q(`a`,{href:`#identification`,onClick:e=>{e.preventDefault(),T({type:`identification`,device:g})},children:S(`Show ID`)})}),q(`li`,{children:q(`a`,{href:`#logs`,onClick:e=>{e.preventDefault(),T({type:`logs`})},children:S(`Logs`)})}),(t.upgradeInfo?.newer||t.upgradeInfo?.majorNewer)&&q(`li`,{children:q(`a`,{href:`#upgrade`,onClick:e=>{e.preventDefault(),T({type:`upgrade`})},children:[S(`Upgrade`),` `,t.upgradeInfo.latest]})}),q(`li`,{children:q(`a`,{href:`rest/debug/support`,target:`_blank`,children:S(`Support Bundle`)})}),(t.config.gui?.user||t.config.gui?.authMode===`ldap`)&&q(`li`,{children:q(`a`,{href:`#logout`,onClick:async e=>{e.preventDefault(),await r.post(`noauth/auth/logout`,{}),location.reload()},children:S(`Log Out`)})}),q(`li`,{children:q(`a`,{href:`#restart`,onClick:e=>{e.preventDefault(),T({type:`restart`})},children:S(`Restart`)})}),q(`li`,{children:q(`a`,{href:`#shutdown`,onClick:e=>{e.preventDefault(),T({type:`shutdown`})},children:S(`Shut Down`)})})]})]})]})]})}),q(`main`,{class:`container content`,children:h?q(D,{children:[t.error&&![`restart`,`shutdown`,`upgrade`].includes(d?.type)&&q(`div`,{class:`alert alert-danger`,role:`alert`,children:t.error.message}),!t.configInSync&&q(`div`,{class:`alert alert-warning`,children:[S(`Restart Needed`),` `,q(`button`,{class:`btn btn-default btn-sm`,onClick:()=>T({type:`restart`}),children:S(`Restart`)})]}),!t.ready&&q(`p`,{role:`status`,children:S(`Loading data...`)}),q(`div`,{class:`dashboard`,children:[q(`ul`,{class:`nav nav-tabs dashboard-tabs`,role:`tablist`,onKeyDown:E,children:Ri.map(([e,t])=>q(`li`,{class:e===s?`active`:``,role:`presentation`,children:q(`a`,{id:e+`-tab`,href:`#dashboard-`+e,role:`tab`,"aria-controls":`dashboard-`+e,"aria-selected":e===s,tabIndex:e===s?0:-1,onClick:t=>{t.preventDefault(),c(e)},children:[S(t),e===`conflicts`?` (beta)`:``,e===`notifications`&&q(`span`,{class:`notification-indicator`,children:[q(J,{name:`dot`,class:`text-success`,role:`img`,"aria-label":S(`Pending notifications`)}),q(J,{name:`dot`,class:`text-warning`,role:`img`,"aria-label":S(`Pending warnings`)}),q(J,{name:`dot`,class:`text-danger`,role:`img`,"aria-label":S(`Pending errors`)})]})]})},e))}),q(`div`,{class:`tab-content`,children:[q(`div`,{id:`dashboard-overview`,class:`tab-pane dashboard-primary ${s===`overview`?`active`:``}`,role:`tabpanel`,"aria-labelledby":`overview-tab`,children:[q(`section`,{class:`dashboard-folders`,"aria-labelledby":`folder-list`,children:[q(`h3`,{id:`folder-list`,children:[S(`Folders`),t.config.folders.length>1?` (`+t.config.folders.length+`)`:``]}),v.map(([e,n])=>q(`div`,{children:[e&&q(`h4`,{class:`folder-text`,title:e,children:[e,n.length>1?` (`+n.length+`)`:``]}),q(`div`,{class:`panel-group`,children:n.map(e=>q(Ur,{api:r,session:o,state:t,folder:e,progress:t.scanProgress[e.id],info:t.model[e.id],stats:t.folderStats[e.id],rescan:()=>o.rescan(e.id),onAction:T},e.id))})]},e)),q(`div`,{class:`folder-actions`,children:[t.config.folders.some(e=>!e.paused)&&q(`button`,{class:`btn btn-sm btn-default`,onClick:()=>C(o.setPaused(`folders`,void 0,!0)),children:[q(J,{name:`pause`}),` `,S(`Pause All`)]}),t.config.folders.some(e=>e.paused)&&q(`button`,{class:`btn btn-sm btn-default`,onClick:()=>C(o.setPaused(`folders`,void 0,!1)),children:[q(J,{name:`play`}),` `,S(`Resume All`)]}),t.config.folders.length>0&&q(`button`,{class:`btn btn-sm btn-default`,onClick:()=>C(o.rescan()),children:[q(J,{name:`refresh`}),` `,S(`Rescan All`)]}),q(`button`,{class:`btn btn-sm btn-default`,onClick:()=>T({type:`add-folder`}),children:[q(J,{name:`plus`}),` `,S(`Add Folder`)]})]})]}),q(`section`,{class:`dashboard-devices`,"aria-label":S(`Devices`),children:[q(`div`,{class:`dashboard-heading`,children:[q(`h3`,{children:S(`Devices`)}),q(`button`,{class:`btn btn-sm btn-default`,onClick:()=>T({type:`changes`}),children:[q(J,{name:`clock`}),` `,S(`Recent Changes`)]})]}),g&&q(Gr,{device:g,state:t,session:o,local:!0,metric:p,toggleUnits:w,onAction:T}),q(`div`,{class:`dashboard-remotes`,children:[y.map(([e,n])=>q(`div`,{children:[e&&q(`h4`,{children:[e,n.length>1?` (`+n.length+`)`:``]}),q(`div`,{class:`panel-group`,children:n.map(e=>q(Gr,{device:e,state:t,session:o,metric:p,toggleUnits:w,onAction:T},e.deviceID))})]},e)),q(`div`,{class:`folder-actions`,children:[_.some(e=>!e.paused)&&q(`button`,{class:`btn btn-sm btn-default`,onClick:()=>C(o.setPaused(`devices`,void 0,!0)),children:S(`Pause All`)}),_.some(e=>e.paused)&&q(`button`,{class:`btn btn-sm btn-default`,onClick:()=>C(o.setPaused(`devices`,void 0,!1)),children:S(`Resume All`)}),q(`button`,{class:`btn btn-sm btn-default`,onClick:()=>T({type:`add-device`}),children:S(`Add Remote Device`)})]})]})]})]}),q(`section`,{id:`dashboard-conflicts`,class:`tab-pane ${s===`conflicts`?`active`:``}`,role:`tabpanel`,"aria-labelledby":`conflicts-tab`,children:q(Li,{api:r,hostActions:Bi||window.syncshellHostActions||null,device:t.system.myID,folders:t.config.folders,ready:t.ready,active:s===`conflicts`})}),q(`section`,{id:`dashboard-notifications`,class:`tab-pane notifications ${s===`notifications`?`active`:``}`,role:`tabpanel`,"aria-labelledby":`notifications-tab`,children:q(Yr,{cards:b,session:o,onAction:T})})]})]})]}):q(Kr,{})}),d&&q(Ci,{action:d,state:t,api:r,session:o,onClose:()=>f(null)},d.type+(d.device?.deviceID||d.folder?.id||``)),Un(t)&&q(Kn,{api:r,session:o,state:t,consent:!0,onClose:()=>{}})]})}me(q(Vi,{}),document.getElementById(`app`)); \ No newline at end of file diff --git a/webui/gui/syncshell-modern/assets/compiled/index-D90N4kfH.js b/webui/gui/syncshell-modern/assets/compiled/index-D90N4kfH.js new file mode 100644 index 0000000..bec7e43 --- /dev/null +++ b/webui/gui/syncshell-modern/assets/compiled/index-D90N4kfH.js @@ -0,0 +1,14 @@ +(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),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h={},g=[],_=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,v=Array.isArray;function y(e,t){for(var n in t)e[n]=t[n];return e}function b(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function x(t,n,r){var i,a,o,s={};for(o in n)o==`key`?i=n[o]:o==`ref`?a=n[o]:s[o]=n[o];if(arguments.length>2&&(s.children=arguments.length>3?e.call(arguments,2):r),typeof t==`function`&&t.defaultProps!=null)for(o in t.defaultProps)s[o]===void 0&&(s[o]=t.defaultProps[o]);return S(t,s,i,a,null)}function S(e,r,i,a,o){var s={type:e,props:r,key:i,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++n,__i:-1,__u:0};return o==null&&t.vnode!=null&&t.vnode(s),s}function C(e){return e.children}function w(e,t){this.props=e,this.context=t}function T(e,t){if(t==null)return e.__?T(e.__,e.__i+1):null;for(var n;tt&&r.sort(o),e=r.shift(),t=r.length,E(e)}finally{r.length=k.__r=0}}function A(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,_,v,y=r&&r.__k||g,b=t.length;for(c=j(n,t,y,c,b),d=0;d0?o=e.__k[a]=S(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=te(o,n,c,d))!=-1&&(d--,(s=n[l])&&(s.__u|=2)),s==null||s.__v==null?(l==-1&&(i>u?f--:ic?f--:f++,o.__u|=4))):e.__k[a]=null;if(d)for(a=0;a+!!u){for(i=n-1,a=n+1;i>=0||a=0?i--:a++])!=null&&!(2&l.__u)&&s==l.key&&c==l.type)return o}return-1}function N(e,t,n){t[0]==`-`?e.setProperty(t,n??``):e[t]=n==null?``:typeof n!=`number`||_.test(t)?n:n+`px`}function ne(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||N(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||N(e.style,t,n[t])}}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(u,`$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[l]=r[l]:(n[l]=d,e.addEventListener(t,a?p:f,a)):e.removeEventListener(t,a?p:f,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 re(e){return function(n){if(this.l){var r=this.l[n.type+e];if(n[c]==null)n[c]=d++;else if(n[c]0?e:v(e)?e.map(se):e.constructor===void 0?y({},e):null}function ce(n,r,i,a,o,s,c,l,u){var d,f,p,m,g,_,y,x=i.props||h,S=r.props,C=r.type;if(C==`svg`?o=`http://www.w3.org/2000/svg`:C==`math`?o=`http://www.w3.org/1998/Math/MathML`:o||=`http://www.w3.org/1999/xhtml`,s!=null){for(d=0;d65535?null:{port:t[1],token:t[2]}}function ve(e=window){let t,n=null;try{let r=new URLSearchParams(e.location.hash.slice(1));if(r.has(`syncshell-desktop`)){t=r.get(`syncshell-desktop`)||``;let i=r.get(`syncshell-action`),a=r.get(`device`);i===`edit-device`&&/^[A-Z2-7]{7}(-[A-Z2-7]{7}){7}$/.test(a||``)&&(n={type:i,device:a}),e.history.replaceState(null,``,e.location.pathname+e.location.search),e.sessionStorage.setItem(me,t)}else t=e.sessionStorage.getItem(me)}catch{return null}let r=_e(t);if(!r)return null;let{port:i,token:a}=r;if(n)try{e.sessionStorage.setItem(he,JSON.stringify(n))}catch{return null}async function o(t,n){let r;try{r=await e.fetch(`http://127.0.0.1:${i}/${t}`,{method:`POST`,credentials:`omit`,referrerPolicy:`no-referrer`,headers:{"Content-Type":`application/json`,"X-Syncshell-Token":a},body:JSON.stringify(n),signal:AbortSignal.timeout(3e4)})}catch{throw Error(`Desktop connection is unavailable. Reopen the Web UI from the Syncshell plugin.`)}if(r.status===403)throw Error(`Desktop authorization expired. Reopen the Web UI from the Syncshell plugin.`);let o=await r.json(),s=o&&typeof o==`object`&&`error`in o&&typeof o.error==`string`?o.error:`Desktop action failed`;if(!r.ok)throw Error(s);return o}let s=(e,t,n=t.current||t.copies[0])=>({device:e,folder:t.folder,root:t.root,path:t.path,file:n.path,size:n.bytes,modified:n.modified});return{takeLaunchAction(){let t;try{t=JSON.parse(e.sessionStorage.getItem(he)||`null`),e.sessionStorage.setItem(he,``)}catch{return null}return t},status:e=>o(`status`,{device:e}),check:(e,t,n)=>o(`check`,s(e,t,n)),open:(e,t,n)=>o(`open`,s(n,e,t)),rename:(e,t,n)=>o(`rename`,s(n,e,t))}}var ye,P,be,xe,Se=0,Ce=[],F=t,we=F.__b,Te=F.__r,Ee=F.diffed,De=F.__c,Oe=F.unmount,ke=F.__;function Ae(e,t){F.__h&&F.__h(P,e,Se||t),Se=0;var n=P.__H||(P.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function I(e){return Se=1,je(Ve,e)}function je(e,t,n){var r=Ae(ye++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Ve(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=P,!P.__f)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=!1,o=r.__c.props!==e;if(r.__c.__H.__.some(function(e){if(e.__N){i=!0;var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}}),a){var s=a.call(this,e,t,n);return i?s||o:s}return!i||o};P.__f=!0;var a=P.shouldComponentUpdate,o=P.componentWillUpdate;P.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)},P.shouldComponentUpdate=i}return r.__N||r.__}function L(e,t){var n=Ae(ye++,3);!F.__s&&Be(n.__H,t)&&(n.__=e,n.u=t,P.__H.__h.push(n))}function R(e){return Se=5,Me(function(){return{current:e}},[])}function Me(e,t){var n=Ae(ye++,7);return Be(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Ne(e,t){return Se=8,Me(function(){return e},t)}function Pe(e){var t=P.context[e.__c],n=Ae(ye++,9);return n.c=e,t?(n.__??(n.__=!0,t.sub(P)),t.props.value):e.__}function Fe(){for(var e;e=Ce.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(Re),t.__h.some(ze),t.__h=[]}catch(n){t.__h=[],F.__e(n,e.__v)}}}F.__b=function(e){P=null,we&&we(e)},F.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),ke&&ke(e,t)},F.__r=function(e){Te&&Te(e),ye=0;var t=(P=e.__c).__H;t&&(be===P?(t.__h=[],P.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.some(Re),t.__h.some(ze),t.__h=[],ye=0)),be=P},F.diffed=function(e){Ee&&Ee(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Ce.push(t)!==1&&xe===F.requestAnimationFrame||((xe=F.requestAnimationFrame)||Le)(Fe)),t.__H.__.some(function(e){e.u&&=(e.__H=e.u,void 0)})),be=P=null},F.__c=function(e,t){t.some(function(e){try{e.__h.some(Re),e.__h=e.__h.filter(function(e){return!e.__||ze(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],F.__e(n,e.__v)}}),De&&De(e,t)},F.unmount=function(e){Oe&&Oe(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(e){try{Re(e)}catch(e){t=e}}),n.__H=void 0,t&&F.__e(t,n.__v))};var Ie=typeof requestAnimationFrame==`function`;function Le(e){var t,n=function(){clearTimeout(r),Ie&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Ie&&(t=requestAnimationFrame(n))}function Re(e){var t=P,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),P=t}function ze(e){var t=P;e.__c=e.__(),P=t}function Be(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function Ve(e,t){return typeof t==`function`?t(e):t}var He=class extends Error{constructor(e,t){let n=t&&typeof t==`object`&&`error`in t&&typeof t.error==`string`?t.error:``;super(typeof t==`string`&&t?t:n||`HTTP ${e.status}`),this.name=`HttpError`,this.status=e.status,this.data=t,this.url=e.url}};function Ue({pageUrl:e=location.href,metadata:t=window.metadata,fetch:n=globalThis.fetch,cookie:r=()=>document.cookie}={}){let i=new URL(`rest/`,e),a=t?.deviceIDShort;async function o(e,t,{query:o,body:s,signal:c}={}){let l=new URL(t,i);if(l.origin!==i.origin||!l.pathname.startsWith(i.pathname))throw TypeError(`Syncthing requests must stay within the REST base`);for(let[e,t]of Object.entries(o||{}))t!=null&&l.searchParams.set(e,String(t));let u=new Headers({Accept:`application/json, text/plain, */*`});if(a){let e=`CSRF-Token-${a}=`,t=r().split(`;`).map(e=>e.trim()).find(t=>t.startsWith(e));t&&u.set(`X-CSRF-Token-${a}`,decodeURIComponent(t.slice(e.length)))}s!==void 0&&u.set(`Content-Type`,`application/json`);let d=await n(l,{method:e,headers:u,signal:c,credentials:`same-origin`,body:s===void 0?void 0:JSON.stringify(s)}),f=await d.text(),p=f;if(f&&(d.headers.get(`Content-Type`)?.includes(`json`)||/^\s*(?:\[|\{)/.test(f)))try{p=JSON.parse(f)}catch(e){if(d.ok)throw e}if(!d.ok)throw new He(d,p);return p}return{request:o,get:(e,t)=>o(`GET`,e,t),post:(e,t)=>o(`POST`,e,t),put:(e,t)=>o(`PUT`,e,t),patch:(e,t)=>o(`PATCH`,e,t),delete:(e,t)=>o(`DELETE`,e,t)}}function We(e={}){let t=0,n=0,r=0,i=0;for(let a of Object.values(e))t+=a.globalBytes,n+=a.needBytes,r+=a.needItems,i+=a.needDeletes;return{folders:e,totalPercentage:n===0&&r+i>0?95:t===0?100:Math.floor(100*(1-n/t)),neededBytes:t===0?0:n,neededItems:t===0?0:r+i}}function Ge(e,t,n){let r=(e={},t)=>({...e,inbps:Number.isFinite(t?.inBytesTotal)&&n>0?Math.max(0,(e.inBytesTotal-t.inBytesTotal)/n):0,outbps:Number.isFinite(t?.outBytesTotal)&&n>0?Math.max(0,(e.outBytesTotal-t.outBytesTotal)/n):0});return{connectionsTotal:r(e.total,t.connectionsTotal),connections:Object.fromEntries(Object.entries(e.connections||{}).map(([e,n])=>[e,r(n,t.connections?.[e])]))}}function Ke(e,{onEvent:t=()=>{},onOnline:n=()=>{},onOffline:r=()=>{},onAuthExpired:i=()=>location.reload(),retryMs:a=1e3}={}){let o,s,c,l,u=0;function d(){if(o)return o;s=new AbortController;let e=s.signal;return o=f(e).finally(()=>{o=void 0}),o}async function f(o){let s={limit:1};for(;!o.aborted;)try{let r=await e.get(`events`,{query:s,signal:o});if(o.aborted)return;if(!r)throw Error(`Empty event response`);n(),u>0&&r.forEach(t),r.length&&(u=r[r.length-1].id),s={since:u}}catch(e){if(o.aborted)return;if((e&&typeof e==`object`&&`status`in e?e.status:void 0)===403){i();return}r(e),await new Promise(e=>{l=()=>e(void 0),c=setTimeout(e,a)}),c=void 0,l=void 0,s={limit:1}}}function p(){return s?.abort(),clearTimeout(c),l?.(),o}return{start:d,stop:p}}var qe=[`reused`,`copiedFromOrigin`,`copiedFromElsewhere`,`pulled`,`pulling`],Je=1;function Ye(e){let t=Number(e.total),n=Object.fromEntries(qe.map(n=>[n,Number.isFinite(t)&&t>0?100*(Number(e[n])||0)/t:0])),r=n.pulled+n.copiedFromElsewhere+n.copiedFromOrigin+n.reused;return t>0&&n.pulling[e,Object.fromEntries(Object.entries(t).map(([e,t])=>[e,{...Ye(t),bytesTotal:t.bytesTotal,bytesDone:t.bytesDone}]))]))}function Ze(e,t){return Object.keys(e).filter(n=>Object.keys(e[n]).some(e=>!t[n]?.[e]))}function Qe(){return{online:!1,ready:!1,error:null,config:{folders:[],devices:[],options:{},gui:{}},system:{},version:{},model:{},scanProgress:{},folderStats:{},deviceStats:{},connections:{},connectionsTotal:{},completion:{},discoveryCache:{},pendingDevices:{},pendingFolders:{},globalChanges:[],errors:[],seenError:``,configInSync:!0,downloadProgress:{},itemsRevision:{},upgradeInfo:null}}function $e(e,t){let n=t.data;switch(t.type){case`FolderSummary`:return{...e,model:{...e.model,[n.folder]:n.summary}};case`StateChanged`:{if(!e.model[n.folder])return e;let t={...e.scanProgress};return n.to===`scanning`&&delete t[n.folder],{...e,scanProgress:t,model:{...e.model,[n.folder]:{...e.model[n.folder],state:n.to,error:n.error}}}}case`FolderErrors`:return e.model[n.folder]?{...e,model:{...e.model,[n.folder]:{...e.model[n.folder],errors:n.errors.length}}}:e;case`FolderScanProgress`:return{...e,scanProgress:{...e.scanProgress,[n.folder]:{current:n.current,total:n.total,rate:n.rate}}};default:return e}}function et(e,t){let n=$e(e,t),r=t.data;switch(t.type){case`DownloadProgress`:{let e=Xe(r),t={...n.itemsRevision};for(let r of Ze(n.downloadProgress,e))t[r]=(t[r]||0)+1;return{...n,downloadProgress:e,itemsRevision:t}}case`FolderErrors`:case`LocalIndexUpdated`:case`RemoteIndexUpdated`:return{...n,itemsRevision:{...n.itemsRevision,[r.folder]:(n.itemsRevision[r.folder]||0)+1}};case`FolderCompletion`:return{...n,completion:{...n.completion,[r.device]:We({...n.completion[r.device]?.folders,[r.folder]:r})}};case`DeviceDisconnected`:return n.connections[r.id]?{...n,connections:{...n.connections,[r.id]:{...n.connections[r.id],connected:!1}}}:n;case`ConfigSaved`:return{...n,config:r};default:return n}}async function tt(e,t){try{await e()}catch(e){t(e)}}function nt(e,{publish:t,onAuthExpired:n,refreshMs:r=1e4,retryMs:i=1e3,createEventStream:a=Ke}={}){let o=Qe(),s,c,l,u=0;function d(e){s?.signal.aborted||(o=e,t(o))}function f(e){s?.signal.aborted||(e.status===403&&n?.(),d({...o,error:e}))}function p(e){throw e.status===403&&n?.(),e}function m(){d({...o,upgradeInfo:null})}async function h(t,n){return e.get(t,{query:n,signal:s.signal})}async function g(){let e=await h(`stats/folder`);d({...o,folderStats:e})}function _(e){let t=Date.now(),n=Ge(e,o,(t-u)/1e3);return u=t,n}function v(e={}){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,{...t,addresses:(t.addresses||[]).map(e=>e.replace(/\/\?.*/,``))}]))}async function y(){let[e,t]=await Promise.all([h(`cluster/pending/devices`),h(`cluster/pending/folders`)]);d({...o,pendingDevices:e||{},pendingFolders:t||{}})}async function b(){let e=await h(`events/disk`,{limit:25});e&&d({...o,globalChanges:e.slice().reverse()})}async function x(){let[e,t,n,r]=await Promise.all([h(`system/status`),h(`system/connections`),h(`system/error`),h(`system/discovery`)]);d({...o,system:e,..._(t),discoveryCache:v(r),errors:n?.errors||[]})}async function S(e){await Promise.all(e.folders.filter(e=>!e.paused).map(async e=>{let t=await h(`db/status`,{folder:e.id});d({...o,model:{...o.model,[e.id]:t}})})),await Promise.all(e.folders.flatMap(e=>e.devices||[]).filter((e,t,n)=>e.deviceID!==o.system.myID&&n.findIndex(t=>t.deviceID===e.deviceID)===t).flatMap(t=>e.folders.filter(e=>e.devices.some(e=>e.deviceID===t.deviceID)).map(async e=>{try{let n=await h(`db/completion`,{device:t.deviceID,folder:e.id});d({...o,completion:{...o.completion,[t.deviceID]:We({...o.completion[t.deviceID]?.folders,[e.id]:n})}})}catch(e){e.status!==404&&f(e)}})))}async function C(){let[e,t,r,i,a,s,c,l,u,p,g]=await Promise.all([`config`,`system/status`,`system/version`,`stats/folder`,`stats/device`,`system/connections`,`config/insync`,`system/discovery`,`cluster/pending/devices`,`cluster/pending/folders`,`system/error`].map(e=>h(e)));if(o.version.version&&o.version.version!==r.version){n?.();return}let y=Object.fromEntries(e.devices.map(e=>[e.deviceID,o.completion[e.deviceID]||{folders:{},totalPercentage:100,neededBytes:0,neededItems:0}]));d({...o,online:!0,error:null,config:e,system:t,version:r,folderStats:i,deviceStats:a,..._(s),completion:y,configInSync:c.configInSync,discoveryCache:v(l),pendingDevices:u||{},pendingFolders:p||{},errors:g?.errors||[]}),await S(e),d({...o,ready:!0}),b().catch(f),h(`system/upgrade`).then(e=>d({...o,upgradeInfo:e||null})).catch(m)}function w(e){switch(e.type){case`DeviceDisconnected`:h(`stats/device`).then(e=>d({...o,deviceStats:e})).catch(f);break;case`DeviceConnected`:x().catch(f);break;case`PendingDevicesChanged`:case`PendingFoldersChanged`:y().catch(f);break;case`ConfigSaved`:S(e.data).catch(f),h(`config/insync`).then(e=>d({...o,configInSync:e.configInSync})).catch(f);break;case`LocalIndexUpdated`:g().catch(f),b().catch(f);break;case`StateChanged`:e.data.from===`scanning`&&e.data.to===`idle`&&(g().catch(f),b().catch(f))}}function T(){o.online||l||(l=C().catch(f).finally(()=>{l=void 0}))}function E(){c=setInterval(()=>x().catch(f),r)}let D=a(e,{retryMs:i,onAuthExpired:n,onOnline:T,onOffline(e){d({...o,online:!1,error:e})},onEvent(e){d(et(o,e)),w(e)}});function O(){(!s||s.signal.aborted)&&(s=new AbortController,E(),D.start())}async function k(){s?.abort(),clearInterval(c),await D.stop()}async function A(t){try{await e.put(`config`,{body:t,signal:s.signal}),d({...o,config:t});let n=await h(`config/insync`);d({...o,configInSync:n.configInSync})}catch(e){p(e)}}function j(e){let t=JSON.parse(JSON.stringify(o.config));return e(t),A(t)}function M(e,t,n){return j(r=>{for(let i of r[e])(e!==`devices`||i.deviceID!==o.system.myID)&&(t===void 0||(e===`folders`?i.id:i.deviceID)===t)&&(i.paused=n)})}function ee(e){return j(t=>{t.options.unackedNotificationIDs=(t.options.unackedNotificationIDs||[]).filter(t=>t!==e)})}async function te(e,t,n){await j(r=>{if(t){let i=r.devices.find(t=>t.deviceID===e);i.ignoredFolders=[...(i.ignoredFolders||[]).filter(e=>e.id!==t),{id:t,label:n.label,time:new Date().toISOString()}]}else r.remoteIgnoredDevices=[...(r.remoteIgnoredDevices||[]).filter(t=>t.deviceID!==e),{deviceID:e,name:n.name,address:n.address,time:new Date().toISOString()}]}),await re(e,t)}async function N(t,n){try{await e.post(`db/scan`,{query:{folder:t,sub:n},signal:s.signal})}catch(e){p(e)}}async function ne(){let t=o.errors.at(-1)?.when||o.seenError;try{await e.post(`system/error/clear`,{signal:s.signal}),d({...o,errors:[],seenError:t})}catch(e){p(e)}}async function re(t,n){try{await e.delete(n?`cluster/pending/folders`:`cluster/pending/devices`,{query:{device:t,folder:n},signal:s.signal}),await y()}catch(e){p(e)}}async function ie(t){try{await e.post(`system/`+t,{signal:s.signal})}catch(e){p(e)}}let ae={saveConfig:A,changeConfig:j,setPaused:M,dismissNotification:ee,ignorePending:te},oe={rescan:N,clearErrors:ne,dismissPending:re,systemAction:ie};return{start:O,stop:k,refresh:x,refreshGlobalChanges:b,reportError:f,...ae,...oe}}function rt(e,{active:t=!0,onAuthExpired:n}={}){let[r,i]=I(Qe),a=R(null);return a.current===null&&(a.current=nt(e,{publish:i,onAuthExpired:n})),L(()=>{let e=a.current;return t&&e.start(),()=>{e.stop()}},[t]),[r,a.current]}function it(e){return(t,n={})=>{let r;if(Object.hasOwn(e,t)&&typeof e[t]==`string`)r=e[t];else{let n=String(t).split(`.`).reduce((e,t)=>e&&Object.hasOwn(e,t)?e[t]:void 0,e);r=typeof n==`string`?n:t??``}return r.replace(/{{\s*(\w+)\s*}}|{%\s*(\w+)\s*%}/g,(e,t,r)=>n[t||r]??``)}}async function at({pageUrl:e=location.href,fetch:t=globalThis.fetch}={}){let n=await t(new URL(`assets/lang/lang-en.json`,e));if(!n.ok)throw Error(`Could not load English interface text`);return{t:it(await n.json())}}function ot(e,t,n){let r={};for(let t of e)(r[t.group||``]||=[]).push(t);return Object.keys(r).sort().map(e=>[e,r[e].sort((e,r)=>(e[t]||e[n]).localeCompare(r[t]||r[n]))])}var z=e=>e?.name||e?.deviceID?.slice(0,7)||``,st=(e,t)=>e.folders.filter(e=>e.devices.some(e=>e.deviceID===t));function ct(e){if(!e)return;let t=new Date(e);if(t.getTime()!==0)return(Date.now()-t)/864e5}function lt(e,t){let n=st(t.config,e.deviceID).length===0?`unused-`:``,r=t.connections[e.deviceID];if(!r)return`unknown`;if(e.paused)return n+`paused`;if(r.connected)return t.completion[e.deviceID]?.totalPercentage===100?n+`insync`:`syncing`;let i=ct(t.deviceStats[e.deviceID]?.lastSeen);return!n&&(i===void 0||i>=7)?`disconnected-inactive`:n+`disconnected`}var ut={unknown:{label:`Unknown`,icon:`help`},disconnected:{label:`Disconnected`,icon:`power`},"disconnected-inactive":{label:`Disconnected (Inactive)`,icon:`power`},insync:{label:`Up to Date`,icon:`check`},paused:{label:`Paused`,icon:`pause`},syncing:{label:`Syncing`,icon:`refresh`},"unused-disconnected":{label:`Disconnected (Unused)`,icon:`unlink`},"unused-insync":{label:`Connected (Unused)`,icon:`unlink`},"unused-paused":{label:`Paused (Unused)`,icon:`unlink`}};function dt(e,t){let n=t.connections[e.deviceID];return n?e.paused?`default`:n.connected?t.completion[e.deviceID]?.totalPercentage===100?`success`:`primary`:`info`:`info`}var ft=pe({t:e=>e});function B(){return Pe(ft)}var pt=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),mt=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function ht(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:mt(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var gt=e=>{let t=``,n=!1;for(let r of e){if(r===`-`||r===`_`||r<=` `){n=t.length>0;continue}t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1}return t},_t=e=>{let t=gt(e);return t.charAt(0).toUpperCase()+t.slice(1)},vt={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function yt(e){return e!=null}function bt(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??vt.width,a=e.size??e.height??vt.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?pt(...c):pt(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??vt[`stroke-width`])*Number(e.size??e.width??vt.width)/Number(t.size??t.width??vt.width):t.strokeWidth??vt[`stroke-width`];return[`svg`,{...Object.entries(vt).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&yt(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&yt(t.width)&&{[r(`width`)]:t.width},...`height`in t&&yt(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}var xt=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},St=pe({size:24,color:`currentColor`,strokeWidth:2,absoluteStrokeWidth:!1,nonScalingStroke:!1,class:``}),Ct=()=>Pe(St),wt=({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,children:s,iconNode:c=[],icon:l={node:c,aliases:[],size:24},class:u=``,...d})=>{let{size:f=24,strokeWidth:p=2,absoluteStrokeWidth:m=!1,nonScalingStroke:h=!1,color:g=`currentColor`,class:_=``}=Ct()??{},[v,y,b=[]]=bt(l,{color:e??g,width:n??t??f,height:r??t??f,strokeWidth:i??p,absoluteStrokeWidth:a??m,nonScalingStroke:o??h,className:pt(_,u),hasA11yProp:!!s||xt(d),attributes:d});return x(v,{...y},[...b.map(([e,t])=>x(e,t)),...ee(s)])};function V(e,t,n=[]){let r=typeof e==`string`?ht(e,t,n):e,i=({class:e=``,className:t=``,children:n,...i})=>x(wt,{...i,icon:r,class:pt(e,t)},n);return r.name&&(i.displayName=_t(r.name)),i}var Tt=V({name:`archive`,size:24,node:[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]}),Et=V({name:`arrow-down-up`,size:24,node:[[`path`,{d:`m3 16 4 4 4-4`,key:`1co6wj`}],[`path`,{d:`M7 20V4`,key:`1yoxec`}],[`path`,{d:`m21 8-4-4-4 4`,key:`1c9v7m`}],[`path`,{d:`M17 4v16`,key:`7dpous`}]]}),Dt=V({name:`arrow-left-right`,size:24,node:[[`path`,{d:`M8 3 4 7l4 4`,key:`9rb6wj`}],[`path`,{d:`M4 7h16`,key:`6tx8e3`}],[`path`,{d:`m16 21 4-4-4-4`,key:`siv7j2`}],[`path`,{d:`M20 17H4`,key:`h6l3hr`}]]}),Ot=V({name:`arrow-up-to-line`,size:24,node:[[`path`,{d:`M5 3h14`,key:`7usisc`}],[`path`,{d:`m18 13-6-6-6 6`,key:`1kf1n9`}],[`path`,{d:`M12 7v14`,key:`1akyts`}]]}),kt=V({name:`asterisk`,size:24,node:[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m18.065 8.496-12.125 7`,key:`1h26g9`}],[`path`,{d:`m5.94 8.504 12.125 7`,key:`k77sdm`}]]}),At=V({name:`book-open`,size:24,node:[[`path`,{d:`M12 5v16`,key:`1f6ucr`}],[`path`,{d:`M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z`,key:`1fyvmf`}]]}),jt=V({name:`calendar-days`,size:24,node:[[`path`,{d:`M8 2v3`,key:`1ioesn`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}],[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`M8 13h.01`,key:`1sbv64`}],[`path`,{d:`M12 13h.01`,key:`y0uutt`}],[`path`,{d:`M16 13h.01`,key:`wip0gl`}],[`path`,{d:`M8 17h.01`,key:`p3bg7i`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}],[`path`,{d:`M16 17h.01`,key:`ql8jdd`}]]}),Mt=V({name:`chart-bar`,size:24,node:[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`M7 16h8`,key:`srdodz`}],[`path`,{d:`M7 11h12`,key:`127s9w`}],[`path`,{d:`M7 6h3`,key:`w9rmul`}]],aliases:[`bar-chart-horizontal`]}),Nt=V({name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]}),Pt=V({name:`circle-alert`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]],aliases:[`alert-circle`]}),Ft=V({name:`circle-arrow-down`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 8v8`,key:`napkw2`}],[`path`,{d:`m8 12 4 4 4-4`,key:`k98ssh`}]],aliases:[`arrow-down-circle`]}),It=V({name:`circle-question-mark`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`help-circle`,`circle-help`]}),Lt=V({name:`circle`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]}),Rt=V({name:`clock`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]}),zt=V({name:`cloud-download`,size:24,node:[[`path`,{d:`M12 13v8l-4-4`,key:`1f5nwf`}],[`path`,{d:`m12 21 4-4`,key:`1lfcce`}],[`path`,{d:`M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284`,key:`ui1hmy`}]],aliases:[`download-cloud`]}),Bt=V({name:`cloud`,size:24,node:[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]}),Vt=V({name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]}),Ht=V({name:`download`,size:24,node:[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]}),Ut=V({name:`eye-off`,size:24,node:[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]}),Wt=V({name:`eye`,size:24,node:[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]}),Gt=V({name:`file`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]]}),Kt=V({name:`files`,size:24,node:[[`path`,{d:`M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8`,key:`14sh0y`}],[`path`,{d:`M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z`,key:`1970lx`}],[`path`,{d:`M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1`,key:`l4dndm`}]]}),qt=V({name:`folder-input`,size:24,node:[[`path`,{d:`M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1`,key:`fm4g5t`}],[`path`,{d:`M2 13h10`,key:`pgb2dq`}],[`path`,{d:`m9 16 3-3-3-3`,key:`6m91ic`}]]}),Jt=V({name:`folder-open`,size:24,node:[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]}),Yt=V({name:`folder`,size:24,node:[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]}),Xt=V({name:`globe`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]}),Zt=V({name:`handshake`,size:24,node:[[`path`,{d:`m11 17 2 2a1 1 0 1 0 3-3`,key:`efffak`}],[`path`,{d:`m14 14 2.5 2.5a1 1 0 1 0 3-3l-3.88-3.88a3 3 0 0 0-4.24 0l-.88.88a1 1 0 1 1-3-3l2.81-2.81a5.79 5.79 0 0 1 7.06-.87l.47.28a2 2 0 0 0 1.42.25L21 4`,key:`9pr0kb`}],[`path`,{d:`m21 3 1 11h-2`,key:`1tisrp`}],[`path`,{d:`M3 3 2 14l6.5 6.5a1 1 0 1 0 3-3`,key:`1uvwmv`}],[`path`,{d:`M3 4h8`,key:`1ep09j`}]]}),Qt=V({name:`hard-drive`,size:24,node:[[`path`,{d:`M10 16h.01`,key:`1bzywj`}],[`path`,{d:`M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`18tbho`}],[`path`,{d:`M21.946 12.013H2.054`,key:`zqlbp7`}],[`path`,{d:`M6 16h.01`,key:`1pmjb7`}]]}),$t=V({name:`heart`,size:24,node:[[`path`,{d:`M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5`,key:`mvr1a0`}]]}),en=V({name:`hourglass`,size:24,node:[[`path`,{d:`M5 22h14`,key:`ehvnwv`}],[`path`,{d:`M5 2h14`,key:`pdyrp9`}],[`path`,{d:`M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22`,key:`1d314k`}],[`path`,{d:`M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2`,key:`1vvvr6`}]]}),tn=V({name:`house`,size:24,node:[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]],aliases:[`home`]}),nn=V({name:`info`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]}),rn=V({name:`link`,size:24,node:[[`path`,{d:`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`,key:`1cjeqo`}],[`path`,{d:`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`,key:`19qd67`}]]}),an=V({name:`list-filter`,size:24,node:[[`path`,{d:`M2 5h20`,key:`1fs1ex`}],[`path`,{d:`M6 12h12`,key:`8npq4p`}],[`path`,{d:`M9 19h6`,key:`456am0`}]]}),on=V({name:`lock-open`,size:24,node:[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 9.9-1`,key:`1mm8w8`}]],aliases:[`unlock`]}),sn=V({name:`lock`,size:24,node:[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]}),cn=V({name:`mail`,size:24,node:[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]}),ln=V({name:`maximize-2`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]}),un=V({name:`message-circle`,size:24,node:[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}]]}),dn=V({name:`minimize-2`,size:24,node:[[`path`,{d:`m14 10 7-7`,key:`oa77jy`}],[`path`,{d:`M20 10h-6V4`,key:`mjg0md`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M4 14h6v6`,key:`rmj7iw`}]]}),fn=V({name:`monitor`,size:24,node:[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]}),pn=V({name:`network`,size:24,node:[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`4q2zg0`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`8cvhb9`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`,key:`1egb70`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`,key:`1jsf9p`}],[`path`,{d:`M12 12V8`,key:`2874zd`}]]}),mn=V({name:`pause`,size:24,node:[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]}),hn=V({name:`pencil`,size:24,node:[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]}),gn=V({name:`play`,size:24,node:[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]}),_n=V({name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]}),vn=V({name:`power`,size:24,node:[[`path`,{d:`M12 2v10`,key:`mnfbl`}],[`path`,{d:`M18.4 6.6a9 9 0 1 1-12.77.04`,key:`obofu9`}]]}),yn=V({name:`qr-code`,size:24,node:[[`rect`,{width:`5`,height:`5`,x:`3`,y:`3`,rx:`1`,key:`1tu5fj`}],[`rect`,{width:`5`,height:`5`,x:`16`,y:`3`,rx:`1`,key:`1v8r4q`}],[`rect`,{width:`5`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`1x03jg`}],[`path`,{d:`M21 16h-3a2 2 0 0 0-2 2v3`,key:`177gqh`}],[`path`,{d:`M21 21v.01`,key:`ents32`}],[`path`,{d:`M12 7v3a2 2 0 0 1-2 2H7`,key:`8crl2c`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M12 3h.01`,key:`n36tog`}],[`path`,{d:`M12 16v.01`,key:`133mhm`}],[`path`,{d:`M16 12h1`,key:`1slzba`}],[`path`,{d:`M21 12v.01`,key:`1lwtk9`}],[`path`,{d:`M12 21v-1`,key:`1880an`}]]}),bn=V({name:`recycle`,size:24,node:[[`path`,{d:`M7 19H4.815a1.83 1.83 0 0 1-1.57-.881 1.785 1.785 0 0 1-.004-1.784L7.196 9.5`,key:`x6z5xu`}],[`path`,{d:`M11 19h8.203a1.83 1.83 0 0 0 1.556-.89 1.784 1.784 0 0 0 0-1.775l-1.226-2.12`,key:`1x4zh5`}],[`path`,{d:`m14 16-3 3 3 3`,key:`f6jyew`}],[`path`,{d:`M8.293 13.596 7.196 9.5 3.1 10.598`,key:`wf1obh`}],[`path`,{d:`m9.344 5.811 1.093-1.892A1.83 1.83 0 0 1 11.985 3a1.784 1.784 0 0 1 1.546.888l3.943 6.843`,key:`9tzpgr`}],[`path`,{d:`m13.378 9.633 4.096 1.098 1.097-4.096`,key:`1oe83g`}]]}),xn=V({name:`refresh-cw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]}),Sn=V({name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]}),Cn=V({name:`settings`,size:24,node:[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]}),wn=V({name:`share-2`,size:24,node:[[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}],[`circle`,{cx:`6`,cy:`12`,r:`3`,key:`w7nqdw`}],[`circle`,{cx:`18`,cy:`19`,r:`3`,key:`1xt0gg`}],[`line`,{x1:`8.59`,x2:`15.42`,y1:`13.51`,y2:`17.49`,key:`47mynk`}],[`line`,{x1:`15.41`,x2:`8.59`,y1:`6.51`,y2:`10.49`,key:`1n3mei`}]]}),Tn=V({name:`shield-user`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M6.376 18.91a6 6 0 0 1 11.249.003`,key:`hnjrf2`}],[`circle`,{cx:`12`,cy:`11`,r:`4`,key:`1gt34v`}]]}),En=V({name:`shuffle`,size:24,node:[[`path`,{d:`m18 14 4 4-4 4`,key:`10pe0f`}],[`path`,{d:`m18 2 4 4-4 4`,key:`pucp1d`}],[`path`,{d:`M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22`,key:`1ailkh`}],[`path`,{d:`M2 6h1.972a4 4 0 0 1 3.6 2.2`,key:`km57vx`}],[`path`,{d:`M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45`,key:`os18l9`}]]}),Dn=V({name:`signal`,size:24,node:[[`path`,{d:`M2 20h.01`,key:`4haj6o`}],[`path`,{d:`M7 20v-4`,key:`j294jx`}],[`path`,{d:`M12 20v-8`,key:`i3yub9`}],[`path`,{d:`M17 20V8`,key:`1tkaf5`}],[`path`,{d:`M22 4v16`,key:`sih9yq`}]]}),On=V({name:`signpost`,size:24,node:[[`path`,{d:`M12 13v8`,key:`1l5pq0`}],[`path`,{d:`M12 3v3`,key:`1n5kay`}],[`path`,{d:`M2.354 10.354a1.207 1.207 0 0 1 0-1.708l2.06-2.06A2 2 0 0 1 5.828 6h12.344a2 2 0 0 1 1.414.586l2.06 2.06a1.207 1.207 0 0 1 0 1.708l-2.06 2.06a2 2 0 0 1-1.414.586H5.828a2 2 0 0 1-1.414-.586z`,key:`1tm261`}]]}),kn=V({name:`square-minus`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M8 12h8`,key:`1wcyev`}]],aliases:[`minus-square`]}),An=V({name:`square`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]}),jn=V({name:`tag`,size:24,node:[[`path`,{d:`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`,key:`vktsd0`}],[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`kqv944`}]]}),Mn=V({name:`thumbs-up`,size:24,node:[[`path`,{d:`M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z`,key:`emmmcr`}],[`path`,{d:`M7 10v12`,key:`1qc93n`}]]}),Nn=V({name:`trash`,size:24,node:[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]],aliases:[`trash-2`]}),Pn=V({name:`triangle-alert`,size:24,node:[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`alert-triangle`]}),Fn=V({name:`undo-2`,size:24,node:[[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}],[`path`,{d:`M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11`,key:`f3b9sd`}]]}),In=V({name:`unlink`,size:24,node:[[`path`,{d:`m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71`,key:`yqzxt4`}],[`path`,{d:`m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71`,key:`4qinb0`}],[`line`,{x1:`8`,x2:`8`,y1:`2`,y2:`5`,key:`1041cp`}],[`line`,{x1:`2`,x2:`5`,y1:`8`,y2:`8`,key:`14m1p5`}],[`line`,{x1:`16`,x2:`16`,y1:`19`,y2:`22`,key:`rzdirn`}],[`line`,{x1:`19`,x2:`22`,y1:`16`,y2:`16`,key:`ox905f`}]]}),Ln=V({name:`upload`,size:24,node:[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]}),Rn=V({name:`wrench`,size:24,node:[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]}),zn=V({name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]}),Bn=V({name:`zap`,size:24,node:[[`path`,{d:`M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z`,key:`1v7up4`}]]}),Vn=0;Array.isArray;function H(e,n,r,i,a,o){n||={};var s,c,l=n;if(`ref`in l)for(c in l={},n)c==`ref`?s=n[c]:l[c]=n[c];var u={type:e,props:l,key:r,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Vn,__i:-1,__u:0,__source:a,__self:o};if(typeof e==`function`&&(s=e.defaultProps))for(c in s)l[c]===void 0&&(l[c]=s[c]);return t.vnode&&t.vnode(u),u}var Hn={archive:Tt,"arrow-down-up":Et,"arrow-left-right":Dt,"arrow-up-to-line":Ot,asterisk:kt,book:At,calendar:jt,chart:Mt,check:Nt,dot:Lt,"circle-alert":Pt,"circle-arrow-down":Ft,help:It,info:nn,clock:Rt,cloud:Bt,"cloud-download":zt,copy:Vt,download:Ht,eye:Wt,"eye-off":Ut,file:Gt,files:Kt,folder:Yt,"folder-input":qt,"folder-open":Jt,globe:Xt,handshake:Zt,drive:Qt,heart:$t,house:tn,hourglass:en,link:rn,filter:an,lock:sn,mail:cn,maximize:ln,message:un,minimize:dn,monitor:fn,network:pn,pause:mn,pencil:hn,play:gn,plus:_n,power:vn,qrcode:yn,recycle:bn,refresh:xn,search:Sn,settings:Cn,share:wn,"shield-user":Tn,shuffle:En,signal:Dn,signpost:On,stop:An,"square-minus":kn,tag:jn,"triangle-alert":Pn,"thumbs-up":Mn,trash:Nn,undo:Fn,unlink:In,unlock:on,upload:Ln,wrench:Rn,x:zn,zap:Bn};function U({name:e,class:t=``,label:n,...r}){let i=Hn[e];if(!i)throw Error(`Unknown Syncshell icon: ${e}`);let a=n||r[`aria-label`];return H(i,{class:`syncshell-icon ${t}`.trim(),size:`1em`,strokeWidth:2.25,fill:e===`dot`?`currentColor`:`none`,focusable:`false`,"aria-hidden":a?void 0:`true`,"aria-label":n,role:a?`img`:void 0,...r})}function W({title:e,large:t=!1,expandable:n=!1,status:r=`default`,icon:i=``,children:a,footer:o,onClose:s,onCancel:c}){let{t:l}=B(),u=R(),d=R(),[f,p]=I(!1);return L(()=>{let e=u.current;return d.current=document.activeElement,e.showModal(),(e.querySelector(`[autofocus], button:not([disabled]), a[href]:not([aria-disabled="true"]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])`)||e).focus(),()=>{e.open&&e.close();let t=d.current;t?.isConnected&&t.focus()}},[]),H(`dialog`,{ref:u,class:`dialog ${t?`large`:``} ${n?`expandable`:``} ${f?`full-view`:``}`,"aria-label":l(e),onClose:s,onCancel:e=>{c&&(e.preventDefault(),c())},children:H(`div`,{class:`modal-content`,children:[H(`div`,{class:`modal-header ${r==="default"?``:`alert alert-`+r}`,children:[H(`h4`,{class:`modal-title`,children:[i&&H(`span`,{class:`panel-icon`,children:H(U,{name:i})}),l(e)]}),n&&H(`div`,{class:`modal-header-actions`,children:[H(`button`,{type:`button`,class:`btn btn-default btn-sm`,onClick:()=>p(!f),children:[H(U,{name:f?`minimize`:`maximize`}),`\xA0`,l(f?`Back`:`Full View`)]}),H(`button`,{type:`button`,class:`btn btn-default btn-sm`,onClick:()=>u.current.close(),children:[H(U,{name:`x`}),`\xA0`,l(`Close`)]})]})]}),H(`div`,{class:`modal-body`,children:a}),(!n||o)&&H(`div`,{class:`modal-footer`,children:o||H(`button`,{type:`button`,class:`btn btn-default btn-sm`,onClick:()=>u.current.close(),children:[H(U,{name:`x`}),`\xA0`,l(`Close`)]})})]})})}function Un(e){let t=e.config.options||{},n=e.system.urVersionMax;return e.ready&&t.urAccepted>-1&&t.urSeen!Object.hasOwn(a,e)))}function Gn(e,t,n){return e.changeConfig(e=>{n?e.options.urAccepted=t:e.options.urAccepted===0&&(e.options.urAccepted=-1),e.options.urSeen=t})}function Kn({api:e,session:t,state:n,consent:r=!1,onClose:i}){let{t:a}=B(),[o]=I(n.system.urVersionMax||2),[s,c]=I(o),[l,u]=I(!1),[d,f]=I(!r),[p,m]=I(null),[h,g]=I(r?`idle`:`loading`),[_,v]=I(``),[y,b]=I(!1);L(()=>{if(!d)return;let t=new AbortController;return m(null),g(`loading`),v(``),Wn(e,s,l,t.signal).then(e=>{m(e),g(`ready`)}).catch(e=>{t.signal.aborted||(v(e.message),g(`error`))}),()=>t.abort()},[e,s,l,d]);async function x(e){b(!0);try{await Gn(t,o,e),i()}catch(e){v(e.message)}finally{b(!1)}}function S(){g(`loading`),f(!0)}function w(){switch(h){case`ready`:return H(`pre`,{class:`share-text`,children:JSON.stringify(p,null,2)});case`loading`:return H(`p`,{role:`status`,children:a(`Loading data...`)});case`idle`:case`error`:return null;default:throw Error(`Unknown usage report phase: ${h}`)}}return H(W,{title:r?`Allow Anonymous Usage Reporting?`:`Anonymous Usage Reporting`,large:!0,status:`info`,icon:`chart`,onClose:i,onCancel:()=>{!r&&!y&&i()},footer:r?H(C,{children:[H(`button`,{class:`btn btn-success`,disabled:y,onClick:()=>x(!0),children:a(`Yes`)}),H(`button`,{class:`btn btn-danger`,disabled:y,onClick:()=>x(!1),children:a(`No`)})]}):H(`button`,{class:`btn btn-default`,onClick:i,children:a(`Close`)}),children:[r&&n.config.options.urAccepted>0?H(`p`,{children:a(`Anonymous usage report format has changed. Would you like to move to the new format?`)}):H(C,{children:[H(`p`,{children:a(`The encrypted usage report is sent daily. It is used to track common platforms, folder sizes, and app versions. If the reported data set is changed you will be prompted with this dialog again.`)}),H(`p`,{children:[a(`The aggregated statistics are publicly available at the URL below.`),` `,H(`a`,{href:`https://data.syncthing.net/`,target:`_blank`,rel:`noreferrer`,children:`data.syncthing.net`})]})]}),d?H(C,{children:[!r&&H(C,{children:[H(`label`,{for:`report-version`,children:a(`Version`)}),H(`select`,{id:`report-version`,class:`form-control`,value:s,onChange:e=>c(Number(e.currentTarget.value)),children:Array.from({length:o-1},(e,t)=>o-t).map(e=>H(`option`,{value:e,children:[a(`Version`),` `,e]},e))}),s>2&&H(`label`,{children:[H(`input`,{type:`checkbox`,checked:l,onChange:e=>u(e.currentTarget.checked)}),` `,a(`Show diff with previous version`)]})]}),w()]}):H(`button`,{class:`btn btn-default`,onClick:S,children:a(`Preview Usage Report`)}),_&&H(`p`,{class:`text-danger`,role:`alert`,children:_})]})}var G=e=>JSON.parse(JSON.stringify(e)),qn=(e,t)=>t.split(`.`).reduce((e,t)=>e?.[t],e);function Jn(e,t,n){let r=G(e),i=t.split(`.`),a=r;for(let e of i.slice(0,-1))a=a[e]||={};return a[i.at(-1)]=n,r}var Yn=Object.freeze({editing:`editing`,loadingIgnores:`loading-ignores`,editingIgnores:`editing-ignores`,ignoreLoadFailed:`ignore-load-failed`});function Xn(e,t){switch(t){case`start-ignore-load`:return Yn.loadingIgnores;case`ignore-load-succeeded`:return Yn.editingIgnores;case`ignore-load-failed`:return Yn.ignoreLoadFailed;default:return e}}var K=(e,t,n,r=`text`,i)=>({action:e,path:t,label:n,type:r,options:i});function Zn(e){return e===`General`?[K(`set-folder-label`,`label`,`Folder Label`),K(`set-folder-group`,`group`,`Folder Group`),K(`set-folder-id`,`id`,`Folder ID`),K(`set-folder-path`,`path`,`Folder Path`)]:e===`File Versioning`?[K(`set-folder-versioning-type`,`versioning.type`,`File Versioning`,`select`,[{value:``,label:`No File Versioning`},{value:`trashcan`,label:`Trash Can`},{value:`simple`,label:`Simple`},{value:`staggered`,label:`Staggered`},{value:`external`,label:`External`}]),K(`set-folder-versions-path`,`versioning.fsPath`,`Versions Path`),K(`set-folder-cleanup-interval`,`versioning.cleanupIntervalS`,`Cleanup Interval`,`number`)]:[K(`set-folder-type`,`type`,`Folder Type`,`select`,[{value:`sendreceive`,label:`Send & Receive`},{value:`sendonly`,label:`Send Only`},{value:`receiveonly`,label:`Receive Only`},{value:`receiveencrypted`,label:`Receive Encrypted`}]),K(`set-folder-watcher`,`fsWatcherEnabled`,`Watch for Changes`,`checkbox`),K(`set-folder-rescan-interval`,`rescanIntervalS`,`Full Rescan Interval (s)`,`number`),K(`set-folder-ignore-permissions`,`ignorePerms`,`Ignore Permissions`,`checkbox`),K(`set-folder-block-indexing`,`blockIndexing`,`Block Indexing`,`checkbox`),K(`set-folder-pull-order`,`order`,`File Pull Order`,`select`,[{value:`random`,label:`Random`},{value:`alphabetic`,label:`Alphabetic`},{value:`smallestFirst`,label:`Smallest First`},{value:`largestFirst`,label:`Largest First`},{value:`oldestFirst`,label:`Oldest First`},{value:`newestFirst`,label:`Newest First`}]),K(`set-folder-minimum-free-space`,`minDiskFree.value`,`Minimum Free Disk Space`,`number`),K(`set-folder-minimum-free-unit`,`minDiskFree.unit`,`Unit`,`select`,[{value:`%`,label:`%`},{value:`kB`,label:`kB`},{value:`MB`,label:`MB`},{value:`GB`,label:`GB`},{value:`TB`,label:`TB`}]),K(`set-folder-sync-ownership`,`syncOwnership`,`Sync Ownership`,`checkbox`),K(`set-folder-send-ownership`,`sendOwnership`,`Send Ownership`,`checkbox`),K(`set-folder-sync-xattrs`,`syncXattrs`,`Sync Extended Attributes`,`checkbox`),K(`set-folder-send-xattrs`,`sendXattrs`,`Send Extended Attributes`,`checkbox`),K(`set-folder-max-single-xattr-size`,`xattrFilter.maxSingleEntrySize`,`Maximum Single Entry Size`,`number`),K(`set-folder-max-total-xattr-size`,`xattrFilter.maxTotalSize`,`Maximum Total Size`,`number`)]}async function Qn(e,t,n){let r=await e.get(`config/defaults/folder`),i=typeof n.folder==`string`?null:(await e.get(`svc/random/string`,{query:{length:10}})).random,a={...r,id:typeof n.folder==`string`?n.folder:(i.slice(0,5)+`-`+i.slice(5)).toLowerCase(),label:n.pending?.label||``,devices:[{deviceID:t.system.myID},...n.device?[{deviceID:n.device}]:[]]};return Object.values(t.pendingFolders[a.id]?.offeredBy||{}).some(e=>e.receiveEncrypted)&&(a=tr(a,{type:`set-folder-type`,value:`receiveencrypted`},{isNew:!0,config:t.config,system:t.system})),{...n,folder:a}}function $n(e,t,n=`/`){return e?e.replace(/[\\/]+$/,``)+n+t:``}var er={"set-folder-label":`label`,"set-folder-group":`group`,"set-folder-id":`id`,"set-folder-path":`path`,"set-folder-versioning-type":`versioning.type`,"set-folder-versions-path":`versioning.fsPath`,"set-folder-cleanup-interval":`versioning.cleanupIntervalS`,"set-folder-type":`type`,"set-folder-watcher":`fsWatcherEnabled`,"set-folder-rescan-interval":`rescanIntervalS`,"set-folder-ignore-permissions":`ignorePerms`,"set-folder-block-indexing":`blockIndexing`,"set-folder-pull-order":`order`,"set-folder-minimum-free-space":`minDiskFree.value`,"set-folder-minimum-free-unit":`minDiskFree.unit`,"set-folder-sync-ownership":`syncOwnership`,"set-folder-send-ownership":`sendOwnership`,"set-folder-sync-xattrs":`syncXattrs`,"set-folder-send-xattrs":`sendXattrs`,"set-folder-max-single-xattr-size":`xattrFilter.maxSingleEntrySize`,"set-folder-max-total-xattr-size":`xattrFilter.maxTotalSize`};function tr(e,t,n={}){let r=er[t.type],i=t.value;switch(t.type){case`set-folder-versioning-parameter`:r=`versioning.params.`+t.key;break;case`set-folder-xattr-permit`:r=`xattrFilter.entries.`+t.index+`.permit`;break;case`set-folder-xattr-match`:r=`xattrFilter.entries.`+t.index+`.match`;break;case`remove-folder-xattr-rule`:r=`xattrFilter.entries`,i=(e.xattrFilter?.entries||[]).filter((e,n)=>n!==t.index);break;case`add-folder-xattr-rule`:r=`xattrFilter.entries`,i=rr(e.xattrFilter?.entries)}if(!r)return e;let{isNew:a,defaults:o,autoPath:s,config:c,system:l}=n,u=Jn(e,r,i);if(r===`versioning.type`&&i){let e=i===`simple`?{keep:`5`,cleanoutDays:`0`}:i===`trashcan`?{cleanoutDays:`0`}:i===`staggered`?{maxAge:`31536000`}:{command:``};u.versioning.params={...e,...u.versioning.params},u.versioning.cleanupIntervalS??=3600,u.versioning.fsPath??=``}return r===`type`&&(u.fsWatcherEnabled=i!==`receiveencrypted`,i===`receiveencrypted`&&(u.ignorePerms=!0,u.versioning={type:``}),(a||o)&&(u.blockIndexing=[`sendreceive`,`receiveonly`].includes(i))),[`type`,`fsWatcherEnabled`].includes(r)&&[60,3600,86400].includes(u.rescanIntervalS)&&(u.rescanIntervalS=u.type===`receiveencrypted`?86400:u.fsWatcherEnabled?3600:60),a&&s&&[`label`,`id`].includes(r)&&c.defaults.folder.path&&(u.path=$n(c.defaults.folder.path,u.label||u.id,l.pathSeparator)),u}function nr(e,t,{isNew:n,defaults:r}){let i={...e};return e.path.startsWith(`versioning.`)&&e.path!==`versioning.type`&&![`simple`,`trashcan`,`staggered`].includes(t.versioning?.type)&&(i.hidden=!0),e.path.startsWith(`xattrFilter.`)&&!t.syncXattrs&&!t.sendXattrs&&(i.hidden=!0),e.path===`type`&&!n&&!r&&(i.disabled=t.type===`receiveencrypted`,i.options=e.options.filter(e=>e.value!==`receiveencrypted`||t.type===e.value)),i.disabled||=[`fsWatcherEnabled`,`ignorePerms`,`versioning.type`].includes(e.path)&&t.type===`receiveencrypted`||e.path===`order`&&t.type===`sendonly`||[`syncOwnership`,`syncXattrs`].includes(e.path)&&[`sendonly`,`receiveencrypted`].includes(t.type)||e.path===`sendOwnership`&&([`receiveonly`,`receiveencrypted`].includes(t.type)||t.syncOwnership)||e.path===`sendXattrs`&&([`receiveonly`,`receiveencrypted`].includes(t.type)||t.syncXattrs),e.path===`sendOwnership`&&(i.checked=t.sendOwnership||t.syncOwnership),e.path===`sendXattrs`&&(i.checked=t.sendXattrs||t.syncXattrs),i}function rr(e=[]){if(e.some(e=>e.match===``))return e;let t=e.slice();return t.splice(t.at(-1)?.match===`*`?t.length-1:t.length,0,{match:``,permit:!1}),t}function ir(e=[]){return e.length?e.at(-1).match===`*`?``:`deny`:`permit`}function ar(e=[]){return e.length&&(e.length!==1||e[0].match!==`*`)&&e.every(e=>!e.permit)?`Hint: only deny-rules detected while the default is deny. Consider adding "permit any" as last rule.`:``}function or(e,t,n){if(!e.path)return null;let r=e=>e.replace(/^~(?=[\\/])/,n.tilde||`~`).split(n.pathSeparator||`/`).filter((e,t,n)=>e||t!==n.length-1),i=r(e.path);for(let n of t.folders.filter(t=>t.id!==e.id)){let e=r(n.path);if(e.length<=i.length&&e.every((e,t)=>e===i[t]))return{folder:n,type:`subdirectory`};if(i.length<=e.length&&i.every((t,n)=>t===e[n]))return{folder:n,type:`parent directory`}}return null}function sr(e){let t=G(e);t.xattrFilter&&(t.xattrFilter.entries=(t.xattrFilter.entries||[]).filter(e=>e.match!==``));let n=t.versioning||{};for(let e of n.type===`simple`?[`keep`,`cleanoutDays`]:n.type===`trashcan`?[`cleanoutDays`]:n.type===`staggered`?[`maxAge`]:[]){let t=Number(n.params?.[e]);if(!Number.isFinite(t)||t<+(e===`keep`)||n.params[e]===``)throw Error(e===`keep`?`You must keep at least one version.`:`A negative number of days does not make sense.`)}return t}async function cr({session:e,state:t,draft:n,isNew:r,defaults:i=!1,ignores:a=[]}){let o=sr(n);if(i)return e.changeConfig(e=>{e.defaults.folder=o,e.defaults.ignores.lines=a});if(!o.id.trim())throw Error(`The folder ID cannot be blank.`);if(!o.path.trim())throw Error(`The folder path cannot be blank.`);if(r&&t.config.folders.some(e=>e.id===o.id))throw Error(`The folder ID must be unique.`);if(o.devices.some(e=>e.deviceID===t.system.myID)||o.devices.push({deviceID:t.system.myID}),o.versioning?.type||(o.versioning={type:``}),o.versioning.type===`external`&&!o.versioning.params?.command?.trim())throw Error(`External Versioning Command cannot be blank.`);if(o.type!==`receiveencrypted`&&o.devices.some(e=>(t.config.devices.find(t=>t.deviceID===e.deviceID)?.untrusted||t.pendingFolders?.[o.id]?.offeredBy?.[e.deviceID]?.remoteEncrypted)&&!e.encryptionPassword))throw Error(`Encryption Password is required for an untrusted device.`);return e.changeConfig(e=>{e.folders=[...e.folders.filter(e=>e.id!==o.id),o]})}var q=(e,t,n,r=`text`,i)=>({action:e,path:t,label:n,type:r,options:i});function lr(e){return e===`General`?[q(`set-device-id`,`deviceID`,`Device ID`),q(`set-device-name`,`name`,`Device Name`),q(`set-device-group`,`group`,`Device Group`)]:[q(`set-device-addresses`,`addresses`,`Addresses`,`list`),q(`set-device-compression`,`compression`,`Compression`,`select`,[{value:`metadata`,label:`Metadata Only`},{value:`always`,label:`All Data`},{value:`never`,label:`Off`}]),q(`set-device-introducer`,`introducer`,`Introducer`,`checkbox`),q(`set-device-auto-accept`,`autoAcceptFolders`,`Auto Accept`,`checkbox`),q(`set-device-untrusted`,`untrusted`,`Untrusted`,`checkbox`),q(`set-device-receive-limit`,`maxRecvKbps`,`Incoming Rate Limit (KiB/s)`,`number`),q(`set-device-send-limit`,`maxSendKbps`,`Outgoing Rate Limit (KiB/s)`,`number`),q(`set-device-connection-count`,`numConnections`,`Number of Connections`,`number`)]}async function ur(e,t){let n=await e.get(`config/defaults/device`);return{...t,device:{...n,deviceID:typeof t.device==`string`?t.device:``,name:t.pending?.name||``}}}var dr={"set-device-id":`deviceID`,"set-device-name":`name`,"set-device-group":`group`,"set-device-addresses":`addresses`,"set-device-compression":`compression`,"set-device-introducer":`introducer`,"set-device-auto-accept":`autoAcceptFolders`,"set-device-untrusted":`untrusted`,"set-device-receive-limit":`maxRecvKbps`,"set-device-send-limit":`maxSendKbps`,"set-device-connection-count":`numConnections`};function fr(e,t){let n=dr[t.type];if(!n)return e;let r=Jn(e,n,t.value);return t.type===`set-device-untrusted`&&t.value&&(r.introducer=!1,r.autoAcceptFolders=!1),r}function pr(e,t,n){return{...e,disabled:[`introducer`,`autoAcceptFolders`].includes(e.path)&&t.untrusted||e.path===`addresses`&&t.deviceID===n}}async function mr({session:e,api:t,state:n,draft:r,isNew:i,shares:a,defaults:o=!1}){let s=G(r);if(o)return e.changeConfig(e=>{e.defaults.device=s});let c=await t.get(`svc/deviceid`,{query:{id:s.deviceID}});if(c.error)throw Error(c.error);if(s.deviceID=c.id||s.deviceID,n.config.folders.some(e=>e.type!==`receiveencrypted`&&(s.untrusted||n.pendingFolders?.[e.id]?.offeredBy?.[s.deviceID]?.remoteEncrypted)&&a[e.id]?.selected&&!a[e.id]?.password))throw Error(`Encryption Password is required for an untrusted device.`);if(i&&n.config.devices.some(e=>e.deviceID===s.deviceID))throw Error(`A device with that ID is already added.`);return e.changeConfig(e=>{e.devices=[...e.devices.filter(e=>e.deviceID!==s.deviceID),s];for(let t of e.folders){let e=t.devices.some(e=>e.deviceID===s.deviceID);a[t.id]?.selected&&!e&&t.devices.push({deviceID:s.deviceID,encryptionPassword:a[t.id].password||``}),a[t.id]?.selected&&e&&(t.devices.find(e=>e.deviceID===s.deviceID).encryptionPassword=a[t.id].password||``),!a[t.id]?.selected&&e&&(t.devices=t.devices.filter(e=>e.deviceID!==s.deviceID))}})}var hr={cardTone:`info`,summaryTone:`info`},gr={"clean-waiting":{label:`Waiting to Clean`,icon:`hourglass`,cardTone:`warning`,summaryTone:`warning`},cleaning:{label:`Cleaning Versions`,icon:`recycle`,cardTone:`primary`,summaryTone:`warning`},error:{cardTone:`danger`,summaryTone:`danger`},faileditems:{label:`Failed Items`,icon:`circle-alert`,cardTone:`danger`,summaryTone:`danger`},idle:{label:`Up to Date`,icon:`check`,cardTone:`success`,summaryTone:`success`},localadditions:{label:`Local Additions`,icon:`check`,cardTone:`success`,summaryTone:`warning`},localunencrypted:{label:`Unexpected Items`,icon:`circle-alert`,cardTone:`danger`,summaryTone:`danger`},outofsync:{label:`Out of Sync`,icon:`circle-alert`,cardTone:`danger`,summaryTone:`warning`},paused:{label:`Paused`,icon:`pause`,cardTone:`default`,summaryTone:`default`},"scan-waiting":{label:`Waiting to Scan`,icon:`hourglass`,cardTone:`warning`,summaryTone:`warning`},scanning:{label:`Scanning`,icon:`search`,cardTone:`primary`,summaryTone:`warning`},starting:{label:`Starting`,icon:`hourglass`,cardTone:`primary`,summaryTone:`warning`},stopped:{label:`Stopped`,icon:`stop`,cardTone:`danger`,summaryTone:`danger`},"sync-preparing":{label:`Preparing to Sync`,icon:`hourglass`,cardTone:`primary`,summaryTone:`warning`},"sync-waiting":{label:`Waiting to Sync`,icon:`hourglass`,cardTone:`warning`,summaryTone:`warning`},syncing:{label:`Syncing`,icon:`refresh`,cardTone:`primary`,summaryTone:`warning`},unknown:{label:`Unknown`,icon:`help`,cardTone:`info`,summaryTone:`info`},unshared:{label:`Unshared`,icon:`unlink`,cardTone:`warning`,summaryTone:`warning`}};function _r(e){return gr[e]||hr}function vr(e,t){if(e.paused)return`paused`;if(!t?.state)return`unknown`;let n=String(t.state);return n===`error`?`stopped`:n===`idle`?t.needTotalItems>0?`outofsync`:t.errors===0?[`receiveonly`,`receiveencrypted`].includes(e.type)&&t.receiveOnlyTotalItems>0?e.type===`receiveonly`?`localadditions`:`localunencrypted`:e.devices.length<=1?`unshared`:n:`faileditems`:n}var yr=e=>_r(e).cardTone,br=e=>_r(e).summaryTone,xr=e=>_r(e).icon,Sr=e=>_r(e).label;function Cr(e,t){return!(!t?.state||e.paused||vr(e,t)===`idle`&&t.globalFiles===t.localFiles&&t.globalDirectories===t.localDirectories&&t.globalBytes===t.localBytes)}function wr(e,t={},n){let r=[];return e.type===`sendonly`&&n===`outofsync`&&r.push(`override`),[`receiveonly`,`receiveencrypted`].includes(e.type)&&t.receiveOnlyTotalItems>0&&[`outofsync`,`faileditems`,`localadditions`].includes(n)&&r.push(`revert`),r}function Tr(e,t){return e===t?99:Math.floor(100*e/t)}function Er(e){return!e||e.needTotalItems===0?100:e.needBytes===0&&e.needTotalItems>0?95:Tr(e.inSyncBytes,e.globalBytes)}function Dr(e){let t={bytes:0,directories:0,files:0};for(let n of Object.values(e))t.bytes+=n.localBytes,t.directories+=n.localDirectories,t.files+=n.localFiles;return t}var Or={sendreceive:`Send & Receive`,sendonly:`Send Only`,receiveonly:`Receive Only`,receiveencrypted:`Receive Encrypted`},kr={random:`Random`,alphabetic:`Alphabetic`,smallestFirst:`Smallest First`,largestFirst:`Largest First`,oldestFirst:`Oldest First`,newestFirst:`Newest First`},Ar={trashcan:`Trash Can`,simple:`Simple`,staggered:`Staggered`,external:`External`};function jr(e){if(!e)return``;let t=Math.ceil((e.total-e.current)/e.rate/10)*10,n=0,r=0,i=[];if(t>=86400){if(n=Math.floor(t/86400),n>31)return`> 1 month`;i.push(n+`d`),t%=86400}t>3600&&(r=Math.floor(t/3600),i.push(r+`h`),t%=3600);let a=new Date(new Date(1970,0,1).setSeconds(t));return n===0&&i.push(a.getMinutes()+`m`),n===0&&r===0&&i.push(String(a.getSeconds()).padStart(2,`0`)+`s`),i.join(` `)}var Mr={channelNotification:{paragraphs:[`Automatic upgrade now offers the choice between stable releases and release candidates.`,`Release candidates contain the latest features and fixes. They are similar to the traditional bi-weekly Syncthing releases.`,`Stable releases are delayed by about two weeks. During this time they go through testing as release candidates.`,`You can read more about the two release channels at the link below.`,`You can change your choice at any time in the Settings dialog.`],severity:`success`,title:`Automatic upgrades`,actions:[`Settings`,`OK`],link:`https://docs.syncthing.net/users/releases.html`},fsWatcherNotification:{paragraphs:[`Continuously watching for changes is now available within Syncthing. This will detect changes on disk and issue a scan on only the modified paths. The benefits are that changes are propagated quicker and that less full scans are required.`,`Do you want to enable watching for changes for all your folders?`,`Additionally the full rescan interval will be increased (times 60, i.e. new default of 1h). You can also configure it manually for every folder later after choosing No.`,`Warning: If you are using an external watcher like {%syncthingInotify%}, you should make sure it is deactivated.`],severity:`success`,title:`Watching for Changes`,actions:[`Yes`,`No`],link:`https://docs.syncthing.net/users/syncing.html#scanning`},crAutoEnabled:{paragraphs:[`Syncthing now supports automatically reporting crashes to the developers. This feature is enabled by default.`],severity:`success`,title:`Automatic Crash Reporting`,actions:[`Disable Crash Reporting`,`OK`],link:`https://docs.syncthing.net/users/crashrep.html`},crAutoDisabled:{paragraphs:[`Syncthing now supports automatically reporting crashes to the developers. This feature is enabled by default.`,`However, your current settings indicate you might not want it enabled. We have disabled automatic crash reporting for you.`],severity:`success`,title:`Automatic Crash Reporting`,actions:[`Enable Crash Reporting`,`OK`],link:`https://docs.syncthing.net/users/crashrep.html`},authenticationUserAndPassword:{paragraphs:[`Username/Password has not been set for the GUI authentication. Please consider setting it up.`,`If you want to prevent other users on this computer from accessing Syncthing and through it your files, consider setting up authentication.`],severity:`success`,title:`GUI Authentication: Set User and Password`,actions:[`Settings`,`OK`]}};function Nr(e){let t=e.gui||{};return t.authMode===`ldap`||t.user&&t.password}function Pr(e,t){let n=e.config.gui||{},r=e.system.guiAddressUsed;return!r||r.startsWith(`127.`)||r.startsWith(`[::1]:`)||r.startsWith(`/`)||t||n.insecureAdminAccess?null:{id:`openNoAuth`,severity:`danger`,title:`Danger!`,paragraphs:[`The Syncthing admin interface is configured to allow remote access without a password.`,`This can easily give hackers access to read and change any files on your computer.`,`Please set a GUI Authentication User and Password in the Settings dialog.`],actions:[`Settings`]}}function Fr(e){return e.configInSync?null:{id:`restart`,severity:`warning`,title:`Restart Needed`,paragraphs:[`The configuration has been saved but not activated. Syncthing must restart to activate the new configuration.`],actions:[`Restart`]}}function Ir(e,t){return(e.options?.unackedNotificationIDs||[]).flatMap(e=>e===`authenticationUserAndPassword`&&t||!Mr[e]?[]:{id:e,...Mr[e],params:{syncthingInotify:`syncthing-inotify`}})}function Lr(e){return Object.entries(e.pendingDevices).map(([e,t])=>({id:`device-`+e,kind:`device`,device:e,pending:t,severity:`warning`,title:`New Device`,time:t.time,paragraphs:[`Device "{%name%}" ({%device%} at {%address%}) wants to connect. Add new device?`],params:{name:t.name,device:e,address:t.address},actions:[`Add Device`,`Ignore`,`Dismiss`]}))}function Rr(e){let t=e.config;return Object.entries(e.pendingFolders).flatMap(([e,n])=>Object.entries(n.offeredBy||{}).map(([n,r])=>{let i=t.folders.find(t=>t.id===e);return{id:`folder-`+e+`-`+n,kind:`folder`,folder:e,device:n,pending:r,folderConfig:i,severity:`warning`,title:i?`Share Folder`:`New Folder`,time:r.time,paragraphs:[r.label?`{%device%} wants to share folder "{%folderlabel%}" ({%folder%}).`:`{%device%} wants to share folder "{%folder%}".`,i?`Share this folder?`:`Add new folder?`],params:{device:z(t.devices.find(e=>e.deviceID===n)),folder:e,folderlabel:r.label},actions:[i?`Share`:`Add`,`Ignore`,`Dismiss`]}}))}function zr(e){let t=e.errors.filter(t=>!e.seenError||t.when>e.seenError);return t.length?{id:`errors`,severity:`warning`,title:`Notice`,errors:t.map(t=>({...t,message:e.config.devices.reduce((e,t)=>e.replace(t.deviceID,z(t)),t.message)})),actions:[`OK`]}:null}function Br(e){let t=e.config.folders.filter(t=>t.fsWatcherEnabled&&!t.paused&&e.model[t.id]?.watchError&&vr(t,e.model[t.id])!==`stopped`).map(t=>({name:t.label||t.id,error:e.model[t.id].watchError}));return t.length?{id:`watchers`,severity:`warning`,title:`Filesystem Watcher Errors`,watchers:t,paragraphs:[`For the following folders an error occurred while starting to watch for changes. It will be retried every minute, so the errors might go away soon. If they persist, try to fix the underlying issue and ask for help if you can't.`],link:`https://forum.syncthing.net`,actions:[]}:null}function Vr(e){let t=Nr(e.config);return[Pr(e,t),Fr(e),...Ir(e.config,t),...Lr(e),...Rr(e),zr(e),Br(e)].filter(Boolean)}async function Hr(e,t,n,r){switch(n){case`Settings`:r({type:`settings`}),t.id===`channelNotification`&&await e.dismissNotification(t.id);return;case`Restart`:return r({type:`restart`});case`Ignore`:return e.ignorePending(t.device,t.folder,t.pending);case`Dismiss`:return e.dismissPending(t.device,t.folder);case`Share`:if(t.folderConfig?.type!==`receiveencrypted`&&t.pending.remoteEncrypted){let e=JSON.parse(JSON.stringify(t.folderConfig));return e.devices.some(e=>e.deviceID===t.device)||e.devices.push({deviceID:t.device,encryptionPassword:``}),r({type:`edit-folder`,folder:e,tab:`sharing`})}return e.changeConfig(e=>{let n=e.folders.find(e=>e.id===t.folder);n.devices.some(e=>e.deviceID===t.device)||n.devices.push({deviceID:t.device})});case`Add`:case`Add Device`:r({type:t.kind===`folder`?`add-folder`:`add-device`,...t});return;case`Yes`:t.id===`fsWatcherNotification`&&await e.changeConfig(e=>{for(let t of e.folders)t.fsWatcherEnabled||(t.fsWatcherEnabled=!0,t.rescanIntervalS&&=Math.min(86400,t.rescanIntervalS*60))});break;case`Enable Crash Reporting`:case`Disable Crash Reporting`:await e.changeConfig(e=>{e.options.crashReportingEnabled=n.startsWith(`Enable`)});break;default:if(t.id===`errors`)return e.clearErrors()}return e.dismissNotification(t.id)}var Ur={"remove-folder":{title:`Remove Folder`,button:`Yes`,description:`Are you sure you want to remove folder {%label%}?`,detail:`No files will be deleted as a result of this operation.`},"remove-device":{title:`Remove Device`,button:`Yes`,description:`Are you sure you want to remove device {%name%}?`},override:{title:`Override Changes`,button:`Override`,description:`The folder content on other devices will be overwritten to become identical with this device. Files not present here will be deleted on other devices.`,detail:`Are you sure you want to override all remote changes?`},revert:{title:`Revert Local Changes`,button:`Revert`,description:`The folder content on this device will be overwritten to become identical with other devices. Files newly added here will be deleted.`,detail:`Are you sure you want to revert all local changes?`}};function Wr(e,t,n){L(()=>{if(!t)return;function r(t){e.current?.contains(t.target)||n(!1)}function i(t){t.key===`Escape`&&(n(!1),e.current?.querySelector(`.dropdown-toggle`)?.focus())}return document.addEventListener(`pointerdown`,r),document.addEventListener(`keydown`,i),()=>{document.removeEventListener(`pointerdown`,r),document.removeEventListener(`keydown`,i)}},[t,n])}function Gr({as:e=`div`,buttonClass:t=``,children:n,className:r=``,disabled:i=!1,label:a,placement:o=`dropdown`,triggerAs:s=`button`,triggerHref:c}){let[l,u]=I(!1),d=R();Wr(d,l,u);let f=()=>u(!1),p=e,m=s;return H(p,{ref:d,class:`${o} ${r} ${l?`open`:``}`.trim(),children:[H(m,{type:s===`button`?`button`:void 0,href:c,class:`dropdown-toggle ${t}`.trim(),"aria-expanded":l,disabled:i,onClick:e=>{s===`a`&&e.preventDefault(),u(!l)},children:a}),H(`ul`,{class:`dropdown-menu`,children:n({close:f})})]})}var Kr=0;function qr(e,t){let n,r;t.id=`syncshell-tooltip-`+ ++Kr;function i(){if(!t.matches(`:popover-open`))return;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=n.top>r.height+8;t.classList.toggle(`top`,i),t.classList.toggle(`bottom`,!i),t.style.top=(i?n.top-r.height-5:n.bottom+5)+`px`,t.style.left=Math.max(8,Math.min(innerWidth-r.width-8,n.left+n.width/2-r.width/2))+`px`}function a(){clearTimeout(r),clearTimeout(n),!t.matches(`:popover-open`)&&(n=setTimeout(()=>{t.showPopover(),e.setAttribute(`aria-describedby`,t.id),i()},400))}function o(){clearTimeout(n),clearTimeout(r),t.matches(`:popover-open`)&&t.hidePopover(),e.removeAttribute(`aria-describedby`)}function s(){clearTimeout(n),clearTimeout(r),r=setTimeout(o,100)}function c(){clearTimeout(r)}function l(e){e.key===`Escape`&&o()}e.addEventListener(`mouseenter`,a),e.addEventListener(`mouseleave`,s),e.addEventListener(`focus`,a),e.addEventListener(`blur`,o),t.addEventListener(`mouseenter`,c),t.addEventListener(`mouseleave`,s),document.addEventListener(`keydown`,l),window.addEventListener(`resize`,i),window.addEventListener(`scroll`,i,!0);let u=new MutationObserver(i);return u.observe(t,{childList:!0,characterData:!0,subtree:!0}),()=>{o(),u.disconnect(),e.removeEventListener(`mouseenter`,a),e.removeEventListener(`mouseleave`,s),e.removeEventListener(`focus`,a),e.removeEventListener(`blur`,o),t.removeEventListener(`mouseenter`,c),t.removeEventListener(`mouseleave`,s),document.removeEventListener(`keydown`,l),window.removeEventListener(`resize`,i),window.removeEventListener(`scroll`,i,!0)}}function Jr(e,t){L(()=>qr(e.current,t.current),[])}function J({icon:e=``,iconClass:t=``,label:n,text:r=``,prefix:i=``,kind:a=`help`,triggerText:o,tail:s=!1,children:c}){let{t:l}=B(),u=R(),d=R();return Jr(u,d),H(C,{children:[H(`span`,{ref:u,class:e?`${t} folder-${a===`count`?`count`:`help`}-icon`:s?`folder-tail`:`folder-text`,tabIndex:`0`,role:e?`img`:void 0,"aria-label":o===void 0?l(n):n,children:[e&&H(U,{name:e}),o!==void 0&&H(`bdi`,{dir:`ltr`,children:o})]}),H(`div`,{ref:d,popover:`manual`,role:`tooltip`,class:`tooltip in tooltip-popover folder-${a}-tooltip`,children:[H(`div`,{class:`tooltip-arrow`}),H(`div`,{class:`tooltip-inner`,children:c||H(C,{children:[i?l(i)+`. `:``,o===void 0?l(r):r]})})]})]})}function Yr({isEncrypted:e=!1,remoteState:t=``}){return H(C,{children:[e&&H(J,{icon:`lock`,label:`Encrypted`,text:`Encrypted`}),t===`paused`&&H(J,{icon:`pause`,label:`Paused`,text:`The remote device has paused this folder.`}),t===`notSharing`&&H(J,{icon:`triangle-alert`,label:`Not shared`,text:`The remote device has not accepted sharing this folder.`})]})}function Xr({folder:e,info:t,scanning:n,state:r,status:i,onAction:a,onPause:o,onScan:s}){let{t:c}=B();return H(`div`,{class:`panel-footer action-row`,children:[wr(e,t,i).map(t=>H(`button`,{class:`btn btn-danger btn-sm`,onClick:()=>a({type:t,folder:e}),children:c(Ur[t].title)},t)),H(Gr,{className:`action-row-leading pull-left`,buttonClass:`btn btn-sm btn-default`,disabled:!e.devices.some(e=>e.deviceID!==r.system.myID),label:H(C,{children:[H(U,{name:`share`}),` `,c(`Shared`),` `,H(`span`,{class:`caret`})]}),children:({close:t})=>e.devices.filter(e=>e.deviceID!==r.system.myID).map(n=>{let i=r.config.devices.find(e=>e.deviceID===n.deviceID);return H(`li`,{children:H(`a`,{href:`#edit-device`,onClick:e=>{e.preventDefault(),t(),i&&a({type:`edit-device`,device:i})},children:[i?.name||n.deviceID.slice(0,7),` `,H(Yr,{isEncrypted:e.type===`receiveencrypted`||!!n.encryptionPassword,remoteState:r.completion[n.deviceID]?.folders?.[e.id]?.remoteState})]})},n.deviceID)})}),H(`button`,{class:`btn btn-sm btn-default`,onClick:o,children:[H(U,{name:e.paused?`play`:`pause`}),` `,c(e.paused?`Resume`:`Pause`)]}),H(`button`,{class:`btn btn-sm btn-default`,disabled:n||![`idle`,`stopped`,`unshared`,`outofsync`,`faileditems`,`localadditions`].includes(i),onClick:s,children:[H(U,{name:`refresh`,class:`icon-fixed`}),` `,c(`Rescan`)]}),e.versioning?.type&&e.versioning.type!==`external`&&H(`button`,{class:`btn btn-sm btn-default`,disabled:e.paused,onClick:()=>a({type:`versions`,folder:e}),children:[H(U,{name:`undo`}),` `,c(`Versions`)]}),H(`button`,{class:`btn btn-sm btn-default`,onClick:()=>a({type:`edit-folder`,folder:e}),children:[H(U,{name:`pencil`}),` `,c(`Edit`)]})]})}var Zr=[{threshold:1e9,suffix:`B`},{threshold:1e6,suffix:`M`},{threshold:1e3,suffix:`k`}],Qr=[{label:`d`,seconds:86400},{label:`h`,seconds:3600},{label:`m`,seconds:60},{label:`s`,seconds:1}];function $r(e){if(!Number.isFinite(e)||e<0)return`-`;for(let{threshold:t,suffix:n}of Zr)if(e>=t)return(Math.floor(e/(t/10))/10).toFixed(1)+n;return e.toLocaleString()}function Y(e,t){let n=Number(e);if(Number.isNaN(n))return`0 `;let r=t?1024:1e3;for(let{power:e,suffix:i}of[{power:4,suffix:`T`},{power:3,suffix:`G`},{power:2,suffix:`M`},{power:1,suffix:t?`K`:`k`}]){if(n<=r**e)continue;let a=n/r**e,o=e===4?a>1e3:t&&a>=1e3;return a.toLocaleString(void 0,o?{maximumFractionDigits:0}:{maximumSignificantDigits:3})+` `+i+(t?`i`:``)}return Math.round(n).toLocaleString()+` `}function ei(e,t=`s`){let n=Qr.findIndex(({label:e})=>e===t);if(n<0)throw RangeError(`Duration precision must be d, h, m or s`);let r=Math.abs(Number.parseInt(e,10))||0,i=[];for(let{label:e,seconds:a}of Qr.slice(0,n+1)){let n=Math.floor(r/a);(n||e===t&&r>0)&&i.push(n+e),r%=a}return i.join(` `)||`0`+t}function X(e){let t=new Date(e);if(Number.isNaN(t.getTime()))return``;let n=e=>String(e).padStart(2,`0`);return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())} ${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`}function ti({info:e,prefix:t=`global`}){let{t:n}=B(),r=e?.[t+`Files`],i=e?.[t+`Directories`],a=e?.[t+`Bytes`],o=H(C,{children:[H(`div`,{children:[H(`span`,{children:[H(U,{name:`copy`,class:`icon-fixed`}),` `,n(`Files`),`:`]}),H(`span`,{children:(r||0).toLocaleString()})]}),H(`div`,{children:[H(`span`,{children:[H(U,{name:`folder`,class:`icon-fixed`}),` `,n(`Folders`),`:`]}),H(`span`,{children:(i||0).toLocaleString()})]}),H(`div`,{children:[H(`span`,{children:[H(U,{name:`drive`,class:`icon-fixed`}),` `,n(`Total`),`:`]}),H(`span`,{children:[`~`,Y(a,!0),`B`]})]})]});return H(C,{children:[H(J,{icon:`copy`,label:`Files`,kind:`count`,children:o}),`\xA0`,$r(r),` `,H(J,{icon:`drive`,label:`Total`,kind:`count`,children:o}),`\xA0~`,Y(a,!0),`B`]})}function ni({config:e}){let{t}=B(),n=e.fsPath||`.stversions`,r=e=>ei(e,`s`);return H(C,{children:[H(`span`,{title:e.type===`external`?e.params.command:``,children:t(Ar[e.type]||``)}),e.type!==`external`&&H(C,{children:[[`trashcan`,`simple`].includes(e.type)&&H(`span`,{title:t(`Clean out after`),children:[` `,H(U,{name:`calendar`}),`\xA0`,Number(e.params.cleanoutDays)===0?t(`Disabled`):ei(e.params.cleanoutDays*86400,`d`)]}),e.type===`simple`&&H(`span`,{title:t(`Keep Versions`),children:[` `,H(U,{name:`archive`}),`\xA0`,e.params.keep]}),e.type===`staggered`&&H(`span`,{title:t(`Maximum Age`),children:[` `,H(U,{name:`calendar`}),`\xA0`,Number(e.params.maxAge)===0?t(`Forever`):r(e.params.maxAge)]}),H(`span`,{title:t(`Cleanup Interval`),children:[` `,H(U,{name:`recycle`}),`\xA0`,e.cleanupIntervalS===0?t(`Disabled`):r(e.cleanupIntervalS)]}),H(`span`,{class:`folder-change`,children:[H(U,{name:`folder-open`}),H(J,{label:n,text:n,triggerText:n.split(/[\\/]/).at(-1),tail:!0})]})]})]})}function ri({label:e,rowClass:t=``,icon:n=``,help:r=``,definition:i={},totalBytes:a,children:o}){let{t:s}=B(),c={icon:n||i.icon||`info`,help:r||i.help||``};return H(`tr`,{class:t,children:[H(`th`,{children:[H(J,{icon:c.icon,label:e,text:c.help,children:a!==void 0&&H(C,{children:[s(c.help),H(`br`,{}),s(`Total`),`: ~`,Y(a,!0),`B`]})}),`\xA0`,H(`span`,{children:s(e)})]}),H(`td`,{class:`text-right`,children:o})]})}var ii={"Global/local State":{icon:`dot`,help:`Shows the global totals alongside the folder status. Separate rows show global and local contents when details are needed; ignore patterns can make the totals differ even when up to date.`},"Global State":{icon:`globe`,help:`The latest known versions of files across the sharing devices. These totals describe the contents this folder would have when fully synchronized, before local ignore rules.`},"Local State":{icon:`house`,help:`The files and data Syncthing currently tracks in this folder on this device. These totals can differ from the global contents during synchronization or because of ignore patterns.`},"Altered by ignoring deletes.":{icon:`help`,help:`Deletion requests from other devices are ignored, so files deleted elsewhere can remain in this folder.`},"Last Scan":{icon:`clock`,help:`When Syncthing last scanned this folder for local changes. This is a scan timestamp, not the time of the last file transfer.`},Error:{icon:`triangle-alert`,help:`The problem Syncthing reports for this folder. Hover over the message to read the full details.`},"Failed Items":{icon:`circle-alert`,help:`Items Syncthing could not synchronize. Click the count to see the affected paths and their individual errors.`},"Locally Changed Items":{icon:`circle-alert`,help:`Local changes in a receive-only folder that are not sent to other devices, or unexpected local items in a receive-encrypted folder. Click the value to inspect them.`},"Scan Time Remaining":{icon:`hourglass`,help:`Estimated time left for the current scan, calculated from the remaining data and current scanning rate. This estimates scanning, not synchronization.`},"Latest Change":{icon:`arrow-left-right`,help:`The most recent file synchronized here, as reported by Syncthing. Hover over the filename for its full path, update or deletion, and timestamp.`},Rescans:{icon:`refresh`,help:`Detects local changes through periodic full scans and filesystem watching. The clock shows the scan interval; the eye shows whether watching is enabled.`},"File Versioning":{icon:`files`,help:`Keeps older copies when changes from another device replace or delete files here. It does not archive changes you make locally; retention depends on the selected versioning method.`},"Ignore Permissions":{icon:`square-minus`,help:`File permission changes are not synchronized for this folder. File contents still synchronize normally.`},"Folder Path":{icon:`folder-open`,help:`Full path to your Syncthing folder on the file system of this device. Hover over the value to see the complete path.`},"Folder Type":{icon:`folder`,help:`Controls how changes travel: Send and Receive exchanges changes both ways; Send Only publishes local changes; Receive Only accepts remote changes without publishing local edits; Receive Encrypted stores protected data without decrypting it.`},"Folder ID":{icon:`info`,help:`Identifies this shared folder across devices. Every device sharing it must use exactly the same ID, including letter case.`},"Block Indexing":{icon:`book`,help:`Keeps an index of data blocks so Syncthing can reuse existing content from other files, including other folders. Disabling it saves database space but can increase transfer bandwidth.`},"File Pull Order":{icon:`arrow-down-up`,help:`Sets the download priority for files needed from other devices. Ordering applies only to files already discovered during scanning.`}};function Z({label:e,...t}){return H(ri,{definition:ii[e],label:e,...t})}function ai({folder:e,info:t,stats:n,progress:r,status:i,label:a,onAction:o,onShowItems:s}){let{t:c}=B(),l=Cr(e,t)?[`global`,`local`]:[],u=e.fsWatcherEnabled&&!e.paused&&i!==`stopped`&&t?.watchError,d=[`receiveonly`,`receiveencrypted`].includes(e.type)&&t?.receiveOnlyTotalItems>0,f=e=>(e||``).split(/[\\/]/).at(-1),p=e=>t=>{t.preventDefault(),s(e)};return H(`div`,{class:`panel-body less-padding`,children:[H(`details`,{class:`folder-details`,open:!0,children:[H(`summary`,{children:c(`Current activity`)}),H(`table`,{class:`table table-condensed table-striped table-auto`,children:H(`tbody`,{children:[!e.paused&&t?.state&&H(`tr`,{class:`folder-state-summary`,children:[H(`th`,{children:[H(J,{icon:`dot`,iconClass:`text-${br(i)}`,label:`Global/local State`,prefix:a,text:ii[`Global/local State`].help}),`\xA0`,H(`span`,{children:c(`Global/local State`)}),t.ignorePatterns&&H(`a`,{href:`#ignores`,title:c(`Reduced by ignore patterns`),onClick:t=>{t.preventDefault(),o({type:`edit-folder`,folder:e,tab:`ignores`})},children:H(U,{name:`info`})})]}),H(`td`,{class:`text-right`,children:H(ti,{info:t})})]}),l.map(e=>H(Z,{label:e===`global`?`Global State`:`Local State`,rowClass:`folder-state-detail`,children:H(ti,{info:t,prefix:e})},e)),t?.needTotalItems>0&&H(Z,{label:`Out of Sync Items`,icon:`cloud-download`,help:`Items this device still needs to synchronize with other devices. The size counts whole files; reusing existing data can reduce the amount actually downloaded. Click the value to see the items.`,children:H(`a`,{href:`#needed`,onClick:p(`need`),children:[$r(t.needTotalItems),` `,c(`items`),`, ~`,Y(t.needBytes,!0),`B`]})}),!e.paused&&t?.state&&e.ignoreDelete&&H(`tr`,{children:H(`td`,{colSpan:`2`,class:`text-right`,children:H(`i`,{class:`small`,children:[c(`Altered by ignoring deletes.`),` `,H(`a`,{href:`https://docs.syncthing.net/advanced/folder-ignoredelete.html`,target:`_blank`,rel:`noreferrer`,children:c(`Help`)})]})})}),n?.lastScan&&H(Z,{label:`Last Scan`,children:(Date.now()-new Date(n.lastScan))/864e5>=365?c(`Never`):X(n.lastScan)}),!e.paused&&(t?.invalid||t?.error)&&H(Z,{label:`Error`,children:H(J,{label:t.invalid||t.error,text:t.invalid||t.error,triggerText:t.invalid||t.error})}),t&&t.errors!==0&&H(Z,{label:`Failed Items`,children:H(`a`,{href:`#failed`,onClick:p(`failed`),children:[$r(t.pullErrors||0),` `,c(`items`)]})}),d&&H(Z,{label:`Locally Changed Items`,children:H(`a`,{href:`#local-changed`,onClick:p(`local`),children:[$r(t.receiveOnlyTotalItems),` `,c(`items`),`, ~`,Y(t.receiveOnlyChangedBytes,!0),`B`]})}),i===`scanning`&&r?.rate>0&&H(Z,{label:`Scan Time Remaining`,children:H(`span`,{title:Y(r.rate,!0)+`B/s`,children:[`~ `,jr(r)]})}),![`sendonly`,`receiveencrypted`].includes(e.type)&&n?.lastFile?.filename&&H(Z,{label:`Latest Change`,children:H(J,{label:n.lastFile.filename,triggerText:f(n.lastFile.filename),tail:!0,kind:`change`,children:[e.path,`/`,n.lastFile.filename,H(`br`,{}),H(`span`,{class:`text-nowrap`,children:[H(`span`,{class:n.lastFile.deleted?`text-danger`:`text-success`,children:c(n.lastFile.deleted?`Deleted`:`Updated`)}),` @ `,H(`span`,{class:`text-warning folder-change-time`,children:X(n.lastFile.at)})]})]})})]})})]}),H(`details`,{class:`folder-details`,children:[H(`summary`,{children:c(`Configuration`)}),H(`table`,{class:`table table-condensed table-striped table-auto`,children:H(`tbody`,{children:[H(Z,{label:`Rescans`,children:H(`span`,{title:u||``,children:[H(U,{name:`clock`}),`\xA0`,e.rescanIntervalS>0?ei(e.rescanIntervalS,`s`):c(`Disabled`),` `,H(U,{name:e.fsWatcherEnabled&&!u?`eye`:`eye-off`}),`\xA0`,c(u?`Failed to set up, retrying`:e.fsWatcherEnabled?`Enabled`:`Disabled`)]})}),e.versioning?.type&&H(Z,{label:`File Versioning`,children:H(ni,{config:e.versioning})}),e.ignorePerms&&H(Z,{label:`Ignore Permissions`,children:c(`Yes`)})]})})]}),H(`details`,{class:`folder-details`,children:[H(`summary`,{children:c(`Folder information`)}),H(`table`,{class:`table table-condensed table-striped table-auto`,children:H(`tbody`,{children:[H(Z,{label:`Folder Path`,children:H(J,{label:e.path,text:e.path,triggerText:e.path,tail:!0})}),H(Z,{label:`Folder Type`,children:c(Or[e.type]||``)}),e.label&&H(Z,{label:`Folder ID`,children:H(J,{label:e.id,text:e.id,triggerText:e.id})}),H(Z,{label:`Block Indexing`,children:c(e.blockIndexing?`Yes`:`No`)}),e.type!==`sendonly`&&H(Z,{label:`File Pull Order`,children:c(kr[e.order]||``)})]})})]})]})}function oi({folder:e,info:t,label:n,open:r,percent:i,status:a,onToggle:o}){let{t:s}=B();return H(`button`,{class:`btn panel-heading`,"aria-expanded":r,onClick:o,children:[[`scanning`,`syncing`].includes(a)&&i!==void 0&&H(`span`,{class:`panel-progress`,style:{width:i+`%`}}),H(`span`,{class:`panel-title`,children:[H(`span`,{class:`panel-icon hidden-xs`,children:H(U,{name:{sendonly:`upload`,receiveonly:`download`,receiveencrypted:`lock`}[e.type]||`folder`,class:`icon-fixed`})}),H(`span`,{class:`panel-status pull-right text-${yr(a)}`,children:[H(`span`,{class:`hidden-xs`,children:s(n)}),a===`scanning`&&i!==void 0&&` (${i}%)`,a===`syncing`&&` (${i}%, ${Y(t.needBytes,!0)}B)`,H(U,{name:xr(a),class:`visible-xs icon-fixed`,label:s(n)})]}),H(`span`,{class:`panel-title-text`,title:e.label||e.id,children:e.label||e.id})]})]})}var si=e=>({type:`page`,number:e}),ci=e=>({type:`gap`,position:e});function li(e,t,n){let r=Math.ceil(t/n),i=r>9&&e>5?e>r-5?r-9+1:e-5+1:1;return Array.from({length:Math.min(9,r)},(t,n)=>n===0?si(1):n===8?si(r):r>9&&(n===1&&e>5||n===7&&e<=r-5)?ci(n===1?`leading`:`trailing`):si(i+n))}function ui({page:e,perpage:t,total:n,onPage:r,onSize:i}){let{t:a}=B(),o=li(e,n,t),s=Math.ceil(n/t);function c(t,n){t.preventDefault(),typeof n==`number`&&n>=1&&n<=s&&n!==e&&r(n)}return H(C,{children:[o.length>1&&H(`ul`,{class:`pagination`,children:[H(`li`,{class:e===1?`disabled`:``,children:H(`a`,{href:`#previous`,"aria-label":a(`Previous`),"aria-disabled":e===1,onClick:t=>c(t,e-1),children:`‹`})}),o.map(t=>{let n=t.type===`page`?t.number:null;return H(`li`,{class:n===e?`active`:n?``:`disabled`,children:H(`a`,{href:n?`#page-${n}`:`#page-gap`,"aria-current":n===e?`page`:void 0,"aria-disabled":!n,onClick:e=>c(e,n),children:n??`...`})},n??t.position)}),H(`li`,{class:e===s?`disabled`:``,children:H(`a`,{href:`#next`,"aria-label":a(`Next`),"aria-disabled":e===s,onClick:t=>c(t,e+1),children:`›`})})]}),H(`ul`,{class:`pagination pull-right`,children:[10,25,50].map(a=>H(`li`,{class:a===t?`active`:``,children:H(`a`,{href:`#page-size`,onClick:t=>{t.preventDefault(),r(Math.min(e,Math.max(1,Math.ceil(n/a)))),i(a)},children:a})},a))}),H(`div`,{class:`clearfix`})]})}var di=[{key:`reused`,label:`Reused`,color:`success`},{key:`copiedFromOrigin`,label:`Copied from original`,color:``},{key:`copiedFromElsewhere`,label:`Copied from elsewhere`,color:`info`},{key:`pulled`,label:`Downloaded`,color:`warning`},{key:`pulling`,label:`Downloading`,color:`danger`}];function fi({progress:e,legend:t=!1}){let{t:n}=B();return H(`div`,{class:`progress`,role:t?void 0:`progressbar`,"aria-label":t?void 0:n(`Downloading`),"aria-valuemin":t?void 0:0,"aria-valuemax":t?void 0:e.bytesTotal,"aria-valuenow":t?void 0:e.bytesDone,children:[di.map(({key:r,label:i,color:a})=>H(`div`,{class:`progress-bar ${a?`progress-bar-`+a:``}`,style:{width:(t?20:Number.isFinite(e[r])?e[r]:0)+`%`},title:n(i),children:t&&H(`span`,{class:`show`,children:n(i)})},r)),!t&&H(`span`,{class:`show frontal`,children:[Y(e.bytesDone,!0),`B /`,` `,Y(e.bytesTotal,!0),`B`]})]})}var pi={need:{route:`db/need`,title:`Out of Sync Items`,icon:`cloud-download`},failed:{route:`folder/errors`,title:`Failed Items`,icon:`circle-alert`},local:{route:`db/localchanged`,title:`Locally Changed Items`,icon:`circle-alert`}},mi={Del:`trash`,"Del (dir)":`trash`,Sync:`circle-arrow-down`,Update:`asterisk`},hi=4096,gi=16384,_i=20480;function vi(e){switch(e&_i){case _i:return`Del (dir)`;case hi:return`Del`;case gi:return`Update`;default:return`Sync`}}function yi(e){return[`progress`,`queued`,`rest`].flatMap(t=>(e[t]||[]).map(e=>{let n=vi(e.flags);return{...e,type:t,action:n}}))}function bi(e,t){switch(e){case`need`:return yi(t);case`failed`:return t.errors||[];default:return t.files||[]}}function xi({api:e,folder:t,kind:n,total:r,revision:i=0,progress:a={},progressEnabled:o=!1,onClose:s}){let{t:c}=B(),[l,u]=I(1),[d,f]=I(10),[p,m]=I([]),[h,g]=I(``),[_,v]=I(!1),y=pi[n];L(()=>{let r=new AbortController;return v(!0),e.get(y.route,{query:{folder:t.id,page:l,perpage:d},signal:r.signal}).then(e=>{m(bi(n,e)),g(``)}).catch(e=>{r.signal.aborted||g(e.message)}).finally(()=>{r.signal.aborted||v(!1)}),()=>r.abort()},[e,t.id,n,l,d,i,r,y.route]);async function b(n){try{let r=await e.post(`db/prio`,{query:{folder:t.id,file:n,page:l,perpage:d}});m(bi(`need`,r))}catch(e){g(e.message)}}function x(e){return n===`need`?H(C,{children:[e.type===`queued`&&H(`button`,{class:`btn btn-link btn-sm`,"aria-label":c(`Move to top of queue`),onClick:()=>b(e.name),children:H(U,{name:`arrow-up-to-line`})}),H(J,{label:e.name,text:e.name,triggerText:e.name.split(`/`).at(-1)})]}):e.path||e.name}function S(e){return n===`need`&&e.type===`progress`&&e.action===`Sync`&&a[e.name]?H(fi,{progress:a[e.name]}):n===`failed`?e.error:n===`local`?[`DIRECTORY`,`FILE_INFO_TYPE_DIRECTORY`].includes(e.type)?``:Y(e.size,!0)+`B`:e.size>0?Y(e.size,!0)+`B`:``}return H(W,{title:y.title,large:!0,status:n===`failed`||n===`local`&&t.type===`receiveencrypted`?`warning`:`info`,icon:y.icon,onClose:s,children:[n===`failed`&&H(`p`,{children:[c(`The following items could not be synchronized.`),` `,c(`They are retried automatically and will be synced when the error is resolved.`)]}),n===`local`&&H(`p`,{children:c(t.type===`receiveencrypted`?`The following unexpected items were found.`:`The following items were changed locally.`)}),n===`local`&&t.type===`receiveencrypted`&&H(`p`,{children:c(`You should never add or change anything locally in a "{%receiveEncrypted%}" folder.`,{receiveEncrypted:c(`Receive Encrypted`)})}),h&&H(`p`,{role:`alert`,class:`text-danger`,children:h}),n===`need`&&o&&H(fi,{legend:!0}),H(`table`,{class:`table table-striped table-condensed folder-items-table`,"aria-busy":_,children:[n===`local`&&H(`thead`,{children:H(`tr`,{children:[H(`th`,{children:c(`Path`)}),H(`th`,{children:c(`Size`)})]})}),H(`tbody`,{children:p.map((e,t)=>H(`tr`,{children:[n===`need`&&H(`td`,{class:`small-data`,children:[H(U,{name:mi[e.action]}),` `,c(e.action)]}),H(`td`,{class:`word-break-all`,children:x(e)}),H(`td`,{children:S(e)})]},`${e.name||e.path}:${t}`))})]}),H(ui,{page:l,perpage:d,total:r,onPage:u,onSize:f})]})}function Si({folder:e,info:t,stats:n,progress:r,api:i,rescan:a,state:o,session:s,onAction:c}){let[l,u]=I(!1),[d,f]=I(!1),[p,m]=I(``),h=vr(e,t),g=Sr(h),_=h===`syncing`?Er(t):r?Tr(r.current,r.total):void 0;async function v(){f(!0);try{await tt(()=>a(),s.reportError)}finally{f(!1)}}function y(){return tt(()=>s.setPaused(`folders`,e.id,!e.paused),s.reportError)}return H(C,{children:[H(`div`,{class:`panel panel-default`,children:[H(oi,{folder:e,info:t,label:g,open:l,percent:_,status:h,onToggle:()=>u(!l)}),l&&H(`div`,{class:`panel-collapse`,children:[H(ai,{folder:e,info:t,label:g,progress:r,stats:n,status:h,onAction:c,onShowItems:m}),H(Xr,{folder:e,info:t,scanning:d,state:o,status:h,onAction:c,onPause:y,onScan:v})]})]}),p&&H(xi,{api:i,folder:e,kind:p,revision:o.itemsRevision[e.id]||0,progress:o.downloadProgress[e.id]||{},progressEnabled:o.config.options.progressUpdateIntervalS>0&&e.type!==`receiveencrypted`,total:p===`need`?t.needTotalItems:p===`failed`?t.pullErrors:t.receiveOnlyTotalItems,onClose:()=>m(``)})]})}function Ci(e){if(!e)return`-1`;for(let t of[`relay`,`quic`,`tcp`])if(e.type?.startsWith(t))return t+(e.isLocal?`lan`:`wan`);return`disconnected`}var wi={relaywan:`Relay WAN`,relaylan:`Relay LAN`,quicwan:`QUIC WAN`,quiclan:`QUIC LAN`,tcpwan:`TCP WAN`,tcplan:`TCP LAN`},Ti={tcplan:`reception-4`,quiclan:`reception-4`,tcpwan:`reception-3`,quicwan:`reception-3`,relaylan:`reception-2`,relaywan:`reception-1`,disconnected:`reception-0`};function Ei(e,t){if(!e.remoteGUIPort||!t?.connected||!t.address||t.type?.includes(`Relay`))return``;let n=t.address.lastIndexOf(`:`);return`http://`+(n<0?t.address:t.address.slice(0,n)+`:`+e.remoteGUIPort).replace(/%.*?\]:/,`]:`).replace(`%`,`%25`)}function Di(e){return e?.error?e.error.replace(/.+: /,``)+` (`+X(e.when).slice(-8)+`)`:``}var Oi={"Local State (Total)":{icon:`house`,help:`Local files and data indexed across all folders on this device. These totals do not indicate whether every folder is synchronized.`},Listeners:{icon:`network`,help:`Listening services that accept incoming device connections. Shows working services out of the total. Click the count for addresses and errors.`},Discovery:{icon:`signpost`,help:`Services used to find other devices. Shows working discovery methods out of the total. Click the count for details; discovery success does not mean a device is connected.`},Uptime:{icon:`clock`,help:`Time since this Syncthing process started. Reloading the Web UI does not reset it.`},Identification:{icon:`qrcode`,help:`Show the full device ID and QR code for this remote device.`},Version:{icon:`tag`,help:`Syncthing client version reported by this remote device.`},"Device Status":{icon:`help`,help:`Connection and synchronization status of this remote device.`},"Sync Status":{icon:`cloud`,help:`Last known synchronization progress across folders shared with this device. An offline device may have changed since its last connection.`},"Out of Sync Items":{icon:`arrow-left-right`,help:`Items still needed by this remote device across shared folders, including pending deletions. Click the count to view the remaining work.`},Address:{icon:`link`,help:`Address used for the current connection, or configured and discovered addresses to try while disconnected. Connection errors appear beside each address.`},"Last seen":{icon:`eye`,help:`When this device was last seen connected. Never means no previous connection is recorded.`},"Number of Connections":{icon:`shuffle`,help:`Current connections to this device: one primary connection plus any additional connections.`},"Introduced By":{icon:`handshake`,help:`The device that introduced this peer to this machine.`},Compression:{icon:`minimize`,help:`Whether messages sent to this device are compressed: metadata only, all data, or off.`},"Allowed Networks":{icon:`filter`,help:`Connections to this device are restricted to these networks.`},Introducer:{icon:`thumbs-up`,help:`Automatically follows the devices this peer shares folders with.`},"Auto Accept":{icon:`folder-input`,help:`Automatically accepts folders offered by this device and adds them locally using the default folder path.`},Untrusted:{icon:`shield-user`,help:`Only encrypted folder data may be shared with this device.`},Folders:{icon:`folder`,help:`Folders this machine shares with this device. Select a folder to edit its sharing settings.`},Encrypted:{icon:`lock`,help:`Folder data is encrypted for this remote device.`},"Not Sharing":{icon:`circle-alert`,help:`The remote device has not accepted sharing this folder.`},Paused:{icon:`pause`,help:`The remote device has paused this folder.`},"Remote GUI":{icon:`monitor`,help:`Remote GUI address is unavailable. A direct connection to this device is required.`},Pause:{icon:`pause`,help:`Temporarily pause synchronization with this remote device.`},Resume:{icon:`play`,help:`Resume synchronization with this remote device.`},Edit:{icon:`pencil`,help:`Edit the configuration for this remote device.`}};function Q({label:e,...t}){return H(ri,{definition:Oi[e],label:e,...t})}function ki(e=``){let t=e.replace(/[\W_]/g,``),n=[];if(!t)return n;for(let e=0;e<5;e++)for(let r=2;r>=0;r--)t.charCodeAt(e+r*5)%2||(n.push([r,e]),r!==2&&n.push([4-r,e]));return n}function Ai({id:e}){return H(`span`,{class:`panel-icon`,children:H(`svg`,{class:`identicon`,viewBox:`0 0 5 5`,"aria-hidden":`true`,children:ki(e).map(([e,t],n)=>H(`rect`,{x:e,y:t,width:`1`,height:`1`},n))})})}function ji({completion:e,device:t,isLocalDevice:n,open:r,state:i,status:a,type:o,onToggle:s}){let{t:c}=B(),l=ut[a];return H(`button`,{class:`btn panel-heading`,"aria-expanded":r,onClick:s,children:[!n&&a===`syncing`&&H(`span`,{class:`panel-progress`,style:{width:e.totalPercentage+`%`}}),H(`span`,{class:`panel-title device-title`,children:[H(Ai,{id:t.deviceID}),!n&&H(`span`,{class:`panel-status pull-right text-${dt(t,i)}`,children:[H(`span`,{class:`hidden-xs`,children:c(l.label)}),a===`syncing`&&` (${e.totalPercentage}%, ${Y(e.neededBytes,!0)}B)`,H(U,{name:l.icon,class:`visible-xs icon-fixed`,label:c(l.label)}),H(`span`,{class:`inline-icon`,children:H(`span`,{class:`reception reception-theme ${Ti[o]||``}`})})]}),H(`span`,{class:`panel-title-text`,children:[H(`span`,{class:`device-name`,title:z(t),children:z(t)}),H(`small`,{class:`device-role text-success`,children:[`(`,c(n?`This Device`:`Remote`),`)`]})]})]})]})}function Mi({device:e,folders:t,isLocalDevice:n,state:r,onAction:i}){let{t:a}=B();return t.length===0?null:H(Gr,{placement:`dropup`,className:`action-row-leading device-folders`,buttonClass:`btn btn-sm btn-default`,label:H(C,{children:[H(U,{name:`folder`}),`\xA0`,a(`Folders`),` `,H(`span`,{class:`caret`})]}),children:({close:a})=>t.map(t=>H(`li`,{children:H(`a`,{href:n?`#folder`:`#folder-sharing`,onClick:e=>{e.preventDefault(),a(),i({type:`edit-folder`,folder:t,...n?{}:{tab:`sharing`}})},children:[t.label||t.id,!n&&H(C,{children:[` `,H(Yr,{isEncrypted:t.type===`receiveencrypted`||!!t.devices.find(t=>t.deviceID===e.deviceID)?.encryptionPassword,remoteState:r.completion[e.deviceID]?.folders?.[t.id]?.remoteState})]})]})},t.id))})}function Ni({device:e,folders:t,gui:n,isLocalDevice:r,session:i,state:a,onAction:o}){let{t:s}=B(),c=t=>o({type:t,device:e}),l=a.config.folders.some(e=>!e.paused);return H(`div`,{class:`panel-footer action-row device-actions`,children:[H(`button`,{class:`btn btn-sm btn-default`,onClick:()=>c(`identification`),children:[H(U,{name:`qrcode`}),`\xA0`,s(`Identification`)]}),H(Mi,{device:e,folders:t,isLocalDevice:r,state:a,onAction:o}),H(`span`,{class:`pull-right`,children:[r?a.config.folders.length>0&&H(`button`,{class:`btn btn-sm btn-default`,onClick:()=>tt(()=>i.setPaused(`folders`,void 0,l),i.reportError),children:[H(U,{name:l?`pause`:`play`}),`\xA0`,s(l?`Pause`:`Resume`)]}):H(C,{children:[e.remoteGUIPort>0&&H(`a`,{class:`btn btn-sm btn-default`,href:n||void 0,"aria-disabled":!n,children:[H(U,{name:`monitor`}),`\xA0`,s(`Remote GUI`)]}),H(`button`,{class:`btn btn-sm btn-default`,onClick:()=>tt(()=>i.setPaused(`devices`,e.deviceID,!e.paused),i.reportError),children:[H(U,{name:e.paused?`play`:`pause`}),`\xA0`,s(e.paused?`Resume`:`Pause`)]}),H(`button`,{class:`btn btn-sm btn-default`,onClick:()=>c(`edit-device`),children:[H(U,{name:`pencil`}),`\xA0`,s(`Edit`)]})]}),r&&H(`button`,{class:`btn btn-sm btn-default`,onClick:()=>c(`settings`),children:[H(U,{name:`settings`}),`\xA0`,s(`Settings`)]})]})]})}function Pi(e={}){let t=Object.entries(e),n=t.filter(([,e])=>e?.error);return{entries:t,failed:n,total:t.length,running:t.length-n.length,color:t.length&&!n.length?`success`:t.length===n.length?`danger`:``}}function Fi({connection:e,device:t,isLocalDevice:n,state:r,type:i,onAction:a}){let{t:o}=B(),s=ct(r.deviceStats[t.deviceID]?.lastSeen),c=Pi(r.system.connectionServiceStatus),l=Pi(r.system.discoveryStatus),u=[...(t.addresses||[]).map(e=>({address:e,source:`Configured`})),...(r.discoveryCache[t.deviceID]?.addresses||[]).map(e=>({address:e,source:`Discovered`}))];function d(e,n){e.preventDefault(),a({type:n,device:t})}return H(`details`,{class:`device-details`,open:!0,children:[H(`summary`,{children:o(`Connectivity`)}),H(`table`,{class:`table table-condensed table-striped table-auto`,children:H(`tbody`,{children:n?H(C,{children:[H(Q,{label:`Listeners`,children:H(`a`,{href:`#listeners`,class:`text-${c.color}`,onClick:e=>d(e,`listeners`),children:[c.running,`/`,c.total]})}),r.system.discoveryEnabled&&H(Q,{label:`Discovery`,children:H(`a`,{href:`#discovery`,class:`text-${l.color}`,onClick:e=>d(e,`discovery`),children:[l.running,`/`,l.total]})})]}):H(C,{children:[H(Q,{label:`Address`,children:e.connected?e.address:u.map((e,n)=>H(`span`,{class:`remote-address`,children:[H(`span`,{class:`folder-text`,title:o(e.source)+`: `+e.address,children:e.address}),r.system.lastDialStatus?.[e.address]?.error&&!t.paused&&H(`small`,{class:`text-danger`,title:r.system.lastDialStatus[e.address].error,children:Di(r.system.lastDialStatus[e.address])})]},n))}),e.connected?H(C,{children:[H(Q,{label:`Connection Type`,icon:`signal`,help:`Transport and network used to reach this device. A relay forwards traffic when a direct connection is unavailable.`,children:o(wi[i]||`Disconnected`)}),H(Q,{label:`Number of Connections`,children:[`1`,e.secondary?.length?` + `+e.secondary.length:``]})]}):H(Q,{label:`Last seen`,children:s?H(C,{children:[X(r.deviceStats[t.deviceID].lastSeen),s>=7&&H(C,{children:[H(`br`,{}),H(`i`,{class:s>=365?`text-danger`:s>=30?`text-warning`:``,children:o(s>=365?`More than a year ago`:s>=30?`More than a month ago`:`More than a week ago`)})]})]}):o(`Never`)})]})})})]})}function Ii({connection:e,device:t,isLocalDevice:n,options:r,usesMetricRates:i,onToggleUnits:a}){let{t:o}=B(),s=e=>Y(i?e*8:e,!i)+(i?`bps`:`B/s`);return[`in`,`out`].map(i=>{let c=(n?r:t)[i===`in`?`maxRecvKbps`:`maxSendKbps`];return H(Q,{label:i===`in`?`Download Rate`:`Upload Rate`,icon:i===`in`?`download`:`upload`,help:i===`in`?n?`Incoming traffic across all connected devices. Click the rate to switch between bytes and bits per second. A configured limit appears below.`:`Data received by this machine from this remote device. Click the rate to switch between bytes and bits per second.`:n?`Outgoing traffic across all connected devices. Click the rate to switch between bytes and bits per second. A configured limit appears below.`:`Data sent by this machine to this remote device. Click the rate to switch between bytes and bits per second.`,totalBytes:e[i+`BytesTotal`],children:H(`a`,{href:`#units`,onClick:e=>{e.preventDefault(),a()},children:[s(e[i+`bps`]||0),c>0&&H(`small`,{children:[H(`br`,{}),H(`i`,{class:`text-muted`,children:[o(`Limit`),`: `,s(c*1024),n&&r.limitBandwidthInLan&&` (${o(`Applied to LAN`)})`]})]})]})},i)})}var Li=[{property:`introducer`,label:`Introducer`},{property:`autoAcceptFolders`,label:`Auto Accept`},{property:`untrusted`,label:`Untrusted`}];function Ri({device:e,state:t,session:n,isLocalDevice:r=!1,usesMetricRates:i,toggleUnits:a,onAction:o}){let{t:s}=B(),[c,l]=I(r),u=r?t.connectionsTotal:t.connections[e.deviceID]||{},d=t.completion[e.deviceID]||{},f=r?t.config.folders:st(t.config,e.deviceID),p=lt(e,t),m=ut[p],h=Ci(u),g=Dr(t.model),_=Ei(e,u),v=(t,n={})=>o({type:t,device:e,...n}),y=(e,t)=>{e.preventDefault(),v(t)};return H(`div`,{class:`panel panel-default`,children:[H(ji,{completion:d,device:e,isLocalDevice:r,open:c,state:t,status:p,type:h,onToggle:()=>l(!c)}),c&&H(`div`,{class:`panel-collapse`,children:[H(`div`,{class:`panel-body less-padding`,children:[!r&&H(`table`,{class:`table table-condensed visible-xs remote-status`,children:H(`tbody`,{children:H(Q,{label:`Device Status`,icon:m.icon,children:s(m.label)})})}),(r||u.connected||f.length>0||d.neededItems>0)&&H(`details`,{class:`device-details`,open:!0,children:[H(`summary`,{children:s(`Current activity`)}),H(`table`,{class:`table table-condensed table-striped table-auto`,children:H(`tbody`,{children:[!r&&!u.connected&&f.length>0&&H(Q,{label:`Sync Status`,children:d.totalPercentage===100?s(`Up to Date`):d.totalPercentage<100?s(`Out of Sync`)+` (`+d.totalPercentage+`%)`:``}),(r||u.connected)&&H(Ii,{connection:u,device:e,isLocalDevice:r,options:t.config.options,usesMetricRates:i,onToggleUnits:a}),r&&H(Q,{label:`Local State (Total)`,children:H(ti,{prefix:`local`,info:{localFiles:g.files,localDirectories:g.directories,localBytes:g.bytes}})}),!r&&d.neededItems>0&&H(Q,{label:`Out of Sync Items`,children:H(`a`,{href:`#remote-needed`,onClick:e=>y(e,`remote-needed`),children:[H(J,{icon:`arrow-left-right`,label:`Out of Sync Items`,text:`${d.neededItems.toLocaleString()} ${s(`items`)}, ~${Y(d.neededBytes,!0)}B`}),$r(d.neededItems),` `,s(`items`),`, ~`,Y(d.neededBytes,!0),`B`]})})]})})]}),H(Fi,{connection:u,device:e,isLocalDevice:r,state:t,type:h,onAction:o}),H(`details`,{class:`device-details`,children:[H(`summary`,{children:s(`Device information`)}),H(`table`,{class:`table table-condensed table-striped table-auto`,children:H(`tbody`,{children:r?H(C,{children:[H(Q,{label:`Uptime`,children:ei(t.system.uptime,`m`)}),H(Q,{label:`Version`,help:`Version and platform of the Syncthing service running on this device.`,children:[t.version.version,` (`,t.version.os,` `,t.version.arch,`)`]})]}):H(C,{children:[u.clientVersion&&H(Q,{label:`Version`,children:u.clientVersion}),e.introducedBy&&H(Q,{label:`Introduced By`,children:z(t.config.devices.find(t=>t.deviceID===e.introducedBy))||e.introducedBy.slice(0,7)}),H(Q,{label:`Compression`,children:s({always:`All Data`,metadata:`Metadata Only`,never:`Off`}[e.compression]||``)}),e.allowedNetworks?.length>0&&H(Q,{label:`Allowed Networks`,children:e.allowedNetworks.join(`, `)}),Li.map(({property:t,label:n})=>e[t]&&H(Q,{label:n,children:s(`Yes`)},t))]})})})]})]}),H(Ni,{device:e,folders:f,gui:_,isLocalDevice:r,session:n,state:t,onAction:o})]})]})}function zi({api:e}){let{t}=B(),[n,r]=I(``),[i,a]=I(``),[o,s]=I(!1),[c,l]=I(!1),[u,d]=I(``),f=R();L(()=>{f.current.focus()},[]);async function p(t){t.preventDefault(),l(!0),d(``);try{await e.post(`noauth/auth/password`,{body:{username:n.trim(),password:i,stayLoggedIn:o}}),location.reload()}catch(e){d(e.status===403?`Incorrect user name or password.`:`Login failed, see Syncthing logs for details.`)}finally{l(!1)}}return H(`div`,{class:`center-block`,children:[H(`h3`,{children:t(`Authentication Required`)}),H(`form`,{onSubmit:p,children:[H(`div`,{class:`form-group`,children:[H(`label`,{for:`user`,children:t(`User`)}),H(`input`,{id:`user`,name:`user`,class:`form-control`,autoComplete:`username`,ref:f,value:n,required:!0,onInput:e=>r(e.currentTarget.value)})]}),H(`div`,{class:`form-group`,children:[H(`label`,{for:`password`,children:t(`Password`)}),H(`input`,{id:`password`,name:`password`,class:`form-control`,type:`password`,autoComplete:`current-password`,value:i,onInput:e=>a(e.currentTarget.value)})]}),H(`div`,{class:`form-group`,children:H(`label`,{children:[H(`input`,{id:`stayLoggedIn`,type:`checkbox`,checked:o,onChange:e=>s(e.currentTarget.checked)}),` `,t(`Stay logged in`)]})}),H(`div`,{class:`row`,children:[H(`div`,{class:`col-md-9 login-form-messages`,children:u&&H(`p`,{class:`text-danger`,role:`alert`,children:t(u)})}),H(`div`,{class:`col-md-3 text-right`,children:H(`button`,{id:`submit`,class:`btn btn-default`,type:`submit`,disabled:c,children:t(`Log In`)})})]})]})]})}var Bi={tone:`default`,icon:`check`},Vi={Settings:{tone:`default`,icon:`settings`},Restart:{tone:`default`,icon:`refresh`},"Add Device":{tone:`success`,icon:`plus`},Add:{tone:`success`,icon:`check`},Share:{tone:`success`,icon:`check`},"Enable Crash Reporting":{tone:`success`,icon:`check`},Ignore:{tone:`danger`,icon:`x`},"Disable Crash Reporting":{tone:`danger`,icon:`x`},Yes:{tone:`primary`,icon:`check`},Dismiss:{tone:`default`,icon:`clock`},No:{tone:`default`,icon:`x`}};function Hi({card:e,onAction:t}){let{t:n}=B();return H(`div`,{class:`panel panel-${e.severity}`,children:[H(`div`,{class:`panel-heading`,children:H(`h3`,{class:`panel-title`,children:[e.kind===`device`?H(Ai,{id:e.device}):H(`span`,{class:`panel-icon`,children:H(U,{name:e.kind===`folder`?`folder`:e.severity===`success`?`zap`:`circle-alert`})}),H(`span`,{class:`notification-title-text`,children:n(e.title)}),e.time&&H(`time`,{class:`notification-time`,dateTime:e.time,children:X(e.time)})]})}),H(`div`,{class:`panel-body`,children:[(e.paragraphs||[]).map((t,r)=>H(`p`,{children:n(t,e.params)},r)),(e.errors||[]).map((e,t)=>H(`p`,{children:[H(`small`,{children:[X(e.when),`:`]}),` `,e.message]},t)),e.watchers&&H(`table`,{children:H(`tbody`,{children:e.watchers.map(e=>H(`tr`,{children:[H(`td`,{children:[e.name,`: `]}),H(`td`,{children:e.error})]},e.name))})}),e.link&&H(`p`,{children:H(`a`,{href:e.link,target:`_blank`,rel:`noreferrer`,children:[H(U,{name:`info`}),`\xA0`,n(e.id===`watchers`?`Support`:`Learn more`)]})})]}),e.actions?.length>0&&H(`div`,{class:`panel-footer clearfix`,children:e.actions.map(r=>{let i=Vi[r]||Bi;return H(`button`,{class:`btn btn-sm btn-${i.tone}`,onClick:()=>t(e,r),children:[H(U,{name:i.icon}),`\xA0`,n(r)]},r)})})]})}function Ui({cards:e,session:t,onAction:n}){let{t:r}=B(),i=(e,r)=>tt(()=>Hr(t,e,r,n),t.reportError);return H(C,{children:[H(`h3`,{children:r(`Notifications`)}),!e.length&&H(`p`,{class:`notifications-empty`,children:r(`No pending notifications.`)}),H(`div`,{class:`notification-grid`,children:e.map(e=>H(Hi,{card:e,onAction:i},e.id))})]})}function Wi({activeId:e,items:t,onSelect:n,className:r=``}){function i(r){let i=t.filter(e=>!e.disabled),a=i.findIndex(t=>t.id===e);if(r.key===`ArrowRight`)a=(a+1)%i.length;else if(r.key===`ArrowLeft`)a=(a+i.length-1)%i.length;else if(r.key===`Home`)a=0;else if(r.key===`End`)a=i.length-1;else return;r.preventDefault();let o=i[a];n(o.id);let s=r.currentTarget.querySelectorAll(`[role="tab"]`);for(let e of s)e.dataset.tabId===o.id&&e.focus()}return H(`ul`,{class:`nav nav-tabs ${r}`.trim(),role:`tablist`,onKeyDown:i,children:t.map(t=>H(`li`,{class:t.id===e?`active`:t.disabled?`disabled`:``,role:`presentation`,children:H(`a`,{id:t.tabId,href:`#`+t.panelId,role:`tab`,"data-tab-id":t.id,"aria-controls":t.panelId,"aria-selected":t.id===e,"aria-disabled":t.disabled||void 0,tabIndex:t.id===e?0:-1,onClick:e=>{e.preventDefault(),t.disabled||n(t.id)},children:t.label})},t.id))})}var Gi={authors:`Jakob Borg, Audrius Butkevicius, Simon Frei, Tomasz Wilczyński, Alexander Graf, Alexandre Viau, Anderson Mesquita, André Colomb, Antony Male, Ben Schulz, bt90, Caleb Callaway, Daniel Harte, Emil Lundberg, Eric P, Evgeny Kuznetsov, greatroar, Lars K.W. Gohlke, Lode Hoste, Marcus B Spencer, Michael Ploujnikov, Ross Smith II, Stefan Tatschner, Tommy van der Vorst, Wulf Weich, Adam Piggott, Adel Qalieh, Aleksey Vasenev, Alessandro G., Alex Ionescu, Alex Lindeman, Alex Xu, Alexander Seiler, Alexandre Alves, Aman Gupta, Andreas Sommer, andresvia, Andrew Gunnerson, Andrew Rabert, Andrey D, andyleap, Anjan Momi, Anthony Goeckner, Antoine Lamielle, Anur, Aranjedeath, ardevd, Arkadiusz Tymiński, Aroun, Arthur Axel fREW Schmidt, Artur Zubilewicz, Ashish Bhate, Aurélien Rainone, BAHADIR YILMAZ, Bart De Vries, Beat Reichenbach, Ben Norcombe, Ben Shepherd, Ben Sidhom, Benedikt Heine, Benno Fünfstück, Benny Ng, boomsquared, Boqin Qin, Boris Rybalkin, Brendan Long, Catfriend1, Cathryne Linenweaver, Cedric Staniewski, Chih-Hsuan Yen, Choongkyu, Chris Howie, Chris Joel, Christian Kujau, Christian Prescott, chucic, cjc7373, Colin Kennedy, Cromefire_, cui, Cyprien Devillez, d-volution, Dan, Daniel Barczyk, Daniel Bergmann, Daniel Martí, Daniel Padrta, Daniil Gentili, Darshil Chanpura, dashangcun, David Rimmer, DeflateAwning, Denis A., Dennis Wilson, derekriemer, DerRockWolf, desbma, Devon G. Redekopp, digital, Dimitri Papadopoulos Orfanos, Dmitry Saveliev, domain, Domenic Horner, Dominik Heidler, Elias, Elias Jarlebring, Elliot Huffman, Emil Hessman, Eng Zer Jun, entity0xfe, Epifeny, epifeny, Eric Lesiuta, Erik Meitner, Evan Spensley, Federico Castagnini, Felix, Felix Ableitner, Felix Lampe, Felix Unterpaintner, Francois-Xavier Gsell, Frank Isemann, Frederic, Gahl Saraf, georgespatton, ghjklw, Gilli Sigurdsson, Gleb Sinyavskiy, Graham Miln, Greg, guangwu, gudvinr, Gusted, Han Boetes, HansK-p, Harrison Jones, Hazem Krimi, Heiko Zuerker, Henrik Bråthen, Hireworks, Hugo Locurcio, Iain Barnett, Ian Johnson, ignacy123, Iskander Sharipov, Jaakko Hannikainen, Jack Croft, Jacob, Jake Peterson, James O'Beirne, James Patterson, Jaroslav Lichtblau, Jaroslav Malec, Jaspitta, Jaya Chithra, Jaya Kumar, Jeffery To, jelle van der Waa, Jens Diemer, Jochen Voss, Johan Vromans, John Rinehart, Jonas Thelemann, Jonathan, Jose Manuel Delicado, JRNitre, jtagcat, Julian Lehrhuber, Jörg Thalheim, Jędrzej Kula, Kapil Sareen, Karol Różycki, Kebin Liu, Keith Harrison, Kelong Cong, Ken'ichi Kamada, Kevin Allen, Kevin Bushiri, Kevin White, Jr., klemens, Kurt Fitzner, kylosus, Lars Lehtonen, Laurent Etiemble, Leo Arias, Liu Siyuan, Lord Landon Agahnim, LSmithx2, Luiz Angelo Daros de Luca, Lukas Lihotzki, Luke Hamburg, luzpaz, Majed Abdulaziz, Marc Laporte, Marcel Meyer, Marcin Dziadus, Marcus Legendre, Mario Majila, Mark Pulford, Martchus, Mateusz Naściszewski, Mateusz Ż, mathias4833, Matic Potočnik, Matt Burke, Matt Robenolt, Matteo Ruina, mattn, Maurizio Tomasi, Max, Max Schulze, MaximAL, Maximilian, Maxwell G, Michael Jephcote, Michael Rienstra, Michael Wang 汪東陽, MichaIng, Migelo, Mike Boone, MikeLund, MikolajTwarog, Mingxuan Lin, mv1005, Nate Morrison, nf, Nicholas Rishel, Nick Busey, Nico Stapelbroek, Nicolas Braud-Santoni, Nicolas Perraut, Niels Peter Roest, Nils Jakobi, NinoM4ster, Nitroretro, NoLooseEnds, Oliver Freyermuth, orangekame3, otbutz, overkill, Oyebanji Jacob Mayowa, Pablo, Pascal Jungblut, Paul Brit, Paul Donald, Pawel Palenica, perewa, Peter Badida, Peter Dave Hello, Peter Hoeg, Peter Marquardt, Phani Rithvij, Phil Davis, Philippe Schommers, Phill Luby, Piotr Bejda, polyfloyd, Prathik P Kulkarni, pullmerge, Quentin Hibon, Rahmi Pruitt, RealCharlesChia, red_led, Robert Carosi, Roberto Santalla, Robin Schoonover, Rohit Tanwar, Roman Zaynetdinov, rubenbe, Ruslan Yevdokymov, Ryan Qian, Ryan Sullivan, Sacheendra Talluri, Scott Klupfel, sec65, Sergey Mishin, Sertonix, Severin von Wnuck-Lipinski, Shaarad Dalvi, Shablone, Shivam Kumar, Simon Mwepu, Simon Pickup, Sly_tom_cat, Sonu Kumar Saw, Stefan Kuntz, Steven Eckhoff, Suhas Gundimeda, Sven Bachmann, Sébastien WENSKE, Tao, Taylor Khan, tbodt, Terrance, TheCreeper, Thomas, Thomas Hipp, Tim Abell, Tim Howes, Tobias Frölich, Tobias Klauser, Tobias Nygren, Tobias Tom, Tom Jakubowski, Tully Robinson, Tyler Brazier, Tyler Kropp, Umer-Azaz, Unrud, Val Markovic, vapatel2, Veeti Paananen, Victor Buinsky, Vik, Vil Brekin, villekalliomaki, Vladimir Rusinov, vvaswani, wangguoliang, WangXi, Will Rouesnel, William A. Kennington III, wouter bolsterlee, xarx00, Xavier O., xjtdy888, Yannic A., yparitcher, 佛跳墙, 落心`,software:[{url:`https://getbootstrap.com/`,name:`Bootstrap`,notice:`Copyright © 2011-2016 Twitter, Inc.`},{url:`https://lucide.dev/`,name:`Lucide`,notice:`Copyright © 2026 Lucide Contributors.`},{url:`https://golang.org/`,name:`The Go Programming Language`,notice:`Copyright © 2009 The Go Authors.`},{url:`https://prometheus.io/`,name:`Prometheus`,notice:`Copyright © 2012-2015 The Prometheus Authors.`},{url:`https://github.com/AudriusButkevicius/recli`,name:`AudriusButkevicius/recli`,notice:`Copyright © 2019 Audrius Butkevicius.`},{url:`https://github.com/Azure/go-ntlmssp`,name:`Azure/go-ntlmssp`,notice:`Copyright © 2016 Microsoft.`},{url:`https://github.com/alecthomas/kong`,name:`alecthomas/kong`,notice:`Copyright © 2018 Alec Thomas.`},{url:`https://github.com/beorn7/perks`,name:`beorn7/perks`,notice:`Copyright © 2013 Blake Mizerany.`},{url:`https://github.com/calmh/incontainer`,name:`calmh/incontainer`,notice:`Copyright © 2022 calmh.`},{url:`https://github.com/calmh/xdr`,name:`calmh/xdr`,notice:`Copyright © 2014 Jakob Borg.`},{url:`https://github.com/ccding/go-stun`,name:`ccding/go-stun`,notice:`Copyright © 2016 Cong Ding.`},{url:`https://github.com/cespare/xxhash/v2`,name:`cespare/xxhash/v2`,notice:`Copyright © 2016 Caleb Spare.`},{url:`https://github.com/cpuguy83/go-md2man/v2`,name:`cpuguy83/go-md2man/v2`,notice:`Copyright © 2014 Brian Goff.`},{url:`https://github.com/davecgh/go-spew`,name:`davecgh/go-spew`,notice:`Copyright © 2012-2016 Dave Collins.`},{url:`https://github.com/go-asn1-ber/asn1-ber`,name:`go-asn1-ber/asn1-ber`,notice:`Copyright © 2011-2015 Michael Mitton (mmitton@gmail.com).`},{url:`https://github.com/go-ldap/ldap`,name:`go-ldap/ldap`,notice:`Copyright © 2011-2015 Michael Mitton (mmitton@gmail.com).`},{url:`https://github.com/gobwas/glob`,name:`gobwas/glob`,notice:`Copyright © 2016 Sergey Kamardin.`},{url:`https://github.com/gofrs/flock`,name:`gofrs/flock`,notice:`Copyright © 2018-2025, The Gofrs.`},{url:`https://github.com/golang/snappy`,name:`golang/snappy`,notice:`Copyright © 2011 The Snappy-Go Authors.`},{url:`https://github.com/protocolbuffers/protobuf-go`,name:`google.golang.org/protobuf`,notice:`Copyright © 2018 The Go Authors.`},{url:`https://github.com/google/uuid`,name:`google/uuid`,notice:`Copyright © 2009,2014 Google Inc.`},{url:`https://gopkg.in/yaml.v3`,name:`gopkg.in/yaml.v3`,notice:`Copyright © 2025, the gopkg.in/yaml.v3 authors.`},{url:`https://github.com/hashicorp/errwrap`,name:`hashicorp/errwrap`,notice:`Copyright © 2014 HashiCorp, Inc.`},{url:`https://github.com/hashicorp/go-multierror`,name:`hashicorp/go-multierror`,notice:`Copyright © 2014 HashiCorp, Inc.`},{url:`https://github.com/hashicorp/golang-lru`,name:`hashicorp/golang-lru`,notice:`Copyright © 2014 HashiCorp, Inc.`},{url:`https://github.com/jackpal/gateway`,name:`jackpal/gateway`,notice:`Copyright © 2010 Jack Palevich.`},{url:`https://github.com/jackpal/go-nat-pmp`,name:`jackpal/go-nat-pmp`,notice:`Copyright 2013 John Howard Palevich.`},{url:`https://github.com/jmoiron/sqlx`,name:`jmoiron/sqlx`,notice:`Copyright © 2013, Jason Moiron.`},{url:`https://github.com/julienschmidt/httprouter`,name:`julienschmidt/httprouter`,notice:`Copyright © 2013, Julien Schmidt.`},{url:`https://github.com/kballard/go-shellquote`,name:`kballard/go-shellquote`,notice:`Copyright © 2014 Kevin Ballard.`},{url:`https://github.com/mattn/go-sqlite3`,name:`mattn/go-sqlite3`,notice:`Copyright © 2014 Yasuhiro Matsumoto.`},{url:`https://github.com/miscreant/miscreant.go`,name:`miscreant/miscreant.go`,notice:`Copyright © 2017-2019 The Miscreant Developers.`},{url:`https://github.com/munnerz/goautoneg`,name:`munnerz/goautoneg`,notice:`Copyright © 2011, Open Knowledge Foundation Ltd.`},{url:`https://github.com/pierrec/lz4`,name:`pierrec/lz4`,notice:`Copyright © 2015 Pierre Curto.`},{url:`https://github.com/pkg/errors`,name:`pkg/errors`,notice:`Copyright © 2015, Dave Cheney.`},{url:`https://github.com/pmezard/go-difflib`,name:`pmezard/go-difflib`,notice:`Copyright © 2013, Patrick Mezard.`},{url:`https://github.com/posener/complete`,name:`posener/complete`,notice:`Copyright © 2017 Eyal Posener.`},{url:`https://github.com/prometheus/client_golang`,name:`prometheus/client_golang`,notice:`Copyright 2012-2015 The Prometheus Authors.`},{url:`https://github.com/prometheus/client_model`,name:`prometheus/client_model`,notice:`Copyright © 2025, the prometheus/client_model authors.`},{url:`https://github.com/prometheus/common`,name:`prometheus/common`,notice:`Copyright © 2025, the prometheus/common authors.`},{url:`https://github.com/prometheus/procfs`,name:`prometheus/procfs`,notice:`Copyright © 2025, the prometheus/procfs authors.`},{url:`https://github.com/quic-go/quic-go`,name:`quic-go/quic-go`,notice:`Copyright © 2016 the quic-go authors & Google, Inc.`},{url:`https://github.com/rcrowley/go-metrics`,name:`rcrowley/go-metrics`,notice:`Copyright © 2012 Richard Crowley.`},{url:`https://github.com/riywo/loginshell`,name:`riywo/loginshell`,notice:`Copyright © 2019 Ryosuke IWANAGA.`},{url:`https://github.com/russross/blackfriday/v2`,name:`russross/blackfriday/v2`,notice:`Copyright © 2011 Russ Ross.`},{url:`https://github.com/shirou/gopsutil`,name:`shirou/gopsutil`,notice:`Copyright © 2014, WAKAYAMA Shirou.`},{url:`https://github.com/stretchr/objx`,name:`stretchr/objx`,notice:`Copyright © 2014 Stretchr, Inc.`},{url:`https://github.com/stretchr/testify`,name:`stretchr/testify`,notice:`Copyright © 2012-2020 Mat Ryer, Tyler Bunnell and contributors.`},{url:`https://github.com/syndtr/goleveldb`,name:`syndtr/goleveldb`,notice:`Copyright © 2012 Suryandaru Triandana.`},{url:`https://github.com/thejerf/suture`,name:`thejerf/suture`,notice:`Copyright © 2014-2015 Barracuda Networks, Inc.`},{url:`https://github.com/tklauser/go-sysconf`,name:`tklauser/go-sysconf`,notice:`Copyright © 2018-2022, Tobias Klauser.`},{url:`https://github.com/tklauser/numcpus`,name:`tklauser/numcpus`,notice:`Copyright © 2018-2024 Tobias Klauser.`},{url:`https://github.com/urfave/cli`,name:`urfave/cli`,notice:`Copyright © 2016 Jeremy Saenz & Contributors.`},{url:`https://github.com/vitrun/qart`,name:`vitrun/qart`,notice:`Copyright © 2010-2011 The Go Authors.`},{url:`https://github.com/willabides/kongplete`,name:`willabides/kongplete`,notice:`Copyright © 2020 WillAbides.`}]},Ki=[{label:`User Home`,keys:[`baseDir-userHome`]},{label:`Configuration Directory`,keys:[`baseDir-config`]},{label:`Configuration File`,keys:[`config`]},{label:`Device Certificate`,keys:[`certFile`,`keyFile`]},{label:`GUI / API HTTPS Certificate`,keys:[`httpsCertFile`,`httpsKeyFile`]},{label:`Database Location`,keys:[`database`]},{label:`Log File`,keys:[`logFile`]},{label:`GUI Override Directory`,keys:[`guiAssets`]}];function qi(){let{t:e}=B();return H(C,{children:[H(`h4`,{children:e(`The Syncthing Authors`)}),H(`p`,{children:Gi.authors})]})}function Ji(){let{t:e}=B();return H(C,{children:[H(`p`,{children:[`Preact · `,H(`a`,{href:`licenses/preact.txt`,children:`MIT license`})]}),H(`p`,{children:e(`Syncthing includes the following software or portions thereof:`)}),H(`ul`,{class:`list-unstyled`,children:Gi.software.map(e=>H(`li`,{children:[H(`a`,{href:e.url,target:`_blank`,rel:`noreferrer`,children:e.name}),` `,`· `,e.notice]},e.url))})]})}function Yi({paths:e}){let{t}=B();return H(`table`,{class:`table table-condensed table-striped about-paths`,children:[H(`caption`,{children:t(`Internally used paths:`)}),H(`tbody`,{children:Ki.map(({label:n,keys:r})=>H(`tr`,{children:[H(`th`,{children:t(n)}),H(`td`,{children:r.map(t=>H(`div`,{children:H(`code`,{class:`word-break-all`,children:e[t]||``})},t))})]},n))})]})}function Xi({api:e,version:t,onClose:n}){let{t:r}=B(),[i,a]=I(`Authors`),[o,s]=I({}),[c,l]=I(``),u=[`Authors`,`Included Software`,`Paths`].map(e=>({id:e,tabId:`about-`+e.toLowerCase().replaceAll(` `,`-`)+`-tab`,panelId:`about-panel`,label:r(e)}));L(()=>{let t=new AbortController;return window.metadata?.authenticated&&e.get(`system/paths`,{signal:t.signal}).then(s).catch(e=>{t.signal.aborted||l(e.message)}),()=>t.abort()},[e]);let d={Authors:H(qi,{}),"Included Software":H(Ji,{}),Paths:H(Yi,{paths:o})};return H(W,{title:`About`,large:!0,status:`info`,icon:`heart`,onClose:n,children:[H(`h2`,{class:`text-center`,children:H(`a`,{href:`https://github.com/syncshell/syncshell-webui`,target:`_blank`,rel:`noreferrer`,children:`Syncshell`})}),H(`p`,{class:`text-center`,children:`A focused Syncthing web interface for Syncshell.`}),H(`p`,{class:`text-center`,children:[`Syncthing `,t.version||``,` `,t.codename||``]}),t.date&&H(`p`,{class:`text-center`,children:[`Build `,t.date.slice(0,10),` `,Array.isArray(t.tags)?t.tags.join(`, `):``]}),!t.version&&H(`p`,{class:`text-center`,children:r(`Log in to see version information.`)}),H(`p`,{class:`text-center`,children:[r(`Syncthing is Free and Open Source Software licensed as MPL v2.0.`),` `,H(`a`,{href:`LICENSE.syncthing`,children:`MPL 2.0`})]}),H(Wi,{activeId:i,items:u,onSelect:a}),H(`div`,{id:`about-panel`,role:`tabpanel`,"aria-labelledby":`about-`+i.toLowerCase().replaceAll(` `,`-`)+`-tab`,children:[c&&H(`p`,{class:`text-danger`,role:`alert`,children:c}),d[i]]})]})}function Zi(e,t,n,r){return n?{title:`Error`,status:`danger`,icon:`hourglass`}:t===`confirm`?{title:r?`Major Upgrade`:`Upgrade`,status:r?`danger`:`warning`,icon:`hourglass`}:e===`shutdown`?{title:`Shutdown Complete`,status:`success`,icon:t===`waiting`?`power`:`hourglass`}:{title:`Restarting`,status:`info`,icon:`hourglass`}}function Qi({kind:e,state:t,session:n,onClose:r}){let{t:i}=B(),[a]=I(t.system.startTime),[o,s]=I(`confirm`),[c,l]=I(``),u=t.upgradeInfo?.majorNewer,d=Zi(e,o,c,u),f=Ne(async()=>{s(`working`),l(``);try{await n.systemAction(e),s(`waiting`),e!==`shutdown`&&t.config.gui.useTLS!==(location.protocol===`https:`)&&(location.protocol=t.config.gui.useTLS?`https:`:`http:`)}catch(e){l(e.message)}},[e,n,t.config.gui.useTLS]);L(()=>{e!==`upgrade`&&f()},[f,e]),L(()=>{o!==`confirm`&&a&&t.online&&t.system.startTime!==a&&r()},[r,o,a,t.online,t.system.startTime]);function p(){return c?H(`button`,{class:`btn btn-default`,onClick:r,children:i(`Close`)}):o===`confirm`?H(C,{children:[H(`button`,{class:`btn btn-primary`,onClick:f,children:i(`Upgrade`)}),H(`button`,{class:`btn btn-default`,onClick:r,children:i(`Close`)})]}):H(C,{})}function m(){return c?H(`p`,{role:`alert`,children:c}):o===`confirm`?H(C,{children:[u?H(`p`,{children:[i(`This is a major version upgrade.`),` `,i(`A new major version may not be compatible with previous versions.`),` `,i(`Please consult the release notes before performing a major upgrade.`)]}):H(`p`,{children:i(`Are you sure you want to upgrade?`)}),H(`p`,{children:H(`a`,{href:`https://github.com/syncthing/syncthing/releases/tag/`+encodeURIComponent(t.upgradeInfo?.latest||``),target:`_blank`,rel:`noreferrer`,children:i(`Release Notes`)})})]}):e===`shutdown`?H(`p`,{role:`status`,children:i(o===`working`?`Please wait`:`Syncthing has been shut down.`)}):H(`p`,{role:`status`,children:[i(`Syncthing is restarting.`),` `,i(`Please wait`),`...`]})}return H(W,{title:d.title,status:d.status,icon:d.icon,onClose:r,onCancel:()=>{(o===`confirm`||c)&&r()},footer:p(),children:m()})}var $i=[{value:`DEBUG`,label:`Debug`},{value:`INFO`,label:`Info`},{value:`WARN`,label:`Warning`},{value:`ERROR`,label:`Error`}];function ea({api:e,onError:t}){let{t:n}=B(),[r,i]=I({levels:{},packages:{}}),[a,o]=I(!1);L(()=>{let n=new AbortController;return e.get(`system/loglevels`,{signal:n.signal}).then(i).catch(e=>{n.signal.aborted||t(e.message)}),()=>n.abort()},[e,t]);async function s(n,a){o(!0);try{await e.post(`system/loglevels`,{body:{...r.levels,[n]:a}}),i(await e.get(`system/loglevels`)),t(``)}catch(e){t(e.message)}finally{o(!1)}}return H(C,{children:[H(`p`,{children:n(`Available debug logging facilities:`)}),H(`table`,{class:`table table-striped`,children:H(`tbody`,{children:Object.entries(r.levels).map(([e,t])=>H(`tr`,{children:[H(`td`,{children:[r.packages[e],` (`,H(`code`,{children:e}),`)`]}),H(`td`,{children:H(`select`,{class:`form-control`,"aria-label":e,disabled:a,value:t,onChange:t=>s(e,t.currentTarget.value),children:$i.map(e=>H(`option`,{value:e.value,children:n(e.label)},e.value))})})]},e))})})]})}function ta(e){let t=R(!1),[n,r]=I([]),[i,a]=I(``),[o,s]=I(!1);return L(()=>{let n=new AbortController,i,o;async function s(){try{if(!t.current){let i=await e.get(`system/log`,{query:{since:o},signal:n.signal});!t.current&&!n.signal.aborted&&(r(e=>[...e,...i.messages||[]]),o=i.messages?.at(-1)?.when||o,a(``))}}catch(e){n.signal.aborted||a(e.message)}finally{n.signal.aborted||(i=setTimeout(s,2e3))}}return s(),()=>{n.abort(),clearTimeout(i)}},[e]),{entries:n,error:i,setError:a,paused:o,setPaused:e=>{t.current=e,s(e)}}}function na({api:e,onClose:t}){let{t:n}=B(),r=R(),[i,a]=I(`Log`),{entries:o,error:s,setError:c,paused:l,setPaused:u}=ta(e),d=[`Log`,`Debugging Facilities`].map(e=>({id:e,tabId:`logs-`+e.toLowerCase().replaceAll(` `,`-`)+`-tab`,panelId:`logs-panel`,label:n(e)})),f=o.map(e=>e.when.split(`.`)[0].replace(`T`,` `)+` `+(e.level||``)+` `+e.message).join(` +`);return L(()=>{!l&&r.current&&(r.current.scrollTop=r.current.scrollHeight)},[o,l,i]),H(W,{title:`Logs`,large:!0,icon:`wrench`,onClose:t,children:[H(Wi,{activeId:i,items:d,onSelect:a}),H(`div`,{id:`logs-panel`,role:`tabpanel`,"aria-labelledby":`logs-`+i.toLowerCase().replaceAll(` `,`-`)+`-tab`,children:[s&&H(`p`,{class:`text-danger`,role:`alert`,children:s}),i===`Log`&&H(C,{children:[H(`textarea`,{ref:r,class:`form-control text-monospace`,"aria-label":n(`Log`),rows:`20`,readOnly:!0,value:f,onScroll:()=>{let e=r.current;u(e.scrollHeight>e.scrollTop+e.clientHeight+1)}}),l&&H(`button`,{class:`btn btn-link`,onClick:()=>{u(!1),r.current.scrollTop=r.current.scrollHeight},children:n(`Log tailing paused. Scroll to the bottom to continue.`)})]}),H(`div`,{hidden:i!==`Debugging Facilities`,children:H(ea,{api:e,onError:c})})]})]})}function ra(e,t){let n=qn(e,t.path);return t.type===`list`?(n||[]).join(`, `):n??``}function ia(e,t){return e.type===`checkbox`?t.checked:e.type===`number`?t.value===``?0:Number(t.value):e.type===`list`?t.value.split(/[,\s]+/).map(e=>e.trim()).filter(Boolean):t.value}function aa({id:e,label:t,checked:n,describedBy:r,disabled:i,onChange:a}){let{t:o}=B();return H(`label`,{for:e,children:[H(`input`,{id:e,type:`checkbox`,checked:n,"aria-describedby":r,disabled:i,onChange:a}),` `,o(t)]})}function oa({id:e,label:t,value:n,options:r,describedBy:i,disabled:a,labelSuffix:o,onChange:s}){let{t:c}=B();return H(C,{children:[H(`label`,{for:e,children:c(t)}),o,H(`select`,{id:e,class:`form-control`,value:n,"aria-describedby":i,disabled:a,onChange:s,children:r.map(e=>H(`option`,{value:e.value,children:c(e.label)},e.value))})]})}function sa({id:e,label:t,value:n,describedBy:r,onInput:i}){let{t:a}=B();return H(C,{children:[H(`label`,{for:e,children:a(t)}),H(`textarea`,{id:e,class:`form-control`,rows:`6`,value:n,"aria-describedby":r,onInput:i})]})}function ca({id:e,label:t,value:n,min:r,required:i,describedBy:a,disabled:o,labelSuffix:s,step:c=`any`,onInput:l}){let{t:u}=B();return H(C,{children:[H(`label`,{for:e,children:u(t)}),s,H(`input`,{id:e,class:`form-control`,type:`number`,step:c,min:r,required:i,value:n,"aria-describedby":a,disabled:o,onInput:l})]})}function la({id:e,label:t,type:n=`text`,value:r,required:i,describedBy:a,disabled:o,labelSuffix:s,list:c,readOnly:l,onInput:u}){let{t:d}=B();return H(C,{children:[H(`label`,{for:e,children:d(t)}),s,H(`input`,{id:e,class:`form-control`,type:n,required:i,value:r,"aria-describedby":a,disabled:o,list:c,readOnly:l,onInput:u})]})}function ua({field:e,draft:t,help:n,hasError:r,isNew:i,defaults:a,onChange:o}){let{t:s}=B(),c=[];n&&c.push(`editor-`+e.path+`-help`),r&&c.push(`editor-error`);let l=c.join(` `)||void 0,u=`editor-`+e.path,d=n&&H(J,{icon:`info`,label:e.label,text:n.help});function f(){switch(e.type){case`checkbox`:return H(C,{children:[H(aa,{id:u,label:e.label,checked:e.checked??!!qn(t,e.path),describedBy:l,disabled:e.disabled,onChange:t=>o(ia(e,t.currentTarget))}),d]});case`select`:return H(oa,{id:u,label:e.label,value:ra(t,e),options:e.options,describedBy:l,disabled:e.disabled,labelSuffix:d,onChange:e=>o(e.currentTarget.value)});case`number`:return H(ca,{id:u,label:e.label,value:ra(t,e),min:0,required:!a&&[`id`,`path`,`deviceID`].includes(e.path),describedBy:l,disabled:e.disabled,labelSuffix:d,step:e.path.endsWith(`.value`)?`0.01`:`1`,onInput:t=>o(ia(e,t.currentTarget))});default:return H(la,{id:u,label:e.label,type:e.type===`list`?`text`:e.type,value:ra(t,e),required:!a&&[`id`,`path`,`deviceID`].includes(e.path),describedBy:l,disabled:e.disabled,labelSuffix:d,list:e.path===`path`?`directory-list`:e.path===`group`?`editor-groups`:void 0,readOnly:!i&&!a&&[`id`,`path`,`deviceID`].includes(e.path),onInput:t=>o(ia(e,t.currentTarget))})}}return H(C,{children:[f(),n&&H(`span`,{id:`editor-`+e.path+`-help`,class:`sr-only`,children:s(n.help)})]})}function da(e,t){return e.changeConfig(e=>{e.folders=e.folders.filter(e=>e.id!==t)})}function fa(e,t){return e.changeConfig(e=>{e.devices=e.devices.filter(e=>e.deviceID!==t);for(let n of e.folders)n.devices=n.devices.filter(e=>e.deviceID!==t)})}function pa(e,t){return e.post(`db/override`,{query:{folder:t}})}function ma(e,t){return e.post(`db/revert`,{query:{folder:t}})}function ha(e,t,n){switch(e.type){case`remove-folder`:return da(t,e.folder.id);case`remove-device`:return fa(t,e.device.deviceID);case`override`:return pa(n,e.folder.id);case`revert`:return ma(n,e.folder.id);default:throw Error(`Unknown management action`)}}function ga({action:e,api:t,session:n,onClose:r,onDone:i,devices:a=[]}){let{t:o}=B(),s=Ur[e.type],c=e.folder?.label||e.folder?.id||e.device?.name||e.device?.deviceID,l=a.find(t=>t.deviceID===e.device?.introducedBy&&t.introducer),[u,d]=I(!1),[f,p]=I(``);async function m(){d(!0),p(``);try{await ha(e,n,t),i()}catch(e){p(e.message)}finally{d(!1)}}return H(W,{title:s.title,status:`warning`,icon:`help`,onClose:r,onCancel:()=>{u||r()},footer:H(C,{children:[H(`button`,{class:`btn btn-warning`,disabled:u,onClick:m,children:o(s.button)}),H(`button`,{class:`btn btn-default`,disabled:u,onClick:r,children:o(`Cancel`)})]}),children:[H(`p`,{children:o(s.description).replace(`{%label%}`,c).replace(`{%name%}`,c)}),s.detail&&H(`p`,{children:o(s.detail)}),l&&H(`p`,{children:o(`{%reintroducer%} might reintroduce this device.`).replace(`{%reintroducer%}`,l.name||l.deviceID)}),f&&H(`p`,{class:`text-danger`,role:`alert`,children:f})]})}function _a({draft:e,dispatch:t}){let{t:n}=B();return H(C,{children:[H(`p`,{children:[n(`Extended Attributes Filter`),` ·`,` `,H(`a`,{href:`https://docs.syncthing.net/advanced/folder-xattr-filter.html`,target:`_blank`,rel:`noreferrer`,children:n(`Help`)})]}),H(`p`,{children:n(`To permit a rule, have the checkbox checked. To deny a rule, leave it unchecked.`)}),(e.xattrFilter?.entries||[]).map((e,r)=>H(`div`,{class:`xattr-rule`,children:[H(`input`,{type:`checkbox`,"aria-label":n(`permit`)+` `+(r+1),checked:e.permit,onChange:e=>t({type:`set-folder-xattr-permit`,index:r,value:e.currentTarget.checked})}),H(`input`,{class:`form-control`,"aria-label":n(`Active filter rules`)+` `+(r+1),value:e.match,onInput:e=>t({type:`set-folder-xattr-match`,index:r,value:e.currentTarget.value})}),H(`button`,{type:`button`,class:`btn btn-default`,onClick:()=>t({type:`remove-folder-xattr-rule`,index:r}),children:n(`Remove`)})]},r)),H(`button`,{type:`button`,class:`btn btn-default`,onClick:()=>t({type:`add-folder-xattr-rule`}),children:n(`Add filter entry`)}),H(`p`,{children:[n(`Default`),`: `,n(ir(e.xattrFilter?.entries))]}),H(`p`,{children:n(ar(e.xattrFilter?.entries))})]})}function va({folder:e,isNew:t,savingAddedIgnores:n,addedIgnoresReady:r,busy:i,addIgnores:a,ignores:o,loadedIgnores:s,onRetry:c,onToggleAdd:l,onInput:u}){let{t:d}=B();return H(C,{children:[H(`p`,{class:`help-block`,children:[d(`Enter ignore patterns, one per line.`),` `,H(`a`,{href:`https://docs.syncthing.net/users/ignoring.html`,target:`_blank`,rel:`noreferrer`,children:d(`full documentation`)})]}),n&&H(C,{children:[H(`p`,{children:[d(`Set Ignores on Added Folder`),` · `,e.label||e.id]}),!r&&H(`button`,{type:`button`,class:`btn btn-default`,disabled:i,onClick:c,children:d(`Retry`)})]}),t&&!n?H(C,{children:[H(`label`,{children:[H(`input`,{type:`checkbox`,checked:a,onChange:e=>l(e.currentTarget.checked)}),` `,d(`Add Ignore Patterns`)]}),H(`p`,{children:d(`Patterns are applied before the folder starts synchronizing.`)})]}):H(`textarea`,{class:`form-control`,rows:`12`,"aria-label":d(`Ignore Patterns`),value:o,disabled:e.type===`receiveencrypted`||!s,onInput:e=>u(e.currentTarget.value)})]})}function ya({isEncrypted:e,isSelected:t,isPasswordRequired:n}){return e?`Received data is already encrypted`:t?n?`Device is untrusted, enter encryption password`:`If untrusted, enter encryption password`:`Not shared`}function ba({label:e,id:t,isSelected:n,password:r=``,isEncrypted:i=!1,isPasswordRequired:a=!1,remoteState:o=``,onSelected:s,onPassword:c}){let{t:l}=B(),[u,d]=I(!1);return H(`div`,{class:`form-group`,children:[H(`label`,{title:t,children:[H(`input`,{type:`checkbox`,checked:n,onChange:e=>s(e.currentTarget.checked)}),` `,e]}),H(Yr,{remoteState:o}),H(`div`,{class:`input-group`,children:[H(`span`,{class:`input-group-addon`,children:H(U,{name:i||r?`lock`:`unlock`})}),H(`input`,{class:`form-control`,type:u?`text`:`password`,"aria-label":l(`Encryption Password`)+`: `+e,autoComplete:`off`,value:r,disabled:i||!n,required:n&&!i&&a,placeholder:l(ya({isEncrypted:i,isSelected:n,isPasswordRequired:a})),onInput:e=>c(e.currentTarget.value)}),H(`span`,{class:`input-group-btn`,children:H(`button`,{type:`button`,class:`btn btn-default`,disabled:i||!n,"aria-label":l(u?`Hide password`:`Show password`),onClick:()=>d(!u),children:H(U,{name:u?`eye-off`:`eye`})})})]})]})}function xa({folder:e,devices:t,localDeviceID:n,pendingFolders:r,completion:i,passwords:a,onSelectAll:o,onSelected:s,onPassword:c}){let{t:l}=B();return H(C,{children:[H(`div`,{class:`action-row`,children:[!0,!1].map(e=>H(`button`,{type:`button`,class:`btn btn-link btn-sm`,onClick:()=>o(e),children:l(e?`Select All`:`Deselect All`)},String(e)))}),H(`p`,{class:`help-block`,children:l(`Select additional devices to share this folder with.`)}),t.filter(e=>e.deviceID!==n).map(t=>{let n=e.devices.find(e=>e.deviceID===t.deviceID);return H(ba,{label:z(t),id:t.deviceID,isSelected:!!n,password:a[t.deviceID]||``,isEncrypted:e.type===`receiveencrypted`,isPasswordRequired:t.untrusted||r[e.id]?.offeredBy?.[t.deviceID]?.remoteEncrypted,remoteState:i[t.deviceID]?.folders?.[e.id]?.remoteState,onSelected:e=>s(t.deviceID,e),onPassword:e=>c(t.deviceID,e)},t.deviceID)})]})}var Sa={simple:[{key:`keep`,label:`Keep Versions`,minimum:1},{key:`cleanoutDays`,label:`Clean out after`,minimum:0}],trashcan:[{key:`cleanoutDays`,label:`Clean out after`,minimum:0}],staggered:[{key:`maxAge`,label:`Maximum Age`,minimum:0,usesDays:!0}],external:[{key:`command`,label:`External Versioning Command`,type:`text`}]};function Ca({draft:e,dispatch:t}){let{t:n}=B();return e.versioning.type?(Sa[e.versioning.type]||Sa.external).map(r=>H(`div`,{class:`form-group`,children:[H(`label`,{for:`version-`+r.key,children:[n(r.label),r.usesDays?` (`+n(`days`)+`)`:``]}),H(`input`,{id:`version-`+r.key,class:`form-control`,type:r.type||`number`,min:r.minimum,required:!0,value:r.usesDays?Math.floor(Number(e.versioning.params?.[r.key]||0)/86400):e.versioning.params?.[r.key]||``,onInput:e=>t({type:`set-folder-versioning-parameter`,key:r.key,value:r.usesDays?String(Number(e.currentTarget.value)*86400):e.currentTarget.value})})]},r.key)):null}function wa(e){return e===``?[]:e.split(` +`)}function Ta({action:e,state:t,api:n,session:r,onClose:i,onSaved:a}){let{t:o}=B(),s=!!e.defaults,c=e.type===`add-folder`,[l,u]=I(()=>G(e.folder)),[d,f]=I(e.tab===`sharing`?`Sharing`:e.tab===`ignores`?`Ignore Patterns`:`General`),[p,m]=I(!1),[h,g]=I(``),[_,v]=I(!1),[y,b]=I(!1),x=R(!0),[S,w]=I([]),[T,E]=I(Yn.editing),[D,O]=I(``),k=R([]),[A,j]=I(!1),M=R(!1),ee=R(),te=R({api:n,defaults:s,isNew:c,folderId:l.id,folderType:l.type,defaultPath:t.config.defaults.folder.path,defaultIgnores:t.config.defaults.ignores.lines,pathSeparator:t.system.pathSeparator}),N=T!==Yn.editing,ne=T===Yn.editingIgnores,[re,ie]=I(()=>Object.fromEntries((l.devices||[]).map(e=>[e.deviceID,e.encryptionPassword||``]))),ae=[`General`,`Sharing`,`File Versioning`,`Ignore Patterns`,`Advanced`].filter(e=>!s||e!==`Sharing`).map(e=>({id:e,tabId:`editor-`+e.toLowerCase().replaceAll(` `,`-`)+`-tab`,panelId:`editor-panel`,label:o(e),disabled:le(e)})),oe=Zn(d).map(e=>nr(e,l,{isNew:c,defaults:s})).filter(e=>!e.hidden&&(!s||![`id`,`deviceID`].includes(e.path))),se=s?`Edit Folder Defaults`:(c?`Add `:`Edit `)+`Folder`,ce=or(l,t.config,t.system);L(()=>{if(!c&&!s||!l.path)return;let e=new AbortController;return n.get(`system/browse`,{query:{current:l.path},signal:e.signal}).then(w).catch(t=>{e.signal.aborted||g(t.message)}),()=>e.abort()},[n,c,s,l.path]),L(()=>{let e=te.current;if(e.isNew&&e.defaultPath&&u(t=>({...t,path:$n(e.defaultPath,t.label||t.id,e.pathSeparator)})),e.defaults){k.current=e.defaultIgnores,O(k.current.join(` +`)),j(!0);return}!e.isNew&&e.folderType!==`receiveencrypted`&&e.api.get(`db/ignores`,{query:{folder:e.folderId}}).then(e=>{k.current=e.ignore||[],O(k.current.join(` +`)),j(!0),e.error&&g(e.error)}).catch(e=>g(e.message))},[]);function le(e){return N&&e!==`Ignore Patterns`||l.type===`receiveencrypted`&&e===`Ignore Patterns`}function ue(e,n){e.path===`path`&&(x.current=!1),u(r=>tr(r,{type:e.action,value:n},{isNew:c,defaults:s,autoPath:x.current,config:t.config,system:t.system}))}function de(e){u(n=>tr(n,e,{isNew:c,defaults:s,autoPath:x.current,config:t.config,system:t.system}))}async function fe(){E(e=>Xn(e,`start-ignore-load`)),j(!1),v(!0),g(``);try{let e=await n.get(`db/ignores`,{query:{folder:l.id}});k.current=e.ignore?.length||e.error?e.ignore||[]:t.config.defaults?.ignores?.lines||[],O(k.current.join(` +`)),j(!0),E(e=>Xn(e,`ignore-load-succeeded`)),e.error&&g(e.error)}catch(e){E(e=>Xn(e,`ignore-load-failed`)),g(e.message)}finally{v(!1)}}function pe(e,t){ie(n=>({...n,[e]:t})),u(n=>({...n,devices:n.devices.map(n=>n.deviceID===e?{...n,encryptionPassword:t}:n)}))}function me(e,t){u(n=>({...n,devices:t?[...n.devices,{deviceID:e,encryptionPassword:re[e]||``}]:n.devices.filter(t=>t.deviceID!==e)}))}function he(e){u(n=>({...n,devices:e?t.config.devices.map(e=>n.devices.find(t=>t.deviceID===e.deviceID)||{deviceID:e.deviceID,encryptionPassword:re[e.deviceID]||``}):n.devices.filter(e=>e.deviceID===t.system.myID)}))}function ge(e={}){return cr({session:r,api:n,state:t,draft:l,isNew:c,...e})}async function _e(){if(ee.current.reportValidity()){v(!0),g(``);try{if(s)await ge({defaults:s,ignores:wa(D)});else if(N){if(!ne)return;await n.post(`db/ignores`,{body:{ignore:wa(D)},query:{folder:l.id}}),await r.setPaused(`folders`,l.id,!!l.paused)}else if(c&&y&&l.type!==`receiveencrypted`){await ge({draft:{...G(l),paused:!0}}),f(`Ignore Patterns`),await fe();return}else A&&D!==k.current.join(` +`)&&await n.post(`db/ignores`,{body:{ignore:wa(D)},query:{folder:l.id}}),await ge();M.current=!0,a?.(G(l),wa(D)),i()}catch(e){g(e.message)}finally{v(!1)}}}async function ve(){if(!_){if(!M.current&&ne){M.current=!0;try{await n.post(`db/ignores`,{body:{ignore:k.current},query:{folder:l.id}}),await r.setPaused(`folders`,l.id,!!l.paused)}catch(e){r.reportError(e)}}i()}}function ye(){return H(C,{children:[oe.map(e=>H(`div`,{class:`form-group`,children:[H(ua,{field:e,draft:l,help:ii[e.label],hasError:!!h,isNew:c,defaults:s,onChange:t=>ue(e,t)}),e.path===`path`&&ce&&H(`p`,{class:`text-warning`,children:o(ce.type===`subdirectory`?`Warning, this path is a subdirectory of an existing folder "{%otherFolder%}".`:`Warning, this path is a parent directory of an existing folder "{%otherFolder%}".`).replace(`{%otherFolder%}`,ce.folder.label||ce.folder.id)})]},e.path)),d===`File Versioning`&&H(Ca,{draft:l,dispatch:de}),d===`Advanced`&&(l.syncXattrs||l.sendXattrs)&&H(_a,{draft:l,dispatch:de})]})}function P(){switch(d){case`Sharing`:return H(xa,{folder:l,devices:t.config.devices,localDeviceID:t.system.myID,pendingFolders:t.pendingFolders,completion:t.completion,passwords:re,onSelectAll:he,onSelected:me,onPassword:pe});case`Ignore Patterns`:return H(va,{folder:l,isNew:c,savingAddedIgnores:N,addedIgnoresReady:ne,busy:_,addIgnores:y,ignores:D,loadedIgnores:A,onRetry:fe,onToggleAdd:b,onInput:O});case`General`:case`File Versioning`:case`Advanced`:return ye();default:throw Error(`Unknown folder editor tab: ${d}`)}}return H(C,{children:[H(W,{title:se,large:!0,icon:`settings`,footer:H(C,{children:[!s&&!c&&T===Yn.editing&&H(`button`,{class:`btn btn-warning btn-sm pull-left`,disabled:_,onClick:()=>m(!0),children:o(`Remove`)}),H(`button`,{class:`btn btn-primary btn-sm`,disabled:_||N&&!ne,onClick:_e,children:[H(U,{name:`check`}),`\xA0`,o(`Save`)]}),H(`button`,{class:`btn btn-default btn-sm`,disabled:_,onClick:ve,children:[H(U,{name:`x`}),`\xA0`,o(`Cancel`)]})]}),onClose:ve,onCancel:ve,children:H(`form`,{ref:ee,"aria-describedby":h?`editor-error`:void 0,onSubmit:e=>{e.preventDefault(),_e()},children:[H(Wi,{activeId:d,items:ae,onSelect:f}),h&&H(`p`,{id:`editor-error`,class:`text-danger`,role:`alert`,children:o(h)}),H(`datalist`,{id:`directory-list`,children:S.map(e=>H(`option`,{value:e},e))}),H(`datalist`,{id:`editor-groups`,children:[...new Set(t.config.folders.map(e=>e.group).filter(Boolean))].map(e=>H(`option`,{value:e},e))}),H(`div`,{id:`editor-panel`,class:`tab-content`,role:`tabpanel`,"aria-labelledby":`editor-`+d.toLowerCase().replaceAll(` `,`-`)+`-tab`,children:P()})]})}),p&&H(ga,{action:{type:`remove-folder`,folder:l},api:n,session:r,devices:t.config.devices,onClose:()=>m(!1),onDone:i})]})}function Ea(e){return e.startsWith(`/`)||e.startsWith(`unix://`)||e.startsWith(`unixs://`)}var Da=[`General`,`GUI`,`Connections`,`Ignored Devices`,`Ignored Folders`],Oa=e=>e.options.upgradeToPreReleases?`candidate`:e.options.autoUpgradeIntervalH>0?`stable`:`none`,$=(e,t,n=`text`,r)=>({path:e,label:t,type:n,options:r});function ka(e,t,n){return e===`GUI`?[$(`gui.user`,`GUI Authentication User`),$(`gui.password`,`GUI Authentication Password`,`password`),$(`gui.address`,`GUI Listen Address`),$(`gui.useTLS`,`Use HTTPS for GUI`,`checkbox`),$(`gui.unixSocketPermissions`,`Unix Socket Permissions`)]:e===`Connections`?[$(`options.listenAddresses`,`Sync Protocol Listen Addresses`,`list`),$(`options.globalAnnounceEnabled`,`Global Discovery`,`checkbox`),$(`options.globalAnnounceServers`,`Global Discovery Servers`,`list`),$(`options.localAnnounceEnabled`,`Local Discovery`,`checkbox`),$(`options.natEnabled`,`Enable NAT traversal`,`checkbox`),$(`options.relaysEnabled`,`Enable Relaying`,`checkbox`),$(`options.maxRecvKbps`,`Incoming Rate Limit (KiB/s)`,`number`),$(`options.maxSendKbps`,`Outgoing Rate Limit (KiB/s)`,`number`),$(`options.limitBandwidthInLan`,`Limit Bandwidth in LAN`,`checkbox`)]:[$(`devices.`+t.devices.findIndex(e=>e.deviceID===n)+`.name`,`Device Name`),$(`options.startBrowser`,`Start Browser`,`checkbox`),$(`options.minHomeDiskFree.value`,`Minimum Free Disk Space`,`number`),$(`options.minHomeDiskFree.unit`,`Unit`,`select`,[{value:`%`,label:`%`},{value:`kB`,label:`kB`},{value:`MB`,label:`MB`},{value:`GB`,label:`GB`},{value:`TB`,label:`TB`}])]}function Aa(e,t,n,r){let i=ka(e,t,n).map(e=>e.type===`number`?{...e,min:0,required:!0}:e);return e===`General`?i.filter(e=>e.path!==`options.startBrowser`):e===`GUI`?i.filter(e=>e.path!==`gui.unixSocketPermissions`||Ea(t.gui.address)).concat([{path:`options.startBrowser`,label:`Start Browser`,type:`checkbox`},...r.length>1?[{path:`gui.theme`,label:`GUI Theme`,type:`select`,options:[...new Set([...r,t.gui.theme])].filter(Boolean).map(e=>({value:e,label:e}))}]:[]]):i}var ja=e=>e.devices.flatMap(e=>(e.ignoredFolders||[]).map(t=>({device:e,folder:t})));function Ma(e,t,n){let r=G(e);if(n!==void 0){let e=r.devices.find(e=>e.deviceID===t);e.ignoredFolders=e.ignoredFolders.filter(e=>e.id!==n)}else r.remoteIgnoredDevices=r.remoteIgnoredDevices.filter(e=>e.deviceID!==t);return r}function Na(e){return[{label:`GUI`,path:`gui`},{label:`LDAP`,path:`ldap`},{label:`Options`,path:`options`},...e.folders.map((e,t)=>({label:`Folder: `+(e.label||e.id),path:`folders.`+t})),...e.devices.map((e,t)=>({label:`Device: `+(e.name||e.deviceID),path:`devices.`+t})),{label:`Default Folder`,path:`defaults.folder`},{label:`Default Device`,path:`defaults.device`},{label:`Default Ignore Patterns`,path:`defaults.ignores`}].map(({label:t,path:n})=>{let r=n.split(`.`).reduce((e,t)=>e?.[t],e);return{label:t,path:n,fields:Object.entries(r||{}).flatMap(([e,t])=>e.startsWith(`_`)||t&&!Array.isArray(t)&&typeof t==`object`||Array.isArray(t)&&t.some(e=>![`number`,`string`].includes(typeof e))?[]:[{path:n+`.`+e,label:e.replace(/([a-z])([A-Z])/g,`$1 $2`),type:e===`lines`?`lines`:Array.isArray(t)?`list`:typeof t==`boolean`?`checkbox`:typeof t==`number`?`number`:`text`}])}})}async function Pa(e,t){let[n,r]=await Promise.allSettled([e.get(`system/upgrade`,{signal:t}),fetch(new URL(`themes.json`,location.href),{signal:t}).then(e=>{if(!e.ok)throw Error(`Could not load GUI themes`);return e.json()})]);return{upgrade:n.status===`fulfilled`?n.value:null,themes:r.status===`fulfilled`?r.value.themes:[]}}function Fa(e,t,n,r,i){let a=G(e),o=a.options;i&&(o.autoUpgradeIntervalH=t===`none`?0:o.autoUpgradeIntervalH||12,o.upgradeToPreReleases=t===`candidate`),(t===`candidate`||r.isCandidate)&&(o.urAccepted=n.urVersionMax,o.urSeen=n.urVersionMax);for(let e of[o.minHomeDiskFree.value,o.maxRecvKbps,o.maxSendKbps])if(!Number.isFinite(e)||e<0)throw Error(`Enter a non-negative number.`);let s=a.gui.address;if(!Ea(s)){let e=Number(s.slice(s.lastIndexOf(`:`)+1));if(!s.includes(`:`)||!Number.isInteger(e)||e<1024||e>65535)throw Error(`Enter a non-privileged port number (1024 - 65535).`)}else if(!/^0?[0-7]{0,3}$/.test(a.gui.unixSocketPermissions||``))throw Error(`Enter up to three octal digits.`);return a}function Ia({device:e,folders:t,pendingFolders:n,completion:r,shares:i,onSelectAll:a,onChange:o}){let{t:s}=B();return H(C,{children:[H(`div`,{class:`action-row`,children:[!0,!1].map(e=>H(`button`,{type:`button`,class:`btn btn-link btn-sm`,onClick:()=>a(e),children:s(e?`Select All`:`Deselect All`)},String(e)))}),H(`p`,{class:`help-block`,children:s(`Select the folders to share with this device.`)}),t.map(t=>H(ba,{label:t.label||t.id,id:t.id,isSelected:i[t.id].selected,password:i[t.id].password,isEncrypted:t.type===`receiveencrypted`,isPasswordRequired:e.untrusted||n[t.id]?.offeredBy?.[e.deviceID]?.remoteEncrypted,remoteState:r[e.deviceID]?.folders?.[t.id]?.remoteState,onSelected:e=>o(t.id,`selected`,e),onPassword:e=>o(t.id,`password`,e)},t.id))]})}function La(e,t){let n={devicename:e.name||e.deviceID.slice(0,7)};return{values:n,subject:t(`Syncthing device ID for "{%devicename%}"`,n),footer:t(`Learn more at {%url%}`,{url:`https://syncthing.net`})}}function Ra(e,t){let{values:n,subject:r,footer:i}=La(e,t),a=[t(`To connect with the Syncthing device named "{%devicename%}", add a new remote device on your end with this ID:`,n),e.deviceID,t(`Syncthing is a continuous file synchronization program. It synchronizes files between two or more computers in real time, safely protected from prying eyes. Your data is your data alone and you deserve to choose where it is stored, whether it is shared with some third party, and how it's transmitted over the internet.`),i].join(`\r +\r +`);return{subject:r,body:a,href:`mailto:?subject=`+encodeURIComponent(r)+`&body=`+encodeURIComponent(a)}}function za(e,t){let{subject:n,footer:r}=La(e,t),i=[n,e.deviceID.replaceAll(`-`,``),r].join(` +`);return{subject:n,body:i,href:`sms:?&body=`+encodeURIComponent(i)}}var Ba={email:Ra,sms:za};function Va({device:e,api:t}){let{t:n}=B(),[r,i]=I(``),[a,o]=I(null),[s,c]=I(!1),[l,u]=I(``),d=a&&Ba[r]?.(a,n)||null;async function f(n){u(``);try{let r=await t.get(`svc/deviceid`,{query:{id:e.deviceID}});if(r.error)throw Error(r.error);let i={...e,deviceID:r.id};o(i),await n(i)}catch(e){u(e.message)}}function p(){return f(async e=>{await navigator.clipboard.writeText(e.deviceID),c(!0)})}function m(e){return f(()=>i(e))}async function h(e){try{await navigator.clipboard.writeText(e)}catch(e){u(e.message)}}return H(C,{children:[H(`div`,{class:`action-row`,children:[H(`button`,{type:`button`,class:`btn btn-default`,disabled:!e.deviceID,onClick:p,children:[H(U,{name:`copy`}),` `,n(s?`Copied!`:`Copy`)]}),H(`button`,{type:`button`,class:`btn btn-default`,disabled:!e.deviceID,onClick:()=>m(`email`),children:[H(U,{name:`mail`}),` `,n(`Share by Email`)]}),H(`button`,{type:`button`,class:`btn btn-default`,disabled:!e.deviceID,onClick:()=>m(`sms`),children:[H(U,{name:`message`}),` `,n(`Share by SMS`)]})]}),l&&H(`p`,{class:`text-danger`,role:`alert`,children:l}),r&&d&&H(W,{title:r===`email`?`Share by Email`:`Share by SMS`,large:r===`email`,icon:r===`email`?`mail`:`message`,onClose:()=>i(``),footer:H(C,{children:[H(`a`,{class:`btn btn-primary`,href:d.href,children:n(`Share`)}),H(`button`,{class:`btn btn-default`,onClick:()=>i(``),children:n(`Cancel`)})]}),children:[H(`p`,{children:[n(`The following text will automatically be inserted into a new message.`),` `,n(r===`email`?`Your email app should open to let you choose the recipient and send it from your own address.`:`Your SMS app should open to let you choose the recipient and send it from your own number.`),` `,n(`You can also copy and paste the text into a new message manually.`)]}),r===`email`&&H(C,{children:[H(`h5`,{children:n(`Subject:`)}),H(`pre`,{class:`share-text`,children:d.subject}),H(`button`,{class:`btn btn-default btn-sm`,onClick:()=>h(d.subject),children:n(`Copy`)}),H(`h5`,{children:n(`Body:`)})]}),H(`pre`,{class:`share-text`,children:d.body}),H(`button`,{class:`btn btn-default btn-sm`,onClick:()=>h(d.body),children:n(`Copy`)})]})]})}function Ha({action:e,state:t,api:n,session:r,onClose:i,onSaved:a}){let{t:o}=B(),s=!!e.defaults,c=e.type===`add-device`,[l,u]=I(()=>G(e.device)),[d,f]=I(e.tab===`sharing`?`Sharing`:`General`),[p,m]=I(!1),[h,g]=I(``),[_,v]=I(!1),y=R(),[b,x]=I(()=>Object.fromEntries(t.config.folders.map(e=>{let t=e.devices.find(e=>e.deviceID===l.deviceID);return[e.id,{selected:!!t,password:t?.encryptionPassword||``}]}))),S=[`General`,`Sharing`,`Advanced`].filter(e=>!s||e!==`Sharing`).map(e=>({id:e,tabId:`editor-`+e.toLowerCase().replaceAll(` `,`-`)+`-tab`,panelId:`editor-panel`,label:o(e),disabled:!1})),w=lr(d).map(e=>pr(e,l,t.system.myID)).filter(e=>!e.hidden&&(!s||![`id`,`deviceID`].includes(e.path))),T=s?`Edit Device Defaults`:(c?`Add `:`Edit `)+`Device`;function E(e,t){u(n=>fr(n,{type:e.action,value:t}))}function D(e,t,n){x(r=>({...r,[e]:{...r[e],[t]:n}}))}function O(e){x(t=>Object.fromEntries(Object.entries(t).map(([t,n])=>[t,{...n,selected:e}])))}async function k(){if(y.current.reportValidity()){v(!0),g(``);try{await mr({session:r,api:n,state:t,draft:l,isNew:c,shares:b,defaults:s}),a?.(G(l),[]),i()}catch(e){g(e.message)}finally{v(!1)}}}function A(){_||i()}return H(C,{children:[H(W,{title:T,large:!0,icon:`settings`,footer:H(C,{children:[!s&&!c&&l.deviceID!==t.system.myID&&H(`button`,{class:`btn btn-warning btn-sm pull-left`,disabled:_,onClick:()=>m(!0),children:o(`Remove`)}),H(`button`,{class:`btn btn-primary btn-sm`,disabled:_,onClick:k,children:[H(U,{name:`check`}),`\xA0`,o(`Save`)]}),H(`button`,{class:`btn btn-default btn-sm`,disabled:_,onClick:A,children:[H(U,{name:`x`}),`\xA0`,o(`Cancel`)]})]}),onClose:A,onCancel:A,children:H(`form`,{ref:y,"aria-describedby":h?`editor-error`:void 0,onSubmit:e=>{e.preventDefault(),k()},children:[H(Wi,{activeId:d,items:S,onSelect:f}),h&&H(`p`,{id:`editor-error`,class:`text-danger`,role:`alert`,children:o(h)}),H(`datalist`,{id:`editor-groups`,children:[...new Set(t.config.devices.map(e=>e.group).filter(Boolean))].map(e=>H(`option`,{value:e},e))}),H(`div`,{id:`editor-panel`,class:`tab-content`,role:`tabpanel`,"aria-labelledby":`editor-`+d.toLowerCase().replaceAll(` `,`-`)+`-tab`,children:d===`Sharing`?H(Ia,{device:l,folders:t.config.folders,pendingFolders:t.pendingFolders,completion:t.completion,shares:b,onSelectAll:O,onChange:D}):H(C,{children:[d===`General`&&!s&&H(Va,{device:l,api:n}),w.map(e=>H(`div`,{class:`form-group`,children:H(ua,{field:e,draft:l,help:Oi[e.label],hasError:!!h,isNew:c,defaults:s,onChange:t=>E(e,t)})},e.path))]})})]})}),p&&H(ga,{action:{type:`remove-device`,device:l},api:n,session:r,devices:t.config.devices,onClose:()=>m(!1),onDone:i})]})}function Ua({config:e,onChange:t}){let{t:n}=B(),r=e.remoteIgnoredDevices||[];return H(C,{children:[!r.length&&H(`p`,{children:n(`You have no ignored devices.`)}),H(`div`,{class:`table-responsive`,children:H(`table`,{class:`table table-striped`,children:H(`tbody`,{children:r.map(r=>H(`tr`,{children:[H(`td`,{children:X(r.time)}),H(`td`,{class:`word-break-all`,title:r.deviceID,children:r.name||r.deviceID}),H(`td`,{class:`word-break-all`,children:r.address}),H(`td`,{children:H(`button`,{type:`button`,class:`btn btn-default btn-sm`,onClick:()=>t(Ma(e,r.deviceID)),children:n(`Unignore`)})})]},r.deviceID))})})})]})}function Wa({config:e,onChange:t}){let{t:n}=B(),r=ja(e);return H(C,{children:[!r.length&&H(`p`,{children:n(`You have no ignored folders.`)}),H(`div`,{class:`table-responsive`,children:H(`table`,{class:`table table-striped`,children:H(`tbody`,{children:r.map(({device:r,folder:i})=>H(`tr`,{children:[H(`td`,{children:X(i.time)}),H(`td`,{children:i.label||i.id}),H(`td`,{class:`word-break-all`,title:r.deviceID,children:r.name||r.deviceID}),H(`td`,{children:H(`button`,{type:`button`,class:`btn btn-default btn-sm`,onClick:()=>t(Ma(e,r.deviceID,i.id)),children:n(`Unignore`)})})]},r.deviceID+i.id))})})})]})}function Ga({describedBy:e,draft:t,field:n,onChange:r}){let i=`config-`+n.path;switch(n.type){case`checkbox`:return H(aa,{id:i,label:n.label,checked:!!qn(t,n.path),describedBy:e,onChange:e=>r(n.path,e.currentTarget.checked)});case`select`:return H(oa,{id:i,label:n.label,value:ra(t,n),options:n.options,describedBy:e,onChange:e=>r(n.path,e.currentTarget.value)});case`lines`:return H(sa,{id:i,label:n.label,value:(qn(t,n.path)||[]).join(` +`),describedBy:e,onInput:e=>r(n.path,e.currentTarget.value.split(` +`))});case`number`:return H(ca,{id:i,label:n.label,min:n.min,required:n.required,describedBy:e,value:ra(t,n),onInput:e=>r(n.path,ia(n,e.currentTarget))});default:return H(la,{id:i,label:n.label,type:n.type===`list`?`text`:n.type,required:n.required,describedBy:e,value:ra(t,n),onInput:e=>r(n.path,ia(n,e.currentTarget))})}}function Ka({describedBy:e,draft:t,fields:n,onChange:r}){return n.map(n=>H(`div`,{class:`form-group`,children:H(Ga,{describedBy:e,draft:t,field:n,onChange:r})},n.path))}function qa({describedBy:e,draft:t,fields:n,mode:r,options:i,system:a,version:o,onDefaults:s,onGenerateKey:c,onMode:l,onPreview:u,onUpdate:d}){let{t:f}=B();return H(C,{children:[H(Ka,{describedBy:e,draft:t,fields:n,onChange:d}),H(`label`,{for:`settings-api-key`,children:f(`API Key`)}),H(`div`,{class:`input-group`,children:[H(`input`,{id:`settings-api-key`,class:`form-control`,type:`text`,readOnly:!0,value:t.gui.apiKey}),H(`span`,{class:`input-group-btn`,children:H(`button`,{type:`button`,class:`btn btn-default`,onClick:c,children:f(`Generate`)})})]}),H(`div`,{class:`form-group`,children:[H(`label`,{for:`settings-usage`,children:f(`Anonymous Usage Reporting`)}),` `,H(`button`,{type:`button`,class:`btn btn-link btn-sm`,onClick:u,children:f(`Preview`)}),r===`candidate`||o.isCandidate?H(`p`,{children:f(`Usage reporting is always enabled for candidate releases.`)}):H(`select`,{id:`settings-usage`,class:`form-control`,value:t.options.urAccepted,onChange:e=>d(`options.urAccepted`,Number(e.currentTarget.value)),children:[Array.from({length:Math.max(0,(a.urVersionMax||1)-1)},(e,t)=>a.urVersionMax-t).map(e=>H(`option`,{value:e,children:[f(`Version`),` `,e]},e)),H(`option`,{value:0,children:f(`Undecided (will prompt)`)}),H(`option`,{value:-1,children:f(`Disabled`)})]})]}),H(`div`,{class:`form-group`,children:[H(`label`,{for:`settings-upgrades`,children:f(`Automatic upgrades`)}),i.upgrade?H(`select`,{id:`settings-upgrades`,class:`form-control`,value:r,onChange:e=>l(e.currentTarget.value),children:[!o.isCandidate&&H(`option`,{value:`none`,children:f(`No upgrades`)}),H(`option`,{value:`stable`,children:f(`Stable releases only`)}),H(`option`,{value:`candidate`,children:f(`Stable releases and release candidates`)})]}):H(`p`,{children:f(`Unavailable/Disabled by administrator or maintainer`)})]}),H(`p`,{children:H(`strong`,{children:f(`Default Configuration`)})}),H(`div`,{class:`action-row`,children:[H(`button`,{type:`button`,class:`btn btn-default`,onClick:()=>s(`folder`),children:f(`Edit Folder Defaults`)}),H(`button`,{type:`button`,class:`btn btn-default`,onClick:()=>s(`device`),children:f(`Edit Device Defaults`)})]})]})}function Ja({addressOverridden:e,describedBy:t,draft:n,fields:r,onUpdate:i}){let{t:a}=B();return H(C,{children:[H(Ka,{describedBy:t,draft:n,fields:r,onChange:i}),e&&H(`p`,{class:`text-warning`,children:a(`The GUI address is overridden by startup options. Changes here will not take effect while the override is in place.`)})]})}function Ya({describedBy:e,draft:t,fields:n,onUpdate:r}){return H(Ka,{describedBy:e,draft:t,fields:n,onChange:r})}function Xa({describedBy:e,draft:t,field:n,onChange:r}){let i=`config-`+n.path;switch(n.type){case`checkbox`:return H(aa,{id:i,label:n.label,checked:!!qn(t,n.path),describedBy:e,onChange:e=>r(n.path,e.currentTarget.checked)});case`select`:return H(oa,{id:i,label:n.label,value:ra(t,n),options:n.options,describedBy:e,onChange:e=>r(n.path,e.currentTarget.value)});case`lines`:return H(sa,{id:i,label:n.label,value:(qn(t,n.path)||[]).join(` +`),describedBy:e,onInput:e=>r(n.path,e.currentTarget.value.split(` +`))});case`number`:return H(ca,{id:i,label:n.label,min:n.min,required:n.required,describedBy:e,value:ra(t,n),onInput:e=>r(n.path,ia(n,e.currentTarget))});default:return H(la,{id:i,label:n.label,type:n.type===`list`?`text`:n.type,required:n.required,describedBy:e,value:ra(t,n),onInput:e=>r(n.path,ia(n,e.currentTarget))})}}function Za({describedBy:e,draft:t,fields:n,onChange:r}){return n.map(n=>H(`div`,{class:`form-group`,children:H(Xa,{describedBy:e,draft:t,field:n,onChange:r})},n.path))}function Qa({state:e,api:t,session:n,onClose:r,advanced:i=!1}){let{t:a}=B(),o=R(),[s]=I(()=>G(e.config)),[c,l]=I(()=>G(s)),[u,d]=I(Oa(s)),[f,p]=I(`General`),[m,h]=I({themes:[],upgrade:null}),[g,_]=I(!1),[v,y]=I(``),[b,x]=I(null),[S,w]=I(null),[T,E]=I(!1),D=b?.folder?Ta:Ha,O=Aa(f,c,e.system.myID,m.themes),k=Da.map(e=>({id:e,tabId:`settings-`+e.toLowerCase().replaceAll(` `,`-`)+`-tab`,panelId:`settings-panel`,label:a(e)}));L(()=>{let e=new AbortController;return Pa(t,e.signal).then(t=>{e.signal.aborted||h(t)}),()=>e.abort()},[t]);function A(e,t){l(n=>Jn(n,e,t))}async function j(){if(o.current.reportValidity()){_(!0),y(``);try{let t=i?G(c):Fa(c,u,e.system,e.version,!!m.upgrade);await n.saveConfig(t),r(),s.gui.theme!==t.gui.theme&&location.reload()}catch(e){y(e.message)}finally{_(!1)}}}function M(){g||(JSON.stringify(c)!==JSON.stringify(s)||u!==Oa(s)?E(!0):r())}async function ee(e){try{x({type:`edit-`+e,defaults:!0,[e]:await t.get(`config/defaults/`+e)})}catch(e){y(e.message)}}async function te(){try{A(`gui.apiKey`,(await t.get(`svc/random/string`,{query:{length:32}})).random)}catch(e){y(e.message)}}function N(){w(!0)}function ne(){switch(f){case`Ignored Devices`:return H(Ua,{config:c,onChange:l});case`Ignored Folders`:return H(Wa,{config:c,onChange:l});case`General`:return H(qa,{describedBy:v?`settings-error`:void 0,draft:c,fields:O,mode:u,options:m,system:e.system,version:e.version,onDefaults:ee,onGenerateKey:te,onMode:d,onPreview:N,onUpdate:A});case`GUI`:return H(Ja,{addressOverridden:e.system.guiAddressOverridden,describedBy:v?`settings-error`:void 0,draft:c,fields:O,onUpdate:A});case`Connections`:return H(Ya,{describedBy:v?`settings-error`:void 0,draft:c,fields:O,onUpdate:A});default:throw Error(`Unknown settings tab: ${f}`)}}return H(C,{children:[H(W,{title:i?`Advanced Configuration`:`Settings`,status:i?`danger`:`default`,icon:`settings`,large:!0,onClose:r,onCancel:M,footer:H(C,{children:[H(`button`,{class:`btn btn-primary btn-sm`,disabled:g,onClick:j,children:a(`Save`)}),H(`button`,{class:`btn btn-default btn-sm`,disabled:g,onClick:M,children:a(`Close`)})]}),children:H(`form`,{ref:o,"aria-describedby":v?`settings-error`:void 0,onSubmit:e=>{e.preventDefault(),j()},children:[v&&H(`p`,{id:`settings-error`,class:`text-danger`,role:`alert`,children:a(v)}),H(`fieldset`,{disabled:g,children:i?H(C,{children:[H(`p`,{class:`text-danger`,children:[H(`strong`,{children:a(`Be careful!`)}),` `,a(`Incorrect configuration may damage your folder contents and render Syncthing inoperable.`)]}),Na(c).map(e=>H(`details`,{class:`panel panel-default`,children:[H(`summary`,{class:`panel-heading`,children:a(e.label)}),H(`div`,{class:`panel-body`,children:H(Za,{describedBy:v?`settings-error`:void 0,draft:c,fields:e.fields,onChange:A})})]},e.path))]}):H(C,{children:[H(Wi,{activeId:f,items:k,onSelect:p}),H(`div`,{id:`settings-panel`,role:`tabpanel`,"aria-labelledby":`settings-`+f.toLowerCase().replaceAll(` `,`-`)+`-tab`,children:ne()})]})})]})}),b&&H(D,{action:b,state:e,api:t,session:n,onSaved:(e,t)=>{l(n=>{let r=Jn(n,`defaults.`+(b.folder?`folder`:`device`),e);return b.folder&&(r.defaults.ignores.lines=t),r})},onClose:()=>x(null)}),S&&H(Kn,{api:t,session:n,state:e,onClose:()=>w(null)}),T&&H(W,{title:`Discard Changes`,onClose:()=>E(!1),footer:H(C,{children:[H(`button`,{class:`btn btn-warning`,onClick:r,children:a(`Discard Changes`)}),H(`button`,{class:`btn btn-default`,onClick:()=>E(!1),children:a(`Cancel`)})]}),children:H(`p`,{children:a(`Discard unsaved changes?`)})})]})}function $a(e,t){if(!e)return{valid:!0,time:t};let n=new Date(e).getTime();return{valid:Number.isFinite(n),time:n}}function eo(e=``,t=``){let n=$a(e,-1/0),r=$a(t,1/0);return{valid:n.valid&&r.valid&&n.time<=r.time,minimum:n.time,maximum:r.time}}function to(e,t=``,n=``,r=``){let i=new Map,a=t.toLowerCase().replaceAll(`\\`,`/`),o=eo(n,r);if(!o.valid)return[];for(let[t,n]of Object.entries(e||{}).sort(([e],[t])=>e.localeCompare(t))){if(!t.toLowerCase().includes(a))continue;let e=n.filter(e=>{let t=new Date(e.versionTime).getTime();return t>=o.minimum&&t<=o.maximum}).sort((e,t)=>new Date(t.versionTime)-new Date(e.versionTime));if(!e.length)continue;let r=t.includes(`/`)?t.slice(0,t.lastIndexOf(`/`)):``;i.has(r)||i.set(r,[]),i.get(r).push({path:t,versions:e})}return[...i.entries()]}var no=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>e));function ro(e,t,n){let r={...e};for(let e of t)n===`unset`?delete r[e.path]:r[e.path]=e.versions[n===`oldest`?e.versions.length-1:0].versionTime;return r}var io=[{action:`latest`,label:`Select latest version`},{action:`oldest`,label:`Select oldest version`},{action:`unset`,label:`Do not restore all`}];async function ao(e,t,n){let r=await e.post(`folder/versions`,{body:n,query:{folder:t}});return Object.keys(r).length?{complete:!1,failures:r,selections:Object.fromEntries(Object.entries(n).filter(([e])=>r[e])),versions:await e.get(`folder/versions`,{query:{folder:t}})}:{complete:!0,failures:r,selections:{},versions:null}}function oo({api:e,folder:t,onClose:n}){let{t:r}=B(),[i,a]=I(null),[o,s]=I({}),[c,l]=I({}),[u,d]=I(``),[f,p]=I(!1),[m,h]=I(!1),[g,_]=I(``),[v,y]=I(``),[b,x]=I(``),S=to(i,g,v,b),w=no(o),T=Object.keys(w).length;L(()=>{let n=new AbortController;return e.get(`folder/versions`,{query:{folder:t.id},signal:n.signal}).then(a).catch(e=>{n.signal.aborted||d(e.message)}),()=>n.abort()},[e,t.id]);async function E(){p(!0),d(``);try{let r=await ao(e,t.id,w);l(r.failures),h(!1),r.complete?n():(s(r.selections),a(r.versions))}catch(e){d(e.message)}finally{p(!1)}}let D=e=>io.map(({action:t,label:n})=>H(`button`,{class:`btn btn-default btn-sm`,onClick:()=>s(n=>ro(n,e,t)),children:r(n)},t));function O(){return H(`fieldset`,{disabled:f||m,children:[H(`div`,{class:`version-filters`,children:[H(`label`,{children:[r(`Filter by name`),H(`input`,{class:`form-control`,type:`search`,value:g,onInput:e=>_(e.currentTarget.value)})]}),H(`label`,{children:[r(`Filter by date`),` · `,r(`From`),H(`input`,{class:`form-control`,type:`datetime-local`,step:`1`,value:v,onInput:e=>y(e.currentTarget.value)})]}),H(`label`,{children:[r(`Filter by date`),` · `,r(`To`),H(`input`,{class:`form-control`,type:`datetime-local`,step:`1`,value:b,onInput:e=>x(e.currentTarget.value)})]})]}),H(`div`,{class:`action-row`,children:D(S.flatMap(([,e])=>e))}),S.map(([e,n])=>H(`details`,{class:`version-group`,open:!0,children:[H(`summary`,{children:[H(U,{name:`folder`}),` `,e||t.label||t.id]}),H(`div`,{class:`action-row`,children:D(n)}),n.map((e,t)=>H(`div`,{class:`version-row ${t%2==0?`section-stripe`:``}`,children:[H(`span`,{class:`folder-text`,title:e.path,children:e.path.slice(e.path.lastIndexOf(`/`)+1)}),H(`select`,{class:`form-control input-sm`,"aria-label":e.path,value:o[e.path]||``,onChange:t=>s({...o,[e.path]:t.currentTarget.value}),children:[H(`option`,{value:``,children:r(`Do not restore`)}),o[e.path]&&!e.versions.some(t=>t.versionTime===o[e.path])&&H(`option`,{value:o[e.path],children:X(o[e.path])}),e.versions.map(e=>H(`option`,{value:e.versionTime,children:[X(e.versionTime),` ·`,` `,Y(e.size,!0),`B`]},e.versionTime))]})]},e.path))]},e))]})}function k(){return i===null?u?null:H(`p`,{role:`status`,children:r(`Loading data...`)}):Object.keys(i).length===0?H(`p`,{children:r(`There are no file versions to restore.`)}):O()}return H(W,{title:r(`Restore Versions`)+` - `+(t.label||t.id),icon:`undo`,large:!0,onClose:n,onCancel:()=>{f||n()},footer:m?H(C,{children:[H(`button`,{class:`btn btn-warning btn-sm`,disabled:f,onClick:E,children:r(`Yes`)}),H(`button`,{class:`btn btn-default btn-sm`,disabled:f,onClick:()=>h(!1),children:r(`No`)})]}):H(C,{children:[H(`button`,{class:`btn btn-primary btn-sm`,disabled:f||!T,onClick:()=>h(!0),children:[r(`Restore`),` (`,T,`)`]}),H(`button`,{class:`btn btn-default btn-sm`,disabled:f,onClick:n,children:r(`Close`)})]}),children:[u&&H(`p`,{class:`text-danger`,role:`alert`,children:u}),Object.keys(c).length>0&&H(C,{children:[H(`p`,{children:r(`Some items could not be restored:`)}),H(`table`,{class:`table table-striped`,children:H(`tbody`,{children:Object.entries(c).map(([e,t])=>H(`tr`,{children:[H(`td`,{class:`word-break-all`,children:e}),H(`td`,{class:`word-break-all text-danger`,children:t})]},e))})})]}),k(),m&&H(`div`,{class:`alert alert-warning`,role:`alert`,children:r(`Are you sure you want to restore {%count%} files?`,{count:T}).replace(`{%count%}`,T)})]})}function so({kind:e,state:t,onClose:n}){let{t:r}=B(),i=Pi(e===`listeners`?t.system.connectionServiceStatus:t.system.discoveryStatus),a=e===`listeners`;return H(W,{title:a?i.failed.length?`Listener Failures`:`Listener Status`:i.failed.length?`Discovery Failures`:`Discovery Status`,status:i.failed.length?`danger`:`default`,icon:`network`,onClose:n,children:[a?H(`p`,{children:r(i.running?`Syncthing is listening on the following network addresses for connection attempts from other devices:`:`Syncthing is not listening for connection attempts from other devices on any address. Only outgoing connections from this device may work.`)}):H(C,{children:[H(`p`,{children:r(i.running?`The following methods are used to discover other devices on the network and announce this device to be found by others:`:`This device cannot automatically discover other devices or announce its own address to be found by others. Only devices with statically configured addresses can connect.`)}),H(`p`,{children:r(`Failure to connect to IPv6 servers is expected if there is no IPv6 connectivity.`)})]}),i.entries.map(([e,t])=>H(`section`,{children:[H(`h5`,{children:e}),H(`dl`,{children:Object.entries(t||{}).map(([e,t])=>H(`div`,{children:[H(`dt`,{children:e}),H(`dd`,{class:e===`error`?`text-danger`:``,children:Array.isArray(t)?t.join(`, `):typeof t==`object`?JSON.stringify(t):t})]},e))})]},e))]})}function co({state:e,onClose:t}){let{t:n}=B(),r=t=>z(e.config.devices.find(e=>e.deviceID.startsWith(t||`\0`)))||t||n(`Unknown`);return H(W,{title:`Recent Changes`,large:!0,expandable:!0,icon:`info`,onClose:t,children:H(`div`,{class:`table-responsive`,children:H(`table`,{class:`table table-condensed table-striped recent-changes-table`,children:[H(`colgroup`,{children:[H(`col`,{class:`recent-device`}),H(`col`,{class:`recent-action`}),H(`col`,{class:`recent-type`}),H(`col`,{class:`recent-folder`}),H(`col`,{class:`recent-path`}),H(`col`,{class:`recent-time`})]}),H(`thead`,{children:H(`tr`,{children:[`Device`,`Action`,`Type`,`Folder`,`Path`,`Time`].map(e=>H(`th`,{children:n(e)},e))})}),H(`tbody`,{children:e.globalChanges.map(t=>{let i=e.config.folders.find(e=>e.id===t.data.folder)?.label||t.data.folder,a=r(t.data.modifiedBy);return H(`tr`,{children:[H(`td`,{title:a,children:a}),H(`td`,{children:n(t.data.action)}),H(`td`,{children:n(t.data.type)}),H(`td`,{title:i,children:i}),H(`td`,{children:H(J,{label:t.data.path,text:t.data.path,triggerText:t.data.path,tail:!0})}),H(`td`,{children:X(t.time)})]},t.id)})})]})})})}function lo({api:e,device:t,onClose:n}){let{t:r}=B();return H(W,{title:r(`Device Identification`)+` - `+z(t),large:!0,status:`info`,icon:`qrcode`,onClose:n,children:H(`div`,{class:`text-center`,children:[H(`div`,{class:`well well-sm text-monospace`,children:H(`strong`,{children:t.deviceID})}),H(`img`,{class:`img-thumbnail`,src:`qr/?text=`+encodeURIComponent(t.deviceID),height:`328`,width:`328`,alt:r(`QR code`)}),H(Va,{device:t,api:e})]})})}function uo(e,t,n,r,i,a){return e.get(`db/remoteneed`,{query:{folder:t,device:n,page:r,perpage:i},signal:a}).then(e=>e.files||[])}function fo(e,t,n){let r=z(t.find(t=>t.deviceID.startsWith(e.modifiedBy||`\0`)))||e.modifiedBy||n(`Unknown`);return{key:e.name,path:e.name,size:[`DIRECTORY`,`FILE_INFO_TYPE_DIRECTORY`].includes(e.type)?``:Y(e.size,!0)+`B`,modified:X(e.modified),modifyingDevice:r}}function po({api:e,folder:t,device:n,state:r,single:i}){let{t:a}=B(),[o,s]=I(1),[c,l]=I(10),[u,d]=I([]),[f,p]=I(``),m=r.completion[n.deviceID]?.folders?.[t.id],h=m?.needItems+`:`+m?.needBytes;L(()=>{let r=new AbortController;return uo(e,t.id,n.deviceID,o,c,r.signal).then(e=>{d(e),p(``)}).catch(e=>{r.signal.aborted||p(e.message)}),()=>r.abort()},[e,t.id,n.deviceID,o,c,h]);let g=u.map(e=>fo(e,r.config.devices,a));return H(`details`,{class:`panel panel-default`,open:i,children:[H(`summary`,{class:`panel-heading`,children:t.label||t.id}),H(`div`,{class:`panel-body less-padding`,children:[f&&H(`p`,{class:`text-danger`,role:`alert`,children:f}),H(`table`,{class:`table table-striped`,children:[H(`thead`,{children:H(`tr`,{children:[`Path`,`Size`,`Mod. Time`,`Mod. Device`].map(e=>H(`th`,{title:e===`Mod. Time`?a(`Time the item was last modified`):e===`Mod. Device`?a(`Device that last modified the item`):void 0,children:a(e)},e))})}),H(`tbody`,{children:g.map(e=>H(`tr`,{children:[H(`td`,{class:`word-break-all`,children:e.path}),H(`td`,{children:e.size}),H(`td`,{children:e.modified}),H(`td`,{children:e.modifyingDevice})]},e.key))})]}),H(ui,{page:o,perpage:c,total:m?.needItems||u.length,onPage:s,onSize:l})]})]})}function mo({api:e,device:t,state:n,onClose:r}){let{t:i}=B(),a=st(n.config,t.deviceID).filter(e=>{let r=n.completion[t.deviceID]?.folders?.[e.id];return!r||r.needItems+r.needDeletes>0});return H(W,{title:i(`Out of Sync Items`)+` - `+z(t),large:!0,status:`info`,icon:`arrow-left-right`,onClose:r,children:a.map(r=>H(po,{api:e,folder:r,device:t,state:n,single:a.length===1},r.id))})}function ho({action:e,state:t,api:n,session:r,onClose:i}){switch(e.type){case`restart`:case`shutdown`:case`upgrade`:return H(Qi,{kind:e.type,state:t,session:r,onClose:i});case`logs`:return H(na,{api:n,onClose:i});case`settings`:case`advanced`:return H(Qa,{state:t,api:n,session:r,onClose:i,advanced:e.type===`advanced`});case`add-device`:case`edit-device`:return H(Ha,{action:e,state:t,api:n,session:r,onClose:i});case`add-folder`:case`edit-folder`:return H(Ta,{action:e,state:t,api:n,session:r,onClose:i});case`override`:case`revert`:return H(ga,{action:e,api:n,session:r,onClose:i,onDone:i});case`versions`:return H(oo,{api:n,folder:e.folder,onClose:i});case`about`:return H(Xi,{api:n,version:t.version,onClose:i});case`identification`:return H(lo,{api:n,device:e.device,onClose:i});case`listeners`:case`discovery`:return H(so,{kind:e.type,state:t,onClose:i});case`remote-needed`:return H(mo,{api:n,device:e.device,state:t,onClose:i});case`changes`:return H(co,{state:t,onClose:i});default:throw Error(`Unknown dialog request: ${e.type}`)}}var go=`The latest Syncthing index has no usable file at the original name. Conflict files are ordinary files with a conflict marker in their names. Rename the version you want to keep, or delete unwanted conflict files, then recheck. Rechecking alone does not rename or delete files.`;function _o({group:e,file:t,permission:n,onOpen:r}){let{t:i}=B();if(!t)return H(`span`,{class:`text-warning`,children:[H(J,{icon:`triangle-alert`,label:`Missing current file`,text:i(go)}),` `,i(`Missing current file`)]});if(!t.available)return H(`span`,{class:`text-warning`,title:i(`Waiting for Syncthing to download this file`),children:[t.name,` · `,i(`Not available locally`)]});let a=H(C,{children:[H(U,{name:`file`,class:`icon-fixed`}),H(`span`,{class:`review-filename`,children:t.name})]});return n(e,t).open?H(`a`,{class:`review-file`,href:`#open-file`,title:e.root+`/`+t.path,onClick:n=>{n.preventDefault(),r(e,t)},children:a}):H(`span`,{class:`review-file`,title:e.root+`/`+t.path,children:a})}var vo=/^(.*)\.sync-conflict-\d{8}-\d{6}-[A-Z2-7]{7}(\..*)?$/,yo=e=>e.includes(`/`)?e.slice(0,e.lastIndexOf(`/`)):``,bo=e=>e.slice(e.lastIndexOf(`/`)+1);function xo(e){let t=vo.exec(bo(e));if(!t)return null;let n=t[1]+(t[2]||``);return vo.test(n)?null:(yo(e)?yo(e)+`/`:``)+n}function So({group:e,selected:t,permission:n,showAccessReason:r,loading:i,scanning:a,onSelect:o,onOpen:s,onRename:c,onRecheck:l}){let{t:u}=B(),d=e.copies.find(e=>e.path===t)||e.copies[0],f=n(e,d),p=n(e,e.current||d),m=e=>H(C,{children:[Y(e.bytes,!0),`B · `,X(e.modified)]});return H(`tr`,{class:`review-row`,children:[H(`td`,{class:`review-context`,children:H(`span`,{class:`review-path`,title:e.root+`/`+yo(e.path),children:[e.folderName,yo(e.path)?` / `+yo(e.path):``]})}),H(`td`,{class:`review-current`,children:[H(`span`,{class:`review-cell-label`,children:u(`Current file`)}),H(_o,{group:e,file:e.current,permission:n,onOpen:s}),e.current?H(`small`,{class:`review-file-meta`,children:m(e.current)}):H(`small`,{class:`review-file-meta review-missing-hint`,children:[u(`To keep a conflict file, rename it to:`),` `,H(`span`,{class:`review-filename`,title:e.root+`/`+e.path,children:e.name})]})]}),H(`td`,{class:`review-copies`,children:[e.copies.length>1?H(`select`,{class:`form-control input-sm review-version`,"aria-label":u(`Conflict files`)+`: `+e.name,value:d.path,title:d.name,onChange:e=>o(e.currentTarget.value),children:e.copies.map((t,n)=>H(`option`,{value:t.path,children:[n+1,`/`,e.copies.length,` · `,t.name]},t.path))}):H(`span`,{class:`review-mobile-label`,children:u(`Conflict files`)}),H(_o,{group:e,file:d,permission:n,onOpen:s}),H(`small`,{class:`review-file-meta review-conflict-meta`,children:[m(d),!e.current&&d.available&&H(`button`,{class:`btn btn-default review-autoresolve`,disabled:!f.rename||i,title:u(f.reason||``),onClick:()=>c(d),children:H(`span`,{class:`text-warning`,children:u(`Autoresolve`)})})]}),r&&f.reason&&H(`small`,{class:`text-warning`,children:u(f.reason)})]}),H(`td`,{class:`review-actions`,children:[H(`button`,{class:`btn btn-default`,disabled:!p.open||i,title:u(p.reason||``),onClick:()=>s(e),children:[H(U,{name:`folder-open`}),` `,u(`Open folder`)]}),H(`button`,{class:`btn btn-default`,disabled:i,"aria-busy":a===e.id,onClick:l,children:H(`span`,{class:a===e.id?`text-warning review-rechecking`:``,children:[H(U,{name:`refresh`,class:a===e.id?`icon-spin`:``}),` `,u(`Recheck files in folder`)]})})]})]},e.id)}function Co({conflict:e,errors:t,loading:n,onCancel:r,onRename:i}){let{t:a}=B();return H(W,{title:a(`Restore original name`),onClose:r,onCancel:()=>{n||r()},footer:H(C,{children:[H(`button`,{class:`btn btn-default`,disabled:n,onClick:r,children:a(`Cancel`)}),H(`button`,{class:`btn btn-default`,disabled:n,onClick:i,children:H(`span`,{class:`text-warning`,children:a(`Rename`)})})]}),children:[H(`p`,{children:a(`The selected file keeps its contents and takes the original name shown below. Its conflict filename disappears; other conflict files remain.`)}),H(`p`,{children:a(`If a file already exists at the destination, nothing is renamed or replaced.`)}),H(`strong`,{children:[a(`From`),`:`]}),H(`p`,{class:`review-confirm-path`,children:[e.group.root,`/`,e.file.path]}),H(`strong`,{children:[a(`To`),`:`]}),H(`p`,{class:`review-confirm-path`,children:[e.group.root,`/`,e.group.path]}),t.map(e=>H(`p`,{class:`text-danger`,role:`alert`,children:e},e))]})}var wo=e=>e?.type===`FILE_INFO_TYPE_FILE`&&![`deleted`,`ignored`,`invalid`,`mustRescan`].some(t=>e[t]);async function To(e,t,n,r){let i;try{i=await e.get(`db/file`,{query:{folder:t,file:n},signal:r})}catch(e){if(e.status===404)return null;throw e}if(!wo(i.global))return null;let a=wo(i.local),o=a?i.local:i.global;return{path:n,name:bo(n),bytes:o.size,modified:o.modified,available:a,digest:a?o.blocksHash??null:null}}function*Eo(e,t=``){for(let n of e){let e=t?t+`/`+n.name:n.name;n.type===`FILE_INFO_TYPE_DIRECTORY`?yield*Eo(n.children||[],e):n.type===`FILE_INFO_TYPE_FILE`&&(yield e)}}async function Do(e,t,{prefix:n=``,signal:r}={}){let i=await e.get(`db/browse`,{query:{folder:t.id,prefix:n},signal:r}),a=new Map;for(let o of Eo(i,n)){let n=xo(o);if(!n)continue;let i=await To(e,t.id,o,r);i&&(a.has(n)||a.set(n,{id:JSON.stringify([t.id,n]),folder:t.id,folderName:t.label||t.id,root:t.path,path:n,name:bo(n),copies:[],current:null}),a.get(n).copies.push(i))}for(let n of a.values())n.current=await To(e,t.id,n.path,r),n.copies.sort((e,t)=>t.name.localeCompare(e.name));return[...a.values()].sort((e,t)=>e.path.localeCompare(t.path))}async function Oo(e,t,n){let r=await Promise.allSettled(t.map(t=>Do(e,t,{signal:n})));if(n?.aborted)throw n.reason;return{groups:r.flatMap(e=>e.status===`fulfilled`?e.value:[]),errors:r.flatMap((e,n)=>e.status===`rejected`?[(t[n].label||t[n].id)+`: `+e.reason.message]:[])}}async function ko(e,t,n,r){if(await e.post(`db/scan`,{query:n?{folder:n.folder,sub:yo(n.path)}:{},signal:r}),!n)return Oo(e,t,r);let i=t.find(e=>e.id===n.folder);if(!i)throw Error(`Folder is no longer configured`);return{groups:await Do(e,i,{prefix:yo(n.path),signal:r}),errors:[]}}function Ao(e,t,n){let r=yo(t.path);return[...e.filter(e=>e.folder!==t.folder||r&&!e.path.startsWith(r+`/`)),...n]}function jo({api:e,folders:t,active:n,ready:r,hostActions:i,device:a}){let[o,s]=I([]),[c,l]=I(!1),[u,d]=I(null),[f,p]=I([]),[m,h]=I(``),[g,_]=I(null),[v,y]=I({}),[b,x]=I(``),S=R();L(()=>{if(!n||!r)return;let e=new AbortController;return S.current=e,C(!1,null,e),()=>e.abort()},[n,r,t.map(e=>e.id).join(`|`)]);async function C(n=!1,r=null,a=S.current){l(!0),d(n?r?.id||`all`:null),p([]),h(``);try{let o=n?await ko(e,t,r,a.signal):await Oo(e,t,a.signal);if(a.signal.aborted)return;s(e=>r?Ao(e,r,o.groups):o.groups),p(o.errors),i?.status&&await T(o.groups,a.signal),n&&!o.errors.length&&h(`Syncthing scan finished; file list updated.`)}catch(e){a.signal.aborted||p([e.message])}finally{a.signal.aborted||(l(!1),d(null))}}async function w(e,t){let n=JSON.stringify([e.id,t.path]);try{return[n,await i.check(a,e,t)]}catch(e){return[n,{reason:e.message}]}}async function T(e,t){try{await i.status(a),x(``);let n=e.flatMap(e=>[e.current,...e.copies].filter(Boolean).map(t=>w(e,t))),r=await Promise.all(n);t.aborted||y(e=>({...e,...Object.fromEntries(r)}))}catch(e){x(e.message),y({})}}async function E(e,t){try{await i.open(e,t,a)}catch(e){p([e.message])}}async function D(){l(!0),p([]);try{await i.rename(g.group,g.file,a);let e=g.group;_(null),await C(!0,e)}catch(e){p([e.message])}finally{l(!1)}}function O(e,t){return i?b?{reason:b}:i.check?v[JSON.stringify([e.id,t.path])]||{reason:`Checking local file access...`}:{open:!0,rename:!0}:{reason:ge}}return{groups:o,loading:c,scanning:u,errors:f,message:m,rename:g,desktopError:b,permission:O,openConflict:E,rescan:(e=null)=>C(!0,e),selectRename:(e,t)=>_({group:e,file:t}),cancelRename:()=>_(null),restoreConflictName:D}}function Mo({api:e,folders:t,active:n,ready:r,hostActions:i=null,device:a}){let{t:o}=B(),[s,c]=I(``),[l,u]=I({}),{groups:d,loading:f,scanning:p,errors:m,message:h,rename:g,desktopError:_,permission:v,openConflict:y,rescan:b,selectRename:x,cancelRename:S,restoreConflictName:w}=jo({api:e,folders:t,active:n,ready:r,hostActions:i,device:a}),T=d.filter(e=>[e.folderName,e.path,...e.copies.map(e=>e.path)].some(e=>e.toLocaleLowerCase().includes(s.toLocaleLowerCase())));return H(C,{children:[H(`section`,{class:`conflict-review`,"aria-label":o(`Conflict files`),children:[H(`h3`,{children:o(`Review in your file manager`)}),(!i||_)&&H(`p`,{role:`status`,children:o(_||`Local file actions are unavailable. Open this UI from Syncshell on the desktop running Syncthing, under the same user.`)}),H(`div`,{class:`review-tools`,children:[H(`input`,{type:`search`,class:`form-control input-sm review-search`,placeholder:o(`Search filenames or paths`),"aria-label":o(`Search filenames or paths`),value:s,onInput:e=>c(e.currentTarget.value)}),H(`button`,{class:`btn btn-default review-recheck`,disabled:f,"aria-busy":p===`all`,onClick:()=>b(),children:H(`span`,{class:p===`all`?`text-warning review-rechecking`:``,children:[H(U,{name:`refresh`,class:p===`all`?`icon-spin`:``}),` `,o(`Recheck all files`)]})})]}),f&&H(`p`,{role:`status`,children:o(`Loading data...`)}),h&&H(`p`,{class:`review-message`,role:`status`,children:o(h)}),m.map(e=>H(`p`,{class:`review-message text-danger`,role:`alert`,children:e},e)),H(`table`,{class:`table table-striped review-table`,"aria-label":o(`Conflict files`),children:[H(`thead`,{children:H(`tr`,{class:`review-column-headings`,children:[`Location`,`Current file`,`Conflict files`,`Actions`].map(e=>H(`th`,{scope:`col`,children:o(e)},e))})}),H(`tbody`,{children:T.map(e=>H(So,{group:e,selected:l[e.id],permission:v,showAccessReason:!(!i||_),loading:f,scanning:p,onSelect:t=>u({...l,[e.id]:t}),onOpen:y,onRename:t=>x(e,t),onRecheck:()=>b(e)},e.id))})]}),!f&&!T.length&&!m.length&&H(`p`,{class:`text-success`,children:o(d.length?`No matches`:`No conflict files remain`)})]}),g&&H(Co,{conflict:g,errors:m,loading:f,onCancel:S,onRename:w})]})}var No=[{id:`overview`,label:`Overview`},{id:`conflicts`,label:`Resolve sync conflicts`},{id:`notifications`,label:`Notifications`}];function Po({activeTab:e,onSelect:t}){let{t:n}=B();return H(Wi,{activeId:e,className:`dashboard-tabs`,items:No.map(({id:e,label:t})=>({id:e,tabId:e+`-tab`,panelId:`dashboard-`+e,label:H(C,{children:[n(t),e===`conflicts`?` (beta)`:``,e===`notifications`&&H(`span`,{class:`notification-indicator`,children:[H(U,{name:`dot`,class:`text-success`,role:`img`,"aria-label":n(`Pending notifications`)}),H(U,{name:`dot`,class:`text-warning`,role:`img`,"aria-label":n(`Pending warnings`)}),H(U,{name:`dot`,class:`text-danger`,role:`img`,"aria-label":n(`Pending errors`)})]})]})})),onSelect:t})}var Fo=`data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%3e%3cg%20id='syncthing-mark'%3e%3ccircle%20id='ring'%20cx='8.218058'%20cy='8.000000'%20r='5.9557071'%20style='fill:none;stroke:%23fff;stroke-width:1.4'/%3e%3cline%20id='arm-l'%20x1='9.417377'%20y1='8.804085'%20x2='2.480409'%20y2='9.444634'%20style='stroke:%23fff;stroke-width:1.4'/%3e%3cline%20id='arm-tr'%20x1='9.417377'%20y1='8.804085'%20x2='13.519591'%20y2='5.396935'%20style='stroke:%23fff;stroke-width:1.4'/%3e%3cline%20id='arm-br'%20x1='9.417377'%20y1='8.804085'%20x2='12.006814'%20y2='12.538330'%20style='stroke:%23fff;stroke-width:1.4'/%3e%3ccircle%20id='node-c'%20cx='9.417377'%20cy='8.804085'%20r='1.7'%20style='fill:%23fff'/%3e%3ccircle%20id='node-l'%20cx='2.480409'%20cy='9.444634'%20r='1.7'%20style='fill:%23fff'/%3e%3ccircle%20id='node-tr'%20cx='13.519591'%20cy='5.396935'%20r='1.7'%20style='fill:%23fff'/%3e%3ccircle%20id='node-br'%20cx='12.006814'%20cy='12.538330'%20r='1.7'%20style='fill:%23fff'/%3e%3c/g%3e%3c/svg%3e`,Io=[{label:`Introduction`,url:`https://github.com/syncshell/syncshell-webui#readme`},{label:`Home page`,url:`https://github.com/syncshell/syncshell-webui`},{label:`Documentation`,url:`https://docs.syncthing.net/`},{label:`Support`,url:`https://github.com/syncshell/syncshell-webui/issues`},{label:`Changelog`,url:`https://github.com/syncshell/syncshell-webui/releases`},{label:`Statistics`,url:`https://data.syncthing.net/`},{label:`Bugs`,url:`https://github.com/syncshell/syncshell-webui/issues`},{label:`Source Code`,url:`https://github.com/syncshell/syncshell-webui`}];function Lo({api:e,authenticated:t,config:n,name:r,onAction:i,self:a,upgradeInfo:o}){let{t:s}=B();function c(e,t,n){e.preventDefault(),n(),i(t)}return H(`nav`,{class:`navbar navbar-top navbar-default`,"aria-label":`Main`,children:H(`div`,{class:`container`,children:[H(`span`,{class:`navbar-brand syncshell-brand`,children:[H(`span`,{class:`syncshell-mark`,"aria-hidden":`true`,style:{"--syncshell-mark":`url("${Fo}")`}}),H(`span`,{class:`text-success`,children:`Syncshell`})]}),t&&H(`p`,{class:`navbar-text hidden-xs`,children:r}),H(`ul`,{class:`nav navbar-nav navbar-right`,children:[H(Gr,{as:`li`,className:`action-menu`,triggerAs:`a`,triggerHref:`#help`,label:H(C,{children:[H(U,{name:`help`}),` `,s(`Help`),` `,H(`span`,{class:`caret`})]}),children:({close:e})=>H(C,{children:[Io.map(({label:e,url:t})=>H(`li`,{children:H(`a`,{href:t,target:`_blank`,rel:`noreferrer`,children:s(e)})},e)),H(`li`,{children:H(`a`,{href:`#about`,onClick:t=>c(t,{type:`about`},e),children:s(`About`)})})]})}),t&&H(Gr,{as:`li`,className:`action-menu`,triggerAs:`a`,triggerHref:`#actions`,label:H(C,{children:[H(U,{name:`settings`}),` `,s(`Actions`),` `,H(`span`,{class:`caret`})]}),children:({close:t})=>H(C,{children:[H(`li`,{children:H(`a`,{href:`#settings`,onClick:e=>c(e,{type:`settings`},t),children:s(`Settings`)})}),H(`li`,{children:H(`a`,{href:`#advanced`,onClick:e=>c(e,{type:`advanced`},t),children:s(`Advanced`)})}),H(`li`,{children:H(`a`,{href:`#identification`,onClick:e=>c(e,{type:`identification`,device:a},t),children:s(`Show ID`)})}),H(`li`,{children:H(`a`,{href:`#logs`,onClick:e=>c(e,{type:`logs`},t),children:s(`Logs`)})}),(o?.newer||o?.majorNewer)&&H(`li`,{children:H(`a`,{href:`#upgrade`,onClick:e=>c(e,{type:`upgrade`},t),children:[s(`Upgrade`),` `,o.latest]})}),H(`li`,{children:H(`a`,{href:`rest/debug/support`,target:`_blank`,children:s(`Support Bundle`)})}),(n.gui?.user||n.gui?.authMode===`ldap`)&&H(`li`,{children:H(`a`,{href:`#logout`,onClick:async t=>{t.preventDefault(),await e.post(`noauth/auth/logout`,{body:{}}),location.reload()},children:s(`Log Out`)})}),H(`li`,{children:H(`a`,{href:`#restart`,onClick:e=>c(e,{type:`restart`},t),children:s(`Restart`)})}),H(`li`,{children:H(`a`,{href:`#shutdown`,onClick:e=>c(e,{type:`shutdown`},t),children:s(`Shut Down`)})})]})})]})]})})}var Ro=ve();function zo(){let[e]=I(()=>Ue()),t=!!window.metadata?.authenticated,[n,r]=rt(e,{active:t,onAuthExpired:()=>location.reload()}),[i,a]=I({t:it({})}),[o,s]=I(`overview`),[c,l]=I(null),[u,d]=I(!1),f=n.config.devices.find(e=>e.deviceID===n.system.myID),p=n.config.devices.filter(e=>e.deviceID!==n.system.myID),m=ot(n.config.folders,`label`,`id`),h=ot(p,`name`,`deviceID`),g=Vr(n),_=z(f)||`Syncthing`,{t:v}=i;function y(){d(e=>{try{localStorage.setItem(`metricRates`,String(!e))}catch{}return!e})}let b=Ne(async t=>{try{t.type===`add-device`&&(t=await ur(e,t)),t.type===`add-folder`&&(t=await Qn(e,n,t)),t.type===`changes`&&await r.refreshGlobalChanges(),l(t)}catch(e){r.reportError(e)}},[e,r,n]);return L(()=>{if(!n.ready)return;let e=Ro?.takeLaunchAction?.();if(e?.type!==`edit-device`)return;let t=n.config.devices.find(t=>t.deviceID===e.device);t&&b({type:`edit-device`,device:t})},[b,n.ready,n.config.devices]),L(()=>{at().then(a).catch(e=>r.reportError(e));try{d(localStorage.getItem(`metricRates`)===`true`)}catch{}},[r]),L(()=>{document.title=_+` | Syncshell`},[_]),H(ft.Provider,{value:i,children:[H(Lo,{api:e,authenticated:t,config:n.config,name:_,onAction:b,self:f,upgradeInfo:n.upgradeInfo}),H(`main`,{class:`container content`,children:t?H(C,{children:[n.error&&![`restart`,`shutdown`,`upgrade`].includes(c?.type)&&H(`div`,{class:`alert alert-danger`,role:`alert`,children:n.error.message}),!n.configInSync&&H(`div`,{class:`alert alert-warning`,children:[v(`Restart Needed`),` `,H(`button`,{class:`btn btn-default btn-sm`,onClick:()=>b({type:`restart`}),children:v(`Restart`)})]}),!n.ready&&H(`p`,{role:`status`,children:v(`Loading data...`)}),H(`div`,{class:`dashboard`,children:[H(Po,{activeTab:o,onSelect:s}),H(`div`,{class:`tab-content`,children:[H(`div`,{id:`dashboard-overview`,class:`tab-pane dashboard-primary ${o===`overview`?`active`:``}`,role:`tabpanel`,"aria-labelledby":`overview-tab`,children:[H(`section`,{class:`dashboard-folders`,"aria-labelledby":`folder-list`,children:[H(`h3`,{id:`folder-list`,children:[v(`Folders`),n.config.folders.length>1?` (`+n.config.folders.length+`)`:``]}),m.map(([t,i])=>H(`div`,{children:[t&&H(`h4`,{class:`folder-text`,title:t,children:[t,i.length>1?` (`+i.length+`)`:``]}),H(`div`,{class:`panel-group`,children:i.map(t=>H(Si,{api:e,session:r,state:n,folder:t,progress:n.scanProgress[t.id],info:n.model[t.id],stats:n.folderStats[t.id],rescan:()=>r.rescan(t.id),onAction:b},t.id))})]},t)),H(`div`,{class:`action-row`,children:[n.config.folders.some(e=>!e.paused)&&H(`button`,{class:`btn btn-sm btn-default`,onClick:()=>tt(()=>r.setPaused(`folders`,void 0,!0),r.reportError),children:[H(U,{name:`pause`}),` `,v(`Pause All`)]}),n.config.folders.some(e=>e.paused)&&H(`button`,{class:`btn btn-sm btn-default`,onClick:()=>tt(()=>r.setPaused(`folders`,void 0,!1),r.reportError),children:[H(U,{name:`play`}),` `,v(`Resume All`)]}),n.config.folders.length>0&&H(`button`,{class:`btn btn-sm btn-default`,onClick:()=>tt(()=>r.rescan(),r.reportError),children:[H(U,{name:`refresh`}),` `,v(`Rescan All`)]}),H(`button`,{class:`btn btn-sm btn-default`,onClick:()=>b({type:`add-folder`}),children:[H(U,{name:`plus`}),` `,v(`Add Folder`)]})]})]}),H(`section`,{class:`dashboard-devices`,"aria-label":v(`Devices`),children:[H(`div`,{class:`dashboard-heading`,children:[H(`h3`,{children:v(`Devices`)}),H(`button`,{class:`btn btn-sm btn-default`,onClick:()=>b({type:`changes`}),children:[H(U,{name:`clock`}),` `,v(`Recent Changes`)]})]}),f&&H(Ri,{device:f,state:n,session:r,isLocalDevice:!0,usesMetricRates:u,toggleUnits:y,onAction:b}),H(`div`,{class:`dashboard-remotes`,children:[h.map(([e,t])=>H(`div`,{children:[e&&H(`h4`,{children:[e,t.length>1?` (`+t.length+`)`:``]}),H(`div`,{class:`panel-group`,children:t.map(e=>H(Ri,{device:e,state:n,session:r,usesMetricRates:u,toggleUnits:y,onAction:b},e.deviceID))})]},e)),H(`div`,{class:`action-row`,children:[p.some(e=>!e.paused)&&H(`button`,{class:`btn btn-sm btn-default`,onClick:()=>tt(()=>r.setPaused(`devices`,void 0,!0),r.reportError),children:v(`Pause All`)}),p.some(e=>e.paused)&&H(`button`,{class:`btn btn-sm btn-default`,onClick:()=>tt(()=>r.setPaused(`devices`,void 0,!1),r.reportError),children:v(`Resume All`)}),H(`button`,{class:`btn btn-sm btn-default`,onClick:()=>b({type:`add-device`}),children:v(`Add Remote Device`)})]})]})]})]}),H(`section`,{id:`dashboard-conflicts`,class:`tab-pane ${o===`conflicts`?`active`:``}`,role:`tabpanel`,"aria-labelledby":`conflicts-tab`,children:H(Mo,{api:e,hostActions:Ro||window.syncshellHostActions||null,device:n.system.myID,folders:n.config.folders,ready:n.ready,active:o===`conflicts`})}),H(`section`,{id:`dashboard-notifications`,class:`tab-pane notifications ${o===`notifications`?`active`:``}`,role:`tabpanel`,"aria-labelledby":`notifications-tab`,children:H(Ui,{cards:g,session:r,onAction:b})})]})]})]}):H(zi,{api:e})}),c&&H(ho,{action:c,state:n,api:e,session:r,onClose:()=>l(null)},c.type+(c.device?.deviceID||c.folder?.id||``)),Un(n)&&H(Kn,{api:e,session:r,state:n,consent:!0,onClose:()=>{}})]})}fe(H(zo,{}),document.getElementById(`app`)); \ No newline at end of file diff --git a/webui/gui/syncshell-modern/assets/compiled/index-Dm9fw6Co.css b/webui/gui/syncshell-modern/assets/compiled/index-Dm9fw6Co.css deleted file mode 100644 index 2417470..0000000 --- a/webui/gui/syncshell-modern/assets/compiled/index-Dm9fw6Co.css +++ /dev/null @@ -1 +0,0 @@ -.conflict-review{--review-action-width:230px;max-width:1500px}html:lang(de) .conflict-review{--review-action-width:300px}.review-tools{flex-wrap:wrap;align-items:center;gap:8px;margin:16px 0 8px;display:flex}.review-tools .form-control{width:auto;min-width:0}.review-tools .review-search{flex:0 320px}.review-message{overflow-wrap:anywhere;font-size:14px}.review-message:empty{display:none}.review-table{width:100%;margin-top:12px}.review-column-headings,.review-table>tbody>.review-row{grid-template-columns:minmax(130px, .85fr) minmax(180px, 1.1fr) minmax(210px, 1.3fr) var(--review-action-width);align-items:start;display:grid}.review-table>tbody>tr>td{border-top:0;min-width:0;padding:6px 12px;font-size:14px}.review-path{text-overflow:ellipsis;white-space:nowrap;text-align:left;direction:rtl;display:block;overflow:hidden}.review-cell-label{margin-bottom:8px;font-size:14px;font-weight:400;display:block}.review-file{align-items:baseline;gap:5px;min-width:0;max-width:100%;display:flex}.review-file .icon-fixed{flex:0 0 1.25em}.review-filename{text-overflow:ellipsis;white-space:nowrap;min-width:0;display:block;overflow:hidden}.review-file-meta{margin:2px 0 0;font-size:12px;display:block}.review-version{text-overflow:ellipsis;white-space:nowrap;width:100%;min-width:0;margin-top:4px;overflow:hidden}.review-actions{flex-wrap:wrap;align-items:center;gap:7px;display:flex}.review-actions .form-control{width:100%;min-width:0}.conflict-review .btn{white-space:normal;overflow-wrap:anywhere;max-width:100%;padding:5px 6px;font-size:12px}.review-actions .btn{min-width:0}.conflict-review .review-recheck{min-height:33px;padding:4px 10px;font-size:14px;line-height:20px}@media (max-width:1050px){.review-table>tbody>.review-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.review-context,.review-actions{grid-column:1/-1}.review-path{max-width:100%}.review-actions .form-control{flex:0 250px;width:auto}}@media (max-width:500px){.review-table>tbody>.review-row{grid-template-columns:minmax(0,1fr)}.review-context,.review-actions{grid-column:auto}.review-tools>*,.review-tools .review-search{flex:140px;max-width:100%}.review-table>tbody>tr>td{padding:6px 9px}}.review-design-03,.review-design-03>thead,.review-design-03>tbody{display:block}.review-table>thead>.review-column-headings>th{min-width:0;padding:12px;font-size:14px}.review-mobile-label,.review-design-03 .review-current>.review-cell-label{display:none}@media (max-width:1050px){.review-design-03>thead{display:none}.review-mobile-label{display:inline}.review-design-03 .review-current>.review-cell-label{display:block}}.review-design-03 .review-version{margin-top:0}.review-missing-hint{overflow-wrap:anywhere}.review-missing-hint .review-filename{vertical-align:bottom;max-width:100%;display:inline-block}.review-conflict-meta{flex-wrap:wrap;align-items:center;gap:6px;display:flex}.conflict-review .review-autoresolve{padding:1px 5px}.review-confirm-path{overflow-wrap:anywhere}.port-tooltip{background:0 0;border:0;max-width:calc(100vw - 16px);margin:0;position:fixed;inset:auto;overflow:visible}.port-tooltip:not(:popover-open){display:none}.port-dialog{text-align:start;color:inherit;background:0 0;border:0;width:600px;max-width:calc(100vw - 20px);max-height:calc(100vh - 60px);margin:0 auto;padding:0;position:fixed;inset:30px 0 auto}.port-dialog.large{width:900px}.port-dialog.expandable .modal-content{flex-direction:column;max-height:calc(100vh - 60px);display:flex}.port-dialog.expandable .modal-header{align-items:center;gap:12px;display:flex}.port-dialog.expandable .modal-title{flex:1;min-width:0}.modal-header-actions{flex:none;gap:5px;display:flex}.modal-header-actions .btn{margin:0}.port-dialog.expandable .modal-body{min-height:0;overflow:auto}.port-dialog.full-view{width:calc(100vw - 20px);max-width:none;height:calc(100vh - 20px);max-height:none;top:10px}.port-dialog.full-view .modal-content{height:100%;max-height:none}@media (max-width:767px){.port-dialog{max-height:calc(100vh - 20px);top:10px}}@media (min-width:1400px){.dashboard-primary.active{grid-template-columns:minmax(0,1fr) minmax(0,2fr);column-gap:24px;max-width:1395px}.dashboard-devices{grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start;column-gap:24px;display:grid}.dashboard-devices>.dashboard-heading{grid-column:1/-1}}.dashboard-heading{align-items:center;gap:12px;display:flex}.dashboard-heading h3{flex:1;min-width:0}table.table-condensed.recent-changes-table{table-layout:fixed;min-width:760px}.recent-changes-table :is(th,td){white-space:nowrap;padding-left:14px;padding-right:14px}.recent-changes-table .recent-device{width:110px}.recent-changes-table .recent-action{width:100px}.recent-changes-table .recent-type{width:70px}.recent-changes-table .recent-folder{width:120px}.recent-changes-table .recent-time{width:185px}.recent-changes-table td:nth-child(5){text-align:left;direction:rtl}.recent-changes-table .folder-tail{text-align:left;max-width:100%;display:block}.port-version-filters{flex-wrap:wrap;gap:12px;margin-bottom:12px;display:flex}.port-version-filters label{flex:180px;min-width:0}.port-version-group{margin-top:12px}.port-version-group summary{overflow-wrap:anywhere;font-size:16px}.port-version-row{flex-wrap:wrap;align-items:center;gap:12px;padding:6px 12px;font-size:14px;display:flex}.port-version-row>*{flex:220px;min-width:0}.port-items .folder-text{vertical-align:middle;max-width:calc(100% - 36px);display:inline-block}.port-xattr-rule{align-items:center;gap:8px;margin-bottom:8px;display:flex}.port-xattr-rule .form-control{min-width:0}.port-share-text{white-space:pre-wrap;overflow-wrap:anywhere}.port-about-paths code{white-space:normal;overflow-wrap:anywhere} diff --git a/webui/gui/syncshell-modern/assets/compiled/index-tmSTW1eB.css b/webui/gui/syncshell-modern/assets/compiled/index-tmSTW1eB.css new file mode 100644 index 0000000..cf71da4 --- /dev/null +++ b/webui/gui/syncshell-modern/assets/compiled/index-tmSTW1eB.css @@ -0,0 +1 @@ +@layer vendor{html{-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;font-family:sans-serif}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{vertical-align:baseline;display:inline-block}audio:not([controls]){height:0;display:none}[hidden],template{display:none}a{background-color:#0000}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner{border:0;padding:0}input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button{height:auto}input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button{-webkit-appearance:none}input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}*,:before,:after{box-sizing:border-box}html{-webkit-tap-highlight-color:#0000;font-size:10px}body{color:#222;background-color:#fff;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:16px;line-height:1.5}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#3498db;text-decoration:none}a:hover,a:focus{color:#1d6fa5;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.img-responsive,.thumbnail>img,.thumbnail a>img{max-width:100%;height:auto;display:block}.img-rounded{border-radius:3px}.img-thumbnail{-o-transition:all .2s ease-in-out;background-color:#fff;border:1px solid #ddd;border-radius:2px;max-width:100%;height:auto;padding:4px;line-height:1.5;transition:all .2s ease-in-out;display:inline-block}.img-circle{border-radius:50%}hr{border:0;border-top:1px solid #eee;margin-top:24px;margin-bottom:24px}.sr-only{clip:rect(0, 0, 0, 0);border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.sr-only-focusable:active,.sr-only-focusable:focus{clip:auto;width:auto;height:auto;margin:0;position:static;overflow:visible}[role=button]{cursor:pointer}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{color:inherit;font-family:inherit;font-weight:500;line-height:1.1}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small,.h1 .small,.h2 .small,.h3 .small,.h4 .small,.h5 .small,.h6 .small{color:#777;font-weight:400;line-height:1}h1,.h1,h2,.h2,h3,.h3{margin-top:24px;margin-bottom:12px}h1 small,.h1 small,h2 small,.h2 small,h3 small,.h3 small,h1 .small,.h1 .small,h2 .small,.h2 .small,h3 .small,.h3 .small{font-size:65%}h4,.h4,h5,.h5,h6,.h6{margin-top:12px;margin-bottom:12px}h4 small,.h4 small,h5 small,.h5 small,h6 small,.h6 small,h4 .small,.h4 .small,h5 .small,.h5 .small,h6 .small,.h6 .small{font-size:75%}h1,.h1{font-size:41px}h2,.h2{font-size:34px}h3,.h3{font-size:28px}h4,.h4{font-size:20px}h5,.h5{font-size:16px}h6,.h6{font-size:14px}p{margin:0 0 12px}.lead{margin-bottom:24px;font-size:18px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:24px}}small,.small{font-size:87%}mark,.mark{background-color:#f1c40f;padding:.2em}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#3498db}a.text-primary:hover,a.text-primary:focus{color:#217dbb}.text-success{color:#29b74e}a.text-success:hover,a.text-success:focus{color:#208e3c}.text-info{color:#7a48a3}a.text-info:hover,a.text-info:focus{color:#5f3880}.text-warning{color:#da8f0d}a.text-warning:hover,a.text-warning:focus{color:#aa6f0a}.text-danger{color:#e42533}a.text-danger:hover,a.text-danger:focus{color:#bf1824}.bg-primary{color:#fff;background-color:#3498db}a.bg-primary:hover,a.bg-primary:focus{background-color:#217dbb}.bg-success{background-color:#2ecc71}a.bg-success:hover,a.bg-success:focus{background-color:#25a25a}.bg-info{background-color:#9b59b6}a.bg-info:hover,a.bg-info:focus{background-color:#804399}.bg-warning{background-color:#f1c40f}a.bg-warning:hover,a.bg-warning:focus{background-color:#c29d0b}.bg-danger{background-color:#e74c3c}a.bg-danger:hover,a.bg-danger:focus{background-color:#d62c1a}.page-header{border-bottom:1px solid #eee;margin:48px 0 24px;padding-bottom:11px}ul,ol{margin-top:0;margin-bottom:12px}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{margin-left:-5px;padding-left:0;list-style:none}.list-inline>li{padding-left:5px;padding-right:5px;display:inline-block}dl{margin-top:0;margin-bottom:24px}dt,dd{line-height:1.5}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap;width:160px;overflow:hidden}.dl-horizontal dd{margin-left:180px}}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #777}.initialism{text-transform:uppercase;font-size:90%}blockquote{border-left:5px solid #eee;margin:0 0 24px;padding:12px 24px;font-size:20px}blockquote p:last-child,blockquote ul:last-child,blockquote ol:last-child{margin-bottom:0}blockquote footer,blockquote small,blockquote .small{color:#777;font-size:80%;line-height:1.5;display:block}blockquote footer:before,blockquote small:before,blockquote .small:before{content:"— "}.blockquote-reverse,blockquote.pull-right{text-align:right;border-left:0;border-right:5px solid #eee;padding-left:0;padding-right:15px}.blockquote-reverse footer:before,blockquote.pull-right footer:before,.blockquote-reverse small:before,blockquote.pull-right small:before,.blockquote-reverse .small:before,blockquote.pull-right .small:before{content:""}.blockquote-reverse footer:after,blockquote.pull-right footer:after,.blockquote-reverse small:after,blockquote.pull-right small:after,.blockquote-reverse .small:after,blockquote.pull-right .small:after{content:" —"}address{margin-bottom:24px;font-style:normal;line-height:1.5}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,Courier New,monospace}code{color:#c7254e;background-color:#f9f2f4;border-radius:2px;padding:2px 4px;font-size:90%}kbd{color:#fff;background-color:#333;border-radius:1px;padding:2px 4px;font-size:90%;box-shadow:inset 0 -1px #00000040}kbd kbd{-webkit-box-shadow:none;box-shadow:none;padding:0;font-size:100%;font-weight:700}pre{word-break:break-all;word-wrap:break-word;color:#333;background-color:#f5f5f5;border:1px solid #ccc;border-radius:2px;margin:0 0 12px;padding:11.5px;font-size:15px;line-height:1.5;display:block}pre code{font-size:inherit;color:inherit;white-space:pre-wrap;background-color:#0000;border-radius:0;padding:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{margin-left:auto;margin-right:auto;padding-left:15px;padding-right:15px}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{margin-left:auto;margin-right:auto;padding-left:15px;padding-right:15px}.row{margin-left:-15px;margin-right:-15px}.col-xs-1,.col-sm-1,.col-md-1,.col-lg-1,.col-xs-2,.col-sm-2,.col-md-2,.col-lg-2,.col-xs-3,.col-sm-3,.col-md-3,.col-lg-3,.col-xs-4,.col-sm-4,.col-md-4,.col-lg-4,.col-xs-5,.col-sm-5,.col-md-5,.col-lg-5,.col-xs-6,.col-sm-6,.col-md-6,.col-lg-6,.col-xs-7,.col-sm-7,.col-md-7,.col-lg-7,.col-xs-8,.col-sm-8,.col-md-8,.col-lg-8,.col-xs-9,.col-sm-9,.col-md-9,.col-lg-9,.col-xs-10,.col-sm-10,.col-md-10,.col-lg-10,.col-xs-11,.col-sm-11,.col-md-11,.col-lg-11,.col-xs-12,.col-sm-12,.col-md-12,.col-lg-12{min-height:1px;padding-left:15px;padding-right:15px;position:relative}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.6667%}.col-xs-10{width:83.3333%}.col-xs-9{width:75%}.col-xs-8{width:66.6667%}.col-xs-7{width:58.3333%}.col-xs-6{width:50%}.col-xs-5{width:41.6667%}.col-xs-4{width:33.3333%}.col-xs-3{width:25%}.col-xs-2{width:16.6667%}.col-xs-1{width:8.33333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.6667%}.col-xs-pull-10{right:83.3333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.6667%}.col-xs-pull-7{right:58.3333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.6667%}.col-xs-pull-4{right:33.3333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.6667%}.col-xs-pull-1{right:8.33333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.6667%}.col-xs-push-10{left:83.3333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.6667%}.col-xs-push-7{left:58.3333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.6667%}.col-xs-push-4{left:33.3333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.6667%}.col-xs-push-1{left:8.33333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.6667%}.col-xs-offset-10{margin-left:83.3333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.6667%}.col-xs-offset-7{margin-left:58.3333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.6667%}.col-xs-offset-4{margin-left:33.3333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.6667%}.col-xs-offset-1{margin-left:8.33333%}.col-xs-offset-0{margin-left:0%}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.6667%}.col-sm-10{width:83.3333%}.col-sm-9{width:75%}.col-sm-8{width:66.6667%}.col-sm-7{width:58.3333%}.col-sm-6{width:50%}.col-sm-5{width:41.6667%}.col-sm-4{width:33.3333%}.col-sm-3{width:25%}.col-sm-2{width:16.6667%}.col-sm-1{width:8.33333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.6667%}.col-sm-pull-10{right:83.3333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.6667%}.col-sm-pull-7{right:58.3333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.6667%}.col-sm-pull-4{right:33.3333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.6667%}.col-sm-pull-1{right:8.33333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.6667%}.col-sm-push-10{left:83.3333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.6667%}.col-sm-push-7{left:58.3333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.6667%}.col-sm-push-4{left:33.3333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.6667%}.col-sm-push-1{left:8.33333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.6667%}.col-sm-offset-10{margin-left:83.3333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.6667%}.col-sm-offset-7{margin-left:58.3333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.6667%}.col-sm-offset-4{margin-left:33.3333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.6667%}.col-sm-offset-1{margin-left:8.33333%}.col-sm-offset-0{margin-left:0%}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.6667%}.col-md-10{width:83.3333%}.col-md-9{width:75%}.col-md-8{width:66.6667%}.col-md-7{width:58.3333%}.col-md-6{width:50%}.col-md-5{width:41.6667%}.col-md-4{width:33.3333%}.col-md-3{width:25%}.col-md-2{width:16.6667%}.col-md-1{width:8.33333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.6667%}.col-md-pull-10{right:83.3333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.6667%}.col-md-pull-7{right:58.3333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.6667%}.col-md-pull-4{right:33.3333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.6667%}.col-md-pull-1{right:8.33333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.6667%}.col-md-push-10{left:83.3333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.6667%}.col-md-push-7{left:58.3333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.6667%}.col-md-push-4{left:33.3333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.6667%}.col-md-push-1{left:8.33333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.6667%}.col-md-offset-10{margin-left:83.3333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.6667%}.col-md-offset-7{margin-left:58.3333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.6667%}.col-md-offset-4{margin-left:33.3333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.6667%}.col-md-offset-1{margin-left:8.33333%}.col-md-offset-0{margin-left:0%}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.6667%}.col-lg-10{width:83.3333%}.col-lg-9{width:75%}.col-lg-8{width:66.6667%}.col-lg-7{width:58.3333%}.col-lg-6{width:50%}.col-lg-5{width:41.6667%}.col-lg-4{width:33.3333%}.col-lg-3{width:25%}.col-lg-2{width:16.6667%}.col-lg-1{width:8.33333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.6667%}.col-lg-pull-10{right:83.3333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.6667%}.col-lg-pull-7{right:58.3333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.6667%}.col-lg-pull-4{right:33.3333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.6667%}.col-lg-pull-1{right:8.33333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.6667%}.col-lg-push-10{left:83.3333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.6667%}.col-lg-push-7{left:58.3333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.6667%}.col-lg-push-4{left:33.3333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.6667%}.col-lg-push-1{left:8.33333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.6667%}.col-lg-offset-10{margin-left:83.3333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.6667%}.col-lg-offset-7{margin-left:58.3333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.6667%}.col-lg-offset-4{margin-left:33.3333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.6667%}.col-lg-offset-1{margin-left:8.33333%}.col-lg-offset-0{margin-left:0%}}table{background-color:#0000}caption{color:#777;text-align:left;padding-top:8px;padding-bottom:8px}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:24px}.table>thead>tr>th,.table>tbody>tr>th,.table>tfoot>tr>th,.table>thead>tr>td,.table>tbody>tr>td,.table>tfoot>tr>td{vertical-align:top;border-top:1px solid #ddd;padding:8px;line-height:1.5}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>th,.table>caption+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>td,.table>thead:first-child>tr:first-child>td{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>thead>tr>th,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>tbody>tr>td,.table-condensed>tfoot>tr>td{padding:2px}.table-bordered,.table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>thead>tr>td{border-bottom-width:2px}.section-stripe,.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{float:none;display:table-column;position:static}table td[class*=col-],table th[class*=col-]{float:none;display:table-cell;position:static}.table>thead>tr>td.active,.table>tbody>tr>td.active,.table>tfoot>tr>td.active,.table>thead>tr>th.active,.table>tbody>tr>th.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>tbody>tr.active>td,.table>tfoot>tr.active>td,.table>thead>tr.active>th,.table>tbody>tr.active>th,.table>tfoot>tr.active>th{background-color:#f5f5f5}.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover,.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr.active:hover>th{background-color:#e8e8e8}.table>thead>tr>td.success,.table>tbody>tr>td.success,.table>tfoot>tr>td.success,.table>thead>tr>th.success,.table>tbody>tr>th.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>tbody>tr.success>td,.table>tfoot>tr.success>td,.table>thead>tr.success>th,.table>tbody>tr.success>th,.table>tfoot>tr.success>th{background-color:#2ecc71}.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover,.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr.success:hover>th{background-color:#29b765}.table>thead>tr>td.info,.table>tbody>tr>td.info,.table>tfoot>tr>td.info,.table>thead>tr>th.info,.table>tbody>tr>th.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>tbody>tr.info>td,.table>tfoot>tr.info>td,.table>thead>tr.info>th,.table>tbody>tr.info>th,.table>tfoot>tr.info>th{background-color:#9b59b6}.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover,.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr.info:hover>th{background-color:#8f4bab}.table>thead>tr>td.warning,.table>tbody>tr>td.warning,.table>tfoot>tr>td.warning,.table>thead>tr>th.warning,.table>tbody>tr>th.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>tbody>tr.warning>td,.table>tfoot>tr.warning>td,.table>thead>tr.warning>th,.table>tbody>tr.warning>th,.table>tfoot>tr.warning>th{background-color:#f1c40f}.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover,.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr.warning:hover>th{background-color:#dab10d}.table>thead>tr>td.danger,.table>tbody>tr>td.danger,.table>tfoot>tr>td.danger,.table>thead>tr>th.danger,.table>tbody>tr>th.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>tbody>tr.danger>td,.table>tfoot>tr.danger>td,.table>thead>tr.danger>th,.table>tbody>tr.danger>th,.table>tfoot>tr.danger>th{background-color:#e74c3c}.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover,.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr.danger:hover>th{background-color:#e43725}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd;width:100%;margin-bottom:18px;overflow-y:hidden}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>thead>tr>th,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tfoot>tr>td{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}}fieldset{border:0;min-width:0;margin:0;padding:0}legend{width:100%;font-size:24px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5;margin-bottom:24px;padding:0;display:block}label{max-width:100%;margin-bottom:5px;font-weight:700;display:inline-block}input[type=search]{box-sizing:border-box}input[type=radio],input[type=checkbox]{margin:4px 0 0;margin-top:1px \9 ;line-height:normal}input[type=file]{display:block}input[type=range]{width:100%;display:block}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=radio]:focus,input[type=checkbox]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{color:#555;padding-top:7px;font-size:16px;line-height:1.5;display:block}.form-control{color:#555;-o-transition:border-color ease-in-out .15s, box-shadow ease-in-out .15s;-webkit-transition:border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:2px;width:100%;height:38px;padding:6px 12px;font-size:16px;line-height:1.5;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;display:block;box-shadow:inset 0 1px 1px #00000013}.form-control:focus{border-color:#66afe9;outline:0;box-shadow:inset 0 1px 1px #00000013,0 0 8px #66afe999}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-placeholder-shown{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:#0000;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{opacity:1;background-color:#eee}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=time].form-control,input[type=datetime-local].form-control,input[type=month].form-control{line-height:38px}input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm,.input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month]{line-height:33px}input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg,.input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month]{line-height:49px}}.form-group{margin-bottom:15px}.radio,.checkbox{margin-top:10px;margin-bottom:10px;display:block;position:relative}.radio label,.checkbox label{cursor:pointer;min-height:24px;margin-bottom:0;padding-left:20px;font-weight:400}.radio input[type=radio],.radio-inline input[type=radio],.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox]{margin-left:-20px;margin-top:4px \9 ;position:absolute}.radio+.radio,.checkbox+.checkbox{margin-top:-5px}.radio-inline,.checkbox-inline{vertical-align:middle;cursor:pointer;margin-bottom:0;padding-left:20px;font-weight:400;display:inline-block;position:relative}.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline{margin-top:0;margin-left:10px}input[type=radio][disabled],input[type=checkbox][disabled],input[type=radio].disabled,input[type=checkbox].disabled,fieldset[disabled] input[type=radio],fieldset[disabled] input[type=checkbox],.radio-inline.disabled,.checkbox-inline.disabled,fieldset[disabled] .radio-inline,fieldset[disabled] .checkbox-inline,.radio.disabled label,.checkbox.disabled label,fieldset[disabled] .radio label,fieldset[disabled] .checkbox label{cursor:not-allowed}.form-control-static{min-height:40px;margin-bottom:0;padding-top:7px;padding-bottom:7px}.form-control-static.input-lg,.form-control-static.input-sm{padding-left:0;padding-right:0}.input-sm{border-radius:1px;height:33px;padding:5px 10px;font-size:14px;line-height:1.5}select.input-sm{height:33px;line-height:33px}textarea.input-sm,select[multiple].input-sm{height:auto}.form-group-sm .form-control{border-radius:1px;height:33px;padding:5px 10px;font-size:14px;line-height:1.5}.form-group-sm select.form-control{height:33px;line-height:33px}.form-group-sm textarea.form-control,.form-group-sm select[multiple].form-control{height:auto}.form-group-sm .form-control-static{height:33px;min-height:38px;padding:6px 10px;font-size:14px;line-height:1.5}.input-lg{border-radius:3px;height:49px;padding:10px 16px;font-size:20px;line-height:1.33333}select.input-lg{height:49px;line-height:49px}textarea.input-lg,select[multiple].input-lg{height:auto}.form-group-lg .form-control{border-radius:3px;height:49px;padding:10px 16px;font-size:20px;line-height:1.33333}.form-group-lg select.form-control{height:49px;line-height:49px}.form-group-lg textarea.form-control,.form-group-lg select[multiple].form-control{height:auto}.form-group-lg .form-control-static{height:49px;min-height:44px;padding:11px 16px;font-size:20px;line-height:1.33333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:47.5px}.form-control-feedback{z-index:2;text-align:center;pointer-events:none;width:38px;height:38px;line-height:38px;display:block;position:absolute;top:0;right:0}.input-lg+.form-control-feedback,.input-group-lg+.form-control-feedback,.form-group-lg .form-control+.form-control-feedback{width:49px;height:49px;line-height:49px}.input-sm+.form-control-feedback,.input-group-sm+.form-control-feedback,.form-group-sm .form-control+.form-control-feedback{width:33px;height:33px;line-height:33px}.has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline,.has-success.radio label,.has-success.checkbox label,.has-success.radio-inline label,.has-success.checkbox-inline label{color:#29b74e}.has-success .form-control{border-color:#29b74e;box-shadow:inset 0 1px 1px #00000013}.has-success .form-control:focus{border-color:#208e3c;box-shadow:inset 0 1px 1px #00000013,0 0 6px #69dd87}.has-success .input-group-addon{color:#29b74e;background-color:#2ecc71;border-color:#29b74e}.has-success .form-control-feedback{color:#29b74e}.has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio-inline,.has-warning .checkbox-inline,.has-warning.radio label,.has-warning.checkbox label,.has-warning.radio-inline label,.has-warning.checkbox-inline label{color:#da8f0d}.has-warning .form-control{border-color:#da8f0d;box-shadow:inset 0 1px 1px #00000013}.has-warning .form-control:focus{border-color:#aa6f0a;box-shadow:inset 0 1px 1px #00000013,0 0 6px #f5bb57}.has-warning .input-group-addon{color:#da8f0d;background-color:#f1c40f;border-color:#da8f0d}.has-warning .form-control-feedback{color:#da8f0d}.has-error .help-block,.has-error .control-label,.has-error .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline,.has-error.radio label,.has-error.checkbox label,.has-error.radio-inline label,.has-error.checkbox-inline label{color:#e42533}.has-error .form-control{border-color:#e42533;box-shadow:inset 0 1px 1px #00000013}.has-error .form-control:focus{border-color:#bf1824;box-shadow:inset 0 1px 1px #00000013,0 0 6px #ef8088}.has-error .input-group-addon{color:#e42533;background-color:#e74c3c;border-color:#e42533}.has-error .form-control-feedback{color:#e42533}.has-feedback label~.form-control-feedback{top:29px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{color:#626262;margin-top:5px;margin-bottom:10px;display:block}@media (min-width:768px){.form-inline .form-group{vertical-align:middle;margin-bottom:0;display:inline-block}.form-inline .form-control{vertical-align:middle;width:auto;display:inline-block}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{vertical-align:middle;display:inline-table}.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn,.form-inline .input-group .form-control{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{vertical-align:middle;margin-bottom:0}.form-inline .radio,.form-inline .checkbox{vertical-align:middle;margin-top:0;margin-bottom:0;display:inline-block}.form-inline .radio label,.form-inline .checkbox label{padding-left:0}.form-inline .radio input[type=radio],.form-inline .checkbox input[type=checkbox]{margin-left:0;position:relative}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .radio,.form-horizontal .checkbox,.form-horizontal .radio-inline,.form-horizontal .checkbox-inline{margin-top:0;margin-bottom:0;padding-top:7px}.form-horizontal .radio,.form-horizontal .checkbox{min-height:31px}.form-horizontal .form-group{margin-left:-15px;margin-right:-15px}@media (min-width:768px){.form-horizontal .control-label{text-align:right;margin-bottom:0;padding-top:7px}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:20px}.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:14px}}.btn{text-align:center;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;white-space:nowrap;-webkit-user-select:none;user-select:none;background-image:none;border:1px solid #0000;border-radius:2px;margin-bottom:0;padding:6px 12px;font-size:16px;font-weight:400;line-height:1.5;display:inline-block}.btn:focus,.btn:active:focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn.active.focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus,.btn.focus{color:#333;text-decoration:none}.btn:active,.btn.active{background-image:none;outline:0;box-shadow:inset 0 3px 5px #00000020}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default:focus,.btn-default.focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default:hover,.btn-default:active,.btn-default.active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default:active:hover,.btn-default.active:hover,.open>.dropdown-toggle.btn-default:hover,.btn-default:active:focus,.btn-default.active:focus,.open>.dropdown-toggle.btn-default:focus,.btn-default:active.focus,.btn-default.active.focus,.open>.dropdown-toggle.btn-default.focus{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default:active,.btn-default.active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover,.btn-default.disabled:focus,.btn-default[disabled]:focus,fieldset[disabled] .btn-default:focus,.btn-default.disabled.focus,.btn-default[disabled].focus,fieldset[disabled] .btn-default.focus{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#3498db;border-color:#258cd1}.btn-primary:focus,.btn-primary.focus{color:#fff;background-color:#217dbb;border-color:#124364}.btn-primary:hover,.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#217dbb;border-color:#1c699d}.btn-primary:active:hover,.btn-primary.active:hover,.open>.dropdown-toggle.btn-primary:hover,.btn-primary:active:focus,.btn-primary.active:focus,.open>.dropdown-toggle.btn-primary:focus,.btn-primary:active.focus,.btn-primary.active.focus,.open>.dropdown-toggle.btn-primary.focus{color:#fff;background-color:#1c699d;border-color:#124364}.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled.focus,.btn-primary[disabled].focus,fieldset[disabled] .btn-primary.focus{background-color:#3498db;border-color:#258cd1}.btn-primary .badge{color:#3498db;background-color:#fff}.btn-success{color:#fff;background-color:#2ecc71;border-color:#29b765}.btn-success:focus,.btn-success.focus{color:#fff;background-color:#25a25a;border-color:#124f2c}.btn-success:hover,.btn-success:active,.btn-success.active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#25a25a;border-color:#1e854a}.btn-success:active:hover,.btn-success.active:hover,.open>.dropdown-toggle.btn-success:hover,.btn-success:active:focus,.btn-success.active:focus,.open>.dropdown-toggle.btn-success:focus,.btn-success:active.focus,.btn-success.active.focus,.open>.dropdown-toggle.btn-success.focus{color:#fff;background-color:#1e854a;border-color:#124f2c}.btn-success:active,.btn-success.active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled:hover,.btn-success[disabled]:hover,fieldset[disabled] .btn-success:hover,.btn-success.disabled:focus,.btn-success[disabled]:focus,fieldset[disabled] .btn-success:focus,.btn-success.disabled.focus,.btn-success[disabled].focus,fieldset[disabled] .btn-success.focus{background-color:#2ecc71;border-color:#29b765}.btn-success .badge{color:#2ecc71;background-color:#fff}.btn-info{color:#fff;background-color:#9b59b6;border-color:#8f4bab}.btn-info:focus,.btn-info.focus{color:#fff;background-color:#804399;border-color:#452452}.btn-info:hover,.btn-info:active,.btn-info.active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#804399;border-color:#6b3880}.btn-info:active:hover,.btn-info.active:hover,.open>.dropdown-toggle.btn-info:hover,.btn-info:active:focus,.btn-info.active:focus,.open>.dropdown-toggle.btn-info:focus,.btn-info:active.focus,.btn-info.active.focus,.open>.dropdown-toggle.btn-info.focus{color:#fff;background-color:#6b3880;border-color:#452452}.btn-info:active,.btn-info.active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover,.btn-info.disabled:focus,.btn-info[disabled]:focus,fieldset[disabled] .btn-info:focus,.btn-info.disabled.focus,.btn-info[disabled].focus,fieldset[disabled] .btn-info.focus{background-color:#9b59b6;border-color:#8f4bab}.btn-info .badge{color:#9b59b6;background-color:#fff}.btn-warning{color:#fff;background-color:#f1c40f;border-color:#dab10d}.btn-warning:focus,.btn-warning.focus{color:#fff;background-color:#c29d0b;border-color:#614f06}.btn-warning:hover,.btn-warning:active,.btn-warning.active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#c29d0b;border-color:#a08209}.btn-warning:active:hover,.btn-warning.active:hover,.open>.dropdown-toggle.btn-warning:hover,.btn-warning:active:focus,.btn-warning.active:focus,.open>.dropdown-toggle.btn-warning:focus,.btn-warning:active.focus,.btn-warning.active.focus,.open>.dropdown-toggle.btn-warning.focus{color:#fff;background-color:#a08209;border-color:#614f06}.btn-warning:active,.btn-warning.active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover,.btn-warning.disabled:focus,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning:focus,.btn-warning.disabled.focus,.btn-warning[disabled].focus,fieldset[disabled] .btn-warning.focus{background-color:#f1c40f;border-color:#dab10d}.btn-warning .badge{color:#f1c40f;background-color:#fff}.btn-danger{color:#fff;background-color:#e74c3c;border-color:#e43725}.btn-danger:focus,.btn-danger.focus{color:#fff;background-color:#d62c1a;border-color:#7b190f}.btn-danger:hover,.btn-danger:active,.btn-danger.active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#d62c1a;border-color:#b62516}.btn-danger:active:hover,.btn-danger.active:hover,.open>.dropdown-toggle.btn-danger:hover,.btn-danger:active:focus,.btn-danger.active:focus,.open>.dropdown-toggle.btn-danger:focus,.btn-danger:active.focus,.btn-danger.active.focus,.open>.dropdown-toggle.btn-danger.focus{color:#fff;background-color:#b62516;border-color:#7b190f}.btn-danger:active,.btn-danger.active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover,.btn-danger.disabled:focus,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger:focus,.btn-danger.disabled.focus,.btn-danger[disabled].focus,fieldset[disabled] .btn-danger.focus{background-color:#e74c3c;border-color:#e43725}.btn-danger .badge{color:#e74c3c;background-color:#fff}.btn-link{color:#3498db;border-radius:0;font-weight:400}.btn-link,.btn-link:active,.btn-link.active,.btn-link[disabled],fieldset[disabled] .btn-link{-webkit-box-shadow:none;box-shadow:none;background-color:#0000}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:#0000}.btn-link:hover,.btn-link:focus{color:#1d6fa5;background-color:#0000;text-decoration:underline}.btn-link[disabled]:hover,fieldset[disabled] .btn-link:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:focus{color:#777;text-decoration:none}.btn-lg,.btn-group-lg>.btn{border-radius:3px;padding:10px 16px;font-size:20px;line-height:1.33333}.btn-sm,.btn-group-sm>.btn{border-radius:1px;padding:5px 10px;font-size:14px;line-height:1.5}.btn-xs,.btn-group-xs>.btn{border-radius:1px;padding:1px 5px;font-size:14px;line-height:1.5}.btn-block{width:100%;display:block}.btn-block+.btn-block{margin-top:5px}input[type=submit].btn-block,input[type=reset].btn-block,input[type=button].btn-block{width:100%}.fade{opacity:0;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{-o-transition-property:height, visibility;-o-transition-duration:.35s;-o-transition-timing-function:ease;height:0;transition-property:height,visibility;transition-duration:.35s;transition-timing-function:ease;position:relative;overflow:hidden}.caret{vertical-align:middle;border-top:4px dashed;border-top:4px solid \9 ;border-left:4px solid #0000;border-right:4px solid #0000;width:0;height:0;margin-left:2px;display:inline-block}.dropup,.dropdown{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{z-index:1000;float:left;text-align:left;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #00000026;border-radius:2px;min-width:160px;margin:2px 0 0;padding:5px 0;font-size:16px;list-style:none;display:none;position:absolute;top:100%;left:0;box-shadow:0 6px 12px #0000002d}.dropdown-menu.pull-right{left:auto;right:0}.dropdown-menu .divider{background-color:#e5e5e5;height:1px;margin:11px 0;overflow:hidden}.dropdown-menu>li>a{clear:both;color:#333;white-space:nowrap;padding:3px 20px;font-weight:400;line-height:1.5;display:block}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{color:#262626;background-color:#f5f5f5;text-decoration:none}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;background-color:#3498db;outline:0;text-decoration:none}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#777}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);cursor:not-allowed;background-color:#0000;background-image:none;text-decoration:none}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{left:auto;right:0}.dropdown-menu-left{left:0;right:auto}.dropdown-header{color:#777;white-space:nowrap;padding:3px 20px;font-size:14px;line-height:1.5;display:block}.dropdown-backdrop{z-index:990;position:fixed;inset:0}.pull-right>.dropdown-menu{left:auto;right:0}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px dashed;border-bottom:4px solid \9 ;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{margin-bottom:2px;top:auto;bottom:100%}@media (min-width:768px){.navbar-right .dropdown-menu{left:auto;right:0}.navbar-right .dropdown-menu-left{left:0;right:auto}}.btn-group,.btn-group-vertical{vertical-align:middle;display:inline-block;position:relative}.btn-group>.btn,.btn-group-vertical>.btn{float:left;position:relative}.btn-group>.btn:hover,.btn-group-vertical>.btn:hover,.btn-group>.btn:focus,.btn-group-vertical>.btn:focus,.btn-group>.btn:active,.btn-group-vertical>.btn:active,.btn-group>.btn.active,.btn-group-vertical>.btn.active{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-left:12px;padding-right:12px}.btn-group.open .dropdown-toggle{box-shadow:inset 0 3px 5px #00000020}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{float:none;width:100%;max-width:100%;display:block}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-radius:2px 2px 0 0}.btn-group-vertical>.btn:last-child:not(:first-child){border-radius:0 0 2px 2px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{table-layout:fixed;border-collapse:separate;width:100%;display:table}.btn-group-justified>.btn,.btn-group-justified>.btn-group{float:none;width:1%;display:table-cell}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=radio],[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox]{clip:rect(0, 0, 0, 0);pointer-events:none;position:absolute}.input-group{border-collapse:separate;display:table;position:relative}.input-group[class*=col-]{float:none;padding-left:0;padding-right:0}.input-group .form-control{z-index:2;float:left;width:100%;margin-bottom:0;position:relative}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{border-radius:3px;height:49px;padding:10px 16px;font-size:20px;line-height:1.33333}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:49px;line-height:49px}textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn,select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{border-radius:1px;height:33px;padding:5px 10px;font-size:14px;line-height:1.5}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:33px;line-height:33px}textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn,select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{white-space:nowrap;vertical-align:middle;width:1%}.input-group-addon{color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:2px;padding:6px 12px;font-size:16px;font-weight:400;line-height:1}.input-group-addon.input-sm{border-radius:1px;padding:5px 10px;font-size:14px}.input-group-addon.input-lg{border-radius:3px;padding:10px 16px;font-size:20px}.input-group-addon input[type=radio],.input-group-addon input[type=checkbox]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group-btn:last-child>.btn-group:not(:last-child)>.btn{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:first-child>.btn-group:not(:first-child)>.btn{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{white-space:nowrap;font-size:0;position:relative}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:hover,.input-group-btn>.btn:focus,.input-group-btn>.btn:active{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{margin-bottom:0;padding-left:0;list-style:none}.nav>li{display:block;position:relative}.nav>li>a{padding:10px 15px;display:block;position:relative}.nav>li>a:hover,.nav>li>a:focus{background-color:#eee;text-decoration:none}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:hover,.nav>li.disabled>a:focus{color:#777;cursor:not-allowed;background-color:#0000;text-decoration:none}.nav .open>a,.nav .open>a:hover,.nav .open>a:focus{background-color:#eee;border-color:#3498db}.nav .nav-divider{background-color:#e5e5e5;height:1px;margin:11px 0;overflow:hidden}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{border:1px solid #0000;border-radius:2px 2px 0 0;margin-right:2px;line-height:1.5}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:#0000}.nav-tabs.nav-justified{border-bottom:0;width:100%}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{width:1%;display:table-cell}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{border-radius:2px;margin-right:0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:2px 2px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:2px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:hover,.nav-pills>li.active>a:focus{color:#fff;background-color:#3498db}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{width:1%;display:table-cell}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{border-radius:2px;margin-right:0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:2px 2px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{border-top-left-radius:0;border-top-right-radius:0;margin-top:-1px}.navbar{border:1px solid #0000;min-height:50px;margin-bottom:24px;position:relative}@media (min-width:768px){.navbar{border-radius:2px}.navbar-header{float:left}}.navbar-collapse{-webkit-overflow-scrolling:touch;border-top:1px solid #0000;padding-left:15px;padding-right:15px;overflow-x:visible;box-shadow:inset 0 1px #ffffff1a}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;-webkit-box-shadow:none;box-shadow:none;border-top:0}.navbar-collapse.collapse{padding-bottom:0;height:auto!important;display:block!important;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{padding-left:0;padding-right:0}}.navbar-fixed-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{max-height:200px}}.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-left:-15px;margin-right:-15px}@media (min-width:768px){.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-left:0;margin-right:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-top,.navbar-fixed-bottom{z-index:1030;position:fixed;left:0;right:0}@media (min-width:768px){.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}}.navbar-fixed-top{border-width:0 0 1px;top:0}.navbar-fixed-bottom{border-width:1px 0 0;margin-bottom:0;bottom:0}.navbar-brand{float:left;height:50px;padding:13px 15px;font-size:20px;line-height:24px}.navbar-brand:hover,.navbar-brand:focus{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{float:right;background-color:#0000;background-image:none;border:1px solid #0000;border-radius:2px;margin-top:8px;margin-bottom:8px;margin-right:15px;padding:9px 10px;position:relative}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{border-radius:1px;width:22px;height:2px;display:block}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:6.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:24px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{float:none;width:auto;-webkit-box-shadow:none;box-shadow:none;background-color:#0000;border:0;margin-top:0;position:static}.navbar-nav .open .dropdown-menu>li>a,.navbar-nav .open .dropdown-menu .dropdown-header{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:24px}.navbar-nav .open .dropdown-menu>li>a:hover,.navbar-nav .open .dropdown-menu>li>a:focus{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:13px;padding-bottom:13px}}.navbar-form{border-top:1px solid #0000;border-bottom:1px solid #0000;margin:6px -15px;padding:10px 15px;box-shadow:inset 0 1px #ffffff1a,0 1px #ffffff1a}@media (min-width:768px){.navbar-form .form-group{vertical-align:middle;margin-bottom:0;display:inline-block}.navbar-form .form-control{vertical-align:middle;width:auto;display:inline-block}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{vertical-align:middle;display:inline-table}.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn,.navbar-form .input-group .form-control{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{vertical-align:middle;margin-bottom:0}.navbar-form .radio,.navbar-form .checkbox{vertical-align:middle;margin-top:0;margin-bottom:0;display:inline-block}.navbar-form .radio label,.navbar-form .checkbox label{padding-left:0}.navbar-form .radio input[type=radio],.navbar-form .checkbox input[type=checkbox]{margin-left:0;position:relative}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;-webkit-box-shadow:none;box-shadow:none;border:0;margin-left:0;margin-right:0;padding-top:0;padding-bottom:0}}.navbar-nav>li>.dropdown-menu{border-top-left-radius:0;border-top-right-radius:0;margin-top:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{border-radius:2px 2px 0 0;margin-bottom:0}.navbar-btn{margin-top:6px;margin-bottom:6px}.navbar-btn.btn-sm{margin-top:8.5px;margin-bottom:8.5px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:13px;margin-bottom:13px}@media (min-width:768px){.navbar-text{float:left;margin-left:15px;margin-right:15px}.navbar-left{float:left!important}.navbar-right{margin-right:-15px;float:right!important}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#555}.navbar-default .navbar-brand:hover,.navbar-default .navbar-brand:focus{color:#3b3b3b;background-color:#0000}.navbar-default .navbar-text,.navbar-default .navbar-nav>li>a{color:#555}.navbar-default .navbar-nav>li>a:hover,.navbar-default .navbar-nav>li>a:focus{color:#333;background-color:#0000}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:hover,.navbar-default .navbar-nav>.active>a:focus{color:#333;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:hover,.navbar-default .navbar-nav>.disabled>a:focus{color:#ccc;background-color:#0000}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:hover,.navbar-default .navbar-toggle:focus{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:hover,.navbar-default .navbar-nav>.open>a:focus{color:#333;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#555}.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus{color:#333;background-color:#0000}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus{color:#333;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#ccc;background-color:#0000}}.navbar-default .navbar-link{color:#555}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#555}.navbar-default .btn-link:hover,.navbar-default .btn-link:focus{color:#333}.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:hover,.navbar-default .btn-link[disabled]:focus,fieldset[disabled] .navbar-default .btn-link:focus{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:hover,.navbar-inverse .navbar-brand:focus{color:#fff;background-color:#0000}.navbar-inverse .navbar-text,.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:hover,.navbar-inverse .navbar-nav>li>a:focus{color:#fff;background-color:#0000}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:hover,.navbar-inverse .navbar-nav>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:hover,.navbar-inverse .navbar-nav>.disabled>a:focus{color:#444;background-color:#0000}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:hover,.navbar-inverse .navbar-toggle:focus{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:hover,.navbar-inverse .navbar-nav>.open>a:focus{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus{color:#fff;background-color:#0000}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#444;background-color:#0000}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:hover,.navbar-inverse .btn-link:focus{color:#fff}.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:hover,.navbar-inverse .btn-link[disabled]:focus,fieldset[disabled] .navbar-inverse .btn-link:focus{color:#444}.pagination{border-radius:2px;margin:24px 0;padding-left:0;display:inline-block}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{float:left;color:#3498db;background-color:#fff;border:1px solid #ddd;margin-left:-1px;padding:6px 12px;line-height:1.5;text-decoration:none;position:relative}.pagination>li:first-child>a,.pagination>li:first-child>span{border-top-left-radius:2px;border-bottom-left-radius:2px;margin-left:0}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:2px;border-bottom-right-radius:2px}.pagination>li>a:hover,.pagination>li>span:hover,.pagination>li>a:focus,.pagination>li>span:focus{z-index:2;color:#1d6fa5;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>span,.pagination>.active>a:hover,.pagination>.active>span:hover,.pagination>.active>a:focus,.pagination>.active>span:focus{z-index:3;color:#fff;cursor:default;background-color:#3498db;border-color:#3498db}.pagination>.disabled>span,.pagination>.disabled>span:hover,.pagination>.disabled>span:focus,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:20px;line-height:1.33333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:14px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:1px;border-bottom-left-radius:1px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:1px;border-bottom-right-radius:1px}.pager{text-align:center;margin:24px 0;padding-left:0;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{background-color:#fff;border:1px solid #ddd;border-radius:15px;padding:5px 14px;display:inline-block}.pager li>a:hover,.pager li>a:focus{background-color:#eee;text-decoration:none}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;display:inline}a.label:hover,a.label:focus{color:#fff;cursor:pointer;text-decoration:none}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:hover,.label-default[href]:focus{background-color:#5e5e5e}.label-primary{background-color:#3498db}.label-primary[href]:hover,.label-primary[href]:focus{background-color:#217dbb}.label-success{background-color:#2ecc71}.label-success[href]:hover,.label-success[href]:focus{background-color:#25a25a}.label-info{background-color:#9b59b6}.label-info[href]:hover,.label-info[href]:focus{background-color:#804399}.label-warning{background-color:#f1c40f}.label-warning[href]:hover,.label-warning[href]:focus{background-color:#c29d0b}.label-danger{background-color:#e74c3c}.label-danger[href]:hover,.label-danger[href]:focus{background-color:#d62c1a}.badge{color:#fff;vertical-align:middle;white-space:nowrap;text-align:center;background-color:#777;border-radius:10px;min-width:10px;padding:3px 7px;font-size:14px;font-weight:700;line-height:1;display:inline-block}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-xs .badge,.btn-group-xs>.btn .badge{padding:1px 5px;top:0}a.badge:hover,a.badge:focus{color:#fff;cursor:pointer;text-decoration:none}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#3498db;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.thumbnail{-o-transition:border .2s ease-in-out;background-color:#fff;border:1px solid #ddd;border-radius:2px;margin-bottom:24px;padding:4px;line-height:1.5;transition:border .2s ease-in-out;display:block}.thumbnail>img,.thumbnail a>img{margin-left:auto;margin-right:auto}a.thumbnail:hover,a.thumbnail:focus,a.thumbnail.active{border-color:#3498db}.thumbnail .caption{color:#222;padding:9px}.alert{border:1px solid #0000;border-radius:2px;margin-bottom:24px;padding:15px}.alert h4{color:inherit;margin-top:0}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{color:inherit;position:relative;top:-2px;right:-21px}.alert-success{color:#fff;background-color:#2ecc71;border-color:#29b74e}.alert-success hr{border-top-color:#25a245}.alert-success .alert-link{color:#e6e6e6}.alert-info{color:#fff;background-color:#9b59b6;border-color:#7a48a3}.alert-info hr{border-top-color:#6c4092}.alert-info .alert-link{color:#e6e6e6}.alert-warning{color:#fff;background-color:#f1c40f;border-color:#da8f0d}.alert-warning hr{border-top-color:#c27f0b}.alert-warning .alert-link{color:#e6e6e6}.alert-danger{color:#fff;background-color:#e74c3c;border-color:#e42533}.alert-danger hr{border-top-color:#d61a28}.alert-danger .alert-link{color:#e6e6e6}@keyframes progress-bar-stripes{0%{background-position:40px 0}to{background-position:0 0}}.progress{background-color:#f5f5f5;border-radius:2px;height:24px;margin-bottom:24px;overflow:hidden;box-shadow:inset 0 1px 2px #0000001a}.progress-bar{float:left;color:#fff;text-align:center;-o-transition:width .6s ease;background-color:#3498db;width:0%;height:100%;font-size:14px;line-height:24px;transition:width .6s;box-shadow:inset 0 -1px #00000026}.progress-striped .progress-bar,.progress-bar-striped{-webkit-background-size:40px 40px;background-image:linear-gradient(45deg,#ffffff26 25%,#0000 25% 50%,#ffffff26 50% 75%,#0000 75%,#0000);background-size:40px 40px}.progress.active .progress-bar,.progress-bar.active{animation:2s linear infinite progress-bar-stripes}.progress-bar-success{background-color:#2ecc71}.progress-striped .progress-bar-success{background-image:linear-gradient(45deg,#ffffff26 25%,#0000 25% 50%,#ffffff26 50% 75%,#0000 75%,#0000)}.progress-bar-info{background-color:#9b59b6}.progress-striped .progress-bar-info{background-image:linear-gradient(45deg,#ffffff26 25%,#0000 25% 50%,#ffffff26 50% 75%,#0000 75%,#0000)}.progress-bar-warning{background-color:#f1c40f}.progress-striped .progress-bar-warning{background-image:linear-gradient(45deg,#ffffff26 25%,#0000 25% 50%,#ffffff26 50% 75%,#0000 75%,#0000)}.progress-bar-danger{background-color:#e74c3c}.progress-striped .progress-bar-danger{background-image:linear-gradient(45deg,#ffffff26 25%,#0000 25% 50%,#ffffff26 50% 75%,#0000 75%,#0000)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{zoom:1;overflow:hidden}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-left,.media-right,.media-body{vertical-align:top;display:table-cell}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{margin-bottom:20px;padding-left:0}.list-group-item{background-color:#fff;border:1px solid #ddd;margin-bottom:-1px;padding:10px 15px;display:block;position:relative}.list-group-item:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.list-group-item:last-child{border-bottom-right-radius:2px;border-bottom-left-radius:2px;margin-bottom:0}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:hover,button.list-group-item:hover,a.list-group-item:focus,button.list-group-item:focus{color:#555;background-color:#f5f5f5;text-decoration:none}button.list-group-item{text-align:left;width:100%}.list-group-item.disabled,.list-group-item.disabled:hover,.list-group-item.disabled:focus{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:hover,.list-group-item.active:focus{z-index:2;color:#fff;background-color:#3498db;border-color:#3498db}.list-group-item.active .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>.small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:hover .list-group-item-text,.list-group-item.active:focus .list-group-item-text{color:#e1f0fa}.list-group-item-success{color:#29b74e;background-color:#2ecc71}a.list-group-item-success,button.list-group-item-success{color:#29b74e}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:hover,button.list-group-item-success:hover,a.list-group-item-success:focus,button.list-group-item-success:focus{color:#29b74e;background-color:#29b765}a.list-group-item-success.active,button.list-group-item-success.active,a.list-group-item-success.active:hover,button.list-group-item-success.active:hover,a.list-group-item-success.active:focus,button.list-group-item-success.active:focus{color:#fff;background-color:#29b74e;border-color:#29b74e}.list-group-item-info{color:#7a48a3;background-color:#9b59b6}a.list-group-item-info,button.list-group-item-info{color:#7a48a3}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:hover,button.list-group-item-info:hover,a.list-group-item-info:focus,button.list-group-item-info:focus{color:#7a48a3;background-color:#8f4bab}a.list-group-item-info.active,button.list-group-item-info.active,a.list-group-item-info.active:hover,button.list-group-item-info.active:hover,a.list-group-item-info.active:focus,button.list-group-item-info.active:focus{color:#fff;background-color:#7a48a3;border-color:#7a48a3}.list-group-item-warning{color:#da8f0d;background-color:#f1c40f}a.list-group-item-warning,button.list-group-item-warning{color:#da8f0d}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:hover,button.list-group-item-warning:hover,a.list-group-item-warning:focus,button.list-group-item-warning:focus{color:#da8f0d;background-color:#dab10d}a.list-group-item-warning.active,button.list-group-item-warning.active,a.list-group-item-warning.active:hover,button.list-group-item-warning.active:hover,a.list-group-item-warning.active:focus,button.list-group-item-warning.active:focus{color:#fff;background-color:#da8f0d;border-color:#da8f0d}.list-group-item-danger{color:#e42533;background-color:#e74c3c}a.list-group-item-danger,button.list-group-item-danger{color:#e42533}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:hover,button.list-group-item-danger:hover,a.list-group-item-danger:focus,button.list-group-item-danger:focus{color:#e42533;background-color:#e43725}a.list-group-item-danger.active,button.list-group-item-danger.active,a.list-group-item-danger.active:hover,button.list-group-item-danger.active:hover,a.list-group-item-danger.active:focus,button.list-group-item-danger.active:focus{color:#fff;background-color:#e42533;border-color:#e42533}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{background-color:#fff;border:1px solid #0000;border-radius:2px;margin-bottom:24px;box-shadow:0 1px 1px #0000000d}.panel-body{padding:15px}.panel-heading{border-bottom:1px solid #0000;border-top-left-radius:1px;border-top-right-radius:1px;padding:10px 15px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{color:inherit;margin-top:0;margin-bottom:0;font-size:18px}.panel-title>a,.panel-title>small,.panel-title>.small,.panel-title>small>a,.panel-title>.small>a{color:inherit}.panel-footer{background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:1px;border-bottom-left-radius:1px;padding:10px 15px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:1px;border-top-right-radius:1px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:1px;border-bottom-left-radius:1px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.panel-heading+.list-group .list-group-item:first-child,.list-group+.panel-footer{border-top-width:0}.panel>.table,.panel>.table-responsive>.table,.panel>.panel-collapse>.table{margin-bottom:0}.panel>.table caption,.panel>.table-responsive>.table caption,.panel>.panel-collapse>.table caption{padding-left:15px;padding-right:15px}.panel>.table:first-child,.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child>thead:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child{border-top-left-radius:1px;border-top-right-radius:1px}.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child{border-top-left-radius:1px}.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child{border-top-right-radius:1px}.panel>.table:last-child,.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:1px;border-bottom-left-radius:1px}.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:1px}.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:1px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child th,.panel>.table>tbody:first-child>tr:first-child td{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{border:0;margin-bottom:0}.panel-group{margin-bottom:24px}.panel-group .panel{border-radius:2px;margin-bottom:0}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.panel-body,.panel-group .panel-heading+.panel-collapse>.list-group{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#3498db}.panel-primary>.panel-heading{color:#fff;background-color:#3498db;border-color:#3498db}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#3498db}.panel-primary>.panel-heading .badge{color:#3498db;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#3498db}.panel-success{border-color:#29b74e}.panel-success>.panel-heading{color:#fff;background-color:#2ecc71;border-color:#29b74e}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#29b74e}.panel-success>.panel-heading .badge{color:#2ecc71;background-color:#fff}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#29b74e}.panel-info{border-color:#7a48a3}.panel-info>.panel-heading{color:#fff;background-color:#9b59b6;border-color:#7a48a3}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#7a48a3}.panel-info>.panel-heading .badge{color:#9b59b6;background-color:#fff}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#7a48a3}.panel-warning{border-color:#da8f0d}.panel-warning>.panel-heading{color:#fff;background-color:#f1c40f;border-color:#da8f0d}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#da8f0d}.panel-warning>.panel-heading .badge{color:#f1c40f;background-color:#fff}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#da8f0d}.panel-danger{border-color:#e42533}.panel-danger>.panel-heading{color:#fff;background-color:#e74c3c;border-color:#e42533}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#e42533}.panel-danger>.panel-heading .badge{color:#e74c3c;background-color:#fff}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#e42533}.embed-responsive{height:0;padding:0;display:block;position:relative;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive iframe,.embed-responsive embed,.embed-responsive object,.embed-responsive video{border:0;width:100%;height:100%;position:absolute;top:0;bottom:0;left:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:2px;min-height:20px;margin-bottom:20px;padding:19px;box-shadow:inset 0 1px 1px #0000000d}.well blockquote{border-color:#00000026}.well-lg{border-radius:3px;padding:24px}.well-sm{border-radius:1px;padding:9px}.close{float:right;color:#000;text-shadow:0 1px #fff;opacity:.2;filter:alpha(opacity=20);font-size:24px;font-weight:700;line-height:1}.close:hover,.close:focus{color:#000;cursor:pointer;opacity:.5;filter:alpha(opacity=50);text-decoration:none}button.close{cursor:pointer;-webkit-appearance:none;background:0 0;border:0;padding:0}.modal-open{overflow:hidden}.modal{z-index:1050;-webkit-overflow-scrolling:touch;outline:0;display:none;position:fixed;inset:0;overflow:hidden}.modal.fade .modal-dialog{-o-transition:-o-transform .3s ease-out;-webkit-transition:-webkit-transform .3s ease-out;transition:transform .3s ease-out;transform:translateY(-25%)}.modal.in .modal-dialog{transform:translate(0)}.modal-open .modal{overflow:hidden auto}.modal-dialog{width:auto;margin:10px;position:relative}.modal-content{background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #0003;border-radius:3px;outline:0;position:relative;box-shadow:0 3px 9px #00000080}.modal-backdrop{z-index:1040;background-color:#000;position:fixed;inset:0}.modal-backdrop.fade{opacity:0;filter:alpha(opacity=0)}.modal-backdrop.in{opacity:.5;filter:alpha(opacity=50)}.modal-header{border-bottom:1px solid #e5e5e5;padding:15px}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.5}.modal-body{padding:15px;position:relative}.modal-footer{text-align:right;border-top:1px solid #e5e5e5;padding:15px}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{width:50px;height:50px;position:absolute;top:-9999px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{box-shadow:0 5px 15px #00000080}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{z-index:1070;letter-spacing:normal;line-break:auto;text-align:left;text-align:start;text-shadow:none;text-transform:none;white-space:normal;word-break:normal;word-spacing:normal;word-wrap:normal;opacity:0;filter:alpha(opacity=0);font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:1.5;text-decoration:none;display:block;position:absolute}.tooltip.in{opacity:.9;filter:alpha(opacity=90)}.tooltip.top{margin-top:-3px;padding:5px 0}.tooltip.right{margin-left:3px;padding:0 5px}.tooltip.bottom{margin-top:3px;padding:5px 0}.tooltip.left{margin-left:-3px;padding:0 5px}.tooltip-inner{color:#fff;text-align:center;background-color:#000;border-radius:2px;max-width:200px;padding:3px 8px}.tooltip-arrow{border-style:solid;border-color:#0000;width:0;height:0;position:absolute}.tooltip.top .tooltip-arrow{border-width:5px 5px 0;border-top-color:#000;margin-left:-5px;bottom:0;left:50%}.tooltip.top-left .tooltip-arrow{border-width:5px 5px 0;border-top-color:#000;margin-bottom:-5px;bottom:0;right:5px}.tooltip.top-right .tooltip-arrow{border-width:5px 5px 0;border-top-color:#000;margin-bottom:-5px;bottom:0;left:5px}.tooltip.right .tooltip-arrow{border-width:5px 5px 5px 0;border-right-color:#000;margin-top:-5px;top:50%;left:0}.tooltip.left .tooltip-arrow{border-width:5px 0 5px 5px;border-left-color:#000;margin-top:-5px;top:50%;right:0}.tooltip.bottom .tooltip-arrow{border-width:0 5px 5px;border-bottom-color:#000;margin-left:-5px;top:0;left:50%}.tooltip.bottom-left .tooltip-arrow{border-width:0 5px 5px;border-bottom-color:#000;margin-top:-5px;top:0;right:5px}.tooltip.bottom-right .tooltip-arrow{border-width:0 5px 5px;border-bottom-color:#000;margin-top:-5px;top:0;left:5px}.popover{z-index:1060;letter-spacing:normal;line-break:auto;text-align:left;text-align:start;max-width:276px;text-shadow:none;text-transform:none;white-space:normal;word-break:normal;word-spacing:normal;word-wrap:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #0003;border-radius:3px;padding:1px;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:16px;font-style:normal;font-weight:400;line-height:1.5;text-decoration:none;display:none;position:absolute;top:0;left:0;box-shadow:0 5px 10px #0003}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:2px 2px 0 0;margin:0;padding:8px 14px;font-size:16px}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{border-style:solid;border-color:#0000;width:0;height:0;display:block;position:absolute}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{border-top-color:#00000040;border-bottom-width:0;margin-left:-11px;bottom:-11px;left:50%}.popover.top>.arrow:after{content:" ";border-top-color:#fff;border-bottom-width:0;margin-left:-10px;bottom:1px}.popover.right>.arrow{border-left-width:0;border-right-color:#00000040;margin-top:-11px;top:50%;left:-11px}.popover.right>.arrow:after{content:" ";border-left-width:0;border-right-color:#fff;bottom:-10px;left:1px}.popover.bottom>.arrow{border-top-width:0;border-bottom-color:#00000040;margin-left:-11px;top:-11px;left:50%}.popover.bottom>.arrow:after{content:" ";border-top-width:0;border-bottom-color:#fff;margin-left:-10px;top:1px}.popover.left>.arrow{border-left-color:#00000040;border-right-width:0;margin-top:-11px;top:50%;right:-11px}.popover.left>.arrow:after{content:" ";border-left-color:#fff;border-right-width:0;bottom:-10px;right:1px}.clearfix:before,.clearfix:after,.dl-horizontal dd:before,.dl-horizontal dd:after,.container:before,.container:after,.container-fluid:before,.container-fluid:after,.row:before,.row:after,.form-horizontal .form-group:before,.form-horizontal .form-group:after,.btn-toolbar:before,.btn-toolbar:after,.btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after,.nav:before,.nav:after,.navbar:before,.navbar:after,.navbar-header:before,.navbar-header:after,.navbar-collapse:before,.navbar-collapse:after,.pager:before,.pager:after,.panel-body:before,.panel-body:after,.modal-header:before,.modal-header:after,.modal-footer:before,.modal-footer:after{content:" ";display:table}.clearfix:after,.dl-horizontal dd:after,.container:after,.container-fluid:after,.row:after,.form-horizontal .form-group:after,.btn-toolbar:after,.btn-group-vertical>.btn-group:after,.nav:after,.navbar:after,.navbar-header:after,.navbar-collapse:after,.pager:after,.panel-body:after,.modal-header:after,.modal-footer:after{clear:both}.center-block{margin-left:auto;margin-right:auto;display:block}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:#0000;text-shadow:none;background-color:#0000;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-xs,.visible-sm,.visible-md,.visible-lg,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}th.visible-xs,td.visible-xs{display:table-cell!important}.visible-xs-block{display:block!important}.visible-xs-inline{display:inline!important}.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}th.visible-sm,td.visible-sm{display:table-cell!important}.visible-sm-block{display:block!important}.visible-sm-inline{display:inline!important}.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}th.visible-md,td.visible-md{display:table-cell!important}.visible-md-block{display:block!important}.visible-md-inline{display:inline!important}.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}th.visible-lg,td.visible-lg{display:table-cell!important}.visible-lg-block{display:block!important}.visible-lg-inline{display:inline!important}.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}th.visible-print,td.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}.hidden-print{display:none!important}}}@layer components{body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;overflow-y:scroll}h2,h3,h4,h5{font-family:Raleway,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.25}ul+h5{margin-top:1.5em}.content{margin-bottom:50px}.panel-progress{inset-inline-start:0;height:3px;display:block;position:absolute;top:0}.checkbox{margin-top:0}.checkbox input[type=checkbox]{float:none}.popover{min-width:250px;max-width:none}.tooltip{word-wrap:break-word}.text-monospace{font-family:Menlo,Monaco,Consolas,Courier New,monospace}.table-condensed>thead>tr>th,.table-condensed>tbody>tr>th,.table-condensed>thead>tr>td,.table-condensed>tbody>tr>td{border-top:none}.table th{white-space:nowrap;font-weight:400}.table td.small-data{white-space:nowrap}.table td.small-data span a:hover{text-decoration:none}table.table-condensed{table-layout:fixed}table.table-condensed td,table.table-condensed th{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}table.table-auto{table-layout:auto}table.table-auto th{width:1px}table.table-auto td{max-width:0}.reception-0{background:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20fill='currentColor'%20class='bi%20bi-reception-0'%20viewBox='0%200%2016%2016'%3e%3cpath%20d='M0%2013.5a.5.5%200%200%201%20.5-.5h2a.5.5%200%200%201%200%201h-2a.5.5%200%200%201-.5-.5zm4%200a.5.5%200%200%201%20.5-.5h2a.5.5%200%200%201%200%201h-2a.5.5%200%200%201-.5-.5zm4%200a.5.5%200%200%201%20.5-.5h2a.5.5%200%200%201%200%201h-2a.5.5%200%200%201-.5-.5zm4%200a.5.5%200%200%201%20.5-.5h2a.5.5%200%200%201%200%201h-2a.5.5%200%200%201-.5-.5z'/%3e%3c/svg%3e") no-repeat}.reception-1{background:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20fill='currentColor'%20class='bi%20bi-reception-1'%20viewBox='0%200%2016%2016'%3e%3cpath%20d='M0%2011.5a.5.5%200%200%201%20.5-.5h2a.5.5%200%200%201%20.5.5v2a.5.5%200%200%201-.5.5h-2a.5.5%200%200%201-.5-.5v-2zm4%202a.5.5%200%200%201%20.5-.5h2a.5.5%200%200%201%200%201h-2a.5.5%200%200%201-.5-.5zm4%200a.5.5%200%200%201%20.5-.5h2a.5.5%200%200%201%200%201h-2a.5.5%200%200%201-.5-.5zm4%200a.5.5%200%200%201%20.5-.5h2a.5.5%200%200%201%200%201h-2a.5.5%200%200%201-.5-.5z'/%3e%3c/svg%3e") no-repeat}.reception-2{background:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20fill='currentColor'%20class='bi%20bi-reception-2'%20viewBox='0%200%2016%2016'%3e%3cpath%20d='M0%2011.5a.5.5%200%200%201%20.5-.5h2a.5.5%200%200%201%20.5.5v2a.5.5%200%200%201-.5.5h-2a.5.5%200%200%201-.5-.5v-2zm4-3a.5.5%200%200%201%20.5-.5h2a.5.5%200%200%201%20.5.5v5a.5.5%200%200%201-.5.5h-2a.5.5%200%200%201-.5-.5v-5zm4%205a.5.5%200%200%201%20.5-.5h2a.5.5%200%200%201%200%201h-2a.5.5%200%200%201-.5-.5zm4%200a.5.5%200%200%201%20.5-.5h2a.5.5%200%200%201%200%201h-2a.5.5%200%200%201-.5-.5z'/%3e%3c/svg%3e") no-repeat}.reception-3{background:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20fill='currentColor'%20class='bi%20bi-reception-3'%20viewBox='0%200%2016%2016'%3e%3cpath%20d='M0%2011.5a.5.5%200%200%201%20.5-.5h2a.5.5%200%200%201%20.5.5v2a.5.5%200%200%201-.5.5h-2a.5.5%200%200%201-.5-.5v-2zm4-3a.5.5%200%200%201%20.5-.5h2a.5.5%200%200%201%20.5.5v5a.5.5%200%200%201-.5.5h-2a.5.5%200%200%201-.5-.5v-5zm4-3a.5.5%200%200%201%20.5-.5h2a.5.5%200%200%201%20.5.5v8a.5.5%200%200%201-.5.5h-2a.5.5%200%200%201-.5-.5v-8zm4%208a.5.5%200%200%201%20.5-.5h2a.5.5%200%200%201%200%201h-2a.5.5%200%200%201-.5-.5z'/%3e%3c/svg%3e") no-repeat}.reception-4{background:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20fill='currentColor'%20class='bi%20bi-reception-4'%20viewBox='0%200%2016%2016'%3e%3cpath%20d='M0%2011.5a.5.5%200%200%201%20.5-.5h2a.5.5%200%200%201%20.5.5v2a.5.5%200%200%201-.5.5h-2a.5.5%200%200%201-.5-.5v-2zm4-3a.5.5%200%200%201%20.5-.5h2a.5.5%200%200%201%20.5.5v5a.5.5%200%200%201-.5.5h-2a.5.5%200%200%201-.5-.5v-5zm4-3a.5.5%200%200%201%20.5-.5h2a.5.5%200%200%201%20.5.5v8a.5.5%200%200%201-.5.5h-2a.5.5%200%200%201-.5-.5v-8zm4-3a.5.5%200%200%201%20.5-.5h2a.5.5%200%200%201%20.5.5v11a.5.5%200%200%201-.5.5h-2a.5.5%200%200%201-.5-.5v-11z'/%3e%3c/svg%3e") no-repeat}.reception{vertical-align:-10%;background-size:contain;width:1em;height:1em;margin-inline:.142857em;display:inline-block}.inline-icon{display:inline-block}.syncshell-icon{vertical-align:-.125em;stroke-width:2px;width:1em;height:1em;display:inline-block}.icon-fixed{width:1.25em}.icon-spin{animation:1.5s linear infinite syncshell-icon-spin}@keyframes syncshell-icon-spin{to{transform:rotate(360deg)}}.word-break-all{word-break:break-all}.nav>li{float:inline-start}.navbar-right{float:inline-end;padding-inline-end:15px}.panel-body .table-condensed{margin-bottom:0}.panel-icon{float:inline-start;margin-inline-end:15px;margin-top:.125em;margin-bottom:.125em;line-height:1}.modal-title .panel-icon{margin-top:.25em;margin-bottom:.25em}button.panel-heading{text-align:start;border-top-width:0;border-inline-width:0;border-radius:0;width:100%;display:block;position:relative}.panel-heading .panel-title-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.panel-heading .panel-status{margin-inline-start:15px}.identicon{shape-rendering:crispedges;width:1em;height:1em}.panel-body.less-padding{padding:5px}.progress{margin-bottom:0;position:relative}.progress span.frontal{text-align:center;width:100%;display:block;position:absolute}@media (max-width:768px){body{padding-bottom:0}.navbar-brand{margin:3.25px -15px}.navbar-nav .open .dropdown-menu{background-color:#fff;border:1px solid #00000026;border-radius:2px;position:absolute;inset-inline:auto 0;box-shadow:0 6px 12px #0000002d}.btn:not(.panel-heading),.btn:not(.panel-heading)+.btn:not(.panel-heading){margin-bottom:10px}.panel-footer{padding-bottom:0}.modal-footer{padding-bottom:5px}}@media (max-width:479px){nav .dropdown-toggle{font-size:1em}.navbar-nav .open .dropdown-menu>li>a{padding-block:12px;padding-inline:25px 15px}div[id^=device-].panel-collapse table,div[id^=folder-].panel-collapse table,div[id^=device-].panel-collapse tbody,div[id^=folder-].panel-collapse tbody,div[id^=device-].panel-collapse tr,div[id^=folder-].panel-collapse tr{display:block}div[id^=device-].panel-collapse th,div[id^=folder-].panel-collapse th,div[id^=device-].panel-collapse td,div[id^=folder-].panel-collapse td{width:100%;max-width:100%;display:block}table.table-auto td,table.table-auto th,table.table-condensed td,table.table-condensed th{white-space:normal}}.tab-content{padding-top:10px}.form-control option[disabled]{opacity:1;background-color:#eee}.checkbox[disabled]{opacity:1;background-color:#eee;margin-inline-start:-5px;padding-inline-start:5px}.checkbox[disabled] *,.checkbox[disabled] .help-block{color:#999;cursor:not-allowed}.input-group .well-sm{padding-top:6px;padding-bottom:6px}.action-row{flex-wrap:wrap;justify-content:flex-end;gap:5px;display:flex}.action-row>.pull-right{display:contents}.action-row .action-row-leading{margin-inline-end:auto}.action-row .btn{font-size:var(--text-small);padding:5px var(--space-2);white-space:normal;overflow-wrap:anywhere;max-width:100%}.action-row .clearfix,.action-row:before,.action-row:after{display:none}.dialog{text-align:start;color:inherit;inline-size:var(--dialog-inline-size);background:0 0;border:0;max-width:calc(100vw - 20px);max-height:calc(100vh - 60px);margin:0 auto;padding:0;position:fixed;inset:30px 0 auto}.dialog.large{inline-size:var(--dialog-large-inline-size)}.dialog.expandable .modal-content{flex-direction:column;max-height:calc(100vh - 60px);display:flex}.dialog.expandable .modal-header{align-items:center;gap:var(--space-4);display:flex}.dialog.expandable .modal-title{flex:1;min-width:0}.modal-header-actions{flex:none;gap:5px;display:flex}.modal-header-actions .btn{margin:0}.dialog.expandable .modal-body{min-height:0;overflow:auto}.dialog.full-view{width:calc(100vw - 20px);max-width:none;height:calc(100vh - 20px);max-height:none;top:10px}.dialog.full-view .modal-content{height:100%;max-height:none}@media (max-width:767px){.dialog{max-height:calc(100vh - 20px);top:10px}}.tooltip-popover{max-width:calc(100vw - var(--space-5));background:0 0;border:0;margin:0;position:fixed;inset:auto;overflow:visible}.tooltip-popover:not(:popover-open){display:none}.folder-count-tooltip .tooltip-inner{border-collapse:separate;text-align:start;white-space:nowrap;max-width:none;display:table}.folder-count-tooltip .tooltip-inner>div{display:table-row}.folder-count-tooltip .tooltip-inner>div>span{display:table-cell}.folder-count-tooltip .tooltip-inner>div>span:last-child{text-align:end;font-variant-numeric:tabular-nums;padding-inline-start:var(--space-4)}.folder-tail,.folder-text{text-overflow:ellipsis;white-space:nowrap;display:block;overflow:hidden}.folder-tail{text-align:start;direction:rtl}.folder-change-tooltip .tooltip-inner{max-width:min(400px, calc(100vw - var(--space-7)));text-align:start;overflow-wrap:anywhere}.folder-help-tooltip .tooltip-inner{text-align:start;max-width:280px}.folder-help-icon,.folder-count-icon{box-sizing:content-box;cursor:default;margin:-2px;padding:2px}:is(.folder-details,.device-details)>summary{cursor:pointer;padding:10px 0;list-style-position:inside;display:list-item}:is(.folder-details,.device-details)>table{table-layout:fixed;font-size:var(--text-body);margin-bottom:0}:is(.folder-details,.device-details)>table th{white-space:normal;overflow-wrap:anywhere;-webkit-hyphens:auto;hyphens:auto;width:auto;max-width:75%}:is(.folder-details,.device-details)>table>tbody>tr{display:flex}:is(.folder-details,.device-details)>table>tbody>tr>th{padding-inline-start:var(--space-6)}:is(.folder-details,.device-details)>table td{white-space:normal;overflow-wrap:anywhere;flex:1;min-width:0;max-width:none}.navbar .syncshell-brand{color:inherit;align-items:center;gap:var(--space-3);font-size:24px;font-weight:600;display:inline-flex}.navbar-default .syncshell-brand:hover,.navbar-default .syncshell-brand:focus{color:inherit}.syncshell-mark{width:28px;height:28px;-webkit-mask:var(--syncshell-mark) center / contain no-repeat;-webkit-mask:var(--syncshell-mark) center / contain no-repeat;mask:var(--syncshell-mark) center / contain no-repeat;background-color:currentColor;flex:none}}@layer base{:root{--space-1:4px;--space-2:6px;--space-3:8px;--space-4:12px;--space-5:16px;--space-6:20px;--space-7:24px;--text-small:12px;--text-body:14px;--text-heading:16px;--dialog-inline-size:600px;--dialog-large-inline-size:900px;--content-max-inline-size:1395px;--radius-small:2px;--motion-fast:.1s;--motion-normal:.2s;--motion-delayed:.4s}}@layer layout{.navbar>.container,.container.content{width:auto;margin-inline:var(--space-7);padding-inline:0}.dashboard-tabs{flex-wrap:wrap;display:flex}.dashboard-tabs>li>a{font-size:var(--text-heading);align-items:center;display:flex}.dashboard-folders,.dashboard-devices{min-width:0}@media (min-width:1000px){.dashboard-primary.active{gap:var(--space-7);grid-template-columns:minmax(320px,3fr) minmax(0,5fr);align-items:start;display:grid}}@media (min-width:1400px){.dashboard-primary.active{column-gap:var(--space-7);grid-template-columns:minmax(320px,1fr) minmax(0,2fr)}.dashboard-devices{column-gap:var(--space-7);grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start;display:grid}.dashboard-devices>.dashboard-heading{grid-column:1/-1}}.dashboard-heading{align-items:center;gap:var(--space-4);display:flex}.dashboard-heading h3{flex:1;min-width:0}.dashboard-folders .panel-title{align-items:center;min-width:0;display:flex}.dashboard-folders .panel-title>.panel-icon,.dashboard-folders .panel-title>.panel-status{flex-shrink:0}.dashboard-folders .panel-title>.panel-status{order:1}.dashboard-folders .panel-title>.panel-title-text{flex:1;min-width:0}}@layer utilities{.share-text{white-space:pre-wrap;overflow-wrap:anywhere}}@layer features{.folder-items-table .folder-text{vertical-align:middle;max-width:calc(100% - 36px);display:inline-block}.folder-details>table>tbody>.folder-state-detail>th{padding-inline-start:32px}.folder-state-summary th>a{margin-inline-start:.4em}.folder-change{gap:.3em;display:flex}.folder-change .folder-tail{flex:1;min-width:0}.device-title,.device-title .panel-title-text{align-items:center;display:flex}.device-title .panel-title-text{flex:1;gap:.4em;min-width:0}.device-name{text-overflow:ellipsis;overflow:hidden}.device-role,.device-title .panel-icon,.device-title .panel-status{flex-shrink:0}.device-role{text-transform:lowercase}.device-title .panel-status{align-items:center;gap:var(--space-2);order:1;display:flex}.device-title .panel-status .reception{margin-inline:0}.remote-address{justify-content:flex-end;column-gap:var(--space-2);flex-wrap:wrap;display:flex}.remote-address>.folder-text{max-width:100%}.remote-status{font-size:var(--text-body)}.device-actions{justify-content:flex-start;position:relative}.device-actions>.pull-right>.btn:first-child{margin-inline-start:auto}.device-actions [aria-disabled=true]{opacity:.65;cursor:default}.device-folders{position:static}.device-folders .dropdown-menu{min-width:0;max-height:min(320px,40vh);font-size:var(--text-body);inset-inline:10px;overflow-y:auto}.device-folders .dropdown-menu a{align-items:center;gap:var(--space-2);padding:5px 10px;display:flex}.device-folders .folder-text{flex:1;min-width:0}.notification-indicator{margin-inline-start:var(--space-2);font-size:10px;line-height:1;display:none}.dashboard:has(.notifications .panel) .notification-indicator{display:inline-block}.notification-indicator>:is(.text-warning,.text-danger){display:none}.dashboard:has(.notifications :is(.panel-warning,.panel-danger)) .notification-indicator>.text-success{display:none}.dashboard:has(.notifications .panel-danger) .notification-indicator>.text-warning{display:none}:is(.dashboard:has(.notifications .panel-warning):not(:has(.notifications .panel-danger)) .notification-indicator>.text-warning,.dashboard:has(.notifications .panel-danger) .notification-indicator>.text-danger){display:inline-block}.notifications{overflow-wrap:anywhere;min-width:0}.notifications:has(.panel) .notifications-empty{display:none}.notification-grid{gap:var(--space-6);grid-template-columns:minmax(0,1fr);align-items:start;max-inline-size:700px;margin-inline:auto;display:grid}.notification-grid>.panel{min-width:0;margin-bottom:0}.notifications .panel-title{font-size:var(--text-heading);flex-wrap:wrap;align-items:flex-start;gap:.4em;display:flex}.notifications .panel-title>.panel-icon{flex:none;margin:.125em 0}.notification-title-text{flex:1 1 0;min-width:0}.notifications .panel-body{font-size:var(--text-body)}.notification-time{font-size:var(--text-body);text-align:end;flex:1 0 100%}.notifications .panel-footer{justify-content:flex-end;gap:var(--space-3);flex-wrap:wrap;display:flex}.notifications .panel-footer>.pull-left{order:-1}.notifications .panel-footer>div.pull-right{display:contents}.notifications .panel-footer .btn{float:none;white-space:normal;max-width:100%}.notifications .panel-footer .clearfix,.notifications .panel-footer:before,.notifications .panel-footer:after{display:none}@media (min-width:900px){.notification-grid{grid-template-columns:repeat(2,minmax(0,1fr));max-inline-size:none;margin-inline:0}}@media (min-width:1300px){.notification-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width:1700px){.notification-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}.about-paths code{white-space:normal;overflow-wrap:anywhere}.xattr-rule{align-items:center;gap:var(--space-3);margin-bottom:var(--space-3);display:flex}.xattr-rule .form-control{min-width:0}.version-filters{gap:var(--space-4);margin-bottom:var(--space-4);flex-wrap:wrap;display:flex}.version-filters label{flex:180px;min-width:0}.version-group{margin-top:var(--space-4)}.version-group summary{font-size:var(--text-heading);overflow-wrap:anywhere}.version-row{gap:var(--space-4);padding:var(--space-2) var(--space-4);font-size:var(--text-body);flex-wrap:wrap;align-items:center;display:flex}.version-row>*{flex:220px;min-width:0}table.table-condensed.recent-changes-table{table-layout:fixed;min-width:760px}.recent-changes-table :is(th,td){white-space:nowrap;padding-inline:14px}.recent-changes-table .recent-device{width:110px}.recent-changes-table .recent-action{width:100px}.recent-changes-table .recent-type{width:70px}.recent-changes-table .recent-folder{width:120px}.recent-changes-table .recent-time{width:185px}.recent-changes-table td:nth-child(5){text-align:end;direction:rtl}.recent-changes-table .folder-tail{text-align:end;max-width:100%;display:block}.conflict-review{--review-action-width:230px;max-width:1500px}.review-tools{gap:var(--space-3);margin:var(--space-5) 0 var(--space-3);flex-wrap:wrap;align-items:center;display:flex}.review-tools .form-control{width:auto;min-width:0}.review-tools .review-search{flex:0 320px}.review-message{font-size:var(--text-body);overflow-wrap:anywhere}.review-message:empty{display:none}.review-table{width:100%;margin-top:var(--space-4)}.review-column-headings,.review-table>tbody>.review-row{grid-template-columns:minmax(130px, .85fr) minmax(180px, 1.1fr) minmax(210px, 1.3fr) var(--review-action-width);align-items:start;display:grid}.review-table>tbody>tr>td{min-width:0;padding:var(--space-2) var(--space-4);font-size:var(--text-body);border-top:0}.review-path{text-overflow:ellipsis;white-space:nowrap;text-align:end;direction:rtl;display:block;overflow:hidden}.review-cell-label{margin-bottom:var(--space-3);font-size:var(--text-body);font-weight:400;display:block}.review-file{align-items:baseline;gap:5px;min-width:0;max-width:100%;display:flex}.review-file .icon-fixed{flex:0 0 1.25em}.review-filename{text-overflow:ellipsis;white-space:nowrap;min-width:0;display:block;overflow:hidden}.review-file-meta{font-size:var(--text-small);margin:2px 0 0;display:block}.review-version{width:100%;min-width:0;margin-top:var(--space-1);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.review-actions{flex-wrap:wrap;align-items:center;gap:7px;display:flex}.review-actions .form-control{width:100%;min-width:0}.conflict-review .btn{font-size:var(--text-small);padding:5px var(--space-2);white-space:normal;overflow-wrap:anywhere;max-width:100%}.review-actions .btn{min-width:0}.conflict-review .review-recheck{min-height:33px;padding:var(--space-1) 10px;font-size:var(--text-body);line-height:20px}@media (max-width:1050px){.review-table>tbody>.review-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.review-context,.review-actions{grid-column:1/-1}.review-path{max-width:100%}.review-actions .form-control{flex:0 250px;width:auto}}@media (max-width:500px){.review-table>tbody>.review-row{grid-template-columns:minmax(0,1fr)}.review-context,.review-actions{grid-column:auto}.review-tools>*,.review-tools .review-search{flex:140px;max-width:100%}.review-table>tbody>tr>td{padding:var(--space-2) 9px}}.review-table,.review-table>thead,.review-table>tbody{display:block}.review-table>thead>.review-column-headings>th{min-width:0;padding:var(--space-4);font-size:var(--text-body)}.review-mobile-label,.review-table .review-current>.review-cell-label{display:none}@media (max-width:1050px){.review-table>thead{display:none}.review-mobile-label{display:inline}.review-table .review-current>.review-cell-label{display:block}}.review-table .review-version{margin-top:0}.review-missing-hint{overflow-wrap:anywhere}.review-missing-hint .review-filename{vertical-align:bottom;max-width:100%;display:inline-block}.review-conflict-meta{gap:var(--space-2);flex-wrap:wrap;align-items:center;display:flex}.conflict-review .review-autoresolve{padding:1px 5px}.review-confirm-path{overflow-wrap:anywhere}} diff --git a/webui/gui/syncshell-modern/assets/css/layers.css b/webui/gui/syncshell-modern/assets/css/layers.css new file mode 100644 index 0000000..b731535 --- /dev/null +++ b/webui/gui/syncshell-modern/assets/css/layers.css @@ -0,0 +1 @@ +@layer vendor, base, layout, components, features, utilities, theme; diff --git a/webui/gui/syncshell-modern/assets/css/modern.css b/webui/gui/syncshell-modern/assets/css/modern.css deleted file mode 100644 index faf78bd..0000000 --- a/webui/gui/syncshell-modern/assets/css/modern.css +++ /dev/null @@ -1,379 +0,0 @@ -.navbar > .container, -.container.content { - width: auto; - margin-left: 24px; - margin-right: 24px; - padding-left: 0; - padding-right: 0; -} - -.dashboard-tabs { - display: flex; - flex-wrap: wrap; -} - -.dashboard-tabs > li > a { - display: flex; - align-items: center; - font-size: 16px; -} - -.notification-indicator { - display: none; - margin-left: 6px; - font-size: 10px; - line-height: 1; -} - -.dashboard:has(.notifications .panel) .notification-indicator { - display: inline-block; -} - - -.notification-indicator > :is(.text-warning, .text-danger), -.dashboard:has(.notifications :is(.panel-warning, .panel-danger)) .notification-indicator > .text-success, -.dashboard:has(.notifications .panel-danger) .notification-indicator > .text-warning { - display: none; -} - -.dashboard:has(.notifications .panel-warning):not(:has(.notifications .panel-danger)) .notification-indicator > .text-warning, -.dashboard:has(.notifications .panel-danger) .notification-indicator > .text-danger { - display: inline-block; -} - -.notifications:has(.panel) .notifications-empty { - display: none; -} - -.dashboard-folders, -.dashboard-devices, -.notifications { - min-width: 0; -} - -@media (min-width: 1000px) { - .dashboard-primary.active { - display: grid; - grid-template-columns: minmax(320px, 3fr) minmax(0, 5fr); - gap: 24px; - align-items: start; - } -} - -@media (min-width: 1400px) { - .dashboard-primary.active { - grid-template-columns: - minmax(320px, calc((100% - 48px) * 0.25)) - minmax(320px, calc((100% - 48px) * 0.25)); - } - .notifications { - width: max(280px, calc((100% - 48px) * 0.1875)); - } -} - -.device-title, -.device-title .panel-title-text { - display: flex; - align-items: center; -} - -.device-title .panel-title-text { - flex: 1; - min-width: 0; - gap: 0.4em; -} - -.device-name { - overflow: hidden; - text-overflow: ellipsis; -} - -.device-role, -.device-title .panel-icon, -.device-title .panel-status { - flex-shrink: 0; -} - -.device-role { - text-transform: lowercase; -} - -.device-title .panel-status { - display: flex; - align-items: center; - gap: 6px; - order: 1; -} - -.device-title .panel-status .reception { - margin-left: 0; - margin-right: 0; -} - -.notifications { - overflow-wrap: anywhere; -} - -.notifications .panel-title { - font-size: 16px; - display: flex; - flex-wrap: wrap; - align-items: center; - gap: 0.4em; -} - -.notifications .panel-title > .panel-icon, -.notifications .panel-title > .syncshell-icon { - flex-shrink: 0; -} - -.notifications .panel-body { - font-size: 14px; -} - -.notifications .panel-title .pull-right { - flex-basis: 100%; - font-size: 14px; - text-align: right; -} - -.notifications .panel-footer { - display: flex; - flex-wrap: wrap; - justify-content: flex-end; - gap: 8px; -} - -.notifications .panel-footer > .pull-left { - order: -1; -} - -.notifications .panel-footer > div.pull-right { - display: contents; -} - -.notifications .panel-footer .btn { - float: none !important; - white-space: normal; - max-width: 100%; -} - -.notifications .panel-footer .clearfix, -.notifications .panel-footer::before, -.notifications .panel-footer::after { - display: none; -} - -:is(.folder-details, .device-details) > summary { - display: list-item; - list-style-position: inside; - cursor: pointer; - padding: 10px 0; -} - -:is(.folder-details, .device-details) > table { - margin-bottom: 0; - table-layout: fixed; - font-size: 14px; -} - -:is(.folder-details, .device-details) > table th { - width: auto; - max-width: 75%; - white-space: normal; - overflow-wrap: anywhere; - hyphens: auto; -} - -:is(.folder-details, .device-details) > table > tbody > tr { - display: flex; -} - -:is(.folder-details, .device-details) > table > tbody > tr > th { - padding-left: 20px; -} - -.folder-details > table > tbody > .folder-state-detail > th { - padding-left: 32px; -} - -.folder-count-tooltip .tooltip-inner { - display: table; - border-collapse: separate; - max-width: none; - text-align: left; - white-space: nowrap; -} - -.folder-count-tooltip .tooltip-inner > div { - display: table-row; -} - -.folder-count-tooltip .tooltip-inner > div > span { - display: table-cell; -} - -.folder-count-tooltip .tooltip-inner > div > span:last-child { - padding-left: 12px; - text-align: right; - font-variant-numeric: tabular-nums; -} - -.folder-actions { - display: flex; - justify-content: flex-end; - flex-wrap: wrap; - gap: 5px; -} - -.folder-actions > .pull-right { - display: contents; -} - -.folder-actions .folder-sharing { - margin-right: auto; -} - -.folder-actions .btn { - font-size: 12px; - padding: 5px 6px; - max-width: 100%; - white-space: normal; - overflow-wrap: anywhere; -} - -.folder-actions .clearfix, -.folder-actions::before, -.folder-actions::after { - display: none; -} - -.folder-state-summary th > a { - margin-left: 0.4em; -} - -:is(.folder-details, .device-details) > table td { - flex: 1; - min-width: 0; - max-width: none; - white-space: normal; - overflow-wrap: anywhere; -} - -.folder-tail, -.folder-text { - display: block; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -.folder-tail { - direction: rtl; - text-align: right; -} - -.folder-change { - display: flex; - gap: 0.3em; -} - -.folder-change .folder-tail { - min-width: 0; - flex: 1; -} - -.folder-change-tooltip .tooltip-inner { - max-width: min(400px, calc(100vw - 24px)); - text-align: left; - overflow-wrap: anywhere; -} - -.folder-help-tooltip .tooltip-inner { - max-width: 280px; - text-align: left; -} - -.folder-help-icon, -.folder-count-icon { - box-sizing: content-box; - padding: 2px; - margin: -2px; - cursor: default; -} - -.remote-address { - display: flex; - flex-wrap: wrap; - justify-content: flex-end; - column-gap: 6px; -} - -.remote-address > .folder-text { - max-width: 100%; -} - -.remote-status { - font-size: 14px; -} - -.device-actions { - position: relative; - justify-content: flex-start; -} - -.device-actions > .pull-right > .btn:first-child { - margin-left: auto; -} - -.device-actions [aria-disabled="true"] { - opacity: 0.65; - cursor: default; -} - -.device-folders { - position: static; -} - -.device-folders .dropdown-menu { - left: 10px; - right: 10px; - min-width: 0; - max-height: min(320px, 40vh); - overflow-y: auto; - font-size: 14px; -} - -.device-folders .dropdown-menu a { - display: flex; - align-items: center; - gap: 6px; - padding: 5px 10px; -} - -.device-folders .folder-text { - flex: 1; - min-width: 0; -} - -.navbar .syncshell-brand { - color: inherit; - display: inline-flex; - align-items: center; - gap: 8px; - font-size: 24px; - font-weight: 600; -} - -.navbar-default .syncshell-brand:hover, -.navbar-default .syncshell-brand:focus { - color: inherit; -} -.syncshell-mark { - width: 28px; - height: 28px; - flex: none; - background-color: currentColor; - -webkit-mask: var(--syncshell-mark) center / contain no-repeat; - mask: var(--syncshell-mark) center / contain no-repeat; -} diff --git a/webui/gui/syncshell-modern/assets/css/overrides.css b/webui/gui/syncshell-modern/assets/css/overrides.css index 259569f..5332c4b 100644 --- a/webui/gui/syncshell-modern/assets/css/overrides.css +++ b/webui/gui/syncshell-modern/assets/css/overrides.css @@ -8,172 +8,191 @@ */ body { - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; - overflow-y: scroll; -} - - h2, h3, h4, h5 { - font-family: "Raleway", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; - line-height: 1.25; -} - -ul+h5 { - margin-top: 1.5em; + font-family: + -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', + Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', + 'Segoe UI Symbol', 'Noto Color Emoji'; + overflow-y: scroll; +} + +h2, +h3, +h4, +h5 { + font-family: + 'Raleway', + -apple-system, + BlinkMacSystemFont, + 'Segoe UI', + Roboto, + 'Helvetica Neue', + Arial, + 'Noto Sans', + sans-serif, + 'Apple Color Emoji', + 'Segoe UI Emoji', + 'Segoe UI Symbol', + 'Noto Color Emoji'; + line-height: 1.25; +} + +ul + h5 { + margin-top: 1.5em; } .content { - margin-bottom: 50px; + margin-bottom: 50px; } .panel-progress { - height: 3px; - left: 0; - position: absolute; - top: 0; - display: block; + height: 3px; + inset-inline-start: 0; + position: absolute; + top: 0; + display: block; } .checkbox { - margin-top: 0px; + margin-top: 0px; } -.checkbox input[type="checkbox"] { - float: none; /* issue #1197 */ +.checkbox input[type='checkbox'] { + float: none; /* issue #1197 */ } .popover { - max-width: none; - min-width: 250px; + max-width: none; + min-width: 250px; } .tooltip { - word-wrap:break-word; + word-wrap: break-word; } .text-monospace { - font-family: Menlo, Monaco, Consolas, "Courier New", monospace; + font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; } -.table-condensed>thead>tr>th, .table-condensed>tbody>tr>th, .table-condensed>thead>tr>td, .table-condensed>tbody>tr>td { - border-top: none; +.table-condensed > thead > tr > th, +.table-condensed > tbody > tr > th, +.table-condensed > thead > tr > td, +.table-condensed > tbody > tr > td { + border-top: none; } .table th { - white-space: nowrap; - font-weight: 400; -} - -.table td { - /*padding-left: 20px !important;*/ + white-space: nowrap; + font-weight: 400; } .table td.small-data { - white-space: nowrap; + white-space: nowrap; } /* Removing text decoration on anchor link hover pull request: #4135 */ .table td.small-data span a:hover { - text-decoration: none; + text-decoration: none; } table.table-condensed { - table-layout: fixed; + table-layout: fixed; } table.table-condensed td, table.table-condensed th { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } table.table-auto { - table-layout: auto; + table-layout: auto; } table.table-auto th { - width: 1px; + width: 1px; } table.table-auto td { - max-width: 0px; + max-width: 0px; } /* Tag name is needed for selector to be specific enough to override Bootstrap style */ /* Remote Devices connection-quality indicator */ .reception-0 { - background: url('../../vendor/bootstrap/fonts/reception-0.svg') no-repeat; + background: url('../../vendor/bootstrap/fonts/reception-0.svg') no-repeat; } .reception-1 { - background: url('../../vendor/bootstrap/fonts/reception-1.svg') no-repeat; + background: url('../../vendor/bootstrap/fonts/reception-1.svg') no-repeat; } .reception-2 { - background: url('../../vendor/bootstrap/fonts/reception-2.svg') no-repeat; + background: url('../../vendor/bootstrap/fonts/reception-2.svg') no-repeat; } .reception-3 { - background: url('../../vendor/bootstrap/fonts/reception-3.svg') no-repeat; + background: url('../../vendor/bootstrap/fonts/reception-3.svg') no-repeat; } .reception-4 { - background: url('../../vendor/bootstrap/fonts/reception-4.svg') no-repeat; + background: url('../../vendor/bootstrap/fonts/reception-4.svg') no-repeat; } .reception { - width: 1em; - height: 1em; - display: inline-block; - vertical-align: -10%; - background-size: contain; - margin-left: .14285715em; - margin-right: .14285715em; + width: 1em; + height: 1em; + display: inline-block; + vertical-align: -10%; + background-size: contain; + margin-inline: 0.14285715em; } .inline-icon { - display: inline-block; + display: inline-block; } .syncshell-icon { - display: inline-block; - width: 1em; - height: 1em; - vertical-align: -0.125em; - stroke-width: 2; + display: inline-block; + width: 1em; + height: 1em; + vertical-align: -0.125em; + stroke-width: 2; } .icon-fixed { - width: 1.25em; + width: 1.25em; } .icon-spin { - animation: syncshell-icon-spin 1.5s linear infinite; + animation: syncshell-icon-spin 1.5s linear infinite; } @keyframes syncshell-icon-spin { - to { transform: rotate(360deg); } + to { + transform: rotate(360deg); + } } /* Wrap long file paths to prevent text overflow. See issue #6268. */ .word-break-all { - word-break: break-all; + word-break: break-all; } /* Break up long words in paragraphs only if necessary to prevent text overflow. */ -.nav>li{ - float: left; +.nav > li { + float: inline-start; } .navbar-right { - /* to align with panel */ - padding-right: 15px; - float: right; + /* to align with panel */ + padding-inline-end: 15px; + float: inline-end; } .panel-body .table-condensed { - margin-bottom: 0; + margin-bottom: 0; } /** @@ -181,53 +200,47 @@ table.table-auto td { */ .panel-icon { - float: left; - margin-right: 15px; - margin-top: 0.125em; - margin-bottom: 0.125em; - line-height: 1; + float: inline-start; + margin-inline-end: 15px; + margin-top: 0.125em; + margin-bottom: 0.125em; + line-height: 1; } .modal-title .panel-icon { - margin-top: 0.25em; - margin-bottom: 0.25em; + margin-top: 0.25em; + margin-bottom: 0.25em; } button.panel-heading { - display: block; - position: relative; - width: 100%; - text-align: left; - border-top-width: 0; - border-left-width: 0; - border-right-width: 0; - border-radius: 0 !important; + display: block; + position: relative; + width: 100%; + text-align: start; + border-top-width: 0; + border-inline-start-width: 0; + border-inline-end-width: 0; + border-radius: 0; } .panel-heading .panel-title-text { - text-overflow: ellipsis; - overflow: hidden; - white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; } .panel-heading .panel-status { - margin-left:15px; -} - -identicon { - width: 1em; - height: 1em; - line-height: 1; + margin-inline-start: 15px; } .identicon { - width: 1em; - height: 1em; - shape-rendering: crispEdges; + width: 1em; + height: 1em; + shape-rendering: crispEdges; } .panel-body.less-padding { - padding: 5px; + padding: 5px; } /** @@ -235,134 +248,117 @@ identicon { */ .progress { - margin-bottom: 0px; - position: relative; + margin-bottom: 0px; + position: relative; } .progress span.frontal { - text-align: center; - position: absolute; - display: block; - width: 100%; + text-align: center; + position: absolute; + display: block; + width: 100%; } -/* - * Restore Versions tweaks - */ - -/* Ignore fixed height when manually resized. */ - -/* Remove table outline as rows have own focus style already. */ - -/* Align dropdown with title first line. */ - -/* Reduce space between toggle and menu on mobile. */ - -/* Change direction to remain on screen on mobile. */ - -/* Ensure maximum space for filtering and date range. */ - @media (max-width: 768px) { - /* Layout after the normal contents, as this is when the footer switches + /* Layout after the normal contents, as this is when the footer switches to a vertical layout. */ - body { - padding-bottom: 0px; - } - - .navbar-brand { - margin: 3.25px -15px; - } - - .navbar-nav .open .dropdown-menu { - position: absolute; - left: auto; - right: 0; - background-color: #ffffff; - border: 1px solid #cccccc; - border: 1px solid rgba(0, 0, 0, 0.15); - -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); - box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); - border-radius: 2px; - } - /* All buttons, except panel headings, get bottom margin, as they + body { + padding-bottom: 0px; + } + + .navbar-brand { + margin: 3.25px -15px; + } + + .navbar-nav .open .dropdown-menu { + position: absolute; + inset-inline-start: auto; + inset-inline-end: 0; + background-color: #ffffff; + border: 1px solid #cccccc; + border: 1px solid rgba(0, 0, 0, 0.15); + -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); + box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); + border-radius: 2px; + } + /* All buttons, except panel headings, get bottom margin, as they won't fit beside each other anymore. Reduce footer padding to compensate for the margin. */ - .btn:not(.panel-heading), - .btn:not(.panel-heading) + .btn:not(.panel-heading) { - margin-bottom: 10px; - } - - .panel-footer { - padding-bottom: 0; - } - .modal-footer { - padding-bottom: 5px; - } -} - -@media (max-width:479px) { - nav .dropdown-toggle { - font-size: 1em; - } - - .navbar-nav .open .dropdown-menu > li > a { - padding: 12px 15px 12px 25px; - } - - /* The selectors are build to target only the content of folder and device - panels as it would "destroy" e.g. out of sync or recent changes listings. - The !important is needed to override .visible-xs that sets display to a - specific table element instead of block. */ - div[id^='device-'].panel-collapse table, - div[id^='folder-'].panel-collapse table, - div[id^='device-'].panel-collapse tbody, - div[id^='folder-'].panel-collapse tbody, - div[id^='device-'].panel-collapse tr, - div[id^='folder-'].panel-collapse tr { - display: block !important; - } - div[id^='device-'].panel-collapse th, - div[id^='folder-'].panel-collapse th, - div[id^='device-'].panel-collapse td, - div[id^='folder-'].panel-collapse td { - display: block; - max-width: 100%; - width: 100%; - } - - table.table-auto td, - table.table-auto th, - table.table-condensed td, - table.table-condensed th { - /* for mobile phones to allow linebreaks in long repro folder/shared with + .btn:not(.panel-heading), + .btn:not(.panel-heading) + .btn:not(.panel-heading) { + margin-bottom: 10px; + } + + .panel-footer { + padding-bottom: 0; + } + .modal-footer { + padding-bottom: 5px; + } +} + +@media (max-width: 479px) { + nav .dropdown-toggle { + font-size: 1em; + } + + .navbar-nav .open .dropdown-menu > li > a { + padding-block: 12px; + padding-inline: 25px 15px; + } + + /* Limit the block layout to folder and device panel details. */ + div[id^='device-'].panel-collapse table, + div[id^='folder-'].panel-collapse table, + div[id^='device-'].panel-collapse tbody, + div[id^='folder-'].panel-collapse tbody, + div[id^='device-'].panel-collapse tr, + div[id^='folder-'].panel-collapse tr { + display: block; + } + div[id^='device-'].panel-collapse th, + div[id^='folder-'].panel-collapse th, + div[id^='device-'].panel-collapse td, + div[id^='folder-'].panel-collapse td { + display: block; + max-width: 100%; + width: 100%; + } + + table.table-auto td, + table.table-auto th, + table.table-condensed td, + table.table-condensed th { + /* for mobile phones to allow linebreaks in long repro folder/shared with * columns. */ - white-space: normal; - } + white-space: normal; + } - /* Move share buttons below device ID on small screens. */ + /* Move share buttons below device ID on small screens. */ } .tab-content { - padding-top: 10px; + padding-top: 10px; } /* Use the same style as Bootstrap uses for disabled