/* generated by Svelte vX.Y.Z */
import {
SvelteComponentDev ,
add _location ,
append _dev ,
detach _dev ,
dispatch _dev ,
element ,
init ,
insert _dev ,
noop ,
safe _not _equal ,
set _data _dev ,
space ,
text ,
validate _slots
} from "svelte/internal" ;
const file = undefined ;
function create _fragment ( ctx ) {
let p ;
let t0 _value = Math . max ( 0 , /*foo*/ ctx [ 0 ] ) + "" ;
let t0 ;
let t1 ;
let t2 ;
const block = {
c : function create ( ) {
p = element ( "p" ) ;
t0 = text ( t0 _value ) ;
t1 = space ( ) ;
t2 = text ( /*bar*/ ctx [ 1 ] ) ;
add _location ( p , file , 7 , 0 , 67 ) ;
} ,
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 , p , anchor ) ;
append _dev ( p , t0 ) ;
append _dev ( p , t1 ) ;
append _dev ( p , t2 ) ;
} ,
p : function update ( ctx , [ dirty ] ) {
if ( dirty & /*foo*/ 1 && t0 _value !== ( t0 _value = Math . max ( 0 , /*foo*/ ctx [ 0 ] ) + "" ) ) set _data _dev ( t0 , t0 _value ) ;
if ( dirty & /*bar*/ 2 ) set _data _dev ( t2 , /*bar*/ ctx [ 1 ] ) ;
} ,
i : noop ,
o : noop ,
d : function destroy ( detaching ) {
if ( detaching ) detach _dev ( p ) ;
}
} ;
dispatch _dev ( "SvelteRegisterBlock" , {
block ,
id : create _fragment . name ,
type : "component" ,
source : "" ,
ctx
} ) ;
return block ;
}
function instance ( $$self , $$props , $$invalidate ) {
let { foo } = $$props ;
let bar ;
const writable _props = [ "foo" ] ;
Object . keys ( $$props ) . forEach ( key => {
if ( ! ~ writable _props . indexOf ( key ) && key . slice ( 0 , 2 ) !== "$$" ) console . warn ( ` <Component> was created with unknown prop ' ${ key } ' ` ) ;
} ) ;
let { $$slots = { } , $$scope } = $$props ;
validate _slots ( "Component" , $$slots , [ ] ) ;
$$self . $set = $$props => {
if ( "foo" in $$props ) $$invalidate ( 0 , foo = $$props . foo ) ;
} ;
$$self . $capture _state = ( ) => ( { foo , bar } ) ;
$$self . $inject _state = $$props => {
if ( "foo" in $$props ) $$invalidate ( 0 , foo = $$props . foo ) ;
if ( "bar" in $$props ) $$invalidate ( 1 , bar = $$props . bar ) ;
} ;
if ( $$props && "$$inject" in $$props ) {
$$self . $inject _state ( $$props . $$inject ) ;
}
$$self . $$ . update = ( ) => {
if ( $$self . $$ . dirty & /*foo*/ 1 ) {
$ : $$invalidate ( 1 , bar = foo * 2 ) ;
}
} ;
return [ foo , bar ] ;
}
class Component extends SvelteComponentDev {
constructor ( options ) {
super ( options ) ;
init ( this , options , instance , create _fragment , safe _not _equal , { foo : 0 } ) ;
dispatch _dev ( "SvelteRegisterComponent" , {
component : this ,
tagName : "Component" ,
options ,
id : create _fragment . name
} ) ;
const { ctx } = this . $$ ;
const props = options . props || { } ;
if ( /*foo*/ ctx [ 0 ] === undefined && ! ( "foo" in props ) ) {
console . warn ( "<Component> was created without expected prop 'foo'" ) ;
}
}
get foo ( ) {
throw new Error ( "<Component>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'" ) ;
}
set foo ( value ) {
throw new Error ( "<Component>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'" ) ;
}
}
export default Component ;