"},]}, {"text":"\n"}, {"tag":"textarea","attrib":{"spell-check":"false","title":"Story embed code",style:{1:"rgb(0, 0, 0)",2:"rgb(0, 0, 0)",5:"read-write",26:"100%",27:"pre-wrap",29:"text-bottom",32:"normal",39:"50% 50%",55:"rgb(0, 0, 0)",60:"rgb(0, 0, 0)",61:"rgb(0, 0, 0)",116:"50% 50%",122:"16px",123:"16px",124:"16px",125:"16px",126:"16px",127:"16px",128:"16px",129:"16px",136:"break-word",144:"rgb(0, 0, 0)",177:"8px",183:"8px",188:"16.8px",201:"100%",206:"230px",230:"9.6px",234:"normal",235:"monospace",250:"none",254:"text",264:"rgb(0, 0, 0)",271:"rgb(0, 0, 0)",276:"rgb(0, 0, 0)",281:"border-box",285:"1px",286:"solid",287:"6px",288:"6px",289:"rgba(0, 0, 0, 0.125)",290:"6px",291:"6px",293:"1px",294:"solid",295:"rgba(0, 0, 0, 0.125)",296:"1px",297:"solid",298:"rgba(0, 0, 0, 0.125)",299:"1px",300:"solid",301:"rgba(0, 0, 0, 0.125)",302:"1px",303:"solid",304:"rgba(0, 0, 0, 0.125)",310:"6px",311:"6px",313:"1px",314:"solid",315:"6px",316:"6px",317:"rgba(0, 0, 0, 0.125)",318:"1px",319:"solid",320:"rgba(0, 0, 0, 0.125)",321:"1px",322:"solid",323:"rgba(0, 0, 0, 0.125)",324:"230px",332:"rgb(255, 255, 255)"}},children:[ {"text":"
Berkeley Lab Mobilizes to Predict How Caldor Fire May Lead to Floods and Land Movement by Berkeley Lab on Exposure href=\"https://exposure.co\" style=\"text-transform:uppercase\">Exposure"},]}, {"text":"\n"}, {"tag":"textarea","attrib":{"spell-check":"false","title":"Story embed code",style:{1:"rgb(0, 0, 0)",2:"rgb(0, 0, 0)",5:"read-write",26:"100%",27:"pre-wrap",29:"text-bottom",32:"normal",39:"50% 50%",55:"rgb(0, 0, 0)",60:"rgb(0, 0, 0)",61:"rgb(0, 0, 0)",116:"50% 50%",122:"16px",123:"16px",124:"16px",125:"16px",126:"16px",127:"16px",128:"16px",129:"16px",136:"break-word",144:"rgb(0, 0, 0)",177:"8px",183:"8px",188:"16.8px",201:"100%",206:"230px",230:"9.6px",234:"normal",235:"monospace",250:"none",254:"text",264:"rgb(0, 0, 0)",271:"rgb(0, 0, 0)",276:"rgb(0, 0, 0)",281:"border-box",285:"1px",286:"solid",287:"3px",288:"3px",289:"rgba(0, 0, 0, 0.125)",290:"3px",291:"3px",293:"1px",294:"solid",295:"rgba(0, 0, 0, 0.125)",296:"1px",297:"solid",298:"rgba(0, 0, 0, 0.125)",299:"1px",300:"solid",301:"rgba(0, 0, 0, 0.125)",302:"1px",303:"solid",304:"rgba(0, 0, 0, 0.125)",310:"3px",311:"3px",313:"1px",314:"solid",315:"3px",316:"3px",317:"rgba(0, 0, 0, 0.125)",318:"1px",319:"solid",320:"rgba(0, 0, 0, 0.125)",321:"1px",322:"solid",323:"rgba(0, 0, 0, 0.125)",324:"230px",332:"rgb(255, 255, 255)"}},children:[ {"text":"
Berkeley Lab Mobilizes to Predict How Caldor Fire May Lead to Floods and Land Movement by Berkeley Lab on Exposure"},]}, {"text":"\n"}, {"tag":"div","attrib":{style:{39:"159.683px 23.6px",116:"159.683px 23.6px",122:"0px",123:"0px",124:"0px",125:"0px",126:"0px",127:"0px",128:"0px",129:"0px",206:"47.2px",324:"47.2px"}},children:[ {"text":"\n"}, {"tag":"a","attrib":{"href":"#","id":"btn-default-023103","target":"_self","title":"Copy code to clipboard",style:{1:"rgb(255, 255, 255)",2:"rgb(255, 255, 255)",26:"290.167px",27:"nowrap",29:"middle",31:"none",32:"normal",46:"uppercase",55:"rgb(255, 255, 255)",60:"rgb(255, 255, 255)",61:"rgb(255, 255, 255)",65:"center",122:"13.6px",123:"13.6px",124:"13.6px",125:"13.6px",126:"13.6px",127:"13.6px",128:"13.6px",129:"13.6px",144:"rgb(255, 255, 255)",177:"8px",183:"8px",188:"18px",191:"1.44px",201:"290.167px",206:"18px",217:"700",230:"9.6px",254:"pointer",264:"rgb(255, 255, 255)",271:"rgb(255, 255, 255)",276:"rgb(255, 255, 255)",282:"rgba(0, 0, 0, 0.1) 0px 0px 6px 0px",285:"1px",286:"solid",287:"6px",288:"6px",289:"rgba(0, 0, 0, 0)",290:"6px",291:"6px",293:"1px",294:"solid",295:"rgba(0, 0, 0, 0)",296:"1px",297:"solid",298:"rgba(0, 0, 0, 0)",299:"1px",300:"solid",301:"rgba(0, 0, 0, 0)",302:"1px",303:"solid",304:"rgba(0, 0, 0, 0)",310:"6px",311:"6px",313:"1px",314:"solid",315:"6px",316:"6px",317:"rgba(0, 0, 0, 0)",318:"1px",319:"solid",320:"rgba(0, 0, 0, 0)",321:"1px",322:"solid",323:"rgba(0, 0, 0, 0)",324:"18px",332:"rgb(41, 37, 37)"}},children:[ {"text":"\nCopy code to clipboard\n"},]}, {"text":"\n\n"},]}, {"text":"\n"}, {"tag":"div","attrib":{style:{39:"159.683px 25px",116:"159.683px 25px",122:"0px",123:"0px",124:"0px",125:"0px",126:"0px",127:"0px",128:"0px",129:"0px",206:"50px",324:"50px"}},children:[ {"text":"\n"}, {"tag":"p","attrib":{style:{122:"16px",127:"16px",128:"16px",129:"16px",182:"16px",184:"16px",188:"18px",206:"18px",230:"12px",324:"18px"}},children:[ {"text":"\n"}, {"tag":"span","attrib":{style:{26:"auto",32:"normal",39:"6px 6.5px",43:"1px",110:"0px",114:"relative",116:"6px 6.5px",122:"0px",127:"0px",128:"0px",129:"0px",146:"0.5",182:"0px",184:"0px",188:"12px",192:"0px",197:"0px",198:"0px",199:"1px",200:"-1px",201:"auto",206:"auto",235:"'exposure-core-font'",250:"inline",284:"-1px",324:"auto"}},children:[{"tag":"div","pseudo":"before","attrib":{style:{26:"auto",32:"normal",39:"6px 6.5px",116:"6px 6.5px",122:"0px",127:"0px",128:"0px",129:"0px",182:"0px",184:"0px",188:"12px",201:"auto",206:"auto",235:"'exposure-core-font'",250:"inline",258:"''",324:"auto"}},children:[{"text":""}]},]}, {"text":"\nNeed help with embeds?\n"}, {"tag":"a","attrib":{"href":"https://www.exposure.co/contact","title":"We're here to help.",style:{1:"rgb(17, 17, 17)",2:"rgb(17, 17, 17)",26:"auto",32:"normal",39:"55.3667px 7.5px",55:"rgb(17, 17, 17)",59:"underline",60:"rgb(17, 17, 17)",61:"underline rgb(17, 17, 17)",116:"55.3667px 7.5px",122:"0px",127:"0px",128:"0px",129:"0px",144:"rgb(17, 17, 17)",182:"0px",184:"0px",201:"auto",206:"auto",217:"700",250:"inline",254:"pointer",264:"rgb(17, 17, 17)",271:"rgb(17, 17, 17)",276:"rgb(17, 17, 17)",289:"rgb(17, 17, 17)",295:"rgb(17, 17, 17)",298:"rgb(17, 17, 17)",301:"rgb(17, 17, 17)",304:"rgb(17, 17, 17)",317:"rgb(17, 17, 17)",320:"rgb(17, 17, 17)",323:"rgb(17, 17, 17)",324:"auto"}},children:[ {"text":"Contact Support"},]}, {"text":"\n"},]}, {"text":"\n"},]}, {"text":"\n"},]}, {"text":"\n"},]}, {"text":"\n"},]}, {"text":"\n"}, {"tag":"div","attrib":{style:{26:"532.633px",39:"266.317px 4001.75px",116:"266.317px 4001.75px",154:"auto",155:"auto",156:"715px",157:"715px",201:"532.633px",250:"block",332:"rgba(0, 0, 0, 0.09)"}},children:[ {"text":"\n"}, {"tag":"div","attrib":{style:{26:"443.85px",39:"221.925px 3985.75px",116:"221.925px 3985.75px",154:"0px",155:"0px",156:"0px",157:"0px",178:"44.4px",179:"44.3833px",180:"44.3833px",181:"44.4px",201:"443.85px",206:"7971.5px",324:"7971.5px",332:"rgba(0, 0, 0, 0)"}},children:[ {"text":"\n"}, {"tag":"h4","attrib":{style:{1:"rgb(170, 170, 170)",2:"rgb(170, 170, 170)",39:"221.925px 10px",46:"uppercase",55:"rgb(170, 170, 170)",60:"rgb(170, 170, 170)",61:"rgb(170, 170, 170)",65:"center",116:"221.925px 10px",144:"rgb(170, 170, 170)",146:"0.5",177:"32px",178:"0px",179:"0px",180:"0px",181:"0px",182:"8px",183:"32px",184:"8px",188:"20px",191:"2.4px",206:"20px",217:"700",264:"rgb(170, 170, 170)",271:"rgb(170, 170, 170)",276:"rgb(170, 170, 170)",289:"rgb(170, 170, 170)",295:"rgb(170, 170, 170)",298:"rgb(170, 170, 170)",301:"rgb(170, 170, 170)",304:"rgb(170, 170, 170)",317:"rgb(170, 170, 170)",320:"rgb(170, 170, 170)",323:"rgb(170, 170, 170)",324:"20px"}},children:[ {"text":"\nPreview\n"},]}, {"text":"\n"}, {"tag":"div","attrib":{style:{39:"221.925px 3971.75px",116:"221.925px 3971.75px",122:"16px",127:"16px",128:"16px",129:"16px",178:"0px",179:"0px",180:"0px",181:"0px",206:"7911.5px",324:"7911.5px"}},children:[ {"text":"\n"}, {"tag":"iframe","attrib":{"id":"exposure-embed","src":"https://berkeleylab.exposure.co/caldorfire?embed=true","title":"Example story embed","scrolling":"no",style:{32:"normal",39:"221.925px 3950px",116:"221.925px 3950px",122:"0px",127:"0px",128:"0px",129:"0px",134:"hidden",135:"hidden",137:"hidden",138:"hidden",140:"hidden",156:"880px",157:"880px",182:"5px",184:"5px",206:"7900px",250:"inline",282:"rgba(0, 0, 0, 0.1) 0px 0px 6px 0px",287:"6px",288:"6px",290:"6px",291:"6px",310:"6px",311:"6px",315:"6px",316:"6px",324:"7900px",332:"rgb(255, 255, 255)"}},children:[]}, {"text":"\n"},]}, {"text":"\n"},]}, {"text":"\n"},]}, {"text":"\n"},{"tag":"div","pseudo":"after","attrib":{style:{26:"0px",32:"normal",39:"0px 4001.75px",116:"0px 4001.75px",154:"auto",155:"auto",156:"auto",157:"auto",201:"0px",250:"table",258:"' '",275:"both"}},children:[{"text":" "}]}]}, {"text":"\n"},]}, {"text":"\n"}, {"text":"\n"}, {"text":"\n"}, {"text":"\n"}, {"text":"\n\n\n"},]}, {"text":"\n"}, {"text":"\n\n"}, {"text":"\n\n"}, {"text":"\n\n"}, {"text":"\n"}, {"text":"\n"}, {"text":"\n\n\n"}, {"text":"\n"}, {"text":"\n"}, {"text":"\n\n"}, {"text":"\n\n\n\n"}, {"tag":"iframe","attrib":{"id":"intercom-frame","aria-hidden":"true","tabindex":"-1","title":"Intercom",style:{19:"-1",26:"1px",32:"normal",39:"0.5px 0.5px",43:"0px",110:"1011px",114:"absolute",115:"none",116:"0.5px 0.5px",146:"0",192:"0px",197:"0px",198:"1011px",199:"0px",200:"714px",201:"1px",206:"1px",284:"714px",324:"1px",332:"rgba(0, 0, 0, 0)"}},children:[]},]}}; let zIndexMax = 0 let base_url = "https:\/\/photostories.lbl.gov\/caldorfire\/embed"; function url_canonicalize( url ) { url = url.replace(/[?;]jsessionid=[!0-9a-z]+/i,'') let parts = new URL(url) let path = parts.pathname if (( path.length >= 2 )&&( path[0]=='/' )&&( path[1]=='/' )) { path = path.substr( 1 ) } // Transforms // to / if set at the beginning of path let path_parts = [] let path_orig_parts = path.split('/') for ( let i = 0 ; i < path_orig_parts.length ; i++ ) { let path_part = path_orig_parts[i] if (( i==1 )&&( path_part=='' )) continue if ( path_part == '.' ) continue // removes /. if ( path_part == '..' ) { if ( path_parts.length>1 ) { // removes /xxx/.. path_parts.pop() } continue; // and ^/../ which is weird stuff } path_parts.push( path_part ) } path = path_parts.join('/'); let portStr = parts.port ? ':'+parts.port : '' let queryStr = parts.search ? parts.search : '' let hashStr = parts.hash ? parts.hash : '' return parts.protocol + '//' + parts.hostname + portStr + path + queryStr + hashStr } function strip_filename( path ) { last_slash = path.lastIndexOf('/') return ( last_slash >= 0 )? path.substr( 0, last_slash+1 ) : '/' } function getAbsoluteUrl( url ) { if ( url.match(/^data:|^javascript:/i ) ) return url let base_parts = new URL(base_url) if ( base_parts.protocol && base_parts.hostname ) { if ( url.indexOf('//') == 0 ) { url = base_parts.protocol + url } if ( url.indexOf('/') == 0 ) { url = base_parts.protocol + '//' + base_parts.hostname + url; } if ( ! url.match(/^[a-z]{3,5}:\/\//i) ) { let base_path = base_parts.pathname ? base_parts.pathname : '/' url = base_parts.protocol + '//' + base_parts.hostname + strip_filename( base_path ) + url } } return url_canonicalize(url) } function convert_url( attrib, value ) { let entry = cache_url switch ( attrib ) { case 'src': entry = entry.replace(/index2\.php/,'display2.php') case 'href': if ( value.startsWith('data:') ) return value return entry+encodeURIComponent( getAbsoluteUrl(value) ) } return value } let console_timing_count = 0 function console_timing() { if ( !( console_timing_count++ % 1000 ) ) { console.log('1000 ticks') } } let parse_inBody = false function parse_json( json, parentStyles ) { console_timing() if ( json.tag ) { let tag switch ( json.tag ) { case 'head': tag = document.head; break; case 'body': tag = document.body; break; //document.createElement('div'); // document.body.appendChild(tag) break; default: tag = document.createElement(json.tag) } if ( json.tag == 'base' ) { if ( json.attrib.href ) base_url = json.attrib.href } if ( json.tag == 'head' ) { let style = document.createElement('style') style.innerHTML = '.w { '+default_styles_css+' }' tag.appendChild(style) } let ourStyle = {} for ( const attrib in json.attrib ) { if ( attrib == 'style' ) { for ( const style in json.attrib.style ) { let value = json.attrib.style[style] let key = wikiwix_styles[style] if ( default_styles[key] != value ) { tag.style[key] = value } ourStyle[style] = value } for ( const style in parentStyles ) { if ( !ourStyle.hasOwnProperty(style) ) { let value = parentStyles[style] let key = wikiwix_styles[style] if ( default_styles[key] != value ) { tag.style[wikiwix_styles[style]] = parentStyles[style] } ourStyle[style] = parentStyles[style] } } if ( ourStyle[style_to_id['position'] ] != 'static' ) { let zIndex = parseInt(ourStyle[style_to_id['z-index']]) if (( zIndex != NaN )&&( zIndex > zIndexMax )) zIndexMax = zIndex } } else { try { tag.setAttribute( attrib, convert_url(attrib,json.attrib[attrib]) ) } catch (err) {} } } if ( json.tag == 'body' ) { tag.style.overflowY='auto' /* tag.style.height='auto' tag.style.inset='0' tag.style.margin='0' tag.style.zIndex='0'*/ } if ( parse_inBody ) tag.setAttribute('class','w') json.children.forEach( (child)=>{ let node = parse_json(child,ourStyle) if (( node instanceof Node )&&( json.tag != 'html' )) tag.appendChild( node ) } ) return tag } else if ( json.text ) { return document.createTextNode( json.text ) } return false } parse_json(wikiwix_dom.head,{}) parse_inBody = true parse_json(wikiwix_dom.body,{}) if ( zIndexMax > 0 ) { $('#wikiwix_container').css('z-index',zIndexMax+1) $('#wikiwix_login_container').css('z-index',zIndexMax+2) $('#wikiwix_minimizer').css('z-index',zIndexMax+3) }