From 8e449196e3c6aba6db68e4dcf93220b2c23d7304 Mon Sep 17 00:00:00 2001 From: Aman Chhabra <17457975+achhabra2@users.noreply.github.com> Date: Sun, 19 Dec 2021 11:26:59 -0800 Subject: [PATCH] Add initial support back for send / receive cancelation --- frontend/dist/bundle.js | 2 +- frontend/dist/bundle.js.map | 2 +- frontend/src/receiver.svelte | 5 +++-- frontend/src/sender.svelte | 4 ++-- go.mod | 4 ++-- go.sum | 36 +++++++++++++++++++++++++++++----- internal/transport/receiver.go | 15 ++++++++++++++ 7 files changed, 55 insertions(+), 13 deletions(-) diff --git a/frontend/dist/bundle.js b/frontend/dist/bundle.js index eb62cf0..a28877f 100644 --- a/frontend/dist/bundle.js +++ b/frontend/dist/bundle.js @@ -1,2 +1,2 @@ -var app=function(){"use strict";function t(){}const e=t=>t;function o(t){return t()}function n(){return Object.create(null)}function i(t){t.forEach(o)}function r(t){return"function"==typeof t}function a(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function s(t,e,o,n){return t[1]&&n?function(t,e){for(const o in e)t[o]=e[o];return t}(o.ctx.slice(),t[1](n(e))):o.ctx}function c(t,e,o,n,i,r,a){const c=function(t,e,o,n){if(t[2]&&n){const i=t[2](n(o));if(void 0===e.dirty)return i;if("object"==typeof i){const t=[],o=Math.max(e.dirty.length,i.length);for(let n=0;nwindow.performance.now():()=>Date.now(),p=l?t=>requestAnimationFrame(t):t;const u=new Set;function g(t){u.forEach((e=>{e.c(t)||(u.delete(e),e.f())})),0!==u.size&&p(g)}function m(t){let e;return 0===u.size&&p(g),{promise:new Promise((o=>{u.add(e={c:t,f:o})})),abort(){u.delete(e)}}}let b=!1;function w(t,e,o,n){for(;t>1);o(i)<=n?t=i+1:e=i}return t}function f(t,e){b?(!function(t){if(t.hydrate_init)return;t.hydrate_init=!0;const e=t.childNodes,o=new Int32Array(e.length+1),n=new Int32Array(e.length);o[0]=-1;let i=0;for(let t=0;te[o[t]].claim_order),e[t].claim_order)-1;n[t]=o[r]+1;const a=r+1;o[a]=t,i=Math.max(a,i)}const r=[],a=[];let s=e.length-1;for(let t=o[i]+1;0!=t;t=n[t-1]){for(r.push(e[t-1]);s>=t;s--)a.push(e[s]);s--}for(;s>=0;s--)a.push(e[s]);r.reverse(),a.sort(((t,e)=>t.claim_order-e.claim_order));for(let e=0,o=0;e=r[o].claim_order;)o++;const n=ot.removeEventListener(e,o,n)}function S(t,e,o){null==o?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o)}function _(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function A(t,e){t.value=null==e?"":e}const z=new Set;let E,F=0;function j(t,e,o,n,i,r,a,s=0){const c=16.666/n;let l="{\n";for(let t=0;t<=1;t+=c){const n=e+(o-e)*r(t);l+=100*t+`%{${a(n,1-n)}}\n`}const d=l+`100% {${a(o,1-o)}}\n}`,p=`__svelte_${function(t){let e=5381,o=t.length;for(;o--;)e=(e<<5)-e^t.charCodeAt(o);return e>>>0}(d)}_${s}`,u=t.ownerDocument;z.add(u);const g=u.__svelte_stylesheet||(u.__svelte_stylesheet=u.head.appendChild(y("style")).sheet),m=u.__svelte_rules||(u.__svelte_rules={});m[p]||(m[p]=!0,g.insertRule(`@keyframes ${p} ${d}`,g.cssRules.length));const b=t.style.animation||"";return t.style.animation=`${b?`${b}, `:""}${p} ${n}ms linear ${i}ms 1 both`,F+=1,p}function O(t,e){const o=(t.style.animation||"").split(", "),n=o.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),i=o.length-n.length;i&&(t.style.animation=n.join(", "),F-=i,F||p((()=>{F||(z.forEach((t=>{const e=t.__svelte_stylesheet;let o=e.cssRules.length;for(;o--;)e.deleteRule(o);t.__svelte_rules={}})),z.clear())})))}function U(t){E=t}function D(t){(function(){if(!E)throw new Error("Function called outside component initialization");return E})().$$.on_mount.push(t)}const P=[],R=[],G=[],N=[],B=Promise.resolve();let M=!1;function L(t){G.push(t)}let T=!1;const I=new Set;function q(){if(!T){T=!0;do{for(let t=0;t{V=null}))),V}function J(t,e,o){t.dispatchEvent(function(t,e){const o=document.createEvent("CustomEvent");return o.initCustomEvent(t,!1,!1,e),o}(`${e?"intro":"outro"}${o}`))}const Y=new Set;let Q;function K(){Q={r:0,c:[],p:Q}}function X(){Q.r||i(Q.c),Q=Q.p}function Z(t,e){t&&t.i&&(Y.delete(t),t.i(e))}function tt(t,e,o,n){if(t&&t.o){if(Y.has(t))return;Y.add(t),Q.c.push((()=>{Y.delete(t),n&&(o&&t.d(1),n())})),t.o(e)}}const et={duration:0};function ot(o,n,i){let a,s,c=n(o,i),l=!1,p=0;function u(){a&&O(o,a)}function g(){const{delay:n=0,duration:i=300,easing:r=e,tick:g=t,css:b}=c||et;b&&(a=j(o,0,1,i,n,r,b,p++)),g(0,1);const w=d()+n,f=w+i;s&&s.abort(),l=!0,L((()=>J(o,!0,"start"))),s=m((t=>{if(l){if(t>=f)return g(1,0),J(o,!0,"end"),u(),l=!1;if(t>=w){const e=r((t-w)/i);g(e,1-e)}}return l}))}let b=!1;return{start(){b||(O(o),r(c)?(c=c(),H().then(g)):g())},invalidate(){b=!1},end(){l&&(u(),l=!1)}}}function nt(o,n,a,s){let c=n(o,a),l=s?0:1,p=null,u=null,g=null;function b(){g&&O(o,g)}function w(t,e){const o=t.b-l;return e*=Math.abs(o),{a:l,b:t.b,d:o,duration:e,start:t.start,end:t.start+e,group:t.group}}function f(n){const{delay:r=0,duration:a=300,easing:s=e,tick:f=t,css:h}=c||et,v={start:d()+r,b:n};n||(v.group=Q,Q.r+=1),p||u?u=v:(h&&(b(),g=j(o,l,n,a,r,s,h)),n&&f(0,1),p=w(v,a),L((()=>J(o,n,"start"))),m((t=>{if(u&&t>u.start&&(p=w(u,a),u=null,J(o,p.b,"start"),h&&(b(),g=j(o,l,p.b,p.duration,0,s,c.css))),p)if(t>=p.end)f(l=p.b,1-l),J(o,p.b,"end"),u||(p.b?b():--p.group.r||i(p.group.c)),p=null;else if(t>=p.start){const e=t-p.start;l=p.a+p.d*s(e/p.duration),f(l,1-l)}return!(!p&&!u)})))}return{run(t){r(c)?H().then((()=>{c=c(),f(t)})):f(t)},end(){b(),p=u=null}}}function it(t){t&&t.c()}function rt(t,e,n,a){const{fragment:s,on_mount:c,on_destroy:l,after_update:d}=t.$$;s&&s.m(e,n),a||L((()=>{const e=c.map(o).filter(r);l?l.push(...e):i(e),t.$$.on_mount=[]})),d.forEach(L)}function at(t,e){const o=t.$$;null!==o.fragment&&(i(o.on_destroy),o.fragment&&o.fragment.d(e),o.on_destroy=o.fragment=null,o.ctx=[])}function st(t,e){-1===t.$$.dirty[0]&&(P.push(t),M||(M=!0,B.then(q)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const i=n.length?n[0]:o;return p.ctx&&s(p.ctx[t],p.ctx[t]=i)&&(!p.skip_bound&&p.bound[t]&&p.bound[t](i),u&&st(e,t)),o})):[],p.update(),u=!0,i(p.before_update),p.fragment=!!a&&a(p.ctx),o.target){if(o.hydrate){b=!0;const t=function(t){return Array.from(t.childNodes)}(o.target);p.fragment&&p.fragment.l(t),t.forEach(v)}else p.fragment&&p.fragment.c();o.intro&&Z(e.$$.fragment),rt(e,o.target,o.anchor,o.customElement),b=!1,q()}U(d)}class lt{$destroy(){at(this,1),this.$destroy=t}$on(t,e){const o=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return o.push(e),()=>{const t=o.indexOf(e);-1!==t&&o.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function dt(t){const e=t-1;return e*e*e+1}function pt(t,{delay:e=0,duration:o=400,easing:n=dt}={}){const i=getComputedStyle(t),r=+i.opacity,a=parseFloat(i.height),s=parseFloat(i.paddingTop),c=parseFloat(i.paddingBottom),l=parseFloat(i.marginTop),d=parseFloat(i.marginBottom),p=parseFloat(i.borderTopWidth),u=parseFloat(i.borderBottomWidth);return{delay:e,duration:o,easing:n,css:t=>`overflow: hidden;opacity: ${Math.min(20*t,1)*r};height: ${t*a}px;padding-top: ${t*s}px;padding-bottom: ${t*c}px;margin-top: ${t*l}px;margin-bottom: ${t*d}px;border-top-width: ${t*p}px;border-bottom-width: ${t*u}px;`}}const ut={App:{CancelWormholeRequest:()=>window.go.main.App.CancelWormholeRequest(),ClearSelectedFiles:()=>window.go.main.App.ClearSelectedFiles(),GetCurrentVersion:()=>window.go.main.App.GetCurrentVersion(),GetDownloadsFolder:()=>window.go.main.App.GetDownloadsFolder(),GetLogPath:()=>window.go.main.App.GetLogPath(),GetNotificationsParam:()=>window.go.main.App.GetNotificationsParam(),GetOverwriteParam:()=>window.go.main.App.GetOverwriteParam(),GetReceivedFile:()=>window.go.main.App.GetReceivedFile(),GetSelectedFiles:()=>window.go.main.App.GetSelectedFiles(),GetUserPrefs:()=>window.go.main.App.GetUserPrefs(),OpenDirectoryDialog:()=>window.go.main.App.OpenDirectoryDialog(),OpenFile:t=>window.go.main.App.OpenFile(t),OpenFilesDialog:()=>window.go.main.App.OpenFilesDialog(),ReceiveFile:t=>window.go.main.App.ReceiveFile(t),SelectedFilesSend:()=>window.go.main.App.SelectedFilesSend(),SendDirectory:t=>window.go.main.App.SendDirectory(t),SendFile:t=>window.go.main.App.SendFile(t),SetDownloadsFolder:()=>window.go.main.App.SetDownloadsFolder(),SetNotificationsParam:t=>window.go.main.App.SetNotificationsParam(t),SetOverwriteParam:t=>window.go.main.App.SetOverwriteParam(t),SetSelfUpdateParam:t=>window.go.main.App.SetSelfUpdateParam(t),ShowErrorDialog:t=>window.go.main.App.ShowErrorDialog(t),UpdateCheckUI:()=>window.go.main.App.UpdateCheckUI(),UpdateSendProgress:(t,e)=>window.go.main.App.UpdateSendProgress(t,e)}};function gt(t){let e,o,n,i,r,a,l,d,p,u,g,m,b,w,x,C;const A=t[3].default,z=function(t,e,o,n){if(t){const i=s(t,e,o,n);return t[0](i)}}(A,t,t[2],null);return{c(){e=y("div"),o=y("div"),n=y("div"),i=y("span"),r=k(t[0]),a=$(),l=y("span"),d=k(t[1]),p=k("%"),u=$(),g=y("div"),m=y("div"),w=$(),z&&z.c(),S(i,"class","text-base text-gray-100 font-medium"),S(l,"class","text-sm font-medium text-gray-100"),S(n,"class","mb-1 flex justify-between"),S(m,"class","bg-green-500 h-4 rounded-full animate-pulse"),S(m,"style",b="width: "+t[1].toString()+"%"),S(g,"class","w-full bg-green-900 rounded-full h-4 shadow-inner"),S(o,"class","progress-inner"),S(e,"class","progress-outer")},m(t,s){h(t,e,s),f(e,o),f(o,n),f(n,i),f(i,r),f(n,a),f(n,l),f(l,d),f(l,p),f(o,u),f(o,g),f(g,m),f(o,w),z&&z.m(o,null),C=!0},p(t,[e]){(!C||1&e)&&_(r,t[0]),(!C||2&e)&&_(d,t[1]),(!C||2&e&&b!==(b="width: "+t[1].toString()+"%"))&&S(m,"style",b),z&&z.p&&(!C||4&e)&&c(z,A,t,t[2],C?e:-1,null,null)},i(t){C||(Z(z,t),L((()=>{x||(x=nt(e,pt,{},!0)),x.run(1)})),C=!0)},o(t){tt(z,t),x||(x=nt(e,pt,{},!1)),x.run(0),C=!1},d(t){t&&v(e),z&&z.d(t),t&&x&&x.end()}}}function mt(t,e,o){let{$$slots:n={},$$scope:i}=e,{status:r=waiting}=e,{percent:a=0}=e;return t.$$set=t=>{"status"in t&&o(0,r=t.status),"percent"in t&&o(1,a=t.percent),"$$scope"in t&&o(2,i=t.$$scope)},[r,a,i,n]}class bt extends lt{constructor(t){super(),ct(this,t,mt,gt,a,{status:0,percent:1})}}function wt(t,e,o){const n=t.slice();return n[11]=e[o],n[13]=o,n}function ft(t){let e,o,n,r,a,s,c,l,d,p,u,g;return{c(){e=y("div"),o=y("div"),n=y("span"),n.textContent="Send Files",r=$(),a=y("button"),s=$(),c=y("div"),l=y("span"),l.textContent="Send Directory",d=$(),p=y("button"),S(n,"class","tooltip"),S(a,"class","file-select-icon"),a.disabled=t[4],S(o,"class","has-tooltip"),S(l,"class","tooltip"),S(p,"class","folder-select-icon"),p.disabled=t[4],S(c,"class","has-tooltip"),S(e,"class","flex flex-row items-center content-center justify-around place-items-center h-full")},m(i,m){h(i,e,m),f(e,o),f(o,n),f(o,r),f(o,a),f(e,s),f(e,c),f(c,l),f(c,d),f(c,p),u||(g=[C(a,"click",t[7]),C(p,"click",t[6])],u=!0)},p(t,e){16&e&&(a.disabled=t[4]),16&e&&(p.disabled=t[4])},d(t){t&&v(e),u=!1,i(g)}}}function ht(t){let e,o=t[5],n=[];for(let e=0;e{r=ot(o,pt,{duration:200}),r.start()})),l||L((()=>{l=ot(s,pt,{duration:200}),l.start()}))},o:t,d(t){t&&v(o),t&&v(a),t&&v(s),d=!1,i(p)}}}function $t(t){let e,o;return e=new bt({props:{percent:t[3],status:t[2],$$slots:{default:[St]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,n){rt(e,t,n),o=!0},p(t,o){const n={};8&o&&(n.percent=t[3]),4&o&&(n.status=t[2]),16386&o&&(n.$$scope={dirty:o,ctx:t}),e.$set(n)},i(t){o||(Z(e.$$.fragment,t),o=!0)},o(t){tt(e.$$.fragment,t),o=!1},d(t){at(e,t)}}}function Ct(t){let e,o,n,i,r,a,s,c,l,d;return{c(){e=y("div"),o=y("label"),o.textContent="Send Code",n=$(),i=y("input"),r=$(),a=y("button"),a.textContent="📄",S(o,"for","sendCode"),S(o,"class","send-input-label"),S(i,"id","sendCode"),i.readOnly=!0,S(i,"type","text"),S(i,"placeholder","Send code will appear"),i.value=t[1],S(i,"class","send-input mt-1"),S(a,"class","send-button"),S(e,"class","mx-auto mt-2")},m(t,s){h(t,e,s),f(e,o),f(e,n),f(e,i),f(e,r),f(e,a),c=!0,l||(d=C(a,"click",At),l=!0)},p(t,e){(!c||2&e&&i.value!==t[1])&&(i.value=t[1])},i(t){c||(L((()=>{s||(s=nt(e,pt,{},!0)),s.run(1)})),c=!0)},o(t){s||(s=nt(e,pt,{},!1)),s.run(0),c=!1},d(t){t&&v(e),t&&s&&s.end(),l=!1,d()}}}function St(t){let e,o,n=t[1]&&Ct(t);return{c(){e=y("div"),n&&n.c(),S(e,"class","container grid")},m(t,i){h(t,e,i),n&&n.m(e,null),o=!0},p(t,o){t[1]?n?(n.p(t,o),2&o&&Z(n,1)):(n=Ct(t),n.c(),Z(n,1),n.m(e,null)):n&&(K(),tt(n,1,1,(()=>{n=null})),X())},i(t){o||(Z(n),o=!0)},o(t){tt(n),o=!1},d(t){t&&v(e),n&&n.d()}}}function _t(t){let e,o,n,i,r,a;function s(t,e){return t[0].length>0?ht:ft}let c=s(t),l=c(t),d=t[0].length>0&&kt(t),p=t[4]&&$t(t);return{c(){e=y("div"),o=y("div"),l.c(),n=$(),i=y("div"),d&&d.c(),r=$(),p&&p.c(),S(o,"class","border-2 border-green-300 rounded-md shadow-md w-72 h-56 p-2 mx-auto cursor-fix send-icon-container"),S(i,"class","p-2 mx-auto"),S(e,"class","flex flex-col justify-items-center content-center m-2")},m(t,s){h(t,e,s),f(e,o),l.m(o,null),f(e,n),f(e,i),d&&d.m(i,null),f(e,r),p&&p.m(e,null),a=!0},p(t,[n]){c===(c=s(t))&&l?l.p(t,n):(l.d(1),l=c(t),l&&(l.c(),l.m(o,null))),t[0].length>0?d?(d.p(t,n),1&n&&Z(d,1)):(d=kt(t),d.c(),Z(d,1),d.m(i,null)):d&&(d.d(1),d=null),t[4]?p?(p.p(t,n),16&n&&Z(p,1)):(p=$t(t),p.c(),Z(p,1),p.m(e,null)):p&&(K(),tt(p,1,1,(()=>{p=null})),X())},i(t){a||(Z(d),Z(p),a=!0)},o(t){tt(p),a=!1},d(t){t&&v(e),l.d(),d&&d.d(),p&&p.d()}}}function At(){var t=document.getElementById("sendCode");t.select(),t.setSelectionRange(0,99999),navigator.clipboard.writeText(t.value)}function zt(t,e,o){let n;String.prototype.trimEllip=function(t){return this.length>t?this.substring(0,t)+"...":this};let i="",r="waiting",a=0,s=[],c=!1;return window.runtime.EventsOn("send:started",(function(t){o(1,i=t)})),window.runtime.EventsOn("send:updated",(function(t){o(3,a=t),"transferring"!=r&&o(2,r="transferring")})),window.runtime.EventsOn("send:status",(function(t){o(2,r=t),"completed"!=t&&"failed"!=t||setTimeout((()=>{o(4,c=!1),o(1,i="")}),500)})),D((()=>{ut.App.GetSelectedFiles().then((t=>{t&&t.length>0&&o(0,s=t)}))})),t.$$.update=()=>{1&t.$$.dirty&&o(5,n=s.map((t=>t.split("\\").pop().split("/").pop().trimEllip(30))))},[s,i,r,a,c,n,function(){ut.App.OpenDirectoryDialog().then((t=>{o(0,s=null!=t?t:[])})).catch((t=>{console.log(t)}))},function(){ut.App.OpenFilesDialog().then((t=>{o(0,s=null!=t?t:[])})).catch((t=>{console.log(t)}))},function(){o(1,i=""),o(2,r="waiting"),o(3,a=0),o(0,s=[]),o(4,c=!1),ut.App.ClearSelectedFiles()},function(){ut.App.SelectedFilesSend(),o(4,c=!0)}]}class Et extends lt{constructor(t){super(),ct(this,t,zt,_t,a,{})}}function Ft(t){let e,o,n,i,r,a,s=!t[4]&&jt(t);return{c(){e=y("div"),o=y("div"),n=$(),i=y("span"),r=k(t[6]),a=$(),s&&s.c(),S(o,"class","icon-lg receive-file-icon"),S(i,"class","text-gray-200"),S(e,"class","flex flex-col justify-center items-center space-y-2 bg-gray-800 rounded-md bg-opacity-60 h-full")},m(t,c){h(t,e,c),f(e,o),f(e,n),f(e,i),f(i,r),f(e,a),s&&s.m(e,null)},p(t,o){64&o&&_(r,t[6]),t[4]?s&&(s.d(1),s=null):s?s.p(t,o):(s=jt(t),s.c(),s.m(e,null))},d(t){t&&v(e),s&&s.d()}}}function jt(e){let o,n,i;return{c(){o=y("button"),o.textContent="Open",S(o,"class","open-button text-sm")},m(t,r){h(t,o,r),n||(i=C(o,"click",e[8]),n=!0)},p:t,d(t){t&&v(o),n=!1,i()}}}function Ot(t){let e,o;return e=new bt({props:{percent:t[3],status:t[2],$$slots:{default:[Ut]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,n){rt(e,t,n),o=!0},p(t,o){const n={};8&o&&(n.percent=t[3]),4&o&&(n.status=t[2]),2048&o&&(n.$$scope={dirty:o,ctx:t}),e.$set(n)},i(t){o||(Z(e.$$.fragment,t),o=!0)},o(t){tt(e.$$.fragment,t),o=!1},d(t){at(e,t)}}}function Ut(t){let e;return{c(){e=y("div"),S(e,"class","container grid")},m(t,o){h(t,e,o)},d(t){t&&v(e)}}}function Dt(t){let e,o,n,r,a,s,c,l,d,p,u,g,m,b,w,x,_=t[1]&&Ft(t),z=t[4]&&Ot(t);return{c(){e=y("div"),o=y("div"),_&&_.c(),n=$(),r=y("div"),a=y("form"),s=y("label"),s.textContent="Receive Code",c=$(),l=y("input"),d=$(),p=y("button"),u=k("Download"),m=$(),z&&z.c(),S(o,"class","border-2 border-green-300 rounded-md shadow-md w-72 h-56 p-2 mx-auto receive-icon-container"),S(s,"for","receiveCode"),S(s,"class","receive-input-label"),S(l,"id","receiveCode"),S(l,"type","text"),S(l,"placeholder","eg. 5-component-button"),S(l,"class","receive-input"),S(p,"class","receive-button"),S(p,"type","submit"),p.disabled=g=!t[5],S(a,"autocomplete","off"),S(r,"class","p-2 mx-auto"),S(e,"class","flex flex-col justify-items-center content-center m-2")},m(i,g){var v;h(i,e,g),f(e,o),_&&_.m(o,null),f(e,n),f(e,r),f(r,a),f(a,s),f(a,c),f(a,l),A(l,t[0]),f(a,d),f(a,p),f(p,u),f(e,m),z&&z.m(e,null),b=!0,w||(x=[C(l,"input",t[9]),C(a,"submit",(v=t[7],function(t){return t.preventDefault(),v.call(this,t)}))],w=!0)},p(t,[n]){t[1]?_?_.p(t,n):(_=Ft(t),_.c(),_.m(o,null)):_&&(_.d(1),_=null),1&n&&l.value!==t[0]&&A(l,t[0]),(!b||32&n&&g!==(g=!t[5]))&&(p.disabled=g),t[4]?z?(z.p(t,n),16&n&&Z(z,1)):(z=Ot(t),z.c(),Z(z,1),z.m(e,null)):z&&(K(),tt(z,1,1,(()=>{z=null})),X())},i(t){b||(Z(z),b=!0)},o(t){tt(z),b=!1},d(t){t&&v(e),_&&_.d(),z&&z.d(),w=!1,i(x)}}}const Pt=/\d+\-\w+\-\w+/;function Rt(t,e,o){let n,i,r="",a="waiting",s=0,c=!1,l="";return String.prototype.trimEllip=function(t){return this.length>t?this.substring(0,t)+"...":this},window.runtime.EventsOn("receive:updated",(function(t){o(3,s=t)})),window.runtime.EventsOn("receive:started",(function(){o(4,c=!0)})),window.runtime.EventsOn("receive:path",(function(t){o(1,l=t)})),window.runtime.EventsOn("receive:status",(function(t){o(2,a=t),"completed"==t&&setTimeout((()=>{o(4,c=!1)}),500)})),D((()=>{ut.App.GetReceivedFile().then((t=>{t&&o(1,l=t)}))})),t.$$.update=()=>{1&t.$$.dirty&&o(5,n=Pt.test(r)),2&t.$$.dirty&&o(6,i=l.split("\\").pop().split("/").pop().trimEllip(24))},[r,l,a,s,c,n,i,function(){ut.App.ReceiveFile(r)},function(){ut.App.OpenFile(l)},function(){r=this.value,o(0,r)}]}class Gt extends lt{constructor(t){super(),ct(this,t,Rt,Dt,a,{})}}function Nt(e){let o,n,r,a,s,c,l,d,p,u,g,m,b,w,x,A,z,E,F,j,O,U,D,P,R,G,N,B,M,L,T,I,q,W,V,H,J,Y,Q,K,X,Z,tt,et,ot;return{c(){o=y("div"),n=y("div"),r=y("div"),r.textContent="Downloads Folder",a=$(),s=y("div"),c=y("div"),l=k(e[0]),d=$(),p=y("div"),u=y("button"),u.textContent="Edit",g=$(),m=y("button"),m.textContent="Open",b=$(),w=y("div"),w.textContent="Notifications",x=$(),A=y("div"),z=y("label"),z.textContent="Show Desktop Notifications",E=$(),F=y("input"),j=$(),O=y("div"),O.textContent="Overwrite",U=$(),D=y("div"),P=y("label"),P.textContent="Overwrite Existing Files",R=$(),G=y("input"),N=$(),B=y("div"),B.textContent="Auto Update",M=$(),L=y("div"),T=y("label"),T.textContent="Auto Update Enabled",I=$(),q=y("input"),W=$(),V=y("div"),H=y("div"),H.textContent="Logs",J=$(),Y=y("div"),Q=y("div"),K=k(e[1]),X=$(),Z=y("div"),tt=y("button"),tt.textContent="Open",S(r,"class","text-gray-300"),S(c,"class","text-gray-200 text-sm"),S(u,"class","settings-button mr-1"),S(m,"class","settings-button"),S(s,"class","flex flex-row items-center justify-between"),S(n,"class","mb-1"),S(w,"class","text-gray-300"),S(z,"class","text-sm"),S(z,"for","notifications"),S(F,"class","checkbox"),S(F,"type","checkbox"),S(F,"id","notifications"),S(F,"name","notifications"),F.checked=e[2],S(A,"class","flex flex-row items-center justify-between mb-1"),S(O,"class","text-gray-300"),S(P,"class","text-sm"),S(P,"for","overwrite"),S(G,"class","checkbox"),S(G,"type","checkbox"),S(G,"id","overwrite"),S(G,"name","overwrite"),G.checked=e[3],S(D,"class","flex flex-row items-center justify-between mb-1"),S(B,"class","text-gray-300"),S(T,"class","text-sm"),S(T,"for","selfUpdate"),S(q,"class","checkbox"),S(q,"type","checkbox"),S(q,"id","selfUpdate"),S(q,"name","selfUpdate"),q.checked=e[4],S(L,"class","flex flex-row items-center justify-between mb-1"),S(H,"class","text-gray-300"),S(Q,"class","text-gray-200 text-sm"),S(tt,"class","settings-button"),S(Y,"class","flex flex-row items-center justify-between"),S(V,"class","mb-1"),S(o,"class","text-gray-200")},m(t,i){h(t,o,i),f(o,n),f(n,r),f(n,a),f(n,s),f(s,c),f(c,l),f(s,d),f(s,p),f(p,u),f(p,g),f(p,m),f(o,b),f(o,w),f(o,x),f(o,A),f(A,z),f(A,E),f(A,F),f(o,j),f(o,O),f(o,U),f(o,D),f(D,P),f(D,R),f(D,G),f(o,N),f(o,B),f(o,M),f(o,L),f(L,T),f(L,I),f(L,q),f(o,W),f(o,V),f(V,H),f(V,J),f(V,Y),f(Y,Q),f(Q,K),f(Y,X),f(Y,Z),f(Z,tt),et||(ot=[C(u,"click",e[5]),C(m,"click",e[6]),C(F,"input",e[8]),C(G,"input",e[7]),C(q,"input",e[9]),C(tt,"click",e[10])],et=!0)},p(t,[e]){1&e&&_(l,t[0]),4&e&&(F.checked=t[2]),8&e&&(G.checked=t[3]),16&e&&(q.checked=t[4]),2&e&&_(K,t[1])},i:t,o:t,d(t){t&&v(o),et=!1,i(ot)}}}function Bt(t,e,o){let n="",i="",r=!1,a=!1,s=!1;D((()=>{ut.App.GetUserPrefs().then((t=>{o(0,n=t.downloadsDirectory),o(2,r=t.notifications),o(3,a=t.overwrite),o(4,s=t.selfUpdate)})),ut.App.GetLogPath().then((t=>{o(1,i=t)}))}));return[n,i,r,a,s,function(){ut.App.SetDownloadsFolder().then((t=>{o(0,n=t)}))},function(){ut.App.OpenFile(n)},function(){ut.App.SetOverwriteParam(!a).then((t=>{o(3,a=t)}))},function(){ut.App.SetNotificationsParam(!r).then((t=>{o(2,r=t)}))},function(){ut.App.SetSelfUpdateParam(!s).then((t=>{o(4,s=t)}))},t=>window.runtime.BrowserOpenURL(i)]}class Mt extends lt{constructor(t){super(),ct(this,t,Bt,Nt,a,{})}}function Lt(t,e,o){const n=t.slice();return n[5]=e[o][0],n[6]=e[o][1],n}function Tt(t){let e,o,n,i,r,a=t[5]+"";function s(...e){return t[4](t[6],...e)}return{c(){e=y("li"),o=y("button"),n=k(a),S(o,"class","text-blue-500")},m(t,a){h(t,e,a),f(e,o),f(o,n),i||(r=C(o,"click",s),i=!0)},p(e,o){t=e},d(t){t&&v(e),i=!1,r()}}}function It(e){let o,n,r,a,s,c,l,d,p,u,g,m,b,w,A,z,E,F,j,O,U,D=Object.entries(e[1]),P=[];for(let t=0;t{ut.App.GetCurrentVersion().then((t=>{o(0,n=t)}))}));return[n,{"wailsapp/wails":"https://wails.io","Jackalz/wails-wormhole-gui":"https://github.com/Jacalz/wormhole-gui","psanford/wormhole-william":"https://github.com/psanford/wormhole-william","magic-wormhole":"https://magic-wormhole.readthedocs.io/",svelte:"https://github.com/sveltejs/svelte",tailwindcss:"https://github.com/tailwindlabs/tailwindcss","font awesome":"https://fontawesome.com","klauspost/compress":"https://github.com/klauspost/compress","go-github-selfupdate":"https://github.com/rhysd/go-github-selfupdate"},t=>window.runtime.BrowserOpenURL("https://riftshare.app"),t=>window.runtime.BrowserOpenURL("https://riftshare.app/faq.html"),(t,e)=>window.runtime.BrowserOpenURL(t)]}class Wt extends lt{constructor(t){super(),ct(this,t,qt,It,a,{})}}function Vt(t){let e,o;return e=new Wt({}),{c(){it(e.$$.fragment)},m(t,n){rt(e,t,n),o=!0},i(t){o||(Z(e.$$.fragment,t),o=!0)},o(t){tt(e.$$.fragment,t),o=!1},d(t){at(e,t)}}}function Ht(t){let e,o;return e=new Mt({}),{c(){it(e.$$.fragment)},m(t,n){rt(e,t,n),o=!0},i(t){o||(Z(e.$$.fragment,t),o=!0)},o(t){tt(e.$$.fragment,t),o=!1},d(t){at(e,t)}}}function Jt(t){let e,o;return e=new Gt({}),{c(){it(e.$$.fragment)},m(t,n){rt(e,t,n),o=!0},i(t){o||(Z(e.$$.fragment,t),o=!0)},o(t){tt(e.$$.fragment,t),o=!1},d(t){at(e,t)}}}function Yt(t){let e,o;return e=new Et({}),{c(){it(e.$$.fragment)},m(t,n){rt(e,t,n),o=!0},i(t){o||(Z(e.$$.fragment,t),o=!0)},o(t){tt(e.$$.fragment,t),o=!1},d(t){at(e,t)}}}function Qt(t){let e,o,n,r,a,s,c,l,d,p,u,g,m,b,w,x,k,_,A,z,E,F,j,O,U,D,P,R,G,N,B,M,L,T,I,q,W;const V=[Yt,Jt,Ht,Vt],H=[];function J(t,e){return"send"==t[0]?0:"receive"==t[0]?1:"settings"==t[0]?2:"about"==t[0]?3:-1}return~(L=J(t))&&(T=H[L]=V[L](t)),{c(){e=y("main"),o=y("div"),n=y("ul"),r=y("li"),a=y("button"),s=y("div"),c=$(),l=y("span"),l.textContent="Send",p=$(),u=y("li"),g=y("button"),m=y("div"),b=$(),w=y("span"),w.textContent="Receive",k=$(),_=y("li"),A=y("button"),z=y("div"),E=$(),F=y("span"),F.textContent="Settings",O=$(),U=y("li"),D=y("button"),P=y("div"),R=$(),G=y("span"),G.textContent="About",B=$(),M=y("div"),T&&T.c(),S(s,"class","icon send-tab-icon mr-1"),S(a,"class",d="send"==t[0]?"tab-item tab-item-active":"tab-item tab-item-inactive"),S(r,"class",""),S(m,"class","icon receive-tab-icon mr-1"),S(g,"class",x="receive"==t[0]?"tab-item tab-item-active":"tab-item tab-item-inactive"),S(u,"class",""),S(z,"class","icon settings-tab-icon mr-1"),S(A,"class",j="settings"==t[0]?"tab-item tab-item-active":"tab-item tab-item-inactive"),S(_,"class",""),S(P,"class","icon about-tab-icon mr-1"),S(D,"class",N="about"==t[0]?"tab-item tab-item-active":"tab-item tab-item-inactive"),S(U,"class",""),S(n,"class","flex justify-center space-x-1 flex-row"),S(o,"class","container mx-auto py-1"),S(M,"class","tab-container"),S(e,"data-wails-no-drag","")},m(i,d){h(i,e,d),f(e,o),f(o,n),f(n,r),f(r,a),f(a,s),f(a,c),f(a,l),f(n,p),f(n,u),f(u,g),f(g,m),f(g,b),f(g,w),f(n,k),f(n,_),f(_,A),f(A,z),f(A,E),f(A,F),f(n,O),f(n,U),f(U,D),f(D,P),f(D,R),f(D,G),f(e,B),f(e,M),~L&&H[L].m(M,null),I=!0,q||(W=[C(a,"click",t[1]),C(g,"click",t[2]),C(A,"click",t[3]),C(D,"click",t[4])],q=!0)},p(t,[e]){(!I||1&e&&d!==(d="send"==t[0]?"tab-item tab-item-active":"tab-item tab-item-inactive"))&&S(a,"class",d),(!I||1&e&&x!==(x="receive"==t[0]?"tab-item tab-item-active":"tab-item tab-item-inactive"))&&S(g,"class",x),(!I||1&e&&j!==(j="settings"==t[0]?"tab-item tab-item-active":"tab-item tab-item-inactive"))&&S(A,"class",j),(!I||1&e&&N!==(N="about"==t[0]?"tab-item tab-item-active":"tab-item tab-item-inactive"))&&S(D,"class",N);let o=L;L=J(t),L!==o&&(T&&(K(),tt(H[o],1,1,(()=>{H[o]=null})),X()),~L?(T=H[L],T||(T=H[L]=V[L](t),T.c()),Z(T,1),T.m(M,null)):T=null)},i(t){I||(Z(T),I=!0)},o(t){tt(T),I=!1},d(t){t&&v(e),~L&&H[L].d(),q=!1,i(W)}}}function Kt(t,e,o){let n="send";return[n,()=>o(0,n="send"),()=>o(0,n="receive"),()=>o(0,n="settings"),()=>o(0,n="about")]}!function(t,e){void 0===e&&(e={});var o=e.insertAt;if(t&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===o&&n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i),i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t))}}("/*! tailwindcss v2.2.19 | MIT License | https://tailwindcss.com*/\n\n/*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */html{-webkit-text-size-adjust:100%;line-height:1.15;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;margin:0}hr{color:inherit;height:0}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}[type=button],[type=submit],button{-webkit-appearance:button}::-moz-focus-inner{border-style:none;padding:0}legend{padding:0}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}button{background-color:transparent;background-image:none}fieldset,ol,ul{margin:0;padding:0}ol,ul{list-style:none}html{font-family:ui-sans-serif,system-ui,-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.5}body{font-family:inherit;line-height:inherit}*,:after,:before{border:0 solid;box-sizing:border-box}hr{border-top-width:1px}img{border-style:solid}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#94a3b8}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#94a3b8}input::placeholder,textarea::placeholder{color:#94a3b8}button{cursor:pointer}table{border-collapse:collapse}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}button,input,optgroup,select,textarea{color:inherit;line-height:inherit;padding:0}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}*,:after,:before{--tw-border-opacity:1;border-color:rgba(226,232,240,var(--tw-border-opacity))}[type=text],[type=time],[type=url],select,textarea{--tw-shadow:0 0 #0000;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#64748b;border-radius:0;border-width:1px;font-size:1rem;line-height:1.5rem;padding:.5rem .75rem}[type=text]:focus,[type=time]:focus,[type=url]:focus,select:focus,textarea:focus{--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#0891b2;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);border-color:#0891b2;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid transparent;outline-offset:2px}input::-moz-placeholder,textarea::-moz-placeholder{color:#64748b;opacity:1}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#64748b;opacity:1}input::placeholder,textarea::placeholder{color:#64748b;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em}select{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E\");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem}[type=checkbox],select{-webkit-print-color-adjust:exact;color-adjust:exact}[type=checkbox]{--tw-shadow:0 0 #0000;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;background-origin:border-box;border-color:#64748b;border-radius:0;border-width:1px;color:#0891b2;display:inline-block;flex-shrink:0;height:1rem;padding:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle;width:1rem}[type=checkbox]:focus{--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:#0891b2;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid transparent;outline-offset:2px}[type=checkbox]:checked{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.207 4.793a1 1 0 0 1 0 1.414l-5 5a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L6.5 9.086l4.293-4.293a1 1 0 0 1 1.414 0z'/%3E%3C/svg%3E\");background-position:50%;background-repeat:no-repeat;background-size:100% 100%}[type=checkbox]:checked,[type=checkbox]:checked:focus,[type=checkbox]:checked:hover{background-color:currentColor;border-color:transparent}[type=checkbox]:indeterminate{background-color:currentColor;background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3E%3Cpath stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3E%3C/svg%3E\");background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:transparent}[type=checkbox]:indeterminate:focus,[type=checkbox]:indeterminate:hover{background-color:currentColor;border-color:transparent}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.open-button{--tw-bg-opacity:1;background-color:rgba(20,184,166,var(--tw-bg-opacity));border-radius:.5rem}.open-button:hover{--tw-bg-opacity:1;background-color:rgba(15,118,110,var(--tw-bg-opacity))}.open-button:active{--tw-bg-opacity:1;background-color:rgba(17,94,89,var(--tw-bg-opacity))}.open-button{--tw-text-opacity:1;color:rgba(226,232,240,var(--tw-text-opacity));padding:.5rem;transition-duration:.15s}.send-input{border-radius:.375rem;border-width:1px}.send-input,.send-input:focus{border-color:transparent}.send-input{--tw-bg-opacity:1;--tw-text-opacity:1;--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06);--tw-shadow:inset 0 2px 4px 0 rgba(0,0,0,.06);background-color:rgba(51,65,85,var(--tw-bg-opacity));box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);color:rgba(226,232,240,var(--tw-text-opacity))}.send-input:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);--tw-ring-opacity:1;--tw-ring-color:rgba(94,234,212,var(--tw-ring-opacity));box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);outline:2px solid transparent;outline-offset:2px}.send-input-label{--tw-text-opacity:1;color:rgba(226,232,240,var(--tw-text-opacity));display:block;font-size:.875rem;line-height:1.25rem}.send-button{--tw-bg-opacity:1;background-color:rgba(13,148,136,var(--tw-bg-opacity));border-radius:.5rem}.send-button:hover{--tw-bg-opacity:1;background-color:rgba(15,118,110,var(--tw-bg-opacity))}.send-button:active{--tw-bg-opacity:1;background-color:rgba(17,94,89,var(--tw-bg-opacity))}.send-button{--tw-text-opacity:1;color:rgba(226,232,240,var(--tw-text-opacity));padding:.5rem 1rem}.send-button:disabled{opacity:.5}.send-button{transition-duration:.15s}.receive-input{border-bottom-left-radius:.375rem;border-top-left-radius:.375rem;border-width:1px}.receive-input,.receive-input:focus{border-color:transparent}.receive-input{--tw-bg-opacity:1;--tw-text-opacity:1;--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06);--tw-shadow:inset 0 2px 4px 0 rgba(0,0,0,.06);background-color:rgba(30,41,59,var(--tw-bg-opacity));box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);color:rgba(226,232,240,var(--tw-text-opacity))}.receive-input:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);--tw-ring-opacity:1;--tw-ring-color:rgba(94,234,212,var(--tw-ring-opacity));box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);outline:2px solid transparent;outline-offset:2px}.receive-input-label{--tw-text-opacity:1;color:rgba(203,213,225,var(--tw-text-opacity));display:block;font-size:.875rem;line-height:1.25rem}.receive-button{--tw-bg-opacity:1;background-color:rgba(13,148,136,var(--tw-bg-opacity));border-bottom-right-radius:.375rem;border-top-right-radius:.375rem}.receive-button:hover{--tw-bg-opacity:1;background-color:rgba(15,118,110,var(--tw-bg-opacity))}.receive-button:active{--tw-bg-opacity:1;background-color:rgba(17,94,89,var(--tw-bg-opacity))}.receive-button{--tw-text-opacity:1;color:rgba(226,232,240,var(--tw-text-opacity));padding:.5rem 1rem}.receive-button:disabled{opacity:.5}.receive-button{transition-duration:.15s}.send-icon-container{background-image:url(assets/images/upload-solid.svg)}.receive-icon-container,.send-icon-container{--tw-bg-opacity:1;--tw-bg-opacity:0.75;background-color:rgba(19,78,74,var(--tw-bg-opacity));background-position:50%;background-repeat:no-repeat;background-size:60%}.receive-icon-container{background-image:url(assets/images/download-solid.svg)}.file-list{list-style-position:inside;list-style-type:disc}.cursor-fix{cursor:default}.tab-item{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05);border-radius:.25rem;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);display:block;display:flex;flex-direction:row;font-size:.75rem;font-weight:700;justify-content:center;line-height:1rem;line-height:1.5;padding:.75rem;text-transform:uppercase;width:7rem}.tab-item-inactive{background-color:rgba(241,245,249,var(--tw-bg-opacity));color:rgba(17,94,89,var(--tw-text-opacity))}.tab-item-active,.tab-item-inactive{--tw-bg-opacity:1;--tw-text-opacity:1}.tab-item-active{background-color:rgba(17,94,89,var(--tw-bg-opacity));color:rgba(241,245,249,var(--tw-text-opacity))}.tab-container{width:100%}@media (min-width:640px){.tab-container{max-width:640px}}@media (min-width:768px){.tab-container{max-width:768px}}@media (min-width:1024px){.tab-container{max-width:1024px}}@media (min-width:1280px){.tab-container{max-width:1280px}}@media (min-width:1536px){.tab-container{max-width:1536px}}.tab-container{--tw-bg-opacity:1;--tw-bg-opacity:0.5;--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05);background-color:rgba(51,65,85,var(--tw-bg-opacity));border-radius:.5rem;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);height:82%;margin-left:auto;margin-right:auto;padding:1rem;width:91.666667%;z-index:10}.progress-outer{--tw-bg-opacity:1;--tw-bg-opacity:0.9;background-color:rgba(30,41,59,var(--tw-bg-opacity));bottom:0;height:100%;left:0;margin:auto;padding:1rem;position:absolute;right:0;top:0;width:100%;z-index:0}.progress-inner{position:relative;top:33.333333%}.icon{height:16px;width:16px}.icon,.icon-lg{background-repeat:no-repeat}.icon-lg{height:64px;width:64px}.receive-tab-icon{-webkit-mask-image:url(assets/images/download-solid.svg);mask-image:url(assets/images/download-solid.svg)}.receive-tab-icon,.send-tab-icon{--tw-bg-opacity:1;background-color:rgba(15,23,42,var(--tw-bg-opacity));-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.send-tab-icon{-webkit-mask-image:url(assets/images/paper-plane-solid.svg);mask-image:url(assets/images/paper-plane-solid.svg)}.settings-tab-icon{-webkit-mask-image:url(assets/images/cog-solid.svg);mask-image:url(assets/images/cog-solid.svg)}.about-tab-icon,.settings-tab-icon{--tw-bg-opacity:1;background-color:rgba(15,23,42,var(--tw-bg-opacity));-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.about-tab-icon{-webkit-mask-image:url(assets/images/info-circle-solid.svg);mask-image:url(assets/images/info-circle-solid.svg)}.send-file-icon{-webkit-mask-image:url(assets/images/file-upload-solid.svg);mask-image:url(assets/images/file-upload-solid.svg)}.receive-file-icon,.send-file-icon{--tw-bg-opacity:1;background-color:rgba(226,232,240,var(--tw-bg-opacity));-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.receive-file-icon{-webkit-mask-image:url(assets/images/file-download-solid.svg);mask-image:url(assets/images/file-download-solid.svg)}.folder-select-icon{--tw-bg-opacity:1;background-color:rgba(203,213,225,var(--tw-bg-opacity));content:\"\";display:block;height:6rem;-webkit-mask-image:url(assets/images/folder-regular.svg);mask-image:url(assets/images/folder-regular.svg);-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;width:6rem}.folder-select-icon:hover{--tw-bg-opacity:1;background-color:rgba(20,184,166,var(--tw-bg-opacity))}.folder-select-icon{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);transition-duration:.3s}.file-select-icon{--tw-bg-opacity:1;background-color:rgba(203,213,225,var(--tw-bg-opacity));content:\"\";display:block;height:6rem;-webkit-mask-image:url(assets/images/file-regular.svg);mask-image:url(assets/images/file-regular.svg);-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;width:6rem}.file-select-icon:hover{--tw-bg-opacity:1;background-color:rgba(20,184,166,var(--tw-bg-opacity))}.file-select-icon{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);transition-duration:.3s}.cancel-button{--tw-bg-opacity:1;background-color:rgba(153,27,27,var(--tw-bg-opacity));border-radius:.5rem}.cancel-button:hover{--tw-bg-opacity:1;background-color:rgba(185,28,28,var(--tw-bg-opacity))}.cancel-button:active{--tw-bg-opacity:1;background-color:rgba(127,29,29,var(--tw-bg-opacity))}.cancel-button{--tw-text-opacity:1;color:rgba(226,232,240,var(--tw-text-opacity));padding:.5rem 1rem}.cancel-button:disabled{opacity:.5}.cancel-button{transition-duration:.15s}.tooltip{--tw-border-opacity:1;--tw-bg-opacity:1;--tw-text-opacity:1;--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05);background-color:rgba(226,232,240,var(--tw-bg-opacity));border-color:rgba(15,118,110,var(--tw-border-opacity));border-radius:.25rem;border-width:1px;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);color:rgba(30,41,59,var(--tw-text-opacity));font-size:.875rem;line-height:1.25rem;margin-top:-2rem;padding:.25rem;position:absolute;visibility:hidden}.has-tooltip:hover .tooltip{visibility:visible;z-index:50}.checkbox{--tw-border-opacity:1;--tw-bg-opacity:1;background-color:rgba(15,118,110,var(--tw-bg-opacity));border-color:rgba(203,213,225,var(--tw-border-opacity));border-radius:.25rem;border-width:1px;height:1rem;width:1rem}.checkbox:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);--tw-ring-opacity:1;--tw-ring-color:rgba(94,234,212,var(--tw-ring-opacity));box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.settings-button{--tw-bg-opacity:1;background-color:rgba(13,148,136,var(--tw-bg-opacity));border-radius:.5rem}.settings-button:hover{--tw-bg-opacity:1;background-color:rgba(15,118,110,var(--tw-bg-opacity))}.settings-button:active{--tw-bg-opacity:1;background-color:rgba(17,94,89,var(--tw-bg-opacity))}.settings-button{--tw-text-opacity:1;color:rgba(226,232,240,var(--tw-text-opacity));font-size:.875rem;line-height:1.25rem;padding:.25rem}.settings-button:disabled{opacity:.5}.settings-button{transition-duration:.15s}.m-2{margin:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-bottom:.5rem;margin-top:.5rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mr-1{margin-right:.25rem}.mb-1{margin-bottom:.25rem}.inline-block{display:inline-block}.flex{display:flex}.table{display:table}.grid{display:grid}.h-4{height:1rem}.h-36{height:9rem}.h-56{height:14rem}.h-full{height:100%}.w-60{width:15rem}.w-72{width:18rem}.w-full{width:100%}@-webkit-keyframes spin{to{transform:rotate(1turn)}}@keyframes spin{to{transform:rotate(1turn)}}@-webkit-keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@-webkit-keyframes pulse{50%{opacity:.5}}@keyframes pulse{50%{opacity:.5}}@-webkit-keyframes bounce{0%,to{-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}@keyframes bounce{0%,to{-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}.animate-pulse{-webkit-animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite;animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.grid-flow-row{grid-auto-flow:row}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.place-items-center{place-items:center}.content-center{align-content:center}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.justify-items-center{justify-items:center}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.25rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.25rem*var(--tw-space-x-reverse))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.rounded-md{border-radius:.375rem}.rounded-lg{border-radius:.5rem}.rounded-full{border-radius:9999px}.border-2{border-width:2px}.border-green-300{--tw-border-opacity:1;border-color:rgba(94,234,212,var(--tw-border-opacity))}.bg-gray-800{--tw-bg-opacity:1;background-color:rgba(30,41,59,var(--tw-bg-opacity))}.bg-green-500{--tw-bg-opacity:1;background-color:rgba(20,184,166,var(--tw-bg-opacity))}.bg-green-900{--tw-bg-opacity:1;background-color:rgba(19,78,74,var(--tw-bg-opacity))}.bg-purple-500{--tw-bg-opacity:1;background-color:rgba(139,92,246,var(--tw-bg-opacity))}.bg-opacity-60{--tw-bg-opacity:0.6}.p-2{padding:.5rem}.px-4{padding-left:1rem;padding-right:1rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-8{padding-bottom:2rem;padding-top:2rem}.pt-2{padding-top:.5rem}.pb-2{padding-bottom:.5rem}.text-center{text-align:center}.font-sans{font-family:ui-sans-serif,system-ui,-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}.text-xs{font-size:.75rem;line-height:1rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-base{font-size:1rem;line-height:1.5rem}.font-medium{font-weight:500}.text-white{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}.text-gray-100{--tw-text-opacity:1;color:rgba(241,245,249,var(--tw-text-opacity))}.text-gray-200{--tw-text-opacity:1;color:rgba(226,232,240,var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity:1;color:rgba(203,213,225,var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity:1;color:rgba(148,163,184,var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity:1;color:rgba(6,182,212,var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity:1;color:rgba(8,145,178,var(--tw-text-opacity))}*,:after,:before{--tw-shadow:0 0 #0000}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06)}.shadow-lg,.shadow-md{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 rgba(0,0,0,.06);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}*,:after,:before{--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(6,182,212,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000}main{height:100%;width:100%}div{overscroll:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}");return new class extends lt{constructor(t){super(),ct(this,t,Kt,Qt,a,{})}}({target:document.body})}(); +var app=function(){"use strict";function t(){}const e=t=>t;function o(t){return t()}function n(){return Object.create(null)}function i(t){t.forEach(o)}function r(t){return"function"==typeof t}function a(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function s(t,e,o,n){return t[1]&&n?function(t,e){for(const o in e)t[o]=e[o];return t}(o.ctx.slice(),t[1](n(e))):o.ctx}function c(t,e,o,n,i,r,a){const c=function(t,e,o,n){if(t[2]&&n){const i=t[2](n(o));if(void 0===e.dirty)return i;if("object"==typeof i){const t=[],o=Math.max(e.dirty.length,i.length);for(let n=0;nwindow.performance.now():()=>Date.now(),p=l?t=>requestAnimationFrame(t):t;const u=new Set;function g(t){u.forEach((e=>{e.c(t)||(u.delete(e),e.f())})),0!==u.size&&p(g)}function m(t){let e;return 0===u.size&&p(g),{promise:new Promise((o=>{u.add(e={c:t,f:o})})),abort(){u.delete(e)}}}let b=!1;function w(t,e,o,n){for(;t>1);o(i)<=n?t=i+1:e=i}return t}function f(t,e){b?(!function(t){if(t.hydrate_init)return;t.hydrate_init=!0;const e=t.childNodes,o=new Int32Array(e.length+1),n=new Int32Array(e.length);o[0]=-1;let i=0;for(let t=0;te[o[t]].claim_order),e[t].claim_order)-1;n[t]=o[r]+1;const a=r+1;o[a]=t,i=Math.max(a,i)}const r=[],a=[];let s=e.length-1;for(let t=o[i]+1;0!=t;t=n[t-1]){for(r.push(e[t-1]);s>=t;s--)a.push(e[s]);s--}for(;s>=0;s--)a.push(e[s]);r.reverse(),a.sort(((t,e)=>t.claim_order-e.claim_order));for(let e=0,o=0;e=r[o].claim_order;)o++;const n=ot.removeEventListener(e,o,n)}function C(t,e,o){null==o?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o)}function A(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function F(t,e){t.value=null==e?"":e}const _=new Set;let z,E=0;function O(t,e,o,n,i,r,a,s=0){const c=16.666/n;let l="{\n";for(let t=0;t<=1;t+=c){const n=e+(o-e)*r(t);l+=100*t+`%{${a(n,1-n)}}\n`}const d=l+`100% {${a(o,1-o)}}\n}`,p=`__svelte_${function(t){let e=5381,o=t.length;for(;o--;)e=(e<<5)-e^t.charCodeAt(o);return e>>>0}(d)}_${s}`,u=t.ownerDocument;_.add(u);const g=u.__svelte_stylesheet||(u.__svelte_stylesheet=u.head.appendChild(y("style")).sheet),m=u.__svelte_rules||(u.__svelte_rules={});m[p]||(m[p]=!0,g.insertRule(`@keyframes ${p} ${d}`,g.cssRules.length));const b=t.style.animation||"";return t.style.animation=`${b?`${b}, `:""}${p} ${n}ms linear ${i}ms 1 both`,E+=1,p}function j(t,e){const o=(t.style.animation||"").split(", "),n=o.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),i=o.length-n.length;i&&(t.style.animation=n.join(", "),E-=i,E||p((()=>{E||(_.forEach((t=>{const e=t.__svelte_stylesheet;let o=e.cssRules.length;for(;o--;)e.deleteRule(o);t.__svelte_rules={}})),_.clear())})))}function U(t){z=t}function P(t){(function(){if(!z)throw new Error("Function called outside component initialization");return z})().$$.on_mount.push(t)}const D=[],G=[],R=[],N=[],L=Promise.resolve();let B=!1;function M(t){R.push(t)}let I=!1;const T=new Set;function q(){if(!I){I=!0;do{for(let t=0;t{V=null}))),V}function J(t,e,o){t.dispatchEvent(function(t,e){const o=document.createEvent("CustomEvent");return o.initCustomEvent(t,!1,!1,e),o}(`${e?"intro":"outro"}${o}`))}const Y=new Set;let Q;function K(){Q={r:0,c:[],p:Q}}function X(){Q.r||i(Q.c),Q=Q.p}function Z(t,e){t&&t.i&&(Y.delete(t),t.i(e))}function tt(t,e,o,n){if(t&&t.o){if(Y.has(t))return;Y.add(t),Q.c.push((()=>{Y.delete(t),n&&(o&&t.d(1),n())})),t.o(e)}}const et={duration:0};function ot(o,n,i){let a,s,c=n(o,i),l=!1,p=0;function u(){a&&j(o,a)}function g(){const{delay:n=0,duration:i=300,easing:r=e,tick:g=t,css:b}=c||et;b&&(a=O(o,0,1,i,n,r,b,p++)),g(0,1);const w=d()+n,f=w+i;s&&s.abort(),l=!0,M((()=>J(o,!0,"start"))),s=m((t=>{if(l){if(t>=f)return g(1,0),J(o,!0,"end"),u(),l=!1;if(t>=w){const e=r((t-w)/i);g(e,1-e)}}return l}))}let b=!1;return{start(){b||(j(o),r(c)?(c=c(),H().then(g)):g())},invalidate(){b=!1},end(){l&&(u(),l=!1)}}}function nt(o,n,a,s){let c=n(o,a),l=s?0:1,p=null,u=null,g=null;function b(){g&&j(o,g)}function w(t,e){const o=t.b-l;return e*=Math.abs(o),{a:l,b:t.b,d:o,duration:e,start:t.start,end:t.start+e,group:t.group}}function f(n){const{delay:r=0,duration:a=300,easing:s=e,tick:f=t,css:h}=c||et,v={start:d()+r,b:n};n||(v.group=Q,Q.r+=1),p||u?u=v:(h&&(b(),g=O(o,l,n,a,r,s,h)),n&&f(0,1),p=w(v,a),M((()=>J(o,n,"start"))),m((t=>{if(u&&t>u.start&&(p=w(u,a),u=null,J(o,p.b,"start"),h&&(b(),g=O(o,l,p.b,p.duration,0,s,c.css))),p)if(t>=p.end)f(l=p.b,1-l),J(o,p.b,"end"),u||(p.b?b():--p.group.r||i(p.group.c)),p=null;else if(t>=p.start){const e=t-p.start;l=p.a+p.d*s(e/p.duration),f(l,1-l)}return!(!p&&!u)})))}return{run(t){r(c)?H().then((()=>{c=c(),f(t)})):f(t)},end(){b(),p=u=null}}}function it(t){t&&t.c()}function rt(t,e,n,a){const{fragment:s,on_mount:c,on_destroy:l,after_update:d}=t.$$;s&&s.m(e,n),a||M((()=>{const e=c.map(o).filter(r);l?l.push(...e):i(e),t.$$.on_mount=[]})),d.forEach(M)}function at(t,e){const o=t.$$;null!==o.fragment&&(i(o.on_destroy),o.fragment&&o.fragment.d(e),o.on_destroy=o.fragment=null,o.ctx=[])}function st(t,e){-1===t.$$.dirty[0]&&(D.push(t),B||(B=!0,L.then(q)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const i=n.length?n[0]:o;return p.ctx&&s(p.ctx[t],p.ctx[t]=i)&&(!p.skip_bound&&p.bound[t]&&p.bound[t](i),u&&st(e,t)),o})):[],p.update(),u=!0,i(p.before_update),p.fragment=!!a&&a(p.ctx),o.target){if(o.hydrate){b=!0;const t=function(t){return Array.from(t.childNodes)}(o.target);p.fragment&&p.fragment.l(t),t.forEach(v)}else p.fragment&&p.fragment.c();o.intro&&Z(e.$$.fragment),rt(e,o.target,o.anchor,o.customElement),b=!1,q()}U(d)}class lt{$destroy(){at(this,1),this.$destroy=t}$on(t,e){const o=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return o.push(e),()=>{const t=o.indexOf(e);-1!==t&&o.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function dt(t){const e=t-1;return e*e*e+1}function pt(t,{delay:e=0,duration:o=400,easing:n=dt}={}){const i=getComputedStyle(t),r=+i.opacity,a=parseFloat(i.height),s=parseFloat(i.paddingTop),c=parseFloat(i.paddingBottom),l=parseFloat(i.marginTop),d=parseFloat(i.marginBottom),p=parseFloat(i.borderTopWidth),u=parseFloat(i.borderBottomWidth);return{delay:e,duration:o,easing:n,css:t=>`overflow: hidden;opacity: ${Math.min(20*t,1)*r};height: ${t*a}px;padding-top: ${t*s}px;padding-bottom: ${t*c}px;margin-top: ${t*l}px;margin-bottom: ${t*d}px;border-top-width: ${t*p}px;border-bottom-width: ${t*u}px;`}}window.wailsbindings={main:{App:{CancelWormholeRequest:{name:"main.App.CancelWormholeRequest"},ClearSelectedFiles:{name:"main.App.ClearSelectedFiles"},GetCurrentVersion:{name:"main.App.GetCurrentVersion",outputs:[{type:"string"}]},GetDownloadsFolder:{name:"main.App.GetDownloadsFolder",outputs:[{type:"string"}]},GetLogPath:{name:"main.App.GetLogPath",outputs:[{type:"string"}]},GetNotificationsParam:{name:"main.App.GetNotificationsParam",outputs:[{type:"bool"}]},GetOverwriteParam:{name:"main.App.GetOverwriteParam",outputs:[{type:"bool"}]},GetReceivedFile:{name:"main.App.GetReceivedFile",outputs:[{type:"string"}]},GetSelectedFiles:{name:"main.App.GetSelectedFiles",outputs:[{type:"[]string"}]},GetUserPrefs:{name:"main.App.GetUserPrefs",outputs:[{type:"settings.UserSettings"}]},OpenDirectoryDialog:{name:"main.App.OpenDirectoryDialog",outputs:[{type:"[]string"},{type:"error"}]},OpenFile:{name:"main.App.OpenFile",inputs:[{type:"string"}]},OpenFilesDialog:{name:"main.App.OpenFilesDialog",outputs:[{type:"[]string"},{type:"error"}]},ReceiveFile:{name:"main.App.ReceiveFile",inputs:[{type:"string"}]},SelectedFilesSend:{name:"main.App.SelectedFilesSend"},SendDirectory:{name:"main.App.SendDirectory",inputs:[{type:"string"}]},SendFile:{name:"main.App.SendFile",inputs:[{type:"string"}]},SetDownloadsFolder:{name:"main.App.SetDownloadsFolder",outputs:[{type:"string"}]},SetNotificationsParam:{name:"main.App.SetNotificationsParam",inputs:[{type:"bool"}],outputs:[{type:"bool"}]},SetOverwriteParam:{name:"main.App.SetOverwriteParam",inputs:[{type:"bool"}],outputs:[{type:"bool"}]},SetSelfUpdateParam:{name:"main.App.SetSelfUpdateParam",inputs:[{type:"bool"}],outputs:[{type:"bool"}]},ShowErrorDialog:{name:"main.App.ShowErrorDialog",inputs:[{type:"string"}]},UpdateCheckUI:{name:"main.App.UpdateCheckUI"},UpdateSendProgress:{name:"main.App.UpdateSendProgress",inputs:[{type:"int64"},{type:"int64"}]}}}};const ut={App:{CancelWormholeRequest:()=>window.go.main.App.CancelWormholeRequest(),ClearSelectedFiles:()=>window.go.main.App.ClearSelectedFiles(),GetCurrentVersion:()=>window.go.main.App.GetCurrentVersion(),GetDownloadsFolder:()=>window.go.main.App.GetDownloadsFolder(),GetLogPath:()=>window.go.main.App.GetLogPath(),GetNotificationsParam:()=>window.go.main.App.GetNotificationsParam(),GetOverwriteParam:()=>window.go.main.App.GetOverwriteParam(),GetReceivedFile:()=>window.go.main.App.GetReceivedFile(),GetSelectedFiles:()=>window.go.main.App.GetSelectedFiles(),GetUserPrefs:()=>window.go.main.App.GetUserPrefs(),OpenDirectoryDialog:()=>window.go.main.App.OpenDirectoryDialog(),OpenFile:t=>window.go.main.App.OpenFile(t),OpenFilesDialog:()=>window.go.main.App.OpenFilesDialog(),ReceiveFile:t=>window.go.main.App.ReceiveFile(t),SelectedFilesSend:()=>window.go.main.App.SelectedFilesSend(),SendDirectory:t=>window.go.main.App.SendDirectory(t),SendFile:t=>window.go.main.App.SendFile(t),SetDownloadsFolder:()=>window.go.main.App.SetDownloadsFolder(),SetNotificationsParam:t=>window.go.main.App.SetNotificationsParam(t),SetOverwriteParam:t=>window.go.main.App.SetOverwriteParam(t),SetSelfUpdateParam:t=>window.go.main.App.SetSelfUpdateParam(t),ShowErrorDialog:t=>window.go.main.App.ShowErrorDialog(t),UpdateCheckUI:()=>window.go.main.App.UpdateCheckUI(),UpdateSendProgress:(t,e)=>window.go.main.App.UpdateSendProgress(t,e)}};function gt(t){let e,o,n,i,r,a,l,d,p,u,g,m,b,w,x,S;const F=t[3].default,_=function(t,e,o,n){if(t){const i=s(t,e,o,n);return t[0](i)}}(F,t,t[2],null);return{c(){e=y("div"),o=y("div"),n=y("div"),i=y("span"),r=k(t[0]),a=$(),l=y("span"),d=k(t[1]),p=k("%"),u=$(),g=y("div"),m=y("div"),w=$(),_&&_.c(),C(i,"class","text-base text-gray-100 font-medium"),C(l,"class","text-sm font-medium text-gray-100"),C(n,"class","mb-1 flex justify-between"),C(m,"class","bg-green-500 h-4 rounded-full animate-pulse"),C(m,"style",b="width: "+t[1].toString()+"%"),C(g,"class","w-full bg-green-900 rounded-full h-4 shadow-inner"),C(o,"class","progress-inner"),C(e,"class","progress-outer")},m(t,s){h(t,e,s),f(e,o),f(o,n),f(n,i),f(i,r),f(n,a),f(n,l),f(l,d),f(l,p),f(o,u),f(o,g),f(g,m),f(o,w),_&&_.m(o,null),S=!0},p(t,[e]){(!S||1&e)&&A(r,t[0]),(!S||2&e)&&A(d,t[1]),(!S||2&e&&b!==(b="width: "+t[1].toString()+"%"))&&C(m,"style",b),_&&_.p&&(!S||4&e)&&c(_,F,t,t[2],S?e:-1,null,null)},i(t){S||(Z(_,t),M((()=>{x||(x=nt(e,pt,{},!0)),x.run(1)})),S=!0)},o(t){tt(_,t),x||(x=nt(e,pt,{},!1)),x.run(0),S=!1},d(t){t&&v(e),_&&_.d(t),t&&x&&x.end()}}}function mt(t,e,o){let{$$slots:n={},$$scope:i}=e,{status:r=waiting}=e,{percent:a=0}=e;return t.$$set=t=>{"status"in t&&o(0,r=t.status),"percent"in t&&o(1,a=t.percent),"$$scope"in t&&o(2,i=t.$$scope)},[r,a,i,n]}class bt extends lt{constructor(t){super(),ct(this,t,mt,gt,a,{status:0,percent:1})}}function wt(t,e,o){const n=t.slice();return n[11]=e[o],n[13]=o,n}function ft(t){let e,o,n,r,a,s,c,l,d,p,u,g;return{c(){e=y("div"),o=y("div"),n=y("span"),n.textContent="Send Files",r=$(),a=y("button"),s=$(),c=y("div"),l=y("span"),l.textContent="Send Directory",d=$(),p=y("button"),C(n,"class","tooltip"),C(a,"class","file-select-icon"),a.disabled=t[4],C(o,"class","has-tooltip"),C(l,"class","tooltip"),C(p,"class","folder-select-icon"),p.disabled=t[4],C(c,"class","has-tooltip"),C(e,"class","flex flex-row items-center content-center justify-around place-items-center h-full")},m(i,m){h(i,e,m),f(e,o),f(o,n),f(o,r),f(o,a),f(e,s),f(e,c),f(c,l),f(c,d),f(c,p),u||(g=[S(a,"click",t[7]),S(p,"click",t[6])],u=!0)},p(t,e){16&e&&(a.disabled=t[4]),16&e&&(p.disabled=t[4])},d(t){t&&v(e),u=!1,i(g)}}}function ht(t){let e,o=t[5],n=[];for(let e=0;e{r=ot(o,pt,{duration:200}),r.start()})),l||M((()=>{l=ot(s,pt,{duration:200}),l.start()}))},o:t,d(t){t&&v(o),t&&v(a),t&&v(s),d=!1,i(p)}}}function $t(t){let e,o;return e=new bt({props:{percent:t[3],status:t[2],$$slots:{default:[Ct]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,n){rt(e,t,n),o=!0},p(t,o){const n={};8&o&&(n.percent=t[3]),4&o&&(n.status=t[2]),16386&o&&(n.$$scope={dirty:o,ctx:t}),e.$set(n)},i(t){o||(Z(e.$$.fragment,t),o=!0)},o(t){tt(e.$$.fragment,t),o=!1},d(t){at(e,t)}}}function St(t){let e,o,n,i,r,a,s,c,l,d;return{c(){e=y("div"),o=y("label"),o.textContent="Send Code",n=$(),i=y("input"),r=$(),a=y("button"),a.textContent="📄",C(o,"for","sendCode"),C(o,"class","send-input-label"),C(i,"id","sendCode"),i.readOnly=!0,C(i,"type","text"),C(i,"placeholder","Send code will appear"),i.value=t[1],C(i,"class","send-input mt-1"),C(a,"class","send-button"),C(e,"class","mx-auto mt-2")},m(t,s){h(t,e,s),f(e,o),f(e,n),f(e,i),f(e,r),f(e,a),c=!0,l||(d=S(a,"click",Ft),l=!0)},p(t,e){(!c||2&e&&i.value!==t[1])&&(i.value=t[1])},i(t){c||(M((()=>{s||(s=nt(e,pt,{},!0)),s.run(1)})),c=!0)},o(t){s||(s=nt(e,pt,{},!1)),s.run(0),c=!1},d(t){t&&v(e),t&&s&&s.end(),l=!1,d()}}}function Ct(t){let e,o,n,i,r,a,s=t[1]&&St(t);return{c(){e=y("div"),o=y("button"),o.textContent="Cancel",n=$(),s&&s.c(),C(o,"class","my-2 mx-auto cancel-button"),C(e,"class","container grid")},m(c,l){h(c,e,l),f(e,o),f(e,n),s&&s.m(e,null),i=!0,r||(a=S(o,"click",t[9]),r=!0)},p(t,o){t[1]?s?(s.p(t,o),2&o&&Z(s,1)):(s=St(t),s.c(),Z(s,1),s.m(e,null)):s&&(K(),tt(s,1,1,(()=>{s=null})),X())},i(t){i||(Z(s),i=!0)},o(t){tt(s),i=!1},d(t){t&&v(e),s&&s.d(),r=!1,a()}}}function At(t){let e,o,n,i,r,a;function s(t,e){return t[0].length>0?ht:ft}let c=s(t),l=c(t),d=t[0].length>0&&kt(t),p=t[4]&&$t(t);return{c(){e=y("div"),o=y("div"),l.c(),n=$(),i=y("div"),d&&d.c(),r=$(),p&&p.c(),C(o,"class","border-2 border-green-300 rounded-md shadow-md w-72 h-56 p-2 mx-auto cursor-fix send-icon-container"),C(i,"class","p-2 mx-auto"),C(e,"class","flex flex-col justify-items-center content-center m-2")},m(t,s){h(t,e,s),f(e,o),l.m(o,null),f(e,n),f(e,i),d&&d.m(i,null),f(e,r),p&&p.m(e,null),a=!0},p(t,[n]){c===(c=s(t))&&l?l.p(t,n):(l.d(1),l=c(t),l&&(l.c(),l.m(o,null))),t[0].length>0?d?(d.p(t,n),1&n&&Z(d,1)):(d=kt(t),d.c(),Z(d,1),d.m(i,null)):d&&(d.d(1),d=null),t[4]?p?(p.p(t,n),16&n&&Z(p,1)):(p=$t(t),p.c(),Z(p,1),p.m(e,null)):p&&(K(),tt(p,1,1,(()=>{p=null})),X())},i(t){a||(Z(d),Z(p),a=!0)},o(t){tt(p),a=!1},d(t){t&&v(e),l.d(),d&&d.d(),p&&p.d()}}}function Ft(){var t=document.getElementById("sendCode");t.select(),t.setSelectionRange(0,99999),navigator.clipboard.writeText(t.value)}function _t(t,e,o){let n;String.prototype.trimEllip=function(t){return this.length>t?this.substring(0,t)+"...":this};let i="",r="waiting",a=0,s=[],c=!1;return window.runtime.EventsOn("send:started",(function(t){o(1,i=t)})),window.runtime.EventsOn("send:updated",(function(t){o(3,a=t),"transferring"!=r&&o(2,r="transferring")})),window.runtime.EventsOn("send:status",(function(t){o(2,r=t),"completed"!=t&&"failed"!=t||setTimeout((()=>{o(4,c=!1),o(1,i="")}),500)})),P((()=>{ut.App.GetSelectedFiles().then((t=>{t&&t.length>0&&o(0,s=t)}))})),t.$$.update=()=>{1&t.$$.dirty&&o(5,n=s.map((t=>t.split("\\").pop().split("/").pop().trimEllip(30))))},[s,i,r,a,c,n,function(){ut.App.OpenDirectoryDialog().then((t=>{o(0,s=null!=t?t:[])})).catch((t=>{console.log(t)}))},function(){ut.App.OpenFilesDialog().then((t=>{o(0,s=null!=t?t:[])})).catch((t=>{console.log(t)}))},function(){o(1,i=""),o(2,r="waiting"),o(3,a=0),o(0,s=[]),o(4,c=!1),ut.App.ClearSelectedFiles()},function(){ut.App.CancelWormholeRequest().then((()=>{o(4,c=!1),o(1,i=""),o(2,r="waiting"),o(3,a=0)})).catch((t=>{console.log(t)}))},function(){ut.App.SelectedFilesSend(),o(4,c=!0)}]}class zt extends lt{constructor(t){super(),ct(this,t,_t,At,a,{})}}function Et(t){let e,o,n,i,r,a,s=!t[4]&&Ot(t);return{c(){e=y("div"),o=y("div"),n=$(),i=y("span"),r=k(t[6]),a=$(),s&&s.c(),C(o,"class","icon-lg receive-file-icon"),C(i,"class","text-gray-200"),C(e,"class","flex flex-col justify-center items-center space-y-2 bg-gray-800 rounded-md bg-opacity-60 h-full")},m(t,c){h(t,e,c),f(e,o),f(e,n),f(e,i),f(i,r),f(e,a),s&&s.m(e,null)},p(t,o){64&o&&A(r,t[6]),t[4]?s&&(s.d(1),s=null):s?s.p(t,o):(s=Ot(t),s.c(),s.m(e,null))},d(t){t&&v(e),s&&s.d()}}}function Ot(e){let o,n,i;return{c(){o=y("button"),o.textContent="Open",C(o,"class","open-button text-sm")},m(t,r){h(t,o,r),n||(i=S(o,"click",e[8]),n=!0)},p:t,d(t){t&&v(o),n=!1,i()}}}function jt(t){let e,o;return e=new bt({props:{percent:t[3],status:t[2],$$slots:{default:[Ut]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,n){rt(e,t,n),o=!0},p(t,o){const n={};8&o&&(n.percent=t[3]),4&o&&(n.status=t[2]),2048&o&&(n.$$scope={dirty:o,ctx:t}),e.$set(n)},i(t){o||(Z(e.$$.fragment,t),o=!0)},o(t){tt(e.$$.fragment,t),o=!1},d(t){at(e,t)}}}function Ut(e){let o,n,i,r;return{c(){o=y("div"),n=y("button"),n.textContent="Cancel",C(n,"class","my-2 mx-auto cancel-button"),C(o,"class","container grid")},m(t,a){h(t,o,a),f(o,n),i||(r=S(n,"click",e[9]),i=!0)},p:t,d(t){t&&v(o),i=!1,r()}}}function Pt(t){let e,o,n,r,a,s,c,l,d,p,u,g,m,b,w,x,A=t[1]&&Et(t),_=t[4]&&jt(t);return{c(){e=y("div"),o=y("div"),A&&A.c(),n=$(),r=y("div"),a=y("form"),s=y("label"),s.textContent="Receive Code",c=$(),l=y("input"),d=$(),p=y("button"),u=k("Download"),m=$(),_&&_.c(),C(o,"class","border-2 border-green-300 rounded-md shadow-md w-72 h-56 p-2 mx-auto receive-icon-container"),C(s,"for","receiveCode"),C(s,"class","receive-input-label"),C(l,"id","receiveCode"),C(l,"type","text"),C(l,"placeholder","eg. 5-component-button"),C(l,"class","receive-input"),C(p,"class","receive-button"),C(p,"type","submit"),p.disabled=g=!t[5],C(a,"autocomplete","off"),C(r,"class","p-2 mx-auto"),C(e,"class","flex flex-col justify-items-center content-center m-2")},m(i,g){var v;h(i,e,g),f(e,o),A&&A.m(o,null),f(e,n),f(e,r),f(r,a),f(a,s),f(a,c),f(a,l),F(l,t[0]),f(a,d),f(a,p),f(p,u),f(e,m),_&&_.m(e,null),b=!0,w||(x=[S(l,"input",t[10]),S(a,"submit",(v=t[7],function(t){return t.preventDefault(),v.call(this,t)}))],w=!0)},p(t,[n]){t[1]?A?A.p(t,n):(A=Et(t),A.c(),A.m(o,null)):A&&(A.d(1),A=null),1&n&&l.value!==t[0]&&F(l,t[0]),(!b||32&n&&g!==(g=!t[5]))&&(p.disabled=g),t[4]?_?(_.p(t,n),16&n&&Z(_,1)):(_=jt(t),_.c(),Z(_,1),_.m(e,null)):_&&(K(),tt(_,1,1,(()=>{_=null})),X())},i(t){b||(Z(_),b=!0)},o(t){tt(_),b=!1},d(t){t&&v(e),A&&A.d(),_&&_.d(),w=!1,i(x)}}}const Dt=/\d+\-\w+\-\w+/;function Gt(t,e,o){let n,i,r="",a="waiting",s=0,c=!1,l="";return String.prototype.trimEllip=function(t){return this.length>t?this.substring(0,t)+"...":this},window.runtime.EventsOn("receive:updated",(function(t){o(3,s=t)})),window.runtime.EventsOn("receive:started",(function(){o(4,c=!0)})),window.runtime.EventsOn("receive:path",(function(t){o(1,l=t)})),window.runtime.EventsOn("receive:status",(function(t){o(2,a=t),"completed"==t&&setTimeout((()=>{o(4,c=!1)}),500)})),P((()=>{ut.App.GetReceivedFile().then((t=>{t&&o(1,l=t)}))})),t.$$.update=()=>{1&t.$$.dirty&&o(5,n=Dt.test(r)),2&t.$$.dirty&&o(6,i=l.split("\\").pop().split("/").pop().trimEllip(24))},[r,l,a,s,c,n,i,function(){ut.App.ReceiveFile(r)},function(){ut.App.OpenFile(l)},function(){ut.App.CancelWormholeRequest().then((()=>{o(4,c=!1),o(0,r=""),o(2,a="waiting"),o(3,s=0),o(1,l="")})).catch((t=>{console.log(t)}))},function(){r=this.value,o(0,r)}]}class Rt extends lt{constructor(t){super(),ct(this,t,Gt,Pt,a,{})}}function Nt(e){let o,n,r,a,s,c,l,d,p,u,g,m,b,w,x,F,_,z,E,O,j,U,P,D,G,R,N,L,B,M,I,T,q,W,V,H,J,Y,Q,K,X,Z,tt,et,ot;return{c(){o=y("div"),n=y("div"),r=y("div"),r.textContent="Downloads Folder",a=$(),s=y("div"),c=y("div"),l=k(e[0]),d=$(),p=y("div"),u=y("button"),u.textContent="Edit",g=$(),m=y("button"),m.textContent="Open",b=$(),w=y("div"),w.textContent="Notifications",x=$(),F=y("div"),_=y("label"),_.textContent="Show Desktop Notifications",z=$(),E=y("input"),O=$(),j=y("div"),j.textContent="Overwrite",U=$(),P=y("div"),D=y("label"),D.textContent="Overwrite Existing Files",G=$(),R=y("input"),N=$(),L=y("div"),L.textContent="Auto Update",B=$(),M=y("div"),I=y("label"),I.textContent="Auto Update Enabled",T=$(),q=y("input"),W=$(),V=y("div"),H=y("div"),H.textContent="Logs",J=$(),Y=y("div"),Q=y("div"),K=k(e[1]),X=$(),Z=y("div"),tt=y("button"),tt.textContent="Open",C(r,"class","text-gray-300"),C(c,"class","text-gray-200 text-sm"),C(u,"class","settings-button mr-1"),C(m,"class","settings-button"),C(s,"class","flex flex-row items-center justify-between"),C(n,"class","mb-1"),C(w,"class","text-gray-300"),C(_,"class","text-sm"),C(_,"for","notifications"),C(E,"class","checkbox"),C(E,"type","checkbox"),C(E,"id","notifications"),C(E,"name","notifications"),E.checked=e[2],C(F,"class","flex flex-row items-center justify-between mb-1"),C(j,"class","text-gray-300"),C(D,"class","text-sm"),C(D,"for","overwrite"),C(R,"class","checkbox"),C(R,"type","checkbox"),C(R,"id","overwrite"),C(R,"name","overwrite"),R.checked=e[3],C(P,"class","flex flex-row items-center justify-between mb-1"),C(L,"class","text-gray-300"),C(I,"class","text-sm"),C(I,"for","selfUpdate"),C(q,"class","checkbox"),C(q,"type","checkbox"),C(q,"id","selfUpdate"),C(q,"name","selfUpdate"),q.checked=e[4],C(M,"class","flex flex-row items-center justify-between mb-1"),C(H,"class","text-gray-300"),C(Q,"class","text-gray-200 text-sm"),C(tt,"class","settings-button"),C(Y,"class","flex flex-row items-center justify-between"),C(V,"class","mb-1"),C(o,"class","text-gray-200")},m(t,i){h(t,o,i),f(o,n),f(n,r),f(n,a),f(n,s),f(s,c),f(c,l),f(s,d),f(s,p),f(p,u),f(p,g),f(p,m),f(o,b),f(o,w),f(o,x),f(o,F),f(F,_),f(F,z),f(F,E),f(o,O),f(o,j),f(o,U),f(o,P),f(P,D),f(P,G),f(P,R),f(o,N),f(o,L),f(o,B),f(o,M),f(M,I),f(M,T),f(M,q),f(o,W),f(o,V),f(V,H),f(V,J),f(V,Y),f(Y,Q),f(Q,K),f(Y,X),f(Y,Z),f(Z,tt),et||(ot=[S(u,"click",e[5]),S(m,"click",e[6]),S(E,"input",e[8]),S(R,"input",e[7]),S(q,"input",e[9]),S(tt,"click",e[10])],et=!0)},p(t,[e]){1&e&&A(l,t[0]),4&e&&(E.checked=t[2]),8&e&&(R.checked=t[3]),16&e&&(q.checked=t[4]),2&e&&A(K,t[1])},i:t,o:t,d(t){t&&v(o),et=!1,i(ot)}}}function Lt(t,e,o){let n="",i="",r=!1,a=!1,s=!1;P((()=>{ut.App.GetUserPrefs().then((t=>{o(0,n=t.downloadsDirectory),o(2,r=t.notifications),o(3,a=t.overwrite),o(4,s=t.selfUpdate)})),ut.App.GetLogPath().then((t=>{o(1,i=t)}))}));return[n,i,r,a,s,function(){ut.App.SetDownloadsFolder().then((t=>{o(0,n=t)}))},function(){ut.App.OpenFile(n)},function(){ut.App.SetOverwriteParam(!a).then((t=>{o(3,a=t)}))},function(){ut.App.SetNotificationsParam(!r).then((t=>{o(2,r=t)}))},function(){ut.App.SetSelfUpdateParam(!s).then((t=>{o(4,s=t)}))},t=>window.runtime.BrowserOpenURL(i)]}class Bt extends lt{constructor(t){super(),ct(this,t,Lt,Nt,a,{})}}function Mt(t,e,o){const n=t.slice();return n[5]=e[o][0],n[6]=e[o][1],n}function It(t){let e,o,n,i,r,a=t[5]+"";function s(...e){return t[4](t[6],...e)}return{c(){e=y("li"),o=y("button"),n=k(a),C(o,"class","text-blue-500")},m(t,a){h(t,e,a),f(e,o),f(o,n),i||(r=S(o,"click",s),i=!0)},p(e,o){t=e},d(t){t&&v(e),i=!1,r()}}}function Tt(e){let o,n,r,a,s,c,l,d,p,u,g,m,b,w,F,_,z,E,O,j,U,P=Object.entries(e[1]),D=[];for(let t=0;t{ut.App.GetCurrentVersion().then((t=>{o(0,n=t)}))}));return[n,{"wailsapp/wails":"https://wails.io","Jackalz/wails-wormhole-gui":"https://github.com/Jacalz/wormhole-gui","psanford/wormhole-william":"https://github.com/psanford/wormhole-william","magic-wormhole":"https://magic-wormhole.readthedocs.io/",svelte:"https://github.com/sveltejs/svelte",tailwindcss:"https://github.com/tailwindlabs/tailwindcss","font awesome":"https://fontawesome.com","klauspost/compress":"https://github.com/klauspost/compress","go-github-selfupdate":"https://github.com/rhysd/go-github-selfupdate"},t=>window.runtime.BrowserOpenURL("https://riftshare.app"),t=>window.runtime.BrowserOpenURL("https://riftshare.app/faq.html"),(t,e)=>window.runtime.BrowserOpenURL(t)]}class Wt extends lt{constructor(t){super(),ct(this,t,qt,Tt,a,{})}}function Vt(t){let e,o;return e=new Wt({}),{c(){it(e.$$.fragment)},m(t,n){rt(e,t,n),o=!0},i(t){o||(Z(e.$$.fragment,t),o=!0)},o(t){tt(e.$$.fragment,t),o=!1},d(t){at(e,t)}}}function Ht(t){let e,o;return e=new Bt({}),{c(){it(e.$$.fragment)},m(t,n){rt(e,t,n),o=!0},i(t){o||(Z(e.$$.fragment,t),o=!0)},o(t){tt(e.$$.fragment,t),o=!1},d(t){at(e,t)}}}function Jt(t){let e,o;return e=new Rt({}),{c(){it(e.$$.fragment)},m(t,n){rt(e,t,n),o=!0},i(t){o||(Z(e.$$.fragment,t),o=!0)},o(t){tt(e.$$.fragment,t),o=!1},d(t){at(e,t)}}}function Yt(t){let e,o;return e=new zt({}),{c(){it(e.$$.fragment)},m(t,n){rt(e,t,n),o=!0},i(t){o||(Z(e.$$.fragment,t),o=!0)},o(t){tt(e.$$.fragment,t),o=!1},d(t){at(e,t)}}}function Qt(t){let e,o,n,r,a,s,c,l,d,p,u,g,m,b,w,x,k,A,F,_,z,E,O,j,U,P,D,G,R,N,L,B,M,I,T,q,W;const V=[Yt,Jt,Ht,Vt],H=[];function J(t,e){return"send"==t[0]?0:"receive"==t[0]?1:"settings"==t[0]?2:"about"==t[0]?3:-1}return~(M=J(t))&&(I=H[M]=V[M](t)),{c(){e=y("main"),o=y("div"),n=y("ul"),r=y("li"),a=y("button"),s=y("div"),c=$(),l=y("span"),l.textContent="Send",p=$(),u=y("li"),g=y("button"),m=y("div"),b=$(),w=y("span"),w.textContent="Receive",k=$(),A=y("li"),F=y("button"),_=y("div"),z=$(),E=y("span"),E.textContent="Settings",j=$(),U=y("li"),P=y("button"),D=y("div"),G=$(),R=y("span"),R.textContent="About",L=$(),B=y("div"),I&&I.c(),C(s,"class","icon send-tab-icon mr-1"),C(a,"class",d="send"==t[0]?"tab-item tab-item-active":"tab-item tab-item-inactive"),C(r,"class",""),C(m,"class","icon receive-tab-icon mr-1"),C(g,"class",x="receive"==t[0]?"tab-item tab-item-active":"tab-item tab-item-inactive"),C(u,"class",""),C(_,"class","icon settings-tab-icon mr-1"),C(F,"class",O="settings"==t[0]?"tab-item tab-item-active":"tab-item tab-item-inactive"),C(A,"class",""),C(D,"class","icon about-tab-icon mr-1"),C(P,"class",N="about"==t[0]?"tab-item tab-item-active":"tab-item tab-item-inactive"),C(U,"class",""),C(n,"class","flex justify-center space-x-1 flex-row"),C(o,"class","container mx-auto py-1"),C(B,"class","tab-container"),C(e,"data-wails-no-drag","")},m(i,d){h(i,e,d),f(e,o),f(o,n),f(n,r),f(r,a),f(a,s),f(a,c),f(a,l),f(n,p),f(n,u),f(u,g),f(g,m),f(g,b),f(g,w),f(n,k),f(n,A),f(A,F),f(F,_),f(F,z),f(F,E),f(n,j),f(n,U),f(U,P),f(P,D),f(P,G),f(P,R),f(e,L),f(e,B),~M&&H[M].m(B,null),T=!0,q||(W=[S(a,"click",t[1]),S(g,"click",t[2]),S(F,"click",t[3]),S(P,"click",t[4])],q=!0)},p(t,[e]){(!T||1&e&&d!==(d="send"==t[0]?"tab-item tab-item-active":"tab-item tab-item-inactive"))&&C(a,"class",d),(!T||1&e&&x!==(x="receive"==t[0]?"tab-item tab-item-active":"tab-item tab-item-inactive"))&&C(g,"class",x),(!T||1&e&&O!==(O="settings"==t[0]?"tab-item tab-item-active":"tab-item tab-item-inactive"))&&C(F,"class",O),(!T||1&e&&N!==(N="about"==t[0]?"tab-item tab-item-active":"tab-item tab-item-inactive"))&&C(P,"class",N);let o=M;M=J(t),M!==o&&(I&&(K(),tt(H[o],1,1,(()=>{H[o]=null})),X()),~M?(I=H[M],I||(I=H[M]=V[M](t),I.c()),Z(I,1),I.m(B,null)):I=null)},i(t){T||(Z(I),T=!0)},o(t){tt(I),T=!1},d(t){t&&v(e),~M&&H[M].d(),q=!1,i(W)}}}function Kt(t,e,o){let n="send";return[n,()=>o(0,n="send"),()=>o(0,n="receive"),()=>o(0,n="settings"),()=>o(0,n="about")]}!function(t,e){void 0===e&&(e={});var o=e.insertAt;if(t&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===o&&n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i),i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t))}}("/*! tailwindcss v2.2.19 | MIT License | https://tailwindcss.com*/\n\n/*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */html{-webkit-text-size-adjust:100%;line-height:1.15;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;margin:0}hr{color:inherit;height:0}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}[type=button],[type=submit],button{-webkit-appearance:button}::-moz-focus-inner{border-style:none;padding:0}legend{padding:0}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}button{background-color:transparent;background-image:none}fieldset,ol,ul{margin:0;padding:0}ol,ul{list-style:none}html{font-family:ui-sans-serif,system-ui,-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.5}body{font-family:inherit;line-height:inherit}*,:after,:before{border:0 solid;box-sizing:border-box}hr{border-top-width:1px}img{border-style:solid}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#94a3b8}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#94a3b8}input::placeholder,textarea::placeholder{color:#94a3b8}button{cursor:pointer}table{border-collapse:collapse}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}button,input,optgroup,select,textarea{color:inherit;line-height:inherit;padding:0}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}*,:after,:before{--tw-border-opacity:1;border-color:rgba(226,232,240,var(--tw-border-opacity))}[type=text],[type=time],[type=url],select,textarea{--tw-shadow:0 0 #0000;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#64748b;border-radius:0;border-width:1px;font-size:1rem;line-height:1.5rem;padding:.5rem .75rem}[type=text]:focus,[type=time]:focus,[type=url]:focus,select:focus,textarea:focus{--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#0891b2;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);border-color:#0891b2;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid transparent;outline-offset:2px}input::-moz-placeholder,textarea::-moz-placeholder{color:#64748b;opacity:1}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#64748b;opacity:1}input::placeholder,textarea::placeholder{color:#64748b;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em}select{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E\");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem}[type=checkbox],select{-webkit-print-color-adjust:exact;color-adjust:exact}[type=checkbox]{--tw-shadow:0 0 #0000;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;background-origin:border-box;border-color:#64748b;border-radius:0;border-width:1px;color:#0891b2;display:inline-block;flex-shrink:0;height:1rem;padding:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle;width:1rem}[type=checkbox]:focus{--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:#0891b2;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid transparent;outline-offset:2px}[type=checkbox]:checked{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.207 4.793a1 1 0 0 1 0 1.414l-5 5a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L6.5 9.086l4.293-4.293a1 1 0 0 1 1.414 0z'/%3E%3C/svg%3E\");background-position:50%;background-repeat:no-repeat;background-size:100% 100%}[type=checkbox]:checked,[type=checkbox]:checked:focus,[type=checkbox]:checked:hover{background-color:currentColor;border-color:transparent}[type=checkbox]:indeterminate{background-color:currentColor;background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3E%3Cpath stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3E%3C/svg%3E\");background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:transparent}[type=checkbox]:indeterminate:focus,[type=checkbox]:indeterminate:hover{background-color:currentColor;border-color:transparent}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.open-button{--tw-bg-opacity:1;background-color:rgba(20,184,166,var(--tw-bg-opacity));border-radius:.5rem}.open-button:hover{--tw-bg-opacity:1;background-color:rgba(15,118,110,var(--tw-bg-opacity))}.open-button:active{--tw-bg-opacity:1;background-color:rgba(17,94,89,var(--tw-bg-opacity))}.open-button{--tw-text-opacity:1;color:rgba(226,232,240,var(--tw-text-opacity));padding:.5rem;transition-duration:.15s}.send-input{border-radius:.375rem;border-width:1px}.send-input,.send-input:focus{border-color:transparent}.send-input{--tw-bg-opacity:1;--tw-text-opacity:1;--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06);--tw-shadow:inset 0 2px 4px 0 rgba(0,0,0,.06);background-color:rgba(51,65,85,var(--tw-bg-opacity));box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);color:rgba(226,232,240,var(--tw-text-opacity))}.send-input:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);--tw-ring-opacity:1;--tw-ring-color:rgba(94,234,212,var(--tw-ring-opacity));box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);outline:2px solid transparent;outline-offset:2px}.send-input-label{--tw-text-opacity:1;color:rgba(226,232,240,var(--tw-text-opacity));display:block;font-size:.875rem;line-height:1.25rem}.send-button{--tw-bg-opacity:1;background-color:rgba(13,148,136,var(--tw-bg-opacity));border-radius:.5rem}.send-button:hover{--tw-bg-opacity:1;background-color:rgba(15,118,110,var(--tw-bg-opacity))}.send-button:active{--tw-bg-opacity:1;background-color:rgba(17,94,89,var(--tw-bg-opacity))}.send-button{--tw-text-opacity:1;color:rgba(226,232,240,var(--tw-text-opacity));padding:.5rem 1rem}.send-button:disabled{opacity:.5}.send-button{transition-duration:.15s}.receive-input{border-bottom-left-radius:.375rem;border-top-left-radius:.375rem;border-width:1px}.receive-input,.receive-input:focus{border-color:transparent}.receive-input{--tw-bg-opacity:1;--tw-text-opacity:1;--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06);--tw-shadow:inset 0 2px 4px 0 rgba(0,0,0,.06);background-color:rgba(30,41,59,var(--tw-bg-opacity));box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);color:rgba(226,232,240,var(--tw-text-opacity))}.receive-input:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);--tw-ring-opacity:1;--tw-ring-color:rgba(94,234,212,var(--tw-ring-opacity));box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);outline:2px solid transparent;outline-offset:2px}.receive-input-label{--tw-text-opacity:1;color:rgba(203,213,225,var(--tw-text-opacity));display:block;font-size:.875rem;line-height:1.25rem}.receive-button{--tw-bg-opacity:1;background-color:rgba(13,148,136,var(--tw-bg-opacity));border-bottom-right-radius:.375rem;border-top-right-radius:.375rem}.receive-button:hover{--tw-bg-opacity:1;background-color:rgba(15,118,110,var(--tw-bg-opacity))}.receive-button:active{--tw-bg-opacity:1;background-color:rgba(17,94,89,var(--tw-bg-opacity))}.receive-button{--tw-text-opacity:1;color:rgba(226,232,240,var(--tw-text-opacity));padding:.5rem 1rem}.receive-button:disabled{opacity:.5}.receive-button{transition-duration:.15s}.send-icon-container{background-image:url(assets/images/upload-solid.svg)}.receive-icon-container,.send-icon-container{--tw-bg-opacity:1;--tw-bg-opacity:0.75;background-color:rgba(19,78,74,var(--tw-bg-opacity));background-position:50%;background-repeat:no-repeat;background-size:60%}.receive-icon-container{background-image:url(assets/images/download-solid.svg)}.file-list{list-style-position:inside;list-style-type:disc}.cursor-fix{cursor:default}.tab-item{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05);border-radius:.25rem;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);display:block;display:flex;flex-direction:row;font-size:.75rem;font-weight:700;justify-content:center;line-height:1rem;line-height:1.5;padding:.75rem;text-transform:uppercase;width:7rem}.tab-item-inactive{background-color:rgba(241,245,249,var(--tw-bg-opacity));color:rgba(17,94,89,var(--tw-text-opacity))}.tab-item-active,.tab-item-inactive{--tw-bg-opacity:1;--tw-text-opacity:1}.tab-item-active{background-color:rgba(17,94,89,var(--tw-bg-opacity));color:rgba(241,245,249,var(--tw-text-opacity))}.tab-container{width:100%}@media (min-width:640px){.tab-container{max-width:640px}}@media (min-width:768px){.tab-container{max-width:768px}}@media (min-width:1024px){.tab-container{max-width:1024px}}@media (min-width:1280px){.tab-container{max-width:1280px}}@media (min-width:1536px){.tab-container{max-width:1536px}}.tab-container{--tw-bg-opacity:1;--tw-bg-opacity:0.5;--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05);background-color:rgba(51,65,85,var(--tw-bg-opacity));border-radius:.5rem;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);height:82%;margin-left:auto;margin-right:auto;padding:1rem;width:91.666667%;z-index:10}.progress-outer{--tw-bg-opacity:1;--tw-bg-opacity:0.9;background-color:rgba(30,41,59,var(--tw-bg-opacity));bottom:0;height:100%;left:0;margin:auto;padding:1rem;position:absolute;right:0;top:0;width:100%;z-index:0}.progress-inner{position:relative;top:33.333333%}.icon{height:16px;width:16px}.icon,.icon-lg{background-repeat:no-repeat}.icon-lg{height:64px;width:64px}.receive-tab-icon{-webkit-mask-image:url(assets/images/download-solid.svg);mask-image:url(assets/images/download-solid.svg)}.receive-tab-icon,.send-tab-icon{--tw-bg-opacity:1;background-color:rgba(15,23,42,var(--tw-bg-opacity));-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.send-tab-icon{-webkit-mask-image:url(assets/images/paper-plane-solid.svg);mask-image:url(assets/images/paper-plane-solid.svg)}.settings-tab-icon{-webkit-mask-image:url(assets/images/cog-solid.svg);mask-image:url(assets/images/cog-solid.svg)}.about-tab-icon,.settings-tab-icon{--tw-bg-opacity:1;background-color:rgba(15,23,42,var(--tw-bg-opacity));-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.about-tab-icon{-webkit-mask-image:url(assets/images/info-circle-solid.svg);mask-image:url(assets/images/info-circle-solid.svg)}.send-file-icon{-webkit-mask-image:url(assets/images/file-upload-solid.svg);mask-image:url(assets/images/file-upload-solid.svg)}.receive-file-icon,.send-file-icon{--tw-bg-opacity:1;background-color:rgba(226,232,240,var(--tw-bg-opacity));-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.receive-file-icon{-webkit-mask-image:url(assets/images/file-download-solid.svg);mask-image:url(assets/images/file-download-solid.svg)}.folder-select-icon{--tw-bg-opacity:1;background-color:rgba(203,213,225,var(--tw-bg-opacity));content:\"\";display:block;height:6rem;-webkit-mask-image:url(assets/images/folder-regular.svg);mask-image:url(assets/images/folder-regular.svg);-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;width:6rem}.folder-select-icon:hover{--tw-bg-opacity:1;background-color:rgba(20,184,166,var(--tw-bg-opacity))}.folder-select-icon{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);transition-duration:.3s}.file-select-icon{--tw-bg-opacity:1;background-color:rgba(203,213,225,var(--tw-bg-opacity));content:\"\";display:block;height:6rem;-webkit-mask-image:url(assets/images/file-regular.svg);mask-image:url(assets/images/file-regular.svg);-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;width:6rem}.file-select-icon:hover{--tw-bg-opacity:1;background-color:rgba(20,184,166,var(--tw-bg-opacity))}.file-select-icon{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);transition-duration:.3s}.cancel-button{--tw-bg-opacity:1;background-color:rgba(153,27,27,var(--tw-bg-opacity));border-radius:.5rem}.cancel-button:hover{--tw-bg-opacity:1;background-color:rgba(185,28,28,var(--tw-bg-opacity))}.cancel-button:active{--tw-bg-opacity:1;background-color:rgba(127,29,29,var(--tw-bg-opacity))}.cancel-button{--tw-text-opacity:1;color:rgba(226,232,240,var(--tw-text-opacity));padding:.5rem 1rem}.cancel-button:disabled{opacity:.5}.cancel-button{transition-duration:.15s}.tooltip{--tw-border-opacity:1;--tw-bg-opacity:1;--tw-text-opacity:1;--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05);background-color:rgba(226,232,240,var(--tw-bg-opacity));border-color:rgba(15,118,110,var(--tw-border-opacity));border-radius:.25rem;border-width:1px;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);color:rgba(30,41,59,var(--tw-text-opacity));font-size:.875rem;line-height:1.25rem;margin-top:-2rem;padding:.25rem;position:absolute;visibility:hidden}.has-tooltip:hover .tooltip{visibility:visible;z-index:50}.checkbox{--tw-border-opacity:1;--tw-bg-opacity:1;background-color:rgba(15,118,110,var(--tw-bg-opacity));border-color:rgba(203,213,225,var(--tw-border-opacity));border-radius:.25rem;border-width:1px;height:1rem;width:1rem}.checkbox:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);--tw-ring-opacity:1;--tw-ring-color:rgba(94,234,212,var(--tw-ring-opacity));box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.settings-button{--tw-bg-opacity:1;background-color:rgba(13,148,136,var(--tw-bg-opacity));border-radius:.5rem}.settings-button:hover{--tw-bg-opacity:1;background-color:rgba(15,118,110,var(--tw-bg-opacity))}.settings-button:active{--tw-bg-opacity:1;background-color:rgba(17,94,89,var(--tw-bg-opacity))}.settings-button{--tw-text-opacity:1;color:rgba(226,232,240,var(--tw-text-opacity));font-size:.875rem;line-height:1.25rem;padding:.25rem}.settings-button:disabled{opacity:.5}.settings-button{transition-duration:.15s}.m-2{margin:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-bottom:.5rem;margin-top:.5rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mr-1{margin-right:.25rem}.mb-1{margin-bottom:.25rem}.inline-block{display:inline-block}.flex{display:flex}.table{display:table}.grid{display:grid}.h-4{height:1rem}.h-36{height:9rem}.h-56{height:14rem}.h-full{height:100%}.w-60{width:15rem}.w-72{width:18rem}.w-full{width:100%}@-webkit-keyframes spin{to{transform:rotate(1turn)}}@keyframes spin{to{transform:rotate(1turn)}}@-webkit-keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@-webkit-keyframes pulse{50%{opacity:.5}}@keyframes pulse{50%{opacity:.5}}@-webkit-keyframes bounce{0%,to{-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}@keyframes bounce{0%,to{-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}.animate-pulse{-webkit-animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite;animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.grid-flow-row{grid-auto-flow:row}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.place-items-center{place-items:center}.content-center{align-content:center}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.justify-items-center{justify-items:center}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.25rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.25rem*var(--tw-space-x-reverse))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.rounded-md{border-radius:.375rem}.rounded-lg{border-radius:.5rem}.rounded-full{border-radius:9999px}.border-2{border-width:2px}.border-green-300{--tw-border-opacity:1;border-color:rgba(94,234,212,var(--tw-border-opacity))}.bg-gray-800{--tw-bg-opacity:1;background-color:rgba(30,41,59,var(--tw-bg-opacity))}.bg-green-500{--tw-bg-opacity:1;background-color:rgba(20,184,166,var(--tw-bg-opacity))}.bg-green-900{--tw-bg-opacity:1;background-color:rgba(19,78,74,var(--tw-bg-opacity))}.bg-purple-500{--tw-bg-opacity:1;background-color:rgba(139,92,246,var(--tw-bg-opacity))}.bg-opacity-60{--tw-bg-opacity:0.6}.p-2{padding:.5rem}.px-4{padding-left:1rem;padding-right:1rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-8{padding-bottom:2rem;padding-top:2rem}.pt-2{padding-top:.5rem}.pb-2{padding-bottom:.5rem}.text-center{text-align:center}.font-sans{font-family:ui-sans-serif,system-ui,-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}.text-xs{font-size:.75rem;line-height:1rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-base{font-size:1rem;line-height:1.5rem}.font-medium{font-weight:500}.text-white{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}.text-gray-100{--tw-text-opacity:1;color:rgba(241,245,249,var(--tw-text-opacity))}.text-gray-200{--tw-text-opacity:1;color:rgba(226,232,240,var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity:1;color:rgba(203,213,225,var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity:1;color:rgba(148,163,184,var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity:1;color:rgba(6,182,212,var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity:1;color:rgba(8,145,178,var(--tw-text-opacity))}*,:after,:before{--tw-shadow:0 0 #0000}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06)}.shadow-lg,.shadow-md{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 rgba(0,0,0,.06);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}*,:after,:before{--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(6,182,212,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000}main{height:100%;width:100%}div{overscroll:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}");return new class extends lt{constructor(t){super(),ct(this,t,Kt,Qt,a,{})}}({target:document.body})}(); //# sourceMappingURL=bundle.js.map diff --git a/frontend/dist/bundle.js.map b/frontend/dist/bundle.js.map index d40d2e1..5aa5e09 100644 --- a/frontend/dist/bundle.js.map +++ b/frontend/dist/bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"bundle.js","sources":["../node_modules/svelte/internal/index.mjs","../node_modules/svelte/easing/index.mjs","../node_modules/svelte/transition/index.mjs","../wailsjs/go/bindings.js","../src/progress.svelte","../src/sender.svelte","../src/receiver.svelte","../src/settings.svelte","../src/about.svelte","../src/App.svelte","../node_modules/style-inject/dist/style-inject.es.js","../src/main.js"],"sourcesContent":["function noop() { }\nconst identity = x => x;\nfunction assign(tar, src) {\n // @ts-ignore\n for (const k in src)\n tar[k] = src[k];\n return tar;\n}\nfunction is_promise(value) {\n return value && typeof value === 'object' && typeof value.then === 'function';\n}\nfunction add_location(element, file, line, column, char) {\n element.__svelte_meta = {\n loc: { file, line, column, char }\n };\n}\nfunction run(fn) {\n return fn();\n}\nfunction blank_object() {\n return Object.create(null);\n}\nfunction run_all(fns) {\n fns.forEach(run);\n}\nfunction is_function(thing) {\n return typeof thing === 'function';\n}\nfunction safe_not_equal(a, b) {\n return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');\n}\nfunction not_equal(a, b) {\n return a != a ? b == b : a !== b;\n}\nfunction is_empty(obj) {\n return Object.keys(obj).length === 0;\n}\nfunction validate_store(store, name) {\n if (store != null && typeof store.subscribe !== 'function') {\n throw new Error(`'${name}' is not a store with a 'subscribe' method`);\n }\n}\nfunction subscribe(store, ...callbacks) {\n if (store == null) {\n return noop;\n }\n const unsub = store.subscribe(...callbacks);\n return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;\n}\nfunction get_store_value(store) {\n let value;\n subscribe(store, _ => value = _)();\n return value;\n}\nfunction component_subscribe(component, store, callback) {\n component.$$.on_destroy.push(subscribe(store, callback));\n}\nfunction create_slot(definition, ctx, $$scope, fn) {\n if (definition) {\n const slot_ctx = get_slot_context(definition, ctx, $$scope, fn);\n return definition[0](slot_ctx);\n }\n}\nfunction get_slot_context(definition, ctx, $$scope, fn) {\n return definition[1] && fn\n ? assign($$scope.ctx.slice(), definition[1](fn(ctx)))\n : $$scope.ctx;\n}\nfunction get_slot_changes(definition, $$scope, dirty, fn) {\n if (definition[2] && fn) {\n const lets = definition[2](fn(dirty));\n if ($$scope.dirty === undefined) {\n return lets;\n }\n if (typeof lets === 'object') {\n const merged = [];\n const len = Math.max($$scope.dirty.length, lets.length);\n for (let i = 0; i < len; i += 1) {\n merged[i] = $$scope.dirty[i] | lets[i];\n }\n return merged;\n }\n return $$scope.dirty | lets;\n }\n return $$scope.dirty;\n}\nfunction update_slot(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_context_fn) {\n const slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n if (slot_changes) {\n const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n slot.p(slot_context, slot_changes);\n }\n}\nfunction update_slot_spread(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_spread_changes_fn, get_slot_context_fn) {\n const slot_changes = get_slot_spread_changes_fn(dirty) | get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n if (slot_changes) {\n const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n slot.p(slot_context, slot_changes);\n }\n}\nfunction exclude_internal_props(props) {\n const result = {};\n for (const k in props)\n if (k[0] !== '$')\n result[k] = props[k];\n return result;\n}\nfunction compute_rest_props(props, keys) {\n const rest = {};\n keys = new Set(keys);\n for (const k in props)\n if (!keys.has(k) && k[0] !== '$')\n rest[k] = props[k];\n return rest;\n}\nfunction compute_slots(slots) {\n const result = {};\n for (const key in slots) {\n result[key] = true;\n }\n return result;\n}\nfunction once(fn) {\n let ran = false;\n return function (...args) {\n if (ran)\n return;\n ran = true;\n fn.call(this, ...args);\n };\n}\nfunction null_to_empty(value) {\n return value == null ? '' : value;\n}\nfunction set_store_value(store, ret, value = ret) {\n store.set(value);\n return ret;\n}\nconst has_prop = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\nfunction action_destroyer(action_result) {\n return action_result && is_function(action_result.destroy) ? action_result.destroy : noop;\n}\n\nconst is_client = typeof window !== 'undefined';\nlet now = is_client\n ? () => window.performance.now()\n : () => Date.now();\nlet raf = is_client ? cb => requestAnimationFrame(cb) : noop;\n// used internally for testing\nfunction set_now(fn) {\n now = fn;\n}\nfunction set_raf(fn) {\n raf = fn;\n}\n\nconst tasks = new Set();\nfunction run_tasks(now) {\n tasks.forEach(task => {\n if (!task.c(now)) {\n tasks.delete(task);\n task.f();\n }\n });\n if (tasks.size !== 0)\n raf(run_tasks);\n}\n/**\n * For testing purposes only!\n */\nfunction clear_loops() {\n tasks.clear();\n}\n/**\n * Creates a new task that runs on each raf frame\n * until it returns a falsy value or is aborted\n */\nfunction loop(callback) {\n let task;\n if (tasks.size === 0)\n raf(run_tasks);\n return {\n promise: new Promise(fulfill => {\n tasks.add(task = { c: callback, f: fulfill });\n }),\n abort() {\n tasks.delete(task);\n }\n };\n}\n\n// Track which nodes are claimed during hydration. Unclaimed nodes can then be removed from the DOM\n// at the end of hydration without touching the remaining nodes.\nlet is_hydrating = false;\nfunction start_hydrating() {\n is_hydrating = true;\n}\nfunction end_hydrating() {\n is_hydrating = false;\n}\nfunction upper_bound(low, high, key, value) {\n // Return first index of value larger than input value in the range [low, high)\n while (low < high) {\n const mid = low + ((high - low) >> 1);\n if (key(mid) <= value) {\n low = mid + 1;\n }\n else {\n high = mid;\n }\n }\n return low;\n}\nfunction init_hydrate(target) {\n if (target.hydrate_init)\n return;\n target.hydrate_init = true;\n // We know that all children have claim_order values since the unclaimed have been detached\n const children = target.childNodes;\n /*\n * Reorder claimed children optimally.\n * We can reorder claimed children optimally by finding the longest subsequence of\n * nodes that are already claimed in order and only moving the rest. The longest\n * subsequence subsequence of nodes that are claimed in order can be found by\n * computing the longest increasing subsequence of .claim_order values.\n *\n * This algorithm is optimal in generating the least amount of reorder operations\n * possible.\n *\n * Proof:\n * We know that, given a set of reordering operations, the nodes that do not move\n * always form an increasing subsequence, since they do not move among each other\n * meaning that they must be already ordered among each other. Thus, the maximal\n * set of nodes that do not move form a longest increasing subsequence.\n */\n // Compute longest increasing subsequence\n // m: subsequence length j => index k of smallest value that ends an increasing subsequence of length j\n const m = new Int32Array(children.length + 1);\n // Predecessor indices + 1\n const p = new Int32Array(children.length);\n m[0] = -1;\n let longest = 0;\n for (let i = 0; i < children.length; i++) {\n const current = children[i].claim_order;\n // Find the largest subsequence length such that it ends in a value less than our current value\n // upper_bound returns first greater value, so we subtract one\n const seqLen = upper_bound(1, longest + 1, idx => children[m[idx]].claim_order, current) - 1;\n p[i] = m[seqLen] + 1;\n const newLen = seqLen + 1;\n // We can guarantee that current is the smallest value. Otherwise, we would have generated a longer sequence.\n m[newLen] = i;\n longest = Math.max(newLen, longest);\n }\n // The longest increasing subsequence of nodes (initially reversed)\n const lis = [];\n // The rest of the nodes, nodes that will be moved\n const toMove = [];\n let last = children.length - 1;\n for (let cur = m[longest] + 1; cur != 0; cur = p[cur - 1]) {\n lis.push(children[cur - 1]);\n for (; last >= cur; last--) {\n toMove.push(children[last]);\n }\n last--;\n }\n for (; last >= 0; last--) {\n toMove.push(children[last]);\n }\n lis.reverse();\n // We sort the nodes being moved to guarantee that their insertion order matches the claim order\n toMove.sort((a, b) => a.claim_order - b.claim_order);\n // Finally, we move the nodes\n for (let i = 0, j = 0; i < toMove.length; i++) {\n while (j < lis.length && toMove[i].claim_order >= lis[j].claim_order) {\n j++;\n }\n const anchor = j < lis.length ? lis[j] : null;\n target.insertBefore(toMove[i], anchor);\n }\n}\nfunction append(target, node) {\n if (is_hydrating) {\n init_hydrate(target);\n if ((target.actual_end_child === undefined) || ((target.actual_end_child !== null) && (target.actual_end_child.parentElement !== target))) {\n target.actual_end_child = target.firstChild;\n }\n if (node !== target.actual_end_child) {\n target.insertBefore(node, target.actual_end_child);\n }\n else {\n target.actual_end_child = node.nextSibling;\n }\n }\n else if (node.parentNode !== target) {\n target.appendChild(node);\n }\n}\nfunction insert(target, node, anchor) {\n if (is_hydrating && !anchor) {\n append(target, node);\n }\n else if (node.parentNode !== target || (anchor && node.nextSibling !== anchor)) {\n target.insertBefore(node, anchor || null);\n }\n}\nfunction detach(node) {\n node.parentNode.removeChild(node);\n}\nfunction destroy_each(iterations, detaching) {\n for (let i = 0; i < iterations.length; i += 1) {\n if (iterations[i])\n iterations[i].d(detaching);\n }\n}\nfunction element(name) {\n return document.createElement(name);\n}\nfunction element_is(name, is) {\n return document.createElement(name, { is });\n}\nfunction object_without_properties(obj, exclude) {\n const target = {};\n for (const k in obj) {\n if (has_prop(obj, k)\n // @ts-ignore\n && exclude.indexOf(k) === -1) {\n // @ts-ignore\n target[k] = obj[k];\n }\n }\n return target;\n}\nfunction svg_element(name) {\n return document.createElementNS('http://www.w3.org/2000/svg', name);\n}\nfunction text(data) {\n return document.createTextNode(data);\n}\nfunction space() {\n return text(' ');\n}\nfunction empty() {\n return text('');\n}\nfunction listen(node, event, handler, options) {\n node.addEventListener(event, handler, options);\n return () => node.removeEventListener(event, handler, options);\n}\nfunction prevent_default(fn) {\n return function (event) {\n event.preventDefault();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction stop_propagation(fn) {\n return function (event) {\n event.stopPropagation();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction self(fn) {\n return function (event) {\n // @ts-ignore\n if (event.target === this)\n fn.call(this, event);\n };\n}\nfunction attr(node, attribute, value) {\n if (value == null)\n node.removeAttribute(attribute);\n else if (node.getAttribute(attribute) !== value)\n node.setAttribute(attribute, value);\n}\nfunction set_attributes(node, attributes) {\n // @ts-ignore\n const descriptors = Object.getOwnPropertyDescriptors(node.__proto__);\n for (const key in attributes) {\n if (attributes[key] == null) {\n node.removeAttribute(key);\n }\n else if (key === 'style') {\n node.style.cssText = attributes[key];\n }\n else if (key === '__value') {\n node.value = node[key] = attributes[key];\n }\n else if (descriptors[key] && descriptors[key].set) {\n node[key] = attributes[key];\n }\n else {\n attr(node, key, attributes[key]);\n }\n }\n}\nfunction set_svg_attributes(node, attributes) {\n for (const key in attributes) {\n attr(node, key, attributes[key]);\n }\n}\nfunction set_custom_element_data(node, prop, value) {\n if (prop in node) {\n node[prop] = typeof node[prop] === 'boolean' && value === '' ? true : value;\n }\n else {\n attr(node, prop, value);\n }\n}\nfunction xlink_attr(node, attribute, value) {\n node.setAttributeNS('http://www.w3.org/1999/xlink', attribute, value);\n}\nfunction get_binding_group_value(group, __value, checked) {\n const value = new Set();\n for (let i = 0; i < group.length; i += 1) {\n if (group[i].checked)\n value.add(group[i].__value);\n }\n if (!checked) {\n value.delete(__value);\n }\n return Array.from(value);\n}\nfunction to_number(value) {\n return value === '' ? null : +value;\n}\nfunction time_ranges_to_array(ranges) {\n const array = [];\n for (let i = 0; i < ranges.length; i += 1) {\n array.push({ start: ranges.start(i), end: ranges.end(i) });\n }\n return array;\n}\nfunction children(element) {\n return Array.from(element.childNodes);\n}\nfunction claim_node(nodes, predicate, processNode, createNode, dontUpdateLastIndex = false) {\n // Try to find nodes in an order such that we lengthen the longest increasing subsequence\n if (nodes.claim_info === undefined) {\n nodes.claim_info = { last_index: 0, total_claimed: 0 };\n }\n const resultNode = (() => {\n // We first try to find an element after the previous one\n for (let i = nodes.claim_info.last_index; i < nodes.length; i++) {\n const node = nodes[i];\n if (predicate(node)) {\n processNode(node);\n nodes.splice(i, 1);\n if (!dontUpdateLastIndex) {\n nodes.claim_info.last_index = i;\n }\n return node;\n }\n }\n // Otherwise, we try to find one before\n // We iterate in reverse so that we don't go too far back\n for (let i = nodes.claim_info.last_index - 1; i >= 0; i--) {\n const node = nodes[i];\n if (predicate(node)) {\n processNode(node);\n nodes.splice(i, 1);\n if (!dontUpdateLastIndex) {\n nodes.claim_info.last_index = i;\n }\n else {\n // Since we spliced before the last_index, we decrease it\n nodes.claim_info.last_index--;\n }\n return node;\n }\n }\n // If we can't find any matching node, we create a new one\n return createNode();\n })();\n resultNode.claim_order = nodes.claim_info.total_claimed;\n nodes.claim_info.total_claimed += 1;\n return resultNode;\n}\nfunction claim_element(nodes, name, attributes, svg) {\n return claim_node(nodes, (node) => node.nodeName === name, (node) => {\n const remove = [];\n for (let j = 0; j < node.attributes.length; j++) {\n const attribute = node.attributes[j];\n if (!attributes[attribute.name]) {\n remove.push(attribute.name);\n }\n }\n remove.forEach(v => node.removeAttribute(v));\n }, () => svg ? svg_element(name) : element(name));\n}\nfunction claim_text(nodes, data) {\n return claim_node(nodes, (node) => node.nodeType === 3, (node) => {\n node.data = '' + data;\n }, () => text(data), true // Text nodes should not update last index since it is likely not worth it to eliminate an increasing subsequence of actual elements\n );\n}\nfunction claim_space(nodes) {\n return claim_text(nodes, ' ');\n}\nfunction find_comment(nodes, text, start) {\n for (let i = start; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeType === 8 /* comment node */ && node.textContent.trim() === text) {\n return i;\n }\n }\n return nodes.length;\n}\nfunction claim_html_tag(nodes) {\n // find html opening tag\n const start_index = find_comment(nodes, 'HTML_TAG_START', 0);\n const end_index = find_comment(nodes, 'HTML_TAG_END', start_index);\n if (start_index === end_index) {\n return new HtmlTag();\n }\n const html_tag_nodes = nodes.splice(start_index, end_index + 1);\n detach(html_tag_nodes[0]);\n detach(html_tag_nodes[html_tag_nodes.length - 1]);\n return new HtmlTag(html_tag_nodes.slice(1, html_tag_nodes.length - 1));\n}\nfunction set_data(text, data) {\n data = '' + data;\n if (text.wholeText !== data)\n text.data = data;\n}\nfunction set_input_value(input, value) {\n input.value = value == null ? '' : value;\n}\nfunction set_input_type(input, type) {\n try {\n input.type = type;\n }\n catch (e) {\n // do nothing\n }\n}\nfunction set_style(node, key, value, important) {\n node.style.setProperty(key, value, important ? 'important' : '');\n}\nfunction select_option(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n if (option.__value === value) {\n option.selected = true;\n return;\n }\n }\n}\nfunction select_options(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n option.selected = ~value.indexOf(option.__value);\n }\n}\nfunction select_value(select) {\n const selected_option = select.querySelector(':checked') || select.options[0];\n return selected_option && selected_option.__value;\n}\nfunction select_multiple_value(select) {\n return [].map.call(select.querySelectorAll(':checked'), option => option.__value);\n}\n// unfortunately this can't be a constant as that wouldn't be tree-shakeable\n// so we cache the result instead\nlet crossorigin;\nfunction is_crossorigin() {\n if (crossorigin === undefined) {\n crossorigin = false;\n try {\n if (typeof window !== 'undefined' && window.parent) {\n void window.parent.document;\n }\n }\n catch (error) {\n crossorigin = true;\n }\n }\n return crossorigin;\n}\nfunction add_resize_listener(node, fn) {\n const computed_style = getComputedStyle(node);\n if (computed_style.position === 'static') {\n node.style.position = 'relative';\n }\n const iframe = element('iframe');\n iframe.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ' +\n 'overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;');\n iframe.setAttribute('aria-hidden', 'true');\n iframe.tabIndex = -1;\n const crossorigin = is_crossorigin();\n let unsubscribe;\n if (crossorigin) {\n iframe.src = \"data:text/html,\";\n unsubscribe = listen(window, 'message', (event) => {\n if (event.source === iframe.contentWindow)\n fn();\n });\n }\n else {\n iframe.src = 'about:blank';\n iframe.onload = () => {\n unsubscribe = listen(iframe.contentWindow, 'resize', fn);\n };\n }\n append(node, iframe);\n return () => {\n if (crossorigin) {\n unsubscribe();\n }\n else if (unsubscribe && iframe.contentWindow) {\n unsubscribe();\n }\n detach(iframe);\n };\n}\nfunction toggle_class(element, name, toggle) {\n element.classList[toggle ? 'add' : 'remove'](name);\n}\nfunction custom_event(type, detail) {\n const e = document.createEvent('CustomEvent');\n e.initCustomEvent(type, false, false, detail);\n return e;\n}\nfunction query_selector_all(selector, parent = document.body) {\n return Array.from(parent.querySelectorAll(selector));\n}\nclass HtmlTag {\n constructor(claimed_nodes) {\n this.e = this.n = null;\n this.l = claimed_nodes;\n }\n m(html, target, anchor = null) {\n if (!this.e) {\n this.e = element(target.nodeName);\n this.t = target;\n if (this.l) {\n this.n = this.l;\n }\n else {\n this.h(html);\n }\n }\n this.i(anchor);\n }\n h(html) {\n this.e.innerHTML = html;\n this.n = Array.from(this.e.childNodes);\n }\n i(anchor) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert(this.t, this.n[i], anchor);\n }\n }\n p(html) {\n this.d();\n this.h(html);\n this.i(this.a);\n }\n d() {\n this.n.forEach(detach);\n }\n}\nfunction attribute_to_object(attributes) {\n const result = {};\n for (const attribute of attributes) {\n result[attribute.name] = attribute.value;\n }\n return result;\n}\nfunction get_custom_elements_slots(element) {\n const result = {};\n element.childNodes.forEach((node) => {\n result[node.slot || 'default'] = true;\n });\n return result;\n}\n\nconst active_docs = new Set();\nlet active = 0;\n// https://github.com/darkskyapp/string-hash/blob/master/index.js\nfunction hash(str) {\n let hash = 5381;\n let i = str.length;\n while (i--)\n hash = ((hash << 5) - hash) ^ str.charCodeAt(i);\n return hash >>> 0;\n}\nfunction create_rule(node, a, b, duration, delay, ease, fn, uid = 0) {\n const step = 16.666 / duration;\n let keyframes = '{\\n';\n for (let p = 0; p <= 1; p += step) {\n const t = a + (b - a) * ease(p);\n keyframes += p * 100 + `%{${fn(t, 1 - t)}}\\n`;\n }\n const rule = keyframes + `100% {${fn(b, 1 - b)}}\\n}`;\n const name = `__svelte_${hash(rule)}_${uid}`;\n const doc = node.ownerDocument;\n active_docs.add(doc);\n const stylesheet = doc.__svelte_stylesheet || (doc.__svelte_stylesheet = doc.head.appendChild(element('style')).sheet);\n const current_rules = doc.__svelte_rules || (doc.__svelte_rules = {});\n if (!current_rules[name]) {\n current_rules[name] = true;\n stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length);\n }\n const animation = node.style.animation || '';\n node.style.animation = `${animation ? `${animation}, ` : ''}${name} ${duration}ms linear ${delay}ms 1 both`;\n active += 1;\n return name;\n}\nfunction delete_rule(node, name) {\n const previous = (node.style.animation || '').split(', ');\n const next = previous.filter(name\n ? anim => anim.indexOf(name) < 0 // remove specific animation\n : anim => anim.indexOf('__svelte') === -1 // remove all Svelte animations\n );\n const deleted = previous.length - next.length;\n if (deleted) {\n node.style.animation = next.join(', ');\n active -= deleted;\n if (!active)\n clear_rules();\n }\n}\nfunction clear_rules() {\n raf(() => {\n if (active)\n return;\n active_docs.forEach(doc => {\n const stylesheet = doc.__svelte_stylesheet;\n let i = stylesheet.cssRules.length;\n while (i--)\n stylesheet.deleteRule(i);\n doc.__svelte_rules = {};\n });\n active_docs.clear();\n });\n}\n\nfunction create_animation(node, from, fn, params) {\n if (!from)\n return noop;\n const to = node.getBoundingClientRect();\n if (from.left === to.left && from.right === to.right && from.top === to.top && from.bottom === to.bottom)\n return noop;\n const { delay = 0, duration = 300, easing = identity, \n // @ts-ignore todo: should this be separated from destructuring? Or start/end added to public api and documentation?\n start: start_time = now() + delay, \n // @ts-ignore todo:\n end = start_time + duration, tick = noop, css } = fn(node, { from, to }, params);\n let running = true;\n let started = false;\n let name;\n function start() {\n if (css) {\n name = create_rule(node, 0, 1, duration, delay, easing, css);\n }\n if (!delay) {\n started = true;\n }\n }\n function stop() {\n if (css)\n delete_rule(node, name);\n running = false;\n }\n loop(now => {\n if (!started && now >= start_time) {\n started = true;\n }\n if (started && now >= end) {\n tick(1, 0);\n stop();\n }\n if (!running) {\n return false;\n }\n if (started) {\n const p = now - start_time;\n const t = 0 + 1 * easing(p / duration);\n tick(t, 1 - t);\n }\n return true;\n });\n start();\n tick(0, 1);\n return stop;\n}\nfunction fix_position(node) {\n const style = getComputedStyle(node);\n if (style.position !== 'absolute' && style.position !== 'fixed') {\n const { width, height } = style;\n const a = node.getBoundingClientRect();\n node.style.position = 'absolute';\n node.style.width = width;\n node.style.height = height;\n add_transform(node, a);\n }\n}\nfunction add_transform(node, a) {\n const b = node.getBoundingClientRect();\n if (a.left !== b.left || a.top !== b.top) {\n const style = getComputedStyle(node);\n const transform = style.transform === 'none' ? '' : style.transform;\n node.style.transform = `${transform} translate(${a.left - b.left}px, ${a.top - b.top}px)`;\n }\n}\n\nlet current_component;\nfunction set_current_component(component) {\n current_component = component;\n}\nfunction get_current_component() {\n if (!current_component)\n throw new Error('Function called outside component initialization');\n return current_component;\n}\nfunction beforeUpdate(fn) {\n get_current_component().$$.before_update.push(fn);\n}\nfunction onMount(fn) {\n get_current_component().$$.on_mount.push(fn);\n}\nfunction afterUpdate(fn) {\n get_current_component().$$.after_update.push(fn);\n}\nfunction onDestroy(fn) {\n get_current_component().$$.on_destroy.push(fn);\n}\nfunction createEventDispatcher() {\n const component = get_current_component();\n return (type, detail) => {\n const callbacks = component.$$.callbacks[type];\n if (callbacks) {\n // TODO are there situations where events could be dispatched\n // in a server (non-DOM) environment?\n const event = custom_event(type, detail);\n callbacks.slice().forEach(fn => {\n fn.call(component, event);\n });\n }\n };\n}\nfunction setContext(key, context) {\n get_current_component().$$.context.set(key, context);\n}\nfunction getContext(key) {\n return get_current_component().$$.context.get(key);\n}\nfunction hasContext(key) {\n return get_current_component().$$.context.has(key);\n}\n// TODO figure out if we still want to support\n// shorthand events, or if we want to implement\n// a real bubbling mechanism\nfunction bubble(component, event) {\n const callbacks = component.$$.callbacks[event.type];\n if (callbacks) {\n // @ts-ignore\n callbacks.slice().forEach(fn => fn.call(this, event));\n }\n}\n\nconst dirty_components = [];\nconst intros = { enabled: false };\nconst binding_callbacks = [];\nconst render_callbacks = [];\nconst flush_callbacks = [];\nconst resolved_promise = Promise.resolve();\nlet update_scheduled = false;\nfunction schedule_update() {\n if (!update_scheduled) {\n update_scheduled = true;\n resolved_promise.then(flush);\n }\n}\nfunction tick() {\n schedule_update();\n return resolved_promise;\n}\nfunction add_render_callback(fn) {\n render_callbacks.push(fn);\n}\nfunction add_flush_callback(fn) {\n flush_callbacks.push(fn);\n}\nlet flushing = false;\nconst seen_callbacks = new Set();\nfunction flush() {\n if (flushing)\n return;\n flushing = true;\n do {\n // first, call beforeUpdate functions\n // and update components\n for (let i = 0; i < dirty_components.length; i += 1) {\n const component = dirty_components[i];\n set_current_component(component);\n update(component.$$);\n }\n set_current_component(null);\n dirty_components.length = 0;\n while (binding_callbacks.length)\n binding_callbacks.pop()();\n // then, once components are updated, call\n // afterUpdate functions. This may cause\n // subsequent updates...\n for (let i = 0; i < render_callbacks.length; i += 1) {\n const callback = render_callbacks[i];\n if (!seen_callbacks.has(callback)) {\n // ...so guard against infinite loops\n seen_callbacks.add(callback);\n callback();\n }\n }\n render_callbacks.length = 0;\n } while (dirty_components.length);\n while (flush_callbacks.length) {\n flush_callbacks.pop()();\n }\n update_scheduled = false;\n flushing = false;\n seen_callbacks.clear();\n}\nfunction update($$) {\n if ($$.fragment !== null) {\n $$.update();\n run_all($$.before_update);\n const dirty = $$.dirty;\n $$.dirty = [-1];\n $$.fragment && $$.fragment.p($$.ctx, dirty);\n $$.after_update.forEach(add_render_callback);\n }\n}\n\nlet promise;\nfunction wait() {\n if (!promise) {\n promise = Promise.resolve();\n promise.then(() => {\n promise = null;\n });\n }\n return promise;\n}\nfunction dispatch(node, direction, kind) {\n node.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`));\n}\nconst outroing = new Set();\nlet outros;\nfunction group_outros() {\n outros = {\n r: 0,\n c: [],\n p: outros // parent group\n };\n}\nfunction check_outros() {\n if (!outros.r) {\n run_all(outros.c);\n }\n outros = outros.p;\n}\nfunction transition_in(block, local) {\n if (block && block.i) {\n outroing.delete(block);\n block.i(local);\n }\n}\nfunction transition_out(block, local, detach, callback) {\n if (block && block.o) {\n if (outroing.has(block))\n return;\n outroing.add(block);\n outros.c.push(() => {\n outroing.delete(block);\n if (callback) {\n if (detach)\n block.d(1);\n callback();\n }\n });\n block.o(local);\n }\n}\nconst null_transition = { duration: 0 };\nfunction create_in_transition(node, fn, params) {\n let config = fn(node, params);\n let running = false;\n let animation_name;\n let task;\n let uid = 0;\n function cleanup() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++);\n tick(0, 1);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n if (task)\n task.abort();\n running = true;\n add_render_callback(() => dispatch(node, true, 'start'));\n task = loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(1, 0);\n dispatch(node, true, 'end');\n cleanup();\n return running = false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(t, 1 - t);\n }\n }\n return running;\n });\n }\n let started = false;\n return {\n start() {\n if (started)\n return;\n delete_rule(node);\n if (is_function(config)) {\n config = config();\n wait().then(go);\n }\n else {\n go();\n }\n },\n invalidate() {\n started = false;\n },\n end() {\n if (running) {\n cleanup();\n running = false;\n }\n }\n };\n}\nfunction create_out_transition(node, fn, params) {\n let config = fn(node, params);\n let running = true;\n let animation_name;\n const group = outros;\n group.r += 1;\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 1, 0, duration, delay, easing, css);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n add_render_callback(() => dispatch(node, false, 'start'));\n loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(0, 1);\n dispatch(node, false, 'end');\n if (!--group.r) {\n // this will result in `end()` being called,\n // so we don't need to clean up here\n run_all(group.c);\n }\n return false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(1 - t, t);\n }\n }\n return running;\n });\n }\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go();\n });\n }\n else {\n go();\n }\n return {\n end(reset) {\n if (reset && config.tick) {\n config.tick(1, 0);\n }\n if (running) {\n if (animation_name)\n delete_rule(node, animation_name);\n running = false;\n }\n }\n };\n}\nfunction create_bidirectional_transition(node, fn, params, intro) {\n let config = fn(node, params);\n let t = intro ? 0 : 1;\n let running_program = null;\n let pending_program = null;\n let animation_name = null;\n function clear_animation() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function init(program, duration) {\n const d = program.b - t;\n duration *= Math.abs(d);\n return {\n a: t,\n b: program.b,\n d,\n duration,\n start: program.start,\n end: program.start + duration,\n group: program.group\n };\n }\n function go(b) {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n const program = {\n start: now() + delay,\n b\n };\n if (!b) {\n // @ts-ignore todo: improve typings\n program.group = outros;\n outros.r += 1;\n }\n if (running_program || pending_program) {\n pending_program = program;\n }\n else {\n // if this is an intro, and there's a delay, we need to do\n // an initial tick and/or apply CSS animation immediately\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, b, duration, delay, easing, css);\n }\n if (b)\n tick(0, 1);\n running_program = init(program, duration);\n add_render_callback(() => dispatch(node, b, 'start'));\n loop(now => {\n if (pending_program && now > pending_program.start) {\n running_program = init(pending_program, duration);\n pending_program = null;\n dispatch(node, running_program.b, 'start');\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css);\n }\n }\n if (running_program) {\n if (now >= running_program.end) {\n tick(t = running_program.b, 1 - t);\n dispatch(node, running_program.b, 'end');\n if (!pending_program) {\n // we're done\n if (running_program.b) {\n // intro — we can tidy up immediately\n clear_animation();\n }\n else {\n // outro — needs to be coordinated\n if (!--running_program.group.r)\n run_all(running_program.group.c);\n }\n }\n running_program = null;\n }\n else if (now >= running_program.start) {\n const p = now - running_program.start;\n t = running_program.a + running_program.d * easing(p / running_program.duration);\n tick(t, 1 - t);\n }\n }\n return !!(running_program || pending_program);\n });\n }\n }\n return {\n run(b) {\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go(b);\n });\n }\n else {\n go(b);\n }\n },\n end() {\n clear_animation();\n running_program = pending_program = null;\n }\n };\n}\n\nfunction handle_promise(promise, info) {\n const token = info.token = {};\n function update(type, index, key, value) {\n if (info.token !== token)\n return;\n info.resolved = value;\n let child_ctx = info.ctx;\n if (key !== undefined) {\n child_ctx = child_ctx.slice();\n child_ctx[key] = value;\n }\n const block = type && (info.current = type)(child_ctx);\n let needs_flush = false;\n if (info.block) {\n if (info.blocks) {\n info.blocks.forEach((block, i) => {\n if (i !== index && block) {\n group_outros();\n transition_out(block, 1, 1, () => {\n if (info.blocks[i] === block) {\n info.blocks[i] = null;\n }\n });\n check_outros();\n }\n });\n }\n else {\n info.block.d(1);\n }\n block.c();\n transition_in(block, 1);\n block.m(info.mount(), info.anchor);\n needs_flush = true;\n }\n info.block = block;\n if (info.blocks)\n info.blocks[index] = block;\n if (needs_flush) {\n flush();\n }\n }\n if (is_promise(promise)) {\n const current_component = get_current_component();\n promise.then(value => {\n set_current_component(current_component);\n update(info.then, 1, info.value, value);\n set_current_component(null);\n }, error => {\n set_current_component(current_component);\n update(info.catch, 2, info.error, error);\n set_current_component(null);\n if (!info.hasCatch) {\n throw error;\n }\n });\n // if we previously had a then/catch block, destroy it\n if (info.current !== info.pending) {\n update(info.pending, 0);\n return true;\n }\n }\n else {\n if (info.current !== info.then) {\n update(info.then, 1, info.value, promise);\n return true;\n }\n info.resolved = promise;\n }\n}\nfunction update_await_block_branch(info, ctx, dirty) {\n const child_ctx = ctx.slice();\n const { resolved } = info;\n if (info.current === info.then) {\n child_ctx[info.value] = resolved;\n }\n if (info.current === info.catch) {\n child_ctx[info.error] = resolved;\n }\n info.block.p(child_ctx, dirty);\n}\n\nconst globals = (typeof window !== 'undefined'\n ? window\n : typeof globalThis !== 'undefined'\n ? globalThis\n : global);\n\nfunction destroy_block(block, lookup) {\n block.d(1);\n lookup.delete(block.key);\n}\nfunction outro_and_destroy_block(block, lookup) {\n transition_out(block, 1, 1, () => {\n lookup.delete(block.key);\n });\n}\nfunction fix_and_destroy_block(block, lookup) {\n block.f();\n destroy_block(block, lookup);\n}\nfunction fix_and_outro_and_destroy_block(block, lookup) {\n block.f();\n outro_and_destroy_block(block, lookup);\n}\nfunction update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) {\n let o = old_blocks.length;\n let n = list.length;\n let i = o;\n const old_indexes = {};\n while (i--)\n old_indexes[old_blocks[i].key] = i;\n const new_blocks = [];\n const new_lookup = new Map();\n const deltas = new Map();\n i = n;\n while (i--) {\n const child_ctx = get_context(ctx, list, i);\n const key = get_key(child_ctx);\n let block = lookup.get(key);\n if (!block) {\n block = create_each_block(key, child_ctx);\n block.c();\n }\n else if (dynamic) {\n block.p(child_ctx, dirty);\n }\n new_lookup.set(key, new_blocks[i] = block);\n if (key in old_indexes)\n deltas.set(key, Math.abs(i - old_indexes[key]));\n }\n const will_move = new Set();\n const did_move = new Set();\n function insert(block) {\n transition_in(block, 1);\n block.m(node, next);\n lookup.set(block.key, block);\n next = block.first;\n n--;\n }\n while (o && n) {\n const new_block = new_blocks[n - 1];\n const old_block = old_blocks[o - 1];\n const new_key = new_block.key;\n const old_key = old_block.key;\n if (new_block === old_block) {\n // do nothing\n next = new_block.first;\n o--;\n n--;\n }\n else if (!new_lookup.has(old_key)) {\n // remove old block\n destroy(old_block, lookup);\n o--;\n }\n else if (!lookup.has(new_key) || will_move.has(new_key)) {\n insert(new_block);\n }\n else if (did_move.has(old_key)) {\n o--;\n }\n else if (deltas.get(new_key) > deltas.get(old_key)) {\n did_move.add(new_key);\n insert(new_block);\n }\n else {\n will_move.add(old_key);\n o--;\n }\n }\n while (o--) {\n const old_block = old_blocks[o];\n if (!new_lookup.has(old_block.key))\n destroy(old_block, lookup);\n }\n while (n)\n insert(new_blocks[n - 1]);\n return new_blocks;\n}\nfunction validate_each_keys(ctx, list, get_context, get_key) {\n const keys = new Set();\n for (let i = 0; i < list.length; i++) {\n const key = get_key(get_context(ctx, list, i));\n if (keys.has(key)) {\n throw new Error('Cannot have duplicate keys in a keyed each');\n }\n keys.add(key);\n }\n}\n\nfunction get_spread_update(levels, updates) {\n const update = {};\n const to_null_out = {};\n const accounted_for = { $$scope: 1 };\n let i = levels.length;\n while (i--) {\n const o = levels[i];\n const n = updates[i];\n if (n) {\n for (const key in o) {\n if (!(key in n))\n to_null_out[key] = 1;\n }\n for (const key in n) {\n if (!accounted_for[key]) {\n update[key] = n[key];\n accounted_for[key] = 1;\n }\n }\n levels[i] = n;\n }\n else {\n for (const key in o) {\n accounted_for[key] = 1;\n }\n }\n }\n for (const key in to_null_out) {\n if (!(key in update))\n update[key] = undefined;\n }\n return update;\n}\nfunction get_spread_object(spread_props) {\n return typeof spread_props === 'object' && spread_props !== null ? spread_props : {};\n}\n\n// source: https://html.spec.whatwg.org/multipage/indices.html\nconst boolean_attributes = new Set([\n 'allowfullscreen',\n 'allowpaymentrequest',\n 'async',\n 'autofocus',\n 'autoplay',\n 'checked',\n 'controls',\n 'default',\n 'defer',\n 'disabled',\n 'formnovalidate',\n 'hidden',\n 'ismap',\n 'loop',\n 'multiple',\n 'muted',\n 'nomodule',\n 'novalidate',\n 'open',\n 'playsinline',\n 'readonly',\n 'required',\n 'reversed',\n 'selected'\n]);\n\nconst invalid_attribute_name_character = /[\\s'\">/=\\u{FDD0}-\\u{FDEF}\\u{FFFE}\\u{FFFF}\\u{1FFFE}\\u{1FFFF}\\u{2FFFE}\\u{2FFFF}\\u{3FFFE}\\u{3FFFF}\\u{4FFFE}\\u{4FFFF}\\u{5FFFE}\\u{5FFFF}\\u{6FFFE}\\u{6FFFF}\\u{7FFFE}\\u{7FFFF}\\u{8FFFE}\\u{8FFFF}\\u{9FFFE}\\u{9FFFF}\\u{AFFFE}\\u{AFFFF}\\u{BFFFE}\\u{BFFFF}\\u{CFFFE}\\u{CFFFF}\\u{DFFFE}\\u{DFFFF}\\u{EFFFE}\\u{EFFFF}\\u{FFFFE}\\u{FFFFF}\\u{10FFFE}\\u{10FFFF}]/u;\n// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n// https://infra.spec.whatwg.org/#noncharacter\nfunction spread(args, classes_to_add) {\n const attributes = Object.assign({}, ...args);\n if (classes_to_add) {\n if (attributes.class == null) {\n attributes.class = classes_to_add;\n }\n else {\n attributes.class += ' ' + classes_to_add;\n }\n }\n let str = '';\n Object.keys(attributes).forEach(name => {\n if (invalid_attribute_name_character.test(name))\n return;\n const value = attributes[name];\n if (value === true)\n str += ' ' + name;\n else if (boolean_attributes.has(name.toLowerCase())) {\n if (value)\n str += ' ' + name;\n }\n else if (value != null) {\n str += ` ${name}=\"${value}\"`;\n }\n });\n return str;\n}\nconst escaped = {\n '\"': '"',\n \"'\": ''',\n '&': '&',\n '<': '<',\n '>': '>'\n};\nfunction escape(html) {\n return String(html).replace(/[\"'&<>]/g, match => escaped[match]);\n}\nfunction escape_attribute_value(value) {\n return typeof value === 'string' ? escape(value) : value;\n}\nfunction escape_object(obj) {\n const result = {};\n for (const key in obj) {\n result[key] = escape_attribute_value(obj[key]);\n }\n return result;\n}\nfunction each(items, fn) {\n let str = '';\n for (let i = 0; i < items.length; i += 1) {\n str += fn(items[i], i);\n }\n return str;\n}\nconst missing_component = {\n $$render: () => ''\n};\nfunction validate_component(component, name) {\n if (!component || !component.$$render) {\n if (name === 'svelte:component')\n name += ' this={...}';\n throw new Error(`<${name}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules`);\n }\n return component;\n}\nfunction debug(file, line, column, values) {\n console.log(`{@debug} ${file ? file + ' ' : ''}(${line}:${column})`); // eslint-disable-line no-console\n console.log(values); // eslint-disable-line no-console\n return '';\n}\nlet on_destroy;\nfunction create_ssr_component(fn) {\n function $$render(result, props, bindings, slots, context) {\n const parent_component = current_component;\n const $$ = {\n on_destroy,\n context: new Map(parent_component ? parent_component.$$.context : context || []),\n // these will be immediately discarded\n on_mount: [],\n before_update: [],\n after_update: [],\n callbacks: blank_object()\n };\n set_current_component({ $$ });\n const html = fn(result, props, bindings, slots);\n set_current_component(parent_component);\n return html;\n }\n return {\n render: (props = {}, { $$slots = {}, context = new Map() } = {}) => {\n on_destroy = [];\n const result = { title: '', head: '', css: new Set() };\n const html = $$render(result, props, {}, $$slots, context);\n run_all(on_destroy);\n return {\n html,\n css: {\n code: Array.from(result.css).map(css => css.code).join('\\n'),\n map: null // TODO\n },\n head: result.title + result.head\n };\n },\n $$render\n };\n}\nfunction add_attribute(name, value, boolean) {\n if (value == null || (boolean && !value))\n return '';\n return ` ${name}${value === true ? '' : `=${typeof value === 'string' ? JSON.stringify(escape(value)) : `\"${value}\"`}`}`;\n}\nfunction add_classes(classes) {\n return classes ? ` class=\"${classes}\"` : '';\n}\n\nfunction bind(component, name, callback) {\n const index = component.$$.props[name];\n if (index !== undefined) {\n component.$$.bound[index] = callback;\n callback(component.$$.ctx[index]);\n }\n}\nfunction create_component(block) {\n block && block.c();\n}\nfunction claim_component(block, parent_nodes) {\n block && block.l(parent_nodes);\n}\nfunction mount_component(component, target, anchor, customElement) {\n const { fragment, on_mount, on_destroy, after_update } = component.$$;\n fragment && fragment.m(target, anchor);\n if (!customElement) {\n // onMount happens before the initial afterUpdate\n add_render_callback(() => {\n const new_on_destroy = on_mount.map(run).filter(is_function);\n if (on_destroy) {\n on_destroy.push(...new_on_destroy);\n }\n else {\n // Edge case - component was destroyed immediately,\n // most likely as a result of a binding initialising\n run_all(new_on_destroy);\n }\n component.$$.on_mount = [];\n });\n }\n after_update.forEach(add_render_callback);\n}\nfunction destroy_component(component, detaching) {\n const $$ = component.$$;\n if ($$.fragment !== null) {\n run_all($$.on_destroy);\n $$.fragment && $$.fragment.d(detaching);\n // TODO null out other refs, including component.$$ (but need to\n // preserve final state?)\n $$.on_destroy = $$.fragment = null;\n $$.ctx = [];\n }\n}\nfunction make_dirty(component, i) {\n if (component.$$.dirty[0] === -1) {\n dirty_components.push(component);\n schedule_update();\n component.$$.dirty.fill(0);\n }\n component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));\n}\nfunction init(component, options, instance, create_fragment, not_equal, props, dirty = [-1]) {\n const parent_component = current_component;\n set_current_component(component);\n const $$ = component.$$ = {\n fragment: null,\n ctx: null,\n // state\n props,\n update: noop,\n not_equal,\n bound: blank_object(),\n // lifecycle\n on_mount: [],\n on_destroy: [],\n on_disconnect: [],\n before_update: [],\n after_update: [],\n context: new Map(parent_component ? parent_component.$$.context : options.context || []),\n // everything else\n callbacks: blank_object(),\n dirty,\n skip_bound: false\n };\n let ready = false;\n $$.ctx = instance\n ? instance(component, options.props || {}, (i, ret, ...rest) => {\n const value = rest.length ? rest[0] : ret;\n if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {\n if (!$$.skip_bound && $$.bound[i])\n $$.bound[i](value);\n if (ready)\n make_dirty(component, i);\n }\n return ret;\n })\n : [];\n $$.update();\n ready = true;\n run_all($$.before_update);\n // `false` as a special case of no DOM component\n $$.fragment = create_fragment ? create_fragment($$.ctx) : false;\n if (options.target) {\n if (options.hydrate) {\n start_hydrating();\n const nodes = children(options.target);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.l(nodes);\n nodes.forEach(detach);\n }\n else {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.c();\n }\n if (options.intro)\n transition_in(component.$$.fragment);\n mount_component(component, options.target, options.anchor, options.customElement);\n end_hydrating();\n flush();\n }\n set_current_component(parent_component);\n}\nlet SvelteElement;\nif (typeof HTMLElement === 'function') {\n SvelteElement = class extends HTMLElement {\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n }\n connectedCallback() {\n const { on_mount } = this.$$;\n this.$$.on_disconnect = on_mount.map(run).filter(is_function);\n // @ts-ignore todo: improve typings\n for (const key in this.$$.slotted) {\n // @ts-ignore todo: improve typings\n this.appendChild(this.$$.slotted[key]);\n }\n }\n attributeChangedCallback(attr, _oldValue, newValue) {\n this[attr] = newValue;\n }\n disconnectedCallback() {\n run_all(this.$$.on_disconnect);\n }\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n // TODO should this delegate to addEventListener?\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n };\n}\n/**\n * Base class for Svelte components. Used when dev=false.\n */\nclass SvelteComponent {\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n}\n\nfunction dispatch_dev(type, detail) {\n document.dispatchEvent(custom_event(type, Object.assign({ version: '3.38.3' }, detail)));\n}\nfunction append_dev(target, node) {\n dispatch_dev('SvelteDOMInsert', { target, node });\n append(target, node);\n}\nfunction insert_dev(target, node, anchor) {\n dispatch_dev('SvelteDOMInsert', { target, node, anchor });\n insert(target, node, anchor);\n}\nfunction detach_dev(node) {\n dispatch_dev('SvelteDOMRemove', { node });\n detach(node);\n}\nfunction detach_between_dev(before, after) {\n while (before.nextSibling && before.nextSibling !== after) {\n detach_dev(before.nextSibling);\n }\n}\nfunction detach_before_dev(after) {\n while (after.previousSibling) {\n detach_dev(after.previousSibling);\n }\n}\nfunction detach_after_dev(before) {\n while (before.nextSibling) {\n detach_dev(before.nextSibling);\n }\n}\nfunction listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) {\n const modifiers = options === true ? ['capture'] : options ? Array.from(Object.keys(options)) : [];\n if (has_prevent_default)\n modifiers.push('preventDefault');\n if (has_stop_propagation)\n modifiers.push('stopPropagation');\n dispatch_dev('SvelteDOMAddEventListener', { node, event, handler, modifiers });\n const dispose = listen(node, event, handler, options);\n return () => {\n dispatch_dev('SvelteDOMRemoveEventListener', { node, event, handler, modifiers });\n dispose();\n };\n}\nfunction attr_dev(node, attribute, value) {\n attr(node, attribute, value);\n if (value == null)\n dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute });\n else\n dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value });\n}\nfunction prop_dev(node, property, value) {\n node[property] = value;\n dispatch_dev('SvelteDOMSetProperty', { node, property, value });\n}\nfunction dataset_dev(node, property, value) {\n node.dataset[property] = value;\n dispatch_dev('SvelteDOMSetDataset', { node, property, value });\n}\nfunction set_data_dev(text, data) {\n data = '' + data;\n if (text.wholeText === data)\n return;\n dispatch_dev('SvelteDOMSetData', { node: text, data });\n text.data = data;\n}\nfunction validate_each_argument(arg) {\n if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {\n let msg = '{#each} only iterates over array-like objects.';\n if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {\n msg += ' You can use a spread to convert this iterable into an array.';\n }\n throw new Error(msg);\n }\n}\nfunction validate_slots(name, slot, keys) {\n for (const slot_key of Object.keys(slot)) {\n if (!~keys.indexOf(slot_key)) {\n console.warn(`<${name}> received an unexpected slot \"${slot_key}\".`);\n }\n }\n}\n/**\n * Base class for Svelte components with some minor dev-enhancements. Used when dev=true.\n */\nclass SvelteComponentDev extends SvelteComponent {\n constructor(options) {\n if (!options || (!options.target && !options.$$inline)) {\n throw new Error(\"'target' is a required option\");\n }\n super();\n }\n $destroy() {\n super.$destroy();\n this.$destroy = () => {\n console.warn('Component was already destroyed'); // eslint-disable-line no-console\n };\n }\n $capture_state() { }\n $inject_state() { }\n}\n/**\n * Base class to create strongly typed Svelte components.\n * This only exists for typing purposes and should be used in `.d.ts` files.\n *\n * ### Example:\n *\n * You have component library on npm called `component-library`, from which\n * you export a component called `MyComponent`. For Svelte+TypeScript users,\n * you want to provide typings. Therefore you create a `index.d.ts`:\n * ```ts\n * import { SvelteComponentTyped } from \"svelte\";\n * export class MyComponent extends SvelteComponentTyped<{foo: string}> {}\n * ```\n * Typing this makes it possible for IDEs like VS Code with the Svelte extension\n * to provide intellisense and to use the component like this in a Svelte file\n * with TypeScript:\n * ```svelte\n * \n * \n * ```\n *\n * #### Why not make this part of `SvelteComponent(Dev)`?\n * Because\n * ```ts\n * class ASubclassOfSvelteComponent extends SvelteComponent<{foo: string}> {}\n * const component: typeof SvelteComponent = ASubclassOfSvelteComponent;\n * ```\n * will throw a type error, so we need to seperate the more strictly typed class.\n */\nclass SvelteComponentTyped extends SvelteComponentDev {\n constructor(options) {\n super(options);\n }\n}\nfunction loop_guard(timeout) {\n const start = Date.now();\n return () => {\n if (Date.now() - start > timeout) {\n throw new Error('Infinite loop detected');\n }\n };\n}\n\nexport { HtmlTag, SvelteComponent, SvelteComponentDev, SvelteComponentTyped, SvelteElement, action_destroyer, add_attribute, add_classes, add_flush_callback, add_location, add_render_callback, add_resize_listener, add_transform, afterUpdate, append, append_dev, assign, attr, attr_dev, attribute_to_object, beforeUpdate, bind, binding_callbacks, blank_object, bubble, check_outros, children, claim_component, claim_element, claim_html_tag, claim_space, claim_text, clear_loops, component_subscribe, compute_rest_props, compute_slots, createEventDispatcher, create_animation, create_bidirectional_transition, create_component, create_in_transition, create_out_transition, create_slot, create_ssr_component, current_component, custom_event, dataset_dev, debug, destroy_block, destroy_component, destroy_each, detach, detach_after_dev, detach_before_dev, detach_between_dev, detach_dev, dirty_components, dispatch_dev, each, element, element_is, empty, end_hydrating, escape, escape_attribute_value, escape_object, escaped, exclude_internal_props, fix_and_destroy_block, fix_and_outro_and_destroy_block, fix_position, flush, getContext, get_binding_group_value, get_current_component, get_custom_elements_slots, get_slot_changes, get_slot_context, get_spread_object, get_spread_update, get_store_value, globals, group_outros, handle_promise, hasContext, has_prop, identity, init, insert, insert_dev, intros, invalid_attribute_name_character, is_client, is_crossorigin, is_empty, is_function, is_promise, listen, listen_dev, loop, loop_guard, missing_component, mount_component, noop, not_equal, now, null_to_empty, object_without_properties, onDestroy, onMount, once, outro_and_destroy_block, prevent_default, prop_dev, query_selector_all, raf, run, run_all, safe_not_equal, schedule_update, select_multiple_value, select_option, select_options, select_value, self, setContext, set_attributes, set_current_component, set_custom_element_data, set_data, set_data_dev, set_input_type, set_input_value, set_now, set_raf, set_store_value, set_style, set_svg_attributes, space, spread, start_hydrating, stop_propagation, subscribe, svg_element, text, tick, time_ranges_to_array, to_number, toggle_class, transition_in, transition_out, update_await_block_branch, update_keyed_each, update_slot, update_slot_spread, validate_component, validate_each_argument, validate_each_keys, validate_slots, validate_store, xlink_attr };\n","export { identity as linear } from '../internal/index.mjs';\n\n/*\nAdapted from https://github.com/mattdesl\nDistributed under MIT License https://github.com/mattdesl/eases/blob/master/LICENSE.md\n*/\nfunction backInOut(t) {\n const s = 1.70158 * 1.525;\n if ((t *= 2) < 1)\n return 0.5 * (t * t * ((s + 1) * t - s));\n return 0.5 * ((t -= 2) * t * ((s + 1) * t + s) + 2);\n}\nfunction backIn(t) {\n const s = 1.70158;\n return t * t * ((s + 1) * t - s);\n}\nfunction backOut(t) {\n const s = 1.70158;\n return --t * t * ((s + 1) * t + s) + 1;\n}\nfunction bounceOut(t) {\n const a = 4.0 / 11.0;\n const b = 8.0 / 11.0;\n const c = 9.0 / 10.0;\n const ca = 4356.0 / 361.0;\n const cb = 35442.0 / 1805.0;\n const cc = 16061.0 / 1805.0;\n const t2 = t * t;\n return t < a\n ? 7.5625 * t2\n : t < b\n ? 9.075 * t2 - 9.9 * t + 3.4\n : t < c\n ? ca * t2 - cb * t + cc\n : 10.8 * t * t - 20.52 * t + 10.72;\n}\nfunction bounceInOut(t) {\n return t < 0.5\n ? 0.5 * (1.0 - bounceOut(1.0 - t * 2.0))\n : 0.5 * bounceOut(t * 2.0 - 1.0) + 0.5;\n}\nfunction bounceIn(t) {\n return 1.0 - bounceOut(1.0 - t);\n}\nfunction circInOut(t) {\n if ((t *= 2) < 1)\n return -0.5 * (Math.sqrt(1 - t * t) - 1);\n return 0.5 * (Math.sqrt(1 - (t -= 2) * t) + 1);\n}\nfunction circIn(t) {\n return 1.0 - Math.sqrt(1.0 - t * t);\n}\nfunction circOut(t) {\n return Math.sqrt(1 - --t * t);\n}\nfunction cubicInOut(t) {\n return t < 0.5 ? 4.0 * t * t * t : 0.5 * Math.pow(2.0 * t - 2.0, 3.0) + 1.0;\n}\nfunction cubicIn(t) {\n return t * t * t;\n}\nfunction cubicOut(t) {\n const f = t - 1.0;\n return f * f * f + 1.0;\n}\nfunction elasticInOut(t) {\n return t < 0.5\n ? 0.5 *\n Math.sin(((+13.0 * Math.PI) / 2) * 2.0 * t) *\n Math.pow(2.0, 10.0 * (2.0 * t - 1.0))\n : 0.5 *\n Math.sin(((-13.0 * Math.PI) / 2) * (2.0 * t - 1.0 + 1.0)) *\n Math.pow(2.0, -10.0 * (2.0 * t - 1.0)) +\n 1.0;\n}\nfunction elasticIn(t) {\n return Math.sin((13.0 * t * Math.PI) / 2) * Math.pow(2.0, 10.0 * (t - 1.0));\n}\nfunction elasticOut(t) {\n return (Math.sin((-13.0 * (t + 1.0) * Math.PI) / 2) * Math.pow(2.0, -10.0 * t) + 1.0);\n}\nfunction expoInOut(t) {\n return t === 0.0 || t === 1.0\n ? t\n : t < 0.5\n ? +0.5 * Math.pow(2.0, 20.0 * t - 10.0)\n : -0.5 * Math.pow(2.0, 10.0 - t * 20.0) + 1.0;\n}\nfunction expoIn(t) {\n return t === 0.0 ? t : Math.pow(2.0, 10.0 * (t - 1.0));\n}\nfunction expoOut(t) {\n return t === 1.0 ? t : 1.0 - Math.pow(2.0, -10.0 * t);\n}\nfunction quadInOut(t) {\n t /= 0.5;\n if (t < 1)\n return 0.5 * t * t;\n t--;\n return -0.5 * (t * (t - 2) - 1);\n}\nfunction quadIn(t) {\n return t * t;\n}\nfunction quadOut(t) {\n return -t * (t - 2.0);\n}\nfunction quartInOut(t) {\n return t < 0.5\n ? +8.0 * Math.pow(t, 4.0)\n : -8.0 * Math.pow(t - 1.0, 4.0) + 1.0;\n}\nfunction quartIn(t) {\n return Math.pow(t, 4.0);\n}\nfunction quartOut(t) {\n return Math.pow(t - 1.0, 3.0) * (1.0 - t) + 1.0;\n}\nfunction quintInOut(t) {\n if ((t *= 2) < 1)\n return 0.5 * t * t * t * t * t;\n return 0.5 * ((t -= 2) * t * t * t * t + 2);\n}\nfunction quintIn(t) {\n return t * t * t * t * t;\n}\nfunction quintOut(t) {\n return --t * t * t * t * t + 1;\n}\nfunction sineInOut(t) {\n return -0.5 * (Math.cos(Math.PI * t) - 1);\n}\nfunction sineIn(t) {\n const v = Math.cos(t * Math.PI * 0.5);\n if (Math.abs(v) < 1e-14)\n return 1;\n else\n return 1 - v;\n}\nfunction sineOut(t) {\n return Math.sin((t * Math.PI) / 2);\n}\n\nexport { backIn, backInOut, backOut, bounceIn, bounceInOut, bounceOut, circIn, circInOut, circOut, cubicIn, cubicInOut, cubicOut, elasticIn, elasticInOut, elasticOut, expoIn, expoInOut, expoOut, quadIn, quadInOut, quadOut, quartIn, quartInOut, quartOut, quintIn, quintInOut, quintOut, sineIn, sineInOut, sineOut };\n","import { cubicInOut, linear, cubicOut } from '../easing/index.mjs';\nimport { is_function, assign } from '../internal/index.mjs';\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nfunction __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\n\nfunction blur(node, { delay = 0, duration = 400, easing = cubicInOut, amount = 5, opacity = 0 } = {}) {\n const style = getComputedStyle(node);\n const target_opacity = +style.opacity;\n const f = style.filter === 'none' ? '' : style.filter;\n const od = target_opacity * (1 - opacity);\n return {\n delay,\n duration,\n easing,\n css: (_t, u) => `opacity: ${target_opacity - (od * u)}; filter: ${f} blur(${u * amount}px);`\n };\n}\nfunction fade(node, { delay = 0, duration = 400, easing = linear } = {}) {\n const o = +getComputedStyle(node).opacity;\n return {\n delay,\n duration,\n easing,\n css: t => `opacity: ${t * o}`\n };\n}\nfunction fly(node, { delay = 0, duration = 400, easing = cubicOut, x = 0, y = 0, opacity = 0 } = {}) {\n const style = getComputedStyle(node);\n const target_opacity = +style.opacity;\n const transform = style.transform === 'none' ? '' : style.transform;\n const od = target_opacity * (1 - opacity);\n return {\n delay,\n duration,\n easing,\n css: (t, u) => `\n\t\t\ttransform: ${transform} translate(${(1 - t) * x}px, ${(1 - t) * y}px);\n\t\t\topacity: ${target_opacity - (od * u)}`\n };\n}\nfunction slide(node, { delay = 0, duration = 400, easing = cubicOut } = {}) {\n const style = getComputedStyle(node);\n const opacity = +style.opacity;\n const height = parseFloat(style.height);\n const padding_top = parseFloat(style.paddingTop);\n const padding_bottom = parseFloat(style.paddingBottom);\n const margin_top = parseFloat(style.marginTop);\n const margin_bottom = parseFloat(style.marginBottom);\n const border_top_width = parseFloat(style.borderTopWidth);\n const border_bottom_width = parseFloat(style.borderBottomWidth);\n return {\n delay,\n duration,\n easing,\n css: t => 'overflow: hidden;' +\n `opacity: ${Math.min(t * 20, 1) * opacity};` +\n `height: ${t * height}px;` +\n `padding-top: ${t * padding_top}px;` +\n `padding-bottom: ${t * padding_bottom}px;` +\n `margin-top: ${t * margin_top}px;` +\n `margin-bottom: ${t * margin_bottom}px;` +\n `border-top-width: ${t * border_top_width}px;` +\n `border-bottom-width: ${t * border_bottom_width}px;`\n };\n}\nfunction scale(node, { delay = 0, duration = 400, easing = cubicOut, start = 0, opacity = 0 } = {}) {\n const style = getComputedStyle(node);\n const target_opacity = +style.opacity;\n const transform = style.transform === 'none' ? '' : style.transform;\n const sd = 1 - start;\n const od = target_opacity * (1 - opacity);\n return {\n delay,\n duration,\n easing,\n css: (_t, u) => `\n\t\t\ttransform: ${transform} scale(${1 - (sd * u)});\n\t\t\topacity: ${target_opacity - (od * u)}\n\t\t`\n };\n}\nfunction draw(node, { delay = 0, speed, duration, easing = cubicInOut } = {}) {\n const len = node.getTotalLength();\n if (duration === undefined) {\n if (speed === undefined) {\n duration = 800;\n }\n else {\n duration = len / speed;\n }\n }\n else if (typeof duration === 'function') {\n duration = duration(len);\n }\n return {\n delay,\n duration,\n easing,\n css: (t, u) => `stroke-dasharray: ${t * len} ${u * len}`\n };\n}\nfunction crossfade(_a) {\n var { fallback } = _a, defaults = __rest(_a, [\"fallback\"]);\n const to_receive = new Map();\n const to_send = new Map();\n function crossfade(from, node, params) {\n const { delay = 0, duration = d => Math.sqrt(d) * 30, easing = cubicOut } = assign(assign({}, defaults), params);\n const to = node.getBoundingClientRect();\n const dx = from.left - to.left;\n const dy = from.top - to.top;\n const dw = from.width / to.width;\n const dh = from.height / to.height;\n const d = Math.sqrt(dx * dx + dy * dy);\n const style = getComputedStyle(node);\n const transform = style.transform === 'none' ? '' : style.transform;\n const opacity = +style.opacity;\n return {\n delay,\n duration: is_function(duration) ? duration(d) : duration,\n easing,\n css: (t, u) => `\n\t\t\t\topacity: ${t * opacity};\n\t\t\t\ttransform-origin: top left;\n\t\t\t\ttransform: ${transform} translate(${u * dx}px,${u * dy}px) scale(${t + (1 - t) * dw}, ${t + (1 - t) * dh});\n\t\t\t`\n };\n }\n function transition(items, counterparts, intro) {\n return (node, params) => {\n items.set(params.key, {\n rect: node.getBoundingClientRect()\n });\n return () => {\n if (counterparts.has(params.key)) {\n const { rect } = counterparts.get(params.key);\n counterparts.delete(params.key);\n return crossfade(rect, node, params);\n }\n // if the node is disappearing altogether\n // (i.e. wasn't claimed by the other list)\n // then we need to supply an outro\n items.delete(params.key);\n return fallback && fallback(node, params, intro);\n };\n };\n }\n return [\n transition(to_send, to_receive, false),\n transition(to_receive, to_send, true)\n ];\n}\n\nexport { blur, crossfade, draw, fade, fly, scale, slide };\n","// @ts-check\n// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL\n// This file is automatically generated. DO NOT EDIT\nconst go = {\n \"main\": {\n \"App\": {\n /**\n * CancelWormholeRequest\n * @returns {Promise} \n */\n \"CancelWormholeRequest\": () => {\n return window.go.main.App.CancelWormholeRequest();\n },\n /**\n * ClearSelectedFiles\n * @returns {Promise} \n */\n \"ClearSelectedFiles\": () => {\n return window.go.main.App.ClearSelectedFiles();\n },\n /**\n * GetCurrentVersion\n * @returns {Promise} - Go Type: string\n */\n \"GetCurrentVersion\": () => {\n return window.go.main.App.GetCurrentVersion();\n },\n /**\n * GetDownloadsFolder\n * @returns {Promise} - Go Type: string\n */\n \"GetDownloadsFolder\": () => {\n return window.go.main.App.GetDownloadsFolder();\n },\n /**\n * GetLogPath\n * @returns {Promise} - Go Type: string\n */\n \"GetLogPath\": () => {\n return window.go.main.App.GetLogPath();\n },\n /**\n * GetNotificationsParam\n * @returns {Promise} - Go Type: bool\n */\n \"GetNotificationsParam\": () => {\n return window.go.main.App.GetNotificationsParam();\n },\n /**\n * GetOverwriteParam\n * @returns {Promise} - Go Type: bool\n */\n \"GetOverwriteParam\": () => {\n return window.go.main.App.GetOverwriteParam();\n },\n /**\n * GetReceivedFile\n * @returns {Promise} - Go Type: string\n */\n \"GetReceivedFile\": () => {\n return window.go.main.App.GetReceivedFile();\n },\n /**\n * GetSelectedFiles\n * @returns {Promise>} - Go Type: []string\n */\n \"GetSelectedFiles\": () => {\n return window.go.main.App.GetSelectedFiles();\n },\n /**\n * GetUserPrefs\n * @returns {Promise} - Go Type: settings.UserSettings\n */\n \"GetUserPrefs\": () => {\n return window.go.main.App.GetUserPrefs();\n },\n /**\n * OpenDirectoryDialog\n * @returns {Promise|Error>} - Go Type: []string\n */\n \"OpenDirectoryDialog\": () => {\n return window.go.main.App.OpenDirectoryDialog();\n },\n /**\n * OpenFile\n * @param {string} arg1 - Go Type: string\n * @returns {Promise} \n */\n \"OpenFile\": (arg1) => {\n return window.go.main.App.OpenFile(arg1);\n },\n /**\n * OpenFilesDialog\n * @returns {Promise|Error>} - Go Type: []string\n */\n \"OpenFilesDialog\": () => {\n return window.go.main.App.OpenFilesDialog();\n },\n /**\n * ReceiveFile\n * @param {string} arg1 - Go Type: string\n * @returns {Promise} \n */\n \"ReceiveFile\": (arg1) => {\n return window.go.main.App.ReceiveFile(arg1);\n },\n /**\n * SelectedFilesSend\n * @returns {Promise} \n */\n \"SelectedFilesSend\": () => {\n return window.go.main.App.SelectedFilesSend();\n },\n /**\n * SendDirectory\n * @param {string} arg1 - Go Type: string\n * @returns {Promise} \n */\n \"SendDirectory\": (arg1) => {\n return window.go.main.App.SendDirectory(arg1);\n },\n /**\n * SendFile\n * @param {string} arg1 - Go Type: string\n * @returns {Promise} \n */\n \"SendFile\": (arg1) => {\n return window.go.main.App.SendFile(arg1);\n },\n /**\n * SetDownloadsFolder\n * @returns {Promise} - Go Type: string\n */\n \"SetDownloadsFolder\": () => {\n return window.go.main.App.SetDownloadsFolder();\n },\n /**\n * SetNotificationsParam\n * @param {boolean} arg1 - Go Type: bool\n * @returns {Promise} - Go Type: bool\n */\n \"SetNotificationsParam\": (arg1) => {\n return window.go.main.App.SetNotificationsParam(arg1);\n },\n /**\n * SetOverwriteParam\n * @param {boolean} arg1 - Go Type: bool\n * @returns {Promise} - Go Type: bool\n */\n \"SetOverwriteParam\": (arg1) => {\n return window.go.main.App.SetOverwriteParam(arg1);\n },\n /**\n * SetSelfUpdateParam\n * @param {boolean} arg1 - Go Type: bool\n * @returns {Promise} - Go Type: bool\n */\n \"SetSelfUpdateParam\": (arg1) => {\n return window.go.main.App.SetSelfUpdateParam(arg1);\n },\n /**\n * ShowErrorDialog\n * @param {string} arg1 - Go Type: string\n * @returns {Promise} \n */\n \"ShowErrorDialog\": (arg1) => {\n return window.go.main.App.ShowErrorDialog(arg1);\n },\n /**\n * UpdateCheckUI\n * @returns {Promise} \n */\n \"UpdateCheckUI\": () => {\n return window.go.main.App.UpdateCheckUI();\n },\n /**\n * UpdateSendProgress\n * @param {number} arg1 - Go Type: int64\n * @param {number} arg2 - Go Type: int64\n * @returns {Promise} \n */\n \"UpdateSendProgress\": (arg1, arg2) => {\n return window.go.main.App.UpdateSendProgress(arg1, arg2);\n },\n },\n },\n\n};\nexport default go;\n","\n\n
\n
\n
\n {status}\n {percent}%\n
\n
\n \n
\n \n
\n
\n","\n\n
\n \n \n {#if selectedFiles.length > 0}\n
\n {#each selectedFileNames as fileName, idx}\n {#if idx < 9}\n
\n
\n {fileName}\n
\n {:else if idx == 9}\n
\n ...Total Selected: {selectedFiles.length}\n
\n {/if}\n {/each}\n
\n {:else}\n \n
\n Send Files\n \n
\n
\n Send Directory\n \n
\n
\n {/if}\n
\n
\n {#if selectedFiles.length > 0}\n Clear\n Send\n {/if}\n
\n {#if isSending}\n \n
\n \n {#if sendCode}\n
\n \n \n \n
\n {/if}\n
\n
\n {/if}\n\n","\n\n
\n \n {#if receivePath}\n \n \n
\n {receiveFileName}\n {#if !isReceiving}\n \n {/if}\n
\n {/if}\n
\n
\n
\n \n \n \n \n
\n {#if isReceiving}\n \n
\n \n
\n
\n {/if}\n\n","\n\n
\n
\n
Downloads Folder
\n
\n
{downloadsFolder}
\n
\n
\n
\n
\n
Notifications
\n
\n
\n
Overwrite
\n
\n \n \n
\n
Auto Update
\n
\n \n \n
\n
\n
Logs
\n
\n
{logPath}
\n
\n
\n
\n
\n
\n","\n\n
\n
\n Riftshare v{version}\n
\n\n

\n The goal of this project is to enable everyone to securely share files\n freely and easily.\n

\n

Licensed under the GNU GPL Version 3

\n\n
\n

\n This project leverages the work of other Open Source Software\n

\n
    \n {#each Object.entries(attributions) as [name, url]}\n
  • \n {/each}\n
\n
\n
\n","\n\n
\n \n
\n
    \n
  • \n (appMode = \"send\")}\n >\n
    \n Send\n \n
  • \n
  • \n (appMode = \"receive\")}\n >\n
    \n Receive\n \n
  • \n
  • \n (appMode = \"settings\")}\n >\n
    \n Settings\n \n
  • \n
  • \n (appMode = \"about\")}\n >\n
    \n About\n \n
  • \n
\n
\n \n
\n {#if appMode == \"send\"}\n \n {:else if appMode == \"receive\"}\n \n {:else if appMode == \"settings\"}\n \n {:else if appMode == \"about\"}\n \n {/if}\n
\n
\n\n\n","function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import App from './App.svelte';\n\nconst app = new App({\n\ttarget: document.body,\n});\n\nexport default app;"],"names":["noop","identity","x","run","fn","blank_object","Object","create","run_all","fns","forEach","is_function","thing","safe_not_equal","a","b","get_slot_context","definition","ctx","$$scope","tar","src","k","assign","slice","update_slot","slot","slot_definition","dirty","get_slot_changes_fn","get_slot_context_fn","slot_changes","lets","undefined","merged","len","Math","max","length","i","get_slot_changes","slot_context","p","is_client","window","now","performance","Date","raf","cb","requestAnimationFrame","tasks","Set","run_tasks","task","c","delete","f","size","loop","callback","promise","Promise","fulfill","add","abort","is_hydrating","upper_bound","low","high","key","value","mid","append","target","node","hydrate_init","children","childNodes","m","Int32Array","longest","seqLen","idx","claim_order","newLen","lis","toMove","last","cur","push","reverse","sort","j","anchor","insertBefore","init_hydrate","actual_end_child","parentElement","firstChild","nextSibling","parentNode","appendChild","insert","detach","removeChild","destroy_each","iterations","detaching","d","element","name","document","createElement","text","data","createTextNode","space","listen","event","handler","options","addEventListener","removeEventListener","attr","attribute","removeAttribute","getAttribute","setAttribute","set_data","wholeText","set_input_value","input","active_docs","current_component","active","create_rule","duration","delay","ease","uid","step","keyframes","t","rule","str","hash","charCodeAt","doc","ownerDocument","stylesheet","__svelte_stylesheet","head","sheet","current_rules","__svelte_rules","insertRule","cssRules","animation","style","delete_rule","previous","split","next","filter","anim","indexOf","deleted","join","deleteRule","clear","set_current_component","component","onMount","Error","get_current_component","$$","on_mount","dirty_components","binding_callbacks","render_callbacks","flush_callbacks","resolved_promise","resolve","update_scheduled","add_render_callback","flushing","seen_callbacks","flush","update","pop","has","fragment","before_update","after_update","wait","then","dispatch","direction","kind","dispatchEvent","type","detail","e","createEvent","initCustomEvent","custom_event","outroing","outros","group_outros","r","check_outros","transition_in","block","local","transition_out","o","null_transition","create_in_transition","params","animation_name","config","running","cleanup","go","easing","tick","css","start_time","end_time","started","start","invalidate","end","create_bidirectional_transition","intro","running_program","pending_program","clear_animation","init","program","abs","group","create_component","mount_component","customElement","on_destroy","new_on_destroy","map","destroy_component","make_dirty","fill","instance","create_fragment","not_equal","props","parent_component","bound","on_disconnect","context","Map","callbacks","skip_bound","ready","ret","rest","hydrate","nodes","Array","from","l","SvelteComponent","$destroy","this","$on","index","splice","$set","$$props","obj","$$set","keys","cubicOut","slide","getComputedStyle","opacity","height","parseFloat","padding_top","paddingTop","padding_bottom","paddingBottom","margin_top","marginTop","margin_bottom","marginBottom","border_top_width","borderTopWidth","border_bottom_width","borderBottomWidth","min","App","CancelWormholeRequest","main","ClearSelectedFiles","GetCurrentVersion","GetDownloadsFolder","GetLogPath","GetNotificationsParam","GetOverwriteParam","GetReceivedFile","GetSelectedFiles","GetUserPrefs","OpenDirectoryDialog","OpenFile","arg1","OpenFilesDialog","ReceiveFile","SelectedFilesSend","SendDirectory","SendFile","SetDownloadsFolder","SetNotificationsParam","SetOverwriteParam","SetSelfUpdateParam","ShowErrorDialog","UpdateCheckUI","UpdateSendProgress","arg2","slot_ctx","toString","status","waiting","percent","copyCode","copyText","getElementById","select","setSelectionRange","navigator","clipboard","writeText","String","prototype","trimEllip","substring","sendCode","sendPercent","selectedFiles","isSending","runtime","EventsOn","newCode","sendStatus","setTimeout","filePaths","selectedFileNames","fileName","selection","catch","err","console","log","preventDefault","call","receivePattern","receiveCode","receivePercent","isReceiving","receivePath","path","receiveStatus","receiveCodeValid","test","receiveFileName","downloadsFolder","logPath","notifications","overwrite","selfUpdate","prefs","downloadsDirectory","folder","newValue","BrowserOpenURL","entries","version","ver","svelte","tailwindcss","url","appMode","ref","insertAt","getElements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GAAU3E,OAAOkT,QAAQkC,eAAe,qCAiBhCzQ,IAAU3E,OAAOkT,QAAQkC,eAAeM,g4BCuCzE,QAAXpX,OAEgB,WAAXA,OAEW,YAAXA,OAEW,SAAXA,meA5Ec,QAAXA,KACH,2BACA,sGASc,WAAXA,KACH,2BACA,uGASc,YAAXA,KACH,2BACA,oGASc,SAAXA,KACH,2BACA,2hBAnCc,QAAXA,KACH,2BACA,gEASc,WAAXA,KACH,2BACA,gEASc,YAAXA,KACH,2BACA,gEASc,SAAXA,KACH,2BACA,uRA9CRqX,EAAU,wBAcWA,EAAU,gBAWVA,EAAU,mBAWVA,EAAU,oBAWVA,EAAU,WCrDrC,SAAqBpK,EAAKqK,QACX,IAARA,IAAiBA,EAAM,IAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAKtK,GAA2B,oBAAbnH,SAAnB,CAEA,IAAIwC,EAAOxC,SAASwC,MAAQxC,SAAS0R,qBAAqB,QAAQ,GAC9D3O,EAAQ/C,SAASC,cAAc,SACnC8C,EAAM0C,KAAO,WAEI,QAAbgM,GACEjP,EAAKrD,WACPqD,EAAKzD,aAAagE,EAAOP,EAAKrD,YAKhCqD,EAAKlD,YAAYyD,GAGfA,EAAM4O,WACR5O,EAAM4O,WAAWC,QAAUzK,EAE3BpE,EAAMzD,YAAYU,SAASI,eAAe+G,4srBCrBlC,oEAAQ,CACnBzJ,OAAQsC,SAAS6R"} \ No newline at end of file +{"version":3,"file":"bundle.js","sources":["../node_modules/svelte/internal/index.mjs","../node_modules/svelte/easing/index.mjs","../node_modules/svelte/transition/index.mjs","../wailsjs/go/bindings.js","../src/progress.svelte","../src/sender.svelte","../src/receiver.svelte","../src/settings.svelte","../src/about.svelte","../src/App.svelte","../node_modules/style-inject/dist/style-inject.es.js","../src/main.js"],"sourcesContent":["function noop() { }\nconst identity = x => x;\nfunction assign(tar, src) {\n // @ts-ignore\n for (const k in src)\n tar[k] = src[k];\n return tar;\n}\nfunction is_promise(value) {\n return value && typeof value === 'object' && typeof value.then === 'function';\n}\nfunction add_location(element, file, line, column, char) {\n element.__svelte_meta = {\n loc: { file, line, column, char }\n };\n}\nfunction run(fn) {\n return fn();\n}\nfunction blank_object() {\n return Object.create(null);\n}\nfunction run_all(fns) {\n fns.forEach(run);\n}\nfunction is_function(thing) {\n return typeof thing === 'function';\n}\nfunction safe_not_equal(a, b) {\n return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');\n}\nfunction not_equal(a, b) {\n return a != a ? b == b : a !== b;\n}\nfunction is_empty(obj) {\n return Object.keys(obj).length === 0;\n}\nfunction validate_store(store, name) {\n if (store != null && typeof store.subscribe !== 'function') {\n throw new Error(`'${name}' is not a store with a 'subscribe' method`);\n }\n}\nfunction subscribe(store, ...callbacks) {\n if (store == null) {\n return noop;\n }\n const unsub = store.subscribe(...callbacks);\n return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;\n}\nfunction get_store_value(store) {\n let value;\n subscribe(store, _ => value = _)();\n return value;\n}\nfunction component_subscribe(component, store, callback) {\n component.$$.on_destroy.push(subscribe(store, callback));\n}\nfunction create_slot(definition, ctx, $$scope, fn) {\n if (definition) {\n const slot_ctx = get_slot_context(definition, ctx, $$scope, fn);\n return definition[0](slot_ctx);\n }\n}\nfunction get_slot_context(definition, ctx, $$scope, fn) {\n return definition[1] && fn\n ? assign($$scope.ctx.slice(), definition[1](fn(ctx)))\n : $$scope.ctx;\n}\nfunction get_slot_changes(definition, $$scope, dirty, fn) {\n if (definition[2] && fn) {\n const lets = definition[2](fn(dirty));\n if ($$scope.dirty === undefined) {\n return lets;\n }\n if (typeof lets === 'object') {\n const merged = [];\n const len = Math.max($$scope.dirty.length, lets.length);\n for (let i = 0; i < len; i += 1) {\n merged[i] = $$scope.dirty[i] | lets[i];\n }\n return merged;\n }\n return $$scope.dirty | lets;\n }\n return $$scope.dirty;\n}\nfunction update_slot(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_context_fn) {\n const slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n if (slot_changes) {\n const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n slot.p(slot_context, slot_changes);\n }\n}\nfunction update_slot_spread(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_spread_changes_fn, get_slot_context_fn) {\n const slot_changes = get_slot_spread_changes_fn(dirty) | get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n if (slot_changes) {\n const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n slot.p(slot_context, slot_changes);\n }\n}\nfunction exclude_internal_props(props) {\n const result = {};\n for (const k in props)\n if (k[0] !== '$')\n result[k] = props[k];\n return result;\n}\nfunction compute_rest_props(props, keys) {\n const rest = {};\n keys = new Set(keys);\n for (const k in props)\n if (!keys.has(k) && k[0] !== '$')\n rest[k] = props[k];\n return rest;\n}\nfunction compute_slots(slots) {\n const result = {};\n for (const key in slots) {\n result[key] = true;\n }\n return result;\n}\nfunction once(fn) {\n let ran = false;\n return function (...args) {\n if (ran)\n return;\n ran = true;\n fn.call(this, ...args);\n };\n}\nfunction null_to_empty(value) {\n return value == null ? '' : value;\n}\nfunction set_store_value(store, ret, value = ret) {\n store.set(value);\n return ret;\n}\nconst has_prop = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\nfunction action_destroyer(action_result) {\n return action_result && is_function(action_result.destroy) ? action_result.destroy : noop;\n}\n\nconst is_client = typeof window !== 'undefined';\nlet now = is_client\n ? () => window.performance.now()\n : () => Date.now();\nlet raf = is_client ? cb => requestAnimationFrame(cb) : noop;\n// used internally for testing\nfunction set_now(fn) {\n now = fn;\n}\nfunction set_raf(fn) {\n raf = fn;\n}\n\nconst tasks = new Set();\nfunction run_tasks(now) {\n tasks.forEach(task => {\n if (!task.c(now)) {\n tasks.delete(task);\n task.f();\n }\n });\n if (tasks.size !== 0)\n raf(run_tasks);\n}\n/**\n * For testing purposes only!\n */\nfunction clear_loops() {\n tasks.clear();\n}\n/**\n * Creates a new task that runs on each raf frame\n * until it returns a falsy value or is aborted\n */\nfunction loop(callback) {\n let task;\n if (tasks.size === 0)\n raf(run_tasks);\n return {\n promise: new Promise(fulfill => {\n tasks.add(task = { c: callback, f: fulfill });\n }),\n abort() {\n tasks.delete(task);\n }\n };\n}\n\n// Track which nodes are claimed during hydration. Unclaimed nodes can then be removed from the DOM\n// at the end of hydration without touching the remaining nodes.\nlet is_hydrating = false;\nfunction start_hydrating() {\n is_hydrating = true;\n}\nfunction end_hydrating() {\n is_hydrating = false;\n}\nfunction upper_bound(low, high, key, value) {\n // Return first index of value larger than input value in the range [low, high)\n while (low < high) {\n const mid = low + ((high - low) >> 1);\n if (key(mid) <= value) {\n low = mid + 1;\n }\n else {\n high = mid;\n }\n }\n return low;\n}\nfunction init_hydrate(target) {\n if (target.hydrate_init)\n return;\n target.hydrate_init = true;\n // We know that all children have claim_order values since the unclaimed have been detached\n const children = target.childNodes;\n /*\n * Reorder claimed children optimally.\n * We can reorder claimed children optimally by finding the longest subsequence of\n * nodes that are already claimed in order and only moving the rest. The longest\n * subsequence subsequence of nodes that are claimed in order can be found by\n * computing the longest increasing subsequence of .claim_order values.\n *\n * This algorithm is optimal in generating the least amount of reorder operations\n * possible.\n *\n * Proof:\n * We know that, given a set of reordering operations, the nodes that do not move\n * always form an increasing subsequence, since they do not move among each other\n * meaning that they must be already ordered among each other. Thus, the maximal\n * set of nodes that do not move form a longest increasing subsequence.\n */\n // Compute longest increasing subsequence\n // m: subsequence length j => index k of smallest value that ends an increasing subsequence of length j\n const m = new Int32Array(children.length + 1);\n // Predecessor indices + 1\n const p = new Int32Array(children.length);\n m[0] = -1;\n let longest = 0;\n for (let i = 0; i < children.length; i++) {\n const current = children[i].claim_order;\n // Find the largest subsequence length such that it ends in a value less than our current value\n // upper_bound returns first greater value, so we subtract one\n const seqLen = upper_bound(1, longest + 1, idx => children[m[idx]].claim_order, current) - 1;\n p[i] = m[seqLen] + 1;\n const newLen = seqLen + 1;\n // We can guarantee that current is the smallest value. Otherwise, we would have generated a longer sequence.\n m[newLen] = i;\n longest = Math.max(newLen, longest);\n }\n // The longest increasing subsequence of nodes (initially reversed)\n const lis = [];\n // The rest of the nodes, nodes that will be moved\n const toMove = [];\n let last = children.length - 1;\n for (let cur = m[longest] + 1; cur != 0; cur = p[cur - 1]) {\n lis.push(children[cur - 1]);\n for (; last >= cur; last--) {\n toMove.push(children[last]);\n }\n last--;\n }\n for (; last >= 0; last--) {\n toMove.push(children[last]);\n }\n lis.reverse();\n // We sort the nodes being moved to guarantee that their insertion order matches the claim order\n toMove.sort((a, b) => a.claim_order - b.claim_order);\n // Finally, we move the nodes\n for (let i = 0, j = 0; i < toMove.length; i++) {\n while (j < lis.length && toMove[i].claim_order >= lis[j].claim_order) {\n j++;\n }\n const anchor = j < lis.length ? lis[j] : null;\n target.insertBefore(toMove[i], anchor);\n }\n}\nfunction append(target, node) {\n if (is_hydrating) {\n init_hydrate(target);\n if ((target.actual_end_child === undefined) || ((target.actual_end_child !== null) && (target.actual_end_child.parentElement !== target))) {\n target.actual_end_child = target.firstChild;\n }\n if (node !== target.actual_end_child) {\n target.insertBefore(node, target.actual_end_child);\n }\n else {\n target.actual_end_child = node.nextSibling;\n }\n }\n else if (node.parentNode !== target) {\n target.appendChild(node);\n }\n}\nfunction insert(target, node, anchor) {\n if (is_hydrating && !anchor) {\n append(target, node);\n }\n else if (node.parentNode !== target || (anchor && node.nextSibling !== anchor)) {\n target.insertBefore(node, anchor || null);\n }\n}\nfunction detach(node) {\n node.parentNode.removeChild(node);\n}\nfunction destroy_each(iterations, detaching) {\n for (let i = 0; i < iterations.length; i += 1) {\n if (iterations[i])\n iterations[i].d(detaching);\n }\n}\nfunction element(name) {\n return document.createElement(name);\n}\nfunction element_is(name, is) {\n return document.createElement(name, { is });\n}\nfunction object_without_properties(obj, exclude) {\n const target = {};\n for (const k in obj) {\n if (has_prop(obj, k)\n // @ts-ignore\n && exclude.indexOf(k) === -1) {\n // @ts-ignore\n target[k] = obj[k];\n }\n }\n return target;\n}\nfunction svg_element(name) {\n return document.createElementNS('http://www.w3.org/2000/svg', name);\n}\nfunction text(data) {\n return document.createTextNode(data);\n}\nfunction space() {\n return text(' ');\n}\nfunction empty() {\n return text('');\n}\nfunction listen(node, event, handler, options) {\n node.addEventListener(event, handler, options);\n return () => node.removeEventListener(event, handler, options);\n}\nfunction prevent_default(fn) {\n return function (event) {\n event.preventDefault();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction stop_propagation(fn) {\n return function (event) {\n event.stopPropagation();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction self(fn) {\n return function (event) {\n // @ts-ignore\n if (event.target === this)\n fn.call(this, event);\n };\n}\nfunction attr(node, attribute, value) {\n if (value == null)\n node.removeAttribute(attribute);\n else if (node.getAttribute(attribute) !== value)\n node.setAttribute(attribute, value);\n}\nfunction set_attributes(node, attributes) {\n // @ts-ignore\n const descriptors = Object.getOwnPropertyDescriptors(node.__proto__);\n for (const key in attributes) {\n if (attributes[key] == null) {\n node.removeAttribute(key);\n }\n else if (key === 'style') {\n node.style.cssText = attributes[key];\n }\n else if (key === '__value') {\n node.value = node[key] = attributes[key];\n }\n else if (descriptors[key] && descriptors[key].set) {\n node[key] = attributes[key];\n }\n else {\n attr(node, key, attributes[key]);\n }\n }\n}\nfunction set_svg_attributes(node, attributes) {\n for (const key in attributes) {\n attr(node, key, attributes[key]);\n }\n}\nfunction set_custom_element_data(node, prop, value) {\n if (prop in node) {\n node[prop] = typeof node[prop] === 'boolean' && value === '' ? true : value;\n }\n else {\n attr(node, prop, value);\n }\n}\nfunction xlink_attr(node, attribute, value) {\n node.setAttributeNS('http://www.w3.org/1999/xlink', attribute, value);\n}\nfunction get_binding_group_value(group, __value, checked) {\n const value = new Set();\n for (let i = 0; i < group.length; i += 1) {\n if (group[i].checked)\n value.add(group[i].__value);\n }\n if (!checked) {\n value.delete(__value);\n }\n return Array.from(value);\n}\nfunction to_number(value) {\n return value === '' ? null : +value;\n}\nfunction time_ranges_to_array(ranges) {\n const array = [];\n for (let i = 0; i < ranges.length; i += 1) {\n array.push({ start: ranges.start(i), end: ranges.end(i) });\n }\n return array;\n}\nfunction children(element) {\n return Array.from(element.childNodes);\n}\nfunction claim_node(nodes, predicate, processNode, createNode, dontUpdateLastIndex = false) {\n // Try to find nodes in an order such that we lengthen the longest increasing subsequence\n if (nodes.claim_info === undefined) {\n nodes.claim_info = { last_index: 0, total_claimed: 0 };\n }\n const resultNode = (() => {\n // We first try to find an element after the previous one\n for (let i = nodes.claim_info.last_index; i < nodes.length; i++) {\n const node = nodes[i];\n if (predicate(node)) {\n processNode(node);\n nodes.splice(i, 1);\n if (!dontUpdateLastIndex) {\n nodes.claim_info.last_index = i;\n }\n return node;\n }\n }\n // Otherwise, we try to find one before\n // We iterate in reverse so that we don't go too far back\n for (let i = nodes.claim_info.last_index - 1; i >= 0; i--) {\n const node = nodes[i];\n if (predicate(node)) {\n processNode(node);\n nodes.splice(i, 1);\n if (!dontUpdateLastIndex) {\n nodes.claim_info.last_index = i;\n }\n else {\n // Since we spliced before the last_index, we decrease it\n nodes.claim_info.last_index--;\n }\n return node;\n }\n }\n // If we can't find any matching node, we create a new one\n return createNode();\n })();\n resultNode.claim_order = nodes.claim_info.total_claimed;\n nodes.claim_info.total_claimed += 1;\n return resultNode;\n}\nfunction claim_element(nodes, name, attributes, svg) {\n return claim_node(nodes, (node) => node.nodeName === name, (node) => {\n const remove = [];\n for (let j = 0; j < node.attributes.length; j++) {\n const attribute = node.attributes[j];\n if (!attributes[attribute.name]) {\n remove.push(attribute.name);\n }\n }\n remove.forEach(v => node.removeAttribute(v));\n }, () => svg ? svg_element(name) : element(name));\n}\nfunction claim_text(nodes, data) {\n return claim_node(nodes, (node) => node.nodeType === 3, (node) => {\n node.data = '' + data;\n }, () => text(data), true // Text nodes should not update last index since it is likely not worth it to eliminate an increasing subsequence of actual elements\n );\n}\nfunction claim_space(nodes) {\n return claim_text(nodes, ' ');\n}\nfunction find_comment(nodes, text, start) {\n for (let i = start; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeType === 8 /* comment node */ && node.textContent.trim() === text) {\n return i;\n }\n }\n return nodes.length;\n}\nfunction claim_html_tag(nodes) {\n // find html opening tag\n const start_index = find_comment(nodes, 'HTML_TAG_START', 0);\n const end_index = find_comment(nodes, 'HTML_TAG_END', start_index);\n if (start_index === end_index) {\n return new HtmlTag();\n }\n const html_tag_nodes = nodes.splice(start_index, end_index + 1);\n detach(html_tag_nodes[0]);\n detach(html_tag_nodes[html_tag_nodes.length - 1]);\n return new HtmlTag(html_tag_nodes.slice(1, html_tag_nodes.length - 1));\n}\nfunction set_data(text, data) {\n data = '' + data;\n if (text.wholeText !== data)\n text.data = data;\n}\nfunction set_input_value(input, value) {\n input.value = value == null ? '' : value;\n}\nfunction set_input_type(input, type) {\n try {\n input.type = type;\n }\n catch (e) {\n // do nothing\n }\n}\nfunction set_style(node, key, value, important) {\n node.style.setProperty(key, value, important ? 'important' : '');\n}\nfunction select_option(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n if (option.__value === value) {\n option.selected = true;\n return;\n }\n }\n}\nfunction select_options(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n option.selected = ~value.indexOf(option.__value);\n }\n}\nfunction select_value(select) {\n const selected_option = select.querySelector(':checked') || select.options[0];\n return selected_option && selected_option.__value;\n}\nfunction select_multiple_value(select) {\n return [].map.call(select.querySelectorAll(':checked'), option => option.__value);\n}\n// unfortunately this can't be a constant as that wouldn't be tree-shakeable\n// so we cache the result instead\nlet crossorigin;\nfunction is_crossorigin() {\n if (crossorigin === undefined) {\n crossorigin = false;\n try {\n if (typeof window !== 'undefined' && window.parent) {\n void window.parent.document;\n }\n }\n catch (error) {\n crossorigin = true;\n }\n }\n return crossorigin;\n}\nfunction add_resize_listener(node, fn) {\n const computed_style = getComputedStyle(node);\n if (computed_style.position === 'static') {\n node.style.position = 'relative';\n }\n const iframe = element('iframe');\n iframe.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ' +\n 'overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;');\n iframe.setAttribute('aria-hidden', 'true');\n iframe.tabIndex = -1;\n const crossorigin = is_crossorigin();\n let unsubscribe;\n if (crossorigin) {\n iframe.src = \"data:text/html,\";\n unsubscribe = listen(window, 'message', (event) => {\n if (event.source === iframe.contentWindow)\n fn();\n });\n }\n else {\n iframe.src = 'about:blank';\n iframe.onload = () => {\n unsubscribe = listen(iframe.contentWindow, 'resize', fn);\n };\n }\n append(node, iframe);\n return () => {\n if (crossorigin) {\n unsubscribe();\n }\n else if (unsubscribe && iframe.contentWindow) {\n unsubscribe();\n }\n detach(iframe);\n };\n}\nfunction toggle_class(element, name, toggle) {\n element.classList[toggle ? 'add' : 'remove'](name);\n}\nfunction custom_event(type, detail) {\n const e = document.createEvent('CustomEvent');\n e.initCustomEvent(type, false, false, detail);\n return e;\n}\nfunction query_selector_all(selector, parent = document.body) {\n return Array.from(parent.querySelectorAll(selector));\n}\nclass HtmlTag {\n constructor(claimed_nodes) {\n this.e = this.n = null;\n this.l = claimed_nodes;\n }\n m(html, target, anchor = null) {\n if (!this.e) {\n this.e = element(target.nodeName);\n this.t = target;\n if (this.l) {\n this.n = this.l;\n }\n else {\n this.h(html);\n }\n }\n this.i(anchor);\n }\n h(html) {\n this.e.innerHTML = html;\n this.n = Array.from(this.e.childNodes);\n }\n i(anchor) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert(this.t, this.n[i], anchor);\n }\n }\n p(html) {\n this.d();\n this.h(html);\n this.i(this.a);\n }\n d() {\n this.n.forEach(detach);\n }\n}\nfunction attribute_to_object(attributes) {\n const result = {};\n for (const attribute of attributes) {\n result[attribute.name] = attribute.value;\n }\n return result;\n}\nfunction get_custom_elements_slots(element) {\n const result = {};\n element.childNodes.forEach((node) => {\n result[node.slot || 'default'] = true;\n });\n return result;\n}\n\nconst active_docs = new Set();\nlet active = 0;\n// https://github.com/darkskyapp/string-hash/blob/master/index.js\nfunction hash(str) {\n let hash = 5381;\n let i = str.length;\n while (i--)\n hash = ((hash << 5) - hash) ^ str.charCodeAt(i);\n return hash >>> 0;\n}\nfunction create_rule(node, a, b, duration, delay, ease, fn, uid = 0) {\n const step = 16.666 / duration;\n let keyframes = '{\\n';\n for (let p = 0; p <= 1; p += step) {\n const t = a + (b - a) * ease(p);\n keyframes += p * 100 + `%{${fn(t, 1 - t)}}\\n`;\n }\n const rule = keyframes + `100% {${fn(b, 1 - b)}}\\n}`;\n const name = `__svelte_${hash(rule)}_${uid}`;\n const doc = node.ownerDocument;\n active_docs.add(doc);\n const stylesheet = doc.__svelte_stylesheet || (doc.__svelte_stylesheet = doc.head.appendChild(element('style')).sheet);\n const current_rules = doc.__svelte_rules || (doc.__svelte_rules = {});\n if (!current_rules[name]) {\n current_rules[name] = true;\n stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length);\n }\n const animation = node.style.animation || '';\n node.style.animation = `${animation ? `${animation}, ` : ''}${name} ${duration}ms linear ${delay}ms 1 both`;\n active += 1;\n return name;\n}\nfunction delete_rule(node, name) {\n const previous = (node.style.animation || '').split(', ');\n const next = previous.filter(name\n ? anim => anim.indexOf(name) < 0 // remove specific animation\n : anim => anim.indexOf('__svelte') === -1 // remove all Svelte animations\n );\n const deleted = previous.length - next.length;\n if (deleted) {\n node.style.animation = next.join(', ');\n active -= deleted;\n if (!active)\n clear_rules();\n }\n}\nfunction clear_rules() {\n raf(() => {\n if (active)\n return;\n active_docs.forEach(doc => {\n const stylesheet = doc.__svelte_stylesheet;\n let i = stylesheet.cssRules.length;\n while (i--)\n stylesheet.deleteRule(i);\n doc.__svelte_rules = {};\n });\n active_docs.clear();\n });\n}\n\nfunction create_animation(node, from, fn, params) {\n if (!from)\n return noop;\n const to = node.getBoundingClientRect();\n if (from.left === to.left && from.right === to.right && from.top === to.top && from.bottom === to.bottom)\n return noop;\n const { delay = 0, duration = 300, easing = identity, \n // @ts-ignore todo: should this be separated from destructuring? Or start/end added to public api and documentation?\n start: start_time = now() + delay, \n // @ts-ignore todo:\n end = start_time + duration, tick = noop, css } = fn(node, { from, to }, params);\n let running = true;\n let started = false;\n let name;\n function start() {\n if (css) {\n name = create_rule(node, 0, 1, duration, delay, easing, css);\n }\n if (!delay) {\n started = true;\n }\n }\n function stop() {\n if (css)\n delete_rule(node, name);\n running = false;\n }\n loop(now => {\n if (!started && now >= start_time) {\n started = true;\n }\n if (started && now >= end) {\n tick(1, 0);\n stop();\n }\n if (!running) {\n return false;\n }\n if (started) {\n const p = now - start_time;\n const t = 0 + 1 * easing(p / duration);\n tick(t, 1 - t);\n }\n return true;\n });\n start();\n tick(0, 1);\n return stop;\n}\nfunction fix_position(node) {\n const style = getComputedStyle(node);\n if (style.position !== 'absolute' && style.position !== 'fixed') {\n const { width, height } = style;\n const a = node.getBoundingClientRect();\n node.style.position = 'absolute';\n node.style.width = width;\n node.style.height = height;\n add_transform(node, a);\n }\n}\nfunction add_transform(node, a) {\n const b = node.getBoundingClientRect();\n if (a.left !== b.left || a.top !== b.top) {\n const style = getComputedStyle(node);\n const transform = style.transform === 'none' ? '' : style.transform;\n node.style.transform = `${transform} translate(${a.left - b.left}px, ${a.top - b.top}px)`;\n }\n}\n\nlet current_component;\nfunction set_current_component(component) {\n current_component = component;\n}\nfunction get_current_component() {\n if (!current_component)\n throw new Error('Function called outside component initialization');\n return current_component;\n}\nfunction beforeUpdate(fn) {\n get_current_component().$$.before_update.push(fn);\n}\nfunction onMount(fn) {\n get_current_component().$$.on_mount.push(fn);\n}\nfunction afterUpdate(fn) {\n get_current_component().$$.after_update.push(fn);\n}\nfunction onDestroy(fn) {\n get_current_component().$$.on_destroy.push(fn);\n}\nfunction createEventDispatcher() {\n const component = get_current_component();\n return (type, detail) => {\n const callbacks = component.$$.callbacks[type];\n if (callbacks) {\n // TODO are there situations where events could be dispatched\n // in a server (non-DOM) environment?\n const event = custom_event(type, detail);\n callbacks.slice().forEach(fn => {\n fn.call(component, event);\n });\n }\n };\n}\nfunction setContext(key, context) {\n get_current_component().$$.context.set(key, context);\n}\nfunction getContext(key) {\n return get_current_component().$$.context.get(key);\n}\nfunction hasContext(key) {\n return get_current_component().$$.context.has(key);\n}\n// TODO figure out if we still want to support\n// shorthand events, or if we want to implement\n// a real bubbling mechanism\nfunction bubble(component, event) {\n const callbacks = component.$$.callbacks[event.type];\n if (callbacks) {\n // @ts-ignore\n callbacks.slice().forEach(fn => fn.call(this, event));\n }\n}\n\nconst dirty_components = [];\nconst intros = { enabled: false };\nconst binding_callbacks = [];\nconst render_callbacks = [];\nconst flush_callbacks = [];\nconst resolved_promise = Promise.resolve();\nlet update_scheduled = false;\nfunction schedule_update() {\n if (!update_scheduled) {\n update_scheduled = true;\n resolved_promise.then(flush);\n }\n}\nfunction tick() {\n schedule_update();\n return resolved_promise;\n}\nfunction add_render_callback(fn) {\n render_callbacks.push(fn);\n}\nfunction add_flush_callback(fn) {\n flush_callbacks.push(fn);\n}\nlet flushing = false;\nconst seen_callbacks = new Set();\nfunction flush() {\n if (flushing)\n return;\n flushing = true;\n do {\n // first, call beforeUpdate functions\n // and update components\n for (let i = 0; i < dirty_components.length; i += 1) {\n const component = dirty_components[i];\n set_current_component(component);\n update(component.$$);\n }\n set_current_component(null);\n dirty_components.length = 0;\n while (binding_callbacks.length)\n binding_callbacks.pop()();\n // then, once components are updated, call\n // afterUpdate functions. This may cause\n // subsequent updates...\n for (let i = 0; i < render_callbacks.length; i += 1) {\n const callback = render_callbacks[i];\n if (!seen_callbacks.has(callback)) {\n // ...so guard against infinite loops\n seen_callbacks.add(callback);\n callback();\n }\n }\n render_callbacks.length = 0;\n } while (dirty_components.length);\n while (flush_callbacks.length) {\n flush_callbacks.pop()();\n }\n update_scheduled = false;\n flushing = false;\n seen_callbacks.clear();\n}\nfunction update($$) {\n if ($$.fragment !== null) {\n $$.update();\n run_all($$.before_update);\n const dirty = $$.dirty;\n $$.dirty = [-1];\n $$.fragment && $$.fragment.p($$.ctx, dirty);\n $$.after_update.forEach(add_render_callback);\n }\n}\n\nlet promise;\nfunction wait() {\n if (!promise) {\n promise = Promise.resolve();\n promise.then(() => {\n promise = null;\n });\n }\n return promise;\n}\nfunction dispatch(node, direction, kind) {\n node.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`));\n}\nconst outroing = new Set();\nlet outros;\nfunction group_outros() {\n outros = {\n r: 0,\n c: [],\n p: outros // parent group\n };\n}\nfunction check_outros() {\n if (!outros.r) {\n run_all(outros.c);\n }\n outros = outros.p;\n}\nfunction transition_in(block, local) {\n if (block && block.i) {\n outroing.delete(block);\n block.i(local);\n }\n}\nfunction transition_out(block, local, detach, callback) {\n if (block && block.o) {\n if (outroing.has(block))\n return;\n outroing.add(block);\n outros.c.push(() => {\n outroing.delete(block);\n if (callback) {\n if (detach)\n block.d(1);\n callback();\n }\n });\n block.o(local);\n }\n}\nconst null_transition = { duration: 0 };\nfunction create_in_transition(node, fn, params) {\n let config = fn(node, params);\n let running = false;\n let animation_name;\n let task;\n let uid = 0;\n function cleanup() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++);\n tick(0, 1);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n if (task)\n task.abort();\n running = true;\n add_render_callback(() => dispatch(node, true, 'start'));\n task = loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(1, 0);\n dispatch(node, true, 'end');\n cleanup();\n return running = false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(t, 1 - t);\n }\n }\n return running;\n });\n }\n let started = false;\n return {\n start() {\n if (started)\n return;\n delete_rule(node);\n if (is_function(config)) {\n config = config();\n wait().then(go);\n }\n else {\n go();\n }\n },\n invalidate() {\n started = false;\n },\n end() {\n if (running) {\n cleanup();\n running = false;\n }\n }\n };\n}\nfunction create_out_transition(node, fn, params) {\n let config = fn(node, params);\n let running = true;\n let animation_name;\n const group = outros;\n group.r += 1;\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 1, 0, duration, delay, easing, css);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n add_render_callback(() => dispatch(node, false, 'start'));\n loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(0, 1);\n dispatch(node, false, 'end');\n if (!--group.r) {\n // this will result in `end()` being called,\n // so we don't need to clean up here\n run_all(group.c);\n }\n return false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(1 - t, t);\n }\n }\n return running;\n });\n }\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go();\n });\n }\n else {\n go();\n }\n return {\n end(reset) {\n if (reset && config.tick) {\n config.tick(1, 0);\n }\n if (running) {\n if (animation_name)\n delete_rule(node, animation_name);\n running = false;\n }\n }\n };\n}\nfunction create_bidirectional_transition(node, fn, params, intro) {\n let config = fn(node, params);\n let t = intro ? 0 : 1;\n let running_program = null;\n let pending_program = null;\n let animation_name = null;\n function clear_animation() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function init(program, duration) {\n const d = program.b - t;\n duration *= Math.abs(d);\n return {\n a: t,\n b: program.b,\n d,\n duration,\n start: program.start,\n end: program.start + duration,\n group: program.group\n };\n }\n function go(b) {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n const program = {\n start: now() + delay,\n b\n };\n if (!b) {\n // @ts-ignore todo: improve typings\n program.group = outros;\n outros.r += 1;\n }\n if (running_program || pending_program) {\n pending_program = program;\n }\n else {\n // if this is an intro, and there's a delay, we need to do\n // an initial tick and/or apply CSS animation immediately\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, b, duration, delay, easing, css);\n }\n if (b)\n tick(0, 1);\n running_program = init(program, duration);\n add_render_callback(() => dispatch(node, b, 'start'));\n loop(now => {\n if (pending_program && now > pending_program.start) {\n running_program = init(pending_program, duration);\n pending_program = null;\n dispatch(node, running_program.b, 'start');\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css);\n }\n }\n if (running_program) {\n if (now >= running_program.end) {\n tick(t = running_program.b, 1 - t);\n dispatch(node, running_program.b, 'end');\n if (!pending_program) {\n // we're done\n if (running_program.b) {\n // intro — we can tidy up immediately\n clear_animation();\n }\n else {\n // outro — needs to be coordinated\n if (!--running_program.group.r)\n run_all(running_program.group.c);\n }\n }\n running_program = null;\n }\n else if (now >= running_program.start) {\n const p = now - running_program.start;\n t = running_program.a + running_program.d * easing(p / running_program.duration);\n tick(t, 1 - t);\n }\n }\n return !!(running_program || pending_program);\n });\n }\n }\n return {\n run(b) {\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go(b);\n });\n }\n else {\n go(b);\n }\n },\n end() {\n clear_animation();\n running_program = pending_program = null;\n }\n };\n}\n\nfunction handle_promise(promise, info) {\n const token = info.token = {};\n function update(type, index, key, value) {\n if (info.token !== token)\n return;\n info.resolved = value;\n let child_ctx = info.ctx;\n if (key !== undefined) {\n child_ctx = child_ctx.slice();\n child_ctx[key] = value;\n }\n const block = type && (info.current = type)(child_ctx);\n let needs_flush = false;\n if (info.block) {\n if (info.blocks) {\n info.blocks.forEach((block, i) => {\n if (i !== index && block) {\n group_outros();\n transition_out(block, 1, 1, () => {\n if (info.blocks[i] === block) {\n info.blocks[i] = null;\n }\n });\n check_outros();\n }\n });\n }\n else {\n info.block.d(1);\n }\n block.c();\n transition_in(block, 1);\n block.m(info.mount(), info.anchor);\n needs_flush = true;\n }\n info.block = block;\n if (info.blocks)\n info.blocks[index] = block;\n if (needs_flush) {\n flush();\n }\n }\n if (is_promise(promise)) {\n const current_component = get_current_component();\n promise.then(value => {\n set_current_component(current_component);\n update(info.then, 1, info.value, value);\n set_current_component(null);\n }, error => {\n set_current_component(current_component);\n update(info.catch, 2, info.error, error);\n set_current_component(null);\n if (!info.hasCatch) {\n throw error;\n }\n });\n // if we previously had a then/catch block, destroy it\n if (info.current !== info.pending) {\n update(info.pending, 0);\n return true;\n }\n }\n else {\n if (info.current !== info.then) {\n update(info.then, 1, info.value, promise);\n return true;\n }\n info.resolved = promise;\n }\n}\nfunction update_await_block_branch(info, ctx, dirty) {\n const child_ctx = ctx.slice();\n const { resolved } = info;\n if (info.current === info.then) {\n child_ctx[info.value] = resolved;\n }\n if (info.current === info.catch) {\n child_ctx[info.error] = resolved;\n }\n info.block.p(child_ctx, dirty);\n}\n\nconst globals = (typeof window !== 'undefined'\n ? window\n : typeof globalThis !== 'undefined'\n ? globalThis\n : global);\n\nfunction destroy_block(block, lookup) {\n block.d(1);\n lookup.delete(block.key);\n}\nfunction outro_and_destroy_block(block, lookup) {\n transition_out(block, 1, 1, () => {\n lookup.delete(block.key);\n });\n}\nfunction fix_and_destroy_block(block, lookup) {\n block.f();\n destroy_block(block, lookup);\n}\nfunction fix_and_outro_and_destroy_block(block, lookup) {\n block.f();\n outro_and_destroy_block(block, lookup);\n}\nfunction update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) {\n let o = old_blocks.length;\n let n = list.length;\n let i = o;\n const old_indexes = {};\n while (i--)\n old_indexes[old_blocks[i].key] = i;\n const new_blocks = [];\n const new_lookup = new Map();\n const deltas = new Map();\n i = n;\n while (i--) {\n const child_ctx = get_context(ctx, list, i);\n const key = get_key(child_ctx);\n let block = lookup.get(key);\n if (!block) {\n block = create_each_block(key, child_ctx);\n block.c();\n }\n else if (dynamic) {\n block.p(child_ctx, dirty);\n }\n new_lookup.set(key, new_blocks[i] = block);\n if (key in old_indexes)\n deltas.set(key, Math.abs(i - old_indexes[key]));\n }\n const will_move = new Set();\n const did_move = new Set();\n function insert(block) {\n transition_in(block, 1);\n block.m(node, next);\n lookup.set(block.key, block);\n next = block.first;\n n--;\n }\n while (o && n) {\n const new_block = new_blocks[n - 1];\n const old_block = old_blocks[o - 1];\n const new_key = new_block.key;\n const old_key = old_block.key;\n if (new_block === old_block) {\n // do nothing\n next = new_block.first;\n o--;\n n--;\n }\n else if (!new_lookup.has(old_key)) {\n // remove old block\n destroy(old_block, lookup);\n o--;\n }\n else if (!lookup.has(new_key) || will_move.has(new_key)) {\n insert(new_block);\n }\n else if (did_move.has(old_key)) {\n o--;\n }\n else if (deltas.get(new_key) > deltas.get(old_key)) {\n did_move.add(new_key);\n insert(new_block);\n }\n else {\n will_move.add(old_key);\n o--;\n }\n }\n while (o--) {\n const old_block = old_blocks[o];\n if (!new_lookup.has(old_block.key))\n destroy(old_block, lookup);\n }\n while (n)\n insert(new_blocks[n - 1]);\n return new_blocks;\n}\nfunction validate_each_keys(ctx, list, get_context, get_key) {\n const keys = new Set();\n for (let i = 0; i < list.length; i++) {\n const key = get_key(get_context(ctx, list, i));\n if (keys.has(key)) {\n throw new Error('Cannot have duplicate keys in a keyed each');\n }\n keys.add(key);\n }\n}\n\nfunction get_spread_update(levels, updates) {\n const update = {};\n const to_null_out = {};\n const accounted_for = { $$scope: 1 };\n let i = levels.length;\n while (i--) {\n const o = levels[i];\n const n = updates[i];\n if (n) {\n for (const key in o) {\n if (!(key in n))\n to_null_out[key] = 1;\n }\n for (const key in n) {\n if (!accounted_for[key]) {\n update[key] = n[key];\n accounted_for[key] = 1;\n }\n }\n levels[i] = n;\n }\n else {\n for (const key in o) {\n accounted_for[key] = 1;\n }\n }\n }\n for (const key in to_null_out) {\n if (!(key in update))\n update[key] = undefined;\n }\n return update;\n}\nfunction get_spread_object(spread_props) {\n return typeof spread_props === 'object' && spread_props !== null ? spread_props : {};\n}\n\n// source: https://html.spec.whatwg.org/multipage/indices.html\nconst boolean_attributes = new Set([\n 'allowfullscreen',\n 'allowpaymentrequest',\n 'async',\n 'autofocus',\n 'autoplay',\n 'checked',\n 'controls',\n 'default',\n 'defer',\n 'disabled',\n 'formnovalidate',\n 'hidden',\n 'ismap',\n 'loop',\n 'multiple',\n 'muted',\n 'nomodule',\n 'novalidate',\n 'open',\n 'playsinline',\n 'readonly',\n 'required',\n 'reversed',\n 'selected'\n]);\n\nconst invalid_attribute_name_character = /[\\s'\">/=\\u{FDD0}-\\u{FDEF}\\u{FFFE}\\u{FFFF}\\u{1FFFE}\\u{1FFFF}\\u{2FFFE}\\u{2FFFF}\\u{3FFFE}\\u{3FFFF}\\u{4FFFE}\\u{4FFFF}\\u{5FFFE}\\u{5FFFF}\\u{6FFFE}\\u{6FFFF}\\u{7FFFE}\\u{7FFFF}\\u{8FFFE}\\u{8FFFF}\\u{9FFFE}\\u{9FFFF}\\u{AFFFE}\\u{AFFFF}\\u{BFFFE}\\u{BFFFF}\\u{CFFFE}\\u{CFFFF}\\u{DFFFE}\\u{DFFFF}\\u{EFFFE}\\u{EFFFF}\\u{FFFFE}\\u{FFFFF}\\u{10FFFE}\\u{10FFFF}]/u;\n// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n// https://infra.spec.whatwg.org/#noncharacter\nfunction spread(args, classes_to_add) {\n const attributes = Object.assign({}, ...args);\n if (classes_to_add) {\n if (attributes.class == null) {\n attributes.class = classes_to_add;\n }\n else {\n attributes.class += ' ' + classes_to_add;\n }\n }\n let str = '';\n Object.keys(attributes).forEach(name => {\n if (invalid_attribute_name_character.test(name))\n return;\n const value = attributes[name];\n if (value === true)\n str += ' ' + name;\n else if (boolean_attributes.has(name.toLowerCase())) {\n if (value)\n str += ' ' + name;\n }\n else if (value != null) {\n str += ` ${name}=\"${value}\"`;\n }\n });\n return str;\n}\nconst escaped = {\n '\"': '"',\n \"'\": ''',\n '&': '&',\n '<': '<',\n '>': '>'\n};\nfunction escape(html) {\n return String(html).replace(/[\"'&<>]/g, match => escaped[match]);\n}\nfunction escape_attribute_value(value) {\n return typeof value === 'string' ? escape(value) : value;\n}\nfunction escape_object(obj) {\n const result = {};\n for (const key in obj) {\n result[key] = escape_attribute_value(obj[key]);\n }\n return result;\n}\nfunction each(items, fn) {\n let str = '';\n for (let i = 0; i < items.length; i += 1) {\n str += fn(items[i], i);\n }\n return str;\n}\nconst missing_component = {\n $$render: () => ''\n};\nfunction validate_component(component, name) {\n if (!component || !component.$$render) {\n if (name === 'svelte:component')\n name += ' this={...}';\n throw new Error(`<${name}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules`);\n }\n return component;\n}\nfunction debug(file, line, column, values) {\n console.log(`{@debug} ${file ? file + ' ' : ''}(${line}:${column})`); // eslint-disable-line no-console\n console.log(values); // eslint-disable-line no-console\n return '';\n}\nlet on_destroy;\nfunction create_ssr_component(fn) {\n function $$render(result, props, bindings, slots, context) {\n const parent_component = current_component;\n const $$ = {\n on_destroy,\n context: new Map(parent_component ? parent_component.$$.context : context || []),\n // these will be immediately discarded\n on_mount: [],\n before_update: [],\n after_update: [],\n callbacks: blank_object()\n };\n set_current_component({ $$ });\n const html = fn(result, props, bindings, slots);\n set_current_component(parent_component);\n return html;\n }\n return {\n render: (props = {}, { $$slots = {}, context = new Map() } = {}) => {\n on_destroy = [];\n const result = { title: '', head: '', css: new Set() };\n const html = $$render(result, props, {}, $$slots, context);\n run_all(on_destroy);\n return {\n html,\n css: {\n code: Array.from(result.css).map(css => css.code).join('\\n'),\n map: null // TODO\n },\n head: result.title + result.head\n };\n },\n $$render\n };\n}\nfunction add_attribute(name, value, boolean) {\n if (value == null || (boolean && !value))\n return '';\n return ` ${name}${value === true ? '' : `=${typeof value === 'string' ? JSON.stringify(escape(value)) : `\"${value}\"`}`}`;\n}\nfunction add_classes(classes) {\n return classes ? ` class=\"${classes}\"` : '';\n}\n\nfunction bind(component, name, callback) {\n const index = component.$$.props[name];\n if (index !== undefined) {\n component.$$.bound[index] = callback;\n callback(component.$$.ctx[index]);\n }\n}\nfunction create_component(block) {\n block && block.c();\n}\nfunction claim_component(block, parent_nodes) {\n block && block.l(parent_nodes);\n}\nfunction mount_component(component, target, anchor, customElement) {\n const { fragment, on_mount, on_destroy, after_update } = component.$$;\n fragment && fragment.m(target, anchor);\n if (!customElement) {\n // onMount happens before the initial afterUpdate\n add_render_callback(() => {\n const new_on_destroy = on_mount.map(run).filter(is_function);\n if (on_destroy) {\n on_destroy.push(...new_on_destroy);\n }\n else {\n // Edge case - component was destroyed immediately,\n // most likely as a result of a binding initialising\n run_all(new_on_destroy);\n }\n component.$$.on_mount = [];\n });\n }\n after_update.forEach(add_render_callback);\n}\nfunction destroy_component(component, detaching) {\n const $$ = component.$$;\n if ($$.fragment !== null) {\n run_all($$.on_destroy);\n $$.fragment && $$.fragment.d(detaching);\n // TODO null out other refs, including component.$$ (but need to\n // preserve final state?)\n $$.on_destroy = $$.fragment = null;\n $$.ctx = [];\n }\n}\nfunction make_dirty(component, i) {\n if (component.$$.dirty[0] === -1) {\n dirty_components.push(component);\n schedule_update();\n component.$$.dirty.fill(0);\n }\n component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));\n}\nfunction init(component, options, instance, create_fragment, not_equal, props, dirty = [-1]) {\n const parent_component = current_component;\n set_current_component(component);\n const $$ = component.$$ = {\n fragment: null,\n ctx: null,\n // state\n props,\n update: noop,\n not_equal,\n bound: blank_object(),\n // lifecycle\n on_mount: [],\n on_destroy: [],\n on_disconnect: [],\n before_update: [],\n after_update: [],\n context: new Map(parent_component ? parent_component.$$.context : options.context || []),\n // everything else\n callbacks: blank_object(),\n dirty,\n skip_bound: false\n };\n let ready = false;\n $$.ctx = instance\n ? instance(component, options.props || {}, (i, ret, ...rest) => {\n const value = rest.length ? rest[0] : ret;\n if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {\n if (!$$.skip_bound && $$.bound[i])\n $$.bound[i](value);\n if (ready)\n make_dirty(component, i);\n }\n return ret;\n })\n : [];\n $$.update();\n ready = true;\n run_all($$.before_update);\n // `false` as a special case of no DOM component\n $$.fragment = create_fragment ? create_fragment($$.ctx) : false;\n if (options.target) {\n if (options.hydrate) {\n start_hydrating();\n const nodes = children(options.target);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.l(nodes);\n nodes.forEach(detach);\n }\n else {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.c();\n }\n if (options.intro)\n transition_in(component.$$.fragment);\n mount_component(component, options.target, options.anchor, options.customElement);\n end_hydrating();\n flush();\n }\n set_current_component(parent_component);\n}\nlet SvelteElement;\nif (typeof HTMLElement === 'function') {\n SvelteElement = class extends HTMLElement {\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n }\n connectedCallback() {\n const { on_mount } = this.$$;\n this.$$.on_disconnect = on_mount.map(run).filter(is_function);\n // @ts-ignore todo: improve typings\n for (const key in this.$$.slotted) {\n // @ts-ignore todo: improve typings\n this.appendChild(this.$$.slotted[key]);\n }\n }\n attributeChangedCallback(attr, _oldValue, newValue) {\n this[attr] = newValue;\n }\n disconnectedCallback() {\n run_all(this.$$.on_disconnect);\n }\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n // TODO should this delegate to addEventListener?\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n };\n}\n/**\n * Base class for Svelte components. Used when dev=false.\n */\nclass SvelteComponent {\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n}\n\nfunction dispatch_dev(type, detail) {\n document.dispatchEvent(custom_event(type, Object.assign({ version: '3.38.3' }, detail)));\n}\nfunction append_dev(target, node) {\n dispatch_dev('SvelteDOMInsert', { target, node });\n append(target, node);\n}\nfunction insert_dev(target, node, anchor) {\n dispatch_dev('SvelteDOMInsert', { target, node, anchor });\n insert(target, node, anchor);\n}\nfunction detach_dev(node) {\n dispatch_dev('SvelteDOMRemove', { node });\n detach(node);\n}\nfunction detach_between_dev(before, after) {\n while (before.nextSibling && before.nextSibling !== after) {\n detach_dev(before.nextSibling);\n }\n}\nfunction detach_before_dev(after) {\n while (after.previousSibling) {\n detach_dev(after.previousSibling);\n }\n}\nfunction detach_after_dev(before) {\n while (before.nextSibling) {\n detach_dev(before.nextSibling);\n }\n}\nfunction listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) {\n const modifiers = options === true ? ['capture'] : options ? Array.from(Object.keys(options)) : [];\n if (has_prevent_default)\n modifiers.push('preventDefault');\n if (has_stop_propagation)\n modifiers.push('stopPropagation');\n dispatch_dev('SvelteDOMAddEventListener', { node, event, handler, modifiers });\n const dispose = listen(node, event, handler, options);\n return () => {\n dispatch_dev('SvelteDOMRemoveEventListener', { node, event, handler, modifiers });\n dispose();\n };\n}\nfunction attr_dev(node, attribute, value) {\n attr(node, attribute, value);\n if (value == null)\n dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute });\n else\n dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value });\n}\nfunction prop_dev(node, property, value) {\n node[property] = value;\n dispatch_dev('SvelteDOMSetProperty', { node, property, value });\n}\nfunction dataset_dev(node, property, value) {\n node.dataset[property] = value;\n dispatch_dev('SvelteDOMSetDataset', { node, property, value });\n}\nfunction set_data_dev(text, data) {\n data = '' + data;\n if (text.wholeText === data)\n return;\n dispatch_dev('SvelteDOMSetData', { node: text, data });\n text.data = data;\n}\nfunction validate_each_argument(arg) {\n if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {\n let msg = '{#each} only iterates over array-like objects.';\n if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {\n msg += ' You can use a spread to convert this iterable into an array.';\n }\n throw new Error(msg);\n }\n}\nfunction validate_slots(name, slot, keys) {\n for (const slot_key of Object.keys(slot)) {\n if (!~keys.indexOf(slot_key)) {\n console.warn(`<${name}> received an unexpected slot \"${slot_key}\".`);\n }\n }\n}\n/**\n * Base class for Svelte components with some minor dev-enhancements. Used when dev=true.\n */\nclass SvelteComponentDev extends SvelteComponent {\n constructor(options) {\n if (!options || (!options.target && !options.$$inline)) {\n throw new Error(\"'target' is a required option\");\n }\n super();\n }\n $destroy() {\n super.$destroy();\n this.$destroy = () => {\n console.warn('Component was already destroyed'); // eslint-disable-line no-console\n };\n }\n $capture_state() { }\n $inject_state() { }\n}\n/**\n * Base class to create strongly typed Svelte components.\n * This only exists for typing purposes and should be used in `.d.ts` files.\n *\n * ### Example:\n *\n * You have component library on npm called `component-library`, from which\n * you export a component called `MyComponent`. For Svelte+TypeScript users,\n * you want to provide typings. Therefore you create a `index.d.ts`:\n * ```ts\n * import { SvelteComponentTyped } from \"svelte\";\n * export class MyComponent extends SvelteComponentTyped<{foo: string}> {}\n * ```\n * Typing this makes it possible for IDEs like VS Code with the Svelte extension\n * to provide intellisense and to use the component like this in a Svelte file\n * with TypeScript:\n * ```svelte\n * \n * \n * ```\n *\n * #### Why not make this part of `SvelteComponent(Dev)`?\n * Because\n * ```ts\n * class ASubclassOfSvelteComponent extends SvelteComponent<{foo: string}> {}\n * const component: typeof SvelteComponent = ASubclassOfSvelteComponent;\n * ```\n * will throw a type error, so we need to seperate the more strictly typed class.\n */\nclass SvelteComponentTyped extends SvelteComponentDev {\n constructor(options) {\n super(options);\n }\n}\nfunction loop_guard(timeout) {\n const start = Date.now();\n return () => {\n if (Date.now() - start > timeout) {\n throw new Error('Infinite loop detected');\n }\n };\n}\n\nexport { HtmlTag, SvelteComponent, SvelteComponentDev, SvelteComponentTyped, SvelteElement, action_destroyer, add_attribute, add_classes, add_flush_callback, add_location, add_render_callback, add_resize_listener, add_transform, afterUpdate, append, append_dev, assign, attr, attr_dev, attribute_to_object, beforeUpdate, bind, binding_callbacks, blank_object, bubble, check_outros, children, claim_component, claim_element, claim_html_tag, claim_space, claim_text, clear_loops, component_subscribe, compute_rest_props, compute_slots, createEventDispatcher, create_animation, create_bidirectional_transition, create_component, create_in_transition, create_out_transition, create_slot, create_ssr_component, current_component, custom_event, dataset_dev, debug, destroy_block, destroy_component, destroy_each, detach, detach_after_dev, detach_before_dev, detach_between_dev, detach_dev, dirty_components, dispatch_dev, each, element, element_is, empty, end_hydrating, escape, escape_attribute_value, escape_object, escaped, exclude_internal_props, fix_and_destroy_block, fix_and_outro_and_destroy_block, fix_position, flush, getContext, get_binding_group_value, get_current_component, get_custom_elements_slots, get_slot_changes, get_slot_context, get_spread_object, get_spread_update, get_store_value, globals, group_outros, handle_promise, hasContext, has_prop, identity, init, insert, insert_dev, intros, invalid_attribute_name_character, is_client, is_crossorigin, is_empty, is_function, is_promise, listen, listen_dev, loop, loop_guard, missing_component, mount_component, noop, not_equal, now, null_to_empty, object_without_properties, onDestroy, onMount, once, outro_and_destroy_block, prevent_default, prop_dev, query_selector_all, raf, run, run_all, safe_not_equal, schedule_update, select_multiple_value, select_option, select_options, select_value, self, setContext, set_attributes, set_current_component, set_custom_element_data, set_data, set_data_dev, set_input_type, set_input_value, set_now, set_raf, set_store_value, set_style, set_svg_attributes, space, spread, start_hydrating, stop_propagation, subscribe, svg_element, text, tick, time_ranges_to_array, to_number, toggle_class, transition_in, transition_out, update_await_block_branch, update_keyed_each, update_slot, update_slot_spread, validate_component, validate_each_argument, validate_each_keys, validate_slots, validate_store, xlink_attr };\n","export { identity as linear } from '../internal/index.mjs';\n\n/*\nAdapted from https://github.com/mattdesl\nDistributed under MIT License https://github.com/mattdesl/eases/blob/master/LICENSE.md\n*/\nfunction backInOut(t) {\n const s = 1.70158 * 1.525;\n if ((t *= 2) < 1)\n return 0.5 * (t * t * ((s + 1) * t - s));\n return 0.5 * ((t -= 2) * t * ((s + 1) * t + s) + 2);\n}\nfunction backIn(t) {\n const s = 1.70158;\n return t * t * ((s + 1) * t - s);\n}\nfunction backOut(t) {\n const s = 1.70158;\n return --t * t * ((s + 1) * t + s) + 1;\n}\nfunction bounceOut(t) {\n const a = 4.0 / 11.0;\n const b = 8.0 / 11.0;\n const c = 9.0 / 10.0;\n const ca = 4356.0 / 361.0;\n const cb = 35442.0 / 1805.0;\n const cc = 16061.0 / 1805.0;\n const t2 = t * t;\n return t < a\n ? 7.5625 * t2\n : t < b\n ? 9.075 * t2 - 9.9 * t + 3.4\n : t < c\n ? ca * t2 - cb * t + cc\n : 10.8 * t * t - 20.52 * t + 10.72;\n}\nfunction bounceInOut(t) {\n return t < 0.5\n ? 0.5 * (1.0 - bounceOut(1.0 - t * 2.0))\n : 0.5 * bounceOut(t * 2.0 - 1.0) + 0.5;\n}\nfunction bounceIn(t) {\n return 1.0 - bounceOut(1.0 - t);\n}\nfunction circInOut(t) {\n if ((t *= 2) < 1)\n return -0.5 * (Math.sqrt(1 - t * t) - 1);\n return 0.5 * (Math.sqrt(1 - (t -= 2) * t) + 1);\n}\nfunction circIn(t) {\n return 1.0 - Math.sqrt(1.0 - t * t);\n}\nfunction circOut(t) {\n return Math.sqrt(1 - --t * t);\n}\nfunction cubicInOut(t) {\n return t < 0.5 ? 4.0 * t * t * t : 0.5 * Math.pow(2.0 * t - 2.0, 3.0) + 1.0;\n}\nfunction cubicIn(t) {\n return t * t * t;\n}\nfunction cubicOut(t) {\n const f = t - 1.0;\n return f * f * f + 1.0;\n}\nfunction elasticInOut(t) {\n return t < 0.5\n ? 0.5 *\n Math.sin(((+13.0 * Math.PI) / 2) * 2.0 * t) *\n Math.pow(2.0, 10.0 * (2.0 * t - 1.0))\n : 0.5 *\n Math.sin(((-13.0 * Math.PI) / 2) * (2.0 * t - 1.0 + 1.0)) *\n Math.pow(2.0, -10.0 * (2.0 * t - 1.0)) +\n 1.0;\n}\nfunction elasticIn(t) {\n return Math.sin((13.0 * t * Math.PI) / 2) * Math.pow(2.0, 10.0 * (t - 1.0));\n}\nfunction elasticOut(t) {\n return (Math.sin((-13.0 * (t + 1.0) * Math.PI) / 2) * Math.pow(2.0, -10.0 * t) + 1.0);\n}\nfunction expoInOut(t) {\n return t === 0.0 || t === 1.0\n ? t\n : t < 0.5\n ? +0.5 * Math.pow(2.0, 20.0 * t - 10.0)\n : -0.5 * Math.pow(2.0, 10.0 - t * 20.0) + 1.0;\n}\nfunction expoIn(t) {\n return t === 0.0 ? t : Math.pow(2.0, 10.0 * (t - 1.0));\n}\nfunction expoOut(t) {\n return t === 1.0 ? t : 1.0 - Math.pow(2.0, -10.0 * t);\n}\nfunction quadInOut(t) {\n t /= 0.5;\n if (t < 1)\n return 0.5 * t * t;\n t--;\n return -0.5 * (t * (t - 2) - 1);\n}\nfunction quadIn(t) {\n return t * t;\n}\nfunction quadOut(t) {\n return -t * (t - 2.0);\n}\nfunction quartInOut(t) {\n return t < 0.5\n ? +8.0 * Math.pow(t, 4.0)\n : -8.0 * Math.pow(t - 1.0, 4.0) + 1.0;\n}\nfunction quartIn(t) {\n return Math.pow(t, 4.0);\n}\nfunction quartOut(t) {\n return Math.pow(t - 1.0, 3.0) * (1.0 - t) + 1.0;\n}\nfunction quintInOut(t) {\n if ((t *= 2) < 1)\n return 0.5 * t * t * t * t * t;\n return 0.5 * ((t -= 2) * t * t * t * t + 2);\n}\nfunction quintIn(t) {\n return t * t * t * t * t;\n}\nfunction quintOut(t) {\n return --t * t * t * t * t + 1;\n}\nfunction sineInOut(t) {\n return -0.5 * (Math.cos(Math.PI * t) - 1);\n}\nfunction sineIn(t) {\n const v = Math.cos(t * Math.PI * 0.5);\n if (Math.abs(v) < 1e-14)\n return 1;\n else\n return 1 - v;\n}\nfunction sineOut(t) {\n return Math.sin((t * Math.PI) / 2);\n}\n\nexport { backIn, backInOut, backOut, bounceIn, bounceInOut, bounceOut, circIn, circInOut, circOut, cubicIn, cubicInOut, cubicOut, elasticIn, elasticInOut, elasticOut, expoIn, expoInOut, expoOut, quadIn, quadInOut, quadOut, quartIn, quartInOut, quartOut, quintIn, quintInOut, quintOut, sineIn, sineInOut, sineOut };\n","import { cubicInOut, linear, cubicOut } from '../easing/index.mjs';\nimport { is_function, assign } from '../internal/index.mjs';\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nfunction __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\n\nfunction blur(node, { delay = 0, duration = 400, easing = cubicInOut, amount = 5, opacity = 0 } = {}) {\n const style = getComputedStyle(node);\n const target_opacity = +style.opacity;\n const f = style.filter === 'none' ? '' : style.filter;\n const od = target_opacity * (1 - opacity);\n return {\n delay,\n duration,\n easing,\n css: (_t, u) => `opacity: ${target_opacity - (od * u)}; filter: ${f} blur(${u * amount}px);`\n };\n}\nfunction fade(node, { delay = 0, duration = 400, easing = linear } = {}) {\n const o = +getComputedStyle(node).opacity;\n return {\n delay,\n duration,\n easing,\n css: t => `opacity: ${t * o}`\n };\n}\nfunction fly(node, { delay = 0, duration = 400, easing = cubicOut, x = 0, y = 0, opacity = 0 } = {}) {\n const style = getComputedStyle(node);\n const target_opacity = +style.opacity;\n const transform = style.transform === 'none' ? '' : style.transform;\n const od = target_opacity * (1 - opacity);\n return {\n delay,\n duration,\n easing,\n css: (t, u) => `\n\t\t\ttransform: ${transform} translate(${(1 - t) * x}px, ${(1 - t) * y}px);\n\t\t\topacity: ${target_opacity - (od * u)}`\n };\n}\nfunction slide(node, { delay = 0, duration = 400, easing = cubicOut } = {}) {\n const style = getComputedStyle(node);\n const opacity = +style.opacity;\n const height = parseFloat(style.height);\n const padding_top = parseFloat(style.paddingTop);\n const padding_bottom = parseFloat(style.paddingBottom);\n const margin_top = parseFloat(style.marginTop);\n const margin_bottom = parseFloat(style.marginBottom);\n const border_top_width = parseFloat(style.borderTopWidth);\n const border_bottom_width = parseFloat(style.borderBottomWidth);\n return {\n delay,\n duration,\n easing,\n css: t => 'overflow: hidden;' +\n `opacity: ${Math.min(t * 20, 1) * opacity};` +\n `height: ${t * height}px;` +\n `padding-top: ${t * padding_top}px;` +\n `padding-bottom: ${t * padding_bottom}px;` +\n `margin-top: ${t * margin_top}px;` +\n `margin-bottom: ${t * margin_bottom}px;` +\n `border-top-width: ${t * border_top_width}px;` +\n `border-bottom-width: ${t * border_bottom_width}px;`\n };\n}\nfunction scale(node, { delay = 0, duration = 400, easing = cubicOut, start = 0, opacity = 0 } = {}) {\n const style = getComputedStyle(node);\n const target_opacity = +style.opacity;\n const transform = style.transform === 'none' ? '' : style.transform;\n const sd = 1 - start;\n const od = target_opacity * (1 - opacity);\n return {\n delay,\n duration,\n easing,\n css: (_t, u) => `\n\t\t\ttransform: ${transform} scale(${1 - (sd * u)});\n\t\t\topacity: ${target_opacity - (od * u)}\n\t\t`\n };\n}\nfunction draw(node, { delay = 0, speed, duration, easing = cubicInOut } = {}) {\n const len = node.getTotalLength();\n if (duration === undefined) {\n if (speed === undefined) {\n duration = 800;\n }\n else {\n duration = len / speed;\n }\n }\n else if (typeof duration === 'function') {\n duration = duration(len);\n }\n return {\n delay,\n duration,\n easing,\n css: (t, u) => `stroke-dasharray: ${t * len} ${u * len}`\n };\n}\nfunction crossfade(_a) {\n var { fallback } = _a, defaults = __rest(_a, [\"fallback\"]);\n const to_receive = new Map();\n const to_send = new Map();\n function crossfade(from, node, params) {\n const { delay = 0, duration = d => Math.sqrt(d) * 30, easing = cubicOut } = assign(assign({}, defaults), params);\n const to = node.getBoundingClientRect();\n const dx = from.left - to.left;\n const dy = from.top - to.top;\n const dw = from.width / to.width;\n const dh = from.height / to.height;\n const d = Math.sqrt(dx * dx + dy * dy);\n const style = getComputedStyle(node);\n const transform = style.transform === 'none' ? '' : style.transform;\n const opacity = +style.opacity;\n return {\n delay,\n duration: is_function(duration) ? duration(d) : duration,\n easing,\n css: (t, u) => `\n\t\t\t\topacity: ${t * opacity};\n\t\t\t\ttransform-origin: top left;\n\t\t\t\ttransform: ${transform} translate(${u * dx}px,${u * dy}px) scale(${t + (1 - t) * dw}, ${t + (1 - t) * dh});\n\t\t\t`\n };\n }\n function transition(items, counterparts, intro) {\n return (node, params) => {\n items.set(params.key, {\n rect: node.getBoundingClientRect()\n });\n return () => {\n if (counterparts.has(params.key)) {\n const { rect } = counterparts.get(params.key);\n counterparts.delete(params.key);\n return crossfade(rect, node, params);\n }\n // if the node is disappearing altogether\n // (i.e. wasn't claimed by the other list)\n // then we need to supply an outro\n items.delete(params.key);\n return fallback && fallback(node, params, intro);\n };\n };\n }\n return [\n transition(to_send, to_receive, false),\n transition(to_receive, to_send, true)\n ];\n}\n\nexport { blur, crossfade, draw, fade, fly, scale, slide };\n","// @ts-check\n// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL\n// This file is automatically generated. DO NOT EDIT\nwindow.wailsbindings = {\"main\":{\"App\":{\"CancelWormholeRequest\":{\"name\":\"main.App.CancelWormholeRequest\"},\"ClearSelectedFiles\":{\"name\":\"main.App.ClearSelectedFiles\"},\"GetCurrentVersion\":{\"name\":\"main.App.GetCurrentVersion\",\"outputs\":[{\"type\":\"string\"}]},\"GetDownloadsFolder\":{\"name\":\"main.App.GetDownloadsFolder\",\"outputs\":[{\"type\":\"string\"}]},\"GetLogPath\":{\"name\":\"main.App.GetLogPath\",\"outputs\":[{\"type\":\"string\"}]},\"GetNotificationsParam\":{\"name\":\"main.App.GetNotificationsParam\",\"outputs\":[{\"type\":\"bool\"}]},\"GetOverwriteParam\":{\"name\":\"main.App.GetOverwriteParam\",\"outputs\":[{\"type\":\"bool\"}]},\"GetReceivedFile\":{\"name\":\"main.App.GetReceivedFile\",\"outputs\":[{\"type\":\"string\"}]},\"GetSelectedFiles\":{\"name\":\"main.App.GetSelectedFiles\",\"outputs\":[{\"type\":\"[]string\"}]},\"GetUserPrefs\":{\"name\":\"main.App.GetUserPrefs\",\"outputs\":[{\"type\":\"settings.UserSettings\"}]},\"OpenDirectoryDialog\":{\"name\":\"main.App.OpenDirectoryDialog\",\"outputs\":[{\"type\":\"[]string\"},{\"type\":\"error\"}]},\"OpenFile\":{\"name\":\"main.App.OpenFile\",\"inputs\":[{\"type\":\"string\"}]},\"OpenFilesDialog\":{\"name\":\"main.App.OpenFilesDialog\",\"outputs\":[{\"type\":\"[]string\"},{\"type\":\"error\"}]},\"ReceiveFile\":{\"name\":\"main.App.ReceiveFile\",\"inputs\":[{\"type\":\"string\"}]},\"SelectedFilesSend\":{\"name\":\"main.App.SelectedFilesSend\"},\"SendDirectory\":{\"name\":\"main.App.SendDirectory\",\"inputs\":[{\"type\":\"string\"}]},\"SendFile\":{\"name\":\"main.App.SendFile\",\"inputs\":[{\"type\":\"string\"}]},\"SetDownloadsFolder\":{\"name\":\"main.App.SetDownloadsFolder\",\"outputs\":[{\"type\":\"string\"}]},\"SetNotificationsParam\":{\"name\":\"main.App.SetNotificationsParam\",\"inputs\":[{\"type\":\"bool\"}],\"outputs\":[{\"type\":\"bool\"}]},\"SetOverwriteParam\":{\"name\":\"main.App.SetOverwriteParam\",\"inputs\":[{\"type\":\"bool\"}],\"outputs\":[{\"type\":\"bool\"}]},\"SetSelfUpdateParam\":{\"name\":\"main.App.SetSelfUpdateParam\",\"inputs\":[{\"type\":\"bool\"}],\"outputs\":[{\"type\":\"bool\"}]},\"ShowErrorDialog\":{\"name\":\"main.App.ShowErrorDialog\",\"inputs\":[{\"type\":\"string\"}]},\"UpdateCheckUI\":{\"name\":\"main.App.UpdateCheckUI\"},\"UpdateSendProgress\":{\"name\":\"main.App.UpdateSendProgress\",\"inputs\":[{\"type\":\"int64\"},{\"type\":\"int64\"}]}}}};\nconst go = {\n \"main\": {\n \"App\": {\n /**\n * CancelWormholeRequest\n * @returns {Promise} \n */\n \"CancelWormholeRequest\": () => {\n return window.go.main.App.CancelWormholeRequest();\n },\n /**\n * ClearSelectedFiles\n * @returns {Promise} \n */\n \"ClearSelectedFiles\": () => {\n return window.go.main.App.ClearSelectedFiles();\n },\n /**\n * GetCurrentVersion\n * @returns {Promise} - Go Type: string\n */\n \"GetCurrentVersion\": () => {\n return window.go.main.App.GetCurrentVersion();\n },\n /**\n * GetDownloadsFolder\n * @returns {Promise} - Go Type: string\n */\n \"GetDownloadsFolder\": () => {\n return window.go.main.App.GetDownloadsFolder();\n },\n /**\n * GetLogPath\n * @returns {Promise} - Go Type: string\n */\n \"GetLogPath\": () => {\n return window.go.main.App.GetLogPath();\n },\n /**\n * GetNotificationsParam\n * @returns {Promise} - Go Type: bool\n */\n \"GetNotificationsParam\": () => {\n return window.go.main.App.GetNotificationsParam();\n },\n /**\n * GetOverwriteParam\n * @returns {Promise} - Go Type: bool\n */\n \"GetOverwriteParam\": () => {\n return window.go.main.App.GetOverwriteParam();\n },\n /**\n * GetReceivedFile\n * @returns {Promise} - Go Type: string\n */\n \"GetReceivedFile\": () => {\n return window.go.main.App.GetReceivedFile();\n },\n /**\n * GetSelectedFiles\n * @returns {Promise>} - Go Type: []string\n */\n \"GetSelectedFiles\": () => {\n return window.go.main.App.GetSelectedFiles();\n },\n /**\n * GetUserPrefs\n * @returns {Promise} - Go Type: settings.UserSettings\n */\n \"GetUserPrefs\": () => {\n return window.go.main.App.GetUserPrefs();\n },\n /**\n * OpenDirectoryDialog\n * @returns {Promise|Error>} - Go Type: []string\n */\n \"OpenDirectoryDialog\": () => {\n return window.go.main.App.OpenDirectoryDialog();\n },\n /**\n * OpenFile\n * @param {string} arg1 - Go Type: string\n * @returns {Promise} \n */\n \"OpenFile\": (arg1) => {\n return window.go.main.App.OpenFile(arg1);\n },\n /**\n * OpenFilesDialog\n * @returns {Promise|Error>} - Go Type: []string\n */\n \"OpenFilesDialog\": () => {\n return window.go.main.App.OpenFilesDialog();\n },\n /**\n * ReceiveFile\n * @param {string} arg1 - Go Type: string\n * @returns {Promise} \n */\n \"ReceiveFile\": (arg1) => {\n return window.go.main.App.ReceiveFile(arg1);\n },\n /**\n * SelectedFilesSend\n * @returns {Promise} \n */\n \"SelectedFilesSend\": () => {\n return window.go.main.App.SelectedFilesSend();\n },\n /**\n * SendDirectory\n * @param {string} arg1 - Go Type: string\n * @returns {Promise} \n */\n \"SendDirectory\": (arg1) => {\n return window.go.main.App.SendDirectory(arg1);\n },\n /**\n * SendFile\n * @param {string} arg1 - Go Type: string\n * @returns {Promise} \n */\n \"SendFile\": (arg1) => {\n return window.go.main.App.SendFile(arg1);\n },\n /**\n * SetDownloadsFolder\n * @returns {Promise} - Go Type: string\n */\n \"SetDownloadsFolder\": () => {\n return window.go.main.App.SetDownloadsFolder();\n },\n /**\n * SetNotificationsParam\n * @param {boolean} arg1 - Go Type: bool\n * @returns {Promise} - Go Type: bool\n */\n \"SetNotificationsParam\": (arg1) => {\n return window.go.main.App.SetNotificationsParam(arg1);\n },\n /**\n * SetOverwriteParam\n * @param {boolean} arg1 - Go Type: bool\n * @returns {Promise} - Go Type: bool\n */\n \"SetOverwriteParam\": (arg1) => {\n return window.go.main.App.SetOverwriteParam(arg1);\n },\n /**\n * SetSelfUpdateParam\n * @param {boolean} arg1 - Go Type: bool\n * @returns {Promise} - Go Type: bool\n */\n \"SetSelfUpdateParam\": (arg1) => {\n return window.go.main.App.SetSelfUpdateParam(arg1);\n },\n /**\n * ShowErrorDialog\n * @param {string} arg1 - Go Type: string\n * @returns {Promise} \n */\n \"ShowErrorDialog\": (arg1) => {\n return window.go.main.App.ShowErrorDialog(arg1);\n },\n /**\n * UpdateCheckUI\n * @returns {Promise} \n */\n \"UpdateCheckUI\": () => {\n return window.go.main.App.UpdateCheckUI();\n },\n /**\n * UpdateSendProgress\n * @param {number} arg1 - Go Type: int64\n * @param {number} arg2 - Go Type: int64\n * @returns {Promise} \n */\n \"UpdateSendProgress\": (arg1, arg2) => {\n return window.go.main.App.UpdateSendProgress(arg1, arg2);\n },\n },\n },\n\n};\nexport default go;\n","\n\n
\n
\n
\n {status}\n {percent}%\n
\n
\n \n
\n \n
\n
\n","\n\n
\n \n \n {#if selectedFiles.length > 0}\n
\n {#each selectedFileNames as fileName, idx}\n {#if idx < 9}\n
\n
\n {fileName}\n
\n {:else if idx == 9}\n
\n ...Total Selected: {selectedFiles.length}\n
\n {/if}\n {/each}\n
\n {:else}\n \n
\n Send Files\n \n
\n
\n Send Directory\n \n
\n
\n {/if}\n
\n
\n {#if selectedFiles.length > 0}\n Clear\n Send\n {/if}\n
\n {#if isSending}\n \n
\n \n
\n {/if}\n \n
\n {/if}\n\n","\n\n
\n \n {#if receivePath}\n \n \n
\n {receiveFileName}\n {#if !isReceiving}\n \n {/if}\n
\n {/if}\n
\n
\n
\n \n \n \n \n
\n {#if isReceiving}\n \n
\n
\n
\n {/if}\n\n","\n\n
\n
\n
Downloads Folder
\n
\n
{downloadsFolder}
\n
\n
\n
\n
\n
Notifications
\n
\n
\n
Overwrite
\n
\n \n \n
\n
Auto Update
\n
\n \n \n
\n
\n
Logs
\n
\n
{logPath}
\n
\n
\n
\n
\n
\n","\n\n
\n
\n Riftshare v{version}\n
\n\n

\n The goal of this project is to enable everyone to securely share files\n freely and easily.\n

\n

Licensed under the GNU GPL Version 3

\n\n
\n

\n This project leverages the work of other Open Source Software\n

\n
    \n {#each Object.entries(attributions) as [name, url]}\n
  • \n {/each}\n
\n
\n
\n","\n\n
\n \n
\n
    \n
  • \n (appMode = \"send\")}\n >\n
    \n Send\n \n
  • \n
  • \n (appMode = \"receive\")}\n >\n
    \n Receive\n \n
  • \n
  • \n (appMode = \"settings\")}\n >\n
    \n Settings\n \n
  • \n
  • \n (appMode = \"about\")}\n >\n
    \n About\n \n
  • \n
\n
\n \n
\n {#if appMode == \"send\"}\n \n {:else if appMode == \"receive\"}\n \n {:else if appMode == \"settings\"}\n \n {:else if appMode == \"about\"}\n \n {/if}\n
\n
\n\n\n","function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import App from './App.svelte';\n\nconst app = new App({\n\ttarget: document.body,\n});\n\nexport default app;"],"names":["noop","identity","x","run","fn","blank_object","Object","create","run_all","fns","forEach","is_function","thing","safe_not_equal","a","b","get_slot_context","definition","ctx","$$scope","tar","src","k","assign","slice","update_slot","slot","slot_definition","dirty","get_slot_changes_fn","get_slot_context_fn","slot_changes","lets","undefined","merged","len","Math","max","length","i","get_slot_changes","slot_context","p","is_client","window","now","performance","Date","raf","cb","requestAnimationFrame","tasks","Set","run_tasks","task","c","delete","f","size","loop","callback","promise","Promise","fulfill","add","abort","is_hydrating","upper_bound","low","high","key","value","mid","append","target","node","hydrate_init","children","childNodes","m","Int32Array","longest","seqLen","idx","claim_order","newLen","lis","toMove","last","cur","push","reverse","sort","j","anchor","insertBefore","init_hydrate","actual_end_child","parentElement","firstChild","nextSibling","parentNode","appendChild","insert","detach","removeChild","destroy_each","iterations","detaching","d","element","name","document","createElement","text","data","createTextNode","space","listen","event","handler","options","addEventListener","removeEventListener","attr","attribute","removeAttribute","getAttribute","setAttribute","set_data","wholeText","set_input_value","input","active_docs","current_component","active","create_rule","duration","delay","ease","uid","step","keyframes","t","rule","str","hash","charCodeAt","doc","ownerDocument","stylesheet","__svelte_stylesheet","head","sheet","current_rules","__svelte_rules","insertRule","cssRules","animation","style","delete_rule","previous","split","next","filter","anim","indexOf","deleted","join","deleteRule","clear","set_current_component","component","onMount","Error","get_current_component","$$","on_mount","dirty_components","binding_callbacks","render_callbacks","flush_callbacks","resolved_promise","resolve","update_scheduled","add_render_callback","flushing","seen_callbacks","flush","update","pop","has","fragment","before_update","after_update","wait","then","dispatch","direction","kind","dispatchEvent","type","detail","e","createEvent","initCustomEvent","custom_event","outroing","outros","group_outros","r","check_outros","transition_in","block","local","transition_out","o","null_transition","create_in_transition","params","animation_name","config","running","cleanup","go","easing","tick","css","start_time","end_time","started","start","invalidate","end","create_bidirectional_transition","intro","running_program","pending_program","clear_animation","init","program","abs","group","create_component","mount_component","customElement","on_destroy","new_on_destroy","map","destroy_component","make_dirty","fill","instance","create_fragment","not_equal","props","parent_component","bound","on_disconnect","context","Map","callbacks","skip_bound","ready","ret","rest","hydrate","nodes","Array","from","l","SvelteComponent","$destroy","this","$on","index","splice","$set","$$props","obj","$$set","keys","cubicOut","slide","getComputedStyle","opacity","height","parseFloat","padding_top","paddingTop","padding_bottom","paddingBottom","margin_top","marginTop","margin_bottom","marginBottom","border_top_width","borderTopWidth","border_bottom_width","borderBottomWidth","min","wailsbindings","main","App","CancelWormholeRequest","ClearSelectedFiles","GetCurrentVersion","outputs","GetDownloadsFolder","GetLogPath","GetNotificationsParam","GetOverwriteParam","GetReceivedFile","GetSelectedFiles","GetUserPrefs","OpenDirectoryDialog","OpenFile","inputs","OpenFilesDialog","ReceiveFile","SelectedFilesSend","SendDirectory","SendFile","SetDownloadsFolder","SetNotificationsParam","SetOverwriteParam","SetSelfUpdateParam","ShowErrorDialog","UpdateCheckUI","UpdateSendProgress","arg1","arg2","slot_ctx","toString","status","waiting","percent","copyCode","copyText","getElementById","select","setSelectionRange","navigator","clipboard","writeText","String","prototype","trimEllip","substring","sendCode","sendPercent","selectedFiles","isSending","runtime","EventsOn","newCode","sendStatus","setTimeout","filePaths","selectedFileNames","fileName","selection","catch","err","console","log","preventDefault","call","receivePattern","receiveCode","receivePercent","isReceiving","receivePath","path","receiveStatus","receiveCodeValid","test","receiveFileName","downloadsFolder","logPath","notifications","overwrite","selfUpdate","prefs","downloadsDirectory","folder","newValue","BrowserOpenURL","entries","version","ver","svelte","tailwindcss","url","appMode","ref","insertAt","getElementsByTagName","styleSheet","cssText","body"],"mappings":"gCAAA,SAASA,KACT,MAAMC,EAAWC,GAAKA,EAetB,SAASC,EAAIC,GACT,OAAOA,IAEX,SAASC,IACL,OAAOC,OAAOC,OAAO,MAEzB,SAASC,EAAQC,GACbA,EAAIC,QAAQP,GAEhB,SAASQ,EAAYC,GACjB,MAAwB,mBAAVA,EAElB,SAASC,EAAeC,EAAGC,GACvB,OAAOD,GAAKA,EAAIC,GAAKA,EAAID,IAAMC,GAAOD,GAAkB,iBAANA,GAAgC,mBAANA,EAkChF,SAASE,EAAiBC,EAAYC,EAAKC,EAASf,GAChD,OAAOa,EAAW,IAAMb,EA9D5B,SAAgBgB,EAAKC,GAEjB,IAAK,MAAMC,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U,GAYdxN,QACEmD,GAAQ+E,IAAIG,oBAAoB9G,MAAMkM,QACpCD,EAAUC,mBAZZ,iBAAkB,mBAClB,6BAA8B,yCAC9B,4BAA6B,+CAC7B,iBAAkB,yCAClBC,OAAQ,qCACRC,YAAa,8CACb,eAAgB,0BAChB,qBAAsB,wCACtB,uBAAwB,iDAYiBjR,GAAU3E,OAAOqT,QAAQkC,eAAe,yBAIxC5Q,GAAU3E,OAAOqT,QAAQkC,eAAe,qCAiBhC5Q,IAAU3E,OAAOqT,QAAQkC,eAAeM,g4BCuCzE,QAAXvX,OAEgB,WAAXA,OAEW,YAAXA,OAEW,SAAXA,meA5Ec,QAAXA,KACH,2BACA,sGASc,WAAXA,KACH,2BACA,uGASc,YAAXA,KACH,2BACA,oGASc,SAAXA,KACH,2BACA,2hBAnCc,QAAXA,KACH,2BACA,gEASc,WAAXA,KACH,2BACA,gEASc,YAAXA,KACH,2BACA,gEASc,SAAXA,KACH,2BACA,uRA9CRwX,EAAU,wBAcWA,EAAU,gBAWVA,EAAU,mBAWVA,EAAU,oBAWVA,EAAU,WCrDrC,SAAqBvK,EAAKwK,QACX,IAARA,IAAiBA,EAAM,IAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAKzK,GAA2B,oBAAbnH,SAAnB,CAEA,IAAIwC,EAAOxC,SAASwC,MAAQxC,SAAS6R,qBAAqB,QAAQ,GAC9D9O,EAAQ/C,SAASC,cAAc,SACnC8C,EAAM0C,KAAO,WAEI,QAAbmM,GACEpP,EAAKrD,WACPqD,EAAKzD,aAAagE,EAAOP,EAAKrD,YAKhCqD,EAAKlD,YAAYyD,GAGfA,EAAM+O,WACR/O,EAAM+O,WAAWC,QAAU5K,EAE3BpE,EAAMzD,YAAYU,SAASI,eAAe+G,4srBCrBlC,oEAAQ,CACnBzJ,OAAQsC,SAASgS"} \ No newline at end of file diff --git a/frontend/src/receiver.svelte b/frontend/src/receiver.svelte index d361496..9e144dd 100644 --- a/frontend/src/receiver.svelte +++ b/frontend/src/receiver.svelte @@ -38,6 +38,7 @@ receiveCode = ""; status = "waiting"; receivePercent = 0; + receivePath = ""; }).catch(err => { console.log(err); }); @@ -106,9 +107,9 @@ {#if isReceiving}
- + >
{/if} diff --git a/frontend/src/sender.svelte b/frontend/src/sender.svelte index 4e7693a..dee9921 100644 --- a/frontend/src/sender.svelte +++ b/frontend/src/sender.svelte @@ -177,9 +177,9 @@ {#if isSending}
- + > {#if sendCode}
diff --git a/go.mod b/go.mod index 018b1b2..986a209 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/blang/semver v3.5.1+incompatible github.com/gen2brain/beeep v0.0.0-20210529141713-5586760f0cc1 github.com/klauspost/compress v1.12.2 - github.com/psanford/wormhole-william v1.0.5 + github.com/psanford/wormhole-william v1.0.6 github.com/rhysd/go-github-selfupdate v1.2.3 github.com/wailsapp/wails/v2 v2.0.0-beta.23 gopkg.in/yaml.v2 v2.4.0 @@ -27,7 +27,6 @@ require ( github.com/google/uuid v1.1.2 // indirect github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 // indirect github.com/gopherjs/gopherwasm v1.1.0 // indirect - github.com/gorilla/websocket v1.4.2 // indirect github.com/imdario/mergo v0.3.12 // indirect github.com/inconshreveable/go-update v0.0.0-20160112193335-8152e7eb6ccf // indirect github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e // indirect @@ -59,6 +58,7 @@ require ( google.golang.org/appengine v1.6.1 // indirect google.golang.org/protobuf v1.26.0 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect + nhooyr.io/websocket v1.8.6 // indirect salsa.debian.org/vasudev/gospake2 v0.0.0-20180813171123-adcc69dd31d5 // indirect ) diff --git a/go.sum b/go.sum index 201c941..aecd831 100644 --- a/go.sum +++ b/go.sum @@ -35,7 +35,7 @@ github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJm github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cheggaaa/pb/v3 v3.0.1/go.mod h1:SqqeMF/pMOIu3xgGoxtPYhMNQP258xE4x/XRTYua+KU= +github.com/cheggaaa/pb/v3 v3.0.8/go.mod h1:UICbiLec/XO6Hw6k+BHEtHeQFzzBH4i2/qk/ow1EJTA= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= @@ -53,6 +53,7 @@ github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3 github.com/fasthttp/websocket v0.0.0-20200320073529-1554a54587ab h1:9e2joQGp642wHGFP5m86SDptAavrdGBe8/x9DGEEAaI= github.com/fasthttp/websocket v0.0.0-20200320073529-1554a54587ab/go.mod h1:smsv/h4PBEBaU0XDTY5UwJTpZv69fQ0FfcLJr21mA6Y= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/flytam/filenamify v1.0.0/go.mod h1:Dzf9kVycwcsBlr2ATg6uxjqiFgKGH+5SKFuhdeP5zu8= @@ -63,7 +64,9 @@ github.com/gabriel-vasile/mimetype v1.3.1/go.mod h1:fA8fi6KUiG7MgQQ+mEWotXoEOvmx github.com/gen2brain/beeep v0.0.0-20210529141713-5586760f0cc1 h1:Xh9mvwEmhbdXlRSsgn+N0zj/NqnKvpeqL08oKDHln2s= github.com/gen2brain/beeep v0.0.0-20210529141713-5586760f0cc1/go.mod h1:ElSskYZe3oM8kThaHGJ+kiN2yyUMVXMZ7WxF9QqLDS8= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= +github.com/gin-gonic/gin v1.6.3 h1:ahKqKTFpO5KTPHxWZjEdPScmYaGtLo8Y4DMHoEsnp14= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= @@ -80,14 +83,20 @@ github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNI github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= +github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= +github.com/go-playground/validator/v10 v10.2.0 h1:KgJ0snyC2R9VXYN2rneOtQcw5aHQB1Vv0sFl1UcHBOY= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-toast/toast v0.0.0-20190211030409-01e6764cf0a4 h1:qZNfIGkIANxGv/OqtnntR4DfOY2+BgwR60cAcu/i3SE= github.com/go-toast/toast v0.0.0-20190211030409-01e6764cf0a4/go.mod h1:kW3HQ4UdaAyrUCSSDR4xUzBKW6O2iA4uHhk7AtyYp10= +github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= +github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= +github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= github.com/godbus/dbus/v5 v5.0.3 h1:ZqHaoEF7TBzh4jzPmqVhE/5A1z9of6orkAe5uHoAeME= github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= @@ -178,6 +187,7 @@ github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e/go.mod h1:alcuEE github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.9 h1:9yzud/Ht36ygwatGx56VwCZtlI/2AD15T1X2sjSuGns= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= @@ -187,7 +197,7 @@ github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvW github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.11.4/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.11.13/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.2 h1:2KCfW3I9M7nSc5wOqXAlW2v2U6v+w6cbjvbfp+OykW8= github.com/klauspost/compress v1.12.2/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= @@ -222,6 +232,7 @@ github.com/leaanthony/webview2runtime v1.1.0/go.mod h1:hH9GnWCve3DYzNaPOcPbhHQ7f github.com/leaanthony/winc v0.0.0-20211202091710-9931d43181ff h1:FwGObElCr/T/xy8S9IKDjWsNcfJHGxgjRl/GIbcseoQ= github.com/leaanthony/winc v0.0.0-20211202091710-9931d43181ff/go.mod h1:KEbMsKoznsebyGHwLk5LqkFOxL5uXSRdvpP4+avmAMs= github.com/leaanthony/winicon v1.0.0/go.mod h1:en5xhijl92aphrJdmRPlh4NI1L6wq3gEm0LpXAPghjU= +github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/logrusorgru/aurora v0.0.0-20181002194514-a7b3b318ed4e/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= @@ -229,12 +240,16 @@ github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/mdp/qrterminal v1.0.1/go.mod h1:Z33WhxQe9B6CdW37HaVqcRKzP+kByF3q/qLxOGe12xQ= +github.com/mdp/qrterminal/v3 v3.0.0/go.mod h1:NJpfAs7OAm77Dy8EkWrtE4aq+cE6McoLXlBqXQEwvE0= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= @@ -245,8 +260,10 @@ github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0Qu github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8= @@ -279,10 +296,12 @@ github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8 github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/psanford/wormhole-william v1.0.5 h1:+Nb8ChCUpcvW6p4YwJin3Q8TK8SgtQB7JyVcbuVX0gc= -github.com/psanford/wormhole-william v1.0.5/go.mod h1:DSRQm537D3ut3AlCOL2iUrAT+WuYjvHQkWkdynYpR/w= +github.com/psanford/wormhole-william v1.0.6 h1:kph5PiBaSU3Fi/lBlMQTG1pSU6RxSe6fNFndIe9Vg40= +github.com/psanford/wormhole-william v1.0.6/go.mod h1:IkhgE1mq0vzlf/WPdjXYTtTn/ItOfcdY7rhjdqK6k14= github.com/rhysd/go-github-selfupdate v1.2.3 h1:iaa+J202f+Nc+A8zi75uccC8Wg3omaM7HDeimXA22Ag= github.com/rhysd/go-github-selfupdate v1.2.3/go.mod h1:mp/N8zj6jFfBQy/XMYoWsmfzxazpPAODuqarmPDe2Rg= +github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= @@ -331,7 +350,9 @@ github.com/tidwall/sjson v1.1.7/go.mod h1:w/yG+ezBeTdUxiKs5NcPicO9diP38nk96QBAbI github.com/tkrajina/go-reflector v0.5.5 h1:gwoQFNye30Kk7NrExj8zm3zFtrGPqOkzFMLuQZg1DtQ= github.com/tkrajina/go-reflector v0.5.5/go.mod h1:ECbqLgccecY5kPmPmXg1MrHW585yMcDkVl6IvJe64T4= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= +github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/ulikunitz/xz v0.5.9 h1:RsKRIA2MO8x56wkkcd3LbtcE/uMszhb6DpRf+3uwa3I= github.com/ulikunitz/xz v0.5.9/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= @@ -445,6 +466,7 @@ golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200107162124-548cf772de50/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200810151505-1b9f1253b3ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -453,6 +475,8 @@ golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210218145245-beda7e5e158e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210415045647-66c3f260301c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210611083646-a4fc73990273/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -548,7 +572,9 @@ honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/qr v0.2.0/go.mod h1:IF+uZjkb9fqyeF/4tlBoynqmQxUoPfWEKh921coOuXs= salsa.debian.org/vasudev/gospake2 v0.0.0-20180813171123-adcc69dd31d5 h1:j+F9fFxAFNdrO85XnERJSYS5QGfPUWUy9IP4s9BkV6A= salsa.debian.org/vasudev/gospake2 v0.0.0-20180813171123-adcc69dd31d5/go.mod h1:soKzqXBAtqHTODjyA0VzH2iERtpzN1w65eZUfetn2cQ= diff --git a/internal/transport/receiver.go b/internal/transport/receiver.go index 6d5839b..b51fe37 100644 --- a/internal/transport/receiver.go +++ b/internal/transport/receiver.go @@ -72,11 +72,19 @@ func (c *Client) NewReceive(ctx context.Context, code string, pathname chan stri return bail(msg, err) } + var canceled bool + defer func() { if cerr := file.Close(); cerr != nil { log.Println("Error on closing file", err) err = cerr } + if canceled { + rerr := os.Remove(path) + if rerr != nil { + log.Println("Error on removing canceled file", rerr) + } + } }() // Create our progress reporter and pass it to be used alongside our writer @@ -84,6 +92,10 @@ func (c *Client) NewReceive(ctx context.Context, code string, pathname chan stri _, err = io.Copy(file, io.TeeReader(msg, counter)) close(progress) if err != nil { + if err.Error() == "context canceled" { + canceled = true + return nil + } log.Println("Error on copying contents to file", err) return err } @@ -113,6 +125,9 @@ func (c *Client) NewReceive(ctx context.Context, code string, pathname chan stri n, err := io.Copy(tmp, io.TeeReader(msg, counter)) close(progress) if err != nil { + if err.Error() == "context canceled" { + return nil + } log.Println("Error on copying contents to file", err) return err }