2020-11-11 00:00:54 +01:00
( function ( l , r ) { if ( l . getElementById ( 'livereloadscript' ) ) return ; r = l . createElement ( 'script' ) ; r . async = 1 ; r . src = '//' + ( window . location . host || 'localhost' ) . split ( ':' ) [ 0 ] + ':5000/livereload.js?snipver=1' ; r . id = 'livereloadscript' ; l . getElementsByTagName ( 'head' ) [ 0 ] . appendChild ( r ) } ) ( window . document ) ;
var app = ( function ( ) {
'use strict' ;
function noop ( ) { }
const identity = x => x ;
function assign ( tar , src ) {
// @ts-ignore
for ( const k in src )
tar [ k ] = src [ k ] ;
return tar ;
}
function add _location ( element , file , line , column , char ) {
element . _ _svelte _meta = {
loc : { file , line , column , char }
} ;
}
function run ( fn ) {
return fn ( ) ;
}
function blank _object ( ) {
return Object . create ( null ) ;
}
function run _all ( fns ) {
fns . forEach ( run ) ;
}
function is _function ( thing ) {
return typeof thing === 'function' ;
}
function safe _not _equal ( a , b ) {
return a != a ? b == b : a !== b || ( ( a && typeof a === 'object' ) || typeof a === 'function' ) ;
}
function is _empty ( obj ) {
return Object . keys ( obj ) . length === 0 ;
}
function create _slot ( definition , ctx , $$scope , fn ) {
if ( definition ) {
const slot _ctx = get _slot _context ( definition , ctx , $$scope , fn ) ;
return definition [ 0 ] ( slot _ctx ) ;
}
}
function get _slot _context ( definition , ctx , $$scope , fn ) {
return definition [ 1 ] && fn
? assign ( $$scope . ctx . slice ( ) , definition [ 1 ] ( fn ( ctx ) ) )
: $$scope . ctx ;
}
function get _slot _changes ( definition , $$scope , dirty , fn ) {
if ( definition [ 2 ] && fn ) {
const lets = definition [ 2 ] ( fn ( dirty ) ) ;
if ( $$scope . dirty === undefined ) {
return lets ;
}
if ( typeof lets === 'object' ) {
const merged = [ ] ;
const len = Math . max ( $$scope . dirty . length , lets . length ) ;
for ( let i = 0 ; i < len ; i += 1 ) {
merged [ i ] = $$scope . dirty [ i ] | lets [ i ] ;
}
return merged ;
}
return $$scope . dirty | lets ;
}
return $$scope . dirty ;
}
function update _slot ( slot , slot _definition , ctx , $$scope , dirty , get _slot _changes _fn , get _slot _context _fn ) {
const slot _changes = get _slot _changes ( slot _definition , $$scope , dirty , get _slot _changes _fn ) ;
if ( slot _changes ) {
const slot _context = get _slot _context ( slot _definition , ctx , $$scope , get _slot _context _fn ) ;
slot . p ( slot _context , slot _changes ) ;
}
}
function action _destroyer ( action _result ) {
return action _result && is _function ( action _result . destroy ) ? action _result . destroy : noop ;
}
const is _client = typeof window !== 'undefined' ;
let now = is _client
? ( ) => window . performance . now ( )
: ( ) => Date . now ( ) ;
let raf = is _client ? cb => requestAnimationFrame ( cb ) : noop ;
const tasks = new Set ( ) ;
function run _tasks ( now ) {
tasks . forEach ( task => {
if ( ! task . c ( now ) ) {
tasks . delete ( task ) ;
task . f ( ) ;
}
} ) ;
if ( tasks . size !== 0 )
raf ( run _tasks ) ;
}
/ * *
* Creates a new task that runs on each raf frame
* until it returns a falsy value or is aborted
* /
function loop ( callback ) {
let task ;
if ( tasks . size === 0 )
raf ( run _tasks ) ;
return {
promise : new Promise ( fulfill => {
tasks . add ( task = { c : callback , f : fulfill } ) ;
} ) ,
abort ( ) {
tasks . delete ( task ) ;
}
} ;
}
function append ( target , node ) {
target . appendChild ( node ) ;
}
function insert ( target , node , anchor ) {
target . insertBefore ( node , anchor || null ) ;
}
function detach ( node ) {
node . parentNode . removeChild ( node ) ;
}
function destroy _each ( iterations , detaching ) {
for ( let i = 0 ; i < iterations . length ; i += 1 ) {
if ( iterations [ i ] )
iterations [ i ] . d ( detaching ) ;
}
}
function element ( name ) {
return document . createElement ( name ) ;
}
function svg _element ( name ) {
return document . createElementNS ( 'http://www.w3.org/2000/svg' , name ) ;
}
function text ( data ) {
return document . createTextNode ( data ) ;
}
function space ( ) {
return text ( ' ' ) ;
}
function empty ( ) {
return text ( '' ) ;
}
function listen ( node , event , handler , options ) {
node . addEventListener ( event , handler , options ) ;
return ( ) => node . removeEventListener ( event , handler , options ) ;
}
2020-11-11 23:45:52 +01:00
function prevent _default ( fn ) {
return function ( event ) {
event . preventDefault ( ) ;
// @ts-ignore
return fn . call ( this , event ) ;
} ;
}
2020-11-11 00:00:54 +01:00
function stop _propagation ( fn ) {
return function ( event ) {
event . stopPropagation ( ) ;
// @ts-ignore
return fn . call ( this , event ) ;
} ;
}
function attr ( node , attribute , value ) {
if ( value == null )
node . removeAttribute ( attribute ) ;
else if ( node . getAttribute ( attribute ) !== value )
node . setAttribute ( attribute , value ) ;
}
function children ( element ) {
return Array . from ( element . childNodes ) ;
}
function set _style ( node , key , value , important ) {
node . style . setProperty ( key , value , important ? 'important' : '' ) ;
}
function toggle _class ( element , name , toggle ) {
element . classList [ toggle ? 'add' : 'remove' ] ( name ) ;
}
function custom _event ( type , detail ) {
const e = document . createEvent ( 'CustomEvent' ) ;
e . initCustomEvent ( type , false , false , detail ) ;
return e ;
}
const active _docs = new Set ( ) ;
let active = 0 ;
// https://github.com/darkskyapp/string-hash/blob/master/index.js
function hash ( str ) {
let hash = 5381 ;
let i = str . length ;
while ( i -- )
hash = ( ( hash << 5 ) - hash ) ^ str . charCodeAt ( i ) ;
return hash >>> 0 ;
}
function create _rule ( node , a , b , duration , delay , ease , fn , uid = 0 ) {
const step = 16.666 / duration ;
let keyframes = '{\n' ;
for ( let p = 0 ; p <= 1 ; p += step ) {
const t = a + ( b - a ) * ease ( p ) ;
keyframes += p * 100 + ` %{ ${ fn ( t , 1 - t ) } } \n ` ;
}
const rule = keyframes + ` 100% { ${ fn ( b , 1 - b ) } } \n } ` ;
const name = ` __svelte_ ${ hash ( rule ) } _ ${ uid } ` ;
const doc = node . ownerDocument ;
active _docs . add ( doc ) ;
const stylesheet = doc . _ _svelte _stylesheet || ( doc . _ _svelte _stylesheet = doc . head . appendChild ( element ( 'style' ) ) . sheet ) ;
const current _rules = doc . _ _svelte _rules || ( doc . _ _svelte _rules = { } ) ;
if ( ! current _rules [ name ] ) {
current _rules [ name ] = true ;
stylesheet . insertRule ( ` @keyframes ${ name } ${ rule } ` , stylesheet . cssRules . length ) ;
}
const animation = node . style . animation || '' ;
node . style . animation = ` ${ animation ? ` ${ animation } , ` : '' } ${ name } ${ duration } ms linear ${ delay } ms 1 both ` ;
active += 1 ;
return name ;
}
function delete _rule ( node , name ) {
const previous = ( node . style . animation || '' ) . split ( ', ' ) ;
const next = previous . filter ( name
? anim => anim . indexOf ( name ) < 0 // remove specific animation
: anim => anim . indexOf ( '__svelte' ) === - 1 // remove all Svelte animations
) ;
const deleted = previous . length - next . length ;
if ( deleted ) {
node . style . animation = next . join ( ', ' ) ;
active -= deleted ;
if ( ! active )
clear _rules ( ) ;
}
}
function clear _rules ( ) {
raf ( ( ) => {
if ( active )
return ;
active _docs . forEach ( doc => {
const stylesheet = doc . _ _svelte _stylesheet ;
let i = stylesheet . cssRules . length ;
while ( i -- )
stylesheet . deleteRule ( i ) ;
doc . _ _svelte _rules = { } ;
} ) ;
active _docs . clear ( ) ;
} ) ;
}
let current _component ;
function set _current _component ( component ) {
current _component = component ;
}
function get _current _component ( ) {
if ( ! current _component )
throw new Error ( 'Function called outside component initialization' ) ;
return current _component ;
}
function onMount ( fn ) {
get _current _component ( ) . $$ . on _mount . push ( fn ) ;
}
function createEventDispatcher ( ) {
const component = get _current _component ( ) ;
return ( type , detail ) => {
const callbacks = component . $$ . callbacks [ type ] ;
if ( callbacks ) {
// TODO are there situations where events could be dispatched
// in a server (non-DOM) environment?
const event = custom _event ( type , detail ) ;
callbacks . slice ( ) . forEach ( fn => {
fn . call ( component , event ) ;
} ) ;
}
} ;
}
// TODO figure out if we still want to support
// shorthand events, or if we want to implement
// a real bubbling mechanism
function bubble ( component , event ) {
const callbacks = component . $$ . callbacks [ event . type ] ;
if ( callbacks ) {
callbacks . slice ( ) . forEach ( fn => fn ( event ) ) ;
}
}
const dirty _components = [ ] ;
const binding _callbacks = [ ] ;
const render _callbacks = [ ] ;
const flush _callbacks = [ ] ;
const resolved _promise = Promise . resolve ( ) ;
let update _scheduled = false ;
function schedule _update ( ) {
if ( ! update _scheduled ) {
update _scheduled = true ;
resolved _promise . then ( flush ) ;
}
}
function add _render _callback ( fn ) {
render _callbacks . push ( fn ) ;
}
let flushing = false ;
const seen _callbacks = new Set ( ) ;
function flush ( ) {
if ( flushing )
return ;
flushing = true ;
do {
// first, call beforeUpdate functions
// and update components
for ( let i = 0 ; i < dirty _components . length ; i += 1 ) {
const component = dirty _components [ i ] ;
set _current _component ( component ) ;
update ( component . $$ ) ;
}
set _current _component ( null ) ;
dirty _components . length = 0 ;
while ( binding _callbacks . length )
binding _callbacks . pop ( ) ( ) ;
// then, once components are updated, call
// afterUpdate functions. This may cause
// subsequent updates...
for ( let i = 0 ; i < render _callbacks . length ; i += 1 ) {
const callback = render _callbacks [ i ] ;
if ( ! seen _callbacks . has ( callback ) ) {
// ...so guard against infinite loops
seen _callbacks . add ( callback ) ;
callback ( ) ;
}
}
render _callbacks . length = 0 ;
} while ( dirty _components . length ) ;
while ( flush _callbacks . length ) {
flush _callbacks . pop ( ) ( ) ;
}
update _scheduled = false ;
flushing = false ;
seen _callbacks . clear ( ) ;
}
function update ( $$ ) {
if ( $$ . fragment !== null ) {
$$ . update ( ) ;
run _all ( $$ . before _update ) ;
const dirty = $$ . dirty ;
$$ . dirty = [ - 1 ] ;
$$ . fragment && $$ . fragment . p ( $$ . ctx , dirty ) ;
$$ . after _update . forEach ( add _render _callback ) ;
}
}
let promise ;
function wait ( ) {
if ( ! promise ) {
promise = Promise . resolve ( ) ;
promise . then ( ( ) => {
promise = null ;
} ) ;
}
return promise ;
}
function dispatch ( node , direction , kind ) {
node . dispatchEvent ( custom _event ( ` ${ direction ? 'intro' : 'outro' } ${ kind } ` ) ) ;
}
const outroing = new Set ( ) ;
let outros ;
function group _outros ( ) {
outros = {
r : 0 ,
c : [ ] ,
p : outros // parent group
} ;
}
function check _outros ( ) {
if ( ! outros . r ) {
run _all ( outros . c ) ;
}
outros = outros . p ;
}
function transition _in ( block , local ) {
if ( block && block . i ) {
outroing . delete ( block ) ;
block . i ( local ) ;
}
}
function transition _out ( block , local , detach , callback ) {
if ( block && block . o ) {
if ( outroing . has ( block ) )
return ;
outroing . add ( block ) ;
outros . c . push ( ( ) => {
outroing . delete ( block ) ;
if ( callback ) {
if ( detach )
block . d ( 1 ) ;
callback ( ) ;
}
} ) ;
block . o ( local ) ;
}
}
const null _transition = { duration : 0 } ;
function create _bidirectional _transition ( node , fn , params , intro ) {
let config = fn ( node , params ) ;
let t = intro ? 0 : 1 ;
let running _program = null ;
let pending _program = null ;
let animation _name = null ;
function clear _animation ( ) {
if ( animation _name )
delete _rule ( node , animation _name ) ;
}
function init ( program , duration ) {
const d = program . b - t ;
duration *= Math . abs ( d ) ;
return {
a : t ,
b : program . b ,
d ,
duration ,
start : program . start ,
end : program . start + duration ,
group : program . group
} ;
}
function go ( b ) {
const { delay = 0 , duration = 300 , easing = identity , tick = noop , css } = config || null _transition ;
const program = {
start : now ( ) + delay ,
b
} ;
if ( ! b ) {
// @ts-ignore todo: improve typings
program . group = outros ;
outros . r += 1 ;
}
if ( running _program || pending _program ) {
pending _program = program ;
}
else {
// if this is an intro, and there's a delay, we need to do
// an initial tick and/or apply CSS animation immediately
if ( css ) {
clear _animation ( ) ;
animation _name = create _rule ( node , t , b , duration , delay , easing , css ) ;
}
if ( b )
tick ( 0 , 1 ) ;
running _program = init ( program , duration ) ;
add _render _callback ( ( ) => dispatch ( node , b , 'start' ) ) ;
loop ( now => {
if ( pending _program && now > pending _program . start ) {
running _program = init ( pending _program , duration ) ;
pending _program = null ;
dispatch ( node , running _program . b , 'start' ) ;
if ( css ) {
clear _animation ( ) ;
animation _name = create _rule ( node , t , running _program . b , running _program . duration , 0 , easing , config . css ) ;
}
}
if ( running _program ) {
if ( now >= running _program . end ) {
tick ( t = running _program . b , 1 - t ) ;
dispatch ( node , running _program . b , 'end' ) ;
if ( ! pending _program ) {
// we're done
if ( running _program . b ) {
// intro — we can tidy up immediately
clear _animation ( ) ;
}
else {
// outro — needs to be coordinated
if ( ! -- running _program . group . r )
run _all ( running _program . group . c ) ;
}
}
running _program = null ;
}
else if ( now >= running _program . start ) {
const p = now - running _program . start ;
t = running _program . a + running _program . d * easing ( p / running _program . duration ) ;
tick ( t , 1 - t ) ;
}
}
return ! ! ( running _program || pending _program ) ;
} ) ;
}
}
return {
run ( b ) {
if ( is _function ( config ) ) {
wait ( ) . then ( ( ) => {
// @ts-ignore
config = config ( ) ;
go ( b ) ;
} ) ;
}
else {
go ( b ) ;
}
} ,
end ( ) {
clear _animation ( ) ;
running _program = pending _program = null ;
}
} ;
}
const globals = ( typeof window !== 'undefined'
? window
: typeof globalThis !== 'undefined'
? globalThis
: global ) ;
function create _component ( block ) {
block && block . c ( ) ;
}
function mount _component ( component , target , anchor ) {
const { fragment , on _mount , on _destroy , after _update } = component . $$ ;
fragment && fragment . m ( target , anchor ) ;
// onMount happens before the initial afterUpdate
add _render _callback ( ( ) => {
const new _on _destroy = on _mount . map ( run ) . filter ( is _function ) ;
if ( on _destroy ) {
on _destroy . push ( ... new _on _destroy ) ;
}
else {
// Edge case - component was destroyed immediately,
// most likely as a result of a binding initialising
run _all ( new _on _destroy ) ;
}
component . $$ . on _mount = [ ] ;
} ) ;
after _update . forEach ( add _render _callback ) ;
}
function destroy _component ( component , detaching ) {
const $$ = component . $$ ;
if ( $$ . fragment !== null ) {
run _all ( $$ . on _destroy ) ;
$$ . fragment && $$ . fragment . d ( detaching ) ;
// TODO null out other refs, including component.$$ (but need to
// preserve final state?)
$$ . on _destroy = $$ . fragment = null ;
$$ . ctx = [ ] ;
}
}
function make _dirty ( component , i ) {
if ( component . $$ . dirty [ 0 ] === - 1 ) {
dirty _components . push ( component ) ;
schedule _update ( ) ;
component . $$ . dirty . fill ( 0 ) ;
}
component . $$ . dirty [ ( i / 31 ) | 0 ] |= ( 1 << ( i % 31 ) ) ;
}
function init ( component , options , instance , create _fragment , not _equal , props , dirty = [ - 1 ] ) {
const parent _component = current _component ;
set _current _component ( component ) ;
const prop _values = options . props || { } ;
const $$ = component . $$ = {
fragment : null ,
ctx : null ,
// state
props ,
update : noop ,
not _equal ,
bound : blank _object ( ) ,
// lifecycle
on _mount : [ ] ,
on _destroy : [ ] ,
before _update : [ ] ,
after _update : [ ] ,
context : new Map ( parent _component ? parent _component . $$ . context : [ ] ) ,
// everything else
callbacks : blank _object ( ) ,
dirty ,
skip _bound : false
} ;
let ready = false ;
$$ . ctx = instance
? instance ( component , prop _values , ( i , ret , ... rest ) => {
const value = rest . length ? rest [ 0 ] : ret ;
if ( $$ . ctx && not _equal ( $$ . ctx [ i ] , $$ . ctx [ i ] = value ) ) {
if ( ! $$ . skip _bound && $$ . bound [ i ] )
$$ . bound [ i ] ( value ) ;
if ( ready )
make _dirty ( component , i ) ;
}
return ret ;
} )
: [ ] ;
$$ . update ( ) ;
ready = true ;
run _all ( $$ . before _update ) ;
// `false` as a special case of no DOM component
$$ . fragment = create _fragment ? create _fragment ( $$ . ctx ) : false ;
if ( options . target ) {
if ( options . hydrate ) {
const nodes = children ( options . target ) ;
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
$$ . fragment && $$ . fragment . l ( nodes ) ;
nodes . forEach ( detach ) ;
}
else {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
$$ . fragment && $$ . fragment . c ( ) ;
}
if ( options . intro )
transition _in ( component . $$ . fragment ) ;
mount _component ( component , options . target , options . anchor ) ;
flush ( ) ;
}
set _current _component ( parent _component ) ;
}
class SvelteComponent {
$destroy ( ) {
destroy _component ( this , 1 ) ;
this . $destroy = noop ;
}
$on ( type , callback ) {
const callbacks = ( this . $$ . callbacks [ type ] || ( this . $$ . callbacks [ type ] = [ ] ) ) ;
callbacks . push ( callback ) ;
return ( ) => {
const index = callbacks . indexOf ( callback ) ;
if ( index !== - 1 )
callbacks . splice ( index , 1 ) ;
} ;
}
$set ( $$props ) {
if ( this . $$set && ! is _empty ( $$props ) ) {
this . $$ . skip _bound = true ;
this . $$set ( $$props ) ;
this . $$ . skip _bound = false ;
}
}
}
function dispatch _dev ( type , detail ) {
document . dispatchEvent ( custom _event ( type , Object . assign ( { version : '3.29.6' } , detail ) ) ) ;
}
function append _dev ( target , node ) {
dispatch _dev ( 'SvelteDOMInsert' , { target , node } ) ;
append ( target , node ) ;
}
function insert _dev ( target , node , anchor ) {
dispatch _dev ( 'SvelteDOMInsert' , { target , node , anchor } ) ;
insert ( target , node , anchor ) ;
}
function detach _dev ( node ) {
dispatch _dev ( 'SvelteDOMRemove' , { node } ) ;
detach ( node ) ;
}
function listen _dev ( node , event , handler , options , has _prevent _default , has _stop _propagation ) {
const modifiers = options === true ? [ 'capture' ] : options ? Array . from ( Object . keys ( options ) ) : [ ] ;
if ( has _prevent _default )
modifiers . push ( 'preventDefault' ) ;
if ( has _stop _propagation )
modifiers . push ( 'stopPropagation' ) ;
dispatch _dev ( 'SvelteDOMAddEventListener' , { node , event , handler , modifiers } ) ;
const dispose = listen ( node , event , handler , options ) ;
return ( ) => {
dispatch _dev ( 'SvelteDOMRemoveEventListener' , { node , event , handler , modifiers } ) ;
dispose ( ) ;
} ;
}
function attr _dev ( node , attribute , value ) {
attr ( node , attribute , value ) ;
if ( value == null )
dispatch _dev ( 'SvelteDOMRemoveAttribute' , { node , attribute } ) ;
else
dispatch _dev ( 'SvelteDOMSetAttribute' , { node , attribute , value } ) ;
}
function set _data _dev ( text , data ) {
data = '' + data ;
if ( text . wholeText === data )
return ;
dispatch _dev ( 'SvelteDOMSetData' , { node : text , data } ) ;
text . data = data ;
}
function validate _each _argument ( arg ) {
if ( typeof arg !== 'string' && ! ( arg && typeof arg === 'object' && 'length' in arg ) ) {
let msg = '{#each} only iterates over array-like objects.' ;
if ( typeof Symbol === 'function' && arg && Symbol . iterator in arg ) {
msg += ' You can use a spread to convert this iterable into an array.' ;
}
throw new Error ( msg ) ;
}
}
function validate _slots ( name , slot , keys ) {
for ( const slot _key of Object . keys ( slot ) ) {
if ( ! ~ keys . indexOf ( slot _key ) ) {
console . warn ( ` < ${ name } > received an unexpected slot " ${ slot _key } ". ` ) ;
}
}
}
class SvelteComponentDev extends SvelteComponent {
constructor ( options ) {
if ( ! options || ( ! options . target && ! options . $$inline ) ) {
throw new Error ( "'target' is a required option" ) ;
}
super ( ) ;
}
$destroy ( ) {
super . $destroy ( ) ;
this . $destroy = ( ) => {
console . warn ( 'Component was already destroyed' ) ; // eslint-disable-line no-console
} ;
}
$capture _state ( ) { }
$inject _state ( ) { }
}
/* src/util/Formatting.svelte generated by Svelte v3.29.6 */
const formatThousands = x => {
return x . toString ( ) . replace ( /\B(?=(\d{3})+(?!\d))/g , " " ) ;
} ;
const formatDataVolume = ( amt , precision ) => {
if ( precision < 3 ) {
precision = 3 ;
}
if ( amt >= 1000000000000000000 ) {
return ( amt / 1000000000000000000 ) . toPrecision ( precision ) + " EB" ;
} else if ( amt >= 1000000000000000 ) {
return ( amt / 1000000000000000 ) . toPrecision ( precision ) + " PB" ;
} else if ( amt >= 1000000000000 ) {
return ( amt / 1000000000000 ) . toPrecision ( precision ) + " TB" ;
} else if ( amt >= 1000000000 ) {
return ( amt / 1000000000 ) . toPrecision ( precision ) + " GB" ;
} else if ( amt >= 1000000 ) {
return ( amt / 1000000 ) . toPrecision ( precision ) + " MB" ;
} else if ( amt >= 1000 ) {
return ( amt / 1000 ) . toPrecision ( precision ) + " kB" ;
}
return amt + " B" ;
} ;
const formatDate = ( date , hours , minutes , seconds ) => {
if ( ! ( date instanceof Date ) ) {
date = new Date ( date ) ;
}
let dateStr = date . getFullYear ( ) + "-" + ( "00" + ( date . getMonth ( ) + 1 ) ) . slice ( - 2 ) + "-" + ( "00" + date . getDate ( ) ) . slice ( - 2 ) ;
if ( hours ) {
dateStr += " " + ( "00" + date . getHours ( ) ) . slice ( - 2 ) ;
}
if ( minutes ) {
dateStr += ":" + ( "00" + date . getMinutes ( ) ) . slice ( - 2 ) ;
}
if ( seconds ) {
dateStr += ":" + ( "00" + date . getMinutes ( ) ) . slice ( - 2 ) ;
}
return dateStr ;
} ;
/* src/filesystem/Sharebar.svelte generated by Svelte v3.29.6 */
const file = "src/filesystem/Sharebar.svelte" ;
function create _fragment ( ctx ) {
let div ;
let t0 ;
let br ;
let t1 ;
let button0 ;
let t3 ;
let button1 ;
let t5 ;
let button2 ;
let t7 ;
let button3 ;
let t9 ;
let button4 ;
const block = {
c : function create ( ) {
div = element ( "div" ) ;
t0 = text ( "Share on:" ) ;
br = element ( "br" ) ;
t1 = space ( ) ;
button0 = element ( "button" ) ;
button0 . textContent = "E-Mail" ;
t3 = space ( ) ;
button1 = element ( "button" ) ;
button1 . textContent = "Reddit" ;
t5 = space ( ) ;
button2 = element ( "button" ) ;
button2 . textContent = "Twitter" ;
t7 = space ( ) ;
button3 = element ( "button" ) ;
button3 . textContent = "Facebook" ;
t9 = space ( ) ;
button4 = element ( "button" ) ;
button4 . textContent = "Tumblr" ;
add _location ( br , file , 8 , 10 , 230 ) ;
attr _dev ( button0 , "class" , "sharebar-button button_full_width" ) ;
attr _dev ( button0 , "onclick" , "window.open('mailto:please@set.address?subject=File%20on%20pixeldrain&body=' + window.location.href);" ) ;
add _location ( button0 , file , 9 , 1 , 237 ) ;
attr _dev ( button1 , "class" , "sharebar-button button_full_width" ) ;
attr _dev ( button1 , "onclick" , "window.open('https://www.reddit.com/submit?url=' + window.location.href);" ) ;
add _location ( button1 , file , 12 , 1 , 421 ) ;
attr _dev ( button2 , "class" , "sharebar-button button_full_width" ) ;
attr _dev ( button2 , "onclick" , "window.open('https://twitter.com/share?url=' + window.location.href);" ) ;
add _location ( button2 , file , 15 , 1 , 577 ) ;
attr _dev ( button3 , "class" , "sharebar-button button_full_width" ) ;
attr _dev ( button3 , "onclick" , "window.open('http://www.facebook.com/sharer.php?u=' + window.location.href);" ) ;
add _location ( button3 , file , 18 , 1 , 730 ) ;
attr _dev ( button4 , "class" , "sharebar-button button_full_width" ) ;
attr _dev ( button4 , "onclick" , "window.open('http://www.tumblr.com/share/link?url=' + window.location.href);" ) ;
add _location ( button4 , file , 21 , 1 , 891 ) ;
attr _dev ( div , "class" , "sharebar svelte-gnq1s2" ) ;
toggle _class ( div , "visible" , /*visible*/ ctx [ 0 ] ) ;
add _location ( div , file , 7 , 0 , 162 ) ;
} ,
l : function claim ( nodes ) {
throw new Error ( "options.hydrate only works if the component was compiled with the `hydratable: true` option" ) ;
} ,
m : function mount ( target , anchor ) {
insert _dev ( target , div , anchor ) ;
append _dev ( div , t0 ) ;
append _dev ( div , br ) ;
append _dev ( div , t1 ) ;
append _dev ( div , button0 ) ;
append _dev ( div , t3 ) ;
append _dev ( div , button1 ) ;
append _dev ( div , t5 ) ;
append _dev ( div , button2 ) ;
append _dev ( div , t7 ) ;
append _dev ( div , button3 ) ;
append _dev ( div , t9 ) ;
append _dev ( div , button4 ) ;
/*div_binding*/ ctx [ 4 ] ( div ) ;
} ,
p : function update ( ctx , [ dirty ] ) {
if ( dirty & /*visible*/ 1 ) {
toggle _class ( div , "visible" , /*visible*/ ctx [ 0 ] ) ;
}
} ,
i : noop ,
o : noop ,
d : function destroy ( detaching ) {
if ( detaching ) detach _dev ( div ) ;
/*div_binding*/ ctx [ 4 ] ( null ) ;
}
} ;
dispatch _dev ( "SvelteRegisterBlock" , {
block ,
id : create _fragment . name ,
type : "component" ,
source : "" ,
ctx
} ) ;
return block ;
}
function instance ( $$self , $$props , $$invalidate ) {
let { $$slots : slots = { } , $$scope } = $$props ;
validate _slots ( "Sharebar" , slots , [ ] ) ;
let sharebar ;
let { visible = false } = $$props ;
const setVisible = v => {
$$invalidate ( 0 , visible = v ) ;
} ;
const toggle = ( ) => {
setVisible ( ! visible ) ;
} ;
const writable _props = [ "visible" ] ;
Object . keys ( $$props ) . forEach ( key => {
if ( ! ~ writable _props . indexOf ( key ) && key . slice ( 0 , 2 ) !== "$$" ) console . warn ( ` <Sharebar> was created with unknown prop ' ${ key } ' ` ) ;
} ) ;
function div _binding ( $$value ) {
binding _callbacks [ $$value ? "unshift" : "push" ] ( ( ) => {
sharebar = $$value ;
$$invalidate ( 1 , sharebar ) ;
} ) ;
}
$$self . $$set = $$props => {
if ( "visible" in $$props ) $$invalidate ( 0 , visible = $$props . visible ) ;
} ;
$$self . $capture _state = ( ) => ( { sharebar , visible , setVisible , toggle } ) ;
$$self . $inject _state = $$props => {
if ( "sharebar" in $$props ) $$invalidate ( 1 , sharebar = $$props . sharebar ) ;
if ( "visible" in $$props ) $$invalidate ( 0 , visible = $$props . visible ) ;
} ;
if ( $$props && "$$inject" in $$props ) {
$$self . $inject _state ( $$props . $$inject ) ;
}
return [ visible , sharebar , setVisible , toggle , div _binding ] ;
}
class Sharebar extends SvelteComponentDev {
constructor ( options ) {
super ( options ) ;
init ( this , options , instance , create _fragment , safe _not _equal , { visible : 0 , setVisible : 2 , toggle : 3 } ) ;
dispatch _dev ( "SvelteRegisterComponent" , {
component : this ,
tagName : "Sharebar" ,
options ,
id : create _fragment . name
} ) ;
}
get visible ( ) {
throw new Error ( "<Sharebar>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'" ) ;
}
set visible ( value ) {
throw new Error ( "<Sharebar>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'" ) ;
}
get setVisible ( ) {
return this . $$ . ctx [ 2 ] ;
}
set setVisible ( value ) {
throw new Error ( "<Sharebar>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'" ) ;
}
get toggle ( ) {
return this . $$ . ctx [ 3 ] ;
}
set toggle ( value ) {
throw new Error ( "<Sharebar>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'" ) ;
}
}
/* src/util/Spinner.svelte generated by Svelte v3.29.6 */
const file$1 = "src/util/Spinner.svelte" ;
function create _fragment$1 ( ctx ) {
let svg ;
let path ;
let animateTransform ;
const block = {
c : function create ( ) {
svg = svg _element ( "svg" ) ;
path = svg _element ( "path" ) ;
animateTransform = svg _element ( "animateTransform" ) ;
attr _dev ( animateTransform , "attributeType" , "xml" ) ;
attr _dev ( animateTransform , "attributeName" , "transform" ) ;
attr _dev ( animateTransform , "type" , "rotate" ) ;
attr _dev ( animateTransform , "from" , "0 40 40" ) ;
attr _dev ( animateTransform , "to" , "360 40 40" ) ;
attr _dev ( animateTransform , "dur" , "0.6s" ) ;
attr _dev ( animateTransform , "repeatCount" , "indefinite" ) ;
add _location ( animateTransform , file$1 , 22 , 2 , 1719 ) ;
attr _dev ( path , "d" , "M10,40c0,0,0-0.4,0-1.1c0-0.3,0-0.8,0-1.3c0-0.3,0-0.5,0-0.8c0-0.3,0.1-0.6,0.1-0.9c0.1-0.6,0.1-1.4,0.2-2.1\n\t\tc0.2-0.8,0.3-1.6,0.5-2.5c0.2-0.9,0.6-1.8,0.8-2.8c0.3-1,0.8-1.9,1.2-3c0.5-1,1.1-2,1.7-3.1c0.7-1,1.4-2.1,2.2-3.1\n\t\tc1.6-2.1,3.7-3.9,6-5.6c2.3-1.7,5-3,7.9-4.1c0.7-0.2,1.5-0.4,2.2-0.7c0.7-0.3,1.5-0.3,2.3-0.5c0.8-0.2,1.5-0.3,2.3-0.4l1.2-0.1\n\t\tl0.6-0.1l0.3,0l0.1,0l0.1,0l0,0c0.1,0-0.1,0,0.1,0c1.5,0,2.9-0.1,4.5,0.2c0.8,0.1,1.6,0.1,2.4,0.3c0.8,0.2,1.5,0.3,2.3,0.5\n\t\tc3,0.8,5.9,2,8.5,3.6c2.6,1.6,4.9,3.4,6.8,5.4c1,1,1.8,2.1,2.7,3.1c0.8,1.1,1.5,2.1,2.1,3.2c0.6,1.1,1.2,2.1,1.6,3.1\n\t\tc0.4,1,0.9,2,1.2,3c0.3,1,0.6,1.9,0.8,2.7c0.2,0.9,0.3,1.6,0.5,2.4c0.1,0.4,0.1,0.7,0.2,1c0,0.3,0.1,0.6,0.1,0.9\n\t\tc0.1,0.6,0.1,1,0.1,1.4C74,39.6,74,40,74,40c0.2,2.2-1.5,4.1-3.7,4.3s-4.1-1.5-4.3-3.7c0-0.1,0-0.2,0-0.3l0-0.4c0,0,0-0.3,0-0.9\n\t\tc0-0.3,0-0.7,0-1.1c0-0.2,0-0.5,0-0.7c0-0.2-0.1-0.5-0.1-0.8c-0.1-0.6-0.1-1.2-0.2-1.9c-0.1-0.7-0.3-1.4-0.4-2.2\n\t\tc-0.2-0.8-0.5-1.6-0.7-2.4c-0.3-0.8-0.7-1.7-1.1-2.6c-0.5-0.9-0.9-1.8-1.5-2.7c-0.6-0.9-1.2-1.8-1.9-2.7c-1.4-1.8-3.2-3.4-5.2-4.9\n\t\tc-2-1.5-4.4-2.7-6.9-3.6c-0.6-0.2-1.3-0.4-1.9-0.6c-0.7-0.2-1.3-0.3-1.9-0.4c-1.2-0.3-2.8-0.4-4.2-0.5l-2,0c-0.7,0-1.4,0.1-2.1,0.1\n\t\tc-0.7,0.1-1.4,0.1-2,0.3c-0.7,0.1-1.3,0.3-2,0.4c-2.6,0.7-5.2,1.7-7.5,3.1c-2.2,1.4-4.3,2.9-6,4.7c-0.9,0.8-1.6,1.8-2.4,2.7\n\t\tc-0.7,0.9-1.3,1.9-1.9,2.8c-0.5,1-1,1.9-1.4,2.8c-0.4,0.9-0.8,1.8-1,2.6c-0.3,0.9-0.5,1.6-0.7,2.4c-0.2,0.7-0.3,1.4-0.4,2.1\n\t\tc-0.1,0.3-0.1,0.6-0.2,0.9c0,0.3-0.1,0.6-0.1,0.8c0,0.5-0.1,0.9-0.1,1.3C10,39.6,10,40,10,40z" ) ;
add _location ( path , file$1 , 8 , 1 , 183 ) ;
attr _dev ( svg , "version" , "1.1" ) ;
attr _dev ( svg , "class" , "svg_spinner svelte-1pco739" ) ;
attr _dev ( svg , "xmlns" , "http://www.w3.org/2000/svg" ) ;
attr _dev ( svg , "xmlns:xlink" , "http://www.w3.org/1999/xlink" ) ;
attr _dev ( svg , "x" , "0px" ) ;
attr _dev ( svg , "y" , "0px" ) ;
attr _dev ( svg , "viewBox" , "0 0 80 80" ) ;
attr _dev ( svg , "xml:space" , "preserve" ) ;
add _location ( svg , file$1 , 0 , 0 , 0 ) ;
} ,
l : function claim ( nodes ) {
throw new Error ( "options.hydrate only works if the component was compiled with the `hydratable: true` option" ) ;
} ,
m : function mount ( target , anchor ) {
insert _dev ( target , svg , anchor ) ;
append _dev ( svg , path ) ;
append _dev ( path , animateTransform ) ;
} ,
p : noop ,
i : noop ,
o : noop ,
d : function destroy ( detaching ) {
if ( detaching ) detach _dev ( svg ) ;
}
} ;
dispatch _dev ( "SvelteRegisterBlock" , {
block ,
id : create _fragment$1 . name ,
type : "component" ,
source : "" ,
ctx
} ) ;
return block ;
}
function instance$1 ( $$self , $$props ) {
let { $$slots : slots = { } , $$scope } = $$props ;
validate _slots ( "Spinner" , slots , [ ] ) ;
const writable _props = [ ] ;
Object . keys ( $$props ) . forEach ( key => {
if ( ! ~ writable _props . indexOf ( key ) && key . slice ( 0 , 2 ) !== "$$" ) console . warn ( ` <Spinner> was created with unknown prop ' ${ key } ' ` ) ;
} ) ;
return [ ] ;
}
class Spinner extends SvelteComponentDev {
constructor ( options ) {
super ( options ) ;
init ( this , options , instance$1 , create _fragment$1 , safe _not _equal , { } ) ;
dispatch _dev ( "SvelteRegisterComponent" , {
component : this ,
tagName : "Spinner" ,
options ,
id : create _fragment$1 . name
} ) ;
}
}
function fade ( node , { delay = 0 , duration = 400 , easing = identity } ) {
const o = + getComputedStyle ( node ) . opacity ;
return {
delay ,
duration ,
easing ,
css : t => ` opacity: ${ t * o } `
} ;
}
/* src/util/Modal.svelte generated by Svelte v3.29.6 */
const file$2 = "src/util/Modal.svelte" ;
// (45:0) {#if visible}
function create _if _block ( ctx ) {
let div4 ;
let div3 ;
let div1 ;
let div0 ;
let t0 ;
let t1 ;
let button ;
let i ;
let t3 ;
let div2 ;
let load _modal _action ;
let load _bg _action ;
let div4 _transition ;
let current ;
let mounted ;
let dispose ;
const default _slot _template = /*#slots*/ ctx [ 11 ] . default ;
const default _slot = create _slot ( default _slot _template , ctx , /*$$scope*/ ctx [ 10 ] , null ) ;
const block = {
c : function create ( ) {
div4 = element ( "div" ) ;
div3 = element ( "div" ) ;
div1 = element ( "div" ) ;
div0 = element ( "div" ) ;
t0 = text ( /*title*/ ctx [ 0 ] ) ;
t1 = space ( ) ;
button = element ( "button" ) ;
i = element ( "i" ) ;
i . textContent = "close" ;
t3 = space ( ) ;
div2 = element ( "div" ) ;
if ( default _slot ) default _slot . c ( ) ;
attr _dev ( div0 , "class" , "title svelte-tirhyp" ) ;
add _location ( div0 , file$2 , 48 , 3 , 1188 ) ;
attr _dev ( i , "class" , "icon" ) ;
add _location ( i , file$2 , 50 , 4 , 1285 ) ;
attr _dev ( button , "class" , "button_close button_red svelte-tirhyp" ) ;
add _location ( button , file$2 , 49 , 3 , 1224 ) ;
attr _dev ( div1 , "class" , "header highlight_1 svelte-tirhyp" ) ;
add _location ( div1 , file$2 , 47 , 2 , 1152 ) ;
attr _dev ( div2 , "class" , "body svelte-tirhyp" ) ;
add _location ( div2 , file$2 , 53 , 2 , 1335 ) ;
attr _dev ( div3 , "class" , "window svelte-tirhyp" ) ;
attr _dev ( div3 , "role" , "dialog" ) ;
attr _dev ( div3 , "aria-modal" , "true" ) ;
add _location ( div3 , file$2 , 46 , 1 , 1057 ) ;
attr _dev ( div4 , "class" , "background svelte-tirhyp" ) ;
add _location ( div4 , file$2 , 45 , 0 , 969 ) ;
} ,
m : function mount ( target , anchor ) {
insert _dev ( target , div4 , anchor ) ;
append _dev ( div4 , div3 ) ;
append _dev ( div3 , div1 ) ;
append _dev ( div1 , div0 ) ;
append _dev ( div0 , t0 ) ;
append _dev ( div1 , t1 ) ;
append _dev ( div1 , button ) ;
append _dev ( button , i ) ;
append _dev ( div3 , t3 ) ;
append _dev ( div3 , div2 ) ;
if ( default _slot ) {
default _slot . m ( div2 , null ) ;
}
current = true ;
if ( ! mounted ) {
dispose = [
listen _dev ( button , "click" , /*hide*/ ctx [ 1 ] , false , false , false ) ,
action _destroyer ( load _modal _action = /*load_modal*/ ctx [ 4 ] . call ( null , div3 ) ) ,
listen _dev ( div3 , "click" , stop _propagation ( /*click_handler*/ ctx [ 12 ] ) , false , false , true ) ,
action _destroyer ( load _bg _action = /*load_bg*/ ctx [ 3 ] . call ( null , div4 ) ) ,
listen _dev ( div4 , "click" , /*hide*/ ctx [ 1 ] , false , false , false )
] ;
mounted = true ;
}
} ,
p : function update ( ctx , dirty ) {
if ( ! current || dirty & /*title*/ 1 ) set _data _dev ( t0 , /*title*/ ctx [ 0 ] ) ;
if ( default _slot ) {
if ( default _slot . p && dirty & /*$$scope*/ 1024 ) {
update _slot ( default _slot , default _slot _template , ctx , /*$$scope*/ ctx [ 10 ] , dirty , null , null ) ;
}
}
} ,
i : function intro ( local ) {
if ( current ) return ;
transition _in ( default _slot , local ) ;
add _render _callback ( ( ) => {
if ( ! div4 _transition ) div4 _transition = create _bidirectional _transition ( div4 , fade , { duration : 200 } , true ) ;
div4 _transition . run ( 1 ) ;
} ) ;
current = true ;
} ,
o : function outro ( local ) {
transition _out ( default _slot , local ) ;
if ( ! div4 _transition ) div4 _transition = create _bidirectional _transition ( div4 , fade , { duration : 200 } , false ) ;
div4 _transition . run ( 0 ) ;
current = false ;
} ,
d : function destroy ( detaching ) {
if ( detaching ) detach _dev ( div4 ) ;
if ( default _slot ) default _slot . d ( detaching ) ;
if ( detaching && div4 _transition ) div4 _transition . end ( ) ;
mounted = false ;
run _all ( dispose ) ;
}
} ;
dispatch _dev ( "SvelteRegisterBlock" , {
block ,
id : create _if _block . name ,
type : "if" ,
source : "(45:0) {#if visible}" ,
ctx
} ) ;
return block ;
}
function create _fragment$2 ( ctx ) {
let if _block _anchor ;
let current ;
let mounted ;
let dispose ;
let if _block = /*visible*/ ctx [ 2 ] && create _if _block ( ctx ) ;
const block = {
c : function create ( ) {
if ( if _block ) if _block . c ( ) ;
if _block _anchor = empty ( ) ;
} ,
l : function claim ( nodes ) {
throw new Error ( "options.hydrate only works if the component was compiled with the `hydratable: true` option" ) ;
} ,
m : function mount ( target , anchor ) {
if ( if _block ) if _block . m ( target , anchor ) ;
insert _dev ( target , if _block _anchor , anchor ) ;
current = true ;
if ( ! mounted ) {
dispose = listen _dev ( window , "keydown" , /*keydown*/ ctx [ 5 ] , false , false , false ) ;
mounted = true ;
}
} ,
p : function update ( ctx , [ dirty ] ) {
if ( /*visible*/ ctx [ 2 ] ) {
if ( if _block ) {
if _block . p ( ctx , dirty ) ;
if ( dirty & /*visible*/ 4 ) {
transition _in ( if _block , 1 ) ;
}
} else {
if _block = create _if _block ( ctx ) ;
if _block . c ( ) ;
transition _in ( if _block , 1 ) ;
if _block . m ( if _block _anchor . parentNode , if _block _anchor ) ;
}
} else if ( if _block ) {
group _outros ( ) ;
transition _out ( if _block , 1 , 1 , ( ) => {
if _block = null ;
} ) ;
check _outros ( ) ;
}
} ,
i : function intro ( local ) {
if ( current ) return ;
transition _in ( if _block ) ;
current = true ;
} ,
o : function outro ( local ) {
transition _out ( if _block ) ;
current = false ;
} ,
d : function destroy ( detaching ) {
if ( if _block ) if _block . d ( detaching ) ;
if ( detaching ) detach _dev ( if _block _anchor ) ;
mounted = false ;
dispose ( ) ;
}
} ;
dispatch _dev ( "SvelteRegisterBlock" , {
block ,
id : create _fragment$2 . name ,
type : "component" ,
source : "" ,
ctx
} ) ;
return block ;
}
let global _index = 10000 ;
function instance$2 ( $$self , $$props , $$invalidate ) {
let { $$slots : slots = { } , $$scope } = $$props ;
validate _slots ( "Modal" , slots , [ 'default' ] ) ;
let { title = "" } = $$props ;
let { width = "800px" } = $$props ;
let { height = "auto" } = $$props ;
let visible = false ;
const load _bg = background => {
background . style . zIndex = global _index . valueOf ( ) ;
global _index ++ ;
} ;
const load _modal = modal => {
modal . style . width = width ;
modal . style . height = height ;
} ;
const dispatch = createEventDispatcher ( ) ;
const show = ( ) => {
$$invalidate ( 2 , visible = true ) ;
dispatch ( "shown" ) ;
} ;
const hide = ( ) => {
$$invalidate ( 2 , visible = false ) ;
dispatch ( "hidden" ) ;
} ;
const toggle = ( ) => {
if ( visible ) {
hide ( ) ;
} else {
show ( ) ;
}
} ;
const keydown = e => {
if ( e . key === "Escape" ) {
hide ( ) ;
return ;
}
} ;
const writable _props = [ "title" , "width" , "height" ] ;
Object . keys ( $$props ) . forEach ( key => {
if ( ! ~ writable _props . indexOf ( key ) && key . slice ( 0 , 2 ) !== "$$" ) console . warn ( ` <Modal> was created with unknown prop ' ${ key } ' ` ) ;
} ) ;
function click _handler ( event ) {
bubble ( $$self , event ) ;
}
$$self . $$set = $$props => {
if ( "title" in $$props ) $$invalidate ( 0 , title = $$props . title ) ;
if ( "width" in $$props ) $$invalidate ( 6 , width = $$props . width ) ;
if ( "height" in $$props ) $$invalidate ( 7 , height = $$props . height ) ;
if ( "$$scope" in $$props ) $$invalidate ( 10 , $$scope = $$props . $$scope ) ;
} ;
$$self . $capture _state = ( ) => ( {
global _index ,
createEventDispatcher ,
fade ,
title ,
width ,
height ,
visible ,
load _bg ,
load _modal ,
dispatch ,
show ,
hide ,
toggle ,
keydown
} ) ;
$$self . $inject _state = $$props => {
if ( "title" in $$props ) $$invalidate ( 0 , title = $$props . title ) ;
if ( "width" in $$props ) $$invalidate ( 6 , width = $$props . width ) ;
if ( "height" in $$props ) $$invalidate ( 7 , height = $$props . height ) ;
if ( "visible" in $$props ) $$invalidate ( 2 , visible = $$props . visible ) ;
} ;
if ( $$props && "$$inject" in $$props ) {
$$self . $inject _state ( $$props . $$inject ) ;
}
return [
title ,
hide ,
visible ,
load _bg ,
load _modal ,
keydown ,
width ,
height ,
show ,
toggle ,
$$scope ,
slots ,
click _handler
] ;
}
class Modal extends SvelteComponentDev {
constructor ( options ) {
super ( options ) ;
init ( this , options , instance$2 , create _fragment$2 , safe _not _equal , {
title : 0 ,
width : 6 ,
height : 7 ,
show : 8 ,
hide : 1 ,
toggle : 9
} ) ;
dispatch _dev ( "SvelteRegisterComponent" , {
component : this ,
tagName : "Modal" ,
options ,
id : create _fragment$2 . name
} ) ;
}
get title ( ) {
throw new Error ( "<Modal>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'" ) ;
}
set title ( value ) {
throw new Error ( "<Modal>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'" ) ;
}
get width ( ) {
throw new Error ( "<Modal>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'" ) ;
}
set width ( value ) {
throw new Error ( "<Modal>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'" ) ;
}
get height ( ) {
throw new Error ( "<Modal>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'" ) ;
}
set height ( value ) {
throw new Error ( "<Modal>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'" ) ;
}
get show ( ) {
return this . $$ . ctx [ 8 ] ;
}
set show ( value ) {
throw new Error ( "<Modal>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'" ) ;
}
get hide ( ) {
return this . $$ . ctx [ 1 ] ;
}
set hide ( value ) {
throw new Error ( "<Modal>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'" ) ;
}
get toggle ( ) {
return this . $$ . ctx [ 9 ] ;
}
set toggle ( value ) {
throw new Error ( "<Modal>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'" ) ;
}
}
/* src/filesystem/viewers/Directory.svelte generated by Svelte v3.29.6 */
const file$3 = "src/filesystem/viewers/Directory.svelte" ;
function get _each _context ( ctx , list , i ) {
const child _ctx = ctx . slice ( ) ;
2020-11-11 23:45:52 +01:00
child _ctx [ 9 ] = list [ i ] ;
child _ctx [ 11 ] = i ;
2020-11-11 00:00:54 +01:00
return child _ctx ;
}
2020-11-11 23:45:52 +01:00
// (80:3) {#each children as child, index}
2020-11-11 00:00:54 +01:00
function create _each _block ( ctx ) {
2020-11-11 23:45:52 +01:00
let a ;
let td0 ;
2020-11-11 00:00:54 +01:00
let img ;
let img _src _value ;
let t0 ;
2020-11-11 23:45:52 +01:00
let td1 ;
let t1 _value = /*child*/ ctx [ 9 ] . name + "" ;
2020-11-11 00:00:54 +01:00
let t1 ;
let t2 ;
2020-11-11 23:45:52 +01:00
let td2 ;
let t3 _value = formatDataVolume ( /*child*/ ctx [ 9 ] . file _size , 3 ) + "" ;
let t3 ;
let t4 ;
let a _href _value ;
2020-11-11 00:00:54 +01:00
let mounted ;
let dispose ;
2020-11-11 23:45:52 +01:00
function click _handler ( ) {
return /*click_handler*/ ctx [ 6 ] ( /*child*/ ctx [ 9 ] , /*index*/ ctx [ 11 ] ) ;
}
2020-11-11 00:00:54 +01:00
const block = {
c : function create ( ) {
2020-11-11 23:45:52 +01:00
a = element ( "a" ) ;
td0 = element ( "td" ) ;
2020-11-11 00:00:54 +01:00
img = element ( "img" ) ;
t0 = space ( ) ;
2020-11-11 23:45:52 +01:00
td1 = element ( "td" ) ;
2020-11-11 00:00:54 +01:00
t1 = text ( t1 _value ) ;
t2 = space ( ) ;
2020-11-11 23:45:52 +01:00
td2 = element ( "td" ) ;
t3 = text ( t3 _value ) ;
t4 = space ( ) ;
if ( img . src !== ( img _src _value = /*node_icon*/ ctx [ 5 ] ( /*child*/ ctx [ 9 ] ) ) ) attr _dev ( img , "src" , img _src _value ) ;
attr _dev ( img , "class" , "node_icon svelte-6g6w4" ) ;
2020-11-11 00:00:54 +01:00
attr _dev ( img , "alt" , "icon" ) ;
2020-11-11 23:45:52 +01:00
add _location ( img , file$3 , 89 , 6 , 2581 ) ;
attr _dev ( td0 , "class" , "svelte-6g6w4" ) ;
add _location ( td0 , file$3 , 88 , 5 , 2570 ) ;
attr _dev ( td1 , "class" , "node_name svelte-6g6w4" ) ;
add _location ( td1 , file$3 , 91 , 5 , 2656 ) ;
attr _dev ( td2 , "class" , "node_size svelte-6g6w4" ) ;
add _location ( td2 , file$3 , 94 , 5 , 2714 ) ;
attr _dev ( a , "href" , a _href _value = /*path_base*/ ctx [ 1 ] + /*child*/ ctx [ 9 ] . path ) ;
attr _dev ( a , "class" , "node svelte-6g6w4" ) ;
toggle _class ( a , "node_selected" , /*child*/ ctx [ 9 ] . selected ) ;
add _location ( a , file$3 , 80 , 4 , 2296 ) ;
2020-11-11 00:00:54 +01:00
} ,
m : function mount ( target , anchor ) {
2020-11-11 23:45:52 +01:00
insert _dev ( target , a , anchor ) ;
append _dev ( a , td0 ) ;
append _dev ( td0 , img ) ;
append _dev ( a , t0 ) ;
append _dev ( a , td1 ) ;
append _dev ( td1 , t1 ) ;
append _dev ( a , t2 ) ;
append _dev ( a , td2 ) ;
append _dev ( td2 , t3 ) ;
append _dev ( a , t4 ) ;
2020-11-11 00:00:54 +01:00
if ( ! mounted ) {
2020-11-11 23:45:52 +01:00
dispose = listen _dev ( a , "click" , prevent _default ( click _handler ) , false , true , false ) ;
2020-11-11 00:00:54 +01:00
mounted = true ;
}
} ,
p : function update ( new _ctx , dirty ) {
ctx = new _ctx ;
2020-11-11 23:45:52 +01:00
if ( dirty & /*children*/ 4 && img . src !== ( img _src _value = /*node_icon*/ ctx [ 5 ] ( /*child*/ ctx [ 9 ] ) ) ) {
2020-11-11 00:00:54 +01:00
attr _dev ( img , "src" , img _src _value ) ;
}
2020-11-11 23:45:52 +01:00
if ( dirty & /*children*/ 4 && t1 _value !== ( t1 _value = /*child*/ ctx [ 9 ] . name + "" ) ) set _data _dev ( t1 , t1 _value ) ;
if ( dirty & /*children*/ 4 && t3 _value !== ( t3 _value = formatDataVolume ( /*child*/ ctx [ 9 ] . file _size , 3 ) + "" ) ) set _data _dev ( t3 , t3 _value ) ;
if ( dirty & /*path_base, children*/ 6 && a _href _value !== ( a _href _value = /*path_base*/ ctx [ 1 ] + /*child*/ ctx [ 9 ] . path ) ) {
attr _dev ( a , "href" , a _href _value ) ;
}
if ( dirty & /*children*/ 4 ) {
toggle _class ( a , "node_selected" , /*child*/ ctx [ 9 ] . selected ) ;
}
2020-11-11 00:00:54 +01:00
} ,
d : function destroy ( detaching ) {
2020-11-11 23:45:52 +01:00
if ( detaching ) detach _dev ( a ) ;
2020-11-11 00:00:54 +01:00
mounted = false ;
dispose ( ) ;
}
} ;
dispatch _dev ( "SvelteRegisterBlock" , {
block ,
id : create _each _block . name ,
type : "each" ,
2020-11-11 23:45:52 +01:00
source : "(80:3) {#each children as child, index}" ,
2020-11-11 00:00:54 +01:00
ctx
} ) ;
return block ;
}
function create _fragment$3 ( ctx ) {
2020-11-11 23:45:52 +01:00
let div3 ;
2020-11-11 00:00:54 +01:00
let div2 ;
2020-11-11 23:45:52 +01:00
let div1 ;
let button0 ;
let i0 ;
2020-11-11 00:00:54 +01:00
let t1 ;
2020-11-11 23:45:52 +01:00
let div0 ;
2020-11-11 00:00:54 +01:00
let t2 ;
2020-11-11 23:45:52 +01:00
let button1 ;
let i1 ;
let t4 ;
let button2 ;
let i2 ;
let t6 ;
let button3 ;
let i3 ;
let t8 ;
2020-11-11 00:00:54 +01:00
let br ;
2020-11-11 23:45:52 +01:00
let t9 ;
let table ;
let tr ;
let td0 ;
let t10 ;
let td1 ;
let t12 ;
let td2 ;
let t14 ;
2020-11-11 00:00:54 +01:00
let mounted ;
let dispose ;
2020-11-11 23:45:52 +01:00
let each _value = /*children*/ ctx [ 2 ] ;
validate _each _argument ( each _value ) ;
let each _blocks = [ ] ;
for ( let i = 0 ; i < each _value . length ; i += 1 ) {
each _blocks [ i ] = create _each _block ( get _each _context ( ctx , each _value , i ) ) ;
}
2020-11-11 00:00:54 +01:00
const block = {
c : function create ( ) {
2020-11-11 23:45:52 +01:00
div3 = element ( "div" ) ;
2020-11-11 00:00:54 +01:00
div2 = element ( "div" ) ;
2020-11-11 23:45:52 +01:00
div1 = element ( "div" ) ;
button0 = element ( "button" ) ;
i0 = element ( "i" ) ;
i0 . textContent = "arrow_back" ;
t1 = space ( ) ;
2020-11-11 00:00:54 +01:00
div0 = element ( "div" ) ;
t2 = space ( ) ;
2020-11-11 23:45:52 +01:00
button1 = element ( "button" ) ;
i1 = element ( "i" ) ;
i1 . textContent = "cloud_upload" ;
t4 = space ( ) ;
button2 = element ( "button" ) ;
i2 = element ( "i" ) ;
i2 . textContent = "create_new_folder" ;
t6 = space ( ) ;
button3 = element ( "button" ) ;
i3 = element ( "i" ) ;
i3 . textContent = "delete" ;
t8 = space ( ) ;
2020-11-11 00:00:54 +01:00
br = element ( "br" ) ;
2020-11-11 23:45:52 +01:00
t9 = space ( ) ;
table = element ( "table" ) ;
tr = element ( "tr" ) ;
td0 = element ( "td" ) ;
t10 = space ( ) ;
td1 = element ( "td" ) ;
td1 . textContent = "name" ;
t12 = space ( ) ;
td2 = element ( "td" ) ;
td2 . textContent = "size" ;
t14 = space ( ) ;
for ( let i = 0 ; i < each _blocks . length ; i += 1 ) {
each _blocks [ i ] . c ( ) ;
}
attr _dev ( i0 , "class" , "icon" ) ;
add _location ( i0 , file$3 , 64 , 75 , 1773 ) ;
attr _dev ( button0 , "class" , "svelte-6g6w4" ) ;
toggle _class ( button0 , "hidden" , /*node*/ ctx [ 0 ] . parents . length === 0 ) ;
add _location ( button0 , file$3 , 64 , 3 , 1701 ) ;
attr _dev ( div0 , "class" , "toolbar_spacer svelte-6g6w4" ) ;
add _location ( div0 , file$3 , 66 , 3 , 1834 ) ;
attr _dev ( i1 , "class" , "icon" ) ;
add _location ( i1 , file$3 , 67 , 34 , 1903 ) ;
attr _dev ( button1 , "class" , "svelte-6g6w4" ) ;
add _location ( button1 , file$3 , 67 , 3 , 1872 ) ;
attr _dev ( i2 , "class" , "icon" ) ;
add _location ( i2 , file$3 , 68 , 34 , 1979 ) ;
attr _dev ( button2 , "class" , "svelte-6g6w4" ) ;
add _location ( button2 , file$3 , 68 , 3 , 1948 ) ;
attr _dev ( i3 , "class" , "icon" ) ;
add _location ( i3 , file$3 , 69 , 34 , 2060 ) ;
attr _dev ( button3 , "class" , "svelte-6g6w4" ) ;
add _location ( button3 , file$3 , 69 , 3 , 2029 ) ;
attr _dev ( div1 , "class" , "toolbar svelte-6g6w4" ) ;
add _location ( div1 , file$3 , 62 , 2 , 1632 ) ;
add _location ( br , file$3 , 71 , 2 , 2107 ) ;
attr _dev ( td0 , "class" , "svelte-6g6w4" ) ;
add _location ( td0 , file$3 , 75 , 4 , 2201 ) ;
attr _dev ( td1 , "class" , "svelte-6g6w4" ) ;
add _location ( td1 , file$3 , 76 , 4 , 2215 ) ;
attr _dev ( td2 , "class" , "svelte-6g6w4" ) ;
add _location ( td2 , file$3 , 77 , 4 , 2233 ) ;
add _location ( tr , file$3 , 73 , 3 , 2144 ) ;
attr _dev ( table , "class" , "directory svelte-6g6w4" ) ;
add _location ( table , file$3 , 72 , 2 , 2115 ) ;
attr _dev ( div2 , "class" , "width_container svelte-6g6w4" ) ;
add _location ( div2 , file$3 , 61 , 1 , 1600 ) ;
attr _dev ( div3 , "class" , "container svelte-6g6w4" ) ;
add _location ( div3 , file$3 , 60 , 0 , 1575 ) ;
2020-11-11 00:00:54 +01:00
} ,
l : function claim ( nodes ) {
throw new Error ( "options.hydrate only works if the component was compiled with the `hydratable: true` option" ) ;
} ,
m : function mount ( target , anchor ) {
2020-11-11 23:45:52 +01:00
insert _dev ( target , div3 , anchor ) ;
append _dev ( div3 , div2 ) ;
2020-11-11 00:00:54 +01:00
append _dev ( div2 , div1 ) ;
2020-11-11 23:45:52 +01:00
append _dev ( div1 , button0 ) ;
append _dev ( button0 , i0 ) ;
append _dev ( div1 , t1 ) ;
append _dev ( div1 , div0 ) ;
append _dev ( div1 , t2 ) ;
append _dev ( div1 , button1 ) ;
append _dev ( button1 , i1 ) ;
append _dev ( div1 , t4 ) ;
append _dev ( div1 , button2 ) ;
append _dev ( button2 , i2 ) ;
append _dev ( div1 , t6 ) ;
append _dev ( div1 , button3 ) ;
append _dev ( button3 , i3 ) ;
append _dev ( div2 , t8 ) ;
append _dev ( div2 , br ) ;
append _dev ( div2 , t9 ) ;
append _dev ( div2 , table ) ;
append _dev ( table , tr ) ;
append _dev ( tr , td0 ) ;
append _dev ( tr , t10 ) ;
append _dev ( tr , td1 ) ;
append _dev ( tr , t12 ) ;
append _dev ( tr , td2 ) ;
append _dev ( table , t14 ) ;
for ( let i = 0 ; i < each _blocks . length ; i += 1 ) {
each _blocks [ i ] . m ( table , null ) ;
}
2020-11-11 00:00:54 +01:00
if ( ! mounted ) {
2020-11-11 23:45:52 +01:00
dispose = [
listen _dev ( button0 , "click" , /*navigate_up*/ ctx [ 4 ] , false , false , false ) ,
listen _dev ( button1 , "click" , /*navigate_up*/ ctx [ 4 ] , false , false , false ) ,
listen _dev ( button2 , "click" , /*navigate_up*/ ctx [ 4 ] , false , false , false ) ,
listen _dev ( button3 , "click" , /*navigate_up*/ ctx [ 4 ] , false , false , false )
] ;
2020-11-11 00:00:54 +01:00
mounted = true ;
}
} ,
p : function update ( ctx , [ dirty ] ) {
2020-11-11 23:45:52 +01:00
if ( dirty & /*node*/ 1 ) {
toggle _class ( button0 , "hidden" , /*node*/ ctx [ 0 ] . parents . length === 0 ) ;
}
2020-11-11 00:00:54 +01:00
2020-11-11 23:45:52 +01:00
if ( dirty & /*path_base, children, node_click, formatDataVolume, node_icon*/ 46 ) {
each _value = /*children*/ ctx [ 2 ] ;
validate _each _argument ( each _value ) ;
let i ;
for ( i = 0 ; i < each _value . length ; i += 1 ) {
const child _ctx = get _each _context ( ctx , each _value , i ) ;
if ( each _blocks [ i ] ) {
each _blocks [ i ] . p ( child _ctx , dirty ) ;
} else {
each _blocks [ i ] = create _each _block ( child _ctx ) ;
each _blocks [ i ] . c ( ) ;
each _blocks [ i ] . m ( table , null ) ;
}
2020-11-11 00:00:54 +01:00
}
2020-11-11 23:45:52 +01:00
for ( ; i < each _blocks . length ; i += 1 ) {
each _blocks [ i ] . d ( 1 ) ;
}
each _blocks . length = each _value . length ;
2020-11-11 00:00:54 +01:00
}
} ,
i : noop ,
o : noop ,
d : function destroy ( detaching ) {
2020-11-11 23:45:52 +01:00
if ( detaching ) detach _dev ( div3 ) ;
destroy _each ( each _blocks , detaching ) ;
2020-11-11 00:00:54 +01:00
mounted = false ;
2020-11-11 23:45:52 +01:00
run _all ( dispose ) ;
2020-11-11 00:00:54 +01:00
}
} ;
dispatch _dev ( "SvelteRegisterBlock" , {
block ,
id : create _fragment$3 . name ,
type : "component" ,
source : "" ,
ctx
} ) ;
return block ;
}
function instance$3 ( $$self , $$props , $$invalidate ) {
let { $$slots : slots = { } , $$scope } = $$props ;
validate _slots ( "Directory" , slots , [ ] ) ;
let dispatch = createEventDispatcher ( ) ;
let { node } = $$props ;
2020-11-11 23:45:52 +01:00
let { path _base } = $$props ;
let mode = "viewing" ;
const node _click = ( node , index ) => {
if ( mode === "viewing" ) {
dispatch ( "navigate" , node . path ) ;
} else if ( mode === "selecting" ) {
$$invalidate ( 2 , children [ index ] . selected = ! children [ index ] . selected , children ) ;
}
2020-11-11 00:00:54 +01:00
} ;
const navigate _up = ( ) => {
2020-11-11 23:45:52 +01:00
// Go to the path of the last parent
2020-11-11 00:00:54 +01:00
if ( node . parents . length !== 0 ) {
2020-11-11 23:45:52 +01:00
dispatch ( "navigate" , node . parents [ node . parents . length - 1 ] . path ) ;
2020-11-11 00:00:54 +01:00
}
} ;
const node _icon = node => {
if ( node . type === "dir" ) {
return "/res/img/mime/folder.png" ;
}
switch ( node . file _type ) {
case "image/gif" :
return "/res/img/mime/image-gif.png" ;
case ( "image/apng" ) :
return "/res/img/mime/image-png.png" ;
case "image/jpeg" :
return "/res/img/mime/image-jpeg.png" ;
case "application/pdf" :
return "/res/img/mime/pdf.png" ;
}
if ( node . file _type . startsWith ( "audio/" ) ) {
return "/res/img/mime/audio.png" ;
} else if ( node . file _type . startsWith ( "video/" ) ) {
return "/res/img/mime/video.png" ;
} else if ( node . file _type . startsWith ( "text/" ) ) {
return "/res/img/mime/text.png" ;
} else if ( node . file _type . startsWith ( "image/" ) ) {
return "/res/img/mime/image-png.png" ;
} else if ( node . file _type . startsWith ( "application/" ) ) {
return "/res/img/mime/archive.png" ;
}
return "/res/img/mime/empty.png" ;
} ;
2020-11-11 23:45:52 +01:00
const writable _props = [ "node" , "path_base" ] ;
2020-11-11 00:00:54 +01:00
Object . keys ( $$props ) . forEach ( key => {
if ( ! ~ writable _props . indexOf ( key ) && key . slice ( 0 , 2 ) !== "$$" ) console . warn ( ` <Directory> was created with unknown prop ' ${ key } ' ` ) ;
} ) ;
2020-11-11 23:45:52 +01:00
const click _handler = ( child , index ) => {
node _click ( child , index ) ;
} ;
2020-11-11 00:00:54 +01:00
$$self . $$set = $$props => {
if ( "node" in $$props ) $$invalidate ( 0 , node = $$props . node ) ;
2020-11-11 23:45:52 +01:00
if ( "path_base" in $$props ) $$invalidate ( 1 , path _base = $$props . path _base ) ;
2020-11-11 00:00:54 +01:00
} ;
$$self . $capture _state = ( ) => ( {
2020-11-11 23:45:52 +01:00
formatDataVolume ,
2020-11-11 00:00:54 +01:00
createEventDispatcher ,
dispatch ,
node ,
2020-11-11 23:45:52 +01:00
path _base ,
mode ,
node _click ,
2020-11-11 00:00:54 +01:00
navigate _up ,
2020-11-11 23:45:52 +01:00
node _icon ,
children
2020-11-11 00:00:54 +01:00
} ) ;
$$self . $inject _state = $$props => {
if ( "dispatch" in $$props ) dispatch = $$props . dispatch ;
if ( "node" in $$props ) $$invalidate ( 0 , node = $$props . node ) ;
2020-11-11 23:45:52 +01:00
if ( "path_base" in $$props ) $$invalidate ( 1 , path _base = $$props . path _base ) ;
if ( "mode" in $$props ) mode = $$props . mode ;
if ( "children" in $$props ) $$invalidate ( 2 , children = $$props . children ) ;
2020-11-11 00:00:54 +01:00
} ;
2020-11-11 23:45:52 +01:00
let children ;
2020-11-11 00:00:54 +01:00
if ( $$props && "$$inject" in $$props ) {
$$self . $inject _state ( $$props . $$inject ) ;
}
2020-11-11 23:45:52 +01:00
$$self . $$ . update = ( ) => {
if ( $$self . $$ . dirty & /*node*/ 1 ) {
$$invalidate ( 2 , children = node . base . children . reduce (
( accum , val ) => {
val [ "selected" ] = false ;
accum . push ( val ) ;
return accum ;
} ,
[ ]
) ) ;
}
} ;
return [ node , path _base , children , node _click , navigate _up , node _icon , click _handler ] ;
2020-11-11 00:00:54 +01:00
}
class Directory extends SvelteComponentDev {
constructor ( options ) {
super ( options ) ;
2020-11-11 23:45:52 +01:00
init ( this , options , instance$3 , create _fragment$3 , safe _not _equal , { node : 0 , path _base : 1 } ) ;
2020-11-11 00:00:54 +01:00
dispatch _dev ( "SvelteRegisterComponent" , {
component : this ,
tagName : "Directory" ,
options ,
id : create _fragment$3 . name
} ) ;
const { ctx } = this . $$ ;
const props = options . props || { } ;
if ( /*node*/ ctx [ 0 ] === undefined && ! ( "node" in props ) ) {
console . warn ( "<Directory> was created without expected prop 'node'" ) ;
}
2020-11-11 23:45:52 +01:00
if ( /*path_base*/ ctx [ 1 ] === undefined && ! ( "path_base" in props ) ) {
console . warn ( "<Directory> was created without expected prop 'path_base'" ) ;
}
2020-11-11 00:00:54 +01:00
}
get node ( ) {
throw new Error ( "<Directory>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'" ) ;
}
set node ( value ) {
throw new Error ( "<Directory>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'" ) ;
}
2020-11-11 23:45:52 +01:00
get path _base ( ) {
throw new Error ( "<Directory>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'" ) ;
}
set path _base ( value ) {
throw new Error ( "<Directory>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'" ) ;
}
}
2020-11-11 00:00:54 +01:00
2020-11-11 23:45:52 +01:00
/* src/filesystem/viewers/Audio.svelte generated by Svelte v3.29.6 */
const file$4 = "src/filesystem/viewers/Audio.svelte" ;
2020-11-11 00:00:54 +01:00
2020-11-11 23:45:52 +01:00
function create _fragment$4 ( ctx ) {
let div ;
let t0 _value = /*node*/ ctx [ 0 ] . base . name + "" ;
let t0 ;
let t1 ;
let br0 ;
let br1 ;
let t2 ;
let audio ;
let track ;
let audio _src _value ;
let mounted ;
let dispose ;
2020-11-11 00:00:54 +01:00
const block = {
c : function create ( ) {
2020-11-11 23:45:52 +01:00
div = element ( "div" ) ;
t0 = text ( t0 _value ) ;
t1 = space ( ) ;
br0 = element ( "br" ) ;
br1 = element ( "br" ) ;
t2 = space ( ) ;
audio = element ( "audio" ) ;
track = element ( "track" ) ;
add _location ( br0 , file$4 , 14 , 1 , 211 ) ;
add _location ( br1 , file$4 , 14 , 6 , 216 ) ;
attr _dev ( track , "kind" , "captions" ) ;
add _location ( track , file$4 , 21 , 2 , 389 ) ;
attr _dev ( audio , "class" , "player svelte-11r8rw7" ) ;
if ( audio . src !== ( audio _src _value = window . apiEndpoint + "/filesystem/" + /*node*/ ctx [ 0 ] . bucket . id + "/" + /*node*/ ctx [ 0 ] . base . path ) ) attr _dev ( audio , "src" , audio _src _value ) ;
audio . autoplay = "autoplay" ;
audio . controls = "controls" ;
add _location ( audio , file$4 , 15 , 1 , 223 ) ;
attr _dev ( div , "class" , "container svelte-11r8rw7" ) ;
add _location ( div , file$4 , 12 , 0 , 168 ) ;
} ,
l : function claim ( nodes ) {
throw new Error ( "options.hydrate only works if the component was compiled with the `hydratable: true` option" ) ;
2020-11-11 00:00:54 +01:00
} ,
m : function mount ( target , anchor ) {
2020-11-11 23:45:52 +01:00
insert _dev ( target , div , anchor ) ;
append _dev ( div , t0 ) ;
append _dev ( div , t1 ) ;
append _dev ( div , br0 ) ;
append _dev ( div , br1 ) ;
append _dev ( div , t2 ) ;
append _dev ( div , audio ) ;
append _dev ( audio , track ) ;
if ( ! mounted ) {
dispose = listen _dev ( audio , "ended" , /*ended*/ ctx [ 1 ] , false , false , false ) ;
mounted = true ;
}
2020-11-11 00:00:54 +01:00
} ,
2020-11-11 23:45:52 +01:00
p : function update ( ctx , [ dirty ] ) {
if ( dirty & /*node*/ 1 && t0 _value !== ( t0 _value = /*node*/ ctx [ 0 ] . base . name + "" ) ) set _data _dev ( t0 , t0 _value ) ;
if ( dirty & /*node*/ 1 && audio . src !== ( audio _src _value = window . apiEndpoint + "/filesystem/" + /*node*/ ctx [ 0 ] . bucket . id + "/" + /*node*/ ctx [ 0 ] . base . path ) ) {
attr _dev ( audio , "src" , audio _src _value ) ;
}
2020-11-11 00:00:54 +01:00
} ,
2020-11-11 23:45:52 +01:00
i : noop ,
o : noop ,
2020-11-11 00:00:54 +01:00
d : function destroy ( detaching ) {
2020-11-11 23:45:52 +01:00
if ( detaching ) detach _dev ( div ) ;
mounted = false ;
dispose ( ) ;
2020-11-11 00:00:54 +01:00
}
} ;
dispatch _dev ( "SvelteRegisterBlock" , {
block ,
2020-11-11 23:45:52 +01:00
id : create _fragment$4 . name ,
type : "component" ,
source : "" ,
2020-11-11 00:00:54 +01:00
ctx
} ) ;
return block ;
}
2020-11-11 23:45:52 +01:00
function instance$4 ( $$self , $$props , $$invalidate ) {
let { $$slots : slots = { } , $$scope } = $$props ;
validate _slots ( "Audio" , slots , [ ] ) ;
let dispatch = createEventDispatcher ( ) ;
let { node } = $$props ;
const ended = ( ) => {
dispatch ( "next" ) ;
} ;
const writable _props = [ "node" ] ;
Object . keys ( $$props ) . forEach ( key => {
if ( ! ~ writable _props . indexOf ( key ) && key . slice ( 0 , 2 ) !== "$$" ) console . warn ( ` <Audio> was created with unknown prop ' ${ key } ' ` ) ;
} ) ;
$$self . $$set = $$props => {
if ( "node" in $$props ) $$invalidate ( 0 , node = $$props . node ) ;
} ;
$$self . $capture _state = ( ) => ( {
createEventDispatcher ,
dispatch ,
node ,
ended
} ) ;
$$self . $inject _state = $$props => {
if ( "dispatch" in $$props ) dispatch = $$props . dispatch ;
if ( "node" in $$props ) $$invalidate ( 0 , node = $$props . node ) ;
} ;
if ( $$props && "$$inject" in $$props ) {
$$self . $inject _state ( $$props . $$inject ) ;
}
return [ node , ended ] ;
}
class Audio extends SvelteComponentDev {
constructor ( options ) {
super ( options ) ;
init ( this , options , instance$4 , create _fragment$4 , safe _not _equal , { node : 0 } ) ;
dispatch _dev ( "SvelteRegisterComponent" , {
component : this ,
tagName : "Audio" ,
options ,
id : create _fragment$4 . name
} ) ;
const { ctx } = this . $$ ;
const props = options . props || { } ;
if ( /*node*/ ctx [ 0 ] === undefined && ! ( "node" in props ) ) {
console . warn ( "<Audio> was created without expected prop 'node'" ) ;
}
}
get node ( ) {
throw new Error ( "<Audio>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'" ) ;
}
set node ( value ) {
throw new Error ( "<Audio>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'" ) ;
}
}
/* src/filesystem/viewers/Image.svelte generated by Svelte v3.29.6 */
const { window : window _1 } = globals ;
const file$5 = "src/filesystem/viewers/Image.svelte" ;
function create _fragment$5 ( ctx ) {
let div ;
let img ;
let img _src _value ;
let mounted ;
let dispose ;
const block = {
c : function create ( ) {
div = element ( "div" ) ;
img = element ( "img" ) ;
attr _dev ( img , "class" , "image svelte-xjzx7h" ) ;
if ( img . src !== ( img _src _value = window . apiEndpoint + "/filesystem/" + /*node*/ ctx [ 0 ] . bucket . id + "/" + /*node*/ ctx [ 0 ] . base . path ) ) attr _dev ( img , "src" , img _src _value ) ;
attr _dev ( img , "alt" , "no description available" ) ;
toggle _class ( img , "zoom" , /*zoom*/ ctx [ 2 ] ) ;
add _location ( img , file$5 , 45 , 1 , 791 ) ;
attr _dev ( div , "class" , "container svelte-xjzx7h" ) ;
toggle _class ( div , "zoom" , /*zoom*/ ctx [ 2 ] ) ;
add _location ( div , file$5 , 44 , 0 , 733 ) ;
} ,
l : function claim ( nodes ) {
throw new Error ( "options.hydrate only works if the component was compiled with the `hydratable: true` option" ) ;
} ,
m : function mount ( target , anchor ) {
insert _dev ( target , div , anchor ) ;
append _dev ( div , img ) ;
/*div_binding*/ ctx [ 8 ] ( div ) ;
if ( ! mounted ) {
dispose = [
listen _dev ( window _1 , "mousemove" , /*mousemove*/ ctx [ 4 ] , false , false , false ) ,
listen _dev ( window _1 , "mouseup" , /*mouseup*/ ctx [ 5 ] , false , false , false ) ,
listen _dev ( img , "dblclick" , /*dblclick_handler*/ ctx [ 6 ] , false , false , false ) ,
listen _dev ( img , "doubletap" , /*doubletap_handler*/ ctx [ 7 ] , false , false , false ) ,
listen _dev ( img , "mousedown" , /*mousedown*/ ctx [ 3 ] , false , false , false )
] ;
mounted = true ;
}
} ,
p : function update ( ctx , [ dirty ] ) {
if ( dirty & /*node*/ 1 && img . src !== ( img _src _value = window . apiEndpoint + "/filesystem/" + /*node*/ ctx [ 0 ] . bucket . id + "/" + /*node*/ ctx [ 0 ] . base . path ) ) {
attr _dev ( img , "src" , img _src _value ) ;
}
if ( dirty & /*zoom*/ 4 ) {
toggle _class ( img , "zoom" , /*zoom*/ ctx [ 2 ] ) ;
}
if ( dirty & /*zoom*/ 4 ) {
toggle _class ( div , "zoom" , /*zoom*/ ctx [ 2 ] ) ;
}
} ,
i : noop ,
o : noop ,
d : function destroy ( detaching ) {
if ( detaching ) detach _dev ( div ) ;
/*div_binding*/ ctx [ 8 ] ( null ) ;
mounted = false ;
run _all ( dispose ) ;
}
} ;
dispatch _dev ( "SvelteRegisterBlock" , {
block ,
id : create _fragment$5 . name ,
type : "component" ,
source : "" ,
ctx
} ) ;
return block ;
}
function instance$5 ( $$self , $$props , $$invalidate ) {
let { $$slots : slots = { } , $$scope } = $$props ;
validate _slots ( "Image" , slots , [ ] ) ;
let { node } = $$props ;
let container ;
let zoom = false ;
let x , y = 0 ;
let dragging = false ;
const mousedown = e => {
if ( ! dragging && e . which === 1 && zoom ) {
x = e . pageX ;
y = e . pageY ;
dragging = true ;
e . preventDefault ( ) ;
e . stopPropagation ( ) ;
return false ;
}
} ;
const mousemove = e => {
if ( dragging ) {
$$invalidate ( 1 , container . scrollLeft = container . scrollLeft - ( e . pageX - x ) , container ) ;
$$invalidate ( 1 , container . scrollTop = container . scrollTop - ( e . pageY - y ) , container ) ;
x = e . pageX ;
y = e . pageY ;
e . preventDefault ( ) ;
e . stopPropagation ( ) ;
return false ;
}
} ;
const mouseup = e => {
if ( dragging ) {
dragging = false ;
e . preventDefault ( ) ;
e . stopPropagation ( ) ;
return false ;
}
} ;
const writable _props = [ "node" ] ;
Object . keys ( $$props ) . forEach ( key => {
if ( ! ~ writable _props . indexOf ( key ) && key . slice ( 0 , 2 ) !== "$$" ) console . warn ( ` <Image> was created with unknown prop ' ${ key } ' ` ) ;
} ) ;
const dblclick _handler = ( ) => {
$$invalidate ( 2 , zoom = ! zoom ) ;
} ;
const doubletap _handler = ( ) => {
$$invalidate ( 2 , zoom = ! zoom ) ;
} ;
function div _binding ( $$value ) {
binding _callbacks [ $$value ? "unshift" : "push" ] ( ( ) => {
container = $$value ;
$$invalidate ( 1 , container ) ;
} ) ;
}
$$self . $$set = $$props => {
if ( "node" in $$props ) $$invalidate ( 0 , node = $$props . node ) ;
} ;
$$self . $capture _state = ( ) => ( {
node ,
container ,
zoom ,
x ,
y ,
dragging ,
mousedown ,
mousemove ,
mouseup
} ) ;
$$self . $inject _state = $$props => {
if ( "node" in $$props ) $$invalidate ( 0 , node = $$props . node ) ;
if ( "container" in $$props ) $$invalidate ( 1 , container = $$props . container ) ;
if ( "zoom" in $$props ) $$invalidate ( 2 , zoom = $$props . zoom ) ;
if ( "x" in $$props ) x = $$props . x ;
if ( "y" in $$props ) y = $$props . y ;
if ( "dragging" in $$props ) dragging = $$props . dragging ;
} ;
if ( $$props && "$$inject" in $$props ) {
$$self . $inject _state ( $$props . $$inject ) ;
}
return [
node ,
container ,
zoom ,
mousedown ,
mousemove ,
mouseup ,
dblclick _handler ,
doubletap _handler ,
div _binding
] ;
}
class Image extends SvelteComponentDev {
constructor ( options ) {
super ( options ) ;
init ( this , options , instance$5 , create _fragment$5 , safe _not _equal , { node : 0 } ) ;
dispatch _dev ( "SvelteRegisterComponent" , {
component : this ,
tagName : "Image" ,
options ,
id : create _fragment$5 . name
} ) ;
const { ctx } = this . $$ ;
const props = options . props || { } ;
if ( /*node*/ ctx [ 0 ] === undefined && ! ( "node" in props ) ) {
console . warn ( "<Image> was created without expected prop 'node'" ) ;
}
}
get node ( ) {
throw new Error ( "<Image>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'" ) ;
}
set node ( value ) {
throw new Error ( "<Image>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'" ) ;
}
}
/* src/filesystem/Filesystem.svelte generated by Svelte v3.29.6 */
const { console : console _1 , window : window _1$1 } = globals ;
const file$6 = "src/filesystem/Filesystem.svelte" ;
function get _each _context$1 ( ctx , list , i ) {
const child _ctx = ctx . slice ( ) ;
child _ctx [ 26 ] = list [ i ] ;
return child _ctx ;
}
// (98:1) {#if loading}
function create _if _block _4 ( ctx ) {
let div ;
let spinner ;
let current ;
spinner = new Spinner ( { $$inline : true } ) ;
const block = {
c : function create ( ) {
div = element ( "div" ) ;
create _component ( spinner . $$ . fragment ) ;
set _style ( div , "position" , "absolute" ) ;
set _style ( div , "right" , "0" ) ;
set _style ( div , "top" , "0" ) ;
set _style ( div , "height" , "48px" ) ;
set _style ( div , "width" , "48px" ) ;
set _style ( div , "z-index" , "100" ) ;
add _location ( div , file$6 , 98 , 1 , 2242 ) ;
} ,
m : function mount ( target , anchor ) {
insert _dev ( target , div , anchor ) ;
mount _component ( spinner , div , null ) ;
current = true ;
} ,
i : function intro ( local ) {
if ( current ) return ;
transition _in ( spinner . $$ . fragment , local ) ;
current = true ;
} ,
o : function outro ( local ) {
transition _out ( spinner . $$ . fragment , local ) ;
current = false ;
} ,
d : function destroy ( detaching ) {
if ( detaching ) detach _dev ( div ) ;
destroy _component ( spinner ) ;
}
} ;
dispatch _dev ( "SvelteRegisterBlock" , {
block ,
id : create _if _block _4 . name ,
type : "if" ,
source : "(98:1) {#if loading}" ,
ctx
} ) ;
return block ;
}
// (110:3) {#each currentNode.parents as parent}
function create _each _block$1 ( ctx ) {
let div ;
let t0 _value = /*parent*/ ctx [ 26 ] . name + "" ;
let t0 ;
let t1 ;
let mounted ;
let dispose ;
function click _handler ( ) {
return /*click_handler*/ ctx [ 15 ] ( /*parent*/ ctx [ 26 ] ) ;
}
const block = {
c : function create ( ) {
div = element ( "div" ) ;
t0 = text ( t0 _value ) ;
t1 = text ( " /" ) ;
attr _dev ( div , "class" , "breadcrumb breadcrumb_button svelte-15t34ei" ) ;
add _location ( div , file$6 , 110 , 3 , 2768 ) ;
} ,
m : function mount ( target , anchor ) {
insert _dev ( target , div , anchor ) ;
append _dev ( div , t0 ) ;
insert _dev ( target , t1 , anchor ) ;
if ( ! mounted ) {
dispose = listen _dev ( div , "click" , click _handler , false , false , false ) ;
mounted = true ;
}
} ,
p : function update ( new _ctx , dirty ) {
ctx = new _ctx ;
if ( dirty & /*currentNode*/ 64 && t0 _value !== ( t0 _value = /*parent*/ ctx [ 26 ] . name + "" ) ) set _data _dev ( t0 , t0 _value ) ;
} ,
d : function destroy ( detaching ) {
if ( detaching ) detach _dev ( div ) ;
if ( detaching ) detach _dev ( t1 ) ;
mounted = false ;
dispose ( ) ;
}
} ;
dispatch _dev ( "SvelteRegisterBlock" , {
block ,
id : create _each _block$1 . name ,
type : "each" ,
source : "(110:3) {#each currentNode.parents as parent}" ,
ctx
} ) ;
return block ;
}
// (148:37)
function create _if _block _3 ( ctx ) {
let image ;
let current ;
let image _props = { node : /*currentNode*/ ctx [ 6 ] } ;
image = new Image ( { props : image _props , $$inline : true } ) ;
/*image_binding*/ ctx [ 21 ] ( image ) ;
const block = {
c : function create ( ) {
create _component ( image . $$ . fragment ) ;
} ,
m : function mount ( target , anchor ) {
mount _component ( image , target , anchor ) ;
current = true ;
} ,
p : function update ( ctx , dirty ) {
const image _changes = { } ;
if ( dirty & /*currentNode*/ 64 ) image _changes . node = /*currentNode*/ ctx [ 6 ] ;
image . $set ( image _changes ) ;
} ,
i : function intro ( local ) {
if ( current ) return ;
transition _in ( image . $$ . fragment , local ) ;
current = true ;
} ,
o : function outro ( local ) {
transition _out ( image . $$ . fragment , local ) ;
current = false ;
} ,
d : function destroy ( detaching ) {
/*image_binding*/ ctx [ 21 ] ( null ) ;
destroy _component ( image , detaching ) ;
}
} ;
dispatch _dev ( "SvelteRegisterBlock" , {
block ,
id : create _if _block _3 . name ,
type : "if" ,
source : "(148:37) " ,
ctx
} ) ;
return block ;
}
// (146:37)
2020-11-11 00:00:54 +01:00
function create _if _block _2 ( ctx ) {
2020-11-11 23:45:52 +01:00
let audio ;
2020-11-11 00:00:54 +01:00
let current ;
2020-11-11 23:45:52 +01:00
let audio _props = { node : /*currentNode*/ ctx [ 6 ] } ;
audio = new Audio ( { props : audio _props , $$inline : true } ) ;
/*audio_binding*/ ctx [ 20 ] ( audio ) ;
2020-11-11 00:00:54 +01:00
const block = {
c : function create ( ) {
2020-11-11 23:45:52 +01:00
create _component ( audio . $$ . fragment ) ;
2020-11-11 00:00:54 +01:00
} ,
m : function mount ( target , anchor ) {
2020-11-11 23:45:52 +01:00
mount _component ( audio , target , anchor ) ;
2020-11-11 00:00:54 +01:00
current = true ;
} ,
p : function update ( ctx , dirty ) {
2020-11-11 23:45:52 +01:00
const audio _changes = { } ;
if ( dirty & /*currentNode*/ 64 ) audio _changes . node = /*currentNode*/ ctx [ 6 ] ;
audio . $set ( audio _changes ) ;
2020-11-11 00:00:54 +01:00
} ,
i : function intro ( local ) {
if ( current ) return ;
2020-11-11 23:45:52 +01:00
transition _in ( audio . $$ . fragment , local ) ;
2020-11-11 00:00:54 +01:00
current = true ;
} ,
o : function outro ( local ) {
2020-11-11 23:45:52 +01:00
transition _out ( audio . $$ . fragment , local ) ;
2020-11-11 00:00:54 +01:00
current = false ;
} ,
d : function destroy ( detaching ) {
2020-11-11 23:45:52 +01:00
/*audio_binding*/ ctx [ 20 ] ( null ) ;
destroy _component ( audio , detaching ) ;
2020-11-11 00:00:54 +01:00
}
} ;
dispatch _dev ( "SvelteRegisterBlock" , {
block ,
id : create _if _block _2 . name ,
type : "if" ,
2020-11-11 23:45:52 +01:00
source : "(146:37) " ,
2020-11-11 00:00:54 +01:00
ctx
} ) ;
return block ;
}
2020-11-11 23:45:52 +01:00
// (144:3) {#if viewer_type === "dir"}
2020-11-11 00:00:54 +01:00
function create _if _block _1 ( ctx ) {
2020-11-11 23:45:52 +01:00
let directory ;
2020-11-11 00:00:54 +01:00
let current ;
2020-11-11 23:45:52 +01:00
let directory _props = {
node : /*currentNode*/ ctx [ 6 ] ,
path _base : /*path_base*/ ctx [ 12 ]
} ;
directory = new Directory ( { props : directory _props , $$inline : true } ) ;
/*directory_binding*/ ctx [ 18 ] ( directory ) ;
directory . $on ( "navigate" , /*navigate_handler*/ ctx [ 19 ] ) ;
2020-11-11 00:00:54 +01:00
const block = {
c : function create ( ) {
2020-11-11 23:45:52 +01:00
create _component ( directory . $$ . fragment ) ;
2020-11-11 00:00:54 +01:00
} ,
m : function mount ( target , anchor ) {
2020-11-11 23:45:52 +01:00
mount _component ( directory , target , anchor ) ;
2020-11-11 00:00:54 +01:00
current = true ;
} ,
2020-11-11 23:45:52 +01:00
p : function update ( ctx , dirty ) {
const directory _changes = { } ;
if ( dirty & /*currentNode*/ 64 ) directory _changes . node = /*currentNode*/ ctx [ 6 ] ;
directory . $set ( directory _changes ) ;
} ,
2020-11-11 00:00:54 +01:00
i : function intro ( local ) {
if ( current ) return ;
2020-11-11 23:45:52 +01:00
transition _in ( directory . $$ . fragment , local ) ;
2020-11-11 00:00:54 +01:00
current = true ;
} ,
o : function outro ( local ) {
2020-11-11 23:45:52 +01:00
transition _out ( directory . $$ . fragment , local ) ;
2020-11-11 00:00:54 +01:00
current = false ;
} ,
d : function destroy ( detaching ) {
2020-11-11 23:45:52 +01:00
/*directory_binding*/ ctx [ 18 ] ( null ) ;
destroy _component ( directory , detaching ) ;
2020-11-11 00:00:54 +01:00
}
} ;
dispatch _dev ( "SvelteRegisterBlock" , {
block ,
id : create _if _block _1 . name ,
type : "if" ,
2020-11-11 23:45:52 +01:00
source : "(144:3) {#if viewer_type === \\\"dir\\\"}" ,
2020-11-11 00:00:54 +01:00
ctx
} ) ;
return block ;
}
2020-11-11 23:45:52 +01:00
// (165:3) {#if currentNode.base.type === "file"}
function create _if _block$1 ( ctx ) {
2020-11-11 00:00:54 +01:00
let tr0 ;
let td0 ;
let td1 ;
2020-11-11 23:45:52 +01:00
let t1 _value = /*currentNode*/ ctx [ 6 ] . base . file _type + "" ;
2020-11-11 00:00:54 +01:00
let t1 ;
let t2 ;
let tr1 ;
let td2 ;
let td3 ;
2020-11-11 23:45:52 +01:00
let t4 _value = formatDataVolume ( /*currentNode*/ ctx [ 6 ] . base . file _size ) + "" ;
2020-11-11 00:00:54 +01:00
let t4 ;
const block = {
c : function create ( ) {
tr0 = element ( "tr" ) ;
td0 = element ( "td" ) ;
td0 . textContent = "File type" ;
td1 = element ( "td" ) ;
t1 = text ( t1 _value ) ;
t2 = space ( ) ;
tr1 = element ( "tr" ) ;
td2 = element ( "td" ) ;
td2 . textContent = "File size" ;
td3 = element ( "td" ) ;
t4 = text ( t4 _value ) ;
2020-11-11 23:45:52 +01:00
add _location ( td0 , file$6 , 165 , 7 , 5424 ) ;
add _location ( td1 , file$6 , 165 , 25 , 5442 ) ;
add _location ( tr0 , file$6 , 165 , 3 , 5420 ) ;
add _location ( td2 , file$6 , 166 , 7 , 5492 ) ;
add _location ( td3 , file$6 , 166 , 25 , 5510 ) ;
add _location ( tr1 , file$6 , 166 , 3 , 5488 ) ;
2020-11-11 00:00:54 +01:00
} ,
m : function mount ( target , anchor ) {
insert _dev ( target , tr0 , anchor ) ;
append _dev ( tr0 , td0 ) ;
append _dev ( tr0 , td1 ) ;
append _dev ( td1 , t1 ) ;
insert _dev ( target , t2 , anchor ) ;
insert _dev ( target , tr1 , anchor ) ;
append _dev ( tr1 , td2 ) ;
append _dev ( tr1 , td3 ) ;
append _dev ( td3 , t4 ) ;
} ,
p : function update ( ctx , dirty ) {
2020-11-11 23:45:52 +01:00
if ( dirty & /*currentNode*/ 64 && t1 _value !== ( t1 _value = /*currentNode*/ ctx [ 6 ] . base . file _type + "" ) ) set _data _dev ( t1 , t1 _value ) ;
if ( dirty & /*currentNode*/ 64 && t4 _value !== ( t4 _value = formatDataVolume ( /*currentNode*/ ctx [ 6 ] . base . file _size ) + "" ) ) set _data _dev ( t4 , t4 _value ) ;
2020-11-11 00:00:54 +01:00
} ,
d : function destroy ( detaching ) {
if ( detaching ) detach _dev ( tr0 ) ;
if ( detaching ) detach _dev ( t2 ) ;
if ( detaching ) detach _dev ( tr1 ) ;
}
} ;
dispatch _dev ( "SvelteRegisterBlock" , {
block ,
2020-11-11 23:45:52 +01:00
id : create _if _block$1 . name ,
2020-11-11 00:00:54 +01:00
type : "if" ,
2020-11-11 23:45:52 +01:00
source : "(165:3) {#if currentNode.base.type === \\\"file\\\"}" ,
2020-11-11 00:00:54 +01:00
ctx
} ) ;
return block ;
}
2020-11-11 23:45:52 +01:00
// (157:1) <Modal bind:this={details} title="Details" width="600px">
2020-11-11 00:00:54 +01:00
function create _default _slot ( ctx ) {
let table ;
let tr0 ;
let td0 ;
let h30 ;
let t1 ;
let tr1 ;
let td1 ;
let td2 ;
2020-11-11 23:45:52 +01:00
let t3 _value = /*currentNode*/ ctx [ 6 ] . base . name + "" ;
2020-11-11 00:00:54 +01:00
let t3 ;
let t4 ;
let tr2 ;
let td3 ;
let td4 ;
2020-11-11 23:45:52 +01:00
let t6 _value = /*currentNode*/ ctx [ 6 ] . base . path + "" ;
2020-11-11 00:00:54 +01:00
let t6 ;
let t7 ;
let tr3 ;
let td5 ;
let td6 ;
2020-11-11 23:45:52 +01:00
let t9 _value = /*currentNode*/ ctx [ 6 ] . base . type + "" ;
2020-11-11 00:00:54 +01:00
let t9 ;
let t10 ;
let tr4 ;
let td7 ;
let td8 ;
2020-11-11 23:45:52 +01:00
let t12 _value = formatDate ( /*currentNode*/ ctx [ 6 ] . base . date _created , true , true , true ) + "" ;
2020-11-11 00:00:54 +01:00
let t12 ;
let t13 ;
let tr5 ;
let td9 ;
let td10 ;
2020-11-11 23:45:52 +01:00
let t15 _value = formatDate ( /*currentNode*/ ctx [ 6 ] . base . date _modified , true , true , true ) + "" ;
2020-11-11 00:00:54 +01:00
let t15 ;
let t16 ;
let t17 ;
let tr6 ;
let td11 ;
let h31 ;
let t19 ;
let tr7 ;
let td12 ;
let td13 ;
2020-11-11 23:45:52 +01:00
let t21 _value = /*currentNode*/ ctx [ 6 ] . bucket . id + "" ;
2020-11-11 00:00:54 +01:00
let t21 ;
let t22 ;
let tr8 ;
let td14 ;
let td15 ;
2020-11-11 23:45:52 +01:00
let t24 _value = /*currentNode*/ ctx [ 6 ] . bucket . name + "" ;
2020-11-11 00:00:54 +01:00
let t24 ;
let t25 ;
let tr9 ;
let td16 ;
let td17 ;
2020-11-11 23:45:52 +01:00
let t27 _value = formatDate ( /*currentNode*/ ctx [ 6 ] . bucket . date _created , true , true , true ) + "" ;
2020-11-11 00:00:54 +01:00
let t27 ;
let t28 ;
let tr10 ;
let td18 ;
let td19 ;
2020-11-11 23:45:52 +01:00
let t30 _value = formatDate ( /*currentNode*/ ctx [ 6 ] . bucket . date _modified , true , true , true ) + "" ;
2020-11-11 00:00:54 +01:00
let t30 ;
2020-11-11 23:45:52 +01:00
let if _block = /*currentNode*/ ctx [ 6 ] . base . type === "file" && create _if _block$1 ( ctx ) ;
2020-11-11 00:00:54 +01:00
const block = {
c : function create ( ) {
table = element ( "table" ) ;
tr0 = element ( "tr" ) ;
td0 = element ( "td" ) ;
h30 = element ( "h3" ) ;
h30 . textContent = "Node details" ;
t1 = space ( ) ;
tr1 = element ( "tr" ) ;
td1 = element ( "td" ) ;
td1 . textContent = "Name" ;
td2 = element ( "td" ) ;
t3 = text ( t3 _value ) ;
t4 = space ( ) ;
tr2 = element ( "tr" ) ;
td3 = element ( "td" ) ;
td3 . textContent = "Path" ;
td4 = element ( "td" ) ;
t6 = text ( t6 _value ) ;
t7 = space ( ) ;
tr3 = element ( "tr" ) ;
td5 = element ( "td" ) ;
td5 . textContent = "Type" ;
td6 = element ( "td" ) ;
t9 = text ( t9 _value ) ;
t10 = space ( ) ;
tr4 = element ( "tr" ) ;
td7 = element ( "td" ) ;
td7 . textContent = "Date created" ;
td8 = element ( "td" ) ;
t12 = text ( t12 _value ) ;
t13 = space ( ) ;
tr5 = element ( "tr" ) ;
td9 = element ( "td" ) ;
td9 . textContent = "Date modified" ;
td10 = element ( "td" ) ;
t15 = text ( t15 _value ) ;
t16 = space ( ) ;
if ( if _block ) if _block . c ( ) ;
t17 = space ( ) ;
tr6 = element ( "tr" ) ;
td11 = element ( "td" ) ;
h31 = element ( "h3" ) ;
h31 . textContent = "Bucket details" ;
t19 = space ( ) ;
tr7 = element ( "tr" ) ;
td12 = element ( "td" ) ;
td12 . textContent = "ID" ;
td13 = element ( "td" ) ;
t21 = text ( t21 _value ) ;
t22 = space ( ) ;
tr8 = element ( "tr" ) ;
td14 = element ( "td" ) ;
td14 . textContent = "Name" ;
td15 = element ( "td" ) ;
t24 = text ( t24 _value ) ;
t25 = space ( ) ;
tr9 = element ( "tr" ) ;
td16 = element ( "td" ) ;
td16 . textContent = "Date created" ;
td17 = element ( "td" ) ;
t27 = text ( t27 _value ) ;
t28 = space ( ) ;
tr10 = element ( "tr" ) ;
td18 = element ( "td" ) ;
td18 . textContent = "Date modified" ;
td19 = element ( "td" ) ;
t30 = text ( t30 _value ) ;
2020-11-11 23:45:52 +01:00
add _location ( h30 , file$6 , 158 , 23 , 4959 ) ;
2020-11-11 00:00:54 +01:00
attr _dev ( td0 , "colspan" , "2" ) ;
2020-11-11 23:45:52 +01:00
add _location ( td0 , file$6 , 158 , 7 , 4943 ) ;
add _location ( tr0 , file$6 , 158 , 3 , 4939 ) ;
add _location ( td1 , file$6 , 159 , 7 , 4998 ) ;
add _location ( td2 , file$6 , 159 , 20 , 5011 ) ;
add _location ( tr1 , file$6 , 159 , 3 , 4994 ) ;
add _location ( td3 , file$6 , 160 , 7 , 5056 ) ;
add _location ( td4 , file$6 , 160 , 20 , 5069 ) ;
add _location ( tr2 , file$6 , 160 , 3 , 5052 ) ;
add _location ( td5 , file$6 , 161 , 7 , 5114 ) ;
add _location ( td6 , file$6 , 161 , 20 , 5127 ) ;
add _location ( tr3 , file$6 , 161 , 3 , 5110 ) ;
add _location ( td7 , file$6 , 162 , 7 , 5172 ) ;
add _location ( td8 , file$6 , 162 , 28 , 5193 ) ;
add _location ( tr4 , file$6 , 162 , 3 , 5168 ) ;
add _location ( td9 , file$6 , 163 , 7 , 5276 ) ;
add _location ( td10 , file$6 , 163 , 29 , 5298 ) ;
add _location ( tr5 , file$6 , 163 , 3 , 5272 ) ;
add _location ( h31 , file$6 , 168 , 23 , 5603 ) ;
2020-11-11 00:00:54 +01:00
attr _dev ( td11 , "colspan" , "2" ) ;
2020-11-11 23:45:52 +01:00
add _location ( td11 , file$6 , 168 , 7 , 5587 ) ;
add _location ( tr6 , file$6 , 168 , 3 , 5583 ) ;
add _location ( td12 , file$6 , 169 , 7 , 5644 ) ;
add _location ( td13 , file$6 , 169 , 18 , 5655 ) ;
add _location ( tr7 , file$6 , 169 , 3 , 5640 ) ;
add _location ( td14 , file$6 , 170 , 7 , 5700 ) ;
add _location ( td15 , file$6 , 170 , 20 , 5713 ) ;
add _location ( tr8 , file$6 , 170 , 3 , 5696 ) ;
add _location ( td16 , file$6 , 171 , 7 , 5760 ) ;
add _location ( td17 , file$6 , 171 , 28 , 5781 ) ;
add _location ( tr9 , file$6 , 171 , 3 , 5756 ) ;
add _location ( td18 , file$6 , 172 , 7 , 5866 ) ;
add _location ( td19 , file$6 , 172 , 29 , 5888 ) ;
add _location ( tr10 , file$6 , 172 , 3 , 5862 ) ;
2020-11-11 00:00:54 +01:00
set _style ( table , "min-width" , "100%" ) ;
2020-11-11 23:45:52 +01:00
add _location ( table , file$6 , 157 , 2 , 4903 ) ;
2020-11-11 00:00:54 +01:00
} ,
m : function mount ( target , anchor ) {
insert _dev ( target , table , anchor ) ;
append _dev ( table , tr0 ) ;
append _dev ( tr0 , td0 ) ;
append _dev ( td0 , h30 ) ;
append _dev ( table , t1 ) ;
append _dev ( table , tr1 ) ;
append _dev ( tr1 , td1 ) ;
append _dev ( tr1 , td2 ) ;
append _dev ( td2 , t3 ) ;
append _dev ( table , t4 ) ;
append _dev ( table , tr2 ) ;
append _dev ( tr2 , td3 ) ;
append _dev ( tr2 , td4 ) ;
append _dev ( td4 , t6 ) ;
append _dev ( table , t7 ) ;
append _dev ( table , tr3 ) ;
append _dev ( tr3 , td5 ) ;
append _dev ( tr3 , td6 ) ;
append _dev ( td6 , t9 ) ;
append _dev ( table , t10 ) ;
append _dev ( table , tr4 ) ;
append _dev ( tr4 , td7 ) ;
append _dev ( tr4 , td8 ) ;
append _dev ( td8 , t12 ) ;
append _dev ( table , t13 ) ;
append _dev ( table , tr5 ) ;
append _dev ( tr5 , td9 ) ;
append _dev ( tr5 , td10 ) ;
append _dev ( td10 , t15 ) ;
append _dev ( table , t16 ) ;
if ( if _block ) if _block . m ( table , null ) ;
append _dev ( table , t17 ) ;
append _dev ( table , tr6 ) ;
append _dev ( tr6 , td11 ) ;
append _dev ( td11 , h31 ) ;
append _dev ( table , t19 ) ;
append _dev ( table , tr7 ) ;
append _dev ( tr7 , td12 ) ;
append _dev ( tr7 , td13 ) ;
append _dev ( td13 , t21 ) ;
append _dev ( table , t22 ) ;
append _dev ( table , tr8 ) ;
append _dev ( tr8 , td14 ) ;
append _dev ( tr8 , td15 ) ;
append _dev ( td15 , t24 ) ;
append _dev ( table , t25 ) ;
append _dev ( table , tr9 ) ;
append _dev ( tr9 , td16 ) ;
append _dev ( tr9 , td17 ) ;
append _dev ( td17 , t27 ) ;
append _dev ( table , t28 ) ;
append _dev ( table , tr10 ) ;
append _dev ( tr10 , td18 ) ;
append _dev ( tr10 , td19 ) ;
append _dev ( td19 , t30 ) ;
} ,
p : function update ( ctx , dirty ) {
2020-11-11 23:45:52 +01:00
if ( dirty & /*currentNode*/ 64 && t3 _value !== ( t3 _value = /*currentNode*/ ctx [ 6 ] . base . name + "" ) ) set _data _dev ( t3 , t3 _value ) ;
if ( dirty & /*currentNode*/ 64 && t6 _value !== ( t6 _value = /*currentNode*/ ctx [ 6 ] . base . path + "" ) ) set _data _dev ( t6 , t6 _value ) ;
if ( dirty & /*currentNode*/ 64 && t9 _value !== ( t9 _value = /*currentNode*/ ctx [ 6 ] . base . type + "" ) ) set _data _dev ( t9 , t9 _value ) ;
if ( dirty & /*currentNode*/ 64 && t12 _value !== ( t12 _value = formatDate ( /*currentNode*/ ctx [ 6 ] . base . date _created , true , true , true ) + "" ) ) set _data _dev ( t12 , t12 _value ) ;
if ( dirty & /*currentNode*/ 64 && t15 _value !== ( t15 _value = formatDate ( /*currentNode*/ ctx [ 6 ] . base . date _modified , true , true , true ) + "" ) ) set _data _dev ( t15 , t15 _value ) ;
2020-11-11 00:00:54 +01:00
2020-11-11 23:45:52 +01:00
if ( /*currentNode*/ ctx [ 6 ] . base . type === "file" ) {
2020-11-11 00:00:54 +01:00
if ( if _block ) {
if _block . p ( ctx , dirty ) ;
} else {
2020-11-11 23:45:52 +01:00
if _block = create _if _block$1 ( ctx ) ;
2020-11-11 00:00:54 +01:00
if _block . c ( ) ;
if _block . m ( table , t17 ) ;
}
} else if ( if _block ) {
if _block . d ( 1 ) ;
if _block = null ;
}
2020-11-11 23:45:52 +01:00
if ( dirty & /*currentNode*/ 64 && t21 _value !== ( t21 _value = /*currentNode*/ ctx [ 6 ] . bucket . id + "" ) ) set _data _dev ( t21 , t21 _value ) ;
if ( dirty & /*currentNode*/ 64 && t24 _value !== ( t24 _value = /*currentNode*/ ctx [ 6 ] . bucket . name + "" ) ) set _data _dev ( t24 , t24 _value ) ;
if ( dirty & /*currentNode*/ 64 && t27 _value !== ( t27 _value = formatDate ( /*currentNode*/ ctx [ 6 ] . bucket . date _created , true , true , true ) + "" ) ) set _data _dev ( t27 , t27 _value ) ;
if ( dirty & /*currentNode*/ 64 && t30 _value !== ( t30 _value = formatDate ( /*currentNode*/ ctx [ 6 ] . bucket . date _modified , true , true , true ) + "" ) ) set _data _dev ( t30 , t30 _value ) ;
2020-11-11 00:00:54 +01:00
} ,
d : function destroy ( detaching ) {
if ( detaching ) detach _dev ( table ) ;
if ( if _block ) if _block . d ( ) ;
}
} ;
dispatch _dev ( "SvelteRegisterBlock" , {
block ,
id : create _default _slot . name ,
type : "slot" ,
2020-11-11 23:45:52 +01:00
source : "(157:1) <Modal bind:this={details} title=\\\"Details\\\" width=\\\"600px\\\">" ,
2020-11-11 00:00:54 +01:00
ctx
} ) ;
return block ;
}
2020-11-11 23:45:52 +01:00
function create _fragment$6 ( ctx ) {
let div11 ;
let t0 ;
2020-11-11 00:00:54 +01:00
let div2 ;
let button0 ;
let i0 ;
2020-11-11 23:45:52 +01:00
let t2 ;
2020-11-11 00:00:54 +01:00
let a ;
let i1 ;
let t4 ;
2020-11-11 23:45:52 +01:00
let div1 ;
2020-11-11 00:00:54 +01:00
let t5 ;
2020-11-11 23:45:52 +01:00
let div0 ;
let t6 _value = /*currentNode*/ ctx [ 6 ] . base . name + "" ;
2020-11-11 00:00:54 +01:00
let t6 ;
let t7 ;
2020-11-11 23:45:52 +01:00
let div3 ;
let t8 ;
2020-11-11 00:00:54 +01:00
let div10 ;
2020-11-11 23:45:52 +01:00
let div8 ;
let div7 ;
let div6 ;
2020-11-11 00:00:54 +01:00
let div4 ;
let t10 ;
2020-11-11 23:45:52 +01:00
let div5 ;
let t11 _value = formatDataVolume ( /*currentNode*/ ctx [ 6 ] . base . file _size , 3 ) + "" ;
2020-11-11 00:00:54 +01:00
let t11 ;
2020-11-11 23:45:52 +01:00
let t12 ;
2020-11-11 00:00:54 +01:00
let button1 ;
let i2 ;
2020-11-11 23:45:52 +01:00
let t14 ;
let t15 ;
2020-11-11 00:00:54 +01:00
let button2 ;
let i3 ;
2020-11-11 23:45:52 +01:00
let t17 ;
let t18 ;
2020-11-11 00:00:54 +01:00
let button3 ;
let i4 ;
2020-11-11 23:45:52 +01:00
let t20 ;
2020-11-11 00:00:54 +01:00
let u0 ;
2020-11-11 23:45:52 +01:00
let t22 ;
let t23 ;
2020-11-11 00:00:54 +01:00
let button4 ;
let i5 ;
2020-11-11 23:45:52 +01:00
let t25 ;
let t26 ;
2020-11-11 00:00:54 +01:00
let button5 ;
let i6 ;
2020-11-11 23:45:52 +01:00
let t28 ;
2020-11-11 00:00:54 +01:00
let u1 ;
2020-11-11 23:45:52 +01:00
let t30 ;
let t31 ;
2020-11-11 00:00:54 +01:00
let button6 ;
let i7 ;
2020-11-11 23:45:52 +01:00
let t33 ;
2020-11-11 00:00:54 +01:00
let u2 ;
2020-11-11 23:45:52 +01:00
let t35 ;
let t36 ;
2020-11-11 00:00:54 +01:00
let sharebar _1 ;
2020-11-11 23:45:52 +01:00
let t37 ;
let div9 ;
2020-11-11 00:00:54 +01:00
let current _block _type _index ;
let if _block1 ;
2020-11-11 23:45:52 +01:00
let t38 ;
2020-11-11 00:00:54 +01:00
let iframe ;
2020-11-11 23:45:52 +01:00
let t39 ;
2020-11-11 00:00:54 +01:00
let modal ;
let current ;
let mounted ;
let dispose ;
2020-11-11 23:45:52 +01:00
let if _block0 = /*loading*/ ctx [ 7 ] && create _if _block _4 ( ctx ) ;
let each _value = /*currentNode*/ ctx [ 6 ] . parents ;
validate _each _argument ( each _value ) ;
let each _blocks = [ ] ;
for ( let i = 0 ; i < each _value . length ; i += 1 ) {
each _blocks [ i ] = create _each _block$1 ( get _each _context$1 ( ctx , each _value , i ) ) ;
}
2020-11-11 00:00:54 +01:00
let sharebar _1 _props = { } ;
sharebar _1 = new Sharebar ( { props : sharebar _1 _props , $$inline : true } ) ;
/*sharebar_1_binding*/ ctx [ 17 ] ( sharebar _1 ) ;
2020-11-11 23:45:52 +01:00
const if _block _creators = [ create _if _block _1 , create _if _block _2 , create _if _block _3 ] ;
2020-11-11 00:00:54 +01:00
const if _blocks = [ ] ;
function select _block _type ( ctx , dirty ) {
2020-11-11 23:45:52 +01:00
if ( /*viewer_type*/ ctx [ 8 ] === "dir" ) return 0 ;
if ( /*viewer_type*/ ctx [ 8 ] === "audio" ) return 1 ;
if ( /*viewer_type*/ ctx [ 8 ] === "image" ) return 2 ;
2020-11-11 00:00:54 +01:00
return - 1 ;
}
if ( ~ ( current _block _type _index = select _block _type ( ctx ) ) ) {
if _block1 = if _blocks [ current _block _type _index ] = if _block _creators [ current _block _type _index ] ( ctx ) ;
}
let modal _props = {
title : "Details" ,
width : "600px" ,
$$slots : { default : [ create _default _slot ] } ,
$$scope : { ctx }
} ;
modal = new Modal ( { props : modal _props , $$inline : true } ) ;
2020-11-11 23:45:52 +01:00
/*modal_binding*/ ctx [ 23 ] ( modal ) ;
2020-11-11 00:00:54 +01:00
const block = {
c : function create ( ) {
2020-11-11 23:45:52 +01:00
div11 = element ( "div" ) ;
if ( if _block0 ) if _block0 . c ( ) ;
t0 = space ( ) ;
2020-11-11 00:00:54 +01:00
div2 = element ( "div" ) ;
button0 = element ( "button" ) ;
i0 = element ( "i" ) ;
i0 . textContent = "menu" ;
2020-11-11 23:45:52 +01:00
t2 = space ( ) ;
2020-11-11 00:00:54 +01:00
a = element ( "a" ) ;
i1 = element ( "i" ) ;
i1 . textContent = "home" ;
2020-11-11 23:45:52 +01:00
t4 = space ( ) ;
2020-11-11 00:00:54 +01:00
div1 = element ( "div" ) ;
2020-11-11 23:45:52 +01:00
for ( let i = 0 ; i < each _blocks . length ; i += 1 ) {
each _blocks [ i ] . c ( ) ;
}
t5 = space ( ) ;
2020-11-11 00:00:54 +01:00
div0 = element ( "div" ) ;
2020-11-11 23:45:52 +01:00
t6 = text ( t6 _value ) ;
2020-11-11 00:00:54 +01:00
t7 = space ( ) ;
2020-11-11 23:45:52 +01:00
div3 = element ( "div" ) ;
t8 = space ( ) ;
2020-11-11 00:00:54 +01:00
div10 = element ( "div" ) ;
2020-11-11 23:45:52 +01:00
div8 = element ( "div" ) ;
div7 = element ( "div" ) ;
div6 = element ( "div" ) ;
2020-11-11 00:00:54 +01:00
div4 = element ( "div" ) ;
2020-11-11 23:45:52 +01:00
div4 . textContent = "Size" ;
t10 = space ( ) ;
2020-11-11 00:00:54 +01:00
div5 = element ( "div" ) ;
2020-11-11 23:45:52 +01:00
t11 = text ( t11 _value ) ;
t12 = space ( ) ;
2020-11-11 00:00:54 +01:00
button1 = element ( "button" ) ;
i2 = element ( "i" ) ;
i2 . textContent = "save" ;
2020-11-11 23:45:52 +01:00
t14 = text ( " Download" ) ;
t15 = space ( ) ;
2020-11-11 00:00:54 +01:00
button2 = element ( "button" ) ;
i3 = element ( "i" ) ;
i3 . textContent = "save" ;
2020-11-11 23:45:52 +01:00
t17 = text ( " DL all files" ) ;
t18 = space ( ) ;
2020-11-11 00:00:54 +01:00
button3 = element ( "button" ) ;
i4 = element ( "i" ) ;
i4 . textContent = "content_copy" ;
2020-11-11 23:45:52 +01:00
t20 = space ( ) ;
2020-11-11 00:00:54 +01:00
u0 = element ( "u" ) ;
u0 . textContent = "C" ;
2020-11-11 23:45:52 +01:00
t22 = text ( "opy Link" ) ;
t23 = space ( ) ;
2020-11-11 00:00:54 +01:00
button4 = element ( "button" ) ;
i5 = element ( "i" ) ;
i5 . textContent = "share" ;
2020-11-11 23:45:52 +01:00
t25 = text ( " Share" ) ;
t26 = space ( ) ;
2020-11-11 00:00:54 +01:00
button5 = element ( "button" ) ;
i6 = element ( "i" ) ;
i6 . textContent = "help" ;
2020-11-11 23:45:52 +01:00
t28 = text ( " Deta" ) ;
2020-11-11 00:00:54 +01:00
u1 = element ( "u" ) ;
u1 . textContent = "i" ;
2020-11-11 23:45:52 +01:00
t30 = text ( "ls" ) ;
t31 = space ( ) ;
2020-11-11 00:00:54 +01:00
button6 = element ( "button" ) ;
i7 = element ( "i" ) ;
i7 . textContent = "edit" ;
2020-11-11 23:45:52 +01:00
t33 = space ( ) ;
2020-11-11 00:00:54 +01:00
u2 = element ( "u" ) ;
u2 . textContent = "E" ;
2020-11-11 23:45:52 +01:00
t35 = text ( "dit" ) ;
t36 = space ( ) ;
2020-11-11 00:00:54 +01:00
create _component ( sharebar _1 . $$ . fragment ) ;
2020-11-11 23:45:52 +01:00
t37 = space ( ) ;
div9 = element ( "div" ) ;
2020-11-11 00:00:54 +01:00
if ( if _block1 ) if _block1 . c ( ) ;
2020-11-11 23:45:52 +01:00
t38 = space ( ) ;
2020-11-11 00:00:54 +01:00
iframe = element ( "iframe" ) ;
2020-11-11 23:45:52 +01:00
t39 = space ( ) ;
2020-11-11 00:00:54 +01:00
create _component ( modal . $$ . fragment ) ;
attr _dev ( i0 , "class" , "icon" ) ;
2020-11-11 23:45:52 +01:00
add _location ( i0 , file$6 , 105 , 3 , 2556 ) ;
attr _dev ( button0 , "class" , "button_toggle_toolbar svelte-15t34ei" ) ;
toggle _class ( button0 , "button_highlight" , /*toolbar_visible*/ ctx [ 2 ] ) ;
add _location ( button0 , file$6 , 104 , 2 , 2447 ) ;
2020-11-11 00:00:54 +01:00
attr _dev ( i1 , "class" , "icon" ) ;
2020-11-11 23:45:52 +01:00
add _location ( i1 , file$6 , 107 , 58 , 2651 ) ;
2020-11-11 00:00:54 +01:00
attr _dev ( a , "href" , "/" ) ;
attr _dev ( a , "id" , "button_home" ) ;
2020-11-11 23:45:52 +01:00
attr _dev ( a , "class" , "button button_home svelte-15t34ei" ) ;
add _location ( a , file$6 , 107 , 2 , 2595 ) ;
attr _dev ( div0 , "class" , "breadcrumb breadcrumb_last svelte-15t34ei" ) ;
add _location ( div0 , file$6 , 112 , 3 , 2893 ) ;
attr _dev ( div1 , "class" , "file_viewer_headerbar_title svelte-15t34ei" ) ;
add _location ( div1 , file$6 , 108 , 2 , 2682 ) ;
attr _dev ( div2 , "class" , "file_viewer_headerbar highlight_1 svelte-15t34ei" ) ;
add _location ( div2 , file$6 , 103 , 1 , 2374 ) ;
attr _dev ( div3 , "class" , "list_navigator svelte-15t34ei" ) ;
add _location ( div3 , file$6 , 115 , 1 , 2981 ) ;
attr _dev ( div4 , "class" , "toolbar_label svelte-15t34ei" ) ;
add _location ( div4 , file$6 , 118 , 3 , 3109 ) ;
attr _dev ( div5 , "class" , "toolbar_statistic svelte-15t34ei" ) ;
add _location ( div5 , file$6 , 119 , 3 , 3150 ) ;
2020-11-11 00:00:54 +01:00
attr _dev ( i2 , "class" , "icon" ) ;
2020-11-11 23:45:52 +01:00
add _location ( i2 , file$6 , 122 , 4 , 3295 ) ;
attr _dev ( button1 , "class" , "toolbar_button button_full_width svelte-15t34ei" ) ;
add _location ( button1 , file$6 , 121 , 3 , 3241 ) ;
2020-11-11 00:00:54 +01:00
attr _dev ( i3 , "class" , "icon" ) ;
2020-11-11 23:45:52 +01:00
add _location ( i3 , file$6 , 125 , 4 , 3445 ) ;
2020-11-11 00:00:54 +01:00
attr _dev ( button2 , "id" , "btn_download_list" ) ;
2020-11-11 23:45:52 +01:00
attr _dev ( button2 , "class" , "toolbar_button button_full_width svelte-15t34ei" ) ;
2020-11-11 00:00:54 +01:00
set _style ( button2 , "display" , "none" ) ;
2020-11-11 23:45:52 +01:00
add _location ( button2 , file$6 , 124 , 3 , 3345 ) ;
2020-11-11 00:00:54 +01:00
attr _dev ( i4 , "class" , "icon" ) ;
2020-11-11 23:45:52 +01:00
add _location ( i4 , file$6 , 128 , 4 , 3567 ) ;
add _location ( u0 , file$6 , 128 , 37 , 3600 ) ;
2020-11-11 00:00:54 +01:00
attr _dev ( button3 , "id" , "btn_copy" ) ;
2020-11-11 23:45:52 +01:00
attr _dev ( button3 , "class" , "toolbar_button button_full_width svelte-15t34ei" ) ;
add _location ( button3 , file$6 , 127 , 3 , 3499 ) ;
2020-11-11 00:00:54 +01:00
attr _dev ( i5 , "class" , "icon" ) ;
2020-11-11 23:45:52 +01:00
add _location ( i5 , file$6 , 131 , 4 , 3756 ) ;
attr _dev ( button4 , "class" , "toolbar_button button_full_width svelte-15t34ei" ) ;
toggle _class ( button4 , "button_highlight" , /*sharebar_visible*/ ctx [ 10 ] ) ;
add _location ( button4 , file$6 , 130 , 3 , 3633 ) ;
2020-11-11 00:00:54 +01:00
attr _dev ( i6 , "class" , "icon" ) ;
2020-11-11 23:45:52 +01:00
add _location ( i6 , file$6 , 134 , 4 , 3925 ) ;
add _location ( u1 , file$6 , 134 , 33 , 3954 ) ;
attr _dev ( button5 , "class" , "toolbar_button button_full_width svelte-15t34ei" ) ;
toggle _class ( button5 , "button_highlight" , /*details_visible*/ ctx [ 11 ] ) ;
add _location ( button5 , file$6 , 133 , 3 , 3804 ) ;
2020-11-11 00:00:54 +01:00
attr _dev ( i7 , "class" , "icon" ) ;
2020-11-11 23:45:52 +01:00
add _location ( i7 , file$6 , 137 , 4 , 4072 ) ;
add _location ( u2 , file$6 , 137 , 29 , 4097 ) ;
2020-11-11 00:00:54 +01:00
attr _dev ( button6 , "id" , "btn_edit" ) ;
2020-11-11 23:45:52 +01:00
attr _dev ( button6 , "class" , "toolbar_button button_full_width svelte-15t34ei" ) ;
2020-11-11 00:00:54 +01:00
set _style ( button6 , "display" , "none" ) ;
2020-11-11 23:45:52 +01:00
add _location ( button6 , file$6 , 136 , 3 , 3981 ) ;
attr _dev ( div6 , "class" , "svelte-15t34ei" ) ;
add _location ( div6 , file$6 , 117 , 50 , 3100 ) ;
attr _dev ( div7 , "class" , "svelte-15t34ei" ) ;
add _location ( div7 , file$6 , 117 , 45 , 3095 ) ;
attr _dev ( div8 , "class" , "toolbar svelte-15t34ei" ) ;
toggle _class ( div8 , "toolbar_visible" , /*toolbar_visible*/ ctx [ 2 ] ) ;
add _location ( div8 , file$6 , 117 , 2 , 3052 ) ;
attr _dev ( div9 , "class" , "file_viewer_file_preview svelte-15t34ei" ) ;
toggle _class ( div9 , "toolbar_visible" , /*toolbar_visible*/ ctx [ 2 ] ) ;
add _location ( div9 , file$6 , 142 , 2 , 4191 ) ;
attr _dev ( div10 , "class" , "file_viewer_window svelte-15t34ei" ) ;
add _location ( div10 , file$6 , 116 , 1 , 3017 ) ;
2020-11-11 00:00:54 +01:00
attr _dev ( iframe , "title" , "Frame for downloading files" ) ;
set _style ( iframe , "display" , "none" ) ;
set _style ( iframe , "width" , "1px" ) ;
set _style ( iframe , "height" , "1px" ) ;
2020-11-11 23:45:52 +01:00
add _location ( iframe , file$6 , 154 , 1 , 4739 ) ;
attr _dev ( div11 , "class" , "file_viewer svelte-15t34ei" ) ;
add _location ( div11 , file$6 , 96 , 0 , 2176 ) ;
2020-11-11 00:00:54 +01:00
} ,
l : function claim ( nodes ) {
throw new Error ( "options.hydrate only works if the component was compiled with the `hydratable: true` option" ) ;
} ,
m : function mount ( target , anchor ) {
2020-11-11 23:45:52 +01:00
insert _dev ( target , div11 , anchor ) ;
if ( if _block0 ) if _block0 . m ( div11 , null ) ;
append _dev ( div11 , t0 ) ;
append _dev ( div11 , div2 ) ;
2020-11-11 00:00:54 +01:00
append _dev ( div2 , button0 ) ;
append _dev ( button0 , i0 ) ;
2020-11-11 23:45:52 +01:00
append _dev ( div2 , t2 ) ;
2020-11-11 00:00:54 +01:00
append _dev ( div2 , a ) ;
append _dev ( a , i1 ) ;
2020-11-11 23:45:52 +01:00
append _dev ( div2 , t4 ) ;
2020-11-11 00:00:54 +01:00
append _dev ( div2 , div1 ) ;
2020-11-11 23:45:52 +01:00
for ( let i = 0 ; i < each _blocks . length ; i += 1 ) {
each _blocks [ i ] . m ( div1 , null ) ;
}
append _dev ( div1 , t5 ) ;
2020-11-11 00:00:54 +01:00
append _dev ( div1 , div0 ) ;
2020-11-11 23:45:52 +01:00
append _dev ( div0 , t6 ) ;
2020-11-11 00:00:54 +01:00
/*div2_binding*/ ctx [ 16 ] ( div2 ) ;
2020-11-11 23:45:52 +01:00
append _dev ( div11 , t7 ) ;
append _dev ( div11 , div3 ) ;
append _dev ( div11 , t8 ) ;
2020-11-11 00:00:54 +01:00
append _dev ( div11 , div10 ) ;
append _dev ( div10 , div8 ) ;
2020-11-11 23:45:52 +01:00
append _dev ( div8 , div7 ) ;
append _dev ( div7 , div6 ) ;
append _dev ( div6 , div4 ) ;
append _dev ( div6 , t10 ) ;
append _dev ( div6 , div5 ) ;
append _dev ( div5 , t11 ) ;
append _dev ( div6 , t12 ) ;
append _dev ( div6 , button1 ) ;
2020-11-11 00:00:54 +01:00
append _dev ( button1 , i2 ) ;
2020-11-11 23:45:52 +01:00
append _dev ( button1 , t14 ) ;
append _dev ( div6 , t15 ) ;
append _dev ( div6 , button2 ) ;
2020-11-11 00:00:54 +01:00
append _dev ( button2 , i3 ) ;
2020-11-11 23:45:52 +01:00
append _dev ( button2 , t17 ) ;
append _dev ( div6 , t18 ) ;
append _dev ( div6 , button3 ) ;
2020-11-11 00:00:54 +01:00
append _dev ( button3 , i4 ) ;
2020-11-11 23:45:52 +01:00
append _dev ( button3 , t20 ) ;
2020-11-11 00:00:54 +01:00
append _dev ( button3 , u0 ) ;
2020-11-11 23:45:52 +01:00
append _dev ( button3 , t22 ) ;
append _dev ( div6 , t23 ) ;
append _dev ( div6 , button4 ) ;
2020-11-11 00:00:54 +01:00
append _dev ( button4 , i5 ) ;
2020-11-11 23:45:52 +01:00
append _dev ( button4 , t25 ) ;
append _dev ( div6 , t26 ) ;
append _dev ( div6 , button5 ) ;
2020-11-11 00:00:54 +01:00
append _dev ( button5 , i6 ) ;
2020-11-11 23:45:52 +01:00
append _dev ( button5 , t28 ) ;
2020-11-11 00:00:54 +01:00
append _dev ( button5 , u1 ) ;
2020-11-11 23:45:52 +01:00
append _dev ( button5 , t30 ) ;
append _dev ( div6 , t31 ) ;
append _dev ( div6 , button6 ) ;
2020-11-11 00:00:54 +01:00
append _dev ( button6 , i7 ) ;
2020-11-11 23:45:52 +01:00
append _dev ( button6 , t33 ) ;
2020-11-11 00:00:54 +01:00
append _dev ( button6 , u2 ) ;
2020-11-11 23:45:52 +01:00
append _dev ( button6 , t35 ) ;
append _dev ( div10 , t36 ) ;
mount _component ( sharebar _1 , div10 , null ) ;
append _dev ( div10 , t37 ) ;
append _dev ( div10 , div9 ) ;
2020-11-11 00:00:54 +01:00
if ( ~ current _block _type _index ) {
2020-11-11 23:45:52 +01:00
if _blocks [ current _block _type _index ] . m ( div9 , null ) ;
2020-11-11 00:00:54 +01:00
}
2020-11-11 23:45:52 +01:00
/*div9_binding*/ ctx [ 22 ] ( div9 ) ;
append _dev ( div11 , t38 ) ;
append _dev ( div11 , iframe ) ;
append _dev ( div11 , t39 ) ;
mount _component ( modal , div11 , null ) ;
/*div11_binding*/ ctx [ 24 ] ( div11 ) ;
2020-11-11 00:00:54 +01:00
current = true ;
if ( ! mounted ) {
dispose = [
2020-11-11 23:45:52 +01:00
listen _dev ( window _1$1 , "keydown" , /*keydown*/ ctx [ 14 ] , false , false , false ) ,
listen _dev ( button0 , "click" , /*toolbar_toggle*/ ctx [ 9 ] , false , false , false ) ,
2020-11-11 00:00:54 +01:00
listen _dev (
button4 ,
"click" ,
function ( ) {
2020-11-11 23:45:52 +01:00
if ( is _function ( /*sharebar*/ ctx [ 3 ] . toggle ) ) /*sharebar*/ ctx [ 3 ] . toggle . apply ( this , arguments ) ;
2020-11-11 00:00:54 +01:00
} ,
false ,
false ,
false
) ,
listen _dev (
button5 ,
"click" ,
function ( ) {
2020-11-11 23:45:52 +01:00
if ( is _function ( /*details*/ ctx [ 4 ] . toggle ) ) /*details*/ ctx [ 4 ] . toggle . apply ( this , arguments ) ;
2020-11-11 00:00:54 +01:00
} ,
false ,
false ,
false
)
] ;
mounted = true ;
}
} ,
p : function update ( new _ctx , [ dirty ] ) {
ctx = new _ctx ;
2020-11-11 23:45:52 +01:00
if ( /*loading*/ ctx [ 7 ] ) {
2020-11-11 00:00:54 +01:00
if ( if _block0 ) {
2020-11-11 23:45:52 +01:00
if ( dirty & /*loading*/ 128 ) {
transition _in ( if _block0 , 1 ) ;
}
2020-11-11 00:00:54 +01:00
} else {
2020-11-11 23:45:52 +01:00
if _block0 = create _if _block _4 ( ctx ) ;
2020-11-11 00:00:54 +01:00
if _block0 . c ( ) ;
2020-11-11 23:45:52 +01:00
transition _in ( if _block0 , 1 ) ;
if _block0 . m ( div11 , t0 ) ;
2020-11-11 00:00:54 +01:00
}
} else if ( if _block0 ) {
2020-11-11 23:45:52 +01:00
group _outros ( ) ;
transition _out ( if _block0 , 1 , 1 , ( ) => {
if _block0 = null ;
} ) ;
check _outros ( ) ;
}
if ( dirty & /*toolbar_visible*/ 4 ) {
toggle _class ( button0 , "button_highlight" , /*toolbar_visible*/ ctx [ 2 ] ) ;
}
if ( dirty & /*navigate, currentNode*/ 8256 ) {
each _value = /*currentNode*/ ctx [ 6 ] . parents ;
validate _each _argument ( each _value ) ;
let i ;
for ( i = 0 ; i < each _value . length ; i += 1 ) {
const child _ctx = get _each _context$1 ( ctx , each _value , i ) ;
if ( each _blocks [ i ] ) {
each _blocks [ i ] . p ( child _ctx , dirty ) ;
} else {
each _blocks [ i ] = create _each _block$1 ( child _ctx ) ;
each _blocks [ i ] . c ( ) ;
each _blocks [ i ] . m ( div1 , t5 ) ;
}
}
for ( ; i < each _blocks . length ; i += 1 ) {
each _blocks [ i ] . d ( 1 ) ;
}
each _blocks . length = each _value . length ;
2020-11-11 00:00:54 +01:00
}
2020-11-11 23:45:52 +01:00
if ( ( ! current || dirty & /*currentNode*/ 64 ) && t6 _value !== ( t6 _value = /*currentNode*/ ctx [ 6 ] . base . name + "" ) ) set _data _dev ( t6 , t6 _value ) ;
if ( ( ! current || dirty & /*currentNode*/ 64 ) && t11 _value !== ( t11 _value = formatDataVolume ( /*currentNode*/ ctx [ 6 ] . base . file _size , 3 ) + "" ) ) set _data _dev ( t11 , t11 _value ) ;
2020-11-11 00:00:54 +01:00
2020-11-11 23:45:52 +01:00
if ( dirty & /*sharebar_visible*/ 1024 ) {
toggle _class ( button4 , "button_highlight" , /*sharebar_visible*/ ctx [ 10 ] ) ;
2020-11-11 00:00:54 +01:00
}
2020-11-11 23:45:52 +01:00
if ( dirty & /*details_visible*/ 2048 ) {
toggle _class ( button5 , "button_highlight" , /*details_visible*/ ctx [ 11 ] ) ;
2020-11-11 00:00:54 +01:00
}
2020-11-11 23:45:52 +01:00
if ( dirty & /*toolbar_visible*/ 4 ) {
toggle _class ( div8 , "toolbar_visible" , /*toolbar_visible*/ ctx [ 2 ] ) ;
2020-11-11 00:00:54 +01:00
}
const sharebar _1 _changes = { } ;
sharebar _1 . $set ( sharebar _1 _changes ) ;
let previous _block _index = current _block _type _index ;
current _block _type _index = select _block _type ( ctx ) ;
if ( current _block _type _index === previous _block _index ) {
if ( ~ current _block _type _index ) {
if _blocks [ current _block _type _index ] . p ( ctx , dirty ) ;
}
} else {
if ( if _block1 ) {
group _outros ( ) ;
transition _out ( if _blocks [ previous _block _index ] , 1 , 1 , ( ) => {
if _blocks [ previous _block _index ] = null ;
} ) ;
check _outros ( ) ;
}
if ( ~ current _block _type _index ) {
if _block1 = if _blocks [ current _block _type _index ] ;
if ( ! if _block1 ) {
if _block1 = if _blocks [ current _block _type _index ] = if _block _creators [ current _block _type _index ] ( ctx ) ;
if _block1 . c ( ) ;
} else {
if _block1 . p ( ctx , dirty ) ;
}
transition _in ( if _block1 , 1 ) ;
2020-11-11 23:45:52 +01:00
if _block1 . m ( div9 , null ) ;
2020-11-11 00:00:54 +01:00
} else {
if _block1 = null ;
}
}
2020-11-11 23:45:52 +01:00
if ( dirty & /*toolbar_visible*/ 4 ) {
toggle _class ( div9 , "toolbar_visible" , /*toolbar_visible*/ ctx [ 2 ] ) ;
2020-11-11 00:00:54 +01:00
}
const modal _changes = { } ;
2020-11-11 23:45:52 +01:00
if ( dirty & /*$$scope, currentNode*/ 536870976 ) {
2020-11-11 00:00:54 +01:00
modal _changes . $$scope = { dirty , ctx } ;
}
modal . $set ( modal _changes ) ;
} ,
i : function intro ( local ) {
if ( current ) return ;
2020-11-11 23:45:52 +01:00
transition _in ( if _block0 ) ;
2020-11-11 00:00:54 +01:00
transition _in ( sharebar _1 . $$ . fragment , local ) ;
transition _in ( if _block1 ) ;
transition _in ( modal . $$ . fragment , local ) ;
current = true ;
} ,
o : function outro ( local ) {
2020-11-11 23:45:52 +01:00
transition _out ( if _block0 ) ;
2020-11-11 00:00:54 +01:00
transition _out ( sharebar _1 . $$ . fragment , local ) ;
transition _out ( if _block1 ) ;
transition _out ( modal . $$ . fragment , local ) ;
current = false ;
} ,
d : function destroy ( detaching ) {
2020-11-11 23:45:52 +01:00
if ( detaching ) detach _dev ( div11 ) ;
2020-11-11 00:00:54 +01:00
if ( if _block0 ) if _block0 . d ( ) ;
2020-11-11 23:45:52 +01:00
destroy _each ( each _blocks , detaching ) ;
2020-11-11 00:00:54 +01:00
/*div2_binding*/ ctx [ 16 ] ( null ) ;
/*sharebar_1_binding*/ ctx [ 17 ] ( null ) ;
destroy _component ( sharebar _1 ) ;
if ( ~ current _block _type _index ) {
if _blocks [ current _block _type _index ] . d ( ) ;
}
2020-11-11 23:45:52 +01:00
/*div9_binding*/ ctx [ 22 ] ( null ) ;
/*modal_binding*/ ctx [ 23 ] ( null ) ;
2020-11-11 00:00:54 +01:00
destroy _component ( modal ) ;
2020-11-11 23:45:52 +01:00
/*div11_binding*/ ctx [ 24 ] ( null ) ;
2020-11-11 00:00:54 +01:00
mounted = false ;
run _all ( dispose ) ;
}
} ;
dispatch _dev ( "SvelteRegisterBlock" , {
block ,
2020-11-11 23:45:52 +01:00
id : create _fragment$6 . name ,
2020-11-11 00:00:54 +01:00
type : "component" ,
source : "" ,
ctx
} ) ;
return block ;
}
2020-11-11 23:45:52 +01:00
function instance$6 ( $$self , $$props , $$invalidate ) {
2020-11-11 00:00:54 +01:00
let { $$slots : slots = { } , $$scope } = $$props ;
validate _slots ( "Filesystem" , slots , [ ] ) ;
let file _viewer ;
let header _bar ;
let toolbar _visible = window . innerWidth > 800 ;
let toolbar _toggle = ( ) => {
2020-11-11 23:45:52 +01:00
$$invalidate ( 2 , toolbar _visible = ! toolbar _visible ) ;
2020-11-11 00:00:54 +01:00
if ( ! toolbar _visible ) {
sharebar . setVisible ( false ) ;
}
} ;
let sharebar ;
let sharebar _visible = false ;
let details ;
let details _visible = false ;
let preview ;
// State
let currentNode = initialNode ;
2020-11-11 23:45:52 +01:00
let path _base = "/d/" + currentNode . bucket . id ;
2020-11-11 00:00:54 +01:00
let loading = true ;
let viewer _type = "" ;
2020-11-11 23:45:52 +01:00
window . onpopstate = e => {
if ( e . state ) {
let locsplit = document . location . pathname . split ( currentNode . bucket . id + "/" , 2 ) ;
navigate ( decodeURIComponent ( locsplit [ 1 ] ) ) ;
}
2020-11-11 00:00:54 +01:00
} ;
2020-11-11 23:45:52 +01:00
const navigate = ( path , pushHist ) => {
$$invalidate ( 7 , loading = true ) ;
fetch ( window . apiEndpoint + "/filesystem/" + currentNode . bucket . id + "/" + encodeURIComponent ( path ) + "?stat" ) . then ( resp => resp . json ( ) ) . then ( resp => {
window . document . title = resp . base . name + " ~ pixeldrain" ;
if ( pushHist ) {
window . history . pushState ( { } , window . document . title , "/d/" + resp . bucket . id + resp . base . path ) ;
}
$$invalidate ( 6 , currentNode = resp ) ;
2020-11-11 00:00:54 +01:00
openPath ( ) ;
} ) . catch ( err => {
2020-11-11 23:45:52 +01:00
$$invalidate ( 7 , loading = false ) ;
2020-11-11 00:00:54 +01:00
alert ( err ) ;
} ) ;
} ;
const openPath = ( ) => {
console . log ( currentNode . base . type ) ;
if ( currentNode . base . type === "bucket" || currentNode . base . type === "dir" ) {
2020-11-11 23:45:52 +01:00
$$invalidate ( 8 , viewer _type = "dir" ) ;
} else if ( currentNode . base . file _type . startsWith ( "image" ) ) {
$$invalidate ( 8 , viewer _type = "image" ) ;
} else if ( currentNode . base . file _type . startsWith ( "audio" ) || currentNode . base . file _type === "application/ogg" || currentNode . base . name . endsWith ( ".mp3" ) ) {
$$invalidate ( 8 , viewer _type = "audio" ) ;
2020-11-11 00:00:54 +01:00
}
2020-11-11 23:45:52 +01:00
$$invalidate ( 7 , loading = false ) ;
2020-11-11 00:00:54 +01:00
} ;
const keydown = e => {
switch ( e . key ) {
case "Escape" :
hide ( ) ;
return ;
case "i" :
details _window . toggle ( ) ;
}
console . log ( e . key ) ;
} ;
onMount ( openPath ) ;
const writable _props = [ ] ;
Object . keys ( $$props ) . forEach ( key => {
if ( ! ~ writable _props . indexOf ( key ) && key . slice ( 0 , 2 ) !== "$$" ) console _1 . warn ( ` <Filesystem> was created with unknown prop ' ${ key } ' ` ) ;
} ) ;
2020-11-11 23:45:52 +01:00
const click _handler = parent => {
navigate ( parent . path , true ) ;
} ;
2020-11-11 00:00:54 +01:00
function div2 _binding ( $$value ) {
binding _callbacks [ $$value ? "unshift" : "push" ] ( ( ) => {
header _bar = $$value ;
2020-11-11 23:45:52 +01:00
$$invalidate ( 1 , header _bar ) ;
2020-11-11 00:00:54 +01:00
} ) ;
}
function sharebar _1 _binding ( $$value ) {
binding _callbacks [ $$value ? "unshift" : "push" ] ( ( ) => {
sharebar = $$value ;
2020-11-11 23:45:52 +01:00
$$invalidate ( 3 , sharebar ) ;
2020-11-11 00:00:54 +01:00
} ) ;
}
function directory _binding ( $$value ) {
binding _callbacks [ $$value ? "unshift" : "push" ] ( ( ) => {
preview = $$value ;
2020-11-11 23:45:52 +01:00
$$invalidate ( 5 , preview ) ;
2020-11-11 00:00:54 +01:00
} ) ;
}
const navigate _handler = e => {
2020-11-11 23:45:52 +01:00
navigate ( e . detail , true ) ;
2020-11-11 00:00:54 +01:00
} ;
2020-11-11 23:45:52 +01:00
function audio _binding ( $$value ) {
2020-11-11 00:00:54 +01:00
binding _callbacks [ $$value ? "unshift" : "push" ] ( ( ) => {
preview = $$value ;
2020-11-11 23:45:52 +01:00
$$invalidate ( 5 , preview ) ;
} ) ;
}
function image _binding ( $$value ) {
binding _callbacks [ $$value ? "unshift" : "push" ] ( ( ) => {
preview = $$value ;
$$invalidate ( 5 , preview ) ;
} ) ;
}
function div9 _binding ( $$value ) {
binding _callbacks [ $$value ? "unshift" : "push" ] ( ( ) => {
preview = $$value ;
$$invalidate ( 5 , preview ) ;
2020-11-11 00:00:54 +01:00
} ) ;
}
function modal _binding ( $$value ) {
binding _callbacks [ $$value ? "unshift" : "push" ] ( ( ) => {
details = $$value ;
2020-11-11 23:45:52 +01:00
$$invalidate ( 4 , details ) ;
2020-11-11 00:00:54 +01:00
} ) ;
}
2020-11-11 23:45:52 +01:00
function div11 _binding ( $$value ) {
2020-11-11 00:00:54 +01:00
binding _callbacks [ $$value ? "unshift" : "push" ] ( ( ) => {
file _viewer = $$value ;
2020-11-11 23:45:52 +01:00
$$invalidate ( 0 , file _viewer ) ;
2020-11-11 00:00:54 +01:00
} ) ;
}
$$self . $capture _state = ( ) => ( {
onMount ,
formatDate ,
formatDataVolume ,
formatThousands ,
Sharebar ,
Spinner ,
Modal ,
Directory ,
2020-11-11 23:45:52 +01:00
Audio ,
Image ,
2020-11-11 00:00:54 +01:00
file _viewer ,
header _bar ,
toolbar _visible ,
toolbar _toggle ,
sharebar ,
sharebar _visible ,
details ,
details _visible ,
preview ,
currentNode ,
2020-11-11 23:45:52 +01:00
path _base ,
2020-11-11 00:00:54 +01:00
loading ,
viewer _type ,
navigate ,
openPath ,
keydown
} ) ;
$$self . $inject _state = $$props => {
2020-11-11 23:45:52 +01:00
if ( "file_viewer" in $$props ) $$invalidate ( 0 , file _viewer = $$props . file _viewer ) ;
if ( "header_bar" in $$props ) $$invalidate ( 1 , header _bar = $$props . header _bar ) ;
if ( "toolbar_visible" in $$props ) $$invalidate ( 2 , toolbar _visible = $$props . toolbar _visible ) ;
if ( "toolbar_toggle" in $$props ) $$invalidate ( 9 , toolbar _toggle = $$props . toolbar _toggle ) ;
if ( "sharebar" in $$props ) $$invalidate ( 3 , sharebar = $$props . sharebar ) ;
if ( "sharebar_visible" in $$props ) $$invalidate ( 10 , sharebar _visible = $$props . sharebar _visible ) ;
if ( "details" in $$props ) $$invalidate ( 4 , details = $$props . details ) ;
if ( "details_visible" in $$props ) $$invalidate ( 11 , details _visible = $$props . details _visible ) ;
if ( "preview" in $$props ) $$invalidate ( 5 , preview = $$props . preview ) ;
if ( "currentNode" in $$props ) $$invalidate ( 6 , currentNode = $$props . currentNode ) ;
if ( "path_base" in $$props ) $$invalidate ( 12 , path _base = $$props . path _base ) ;
if ( "loading" in $$props ) $$invalidate ( 7 , loading = $$props . loading ) ;
if ( "viewer_type" in $$props ) $$invalidate ( 8 , viewer _type = $$props . viewer _type ) ;
2020-11-11 00:00:54 +01:00
} ;
if ( $$props && "$$inject" in $$props ) {
$$self . $inject _state ( $$props . $$inject ) ;
}
return [
file _viewer ,
header _bar ,
toolbar _visible ,
sharebar ,
details ,
preview ,
currentNode ,
loading ,
viewer _type ,
toolbar _toggle ,
sharebar _visible ,
details _visible ,
2020-11-11 23:45:52 +01:00
path _base ,
2020-11-11 00:00:54 +01:00
navigate ,
keydown ,
2020-11-11 23:45:52 +01:00
click _handler ,
2020-11-11 00:00:54 +01:00
div2 _binding ,
sharebar _1 _binding ,
directory _binding ,
navigate _handler ,
2020-11-11 23:45:52 +01:00
audio _binding ,
image _binding ,
div9 _binding ,
2020-11-11 00:00:54 +01:00
modal _binding ,
2020-11-11 23:45:52 +01:00
div11 _binding
2020-11-11 00:00:54 +01:00
] ;
}
class Filesystem extends SvelteComponentDev {
constructor ( options ) {
super ( options ) ;
2020-11-11 23:45:52 +01:00
init ( this , options , instance$6 , create _fragment$6 , safe _not _equal , { } ) ;
2020-11-11 00:00:54 +01:00
dispatch _dev ( "SvelteRegisterComponent" , {
component : this ,
tagName : "Filesystem" ,
options ,
2020-11-11 23:45:52 +01:00
id : create _fragment$6 . name
2020-11-11 00:00:54 +01:00
} ) ;
}
}
const app = new Filesystem ( {
target : document . body ,
props : { }
} ) ;
return app ;
} ( ) ) ;
//# sourceMappingURL=filesystem.js.map