diff --git a/application/modules/default/views/scripts/product/index.phtml b/application/modules/default/views/scripts/product/index.phtml index d6592df47..c93c45095 100644 --- a/application/modules/default/views/scripts/product/index.phtml +++ b/application/modules/default/views/scripts/product/index.phtml @@ -1,1165 +1,1228 @@ . **/ $helpAddDefaultScheme = new Default_View_Helper_AddDefaultScheme(); $helpMemberUrl = new Default_View_Helper_BuildMemberUrl(); $helpEncryptUrl = new Default_View_Helper_EncryptUrl(); $helpImage = new Default_View_Helper_Image(); $helpTruncate = new Default_View_Helper_Truncate(); $helpProductUrl = new Default_View_Helper_BuildProductUrl(); $helpBBCode = new Default_View_Helper_Bbcode2html(); $identity = Zend_Auth::getInstance()->getStorage()->read(); $loginUrl = '/login?redirect=' . $helpEncryptUrl->encryptUrl(Zend_Controller_Front::getInstance()->getRequest() ->getRequestUri(), true); $viewSidebar = 'product/partials/productAboutSidebar.phtml'; $viewClaimBox = false; if ($this->product->claimable == 1) { $viewClaimBox = 'product/partials/productClaimTopHeader.phtml'; } $helpProjectFiles = new Default_View_Helper_ProjectFiles(); $productFileInfos = $helpProjectFiles->projectFiles($this->product->ppload_collection_id); $this->product->title = Default_Model_HtmlPurify::purify($this->product->title); $this->product->description = Default_Model_BBCode::renderHtml(Default_Model_HtmlPurify::purify($this->product->description)); $this->product->version = Default_Model_HtmlPurify::purify($this->product->version); //$this->product->embed_code =Default_Model_HtmlPurify::purify($this->product->embed_code,Default_Model_HtmlPurify::ALLOW_EMBED); $this->product->link_1 = Default_Model_HtmlPurify::purify($helpAddDefaultScheme->addDefaultScheme($this->product->link_1),Default_Model_HtmlPurify::ALLOW_URL); $this->product->source_url = Default_Model_HtmlPurify::purify($this->product->source_url,Default_Model_HtmlPurify::ALLOW_URL); $this->product->facebook_code = Default_Model_HtmlPurify::purify($this->product->facebook_code,Default_Model_HtmlPurify::ALLOW_URL); $this->product->twitter_code = Default_Model_HtmlPurify::purify($this->product->twitter_code,Default_Model_HtmlPurify::ALLOW_URL); $this->product->google_code = Default_Model_HtmlPurify::purify($this->product->google_code,Default_Model_HtmlPurify::ALLOW_URL); $this->doctype(Zend_View_Helper_Doctype::XHTML1_RDFA); $this->headMeta()->setName('description', $helpTruncate->truncate($this->product->description, 200, '...', false, true)); $this->headMeta()->setName('title', $helpTruncate->truncate($this->product->title, 200, '...', false, true)); $this->headMeta()->appendProperty('og:url', $helpProductUrl->buildProductUrl($this->product->project_id, '', null, true)); $this->headMeta()->appendProperty('og:type', 'website'); $this->headMeta()->appendProperty('og:title', $this->product->title); $this->headMeta()->appendProperty('og:description', $helpTruncate->truncate($this->product->description, 200, '...', false, true)); $this->headMeta()->appendProperty('og:image', $helpImage->Image($this->product->image_small, array('width' => 400, 'height' => 400))); $tableProject = new Default_Model_Project(); $tableCollection = new Default_Model_Collection(); $tableProjectUpdates = new Default_Model_ProjectUpdates(); $this->updates = $tableProjectUpdates->fetchProjectUpdates($this->product->project_id); $tableProjectRatings = new Default_Model_DbTable_ProjectRating(); $this->ratings = $tableProjectRatings->fetchRating($this->product->project_id); $cntRatingsActive = 0; foreach ($this->ratings as $p) { if($p['rating_active']==1) $cntRatingsActive =$cntRatingsActive+1; } if (Zend_Auth::getInstance()->hasIdentity()){ $this->ratingOfUser = $tableProjectRatings->getProjectRateForUser($this->product->project_id,$identity->member_id); } $tableProjectFollower = new Default_Model_DbTable_ProjectFollower(); $this->likes = $tableProjectFollower->fetchLikesForProject($this->product->project_id); $projectplings = new Default_Model_ProjectPlings(); $this->projectplings = $projectplings->fetchPlingsForProject($this->product->project_id); $tagmodel = new Default_Model_Tags(); $helperUserRole = new Backend_View_Helper_UserRole(); $userRoleName = $helperUserRole->userRole(); $this->userRoleName = $userRoleName; $productJson = Zend_Json::encode($this->product); $filesJson = $this->filesJson; $helperCatXdgType = new Default_View_Helper_CatXdgType(); $xdgTypeJson = Zend_Json::encode($helperCatXdgType->catXdgType($this->product->project_category_id)); $isowner = false; if(Zend_Auth::getInstance()->hasIdentity() && $identity->member_id==$this->product->member_id){ $isowner = true; } $this->isowner = $isowner; $filesTable = new Default_Model_DbTable_PploadFiles(); $countFiles = $filesTable->fetchFilesCntForProject($this->product->ppload_collection_id); +$this->galleryPictures = $tableProject->getGalleryPictureSources($this->product->project_id); +if(sizeof($this->galleryPictures)==0) $pics= $tableProject->getGalleryPictureSources($this->product->project_id); if(sizeof($pics)==0) { + $this->galleryPictures = array($this->product->image_small); array_push($pics,$this->product->image_small); } +foreach ($this->galleryPictures as &$value) { + $value = $this->Image($value, array('height' => '600')); $this->galleryPictures=array(); foreach ($pics as $p) { $this->galleryPictures[] = $this->Image($p, array('height' => '600')); } $galleryPicturesJson = Zend_Json::encode($this->galleryPictures); ?> + + + + + + + + + + + + + + + + +
hasIdentity()) { ?> hasIdentity()) { ?> hasIdentity()) { ?> +
product->link_1)): ?> product->title; ?> product->title; ?> translate('Edit Product') ?> product->featured=='1'){ ?> Featured isProjectOriginal($this->product->project_id)){?> Original

product->project_category_id . '/order/latest">' . $this->product->cat_title . ' '; ?> '; $tagsuser = $tagmodel->getTagsUser($this->product->project_id, Default_Model_Tags::TAG_TYPE_PROJECT); echo ''; if(false === empty($tagsuser)) { foreach (explode(',',$tagsuser) as $tag) { ?> '; if($isowner){ $this->headLink()->appendStylesheet('/theme/flatui/css/select2.min.css'); $this->headLink()->appendStylesheet('/theme/flatui/css/select2.custmized.css'); $this->inlineScript()->appendFile('/theme/flatui/js/lib/select2.min.js'); ?> Saved inlineScript()->appendScript( ' $(document).ready(function(){ TagingProductDetail.setup(); }); '); } echo ''; ?>

Source (link to git-repo or to original if based on someone elses unmodified work): product->gitlab_project_id)) { $url = $this->gitlab_project['web_url']; $url = str_replace("http://", "https://", $url); echo ' ' . $url . ' '; } else if (false === empty($this->product->source_url)) { $target='_blank'; if (strpos($this->product->source_url, 'opencode.net') !== false) { $target='_self'; } echo '' . $this->product->source_url . ' '; if (Default_Model_DbTable_MemberRole::ROLE_NAME_ADMIN == $userRoleName) { $cntSameSource = $tableProject->getCountSourceurl($this->product->source_url); if($cntSameSource>1){ $link = '/p/'.$this->product->project_id.'/listsamesourceurl'; echo ' ['.$cntSameSource.']'; } } } else { echo ' Add the source-code for this project on opencode.net'; } ?>

partial( '/product/partials/projectlike.phtml', array( "authMember" => $identity, "project_id" => $this->product->project_id ) ); ?>
+ +
render('partials/sidebarRating.phtml'); ?>
+ +
render('partials/sidebarScore.phtml'); ?>
+
+
product->is_gitlab_project && $this->product->use_gitlab_project_readme && null != $this->gitlab_project['readme_url']) { ?> +
Description:

readme ?>

+
Description:

product->description ?> + +
updates) > 0) { $this->productUpdate = $this->updates[0]; ?>
Last changelog: render('product/partials/productUpdatesV1.phtml'); ?>
paramPageId; $testComments = $modelComments->getCommentTreeForProject($this->product->project_id); $testComments->setItemCountPerPage(25); $testComments->setCurrentPageNumber($offset); $this->comments = $testComments; echo $this->render('product/partials/productCommentsUX1.phtml'); ?>
partial( $viewClaimBox, array( "member" => $this->member, "product" => $this->product ) ); } ?>
product->embed_code)): ?> product->embed_code ?>
updates) > 0) { ?>
updates as $this->productUpdate) { echo $this->render('product/partials/productUpdatesV1.phtml'); } ?>
product->show_gitlab_project_issues) { ?>
gitlab_project_issues; $i = 0; foreach ($issues as $issue){ $date = date('Y-m-d H:i:s', strtotime($issue['created_at'])); echo '
' . $issue['title'] . '
'.$this->printDate($date).'
'; $i ++; if($i>5) { break; } } ?> Show all gitlab_project['open_issues_count'] ?> Issues
+
render('product/partials/productRating.phtml'); ?>
+ +
render('product/partials/productRating2.phtml'); ?>
+ likes) > 0) { ?>
render('product/partials/productLikes.phtml'); ?>
projectplings) > 0) { ?>
render('product/partials/productPlings.phtml'); ?>
render('product/partials/ppload.phtml'); ?>
product->claimable)) { ?>
partial( '/product/partials/projectplings.phtml', array( "authMember" => $identity, "project_id" => $this->product->project_id, "ppload_collection_id" => $this->product->ppload_collection_id, "project_category_id" => $this->product->project_category_id ) ); ?>
render('partials/sidebarRating.phtml'); */ ?>
*/ ?> countAllCollectionsForProject($this->product->project_id); if($cntCollections>0) { ?>
moreProducts = $tableCollection->fetchAllCollectionsForProject($this->product->project_id, 6); $this->moreProductsTitle = 'Is part of these Collections'; if (count($this->moreProducts) > 0) { echo $this->render('product/partials/productMoreProductsWidgetV1.phtml'); } ?>
*Needs ocs-url or ocs-store to install things
fetchOrigins($this->product->project_id); $this->moreProducts = $origins; $this->moreProductsTitle = 'Based on'; if (count($this->moreProducts) > 0) { echo $this->render('product/partials/productCloneFrom.phtml'); } ?> fetchRelatedProducts($this->product->project_id); $bflag = false; foreach ($related as $r){ $rid = $r->project_id; $bflag = false; foreach ($origins as $o){ $oid = $o->project_id; if($rid == $oid){ $bflag = true; break; } } if(!$bflag) { $relatednew[] = $r; } } $this->moreProducts = $relatednew; $this->moreProductsTitle = 'Variants'; if (count($this->moreProducts) > 0) { echo $this->render('product/partials/productCloneFrom.phtml'); } ?>
moreProducts = $tableProject->fetchMoreProjects($this->product, 6); $this->moreProductsTitle = 'More ' . $this->product->cat_title . ' from ' . $this->product->username; if (count($this->moreProducts) > 0) { echo $this->render('product/partials/productMoreProductsWidgetV1.phtml'); } ?>
moreProducts = $tableProject->fetchMoreProjectsOfOtherUsr($this->product, 6); $this->moreProductsTitle = 'Other ' . $this->product->cat_title; if (count($this->moreProducts) > 0) { echo $this->render('product/partials/productMoreProductsWidgetV1.phtml'); } ?>
render('partials/sidebarCcLicense.phtml'); ?> + isProjectEbook($this->product->project_id)) { echo $this->render('product/partials/ebook_details.phtml'); } + * + */ ?> render('product/partials/details.phtml'); ?> render('product/partials/tags.phtml'); ?>
+ inlineScript()->appendScript( ' $(document).ready(function(){ InitActiveHashTab.setup(); PartialJson.setup(); PartialJsonFraud.setup(); PartialJsonClone.setup(); ProductDetailCarousel.setup(); PartialCommentReviewForm.setup(); PartialCommentReviewFormNew.setup(); PartialsButtonHeartDetail.setup(); PartialsButtonPlingProject.setup(); TooltipUser.setup("tooltipuserleft","left"); AppimagequestionOnClick.setup(); Opendownloadfile.setup(); CreateScoreRatingPopup.setup(); $(\'.tooltipheart\').tooltipster({theme: [\'tooltipster-light\', \'tooltipster-light-customized\'], contentCloning: true, contentAsHTML: true, interactive: true}); }); '); diff --git a/application/modules/default/views/scripts/product/partials/details.phtml b/application/modules/default/views/scripts/product/partials/details.phtml index 747346447..b3a39e194 100644 --- a/application/modules/default/views/scripts/product/partials/details.phtml +++ b/application/modules/default/views/scripts/product/partials/details.phtml @@ -1,357 +1,367 @@ . **/ $tableProject = new Default_Model_Project(); $this->product_views = $tableProject->fetchProjectViews($this->product->project_id); $helperUserRole = new Backend_View_Helper_UserRole(); $userRoleName = $helperUserRole->userRole(); $tableTags = new Default_Model_Tags(); $tagsArray = $tableTags->getTagsArray($this->product->project_id, $tableTags::TAG_TYPE_PROJECT, $tableTags::TAG_GHNS_EXCLUDED_GROUPID); $isGhnsExcluded = false; if(isset($tagsArray) && (count($tagsArray) == 1)) { $isGhnsExcluded = true; } $filesTable = new Default_Model_DbTable_PploadFiles(); $countDownloadsToday = $filesTable->fetchCountDownloadsTodayForProject($this->product->ppload_collection_id); $mediaViewsTable = new Default_Model_DbTable_MediaViews(); $countMediaViewsToday = $mediaViewsTable->fetchCountViewsTodayForProject($this->product->project_id); $countMediaViewsAlltime = $mediaViewsTable->fetchCountViewsForProjectAllTime($this->product->project_id); $countPageviews = $this->projectDetailCounts($this->product->project_id); $countPageviewsTotal = 0; $countPageviewsToday = $countPageviews[0]['count_views']; if(sizeof($countPageviews)==2) $countPageviewsTotal = $countPageviews[1]['count_views']; // $heute = date("Y-m-d H:i:s"); $today = (new DateTime())->modify('-1 day'); $filterDownloadToday = $today->format("Y-m-d H:i:s"); ?>
Details
license
product->project_license_title; ?>
version
product->project_version); ?>
product->project_changed_at) { ?>
updated printDate($this->product->project_changed_at) ?>
major updated printDate($this->product->project_major_updated_at) ?>
added printDate($this->product->project_created_at) ?>
downloads today
video views today
video views total
page views today
page views total
+
+ video views today + +
+ +
+ video views total + +
+
spam reports fetchReportsSpamCnt($this->product->project_id) ?>
misuse reports fetchReportsMisuseCnt($this->product->project_id)?>
link to hive delete product
(remember the cache) after you change some value below and refresh the page you may encounter some differences to your changes
product->spam_checked == 1 ? ' checked=\'checked\' ' : ''; ?> /> spam checked product->featured == 1 ? ' checked=\'checked\' ' : ''; ?> /> featured /> ghns-excluded product->pling_excluded == 1 ? ' checked=\'checked\' ' : ''; ?> /> pling-excluded /> ghns-excluded
inlineScript()->appendScript( ' $(document).ready(function(){ GhnsExcludedClick.setup('.$this->product->project_id.'); }); '); } diff --git a/httpdocs/theme/react/product-media-slider/app/book-reader.js b/httpdocs/theme/react/product-media-slider/app/book-reader.js index 3c9a978a2..c61eaf84e 100644 --- a/httpdocs/theme/react/product-media-slider/app/book-reader.js +++ b/httpdocs/theme/react/product-media-slider/app/book-reader.js @@ -1,52 +1,61 @@ + + + + + + + + + import React, { useState } from 'react'; function BookReaderWrapper(props){ const [ renditionState , setRenditionState ] = useState() React.useEffect(() => { var book = ePub(props.slide.url); var rendition = book.renderTo("book-container", { flow: "paginated", width: props.width - 40, height: props.height - 40}); setRenditionState(rendition) var displayed = rendition.display(); book.ready.then((book) => { console.log(book); /*let meta = book.package.metadata; // Metadata from the package json let toc = book.navigation.toc; // Table of Contents let landmarks = book.navigation.landmarks; // landmarks let spine = book.spine; // landmarks let cover = book.cover; // landmarks let resources = book.resources; // landmarks let pageList = book.pageList; // page list (if present) console.log(meta); console.log(toc); console.log(landmarks); console.log(spine); console.log(cover); console.log(resources); console.log(pageList);*/ }) },[]) function goPrev(){ renditionState.prev(); } function goNext(){ renditionState.next(); } return (
) } export default BookReaderWrapper; \ No newline at end of file diff --git a/httpdocs/theme/react/product-media-slider/app/product-media-slider.js b/httpdocs/theme/react/product-media-slider/app/product-media-slider.js index b3d664a5a..5fa252e42 100644 --- a/httpdocs/theme/react/product-media-slider/app/product-media-slider.js +++ b/httpdocs/theme/react/product-media-slider/app/product-media-slider.js @@ -1,427 +1,552 @@ import React, { useState } from 'react'; import ReactDOM from 'react-dom'; import {isMobile} from 'react-device-detect'; import VideoPlayerWrapper from './video-player'; import BookReaderWrapper from './book-reader'; +function ProductMediaSlider(){ function ProductMediaSlider(){ /* Component */ const [ product, setProduct ] = useState(window.product); + let galleryArray; + if (product.embed_code !== null || product.image_small !== null){ + const productMainSlide = product.embed_code !== null ? product.embed_code : product.image_small; + galleryArray = [ productMainSlide, ... window.galleryPicturesJson ]; let galleryArray = [] if (window.galleryPicturesJson) window.galleryPicturesJson.forEach(function(gp,index){ galleryArray.push({url:gp,type:'image'}); }); else galleryArray = [{url:product.image_small,type:'image'} ]; if (product.embed_code !== null && product.embed_code.length > 0) galleryArray = [{url:product.embed_code,type:'embed'}, ... galleryArray ]; if (window.filesJson) { window.filesJson.forEach(function(f,index){ if (f.type.indexOf('video') > -1 || f.type.indexOf('audio') > -1 || f.type.indexOf('epub') > -1){ let type; if (f.type.indexOf('video') > -1 || f.type.indexOf('audio') > -1 ) type = f.type.split('/')[0] else if (f.type.indexOf('epub') > -1 ) type = "book"; let url_preview, url_thumb; if (f.url_thumb) url_thumb = f.url_thumb.replace(/%2F/g,'/').replace(/%3A/g,':'); if (f.url_preview) url_preview = f.url_preview.replace(/%2F/g,'/').replace(/%3A/g,':'); const gItem = { url:f.url.replace(/%2F/g,'/').replace(/%3A/g,':'), collection_id:f.collection_id, type:type, file_id:f.id, title:f.title, url_thumb:url_thumb, url_preview:url_preview } galleryArray = [gItem, ... galleryArray] } }) } const [ gallery, setGallery ] = useState(galleryArray); const [ disableGallery, setDisableGallery ] = useState(gallery.length > 1 ? false : true) const parentContainerElement = document.getElementById('product-title-div'); const [ containerWidth, setContainerWidth ] = useState(parentContainerElement.offsetWidth); + const [ currentSlide, setCurrentSlide ] = useState(0) + const [ sliderWidth, setSliderWidth ] = useState(containerWidth * gallery.length); + const [ sliderHeight, setSliderHeight ] = useState(315); + const [ sliderPosition, setSliderPosition ] = useState(containerWidth * currentSlide); + const [ loading, setLoading ] = useState(true); const [ currentSlide, setCurrentSlide ] = useState(0); const [ sliderHeight, setSliderHeight ] = useState(360); const [ cinemaMode, setCinemaMode ] = useState(false); const [ isFullScreen, setIsFullScreen] = useState(false) + React.useEffect(() => { initProductMediaSlider() },[]) + React.useEffect(() => { updateDimensions() },[currentSlide]) const [ showPlaylist, setShowPlaylist ] = useState(false); const [ showSliderArrows, setShowSliderArrows ] = useState(isMobile === true ? true : false); const [ sliderFadeControlsMode, setSliderFadeControlsMode ] = useState(true); let sliderFadeControlTimeOut; // use effects React.useEffect(() => { initProductMediaSlider(currentSlide) },[currentSlide]) React.useEffect((event) => { updateDimensions(event,currentSlide) },[currentSlide, cinemaMode]) React.useEffect(() => { handleMouseMovementEventListener(showPlaylist,isFullScreen) },[showPlaylist,isFullScreen]) // init product media slider + function initProductMediaSlider(){ + window.addEventListener("resize", updateDimensions); + window.addEventListener("orientationchange", updateDimensions); + if (window.filesJson) checkForMediaFiles(); + else setLoading(false); function initProductMediaSlider(currentSlide){ window.addEventListener("resize", function(event){updateDimensions(event,currentSlide)}); window.addEventListener("orientationchange", function(event){updateDimensions(event,currentSlide)}); } + // check for media files + function checkForMediaFiles(){ + let mediaGalleryItems = [] + window.filesJson.forEach(function(f,index){ + console.log(f); + if (f.type.indexOf('video') > -1 || f.type.indexOf('audio') > -1) mediaGalleryItems.push(f.url_encoded) + }) + if (mediaGalleryItems.length > 0) { + const newGallery = [...gallery, mediaGalleryItems] + setGallery(newGallery); + } + setLoading(false); // handle mouse movement event listener function handleMouseMovementEventListener(showPlaylist,isFullScreen){ window.removeEventListener("mousemove",function(event){ onMouseMovement(event,showPlaylist,isFullScreen)}) window.removeEventListener("mousedown",function(event){ onMouseMovement(event,showPlaylist,isFullScreen)}) window.addEventListener("mousemove",function(event){ onMouseMovement(event,showPlaylist,isFullScreen) }); window.addEventListener("mousedown",function(event){ onMouseMovement(event,showPlaylist,isFullScreen) }); } // update dimensions function updateDimensions(){ const newContainerWidth = parentContainerElement.offsetWidth; setContainerWidth(newContainerWidth) + setSliderWidth(containerWidth * gallery.length); + setSliderPosition(containerWidth * currentSlide); document.getElementById('product-page-content').removeEventListener("DOMNodeRemoved", updateDimensions); document.getElementById('product-page-content').removeEventListener("DOMNodeInserted", updateDimensions); // if (cinemaMode === false) setSliderHeight(360) } + /* Render */ // on mouse movement function onMouseMovement(event,showPlaylist,isFullScreen){ const mediaSliderOffest = $('#media-slider').offset() const mediaSliderLeft = mediaSliderOffest.left; const mediaSliderRight = mediaSliderLeft + $('#media-slider').width(); const mediaSliderTop = mediaSliderOffest.top - window.pageYOffset; let mediaSliderBottom = mediaSliderTop + $('#media-slider').height(); if (showPlaylist) mediaSliderBottom += 110; else mediaSliderBottom += 30; let mouseIn = false; if (event.clientX > mediaSliderLeft && event.clientX < mediaSliderRight && event.clientY > mediaSliderTop && event.clientY < mediaSliderBottom ){ mouseIn = true; } if (isFullScreen) mouseIn = true; if (mouseIn) { setSliderFadeControlsMode(false) clearTimeout(sliderFadeControlTimeOut); sliderFadeControlTimeOut = setTimeout(function(){ setSliderFadeControlsMode(true) }, 2000); } else { setSliderFadeControlsMode(true) clearTimeout(sliderFadeControlTimeOut); } } + // slider container style + const sliderContainerStyle = { + width:sliderWidth+'px', + height:sliderHeight+'px' // toggle cinema mode function toggleCinemaMode(){ document.getElementById('product-page-content').addEventListener("DOMNodeRemoved", updateDimensions); document.getElementById('product-page-content').addEventListener("DOMNodeInserted", updateDimensions); const newCinemaMode = cinemaMode === true ? false : true; const targetParentElement = cinemaMode === true ? $('#product-main') : $('#product-page-content'); const targetChildPrependedElement = cinemaMode === true ? $('#product-title-div') : $('#product-media-slider-container'); $('#product-main-img-container').prependTo(targetParentElement); $(targetChildPrependedElement).prependTo('#product-main-img'); $("#product-media-slider-container").toggleClass("imgsmall"); $("#product-media-slider-container").toggleClass("imgfull"); setCinemaMode(newCinemaMode) } + // slider wrapper style + const sliderWrapperStyle = { + width:sliderWidth+'px', + left:'-'+sliderPosition+'px', + height:sliderHeight+'px' // toggle show playlist function toggleShowPlaylist(){ const newShowPlaylistValue = showPlaylist === true ? false : true; setShowPlaylist(newShowPlaylistValue) } + // prev / next slide arrow values + const prevCurrentSlide = currentSlide > 0 ? currentSlide - 1 : gallery.length - 1; + const nextCurrentSlide = currentSlide < (gallery.length - 1) ? ( currentSlide + 1 ) : 0; //handle full screen toggle function hanleFullScreenToggle(val){ setIsFullScreen(val); } // on finish slides render function onFinishedSlidesRender(){ $(document).ready(function() { window.mySwiper = new Swiper('.swiper-container', { speed: 400, initialSlide: 0, observer: true, observeParents: true, preloadImages: true, updateOnImagesReady: true, pagination: '.swiper-pagination', paginationClickable: '.swiper-pagination', threshold:50, onSlideChangeStart: function(swiper){ setCurrentSlide(swiper.activeIndex); } }); window.mySwiper.update() // if (isMobile) setShowPlaylist(true) }); } // on finished thumbs render function onfinishedThumbsRender(){ $(document).ready(function() { let slidesPerView = Math.ceil(containerWidth / 200); if (isMobile) slidesPerView = 2; window.galleryThumbs = new Swiper('.gallery-thumbs', { slidesPerView:slidesPerView, initialSlide: currentSlide, spaceBetween:10, freeMode: true, watchSlidesVisibility: true, watchSlidesProgress: true, activeIndex:currentSlide, scrollbar:'.swiper-scrollbar' }); window.galleryThumbs.update() }); } // on thumb item click function onThumbItemClick(slideIndex){ window.mySwiper.slideTo(slideIndex) } // go next function goNext(){ let nextSlide = window.mySwiper.activeIndex + 1; if (nextSlide > gallery.length - 1) nextSlide = 0; window.mySwiper.slideTo(nextSlide) } // go prev function goPrev(){ let prevSlide = window.mySwiper.activeIndex - 1; if (prevSlide < 0 ) prevSlide = gallery.length - 1; window.mySwiper.slideTo(prevSlide) } /* Render */ // media slider css class let mediaSliderCssClass = ""; if (disableGallery === true) mediaSliderCssClass += "disable-gallery "; if (cinemaMode === true) mediaSliderCssClass += "cinema-mode "; // if (showSliderArrows === false) mediaSliderCssClass += "hide-arrows "; if (showPlaylist === false) mediaSliderCssClass += "hide-playlist "; if (sliderFadeControlsMode === true) mediaSliderCssClass += "fade-controls "; if (isMobile === true) mediaSliderCssClass += "is-mobile "; // slides display + let slidesDisplay; + if (loading === false){ + slidesDisplay = gallery.map((s,index) => ( + ( setSliderHeight(height)} onUpdateDimensions={updateDimensions} onFullScreenToggle={hanleFullScreenToggle} /> )); let thumbnailNavigationDisplay; if (showPlaylist){ // thumbnail navigation const slidesThumbnailNavigationDisplay = gallery.map((g, index) => ( setSliderHeight(height)} onfinishedThumbsRender={onfinishedThumbsRender} onThumbItemClick={(slideIndex) => onThumbItemClick(slideIndex)} /> + )); )) thumbnailNavigationDisplay = (
{slidesThumbnailNavigationDisplay}
) } return ( +
+
+ setCurrentSlide(prevCurrentSlide)}> +
+ setCurrentSlide(e)} + /> {thumbnailNavigationDisplay}
) } function SlideItem(props){ + + const [mediaType, setMediaType ] = useState(''); + React.useEffect(() => { determineMediaType() },[]) + React.useEffect(() => { if (props.slideIndex === props.currentSlide) onSetParentSliderHeight() },[]) + React.useEffect(() => { if (props.slideIndex === props.currentSlide) onSetParentSliderHeight() },[props.currentSlide]) const [ mediaStyle, setMediaStyle ] = useState(); + function determineMediaType(){ + let initialMediaType; + if (props.slideUrl.indexOf(' -1) initialMediaType = "embed"; + else if (props.slideUrl.indexOf('.png') > -1 || props.slideUrl.indexOf('.jpg') > -1 || props.slideUrl.indexOf('.jpeg') > -1) initialMediaType = "image"; + else if (props.slideUrl.indexOf('.mp4') > -1) initialMediaType = "video"; + console.log(initialMediaType); + setMediaType(initialMediaType); + React.useEffect(() => { if (props.gallery && props.gallery.length === props.slideIndex + 1){ props.onFinishedSlidesRender(); } }, [props.gallery]) React.useEffect(() => { getSlideContentHeight(props.cinemaMode) },[props.currentSlide, props.cinemaMode]); function getSlideContentHeight(cinemaMode){ if (props.currentSlide === props.slideIndex){ if (props.slide.type === "image"){ const imageEl = document.getElementById('slide-img-'+props.slideIndex); if ( cinemaMode === true ){ let imageHeight = imageEl.naturalHeight; if (imageEl.naturalWidth > window.innerWidth){ let dimensionsPercentage = window.innerWidth / imageEl.naturalWidth; imageHeight = imageEl.naturalHeight * dimensionsPercentage; } setMediaStyle({height:imageHeight}) props.onSetSliderHeight(imageHeight); } else { if (imageEl.offsetHeight > 0) { if (props.disableGallery) props.onSetSliderHeight(imageEl.offsetHeight) else { setMediaStyle({marginTop:(props.sliderHeight - imageEl.offsetHeight) / 2}) props.onSetSliderHeight(360) } } } } else if (props.slide.type === "embed"){ if (cinemaMode === true) props.onSetSliderHeight(315) } else if (props.slide.type === "video" || props.slide.type === "audio" || props.slide.type === "book"){ if (cinemaMode === true){ props.onSetSliderHeight(screen.height * 0.7); } else { props.onSetSliderHeight(360) } } } } + function onSetParentSliderHeight(){ + let slideHeight; + if (mediaType === "embed") slideHeight = 315; + else if (mediaType === "image") slideHeight = document.getElementById('slide-img-'+props.slideIndex).offsetHeight; + props.onSetSlideHeight(slideHeight); function onCinemaModeClick(){ let cinemaMode = props.cinemaMode === true ? false : true; getSlideContentHeight(cinemaMode); props.onCinemaModeClick() } + let slideContentDisplay; + if (mediaType === "embed") slideContentDisplay =
; + else if (mediaType === "image") slideContentDisplay = + else if (mediaType === "video") slideContentDisplay = + const slideItemStyle = { width:props.containerWidth } + + + + + + + + + + + + + if (props.slide.type === "embed"){ slideContentDisplay =
; } else if (props.slide.type === "image") { slideContentDisplay = ( ) } else if (props.slide.type === "video") { slideContentDisplay = ( ) } else if (props.slide.type === "book"){ slideContentDisplay = ( ) } return( +
+ {slideContentDisplay}
{slideContentDisplay}
) } +function SlidesNavigation(props){ function ThumbNavigationItem(props){ + const slidesNavigationDisplay = props.gallery.map((g,index) => ( +
  • + props.onChangeCurrentSlide(index)}> +
  • + )) React.useEffect(() => { if (props.gallery && props.gallery.length === props.slideIndex + 1){ props.onfinishedThumbsRender() } }, [props.gallery]) React.useEffect(() => { if (window.galleryThumbs){ window.galleryThumbs.slideTo(props.currentSlide); } },[props.currentSlide]) + + + + + let previewImageContainer; if (props.item.type === "book"){ previewImageContainer = (
    {props.item.title}
    ) } else { let bgImage; if (props.item.type === "image"){ bgImage = props.item.url.split('/img')[0] + "/cache/120x80-1/img" + props.item.url.split('/img')[1]; } else if (props.item.type === "video"){ bgImage = props.item.url_thumb; } previewImageContainer =
    } return ( +
    +
      + {slidesNavigationDisplay} +
    props.onThumbItemClick(props.slideIndex)} onTouchEnd={() => props.onThumbItemClick(props.slideIndex)}> {previewImageContainer}
    ) } const rootElement = document.getElementById("product-media-slider-container"); ReactDOM.render(, rootElement); \ No newline at end of file diff --git a/httpdocs/theme/react/product-media-slider/app/video-player.js b/httpdocs/theme/react/product-media-slider/app/video-player.js index 3e2e9a5c3..8542aeb79 100644 --- a/httpdocs/theme/react/product-media-slider/app/video-player.js +++ b/httpdocs/theme/react/product-media-slider/app/video-player.js @@ -1,126 +1,145 @@ +import React, { useState } from 'react'; +import ReactPlayer from 'react-player' + + + + + + + import React from 'react'; import { Player, ControlBar, BigPlayButton, VolumeMenuButton, LoadingSpinner, CurrentTimeDisplay, DurationDisplay } from 'video-react'; + +function VideoPlayerWrapper(props){ + console.log(props); + return ( + + ) + + + + class VideoPlayerWrapper extends React.Component { constructor(props, context){ super(props, context); let hostLocation = window.location.href; if (!hostLocation.endsWith('/')) hostLocation += "/"; this.state = { source:this.props.slide.url_preview, width:this.props.width, videoStarted:false, videoStopped:false, videoStartUrl:hostLocation + "startvideoajax?collection_id="+this.props.slide.collection_id+"&file_id="+this.props.slide.file_id, videoStopUrl:hostLocation + "stopvideoajax?media_view_id=" } this.onCinemaModeClick = this.onCinemaModeClick.bind(this); this.play = this.play.bind(this); this.pause = this.pause.bind(this); } componentDidMount() { this.refs.player.subscribeToStateChange(this.handleStateChange.bind(this)); } handleStateChange(state, prevState) { this.setState({ player: state },function(){ if (this.state.player){ if (typeof this.state.player.videoWidth !== undefined) { setTimeout(() => { this.setState({videoRenderMask:false}) }, 1000); } if (this.state.player.hasStarted && this.state.videoStarted === false){ this.setState({videoStarted:true},function(){ const self = this; $.ajax({url: this.state.videoStartUrl}).done(function(res) { self.setState({videoStopUrl:self.state.videoStopUrl + res.MediaViewId}) }); }); } if (this.state.player.paused && this.state.videoStarted === true && this.state.videoStopped === false){ this.setState({videoStopped:true},function(){ $.ajax({url: this.state.videoStopUrl}).done(function(res) { // console.log(res) }); }); } if (state.isFullscreen === false && prevState.isFullscreen === true) this.props.onUpdateDimensions() if (state.isFullscreen !== prevState.isFullscreen) this.props.onFullScreenToggle(state.isFullscreen) } }); } shouldComponentUpdate(nextProps, nextState){ if (nextProps.playVideo === false) this.pause() return true; } onCinemaModeClick(){ this.props.onCinemaModeClick() } play() { this.refs.player.play(); } pause() { this.refs.player.pause(); } render(){ let videoPlayerDisplay; if (this.state.source){ let width = this.props.width; if (this.props.cinemaMode === false){ if (this.state.player){ const dimensionsRatio = this.props.height / this.state.player.videoHeight; if ((this.state.player.videoWidth * dimensionsRatio) < this.props.width) width = this.state.player.videoWidth * dimensionsRatio; } } videoPlayerDisplay = ( ) } let videoRenderMask =
    if (this.state.videoRenderMask === false){ videoRenderMask = ''; } return (
    {videoRenderMask} {videoPlayerDisplay}
    ) } } export default VideoPlayerWrapper; \ No newline at end of file diff --git a/httpdocs/theme/react/product-media-slider/product-media-slider.js b/httpdocs/theme/react/product-media-slider/product-media-slider.js index c21bb7108..55530fba2 100644 --- a/httpdocs/theme/react/product-media-slider/product-media-slider.js +++ b/httpdocs/theme/react/product-media-slider/product-media-slider.js @@ -1,1133 +1,1265 @@ /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = "./app/product-media-slider.js"); /******/ }) /************************************************************************/ /******/ ({ + + + + + + + + /***/ "./app/book-reader.js": /*!****************************!*\ !*** ./app/book-reader.js ***! \****************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\n\nfunction _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\n\n\nfunction BookReaderWrapper(props) {\n var _useState = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(),\n _useState2 = _slicedToArray(_useState, 2),\n renditionState = _useState2[0],\n setRenditionState = _useState2[1];\n\n react__WEBPACK_IMPORTED_MODULE_0___default.a.useEffect(function () {\n var book = ePub(props.slide.url);\n var rendition = book.renderTo(\"book-container\", {\n flow: \"paginated\",\n width: props.width - 40,\n height: props.height - 40\n });\n setRenditionState(rendition);\n var displayed = rendition.display();\n book.ready.then(function (book) {\n console.log(book);\n /*let meta = book.package.metadata; // Metadata from the package json\r\n let toc = book.navigation.toc; // Table of Contents\r\n let landmarks = book.navigation.landmarks; // landmarks\r\n let spine = book.spine; // landmarks\r\n let cover = book.cover; // landmarks\r\n let resources = book.resources; // landmarks\r\n let pageList = book.pageList; // page list (if present)\r\n console.log(meta);\r\n console.log(toc);\r\n console.log(landmarks);\r\n console.log(spine);\r\n console.log(cover);\r\n console.log(resources);\r\n console.log(pageList);*/\n });\n }, []);\n\n function goPrev() {\n renditionState.prev();\n }\n\n function goNext() {\n renditionState.next();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n id: \"book-reader-wrapper\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n id: \"prev\",\n className: \"arrow\",\n onClick: goPrev\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"glyphicon glyphicon-chevron-left\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n id: \"book-container\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n id: \"next\",\n className: \"arrow\",\n onClick: goNext\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"glyphicon glyphicon-chevron-right\"\n })));\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (BookReaderWrapper);\n\n//# sourceURL=webpack:///./app/book-reader.js?"); /***/ }), /***/ "./app/product-media-slider.js": /*!*************************************!*\ !*** ./app/product-media-slider.js ***! \*************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ \"./node_modules/react-dom/index.js\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _video_player__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./video-player */ \"./app/video-player.js\");\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance\"); }\n\nfunction _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\n\nfunction _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\n\n\n\n\nfunction ProductMediaSlider() {\n /* Component */\n var _useState = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(window.product),\n _useState2 = _slicedToArray(_useState, 2),\n product = _useState2[0],\n setProduct = _useState2[1];\n\n var galleryArray;\n\n if (product.embed_code !== null || product.image_small !== null) {\n var productMainSlide = product.embed_code !== null ? product.embed_code : product.image_small;\n galleryArray = [productMainSlide].concat(_toConsumableArray(window.galleryPicturesJson));\n }\n\n var _useState3 = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(galleryArray),\n _useState4 = _slicedToArray(_useState3, 2),\n gallery = _useState4[0],\n setGallery = _useState4[1];\n\n var parentContainerElement = document.getElementById('product-title-div');\n\n var _useState5 = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(parentContainerElement.offsetWidth),\n _useState6 = _slicedToArray(_useState5, 2),\n containerWidth = _useState6[0],\n setContainerWidth = _useState6[1];\n\n var _useState7 = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0),\n _useState8 = _slicedToArray(_useState7, 2),\n currentSlide = _useState8[0],\n setCurrentSlide = _useState8[1];\n\n var _useState9 = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(containerWidth * gallery.length),\n _useState10 = _slicedToArray(_useState9, 2),\n sliderWidth = _useState10[0],\n setSliderWidth = _useState10[1];\n\n var _useState11 = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(315),\n _useState12 = _slicedToArray(_useState11, 2),\n sliderHeight = _useState12[0],\n setSliderHeight = _useState12[1];\n\n var _useState13 = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(containerWidth * currentSlide),\n _useState14 = _slicedToArray(_useState13, 2),\n sliderPosition = _useState14[0],\n setSliderPosition = _useState14[1];\n\n var _useState15 = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true),\n _useState16 = _slicedToArray(_useState15, 2),\n loading = _useState16[0],\n setLoading = _useState16[1];\n\n react__WEBPACK_IMPORTED_MODULE_0___default.a.useEffect(function () {\n initProductMediaSlider();\n }, []);\n react__WEBPACK_IMPORTED_MODULE_0___default.a.useEffect(function () {\n updateDimensions();\n }, [currentSlide]); // init product media slider\n\n function initProductMediaSlider() {\n window.addEventListener(\"resize\", updateDimensions);\n window.addEventListener(\"orientationchange\", updateDimensions);\n if (window.filesJson) checkForMediaFiles();else setLoading(false);\n } // check for media files\n\n\n function checkForMediaFiles() {\n var mediaGalleryItems = [];\n window.filesJson.forEach(function (f, index) {\n console.log(f);\n if (f.type.indexOf('video') > -1 || f.type.indexOf('audio') > -1) mediaGalleryItems.push(f.url_encoded);\n });\n\n if (mediaGalleryItems.length > 0) {\n var newGallery = [].concat(_toConsumableArray(gallery), [mediaGalleryItems]);\n setGallery(newGallery);\n }\n\n setLoading(false);\n } // update dimensions\n\n\n function updateDimensions() {\n var newContainerWidth = parentContainerElement.offsetWidth;\n setContainerWidth(newContainerWidth);\n setSliderWidth(containerWidth * gallery.length);\n setSliderPosition(containerWidth * currentSlide);\n }\n /* Render */\n // slider container style\n\n\n var sliderContainerStyle = {\n width: sliderWidth + 'px',\n height: sliderHeight + 'px' // slider wrapper style\n\n };\n var sliderWrapperStyle = {\n width: sliderWidth + 'px',\n left: '-' + sliderPosition + 'px',\n height: sliderHeight + 'px' // prev / next slide arrow values\n\n };\n var prevCurrentSlide = currentSlide > 0 ? currentSlide - 1 : gallery.length - 1;\n var nextCurrentSlide = currentSlide < gallery.length - 1 ? currentSlide + 1 : 0; // slides display\n\n var slidesDisplay;\n\n if (loading === false) {\n slidesDisplay = gallery.map(function (s, index) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(SlideItem, {\n key: index,\n slideIndex: index,\n slideUrl: s,\n currentSlide: currentSlide,\n containerWidth: containerWidth,\n onSetSlideHeight: function onSetSlideHeight(height) {\n return setSliderHeight(height);\n }\n });\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"main\", {\n id: \"media-slider\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n id: \"slider-container\",\n style: sliderContainerStyle\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"left carousel-control\",\n id: \"arrow-left\",\n onClick: function onClick() {\n return setCurrentSlide(prevCurrentSlide);\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"glyphicon glyphicon-chevron-left\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n id: \"slider-wrapper\",\n style: sliderWrapperStyle\n }, slidesDisplay), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"right carousel-control\",\n id: \"arrow-right\",\n onClick: function onClick() {\n return setCurrentSlide(nextCurrentSlide);\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"glyphicon glyphicon-chevron-right\"\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(SlidesNavigation, {\n gallery: gallery,\n currentSlide: currentSlide,\n onChangeCurrentSlide: function onChangeCurrentSlide(e) {\n return setCurrentSlide(e);\n }\n }));\n}\n\nfunction SlideItem(props) {\n var _useState17 = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(''),\n _useState18 = _slicedToArray(_useState17, 2),\n mediaType = _useState18[0],\n setMediaType = _useState18[1];\n\n react__WEBPACK_IMPORTED_MODULE_0___default.a.useEffect(function () {\n determineMediaType();\n }, []);\n react__WEBPACK_IMPORTED_MODULE_0___default.a.useEffect(function () {\n if (props.slideIndex === props.currentSlide) onSetParentSliderHeight();\n }, []);\n react__WEBPACK_IMPORTED_MODULE_0___default.a.useEffect(function () {\n if (props.slideIndex === props.currentSlide) onSetParentSliderHeight();\n }, [props.currentSlide]);\n\n function determineMediaType() {\n var initialMediaType;\n if (props.slideUrl.indexOf(' -1) initialMediaType = \"embed\";else if (props.slideUrl.indexOf('.png') > -1 || props.slideUrl.indexOf('.jpg') > -1 || props.slideUrl.indexOf('.jpeg') > -1) initialMediaType = \"image\";else if (props.slideUrl.indexOf('.mp4') > -1) initialMediaType = \"video\";\n console.log(initialMediaType);\n setMediaType(initialMediaType);\n }\n\n function onSetParentSliderHeight() {\n var slideHeight;\n if (mediaType === \"embed\") slideHeight = 315;else if (mediaType === \"image\") slideHeight = document.getElementById('slide-img-' + props.slideIndex).offsetHeight;\n props.onSetSlideHeight(slideHeight);\n }\n\n var slideContentDisplay;\n if (mediaType === \"embed\") slideContentDisplay = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n dangerouslySetInnerHTML: {\n __html: props.slideUrl\n }\n });else if (mediaType === \"image\") slideContentDisplay = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"img\", {\n id: \"slide-img-\" + props.slideIndex,\n src: props.slideUrl\n });else if (mediaType === \"video\") slideContentDisplay = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_video_player__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n source: props.slideUrl\n });\n var slideItemStyle = {\n width: props.containerWidth\n };\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"slide-item\",\n id: \"slide-\" + props.slideIndex,\n style: slideItemStyle\n }, slideContentDisplay);\n}\n\nfunction SlidesNavigation(props) {\n var slidesNavigationDisplay = props.gallery.map(function (g, index) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"li\", {\n key: index,\n className: props.currentSlide === index ? \"active\" : \"\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: function onClick(e) {\n return props.onChangeCurrentSlide(index);\n }\n }));\n });\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n id: \"slide-navigation\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"ul\", null, slidesNavigationDisplay));\n}\n\nvar rootElement = document.getElementById(\"product-media-slider-container\");\nreact_dom__WEBPACK_IMPORTED_MODULE_1___default.a.render(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ProductMediaSlider, null), rootElement);\n\n//# sourceURL=webpack:///./app/product-media-slider.js?"); eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ \"./node_modules/react-dom/index.js\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var react_device_detect__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-device-detect */ \"./node_modules/react-device-detect/dist/index.js\");\n/* harmony import */ var react_device_detect__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_device_detect__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _video_player__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./video-player */ \"./app/video-player.js\");\n/* harmony import */ var _book_reader__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./book-reader */ \"./app/book-reader.js\");\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance\"); }\n\nfunction _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\n\nfunction _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\n\n\n\n\n\n\nfunction ProductMediaSlider() {\n /* Component */\n var _useState = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(window.product),\n _useState2 = _slicedToArray(_useState, 2),\n product = _useState2[0],\n setProduct = _useState2[1];\n\n var galleryArray = [];\n if (window.galleryPicturesJson) window.galleryPicturesJson.forEach(function (gp, index) {\n galleryArray.push({\n url: gp,\n type: 'image'\n });\n });else galleryArray = [{\n url: product.image_small,\n type: 'image'\n }];\n if (product.embed_code !== null && product.embed_code.length > 0) galleryArray = [{\n url: product.embed_code,\n type: 'embed'\n }].concat(_toConsumableArray(galleryArray));\n\n if (window.filesJson) {\n window.filesJson.forEach(function (f, index) {\n if (f.type.indexOf('video') > -1 || f.type.indexOf('audio') > -1 || f.type.indexOf('epub') > -1) {\n var type;\n if (f.type.indexOf('video') > -1 || f.type.indexOf('audio') > -1) type = f.type.split('/')[0];else if (f.type.indexOf('epub') > -1) type = \"book\";\n var url_preview, url_thumb;\n if (f.url_thumb) url_thumb = f.url_thumb.replace(/%2F/g, '/').replace(/%3A/g, ':');\n if (f.url_preview) url_preview = f.url_preview.replace(/%2F/g, '/').replace(/%3A/g, ':');\n var gItem = {\n url: f.url.replace(/%2F/g, '/').replace(/%3A/g, ':'),\n collection_id: f.collection_id,\n type: type,\n file_id: f.id,\n title: f.title,\n url_thumb: url_thumb,\n url_preview: url_preview\n };\n galleryArray = [gItem].concat(_toConsumableArray(galleryArray));\n }\n });\n }\n\n var _useState3 = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(galleryArray),\n _useState4 = _slicedToArray(_useState3, 2),\n gallery = _useState4[0],\n setGallery = _useState4[1];\n\n var _useState5 = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(gallery.length > 1 ? false : true),\n _useState6 = _slicedToArray(_useState5, 2),\n disableGallery = _useState6[0],\n setDisableGallery = _useState6[1];\n\n var parentContainerElement = document.getElementById('product-title-div');\n\n var _useState7 = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(parentContainerElement.offsetWidth),\n _useState8 = _slicedToArray(_useState7, 2),\n containerWidth = _useState8[0],\n setContainerWidth = _useState8[1];\n\n var _useState9 = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0),\n _useState10 = _slicedToArray(_useState9, 2),\n currentSlide = _useState10[0],\n setCurrentSlide = _useState10[1];\n\n var _useState11 = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(360),\n _useState12 = _slicedToArray(_useState11, 2),\n sliderHeight = _useState12[0],\n setSliderHeight = _useState12[1];\n\n var _useState13 = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false),\n _useState14 = _slicedToArray(_useState13, 2),\n cinemaMode = _useState14[0],\n setCinemaMode = _useState14[1];\n\n var _useState15 = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false),\n _useState16 = _slicedToArray(_useState15, 2),\n isFullScreen = _useState16[0],\n setIsFullScreen = _useState16[1];\n\n var _useState17 = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false),\n _useState18 = _slicedToArray(_useState17, 2),\n showPlaylist = _useState18[0],\n setShowPlaylist = _useState18[1];\n\n var _useState19 = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(react_device_detect__WEBPACK_IMPORTED_MODULE_2__[\"isMobile\"] === true ? true : false),\n _useState20 = _slicedToArray(_useState19, 2),\n showSliderArrows = _useState20[0],\n setShowSliderArrows = _useState20[1];\n\n var _useState21 = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true),\n _useState22 = _slicedToArray(_useState21, 2),\n sliderFadeControlsMode = _useState22[0],\n setSliderFadeControlsMode = _useState22[1];\n\n var sliderFadeControlTimeOut; // use effects\n\n react__WEBPACK_IMPORTED_MODULE_0___default.a.useEffect(function () {\n initProductMediaSlider(currentSlide);\n }, [currentSlide]);\n react__WEBPACK_IMPORTED_MODULE_0___default.a.useEffect(function (event) {\n updateDimensions(event, currentSlide);\n }, [currentSlide, cinemaMode]);\n react__WEBPACK_IMPORTED_MODULE_0___default.a.useEffect(function () {\n handleMouseMovementEventListener(showPlaylist, isFullScreen);\n }, [showPlaylist, isFullScreen]); // init product media slider\n\n function initProductMediaSlider(currentSlide) {\n window.addEventListener(\"resize\", function (event) {\n updateDimensions(event, currentSlide);\n });\n window.addEventListener(\"orientationchange\", function (event) {\n updateDimensions(event, currentSlide);\n });\n } // handle mouse movement event listener\n\n\n function handleMouseMovementEventListener(showPlaylist, isFullScreen) {\n window.removeEventListener(\"mousemove\", function (event) {\n onMouseMovement(event, showPlaylist, isFullScreen);\n });\n window.removeEventListener(\"mousedown\", function (event) {\n onMouseMovement(event, showPlaylist, isFullScreen);\n });\n window.addEventListener(\"mousemove\", function (event) {\n onMouseMovement(event, showPlaylist, isFullScreen);\n });\n window.addEventListener(\"mousedown\", function (event) {\n onMouseMovement(event, showPlaylist, isFullScreen);\n });\n } // update dimensions\n\n\n function updateDimensions() {\n var newContainerWidth = parentContainerElement.offsetWidth;\n setContainerWidth(newContainerWidth);\n document.getElementById('product-page-content').removeEventListener(\"DOMNodeRemoved\", updateDimensions);\n document.getElementById('product-page-content').removeEventListener(\"DOMNodeInserted\", updateDimensions); // if (cinemaMode === false) setSliderHeight(360)\n } // on mouse movement\n\n\n function onMouseMovement(event, showPlaylist, isFullScreen) {\n var mediaSliderOffest = $('#media-slider').offset();\n var mediaSliderLeft = mediaSliderOffest.left;\n var mediaSliderRight = mediaSliderLeft + $('#media-slider').width();\n var mediaSliderTop = mediaSliderOffest.top - window.pageYOffset;\n var mediaSliderBottom = mediaSliderTop + $('#media-slider').height();\n if (showPlaylist) mediaSliderBottom += 110;else mediaSliderBottom += 30;\n var mouseIn = false;\n\n if (event.clientX > mediaSliderLeft && event.clientX < mediaSliderRight && event.clientY > mediaSliderTop && event.clientY < mediaSliderBottom) {\n mouseIn = true;\n }\n\n if (isFullScreen) mouseIn = true;\n\n if (mouseIn) {\n setSliderFadeControlsMode(false);\n clearTimeout(sliderFadeControlTimeOut);\n sliderFadeControlTimeOut = setTimeout(function () {\n setSliderFadeControlsMode(true);\n }, 2000);\n } else {\n setSliderFadeControlsMode(true);\n clearTimeout(sliderFadeControlTimeOut);\n }\n } // toggle cinema mode\n\n\n function toggleCinemaMode() {\n document.getElementById('product-page-content').addEventListener(\"DOMNodeRemoved\", updateDimensions);\n document.getElementById('product-page-content').addEventListener(\"DOMNodeInserted\", updateDimensions);\n var newCinemaMode = cinemaMode === true ? false : true;\n var targetParentElement = cinemaMode === true ? $('#product-main') : $('#product-page-content');\n var targetChildPrependedElement = cinemaMode === true ? $('#product-title-div') : $('#product-media-slider-container');\n $('#product-main-img-container').prependTo(targetParentElement);\n $(targetChildPrependedElement).prependTo('#product-main-img');\n $(\"#product-media-slider-container\").toggleClass(\"imgsmall\");\n $(\"#product-media-slider-container\").toggleClass(\"imgfull\");\n setCinemaMode(newCinemaMode);\n } // toggle show playlist\n\n\n function toggleShowPlaylist() {\n var newShowPlaylistValue = showPlaylist === true ? false : true;\n setShowPlaylist(newShowPlaylistValue);\n } //handle full screen toggle\n\n\n function hanleFullScreenToggle(val) {\n setIsFullScreen(val);\n } // on finish slides render\n\n\n function onFinishedSlidesRender() {\n $(document).ready(function () {\n window.mySwiper = new Swiper('.swiper-container', {\n speed: 400,\n initialSlide: 0,\n observer: true,\n observeParents: true,\n preloadImages: true,\n updateOnImagesReady: true,\n pagination: '.swiper-pagination',\n paginationClickable: '.swiper-pagination',\n threshold: 50,\n onSlideChangeStart: function onSlideChangeStart(swiper) {\n setCurrentSlide(swiper.activeIndex);\n }\n });\n window.mySwiper.update(); // if (isMobile) setShowPlaylist(true)\n });\n } // on finished thumbs render\n\n\n function onfinishedThumbsRender() {\n $(document).ready(function () {\n var slidesPerView = Math.ceil(containerWidth / 200);\n if (react_device_detect__WEBPACK_IMPORTED_MODULE_2__[\"isMobile\"]) slidesPerView = 2;\n window.galleryThumbs = new Swiper('.gallery-thumbs', {\n slidesPerView: slidesPerView,\n initialSlide: currentSlide,\n spaceBetween: 10,\n freeMode: true,\n watchSlidesVisibility: true,\n watchSlidesProgress: true,\n activeIndex: currentSlide,\n scrollbar: '.swiper-scrollbar'\n });\n window.galleryThumbs.update();\n });\n } // on thumb item click\n\n\n function _onThumbItemClick(slideIndex) {\n window.mySwiper.slideTo(slideIndex);\n } // go next \n\n\n function goNext() {\n var nextSlide = window.mySwiper.activeIndex + 1;\n if (nextSlide > gallery.length - 1) nextSlide = 0;\n window.mySwiper.slideTo(nextSlide);\n } // go prev\n\n\n function goPrev() {\n var prevSlide = window.mySwiper.activeIndex - 1;\n if (prevSlide < 0) prevSlide = gallery.length - 1;\n window.mySwiper.slideTo(prevSlide);\n }\n /* Render */\n // media slider css class\n\n\n var mediaSliderCssClass = \"\";\n if (disableGallery === true) mediaSliderCssClass += \"disable-gallery \";\n if (cinemaMode === true) mediaSliderCssClass += \"cinema-mode \"; // if (showSliderArrows === false) mediaSliderCssClass += \"hide-arrows \";\n\n if (showPlaylist === false) mediaSliderCssClass += \"hide-playlist \";\n if (sliderFadeControlsMode === true) mediaSliderCssClass += \"fade-controls \";\n if (react_device_detect__WEBPACK_IMPORTED_MODULE_2__[\"isMobile\"] === true) mediaSliderCssClass += \"is-mobile \"; // slides display\n\n var slidesDisplay = gallery.map(function (s, index) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(SlideItem, {\n key: index,\n slideIndex: index,\n slide: s,\n currentSlide: currentSlide,\n containerWidth: containerWidth,\n sliderHeight: sliderHeight,\n cinemaMode: cinemaMode,\n gallery: gallery,\n disableGallery: disableGallery,\n onFinishedSlidesRender: onFinishedSlidesRender,\n onCinemaModeClick: toggleCinemaMode,\n onSetSliderHeight: function onSetSliderHeight(height) {\n return setSliderHeight(height);\n },\n onUpdateDimensions: updateDimensions,\n onFullScreenToggle: hanleFullScreenToggle\n });\n });\n var thumbnailNavigationDisplay;\n\n if (showPlaylist) {\n // thumbnail navigation\n var slidesThumbnailNavigationDisplay = gallery.map(function (g, index) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ThumbNavigationItem, {\n key: index,\n slideIndex: index,\n currentSlide: currentSlide,\n gallery: gallery,\n item: g,\n onFinishedSlidesRender: onFinishedSlidesRender,\n containerWidth: containerWidth,\n onfinishedThumbsRender: onfinishedThumbsRender,\n onThumbItemClick: function onThumbItemClick(slideIndex) {\n return _onThumbItemClick(slideIndex);\n }\n });\n });\n thumbnailNavigationDisplay = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n id: \"slide-navigation\",\n className: \"swiper-container gallery-thumbs\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"thumbnail-navigation swiper-wrapper\"\n }, slidesThumbnailNavigationDisplay), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"swiper-scrollbar\"\n }));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"main\", {\n id: \"media-slider\",\n style: {\n height: sliderHeight\n },\n className: mediaSliderCssClass\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n id: \"slider-container\",\n className: \"swiper-container\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"swiper-wrapper\"\n }, slidesDisplay), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"swiper-pagination\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"carousel-control carousel-control-left left\",\n onClick: goPrev\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"visible-container\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"glyphicon glyphicon-chevron-left\"\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"carousel-control carousel-control-right right\",\n onClick: goNext\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"visible-container\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"glyphicon glyphicon-chevron-right\"\n })))), thumbnailNavigationDisplay, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"slider-navigation-toggle\",\n onClick: toggleShowPlaylist,\n style: {\n top: sliderHeight - 75\n }\n }));\n}\n\nfunction SlideItem(props) {\n var _useState23 = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(),\n _useState24 = _slicedToArray(_useState23, 2),\n mediaStyle = _useState24[0],\n setMediaStyle = _useState24[1];\n\n react__WEBPACK_IMPORTED_MODULE_0___default.a.useEffect(function () {\n if (props.gallery && props.gallery.length === props.slideIndex + 1) {\n props.onFinishedSlidesRender();\n }\n }, [props.gallery]);\n react__WEBPACK_IMPORTED_MODULE_0___default.a.useEffect(function () {\n getSlideContentHeight(props.cinemaMode);\n }, [props.currentSlide, props.cinemaMode]);\n\n function getSlideContentHeight(cinemaMode) {\n if (props.currentSlide === props.slideIndex) {\n if (props.slide.type === \"image\") {\n var imageEl = document.getElementById('slide-img-' + props.slideIndex);\n\n if (cinemaMode === true) {\n var imageHeight = imageEl.naturalHeight;\n\n if (imageEl.naturalWidth > window.innerWidth) {\n var dimensionsPercentage = window.innerWidth / imageEl.naturalWidth;\n imageHeight = imageEl.naturalHeight * dimensionsPercentage;\n }\n\n setMediaStyle({\n height: imageHeight\n });\n props.onSetSliderHeight(imageHeight);\n } else {\n if (imageEl.offsetHeight > 0) {\n if (props.disableGallery) props.onSetSliderHeight(imageEl.offsetHeight);else {\n setMediaStyle({\n marginTop: (props.sliderHeight - imageEl.offsetHeight) / 2\n });\n props.onSetSliderHeight(360);\n }\n }\n }\n } else if (props.slide.type === \"embed\") {\n if (cinemaMode === true) props.onSetSliderHeight(315);\n } else if (props.slide.type === \"video\" || props.slide.type === \"audio\" || props.slide.type === \"book\") {\n if (cinemaMode === true) {\n props.onSetSliderHeight(screen.height * 0.7);\n } else {\n props.onSetSliderHeight(360);\n }\n }\n }\n }\n\n function onCinemaModeClick() {\n var cinemaMode = props.cinemaMode === true ? false : true;\n getSlideContentHeight(cinemaMode);\n props.onCinemaModeClick();\n }\n\n var slideContentDisplay;\n\n if (props.slide.type === \"embed\") {\n slideContentDisplay = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n dangerouslySetInnerHTML: {\n __html: props.slide.url\n }\n });\n } else if (props.slide.type === \"image\") {\n slideContentDisplay = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"img\", {\n onClick: props.onCinemaModeClick,\n id: \"slide-img-\" + props.slideIndex,\n src: props.slide.url,\n style: mediaStyle\n });\n } else if (props.slide.type === \"video\") {\n slideContentDisplay = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_video_player__WEBPACK_IMPORTED_MODULE_3__[\"default\"], {\n height: props.sliderHeight,\n width: props.containerWidth,\n cinemaMode: props.cinemaMode,\n onCinemaModeClick: onCinemaModeClick,\n slide: props.slide,\n playVideo: props.currentSlide === props.slideIndex,\n onUpdateDimensions: props.onUpdateDimensions,\n onFullScreenToggle: props.onFullScreenToggle\n });\n } else if (props.slide.type === \"book\") {\n slideContentDisplay = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_book_reader__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n height: props.sliderHeight,\n width: props.containerWidth,\n onCinemaModeClick: props.onCinemaModeClick,\n slide: props.slide,\n cinemaMode: props.cinemaMode,\n playVideo: props.currentSlide === props.slideIndex,\n onUpdateDimensions: props.onUpdateDimensions,\n onFullScreenToggle: props.onFullScreenToggle\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n id: \"slide-\" + props.slideIndex,\n className: props.currentSlide === props.slideIndex ? \"active slide-item swiper-slide \" + props.slide.type : \"slide-item swiper-slide \" + props.slide.type,\n style: {\n width: props.containerWidth,\n height: props.sliderHeight\n }\n }, slideContentDisplay);\n}\n\nfunction ThumbNavigationItem(props) {\n react__WEBPACK_IMPORTED_MODULE_0___default.a.useEffect(function () {\n if (props.gallery && props.gallery.length === props.slideIndex + 1) {\n props.onfinishedThumbsRender();\n }\n }, [props.gallery]);\n react__WEBPACK_IMPORTED_MODULE_0___default.a.useEffect(function () {\n if (window.galleryThumbs) {\n window.galleryThumbs.slideTo(props.currentSlide);\n }\n }, [props.currentSlide]);\n var previewImageContainer;\n\n if (props.item.type === \"book\") {\n previewImageContainer = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"pages preview-image\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"page\"\n }, props.item.title), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"page\"\n }));\n } else {\n var bgImage;\n\n if (props.item.type === \"image\") {\n bgImage = props.item.url.split('/img')[0] + \"/cache/120x80-1/img\" + props.item.url.split('/img')[1];\n } else if (props.item.type === \"video\") {\n bgImage = props.item.url_thumb;\n }\n\n previewImageContainer = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"preview-image\",\n style: {\n \"backgroundImage\": \"url(\" + bgImage + \")\"\n }\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: props.currentSlide === props.slideIndex ? \" swiper-slide active \" + props.item.type : \" swiper-slide \" + props.item.type,\n onClick: function onClick() {\n return props.onThumbItemClick(props.slideIndex);\n },\n onTouchEnd: function onTouchEnd() {\n return props.onThumbItemClick(props.slideIndex);\n }\n }, previewImageContainer);\n}\n\nvar rootElement = document.getElementById(\"product-media-slider-container\");\nreact_dom__WEBPACK_IMPORTED_MODULE_1___default.a.render(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ProductMediaSlider, null), rootElement);\n\n//# sourceURL=webpack:///./app/product-media-slider.js?"); /***/ }), /***/ "./app/video-player.js": /*!*****************************!*\ !*** ./app/video-player.js ***! \*****************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_player__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-player */ \"./node_modules/react-player/lib/ReactPlayer.js\");\n/* harmony import */ var react_player__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_player__WEBPACK_IMPORTED_MODULE_1__);\n\n\n\nfunction VideoPlayerWrapper(props) {\n console.log(props);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_player__WEBPACK_IMPORTED_MODULE_1___default.a, {\n url: props.source,\n playing: true\n });\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (VideoPlayerWrapper);\n\n//# sourceURL=webpack:///./app/video-player.js?"); eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var video_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! video-react */ \"./node_modules/video-react/lib/index.js\");\n/* harmony import */ var video_react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(video_react__WEBPACK_IMPORTED_MODULE_1__);\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\n\n\n\nvar VideoPlayerWrapper =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inherits(VideoPlayerWrapper, _React$Component);\n\n function VideoPlayerWrapper(props, context) {\n var _this;\n\n _classCallCheck(this, VideoPlayerWrapper);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(VideoPlayerWrapper).call(this, props, context));\n var hostLocation = window.location.href;\n if (!hostLocation.endsWith('/')) hostLocation += \"/\";\n _this.state = {\n source: _this.props.slide.url_preview,\n width: _this.props.width,\n videoStarted: false,\n videoStopped: false,\n videoStartUrl: hostLocation + \"startvideoajax?collection_id=\" + _this.props.slide.collection_id + \"&file_id=\" + _this.props.slide.file_id,\n videoStopUrl: hostLocation + \"stopvideoajax?media_view_id=\"\n };\n _this.onCinemaModeClick = _this.onCinemaModeClick.bind(_assertThisInitialized(_this));\n _this.play = _this.play.bind(_assertThisInitialized(_this));\n _this.pause = _this.pause.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(VideoPlayerWrapper, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.refs.player.subscribeToStateChange(this.handleStateChange.bind(this));\n }\n }, {\n key: \"handleStateChange\",\n value: function handleStateChange(state, prevState) {\n this.setState({\n player: state\n }, function () {\n var _this2 = this;\n\n if (this.state.player) {\n if (_typeof(this.state.player.videoWidth) !== undefined) {\n setTimeout(function () {\n _this2.setState({\n videoRenderMask: false\n });\n }, 1000);\n }\n\n if (this.state.player.hasStarted && this.state.videoStarted === false) {\n this.setState({\n videoStarted: true\n }, function () {\n var self = this;\n $.ajax({\n url: this.state.videoStartUrl\n }).done(function (res) {\n self.setState({\n videoStopUrl: self.state.videoStopUrl + res.MediaViewId\n });\n });\n });\n }\n\n if (this.state.player.paused && this.state.videoStarted === true && this.state.videoStopped === false) {\n this.setState({\n videoStopped: true\n }, function () {\n $.ajax({\n url: this.state.videoStopUrl\n }).done(function (res) {// console.log(res)\n });\n });\n }\n\n if (state.isFullscreen === false && prevState.isFullscreen === true) this.props.onUpdateDimensions();\n if (state.isFullscreen !== prevState.isFullscreen) this.props.onFullScreenToggle(state.isFullscreen);\n }\n });\n }\n }, {\n key: \"shouldComponentUpdate\",\n value: function shouldComponentUpdate(nextProps, nextState) {\n if (nextProps.playVideo === false) this.pause();\n return true;\n }\n }, {\n key: \"onCinemaModeClick\",\n value: function onCinemaModeClick() {\n this.props.onCinemaModeClick();\n }\n }, {\n key: \"play\",\n value: function play() {\n this.refs.player.play();\n }\n }, {\n key: \"pause\",\n value: function pause() {\n this.refs.player.pause();\n }\n }, {\n key: \"render\",\n value: function render() {\n var videoPlayerDisplay;\n\n if (this.state.source) {\n var width = this.props.width;\n\n if (this.props.cinemaMode === false) {\n if (this.state.player) {\n var dimensionsRatio = this.props.height / this.state.player.videoHeight;\n if (this.state.player.videoWidth * dimensionsRatio < this.props.width) width = this.state.player.videoWidth * dimensionsRatio;\n }\n }\n\n videoPlayerDisplay = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(video_react__WEBPACK_IMPORTED_MODULE_1__[\"Player\"], {\n ref: \"player\",\n fluid: false,\n height: this.props.height,\n width: width,\n preload: \"auto\",\n src: this.state.source\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(video_react__WEBPACK_IMPORTED_MODULE_1__[\"BigPlayButton\"], {\n position: \"center\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(video_react__WEBPACK_IMPORTED_MODULE_1__[\"LoadingSpinner\"], null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(video_react__WEBPACK_IMPORTED_MODULE_1__[\"ControlBar\"], {\n className: \"custom-video-player\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(video_react__WEBPACK_IMPORTED_MODULE_1__[\"CurrentTimeDisplay\"], {\n order: 4.1\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(video_react__WEBPACK_IMPORTED_MODULE_1__[\"DurationDisplay\"], {\n order: 7.1\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(video_react__WEBPACK_IMPORTED_MODULE_1__[\"VolumeMenuButton\"], {\n vertical: true,\n order: 7.2\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"cinema-mode-button\",\n onClick: this.onCinemaModeClick,\n order: 7.3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null))));\n }\n\n var videoRenderMask = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"video-render-mask\"\n });\n\n if (this.state.videoRenderMask === false) {\n videoRenderMask = '';\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"react-player-container\"\n }, videoRenderMask, videoPlayerDisplay);\n }\n }]);\n\n return VideoPlayerWrapper;\n}(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (VideoPlayerWrapper);\n\n//# sourceURL=webpack:///./app/video-player.js?"); /***/ }), +/***/ "./node_modules/deepmerge/dist/umd.js": +/*!********************************************!*\ + !*** ./node_modules/deepmerge/dist/umd.js ***! + \********************************************/ /***/ "./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js": /*!******************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***! \******************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { eval("function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n }\n}\n\nmodule.exports = _arrayWithoutHoles;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js?"); /***/ }), /***/ "./node_modules/@babel/runtime/helpers/assertThisInitialized.js": /*!**********************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/assertThisInitialized.js ***! \**********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { eval("function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nmodule.exports = _assertThisInitialized;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/assertThisInitialized.js?"); /***/ }), /***/ "./node_modules/@babel/runtime/helpers/classCallCheck.js": /*!***************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/classCallCheck.js ***! \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { eval("function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/classCallCheck.js?"); /***/ }), /***/ "./node_modules/@babel/runtime/helpers/createClass.js": /*!************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/createClass.js ***! \************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { eval("function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nmodule.exports = _createClass;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/createClass.js?"); /***/ }), /***/ "./node_modules/@babel/runtime/helpers/defineProperty.js": /*!***************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/defineProperty.js ***! \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { eval("function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/defineProperty.js?"); /***/ }), /***/ "./node_modules/@babel/runtime/helpers/extends.js": /*!********************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/extends.js ***! \********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { eval("function _extends() {\n module.exports = _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nmodule.exports = _extends;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/extends.js?"); /***/ }), /***/ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js": /*!***************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/getPrototypeOf.js ***! \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { eval("function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nmodule.exports = _getPrototypeOf;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/getPrototypeOf.js?"); /***/ }), /***/ "./node_modules/@babel/runtime/helpers/inherits.js": /*!*********************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/inherits.js ***! \*********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { +eval("(function (global, factory) {\n\t true ? module.exports = factory() :\n\tundefined;\n}(this, (function () { 'use strict';\n\nvar isMergeableObject = function isMergeableObject(value) {\n\treturn isNonNullObject(value)\n\t\t&& !isSpecial(value)\n};\n\nfunction isNonNullObject(value) {\n\treturn !!value && typeof value === 'object'\n}\n\nfunction isSpecial(value) {\n\tvar stringValue = Object.prototype.toString.call(value);\n\n\treturn stringValue === '[object RegExp]'\n\t\t|| stringValue === '[object Date]'\n\t\t|| isReactElement(value)\n}\n\n// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25\nvar canUseSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;\n\nfunction isReactElement(value) {\n\treturn value.$$typeof === REACT_ELEMENT_TYPE\n}\n\nfunction emptyTarget(val) {\n\treturn Array.isArray(val) ? [] : {}\n}\n\nfunction cloneUnlessOtherwiseSpecified(value, options) {\n\treturn (options.clone !== false && options.isMergeableObject(value))\n\t\t? deepmerge(emptyTarget(value), value, options)\n\t\t: value\n}\n\nfunction defaultArrayMerge(target, source, options) {\n\treturn target.concat(source).map(function(element) {\n\t\treturn cloneUnlessOtherwiseSpecified(element, options)\n\t})\n}\n\nfunction getMergeFunction(key, options) {\n\tif (!options.customMerge) {\n\t\treturn deepmerge\n\t}\n\tvar customMerge = options.customMerge(key);\n\treturn typeof customMerge === 'function' ? customMerge : deepmerge\n}\n\nfunction mergeObject(target, source, options) {\n\tvar destination = {};\n\tif (options.isMergeableObject(target)) {\n\t\tObject.keys(target).forEach(function(key) {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(target[key], options);\n\t\t});\n\t}\n\tObject.keys(source).forEach(function(key) {\n\t\tif (!options.isMergeableObject(source[key]) || !target[key]) {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(source[key], options);\n\t\t} else {\n\t\t\tdestination[key] = getMergeFunction(key, options)(target[key], source[key], options);\n\t\t}\n\t});\n\treturn destination\n}\n\nfunction deepmerge(target, source, options) {\n\toptions = options || {};\n\toptions.arrayMerge = options.arrayMerge || defaultArrayMerge;\n\toptions.isMergeableObject = options.isMergeableObject || isMergeableObject;\n\n\tvar sourceIsArray = Array.isArray(source);\n\tvar targetIsArray = Array.isArray(target);\n\tvar sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n\n\tif (!sourceAndTargetTypesMatch) {\n\t\treturn cloneUnlessOtherwiseSpecified(source, options)\n\t} else if (sourceIsArray) {\n\t\treturn options.arrayMerge(target, source, options)\n\t} else {\n\t\treturn mergeObject(target, source, options)\n\t}\n}\n\ndeepmerge.all = function deepmergeAll(array, options) {\n\tif (!Array.isArray(array)) {\n\t\tthrow new Error('first argument should be an array')\n\t}\n\n\treturn array.reduce(function(prev, next) {\n\t\treturn deepmerge(prev, next, options)\n\t}, {})\n};\n\nvar deepmerge_1 = deepmerge;\n\nreturn deepmerge_1;\n\n})));\n\n\n//# sourceURL=webpack:///./node_modules/deepmerge/dist/umd.js?"); eval("var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf */ \"./node_modules/@babel/runtime/helpers/setPrototypeOf.js\");\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\n\nmodule.exports = _inherits;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/inherits.js?"); /***/ }), +/***/ "./node_modules/load-script/index.js": +/*!*******************************************!*\ + !*** ./node_modules/load-script/index.js ***! + \*******************************************/ /***/ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js": /*!**********************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***! \**********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { +eval("\nmodule.exports = function load (src, opts, cb) {\n var head = document.head || document.getElementsByTagName('head')[0]\n var script = document.createElement('script')\n\n if (typeof opts === 'function') {\n cb = opts\n opts = {}\n }\n\n opts = opts || {}\n cb = cb || function() {}\n\n script.type = opts.type || 'text/javascript'\n script.charset = opts.charset || 'utf8';\n script.async = 'async' in opts ? !!opts.async : true\n script.src = src\n\n if (opts.attrs) {\n setAttributes(script, opts.attrs)\n }\n\n if (opts.text) {\n script.text = '' + opts.text\n }\n\n var onend = 'onload' in script ? stdOnEnd : ieOnEnd\n onend(script, cb)\n\n // some good legacy browsers (firefox) fail the 'in' detection above\n // so as a fallback we always set onload\n // old IE will ignore this and new IE will set onload\n if (!script.onload) {\n stdOnEnd(script, cb);\n }\n\n head.appendChild(script)\n}\n\nfunction setAttributes(script, attrs) {\n for (var attr in attrs) {\n script.setAttribute(attr, attrs[attr]);\n }\n}\n\nfunction stdOnEnd (script, cb) {\n script.onload = function () {\n this.onerror = this.onload = null\n cb(null, script)\n }\n script.onerror = function () {\n // this.onload = null here is necessary\n // because even IE9 works not like others\n this.onerror = this.onload = null\n cb(new Error('Failed to load ' + this.src), script)\n }\n}\n\nfunction ieOnEnd (script, cb) {\n script.onreadystatechange = function () {\n if (this.readyState != 'complete' && this.readyState != 'loaded') return\n this.onreadystatechange = null\n cb(null, script) // there is no way to catch loading errors in IE8\n }\n}\n\n\n//# sourceURL=webpack:///./node_modules/load-script/index.js?"); eval("function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\n\nmodule.exports = _interopRequireDefault;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/interopRequireDefault.js?"); /***/ }), /***/ "./node_modules/@babel/runtime/helpers/interopRequireWildcard.js": /*!***********************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/interopRequireWildcard.js ***! \***********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { eval("function _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};\n\n if (desc.get || desc.set) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n }\n\n newObj[\"default\"] = obj;\n return newObj;\n }\n}\n\nmodule.exports = _interopRequireWildcard;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/interopRequireWildcard.js?"); /***/ }), /***/ "./node_modules/@babel/runtime/helpers/iterableToArray.js": /*!****************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/iterableToArray.js ***! \****************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { eval("function _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n}\n\nmodule.exports = _iterableToArray;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/iterableToArray.js?"); /***/ }), /***/ "./node_modules/@babel/runtime/helpers/nonIterableSpread.js": /*!******************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/nonIterableSpread.js ***! \******************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { eval("function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n}\n\nmodule.exports = _nonIterableSpread;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/nonIterableSpread.js?"); /***/ }), /***/ "./node_modules/@babel/runtime/helpers/objectSpread.js": /*!*************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/objectSpread.js ***! \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { eval("var defineProperty = __webpack_require__(/*! ./defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n defineProperty(target, key, source[key]);\n });\n }\n\n return target;\n}\n\nmodule.exports = _objectSpread;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/objectSpread.js?"); /***/ }), /***/ "./node_modules/@babel/runtime/helpers/objectWithoutProperties.js": /*!************************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/objectWithoutProperties.js ***! \************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { eval("var objectWithoutPropertiesLoose = __webpack_require__(/*! ./objectWithoutPropertiesLoose */ \"./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js\");\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nmodule.exports = _objectWithoutProperties;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/objectWithoutProperties.js?"); /***/ }), /***/ "./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js": /*!*****************************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js ***! \*****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { eval("function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nmodule.exports = _objectWithoutPropertiesLoose;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js?"); /***/ }), /***/ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js": /*!**************************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***! \**************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { eval("var _typeof = __webpack_require__(/*! ../helpers/typeof */ \"./node_modules/@babel/runtime/helpers/typeof.js\");\n\nvar assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return assertThisInitialized(self);\n}\n\nmodule.exports = _possibleConstructorReturn;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js?"); /***/ }), /***/ "./node_modules/@babel/runtime/helpers/setPrototypeOf.js": /*!***************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/setPrototypeOf.js ***! \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { eval("function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nmodule.exports = _setPrototypeOf;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/setPrototypeOf.js?"); /***/ }), /***/ "./node_modules/@babel/runtime/helpers/toConsumableArray.js": /*!******************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/toConsumableArray.js ***! \******************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { eval("var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles */ \"./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js\");\n\nvar iterableToArray = __webpack_require__(/*! ./iterableToArray */ \"./node_modules/@babel/runtime/helpers/iterableToArray.js\");\n\nvar nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread */ \"./node_modules/@babel/runtime/helpers/nonIterableSpread.js\");\n\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || nonIterableSpread();\n}\n\nmodule.exports = _toConsumableArray;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/toConsumableArray.js?"); /***/ }), /***/ "./node_modules/@babel/runtime/helpers/typeof.js": /*!*******************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/typeof.js ***! \*******************************************************/ /*! no static exports found */ /***/ (function(module, exports) { eval("function _typeof2(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof2(obj); }\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && _typeof2(Symbol.iterator) === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return _typeof2(obj);\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : _typeof2(obj);\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/typeof.js?"); /***/ }), /***/ "./node_modules/classnames/index.js": /*!******************************************!*\ !*** ./node_modules/classnames/index.js ***! \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { eval("var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!\n Copyright (c) 2017 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg) && arg.length) {\n\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\tif (inner) {\n\t\t\t\t\tclasses.push(inner);\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif ( true && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (true) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\t!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {\n\t\t\treturn classNames;\n\t\t}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t} else {}\n}());\n\n\n//# sourceURL=webpack:///./node_modules/classnames/index.js?"); /***/ }), /***/ "./node_modules/object-assign/index.js": /*!*********************************************!*\ !*** ./node_modules/object-assign/index.js ***! \*********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n\n\n//# sourceURL=webpack:///./node_modules/object-assign/index.js?"); /***/ }), /***/ "./node_modules/prop-types/checkPropTypes.js": /*!***************************************************!*\ !*** ./node_modules/prop-types/checkPropTypes.js ***! \***************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar printWarning = function() {};\n\nif (true) {\n var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ \"./node_modules/prop-types/lib/ReactPropTypesSecret.js\");\n var loggedTypeFailures = {};\n var has = Function.call.bind(Object.prototype.hasOwnProperty);\n\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (true) {\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n var err = Error(\n (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'\n );\n err.name = 'Invariant Violation';\n throw err;\n }\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n if (error && !(error instanceof Error)) {\n printWarning(\n (componentName || 'React class') + ': type specification of ' +\n location + ' `' + typeSpecName + '` is invalid; the type checker ' +\n 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +\n 'You may have forgotten to pass an argument to the type checker ' +\n 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +\n 'shape all require an argument).'\n );\n }\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n printWarning(\n 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')\n );\n }\n }\n }\n }\n}\n\n/**\n * Resets warning cache when testing.\n *\n * @private\n */\ncheckPropTypes.resetWarningCache = function() {\n if (true) {\n loggedTypeFailures = {};\n }\n}\n\nmodule.exports = checkPropTypes;\n\n\n//# sourceURL=webpack:///./node_modules/prop-types/checkPropTypes.js?"); /***/ }), /***/ "./node_modules/prop-types/factoryWithTypeCheckers.js": /*!************************************************************!*\ !*** ./node_modules/prop-types/factoryWithTypeCheckers.js ***! \************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar ReactIs = __webpack_require__(/*! react-is */ \"./node_modules/react-is/index.js\");\nvar assign = __webpack_require__(/*! object-assign */ \"./node_modules/object-assign/index.js\");\n\nvar ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ \"./node_modules/prop-types/lib/ReactPropTypesSecret.js\");\nvar checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ \"./node_modules/prop-types/checkPropTypes.js\");\n\nvar has = Function.call.bind(Object.prototype.hasOwnProperty);\nvar printWarning = function() {};\n\nif (true) {\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\nfunction emptyFunctionThatReturnsNull() {\n return null;\n}\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n elementType: createElementTypeTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker,\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message) {\n this.message = message;\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (true) {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use `PropTypes.checkPropTypes()` to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n } else if ( true && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n printWarning(\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!ReactIs.isValidElementType(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n if (true) {\n if (arguments.length > 1) {\n printWarning(\n 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +\n 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'\n );\n } else {\n printWarning('Invalid argument supplied to oneOf, expected an array.');\n }\n }\n return emptyFunctionThatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {\n var type = getPreciseType(value);\n if (type === 'symbol') {\n return String(value);\n }\n return value;\n });\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (has(propValue, key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : undefined;\n return emptyFunctionThatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n printWarning(\n 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'\n );\n return emptyFunctionThatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {\n return null;\n }\n }\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (!checker) {\n continue;\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n // We need to check all keys in case some are required but missing from\n // props.\n var allKeys = assign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (!checker) {\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') +\n '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')\n );\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // falsy value can't be a Symbol\n if (!propValue) {\n return false;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n\n\n//# sourceURL=webpack:///./node_modules/prop-types/factoryWithTypeCheckers.js?"); /***/ }), /***/ "./node_modules/prop-types/index.js": /*!******************************************!*\ !*** ./node_modules/prop-types/index.js ***! \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (true) {\n var ReactIs = __webpack_require__(/*! react-is */ \"./node_modules/react-is/index.js\");\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ \"./node_modules/prop-types/factoryWithTypeCheckers.js\")(ReactIs.isElement, throwOnDirectAccess);\n} else {}\n\n\n//# sourceURL=webpack:///./node_modules/prop-types/index.js?"); /***/ }), /***/ "./node_modules/prop-types/lib/ReactPropTypesSecret.js": /*!*************************************************************!*\ !*** ./node_modules/prop-types/lib/ReactPropTypesSecret.js ***! \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n\n\n//# sourceURL=webpack:///./node_modules/prop-types/lib/ReactPropTypesSecret.js?"); /***/ }), /***/ "./node_modules/react-device-detect/dist/index.js": /*!********************************************************!*\ !*** ./node_modules/react-device-detect/dist/index.js ***! \********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { eval("module.exports =\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 3);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar UAParser = __webpack_require__(6);\n\nvar UA = exports.UA = new UAParser();\n\nvar browser = exports.browser = UA.getBrowser();\nvar cpu = exports.cpu = UA.getCPU();\nvar device = exports.device = UA.getDevice();\nvar engine = exports.engine = UA.getEngine();\nvar os = exports.os = UA.getOS();\nvar ua = exports.ua = UA.getUA();\nvar setUA = exports.setUA = function setUA(uaStr) {\n return UA.setUA(uaStr);\n};\n\nvar mockUserAgent = exports.mockUserAgent = function mockUserAgent(userAgent) {\n window.navigator.__defineGetter__(\"userAgent\", function () {\n return userAgent;\n });\n};\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.isYandex = exports.isEdge = exports.getUA = exports.engineVersion = exports.engineName = exports.mobileModel = exports.mobileVendor = exports.browserName = exports.browserVersion = exports.fullBrowserVersion = exports.osName = exports.osVersion = exports.isIE = exports.isOpera = exports.isSafari = exports.isFirefox = exports.isChrome = exports.isIOS = exports.isWinPhone = exports.isAndroid = exports.isBrowser = exports.isTablet = exports.isMobileOnly = exports.isMobile = exports.isChromium = exports.isMobileSafari = exports.isWearable = exports.isConsole = exports.isSmartTV = undefined;\n\nvar _getUaData = __webpack_require__(0);\n\nvar _types = __webpack_require__(2);\n\nvar CHROME = _types.BROWSER_TYPES.CHROME,\n CHROMIUM = _types.BROWSER_TYPES.CHROMIUM,\n IE = _types.BROWSER_TYPES.IE,\n INTERNET_EXPLORER = _types.BROWSER_TYPES.INTERNET_EXPLORER,\n OPERA = _types.BROWSER_TYPES.OPERA,\n FIREFOX = _types.BROWSER_TYPES.FIREFOX,\n SAFARI = _types.BROWSER_TYPES.SAFARI,\n MOBILE_SAFARI = _types.BROWSER_TYPES.MOBILE_SAFARI,\n EDGE = _types.BROWSER_TYPES.EDGE,\n YANDEX = _types.BROWSER_TYPES.YANDEX;\nvar MOBILE = _types.DEVICE_TYPES.MOBILE,\n TABLET = _types.DEVICE_TYPES.TABLET,\n SMART_TV = _types.DEVICE_TYPES.SMART_TV,\n BROWSER = _types.DEVICE_TYPES.BROWSER,\n WEARABLE = _types.DEVICE_TYPES.WEARABLE,\n CONSOLE = _types.DEVICE_TYPES.CONSOLE;\nvar ANDROID = _types.OS_TYPES.ANDROID,\n WINDOWS_PHONE = _types.OS_TYPES.WINDOWS_PHONE,\n IOS = _types.OS_TYPES.IOS;\n\n\nvar isMobileType = function isMobileType() {\n return _getUaData.device.type === MOBILE;\n};\nvar isTabletType = function isTabletType() {\n return _getUaData.device.type === TABLET;\n};\n\nvar isMobileAndTabletType = function isMobileAndTabletType() {\n switch (_getUaData.device.type) {\n case MOBILE:\n case TABLET:\n return true;\n default:\n return false;\n }\n};\n\nvar isSmartTVType = function isSmartTVType() {\n return _getUaData.device.type === SMART_TV;\n};\nvar isBrowserType = function isBrowserType() {\n return _getUaData.device.type === BROWSER;\n};\nvar isWearableType = function isWearableType() {\n return _getUaData.device.type === WEARABLE;\n};\nvar isConsoleType = function isConsoleType() {\n return _getUaData.device.type === CONSOLE;\n};\nvar isAndroidType = function isAndroidType() {\n return _getUaData.os.name === ANDROID;\n};\nvar isWinPhoneType = function isWinPhoneType() {\n return _getUaData.os.name === WINDOWS_PHONE;\n};\nvar isIOSType = function isIOSType() {\n return _getUaData.os.name === IOS;\n};\nvar isChromeType = function isChromeType() {\n return _getUaData.browser.name === CHROME;\n};\nvar isFirefoxType = function isFirefoxType() {\n return _getUaData.browser.name === FIREFOX;\n};\nvar isChromiumType = function isChromiumType() {\n return _getUaData.browser.name === CHROMIUM;\n};\nvar isEdgeType = function isEdgeType() {\n return _getUaData.browser.name === EDGE;\n};\nvar isYandexType = function isYandexType() {\n return _getUaData.browser.name === YANDEX;\n};\nvar isSafariType = function isSafariType() {\n return _getUaData.browser.name === SAFARI || _getUaData.browser.name === MOBILE_SAFARI;\n};\nvar isMobileSafariType = function isMobileSafariType() {\n return _getUaData.browser.name === MOBILE_SAFARI;\n};\nvar isOperaType = function isOperaType() {\n return _getUaData.browser.name === OPERA;\n};\nvar isIEType = function isIEType() {\n return _getUaData.browser.name === INTERNET_EXPLORER || _getUaData.browser.name === IE;\n};\n\nvar getBrowserFullVersion = function getBrowserFullVersion() {\n return _getUaData.browser.major;\n};\nvar getBrowserVersion = function getBrowserVersion() {\n return _getUaData.browser.version;\n};\nvar getOsVersion = function getOsVersion() {\n return _getUaData.os.version ? _getUaData.os.version : \"none\";\n};\nvar getOsName = function getOsName() {\n return _getUaData.os.name ? _getUaData.os.name : \"none\";\n};\nvar getBrowserName = function getBrowserName() {\n return _getUaData.browser.name;\n};\nvar getMobileVendor = function getMobileVendor() {\n return _getUaData.device.vendor ? _getUaData.device.vendor : \"none\";\n};\nvar getMobileModel = function getMobileModel() {\n return _getUaData.device.model ? _getUaData.device.model : \"none\";\n};\nvar getEngineName = function getEngineName() {\n return _getUaData.engine.name;\n};\nvar getEngineVersion = function getEngineVersion() {\n return _getUaData.engine.version;\n};\nvar getUseragent = function getUseragent() {\n return _getUaData.ua;\n};\n\nvar isSmartTV = exports.isSmartTV = isSmartTVType();\nvar isConsole = exports.isConsole = isConsoleType();\nvar isWearable = exports.isWearable = isWearableType();\nvar isMobileSafari = exports.isMobileSafari = isMobileSafariType();\nvar isChromium = exports.isChromium = isChromiumType();\nvar isMobile = exports.isMobile = isMobileAndTabletType();\nvar isMobileOnly = exports.isMobileOnly = isMobileType();\nvar isTablet = exports.isTablet = isTabletType();\nvar isBrowser = exports.isBrowser = isBrowserType();\nvar isAndroid = exports.isAndroid = isAndroidType();\nvar isWinPhone = exports.isWinPhone = isWinPhoneType();\nvar isIOS = exports.isIOS = isIOSType();\nvar isChrome = exports.isChrome = isChromeType();\nvar isFirefox = exports.isFirefox = isFirefoxType();\nvar isSafari = exports.isSafari = isSafariType();\nvar isOpera = exports.isOpera = isOperaType();\nvar isIE = exports.isIE = isIEType();\nvar osVersion = exports.osVersion = getOsVersion();\nvar osName = exports.osName = getOsName();\nvar fullBrowserVersion = exports.fullBrowserVersion = getBrowserFullVersion();\nvar browserVersion = exports.browserVersion = getBrowserVersion();\nvar browserName = exports.browserName = getBrowserName();\nvar mobileVendor = exports.mobileVendor = getMobileVendor();\nvar mobileModel = exports.mobileModel = getMobileModel();\nvar engineName = exports.engineName = getEngineName();\nvar engineVersion = exports.engineVersion = getEngineVersion();\nvar getUA = exports.getUA = getUseragent();\nvar isEdge = exports.isEdge = isEdgeType();\nvar isYandex = exports.isYandex = isYandexType();\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.wearPayload = exports.consolePayload = exports.stvPayload = exports.mobilePayload = exports.broPayload = exports.getCurrentBrowser = exports.checkType = exports.OS_TYPES = exports.BROWSER_TYPES = exports.DEVICE_TYPES = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _getUaData = __webpack_require__(0);\n\nvar DEVICE_TYPES = exports.DEVICE_TYPES = {\n MOBILE: 'mobile',\n TABLET: 'tablet',\n SMART_TV: 'smarttv',\n CONSOLE: 'console',\n WEARABLE: 'wearable',\n BROWSER: undefined\n};\n\nvar BROWSER_TYPES = exports.BROWSER_TYPES = {\n CHROME: 'Chrome',\n FIREFOX: \"Firefox\",\n OPERA: \"Opera\",\n YANDEX: \"Yandex\",\n SAFARI: \"Safari\",\n INTERNET_EXPLORER: \"Internet Explorer\",\n EDGE: \"Edge\",\n CHROMIUM: \"Chromium\",\n IE: 'IE',\n MOBILE_SAFARI: \"Mobile Safari\"\n};\n\nvar OS_TYPES = exports.OS_TYPES = {\n IOS: 'iOS',\n ANDROID: \"Android\",\n WINDOWS_PHONE: \"Windows Phone\"\n};\n\nvar initialData = {\n isMobile: false,\n isTablet: false,\n isBrowser: false,\n isSmartTV: false,\n isConsole: false,\n isWearable: false\n};\n\nvar checkType = exports.checkType = function checkType(type) {\n switch (type) {\n case DEVICE_TYPES.MOBILE:\n return { isMobile: true };\n case DEVICE_TYPES.TABLET:\n return { isTablet: true };\n case DEVICE_TYPES.SMART_TV:\n return { isSmartTV: true };\n case DEVICE_TYPES.CONSOLE:\n return { isConsole: true };\n case DEVICE_TYPES.WEARABLE:\n return { isWearable: true };\n case DEVICE_TYPES.BROWSER:\n return { isBrowser: true };\n default:\n return initialData;\n }\n};\n\nvar getCurrentBrowser = exports.getCurrentBrowser = function getCurrentBrowser(name) {\n switch (name) {\n case BROWSER_TYPES.CHROME:\n case BROWSER_TYPES.FIREFOX:\n case BROWSER_TYPES.OPERA:\n case BROWSER_TYPES.YANDEX:\n case BROWSER_TYPES.SAFARI:\n case BROWSER_TYPES.IE:\n case BROWSER_TYPES.EDGE:\n case BROWSER_TYPES.CHROMIUM:\n return true;\n default:\n return false;\n }\n};\n\nvar broPayload = exports.broPayload = function broPayload(isBrowser, browser, engine, os, ua) {\n return {\n isBrowser: isBrowser,\n browserMajorVersion: browser.major,\n browserFullVersion: browser.version,\n browserName: browser.name,\n engineName: engine.name || false,\n engineVersion: engine.version,\n osName: os.name,\n osVersion: os.version,\n userAgent: ua\n };\n};\n\nvar mobilePayload = exports.mobilePayload = function mobilePayload(type, device, os, ua) {\n return _extends({}, type, {\n vendor: device.vendor || \"none\",\n model: device.model || \"none\",\n os: os.name || \"none\",\n osVersion: os.version || \"none\",\n ua: ua || \"none\"\n });\n};\n\nvar stvPayload = exports.stvPayload = function stvPayload(isSmartTV, engine, os, ua) {\n return {\n isSmartTV: isSmartTV,\n engineName: engine.name || false,\n engineVersion: engine.version,\n osName: os.name,\n osVersion: os.version,\n userAgent: ua\n };\n};\n\nvar consolePayload = exports.consolePayload = function consolePayload(isConsole, engine, os, ua) {\n return {\n isConsole: isConsole,\n engineName: engine.name || false,\n engineVersion: engine.version,\n osName: os.name,\n osVersion: os.version,\n userAgent: ua\n };\n};\n\nvar wearPayload = exports.wearPayload = function wearPayload(isWearable, engine, os, ua) {\n return {\n isWearable: isWearable,\n engineName: engine.name || false,\n engineVersion: engine.version,\n osName: os.name,\n osVersion: os.version,\n userAgent: ua\n };\n};\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.deviceDetect = undefined;\n\nvar _views = __webpack_require__(4);\n\nObject.keys(_views).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function get() {\n return _views[key];\n }\n });\n});\n\nvar _selectors = __webpack_require__(1);\n\nObject.keys(_selectors).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function get() {\n return _selectors[key];\n }\n });\n});\n\nvar _detect = __webpack_require__(8);\n\nvar _detect2 = _interopRequireDefault(_detect);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.deviceDetect = _detect2.default;\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.CustomView = exports.WearableView = exports.ConsoleView = exports.SmartTVView = exports.MobileOnlyView = exports.WinPhoneView = exports.TabletView = exports.MobileView = exports.IOSView = exports.IEView = exports.BrowserView = exports.AndroidView = undefined;\n\nvar _react = __webpack_require__(5);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _selectors = __webpack_require__(1);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar AndroidView = exports.AndroidView = function AndroidView(_ref) {\n var renderWithFragment = _ref.renderWithFragment,\n children = _ref.children,\n viewClassName = _ref.viewClassName,\n style = _ref.style;\n\n return _selectors.isAndroid ? renderWithFragment ? _react2.default.createElement(\n _react.Fragment,\n null,\n children\n ) : _react2.default.createElement(\n 'div',\n { className: viewClassName, style: style },\n children\n ) : null;\n};\n\nvar BrowserView = exports.BrowserView = function BrowserView(_ref2) {\n var renderWithFragment = _ref2.renderWithFragment,\n children = _ref2.children,\n viewClassName = _ref2.viewClassName,\n style = _ref2.style;\n\n return _selectors.isBrowser ? renderWithFragment ? _react2.default.createElement(\n _react.Fragment,\n null,\n children\n ) : _react2.default.createElement(\n 'div',\n { className: viewClassName, style: style },\n children\n ) : null;\n};\n\nvar IEView = exports.IEView = function IEView(_ref3) {\n var renderWithFragment = _ref3.renderWithFragment,\n children = _ref3.children,\n viewClassName = _ref3.viewClassName,\n style = _ref3.style;\n\n return _selectors.isIE ? renderWithFragment ? _react2.default.createElement(\n _react.Fragment,\n null,\n children\n ) : _react2.default.createElement(\n 'div',\n { className: viewClassName, style: style },\n children\n ) : null;\n};\n\nvar IOSView = exports.IOSView = function IOSView(_ref4) {\n var renderWithFragment = _ref4.renderWithFragment,\n children = _ref4.children,\n viewClassName = _ref4.viewClassName,\n style = _ref4.style;\n\n return _selectors.isIOS ? renderWithFragment ? _react2.default.createElement(\n _react.Fragment,\n null,\n children\n ) : _react2.default.createElement(\n 'div',\n { className: viewClassName, style: style },\n children\n ) : null;\n};\n\nvar MobileView = exports.MobileView = function MobileView(_ref5) {\n var renderWithFragment = _ref5.renderWithFragment,\n children = _ref5.children,\n viewClassName = _ref5.viewClassName,\n style = _ref5.style;\n\n return _selectors.isMobile ? renderWithFragment ? _react2.default.createElement(\n _react.Fragment,\n null,\n children\n ) : _react2.default.createElement(\n 'div',\n { className: viewClassName, style: style },\n children\n ) : null;\n};\n\nvar TabletView = exports.TabletView = function TabletView(_ref6) {\n var renderWithFragment = _ref6.renderWithFragment,\n children = _ref6.children,\n viewClassName = _ref6.viewClassName,\n style = _ref6.style;\n\n return _selectors.isTablet ? renderWithFragment ? _react2.default.createElement(\n _react.Fragment,\n null,\n children\n ) : _react2.default.createElement(\n 'div',\n { className: viewClassName, style: style },\n children\n ) : null;\n};\n\nvar WinPhoneView = exports.WinPhoneView = function WinPhoneView(_ref7) {\n var renderWithFragment = _ref7.renderWithFragment,\n children = _ref7.children,\n viewClassName = _ref7.viewClassName,\n style = _ref7.style;\n\n return _selectors.isWinPhone ? renderWithFragment ? _react2.default.createElement(\n _react.Fragment,\n null,\n children\n ) : _react2.default.createElement(\n 'div',\n { className: viewClassName, style: style },\n children\n ) : null;\n};\n\nvar MobileOnlyView = exports.MobileOnlyView = function MobileOnlyView(_ref8) {\n var renderWithFragment = _ref8.renderWithFragment,\n children = _ref8.children,\n viewClassName = _ref8.viewClassName,\n style = _ref8.style;\n\n return _selectors.isMobileOnly ? renderWithFragment ? _react2.default.createElement(\n _react.Fragment,\n null,\n children\n ) : _react2.default.createElement(\n 'div',\n { className: viewClassName, style: style },\n children\n ) : null;\n};\n\nvar SmartTVView = exports.SmartTVView = function SmartTVView(_ref9) {\n var renderWithFragment = _ref9.renderWithFragment,\n children = _ref9.children,\n viewClassName = _ref9.viewClassName,\n style = _ref9.style;\n\n return _selectors.isSmartTV ? renderWithFragment ? _react2.default.createElement(\n _react.Fragment,\n null,\n children\n ) : _react2.default.createElement(\n 'div',\n { className: viewClassName, style: style },\n children\n ) : null;\n};\n\nvar ConsoleView = exports.ConsoleView = function ConsoleView(_ref10) {\n var renderWithFragment = _ref10.renderWithFragment,\n children = _ref10.children,\n viewClassName = _ref10.viewClassName,\n style = _ref10.style;\n\n return _selectors.isConsole ? renderWithFragment ? _react2.default.createElement(\n _react.Fragment,\n null,\n children\n ) : _react2.default.createElement(\n 'div',\n { className: viewClassName, style: style },\n children\n ) : null;\n};\n\nvar WearableView = exports.WearableView = function WearableView(_ref11) {\n var renderWithFragment = _ref11.renderWithFragment,\n children = _ref11.children,\n viewClassName = _ref11.viewClassName,\n style = _ref11.style;\n\n return _selectors.isWearable ? renderWithFragment ? _react2.default.createElement(\n _react.Fragment,\n null,\n children\n ) : _react2.default.createElement(\n 'div',\n { className: viewClassName, style: style },\n children\n ) : null;\n};\n\nvar CustomView = exports.CustomView = function CustomView(_ref12) {\n var renderWithFragment = _ref12.renderWithFragment,\n children = _ref12.children,\n viewClassName = _ref12.viewClassName,\n style = _ref12.style,\n condition = _ref12.condition;\n\n return condition ? renderWithFragment ? _react2.default.createElement(\n _react.Fragment,\n null,\n children\n ) : _react2.default.createElement(\n 'div',\n { className: viewClassName, style: style },\n children\n ) : null;\n};\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports) {\n\nmodule.exports = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar __WEBPACK_AMD_DEFINE_RESULT__;/*!\n * UAParser.js v0.7.18\n * Lightweight JavaScript-based User-Agent string parser\n * https://github.com/faisalman/ua-parser-js\n *\n * Copyright © 2012-2016 Faisal Salman \n * Dual licensed under GPLv2 or MIT\n */\n(function(window,undefined){\"use strict\";var LIBVERSION=\"0.7.18\",EMPTY=\"\",UNKNOWN=\"?\",FUNC_TYPE=\"function\",UNDEF_TYPE=\"undefined\",OBJ_TYPE=\"object\",STR_TYPE=\"string\",MAJOR=\"major\",MODEL=\"model\",NAME=\"name\",TYPE=\"type\",VENDOR=\"vendor\",VERSION=\"version\",ARCHITECTURE=\"architecture\",CONSOLE=\"console\",MOBILE=\"mobile\",TABLET=\"tablet\",SMARTTV=\"smarttv\",WEARABLE=\"wearable\",EMBEDDED=\"embedded\";var util={extend:function(regexes,extensions){var margedRegexes={};for(var i in regexes){if(extensions[i]&&extensions[i].length%2===0){margedRegexes[i]=extensions[i].concat(regexes[i])}else{margedRegexes[i]=regexes[i]}}return margedRegexes},has:function(str1,str2){if(typeof str1===\"string\"){return str2.toLowerCase().indexOf(str1.toLowerCase())!==-1}else{return false}},lowerize:function(str){return str.toLowerCase()},major:function(version){return typeof version===STR_TYPE?version.replace(/[^\\d\\.]/g,\"\").split(\".\")[0]:undefined},trim:function(str){return str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,\"\")}};var mapper={rgx:function(ua,arrays){var i=0,j,k,p,q,matches,match;while(i0){if(q.length==2){if(typeof q[1]==FUNC_TYPE){this[q[0]]=q[1].call(this,match)}else{this[q[0]]=q[1]}}else if(q.length==3){if(typeof q[1]===FUNC_TYPE&&!(q[1].exec&&q[1].test)){this[q[0]]=match?q[1].call(this,match,q[2]):undefined}else{this[q[0]]=match?match.replace(q[1],q[2]):undefined}}else if(q.length==4){this[q[0]]=match?q[3].call(this,match.replace(q[1],q[2])):undefined}}else{this[q]=match?match:undefined}}}}i+=2}},str:function(str,map){for(var i in map){if(typeof map[i]===OBJ_TYPE&&map[i].length>0){for(var j=0;j -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}\n\n/**\n * Publishes an event so that it can be dispatched by the supplied plugin.\n *\n * @param {object} dispatchConfig Dispatch configuration for the event.\n * @param {object} PluginModule Plugin publishing the event.\n * @return {boolean} True if the event was successfully published.\n * @private\n */\nfunction publishEventForPlugin(dispatchConfig, pluginModule, eventName) {\n !!eventNameDispatchConfigs.hasOwnProperty(eventName) ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.', eventName) : void 0;\n eventNameDispatchConfigs[eventName] = dispatchConfig;\n\n var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;\n if (phasedRegistrationNames) {\n for (var phaseName in phasedRegistrationNames) {\n if (phasedRegistrationNames.hasOwnProperty(phaseName)) {\n var phasedRegistrationName = phasedRegistrationNames[phaseName];\n publishRegistrationName(phasedRegistrationName, pluginModule, eventName);\n }\n }\n return true;\n } else if (dispatchConfig.registrationName) {\n publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName);\n return true;\n }\n return false;\n}\n\n/**\n * Publishes a registration name that is used to identify dispatched events.\n *\n * @param {string} registrationName Registration name to add.\n * @param {object} PluginModule Plugin publishing the event.\n * @private\n */\nfunction publishRegistrationName(registrationName, pluginModule, eventName) {\n !!registrationNameModules[registrationName] ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.', registrationName) : void 0;\n registrationNameModules[registrationName] = pluginModule;\n registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies;\n\n {\n var lowerCasedName = registrationName.toLowerCase();\n possibleRegistrationNames[lowerCasedName] = registrationName;\n\n if (registrationName === 'onDoubleClick') {\n possibleRegistrationNames.ondblclick = registrationName;\n }\n }\n}\n\n/**\n * Registers plugins so that they can extract and dispatch events.\n *\n * @see {EventPluginHub}\n */\n\n/**\n * Ordered list of injected plugins.\n */\nvar plugins = [];\n\n/**\n * Mapping from event name to dispatch config\n */\nvar eventNameDispatchConfigs = {};\n\n/**\n * Mapping from registration name to plugin module\n */\nvar registrationNameModules = {};\n\n/**\n * Mapping from registration name to event name\n */\nvar registrationNameDependencies = {};\n\n/**\n * Mapping from lowercase registration names to the properly cased version,\n * used to warn in the case of missing event handlers. Available\n * only in true.\n * @type {Object}\n */\nvar possibleRegistrationNames = {};\n// Trust the developer to only use possibleRegistrationNames in true\n\n/**\n * Injects an ordering of plugins (by plugin name). This allows the ordering\n * to be decoupled from injection of the actual plugins so that ordering is\n * always deterministic regardless of packaging, on-the-fly injection, etc.\n *\n * @param {array} InjectedEventPluginOrder\n * @internal\n * @see {EventPluginHub.injection.injectEventPluginOrder}\n */\nfunction injectEventPluginOrder(injectedEventPluginOrder) {\n !!eventPluginOrder ? invariant(false, 'EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.') : void 0;\n // Clone the ordering so it cannot be dynamically mutated.\n eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder);\n recomputePluginOrdering();\n}\n\n/**\n * Injects plugins to be used by `EventPluginHub`. The plugin names must be\n * in the ordering injected by `injectEventPluginOrder`.\n *\n * Plugins can be injected as part of page initialization or on-the-fly.\n *\n * @param {object} injectedNamesToPlugins Map from names to plugin modules.\n * @internal\n * @see {EventPluginHub.injection.injectEventPluginsByName}\n */\nfunction injectEventPluginsByName(injectedNamesToPlugins) {\n var isOrderingDirty = false;\n for (var pluginName in injectedNamesToPlugins) {\n if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) {\n continue;\n }\n var pluginModule = injectedNamesToPlugins[pluginName];\n if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) {\n !!namesToPlugins[pluginName] ? invariant(false, 'EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.', pluginName) : void 0;\n namesToPlugins[pluginName] = pluginModule;\n isOrderingDirty = true;\n }\n }\n if (isOrderingDirty) {\n recomputePluginOrdering();\n }\n}\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warningWithoutStack = function () {};\n\n{\n warningWithoutStack = function (condition, format) {\n for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n args[_key - 2] = arguments[_key];\n }\n\n if (format === undefined) {\n throw new Error('`warningWithoutStack(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n if (args.length > 8) {\n // Check before the condition to catch violations early.\n throw new Error('warningWithoutStack() currently supports at most 8 arguments.');\n }\n if (condition) {\n return;\n }\n if (typeof console !== 'undefined') {\n var argsWithFormat = args.map(function (item) {\n return '' + item;\n });\n argsWithFormat.unshift('Warning: ' + format);\n\n // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n Function.prototype.apply.call(console.error, console, argsWithFormat);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n throw new Error(message);\n } catch (x) {}\n };\n}\n\nvar warningWithoutStack$1 = warningWithoutStack;\n\nvar getFiberCurrentPropsFromNode = null;\nvar getInstanceFromNode = null;\nvar getNodeFromInstance = null;\n\nfunction setComponentTree(getFiberCurrentPropsFromNodeImpl, getInstanceFromNodeImpl, getNodeFromInstanceImpl) {\n getFiberCurrentPropsFromNode = getFiberCurrentPropsFromNodeImpl;\n getInstanceFromNode = getInstanceFromNodeImpl;\n getNodeFromInstance = getNodeFromInstanceImpl;\n {\n !(getNodeFromInstance && getInstanceFromNode) ? warningWithoutStack$1(false, 'EventPluginUtils.setComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.') : void 0;\n }\n}\n\nvar validateEventDispatches = void 0;\n{\n validateEventDispatches = function (event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n var listenersIsArr = Array.isArray(dispatchListeners);\n var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0;\n\n var instancesIsArr = Array.isArray(dispatchInstances);\n var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0;\n\n !(instancesIsArr === listenersIsArr && instancesLen === listenersLen) ? warningWithoutStack$1(false, 'EventPluginUtils: Invalid `event`.') : void 0;\n };\n}\n\n/**\n * Dispatch the event to the listener.\n * @param {SyntheticEvent} event SyntheticEvent to handle\n * @param {function} listener Application-level callback\n * @param {*} inst Internal component instance\n */\nfunction executeDispatch(event, listener, inst) {\n var type = event.type || 'unknown-event';\n event.currentTarget = getNodeFromInstance(inst);\n invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event);\n event.currentTarget = null;\n}\n\n/**\n * Standard/simple iteration through an event's collected dispatches.\n */\nfunction executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and Instances are two parallel arrays that are always in sync.\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}\n\n/**\n * @see executeDispatchesInOrderStopAtTrueImpl\n */\n\n\n/**\n * Execution of a \"direct\" dispatch - there must be at most one dispatch\n * accumulated on the event or it is considered an error. It doesn't really make\n * sense for an event with multiple dispatches (bubbled) to keep track of the\n * return values at each dispatch execution, but it does tend to make sense when\n * dealing with \"direct\" dispatches.\n *\n * @return {*} The return value of executing the single dispatch.\n */\n\n\n/**\n * @param {SyntheticEvent} event\n * @return {boolean} True iff number of dispatches accumulated is greater than 0.\n */\n\n/**\n * Accumulates items that must not be null or undefined into the first one. This\n * is used to conserve memory by avoiding array allocations, and thus sacrifices\n * API cleanness. Since `current` can be null before being passed in and not\n * null after this function, make sure to assign it back to `current`:\n *\n * `a = accumulateInto(a, b);`\n *\n * This API should be sparingly used. Try `accumulate` for something cleaner.\n *\n * @return {*|array<*>} An accumulation of items.\n */\n\nfunction accumulateInto(current, next) {\n !(next != null) ? invariant(false, 'accumulateInto(...): Accumulated items must not be null or undefined.') : void 0;\n\n if (current == null) {\n return next;\n }\n\n // Both are not empty. Warning: Never call x.concat(y) when you are not\n // certain that x is an Array (x could be a string with concat method).\n if (Array.isArray(current)) {\n if (Array.isArray(next)) {\n current.push.apply(current, next);\n return current;\n }\n current.push(next);\n return current;\n }\n\n if (Array.isArray(next)) {\n // A bit too dangerous to mutate `next`.\n return [current].concat(next);\n }\n\n return [current, next];\n}\n\n/**\n * @param {array} arr an \"accumulation\" of items which is either an Array or\n * a single item. Useful when paired with the `accumulate` module. This is a\n * simple utility that allows us to reason about a collection of items, but\n * handling the case when there is exactly one item (and we do not need to\n * allocate an array).\n * @param {function} cb Callback invoked with each element or a collection.\n * @param {?} [scope] Scope used as `this` in a callback.\n */\nfunction forEachAccumulated(arr, cb, scope) {\n if (Array.isArray(arr)) {\n arr.forEach(cb, scope);\n } else if (arr) {\n cb.call(scope, arr);\n }\n}\n\n/**\n * Internal queue of events that have accumulated their dispatches and are\n * waiting to have their dispatches executed.\n */\nvar eventQueue = null;\n\n/**\n * Dispatches an event and releases it back into the pool, unless persistent.\n *\n * @param {?object} event Synthetic event to be dispatched.\n * @private\n */\nvar executeDispatchesAndRelease = function (event) {\n if (event) {\n executeDispatchesInOrder(event);\n\n if (!event.isPersistent()) {\n event.constructor.release(event);\n }\n }\n};\nvar executeDispatchesAndReleaseTopLevel = function (e) {\n return executeDispatchesAndRelease(e);\n};\n\nfunction isInteractive(tag) {\n return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';\n}\n\nfunction shouldPreventMouseEvent(name, type, props) {\n switch (name) {\n case 'onClick':\n case 'onClickCapture':\n case 'onDoubleClick':\n case 'onDoubleClickCapture':\n case 'onMouseDown':\n case 'onMouseDownCapture':\n case 'onMouseMove':\n case 'onMouseMoveCapture':\n case 'onMouseUp':\n case 'onMouseUpCapture':\n return !!(props.disabled && isInteractive(type));\n default:\n return false;\n }\n}\n\n/**\n * This is a unified interface for event plugins to be installed and configured.\n *\n * Event plugins can implement the following properties:\n *\n * `extractEvents` {function(string, DOMEventTarget, string, object): *}\n * Required. When a top-level event is fired, this method is expected to\n * extract synthetic events that will in turn be queued and dispatched.\n *\n * `eventTypes` {object}\n * Optional, plugins that fire events must publish a mapping of registration\n * names that are used to register listeners. Values of this mapping must\n * be objects that contain `registrationName` or `phasedRegistrationNames`.\n *\n * `executeDispatch` {function(object, function, string)}\n * Optional, allows plugins to override how an event gets dispatched. By\n * default, the listener is simply invoked.\n *\n * Each plugin that is injected into `EventsPluginHub` is immediately operable.\n *\n * @public\n */\n\n/**\n * Methods for injecting dependencies.\n */\nvar injection = {\n /**\n * @param {array} InjectedEventPluginOrder\n * @public\n */\n injectEventPluginOrder: injectEventPluginOrder,\n\n /**\n * @param {object} injectedNamesToPlugins Map from names to plugin modules.\n */\n injectEventPluginsByName: injectEventPluginsByName\n};\n\n/**\n * @param {object} inst The instance, which is the source of events.\n * @param {string} registrationName Name of listener (e.g. `onClick`).\n * @return {?function} The stored callback.\n */\nfunction getListener(inst, registrationName) {\n var listener = void 0;\n\n // TODO: shouldPreventMouseEvent is DOM-specific and definitely should not\n // live here; needs to be moved to a better place soon\n var stateNode = inst.stateNode;\n if (!stateNode) {\n // Work in progress (ex: onload events in incremental mode).\n return null;\n }\n var props = getFiberCurrentPropsFromNode(stateNode);\n if (!props) {\n // Work in progress.\n return null;\n }\n listener = props[registrationName];\n if (shouldPreventMouseEvent(registrationName, inst.type, props)) {\n return null;\n }\n !(!listener || typeof listener === 'function') ? invariant(false, 'Expected `%s` listener to be a function, instead got a value of `%s` type.', registrationName, typeof listener) : void 0;\n return listener;\n}\n\n/**\n * Allows registered plugins an opportunity to extract events from top-level\n * native browser events.\n *\n * @return {*} An accumulation of synthetic events.\n * @internal\n */\nfunction extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n var events = null;\n for (var i = 0; i < plugins.length; i++) {\n // Not every plugin in the ordering may be loaded at runtime.\n var possiblePlugin = plugins[i];\n if (possiblePlugin) {\n var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);\n if (extractedEvents) {\n events = accumulateInto(events, extractedEvents);\n }\n }\n }\n return events;\n}\n\nfunction runEventsInBatch(events) {\n if (events !== null) {\n eventQueue = accumulateInto(eventQueue, events);\n }\n\n // Set `eventQueue` to null before processing it so that we can tell if more\n // events get enqueued while processing.\n var processingEventQueue = eventQueue;\n eventQueue = null;\n\n if (!processingEventQueue) {\n return;\n }\n\n forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel);\n !!eventQueue ? invariant(false, 'processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.') : void 0;\n // This would be a good time to rethrow if any of the event handlers threw.\n rethrowCaughtError();\n}\n\nfunction runExtractedEventsInBatch(topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n var events = extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);\n runEventsInBatch(events);\n}\n\nvar FunctionComponent = 0;\nvar ClassComponent = 1;\nvar IndeterminateComponent = 2; // Before we know whether it is function or class\nvar HostRoot = 3; // Root of a host tree. Could be nested inside another node.\nvar HostPortal = 4; // A subtree. Could be an entry point to a different renderer.\nvar HostComponent = 5;\nvar HostText = 6;\nvar Fragment = 7;\nvar Mode = 8;\nvar ContextConsumer = 9;\nvar ContextProvider = 10;\nvar ForwardRef = 11;\nvar Profiler = 12;\nvar SuspenseComponent = 13;\nvar MemoComponent = 14;\nvar SimpleMemoComponent = 15;\nvar LazyComponent = 16;\nvar IncompleteClassComponent = 17;\nvar DehydratedSuspenseComponent = 18;\n\nvar randomKey = Math.random().toString(36).slice(2);\nvar internalInstanceKey = '__reactInternalInstance$' + randomKey;\nvar internalEventHandlersKey = '__reactEventHandlers$' + randomKey;\n\nfunction precacheFiberNode(hostInst, node) {\n node[internalInstanceKey] = hostInst;\n}\n\n/**\n * Given a DOM node, return the closest ReactDOMComponent or\n * ReactDOMTextComponent instance ancestor.\n */\nfunction getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}\n\n/**\n * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent\n * instance, or null if the node was not rendered by this React.\n */\nfunction getInstanceFromNode$1(node) {\n var inst = node[internalInstanceKey];\n if (inst) {\n if (inst.tag === HostComponent || inst.tag === HostText) {\n return inst;\n } else {\n return null;\n }\n }\n return null;\n}\n\n/**\n * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding\n * DOM node.\n */\nfunction getNodeFromInstance$1(inst) {\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber this, is just the state node right now. We assume it will be\n // a host component or host text.\n return inst.stateNode;\n }\n\n // Without this first invariant, passing a non-DOM-component triggers the next\n // invariant for a missing parent, which is super confusing.\n invariant(false, 'getNodeFromInstance: Invalid argument.');\n}\n\nfunction getFiberCurrentPropsFromNode$1(node) {\n return node[internalEventHandlersKey] || null;\n}\n\nfunction updateFiberProps(node, props) {\n node[internalEventHandlersKey] = props;\n}\n\nfunction getParent(inst) {\n do {\n inst = inst.return;\n // TODO: If this is a HostRoot we might want to bail out.\n // That is depending on if we want nested subtrees (layers) to bubble\n // events to their parent. We could also go through parentNode on the\n // host node but that wouldn't work for React Native and doesn't let us\n // do the portal feature.\n } while (inst && inst.tag !== HostComponent);\n if (inst) {\n return inst;\n }\n return null;\n}\n\n/**\n * Return the lowest common ancestor of A and B, or null if they are in\n * different trees.\n */\nfunction getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n instA = getParent(instA);\n instB = getParent(instB);\n }\n return null;\n}\n\n/**\n * Return if A is an ancestor of B.\n */\n\n\n/**\n * Return the parent instance of the passed-in instance.\n */\n\n\n/**\n * Simulates the traversal of a two-phase, capture/bubble event dispatch.\n */\nfunction traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i = void 0;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}\n\n/**\n * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that\n * should would receive a `mouseEnter` or `mouseLeave` event.\n *\n * Does not invoke the callback on the nearest common ancestor because nothing\n * \"entered\" or \"left\" that element.\n */\nfunction traverseEnterLeave(from, to, fn, argFrom, argTo) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n var pathFrom = [];\n while (true) {\n if (!from) {\n break;\n }\n if (from === common) {\n break;\n }\n var alternate = from.alternate;\n if (alternate !== null && alternate === common) {\n break;\n }\n pathFrom.push(from);\n from = getParent(from);\n }\n var pathTo = [];\n while (true) {\n if (!to) {\n break;\n }\n if (to === common) {\n break;\n }\n var _alternate = to.alternate;\n if (_alternate !== null && _alternate === common) {\n break;\n }\n pathTo.push(to);\n to = getParent(to);\n }\n for (var i = 0; i < pathFrom.length; i++) {\n fn(pathFrom[i], 'bubbled', argFrom);\n }\n for (var _i = pathTo.length; _i-- > 0;) {\n fn(pathTo[_i], 'captured', argTo);\n }\n}\n\n/**\n * Some event types have a notion of different registration names for different\n * \"phases\" of propagation. This finds listeners by a given phase.\n */\nfunction listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n}\n\n/**\n * A small set of propagation patterns, each of which will accept a small amount\n * of information, and generate a set of \"dispatch ready event objects\" - which\n * are sets of events that have already been annotated with a set of dispatched\n * listener functions/ids. The API is designed this way to discourage these\n * propagation strategies from actually executing the dispatches, since we\n * always want to collect the entire set of dispatches before executing even a\n * single one.\n */\n\n/**\n * Tags a `SyntheticEvent` with dispatched listeners. Creating this function\n * here, allows us to not have to bind or create functions for each event.\n * Mutating the event's members allows us to not have to create a wrapping\n * \"dispatch\" object that pairs the event with the listener.\n */\nfunction accumulateDirectionalDispatches(inst, phase, event) {\n {\n !inst ? warningWithoutStack$1(false, 'Dispatching inst must not be null') : void 0;\n }\n var listener = listenerAtPhase(inst, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n }\n}\n\n/**\n * Collect dispatches (must be entirely collected before dispatching - see unit\n * tests). Lazily allocate the array to conserve memory. We must loop through\n * each event and perform the traversal for each one. We cannot perform a\n * single traversal for the entire collection of events because each event may\n * have a different target.\n */\nfunction accumulateTwoPhaseDispatchesSingle(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);\n }\n}\n\n/**\n * Accumulates without regard to direction, does not look for phased\n * registration names. Same as `accumulateDirectDispatchesSingle` but without\n * requiring that the `dispatchMarker` be the same as the dispatched ID.\n */\nfunction accumulateDispatches(inst, ignoredDirection, event) {\n if (inst && event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(inst, registrationName);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n }\n }\n}\n\n/**\n * Accumulates dispatches on an `SyntheticEvent`, but only for the\n * `dispatchMarker`.\n * @param {SyntheticEvent} event\n */\nfunction accumulateDirectDispatchesSingle(event) {\n if (event && event.dispatchConfig.registrationName) {\n accumulateDispatches(event._targetInst, null, event);\n }\n}\n\nfunction accumulateTwoPhaseDispatches(events) {\n forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle);\n}\n\n\n\nfunction accumulateEnterLeaveDispatches(leave, enter, from, to) {\n traverseEnterLeave(from, to, accumulateDispatches, leave, enter);\n}\n\nfunction accumulateDirectDispatches(events) {\n forEachAccumulated(events, accumulateDirectDispatchesSingle);\n}\n\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\n// Do not uses the below two methods directly!\n// Instead use constants exported from DOMTopLevelEventTypes in ReactDOM.\n// (It is the only module that is allowed to access these methods.)\n\nfunction unsafeCastStringToDOMTopLevelType(topLevelType) {\n return topLevelType;\n}\n\nfunction unsafeCastDOMTopLevelTypeToString(topLevelType) {\n return topLevelType;\n}\n\n/**\n * Generate a mapping of standard vendor prefixes using the defined style property and event name.\n *\n * @param {string} styleProp\n * @param {string} eventName\n * @returns {object}\n */\nfunction makePrefixMap(styleProp, eventName) {\n var prefixes = {};\n\n prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();\n prefixes['Webkit' + styleProp] = 'webkit' + eventName;\n prefixes['Moz' + styleProp] = 'moz' + eventName;\n\n return prefixes;\n}\n\n/**\n * A list of event names to a configurable list of vendor prefixes.\n */\nvar vendorPrefixes = {\n animationend: makePrefixMap('Animation', 'AnimationEnd'),\n animationiteration: makePrefixMap('Animation', 'AnimationIteration'),\n animationstart: makePrefixMap('Animation', 'AnimationStart'),\n transitionend: makePrefixMap('Transition', 'TransitionEnd')\n};\n\n/**\n * Event names that have already been detected and prefixed (if applicable).\n */\nvar prefixedEventNames = {};\n\n/**\n * Element to check for prefixes on.\n */\nvar style = {};\n\n/**\n * Bootstrap if a DOM exists.\n */\nif (canUseDOM) {\n style = document.createElement('div').style;\n\n // On some platforms, in particular some releases of Android 4.x,\n // the un-prefixed \"animation\" and \"transition\" properties are defined on the\n // style object but the events that fire will still be prefixed, so we need\n // to check if the un-prefixed events are usable, and if not remove them from the map.\n if (!('AnimationEvent' in window)) {\n delete vendorPrefixes.animationend.animation;\n delete vendorPrefixes.animationiteration.animation;\n delete vendorPrefixes.animationstart.animation;\n }\n\n // Same as above\n if (!('TransitionEvent' in window)) {\n delete vendorPrefixes.transitionend.transition;\n }\n}\n\n/**\n * Attempts to determine the correct vendor prefixed event name.\n *\n * @param {string} eventName\n * @returns {string}\n */\nfunction getVendorPrefixedEventName(eventName) {\n if (prefixedEventNames[eventName]) {\n return prefixedEventNames[eventName];\n } else if (!vendorPrefixes[eventName]) {\n return eventName;\n }\n\n var prefixMap = vendorPrefixes[eventName];\n\n for (var styleProp in prefixMap) {\n if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {\n return prefixedEventNames[eventName] = prefixMap[styleProp];\n }\n }\n\n return eventName;\n}\n\n/**\n * To identify top level events in ReactDOM, we use constants defined by this\n * module. This is the only module that uses the unsafe* methods to express\n * that the constants actually correspond to the browser event names. This lets\n * us save some bundle size by avoiding a top level type -> event name map.\n * The rest of ReactDOM code should import top level types from this file.\n */\nvar TOP_ABORT = unsafeCastStringToDOMTopLevelType('abort');\nvar TOP_ANIMATION_END = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationend'));\nvar TOP_ANIMATION_ITERATION = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationiteration'));\nvar TOP_ANIMATION_START = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationstart'));\nvar TOP_BLUR = unsafeCastStringToDOMTopLevelType('blur');\nvar TOP_CAN_PLAY = unsafeCastStringToDOMTopLevelType('canplay');\nvar TOP_CAN_PLAY_THROUGH = unsafeCastStringToDOMTopLevelType('canplaythrough');\nvar TOP_CANCEL = unsafeCastStringToDOMTopLevelType('cancel');\nvar TOP_CHANGE = unsafeCastStringToDOMTopLevelType('change');\nvar TOP_CLICK = unsafeCastStringToDOMTopLevelType('click');\nvar TOP_CLOSE = unsafeCastStringToDOMTopLevelType('close');\nvar TOP_COMPOSITION_END = unsafeCastStringToDOMTopLevelType('compositionend');\nvar TOP_COMPOSITION_START = unsafeCastStringToDOMTopLevelType('compositionstart');\nvar TOP_COMPOSITION_UPDATE = unsafeCastStringToDOMTopLevelType('compositionupdate');\nvar TOP_CONTEXT_MENU = unsafeCastStringToDOMTopLevelType('contextmenu');\nvar TOP_COPY = unsafeCastStringToDOMTopLevelType('copy');\nvar TOP_CUT = unsafeCastStringToDOMTopLevelType('cut');\nvar TOP_DOUBLE_CLICK = unsafeCastStringToDOMTopLevelType('dblclick');\nvar TOP_AUX_CLICK = unsafeCastStringToDOMTopLevelType('auxclick');\nvar TOP_DRAG = unsafeCastStringToDOMTopLevelType('drag');\nvar TOP_DRAG_END = unsafeCastStringToDOMTopLevelType('dragend');\nvar TOP_DRAG_ENTER = unsafeCastStringToDOMTopLevelType('dragenter');\nvar TOP_DRAG_EXIT = unsafeCastStringToDOMTopLevelType('dragexit');\nvar TOP_DRAG_LEAVE = unsafeCastStringToDOMTopLevelType('dragleave');\nvar TOP_DRAG_OVER = unsafeCastStringToDOMTopLevelType('dragover');\nvar TOP_DRAG_START = unsafeCastStringToDOMTopLevelType('dragstart');\nvar TOP_DROP = unsafeCastStringToDOMTopLevelType('drop');\nvar TOP_DURATION_CHANGE = unsafeCastStringToDOMTopLevelType('durationchange');\nvar TOP_EMPTIED = unsafeCastStringToDOMTopLevelType('emptied');\nvar TOP_ENCRYPTED = unsafeCastStringToDOMTopLevelType('encrypted');\nvar TOP_ENDED = unsafeCastStringToDOMTopLevelType('ended');\nvar TOP_ERROR = unsafeCastStringToDOMTopLevelType('error');\nvar TOP_FOCUS = unsafeCastStringToDOMTopLevelType('focus');\nvar TOP_GOT_POINTER_CAPTURE = unsafeCastStringToDOMTopLevelType('gotpointercapture');\nvar TOP_INPUT = unsafeCastStringToDOMTopLevelType('input');\nvar TOP_INVALID = unsafeCastStringToDOMTopLevelType('invalid');\nvar TOP_KEY_DOWN = unsafeCastStringToDOMTopLevelType('keydown');\nvar TOP_KEY_PRESS = unsafeCastStringToDOMTopLevelType('keypress');\nvar TOP_KEY_UP = unsafeCastStringToDOMTopLevelType('keyup');\nvar TOP_LOAD = unsafeCastStringToDOMTopLevelType('load');\nvar TOP_LOAD_START = unsafeCastStringToDOMTopLevelType('loadstart');\nvar TOP_LOADED_DATA = unsafeCastStringToDOMTopLevelType('loadeddata');\nvar TOP_LOADED_METADATA = unsafeCastStringToDOMTopLevelType('loadedmetadata');\nvar TOP_LOST_POINTER_CAPTURE = unsafeCastStringToDOMTopLevelType('lostpointercapture');\nvar TOP_MOUSE_DOWN = unsafeCastStringToDOMTopLevelType('mousedown');\nvar TOP_MOUSE_MOVE = unsafeCastStringToDOMTopLevelType('mousemove');\nvar TOP_MOUSE_OUT = unsafeCastStringToDOMTopLevelType('mouseout');\nvar TOP_MOUSE_OVER = unsafeCastStringToDOMTopLevelType('mouseover');\nvar TOP_MOUSE_UP = unsafeCastStringToDOMTopLevelType('mouseup');\nvar TOP_PASTE = unsafeCastStringToDOMTopLevelType('paste');\nvar TOP_PAUSE = unsafeCastStringToDOMTopLevelType('pause');\nvar TOP_PLAY = unsafeCastStringToDOMTopLevelType('play');\nvar TOP_PLAYING = unsafeCastStringToDOMTopLevelType('playing');\nvar TOP_POINTER_CANCEL = unsafeCastStringToDOMTopLevelType('pointercancel');\nvar TOP_POINTER_DOWN = unsafeCastStringToDOMTopLevelType('pointerdown');\n\n\nvar TOP_POINTER_MOVE = unsafeCastStringToDOMTopLevelType('pointermove');\nvar TOP_POINTER_OUT = unsafeCastStringToDOMTopLevelType('pointerout');\nvar TOP_POINTER_OVER = unsafeCastStringToDOMTopLevelType('pointerover');\nvar TOP_POINTER_UP = unsafeCastStringToDOMTopLevelType('pointerup');\nvar TOP_PROGRESS = unsafeCastStringToDOMTopLevelType('progress');\nvar TOP_RATE_CHANGE = unsafeCastStringToDOMTopLevelType('ratechange');\nvar TOP_RESET = unsafeCastStringToDOMTopLevelType('reset');\nvar TOP_SCROLL = unsafeCastStringToDOMTopLevelType('scroll');\nvar TOP_SEEKED = unsafeCastStringToDOMTopLevelType('seeked');\nvar TOP_SEEKING = unsafeCastStringToDOMTopLevelType('seeking');\nvar TOP_SELECTION_CHANGE = unsafeCastStringToDOMTopLevelType('selectionchange');\nvar TOP_STALLED = unsafeCastStringToDOMTopLevelType('stalled');\nvar TOP_SUBMIT = unsafeCastStringToDOMTopLevelType('submit');\nvar TOP_SUSPEND = unsafeCastStringToDOMTopLevelType('suspend');\nvar TOP_TEXT_INPUT = unsafeCastStringToDOMTopLevelType('textInput');\nvar TOP_TIME_UPDATE = unsafeCastStringToDOMTopLevelType('timeupdate');\nvar TOP_TOGGLE = unsafeCastStringToDOMTopLevelType('toggle');\nvar TOP_TOUCH_CANCEL = unsafeCastStringToDOMTopLevelType('touchcancel');\nvar TOP_TOUCH_END = unsafeCastStringToDOMTopLevelType('touchend');\nvar TOP_TOUCH_MOVE = unsafeCastStringToDOMTopLevelType('touchmove');\nvar TOP_TOUCH_START = unsafeCastStringToDOMTopLevelType('touchstart');\nvar TOP_TRANSITION_END = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('transitionend'));\nvar TOP_VOLUME_CHANGE = unsafeCastStringToDOMTopLevelType('volumechange');\nvar TOP_WAITING = unsafeCastStringToDOMTopLevelType('waiting');\nvar TOP_WHEEL = unsafeCastStringToDOMTopLevelType('wheel');\n\n// List of events that need to be individually attached to media elements.\n// Note that events in this list will *not* be listened to at the top level\n// unless they're explicitly whitelisted in `ReactBrowserEventEmitter.listenTo`.\nvar mediaEventTypes = [TOP_ABORT, TOP_CAN_PLAY, TOP_CAN_PLAY_THROUGH, TOP_DURATION_CHANGE, TOP_EMPTIED, TOP_ENCRYPTED, TOP_ENDED, TOP_ERROR, TOP_LOADED_DATA, TOP_LOADED_METADATA, TOP_LOAD_START, TOP_PAUSE, TOP_PLAY, TOP_PLAYING, TOP_PROGRESS, TOP_RATE_CHANGE, TOP_SEEKED, TOP_SEEKING, TOP_STALLED, TOP_SUSPEND, TOP_TIME_UPDATE, TOP_VOLUME_CHANGE, TOP_WAITING];\n\nfunction getRawEventName(topLevelType) {\n return unsafeCastDOMTopLevelTypeToString(topLevelType);\n}\n\n/**\n * These variables store information about text content of a target node,\n * allowing comparison of content before and after a given event.\n *\n * Identify the node where selection currently begins, then observe\n * both its text content and its current position in the DOM. Since the\n * browser may natively replace the target node during composition, we can\n * use its position to find its replacement.\n *\n *\n */\n\nvar root = null;\nvar startText = null;\nvar fallbackText = null;\n\nfunction initialize(nativeEventTarget) {\n root = nativeEventTarget;\n startText = getText();\n return true;\n}\n\nfunction reset() {\n root = null;\n startText = null;\n fallbackText = null;\n}\n\nfunction getData() {\n if (fallbackText) {\n return fallbackText;\n }\n\n var start = void 0;\n var startValue = startText;\n var startLength = startValue.length;\n var end = void 0;\n var endValue = getText();\n var endLength = endValue.length;\n\n for (start = 0; start < startLength; start++) {\n if (startValue[start] !== endValue[start]) {\n break;\n }\n }\n\n var minEnd = startLength - start;\n for (end = 1; end <= minEnd; end++) {\n if (startValue[startLength - end] !== endValue[endLength - end]) {\n break;\n }\n }\n\n var sliceTail = end > 1 ? 1 - end : undefined;\n fallbackText = endValue.slice(start, sliceTail);\n return fallbackText;\n}\n\nfunction getText() {\n if ('value' in root) {\n return root.value;\n }\n return root.textContent;\n}\n\n/* eslint valid-typeof: 0 */\n\nvar EVENT_POOL_SIZE = 10;\n\n/**\n * @interface Event\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\nvar EventInterface = {\n type: null,\n target: null,\n // currentTarget is set when dispatching; no use in copying it here\n currentTarget: function () {\n return null;\n },\n eventPhase: null,\n bubbles: null,\n cancelable: null,\n timeStamp: function (event) {\n return event.timeStamp || Date.now();\n },\n defaultPrevented: null,\n isTrusted: null\n};\n\nfunction functionThatReturnsTrue() {\n return true;\n}\n\nfunction functionThatReturnsFalse() {\n return false;\n}\n\n/**\n * Synthetic events are dispatched by event plugins, typically in response to a\n * top-level event delegation handler.\n *\n * These systems should generally use pooling to reduce the frequency of garbage\n * collection. The system should check `isPersistent` to determine whether the\n * event should be released into the pool after being dispatched. Users that\n * need a persisted event should invoke `persist`.\n *\n * Synthetic events (and subclasses) implement the DOM Level 3 Events API by\n * normalizing browser quirks. Subclasses do not necessarily have to implement a\n * DOM interface; custom application-specific events can also subclass this.\n *\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {*} targetInst Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @param {DOMEventTarget} nativeEventTarget Target node.\n */\nfunction SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) {\n {\n // these have a getter/setter for warnings\n delete this.nativeEvent;\n delete this.preventDefault;\n delete this.stopPropagation;\n delete this.isDefaultPrevented;\n delete this.isPropagationStopped;\n }\n\n this.dispatchConfig = dispatchConfig;\n this._targetInst = targetInst;\n this.nativeEvent = nativeEvent;\n\n var Interface = this.constructor.Interface;\n for (var propName in Interface) {\n if (!Interface.hasOwnProperty(propName)) {\n continue;\n }\n {\n delete this[propName]; // this has a getter/setter for warnings\n }\n var normalize = Interface[propName];\n if (normalize) {\n this[propName] = normalize(nativeEvent);\n } else {\n if (propName === 'target') {\n this.target = nativeEventTarget;\n } else {\n this[propName] = nativeEvent[propName];\n }\n }\n }\n\n var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;\n if (defaultPrevented) {\n this.isDefaultPrevented = functionThatReturnsTrue;\n } else {\n this.isDefaultPrevented = functionThatReturnsFalse;\n }\n this.isPropagationStopped = functionThatReturnsFalse;\n return this;\n}\n\n_assign(SyntheticEvent.prototype, {\n preventDefault: function () {\n this.defaultPrevented = true;\n var event = this.nativeEvent;\n if (!event) {\n return;\n }\n\n if (event.preventDefault) {\n event.preventDefault();\n } else if (typeof event.returnValue !== 'unknown') {\n event.returnValue = false;\n }\n this.isDefaultPrevented = functionThatReturnsTrue;\n },\n\n stopPropagation: function () {\n var event = this.nativeEvent;\n if (!event) {\n return;\n }\n\n if (event.stopPropagation) {\n event.stopPropagation();\n } else if (typeof event.cancelBubble !== 'unknown') {\n // The ChangeEventPlugin registers a \"propertychange\" event for\n // IE. This event does not support bubbling or cancelling, and\n // any references to cancelBubble throw \"Member not found\". A\n // typeof check of \"unknown\" circumvents this issue (and is also\n // IE specific).\n event.cancelBubble = true;\n }\n\n this.isPropagationStopped = functionThatReturnsTrue;\n },\n\n /**\n * We release all dispatched `SyntheticEvent`s after each event loop, adding\n * them back into the pool. This allows a way to hold onto a reference that\n * won't be added back into the pool.\n */\n persist: function () {\n this.isPersistent = functionThatReturnsTrue;\n },\n\n /**\n * Checks if this event should be released back into the pool.\n *\n * @return {boolean} True if this should not be released, false otherwise.\n */\n isPersistent: functionThatReturnsFalse,\n\n /**\n * `PooledClass` looks for `destructor` on each instance it releases.\n */\n destructor: function () {\n var Interface = this.constructor.Interface;\n for (var propName in Interface) {\n {\n Object.defineProperty(this, propName, getPooledWarningPropertyDefinition(propName, Interface[propName]));\n }\n }\n this.dispatchConfig = null;\n this._targetInst = null;\n this.nativeEvent = null;\n this.isDefaultPrevented = functionThatReturnsFalse;\n this.isPropagationStopped = functionThatReturnsFalse;\n this._dispatchListeners = null;\n this._dispatchInstances = null;\n {\n Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null));\n Object.defineProperty(this, 'isDefaultPrevented', getPooledWarningPropertyDefinition('isDefaultPrevented', functionThatReturnsFalse));\n Object.defineProperty(this, 'isPropagationStopped', getPooledWarningPropertyDefinition('isPropagationStopped', functionThatReturnsFalse));\n Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', function () {}));\n Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', function () {}));\n }\n }\n});\n\nSyntheticEvent.Interface = EventInterface;\n\n/**\n * Helper to reduce boilerplate when creating subclasses.\n */\nSyntheticEvent.extend = function (Interface) {\n var Super = this;\n\n var E = function () {};\n E.prototype = Super.prototype;\n var prototype = new E();\n\n function Class() {\n return Super.apply(this, arguments);\n }\n _assign(prototype, Class.prototype);\n Class.prototype = prototype;\n Class.prototype.constructor = Class;\n\n Class.Interface = _assign({}, Super.Interface, Interface);\n Class.extend = Super.extend;\n addEventPoolingTo(Class);\n\n return Class;\n};\n\naddEventPoolingTo(SyntheticEvent);\n\n/**\n * Helper to nullify syntheticEvent instance properties when destructing\n *\n * @param {String} propName\n * @param {?object} getVal\n * @return {object} defineProperty object\n */\nfunction getPooledWarningPropertyDefinition(propName, getVal) {\n var isFunction = typeof getVal === 'function';\n return {\n configurable: true,\n set: set,\n get: get\n };\n\n function set(val) {\n var action = isFunction ? 'setting the method' : 'setting the property';\n warn(action, 'This is effectively a no-op');\n return val;\n }\n\n function get() {\n var action = isFunction ? 'accessing the method' : 'accessing the property';\n var result = isFunction ? 'This is a no-op function' : 'This is set to null';\n warn(action, result);\n return getVal;\n }\n\n function warn(action, result) {\n var warningCondition = false;\n !warningCondition ? warningWithoutStack$1(false, \"This synthetic event is reused for performance reasons. If you're seeing this, \" + \"you're %s `%s` on a released/nullified synthetic event. %s. \" + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result) : void 0;\n }\n}\n\nfunction getPooledEvent(dispatchConfig, targetInst, nativeEvent, nativeInst) {\n var EventConstructor = this;\n if (EventConstructor.eventPool.length) {\n var instance = EventConstructor.eventPool.pop();\n EventConstructor.call(instance, dispatchConfig, targetInst, nativeEvent, nativeInst);\n return instance;\n }\n return new EventConstructor(dispatchConfig, targetInst, nativeEvent, nativeInst);\n}\n\nfunction releasePooledEvent(event) {\n var EventConstructor = this;\n !(event instanceof EventConstructor) ? invariant(false, 'Trying to release an event instance into a pool of a different type.') : void 0;\n event.destructor();\n if (EventConstructor.eventPool.length < EVENT_POOL_SIZE) {\n EventConstructor.eventPool.push(event);\n }\n}\n\nfunction addEventPoolingTo(EventConstructor) {\n EventConstructor.eventPool = [];\n EventConstructor.getPooled = getPooledEvent;\n EventConstructor.release = releasePooledEvent;\n}\n\n/**\n * @interface Event\n * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents\n */\nvar SyntheticCompositionEvent = SyntheticEvent.extend({\n data: null\n});\n\n/**\n * @interface Event\n * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105\n * /#events-inputevents\n */\nvar SyntheticInputEvent = SyntheticEvent.extend({\n data: null\n});\n\nvar END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space\nvar START_KEYCODE = 229;\n\nvar canUseCompositionEvent = canUseDOM && 'CompositionEvent' in window;\n\nvar documentMode = null;\nif (canUseDOM && 'documentMode' in document) {\n documentMode = document.documentMode;\n}\n\n// Webkit offers a very useful `textInput` event that can be used to\n// directly represent `beforeInput`. The IE `textinput` event is not as\n// useful, so we don't use it.\nvar canUseTextInputEvent = canUseDOM && 'TextEvent' in window && !documentMode;\n\n// In IE9+, we have access to composition events, but the data supplied\n// by the native compositionend event may be incorrect. Japanese ideographic\n// spaces, for instance (\\u3000) are not recorded correctly.\nvar useFallbackCompositionData = canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);\n\nvar SPACEBAR_CODE = 32;\nvar SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);\n\n// Events and their corresponding property names.\nvar eventTypes = {\n beforeInput: {\n phasedRegistrationNames: {\n bubbled: 'onBeforeInput',\n captured: 'onBeforeInputCapture'\n },\n dependencies: [TOP_COMPOSITION_END, TOP_KEY_PRESS, TOP_TEXT_INPUT, TOP_PASTE]\n },\n compositionEnd: {\n phasedRegistrationNames: {\n bubbled: 'onCompositionEnd',\n captured: 'onCompositionEndCapture'\n },\n dependencies: [TOP_BLUR, TOP_COMPOSITION_END, TOP_KEY_DOWN, TOP_KEY_PRESS, TOP_KEY_UP, TOP_MOUSE_DOWN]\n },\n compositionStart: {\n phasedRegistrationNames: {\n bubbled: 'onCompositionStart',\n captured: 'onCompositionStartCapture'\n },\n dependencies: [TOP_BLUR, TOP_COMPOSITION_START, TOP_KEY_DOWN, TOP_KEY_PRESS, TOP_KEY_UP, TOP_MOUSE_DOWN]\n },\n compositionUpdate: {\n phasedRegistrationNames: {\n bubbled: 'onCompositionUpdate',\n captured: 'onCompositionUpdateCapture'\n },\n dependencies: [TOP_BLUR, TOP_COMPOSITION_UPDATE, TOP_KEY_DOWN, TOP_KEY_PRESS, TOP_KEY_UP, TOP_MOUSE_DOWN]\n }\n};\n\n// Track whether we've ever handled a keypress on the space key.\nvar hasSpaceKeypress = false;\n\n/**\n * Return whether a native keypress event is assumed to be a command.\n * This is required because Firefox fires `keypress` events for key commands\n * (cut, copy, select-all, etc.) even though no character is inserted.\n */\nfunction isKeypressCommand(nativeEvent) {\n return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey);\n}\n\n/**\n * Translate native top level events into event types.\n *\n * @param {string} topLevelType\n * @return {object}\n */\nfunction getCompositionEventType(topLevelType) {\n switch (topLevelType) {\n case TOP_COMPOSITION_START:\n return eventTypes.compositionStart;\n case TOP_COMPOSITION_END:\n return eventTypes.compositionEnd;\n case TOP_COMPOSITION_UPDATE:\n return eventTypes.compositionUpdate;\n }\n}\n\n/**\n * Does our fallback best-guess model think this event signifies that\n * composition has begun?\n *\n * @param {string} topLevelType\n * @param {object} nativeEvent\n * @return {boolean}\n */\nfunction isFallbackCompositionStart(topLevelType, nativeEvent) {\n return topLevelType === TOP_KEY_DOWN && nativeEvent.keyCode === START_KEYCODE;\n}\n\n/**\n * Does our fallback mode think that this event is the end of composition?\n *\n * @param {string} topLevelType\n * @param {object} nativeEvent\n * @return {boolean}\n */\nfunction isFallbackCompositionEnd(topLevelType, nativeEvent) {\n switch (topLevelType) {\n case TOP_KEY_UP:\n // Command keys insert or clear IME input.\n return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;\n case TOP_KEY_DOWN:\n // Expect IME keyCode on each keydown. If we get any other\n // code we must have exited earlier.\n return nativeEvent.keyCode !== START_KEYCODE;\n case TOP_KEY_PRESS:\n case TOP_MOUSE_DOWN:\n case TOP_BLUR:\n // Events are not possible without cancelling IME.\n return true;\n default:\n return false;\n }\n}\n\n/**\n * Google Input Tools provides composition data via a CustomEvent,\n * with the `data` property populated in the `detail` object. If this\n * is available on the event object, use it. If not, this is a plain\n * composition event and we have nothing special to extract.\n *\n * @param {object} nativeEvent\n * @return {?string}\n */\nfunction getDataFromCustomEvent(nativeEvent) {\n var detail = nativeEvent.detail;\n if (typeof detail === 'object' && 'data' in detail) {\n return detail.data;\n }\n return null;\n}\n\n/**\n * Check if a composition event was triggered by Korean IME.\n * Our fallback mode does not work well with IE's Korean IME,\n * so just use native composition events when Korean IME is used.\n * Although CompositionEvent.locale property is deprecated,\n * it is available in IE, where our fallback mode is enabled.\n *\n * @param {object} nativeEvent\n * @return {boolean}\n */\nfunction isUsingKoreanIME(nativeEvent) {\n return nativeEvent.locale === 'ko';\n}\n\n// Track the current IME composition status, if any.\nvar isComposing = false;\n\n/**\n * @return {?object} A SyntheticCompositionEvent.\n */\nfunction extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n var eventType = void 0;\n var fallbackData = void 0;\n\n if (canUseCompositionEvent) {\n eventType = getCompositionEventType(topLevelType);\n } else if (!isComposing) {\n if (isFallbackCompositionStart(topLevelType, nativeEvent)) {\n eventType = eventTypes.compositionStart;\n }\n } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) {\n eventType = eventTypes.compositionEnd;\n }\n\n if (!eventType) {\n return null;\n }\n\n if (useFallbackCompositionData && !isUsingKoreanIME(nativeEvent)) {\n // The current composition is stored statically and must not be\n // overwritten while composition continues.\n if (!isComposing && eventType === eventTypes.compositionStart) {\n isComposing = initialize(nativeEventTarget);\n } else if (eventType === eventTypes.compositionEnd) {\n if (isComposing) {\n fallbackData = getData();\n }\n }\n }\n\n var event = SyntheticCompositionEvent.getPooled(eventType, targetInst, nativeEvent, nativeEventTarget);\n\n if (fallbackData) {\n // Inject data generated from fallback path into the synthetic event.\n // This matches the property of native CompositionEventInterface.\n event.data = fallbackData;\n } else {\n var customData = getDataFromCustomEvent(nativeEvent);\n if (customData !== null) {\n event.data = customData;\n }\n }\n\n accumulateTwoPhaseDispatches(event);\n return event;\n}\n\n/**\n * @param {TopLevelType} topLevelType Number from `TopLevelType`.\n * @param {object} nativeEvent Native browser event.\n * @return {?string} The string corresponding to this `beforeInput` event.\n */\nfunction getNativeBeforeInputChars(topLevelType, nativeEvent) {\n switch (topLevelType) {\n case TOP_COMPOSITION_END:\n return getDataFromCustomEvent(nativeEvent);\n case TOP_KEY_PRESS:\n /**\n * If native `textInput` events are available, our goal is to make\n * use of them. However, there is a special case: the spacebar key.\n * In Webkit, preventing default on a spacebar `textInput` event\n * cancels character insertion, but it *also* causes the browser\n * to fall back to its default spacebar behavior of scrolling the\n * page.\n *\n * Tracking at:\n * https://code.google.com/p/chromium/issues/detail?id=355103\n *\n * To avoid this issue, use the keypress event as if no `textInput`\n * event is available.\n */\n var which = nativeEvent.which;\n if (which !== SPACEBAR_CODE) {\n return null;\n }\n\n hasSpaceKeypress = true;\n return SPACEBAR_CHAR;\n\n case TOP_TEXT_INPUT:\n // Record the characters to be added to the DOM.\n var chars = nativeEvent.data;\n\n // If it's a spacebar character, assume that we have already handled\n // it at the keypress level and bail immediately. Android Chrome\n // doesn't give us keycodes, so we need to ignore it.\n if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {\n return null;\n }\n\n return chars;\n\n default:\n // For other native event types, do nothing.\n return null;\n }\n}\n\n/**\n * For browsers that do not provide the `textInput` event, extract the\n * appropriate string to use for SyntheticInputEvent.\n *\n * @param {number} topLevelType Number from `TopLevelEventTypes`.\n * @param {object} nativeEvent Native browser event.\n * @return {?string} The fallback string for this `beforeInput` event.\n */\nfunction getFallbackBeforeInputChars(topLevelType, nativeEvent) {\n // If we are currently composing (IME) and using a fallback to do so,\n // try to extract the composed characters from the fallback object.\n // If composition event is available, we extract a string only at\n // compositionevent, otherwise extract it at fallback events.\n if (isComposing) {\n if (topLevelType === TOP_COMPOSITION_END || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) {\n var chars = getData();\n reset();\n isComposing = false;\n return chars;\n }\n return null;\n }\n\n switch (topLevelType) {\n case TOP_PASTE:\n // If a paste event occurs after a keypress, throw out the input\n // chars. Paste events should not lead to BeforeInput events.\n return null;\n case TOP_KEY_PRESS:\n /**\n * As of v27, Firefox may fire keypress events even when no character\n * will be inserted. A few possibilities:\n *\n * - `which` is `0`. Arrow keys, Esc key, etc.\n *\n * - `which` is the pressed key code, but no char is available.\n * Ex: 'AltGr + d` in Polish. There is no modified character for\n * this key combination and no character is inserted into the\n * document, but FF fires the keypress for char code `100` anyway.\n * No `input` event will occur.\n *\n * - `which` is the pressed key code, but a command combination is\n * being used. Ex: `Cmd+C`. No character is inserted, and no\n * `input` event will occur.\n */\n if (!isKeypressCommand(nativeEvent)) {\n // IE fires the `keypress` event when a user types an emoji via\n // Touch keyboard of Windows. In such a case, the `char` property\n // holds an emoji character like `\\uD83D\\uDE0A`. Because its length\n // is 2, the property `which` does not represent an emoji correctly.\n // In such a case, we directly return the `char` property instead of\n // using `which`.\n if (nativeEvent.char && nativeEvent.char.length > 1) {\n return nativeEvent.char;\n } else if (nativeEvent.which) {\n return String.fromCharCode(nativeEvent.which);\n }\n }\n return null;\n case TOP_COMPOSITION_END:\n return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data;\n default:\n return null;\n }\n}\n\n/**\n * Extract a SyntheticInputEvent for `beforeInput`, based on either native\n * `textInput` or fallback behavior.\n *\n * @return {?object} A SyntheticInputEvent.\n */\nfunction extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n var chars = void 0;\n\n if (canUseTextInputEvent) {\n chars = getNativeBeforeInputChars(topLevelType, nativeEvent);\n } else {\n chars = getFallbackBeforeInputChars(topLevelType, nativeEvent);\n }\n\n // If no characters are being inserted, no BeforeInput event should\n // be fired.\n if (!chars) {\n return null;\n }\n\n var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, targetInst, nativeEvent, nativeEventTarget);\n\n event.data = chars;\n accumulateTwoPhaseDispatches(event);\n return event;\n}\n\n/**\n * Create an `onBeforeInput` event to match\n * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.\n *\n * This event plugin is based on the native `textInput` event\n * available in Chrome, Safari, Opera, and IE. This event fires after\n * `onKeyPress` and `onCompositionEnd`, but before `onInput`.\n *\n * `beforeInput` is spec'd but not implemented in any browsers, and\n * the `input` event does not provide any useful information about what has\n * actually been added, contrary to the spec. Thus, `textInput` is the best\n * available event to identify the characters that have actually been inserted\n * into the target node.\n *\n * This plugin is also responsible for emitting `composition` events, thus\n * allowing us to share composition fallback code for both `beforeInput` and\n * `composition` event types.\n */\nvar BeforeInputEventPlugin = {\n eventTypes: eventTypes,\n\n extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n var composition = extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget);\n\n var beforeInput = extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget);\n\n if (composition === null) {\n return beforeInput;\n }\n\n if (beforeInput === null) {\n return composition;\n }\n\n return [composition, beforeInput];\n }\n};\n\n// Use to restore controlled state after a change event has fired.\n\nvar restoreImpl = null;\nvar restoreTarget = null;\nvar restoreQueue = null;\n\nfunction restoreStateOfTarget(target) {\n // We perform this translation at the end of the event loop so that we\n // always receive the correct fiber here\n var internalInstance = getInstanceFromNode(target);\n if (!internalInstance) {\n // Unmounted\n return;\n }\n !(typeof restoreImpl === 'function') ? invariant(false, 'setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n var props = getFiberCurrentPropsFromNode(internalInstance.stateNode);\n restoreImpl(internalInstance.stateNode, internalInstance.type, props);\n}\n\nfunction setRestoreImplementation(impl) {\n restoreImpl = impl;\n}\n\nfunction enqueueStateRestore(target) {\n if (restoreTarget) {\n if (restoreQueue) {\n restoreQueue.push(target);\n } else {\n restoreQueue = [target];\n }\n } else {\n restoreTarget = target;\n }\n}\n\nfunction needsStateRestore() {\n return restoreTarget !== null || restoreQueue !== null;\n}\n\nfunction restoreStateIfNeeded() {\n if (!restoreTarget) {\n return;\n }\n var target = restoreTarget;\n var queuedTargets = restoreQueue;\n restoreTarget = null;\n restoreQueue = null;\n\n restoreStateOfTarget(target);\n if (queuedTargets) {\n for (var i = 0; i < queuedTargets.length; i++) {\n restoreStateOfTarget(queuedTargets[i]);\n }\n }\n}\n\n// Used as a way to call batchedUpdates when we don't have a reference to\n// the renderer. Such as when we're dispatching events or if third party\n// libraries need to call batchedUpdates. Eventually, this API will go away when\n// everything is batched by default. We'll then have a similar API to opt-out of\n// scheduled work and instead do synchronous work.\n\n// Defaults\nvar _batchedUpdatesImpl = function (fn, bookkeeping) {\n return fn(bookkeeping);\n};\nvar _interactiveUpdatesImpl = function (fn, a, b) {\n return fn(a, b);\n};\nvar _flushInteractiveUpdatesImpl = function () {};\n\nvar isBatching = false;\nfunction batchedUpdates(fn, bookkeeping) {\n if (isBatching) {\n // If we are currently inside another batch, we need to wait until it\n // fully completes before restoring state.\n return fn(bookkeeping);\n }\n isBatching = true;\n try {\n return _batchedUpdatesImpl(fn, bookkeeping);\n } finally {\n // Here we wait until all updates have propagated, which is important\n // when using controlled components within layers:\n // https://github.com/facebook/react/issues/1698\n // Then we restore state of any controlled component.\n isBatching = false;\n var controlledComponentsHavePendingUpdates = needsStateRestore();\n if (controlledComponentsHavePendingUpdates) {\n // If a controlled event was fired, we may need to restore the state of\n // the DOM node back to the controlled value. This is necessary when React\n // bails out of the update without touching the DOM.\n _flushInteractiveUpdatesImpl();\n restoreStateIfNeeded();\n }\n }\n}\n\nfunction interactiveUpdates(fn, a, b) {\n return _interactiveUpdatesImpl(fn, a, b);\n}\n\n\n\nfunction setBatchingImplementation(batchedUpdatesImpl, interactiveUpdatesImpl, flushInteractiveUpdatesImpl) {\n _batchedUpdatesImpl = batchedUpdatesImpl;\n _interactiveUpdatesImpl = interactiveUpdatesImpl;\n _flushInteractiveUpdatesImpl = flushInteractiveUpdatesImpl;\n}\n\n/**\n * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\n */\nvar supportedInputTypes = {\n color: true,\n date: true,\n datetime: true,\n 'datetime-local': true,\n email: true,\n month: true,\n number: true,\n password: true,\n range: true,\n search: true,\n tel: true,\n text: true,\n time: true,\n url: true,\n week: true\n};\n\nfunction isTextInputElement(elem) {\n var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();\n\n if (nodeName === 'input') {\n return !!supportedInputTypes[elem.type];\n }\n\n if (nodeName === 'textarea') {\n return true;\n }\n\n return false;\n}\n\n/**\n * HTML nodeType values that represent the type of the node\n */\n\nvar ELEMENT_NODE = 1;\nvar TEXT_NODE = 3;\nvar COMMENT_NODE = 8;\nvar DOCUMENT_NODE = 9;\nvar DOCUMENT_FRAGMENT_NODE = 11;\n\n/**\n * Gets the target node from a native browser event by accounting for\n * inconsistencies in browser DOM APIs.\n *\n * @param {object} nativeEvent Native browser event.\n * @return {DOMEventTarget} Target node.\n */\nfunction getEventTarget(nativeEvent) {\n // Fallback to nativeEvent.srcElement for IE9\n // https://github.com/facebook/react/issues/12506\n var target = nativeEvent.target || nativeEvent.srcElement || window;\n\n // Normalize SVG element events #4963\n if (target.correspondingUseElement) {\n target = target.correspondingUseElement;\n }\n\n // Safari may fire events on text nodes (Node.TEXT_NODE is 3).\n // @see http://www.quirksmode.org/js/events_properties.html\n return target.nodeType === TEXT_NODE ? target.parentNode : target;\n}\n\n/**\n * Checks if an event is supported in the current execution environment.\n *\n * NOTE: This will not work correctly for non-generic events such as `change`,\n * `reset`, `load`, `error`, and `select`.\n *\n * Borrows from Modernizr.\n *\n * @param {string} eventNameSuffix Event name, e.g. \"click\".\n * @return {boolean} True if the event is supported.\n * @internal\n * @license Modernizr 3.0.0pre (Custom Build) | MIT\n */\nfunction isEventSupported(eventNameSuffix) {\n if (!canUseDOM) {\n return false;\n }\n\n var eventName = 'on' + eventNameSuffix;\n var isSupported = eventName in document;\n\n if (!isSupported) {\n var element = document.createElement('div');\n element.setAttribute(eventName, 'return;');\n isSupported = typeof element[eventName] === 'function';\n }\n\n return isSupported;\n}\n\nfunction isCheckable(elem) {\n var type = elem.type;\n var nodeName = elem.nodeName;\n return nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio');\n}\n\nfunction getTracker(node) {\n return node._valueTracker;\n}\n\nfunction detachTracker(node) {\n node._valueTracker = null;\n}\n\nfunction getValueFromNode(node) {\n var value = '';\n if (!node) {\n return value;\n }\n\n if (isCheckable(node)) {\n value = node.checked ? 'true' : 'false';\n } else {\n value = node.value;\n }\n\n return value;\n}\n\nfunction trackValueOnNode(node) {\n var valueField = isCheckable(node) ? 'checked' : 'value';\n var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField);\n\n var currentValue = '' + node[valueField];\n\n // if someone has already defined a value or Safari, then bail\n // and don't track value will cause over reporting of changes,\n // but it's better then a hard failure\n // (needed for certain tests that spyOn input values and Safari)\n if (node.hasOwnProperty(valueField) || typeof descriptor === 'undefined' || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') {\n return;\n }\n var get = descriptor.get,\n set = descriptor.set;\n\n Object.defineProperty(node, valueField, {\n configurable: true,\n get: function () {\n return get.call(this);\n },\n set: function (value) {\n currentValue = '' + value;\n set.call(this, value);\n }\n });\n // We could've passed this the first time\n // but it triggers a bug in IE11 and Edge 14/15.\n // Calling defineProperty() again should be equivalent.\n // https://github.com/facebook/react/issues/11768\n Object.defineProperty(node, valueField, {\n enumerable: descriptor.enumerable\n });\n\n var tracker = {\n getValue: function () {\n return currentValue;\n },\n setValue: function (value) {\n currentValue = '' + value;\n },\n stopTracking: function () {\n detachTracker(node);\n delete node[valueField];\n }\n };\n return tracker;\n}\n\nfunction track(node) {\n if (getTracker(node)) {\n return;\n }\n\n // TODO: Once it's just Fiber we can move this to node._wrapperState\n node._valueTracker = trackValueOnNode(node);\n}\n\nfunction updateValueIfChanged(node) {\n if (!node) {\n return false;\n }\n\n var tracker = getTracker(node);\n // if there is no tracker at this point it's unlikely\n // that trying again will succeed\n if (!tracker) {\n return true;\n }\n\n var lastValue = tracker.getValue();\n var nextValue = getValueFromNode(node);\n if (nextValue !== lastValue) {\n tracker.setValue(nextValue);\n return true;\n }\n return false;\n}\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\n// Prevent newer renderers from RTE when used with older react package versions.\n// Current owner and dispatcher used to share the same ref,\n// but PR #14548 split them out to better support the react-debug-tools package.\nif (!ReactSharedInternals.hasOwnProperty('ReactCurrentDispatcher')) {\n ReactSharedInternals.ReactCurrentDispatcher = {\n current: null\n };\n}\n\nvar BEFORE_SLASH_RE = /^(.*)[\\\\\\/]/;\n\nvar describeComponentFrame = function (name, source, ownerName) {\n var sourceInfo = '';\n if (source) {\n var path = source.fileName;\n var fileName = path.replace(BEFORE_SLASH_RE, '');\n {\n // In DEV, include code for a common special case:\n // prefer \"folder/index.js\" instead of just \"index.js\".\n if (/^index\\./.test(fileName)) {\n var match = path.match(BEFORE_SLASH_RE);\n if (match) {\n var pathBeforeSlash = match[1];\n if (pathBeforeSlash) {\n var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');\n fileName = folderName + '/' + fileName;\n }\n }\n }\n }\n sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';\n } else if (ownerName) {\n sourceInfo = ' (created by ' + ownerName + ')';\n }\n return '\\n in ' + (name || 'Unknown') + sourceInfo;\n};\n\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar hasSymbol = typeof Symbol === 'function' && Symbol.for;\n\nvar REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;\nvar REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;\nvar REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;\nvar REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;\nvar REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;\nvar REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;\nvar REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace;\n\nvar REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;\nvar REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;\nvar REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;\nvar REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\nvar REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\n\nvar MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\n\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n return null;\n}\n\nvar Pending = 0;\nvar Resolved = 1;\nvar Rejected = 2;\n\nfunction refineResolvedLazyComponent(lazyComponent) {\n return lazyComponent._status === Resolved ? lazyComponent._result : null;\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var functionName = innerType.displayName || innerType.name || '';\n return outerType.displayName || (functionName !== '' ? wrapperName + '(' + functionName + ')' : wrapperName);\n}\n\nfunction getComponentName(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n {\n if (typeof type.tag === 'number') {\n warningWithoutStack$1(false, 'Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n if (typeof type === 'string') {\n return type;\n }\n switch (type) {\n case REACT_CONCURRENT_MODE_TYPE:\n return 'ConcurrentMode';\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n case REACT_PORTAL_TYPE:\n return 'Portal';\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n }\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n return 'Context.Consumer';\n case REACT_PROVIDER_TYPE:\n return 'Context.Provider';\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n case REACT_MEMO_TYPE:\n return getComponentName(type.type);\n case REACT_LAZY_TYPE:\n {\n var thenable = type;\n var resolvedThenable = refineResolvedLazyComponent(thenable);\n if (resolvedThenable) {\n return getComponentName(resolvedThenable);\n }\n }\n }\n }\n return null;\n}\n\nvar ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction describeFiber(fiber) {\n switch (fiber.tag) {\n case HostRoot:\n case HostPortal:\n case HostText:\n case Fragment:\n case ContextProvider:\n case ContextConsumer:\n return '';\n default:\n var owner = fiber._debugOwner;\n var source = fiber._debugSource;\n var name = getComponentName(fiber.type);\n var ownerName = null;\n if (owner) {\n ownerName = getComponentName(owner.type);\n }\n return describeComponentFrame(name, source, ownerName);\n }\n}\n\nfunction getStackByFiberInDevAndProd(workInProgress) {\n var info = '';\n var node = workInProgress;\n do {\n info += describeFiber(node);\n node = node.return;\n } while (node);\n return info;\n}\n\nvar current = null;\nvar phase = null;\n\nfunction getCurrentFiberOwnerNameInDevOrNull() {\n {\n if (current === null) {\n return null;\n }\n var owner = current._debugOwner;\n if (owner !== null && typeof owner !== 'undefined') {\n return getComponentName(owner.type);\n }\n }\n return null;\n}\n\nfunction getCurrentFiberStackInDev() {\n {\n if (current === null) {\n return '';\n }\n // Safe because if current fiber exists, we are reconciling,\n // and it is guaranteed to be the work-in-progress version.\n return getStackByFiberInDevAndProd(current);\n }\n return '';\n}\n\nfunction resetCurrentFiber() {\n {\n ReactDebugCurrentFrame.getCurrentStack = null;\n current = null;\n phase = null;\n }\n}\n\nfunction setCurrentFiber(fiber) {\n {\n ReactDebugCurrentFrame.getCurrentStack = getCurrentFiberStackInDev;\n current = fiber;\n phase = null;\n }\n}\n\nfunction setCurrentPhase(lifeCyclePhase) {\n {\n phase = lifeCyclePhase;\n }\n}\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = warningWithoutStack$1;\n\n{\n warning = function (condition, format) {\n if (condition) {\n return;\n }\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n // eslint-disable-next-line react-internal/warning-and-invariant-args\n\n for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n args[_key - 2] = arguments[_key];\n }\n\n warningWithoutStack$1.apply(undefined, [false, format + '%s'].concat(args, [stack]));\n };\n}\n\nvar warning$1 = warning;\n\n// A reserved attribute.\n// It is handled by React separately and shouldn't be written to the DOM.\nvar RESERVED = 0;\n\n// A simple string attribute.\n// Attributes that aren't in the whitelist are presumed to have this type.\nvar STRING = 1;\n\n// A string attribute that accepts booleans in React. In HTML, these are called\n// \"enumerated\" attributes with \"true\" and \"false\" as possible values.\n// When true, it should be set to a \"true\" string.\n// When false, it should be set to a \"false\" string.\nvar BOOLEANISH_STRING = 2;\n\n// A real boolean attribute.\n// When true, it should be present (set either to an empty string or its name).\n// When false, it should be omitted.\nvar BOOLEAN = 3;\n\n// An attribute that can be used as a flag as well as with a value.\n// When true, it should be present (set either to an empty string or its name).\n// When false, it should be omitted.\n// For any other value, should be present with that value.\nvar OVERLOADED_BOOLEAN = 4;\n\n// An attribute that must be numeric or parse as a numeric.\n// When falsy, it should be removed.\nvar NUMERIC = 5;\n\n// An attribute that must be positive numeric or parse as a positive numeric.\n// When falsy, it should be removed.\nvar POSITIVE_NUMERIC = 6;\n\n/* eslint-disable max-len */\nvar ATTRIBUTE_NAME_START_CHAR = ':A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD';\n/* eslint-enable max-len */\nvar ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + '\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040';\n\n\nvar ROOT_ATTRIBUTE_NAME = 'data-reactroot';\nvar VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$');\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar illegalAttributeNameCache = {};\nvar validatedAttributeNameCache = {};\n\nfunction isAttributeNameSafe(attributeName) {\n if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) {\n return true;\n }\n if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) {\n return false;\n }\n if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {\n validatedAttributeNameCache[attributeName] = true;\n return true;\n }\n illegalAttributeNameCache[attributeName] = true;\n {\n warning$1(false, 'Invalid attribute name: `%s`', attributeName);\n }\n return false;\n}\n\nfunction shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) {\n if (propertyInfo !== null) {\n return propertyInfo.type === RESERVED;\n }\n if (isCustomComponentTag) {\n return false;\n }\n if (name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) {\n return true;\n }\n return false;\n}\n\nfunction shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) {\n if (propertyInfo !== null && propertyInfo.type === RESERVED) {\n return false;\n }\n switch (typeof value) {\n case 'function':\n // $FlowIssue symbol is perfectly valid here\n case 'symbol':\n // eslint-disable-line\n return true;\n case 'boolean':\n {\n if (isCustomComponentTag) {\n return false;\n }\n if (propertyInfo !== null) {\n return !propertyInfo.acceptsBooleans;\n } else {\n var prefix = name.toLowerCase().slice(0, 5);\n return prefix !== 'data-' && prefix !== 'aria-';\n }\n }\n default:\n return false;\n }\n}\n\nfunction shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) {\n if (value === null || typeof value === 'undefined') {\n return true;\n }\n if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) {\n return true;\n }\n if (isCustomComponentTag) {\n return false;\n }\n if (propertyInfo !== null) {\n switch (propertyInfo.type) {\n case BOOLEAN:\n return !value;\n case OVERLOADED_BOOLEAN:\n return value === false;\n case NUMERIC:\n return isNaN(value);\n case POSITIVE_NUMERIC:\n return isNaN(value) || value < 1;\n }\n }\n return false;\n}\n\nfunction getPropertyInfo(name) {\n return properties.hasOwnProperty(name) ? properties[name] : null;\n}\n\nfunction PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace) {\n this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;\n this.attributeName = attributeName;\n this.attributeNamespace = attributeNamespace;\n this.mustUseProperty = mustUseProperty;\n this.propertyName = name;\n this.type = type;\n}\n\n// When adding attributes to this list, be sure to also add them to\n// the `possibleStandardNames` module to ensure casing and incorrect\n// name warnings.\nvar properties = {};\n\n// These props are reserved by React. They shouldn't be written to the DOM.\n['children', 'dangerouslySetInnerHTML',\n// TODO: This prevents the assignment of defaultValue to regular\n// elements (not just inputs). Now that ReactDOMInput assigns to the\n// defaultValue property -- do we need this?\n'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style'].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty\n name, // attributeName\n null);\n} // attributeNamespace\n);\n\n// A few React string attributes have a different name.\n// This is a mapping from React prop names to the attribute names.\n[['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {\n var name = _ref[0],\n attributeName = _ref[1];\n\n properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n attributeName, // attributeName\n null);\n} // attributeNamespace\n);\n\n// These are \"enumerated\" HTML attributes that accept \"true\" and \"false\".\n// In React, we let users pass `true` and `false` even though technically\n// these aren't boolean attributes (they are coerced to strings).\n['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty\n name.toLowerCase(), // attributeName\n null);\n} // attributeNamespace\n);\n\n// These are \"enumerated\" SVG attributes that accept \"true\" and \"false\".\n// In React, we let users pass `true` and `false` even though technically\n// these aren't boolean attributes (they are coerced to strings).\n// Since these are SVG attributes, their attribute names are case-sensitive.\n['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty\n name, // attributeName\n null);\n} // attributeNamespace\n);\n\n// These are HTML boolean attributes.\n['allowFullScreen', 'async',\n// Note: there is a special case that prevents it from being written to the DOM\n// on the client side because the browsers are inconsistent. Instead we call focus().\n'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless',\n// Microdata\n'itemScope'].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty\n name.toLowerCase(), // attributeName\n null);\n} // attributeNamespace\n);\n\n// These are the few React props that we set as DOM properties\n// rather than attributes. These are all booleans.\n['checked',\n// Note: `option.selected` is not updated if `select.multiple` is\n// disabled with `removeAttribute`. We have special logic for handling this.\n'multiple', 'muted', 'selected'].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty\n name, // attributeName\n null);\n} // attributeNamespace\n);\n\n// These are HTML attributes that are \"overloaded booleans\": they behave like\n// booleans, but can also accept a string value.\n['capture', 'download'].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty\n name, // attributeName\n null);\n} // attributeNamespace\n);\n\n// These are HTML attributes that must be positive numbers.\n['cols', 'rows', 'size', 'span'].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty\n name, // attributeName\n null);\n} // attributeNamespace\n);\n\n// These are HTML attributes that must be numbers.\n['rowSpan', 'start'].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty\n name.toLowerCase(), // attributeName\n null);\n} // attributeNamespace\n);\n\nvar CAMELIZE = /[\\-\\:]([a-z])/g;\nvar capitalize = function (token) {\n return token[1].toUpperCase();\n};\n\n// This is a list of all SVG attributes that need special casing, namespacing,\n// or boolean value assignment. Regular attributes that just accept strings\n// and have the same names are omitted, just like in the HTML whitelist.\n// Some of these attributes can be hard to find. This list was created by\n// scrapping the MDN documentation.\n['accent-height', 'alignment-baseline', 'arabic-form', 'baseline-shift', 'cap-height', 'clip-path', 'clip-rule', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'dominant-baseline', 'enable-background', 'fill-opacity', 'fill-rule', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-name', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'horiz-adv-x', 'horiz-origin-x', 'image-rendering', 'letter-spacing', 'lighting-color', 'marker-end', 'marker-mid', 'marker-start', 'overline-position', 'overline-thickness', 'paint-order', 'panose-1', 'pointer-events', 'rendering-intent', 'shape-rendering', 'stop-color', 'stop-opacity', 'strikethrough-position', 'strikethrough-thickness', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-decoration', 'text-rendering', 'underline-position', 'underline-thickness', 'unicode-bidi', 'unicode-range', 'units-per-em', 'v-alphabetic', 'v-hanging', 'v-ideographic', 'v-mathematical', 'vector-effect', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'word-spacing', 'writing-mode', 'xmlns:xlink', 'x-height'].forEach(function (attributeName) {\n var name = attributeName.replace(CAMELIZE, capitalize);\n properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n attributeName, null);\n} // attributeNamespace\n);\n\n// String SVG attributes with the xlink namespace.\n['xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type'].forEach(function (attributeName) {\n var name = attributeName.replace(CAMELIZE, capitalize);\n properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n attributeName, 'http://www.w3.org/1999/xlink');\n});\n\n// String SVG attributes with the xml namespace.\n['xml:base', 'xml:lang', 'xml:space'].forEach(function (attributeName) {\n var name = attributeName.replace(CAMELIZE, capitalize);\n properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n attributeName, 'http://www.w3.org/XML/1998/namespace');\n});\n\n// These attribute exists both in HTML and SVG.\n// The attribute name is case-sensitive in SVG so we can't just use\n// the React name like we do for attributes that exist only in HTML.\n['tabIndex', 'crossOrigin'].forEach(function (attributeName) {\n properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty\n attributeName.toLowerCase(), // attributeName\n null);\n} // attributeNamespace\n);\n\n/**\n * Get the value for a property on a node. Only used in DEV for SSR validation.\n * The \"expected\" argument is used as a hint of what the expected value is.\n * Some properties have multiple equivalent values.\n */\nfunction getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n\n return node[propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}\n\n/**\n * Get the value for a attribute on a node. Only used in DEV for SSR validation.\n * The third argument is used as a hint of what the expected value is. Some\n * attributes have multiple equivalent values.\n */\nfunction getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}\n\n/**\n * Sets the value for a property on a node.\n *\n * @param {DOMElement} node\n * @param {string} name\n * @param {*} value\n */\nfunction setValueForProperty(node, name, value, isCustomComponentTag) {\n var propertyInfo = getPropertyInfo(name);\n if (shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag)) {\n return;\n }\n if (shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag)) {\n value = null;\n }\n // If the prop isn't in the special list, treat it as a simple attribute.\n if (isCustomComponentTag || propertyInfo === null) {\n if (isAttributeNameSafe(name)) {\n var _attributeName = name;\n if (value === null) {\n node.removeAttribute(_attributeName);\n } else {\n node.setAttribute(_attributeName, '' + value);\n }\n }\n return;\n }\n var mustUseProperty = propertyInfo.mustUseProperty;\n\n if (mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n\n if (value === null) {\n var type = propertyInfo.type;\n\n node[propertyName] = type === BOOLEAN ? false : '';\n } else {\n // Contrary to `setAttribute`, object properties are properly\n // `toString`ed by IE8/9.\n node[propertyName] = value;\n }\n return;\n }\n // The rest are treated as attributes with special cases.\n var attributeName = propertyInfo.attributeName,\n attributeNamespace = propertyInfo.attributeNamespace;\n\n if (value === null) {\n node.removeAttribute(attributeName);\n } else {\n var _type = propertyInfo.type;\n\n var attributeValue = void 0;\n if (_type === BOOLEAN || _type === OVERLOADED_BOOLEAN && value === true) {\n attributeValue = '';\n } else {\n // `setAttribute` with objects becomes only `[object]` in IE8/9,\n // ('' + value) makes it output the correct toString()-value.\n attributeValue = '' + value;\n }\n if (attributeNamespace) {\n node.setAttributeNS(attributeNamespace, attributeName, attributeValue);\n } else {\n node.setAttribute(attributeName, attributeValue);\n }\n }\n}\n\n// Flow does not allow string concatenation of most non-string types. To work\n// around this limitation, we use an opaque type that can only be obtained by\n// passing the value through getToStringValue first.\nfunction toString(value) {\n return '' + value;\n}\n\nfunction getToStringValue(value) {\n switch (typeof value) {\n case 'boolean':\n case 'number':\n case 'object':\n case 'string':\n case 'undefined':\n return value;\n default:\n // function, symbol are assigned as empty strings\n return '';\n }\n}\n\nvar ReactDebugCurrentFrame$1 = null;\n\nvar ReactControlledValuePropTypes = {\n checkPropTypes: null\n};\n\n{\n ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\n var hasReadOnlyValue = {\n button: true,\n checkbox: true,\n image: true,\n hidden: true,\n radio: true,\n reset: true,\n submit: true\n };\n\n var propTypes = {\n value: function (props, propName, componentName) {\n if (hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled || props[propName] == null) {\n return null;\n }\n return new Error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');\n },\n checked: function (props, propName, componentName) {\n if (props.onChange || props.readOnly || props.disabled || props[propName] == null) {\n return null;\n }\n return new Error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');\n }\n };\n\n /**\n * Provide a linked `value` attribute for controlled forms. You should not use\n * this outside of the ReactDOM controlled form components.\n */\n ReactControlledValuePropTypes.checkPropTypes = function (tagName, props) {\n checkPropTypes(propTypes, props, 'prop', tagName, ReactDebugCurrentFrame$1.getStackAddendum);\n };\n}\n\nvar enableUserTimingAPI = true;\n\n// Helps identify side effects in begin-phase lifecycle hooks and setState reducers:\nvar debugRenderPhaseSideEffects = false;\n\n// In some cases, StrictMode should also double-render lifecycles.\n// This can be confusing for tests though,\n// And it can be bad for performance in production.\n// This feature flag can be used to control the behavior:\nvar debugRenderPhaseSideEffectsForStrictMode = true;\n\n// To preserve the \"Pause on caught exceptions\" behavior of the debugger, we\n// replay the begin phase of a failed component inside invokeGuardedCallback.\nvar replayFailedUnitOfWorkWithInvokeGuardedCallback = true;\n\n// Warn about deprecated, async-unsafe lifecycles; relates to RFC #6:\nvar warnAboutDeprecatedLifecycles = false;\n\n// Gather advanced timing metrics for Profiler subtrees.\nvar enableProfilerTimer = true;\n\n// Trace which interactions trigger each commit.\nvar enableSchedulerTracing = true;\n\n// Only used in www builds.\nvar enableSuspenseServerRenderer = false; // TODO: true? Here it might just be false.\n\n// Only used in www builds.\n\n\n// Only used in www builds.\n\n\n// React Fire: prevent the value and checked attributes from syncing\n// with their related DOM properties\nvar disableInputAttributeSyncing = false;\n\n// These APIs will no longer be \"unstable\" in the upcoming 16.7 release,\n// Control this behavior with a flag to support 16.6 minor releases in the meanwhile.\nvar enableStableConcurrentModeAPIs = false;\n\nvar warnAboutShorthandPropertyCollision = false;\n\n// TODO: direct imports like some-package/src/* are bad. Fix me.\nvar didWarnValueDefaultValue = false;\nvar didWarnCheckedDefaultChecked = false;\nvar didWarnControlledToUncontrolled = false;\nvar didWarnUncontrolledToControlled = false;\n\nfunction isControlled(props) {\n var usesChecked = props.type === 'checkbox' || props.type === 'radio';\n return usesChecked ? props.checked != null : props.value != null;\n}\n\n/**\n * Implements an host component that allows setting these optional\n * props: `checked`, `value`, `defaultChecked`, and `defaultValue`.\n *\n * If `checked` or `value` are not supplied (or null/undefined), user actions\n * that affect the checked state or value will trigger updates to the element.\n *\n * If they are supplied (and not null/undefined), the rendered element will not\n * trigger updates to the element. Instead, the props must change in order for\n * the rendered element to be updated.\n *\n * The rendered element will be initialized as unchecked (or `defaultChecked`)\n * with an empty value (or `defaultValue`).\n *\n * See http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html\n */\n\nfunction getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}\n\nfunction initWrapperState(element, props) {\n {\n ReactControlledValuePropTypes.checkPropTypes('input', props);\n\n if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) {\n warning$1(false, '%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);\n didWarnCheckedDefaultChecked = true;\n }\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {\n warning$1(false, '%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);\n didWarnValueDefaultValue = true;\n }\n }\n\n var node = element;\n var defaultValue = props.defaultValue == null ? '' : props.defaultValue;\n\n node._wrapperState = {\n initialChecked: props.checked != null ? props.checked : props.defaultChecked,\n initialValue: getToStringValue(props.value != null ? props.value : defaultValue),\n controlled: isControlled(props)\n };\n}\n\nfunction updateChecked(element, props) {\n var node = element;\n var checked = props.checked;\n if (checked != null) {\n setValueForProperty(node, 'checked', checked, false);\n }\n}\n\nfunction updateWrapper(element, props) {\n var node = element;\n {\n var _controlled = isControlled(props);\n\n if (!node._wrapperState.controlled && _controlled && !didWarnUncontrolledToControlled) {\n warning$1(false, 'A component is changing an uncontrolled input of type %s to be controlled. ' + 'Input elements should not switch from uncontrolled to controlled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', props.type);\n didWarnUncontrolledToControlled = true;\n }\n if (node._wrapperState.controlled && !_controlled && !didWarnControlledToUncontrolled) {\n warning$1(false, 'A component is changing a controlled input of type %s to be uncontrolled. ' + 'Input elements should not switch from controlled to uncontrolled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', props.type);\n didWarnControlledToUncontrolled = true;\n }\n }\n\n updateChecked(element, props);\n\n var value = getToStringValue(props.value);\n var type = props.type;\n\n if (value != null) {\n if (type === 'number') {\n if (value === 0 && node.value === '' ||\n // We explicitly want to coerce to number here if possible.\n // eslint-disable-next-line\n node.value != value) {\n node.value = toString(value);\n }\n } else if (node.value !== toString(value)) {\n node.value = toString(value);\n }\n } else if (type === 'submit' || type === 'reset') {\n // Submit/reset inputs need the attribute removed completely to avoid\n // blank-text buttons.\n node.removeAttribute('value');\n return;\n }\n\n if (disableInputAttributeSyncing) {\n // When not syncing the value attribute, React only assigns a new value\n // whenever the defaultValue React prop has changed. When not present,\n // React does nothing\n if (props.hasOwnProperty('defaultValue')) {\n setDefaultValue(node, props.type, getToStringValue(props.defaultValue));\n }\n } else {\n // When syncing the value attribute, the value comes from a cascade of\n // properties:\n // 1. The value React property\n // 2. The defaultValue React property\n // 3. Otherwise there should be no change\n if (props.hasOwnProperty('value')) {\n setDefaultValue(node, props.type, value);\n } else if (props.hasOwnProperty('defaultValue')) {\n setDefaultValue(node, props.type, getToStringValue(props.defaultValue));\n }\n }\n\n if (disableInputAttributeSyncing) {\n // When not syncing the checked attribute, the attribute is directly\n // controllable from the defaultValue React property. It needs to be\n // updated as new props come in.\n if (props.defaultChecked == null) {\n node.removeAttribute('checked');\n } else {\n node.defaultChecked = !!props.defaultChecked;\n }\n } else {\n // When syncing the checked attribute, it only changes when it needs\n // to be removed, such as transitioning from a checkbox into a text input\n if (props.checked == null && props.defaultChecked != null) {\n node.defaultChecked = !!props.defaultChecked;\n }\n }\n}\n\nfunction postMountWrapper(element, props, isHydrating) {\n var node = element;\n\n // Do not assign value if it is already set. This prevents user text input\n // from being lost during SSR hydration.\n if (props.hasOwnProperty('value') || props.hasOwnProperty('defaultValue')) {\n var type = props.type;\n var isButton = type === 'submit' || type === 'reset';\n\n // Avoid setting value attribute on submit/reset inputs as it overrides the\n // default value provided by the browser. See: #12872\n if (isButton && (props.value === undefined || props.value === null)) {\n return;\n }\n\n var _initialValue = toString(node._wrapperState.initialValue);\n\n // Do not assign value if it is already set. This prevents user text input\n // from being lost during SSR hydration.\n if (!isHydrating) {\n if (disableInputAttributeSyncing) {\n var value = getToStringValue(props.value);\n\n // When not syncing the value attribute, the value property points\n // directly to the React prop. Only assign it if it exists.\n if (value != null) {\n // Always assign on buttons so that it is possible to assign an\n // empty string to clear button text.\n //\n // Otherwise, do not re-assign the value property if is empty. This\n // potentially avoids a DOM write and prevents Firefox (~60.0.1) from\n // prematurely marking required inputs as invalid. Equality is compared\n // to the current value in case the browser provided value is not an\n // empty string.\n if (isButton || value !== node.value) {\n node.value = toString(value);\n }\n }\n } else {\n // When syncing the value attribute, the value property should use\n // the wrapperState._initialValue property. This uses:\n //\n // 1. The value React property when present\n // 2. The defaultValue React property when present\n // 3. An empty string\n if (_initialValue !== node.value) {\n node.value = _initialValue;\n }\n }\n }\n\n if (disableInputAttributeSyncing) {\n // When not syncing the value attribute, assign the value attribute\n // directly from the defaultValue React property (when present)\n var defaultValue = getToStringValue(props.defaultValue);\n if (defaultValue != null) {\n node.defaultValue = toString(defaultValue);\n }\n } else {\n // Otherwise, the value attribute is synchronized to the property,\n // so we assign defaultValue to the same thing as the value property\n // assignment step above.\n node.defaultValue = _initialValue;\n }\n }\n\n // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug\n // this is needed to work around a chrome bug where setting defaultChecked\n // will sometimes influence the value of checked (even after detachment).\n // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416\n // We need to temporarily unset name to avoid disrupting radio button groups.\n var name = node.name;\n if (name !== '') {\n node.name = '';\n }\n\n if (disableInputAttributeSyncing) {\n // When not syncing the checked attribute, the checked property\n // never gets assigned. It must be manually set. We don't want\n // to do this when hydrating so that existing user input isn't\n // modified\n if (!isHydrating) {\n updateChecked(element, props);\n }\n\n // Only assign the checked attribute if it is defined. This saves\n // a DOM write when controlling the checked attribute isn't needed\n // (text inputs, submit/reset)\n if (props.hasOwnProperty('defaultChecked')) {\n node.defaultChecked = !node.defaultChecked;\n node.defaultChecked = !!props.defaultChecked;\n }\n } else {\n // When syncing the checked attribute, both the checked property and\n // attribute are assigned at the same time using defaultChecked. This uses:\n //\n // 1. The checked React property when present\n // 2. The defaultChecked React property when present\n // 3. Otherwise, false\n node.defaultChecked = !node.defaultChecked;\n node.defaultChecked = !!node._wrapperState.initialChecked;\n }\n\n if (name !== '') {\n node.name = name;\n }\n}\n\nfunction restoreControlledState(element, props) {\n var node = element;\n updateWrapper(node, props);\n updateNamedCousins(node, props);\n}\n\nfunction updateNamedCousins(rootNode, props) {\n var name = props.name;\n if (props.type === 'radio' && name != null) {\n var queryRoot = rootNode;\n\n while (queryRoot.parentNode) {\n queryRoot = queryRoot.parentNode;\n }\n\n // If `rootNode.form` was non-null, then we could try `form.elements`,\n // but that sometimes behaves strangely in IE8. We could also try using\n // `form.getElementsByName`, but that will only return direct children\n // and won't include inputs that use the HTML5 `form=` attribute. Since\n // the input might not even be in a form. It might not even be in the\n // document. Let's just use the local `querySelectorAll` to ensure we don't\n // miss anything.\n var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type=\"radio\"]');\n\n for (var i = 0; i < group.length; i++) {\n var otherNode = group[i];\n if (otherNode === rootNode || otherNode.form !== rootNode.form) {\n continue;\n }\n // This will throw if radio buttons rendered by different copies of React\n // and the same name are rendered into the same form (same as #1939).\n // That's probably okay; we don't support it just as we don't support\n // mixing React radio buttons with non-React ones.\n var otherProps = getFiberCurrentPropsFromNode$1(otherNode);\n !otherProps ? invariant(false, 'ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.') : void 0;\n\n // We need update the tracked value on the named cousin since the value\n // was changed but the input saw no event or value set\n updateValueIfChanged(otherNode);\n\n // If this is a controlled radio button group, forcing the input that\n // was previously checked to update will cause it to be come re-checked\n // as appropriate.\n updateWrapper(otherNode, otherProps);\n }\n }\n}\n\n// In Chrome, assigning defaultValue to certain input types triggers input validation.\n// For number inputs, the display value loses trailing decimal points. For email inputs,\n// Chrome raises \"The specified value is not a valid email address\".\n//\n// Here we check to see if the defaultValue has actually changed, avoiding these problems\n// when the user is inputting text\n//\n// https://github.com/facebook/react/issues/7253\nfunction setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}\n\nvar eventTypes$1 = {\n change: {\n phasedRegistrationNames: {\n bubbled: 'onChange',\n captured: 'onChangeCapture'\n },\n dependencies: [TOP_BLUR, TOP_CHANGE, TOP_CLICK, TOP_FOCUS, TOP_INPUT, TOP_KEY_DOWN, TOP_KEY_UP, TOP_SELECTION_CHANGE]\n }\n};\n\nfunction createAndAccumulateChangeEvent(inst, nativeEvent, target) {\n var event = SyntheticEvent.getPooled(eventTypes$1.change, inst, nativeEvent, target);\n event.type = 'change';\n // Flag this event loop as needing state restore.\n enqueueStateRestore(target);\n accumulateTwoPhaseDispatches(event);\n return event;\n}\n/**\n * For IE shims\n */\nvar activeElement = null;\nvar activeElementInst = null;\n\n/**\n * SECTION: handle `change` event\n */\nfunction shouldUseChangeEvent(elem) {\n var nodeName = elem.nodeName && elem.nodeName.toLowerCase();\n return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';\n}\n\nfunction manualDispatchChangeEvent(nativeEvent) {\n var event = createAndAccumulateChangeEvent(activeElementInst, nativeEvent, getEventTarget(nativeEvent));\n\n // If change and propertychange bubbled, we'd just bind to it like all the\n // other events and have it go through ReactBrowserEventEmitter. Since it\n // doesn't, we manually listen for the events and so we have to enqueue and\n // process the abstract event manually.\n //\n // Batching is necessary here in order to ensure that all event handlers run\n // before the next rerender (including event handlers attached to ancestor\n // elements instead of directly on the input). Without this, controlled\n // components don't work properly in conjunction with event bubbling because\n // the component is rerendered and the value reverted before all the event\n // handlers can run. See https://github.com/facebook/react/issues/708.\n batchedUpdates(runEventInBatch, event);\n}\n\nfunction runEventInBatch(event) {\n runEventsInBatch(event);\n}\n\nfunction getInstIfValueChanged(targetInst) {\n var targetNode = getNodeFromInstance$1(targetInst);\n if (updateValueIfChanged(targetNode)) {\n return targetInst;\n }\n}\n\nfunction getTargetInstForChangeEvent(topLevelType, targetInst) {\n if (topLevelType === TOP_CHANGE) {\n return targetInst;\n }\n}\n\n/**\n * SECTION: handle `input` event\n */\nvar isInputEventSupported = false;\nif (canUseDOM) {\n // IE9 claims to support the input event but fails to trigger it when\n // deleting text, so we ignore its input events.\n isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 9);\n}\n\n/**\n * (For IE <=9) Starts tracking propertychange events on the passed-in element\n * and override the value property so that we can distinguish user events from\n * value changes in JS.\n */\nfunction startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}\n\n/**\n * (For IE <=9) Removes the event listeners from the currently-tracked element,\n * if any exists.\n */\nfunction stopWatchingForValueChange() {\n if (!activeElement) {\n return;\n }\n activeElement.detachEvent('onpropertychange', handlePropertyChange);\n activeElement = null;\n activeElementInst = null;\n}\n\n/**\n * (For IE <=9) Handles a propertychange event, sending a `change` event if\n * the value of the active element has changed.\n */\nfunction handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}\n\nfunction handleEventsForInputEventPolyfill(topLevelType, target, targetInst) {\n if (topLevelType === TOP_FOCUS) {\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(target, targetInst);\n } else if (topLevelType === TOP_BLUR) {\n stopWatchingForValueChange();\n }\n}\n\n// For IE8 and IE9.\nfunction getTargetInstForInputEventPolyfill(topLevelType, targetInst) {\n if (topLevelType === TOP_SELECTION_CHANGE || topLevelType === TOP_KEY_UP || topLevelType === TOP_KEY_DOWN) {\n // On the selectionchange event, the target is just document which isn't\n // helpful for us so just check activeElement instead.\n //\n // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire\n // propertychange on the first input event after setting `value` from a\n // script and fires only keydown, keypress, keyup. Catching keyup usually\n // gets it and catching keydown lets us fire an event for the first\n // keystroke if user does a key repeat (it'll be a little delayed: right\n // before the second keystroke). Other input methods (e.g., paste) seem to\n // fire selectionchange normally.\n return getInstIfValueChanged(activeElementInst);\n }\n}\n\n/**\n * SECTION: handle `click` event\n */\nfunction shouldUseClickEvent(elem) {\n // Use the `click` event to detect changes to checkbox and radio inputs.\n // This approach works across all browsers, whereas `change` does not fire\n // until `blur` in IE8.\n var nodeName = elem.nodeName;\n return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');\n}\n\nfunction getTargetInstForClickEvent(topLevelType, targetInst) {\n if (topLevelType === TOP_CLICK) {\n return getInstIfValueChanged(targetInst);\n }\n}\n\nfunction getTargetInstForInputOrChangeEvent(topLevelType, targetInst) {\n if (topLevelType === TOP_INPUT || topLevelType === TOP_CHANGE) {\n return getInstIfValueChanged(targetInst);\n }\n}\n\nfunction handleControlledInputBlur(node) {\n var state = node._wrapperState;\n\n if (!state || !state.controlled || node.type !== 'number') {\n return;\n }\n\n if (!disableInputAttributeSyncing) {\n // If controlled, assign the value attribute to the current value on blur\n setDefaultValue(node, 'number', node.value);\n }\n}\n\n/**\n * This plugin creates an `onChange` event that normalizes change events\n * across form elements. This event fires at a time when it's possible to\n * change the element's value without seeing a flicker.\n *\n * Supported elements are:\n * - input (see `isTextInputElement`)\n * - textarea\n * - select\n */\nvar ChangeEventPlugin = {\n eventTypes: eventTypes$1,\n\n _isInputEventSupported: isInputEventSupported,\n\n extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n var targetNode = targetInst ? getNodeFromInstance$1(targetInst) : window;\n\n var getTargetInstFunc = void 0,\n handleEventFunc = void 0;\n if (shouldUseChangeEvent(targetNode)) {\n getTargetInstFunc = getTargetInstForChangeEvent;\n } else if (isTextInputElement(targetNode)) {\n if (isInputEventSupported) {\n getTargetInstFunc = getTargetInstForInputOrChangeEvent;\n } else {\n getTargetInstFunc = getTargetInstForInputEventPolyfill;\n handleEventFunc = handleEventsForInputEventPolyfill;\n }\n } else if (shouldUseClickEvent(targetNode)) {\n getTargetInstFunc = getTargetInstForClickEvent;\n }\n\n if (getTargetInstFunc) {\n var inst = getTargetInstFunc(topLevelType, targetInst);\n if (inst) {\n var event = createAndAccumulateChangeEvent(inst, nativeEvent, nativeEventTarget);\n return event;\n }\n }\n\n if (handleEventFunc) {\n handleEventFunc(topLevelType, targetNode, targetInst);\n }\n\n // When blurring, set the value attribute for number inputs\n if (topLevelType === TOP_BLUR) {\n handleControlledInputBlur(targetNode);\n }\n }\n};\n\n/**\n * Module that is injectable into `EventPluginHub`, that specifies a\n * deterministic ordering of `EventPlugin`s. A convenient way to reason about\n * plugins, without having to package every one of them. This is better than\n * having plugins be ordered in the same order that they are injected because\n * that ordering would be influenced by the packaging order.\n * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that\n * preventing default on events is convenient in `SimpleEventPlugin` handlers.\n */\nvar DOMEventPluginOrder = ['ResponderEventPlugin', 'SimpleEventPlugin', 'EnterLeaveEventPlugin', 'ChangeEventPlugin', 'SelectEventPlugin', 'BeforeInputEventPlugin'];\n\nvar SyntheticUIEvent = SyntheticEvent.extend({\n view: null,\n detail: null\n});\n\nvar modifierKeyToProp = {\n Alt: 'altKey',\n Control: 'ctrlKey',\n Meta: 'metaKey',\n Shift: 'shiftKey'\n};\n\n// Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support\n// getModifierState. If getModifierState is not supported, we map it to a set of\n// modifier keys exposed by the event. In this case, Lock-keys are not supported.\n/**\n * Translation from modifier key to the associated property in the event.\n * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers\n */\n\nfunction modifierStateGetter(keyArg) {\n var syntheticEvent = this;\n var nativeEvent = syntheticEvent.nativeEvent;\n if (nativeEvent.getModifierState) {\n return nativeEvent.getModifierState(keyArg);\n }\n var keyProp = modifierKeyToProp[keyArg];\n return keyProp ? !!nativeEvent[keyProp] : false;\n}\n\nfunction getEventModifierState(nativeEvent) {\n return modifierStateGetter;\n}\n\nvar previousScreenX = 0;\nvar previousScreenY = 0;\n// Use flags to signal movementX/Y has already been set\nvar isMovementXSet = false;\nvar isMovementYSet = false;\n\n/**\n * @interface MouseEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\nvar SyntheticMouseEvent = SyntheticUIEvent.extend({\n screenX: null,\n screenY: null,\n clientX: null,\n clientY: null,\n pageX: null,\n pageY: null,\n ctrlKey: null,\n shiftKey: null,\n altKey: null,\n metaKey: null,\n getModifierState: getEventModifierState,\n button: null,\n buttons: null,\n relatedTarget: function (event) {\n return event.relatedTarget || (event.fromElement === event.srcElement ? event.toElement : event.fromElement);\n },\n movementX: function (event) {\n if ('movementX' in event) {\n return event.movementX;\n }\n\n var screenX = previousScreenX;\n previousScreenX = event.screenX;\n\n if (!isMovementXSet) {\n isMovementXSet = true;\n return 0;\n }\n\n return event.type === 'mousemove' ? event.screenX - screenX : 0;\n },\n movementY: function (event) {\n if ('movementY' in event) {\n return event.movementY;\n }\n\n var screenY = previousScreenY;\n previousScreenY = event.screenY;\n\n if (!isMovementYSet) {\n isMovementYSet = true;\n return 0;\n }\n\n return event.type === 'mousemove' ? event.screenY - screenY : 0;\n }\n});\n\n/**\n * @interface PointerEvent\n * @see http://www.w3.org/TR/pointerevents/\n */\nvar SyntheticPointerEvent = SyntheticMouseEvent.extend({\n pointerId: null,\n width: null,\n height: null,\n pressure: null,\n tangentialPressure: null,\n tiltX: null,\n tiltY: null,\n twist: null,\n pointerType: null,\n isPrimary: null\n});\n\nvar eventTypes$2 = {\n mouseEnter: {\n registrationName: 'onMouseEnter',\n dependencies: [TOP_MOUSE_OUT, TOP_MOUSE_OVER]\n },\n mouseLeave: {\n registrationName: 'onMouseLeave',\n dependencies: [TOP_MOUSE_OUT, TOP_MOUSE_OVER]\n },\n pointerEnter: {\n registrationName: 'onPointerEnter',\n dependencies: [TOP_POINTER_OUT, TOP_POINTER_OVER]\n },\n pointerLeave: {\n registrationName: 'onPointerLeave',\n dependencies: [TOP_POINTER_OUT, TOP_POINTER_OVER]\n }\n};\n\nvar EnterLeaveEventPlugin = {\n eventTypes: eventTypes$2,\n\n /**\n * For almost every interaction we care about, there will be both a top-level\n * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that\n * we do not extract duplicate events. However, moving the mouse into the\n * browser from outside will not fire a `mouseout` event. In this case, we use\n * the `mouseover` top-level event.\n */\n extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n var isOverEvent = topLevelType === TOP_MOUSE_OVER || topLevelType === TOP_POINTER_OVER;\n var isOutEvent = topLevelType === TOP_MOUSE_OUT || topLevelType === TOP_POINTER_OUT;\n\n if (isOverEvent && (nativeEvent.relatedTarget || nativeEvent.fromElement)) {\n return null;\n }\n\n if (!isOutEvent && !isOverEvent) {\n // Must not be a mouse or pointer in or out - ignoring.\n return null;\n }\n\n var win = void 0;\n if (nativeEventTarget.window === nativeEventTarget) {\n // `nativeEventTarget` is probably a window object.\n win = nativeEventTarget;\n } else {\n // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.\n var doc = nativeEventTarget.ownerDocument;\n if (doc) {\n win = doc.defaultView || doc.parentWindow;\n } else {\n win = window;\n }\n }\n\n var from = void 0;\n var to = void 0;\n if (isOutEvent) {\n from = targetInst;\n var related = nativeEvent.relatedTarget || nativeEvent.toElement;\n to = related ? getClosestInstanceFromNode(related) : null;\n } else {\n // Moving to a node from outside the window.\n from = null;\n to = targetInst;\n }\n\n if (from === to) {\n // Nothing pertains to our managed components.\n return null;\n }\n\n var eventInterface = void 0,\n leaveEventType = void 0,\n enterEventType = void 0,\n eventTypePrefix = void 0;\n\n if (topLevelType === TOP_MOUSE_OUT || topLevelType === TOP_MOUSE_OVER) {\n eventInterface = SyntheticMouseEvent;\n leaveEventType = eventTypes$2.mouseLeave;\n enterEventType = eventTypes$2.mouseEnter;\n eventTypePrefix = 'mouse';\n } else if (topLevelType === TOP_POINTER_OUT || topLevelType === TOP_POINTER_OVER) {\n eventInterface = SyntheticPointerEvent;\n leaveEventType = eventTypes$2.pointerLeave;\n enterEventType = eventTypes$2.pointerEnter;\n eventTypePrefix = 'pointer';\n }\n\n var fromNode = from == null ? win : getNodeFromInstance$1(from);\n var toNode = to == null ? win : getNodeFromInstance$1(to);\n\n var leave = eventInterface.getPooled(leaveEventType, from, nativeEvent, nativeEventTarget);\n leave.type = eventTypePrefix + 'leave';\n leave.target = fromNode;\n leave.relatedTarget = toNode;\n\n var enter = eventInterface.getPooled(enterEventType, to, nativeEvent, nativeEventTarget);\n enter.type = eventTypePrefix + 'enter';\n enter.target = toNode;\n enter.relatedTarget = fromNode;\n\n accumulateEnterLeaveDispatches(leave, enter, from, to);\n\n return [leave, enter];\n }\n};\n\n/**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\nfunction is(x, y) {\n return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare\n ;\n}\n\nvar hasOwnProperty$1 = Object.prototype.hasOwnProperty;\n\n/**\n * Performs equality by iterating through keys on an object and returning false\n * when any key has values which are not strictly equal between the arguments.\n * Returns true when the values of all keys are strictly equal.\n */\nfunction shallowEqual(objA, objB) {\n if (is(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n }\n\n // Test for A's keys different from B.\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$1.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * `ReactInstanceMap` maintains a mapping from a public facing stateful\n * instance (key) and the internal representation (value). This allows public\n * methods to accept the user facing instance as an argument and map them back\n * to internal methods.\n *\n * Note that this module is currently shared and assumed to be stateless.\n * If this becomes an actual Map, that will break.\n */\n\n/**\n * This API should be called `delete` but we'd have to make sure to always\n * transform these to strings for IE support. When this transform is fully\n * supported we can rename it.\n */\n\n\nfunction get(key) {\n return key._reactInternalFiber;\n}\n\nfunction has(key) {\n return key._reactInternalFiber !== undefined;\n}\n\nfunction set(key, value) {\n key._reactInternalFiber = value;\n}\n\n// Don't change these two values. They're used by React Dev Tools.\nvar NoEffect = /* */0;\nvar PerformedWork = /* */1;\n\n// You can change the rest (and add more).\nvar Placement = /* */2;\nvar Update = /* */4;\nvar PlacementAndUpdate = /* */6;\nvar Deletion = /* */8;\nvar ContentReset = /* */16;\nvar Callback = /* */32;\nvar DidCapture = /* */64;\nvar Ref = /* */128;\nvar Snapshot = /* */256;\nvar Passive = /* */512;\n\n// Passive & Update & Callback & Ref & Snapshot\nvar LifecycleEffectMask = /* */932;\n\n// Union of all host effects\nvar HostEffectMask = /* */1023;\n\nvar Incomplete = /* */1024;\nvar ShouldCapture = /* */2048;\n\nvar ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;\n\nvar MOUNTING = 1;\nvar MOUNTED = 2;\nvar UNMOUNTED = 3;\n\nfunction isFiberMountedImpl(fiber) {\n var node = fiber;\n if (!fiber.alternate) {\n // If there is no alternate, this might be a new tree that isn't inserted\n // yet. If it is, then it will have a pending insertion effect on it.\n if ((node.effectTag & Placement) !== NoEffect) {\n return MOUNTING;\n }\n while (node.return) {\n node = node.return;\n if ((node.effectTag & Placement) !== NoEffect) {\n return MOUNTING;\n }\n }\n } else {\n while (node.return) {\n node = node.return;\n }\n }\n if (node.tag === HostRoot) {\n // TODO: Check if this was a nested HostRoot when used with\n // renderContainerIntoSubtree.\n return MOUNTED;\n }\n // If we didn't hit the root, that means that we're in an disconnected tree\n // that has been unmounted.\n return UNMOUNTED;\n}\n\nfunction isFiberMounted(fiber) {\n return isFiberMountedImpl(fiber) === MOUNTED;\n}\n\nfunction isMounted(component) {\n {\n var owner = ReactCurrentOwner$1.current;\n if (owner !== null && owner.tag === ClassComponent) {\n var ownerFiber = owner;\n var instance = ownerFiber.stateNode;\n !instance._warnedAboutRefsInRender ? warningWithoutStack$1(false, '%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentName(ownerFiber.type) || 'A component') : void 0;\n instance._warnedAboutRefsInRender = true;\n }\n }\n\n var fiber = get(component);\n if (!fiber) {\n return false;\n }\n return isFiberMountedImpl(fiber) === MOUNTED;\n}\n\nfunction assertIsMounted(fiber) {\n !(isFiberMountedImpl(fiber) === MOUNTED) ? invariant(false, 'Unable to find node on an unmounted component.') : void 0;\n}\n\nfunction findCurrentFiberUsingSlowPath(fiber) {\n var alternate = fiber.alternate;\n if (!alternate) {\n // If there is no alternate, then we only need to check if it is mounted.\n var state = isFiberMountedImpl(fiber);\n !(state !== UNMOUNTED) ? invariant(false, 'Unable to find node on an unmounted component.') : void 0;\n if (state === MOUNTING) {\n return null;\n }\n return fiber;\n }\n // If we have two possible branches, we'll walk backwards up to the root\n // to see what path the root points to. On the way we may hit one of the\n // special cases and we'll deal with them.\n var a = fiber;\n var b = alternate;\n while (true) {\n var parentA = a.return;\n var parentB = parentA ? parentA.alternate : null;\n if (!parentA || !parentB) {\n // We're at the root.\n break;\n }\n\n // If both copies of the parent fiber point to the same child, we can\n // assume that the child is current. This happens when we bailout on low\n // priority: the bailed out fiber's child reuses the current child.\n if (parentA.child === parentB.child) {\n var child = parentA.child;\n while (child) {\n if (child === a) {\n // We've determined that A is the current branch.\n assertIsMounted(parentA);\n return fiber;\n }\n if (child === b) {\n // We've determined that B is the current branch.\n assertIsMounted(parentA);\n return alternate;\n }\n child = child.sibling;\n }\n // We should never have an alternate for any mounting node. So the only\n // way this could possibly happen is if this was unmounted, if at all.\n invariant(false, 'Unable to find node on an unmounted component.');\n }\n\n if (a.return !== b.return) {\n // The return pointer of A and the return pointer of B point to different\n // fibers. We assume that return pointers never criss-cross, so A must\n // belong to the child set of A.return, and B must belong to the child\n // set of B.return.\n a = parentA;\n b = parentB;\n } else {\n // The return pointers point to the same fiber. We'll have to use the\n // default, slow path: scan the child sets of each parent alternate to see\n // which child belongs to which set.\n //\n // Search parent A's child set\n var didFindChild = false;\n var _child = parentA.child;\n while (_child) {\n if (_child === a) {\n didFindChild = true;\n a = parentA;\n b = parentB;\n break;\n }\n if (_child === b) {\n didFindChild = true;\n b = parentA;\n a = parentB;\n break;\n }\n _child = _child.sibling;\n }\n if (!didFindChild) {\n // Search parent B's child set\n _child = parentB.child;\n while (_child) {\n if (_child === a) {\n didFindChild = true;\n a = parentB;\n b = parentA;\n break;\n }\n if (_child === b) {\n didFindChild = true;\n b = parentB;\n a = parentA;\n break;\n }\n _child = _child.sibling;\n }\n !didFindChild ? invariant(false, 'Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.') : void 0;\n }\n }\n\n !(a.alternate === b) ? invariant(false, 'Return fibers should always be each others\\' alternates. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n }\n // If the root is not a host container, we're in a disconnected tree. I.e.\n // unmounted.\n !(a.tag === HostRoot) ? invariant(false, 'Unable to find node on an unmounted component.') : void 0;\n if (a.stateNode.current === a) {\n // We've determined that A is the current branch.\n return fiber;\n }\n // Otherwise B has to be current branch.\n return alternate;\n}\n\nfunction findCurrentHostFiber(parent) {\n var currentParent = findCurrentFiberUsingSlowPath(parent);\n if (!currentParent) {\n return null;\n }\n\n // Next we'll drill down this component to find the first HostComponent/Text.\n var node = currentParent;\n while (true) {\n if (node.tag === HostComponent || node.tag === HostText) {\n return node;\n } else if (node.child) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n if (node === currentParent) {\n return null;\n }\n while (!node.sibling) {\n if (!node.return || node.return === currentParent) {\n return null;\n }\n node = node.return;\n }\n node.sibling.return = node.return;\n node = node.sibling;\n }\n // Flow needs the return null here, but ESLint complains about it.\n // eslint-disable-next-line no-unreachable\n return null;\n}\n\nfunction findCurrentHostFiberWithNoPortals(parent) {\n var currentParent = findCurrentFiberUsingSlowPath(parent);\n if (!currentParent) {\n return null;\n }\n\n // Next we'll drill down this component to find the first HostComponent/Text.\n var node = currentParent;\n while (true) {\n if (node.tag === HostComponent || node.tag === HostText) {\n return node;\n } else if (node.child && node.tag !== HostPortal) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n if (node === currentParent) {\n return null;\n }\n while (!node.sibling) {\n if (!node.return || node.return === currentParent) {\n return null;\n }\n node = node.return;\n }\n node.sibling.return = node.return;\n node = node.sibling;\n }\n // Flow needs the return null here, but ESLint complains about it.\n // eslint-disable-next-line no-unreachable\n return null;\n}\n\nfunction addEventBubbleListener(element, eventType, listener) {\n element.addEventListener(eventType, listener, false);\n}\n\nfunction addEventCaptureListener(element, eventType, listener) {\n element.addEventListener(eventType, listener, true);\n}\n\n/**\n * @interface Event\n * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface\n * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent\n */\nvar SyntheticAnimationEvent = SyntheticEvent.extend({\n animationName: null,\n elapsedTime: null,\n pseudoElement: null\n});\n\n/**\n * @interface Event\n * @see http://www.w3.org/TR/clipboard-apis/\n */\nvar SyntheticClipboardEvent = SyntheticEvent.extend({\n clipboardData: function (event) {\n return 'clipboardData' in event ? event.clipboardData : window.clipboardData;\n }\n});\n\n/**\n * @interface FocusEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\nvar SyntheticFocusEvent = SyntheticUIEvent.extend({\n relatedTarget: null\n});\n\n/**\n * `charCode` represents the actual \"character code\" and is safe to use with\n * `String.fromCharCode`. As such, only keys that correspond to printable\n * characters produce a valid `charCode`, the only exception to this is Enter.\n * The Tab-key is considered non-printable and does not have a `charCode`,\n * presumably because it does not produce a tab-character in browsers.\n *\n * @param {object} nativeEvent Native browser event.\n * @return {number} Normalized `charCode` property.\n */\nfunction getEventCharCode(nativeEvent) {\n var charCode = void 0;\n var keyCode = nativeEvent.keyCode;\n\n if ('charCode' in nativeEvent) {\n charCode = nativeEvent.charCode;\n\n // FF does not set `charCode` for the Enter-key, check against `keyCode`.\n if (charCode === 0 && keyCode === 13) {\n charCode = 13;\n }\n } else {\n // IE8 does not implement `charCode`, but `keyCode` has the correct value.\n charCode = keyCode;\n }\n\n // IE and Edge (on Windows) and Chrome / Safari (on Windows and Linux)\n // report Enter as charCode 10 when ctrl is pressed.\n if (charCode === 10) {\n charCode = 13;\n }\n\n // Some non-printable keys are reported in `charCode`/`keyCode`, discard them.\n // Must not discard the (non-)printable Enter-key.\n if (charCode >= 32 || charCode === 13) {\n return charCode;\n }\n\n return 0;\n}\n\n/**\n * Normalization of deprecated HTML5 `key` values\n * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names\n */\nvar normalizeKey = {\n Esc: 'Escape',\n Spacebar: ' ',\n Left: 'ArrowLeft',\n Up: 'ArrowUp',\n Right: 'ArrowRight',\n Down: 'ArrowDown',\n Del: 'Delete',\n Win: 'OS',\n Menu: 'ContextMenu',\n Apps: 'ContextMenu',\n Scroll: 'ScrollLock',\n MozPrintableKey: 'Unidentified'\n};\n\n/**\n * Translation from legacy `keyCode` to HTML5 `key`\n * Only special keys supported, all others depend on keyboard layout or browser\n * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names\n */\nvar translateToKey = {\n '8': 'Backspace',\n '9': 'Tab',\n '12': 'Clear',\n '13': 'Enter',\n '16': 'Shift',\n '17': 'Control',\n '18': 'Alt',\n '19': 'Pause',\n '20': 'CapsLock',\n '27': 'Escape',\n '32': ' ',\n '33': 'PageUp',\n '34': 'PageDown',\n '35': 'End',\n '36': 'Home',\n '37': 'ArrowLeft',\n '38': 'ArrowUp',\n '39': 'ArrowRight',\n '40': 'ArrowDown',\n '45': 'Insert',\n '46': 'Delete',\n '112': 'F1',\n '113': 'F2',\n '114': 'F3',\n '115': 'F4',\n '116': 'F5',\n '117': 'F6',\n '118': 'F7',\n '119': 'F8',\n '120': 'F9',\n '121': 'F10',\n '122': 'F11',\n '123': 'F12',\n '144': 'NumLock',\n '145': 'ScrollLock',\n '224': 'Meta'\n};\n\n/**\n * @param {object} nativeEvent Native browser event.\n * @return {string} Normalized `key` property.\n */\nfunction getEventKey(nativeEvent) {\n if (nativeEvent.key) {\n // Normalize inconsistent values reported by browsers due to\n // implementations of a working draft specification.\n\n // FireFox implements `key` but returns `MozPrintableKey` for all\n // printable characters (normalized to `Unidentified`), ignore it.\n var key = normalizeKey[nativeEvent.key] || nativeEvent.key;\n if (key !== 'Unidentified') {\n return key;\n }\n }\n\n // Browser does not implement `key`, polyfill as much of it as we can.\n if (nativeEvent.type === 'keypress') {\n var charCode = getEventCharCode(nativeEvent);\n\n // The enter-key is technically both printable and non-printable and can\n // thus be captured by `keypress`, no other non-printable key should.\n return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);\n }\n if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {\n // While user keyboard layout determines the actual meaning of each\n // `keyCode` value, almost all function keys have a universal value.\n return translateToKey[nativeEvent.keyCode] || 'Unidentified';\n }\n return '';\n}\n\n/**\n * @interface KeyboardEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\nvar SyntheticKeyboardEvent = SyntheticUIEvent.extend({\n key: getEventKey,\n location: null,\n ctrlKey: null,\n shiftKey: null,\n altKey: null,\n metaKey: null,\n repeat: null,\n locale: null,\n getModifierState: getEventModifierState,\n // Legacy Interface\n charCode: function (event) {\n // `charCode` is the result of a KeyPress event and represents the value of\n // the actual printable character.\n\n // KeyPress is deprecated, but its replacement is not yet final and not\n // implemented in any major browser. Only KeyPress has charCode.\n if (event.type === 'keypress') {\n return getEventCharCode(event);\n }\n return 0;\n },\n keyCode: function (event) {\n // `keyCode` is the result of a KeyDown/Up event and represents the value of\n // physical keyboard key.\n\n // The actual meaning of the value depends on the users' keyboard layout\n // which cannot be detected. Assuming that it is a US keyboard layout\n // provides a surprisingly accurate mapping for US and European users.\n // Due to this, it is left to the user to implement at this time.\n if (event.type === 'keydown' || event.type === 'keyup') {\n return event.keyCode;\n }\n return 0;\n },\n which: function (event) {\n // `which` is an alias for either `keyCode` or `charCode` depending on the\n // type of the event.\n if (event.type === 'keypress') {\n return getEventCharCode(event);\n }\n if (event.type === 'keydown' || event.type === 'keyup') {\n return event.keyCode;\n }\n return 0;\n }\n});\n\n/**\n * @interface DragEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\nvar SyntheticDragEvent = SyntheticMouseEvent.extend({\n dataTransfer: null\n});\n\n/**\n * @interface TouchEvent\n * @see http://www.w3.org/TR/touch-events/\n */\nvar SyntheticTouchEvent = SyntheticUIEvent.extend({\n touches: null,\n targetTouches: null,\n changedTouches: null,\n altKey: null,\n metaKey: null,\n ctrlKey: null,\n shiftKey: null,\n getModifierState: getEventModifierState\n});\n\n/**\n * @interface Event\n * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-\n * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent\n */\nvar SyntheticTransitionEvent = SyntheticEvent.extend({\n propertyName: null,\n elapsedTime: null,\n pseudoElement: null\n});\n\n/**\n * @interface WheelEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\nvar SyntheticWheelEvent = SyntheticMouseEvent.extend({\n deltaX: function (event) {\n return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).\n 'wheelDeltaX' in event ? -event.wheelDeltaX : 0;\n },\n deltaY: function (event) {\n return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).\n 'wheelDeltaY' in event ? -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).\n 'wheelDelta' in event ? -event.wheelDelta : 0;\n },\n\n deltaZ: null,\n\n // Browsers without \"deltaMode\" is reporting in raw wheel delta where one\n // notch on the scroll is always +/- 120, roughly equivalent to pixels.\n // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or\n // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.\n deltaMode: null\n});\n\n/**\n * Turns\n * ['abort', ...]\n * into\n * eventTypes = {\n * 'abort': {\n * phasedRegistrationNames: {\n * bubbled: 'onAbort',\n * captured: 'onAbortCapture',\n * },\n * dependencies: [TOP_ABORT],\n * },\n * ...\n * };\n * topLevelEventsToDispatchConfig = new Map([\n * [TOP_ABORT, { sameConfig }],\n * ]);\n */\n\nvar interactiveEventTypeNames = [[TOP_BLUR, 'blur'], [TOP_CANCEL, 'cancel'], [TOP_CLICK, 'click'], [TOP_CLOSE, 'close'], [TOP_CONTEXT_MENU, 'contextMenu'], [TOP_COPY, 'copy'], [TOP_CUT, 'cut'], [TOP_AUX_CLICK, 'auxClick'], [TOP_DOUBLE_CLICK, 'doubleClick'], [TOP_DRAG_END, 'dragEnd'], [TOP_DRAG_START, 'dragStart'], [TOP_DROP, 'drop'], [TOP_FOCUS, 'focus'], [TOP_INPUT, 'input'], [TOP_INVALID, 'invalid'], [TOP_KEY_DOWN, 'keyDown'], [TOP_KEY_PRESS, 'keyPress'], [TOP_KEY_UP, 'keyUp'], [TOP_MOUSE_DOWN, 'mouseDown'], [TOP_MOUSE_UP, 'mouseUp'], [TOP_PASTE, 'paste'], [TOP_PAUSE, 'pause'], [TOP_PLAY, 'play'], [TOP_POINTER_CANCEL, 'pointerCancel'], [TOP_POINTER_DOWN, 'pointerDown'], [TOP_POINTER_UP, 'pointerUp'], [TOP_RATE_CHANGE, 'rateChange'], [TOP_RESET, 'reset'], [TOP_SEEKED, 'seeked'], [TOP_SUBMIT, 'submit'], [TOP_TOUCH_CANCEL, 'touchCancel'], [TOP_TOUCH_END, 'touchEnd'], [TOP_TOUCH_START, 'touchStart'], [TOP_VOLUME_CHANGE, 'volumeChange']];\nvar nonInteractiveEventTypeNames = [[TOP_ABORT, 'abort'], [TOP_ANIMATION_END, 'animationEnd'], [TOP_ANIMATION_ITERATION, 'animationIteration'], [TOP_ANIMATION_START, 'animationStart'], [TOP_CAN_PLAY, 'canPlay'], [TOP_CAN_PLAY_THROUGH, 'canPlayThrough'], [TOP_DRAG, 'drag'], [TOP_DRAG_ENTER, 'dragEnter'], [TOP_DRAG_EXIT, 'dragExit'], [TOP_DRAG_LEAVE, 'dragLeave'], [TOP_DRAG_OVER, 'dragOver'], [TOP_DURATION_CHANGE, 'durationChange'], [TOP_EMPTIED, 'emptied'], [TOP_ENCRYPTED, 'encrypted'], [TOP_ENDED, 'ended'], [TOP_ERROR, 'error'], [TOP_GOT_POINTER_CAPTURE, 'gotPointerCapture'], [TOP_LOAD, 'load'], [TOP_LOADED_DATA, 'loadedData'], [TOP_LOADED_METADATA, 'loadedMetadata'], [TOP_LOAD_START, 'loadStart'], [TOP_LOST_POINTER_CAPTURE, 'lostPointerCapture'], [TOP_MOUSE_MOVE, 'mouseMove'], [TOP_MOUSE_OUT, 'mouseOut'], [TOP_MOUSE_OVER, 'mouseOver'], [TOP_PLAYING, 'playing'], [TOP_POINTER_MOVE, 'pointerMove'], [TOP_POINTER_OUT, 'pointerOut'], [TOP_POINTER_OVER, 'pointerOver'], [TOP_PROGRESS, 'progress'], [TOP_SCROLL, 'scroll'], [TOP_SEEKING, 'seeking'], [TOP_STALLED, 'stalled'], [TOP_SUSPEND, 'suspend'], [TOP_TIME_UPDATE, 'timeUpdate'], [TOP_TOGGLE, 'toggle'], [TOP_TOUCH_MOVE, 'touchMove'], [TOP_TRANSITION_END, 'transitionEnd'], [TOP_WAITING, 'waiting'], [TOP_WHEEL, 'wheel']];\n\nvar eventTypes$4 = {};\nvar topLevelEventsToDispatchConfig = {};\n\nfunction addEventTypeNameToConfig(_ref, isInteractive) {\n var topEvent = _ref[0],\n event = _ref[1];\n\n var capitalizedEvent = event[0].toUpperCase() + event.slice(1);\n var onEvent = 'on' + capitalizedEvent;\n\n var type = {\n phasedRegistrationNames: {\n bubbled: onEvent,\n captured: onEvent + 'Capture'\n },\n dependencies: [topEvent],\n isInteractive: isInteractive\n };\n eventTypes$4[event] = type;\n topLevelEventsToDispatchConfig[topEvent] = type;\n}\n\ninteractiveEventTypeNames.forEach(function (eventTuple) {\n addEventTypeNameToConfig(eventTuple, true);\n});\nnonInteractiveEventTypeNames.forEach(function (eventTuple) {\n addEventTypeNameToConfig(eventTuple, false);\n});\n\n// Only used in DEV for exhaustiveness validation.\nvar knownHTMLTopLevelTypes = [TOP_ABORT, TOP_CANCEL, TOP_CAN_PLAY, TOP_CAN_PLAY_THROUGH, TOP_CLOSE, TOP_DURATION_CHANGE, TOP_EMPTIED, TOP_ENCRYPTED, TOP_ENDED, TOP_ERROR, TOP_INPUT, TOP_INVALID, TOP_LOAD, TOP_LOADED_DATA, TOP_LOADED_METADATA, TOP_LOAD_START, TOP_PAUSE, TOP_PLAY, TOP_PLAYING, TOP_PROGRESS, TOP_RATE_CHANGE, TOP_RESET, TOP_SEEKED, TOP_SEEKING, TOP_STALLED, TOP_SUBMIT, TOP_SUSPEND, TOP_TIME_UPDATE, TOP_TOGGLE, TOP_VOLUME_CHANGE, TOP_WAITING];\n\nvar SimpleEventPlugin = {\n eventTypes: eventTypes$4,\n\n isInteractiveTopLevelEventType: function (topLevelType) {\n var config = topLevelEventsToDispatchConfig[topLevelType];\n return config !== undefined && config.isInteractive === true;\n },\n\n\n extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n var dispatchConfig = topLevelEventsToDispatchConfig[topLevelType];\n if (!dispatchConfig) {\n return null;\n }\n var EventConstructor = void 0;\n switch (topLevelType) {\n case TOP_KEY_PRESS:\n // Firefox creates a keypress event for function keys too. This removes\n // the unwanted keypress events. Enter is however both printable and\n // non-printable. One would expect Tab to be as well (but it isn't).\n if (getEventCharCode(nativeEvent) === 0) {\n return null;\n }\n /* falls through */\n case TOP_KEY_DOWN:\n case TOP_KEY_UP:\n EventConstructor = SyntheticKeyboardEvent;\n break;\n case TOP_BLUR:\n case TOP_FOCUS:\n EventConstructor = SyntheticFocusEvent;\n break;\n case TOP_CLICK:\n // Firefox creates a click event on right mouse clicks. This removes the\n // unwanted click events.\n if (nativeEvent.button === 2) {\n return null;\n }\n /* falls through */\n case TOP_AUX_CLICK:\n case TOP_DOUBLE_CLICK:\n case TOP_MOUSE_DOWN:\n case TOP_MOUSE_MOVE:\n case TOP_MOUSE_UP:\n // TODO: Disabled elements should not respond to mouse events\n /* falls through */\n case TOP_MOUSE_OUT:\n case TOP_MOUSE_OVER:\n case TOP_CONTEXT_MENU:\n EventConstructor = SyntheticMouseEvent;\n break;\n case TOP_DRAG:\n case TOP_DRAG_END:\n case TOP_DRAG_ENTER:\n case TOP_DRAG_EXIT:\n case TOP_DRAG_LEAVE:\n case TOP_DRAG_OVER:\n case TOP_DRAG_START:\n case TOP_DROP:\n EventConstructor = SyntheticDragEvent;\n break;\n case TOP_TOUCH_CANCEL:\n case TOP_TOUCH_END:\n case TOP_TOUCH_MOVE:\n case TOP_TOUCH_START:\n EventConstructor = SyntheticTouchEvent;\n break;\n case TOP_ANIMATION_END:\n case TOP_ANIMATION_ITERATION:\n case TOP_ANIMATION_START:\n EventConstructor = SyntheticAnimationEvent;\n break;\n case TOP_TRANSITION_END:\n EventConstructor = SyntheticTransitionEvent;\n break;\n case TOP_SCROLL:\n EventConstructor = SyntheticUIEvent;\n break;\n case TOP_WHEEL:\n EventConstructor = SyntheticWheelEvent;\n break;\n case TOP_COPY:\n case TOP_CUT:\n case TOP_PASTE:\n EventConstructor = SyntheticClipboardEvent;\n break;\n case TOP_GOT_POINTER_CAPTURE:\n case TOP_LOST_POINTER_CAPTURE:\n case TOP_POINTER_CANCEL:\n case TOP_POINTER_DOWN:\n case TOP_POINTER_MOVE:\n case TOP_POINTER_OUT:\n case TOP_POINTER_OVER:\n case TOP_POINTER_UP:\n EventConstructor = SyntheticPointerEvent;\n break;\n default:\n {\n if (knownHTMLTopLevelTypes.indexOf(topLevelType) === -1) {\n warningWithoutStack$1(false, 'SimpleEventPlugin: Unhandled event type, `%s`. This warning ' + 'is likely caused by a bug in React. Please file an issue.', topLevelType);\n }\n }\n // HTML Events\n // @see http://www.w3.org/TR/html5/index.html#events-0\n EventConstructor = SyntheticEvent;\n break;\n }\n var event = EventConstructor.getPooled(dispatchConfig, targetInst, nativeEvent, nativeEventTarget);\n accumulateTwoPhaseDispatches(event);\n return event;\n }\n};\n\nvar isInteractiveTopLevelEventType = SimpleEventPlugin.isInteractiveTopLevelEventType;\n\n\nvar CALLBACK_BOOKKEEPING_POOL_SIZE = 10;\nvar callbackBookkeepingPool = [];\n\n/**\n * Find the deepest React component completely containing the root of the\n * passed-in instance (for use when entire React trees are nested within each\n * other). If React trees are not nested, returns null.\n */\nfunction findRootContainerNode(inst) {\n // TODO: It may be a good idea to cache this to prevent unnecessary DOM\n // traversal, but caching is difficult to do correctly without using a\n // mutation observer to listen for all DOM changes.\n while (inst.return) {\n inst = inst.return;\n }\n if (inst.tag !== HostRoot) {\n // This can happen if we're in a detached tree.\n return null;\n }\n return inst.stateNode.containerInfo;\n}\n\n// Used to store ancestor hierarchy in top level callback\nfunction getTopLevelCallbackBookKeeping(topLevelType, nativeEvent, targetInst) {\n if (callbackBookkeepingPool.length) {\n var instance = callbackBookkeepingPool.pop();\n instance.topLevelType = topLevelType;\n instance.nativeEvent = nativeEvent;\n instance.targetInst = targetInst;\n return instance;\n }\n return {\n topLevelType: topLevelType,\n nativeEvent: nativeEvent,\n targetInst: targetInst,\n ancestors: []\n };\n}\n\nfunction releaseTopLevelCallbackBookKeeping(instance) {\n instance.topLevelType = null;\n instance.nativeEvent = null;\n instance.targetInst = null;\n instance.ancestors.length = 0;\n if (callbackBookkeepingPool.length < CALLBACK_BOOKKEEPING_POOL_SIZE) {\n callbackBookkeepingPool.push(instance);\n }\n}\n\nfunction handleTopLevel(bookKeeping) {\n var targetInst = bookKeeping.targetInst;\n\n // Loop through the hierarchy, in case there's any nested components.\n // It's important that we build the array of ancestors before calling any\n // event handlers, because event handlers can modify the DOM, leading to\n // inconsistencies with ReactMount's node cache. See #1105.\n var ancestor = targetInst;\n do {\n if (!ancestor) {\n bookKeeping.ancestors.push(ancestor);\n break;\n }\n var root = findRootContainerNode(ancestor);\n if (!root) {\n break;\n }\n bookKeeping.ancestors.push(ancestor);\n ancestor = getClosestInstanceFromNode(root);\n } while (ancestor);\n\n for (var i = 0; i < bookKeeping.ancestors.length; i++) {\n targetInst = bookKeeping.ancestors[i];\n runExtractedEventsInBatch(bookKeeping.topLevelType, targetInst, bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n }\n}\n\n// TODO: can we stop exporting these?\nvar _enabled = true;\n\nfunction setEnabled(enabled) {\n _enabled = !!enabled;\n}\n\nfunction isEnabled() {\n return _enabled;\n}\n\n/**\n * Traps top-level events by using event bubbling.\n *\n * @param {number} topLevelType Number from `TopLevelEventTypes`.\n * @param {object} element Element on which to attach listener.\n * @return {?object} An object with a remove function which will forcefully\n * remove the listener.\n * @internal\n */\nfunction trapBubbledEvent(topLevelType, element) {\n if (!element) {\n return null;\n }\n var dispatch = isInteractiveTopLevelEventType(topLevelType) ? dispatchInteractiveEvent : dispatchEvent;\n\n addEventBubbleListener(element, getRawEventName(topLevelType),\n // Check if interactive and wrap in interactiveUpdates\n dispatch.bind(null, topLevelType));\n}\n\n/**\n * Traps a top-level event by using event capturing.\n *\n * @param {number} topLevelType Number from `TopLevelEventTypes`.\n * @param {object} element Element on which to attach listener.\n * @return {?object} An object with a remove function which will forcefully\n * remove the listener.\n * @internal\n */\nfunction trapCapturedEvent(topLevelType, element) {\n if (!element) {\n return null;\n }\n var dispatch = isInteractiveTopLevelEventType(topLevelType) ? dispatchInteractiveEvent : dispatchEvent;\n\n addEventCaptureListener(element, getRawEventName(topLevelType),\n // Check if interactive and wrap in interactiveUpdates\n dispatch.bind(null, topLevelType));\n}\n\nfunction dispatchInteractiveEvent(topLevelType, nativeEvent) {\n interactiveUpdates(dispatchEvent, topLevelType, nativeEvent);\n}\n\nfunction dispatchEvent(topLevelType, nativeEvent) {\n if (!_enabled) {\n return;\n }\n\n var nativeEventTarget = getEventTarget(nativeEvent);\n var targetInst = getClosestInstanceFromNode(nativeEventTarget);\n if (targetInst !== null && typeof targetInst.tag === 'number' && !isFiberMounted(targetInst)) {\n // If we get an event (ex: img onload) before committing that\n // component's mount, ignore it for now (that is, treat it as if it was an\n // event on a non-React tree). We might also consider queueing events and\n // dispatching them after the mount.\n targetInst = null;\n }\n\n var bookKeeping = getTopLevelCallbackBookKeeping(topLevelType, nativeEvent, targetInst);\n\n try {\n // Event queue being processed in the same cycle allows\n // `preventDefault`.\n batchedUpdates(handleTopLevel, bookKeeping);\n } finally {\n releaseTopLevelCallbackBookKeeping(bookKeeping);\n }\n}\n\n/**\n * Summary of `ReactBrowserEventEmitter` event handling:\n *\n * - Top-level delegation is used to trap most native browser events. This\n * may only occur in the main thread and is the responsibility of\n * ReactDOMEventListener, which is injected and can therefore support\n * pluggable event sources. This is the only work that occurs in the main\n * thread.\n *\n * - We normalize and de-duplicate events to account for browser quirks. This\n * may be done in the worker thread.\n *\n * - Forward these native events (with the associated top-level type used to\n * trap it) to `EventPluginHub`, which in turn will ask plugins if they want\n * to extract any synthetic events.\n *\n * - The `EventPluginHub` will then process each event by annotating them with\n * \"dispatches\", a sequence of listeners and IDs that care about that event.\n *\n * - The `EventPluginHub` then dispatches the events.\n *\n * Overview of React and the event system:\n *\n * +------------+ .\n * | DOM | .\n * +------------+ .\n * | .\n * v .\n * +------------+ .\n * | ReactEvent | .\n * | Listener | .\n * +------------+ . +-----------+\n * | . +--------+|SimpleEvent|\n * | . | |Plugin |\n * +-----|------+ . v +-----------+\n * | | | . +--------------+ +------------+\n * | +-----------.--->|EventPluginHub| | Event |\n * | | . | | +-----------+ | Propagators|\n * | ReactEvent | . | | |TapEvent | |------------|\n * | Emitter | . | |<---+|Plugin | |other plugin|\n * | | . | | +-----------+ | utilities |\n * | +-----------.--->| | +------------+\n * | | | . +--------------+\n * +-----|------+ . ^ +-----------+\n * | . | |Enter/Leave|\n * + . +-------+|Plugin |\n * +-------------+ . +-----------+\n * | application | .\n * |-------------| .\n * | | .\n * | | .\n * +-------------+ .\n * .\n * React Core . General Purpose Event Plugin System\n */\n\nvar alreadyListeningTo = {};\nvar reactTopListenersCounter = 0;\n\n/**\n * To ensure no conflicts with other potential React instances on the page\n */\nvar topListenersIDKey = '_reactListenersID' + ('' + Math.random()).slice(2);\n\nfunction getListeningForDocument(mountAt) {\n // In IE8, `mountAt` is a host object and doesn't have `hasOwnProperty`\n // directly.\n if (!Object.prototype.hasOwnProperty.call(mountAt, topListenersIDKey)) {\n mountAt[topListenersIDKey] = reactTopListenersCounter++;\n alreadyListeningTo[mountAt[topListenersIDKey]] = {};\n }\n return alreadyListeningTo[mountAt[topListenersIDKey]];\n}\n\n/**\n * We listen for bubbled touch events on the document object.\n *\n * Firefox v8.01 (and possibly others) exhibited strange behavior when\n * mounting `onmousemove` events at some node that was not the document\n * element. The symptoms were that if your mouse is not moving over something\n * contained within that mount point (for example on the background) the\n * top-level listeners for `onmousemove` won't be called. However, if you\n * register the `mousemove` on the document object, then it will of course\n * catch all `mousemove`s. This along with iOS quirks, justifies restricting\n * top-level listeners to the document object only, at least for these\n * movement types of events and possibly all events.\n *\n * @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html\n *\n * Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but\n * they bubble to document.\n *\n * @param {string} registrationName Name of listener (e.g. `onClick`).\n * @param {object} mountAt Container where to mount the listener\n */\nfunction listenTo(registrationName, mountAt) {\n var isListening = getListeningForDocument(mountAt);\n var dependencies = registrationNameDependencies[registrationName];\n\n for (var i = 0; i < dependencies.length; i++) {\n var dependency = dependencies[i];\n if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) {\n switch (dependency) {\n case TOP_SCROLL:\n trapCapturedEvent(TOP_SCROLL, mountAt);\n break;\n case TOP_FOCUS:\n case TOP_BLUR:\n trapCapturedEvent(TOP_FOCUS, mountAt);\n trapCapturedEvent(TOP_BLUR, mountAt);\n // We set the flag for a single dependency later in this function,\n // but this ensures we mark both as attached rather than just one.\n isListening[TOP_BLUR] = true;\n isListening[TOP_FOCUS] = true;\n break;\n case TOP_CANCEL:\n case TOP_CLOSE:\n if (isEventSupported(getRawEventName(dependency))) {\n trapCapturedEvent(dependency, mountAt);\n }\n break;\n case TOP_INVALID:\n case TOP_SUBMIT:\n case TOP_RESET:\n // We listen to them on the target DOM elements.\n // Some of them bubble so we don't want them to fire twice.\n break;\n default:\n // By default, listen on the top level to all non-media events.\n // Media events don't bubble so adding the listener wouldn't do anything.\n var isMediaEvent = mediaEventTypes.indexOf(dependency) !== -1;\n if (!isMediaEvent) {\n trapBubbledEvent(dependency, mountAt);\n }\n break;\n }\n isListening[dependency] = true;\n }\n }\n}\n\nfunction isListeningToAllDependencies(registrationName, mountAt) {\n var isListening = getListeningForDocument(mountAt);\n var dependencies = registrationNameDependencies[registrationName];\n for (var i = 0; i < dependencies.length; i++) {\n var dependency = dependencies[i];\n if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) {\n return false;\n }\n }\n return true;\n}\n\nfunction getActiveElement(doc) {\n doc = doc || (typeof document !== 'undefined' ? document : undefined);\n if (typeof doc === 'undefined') {\n return null;\n }\n try {\n return doc.activeElement || doc.body;\n } catch (e) {\n return doc.body;\n }\n}\n\n/**\n * Given any node return the first leaf node without children.\n *\n * @param {DOMElement|DOMTextNode} node\n * @return {DOMElement|DOMTextNode}\n */\nfunction getLeafNode(node) {\n while (node && node.firstChild) {\n node = node.firstChild;\n }\n return node;\n}\n\n/**\n * Get the next sibling within a container. This will walk up the\n * DOM if a node's siblings have been exhausted.\n *\n * @param {DOMElement|DOMTextNode} node\n * @return {?DOMElement|DOMTextNode}\n */\nfunction getSiblingNode(node) {\n while (node) {\n if (node.nextSibling) {\n return node.nextSibling;\n }\n node = node.parentNode;\n }\n}\n\n/**\n * Get object describing the nodes which contain characters at offset.\n *\n * @param {DOMElement|DOMTextNode} root\n * @param {number} offset\n * @return {?object}\n */\nfunction getNodeForCharacterOffset(root, offset) {\n var node = getLeafNode(root);\n var nodeStart = 0;\n var nodeEnd = 0;\n\n while (node) {\n if (node.nodeType === TEXT_NODE) {\n nodeEnd = nodeStart + node.textContent.length;\n\n if (nodeStart <= offset && nodeEnd >= offset) {\n return {\n node: node,\n offset: offset - nodeStart\n };\n }\n\n nodeStart = nodeEnd;\n }\n\n node = getLeafNode(getSiblingNode(node));\n }\n}\n\n/**\n * @param {DOMElement} outerNode\n * @return {?object}\n */\nfunction getOffsets(outerNode) {\n var ownerDocument = outerNode.ownerDocument;\n\n var win = ownerDocument && ownerDocument.defaultView || window;\n var selection = win.getSelection && win.getSelection();\n\n if (!selection || selection.rangeCount === 0) {\n return null;\n }\n\n var anchorNode = selection.anchorNode,\n anchorOffset = selection.anchorOffset,\n focusNode = selection.focusNode,\n focusOffset = selection.focusOffset;\n\n // In Firefox, anchorNode and focusNode can be \"anonymous divs\", e.g. the\n // up/down buttons on an . Anonymous divs do not seem to\n // expose properties, triggering a \"Permission denied error\" if any of its\n // properties are accessed. The only seemingly possible way to avoid erroring\n // is to access a property that typically works for non-anonymous divs and\n // catch any error that may otherwise arise. See\n // https://bugzilla.mozilla.org/show_bug.cgi?id=208427\n\n try {\n /* eslint-disable no-unused-expressions */\n anchorNode.nodeType;\n focusNode.nodeType;\n /* eslint-enable no-unused-expressions */\n } catch (e) {\n return null;\n }\n\n return getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset);\n}\n\n/**\n * Returns {start, end} where `start` is the character/codepoint index of\n * (anchorNode, anchorOffset) within the textContent of `outerNode`, and\n * `end` is the index of (focusNode, focusOffset).\n *\n * Returns null if you pass in garbage input but we should probably just crash.\n *\n * Exported only for testing.\n */\nfunction getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset) {\n var length = 0;\n var start = -1;\n var end = -1;\n var indexWithinAnchor = 0;\n var indexWithinFocus = 0;\n var node = outerNode;\n var parentNode = null;\n\n outer: while (true) {\n var next = null;\n\n while (true) {\n if (node === anchorNode && (anchorOffset === 0 || node.nodeType === TEXT_NODE)) {\n start = length + anchorOffset;\n }\n if (node === focusNode && (focusOffset === 0 || node.nodeType === TEXT_NODE)) {\n end = length + focusOffset;\n }\n\n if (node.nodeType === TEXT_NODE) {\n length += node.nodeValue.length;\n }\n\n if ((next = node.firstChild) === null) {\n break;\n }\n // Moving from `node` to its first child `next`.\n parentNode = node;\n node = next;\n }\n\n while (true) {\n if (node === outerNode) {\n // If `outerNode` has children, this is always the second time visiting\n // it. If it has no children, this is still the first loop, and the only\n // valid selection is anchorNode and focusNode both equal to this node\n // and both offsets 0, in which case we will have handled above.\n break outer;\n }\n if (parentNode === anchorNode && ++indexWithinAnchor === anchorOffset) {\n start = length;\n }\n if (parentNode === focusNode && ++indexWithinFocus === focusOffset) {\n end = length;\n }\n if ((next = node.nextSibling) !== null) {\n break;\n }\n node = parentNode;\n parentNode = node.parentNode;\n }\n\n // Moving from `node` to its next sibling `next`.\n node = next;\n }\n\n if (start === -1 || end === -1) {\n // This should never happen. (Would happen if the anchor/focus nodes aren't\n // actually inside the passed-in node.)\n return null;\n }\n\n return {\n start: start,\n end: end\n };\n}\n\n/**\n * In modern non-IE browsers, we can support both forward and backward\n * selections.\n *\n * Note: IE10+ supports the Selection object, but it does not support\n * the `extend` method, which means that even in modern IE, it's not possible\n * to programmatically create a backward selection. Thus, for all IE\n * versions, we use the old IE API to create our selections.\n *\n * @param {DOMElement|DOMTextNode} node\n * @param {object} offsets\n */\nfunction setOffsets(node, offsets) {\n var doc = node.ownerDocument || document;\n var win = doc && doc.defaultView || window;\n\n // Edge fails with \"Object expected\" in some scenarios.\n // (For instance: TinyMCE editor used in a list component that supports pasting to add more,\n // fails when pasting 100+ items)\n if (!win.getSelection) {\n return;\n }\n\n var selection = win.getSelection();\n var length = node.textContent.length;\n var start = Math.min(offsets.start, length);\n var end = offsets.end === undefined ? start : Math.min(offsets.end, length);\n\n // IE 11 uses modern selection, but doesn't support the extend method.\n // Flip backward selections, so we can set with a single range.\n if (!selection.extend && start > end) {\n var temp = end;\n end = start;\n start = temp;\n }\n\n var startMarker = getNodeForCharacterOffset(node, start);\n var endMarker = getNodeForCharacterOffset(node, end);\n\n if (startMarker && endMarker) {\n if (selection.rangeCount === 1 && selection.anchorNode === startMarker.node && selection.anchorOffset === startMarker.offset && selection.focusNode === endMarker.node && selection.focusOffset === endMarker.offset) {\n return;\n }\n var range = doc.createRange();\n range.setStart(startMarker.node, startMarker.offset);\n selection.removeAllRanges();\n\n if (start > end) {\n selection.addRange(range);\n selection.extend(endMarker.node, endMarker.offset);\n } else {\n range.setEnd(endMarker.node, endMarker.offset);\n selection.addRange(range);\n }\n }\n}\n\nfunction isTextNode(node) {\n return node && node.nodeType === TEXT_NODE;\n}\n\nfunction containsNode(outerNode, innerNode) {\n if (!outerNode || !innerNode) {\n return false;\n } else if (outerNode === innerNode) {\n return true;\n } else if (isTextNode(outerNode)) {\n return false;\n } else if (isTextNode(innerNode)) {\n return containsNode(outerNode, innerNode.parentNode);\n } else if ('contains' in outerNode) {\n return outerNode.contains(innerNode);\n } else if (outerNode.compareDocumentPosition) {\n return !!(outerNode.compareDocumentPosition(innerNode) & 16);\n } else {\n return false;\n }\n}\n\nfunction isInDocument(node) {\n return node && node.ownerDocument && containsNode(node.ownerDocument.documentElement, node);\n}\n\nfunction isSameOriginFrame(iframe) {\n try {\n // Accessing the contentDocument of a HTMLIframeElement can cause the browser\n // to throw, e.g. if it has a cross-origin src attribute.\n // Safari will show an error in the console when the access results in \"Blocked a frame with origin\". e.g:\n // iframe.contentDocument.defaultView;\n // A safety way is to access one of the cross origin properties: Window or Location\n // Which might result in \"SecurityError\" DOM Exception and it is compatible to Safari.\n // https://html.spec.whatwg.org/multipage/browsers.html#integration-with-idl\n\n return typeof iframe.contentWindow.location.href === 'string';\n } catch (err) {\n return false;\n }\n}\n\nfunction getActiveElementDeep() {\n var win = window;\n var element = getActiveElement();\n while (element instanceof win.HTMLIFrameElement) {\n if (isSameOriginFrame(element)) {\n win = element.contentWindow;\n } else {\n return element;\n }\n element = getActiveElement(win.document);\n }\n return element;\n}\n\n/**\n * @ReactInputSelection: React input selection module. Based on Selection.js,\n * but modified to be suitable for react and has a couple of bug fixes (doesn't\n * assume buttons have range selections allowed).\n * Input selection module for React.\n */\n\n/**\n * @hasSelectionCapabilities: we get the element types that support selection\n * from https://html.spec.whatwg.org/#do-not-apply, looking at `selectionStart`\n * and `selectionEnd` rows.\n */\nfunction hasSelectionCapabilities(elem) {\n var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();\n return nodeName && (nodeName === 'input' && (elem.type === 'text' || elem.type === 'search' || elem.type === 'tel' || elem.type === 'url' || elem.type === 'password') || nodeName === 'textarea' || elem.contentEditable === 'true');\n}\n\nfunction getSelectionInformation() {\n var focusedElem = getActiveElementDeep();\n return {\n focusedElem: focusedElem,\n selectionRange: hasSelectionCapabilities(focusedElem) ? getSelection$1(focusedElem) : null\n };\n}\n\n/**\n * @restoreSelection: If any selection information was potentially lost,\n * restore it. This is useful when performing operations that could remove dom\n * nodes and place them back in, resulting in focus being lost.\n */\nfunction restoreSelection(priorSelectionInformation) {\n var curFocusedElem = getActiveElementDeep();\n var priorFocusedElem = priorSelectionInformation.focusedElem;\n var priorSelectionRange = priorSelectionInformation.selectionRange;\n if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) {\n if (priorSelectionRange !== null && hasSelectionCapabilities(priorFocusedElem)) {\n setSelection(priorFocusedElem, priorSelectionRange);\n }\n\n // Focusing a node can change the scroll position, which is undesirable\n var ancestors = [];\n var ancestor = priorFocusedElem;\n while (ancestor = ancestor.parentNode) {\n if (ancestor.nodeType === ELEMENT_NODE) {\n ancestors.push({\n element: ancestor,\n left: ancestor.scrollLeft,\n top: ancestor.scrollTop\n });\n }\n }\n\n if (typeof priorFocusedElem.focus === 'function') {\n priorFocusedElem.focus();\n }\n\n for (var i = 0; i < ancestors.length; i++) {\n var info = ancestors[i];\n info.element.scrollLeft = info.left;\n info.element.scrollTop = info.top;\n }\n }\n}\n\n/**\n * @getSelection: Gets the selection bounds of a focused textarea, input or\n * contentEditable node.\n * -@input: Look up selection bounds of this input\n * -@return {start: selectionStart, end: selectionEnd}\n */\nfunction getSelection$1(input) {\n var selection = void 0;\n\n if ('selectionStart' in input) {\n // Modern browser with input or textarea.\n selection = {\n start: input.selectionStart,\n end: input.selectionEnd\n };\n } else {\n // Content editable or old IE textarea.\n selection = getOffsets(input);\n }\n\n return selection || { start: 0, end: 0 };\n}\n\n/**\n * @setSelection: Sets the selection bounds of a textarea or input and focuses\n * the input.\n * -@input Set selection bounds of this input or textarea\n * -@offsets Object of same form that is returned from get*\n */\nfunction setSelection(input, offsets) {\n var start = offsets.start,\n end = offsets.end;\n\n if (end === undefined) {\n end = start;\n }\n\n if ('selectionStart' in input) {\n input.selectionStart = start;\n input.selectionEnd = Math.min(end, input.value.length);\n } else {\n setOffsets(input, offsets);\n }\n}\n\nvar skipSelectionChangeEvent = canUseDOM && 'documentMode' in document && document.documentMode <= 11;\n\nvar eventTypes$3 = {\n select: {\n phasedRegistrationNames: {\n bubbled: 'onSelect',\n captured: 'onSelectCapture'\n },\n dependencies: [TOP_BLUR, TOP_CONTEXT_MENU, TOP_DRAG_END, TOP_FOCUS, TOP_KEY_DOWN, TOP_KEY_UP, TOP_MOUSE_DOWN, TOP_MOUSE_UP, TOP_SELECTION_CHANGE]\n }\n};\n\nvar activeElement$1 = null;\nvar activeElementInst$1 = null;\nvar lastSelection = null;\nvar mouseDown = false;\n\n/**\n * Get an object which is a unique representation of the current selection.\n *\n * The return value will not be consistent across nodes or browsers, but\n * two identical selections on the same node will return identical objects.\n *\n * @param {DOMElement} node\n * @return {object}\n */\nfunction getSelection(node) {\n if ('selectionStart' in node && hasSelectionCapabilities(node)) {\n return {\n start: node.selectionStart,\n end: node.selectionEnd\n };\n } else {\n var win = node.ownerDocument && node.ownerDocument.defaultView || window;\n var selection = win.getSelection();\n return {\n anchorNode: selection.anchorNode,\n anchorOffset: selection.anchorOffset,\n focusNode: selection.focusNode,\n focusOffset: selection.focusOffset\n };\n }\n}\n\n/**\n * Get document associated with the event target.\n *\n * @param {object} nativeEventTarget\n * @return {Document}\n */\nfunction getEventTargetDocument(eventTarget) {\n return eventTarget.window === eventTarget ? eventTarget.document : eventTarget.nodeType === DOCUMENT_NODE ? eventTarget : eventTarget.ownerDocument;\n}\n\n/**\n * Poll selection to see whether it's changed.\n *\n * @param {object} nativeEvent\n * @param {object} nativeEventTarget\n * @return {?SyntheticEvent}\n */\nfunction constructSelectEvent(nativeEvent, nativeEventTarget) {\n // Ensure we have the right element, and that the user is not dragging a\n // selection (this matches native `select` event behavior). In HTML5, select\n // fires only on input and textarea thus if there's no focused element we\n // won't dispatch.\n var doc = getEventTargetDocument(nativeEventTarget);\n\n if (mouseDown || activeElement$1 == null || activeElement$1 !== getActiveElement(doc)) {\n return null;\n }\n\n // Only fire when selection has actually changed.\n var currentSelection = getSelection(activeElement$1);\n if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {\n lastSelection = currentSelection;\n\n var syntheticEvent = SyntheticEvent.getPooled(eventTypes$3.select, activeElementInst$1, nativeEvent, nativeEventTarget);\n\n syntheticEvent.type = 'select';\n syntheticEvent.target = activeElement$1;\n\n accumulateTwoPhaseDispatches(syntheticEvent);\n\n return syntheticEvent;\n }\n\n return null;\n}\n\n/**\n * This plugin creates an `onSelect` event that normalizes select events\n * across form elements.\n *\n * Supported elements are:\n * - input (see `isTextInputElement`)\n * - textarea\n * - contentEditable\n *\n * This differs from native browser implementations in the following ways:\n * - Fires on contentEditable fields as well as inputs.\n * - Fires for collapsed selection.\n * - Fires after user input.\n */\nvar SelectEventPlugin = {\n eventTypes: eventTypes$3,\n\n extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n var doc = getEventTargetDocument(nativeEventTarget);\n // Track whether all listeners exists for this plugin. If none exist, we do\n // not extract events. See #3639.\n if (!doc || !isListeningToAllDependencies('onSelect', doc)) {\n return null;\n }\n\n var targetNode = targetInst ? getNodeFromInstance$1(targetInst) : window;\n\n switch (topLevelType) {\n // Track the input node that has focus.\n case TOP_FOCUS:\n if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') {\n activeElement$1 = targetNode;\n activeElementInst$1 = targetInst;\n lastSelection = null;\n }\n break;\n case TOP_BLUR:\n activeElement$1 = null;\n activeElementInst$1 = null;\n lastSelection = null;\n break;\n // Don't fire the event while the user is dragging. This matches the\n // semantics of the native select event.\n case TOP_MOUSE_DOWN:\n mouseDown = true;\n break;\n case TOP_CONTEXT_MENU:\n case TOP_MOUSE_UP:\n case TOP_DRAG_END:\n mouseDown = false;\n return constructSelectEvent(nativeEvent, nativeEventTarget);\n // Chrome and IE fire non-standard event when selection is changed (and\n // sometimes when it hasn't). IE's event fires out of order with respect\n // to key and input events on deletion, so we discard it.\n //\n // Firefox doesn't support selectionchange, so check selection status\n // after each key entry. The selection changes after keydown and before\n // keyup, but we check on keydown as well in the case of holding down a\n // key, when multiple keydown events are fired but only one keyup is.\n // This is also our approach for IE handling, for the reason above.\n case TOP_SELECTION_CHANGE:\n if (skipSelectionChangeEvent) {\n break;\n }\n // falls through\n case TOP_KEY_DOWN:\n case TOP_KEY_UP:\n return constructSelectEvent(nativeEvent, nativeEventTarget);\n }\n\n return null;\n }\n};\n\n/**\n * Inject modules for resolving DOM hierarchy and plugin ordering.\n */\ninjection.injectEventPluginOrder(DOMEventPluginOrder);\nsetComponentTree(getFiberCurrentPropsFromNode$1, getInstanceFromNode$1, getNodeFromInstance$1);\n\n/**\n * Some important event plugins included by default (without having to require\n * them).\n */\ninjection.injectEventPluginsByName({\n SimpleEventPlugin: SimpleEventPlugin,\n EnterLeaveEventPlugin: EnterLeaveEventPlugin,\n ChangeEventPlugin: ChangeEventPlugin,\n SelectEventPlugin: SelectEventPlugin,\n BeforeInputEventPlugin: BeforeInputEventPlugin\n});\n\nvar didWarnSelectedSetOnOption = false;\nvar didWarnInvalidChild = false;\n\nfunction flattenChildren(children) {\n var content = '';\n\n // Flatten children. We'll warn if they are invalid\n // during validateProps() which runs for hydration too.\n // Note that this would throw on non-element objects.\n // Elements are stringified (which is normally irrelevant\n // but matters for ).\n React.Children.forEach(children, function (child) {\n if (child == null) {\n return;\n }\n content += child;\n // Note: we don't warn about invalid children here.\n // Instead, this is done separately below so that\n // it happens during the hydration codepath too.\n });\n\n return content;\n}\n\n/**\n * Implements an