From a287730cdd52684d3774b8b159d6b2f3a798016f Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Fri, 1 Mar 2024 01:19:05 +0000 Subject: [PATCH 1/5] Blockify everything, prefering HTML+blocks rather than patterns. --- .../client/components/_plugin-card.scss | 1 + .../pub/wporg-plugins-2024/functions.php | 5 +- .../themes/pub/wporg-plugins-2024/index.php | 49 - .../blocks/missing-template-tag/block.json | 28 + .../blocks/missing-template-tag}/index.php | 4 +- .../blocks/missing-template-tag/render.php | 13 + .../js/build/blocks/plugin-card/block.json | 20 + .../js/build/blocks/plugin-card/index.php | 32 + .../js/build/blocks/plugin-card/render.php | 2 + .../js/build/theme.asset.php | 2 +- .../pub/wporg-plugins-2024/js/build/theme.js | 1802 ++++++++++++++++- .../src/blocks/archive-page/render.php | 40 - .../blocks/missing-template-tag/block.json | 25 + .../index.js | 0 .../index.php | 4 +- .../blocks/missing-template-tag/render.php | 13 + .../{archive-page => plugin-card}/block.json | 9 +- .../{search-page => plugin-card}/index.js | 0 .../src/blocks/plugin-card/index.php | 32 + .../src/blocks/plugin-card/render.php | 2 + .../src/blocks/search-page/block.json | 17 - .../src/blocks/search-page/render.php | 38 - .../template-parts/plugin.php | 82 +- .../wporg-plugins-2024/templates/archive.html | 19 +- .../wporg-plugins-2024/templates/search.html | 17 +- 25 files changed, 2046 insertions(+), 210 deletions(-) create mode 100644 wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/js/build/blocks/missing-template-tag/block.json rename wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/{src/blocks/search-page => js/build/blocks/missing-template-tag}/index.php (76%) create mode 100644 wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/js/build/blocks/missing-template-tag/render.php create mode 100644 wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/js/build/blocks/plugin-card/block.json create mode 100644 wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/js/build/blocks/plugin-card/index.php create mode 100644 wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/js/build/blocks/plugin-card/render.php delete mode 100644 wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/archive-page/render.php create mode 100644 wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/missing-template-tag/block.json rename wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/{archive-page => missing-template-tag}/index.js (100%) rename wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/{archive-page => missing-template-tag}/index.php (76%) create mode 100644 wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/missing-template-tag/render.php rename wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/{archive-page => plugin-card}/block.json (63%) rename wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/{search-page => plugin-card}/index.js (100%) create mode 100644 wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/plugin-card/index.php create mode 100644 wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/plugin-card/render.php delete mode 100644 wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/search-page/block.json delete mode 100644 wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/search-page/render.php diff --git a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/client/components/_plugin-card.scss b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/client/components/_plugin-card.scss index aa0c577168..a72b14991d 100644 --- a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/client/components/_plugin-card.scss +++ b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/client/components/_plugin-card.scss @@ -1,6 +1,7 @@ .plugin-card { background-color: #f9f9f9; margin-bottom: 4%; + margin-block-start: 0; padding: 15px 15px 8px; vertical-align: top; diff --git a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/functions.php b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/functions.php index 36f7591923..c983b5a338 100644 --- a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/functions.php +++ b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/functions.php @@ -14,11 +14,11 @@ // Block Files -require_once( __DIR__ . '/src/blocks/archive-page/index.php' ); require_once( __DIR__ . '/src/blocks/filter-bar/index.php' ); require_once( __DIR__ . '/src/blocks/front-page/index.php' ); -require_once( __DIR__ . '/src/blocks/search-page/index.php' ); require_once( __DIR__ . '/src/blocks/single-plugin/index.php' ); +require_once( __DIR__ . '/src/blocks/plugin-card/index.php' ); +require_once( __DIR__ . '/src/blocks/missing-template-tag/index.php' ); // Block Configs require_once( __DIR__ . '/inc/block-config.php' ); @@ -425,6 +425,7 @@ function strong_archive_title( $term ) { return '' . $term . ''; } add_action( 'wp_head', function() { + // TODO: This no longer fires, as it's rendered before `wp_head` when using blocks. add_filter( 'post_type_archive_title', __NAMESPACE__ . '\strong_archive_title' ); add_filter( 'single_term_title', __NAMESPACE__ . '\strong_archive_title' ); add_filter( 'single_cat_title', __NAMESPACE__ . '\strong_archive_title' ); diff --git a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/index.php b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/index.php index 4d5c0f15d2..e69de29bb2 100644 --- a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/index.php +++ b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/index.php @@ -1,49 +0,0 @@ - - -
- - -
-

-
- - -
- - array('react', 'wp-element'), 'version' => '43ab82ac4ef93561f4cc'); + array('react', 'wp-element'), 'version' => '4967f0d80ed01cf03524'); diff --git a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/js/build/theme.js b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/js/build/theme.js index eec5f01608..c33562db91 100644 --- a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/js/build/theme.js +++ b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/js/build/theme.js @@ -1 +1,1801 @@ -(()=>{var e={703:(e,t,s)=>{"use strict";var i=s(414);function n(){}function r(){}r.resetWarningCache=n,e.exports=function(){function e(e,t,s,n,r,a){if(a!==i){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var s={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:r,resetWarningCache:n};return s.PropTypes=s,s}},697:(e,t,s)=>{e.exports=s(703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},t={};function s(i){var n=t[i];if(void 0!==n)return n.exports;var r=t[i]={exports:{}};return e[i](r,r.exports,s),r.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var i in t)s.o(t,i)&&!s.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.React,t=window.wp.element;var i=s(697),n=s.n(i);function r(...e){const t=function(e,t){let s,i,n,r=null,a=0,l=function(){a=(new Date).getTime(),r=null,n=e.apply(s,i),r||(s=i=null)};return function(){let h=(new Date).getTime(),o=t-(h-a);return s=this,i=arguments,o<=0||o>t?(r&&(clearTimeout(r),r=null),a=h,n=e.apply(s,i),r||(s=i=null)):r||(r=setTimeout(l,o)),n}}(...e);return function(e){return e?(e.persist(),t(e)):t()}}class a extends React.Component{constructor(e){super(e),this.state={currentIndex:e.startIndex,thumbsTranslateX:0,offsetPercentage:0,galleryWidth:0,thumbnailWidth:0}}componentWillReceiveProps(e){this.props.disableArrowKeys!==e.disableArrowKeys&&(e.disableArrowKeys?window.removeEventListener("keydown",this._handleKeyDown):window.addEventListener("keydown",this._handleKeyDown))}componentDidUpdate(e,t){t.thumbnailWidth===this.state.thumbnailWidth&&e.showThumbnails===this.props.showThumbnails||this._setThumbsTranslateX(-this._getThumbsTranslateX(this.state.currentIndex>0?1:0)*this.state.currentIndex),t.currentIndex!==this.state.currentIndex&&this._updateThumbnailTranslateX(t)}componentWillMount(){this._slideLeft=r(this._slideLeft.bind(this),500,!0),this._slideRight=r(this._slideRight.bind(this),500,!0),this._handleResize=this._handleResize.bind(this),this._handleKeyDown=this._handleKeyDown.bind(this),this._thumbnailDelay=300}componentDidMount(){window.setTimeout((()=>this._handleResize()),500),this.props.disableArrowKeys||window.addEventListener("keydown",this._handleKeyDown),window.addEventListener("resize",this._handleResize)}componentWillUnmount(){this.props.disableArrowKeys||window.removeEventListener("keydown",this._handleKeyDown),window.removeEventListener("resize",this._handleResize),this._intervalId&&(window.clearInterval(this._intervalId),this._intervalId=null)}fullScreen(){const e=this._imageGallery;e.requestFullscreen?e.requestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen()}slideToIndex(e,t){t&&t.preventDefault();let s=this.props.items.length-1,i=e;e<0?i=s:e>s&&(i=0),this.setState({previousIndex:this.state.currentIndex,currentIndex:i,offsetPercentage:0,style:{transition:"transform 0.45s ease-out"}})}getCurrentIndex(){return this.state.currentIndex}_handleResize(){this._imageGallery&&this.setState({galleryWidth:this._imageGallery.offsetWidth}),this._imageGalleryThumbnail&&this.setState({thumbnailWidth:this._imageGalleryThumbnail.offsetWidth})}_handleKeyDown(e){switch(parseInt(e.keyCode||e.which||0)){case 37:this._canSlideLeft()&&!this._intervalId&&this._slideLeft();break;case 39:this._canSlideRight()&&!this._intervalId&&this._slideRight()}}_handleMouseOverThumbnails(e){this.props.slideOnThumbnailHover&&(this.setState({hovering:!0}),this._thumbnailTimer&&(window.clearTimeout(this._thumbnailTimer),this._thumbnailTimer=null),this._thumbnailTimer=window.setTimeout((()=>{this.slideToIndex(e)}),this._thumbnailDelay))}_handleMouseLeaveThumbnails(){this._thumbnailTimer&&(window.clearTimeout(this._thumbnailTimer),this._thumbnailTimer=null),this.setState({hovering:!1})}_handleMouseOver(){this.setState({hovering:!0})}_handleMouseLeave(){this.setState({hovering:!1})}_handleImageError(e){this.props.defaultImage&&-1===e.target.src.indexOf(this.props.defaultImage)&&(e.target.src=this.props.defaultImage)}_canNavigate(){return this.props.items.length>=2}_canSlideLeft(){return this.props.infinite||this.state.currentIndex>0}_canSlideRight(){return this.props.infinite||this.state.currentIndex0&&(e.currentIndexthis.state.currentIndex&&this._setThumbsTranslateX(this.state.thumbsTranslateX+s))}}_setThumbsTranslateX(e){this.setState({thumbsTranslateX:e})}_getThumbsTranslateX(e){if(this.props.disableThumbnailScroll)return 0;const{thumbnailWidth:t}=this.state;if(this._thumbnails){if(this._thumbnails.scrollWidth<=t)return 0;let s=this._thumbnails.children.length;return e*((this._thumbnails.scrollWidth-t)/(s-1))}}_getAlignmentClassName(e){let{currentIndex:t}=this.state,s="";const i="left",n="right";switch(e){case t-1:s=` ${i}`;break;case t:s=" center";break;case t+1:s=` ${n}`}return this.props.items.length>=3&&this.props.infinite&&(0===e&&t===this.props.items.length-1?s=` ${n}`:e===this.props.items.length-1&&0===t&&(s=` ${i}`)),s}_getTranslateXForTwoSlide(e){const{currentIndex:t,offsetPercentage:s,previousIndex:i}=this.state;let n=-100*t+100*e+s;return s>0?this.direction="left":s<0&&(this.direction="right"),0===t&&1===e&&s>0?n=-100+s:1===t&&0===e&&s<0&&(n=100+s),t!==i?0===i&&0===e&&0===s&&"left"===this.direction?n=100:1===i&&1===e&&0===s&&"right"===this.direction&&(n=-100):0===t&&1===e&&0===s&&"left"===this.direction?n=-100:1===t&&0===e&&0===s&&"right"===this.direction&&(n=100),n}_getSlideStyle(e){const{currentIndex:t,offsetPercentage:s}=this.state,{infinite:i,items:n}=this.props,r=-100*t,a=n.length-1;let l=r+100*e+s,h=1;e===t?h=3:e===this.state.previousIndex&&(h=2),i&&n.length>2&&(0===t&&e===a?l=-100+s:t===a&&0===e&&(l=100+s)),i&&2===n.length&&(l=this._getTranslateXForTwoSlide(e));const o=`translate3d(${l}%, 0, 0)`;return{WebkitTransform:o,MozTransform:o,msTransform:o,OTransform:o,transform:o,zIndex:h}}_getThumbnailStyle(){const e=`translate3d(${this.state.thumbsTranslateX}px, 0, 0)`;return{WebkitTransform:e,MozTransform:e,msTransform:e,OTransform:e,transform:e}}_slideLeft(e){this.slideToIndex(this.state.currentIndex-1,e)}_slideRight(e){this.slideToIndex(this.state.currentIndex+1,e)}_renderItem(t){return(0,e.createElement)("figure",{className:"image-gallery-image"},(0,e.createElement)("a",{href:t.original},(0,e.createElement)("img",{src:t.original,alt:t.originalAlt,srcSet:t.srcSet,sizes:t.sizes,onLoad:this.props.onImageLoad,onError:this._handleImageError.bind(this)})),t.description&&(0,e.createElement)("figcaption",{className:"image-gallery-description"},t.description))}render(){const{currentIndex:t}=this.state,s=this._getThumbnailStyle(),i=this._slideLeft.bind(this),n=this._slideRight.bind(this);let r=[],a=[];return this.props.items.map(((s,i)=>{const n=this._getAlignmentClassName(i),l=s.originalClass?` ${s.originalClass}`:"",h=s.thumbnailClass?` ${s.thumbnailClass}`:"",o=s.renderItem||this.props.renderItem||this._renderItem.bind(this),d=(0,e.createElement)("div",{key:i,className:"image-gallery-slide"+n+l,style:Object.assign(this._getSlideStyle(i),this.state.style),onClick:this.props.onClick},o(s));this.props.lazyLoad?n&&r.push(d):r.push(d),a.push((0,e.createElement)("button",{type:"button",onMouseOver:this._handleMouseOverThumbnails.bind(this,i),onMouseLeave:this._handleMouseLeaveThumbnails.bind(this,i),key:i,className:"button-link image-gallery-thumbnail"+(t===i?" active":"")+h,onTouchStart:e=>this.slideToIndex.call(this,i,e),onClick:e=>this.slideToIndex.call(this,i,e)},(0,e.createElement)("img",{src:s.thumbnail,alt:s.thumbnailAlt,onError:this._handleImageError.bind(this)}),(0,e.createElement)("div",{className:"image-gallery-thumbnail-label"},s.thumbnailLabel)))})),(0,e.createElement)("section",{ref:e=>this._imageGallery=e,className:"image-gallery"},(0,e.createElement)("div",{onMouseOver:this._handleMouseOver.bind(this),onMouseLeave:this._handleMouseLeave.bind(this),className:"image-gallery-content"},this._canNavigate()?[this.props.showNav&&(0,e.createElement)("span",{key:"navigation"},this._canSlideLeft()&&(0,e.createElement)("button",{type:"button",className:"button-link image-gallery-left-nav",onClick:i}),this._canSlideRight()&&(0,e.createElement)("button",{type:"button",className:"button-link image-gallery-right-nav",onClick:n})),(0,e.createElement)("div",{key:this.state.currentIndex,className:"image-gallery-slides"},r)]:(0,e.createElement)("div",{className:"image-gallery-slides"},r),this.props.showIndex&&(0,e.createElement)("div",{className:"image-gallery-index"},(0,e.createElement)("span",{className:"image-gallery-index-current"},this.state.currentIndex+1),(0,e.createElement)("span",{className:"image-gallery-index-separator"},this.props.indexSeparator),(0,e.createElement)("span",{className:"image-gallery-index-total"},this.props.items.length))),(0,e.createElement)("div",{className:"image-gallery-thumbnails",ref:e=>this._imageGalleryThumbnail=e},(0,e.createElement)("div",{ref:e=>this._thumbnails=e,className:"image-gallery-thumbnails-container",style:s},a)))}}a.propTypes={items:n().array.isRequired,showNav:n().bool,lazyLoad:n().bool,infinite:n().bool,showIndex:n().bool,showThumbnails:n().bool,slideOnThumbnailHover:n().bool,disableThumbnailScroll:n().bool,disableArrowKeys:n().bool,defaultImage:n().string,indexSeparator:n().string,startIndex:n().number,slideInterval:n().number,onClick:n().func,onImageLoad:n().func,onImageError:n().func,renderItem:n().func},a.defaultProps={items:[],showNav:!0,lazyLoad:!1,infinite:!0,showIndex:!1,showThumbnails:!0,slideOnThumbnailHover:!1,disableThumbnailScroll:!1,disableArrowKeys:!1,indexSeparator:" / ",startIndex:0,slideInterval:3e3};const l=({screenshots:t=[]})=>{if(!t)return null;const s=t.map((({caption:e,src:t})=>({original:t,originalAlt:"",thumbnail:t,thumbnailAlt:e||"",description:e||!1})));return(0,e.createElement)("div",{id:"screenshots",className:"plugin-screenshots"},(0,e.createElement)("h2",null,localeData.screenshots),(0,e.createElement)(a,{items:s}))};!function(s){const i=document.getElementById("screenshots");if(!i)return;const n=i.querySelectorAll("figure"),r=[];for(let e=0;e0&&(0,t.render)((0,e.createElement)(l,{screenshots:r}),i)}()})()})(); \ No newline at end of file +/******/ (() => { // webpackBootstrap +/******/ var __webpack_modules__ = ({ + +/***/ "./client/screenshots/image-gallery.js": +/*!*********************************************!*\ + !*** ./client/screenshots/image-gallery.js ***! + \*********************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ ImageGallery) +/* harmony export */ }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); + + +const MIN_INTERVAL = 500; +function throttle(func, wait) { + let context, args, result; + let timeout = null; + let previous = 0; + let later = function () { + previous = new Date().getTime(); + timeout = null; + result = func.apply(context, args); + if (!timeout) { + context = args = null; + } + }; + return function () { + let now = new Date().getTime(); + let remaining = wait - (now - previous); + context = this; + args = arguments; + if (remaining <= 0 || remaining > wait) { + if (timeout) { + clearTimeout(timeout); + timeout = null; + } + previous = now; + result = func.apply(context, args); + if (!timeout) { + context = args = null; + } + } else if (!timeout) { + timeout = setTimeout(later, remaining); + } + return result; + }; +} + +// This is to handle accessing event properties in an asynchronous way +// https://facebook.github.io/react/docs/events.html#syntheticevent +function debounceEventHandler(...args) { + const throttled = throttle(...args); + return function (event) { + if (event) { + event.persist(); + return throttled(event); + } + return throttled(); + }; +} +class ImageGallery extends React.Component { + constructor(props) { + super(props); + this.state = { + currentIndex: props.startIndex, + thumbsTranslateX: 0, + offsetPercentage: 0, + galleryWidth: 0, + thumbnailWidth: 0 + }; + } + componentWillReceiveProps(nextProps) { + if (this.props.disableArrowKeys !== nextProps.disableArrowKeys) { + if (nextProps.disableArrowKeys) { + window.removeEventListener("keydown", this._handleKeyDown); + } else { + window.addEventListener("keydown", this._handleKeyDown); + } + } + } + componentDidUpdate(prevProps, prevState) { + if (prevState.thumbnailWidth !== this.state.thumbnailWidth || prevProps.showThumbnails !== this.props.showThumbnails) { + // Adjust thumbnail container when thumbnail width is adjusted. + this._setThumbsTranslateX(-this._getThumbsTranslateX(this.state.currentIndex > 0 ? 1 : 0) * this.state.currentIndex); + } + if (prevState.currentIndex !== this.state.currentIndex) { + this._updateThumbnailTranslateX(prevState); + } + } + componentWillMount() { + this._slideLeft = debounceEventHandler(this._slideLeft.bind(this), MIN_INTERVAL, true); + this._slideRight = debounceEventHandler(this._slideRight.bind(this), MIN_INTERVAL, true); + this._handleResize = this._handleResize.bind(this); + this._handleKeyDown = this._handleKeyDown.bind(this); + this._thumbnailDelay = 300; + } + componentDidMount() { + // / Delay initial resize to get the accurate this._imageGallery.offsetWidth. + window.setTimeout(() => this._handleResize(), 500); + if (!this.props.disableArrowKeys) { + window.addEventListener("keydown", this._handleKeyDown); + } + window.addEventListener("resize", this._handleResize); + } + componentWillUnmount() { + if (!this.props.disableArrowKeys) { + window.removeEventListener("keydown", this._handleKeyDown); + } + window.removeEventListener("resize", this._handleResize); + if (this._intervalId) { + window.clearInterval(this._intervalId); + this._intervalId = null; + } + } + fullScreen() { + const gallery = this._imageGallery; + if (gallery.requestFullscreen) { + gallery.requestFullscreen(); + } else if (gallery.msRequestFullscreen) { + gallery.msRequestFullscreen(); + } else if (gallery.mozRequestFullScreen) { + gallery.mozRequestFullScreen(); + } else if (gallery.webkitRequestFullscreen) { + gallery.webkitRequestFullscreen(); + } + } + slideToIndex(index, event) { + if (event) { + event.preventDefault(); + } + let slideCount = this.props.items.length - 1; + let currentIndex = index; + if (index < 0) { + currentIndex = slideCount; + } else if (index > slideCount) { + currentIndex = 0; + } + this.setState({ + previousIndex: this.state.currentIndex, + currentIndex: currentIndex, + offsetPercentage: 0, + style: { + transition: "transform 0.45s ease-out" + } + }); + } + getCurrentIndex() { + return this.state.currentIndex; + } + _handleResize() { + if (this._imageGallery) { + this.setState({ + galleryWidth: this._imageGallery.offsetWidth + }); + } + if (this._imageGalleryThumbnail) { + this.setState({ + thumbnailWidth: this._imageGalleryThumbnail.offsetWidth + }); + } + } + _handleKeyDown(event) { + const LEFT_ARROW = 37; + const RIGHT_ARROW = 39; + const key = parseInt(event.keyCode || event.which || 0); + switch (key) { + case LEFT_ARROW: + if (this._canSlideLeft() && !this._intervalId) { + this._slideLeft(); + } + break; + case RIGHT_ARROW: + if (this._canSlideRight() && !this._intervalId) { + this._slideRight(); + } + break; + } + } + _handleMouseOverThumbnails(index) { + if (this.props.slideOnThumbnailHover) { + this.setState({ + hovering: true + }); + if (this._thumbnailTimer) { + window.clearTimeout(this._thumbnailTimer); + this._thumbnailTimer = null; + } + this._thumbnailTimer = window.setTimeout(() => { + this.slideToIndex(index); + }, this._thumbnailDelay); + } + } + _handleMouseLeaveThumbnails() { + if (this._thumbnailTimer) { + window.clearTimeout(this._thumbnailTimer); + this._thumbnailTimer = null; + } + this.setState({ + hovering: false + }); + } + _handleMouseOver() { + this.setState({ + hovering: true + }); + } + _handleMouseLeave() { + this.setState({ + hovering: false + }); + } + _handleImageError(event) { + if (this.props.defaultImage && -1 === event.target.src.indexOf(this.props.defaultImage)) { + event.target.src = this.props.defaultImage; + } + } + _canNavigate() { + return this.props.items.length >= 2; + } + _canSlideLeft() { + return this.props.infinite || this.state.currentIndex > 0; + } + _canSlideRight() { + return this.props.infinite || this.state.currentIndex < this.props.items.length - 1; + } + _updateThumbnailTranslateX(prevState) { + if (this.state.currentIndex === 0) { + this._setThumbsTranslateX(0); + } else { + let indexDifference = Math.abs(prevState.currentIndex - this.state.currentIndex); + let scrollX = this._getThumbsTranslateX(indexDifference); + if (scrollX > 0) { + if (prevState.currentIndex < this.state.currentIndex) { + this._setThumbsTranslateX(this.state.thumbsTranslateX - scrollX); + } else if (prevState.currentIndex > this.state.currentIndex) { + this._setThumbsTranslateX(this.state.thumbsTranslateX + scrollX); + } + } + } + } + _setThumbsTranslateX(thumbsTranslateX) { + this.setState({ + thumbsTranslateX + }); + } + _getThumbsTranslateX(indexDifference) { + if (this.props.disableThumbnailScroll) { + return 0; + } + const { + thumbnailWidth + } = this.state; + if (this._thumbnails) { + if (this._thumbnails.scrollWidth <= thumbnailWidth) { + return 0; + } + let totalThumbnails = this._thumbnails.children.length; + // Total scroll-x required to see the last thumbnail. + let totalScrollX = this._thumbnails.scrollWidth - thumbnailWidth; + // Scroll-x required per index change. + let perIndexScrollX = totalScrollX / (totalThumbnails - 1); + return indexDifference * perIndexScrollX; + } + } + _getAlignmentClassName(index) { + // LEFT, and RIGHT alignments are necessary for lazyLoad. + let { + currentIndex + } = this.state; + let alignment = ""; + const LEFT = "left"; + const CENTER = "center"; + const RIGHT = "right"; + switch (index) { + case currentIndex - 1: + alignment = ` ${LEFT}`; + break; + case currentIndex: + alignment = ` ${CENTER}`; + break; + case currentIndex + 1: + alignment = ` ${RIGHT}`; + break; + } + if (this.props.items.length >= 3 && this.props.infinite) { + if (index === 0 && currentIndex === this.props.items.length - 1) { + // Set first slide as right slide if were sliding right from last slide. + alignment = ` ${RIGHT}`; + } else if (index === this.props.items.length - 1 && currentIndex === 0) { + // Set last slide as left slide if were sliding left from first slide. + alignment = ` ${LEFT}`; + } + } + return alignment; + } + _getTranslateXForTwoSlide(index) { + // For taking care of infinite swipe when there are only two slides. + const { + currentIndex, + offsetPercentage, + previousIndex + } = this.state; + const baseTranslateX = -100 * currentIndex; + let translateX = baseTranslateX + index * 100 + offsetPercentage; + + // Keep track of user swiping direction. + if (offsetPercentage > 0) { + this.direction = 'left'; + } else if (offsetPercentage < 0) { + this.direction = 'right'; + } + + // when swiping make sure the slides are on the correct side + if (currentIndex === 0 && index === 1 && offsetPercentage > 0) { + translateX = -100 + offsetPercentage; + } else if (currentIndex === 1 && index === 0 && offsetPercentage < 0) { + translateX = 100 + offsetPercentage; + } + if (currentIndex !== previousIndex) { + // When swiped move the slide to the correct side. + if (0 === previousIndex && 0 === index && 0 === offsetPercentage && 'left' === this.direction) { + translateX = 100; + } else if (1 === previousIndex && 1 === index && 0 === offsetPercentage && 'right' === this.direction) { + translateX = -100; + } + } else { + // Keep the slide on the correct slide even when not a swipe. + if (0 === currentIndex && 1 === index && 0 === offsetPercentage && 'left' === this.direction) { + translateX = -100; + } else if (1 === currentIndex && 0 === index && 0 === offsetPercentage && 'right' === this.direction) { + translateX = 100; + } + } + return translateX; + } + _getSlideStyle(index) { + const { + currentIndex, + offsetPercentage + } = this.state; + const { + infinite, + items + } = this.props; + const baseTranslateX = -100 * currentIndex; + const totalSlides = items.length - 1; + + // calculates where the other slides belong based on currentIndex + let translateX = baseTranslateX + index * 100 + offsetPercentage; + + // adjust zIndex so that only the current slide and the slide were going + // to is at the top layer, this prevents transitions from flying in the + // background when swiping before the first slide or beyond the last slide + let zIndex = 1; + if (index === currentIndex) { + zIndex = 3; + } else if (index === this.state.previousIndex) { + zIndex = 2; + } + if (infinite && items.length > 2) { + if (currentIndex === 0 && index === totalSlides) { + // make the last slide the slide before the first + translateX = -100 + offsetPercentage; + } else if (currentIndex === totalSlides && index === 0) { + // make the first slide the slide after the last + translateX = 100 + offsetPercentage; + } + } + + // Special case when there are only 2 items with infinite on + if (infinite && items.length === 2) { + translateX = this._getTranslateXForTwoSlide(index); + } + const translate3d = `translate3d(${translateX}%, 0, 0)`; + return { + WebkitTransform: translate3d, + MozTransform: translate3d, + msTransform: translate3d, + OTransform: translate3d, + transform: translate3d, + zIndex: zIndex + }; + } + _getThumbnailStyle() { + const translate3d = `translate3d(${this.state.thumbsTranslateX}px, 0, 0)`; + return { + WebkitTransform: translate3d, + MozTransform: translate3d, + msTransform: translate3d, + OTransform: translate3d, + transform: translate3d + }; + } + _slideLeft(event) { + this.slideToIndex(this.state.currentIndex - 1, event); + } + _slideRight(event) { + this.slideToIndex(this.state.currentIndex + 1, event); + } + _renderItem(item) { + return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("figure", { + className: "image-gallery-image" + }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", { + href: item.original + }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", { + src: item.original, + alt: item.originalAlt, + srcSet: item.srcSet, + sizes: item.sizes, + onLoad: this.props.onImageLoad, + onError: this._handleImageError.bind(this) + })), item.description && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("figcaption", { + className: "image-gallery-description" + }, item.description)); + } + render() { + const { + currentIndex + } = this.state; + const thumbnailStyle = this._getThumbnailStyle(); + const slideLeft = this._slideLeft.bind(this); + const slideRight = this._slideRight.bind(this); + let slides = []; + let thumbnails = []; + this.props.items.map((item, index) => { + const alignment = this._getAlignmentClassName(index); + const originalClass = item.originalClass ? ` ${item.originalClass}` : ''; + const thumbnailClass = item.thumbnailClass ? ` ${item.thumbnailClass}` : ''; + const renderItem = item.renderItem || this.props.renderItem || this._renderItem.bind(this); + const slide = (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { + key: index, + className: 'image-gallery-slide' + alignment + originalClass, + style: Object.assign(this._getSlideStyle(index), this.state.style), + onClick: this.props.onClick + }, renderItem(item)); + if (this.props.lazyLoad) { + if (alignment) { + slides.push(slide); + } + } else { + slides.push(slide); + } + thumbnails.push((0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", { + type: "button", + onMouseOver: this._handleMouseOverThumbnails.bind(this, index), + onMouseLeave: this._handleMouseLeaveThumbnails.bind(this, index), + key: index, + className: 'button-link image-gallery-thumbnail' + (currentIndex === index ? ' active' : '') + thumbnailClass, + onTouchStart: event => this.slideToIndex.call(this, index, event), + onClick: event => this.slideToIndex.call(this, index, event) + }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", { + src: item.thumbnail, + alt: item.thumbnailAlt, + onError: this._handleImageError.bind(this) + }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { + className: "image-gallery-thumbnail-label" + }, item.thumbnailLabel))); + }); + return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("section", { + ref: i => this._imageGallery = i, + className: "image-gallery" + }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { + onMouseOver: this._handleMouseOver.bind(this), + onMouseLeave: this._handleMouseLeave.bind(this), + className: "image-gallery-content" + }, this._canNavigate() ? [this.props.showNav && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { + key: "navigation" + }, this._canSlideLeft() && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", { + type: "button", + className: "button-link image-gallery-left-nav", + onClick: slideLeft + }), this._canSlideRight() && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", { + type: "button", + className: "button-link image-gallery-right-nav", + onClick: slideRight + })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { + key: this.state.currentIndex, + className: "image-gallery-slides" + }, slides)] : (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { + className: "image-gallery-slides" + }, slides), this.props.showIndex && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { + className: "image-gallery-index" + }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { + className: "image-gallery-index-current" + }, this.state.currentIndex + 1), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { + className: "image-gallery-index-separator" + }, this.props.indexSeparator), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { + className: "image-gallery-index-total" + }, this.props.items.length))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { + className: "image-gallery-thumbnails", + ref: i => this._imageGalleryThumbnail = i + }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { + ref: t => this._thumbnails = t, + className: "image-gallery-thumbnails-container", + style: thumbnailStyle + }, thumbnails))); + } +} +ImageGallery.propTypes = { + items: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().array.isRequired), + showNav: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool), + lazyLoad: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool), + infinite: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool), + showIndex: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool), + showThumbnails: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool), + slideOnThumbnailHover: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool), + disableThumbnailScroll: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool), + disableArrowKeys: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool), + defaultImage: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string), + indexSeparator: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string), + startIndex: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().number), + slideInterval: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().number), + onClick: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func), + onImageLoad: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func), + onImageError: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func), + renderItem: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func) +}; +ImageGallery.defaultProps = { + items: [], + showNav: true, + lazyLoad: false, + infinite: true, + showIndex: false, + showThumbnails: true, + slideOnThumbnailHover: false, + disableThumbnailScroll: false, + disableArrowKeys: false, + indexSeparator: " / ", + startIndex: 0, + slideInterval: 3000 +}; + +/***/ }), + +/***/ "./client/screenshots/index.js": +/*!*************************************!*\ + !*** ./client/screenshots/index.js ***! + \*************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "Screenshots": () => (/* binding */ Screenshots), +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _image_gallery__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./image-gallery */ "./client/screenshots/image-gallery.js"); + +/* global localeData */ +/** + * Internal dependencies. + */ + +const Screenshots = ({ + screenshots = [] +}) => { + if (!screenshots) { + return null; + } + const items = screenshots.map(({ + caption, + src + }) => ({ + original: src, + originalAlt: '', + thumbnail: src, + thumbnailAlt: caption || '', + description: caption || false + })); + return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { + id: "screenshots", + className: "plugin-screenshots" + }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h2", null, localeData.screenshots), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_image_gallery__WEBPACK_IMPORTED_MODULE_1__["default"], { + items: items + })); +}; +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Screenshots); + +/***/ }), + +/***/ "./node_modules/object-assign/index.js": +/*!*********************************************!*\ + !*** ./node_modules/object-assign/index.js ***! + \*********************************************/ +/***/ ((module) => { + +"use strict"; +/* +object-assign +(c) Sindre Sorhus +@license MIT +*/ + + +/* eslint-disable no-unused-vars */ +var getOwnPropertySymbols = Object.getOwnPropertySymbols; +var hasOwnProperty = Object.prototype.hasOwnProperty; +var propIsEnumerable = Object.prototype.propertyIsEnumerable; + +function toObject(val) { + if (val === null || val === undefined) { + throw new TypeError('Object.assign cannot be called with null or undefined'); + } + + return Object(val); +} + +function shouldUseNative() { + try { + if (!Object.assign) { + return false; + } + + // Detect buggy property enumeration order in older V8 versions. + + // https://bugs.chromium.org/p/v8/issues/detail?id=4118 + var test1 = new String('abc'); // eslint-disable-line no-new-wrappers + test1[5] = 'de'; + if (Object.getOwnPropertyNames(test1)[0] === '5') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test2 = {}; + for (var i = 0; i < 10; i++) { + test2['_' + String.fromCharCode(i)] = i; + } + var order2 = Object.getOwnPropertyNames(test2).map(function (n) { + return test2[n]; + }); + if (order2.join('') !== '0123456789') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test3 = {}; + 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { + test3[letter] = letter; + }); + if (Object.keys(Object.assign({}, test3)).join('') !== + 'abcdefghijklmnopqrst') { + return false; + } + + return true; + } catch (err) { + // We don't expect any of the above to throw, but better to be safe. + return false; + } +} + +module.exports = shouldUseNative() ? Object.assign : function (target, source) { + var from; + var to = toObject(target); + var symbols; + + for (var s = 1; s < arguments.length; s++) { + from = Object(arguments[s]); + + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } + + if (getOwnPropertySymbols) { + symbols = getOwnPropertySymbols(from); + for (var i = 0; i < symbols.length; i++) { + if (propIsEnumerable.call(from, symbols[i])) { + to[symbols[i]] = from[symbols[i]]; + } + } + } + } + + return to; +}; + + +/***/ }), + +/***/ "./node_modules/prop-types/checkPropTypes.js": +/*!***************************************************!*\ + !*** ./node_modules/prop-types/checkPropTypes.js ***! + \***************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + + +var printWarning = function() {}; + +if (true) { + var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/prop-types/lib/ReactPropTypesSecret.js"); + var loggedTypeFailures = {}; + var has = Function.call.bind(Object.prototype.hasOwnProperty); + + printWarning = function(text) { + var message = 'Warning: ' + text; + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; +} + +/** + * Assert that the values match with the type specs. + * Error messages are memorized and will only be shown once. + * + * @param {object} typeSpecs Map of name to a ReactPropType + * @param {object} values Runtime values that need to be type-checked + * @param {string} location e.g. "prop", "context", "child context" + * @param {string} componentName Name of the component for error messages. + * @param {?Function} getStack Returns the component stack. + * @private + */ +function checkPropTypes(typeSpecs, values, location, componentName, getStack) { + if (true) { + for (var typeSpecName in typeSpecs) { + if (has(typeSpecs, typeSpecName)) { + var error; + // Prop type validation may throw. In case they do, we don't want to + // fail the render phase where it didn't fail before. So we log it. + // After these have been cleaned up, we'll let them throw. + try { + // This is intentionally an invariant that gets caught. It's the same + // behavior as without this statement except with a better message. + if (typeof typeSpecs[typeSpecName] !== 'function') { + var err = Error( + (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + ); + err.name = 'Invariant Violation'; + throw err; + } + error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); + } catch (ex) { + error = ex; + } + if (error && !(error instanceof Error)) { + printWarning( + (componentName || 'React class') + ': type specification of ' + + location + ' `' + typeSpecName + '` is invalid; the type checker ' + + 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' + + 'You may have forgotten to pass an argument to the type checker ' + + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + + 'shape all require an argument).' + ); + } + if (error instanceof Error && !(error.message in loggedTypeFailures)) { + // Only monitor this failure once because there tends to be a lot of the + // same error. + loggedTypeFailures[error.message] = true; + + var stack = getStack ? getStack() : ''; + + printWarning( + 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '') + ); + } + } + } + } +} + +/** + * Resets warning cache when testing. + * + * @private + */ +checkPropTypes.resetWarningCache = function() { + if (true) { + loggedTypeFailures = {}; + } +} + +module.exports = checkPropTypes; + + +/***/ }), + +/***/ "./node_modules/prop-types/factoryWithTypeCheckers.js": +/*!************************************************************!*\ + !*** ./node_modules/prop-types/factoryWithTypeCheckers.js ***! + \************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + + +var ReactIs = __webpack_require__(/*! react-is */ "./node_modules/prop-types/node_modules/react-is/index.js"); +var assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js"); + +var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/prop-types/lib/ReactPropTypesSecret.js"); +var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ "./node_modules/prop-types/checkPropTypes.js"); + +var has = Function.call.bind(Object.prototype.hasOwnProperty); +var printWarning = function() {}; + +if (true) { + printWarning = function(text) { + var message = 'Warning: ' + text; + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; +} + +function emptyFunctionThatReturnsNull() { + return null; +} + +module.exports = function(isValidElement, throwOnDirectAccess) { + /* global Symbol */ + var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. + + /** + * Returns the iterator method function contained on the iterable object. + * + * Be sure to invoke the function with the iterable as context: + * + * var iteratorFn = getIteratorFn(myIterable); + * if (iteratorFn) { + * var iterator = iteratorFn.call(myIterable); + * ... + * } + * + * @param {?object} maybeIterable + * @return {?function} + */ + function getIteratorFn(maybeIterable) { + var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); + if (typeof iteratorFn === 'function') { + return iteratorFn; + } + } + + /** + * Collection of methods that allow declaration and validation of props that are + * supplied to React components. Example usage: + * + * var Props = require('ReactPropTypes'); + * var MyArticle = React.createClass({ + * propTypes: { + * // An optional string prop named "description". + * description: Props.string, + * + * // A required enum prop named "category". + * category: Props.oneOf(['News','Photos']).isRequired, + * + * // A prop named "dialog" that requires an instance of Dialog. + * dialog: Props.instanceOf(Dialog).isRequired + * }, + * render: function() { ... } + * }); + * + * A more formal specification of how these methods are used: + * + * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) + * decl := ReactPropTypes.{type}(.isRequired)? + * + * Each and every declaration produces a function with the same signature. This + * allows the creation of custom validation functions. For example: + * + * var MyLink = React.createClass({ + * propTypes: { + * // An optional string or URI prop named "href". + * href: function(props, propName, componentName) { + * var propValue = props[propName]; + * if (propValue != null && typeof propValue !== 'string' && + * !(propValue instanceof URI)) { + * return new Error( + * 'Expected a string or an URI for ' + propName + ' in ' + + * componentName + * ); + * } + * } + * }, + * render: function() {...} + * }); + * + * @internal + */ + + var ANONYMOUS = '<>'; + + // Important! + // Keep this list in sync with production version in `./factoryWithThrowingShims.js`. + var ReactPropTypes = { + array: createPrimitiveTypeChecker('array'), + bool: createPrimitiveTypeChecker('boolean'), + func: createPrimitiveTypeChecker('function'), + number: createPrimitiveTypeChecker('number'), + object: createPrimitiveTypeChecker('object'), + string: createPrimitiveTypeChecker('string'), + symbol: createPrimitiveTypeChecker('symbol'), + + any: createAnyTypeChecker(), + arrayOf: createArrayOfTypeChecker, + element: createElementTypeChecker(), + elementType: createElementTypeTypeChecker(), + instanceOf: createInstanceTypeChecker, + node: createNodeChecker(), + objectOf: createObjectOfTypeChecker, + oneOf: createEnumTypeChecker, + oneOfType: createUnionTypeChecker, + shape: createShapeTypeChecker, + exact: createStrictShapeTypeChecker, + }; + + /** + * inlined Object.is polyfill to avoid requiring consumers ship their own + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is + */ + /*eslint-disable no-self-compare*/ + function is(x, y) { + // SameValue algorithm + if (x === y) { + // Steps 1-5, 7-10 + // Steps 6.b-6.e: +0 != -0 + return x !== 0 || 1 / x === 1 / y; + } else { + // Step 6.a: NaN == NaN + return x !== x && y !== y; + } + } + /*eslint-enable no-self-compare*/ + + /** + * We use an Error-like object for backward compatibility as people may call + * PropTypes directly and inspect their output. However, we don't use real + * Errors anymore. We don't inspect their stack anyway, and creating them + * is prohibitively expensive if they are created too often, such as what + * happens in oneOfType() for any type before the one that matched. + */ + function PropTypeError(message) { + this.message = message; + this.stack = ''; + } + // Make `instanceof Error` still work for returned errors. + PropTypeError.prototype = Error.prototype; + + function createChainableTypeChecker(validate) { + if (true) { + var manualPropTypeCallCache = {}; + var manualPropTypeWarningCount = 0; + } + function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { + componentName = componentName || ANONYMOUS; + propFullName = propFullName || propName; + + if (secret !== ReactPropTypesSecret) { + if (throwOnDirectAccess) { + // New behavior only for users of `prop-types` package + var err = new Error( + 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + + 'Use `PropTypes.checkPropTypes()` to call them. ' + + 'Read more at http://fb.me/use-check-prop-types' + ); + err.name = 'Invariant Violation'; + throw err; + } else if ( true && typeof console !== 'undefined') { + // Old behavior for people using React.PropTypes + var cacheKey = componentName + ':' + propName; + if ( + !manualPropTypeCallCache[cacheKey] && + // Avoid spamming the console because they are often not actionable except for lib authors + manualPropTypeWarningCount < 3 + ) { + printWarning( + 'You are manually calling a React.PropTypes validation ' + + 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' + + 'and will throw in the standalone `prop-types` package. ' + + 'You may be seeing this warning due to a third-party PropTypes ' + + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.' + ); + manualPropTypeCallCache[cacheKey] = true; + manualPropTypeWarningCount++; + } + } + } + if (props[propName] == null) { + if (isRequired) { + if (props[propName] === null) { + return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.')); + } + return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.')); + } + return null; + } else { + return validate(props, propName, componentName, location, propFullName); + } + } + + var chainedCheckType = checkType.bind(null, false); + chainedCheckType.isRequired = checkType.bind(null, true); + + return chainedCheckType; + } + + function createPrimitiveTypeChecker(expectedType) { + function validate(props, propName, componentName, location, propFullName, secret) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== expectedType) { + // `propValue` being instance of, say, date/regexp, pass the 'object' + // check, but we can offer a more precise error message here rather than + // 'of type `object`'. + var preciseType = getPreciseType(propValue); + + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.')); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createAnyTypeChecker() { + return createChainableTypeChecker(emptyFunctionThatReturnsNull); + } + + function createArrayOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location, propFullName) { + if (typeof typeChecker !== 'function') { + return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.'); + } + var propValue = props[propName]; + if (!Array.isArray(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.')); + } + for (var i = 0; i < propValue.length; i++) { + var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret); + if (error instanceof Error) { + return error; + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createElementTypeChecker() { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + if (!isValidElement(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.')); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createElementTypeTypeChecker() { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + if (!ReactIs.isValidElementType(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.')); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createInstanceTypeChecker(expectedClass) { + function validate(props, propName, componentName, location, propFullName) { + if (!(props[propName] instanceof expectedClass)) { + var expectedClassName = expectedClass.name || ANONYMOUS; + var actualClassName = getClassName(props[propName]); + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.')); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createEnumTypeChecker(expectedValues) { + if (!Array.isArray(expectedValues)) { + if (true) { + if (arguments.length > 1) { + printWarning( + 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' + + 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).' + ); + } else { + printWarning('Invalid argument supplied to oneOf, expected an array.'); + } + } + return emptyFunctionThatReturnsNull; + } + + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + for (var i = 0; i < expectedValues.length; i++) { + if (is(propValue, expectedValues[i])) { + return null; + } + } + + var valuesString = JSON.stringify(expectedValues, function replacer(key, value) { + var type = getPreciseType(value); + if (type === 'symbol') { + return String(value); + } + return value; + }); + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); + } + return createChainableTypeChecker(validate); + } + + function createObjectOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location, propFullName) { + if (typeof typeChecker !== 'function') { + return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.'); + } + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.')); + } + for (var key in propValue) { + if (has(propValue, key)) { + var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); + if (error instanceof Error) { + return error; + } + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createUnionTypeChecker(arrayOfTypeCheckers) { + if (!Array.isArray(arrayOfTypeCheckers)) { + true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : 0; + return emptyFunctionThatReturnsNull; + } + + for (var i = 0; i < arrayOfTypeCheckers.length; i++) { + var checker = arrayOfTypeCheckers[i]; + if (typeof checker !== 'function') { + printWarning( + 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + + 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.' + ); + return emptyFunctionThatReturnsNull; + } + } + + function validate(props, propName, componentName, location, propFullName) { + for (var i = 0; i < arrayOfTypeCheckers.length; i++) { + var checker = arrayOfTypeCheckers[i]; + if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) { + return null; + } + } + + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.')); + } + return createChainableTypeChecker(validate); + } + + function createNodeChecker() { + function validate(props, propName, componentName, location, propFullName) { + if (!isNode(props[propName])) { + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createShapeTypeChecker(shapeTypes) { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); + } + for (var key in shapeTypes) { + var checker = shapeTypes[key]; + if (!checker) { + continue; + } + var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); + if (error) { + return error; + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createStrictShapeTypeChecker(shapeTypes) { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); + } + // We need to check all keys in case some are required but missing from + // props. + var allKeys = assign({}, props[propName], shapeTypes); + for (var key in allKeys) { + var checker = shapeTypes[key]; + if (!checker) { + return new PropTypeError( + 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' + + '\nBad object: ' + JSON.stringify(props[propName], null, ' ') + + '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ') + ); + } + var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); + if (error) { + return error; + } + } + return null; + } + + return createChainableTypeChecker(validate); + } + + function isNode(propValue) { + switch (typeof propValue) { + case 'number': + case 'string': + case 'undefined': + return true; + case 'boolean': + return !propValue; + case 'object': + if (Array.isArray(propValue)) { + return propValue.every(isNode); + } + if (propValue === null || isValidElement(propValue)) { + return true; + } + + var iteratorFn = getIteratorFn(propValue); + if (iteratorFn) { + var iterator = iteratorFn.call(propValue); + var step; + if (iteratorFn !== propValue.entries) { + while (!(step = iterator.next()).done) { + if (!isNode(step.value)) { + return false; + } + } + } else { + // Iterator will provide entry [k,v] tuples rather than values. + while (!(step = iterator.next()).done) { + var entry = step.value; + if (entry) { + if (!isNode(entry[1])) { + return false; + } + } + } + } + } else { + return false; + } + + return true; + default: + return false; + } + } + + function isSymbol(propType, propValue) { + // Native Symbol. + if (propType === 'symbol') { + return true; + } + + // falsy value can't be a Symbol + if (!propValue) { + return false; + } + + // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' + if (propValue['@@toStringTag'] === 'Symbol') { + return true; + } + + // Fallback for non-spec compliant Symbols which are polyfilled. + if (typeof Symbol === 'function' && propValue instanceof Symbol) { + return true; + } + + return false; + } + + // Equivalent of `typeof` but with special handling for array and regexp. + function getPropType(propValue) { + var propType = typeof propValue; + if (Array.isArray(propValue)) { + return 'array'; + } + if (propValue instanceof RegExp) { + // Old webkits (at least until Android 4.0) return 'function' rather than + // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ + // passes PropTypes.object. + return 'object'; + } + if (isSymbol(propType, propValue)) { + return 'symbol'; + } + return propType; + } + + // This handles more types than `getPropType`. Only used for error messages. + // See `createPrimitiveTypeChecker`. + function getPreciseType(propValue) { + if (typeof propValue === 'undefined' || propValue === null) { + return '' + propValue; + } + var propType = getPropType(propValue); + if (propType === 'object') { + if (propValue instanceof Date) { + return 'date'; + } else if (propValue instanceof RegExp) { + return 'regexp'; + } + } + return propType; + } + + // Returns a string that is postfixed to a warning about an invalid type. + // For example, "undefined" or "of type array" + function getPostfixForTypeWarning(value) { + var type = getPreciseType(value); + switch (type) { + case 'array': + case 'object': + return 'an ' + type; + case 'boolean': + case 'date': + case 'regexp': + return 'a ' + type; + default: + return type; + } + } + + // Returns class name of the object, if any. + function getClassName(propValue) { + if (!propValue.constructor || !propValue.constructor.name) { + return ANONYMOUS; + } + return propValue.constructor.name; + } + + ReactPropTypes.checkPropTypes = checkPropTypes; + ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache; + ReactPropTypes.PropTypes = ReactPropTypes; + + return ReactPropTypes; +}; + + +/***/ }), + +/***/ "./node_modules/prop-types/index.js": +/*!******************************************!*\ + !*** ./node_modules/prop-types/index.js ***! + \******************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +if (true) { + var ReactIs = __webpack_require__(/*! react-is */ "./node_modules/prop-types/node_modules/react-is/index.js"); + + // By explicitly using `prop-types` you are opting into new development behavior. + // http://fb.me/prop-types-in-prod + var throwOnDirectAccess = true; + module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "./node_modules/prop-types/factoryWithTypeCheckers.js")(ReactIs.isElement, throwOnDirectAccess); +} else {} + + +/***/ }), + +/***/ "./node_modules/prop-types/lib/ReactPropTypesSecret.js": +/*!*************************************************************!*\ + !*** ./node_modules/prop-types/lib/ReactPropTypesSecret.js ***! + \*************************************************************/ +/***/ ((module) => { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + + +var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; + +module.exports = ReactPropTypesSecret; + + +/***/ }), + +/***/ "./node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js": +/*!***********************************************************************************!*\ + !*** ./node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js ***! + \***********************************************************************************/ +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; +/** @license React v16.13.1 + * react-is.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + + + + +if (true) { + (function() { +'use strict'; + +// The Symbol used to tag the ReactElement-like types. If there is no native Symbol +// nor polyfill, then a plain number is used for performance. +var hasSymbol = typeof Symbol === 'function' && Symbol.for; +var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; +var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; +var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; +var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; +var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; +var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; +var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary +// (unstable) APIs that have been removed. Can we remove the symbols? + +var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf; +var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; +var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; +var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; +var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8; +var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; +var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; +var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9; +var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5; +var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6; +var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7; + +function isValidElementType(type) { + return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. + type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE); +} + +function typeOf(object) { + if (typeof object === 'object' && object !== null) { + var $$typeof = object.$$typeof; + + switch ($$typeof) { + case REACT_ELEMENT_TYPE: + var type = object.type; + + switch (type) { + case REACT_ASYNC_MODE_TYPE: + case REACT_CONCURRENT_MODE_TYPE: + case REACT_FRAGMENT_TYPE: + case REACT_PROFILER_TYPE: + case REACT_STRICT_MODE_TYPE: + case REACT_SUSPENSE_TYPE: + return type; + + default: + var $$typeofType = type && type.$$typeof; + + switch ($$typeofType) { + case REACT_CONTEXT_TYPE: + case REACT_FORWARD_REF_TYPE: + case REACT_LAZY_TYPE: + case REACT_MEMO_TYPE: + case REACT_PROVIDER_TYPE: + return $$typeofType; + + default: + return $$typeof; + } + + } + + case REACT_PORTAL_TYPE: + return $$typeof; + } + } + + return undefined; +} // AsyncMode is deprecated along with isAsyncMode + +var AsyncMode = REACT_ASYNC_MODE_TYPE; +var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE; +var ContextConsumer = REACT_CONTEXT_TYPE; +var ContextProvider = REACT_PROVIDER_TYPE; +var Element = REACT_ELEMENT_TYPE; +var ForwardRef = REACT_FORWARD_REF_TYPE; +var Fragment = REACT_FRAGMENT_TYPE; +var Lazy = REACT_LAZY_TYPE; +var Memo = REACT_MEMO_TYPE; +var Portal = REACT_PORTAL_TYPE; +var Profiler = REACT_PROFILER_TYPE; +var StrictMode = REACT_STRICT_MODE_TYPE; +var Suspense = REACT_SUSPENSE_TYPE; +var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated + +function isAsyncMode(object) { + { + if (!hasWarnedAboutDeprecatedIsAsyncMode) { + hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint + + console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.'); + } + } + + return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE; +} +function isConcurrentMode(object) { + return typeOf(object) === REACT_CONCURRENT_MODE_TYPE; +} +function isContextConsumer(object) { + return typeOf(object) === REACT_CONTEXT_TYPE; +} +function isContextProvider(object) { + return typeOf(object) === REACT_PROVIDER_TYPE; +} +function isElement(object) { + return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; +} +function isForwardRef(object) { + return typeOf(object) === REACT_FORWARD_REF_TYPE; +} +function isFragment(object) { + return typeOf(object) === REACT_FRAGMENT_TYPE; +} +function isLazy(object) { + return typeOf(object) === REACT_LAZY_TYPE; +} +function isMemo(object) { + return typeOf(object) === REACT_MEMO_TYPE; +} +function isPortal(object) { + return typeOf(object) === REACT_PORTAL_TYPE; +} +function isProfiler(object) { + return typeOf(object) === REACT_PROFILER_TYPE; +} +function isStrictMode(object) { + return typeOf(object) === REACT_STRICT_MODE_TYPE; +} +function isSuspense(object) { + return typeOf(object) === REACT_SUSPENSE_TYPE; +} + +exports.AsyncMode = AsyncMode; +exports.ConcurrentMode = ConcurrentMode; +exports.ContextConsumer = ContextConsumer; +exports.ContextProvider = ContextProvider; +exports.Element = Element; +exports.ForwardRef = ForwardRef; +exports.Fragment = Fragment; +exports.Lazy = Lazy; +exports.Memo = Memo; +exports.Portal = Portal; +exports.Profiler = Profiler; +exports.StrictMode = StrictMode; +exports.Suspense = Suspense; +exports.isAsyncMode = isAsyncMode; +exports.isConcurrentMode = isConcurrentMode; +exports.isContextConsumer = isContextConsumer; +exports.isContextProvider = isContextProvider; +exports.isElement = isElement; +exports.isForwardRef = isForwardRef; +exports.isFragment = isFragment; +exports.isLazy = isLazy; +exports.isMemo = isMemo; +exports.isPortal = isPortal; +exports.isProfiler = isProfiler; +exports.isStrictMode = isStrictMode; +exports.isSuspense = isSuspense; +exports.isValidElementType = isValidElementType; +exports.typeOf = typeOf; + })(); +} + + +/***/ }), + +/***/ "./node_modules/prop-types/node_modules/react-is/index.js": +/*!****************************************************************!*\ + !*** ./node_modules/prop-types/node_modules/react-is/index.js ***! + \****************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +"use strict"; + + +if (false) {} else { + module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "./node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js"); +} + + +/***/ }), + +/***/ "react": +/*!************************!*\ + !*** external "React" ***! + \************************/ +/***/ ((module) => { + +"use strict"; +module.exports = window["React"]; + +/***/ }), + +/***/ "@wordpress/element": +/*!*********************************!*\ + !*** external ["wp","element"] ***! + \*********************************/ +/***/ ((module) => { + +"use strict"; +module.exports = window["wp"]["element"]; + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/compat get default export */ +/******/ (() => { +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = (module) => { +/******/ var getter = module && module.__esModule ? +/******/ () => (module['default']) : +/******/ () => (module); +/******/ __webpack_require__.d(getter, { a: getter }); +/******/ return getter; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry need to be wrapped in an IIFE because it need to be in strict mode. +(() => { +"use strict"; +/*!*************************!*\ + !*** ./client/build.js ***! + \*************************/ +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _screenshots__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./screenshots */ "./client/screenshots/index.js"); + +/** + * External dependencies. + */ + + +/** + * Internal dependencies. + */ + +function initializeScreenshots(id) { + const container = document.getElementById(id); + if (!container) { + return; + } + const elements = container.querySelectorAll('figure'); + const images = []; + for (let i = 0; i < elements.length; i++) { + const caption = elements[i].querySelector('figcaption'); + const item = { + src: elements[i].querySelector('img.screenshot').src, + caption: caption ? caption.textContent : '' + }; + images.push(item); + } + if (images.length > 0) { + (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.render)((0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_screenshots__WEBPACK_IMPORTED_MODULE_2__["default"], { + screenshots: images + }), container); + } +} +initializeScreenshots('screenshots'); +})(); + +/******/ })() +; +//# sourceMappingURL=theme.js.map \ No newline at end of file diff --git a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/archive-page/render.php b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/archive-page/render.php deleted file mode 100644 index a5ef67c784..0000000000 --- a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/archive-page/render.php +++ /dev/null @@ -1,40 +0,0 @@ -have_posts() ) { - status_header( 404 ); - nocache_headers(); -} - -?> - -
-
- - - - have_posts() ) { - the_post(); - - get_template_part( 'template-parts/plugin' ); - } - - if ( ! have_posts() ) { - get_template_part( 'template-parts/no-results' ); - } - - the_posts_pagination(); - - ?> - -
-
diff --git a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/missing-template-tag/block.json b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/missing-template-tag/block.json new file mode 100644 index 0000000000..69da77cb70 --- /dev/null +++ b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/missing-template-tag/block.json @@ -0,0 +1,25 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 2, + "name": "wporg/missing-template-tag", + "version": "0.1.0", + "title": "Missing Template Tag", + "category": "design", + "icon": "", + "description": "A block that executes a missing template tag.", + "textdomain": "wporg", + "attributes": { + "function": { + "type": "string", + "enum": [ "the_posts_pagination", "the_archive_description" ] + }, + "args": { + "type": "array" + } + }, + "supports": { + "html": false + }, + "editorScript": "file:./index.js", + "render": "file:./render.php" +} \ No newline at end of file diff --git a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/archive-page/index.js b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/missing-template-tag/index.js similarity index 100% rename from wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/archive-page/index.js rename to wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/missing-template-tag/index.js diff --git a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/archive-page/index.php b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/missing-template-tag/index.php similarity index 76% rename from wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/archive-page/index.php rename to wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/missing-template-tag/index.php index 65b727a39b..6906294682 100644 --- a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/archive-page/index.php +++ b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/missing-template-tag/index.php @@ -6,7 +6,7 @@ * @package wporg */ -namespace WordPressdotorg\Theme\Plugins_2024\ArchivePage; +namespace WordPressdotorg\Theme\Plugins_2024\MissingTemplateTag; add_action( 'init', __NAMESPACE__ . '\init' ); @@ -18,5 +18,5 @@ * @see https://developer.wordpress.org/reference/functions/register_block_type/ */ function init() { - register_block_type( __DIR__ . '/../../../js/build/blocks/archive-page' ); + register_block_type( __DIR__ . '/../../../js/build/blocks/missing-template-tag' ); } \ No newline at end of file diff --git a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/missing-template-tag/render.php b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/missing-template-tag/render.php new file mode 100644 index 0000000000..7a1b080a04 --- /dev/null +++ b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/missing-template-tag/render.php @@ -0,0 +1,13 @@ + -
- - - -
- \ No newline at end of file diff --git a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/template-parts/plugin.php b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/template-parts/plugin.php index 622ce22fa2..b9fc52d646 100644 --- a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/template-parts/plugin.php +++ b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/template-parts/plugin.php @@ -13,50 +13,48 @@ $tested_up_to = (string) get_post_meta( $post->ID, 'tested', true ); ?> -
> -
- - - -
-
- ', '' ); ?> -
+
+ + + +
+
+ ', '' ); ?> +
- + -
- -
-
-
-
- - - - - - - - - - - - - - - +
+ +
+
+
+
+ + + + + + + + + + -
- -
\ No newline at end of file + + + + + + + \ No newline at end of file diff --git a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/templates/archive.html b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/templates/archive.html index d4546fc3ef..ea875d6bbf 100644 --- a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/templates/archive.html +++ b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/templates/archive.html @@ -1,9 +1,16 @@ - -
- -
- + +
+ + + + - \ No newline at end of file + + + + + +
+ \ No newline at end of file diff --git a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/templates/search.html b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/templates/search.html index b68fa35789..dccd65f86f 100644 --- a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/templates/search.html +++ b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/templates/search.html @@ -1,9 +1,14 @@ - -
- -
- + +
+ + - \ No newline at end of file + + + + + +
+ \ No newline at end of file From 3fa205f75519646bb63789dfd53e3b2a6c76f78c Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Fri, 1 Mar 2024 06:22:01 +0000 Subject: [PATCH 2/5] Adjust styles to account for plugin-cards class rather than singular plugin-card. --- .../client/components/_plugin-card.scss | 9 ++- .../js/build/blocks/front-page/render.php | 30 +++++++--- .../js/build/blocks/plugin-card/index.php | 10 ---- .../js/build/blocks/plugin-card/render.php | 53 +++++++++++++++- .../wporg-plugins-2024/js/build/theme.js.map | 1 + .../src/blocks/front-page/render.php | 30 +++++++--- .../src/blocks/plugin-card/index.php | 10 ---- .../src/blocks/plugin-card/render.php | 53 +++++++++++++++- .../template-parts/plugin.php | 60 ------------------- 9 files changed, 154 insertions(+), 102 deletions(-) create mode 100644 wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/js/build/theme.js.map delete mode 100644 wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/template-parts/plugin.php diff --git a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/client/components/_plugin-card.scss b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/client/components/_plugin-card.scss index 1ef223cd95..c0a1aa9690 100644 --- a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/client/components/_plugin-card.scss +++ b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/client/components/_plugin-card.scss @@ -1,4 +1,9 @@ -.plugin-card { +.plugin-cards { + list-style: none; +} + +.plugin-card, +.plugin-cards > li.plugin { background-color: #f9f9f9; margin-bottom: 4%; margin-block-start: 0; @@ -21,7 +26,7 @@ vertical-align: top; @media screen and ( min-width: 21em ) { - width: calc(96% - 128px); + width: calc(95% - 128px); } } diff --git a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/js/build/blocks/front-page/render.php b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/js/build/blocks/front-page/render.php index a3cd1d374e..7f1efb1730 100644 --- a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/js/build/blocks/front-page/render.php +++ b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/js/build/blocks/front-page/render.php @@ -1,5 +1,8 @@ __( 'Block-Enabled Plugins', 'wporg-plugins' ), @@ -53,15 +56,16 @@ ]; } - $section_query = new \WP_Query( $section_args ); + $wp_query = new WP_Query( $section_args ); // If the user doesn't have any favorites, omit the section. - if ( 'favorites' === $browse && ! $section_query->have_posts() ) { + if ( 'favorites' === $browse && ! $wp_query->have_posts() ) { + wp_reset_query(); continue; } ?> -
+

"> @@ -76,15 +80,23 @@
have_posts() ) : - $section_query->the_post(); - - get_template_part( 'template-parts/plugin', 'index' ); - endwhile; + echo do_blocks( << +
+ + + +
+ + BLOCKS + ); ?>
- + diff --git a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/js/build/blocks/plugin-card/index.php b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/js/build/blocks/plugin-card/index.php index 9b0875e28d..7fa5edbd28 100644 --- a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/js/build/blocks/plugin-card/index.php +++ b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/js/build/blocks/plugin-card/index.php @@ -20,13 +20,3 @@ function init() { register_block_type( __DIR__ . '/../../../js/build/blocks/plugin-card' ); } - -// TODO: Figure out how to add a post_class for wrapping a block... -add_filter( 'render_block_core/post-template', function( $html, $block ) { - // If the post-template has the 'plugin-cards' class, add the 'plugin-card' class to the child blocks - if ( ! empty( $block['attrs']['className'] ) && str_contains( $block['attrs']['className'], 'plugin-cards' ) ) { - $html = str_replace( 'class="wp-block-post ', 'class="wp-block-post plugin-card ', $html ); - } - - return $html; -}, 10, 2 ); \ No newline at end of file diff --git a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/js/build/blocks/plugin-card/render.php b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/js/build/blocks/plugin-card/render.php index bf47d11ba3..650fa29a53 100644 --- a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/js/build/blocks/plugin-card/render.php +++ b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/js/build/blocks/plugin-card/render.php @@ -1,2 +1,53 @@ ID, 'tested', true ); +?> +
+ + + +
+
+
+ ', '' ); ?> +
+ + + +
+ +
+
+
+
+ + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/js/build/theme.js.map b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/js/build/theme.js.map new file mode 100644 index 0000000000..287ccec79c --- /dev/null +++ b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/js/build/theme.js.map @@ -0,0 +1 @@ +{"version":3,"file":"theme.js","mappings":";;;;;;;;;;;;;;;;;;;AAAmC;AAEnC,MAAMC,YAAY,GAAG,GAAG;AAExB,SAASC,QAAQA,CAAEC,IAAI,EAAEC,IAAI,EAAG;EAC/B,IAAIC,OAAO,EAAEC,IAAI,EAAEC,MAAM;EACzB,IAAIC,OAAO,GAAI,IAAI;EACnB,IAAIC,QAAQ,GAAG,CAAC;EAEhB,IAAIC,KAAK,GAAG,SAAAA,CAAA,EAAY;IACvBD,QAAQ,GAAG,IAAIE,IAAI,CAAC,CAAC,CAACC,OAAO,CAAC,CAAC;IAC/BJ,OAAO,GAAI,IAAI;IACfD,MAAM,GAAKJ,IAAI,CAACU,KAAK,CAAER,OAAO,EAAEC,IAAK,CAAC;IAEtC,IAAK,CAAEE,OAAO,EAAG;MAChBH,OAAO,GAAGC,IAAI,GAAG,IAAI;IACtB;EACD,CAAC;EAED,OAAO,YAAY;IAClB,IAAIQ,GAAG,GAAS,IAAIH,IAAI,CAAC,CAAC,CAACC,OAAO,CAAC,CAAC;IACpC,IAAIG,SAAS,GAAGX,IAAI,IAAIU,GAAG,GAAGL,QAAQ,CAAC;IAEvCJ,OAAO,GAAG,IAAI;IACdC,IAAI,GAAGU,SAAS;IAEhB,IAAKD,SAAS,IAAI,CAA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;AC3B1B;AACA;AACA;AACA;AACA;;AAEa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH,kCAAkC;AAClC;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,iBAAiB,sBAAsB;AACvC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,oBAAoB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACzFA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;;AAEA,IAAI,IAAqC;AACzC,6BAA6B,mBAAO,CAAC,yFAA4B;AACjE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,WAAW;AACtB;AACA;AACA;AACA,MAAM,IAAqC;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6GAA6G;AAC7G;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,IAAqC;AAC3C;AACA;AACA;;AAEA;;;;;;;;;;;;ACrGA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb,cAAc,mBAAO,CAAC,0EAAU;AAChC,aAAa,mBAAO,CAAC,4DAAe;;AAEpC,2BAA2B,mBAAO,CAAC,yFAA4B;AAC/D,qBAAqB,mBAAO,CAAC,qEAAkB;;AAE/C;AACA;;AAEA,IAAI,IAAqC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,2CAA2C;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,8BAA8B;AAC9B,QAAQ;AACR;AACA;AACA;AACA;AACA,+BAA+B,KAAK;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,4BAA4B;AAC5B,OAAO;AACP;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,QAAQ,IAAqC;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,SAAS,KAAqC;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,sBAAsB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU,IAAqC;AAC/C;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,sBAAsB,2BAA2B;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,KAAqC,4FAA4F,CAAM;AAC7I;AACA;;AAEA,oBAAoB,gCAAgC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB,gCAAgC;AACtD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;AC9kBA;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAI,IAAqC;AACzC,gBAAgB,mBAAO,CAAC,0EAAU;;AAElC;AACA;AACA;AACA,mBAAmB,mBAAO,CAAC,uFAA2B;AACtD,EAAE,KAAK,EAIN;;;;;;;;;;;;AClBD;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;;AAEA;;;;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;;;AAIb,IAAI,IAAqC;AACzC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E;AAC3E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;;AAEjD;AACA;AACA;AACA,kDAAkD;;AAElD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iBAAiB;AACjB,sBAAsB;AACtB,uBAAuB;AACvB,uBAAuB;AACvB,eAAe;AACf,kBAAkB;AAClB,gBAAgB;AAChB,YAAY;AACZ,YAAY;AACZ,cAAc;AACd,gBAAgB;AAChB,kBAAkB;AAClB,gBAAgB;AAChB,mBAAmB;AACnB,wBAAwB;AACxB,yBAAyB;AACzB,yBAAyB;AACzB,iBAAiB;AACjB,oBAAoB;AACpB,kBAAkB;AAClB,cAAc;AACd,cAAc;AACd,gBAAgB;AAChB,kBAAkB;AAClB,oBAAoB;AACpB,kBAAkB;AAClB,0BAA0B;AAC1B,cAAc;AACd,GAAG;AACH;;;;;;;;;;;;ACpLa;;AAEb,IAAI,KAAqC,EAAE,EAE1C,CAAC;AACF,EAAE,wJAAyD;AAC3D;;;;;;;;;;;;ACNA;;;;;;;;;;;ACAA;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;;;;ACNA;AACA;AACA;AAC4C;;AAE5C;AACA;AACA;AACwC;AAExC,SAASK,qBAAqBA,CAAEF,EAAE,EAAG;EACpC,MAAMG,SAAS,GAAGC,QAAQ,CAACC,cAAc,CAAEL,EAAG,CAAC;EAC/C,IAAK,CAAEG,SAAS,EAAG;IAClB;EACD;EAEA,MAAMG,QAAQ,GAAGH,SAAS,CAACI,gBAAgB,CAAE,QAAS,CAAC;EACvD,MAAMC,MAAM,GAAG,EAAE;EACjB,KAAM,IAAIzB,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGuB,QAAQ,CAAC1H,MAAM,EAAEmG,CAAC,EAAE,EAAG;IAC3C,MAAMgB,OAAO,GAAGO,QAAQ,CAAEvB,CAAC,CAAE,CAAC0B,aAAa,CAAE,YAAa,CAAC;IAC3D,MAAMhE,IAAI,GAAG;MACZnC,GAAG,EAAEgG,QAAQ,CAAEvB,CAAC,CAAE,CAAC0B,aAAa,CAAE,gBAAiB,CAAC,CAACnG,GAAG;MACxDyF,OAAO,EAAEA,OAAO,GAAGA,OAAO,CAACW,WAAW,GAAG;IAC1C,CAAC;IACDF,MAAM,CAACnC,IAAI,CAAE5B,IAAK,CAAC;EACpB;EAEA,IAAK+D,MAAM,CAAC5H,MAAM,GAAG,CAAC,EAAG;IACxB0E,0DAAM,CAAEZ,oDAAA,CAACmD,oDAAW;MAACC,WAAW,EAAGU;IAAQ,CAAE,CAAC,EAAEL,SAAU,CAAC;EAC5D;AACD;AAEAD,qBAAqB,CAAE,aAAc,CAAC,C","sources":["webpack://wporg-plugins-2024/./client/screenshots/image-gallery.js","webpack://wporg-plugins-2024/./client/screenshots/index.js","webpack://wporg-plugins-2024/./node_modules/object-assign/index.js","webpack://wporg-plugins-2024/./node_modules/prop-types/checkPropTypes.js","webpack://wporg-plugins-2024/./node_modules/prop-types/factoryWithTypeCheckers.js","webpack://wporg-plugins-2024/./node_modules/prop-types/index.js","webpack://wporg-plugins-2024/./node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack://wporg-plugins-2024/./node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js","webpack://wporg-plugins-2024/./node_modules/prop-types/node_modules/react-is/index.js","webpack://wporg-plugins-2024/external window \"React\"","webpack://wporg-plugins-2024/external window [\"wp\",\"element\"]","webpack://wporg-plugins-2024/webpack/bootstrap","webpack://wporg-plugins-2024/webpack/runtime/compat get default export","webpack://wporg-plugins-2024/webpack/runtime/define property getters","webpack://wporg-plugins-2024/webpack/runtime/hasOwnProperty shorthand","webpack://wporg-plugins-2024/webpack/runtime/make namespace object","webpack://wporg-plugins-2024/./client/build.js"],"sourcesContent":["import PropTypes from 'prop-types';\n\nconst MIN_INTERVAL = 500;\n\nfunction throttle( func, wait ) {\n\tlet context, args, result;\n\tlet timeout = null;\n\tlet previous = 0;\n\n\tlet later = function () {\n\t\tprevious = new Date().getTime();\n\t\ttimeout = null;\n\t\tresult = func.apply( context, args );\n\n\t\tif ( ! timeout ) {\n\t\t\tcontext = args = null;\n\t\t}\n\t};\n\n\treturn function () {\n\t\tlet now = new Date().getTime();\n\t\tlet remaining = wait - (now - previous);\n\n\t\tcontext = this;\n\t\targs = arguments;\n\n\t\tif ( remaining <= 0 || remaining > wait ) {\n\t\t\tif ( timeout ) {\n\t\t\t\tclearTimeout( timeout );\n\t\t\t\ttimeout = null;\n\t\t\t}\n\n\t\t\tprevious = now;\n\t\t\tresult = func.apply( context, args );\n\n\t\t\tif ( ! timeout ) {\n\t\t\t\tcontext = args = null;\n\t\t\t}\n\t\t} else if ( !timeout ) {\n\t\t\ttimeout = setTimeout( later, remaining );\n\t\t}\n\t\treturn result;\n\t};\n\n }\n\n// This is to handle accessing event properties in an asynchronous way\n// https://facebook.github.io/react/docs/events.html#syntheticevent\nfunction debounceEventHandler( ...args ) {\n\tconst throttled = throttle( ...args );\n\treturn function ( event ) {\n\t\tif ( event ) {\n\t\t\tevent.persist();\n\t\t\treturn throttled( event );\n\t\t}\n\n\t\treturn throttled();\n\t};\n }\n\n\nexport default class ImageGallery extends React.Component {\n\n\tconstructor( props ) {\n\t\tsuper( props );\n\t\tthis.state = {\n\t\t\tcurrentIndex: props.startIndex,\n\t\t\tthumbsTranslateX: 0,\n\t\t\toffsetPercentage: 0,\n\t\t\tgalleryWidth: 0,\n\t\t\tthumbnailWidth: 0\n\t\t};\n\t}\n\n\tcomponentWillReceiveProps( nextProps ) {\n\t\tif ( this.props.disableArrowKeys !== nextProps.disableArrowKeys ) {\n\t\t\tif ( nextProps.disableArrowKeys ) {\n\t\t\t\twindow.removeEventListener( \"keydown\", this._handleKeyDown );\n\t\t\t} else {\n\t\t\t\twindow.addEventListener( \"keydown\", this._handleKeyDown );\n\t\t\t}\n\t\t}\n\t}\n\n\tcomponentDidUpdate( prevProps, prevState ) {\n\t\tif ( prevState.thumbnailWidth !== this.state.thumbnailWidth ||\n\t\t\tprevProps.showThumbnails !== this.props.showThumbnails ) {\n\n\t\t\t// Adjust thumbnail container when thumbnail width is adjusted.\n\t\t\tthis._setThumbsTranslateX( -this._getThumbsTranslateX( this.state.currentIndex > 0 ? 1 : 0 ) * this.state.currentIndex );\n\t\t}\n\n\t\tif ( prevState.currentIndex !== this.state.currentIndex ) {\n\t\t\tthis._updateThumbnailTranslateX( prevState );\n\t\t}\n\t}\n\n\tcomponentWillMount() {\n\t\tthis._slideLeft = debounceEventHandler( this._slideLeft.bind( this ), MIN_INTERVAL, true );\n\t\tthis._slideRight = debounceEventHandler( this._slideRight.bind( this ), MIN_INTERVAL, true );\n\n\t\tthis._handleResize = this._handleResize.bind( this );\n\t\tthis._handleKeyDown = this._handleKeyDown.bind( this );\n\t\tthis._thumbnailDelay = 300;\n\t}\n\n\tcomponentDidMount() {\n\n\t\t// / Delay initial resize to get the accurate this._imageGallery.offsetWidth.\n\t\twindow.setTimeout( () => this._handleResize(), 500 );\n\n\t\tif ( ! this.props.disableArrowKeys ) {\n\t\t\twindow.addEventListener( \"keydown\", this._handleKeyDown );\n\t\t}\n\n\t\twindow.addEventListener( \"resize\", this._handleResize );\n\t}\n\n\tcomponentWillUnmount() {\n\t\tif ( ! this.props.disableArrowKeys ) {\n\t\t\twindow.removeEventListener( \"keydown\", this._handleKeyDown );\n\t\t}\n\n\t\twindow.removeEventListener( \"resize\", this._handleResize );\n\n\t\tif ( this._intervalId ) {\n\t\t\twindow.clearInterval( this._intervalId );\n\t\t\tthis._intervalId = null;\n\t\t}\n\t}\n\n\tfullScreen() {\n\t\tconst gallery = this._imageGallery;\n\n\t\tif ( gallery.requestFullscreen ) {\n\t\t\tgallery.requestFullscreen();\n\t\t} else if ( gallery.msRequestFullscreen ) {\n\t\t\tgallery.msRequestFullscreen();\n\t\t} else if ( gallery.mozRequestFullScreen ) {\n\t\t\tgallery.mozRequestFullScreen();\n\t\t} else if ( gallery.webkitRequestFullscreen ) {\n\t\t\tgallery.webkitRequestFullscreen();\n\t\t}\n\t}\n\n\tslideToIndex( index, event ) {\n\t\tif ( event ) {\n\t\t\tevent.preventDefault();\n\t\t}\n\n\t\tlet slideCount = this.props.items.length - 1;\n\t\tlet currentIndex = index;\n\n\t\tif ( index < 0 ) {\n\t\t\tcurrentIndex = slideCount;\n\t\t} else if ( index > slideCount ) {\n\t\t\tcurrentIndex = 0;\n\t\t}\n\n\t\tthis.setState( {\n\t\t\tpreviousIndex: this.state.currentIndex,\n\t\t\tcurrentIndex: currentIndex,\n\t\t\toffsetPercentage: 0,\n\t\t\tstyle: {\n\t\t\t\ttransition: \"transform 0.45s ease-out\"\n\t\t\t}\n\t\t} );\n\t}\n\n\tgetCurrentIndex() {\n\t\treturn this.state.currentIndex;\n\t}\n\n\t_handleResize() {\n\t\tif ( this._imageGallery ) {\n\t\t\tthis.setState( { galleryWidth: this._imageGallery.offsetWidth } );\n\t\t}\n\n\t\tif ( this._imageGalleryThumbnail ) {\n\t\t\tthis.setState( { thumbnailWidth: this._imageGalleryThumbnail.offsetWidth } );\n\t\t}\n\t}\n\n\t_handleKeyDown( event ) {\n\t\tconst LEFT_ARROW = 37;\n\t\tconst RIGHT_ARROW = 39;\n\t\tconst key = parseInt( event.keyCode || event.which || 0 );\n\n\t\tswitch ( key ) {\n\t\t\tcase LEFT_ARROW:\n\t\t\t\tif ( this._canSlideLeft() && ! this._intervalId ) {\n\t\t\t\t\tthis._slideLeft();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase RIGHT_ARROW:\n\t\t\t\tif ( this._canSlideRight() && ! this._intervalId ) {\n\t\t\t\t\tthis._slideRight();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\t_handleMouseOverThumbnails( index ) {\n\t\tif ( this.props.slideOnThumbnailHover ) {\n\t\t\tthis.setState( { hovering: true } );\n\n\t\t\tif ( this._thumbnailTimer ) {\n\t\t\t\twindow.clearTimeout( this._thumbnailTimer );\n\t\t\t\tthis._thumbnailTimer = null;\n\t\t\t}\n\n\t\t\tthis._thumbnailTimer = window.setTimeout( () => {\n\t\t\t\tthis.slideToIndex( index );\n\t\t\t}, this._thumbnailDelay );\n\t\t}\n\t}\n\n\t_handleMouseLeaveThumbnails() {\n\t\tif ( this._thumbnailTimer ) {\n\t\t\twindow.clearTimeout( this._thumbnailTimer );\n\t\t\tthis._thumbnailTimer = null;\n\t\t}\n\t\tthis.setState( { hovering: false } );\n\t}\n\n\t_handleMouseOver() {\n\t\tthis.setState( { hovering: true } );\n\t}\n\n\t_handleMouseLeave() {\n\t\tthis.setState( { hovering: false } );\n\t}\n\n\t_handleImageError( event ) {\n\t\tif ( this.props.defaultImage && -1 === event.target.src.indexOf( this.props.defaultImage ) ) {\n\t\t\tevent.target.src = this.props.defaultImage;\n\t\t}\n\t}\n\n\t_canNavigate() {\n\t\treturn this.props.items.length >= 2;\n\t}\n\n\t_canSlideLeft() {\n\t\treturn this.props.infinite || this.state.currentIndex > 0;\n\t}\n\n\t_canSlideRight() {\n\t\treturn this.props.infinite || this.state.currentIndex < this.props.items.length - 1;\n\t}\n\n\t_updateThumbnailTranslateX( prevState ) {\n\t\tif ( this.state.currentIndex === 0 ) {\n\t\t\tthis._setThumbsTranslateX( 0 );\n\t\t} else {\n\t\t\tlet indexDifference = Math.abs( prevState.currentIndex - this.state.currentIndex );\n\t\t\tlet scrollX = this._getThumbsTranslateX( indexDifference );\n\n\t\t\tif ( scrollX > 0 ) {\n\t\t\t\tif ( prevState.currentIndex < this.state.currentIndex ) {\n\t\t\t\t\tthis._setThumbsTranslateX( this.state.thumbsTranslateX - scrollX );\n\t\t\t\t} else if ( prevState.currentIndex > this.state.currentIndex ) {\n\t\t\t\t\tthis._setThumbsTranslateX( this.state.thumbsTranslateX + scrollX );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t_setThumbsTranslateX( thumbsTranslateX ) {\n\t\tthis.setState( { thumbsTranslateX } );\n\t}\n\n\t_getThumbsTranslateX( indexDifference ) {\n\t\tif ( this.props.disableThumbnailScroll ) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tconst { thumbnailWidth } = this.state;\n\n\t\tif ( this._thumbnails ) {\n\t\t\tif ( this._thumbnails.scrollWidth <= thumbnailWidth ) {\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\tlet totalThumbnails = this._thumbnails.children.length;\n\t\t\t// Total scroll-x required to see the last thumbnail.\n\t\t\tlet totalScrollX = this._thumbnails.scrollWidth - thumbnailWidth;\n\t\t\t// Scroll-x required per index change.\n\t\t\tlet perIndexScrollX = totalScrollX / ( totalThumbnails - 1 );\n\n\t\t\treturn indexDifference * perIndexScrollX;\n\t\t}\n\t}\n\n\t_getAlignmentClassName( index ) {\n\t\t// LEFT, and RIGHT alignments are necessary for lazyLoad.\n\t\tlet { currentIndex } = this.state;\n\t\tlet alignment = \"\";\n\n\t\tconst LEFT = \"left\";\n\t\tconst CENTER = \"center\";\n\t\tconst RIGHT = \"right\";\n\n\t\tswitch ( index ) {\n\t\t\tcase currentIndex - 1:\n\t\t\t\talignment = ` ${ LEFT }`;\n\t\t\t\tbreak;\n\n\t\t\tcase currentIndex:\n\t\t\t\talignment = ` ${ CENTER }`;\n\t\t\t\tbreak;\n\n\t\t\tcase currentIndex + 1:\n\t\t\t\talignment = ` ${ RIGHT }`;\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif ( this.props.items.length >= 3 && this.props.infinite ) {\n\t\t\tif ( index === 0 && currentIndex === this.props.items.length - 1 ) {\n\n\t\t\t\t// Set first slide as right slide if were sliding right from last slide.\n\t\t\t\talignment = ` ${ RIGHT }`;\n\t\t\t} else if ( index === this.props.items.length - 1 && currentIndex === 0 ) {\n\n\t\t\t\t// Set last slide as left slide if were sliding left from first slide.\n\t\t\t\talignment = ` ${ LEFT }`;\n\t\t\t}\n\t\t}\n\n\t\treturn alignment;\n\t}\n\n\t_getTranslateXForTwoSlide( index ) {\n\n\t\t// For taking care of infinite swipe when there are only two slides.\n\t\tconst { currentIndex, offsetPercentage, previousIndex } = this.state;\n\t\tconst baseTranslateX = -100 * currentIndex;\n\t\tlet translateX = baseTranslateX + (index * 100) + offsetPercentage;\n\n\t\t// Keep track of user swiping direction.\n\t\tif ( offsetPercentage > 0 ) {\n\t\t\tthis.direction = 'left';\n\t\t} else if ( offsetPercentage < 0 ) {\n\t\t\tthis.direction = 'right';\n\t\t}\n\n\t\t// when swiping make sure the slides are on the correct side\n\t\tif ( currentIndex === 0 && index === 1 && offsetPercentage > 0 ) {\n\t\t\ttranslateX = -100 + offsetPercentage;\n\t\t} else if ( currentIndex === 1 && index === 0 && offsetPercentage < 0 ) {\n\t\t\ttranslateX = 100 + offsetPercentage;\n\t\t}\n\n\t\tif ( currentIndex !== previousIndex ) {\n\n\t\t\t// When swiped move the slide to the correct side.\n\t\t\tif ( 0 === previousIndex && 0 === index && 0 === offsetPercentage && 'left' === this.direction ) {\n\t\t\t\ttranslateX = 100;\n\t\t\t} else if ( 1 === previousIndex && 1 === index && 0 === offsetPercentage && 'right' === this.direction ) {\n\t\t\t\ttranslateX = -100;\n\t\t\t}\n\t\t} else {\n\n\t\t\t// Keep the slide on the correct slide even when not a swipe.\n\t\t\tif ( 0 === currentIndex && 1 === index && 0 === offsetPercentage && 'left' === this.direction ) {\n\t\t\t\ttranslateX = -100;\n\t\t\t} else if ( 1 === currentIndex && 0 === index && 0 === offsetPercentage && 'right' === this.direction ) {\n\t\t\t\ttranslateX = 100;\n\t\t\t}\n\t\t}\n\n\t\treturn translateX;\n\t}\n\n\t_getSlideStyle( index ) {\n\t\tconst { currentIndex, offsetPercentage } = this.state;\n\t\tconst { infinite, items } = this.props;\n\t\tconst baseTranslateX = -100 * currentIndex;\n\t\tconst totalSlides = items.length - 1;\n\n\t\t// calculates where the other slides belong based on currentIndex\n\t\tlet translateX = baseTranslateX + (index * 100) + offsetPercentage;\n\n\t\t// adjust zIndex so that only the current slide and the slide were going\n\t\t// to is at the top layer, this prevents transitions from flying in the\n\t\t// background when swiping before the first slide or beyond the last slide\n\t\tlet zIndex = 1;\n\t\tif ( index === currentIndex ) {\n\t\t\tzIndex = 3;\n\t\t} else if ( index === this.state.previousIndex ) {\n\t\t\tzIndex = 2;\n\t\t}\n\n\t\tif ( infinite && items.length > 2 ) {\n\t\t\tif ( currentIndex === 0 && index === totalSlides ) {\n\t\t\t\t// make the last slide the slide before the first\n\t\t\t\ttranslateX = -100 + offsetPercentage;\n\t\t\t} else if ( currentIndex === totalSlides && index === 0 ) {\n\t\t\t\t// make the first slide the slide after the last\n\t\t\t\ttranslateX = 100 + offsetPercentage;\n\t\t\t}\n\t\t}\n\n\t\t// Special case when there are only 2 items with infinite on\n\t\tif ( infinite && items.length === 2 ) {\n\t\t\ttranslateX = this._getTranslateXForTwoSlide( index );\n\t\t}\n\n\t\tconst translate3d = `translate3d(${ translateX }%, 0, 0)`;\n\n\t\treturn {\n\t\t\tWebkitTransform: translate3d,\n\t\t\tMozTransform: translate3d,\n\t\t\tmsTransform: translate3d,\n\t\t\tOTransform: translate3d,\n\t\t\ttransform: translate3d,\n\t\t\tzIndex: zIndex\n\t\t};\n\t}\n\n\t_getThumbnailStyle() {\n\t\tconst translate3d = `translate3d(${ this.state.thumbsTranslateX }px, 0, 0)`;\n\t\treturn {\n\t\t\tWebkitTransform: translate3d,\n\t\t\tMozTransform: translate3d,\n\t\t\tmsTransform: translate3d,\n\t\t\tOTransform: translate3d,\n\t\t\ttransform: translate3d\n\t\t};\n\t}\n\n\t_slideLeft( event ) {\n\t\tthis.slideToIndex( this.state.currentIndex - 1, event );\n\t}\n\n\t_slideRight( event ) {\n\t\tthis.slideToIndex( this.state.currentIndex + 1, event );\n\t}\n\n\t_renderItem( item ) {\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{\n\t\t\t\t\titem.description &&\n\t\t\t\t\t
\n\t\t\t\t\t\t{ item.description }\n\t\t\t\t\t
\n\t\t\t\t}\n\t\t\t
\n\t\t);\n\t}\n\n\trender() {\n\t\tconst { currentIndex } = this.state;\n\t\tconst thumbnailStyle = this._getThumbnailStyle();\n\t\tconst slideLeft = this._slideLeft.bind( this );\n\t\tconst slideRight = this._slideRight.bind( this );\n\n\t\tlet slides = [];\n\t\tlet thumbnails = [];\n\n\t\tthis.props.items.map( ( item, index ) => {\n\t\t\tconst alignment = this._getAlignmentClassName( index );\n\t\t\tconst originalClass = item.originalClass ? ` ${ item.originalClass }` : '';\n\t\t\tconst thumbnailClass = item.thumbnailClass ? ` ${ item.thumbnailClass }` : '';\n\n\t\t\tconst renderItem = item.renderItem || this.props.renderItem || this._renderItem.bind( this );\n\n\t\t\tconst slide = (\n\t\t\t\t\n\t\t\t\t\t{ renderItem( item ) }\n\t\t\t\t\n\t\t\t);\n\n\t\t\tif ( this.props.lazyLoad ) {\n\t\t\t\tif ( alignment ) {\n\t\t\t\t\tslides.push( slide );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tslides.push( slide );\n\t\t\t}\n\n\t\t\tthumbnails.push(\n\t\t\t\t this.slideToIndex.call( this, index, event ) }\n\t\t\t\t\tonClick={ event => this.slideToIndex.call( this, index, event ) }\n\t\t\t\t>\n\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t{ item.thumbnailLabel }\n\t\t\t\t\t
\n\t\t\t\t\n\t\t\t);\n\t\t} );\n\n\t\treturn (\n\t\t\t
this._imageGallery = i } className=\"image-gallery\">\n\t\t\t\t\n\t\t\t\t\t{\n\t\t\t\t\t\tthis._canNavigate() ?\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\tthis.props.showNav &&\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tthis._canSlideLeft() &&\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tthis._canSlideRight() &&\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t,\n\n\t\t\t\t\t\t\t\t
{ slides }
\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t:\n\t\t\t\t\t\t\t
{ slides }
\n\t\t\t\t\t}\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.props.showIndex &&\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{ this.state.currentIndex + 1 }\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{ this.props.indexSeparator }\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{ this.props.items.length }\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t this._imageGalleryThumbnail = i }\n\t\t\t\t>\n\t\t\t\t\t this._thumbnails = t }\n\t\t\t\t\t\tclassName=\"image-gallery-thumbnails-container\"\n\t\t\t\t\t\tstyle={ thumbnailStyle }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ thumbnails }\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t);\n\t}\n}\n\nImageGallery.propTypes = {\n\titems: PropTypes.array.isRequired,\n\tshowNav: PropTypes.bool,\n\tlazyLoad: PropTypes.bool,\n\tinfinite: PropTypes.bool,\n\tshowIndex: PropTypes.bool,\n\tshowThumbnails: PropTypes.bool,\n\tslideOnThumbnailHover: PropTypes.bool,\n\tdisableThumbnailScroll: PropTypes.bool,\n\tdisableArrowKeys: PropTypes.bool,\n\tdefaultImage: PropTypes.string,\n\tindexSeparator: PropTypes.string,\n\tstartIndex: PropTypes.number,\n\tslideInterval: PropTypes.number,\n\tonClick: PropTypes.func,\n\tonImageLoad: PropTypes.func,\n\tonImageError: PropTypes.func,\n\trenderItem: PropTypes.func,\n};\n\nImageGallery.defaultProps = {\n\titems: [],\n\tshowNav: true,\n\tlazyLoad: false,\n\tinfinite: true,\n\tshowIndex: false,\n\tshowThumbnails: true,\n\tslideOnThumbnailHover: false,\n\tdisableThumbnailScroll: false,\n\tdisableArrowKeys: false,\n\tindexSeparator: \" / \",\n\tstartIndex: 0,\n\tslideInterval: 3000\n};\n","/* global localeData */\n/**\n * Internal dependencies.\n */\nimport ImageGallery from './image-gallery';\n\nexport const Screenshots = ( { screenshots = [] } ) => {\n\tif ( ! screenshots ) {\n\t\treturn null;\n\t}\n\n\tconst items = screenshots.map( ( { caption, src } ) => ( {\n\t\toriginal: src,\n\t\toriginalAlt: '',\n\t\tthumbnail: src,\n\t\tthumbnailAlt: caption || '',\n\t\tdescription: caption || false,\n\t} ) );\n\n\treturn (\n\t\t
\n\t\t\t

{ localeData.screenshots }

\n\t\t\t\n\t\t
\n\t);\n};\n\nexport default Screenshots;\n","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\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 * 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'use strict';\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\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 (process.env.NODE_ENV !== 'production') {\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 (process.env.NODE_ENV !== 'production') {\n loggedTypeFailures = {};\n }\n}\n\nmodule.exports = checkPropTypes;\n","/**\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'use strict';\n\nvar ReactIs = require('react-is');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar checkPropTypes = require('./checkPropTypes');\n\nvar has = Function.call.bind(Object.prototype.hasOwnProperty);\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\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 (process.env.NODE_ENV !== 'production') {\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 (process.env.NODE_ENV !== 'production' && 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 (process.env.NODE_ENV !== 'production') {\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 process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\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 * 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 (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\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 = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\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'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","/** @license React v16.13.1\n * react-is.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\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'use strict';\n\n\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\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;\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; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary\n// (unstable) APIs that have been removed. Can we remove the symbols?\n\nvar REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;\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_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;\nvar REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\nvar REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\nvar REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;\nvar REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;\nvar REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;\nvar REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;\n\nfunction isValidElementType(type) {\n return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.\n type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);\n}\n\nfunction typeOf(object) {\n if (typeof object === 'object' && object !== null) {\n var $$typeof = object.$$typeof;\n\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n var type = object.type;\n\n switch (type) {\n case REACT_ASYNC_MODE_TYPE:\n case REACT_CONCURRENT_MODE_TYPE:\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n return type;\n\n default:\n var $$typeofType = type && type.$$typeof;\n\n switch ($$typeofType) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n case REACT_PROVIDER_TYPE:\n return $$typeofType;\n\n default:\n return $$typeof;\n }\n\n }\n\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n\n return undefined;\n} // AsyncMode is deprecated along with isAsyncMode\n\nvar AsyncMode = REACT_ASYNC_MODE_TYPE;\nvar ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\nvar hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated\n\nfunction isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}\nfunction isConcurrentMode(object) {\n return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;\n}\nfunction isContextConsumer(object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\n\nexports.AsyncMode = AsyncMode;\nexports.ConcurrentMode = ConcurrentMode;\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\nexports.isValidElementType = isValidElementType;\nexports.typeOf = typeOf;\n })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","module.exports = window[\"React\"];","module.exports = window[\"wp\"][\"element\"];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * External dependencies.\n */\nimport { render } from '@wordpress/element';\n\n/**\n * Internal dependencies.\n */\nimport Screenshots from './screenshots';\n\nfunction initializeScreenshots( id ) {\n\tconst container = document.getElementById( id );\n\tif ( ! container ) {\n\t\treturn;\n\t}\n\n\tconst elements = container.querySelectorAll( 'figure' );\n\tconst images = [];\n\tfor ( let i = 0; i < elements.length; i++ ) {\n\t\tconst caption = elements[ i ].querySelector( 'figcaption' );\n\t\tconst item = {\n\t\t\tsrc: elements[ i ].querySelector( 'img.screenshot' ).src,\n\t\t\tcaption: caption ? caption.textContent : '',\n\t\t};\n\t\timages.push( item );\n\t}\n\n\tif ( images.length > 0 ) {\n\t\trender( , container );\n\t}\n}\n\ninitializeScreenshots( 'screenshots' );\n"],"names":["PropTypes","MIN_INTERVAL","throttle","func","wait","context","args","result","timeout","previous","later","Date","getTime","apply","now","remaining","arguments","clearTimeout","setTimeout","debounceEventHandler","throttled","event","persist","ImageGallery","React","Component","constructor","props","state","currentIndex","startIndex","thumbsTranslateX","offsetPercentage","galleryWidth","thumbnailWidth","componentWillReceiveProps","nextProps","disableArrowKeys","window","removeEventListener","_handleKeyDown","addEventListener","componentDidUpdate","prevProps","prevState","showThumbnails","_setThumbsTranslateX","_getThumbsTranslateX","_updateThumbnailTranslateX","componentWillMount","_slideLeft","bind","_slideRight","_handleResize","_thumbnailDelay","componentDidMount","componentWillUnmount","_intervalId","clearInterval","fullScreen","gallery","_imageGallery","requestFullscreen","msRequestFullscreen","mozRequestFullScreen","webkitRequestFullscreen","slideToIndex","index","preventDefault","slideCount","items","length","setState","previousIndex","style","transition","getCurrentIndex","offsetWidth","_imageGalleryThumbnail","LEFT_ARROW","RIGHT_ARROW","key","parseInt","keyCode","which","_canSlideLeft","_canSlideRight","_handleMouseOverThumbnails","slideOnThumbnailHover","hovering","_thumbnailTimer","_handleMouseLeaveThumbnails","_handleMouseOver","_handleMouseLeave","_handleImageError","defaultImage","target","src","indexOf","_canNavigate","infinite","indexDifference","Math","abs","scrollX","disableThumbnailScroll","_thumbnails","scrollWidth","totalThumbnails","children","totalScrollX","perIndexScrollX","_getAlignmentClassName","alignment","LEFT","CENTER","RIGHT","_getTranslateXForTwoSlide","baseTranslateX","translateX","direction","_getSlideStyle","totalSlides","zIndex","translate3d","WebkitTransform","MozTransform","msTransform","OTransform","transform","_getThumbnailStyle","_renderItem","item","createElement","className","href","original","alt","originalAlt","srcSet","sizes","onLoad","onImageLoad","onError","description","render","thumbnailStyle","slideLeft","slideRight","slides","thumbnails","map","originalClass","thumbnailClass","renderItem","slide","Object","assign","onClick","lazyLoad","push","type","onMouseOver","onMouseLeave","onTouchStart","call","thumbnail","thumbnailAlt","thumbnailLabel","ref","i","showNav","showIndex","indexSeparator","t","propTypes","array","isRequired","bool","string","number","slideInterval","onImageError","defaultProps","Screenshots","screenshots","caption","id","localeData","initializeScreenshots","container","document","getElementById","elements","querySelectorAll","images","querySelector","textContent"],"sourceRoot":""} \ No newline at end of file diff --git a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/front-page/render.php b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/front-page/render.php index a3cd1d374e..7f1efb1730 100644 --- a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/front-page/render.php +++ b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/front-page/render.php @@ -1,5 +1,8 @@ __( 'Block-Enabled Plugins', 'wporg-plugins' ), @@ -53,15 +56,16 @@ ]; } - $section_query = new \WP_Query( $section_args ); + $wp_query = new WP_Query( $section_args ); // If the user doesn't have any favorites, omit the section. - if ( 'favorites' === $browse && ! $section_query->have_posts() ) { + if ( 'favorites' === $browse && ! $wp_query->have_posts() ) { + wp_reset_query(); continue; } ?> -
+

"> @@ -76,15 +80,23 @@
have_posts() ) : - $section_query->the_post(); - - get_template_part( 'template-parts/plugin', 'index' ); - endwhile; + echo do_blocks( << +
+ + + +
+ + BLOCKS + ); ?>
- + diff --git a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/plugin-card/index.php b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/plugin-card/index.php index 9b0875e28d..7fa5edbd28 100644 --- a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/plugin-card/index.php +++ b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/plugin-card/index.php @@ -20,13 +20,3 @@ function init() { register_block_type( __DIR__ . '/../../../js/build/blocks/plugin-card' ); } - -// TODO: Figure out how to add a post_class for wrapping a block... -add_filter( 'render_block_core/post-template', function( $html, $block ) { - // If the post-template has the 'plugin-cards' class, add the 'plugin-card' class to the child blocks - if ( ! empty( $block['attrs']['className'] ) && str_contains( $block['attrs']['className'], 'plugin-cards' ) ) { - $html = str_replace( 'class="wp-block-post ', 'class="wp-block-post plugin-card ', $html ); - } - - return $html; -}, 10, 2 ); \ No newline at end of file diff --git a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/plugin-card/render.php b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/plugin-card/render.php index bf47d11ba3..650fa29a53 100644 --- a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/plugin-card/render.php +++ b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/src/blocks/plugin-card/render.php @@ -1,2 +1,53 @@ ID, 'tested', true ); +?> +
+ + + +
+
+
+ ', '' ); ?> +
+ + + +
+ +
+
+
+
+ + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/template-parts/plugin.php b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/template-parts/plugin.php deleted file mode 100644 index b9fc52d646..0000000000 --- a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/template-parts/plugin.php +++ /dev/null @@ -1,60 +0,0 @@ -ID, 'tested', true ); -?> -
- - - -
-
- ', '' ); ?> -
- - - -
- -
-
-
-
- - - - - - - - - - - - - - - - - -
- \ No newline at end of file From 9260f8f18805131a2d791e738488073872bb2f41 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Fri, 1 Mar 2024 07:02:14 +0000 Subject: [PATCH 3/5] Convert the totally not needed bolding of term in header to a variation, which is insanely hacky, because variations are not supported by Gutenberg in any reasonable format. --- .../pub/wporg-plugins-2024/functions.php | 70 ++++++++++++++----- .../wporg-plugins-2024/templates/archive.html | 4 +- 2 files changed, 55 insertions(+), 19 deletions(-) diff --git a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/functions.php b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/functions.php index c983b5a338..cb58157fb9 100644 --- a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/functions.php +++ b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/functions.php @@ -415,24 +415,6 @@ function social_meta_data() { } add_action( 'wp_head', __NAMESPACE__ . '\social_meta_data' ); -/** - * Bold archive terms are made here. - * - * @param string $term The archive term to bold. - * @return string - */ -function strong_archive_title( $term ) { - return '' . $term . ''; -} -add_action( 'wp_head', function() { - // TODO: This no longer fires, as it's rendered before `wp_head` when using blocks. - add_filter( 'post_type_archive_title', __NAMESPACE__ . '\strong_archive_title' ); - add_filter( 'single_term_title', __NAMESPACE__ . '\strong_archive_title' ); - add_filter( 'single_cat_title', __NAMESPACE__ . '\strong_archive_title' ); - add_filter( 'single_tag_title', __NAMESPACE__ . '\strong_archive_title' ); - add_filter( 'get_the_date', __NAMESPACE__ . '\strong_archive_title' ); -} ); - /** * Filter the archive title to use custom string for business model. * @@ -469,3 +451,55 @@ function update_archive_description( $description ) { * Custom template tags for this theme. */ require get_stylesheet_directory() . '/inc/template-tags.php'; + +// TODO Maybe get_block_type_variations +add_filter( 'register_block_type_args', function( $args ) { + if ( 'core/query-title' === $args['name'] ) { + $args['variations'] ??= []; + $args['variations'][] = [ + 'name' => 'bolded', + 'title' => 'Bolded query', + 'attributes' => [ + 'variantType' => 'bolded', + ], + 'render_callback' => function( $attributes, $content, $original_render_callback) { + $strong_filter = function( $term ) { + return '' . $term . ''; + }; + + foreach ( [ 'post_type_archive_title', 'single_term_title', 'single_cat_title', 'single_tag_title', 'get_the_date' ] as $filter_name ) { + add_filter( $filter_name, $strong_filter ); + } + + $return = $original_render_callback( $attributes, $content ); + + foreach ( [ 'post_type_archive_title', 'single_term_title', 'single_cat_title', 'single_tag_title', 'get_the_date' ] as $filter_name ) { + remove_filter( $filter_name, $strong_filter ); + } + + return $return; + }, + ]; + + // A render callback and intercepts and re-routes the render to the individual variation render callback. + $render_callback = $args['render_callback']; + $args['render_callback'] = function( $attributes, $content ) use( $render_callback ) { + $variation = $attributes['variantType'] ?? false; + + if ( $variation ) { + $block = \WP_Block_Type_Registry::get_instance()->get_registered( 'core/query-title' ); + + $variations = $block->get_variations(); + $variation = wp_list_filter( $variations, [ 'name' => $variation ] ); + if ( ! empty( $variation[0]['render_callback'] ) ) { + $callback = $variation[0]['render_callback']; + return $callback( $attributes, $content, $render_callback ); + } + } + + return $render_callback( $attributes, $content ); + }; + } + + return $args; +} ); \ No newline at end of file diff --git a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/templates/archive.html b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/templates/archive.html index ea875d6bbf..9d1873b333 100644 --- a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/templates/archive.html +++ b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/templates/archive.html @@ -3,7 +3,9 @@
- +
+ +
From fa4a5376a3d631bbecf8c89fd566838f87923072 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Fri, 1 Mar 2024 07:15:44 +0000 Subject: [PATCH 4/5] Add the footer to archives. --- .../themes/pub/wporg-plugins-2024/templates/archive.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/templates/archive.html b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/templates/archive.html index 9d1873b333..51e6759918 100644 --- a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/templates/archive.html +++ b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/templates/archive.html @@ -15,4 +15,6 @@
- \ No newline at end of file + + + \ No newline at end of file From 9f364d396d393e73e7b570209a96750ea09bedfc Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Fri, 1 Mar 2024 17:25:38 +1000 Subject: [PATCH 5/5] Add the footer to the search archive. --- .../themes/pub/wporg-plugins-2024/templates/search.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/templates/search.html b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/templates/search.html index dccd65f86f..7cd62bd0da 100644 --- a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/templates/search.html +++ b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/templates/search.html @@ -11,4 +11,6 @@ - \ No newline at end of file + + +