@quintype/arrow 3.13.1-subsequentload.0 → 3.13.1-subsequentloadcount.0
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/AlternateCollectionFilter/styles.arrow.css +1 -0
- package/AstrologyCollection/styles.arrow.css +1 -0
- package/AuthorsList/styles.arrow.css +1 -0
- package/FourColFiveStories/styles.arrow.css +1 -0
- package/FourColPortraitStories/styles.arrow.css +1 -0
- package/FourColSixteenStories/styles.arrow.css +1 -0
- package/FourTabbedBigStorySlider/styles.arrow.css +1 -0
- package/ListComponent/styles.arrow.css +1 -0
- package/ListicleStoryTemplate/styles.arrow.css +1 -0
- package/Listicles/styles.arrow.css +1 -0
- package/LiveBlogStoryTemplate/styles.arrow.css +1 -0
- package/MagazineEditions/styles.arrow.css +1 -0
- package/MagazineHeaderCard/styles.arrow.css +1 -0
- package/MagazineWidget/styles.arrow.css +1 -0
- package/OpinionCollection/styles.arrow.css +1 -0
- package/PhotoStoryTemplate/styles.arrow.css +1 -0
- package/README.md +194 -0
- package/SixColSixStories/styles.arrow.css +1 -0
- package/TextStoryTemplate/styles.arrow.css +1 -0
- package/ThreeColFlexStories/styles.arrow.css +1 -0
- package/ThreeColTwelveStories/styles.arrow.css +1 -0
- package/TwoColFourStoryHighlight/styles.arrow.css +1 -0
- package/TwoColSixStories/styles.arrow.css +1 -0
- package/TwoColTenStoriesSidebar/styles.arrow.css +1 -0
- package/app.scss +276 -0
- package/cjs/index.js +9 -0
- package/esm/index.js +9 -0
- package/package.json +1 -1
- package/AlsoRead/index.js +0 -1
- package/AsideCollection/index.js +0 -1
- package/Attachment/index.js +0 -1
- package/Author/index.js +0 -1
- package/AuthorIntroductionCard/index.js +0 -1
- package/AuthorWithTime/index.js +0 -1
- package/BigFact/index.js +0 -1
- package/BlockQuote/index.js +0 -1
- package/Blurb/index.js +0 -1
- package/CollectionFilter/index.js +0 -1
- package/CollectionName/index.js +0 -1
- package/ElevenStories/index.js +0 -1
- package/FourColGrid/index.js +0 -1
- package/FourColTwelveStories/index.js +0 -1
- package/FourStorySlider/index.js +0 -1
- package/FourStorySliderPortrait/index.js +0 -1
- package/FullScreenSlider/index.js +0 -1
- package/HalfScreenSlider/index.js +0 -1
- package/Headline/index.js +0 -1
- package/HeroImage/index.js +0 -1
- package/Image/index.js +0 -1
- package/ImageGallery/index.js +0 -1
- package/ImageSlideshow/index.js +0 -1
- package/KeyEvents/index.js +0 -1
- package/LoadmoreButton/index.js +0 -1
- package/OneColStoryList/index.js +0 -1
- package/PageIntroductionCard/index.js +0 -1
- package/QuestionAnswer/index.js +0 -1
- package/Quote/index.js +0 -1
- package/Reference/index.js +0 -1
- package/ScrollSnap/index.js +0 -1
- package/SectionTag/index.js +0 -1
- package/SocialShareTemplate/index.js +0 -1
- package/StoryCard/index.js +0 -1
- package/StoryCollection/index.js +0 -1
- package/StoryElement/index.js +0 -1
- package/StoryElementCard/index.js +0 -1
- package/StorycardContent/index.js +0 -1
- package/Subheadline/index.js +0 -1
- package/Summary/index.js +0 -1
- package/TagIntroductionCard/index.js +0 -1
- package/Text/index.js +0 -1
- package/ThreeColFourteenStories/index.js +0 -1
- package/ThreeColGrid/index.js +0 -1
- package/ThreeColSevenStory/index.js +0 -1
- package/ThreeColSixStories/index.js +0 -1
- package/TimeStamp/index.js +0 -1
- package/TwoColFourStories/index.js +0 -1
- package/TwoColSevenStories/index.js +0 -1
- package/TwoColThreeStories/index.js +0 -1
- package/Video/index.js +0 -1
- package/VideoStoryTemplate/index.js +0 -1
package/HeroImage/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Link as t,ResponsiveHeroImage as e}from"@quintype/components";import r from"lodash.get";import n from"prop-types";import o,{useContext as a,createContext as i}from"react";import{useSelector as l}from"react-redux";import"react-timeago";import"date-fns-tz";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}function u(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a=[],i=!0,l=!1;try{for(r=r.call(t);!(i=(n=r.next()).done)&&(a.push(n.value),!e||a.length!==e);i=!0);}catch(t){l=!0,o=t}finally{try{i||null==r.return||r.return()}finally{if(l)throw o}}return a}}(t,e)||function(t,e){if(t){if("string"==typeof t)return c(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(t,e):void 0}}(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.")}()}var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function h(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function f(t){var e={exports:{}};return t(e,e.exports),e.exports}var p=f((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={attributeNames:{styleName:"className"},generateScopedName:"[path]___[name]__[local]___[hash:base64:5]",handleMissingStyleName:"throw"};e.default=r})),d=h(f((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,n=(r=p)&&r.__esModule?r:{default:r};var o=function(t,e){if("throw"===e)throw new Error(t);return"warn"===e&&console.warn(t),null};e.default=function(t,e,r){var a=Object.keys(e),i=r||{},l=i.handleMissingStyleName,c=void 0===l?n.default.handleMissingStyleName:l,u=i.autoResolveMultipleImports,s=void 0===u?n.default.autoResolveMultipleImports:u;return t?t.split(" ").filter((function(t){return t})).map((function(t){if(function(t){return-1!==t.indexOf(".")}(t))return function(t,e,r){var a=t.split("."),i=a[0],l=a[1],c=r||n.default.handleMissingStyleName;return l?e[i]?e[i][l]?e[i][l]:o("CSS module does not exist: "+l,c):o("CSS module import does not exist: "+i,c):o("Invalid style name: "+t,c)}(t,e,c);if(0===a.length)throw new Error("Cannot use styleName attribute for style name '"+t+"' without importing at least one stylesheet.");if(a.length>1){if(!s)throw new Error("Cannot use anonymous style name '"+t+"' with more than one stylesheet import without setting 'autoResolveMultipleImports' to true.");return function(t,e,r){var a=r||n.default.handleMissingStyleName,i=Object.keys(e).map((function(r){return e[r][t]&&r})).filter((function(t){return t}));if(i.length>1)throw new Error('Cannot resolve styleName "'+t+'" because it is present in multiple imports:\n\n\t'+i.join("\n\t")+'\n\nYou can resolve this by using a named import, e.g:\n\n\timport foo from "'+i[0]+'";\n\t<div styleName="foo.'+t+'" />\n\n');return 0===i.length?o("Could not resolve the styleName '"+t+"'.",a):e[i[0]][t]}(t,e,c)}var r=e[a[0]];return r[t]?r[t]:o("Could not resolve the styleName '"+t+"'.",c)})).filter((function(t){return t})).join(" "):""}})));f((function(t){var e=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=e&&e.prototype instanceof v?e:v,a=Object.create(o.prototype),i=new S(n||[]);return a._invoke=function(t,e,r){var n=h;return function(o,a){if(n===p)throw new Error("Generator is already running");if(n===d){if("throw"===o)throw a;return C()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var l=x(i,r);if(l){if(l===m)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===h)throw n=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var c=s(t,e,r);if("normal"===c.type){if(n=r.done?d:f,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=d,r.method="throw",r.arg=c.arg)}}}(t,r,i),a}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var h="suspendedStart",f="suspendedYield",p="executing",d="completed",m={};function v(){}function g(){}function y(){}var _={};c(_,a,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(N([])));w&&w!==r&&n.call(w,a)&&(_=w);var E=y.prototype=v.prototype=Object.create(_);function j(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(o,a,i,l){var c=s(t[o],t,a);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==typeof h&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,i,l)}),(function(t){r("throw",t,i,l)})):e.resolve(h).then((function(t){u.value=t,i(u)}),(function(t){return r("throw",t,i,l)}))}l(c.arg)}var o;this._invoke=function(t,n){function a(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(a,a):a()}}function x(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,x(t,r),"throw"===r.method))return m;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var o=s(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function N(t){if(t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}return{next:C}}function C(){return{value:e,done:!0}}return g.prototype=y,c(E,"constructor",y),c(y,"constructor",g),g.displayName=c(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,c(t,l,"GeneratorFunction")),t.prototype=Object.create(E),t},t.awrap=function(t){return{__await:t}},j(k.prototype),c(k.prototype,i,(function(){return this})),t.AsyncIterator=k,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new k(u(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},j(E),c(E,l,"Generator"),c(E,a,(function(){return this})),c(E,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=N,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return l.type="throw",l.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],l=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:N(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}));var m=Array.isArray,v="object"==typeof s&&s&&s.Object===Object&&s,g="object"==typeof self&&self&&self.Object===Object&&self,y=v||g||Function("return this")(),_=y.Symbol,b=Object.prototype,w=b.hasOwnProperty,E=b.toString,j=_?_.toStringTag:void 0;var k=function(t){var e=w.call(t,j),r=t[j];try{t[j]=void 0;var n=!0}catch(t){}var o=E.call(t);return n&&(e?t[j]=r:delete t[j]),o},x=Object.prototype.toString;var L=function(t){return x.call(t)},O=_?_.toStringTag:void 0;var S=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":O&&O in Object(t)?k(t):L(t)};var N=function(t){return null!=t&&"object"==typeof t};var C=function(t){return"symbol"==typeof t||N(t)&&"[object Symbol]"==S(t)},F=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,z=/^\w*$/;var T=function(t,e){if(m(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!C(t))||(z.test(t)||!F.test(t)||null!=e&&t in Object(e))};var P=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var I,M=function(t){if(!P(t))return!1;var e=S(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},R=y["__core-js_shared__"],A=(I=/[^.]+$/.exec(R&&R.keys&&R.keys.IE_PROTO||""))?"Symbol(src)_1."+I:"";var G=function(t){return!!A&&A in t},W=Function.prototype.toString;var $=function(t){if(null!=t){try{return W.call(t)}catch(t){}try{return t+""}catch(t){}}return""},H=/^\[object .+?Constructor\]$/,B=Function.prototype,q=Object.prototype,U=B.toString,Y=q.hasOwnProperty,J=RegExp("^"+U.call(Y).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var K=function(t){return!(!P(t)||G(t))&&(M(t)?J:H).test($(t))};var Z=function(t,e){return null==t?void 0:t[e]};var D=function(t,e){var r=Z(t,e);return K(r)?r:void 0},V=D(Object,"create");var Q=function(){this.__data__=V?V(null):{},this.size=0};var X=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},tt=Object.prototype.hasOwnProperty;var et=function(t){var e=this.__data__;if(V){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return tt.call(e,t)?e[t]:void 0},rt=Object.prototype.hasOwnProperty;var nt=function(t){var e=this.__data__;return V?void 0!==e[t]:rt.call(e,t)};var ot=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=V&&void 0===e?"__lodash_hash_undefined__":e,this};function at(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}at.prototype.clear=Q,at.prototype.delete=X,at.prototype.get=et,at.prototype.has=nt,at.prototype.set=ot;var it=at;var lt=function(){this.__data__=[],this.size=0};var ct=function(t,e){return t===e||t!=t&&e!=e};var ut=function(t,e){for(var r=t.length;r--;)if(ct(t[r][0],e))return r;return-1},st=Array.prototype.splice;var ht=function(t){var e=this.__data__,r=ut(e,t);return!(r<0)&&(r==e.length-1?e.pop():st.call(e,r,1),--this.size,!0)};var ft=function(t){var e=this.__data__,r=ut(e,t);return r<0?void 0:e[r][1]};var pt=function(t){return ut(this.__data__,t)>-1};var dt=function(t,e){var r=this.__data__,n=ut(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function mt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}mt.prototype.clear=lt,mt.prototype.delete=ht,mt.prototype.get=ft,mt.prototype.has=pt,mt.prototype.set=dt;var vt=mt,gt=D(y,"Map");var yt=function(){this.size=0,this.__data__={hash:new it,map:new(gt||vt),string:new it}};var _t=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var bt=function(t,e){var r=t.__data__;return _t(e)?r["string"==typeof e?"string":"hash"]:r.map};var wt=function(t){var e=bt(this,t).delete(t);return this.size-=e?1:0,e};var Et=function(t){return bt(this,t).get(t)};var jt=function(t){return bt(this,t).has(t)};var kt=function(t,e){var r=bt(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function xt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}xt.prototype.clear=yt,xt.prototype.delete=wt,xt.prototype.get=Et,xt.prototype.has=jt,xt.prototype.set=kt;var Lt=xt;function Ot(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=t.apply(this,n);return r.cache=a.set(o,i)||a,i};return r.cache=new(Ot.Cache||Lt),r}Ot.Cache=Lt;var St=Ot;var Nt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ct=/\\(\\)?/g,Ft=function(t){var e=St(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Nt,(function(t,r,n,o){e.push(n?o.replace(Ct,"$1"):r||t)})),e}));var zt=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o},Tt=_?_.prototype:void 0,Pt=Tt?Tt.toString:void 0;var It=function t(e){if("string"==typeof e)return e;if(m(e))return zt(e,t)+"";if(C(e))return Pt?Pt.call(e):"";var r=e+"";return"0"==r&&1/e==-Infinity?"-0":r};var Mt=function(t){return null==t?"":It(t)};var Rt=function(t,e){return m(t)?t:T(t,e)?[t]:Ft(Mt(t))};var At=function(t){if("string"==typeof t||C(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e};var Gt=function(t,e){for(var r=0,n=(e=Rt(e,t)).length;null!=t&&r<n;)t=t[At(e[r++])];return r&&r==n?t:void 0};var Wt=function(t,e,r){var n=null==t?void 0:Gt(t,e);return void 0===n?r:n},$t={mobile:767,tablet:1024};function Ht(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t["story-template"],r=void 0===e?"":e,n=t.metadata,o=void 0===n?{}:n;return"news-elsewhere"===r?Wt(o,["reference-url"],""):""}n.shape({"sketches-host":n.string,"cdn-name":n.string,"cdn-image":n.string}),n.shape({headline:n.string,"last-published-at":n.number,subheadline:n.string});var Bt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"news-elsewhere"===Wt(t,["story-template"])?Wt(t,["metadata","reference-url"],""):t.url||e},qt=i(),Ut=function(t){var e=t.width,r=void 0===e?40:e,n=t.height,a=void 0===n?30:n,i=t.iconColor,l=void 0===i?"#99B0CB":i;return o.createElement("svg",{width:r,height:a,viewBox:"0 0 102 76",version:"1.1"},o.createElement("g",{id:"demo-home-copy",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",transform:"translate(-377.000000, -314.000000)"},o.createElement("g",{id:"Group-13",transform:"translate(377.000000, 314.000000)"},o.createElement("path",{d:"M43.2,49.7 L62.2,19.2 L87.2,59.4 L17,59.4 L32.8,39.4 L43.2,49.7 Z M29.9,28.6 C25.8683213,28.6 22.6,25.3316787 22.6,21.3 C22.6,17.2683213 25.8683213,14 29.9,14 C33.9316787,14 37.2,17.2683213 37.2,21.3 C37.2,25.3316787 33.9316787,28.6 29.9,28.6 Z",id:"Combined-Shape",fill:l,fillRule:"nonzero"}),o.createElement("rect",{id:"Rectangle-19",stroke:l,strokeWidth:"3",x:"1.5",y:"1.5",width:"99",height:"73",rx:"3"}))))};Ut.propTypes={width:n.object,height:n.object,iconColor:n.object};var Yt=function(){return o.createElement("div",{className:"arr--fallback-image fallback-m_image__1GYCJ fallback-m_image-position__3KddP"},o.createElement("figure",{className:"arr--fallback-svg fallback-m_fallback-svg__tK9fL"},o.createElement(Ut,null)))},Jt=function(e){var r=e.slug;return r?o.createElement(t,{href:r,"aria-label":"image-fallback"},Yt()):Yt()};Jt.propTypes={slug:n.string};var Kt=function(){return o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"36",height:"28"},o.createElement("g",{fill:"none",fillRule:"evenodd"},o.createElement("rect",{width:"36",height:"28",fill:"#3D6FCF",rx:"4"}),o.createElement("path",{stroke:"#FFF",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M22 14.667v4c0 .736-.597 1.333-1.333 1.333h-7.334A1.333 1.333 0 0112 18.667v-7.334c0-.736.597-1.333 1.333-1.333h4M20 8h4v4m-7.333 3.333L24 8"})))},Zt=function(e){var r=e.hyperLink,n=void 0===r?"":r;return n?o.createElement(t,{href:n,"aria-label":"hyperlink-button",className:"arr--hyperlink-button hyperlink-m_hyperlink-button__1CqWx",target:"_blank",rel:"noopener noreferrer"},o.createElement(Kt,null)):null};Zt.propTypes={hyperLink:n.string};var Dt={"./hero-image.m.css":{"hero-image":"hero-image-m_hero-image__3lraV","right-padding":"hero-image-m_right-padding__1LkCe","left-padding":"hero-image-m_left-padding__pYRAj","right-padding-mob":"hero-image-m_right-padding-mob__3-uOU",placeholder:"hero-image-m_placeholder__1omCm","hero-image-mob":"hero-image-m_hero-image-mob__13JJp","with-padding":"hero-image-m_with-padding__324G_",image:"hero-image-m_image__1mz0U"}},Vt=function(n){var i=n.story,c=n.FullBleed,s=n.aspectRatio,h=n.defaultWidth,f=n.widths,p=n.isHorizontal,m=n.isHorizontalMobile,v=n.isHorizontalWithImageLast,g=n.defaultFallback,y=n.isStoryPageImage,_=n.config,b=(a(qt)||{}).fallbackImageUrl,w=void 0===b?"":b,E=_.StoryTemplateIcon,j=void 0===E?function(){return null}:E,k=l((function(t){return r(t,["qt","config","showPlaceholder"])}))?"placeholder":"",x=c?"":"with-padding",L="hero-image";p?L="right-padding":v&&(L="left-padding");var O,S=m?"right-padding-mob":"",N=function(t){var e=u(t,2),r=e[0],n=e[1];return r>0&&n>0?n/r*100:0},C=u(s,2),F=C[0],z=C[1],T=void 0===z?F:z,P=!!(O=Wt($t,"mobile"))&&Wt(global,"document.documentElement.clientWidth")<=O,I=P?F:T,M=N(P?F:T),R=r(i,["hero-image-s3-key"])||r(i,["alternative","home","default","hero-image","hero-image-s3-key"]),A=r(i,["hero-image-hyperlink"],""),G=function(){return R?o.createElement(o.Fragment,null,o.createElement("figure",{style:{paddingTop:M+"%"},className:"arr--responsive-hero-image "+d("image ".concat(k),Dt)},o.createElement(j,{storyTemplate:i["story-template"]}),o.createElement(e,{story:i,aspectRatio:I,defaultWidth:h,widths:f,imgParams:{auto:["format","compress"],fit:"max"}})),y&&A&&o.createElement(Zt,{hyperLink:A})):w&&!y?o.createElement("figure",{style:{paddingTop:M+"%"},className:"arr--responsive-hero-image "+d("image ".concat(k),Dt)},o.createElement("img",{className:"qt-image","data-src":"".concat(w),alt:"image-fallback"})):o.createElement(o.Fragment,null,g?o.createElement("div",{"data-test-id":"arr--fallback-hero-image",style:{paddingTop:M+"%"},className:"arr--fallback-hero-image "+d("image ".concat(k),Dt)},o.createElement(j,{storyTemplate:i["story-template"]}),o.createElement(Jt,null)):null)};return i&&(y?o.createElement("div",{"data-test-id":"arr--hero-image",className:"arr--hero-image "+d("".concat(L," ").concat(x," ").concat(S),Dt)},G()):o.createElement(t,{"data-test-id":"arr--hero-image",href:Bt(i,"/".concat(i.slug)),externalLink:Ht(i),"aria-label":"fallback-hero-image",className:"arr--hero-image "+d("".concat(L," ").concat(x," ").concat(S),Dt)},G()))};Vt.propTypes={story:n.object.isRequired,FullBleed:n.bool,defaultWidth:n.number,widths:n.array,aspectRatio:n.array,isHorizontal:n.bool,isHorizontalMobile:n.bool,defaultFallback:n.bool,isHorizontalWithImageLast:n.bool,isStoryPageImage:n.bool,config:n.object},Vt.defaultProps={FullBleed:!0,aspectRatio:[[1,1],[16,9]],defaultWidth:480,widths:[250,480,640],isHorizontal:!1,isHorizontalMobile:!1,defaultFallback:!0,isStoryPageImage:!1,isHorizontalWithImageLast:!1,config:{}};export{Vt as HeroImage};
|
package/Image/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import t,{useState as e,Suspense as r,lazy as n,useContext as o,createContext as i}from"react";import a from"prop-types";import{Link as c,ResponsiveImage as l}from"@quintype/components";import"react-timeago";import"date-fns-tz";import{useSelector as u}from"react-redux";import s from"lodash.get";function p(){return p=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},p.apply(this,arguments)}function f(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}var h=["element","render"],m=function(e){return function(r){var n=r.element,o=r.render,i=f(r,h);return n?o&&"function"==typeof o?o(r):t.createElement(e,p({},i,{element:n})):null}};m.propTypes={StoryElement:a.element};var y="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function d(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function v(t){var e={exports:{}};return t(e,e.exports),e.exports}v((function(t){var e=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=e&&e.prototype instanceof d?e:d,i=Object.create(o.prototype),a=new N(n||[]);return i._invoke=function(t,e,r){var n=p;return function(o,i){if(n===h)throw new Error("Generator is already running");if(n===m){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=k(a,r);if(c){if(c===y)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===p)throw n=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=h;var l=s(t,e,r);if("normal"===l.type){if(n=r.done?m:f,l.arg===y)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n=m,r.method="throw",r.arg=l.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var p="suspendedStart",f="suspendedYield",h="executing",m="completed",y={};function d(){}function v(){}function g(){}var b={};l(b,i,(function(){return this}));var _=Object.getPrototypeOf,w=_&&_(_(C([])));w&&w!==r&&n.call(w,i)&&(b=w);var E=g.prototype=d.prototype=Object.create(b);function O(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(o,i,a,c){var l=s(t[o],t,i);if("throw"!==l.type){var u=l.arg,p=u.value;return p&&"object"==typeof p&&n.call(p,"__await")?e.resolve(p.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(p).then((function(t){u.value=t,a(u)}),(function(t){return r("throw",t,a,c)}))}c(l.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function k(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method))return y;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var o=s(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function C(t){if(t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}return{next:L}}function L(){return{value:e,done:!0}}return v.prototype=g,l(E,"constructor",g),l(g,"constructor",v),v.displayName=l(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,c,"GeneratorFunction")),t.prototype=Object.create(E),t},t.awrap=function(t){return{__await:t}},O(j.prototype),l(j.prototype,a,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new j(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},O(E),l(E,c,"Generator"),l(E,i,(function(){return this})),l(E,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=C,N.prototype={constructor:N,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(S),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return c.type="throw",c.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:C(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}));var g="object"==typeof y&&y&&y.Object===Object&&y,b="object"==typeof self&&self&&self.Object===Object&&self,_=g||b||Function("return this")(),w=_.Symbol,E=Object.prototype,O=E.hasOwnProperty,j=E.toString,k=w?w.toStringTag:void 0;var x=function(t){var e=O.call(t,k),r=t[k];try{t[k]=void 0;var n=!0}catch(t){}var o=j.call(t);return n&&(e?t[k]=r:delete t[k]),o},S=Object.prototype.toString;var N=function(t){return S.call(t)},C=w?w.toStringTag:void 0;var L=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":C&&C in Object(t)?x(t):N(t)};var M=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var T,P=function(t){if(!M(t))return!1;var e=L(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},I=_["__core-js_shared__"],F=(T=/[^.]+$/.exec(I&&I.keys&&I.keys.IE_PROTO||""))?"Symbol(src)_1."+T:"";var A=function(t){return!!F&&F in t},R=Function.prototype.toString;var z=function(t){if(null!=t){try{return R.call(t)}catch(t){}try{return t+""}catch(t){}}return""},$=/^\[object .+?Constructor\]$/,G=Function.prototype,W=Object.prototype,q=G.toString,D=W.hasOwnProperty,B=RegExp("^"+q.call(D).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var H=function(t){return!(!M(t)||A(t))&&(P(t)?B:$).test(z(t))};var Y=function(t,e){return null==t?void 0:t[e]};var U=function(t,e){var r=Y(t,e);return H(r)?r:void 0},X=U(Object,"create");var K=function(){this.__data__=X?X(null):{},this.size=0};var V=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},J=Object.prototype.hasOwnProperty;var Q=function(t){var e=this.__data__;if(X){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return J.call(e,t)?e[t]:void 0},Z=Object.prototype.hasOwnProperty;var tt=function(t){var e=this.__data__;return X?void 0!==e[t]:Z.call(e,t)};var et=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=X&&void 0===e?"__lodash_hash_undefined__":e,this};function rt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}rt.prototype.clear=K,rt.prototype.delete=V,rt.prototype.get=Q,rt.prototype.has=tt,rt.prototype.set=et;var nt=rt;var ot=function(){this.__data__=[],this.size=0};var it=function(t,e){return t===e||t!=t&&e!=e};var at=function(t,e){for(var r=t.length;r--;)if(it(t[r][0],e))return r;return-1},ct=Array.prototype.splice;var lt=function(t){var e=this.__data__,r=at(e,t);return!(r<0)&&(r==e.length-1?e.pop():ct.call(e,r,1),--this.size,!0)};var ut=function(t){var e=this.__data__,r=at(e,t);return r<0?void 0:e[r][1]};var st=function(t){return at(this.__data__,t)>-1};var pt=function(t,e){var r=this.__data__,n=at(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function ft(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ft.prototype.clear=ot,ft.prototype.delete=lt,ft.prototype.get=ut,ft.prototype.has=st,ft.prototype.set=pt;var ht=ft,mt=U(_,"Map");var yt=function(){this.size=0,this.__data__={hash:new nt,map:new(mt||ht),string:new nt}};var dt=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var vt=function(t,e){var r=t.__data__;return dt(e)?r["string"==typeof e?"string":"hash"]:r.map};var gt=function(t){var e=vt(this,t).delete(t);return this.size-=e?1:0,e};var bt=function(t){return vt(this,t).get(t)};var _t=function(t){return vt(this,t).has(t)};var wt=function(t,e){var r=vt(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function Et(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Et.prototype.clear=yt,Et.prototype.delete=gt,Et.prototype.get=bt,Et.prototype.has=_t,Et.prototype.set=wt;var Ot=Et;function jt(t,e){if("function"!=typeof t||null!=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 a=t.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(jt.Cache||Ot),r}jt.Cache=Ot;var kt=jt;var xt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,St=/\\(\\)?/g;(function(t){var e=kt(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache})((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(xt,(function(t,r,n,o){e.push(n?o.replace(St,"$1"):r||t)})),e}));var Nt=w?w.prototype:void 0;Nt&&Nt.toString;var Ct=function(t){var e=function(t){return{r:parseInt(t.slice(1,3),16),g:parseInt(t.slice(3,5),16),b:parseInt(t.slice(5,7),16)}}(t);return.299*e.r+.587*e.g+.114*e.b},Lt=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"rgba(255, 255, 255, 0)",e=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);return e&&4===e.length?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):t},Mt=a.shape({"sketches-host":a.string,"cdn-name":a.string,"cdn-image":a.string}),Tt=a.shape({headline:a.string,"last-published-at":a.number,subheadline:a.string});function Pt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function It(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}function Ft(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],a=!0,c=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){c=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return It(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?It(t,e):void 0}}(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.")}()}var At=function(e){return e.width,e.height,e.iconColor,t.createElement("div",{className:"loading-m_loading-indicator__2Dlst"},t.createElement("svg",{width:"40",height:"40",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid"},t.createElement("circle",{cx:"84",cy:"50",r:"0",fill:"currentColor"},t.createElement("animate",{attributeName:"r",values:"10;0;0;0;0",keyTimes:"0;0.25;0.5;0.75;1",keySplines:"0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",calcMode:"spline",dur:"2s",repeatCount:"indefinite",begin:"0s"}),t.createElement("animate",{attributeName:"cx",values:"84;84;84;84;84",keyTimes:"0;0.25;0.5;0.75;1",keySplines:"0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",calcMode:"spline",dur:"2s",repeatCount:"indefinite",begin:"0s"})),t.createElement("circle",{cx:"84",cy:"50",r:".709",fill:"currentColor"},t.createElement("animate",{attributeName:"r",values:"0;10;10;10;0",keyTimes:"0;0.25;0.5;0.75;1",keySplines:"0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",calcMode:"spline",dur:"2s",repeatCount:"indefinite",begin:"-1s"}),t.createElement("animate",{attributeName:"cx",values:"16;16;50;84;84",keyTimes:"0;0.25;0.5;0.75;1",keySplines:"0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",calcMode:"spline",dur:"2s",repeatCount:"indefinite",begin:"-1s"})),t.createElement("circle",{cx:"81.59",cy:"50",r:"10",fill:"currentColor"},t.createElement("animate",{attributeName:"r",values:"0;10;10;10;0",keyTimes:"0;0.25;0.5;0.75;1",keySplines:"0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",calcMode:"spline",dur:"2s",repeatCount:"indefinite",begin:"-0.5s"}),t.createElement("animate",{attributeName:"cx",values:"16;16;50;84;84",keyTimes:"0;0.25;0.5;0.75;1",keySplines:"0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",calcMode:"spline",dur:"2s",repeatCount:"indefinite",begin:"-0.5s"})),t.createElement("circle",{cx:"47.59",cy:"50",r:"10",fill:"currentColor"},t.createElement("animate",{attributeName:"r",values:"0;10;10;10;0",keyTimes:"0;0.25;0.5;0.75;1",keySplines:"0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",calcMode:"spline",dur:"2s",repeatCount:"indefinite",begin:"0s"}),t.createElement("animate",{attributeName:"cx",values:"16;16;50;84;84",keyTimes:"0;0.25;0.5;0.75;1",keySplines:"0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",calcMode:"spline",dur:"2s",repeatCount:"indefinite",begin:"0s"})),t.createElement("circle",{cx:"16",cy:"50",r:"9.291",fill:"currentColor"},t.createElement("animate",{attributeName:"r",values:"0;0;10;10;10",keyTimes:"0;0.25;0.5;0.75;1",keySplines:"0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",calcMode:"spline",dur:"2s",repeatCount:"indefinite",begin:"0s"}),t.createElement("animate",{attributeName:"cx",values:"16;16;16;50;84",keyTimes:"0;0.25;0.5;0.75;1",keySplines:"0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",calcMode:"spline",dur:"2s",repeatCount:"indefinite",begin:"0s"}))))};At.propTypes={width:a.object,height:a.object,iconColor:a.object};var Rt=function(){return t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"36",height:"28"},t.createElement("g",{fill:"none",fillRule:"evenodd"},t.createElement("rect",{width:"36",height:"28",fill:"#3D6FCF",rx:"4"}),t.createElement("path",{stroke:"#FFF",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M22 14.667v4c0 .736-.597 1.333-1.333 1.333h-7.334A1.333 1.333 0 0112 18.667v-7.334c0-.736.597-1.333 1.333-1.333h4M20 8h4v4m-7.333 3.333L24 8"})))},zt=function(e){var r=e.hyperLink,n=void 0===r?"":r;return n?t.createElement(c,{href:n,"aria-label":"hyperlink-button",className:"arr--hyperlink-button hyperlink-m_hyperlink-button__1CqWx",target:"_blank",rel:"noopener noreferrer"},t.createElement(Rt,null)):null};function $t(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}zt.propTypes={hyperLink:a.string};var Gt=n((function(){return import("react-image-lightbox")})),Wt=function(n){var o=n.imageSlug,i=void 0===o?"":o,a=n.template,c=n.element,l=void 0===c?{}:c,f=n.props,h=u((function(t){return s(t,["qt","config","cdn-image"])})),m=Ft(e(0),2),y=m[0],d=m[1],v=Ft(e(!1),2),g=v[0],b=v[1],_=s(global,["innerWidth"],0),w=s(l,["story-elements"],[]).map((function(t){return t.hyperlink})),E=[];i||(E=s(l,["story-elements"],[]).map((function(t){return"//".concat(h,"/").concat(t["image-s3-key"],"?w=").concat(_)})));var O=i?"onClick":"onClickHandler",j=E.length,k=function(){return l.hyperlink||w[y]?t.createElement(zt,{hyperLink:l.hyperlink||w[y]}):null},x=i?{mainSrc:"//".concat(h,"/").concat(i,"?w=").concat(_),toolbarButtons:[k()]}:{mainSrc:E[y],nextSrc:E[(y+1)%j],prevSrc:E[(y+j-1)%j],onMoveNextRequest:function(){return function(t){d((y+1)%t)}(j)},onMovePrevRequest:function(){return function(t){d((y+t-1)%t)}(j)},toolbarButtons:[k()]},S=function(){return t.createElement("div",null,t.createElement(At,null))};return t.createElement("div",null,t.createElement(a,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?$t(Object(r),!0).forEach((function(e){Pt(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):$t(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}(Pt({},O,(function(t){b(!0),d(t)})),f)),g?t.createElement(r,{fallback:t.createElement(S,null)},t.createElement(Gt,p({wrapperClassName:"arr--image-lightbox",onCloseRequest:function(){d(0),b(!1)}},x))):null)};Wt.propTypes={imageSlug:a.string,template:a.func,element:a.shape({"story-elements":a.array}),props:a.object};var qt=i(),Dt=function(){return o(qt)},Bt=v((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={attributeNames:{styleName:"className"},generateScopedName:"[path]___[name]__[local]___[hash:base64:5]",handleMissingStyleName:"throw"};e.default=r})),Ht=d(v((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,n=(r=Bt)&&r.__esModule?r:{default:r};var o=function(t,e){if("throw"===e)throw new Error(t);return"warn"===e&&console.warn(t),null};e.default=function(t,e,r){var i=Object.keys(e),a=r||{},c=a.handleMissingStyleName,l=void 0===c?n.default.handleMissingStyleName:c,u=a.autoResolveMultipleImports,s=void 0===u?n.default.autoResolveMultipleImports:u;return t?t.split(" ").filter((function(t){return t})).map((function(t){if(function(t){return-1!==t.indexOf(".")}(t))return function(t,e,r){var i=t.split("."),a=i[0],c=i[1],l=r||n.default.handleMissingStyleName;return c?e[a]?e[a][c]?e[a][c]:o("CSS module does not exist: "+c,l):o("CSS module import does not exist: "+a,l):o("Invalid style name: "+t,l)}(t,e,l);if(0===i.length)throw new Error("Cannot use styleName attribute for style name '"+t+"' without importing at least one stylesheet.");if(i.length>1){if(!s)throw new Error("Cannot use anonymous style name '"+t+"' with more than one stylesheet import without setting 'autoResolveMultipleImports' to true.");return function(t,e,r){var i=r||n.default.handleMissingStyleName,a=Object.keys(e).map((function(r){return e[r][t]&&r})).filter((function(t){return t}));if(a.length>1)throw new Error('Cannot resolve styleName "'+t+'" because it is present in multiple imports:\n\n\t'+a.join("\n\t")+'\n\nYou can resolve this by using a named import, e.g:\n\n\timport foo from "'+a[0]+'";\n\t<div styleName="foo.'+t+'" />\n\n');return 0===a.length?o("Could not resolve the styleName '"+t+"'.",i):e[a[0]][t]}(t,e,l)}var r=e[i[0]];return r[t]?r[t]:o("Could not resolve the styleName '"+t+"'.",l)})).filter((function(t){return t})).join(" "):""}}))),Yt={"./caption-attribution.m.css":{viewports:'"../../../../assets/stylesheets/viewports.m.css"',mobile:"768px",caption:"caption-attribution-m_caption__BM5NN",wrapper:"caption-attribution-m_wrapper__oHBX7",dark:"caption-attribution-m_dark__uER8u",attribution:"caption-attribution-m_attribution__279W9",light:"caption-attribution-m_light__19OWp"}},Ut=function(e){var r=e.story,n=e.element;if(e.config,!r&&!n)return null;var o=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"rgb(255,255,255)",e=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(t)?t:Lt(t);return Ct(e)<155?"light":"dark"}((Dt()||{}).theme),i=r||{},a=i["hero-image-caption"],c=void 0===a?"":a,l=i["hero-image-attribution"],u=void 0===l?"":l,s=n||{},p=s.title,f=void 0===p?"":p,h=s["image-attribution"],m=c||f,y=u||(void 0===h?"":h),d=m?"wrapper":"";return t.createElement("div",{"data-test-id":"caption",className:"arr--caption-attribution "+Ht("caption ".concat(o),Yt)},t.createElement("span",{dangerouslySetInnerHTML:{__html:m}}),y&&t.createElement("span",{"data-test-id":"attribution",dangerouslySetInnerHTML:{__html:y},className:Ht("attribution ".concat(o," ").concat(d),Yt)}))};Ut.propTypes={config:a.shape({theme:a.string}),story:Tt,element:a.shape({"image-attribution":a.string,title:a.string})};var Xt=["element","opts","story","config","caption"],Kt=function(e){var r=e.element,n=e.opts,o=void 0===n?{}:n,i=e.story,c=void 0===i?{}:i;e.config;var u=e.caption,s=void 0===u||u,h=f(e,Xt);if(!r)return null;var m=Dt()||{},y=function(e){var n=e.onClick;return t.createElement("div",{className:"image-m_image-template__3s9OA"},t.createElement("figure",{className:"image-m_element__KVuzX",onClick:function(){return n()}},t.createElement(l,{slug:r["image-s3-key"],metadata:r["image-metadata"],alt:r.title,aspectRatio:null,defaultWidth:640,widths:o.imageWidths||[360,640,1200],imgParams:{auto:["format","compress"]}})),r.hyperlink&&t.createElement(zt,{hyperLink:r.hyperlink}))};return y.propTypes={onClick:a.func},t.createElement("div",p({className:"arrow-component arr--image-element"},h,{"data-test-id":"image-element"}),t.createElement(Wt,{template:y,element:r,imageSlug:r["image-s3-key"],story:c}),s&&t.createElement(Ut,{element:r,config:m}))};Kt.propTypes={element:a.shape({"image-s3-key":a.string,"image-metadata":a.object,"image-attribution":a.string,title:a.string,hyperlink:a.string}),caption:a.bool,opts:a.shape({imageWidths:a.array}),story:Tt,config:Mt};var Vt=m(Kt);export{Vt as Image};
|
package/ImageGallery/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e,{useState as t,Suspense as r,lazy as n}from"react";import o from"prop-types";import{Link as i,ResponsiveImage as a}from"@quintype/components";import{useSelector as l}from"react-redux";import c from"lodash.get";import"react-timeago";import"date-fns-tz";function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u.apply(this,arguments)}function s(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var f="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function p(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function h(e){var t={exports:{}};return e(t,t.exports),t.exports}var m=h((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={attributeNames:{styleName:"className"},generateScopedName:"[path]___[name]__[local]___[hash:base64:5]",handleMissingStyleName:"throw"};t.default=r})),y=p(h((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,n=(r=m)&&r.__esModule?r:{default:r};var o=function(e,t){if("throw"===t)throw new Error(e);return"warn"===t&&console.warn(e),null};t.default=function(e,t,r){var i=Object.keys(t),a=r||{},l=a.handleMissingStyleName,c=void 0===l?n.default.handleMissingStyleName:l,u=a.autoResolveMultipleImports,s=void 0===u?n.default.autoResolveMultipleImports:u;return e?e.split(" ").filter((function(e){return e})).map((function(e){if(function(e){return-1!==e.indexOf(".")}(e))return function(e,t,r){var i=e.split("."),a=i[0],l=i[1],c=r||n.default.handleMissingStyleName;return l?t[a]?t[a][l]?t[a][l]:o("CSS module does not exist: "+l,c):o("CSS module import does not exist: "+a,c):o("Invalid style name: "+e,c)}(e,t,c);if(0===i.length)throw new Error("Cannot use styleName attribute for style name '"+e+"' without importing at least one stylesheet.");if(i.length>1){if(!s)throw new Error("Cannot use anonymous style name '"+e+"' with more than one stylesheet import without setting 'autoResolveMultipleImports' to true.");return function(e,t,r){var i=r||n.default.handleMissingStyleName,a=Object.keys(t).map((function(r){return t[r][e]&&r})).filter((function(e){return e}));if(a.length>1)throw new Error('Cannot resolve styleName "'+e+'" because it is present in multiple imports:\n\n\t'+a.join("\n\t")+'\n\nYou can resolve this by using a named import, e.g:\n\n\timport foo from "'+a[0]+'";\n\t<div styleName="foo.'+e+'" />\n\n');return 0===a.length?o("Could not resolve the styleName '"+e+"'.",i):t[a[0]][e]}(e,t,c)}var r=t[i[0]];return r[e]?r[e]:o("Could not resolve the styleName '"+e+"'.",c)})).filter((function(e){return e})).join(" "):""}}))),v=["element","render"],d=function(t){return function(r){var n=r.element,o=r.render,i=s(r,v);return n?o&&"function"==typeof o?o(r):e.createElement(t,u({},i,{element:n})):null}};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}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i=[],a=!0,l=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==r.return||r.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return b(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?b(e,t):void 0}}(e,t)||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.")}()}d.propTypes={StoryElement:o.element};var w=function(t){return t.width,t.height,t.iconColor,e.createElement("div",{className:"loading-m_loading-indicator__2Dlst"},e.createElement("svg",{width:"40",height:"40",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid"},e.createElement("circle",{cx:"84",cy:"50",r:"0",fill:"currentColor"},e.createElement("animate",{attributeName:"r",values:"10;0;0;0;0",keyTimes:"0;0.25;0.5;0.75;1",keySplines:"0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",calcMode:"spline",dur:"2s",repeatCount:"indefinite",begin:"0s"}),e.createElement("animate",{attributeName:"cx",values:"84;84;84;84;84",keyTimes:"0;0.25;0.5;0.75;1",keySplines:"0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",calcMode:"spline",dur:"2s",repeatCount:"indefinite",begin:"0s"})),e.createElement("circle",{cx:"84",cy:"50",r:".709",fill:"currentColor"},e.createElement("animate",{attributeName:"r",values:"0;10;10;10;0",keyTimes:"0;0.25;0.5;0.75;1",keySplines:"0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",calcMode:"spline",dur:"2s",repeatCount:"indefinite",begin:"-1s"}),e.createElement("animate",{attributeName:"cx",values:"16;16;50;84;84",keyTimes:"0;0.25;0.5;0.75;1",keySplines:"0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",calcMode:"spline",dur:"2s",repeatCount:"indefinite",begin:"-1s"})),e.createElement("circle",{cx:"81.59",cy:"50",r:"10",fill:"currentColor"},e.createElement("animate",{attributeName:"r",values:"0;10;10;10;0",keyTimes:"0;0.25;0.5;0.75;1",keySplines:"0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",calcMode:"spline",dur:"2s",repeatCount:"indefinite",begin:"-0.5s"}),e.createElement("animate",{attributeName:"cx",values:"16;16;50;84;84",keyTimes:"0;0.25;0.5;0.75;1",keySplines:"0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",calcMode:"spline",dur:"2s",repeatCount:"indefinite",begin:"-0.5s"})),e.createElement("circle",{cx:"47.59",cy:"50",r:"10",fill:"currentColor"},e.createElement("animate",{attributeName:"r",values:"0;10;10;10;0",keyTimes:"0;0.25;0.5;0.75;1",keySplines:"0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",calcMode:"spline",dur:"2s",repeatCount:"indefinite",begin:"0s"}),e.createElement("animate",{attributeName:"cx",values:"16;16;50;84;84",keyTimes:"0;0.25;0.5;0.75;1",keySplines:"0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",calcMode:"spline",dur:"2s",repeatCount:"indefinite",begin:"0s"})),e.createElement("circle",{cx:"16",cy:"50",r:"9.291",fill:"currentColor"},e.createElement("animate",{attributeName:"r",values:"0;0;10;10;10",keyTimes:"0;0.25;0.5;0.75;1",keySplines:"0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",calcMode:"spline",dur:"2s",repeatCount:"indefinite",begin:"0s"}),e.createElement("animate",{attributeName:"cx",values:"16;16;16;50;84",keyTimes:"0;0.25;0.5;0.75;1",keySplines:"0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",calcMode:"spline",dur:"2s",repeatCount:"indefinite",begin:"0s"}))))};w.propTypes={width:o.object,height:o.object,iconColor:o.object};var E=function(){return e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"36",height:"28"},e.createElement("g",{fill:"none",fillRule:"evenodd"},e.createElement("rect",{width:"36",height:"28",fill:"#3D6FCF",rx:"4"}),e.createElement("path",{stroke:"#FFF",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M22 14.667v4c0 .736-.597 1.333-1.333 1.333h-7.334A1.333 1.333 0 0112 18.667v-7.334c0-.736.597-1.333 1.333-1.333h4M20 8h4v4m-7.333 3.333L24 8"})))},j=function(t){var r=t.hyperLink,n=void 0===r?"":r;return n?e.createElement(i,{href:n,"aria-label":"hyperlink-button",className:"arr--hyperlink-button hyperlink-m_hyperlink-button__1CqWx",target:"_blank",rel:"noopener noreferrer"},e.createElement(E,null)):null};function O(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}j.propTypes={hyperLink:o.string};var k=n((function(){return import("react-image-lightbox")})),x=function(n){var o=n.imageSlug,i=void 0===o?"":o,a=n.template,s=n.element,f=void 0===s?{}:s,p=n.props,h=l((function(e){return c(e,["qt","config","cdn-image"])})),m=_(t(0),2),y=m[0],v=m[1],d=_(t(!1),2),b=d[0],E=d[1],x=c(global,["innerWidth"],0),S=c(f,["story-elements"],[]).map((function(e){return e.hyperlink})),N=[];i||(N=c(f,["story-elements"],[]).map((function(e){return"//".concat(h,"/").concat(e["image-s3-key"],"?w=").concat(x)})));var C=i?"onClick":"onClickHandler",L=N.length,M=function(){return f.hyperlink||S[y]?e.createElement(j,{hyperLink:f.hyperlink||S[y]}):null},P=i?{mainSrc:"//".concat(h,"/").concat(i,"?w=").concat(x),toolbarButtons:[M()]}:{mainSrc:N[y],nextSrc:N[(y+1)%L],prevSrc:N[(y+L-1)%L],onMoveNextRequest:function(){return function(e){v((y+1)%e)}(L)},onMovePrevRequest:function(){return function(e){v((y+e-1)%e)}(L)},toolbarButtons:[M()]},T=function(){return e.createElement("div",null,e.createElement(w,null))};return e.createElement("div",null,e.createElement(a,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?O(Object(r),!0).forEach((function(t){g(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}(g({},C,(function(e){E(!0),v(e)})),p)),b?e.createElement(r,{fallback:e.createElement(T,null)},e.createElement(k,u({wrapperClassName:"arr--image-lightbox",onCloseRequest:function(){v(0),E(!1)}},P))):null)};x.propTypes={imageSlug:o.string,template:o.func,element:o.shape({"story-elements":o.array}),props:o.object},h((function(e){var t=function(e){var t,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof v?t:v,i=Object.create(o.prototype),a=new N(n||[]);return i._invoke=function(e,t,r){var n=f;return function(o,i){if(n===h)throw new Error("Generator is already running");if(n===m){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=k(a,r);if(l){if(l===y)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=h;var c=s(e,t,r);if("normal"===c.type){if(n=r.done?m:p,c.arg===y)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=m,r.method="throw",r.arg=c.arg)}}}(e,r,a),i}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var f="suspendedStart",p="suspendedYield",h="executing",m="completed",y={};function v(){}function d(){}function g(){}var b={};c(b,i,(function(){return this}));var _=Object.getPrototypeOf,w=_&&_(_(C([])));w&&w!==r&&n.call(w,i)&&(b=w);var E=g.prototype=v.prototype=Object.create(b);function j(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(o,i,a,l){var c=s(e[o],e,i);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,l)}),(function(e){r("throw",e,a,l)})):t.resolve(f).then((function(e){u.value=e,a(u)}),(function(e){return r("throw",e,a,l)}))}l(c.arg)}var o;this._invoke=function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}}function k(e,r){var n=e.iterator[r.method];if(n===t){if(r.delegate=null,"throw"===r.method){if(e.iterator.return&&(r.method="return",r.arg=t,k(e,r),"throw"===r.method))return y;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var o=s(n,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var i=o.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function N(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function C(e){if(e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}return{next:L}}function L(){return{value:t,done:!0}}return d.prototype=g,c(E,"constructor",g),c(g,"constructor",d),d.displayName=c(g,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,c(e,l,"GeneratorFunction")),e.prototype=Object.create(E),e},e.awrap=function(e){return{__await:e}},j(O.prototype),c(O.prototype,a,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new O(u(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},j(E),c(E,l,"Generator"),c(E,i,(function(){return this})),c(E,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=C,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(S),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return l.type="throw",l.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],l=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:C(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}}));var S=Array.isArray,N="object"==typeof f&&f&&f.Object===Object&&f,C="object"==typeof self&&self&&self.Object===Object&&self,L=N||C||Function("return this")(),M=L.Symbol,P=Object.prototype,T=P.hasOwnProperty,F=P.toString,A=M?M.toStringTag:void 0;var I=function(e){var t=T.call(e,A),r=e[A];try{e[A]=void 0;var n=!0}catch(e){}var o=F.call(e);return n&&(t?e[A]=r:delete e[A]),o},R=Object.prototype.toString;var z=function(e){return R.call(e)},$=M?M.toStringTag:void 0;var G=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":$&&$ in Object(e)?I(e):z(e)};var q=function(e){return null!=e&&"object"==typeof e};var D=function(e){return"symbol"==typeof e||q(e)&&"[object Symbol]"==G(e)},W=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Y=/^\w*$/;var B=function(e,t){if(S(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!D(e))||(Y.test(e)||!W.test(e)||null!=t&&e in Object(t))};var H=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};var Q,U=function(e){if(!H(e))return!1;var t=G(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},J=L["__core-js_shared__"],K=(Q=/[^.]+$/.exec(J&&J.keys&&J.keys.IE_PROTO||""))?"Symbol(src)_1."+Q:"";var V=function(e){return!!K&&K in e},X=Function.prototype.toString;var Z=function(e){if(null!=e){try{return X.call(e)}catch(e){}try{return e+""}catch(e){}}return""},ee=/^\[object .+?Constructor\]$/,te=Function.prototype,re=Object.prototype,ne=te.toString,oe=re.hasOwnProperty,ie=RegExp("^"+ne.call(oe).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var ae=function(e){return!(!H(e)||V(e))&&(U(e)?ie:ee).test(Z(e))};var le=function(e,t){return null==e?void 0:e[t]};var ce=function(e,t){var r=le(e,t);return ae(r)?r:void 0},ue=ce(Object,"create");var se=function(){this.__data__=ue?ue(null):{},this.size=0};var fe=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},pe=Object.prototype.hasOwnProperty;var he=function(e){var t=this.__data__;if(ue){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return pe.call(t,e)?t[e]:void 0},me=Object.prototype.hasOwnProperty;var ye=function(e){var t=this.__data__;return ue?void 0!==t[e]:me.call(t,e)};var ve=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=ue&&void 0===t?"__lodash_hash_undefined__":t,this};function de(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}de.prototype.clear=se,de.prototype.delete=fe,de.prototype.get=he,de.prototype.has=ye,de.prototype.set=ve;var ge=de;var be=function(){this.__data__=[],this.size=0};var _e=function(e,t){return e===t||e!=e&&t!=t};var we=function(e,t){for(var r=e.length;r--;)if(_e(e[r][0],t))return r;return-1},Ee=Array.prototype.splice;var je=function(e){var t=this.__data__,r=we(t,e);return!(r<0)&&(r==t.length-1?t.pop():Ee.call(t,r,1),--this.size,!0)};var Oe=function(e){var t=this.__data__,r=we(t,e);return r<0?void 0:t[r][1]};var ke=function(e){return we(this.__data__,e)>-1};var xe=function(e,t){var r=this.__data__,n=we(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};function Se(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Se.prototype.clear=be,Se.prototype.delete=je,Se.prototype.get=Oe,Se.prototype.has=ke,Se.prototype.set=xe;var Ne=Se,Ce=ce(L,"Map");var Le=function(){this.size=0,this.__data__={hash:new ge,map:new(Ce||Ne),string:new ge}};var Me=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var Pe=function(e,t){var r=e.__data__;return Me(t)?r["string"==typeof t?"string":"hash"]:r.map};var Te=function(e){var t=Pe(this,e).delete(e);return this.size-=t?1:0,t};var Fe=function(e){return Pe(this,e).get(e)};var Ae=function(e){return Pe(this,e).has(e)};var Ie=function(e,t){var r=Pe(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};function Re(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Re.prototype.clear=Le,Re.prototype.delete=Te,Re.prototype.get=Fe,Re.prototype.has=Ae,Re.prototype.set=Ie;var ze=Re;function $e(e,t){if("function"!=typeof e||null!=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)||i,a};return r.cache=new($e.Cache||ze),r}$e.Cache=ze;var Ge=$e;var qe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,De=/\\(\\)?/g,We=function(e){var t=Ge(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(qe,(function(e,r,n,o){t.push(n?o.replace(De,"$1"):r||e)})),t}));var Ye=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o},Be=M?M.prototype:void 0,He=Be?Be.toString:void 0;var Qe=function e(t){if("string"==typeof t)return t;if(S(t))return Ye(t,e)+"";if(D(t))return He?He.call(t):"";var r=t+"";return"0"==r&&1/t==-Infinity?"-0":r};var Ue=function(e){return null==e?"":Qe(e)};var Je=function(e,t){return S(e)?e:B(e,t)?[e]:We(Ue(e))};var Ke=function(e){if("string"==typeof e||D(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t};var Ve=function(e,t){for(var r=0,n=(t=Je(t,e)).length;null!=e&&r<n;)e=e[Ke(t[r++])];return r&&r==n?e:void 0};var Xe=function(e,t,r){var n=null==e?void 0:Ve(e,t);return void 0===n?r:n},Ze={mobile:767,tablet:1024},et=o.shape({"sketches-host":o.string,"cdn-name":o.string,"cdn-image":o.string}),tt=o.shape({headline:o.string,"last-published-at":o.number,subheadline:o.string}),rt=["element","template","opts","story","config"],nt={"./image-gallery.m.css":{viewports:'"../../../../../assets/stylesheets/viewports.m.css"',mobile:"768px","image-gallery":"image-gallery-m_image-gallery__1Q7if",image:"image-gallery-m_image__3qwSJ","template-2":"image-gallery-m_template-2__2pjmE","left-images":"image-gallery-m_left-images__34gjv","hyperlink-gallery-image":"image-gallery-m_hyperlink-gallery-image__2qgDp"}},ot=function(t){var r=t.element,n=t.template,i=void 0===n?"":n;t.opts,t.story,t.config;var l=s(t,rt);if(!r)return null;var c,f=!!(c=Xe(Ze,"mobile"))&&Xe(global,"document.documentElement.clientWidth")<=c,p=r["story-elements"],h="template-2"===i&&p.length,m=h>6?p.slice(0,6):p,v=h>4?p.slice(0,4):p,d=f?v:m,g="template-2"===i?"template-2":"",b=function(t){var r=t.onClickHandler,n=d.map((function(t,n){return e.createElement("div",{key:n,className:y((o=t.hyperlink,o?"hyperlink-gallery-image":""),nt)},e.createElement("figure",{key:n,"data-text-id":"image-".concat(n),onClick:function(){return r&&r(n)},className:y("image ".concat(g),nt)},e.createElement(a,{slug:t["image-s3-key"],metadata:t["image-metadata"],alt:t.title,aspectRatio:[1,1],defaultWidth:640,imgParams:{auto:["format","compress"]}})),t.hyperlink&&e.createElement(j,{hyperLink:t.hyperlink}));var o}));return e.createElement("div",u({className:" arrow-component arr--image-element image-gallery-m_image-gallery__1Q7if "+(l&&l.className||"")},l,{"data-test-id":"image-gallery"}),n)};return b.propTypes={onClickHandler:o.func},e.createElement(x,{template:b,element:r})};ot.propTypes={element:o.shape({"story-elements":o.array}),opts:o.shape({imageWidths:o.array}),story:tt,config:et,template:o.string};var it=d(ot);export{it as ImageGallery};
|
package/ImageSlideshow/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Link as e,LazyLoadImages as t,ResponsiveImage as r}from"@quintype/components";import n from"lodash.get";import o,{number as i,string as a,func as l,array as c,bool as s}from"prop-types";import u,{useState as f,Suspense as p,lazy as d,useContext as h,createContext as m,useRef as v,useEffect as y}from"react";import"react-timeago";import"date-fns-tz";import{useSelector as g}from"react-redux";var _="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function w(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function b(e){var t={exports:{}};return e(t,t.exports),t.exports}b((function(e){var t=function(e){var t,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var o=t&&t.prototype instanceof v?t:v,i=Object.create(o.prototype),a=new N(n||[]);return i._invoke=function(e,t,r){var n=f;return function(o,i){if(n===d)throw new Error("Generator is already running");if(n===h){if("throw"===o)throw i;return T()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=O(a,r);if(l){if(l===m)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=d;var c=u(e,t,r);if("normal"===c.type){if(n=r.done?h:p,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=h,r.method="throw",r.arg=c.arg)}}}(e,r,a),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var f="suspendedStart",p="suspendedYield",d="executing",h="completed",m={};function v(){}function y(){}function g(){}var _={};c(_,i,(function(){return this}));var w=Object.getPrototypeOf,b=w&&w(w(C([])));b&&b!==r&&n.call(b,i)&&(_=b);var E=g.prototype=v.prototype=Object.create(_);function k(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function r(o,i,a,l){var c=u(e[o],e,i);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,l)}),(function(e){r("throw",e,a,l)})):t.resolve(f).then((function(e){s.value=e,a(s)}),(function(e){return r("throw",e,a,l)}))}l(c.arg)}var o;this._invoke=function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}}function O(e,r){var n=e.iterator[r.method];if(n===t){if(r.delegate=null,"throw"===r.method){if(e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method))return m;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var o=u(n,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function N(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function C(e){if(e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}return{next:T}}function T(){return{value:t,done:!0}}return y.prototype=g,c(E,"constructor",g),c(g,"constructor",y),y.displayName=c(g,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,c(e,l,"GeneratorFunction")),e.prototype=Object.create(E),e},e.awrap=function(e){return{__await:e}},k(x.prototype),c(x.prototype,a,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},k(E),c(E,l,"Generator"),c(E,i,(function(){return this})),c(E,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=C,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(S),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return l.type="throw",l.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],l=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:C(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}}));var E=Array.isArray,k="object"==typeof _&&_&&_.Object===Object&&_,x="object"==typeof self&&self&&self.Object===Object&&self,O=k||x||Function("return this")(),j=O.Symbol,S=Object.prototype,N=S.hasOwnProperty,C=S.toString,T=j?j.toStringTag:void 0;var I=function(e){var t=N.call(e,T),r=e[T];try{e[T]=void 0;var n=!0}catch(e){}var o=C.call(e);return n&&(t?e[T]=r:delete e[T]),o},M=Object.prototype.toString;var L=function(e){return M.call(e)},P=j?j.toStringTag:void 0;var F=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":P&&P in Object(e)?I(e):L(e)};var A=function(e){return null!=e&&"object"==typeof e};var R=function(e){return"symbol"==typeof e||A(e)&&"[object Symbol]"==F(e)},z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,D=/^\w*$/;var G=function(e,t){if(E(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!R(e))||(D.test(e)||!z.test(e)||null!=t&&e in Object(t))};var $=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};var H,V=function(e){if(!$(e))return!1;var t=F(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},q=O["__core-js_shared__"],W=(H=/[^.]+$/.exec(q&&q.keys&&q.keys.IE_PROTO||""))?"Symbol(src)_1."+H:"";var U=function(e){return!!W&&W in e},B=Function.prototype.toString;var X=function(e){if(null!=e){try{return B.call(e)}catch(e){}try{return e+""}catch(e){}}return""},Y=/^\[object .+?Constructor\]$/,J=Function.prototype,K=Object.prototype,Z=J.toString,Q=K.hasOwnProperty,ee=RegExp("^"+Z.call(Q).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var te=function(e){return!(!$(e)||U(e))&&(V(e)?ee:Y).test(X(e))};var re=function(e,t){return null==e?void 0:e[t]};var ne=function(e,t){var r=re(e,t);return te(r)?r:void 0},oe=ne(Object,"create");var ie=function(){this.__data__=oe?oe(null):{},this.size=0};var ae=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},le=Object.prototype.hasOwnProperty;var ce=function(e){var t=this.__data__;if(oe){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return le.call(t,e)?t[e]:void 0},se=Object.prototype.hasOwnProperty;var ue=function(e){var t=this.__data__;return oe?void 0!==t[e]:se.call(t,e)};var fe=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=oe&&void 0===t?"__lodash_hash_undefined__":t,this};function pe(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}pe.prototype.clear=ie,pe.prototype.delete=ae,pe.prototype.get=ce,pe.prototype.has=ue,pe.prototype.set=fe;var de=pe;var he=function(){this.__data__=[],this.size=0};var me=function(e,t){return e===t||e!=e&&t!=t};var ve=function(e,t){for(var r=e.length;r--;)if(me(e[r][0],t))return r;return-1},ye=Array.prototype.splice;var ge=function(e){var t=this.__data__,r=ve(t,e);return!(r<0)&&(r==t.length-1?t.pop():ye.call(t,r,1),--this.size,!0)};var _e=function(e){var t=this.__data__,r=ve(t,e);return r<0?void 0:t[r][1]};var we=function(e){return ve(this.__data__,e)>-1};var be=function(e,t){var r=this.__data__,n=ve(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};function Ee(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ee.prototype.clear=he,Ee.prototype.delete=ge,Ee.prototype.get=_e,Ee.prototype.has=we,Ee.prototype.set=be;var ke=Ee,xe=ne(O,"Map");var Oe=function(){this.size=0,this.__data__={hash:new de,map:new(xe||ke),string:new de}};var je=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var Se=function(e,t){var r=e.__data__;return je(t)?r["string"==typeof t?"string":"hash"]:r.map};var Ne=function(e){var t=Se(this,e).delete(e);return this.size-=t?1:0,t};var Ce=function(e){return Se(this,e).get(e)};var Te=function(e){return Se(this,e).has(e)};var Ie=function(e,t){var r=Se(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};function Me(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Me.prototype.clear=Oe,Me.prototype.delete=Ne,Me.prototype.get=Ce,Me.prototype.has=Te,Me.prototype.set=Ie;var Le=Me;function Pe(e,t){if("function"!=typeof e||null!=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)||i,a};return r.cache=new(Pe.Cache||Le),r}Pe.Cache=Le;var Fe=Pe;var Ae=function(e){var t=Fe(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t},Re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ze=/\\(\\)?/g,De=Ae((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Re,(function(e,r,n,o){t.push(n?o.replace(ze,"$1"):r||e)})),t})),Ge=De;var $e=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o},He=j?j.prototype:void 0,Ve=He?He.toString:void 0;var qe=function e(t){if("string"==typeof t)return t;if(E(t))return $e(t,e)+"";if(R(t))return Ve?Ve.call(t):"";var r=t+"";return"0"==r&&1/t==-Infinity?"-0":r};var We=function(e){return null==e?"":qe(e)};var Ue=function(e,t){return E(e)?e:G(e,t)?[e]:Ge(We(e))};var Be=function(e){if("string"==typeof e||R(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t};var Xe=function(e,t){for(var r=0,n=(t=Ue(t,e)).length;null!=e&&r<n;)e=e[Be(t[r++])];return r&&r==n?e:void 0};var Ye=function(e,t,r){var n=null==e?void 0:Xe(e,t);return void 0===n?r:n},Je=function(e){var t=function(e){return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16)}}(e);return.299*t.r+.587*t.g+.114*t.b},Ke=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"rgba(255, 255, 255, 0)",t=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);return t&&4===t.length?"#"+("0"+parseInt(t[1],10).toString(16)).slice(-2)+("0"+parseInt(t[2],10).toString(16)).slice(-2)+("0"+parseInt(t[3],10).toString(16)).slice(-2):e},Ze=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"rgb(255,255,255)",t=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(e),r=t?e:Ke(e),n=Je(r)<155?"light":"dark";return n};o.shape({"sketches-host":o.string,"cdn-name":o.string,"cdn-image":o.string});var Qe=o.shape({headline:o.string,"last-published-at":o.number,subheadline:o.string});function et(){return et=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},et.apply(this,arguments)}function tt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function nt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i=[],a=!0,l=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==r.return||r.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return rt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?rt(e,t):void 0}}(e,t)||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.")}()}var ot=function(e){return e.width,e.height,e.iconColor,u.createElement("div",{className:"loading-m_loading-indicator__2Dlst"},u.createElement("svg",{width:"40",height:"40",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid"},u.createElement("circle",{cx:"84",cy:"50",r:"0",fill:"currentColor"},u.createElement("animate",{attributeName:"r",values:"10;0;0;0;0",keyTimes:"0;0.25;0.5;0.75;1",keySplines:"0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",calcMode:"spline",dur:"2s",repeatCount:"indefinite",begin:"0s"}),u.createElement("animate",{attributeName:"cx",values:"84;84;84;84;84",keyTimes:"0;0.25;0.5;0.75;1",keySplines:"0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",calcMode:"spline",dur:"2s",repeatCount:"indefinite",begin:"0s"})),u.createElement("circle",{cx:"84",cy:"50",r:".709",fill:"currentColor"},u.createElement("animate",{attributeName:"r",values:"0;10;10;10;0",keyTimes:"0;0.25;0.5;0.75;1",keySplines:"0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",calcMode:"spline",dur:"2s",repeatCount:"indefinite",begin:"-1s"}),u.createElement("animate",{attributeName:"cx",values:"16;16;50;84;84",keyTimes:"0;0.25;0.5;0.75;1",keySplines:"0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",calcMode:"spline",dur:"2s",repeatCount:"indefinite",begin:"-1s"})),u.createElement("circle",{cx:"81.59",cy:"50",r:"10",fill:"currentColor"},u.createElement("animate",{attributeName:"r",values:"0;10;10;10;0",keyTimes:"0;0.25;0.5;0.75;1",keySplines:"0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",calcMode:"spline",dur:"2s",repeatCount:"indefinite",begin:"-0.5s"}),u.createElement("animate",{attributeName:"cx",values:"16;16;50;84;84",keyTimes:"0;0.25;0.5;0.75;1",keySplines:"0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",calcMode:"spline",dur:"2s",repeatCount:"indefinite",begin:"-0.5s"})),u.createElement("circle",{cx:"47.59",cy:"50",r:"10",fill:"currentColor"},u.createElement("animate",{attributeName:"r",values:"0;10;10;10;0",keyTimes:"0;0.25;0.5;0.75;1",keySplines:"0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",calcMode:"spline",dur:"2s",repeatCount:"indefinite",begin:"0s"}),u.createElement("animate",{attributeName:"cx",values:"16;16;50;84;84",keyTimes:"0;0.25;0.5;0.75;1",keySplines:"0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",calcMode:"spline",dur:"2s",repeatCount:"indefinite",begin:"0s"})),u.createElement("circle",{cx:"16",cy:"50",r:"9.291",fill:"currentColor"},u.createElement("animate",{attributeName:"r",values:"0;0;10;10;10",keyTimes:"0;0.25;0.5;0.75;1",keySplines:"0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",calcMode:"spline",dur:"2s",repeatCount:"indefinite",begin:"0s"}),u.createElement("animate",{attributeName:"cx",values:"16;16;16;50;84",keyTimes:"0;0.25;0.5;0.75;1",keySplines:"0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1",calcMode:"spline",dur:"2s",repeatCount:"indefinite",begin:"0s"}))))};ot.propTypes={width:o.object,height:o.object,iconColor:o.object};var it=function(){return u.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"36",height:"28"},u.createElement("g",{fill:"none",fillRule:"evenodd"},u.createElement("rect",{width:"36",height:"28",fill:"#3D6FCF",rx:"4"}),u.createElement("path",{stroke:"#FFF",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M22 14.667v4c0 .736-.597 1.333-1.333 1.333h-7.334A1.333 1.333 0 0112 18.667v-7.334c0-.736.597-1.333 1.333-1.333h4M20 8h4v4m-7.333 3.333L24 8"})))},at=function(t){var r=t.hyperLink,n=void 0===r?"":r;return n?u.createElement(e,{href:n,"aria-label":"hyperlink-button",className:"arr--hyperlink-button hyperlink-m_hyperlink-button__1CqWx",target:"_blank",rel:"noopener noreferrer"},u.createElement(it,null)):null};function lt(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}at.propTypes={hyperLink:o.string};var ct=d((function(){return import("react-image-lightbox")})),st=function(e){var t=e.imageSlug,r=void 0===t?"":t,o=e.template,i=e.element,a=void 0===i?{}:i,l=e.props,c=g((function(e){return n(e,["qt","config","cdn-image"])})),s=nt(f(0),2),d=s[0],h=s[1],m=nt(f(!1),2),v=m[0],y=m[1],_=n(global,["innerWidth"],0),w=n(a,["story-elements"],[]).map((function(e){return e.hyperlink})),b=[];r||(b=n(a,["story-elements"],[]).map((function(e){return"//".concat(c,"/").concat(e["image-s3-key"],"?w=").concat(_)})));var E=r?"onClick":"onClickHandler",k=b.length,x=function(){return a.hyperlink||w[d]?u.createElement(at,{hyperLink:a.hyperlink||w[d]}):null},O=r?{mainSrc:"//".concat(c,"/").concat(r,"?w=").concat(_),toolbarButtons:[x()]}:{mainSrc:b[d],nextSrc:b[(d+1)%k],prevSrc:b[(d+k-1)%k],onMoveNextRequest:function(){return function(e){h((d+1)%e)}(k)},onMovePrevRequest:function(){return function(e){h((d+e-1)%e)}(k)},toolbarButtons:[x()]},j=function(){return u.createElement("div",null,u.createElement(ot,null))};return u.createElement("div",null,u.createElement(o,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?lt(Object(r),!0).forEach((function(t){tt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}(tt({},E,(function(e){y(!0),h(e)})),l)),v?u.createElement(p,{fallback:u.createElement(j,null)},u.createElement(ct,et({wrapperClassName:"arr--image-lightbox",onCloseRequest:function(){h(0),y(!1)}},O))):null)};function ut(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}st.propTypes={imageSlug:o.string,template:o.func,element:o.shape({"story-elements":o.array}),props:o.object};var ft=["element","render"],pt=function(e){return function(t){var r=t.element,n=t.render,o=ut(t,ft);return r?n&&"function"==typeof n?n(t):u.createElement(e,et({},o,{element:r})):null}};pt.propTypes={StoryElement:o.element};var dt=b((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={attributeNames:{styleName:"className"},generateScopedName:"[path]___[name]__[local]___[hash:base64:5]",handleMissingStyleName:"throw"};t.default=r})),ht=w(b((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,n=(r=dt)&&r.__esModule?r:{default:r};var o=function(e,t){if("throw"===t)throw new Error(e);return"warn"===t&&console.warn(e),null};t.default=function(e,t,r){var i=Object.keys(t),a=r||{},l=a.handleMissingStyleName,c=void 0===l?n.default.handleMissingStyleName:l,s=a.autoResolveMultipleImports,u=void 0===s?n.default.autoResolveMultipleImports:s;return e?e.split(" ").filter((function(e){return e})).map((function(e){if(function(e){return-1!==e.indexOf(".")}(e))return function(e,t,r){var i=e.split("."),a=i[0],l=i[1],c=r||n.default.handleMissingStyleName;return l?t[a]?t[a][l]?t[a][l]:o("CSS module does not exist: "+l,c):o("CSS module import does not exist: "+a,c):o("Invalid style name: "+e,c)}(e,t,c);if(0===i.length)throw new Error("Cannot use styleName attribute for style name '"+e+"' without importing at least one stylesheet.");if(i.length>1){if(!u)throw new Error("Cannot use anonymous style name '"+e+"' with more than one stylesheet import without setting 'autoResolveMultipleImports' to true.");return function(e,t,r){var i=r||n.default.handleMissingStyleName,a=Object.keys(t).map((function(r){return t[r][e]&&r})).filter((function(e){return e}));if(a.length>1)throw new Error('Cannot resolve styleName "'+e+'" because it is present in multiple imports:\n\n\t'+a.join("\n\t")+'\n\nYou can resolve this by using a named import, e.g:\n\n\timport foo from "'+a[0]+'";\n\t<div styleName="foo.'+e+'" />\n\n');return 0===a.length?o("Could not resolve the styleName '"+e+"'.",i):t[a[0]][e]}(e,t,c)}var r=t[i[0]];return r[e]?r[e]:o("Could not resolve the styleName '"+e+"'.",c)})).filter((function(e){return e})).join(" "):""}}))),mt=function(e){var t=e.color,r=void 0===t?"#333":t;return u.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 10 16"},u.createElement("g",{fill:"none",fillRule:"nonzero"},u.createElement("path",{d:"M17 20H-7V-4h24z",opacity:".384"}),u.createElement("path",{stroke:r,d:"M9 16L1 8l8-8"})))};mt.propTypes={color:o.string};var vt=function(e){var t=e.color,r=void 0===t?"#333":t;return u.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 10 16"},u.createElement("g",{fill:"none",fillRule:"nonzero"},u.createElement("path",{d:"M-7-4h24v24H-7z",opacity:".384"}),u.createElement("path",{stroke:r,d:"M1 0l8 8-8 8"})))};vt.propTypes={color:o.string};var yt=m(),gt=function(){return h(yt)},_t={"./slider-arrow.m.css":{arrow:"slider-arrow-m_arrow__1eBUU","left-arrow-dark":"slider-arrow-m_left-arrow-dark__3mTJS","right-arrow-dark":"slider-arrow-m_right-arrow-dark__3hWZe","left-arrow-light":"slider-arrow-m_left-arrow-light__2ipUK","right-arrow-light":"slider-arrow-m_right-arrow-light__3omMU","left-arrow-ltr":"slider-arrow-m_left-arrow-ltr__1ngNF","right-arrow-ltr":"slider-arrow-m_right-arrow-ltr__2svWX","left-arrow-rtl":"slider-arrow-m_left-arrow-rtl__2ynyn","right-arrow-rtl":"slider-arrow-m_right-arrow-rtl__1GjPz"}},wt=function(e){var t=e.selectedIndex,r=e.previousClick,n=e.nextClick,o=e.noOfItems,i=e.perView,a=e.languageDirection;if(o<1)return null;var l=gt()||{},c=Ze(l.theme),s="rtl"===a?"left-arrow-rtl":"left-arrow-ltr",f="rtl"===a?"right-arrow-rtl":"right-arrow-ltr";return u.createElement(u.Fragment,null,0!==t?u.createElement("button",{onClick:r,className:("left-arrow ".concat(s)?"left-arrow ".concat(s)+" ":"")+ht("arrow left-arrow-".concat(c," ").concat(s),_t)},u.createElement(mt,{color:"dark"===c?"#fff":"#333"})):null,t<o-1&&!(t>=o-i)?u.createElement("button",{onClick:n,className:("right-arrow ".concat(f)?"right-arrow ".concat(f)+" ":"")+ht("arrow right-arrow-".concat(c," ").concat(f),_t)},u.createElement(vt,{color:"dark"===c?"#fff":"#333"})):null)};wt.propTypes={noOfItems:i,perView:i,slideIndicator:a,previousClick:l,nextClick:l,selectedIndex:i,languageDirection:a};var bt={"./slider-indicator.m.css":{indicators:"slider-indicator-m_indicators__3MNXc",indicator:"slider-indicator-m_indicator__gTv3x","indicator-button":"slider-indicator-m_indicator-button__1e82r","indicator-dots":"slider-indicator-m_indicator-dots__2TR3H","indicator-dots-dark":"slider-indicator-m_indicator-dots-dark__sGrev","indicator-dots-light":"slider-indicator-m_indicator-dots-light__2nPn-","indicator-dashes":"slider-indicator-m_indicator-dashes__DyNCE","indicator-dashes-dark":"slider-indicator-m_indicator-dashes-dark__VrqJI","indicator-dashes-light":"slider-indicator-m_indicator-dashes-light__34ESx"}},Et=function(e){var t=e.indicatorItems,r=e.indicatorClick,n=e.selectedIndex,o=e.indicatorType;if(t.length<1)return null;var i=gt()||{},a=Ze(i.theme);return u.createElement("ul",{className:"slider-indicators slider-indicator-m_indicators__3MNXc"},t.map((function(e,t){return u.createElement("li",{key:"slider-".concat(t),className:"indicator slider-indicator-m_indicator__gTv3x",onClick:function(e){return r(e,t)}},u.createElement("button",{"aria-pressed":n===t?"true":"false",className:("indicator-button indicator-".concat(o)?"indicator-button indicator-".concat(o)+" ":"")+ht("indicator-button indicator-".concat(o," indicator-").concat(o,"-").concat(a),bt)}))})))};Et.propTypes={indicatorItems:c,perView:i,indicatorType:a,indicatorClick:l,selectedIndex:i};var kt=function(e,t,r,n){var o,i,a,l,c=Math.floor(r.current.scrollWidth*(e/n)),s="rtl"===t?-1*c:c;o=r.current,i=s,a=!0,o.scrollTo((tt(l={},a?"left":"top",i),tt(l,"behavior","smooth"),l))},xt=function(e,t){var r;return function(){clearTimeout(r),r=setTimeout((function(){r=null,e()}),t)}},Ot=function(e){var t=e.children,r=e.isArrow,n=e.interval,o=e.isInfinite,i=e.pauseOnHover,a=e.perView,l=e.slideIndicator,c=nt(f(0),2),s=c[0],p=c[1],d=nt(f(!1),2),h=d[0],m=d[1],_=g((function(e){return Ye(e,["qt","config","language","direction"],"ltr")})),w=t?t.length:0,b=v(null),E=t.length-(a-1),k=t.slice(0,E);y((function(){return b.current&&(b.current.addEventListener("scroll",xt((function(){var e=Math.round(b.current.scrollLeft/b.current.scrollWidth*w);p(Math.abs(e))}),150)),0!==s&&kt(s)),function(){b.current.removeEventListener("scroll",xt)}}),[]),y((function(){if(o&&!h){var e=setInterval((function(){x()}),n);return function(){clearInterval(e)}}}),[o,h]);var x=function(){p((function(e){var t=e===w-a?0:e+1;return kt(t,_,b,w),t}))},O=function(){i&&m(!h)};return u.createElement("div",{className:"scroll-snap-container"},u.createElement("div",{className:"scroll-snap-wrapper scroll-snap-m_wrapper__1Rz9v",onMouseEnter:O,onMouseLeave:O},u.createElement("div",{ref:b,className:"scroll-snap-carousel scroll-snap-m_carousel__2m3cg"},t),r&&u.createElement(wt,{noOfItems:w,perView:a,previousClick:function(e){e.preventDefault(),e.stopPropagation();var t=s-1;p(t),kt(t,_,b,w)},nextClick:function(e){if(e.preventDefault(),e.stopPropagation(),s<w){var t=s+1;p(t),kt(t,_,b,w)}},selectedIndex:s,languageDirection:_})),t.length>a&&"none"!==l&&u.createElement(Et,{indicatorItems:k,indicatorClick:function(e,t){e.preventDefault(),e.stopPropagation(),p(t),kt(t,_,b,w)},selectedIndex:s,indicatorType:l}))};Ot.defaultProps={isArrow:!0,isInfinite:!1,interval:4e3,pauseOnHover:!0,perView:1,slideIndicator:"dots"},Ot.propTypes={children:c.isRequired,isArrow:s,isInfinite:s,interval:i,pauseOnHover:s,perView:i,slideIndicator:a};var jt=function(e){if(!e.element)return null;var i=function(o){var i=o.onClickHandler,a=n(e,["element","story-elements"],[]);return u.createElement("div",{className:"arr--image-slideshow-element image-slideshow-m_slideshow__3jRFX","data-test-id":"image-slideshow"},u.createElement(Ot,{slideIndicator:"none"},a.map((function(e,n){return function(e,n,o){var i=e.id,a=e["image-s3-key"],l=e.metadata,c=e.title,s=e.hyperlink,f=void 0===s?"":s;return u.createElement("div",{className:"image-slideshow-m_slide__3URCC",key:i},u.createElement("figure",{key:i,className:"image-slideshow-m_image-container__2VTEK",onClick:function(){return o(n)}},u.createElement(t,{margin:"0px"},u.createElement(r,{slug:a,metadata:l,"aspect-ratio":[16,9],defaultWidth:480,widths:[250,480,640],imgParams:{auto:["format","compress"]},className:"image-slideshow-m_image__1p1fO",alt:c}))),f&&u.createElement(at,{hyperLink:f}),u.createElement("p",{className:"image-slideshow-m_caption__mWpmc",dangerouslySetInnerHTML:{__html:c}}))}(e,n,i)}))))};return i.propTypes={onClickHandler:o.func},u.createElement(st,{template:i,element:e.element})};jt.propTypes={element:o.shape({"story-elements":o.array}),story:Qe};var St=pt(jt);export{St as ImageSlideshow};
|
package/KeyEvents/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import t,{createContext as e,useState as r}from"react";import n from"lodash.get";import o from"prop-types";import a from"react-timeago";import{utcToZonedTime as i,format as u}from"date-fns-tz";import{LinkBase as c}from"@quintype/components";import{useSelector as l}from"react-redux";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}function f(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a=[],i=!0,u=!1;try{for(r=r.call(t);!(i=(n=r.next()).done)&&(a.push(n.value),!e||a.length!==e);i=!0);}catch(t){u=!0,o=t}finally{try{i||null==r.return||r.return()}finally{if(u)throw o}}return a}}(t,e)||function(t,e){if(t){if("string"==typeof t)return s(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(t,e):void 0}}(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.")}()}var d="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function h(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function v(t){var e={exports:{}};return t(e,e.exports),e.exports}var p=v((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={attributeNames:{styleName:"className"},generateScopedName:"[path]___[name]__[local]___[hash:base64:5]",handleMissingStyleName:"throw"};e.default=r})),m=h(v((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,n=(r=p)&&r.__esModule?r:{default:r};var o=function(t,e){if("throw"===e)throw new Error(t);return"warn"===e&&console.warn(t),null};e.default=function(t,e,r){var a=Object.keys(e),i=r||{},u=i.handleMissingStyleName,c=void 0===u?n.default.handleMissingStyleName:u,l=i.autoResolveMultipleImports,s=void 0===l?n.default.autoResolveMultipleImports:l;return t?t.split(" ").filter((function(t){return t})).map((function(t){if(function(t){return-1!==t.indexOf(".")}(t))return function(t,e,r){var a=t.split("."),i=a[0],u=a[1],c=r||n.default.handleMissingStyleName;return u?e[i]?e[i][u]?e[i][u]:o("CSS module does not exist: "+u,c):o("CSS module import does not exist: "+i,c):o("Invalid style name: "+t,c)}(t,e,c);if(0===a.length)throw new Error("Cannot use styleName attribute for style name '"+t+"' without importing at least one stylesheet.");if(a.length>1){if(!s)throw new Error("Cannot use anonymous style name '"+t+"' with more than one stylesheet import without setting 'autoResolveMultipleImports' to true.");return function(t,e,r){var a=r||n.default.handleMissingStyleName,i=Object.keys(e).map((function(r){return e[r][t]&&r})).filter((function(t){return t}));if(i.length>1)throw new Error('Cannot resolve styleName "'+t+'" because it is present in multiple imports:\n\n\t'+i.join("\n\t")+'\n\nYou can resolve this by using a named import, e.g:\n\n\timport foo from "'+i[0]+'";\n\t<div styleName="foo.'+t+'" />\n\n');return 0===i.length?o("Could not resolve the styleName '"+t+"'.",a):e[i[0]][t]}(t,e,c)}var r=e[a[0]];return r[t]?r[t]:o("Could not resolve the styleName '"+t+"'.",c)})).filter((function(t){return t})).join(" "):""}}))),y=function(e){var r=e.color,n=void 0===r?"#333":r;return t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},t.createElement("path",{fill:n,fillRule:"evenodd",d:"M12 19.75a7.513 7.513 0 003.875-1.047 7.832 7.832 0 002.828-2.828A7.513 7.513 0 0019.75 12a7.513 7.513 0 00-1.047-3.875c-.698-1.187-1.64-2.13-2.828-2.828S13.395 4.25 12 4.25a7.51 7.51 0 00-3.875 1.047c-1.188.698-2.13 1.64-2.828 2.828S4.25 10.605 4.25 12a7.51 7.51 0 001.047 3.875 7.824 7.824 0 002.828 2.828A7.513 7.513 0 0012 19.75zm.016-1a6.64 6.64 0 01-3.391-.906 6.716 6.716 0 01-2.469-2.453 6.563 6.563 0 01-.906-3.375c0-1.22.302-2.35.906-3.391A6.711 6.711 0 018.61 6.156a6.563 6.563 0 013.375-.906c1.22 0 2.35.302 3.391.906a6.716 6.716 0 012.469 2.453A6.592 6.592 0 0118.751 12a6.616 6.616 0 01-.906 3.375 6.716 6.716 0 01-2.453 2.469 6.563 6.563 0 01-3.375.906zm2.283-3.92l.076-.002a.343.343 0 00.25-.14l.25-.375a.365.365 0 00.078-.266.328.328 0 00-.14-.234l-2.22-1.625V7.625a.362.362 0 00-.109-.266.36.36 0 00-.265-.109h-.438a.357.357 0 00-.265.11.358.358 0 00-.11.265v5c0 .125.052.219.156.281l2.532 1.844a.383.383 0 00.281.078l-.076.001z"}))};y.propTypes={color:o.string},v((function(t){var e=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,a=Object.create(o.prototype),i=new A(n||[]);return a._invoke=function(t,e,r){var n=f;return function(o,a){if(n===h)throw new Error("Generator is already running");if(n===v){if("throw"===o)throw a;return N()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var u=O(i,r);if(u){if(u===p)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=h;var c=s(t,e,r);if("normal"===c.type){if(n=r.done?v:d,c.arg===p)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=v,r.method="throw",r.arg=c.arg)}}}(t,r,i),a}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var f="suspendedStart",d="suspendedYield",h="executing",v="completed",p={};function m(){}function y(){}function g(){}var b={};c(b,a,(function(){return this}));var _=Object.getPrototypeOf,w=_&&_(_(k([])));w&&w!==r&&n.call(w,a)&&(b=w);var x=g.prototype=m.prototype=Object.create(b);function j(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,a,i,u){var c=s(t[o],t,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,u)}),(function(t){r("throw",t,i,u)})):e.resolve(f).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,u)}))}u(c.arg)}var o;this._invoke=function(t,n){function a(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(a,a):a()}}function O(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,O(t,r),"throw"===r.method))return p;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var o=s(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,p;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,p):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,p)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function k(t){if(t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}return{next:N}}function N(){return{value:e,done:!0}}return y.prototype=g,c(x,"constructor",g),c(g,"constructor",y),y.displayName=c(g,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,c(t,u,"GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},j(E.prototype),c(E.prototype,i,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new E(l(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},j(x),c(x,u,"Generator"),c(x,a,(function(){return this})),c(x,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=k,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],u=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(c&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,p):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:k(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),p}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}));var g=Array.isArray,b="object"==typeof d&&d&&d.Object===Object&&d,_="object"==typeof self&&self&&self.Object===Object&&self,w=b||_||Function("return this")(),x=w.Symbol,j=Object.prototype,E=j.hasOwnProperty,O=j.toString,S=x?x.toStringTag:void 0;var L=function(t){var e=E.call(t,S),r=t[S];try{t[S]=void 0;var n=!0}catch(t){}var o=O.call(t);return n&&(e?t[S]=r:delete t[S]),o},A=Object.prototype.toString;var k=function(t){return A.call(t)},N=x?x.toStringTag:void 0;var z=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":N&&N in Object(t)?L(t):k(t)};var T=function(t){return null!=t&&"object"==typeof t};var C=function(t){return"symbol"==typeof t||T(t)&&"[object Symbol]"==z(t)},M=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,I=/^\w*$/;var P=function(t,e){if(g(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!C(t))||(I.test(t)||!M.test(t)||null!=e&&t in Object(e))};var F=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var R,U=function(t){if(!F(t))return!1;var e=z(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},D=w["__core-js_shared__"],G=(R=/[^.]+$/.exec(D&&D.keys&&D.keys.IE_PROTO||""))?"Symbol(src)_1."+R:"";var Z=function(t){return!!G&&G in t},$=Function.prototype.toString;var q=function(t){if(null!=t){try{return $.call(t)}catch(t){}try{return t+""}catch(t){}}return""},Y=/^\[object .+?Constructor\]$/,H=Function.prototype,J=Object.prototype,B=H.toString,V=J.hasOwnProperty,X=RegExp("^"+B.call(V).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var K=function(t){return!(!F(t)||Z(t))&&(U(t)?X:Y).test(q(t))};var Q=function(t,e){return null==t?void 0:t[e]};var W=function(t,e){var r=Q(t,e);return K(r)?r:void 0},tt=W(Object,"create");var et=function(){this.__data__=tt?tt(null):{},this.size=0};var rt=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},nt=Object.prototype.hasOwnProperty;var ot=function(t){var e=this.__data__;if(tt){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return nt.call(e,t)?e[t]:void 0},at=Object.prototype.hasOwnProperty;var it=function(t){var e=this.__data__;return tt?void 0!==e[t]:at.call(e,t)};var ut=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=tt&&void 0===e?"__lodash_hash_undefined__":e,this};function ct(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ct.prototype.clear=et,ct.prototype.delete=rt,ct.prototype.get=ot,ct.prototype.has=it,ct.prototype.set=ut;var lt=ct;var st=function(){this.__data__=[],this.size=0};var ft=function(t,e){return t===e||t!=t&&e!=e};var dt=function(t,e){for(var r=t.length;r--;)if(ft(t[r][0],e))return r;return-1},ht=Array.prototype.splice;var vt=function(t){var e=this.__data__,r=dt(e,t);return!(r<0)&&(r==e.length-1?e.pop():ht.call(e,r,1),--this.size,!0)};var pt=function(t){var e=this.__data__,r=dt(e,t);return r<0?void 0:e[r][1]};var mt=function(t){return dt(this.__data__,t)>-1};var yt=function(t,e){var r=this.__data__,n=dt(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function gt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}gt.prototype.clear=st,gt.prototype.delete=vt,gt.prototype.get=pt,gt.prototype.has=mt,gt.prototype.set=yt;var bt=gt,_t=W(w,"Map");var wt=function(){this.size=0,this.__data__={hash:new lt,map:new(_t||bt),string:new lt}};var xt=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var jt=function(t,e){var r=t.__data__;return xt(e)?r["string"==typeof e?"string":"hash"]:r.map};var Et=function(t){var e=jt(this,t).delete(t);return this.size-=e?1:0,e};var Ot=function(t){return jt(this,t).get(t)};var St=function(t){return jt(this,t).has(t)};var Lt=function(t,e){var r=jt(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function At(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}At.prototype.clear=wt,At.prototype.delete=Et,At.prototype.get=Ot,At.prototype.has=St,At.prototype.set=Lt;var kt=At;function Nt(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=t.apply(this,n);return r.cache=a.set(o,i)||a,i};return r.cache=new(Nt.Cache||kt),r}Nt.Cache=kt;var zt=Nt;var Tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ct=/\\(\\)?/g,Mt=function(t){var e=zt(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Tt,(function(t,r,n,o){e.push(n?o.replace(Ct,"$1"):r||t)})),e}));var It=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o},Pt=x?x.prototype:void 0,Ft=Pt?Pt.toString:void 0;var Rt=function t(e){if("string"==typeof e)return e;if(g(e))return It(e,t)+"";if(C(e))return Ft?Ft.call(e):"";var r=e+"";return"0"==r&&1/e==-Infinity?"-0":r};var Ut=function(t){return null==t?"":Rt(t)};var Dt=function(t,e){return g(t)?t:P(t,e)?[t]:Mt(Ut(t))};var Gt=function(t){if("string"==typeof t||C(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e};var Zt=function(t,e){for(var r=0,n=(e=Dt(e,t)).length;null!=t&&r<n;)t=t[Gt(e[r++])];return r&&r==n?t:void 0};var $t=function(t,e,r){var n=null==t?void 0:Zt(t,e);return void 0===n?r:n};var qt=function(t,e,r,n){var o=-1,a=null==t?0:t.length;for(n&&a&&(r=t[++o]);++o<a;)r=e(r,t[o],o,t);return r};var Yt=function(t){return function(e){return null==t?void 0:t[e]}}({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Ht=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Jt=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var Bt=function(t){return(t=Ut(t))&&t.replace(Ht,Yt).replace(Jt,"")},Vt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var Xt=function(t){return t.match(Vt)||[]},Kt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var Qt=function(t){return Kt.test(t)},Wt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",te="["+Wt+"]",ee="\\d+",re="[\\u2700-\\u27bf]",ne="[a-z\\xdf-\\xf6\\xf8-\\xff]",oe="[^\\ud800-\\udfff"+Wt+ee+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",ae="(?:\\ud83c[\\udde6-\\uddff]){2}",ie="[\\ud800-\\udbff][\\udc00-\\udfff]",ue="[A-Z\\xc0-\\xd6\\xd8-\\xde]",ce="(?:"+ne+"|"+oe+")",le="(?:"+ue+"|"+oe+")",se="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",fe="[\\ufe0e\\ufe0f]?"+se+("(?:\\u200d(?:"+["[^\\ud800-\\udfff]",ae,ie].join("|")+")[\\ufe0e\\ufe0f]?"+se+")*"),de="(?:"+[re,ae,ie].join("|")+")"+fe,he=RegExp([ue+"?"+ne+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[te,ue,"$"].join("|")+")",le+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[te,ue+ce,"$"].join("|")+")",ue+"?"+ce+"+(?:['’](?:d|ll|m|re|s|t|ve))?",ue+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ee,de].join("|"),"g");var ve=function(t){return t.match(he)||[]};var pe=function(t,e,r){return t=Ut(t),void 0===(e=r?void 0:e)?Qt(t)?ve(t):Xt(t):t.match(e)||[]},me=RegExp("['’]","g");var ye=function(t){return function(e){return qt(pe(Bt(e).replace(me,"")),t,"")}},ge=ye((function(t,e,r){return t+(r?" ":"")+e.toUpperCase()})),be=ge,_e=ye((function(t,e,r){return t+(r?" ":"")+e.toLowerCase()})),we=_e,xe=function(t,e,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=o.showTime,i=void 0!==a&&a,u=o.isTimeFirst,c=void 0!==u&&u,l=o.isUpperCase,s=void 0!==l&&l,f=o.disableMeridiem,d=void 0!==f&&f,h=o.timeFormat,v=void 0===h?"12hours":h,p=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],m=new Date(n),y=m.getDate().toString().padStart(2,0),g=p[m.getMonth()],b=g;s&&(b=be(g));var _,w=m.getFullYear(),x=o.localizedMeridiem,j=o.localizedMonths,E=o.direction,O=void 0===E?"ltr":E,S=je(n,v),L=S;if(j&&(b=$t(j,[we(g)])||g),x){var A=S.includes("am"),k=x.am,N=void 0===k?"am":k,z=x.pm,T=void 0===z?"pm":z;L=(A?S.replace("am",N):S.replace("pm",T))||S}return"rtl"===O?(_=i?"".concat(L):"","".concat(y," ").concat(b,", ").concat(w," ").concat(_," ")):d?"".concat(b," ").concat(y,", ").concat(w):c?"".concat(L,", ").concat(y," ").concat(b," ").concat(w):(_=i?", ".concat(L):"","".concat(y," ").concat(b,", ").concat(w).concat(_))};function je(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"12hours",r=new Date(t),n=r.getHours(),o=r.getMinutes(),a=n>=12?"pm":"am",i=(n=(n%=12)||12)+":"+(o=o<10?"0"+o:o)+" "+a;return"24hours"===e?r.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):i}var Ee=function(t){var e=function(t){return{r:parseInt(t.slice(1,3),16),g:parseInt(t.slice(3,5),16),b:parseInt(t.slice(5,7),16)}}(t);return.299*e.r+.587*e.g+.114*e.b},Oe=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"rgba(255, 255, 255, 0)",e=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);return e&&4===e.length?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):t},Se=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"rgb(255,255,255)",e=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(t),r=e?t:Oe(t),n=Ee(r)<155?"light":"dark";return n},Le=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.magazineSlug,n=void 0===r?"":r,o=e.isArchivePage,a=void 0!==o&&o;if(a)return"/magazine/archive/".concat(n);if(n)return"/magazine/".concat(n,"/").concat(t.slug);var i="section"===t.template;if(i){var u=$t(t,["metadata","section","0","id"],""),c=e.sections,l=c&&c.find((function(t){return t.id===u}));return l?l["section-url"]:"/"}return"/collection/".concat(t.slug)};o.shape({"sketches-host":o.string,"cdn-name":o.string,"cdn-image":o.string}),o.shape({headline:o.string,"last-published-at":o.number,subheadline:o.string});function Ae(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ke={"./load-more.m.css":{button:"load-more-m_button__1mmf1",default:"load-more-m_default__2_k4V",dark:"load-more-m_dark__3dfzb",light:"load-more-m_light__ePZQI"}};function Ne(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 ze(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ne(Object(r),!0).forEach((function(e){Ae(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ne(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var Te=function(e){var r=e.config,n=void 0===r?{}:r,o=e.collection,a=e.template,i=void 0===a?"SubsequentLoadCount":a,u=e.onClick,l=e.navigate,s=e.qtConfig,f=n.showButton,d=void 0===f||f,h=n.buttonText,v=void 0===h?"Read More":h,p=n.theme,y=void 0===p?"":p,g=n.customUrlPath,b=void 0===g?"":g;if(!d)return null;var _=Se(y),w=b?"/".concat(b):function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;if(r)return r;var n=e.magazineSlug,o=void 0===n?"":n,a=e.isArchivePage;return void 0!==a&&a?"/magazine/archive/".concat(o):o?"/magazine/".concat(o,"/").concat(t.slug):t?Le(t,e):"/"}(o,ze(ze({},s),n));return"SubsequentLoadCount"===i?t.createElement("div",{onClick:u,"data-test-id":"load-more",className:"arr--button "+m("button ".concat(_," default"),ke)},v):t.createElement(c,{href:w,navigateTo:l,"data-test-id":"load-more","aria-label":"load-more"},t.createElement("div",{className:"arr--button "+m("button ".concat(_," default"),ke)},v))};Te.propTypes={collection:o.object,template:o.string,config:o.object,onClick:o.func,navigate:o.func,qtConfig:o.object};var Ce=e(),Me={"./key-events.m.css":{container:"key-events-m_container__1slhR","event-title":"key-events-m_event-title__u9bt3","cards-wrapper":"key-events-m_cards-wrapper__3f8aB","time-wrapper":"key-events-m_time-wrapper__2poXn",dark:"key-events-m_dark__hrnAr",light:"key-events-m_light__2gE0a",borderNone:"key-events-m_borderNone__2tNUK","fade-out":"key-events-m_fade-out__11jv_"}},Ie=function(e){var r=e.config,n=e.index,o=e.cardLength,c=e.card,l=void 0===c?{}:c,s=e.slug,f=e.loadCards,d=e.showLoadMore,h=l["card-added-at"],v=l["story-elements"],p=void 0===v?[]:v,g=l.id,b=r.theme,_=r.mountAt,w=void 0===_?"":_,x=Se(b),j="dark"===x?"#333":"#fff",E=n===o-1,O=E?"borderNone":"";return t.createElement(t.Fragment,null,t.createElement("div",{className:m("time-wrapper ".concat(x),Me)},t.createElement(y,{color:j}),function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0,c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;if(c&&"story"===o){var l=c&&i(e,c),s=l&&u(l,"yyyy-MM-dd'T'HH:mm:ssXXX",{timeZone:c}),f=xe("","","",e,n);return t.createElement("time",{dateTime:s},f)}return t.createElement(a,{date:e,formatter:function(t,e,o,a){return r(t,e,o,a,n)}})}(h,xe,{showTime:!0,isTimeFirst:!0})),t.createElement("a",{href:"".concat(w,"/").concat(s,"#").concat(g),"aria-label":"event-title"},t.createElement("div",{className:m("event-title ".concat(x," ").concat(O),Me)},p.map((function(e,r){return"title"===e.type&&t.createElement("h3",{key:r},e.text)})),d&&E&&f&&t.createElement("div",{className:"key-events-m_fade-out__11jv_",style:{backgroundImage:"linear-gradient(to bottom, transparent, ".concat(b,")")}}))))};Ie.propTypes={card:o.shape({"card-added-at":o.number,"story-elements":o.array,id:o.string}),config:o.object,slug:o.string,story:o.object,elements:o.array,index:o.number,cardLength:o.number,loadCards:o.bool,showLoadMore:o.bool};var Pe=function(e){var o=e.story,a=void 0===o?{}:o,i=e.config,u=void 0===i?{}:i,c=e.showLoadMore,s=void 0===c||c,d=n(a,["cards"],[]),h=u.theme,v=u.initialLoadCount,p=void 0===v?4:v,y=Se(h),g=f(r(p),2),b=g[0],_=g[1],w=d.filter((function(t){return n(t.metadata,["attributes","key-event"])})),x=w.length>b,j=l((function(t){return n(t,["qt","config"],{})}));if(w.length<1)return null;var E=(s?w.slice(0,b):w.slice(0,4)).map((function(e,r,n){return t.createElement(Ie,{cardLength:n.length,card:e,key:e.id,slug:a.slug,config:u,index:r,loadCards:x,showLoadMore:s})}));return t.createElement("div",{style:{background:h},className:"arrow-component "+m("container ".concat(y),Me)},t.createElement("h3",null,"Key Events"),t.createElement("div",{className:"key-events-m_cards-wrapper__3f8aB"},E),s&&x&&t.createElement(Te,{onClick:function(){_(b+p)},template:"SubsequentLoadCount",config:u,qtConfig:j}))};Pe.propTypes={story:o.object,config:o.object,showLoadMore:o.bool};var Fe,Re=(Fe=Pe,function(e){return t.createElement(Ce.Provider,{value:e.config},t.createElement(Fe,e))});export{Re as default};
|
package/LoadmoreButton/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import t from"react";import{LinkBase as e}from"@quintype/components";import r from"prop-types";import"react-timeago";import"date-fns-tz";function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function a(t){var e={exports:{}};return t(e,e.exports),e.exports}var u=a((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={attributeNames:{styleName:"className"},generateScopedName:"[path]___[name]__[local]___[hash:base64:5]",handleMissingStyleName:"throw"};e.default=r})),c=i(a((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,n=(r=u)&&r.__esModule?r:{default:r};var o=function(t,e){if("throw"===e)throw new Error(t);return"warn"===e&&console.warn(t),null};e.default=function(t,e,r){var i=Object.keys(e),a=r||{},u=a.handleMissingStyleName,c=void 0===u?n.default.handleMissingStyleName:u,l=a.autoResolveMultipleImports,s=void 0===l?n.default.autoResolveMultipleImports:l;return t?t.split(" ").filter((function(t){return t})).map((function(t){if(function(t){return-1!==t.indexOf(".")}(t))return function(t,e,r){var i=t.split("."),a=i[0],u=i[1],c=r||n.default.handleMissingStyleName;return u?e[a]?e[a][u]?e[a][u]:o("CSS module does not exist: "+u,c):o("CSS module import does not exist: "+a,c):o("Invalid style name: "+t,c)}(t,e,c);if(0===i.length)throw new Error("Cannot use styleName attribute for style name '"+t+"' without importing at least one stylesheet.");if(i.length>1){if(!s)throw new Error("Cannot use anonymous style name '"+t+"' with more than one stylesheet import without setting 'autoResolveMultipleImports' to true.");return function(t,e,r){var i=r||n.default.handleMissingStyleName,a=Object.keys(e).map((function(r){return e[r][t]&&r})).filter((function(t){return t}));if(a.length>1)throw new Error('Cannot resolve styleName "'+t+'" because it is present in multiple imports:\n\n\t'+a.join("\n\t")+'\n\nYou can resolve this by using a named import, e.g:\n\n\timport foo from "'+a[0]+'";\n\t<div styleName="foo.'+t+'" />\n\n');return 0===a.length?o("Could not resolve the styleName '"+t+"'.",i):e[a[0]][t]}(t,e,c)}var r=e[i[0]];return r[t]?r[t]:o("Could not resolve the styleName '"+t+"'.",c)})).filter((function(t){return t})).join(" "):""}})));a((function(t){var e=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof y?e:y,i=Object.create(o.prototype),a=new P(n||[]);return i._invoke=function(t,e,r){var n=f;return function(o,i){if(n===p)throw new Error("Generator is already running");if(n===v){if("throw"===o)throw i;return k()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=E(a,r);if(u){if(u===d)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var c=s(t,e,r);if("normal"===c.type){if(n=r.done?v:h,c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=v,r.method="throw",r.arg=c.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var f="suspendedStart",h="suspendedYield",p="executing",v="completed",d={};function y(){}function g(){}function m(){}var _={};c(_,i,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(N([])));w&&w!==r&&n.call(w,i)&&(_=w);var j=m.prototype=y.prototype=Object.create(_);function O(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function E(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,E(t,r),"throw"===r.method))return d;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var o=s(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,d;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,d):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function N(t){if(t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}return{next:k}}function k(){return{value:e,done:!0}}return g.prototype=m,c(j,"constructor",m),c(m,"constructor",g),g.displayName=c(m,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,c(t,u,"GeneratorFunction")),t.prototype=Object.create(j),t},t.awrap=function(t){return{__await:t}},O(x.prototype),c(x.prototype,a,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new x(l(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},O(j),c(j,u,"Generator"),c(j,i,(function(){return this})),c(j,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=N,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:N(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),d}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}));var l=Array.isArray,s="object"==typeof o&&o&&o.Object===Object&&o,f="object"==typeof self&&self&&self.Object===Object&&self,h=s||f||Function("return this")(),p=h.Symbol,v=Object.prototype,d=v.hasOwnProperty,y=v.toString,g=p?p.toStringTag:void 0;var m=function(t){var e=d.call(t,g),r=t[g];try{t[g]=void 0;var n=!0}catch(t){}var o=y.call(t);return n&&(e?t[g]=r:delete t[g]),o},_=Object.prototype.toString;var b=function(t){return _.call(t)},w=p?p.toStringTag:void 0;var j=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":w&&w in Object(t)?m(t):b(t)};var O=function(t){return null!=t&&"object"==typeof t};var x=function(t){return"symbol"==typeof t||O(t)&&"[object Symbol]"==j(t)},E=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,S=/^\w*$/;var L=function(t,e){if(l(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!x(t))||(S.test(t)||!E.test(t)||null!=e&&t in Object(e))};var P=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var N,k=function(t){if(!P(t))return!1;var e=j(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},z=h["__core-js_shared__"],C=(N=/[^.]+$/.exec(z&&z.keys&&z.keys.IE_PROTO||""))?"Symbol(src)_1."+N:"";var I=function(t){return!!C&&C in t},T=Function.prototype.toString;var F=function(t){if(null!=t){try{return T.call(t)}catch(t){}try{return t+""}catch(t){}}return""},M=/^\[object .+?Constructor\]$/,A=Function.prototype,$=Object.prototype,G=A.toString,R=$.hasOwnProperty,q=RegExp("^"+G.call(R).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var D=function(t){return!(!P(t)||I(t))&&(k(t)?q:M).test(F(t))};var Y=function(t,e){return null==t?void 0:t[e]};var U=function(t,e){var r=Y(t,e);return D(r)?r:void 0},B=U(Object,"create");var Q=function(){this.__data__=B?B(null):{},this.size=0};var V=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Z=Object.prototype.hasOwnProperty;var H=function(t){var e=this.__data__;if(B){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return Z.call(e,t)?e[t]:void 0},J=Object.prototype.hasOwnProperty;var K=function(t){var e=this.__data__;return B?void 0!==e[t]:J.call(e,t)};var W=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=B&&void 0===e?"__lodash_hash_undefined__":e,this};function X(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}X.prototype.clear=Q,X.prototype.delete=V,X.prototype.get=H,X.prototype.has=K,X.prototype.set=W;var tt=X;var et=function(){this.__data__=[],this.size=0};var rt=function(t,e){return t===e||t!=t&&e!=e};var nt=function(t,e){for(var r=t.length;r--;)if(rt(t[r][0],e))return r;return-1},ot=Array.prototype.splice;var it=function(t){var e=this.__data__,r=nt(e,t);return!(r<0)&&(r==e.length-1?e.pop():ot.call(e,r,1),--this.size,!0)};var at=function(t){var e=this.__data__,r=nt(e,t);return r<0?void 0:e[r][1]};var ut=function(t){return nt(this.__data__,t)>-1};var ct=function(t,e){var r=this.__data__,n=nt(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function lt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}lt.prototype.clear=et,lt.prototype.delete=it,lt.prototype.get=at,lt.prototype.has=ut,lt.prototype.set=ct;var st=lt,ft=U(h,"Map");var ht=function(){this.size=0,this.__data__={hash:new tt,map:new(ft||st),string:new tt}};var pt=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var vt=function(t,e){var r=t.__data__;return pt(e)?r["string"==typeof e?"string":"hash"]:r.map};var dt=function(t){var e=vt(this,t).delete(t);return this.size-=e?1:0,e};var yt=function(t){return vt(this,t).get(t)};var gt=function(t){return vt(this,t).has(t)};var mt=function(t,e){var r=vt(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function _t(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}_t.prototype.clear=ht,_t.prototype.delete=dt,_t.prototype.get=yt,_t.prototype.has=gt,_t.prototype.set=mt;var bt=_t;function wt(t,e){if("function"!=typeof t||null!=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 a=t.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(wt.Cache||bt),r}wt.Cache=bt;var jt=wt;var Ot=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,xt=/\\(\\)?/g,Et=function(t){var e=jt(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Ot,(function(t,r,n,o){e.push(n?o.replace(xt,"$1"):r||t)})),e}));var St=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o},Lt=p?p.prototype:void 0,Pt=Lt?Lt.toString:void 0;var Nt=function t(e){if("string"==typeof e)return e;if(l(e))return St(e,t)+"";if(x(e))return Pt?Pt.call(e):"";var r=e+"";return"0"==r&&1/e==-Infinity?"-0":r};var kt=function(t){return null==t?"":Nt(t)};var zt=function(t,e){return l(t)?t:L(t,e)?[t]:Et(kt(t))};var Ct=function(t){if("string"==typeof t||x(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e};var It=function(t,e){for(var r=0,n=(e=zt(e,t)).length;null!=t&&r<n;)t=t[Ct(e[r++])];return r&&r==n?t:void 0};var Tt=function(t,e,r){var n=null==t?void 0:It(t,e);return void 0===n?r:n},Ft=function(t){var e=function(t){return{r:parseInt(t.slice(1,3),16),g:parseInt(t.slice(3,5),16),b:parseInt(t.slice(5,7),16)}}(t);return.299*e.r+.587*e.g+.114*e.b},Mt=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"rgba(255, 255, 255, 0)",e=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);return e&&4===e.length?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):t},At=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.magazineSlug,n=void 0===r?"":r,o=e.isArchivePage,i=void 0!==o&&o;if(i)return"/magazine/archive/".concat(n);if(n)return"/magazine/".concat(n,"/").concat(t.slug);var a="section"===t.template;if(a){var u=Tt(t,["metadata","section","0","id"],""),c=e.sections,l=c&&c.find((function(t){return t.id===u}));return l?l["section-url"]:"/"}return"/collection/".concat(t.slug)};r.shape({"sketches-host":r.string,"cdn-name":r.string,"cdn-image":r.string}),r.shape({headline:r.string,"last-published-at":r.number,subheadline:r.string});var $t={"./load-more.m.css":{button:"load-more-m_button__1mmf1",default:"load-more-m_default__2_k4V",dark:"load-more-m_dark__3dfzb",light:"load-more-m_light__ePZQI"}};function Gt(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 Rt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Gt(Object(r),!0).forEach((function(e){n(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Gt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var qt=function(r){var n=r.config,o=void 0===n?{}:n,i=r.collection,a=r.template,u=void 0===a?"SubsequentLoadCount":a,l=r.onClick,s=r.navigate,f=r.qtConfig,h=o.showButton,p=void 0===h||h,v=o.buttonText,d=void 0===v?"Read More":v,y=o.theme,g=void 0===y?"":y,m=o.customUrlPath,_=void 0===m?"":m;if(!p)return null;var b=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"rgb(255,255,255)",e=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(t)?t:Mt(t);return Ft(e)<155?"light":"dark"}(g),w=_?"/".concat(_):function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;if(r)return r;var n=e.magazineSlug,o=void 0===n?"":n,i=e.isArchivePage;return void 0!==i&&i?"/magazine/archive/".concat(o):o?"/magazine/".concat(o,"/").concat(t.slug):t?At(t,e):"/"}(i,Rt(Rt({},f),o));return"SubsequentLoadCount"===u?t.createElement("div",{onClick:l,"data-test-id":"load-more",className:"arr--button "+c("button ".concat(b," default"),$t)},d):t.createElement(e,{href:w,navigateTo:s,"data-test-id":"load-more","aria-label":"load-more"},t.createElement("div",{className:"arr--button "+c("button ".concat(b," default"),$t)},d))};qt.propTypes={collection:r.object,template:r.string,config:r.object,onClick:r.func,navigate:r.func,qtConfig:r.object};export{qt as LoadmoreButton};
|