@times-components/related-articles 6.20.8 → 6.20.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [6.20.9](https://github.com/newsuk/times-components/compare/@times-components/related-articles@6.20.8...@times-components/related-articles@6.20.9) (2025-06-02)
7
+
8
+ **Note:** Version bump only for package @times-components/related-articles
9
+
10
+
11
+
12
+
13
+
6
14
  ## [6.20.8](https://github.com/newsuk/times-components/compare/@times-components/related-articles@6.20.7...@times-components/related-articles@6.20.8) (2025-05-20)
7
15
 
8
16
  **Note:** Version bump only for package @times-components/related-articles
@@ -21,8 +21,7 @@ var relatedArticleItemPropTypes = _objectSpread(_objectSpread({}, _relatedArticl
21
21
  bylineClass: _propTypes["default"].string,
22
22
  contentContainerClass: _propTypes["default"].string,
23
23
  headlineClass: _propTypes["default"].string,
24
- imageContainerClass: _propTypes["default"].string,
25
- isWebPFormatActive: _propTypes["default"].bool
24
+ imageContainerClass: _propTypes["default"].string
26
25
  });
27
26
 
28
27
  exports.relatedArticleItemPropTypes = relatedArticleItemPropTypes;
@@ -31,8 +30,7 @@ var relatedArticleItemDefaultProps = _objectSpread(_objectSpread({}, _relatedArt
31
30
  bylineClass: "",
32
31
  contentContainerClass: "",
33
32
  headlineClass: "",
34
- imageContainerClass: "",
35
- isWebPFormatActive: false
33
+ imageContainerClass: ""
36
34
  });
37
35
 
38
36
  exports.relatedArticleItemDefaultProps = relatedArticleItemDefaultProps;
@@ -140,8 +140,7 @@ var RelatedArticleItem = /*#__PURE__*/function (_Component) {
140
140
  summaryLengths = _this$props$summaryCo2 === void 0 ? [] : _this$props$summaryCo2,
141
141
  _this$props$summaryCo3 = _this$props$summaryCo.style,
142
142
  summaryStyle = _this$props$summaryCo3 === void 0 ? {} : _this$props$summaryCo3,
143
- summaryType = _this$props$summaryCo.type,
144
- isWebPFormatActive = _this$props.isWebPFormatActive;
143
+ summaryType = _this$props$summaryCo.type;
145
144
  var article = this.props.article;
146
145
  var highResSize = this.state.highResSize;
147
146
  var imageUri = getImageUri(leadAsset, leadAssetOverride, cropSize);
@@ -161,8 +160,7 @@ var RelatedArticleItem = /*#__PURE__*/function (_Component) {
161
160
  lowResQuality: 3,
162
161
  lowResSize: 200,
163
162
  relatedArticle: true,
164
- showImage: showImage,
165
- isWebPFormatActive: isWebPFormatActive
163
+ showImage: showImage
166
164
  }, /*#__PURE__*/_react["default"].createElement(_articleSummary["default"], {
167
165
  bylineProps: {
168
166
  ast: bylines,
@@ -17,7 +17,6 @@ var _default = {
17
17
  article: _relatedArticleItemPropTypes.relatedArticleItemPropTypes.article
18
18
  })),
19
19
  sliceName: _propTypes["default"].string.isRequired
20
- }).isRequired,
21
- isWebPFormatActive: _propTypes["default"].bool
20
+ }).isRequired
22
21
  };
23
22
  exports["default"] = _default;
@@ -80,8 +80,7 @@ var RelatedArticles = /*#__PURE__*/function (_Component) {
80
80
  onPress = _this$props2.onPress,
81
81
  slice = _this$props2.slice,
82
82
  heading = _this$props2.heading,
83
- hideBorder = _this$props2.hideBorder,
84
- isWebPFormatActive = _this$props2.isWebPFormatActive;
83
+ hideBorder = _this$props2.hideBorder;
85
84
  if (!slice) return null;
86
85
  var items = slice.items,
87
86
  sliceName = slice.sliceName;
@@ -123,8 +122,7 @@ var RelatedArticles = /*#__PURE__*/function (_Component) {
123
122
  onPress: onPress,
124
123
  showImage: showImage,
125
124
  showSummary: showSummary,
126
- summaryConfig: summaryConfig,
127
- isWebPFormatActive: isWebPFormatActive
125
+ summaryConfig: summaryConfig
128
126
  });
129
127
  };
130
128
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@times-components/related-articles",
3
- "version": "6.20.8",
3
+ "version": "6.20.9",
4
4
  "description": "related articles of an article",
5
5
  "main": "dist/related-articles",
6
6
  "dev": "src/related-articles",
@@ -55,8 +55,8 @@
55
55
  "webpack": "4.30.0"
56
56
  },
57
57
  "dependencies": {
58
- "@times-components/article-summary": "3.25.63",
59
- "@times-components/card": "6.17.2",
58
+ "@times-components/article-summary": "3.25.64",
59
+ "@times-components/card": "6.17.3",
60
60
  "@times-components/context": "1.25.9",
61
61
  "@times-components/link": "3.18.1",
62
62
  "@times-components/markup-forest": "1.9.2",
@@ -79,5 +79,5 @@
79
79
  "publishConfig": {
80
80
  "access": "public"
81
81
  },
82
- "gitHead": "8af47351388cdfa2335dd251f9f1d246a3c775a2"
82
+ "gitHead": "50d119fdd27d22c980a54bff3c9617eff0eaac96"
83
83
  }
package/rnw.js CHANGED
@@ -1 +1 @@
1
- module.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=13)}([function(e,t){e.exports=require("prop-types")},function(e,t){e.exports=require("react")},function(e,t){e.exports=require("@times-components/ts-styleguide/rnw")},function(e,t){e.exports=require("@times-components/utils/rnw")},function(e,t){e.exports=require("@times-components/markup-forest/rnw")},function(e,t){e.exports=require("@times-components/tracking/rnw")},function(e,t){e.exports=require("@times-components/article-summary/rnw")},function(e,t){var r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/,o=/^\./,i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,c=/^\[object .+?Constructor\]$/,s="object"==typeof global&&global&&global.Object===Object&&global,l="object"==typeof self&&self&&self.Object===Object&&self,u=s||l||Function("return this")();var f,p=Array.prototype,y=Function.prototype,d=Object.prototype,m=u["__core-js_shared__"],b=(f=/[^.]+$/.exec(m&&m.keys&&m.keys.IE_PROTO||""))?"Symbol(src)_1."+f:"",h=y.toString,g=d.hasOwnProperty,v=d.toString,O=RegExp("^"+h.call(g).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),j=u.Symbol,_=p.splice,w=H(u,"Map"),P=H(Object,"create"),C=j?j.prototype:void 0,S=C?C.toString:void 0;function R(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function E(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function x(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function k(e,t){for(var r,n,o=e.length;o--;)if((r=e[o][0])===(n=t)||r!=r&&n!=n)return o;return-1}function T(e,t){for(var o,i=0,a=(t=function(e,t){if(F(e))return!1;var o=typeof e;if("number"==o||"symbol"==o||"boolean"==o||null==e||V(e))return!0;return n.test(e)||!r.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:F(o=t)?o:B(o)).length;null!=e&&i<a;)e=e[q(t[i++])];return i&&i==a?e:void 0}function A(e){return!(!I(e)||(t=e,b&&b in t))&&(function(e){var t=I(e)?v.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?O:c).test(function(e){if(null!=e){try{return h.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e));var t}function D(e,t){var r,n,o=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map}function H(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return A(r)?r:void 0}R.prototype.clear=function(){this.__data__=P?P(null):{}},R.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},R.prototype.get=function(e){var t=this.__data__;if(P){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return g.call(t,e)?t[e]:void 0},R.prototype.has=function(e){var t=this.__data__;return P?void 0!==t[e]:g.call(t,e)},R.prototype.set=function(e,t){return this.__data__[e]=P&&void 0===t?"__lodash_hash_undefined__":t,this},E.prototype.clear=function(){this.__data__=[]},E.prototype.delete=function(e){var t=this.__data__,r=k(t,e);return!(r<0)&&(r==t.length-1?t.pop():_.call(t,r,1),!0)},E.prototype.get=function(e){var t=this.__data__,r=k(t,e);return r<0?void 0:t[r][1]},E.prototype.has=function(e){return k(this.__data__,e)>-1},E.prototype.set=function(e,t){var r=this.__data__,n=k(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},x.prototype.clear=function(){this.__data__={hash:new R,map:new(w||E),string:new R}},x.prototype.delete=function(e){return D(this,e).delete(e)},x.prototype.get=function(e){return D(this,e).get(e)},x.prototype.has=function(e){return D(this,e).has(e)},x.prototype.set=function(e,t){return D(this,e).set(e,t),this};var B=z((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(V(e))return S?S.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var r=[];return o.test(e)&&r.push(""),e.replace(i,(function(e,t,n,o){r.push(n?o.replace(a,"$1"):t||e)})),r}));function q(e){if("string"==typeof e||V(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function z(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a),a};return r.cache=new(z.Cache||x),r}z.Cache=x;var F=Array.isArray;function I(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function V(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==v.call(e)}e.exports=function(e,t,r){var n=null==e?void 0:T(e,t);return void 0===n?r:n}},function(e,t){e.exports=require("@times-components/slice-layout/rnw")},function(e,t){e.exports=require("styled-components")},function(e,t){e.exports=require("@times-components/context/rnw")},function(e,t){e.exports=require("@times-components/link/rnw")},function(e,t){e.exports=require("@times-components/card/rnw")},function(e,t,r){"use strict";r.r(t);var n=r(1),o=r.n(n),i=r(3),a=r(8),c=r(9),s=r.n(c),l=r(0),u=r.n(l),f=r(2);function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?p(Object(r),!0).forEach((function(t){d(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var m={byline:{marginBottom:0},headline:y(y({color:f.colours.functional.primary},Object(f.fontFactory)({font:"headline",fontSize:"smallHeadline"})),{},{fontWeight:"400",marginBottom:Object(f.spacing)(1),marginTop:0}),opinionByline:{lineHeight:24,marginBottom:0,marginTop:0},title:y({color:f.colours.functional.primary},Object(f.fontFactory)({font:"headline",fontSize:"pageComponentHeadline"})),titleContainer:{alignItems:"center",borderBottomColor:f.colours.functional.keyline,borderBottomWidth:1,borderStyle:"solid",borderTopColor:f.colours.functional.keyline,borderTopWidth:1,display:"flex",justifyContent:"center",padding:Object(f.spacing)(2)}};function b(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?b(Object(r),!0).forEach((function(t){g(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function g(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var v=h(h({},m),{},{title:h(h({},m.title),{},{paddingTop:Object(f.spacing)(1)}),titleContainer:h(h({},m.titleContainer),{},{padding:Object(f.spacing)(3)})}),O=s.a.h3.withConfig({displayName:"related-articles-heading__HeadingForRelatedArticles",componentId:"sc-1m1bjcq-0"})(["border:0px solid black;box-sizing:border-box;display:inline;font-size:14px;font-family:sans-serif;margin:0px;padding:0px;white-space:pre-wrap;overflow-wrap:break-word;",";"],(function(e){return e.styles&&e.styles})),j=function(e){var t=e.heading;return o.a.createElement(i.TcView,{style:v.titleContainer},o.a.createElement(O,{role:"heading","aria-level":"3",styles:Object(i.checkStylesForUnits)(v.title)},t))};j.defaultProps={heading:"Related articles"};var _=j,w=r(10),P=r.n(w),C=r(11),S=r.n(C),R=r(7),E=r.n(R),x=r(6),k=r.n(x),T=r(12),A=r.n(T),D=r(4);function H(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function B(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?H(Object(r),!0).forEach((function(t){q(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):H(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function q(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var z=B(B({},{article:u.a.shape({bylines:u.a.arrayOf(D.propTypes),hasVideo:u.a.bool,headline:u.a.string,label:u.a.string,publishedTime:u.a.string.isRequired,shortHeadline:u.a.string,summary105:u.a.arrayOf(D.propTypes),summary125:u.a.arrayOf(D.propTypes).isRequired,summary145:u.a.arrayOf(D.propTypes),summary160:u.a.arrayOf(D.propTypes),summary175:u.a.arrayOf(D.propTypes),summary225:u.a.arrayOf(D.propTypes),url:u.a.string}),imageConfig:u.a.shape({cropSize:u.a.string,imageRatio:u.a.number,style:u.a.object}),isOpinionByline:u.a.bool,isReversed:u.a.bool,showImage:u.a.bool,showSummary:u.a.bool,summaryConfig:u.a.shape({lengths:u.a.arrayOf(u.a.number),style:u.a.object,type:u.a.string})}),{},{bylineClass:u.a.string,contentContainerClass:u.a.string,headlineClass:u.a.string,imageContainerClass:u.a.string,isWebPFormatActive:u.a.bool}),F=B(B({},{article:null,hasVideo:!1,imageConfig:{},isOpinionByline:!1,isReversed:!1,showImage:!0,showSummary:!0,summary105:[],summary145:[],summary160:[],summary175:[],summary225:[],summaryConfig:{}}),{},{bylineClass:"",contentContainerClass:"",headlineClass:"",imageContainerClass:"",isWebPFormatActive:!1}),I=function(e,t){return t||e};function V(e){return(V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function N(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function W(e,t){return(W=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function $(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=U(e);if(t){var o=U(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return M(this,r)}}function M(e,t){return!t||"object"!==V(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function U(e){return(U=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var G=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&W(e,t)}(s,e);var t,r,a,c=$(s);function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(t=c.call(this,e)).node=Object(n.createRef)(),t.state={highResSize:null},t}return t=s,(r=[{key:"componentDidMount",value:function(){this.props.imageConfig.showHiRes&&this.setHighResSize()}},{key:"componentDidUpdate",value:function(e){var t=this.props.imageConfig;e.imageConfig.showHiRes!==t.showHiRes&&t.showHiRes&&this.setHighResSize()}},{key:"setHighResSize",value:function(){this.setState({highResSize:this.node.current.clientWidth})}},{key:"render",value:function(){var e=this.props,t=e.article,r=t.bylines,n=t.hasVideo,a=t.headline,c=t.label,s=t.leadAsset,l=t.publishedTime,u=t.section,p=t.shortHeadline,y=e.bylineClass,d=e.children,m=e.contentContainerClass,b=e.headlineClass,h=e.imageConfig,g=h.cropSize,O=void 0===g?"169":g,j=h.imageRatio,_=void 0===j?16/9:j,w=h.style,P=void 0===w?{}:w,C=e.imageContainerClass,S=e.isOpinionByline,R=e.isReversed,T=e.leadAssetOverride,D=e.onPress,H=e.showImage,B=e.showSummary,q=e.summaryConfig,z=q.lengths,F=void 0===z?[]:z,V=q.style,N=void 0===V?{}:V,W=q.type,$=e.isWebPFormatActive,M=this.props.article,U=this.state.highResSize,G=function(e,t,r){var n=t||e;return n?n.posterImage?E()(n,"posterImage.crop".concat(r,".url")):E()(n,"crop".concat(r,".url")):null}(s,T,O);return d({article:M,card:o.a.createElement(i.TcView,{ref:this.node},o.a.createElement(A.a,{contentContainerClass:m,highResSize:U,imageContainerClass:C,imageAccessibilityLabel:p,imageRatio:_,imageStyle:P,imageUri:G,isReversed:R,lowResQuality:3,lowResSize:200,relatedArticle:!0,showImage:H,isWebPFormatActive:$},o.a.createElement(k.a,{bylineProps:{ast:r,bylineClass:y,color:f.colours.section[u]||f.colours.section.default,isOpinionByline:S},content:B&&o.a.createElement(i.TcView,{style:N},F.map((function(e){var t="".concat(e,"Class"),r=W?"".concat(W,"Summary"):"summary";return o.a.createElement(x.ArticleSummaryContent,{ast:M["summary".concat(e)],className:"summaryHidden ".concat(r).concat(t),key:e})}))),datePublicationProps:{date:l,showDay:!1},headline:o.a.createElement(x.ArticleSummaryHeadline,{className:b,headline:I(a,p),style:v.headline}),labelProps:{color:f.colours.section[u]||f.colours.section.default,isVideo:n,title:c}}))),onPress:D})}}])&&N(t.prototype,r),a&&N(t,a),s}(n.Component);G.defaultProps=F;var L=G,Q=r(5),J=function(e){return o.a.createElement("div",{"data-testid":"related-article-item"},o.a.createElement(L,e,(function(e){var t=e.article,r=e.card,n=e.onPress;return o.a.createElement(P.a.Consumer,null,(function(){return o.a.createElement(S.a,{linkStyle:{padding:10},onPress:function(e){return n(e,{url:t.url})},url:t.url},r)}))})))};J.displayName="RelatedArticleItem";var K,X=(K=J,Object(Q.withTrackEvents)(K,{analyticsEvents:[{actionName:"Pressed",eventName:"onPress",getAttrs:function(e){var t=e.article,r=t.headline,n=t.id,o=t.url;return{targetArticleHeadline:t.shortHeadline||r,targetArticleId:n,targetArticleUrl:o}}}]})),Y=(u.a.shape({items:u.a.arrayOf(u.a.shape({article:z.article})),sliceName:u.a.string.isRequired}).isRequired,u.a.bool,["standard-1","standard-2","standard-3"]);function Z(e){return(Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function te(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(r),!0).forEach((function(t){re(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ee(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function re(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ie(e,t){return(ie=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ae(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=se(e);if(t){var o=se(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ce(this,r)}}function ce(e,t){return!t||"object"!==Z(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function se(e){return(se=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var le=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ie(e,t)}(s,e);var t,r,n,c=ae(s);function s(){return ne(this,s),c.apply(this,arguments)}return t=s,(r=[{key:"shouldComponentUpdate",value:function(e){var t=this.props,r=t.isVisible,n=t.slice;return e.isVisible!==r||e.slice!==n}},{key:"render",value:function(){var e=this.props,t=e.isVisible,r=e.onPress,n=e.slice,c=e.heading,s=e.hideBorder,l=e.isWebPFormatActive;if(!n)return null;var u=n.items,f=n.sliceName;return!f||"StandardSlice"!==f&&"DraftStandardSlice"!==f||!u?null:o.a.createElement(i.TcView,null,o.a.createElement(_,{heading:c}),o.a.createElement(a.StandardSlice,{hideBorder:s,itemCount:u.length,renderItems:function(e){return u.map((function(n){return function(e,n,i){var a=e.bylineClass,c=void 0===a?"":a,s=e.contentContainerClass,u=e.headlineClass,f=void 0===u?"":u,p=e.imageConfig,y=void 0===p?{}:p,d=e.imageContainerClass,m=e.isOpinionByline,b=void 0!==m&&m,h=e.isReversed,g=void 0!==h&&h,v=e.showImage,O=void 0===v||v,j=e.showSummary,_=void 0!==j&&j,w=e.summaryConfig,P=void 0===w?{}:w;return o.a.createElement(X,{article:n,bylineClass:c,contentContainerClass:s,headlineClass:f,id:n.id,imageConfig:te(te({},y),{},{showHiRes:t}),imageContainerClass:d,isOpinionByline:b,isReversed:g,key:n.id,leadAssetOverride:i,onPress:r,showImage:O,showSummary:_,summaryConfig:P,isWebPFormatActive:l})}(e,n.article,n.leadAsset)}))}}))}}])&&oe(t.prototype,r),n&&oe(t,n),s}(n.Component);t.default=function(e){return Object(Q.withTrackingContext)(e,{getAttrs:function(e){var t=e.slice,r=t.items,n=t.sliceName;if(!n)return null;var o={articles:[],template:n};return r?(o.articles=r.map((function(e,t){var r=e.article,n=r.headline,o=r.id,i=r.shortHeadline;return{headline:I(n,i),id:o,role:Y[t]}})),o):o},trackingObjectName:"Article"})}(le)}]);
1
+ module.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=13)}([function(e,t){e.exports=require("prop-types")},function(e,t){e.exports=require("react")},function(e,t){e.exports=require("@times-components/ts-styleguide/rnw")},function(e,t){e.exports=require("@times-components/utils/rnw")},function(e,t){e.exports=require("@times-components/markup-forest/rnw")},function(e,t){e.exports=require("@times-components/tracking/rnw")},function(e,t){e.exports=require("@times-components/article-summary/rnw")},function(e,t){var r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/,o=/^\./,i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,c=/^\[object .+?Constructor\]$/,s="object"==typeof global&&global&&global.Object===Object&&global,l="object"==typeof self&&self&&self.Object===Object&&self,u=s||l||Function("return this")();var f,p=Array.prototype,y=Function.prototype,d=Object.prototype,m=u["__core-js_shared__"],b=(f=/[^.]+$/.exec(m&&m.keys&&m.keys.IE_PROTO||""))?"Symbol(src)_1."+f:"",h=y.toString,g=d.hasOwnProperty,v=d.toString,O=RegExp("^"+h.call(g).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),j=u.Symbol,_=p.splice,w=H(u,"Map"),C=H(Object,"create"),P=j?j.prototype:void 0,S=P?P.toString:void 0;function R(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function E(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function x(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function k(e,t){for(var r,n,o=e.length;o--;)if((r=e[o][0])===(n=t)||r!=r&&n!=n)return o;return-1}function T(e,t){for(var o,i=0,a=(t=function(e,t){if(I(e))return!1;var o=typeof e;if("number"==o||"symbol"==o||"boolean"==o||null==e||N(e))return!0;return n.test(e)||!r.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:I(o=t)?o:B(o)).length;null!=e&&i<a;)e=e[q(t[i++])];return i&&i==a?e:void 0}function D(e){return!(!V(e)||(t=e,b&&b in t))&&(function(e){var t=V(e)?v.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?O:c).test(function(e){if(null!=e){try{return h.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e));var t}function A(e,t){var r,n,o=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map}function H(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return D(r)?r:void 0}R.prototype.clear=function(){this.__data__=C?C(null):{}},R.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},R.prototype.get=function(e){var t=this.__data__;if(C){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return g.call(t,e)?t[e]:void 0},R.prototype.has=function(e){var t=this.__data__;return C?void 0!==t[e]:g.call(t,e)},R.prototype.set=function(e,t){return this.__data__[e]=C&&void 0===t?"__lodash_hash_undefined__":t,this},E.prototype.clear=function(){this.__data__=[]},E.prototype.delete=function(e){var t=this.__data__,r=k(t,e);return!(r<0)&&(r==t.length-1?t.pop():_.call(t,r,1),!0)},E.prototype.get=function(e){var t=this.__data__,r=k(t,e);return r<0?void 0:t[r][1]},E.prototype.has=function(e){return k(this.__data__,e)>-1},E.prototype.set=function(e,t){var r=this.__data__,n=k(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},x.prototype.clear=function(){this.__data__={hash:new R,map:new(w||E),string:new R}},x.prototype.delete=function(e){return A(this,e).delete(e)},x.prototype.get=function(e){return A(this,e).get(e)},x.prototype.has=function(e){return A(this,e).has(e)},x.prototype.set=function(e,t){return A(this,e).set(e,t),this};var B=z((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(N(e))return S?S.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var r=[];return o.test(e)&&r.push(""),e.replace(i,(function(e,t,n,o){r.push(n?o.replace(a,"$1"):t||e)})),r}));function q(e){if("string"==typeof e||N(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function z(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a),a};return r.cache=new(z.Cache||x),r}z.Cache=x;var I=Array.isArray;function V(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function N(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==v.call(e)}e.exports=function(e,t,r){var n=null==e?void 0:T(e,t);return void 0===n?r:n}},function(e,t){e.exports=require("@times-components/slice-layout/rnw")},function(e,t){e.exports=require("styled-components")},function(e,t){e.exports=require("@times-components/context/rnw")},function(e,t){e.exports=require("@times-components/link/rnw")},function(e,t){e.exports=require("@times-components/card/rnw")},function(e,t,r){"use strict";r.r(t);var n=r(1),o=r.n(n),i=r(3),a=r(8),c=r(9),s=r.n(c),l=r(0),u=r.n(l),f=r(2);function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?p(Object(r),!0).forEach((function(t){d(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var m={byline:{marginBottom:0},headline:y(y({color:f.colours.functional.primary},Object(f.fontFactory)({font:"headline",fontSize:"smallHeadline"})),{},{fontWeight:"400",marginBottom:Object(f.spacing)(1),marginTop:0}),opinionByline:{lineHeight:24,marginBottom:0,marginTop:0},title:y({color:f.colours.functional.primary},Object(f.fontFactory)({font:"headline",fontSize:"pageComponentHeadline"})),titleContainer:{alignItems:"center",borderBottomColor:f.colours.functional.keyline,borderBottomWidth:1,borderStyle:"solid",borderTopColor:f.colours.functional.keyline,borderTopWidth:1,display:"flex",justifyContent:"center",padding:Object(f.spacing)(2)}};function b(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?b(Object(r),!0).forEach((function(t){g(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function g(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var v=h(h({},m),{},{title:h(h({},m.title),{},{paddingTop:Object(f.spacing)(1)}),titleContainer:h(h({},m.titleContainer),{},{padding:Object(f.spacing)(3)})}),O=s.a.h3.withConfig({displayName:"related-articles-heading__HeadingForRelatedArticles",componentId:"sc-1m1bjcq-0"})(["border:0px solid black;box-sizing:border-box;display:inline;font-size:14px;font-family:sans-serif;margin:0px;padding:0px;white-space:pre-wrap;overflow-wrap:break-word;",";"],(function(e){return e.styles&&e.styles})),j=function(e){var t=e.heading;return o.a.createElement(i.TcView,{style:v.titleContainer},o.a.createElement(O,{role:"heading","aria-level":"3",styles:Object(i.checkStylesForUnits)(v.title)},t))};j.defaultProps={heading:"Related articles"};var _=j,w=r(10),C=r.n(w),P=r(11),S=r.n(P),R=r(7),E=r.n(R),x=r(6),k=r.n(x),T=r(12),D=r.n(T),A=r(4);function H(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function B(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?H(Object(r),!0).forEach((function(t){q(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):H(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function q(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var z=B(B({},{article:u.a.shape({bylines:u.a.arrayOf(A.propTypes),hasVideo:u.a.bool,headline:u.a.string,label:u.a.string,publishedTime:u.a.string.isRequired,shortHeadline:u.a.string,summary105:u.a.arrayOf(A.propTypes),summary125:u.a.arrayOf(A.propTypes).isRequired,summary145:u.a.arrayOf(A.propTypes),summary160:u.a.arrayOf(A.propTypes),summary175:u.a.arrayOf(A.propTypes),summary225:u.a.arrayOf(A.propTypes),url:u.a.string}),imageConfig:u.a.shape({cropSize:u.a.string,imageRatio:u.a.number,style:u.a.object}),isOpinionByline:u.a.bool,isReversed:u.a.bool,showImage:u.a.bool,showSummary:u.a.bool,summaryConfig:u.a.shape({lengths:u.a.arrayOf(u.a.number),style:u.a.object,type:u.a.string})}),{},{bylineClass:u.a.string,contentContainerClass:u.a.string,headlineClass:u.a.string,imageContainerClass:u.a.string}),I=B(B({},{article:null,hasVideo:!1,imageConfig:{},isOpinionByline:!1,isReversed:!1,showImage:!0,showSummary:!0,summary105:[],summary145:[],summary160:[],summary175:[],summary225:[],summaryConfig:{}}),{},{bylineClass:"",contentContainerClass:"",headlineClass:"",imageContainerClass:""}),V=function(e,t){return t||e};function N(e){return(N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function F(e,t){return(F=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function M(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=W(e);if(t){var o=W(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return U(this,r)}}function U(e,t){return!t||"object"!==N(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function W(e){return(W=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var G=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&F(e,t)}(s,e);var t,r,a,c=M(s);function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(t=c.call(this,e)).node=Object(n.createRef)(),t.state={highResSize:null},t}return t=s,(r=[{key:"componentDidMount",value:function(){this.props.imageConfig.showHiRes&&this.setHighResSize()}},{key:"componentDidUpdate",value:function(e){var t=this.props.imageConfig;e.imageConfig.showHiRes!==t.showHiRes&&t.showHiRes&&this.setHighResSize()}},{key:"setHighResSize",value:function(){this.setState({highResSize:this.node.current.clientWidth})}},{key:"render",value:function(){var e=this.props,t=e.article,r=t.bylines,n=t.hasVideo,a=t.headline,c=t.label,s=t.leadAsset,l=t.publishedTime,u=t.section,p=t.shortHeadline,y=e.bylineClass,d=e.children,m=e.contentContainerClass,b=e.headlineClass,h=e.imageConfig,g=h.cropSize,O=void 0===g?"169":g,j=h.imageRatio,_=void 0===j?16/9:j,w=h.style,C=void 0===w?{}:w,P=e.imageContainerClass,S=e.isOpinionByline,R=e.isReversed,T=e.leadAssetOverride,A=e.onPress,H=e.showImage,B=e.showSummary,q=e.summaryConfig,z=q.lengths,I=void 0===z?[]:z,N=q.style,$=void 0===N?{}:N,F=q.type,M=this.props.article,U=this.state.highResSize,W=function(e,t,r){var n=t||e;return n?n.posterImage?E()(n,"posterImage.crop".concat(r,".url")):E()(n,"crop".concat(r,".url")):null}(s,T,O);return d({article:M,card:o.a.createElement(i.TcView,{ref:this.node},o.a.createElement(D.a,{contentContainerClass:m,highResSize:U,imageContainerClass:P,imageAccessibilityLabel:p,imageRatio:_,imageStyle:C,imageUri:W,isReversed:R,lowResQuality:3,lowResSize:200,relatedArticle:!0,showImage:H},o.a.createElement(k.a,{bylineProps:{ast:r,bylineClass:y,color:f.colours.section[u]||f.colours.section.default,isOpinionByline:S},content:B&&o.a.createElement(i.TcView,{style:$},I.map((function(e){var t="".concat(e,"Class"),r=F?"".concat(F,"Summary"):"summary";return o.a.createElement(x.ArticleSummaryContent,{ast:M["summary".concat(e)],className:"summaryHidden ".concat(r).concat(t),key:e})}))),datePublicationProps:{date:l,showDay:!1},headline:o.a.createElement(x.ArticleSummaryHeadline,{className:b,headline:V(a,p),style:v.headline}),labelProps:{color:f.colours.section[u]||f.colours.section.default,isVideo:n,title:c}}))),onPress:A})}}])&&$(t.prototype,r),a&&$(t,a),s}(n.Component);G.defaultProps=I;var L=G,Q=r(5),J=function(e){return o.a.createElement("div",{"data-testid":"related-article-item"},o.a.createElement(L,e,(function(e){var t=e.article,r=e.card,n=e.onPress;return o.a.createElement(C.a.Consumer,null,(function(){return o.a.createElement(S.a,{linkStyle:{padding:10},onPress:function(e){return n(e,{url:t.url})},url:t.url},r)}))})))};J.displayName="RelatedArticleItem";var K,X=(K=J,Object(Q.withTrackEvents)(K,{analyticsEvents:[{actionName:"Pressed",eventName:"onPress",getAttrs:function(e){var t=e.article,r=t.headline,n=t.id,o=t.url;return{targetArticleHeadline:t.shortHeadline||r,targetArticleId:n,targetArticleUrl:o}}}]})),Y=(u.a.shape({items:u.a.arrayOf(u.a.shape({article:z.article})),sliceName:u.a.string.isRequired}).isRequired,["standard-1","standard-2","standard-3"]);function Z(e){return(Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function te(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(r),!0).forEach((function(t){re(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ee(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function re(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ie(e,t){return(ie=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ae(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=se(e);if(t){var o=se(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ce(this,r)}}function ce(e,t){return!t||"object"!==Z(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function se(e){return(se=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var le=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ie(e,t)}(s,e);var t,r,n,c=ae(s);function s(){return ne(this,s),c.apply(this,arguments)}return t=s,(r=[{key:"shouldComponentUpdate",value:function(e){var t=this.props,r=t.isVisible,n=t.slice;return e.isVisible!==r||e.slice!==n}},{key:"render",value:function(){var e=this.props,t=e.isVisible,r=e.onPress,n=e.slice,c=e.heading,s=e.hideBorder;if(!n)return null;var l=n.items,u=n.sliceName;return!u||"StandardSlice"!==u&&"DraftStandardSlice"!==u||!l?null:o.a.createElement(i.TcView,null,o.a.createElement(_,{heading:c}),o.a.createElement(a.StandardSlice,{hideBorder:s,itemCount:l.length,renderItems:function(e){return l.map((function(n){return function(e,n,i){var a=e.bylineClass,c=void 0===a?"":a,s=e.contentContainerClass,l=e.headlineClass,u=void 0===l?"":l,f=e.imageConfig,p=void 0===f?{}:f,y=e.imageContainerClass,d=e.isOpinionByline,m=void 0!==d&&d,b=e.isReversed,h=void 0!==b&&b,g=e.showImage,v=void 0===g||g,O=e.showSummary,j=void 0!==O&&O,_=e.summaryConfig,w=void 0===_?{}:_;return o.a.createElement(X,{article:n,bylineClass:c,contentContainerClass:s,headlineClass:u,id:n.id,imageConfig:te(te({},p),{},{showHiRes:t}),imageContainerClass:y,isOpinionByline:m,isReversed:h,key:n.id,leadAssetOverride:i,onPress:r,showImage:v,showSummary:j,summaryConfig:w})}(e,n.article,n.leadAsset)}))}}))}}])&&oe(t.prototype,r),n&&oe(t,n),s}(n.Component);t.default=function(e){return Object(Q.withTrackingContext)(e,{getAttrs:function(e){var t=e.slice,r=t.items,n=t.sliceName;if(!n)return null;var o={articles:[],template:n};return r?(o.articles=r.map((function(e,t){var r=e.article,n=r.headline,o=r.id,i=r.shortHeadline;return{headline:V(n,i),id:o,role:Y[t]}})),o):o},trackingObjectName:"Article"})}(le)}]);