@times-components/utils 6.20.0 → 6.20.1

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.1](https://github.com/newsuk/times-components/compare/@times-components/utils@6.20.0...@times-components/utils@6.20.1) (2024-03-25)
7
+
8
+ **Note:** Version bump only for package @times-components/utils
9
+
10
+
11
+
12
+
13
+
6
14
  # [6.20.0](https://github.com/newsuk/times-components/compare/@times-components/utils@6.19.0...@times-components/utils@6.20.0) (2024-03-19)
7
15
 
8
16
 
package/dist/index.js CHANGED
@@ -24,8 +24,6 @@ var _exportNames = {
24
24
  TcText: true,
25
25
  TcTextLink: true,
26
26
  TcScrollView: true,
27
- transformDomainCom: true,
28
- getDomainSpecificUrl: true,
29
27
  CanShowPuzzleSidebar: true
30
28
  };
31
29
  Object.defineProperty(exports, "clean", {
@@ -148,18 +146,6 @@ Object.defineProperty(exports, "TcScrollView", {
148
146
  return _tcScrollView.default;
149
147
  }
150
148
  });
151
- Object.defineProperty(exports, "transformDomainCom", {
152
- enumerable: true,
153
- get: function get() {
154
- return _transformDomainCom.default;
155
- }
156
- });
157
- Object.defineProperty(exports, "getDomainSpecificUrl", {
158
- enumerable: true,
159
- get: function get() {
160
- return _getDomainSpecificUrl.default;
161
- }
162
- });
163
149
  Object.defineProperty(exports, "CanShowPuzzleSidebar", {
164
150
  enumerable: true,
165
151
  get: function get() {
@@ -249,10 +235,6 @@ var _tcTextLink = _interopRequireDefault(require("./tc-text-link"));
249
235
 
250
236
  var _tcScrollView = _interopRequireDefault(require("./tc-scroll-view"));
251
237
 
252
- var _transformDomainCom = _interopRequireDefault(require("./transform-domain-com"));
253
-
254
- var _getDomainSpecificUrl = _interopRequireDefault(require("./get-domain-specific-url"));
255
-
256
238
  var _articlePuzzleSidebarWhitelist = _interopRequireDefault(require("./article-puzzle-sidebar-whitelist"));
257
239
 
258
240
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@times-components/utils",
3
- "version": "6.20.0",
3
+ "version": "6.20.1",
4
4
  "description": "A set of helpers and/or workarounds to be shared across packages ",
5
5
  "main": "dist/index",
6
6
  "dev": "src/index",
@@ -35,7 +35,7 @@
35
35
  "@babel/core": "7.4.4",
36
36
  "@times-components/eslint-config-thetimes": "0.8.18",
37
37
  "@times-components/jest-configurator-web": "0.8.1",
38
- "@times-components/jest-serializer": "3.13.7",
38
+ "@times-components/jest-serializer": "3.13.8",
39
39
  "@times-components/webpack-configurator": "2.1.0",
40
40
  "babel-jest": "24.8.0",
41
41
  "babel-loader": "8.0.5",
@@ -48,7 +48,7 @@
48
48
  },
49
49
  "dependencies": {
50
50
  "@times-components/schema": "0.7.4",
51
- "@times-components/ts-styleguide": "1.50.12",
51
+ "@times-components/ts-styleguide": "1.50.13",
52
52
  "apollo-cache-inmemory": "1.5.1",
53
53
  "apollo-client": "2.5.1",
54
54
  "apollo-link": "1.2.4",
@@ -67,5 +67,5 @@
67
67
  "react": ">=16.9",
68
68
  "react-dom": ">=16.9"
69
69
  },
70
- "gitHead": "e3d39233ed6c381b222aa6003a4459f91ac276c8"
70
+ "gitHead": "683d6d41187daffa18198ded40f2f5f612019797"
71
71
  }
package/rnw.js CHANGED
@@ -1 +1 @@
1
- module.exports=function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=15)}([function(t,e){t.exports=require("styled-components")},function(t,e){t.exports=require("react")},function(t,e){t.exports=require("prop-types")},function(t,e){t.exports=t=>{let e=t.tiles;if(!e)return null;let r=e.reduce((t,e)=>(t.push(...e.slices),t),[]).reduce((t,e)=>(t.push(...e.sections),t),[]).map(t=>t.title);r=r.filter(t=>t);const n=r.filter(t=>"news"!==t);return n.length?n[0].toLowerCase():"unknown section"}},function(t,e){const r=t=>t.slices[0].sections[0].title?t.slices[0].sections[0].title.toLowerCase():"";t.exports=t=>{return(e=t)&&e.tiles&&e.tiles.length>0?t.tiles.reduce((t,e)=>{return(n=e).slices&&n.slices.length>0&&(t=>t.slices[0].sections&&t.slices[0].sections.length>0)(e)&&r(e)?r(e):t;var n},"default"):"default";var e}},function(t,e){t.exports=require("@times-components/ts-styleguide/rnw")},function(t,e,r){(function(t){var r="[object Arguments]",n="[object Map]",o="[object Object]",i="[object Set]",c=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/,u=/^\./,l=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s=/\\(\\)?/g,f=/^\[object .+?Constructor\]$/,p=/^(?:0|[1-9]\d*)$/,d={};d["[object Float32Array]"]=d["[object Float64Array]"]=d["[object Int8Array]"]=d["[object Int16Array]"]=d["[object Int32Array]"]=d["[object Uint8Array]"]=d["[object Uint8ClampedArray]"]=d["[object Uint16Array]"]=d["[object Uint32Array]"]=!0,d[r]=d["[object Array]"]=d["[object ArrayBuffer]"]=d["[object Boolean]"]=d["[object DataView]"]=d["[object Date]"]=d["[object Error]"]=d["[object Function]"]=d[n]=d["[object Number]"]=d[o]=d["[object RegExp]"]=d[i]=d["[object String]"]=d["[object WeakMap]"]=!1;var h="object"==typeof global&&global&&global.Object===Object&&global,b="object"==typeof self&&self&&self.Object===Object&&self,y=h||b||Function("return this")(),v=e&&!e.nodeType&&e,g=v&&"object"==typeof t&&t&&!t.nodeType&&t,_=g&&g.exports===v&&h.process,m=function(){try{return _&&_.binding("util")}catch(t){}}(),w=m&&m.isTypedArray;function j(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}function x(t,e){for(var r=-1,n=t?t.length:0;++r<n;)if(e(t[r],r,t))return!0;return!1}function O(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}function k(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r}function A(t,e){return function(r){return t(e(r))}}function S(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}var T,C=Array.prototype,P=Function.prototype,I=Object.prototype,E=y["__core-js_shared__"],q=(T=/[^.]+$/.exec(E&&E.keys&&E.keys.IE_PROTO||""))?"Symbol(src)_1."+T:"",z=P.toString,N=I.hasOwnProperty,M=I.toString,D=RegExp("^"+z.call(N).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),F=y.Symbol,R=y.Uint8Array,L=A(Object.getPrototypeOf,Object),V=I.propertyIsEnumerable,$=C.splice,U=Object.getOwnPropertySymbols,W=A(Object.keys,Object),B=jt(y,"DataView"),H=jt(y,"Map"),Q=jt(y,"Promise"),G=jt(y,"Set"),J=jt(y,"WeakMap"),Y=jt(Object,"create"),K=qt(B),X=qt(H),Z=qt(Q),tt=qt(G),et=qt(J),rt=F?F.prototype:void 0,nt=rt?rt.valueOf:void 0,ot=rt?rt.toString:void 0;function it(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function ct(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function at(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function ut(t){var e=-1,r=t?t.length:0;for(this.__data__=new at;++e<r;)this.add(t[e])}function lt(t){this.__data__=new ct(t)}function st(t,e){var r=Dt(t)||Mt(t)?function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}(t.length,String):[],n=r.length,o=!!n;for(var i in t)!e&&!N.call(t,i)||o&&("length"==i||At(i,n))||r.push(i);return r}function ft(t,e){for(var r=t.length;r--;)if(Nt(t[r][0],e))return r;return-1}function pt(t,e){for(var r=0,n=(e=St(e,t)?[e]:gt(e)).length;null!=t&&r<n;)t=t[Et(e[r++])];return r&&r==n?t:void 0}function dt(t,e){return null!=t&&e in Object(t)}function ht(t,e,c,a,u){return t===e||(null==t||null==e||!Vt(t)&&!$t(e)?t!=t&&e!=e:function(t,e,c,a,u,l){var s=Dt(t),f=Dt(e),p="[object Array]",d="[object Array]";s||(p=(p=kt(t))==r?o:p);f||(d=(d=kt(e))==r?o:d);var h=p==o&&!O(t),b=d==o&&!O(e),y=p==d;if(y&&!h)return l||(l=new lt),s||Bt(t)?_t(t,e,c,a,u,l):function(t,e,r,o,c,a,u){switch(r){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!o(new R(t),new R(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Nt(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case n:var l=k;case i:var s=2&a;if(l||(l=S),t.size!=e.size&&!s)return!1;var f=u.get(t);if(f)return f==e;a|=1,u.set(t,e);var p=_t(l(t),l(e),o,c,a,u);return u.delete(t),p;case"[object Symbol]":if(nt)return nt.call(t)==nt.call(e)}return!1}(t,e,p,c,a,u,l);if(!(2&u)){var v=h&&N.call(t,"__wrapped__"),g=b&&N.call(e,"__wrapped__");if(v||g){var _=v?t.value():t,m=g?e.value():e;return l||(l=new lt),c(_,m,a,u,l)}}if(!y)return!1;return l||(l=new lt),function(t,e,r,n,o,i){var c=2&o,a=Ht(t),u=a.length,l=Ht(e).length;if(u!=l&&!c)return!1;var s=u;for(;s--;){var f=a[s];if(!(c?f in e:N.call(e,f)))return!1}var p=i.get(t);if(p&&i.get(e))return p==e;var d=!0;i.set(t,e),i.set(e,t);var h=c;for(;++s<u;){f=a[s];var b=t[f],y=e[f];if(n)var v=c?n(y,b,f,e,t,i):n(b,y,f,t,e,i);if(!(void 0===v?b===y||r(b,y,n,o,i):v)){d=!1;break}h||(h="constructor"==f)}if(d&&!h){var g=t.constructor,_=e.constructor;g==_||!("constructor"in t)||!("constructor"in e)||"function"==typeof g&&g instanceof g&&"function"==typeof _&&_ instanceof _||(d=!1)}return i.delete(t),i.delete(e),d}(t,e,c,a,u,l)}(t,e,ht,c,a,u))}function bt(t){return!(!Vt(t)||(e=t,q&&q in e))&&(Rt(t)||O(t)?D:f).test(qt(t));var e}function yt(t){return"function"==typeof t?t:null==t?Gt:"object"==typeof t?Dt(t)?function(t,e){if(St(t)&&Ct(e))return Pt(Et(t),e);return function(r){var n=function(t,e,r){var n=null==t?void 0:pt(t,e);return void 0===n?r:n}(r,t);return void 0===n&&n===e?function(t,e){return null!=t&&function(t,e,r){e=St(e,t)?[e]:gt(e);var n,o=-1,i=e.length;for(;++o<i;){var c=Et(e[o]);if(!(n=null!=t&&r(t,c)))break;t=t[c]}if(n)return n;return!!(i=t?t.length:0)&&Lt(i)&&At(c,i)&&(Dt(t)||Mt(t))}(t,e,dt)}(r,t):ht(e,n,void 0,3)}}(t[0],t[1]):function(t){var e=function(t){var e=Ht(t),r=e.length;for(;r--;){var n=e[r],o=t[n];e[r]=[n,o,Ct(o)]}return e}(t);if(1==e.length&&e[0][2])return Pt(e[0][0],e[0][1]);return function(r){return r===t||function(t,e,r,n){var o=r.length,i=o,c=!n;if(null==t)return!i;for(t=Object(t);o--;){var a=r[o];if(c&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++o<i;){var u=(a=r[o])[0],l=t[u],s=a[1];if(c&&a[2]){if(void 0===l&&!(u in t))return!1}else{var f=new lt;if(n)var p=n(l,s,u,t,e,f);if(!(void 0===p?ht(s,l,n,3,f):p))return!1}}return!0}(r,t,e)}}(t):St(e=t)?(r=Et(e),function(t){return null==t?void 0:t[r]}):function(t){return function(e){return pt(e,t)}}(e);var e,r}function vt(t){if(!Vt(t))return function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}(t);var e=Tt(t),r=[];for(var n in t)("constructor"!=n||!e&&N.call(t,n))&&r.push(n);return r}function gt(t){return Dt(t)?t:It(t)}function _t(t,e,r,n,o,i){var c=2&o,a=t.length,u=e.length;if(a!=u&&!(c&&u>a))return!1;var l=i.get(t);if(l&&i.get(e))return l==e;var s=-1,f=!0,p=1&o?new ut:void 0;for(i.set(t,e),i.set(e,t);++s<a;){var d=t[s],h=e[s];if(n)var b=c?n(h,d,s,e,t,i):n(d,h,s,t,e,i);if(void 0!==b){if(b)continue;f=!1;break}if(p){if(!x(e,(function(t,e){if(!p.has(e)&&(d===t||r(d,t,n,o,i)))return p.add(e)}))){f=!1;break}}else if(d!==h&&!r(d,h,n,o,i)){f=!1;break}}return i.delete(t),i.delete(e),f}function mt(t){return function(t,e,r){var n=e(t);return Dt(t)?n:j(n,r(t))}(t,Qt,Ot)}function wt(t,e){var r,n,o=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof e?"string":"hash"]:o.map}function jt(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return bt(r)?r:void 0}it.prototype.clear=function(){this.__data__=Y?Y(null):{}},it.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},it.prototype.get=function(t){var e=this.__data__;if(Y){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return N.call(e,t)?e[t]:void 0},it.prototype.has=function(t){var e=this.__data__;return Y?void 0!==e[t]:N.call(e,t)},it.prototype.set=function(t,e){return this.__data__[t]=Y&&void 0===e?"__lodash_hash_undefined__":e,this},ct.prototype.clear=function(){this.__data__=[]},ct.prototype.delete=function(t){var e=this.__data__,r=ft(e,t);return!(r<0)&&(r==e.length-1?e.pop():$.call(e,r,1),!0)},ct.prototype.get=function(t){var e=this.__data__,r=ft(e,t);return r<0?void 0:e[r][1]},ct.prototype.has=function(t){return ft(this.__data__,t)>-1},ct.prototype.set=function(t,e){var r=this.__data__,n=ft(r,t);return n<0?r.push([t,e]):r[n][1]=e,this},at.prototype.clear=function(){this.__data__={hash:new it,map:new(H||ct),string:new it}},at.prototype.delete=function(t){return wt(this,t).delete(t)},at.prototype.get=function(t){return wt(this,t).get(t)},at.prototype.has=function(t){return wt(this,t).has(t)},at.prototype.set=function(t,e){return wt(this,t).set(t,e),this},ut.prototype.add=ut.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},ut.prototype.has=function(t){return this.__data__.has(t)},lt.prototype.clear=function(){this.__data__=new ct},lt.prototype.delete=function(t){return this.__data__.delete(t)},lt.prototype.get=function(t){return this.__data__.get(t)},lt.prototype.has=function(t){return this.__data__.has(t)},lt.prototype.set=function(t,e){var r=this.__data__;if(r instanceof ct){var n=r.__data__;if(!H||n.length<199)return n.push([t,e]),this;r=this.__data__=new at(n)}return r.set(t,e),this};var xt=U?A(U,Object):Jt,Ot=U?function(t){for(var e=[];t;)j(e,xt(t)),t=L(t);return e}:Jt,kt=function(t){return M.call(t)};function At(t,e){return!!(e=null==e?9007199254740991:e)&&("number"==typeof t||p.test(t))&&t>-1&&t%1==0&&t<e}function St(t,e){if(Dt(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!Ut(t))||(a.test(t)||!c.test(t)||null!=e&&t in Object(e))}function Tt(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||I)}function Ct(t){return t==t&&!Vt(t)}function Pt(t,e){return function(r){return null!=r&&(r[t]===e&&(void 0!==e||t in Object(r)))}}(B&&"[object DataView]"!=kt(new B(new ArrayBuffer(1)))||H&&kt(new H)!=n||Q&&"[object Promise]"!=kt(Q.resolve())||G&&kt(new G)!=i||J&&"[object WeakMap]"!=kt(new J))&&(kt=function(t){var e=M.call(t),r=e==o?t.constructor:void 0,c=r?qt(r):void 0;if(c)switch(c){case K:return"[object DataView]";case X:return n;case Z:return"[object Promise]";case tt:return i;case et:return"[object WeakMap]"}return e});var It=zt((function(t){var e;t=null==(e=t)?"":function(t){if("string"==typeof t)return t;if(Ut(t))return ot?ot.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}(e);var r=[];return u.test(t)&&r.push(""),t.replace(l,(function(t,e,n,o){r.push(n?o.replace(s,"$1"):e||t)})),r}));function Et(t){if("string"==typeof t||Ut(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function qt(t){if(null!=t){try{return z.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function zt(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var c=t.apply(this,n);return r.cache=i.set(o,c),c};return r.cache=new(zt.Cache||at),r}function Nt(t,e){return t===e||t!=t&&e!=e}function Mt(t){return function(t){return $t(t)&&Ft(t)}(t)&&N.call(t,"callee")&&(!V.call(t,"callee")||M.call(t)==r)}zt.Cache=at;var Dt=Array.isArray;function Ft(t){return null!=t&&Lt(t.length)&&!Rt(t)}function Rt(t){var e=Vt(t)?M.call(t):"";return"[object Function]"==e||"[object GeneratorFunction]"==e}function Lt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Vt(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function $t(t){return!!t&&"object"==typeof t}function Ut(t){return"symbol"==typeof t||$t(t)&&"[object Symbol]"==M.call(t)}var Wt,Bt=w?(Wt=w,function(t){return Wt(t)}):function(t){return $t(t)&&Lt(t.length)&&!!d[M.call(t)]};function Ht(t){return Ft(t)?st(t):function(t){if(!Tt(t))return W(t);var e=[];for(var r in Object(t))N.call(t,r)&&"constructor"!=r&&e.push(r);return e}(t)}function Qt(t){return Ft(t)?st(t,!0):vt(t)}function Gt(t){return t}function Jt(){return[]}t.exports=function(t,e){return function(t,e){return null==t?{}:function(t,e,r){for(var n=-1,o=e.length,i={};++n<o;){var c=e[n],a=t[c];r(a,c)&&(i[c]=a)}return i}(t,mt(t),yt(e))}(t,function(t){if("function"!=typeof t)throw new TypeError("Expected a function");return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}(yt(e)))}}).call(this,r(14)(t))},function(t,e){t.exports=require("unfetch")},function(t,e){t.exports=require("apollo-link")},function(t,e){t.exports=require("apollo-link-http")},function(t,e){t.exports=require("apollo-link-persisted-queries")},function(t,e){t.exports=require("@times-components/schema/rnw")},function(t,e){t.exports=require("apollo-cache-inmemory")},function(t,e){t.exports=require("apollo-client")},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,r){"use strict";r.r(e);var n=r(5);var o=()=>{let t=1024,e=768;return"undefined"!=typeof window&&(t=window.innerWidth,e=window.innerHeight),{width:t,height:e}};const i=[320,440,660,800,1080,1280,1440,1670,1920,2308],c=o().width,a=t=>i.find(e=>t<=e)||i[i.length-1],u=t=>t?n.tabletWidth:c;function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null==r)return;var n,o,i=[],c=!0,a=!1;try{for(r=r.call(t);!(c=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);c=!0);}catch(t){a=!0,o=t}finally{try{c||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return s(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return s(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}const f=t=>t.charAt(0).toUpperCase()+t.slice(1),p=t=>{if(!t||!t.length)return 1;const e=l(t.split(":"),2),r=e[0],n=e[1],o=parseFloat(r)/parseFloat(n);return Number.isNaN(o)?1:o},d=(t,e)=>t.replace(/(<([^>]+)>)/gi,e),h=t=>{const e=t;return Object.keys(e).forEach(t=>{if("lineHeight"===t){const r=e[t];"number"==typeof r&&(e[t]="".concat(r,"px"))}}),e},b=(t,e)=>{if(e&&"#"===e.charAt(0)){t.preventDefault();const r=document.getElementById(e.substring(1));if(r){const t=r.getBoundingClientRect().top+window.pageYOffset-(()=>{const t=document.querySelector(".OrientationBar"),e=t?t.offsetHeight:0;return window.innerWidth<1024?110:window.innerWidth<1320?100+e:50+e})();window.scrollTo({top:t,behavior:"smooth"})}}},y=t=>t&&"#"===t.charAt(0)?null:t;var v=r(6),g=r.n(v);var _=t=>g()(t,t=>void 0===t||Number.isNaN(t));var m=t=>t?t.startsWith("//")?"https:".concat(t):t:null,w=r(3),j=r.n(w),x=r(1),O=r.n(x),k=(r(2),r(0)),A=r.n(k);var S=A.a.div.withConfig({displayName:"tc-view__TcView",componentId:"nuazoi-0"})(["border:0px solid black;box-sizing:border-box;display:flex;flex-direction:column;margin:0px;min-height:0px;min-width:0px;padding:0px;position:relative;z-index:0;"]);function T(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null==r)return;var n,o,i=[],c=!0,a=!1;try{for(r=r.call(t);!(c=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);c=!0);}catch(t){a=!0,o=t}finally{try{c||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return C(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return C(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var P=t=>{let e=t.aspectRatio,r=t.children;const n=T(e.split(":"),2),o=n[0],i=n[1]/o*100;return O.a.createElement(S,{style:{paddingBottom:"".concat(i,"%"),position:"relative"}},O.a.createElement(S,{style:{height:"100%",position:"absolute",width:"100%"}},r))},I=t=>{let e=t.crop169,r=t.crop32,n=t.crop1251,o=t.crop11,i=t.crop45,c=t.crop23;return e||r||n||o||i||c};function E(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function q(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?E(Object(r),!0).forEach((function(e){z(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function z(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const N={aspectRatio:"1:1",displayImage:null,isVideo:!1,leadAsset:null};function M(t){let e=t.leadAsset;if(!e)return N;const r="Video"===e.__typename,n=I(r?e.posterImage:e);if(!n)return N;return{aspectRatio:n.ratio,displayImage:n,isVideo:r,leadAsset:q(q({},e),{},{isVideo:r})}}var D=r(7),F=r.n(D),R=r(8),L=r(9),V=r(10),$=r(11),U=r(12),W=r(13);var B=()=>{let t=null,e=null,r=null,n=null,o="unknown";"undefined"!=typeof window&&window.nuk&&(t=window.nuk.graphqlapi.url,e=!!window.nuk.graphqlapi.usePersistedQueries,r=window.nuk.getCookieValue("acs_tnl"),n=window.nuk.getCookieValue("sacs_tnl"),o=window.nuk.graphqlapi.clientName||o);const i={fetch:F.a,headers:{},uri:t};i.headers["content-type"]="application/x-www-form-urlencoded",i.headers.Authorization="Cookie acs_tnl=".concat(r,";sacs_tnl=").concat(n);const c=R.ApolloLink.from([e&&Object(V.createPersistedQueryLink)({useGETForHashedQueries:!0}),Object(L.createHttpLink)(i)].filter(Boolean));return new W.ApolloClient({name:"@times-components/utils (".concat(o,")"),cache:new U.InMemoryCache({fragmentMatcher:$.fragmentMatcher}),link:c})};var H=(t,e)=>t||e;const Q=t=>{const e=t.toString(16);return e.length%2?"0".concat(e):e};var G=t=>t&&t.rgba?"#".concat(Q(t.rgba.red)).concat(Q(t.rgba.green)).concat(Q(t.rgba.blue)).toUpperCase():null,J=t=>t&&t.rgba?"rgba(".concat(t.rgba.red,", ").concat(t.rgba.green,", ").concat(t.rgba.blue,", ").concat(t.rgba.alpha,")"):null;var Y=A.a.div.withConfig({displayName:"hover-icon__HoverIcon",componentId:"sc-1ge5rtz-0"})(["color:",";text-decoration-line:",";&:hover{color:",";text-decoration-line:",";}"],t=>t.colour,t=>t.underline&&"underline",t=>t.hoverColour||t.colour,t=>t.underline&&"none");class K extends x.Component{constructor(t){super(t),this.state={isClient:!1}}componentDidMount(){this.setState({isClient:!0})}render(){const t=this.state.isClient,e=this.props,r=e.client,n=e.server;return t?r&&r():n&&n()}}K.defaultProps={server:null,client:null};var X=K,Z=(t,e,r)=>{if(!t||!e||!r)return t;if(t.includes("?".concat(e))||t.includes("&".concat(e)))return t;const n=t.includes("?")?"&":"?";return"".concat(t).concat(n).concat(e,"=").concat(r)},tt=r(4),et=r.n(tt);var rt=t=>{let e=t.data,r=t.initialNumToRender,n=t.RenderItem;if(Array.isArray(e)){const t=e.map((t,e)=>e<r?O.a.createElement("div",{role:"listitem"},n({data:t,key:e})):null);if(t.length)return O.a.createElement("div",{role:"list"},t)}return null};var nt=A.a.div.withConfig({displayName:"tc-text__TcText",componentId:"sc-15igzev-0"})(["border:0px solid black;box-sizing:border-box;color:rgb(0,0,0);display:inline;font-size:14px;font-family:sans-serif;margin:0px;padding:0px;white-space:pre-wrap;overflow-wrap:break-word;"]);var ot=A.a.a.withConfig({displayName:"tc-text-link__TcTextLink",componentId:"sc-1voa8bp-0"})(["border:0px solid black;box-sizing:border-box;color:rgb(0,0,0);display:inline;font-size:14px;font-family:sans-serif;margin:0px;padding:0px;white-space:pre-wrap;overflow-wrap:break-word;"]);var it=A.a.div.withConfig({displayName:"tc-scroll-view__TcScrollView",componentId:"sc-1sygsh3-0"})(["height:500px;overflow-y:scroll;white-space:nowrap;"]);var ct=(t,e)=>{if(!e||e.includes("thetimes.com")){const e=JSON.stringify(t).replace(/(www.(|uat-|staging-?)thetimes).co.uk/gm,t=>t.replace(".co.uk",".com"));return JSON.parse(e)}return t};const at=["thetimes.co.uk/imageserver","thetimes.co.uk/tto/archive/frame",/thetimes\.co\.uk\/([a-z0-9-]+\/)+[a-z0-9-]+-([bcdfghjklmnpqrstvwxz23567890]{9,11}$)/g],ut=[/www.(.*?)thetimes.co.uk/g,/login.(.*?)thetimes.co.uk/g];var lt=(t,e)=>t.includes("thetimes.com")&&[...at,...ut].some(t=>e.match(t))?e.replace(".co.uk",".com"):e;var st=t=>!(!t||!["times2"].includes(t.toLowerCase()));r.d(e,"acceptedWidths",(function(){return i})),r.d(e,"normaliseWidthForAssetRequestCache",(function(){return a})),r.d(e,"screenWidth",(function(){return u})),r.d(e,"capitalise",(function(){return f})),r.d(e,"ratioTextToFloat",(function(){return p})),r.d(e,"stripTags",(function(){return d})),r.d(e,"checkStylesForUnits",(function(){return h})),r.d(e,"handleOnClickScrollTo",(function(){return b})),r.d(e,"handleHrefScrollTo",(function(){return y})),r.d(e,"clean",(function(){return _})),r.d(e,"addMissingProtocol",(function(){return m})),r.d(e,"getSectionNameForAnalytics",(function(){return j.a})),r.d(e,"AspectRatioContainer",(function(){return P})),r.d(e,"getLeadAsset",(function(){return M})),r.d(e,"makeClient",(function(){return B})),r.d(e,"getStandardTemplateCrop",(function(){return I})),r.d(e,"getDimensions",(function(){return o})),r.d(e,"getHeadline",(function(){return H})),r.d(e,"gqlRgbaToHex",(function(){return G})),r.d(e,"gqlRgbaToStyle",(function(){return J})),r.d(e,"HoverIcon",(function(){return Y})),r.d(e,"ServerClientRender",(function(){return X})),r.d(e,"appendToImageURL",(function(){return Z})),r.d(e,"getSectionFromTiles",(function(){return et.a})),r.d(e,"TcView",(function(){return S})),r.d(e,"TcFlatList",(function(){return rt})),r.d(e,"TcText",(function(){return nt})),r.d(e,"TcTextLink",(function(){return ot})),r.d(e,"TcScrollView",(function(){return it})),r.d(e,"transformDomainCom",(function(){return ct})),r.d(e,"getDomainSpecificUrl",(function(){return lt})),r.d(e,"CanShowPuzzleSidebar",(function(){return st}))}]);
1
+ module.exports=function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=15)}([function(t,e){t.exports=require("styled-components")},function(t,e){t.exports=require("react")},function(t,e){t.exports=require("prop-types")},function(t,e){t.exports=t=>{let e=t.tiles;if(!e)return null;let r=e.reduce((t,e)=>(t.push(...e.slices),t),[]).reduce((t,e)=>(t.push(...e.sections),t),[]).map(t=>t.title);r=r.filter(t=>t);const n=r.filter(t=>"news"!==t);return n.length?n[0].toLowerCase():"unknown section"}},function(t,e){const r=t=>t.slices[0].sections[0].title?t.slices[0].sections[0].title.toLowerCase():"";t.exports=t=>{return(e=t)&&e.tiles&&e.tiles.length>0?t.tiles.reduce((t,e)=>{return(n=e).slices&&n.slices.length>0&&(t=>t.slices[0].sections&&t.slices[0].sections.length>0)(e)&&r(e)?r(e):t;var n},"default"):"default";var e}},function(t,e){t.exports=require("@times-components/ts-styleguide/rnw")},function(t,e,r){(function(t){var r="[object Arguments]",n="[object Map]",o="[object Object]",i="[object Set]",c=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/,u=/^\./,l=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s=/\\(\\)?/g,f=/^\[object .+?Constructor\]$/,p=/^(?:0|[1-9]\d*)$/,d={};d["[object Float32Array]"]=d["[object Float64Array]"]=d["[object Int8Array]"]=d["[object Int16Array]"]=d["[object Int32Array]"]=d["[object Uint8Array]"]=d["[object Uint8ClampedArray]"]=d["[object Uint16Array]"]=d["[object Uint32Array]"]=!0,d[r]=d["[object Array]"]=d["[object ArrayBuffer]"]=d["[object Boolean]"]=d["[object DataView]"]=d["[object Date]"]=d["[object Error]"]=d["[object Function]"]=d[n]=d["[object Number]"]=d[o]=d["[object RegExp]"]=d[i]=d["[object String]"]=d["[object WeakMap]"]=!1;var h="object"==typeof global&&global&&global.Object===Object&&global,b="object"==typeof self&&self&&self.Object===Object&&self,y=h||b||Function("return this")(),v=e&&!e.nodeType&&e,g=v&&"object"==typeof t&&t&&!t.nodeType&&t,_=g&&g.exports===v&&h.process,w=function(){try{return _&&_.binding("util")}catch(t){}}(),m=w&&w.isTypedArray;function j(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}function x(t,e){for(var r=-1,n=t?t.length:0;++r<n;)if(e(t[r],r,t))return!0;return!1}function O(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}function A(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r}function k(t,e){return function(r){return t(e(r))}}function S(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}var T,C=Array.prototype,P=Function.prototype,I=Object.prototype,E=y["__core-js_shared__"],q=(T=/[^.]+$/.exec(E&&E.keys&&E.keys.IE_PROTO||""))?"Symbol(src)_1."+T:"",M=P.toString,z=I.hasOwnProperty,F=I.toString,N=RegExp("^"+M.call(z).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),R=y.Symbol,L=y.Uint8Array,V=k(Object.getPrototypeOf,Object),D=I.propertyIsEnumerable,W=C.splice,$=Object.getOwnPropertySymbols,U=k(Object.keys,Object),B=jt(y,"DataView"),H=jt(y,"Map"),Q=jt(y,"Promise"),G=jt(y,"Set"),Y=jt(y,"WeakMap"),J=jt(Object,"create"),K=qt(B),X=qt(H),Z=qt(Q),tt=qt(G),et=qt(Y),rt=R?R.prototype:void 0,nt=rt?rt.valueOf:void 0,ot=rt?rt.toString:void 0;function it(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function ct(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function at(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function ut(t){var e=-1,r=t?t.length:0;for(this.__data__=new at;++e<r;)this.add(t[e])}function lt(t){this.__data__=new ct(t)}function st(t,e){var r=Nt(t)||Ft(t)?function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}(t.length,String):[],n=r.length,o=!!n;for(var i in t)!e&&!z.call(t,i)||o&&("length"==i||kt(i,n))||r.push(i);return r}function ft(t,e){for(var r=t.length;r--;)if(zt(t[r][0],e))return r;return-1}function pt(t,e){for(var r=0,n=(e=St(e,t)?[e]:gt(e)).length;null!=t&&r<n;)t=t[Et(e[r++])];return r&&r==n?t:void 0}function dt(t,e){return null!=t&&e in Object(t)}function ht(t,e,c,a,u){return t===e||(null==t||null==e||!Dt(t)&&!Wt(e)?t!=t&&e!=e:function(t,e,c,a,u,l){var s=Nt(t),f=Nt(e),p="[object Array]",d="[object Array]";s||(p=(p=At(t))==r?o:p);f||(d=(d=At(e))==r?o:d);var h=p==o&&!O(t),b=d==o&&!O(e),y=p==d;if(y&&!h)return l||(l=new lt),s||Bt(t)?_t(t,e,c,a,u,l):function(t,e,r,o,c,a,u){switch(r){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!o(new L(t),new L(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return zt(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case n:var l=A;case i:var s=2&a;if(l||(l=S),t.size!=e.size&&!s)return!1;var f=u.get(t);if(f)return f==e;a|=1,u.set(t,e);var p=_t(l(t),l(e),o,c,a,u);return u.delete(t),p;case"[object Symbol]":if(nt)return nt.call(t)==nt.call(e)}return!1}(t,e,p,c,a,u,l);if(!(2&u)){var v=h&&z.call(t,"__wrapped__"),g=b&&z.call(e,"__wrapped__");if(v||g){var _=v?t.value():t,w=g?e.value():e;return l||(l=new lt),c(_,w,a,u,l)}}if(!y)return!1;return l||(l=new lt),function(t,e,r,n,o,i){var c=2&o,a=Ht(t),u=a.length,l=Ht(e).length;if(u!=l&&!c)return!1;var s=u;for(;s--;){var f=a[s];if(!(c?f in e:z.call(e,f)))return!1}var p=i.get(t);if(p&&i.get(e))return p==e;var d=!0;i.set(t,e),i.set(e,t);var h=c;for(;++s<u;){f=a[s];var b=t[f],y=e[f];if(n)var v=c?n(y,b,f,e,t,i):n(b,y,f,t,e,i);if(!(void 0===v?b===y||r(b,y,n,o,i):v)){d=!1;break}h||(h="constructor"==f)}if(d&&!h){var g=t.constructor,_=e.constructor;g==_||!("constructor"in t)||!("constructor"in e)||"function"==typeof g&&g instanceof g&&"function"==typeof _&&_ instanceof _||(d=!1)}return i.delete(t),i.delete(e),d}(t,e,c,a,u,l)}(t,e,ht,c,a,u))}function bt(t){return!(!Dt(t)||(e=t,q&&q in e))&&(Lt(t)||O(t)?N:f).test(qt(t));var e}function yt(t){return"function"==typeof t?t:null==t?Gt:"object"==typeof t?Nt(t)?function(t,e){if(St(t)&&Ct(e))return Pt(Et(t),e);return function(r){var n=function(t,e,r){var n=null==t?void 0:pt(t,e);return void 0===n?r:n}(r,t);return void 0===n&&n===e?function(t,e){return null!=t&&function(t,e,r){e=St(e,t)?[e]:gt(e);var n,o=-1,i=e.length;for(;++o<i;){var c=Et(e[o]);if(!(n=null!=t&&r(t,c)))break;t=t[c]}if(n)return n;return!!(i=t?t.length:0)&&Vt(i)&&kt(c,i)&&(Nt(t)||Ft(t))}(t,e,dt)}(r,t):ht(e,n,void 0,3)}}(t[0],t[1]):function(t){var e=function(t){var e=Ht(t),r=e.length;for(;r--;){var n=e[r],o=t[n];e[r]=[n,o,Ct(o)]}return e}(t);if(1==e.length&&e[0][2])return Pt(e[0][0],e[0][1]);return function(r){return r===t||function(t,e,r,n){var o=r.length,i=o,c=!n;if(null==t)return!i;for(t=Object(t);o--;){var a=r[o];if(c&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++o<i;){var u=(a=r[o])[0],l=t[u],s=a[1];if(c&&a[2]){if(void 0===l&&!(u in t))return!1}else{var f=new lt;if(n)var p=n(l,s,u,t,e,f);if(!(void 0===p?ht(s,l,n,3,f):p))return!1}}return!0}(r,t,e)}}(t):St(e=t)?(r=Et(e),function(t){return null==t?void 0:t[r]}):function(t){return function(e){return pt(e,t)}}(e);var e,r}function vt(t){if(!Dt(t))return function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}(t);var e=Tt(t),r=[];for(var n in t)("constructor"!=n||!e&&z.call(t,n))&&r.push(n);return r}function gt(t){return Nt(t)?t:It(t)}function _t(t,e,r,n,o,i){var c=2&o,a=t.length,u=e.length;if(a!=u&&!(c&&u>a))return!1;var l=i.get(t);if(l&&i.get(e))return l==e;var s=-1,f=!0,p=1&o?new ut:void 0;for(i.set(t,e),i.set(e,t);++s<a;){var d=t[s],h=e[s];if(n)var b=c?n(h,d,s,e,t,i):n(d,h,s,t,e,i);if(void 0!==b){if(b)continue;f=!1;break}if(p){if(!x(e,(function(t,e){if(!p.has(e)&&(d===t||r(d,t,n,o,i)))return p.add(e)}))){f=!1;break}}else if(d!==h&&!r(d,h,n,o,i)){f=!1;break}}return i.delete(t),i.delete(e),f}function wt(t){return function(t,e,r){var n=e(t);return Nt(t)?n:j(n,r(t))}(t,Qt,Ot)}function mt(t,e){var r,n,o=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof e?"string":"hash"]:o.map}function jt(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return bt(r)?r:void 0}it.prototype.clear=function(){this.__data__=J?J(null):{}},it.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},it.prototype.get=function(t){var e=this.__data__;if(J){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return z.call(e,t)?e[t]:void 0},it.prototype.has=function(t){var e=this.__data__;return J?void 0!==e[t]:z.call(e,t)},it.prototype.set=function(t,e){return this.__data__[t]=J&&void 0===e?"__lodash_hash_undefined__":e,this},ct.prototype.clear=function(){this.__data__=[]},ct.prototype.delete=function(t){var e=this.__data__,r=ft(e,t);return!(r<0)&&(r==e.length-1?e.pop():W.call(e,r,1),!0)},ct.prototype.get=function(t){var e=this.__data__,r=ft(e,t);return r<0?void 0:e[r][1]},ct.prototype.has=function(t){return ft(this.__data__,t)>-1},ct.prototype.set=function(t,e){var r=this.__data__,n=ft(r,t);return n<0?r.push([t,e]):r[n][1]=e,this},at.prototype.clear=function(){this.__data__={hash:new it,map:new(H||ct),string:new it}},at.prototype.delete=function(t){return mt(this,t).delete(t)},at.prototype.get=function(t){return mt(this,t).get(t)},at.prototype.has=function(t){return mt(this,t).has(t)},at.prototype.set=function(t,e){return mt(this,t).set(t,e),this},ut.prototype.add=ut.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},ut.prototype.has=function(t){return this.__data__.has(t)},lt.prototype.clear=function(){this.__data__=new ct},lt.prototype.delete=function(t){return this.__data__.delete(t)},lt.prototype.get=function(t){return this.__data__.get(t)},lt.prototype.has=function(t){return this.__data__.has(t)},lt.prototype.set=function(t,e){var r=this.__data__;if(r instanceof ct){var n=r.__data__;if(!H||n.length<199)return n.push([t,e]),this;r=this.__data__=new at(n)}return r.set(t,e),this};var xt=$?k($,Object):Yt,Ot=$?function(t){for(var e=[];t;)j(e,xt(t)),t=V(t);return e}:Yt,At=function(t){return F.call(t)};function kt(t,e){return!!(e=null==e?9007199254740991:e)&&("number"==typeof t||p.test(t))&&t>-1&&t%1==0&&t<e}function St(t,e){if(Nt(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!$t(t))||(a.test(t)||!c.test(t)||null!=e&&t in Object(e))}function Tt(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||I)}function Ct(t){return t==t&&!Dt(t)}function Pt(t,e){return function(r){return null!=r&&(r[t]===e&&(void 0!==e||t in Object(r)))}}(B&&"[object DataView]"!=At(new B(new ArrayBuffer(1)))||H&&At(new H)!=n||Q&&"[object Promise]"!=At(Q.resolve())||G&&At(new G)!=i||Y&&"[object WeakMap]"!=At(new Y))&&(At=function(t){var e=F.call(t),r=e==o?t.constructor:void 0,c=r?qt(r):void 0;if(c)switch(c){case K:return"[object DataView]";case X:return n;case Z:return"[object Promise]";case tt:return i;case et:return"[object WeakMap]"}return e});var It=Mt((function(t){var e;t=null==(e=t)?"":function(t){if("string"==typeof t)return t;if($t(t))return ot?ot.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}(e);var r=[];return u.test(t)&&r.push(""),t.replace(l,(function(t,e,n,o){r.push(n?o.replace(s,"$1"):e||t)})),r}));function Et(t){if("string"==typeof t||$t(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function qt(t){if(null!=t){try{return M.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Mt(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var c=t.apply(this,n);return r.cache=i.set(o,c),c};return r.cache=new(Mt.Cache||at),r}function zt(t,e){return t===e||t!=t&&e!=e}function Ft(t){return function(t){return Wt(t)&&Rt(t)}(t)&&z.call(t,"callee")&&(!D.call(t,"callee")||F.call(t)==r)}Mt.Cache=at;var Nt=Array.isArray;function Rt(t){return null!=t&&Vt(t.length)&&!Lt(t)}function Lt(t){var e=Dt(t)?F.call(t):"";return"[object Function]"==e||"[object GeneratorFunction]"==e}function Vt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Dt(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function Wt(t){return!!t&&"object"==typeof t}function $t(t){return"symbol"==typeof t||Wt(t)&&"[object Symbol]"==F.call(t)}var Ut,Bt=m?(Ut=m,function(t){return Ut(t)}):function(t){return Wt(t)&&Vt(t.length)&&!!d[F.call(t)]};function Ht(t){return Rt(t)?st(t):function(t){if(!Tt(t))return U(t);var e=[];for(var r in Object(t))z.call(t,r)&&"constructor"!=r&&e.push(r);return e}(t)}function Qt(t){return Rt(t)?st(t,!0):vt(t)}function Gt(t){return t}function Yt(){return[]}t.exports=function(t,e){return function(t,e){return null==t?{}:function(t,e,r){for(var n=-1,o=e.length,i={};++n<o;){var c=e[n],a=t[c];r(a,c)&&(i[c]=a)}return i}(t,wt(t),yt(e))}(t,function(t){if("function"!=typeof t)throw new TypeError("Expected a function");return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}(yt(e)))}}).call(this,r(14)(t))},function(t,e){t.exports=require("unfetch")},function(t,e){t.exports=require("apollo-link")},function(t,e){t.exports=require("apollo-link-http")},function(t,e){t.exports=require("apollo-link-persisted-queries")},function(t,e){t.exports=require("@times-components/schema/rnw")},function(t,e){t.exports=require("apollo-cache-inmemory")},function(t,e){t.exports=require("apollo-client")},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,r){"use strict";r.r(e);var n=r(5);var o=()=>{let t=1024,e=768;return"undefined"!=typeof window&&(t=window.innerWidth,e=window.innerHeight),{width:t,height:e}};const i=[320,440,660,800,1080,1280,1440,1670,1920,2308],c=o().width,a=t=>i.find(e=>t<=e)||i[i.length-1],u=t=>t?n.tabletWidth:c;function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null==r)return;var n,o,i=[],c=!0,a=!1;try{for(r=r.call(t);!(c=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);c=!0);}catch(t){a=!0,o=t}finally{try{c||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return s(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return s(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}const f=t=>t.charAt(0).toUpperCase()+t.slice(1),p=t=>{if(!t||!t.length)return 1;const e=l(t.split(":"),2),r=e[0],n=e[1],o=parseFloat(r)/parseFloat(n);return Number.isNaN(o)?1:o},d=(t,e)=>t.replace(/(<([^>]+)>)/gi,e),h=t=>{const e=t;return Object.keys(e).forEach(t=>{if("lineHeight"===t){const r=e[t];"number"==typeof r&&(e[t]="".concat(r,"px"))}}),e},b=(t,e)=>{if(e&&"#"===e.charAt(0)){t.preventDefault();const r=document.getElementById(e.substring(1));if(r){const t=r.getBoundingClientRect().top+window.pageYOffset-(()=>{const t=document.querySelector(".OrientationBar"),e=t?t.offsetHeight:0;return window.innerWidth<1024?110:window.innerWidth<1320?100+e:50+e})();window.scrollTo({top:t,behavior:"smooth"})}}},y=t=>t&&"#"===t.charAt(0)?null:t;var v=r(6),g=r.n(v);var _=t=>g()(t,t=>void 0===t||Number.isNaN(t));var w=t=>t?t.startsWith("//")?"https:".concat(t):t:null,m=r(3),j=r.n(m),x=r(1),O=r.n(x),A=(r(2),r(0)),k=r.n(A);var S=k.a.div.withConfig({displayName:"tc-view__TcView",componentId:"nuazoi-0"})(["border:0px solid black;box-sizing:border-box;display:flex;flex-direction:column;margin:0px;min-height:0px;min-width:0px;padding:0px;position:relative;z-index:0;"]);function T(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null==r)return;var n,o,i=[],c=!0,a=!1;try{for(r=r.call(t);!(c=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);c=!0);}catch(t){a=!0,o=t}finally{try{c||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return C(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return C(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var P=t=>{let e=t.aspectRatio,r=t.children;const n=T(e.split(":"),2),o=n[0],i=n[1]/o*100;return O.a.createElement(S,{style:{paddingBottom:"".concat(i,"%"),position:"relative"}},O.a.createElement(S,{style:{height:"100%",position:"absolute",width:"100%"}},r))},I=t=>{let e=t.crop169,r=t.crop32,n=t.crop1251,o=t.crop11,i=t.crop45,c=t.crop23;return e||r||n||o||i||c};function E(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function q(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?E(Object(r),!0).forEach((function(e){M(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function M(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const z={aspectRatio:"1:1",displayImage:null,isVideo:!1,leadAsset:null};function F(t){let e=t.leadAsset;if(!e)return z;const r="Video"===e.__typename,n=I(r?e.posterImage:e);if(!n)return z;return{aspectRatio:n.ratio,displayImage:n,isVideo:r,leadAsset:q(q({},e),{},{isVideo:r})}}var N=r(7),R=r.n(N),L=r(8),V=r(9),D=r(10),W=r(11),$=r(12),U=r(13);var B=()=>{let t=null,e=null,r=null,n=null,o="unknown";"undefined"!=typeof window&&window.nuk&&(t=window.nuk.graphqlapi.url,e=!!window.nuk.graphqlapi.usePersistedQueries,r=window.nuk.getCookieValue("acs_tnl"),n=window.nuk.getCookieValue("sacs_tnl"),o=window.nuk.graphqlapi.clientName||o);const i={fetch:R.a,headers:{},uri:t};i.headers["content-type"]="application/x-www-form-urlencoded",i.headers.Authorization="Cookie acs_tnl=".concat(r,";sacs_tnl=").concat(n);const c=L.ApolloLink.from([e&&Object(D.createPersistedQueryLink)({useGETForHashedQueries:!0}),Object(V.createHttpLink)(i)].filter(Boolean));return new U.ApolloClient({name:"@times-components/utils (".concat(o,")"),cache:new $.InMemoryCache({fragmentMatcher:W.fragmentMatcher}),link:c})};var H=(t,e)=>t||e;const Q=t=>{const e=t.toString(16);return e.length%2?"0".concat(e):e};var G=t=>t&&t.rgba?"#".concat(Q(t.rgba.red)).concat(Q(t.rgba.green)).concat(Q(t.rgba.blue)).toUpperCase():null,Y=t=>t&&t.rgba?"rgba(".concat(t.rgba.red,", ").concat(t.rgba.green,", ").concat(t.rgba.blue,", ").concat(t.rgba.alpha,")"):null;var J=k.a.div.withConfig({displayName:"hover-icon__HoverIcon",componentId:"sc-1ge5rtz-0"})(["color:",";text-decoration-line:",";&:hover{color:",";text-decoration-line:",";}"],t=>t.colour,t=>t.underline&&"underline",t=>t.hoverColour||t.colour,t=>t.underline&&"none");class K extends x.Component{constructor(t){super(t),this.state={isClient:!1}}componentDidMount(){this.setState({isClient:!0})}render(){const t=this.state.isClient,e=this.props,r=e.client,n=e.server;return t?r&&r():n&&n()}}K.defaultProps={server:null,client:null};var X=K,Z=(t,e,r)=>{if(!t||!e||!r)return t;if(t.includes("?".concat(e))||t.includes("&".concat(e)))return t;const n=t.includes("?")?"&":"?";return"".concat(t).concat(n).concat(e,"=").concat(r)},tt=r(4),et=r.n(tt);var rt=t=>{let e=t.data,r=t.initialNumToRender,n=t.RenderItem;if(Array.isArray(e)){const t=e.map((t,e)=>e<r?O.a.createElement("div",{role:"listitem"},n({data:t,key:e})):null);if(t.length)return O.a.createElement("div",{role:"list"},t)}return null};var nt=k.a.div.withConfig({displayName:"tc-text__TcText",componentId:"sc-15igzev-0"})(["border:0px solid black;box-sizing:border-box;color:rgb(0,0,0);display:inline;font-size:14px;font-family:sans-serif;margin:0px;padding:0px;white-space:pre-wrap;overflow-wrap:break-word;"]);var ot=k.a.a.withConfig({displayName:"tc-text-link__TcTextLink",componentId:"sc-1voa8bp-0"})(["border:0px solid black;box-sizing:border-box;color:rgb(0,0,0);display:inline;font-size:14px;font-family:sans-serif;margin:0px;padding:0px;white-space:pre-wrap;overflow-wrap:break-word;"]);var it=k.a.div.withConfig({displayName:"tc-scroll-view__TcScrollView",componentId:"sc-1sygsh3-0"})(["height:500px;overflow-y:scroll;white-space:nowrap;"]);var ct=t=>!(!t||!["times2"].includes(t.toLowerCase()));r.d(e,"acceptedWidths",(function(){return i})),r.d(e,"normaliseWidthForAssetRequestCache",(function(){return a})),r.d(e,"screenWidth",(function(){return u})),r.d(e,"capitalise",(function(){return f})),r.d(e,"ratioTextToFloat",(function(){return p})),r.d(e,"stripTags",(function(){return d})),r.d(e,"checkStylesForUnits",(function(){return h})),r.d(e,"handleOnClickScrollTo",(function(){return b})),r.d(e,"handleHrefScrollTo",(function(){return y})),r.d(e,"clean",(function(){return _})),r.d(e,"addMissingProtocol",(function(){return w})),r.d(e,"getSectionNameForAnalytics",(function(){return j.a})),r.d(e,"AspectRatioContainer",(function(){return P})),r.d(e,"getLeadAsset",(function(){return F})),r.d(e,"makeClient",(function(){return B})),r.d(e,"getStandardTemplateCrop",(function(){return I})),r.d(e,"getDimensions",(function(){return o})),r.d(e,"getHeadline",(function(){return H})),r.d(e,"gqlRgbaToHex",(function(){return G})),r.d(e,"gqlRgbaToStyle",(function(){return Y})),r.d(e,"HoverIcon",(function(){return J})),r.d(e,"ServerClientRender",(function(){return X})),r.d(e,"appendToImageURL",(function(){return Z})),r.d(e,"getSectionFromTiles",(function(){return et.a})),r.d(e,"TcView",(function(){return S})),r.d(e,"TcFlatList",(function(){return rt})),r.d(e,"TcText",(function(){return nt})),r.d(e,"TcTextLink",(function(){return ot})),r.d(e,"TcScrollView",(function(){return it})),r.d(e,"CanShowPuzzleSidebar",(function(){return ct}))}]);
@@ -1,21 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- const paths = ["thetimes.co.uk/imageserver", "thetimes.co.uk/tto/archive/frame", /thetimes\.co\.uk\/([a-z0-9-]+\/)+[a-z0-9-]+-([bcdfghjklmnpqrstvwxz23567890]{9,11}$)/g];
8
- const subdomains = [/www.(.*?)thetimes.co.uk/g, /login.(.*?)thetimes.co.uk/g];
9
-
10
- const getDomainSpecificUrl = (host, url) => {
11
- if (host.includes("thetimes.com")) {
12
- if ([...paths, ...subdomains].some(match => url.match(match))) {
13
- return url.replace(".co.uk", ".com");
14
- }
15
- }
16
-
17
- return url;
18
- };
19
-
20
- var _default = getDomainSpecificUrl;
21
- exports.default = _default;
@@ -1,19 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- const transformDomainCom = (data, hostName) => {
9
- if (!hostName || hostName.includes("thetimes.com")) {
10
- const stringifiedData = JSON.stringify(data);
11
- const transformedData = stringifiedData.replace(/(www.(|uat-|staging-?)thetimes).co.uk/gm, match => match.replace(".co.uk", ".com"));
12
- return JSON.parse(transformedData);
13
- }
14
-
15
- return data;
16
- };
17
-
18
- var _default = transformDomainCom;
19
- exports.default = _default;