2023-07-09 19:25:09 +07:00
( function ( l , r ) { if ( ! l || l . getElementById ( 'livereloadscript' ) ) return ; r = l . createElement ( 'script' ) ; r . async = 1 ; r . src = '//' + ( self . location . host || 'localhost' ) . split ( ':' ) [ 0 ] + ':35729/livereload.js?snipver=1' ; r . id = 'livereloadscript' ; l . getElementsByTagName ( 'head' ) [ 0 ] . appendChild ( r ) } ) ( self . document ) ;
import { S as SvelteElement , i as init , a as attribute _to _object , b as insert _dev , s as safe _not _equal , d as dispatch _dev , v as validate _slots , c as validate _store , e as component _subscribe , o as onMount , g as globals , h as empty , n as noop , j as detach _dev , C as binding _callbacks , k as element , l as space , t as text , p as attr _dev , m as add _location , q as src _url _equal , D as set _style , u as append _dev , w as set _data _dev } from './index-42a25c61.js' ;
import { loadLocaleContent } from '../../../../../../../../../js/libraries/serverTools.js' ;
import { w as writable } from './index-a1c185ea.js' ;
/* src\landing-component.svelte generated by Svelte v3.52.0 */
const { Object : Object _1 } = globals ;
const file = "src\\landing-component.svelte" ;
// (36:4) {#if Object.keys($content).length!=0}
function create _if _block ( ctx ) {
let div5 ;
let picture ;
let source0 ;
let t0 ;
let source1 ;
let t1 ;
let img0 ;
let t2 ;
let div4 ;
let p0 ;
let t3 _value = /*$content*/ ctx [ 2 ] . top + "" ;
let t3 ;
let t4 ;
let div3 ;
let div0 ;
let h20 ;
let t5 _value = /*$content*/ ctx [ 2 ] . groupsTitle + "" ;
let t5 ;
let t6 ;
let img1 ;
let img1 _src _value ;
let t7 ;
let p1 ;
let t8 _value = /*$content*/ ctx [ 2 ] . groupsText + "" ;
let t8 ;
let t9 ;
let div1 ;
let h21 ;
let t10 _value = /*$content*/ ctx [ 2 ] . communitiesTitle + "" ;
let t10 ;
let t11 ;
let img2 ;
let img2 _src _value ;
let t12 ;
let p2 ;
let t13 _value = /*$content*/ ctx [ 2 ] . communitiesText + "" ;
let t13 ;
let t14 ;
let div2 ;
let h22 ;
let t15 _value = /*$content*/ ctx [ 2 ] . cooperativesTitle + "" ;
let t15 ;
let t16 ;
let img3 ;
let img3 _src _value ;
let t17 ;
let p3 ;
let t18 _value = /*$content*/ ctx [ 2 ] . cooperativesText + "" ;
let t18 ;
const block = {
c : function create ( ) {
div5 = element ( "div" ) ;
picture = element ( "picture" ) ;
source0 = element ( "source" ) ;
t0 = space ( ) ;
source1 = element ( "source" ) ;
t1 = space ( ) ;
img0 = element ( "img" ) ;
t2 = space ( ) ;
div4 = element ( "div" ) ;
p0 = element ( "p" ) ;
t3 = text ( t3 _value ) ;
t4 = space ( ) ;
div3 = element ( "div" ) ;
div0 = element ( "div" ) ;
h20 = element ( "h2" ) ;
t5 = text ( t5 _value ) ;
t6 = space ( ) ;
img1 = element ( "img" ) ;
t7 = space ( ) ;
p1 = element ( "p" ) ;
t8 = text ( t8 _value ) ;
t9 = space ( ) ;
div1 = element ( "div" ) ;
h21 = element ( "h2" ) ;
t10 = text ( t10 _value ) ;
t11 = space ( ) ;
img2 = element ( "img" ) ;
t12 = space ( ) ;
p2 = element ( "p" ) ;
t13 = text ( t13 _value ) ;
t14 = space ( ) ;
div2 = element ( "div" ) ;
h22 = element ( "h2" ) ;
t15 = text ( t15 _value ) ;
t16 = space ( ) ;
img3 = element ( "img" ) ;
t17 = space ( ) ;
p3 = element ( "p" ) ;
t18 = text ( t18 _value ) ;
attr _dev ( source0 , "srcset" , "/img/crowd.webp" ) ;
add _location ( source0 , file , 38 , 16 , 855 ) ;
attr _dev ( source1 , "srcset" , "/img/crowd.png" ) ;
add _location ( source1 , file , 39 , 16 , 906 ) ;
attr _dev ( img0 , "id" , "crowd" ) ;
attr _dev ( img0 , "alt" , "crowd" ) ;
add _location ( img0 , file , 40 , 16 , 956 ) ;
add _location ( picture , file , 37 , 12 , 828 ) ;
add _location ( p0 , file , 44 , 16 , 1079 ) ;
add _location ( h20 , file , 47 , 24 , 1247 ) ;
attr _dev ( img1 , "id" , "groups-img" ) ;
if ( ! src _url _equal ( img1 . src , img1 _src _value = "/img/common/groups.svg" ) ) attr _dev ( img1 , "src" , img1 _src _value ) ;
attr _dev ( img1 , "alt" , "groups" ) ;
add _location ( img1 , file , 48 , 24 , 1304 ) ;
add _location ( p1 , file , 49 , 24 , 1393 ) ;
add _location ( div0 , file , 46 , 20 , 1216 ) ;
add _location ( h21 , file , 52 , 24 , 1502 ) ;
attr _dev ( img2 , "id" , "communities-img" ) ;
if ( ! src _url _equal ( img2 . src , img2 _src _value = "/img/common/communities.svg" ) ) attr _dev ( img2 , "src" , img2 _src _value ) ;
attr _dev ( img2 , "alt" , "communities" ) ;
add _location ( img2 , file , 53 , 24 , 1564 ) ;
add _location ( p2 , file , 54 , 24 , 1668 ) ;
add _location ( div1 , file , 51 , 20 , 1471 ) ;
add _location ( h22 , file , 57 , 24 , 1782 ) ;
attr _dev ( img3 , "id" , "coops-img" ) ;
if ( ! src _url _equal ( img3 . src , img3 _src _value = "/img/common/coops.svg" ) ) attr _dev ( img3 , "src" , img3 _src _value ) ;
attr _dev ( img3 , "alt" , "coops" ) ;
add _location ( img3 , file , 58 , 24 , 1845 ) ;
add _location ( p3 , file , 59 , 24 , 1931 ) ;
add _location ( div2 , file , 56 , 20 , 1751 ) ;
attr _dev ( div3 , "id" , "container-grid" ) ;
set _style ( div3 , "--grid-width" , /*gridWidth*/ ctx [ 1 ] ) ;
add _location ( div3 , file , 45 , 16 , 1118 ) ;
attr _dev ( div4 , "id" , "text-container" ) ;
add _location ( div4 , file , 43 , 12 , 1036 ) ;
attr _dev ( div5 , "id" , "container" ) ;
add _location ( div5 , file , 36 , 8 , 794 ) ;
} ,
m : function mount ( target , anchor ) {
insert _dev ( target , div5 , anchor ) ;
append _dev ( div5 , picture ) ;
append _dev ( picture , source0 ) ;
append _dev ( picture , t0 ) ;
append _dev ( picture , source1 ) ;
append _dev ( picture , t1 ) ;
append _dev ( picture , img0 ) ;
append _dev ( div5 , t2 ) ;
append _dev ( div5 , div4 ) ;
append _dev ( div4 , p0 ) ;
append _dev ( p0 , t3 ) ;
append _dev ( div4 , t4 ) ;
append _dev ( div4 , div3 ) ;
append _dev ( div3 , div0 ) ;
append _dev ( div0 , h20 ) ;
append _dev ( h20 , t5 ) ;
append _dev ( div0 , t6 ) ;
append _dev ( div0 , img1 ) ;
append _dev ( div0 , t7 ) ;
append _dev ( div0 , p1 ) ;
append _dev ( p1 , t8 ) ;
append _dev ( div3 , t9 ) ;
append _dev ( div3 , div1 ) ;
append _dev ( div1 , h21 ) ;
append _dev ( h21 , t10 ) ;
append _dev ( div1 , t11 ) ;
append _dev ( div1 , img2 ) ;
append _dev ( div1 , t12 ) ;
append _dev ( div1 , p2 ) ;
append _dev ( p2 , t13 ) ;
append _dev ( div3 , t14 ) ;
append _dev ( div3 , div2 ) ;
append _dev ( div2 , h22 ) ;
append _dev ( h22 , t15 ) ;
append _dev ( div2 , t16 ) ;
append _dev ( div2 , img3 ) ;
append _dev ( div2 , t17 ) ;
append _dev ( div2 , p3 ) ;
append _dev ( p3 , t18 ) ;
/*div3_binding*/ ctx [ 5 ] ( div3 ) ;
} ,
p : function update ( ctx , dirty ) {
if ( dirty & /*$content*/ 4 && t3 _value !== ( t3 _value = /*$content*/ ctx [ 2 ] . top + "" ) ) set _data _dev ( t3 , t3 _value ) ;
if ( dirty & /*$content*/ 4 && t5 _value !== ( t5 _value = /*$content*/ ctx [ 2 ] . groupsTitle + "" ) ) set _data _dev ( t5 , t5 _value ) ;
if ( dirty & /*$content*/ 4 && t8 _value !== ( t8 _value = /*$content*/ ctx [ 2 ] . groupsText + "" ) ) set _data _dev ( t8 , t8 _value ) ;
if ( dirty & /*$content*/ 4 && t10 _value !== ( t10 _value = /*$content*/ ctx [ 2 ] . communitiesTitle + "" ) ) set _data _dev ( t10 , t10 _value ) ;
if ( dirty & /*$content*/ 4 && t13 _value !== ( t13 _value = /*$content*/ ctx [ 2 ] . communitiesText + "" ) ) set _data _dev ( t13 , t13 _value ) ;
if ( dirty & /*$content*/ 4 && t15 _value !== ( t15 _value = /*$content*/ ctx [ 2 ] . cooperativesTitle + "" ) ) set _data _dev ( t15 , t15 _value ) ;
if ( dirty & /*$content*/ 4 && t18 _value !== ( t18 _value = /*$content*/ ctx [ 2 ] . cooperativesText + "" ) ) set _data _dev ( t18 , t18 _value ) ;
if ( dirty & /*gridWidth*/ 2 ) {
set _style ( div3 , "--grid-width" , /*gridWidth*/ ctx [ 1 ] ) ;
}
} ,
d : function destroy ( detaching ) {
if ( detaching ) detach _dev ( div5 ) ;
/*div3_binding*/ ctx [ 5 ] ( null ) ;
}
} ;
dispatch _dev ( "SvelteRegisterBlock" , {
block ,
id : create _if _block . name ,
type : "if" ,
source : "(36:4) {#if Object.keys($content).length!=0}" ,
ctx
} ) ;
return block ;
}
function create _fragment ( ctx ) {
let show _if = Object . keys ( /*$content*/ ctx [ 2 ] ) . length != 0 ;
let if _block _anchor ;
let if _block = show _if && create _if _block ( ctx ) ;
const block = {
c : function create ( ) {
if ( if _block ) if _block . c ( ) ;
if _block _anchor = empty ( ) ;
this . c = noop ;
} ,
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 ) ;
} ,
p : function update ( ctx , [ dirty ] ) {
if ( dirty & /*$content*/ 4 ) show _if = Object . keys ( /*$content*/ ctx [ 2 ] ) . length != 0 ;
if ( show _if ) {
if ( if _block ) {
if _block . p ( ctx , dirty ) ;
} else {
if _block = create _if _block ( ctx ) ;
if _block . c ( ) ;
if _block . m ( if _block _anchor . parentNode , if _block _anchor ) ;
}
} else if ( if _block ) {
if _block . d ( 1 ) ;
if _block = null ;
}
} ,
i : noop ,
o : noop ,
d : function destroy ( detaching ) {
if ( if _block ) if _block . d ( detaching ) ;
if ( detaching ) detach _dev ( if _block _anchor ) ;
}
} ;
dispatch _dev ( "SvelteRegisterBlock" , {
block ,
id : create _fragment . name ,
type : "component" ,
source : "" ,
ctx
} ) ;
return block ;
}
function instance ( $$self , $$props , $$invalidate ) {
let $content ;
let { $$slots : slots = { } , $$scope } = $$props ;
validate _slots ( 'landing-component' , slots , [ ] ) ;
let grid ;
let gridWidth ;
let loaded ;
let content = writable ( { } ) ;
validate _store ( content , 'content' ) ;
component _subscribe ( $$self , content , value => $$invalidate ( 2 , $content = value ) ) ;
function changeWidth ( locale ) {
if ( locale == "ru" ) {
$$invalidate ( 1 , gridWidth = "1.2fr 1.05fr 1fr" ) ;
} else {
$$invalidate ( 1 , gridWidth = "1.2fr 1.1fr 1fr" ) ;
}
}
let locale = loadLocaleContent ( content , "landing-component" , loaded , changeWidth ) ;
changeWidth ( locale ) ;
onMount ( ( ) => {
} ) ;
const writable _props = [ ] ;
Object _1 . keys ( $$props ) . forEach ( key => {
if ( ! ~ writable _props . indexOf ( key ) && key . slice ( 0 , 2 ) !== '$$' && key !== 'slot' ) console . warn ( ` <landing-component> was created with unknown prop ' ${ key } ' ` ) ;
} ) ;
function div3 _binding ( $$value ) {
binding _callbacks [ $$value ? 'unshift' : 'push' ] ( ( ) => {
grid = $$value ;
$$invalidate ( 0 , grid ) ;
} ) ;
}
$$self . $capture _state = ( ) => ( {
onMount ,
loadLocaleContent ,
writable ,
grid ,
gridWidth ,
loaded ,
content ,
changeWidth ,
locale ,
$content
} ) ;
$$self . $inject _state = $$props => {
if ( 'grid' in $$props ) $$invalidate ( 0 , grid = $$props . grid ) ;
if ( 'gridWidth' in $$props ) $$invalidate ( 1 , gridWidth = $$props . gridWidth ) ;
if ( 'loaded' in $$props ) $$invalidate ( 3 , loaded = $$props . loaded ) ;
if ( 'content' in $$props ) $$invalidate ( 4 , content = $$props . content ) ;
if ( 'locale' in $$props ) locale = $$props . locale ;
} ;
if ( $$props && "$$inject" in $$props ) {
$$self . $inject _state ( $$props . $$inject ) ;
}
return [ grid , gridWidth , $content , loaded , content , div3 _binding ] ;
}
class Landing _component extends SvelteElement {
constructor ( options ) {
super ( ) ;
this . shadowRoot . innerHTML = ` <style>@import '/css/common.css';#container-grid>div>h2{text-align:center}#groups-img,#communities-img,#coops-img{position:absolute;left:50%;transform:translate(-50%);z-index:0;opacity:0.2;height:8rem}#text-container{max-width:calc(100vw - 4rem);margin:auto}#crowd{width:100%;margin-bottom:2rem}#container{margin:auto;max-width:1000px;margin-top:2rem;margin-bottom:5rem}#container>div>p{margin-bottom:1rem}#container p{text-align:justify}#container-grid{display:grid;grid-template-columns:var(--grid-width);grid-gap:4rem;margin-top:2rem}#container-grid>div{position:relative}#container-grid>div>p{position:relative;margin-top:5rem;z-index:2}@media only screen and (max-width: 1060px){#container-grid{display:grid;grid-template-columns:1fr;grid-gap:2rem}}</style> ` ;
init (
this ,
{
target : this . shadowRoot ,
props : attribute _to _object ( this . attributes ) ,
customElement : true
} ,
instance ,
create _fragment ,
safe _not _equal ,
{ } ,
null
) ;
if ( options ) {
if ( options . target ) {
insert _dev ( options . target , this , options . anchor ) ;
}
}
}
}
customElements . define ( "landing-component" , Landing _component ) ;
export { Landing _component as default } ;